diff --git a/.gitignore b/.gitignore index 4262603d..a7b425f1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ node_modules /plugins /src/hidden /cache +/public/temp ./plugins.json diff --git a/README.md b/README.md index d5326bd7..5c58dc93 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ DocHub - инструмент описания архитектуры через * [Создание архитектурных фасадов (портал документации)](#facade); * [Анализ архитектуры](#analysis); * [Контроль консистентности](#problems); -* [Расширяемая матамодель](#extmetamodel). +* [Расширяемая метамодель](#extmetamodel). ## Быстрый старт @@ -118,7 +118,7 @@ DocHub умеет находить проблемы в описании архи ![Валидатор](pics/validators.png) -## Расширяемая матамодель +## Расширяемая метамодель Метамодель DocHub может быть расширена по вашему желанию. Есть возможность как модифицировать уже существующие сущности, так и создавать собственные. diff --git a/distrib/idea/IDEAPlugin-3.14.0.zip b/distrib/idea/IDEAPlugin-4.0.0.zip similarity index 88% rename from distrib/idea/IDEAPlugin-3.14.0.zip rename to distrib/idea/IDEAPlugin-4.0.0.zip index a3c0fa6c..fab53c58 100644 Binary files a/distrib/idea/IDEAPlugin-3.14.0.zip and b/distrib/idea/IDEAPlugin-4.0.0.zip differ diff --git a/example.env b/example.env index 9eca02f6..a6bf148d 100644 --- a/example.env +++ b/example.env @@ -153,7 +153,9 @@ # По умолчанию кластер выключен (off). # VUE_APP_DOCHUB_CLUSTER= on / off - +# (FB) Включение поддержки HTML тэгов в markdown документах +# По умолчанию поддержка выключена (off). +# VUE_APP_DOCHUB_MARKDOWN_HTML= on / off # *********************************************************** # Примеры конфигурирования diff --git a/plugins.json b/plugins.json index e416b939..ecfb05ca 100644 --- a/plugins.json +++ b/plugins.json @@ -4,6 +4,8 @@ "plugins/markaper", "plugins/charts", "plugins/devtool", - "plugins/svg" + "plugins/svg", + "plugins/bpmnjs", + "plugins/drawio" ] } diff --git a/plugins/bpmnjs/components/bpmnjs/BaseMixin.js b/plugins/bpmnjs/components/bpmnjs/BaseMixin.js new file mode 100644 index 00000000..a18ddc82 --- /dev/null +++ b/plugins/bpmnjs/components/bpmnjs/BaseMixin.js @@ -0,0 +1,53 @@ + +export default { + props: { + // Требуем обязательно передавать профайл документа + profile: { + type: Object, + required: true + }, + // Требуем обязательно передавать функцию получения контента + getContent: { + type: Function, + required: true + }, + // Получаем функцию сохранения контента если есть + putContent: { + type: Function, + default: null, + required: false + }, + // Содержимое документа + value: String + }, + methods: { + // Методы для реализации в компонентах + // init() { }, + // applyContent(content) { }, + + // Регистрация ошибки + registerError(error) { + this.errors.push(error); + }, + // Регистрация предупреждений + registerWarning(warning) { + this.warnings.push(warning); + } + }, + watch: { + value(value) { + this.applyContent(value); + } + }, + mounted() { + this.init(); + this.applyContent(this.value); + }, + data() { + return { + errors: [], + warnings: [], + data: null + }; + } +}; diff --git a/plugins/bpmnjs/components/bpmnjs/Modeler.vue b/plugins/bpmnjs/components/bpmnjs/Modeler.vue new file mode 100644 index 00000000..7bc8e0c9 --- /dev/null +++ b/plugins/bpmnjs/components/bpmnjs/Modeler.vue @@ -0,0 +1,143 @@ + + + + + diff --git a/plugins/bpmnjs/components/bpmnjs/Viewer.vue b/plugins/bpmnjs/components/bpmnjs/Viewer.vue new file mode 100644 index 00000000..fb45f6dd --- /dev/null +++ b/plugins/bpmnjs/components/bpmnjs/Viewer.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/plugins/bpmnjs/components/bpmnjs/index.vue b/plugins/bpmnjs/components/bpmnjs/index.vue new file mode 100644 index 00000000..3940cbf4 --- /dev/null +++ b/plugins/bpmnjs/components/bpmnjs/index.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/plugins/bpmnjs/index.js b/plugins/bpmnjs/index.js new file mode 100644 index 00000000..9921ee1d --- /dev/null +++ b/plugins/bpmnjs/index.js @@ -0,0 +1,7 @@ +import 'bpmn-js/dist/assets/diagram-js.css'; +import 'bpmn-js/dist/assets/bpmn-js.css'; +import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css'; + +import bpmnjs from './components/bpmnjs/index.vue'; + +DocHub.documents.register('bpmnjs', bpmnjs); diff --git a/plugins/bpmnjs/package-lock.json b/plugins/bpmnjs/package-lock.json new file mode 100644 index 00000000..0e5cb05e --- /dev/null +++ b/plugins/bpmnjs/package-lock.json @@ -0,0 +1,205 @@ +{ + "name": "bpmnjs", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "bpmnjs", + "version": "1.0.0", + "license": "Apache-2.0", + "dependencies": { + "bpmn-js": "^17.6.4", + "vue-bpmn": "^0.3.0" + } + }, + "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==", + "dependencies": { + "htm": "^3.1.1", + "preact": "^10.11.2" + } + }, + "node_modules/bpmn-js": { + "version": "17.6.4", + "resolved": "https://registry.npmjs.org/bpmn-js/-/bpmn-js-17.6.4.tgz", + "integrity": "sha512-5Z3vL1UOKGvKRid6yCw/k78cKvI9giml+Gx6fmBY6LbVGWl7vvOqmdrCL1/nOZEqJiupqyKW6gCi6OESzW60Jg==", + "dependencies": { + "bpmn-moddle": "^8.1.0", + "diagram-js": "^14.5.4", + "diagram-js-direct-editing": "^3.0.1", + "ids": "^1.0.5", + "inherits-browser": "^0.1.0", + "min-dash": "^4.1.1", + "min-dom": "^4.0.3", + "tiny-svg": "^3.0.0" + }, + "engines": { + "node": "*" + } + }, + "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==", + "dependencies": { + "min-dash": "^4.0.0", + "moddle": "^6.2.3", + "moddle-xml": "^10.1.0" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "engines": { + "node": ">=6" + } + }, + "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": { + "version": "14.5.4", + "resolved": "https://registry.npmjs.org/diagram-js/-/diagram-js-14.5.4.tgz", + "integrity": "sha512-ZkF+X+YGU4ayW1N7F2LBNn30gF02QZl6+X7ujCnd9jBNjPB1NDajjU5/jMr/fqPlcQ1GYoj43g4h5rJ7mIRAwg==", + "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.1.0", + "object-refs": "^0.4.0", + "path-intersection": "^3.0.0", + "tiny-svg": "^3.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/diagram-js-direct-editing": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/diagram-js-direct-editing/-/diagram-js-direct-editing-3.0.1.tgz", + "integrity": "sha512-V44JO55nwFbsRv6tTmrfdz6fIsE3A4YIIqInaeJZyD2EongZzEo4acH9TqsE4hi9R/kAqsyttMKxTAgHplFn8w==", + "dependencies": { + "min-dash": "^4.0.0", + "min-dom": "^4.0.2" + }, + "engines": { + "node": "*" + }, + "peerDependencies": { + "diagram-js": "*" + } + }, + "node_modules/didi": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/didi/-/didi-10.2.2.tgz", + "integrity": "sha512-l8NYkYFXV1izHI65EyT8EXOjUZtKmQkHLTT89cSP7HU5J/G7AOj0dXKtLc04EXYlga99PBY18IPjOeZ+c3DI4w==", + "engines": { + "node": ">= 16" + } + }, + "node_modules/domify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/domify/-/domify-1.4.2.tgz", + "integrity": "sha512-m4yreHcUWHBncGVV7U+yQzc12vIlq0jMrtHZ5mW6dQMiL/7skSYNVX9wqKwOtyO9SGCgevrAFEgOCAHmamHTUA==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/htm": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/htm/-/htm-3.1.1.tgz", + "integrity": "sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ==" + }, + "node_modules/ids": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/ids/-/ids-1.0.5.tgz", + "integrity": "sha512-XQ0yom/4KWTL29sLG+tyuycy7UmeaM/79GRtSJq6IG9cJGIPeBz5kwDCguie3TwxaMNIc3WtPi0cTa1XYHicpw==" + }, + "node_modules/inherits-browser": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/inherits-browser/-/inherits-browser-0.1.0.tgz", + "integrity": "sha512-CJHHvW3jQ6q7lzsXPpapLdMx5hDpSF3FSh45pwsj6bKxJJ8Nl8v43i5yXnr3BdfOimGHKyniewQtnAIp3vyJJw==" + }, + "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/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/moddle": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/moddle/-/moddle-6.2.3.tgz", + "integrity": "sha512-bLVN+ZHL3aKnhxc19XtjUfvdJsS3EsiEJC7bT6YPD11qYmTzvsxrGgyYz1Ouof7TZuGw0lDJ1OLmEnxcpQWk3Q==", + "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==", + "dependencies": { + "min-dash": "^4.0.0", + "moddle": "^6.0.0", + "saxen": "^8.1.2" + } + }, + "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==", + "engines": { + "node": "*" + } + }, + "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==", + "engines": { + "node": ">= 14.20" + } + }, + "node_modules/preact": { + "version": "10.21.0", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.21.0.tgz", + "integrity": "sha512-aQAIxtzWEwH8ou+OovWVSVNlFImL7xUCwJX3YMqA3U8iKCNC34999fFOnWjYNsylgfPgMexpbk7WYOLtKr/mxg==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/saxen": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/saxen/-/saxen-8.1.2.tgz", + "integrity": "sha512-xUOiiFbc3Ow7p8KMxwsGICPx46ZQvy3+qfNVhrkwfz3Vvq45eGt98Ft5IQaA1R/7Tb5B5MKh9fUR9x3c3nDTxw==" + }, + "node_modules/tiny-svg": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tiny-svg/-/tiny-svg-3.0.1.tgz", + "integrity": "sha512-P8T4iwiW1t95vpHVHqrD36Brn7TqFYCPSHIWk9WLJtYK1X4aDd+5cgqcAADIWSjf1/i5idKnpCh9mim8hEdRBg==" + }, + "node_modules/vue-bpmn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/vue-bpmn/-/vue-bpmn-0.3.0.tgz", + "integrity": "sha512-gp43Qx34HzOIbhzxFL3gXmkc28NDQE79boPcqMHbQ6y351Jys7tPk+mdsKATIN5IAM2UfraIQxhylvb4/vubgA==" + } + } +} diff --git a/plugins/bpmnjs/package.json b/plugins/bpmnjs/package.json new file mode 100644 index 00000000..776a14df --- /dev/null +++ b/plugins/bpmnjs/package.json @@ -0,0 +1,17 @@ +{ + "name": "bpmnjs", + "version": "1.0.0", + "description": "Редактор BPMN диаграмм", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [ + "bpmnjs" + ], + "author": "R.Piontik", + "license": "Apache-2.0", + "dependencies": { + "bpmn-js": "^17.6.4" + } +} diff --git a/plugins/bpmnjs/resource/empty.bpmn b/plugins/bpmnjs/resource/empty.bpmn new file mode 100644 index 00000000..75d18794 --- /dev/null +++ b/plugins/bpmnjs/resource/empty.bpmn @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/plugins/drawio/components/DrawIODocument.vue b/plugins/drawio/components/DrawIODocument.vue new file mode 100644 index 00000000..e562d3f2 --- /dev/null +++ b/plugins/drawio/components/DrawIODocument.vue @@ -0,0 +1,369 @@ +