Commit 7f4a27c3 by pangchong

chore(deps): 移除项目中过时的bpmn相关依赖

- 从 package-lock.json 中删除了 bpmn-js 及其相关包
- 移除了 camunda-bpmn-moddle 和 bpmn-js-properties-panel
- 同时清理了与 bpmn 生态相关的多个子依赖
- 删除了一些与 bpmn 无关的冗余依赖如 docx-preview
- 优化了依赖列表,减小包体积和复杂度
parent 6ddae59a
...@@ -9,16 +9,11 @@ ...@@ -9,16 +9,11 @@
"version": "0.0.0", "version": "0.0.0",
"dependencies": { "dependencies": {
"@alova/scene-vue": "^1.6.2", "@alova/scene-vue": "^1.6.2",
"@bpmn-io/properties-panel": "^3.40.4",
"@vicons/ionicons5": "^0.13.0", "@vicons/ionicons5": "^0.13.0",
"@vueuse/core": "^14.3.0", "@vueuse/core": "^14.3.0",
"alova": "^3.5.0", "alova": "^3.5.0",
"bpmn-js": "^17.11.1",
"bpmn-js-properties-panel": "^5.53.0",
"camunda-bpmn-moddle": "^7.0.1",
"dayjs": "^1.11.19", "dayjs": "^1.11.19",
"diff": "^7.0.0", "diff": "^7.0.0",
"docx-preview": "^0.3.7",
"less": "^4.5.1", "less": "^4.5.1",
"lodash-es": "^4.18.1", "lodash-es": "^4.18.1",
"mammoth": "^1.11.0", "mammoth": "^1.11.0",
...@@ -30,8 +25,7 @@ ...@@ -30,8 +25,7 @@
"vue": "^3.5.25", "vue": "^3.5.25",
"vue-i18n": "^11.2.8", "vue-i18n": "^11.2.8",
"vue-router": "^5.0.3", "vue-router": "^5.0.3",
"vuedraggable": "^4.1.0", "vuedraggable": "^4.1.0"
"xlsx": "^0.18.5"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^19.8.0", "@commitlint/cli": "^19.8.0",
...@@ -163,226 +157,6 @@ ...@@ -163,226 +157,6 @@
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@bpmn-io/cm-theme": {
"version": "0.1.0-alpha.2",
"resolved": "https://registry.npmjs.org/@bpmn-io/cm-theme/-/cm-theme-0.1.0-alpha.2.tgz",
"integrity": "sha512-ZILgiYzxk3KMvxplUXmdRFQo45/JehDPg5k9tWfehmzUOSE13ssyLPil8uCloMQnb3yyzyOWTjb/wzKXTHlFQw==",
"license": "MIT",
"dependencies": {
"@codemirror/language": "^6.3.1",
"@codemirror/view": "^6.5.1",
"@lezer/highlight": "^1.1.4"
},
"workspaces": {
"packages": [
"preview-themes"
]
}
},
"node_modules/@bpmn-io/diagram-js-ui": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/@bpmn-io/diagram-js-ui/-/diagram-js-ui-0.2.3.tgz",
"integrity": "sha512-OGyjZKvGK8tHSZ0l7RfeKhilGoOGtFDcoqSGYkX0uhFlo99OVZ9Jn1K7TJGzcE9BdKwvA5Y5kGqHEhdTxHvFfw==",
"license": "MIT",
"dependencies": {
"htm": "^3.1.1",
"preact": "^10.11.2"
}
},
"node_modules/@bpmn-io/extract-process-variables": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@bpmn-io/extract-process-variables/-/extract-process-variables-2.2.1.tgz",
"integrity": "sha512-1E5ydNzTqgx513NxA1nxk2CqDb9OkusfU9Tf6WejD1BiY+5u130XnZOFE/FQX0JB6ZmPOeFMx4IDEuHjrGhOzw==",
"license": "MIT",
"dependencies": {
"min-dash": "^5.0.0"
}
},
"node_modules/@bpmn-io/feel-editor": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/@bpmn-io/feel-editor/-/feel-editor-2.5.2.tgz",
"integrity": "sha512-pxbhUDAlLe+zDAvmG7Y057o8rnVImKYEbgjH4+zZiq3WjPw5bZYu2kraJfpWMs3xkyOCvLR6H3J3f8yJRuHmgw==",
"license": "MIT",
"dependencies": {
"@bpmn-io/feel-lint": "^3.1.0",
"@bpmn-io/lang-feel": "^3.0.0",
"@camunda/feel-builtins": "^1.0.0",
"@codemirror/autocomplete": "^6.20.0",
"@codemirror/commands": "^6.10.2",
"@codemirror/language": "^6.11.3",
"@codemirror/lint": "^6.9.3",
"@codemirror/state": "^6.5.4",
"@codemirror/view": "^6.39.13",
"@lezer/highlight": "^1.2.3",
"min-dom": "^5.2.0",
"mitt": "^3.0.1"
},
"engines": {
"node": ">= 20"
}
},
"node_modules/@bpmn-io/feel-lint": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@bpmn-io/feel-lint/-/feel-lint-3.1.0.tgz",
"integrity": "sha512-nOCYWMXgwR0joU4XKhu4f3P5f4/AsmuyiV1e+fzcXTCh7iMLU8VYdHXSIzZuJ0zxz3Gsnp7A8S8lt+HJ43H6IA==",
"license": "MIT",
"dependencies": {
"@bpmn-io/lezer-feel": "^2.1.0",
"@codemirror/language": "^6.12.1"
},
"engines": {
"node": "*"
}
},
"node_modules/@bpmn-io/feelin": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/@bpmn-io/feelin/-/feelin-6.1.0.tgz",
"integrity": "sha512-nqmmlHRD9tl0ZcpYTEkZdpc/rAMoYc+ct0SOg9fFIFWRaEApme3DuXC7v9AMA5g+upGCKd6cUc3t97y+unpfMw==",
"license": "MIT",
"dependencies": {
"@bpmn-io/lezer-feel": "^2.1.0",
"@lezer/common": "^1.5.0",
"luxon": "^3.7.2",
"min-dash": "^5.0.0"
},
"engines": {
"node": ">= 20.12.0"
}
},
"node_modules/@bpmn-io/lang-feel": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@bpmn-io/lang-feel/-/lang-feel-3.0.0.tgz",
"integrity": "sha512-t/k0z5AW18J7Qz2i/bIFAlvlcS63RuyQB9OQ0YiC1WyMosxXRAnv98LHnVbwirx9vje1DLll85tkBT2B8KLjmQ==",
"license": "MIT",
"dependencies": {
"@bpmn-io/lezer-feel": "^2.0.0",
"@codemirror/autocomplete": "^6.20.0",
"@codemirror/language": "^6.11.3",
"@lezer/common": "^1.4.0"
},
"engines": {
"node": ">= 20.12.0"
}
},
"node_modules/@bpmn-io/lezer-feel": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@bpmn-io/lezer-feel/-/lezer-feel-2.3.1.tgz",
"integrity": "sha512-MNe3M7XUuUk0OvrIIXM0m7M2hNLouxPqJyqd6+XCDMy9dsan0zLA0vl7Cu8ypCbsAlViIGIvYdkjzZNiXd3gng==",
"license": "MIT",
"dependencies": {
"@lezer/highlight": "^1.2.3",
"@lezer/lr": "^1.4.8",
"min-dash": "^5.0.0"
},
"engines": {
"node": ">= 20.12.0"
}
},
"node_modules/@bpmn-io/properties-panel": {
"version": "3.40.4",
"resolved": "https://registry.npmjs.org/@bpmn-io/properties-panel/-/properties-panel-3.40.4.tgz",
"integrity": "sha512-0u3bUbvLnD/DGW/SAG52zh9LmGX6YOwaavh0ac3CuFN7+Ba/Uf1kkZzEBHi+Qo8xkDtL5p2xxeP+2sIO67hJyA==",
"license": "MIT",
"dependencies": {
"@bpmn-io/feel-editor": "^2.5.2",
"@carbon/icons": "^11.69.0",
"@codemirror/view": "^6.28.1",
"classnames": "^2.5.1",
"feelers": "^1.5.1",
"focus-trap": "^8.0.0",
"min-dash": "^5.0.0",
"min-dom": "^5.2.0"
},
"engines": {
"node": "*"
}
},
"node_modules/@camunda/feel-builtins": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@camunda/feel-builtins/-/feel-builtins-1.1.0.tgz",
"integrity": "sha512-aBIGrXkURxDxBulrkaF1AOV261RSyukA5UWGRgDiULvlJ+P6/dYX7boBuO8Be9OP/hjAjZoTbK1kKcuqfCp7ng==",
"license": "MIT"
},
"node_modules/@carbon/icons": {
"version": "11.77.0",
"resolved": "https://registry.npmjs.org/@carbon/icons/-/icons-11.77.0.tgz",
"integrity": "sha512-ettXMK71QyDm2rQQGNyDWusbFUCk3kWSXaxIdOm5LvPTdW+ujarqbWEIU/rmniSbazN4ar8XngZxEWSvfTKYmA==",
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
"@ibm/telemetry-js": "^1.5.0"
}
},
"node_modules/@codemirror/autocomplete": {
"version": "6.20.1",
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.1.tgz",
"integrity": "sha512-1cvg3Vz1dSSToCNlJfRA2WSI4ht3K+WplO0UMOgmUYPivCyy2oueZY6Lx7M9wThm7SDUBViRmuT+OG/i8+ON9A==",
"license": "MIT",
"dependencies": {
"@codemirror/language": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.17.0",
"@lezer/common": "^1.0.0"
}
},
"node_modules/@codemirror/commands": {
"version": "6.10.3",
"resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.10.3.tgz",
"integrity": "sha512-JFRiqhKu+bvSkDLI+rUhJwSxQxYb759W5GBezE8Uc8mHLqC9aV/9aTC7yJSqCtB3F00pylrLCwnyS91Ap5ej4Q==",
"license": "MIT",
"dependencies": {
"@codemirror/language": "^6.0.0",
"@codemirror/state": "^6.6.0",
"@codemirror/view": "^6.27.0",
"@lezer/common": "^1.1.0"
}
},
"node_modules/@codemirror/language": {
"version": "6.12.3",
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.12.3.tgz",
"integrity": "sha512-QwCZW6Tt1siP37Jet9Tb02Zs81TQt6qQrZR2H+eGMcFsL1zMrk2/b9CLC7/9ieP1fjIUMgviLWMmgiHoJrj+ZA==",
"license": "MIT",
"dependencies": {
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.23.0",
"@lezer/common": "^1.5.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.0.0",
"style-mod": "^4.0.0"
}
},
"node_modules/@codemirror/lint": {
"version": "6.9.5",
"resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.5.tgz",
"integrity": "sha512-GElsbU9G7QT9xXhpUg1zWGmftA/7jamh+7+ydKRuT0ORpWS3wOSP0yT1FOlIZa7mIJjpVPipErsyvVqB9cfTFA==",
"license": "MIT",
"dependencies": {
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.35.0",
"crelt": "^1.0.5"
}
},
"node_modules/@codemirror/state": {
"version": "6.6.0",
"resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.6.0.tgz",
"integrity": "sha512-4nbvra5R5EtiCzr9BTHiTLc+MLXK2QGiAVYMyi8PkQd3SR+6ixar/Q/01Fa21TBIDOZXgeWV4WppsQolSreAPQ==",
"license": "MIT",
"dependencies": {
"@marijn/find-cluster-break": "^1.0.0"
}
},
"node_modules/@codemirror/view": {
"version": "6.40.0",
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.40.0.tgz",
"integrity": "sha512-WA0zdU7xfF10+5I3HhUUq3kqOx3KjqmtQ9lqZjfK7jtYk4G72YW9rezcSywpaUMCWOMlq+6E0pO1IWg1TNIhtg==",
"license": "MIT",
"dependencies": {
"@codemirror/state": "^6.6.0",
"crelt": "^1.0.6",
"style-mod": "^4.1.0",
"w3c-keyname": "^2.2.4"
}
},
"node_modules/@commitlint/cli": { "node_modules/@commitlint/cli": {
"version": "19.8.1", "version": "19.8.1",
"resolved": "https://registry.npmmirror.com/@commitlint/cli/-/cli-19.8.1.tgz", "resolved": "https://registry.npmmirror.com/@commitlint/cli/-/cli-19.8.1.tgz",
...@@ -1119,15 +893,6 @@ ...@@ -1119,15 +893,6 @@
"node": ">=18" "node": ">=18"
} }
}, },
"node_modules/@ibm/telemetry-js": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/@ibm/telemetry-js/-/telemetry-js-1.11.0.tgz",
"integrity": "sha512-RO/9j+URJnSfseWg9ZkEX9p+a3Ousd33DBU7rOafoZB08RqdzxFVYJ2/iM50dkBuD0o7WX7GYt1sLbNgCoE+pA==",
"license": "Apache-2.0",
"bin": {
"ibmtelemetry": "dist/collect.js"
}
},
"node_modules/@intlify/core-base": { "node_modules/@intlify/core-base": {
"version": "11.2.8", "version": "11.2.8",
"resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-11.2.8.tgz", "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-11.2.8.tgz",
...@@ -1223,46 +988,6 @@ ...@@ -1223,46 +988,6 @@
"integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==", "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==",
"license": "Apache-2.0" "license": "Apache-2.0"
}, },
"node_modules/@lezer/common": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.1.tgz",
"integrity": "sha512-6YRVG9vBkaY7p1IVxL4s44n5nUnaNnGM2/AckNgYOnxTG2kWh1vR8BMxPseWPjRNpb5VtXnMpeYAEAADoRV1Iw==",
"license": "MIT"
},
"node_modules/@lezer/highlight": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz",
"integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==",
"license": "MIT",
"dependencies": {
"@lezer/common": "^1.3.0"
}
},
"node_modules/@lezer/lr": {
"version": "1.4.8",
"resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.8.tgz",
"integrity": "sha512-bPWa0Pgx69ylNlMlPvBPryqeLYQjyJjqPx+Aupm5zydLIF3NE+6MMLT8Yi23Bd9cif9VS00aUebn+6fDIGBcDA==",
"license": "MIT",
"dependencies": {
"@lezer/common": "^1.0.0"
}
},
"node_modules/@lezer/markdown": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/@lezer/markdown/-/markdown-1.6.3.tgz",
"integrity": "sha512-jpGm5Ps+XErS+xA4urw7ogEGkeZOahVQF21Z6oECF0sj+2liwZopd2+I8uH5I/vZsRuuze3OxBREIANLf6KKUw==",
"license": "MIT",
"dependencies": {
"@lezer/common": "^1.5.0",
"@lezer/highlight": "^1.0.0"
}
},
"node_modules/@marijn/find-cluster-break": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz",
"integrity": "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==",
"license": "MIT"
},
"node_modules/@nodelib/fs.scandir": { "node_modules/@nodelib/fs.scandir": {
"version": "2.1.5", "version": "2.1.5",
"resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
...@@ -2025,15 +1750,6 @@ ...@@ -2025,15 +1750,6 @@
"node": ">=0.4.0" "node": ">=0.4.0"
} }
}, },
"node_modules/adler-32": {
"version": "1.3.1",
"resolved": "https://registry.npmmirror.com/adler-32/-/adler-32-1.3.1.tgz",
"integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/ajv": { "node_modules/ajv": {
"version": "8.18.0", "version": "8.18.0",
"resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.18.0.tgz", "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.18.0.tgz",
...@@ -2152,18 +1868,6 @@ ...@@ -2152,18 +1868,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/array-move": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/array-move/-/array-move-4.0.0.tgz",
"integrity": "sha512-+RY54S8OuVvg94THpneQvFRmqWdAHeqtMzgMW6JNurHxe8rsS07cHQdfGkXnTUXiBcyZ0j3SiDIxxj0RPiqCkQ==",
"license": "MIT",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ast-kit": { "node_modules/ast-kit": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmmirror.com/ast-kit/-/ast-kit-2.2.0.tgz", "resolved": "https://registry.npmmirror.com/ast-kit/-/ast-kit-2.2.0.tgz",
...@@ -2300,140 +2004,6 @@ ...@@ -2300,140 +2004,6 @@
"integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==", "integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/bpmn-js": {
"version": "17.11.1",
"resolved": "https://registry.npmjs.org/bpmn-js/-/bpmn-js-17.11.1.tgz",
"integrity": "sha512-ywCeTg5kvN8lYkU+fHE+YXTGlfKc55lRBn7zW3k1//toeMNPy/PS/uQiujRWdFhMrH5dbtDvlwWukNw2pjWw8Q==",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"bpmn-moddle": "^8.1.0",
"diagram-js": "^14.10.0",
"diagram-js-direct-editing": "^3.0.1",
"ids": "^1.0.5",
"inherits-browser": "^0.1.0",
"min-dash": "^4.1.1",
"min-dom": "^4.2.1",
"tiny-svg": "^3.1.2"
},
"engines": {
"node": "*"
}
},
"node_modules/bpmn-js-properties-panel": {
"version": "5.53.0",
"resolved": "https://registry.npmjs.org/bpmn-js-properties-panel/-/bpmn-js-properties-panel-5.53.0.tgz",
"integrity": "sha512-fXn9yU6YLgr5SiaGHegAHZQe1jbezFPyqzZvTrTR1zOEmlNdTK4H9MAHFeBX6iasw31M9Y6KbPPP/tiZ/VhYug==",
"license": "MIT",
"dependencies": {
"@bpmn-io/extract-process-variables": "^2.2.1",
"array-move": "^4.0.0",
"ids": "^3.0.1",
"min-dash": "^5.0.0",
"min-dom": "^5.3.0"
},
"engines": {
"node": "*"
},
"peerDependencies": {
"@bpmn-io/properties-panel": ">= 3.40",
"bpmn-js": ">= 11.5",
"camunda-bpmn-js-behaviors": ">= 0.4",
"diagram-js": ">= 11.9"
}
},
"node_modules/bpmn-js/node_modules/diagram-js": {
"version": "14.11.3",
"resolved": "https://registry.npmjs.org/diagram-js/-/diagram-js-14.11.3.tgz",
"integrity": "sha512-Seq9BHAXfzKS60L4v4Gvgvv72wOtvrfJQAyyPm9pntSZDMzjoodPSXnEUPud1G2zVCMGEUUW++s0reEdaWgkXA==",
"license": "MIT",
"dependencies": {
"@bpmn-io/diagram-js-ui": "^0.2.3",
"clsx": "^2.1.0",
"didi": "^10.2.2",
"inherits-browser": "^0.1.0",
"min-dash": "^4.1.0",
"min-dom": "^4.2.1",
"object-refs": "^0.4.0",
"path-intersection": "^3.0.0",
"tiny-svg": "^3.1.2"
},
"engines": {
"node": "*"
}
},
"node_modules/bpmn-js/node_modules/didi": {
"version": "10.2.2",
"resolved": "https://registry.npmjs.org/didi/-/didi-10.2.2.tgz",
"integrity": "sha512-l8NYkYFXV1izHI65EyT8EXOjUZtKmQkHLTT89cSP7HU5J/G7AOj0dXKtLc04EXYlga99PBY18IPjOeZ+c3DI4w==",
"license": "MIT",
"engines": {
"node": ">= 16"
}
},
"node_modules/bpmn-js/node_modules/domify": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/domify/-/domify-1.4.2.tgz",
"integrity": "sha512-m4yreHcUWHBncGVV7U+yQzc12vIlq0jMrtHZ5mW6dQMiL/7skSYNVX9wqKwOtyO9SGCgevrAFEgOCAHmamHTUA==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/bpmn-js/node_modules/ids": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/ids/-/ids-1.0.5.tgz",
"integrity": "sha512-XQ0yom/4KWTL29sLG+tyuycy7UmeaM/79GRtSJq6IG9cJGIPeBz5kwDCguie3TwxaMNIc3WtPi0cTa1XYHicpw==",
"license": "MIT"
},
"node_modules/bpmn-js/node_modules/min-dash": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/min-dash/-/min-dash-4.2.3.tgz",
"integrity": "sha512-VLMYQI5+FcD9Ad24VcB08uA83B07OhueAlZ88jBK6PyupTvEJwllTMUqMy0wPGYs7pZUEtEEMWdHB63m3LtEcg==",
"license": "MIT"
},
"node_modules/bpmn-js/node_modules/min-dom": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/min-dom/-/min-dom-4.2.1.tgz",
"integrity": "sha512-TMoL8SEEIhUWYgkj7XMSgxmwSyGI+4fP2KFFGnN3FbHfbGHVdsLYSz8LoIsgPhz4dWRmLvxWWSMgzZMJW5sZuA==",
"license": "MIT",
"dependencies": {
"component-event": "^0.2.1",
"domify": "^1.4.1",
"min-dash": "^4.2.1"
}
},
"node_modules/bpmn-js/node_modules/path-intersection": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/path-intersection/-/path-intersection-3.1.0.tgz",
"integrity": "sha512-3xS3lvv/vuwm5aH2BVvNRvnvwR2Drde7jQClKpCXTYXIMMjcw/EnMhzCgeHwqbCpzi760PEfAkU53vSIlrNr9A==",
"license": "MIT",
"engines": {
"node": ">= 14.20"
}
},
"node_modules/bpmn-js/node_modules/tiny-svg": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/tiny-svg/-/tiny-svg-3.1.3.tgz",
"integrity": "sha512-9mwnPqXInRsBmH/DO6NMxBE++9LsqpVXQSSTZGc5bomoKKvL5OX/Hlotw7XVXP6XLRcHWIzZpxfovGqWKgCypQ==",
"license": "MIT"
},
"node_modules/bpmn-moddle": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/bpmn-moddle/-/bpmn-moddle-8.1.0.tgz",
"integrity": "sha512-yI5OAFfYVJwViKTsTsonVfCBPtB3MlefADUORwNIxxBOMp21vnoxuxsdgUWlPH/dvAEZh/+mr8UtqOBNu8NC5Q==",
"license": "MIT",
"dependencies": {
"min-dash": "^4.0.0",
"moddle": "^6.2.3",
"moddle-xml": "^10.1.0"
}
},
"node_modules/bpmn-moddle/node_modules/min-dash": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/min-dash/-/min-dash-4.2.3.tgz",
"integrity": "sha512-VLMYQI5+FcD9Ad24VcB08uA83B07OhueAlZ88jBK6PyupTvEJwllTMUqMy0wPGYs7pZUEtEEMWdHB63m3LtEcg==",
"license": "MIT"
},
"node_modules/braces": { "node_modules/braces": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz", "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz",
...@@ -2501,28 +2071,6 @@ ...@@ -2501,28 +2071,6 @@
"node": ">= 6" "node": ">= 6"
} }
}, },
"node_modules/camunda-bpmn-js-behaviors": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/camunda-bpmn-js-behaviors/-/camunda-bpmn-js-behaviors-1.14.1.tgz",
"integrity": "sha512-M+awrL4PuKFi8kemtjLV8A32zODVQ2/cLuaHl2lZt5EKmMjxGb41BL3ulDRaK1Je712/zFTliYKNDX3IsLAvpQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"ids": "^3.0.1",
"min-dash": "^5.0.0"
},
"peerDependencies": {
"bpmn-js": ">= 9",
"camunda-bpmn-moddle": ">= 7",
"zeebe-bpmn-moddle": ">= 0.18"
}
},
"node_modules/camunda-bpmn-moddle": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/camunda-bpmn-moddle/-/camunda-bpmn-moddle-7.0.1.tgz",
"integrity": "sha512-Br8Diu6roMpziHdpl66Dhnm0DTnCFMrSD9zwLV08LpD52QA0UsXxU87XfHf08HjuB7ly0Hd1bvajZRpf9hbmYQ==",
"license": "MIT"
},
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001774", "version": "1.0.30001774",
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001774.tgz", "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001774.tgz",
...@@ -2544,19 +2092,6 @@ ...@@ -2544,19 +2092,6 @@
], ],
"license": "CC-BY-4.0" "license": "CC-BY-4.0"
}, },
"node_modules/cfb": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/cfb/-/cfb-1.2.2.tgz",
"integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==",
"license": "Apache-2.0",
"dependencies": {
"adler-32": "~1.3.0",
"crc-32": "~1.2.0"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/chalk": { "node_modules/chalk": {
"version": "5.6.2", "version": "5.6.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-5.6.2.tgz", "resolved": "https://registry.npmmirror.com/chalk/-/chalk-5.6.2.tgz",
...@@ -2585,12 +2120,6 @@ ...@@ -2585,12 +2120,6 @@
"url": "https://paulmillr.com/funding/" "url": "https://paulmillr.com/funding/"
} }
}, },
"node_modules/classnames": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz",
"integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==",
"license": "MIT"
},
"node_modules/cliui": { "node_modules/cliui": {
"version": "8.0.1", "version": "8.0.1",
"resolved": "https://registry.npmmirror.com/cliui/-/cliui-8.0.1.tgz", "resolved": "https://registry.npmmirror.com/cliui/-/cliui-8.0.1.tgz",
...@@ -2606,24 +2135,6 @@ ...@@ -2606,24 +2135,6 @@
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/clsx": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
"integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/codepage": {
"version": "1.15.0",
"resolved": "https://registry.npmmirror.com/codepage/-/codepage-1.15.0.tgz",
"integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/color-convert": { "node_modules/color-convert": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
...@@ -2665,12 +2176,6 @@ ...@@ -2665,12 +2176,6 @@
"dot-prop": "^5.1.0" "dot-prop": "^5.1.0"
} }
}, },
"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==",
"license": "MIT"
},
"node_modules/confbox": { "node_modules/confbox": {
"version": "0.2.4", "version": "0.2.4",
"resolved": "https://registry.npmmirror.com/confbox/-/confbox-0.2.4.tgz", "resolved": "https://registry.npmmirror.com/confbox/-/confbox-0.2.4.tgz",
...@@ -2795,24 +2300,6 @@ ...@@ -2795,24 +2300,6 @@
"jiti": "lib/jiti-cli.mjs" "jiti": "lib/jiti-cli.mjs"
} }
}, },
"node_modules/crc-32": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/crc-32/-/crc-32-1.2.2.tgz",
"integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==",
"license": "Apache-2.0",
"bin": {
"crc32": "bin/crc32.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/crelt": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz",
"integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==",
"license": "MIT"
},
"node_modules/css-render": { "node_modules/css-render": {
"version": "0.15.14", "version": "0.15.14",
"resolved": "https://registry.npmmirror.com/css-render/-/css-render-0.15.14.tgz", "resolved": "https://registry.npmmirror.com/css-render/-/css-render-0.15.14.tgz",
...@@ -2892,53 +2379,6 @@ ...@@ -2892,53 +2379,6 @@
"integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/diagram-js": {
"version": "15.10.0",
"resolved": "https://registry.npmjs.org/diagram-js/-/diagram-js-15.10.0.tgz",
"integrity": "sha512-M9Wia5kGOzF5vxVVO/GHlql9mL9gntjGXSIfpJcs8pryCq1z1aNFjqeKmtJC9RcrPsop74QDDqcDVZNoaH/agQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"@bpmn-io/diagram-js-ui": "^0.2.3",
"clsx": "^2.1.1",
"didi": "^11.0.0",
"inherits-browser": "^0.1.0",
"min-dash": "^5.0.0",
"min-dom": "^5.3.0",
"object-refs": "^0.4.0",
"path-intersection": "^4.1.0",
"tiny-svg": "^4.1.4"
},
"engines": {
"node": "*"
}
},
"node_modules/diagram-js-direct-editing": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/diagram-js-direct-editing/-/diagram-js-direct-editing-3.3.0.tgz",
"integrity": "sha512-EjXYb35J3qBU8lLz5U81hn7wNykVmF7U5DXZ7BvPok2IX7rmPz+ZyaI5AEMiqaC6lpSnHqPxFcPgKEiJcAiv5w==",
"license": "MIT",
"dependencies": {
"min-dash": "^5.0.0",
"min-dom": "^5.2.0"
},
"engines": {
"node": "*"
},
"peerDependencies": {
"diagram-js": "*"
}
},
"node_modules/didi": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/didi/-/didi-11.0.0.tgz",
"integrity": "sha512-PzCfRzQttvFpVcYMbSF7h8EsWjeJpVjWH4qDhB5LkMi1ILvHq4Ob0vhM2wLFziPkbUBi+PAo7ODbe2sacR7nJQ==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">= 20.12"
}
},
"node_modules/didyoumean": { "node_modules/didyoumean": {
"version": "1.2.2", "version": "1.2.2",
"resolved": "https://registry.npmmirror.com/didyoumean/-/didyoumean-1.2.2.tgz", "resolved": "https://registry.npmmirror.com/didyoumean/-/didyoumean-1.2.2.tgz",
...@@ -2968,27 +2408,6 @@ ...@@ -2968,27 +2408,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/docx-preview": {
"version": "0.3.7",
"resolved": "https://registry.npmmirror.com/docx-preview/-/docx-preview-0.3.7.tgz",
"integrity": "sha512-Lav69CTA/IYZPJTsKH7oYeoZjyg96N0wEJMNslGJnZJ+dMUZK85Lt5ASC79yUlD48ecWjuv+rkcmFt6EVPV0Xg==",
"license": "Apache-2.0",
"dependencies": {
"jszip": ">=3.0.0"
}
},
"node_modules/domify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/domify/-/domify-3.0.0.tgz",
"integrity": "sha512-bs2yO68JDFOm6rKv8f0EnrM2cENduhRkpqOtt/s5l5JBA/eqGBZCzLPmdYoHtJ6utgLGgcBajFsEQbl12pT0lQ==",
"license": "MIT",
"engines": {
"node": ">=20"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/dot-prop": { "node_modules/dot-prop": {
"version": "5.3.0", "version": "5.3.0",
"resolved": "https://registry.npmmirror.com/dot-prop/-/dot-prop-5.3.0.tgz", "resolved": "https://registry.npmmirror.com/dot-prop/-/dot-prop-5.3.0.tgz",
...@@ -3234,37 +2653,6 @@ ...@@ -3234,37 +2653,6 @@
} }
} }
}, },
"node_modules/feelers": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/feelers/-/feelers-1.5.1.tgz",
"integrity": "sha512-LKIAqtScSfy55Tw62DhBcxIT3k2XnppzWrkmGfsbdad0a+TxMfaLF1CSYhoVRF5FvPAUXvor1Ux/75wtBaDYpA==",
"license": "MIT",
"dependencies": {
"@bpmn-io/cm-theme": "^0.1.0-alpha.2",
"@bpmn-io/feel-lint": "^3.1.0",
"@bpmn-io/feelin": "^6.1.0",
"@bpmn-io/lezer-feel": "^2.1.0",
"@codemirror/autocomplete": "^6.20.0",
"@codemirror/commands": "^6.10.1",
"@codemirror/language": "^6.12.1",
"@codemirror/lint": "^6.9.3",
"@codemirror/state": "^6.5.4",
"@codemirror/view": "^6.39.12",
"@lezer/common": "^1.5.1",
"@lezer/highlight": "^1.1.6",
"@lezer/lr": "^1.4.8",
"@lezer/markdown": "^1.6.3",
"min-dom": "^5.2.0"
},
"engines": {
"node": "*"
},
"workspaces": {
"packages": [
"feelers-playground"
]
}
},
"node_modules/fill-range": { "node_modules/fill-range": {
"version": "7.1.1", "version": "7.1.1",
"resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz", "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz",
...@@ -3296,24 +2684,6 @@ ...@@ -3296,24 +2684,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/focus-trap": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-8.0.1.tgz",
"integrity": "sha512-9ptSG6z51YQOstI/oN4XuVGP/03u2nh0g//qz7L6zX0i6PZiPnkcf3GenXq7N2hZnASXaMxTPpbKwdI+PFvxlw==",
"license": "MIT",
"dependencies": {
"tabbable": "^6.4.0"
}
},
"node_modules/frac": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/frac/-/frac-1.1.2.tgz",
"integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/fraction.js": { "node_modules/fraction.js": {
"version": "5.3.4", "version": "5.3.4",
"resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-5.3.4.tgz", "resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-5.3.4.tgz",
...@@ -3445,12 +2815,6 @@ ...@@ -3445,12 +2815,6 @@
"integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/htm": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/htm/-/htm-3.1.1.tgz",
"integrity": "sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ==",
"license": "Apache-2.0"
},
"node_modules/husky": { "node_modules/husky": {
"version": "8.0.3", "version": "8.0.3",
"resolved": "https://registry.npmmirror.com/husky/-/husky-8.0.3.tgz", "resolved": "https://registry.npmmirror.com/husky/-/husky-8.0.3.tgz",
...@@ -3480,15 +2844,6 @@ ...@@ -3480,15 +2844,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/ids": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/ids/-/ids-3.0.2.tgz",
"integrity": "sha512-t6YJP4mdC+GHF96Nbis/4FEANhP/8VWmYMvUuYpXvSdrhg5hpIVbq2XZlOA3UWTbtdwPCi0q7jEXOdHkAnqOnw==",
"license": "MIT",
"engines": {
"node": ">= 20.12"
}
},
"node_modules/image-size": { "node_modules/image-size": {
"version": "0.5.5", "version": "0.5.5",
"resolved": "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz", "resolved": "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz",
...@@ -3552,12 +2907,6 @@ ...@@ -3552,12 +2907,6 @@
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"license": "ISC" "license": "ISC"
}, },
"node_modules/inherits-browser": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/inherits-browser/-/inherits-browser-0.1.0.tgz",
"integrity": "sha512-CJHHvW3jQ6q7lzsXPpapLdMx5hDpSF3FSh45pwsj6bKxJJ8Nl8v43i5yXnr3BdfOimGHKyniewQtnAIp3vyJJw==",
"license": "ISC"
},
"node_modules/ini": { "node_modules/ini": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmmirror.com/ini/-/ini-4.1.1.tgz", "resolved": "https://registry.npmmirror.com/ini/-/ini-4.1.1.tgz",
...@@ -3964,15 +3313,6 @@ ...@@ -3964,15 +3313,6 @@
"underscore": "^1.13.1" "underscore": "^1.13.1"
} }
}, },
"node_modules/luxon": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz",
"integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==",
"license": "MIT",
"engines": {
"node": ">=12"
}
},
"node_modules/magic-string": { "node_modules/magic-string": {
"version": "0.30.21", "version": "0.30.21",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.21.tgz", "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.21.tgz",
...@@ -4107,22 +3447,6 @@ ...@@ -4107,22 +3447,6 @@
"node": ">=4" "node": ">=4"
} }
}, },
"node_modules/min-dash": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/min-dash/-/min-dash-5.0.0.tgz",
"integrity": "sha512-EGuoBnVL7/Fnv2sqakpX5WGmZehZ3YMmLayT7sM8E9DRU74kkeyMg4Rik1lsOkR2GbFNeBca4/L+UfU6gF0Edw==",
"license": "MIT"
},
"node_modules/min-dom": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/min-dom/-/min-dom-5.3.0.tgz",
"integrity": "sha512-0w5FEBgPAyHhmFojW3zxd7we3D+m5XYS3E/06OyvxmbHJoiQVa4Nagj6RWvoAKYRw5xth6cP5TMePc5cR1M9hA==",
"license": "MIT",
"dependencies": {
"domify": "^3.0.0",
"min-dash": "^5.0.0"
}
},
"node_modules/minimist": { "node_modules/minimist": {
"version": "1.2.8", "version": "1.2.8",
"resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz",
...@@ -4168,38 +3492,6 @@ ...@@ -4168,38 +3492,6 @@
"pathe": "^2.0.1" "pathe": "^2.0.1"
} }
}, },
"node_modules/moddle": {
"version": "6.2.3",
"resolved": "https://registry.npmjs.org/moddle/-/moddle-6.2.3.tgz",
"integrity": "sha512-bLVN+ZHL3aKnhxc19XtjUfvdJsS3EsiEJC7bT6YPD11qYmTzvsxrGgyYz1Ouof7TZuGw0lDJ1OLmEnxcpQWk3Q==",
"license": "MIT",
"dependencies": {
"min-dash": "^4.0.0"
}
},
"node_modules/moddle-xml": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/moddle-xml/-/moddle-xml-10.1.0.tgz",
"integrity": "sha512-erWckwLt+dYskewKXJso9u+aAZ5172lOiYxSOqKCPTy7L/xmqH1PoeoA7eVC7oJTt3PqF5TkZzUmbjGH6soQBg==",
"license": "MIT",
"dependencies": {
"min-dash": "^4.0.0",
"moddle": "^6.0.0",
"saxen": "^8.1.2"
}
},
"node_modules/moddle-xml/node_modules/min-dash": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/min-dash/-/min-dash-4.2.3.tgz",
"integrity": "sha512-VLMYQI5+FcD9Ad24VcB08uA83B07OhueAlZ88jBK6PyupTvEJwllTMUqMy0wPGYs7pZUEtEEMWdHB63m3LtEcg==",
"license": "MIT"
},
"node_modules/moddle/node_modules/min-dash": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/min-dash/-/min-dash-4.2.3.tgz",
"integrity": "sha512-VLMYQI5+FcD9Ad24VcB08uA83B07OhueAlZ88jBK6PyupTvEJwllTMUqMy0wPGYs7pZUEtEEMWdHB63m3LtEcg==",
"license": "MIT"
},
"node_modules/muggle-string": { "node_modules/muggle-string": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmmirror.com/muggle-string/-/muggle-string-0.4.1.tgz", "resolved": "https://registry.npmmirror.com/muggle-string/-/muggle-string-0.4.1.tgz",
...@@ -4320,15 +3612,6 @@ ...@@ -4320,15 +3612,6 @@
"node": ">= 6" "node": ">= 6"
} }
}, },
"node_modules/object-refs": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/object-refs/-/object-refs-0.4.0.tgz",
"integrity": "sha512-6kJqKWryKZmtte6QYvouas0/EIJKPI1/MMIuRsiBlNuhIMfqYTggzX2F1AJ2+cDs288xyi9GL7FyasHINR98BQ==",
"license": "MIT",
"engines": {
"node": "*"
}
},
"node_modules/obug": { "node_modules/obug": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmmirror.com/obug/-/obug-2.1.1.tgz", "resolved": "https://registry.npmmirror.com/obug/-/obug-2.1.1.tgz",
...@@ -4442,16 +3725,6 @@ ...@@ -4442,16 +3725,6 @@
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
} }
}, },
"node_modules/path-intersection": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/path-intersection/-/path-intersection-4.1.0.tgz",
"integrity": "sha512-urUP6WvhnxbHPdHYl6L7Yrc6+1ny6uOFKPCzPxTSUSYGHG0o94RmI7SvMMaScNAM5RtTf08bg4skc6/kjfne3A==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">= 14.20"
}
},
"node_modules/path-is-absolute": { "node_modules/path-is-absolute": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
...@@ -4737,16 +4010,6 @@ ...@@ -4737,16 +4010,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/preact": {
"version": "10.29.0",
"resolved": "https://registry.npmjs.org/preact/-/preact-10.29.0.tgz",
"integrity": "sha512-wSAGyk2bYR1c7t3SZ3jHcM6xy0lcBcDel6lODcs9ME6Th++Dx2KU+6D3HD8wMMKGA8Wpw7OMd3/4RGzYRpzwRg==",
"license": "MIT",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/preact"
}
},
"node_modules/prettier": { "node_modules/prettier": {
"version": "3.8.1", "version": "3.8.1",
"resolved": "https://registry.npmmirror.com/prettier/-/prettier-3.8.1.tgz", "resolved": "https://registry.npmmirror.com/prettier/-/prettier-3.8.1.tgz",
...@@ -5027,12 +4290,6 @@ ...@@ -5027,12 +4290,6 @@
"node": ">=11.0.0" "node": ">=11.0.0"
} }
}, },
"node_modules/saxen": {
"version": "8.1.2",
"resolved": "https://registry.npmjs.org/saxen/-/saxen-8.1.2.tgz",
"integrity": "sha512-xUOiiFbc3Ow7p8KMxwsGICPx46ZQvy3+qfNVhrkwfz3Vvq45eGt98Ft5IQaA1R/7Tb5B5MKh9fUR9x3c3nDTxw==",
"license": "MIT"
},
"node_modules/scule": { "node_modules/scule": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz", "resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz",
...@@ -5111,18 +4368,6 @@ ...@@ -5111,18 +4368,6 @@
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
"license": "BSD-3-Clause" "license": "BSD-3-Clause"
}, },
"node_modules/ssf": {
"version": "0.11.2",
"resolved": "https://registry.npmmirror.com/ssf/-/ssf-0.11.2.tgz",
"integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
"license": "Apache-2.0",
"dependencies": {
"frac": "~1.1.2"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/string_decoder": { "node_modules/string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz",
...@@ -5173,12 +4418,6 @@ ...@@ -5173,12 +4418,6 @@
"url": "https://github.com/sponsors/antfu" "url": "https://github.com/sponsors/antfu"
} }
}, },
"node_modules/style-mod": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.3.tgz",
"integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==",
"license": "MIT"
},
"node_modules/sucrase": { "node_modules/sucrase": {
"version": "3.35.1", "version": "3.35.1",
"resolved": "https://registry.npmmirror.com/sucrase/-/sucrase-3.35.1.tgz", "resolved": "https://registry.npmmirror.com/sucrase/-/sucrase-3.35.1.tgz",
...@@ -5254,12 +4493,6 @@ ...@@ -5254,12 +4493,6 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/tabbable": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.4.0.tgz",
"integrity": "sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg==",
"license": "MIT"
},
"node_modules/tailwindcss": { "node_modules/tailwindcss": {
"version": "3.4.19", "version": "3.4.19",
"resolved": "https://registry.npmmirror.com/tailwindcss/-/tailwindcss-3.4.19.tgz", "resolved": "https://registry.npmmirror.com/tailwindcss/-/tailwindcss-3.4.19.tgz",
...@@ -5423,16 +4656,6 @@ ...@@ -5423,16 +4656,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/tiny-svg": {
"version": "4.1.4",
"resolved": "https://registry.npmjs.org/tiny-svg/-/tiny-svg-4.1.4.tgz",
"integrity": "sha512-cBaEACCbouYrQc9RG+eTXnPYosX1Ijqty/I6DdXovwDd89Pwu4jcmpOR7BuFEF9YCcd7/AWwasE0207WMK7hdw==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">= 20"
}
},
"node_modules/tinyexec": { "node_modules/tinyexec": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmmirror.com/tinyexec/-/tinyexec-1.0.2.tgz", "resolved": "https://registry.npmmirror.com/tinyexec/-/tinyexec-1.0.2.tgz",
...@@ -6044,36 +5267,12 @@ ...@@ -6044,36 +5267,12 @@
"vue": "^3.0.11" "vue": "^3.0.11"
} }
}, },
"node_modules/w3c-keyname": {
"version": "2.2.8",
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz",
"integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==",
"license": "MIT"
},
"node_modules/webpack-virtual-modules": { "node_modules/webpack-virtual-modules": {
"version": "0.6.2", "version": "0.6.2",
"resolved": "https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", "resolved": "https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz",
"integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==", "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/wmf": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/wmf/-/wmf-1.0.2.tgz",
"integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/word": {
"version": "0.3.0",
"resolved": "https://registry.npmmirror.com/word/-/word-0.3.0.tgz",
"integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/wrap-ansi": { "node_modules/wrap-ansi": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
...@@ -6092,27 +5291,6 @@ ...@@ -6092,27 +5291,6 @@
"url": "https://github.com/chalk/wrap-ansi?sponsor=1" "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
} }
}, },
"node_modules/xlsx": {
"version": "0.18.5",
"resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.18.5.tgz",
"integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==",
"license": "Apache-2.0",
"dependencies": {
"adler-32": "~1.3.0",
"cfb": "~1.2.1",
"codepage": "~1.15.0",
"crc-32": "~1.2.1",
"ssf": "~0.11.2",
"wmf": "~1.0.1",
"word": "~0.3.0"
},
"bin": {
"xlsx": "bin/xlsx.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/xmlbuilder": { "node_modules/xmlbuilder": {
"version": "10.1.1", "version": "10.1.1",
"resolved": "https://registry.npmmirror.com/xmlbuilder/-/xmlbuilder-10.1.1.tgz", "resolved": "https://registry.npmmirror.com/xmlbuilder/-/xmlbuilder-10.1.1.tgz",
...@@ -6188,13 +5366,6 @@ ...@@ -6188,13 +5366,6 @@
"funding": { "funding": {
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
},
"node_modules/zeebe-bpmn-moddle": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/zeebe-bpmn-moddle/-/zeebe-bpmn-moddle-1.12.0.tgz",
"integrity": "sha512-wYKfgdV5suCNx4IVaq0qOjHRxSQ5XOkxfwC8EBHuGCtmEVk8zv1VRg0opV0kVQe89jvRH3iF3Yl/DoB6qiCV5Q==",
"license": "MIT",
"peer": true
} }
} }
} }
...@@ -17,16 +17,11 @@ ...@@ -17,16 +17,11 @@
}, },
"dependencies": { "dependencies": {
"@alova/scene-vue": "^1.6.2", "@alova/scene-vue": "^1.6.2",
"@bpmn-io/properties-panel": "^3.40.4",
"@vicons/ionicons5": "^0.13.0", "@vicons/ionicons5": "^0.13.0",
"@vueuse/core": "^14.3.0", "@vueuse/core": "^14.3.0",
"alova": "^3.5.0", "alova": "^3.5.0",
"bpmn-js": "^17.11.1",
"bpmn-js-properties-panel": "^5.53.0",
"camunda-bpmn-moddle": "^7.0.1",
"dayjs": "^1.11.19", "dayjs": "^1.11.19",
"diff": "^7.0.0", "diff": "^7.0.0",
"docx-preview": "^0.3.7",
"less": "^4.5.1", "less": "^4.5.1",
"lodash-es": "^4.18.1", "lodash-es": "^4.18.1",
"mammoth": "^1.11.0", "mammoth": "^1.11.0",
...@@ -38,8 +33,7 @@ ...@@ -38,8 +33,7 @@
"vue": "^3.5.25", "vue": "^3.5.25",
"vue-i18n": "^11.2.8", "vue-i18n": "^11.2.8",
"vue-router": "^5.0.3", "vue-router": "^5.0.3",
"vuedraggable": "^4.1.0", "vuedraggable": "^4.1.0"
"xlsx": "^0.18.5"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^19.8.0", "@commitlint/cli": "^19.8.0",
......
...@@ -605,6 +605,107 @@ export const useEditorStore = defineStore('editor', { ...@@ -605,6 +605,107 @@ export const useEditorStore = defineStore('editor', {
return newNodes.length return newNodes.length
}, },
insertXmlNodeFragment(fragment: XmlNode, mode: 'above' | 'below' | 'inside' | 'replace', targetNodeId?: string) {
const targetId = targetNodeId || this.selectedNodeId
if (!this.xmlTree || !targetId) {
throw new Error('请先选择一个目标节点!')
}
const appStore = useAppStore()
if (!appStore.autoExpandOnInsert) {
this.skipExpandOnSelect = true
}
const item = this.nodeMap.get(targetId)
if (!item) {
throw new Error('当前的目标节点无效!')
}
const { node: targetNode, parent: parentNode } = item
// 深度复制一份片段以消除响应式副作用,并且生成全新的 UUID
const deepCloneWithNewIds = (node: XmlNode, newParentId: string | null): XmlNode => {
const idMap = new Map<string, string>()
const clone = (n: XmlNode, parentId: string | null): XmlNode => {
const newId = crypto.randomUUID()
idMap.set(n.id, newId)
const children = n.children.map((child) => clone(child, newId))
const mixedContent = n.mixedContent.map((m) => {
if (m.type === 'element' && m.nodeId) {
return { ...m, nodeId: idMap.get(m.nodeId) || m.nodeId }
}
return { ...m }
})
return {
...n,
id: newId,
parentId,
attributes: { ...n.attributes },
mixedContent,
children
}
}
return clone(node, newParentId)
}
// 确定被插入的目标父节点
let destParentNode: XmlNode
if (mode === 'above' || mode === 'below' || mode === 'replace') {
if (!parentNode) {
throw new Error('无法操作根节点')
}
destParentNode = parentNode
} else {
destParentNode = targetNode
}
// 严格校验 DTD 规则约束
const tagName = fragment.tagName
const existingCount = destParentNode.children.filter((c) => c.tagName === tagName).length
if (!canAddChild(destParentNode.tagName, tagName, existingCount)) {
throw new Error(`DTD 校验失败: 节点 <${destParentNode.tagName}> 无法接受子元素 <${tagName}>`)
}
// 进行复制与 parentId 关联
const clonedNode = deepCloneWithNewIds(fragment, destParentNode.id)
this.saveSnapshot()
// 追加或替换到指定位置并调整选中焦点
if (mode === 'above') {
const index = destParentNode.children.findIndex((c) => c.id === targetId)
if (index !== -1) {
destParentNode.children.splice(index, 0, clonedNode)
} else {
destParentNode.children.unshift(clonedNode)
}
} else if (mode === 'below') {
const index = destParentNode.children.findIndex((c) => c.id === targetId)
if (index !== -1) {
destParentNode.children.splice(index + 1, 0, clonedNode)
} else {
destParentNode.children.push(clonedNode)
}
} else if (mode === 'replace') {
const index = destParentNode.children.findIndex((c) => c.id === targetId)
if (index !== -1) {
destParentNode.children.splice(index, 1, clonedNode)
}
} else {
// inside
destParentNode.children.push(clonedNode)
}
this.selectedNodeId = clonedNode.id
this.handleNodeInsertion(clonedNode)
this.rebuildNodeMap()
if (!appStore.autoExpandOnInsert) {
nextTick(() => {
this.skipExpandOnSelect = false
})
}
},
setXmlTree(tree: XmlNode) { setXmlTree(tree: XmlNode) {
this.xmlTree = tree this.xmlTree = tree
this.selectedNodeId = tree.id this.selectedNodeId = tree.id
......
import type { XmlNode } from '@/types/xmlNode'
import type { StashState, StashItem } from './types'
export const useStashStore = defineStore('stash', {
state: (): StashState => ({
items: []
}),
actions: {
addStash(name: string, type: 'full' | 'fragment', node: XmlNode) {
const timeStr = formatDateTime(new Date())
const newItem: StashItem = {
id: crypto.randomUUID(),
name: name.trim() || `${type === 'full' ? '完整XML' : '片段'} - ${node.tagName} (${timeStr})`,
type,
time: timeStr,
xmlNode: JSON.parse(JSON.stringify(node))
}
this.items.unshift(newItem)
return newItem
},
removeStash(id: string) {
this.items = this.items.filter((item) => item.id !== id)
},
renameStash(id: string, newName: string) {
const item = this.items.find((i) => i.id === id)
if (item && newName.trim()) {
item.name = newName.trim()
}
},
clearStash() {
this.items = []
}
},
persist: true
})
export * from './types'
import type { XmlNode } from '@/types/xmlNode'
export interface StashItem {
id: string
name: string
type: 'full' | 'fragment'
time: string
xmlNode: XmlNode
}
export interface StashState {
items: StashItem[]
}
export const FRAGMENT_OPTIONS = [
{ label: '作为当前节点子元素插入 (内部)', key: 'inside' },
{ label: '替换当前选中的节点', key: 'replace' },
{ label: '在当前节点上方插入 (兄弟)', key: 'above' },
{ label: '在当前节点下方插入 (兄弟)', key: 'below' }
]
import { useStashStore, type StashItem } from '@/store/stash'
import { useEditorStore } from '@/store/editor'
import { serializeTreeToXml, parseXmlToTreeAsync } from '@/utils/xmlParser'
import { openDownloadModal } from '@/utils/render'
export function useStashModal() {
const visible = ref(false)
const stashStore = useStashStore()
const editorStore = useEditorStore()
const newNameInput = ref('')
const searchText = ref('')
const activeItemId = ref<string | null>(null)
const showRenameModal = ref(false)
const editingItem = ref<StashItem | null>(null)
const editingItemName = ref('')
const selectedNode = computed(() => editorStore.selectedNode)
const hasXmlTree = computed(() => !!editorStore.xmlTree)
// 过滤后的列表
const filteredItems = computed(() => {
const query = searchText.value.trim().toLowerCase()
if (!query) return stashStore.items
return stashStore.items.filter(item =>
item.name.toLowerCase().includes(query) ||
item.xmlNode.tagName.toLowerCase().includes(query)
)
})
// 当前选中的项
const activeItem = computed(() => {
const found = stashStore.items.find(item => item.id === activeItemId.value)
if (found) return found
// 默认选中过滤后列表的首项
return filteredItems.value[0] || null
})
// 当前选中项的 XML 预览文本(watch activeItemId 而非 activeItem,因为 activeItem 有 fallback 永远不为 null)
const activeItemXmlText = ref('')
const activeItemSizeStr = ref('')
const isXmlTextLoading = ref(false)
let xmlTextTimer: ReturnType<typeof setTimeout> | null = null
const isCopied = ref(false)
// 动态提示默认生成的暂存别名
const defaultNamePlaceholder = computed(() => {
const timeStr = new Date().toLocaleTimeString('zh-CN', { hour12: false, hour: '2-digit', minute: '2-digit' })
if (selectedNode.value) {
return `暂存名称 (默认: 片段 - ${selectedNode.value.tagName} ${timeStr})`
}
if (editorStore.xmlTree) {
return `暂存名称 (默认: 完整XML - ${editorStore.xmlTree.tagName} ${timeStr})`
}
return '请输入暂存别名(可选)'
})
const scheduleXmlTextUpdate = () => {
if (xmlTextTimer) {
clearTimeout(xmlTextTimer)
xmlTextTimer = null
}
const item = activeItem.value
if (!item) {
activeItemXmlText.value = ''
activeItemSizeStr.value = ''
isXmlTextLoading.value = false
return
}
isXmlTextLoading.value = true
activeItemXmlText.value = ''
activeItemSizeStr.value = ''
// 延迟到下一个宏任务,让弹框/选中动画先渲染完,再执行耗时序列化
xmlTextTimer = setTimeout(() => {
try {
const xmlText = serializeTreeToXml(item.xmlNode, 0, false)
activeItemXmlText.value = xmlText
// 将序列化的树转换为单行文本,并拼装相应的 XML 头以匹配实际导出的字节数
const singleLineXml = xmlText.replace(/\r?\n\s*/g, '')
const finalXml = item.type === 'full'
? `<?xml version="1.0" encoding="utf-8"?>${singleLineXml}`
: singleLineXml
const bytes = new Blob([finalXml]).size
if (bytes === 0) {
activeItemSizeStr.value = '0 B'
} else {
const k = 1024
const sizes = ['B', 'KB', 'MB']
const i = Math.floor(Math.log(bytes) / Math.log(k))
activeItemSizeStr.value = parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i]
}
} catch (e: any) {
activeItemXmlText.value = `XML 序列化失败: ${e.message}`
activeItemSizeStr.value = ''
}
isXmlTextLoading.value = false
xmlTextTimer = null
}, 80)
}
// activeItem 的 computed 有 fallback(永远返回 filteredItems[0]),值不变时 watch 不触发
// 所以改成 watch activeItemId,任何 ID 变化都能触发预览刷新
watch(activeItemId, () => {
scheduleXmlTextUpdate()
})
const open = () => {
visible.value = true
newNameInput.value = ''
searchText.value = ''
// 先重置为 null,再在下一 tick 赋值,保证 watch 一定触发(即使 id 不变也能刷新预览)
activeItemId.value = null
nextTick(() => {
if (stashStore.items.length > 0) {
activeItemId.value = stashStore.items[0].id
}
})
}
const handleStashFull = () => {
if (!editorStore.xmlTree) {
window.$message?.warning('当前编辑器中没有加载任何 XML 文档!')
return
}
const name = newNameInput.value.trim()
const item = stashStore.addStash(name, 'full', editorStore.xmlTree)
newNameInput.value = ''
activeItemId.value = item.id // 默认激活刚生成的项
window.$message?.success(`已暂存完整 XML:${item.name}`)
}
const handleStashFragment = () => {
if (!editorStore.selectedNodeId || !editorStore.selectedNode) {
window.$message?.warning('请先在编辑器或节点树中选中一个 XML 片段节点!')
return
}
const name = newNameInput.value.trim()
const node = editorStore.selectedNode
const item = stashStore.addStash(name, 'fragment', node)
newNameInput.value = ''
activeItemId.value = item.id // 默认激活刚生成的项
window.$message?.success(`已暂存节点片段 <${node.tagName}>:${item.name}`)
}
const startRename = (item: StashItem) => {
editingItem.value = item
editingItemName.value = item.name
showRenameModal.value = true
}
const saveRenameConfirm = () => {
if (!editingItemName.value.trim()) {
window.$message?.warning('暂存名称不能为空!')
return false
}
if (editingItem.value) {
stashStore.renameStash(editingItem.value.id, editingItemName.value)
window.$message?.success('重命名成功')
}
showRenameModal.value = false
return true
}
const handleApplyFull = async (item: StashItem) => {
try {
await window.$dialog?.warning({
title: '确认恢复完整 XML',
content: `您确定要应用暂存的完整 XML "${item.name}" 吗?这将会覆盖当前编辑区的所有内容!`
})
visible.value = false
window.$loading?.show('正在恢复 XML…')
// 先序列化为字符串(同步但快),再通过 parseXmlToTreeAsync 的内置 setTimeout 异步重建树
// 这样主线程不会被阻塞,loading 动画有足够时间上屏
const xmlString = serializeTreeToXml(item.xmlNode, 0, true)
try {
const tree = await parseXmlToTreeAsync(xmlString)
editorStore.setXmlTree(tree)
window.$message?.success('已成功恢复完整 XML 文档!')
} catch (err: any) {
window.$message?.error(`恢复失败: ${err.message}`)
} finally {
window.$loading?.hide()
}
} catch (e) {
// 取消操作
}
}
const handleApplyFragment = (item: StashItem, mode: 'above' | 'below' | 'inside' | 'replace') => {
try {
editorStore.insertXmlNodeFragment(item.xmlNode, mode)
visible.value = false
window.$message?.success('已成功应用并插入 XML 片段!')
} catch (err: any) {
window.$message?.error(err.message || '应用片段失败,请检查 DTD 约束!')
}
}
const handleDelete = (item: StashItem) => {
const isCurrentActive = activeItemId.value === item.id
stashStore.removeStash(item.id)
if (isCurrentActive) {
activeItemId.value = stashStore.items[0]?.id || null
}
window.$message?.success('已删除该暂存记录')
}
const handleClearAll = async () => {
if (stashStore.items.length === 0) return
try {
await window.$dialog?.warning({
title: '确认清空暂存记录',
content: '您确定要清空所有本地暂存的历史 XML 和片段吗?此操作不可恢复。'
})
stashStore.clearStash()
activeItemId.value = null
window.$message?.success('已成功清空所有暂存记录')
} catch (e) {
// 取消操作
}
}
const handleExport = (item: StashItem) => {
try {
const singleLineXml = serializeTreeToXml(item.xmlNode, 0, false).replace(/\r?\n\s*/g, '')
const xml = `<?xml version="1.0" encoding="utf-8"?>${singleLineXml}`
const blob = new Blob([xml], { type: 'application/xml;charset=utf-8;' })
const safeName = item.name.replace(/[\/\\:*?"<>|]/g, '_')
openDownloadModal({
fileName: `${safeName}.xml`,
title: `导出暂存 XML - ${item.name}`,
localBlob: blob
})
} catch (e: any) {
window.$message?.error(`导出失败: ${e.message}`)
}
}
const handleCopyXml = (item: StashItem) => {
try {
const xml = serializeTreeToXml(item.xmlNode, 0, false)
const singleLineXml = xml.replace(/\r?\n\s*/g, '')
navigator.clipboard.writeText(singleLineXml)
window.$message?.success('XML 文本已成功复制到剪贴板!')
isCopied.value = true
setTimeout(() => {
isCopied.value = false
}, 2000)
} catch (e: any) {
window.$message?.error(`复制失败: ${e.message}`)
}
}
return {
visible,
stashStore,
newNameInput,
searchText,
activeItemId,
activeItem,
activeItemXmlText,
activeItemSizeStr,
isXmlTextLoading,
isCopied,
defaultNamePlaceholder,
filteredItems,
showRenameModal,
editingItemName,
selectedNode,
hasXmlTree,
open,
handleStashFull,
handleStashFragment,
startRename,
saveRenameConfirm,
handleApplyFull,
handleApplyFragment,
handleDelete,
handleClearAll,
handleExport,
handleCopyXml
}
}
<template>
<CommonModal v-model="visible" title="本地暂存与历史管理" :width="1100" :show-confirm="false" cancel-text="关闭">
<div class="flex h-[600px] -mx-4 -my-4 divide-x divide-divider">
<!-- 左侧:历史列表与暂存操作 -->
<div class="w-[480px] flex flex-col p-4 min-w-0">
<!-- 顶栏说明与新增暂存操作 -->
<div class="mb-4 p-4 bg-fill-2 border border-divider rounded-xl space-y-3">
<div class="flex items-center justify-between">
<span class="text-xs font-bold text-color2">新建本地暂存</span>
<span class="text-[10px] text-color3">数据保存在本地浏览器缓存中</span>
</div>
<div class="flex items-center gap-2">
<n-input
v-model:value="newNameInput"
:placeholder="defaultNamePlaceholder"
size="small"
class="font-sans text-xs flex-grow"
/>
</div>
<div class="flex items-center gap-2">
<CommonButton
type="primary"
size="small"
:disabled="!hasXmlTree"
class="flex-1"
@click="handleStashFull"
>
<template #icon>
<n-icon><ArchiveOutline /></n-icon>
</template>
暂存整个 XML
</CommonButton>
<CommonButton
type="warning"
size="small"
:disabled="!selectedNode"
class="flex-1"
@click="handleStashFragment"
>
<template #icon>
<n-icon><CodeWorkingOutline /></n-icon>
</template>
暂存选中片段
</CommonButton>
</div>
</div>
<!-- 搜索与列表头部 -->
<div class="flex items-center justify-between mb-2 px-1">
<div class="flex items-center gap-2 flex-1 max-w-[280px]">
<n-input
v-model:value="searchText"
placeholder="搜索暂存记录..."
size="small"
class="text-xs"
>
<template #prefix>
<n-icon class="opacity-40"><SearchOutline /></n-icon>
</template>
</n-input>
</div>
<CommonButton
v-if="stashStore.items.length > 0"
size="small"
type="error"
secondary
@click="handleClearAll"
>
<template #icon>
<n-icon><TrashOutline /></n-icon>
</template>
清空所有
</CommonButton>
</div>
<!-- 历史列表 -->
<div class="flex-grow overflow-y-auto border border-divider rounded-xl bg-card custom-scrollbar">
<template v-if="filteredItems.length === 0">
<div class="h-full flex flex-col items-center justify-center text-center p-6 text-color3">
<n-icon size="36" class="opacity-30 mb-2"><ArchiveOutline /></n-icon>
<div class="text-xs select-none">
{{ stashStore.items.length === 0 ? '当前无本地暂存记录' : '无符合条件的暂存记录' }}
</div>
</div>
</template>
<template v-else>
<div class="divide-y divide-divider/50">
<div
v-for="item in filteredItems"
:key="item.id"
class="p-3 cursor-pointer hover:bg-fill-2/50 transition-all flex flex-col gap-2 relative group"
:class="activeItem?.id === item.id ? 'bg-fill-3 border-l-2 border-primary pl-2.5' : 'border-l-2 border-transparent pl-3'"
@click="activeItemId = item.id"
>
<!-- 标题行 -->
<div class="flex items-start justify-between gap-2">
<div class="flex items-center gap-2 min-w-0 flex-1">
<span class="text-xs font-semibold text-color1 truncate select-text" :title="item.name">
{{ item.name }}
</span>
</div>
<div class="flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0">
<CommonButton size="tiny" quaternary circle @click.stop="startRename(item)" title="重命名">
<n-icon><CreateOutline /></n-icon>
</CommonButton>
<CommonButton size="tiny" quaternary circle type="error" @click.stop="handleDelete(item)" title="删除暂存">
<n-icon><TrashOutline /></n-icon>
</CommonButton>
</div>
</div>
<!-- Meta 行 -->
<div class="flex items-center justify-between text-[10px] text-color3 select-none">
<div class="flex items-center gap-1.5 flex-wrap">
<n-tag size="tiny" :type="item.type === 'full' ? 'info' : 'warning'" :bordered="false" round>
{{ item.type === 'full' ? '完整XML' : '片段' }}
</n-tag>
<span class="font-mono bg-fill-2 px-1.5 py-0.5 rounded text-color2">
&lt;{{ item.xmlNode.tagName }}&gt;
</span>
</div>
<span class="font-mono">{{ item.time }}</span>
</div>
</div>
</div>
</template>
</div>
</div>
<!-- 右侧:详情与预览、应用操作 -->
<div class="flex-1 flex flex-col p-4 min-w-0 bg-fill-1">
<div v-if="activeItem" class="flex-1 flex flex-col min-h-0">
<!-- 顶栏:元信息 -->
<div class="mb-3 flex items-center justify-between">
<div class="flex-1 min-w-0 mr-4">
<div class="text-xs font-bold text-color1 truncate" :title="activeItem.name">{{ activeItem.name }}</div>
<div class="text-[10px] text-color3 mt-0.5 flex items-center gap-2">
<span>记录时间:{{ activeItem.time }}</span>
<span v-if="activeItemSizeStr" class="opacity-50">|</span>
<span v-if="activeItemSizeStr" class="text-color2">大小:{{ activeItemSizeStr }}</span>
</div>
</div>
<div class="flex items-center gap-2">
<CommonButton v-if="activeItem.type === 'full'" size="small" type="warning" secondary @click="handleExport(activeItem)">
<template #icon>
<n-icon><DownloadOutline /></n-icon>
</template>
下载 XML
</CommonButton>
<CommonButton
size="small"
:type="isCopied ? 'success' : 'primary'"
secondary
@click="handleCopyXml(activeItem)"
>
<template #icon>
<n-icon>
<CheckmarkOutline v-if="isCopied" />
<CopyOutline v-else />
</n-icon>
</template>
{{ isCopied ? '已复制!' : '复制 XML 文本' }}
</CommonButton>
</div>
</div>
<!-- 代码预览区 -->
<div class="flex-1 overflow-auto border border-divider rounded-lg bg-card p-3 relative font-mono text-[11px] leading-5 select-text custom-scrollbar">
<div v-if="isXmlTextLoading" class="flex flex-col gap-2 animate-pulse py-1">
<div class="h-3 bg-fill-3 rounded w-4/5"></div>
<div class="h-3 bg-fill-3 rounded w-full"></div>
<div class="h-3 bg-fill-3 rounded w-3/4"></div>
<div class="h-3 bg-fill-3 rounded w-5/6"></div>
<div class="h-3 bg-fill-3 rounded w-2/3"></div>
</div>
<pre v-else class="m-0 text-color2 whitespace-pre-wrap break-all">{{ activeItemXmlText }}</pre>
</div>
<!-- 操作面板 -->
<div class="mt-4 p-4 border border-divider rounded-xl bg-card space-y-3">
<div class="text-xs font-bold text-color2">应用操作</div>
<!-- 针对完整 XML 的恢复 -->
<div v-if="activeItem.type === 'full'" class="flex flex-col space-y-2">
<CommonButton type="primary" class="w-full" @click="handleApplyFull(activeItem)">
<template #icon>
<n-icon><SyncOutline /></n-icon>
</template>
恢复此 XML 文档并覆盖当前编辑器
</CommonButton>
<div class="text-[10px] text-color3 text-center">注意:这会覆盖编辑器中已打开的所有节点内容。</div>
</div>
<!-- 针对片段的导入 -->
<div v-else class="grid grid-cols-2 gap-3">
<CommonButton type="warning" secondary @click="handleApplyFragment(activeItem, 'inside')">
作为子元素插入内部
</CommonButton>
<CommonButton type="warning" secondary @click="handleApplyFragment(activeItem, 'replace')">
替换当前选中节点
</CommonButton>
<CommonButton type="default" secondary @click="handleApplyFragment(activeItem, 'above')">
在当前节点上方插入
</CommonButton>
<CommonButton type="default" secondary @click="handleApplyFragment(activeItem, 'below')">
在当前节点下方插入
</CommonButton>
</div>
</div>
</div>
<div v-else class="flex-1 flex flex-col items-center justify-center text-center p-6 text-color3">
<n-icon size="40" class="opacity-20 mb-3"><EyeOutline /></n-icon>
<div class="text-xs select-none">请在左侧选择一条暂存记录查看详情与进行操作</div>
</div>
</div>
</div>
<!-- 重命名确认对话框 -->
<CommonModal
v-model="showRenameModal"
title="重命名暂存记录"
:width="400"
@confirm="saveRenameConfirm"
>
<div class="pt-3">
<n-input v-model:value="editingItemName" placeholder="请输入暂存别名" />
</div>
</CommonModal>
</CommonModal>
</template>
<script setup lang="ts">
import { useStashModal } from './functionals'
import {
ArchiveOutline,
DocumentTextOutline,
CodeWorkingOutline,
TrashOutline,
CreateOutline,
SearchOutline,
SyncOutline,
EyeOutline,
DownloadOutline,
CopyOutline,
CheckmarkOutline
} from '@vicons/ionicons5'
const {
visible,
stashStore,
newNameInput,
searchText,
activeItemId,
activeItem,
activeItemXmlText,
activeItemSizeStr,
isXmlTextLoading,
isCopied,
defaultNamePlaceholder,
filteredItems,
showRenameModal,
editingItemName,
selectedNode,
hasXmlTree,
open,
handleStashFull,
handleStashFragment,
startRename,
saveRenameConfirm,
handleApplyFull,
handleApplyFragment,
handleDelete,
handleClearAll,
handleExport,
handleCopyXml
} = useStashModal()
defineExpose({
open
})
</script>
<style scoped>
.custom-scrollbar::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
background: var(--n-scrollbar-color, rgba(0, 0, 0, 0.15));
border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
background: var(--n-scrollbar-color-hover, rgba(0, 0, 0, 0.3));
}
</style>
...@@ -304,6 +304,14 @@ ...@@ -304,6 +304,14 @@
<n-icon class="text-base"><git-compare-outline /></n-icon> <n-icon class="text-base"><git-compare-outline /></n-icon>
<span class="text-xs font-medium">对比工卡</span> <span class="text-xs font-medium">对比工卡</span>
</button> </button>
<button
type="button"
class="toolbar-btn flex items-center gap-1.5 px-2.5 h-7 rounded text-color2 hover:bg-fill-2 active:bg-fill-3 transition-colors select-none focus:outline-none flex-shrink-0"
@click="stashModalRef?.open()"
>
<n-icon class="text-base"><archive-outline /></n-icon>
<span class="text-xs font-medium">本地暂存</span>
</button>
</div> </div>
<div class="w-px h-5 flex-shrink-0 mx-3" style="background: #d0d0d0"></div> <div class="w-px h-5 flex-shrink-0 mx-3" style="background: #d0d0d0"></div>
...@@ -452,6 +460,9 @@ ...@@ -452,6 +460,9 @@
<!-- 插入模板弹窗 --> <!-- 插入模板弹窗 -->
<TemplateSelectModal ref="templateSelectModalRef" /> <TemplateSelectModal ref="templateSelectModalRef" />
<!-- 本地暂存历史弹窗 -->
<StashModal ref="stashModalRef" />
</div> </div>
</template> </template>
...@@ -471,7 +482,8 @@ import { ...@@ -471,7 +482,8 @@ import {
SyncOutline, SyncOutline,
CheckmarkCircleOutline, CheckmarkCircleOutline,
SettingsOutline, SettingsOutline,
GitCompareOutline GitCompareOutline,
ArchiveOutline
} from '@vicons/ionicons5' } from '@vicons/ionicons5'
import { useEditorToolbar } from './functionals' import { useEditorToolbar } from './functionals'
import { GREEN_BUTTONS } from './constants' import { GREEN_BUTTONS } from './constants'
...@@ -486,6 +498,7 @@ import ExtractTranslateModal from './components/ExtractTranslateModal/index.vue' ...@@ -486,6 +498,7 @@ import ExtractTranslateModal from './components/ExtractTranslateModal/index.vue'
import SearchTranslateModal from './components/SearchTranslateModal/index.vue' import SearchTranslateModal from './components/SearchTranslateModal/index.vue'
import CompareModal from './components/CompareModal/index.vue' import CompareModal from './components/CompareModal/index.vue'
import TemplateSelectModal from './components/TemplateSelectModal/index.vue' import TemplateSelectModal from './components/TemplateSelectModal/index.vue'
import StashModal from './components/StashModal/index.vue'
const emit = defineEmits(['save', 'validate', 'export', 'preview', 'download-html']) const emit = defineEmits(['save', 'validate', 'export', 'preview', 'download-html'])
...@@ -519,6 +532,7 @@ const { ...@@ -519,6 +532,7 @@ const {
const insertFragmentModalRef = ref<any>(null) const insertFragmentModalRef = ref<any>(null)
const compareModalRef = ref<any>(null) const compareModalRef = ref<any>(null)
const stashModalRef = ref<any>(null)
</script> </script>
<style scoped> <style scoped>
......
import { useStashStore } from '@/store/stash'
import type { XmlNode } from '@/types/xmlNode'
import {
stashModalVisible,
stashNodeName,
stashDefaultName,
stashTargetNode
} from '../../../functionals'
export const useStashNodeModal = () => {
const handleConfirm = () => {
if (!stashTargetNode.value) return
const stashStore = useStashStore()
const stashName = stashNodeName.value.trim() || stashDefaultName.value
stashStore.addStash(stashName, 'fragment', stashTargetNode.value)
window.$message?.success(`已本地暂存片段:${stashTargetNode.value.tagName === '#text' ? '文本节点' : stashTargetNode.value.tagName}`)
stashModalVisible.value = false
}
const open = (defaultName: string, node: XmlNode) => {
stashDefaultName.value = defaultName
stashNodeName.value = ''
stashTargetNode.value = node
stashModalVisible.value = true
}
return {
stashModalVisible,
stashNodeName,
stashDefaultName,
handleConfirm,
open
}
}
<template>
<CommonModal
v-model="stashModalVisible"
title="新建本地暂存"
:width="400"
@confirm="handleConfirm"
>
<div class="pt-3">
<n-input v-model:value="stashNodeName" :placeholder="stashDefaultName" autofocus />
</div>
</CommonModal>
</template>
<script setup lang="ts">
import { useStashNodeModal } from './functionals'
const { stashModalVisible, stashNodeName, stashDefaultName, handleConfirm, open } = useStashNodeModal()
defineExpose({ open })
</script>
...@@ -13,10 +13,12 @@ import { ...@@ -13,10 +13,12 @@ import {
FolderOpenOutline, FolderOpenOutline,
DocumentTextOutline, DocumentTextOutline,
CodeWorkingOutline, CodeWorkingOutline,
LanguageOutline LanguageOutline,
ArchiveOutline
} from '@vicons/ionicons5' } from '@vicons/ionicons5'
import { useEditorStore } from '@/store/editor' import { useEditorStore } from '@/store/editor'
import { useAppStore } from '@/store/app' import { useAppStore } from '@/store/app'
import { useStashStore } from '@/store/stash'
import type { XmlNode } from '@/types/xmlNode' import type { XmlNode } from '@/types/xmlNode'
import type { CheckRuleData, InsertMode, FlatNode, TranslationResponse } from '../constants' import type { CheckRuleData, InsertMode, FlatNode, TranslationResponse } from '../constants'
import { DOCUMENT_LIKE_TAGS } from '../constants' import { DOCUMENT_LIKE_TAGS } from '../constants'
...@@ -56,6 +58,15 @@ export const addNodeModalRef = ref<any>(null) ...@@ -56,6 +58,15 @@ export const addNodeModalRef = ref<any>(null)
export const copyNodeCache = ref<XmlNode | null>(null) export const copyNodeCache = ref<XmlNode | null>(null)
// ══════════════════════════════════════════════════════════ // ══════════════════════════════════════════════════════════
// 全局共享状态:本地暂存弹窗
// ══════════════════════════════════════════════════════════
export const stashModalVisible = ref(false)
export const stashNodeName = ref('')
export const stashDefaultName = ref('')
export const stashTargetNode = ref<XmlNode | null>(null)
export const stashNodeModalRef = ref<any>(null)
// ══════════════════════════════════════════════════════════
// 全局共享状态:智能翻译中的节点 ID // 全局共享状态:智能翻译中的节点 ID
// ══════════════════════════════════════════════════════════ // ══════════════════════════════════════════════════════════
export const translatingNodeId = ref<string | null>(null) export const translatingNodeId = ref<string | null>(null)
...@@ -779,6 +790,13 @@ export function useNodeTree( ...@@ -779,6 +790,13 @@ export function useNodeTree(
icon: icon(CopyOutline) icon: icon(CopyOutline)
}) })
// 本地暂存
options.push({
label: '本地暂存',
key: 'localStash',
icon: icon(ArchiveOutline)
})
// 粘贴节点(有缓存时显示) // 粘贴节点(有缓存时显示)
if (copyNodeCache.value) { if (copyNodeCache.value) {
const pasteChildren: DropdownOption[] = isVirtual const pasteChildren: DropdownOption[] = isVirtual
...@@ -984,6 +1002,14 @@ export function useNodeTree( ...@@ -984,6 +1002,14 @@ export function useNodeTree(
break break
} }
// ── 本地暂存 ──
case 'localStash': {
const timeStr = formatDateTime(new Date())
const defaultName = isVirtual ? `片段 - 文本节点 (${timeStr})` : `片段 - ${node.tagName} (${timeStr})`
stashNodeModalRef.value?.open(defaultName, node)
break
}
// ── 粘贴到上方 ── // ── 粘贴到上方 ──
case 'pasteAbove': { case 'pasteAbove': {
if (!copyNodeCache.value || !parent) break if (!copyNodeCache.value || !parent) break
......
...@@ -193,6 +193,9 @@ ...@@ -193,6 +193,9 @@
<!-- 批量删除确认弹窗 --> <!-- 批量删除确认弹窗 -->
<BatchDeleteConfirmModal ref="batchDeleteConfirmModalRef" @confirm="clearBatchSelection" /> <BatchDeleteConfirmModal ref="batchDeleteConfirmModalRef" @confirm="clearBatchSelection" />
<!-- 本地暂存弹窗 -->
<StashNodeModal :ref="(el) => (stashNodeModalRef = el)" />
<!-- 回到顶部悬浮球 --> <!-- 回到顶部悬浮球 -->
<Transition name="fade"> <Transition name="fade">
<div <div
...@@ -217,13 +220,16 @@ import { ...@@ -217,13 +220,16 @@ import {
translatingNodeId, translatingNodeId,
checkRuleModalRef, checkRuleModalRef,
viewXmlModalRef, viewXmlModalRef,
addNodeModalRef addNodeModalRef,
stashModalVisible,
stashNodeModalRef
} from './functionals' } from './functionals'
import CheckRuleModal from './components/CheckRuleModal/index.vue' import CheckRuleModal from './components/CheckRuleModal/index.vue'
import AddNodeModal from './components/AddNodeModal/index.vue' import AddNodeModal from './components/AddNodeModal/index.vue'
import ViewXmlModal from './components/ViewXmlModal/index.vue' import ViewXmlModal from './components/ViewXmlModal/index.vue'
import InsertFragmentModal from '../EditorToolbar/components/InsertFragmentModal/index.vue' import InsertFragmentModal from '../EditorToolbar/components/InsertFragmentModal/index.vue'
import BatchDeleteConfirmModal from './components/BatchDeleteConfirmModal/index.vue' import BatchDeleteConfirmModal from './components/BatchDeleteConfirmModal/index.vue'
import StashNodeModal from './components/StashNodeModal/index.vue'
const props = defineProps<{ const props = defineProps<{
expandedKeys: string[] expandedKeys: string[]
...@@ -235,7 +241,7 @@ const editorStore = useEditorStore() ...@@ -235,7 +241,7 @@ const editorStore = useEditorStore()
const insertFragmentModalRef = ref<any>(null) const insertFragmentModalRef = ref<any>(null)
const isAnyModalVisible = computed(() => { const isAnyModalVisible = computed(() => {
return checkRuleVisible.value || viewXmlVisible.value || addNodeVisible.value || !!insertFragmentModalRef.value?.visible return checkRuleVisible.value || viewXmlVisible.value || addNodeVisible.value || stashModalVisible.value || !!insertFragmentModalRef.value?.visible
}) })
const { const {
......
...@@ -62,7 +62,7 @@ export function useEditor() { ...@@ -62,7 +62,7 @@ export function useEditor() {
const exportXml = (): void => { const exportXml = (): void => {
if (!store.xmlTree) return if (!store.xmlTree) return
try { try {
const xml = serializeTreeToXml(store.xmlTree, 0, true) const xml = '<?xml version="1.0" encoding="utf-8"?>\n' + serializeTreeToXml(store.xmlTree, 0, true)
const blob = new Blob([xml], { type: 'application/xml;charset=utf-8;' }) const blob = new Blob([xml], { type: 'application/xml;charset=utf-8;' })
openDownloadModal({ openDownloadModal({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment