From 546877b004c48b2059afaa3f77ba854a7d6c386d Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Wed, 16 Feb 2022 16:02:31 +0700 Subject: [PATCH] Initial Support for tags/skills (#1021) Signed-off-by: Andrey Sobolev --- common/config/rush/pnpm-lock.yaml | 233 +++++++++++++----- common/scripts/build_docker.sh | 10 + dev/docker-compose.yaml | 76 +++--- dev/prod/package.json | 5 +- dev/prod/src/platform.ts | 4 +- dev/prod/webpack.config.js | 12 +- models/all/package.json | 3 +- models/all/src/index.ts | 3 + models/core/src/core.ts | 3 + models/core/src/index.ts | 6 +- models/recruit/package.json | 3 +- models/recruit/src/index.ts | 64 ++++- models/recruit/src/plugin.ts | 3 +- models/tags/.eslintrc.js | 7 + models/tags/.npmignore | 4 + models/tags/config/rig.json | 18 ++ models/tags/package.json | 38 +++ models/tags/src/index.ts | 88 +++++++ models/tags/src/plugin.ts | 44 ++++ models/tags/tsconfig.json | 8 + models/view/src/index.ts | 8 + models/view/src/plugin.ts | 2 + packages/core/src/__tests__/memdb.test.ts | 2 +- packages/core/src/classes.ts | 1 + packages/core/src/component.ts | 1 + packages/core/src/predicate.ts | 3 +- packages/core/src/utils.ts | 8 +- packages/model/src/dsl.ts | 11 +- packages/panel/package.json | 2 +- packages/presentation/package.json | 2 +- packages/presentation/src/attributes.ts | 2 +- .../presentation/src/components/Card.svelte | 3 +- packages/rekoni/src/types.ts | 1 + packages/text-editor/package.json | 2 +- packages/theme/package.json | 2 +- packages/theme/styles/_layouts.scss | 3 + packages/theme/styles/components.scss | 73 ++++-- packages/theme/styles/popups.scss | 11 + packages/ui/package.json | 2 +- packages/ui/src/colors.ts | 7 + packages/ui/src/components/ActionIcon.svelte | 3 +- packages/ui/src/components/EditBox.svelte | 21 +- .../ui/src/components/EditWithIcon.svelte | 1 + packages/ui/src/components/Section.svelte | 11 +- plugins/activity-resources/package.json | 2 +- plugins/activity-resources/src/activity.ts | 22 +- .../src/components/utils.ts | 14 +- plugins/attachment-resources/package.json | 2 +- plugins/chunter-resources/package.json | 2 +- plugins/contact-resources/package.json | 2 +- plugins/devmodel-resources/package.json | 2 +- plugins/gmail-resources/package.json | 2 +- plugins/image-cropper-resources/package.json | 2 +- plugins/inventory-resources/package.json | 2 +- plugins/lead-resources/package.json | 2 +- plugins/login-resources/package.json | 2 +- plugins/notification-resources/package.json | 2 +- plugins/recruit-assets/lang/en.json | 4 +- plugins/recruit-resources/package.json | 5 +- .../src/components/CreateCandidate.svelte | 161 ++++++++++-- .../src/components/SkillsView.svelte | 7 + plugins/recruit-resources/src/index.ts | 4 +- plugins/recruit-resources/src/plugin.ts | 4 +- plugins/recruit/src/index.ts | 1 + plugins/setting-resources/package.json | 2 +- .../src/components/Password.svelte | 6 +- .../src/components/Profile.svelte | 7 - plugins/tags-assets/.eslintrc.js | 7 + plugins/tags-assets/assets/icons.svg | 8 + plugins/tags-assets/config/rig.json | 18 ++ plugins/tags-assets/lang/en.json | 29 +++ plugins/tags-assets/package.json | 33 +++ plugins/tags-assets/src/index.ts | 25 ++ plugins/tags-assets/tsconfig.json | 15 ++ plugins/tags-resources/.eslintrc.js | 7 + plugins/tags-resources/package.json | 42 ++++ plugins/tags-resources/postcss.config.js | 5 + .../src/components/CreateTagElement.svelte | 108 ++++++++ .../src/components/EditTagElement.svelte | 120 +++++++++ .../src/components/TagElementPresenter.svelte | 39 +++ .../src/components/TagItem.svelte | 73 ++++++ .../components/TagReferencePresenter.svelte | 24 ++ .../tags-resources/src/components/Tags.svelte | 66 +++++ .../src/components/TagsEditor.svelte | 131 ++++++++++ .../src/components/TagsItemPresenter.svelte | 28 +++ .../src/components/TagsPopup.svelte | 124 ++++++++++ .../components/TagsPresentationPopup.svelte | 55 +++++ .../src/components/TagsPresenter.svelte | 39 +++ .../src/components/TagsView.svelte | 78 ++++++ plugins/tags-resources/src/index.ts | 43 ++++ plugins/tags-resources/src/plugin.ts | 43 ++++ plugins/tags-resources/src/utils.ts | 19 ++ plugins/tags-resources/svelte.config.js | 5 + plugins/tags-resources/tsconfig.json | 15 ++ plugins/tags/.eslintrc.js | 7 + plugins/tags/.npmignore | 4 + plugins/tags/config/rig.json | 18 ++ plugins/tags/package.json | 33 +++ plugins/tags/src/index.ts | 60 +++++ plugins/tags/tsconfig.json | 9 + plugins/task-assets/lang/en.json | 3 +- plugins/task-resources/package.json | 2 +- .../src/components/state/ColorsPopup.svelte | 51 ---- .../src/components/state/StatesEditor.svelte | 2 +- plugins/task-resources/src/plugin.ts | 1 - plugins/telegram-resources/package.json | 2 +- .../src/components/Connect.svelte | 2 +- plugins/templates-resources/package.json | 2 +- plugins/view-assets/lang/en.json | 3 +- plugins/view-resources/package.json | 2 +- .../src/components/ColorsPopup.svelte | 11 +- .../src/components/EditDoc.svelte | 18 +- .../src/components/NumberEditor.svelte | 35 +++ .../src/components/NumberPresenter.svelte | 21 ++ plugins/view-resources/src/index.ts | 9 +- plugins/view-resources/src/plugin.ts | 3 +- plugins/view-resources/src/utils.ts | 13 +- plugins/view/src/index.ts | 3 + plugins/workbench-resources/package.json | 2 +- rush.json | 22 +- server/mongo/src/storage.ts | 4 +- 121 files changed, 2308 insertions(+), 306 deletions(-) create mode 100755 common/scripts/build_docker.sh create mode 100644 models/tags/.eslintrc.js create mode 100644 models/tags/.npmignore create mode 100644 models/tags/config/rig.json create mode 100644 models/tags/package.json create mode 100644 models/tags/src/index.ts create mode 100644 models/tags/src/plugin.ts create mode 100644 models/tags/tsconfig.json create mode 100644 plugins/recruit-resources/src/components/SkillsView.svelte create mode 100644 plugins/tags-assets/.eslintrc.js create mode 100644 plugins/tags-assets/assets/icons.svg create mode 100644 plugins/tags-assets/config/rig.json create mode 100644 plugins/tags-assets/lang/en.json create mode 100644 plugins/tags-assets/package.json create mode 100644 plugins/tags-assets/src/index.ts create mode 100644 plugins/tags-assets/tsconfig.json create mode 100644 plugins/tags-resources/.eslintrc.js create mode 100644 plugins/tags-resources/package.json create mode 100644 plugins/tags-resources/postcss.config.js create mode 100644 plugins/tags-resources/src/components/CreateTagElement.svelte create mode 100644 plugins/tags-resources/src/components/EditTagElement.svelte create mode 100644 plugins/tags-resources/src/components/TagElementPresenter.svelte create mode 100644 plugins/tags-resources/src/components/TagItem.svelte create mode 100644 plugins/tags-resources/src/components/TagReferencePresenter.svelte create mode 100644 plugins/tags-resources/src/components/Tags.svelte create mode 100644 plugins/tags-resources/src/components/TagsEditor.svelte create mode 100644 plugins/tags-resources/src/components/TagsItemPresenter.svelte create mode 100644 plugins/tags-resources/src/components/TagsPopup.svelte create mode 100644 plugins/tags-resources/src/components/TagsPresentationPopup.svelte create mode 100644 plugins/tags-resources/src/components/TagsPresenter.svelte create mode 100644 plugins/tags-resources/src/components/TagsView.svelte create mode 100644 plugins/tags-resources/src/index.ts create mode 100644 plugins/tags-resources/src/plugin.ts create mode 100644 plugins/tags-resources/src/utils.ts create mode 100644 plugins/tags-resources/svelte.config.js create mode 100644 plugins/tags-resources/tsconfig.json create mode 100644 plugins/tags/.eslintrc.js create mode 100644 plugins/tags/.npmignore create mode 100644 plugins/tags/config/rig.json create mode 100644 plugins/tags/package.json create mode 100644 plugins/tags/src/index.ts create mode 100644 plugins/tags/tsconfig.json delete mode 100644 plugins/task-resources/src/components/state/ColorsPopup.svelte create mode 100644 plugins/view-resources/src/components/NumberEditor.svelte create mode 100644 plugins/view-resources/src/components/NumberPresenter.svelte diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7b36f2ee74..350730ca38 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -65,6 +65,7 @@ specifiers: '@rush-temp/model-server-core': file:./projects/model-server-core.tgz '@rush-temp/model-server-notification': file:./projects/model-server-notification.tgz '@rush-temp/model-setting': file:./projects/model-setting.tgz + '@rush-temp/model-tags': file:./projects/model-tags.tgz '@rush-temp/model-task': file:./projects/model-task.tgz '@rush-temp/model-telegram': file:./projects/model-telegram.tgz '@rush-temp/model-templates': file:./projects/model-templates.tgz @@ -100,6 +101,9 @@ specifiers: '@rush-temp/setting': file:./projects/setting.tgz '@rush-temp/setting-assets': file:./projects/setting-assets.tgz '@rush-temp/setting-resources': file:./projects/setting-resources.tgz + '@rush-temp/tags': file:./projects/tags.tgz + '@rush-temp/tags-assets': file:./projects/tags-assets.tgz + '@rush-temp/tags-resources': file:./projects/tags-resources.tgz '@rush-temp/task': file:./projects/task.tgz '@rush-temp/task-assets': file:./projects/task-assets.tgz '@rush-temp/task-resources': file:./projects/task-resources.tgz @@ -193,7 +197,7 @@ specifiers: smartcrop: ~2.0.5 style-loader: ^3.2.1 svelte-loader: ^3.1.2 - svelte-preprocess: ^4.7.4 + svelte-preprocess: ^4.10.3 svgo-loader: ^3.0.0 toposort: ^2.0.2 ts-loader: ^9.2.5 @@ -270,6 +274,7 @@ dependencies: '@rush-temp/model-server-core': file:projects/model-server-core.tgz_typescript@4.5.4 '@rush-temp/model-server-notification': file:projects/model-server-notification.tgz_typescript@4.5.4 '@rush-temp/model-setting': file:projects/model-setting.tgz_typescript@4.5.4 + '@rush-temp/model-tags': file:projects/model-tags.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 '@rush-temp/model-templates': file:projects/model-templates.tgz_typescript@4.5.4 @@ -305,6 +310,9 @@ dependencies: '@rush-temp/setting': file:projects/setting.tgz '@rush-temp/setting-assets': file:projects/setting-assets.tgz_typescript@4.5.4 '@rush-temp/setting-resources': file:projects/setting-resources.tgz_096c09b0b673a57c275d9767a12070b1 + '@rush-temp/tags': file:projects/tags.tgz + '@rush-temp/tags-assets': file:projects/tags-assets.tgz + '@rush-temp/tags-resources': file:projects/tags-resources.tgz_096c09b0b673a57c275d9767a12070b1 '@rush-temp/task': file:projects/task.tgz '@rush-temp/task-assets': file:projects/task-assets.tgz_typescript@4.5.4 '@rush-temp/task-resources': file:projects/task-resources.tgz_6cae74ea501386c76c405ad0408e0339 @@ -398,7 +406,7 @@ dependencies: smartcrop: 2.0.5 style-loader: 3.3.1_webpack@5.65.0 svelte-loader: 3.1.2 - svelte-preprocess: 4.10.1_3ae2e5fc7d8fb60bbcea513ad0b15c0f + svelte-preprocess: 4.10.3_3ae2e5fc7d8fb60bbcea513ad0b15c0f svgo-loader: 3.0.0 toposort: 2.0.2 ts-loader: 9.2.6_typescript@4.5.4+webpack@5.65.0 @@ -2414,7 +2422,7 @@ packages: /@types/sass/1.43.1: resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==} dependencies: - '@types/node': 17.0.0 + '@types/node': 17.0.10 dev: false /@types/serve-index/1.9.1: @@ -9855,7 +9863,7 @@ packages: sade: 1.7.4 source-map: 0.7.3 svelte: 3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -9883,7 +9891,7 @@ packages: picocolors: 1.0.0 sade: 1.7.4 source-map: 0.7.3 - svelte-preprocess: 4.10.1_3ae2e5fc7d8fb60bbcea513ad0b15c0f + svelte-preprocess: 4.10.3_3ae2e5fc7d8fb60bbcea513ad0b15c0f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -9937,23 +9945,23 @@ packages: svelte-hmr: 0.14.7_svelte@3.44.3 dev: false - /svelte-preprocess/4.10.1_14d64cad431e31f100de7363af24a44f: - resolution: {integrity: sha512-NSNloaylf+o9UeyUR2KvpdxrAyMdHl3U7rMnoP06/sG0iwJvlUM4TpMno13RaNqovh4AAoGsx1jeYcIyuGUXMw==} + /svelte-preprocess/4.10.3_14d64cad431e31f100de7363af24a44f: + resolution: {integrity: sha512-ttw17lJfb/dx2ZJT9sesaXT5l7mPQ9Apx1H496Kli3Hkk7orIRGpOw6rCPkRNzr6ueVPqb4vzodS5x7sBFhKHw==} engines: {node: '>= 9.11.2'} requiresBuild: true peerDependencies: '@babel/core': ^7.10.2 coffeescript: ^2.5.1 - less: ^3.11.3 + less: ^3.11.3 || ^4.0.0 node-sass: '*' postcss: ^7 || ^8 postcss-load-config: ^2.1.0 || ^3.0.0 pug: ^3.0.0 sass: ^1.26.8 - stylus: ^0.54.7 + stylus: ^0.55.0 sugarss: ^2.0.0 svelte: ^3.23.0 - typescript: ^4.5.2 + typescript: ^3.9.5 || ^4.0.0 peerDependenciesMeta: '@babel/core': optional: true @@ -9991,23 +9999,23 @@ packages: typescript: 4.5.4 dev: false - /svelte-preprocess/4.10.1_3ae2e5fc7d8fb60bbcea513ad0b15c0f: - resolution: {integrity: sha512-NSNloaylf+o9UeyUR2KvpdxrAyMdHl3U7rMnoP06/sG0iwJvlUM4TpMno13RaNqovh4AAoGsx1jeYcIyuGUXMw==} + /svelte-preprocess/4.10.3_3ae2e5fc7d8fb60bbcea513ad0b15c0f: + resolution: {integrity: sha512-ttw17lJfb/dx2ZJT9sesaXT5l7mPQ9Apx1H496Kli3Hkk7orIRGpOw6rCPkRNzr6ueVPqb4vzodS5x7sBFhKHw==} engines: {node: '>= 9.11.2'} requiresBuild: true peerDependencies: '@babel/core': ^7.10.2 coffeescript: ^2.5.1 - less: ^3.11.3 + less: ^3.11.3 || ^4.0.0 node-sass: '*' postcss: ^7 || ^8 postcss-load-config: ^2.1.0 || ^3.0.0 pug: ^3.0.0 sass: ^1.26.8 - stylus: ^0.54.7 + stylus: ^0.55.0 sugarss: ^2.0.0 svelte: ^3.23.0 - typescript: ^4.5.2 + typescript: ^3.9.5 || ^4.0.0 peerDependenciesMeta: '@babel/core': optional: true @@ -11195,7 +11203,7 @@ packages: dev: false file:projects/activity-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-o6RpdrtwnGmVtudJ14BdbkVOXYJ2kWdlC8BrM7HZnHNlWRbCoTUX9wAXdyOvwbkxcXbWANNNb8B9v9A+BE9f4Q==, tarball: file:projects/activity-resources.tgz} + resolution: {integrity: sha512-CKoVEo115okdjOw8sAj3LSKwdeaCJxHYXxA+q5AfE/dnGXSs6FafXMFwk8epAMDA2v8Ia5szMiR88kTwtURsPw==, tarball: file:projects/activity-resources.tgz} id: file:projects/activity-resources.tgz name: '@rush-temp/activity-resources' version: 0.0.0 @@ -11214,7 +11222,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -11272,7 +11280,7 @@ packages: dev: false file:projects/attachment-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-MRImst0WyxQ5iFxrOLL2P6aD9s4GXYtxPdTbCFcUDsqut/jxCWmIfHYIcuNOq/m2M4EEvqjhq4W/jOOf9215Fw==, tarball: file:projects/attachment-resources.tgz} + resolution: {integrity: sha512-NM5ixh2NsK2enMbee/o90emEngDEyLybFOdk2O8gHr53ccEEs5ymTF7gpjHU5k6o0gWKAZxAynfJv49FgypQhg==, tarball: file:projects/attachment-resources.tgz} id: file:projects/attachment-resources.tgz name: '@rush-temp/attachment-resources' version: 0.0.0 @@ -11292,7 +11300,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -11350,7 +11358,7 @@ packages: dev: false file:projects/chunter-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-dPR2m2XzU66FBdJBsKI2Ga24D38iI4et+u+uORNgas6bohKQaOZN9F4H/CF4cTWJj80MflwIrk4jz7D5Ksdv5Q==, tarball: file:projects/chunter-resources.tgz} + resolution: {integrity: sha512-Ah0rr5uVXgAWSijLuVIxdtLjpc//rR4gw6AwtdF0adV89ZA70k/B7mKpjHAw2kIRkMjfgS5P30bRhx83Fh2CdQ==, tarball: file:projects/chunter-resources.tgz} id: file:projects/chunter-resources.tgz name: '@rush-temp/chunter-resources' version: 0.0.0 @@ -11369,7 +11377,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -11480,7 +11488,7 @@ packages: dev: false file:projects/contact-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-g7B06yLgy4cATtr/oG6tQFvV8bJZkwJlVuMfZy+W4uLqgbF/Iix0dY+cQqdOmS2jMGi3HO7rrWmUBb7lx3lnaw==, tarball: file:projects/contact-resources.tgz} + resolution: {integrity: sha512-ncFeUeWdAObn9laLaK18Co0lUSdvTGHSMiQZtGioRx/iaXzHjdH6/unwKEYx3e6en/THEF4n3EonxhRc6yqsCg==, tarball: file:projects/contact-resources.tgz} id: file:projects/contact-resources.tgz name: '@rush-temp/contact-resources' version: 0.0.0 @@ -11499,7 +11507,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -11670,7 +11678,7 @@ packages: dev: false file:projects/devmodel-resources.tgz_6cae74ea501386c76c405ad0408e0339: - resolution: {integrity: sha512-eA8s5XJOwP4vu/EVRb73vl3z0C2K4cqsp3Pa2E0TREP2K78AjJPSGxIZD6WEwjg4K2L1dCOCG9kWGSShWwAt3A==, tarball: file:projects/devmodel-resources.tgz} + resolution: {integrity: sha512-HeGrVj5D+GdP5bJYWTmy+a8dYiOd74GcsME7pJXf3Cht5U1XMFAztYzwCEVin2c2rglUGcJn7w74XryeERPW7A==, tarball: file:projects/devmodel-resources.tgz} id: file:projects/devmodel-resources.tgz name: '@rush-temp/devmodel-resources' version: 0.0.0 @@ -11689,7 +11697,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f transitivePeerDependencies: - '@babel/core' - coffeescript @@ -11846,7 +11854,7 @@ packages: dev: false file:projects/gmail-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-C7jgVQmN2v6HBKZgVAzWPYRaWrRHhfWpIRIRUyBUmspQreX2ArmCFCjq+1CHYBh9lGcnBZGgaNN1zQ1aTzSFLA==, tarball: file:projects/gmail-resources.tgz} + resolution: {integrity: sha512-c/15o6tsdSp0oLcPg3CQ7/n3HVufXMmGvn3bL2SUcjCRnE+f4MyVMC4dtsnkKB0FBHUpE5UPZ6Yz+DMTYzNLKw==, tarball: file:projects/gmail-resources.tgz} id: file:projects/gmail-resources.tgz name: '@rush-temp/gmail-resources' version: 0.0.0 @@ -11865,7 +11873,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -11901,7 +11909,7 @@ packages: dev: false file:projects/image-cropper-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-ljTYKZOYl34hx76ETCFNAcExK+MP6WSS09tbRRixWxD7SYc7NmBeMntGyZTy3qNu4/jAwNaDAIH52kXQg9ktXQ==, tarball: file:projects/image-cropper-resources.tgz} + resolution: {integrity: sha512-K9bILvzF/P2rkTtpkuT1hX2Y2aA1C2nmhm3SuzUUfR+Rvrfl42QyzXNJctSBHN2pQCq1cvZcC+AAJWlgqVDuMg==, tarball: file:projects/image-cropper-resources.tgz} id: file:projects/image-cropper-resources.tgz name: '@rush-temp/image-cropper-resources' version: 0.0.0 @@ -11922,7 +11930,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -11979,7 +11987,7 @@ packages: dev: false file:projects/inventory-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-MrUT0/F04u5zOmtGq/iBCXPTt2HNfw4/D7xtrL3BJLP/djmiWT6P0lELSF9wUsMpEeOiJ5LlJqH+ho22VsDhSQ==, tarball: file:projects/inventory-resources.tgz} + resolution: {integrity: sha512-QPMUPTMuvahinsVH8OO3BUj9lpAq2cITHPgk/EL8XlZ0xEq497JjXy3N8KW4gHSwrM8kGBPfpwD2bRbXI4V7Vg==, tarball: file:projects/inventory-resources.tgz} id: file:projects/inventory-resources.tgz name: '@rush-temp/inventory-resources' version: 0.0.0 @@ -11998,7 +12006,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -12056,7 +12064,7 @@ packages: dev: false file:projects/lead-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-od6TTUKq72g4CBbHS06/M64kzZK//B9NF7aftYl91RVwL+gm5JQLFCLwksdo4NE7VSyb7VWop199pYfMaKOcdg==, tarball: file:projects/lead-resources.tgz} + resolution: {integrity: sha512-gd3fCKU/E1ZrIFQBm966XaGVIH/RB0C4XyfWQFueKhy95cUbjiEe88Jf6Xh+4a7hkF96VMKc3z51SH1pLGtnFA==, tarball: file:projects/lead-resources.tgz} id: file:projects/lead-resources.tgz name: '@rush-temp/lead-resources' version: 0.0.0 @@ -12075,7 +12083,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -12133,7 +12141,7 @@ packages: dev: false file:projects/login-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-85HwyicQhgSqbvQ/Lb+/qMxRZmCxC71u7HaZMVcw92Fa3Mu3wEH0kB0JHyPjvMA/mgrs6uvJmPh5bJwQHhkB0Q==, tarball: file:projects/login-resources.tgz} + resolution: {integrity: sha512-eAuUAbu+JIIlqoDJeMMhg55BzH41L3tflVTSTnGpoLsBooCLQQXAaJlmtJgRz8QlrMSH7PJYjy+xcl3TlnI/Rw==, tarball: file:projects/login-resources.tgz} id: file:projects/login-resources.tgz name: '@rush-temp/login-resources' version: 0.0.0 @@ -12152,7 +12160,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -12209,7 +12217,7 @@ packages: dev: false file:projects/model-all.tgz_typescript@4.5.4: - resolution: {integrity: sha512-KDrsTCCCt8hoQSwtTAQOsgbNjHRb9g270jtlXlT320EbfHNUslOzMLwns850SHjoA+6XxerLV/ItBBPMc4xCUw==, tarball: file:projects/model-all.tgz} + resolution: {integrity: sha512-MnTIVPbt9yvy+dNZaMUPScfjYp12cF1P8GXay1jUizfZyTaeMsb+uN3Z2jnzQPhrAJxW4DDjAoCLO+yK7xGbRA==, tarball: file:projects/model-all.tgz} id: file:projects/model-all.tgz name: '@rush-temp/model-all' version: 0.0.0 @@ -12444,7 +12452,7 @@ packages: dev: false file:projects/model-recruit.tgz_typescript@4.5.4: - resolution: {integrity: sha512-M2V190p42TMpwBagu8ts2iLvDu2hFprTiMX2i/KIwANipE9lJGHmjYlvh7HEGsdSYbeFavMuWdqoUNWjnCjy1Q==, tarball: file:projects/model-recruit.tgz} + resolution: {integrity: sha512-8jDIXUx3KFtzeCO7AChSlND5+RBTLNG83eAO8syMdJVAmOA5UpEhFQvpPZCRLhYEzj3VG2zgJg7USd+CZKEPhA==, tarball: file:projects/model-recruit.tgz} id: file:projects/model-recruit.tgz name: '@rush-temp/model-recruit' version: 0.0.0 @@ -12588,6 +12596,27 @@ packages: - typescript dev: false + file:projects/model-tags.tgz_typescript@4.5.4: + resolution: {integrity: sha512-M+xHdfGituHUoH7YgkHc5lw2TXsvV3jvf3g73EpjJgGl4NFclNd1VkBtyEQ9Czsjy3N/jff1B2FePFu7u2p6FA==, tarball: file:projects/model-tags.tgz} + id: file:projects/model-tags.tgz + name: '@rush-temp/model-tags' + 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-task.tgz_typescript@4.5.4: resolution: {integrity: sha512-yIegyos933cu1NpvP/oFomGd8Yo9wKWjyoQyxNO26ERynPFdYIZ7yRKeiIpVp/P2T2xT3M9510GfdWJx6/MkgA==, tarball: file:projects/model-task.tgz} id: file:projects/model-task.tgz @@ -12780,7 +12809,7 @@ packages: dev: false file:projects/notification-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-raqBx9exX10O9GZ0ltv6U0XgNO1DZxV5HzvCjACbdqL9C9wjlxcFci+0iOpwSLxMzPZn1IkkKDo18q5bH2oC7g==, tarball: file:projects/notification-resources.tgz} + resolution: {integrity: sha512-saNzTGP0Bz7u0f2qimEbhL3w9xhZb8pgenUpAuDpeT6fMPmG7CNYpkwefhayEeIUmU4frbIC5kjAOMSPUxsg6A==, tarball: file:projects/notification-resources.tgz} id: file:projects/notification-resources.tgz name: '@rush-temp/notification-resources' version: 0.0.0 @@ -12801,7 +12830,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -12837,7 +12866,7 @@ packages: dev: false file:projects/panel.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-RxiNEW/PUGlF6/JrOvYWaUVfmC4kVnrd1tUQBpUM9tcRQebTwjPIUF1+V19xT63Rer6sRmz4SWo9v6/BtRAJlw==, tarball: file:projects/panel.tgz} + resolution: {integrity: sha512-who5tWJNg2zsPL6xJZpXBXDoD7Oqyo/HlaLsfW7Z1GwuvI9o9aRHE59FhrnKDPF4y6rGEWlWlPekj50AZ02Etw==, tarball: file:projects/panel.tgz} id: file:projects/panel.tgz name: '@rush-temp/panel' version: 0.0.0 @@ -12856,7 +12885,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -12952,7 +12981,7 @@ packages: dev: false file:projects/presentation.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-QhfoHLyegkl3JsleXaZkSWsVQgikJM9jdqkla2mRW3kHyQAYWPBITUnVVWu1qBADViJupNZdYmYEcm7oeMF5og==, tarball: file:projects/presentation.tgz} + resolution: {integrity: sha512-GIyAnCPE65c4sOMVJp3I6T/DLNb4u5v/Xb8BVRzH2XT4Kr+ia3YYjcElDIHBPCw5tYtLRwG2CTPraXVX6Bzs+g==, tarball: file:projects/presentation.tgz} id: file:projects/presentation.tgz name: '@rush-temp/presentation' version: 0.0.0 @@ -12972,7 +13001,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -12988,7 +13017,7 @@ packages: dev: false file:projects/prod.tgz_sass@1.45.0+typescript@4.5.4: - resolution: {integrity: sha512-+ke/wA1+S6z6mgIO2IAwtov8K5Zpc4ScgRc+cdU34ie7/5JpPmdoQhDgxG3QbPrf+BlADvJEaVOVZRvml16TVw==, tarball: file:projects/prod.tgz} + resolution: {integrity: sha512-a6wHdZhYC1h8QOrfCkS6HQz4L0llPz8YJqJaJPH/tkMHanaUSixCiCcjr+T+ANBfacXQf8GjTqvPBir/Hd3FzQ==, tarball: file:projects/prod.tgz} id: file:projects/prod.tgz name: '@rush-temp/prod' version: 0.0.0 @@ -13080,7 +13109,7 @@ packages: dev: false file:projects/recruit-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-8pFvHj9M1cjOrdU5vQPrYmV0Yqd76ErwcRrAuiiLXpKIpYqlRdAXTb9Xe34PygnwWRI3icjB+dl22AINYksbHA==, tarball: file:projects/recruit-resources.tgz} + resolution: {integrity: sha512-nZLvaOr850iq0AQidGvnFlzPWLdwosv9ORArSA5ihRGea8X+RpzD/pjDswtJp6nF7G2ctmL8tFLN9cvFA45lDw==, tarball: file:projects/recruit-resources.tgz} id: file:projects/recruit-resources.tgz name: '@rush-temp/recruit-resources' version: 0.0.0 @@ -13101,7 +13130,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -13441,7 +13470,7 @@ packages: dev: false file:projects/setting-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-SwFlNFhQYEi0au+47ljHLl/kE1MKP2Oi290r8xZJL4VMNUHzTsKiHlS7teyE7p1IdGar1AIUm2Xi3JveR5NFIA==, tarball: file:projects/setting-resources.tgz} + resolution: {integrity: sha512-95Lkou5zRLY34iyo6xN43hbmFt85hPoUTeVstR2ksAeUjY8WqN50g/Ctdht2Skwp/kYBYooHPdv9HcXzW1ZCRw==, tarball: file:projects/setting-resources.tgz} id: file:projects/setting-resources.tgz name: '@rush-temp/setting-resources' version: 0.0.0 @@ -13460,7 +13489,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -13495,6 +13524,82 @@ packages: - supports-color dev: false + file:projects/tags-assets.tgz: + resolution: {integrity: sha512-uixenCqg/yD5B+cz50s+Gnf4zYqUeZAOY9mRnkir7zj2YkW1hUYOqQPo2Wf5KqXbs5Vk8wVUQkJsN/lLfPJ8sg==, tarball: file:projects/tags-assets.tgz} + name: '@rush-temp/tags-assets' + 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/tags-resources.tgz_096c09b0b673a57c275d9767a12070b1: + resolution: {integrity: sha512-xpKU24ySwiNF8/saqTeQwCobyfHrLNMFuqTxBzU8vscuFchbyJF6dWQH4tzrJ+KKcxoqwm4flPE+XjDPimlYCQ==, tarball: file:projects/tags-resources.tgz} + id: file:projects/tags-resources.tgz + name: '@rush-temp/tags-resources' + version: 0.0.0 + dependencies: + '@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 + 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 + sass: 1.45.0 + svelte: 3.44.3 + svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce + svelte-loader: 3.1.2_svelte@3.44.3 + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f + typescript: 4.5.4 + transitivePeerDependencies: + - '@babel/core' + - coffeescript + - less + - node-sass + - postcss + - postcss-load-config + - pug + - stylus + - sugarss + - supports-color + dev: false + + file:projects/tags.tgz: + resolution: {integrity: sha512-dDZIEx6iNmqyXw6CrYnmGL1PV3li1Tjuc0OSYr00PKg6UsvhrX3ah6J6W9jHm7tjL25ccMkhrVjpWQQOJsC6LQ==, tarball: file:projects/tags.tgz} + name: '@rush-temp/tags' + 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/task-assets.tgz_typescript@4.5.4: resolution: {integrity: sha512-bCvFP9wagvARCMvWtA+jW7xngIqfQ9Rhta9r4LnQsaW2wlWlXR4VT/nOcmJSqG75B7v2wsyRJ5EPe4uPbkjSlw==, tarball: file:projects/task-assets.tgz} id: file:projects/task-assets.tgz @@ -13518,7 +13623,7 @@ packages: dev: false file:projects/task-resources.tgz_6cae74ea501386c76c405ad0408e0339: - resolution: {integrity: sha512-s/MtNSr/ERDwItbtGtcaE+nnTepUKUsuD2SrtGcpgYUXT3XarZyVaGHC4Q9ol6Ok7RajfDSdAj1ZD8V2LLn3Pw==, tarball: file:projects/task-resources.tgz} + resolution: {integrity: sha512-Y9e5rh5mS7fo7fNYNwkFF3F3qXGSZ8/nPE39eo2D47o1yznt/wS9ysm2Vr9YQlR7OMIt4EVVHYtHzcIkX14fhw==, tarball: file:projects/task-resources.tgz} id: file:projects/task-resources.tgz name: '@rush-temp/task-resources' version: 0.0.0 @@ -13537,7 +13642,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f transitivePeerDependencies: - '@babel/core' - coffeescript @@ -13595,7 +13700,7 @@ packages: dev: false file:projects/telegram-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-hreZkJ3tRwh2rXC7K/WlkA99TDatMLuHwtC2dTXqivRNEKhwH0RHDXgO1jrjulj7uSNj5+0ksOeQtlWBYmhRiw==, tarball: file:projects/telegram-resources.tgz} + resolution: {integrity: sha512-YUNGd590d01AlbNqj/inzsZqKT+9c+4+Nu9OO20ceAHaYLyzevi/BQ7ylD6abBB36N6+xDv6DYM2bRQyy52gfg==, tarball: file:projects/telegram-resources.tgz} id: file:projects/telegram-resources.tgz name: '@rush-temp/telegram-resources' version: 0.0.0 @@ -13614,7 +13719,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -13671,7 +13776,7 @@ packages: dev: false file:projects/templates-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-ms8wJBkOIYY64ptCGC6pQ6M+jQrKrVtJBLbDJNtp6Fxo+D1G8ksbg1S80hvpeZctOhUK14j3AkVt90IYgtgLbA==, tarball: file:projects/templates-resources.tgz} + resolution: {integrity: sha512-aC1aeAq1kTUIclyGtGb3E9WcLnjDOCC9cyue5vHbPcfa+V087gaNYesq/mmHH9JUYQ4pMS+orhPu+a4ccvzvLw==, tarball: file:projects/templates-resources.tgz} id: file:projects/templates-resources.tgz name: '@rush-temp/templates-resources' version: 0.0.0 @@ -13690,7 +13795,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -13749,7 +13854,7 @@ packages: dev: false file:projects/text-editor.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-mHTzsgBUTd2d3Y8xW1y8GOTLU0r4IyOsF7RpV1N4GVwaqnCZSxuFdC/T7PqX33XYI0hD6q+0KNegRs+MzvOeeg==, tarball: file:projects/text-editor.tgz} + resolution: {integrity: sha512-vy7fgtS17yBOQWGmK5vJZge3wZqlltQPnJEY4e84iIBMLJbc104qQ09j5dG5ssjXvg5Z4yZBcDhi10dIOzm24g==, tarball: file:projects/text-editor.tgz} id: file:projects/text-editor.tgz name: '@rush-temp/text-editor' version: 0.0.0 @@ -13780,7 +13885,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -13796,7 +13901,7 @@ packages: dev: false file:projects/theme.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-/eBxOZXj6j3ii3CPm7zYEW8ln/whv2YBSxPWdz3PXG14Taq1i6UItMyRSCrYfB6QI9Vt4fS5Y75Zbj4+iJmAJg==, tarball: file:projects/theme.tgz} + resolution: {integrity: sha512-k3dSeeTOEwtDIXU6vbNdMUGc+hsb6tmJxNOHakJGqvzTYqKqALzoJ9iVsvoiOBRViYielE7L8Fm6PBNqVi/lWA==, tarball: file:projects/theme.tgz} id: file:projects/theme.tgz name: '@rush-temp/theme' version: 0.0.0 @@ -13815,7 +13920,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -13872,7 +13977,7 @@ packages: dev: false file:projects/ui.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-MXRC/kqyCWkIGfEkt7Y4EKAps3XKvhjmXpdEOX+3f5KYn3OybiYvztOGK8hEmNBy3Pu56rYWkkzCWdbw97jVEg==, tarball: file:projects/ui.tgz} + resolution: {integrity: sha512-+VUS/8pCD2vXIMkRLWtVtXBIRBkYboAdHBsDdyusTWJPx6LKVwuUw77IJAosqQEhwREbpVYq7GdP5q5ZgmwGEg==, tarball: file:projects/ui.tgz} id: file:projects/ui.tgz name: '@rush-temp/ui' version: 0.0.0 @@ -13891,7 +13996,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -13929,7 +14034,7 @@ packages: dev: false file:projects/view-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-6d+XQfG6pEVmJN/wmtsjCSSC0XGG/ZQC0jWePTo+6OfT2W3ot4f2G4unN8Loj8rHdcgOG4Df+/zW1eg+J3goTQ==, tarball: file:projects/view-resources.tgz} + resolution: {integrity: sha512-0uqaCFXTCJs/1Iax4FnM7ohqcR63vtE2rkoFeW1++xJS32DXDJiPDRjTsV620g1kBdcryMMBS35cBP3h+TVNMg==, tarball: file:projects/view-resources.tgz} id: file:projects/view-resources.tgz name: '@rush-temp/view-resources' version: 0.0.0 @@ -13949,7 +14054,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' @@ -14006,7 +14111,7 @@ packages: dev: false file:projects/workbench-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-zqDa0vWNFseFg/iea/NI651RzhI018W2GA8H5dC3O2CXTkwTCUPGNK00HzqTTxWTYTNZ0tQ+5EI7+n4bs+n56w==, tarball: file:projects/workbench-resources.tgz} + resolution: {integrity: sha512-LkjBY56xBzdbBuRYGBCygy33nv5nDlXFHistZo8sEdX7TU0z0x2fz+4kFvYeywTvw3P2AT63nCfa1JydmfBMDg==, tarball: file:projects/workbench-resources.tgz} id: file:projects/workbench-resources.tgz name: '@rush-temp/workbench-resources' version: 0.0.0 @@ -14025,7 +14130,7 @@ packages: svelte: 3.44.3 svelte-check: 2.3.0_4374c622c67ed7479ff0e44c29d09bce svelte-loader: 3.1.2_svelte@3.44.3 - svelte-preprocess: 4.10.1_14d64cad431e31f100de7363af24a44f + svelte-preprocess: 4.10.3_14d64cad431e31f100de7363af24a44f typescript: 4.5.4 transitivePeerDependencies: - '@babel/core' diff --git a/common/scripts/build_docker.sh b/common/scripts/build_docker.sh new file mode 100755 index 0000000000..f01dbf5c30 --- /dev/null +++ b/common/scripts/build_docker.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +roots='./server/server ./server/front ./pods/account' + +for r in $roots +do + pushd $r + rushx docker:build + popd +done \ No newline at end of file diff --git a/dev/docker-compose.yaml b/dev/docker-compose.yaml index 7392349eff..20763fe5d4 100644 --- a/dev/docker-compose.yaml +++ b/dev/docker-compose.yaml @@ -77,6 +77,7 @@ services: - mongodb - elastic - minio + - apm-server ports: - 3333:3333 environment: @@ -86,46 +87,41 @@ services: - MINIO_ENDPOINT=minio - MINIO_ACCESS_KEY=minioadmin - MINIO_SECRET_KEY=minioadmin - # - APM_SERVER_URL=http://apm-server:8200 - # apm-server: - # image: docker.elastic.co/apm/apm-server:7.14.2 - # depends_on: - # elastic: - # condition: service_healthy - # kibana: - # condition: service_healthy - # elastic: - # condition: service_healthy - # cap_add: ["CHOWN", "DAC_OVERRIDE", "SETGID", "SETUID"] - # cap_drop: ["ALL"] - # ports: - # - 8200:8200 - # command: > - # apm-server -e - # -E apm-server.rum.enabled=true - # -E setup.kibana.host=kibana:5601 - # -E setup.template.settings.index.number_of_replicas=0 - # -E apm-server.kibana.enabled=true - # -E apm-server.kibana.host=kibana:5601 - # -E output.elasticsearch.hosts=["elastic:9200"] - # healthcheck: - # interval: 10s - # retries: 12 - # test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:8200/ - # kibana: - # image: docker.elastic.co/kibana/kibana:7.14.2 - # depends_on: - # elastic: - # condition: service_healthy - # environment: - # ELASTICSEARCH_URL: http://elastic:9200 - # ELASTICSEARCH_HOSTS: http://elastic:9200 - # ports: - # - 5601:5601 - # healthcheck: - # interval: 10s - # retries: 20 - # test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:5601/api/status + - APM_SERVER_URL=http://apm-server:8200 + apm-server: + image: docker.elastic.co/apm/apm-server:7.14.2 + depends_on: + - "elastic" + - "kibana" + cap_add: ["CHOWN", "DAC_OVERRIDE", "SETGID", "SETUID"] + cap_drop: ["ALL"] + ports: + - 8200:8200 + command: | + apm-server -e + -E apm-server.rum.enabled=true + -E setup.kibana.host=kibana:5601 + -E setup.template.settings.index.number_of_replicas=0 + -E apm-server.kibana.enabled=true + -E apm-server.kibana.host=kibana:5601 + -E output.elasticsearch.hosts=["elastic:9200"] + healthcheck: + interval: 10s + retries: 12 + test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:8200/ + kibana: + image: docker.elastic.co/kibana/kibana:7.14.2 + depends_on: + - "elastic" + environment: + ELASTICSEARCH_URL: http://elastic:9200 + ELASTICSEARCH_HOSTS: http://elastic:9200 + ports: + - 5601:5601 + healthcheck: + interval: 10s + retries: 20 + test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:5601/api/status volumes: db: diff --git a/dev/prod/package.json b/dev/prod/package.json index d535e65a2a..2c3483391a 100644 --- a/dev/prod/package.json +++ b/dev/prod/package.json @@ -103,6 +103,9 @@ "@anticrm/notification-assets": "~0.6.0", "@anticrm/notification-resources": "~0.6.0", "@anticrm/core": "~0.6.16", - "@anticrm/rekoni": "~0.6.0" + "@anticrm/rekoni": "~0.6.0", + "@anticrm/tags-assets": "~0.6.0", + "@anticrm/tags": "~0.6.0", + "@anticrm/tags-resources": "~0.6.0" } } diff --git a/dev/prod/src/platform.ts b/dev/prod/src/platform.ts index a56ab5676e..21f5d91b5f 100644 --- a/dev/prod/src/platform.ts +++ b/dev/prod/src/platform.ts @@ -14,7 +14,6 @@ // import { addLocation } from '@anticrm/platform' -import {Data, Version} from '@anticrm/core' import login, { loginId } from '@anticrm/login' import workbench, { workbenchId } from '@anticrm/workbench' @@ -34,6 +33,7 @@ import { imageCropperId } from '@anticrm/image-cropper' import { inventoryId } from '@anticrm/inventory' import { templatesId } from '@anticrm/templates' import { notificationId } from '@anticrm/notification' +import { tagsId } from '@anticrm/tags' import rekoni from '@anticrm/rekoni' import '@anticrm/login-assets' @@ -52,6 +52,7 @@ import '@anticrm/workbench-assets' import '@anticrm/inventory-assets' import '@anticrm/templates-assets' import '@anticrm/notification-assets' +import '@anticrm/tags-assets' import { setMetadata } from '@anticrm/platform' export async function configurePlatform() { @@ -89,4 +90,5 @@ export async function configurePlatform() { addLocation(inventoryId, () => import(/* webpackChunkName: "inventory" */ '@anticrm/inventory-resources')) addLocation(templatesId, () => import(/* webpackChunkName: "templates" */ '@anticrm/templates-resources')) addLocation(notificationId, () => import(/* webpackChunkName: "notification" */ '@anticrm/notification-resources')) + addLocation(tagsId, () => import(/* webpackChunkName: "tags" */ '@anticrm/tags-resources')) } diff --git a/dev/prod/webpack.config.js b/dev/prod/webpack.config.js index ca14beb62e..b1061bd082 100644 --- a/dev/prod/webpack.config.js +++ b/dev/prod/webpack.config.js @@ -64,7 +64,10 @@ module.exports = { }, emitCss: true, hotReload: !prod, - preprocess: require('svelte-preprocess')({ postcss: true }), + preprocess: require('svelte-preprocess')({ + postcss: true, + sourceMap: !prod, + }), hotOptions: { // Prevent preserving local component state preserveLocalState: true, @@ -199,6 +202,11 @@ module.exports = { changeOrigin: true, logLevel: 'debug' }, + '/import': { + target: 'http://localhost:8081', + changeOrigin: true, + logLevel: 'debug' + }, } : { '/account': { // target: 'https://ftwm71rwag.execute-api.us-west-2.amazonaws.com/stage/', @@ -214,7 +222,7 @@ module.exports = { changeOrigin: true, pathRewrite: { '^/files': '' }, logLevel: 'debug' - }, + } } } } diff --git a/models/all/package.json b/models/all/package.json index 44e69c9c20..ceb8314bd2 100644 --- a/models/all/package.json +++ b/models/all/package.json @@ -54,6 +54,7 @@ "@anticrm/model-templates": "~0.6.0", "@anticrm/model-notification": "~0.6.0", "@anticrm/model-text-editor": "~0.6.0", - "@anticrm/core": "~0.6.13" + "@anticrm/core": "~0.6.13", + "@anticrm/model-tags": "~0.6.0" } } diff --git a/models/all/src/index.ts b/models/all/src/index.ts index d4bbd8ef82..77e005709a 100644 --- a/models/all/src/index.ts +++ b/models/all/src/index.ts @@ -40,6 +40,7 @@ import { createModel as textEditorModel } from '@anticrm/model-text-editor' import { createModel as viewModel } from '@anticrm/model-view' import { createModel as workbenchModel } from '@anticrm/model-workbench' import { createModel as notificationModel } from '@anticrm/model-notification' +import { createModel as tagsModel } from '@anticrm/model-tags' export const version: Data = jsonVersion as Data @@ -68,6 +69,8 @@ const builders = [ serverAttachmentModel, serverContactModel, serverNotificationModel, + tagsModel, + createDemo ] diff --git a/models/core/src/core.ts b/models/core/src/core.ts index 889a5ea221..a08c6a50ab 100644 --- a/models/core/src/core.ts +++ b/models/core/src/core.ts @@ -101,6 +101,9 @@ export class TType extends TObj implements Type { @Model(core.class.TypeString, core.class.Type) export class TTypeString extends TType {} +@Model(core.class.TypeNumber, core.class.Type) +export class TTypeNumber extends TType {} + @Model(core.class.TypeMarkup, core.class.Type) export class TTypeMarkup extends TType {} diff --git a/models/core/src/index.ts b/models/core/src/index.ts index 7096cde679..56e08aef8f 100644 --- a/models/core/src/index.ts +++ b/models/core/src/index.ts @@ -32,7 +32,8 @@ import { TTypeString, TTypeMarkup, TTypeTimestamp, - TVersion + TVersion, + TTypeNumber } from './core' import { TAccount, TSpace } from './security' import { @@ -82,6 +83,7 @@ export function createModel (builder: Builder): void { TCollection, TTypeDate, TArrOf, - TVersion + TVersion, + TTypeNumber ) } diff --git a/models/recruit/package.json b/models/recruit/package.json index dc4eb65fed..4067137c4e 100644 --- a/models/recruit/package.json +++ b/models/recruit/package.json @@ -43,6 +43,7 @@ "@anticrm/task": "~0.6.0", "@anticrm/model-task": "~0.6.0", "@anticrm/workbench": "~0.6.1", - "@anticrm/model-presentation": "~0.6.0" + "@anticrm/model-presentation": "~0.6.0", + "@anticrm/model-tags": "~0.6.0" } } diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index d71a740055..4831838a12 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -15,12 +15,26 @@ import type { Employee } from '@anticrm/contact' import { Doc, FindOptions, IndexKind, Lookup, Ref, Timestamp } from '@anticrm/core' -import { Builder, Collection, Index, Mixin, Model, Prop, TypeBoolean, TypeDate, TypeMarkup, TypeRef, TypeString, UX } from '@anticrm/model' +import { + Builder, + Collection, + Index, + Mixin, + Model, + Prop, + TypeBoolean, + TypeDate, + TypeMarkup, + TypeRef, + TypeString, + UX +} from '@anticrm/model' import attachment from '@anticrm/model-attachment' import chunter from '@anticrm/model-chunter' import contact, { TPerson } from '@anticrm/model-contact' import core, { TSpace } from '@anticrm/model-core' import presentation from '@anticrm/model-presentation' +import tags from '@anticrm/model-tags' import task, { TSpaceWithStates, TTask } from '@anticrm/model-task' import view from '@anticrm/model-view' import workbench from '@anticrm/model-workbench' @@ -73,6 +87,9 @@ export class TCandidate extends TPerson implements Candidate { @Prop(TypeString(), 'Source' as IntlString) @Index(IndexKind.FullText) source?: string + + @Prop(Collection(tags.class.TagReference, recruit.string.SkillLabel), recruit.string.SkillsLabel) + skills?: number } @Model(recruit.class.Applicant, task.class.Task) @@ -142,6 +159,13 @@ export function createModel (builder: Builder): void { label: workbench.string.Archive, position: 'top', visibleIf: workbench.function.HasArchiveSpaces + }, + { + id: 'skills', + component: recruit.component.SkillsView, + icon: tags.icon.Tags, + label: recruit.string.SkillsLabel, + position: 'bottom' } ] } @@ -166,7 +190,12 @@ export function createModel (builder: Builder): void { descriptor: view.viewlet.Table, // eslint-disable-next-line @typescript-eslint/consistent-type-assertions options: { - lookup: { _id: { channels: contact.class.Channel } } + lookup: { + _id: { + channels: contact.class.Channel + // skills: tags.class.TagReference // Required if TagsItemPresenter is used + } + } } as FindOptions, // TODO: fix config: [ '', @@ -175,13 +204,22 @@ export function createModel (builder: Builder): void { { presenter: recruit.component.ApplicationsPresenter, label: 'Apps', sortingKey: 'applications' }, { presenter: attachment.component.AttachmentsPresenter, label: 'Files', sortingKey: 'attachments' }, { presenter: chunter.component.CommentsPresenter, label: 'Comments', sortingKey: 'comments' }, + { + // key: '$lookup.skills', // Required, since presenter require list of tag references or '' and TagsPopupPresenter + presenter: tags.component.TagsPresenter, // tags.component.TagsPresenter, + label: recruit.string.SkillsLabel, + // sortingKey: '$lookup.skills', + props: { + _class: recruit.mixin.Candidate, + key: 'skills' + } + }, 'modifiedOn', '$lookup.channels' ] }) - const applicantTableLookup: Lookup = - { + const applicantTableLookup: Lookup = { attachedTo: [recruit.mixin.Candidate, { _id: { channels: contact.class.Channel } }], state: task.class.State, assignee: contact.class.Employee, @@ -208,8 +246,7 @@ export function createModel (builder: Builder): void { ] }) - const applicantKanbanLookup: Lookup = - { + const applicantKanbanLookup: Lookup = { attachedTo: recruit.mixin.Candidate, assignee: contact.class.Employee } @@ -299,11 +336,16 @@ export function createModel (builder: Builder): void { recruit.space.VacancyTemplates ) - builder.createDoc(presentation.class.ObjectSearchCategory, core.space.Model, { - icon: recruit.icon.Application, - label: recruit.string.SearchApplication, - query: recruit.completion.ApplicationQuery - }, recruit.completion.ApplicationCategory) + builder.createDoc( + presentation.class.ObjectSearchCategory, + core.space.Model, + { + icon: recruit.icon.Application, + label: recruit.string.SearchApplication, + query: recruit.completion.ApplicationQuery + }, + recruit.completion.ApplicationCategory + ) builder.createDoc(view.class.ActionTarget, core.space.Model, { target: recruit.class.Vacancy, diff --git a/models/recruit/src/plugin.ts b/models/recruit/src/plugin.ts index 1dc56e91c9..c2bb39a12a 100644 --- a/models/recruit/src/plugin.ts +++ b/models/recruit/src/plugin.ts @@ -56,7 +56,8 @@ export default mergeIds(recruitId, recruit, { TemplatesIcon: '' as AnyComponent, Applications: '' as AnyComponent, Candidates: '' as AnyComponent, - CreateCandidate: '' as AnyComponent + CreateCandidate: '' as AnyComponent, + SkillsView: '' as AnyComponent }, template: { DefaultVacancy: '' as Ref diff --git a/models/tags/.eslintrc.js b/models/tags/.eslintrc.js new file mode 100644 index 0000000000..c3c2c49417 --- /dev/null +++ b/models/tags/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: ['./node_modules/@anticrm/model-rig/profiles/default/config/eslint.config.json'], + parserOptions: { + tsconfigRootDir: __dirname, + project: './tsconfig.json' + } +} diff --git a/models/tags/.npmignore b/models/tags/.npmignore new file mode 100644 index 0000000000..e3ec093c38 --- /dev/null +++ b/models/tags/.npmignore @@ -0,0 +1,4 @@ +* +!/lib/** +!CHANGELOG.md +/lib/**/__tests__/ diff --git a/models/tags/config/rig.json b/models/tags/config/rig.json new file mode 100644 index 0000000000..e9a9ee9add --- /dev/null +++ b/models/tags/config/rig.json @@ -0,0 +1,18 @@ +// The "rig.json" file directs tools to look for their config files in an external package. +// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package +{ + "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", + + /** + * (Required) The name of the rig package to inherit from. + * It should be an NPM package name with the "-rig" suffix. + */ + "rigPackageName": "@anticrm/model-rig" + + /** + * (Optional) Selects a config profile from the rig package. The name must consist of + * lowercase alphanumeric words separated by hyphens, for example "sample-profile". + * If omitted, then the "default" profile will be used." + */ + // "rigProfile": "your-profile-name" +} diff --git a/models/tags/package.json b/models/tags/package.json new file mode 100644 index 0000000000..3f08783088 --- /dev/null +++ b/models/tags/package.json @@ -0,0 +1,38 @@ +{ + "name": "@anticrm/model-tags", + "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/activity": "~0.6.0", + "@anticrm/model": "~0.6.0", + "@anticrm/core": "~0.6.0", + "@anticrm/platform": "~0.6.5", + "@anticrm/tags": "~0.6.0", + "@anticrm/tags-resources": "~0.6.0", + "@anticrm/ui": "~0.6.0", + "@anticrm/model-core": "~0.6.0", + "@anticrm/model-view": "~0.6.0" + } +} diff --git a/models/tags/src/index.ts b/models/tags/src/index.ts new file mode 100644 index 0000000000..5429a19424 --- /dev/null +++ b/models/tags/src/index.ts @@ -0,0 +1,88 @@ +// +// Copyright © 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 { Class, Doc, Domain, IndexKind, Ref } from '@anticrm/core' +import { Builder, Index, Model, Prop, TypeRef, TypeString, UX } from '@anticrm/model' +import core, { TAttachedDoc, TDoc } from '@anticrm/model-core' +import view from '@anticrm/model-view' +import type { TagElement, TagReference } from '@anticrm/tags' +import { ObjectDDParticipant } from '../../view/node_modules/@anticrm/view/lib' +import tags from './plugin' + +export { tags as default } + +export const DOMAIN_TAGS = 'tags' as Domain + +@Model(tags.class.TagElement, core.class.Doc, DOMAIN_TAGS) +@UX(tags.string.TagElementLabel) +export class TTagElement extends TDoc implements TagElement { + @Prop(TypeString(), tags.string.TitleLabel) + @Index(IndexKind.FullText) + title!: string + + @Prop(TypeRef(core.class.Class), tags.string.TargetClassLabel) + targetClass!: Ref> + + @Prop(TypeString(), tags.string.DescriptionLabel) + @Index(IndexKind.FullText) + description!: string + + @Prop(TypeString(), tags.string.ColorLabel) + color!: number +} + +@Model(tags.class.TagReference, core.class.AttachedDoc, DOMAIN_TAGS) +@UX(tags.string.TagReferenceLabel) +export class TTagReference extends TAttachedDoc implements TagReference { + @Prop(TypeString(), tags.string.TitleLabel) + @Index(IndexKind.FullText) + title!: string + + @Prop(TypeRef(tags.class.TagElement), tags.string.TagLabel) + tag!: Ref + + @Prop(TypeString(), tags.string.ColorLabel) + color!: number +} + +export function createModel (builder: Builder): void { + builder.createModel(TTagElement, TTagReference) + + builder.createDoc( + core.class.Space, + core.space.Model, + { + name: 'Tags', + description: 'Space for all tags', + private: true, + archived: false, + members: [] + }, + tags.space.Tags + ) + + builder.mixin(tags.class.TagReference, core.class.Class, view.mixin.AttributeEditor, { + editor: tags.component.Tags + }) + + builder.mixin(tags.class.TagReference, core.class.Class, view.mixin.AttributePresenter, { + presenter: tags.component.TagReferencePresenter + }) + builder.mixin(tags.class.TagElement, core.class.Class, view.mixin.AttributePresenter, { + presenter: tags.component.TagElementPresenter + }) + builder.mixin, ObjectDDParticipant>(tags.class.TagElement, core.class.Class, view.mixin.ObjectDDParticipant, { + collectDocs: tags.dd.DeleteTagElement + }) +} diff --git a/models/tags/src/plugin.ts b/models/tags/src/plugin.ts new file mode 100644 index 0000000000..d98eb2d419 --- /dev/null +++ b/models/tags/src/plugin.ts @@ -0,0 +1,44 @@ +// +// Copyright © 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 { Doc, TxOperations } from '@anticrm/core' +import { IntlString, mergeIds, Resource } from '@anticrm/platform' +import { tagsId } from '@anticrm/tags' +import tags from '@anticrm/tags-resources/src/plugin' +import type { AnyComponent } from '@anticrm/ui' + +export default mergeIds(tagsId, tags, { + // Without it, CLI version is failed with some svelte dependency exception. + component: { + Tags: '' as AnyComponent, + TagReferencePresenter: '' as AnyComponent, + TagsPresenter: '' as AnyComponent, + TagsItemPresenter: '' as AnyComponent + }, + string: { + TagElementLabel: '' as IntlString, + TitleLabel: '' as IntlString, + DescriptionLabel: '' as IntlString, + ColorLabel: '' as IntlString, + CategoryLabel: '' as IntlString, + WeightLabel: '' as IntlString, + TagReferenceLabel: '' as IntlString, + TagLabel: '' as IntlString, + TargetClassLabel: '' as IntlString, + TagReference: '' as IntlString + }, + dd: { + DeleteTagElement: '' as Resource<(doc: Doc, client: TxOperations) => Promise> + } +}) diff --git a/models/tags/tsconfig.json b/models/tags/tsconfig.json new file mode 100644 index 0000000000..1d60db76b4 --- /dev/null +++ b/models/tags/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "./node_modules/@anticrm/model-rig/profiles/default/tsconfig.json", + + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib", + } +} \ No newline at end of file diff --git a/models/view/src/index.ts b/models/view/src/index.ts index 3d383d777c..afc79b9927 100644 --- a/models/view/src/index.ts +++ b/models/view/src/index.ts @@ -118,6 +118,14 @@ export function createModel (builder: Builder): void { presenter: view.component.StringPresenter }) + builder.mixin(core.class.TypeNumber, core.class.Class, view.mixin.AttributeEditor, { + editor: view.component.NumberEditor + }) + + builder.mixin(core.class.TypeNumber, core.class.Class, view.mixin.AttributePresenter, { + presenter: view.component.NumberPresenter + }) + builder.mixin(core.class.TypeMarkup, core.class.Class, view.mixin.AttributePresenter, { presenter: view.component.HTMLPresenter }) diff --git a/models/view/src/plugin.ts b/models/view/src/plugin.ts index ead35babc2..a0cd7944c9 100644 --- a/models/view/src/plugin.ts +++ b/models/view/src/plugin.ts @@ -31,6 +31,8 @@ export default mergeIds(viewId, view, { component: { StringEditor: '' as AnyComponent, StringPresenter: '' as AnyComponent, + NumberEditor: '' as AnyComponent, + NumberPresenter: '' as AnyComponent, HTMLPresenter: '' as AnyComponent, BooleanPresenter: '' as AnyComponent, BooleanEditor: '' as AnyComponent, diff --git a/packages/core/src/__tests__/memdb.test.ts b/packages/core/src/__tests__/memdb.test.ts index fef2af63c2..5e0202296a 100644 --- a/packages/core/src/__tests__/memdb.test.ts +++ b/packages/core/src/__tests__/memdb.test.ts @@ -178,7 +178,7 @@ describe('memdb', () => { }) expect(zero).toHaveLength(0) const end = await model.findAll(core.class.Doc, { - space: { $like: 'core.space.M%' } + space: { $like: 'core:space:M%' } }) expect(end).toHaveLength(expectedLength) const mid = await model.findAll(core.class.Doc, { diff --git a/packages/core/src/classes.ts b/packages/core/src/classes.ts index 0626f6d748..6c6801d3f3 100644 --- a/packages/core/src/classes.ts +++ b/packages/core/src/classes.ts @@ -172,6 +172,7 @@ export interface RefTo extends Type>> { */ export interface Collection extends Type { of: Ref> + itemLabel?: IntlString } /** diff --git a/packages/core/src/component.ts b/packages/core/src/component.ts index 8e57a50ef8..f7c0237cb9 100644 --- a/packages/core/src/component.ts +++ b/packages/core/src/component.ts @@ -44,6 +44,7 @@ export default plugin(coreId, { Space: '' as Ref>, Account: '' as Ref>, TypeString: '' as Ref>>, + TypeNumber: '' as Ref>>, TypeMarkup: '' as Ref>>, TypeBoolean: '' as Ref>>, TypeTimestamp: '' as Ref>>, diff --git a/packages/core/src/predicate.ts b/packages/core/src/predicate.ts index 0b91d3ed85..16047c3aab 100644 --- a/packages/core/src/predicate.ts +++ b/packages/core/src/predicate.ts @@ -16,6 +16,7 @@ import type { Doc } from './classes' import { getObjectValue } from './objvalue' +import { escapeLikeForRegexp } from './utils' type Predicate = (docs: Doc[]) => Doc[] type PredicateFactory = (pred: any, propertyKey: string) => Predicate @@ -42,7 +43,7 @@ const predicates: Record = { }, $like: (query: string, propertyKey: string): Predicate => { - const searchString = query.split('%').join('.*') + const searchString = query.split('%').map(it => escapeLikeForRegexp(it)).join('.*') const regex = RegExp(`^${searchString}$`, 'i') return (docs) => execPredicate(docs, propertyKey, (value) => regex.test(value)) diff --git a/packages/core/src/utils.ts b/packages/core/src/utils.ts index eb6b3825eb..3d14e823e5 100644 --- a/packages/core/src/utils.ts +++ b/packages/core/src/utils.ts @@ -13,7 +13,7 @@ // limitations under the License. // -import type { Doc, Ref, Account } from './classes' +import type { Account, Doc, Ref } from './classes' function toHex (value: number, chars: number): string { const result = value.toString(16) @@ -59,3 +59,9 @@ export function getCurrentAccount (): Account { return currentAccount } export function setCurrentAccount (account: Account): void { currentAccount = account } +/** + * @public + */ +export function escapeLikeForRegexp (value: string): string { + return value.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&') +} diff --git a/packages/model/src/dsl.ts b/packages/model/src/dsl.ts index 73c24b250d..3e076a9eac 100644 --- a/packages/model/src/dsl.ts +++ b/packages/model/src/dsl.ts @@ -328,6 +328,13 @@ export function TypeString (): Type { return { _class: core.class.TypeString, label: 'TypeString' as IntlString } } +/** + * @public + */ +export function TypeNumber (): Type { + return { _class: core.class.TypeNumber, label: 'TypeNumber' as IntlString } +} + /** * @public */ @@ -366,8 +373,8 @@ export function TypeRef (_class: Ref>): RefTo { /** * @public */ -export function Collection (clazz: Ref>): TypeCollection { - return { _class: core.class.Collection, of: clazz, label: 'Collection' as IntlString } +export function Collection (clazz: Ref>, itemLabel?: IntlString): TypeCollection { + return { _class: core.class.Collection, of: clazz, label: 'Collection' as IntlString, itemLabel } } /** diff --git a/packages/panel/package.json b/packages/panel/package.json index 613389e797..d619f7faa5 100644 --- a/packages/panel/package.json +++ b/packages/panel/package.json @@ -15,7 +15,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "svelte-check": "^2.2.10", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", diff --git a/packages/presentation/package.json b/packages/presentation/package.json index 56188024a1..1f4390e2d4 100644 --- a/packages/presentation/package.json +++ b/packages/presentation/package.json @@ -15,7 +15,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", diff --git a/packages/presentation/src/attributes.ts b/packages/presentation/src/attributes.ts index 81ea56804a..64cd4ea2bb 100644 --- a/packages/presentation/src/attributes.ts +++ b/packages/presentation/src/attributes.ts @@ -1,4 +1,4 @@ -import core, { AnyAttribute, AttachedDoc, Class, Client, Doc, Ref, TxOperations } from '@anticrm/core' +import { AnyAttribute, Class, Client, Doc, Ref, TxOperations } from '@anticrm/core' /** * @public diff --git a/packages/presentation/src/components/Card.svelte b/packages/presentation/src/components/Card.svelte index 0fa060cc43..161d6b9ccf 100644 --- a/packages/presentation/src/components/Card.svelte +++ b/packages/presentation/src/components/Card.svelte @@ -30,6 +30,7 @@ export let spaceLabel: IntlString | undefined = undefined export let spacePlaceholder: IntlString | undefined = undefined export let label: IntlString + export let labelProps: any | undefined = undefined export let okAction: () => void export let canSave: boolean = false @@ -42,7 +43,7 @@
{} }>
-
+
{#if $$slots.error}
diff --git a/packages/rekoni/src/types.ts b/packages/rekoni/src/types.ts index 10535f3460..5c446d3216 100644 --- a/packages/rekoni/src/types.ts +++ b/packages/rekoni/src/types.ts @@ -32,4 +32,5 @@ export interface ReconiDocument { facebook?: string telegram?: string twitter?: string + skills: string[] } diff --git a/packages/text-editor/package.json b/packages/text-editor/package.json index 14bb927c8f..3b46d583fb 100644 --- a/packages/text-editor/package.json +++ b/packages/text-editor/package.json @@ -14,7 +14,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", diff --git a/packages/theme/package.json b/packages/theme/package.json index 3aad32dc0e..0abb24298b 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -14,7 +14,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index febed84c73..d382af1994 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -130,6 +130,9 @@ p:last-child { margin-block-end: 0; } align-items: stretch; flex-wrap: nowrap; } +.flex-wrap { + flex-wrap: wrap; +} .flex-row-top { display: flex; align-items: flex-start; diff --git a/packages/theme/styles/components.scss b/packages/theme/styles/components.scss index eb9266d2fc..af08ba63d4 100644 --- a/packages/theme/styles/components.scss +++ b/packages/theme/styles/components.scss @@ -1,14 +1,14 @@ // // 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. // @@ -27,14 +27,14 @@ &.short { display: flex; align-items: center; - flex-wrap: nowrap; + flex-wrap: nowrap; } &.full { display: grid; grid-template-columns: auto; grid-auto-flow: column; grid-auto-columns: min-content; - gap: .75rem; + gap: 0.75rem; align-items: center; } &.mirror { @@ -46,7 +46,9 @@ padding: 0 6.5rem 0 2.5rem; } } - &.divide { border-bottom: 1px solid var(--theme-menu-divider); } + &.divide { + border-bottom: 1px solid var(--theme-menu-divider); + } .ac-header__wrap-description, .ac-header__wrap-title { @@ -59,10 +61,12 @@ flex-direction: column; flex-grow: 1; } - .ac-header__wrap-title { align-items: center; } + .ac-header__wrap-title { + align-items: center; + } .ac-header__icon { - margin-right: .5rem; + margin-right: 0.5rem; color: var(--theme-content-color); } .ac-header__title { @@ -78,7 +82,7 @@ } .ac-header__description { min-width: 0; - font-size: .75rem; + font-size: 0.75rem; color: var(--theme-content-dark-color); overflow: hidden; @@ -87,7 +91,7 @@ /* autoprefixer: ignore next */ -webkit-box-orient: vertical; -webkit-line-clamp: 2; - line-clamp: 2; + line-clamp: 2; user-select: none; } @@ -99,15 +103,19 @@ height: 2.5rem; color: var(--theme-content-trans-color); background-color: transparent; - border-radius: .5rem; + border-radius: 0.5rem; cursor: pointer; - - &:hover { color: var(--theme-caption-color); } + + &:hover { + color: var(--theme-caption-color); + } &.selected { color: var(--theme-content-accent-color); background-color: var(--theme-button-bg-enabled); cursor: default; - &:hover { color: var(--theme-caption-color); } + &:hover { + color: var(--theme-caption-color); + } } } } @@ -121,12 +129,18 @@ height: 3.5rem; border-bottom: 1px solid var(--theme-zone-bg); - &::-webkit-scrollbar:horizontal { height: .25rem; } - &::-webkit-scrollbar-track { margin: 0; } + &::-webkit-scrollbar:horizontal { + height: 0.25rem; + } + &::-webkit-scrollbar-track { + margin: 0; + } &::-webkit-scrollbar-thumb { background-color: var(--theme-menu-divider); - border-radius: .25rem; - &:hover { background-color: var(--theme-card-divider); } + border-radius: 0.25rem; + &:hover { + background-color: var(--theme-card-divider); + } } .ac-subtitle-content { @@ -143,10 +157,14 @@ align-items: flex-start; height: 100%; - &.columns { flex-direction: row; } + &.columns { + flex-direction: row; + } &.hScroll { overflow-x: auto; - &::-webkit-scrollbar-track { margin: 2.5rem; } + &::-webkit-scrollbar-track { + margin: 2.5rem; + } } .ac-column { @@ -175,8 +193,10 @@ border: 1px solid transparent; border-radius: 12px; cursor: pointer; - - &:hover { background-color: var(--theme-bg-accent-color); } + + &:hover { + background-color: var(--theme-bg-accent-color); + } &.selected { background-color: var(--theme-button-bg-enabled); border-color: var(--theme-bg-accent-color); @@ -194,10 +214,13 @@ } &__space-3 { flex-shrink: 0; - min-height: .75rem; - height: .75rem; + min-height: 0.75rem; + height: 0.75rem; } - } + } +} +.ac-column__list-item + .ac-column__list-item { + margin-top: 0.75rem; } .ac-column__list-item + .ac-column__list-item { margin-top: .75rem; } diff --git a/packages/theme/styles/popups.scss b/packages/theme/styles/popups.scss index c404ec3c82..556c226b70 100644 --- a/packages/theme/styles/popups.scss +++ b/packages/theme/styles/popups.scss @@ -152,6 +152,17 @@ } } } + + .ap-footer { + flex-shrink: 0; + display: grid; + grid-auto-flow: column; + direction: rtl; + grid-gap: 0.5rem; + justify-content: start; + padding: 1rem 1.75rem 1.75rem 0.5rem; + overflow: hidden; + } } // Remove highlights table rows and hide dots in popups diff --git a/packages/ui/package.json b/packages/ui/package.json index adfcd435d1..e1de0ac01f 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -15,7 +15,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "svelte-check": "^2.2.10", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", diff --git a/packages/ui/src/colors.ts b/packages/ui/src/colors.ts index f2bb3433d0..13b6904d22 100644 --- a/packages/ui/src/colors.ts +++ b/packages/ui/src/colors.ts @@ -39,3 +39,10 @@ function hashCode (str: string): number { return str.split('').reduce((prevHash, currVal) => (((prevHash << 5) - prevHash) + currVal.charCodeAt(0)) | 0, 0) } + +/** + * @public + */ +export function getColorNumberByText (str: string): number { + return hashCode(str) +} diff --git a/packages/ui/src/components/ActionIcon.svelte b/packages/ui/src/components/ActionIcon.svelte index 0ac1823973..e5780f23fc 100644 --- a/packages/ui/src/components/ActionIcon.svelte +++ b/packages/ui/src/components/ActionIcon.svelte @@ -21,6 +21,7 @@ import Tooltip from './Tooltip.svelte' export let label: IntlString = '' as IntlString + export let labelProps: any = undefined export let direction: TooltipAligment | undefined = undefined export let icon: Asset | AnySvelteComponent export let size: 'small' | 'medium' | 'large' @@ -28,7 +29,7 @@ export let invisible: boolean = false - +
diff --git a/packages/ui/src/components/EditWithIcon.svelte b/packages/ui/src/components/EditWithIcon.svelte index 6200632da9..592f0e26c6 100644 --- a/packages/ui/src/components/EditWithIcon.svelte +++ b/packages/ui/src/components/EditWithIcon.svelte @@ -44,6 +44,7 @@
textHTML.focus()}>
+ {#if value}
{ value = ''; dispatch('change', '') }}> diff --git a/packages/ui/src/components/Section.svelte b/packages/ui/src/components/Section.svelte index ad00f09b16..9d09012425 100644 --- a/packages/ui/src/components/Section.svelte +++ b/packages/ui/src/components/Section.svelte @@ -14,13 +14,14 @@ --> @@ -28,9 +29,9 @@
{ closed = !closed - }} -> - + }}> + +
{#if closed}{:else}{/if}
diff --git a/plugins/activity-resources/package.json b/plugins/activity-resources/package.json index c624af5b6e..7917d26425 100644 --- a/plugins/activity-resources/package.json +++ b/plugins/activity-resources/package.json @@ -14,7 +14,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", diff --git a/plugins/activity-resources/src/activity.ts b/plugins/activity-resources/src/activity.ts index 2eae276ce8..c5c3ea54f6 100644 --- a/plugins/activity-resources/src/activity.ts +++ b/plugins/activity-resources/src/activity.ts @@ -1,8 +1,10 @@ import core, { AnyAttribute, AttachedDoc, + Attribute, Class, Client, + Collection, Doc, DocumentUpdate, Hierarchy, @@ -62,6 +64,8 @@ export interface DisplayTx { updated: boolean mixin: boolean removed: boolean + + collectionAttribute?: Attribute> } /** @@ -227,12 +231,28 @@ class ActivityImpl implements Activity { let updateCUD = false let mixinCUD = false const hierarchy = this.client.getHierarchy() + + let collectionAttribute: Attribute> | undefined if (hierarchy.isDerived(tx._class, core.class.TxCollectionCUD)) { - tx = getCollectionTx(tx as TxCollectionCUD) + const cltx = tx as TxCollectionCUD + tx = getCollectionTx(cltx) + + // Check mixin classes for desired attribute + for (const cl of hierarchy.getDescendants(cltx.objectClass)) { + try { + collectionAttribute = hierarchy.getAttribute(cl, cltx.collection) as Attribute> + if (collectionAttribute !== undefined) { + break + } + } catch (err: any) { + // Ignore + } + } collectionCUD = true } let firstTx = parents.get(tx.objectId) const result: DisplayTx = newDisplayTx(tx, hierarchy) + result.collectionAttribute = collectionAttribute result.doc = firstTx?.doc ?? result.doc diff --git a/plugins/activity-resources/src/components/utils.ts b/plugins/activity-resources/src/components/utils.ts index 551ad8c0d1..14ffb9d816 100644 --- a/plugins/activity-resources/src/components/utils.ts +++ b/plugins/activity-resources/src/components/utils.ts @@ -1,11 +1,11 @@ import type { TxViewlet } from '@anticrm/activity' -import activity from '../plugin' -import core, { Class, Doc, Ref, TxCUD, TxOperations } from '@anticrm/core' +import core, { AttachedDoc, Class, Collection, Doc, Ref, TxCUD, TxOperations } from '@anticrm/core' import { Asset, IntlString, translate } from '@anticrm/platform' import { AnyComponent, AnySvelteComponent } from '@anticrm/ui' import { AttributeModel } from '@anticrm/view' import { buildModel, getObjectPresenter } from '@anticrm/view-resources' import { ActivityKey, activityKey, DisplayTx } from '../activity' +import activity from '../plugin' export type TxDisplayViewlet = | (Pick & { @@ -24,7 +24,15 @@ async function createPseudoViewlet ( } const docClass: Class = client.getModel().getObject(doc._class) - const trLabel = await translate(docClass.label, {}) + let trLabel = await translate(docClass.label, {}) + if (dtx.collectionAttribute !== undefined) { + const itemLabel = (dtx.collectionAttribute.type as Collection).itemLabel + if (itemLabel !== undefined) { + trLabel = await translate(itemLabel, {}) + } + } + + // Check if it is attached doc and collection have title override. const presenter = await getObjectPresenter(client, doc._class, { key: 'doc-presenter' }) if (presenter !== undefined) { return { diff --git a/plugins/attachment-resources/package.json b/plugins/attachment-resources/package.json index e1e06f4f2e..3e19ea39d3 100644 --- a/plugins/attachment-resources/package.json +++ b/plugins/attachment-resources/package.json @@ -15,7 +15,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", diff --git a/plugins/chunter-resources/package.json b/plugins/chunter-resources/package.json index da99cc47db..e388253f76 100644 --- a/plugins/chunter-resources/package.json +++ b/plugins/chunter-resources/package.json @@ -15,7 +15,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", diff --git a/plugins/contact-resources/package.json b/plugins/contact-resources/package.json index 83e6da34dc..d1d9b9ae34 100644 --- a/plugins/contact-resources/package.json +++ b/plugins/contact-resources/package.json @@ -15,7 +15,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", diff --git a/plugins/devmodel-resources/package.json b/plugins/devmodel-resources/package.json index 3e777f9089..2de79eab17 100644 --- a/plugins/devmodel-resources/package.json +++ b/plugins/devmodel-resources/package.json @@ -14,7 +14,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", diff --git a/plugins/gmail-resources/package.json b/plugins/gmail-resources/package.json index bc84449cba..df5fddc4f0 100644 --- a/plugins/gmail-resources/package.json +++ b/plugins/gmail-resources/package.json @@ -16,7 +16,7 @@ "@anticrm/platform-rig": "~0.6.0", "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@typescript-eslint/eslint-plugin": "^5.4.0", "eslint-plugin-import": "^2.25.3", "eslint-plugin-promise": "^5.1.1", diff --git a/plugins/image-cropper-resources/package.json b/plugins/image-cropper-resources/package.json index d6b2b6f6de..ee87f9ae91 100644 --- a/plugins/image-cropper-resources/package.json +++ b/plugins/image-cropper-resources/package.json @@ -16,7 +16,7 @@ "@anticrm/platform-rig": "~0.6.0", "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@typescript-eslint/eslint-plugin": "^5.4.0", "eslint-plugin-import": "^2.25.3", "eslint-plugin-promise": "^5.1.1", diff --git a/plugins/inventory-resources/package.json b/plugins/inventory-resources/package.json index aef5f976f9..15dc43eaf4 100644 --- a/plugins/inventory-resources/package.json +++ b/plugins/inventory-resources/package.json @@ -16,7 +16,7 @@ "@anticrm/platform-rig": "~0.6.0", "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@typescript-eslint/eslint-plugin": "^5.4.0", "eslint-plugin-import": "^2.25.3", "eslint-plugin-promise": "^5.1.1", diff --git a/plugins/lead-resources/package.json b/plugins/lead-resources/package.json index b34d4c47c3..bd83860288 100644 --- a/plugins/lead-resources/package.json +++ b/plugins/lead-resources/package.json @@ -14,7 +14,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", diff --git a/plugins/login-resources/package.json b/plugins/login-resources/package.json index f441dc9583..9af46f255e 100644 --- a/plugins/login-resources/package.json +++ b/plugins/login-resources/package.json @@ -14,7 +14,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", diff --git a/plugins/notification-resources/package.json b/plugins/notification-resources/package.json index c070fd6fa1..ddfdd7b611 100644 --- a/plugins/notification-resources/package.json +++ b/plugins/notification-resources/package.json @@ -17,7 +17,7 @@ "@anticrm/platform-rig": "~0.6.0", "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@typescript-eslint/eslint-plugin": "^5.4.0", "eslint-plugin-import": "^2.25.3", "eslint-plugin-promise": "^5.1.1", diff --git a/plugins/recruit-assets/lang/en.json b/plugins/recruit-assets/lang/en.json index 3321537963..b181d55f42 100644 --- a/plugins/recruit-assets/lang/en.json +++ b/plugins/recruit-assets/lang/en.json @@ -34,7 +34,9 @@ "Remote": "Remote", "SearchApplication": "Search for application...", "Application": "Application", - "AssignedRecruiter": "Assigned recruiter" + "AssignedRecruiter": "Assigned recruiter", + "SkillLabel": "Skill", + "SkillsLabel": "Skills" }, "status": { "CandidateRequired": "Please select candidate", diff --git a/plugins/recruit-resources/package.json b/plugins/recruit-resources/package.json index 0523821012..3cdf14f051 100644 --- a/plugins/recruit-resources/package.json +++ b/plugins/recruit-resources/package.json @@ -14,7 +14,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", @@ -52,6 +52,7 @@ "@anticrm/task": "~0.6.0", "@anticrm/task-resources": "~0.6.0", "@anticrm/contact-resources": "~0.6.0", - "@anticrm/rekoni": "~0.6.0" + "@anticrm/rekoni": "~0.6.0", + "@anticrm/tags": "~0.6.0" } } diff --git a/plugins/recruit-resources/src/components/CreateCandidate.svelte b/plugins/recruit-resources/src/components/CreateCandidate.svelte index 6b7a041858..ca81705b1b 100644 --- a/plugins/recruit-resources/src/components/CreateCandidate.svelte +++ b/plugins/recruit-resources/src/components/CreateCandidate.svelte @@ -14,15 +14,31 @@ --> @@ -307,6 +424,22 @@
+
+
+ +
+ { + addTagRef(evt.detail) + }} + on:delete={(evt) => { + skills = skills.filter((it) => it._id !== evt.detail) + }} + /> +
+
diff --git a/plugins/tags-resources/src/components/EditTagElement.svelte b/plugins/tags-resources/src/components/EditTagElement.svelte new file mode 100644 index 0000000000..bef7da07f1 --- /dev/null +++ b/plugins/tags-resources/src/components/EditTagElement.svelte @@ -0,0 +1,120 @@ + + + + 0} + space={tags.space.Tags} + on:close={() => { + dispatch('close') + }} + okLabel={tags.string.SaveLabel} +> +
+
+
+
{ + showPopup(ColorsPopup, {}, evt.target, (col) => { + if (col != null) { + data.color = col + } + }) + }} + /> + +
+ +
+ +
+
+
+ + + diff --git a/plugins/tags-resources/src/components/TagElementPresenter.svelte b/plugins/tags-resources/src/components/TagElementPresenter.svelte new file mode 100644 index 0000000000..22374d37f2 --- /dev/null +++ b/plugins/tags-resources/src/components/TagElementPresenter.svelte @@ -0,0 +1,39 @@ + + + +{#if value} + {#if edit} +
{ + showPopup(EditTagElement, { value, keyTitle }, evt.target) + }} + > + +
+ {:else} + + {/if} +{/if} diff --git a/plugins/tags-resources/src/components/TagItem.svelte b/plugins/tags-resources/src/components/TagItem.svelte new file mode 100644 index 0000000000..1e12db767b --- /dev/null +++ b/plugins/tags-resources/src/components/TagItem.svelte @@ -0,0 +1,73 @@ + + + + +
+ {name} + {#if action} +
+ { + dispatch('action') + }} + /> +
+ {/if} +
+
+ + diff --git a/plugins/tags-resources/src/components/TagReferencePresenter.svelte b/plugins/tags-resources/src/components/TagReferencePresenter.svelte new file mode 100644 index 0000000000..63bfa6a4be --- /dev/null +++ b/plugins/tags-resources/src/components/TagReferencePresenter.svelte @@ -0,0 +1,24 @@ + + + +{#if value} + +{/if} diff --git a/plugins/tags-resources/src/components/Tags.svelte b/plugins/tags-resources/src/components/Tags.svelte new file mode 100644 index 0000000000..6f19e7be53 --- /dev/null +++ b/plugins/tags-resources/src/components/Tags.svelte @@ -0,0 +1,66 @@ + + + + addRef(evt.detail)} + on:delete={(evt) => removeTag(evt.detail)} +/> diff --git a/plugins/tags-resources/src/components/TagsEditor.svelte b/plugins/tags-resources/src/components/TagsEditor.svelte new file mode 100644 index 0000000000..d1a744d014 --- /dev/null +++ b/plugins/tags-resources/src/components/TagsEditor.svelte @@ -0,0 +1,131 @@ + + + +
+ {#if showTitle} +
+
+
+
+ {/if} +
+
+
+ + + +
+
+ {#if items.length === 0} + {#if keyLabel} +
+
+ {/if} + {/if} + {#each items as tag} + { + removeTag(tag._id) + }} + /> + {/each} +
+
+
+
+ + diff --git a/plugins/tags-resources/src/components/TagsItemPresenter.svelte b/plugins/tags-resources/src/components/TagsItemPresenter.svelte new file mode 100644 index 0000000000..0b7c210790 --- /dev/null +++ b/plugins/tags-resources/src/components/TagsItemPresenter.svelte @@ -0,0 +1,28 @@ + + + +{#each values as v, i} + {#if i < 2} + + {/if} +{/each} diff --git a/plugins/tags-resources/src/components/TagsPopup.svelte b/plugins/tags-resources/src/components/TagsPopup.svelte new file mode 100644 index 0000000000..e9e4c7574b --- /dev/null +++ b/plugins/tags-resources/src/components/TagsPopup.svelte @@ -0,0 +1,124 @@ + + + +
+
+
+
+ + +
+ +
+
+
+
+
+
+
+
+
+ {#each available as element} +
{ + addTag(element) + }} + > +
+ { + addTag(element) + }} + /> +
+
+ {/each} +
+
+ +
+ + diff --git a/plugins/tags-resources/src/components/TagsPresentationPopup.svelte b/plugins/tags-resources/src/components/TagsPresentationPopup.svelte new file mode 100644 index 0000000000..b27abd23b7 --- /dev/null +++ b/plugins/tags-resources/src/components/TagsPresentationPopup.svelte @@ -0,0 +1,55 @@ + + + +
+ {#each items as tag, i} + + {/each} +
+ + diff --git a/plugins/tags-resources/src/components/TagsPresenter.svelte b/plugins/tags-resources/src/components/TagsPresenter.svelte new file mode 100644 index 0000000000..9c13379126 --- /dev/null +++ b/plugins/tags-resources/src/components/TagsPresenter.svelte @@ -0,0 +1,39 @@ + + + +{#if tags > 0} + +
+  {tags} +
+
+{/if} diff --git a/plugins/tags-resources/src/components/TagsView.svelte b/plugins/tags-resources/src/components/TagsView.svelte new file mode 100644 index 0000000000..52c7467953 --- /dev/null +++ b/plugins/tags-resources/src/components/TagsView.svelte @@ -0,0 +1,78 @@ + + + +
+
+
+ +
+ + { + updateResultQuery(search) + }} + /> +
+ + + + +
diff --git a/plugins/tags-resources/src/index.ts b/plugins/tags-resources/src/index.ts new file mode 100644 index 0000000000..f6dcbe3354 --- /dev/null +++ b/plugins/tags-resources/src/index.ts @@ -0,0 +1,43 @@ +// Copyright © 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 { Doc, TxOperations } from '@anticrm/core' +import { Resources } from '@anticrm/platform' +import { TagElement } from '@anticrm/tags' +import TagElementPresenter from './components/TagElementPresenter.svelte' +import TagReferencePresenter from './components/TagReferencePresenter.svelte' +import Tags from './components/Tags.svelte' +import TagsPresenter from './components/TagsPresenter.svelte' +import TagsItemPresenter from './components/TagsItemPresenter.svelte' +import TagsView from './components/TagsView.svelte' +import TagsEditor from './components/TagsEditor.svelte' +import tags from './plugin' + +async function DeleteTagElement (doc: TagElement, client: TxOperations): Promise { + return await client.findAll(tags.class.TagReference, { tag: doc._id }) +} + +export default async (): Promise => ({ + component: { + Tags, + TagReferencePresenter, + TagElementPresenter, + TagsPresenter, + TagsView, + TagsEditor, + TagsItemPresenter + }, + dd: { + DeleteTagElement + } +}) diff --git a/plugins/tags-resources/src/plugin.ts b/plugins/tags-resources/src/plugin.ts new file mode 100644 index 0000000000..1bfc331f5e --- /dev/null +++ b/plugins/tags-resources/src/plugin.ts @@ -0,0 +1,43 @@ +// Copyright © 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 { IntlString, mergeIds } from '@anticrm/platform' +import tags, { tagsId } from '@anticrm/tags' +import { AnyComponent } from '@anticrm/ui' + +export default mergeIds(tagsId, tags, { + component: { + TagElementPresenter: '' as AnyComponent + }, + string: { + NoTags: '' as IntlString, + AddTag: '' as IntlString, + EditTag: '' as IntlString, + Plural: '' as IntlString, + AddTagTooltip: '' as IntlString, + AddNowTooltip: '' as IntlString, + CreateItemLabel: '' as IntlString, + CancelLabel: '' as IntlString, + SearchCreate: '' as IntlString, + NoItems: '' as IntlString, + TagDescriptionLabel: '' as IntlString, + TagDescriptionPlaceholder: '' as IntlString, + WeightPlaceholder: '' as IntlString, + CategoryPlaceholder: '' as IntlString, + TagTooltip: '' as IntlString, + Tags: '' as IntlString, + Tag: '' as IntlString, + TagName: '' as IntlString, + SaveLabel: '' as IntlString + } +}) diff --git a/plugins/tags-resources/src/utils.ts b/plugins/tags-resources/src/utils.ts new file mode 100644 index 0000000000..65212c33fc --- /dev/null +++ b/plugins/tags-resources/src/utils.ts @@ -0,0 +1,19 @@ +// Copyright © 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. + +export function getTagStyle (color: string): string { + return ` + background: ${color + '33'}; + border: 1px solid ${color + '66'}; + ` +} diff --git a/plugins/tags-resources/svelte.config.js b/plugins/tags-resources/svelte.config.js new file mode 100644 index 0000000000..944a06f73e --- /dev/null +++ b/plugins/tags-resources/svelte.config.js @@ -0,0 +1,5 @@ +const sveltePreprocess = require('svelte-preprocess') + +module.exports = { + preprocess: sveltePreprocess() +}; \ No newline at end of file diff --git a/plugins/tags-resources/tsconfig.json b/plugins/tags-resources/tsconfig.json new file mode 100644 index 0000000000..cabe5aefad --- /dev/null +++ b/plugins/tags-resources/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "moduleResolution": "node", + "target": "esnext", + "module": "esnext", + "declaration": true, + "outDir": "./lib", + "strict": true, + "esModuleInterop": true, + "lib": [ + "esnext", + "dom" + ] + } +} \ No newline at end of file diff --git a/plugins/tags/.eslintrc.js b/plugins/tags/.eslintrc.js new file mode 100644 index 0000000000..5da5872d4a --- /dev/null +++ b/plugins/tags/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: ['./node_modules/@anticrm/platform-rig/profiles/default/config/eslint.config.json'], + parserOptions: { + tsconfigRootDir: __dirname, + project: './tsconfig.json' + } +} diff --git a/plugins/tags/.npmignore b/plugins/tags/.npmignore new file mode 100644 index 0000000000..e3ec093c38 --- /dev/null +++ b/plugins/tags/.npmignore @@ -0,0 +1,4 @@ +* +!/lib/** +!CHANGELOG.md +/lib/**/__tests__/ diff --git a/plugins/tags/config/rig.json b/plugins/tags/config/rig.json new file mode 100644 index 0000000000..af1257a896 --- /dev/null +++ b/plugins/tags/config/rig.json @@ -0,0 +1,18 @@ +// The "rig.json" file directs tools to look for their config files in an external package. +// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package +{ + "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", + + /** + * (Required) The name of the rig package to inherit from. + * It should be an NPM package name with the "-rig" suffix. + */ + "rigPackageName": "@anticrm/platform-rig" + + /** + * (Optional) Selects a config profile from the rig package. The name must consist of + * lowercase alphanumeric words separated by hyphens, for example "sample-profile". + * If omitted, then the "default" profile will be used." + */ + // "rigProfile": "your-profile-name" +} diff --git a/plugins/tags/package.json b/plugins/tags/package.json new file mode 100644 index 0000000000..5a9a7de704 --- /dev/null +++ b/plugins/tags/package.json @@ -0,0 +1,33 @@ +{ + "name": "@anticrm/tags", + "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/platform": "~0.6.5", + "@anticrm/core": "~0.6.11", + "@anticrm/ui": "~0.6.0" + } +} diff --git a/plugins/tags/src/index.ts b/plugins/tags/src/index.ts new file mode 100644 index 0000000000..81623162c7 --- /dev/null +++ b/plugins/tags/src/index.ts @@ -0,0 +1,60 @@ +// +// Copyright © 2022 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 type { AttachedDoc, Class, Doc, Ref, Space } from '@anticrm/core' +import type { Asset, Plugin } from '@anticrm/platform' +import { plugin } from '@anticrm/platform' +import { AnyComponent } from '@anticrm/ui' + +/** + * @public + */ +export interface TagElement extends Doc { + title: string + targetClass: Ref> + description: string + color: number +} + +/** + * @public + */ +export interface TagReference extends AttachedDoc { + tag: Ref + title: string // Copy of title for full text search, updated with trigger. + color: number // Copy of color from tagElement. Updated with trigger. +} + +/** + * @public + */ +export const tagsId = 'tags' as Plugin + +export default plugin(tagsId, { + class: { + TagElement: '' as Ref>, + TagReference: '' as Ref> + }, + space: { + Tags: '' as Ref + }, + icon: { + Tags: '' as Asset + }, + component: { + TagsView: '' as AnyComponent, + TagsEditor: '' as AnyComponent + } +}) diff --git a/plugins/tags/tsconfig.json b/plugins/tags/tsconfig.json new file mode 100644 index 0000000000..32045300ce --- /dev/null +++ b/plugins/tags/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json", + + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib", + "lib": ["esnext", "dom"] + } +} \ No newline at end of file diff --git a/plugins/task-assets/lang/en.json b/plugins/task-assets/lang/en.json index 2295d9e47b..da81ea459c 100644 --- a/plugins/task-assets/lang/en.json +++ b/plugins/task-assets/lang/en.json @@ -62,8 +62,7 @@ "DoneStatesLost": "Done status / Lost", "AllStates": "All states", "DoneStates": "Done states", - "States": "States", - "ChooseAColor": "Choose a color", + "States": "States", "SearchTask": "Search for task...", "NoDoneState": "Not done" } diff --git a/plugins/task-resources/package.json b/plugins/task-resources/package.json index 3acda6d1cc..1e5885ff9e 100644 --- a/plugins/task-resources/package.json +++ b/plugins/task-resources/package.json @@ -15,7 +15,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", diff --git a/plugins/task-resources/src/components/state/ColorsPopup.svelte b/plugins/task-resources/src/components/state/ColorsPopup.svelte deleted file mode 100644 index f6b32f2605..0000000000 --- a/plugins/task-resources/src/components/state/ColorsPopup.svelte +++ /dev/null @@ -1,51 +0,0 @@ - - - - - -
- {#each colors as color, i} -
{ dispatch('close', i) }} /> - {/each} -
- - - diff --git a/plugins/task-resources/src/components/state/StatesEditor.svelte b/plugins/task-resources/src/components/state/StatesEditor.svelte index d6d47351aa..9c8cac0480 100644 --- a/plugins/task-resources/src/components/state/StatesEditor.svelte +++ b/plugins/task-resources/src/components/state/StatesEditor.svelte @@ -20,7 +20,7 @@ import type { DoneState, State } from '@anticrm/task' import { CircleButton, IconAdd, IconMoreH, Label, showPopup, getPlatformColor } from '@anticrm/ui' import { createEventDispatcher } from 'svelte' - import ColorsPopup from './ColorsPopup.svelte' + import { ColorsPopup } from '@anticrm/view-resources' import Circles from './Circles.svelte' import StatusesPopup from './StatusesPopup.svelte' import task from '../../plugin' diff --git a/plugins/task-resources/src/plugin.ts b/plugins/task-resources/src/plugin.ts index 690117cf6d..d7840cf760 100644 --- a/plugins/task-resources/src/plugin.ts +++ b/plugins/task-resources/src/plugin.ts @@ -58,7 +58,6 @@ export default mergeIds(taskId, task, { DoneStatesWon: '' as IntlString, DoneStatesLost: '' as IntlString, AllStates: '' as IntlString, - ChooseAColor: '' as IntlString, NoDoneState: '' as IntlString }, status: { diff --git a/plugins/telegram-resources/package.json b/plugins/telegram-resources/package.json index 5f27d572c2..c642d86057 100644 --- a/plugins/telegram-resources/package.json +++ b/plugins/telegram-resources/package.json @@ -15,7 +15,7 @@ "@anticrm/platform-rig": "~0.6.0", "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@typescript-eslint/eslint-plugin": "^5.4.0", "eslint-plugin-import": "^2.25.3", "eslint-plugin-promise": "^5.1.1", diff --git a/plugins/telegram-resources/src/components/Connect.svelte b/plugins/telegram-resources/src/components/Connect.svelte index d30d1e92a4..16e7021ca7 100644 --- a/plugins/telegram-resources/src/components/Connect.svelte +++ b/plugins/telegram-resources/src/components/Connect.svelte @@ -134,7 +134,7 @@
{#if secondFactor}

- + {:else if requested}

diff --git a/plugins/templates-resources/package.json b/plugins/templates-resources/package.json index 00a46e0c51..89461ed8ec 100644 --- a/plugins/templates-resources/package.json +++ b/plugins/templates-resources/package.json @@ -16,7 +16,7 @@ "@anticrm/platform-rig": "~0.6.0", "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@typescript-eslint/eslint-plugin": "^5.4.0", "eslint-plugin-import": "^2.25.3", "eslint-plugin-promise": "^5.1.1", diff --git a/plugins/view-assets/lang/en.json b/plugins/view-assets/lang/en.json index 7ccd894354..018d77e5be 100644 --- a/plugins/view-assets/lang/en.json +++ b/plugins/view-assets/lang/en.json @@ -7,6 +7,7 @@ "Cancel": "Cancel", "LabelYes": "Yes", "LabelNo": "No", - "LabelNA": "N/A" + "LabelNA": "N/A", + "ChooseAColor": "Choose a color" } } diff --git a/plugins/view-resources/package.json b/plugins/view-resources/package.json index cfd40102b4..3bf55df5ec 100644 --- a/plugins/view-resources/package.json +++ b/plugins/view-resources/package.json @@ -14,7 +14,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", diff --git a/plugins/view-resources/src/components/ColorsPopup.svelte b/plugins/view-resources/src/components/ColorsPopup.svelte index 42a96978c1..2b0de3fe6f 100644 --- a/plugins/view-resources/src/components/ColorsPopup.svelte +++ b/plugins/view-resources/src/components/ColorsPopup.svelte @@ -16,19 +16,20 @@ - +
- {#each colors as color} -
{ dispatch('close', color) }} /> + {#each colors as color, i} +
{ dispatch('close', i) }} /> {/each}
diff --git a/plugins/view-resources/src/components/EditDoc.svelte b/plugins/view-resources/src/components/EditDoc.svelte index 5e4166f67e..8838e699ad 100644 --- a/plugins/view-resources/src/components/EditDoc.svelte +++ b/plugins/view-resources/src/components/EditDoc.svelte @@ -25,10 +25,10 @@ getClient, KeyedAttribute } from '@anticrm/presentation' - import { AnyComponent, Component, Label, Spinner } from '@anticrm/ui' + import { AnyComponent, Component, Label } from '@anticrm/ui' import view from '@anticrm/view' import { createEventDispatcher } from 'svelte' - import { getMixinStyle } from '../utils' + import { getCollectionCounter, getMixinStyle } from '../utils' export let _id: Ref export let _class: Ref> @@ -62,6 +62,7 @@ $: if (object && prevSelected !== object._class) { prevSelected = object._class selectedClass = objectClass._id + parentClass = getParentClass(object._class) mixins = getMixins() } @@ -162,13 +163,6 @@ $: icon = object && getIcon(object._class) - function getCollectionCounter (object: Doc, key: KeyedAttribute): number { - if (hierarchy.isMixin(key.attr.attributeOf)) { - return (hierarchy.as(object, key.attr.attributeOf) as any)[key.key] - } - return (object as any)[key.key] ?? 0 - } - function getParentClass (_class: Ref>): Ref> { const baseDomain = hierarchy.getDomain(_class) const ancestors = hierarchy.getAncestors(_class) @@ -289,9 +283,11 @@ is={collection.editor} props={{ objectId: object._id, - _class: object._class, + _class: collection.key.attr.attributeOf, + object, space: object.space, - [collection.key.key]: getCollectionCounter(object, collection.key) + key: collection.key, + [collection.key.key]: getCollectionCounter(hierarchy, object, collection.key) }} />
diff --git a/plugins/view-resources/src/components/NumberEditor.svelte b/plugins/view-resources/src/components/NumberEditor.svelte new file mode 100644 index 0000000000..6d1cabfaea --- /dev/null +++ b/plugins/view-resources/src/components/NumberEditor.svelte @@ -0,0 +1,35 @@ + + + + + diff --git a/plugins/view-resources/src/components/NumberPresenter.svelte b/plugins/view-resources/src/components/NumberPresenter.svelte new file mode 100644 index 0000000000..76e98a1620 --- /dev/null +++ b/plugins/view-resources/src/components/NumberPresenter.svelte @@ -0,0 +1,21 @@ + + + + +{value} diff --git a/plugins/view-resources/src/index.ts b/plugins/view-resources/src/index.ts index 7fcb50a184..9559d7e015 100644 --- a/plugins/view-resources/src/index.ts +++ b/plugins/view-resources/src/index.ts @@ -23,6 +23,8 @@ import DateEditor from './components/DateEditor.svelte' import DatePresenter from './components/DatePresenter.svelte' import StringEditor from './components/StringEditor.svelte' import StringPresenter from './components/StringPresenter.svelte' +import NumberEditor from './components/NumberEditor.svelte' +import NumberPresenter from './components/NumberPresenter.svelte' import Table from './components/Table.svelte' import TableView from './components/TableView.svelte' import TimestampPresenter from './components/TimestampPresenter.svelte' @@ -32,10 +34,11 @@ import EditDoc from './components/EditDoc.svelte' import RolePresenter from './components/RolePresenter.svelte' import ObjectPresenter from './components/ObjectPresenter.svelte' import HTMLPresenter from './components/HTMLPresenter.svelte' +import ColorsPopup from './components/ColorsPopup.svelte' export { default as ContextMenu } from './components/Menu.svelte' -export { buildModel, getActions, getObjectPresenter, LoadingProps } from './utils' -export { Table, TableView, EditDoc } +export { buildModel, getActions, getObjectPresenter, LoadingProps, getCollectionCounter } from './utils' +export { Table, TableView, EditDoc, ColorsPopup } function Delete (object: Doc): void { showPopup( @@ -65,6 +68,8 @@ export default async (): Promise => ({ component: { StringEditor, StringPresenter, + NumberEditor, + NumberPresenter, BooleanPresenter, BooleanEditor, TableView, diff --git a/plugins/view-resources/src/plugin.ts b/plugins/view-resources/src/plugin.ts index a6c52214d5..43cafac37a 100644 --- a/plugins/view-resources/src/plugin.ts +++ b/plugins/view-resources/src/plugin.ts @@ -25,6 +25,7 @@ export default mergeIds(viewId, view, { Cancel: '' as IntlString, LabelYes: '' as IntlString, LabelNo: '' as IntlString, - LabelNA: '' as IntlString + LabelNA: '' as IntlString, + ChooseAColor: '' as IntlString } }) diff --git a/plugins/view-resources/src/utils.ts b/plugins/view-resources/src/utils.ts index 8b968a5cd1..bdbf6967f8 100644 --- a/plugins/view-resources/src/utils.ts +++ b/plugins/view-resources/src/utils.ts @@ -30,7 +30,7 @@ import core, { } from '@anticrm/core' import type { IntlString } from '@anticrm/platform' import { getResource } from '@anticrm/platform' -import { getAttributePresenterClass } from '@anticrm/presentation' +import { getAttributePresenterClass, KeyedAttribute } from '@anticrm/presentation' import { ErrorPresenter, getPlatformColorForText } from '@anticrm/ui' import type { Action, ActionTarget, BuildModelOptions, ObjectDDParticipant } from '@anticrm/view' import view, { AttributeModel, BuildModelKey } from '@anticrm/view' @@ -117,11 +117,12 @@ async function getPresenter ( if (key.presenter !== undefined) { const { presenter, label, sortingKey } = key return { - key: '', + key: key.key ?? '', sortingKey: sortingKey ?? '', _class, label: label as IntlString, - presenter: await getResource(presenter) + presenter: await getResource(presenter), + props: key.props } } if (key.key.length === 0) { @@ -312,3 +313,9 @@ export function getBooleanLabel (value: boolean | undefined): IntlString { if (value === false) return plugin.string.LabelNo return plugin.string.LabelNA } +export function getCollectionCounter (hierarchy: Hierarchy, object: Doc, key: KeyedAttribute): number { + if (hierarchy.isMixin(key.attr.attributeOf)) { + return (hierarchy.as(object, key.attr.attributeOf) as any)[key.key] + } + return (object as any)[key.key] ?? 0 +} diff --git a/plugins/view/src/index.ts b/plugins/view/src/index.ts index c82c04df04..31d0cecbf1 100644 --- a/plugins/view/src/index.ts +++ b/plugins/view/src/index.ts @@ -99,6 +99,9 @@ export const viewId = 'view' as Plugin export interface BuildModelKey { key: string presenter?: AnyComponent + // A set of extra props passed to presenter. + props?: Record + label?: IntlString sortingKey?: string } diff --git a/plugins/workbench-resources/package.json b/plugins/workbench-resources/package.json index 2f9558eeee..71584697e4 100644 --- a/plugins/workbench-resources/package.json +++ b/plugins/workbench-resources/package.json @@ -14,7 +14,7 @@ "devDependencies": { "svelte-loader": "^3.1.2", "sass": "^1.37.5", - "svelte-preprocess": "^4.7.4", + "svelte-preprocess": "^4.10.3", "@anticrm/platform-rig": "~0.6.0", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", diff --git a/rush.json b/rush.json index dac4c750f4..f54e4a815c 100644 --- a/rush.json +++ b/rush.json @@ -1020,6 +1020,26 @@ "packageName": "@anticrm/server-notification-resources", "projectFolder": "server/notification-resources", "shouldPublish": true - } + }, + { + "packageName": "@anticrm/tags", + "projectFolder": "plugins/tags", + "shouldPublish": true + }, + { + "packageName": "@anticrm/tags-assets", + "projectFolder": "plugins/tags-assets", + "shouldPublish": true + }, + { + "packageName": "@anticrm/tags-resources", + "projectFolder": "plugins/tags-resources", + "shouldPublish": true + }, + { + "packageName": "@anticrm/model-tags", + "projectFolder": "models/tags", + "shouldPublish": true + }, ] } diff --git a/server/mongo/src/storage.ts b/server/mongo/src/storage.ts index 2e27336d68..51f701e58f 100644 --- a/server/mongo/src/storage.ts +++ b/server/mongo/src/storage.ts @@ -16,7 +16,7 @@ import core, { Class, Doc, - DocumentQuery, DOMAIN_MODEL, DOMAIN_TX, FindOptions, FindResult, Hierarchy, isOperator, Lookup, Mixin, ModelDb, Ref, ReverseLookups, SortingOrder, Tx, + DocumentQuery, DOMAIN_MODEL, DOMAIN_TX, escapeLikeForRegexp, FindOptions, FindResult, Hierarchy, isOperator, Lookup, Mixin, ModelDb, Ref, ReverseLookups, SortingOrder, Tx, TxCreateDoc, TxMixin, TxProcessor, TxPutBag, TxRemoveDoc, @@ -58,7 +58,7 @@ abstract class MongoAdapterBase extends TxProcessor { if (keys[0] === '$like') { const pattern = value.$like as string translated[key] = { - $regex: `^${pattern.split('%').join('.*')}$`, + $regex: `^${pattern.split('%').map(it => escapeLikeForRegexp(it)).join('.*')}$`, $options: 'i' } continue