diff --git a/package-lock.json b/package-lock.json index 8e4b95b..a3979df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "bpmnlint": "^7.8.0", "camunda-bpmn-moddle": "^7.0.1", "core-js": "^3.8.1", + "diagram-js-accordion-palette": "^1.3.1", "diagram-js-context-pad": "^1.0.2", "diagram-js-grid-bg": "^1.0.3", "diagram-js-minimap": "^2.1.1", @@ -5498,6 +5499,40 @@ "tiny-svg": "^2.2.2" } }, + "node_modules/diagram-js-accordion-palette": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/diagram-js-accordion-palette/-/diagram-js-accordion-palette-1.3.1.tgz", + "integrity": "sha512-rxhNbk87t3L5hqlmrULNBBussZmyu2KLpMkjFEPl0j1T/5kVgPLDIGsPKwOO7CkjpB0Vuzw+LVzcSIvZPFkhNA==", + "dependencies": { + "min-dash": "^4.1.1", + "min-dom": "^4.1.0" + }, + "peerDependencies": { + "diagram-js": "^12.2.0", + "min-dash": "^4.1.1", + "min-dom": "^4.1.0" + } + }, + "node_modules/diagram-js-accordion-palette/node_modules/component-event": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/component-event/-/component-event-0.2.1.tgz", + "integrity": "sha512-wGA++isMqiDq1jPYeyv2as/Bt/u+3iLW0rEa+8NQ82jAv3TgqMiCM+B2SaBdn2DfLilLjjq736YcezihRYhfxw==" + }, + "node_modules/diagram-js-accordion-palette/node_modules/min-dash": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/min-dash/-/min-dash-4.2.1.tgz", + "integrity": "sha512-to+unsToePnm7cUeR9TrMzFlETHd/UXmU+ELTRfWZj5XGT41KF6X3L233o3E/GdEs3sk2Tbw/lOLD1avmWkg8A==" + }, + "node_modules/diagram-js-accordion-palette/node_modules/min-dom": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/min-dom/-/min-dom-4.1.0.tgz", + "integrity": "sha512-1lj1EyoSwY/UmTeT/hhPiZTsq+vK9D+8FAJ/53iK5jT1otkG9rJTixSKdjmTieEvdfES+sKbbTptzaQJhnacjA==", + "dependencies": { + "component-event": "^0.2.1", + "domify": "^1.4.1", + "min-dash": "^4.0.0" + } + }, "node_modules/diagram-js-context-pad": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/diagram-js-context-pad/-/diagram-js-context-pad-1.0.2.tgz", @@ -18740,6 +18775,37 @@ "tiny-svg": "^2.2.2" } }, + "diagram-js-accordion-palette": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/diagram-js-accordion-palette/-/diagram-js-accordion-palette-1.3.1.tgz", + "integrity": "sha512-rxhNbk87t3L5hqlmrULNBBussZmyu2KLpMkjFEPl0j1T/5kVgPLDIGsPKwOO7CkjpB0Vuzw+LVzcSIvZPFkhNA==", + "requires": { + "min-dash": "^4.1.1", + "min-dom": "^4.1.0" + }, + "dependencies": { + "component-event": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/component-event/-/component-event-0.2.1.tgz", + "integrity": "sha512-wGA++isMqiDq1jPYeyv2as/Bt/u+3iLW0rEa+8NQ82jAv3TgqMiCM+B2SaBdn2DfLilLjjq736YcezihRYhfxw==" + }, + "min-dash": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/min-dash/-/min-dash-4.2.1.tgz", + "integrity": "sha512-to+unsToePnm7cUeR9TrMzFlETHd/UXmU+ELTRfWZj5XGT41KF6X3L233o3E/GdEs3sk2Tbw/lOLD1avmWkg8A==" + }, + "min-dom": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/min-dom/-/min-dom-4.1.0.tgz", + "integrity": "sha512-1lj1EyoSwY/UmTeT/hhPiZTsq+vK9D+8FAJ/53iK5jT1otkG9rJTixSKdjmTieEvdfES+sKbbTptzaQJhnacjA==", + "requires": { + "component-event": "^0.2.1", + "domify": "^1.4.1", + "min-dash": "^4.0.0" + } + } + } + }, "diagram-js-context-pad": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/diagram-js-context-pad/-/diagram-js-context-pad-1.0.2.tgz", diff --git a/package.json b/package.json index a64426f..6c56172 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "bpmnlint": "^7.8.0", "camunda-bpmn-moddle": "^7.0.1", "core-js": "^3.8.1", + "diagram-js-accordion-palette": "^1.3.1", "diagram-js-context-pad": "^1.0.2", "diagram-js-grid-bg": "^1.0.3", "diagram-js-minimap": "^2.1.1", diff --git a/packages/components/Designer/moduleAndExtensions.js b/packages/components/Designer/moduleAndExtensions.js index fcc6880..503c277 100644 --- a/packages/components/Designer/moduleAndExtensions.js +++ b/packages/components/Designer/moduleAndExtensions.js @@ -19,6 +19,7 @@ import { resolver, rules } from "@packages/additional-modules/Lint/bpmnlint"; import minimapModule from "diagram-js-minimap"; import gridBGModule from "diagram-js-grid-bg"; import contextPadModule from "diagram-js-context-pad"; +import accordionPaletteModule from "diagram-js-accordion-palette"; // moddle 定义文件 import activitiModdleDescriptors from "@packages/moddle-extensions/activiti.json"; @@ -122,6 +123,13 @@ export default function (settings) { beauty: true }; + // 折叠Palette + modules.push(accordionPaletteModule); + options["accordionPalette"] = { + accordion: false, + showName: true + }; + // 设置其他模块的启用 if (settings.otherModule) { // 设置 自定义规则 diff --git a/packages/components/Settings/index.vue b/packages/components/Settings/index.vue index dcfad44..9e48def 100644 --- a/packages/components/Settings/index.vue +++ b/packages/components/Settings/index.vue @@ -42,8 +42,7 @@ - 自定义网格 - 默认网点 + 网格背景 图片 diff --git a/packages/preset-configuration/editor.config.js b/packages/preset-configuration/editor.config.js index 2ae5c84..ab075ad 100644 --- a/packages/preset-configuration/editor.config.js +++ b/packages/preset-configuration/editor.config.js @@ -6,7 +6,7 @@ export const defaultSettings = { penalMode: "custom", contextPadMode: "enhancement", rendererMode: "rewrite", - bg: "grid-image", + bg: "grid", toolbar: true, useMinimap: true, useLint: true, diff --git a/packages/theme/index.scss b/packages/theme/index.scss index b05c357..00878a7 100644 --- a/packages/theme/index.scss +++ b/packages/theme/index.scss @@ -9,6 +9,7 @@ @import "bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css"; @import "diagram-js-context-pad/assets/index.css"; +@import "diagram-js-accordion-palette/assets/index.css"; @import "toolbar"; @import "designer";