From 8cd179769645db6b0560ec378e3bb5aabe099cea Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Thu, 31 Mar 2022 15:32:42 +0700 Subject: [PATCH] Tracker Issue tracking system (#1243) Signed-off-by: Andrey Sobolev --- common/config/rush/pnpm-lock.yaml | 117 ++++++++- dev/prod/package.json | 6 +- dev/prod/src/platform.ts | 7 +- models/all/package.json | 3 +- models/all/src/index.ts | 2 + models/all/src/migration.ts | 4 +- models/task/src/index.ts | 58 ++--- models/tracker/.eslintrc.js | 7 + models/tracker/.npmignore | 4 + models/tracker/config/rig.json | 18 ++ models/tracker/package.json | 45 ++++ models/tracker/src/creation.ts | 43 ++++ models/tracker/src/index.ts | 222 ++++++++++++++++++ models/tracker/src/migration.ts | 27 +++ models/tracker/src/plugin.ts | 39 +++ models/tracker/tsconfig.json | 8 + packages/presentation/package.json | 3 +- packages/presentation/src/connect.ts | 68 ++++++ packages/presentation/src/index.ts | 1 + packages/presentation/src/plugin.ts | 5 +- packages/theme/styles/_layouts.scss | 1 + packages/theme/styles/common.scss | 5 +- packages/ui/src/components/Component.svelte | 4 +- plugins/calendar-resources/src/plugin.ts | 1 - plugins/calendar/src/index.ts | 3 +- plugins/tracker-assets/.eslintrc.js | 7 + plugins/tracker-assets/assets/icons.svg | 23 ++ plugins/tracker-assets/config/rig.json | 18 ++ plugins/tracker-assets/lang/en.json | 46 ++++ plugins/tracker-assets/lang/ru.json | 22 ++ plugins/tracker-assets/package.json | 33 +++ plugins/tracker-assets/src/index.ts | 28 +++ plugins/tracker-assets/tsconfig.json | 15 ++ plugins/tracker-resources/.eslintrc.js | 7 + plugins/tracker-resources/img/avatar.png | Bin 0 -> 2799 bytes plugins/tracker-resources/img/voltron.png | Bin 0 -> 957 bytes plugins/tracker-resources/package.json | 53 +++++ plugins/tracker-resources/postcss.config.js | 5 + .../src/components/AccountPopup.svelte | 112 +++++++++ .../src/components/AppItem.svelte | 80 +++++++ .../src/components/Card.svelte | 63 +++++ .../src/components/CreateIssue.svelte | 121 ++++++++++ .../src/components/NewIssueHeader.svelte | 26 ++ .../src/components/NopeComponent.svelte | 0 .../src/components/SpaceInfo.svelte | 43 ++++ .../src/components/SpaceSelect.svelte | 79 +++++++ .../src/components/SpacesPopup.svelte | 53 +++++ .../src/components/icons/Collapsed.svelte | 8 + .../src/components/icons/Expanded.svelte | 8 + .../src/components/icons/Mention.svelte | 8 + .../src/components/icons/TopMenu.svelte | 9 + .../src/components/inbox/Inbox.svelte | 1 + .../src/components/issues/Active.svelte | 12 + .../src/components/issues/Backlog.svelte | 7 + .../src/components/issues/Board.svelte | 0 .../issues/CategoryPresenter.svelte | 52 ++++ .../src/components/issues/EditIssue.svelte | 81 +++++++ .../components/issues/IssuePresenter.svelte | 45 ++++ .../src/components/issues/Issues.svelte | 55 +++++ .../src/components/myissues/MyIssues.svelte | 0 .../src/components/projects/Projects.svelte | 0 .../src/components/views/Views.svelte | 0 plugins/tracker-resources/src/index.ts | 47 ++++ plugins/tracker-resources/src/plugin.ts | 80 +++++++ plugins/tracker-resources/src/utils.ts | 63 +++++ plugins/tracker-resources/svelte.config.js | 5 + plugins/tracker-resources/tsconfig.json | 15 ++ plugins/tracker/.eslintrc.js | 7 + plugins/tracker/.npmignore | 4 + plugins/tracker/config/rig.json | 18 ++ plugins/tracker/package.json | 37 +++ plugins/tracker/src/index.ts | 145 ++++++++++++ plugins/tracker/tsconfig.json | 9 + .../src/components/Table.svelte | 4 + .../src/components/AccountPopup.svelte | 2 +- .../src/components/NavHeader.svelte | 11 +- .../src/components/Navigator.svelte | 6 +- .../src/components/Workbench.svelte | 79 +++++-- .../src/components/WorkbenchApp.svelte | 79 +------ .../src/components/navigator/SpacesNav.svelte | 42 +++- .../navigator/SpecialElement.svelte | 3 +- .../components/navigator/TreeElement.svelte | 35 ++- .../src/components/navigator/TreeItem.svelte | 3 +- .../src/components/navigator/TreeNode.svelte | 6 +- plugins/workbench/src/index.ts | 13 +- rush.json | 21 ++ tests/setup-elastic.sh | 2 +- 87 files changed, 2382 insertions(+), 175 deletions(-) create mode 100644 models/tracker/.eslintrc.js create mode 100644 models/tracker/.npmignore create mode 100644 models/tracker/config/rig.json create mode 100644 models/tracker/package.json create mode 100644 models/tracker/src/creation.ts create mode 100644 models/tracker/src/index.ts create mode 100644 models/tracker/src/migration.ts create mode 100644 models/tracker/src/plugin.ts create mode 100644 models/tracker/tsconfig.json create mode 100644 packages/presentation/src/connect.ts create mode 100644 plugins/tracker-assets/.eslintrc.js create mode 100644 plugins/tracker-assets/assets/icons.svg create mode 100644 plugins/tracker-assets/config/rig.json create mode 100644 plugins/tracker-assets/lang/en.json create mode 100644 plugins/tracker-assets/lang/ru.json create mode 100644 plugins/tracker-assets/package.json create mode 100644 plugins/tracker-assets/src/index.ts create mode 100644 plugins/tracker-assets/tsconfig.json create mode 100644 plugins/tracker-resources/.eslintrc.js create mode 100644 plugins/tracker-resources/img/avatar.png create mode 100644 plugins/tracker-resources/img/voltron.png create mode 100644 plugins/tracker-resources/package.json create mode 100644 plugins/tracker-resources/postcss.config.js create mode 100644 plugins/tracker-resources/src/components/AccountPopup.svelte create mode 100644 plugins/tracker-resources/src/components/AppItem.svelte create mode 100644 plugins/tracker-resources/src/components/Card.svelte create mode 100644 plugins/tracker-resources/src/components/CreateIssue.svelte create mode 100644 plugins/tracker-resources/src/components/NewIssueHeader.svelte create mode 100644 plugins/tracker-resources/src/components/NopeComponent.svelte create mode 100644 plugins/tracker-resources/src/components/SpaceInfo.svelte create mode 100644 plugins/tracker-resources/src/components/SpaceSelect.svelte create mode 100644 plugins/tracker-resources/src/components/SpacesPopup.svelte create mode 100644 plugins/tracker-resources/src/components/icons/Collapsed.svelte create mode 100644 plugins/tracker-resources/src/components/icons/Expanded.svelte create mode 100644 plugins/tracker-resources/src/components/icons/Mention.svelte create mode 100644 plugins/tracker-resources/src/components/icons/TopMenu.svelte create mode 100644 plugins/tracker-resources/src/components/inbox/Inbox.svelte create mode 100644 plugins/tracker-resources/src/components/issues/Active.svelte create mode 100644 plugins/tracker-resources/src/components/issues/Backlog.svelte create mode 100644 plugins/tracker-resources/src/components/issues/Board.svelte create mode 100644 plugins/tracker-resources/src/components/issues/CategoryPresenter.svelte create mode 100644 plugins/tracker-resources/src/components/issues/EditIssue.svelte create mode 100644 plugins/tracker-resources/src/components/issues/IssuePresenter.svelte create mode 100644 plugins/tracker-resources/src/components/issues/Issues.svelte create mode 100644 plugins/tracker-resources/src/components/myissues/MyIssues.svelte create mode 100644 plugins/tracker-resources/src/components/projects/Projects.svelte create mode 100644 plugins/tracker-resources/src/components/views/Views.svelte create mode 100644 plugins/tracker-resources/src/index.ts create mode 100644 plugins/tracker-resources/src/plugin.ts create mode 100644 plugins/tracker-resources/src/utils.ts create mode 100644 plugins/tracker-resources/svelte.config.js create mode 100644 plugins/tracker-resources/tsconfig.json create mode 100644 plugins/tracker/.eslintrc.js create mode 100644 plugins/tracker/.npmignore create mode 100644 plugins/tracker/config/rig.json create mode 100644 plugins/tracker/package.json create mode 100644 plugins/tracker/src/index.ts create mode 100644 plugins/tracker/tsconfig.json diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 93da8536ab..03cceea8b1 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -80,6 +80,7 @@ specifiers: '@rush-temp/model-server-task': file:./projects/model-server-task.tgz '@rush-temp/model-server-telegram': file:./projects/model-server-telegram.tgz '@rush-temp/model-setting': file:./projects/model-setting.tgz + '@rush-temp/model-tracker': file:./projects/model-tracker.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 @@ -136,6 +137,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/tracker': file:./projects/tracker.tgz + '@rush-temp/tracker-assets': file:./projects/tracker-assets.tgz + '@rush-temp/tracker-resources': file:./projects/tracker-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 @@ -339,6 +343,7 @@ dependencies: '@rush-temp/model-server-task': file:projects/model-server-task.tgz_typescript@4.5.4 '@rush-temp/model-server-telegram': file:projects/model-server-telegram.tgz_typescript@4.5.4 '@rush-temp/model-setting': file:projects/model-setting.tgz_typescript@4.5.4 + '@rush-temp/model-tracker': file:projects/model-tracker.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 @@ -395,6 +400,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/tracker': file:projects/tracker.tgz + '@rush-temp/tracker-assets': file:projects/tracker-assets.tgz_typescript@4.5.4 + '@rush-temp/tracker-resources': file:projects/tracker-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 @@ -12440,7 +12448,7 @@ packages: dev: false file:projects/model-all.tgz_typescript@4.5.4: - resolution: {integrity: sha512-CTYZ52iBQ2S06DVd6jUK+PHCpgLDvO7lrujkMWxCO3RUn+77uyDZBGK43n+7UF1HZNSHvYAhyA8fBTvp1kOylw==, tarball: file:projects/model-all.tgz} + resolution: {integrity: sha512-LFMD9UgTqaXrqIVbVyZudBvzL8xL6KphHnShut9no15Y5ZozOYv9hksYqBU959YFHClTkUI22XzwaFUPTSideA==, tarball: file:projects/model-all.tgz} id: file:projects/model-all.tgz name: '@rush-temp/model-all' version: 0.0.0 @@ -13051,6 +13059,27 @@ packages: - typescript dev: false + file:projects/model-tracker.tgz_typescript@4.5.4: + resolution: {integrity: sha512-PWxsEQ61Fe/moBL+dROHGw2bQRaaJBL/N7HozRZPxXoRfXkH/DwNMvH/UofBL4mIFVs8FfQU03FaFnNdahgNZw==, tarball: file:projects/model-tracker.tgz} + id: file:projects/model-tracker.tgz + name: '@rush-temp/model-tracker' + 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-tags.tgz_typescript@4.5.4: resolution: {integrity: sha512-tRhFRRosgUsAll6FSrGLSKycNeDNbH8M2JTvhOrMOQjsVafRvCz+oM+/sHg+tln4CSFTxU/+9cjPfHfQNx5fVA==, tarball: file:projects/model-tags.tgz} id: file:projects/model-tags.tgz @@ -13439,7 +13468,7 @@ packages: dev: false file:projects/presentation.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-MP45QOJeNLCukhDFHH8hPeV0lX/HivC+PW3nIIALWyHstmCshVJiu8KjkfrwDl6gj6kRENV9pUOlQcWdp+9ezA==, tarball: file:projects/presentation.tgz} + resolution: {integrity: sha512-DSAHNO42i3or1GCHYIM6/V6Yx0aLQlGy1QG6hVTipV/KeBdxZF/hetQNcEufUbwWKAZAwyEIEMIZDFl8tlpKIw==, tarball: file:projects/presentation.tgz} id: file:projects/presentation.tgz name: '@rush-temp/presentation' version: 0.0.0 @@ -13475,7 +13504,7 @@ packages: dev: false file:projects/prod.tgz_a07ec81d4d975778878ca12202ea119e: - resolution: {integrity: sha512-HHCNzvjIf/tNB1Wr5Fk4HGuoP66fHONafJd6DPh4kpTC7T8Vc5Y/UlneWS3cUjhCsB9jgYejEbu1Osp0DPXCZA==, tarball: file:projects/prod.tgz} + resolution: {integrity: sha512-lAhrU2LvSbV+Hg0ug0LHYTe3RMC8MgyyuFOFXQNMwXftXqQfXkgciBMjWh+g9PB/aXcJwSLm3scgACCtGG0wWw==, tarball: file:projects/prod.tgz} id: file:projects/prod.tgz name: '@rush-temp/prod' version: 0.0.0 @@ -14289,7 +14318,7 @@ packages: dev: false file:projects/server.tgz: - resolution: {integrity: sha512-Gx/PoIoObAiRX21Fo+Z/y7tqqgHW8URVudDz8azH/0hW25pRfR03xPw7oR0GsuF2IBZ4S8nyH1U2HSPpE76W7g==, tarball: file:projects/server.tgz} + resolution: {integrity: sha512-TEYNvDfpWbWWHcltHwEyC1B81v5c9UUyGmNx9C9sdItiWxLb8P/lQ+a+xca+5eJ+FQmRxm3VJywrvscmttTfPg==, tarball: file:projects/server.tgz} name: '@rush-temp/server' version: 0.0.0 dependencies: @@ -14395,6 +14424,84 @@ packages: - supports-color dev: false + file:projects/tracker-assets.tgz_typescript@4.5.4: + resolution: {integrity: sha512-sTaCJb1JkS7lN4xuyIFPuQwlafQHtMB7yZ3lrWTX/MgMwxr4UWHnZODK631lGxhio4MlMgXX0KYqiDwfxnQJqg==, tarball: file:projects/tracker-assets.tgz} + id: file:projects/tracker-assets.tgz + name: '@rush-temp/tracker-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 + transitivePeerDependencies: + - supports-color + - typescript + dev: false + + file:projects/tracker-resources.tgz_096c09b0b673a57c275d9767a12070b1: + resolution: {integrity: sha512-IwrLGQsCGO7NtMvEY2i7mA81An6fhYDq8Y4aKYZKSX/ptG85/xCJ+YayjxbX70iUoogHJfgYGPTklPJjBAXIKg==, tarball: file:projects/tracker-resources.tgz} + id: file:projects/tracker-resources.tgz + name: '@rush-temp/tracker-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 + lexorank: 1.0.4 + 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/tracker.tgz: + resolution: {integrity: sha512-4BE4OCd7TawHUfz5pI8hYADlDGMLsNrczRPbsuEy1hrA+4BSTkjn5rDDSZ3iu9TLtB3TV3anvbjiZhZOrbiDyw==, tarball: file:projects/tracker.tgz} + name: '@rush-temp/tracker' + 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/tags-assets.tgz: resolution: {integrity: sha512-c3kDt2CRIqT3lDJNJPawZ+M3j979cOkF1mYeRKUOsNQ1Zs9wnqXjxDxe1ZECpOAUbWXNhKj/Mru0XfEyaCxHQA==, tarball: file:projects/tags-assets.tgz} name: '@rush-temp/tags-assets' @@ -14808,7 +14915,7 @@ packages: dev: false file:projects/tool.tgz: - resolution: {integrity: sha512-F3Px6/29RVwqI/G3FsImf5dKvi53Tz7R/LSRyeG81NIN0WMGEsuOB6iWE9GD8PS/W7qSnKsFC8+VWVvJN+gVeQ==, tarball: file:projects/tool.tgz} + resolution: {integrity: sha512-JwGKWGU/S/EONMAYohP8k5D9kO8xvd8VG2f7Mw375r83TpoSKBPpLVqrmNZUb70EZTTCihEO9oiM6NVqbjWq9w==, tarball: file:projects/tool.tgz} name: '@rush-temp/tool' version: 0.0.0 dependencies: diff --git a/dev/prod/package.json b/dev/prod/package.json index 1b4e558535..142fe756e6 100644 --- a/dev/prod/package.json +++ b/dev/prod/package.json @@ -130,6 +130,10 @@ "@anticrm/server-gmail": "~0.6.0", "@anticrm/server-gmail-resources": "~0.6.0", "@anticrm/server-telegram": "~0.6.0", - "@anticrm/server-telegram-resources": "~0.6.0" + "@anticrm/server-telegram-resources": "~0.6.0", + "@anticrm/presentation": "~0.6.2", + "@anticrm/tracker": "~0.6.0", + "@anticrm/tracker-assets": "~0.6.0", + "@anticrm/tracker-resources": "~0.6.0" } } diff --git a/dev/prod/src/platform.ts b/dev/prod/src/platform.ts index 9b1a950ce5..d9074b23a5 100644 --- a/dev/prod/src/platform.ts +++ b/dev/prod/src/platform.ts @@ -36,6 +36,7 @@ import { templatesId } from '@anticrm/templates' import { notificationId } from '@anticrm/notification' import { tagsId } from '@anticrm/tags' import { calendarId } from '@anticrm/calendar' +import { trackerId } from '@anticrm/tracker' import rekoni from '@anticrm/rekoni' import '@anticrm/login-assets' @@ -56,6 +57,8 @@ import '@anticrm/templates-assets' import '@anticrm/notification-assets' import '@anticrm/tags-assets' import '@anticrm/calendar-assets' +import '@anticrm/tracker-assets' +import presentation from '@anticrm/presentation' import { setMetadata } from '@anticrm/platform' export async function configurePlatform() { @@ -67,7 +70,7 @@ export async function configurePlatform() { if( config.MODEL_VERSION != null) { console.log('Minimal Model version requirement', config.MODEL_VERSION) - setMetadata(workbench.metadata.RequiredVersion, config.MODEL_VERSION) + setMetadata(presentation.metadata.RequiredVersion, config.MODEL_VERSION) } setMetadata(login.metadata.TelegramUrl, process.env.TELEGRAM_URL ?? 'http://localhost:8086') setMetadata(login.metadata.GmailUrl, process.env.GMAIL_URL ?? 'http://localhost:8087') @@ -98,4 +101,6 @@ export async function configurePlatform() { addLocation(notificationId, () => import(/* webpackChunkName: "notification" */ '@anticrm/notification-resources')) addLocation(tagsId, () => import(/* webpackChunkName: "tags" */ '@anticrm/tags-resources')) addLocation(calendarId, () => import(/* webpackChunkName: "calendar" */ '@anticrm/calendar-resources')) + + addLocation(trackerId, () => import(/* webpackChunkName: "tracker" */ '@anticrm/tracker-resources')) } diff --git a/models/all/package.json b/models/all/package.json index 0a95f23680..6449f93f54 100644 --- a/models/all/package.json +++ b/models/all/package.json @@ -66,6 +66,7 @@ "@anticrm/model-calendar": "~0.6.0", "@anticrm/model-server-calendar": "~0.6.0", "@anticrm/model-server-gmail": "~0.6.0", - "@anticrm/model-server-telegram": "~0.6.0" + "@anticrm/model-server-telegram": "~0.6.0", + "@anticrm/model-tracker": "~0.6.0" } } diff --git a/models/all/src/index.ts b/models/all/src/index.ts index 4949ea80cb..4507983c93 100644 --- a/models/all/src/index.ts +++ b/models/all/src/index.ts @@ -52,6 +52,7 @@ import { createModel as calendarModel } from '@anticrm/model-calendar' import { createModel as serverCalendarModel } from '@anticrm/model-server-calendar' import { createModel as serverGmailModel } from '@anticrm/model-server-gmail' import { createModel as serverTelegramModel } from '@anticrm/model-server-telegram' +import { createModel as trackerModel } from '@anticrm/model-tracker' export const version: Data = jsonVersion as Data @@ -92,6 +93,7 @@ const builders = [ serverCalendarModel, serverGmailModel, serverTelegramModel, + trackerModel, createDemo ] diff --git a/models/all/src/migration.ts b/models/all/src/migration.ts index d8d43a1c95..eda85b343e 100644 --- a/models/all/src/migration.ts +++ b/models/all/src/migration.ts @@ -29,6 +29,7 @@ import { taskOperation } from '@anticrm/model-task' import { telegramOperation } from '@anticrm/model-telegram' import { templatesOperation } from '@anticrm/model-templates' import { viewOperation } from '@anticrm/model-view' +import { trackerOperation } from '@anticrm/model-tracker' export const migrateOperations: MigrateOperation[] = [ coreOperation, @@ -44,5 +45,6 @@ export const migrateOperations: MigrateOperation[] = [ contactOperation, tagsOperation, notificationOperation, - settingOperation + settingOperation, + trackerOperation ] diff --git a/models/task/src/index.ts b/models/task/src/index.ts index 3bb988bc1d..2ae51d34bd 100644 --- a/models/task/src/index.ts +++ b/models/task/src/index.ts @@ -265,35 +265,35 @@ export function createModel (builder: Builder): void { task.viewlet.StatusTable ) - builder.createDoc( - workbench.class.Application, - core.space.Model, - { - label: task.string.ApplicationLabelTask, - icon: task.icon.Task, - hidden: false, - navigatorModel: { - spaces: [ - { - label: task.string.Projects, - spaceClass: task.class.Project, - addSpaceLabel: task.string.CreateProject, - createComponent: task.component.CreateProject - } - ], - specials: [ - { - id: 'assigned', - label: task.string.Assigned, - icon: task.icon.Task, - component: task.component.AssignedTasks, - position: 'top' - } - ] - } - }, - task.app.Tasks - ) + // builder.createDoc( + // workbench.class.Application, + // core.space.Model, + // { + // label: task.string.ApplicationLabelTask, + // icon: task.icon.Task, + // hidden: false, + // navigatorModel: { + // spaces: [ + // { + // label: task.string.Projects, + // spaceClass: task.class.Project, + // addSpaceLabel: task.string.CreateProject, + // createComponent: task.component.CreateProject + // } + // ], + // specials: [ + // { + // id: 'assigned', + // label: task.string.Assigned, + // icon: task.icon.Task, + // component: task.component.AssignedTasks, + // position: 'top' + // } + // ] + // } + // }, + // task.app.Tasks + // ) builder.createDoc(view.class.Viewlet, core.space.Model, { attachTo: task.class.Issue, diff --git a/models/tracker/.eslintrc.js b/models/tracker/.eslintrc.js new file mode 100644 index 0000000000..c3c2c49417 --- /dev/null +++ b/models/tracker/.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/tracker/.npmignore b/models/tracker/.npmignore new file mode 100644 index 0000000000..e3ec093c38 --- /dev/null +++ b/models/tracker/.npmignore @@ -0,0 +1,4 @@ +* +!/lib/** +!CHANGELOG.md +/lib/**/__tests__/ diff --git a/models/tracker/config/rig.json b/models/tracker/config/rig.json new file mode 100644 index 0000000000..e9a9ee9add --- /dev/null +++ b/models/tracker/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/tracker/package.json b/models/tracker/package.json new file mode 100644 index 0000000000..51f093a50b --- /dev/null +++ b/models/tracker/package.json @@ -0,0 +1,45 @@ +{ + "name": "@anticrm/model-tracker", + "version": "0.6.0", + "main": "lib/index.js", + "author": "Anticrm Platform Contributors", + "license": "EPL-2.0", + "scripts": { + "build": "heft build", + "build:watch": "tsc", + "lint:fix": "eslint --fix src", + "lint": "eslint src", + "format": "prettier --write src && eslint --fix src" + }, + "devDependencies": { + "@anticrm/model-rig": "~0.6.0", + "@typescript-eslint/eslint-plugin": "^5.4.0", + "eslint-plugin-import": "^2.25.3", + "eslint-plugin-promise": "^5.1.1", + "eslint-plugin-node": "^11.1.0", + "eslint": "^7.32.0", + "@types/heft-jest": "^1.0.2", + "@typescript-eslint/parser": "^5.4.0", + "eslint-config-standard-with-typescript": "^21.0.1", + "prettier": "^2.4.1", + "@rushstack/heft": "^0.41.1" + }, + "dependencies": { + "@anticrm/core": "~0.6.16", + "@anticrm/model": "~0.6.0", + "@anticrm/ui": "~0.6.0", + "@anticrm/contact": "~0.6.5", + "@anticrm/platform": "~0.6.5", + "@anticrm/model-core": "~0.6.0", + "@anticrm/model-view": "~0.6.0", + "@anticrm/model-workbench": "~0.6.1", + "@anticrm/model-contact": "~0.6.1", + "@anticrm/model-attachment": "~0.6.0", + "@anticrm/tracker": "~0.6.0", + "@anticrm/tracker-resources": "~0.6.0", + "@anticrm/model-chunter": "~0.6.0", + "@anticrm/workbench": "~0.6.1", + "@anticrm/view": "~0.6.0", + "@anticrm/model-presentation": "~0.6.0" + } +} diff --git a/models/tracker/src/creation.ts b/models/tracker/src/creation.ts new file mode 100644 index 0000000000..4e585463d9 --- /dev/null +++ b/models/tracker/src/creation.ts @@ -0,0 +1,43 @@ +// +// Copyright © 2020, 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. +// + +import core, { Client, TxOperations } from '@anticrm/core' +import { Team } from '@anticrm/tracker' +import tracker from './plugin' + +export async function createDeps (client: Client): Promise { + const tx = new TxOperations(client, core.account.System) + + const current = await tx.findOne(tracker.class.Team, { + _id: tracker.team.DefaultTeam + }) + + if (current === undefined) { + await tx.createDoc( + tracker.class.Team, + core.space.Space, + { + name: 'Default', + description: 'Default team', + private: false, + members: [], + archived: false, + identifier: 'TSK', + sequence: 0 + }, + tracker.team.DefaultTeam + ) + } +} diff --git a/models/tracker/src/index.ts b/models/tracker/src/index.ts new file mode 100644 index 0000000000..1e9d13ecb5 --- /dev/null +++ b/models/tracker/src/index.ts @@ -0,0 +1,222 @@ +// +// Copyright © 2020, 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. +// + +import type { Employee } from '@anticrm/contact' +import contact from '@anticrm/contact' +import { Domain, IndexKind, Markup, Ref, Timestamp } from '@anticrm/core' +import { + Builder, + Collection, Hidden, Index, Model, + Prop, TypeDate, + TypeMarkup, + TypeNumber, + TypeRef, + TypeString, + UX +} from '@anticrm/model' +import attachment from '@anticrm/model-attachment' +import chunter from '@anticrm/model-chunter' +import core, { DOMAIN_SPACE, TDoc, TSpace } from '@anticrm/model-core' +import { IntlString } from '@anticrm/platform' +import { Document, Issue, IssuePriority, IssueStatus, Team } from '@anticrm/tracker' +import tracker from './plugin' + +import workbench from '@anticrm/model-workbench' + +export { createDeps } from './creation' +export { trackerOperation } from './migration' +export { default } from './plugin' + +export const DOMAIN_TRACKER = 'tracker' as Domain + +/** + * @public + */ +@Model(tracker.class.Team, core.class.Space, DOMAIN_SPACE) +@UX(tracker.string.Team, tracker.icon.Team, tracker.string.Team) +export class TTeam extends TSpace implements Team { + @Prop(TypeString(), tracker.string.Title) + @Index(IndexKind.FullText) + reamLogo!: IntlString + + @Prop(TypeString(), tracker.string.Identifier) + @Index(IndexKind.FullText) + identifier!: IntlString + + @Prop(TypeNumber(), tracker.string.Number) + @Hidden() + sequence!: number +} + +/** + * @public + */ +@Model(tracker.class.Issue, core.class.Doc, DOMAIN_TRACKER) +@UX(tracker.string.Issue, tracker.icon.Issue, tracker.string.Issue) +export class TIssue extends TDoc implements Issue { + @Prop(TypeString(), tracker.string.Title) + @Index(IndexKind.FullText) + title!: string + + @Prop(TypeMarkup(), tracker.string.Description) + @Index(IndexKind.FullText) + description!: Markup + + @Prop(TypeNumber(), tracker.string.Status) + status!: IssueStatus + + @Prop(TypeNumber(), tracker.string.Priority) + priority!: IssuePriority + + @Prop(TypeNumber(), tracker.string.Number) + number!: number + + @Prop(TypeRef(contact.class.Employee), tracker.string.Assignee) + assignee!: Ref | null + + @Prop(TypeRef(tracker.class.Issue), tracker.string.Parent) + parentIssue!: Ref + + @Prop(Collection(tracker.class.Issue), tracker.string.BlockedBy) + blockedBy!: Ref[] + + @Prop(Collection(tracker.class.Issue), tracker.string.RelatedTo) + relatedIssue!: Ref[] + + @Prop(Collection(chunter.class.Comment), tracker.string.Comments) + comments!: number + + @Prop(Collection(attachment.class.Attachment), tracker.string.Attachments) + attachments!: number + + // @Prop(Collection(core.class.TypeString), tracker.string.Labels) + labels?: string[] + + declare space: Ref + + @Prop(TypeDate(true), tracker.string.Number) + dueDate!: Timestamp | null + + @Prop(TypeString(), tracker.string.Rank) + @Hidden() + rank!: string +} + +/** + * @public + */ +@Model(tracker.class.Document, core.class.Doc, DOMAIN_TRACKER) +@UX(tracker.string.Document, tracker.icon.Document, tracker.string.Document) +export class TDocument extends TDoc implements Document { + @Prop(TypeString(), tracker.string.Title) + @Index(IndexKind.FullText) + title!: string + + @Prop(TypeString(), tracker.string.DocumentIcon) + icon!: string | null + + @Prop(TypeString(), tracker.string.DocumentColor) + color!: number + + @Prop(TypeMarkup(), tracker.string.Description) + @Index(IndexKind.FullText) + content!: Markup + + declare space: Ref +} + +export function createModel (builder: Builder): void { + builder.createModel( + TTeam, + TIssue + ) + + builder.createDoc( + workbench.class.Application, + core.space.Model, + { + label: tracker.string.TrackerApplication, + icon: tracker.icon.Issue, + hidden: false, + navigatorModel: { + specials: [ + { + id: 'inbox', + position: 'top', + label: tracker.string.Inbox, + icon: tracker.icon.TrackerApplication, + component: tracker.component.Inbox + }, + { + id: 'my-issues', + position: 'top', + label: tracker.string.MyIssues, + icon: tracker.icon.TrackerApplication, + component: tracker.component.MyIssues + }, + { + id: 'views', + position: 'top', + label: tracker.string.Views, + icon: tracker.icon.TrackerApplication, + component: tracker.component.Views + } + ], + spaces: [ + { + label: tracker.string.Teams, + spaceClass: tracker.class.Team, + // icon: tracker.icon.TrackerApplication, + addSpaceLabel: tracker.string.CreateTeam, + createComponent: tracker.component.CreateTeam, + specials: [ + { + id: 'issues', + label: tracker.string.Issues, + icon: tracker.icon.TrackerApplication, + component: tracker.component.Issues + }, + { + id: 'active', + label: tracker.string.Active, + // icon: tracker.icon.TrackerApplication, + component: tracker.component.Active + }, + { + id: 'backlog', + label: tracker.string.Backlog, + // icon: tracker.icon.TrackerApplication, + component: tracker.component.Backlog + }, + { + id: 'board', + label: tracker.string.Board, + // icon: tracker.icon.TrackerApplication, + component: tracker.component.Board + }, + { + id: 'projects', + label: tracker.string.Projects, + icon: tracker.icon.TrackerApplication, + component: tracker.component.Projects + } + ] + }] + }, + navHeaderComponent: tracker.component.NewIssueHeader + }, + tracker.app.Tracker + ) +} diff --git a/models/tracker/src/migration.ts b/models/tracker/src/migration.ts new file mode 100644 index 0000000000..a2b31f5606 --- /dev/null +++ b/models/tracker/src/migration.ts @@ -0,0 +1,27 @@ +// +// Copyright © 2020, 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. +// + +import { + MigrateOperation, MigrationClient, MigrationUpgradeClient +} from '@anticrm/model' +import { createDeps } from './creation' + +export const trackerOperation: MigrateOperation = { + async migrate (client: MigrationClient): Promise { + }, + async upgrade (client: MigrationUpgradeClient): Promise { + await createDeps(client) + } +} diff --git a/models/tracker/src/plugin.ts b/models/tracker/src/plugin.ts new file mode 100644 index 0000000000..a2a7e77351 --- /dev/null +++ b/models/tracker/src/plugin.ts @@ -0,0 +1,39 @@ +// +// Copyright © 2020, 2021 Anticrm Platform Contributors. +// Copyright © 2021 Hardcore Engineering Inc. +// +// Licensed under the Eclipse Public License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. You may +// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import { Ref } from '@anticrm/core' +import { IntlString, mergeIds } from '@anticrm/platform' +import { Team, trackerId } from '@anticrm/tracker' +import tracker from '@anticrm/tracker-resources/src/plugin' +import type { AnyComponent } from '@anticrm/ui' +import { Application } from '@anticrm/workbench' + +export default mergeIds(trackerId, tracker, { + string: { + TrackerApplication: '' as IntlString, + Teams: '' as IntlString + }, + team: { + DefaultTeam: '' as Ref + }, + component: { + // Required to pass build without errorsF + Nope: '' as AnyComponent + }, + app: { + Tracker: '' as Ref + } +}) diff --git a/models/tracker/tsconfig.json b/models/tracker/tsconfig.json new file mode 100644 index 0000000000..1d60db76b4 --- /dev/null +++ b/models/tracker/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/packages/presentation/package.json b/packages/presentation/package.json index e3f89cd619..7a5193ab45 100644 --- a/packages/presentation/package.json +++ b/packages/presentation/package.json @@ -39,6 +39,7 @@ "svelte": "^3.37.0", "@anticrm/contact": "~0.6.5", "@anticrm/login": "~0.6.1", - "@anticrm/image-cropper": "~0.6.0" + "@anticrm/image-cropper": "~0.6.0", + "@anticrm/client": "~0.6.2" } } diff --git a/packages/presentation/src/connect.ts b/packages/presentation/src/connect.ts new file mode 100644 index 0000000000..866e80b7bf --- /dev/null +++ b/packages/presentation/src/connect.ts @@ -0,0 +1,68 @@ +import client from '@anticrm/client' +import contact from '@anticrm/contact' +import core, { Client, setCurrentAccount, Version } from '@anticrm/core' +import login from '@anticrm/login' +import { getMetadata, getResource } from '@anticrm/platform' +import { fetchMetadataLocalStorage, getCurrentLocation, navigate, setMetadataLocalStorage } from '@anticrm/ui' +import presentation from './plugin' + +export let versionError: string | undefined = '' + +export async function connect (title: string): Promise { + const token = fetchMetadataLocalStorage(login.metadata.LoginToken) + const endpoint = fetchMetadataLocalStorage(login.metadata.LoginEndpoint) + const email = fetchMetadataLocalStorage(login.metadata.LoginEmail) + + if (token === null || endpoint === null || email === null) { + navigate({ path: [login.component.LoginApp], query: { navigateUrl: encodeURIComponent(JSON.stringify(getCurrentLocation())) } }) + return + } + + const getClient = await getResource(client.function.GetClient) + const instance = await getClient(token, endpoint) + console.log('logging in as', email) + + const me = await instance.findOne(contact.class.EmployeeAccount, { email }) + if (me !== undefined) { + console.log('login: employee account', me) + setCurrentAccount(me) + } else { + console.error('WARNING: no employee account found.') + setMetadataLocalStorage(login.metadata.LoginToken, null) + setMetadataLocalStorage(login.metadata.LoginEndpoint, null) + setMetadataLocalStorage(login.metadata.LoginEmail, null) + setMetadataLocalStorage(login.metadata.CurrentWorkspace, null) + navigate({ path: [login.component.LoginApp], query: { navigateUrl: encodeURIComponent(JSON.stringify(getCurrentLocation())) } }) + return + } + + try { + console.log('checking model version') + const version = await instance.findOne(core.class.Version, {}) + console.log('Model version', version) + + const requirdVersion = getMetadata(presentation.metadata.RequiredVersion) + if (requirdVersion !== undefined) { + console.log('checking min model version', requirdVersion) + const versionStr = `${version?.major as number}.${version?.minor as number}.${version?.patch as number}` + + if (version === undefined || requirdVersion !== versionStr) { + versionError = `${versionStr} => ${requirdVersion}` + return undefined + } + } + } catch (err: any) { + console.log(err) + const requirdVersion = getMetadata(presentation.metadata.RequiredVersion) + console.log('checking min model version', requirdVersion) + if (requirdVersion !== undefined) { + versionError = `'unknown' => ${requirdVersion}` + return undefined + } + } + + // Update window title + document.title = [(fetchMetadataLocalStorage(login.metadata.CurrentWorkspace)), title].filter(it => it).join(' - ') + + return instance +} diff --git a/packages/presentation/src/index.ts b/packages/presentation/src/index.ts index 1e087a09c1..3aa17d27ca 100644 --- a/packages/presentation/src/index.ts +++ b/packages/presentation/src/index.ts @@ -41,3 +41,4 @@ addStringsLoader(presentationId, async (lang: string) => { }) export { default } from './plugin' +export { connect, versionError } from './connect' diff --git a/packages/presentation/src/plugin.ts b/packages/presentation/src/plugin.ts index d40d88ec91..becb561d14 100644 --- a/packages/presentation/src/plugin.ts +++ b/packages/presentation/src/plugin.ts @@ -15,7 +15,7 @@ // import { Class, Ref } from '@anticrm/core' -import type { IntlString, Plugin } from '@anticrm/platform' +import type { IntlString, Metadata, Plugin } from '@anticrm/platform' import { plugin } from '@anticrm/platform' import { ObjectSearchCategory } from '.' @@ -40,5 +40,8 @@ export default plugin(presentationId, { AddSocialLinks: '' as IntlString, Change: '' as IntlString, Remove: '' as IntlString + }, + metadata: { + RequiredVersion: '' as Metadata } }) diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index 5858cfe442..0b25cf93dd 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -272,6 +272,7 @@ p:last-child { margin-block-end: 0; } .ml-3 { margin-left: .75rem; } .ml-4 { margin-left: 1rem; } .ml-6 { margin-left: 1.5rem; } +.ml-8 { margin-left: 2rem; } .ml-10 { margin-left: 2.5rem; } .mr-1 { margin-right: .25rem; } .mr-2 { margin-right: .5rem; } diff --git a/packages/theme/styles/common.scss b/packages/theme/styles/common.scss index f04f268a7a..c0d78959ba 100644 --- a/packages/theme/styles/common.scss +++ b/packages/theme/styles/common.scss @@ -56,7 +56,7 @@ flex-shrink: 0; display: flex; align-items: center; - margin: 0 1rem; + padding: 0.25rem; height: 2.25rem; border-radius: .5rem; user-select: none; @@ -65,8 +65,7 @@ .an-element__icon { min-width: 1rem; color: var(--theme-content-trans-color); - margin: 0 1.125rem 0 .625rem; - &.sub { margin: 0 .5rem 0 2.75rem } + margin: 0 1.125rem 0 0; } .an-element__label { flex-grow: 1; diff --git a/packages/ui/src/components/Component.svelte b/packages/ui/src/components/Component.svelte index 9c62c4e69f..88983d9ce6 100644 --- a/packages/ui/src/components/Component.svelte +++ b/packages/ui/src/components/Component.svelte @@ -34,7 +34,9 @@ {:then Ctor} - + {#if $$slots.default} + + {/if} {:catch err} diff --git a/plugins/calendar-resources/src/plugin.ts b/plugins/calendar-resources/src/plugin.ts index df624a158b..a8fa5b25f7 100644 --- a/plugins/calendar-resources/src/plugin.ts +++ b/plugins/calendar-resources/src/plugin.ts @@ -29,7 +29,6 @@ export default mergeIds(calendarId, calendar, { CreateReminder: '' as IntlString, EditReminder: '' as IntlString, ReminderTime: '' as IntlString, - Reminders: '' as IntlString, ModeDay: '' as IntlString, ModeWeek: '' as IntlString, ModeMonth: '' as IntlString, diff --git a/plugins/calendar/src/index.ts b/plugins/calendar/src/index.ts index 696f675889..4fd1c94b3f 100644 --- a/plugins/calendar/src/index.ts +++ b/plugins/calendar/src/index.ts @@ -99,7 +99,8 @@ const calendarPlugin = plugin(calendarId, { Participants: '' as IntlString, NoParticipants: '' as IntlString, PersonsLabel: '' as IntlString, - EventNumber: '' as IntlString + EventNumber: '' as IntlString, + Reminders: '' as IntlString }, ids: { ReminderNotification: '' as Ref diff --git a/plugins/tracker-assets/.eslintrc.js b/plugins/tracker-assets/.eslintrc.js new file mode 100644 index 0000000000..5da5872d4a --- /dev/null +++ b/plugins/tracker-assets/.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/tracker-assets/assets/icons.svg b/plugins/tracker-assets/assets/icons.svg new file mode 100644 index 0000000000..bbc0d7d2d3 --- /dev/null +++ b/plugins/tracker-assets/assets/icons.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/tracker-assets/config/rig.json b/plugins/tracker-assets/config/rig.json new file mode 100644 index 0000000000..af1257a896 --- /dev/null +++ b/plugins/tracker-assets/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/tracker-assets/lang/en.json b/plugins/tracker-assets/lang/en.json new file mode 100644 index 0000000000..5dd037c0b0 --- /dev/null +++ b/plugins/tracker-assets/lang/en.json @@ -0,0 +1,46 @@ +{ + "string": { + "TrackerApplication": "Tracker", + "Teams": "Your teams", + "More": "More", + "Delete": "Delete", + "Open": "Open", + "Members": "Members", + "Inbox": "Inbox", + "MyIssues": "My issues", + "Issues": "Issues", + "Views": "Views", + "Active": "Active", + "Backlog": "Backlog", + "Board": "Board", + "Projects": "Projects", + "CreateTeam": "Create team", + "NewIssue": "New issue", + + "Title": "Title", + "Description": "", + "Status": "", + "Priority": "", + "Number": "", + "Assignee": "", + "Parent": "", + "BlockedBy": "", + "RelatedTo": "", + "Comments": "", + "Attachments": "", + "Labels": "", + "Space": "", + "DueDate": "", + "Team": "", + "Issue": "", + "Document": "", + "DocumentIcon": "", + "DocumentColor": "", + "Rank": "", + "IssueTitlePlaceholder": "Issue title", + "IssueDescriptionPlaceholder": "Add description" + }, + "status": { + + } +} \ No newline at end of file diff --git a/plugins/tracker-assets/lang/ru.json b/plugins/tracker-assets/lang/ru.json new file mode 100644 index 0000000000..8dc645a2bc --- /dev/null +++ b/plugins/tracker-assets/lang/ru.json @@ -0,0 +1,22 @@ +{ + "string": { + "TrackerApplication": "Tracker", + "Teams": "Your teams", + "More": "More", + "Delete": "Delete", + "Open": "Open", + "Members": "Members", + "Inbox": "Inbox", + "MyIssues": "My issues", + "Issues": "Issues", + "Views": "Views", + "Active": "Active", + "Backlog": "Backlog", + "Board": "Board", + "Projects": "Projects", + "CreateTeam": "Create team" + }, + "status": { + + } +} \ No newline at end of file diff --git a/plugins/tracker-assets/package.json b/plugins/tracker-assets/package.json new file mode 100644 index 0000000000..b4e22533ba --- /dev/null +++ b/plugins/tracker-assets/package.json @@ -0,0 +1,33 @@ +{ + "name": "@anticrm/tracker-assets", + "version": "0.6.0", + "main": "lib/index.js", + "author": "Anticrm Platform Contributors", + "license": "EPL-2.0", + "scripts": { + "build": "heft build", + "build:docs": "", + "lint": "eslint src", + "lint:fix": "eslint --fix src", + "format": "prettier --write src && eslint --fix src", + "build:watch": "tsc" + }, + "devDependencies": { + "@anticrm/platform-rig": "~0.6.0", + "@types/heft-jest": "^1.0.2", + "@typescript-eslint/eslint-plugin": "^5.4.0", + "@typescript-eslint/parser": "^5.4.0", + "eslint-config-standard-with-typescript": "^21.0.1", + "eslint-plugin-import": "^2.25.3", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^5.1.1", + "eslint": "^7.32.0", + "prettier": "^2.4.1", + "@rushstack/heft": "^0.41.1", + "@types/node": "~16.11.12" + }, + "dependencies": { + "@anticrm/platform": "~0.6.5", + "@anticrm/tracker": "~0.6.0" + } +} diff --git a/plugins/tracker-assets/src/index.ts b/plugins/tracker-assets/src/index.ts new file mode 100644 index 0000000000..4420baa1c7 --- /dev/null +++ b/plugins/tracker-assets/src/index.ts @@ -0,0 +1,28 @@ +// +// 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 { loadMetadata, addStringsLoader } from '@anticrm/platform' +import tracker, { trackerId } from '@anticrm/tracker' + +const icons = require('../assets/icons.svg') as string // eslint-disable-line +loadMetadata(tracker.icon, { + TrackerApplication: `${icons}#tracker`, + Project: `${icons}#project`, + Issue: `${icons}#issue`, + Team: `${icons}#team`, + Document: `${icons}#document` +}) + +addStringsLoader(trackerId, async (lang: string) => await import(`../lang/${lang}.json`)) diff --git a/plugins/tracker-assets/tsconfig.json b/plugins/tracker-assets/tsconfig.json new file mode 100644 index 0000000000..cabe5aefad --- /dev/null +++ b/plugins/tracker-assets/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/tracker-resources/.eslintrc.js b/plugins/tracker-resources/.eslintrc.js new file mode 100644 index 0000000000..a327214967 --- /dev/null +++ b/plugins/tracker-resources/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: ['./node_modules/@anticrm/platform-rig/profiles/ui/config/eslint.config.json'], + parserOptions: { tsconfigRootDir: __dirname }, + settings: { + 'svelte3/ignore-styles': () => true + } +} diff --git a/plugins/tracker-resources/img/avatar.png b/plugins/tracker-resources/img/avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..8d61750a2c774aa174aff358765ce3e796368d79 GIT binary patch literal 2799 zcmV)P)O6>w}I;vI~Qgfh8f?fQia7ZTrMdI<0O;h8gMj?p5Y zF%YjzA_yQ54P$lBab4Fh6R>OeE&!cAeR_m$UlAiwdyM*^MNrsShprUic8I8G20TFt zUVjq@QxB5e8EeGY7Z)#Hy!L+qI(hP>H870PdbX<7>Jb8!cq<@cChB&(zoEsW?3tOz zZl&BhJoyv`_x7TrwH2XY5H7bH!LWotC=8Fs1EZ>9Bb&irZ{Nl9oDRX^1VI4%ud|-c z0I{Bs&|U*d+yX{oV5l3l8L5er?z4~YLo_N_T3$gmn}w6K6Ap*b9BD(Kr462N1ft6g zhtrASeKAxsOXly_reGa|^FT~Q>ASDlnr{R|V3=m2wwdZZC%G_(rNu?$3o^P7HTO+rm4c^al%JzNgkk5lueUas7y%Agc@V&0G#64*8)0q>eMl^^T~Q4 zGGI1KspTZMZ@Ekhx}3bv0BNcUUDKgfD$uJ{V#h)6LzOt|gnc|KV@T09Qg4Wgud6ZXE>25{2wp+hexCnn-fYv31~?*01E5H>$+K<419% zlS>#J8bVLc4uqv<+JHz5$#802h|jESF3!l&8^Q3U1!3gGi4!}Wp)Kx<;VVDCG0xO)l^qm(D zO+}?(;7{L-n{yhQVMMS@Rv%(4r;?mzaV6L$=1g(ExWM@j4pa~vkox+uu$UyRxKXZF z;HDHYJ2MA8*o=tihe{@tjVi(idTAmT@=6A4idvU4tdJz2Atf28u_ZYfePV4<12qTZ zebe?VsIorWg-RMqrdAOSG+{lT#n8}xxG4xWb+n+fvlGp&&8VshvKt#%$rbB>2;5=J zzTRNIdWDOGEL*dsUZ?z;jV)jne=bT5^T{+ZRK-6h|IIfMi*}(kBEjePkc316Q^4BV z8s^rET!*%qU>i%fgQ@6$`8_D3m6Gl%Ev2f@d>SpizHn zZV`cC7=5u23dJ&HrHsYo3Q828RM@%D42D+Nw@jorfU%fMP_ZK1q}NeFv;=I}>BE5S zoTfQ}+1UhyLIHcC+mTpY!g6{Y<;pZ%l)Kh*1u~rr+`hVs-W}ag=4HMi!_Z71x`FyA zwAIsy?3bh=E$$G+&ulxg%C5dBGu3a9E>wPb0wmyY08+4*SenBc0l9VWE+Q`^M4Bah z@O}&j_V0s605rp}@~VKEb*yL8>-1U`V2a(i;WS*1>xQcT&JZ?>r>#XgYwK%fOsUdb zb7eRB+e7%l!Dg(kF_tv=13~P2uNR?E6BYV?lQD|i<#O57reMXj24)2QPcu}$HU;VH zjyvPy*+Yj8jnKBr z^FJoh9%)7gnX6P(@b|k9Fg~?_j?Qkhx3{CIDS!%9lvRrGn-SZj%_`CoUtYa3S_8z| z;lm%@C;E;t0G*v(oE?_ETUuJUo>Hk5eDJ~dFn;?M-rKc{zsszqasR=6q*gO{GPi<( zon3hHd)}Abb1B7y}dX%JPg?#!tJ|p%uY{XXEchTgTr|K z{5h`*3KYNC6((@GT#kF}z`$UF9N}C&h6X@mV`Eu|pnpmgUxJ;tcs)aRHj(HMxVYIa znaOtT-i>(t9{T$SC}6(e8fj_oL}y1k=3dT{b~^C!$3H|Y7US`Y>4t@X zrDEmC)+2QTAl61lM-wHve1s@Y&>0->@7YVm`y5q@KJy#~)Q-iyy?uBwGmR**k;$xb z@DVcao_+n?8(CwfVV9RAz#O58j@>j*oKCk##>S2(wyysQAl8l_A5D1N;$XF^TxL6C z4ACKyv%n0;bil@=(HN$upOYp+-1{~t!)MAm+Q=z%0-wumm>x@gwh2C0K7V;;dik~I zde+|h=a}>7e|u~rmp@B-ifUAJIq0m;05Nm2wz#y2)pUyD)E+SHjgQ~L@bHJ+omrX7 zbjH~7dOe9!r8@e{v7g`gU+al)1N8alzq)qe{I6qfuV+-#^f)^Lvk1<@0}BV;UEN47 zEt$0vc^L!6+_^~RVc;nO-=MfZ`m+;1jlB)bJ2AAiu|MfmHRGt)>;HsGiYVD4IzK-z zF@1D)bY}0~nau9pzwd@puH5%Zf$LY^V463z{{lu65W068r(*yB002ovPDHLkV1nsw BJm>%b literal 0 HcmV?d00001 diff --git a/plugins/tracker-resources/img/voltron.png b/plugins/tracker-resources/img/voltron.png new file mode 100644 index 0000000000000000000000000000000000000000..b6d498da92169cbecf7d39b23305620309775012 GIT binary patch literal 957 zcmV;u148_XP)-9A)Fi5v&_?~~-uIn0owVORo9PaI&6n?cp6~tM=lA@1-}fm80=wOw8W|a> zJ3BkO$8lUN{xOJ+$)lsA=MsrzgQLd7!^0P^!|(+-+-|pwJ3Ks`Ai^Vr0K{nnCE!8m z;1D6Shz&IX+z_~hKLFV;*qu}{JRT23BGE6pi=bmD=(sB(uxegKS63%9dN(5j?QLyP ztJN?XjR8h;NV$`Oj*bpQL`3{Ofz#7d^z^*N^71m1&1N$m6coT{$<#n^Z!a1e8hqiWckh*xlY@tag#lATAv^-a(7t0Ig98Ih z3=0cGR#q04mX=_#Sg>ceqh6&#adELP*OZ(jRuVAxmnJ}i`eAewR;!hfDJ?0%vw9UO zD$3z>IvFwj#028v;(~e`2!c{TJ^8-9jp5<F*~c z$N9dwQUU{mgK#-rOs;!chZ9nat*x!d%*@2?p?4S=8NtrZj*zK^5m;DQ zz%-fMLw;$gX()eO4vj`b`v_=tS~NB`vT?^JCrq!`>p{+XAyfaJz_Hs6bzdL6S#4@+ z!ut9;W$z<$3jaExb3rK?lA>b`SI@#3J6joMNSe^^=@{yOH2c=TU zqCp9~Xl`c4+S^}ZZf*`@u^8Fe*$@iee!yn4L0(zO?sVCWl2u?bn$SshLAny|=jO5< z(7WN#0`!~{XDi`6Y<#QY7N7SzosJo&&(%+=5hIR)R;%?*YT2+rA(z8v$q$t9t2eKa zl#~QM1SPPxwuZ5>G4?E#N+DM$uxs0eZO`_TAi1pDR`8*Z?2ujE-MBOX>hbvaI1&>R znWwe2wTMrMM}jl~rDbK9pPz>id?n`vE!gz*^q^yc)_^yU{s)V{UI;FJ8wf#D;D4|L z(hGr*u{SN*e?h>35JE&M^$S9WkDSZpN+r$ZA`!0r&nfAYWTL33s15o+6qC3@@H8Y2 f^3FhQQrkZOEqh^DYyVUE00000NkvXXu0mjf$LFvK literal 0 HcmV?d00001 diff --git a/plugins/tracker-resources/package.json b/plugins/tracker-resources/package.json new file mode 100644 index 0000000000..51a945c4ce --- /dev/null +++ b/plugins/tracker-resources/package.json @@ -0,0 +1,53 @@ +{ + "name": "@anticrm/tracker-resources", + "version": "0.6.0", + "main": "src/index.ts", + "author": "Anticrm Platform Contributors", + "license": "EPL-2.0", + "scripts": { + "build": "echo 'no build for ui'", + "build:docs": "api-extractor run --local", + "lint": "eslint", + "lint:fix": "eslint --fix src", + "format": "prettier --write --plugin-search-dir=. src && eslint --fix src" + }, + "devDependencies": { + "svelte-loader": "^3.1.2", + "sass": "^1.37.5", + "svelte-preprocess": "^4.10.3", + "@anticrm/platform-rig": "~0.6.0", + "@typescript-eslint/eslint-plugin": "^5.4.0", + "@typescript-eslint/parser": "^5.4.0", + "eslint-config-standard-with-typescript": "^21.0.1", + "eslint-plugin-import": "^2.25.3", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^5.1.1", + "eslint-plugin-svelte3": "~3.2.1", + "prettier-plugin-svelte": "^2.2.0", + "eslint": "^7.32.0", + "prettier": "^2.4.1", + "svelte-check": "^2.2.10", + "typescript": "^4.3.5" + }, + "dependencies": { + "svelte": "^3.37.0", + "@anticrm/platform": "~0.6.5", + "@anticrm/core": "~0.6.16", + "@anticrm/client": "~0.6.1", + "@anticrm/tracker": "~0.6.0", + "@anticrm/ui": "~0.6.0", + "@anticrm/view": "~0.6.0", + "@anticrm/presentation": "~0.6.2", + "@anticrm/login": "~0.6.1", + "@anticrm/setting": "~0.6.0", + "@anticrm/calendar": "~0.6.0", + "@anticrm/task": "~0.6.0", + "@anticrm/chunter": "~0.6.0", + "@anticrm/notification": "~0.6.0", + "@anticrm/notification-resources": "~0.6.0", + "@anticrm/contact": "~0.6.5", + "@anticrm/view-resources": "~0.6.0", + "lexorank": "~1.0.4", + "@anticrm/text-editor": "~0.6.0" + } +} diff --git a/plugins/tracker-resources/postcss.config.js b/plugins/tracker-resources/postcss.config.js new file mode 100644 index 0000000000..88752c6cb0 --- /dev/null +++ b/plugins/tracker-resources/postcss.config.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: [ + require('autoprefixer') + ] +} diff --git a/plugins/tracker-resources/src/components/AccountPopup.svelte b/plugins/tracker-resources/src/components/AccountPopup.svelte new file mode 100644 index 0000000000..8a4bf2b422 --- /dev/null +++ b/plugins/tracker-resources/src/components/AccountPopup.svelte @@ -0,0 +1,112 @@ + + + + +
+
+
+ {#await getItems() then items} +
{ editProfile(items) }}> + {#if employee} + + {/if} +
+ {#if account} +
{formatName(account.name)}
+
{account.email}
+ {/if} +
+
+ {#if items} + {#each filterItems(items) as item } + + {/each} + {/if} + + + {/await} +
+
+
diff --git a/plugins/tracker-resources/src/components/AppItem.svelte b/plugins/tracker-resources/src/components/AppItem.svelte new file mode 100644 index 0000000000..594f9d2375 --- /dev/null +++ b/plugins/tracker-resources/src/components/AppItem.svelte @@ -0,0 +1,80 @@ + + + + + + + + + \ No newline at end of file diff --git a/plugins/tracker-resources/src/components/Card.svelte b/plugins/tracker-resources/src/components/Card.svelte new file mode 100644 index 0000000000..a5a460f3b1 --- /dev/null +++ b/plugins/tracker-resources/src/components/Card.svelte @@ -0,0 +1,63 @@ + + + + +
{} }> +
+
+ {#if $$slots.error} +
+ +
+ {/if} +
+
+ {#if spaceClass && spaceLabel && spacePlaceholder} +
+
+ +
+ {/if} + + diff --git a/plugins/tracker-resources/src/components/CreateIssue.svelte b/plugins/tracker-resources/src/components/CreateIssue.svelte new file mode 100644 index 0000000000..5d5c10aca4 --- /dev/null +++ b/plugins/tracker-resources/src/components/CreateIssue.svelte @@ -0,0 +1,121 @@ + + + + 0 && _space != null} + spaceClass={tracker.class.Team} + spaceLabel={tracker.string.Team} + spacePlaceholder={tracker.string.SelectTeam} + bind:space={_space} + on:close={() => { + dispatch('close') + }} +> + + + + + + + diff --git a/plugins/tracker-resources/src/components/NewIssueHeader.svelte b/plugins/tracker-resources/src/components/NewIssueHeader.svelte new file mode 100644 index 0000000000..57885b8eff --- /dev/null +++ b/plugins/tracker-resources/src/components/NewIssueHeader.svelte @@ -0,0 +1,26 @@ + + +
+
+
+
+ {}} size={'large'} /> +
+
diff --git a/plugins/tracker-resources/src/components/NopeComponent.svelte b/plugins/tracker-resources/src/components/NopeComponent.svelte new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plugins/tracker-resources/src/components/SpaceInfo.svelte b/plugins/tracker-resources/src/components/SpaceInfo.svelte new file mode 100644 index 0000000000..c8000e1171 --- /dev/null +++ b/plugins/tracker-resources/src/components/SpaceInfo.svelte @@ -0,0 +1,43 @@ + + + + +
+
+
+ {#if subtitle}
{subtitle}
{/if} +
{value.name}
+
+
+ + diff --git a/plugins/tracker-resources/src/components/SpaceSelect.svelte b/plugins/tracker-resources/src/components/SpaceSelect.svelte new file mode 100644 index 0000000000..2d2a0f7b6c --- /dev/null +++ b/plugins/tracker-resources/src/components/SpaceSelect.svelte @@ -0,0 +1,79 @@ + + + +
{ + showPopup(SpacesPopup, { _class, spaceQuery }, btn, (result) => { + if (result) { + value = result._id + } + }) + }} +> +
+
+ + + {#if selected} + {selected.name} + {:else} + +
+
+ + diff --git a/plugins/tracker-resources/src/components/SpacesPopup.svelte b/plugins/tracker-resources/src/components/SpacesPopup.svelte new file mode 100644 index 0000000000..7ed70872c8 --- /dev/null +++ b/plugins/tracker-resources/src/components/SpacesPopup.svelte @@ -0,0 +1,53 @@ + + + +
+
+
+ +
+
+
+
+
+ {#each objects as space} + + {/each} +
+
+
+
diff --git a/plugins/tracker-resources/src/components/icons/Collapsed.svelte b/plugins/tracker-resources/src/components/icons/Collapsed.svelte new file mode 100644 index 0000000000..ee9faa90bd --- /dev/null +++ b/plugins/tracker-resources/src/components/icons/Collapsed.svelte @@ -0,0 +1,8 @@ + + + + + diff --git a/plugins/tracker-resources/src/components/icons/Expanded.svelte b/plugins/tracker-resources/src/components/icons/Expanded.svelte new file mode 100644 index 0000000000..dc0e8d8145 --- /dev/null +++ b/plugins/tracker-resources/src/components/icons/Expanded.svelte @@ -0,0 +1,8 @@ + + + + + diff --git a/plugins/tracker-resources/src/components/icons/Mention.svelte b/plugins/tracker-resources/src/components/icons/Mention.svelte new file mode 100644 index 0000000000..9053a8f983 --- /dev/null +++ b/plugins/tracker-resources/src/components/icons/Mention.svelte @@ -0,0 +1,8 @@ + + + + + diff --git a/plugins/tracker-resources/src/components/icons/TopMenu.svelte b/plugins/tracker-resources/src/components/icons/TopMenu.svelte new file mode 100644 index 0000000000..a9c2f4291a --- /dev/null +++ b/plugins/tracker-resources/src/components/icons/TopMenu.svelte @@ -0,0 +1,9 @@ + + + + + + diff --git a/plugins/tracker-resources/src/components/inbox/Inbox.svelte b/plugins/tracker-resources/src/components/inbox/Inbox.svelte new file mode 100644 index 0000000000..2ea7a24626 --- /dev/null +++ b/plugins/tracker-resources/src/components/inbox/Inbox.svelte @@ -0,0 +1 @@ +Some inbox stuff here. \ No newline at end of file diff --git a/plugins/tracker-resources/src/components/issues/Active.svelte b/plugins/tracker-resources/src/components/issues/Active.svelte new file mode 100644 index 0000000000..0dc996db2c --- /dev/null +++ b/plugins/tracker-resources/src/components/issues/Active.svelte @@ -0,0 +1,12 @@ + +
+ Active issues {todalIssues} +
+ { todalIssues = evt.detail.length } }> \ No newline at end of file diff --git a/plugins/tracker-resources/src/components/issues/Backlog.svelte b/plugins/tracker-resources/src/components/issues/Backlog.svelte new file mode 100644 index 0000000000..807299a962 --- /dev/null +++ b/plugins/tracker-resources/src/components/issues/Backlog.svelte @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/plugins/tracker-resources/src/components/issues/Board.svelte b/plugins/tracker-resources/src/components/issues/Board.svelte new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plugins/tracker-resources/src/components/issues/CategoryPresenter.svelte b/plugins/tracker-resources/src/components/issues/CategoryPresenter.svelte new file mode 100644 index 0000000000..97599c7d93 --- /dev/null +++ b/plugins/tracker-resources/src/components/issues/CategoryPresenter.svelte @@ -0,0 +1,52 @@ + + +
+
+ {IssueStatus[category]} +
+ + { visible = evt.detail.length > 0 }} + /> + + + + diff --git a/plugins/tracker-resources/src/components/issues/EditIssue.svelte b/plugins/tracker-resources/src/components/issues/EditIssue.svelte new file mode 100644 index 0000000000..94d1b778bd --- /dev/null +++ b/plugins/tracker-resources/src/components/issues/EditIssue.svelte @@ -0,0 +1,81 @@ + + + + {}} + canSave={true} + on:close={() => { + dispatch('close') + }} +> +{#if object !== undefined} + + change('title', object.title) } + /> + change('description', object.description) }/> + change('assignee', object.assignee) } + /> + +{/if} + + diff --git a/plugins/tracker-resources/src/components/issues/IssuePresenter.svelte b/plugins/tracker-resources/src/components/issues/IssuePresenter.svelte new file mode 100644 index 0000000000..652d855550 --- /dev/null +++ b/plugins/tracker-resources/src/components/issues/IssuePresenter.svelte @@ -0,0 +1,45 @@ + + + +{#if value && shortLabel} +
+
+ +
+ {currentTeam.identifier}-{value.number} +
+{/if} diff --git a/plugins/tracker-resources/src/components/issues/Issues.svelte b/plugins/tracker-resources/src/components/issues/Issues.svelte new file mode 100644 index 0000000000..56cedd17fa --- /dev/null +++ b/plugins/tracker-resources/src/components/issues/Issues.svelte @@ -0,0 +1,55 @@ + + + +{#if currentTeam} + +
+ {#each categories as category} + + {/each} +
+
+{/if} diff --git a/plugins/tracker-resources/src/components/myissues/MyIssues.svelte b/plugins/tracker-resources/src/components/myissues/MyIssues.svelte new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plugins/tracker-resources/src/components/projects/Projects.svelte b/plugins/tracker-resources/src/components/projects/Projects.svelte new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plugins/tracker-resources/src/components/views/Views.svelte b/plugins/tracker-resources/src/components/views/Views.svelte new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plugins/tracker-resources/src/index.ts b/plugins/tracker-resources/src/index.ts new file mode 100644 index 0000000000..6e510b8730 --- /dev/null +++ b/plugins/tracker-resources/src/index.ts @@ -0,0 +1,47 @@ +// +// Copyright © 2020, 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. +// + +import { Resources } from '@anticrm/platform' + +import NopeComponent from './components/NopeComponent.svelte' + +import Active from './components/issues/Active.svelte' +import Backlog from './components/issues/Backlog.svelte' +import Board from './components/issues/Board.svelte' +import Inbox from './components/inbox/Inbox.svelte' +import Issues from './components/issues/Issues.svelte' +import MyIssues from './components/myissues/MyIssues.svelte' +import Projects from './components/projects/Projects.svelte' +import Views from './components/views/Views.svelte' +import IssuePresenter from './components/issues/IssuePresenter.svelte' +import EditIssue from './components/issues/EditIssue.svelte' +import NewIssueHeader from './components/NewIssueHeader.svelte' + +export default async (): Promise => ({ + component: { + NopeComponent, + Active, + Backlog, + Board, + Inbox, + Issues, + MyIssues, + Projects, + Views, + IssuePresenter, + EditIssue, + NewIssueHeader + } +}) diff --git a/plugins/tracker-resources/src/plugin.ts b/plugins/tracker-resources/src/plugin.ts new file mode 100644 index 0000000000..45b293a29e --- /dev/null +++ b/plugins/tracker-resources/src/plugin.ts @@ -0,0 +1,80 @@ +// +// Copyright © 2020 Anticrm Platform Contributors. +// +// Licensed under the Eclipse Public License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. You may +// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import type { IntlString } from '@anticrm/platform' +import { mergeIds } from '@anticrm/platform' +import tracker, { trackerId } from '../../tracker/lib' +import { AnyComponent } from '@anticrm/ui' + +export default mergeIds(trackerId, tracker, { + string: { + More: '' as IntlString, + Delete: '' as IntlString, + Open: '' as IntlString, + Members: '' as IntlString, + Inbox: '' as IntlString, + MyIssues: '' as IntlString, + Issues: '' as IntlString, + Views: '' as IntlString, + Active: '' as IntlString, + Backlog: '' as IntlString, + Board: '' as IntlString, + Projects: '' as IntlString, + CreateTeam: '' as IntlString, + NewIssue: '' as IntlString, + Team: '' as IntlString, + SelectTeam: '' as IntlString, + + Title: '' as IntlString, + Identifier: '' as IntlString, + Description: '' as IntlString, + Status: '' as IntlString, + Priority: '' as IntlString, + Number: '' as IntlString, + Assignee: '' as IntlString, + Parent: '' as IntlString, + BlockedBy: '' as IntlString, + RelatedTo: '' as IntlString, + Comments: '' as IntlString, + Attachments: '' as IntlString, + Labels: '' as IntlString, + Space: '' as IntlString, + DueDate: '' as IntlString, + Issue: '' as IntlString, + Document: '' as IntlString, + DocumentIcon: '' as IntlString, + DocumentColor: '' as IntlString, + Rank: '' as IntlString, + + IssueTitlePlaceholder: '' as IntlString, + IssueDescriptionPlaceholder: '' as IntlString, + TaskUnAssign: '' as IntlString + }, + component: { + NopeComponent: '' as AnyComponent, + Inbox: '' as AnyComponent, + MyIssues: '' as AnyComponent, + Issues: '' as AnyComponent, + Views: '' as AnyComponent, + Active: '' as AnyComponent, + Backlog: '' as AnyComponent, + Board: '' as AnyComponent, + Projects: '' as AnyComponent, + IssuePresenter: '' as AnyComponent, + EditIssue: '' as AnyComponent, + CreateTeam: '' as AnyComponent, + NewIssueHeader: '' as AnyComponent + } +}) diff --git a/plugins/tracker-resources/src/utils.ts b/plugins/tracker-resources/src/utils.ts new file mode 100644 index 0000000000..7a8fe31cf4 --- /dev/null +++ b/plugins/tracker-resources/src/utils.ts @@ -0,0 +1,63 @@ +// +// Copyright © 2020, 2021 Anticrm Platform Contributors. +// Copyright © 2021 Hardcore Engineering Inc. +// +// Licensed under the Eclipse Public License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. You may +// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import { Ref } from '@anticrm/core' +import type { Asset, IntlString } from '@anticrm/platform' +import { Team } from '@anticrm/tracker' +import { AnyComponent } from '@anticrm/ui' +import { LexoDecimal, LexoNumeralSystem36, LexoRank } from 'lexorank' +import LexoRankBucket from 'lexorank/lib/lexoRank/lexoRankBucket' + +export interface NavigationItem { + id: string + label: IntlString + icon: Asset + component: AnyComponent + componentProps?: Record + top: boolean +} + +export interface Selection { + currentTeam?: Ref + currentSpecial?: string +} + +/** + * @public + */ +export const genRanks = (count: number): Generator => + (function * () { + const sys = new LexoNumeralSystem36() + const base = 36 + const max = base ** 6 + const gap = LexoDecimal.parse(Math.trunc(max / (count + 2)).toString(base), sys) + let cur = LexoDecimal.parse('0', sys) + + for (let i = 0; i < count; i++) { + cur = cur.add(gap) + yield new LexoRank(LexoRankBucket.BUCKET_0, cur).toString() + } + })() + +/** + * @public + */ +export const calcRank = (prev?: { rank: string }, next?: { rank: string }): string => { + const a = prev?.rank !== undefined ? LexoRank.parse(prev.rank) : LexoRank.min() + const b = next?.rank !== undefined ? LexoRank.parse(next.rank) : LexoRank.max() + + return a.between(b).toString() +} diff --git a/plugins/tracker-resources/svelte.config.js b/plugins/tracker-resources/svelte.config.js new file mode 100644 index 0000000000..944a06f73e --- /dev/null +++ b/plugins/tracker-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/tracker-resources/tsconfig.json b/plugins/tracker-resources/tsconfig.json new file mode 100644 index 0000000000..cabe5aefad --- /dev/null +++ b/plugins/tracker-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/tracker/.eslintrc.js b/plugins/tracker/.eslintrc.js new file mode 100644 index 0000000000..5da5872d4a --- /dev/null +++ b/plugins/tracker/.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/tracker/.npmignore b/plugins/tracker/.npmignore new file mode 100644 index 0000000000..e3ec093c38 --- /dev/null +++ b/plugins/tracker/.npmignore @@ -0,0 +1,4 @@ +* +!/lib/** +!CHANGELOG.md +/lib/**/__tests__/ diff --git a/plugins/tracker/config/rig.json b/plugins/tracker/config/rig.json new file mode 100644 index 0000000000..af1257a896 --- /dev/null +++ b/plugins/tracker/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/tracker/package.json b/plugins/tracker/package.json new file mode 100644 index 0000000000..a2e80ea8b5 --- /dev/null +++ b/plugins/tracker/package.json @@ -0,0 +1,37 @@ +{ + "name": "@anticrm/tracker", + "version": "0.6.0", + "main": "lib/index.js", + "author": "Anticrm Platform Contributors", + "license": "EPL-2.0", + "scripts": { + "build": "heft build", + "build:watch": "tsc", + "lint:fix": "eslint --fix src", + "lint": "eslint src", + "format": "prettier --write src && eslint --fix src" + }, + "devDependencies": { + "@anticrm/platform-rig": "~0.6.0", + "@types/heft-jest": "^1.0.2", + "@typescript-eslint/eslint-plugin": "^5.4.0", + "eslint-plugin-import": "^2.25.3", + "eslint-plugin-promise": "^5.1.1", + "eslint-plugin-node": "^11.1.0", + "eslint": "^7.32.0", + "@typescript-eslint/parser": "^5.4.0", + "eslint-config-standard-with-typescript": "^21.0.1", + "prettier": "^2.4.1", + "@rushstack/heft": "^0.41.1", + "typescript": "^4.3.5" + }, + "dependencies": { + "@anticrm/core": "~0.6.16", + "@anticrm/platform": "~0.6.5", + "@anticrm/ui": "~0.6.0", + "@anticrm/contact": "~0.6.5", + "@anticrm/chunter": "~0.6.1", + "@anticrm/attachment": "~0.6.1", + "@anticrm/task": "~0.6.0" + } +} diff --git a/plugins/tracker/src/index.ts b/plugins/tracker/src/index.ts new file mode 100644 index 0000000000..68cd668693 --- /dev/null +++ b/plugins/tracker/src/index.ts @@ -0,0 +1,145 @@ +// +// 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 { Employee } from '@anticrm/contact' +import type { Class, Doc, Markup, Ref, Space, Timestamp } from '@anticrm/core' +import type { Asset, IntlString, Plugin } from '@anticrm/platform' +import { plugin } from '@anticrm/platform' +import { AnyComponent } from '@anticrm/ui' + +/** + * @public + */ +export interface Team extends Space { + teamLogo?: string | null + identifier: string // Team identifier + sequence: number +} +/** + * @public + */ +export enum IssueStatus { + Backlog, + Todo, + InProgress, + Done, + Canceled +} + +/** + * @public + */ +export enum IssuePriority { + NoPriority, + Urgent, + High, + Medium, + Low +} + +/** + * @public + */ +export interface Issue extends Doc { + title: string + description: Markup + status: IssueStatus + priority: IssuePriority + + number: number + assignee: Ref | null + + // For subtasks + parentIssue?: Ref + blockedBy?: Ref[] + relatedIssue?: Ref[] + + comments: number + attachments?: number + labels?: string[] + + space: Ref + + dueDate: Timestamp | null + + rank: string +} + +/** + * @public + */ +export interface Document extends Doc { + title: string + icon: string | null + color: number + content?: Markup + + space: Ref +} + +/** + * @public + */ +export enum ProjectStatus { + Planned, + InProgress, + Paused, + Completed, + Canceled +} + +/** + * @public + */ +export interface Project extends Doc { + label: IntlString + description?: Markup + + space: Ref + + comments: number + attachments?: number + + startDate: Timestamp | null + targetDate: Timestamp | null + + // Ref[] + documents: number +} + +/** + * @public + */ +export const trackerId = 'tracker' as Plugin + +export default plugin(trackerId, { + class: { + Team: '' as Ref>, + Issue: '' as Ref>, + Document: '' as Ref>, + Project: '' as Ref> + }, + component: { + Tracker: '' as AnyComponent, + TrackerApp: '' as AnyComponent + }, + icon: { + TrackerApplication: '' as Asset, + Project: '' as Asset, + Issue: '' as Asset, + Team: '' as Asset, + Document: '' as Asset + } +}) diff --git a/plugins/tracker/tsconfig.json b/plugins/tracker/tsconfig.json new file mode 100644 index 0000000000..32045300ce --- /dev/null +++ b/plugins/tracker/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/view-resources/src/components/Table.svelte b/plugins/view-resources/src/components/Table.svelte index f34aec838e..f01f4d7f90 100644 --- a/plugins/view-resources/src/components/Table.svelte +++ b/plugins/view-resources/src/components/Table.svelte @@ -23,6 +23,7 @@ import MoreV from './icons/MoreV.svelte' import Menu from './Menu.svelte' import notification from '@anticrm/notification' +import { createEventDispatcher } from 'svelte' export let _class: Ref> export let query: DocumentQuery @@ -45,6 +46,8 @@ const q = createQuery() + const dispatch = createEventDispatcher() + $: sortingFunction = (config.find(it => (typeof it !== 'string') && it.sortingKey === sortKey) as BuildModelKey)?.sortingFunction let qindex = 0 @@ -69,6 +72,7 @@ const sf = sortingFunction objects.sort((a, b) => -1 * sortOrder * sf(a, b)) } + dispatch('content', objects) loading = false }, { sort: { [sortKey]: sortOrder }, ...options, limit: 200 } diff --git a/plugins/workbench-resources/src/components/AccountPopup.svelte b/plugins/workbench-resources/src/components/AccountPopup.svelte index f5e83d69d0..0ccc905249 100644 --- a/plugins/workbench-resources/src/components/AccountPopup.svelte +++ b/plugins/workbench-resources/src/components/AccountPopup.svelte @@ -15,7 +15,7 @@
- +
+ + +
+ {fetchMetadataLocalStorage(login.metadata.CurrentWorkspace)} +
+
diff --git a/plugins/workbench-resources/src/components/Navigator.svelte b/plugins/workbench-resources/src/components/Navigator.svelte index 39a7ab44a4..b850adb39c 100644 --- a/plugins/workbench-resources/src/components/Navigator.svelte +++ b/plugins/workbench-resources/src/components/Navigator.svelte @@ -95,18 +95,18 @@ {#if model.specials} {#each topSpecials as special} - dispatch('special', special.id)} selected={special.id === currentSpecial} /> + dispatch('special', special.id)} selected={special.id === currentSpecial} indent={'ml-2'} /> {/each} {/if} {#if showDivider}{/if} {#each model.spaces as m (m.label)} - hierarchy.isDerived(it._class, m.spaceClass))} {currentSpace} model={m} on:space/> + hierarchy.isDerived(it._class, m.spaceClass))} {currentSpace} model={m} on:space {currentSpecial}/> {/each} {#if model.specials} {#each bottomSpecials as special} - dispatch('special', special.id)} selected={special.id === currentSpecial} /> + dispatch('special', special.id)} selected={special.id === currentSpecial} indent={'ml-2'} /> {/each} {/if}
diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte index 3f768d1c0c..6a072540e1 100644 --- a/plugins/workbench-resources/src/components/Workbench.svelte +++ b/plugins/workbench-resources/src/components/Workbench.svelte @@ -13,17 +13,17 @@ // limitations under the License. --> -{#await connect()} +{#await connect('Platform')} {:then client} {#if !client && versionError} @@ -99,7 +28,7 @@ async function connect (): Promise {

Server is under maintenance.

{versionError}
- {:else} + {:else if client} {/if} {:catch error} diff --git a/plugins/workbench-resources/src/components/navigator/SpacesNav.svelte b/plugins/workbench-resources/src/components/navigator/SpacesNav.svelte index c1f975b5c7..1f1dea2d67 100644 --- a/plugins/workbench-resources/src/components/navigator/SpacesNav.svelte +++ b/plugins/workbench-resources/src/components/navigator/SpacesNav.svelte @@ -13,23 +13,25 @@ // limitations under the License. --> -
- [addSpace]}> - {#each spaces as space (space._id)} + [addSpace]} indent={'ml-2'}> + {#each spaces as space (space._id)} + {#if model.specials} + + {#each model.specials as special} + dispatch('special', special.id)} + selected={currentSpace === space._id && special.id === currentSpecial} + on:click={() => { + selectSpace(space._id, special.id) + }} + /> + {/each} + + {:else} - {/each} - -
+ {/if} + {/each} + diff --git a/plugins/workbench-resources/src/components/navigator/SpecialElement.svelte b/plugins/workbench-resources/src/components/navigator/SpecialElement.svelte index a9ef3c932e..61598409d8 100644 --- a/plugins/workbench-resources/src/components/navigator/SpecialElement.svelte +++ b/plugins/workbench-resources/src/components/navigator/SpecialElement.svelte @@ -23,13 +23,14 @@ export let notifications = 0 export let actions: Action[] = [] export let selected: boolean = false + export let indent: 'default' | 'ml-2' | 'ml-4' | 'ml-8' = 'default' const dispatch = createEventDispatcher()
{ dispatch('click') }} diff --git a/plugins/workbench-resources/src/components/navigator/TreeElement.svelte b/plugins/workbench-resources/src/components/navigator/TreeElement.svelte index 6c1ef90464..4288a414b2 100644 --- a/plugins/workbench-resources/src/components/navigator/TreeElement.svelte +++ b/plugins/workbench-resources/src/components/navigator/TreeElement.svelte @@ -31,11 +31,12 @@ export let collapsed = false export let selected = false export let actions: () => Promise = async () => [] + export let indent: 'default' | 'ml-2' | 'ml-4' | 'ml-8' = 'default' const dispatch = createEventDispatcher() let hovered = false - async function onMenuClick (ev: MouseEvent) { + async function onMenuClick(ev: MouseEvent) { showPopup(Menu, { actions: await actions(), ctx: _id }, ev.target as HTMLElement, () => { hovered = false }) @@ -43,19 +44,37 @@ } -
{ if (node && !icon) collapsed = !collapsed dispatch('click') }} > -
- {#if icon} - - {:else if collapsed}{:else}{/if} -
- {#if label} {#if node === false}
diff --git a/plugins/workbench-resources/src/components/navigator/TreeItem.svelte b/plugins/workbench-resources/src/components/navigator/TreeItem.svelte index 5eca00aa0d..708da51a33 100644 --- a/plugins/workbench-resources/src/components/navigator/TreeItem.svelte +++ b/plugins/workbench-resources/src/components/navigator/TreeItem.svelte @@ -26,9 +26,10 @@ export let notifications = 0 export let actions: () => Promise = async () => [] export let selected: boolean = false + export let indent: 'default' | 'ml-2' | 'ml-4' | 'ml-8' = 'default' const dispatch = createEventDispatcher() - { dispatch('click') }}/> + { dispatch('click') }}/> diff --git a/plugins/workbench-resources/src/components/navigator/TreeNode.svelte b/plugins/workbench-resources/src/components/navigator/TreeNode.svelte index 6e9aa64e2b..ce1dcc0bac 100644 --- a/plugins/workbench-resources/src/components/navigator/TreeNode.svelte +++ b/plugins/workbench-resources/src/components/navigator/TreeNode.svelte @@ -18,13 +18,15 @@ import type { Action } from '@anticrm/ui' import TreeElement from './TreeElement.svelte' - export let label: IntlString + export let title: string | undefined = undefined + export let label: IntlString | undefined = undefined export let actions: () => Promise = async () => [] export let notifications = 0 export let collapsed = false + export let indent: 'default' | 'ml-2' | 'ml-4' | 'ml-8' = 'default' - + \ No newline at end of file diff --git a/plugins/workbench/src/index.ts b/plugins/workbench/src/index.ts index e1294bbebd..618852a102 100644 --- a/plugins/workbench/src/index.ts +++ b/plugins/workbench/src/index.ts @@ -14,7 +14,7 @@ // import type { Class, Doc, Mixin, Obj, Ref, Space } from '@anticrm/core' -import type { Asset, IntlString, Metadata, Plugin, Resource } from '@anticrm/platform' +import type { Asset, IntlString, Plugin, Resource } from '@anticrm/platform' import { plugin } from '@anticrm/platform' import { AnyComponent } from '@anticrm/ui' @@ -29,6 +29,9 @@ export interface Application extends Doc { // Component will be displayed in case navigator model is not defined, or nothing is selected in navigator model component?: AnyComponent + + navHeaderComponent?: AnyComponent + navFooterComponent?: AnyComponent } /** @@ -39,6 +42,9 @@ export interface SpacesNavModel { spaceClass: Ref> addSpaceLabel: IntlString createComponent: AnyComponent + + // Child special items. + specials?: SpecialNavModel[] } /** @@ -55,7 +61,7 @@ export interface NavigatorModel { export interface SpecialNavModel { id: string // Uniq id label: IntlString - icon: Asset + icon?: Asset component: AnyComponent componentProps?: Record position?: 'top'|'bottom' // undefined == 'top @@ -94,8 +100,5 @@ export default plugin(workbenchId, { }, component: { WorkbenchApp: '' as AnyComponent - }, - metadata: { - RequiredVersion: '' as Metadata } }) diff --git a/rush.json b/rush.json index 9a7990cd46..9c96d8f454 100644 --- a/rush.json +++ b/rush.json @@ -1211,5 +1211,26 @@ "projectFolder": "server-plugins/telegram-resources", "shouldPublish": true }, + + { + "packageName": "@anticrm/tracker", + "projectFolder": "plugins/tracker", + "shouldPublish": true + }, + { + "packageName": "@anticrm/tracker-assets", + "projectFolder": "plugins/tracker-assets", + "shouldPublish": true + }, + { + "packageName": "@anticrm/tracker-resources", + "projectFolder": "plugins/tracker-resources", + "shouldPublish": true + }, + { + "packageName": "@anticrm/model-tracker", + "projectFolder": "models/tracker", + "shouldPublish": true + }, ] } diff --git a/tests/setup-elastic.sh b/tests/setup-elastic.sh index 7fea1dc558..bf84cbcc8e 100755 --- a/tests/setup-elastic.sh +++ b/tests/setup-elastic.sh @@ -1,5 +1,5 @@ res='' -echo "Warting Elastic to up and running with attachment processor..." +echo "Warning Elastic to up and running with attachment processor..." while true do res=$(curl -s -XPUT "localhost:9201/_ingest/pipeline/attachment?pretty" -H 'Content-Type: application/json' -d'