diff --git a/package-lock.json b/package-lock.json index 6efcccc0b..c1c98b602 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2074,12 +2074,12 @@ } }, "node_modules/@bpmn-io/draggle": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@bpmn-io/draggle/-/draggle-4.0.0.tgz", - "integrity": "sha512-tr2ANCOgR9hR6Gc3x1r6JiWSwiFflFHdF0ilN8Pl5P1Q9kzsWuoTnzwVLHLQt0Ly6CiiwHJ9x+LTkJ5Bd3b3qA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@bpmn-io/draggle/-/draggle-4.1.1.tgz", + "integrity": "sha512-2frw1gBl5I3XGrIDg4CBy6bpJiOuslKUOg9T91Fke6bIttFkF0zxlTKh4E4zU8g7gAo4ze0HnKMZDgHxea+Itw==", + "license": "MIT", "dependencies": { - "contra": "^1.9.4", - "crossvent": "^1.5.5" + "contra": "^1.9.4" } }, "node_modules/@bpmn-io/feel-editor": { @@ -8479,13 +8479,6 @@ "node": ">= 8" } }, - "node_modules/crossvent": { - "version": "1.5.5", - "license": "MIT", - "dependencies": { - "custom-event": "^1.0.0" - } - }, "node_modules/css-color-keywords": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", @@ -8651,6 +8644,7 @@ }, "node_modules/custom-event": { "version": "1.0.1", + "dev": true, "license": "MIT" }, "node_modules/dargs": { @@ -20949,7 +20943,7 @@ "version": "1.10.1", "license": "SEE LICENSE IN LICENSE", "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", @@ -22420,12 +22414,11 @@ } }, "@bpmn-io/draggle": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@bpmn-io/draggle/-/draggle-4.0.0.tgz", - "integrity": "sha512-tr2ANCOgR9hR6Gc3x1r6JiWSwiFflFHdF0ilN8Pl5P1Q9kzsWuoTnzwVLHLQt0Ly6CiiwHJ9x+LTkJ5Bd3b3qA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@bpmn-io/draggle/-/draggle-4.1.1.tgz", + "integrity": "sha512-2frw1gBl5I3XGrIDg4CBy6bpJiOuslKUOg9T91Fke6bIttFkF0zxlTKh4E4zU8g7gAo4ze0HnKMZDgHxea+Itw==", "requires": { - "contra": "^1.9.4", - "crossvent": "^1.5.5" + "contra": "^1.9.4" } }, "@bpmn-io/feel-editor": { @@ -22474,7 +22467,7 @@ "@bpmn-io/form-js-editor": { "version": "file:packages/form-js-editor", "requires": { - "@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", @@ -26878,12 +26871,6 @@ } } }, - "crossvent": { - "version": "1.5.5", - "requires": { - "custom-event": "^1.0.0" - } - }, "css-color-keywords": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", @@ -26995,7 +26982,8 @@ "dev": true }, "custom-event": { - "version": "1.0.1" + "version": "1.0.1", + "dev": true }, "dargs": { "version": "7.0.0", diff --git a/packages/form-js-editor/assets/index.scss b/packages/form-js-editor/assets/index.scss index d877b0a23..3b7492a40 100644 --- a/packages/form-js-editor/assets/index.scss +++ b/packages/form-js-editor/assets/index.scss @@ -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'; diff --git a/packages/form-js-editor/package.json b/packages/form-js-editor/package.json index ea00478d9..c28c31a7f 100644 --- a/packages/form-js-editor/package.json +++ b/packages/form-js-editor/package.json @@ -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/dragula.css": "./dist/assets/draggle.css", "./dist/assets/properties-panel.css": "./dist/assets/properties-panel.css", "./package.json": "./package.json" }, @@ -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", diff --git a/packages/form-js-editor/rollup.config.js b/packages/form-js-editor/rollup.config.js index 7dcba522d..15cc7bf5c 100644 --- a/packages/form-js-editor/rollup.config.js +++ b/packages/form-js-editor/rollup.config.js @@ -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' }, ], }), diff --git a/packages/form-js-editor/test/spec/FormEditor.spec.js b/packages/form-js-editor/test/spec/FormEditor.spec.js index ffee132c8..571e892a2 100644 --- a/packages/form-js-editor/test/spec/FormEditor.spec.js +++ b/packages/form-js-editor/test/spec/FormEditor.spec.js @@ -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(); @@ -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) { @@ -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) {