Basic mentions support (#832)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2022-01-19 16:04:30 +07:00 committed by GitHub
parent b56f3bba7c
commit 0d8daf2fea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
96 changed files with 1006 additions and 1604 deletions

View File

@ -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:

View File

@ -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",

View File

@ -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()

View File

@ -1,7 +0,0 @@
module.exports = {
extends: ['./node_modules/@anticrm/platform-rig/profiles/default/config/eslint.config.json'],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json'
}
}

View File

@ -1,4 +0,0 @@
*
!/lib/**
!CHANGELOG.md
/lib/**/__tests__/

View File

@ -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`"
}
]
}
}
]
}

View File

@ -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_

View File

@ -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"
}

View File

@ -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"
}
}

View File

@ -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<Doc>, message: string, kids: NodeListOf<HTMLElement>): Data<Backlink>[] {
const result: Data<Backlink>[] = []
for (const kid of kids) {
if (kid.nodeName === 'span') {
result.push({
attachedTo: kid.getAttribute('data-id') as Ref<Doc>,
attachedToClass: kid.getAttribute('data-class') as Ref<Class<Doc>>,
collection: kid.getAttribute('data-collection') ?? '',
backlinkId,
backlinkClass: chunter.class.Message,
message
})
}
result.push(...extractBacklinks(backlinkId, message, kid.childNodes as NodeListOf<HTMLElement>))
}
return result
}
function getBacklinks (backlinkId: Ref<Doc>, content: string): Data<Backlink>[] {
const parser = new DOMParser()
const doc = parser.parseFromString(content, 'application/xhtml+xml')
return extractBacklinks(backlinkId, content, doc.childNodes as NodeListOf<HTMLElement>)
}
/**
* @public
*/
export async function OnMessage (tx: Tx, txFactory: TxFactory): Promise<Tx[]> {
if (tx._class === core.class.TxCreateDoc) {
const createTx = tx as TxCreateDoc<Message>
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<Doc>): Promise<Tx[]> {
// if (tx._class === core.class.TxAddCollection) {
// const createTx = tx as TxAddCollection<Attachment>
// if (createTx.objectClass === chunter.class.Attachment) {
// const _id = createTx.attachedTo as Ref<WithAttachements>
// const _class = createTx.attachedToClass as Ref<Class<WithAttachements>>
// 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
}
})

View File

@ -1,8 +0,0 @@
{
"extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./lib"
}
}

View File

@ -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"
}
}

View File

@ -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<TxResult> {
@ -52,8 +49,6 @@ async function createNullFullTextAdapter (): Promise<FullTextAdapter> {
* @public
*/
export async function start (port: number, host?: string): Promise<void> {
addLocation(serverChunterId, () => import('@anticrm/server-chunter-resources'))
startJsonRpc(new MeasureMetricsContext('server', {}), () => {
const conf: DbConfiguration = {
domains: {

View File

@ -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",

View File

@ -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<Tx>(DOMAIN_TX).find().toArray())
const data = txes.filter((tx) => tx.objectSpace !== core.space.Model)
const data = (await tool.db.collection<Tx>(DOMAIN_TX).find().toArray())
const m = newMetrics()
const metricsCtx = new MeasureMetricsContext('elastic', {}, m)
console.log('replay elastic transactions', data.length)

View File

@ -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",

View File

@ -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)

View File

@ -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<Doc>
backlinkClass!: Ref<Class<Doc>>
@ -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<Class<Doc>, 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

View File

@ -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<ViewletDescriptor>
},
ids: {
TxCommentCreate: '' as Ref<TxViewlet>,
TxCommentRemove: '' as Ref<TxViewlet>
TxCommentRemove: '' as Ref<TxViewlet>,
TxBacklinkRemove: '' as Ref<TxViewlet>
},
activity: {
TxCommentCreate: '' as AnyComponent
TxCommentCreate: '' as AnyComponent,
TxBacklinkCreate: '' as AnyComponent,
TxBacklinkReference: '' as AnyComponent
},
space: {
General: '' as Ref<Channel>,
Random: '' as Ref<Channel>
},
app: { Chunter: '' as Ref<Application> }
action: {
CommentRemove: '' as Resource<(doc: Doc, client: TxOperations) => Promise<Doc[]>>
}
})

View File

@ -89,7 +89,7 @@ export class TInterface extends TDoc implements Interface<Doc> {
extends?: Ref<Interface<Doc>>[]
}
@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<Class<Obj>>
name!: string

View File

@ -1,7 +0,0 @@
module.exports = {
extends: ['./node_modules/@anticrm/model-rig/profiles/default/config/eslint.config.json'],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json'
}
}

View File

@ -1,4 +0,0 @@
*
!/lib/**
!CHANGELOG.md
/lib/**/__tests__/

View File

@ -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`"
}
]
}
}
]
}

View File

@ -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_

View File

@ -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"
}

View File

@ -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"
}
}

View File

@ -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
})
}

View File

@ -1,8 +0,0 @@
{
"extends": "./node_modules/@anticrm/model-rig/profiles/default/tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./lib",
}
}

View File

@ -1,7 +0,0 @@
module.exports = {
extends: ['./node_modules/@anticrm/model-rig/profiles/default/config/eslint.config.json'],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json'
}
}

View File

@ -1,4 +0,0 @@
*
!/lib/**
!CHANGELOG.md
/lib/**/__tests__/

View File

@ -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"
}

View File

@ -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"
}
}

View File

@ -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
})
}

View File

@ -1,8 +0,0 @@
{
"extends": "./node_modules/@anticrm/model-rig/profiles/default/tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./lib",
}
}

View File

@ -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<void> {
console.log('Task: Performing model upgrades')

View File

@ -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<Doc[]>>
}
@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, {

View File

@ -62,7 +62,7 @@ export class TxOperations implements Omit<Client, 'notify'> {
collection: string,
attributes: AttachedData<P>,
id?: Ref<P>
): Promise<Ref<T>> {
): Promise<Ref<P>> {
const tx = this.txFactory.createTxCollectionCUD<T, P>(
attachedToClass,
attachedTo,
@ -71,7 +71,7 @@ export class TxOperations implements Omit<Client, 'notify'> {
this.txFactory.createTxCreateDoc<P>(_class, space, attributes as unknown as Data<P>, id)
)
await this.client.tx(tx)
return tx.objectId
return tx.tx.objectId as unknown as Ref<P>
}
async updateCollection<T extends Doc, P extends AttachedDoc>(

View File

@ -15,9 +15,10 @@
-->
<script lang="ts">
import Person from './Person.svelte'
import { Component } from '@anticrm/ui'
import view from '@anticrm/view'
export let nodes: NodeListOf<any>
export let nodes: NodeListOf<any>
</script>
{#if nodes}
@ -62,7 +63,7 @@
{:else if node.nodeName === 'A'}
<a href={node.getAttribute('href')}><svelte:self nodes={node.childNodes}/></a>
{:else if node.nodeName === 'SPAN'}
<Person objectId={node.getAttribute('data-id')} title={node.getAttribute('data-label')} />
<Component is={view.component.ObjectPresenter} props={{ objectId: node.getAttribute('data-id'), title: node.getAttribute('data-label'), _class: node.getAttribute('data-objectclass') }} />
{:else}
Unknown { node.nodeName }
{/if}

View File

@ -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"
}
}

View File

@ -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<string, any>
renderLabel: (props: {
options: CompletionOptions
node: ProseMirrorNode
}) => string
suggestion: Omit<SuggestionOptions, 'editor'>
}
// export const CompletionPluginKey = new PluginKey('completion')
export const Completion = Node.create<CompletionOptions>({
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
})
]
}
})

View File

@ -13,74 +13,84 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-->
<script lang="ts">
import { formatName, Person } from '@anticrm/contact'
import { UserInfo } from '@anticrm/presentation'
import { createEventDispatcher } from 'svelte';
import { Editor } from '@tiptap/core'
import { onMount } from 'svelte'
import type { FindResult, Doc, Ref } from '@anticrm/core'
import { formatName, Person } from '@anticrm/contact'
import contact from '@anticrm/contact'
import { getClient, UserInfo } from '@anticrm/presentation'
import { EditStylish, IconSearch } from '@anticrm/ui'
export let items: Person[]
export let query: string
export let clientRect: () => ClientRect
export let command: (props: any) => void
export let close: () => void
export let items: Person[]
export let editor: Editor
export let query: string
export let clientRect: () => ClientRect
export let command: (props: any) => void
let popup: HTMLDivElement
let selected = 0
let popup: HTMLDivElement
let selected = 0
export function onKeyDown(ev: KeyboardEvent) {
if (ev.key === 'ArrowDown') {
if (selected < items.length - 1) selected++
return true
}
if (ev.key === 'ArrowUp') {
if (selected > 0) selected--
return true
}
if (ev.key === 'Enter') {
const person = items[selected]
if (person) {
command({id: person._id, label: formatName(person.name)})
export function onKeyDown (ev: KeyboardEvent) {
if (ev.key === 'ArrowDown') {
if (selected < items.length - 1) selected++
return true
} else
return false
}
if (ev.key === 'ArrowUp') {
if (selected > 0) selected--
return true
}
if (ev.key === 'Enter') {
const person = items[selected]
if (person) {
command({ id: person._id, label: formatName(person.name), objectclass: person._class })
return true
} else {
return false
}
}
// TODO: How to prevent Esc, it should hide popup instead of closing editor.
// if (ev.key === 'Esc') {
// return true
// }
return false
}
return false
}
export function done() {
console.log('done')
}
let persons: Person[] = []
let style = 'visibility: hidden'
$: {
if (popup) {
const x = clientRect().left
let height = popup.getBoundingClientRect().height
let y = clientRect().top - height - 16
style = `left: ${x}px; top: ${y}px;`
export function done () {
console.log('done')
}
}
//$: items(query).then(result => persons = result)
let style = 'visibility: hidden'
$: {
if (popup) {
const x = clientRect().left
const height = popup.getBoundingClientRect().height
const y = clientRect().top - height - 16
style = `left: ${x}px; top: ${y}px;`
}
}
</script>
<div
class="overlay"
on:click={() => {
close()
}}
/>
<div>
<div bind:this={popup} class='completion' {style}>
<!-- <EditStylish icon={IconSearch} placeholder={'Type to search...'} value={query}/> -->
<div class="caption">SUGGESTED</div>
<div bind:this={popup} class="completion" {style}>
<div class="caption">Contacts</div>
<div class="scroll">
{#each items as item, i}
<div class:selected={i === selected}>
<div
class="item"
class:selected={i === selected}
on:click={() => {
command({ id: item._id, label: formatName(item.name), objectclass: item._class })
}}
on:focus={() => {
selected = i
}}
on:mouseover={() => {
selected = i
}}
>
<UserInfo size={'medium'} value={item} />
</div>
{/each}
@ -89,34 +99,42 @@ $: {
</div>
<style lang="scss">
.selected {
background-color: red;
}
.completion {
position: absolute;
z-index: 1010;
padding: 16px;
background-color: var(--theme-button-bg-hovered);
border: 1px solid var(--theme-bg-accent-hover);
border-radius: .75rem;
box-shadow: 0 20px 20px 0 rgba(0, 0, 0, .1);
.caption {
margin: 8px 0;
font-weight: 600;
font-size: 12px;
letter-spacing: .5px;
color: var(--theme-content-trans-color);
.overlay {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 2000;
}
.scroll {
display: grid;
grid-auto-flow: row;
gap: 12px;
height: calc(100% - 71px);
overflow-y: auto;
}
}
</style>
.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;
}
}
</style>

View File

@ -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<string, any>): void {
updateProps (props: Record<string, any>): void {
this.component.$set(props)
}
onKeyDown(props: Record<string, any>): boolean {
if (this.component.onKeyDown)
return this.component.onKeyDown(props.event)
onKeyDown (props: Record<string, any>): 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()
}
}
}

View File

@ -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

View File

@ -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"
}
}

View File

@ -15,7 +15,7 @@
-->
<script lang="ts">
import activity, { TxViewlet } from '@anticrm/activity'
import chunter from '@anticrm/chunter'
import { CommentInput } from '@anticrm/chunter-resources'
import { Doc, SortingOrder } from '@anticrm/core'
import { createQuery, getClient } from '@anticrm/presentation'
import { ReferenceInput } from '@anticrm/text-editor'
@ -42,10 +42,6 @@
SortingOrder.Descending
)
function onMessage (event: CustomEvent) {
client.addCollection(chunter.class.Comment, object.space, object._id, object._class, 'comments', { message: event.detail })
}
let viewlets: Map<ActivityKey, TxViewlet>
const descriptors = createQuery()
@ -72,7 +68,9 @@
{/if}
</ScrollBox>
</div>
<div class="ref-input" class:transparent><ReferenceInput on:message={onMessage} /></div>
<div class="ref-input" class:transparent>
<CommentInput bind:object/>
</div>
{:else}
<div class="unionSection">
<ScrollBox vertical stretch noShift>
@ -93,7 +91,9 @@
{/if}
</div>
</ScrollBox>
<div class="ref-input"><ReferenceInput on:message={onMessage} /></div>
<div class="ref-input">
<CommentInput bind:object/>
</div>
</div>
{/if}

View File

@ -18,7 +18,8 @@
import type { TxViewlet } from '@anticrm/activity'
import activity from '@anticrm/activity'
import contact, { EmployeeAccount, formatName } from '@anticrm/contact'
import { Doc, Ref } from '@anticrm/core'
import { AttachedDoc, Doc, Ref, TxCreateDoc } from '@anticrm/core'
import core from '@anticrm/core'
import { Asset, getResource } from '@anticrm/platform'
import { getClient } from '@anticrm/presentation'
import {
@ -146,8 +147,11 @@
</div>
</div>
{:else if viewlet && viewlet.label}
<div>
<div class='flex-center'>
<Label label={viewlet.label} />
{#if viewlet.labelComponent}
<Component is={viewlet.labelComponent} {props} />
{/if}
</div>
{/if}
{#if viewlet === undefined && model.length > 0 && tx.updateTx}

View File

@ -1,6 +1,6 @@
import type { TxViewlet } from '@anticrm/activity'
import activity from '@anticrm/activity'
import core, { Class, Client, Doc, Ref, TxCUD, TxOperations } from '@anticrm/core'
import core, { Class, Doc, Ref, TxCUD, TxOperations } from '@anticrm/core'
import { Asset, IntlString } from '@anticrm/platform'
import { AnyComponent, AnySvelteComponent } from '@anticrm/ui'
import { AttributeModel } from '@anticrm/view'
@ -8,7 +8,7 @@ import { buildModel, getObjectPresenter } from '@anticrm/view-resources'
import { ActivityKey, activityKey, DisplayTx } from '../activity'
export type TxDisplayViewlet =
| (Pick<TxViewlet, 'icon' | 'label' | 'display' | 'editable' | 'hideOnRemove'> & {
| (Pick<TxViewlet, 'icon' | 'label' | 'display' | 'editable' | 'hideOnRemove' | 'labelComponent'> & {
component?: AnyComponent | AnySvelteComponent
})
| undefined

View File

@ -28,6 +28,10 @@ export interface TxViewlet extends Doc {
txClass: Ref<Class<Tx>>
// Component to display on.
component?: AnyComponent
// If defined, will be added to label displayed
labelComponent?: AnyComponent
// Filter
match?: DocumentQuery<Tx>

View File

@ -12,6 +12,7 @@
"Channel": "Channel",
"EditUpdate": "Save...",
"EditCancel": "Cancel",
"Comments" : "Comments"
"Comments" : "Comments",
"MentionedIn": "mentioned this "
}
}

View File

@ -39,6 +39,7 @@
"svelte": "^3.37.0",
"@anticrm/text-editor": "~0.6.0",
"@anticrm/contact": "~0.6.2",
"@anticrm/view-resources": "~0.6.0"
"@anticrm/view-resources": "~0.6.0",
"@anticrm/view": "~0.6.0"
}
}

View File

@ -0,0 +1,109 @@
import { Backlink, Comment } from '@anticrm/chunter'
import contact, { EmployeeAccount } from '@anticrm/contact'
import { Account, Class, Client, Data, Doc, DocumentQuery, Ref, TxOperations } from '@anticrm/core'
import chunter from './plugin'
export async function getUser (client: Client, user: Ref<EmployeeAccount> | Ref<Account>): Promise<EmployeeAccount | undefined> {
return await client.findOne(contact.class.EmployeeAccount, { _id: user as Ref<EmployeeAccount> })
}
export function getTime (time: number): string {
let options: Intl.DateTimeFormatOptions = { hour: 'numeric', minute: 'numeric' }
if (!isToday(time)) {
options = {
month: 'numeric',
day: 'numeric',
...options
}
}
return new Date(time).toLocaleString('default', options)
}
export function isToday (time: number): boolean {
const current = new Date()
const target = new Date(time)
return current.getDate() === target.getDate() && current.getMonth() === target.getMonth() && current.getFullYear() === target.getFullYear()
}
function extractBacklinks (backlinkId: Ref<Doc>, backlinkClass: Ref<Class<Doc>>, attachedDocId: Ref<Doc> | undefined, message: string, kids: NodeListOf<ChildNode>): Array<Data<Backlink>> {
const result: Array<Data<Backlink>> = []
const nodes: Array<NodeListOf<ChildNode>> = [kids]
while (true) {
const nds = nodes.shift()
if (nds === undefined) {
break
}
nds.forEach((kid) => {
if (kid.nodeType === Node.ELEMENT_NODE && (kid as HTMLElement).localName === 'span') {
const el = kid as HTMLElement
result.push({
attachedTo: el.getAttribute('data-id') as Ref<Doc>,
attachedToClass: el.getAttribute('data-objectclass') as Ref<Class<Doc>>,
collection: 'backlinks',
backlinkId,
backlinkClass,
message,
attachedDocId
})
}
nodes.push(kid.childNodes)
})
}
return result
}
export function getBacklinks (backlinkId: Ref<Doc>, backlinkClass: Ref<Class<Doc>>, attachedDocId: Ref<Doc> | undefined, content: string): Array<Data<Backlink>> {
const parser = new DOMParser()
const doc = parser.parseFromString(content, 'application/xhtml+xml')
return extractBacklinks(backlinkId, backlinkClass, attachedDocId, content, doc.childNodes as NodeListOf<HTMLElement>)
}
export async function createBacklinks (client: TxOperations, backlinkId: Ref<Doc>, backlinkClass: Ref<Class<Doc>>, attachedDocId: Ref<Doc> | undefined, content: string): Promise<void> {
const backlinks = getBacklinks(backlinkId, backlinkClass, attachedDocId, content)
for (const backlink of backlinks) {
const { attachedTo, attachedToClass, collection, ...adata } = backlink
await client.addCollection(chunter.class.Backlink, chunter.space.Backlinks, attachedTo, attachedToClass, collection, adata)
}
}
export async function updateBacklinks (client: TxOperations, backlinkId: Ref<Doc>, backlinkClass: Ref<Class<Doc>>, attachedDocId: Ref<Doc> | undefined, content: string): Promise<void> {
const q: DocumentQuery<Backlink> = { backlinkId, backlinkClass }
if (attachedDocId !== undefined) {
q.attachedDocId = attachedDocId
}
const current = await client.findAll(chunter.class.Backlink, q)
const backlinks = getBacklinks(backlinkId, backlinkClass, attachedDocId, content)
// We need to find ones we need to remove, and ones we need to update.
for (const c of current) {
// Find existing and check if we need to update message.
const pos = backlinks.findIndex(b => b.backlinkId === c.backlinkId && b.backlinkClass === c.backlinkClass)
if (pos !== -1) {
// We need to check and update if required.
const data = backlinks[pos]
if (c.message !== data.message) {
await client.updateCollection(c._class, c.space, c._id, c.attachedTo, c.attachedToClass, c.collection, { message: data.message })
}
backlinks.splice(pos, 1)
} else {
// We need to remove backlink.
await client.removeCollection(c._class, c.space, c._id, c.attachedTo, c.attachedToClass, c.collection)
}
}
// Add missing backlinks
for (const backlink of backlinks) {
const { attachedTo, attachedToClass, collection, ...adata } = backlink
await client.addCollection(chunter.class.Backlink, chunter.space.Backlinks, attachedTo, attachedToClass, collection, adata)
}
}
export async function collectBacklinks (doc: Doc, client: TxOperations): Promise<Doc[]> {
if (!client.getHierarchy().isDerived(doc._class, chunter.class.Comment)) {
return []
}
const comment = doc as Comment
const result = await client.findAll(chunter.class.Backlink, { backlinkId: comment.attachedTo, backlinkClass: comment.attachedToClass, attachedDocId: comment._id })
return result
}

View File

@ -0,0 +1,46 @@
<!--
// 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.
-->
<script lang="ts">
import type { Channel } from '@anticrm/chunter'
import { Ref, Space } from '@anticrm/core'
import { getClient } from '@anticrm/presentation'
import { closePopup, getCurrentLocation, Icon, navigate } from '@anticrm/ui'
import chunter from '../plugin'
export let value: Channel
const client = getClient()
$: icon = client.getHierarchy().getClass(value._class).icon
function selectSpace (id: Ref<Space>) {
closePopup()
const loc = getCurrentLocation()
loc.path[1] = chunter.app.Chunter
loc.path[2] = id
loc.path.length = 3
navigate(loc)
}
</script>
<div class="flex-row-center hover-trans" on:click={() => {
selectSpace(value._id)
}}>
{#if icon}
<Icon icon={icon} size={'small'}/>
{/if}
{value.name}
</div>

View File

@ -20,15 +20,19 @@
import Channel from './Channel.svelte'
import { ReferenceInput } from '@anticrm/text-editor'
import { createBacklinks } from '../backlinks'
export let space: Ref<Space>
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)
}
</script>

View File

@ -0,0 +1,36 @@
<!--
// 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.
-->
<script lang="ts">
import { Comment } from '@anticrm/chunter'
import { Doc } from '@anticrm/core'
import { getClient } from '@anticrm/presentation'
import { ReferenceInput } from '@anticrm/text-editor'
import { createBacklinks } from '../backlinks'
import chunter from '../plugin'
const client = getClient()
export let object: Doc
async function onMessage (event: CustomEvent) {
const commentId = await client.addCollection<Doc, Comment>(chunter.class.Comment, object.space, object._id, object._class, 'comments', { message: event.detail })
// Create an backlink to document
await createBacklinks(client, object._id, object._class, commentId, event.detail)
}
</script>
<ReferenceInput on:message={onMessage} />

View File

@ -23,11 +23,11 @@
export let objectId: Ref<Doc>
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 } })
</script>

View File

@ -1,6 +1,5 @@
<!--
// Copyright © 2020, 2021 Anticrm Platform Contributors.
// Copyright © 2021 Hardcore Engineering Inc.
// Copyright © 2021 Anticrm Platform Contributors.
//
// 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
@ -15,17 +14,12 @@
-->
<script lang="ts">
import type { Ref } from '@anticrm/core'
import type { Person } from '@anticrm/contact'
import type { Backlink } from '@anticrm/chunter'
import { MessageViewer } from '@anticrm/presentation'
export let objectId: Ref<Person>
export let title: string
// export let tx: TxCreateDoc<Backlink>
export let value: Backlink
// export let edit: boolean = false
</script>
<span class="person">{title}</span>
<style lang="scss">
.person {
border: 1px solid red;
}
</style>
<MessageViewer message={value.message}/>

View File

@ -0,0 +1,55 @@
<!--
// Copyright © 2021 Anticrm Platform Contributors.
//
// 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.
-->
<script lang="ts">
import type { Backlink } from '@anticrm/chunter'
import type { Doc } from '@anticrm/core'
import { createQuery, getClient } from '@anticrm/presentation'
import { AttributeModel } from '@anticrm/view'
import { getObjectPresenter } from '@anticrm/view-resources'
// export let tx: TxCreateDoc<Backlink>
export let value: Backlink
// export let edit: boolean = false
const client = getClient()
let presenter: AttributeModel | undefined
const docQuery = createQuery()
let doc: Doc | undefined
$: docQuery.query(value.backlinkClass, { _id: value.backlinkId }, (r) => { doc = r.shift() })
$: className = client.getHierarchy().getClass(value.attachedToClass).label.toLocaleLowerCase()
$: if (doc !== undefined) {
getObjectPresenter(client, doc._class, { key: '' }).then(p => {
presenter = p
})
}
</script>
{#if presenter}
{className} in
<div class='presenter'>
<svelte:component this={presenter.presenter} value={doc}/>
</div>
{/if}
<style lang="scss">
.presenter {
margin-left: 0.5rem;
}
</style>

View File

@ -14,12 +14,13 @@
-->
<script lang="ts">
import type { Comment } from "@anticrm/chunter"
import type { TxCreateDoc } from "@anticrm/core"
import type { Comment } from '@anticrm/chunter'
import type { TxCreateDoc } from '@anticrm/core'
import { getClient, MessageViewer } from '@anticrm/presentation'
import { ReferenceInput } from "@anticrm/text-editor"
import { Button } from "@anticrm/ui"
import { createEventDispatcher } from "svelte"
import { ReferenceInput } from '@anticrm/text-editor'
import { Button } from '@anticrm/ui'
import { createEventDispatcher } from 'svelte'
import { updateBacklinks } from '../../backlinks'
import chunter from '../../plugin'
export let tx: TxCreateDoc<Comment>
@ -29,12 +30,15 @@
const client = getClient()
const dispatch = createEventDispatcher()
let editing = false
const editing = false
function onMessage(event: CustomEvent) {
client.updateCollection(tx.objectClass, tx.objectSpace, tx.objectId, value.attachedTo, value.attachedToClass, value.collection, {
async function onMessage (event: CustomEvent) {
await client.updateCollection(tx.objectClass, tx.objectSpace, tx.objectId, value.attachedTo, value.attachedToClass, value.collection, {
message: event.detail
})
// We need to update backlinks before and after.
await updateBacklinks(client, value.attachedTo, value.attachedToClass, value._id, event.detail)
dispatch('close', false)
}
let refInput: ReferenceInput

View File

@ -1,34 +1,46 @@
//
// Copyright © 2020 Anticrm Platform Contributors.
//
//
// 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 CreateChannel from './components/CreateChannel.svelte'
import { Resources } from '@anticrm/platform'
import { collectBacklinks } from './backlinks'
import TxBacklinkCreate from './components/activity/TxBacklinkCreate.svelte'
import TxBacklinkReference from './components/activity/TxBacklinkReference.svelte'
import TxCommentCreate from './components/activity/TxCommentCreate.svelte'
import ChannelPresenter from './components/ChannelPresenter.svelte'
import ChannelView from './components/ChannelView.svelte'
import CommentInput from './components/CommentInput.svelte'
import CommentPresenter from './components/CommentPresenter.svelte'
import CommentsPresenter from './components/CommentsPresenter.svelte'
import TxCommentCreate from './components/activity/TxCommentCreate.svelte'
import CreateChannel from './components/CreateChannel.svelte'
export { CommentsPresenter }
export { CommentsPresenter, CommentInput }
export default async () => ({
export default async (): Promise<Resources> => ({
component: {
CreateChannel,
ChannelView,
CommentPresenter,
CommentsPresenter
CommentsPresenter,
ChannelPresenter
},
activity: {
TxCommentCreate
TxCommentCreate,
TxBacklinkCreate,
TxBacklinkReference
},
action: {
CommentRemove: collectBacklinks
}
})

View File

@ -1,33 +1,32 @@
//
// Copyright © 2020 Anticrm Platform Contributors.
//
//
// 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 { mergeIds } from '@anticrm/platform'
import type { IntlString } from '@anticrm/platform'
import type { Ref, Class } from '@anticrm/core'
import type { Channel, Message } from '@anticrm/chunter'
import type { AnyComponent } from '@anticrm/ui'
import type { Channel } from '@anticrm/chunter'
import chunter, { chunterId } from '@anticrm/chunter'
import type { Class, Doc, Ref } from '@anticrm/core'
import type { IntlString } from '@anticrm/platform'
import { mergeIds } from '@anticrm/platform'
import type { AnyComponent } from '@anticrm/ui'
export default mergeIds(chunterId, chunter, {
component: {
CreateChannel: '' as AnyComponent,
ChannelView: '' as AnyComponent,
ChannelView: '' as AnyComponent
},
class: {
Channel: '' as Ref<Class<Channel>>,
class: {
Channel: '' as Ref<Class<Channel>>
},
string: {
Channel: '' as IntlString,
@ -37,5 +36,8 @@ export default mergeIds(chunterId, chunter, {
ChannelDescription: '' as IntlString,
MakePrivate: '' as IntlString,
MakePrivateDescription: '' as IntlString
},
app: {
Chunter: '' as Ref<Doc>
}
})

View File

@ -40,8 +40,17 @@ export interface Comment extends AttachedDoc {
* @public
*/
export interface Backlink extends Comment {
// A target document
// attachedTo <- target document we point to
// A target document class
// attachedToClass
// Source document we have reference from, it should be parent document for Comment/Message.
backlinkId: Ref<Doc>
// Source document class
backlinkClass: Ref<Class<Doc>>
// Reference to comment documentId
attachedDocId?: Ref<Doc>
}
/**

View File

@ -0,0 +1,52 @@
<!--
// Copyright © 2021 Anticrm Platform Contributors.
//
// 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.
-->
<script lang="ts">
import type { Class, Doc, Ref } from '@anticrm/core'
import { createQuery, getClient } from '@anticrm/presentation'
import { AttributeModel } from '@anticrm/view'
import { getObjectPresenter } from '../utils'
export let objectId: Ref<Doc>
export let _class: Ref<Class<Doc>>
const client = getClient()
let presenter: AttributeModel | undefined
const docQuery = createQuery()
let doc: Doc | undefined
$: docQuery.query(_class, { _id: objectId }, (r) => { doc = r.shift() })
$: if (doc !== undefined) {
getObjectPresenter(client, doc._class, { key: '' }).then(p => {
presenter = p
})
}
</script>
{#if presenter}
<div class='presenter'>
<svelte:component this={presenter.presenter} value={doc}/>
</div>
{/if}
<style lang="scss">
.presenter {
display: inline-flex;
vertical-align: sub;
}
</style>

View File

@ -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<Resources> => ({
TimestampPresenter,
DateEditor,
DatePresenter,
RolePresenter
RolePresenter,
ObjectPresenter
}
})

View File

@ -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<AttachedDoc>
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<void> {
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)
}
}
}

View File

@ -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<Obj> {
component: AnyComponent
}
/**
* Allow to contribute and find all derived objects for document.
* @public
*/
export interface ObjectDDParticipant extends Class<Obj> {
// Collect more items to be deleted if parent document is deleted.
collectDocs: Resource<(doc: Doc, client: TxOperations) => Promise<Doc[]>>
}
/**
* @public
*/
@ -149,7 +158,8 @@ const view = plugin(viewId, {
ObjectEditor: '' as Ref<Mixin<ObjectEditor>>,
ObjectEditorHeader: '' as Ref<Mixin<ObjectEditorHeader>>,
ObjectValidator: '' as Ref<Mixin<ObjectValidator>>,
ObjectFactory: '' as Ref<Mixin<ObjectFactory>>
ObjectFactory: '' as Ref<Mixin<ObjectFactory>>,
ObjectDDParticipant: '' as Ref<ObjectDDParticipant>
},
class: {
ViewletDescriptor: '' as Ref<Class<ViewletDescriptor>>,
@ -160,6 +170,9 @@ const view = plugin(viewId, {
viewlet: {
Table: '' as Ref<ViewletDescriptor>
},
component: {
ObjectPresenter: '' as AnyComponent
},
icon: {
Table: '' as Asset,
Delete: '' as Asset,

View File

@ -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",

View File

@ -1,7 +0,0 @@
module.exports = {
extends: ['./node_modules/@anticrm/platform-rig/profiles/default/config/eslint.config.json'],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json'
}
}

View File

@ -1,4 +0,0 @@
*
!/lib/**
!CHANGELOG.md
/lib/**/__tests__/

View File

@ -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`"
}
]
}
}
]
}

View File

@ -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_

View File

@ -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"
}

View File

@ -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"
}
}

View File

@ -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<Doc>, message: string, kids: Node[]): Data<Backlink>[] {
const result: Data<Backlink>[] = []
for (const kid of kids) {
if ((kid as HTMLElement).localName === 'span') {
result.push({
attachedTo: (kid as HTMLElement).getAttribute('data-id') as Ref<Doc>,
attachedToClass: (kid as HTMLElement).getAttribute('data-class') as Ref<Class<Doc>>,
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<Doc>, content: string): Data<Backlink>[] {
const doc = parse(content)
return extractBacklinks(backlinkId, content, doc.childNodes)
}
/**
* @public
*/
export async function OnMessage (tx: Tx, txFactory: TxFactory): Promise<Tx[]> {
if (tx._class === core.class.TxCollectionCUD) {
tx = (tx as TxCollectionCUD<Doc, AttachedDoc>).tx
}
if (tx._class === core.class.TxCreateDoc) {
const createTx = tx as TxCreateDoc<Message>
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<Doc>): Promise<Tx[]> {
// if (tx._class === core.class.TxAddCollection) {
// const createTx = tx as TxAddCollection<Attachment>
// if (createTx.objectClass === chunter.class.Attachment) {
// const _id = createTx.attachedTo as Ref<WithAttachements>
// const _class = createTx.attachedToClass as Ref<Class<WithAttachements>>
// 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
}
})

View File

@ -1,8 +0,0 @@
{
"extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./lib"
}
}

View File

@ -1,7 +0,0 @@
module.exports = {
extends: ['./node_modules/@anticrm/platform-rig/profiles/default/config/eslint.config.json'],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json'
}
}

View File

@ -1,4 +0,0 @@
*
!/lib/**
!CHANGELOG.md
/lib/**/__tests__/

View File

@ -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`"
}
]
}
}
]
}

View File

@ -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_

View File

@ -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"
}

View File

@ -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"
}
}

View File

@ -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<TriggerFunc>,
OnAttachment: '' as Resource<TriggerFunc>
}
})

View File

@ -1,9 +0,0 @@
{
"extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./lib",
"esModuleInterop": true
}
}

View File

@ -1,7 +0,0 @@
module.exports = {
extends: ['./node_modules/@anticrm/platform-rig/profiles/default/config/eslint.config.json'],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json'
}
}

View File

@ -1,4 +0,0 @@
*
!/lib/**
!CHANGELOG.md
/lib/**/__tests__/

View File

@ -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"
}

View File

@ -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"
}
}

View File

@ -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<Doc>): Promise<Tx[]> {
// if (tx._class === core.class.TxCreateDoc) {
// const createTx = tx as TxCreateDoc<Applicant>
// 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
}
})

View File

@ -1,8 +0,0 @@
{
"extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./lib"
}
}

View File

@ -1,7 +0,0 @@
module.exports = {
extends: ['./node_modules/@anticrm/platform-rig/profiles/default/config/eslint.config.json'],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json'
}
}

View File

@ -1,4 +0,0 @@
*
!/lib/**
!CHANGELOG.md
/lib/**/__tests__/

View File

@ -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"
}

View File

@ -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"
}
}

View File

@ -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<TriggerFunc>
}
})

View File

@ -1,9 +0,0 @@
{
"extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./lib",
"esModuleInterop": true
}
}

View File

@ -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"

View File

@ -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: {