diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 0e947b5ffc..3c3c379620 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -6815,6 +6815,9 @@ importers: '@hcengineering/chunter': specifier: workspace:^0.7.0 version: link:../../plugins/chunter + '@hcengineering/communication': + specifier: workspace:^0.7.0 + version: link:../../plugins/communication '@hcengineering/contact': specifier: workspace:^0.7.0 version: link:../../plugins/contact @@ -17320,6 +17323,9 @@ importers: '@hcengineering/account-client': specifier: workspace:^0.7.21 version: link:../../foundations/core/packages/account-client + '@hcengineering/activity': + specifier: workspace:^0.7.0 + version: link:../activity '@hcengineering/analytics': specifier: workspace:^0.7.17 version: link:../../foundations/core/packages/analytics @@ -61252,7 +61258,7 @@ snapshots: node-loader@2.0.0(webpack@5.102.1): dependencies: loader-utils: 2.0.4 - webpack: 5.102.1 + webpack: 5.102.1(@swc/core@1.15.1)(esbuild@0.25.12)(webpack-cli@5.1.4) node-localstorage@2.2.1: dependencies: @@ -63283,15 +63289,6 @@ snapshots: optionalDependencies: '@swc/core': 1.15.1 - terser-webpack-plugin@5.3.14(webpack@5.102.1): - dependencies: - '@jridgewell/trace-mapping': 0.3.31 - jest-worker: 27.5.1 - schema-utils: 4.3.3 - serialize-javascript: 6.0.2 - terser: 5.44.1 - webpack: 5.102.1 - terser@5.44.1: dependencies: '@jridgewell/source-map': 0.3.11 @@ -63958,38 +63955,6 @@ snapshots: webpack-sources@3.3.3: {} - webpack@5.102.1: - dependencies: - '@types/eslint-scope': 3.7.7 - '@types/estree': 1.0.8 - '@types/json-schema': 7.0.15 - '@webassemblyjs/ast': 1.14.1 - '@webassemblyjs/wasm-edit': 1.14.1 - '@webassemblyjs/wasm-parser': 1.14.1 - acorn: 8.15.0 - acorn-import-phases: 1.0.4(acorn@8.15.0) - browserslist: 4.28.1 - chrome-trace-event: 1.0.4 - enhanced-resolve: 5.18.3 - es-module-lexer: 1.7.0 - eslint-scope: 5.1.1 - events: 3.3.0 - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - json-parse-even-better-errors: 2.3.1 - loader-runner: 4.3.1 - mime-types: 2.1.35 - neo-async: 2.6.2 - schema-utils: 4.3.3 - tapable: 2.3.0 - terser-webpack-plugin: 5.3.14(webpack@5.102.1) - watchpack: 2.4.4 - webpack-sources: 3.3.3 - transitivePeerDependencies: - - '@swc/core' - - esbuild - - uglify-js - webpack@5.102.1(@swc/core@1.15.1): dependencies: '@types/eslint-scope': 3.7.7 diff --git a/dev/prod/src/platform.ts b/dev/prod/src/platform.ts index c0796af6bc..816d527f17 100644 --- a/dev/prod/src/platform.ts +++ b/dev/prod/src/platform.ts @@ -488,7 +488,6 @@ export async function configurePlatform() { setMetadata(textEditor.metadata.Collaborator, config.COLLABORATOR) setMetadata(communication.metadata.Enabled, config.COMMUNICATION_API_ENABLED === 'true') - if (config.MODEL_VERSION != null) { console.log('Minimal Model version requirement', config.MODEL_VERSION) setMetadata(presentation.metadata.ModelVersion, config.MODEL_VERSION) diff --git a/models/card/package.json b/models/card/package.json index 9953f4444e..e706197bd4 100644 --- a/models/card/package.json +++ b/models/card/package.json @@ -36,6 +36,7 @@ "dependencies": { "@hcengineering/activity": "workspace:^0.7.0", "@hcengineering/contact": "workspace:^0.7.0", + "@hcengineering/communication": "workspace:^0.7.0", "@hcengineering/core": "workspace:^0.7.24", "@hcengineering/model": "workspace:^0.7.17", "@hcengineering/chunter": "workspace:^0.7.0", diff --git a/models/card/src/index.ts b/models/card/src/index.ts index 54c7797fb6..6eee4435c1 100644 --- a/models/card/src/index.ts +++ b/models/card/src/index.ts @@ -12,6 +12,7 @@ // limitations under the License. import activity from '@hcengineering/activity' +import communication from '@hcengineering/communication' import { type CanCreateCardResource, type Card, @@ -923,6 +924,32 @@ function defineTabs (builder: Builder): void { card.section.Relations ) + builder.createDoc( + card.class.CardSection, + core.space.Model, + { + label: activity.string.Messages, + component: card.sectionComponent.OldMessagesSection, + order: 1000, + navigation: [], + checkVisibility: card.function.CheckOldMessagesSectionVisibility + }, + card.section.OldMessages + ) + + builder.createDoc( + card.class.CardSection, + core.space.Model, + { + label: activity.string.Messages, + component: card.sectionComponent.CommunicationMessagesSection, + order: 1000, + navigation: [], + checkVisibility: card.function.CheckCommunicationMessagesSectionVisibility + }, + communication.ids.CardMessagesSection + ) + builder.createDoc(view.class.Viewlet, core.space.Model, { attachTo: card.class.FavoriteCard, descriptor: view.viewlet.Table, diff --git a/models/card/src/plugin.ts b/models/card/src/plugin.ts index c6b90350ca..b17913c44c 100644 --- a/models/card/src/plugin.ts +++ b/models/card/src/plugin.ts @@ -57,6 +57,8 @@ export default mergeIds(cardId, card, { GetCardLink: '' as Resource<(doc: Doc, props: Record) => Promise>, CardCustomLinkMatch: '' as Resource<(doc: Doc) => boolean>, CardCustomLinkEncode: '' as Resource<(doc: Doc) => Location>, - CheckRelationsSectionVisibility: '' as Resource<(doc: Card) => Promise> + CheckRelationsSectionVisibility: '' as Resource<(doc: Card) => Promise>, + CheckOldMessagesSectionVisibility: '' as Resource<(doc: Card) => Promise>, + CheckCommunicationMessagesSectionVisibility: '' as Resource<(doc: Card) => Promise> } }) diff --git a/plugins/card-resources/package.json b/plugins/card-resources/package.json index 32304f78e5..5076796d7b 100644 --- a/plugins/card-resources/package.json +++ b/plugins/card-resources/package.json @@ -43,6 +43,7 @@ "@hcengineering/presentation": "workspace:^0.7.0", "@hcengineering/communication-types": "workspace:^0.7.12", "@hcengineering/communication-resources": "workspace:^0.7.0", + "@hcengineering/activity": "workspace:^0.7.0", "@hcengineering/core": "workspace:^0.7.24", "@hcengineering/ui": "workspace:^0.7.0", "@hcengineering/setting": "workspace:^0.7.0", diff --git a/plugins/card-resources/src/card.ts b/plugins/card-resources/src/card.ts index b5b6902b8a..7d6758f770 100644 --- a/plugins/card-resources/src/card.ts +++ b/plugins/card-resources/src/card.ts @@ -13,7 +13,7 @@ import { getClient } from '@hcengineering/presentation' import cardPlugin, { type Card, type CardSection } from '@hcengineering/card' -import { getResource } from '@hcengineering/platform' +import { getMetadata, getResource } from '@hcengineering/platform' import { type Heading } from '@hcengineering/text-editor' import communication from '@hcengineering/communication' @@ -69,12 +69,14 @@ export function getCardToc (sections: CardSection[], tocBySection: Record -{#if getMetadata(communication.metadata.Enabled) === true} - -{:else} - -{/if} + diff --git a/plugins/card-resources/src/components/EditCardNewContent.svelte b/plugins/card-resources/src/components/EditCardNewContent.svelte index fa0b075c0c..a6a980ed77 100644 --- a/plugins/card-resources/src/components/EditCardNewContent.svelte +++ b/plugins/card-resources/src/components/EditCardNewContent.svelte @@ -15,12 +15,14 @@ - - - -{#if doc !== undefined} - dispatch('close')} - > - - - - - - - - - - - - - - -
-
- saveTitle(evt)} - shrink - /> -
- - - - - - - - -
- - - - - - - - - - {#if !_readonly} -