Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump draggle #1266

Merged
merged 3 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 14 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/form-js-editor/assets/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@use 'form-js-editor-base.css';
@use '@bpmn-io/draggle/dist/dragula.css';
@use '@bpmn-io/draggle/dist/draggle.css';
@use '@bpmn-io/properties-panel/dist/assets/properties-panel.css';
4 changes: 2 additions & 2 deletions packages/form-js-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"./dist/assets/form-js-editor.css": "./dist/assets/form-js-editor.css",
"./dist/assets/form-js-editor-base.css": "./dist/assets/form-js-editor-base.css",
"./dist/assets/dragula.css": "./dist/assets/dragula.css",
"./dist/assets/draggle.css": "./dist/assets/draggle.css",
"./dist/assets/properties-panel.css": "./dist/assets/properties-panel.css",
"./package.json": "./package.json"
},
Expand Down Expand Up @@ -47,7 +47,7 @@
"url": "https://github.com/bpmn-io"
},
"dependencies": {
"@bpmn-io/draggle": "^4.0.0",
"@bpmn-io/draggle": "^4.1.1",
"@bpmn-io/form-js-viewer": "^1.10.1",
"@bpmn-io/properties-panel": "^3.23.0",
"array-move": "^4.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/form-js-editor/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ export default [
'preact/jsx-runtime',
'preact/hooks',
'preact/compat',
'@bpmn-o/draggle',
'@bpmn-io/draggle',
'@bpmn-io/form-js-viewer',
],
plugins: pgl([
copy({
targets: [
{ src: 'assets/form-js-editor-base.css', dest: 'dist/assets' },
{ src: '../../node_modules/@bpmn-io/draggle/dist/dragula.css', dest: 'dist/assets' },
{ src: '../../node_modules/@bpmn-io/draggle/dist/draggle.css', dest: 'dist/assets' },
{ src: '../../node_modules/@bpmn-io/properties-panel/dist/assets/properties-panel.css', dest: 'dist/assets' },
],
}),
Expand Down
16 changes: 13 additions & 3 deletions packages/form-js-editor/test/spec/FormEditor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,16 @@ function dispatchEvent(element, type, options = {}) {
element.dispatchEvent(event);
}

function dispatchPointerEvent(element, type, options = {}) {
const event = new PointerEvent(type, {
bubbles: true,
cancelable: true,
...options,
});

element.dispatchEvent(event);
}

function startResizing(node, position) {
if (!position) {
const bounds = node.getBoundingClientRect();
Expand All @@ -1500,7 +1510,7 @@ function startDragging(container, node) {
node = container.querySelector('.fjs-palette-field[data-field-type="textfield"]');
}

dispatchEvent(node, 'mousedown', { which: 1 });
dispatchPointerEvent(node, 'pointerdown', { pointerId: 1, buttons: 1 });
}

function moveDragging(container, position) {
Expand All @@ -1514,12 +1524,12 @@ function moveDragging(container, position) {
};
}

dispatchEvent(form, 'mousemove', position);
dispatchPointerEvent(form, 'pointermove', { pointerId: 1, buttons: 1, ...position });
}

function endDragging(container) {
const form = container.querySelector('.fjs-drop-container-vertical[data-id="Form_1"]');
dispatchEvent(form, 'mouseup');
dispatchPointerEvent(form, 'pointerup', { pointerId: 1 });
}

function getRowOrder(container) {
Expand Down
2 changes: 1 addition & 1 deletion packages/form-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"./dist/assets/form-js.css": "./dist/assets/form-js.css",
"./dist/assets/form-js-base.css": "./dist/assets/form-js-base.css",
"./dist/assets/dragula.css": "./dist/assets/dragula.css",
"./dist/assets/draggle.css": "./dist/assets/draggle.css",
"./dist/assets/flatpickr/light.css": "./dist/assets/flatpickr/light.css",
"./dist/assets/properties-panel.css": "./dist/assets/properties-panel.css",
"./dist/assets/form-js-editor.css": "./dist/assets/form-js-editor.css",
Expand Down
Loading