From 0d8daf2feadbdaa954231051de2fa3c31550bf78 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Wed, 19 Jan 2022 16:04:30 +0700 Subject: [PATCH] Basic mentions support (#832) Signed-off-by: Andrey Sobolev --- common/config/rush/pnpm-lock.yaml | 482 ++++++------------ dev/prod/package.json | 4 - dev/prod/src/platform-dev.ts | 4 - dev/server-chunter-resources/.eslintrc.js | 7 - dev/server-chunter-resources/.npmignore | 4 - dev/server-chunter-resources/CHANGELOG.json | 17 - dev/server-chunter-resources/CHANGELOG.md | 9 - dev/server-chunter-resources/config/rig.json | 18 - dev/server-chunter-resources/package.json | 35 -- dev/server-chunter-resources/src/index.ts | 89 ---- dev/server-chunter-resources/tsconfig.json | 8 - dev/server/package.json | 2 - dev/server/src/server.ts | 11 +- dev/tool/package.json | 4 - dev/tool/src/elastic.ts | 8 +- models/all/package.json | 2 - models/all/src/index.ts | 4 - models/chunter/src/index.ts | 47 +- models/chunter/src/plugin.ts | 26 +- models/core/src/core.ts | 2 +- models/server-chunter/.eslintrc.js | 7 - models/server-chunter/.npmignore | 4 - models/server-chunter/CHANGELOG.json | 17 - models/server-chunter/CHANGELOG.md | 9 - models/server-chunter/config/rig.json | 18 - models/server-chunter/package.json | 34 -- models/server-chunter/src/index.ts | 30 -- models/server-chunter/tsconfig.json | 8 - models/server-recruit/.eslintrc.js | 7 - models/server-recruit/.npmignore | 4 - models/server-recruit/config/rig.json | 18 - models/server-recruit/package.json | 34 -- models/server-recruit/src/index.ts | 27 - models/server-recruit/tsconfig.json | 8 - models/task/src/migration.ts | 3 + models/view/src/index.ts | 8 +- packages/core/src/operations.ts | 4 +- .../src/components/message/Nodes.svelte | 7 +- packages/text-editor/package.json | 7 +- packages/text-editor/src/Completion.ts | 185 +++++++ .../src/components/MentionList.svelte | 184 ++++--- .../src/components/SvelteRenderer.ts | 27 +- .../src/components/TextEditor.svelte | 43 +- plugins/activity-resources/package.json | 3 +- .../src/components/Activity.svelte | 14 +- .../src/components/TxView.svelte | 8 +- .../src/components/utils.ts | 4 +- plugins/activity/src/index.ts | 4 + plugins/chunter-assets/lang/en.json | 3 +- plugins/chunter-resources/package.json | 3 +- plugins/chunter-resources/src/backlinks.ts | 109 ++++ .../src/components/ChannelPresenter.svelte | 46 ++ .../src/components/ChannelView.svelte | 8 +- .../src/components/CommentInput.svelte | 36 ++ .../src/components/CommentPopup.svelte | 10 +- .../activity/TxBacklinkCreate.svelte | 20 +- .../activity/TxBacklinkReference.svelte | 55 ++ .../activity/TxCommentCreate.svelte | 20 +- plugins/chunter-resources/src/index.ts | 30 +- plugins/chunter-resources/src/plugin.ts | 26 +- plugins/chunter/src/index.ts | 9 + .../src/components/ObjectPresenter.svelte | 52 ++ plugins/view-resources/src/index.ts | 10 +- plugins/view-resources/src/utils.ts | 31 +- plugins/view/src/index.ts | 17 +- rush.json | 37 +- server/chunter-resources/.eslintrc.js | 7 - server/chunter-resources/.npmignore | 4 - server/chunter-resources/CHANGELOG.json | 17 - server/chunter-resources/CHANGELOG.md | 9 - server/chunter-resources/config/rig.json | 18 - server/chunter-resources/package.json | 36 -- server/chunter-resources/src/index.ts | 92 ---- server/chunter-resources/tsconfig.json | 8 - server/chunter/.eslintrc.js | 7 - server/chunter/.npmignore | 4 - server/chunter/CHANGELOG.json | 29 -- server/chunter/CHANGELOG.md | 16 - server/chunter/config/rig.json | 18 - server/chunter/package.json | 34 -- server/chunter/src/index.ts | 34 -- server/chunter/tsconfig.json | 9 - server/recruit-resources/.eslintrc.js | 7 - server/recruit-resources/.npmignore | 4 - server/recruit-resources/config/rig.json | 18 - server/recruit-resources/package.json | 34 -- server/recruit-resources/src/index.ts | 44 -- server/recruit-resources/tsconfig.json | 8 - server/recruit/.eslintrc.js | 7 - server/recruit/.npmignore | 4 - server/recruit/config/rig.json | 18 - server/recruit/package.json | 34 -- server/recruit/src/index.ts | 33 -- server/recruit/tsconfig.json | 9 - server/server/package.json | 4 - server/server/src/server.ts | 13 +- 96 files changed, 1006 insertions(+), 1604 deletions(-) delete mode 100644 dev/server-chunter-resources/.eslintrc.js delete mode 100644 dev/server-chunter-resources/.npmignore delete mode 100644 dev/server-chunter-resources/CHANGELOG.json delete mode 100644 dev/server-chunter-resources/CHANGELOG.md delete mode 100644 dev/server-chunter-resources/config/rig.json delete mode 100644 dev/server-chunter-resources/package.json delete mode 100644 dev/server-chunter-resources/src/index.ts delete mode 100644 dev/server-chunter-resources/tsconfig.json delete mode 100644 models/server-chunter/.eslintrc.js delete mode 100644 models/server-chunter/.npmignore delete mode 100644 models/server-chunter/CHANGELOG.json delete mode 100644 models/server-chunter/CHANGELOG.md delete mode 100644 models/server-chunter/config/rig.json delete mode 100644 models/server-chunter/package.json delete mode 100644 models/server-chunter/src/index.ts delete mode 100644 models/server-chunter/tsconfig.json delete mode 100644 models/server-recruit/.eslintrc.js delete mode 100644 models/server-recruit/.npmignore delete mode 100644 models/server-recruit/config/rig.json delete mode 100644 models/server-recruit/package.json delete mode 100644 models/server-recruit/src/index.ts delete mode 100644 models/server-recruit/tsconfig.json create mode 100644 packages/text-editor/src/Completion.ts create mode 100644 plugins/chunter-resources/src/backlinks.ts create mode 100644 plugins/chunter-resources/src/components/ChannelPresenter.svelte create mode 100644 plugins/chunter-resources/src/components/CommentInput.svelte rename packages/presentation/src/components/message/Person.svelte => plugins/chunter-resources/src/components/activity/TxBacklinkCreate.svelte (61%) create mode 100644 plugins/chunter-resources/src/components/activity/TxBacklinkReference.svelte create mode 100644 plugins/view-resources/src/components/ObjectPresenter.svelte delete mode 100644 server/chunter-resources/.eslintrc.js delete mode 100644 server/chunter-resources/.npmignore delete mode 100644 server/chunter-resources/CHANGELOG.json delete mode 100644 server/chunter-resources/CHANGELOG.md delete mode 100644 server/chunter-resources/config/rig.json delete mode 100644 server/chunter-resources/package.json delete mode 100644 server/chunter-resources/src/index.ts delete mode 100644 server/chunter-resources/tsconfig.json delete mode 100644 server/chunter/.eslintrc.js delete mode 100644 server/chunter/.npmignore delete mode 100644 server/chunter/CHANGELOG.json delete mode 100644 server/chunter/CHANGELOG.md delete mode 100644 server/chunter/config/rig.json delete mode 100644 server/chunter/package.json delete mode 100644 server/chunter/src/index.ts delete mode 100644 server/chunter/tsconfig.json delete mode 100644 server/recruit-resources/.eslintrc.js delete mode 100644 server/recruit-resources/.npmignore delete mode 100644 server/recruit-resources/config/rig.json delete mode 100644 server/recruit-resources/package.json delete mode 100644 server/recruit-resources/src/index.ts delete mode 100644 server/recruit-resources/tsconfig.json delete mode 100644 server/recruit/.eslintrc.js delete mode 100644 server/recruit/.npmignore delete mode 100644 server/recruit/config/rig.json delete mode 100644 server/recruit/package.json delete mode 100644 server/recruit/src/index.ts delete mode 100644 server/recruit/tsconfig.json diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 6a7c37180e..cfde827c05 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -24,7 +24,6 @@ specifiers: '@rush-temp/dev-account': file:./projects/dev-account.tgz '@rush-temp/dev-client-resources': file:./projects/dev-client-resources.tgz '@rush-temp/dev-server': file:./projects/dev-server.tgz - '@rush-temp/dev-server-chunter-resources': file:./projects/dev-server-chunter-resources.tgz '@rush-temp/dev-storage': file:./projects/dev-storage.tgz '@rush-temp/devmodel': file:./projects/devmodel.tgz '@rush-temp/devmodel-resources': file:./projects/devmodel-resources.tgz @@ -58,9 +57,7 @@ specifiers: '@rush-temp/model-lead': file:./projects/model-lead.tgz '@rush-temp/model-recruit': file:./projects/model-recruit.tgz '@rush-temp/model-rig': file:./projects/model-rig.tgz - '@rush-temp/model-server-chunter': file:./projects/model-server-chunter.tgz '@rush-temp/model-server-core': file:./projects/model-server-core.tgz - '@rush-temp/model-server-recruit': file:./projects/model-server-recruit.tgz '@rush-temp/model-setting': file:./projects/model-setting.tgz '@rush-temp/model-task': file:./projects/model-task.tgz '@rush-temp/model-telegram': file:./projects/model-telegram.tgz @@ -78,11 +75,7 @@ specifiers: '@rush-temp/recruit-assets': file:./projects/recruit-assets.tgz '@rush-temp/recruit-resources': file:./projects/recruit-resources.tgz '@rush-temp/server': file:./projects/server.tgz - '@rush-temp/server-chunter': file:./projects/server-chunter.tgz - '@rush-temp/server-chunter-resources': file:./projects/server-chunter-resources.tgz '@rush-temp/server-core': file:./projects/server-core.tgz - '@rush-temp/server-recruit': file:./projects/server-recruit.tgz - '@rush-temp/server-recruit-resources': file:./projects/server-recruit-resources.tgz '@rush-temp/server-ws': file:./projects/server-ws.tgz '@rush-temp/setting': file:./projects/setting.tgz '@rush-temp/setting-assets': file:./projects/setting-assets.tgz @@ -105,13 +98,14 @@ specifiers: '@rush-temp/workbench-resources': file:./projects/workbench-resources.tgz '@rushstack/heft': ^0.41.1 '@rushstack/heft-jest-plugin': ^0.1.15 - '@tiptap/core': ~2.0.0-beta.93 - '@tiptap/extension-highlight': ~2.0.0-beta.15 - '@tiptap/extension-link': ~2.0.0-beta.33 - '@tiptap/extension-mention': ~2.0.0-beta.63 - '@tiptap/extension-placeholder': ~2.0.0-beta.26 - '@tiptap/extension-typography': ~2.0.0-beta.13 - '@tiptap/starter-kit': ~2.0.0-beta.89 + '@tiptap/core': ^2.0.0-beta.163 + '@tiptap/extension-highlight': ^2.0.0-beta.32 + '@tiptap/extension-link': ^2.0.0-beta.35 + '@tiptap/extension-mention': ^2.0.0-beta.92 + '@tiptap/extension-placeholder': ^2.0.0-beta.46 + '@tiptap/extension-typography': ^2.0.0-beta.19 + '@tiptap/starter-kit': ~2.0.0-beta.171 + '@tiptap/suggestion': ^2.0.0-beta.87 '@types/cors': ^2.8.12 '@types/deep-equal': ^1.0.1 '@types/express': ^4.17.13 @@ -125,6 +119,7 @@ specifiers: '@types/mime-types': ~2.1.1 '@types/minio': ^7.0.10 '@types/pdfkit': ~0.12.3 + '@types/prosemirror-state': ~1.2.8 '@types/toposort': ^2.0.3 '@types/uuid': ^8.3.1 '@types/xml2js': ~0.4.9 @@ -160,13 +155,14 @@ specifiers: mime-types: ~2.1.34 mini-css-extract-plugin: ^2.2.0 minio: ^7.0.19 - node-html-parser: ^4.1.3 pdfkit: ~0.13.0 postcss: ^8.3.4 postcss-load-config: ^3.1.0 postcss-loader: ^6.1.0 prettier: ^2.4.1 prettier-plugin-svelte: ^2.2.0 + prosemirror-model: ^1.16.1 + prosemirror-state: ^1.3.4 sass: ^1.37.5 sass-loader: ^12.1.0 simplytyped: ^3.3.0 @@ -209,7 +205,6 @@ dependencies: '@rush-temp/dev-account': file:projects/dev-account.tgz '@rush-temp/dev-client-resources': file:projects/dev-client-resources.tgz '@rush-temp/dev-server': file:projects/dev-server.tgz - '@rush-temp/dev-server-chunter-resources': file:projects/dev-server-chunter-resources.tgz '@rush-temp/dev-storage': file:projects/dev-storage.tgz '@rush-temp/devmodel': file:projects/devmodel.tgz_typescript@4.5.4 '@rush-temp/devmodel-resources': file:projects/devmodel-resources.tgz_6cae74ea501386c76c405ad0408e0339 @@ -243,9 +238,7 @@ dependencies: '@rush-temp/model-lead': file:projects/model-lead.tgz_typescript@4.5.4 '@rush-temp/model-recruit': file:projects/model-recruit.tgz_typescript@4.5.4 '@rush-temp/model-rig': file:projects/model-rig.tgz_37f79b97d0d86442e45d380c86f520c5 - '@rush-temp/model-server-chunter': file:projects/model-server-chunter.tgz_typescript@4.5.4 '@rush-temp/model-server-core': file:projects/model-server-core.tgz_typescript@4.5.4 - '@rush-temp/model-server-recruit': file:projects/model-server-recruit.tgz_typescript@4.5.4 '@rush-temp/model-setting': file:projects/model-setting.tgz_typescript@4.5.4 '@rush-temp/model-task': file:projects/model-task.tgz_typescript@4.5.4 '@rush-temp/model-telegram': file:projects/model-telegram.tgz_typescript@4.5.4 @@ -263,11 +256,7 @@ dependencies: '@rush-temp/recruit-assets': file:projects/recruit-assets.tgz '@rush-temp/recruit-resources': file:projects/recruit-resources.tgz_096c09b0b673a57c275d9767a12070b1 '@rush-temp/server': file:projects/server.tgz - '@rush-temp/server-chunter': file:projects/server-chunter.tgz - '@rush-temp/server-chunter-resources': file:projects/server-chunter-resources.tgz '@rush-temp/server-core': file:projects/server-core.tgz - '@rush-temp/server-recruit': file:projects/server-recruit.tgz - '@rush-temp/server-recruit-resources': file:projects/server-recruit-resources.tgz '@rush-temp/server-ws': file:projects/server-ws.tgz '@rush-temp/setting': file:projects/setting.tgz '@rush-temp/setting-assets': file:projects/setting-assets.tgz @@ -290,13 +279,14 @@ dependencies: '@rush-temp/workbench-resources': file:projects/workbench-resources.tgz_096c09b0b673a57c275d9767a12070b1 '@rushstack/heft': 0.41.8 '@rushstack/heft-jest-plugin': 0.1.53_@rushstack+heft@0.41.8 - '@tiptap/core': 2.0.0-beta.158 - '@tiptap/extension-highlight': 2.0.0-beta.31_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-link': 2.0.0-beta.33_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-mention': 2.0.0-beta.90_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-placeholder': 2.0.0-beta.45_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-typography': 2.0.0-beta.19_@tiptap+core@2.0.0-beta.158 - '@tiptap/starter-kit': 2.0.0-beta.163 + '@tiptap/core': 2.0.0-beta.163 + '@tiptap/extension-highlight': 2.0.0-beta.32_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-link': 2.0.0-beta.35_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-mention': 2.0.0-beta.92_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-placeholder': 2.0.0-beta.46_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-typography': 2.0.0-beta.19_@tiptap+core@2.0.0-beta.163 + '@tiptap/starter-kit': 2.0.0-beta.171 + '@tiptap/suggestion': 2.0.0-beta.87_@tiptap+core@2.0.0-beta.163 '@types/cors': 2.8.12 '@types/deep-equal': 1.0.1 '@types/express': 4.17.13 @@ -310,6 +300,7 @@ dependencies: '@types/mime-types': 2.1.1 '@types/minio': 7.0.11 '@types/pdfkit': 0.12.3 + '@types/prosemirror-state': 1.2.8 '@types/toposort': 2.0.3 '@types/uuid': 8.3.3 '@types/xml2js': 0.4.9 @@ -345,13 +336,14 @@ dependencies: mime-types: 2.1.34 mini-css-extract-plugin: 2.4.5_webpack@5.65.0 minio: 7.0.25 - node-html-parser: 4.1.5 pdfkit: 0.13.0 postcss: 8.4.5 postcss-load-config: 3.1.0 postcss-loader: 6.2.1_postcss@8.4.5+webpack@5.65.0 prettier: 2.5.1 prettier-plugin-svelte: 2.5.1_prettier@2.5.1 + prosemirror-model: 1.16.1 + prosemirror-state: 1.3.4 sass: 1.45.0 sass-loader: 12.4.0_sass@1.45.0+webpack@5.65.0 simplytyped: 3.3.0_typescript@4.5.4 @@ -1238,259 +1230,259 @@ packages: type-detect: 4.0.8 dev: false - /@tiptap/core/2.0.0-beta.158: - resolution: {integrity: sha512-hNyvL3Lnu0WqUxdTu29P5YxV48uXZXUCkVxQ2zT/ZRNx0PvX2ucs4F0I9QJsZK+PsPUkfKGNvj4NPCKooUv2gg==} + /@tiptap/core/2.0.0-beta.163: + resolution: {integrity: sha512-Rg2UaAhmb9z6eunQ5D6dSEO/e4zK2cfIuYJniB87o8nLogaNBNKkhy6Q2kZB1PpYLIpbl0C/DdHIQ7QYy92ZAg==} dependencies: '@types/prosemirror-commands': 1.0.4 '@types/prosemirror-keymap': 1.0.4 - '@types/prosemirror-model': 1.13.2 + '@types/prosemirror-model': 1.16.0 '@types/prosemirror-schema-list': 1.0.3 '@types/prosemirror-state': 1.2.8 '@types/prosemirror-transform': 1.1.5 '@types/prosemirror-view': 1.19.2 prosemirror-commands: 1.1.12 prosemirror-keymap: 1.1.5 - prosemirror-model: 1.15.0 + prosemirror-model: 1.16.1 prosemirror-schema-list: 1.1.6 prosemirror-state: 1.3.4 prosemirror-transform: 1.3.3 - prosemirror-view: 1.23.3 + prosemirror-view: 1.23.6 dev: false - /@tiptap/extension-blockquote/2.0.0-beta.26_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-blockquote/2.0.0-beta.26_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-A6yjcYovONJfOjQFk6vDYXswaCdCtCwjL7w9VTB0R2DLTuJvvRt9DWN0IDcMrj5G+aMgDq4GUUTitv+2Y8krDg==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-bold/2.0.0-beta.25_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-bold/2.0.0-beta.25_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-ZNdgFYDxKo8lAp0Pqzu45I0JH3ah8/X5TCYg9zNg3QwLUFT16g2LlWDMUDGT5pH9aXxgtFaEdoVacu0EyhlPnQ==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-bullet-list/2.0.0-beta.25_@tiptap+core@2.0.0-beta.158: - resolution: {integrity: sha512-0bXbiNzxkOUVY5kjsLJa0VsqP2GexMOAr/khTNk2okN0Xoy5qAWwN+t4bzGs2d0YdFS1xVb/AQm5MBrl1CMfHw==} + /@tiptap/extension-bullet-list/2.0.0-beta.26_@tiptap+core@2.0.0-beta.163: + resolution: {integrity: sha512-1n5HV8gY1tLjPk4x48nva6SZlFHoPlRfF6pqSu9JcJxPO7FUSPxUokuz4swYNe0LRrtykfyNz44dUcxKVhoFow==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-code-block/2.0.0-beta.32_@tiptap+core@2.0.0-beta.158: - resolution: {integrity: sha512-pmTutAzZ42bJUggTsaIQJ4gHAPy/TmVcEdMHcwvdHvWt03udd0H6FNA/3UZeKM1BZRyg8f8oo4bLvVnA52kfqQ==} + /@tiptap/extension-code-block/2.0.0-beta.35_@tiptap+core@2.0.0-beta.163: + resolution: {integrity: sha512-8SIP45Bl/mii3mdRdVPCF3yJGU37Nt2EJiU9eyfTzQSMbaf9Vf1Kop39tjKdbjTrsZ3W7Lnycj+q4x18Zusb6Q==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 prosemirror-state: 1.3.4 dev: false - /@tiptap/extension-code/2.0.0-beta.26_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-code/2.0.0-beta.26_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-QcFWdEFfbJ1n5UFFBD17QPPAJ3J5p/b7XV484u0shCzywO7aNPV32QeHy1z0eMoyZtCbOWf6hg/a7Ugv8IwpHw==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-document/2.0.0-beta.15_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-document/2.0.0-beta.15_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-ypENC+xUYD5m2t+KOKNYqyXnanXd5fxyIyhR1qeEEwwQwMXGNrO3kCH6O4mIDCpy+/WqHvVay2tV5dVsXnvY8w==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-dropcursor/2.0.0-beta.25_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-dropcursor/2.0.0-beta.25_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-GYf5s6dkZtsDy+TEkrQK6kLbfbitG4qnk02D+FlhlJMI/Nnx8rYCRJbwEHDdqrfX7XwZzULMqqqHvzxZYrEeNg==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 '@types/prosemirror-dropcursor': 1.0.3 prosemirror-dropcursor: 1.4.0 dev: false - /@tiptap/extension-gapcursor/2.0.0-beta.33_@tiptap+core@2.0.0-beta.158: - resolution: {integrity: sha512-Yu6BJ1bseyXIgLlcw/2R/2wWe1mIQilMwW7hhfDJPLbFwLJrMINtA9hxd2qY7mtW19/CveT5HOihQS6QEk59iw==} + /@tiptap/extension-gapcursor/2.0.0-beta.34_@tiptap+core@2.0.0-beta.163: + resolution: {integrity: sha512-Vm8vMWWQ2kJcUOLfB5CEo5pYgyudI7JeeiZvX9ScPmUmgKVYhEpt3EAICY9pUYJ41aAVH35gZLXkUtsz2f9GHw==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 '@types/prosemirror-gapcursor': 1.0.4 - prosemirror-gapcursor: 1.2.0 + prosemirror-gapcursor: 1.2.1 dev: false - /@tiptap/extension-hard-break/2.0.0-beta.30_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-hard-break/2.0.0-beta.30_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-X9xj/S+CikrbIE7ccUFVwit5QHEbflnKVxod+4zPwr1cxogFbE9AyLZE2MpYdx3z9LcnTYYi9leBqFrP4T/Olw==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-heading/2.0.0-beta.24_@tiptap+core@2.0.0-beta.158: - resolution: {integrity: sha512-5a3vgdO7Cf2+z7sulCGs/1j23gBcKiZe3pA1FrC5h6blwLu86hA1xnMAVBVNilP9b6c9f3lN9yxMzEWsp6ZEkA==} + /@tiptap/extension-heading/2.0.0-beta.25_@tiptap+core@2.0.0-beta.163: + resolution: {integrity: sha512-7cK2gB3eqb7U0KmpWIPT7tsHGuVeFk4q1q/V6q91NTtZ4HdOMAyFuYTZu1iXufKyoEXTftByE85EYsfJGeGiRQ==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-highlight/2.0.0-beta.31_@tiptap+core@2.0.0-beta.158: - resolution: {integrity: sha512-qCJh5oAls6NpPfe1Np4TyIz3DUSfdi6IFtt/L3MNKsojHsxgg09DE7DNd94A6MjYnnqO627yrHmZlp+vB1whfw==} + /@tiptap/extension-highlight/2.0.0-beta.32_@tiptap+core@2.0.0-beta.163: + resolution: {integrity: sha512-fl/w+6QgE3OcLlW3fkO7wE9c0E9VX4AueBBHRYIYv7k4AzBDSoIEA7XVFa8jJFIMzmxrFGnPd5OEDRo7ezWq6A==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-history/2.0.0-beta.21_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-history/2.0.0-beta.21_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-0v8Cl30V4dsabdpspLdk+f+lMoIvLFlJN5WRxtc7RRZ5gfJVxPHwooIKdvC51brfh/oJtWFCNMRjhoz0fRaF9A==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 '@types/prosemirror-history': 1.0.3 prosemirror-history: 1.2.0 dev: false - /@tiptap/extension-horizontal-rule/2.0.0-beta.30_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-horizontal-rule/2.0.0-beta.30_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-h/PlkvfcMuoBGRfD7Cbeh8mxZiEc2pKveLDwOfCES9TKV5i2lqcIgctpohWyISuFcTq4K+OFgr910+Rsp8qwEg==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 prosemirror-state: 1.3.4 dev: false - /@tiptap/extension-italic/2.0.0-beta.25_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-italic/2.0.0-beta.25_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-7PvhioTX9baVp5+AmmZU0qna+dFPZCRlSEN/GciH57N77d2uhJ/ZW5iQWTbvy5HBNddQB4Jts1UDIaC7WASrGA==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-link/2.0.0-beta.33_@tiptap+core@2.0.0-beta.158: - resolution: {integrity: sha512-w0ywONZ9bZddelcNWmrsc3rvzWDVq20pdwHffdJqGFrQSFusSeF3OY0hjHWaske9DLow1vUZvP13IrIhpqsMXg==} + /@tiptap/extension-link/2.0.0-beta.35_@tiptap+core@2.0.0-beta.163: + resolution: {integrity: sha512-FQRjboP69QvUxPI97BRlLzfm7LHDYuAdM/mgEBwDE/i0w7I9lVlfpdGGd4hiPNfD2gMEqHfYJzb1K1qMZw+yRw==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 - linkifyjs: 3.0.4 - prosemirror-model: 1.15.0 + '@tiptap/core': 2.0.0-beta.163 + linkifyjs: 3.0.5 + prosemirror-model: 1.16.1 prosemirror-state: 1.3.4 dev: false - /@tiptap/extension-list-item/2.0.0-beta.20_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-list-item/2.0.0-beta.20_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-5IPEspJt38t9ROj4xLUesOVEYlTT/R9Skd9meHRxJQZX1qrzBICs5PC/WRIsnexrvTBhdxpYgCYjpvpsJBlKuQ==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-mention/2.0.0-beta.90_@tiptap+core@2.0.0-beta.158: - resolution: {integrity: sha512-YQRKz93Y6+6noVwOXc6F4wKl47uBHNGpqlkpjP5h87F1gubLtYwyIJ8HsUwGM5qTvIln5nz7CiVN2I2H8kgJpA==} + /@tiptap/extension-mention/2.0.0-beta.92_@tiptap+core@2.0.0-beta.163: + resolution: {integrity: sha512-sHhQ7yAwumiVv9ysn7xGf4WQzpPQENXakHnLnlyEYi6VwqZKSadyJrmCdOl3ZIGmLP6c6PGjL4j4nlpYS7xK7Q==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 - '@tiptap/suggestion': 2.0.0-beta.85_@tiptap+core@2.0.0-beta.158 - prosemirror-model: 1.15.0 + '@tiptap/core': 2.0.0-beta.163 + '@tiptap/suggestion': 2.0.0-beta.87_@tiptap+core@2.0.0-beta.163 + prosemirror-model: 1.16.1 prosemirror-state: 1.3.4 dev: false - /@tiptap/extension-ordered-list/2.0.0-beta.26_@tiptap+core@2.0.0-beta.158: - resolution: {integrity: sha512-S2ybqnqGf1fynT21A8e99TsJ0TvU1xmVumDUfUi6/tLp5XLASbjK7ZlWdRje+FHxz4JXaP/34+NdFymGcVb5mQ==} + /@tiptap/extension-ordered-list/2.0.0-beta.27_@tiptap+core@2.0.0-beta.163: + resolution: {integrity: sha512-apFDeignxdZb3cA3p1HJu0zw1JgJdBYUBz1r7f99qdNybYuk3I/1MPUvlOuOgvIrBB/wydoyVDP+v9F7QN3tfQ==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-paragraph/2.0.0-beta.23_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-paragraph/2.0.0-beta.23_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-VWAxyzecErYWk97Kv/Gkghh97zAQTcaVOisEnYYArZAlyYDaYM48qVssAC/vnRRynP2eQxb1EkppbAxE+bMHAA==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-placeholder/2.0.0-beta.45_@tiptap+core@2.0.0-beta.158: - resolution: {integrity: sha512-zsjNHR5z2qyVBVYNIMvnOJXN2mt4WfzAxVqOg0jawoEMC2UVbTB4NbUcUXUzDGppp2jv7UjoHxpsm88KqBHEOw==} + /@tiptap/extension-placeholder/2.0.0-beta.46_@tiptap+core@2.0.0-beta.163: + resolution: {integrity: sha512-/Oz8fS95qA+sHX70AC85mc5RARIEeNbdKr97DCYjrsH2P3uDwt4O5NSxNZvvtxzBmBxmN+rfUhiCjIN/GlldlQ==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 - prosemirror-model: 1.15.0 + '@tiptap/core': 2.0.0-beta.163 + prosemirror-model: 1.16.1 prosemirror-state: 1.3.4 - prosemirror-view: 1.23.3 + prosemirror-view: 1.23.6 dev: false - /@tiptap/extension-strike/2.0.0-beta.27_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-strike/2.0.0-beta.27_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-2dmCgtesuDdivM/54Q+Y6Tc3JbGz1SkHP6c62piuqBiYLWg3xa16zChZOhfN8szbbQlBgLT6XRTDt3c2Ux+Dug==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-text/2.0.0-beta.15_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-text/2.0.0-beta.15_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-S3j2+HyV2gsXZP8Wg/HA+YVXQsZ3nrXgBM9HmGAxB0ESOO50l7LWfip0f3qcw1oRlh5H3iLPkA6/f7clD2/TFA==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/extension-typography/2.0.0-beta.19_@tiptap+core@2.0.0-beta.158: + /@tiptap/extension-typography/2.0.0-beta.19_@tiptap+core@2.0.0-beta.163: resolution: {integrity: sha512-9Y3or/X0IkHqfJg1eOqqMiPFgXKQKNOwDy+xN6qhORQSUzCPOCHttAUdp8AN/WUEQOoOK4uaRida8ik1ATK7ZQ==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 dev: false - /@tiptap/starter-kit/2.0.0-beta.163: - resolution: {integrity: sha512-75WQbKT1GBNERAGMcVcoV06yk8NTXgDej5YTBsB8OHJ2GVsqdiOhpuZSNMtzt/06OU2B8LeTVuPE4OPETpIFSA==} + /@tiptap/starter-kit/2.0.0-beta.171: + resolution: {integrity: sha512-ifgaPMsKinFDWQ03beMCPpdtcbYSCD4QXMMjdzHlGi2cDZQP6/s3IYpBVZ5kMBAX2x81QAgNjgy2BJ2PaGzsbw==} dependencies: - '@tiptap/core': 2.0.0-beta.158 - '@tiptap/extension-blockquote': 2.0.0-beta.26_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-bold': 2.0.0-beta.25_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-bullet-list': 2.0.0-beta.25_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-code': 2.0.0-beta.26_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-code-block': 2.0.0-beta.32_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-document': 2.0.0-beta.15_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-dropcursor': 2.0.0-beta.25_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-gapcursor': 2.0.0-beta.33_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-hard-break': 2.0.0-beta.30_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-heading': 2.0.0-beta.24_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-history': 2.0.0-beta.21_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-horizontal-rule': 2.0.0-beta.30_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-italic': 2.0.0-beta.25_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-list-item': 2.0.0-beta.20_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-ordered-list': 2.0.0-beta.26_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-paragraph': 2.0.0-beta.23_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-strike': 2.0.0-beta.27_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-text': 2.0.0-beta.15_@tiptap+core@2.0.0-beta.158 + '@tiptap/core': 2.0.0-beta.163 + '@tiptap/extension-blockquote': 2.0.0-beta.26_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-bold': 2.0.0-beta.25_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-bullet-list': 2.0.0-beta.26_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-code': 2.0.0-beta.26_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-code-block': 2.0.0-beta.35_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-document': 2.0.0-beta.15_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-dropcursor': 2.0.0-beta.25_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-gapcursor': 2.0.0-beta.34_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-hard-break': 2.0.0-beta.30_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-heading': 2.0.0-beta.25_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-history': 2.0.0-beta.21_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-horizontal-rule': 2.0.0-beta.30_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-italic': 2.0.0-beta.25_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-list-item': 2.0.0-beta.20_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-ordered-list': 2.0.0-beta.27_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-paragraph': 2.0.0-beta.23_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-strike': 2.0.0-beta.27_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-text': 2.0.0-beta.15_@tiptap+core@2.0.0-beta.163 dev: false - /@tiptap/suggestion/2.0.0-beta.85_@tiptap+core@2.0.0-beta.158: - resolution: {integrity: sha512-YpVKtP9wLVLvPKpZHVr+8cy+AbaTn1wF1PLGhNoazGCSi+v6PHD3DG2iRfC1PKzMa5PEiHI1UIdJq9xrtu9zXg==} + /@tiptap/suggestion/2.0.0-beta.87_@tiptap+core@2.0.0-beta.163: + resolution: {integrity: sha512-rPkJvbrbiT5CSRVQywjjptQUv7vLN/Hm3jGEsuTf56J05CXvtykMGju548Nm9Hm4gP5iE3iToPfF3l9feHirgg==} peerDependencies: '@tiptap/core': ^2.0.0-beta.1 dependencies: - '@tiptap/core': 2.0.0-beta.158 - prosemirror-model: 1.15.0 + '@tiptap/core': 2.0.0-beta.163 + prosemirror-model: 1.16.1 prosemirror-state: 1.3.4 - prosemirror-view: 1.23.3 + prosemirror-view: 1.23.6 dev: false /@trysound/sax/0.2.0: @@ -1804,7 +1796,7 @@ packages: /@types/prosemirror-commands/1.0.4: resolution: {integrity: sha512-utDNYB3EXLjAfYIcRWJe6pn3kcQ5kG4RijbT/0Y/TFOm6yhvYS/D9eJVnijdg9LDjykapcezchxGRqFD5LcyaQ==} dependencies: - '@types/prosemirror-model': 1.13.2 + '@types/prosemirror-model': 1.16.0 '@types/prosemirror-state': 1.2.8 '@types/prosemirror-view': 1.19.2 dev: false @@ -1818,14 +1810,14 @@ packages: /@types/prosemirror-gapcursor/1.0.4: resolution: {integrity: sha512-9xKjFIG5947dzerFvkLWp6F53JwrUYoYwh3SgcTFEp8SbSfNNrez/PFYVZKPnoqPoaK5WtTdQTaMwpCV9rXQIg==} dependencies: - '@types/prosemirror-model': 1.13.2 + '@types/prosemirror-model': 1.16.0 '@types/prosemirror-state': 1.2.8 dev: false /@types/prosemirror-history/1.0.3: resolution: {integrity: sha512-5TloMDRavgLjOAKXp1Li8u0xcsspzbT1Cm9F2pwHOkgvQOz1jWQb2VIXO7RVNsFjLBZdIXlyfSLivro3DuMWXg==} dependencies: - '@types/prosemirror-model': 1.13.2 + '@types/prosemirror-model': 1.16.0 '@types/prosemirror-state': 1.2.8 dev: false @@ -1833,13 +1825,13 @@ packages: resolution: {integrity: sha512-ycevwkqUh+jEQtPwqO7sWGcm+Sybmhu8MpBsM8DlO3+YTKnXbKA6SDz/+q14q1wK3UA8lHJyfR+v+GPxfUSemg==} dependencies: '@types/prosemirror-commands': 1.0.4 - '@types/prosemirror-model': 1.13.2 + '@types/prosemirror-model': 1.16.0 '@types/prosemirror-state': 1.2.8 '@types/prosemirror-view': 1.19.2 dev: false - /@types/prosemirror-model/1.13.2: - resolution: {integrity: sha512-a2rDB0aZ+7aIP7uBqQq1wLb4Hg4qqEvpkCqvhsgT/gG8IWC0peCAZfQ24sgTco0qSJLeDgIbtPeU6mgr869/kg==} + /@types/prosemirror-model/1.16.0: + resolution: {integrity: sha512-nv93YLyTEcDDl17OB90EldxZjyJQJll2WSMLDvLzTewbpvE/vtMjHT3j4mik3uSzQ6YD486AcloCO3WODY/lDg==} dependencies: '@types/orderedmap': 1.0.0 dev: false @@ -1848,14 +1840,14 @@ packages: resolution: {integrity: sha512-uWybOf+M2Ea7rlbs0yLsS4YJYNGXYtn4N+w8HCw3Vvfl6wBAROzlMt0gV/D/VW/7J/LlAjwMezuGe8xi24HzXA==} dependencies: '@types/orderedmap': 1.0.0 - '@types/prosemirror-model': 1.13.2 + '@types/prosemirror-model': 1.16.0 '@types/prosemirror-state': 1.2.8 dev: false /@types/prosemirror-state/1.2.8: resolution: {integrity: sha512-mq9uyQWcpu8jeamO6Callrdvf/e1H/aRLR2kZWSpZrPHctEsxWHBbluD/wqVjXBRIOoMHLf6ZvOkrkmGLoCHVA==} dependencies: - '@types/prosemirror-model': 1.13.2 + '@types/prosemirror-model': 1.16.0 '@types/prosemirror-transform': 1.1.5 '@types/prosemirror-view': 1.19.2 dev: false @@ -1863,13 +1855,13 @@ packages: /@types/prosemirror-transform/1.1.5: resolution: {integrity: sha512-Wr2HXaEF4JPklWpC17RTxE6PxyU54Taqk5FMhK1ojgcN93J+GpkYW8s0mD3rl7KfTmlhVwZPCHE9o0cYf2Go5A==} dependencies: - '@types/prosemirror-model': 1.13.2 + '@types/prosemirror-model': 1.16.0 dev: false /@types/prosemirror-view/1.19.2: resolution: {integrity: sha512-pmh2DuMJzva4D7SxspRKIzkV6FK2o52uAqGjq2dPYcQFPwu4+5RcS1TMjFVCh1R+Ia1Rx8wsCNIId/5+6DB0Bg==} dependencies: - '@types/prosemirror-model': 1.13.2 + '@types/prosemirror-model': 1.16.0 '@types/prosemirror-state': 1.2.8 '@types/prosemirror-transform': 1.1.5 dev: false @@ -5406,11 +5398,6 @@ packages: minimalistic-assert: 1.0.1 dev: false - /he/1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - dev: false - /hmac-drbg/1.0.1: resolution: {integrity: sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=} dependencies: @@ -6858,8 +6845,8 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: false - /linkifyjs/3.0.4: - resolution: {integrity: sha512-JWw1HHMx54g8mEsG7JwI8I/xh7qeJbF6L9u1dQOYW91RdRqDYpnTn1UaNXYkmLD967Vk0xGuyHzuRnkSApby3w==} + /linkifyjs/3.0.5: + resolution: {integrity: sha512-1Y9XQH65eQKA9p2xtk+zxvnTeQBG7rdAXSkUG97DmuI/Xhji9uaUzaWxRj6rf9YC0v8KKHkxav7tnLX82Sz5Fg==} dev: false /load-source-map/2.0.0: @@ -7333,13 +7320,6 @@ packages: engines: {node: '>= 6.0.0'} dev: false - /node-html-parser/4.1.5: - resolution: {integrity: sha512-NLgqUXtftqnBqIjlRjYSaApaqE7TTxfTiH4VqKCjdUJKFOtUzRwney83EHz2qYc0XoxXAkYdmLjENCuZHvsIFg==} - dependencies: - css-select: 4.2.0 - he: 1.2.0 - dev: false - /node-int64/0.4.0: resolution: {integrity: sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=} dev: false @@ -8036,7 +8016,7 @@ packages: /prosemirror-commands/1.1.12: resolution: {integrity: sha512-+CrMs3w/ZVPSkR+REg8KL/clyFLv/1+SgY/OMN+CB22Z24j9TZDje72vL36lOZ/E4NeRXuiCcmENcW/vAcG67A==} dependencies: - prosemirror-model: 1.15.0 + prosemirror-model: 1.16.1 prosemirror-state: 1.3.4 prosemirror-transform: 1.3.3 dev: false @@ -8046,16 +8026,16 @@ packages: dependencies: prosemirror-state: 1.3.4 prosemirror-transform: 1.3.3 - prosemirror-view: 1.23.3 + prosemirror-view: 1.23.6 dev: false - /prosemirror-gapcursor/1.2.0: - resolution: {integrity: sha512-yCLy5+0rVqLir/KcHFathQj4Rf8aRHi80FmEfKtM0JmyzvwdomslLzDZ/pX4oFhFKDgjl/WBBBFNqDyNifWg7g==} + /prosemirror-gapcursor/1.2.1: + resolution: {integrity: sha512-PHa9lj27iM/g4C46gxVzsefuXVfy/LrGQH4QjMRht7VDBgw77iWYWn8ZHMWSFkwtr9jQEuxI5gccHHHwWG80nw==} dependencies: prosemirror-keymap: 1.1.5 - prosemirror-model: 1.15.0 + prosemirror-model: 1.16.1 prosemirror-state: 1.3.4 - prosemirror-view: 1.23.3 + prosemirror-view: 1.23.6 dev: false /prosemirror-history/1.2.0: @@ -8079,10 +8059,16 @@ packages: orderedmap: 1.1.1 dev: false + /prosemirror-model/1.16.1: + resolution: {integrity: sha512-r1/w0HDU40TtkXp0DyKBnFPYwd8FSlUSJmGCGFv4DeynfeSlyQF2FD0RQbVEMOe6P3PpUSXM6LZBV7W/YNZ4mA==} + dependencies: + orderedmap: 1.1.1 + dev: false + /prosemirror-schema-list/1.1.6: resolution: {integrity: sha512-aFGEdaCWmJzouZ8DwedmvSsL50JpRkqhQ6tcpThwJONVVmCgI36LJHtoQ4VGZbusMavaBhXXr33zyD2IVsTlkw==} dependencies: - prosemirror-model: 1.15.0 + prosemirror-model: 1.16.1 prosemirror-transform: 1.3.3 dev: false @@ -8099,10 +8085,10 @@ packages: prosemirror-model: 1.15.0 dev: false - /prosemirror-view/1.23.3: - resolution: {integrity: sha512-89icyMdXXwxmTxYj0TIuG5M/d0iKeu79tr+PVtC/4qtCOoHrPSPrblJcFOuOWcxGlA/Ei8PqJB4g5HkKR8jWvQ==} + /prosemirror-view/1.23.6: + resolution: {integrity: sha512-B4DAzriNpI/AVoW0Lu6SVfX00jZZQxOVwdBQEjWlRbCdT9V0pvk4GQJ3JTFaib+b6BcPdRZ3MjWXz2xvV1rblA==} dependencies: - prosemirror-model: 1.15.0 + prosemirror-model: 1.16.1 prosemirror-state: 1.3.4 prosemirror-transform: 1.3.3 dev: false @@ -10726,7 +10712,7 @@ packages: dev: false file:projects/activity-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-o6RpdrtwnGmVtudJ14BdbkVOXYJ2kWdlC8BrM7HZnHNlWRbCoTUX9wAXdyOvwbkxcXbWANNNb8B9v9A+BE9f4Q==, tarball: file:projects/activity-resources.tgz} + resolution: {integrity: sha512-DTAIFUH5vy1h9mqxFrr25BYnjgndQ7HFIozOVU7lBlRHQJ2v9x1fWdKvLr9Srg+E7OeN2GawVcx19GUZ2eW/zg==, tarball: file:projects/activity-resources.tgz} id: file:projects/activity-resources.tgz name: '@rush-temp/activity-resources' version: 0.0.0 @@ -11094,28 +11080,8 @@ packages: - supports-color dev: false - file:projects/dev-server-chunter-resources.tgz: - resolution: {integrity: sha512-SsZp98yRTELQK2Mlg+yl4duifTgWvD22kGoZsgbXbcxXy3Qdv2scQrsvsGMIQjJ0Pt9VlaXF7RvHU7lL7DXbOg==, tarball: file:projects/dev-server-chunter-resources.tgz} - name: '@rush-temp/dev-server-chunter-resources' - version: 0.0.0 - dependencies: - '@rushstack/heft': 0.41.8 - '@types/heft-jest': 1.0.2 - '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 - '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 - eslint: 7.32.0 - eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a - eslint-plugin-import: 2.25.3_eslint@7.32.0 - eslint-plugin-node: 11.1.0_eslint@7.32.0 - eslint-plugin-promise: 5.2.0_eslint@7.32.0 - prettier: 2.5.1 - typescript: 4.5.4 - transitivePeerDependencies: - - supports-color - dev: false - file:projects/dev-server.tgz: - resolution: {integrity: sha512-vJ+DOrDPdQ5FE5G76Ovt2g6gPB6brik4Zr2NWFWR72HwG9cA8zHwBynFtIP7Wtyp8dvdbb92bDwwFXm4n4v8RA==, tarball: file:projects/dev-server.tgz} + resolution: {integrity: sha512-vVsADCkvZZ9fgVBcxeSesX53OZ82APMv4p13mbhEuoU/cv3FSLsPRVKf0zi9Y5Key0uuUX0tRjpbbpxx7NKgXw==, tarball: file:projects/dev-server.tgz} name: '@rush-temp/dev-server' version: 0.0.0 dependencies: @@ -11466,7 +11432,7 @@ packages: dev: false file:projects/inventory-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-PiKSp7YMOeYnOnyDukPG1Qno6QmImWvc3qBJUY5ZKXiQyZWA9JpWqJm3WfoaprfoLVKCiSvqkA2r2XrqfIjJcQ==, tarball: file:projects/inventory-resources.tgz} + resolution: {integrity: sha512-MrUT0/F04u5zOmtGq/iBCXPTt2HNfw4/D7xtrL3BJLP/djmiWT6P0lELSF9wUsMpEeOiJ5LlJqH+ho22VsDhSQ==, tarball: file:projects/inventory-resources.tgz} id: file:projects/inventory-resources.tgz name: '@rush-temp/inventory-resources' version: 0.0.0 @@ -11664,7 +11630,7 @@ packages: dev: false file:projects/model-all.tgz_typescript@4.5.4: - resolution: {integrity: sha512-QqT4D4AgEQSvRi5epmizX6ipSCnOlaklFy5ne2rUIVJ1MU0cLgOfIXdCjkl47VTsT98JLOWSjv7y5X82bRGnHw==, tarball: file:projects/model-all.tgz} + resolution: {integrity: sha512-PxQBpDt3uxqeXs8TrLKh5b2KIdH8SRZkM7KkL5gA0qGIeeH13EjN22X/jMc8TZVMKwaBL1aJld8aE5YkIKPK6g==, tarball: file:projects/model-all.tgz} id: file:projects/model-all.tgz name: '@rush-temp/model-all' version: 0.0.0 @@ -11815,7 +11781,7 @@ packages: dev: false file:projects/model-inventory.tgz_typescript@4.5.4: - resolution: {integrity: sha512-P+V2OydmT65gpPhJm85tPkIn5uLRKQmu2sMHg/1oRJLXKCeQz1wAgb5ZzlzmgbilrrfchcwYtJHyPANNcnBrdg==, tarball: file:projects/model-inventory.tgz} + resolution: {integrity: sha512-IOSgs0rQyuDWdo3DZKVTYG7sYTCLNA/PEzu41huHcmM+iPkkkOAs1/mOoFIq3zPDxUQ4tBGsNFCUBQbKMQ/a6w==, tarball: file:projects/model-inventory.tgz} id: file:projects/model-inventory.tgz name: '@rush-temp/model-inventory' version: 0.0.0 @@ -11896,27 +11862,6 @@ packages: - supports-color dev: false - file:projects/model-server-chunter.tgz_typescript@4.5.4: - resolution: {integrity: sha512-kMga+xIgLepvk0pIJDKIGtIjkTFCKy+ZN/BN8xMPTwskBSNK0L04x3yDxiUB4ikh1OfugoNQDAclhx8/nuzwfQ==, tarball: file:projects/model-server-chunter.tgz} - id: file:projects/model-server-chunter.tgz - name: '@rush-temp/model-server-chunter' - version: 0.0.0 - dependencies: - '@rushstack/heft': 0.41.8 - '@types/heft-jest': 1.0.2 - '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 - '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 - eslint: 7.32.0 - eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a - eslint-plugin-import: 2.25.3_eslint@7.32.0 - eslint-plugin-node: 11.1.0_eslint@7.32.0 - eslint-plugin-promise: 5.2.0_eslint@7.32.0 - prettier: 2.5.1 - transitivePeerDependencies: - - supports-color - - typescript - dev: false - file:projects/model-server-core.tgz_typescript@4.5.4: resolution: {integrity: sha512-hagtid24XnydnAi0jSVnRJ20sGD3k+GpvqFaUO3/T5PgvwafBta6ZZ90b931ttxK4XWt6qdNaKLmUFBsxJ3mvg==, tarball: file:projects/model-server-core.tgz} id: file:projects/model-server-core.tgz @@ -11938,27 +11883,6 @@ packages: - typescript dev: false - file:projects/model-server-recruit.tgz_typescript@4.5.4: - resolution: {integrity: sha512-naLC1z6vcLj5qo2rYq2u+5aOz8aSBbfC154v4F5zab4tHqjcwTdjhasyuJPbdm5NLXbW8TWIkocf27mUtXfR0Q==, tarball: file:projects/model-server-recruit.tgz} - id: file:projects/model-server-recruit.tgz - name: '@rush-temp/model-server-recruit' - version: 0.0.0 - dependencies: - '@rushstack/heft': 0.41.8 - '@types/heft-jest': 1.0.2 - '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 - '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 - eslint: 7.32.0 - eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a - eslint-plugin-import: 2.25.3_eslint@7.32.0 - eslint-plugin-node: 11.1.0_eslint@7.32.0 - eslint-plugin-promise: 5.2.0_eslint@7.32.0 - prettier: 2.5.1 - transitivePeerDependencies: - - supports-color - - typescript - dev: false - file:projects/model-setting.tgz_typescript@4.5.4: resolution: {integrity: sha512-zwbVN3PDOfDeqGcL36IHQIufdePTd68yLUm83rfIg4v8+uilseid981y/BrAysmxTXAfhVYWlDmtYXvNPS4DMQ==, tarball: file:projects/model-setting.tgz} id: file:projects/model-setting.tgz @@ -12259,7 +12183,7 @@ packages: dev: false file:projects/prod.tgz_sass@1.45.0+typescript@4.5.4: - resolution: {integrity: sha512-aYcYW/uvTMNxOOsjG9io+pTV+pyk0a2CIsoJsF8tFnywgIBJb2X39Yj33nmjRvPpYdsaF4ujn0IdbK4IfM0kZw==, tarball: file:projects/prod.tgz} + resolution: {integrity: sha512-J/vqaKPl5JAPRjUi0olTyjdAmRM4ToFWCazldFFxMS6o+hgXCQIGPSZ7sB0HPdq+7pi+QL8GuRFvb0xsZJjKWw==, tarball: file:projects/prod.tgz} id: file:projects/prod.tgz name: '@rush-temp/prod' version: 0.0.0 @@ -12389,48 +12313,6 @@ packages: - supports-color dev: false - file:projects/server-chunter-resources.tgz: - resolution: {integrity: sha512-fLifEAH8dnEOt9QawtvxWJCKWg0sAfE3kuWXhSdRjwDrrfX2Ku2dIwglx1Nso8Bo6u3iZ3RcB1AG4jwsHUbe8Q==, tarball: file:projects/server-chunter-resources.tgz} - name: '@rush-temp/server-chunter-resources' - version: 0.0.0 - dependencies: - '@rushstack/heft': 0.41.8 - '@types/heft-jest': 1.0.2 - '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 - '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 - eslint: 7.32.0 - eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a - eslint-plugin-import: 2.25.3_eslint@7.32.0 - eslint-plugin-node: 11.1.0_eslint@7.32.0 - eslint-plugin-promise: 5.2.0_eslint@7.32.0 - node-html-parser: 4.1.5 - prettier: 2.5.1 - typescript: 4.5.4 - transitivePeerDependencies: - - supports-color - dev: false - - file:projects/server-chunter.tgz: - resolution: {integrity: sha512-kpo3OPoldUkUrnRvxa/xZYRIyKd12a5q1XcdXlPkPN1ZDiJVp6PFF8fuwc5hjjf8T6/jKOYmLw+JCafTb7rSOA==, tarball: file:projects/server-chunter.tgz} - name: '@rush-temp/server-chunter' - version: 0.0.0 - dependencies: - '@rushstack/heft': 0.41.8 - '@types/heft-jest': 1.0.2 - '@types/node': 16.11.14 - '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 - '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 - eslint: 7.32.0 - eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a - eslint-plugin-import: 2.25.3_eslint@7.32.0 - eslint-plugin-node: 11.1.0_eslint@7.32.0 - eslint-plugin-promise: 5.2.0_eslint@7.32.0 - prettier: 2.5.1 - typescript: 4.5.4 - transitivePeerDependencies: - - supports-color - dev: false - file:projects/server-core.tgz: resolution: {integrity: sha512-ZWRRX5y31zZdDRPHie4p5z6R5uEKrB4FwoLn8zwF4R+7QJ1B0ycJ0BqA9akQMyo2iI5JG3mm1luwigL0Rv717g==, tarball: file:projects/server-core.tgz} name: '@rush-temp/server-core' @@ -12452,47 +12334,6 @@ packages: - supports-color dev: false - file:projects/server-recruit-resources.tgz: - resolution: {integrity: sha512-ikGXjugHrV91oxXpA+YmelkieNMMmM/k5xR3K4k2Ps+lkmCdv4znSGOYz7f9zf2VCvge5xOvySVriEESUMSOig==, tarball: file:projects/server-recruit-resources.tgz} - name: '@rush-temp/server-recruit-resources' - version: 0.0.0 - dependencies: - '@rushstack/heft': 0.41.8 - '@types/heft-jest': 1.0.2 - '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 - '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 - eslint: 7.32.0 - eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a - eslint-plugin-import: 2.25.3_eslint@7.32.0 - eslint-plugin-node: 11.1.0_eslint@7.32.0 - eslint-plugin-promise: 5.2.0_eslint@7.32.0 - prettier: 2.5.1 - typescript: 4.5.4 - transitivePeerDependencies: - - supports-color - dev: false - - file:projects/server-recruit.tgz: - resolution: {integrity: sha512-UrQBEwX6cZgSk+HMfhJort5tzGaCe1cv0Thg3sITzNaB4yb3FExUTeVphI16hgh6Hcv/2m53zsdcNscnpoTROg==, tarball: file:projects/server-recruit.tgz} - name: '@rush-temp/server-recruit' - version: 0.0.0 - dependencies: - '@rushstack/heft': 0.41.8 - '@types/heft-jest': 1.0.2 - '@types/node': 16.11.14 - '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 - '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 - eslint: 7.32.0 - eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a - eslint-plugin-import: 2.25.3_eslint@7.32.0 - eslint-plugin-node: 11.1.0_eslint@7.32.0 - eslint-plugin-promise: 5.2.0_eslint@7.32.0 - prettier: 2.5.1 - typescript: 4.5.4 - transitivePeerDependencies: - - supports-color - dev: false - file:projects/server-ws.tgz: resolution: {integrity: sha512-MSFFpLjIMFt0oyH4+8JUkNOkCNtdEtMDoxcyN7+kDdz44wSZjSOmheJHYkXO6JTEffcaaRhQ9vO/e7MBNMeoxQ==, tarball: file:projects/server-ws.tgz} name: '@rush-temp/server-ws' @@ -12520,7 +12361,7 @@ packages: dev: false file:projects/server.tgz: - resolution: {integrity: sha512-KX5c6GAIbdrpb9vSiwP/vGovTeHgbcjvlpKZUCmN7/iqGz3S5vSxySnO8wsqJm8fEurl8CAzmcKp73LvHPmSzQ==, tarball: file:projects/server.tgz} + resolution: {integrity: sha512-9Uipi7DSygrXn0tNjJFnjCs8ws9vhKCQVhJFRp5lepIsnllFvSdDR82RPLMtC/i1qv0cWcrpJgbxpmEKC/g3vQ==, tarball: file:projects/server.tgz} name: '@rush-temp/server' version: 0.0.0 dependencies: @@ -12746,18 +12587,21 @@ packages: dev: false file:projects/text-editor.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-OBujLdRRRcxyC4njqH6zdYg1Khldx5p+qDYXqF4JkJluba912bFawWZMrQEwVrnv+Vu+hQrsFHG4Smi5ZHi2gw==, tarball: file:projects/text-editor.tgz} + resolution: {integrity: sha512-vX6gE0smseJFY0FJ/cVNfMxcVDf7mHwXgzubjhhgjNDbSkhaAQUenK153uzBgYN+mRJZNhp1X8traE7nkz/MYg==, tarball: file:projects/text-editor.tgz} id: file:projects/text-editor.tgz name: '@rush-temp/text-editor' version: 0.0.0 dependencies: - '@tiptap/core': 2.0.0-beta.158 - '@tiptap/extension-highlight': 2.0.0-beta.31_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-link': 2.0.0-beta.33_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-mention': 2.0.0-beta.90_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-placeholder': 2.0.0-beta.45_@tiptap+core@2.0.0-beta.158 - '@tiptap/extension-typography': 2.0.0-beta.19_@tiptap+core@2.0.0-beta.158 - '@tiptap/starter-kit': 2.0.0-beta.163 + '@tiptap/core': 2.0.0-beta.163 + '@tiptap/extension-highlight': 2.0.0-beta.32_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-link': 2.0.0-beta.35_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-mention': 2.0.0-beta.92_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-placeholder': 2.0.0-beta.46_@tiptap+core@2.0.0-beta.163 + '@tiptap/extension-typography': 2.0.0-beta.19_@tiptap+core@2.0.0-beta.163 + '@tiptap/starter-kit': 2.0.0-beta.171 + '@tiptap/suggestion': 2.0.0-beta.87_@tiptap+core@2.0.0-beta.163 + '@types/prosemirror-model': 1.16.0 + '@types/prosemirror-state': 1.2.8 '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 eslint: 7.32.0 @@ -12768,6 +12612,8 @@ packages: eslint-plugin-svelte3: 3.2.1_eslint@7.32.0+svelte@3.44.3 prettier: 2.5.1 prettier-plugin-svelte: 2.5.1_prettier@2.5.1+svelte@3.44.3 + prosemirror-model: 1.16.1 + prosemirror-state: 1.3.4 sass: 1.45.0 svelte: 3.44.3 svelte-check: 2.2.11_4374c622c67ed7479ff0e44c29d09bce @@ -12823,7 +12669,7 @@ packages: dev: false file:projects/tool.tgz: - resolution: {integrity: sha512-qHMgirlUUHe5dhM4Ebp1jCkPR759Wec5zhDTLNt4y0eKhQIVeshkraGGp0mGdUmvIDN+e+CbJMCXDXY35r0BqQ==, tarball: file:projects/tool.tgz} + resolution: {integrity: sha512-UTtMmhy2JCwkDOHG2WLvbiU1QU4Jo9wXRIwpZZtgEkHvyGE3hDzrLNkItaxYI4QzeJIIg1/OZzaFRz24+1o1rg==, tarball: file:projects/tool.tgz} name: '@rush-temp/tool' version: 0.0.0 dependencies: diff --git a/dev/prod/package.json b/dev/prod/package.json index 19fc17cc26..7ef2ea2f94 100644 --- a/dev/prod/package.json +++ b/dev/prod/package.json @@ -65,12 +65,8 @@ "@anticrm/setting": "~0.6.0", "@anticrm/setting-assets": "~0.6.0", "@anticrm/setting-resources": "~0.6.0", - "@anticrm/server-chunter": "~0.6.1", - "@anticrm/dev-server-chunter-resources": "~0.6.0", "@anticrm/client-resources": "~0.6.4", "@anticrm/contact-assets": "~0.6.0", - "@anticrm/server-recruit": "~0.6.1", - "@anticrm/server-recruit-resources": "~0.6.0", "@anticrm/activity": "~0.6.0", "@anticrm/activity-assets": "~0.6.0", "@anticrm/activity-resources": "~0.6.0", diff --git a/dev/prod/src/platform-dev.ts b/dev/prod/src/platform-dev.ts index bb5e1671ce..015ce84c21 100644 --- a/dev/prod/src/platform-dev.ts +++ b/dev/prod/src/platform-dev.ts @@ -17,8 +17,6 @@ import { addLocation } from '@anticrm/platform' import login from '@anticrm/login' import { clientId } from '@anticrm/client' -import { serverChunterId } from '@anticrm/server-chunter' -import { serverRecruitId } from '@anticrm/server-recruit' import { setMetadata } from '@anticrm/platform' @@ -30,8 +28,6 @@ export function configurePlatformDev() { setMetadata(login.metadata.OverrideEndpoint, process.env.LOGIN_ENDPOINT_DEV) console.log('Use DEV server') addLocation(clientId, () => import(/* webpackChunkName: "client-dev" */ '@anticrm/dev-client-resources')) - addLocation(serverChunterId, () => import(/* webpackChunkName: "server-chunter" */ '@anticrm/dev-server-chunter-resources')) - addLocation(serverRecruitId, () => import(/* webpackChunkName: "server-recruit" */ '@anticrm/server-recruit-resources')) // Set devmodel to hook client to be able to present all activity enableDevModel() diff --git a/dev/server-chunter-resources/.eslintrc.js b/dev/server-chunter-resources/.eslintrc.js deleted file mode 100644 index 5da5872d4a..0000000000 --- a/dev/server-chunter-resources/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - extends: ['./node_modules/@anticrm/platform-rig/profiles/default/config/eslint.config.json'], - parserOptions: { - tsconfigRootDir: __dirname, - project: './tsconfig.json' - } -} diff --git a/dev/server-chunter-resources/.npmignore b/dev/server-chunter-resources/.npmignore deleted file mode 100644 index e3ec093c38..0000000000 --- a/dev/server-chunter-resources/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!/lib/** -!CHANGELOG.md -/lib/**/__tests__/ diff --git a/dev/server-chunter-resources/CHANGELOG.json b/dev/server-chunter-resources/CHANGELOG.json deleted file mode 100644 index 2bc047a17a..0000000000 --- a/dev/server-chunter-resources/CHANGELOG.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@anticrm/dev-server-chunter-resources", - "entries": [ - { - "version": "0.6.3", - "tag": "@anticrm/dev-server-chunter-resources_v0.6.3", - "date": "Sun, 08 Aug 2021 10:14:57 GMT", - "comments": { - "dependency": [ - { - "comment": "Updating dependency \"@anticrm/platform\" from `~0.6.3` to `~0.6.4`" - } - ] - } - } - ] -} diff --git a/dev/server-chunter-resources/CHANGELOG.md b/dev/server-chunter-resources/CHANGELOG.md deleted file mode 100644 index 52f34058e4..0000000000 --- a/dev/server-chunter-resources/CHANGELOG.md +++ /dev/null @@ -1,9 +0,0 @@ -# Change Log - @anticrm/dev-server-chunter-resources - -This log was last generated on Sun, 08 Aug 2021 10:14:57 GMT and should not be manually modified. - -## 0.6.3 -Sun, 08 Aug 2021 10:14:57 GMT - -_Initial release_ - diff --git a/dev/server-chunter-resources/config/rig.json b/dev/server-chunter-resources/config/rig.json deleted file mode 100644 index af1257a896..0000000000 --- a/dev/server-chunter-resources/config/rig.json +++ /dev/null @@ -1,18 +0,0 @@ -// The "rig.json" file directs tools to look for their config files in an external package. -// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package -{ - "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", - - /** - * (Required) The name of the rig package to inherit from. - * It should be an NPM package name with the "-rig" suffix. - */ - "rigPackageName": "@anticrm/platform-rig" - - /** - * (Optional) Selects a config profile from the rig package. The name must consist of - * lowercase alphanumeric words separated by hyphens, for example "sample-profile". - * If omitted, then the "default" profile will be used." - */ - // "rigProfile": "your-profile-name" -} diff --git a/dev/server-chunter-resources/package.json b/dev/server-chunter-resources/package.json deleted file mode 100644 index cfdb341909..0000000000 --- a/dev/server-chunter-resources/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "@anticrm/dev-server-chunter-resources", - "version": "0.6.3", - "main": "lib/index.js", - "author": "Anticrm Platform Contributors", - "license": "EPL-2.0", - "scripts": { - "build": "heft build", - "build:watch": "tsc", - "lint:fix": "eslint --fix src", - "lint": "eslint src", - "format": "prettier --write src && eslint --fix src" - }, - "devDependencies": { - "@anticrm/platform-rig": "~0.6.0", - "@types/heft-jest": "^1.0.2", - "@typescript-eslint/eslint-plugin": "^5.4.0", - "eslint-plugin-import": "^2.25.3", - "eslint-plugin-promise": "^5.1.1", - "eslint-plugin-node": "^11.1.0", - "eslint": "^7.32.0", - "@typescript-eslint/parser": "^5.4.0", - "eslint-config-standard-with-typescript": "^21.0.1", - "prettier": "^2.4.1", - "@rushstack/heft": "^0.41.1", - "typescript": "^4.3.5" - }, - "dependencies": { - "@anticrm/core": "~0.6.11", - "@anticrm/platform": "~0.6.5", - "@anticrm/server-core": "~0.6.0", - "@anticrm/server-chunter": "~0.6.1", - "@anticrm/chunter": "~0.6.0" - } -} diff --git a/dev/server-chunter-resources/src/index.ts b/dev/server-chunter-resources/src/index.ts deleted file mode 100644 index f6571bc266..0000000000 --- a/dev/server-chunter-resources/src/index.ts +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright © 2020, 2021 Anticrm Platform Contributors. -// Copyright © 2021 Hardcore Engineering Inc. -// -// Licensed under the Eclipse Public License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. You may -// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import type { Tx, TxCreateDoc, Data, Ref, Doc, TxFactory, Class } from '@anticrm/core' -import type { FindAll } from '@anticrm/server-core' -import type { Message, Backlink } from '@anticrm/chunter' - -import core from '@anticrm/core' -import chunter from '@anticrm/chunter' - -function extractBacklinks (backlinkId: Ref, message: string, kids: NodeListOf): Data[] { - const result: Data[] = [] - for (const kid of kids) { - if (kid.nodeName === 'span') { - result.push({ - attachedTo: kid.getAttribute('data-id') as Ref, - attachedToClass: kid.getAttribute('data-class') as Ref>, - collection: kid.getAttribute('data-collection') ?? '', - backlinkId, - backlinkClass: chunter.class.Message, - message - }) - } - result.push(...extractBacklinks(backlinkId, message, kid.childNodes as NodeListOf)) - } - return result -} - -function getBacklinks (backlinkId: Ref, content: string): Data[] { - const parser = new DOMParser() - const doc = parser.parseFromString(content, 'application/xhtml+xml') - return extractBacklinks(backlinkId, content, doc.childNodes as NodeListOf) -} - -/** - * @public - */ -export async function OnMessage (tx: Tx, txFactory: TxFactory): Promise { - if (tx._class === core.class.TxCreateDoc) { - const createTx = tx as TxCreateDoc - if (createTx.objectClass === chunter.class.Message) { - const content = createTx.attributes.content - const backlinks = getBacklinks(createTx.objectId, content) - return backlinks.map(backlink => txFactory.createTxCreateDoc(chunter.class.Backlink, chunter.space.Backlinks, backlink)) - } - } - return [] -} - -// interface WithAttachements extends Doc { -// attachments: number -// } - -/** - * @public - */ -export async function OnAttachment (tx: Tx, txFactory: TxFactory, findAll: FindAll): Promise { - // if (tx._class === core.class.TxAddCollection) { - // const createTx = tx as TxAddCollection - // if (createTx.objectClass === chunter.class.Attachment) { - // const _id = createTx.attachedTo as Ref - // const _class = createTx.attachedToClass as Ref> - // const attachedTo = (await findAll(_class, { _id }))[0] - // return [txFactory.createTxUpdateDoc(_class, attachedTo.space, _id, { $inc: { attachments: 1 } })] - // } - // } - return [] -} - -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export default async () => ({ - trigger: { - OnMessage, - OnAttachment - } -}) diff --git a/dev/server-chunter-resources/tsconfig.json b/dev/server-chunter-resources/tsconfig.json deleted file mode 100644 index aeb0517b13..0000000000 --- a/dev/server-chunter-resources/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json", - - "compilerOptions": { - "rootDir": "./src", - "outDir": "./lib" - } -} \ No newline at end of file diff --git a/dev/server/package.json b/dev/server/package.json index f25ec22cee..9f1fc26ffc 100644 --- a/dev/server/package.json +++ b/dev/server/package.json @@ -33,8 +33,6 @@ "@anticrm/core": "~0.6.11", "@anticrm/platform": "~0.6.5", "jwt-simple": "~0.5.6", - "@anticrm/server-chunter": "~0.6.1", - "@anticrm/server-chunter-resources": "~0.6.0", "@anticrm/server-core": "~0.6.1" } } diff --git a/dev/server/src/server.ts b/dev/server/src/server.ts index b62991eaa4..134089b390 100644 --- a/dev/server/src/server.ts +++ b/dev/server/src/server.ts @@ -14,15 +14,12 @@ // limitations under the License. // +import type { Doc, Ref, TxResult } from '@anticrm/core' import { DOMAIN_TX, MeasureMetricsContext } from '@anticrm/core' -import type { Ref, Doc, TxResult } from '@anticrm/core' -import { start as startJsonRpc } from '@anticrm/server-ws' import { createInMemoryAdapter, createInMemoryTxAdapter } from '@anticrm/dev-storage' -import { createServerStorage, FullTextAdapter, IndexedDoc } from '@anticrm/server-core' import type { DbConfiguration } from '@anticrm/server-core' - -import { addLocation } from '@anticrm/platform' -import { serverChunterId } from '@anticrm/server-chunter' +import { createServerStorage, FullTextAdapter, IndexedDoc } from '@anticrm/server-core' +import { start as startJsonRpc } from '@anticrm/server-ws' class NullFullTextAdapter implements FullTextAdapter { async index (doc: IndexedDoc): Promise { @@ -52,8 +49,6 @@ async function createNullFullTextAdapter (): Promise { * @public */ export async function start (port: number, host?: string): Promise { - addLocation(serverChunterId, () => import('@anticrm/server-chunter-resources')) - startJsonRpc(new MeasureMetricsContext('server', {}), () => { const conf: DbConfiguration = { domains: { diff --git a/dev/tool/package.json b/dev/tool/package.json index 8d9f5c9b17..97f8f57176 100644 --- a/dev/tool/package.json +++ b/dev/tool/package.json @@ -61,10 +61,6 @@ "@anticrm/model-attachment": "~0.6.0", "@anticrm/mongo": "~0.6.0", "@anticrm/dev-storage": "~0.6.0", - "@anticrm/server-chunter": "~0.6.1", - "@anticrm/server-chunter-resources": "~0.6.0", - "@anticrm/server-recruit": "~0.6.0", - "@anticrm/server-recruit-resources": "~0.6.0", "xml2js": "~0.4.23", "@anticrm/model-recruit": "~0.6.0", "@anticrm/recruit": "~0.6.2", diff --git a/dev/tool/src/elastic.ts b/dev/tool/src/elastic.ts index f459d16bed..4d476dc0da 100644 --- a/dev/tool/src/elastic.ts +++ b/dev/tool/src/elastic.ts @@ -39,8 +39,6 @@ import core, { import { createElasticAdapter } from '@anticrm/elastic' import { DOMAIN_ATTACHMENT } from '@anticrm/model-attachment' import { createMongoAdapter, createMongoTxAdapter } from '@anticrm/mongo' -import { addLocation } from '@anticrm/platform' -import { serverChunterId } from '@anticrm/server-chunter' import { createServerStorage, DbAdapter, @@ -49,7 +47,6 @@ import { IndexedDoc, TxAdapter } from '@anticrm/server-core' -import { serverRecruitId } from '@anticrm/server-recruit' import { Client as ElasticClient } from '@elastic/elasticsearch' import { Client } from 'minio' import { Db, MongoClient } from 'mongodb' @@ -102,8 +99,6 @@ export class ElasticTool { storage!: ServerStorage db!: Db constructor (readonly mongoUrl: string, readonly dbName: string, readonly minio: Client, readonly elasticUrl: string) { - addLocation(serverChunterId, () => import('@anticrm/server-chunter-resources')) - addLocation(serverRecruitId, () => import('@anticrm/server-recruit-resources')) this.mongoClient = new MongoClient(mongoUrl) } @@ -171,8 +166,7 @@ async function restoreElastic (mongoUrl: string, dbName: string, minio: Client, const tool = new ElasticTool(mongoUrl, dbName, minio, elasticUrl) const done = await tool.connect() try { - const txes = (await tool.db.collection(DOMAIN_TX).find().toArray()) - const data = txes.filter((tx) => tx.objectSpace !== core.space.Model) + const data = (await tool.db.collection(DOMAIN_TX).find().toArray()) const m = newMetrics() const metricsCtx = new MeasureMetricsContext('elastic', {}, m) console.log('replay elastic transactions', data.length) diff --git a/models/all/package.json b/models/all/package.json index e0ff9b7e05..6077949274 100644 --- a/models/all/package.json +++ b/models/all/package.json @@ -41,8 +41,6 @@ "@anticrm/model-telegram": "~0.6.0", "@anticrm/model-demo": "~0.6.0", "@anticrm/model-server-core": "~0.6.0", - "@anticrm/model-server-chunter": "~0.6.0", - "@anticrm/model-server-recruit": "~0.6.0", "@anticrm/model-activity": "~0.6.0", "@anticrm/model-attachment": "~0.6.0", "@anticrm/model-gmail": "~0.6.0", diff --git a/models/all/src/index.ts b/models/all/src/index.ts index 43714c3c3d..10f45faea0 100644 --- a/models/all/src/index.ts +++ b/models/all/src/index.ts @@ -30,8 +30,6 @@ import { createModel as gmailModel } from '@anticrm/model-gmail' import { createModel as inventoryModel } from '@anticrm/model-inventory' import { createModel as serverCoreModel } from '@anticrm/model-server-core' -import { createModel as serverChunterModel } from '@anticrm/model-server-chunter' -import { createModel as serverRecruitModel } from '@anticrm/model-server-recruit' import { createModel as activityModel } from '@anticrm/model-activity' import { createDemo } from '@anticrm/model-demo' @@ -54,8 +52,6 @@ gmailModel(builder) inventoryModel(builder) serverCoreModel(builder) -serverChunterModel(builder) -serverRecruitModel(builder) createDemo(builder) diff --git a/models/chunter/src/index.ts b/models/chunter/src/index.ts index cb921fae42..2408628b33 100644 --- a/models/chunter/src/index.ts +++ b/models/chunter/src/index.ts @@ -13,17 +13,16 @@ // limitations under the License. // -import type { IntlString } from '@anticrm/platform' -import { Builder, Model, Prop, UX, TypeString, Index } from '@anticrm/model' -import type { Ref, Doc, Class, Domain } from '@anticrm/core' -import { IndexKind } from '@anticrm/core' -import core, { TSpace, TDoc, TAttachedDoc } from '@anticrm/model-core' -import type { Backlink, Channel, Message, Comment } from '@anticrm/chunter' import activity from '@anticrm/activity' - -import workbench from '@anticrm/model-workbench' - +import type { Backlink, Channel, Comment, Message } from '@anticrm/chunter' +import type { Class, Doc, Domain, Ref } from '@anticrm/core' +import { IndexKind } from '@anticrm/core' +import { Builder, Index, Model, Prop, TypeString, UX } from '@anticrm/model' +import core, { TAttachedDoc, TDoc, TSpace } from '@anticrm/model-core' import view from '@anticrm/model-view' +import workbench from '@anticrm/model-workbench' +import type { IntlString } from '@anticrm/platform' +import { ObjectDDParticipant } from '@anticrm/view' import chunter from './plugin' export const DOMAIN_CHUNTER = 'chunter' as Domain @@ -49,6 +48,7 @@ export class TComment extends TAttachedDoc implements Comment { } @Model(chunter.class.Backlink, chunter.class.Comment) +@UX('Reference' as IntlString, chunter.icon.Chunter) export class TBacklink extends TComment implements Backlink { backlinkId!: Ref backlinkClass!: Ref> @@ -62,6 +62,10 @@ export function createModel (builder: Builder): void { } }) + builder.mixin(chunter.class.Channel, core.class.Class, view.mixin.AttributePresenter, { + presenter: chunter.component.ChannelPresenter + }) + builder.createDoc(view.class.ViewletDescriptor, core.space.Model, { label: 'Chat' as IntlString, icon: view.icon.Table, @@ -108,6 +112,10 @@ export function createModel (builder: Builder): void { presenter: chunter.component.CommentPresenter }) + builder.mixin, ObjectDDParticipant>(chunter.class.Comment, core.class.Class, view.mixin.ObjectDDParticipant, { + collectDocs: chunter.action.CommentRemove + }) + builder.createDoc(activity.class.TxViewlet, core.space.Model, { objectClass: chunter.class.Comment, icon: chunter.icon.Chunter, @@ -127,6 +135,27 @@ export function createModel (builder: Builder): void { display: 'inline', hideOnRemove: true }, chunter.ids.TxCommentRemove) + + builder.createDoc(activity.class.TxViewlet, core.space.Model, { + objectClass: chunter.class.Backlink, + icon: chunter.icon.Chunter, + txClass: core.class.TxCreateDoc, + component: chunter.activity.TxBacklinkCreate, + label: chunter.string.MentionedIn, + labelComponent: chunter.activity.TxBacklinkReference, + display: 'content', + editable: false, + hideOnRemove: true + }, chunter.ids.TxCommentCreate) + + // We need to define this one, to hide default attached object removed case + builder.createDoc(activity.class.TxViewlet, core.space.Model, { + objectClass: chunter.class.Backlink, + icon: chunter.icon.Chunter, + txClass: core.class.TxRemoveDoc, + display: 'inline', + hideOnRemove: true + }, chunter.ids.TxBacklinkRemove) } export default chunter diff --git a/models/chunter/src/plugin.ts b/models/chunter/src/plugin.ts index 7e6ebc4025..af02b28c25 100644 --- a/models/chunter/src/plugin.ts +++ b/models/chunter/src/plugin.ts @@ -13,38 +13,44 @@ // limitations under the License. // +import type { TxViewlet } from '@anticrm/activity' import { Channel, chunterId } from '@anticrm/chunter' import chunter from '@anticrm/chunter-resources/src/plugin' -import type { IntlString } from '@anticrm/platform' +import type { Doc, Ref, TxOperations } from '@anticrm/core' +import type { IntlString, Resource } from '@anticrm/platform' import { mergeIds } from '@anticrm/platform' -import type { Ref } from '@anticrm/core' -import type { ViewletDescriptor } from '@anticrm/view' import type { AnyComponent } from '@anticrm/ui' -import type { TxViewlet } from '@anticrm/activity' -import { Application } from '@anticrm/workbench' +import type { ViewletDescriptor } from '@anticrm/view' export default mergeIds(chunterId, chunter, { component: { CommentsPresenter: '' as AnyComponent, - CommentPresenter: '' as AnyComponent + CommentPresenter: '' as AnyComponent, + ChannelPresenter: '' as AnyComponent }, string: { ApplicationLabelChunter: '' as IntlString, - LeftComment: '' as IntlString + LeftComment: '' as IntlString, + MentionedIn: '' as IntlString }, viewlet: { Chat: '' as Ref }, ids: { TxCommentCreate: '' as Ref, - TxCommentRemove: '' as Ref + TxCommentRemove: '' as Ref, + TxBacklinkRemove: '' as Ref }, activity: { - TxCommentCreate: '' as AnyComponent + TxCommentCreate: '' as AnyComponent, + TxBacklinkCreate: '' as AnyComponent, + TxBacklinkReference: '' as AnyComponent }, space: { General: '' as Ref, Random: '' as Ref }, - app: { Chunter: '' as Ref } + action: { + CommentRemove: '' as Resource<(doc: Doc, client: TxOperations) => Promise> + } }) diff --git a/models/core/src/core.ts b/models/core/src/core.ts index bdae243d8a..f8025bcd62 100644 --- a/models/core/src/core.ts +++ b/models/core/src/core.ts @@ -89,7 +89,7 @@ export class TInterface extends TDoc implements Interface { extends?: Ref>[] } -@Model(core.class.Attribute, core.class.Doc) +@Model(core.class.Attribute, core.class.Doc, DOMAIN_MODEL) export class TAttribute extends TDoc implements AnyAttribute { attributeOf!: Ref> name!: string diff --git a/models/server-chunter/.eslintrc.js b/models/server-chunter/.eslintrc.js deleted file mode 100644 index c3c2c49417..0000000000 --- a/models/server-chunter/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - extends: ['./node_modules/@anticrm/model-rig/profiles/default/config/eslint.config.json'], - parserOptions: { - tsconfigRootDir: __dirname, - project: './tsconfig.json' - } -} diff --git a/models/server-chunter/.npmignore b/models/server-chunter/.npmignore deleted file mode 100644 index e3ec093c38..0000000000 --- a/models/server-chunter/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!/lib/** -!CHANGELOG.md -/lib/**/__tests__/ diff --git a/models/server-chunter/CHANGELOG.json b/models/server-chunter/CHANGELOG.json deleted file mode 100644 index be87cc1674..0000000000 --- a/models/server-chunter/CHANGELOG.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@anticrm/model-server-chunter", - "entries": [ - { - "version": "0.6.0", - "tag": "@anticrm/model-server-chunter_v0.6.0", - "date": "Sun, 08 Aug 2021 10:14:57 GMT", - "comments": { - "dependency": [ - { - "comment": "Updating dependency \"@anticrm/platform\" from `~0.6.3` to `~0.6.4`" - } - ] - } - } - ] -} diff --git a/models/server-chunter/CHANGELOG.md b/models/server-chunter/CHANGELOG.md deleted file mode 100644 index 1a889880d3..0000000000 --- a/models/server-chunter/CHANGELOG.md +++ /dev/null @@ -1,9 +0,0 @@ -# Change Log - @anticrm/model-server-chunter - -This log was last generated on Sun, 08 Aug 2021 10:14:57 GMT and should not be manually modified. - -## 0.6.0 -Sun, 08 Aug 2021 10:14:57 GMT - -_Initial release_ - diff --git a/models/server-chunter/config/rig.json b/models/server-chunter/config/rig.json deleted file mode 100644 index e9a9ee9add..0000000000 --- a/models/server-chunter/config/rig.json +++ /dev/null @@ -1,18 +0,0 @@ -// The "rig.json" file directs tools to look for their config files in an external package. -// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package -{ - "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", - - /** - * (Required) The name of the rig package to inherit from. - * It should be an NPM package name with the "-rig" suffix. - */ - "rigPackageName": "@anticrm/model-rig" - - /** - * (Optional) Selects a config profile from the rig package. The name must consist of - * lowercase alphanumeric words separated by hyphens, for example "sample-profile". - * If omitted, then the "default" profile will be used." - */ - // "rigProfile": "your-profile-name" -} diff --git a/models/server-chunter/package.json b/models/server-chunter/package.json deleted file mode 100644 index 295f457cad..0000000000 --- a/models/server-chunter/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@anticrm/model-server-chunter", - "version": "0.6.0", - "main": "lib/index.js", - "author": "Anticrm Platform Contributors", - "license": "EPL-2.0", - "scripts": { - "build": "heft build", - "build:watch": "tsc", - "lint:fix": "eslint --fix src", - "lint": "eslint src", - "format": "prettier --write src && eslint --fix src" - }, - "devDependencies": { - "@anticrm/model-rig": "~0.6.0", - "@typescript-eslint/eslint-plugin": "^5.4.0", - "eslint-plugin-import": "^2.25.3", - "eslint-plugin-promise": "^5.1.1", - "eslint-plugin-node": "^11.1.0", - "eslint": "^7.32.0", - "@types/heft-jest": "^1.0.2", - "@typescript-eslint/parser": "^5.4.0", - "eslint-config-standard-with-typescript": "^21.0.1", - "prettier": "^2.4.1", - "@rushstack/heft": "^0.41.1" - }, - "dependencies": { - "@anticrm/core": "~0.6.11", - "@anticrm/model": "~0.6.0", - "@anticrm/platform": "~0.6.5", - "@anticrm/server-chunter": "~0.6.1", - "@anticrm/server-core": "~0.6.0" - } -} diff --git a/models/server-chunter/src/index.ts b/models/server-chunter/src/index.ts deleted file mode 100644 index 29f4455b70..0000000000 --- a/models/server-chunter/src/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright © 2020, 2021 Anticrm Platform Contributors. -// Copyright © 2021 Hardcore Engineering Inc. -// -// Licensed under the Eclipse Public License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. You may -// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import { Builder } from '@anticrm/model' - -import serverCore from '@anticrm/server-core' -import core from '@anticrm/core' -import serverChunter from '@anticrm/server-chunter' - -export function createModel (builder: Builder): void { - builder.createDoc(serverCore.class.Trigger, core.space.Model, { - trigger: serverChunter.trigger.OnMessage - }) - builder.createDoc(serverCore.class.Trigger, core.space.Model, { - trigger: serverChunter.trigger.OnAttachment - }) -} diff --git a/models/server-chunter/tsconfig.json b/models/server-chunter/tsconfig.json deleted file mode 100644 index 1d60db76b4..0000000000 --- a/models/server-chunter/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./node_modules/@anticrm/model-rig/profiles/default/tsconfig.json", - - "compilerOptions": { - "rootDir": "./src", - "outDir": "./lib", - } -} \ No newline at end of file diff --git a/models/server-recruit/.eslintrc.js b/models/server-recruit/.eslintrc.js deleted file mode 100644 index c3c2c49417..0000000000 --- a/models/server-recruit/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - extends: ['./node_modules/@anticrm/model-rig/profiles/default/config/eslint.config.json'], - parserOptions: { - tsconfigRootDir: __dirname, - project: './tsconfig.json' - } -} diff --git a/models/server-recruit/.npmignore b/models/server-recruit/.npmignore deleted file mode 100644 index e3ec093c38..0000000000 --- a/models/server-recruit/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!/lib/** -!CHANGELOG.md -/lib/**/__tests__/ diff --git a/models/server-recruit/config/rig.json b/models/server-recruit/config/rig.json deleted file mode 100644 index e9a9ee9add..0000000000 --- a/models/server-recruit/config/rig.json +++ /dev/null @@ -1,18 +0,0 @@ -// The "rig.json" file directs tools to look for their config files in an external package. -// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package -{ - "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", - - /** - * (Required) The name of the rig package to inherit from. - * It should be an NPM package name with the "-rig" suffix. - */ - "rigPackageName": "@anticrm/model-rig" - - /** - * (Optional) Selects a config profile from the rig package. The name must consist of - * lowercase alphanumeric words separated by hyphens, for example "sample-profile". - * If omitted, then the "default" profile will be used." - */ - // "rigProfile": "your-profile-name" -} diff --git a/models/server-recruit/package.json b/models/server-recruit/package.json deleted file mode 100644 index ac037bae87..0000000000 --- a/models/server-recruit/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@anticrm/model-server-recruit", - "version": "0.6.0", - "main": "lib/index.js", - "author": "Anticrm Platform Contributors", - "license": "EPL-2.0", - "scripts": { - "build": "heft build", - "build:watch": "tsc", - "lint:fix": "eslint --fix src", - "lint": "eslint src", - "format": "prettier --write src && eslint --fix src" - }, - "devDependencies": { - "@anticrm/model-rig": "~0.6.0", - "@typescript-eslint/eslint-plugin": "^5.4.0", - "eslint-plugin-import": "^2.25.3", - "eslint-plugin-promise": "^5.1.1", - "eslint-plugin-node": "^11.1.0", - "eslint": "^7.32.0", - "@types/heft-jest": "^1.0.2", - "@typescript-eslint/parser": "^5.4.0", - "eslint-config-standard-with-typescript": "^21.0.1", - "prettier": "^2.4.1", - "@rushstack/heft": "^0.41.1" - }, - "dependencies": { - "@anticrm/core": "~0.6.11", - "@anticrm/model": "~0.6.0", - "@anticrm/platform": "~0.6.5", - "@anticrm/server-recruit": "~0.6.0", - "@anticrm/server-core": "~0.6.0" - } -} diff --git a/models/server-recruit/src/index.ts b/models/server-recruit/src/index.ts deleted file mode 100644 index 0496ea9d44..0000000000 --- a/models/server-recruit/src/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright © 2020, 2021 Anticrm Platform Contributors. -// Copyright © 2021 Hardcore Engineering Inc. -// -// Licensed under the Eclipse Public License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. You may -// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import { Builder } from '@anticrm/model' - -import serverCore from '@anticrm/server-core' -import core from '@anticrm/core' -import serverRecruit from '@anticrm/server-recruit' - -export function createModel (builder: Builder): void { - builder.createDoc(serverCore.class.Trigger, core.space.Model, { - trigger: serverRecruit.trigger.OnApplication - }) -} diff --git a/models/server-recruit/tsconfig.json b/models/server-recruit/tsconfig.json deleted file mode 100644 index 1d60db76b4..0000000000 --- a/models/server-recruit/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./node_modules/@anticrm/model-rig/profiles/default/tsconfig.json", - - "compilerOptions": { - "rootDir": "./src", - "outDir": "./lib", - } -} \ No newline at end of file diff --git a/models/task/src/migration.ts b/models/task/src/migration.ts index 07da98e3a9..cac689fbad 100644 --- a/models/task/src/migration.ts +++ b/models/task/src/migration.ts @@ -118,6 +118,9 @@ export const taskOperation: MigrateOperation = { collection: doc[0].attributes.collection }) } + await client.update(DOMAIN_KANBAN, { _class: task.class.Sequence, attachedTo: task.class.Task }, { + attachedTo: task.class.Issue + }) }, async upgrade (client: MigrationUpgradeClient): Promise { console.log('Task: Performing model upgrades') diff --git a/models/view/src/index.ts b/models/view/src/index.ts index 6530985b1c..db9c71a998 100644 --- a/models/view/src/index.ts +++ b/models/view/src/index.ts @@ -24,6 +24,7 @@ import type { ActionTarget, AttributeEditor, AttributePresenter, + ObjectDDParticipant, ObjectEditor, ObjectEditorHeader, ObjectFactory, @@ -62,6 +63,10 @@ export class TObjectValidator extends TClass implements ObjectValidator { export class TObjectFactory extends TClass implements ObjectFactory { component!: AnyComponent } +@Mixin(view.mixin.ObjectDDParticipant, core.class.Class) +export class TObjectDDParticipant extends TClass implements ObjectDDParticipant { + collectDocs!: Resource<(doc: Doc) => Promise> +} @Model(view.class.ViewletDescriptor, core.class.Doc, DOMAIN_MODEL) export class TViewletDescriptor extends TDoc implements ViewletDescriptor { @@ -101,7 +106,8 @@ export function createModel (builder: Builder): void { TActionTarget, TObjectValidator, TObjectFactory, - TObjectEditorHeader + TObjectEditorHeader, + TObjectDDParticipant ) builder.mixin(core.class.TypeString, core.class.Class, view.mixin.AttributeEditor, { diff --git a/packages/core/src/operations.ts b/packages/core/src/operations.ts index be6fd40038..03cc2551d4 100644 --- a/packages/core/src/operations.ts +++ b/packages/core/src/operations.ts @@ -62,7 +62,7 @@ export class TxOperations implements Omit { collection: string, attributes: AttachedData

, id?: Ref

- ): Promise> { + ): Promise> { const tx = this.txFactory.createTxCollectionCUD( attachedToClass, attachedTo, @@ -71,7 +71,7 @@ export class TxOperations implements Omit { this.txFactory.createTxCreateDoc

(_class, space, attributes as unknown as Data

, id) ) await this.client.tx(tx) - return tx.objectId + return tx.tx.objectId as unknown as Ref

} async updateCollection( diff --git a/packages/presentation/src/components/message/Nodes.svelte b/packages/presentation/src/components/message/Nodes.svelte index e052600fdf..1ca3e8bd7b 100644 --- a/packages/presentation/src/components/message/Nodes.svelte +++ b/packages/presentation/src/components/message/Nodes.svelte @@ -15,9 +15,10 @@ --> {#if nodes} @@ -62,7 +63,7 @@ {:else if node.nodeName === 'A'} {:else if node.nodeName === 'SPAN'} - + {:else} Unknown { node.nodeName } {/if} diff --git a/packages/text-editor/package.json b/packages/text-editor/package.json index 9617bccbff..8ab4638038 100644 --- a/packages/text-editor/package.json +++ b/packages/text-editor/package.json @@ -27,7 +27,8 @@ "eslint": "^7.32.0", "prettier": "^2.4.1", "svelte-check": "^2.2.10", - "typescript": "^4.3.5" + "typescript": "^4.3.5", + "@types/prosemirror-model": "~1.16.0" }, "dependencies": { "svelte": "^3.37.0", @@ -41,6 +42,8 @@ "@tiptap/extension-placeholder": "~2.0.0-beta.26", "@tiptap/extension-mention": "~2.0.0-beta.63", "@tiptap/extension-typography": "~2.0.0-beta.13", - "@tiptap/extension-link": "~2.0.0-beta.33" + "@tiptap/extension-link": "~2.0.0-beta.33", + "@tiptap/suggestion": "~2.0.0-beta.85", + "prosemirror-model": "~1.16.1" } } diff --git a/packages/text-editor/src/Completion.ts b/packages/text-editor/src/Completion.ts new file mode 100644 index 0000000000..4407b12f33 --- /dev/null +++ b/packages/text-editor/src/Completion.ts @@ -0,0 +1,185 @@ +import { Node, mergeAttributes } from '@tiptap/core' +import { Node as ProseMirrorNode } from 'prosemirror-model' +// import { PluginKey } from 'prosemirror-state' +import Suggestion, { SuggestionOptions } from '@tiptap/suggestion' + +export interface CompletionOptions { + HTMLAttributes: Record + renderLabel: (props: { + options: CompletionOptions + node: ProseMirrorNode + }) => string + suggestion: Omit +} + +// export const CompletionPluginKey = new PluginKey('completion') + +export const Completion = Node.create({ + name: 'reference', + + addOptions () { + return { + HTMLAttributes: {}, + renderLabel ({ options, node }) { + // eslint-disable-next-line + return `${options.suggestion.char}${node.attrs.label ?? node.attrs.id}` + }, + suggestion: { + char: '@', + // pluginKey: CompletionPluginKey, + command: ({ editor, range, props }) => { + // increase range.to by one when the next node is of type "text" + // and starts with a space character + const nodeAfter = editor.view.state.selection.$to.nodeAfter + const overrideSpace = nodeAfter?.text?.startsWith(' ') + + if (overrideSpace !== undefined && overrideSpace) { + // eslint-disable-next-line + range.to += 1 + } + + editor + .chain() + .focus() + .insertContentAt(range, [ + { + type: this.name, + attrs: props + }, + { + type: 'text', + text: ' ' + } + ]) + .run() + }, + allow: ({ editor, range }) => { + const $from = editor.state.doc.resolve(range.from) + const type = editor.schema.nodes[this.name] + // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions + return !!$from.parent.type.contentMatch.matchType(type) + } + } + } + }, + + group: 'inline', + + inline: true, + + selectable: false, + + atom: true, + + addAttributes () { + return { + id: { + default: null, + parseHTML: element => element.getAttribute('data-id'), + renderHTML: attributes => { + // eslint-disable-next-line + if (!attributes.id) { + return {} + } + + return { + 'data-id': attributes.id + } + } + }, + + label: { + default: null, + parseHTML: element => element.getAttribute('data-label'), + renderHTML: attributes => { + // eslint-disable-next-line + if (!attributes.label) { + return {} + } + + return { + 'data-label': attributes.label + } + } + }, + objectclass: { + default: null, + parseHTML: element => element.getAttribute('data-objectclass'), + renderHTML: attributes => { + // eslint-disable-next-line + if (!attributes.objectclass) { + return {} + } + + return { + 'data-objectclass': attributes.objectclass + } + } + } + } + }, + + parseHTML () { + return [ + { + tag: `span[data-type="${this.name}"]` + } + ] + }, + + renderHTML ({ node, HTMLAttributes }) { + console.log('render HTML', node, HTMLAttributes) + return [ + 'span', + mergeAttributes({ 'data-type': this.name }, this.options.HTMLAttributes, HTMLAttributes), + this.options.renderLabel({ + options: this.options, + node + }) + ] + }, + + renderText ({ node }) { + console.log('render TEXT', node) + return this.options.renderLabel({ + options: this.options, + node + }) + }, + + addKeyboardShortcuts () { + return { + Backspace: () => this.editor.commands.command(({ tr, state }) => { + let isMention = false + const { selection } = state + const { empty, anchor } = selection + + if (!empty) { + return false + } + + state.doc.nodesBetween(anchor - 1, anchor, (node, pos) => { + if (node.type.name === this.name) { + isMention = true + + // eslint-disable-next-line + tr.insertText(this.options.suggestion.char || '', pos, pos + node.nodeSize) + + return false + } + }) + + return isMention + }) + } + }, + + addProseMirrorPlugins () { + return [ + Suggestion({ + editor: this.editor, + ...this.options.suggestion + }) + ] + } +}) diff --git a/packages/text-editor/src/components/MentionList.svelte b/packages/text-editor/src/components/MentionList.svelte index dc009a6581..7f623ebbf3 100644 --- a/packages/text-editor/src/components/MentionList.svelte +++ b/packages/text-editor/src/components/MentionList.svelte @@ -13,74 +13,84 @@ // See the License for the specific language governing permissions and // limitations under the License. --> - +

{ + close() + }} +/>
-
- -
SUGGESTED
+
+
Contacts
{#each items as item, i} -
+
{ + command({ id: item._id, label: formatName(item.name), objectclass: item._class }) + }} + on:focus={() => { + selected = i + }} + on:mouseover={() => { + selected = i + }} + >
{/each} @@ -89,34 +99,42 @@ $: {
\ No newline at end of file + .selected { + background-color: var(--theme-button-bg-focused); + } + + .completion { + position: absolute; + z-index: 2010; + padding: 16px; + background-color: var(--theme-button-bg-hovered); + border: 1px solid var(--theme-bg-accent-hover); + border-radius: 0.75rem; + box-shadow: 0 20px 20px 0 rgba(0, 0, 0, 0.1); + + .caption { + margin: 8px 0; + font-weight: 600; + font-size: 12px; + letter-spacing: 0.5px; + color: var(--theme-content-trans-color); + } + .scroll { + max-height: 200px; + display: grid; + grid-auto-flow: row; + gap: 12px; + height: calc(100% - 71px); + overflow-y: auto; + } + } + diff --git a/packages/text-editor/src/components/SvelteRenderer.ts b/packages/text-editor/src/components/SvelteRenderer.ts index 2727308809..1636bc9b6a 100644 --- a/packages/text-editor/src/components/SvelteRenderer.ts +++ b/packages/text-editor/src/components/SvelteRenderer.ts @@ -1,43 +1,40 @@ // // Copyright © 2020, 2021 Anticrm Platform Contributors. // Copyright © 2021 Hardcore Engineering Inc. -// +// // Licensed under the Eclipse Public License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. You may // obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// +// // See the License for the specific language governing permissions and // limitations under the License. // import { SvelteComponent } from 'svelte' -export class SvelteRenderer { +export class SvelteRenderer { + private readonly component: SvelteComponent - private component: SvelteComponent - - constructor(comp: typeof SvelteComponent, props: any) { + constructor (comp: typeof SvelteComponent, props: any) { const options = { target: document.body, props } this.component = new (comp as any)(options) } - updateProps(props: Record): void { + updateProps (props: Record): void { this.component.$set(props) } - onKeyDown(props: Record): boolean { - if (this.component.onKeyDown) - return this.component.onKeyDown(props.event) + onKeyDown (props: Record): boolean { + if (this.component.onKeyDown !== undefined) { return this.component.onKeyDown(props.event) } return false } - destroy(): void { - if (this.component.done) - this.component.done() + destroy (): void { + if (this.component.done !== undefined) { this.component.done() } this.component.$destroy() } -} \ No newline at end of file +} diff --git a/packages/text-editor/src/components/TextEditor.svelte b/packages/text-editor/src/components/TextEditor.svelte index 5bfb37db1b..12d7864ff6 100644 --- a/packages/text-editor/src/components/TextEditor.svelte +++ b/packages/text-editor/src/components/TextEditor.svelte @@ -21,9 +21,10 @@ import { Editor, Extension } from '@tiptap/core' import StarterKit from '@tiptap/starter-kit' import Highlight from '@tiptap/extension-highlight' import Link from '@tiptap/extension-link' -import Typography from '@tiptap/extension-typography' +// import Typography from '@tiptap/extension-typography' import Placeholder from '@tiptap/extension-placeholder' -import Mention from '@tiptap/extension-mention' +// import Mention from '@tiptap/extension-mention' +import { Completion } from '../Completion' import MentionList from './MentionList.svelte' import { SvelteRenderer } from './SvelteRenderer' @@ -52,7 +53,7 @@ export function clear (): void { } const Handle = Extension.create({ - addKeyboardShortcuts() { + addKeyboardShortcuts () { return { 'Shift-Enter': () => { const res = this.editor.commands.splitListItem('listItem') @@ -61,17 +62,17 @@ const Handle = Extension.create({ () => commands.newlineInCode(), () => commands.createParagraphNear(), () => commands.liftEmptyBlock(), - () => commands.splitBlock(), + () => commands.splitBlock() ]) } return true }, - 'Enter': () => { + Enter: () => { submit() return true } } - }, + } }) onMount(() => { @@ -84,36 +85,36 @@ onMount(() => { Link, Handle, // order important // Typography, // we need to disable 1/2 -> ½ rule (https://github.com/hcengineering/anticrm/issues/345) - Placeholder.configure({placeholder: placeholder}), - Mention.configure({ + Placeholder.configure({ placeholder: placeholder }), + Completion.configure({ HTMLAttributes: { - class: 'mention', + class: 'reference' }, suggestion: { - items: async query => { - const persons = await client.findAll(contact.class.Person, {}) - return persons.filter(person => person.name.includes(query)) + items: async (query: { query: string }) => { + const persons = await client.findAll(contact.class.Person, { name: { $like: `%${query.query}%` } }, { limit: 200 }) + return persons.filter(person => person.name.includes(query.query)) }, render: () => { let component: any return { - onStart: props => { - component = new SvelteRenderer(MentionList, props) + onStart: (props:any) => { + component = new SvelteRenderer(MentionList, { ...props, close: () => { component.destroy() } }) }, - onUpdate(props) { + onUpdate (props:any) { component.updateProps(props) }, - onKeyDown(props) { + onKeyDown (props:any) { return component.onKeyDown(props) }, - onExit() { + onExit () { component.destroy() - }, + } } - }, - }, - }), + } + } + }) ], onTransaction: () => { // force re-render so `editor.isActive` works as expected diff --git a/plugins/activity-resources/package.json b/plugins/activity-resources/package.json index c624af5b6e..734815858a 100644 --- a/plugins/activity-resources/package.json +++ b/plugins/activity-resources/package.json @@ -40,6 +40,7 @@ "@anticrm/text-editor": "~0.6.0", "@anticrm/contact": "~0.6.2", "@anticrm/view": "~0.6.0", - "@anticrm/view-resources": "~0.6.0" + "@anticrm/view-resources": "~0.6.0", + "@anticrm/chunter-resources": "~0.6.0" } } diff --git a/plugins/activity-resources/src/components/Activity.svelte b/plugins/activity-resources/src/components/Activity.svelte index 8a8d4ab110..abdf4c946f 100644 --- a/plugins/activity-resources/src/components/Activity.svelte +++ b/plugins/activity-resources/src/components/Activity.svelte @@ -15,7 +15,7 @@ --> + +
{ + selectSpace(value._id) +}}> + {#if icon} + + {/if} + {value.name} +
diff --git a/plugins/chunter-resources/src/components/ChannelView.svelte b/plugins/chunter-resources/src/components/ChannelView.svelte index 7b0a521fdb..7daf02d575 100644 --- a/plugins/chunter-resources/src/components/ChannelView.svelte +++ b/plugins/chunter-resources/src/components/ChannelView.svelte @@ -20,15 +20,19 @@ import Channel from './Channel.svelte' import { ReferenceInput } from '@anticrm/text-editor' + import { createBacklinks } from '../backlinks' export let space: Ref const client = getClient() - function onMessage(event: CustomEvent) { - client.createDoc(chunter.class.Message, space, { + async function onMessage (event: CustomEvent) { + const msgRef = await client.createDoc(chunter.class.Message, space, { content: event.detail }) + + // Create an backlink to document + await createBacklinks(client, space, chunter.class.Channel, msgRef, event.detail) } diff --git a/plugins/chunter-resources/src/components/CommentInput.svelte b/plugins/chunter-resources/src/components/CommentInput.svelte new file mode 100644 index 0000000000..7c784bf264 --- /dev/null +++ b/plugins/chunter-resources/src/components/CommentInput.svelte @@ -0,0 +1,36 @@ + + + + \ No newline at end of file diff --git a/plugins/chunter-resources/src/components/CommentPopup.svelte b/plugins/chunter-resources/src/components/CommentPopup.svelte index cdb42733e1..12afcfb55c 100644 --- a/plugins/chunter-resources/src/components/CommentPopup.svelte +++ b/plugins/chunter-resources/src/components/CommentPopup.svelte @@ -23,11 +23,11 @@ export let objectId: Ref - let comments: Comment[] = [] - const query = createQuery() - $: query.query(chunter.class.Comment, { attachedTo: objectId }, (res) => { - comments = res - }, { limit: 3, sort: { modifiedOn: SortingOrder.Descending }}) + let comments: Comment[] = [] + const query = createQuery() + $: query.query(chunter.class.Comment, { attachedTo: objectId }, (res) => { + comments = res + }, { limit: 3, sort: { modifiedOn: SortingOrder.Descending } }) diff --git a/packages/presentation/src/components/message/Person.svelte b/plugins/chunter-resources/src/components/activity/TxBacklinkCreate.svelte similarity index 61% rename from packages/presentation/src/components/message/Person.svelte rename to plugins/chunter-resources/src/components/activity/TxBacklinkCreate.svelte index 940d8b981f..c9f1a502a4 100644 --- a/packages/presentation/src/components/message/Person.svelte +++ b/plugins/chunter-resources/src/components/activity/TxBacklinkCreate.svelte @@ -1,6 +1,5 @@ -{title} - - + diff --git a/plugins/chunter-resources/src/components/activity/TxBacklinkReference.svelte b/plugins/chunter-resources/src/components/activity/TxBacklinkReference.svelte new file mode 100644 index 0000000000..da2ac3c6b2 --- /dev/null +++ b/plugins/chunter-resources/src/components/activity/TxBacklinkReference.svelte @@ -0,0 +1,55 @@ + + + + +{#if presenter} + {className} in +
+ +
+{/if} + + diff --git a/plugins/chunter-resources/src/components/activity/TxCommentCreate.svelte b/plugins/chunter-resources/src/components/activity/TxCommentCreate.svelte index 96cdb183f3..bbed102b48 100644 --- a/plugins/chunter-resources/src/components/activity/TxCommentCreate.svelte +++ b/plugins/chunter-resources/src/components/activity/TxCommentCreate.svelte @@ -14,12 +14,13 @@ --> + +{#if presenter} +
+ +
+{/if} + + + diff --git a/plugins/view-resources/src/index.ts b/plugins/view-resources/src/index.ts index 97b30e5ecb..277bdc5688 100644 --- a/plugins/view-resources/src/index.ts +++ b/plugins/view-resources/src/index.ts @@ -30,6 +30,7 @@ import { deleteObject } from './utils' import MoveView from './components/Move.svelte' import EditDoc from './components/EditDoc.svelte' import RolePresenter from './components/RolePresenter.svelte' +import ObjectPresenter from './components/ObjectPresenter.svelte' export { default as ContextMenu } from './components/Menu.svelte' export { buildModel, getActions, getObjectPresenter, LoadingProps } from './utils' @@ -43,9 +44,9 @@ function Delete (object: Doc): void { message: 'Do you want to delete this object?' }, undefined, - (result) => { - if (result) { - deleteObject(getClient(), object) + (result?: boolean) => { + if (result === true) { + deleteObject(getClient(), object).catch(err => console.error(err)) } } ) @@ -69,6 +70,7 @@ export default async (): Promise => ({ TimestampPresenter, DateEditor, DatePresenter, - RolePresenter + RolePresenter, + ObjectPresenter } }) diff --git a/plugins/view-resources/src/utils.ts b/plugins/view-resources/src/utils.ts index 9a02b60ad0..063c3dd733 100644 --- a/plugins/view-resources/src/utils.ts +++ b/plugins/view-resources/src/utils.ts @@ -21,18 +21,16 @@ import core, { Collection, Doc, FindOptions, - FindResult, - Obj, + FindResult, Hierarchy, matchQuery, Obj, Ref, - TxOperations, - matchQuery + TxOperations } from '@anticrm/core' import type { IntlString } from '@anticrm/platform' import { getResource } from '@anticrm/platform' import { getAttributePresenterClass } from '@anticrm/presentation' -import type { Action, ActionTarget, BuildModelOptions } from '@anticrm/view' -import view, { AttributeModel, BuildModelKey } from '@anticrm/view' import { ErrorPresenter, getPlatformColorForText } from '@anticrm/ui' +import type { Action, ActionTarget, BuildModelOptions, ObjectDDParticipant } from '@anticrm/view' +import view, { AttributeModel, BuildModelKey } from '@anticrm/view' /** * Define some properties to be used to show component until data is properly loaded. @@ -220,17 +218,28 @@ export async function deleteObject (client: TxOperations, object: Doc): Promise< const collection = attribute.type as Collection const allAttached = await client.findAll(collection.of, { attachedTo: object._id }) for (const attached of allAttached) { - deleteObject(client, attached).catch((err) => console.log('failed to delete', name, err)) + await deleteObject(client, attached).catch(err => console.log('failed to delete', name, err)) } } } if (client.getHierarchy().isDerived(object._class, core.class.AttachedDoc)) { const adoc = object as AttachedDoc - client - .removeCollection(object._class, object.space, adoc._id, adoc.attachedTo, adoc.attachedToClass, adoc.collection) - .catch((err) => console.error(err)) + await client.removeCollection(object._class, object.space, adoc._id, adoc.attachedTo, adoc.attachedToClass, adoc.collection).catch(err => console.error(err)) } else { - client.removeDoc(object._class, object.space, object._id).catch((err) => console.error(err)) + await client.removeDoc(object._class, object.space, object._id).catch(err => console.error(err)) + } + + await deleteRelatedDocuments(hierarchy, object, client) +} +async function deleteRelatedDocuments (hierarchy: Hierarchy, object: Doc, client: TxOperations): Promise { + const objectClass = hierarchy.getClass(object._class) + if (hierarchy.hasMixin(objectClass, view.mixin.ObjectDDParticipant)) { + const removeParticipand: ObjectDDParticipant = hierarchy.as(objectClass, view.mixin.ObjectDDParticipant) + const collector = await getResource(removeParticipand.collectDocs) + const docs = await collector(object, client) + for (const d of docs) { + await deleteObject(client, d) + } } } diff --git a/plugins/view/src/index.ts b/plugins/view/src/index.ts index 4d3cdf1a7e..df066e34c7 100644 --- a/plugins/view/src/index.ts +++ b/plugins/view/src/index.ts @@ -14,7 +14,7 @@ // limitations under the License. // -import type { Class, Client, Doc, DocumentQuery, FindOptions, Mixin, Obj, Ref, Space, UXObject } from '@anticrm/core' +import type { Class, Client, Doc, DocumentQuery, FindOptions, Mixin, Obj, Ref, Space, TxOperations, UXObject } from '@anticrm/core' import type { Asset, IntlString, Plugin, Resource, Status } from '@anticrm/platform' import { plugin } from '@anticrm/platform' import type { AnyComponent, AnySvelteComponent } from '@anticrm/ui' @@ -139,6 +139,15 @@ export interface ObjectFactory extends Class { component: AnyComponent } +/** + * Allow to contribute and find all derived objects for document. + * @public + */ +export interface ObjectDDParticipant extends Class { + // Collect more items to be deleted if parent document is deleted. + collectDocs: Resource<(doc: Doc, client: TxOperations) => Promise> +} + /** * @public */ @@ -149,7 +158,8 @@ const view = plugin(viewId, { ObjectEditor: '' as Ref>, ObjectEditorHeader: '' as Ref>, ObjectValidator: '' as Ref>, - ObjectFactory: '' as Ref> + ObjectFactory: '' as Ref>, + ObjectDDParticipant: '' as Ref }, class: { ViewletDescriptor: '' as Ref>, @@ -160,6 +170,9 @@ const view = plugin(viewId, { viewlet: { Table: '' as Ref }, + component: { + ObjectPresenter: '' as AnyComponent + }, icon: { Table: '' as Asset, Delete: '' as Asset, diff --git a/rush.json b/rush.json index e02ae80b64..50032a5104 100644 --- a/rush.json +++ b/rush.json @@ -701,51 +701,16 @@ "projectFolder": "plugins/image-cropper-resources", "shouldPublish": true }, - { - "packageName": "@anticrm/dev-server-chunter-resources", - "projectFolder": "dev/server-chunter-resources", - "shouldPublish": true - }, { "packageName": "@anticrm/model-server-core", "projectFolder": "models/server-core", "shouldPublish": true }, - { - "packageName": "@anticrm/server-chunter", - "projectFolder": "server/chunter", - "shouldPublish": true - }, - { - "packageName": "@anticrm/server-recruit", - "projectFolder": "server/recruit", - "shouldPublish": true - }, - { - "packageName": "@anticrm/model-server-chunter", - "projectFolder": "models/server-chunter", - "shouldPublish": true - }, - { - "packageName": "@anticrm/model-server-recruit", - "projectFolder": "models/server-recruit", - "shouldPublish": true - }, { "packageName": "@anticrm/dev-account", "projectFolder": "dev/account", "shouldPublish": true - }, - { - "packageName": "@anticrm/server-chunter-resources", - "projectFolder": "server/chunter-resources", - "shouldPublish": true - }, - { - "packageName": "@anticrm/server-recruit-resources", - "projectFolder": "server/recruit-resources", - "shouldPublish": true - }, + }, { "packageName": "@anticrm/mongo", "projectFolder": "server/mongo", diff --git a/server/chunter-resources/.eslintrc.js b/server/chunter-resources/.eslintrc.js deleted file mode 100644 index 5da5872d4a..0000000000 --- a/server/chunter-resources/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - extends: ['./node_modules/@anticrm/platform-rig/profiles/default/config/eslint.config.json'], - parserOptions: { - tsconfigRootDir: __dirname, - project: './tsconfig.json' - } -} diff --git a/server/chunter-resources/.npmignore b/server/chunter-resources/.npmignore deleted file mode 100644 index e3ec093c38..0000000000 --- a/server/chunter-resources/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!/lib/** -!CHANGELOG.md -/lib/**/__tests__/ diff --git a/server/chunter-resources/CHANGELOG.json b/server/chunter-resources/CHANGELOG.json deleted file mode 100644 index 6b13cfd20e..0000000000 --- a/server/chunter-resources/CHANGELOG.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@anticrm/server-chunter-resources", - "entries": [ - { - "version": "0.6.0", - "tag": "@anticrm/server-chunter-resources_v0.6.0", - "date": "Fri, 20 Aug 2021 16:21:03 GMT", - "comments": { - "dependency": [ - { - "comment": "Updating dependency \"@anticrm/core\" from `~0.6.10` to `~0.6.11`" - } - ] - } - } - ] -} diff --git a/server/chunter-resources/CHANGELOG.md b/server/chunter-resources/CHANGELOG.md deleted file mode 100644 index 73f3e1b43a..0000000000 --- a/server/chunter-resources/CHANGELOG.md +++ /dev/null @@ -1,9 +0,0 @@ -# Change Log - @anticrm/server-chunter-resources - -This log was last generated on Fri, 20 Aug 2021 16:21:03 GMT and should not be manually modified. - -## 0.6.0 -Fri, 20 Aug 2021 16:21:03 GMT - -_Initial release_ - diff --git a/server/chunter-resources/config/rig.json b/server/chunter-resources/config/rig.json deleted file mode 100644 index af1257a896..0000000000 --- a/server/chunter-resources/config/rig.json +++ /dev/null @@ -1,18 +0,0 @@ -// The "rig.json" file directs tools to look for their config files in an external package. -// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package -{ - "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", - - /** - * (Required) The name of the rig package to inherit from. - * It should be an NPM package name with the "-rig" suffix. - */ - "rigPackageName": "@anticrm/platform-rig" - - /** - * (Optional) Selects a config profile from the rig package. The name must consist of - * lowercase alphanumeric words separated by hyphens, for example "sample-profile". - * If omitted, then the "default" profile will be used." - */ - // "rigProfile": "your-profile-name" -} diff --git a/server/chunter-resources/package.json b/server/chunter-resources/package.json deleted file mode 100644 index e3a0d2b46e..0000000000 --- a/server/chunter-resources/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "@anticrm/server-chunter-resources", - "version": "0.6.0", - "main": "lib/index.js", - "author": "Anticrm Platform Contributors", - "license": "EPL-2.0", - "scripts": { - "build": "heft build", - "build:watch": "tsc", - "lint:fix": "eslint --fix src", - "lint": "eslint src", - "format": "prettier --write src && eslint --fix src" - }, - "devDependencies": { - "@anticrm/platform-rig": "~0.6.0", - "@types/heft-jest": "^1.0.2", - "@typescript-eslint/eslint-plugin": "^5.4.0", - "eslint-plugin-import": "^2.25.3", - "eslint-plugin-promise": "^5.1.1", - "eslint-plugin-node": "^11.1.0", - "eslint": "^7.32.0", - "@typescript-eslint/parser": "^5.4.0", - "eslint-config-standard-with-typescript": "^21.0.1", - "prettier": "^2.4.1", - "@rushstack/heft": "^0.41.1", - "typescript": "^4.3.5" - }, - "dependencies": { - "@anticrm/core": "~0.6.11", - "@anticrm/platform": "~0.6.5", - "@anticrm/server-core": "~0.6.0", - "@anticrm/server-chunter": "~0.6.1", - "@anticrm/chunter": "~0.6.0", - "node-html-parser": "^4.1.3" - } -} diff --git a/server/chunter-resources/src/index.ts b/server/chunter-resources/src/index.ts deleted file mode 100644 index 7ed517720d..0000000000 --- a/server/chunter-resources/src/index.ts +++ /dev/null @@ -1,92 +0,0 @@ -// -// Copyright © 2020, 2021 Anticrm Platform Contributors. -// Copyright © 2021 Hardcore Engineering Inc. -// -// Licensed under the Eclipse Public License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. You may -// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import type { Tx, TxCreateDoc, Data, Ref, Doc, TxFactory, Class, TxCollectionCUD, AttachedDoc } from '@anticrm/core' -import type { FindAll } from '@anticrm/server-core' -import type { Message, Backlink } from '@anticrm/chunter' -import { parse, Node, HTMLElement } from 'node-html-parser' - -import core from '@anticrm/core' -import chunter from '@anticrm/chunter' - -function extractBacklinks (backlinkId: Ref, message: string, kids: Node[]): Data[] { - const result: Data[] = [] - for (const kid of kids) { - if ((kid as HTMLElement).localName === 'span') { - result.push({ - attachedTo: (kid as HTMLElement).getAttribute('data-id') as Ref, - attachedToClass: (kid as HTMLElement).getAttribute('data-class') as Ref>, - collection: (kid as HTMLElement).getAttribute('data-collection') ?? '', - backlinkId, - backlinkClass: chunter.class.Message, - message - }) - } - result.push(...extractBacklinks(backlinkId, message, kid.childNodes)) - } - return result -} - -function getBacklinks (backlinkId: Ref, content: string): Data[] { - const doc = parse(content) - return extractBacklinks(backlinkId, content, doc.childNodes) -} - -/** - * @public - */ -export async function OnMessage (tx: Tx, txFactory: TxFactory): Promise { - if (tx._class === core.class.TxCollectionCUD) { - tx = (tx as TxCollectionCUD).tx - } - if (tx._class === core.class.TxCreateDoc) { - const createTx = tx as TxCreateDoc - if (createTx.objectClass === chunter.class.Message) { - const content = createTx.attributes.content - const backlinks = getBacklinks(createTx.objectId, content) - return backlinks.map(backlink => txFactory.createTxCreateDoc(chunter.class.Backlink, chunter.space.Backlinks, backlink)) - } - } - return [] -} - -// interface WithAttachements extends Doc { -// attachments: number -// } - -/** - * @public - */ -export async function OnAttachment (tx: Tx, txFactory: TxFactory, findAll: FindAll): Promise { - // if (tx._class === core.class.TxAddCollection) { - // const createTx = tx as TxAddCollection - // if (createTx.objectClass === chunter.class.Attachment) { - // const _id = createTx.attachedTo as Ref - // const _class = createTx.attachedToClass as Ref> - // const attachedTo = (await findAll(_class, { _id }))[0] - // return [txFactory.createTxUpdateDoc(_class, attachedTo.space, _id, { $inc: { attachments: 1 } })] - // } - // } - return [] -} - -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export default async () => ({ - trigger: { - OnMessage, - OnAttachment - } -}) diff --git a/server/chunter-resources/tsconfig.json b/server/chunter-resources/tsconfig.json deleted file mode 100644 index aeb0517b13..0000000000 --- a/server/chunter-resources/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json", - - "compilerOptions": { - "rootDir": "./src", - "outDir": "./lib" - } -} \ No newline at end of file diff --git a/server/chunter/.eslintrc.js b/server/chunter/.eslintrc.js deleted file mode 100644 index 5da5872d4a..0000000000 --- a/server/chunter/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - extends: ['./node_modules/@anticrm/platform-rig/profiles/default/config/eslint.config.json'], - parserOptions: { - tsconfigRootDir: __dirname, - project: './tsconfig.json' - } -} diff --git a/server/chunter/.npmignore b/server/chunter/.npmignore deleted file mode 100644 index e3ec093c38..0000000000 --- a/server/chunter/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!/lib/** -!CHANGELOG.md -/lib/**/__tests__/ diff --git a/server/chunter/CHANGELOG.json b/server/chunter/CHANGELOG.json deleted file mode 100644 index d42c268272..0000000000 --- a/server/chunter/CHANGELOG.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "@anticrm/server-chunter", - "entries": [ - { - "version": "0.6.1", - "tag": "@anticrm/server-chunter_v0.6.1", - "date": "Mon, 09 Aug 2021 10:57:00 GMT", - "comments": { - "patch": [ - { - "comment": "fix" - } - ] - } - }, - { - "version": "0.6.0", - "tag": "@anticrm/server-chunter_v0.6.0", - "date": "Sun, 08 Aug 2021 10:14:57 GMT", - "comments": { - "dependency": [ - { - "comment": "Updating dependency \"@anticrm/platform\" from `~0.6.3` to `~0.6.4`" - } - ] - } - } - ] -} diff --git a/server/chunter/CHANGELOG.md b/server/chunter/CHANGELOG.md deleted file mode 100644 index 7234509a63..0000000000 --- a/server/chunter/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -# Change Log - @anticrm/server-chunter - -This log was last generated on Mon, 09 Aug 2021 10:57:00 GMT and should not be manually modified. - -## 0.6.1 -Mon, 09 Aug 2021 10:57:00 GMT - -### Patches - -- fix - -## 0.6.0 -Sun, 08 Aug 2021 10:14:57 GMT - -_Initial release_ - diff --git a/server/chunter/config/rig.json b/server/chunter/config/rig.json deleted file mode 100644 index af1257a896..0000000000 --- a/server/chunter/config/rig.json +++ /dev/null @@ -1,18 +0,0 @@ -// The "rig.json" file directs tools to look for their config files in an external package. -// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package -{ - "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", - - /** - * (Required) The name of the rig package to inherit from. - * It should be an NPM package name with the "-rig" suffix. - */ - "rigPackageName": "@anticrm/platform-rig" - - /** - * (Optional) Selects a config profile from the rig package. The name must consist of - * lowercase alphanumeric words separated by hyphens, for example "sample-profile". - * If omitted, then the "default" profile will be used." - */ - // "rigProfile": "your-profile-name" -} diff --git a/server/chunter/package.json b/server/chunter/package.json deleted file mode 100644 index 426f39d106..0000000000 --- a/server/chunter/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@anticrm/server-chunter", - "version": "0.6.1", - "main": "lib/index.js", - "author": "Anticrm Platform Contributors", - "license": "EPL-2.0", - "scripts": { - "build": "heft build", - "build:watch": "tsc", - "lint:fix": "eslint --fix src", - "lint": "eslint src", - "format": "prettier --write src && eslint --fix src" - }, - "devDependencies": { - "@anticrm/platform-rig": "~0.6.0", - "@types/heft-jest": "^1.0.2", - "@types/node": "^16.4.10", - "@typescript-eslint/eslint-plugin": "^5.4.0", - "eslint-plugin-import": "^2.25.3", - "eslint-plugin-promise": "^5.1.1", - "eslint-plugin-node": "^11.1.0", - "eslint": "^7.32.0", - "@typescript-eslint/parser": "^5.4.0", - "eslint-config-standard-with-typescript": "^21.0.1", - "prettier": "^2.4.1", - "@rushstack/heft": "^0.41.1", - "typescript": "^4.3.5" - }, - "dependencies": { - "@anticrm/core": "~0.6.11", - "@anticrm/platform": "~0.6.5", - "@anticrm/server-core": "~0.6.0" - } -} diff --git a/server/chunter/src/index.ts b/server/chunter/src/index.ts deleted file mode 100644 index 15dfa4e452..0000000000 --- a/server/chunter/src/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright © 2020, 2021 Anticrm Platform Contributors. -// Copyright © 2021, 2022 Hardcore Engineering Inc. -// -// Licensed under the Eclipse Public License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. You may -// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import type { Resource, Plugin } from '@anticrm/platform' -import { plugin } from '@anticrm/platform' -import type { TriggerFunc } from '@anticrm/server-core' - -/** - * @public - */ -export const serverChunterId = 'server-chunter' as Plugin - -/** - * @public - */ -export default plugin(serverChunterId, { - trigger: { - OnMessage: '' as Resource, - OnAttachment: '' as Resource - } -}) diff --git a/server/chunter/tsconfig.json b/server/chunter/tsconfig.json deleted file mode 100644 index fffbf4c341..0000000000 --- a/server/chunter/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json", - - "compilerOptions": { - "rootDir": "./src", - "outDir": "./lib", - "esModuleInterop": true - } -} \ No newline at end of file diff --git a/server/recruit-resources/.eslintrc.js b/server/recruit-resources/.eslintrc.js deleted file mode 100644 index 5da5872d4a..0000000000 --- a/server/recruit-resources/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - extends: ['./node_modules/@anticrm/platform-rig/profiles/default/config/eslint.config.json'], - parserOptions: { - tsconfigRootDir: __dirname, - project: './tsconfig.json' - } -} diff --git a/server/recruit-resources/.npmignore b/server/recruit-resources/.npmignore deleted file mode 100644 index e3ec093c38..0000000000 --- a/server/recruit-resources/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!/lib/** -!CHANGELOG.md -/lib/**/__tests__/ diff --git a/server/recruit-resources/config/rig.json b/server/recruit-resources/config/rig.json deleted file mode 100644 index af1257a896..0000000000 --- a/server/recruit-resources/config/rig.json +++ /dev/null @@ -1,18 +0,0 @@ -// The "rig.json" file directs tools to look for their config files in an external package. -// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package -{ - "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", - - /** - * (Required) The name of the rig package to inherit from. - * It should be an NPM package name with the "-rig" suffix. - */ - "rigPackageName": "@anticrm/platform-rig" - - /** - * (Optional) Selects a config profile from the rig package. The name must consist of - * lowercase alphanumeric words separated by hyphens, for example "sample-profile". - * If omitted, then the "default" profile will be used." - */ - // "rigProfile": "your-profile-name" -} diff --git a/server/recruit-resources/package.json b/server/recruit-resources/package.json deleted file mode 100644 index 8d1c8ad0d2..0000000000 --- a/server/recruit-resources/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@anticrm/server-recruit-resources", - "version": "0.6.0", - "main": "lib/index.js", - "author": "Anticrm Platform Contributors", - "license": "EPL-2.0", - "scripts": { - "build": "heft build", - "build:watch": "tsc", - "lint:fix": "eslint --fix src", - "lint": "eslint src", - "format": "prettier --write src && eslint --fix src" - }, - "devDependencies": { - "@anticrm/platform-rig": "~0.6.0", - "@types/heft-jest": "^1.0.2", - "@typescript-eslint/eslint-plugin": "^5.4.0", - "eslint-plugin-import": "^2.25.3", - "eslint-plugin-promise": "^5.1.1", - "eslint-plugin-node": "^11.1.0", - "eslint": "^7.32.0", - "@typescript-eslint/parser": "^5.4.0", - "eslint-config-standard-with-typescript": "^21.0.1", - "prettier": "^2.4.1", - "@rushstack/heft": "^0.41.1", - "typescript": "^4.3.5" - }, - "dependencies": { - "@anticrm/core": "~0.6.11", - "@anticrm/platform": "~0.6.5", - "@anticrm/server-core": "~0.6.0", - "@anticrm/recruit": "~0.6.0" - } -} diff --git a/server/recruit-resources/src/index.ts b/server/recruit-resources/src/index.ts deleted file mode 100644 index c374d590e4..0000000000 --- a/server/recruit-resources/src/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright © 2020, 2021 Anticrm Platform Contributors. -// Copyright © 2021 Hardcore Engineering Inc. -// -// Licensed under the Eclipse Public License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. You may -// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import type { Doc, Tx, TxFactory } from '@anticrm/core' -import type { FindAll } from '@anticrm/server-core' -// import type { Applicant } from '@anticrm/recruit' - -// import recruit from '@anticrm/recruit' -// import core from '@anticrm/core' - -/** - * @public - */ -export async function OnApplication (tx: Tx, txFactory: TxFactory, findAll: FindAll): Promise { - // if (tx._class === core.class.TxCreateDoc) { - // const createTx = tx as TxCreateDoc - // if (createTx.objectClass === recruit.class.Applicant) { - // const _id = createTx.attributes.candidate - // const candidate = (await findAll(recruit.class.Candidate, { _id }))[0] // TODO: HATE THIS - // return [txFactory.createTxUpdateDoc(recruit.class.Candidate, candidate.space, _id, { $inc: { applications: 1 } })] - // } - // } - return [] -} - -// eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export default async () => ({ - trigger: { - OnApplication - } -}) diff --git a/server/recruit-resources/tsconfig.json b/server/recruit-resources/tsconfig.json deleted file mode 100644 index aeb0517b13..0000000000 --- a/server/recruit-resources/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json", - - "compilerOptions": { - "rootDir": "./src", - "outDir": "./lib" - } -} \ No newline at end of file diff --git a/server/recruit/.eslintrc.js b/server/recruit/.eslintrc.js deleted file mode 100644 index 5da5872d4a..0000000000 --- a/server/recruit/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - extends: ['./node_modules/@anticrm/platform-rig/profiles/default/config/eslint.config.json'], - parserOptions: { - tsconfigRootDir: __dirname, - project: './tsconfig.json' - } -} diff --git a/server/recruit/.npmignore b/server/recruit/.npmignore deleted file mode 100644 index e3ec093c38..0000000000 --- a/server/recruit/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!/lib/** -!CHANGELOG.md -/lib/**/__tests__/ diff --git a/server/recruit/config/rig.json b/server/recruit/config/rig.json deleted file mode 100644 index af1257a896..0000000000 --- a/server/recruit/config/rig.json +++ /dev/null @@ -1,18 +0,0 @@ -// The "rig.json" file directs tools to look for their config files in an external package. -// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package -{ - "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", - - /** - * (Required) The name of the rig package to inherit from. - * It should be an NPM package name with the "-rig" suffix. - */ - "rigPackageName": "@anticrm/platform-rig" - - /** - * (Optional) Selects a config profile from the rig package. The name must consist of - * lowercase alphanumeric words separated by hyphens, for example "sample-profile". - * If omitted, then the "default" profile will be used." - */ - // "rigProfile": "your-profile-name" -} diff --git a/server/recruit/package.json b/server/recruit/package.json deleted file mode 100644 index a917db02fb..0000000000 --- a/server/recruit/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@anticrm/server-recruit", - "version": "0.6.1", - "main": "lib/index.js", - "author": "Anticrm Platform Contributors", - "license": "EPL-2.0", - "scripts": { - "build": "heft build", - "build:watch": "tsc", - "lint:fix": "eslint --fix src", - "lint": "eslint src", - "format": "prettier --write src && eslint --fix src" - }, - "devDependencies": { - "@anticrm/platform-rig": "~0.6.0", - "@types/heft-jest": "^1.0.2", - "@types/node": "^16.4.10", - "@typescript-eslint/eslint-plugin": "^5.4.0", - "eslint-plugin-import": "^2.25.3", - "eslint-plugin-promise": "^5.1.1", - "eslint-plugin-node": "^11.1.0", - "eslint": "^7.32.0", - "@typescript-eslint/parser": "^5.4.0", - "eslint-config-standard-with-typescript": "^21.0.1", - "prettier": "^2.4.1", - "@rushstack/heft": "^0.41.1", - "typescript": "^4.3.5" - }, - "dependencies": { - "@anticrm/core": "~0.6.11", - "@anticrm/platform": "~0.6.5", - "@anticrm/server-core": "~0.6.0" - } -} diff --git a/server/recruit/src/index.ts b/server/recruit/src/index.ts deleted file mode 100644 index 6ea767a658..0000000000 --- a/server/recruit/src/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright © 2020, 2021 Anticrm Platform Contributors. -// Copyright © 2021, 2022 Hardcore Engineering Inc. -// -// Licensed under the Eclipse Public License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. You may -// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import type { Resource, Plugin } from '@anticrm/platform' -import { plugin } from '@anticrm/platform' -import type { TriggerFunc } from '@anticrm/server-core' - -/** - * @public - */ -export const serverRecruitId = 'server-recruit' as Plugin - -/** - * @public - */ -export default plugin(serverRecruitId, { - trigger: { - OnApplication: '' as Resource - } -}) diff --git a/server/recruit/tsconfig.json b/server/recruit/tsconfig.json deleted file mode 100644 index fffbf4c341..0000000000 --- a/server/recruit/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json", - - "compilerOptions": { - "rootDir": "./src", - "outDir": "./lib", - "esModuleInterop": true - } -} \ No newline at end of file diff --git a/server/server/package.json b/server/server/package.json index 8f30716701..7a173ddc48 100644 --- a/server/server/package.json +++ b/server/server/package.json @@ -38,10 +38,6 @@ "@anticrm/platform": "~0.6.5", "@anticrm/server-core": "~0.6.1", "@anticrm/server-ws": "~0.6.11", - "@anticrm/server-chunter": "~0.6.1", - "@anticrm/server-chunter-resources": "~0.6.0", - "@anticrm/server-recruit": "~0.6.0", - "@anticrm/server-recruit-resources": "~0.6.0", "@anticrm/mongo": "~0.6.1", "@anticrm/elastic": "~0.6.0", "elastic-apm-node": "~3.26.0" diff --git a/server/server/src/server.ts b/server/server/src/server.ts index 1a80edbc92..bf65e432ba 100644 --- a/server/server/src/server.ts +++ b/server/server/src/server.ts @@ -15,15 +15,11 @@ // import { Class, Doc, DocumentQuery, DOMAIN_MODEL, DOMAIN_TX, FindOptions, FindResult, Hierarchy, ModelDb, Ref, Tx, TxResult } from '@anticrm/core' -import { start as startJsonRpc } from '@anticrm/server-ws' -import { createMongoAdapter, createMongoTxAdapter } from '@anticrm/mongo' import { createElasticAdapter } from '@anticrm/elastic' +import { createMongoAdapter, createMongoTxAdapter } from '@anticrm/mongo' +import type { DbAdapter, DbConfiguration } from '@anticrm/server-core' import { createServerStorage } from '@anticrm/server-core' -import type { DbConfiguration, DbAdapter } from '@anticrm/server-core' - -import { addLocation } from '@anticrm/platform' -import { serverChunterId } from '@anticrm/server-chunter' -import { serverRecruitId } from '@anticrm/server-recruit' +import { start as startJsonRpc } from '@anticrm/server-ws' import { metricsContext } from './metrics' class NullDbAdapter implements DbAdapter { @@ -41,9 +37,6 @@ async function createNullAdapter (hierarchy: Hierarchy, url: string, db: string, * @public */ export function start (dbUrl: string, fullTextUrl: string, port: number, host?: string): () => void { - addLocation(serverChunterId, () => import('@anticrm/server-chunter-resources')) - addLocation(serverRecruitId, () => import('@anticrm/server-recruit-resources')) - return startJsonRpc(metricsContext, (workspace: string) => { const conf: DbConfiguration = { domains: {