mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-06 17:57:42 +02:00
UBERF-9297/Initial personal browser and mail (#8021)
Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
Generated
+265
@@ -361,6 +361,15 @@ importers:
|
||||
'@rush-temp/love-resources':
|
||||
specifier: file:./projects/love-resources.tgz
|
||||
version: file:projects/love-resources.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@20.11.19)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
'@rush-temp/mail':
|
||||
specifier: file:./projects/mail.tgz
|
||||
version: file:projects/mail.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@20.11.19)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
'@rush-temp/mail-assets':
|
||||
specifier: file:./projects/mail-assets.tgz
|
||||
version: file:projects/mail-assets.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
'@rush-temp/mail-resources':
|
||||
specifier: file:./projects/mail-resources.tgz
|
||||
version: file:projects/mail-resources.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@20.11.19)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
'@rush-temp/middleware':
|
||||
specifier: file:./projects/middleware.tgz
|
||||
version: file:projects/middleware.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@20.11.19)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
@@ -439,9 +448,15 @@ importers:
|
||||
'@rush-temp/model-love':
|
||||
specifier: file:./projects/model-love.tgz
|
||||
version: file:projects/model-love.tgz
|
||||
'@rush-temp/model-mail':
|
||||
specifier: file:./projects/model-mail.tgz
|
||||
version: file:projects/model-mail.tgz
|
||||
'@rush-temp/model-notification':
|
||||
specifier: file:./projects/model-notification.tgz
|
||||
version: file:projects/model-notification.tgz
|
||||
'@rush-temp/model-my-space':
|
||||
specifier: file:./projects/model-my-space.tgz
|
||||
version: file:projects/model-my-space.tgz
|
||||
'@rush-temp/model-preference':
|
||||
specifier: file:./projects/model-preference.tgz
|
||||
version: file:projects/model-preference.tgz
|
||||
@@ -634,6 +649,15 @@ importers:
|
||||
'@rush-temp/panel':
|
||||
specifier: file:./projects/panel.tgz
|
||||
version: file:projects/panel.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@20.11.19)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
'@rush-temp/my-space':
|
||||
specifier: file:./projects/my-space.tgz
|
||||
version: file:projects/my-space.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@20.11.19)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
'@rush-temp/my-space-assets':
|
||||
specifier: file:./projects/my-space-assets.tgz
|
||||
version: file:projects/my-space-assets.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
'@rush-temp/my-space-resources':
|
||||
specifier: file:./projects/my-space-resources.tgz
|
||||
version: file:projects/my-space-resources.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@20.11.19)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
'@rush-temp/platform':
|
||||
specifier: file:./projects/platform.tgz
|
||||
version: file:projects/platform.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@20.11.19)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
@@ -4318,6 +4342,18 @@ packages:
|
||||
resolution: {integrity: sha512-D9QBf+/PREVaj/zqju1EnET+45ImzmEpqYThK+I2fbGxZ2t128DbfspBi3Lf2pUure8yF2PSTlTJSzKmUtgvpA==, tarball: file:projects/love.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/mail-assets@file:projects/mail-assets.tgz':
|
||||
resolution: {integrity: sha512-Lp1APt1DRMNrH2DhlOTTJjjIPhThHuc1+3Jj1fJU1ryH4FcJwCDFRw9InLEhjphf9cGC6z06EpgL3+3FtHOmJg==, tarball: file:projects/mail-assets.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/mail-resources@file:projects/mail-resources.tgz':
|
||||
resolution: {integrity: sha512-8PtetoobhgQAiaGjqRf2aOgVY3Xh0KkyWTVLA2GIKaWY0lD0Vt69jDk1jptyXJOfkQLXRTSk7JxTs9lH96q8UQ==, tarball: file:projects/mail-resources.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/mail@file:projects/mail.tgz':
|
||||
resolution: {integrity: sha512-khCqnHqt/MDtJv8eTx08ov9GkvC00wPeb1Q+QE5zk7xqbjK/QYJWPmdMRkvOJobCHLh2/g6ST2lgNbV938hrJA==, tarball: file:projects/mail.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/middleware@file:projects/middleware.tgz':
|
||||
resolution: {integrity: sha512-d3bnkZYGycgZKQg4veVLwKczJdPhg65urbHhl9FJI3MV2izx8zCRu01frLW6zn61nYGW1fffugXfGoWBv4xxcA==, tarball: file:projects/middleware.tgz}
|
||||
version: 0.0.0
|
||||
@@ -4418,10 +4454,18 @@ packages:
|
||||
resolution: {integrity: sha512-7bncZHfFYZKaCX+Wv+mcOHFU328pUC8qmqDw2V/o4Ee+fZAMCpudJuevAwtjf9uIu3fuyf1E+SLCgz8YXjyQBQ==, tarball: file:projects/model-love.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/model-mail@file:projects/model-mail.tgz':
|
||||
resolution: {integrity: sha512-Z2WZ+9IF0119TDZDyODrcI3ptuQLQ/h7WaxvbPIFsUQm+MI5VPV6hCNUBNp8if2XQLmSn0YByejtW1bSBz/WAg==, tarball: file:projects/model-mail.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/model-notification@file:projects/model-notification.tgz':
|
||||
resolution: {integrity: sha512-k7valecajKQwOhAeROASPm+RO2/D3xZSkan8Z09kmy+9dNLYBxQT/mr7k+HBdlzU4JD3fDQRP6EStyJBkLFZsQ==, tarball: file:projects/model-notification.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/model-my-space@file:projects/model-my-space.tgz':
|
||||
resolution: {integrity: sha512-OxBDKFosN/3hsy9Ot0fDJTpzqFJvNLWxgJXtmculo1ksyKacMGZc4+9Ouxj49NFQ4JPl1UpBLZjaWPQ7xuyo3w==, tarball: file:projects/model-my-space.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/model-preference@file:projects/model-preference.tgz':
|
||||
resolution: {integrity: sha512-r2RLrTIRHQ4txZegXOqXQfcPMJmA6HQz5i9EOi8RH7mGB+f6lqnBoYCf+mihfazPXLyF8NXbhPuNX1XHXMqvyg==, tarball: file:projects/model-preference.tgz}
|
||||
version: 0.0.0
|
||||
@@ -4682,6 +4726,18 @@ packages:
|
||||
resolution: {integrity: sha512-cjwk9I0RxeNJQTgtbbcQlwiurbp+/T5MbiRnYTLWvxsMBVWnnxD5nToECUt1QdW/CjSSbPsaYP8hoMgt/AufCw==, tarball: file:projects/panel.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/my-space-assets@file:projects/my-space-assets.tgz':
|
||||
resolution: {integrity: sha512-yGiP0aFiYA6RZiY4Ufqhk2egfhWvjEi3GOjcmLZ3eAl3samu/g4b3BcAKzo6SimMwKM2GQF+9oKHn1F/5LmSjA==, tarball: file:projects/my-space-assets.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/my-space-resources@file:projects/my-space-resources.tgz':
|
||||
resolution: {integrity: sha512-dE2Jeu1rsu0l18l6oKj0Z+D99sS8fkuAcqoqh9alzavqquUvgGSXtTUB24l6Y6A0tbpshtAMLhmFSFgwPtSGHw==, tarball: file:projects/my-space-resources.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/my-space@file:projects/my-space.tgz':
|
||||
resolution: {integrity: sha512-dBx6We9vl3uuETflughn1Q1jmxjzQdxZ0rf+OiZZ6lRM0u304BhlM7459AMcaZ76oxkqZ6ulRYVVxr8k7ZGHaA==, tarball: file:projects/my-space.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/platform-rig@file:projects/platform-rig.tgz':
|
||||
resolution: {integrity: sha512-Ex4y6Gru0FdNgfJ8Q/TOIOZLrvmk+4eDiepGH95XOsHgcTQTfhHPfNwYBgC5yOqQrY9O8GDqWUZtV+KySEAQjg==, tarball: file:projects/platform-rig.tgz}
|
||||
version: 0.0.0
|
||||
@@ -19105,6 +19161,96 @@ snapshots:
|
||||
- svelte
|
||||
- ts-node
|
||||
|
||||
'@rush-temp/mail-assets@file:projects/mail-assets.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))':
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
'@types/node': 20.11.19
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.6.2)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint: 8.56.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint-plugin-import: 2.29.1(eslint@8.56.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
prettier: 3.2.5
|
||||
ts-jest: 29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.11.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(typescript@5.6.2)
|
||||
typescript: 5.6.2
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- esbuild
|
||||
- node-notifier
|
||||
- supports-color
|
||||
- ts-node
|
||||
|
||||
'@rush-temp/mail-resources@file:projects/mail-resources.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@20.11.19)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))':
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.6.2)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint: 8.56.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint-plugin-import: 2.29.1(eslint@8.56.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
eslint-plugin-svelte: 2.35.1(eslint@8.56.0)(svelte@4.2.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
prettier: 3.2.5
|
||||
prettier-plugin-svelte: 3.2.2(prettier@3.2.5)(svelte@4.2.19)
|
||||
sass: 1.71.1
|
||||
svelte: 4.2.19
|
||||
svelte-check: 3.6.9(@babel/core@7.23.9)(postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(postcss@8.4.35)(sass@1.71.1)(svelte@4.2.19)
|
||||
svelte-eslint-parser: 0.33.1(svelte@4.2.19)
|
||||
svelte-loader: 3.2.0(svelte@4.2.19)
|
||||
svelte-preprocess: 5.1.3(@babel/core@7.23.9)(postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(postcss@8.4.35)(sass@1.71.1)(svelte@4.2.19)(typescript@5.6.2)
|
||||
ts-jest: 29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.11.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(typescript@5.6.2)
|
||||
typescript: 5.6.2
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- '@types/node'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- coffeescript
|
||||
- esbuild
|
||||
- less
|
||||
- node-notifier
|
||||
- postcss
|
||||
- postcss-load-config
|
||||
- pug
|
||||
- stylus
|
||||
- sugarss
|
||||
- supports-color
|
||||
- ts-node
|
||||
|
||||
'@rush-temp/mail@file:projects/mail.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@20.11.19)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))':
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.6.2)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint: 8.56.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint-plugin-import: 2.29.1(eslint@8.56.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
prettier: 3.2.5
|
||||
ts-jest: 29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.11.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(typescript@5.6.2)
|
||||
typescript: 5.6.2
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- '@types/node'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- esbuild
|
||||
- node-notifier
|
||||
- supports-color
|
||||
- ts-node
|
||||
|
||||
'@rush-temp/middleware@file:projects/middleware.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@20.11.19)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))':
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
@@ -19488,6 +19634,20 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@rush-temp/model-mail@file:projects/model-mail.tgz':
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.6.2)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint: 8.56.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint-plugin-import: 2.29.1(eslint@8.56.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
prettier: 3.2.5
|
||||
typescript: 5.6.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@rush-temp/model-notification@file:projects/model-notification.tgz':
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3)
|
||||
@@ -19502,6 +19662,20 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@rush-temp/model-my-space@file:projects/model-my-space.tgz':
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.6.2)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint: 8.56.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint-plugin-import: 2.29.1(eslint@8.56.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
prettier: 3.2.5
|
||||
typescript: 5.6.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@rush-temp/model-preference@file:projects/model-preference.tgz':
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3)
|
||||
@@ -20621,6 +20795,97 @@ snapshots:
|
||||
- supports-color
|
||||
- ts-node
|
||||
|
||||
'@rush-temp/my-space-assets@file:projects/my-space-assets.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))':
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
'@types/node': 20.11.19
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.6.2)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint: 8.56.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint-plugin-import: 2.29.1(eslint@8.56.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
prettier: 3.2.5
|
||||
ts-jest: 29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.11.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(typescript@5.6.2)
|
||||
typescript: 5.6.2
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- esbuild
|
||||
- node-notifier
|
||||
- supports-color
|
||||
- ts-node
|
||||
|
||||
'@rush-temp/my-space-resources@file:projects/my-space-resources.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@20.11.19)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))':
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.6.2)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint: 8.56.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint-plugin-import: 2.29.1(eslint@8.56.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
eslint-plugin-svelte: 2.35.1(eslint@8.56.0)(svelte@4.2.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
fast-equals: 5.2.2
|
||||
jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
prettier: 3.2.5
|
||||
prettier-plugin-svelte: 3.2.2(prettier@3.2.5)(svelte@4.2.19)
|
||||
sass: 1.71.1
|
||||
svelte: 4.2.19
|
||||
svelte-check: 3.6.9(@babel/core@7.23.9)(postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(postcss@8.4.35)(sass@1.71.1)(svelte@4.2.19)
|
||||
svelte-eslint-parser: 0.33.1(svelte@4.2.19)
|
||||
svelte-loader: 3.2.0(svelte@4.2.19)
|
||||
svelte-preprocess: 5.1.3(@babel/core@7.23.9)(postcss-load-config@4.0.2(postcss@8.4.35)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(postcss@8.4.35)(sass@1.71.1)(svelte@4.2.19)(typescript@5.6.2)
|
||||
ts-jest: 29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.11.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(typescript@5.6.2)
|
||||
typescript: 5.6.2
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- '@types/node'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- coffeescript
|
||||
- esbuild
|
||||
- less
|
||||
- node-notifier
|
||||
- postcss
|
||||
- postcss-load-config
|
||||
- pug
|
||||
- stylus
|
||||
- sugarss
|
||||
- supports-color
|
||||
- ts-node
|
||||
|
||||
'@rush-temp/my-space@file:projects/my-space.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@20.11.19)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))':
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.6.2)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint: 8.56.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.6.2)
|
||||
eslint-plugin-import: 2.29.1(eslint@8.56.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3))
|
||||
prettier: 3.2.5
|
||||
ts-jest: 29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.11.19)(ts-node@10.9.2(@types/node@20.11.19)(typescript@5.3.3)))(typescript@5.6.2)
|
||||
typescript: 5.6.2
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- '@types/node'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- esbuild
|
||||
- node-notifier
|
||||
- supports-color
|
||||
- ts-node
|
||||
|
||||
'@rush-temp/platform-rig@file:projects/platform-rig.tgz(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.3.3))(eslint@8.56.0)(typescript@5.3.3))(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(svelte@4.2.19)':
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
|
||||
@@ -215,6 +215,12 @@
|
||||
"@hcengineering/card": "^0.6.0",
|
||||
"@hcengineering/card-assets": "^0.6.0",
|
||||
"@hcengineering/card-resources": "^0.6.0",
|
||||
"@hcengineering/my-space": "^0.6.0",
|
||||
"@hcengineering/my-space-assets": "^0.6.0",
|
||||
"@hcengineering/my-space-resources": "^0.6.0",
|
||||
"@hcengineering/mail": "^0.6.0",
|
||||
"@hcengineering/mail-assets": "^0.6.0",
|
||||
"@hcengineering/mail-resources": "^0.6.0",
|
||||
"electron-squirrel-startup": "~1.0.0",
|
||||
"dotenv": "~16.0.0",
|
||||
"electron-context-menu": "^4.0.4",
|
||||
|
||||
@@ -57,6 +57,8 @@ import { documentsId } from '@hcengineering/controlled-documents'
|
||||
import aiBot, { aiBotId } from '@hcengineering/ai-bot'
|
||||
import { testManagementId } from '@hcengineering/test-management'
|
||||
import { surveyId } from '@hcengineering/survey'
|
||||
import { mySpaceId } from '@hcengineering/my-space'
|
||||
import { mailId } from '@hcengineering/mail'
|
||||
|
||||
import '@hcengineering/activity-assets'
|
||||
import '@hcengineering/attachment-assets'
|
||||
@@ -101,6 +103,7 @@ import '@hcengineering/text-editor-assets'
|
||||
import '@hcengineering/test-management-assets'
|
||||
import '@hcengineering/survey-assets'
|
||||
import '@hcengineering/card-assets'
|
||||
import '@hcengineering/mail-assets'
|
||||
|
||||
import { coreId } from '@hcengineering/core'
|
||||
import presentation, { parsePreviewConfig, parseUploadConfig, presentationId } from '@hcengineering/presentation'
|
||||
@@ -195,6 +198,8 @@ function configureI18n (): void {
|
||||
addStringsLoader(testManagementId, async (lang: string) => await import(`@hcengineering/test-management-assets/lang/${lang}.json`))
|
||||
addStringsLoader(surveyId, async (lang: string) => await import(`@hcengineering/survey-assets/lang/${lang}.json`))
|
||||
addStringsLoader(cardId, async (lang: string) => await import(`@hcengineering/card-assets/lang/${lang}.json`))
|
||||
addStringsLoader(mySpaceId, async (lang: string) => await import(`@hcengineering/my-space-assets/lang/${lang}.json`))
|
||||
addStringsLoader(mailId, async (lang: string) => await import(`@hcengineering/mail-assets/lang/${lang}.json`))
|
||||
}
|
||||
|
||||
export async function configurePlatform (): Promise<void> {
|
||||
@@ -322,6 +327,7 @@ export async function configurePlatform (): Promise<void> {
|
||||
addLocation(testManagementId, () => import(/* webpackChunkName: "test-management" */ '@hcengineering/test-management-resources'))
|
||||
addLocation(surveyId, () => import(/* webpackChunkName: "survey" */ '@hcengineering/survey-resources'))
|
||||
addLocation(cardId, () => import(/* webpackChunkName: "card" */ '@hcengineering/card-resources'))
|
||||
addLocation(mySpaceId, () => import(/* webpackChunkName: "card" */ '@hcengineering/my-space-resources'))
|
||||
|
||||
setMetadata(client.metadata.FilterModel, 'ui')
|
||||
setMetadata(client.metadata.ExtraPlugins, ['preference' as Plugin])
|
||||
|
||||
@@ -209,6 +209,12 @@
|
||||
"@hcengineering/card": "^0.6.0",
|
||||
"@hcengineering/card-assets": "^0.6.0",
|
||||
"@hcengineering/card-resources": "^0.6.0",
|
||||
"@hcengineering/my-space": "^0.6.0",
|
||||
"@hcengineering/my-space-assets": "^0.6.0",
|
||||
"@hcengineering/my-space-resources": "^0.6.0",
|
||||
"@hcengineering/mail": "^0.6.0",
|
||||
"@hcengineering/mail-assets": "^0.6.0",
|
||||
"@hcengineering/mail-resources": "^0.6.0",
|
||||
"@sentry/svelte": "^8.52.1",
|
||||
"posthog-js": "~1.122.0"
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ import login, { loginId } from '@hcengineering/login'
|
||||
import love, { loveId } from '@hcengineering/love'
|
||||
import notification, { notificationId } from '@hcengineering/notification'
|
||||
import onboard, { onboardId } from '@hcengineering/onboard'
|
||||
import { mySpaceId } from '@hcengineering/my-space'
|
||||
import presence, { presenceId } from '@hcengineering/presence'
|
||||
import print, { printId } from '@hcengineering/print'
|
||||
import { productsId } from '@hcengineering/products'
|
||||
@@ -64,6 +65,7 @@ import uiPlugin from '@hcengineering/ui'
|
||||
import { uploaderId } from '@hcengineering/uploader'
|
||||
import { viewId } from '@hcengineering/view'
|
||||
import workbench, { workbenchId } from '@hcengineering/workbench'
|
||||
import { mailId } from '@hcengineering/mail'
|
||||
|
||||
import { bitrixId } from '@hcengineering/bitrix'
|
||||
|
||||
@@ -89,6 +91,7 @@ import '@hcengineering/lead-assets'
|
||||
import '@hcengineering/login-assets'
|
||||
import '@hcengineering/love-assets'
|
||||
import '@hcengineering/notification-assets'
|
||||
import '@hcengineering/my-space-assets'
|
||||
import '@hcengineering/preference-assets'
|
||||
import '@hcengineering/print-assets'
|
||||
import '@hcengineering/products-assets'
|
||||
@@ -323,6 +326,8 @@ function configureI18n(): void {
|
||||
)
|
||||
addStringsLoader(surveyId, async (lang: string) => await import(`@hcengineering/survey-assets/lang/${lang}.json`))
|
||||
addStringsLoader(cardId, async (lang: string) => await import(`@hcengineering/card-assets/lang/${lang}.json`))
|
||||
addStringsLoader(mySpaceId, async (lang: string) => await import(`@hcengineering/my-space-assets/lang/${lang}.json`))
|
||||
addStringsLoader(mailId, async (lang: string) => await import(`@hcengineering/mail-assets/lang/${lang}.json`))
|
||||
}
|
||||
|
||||
export async function configurePlatform() {
|
||||
@@ -511,6 +516,8 @@ export async function configurePlatform() {
|
||||
addLocation(surveyId, () => import(/* webpackChunkName: "survey" */ '@hcengineering/survey-resources'))
|
||||
addLocation(presenceId, () => import(/* webpackChunkName: "presence" */ '@hcengineering/presence-resources'))
|
||||
addLocation(cardId, () => import(/* webpackChunkName: "card" */ '@hcengineering/card-resources'))
|
||||
addLocation(mySpaceId, () => import(/* webpackChunkName: "card" */ '@hcengineering/my-space-resources'))
|
||||
addLocation(mailId, () => import(/* webpackChunkName: "card" */ '@hcengineering/mail-resources'))
|
||||
|
||||
setMetadata(client.metadata.FilterModel, 'ui')
|
||||
setMetadata(client.metadata.ExtraPlugins, ['preference' as Plugin])
|
||||
|
||||
@@ -115,6 +115,8 @@
|
||||
"@hcengineering/model-test-management": "^0.6.0",
|
||||
"@hcengineering/model-survey": "^0.6.0",
|
||||
"@hcengineering/model-presence": "^0.6.0",
|
||||
"@hcengineering/model-card": "^0.6.0"
|
||||
"@hcengineering/model-card": "^0.6.0",
|
||||
"@hcengineering/model-mail": "^0.6.0",
|
||||
"@hcengineering/model-my-space": "^0.6.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +101,8 @@ import testManagement, {
|
||||
testManagementId,
|
||||
createModel as testManagementModel
|
||||
} from '@hcengineering/model-test-management'
|
||||
import mySpace, { mySpaceId, createModel as mySpaceModel } from '@hcengineering/model-my-space'
|
||||
import { mailId, createModel as mailModel } from '@hcengineering/model-mail'
|
||||
|
||||
import {
|
||||
serverDocumentsId,
|
||||
@@ -430,6 +432,18 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
],
|
||||
[surveyModel, surveyId],
|
||||
[presenceModel, presenceId],
|
||||
[
|
||||
mySpaceModel,
|
||||
mySpaceId,
|
||||
{
|
||||
label: mySpace.string.ConfigLabel,
|
||||
description: mySpace.string.ConfigDescription,
|
||||
enabled: true,
|
||||
beta: true,
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[mailModel, mailId],
|
||||
|
||||
[serverCoreModel, serverCoreId],
|
||||
[serverAttachmentModel, serverAttachmentId],
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/model/eslint.config.json'],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig",
|
||||
"rigProfile": "model"
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "@hcengineering/model-mail",
|
||||
"version": "0.6.0",
|
||||
"main": "lib/index.js",
|
||||
"svelte": "src/index.ts",
|
||||
"types": "types/index.d.ts",
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"template": "@hcengineering/model-package",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "compile",
|
||||
"build:watch": "compile",
|
||||
"format": "format src",
|
||||
"_phase:build": "compile transpile src",
|
||||
"_phase:format": "format src",
|
||||
"_phase:validate": "compile validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-n": "^15.4.0",
|
||||
"eslint": "^8.54.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||
"prettier": "^3.1.0",
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/activity": "^0.6.0",
|
||||
"@hcengineering/chunter": "^0.6.20",
|
||||
"@hcengineering/model": "^0.6.11",
|
||||
"@hcengineering/model-contact": "^0.6.1",
|
||||
"@hcengineering/model-chunter": "^0.6.0",
|
||||
"@hcengineering/core": "^0.6.32",
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/model-view": "^0.6.0",
|
||||
"@hcengineering/mail": "^0.6.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// Copyright © 2025 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 activity from '@hcengineering/activity'
|
||||
import core, { IndexKind } from '@hcengineering/core'
|
||||
import { type Builder, Index, Model, Prop, TypeString, UX } from '@hcengineering/model'
|
||||
import contact from '@hcengineering/model-contact'
|
||||
import view from '@hcengineering/model-view'
|
||||
import { TChunterSpace } from '@hcengineering/model-chunter'
|
||||
|
||||
import chunter from '@hcengineering/chunter'
|
||||
import mail, { type MailThread } from '@hcengineering/mail'
|
||||
|
||||
export { mailId } from '@hcengineering/mail'
|
||||
export { default } from './plugin'
|
||||
|
||||
@Model(mail.class.MailThread, chunter.class.ChunterSpace)
|
||||
@UX(mail.string.MailThread, contact.icon.Person, undefined, undefined, undefined, mail.string.MailThread)
|
||||
export class TMailThread extends TChunterSpace implements MailThread {
|
||||
@Prop(TypeString(), mail.string.Subject)
|
||||
@Index(IndexKind.FullText)
|
||||
subject!: string
|
||||
|
||||
@Prop(TypeString(), mail.string.MailThreadId)
|
||||
@Index(IndexKind.Indexed)
|
||||
mailThreadId!: string
|
||||
|
||||
@Prop(TypeString(), mail.string.From)
|
||||
@Index(IndexKind.FullText)
|
||||
from!: string
|
||||
|
||||
@Prop(TypeString(), mail.string.To)
|
||||
@Index(IndexKind.FullText)
|
||||
to!: string
|
||||
|
||||
@Prop(TypeString(), mail.string.MailPreview)
|
||||
preview!: string
|
||||
}
|
||||
|
||||
export function createModel (builder: Builder): void {
|
||||
builder.createModel(TMailThread)
|
||||
|
||||
builder.mixin(mail.class.MailThread, core.class.Class, activity.mixin.ActivityDoc, {})
|
||||
|
||||
builder.mixin(mail.class.MailThread, core.class.Class, view.mixin.ObjectPresenter, {
|
||||
presenter: mail.component.MailThreadPresenter
|
||||
})
|
||||
|
||||
builder.mixin(mail.class.MailThread, core.class.Class, view.mixin.ObjectEditor, {
|
||||
editor: mail.component.MailThread
|
||||
})
|
||||
|
||||
builder.mixin(mail.class.MailThread, core.class.Class, view.mixin.ObjectPanel, {
|
||||
component: mail.component.MailThread
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// Copyright © 2025 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
export { default } from '@hcengineering/mail'
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/model/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types",
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/model/eslint.config.json'],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig",
|
||||
"rigProfile": "model"
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "@hcengineering/model-my-space",
|
||||
"version": "0.6.0",
|
||||
"main": "lib/index.js",
|
||||
"svelte": "src/index.ts",
|
||||
"types": "types/index.d.ts",
|
||||
"author": "Hardcore Engineering Inc.",
|
||||
"template": "@hcengineering/model-package",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "compile",
|
||||
"build:watch": "compile",
|
||||
"format": "format src",
|
||||
"_phase:build": "compile transpile src",
|
||||
"_phase:format": "format src",
|
||||
"_phase:validate": "compile validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-n": "^15.4.0",
|
||||
"eslint": "^8.54.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||
"prettier": "^3.1.0",
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/core": "^0.6.32",
|
||||
"@hcengineering/mail": "^0.6.0",
|
||||
"@hcengineering/model": "^0.6.11",
|
||||
"@hcengineering/model-core": "^0.6.0",
|
||||
"@hcengineering/model-presentation": "^0.6.0",
|
||||
"@hcengineering/model-workbench": "^0.6.1",
|
||||
"@hcengineering/model-view": "^0.6.0",
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/ui": "^0.6.15",
|
||||
"@hcengineering/my-space": "^0.6.0",
|
||||
"@hcengineering/my-space-resources": "^0.6.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// Copyright © 2025 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 { AccountRole } from '@hcengineering/core'
|
||||
import { type Builder } from '@hcengineering/model'
|
||||
import core from '@hcengineering/model-core'
|
||||
import view, { type Viewlet } from '@hcengineering/model-view'
|
||||
import workbench from '@hcengineering/model-workbench'
|
||||
import mail from '@hcengineering/mail'
|
||||
import { mySpaceId } from '@hcengineering/my-space'
|
||||
|
||||
import mySpace from './plugin'
|
||||
|
||||
export { mySpaceId } from '@hcengineering/my-space'
|
||||
|
||||
export { mySpace as default }
|
||||
|
||||
export function createModel (builder: Builder): void {
|
||||
builder.createDoc(
|
||||
workbench.class.Application,
|
||||
core.space.Model,
|
||||
{
|
||||
label: mySpace.string.MySpace,
|
||||
icon: mySpace.icon.MySpace,
|
||||
alias: mySpaceId,
|
||||
accessLevel: AccountRole.User,
|
||||
hidden: false,
|
||||
locationResolver: mySpace.resolver.Location,
|
||||
navigatorModel: {
|
||||
spaces: [],
|
||||
specials: [
|
||||
{
|
||||
id: 'mail',
|
||||
label: mySpace.string.Mail,
|
||||
icon: mySpace.icon.Mail,
|
||||
component: workbench.component.SpecialView,
|
||||
componentProps: {
|
||||
_class: mail.class.MailThread,
|
||||
icon: mySpace.icon.Mail,
|
||||
label: mySpace.string.Mail,
|
||||
createLabel: mail.string.CreateMail,
|
||||
createComponent: mail.component.CreateMail
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mySpace.app.MySpace
|
||||
)
|
||||
|
||||
builder.createDoc<Viewlet>(
|
||||
view.class.Viewlet,
|
||||
core.space.Model,
|
||||
{
|
||||
attachTo: mail.class.MailThread,
|
||||
descriptor: view.viewlet.Table,
|
||||
config: [
|
||||
{ key: 'createdBy', label: mail.string.From, displayProps: { fixed: 'left', key: 'app' } },
|
||||
'',
|
||||
{ key: 'modifiedOn', label: mail.string.Date, displayProps: { key: 'modified', fixed: 'right' } }
|
||||
],
|
||||
configOptions: {
|
||||
hiddenKeys: ['name'],
|
||||
sortable: true
|
||||
}
|
||||
},
|
||||
mySpace.viewlet.TableMail
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Copyright © 2025 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 { mergeIds } from '@hcengineering/platform'
|
||||
import { mySpaceId } from '@hcengineering/my-space'
|
||||
import mySpace from '@hcengineering/my-space-resources/src/plugin'
|
||||
|
||||
export default mergeIds(mySpaceId, mySpace, {
|
||||
component: {}
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/model/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types",
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/assets/eslint.config.json'],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="inbox" viewBox="0 0 32 32">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.2 8.39976C9.38885 8.14795 9.68524 7.99976 10 7.99976H22C22.3148 7.99976 22.6111 8.14795 22.8 8.39976L27 13.9998H19C18.4477 13.9998 18 14.4475 18 14.9998C18 15.2624 17.9483 15.5225 17.8478 15.7651C17.7472 16.0078 17.5999 16.2283 17.4142 16.414C17.2285 16.5997 17.008 16.747 16.7654 16.8475C16.5227 16.948 16.2626 16.9998 16 16.9998C15.7374 16.9998 15.4773 16.948 15.2346 16.8475C14.992 16.747 14.7715 16.5997 14.5858 16.414C14.4001 16.2283 14.2528 16.0078 14.1522 15.7651C14.0517 15.5225 14 15.2624 14 14.9998C14 14.4475 13.5523 13.9998 13 13.9998H5L9.2 8.39976ZM12.127 15.9998H4V21.9998C4 23.1043 4.89543 23.9998 6 23.9998H26C27.1046 23.9998 28 23.1043 28 21.9998V15.9998H19.873C19.8264 16.1802 19.7672 16.3576 19.6955 16.5305C19.4945 17.0158 19.1999 17.4567 18.8284 17.8282C18.457 18.1996 18.016 18.4943 17.5307 18.6953C17.0454 18.8963 16.5253 18.9998 16 18.9998C15.4747 18.9998 14.9546 18.8963 14.4693 18.6953C13.984 18.4943 13.543 18.1996 13.1716 17.8282C12.8001 17.4567 12.5055 17.0158 12.3045 16.5305C12.2329 16.3576 12.1736 16.1802 12.127 15.9998ZM10 5.99976C9.05573 5.99976 8.16656 6.44434 7.6 7.19976L2.2 14.3998C2.07018 14.5729 2 14.7834 2 14.9998V21.9998C2 24.2089 3.79086 25.9998 6 25.9998H26C28.2091 25.9998 30 24.2089 30 21.9998V14.9998C30 14.7834 29.9298 14.5729 29.8 14.3998L24.4 7.19976C23.8334 6.44434 22.9443 5.99976 22 5.99976H10Z" />
|
||||
</symbol>
|
||||
<symbol id="new-mail" viewBox="0 0 24 24">
|
||||
<path d="M22,12.2c-0.4,0-0.8,0.3-0.8,0.8v2c0,4.6-1.6,6.2-6.2,6.2H9c-4.6,0-6.2-1.6-6.2-6.2V9c0-4.6,1.6-6.2,6.2-6.2h2 c0.4,0,0.8-0.3,0.8-0.8S11.4,1.2,11,1.2H9C3.6,1.2,1.2,3.6,1.2,9v6c0,5.4,2.3,7.8,7.8,7.8h6c5.4,0,7.8-2.3,7.8-7.8v-2 C22.8,12.6,22.4,12.2,22,12.2z" />
|
||||
<path d="M14.4,3.6l-6.8,6.8c-0.4,0.4-0.8,1.2-0.9,1.7l-0.4,3c-0.1,0.8,0.1,1.5,0.6,2c0.4,0.4,1,0.6,1.6,0.6c0.1,0,0.2,0,0.4,0 l3-0.4c0.6-0.1,1.3-0.5,1.7-0.9l7.9-7.9c0.9-0.9,1.4-1.8,1.5-2.7c0.1-1.1-0.4-2.2-1.5-3.3c-2-2-4-2-6,0L14.4,3.6 C14.4,3.6,14.4,3.6,14.4,3.6z M12.6,15.3c-0.2,0.2-0.6,0.4-0.9,0.5l-3,0.4c-0.3,0-0.5,0-0.7-0.2c-0.2-0.1-0.2-0.4-0.2-0.7l0.4-3 c0-0.3,0.3-0.7,0.4-0.9l5.9-5.9c0.8,1.7,2.2,3.1,3.9,3.9L12.6,15.3z M20.4,3.5c0.8,0.8,1.1,1.5,1,2.1c0,0.5-0.4,1.1-1,1.8l-0.8,0.8 c-1.8-0.6-3.2-2.1-3.9-3.9l0.8-0.8C17.7,2.4,18.8,1.9,20.4,3.5z" />
|
||||
</symbol>
|
||||
<symbol id="done" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M10 1.24988C8.26942 1.24988 6.57769 1.76306 5.13876 2.72452C3.69983 3.68598 2.57832 5.05254 1.91606 6.6514C1.25379 8.25025 1.08051 10.0096 1.41813 11.7069C1.75575 13.4043 2.58911 14.9634 3.81282 16.1871C5.03653 17.4108 6.59563 18.2441 8.29296 18.5817C9.9903 18.9194 11.7496 18.7461 13.3485 18.0838C14.9473 17.4216 16.3139 16.3 17.2754 14.8611C18.2368 13.4222 18.75 11.7305 18.75 9.99988C18.75 7.67923 17.8281 5.45364 16.1872 3.81269C14.5462 2.17175 12.3206 1.24988 10 1.24988ZM10 17.4999C8.51664 17.4999 7.0666 17.06 5.83323 16.2359C4.59986 15.4118 3.63856 14.2404 3.07091 12.87C2.50325 11.4996 2.35473 9.99156 2.64411 8.5367C2.9335 7.08184 3.64781 5.74547 4.6967 4.69658C5.7456 3.64768 7.08197 2.93338 8.53683 2.64399C9.99168 2.3546 11.4997 2.50312 12.8701 3.07078C14.2406 3.63844 15.4119 4.59973 16.236 5.8331C17.0601 7.06647 17.5 8.51652 17.5 9.99988C17.5 11.989 16.7098 13.8967 15.3033 15.3032C13.8968 16.7097 11.9891 17.4999 10 17.4999Z" fill="currentColor"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.1919 7.05809C14.436 7.30217 14.436 7.6979 14.1919 7.94197L9.19194 12.942C8.94786 13.1861 8.55214 13.1861 8.30806 12.942L5.80806 10.442C5.56398 10.1979 5.56398 9.80217 5.80806 9.55809C6.05214 9.31401 6.44786 9.31401 6.69194 9.55809L8.75 11.6161L13.3081 7.05809C13.5521 6.81401 13.9479 6.81401 14.1919 7.05809Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
<symbol id="sent" viewBox="0 0 12 12">
|
||||
<path d="M10.1,2.9c0.1-0.4-0.3-0.8-0.7-0.6L1.7,5.6c-0.3,0.1-0.3,0.5,0,0.6l1.6,0.5c0.3,0.1,0.6,0,0.9-0.1l3.6-2.5 C7.9,4.1,8,4.3,7.9,4.4L5.3,7C5.1,7.3,5.1,7.7,5.4,7.9l2.9,1.8c0.3,0.2,0.7,0,0.8-0.4L10.1,2.9z"/>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig",
|
||||
"rigProfile": "assets"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
|
||||
roots: ["./src"],
|
||||
coverageReporters: ["text-summary", "html"]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Subject": "Téma",
|
||||
"From": "Od",
|
||||
"To": "Komu",
|
||||
"CreateMail": "Nová zpráva",
|
||||
"MailThread": "Zpráva",
|
||||
"Reply": "Odpovědět",
|
||||
"Date": "Datum"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Subject": "Betreff",
|
||||
"From": "Von",
|
||||
"To": "An",
|
||||
"CreateMail": "Neue Nachricht",
|
||||
"MailThread": "Nachricht",
|
||||
"Reply": "Antworten",
|
||||
"Date": "Datum"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Subject": "Subject",
|
||||
"From": "From",
|
||||
"To": "To",
|
||||
"CreateMail": "New Mail",
|
||||
"MailThread": "Mail",
|
||||
"Reply": "Reply",
|
||||
"Date": "Date"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Subject": "Asunto",
|
||||
"From": "De",
|
||||
"To": "Para",
|
||||
"CreateMail": "Nuevo mensaje",
|
||||
"MailThread": "Mensaje",
|
||||
"Reply": "Responder",
|
||||
"Date": "Fecha"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Subject": "Sujet",
|
||||
"From": "De",
|
||||
"To": "À",
|
||||
"CreateMail": "Nouveau message",
|
||||
"MailThread": "Message",
|
||||
"Reply": "Répondre",
|
||||
"Date": "Date"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Subject": "Oggetto",
|
||||
"From": "Da",
|
||||
"To": "A",
|
||||
"CreateMail": "Nuovo messaggio",
|
||||
"MailThread": "Messaggio",
|
||||
"Reply": "Rispondi",
|
||||
"Date": "Data"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Subject": "Assunto",
|
||||
"From": "De",
|
||||
"To": "Para",
|
||||
"CreateMail": "Nova mensagem",
|
||||
"MailThread": "Mensagem",
|
||||
"Reply": "Responder",
|
||||
"Date": "Data"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Subject": "Тема",
|
||||
"From": "От кого",
|
||||
"To": "Кому",
|
||||
"CreateMail": "Новое сообщение",
|
||||
"MailThread": "Сообщение",
|
||||
"Reply": "Ответить",
|
||||
"Date": "Дата"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Subject": "主题",
|
||||
"From": "从",
|
||||
"To": "到",
|
||||
"CreateMail": "新邮件",
|
||||
"MailThread": "邮件",
|
||||
"Reply": "回复",
|
||||
"Date": "日期"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "@hcengineering/mail-assets",
|
||||
"version": "0.6.0",
|
||||
"main": "src/index.ts",
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"template": "@hcengineering/assets-package",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "compile",
|
||||
"test": "jest --passWithNoTests --silent",
|
||||
"format": "format src",
|
||||
"build:watch": "compile",
|
||||
"build:docs": "",
|
||||
"_phase:build": "compile transpile src",
|
||||
"_phase:test": "jest --passWithNoTests --silent",
|
||||
"_phase:format": "format src",
|
||||
"_phase:validate": "compile validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-n": "^15.4.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint": "^8.54.0",
|
||||
"prettier": "^3.1.0",
|
||||
"typescript": "^5.3.3",
|
||||
"@types/node": "~20.11.16",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest": "^29.5.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/mail": "^0.6.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { makeLocalesTest } from '@hcengineering/platform'
|
||||
|
||||
it(
|
||||
'Locales are equale',
|
||||
makeLocalesTest((lang) => import(`../../lang/${lang}.json`))
|
||||
)
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// Copyright © 2025 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 } from '@hcengineering/platform'
|
||||
import mail from '@hcengineering/mail'
|
||||
|
||||
const icons = require('../assets/icons.svg') as string // eslint-disable-line
|
||||
loadMetadata(mail.icon, {
|
||||
NewMail: `${icons}#new-mail`,
|
||||
Inbox: `${icons}#inbox`,
|
||||
Done: `${icons}#done`,
|
||||
Sent: `${icons}#sent`
|
||||
})
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/assets/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types",
|
||||
"types": ["node", "jest"],
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/ui/eslint.config.json'],
|
||||
parserOptions: { tsconfigRootDir: __dirname }
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"trailingComma": "none",
|
||||
"tabWidth": 2,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"printWidth": 120,
|
||||
"useTabs": false,
|
||||
"bracketSpacing": true,
|
||||
"proseWrap": "preserve",
|
||||
"plugins": [
|
||||
"prettier-plugin-svelte"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": "*.svelte",
|
||||
"options": {
|
||||
"parser": "svelte"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig",
|
||||
"rigProfile": "ui"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)']
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "@hcengineering/mail-resources",
|
||||
"version": "0.6.0",
|
||||
"main": "src/index.ts",
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "compile ui",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"format": "format src",
|
||||
"svelte-check": "do-svelte-check",
|
||||
"_phase:svelte-check": "do-svelte-check",
|
||||
"build:watch": "compile ui",
|
||||
"_phase:build": "compile ui",
|
||||
"_phase:format": "format src",
|
||||
"_phase:validate": "compile validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"svelte-loader": "^3.2.0",
|
||||
"sass": "^1.53.0",
|
||||
"svelte-preprocess": "^5.1.3",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-n": "^15.4.0",
|
||||
"eslint": "^8.54.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||
"eslint-plugin-svelte": "^2.35.1",
|
||||
"prettier-plugin-svelte": "^3.2.2",
|
||||
"prettier": "^3.1.0",
|
||||
"svelte-check": "^3.6.9",
|
||||
"typescript": "^5.3.3",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest": "^29.5.5",
|
||||
"svelte-eslint-parser": "^0.33.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"svelte": "^4.2.19",
|
||||
"@hcengineering/mail": "^0.6.0",
|
||||
"@hcengineering/ui": "^0.6.15",
|
||||
"@hcengineering/presentation": "^0.6.3",
|
||||
"@hcengineering/core": "^0.6.32",
|
||||
"@hcengineering/contact": "^0.6.24",
|
||||
"@hcengineering/contact-resources": "^0.6.0",
|
||||
"@hcengineering/chunter": "^0.6.20",
|
||||
"@hcengineering/panel": "^0.6.23",
|
||||
"@hcengineering/view": "^0.6.13",
|
||||
"@hcengineering/view-resources": "^0.6.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
<!--
|
||||
//
|
||||
// Copyright © 2025 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
-->
|
||||
<script lang="ts">
|
||||
import core, { Data, Doc, generateId, getCurrentAccount, Ref, Space } from '@hcengineering/core'
|
||||
import chunter, { type ChatMessage } from '@hcengineering/chunter'
|
||||
import { Card, getClient, isSpace } from '@hcengineering/presentation'
|
||||
import { MailThread } from '@hcengineering/mail'
|
||||
import { createFocusManager, EditBox, FocusHandler } from '@hcengineering/ui'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
|
||||
import mail from '../plugin'
|
||||
import { isValidEmail } from '../messageUtils'
|
||||
|
||||
const manager = createFocusManager()
|
||||
const dispatch = createEventDispatcher()
|
||||
const client = getClient()
|
||||
const account = getCurrentAccount()
|
||||
|
||||
export let mailThreadId: Ref<MailThread> | undefined = undefined
|
||||
|
||||
export let to = ''
|
||||
export let from = getEmail()
|
||||
export let subject = ''
|
||||
let message = ''
|
||||
|
||||
export function canClose (): boolean {
|
||||
return to === '' && from === '' && subject === ''
|
||||
}
|
||||
|
||||
export function getEmail (): string {
|
||||
// TODO: use email from account
|
||||
return 'test@huly.me'
|
||||
}
|
||||
|
||||
async function createMail (): Promise<void> {
|
||||
const mailThread = await getOrCreateMailThread()
|
||||
if (mailThread === undefined) {
|
||||
throw new Error('Failed to create mail thread')
|
||||
}
|
||||
|
||||
const messageId: Ref<ChatMessage> = await client.addCollection<Doc, ChatMessage>(
|
||||
chunter.class.ChatMessage,
|
||||
getSpace(mailThread),
|
||||
mailThread._id,
|
||||
mail.class.MailThread,
|
||||
'messages',
|
||||
{ message: message ?? '' }
|
||||
)
|
||||
|
||||
dispatch('close', messageId)
|
||||
}
|
||||
|
||||
async function getOrCreateMailThread (): Promise<MailThread | undefined> {
|
||||
if (mailThreadId !== undefined) {
|
||||
const mailThread = await client.findOne(mail.class.MailThread, { mailThreadId: mailThreadId as any })
|
||||
if (mailThread !== undefined) {
|
||||
return mailThread
|
||||
}
|
||||
}
|
||||
const data: Data<MailThread> = {
|
||||
mailThreadId: generateId(),
|
||||
from,
|
||||
to,
|
||||
subject,
|
||||
name: subject,
|
||||
description: '',
|
||||
private: true,
|
||||
members: [account.primarySocialId],
|
||||
archived: false,
|
||||
preview: getMessagePreview(message)
|
||||
}
|
||||
|
||||
const threadId = await client.createDoc(mail.class.MailThread, core.space.Space, data)
|
||||
return await client.findOne(mail.class.MailThread, { _id: threadId as any })
|
||||
}
|
||||
|
||||
function getMessagePreview (message: string): string {
|
||||
const maxLength = 80
|
||||
return message.length > maxLength ? message.substring(0, maxLength) + '...' : message
|
||||
}
|
||||
|
||||
function getSpace (doc: Doc): Ref<Space> {
|
||||
return isSpace(doc) ? doc._id : doc.space
|
||||
}
|
||||
</script>
|
||||
|
||||
<FocusHandler {manager} />
|
||||
|
||||
<Card
|
||||
label={mail.string.CreateMail}
|
||||
okAction={createMail}
|
||||
canSave={to.trim().length > 0 && isValidEmail(to)}
|
||||
on:close={() => {
|
||||
dispatch('close')
|
||||
}}
|
||||
on:changeContent
|
||||
>
|
||||
<svelte:fragment slot="header">
|
||||
<div class="flex-row-center">
|
||||
<div class="flex-grow flex-col">
|
||||
<EditBox placeholder={mail.string.From} bind:value={from} />
|
||||
</div>
|
||||
</div>
|
||||
</svelte:fragment>
|
||||
|
||||
<div class="flex-row-center pb-0-5">
|
||||
<div class="flex-grow flex-col">
|
||||
<EditBox placeholder={mail.string.To} bind:value={to} autoFocus focusIndex={1} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-row-center pb-0-5">
|
||||
<div class="flex-grow flex-col">
|
||||
<EditBox placeholder={mail.string.Subject} bind:value={subject} focusIndex={2} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-row-center py-2">
|
||||
<div class="flex-grow flex-col">
|
||||
<EditBox bind:value={message} focusIndex={3} />
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
@@ -0,0 +1,120 @@
|
||||
<!--
|
||||
//
|
||||
// Copyright © 2025 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher, onMount } from 'svelte'
|
||||
|
||||
import { getResource } from '@hcengineering/platform'
|
||||
import { ActionContext, getClient } from '@hcengineering/presentation'
|
||||
import { type Class, type Ref } from '@hcengineering/core'
|
||||
import mail, { MailThread } from '@hcengineering/mail'
|
||||
import { Panel } from '@hcengineering/panel'
|
||||
import { type AnySvelteComponent, Button, Component, Loading, showPopup } from '@hcengineering/ui'
|
||||
import chunter, { type ChatMessage } from '@hcengineering/chunter'
|
||||
import view, { type ObjectPresenter } from '@hcengineering/view'
|
||||
|
||||
import { getReplySubject } from '../messageUtils'
|
||||
|
||||
export let _id: Ref<MailThread>
|
||||
export let _class: Ref<Class<MailThread>>
|
||||
|
||||
const messageClass = chunter.class.ChatMessage
|
||||
let messages: ChatMessage[] = []
|
||||
let isLoading = true
|
||||
|
||||
let object: MailThread | undefined
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
const client = getClient()
|
||||
|
||||
let messagePresenter: AnySvelteComponent | undefined = undefined
|
||||
|
||||
$: if (_id !== undefined && _class !== undefined) {
|
||||
void load()
|
||||
}
|
||||
|
||||
async function load (): Promise<void> {
|
||||
isLoading = true
|
||||
try {
|
||||
await Promise.all([findThread(), findMessages(), findMessagePresenter()])
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
} finally {
|
||||
isLoading = false
|
||||
}
|
||||
}
|
||||
|
||||
async function findMessagePresenter (): Promise<void> {
|
||||
const presenterMixin: ObjectPresenter | undefined = getClient()
|
||||
.getHierarchy()
|
||||
.classHierarchyMixin(messageClass, view.mixin.ObjectPresenter) as any
|
||||
if (presenterMixin?.presenter !== undefined) {
|
||||
messagePresenter = await getResource(presenterMixin.presenter)
|
||||
}
|
||||
}
|
||||
|
||||
async function findMessages (): Promise<void> {
|
||||
const result = await client.findAll(messageClass, { attachedTo: _id })
|
||||
if (Array.isArray(result)) {
|
||||
messages = result
|
||||
} else {
|
||||
console.warn('Failed to find messages for thread', result)
|
||||
}
|
||||
}
|
||||
|
||||
async function findThread (): Promise<void> {
|
||||
object = await client.findOne(_class, { _id })
|
||||
}
|
||||
|
||||
async function reply (): Promise<void> {
|
||||
showPopup(mail.component.CreateMail, {
|
||||
to: object?.from,
|
||||
from: object?.to,
|
||||
subject: getReplySubject(object?.subject ?? ''),
|
||||
mailThreadId: object?.mailThreadId
|
||||
})
|
||||
}
|
||||
|
||||
onMount(() => dispatch('open', { ignoreKeys: [] }))
|
||||
</script>
|
||||
|
||||
{#if object !== undefined}
|
||||
<ActionContext context={{ mode: 'editor' }} />
|
||||
<Panel
|
||||
{object}
|
||||
title={object.subject}
|
||||
isHeader={false}
|
||||
isAside={false}
|
||||
isSub={false}
|
||||
adaptive={'disabled'}
|
||||
withoutActivity
|
||||
on:open
|
||||
on:close={() => dispatch('close')}
|
||||
>
|
||||
<svelte:fragment slot="utils">
|
||||
<Button disabled={isLoading} label={mail.string.Reply} kind={'primary'} on:click={reply} />
|
||||
</svelte:fragment>
|
||||
{#if isLoading}
|
||||
<Loading />
|
||||
{:else if messagePresenter !== undefined}
|
||||
{#each messages as message}
|
||||
<Component is={messagePresenter} props={{ value: message, readonly: true }} />
|
||||
{/each}
|
||||
{/if}
|
||||
</Panel>
|
||||
{/if}
|
||||
@@ -0,0 +1,62 @@
|
||||
<!--
|
||||
//
|
||||
// Copyright © 2025 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { MailThread } from '@hcengineering/mail'
|
||||
import { getEmbeddedLabel } from '@hcengineering/platform'
|
||||
import { tooltip } from '@hcengineering/ui'
|
||||
import { DocNavLink, ObjectMention } from '@hcengineering/view-resources'
|
||||
|
||||
export let value: MailThread | undefined
|
||||
export let inline: boolean = false
|
||||
export let disabled: boolean = false
|
||||
export let accent: boolean = false
|
||||
export let noUnderline: boolean = false
|
||||
export let onClick: ((event: MouseEvent) => void) | undefined = undefined
|
||||
|
||||
const delimiter = ' — '
|
||||
|
||||
function isNotEmpty (str: string): boolean {
|
||||
return str !== undefined && str !== null && str.trim().length > 0
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if value}
|
||||
{#if inline}
|
||||
<ObjectMention title={value?.subject} object={value} {disabled} {accent} {noUnderline} />
|
||||
{:else}
|
||||
<DocNavLink object={value} {disabled} {accent} {noUnderline} {onClick}>
|
||||
<div class="flex-presenter" use:tooltip={{ label: getEmbeddedLabel(value.subject) }}>
|
||||
<span class="label nowrap" class:no-underline={noUnderline || disabled} class:fs-bold={accent}>
|
||||
{value.subject ?? value.preview}
|
||||
</span>
|
||||
{#if isNotEmpty(value.subject) && isNotEmpty(value.preview)}
|
||||
<span class="delimiter">{delimiter}</span>
|
||||
<span class="secondary-textColor overflow-label">
|
||||
{value.preview}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</DocNavLink>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<style lang="scss">
|
||||
.delimiter {
|
||||
white-space: pre;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// Copyright © 2025 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import { type Resources } from '@hcengineering/platform'
|
||||
import CreateMail from './components/CreateMail.svelte'
|
||||
import MailThreadPresenter from './components/MailThreadPresenter.svelte'
|
||||
import MailThread from './components/MailThread.svelte'
|
||||
|
||||
export default async (): Promise<Resources> => ({
|
||||
component: {
|
||||
CreateMail,
|
||||
MailThreadPresenter,
|
||||
MailThread
|
||||
},
|
||||
activity: {}
|
||||
})
|
||||
@@ -0,0 +1,109 @@
|
||||
//
|
||||
// Copyright © 2025 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import {
|
||||
type Client,
|
||||
type Data,
|
||||
type Doc,
|
||||
type Ref,
|
||||
type Space,
|
||||
type TxOperations,
|
||||
generateId,
|
||||
getCurrentAccount
|
||||
} from '@hcengineering/core'
|
||||
import chunter, { type ChatMessage } from '@hcengineering/chunter'
|
||||
import contact, { getCurrentEmployee } from '@hcengineering/contact'
|
||||
import { isSpace } from '@hcengineering/presentation'
|
||||
import type { MailThread } from '@hcengineering/mail'
|
||||
|
||||
import mail from './plugin'
|
||||
|
||||
interface MessageData {
|
||||
id: Ref<ChatMessage>
|
||||
from: string
|
||||
to: string
|
||||
subject: string
|
||||
text: string
|
||||
}
|
||||
|
||||
export async function createMailMessage (
|
||||
client: TxOperations & Client,
|
||||
mailThreadId: Ref<MailThread> | undefined,
|
||||
data: MessageData
|
||||
): Promise<Ref<ChatMessage>> {
|
||||
const mailThread = await getOrCreateMailThread(client, mailThreadId, data)
|
||||
|
||||
if (mailThread === undefined) {
|
||||
throw new Error('Failed to create mail thread')
|
||||
}
|
||||
|
||||
return await client.addCollection<Doc, ChatMessage>(
|
||||
chunter.class.ChatMessage,
|
||||
getSpace(mailThread),
|
||||
mailThread._id,
|
||||
mail.class.MailThread,
|
||||
'messages',
|
||||
{ message: data?.text ?? '' },
|
||||
data.id
|
||||
)
|
||||
}
|
||||
|
||||
async function getOrCreateMailThread (
|
||||
client: TxOperations & Client,
|
||||
mailThreadId: Ref<MailThread> | undefined,
|
||||
data: MessageData
|
||||
): Promise<MailThread | undefined> {
|
||||
const threadId = mailThreadId ?? (await createMailThread(client, data))
|
||||
|
||||
return await client.findOne(mail.class.MailThread, { _id: threadId })
|
||||
}
|
||||
|
||||
async function createMailThread (client: TxOperations & Client, messageData: MessageData): Promise<Ref<MailThread>> {
|
||||
const account = getCurrentAccount()
|
||||
const employee = getCurrentEmployee()
|
||||
const space = await client.findOne(contact.class.PersonSpace, { person: employee }, { projection: { _id: 1 } })
|
||||
if (space === undefined) {
|
||||
throw new Error('No space found')
|
||||
}
|
||||
|
||||
const data: Data<MailThread> = {
|
||||
...messageData,
|
||||
mailThreadId: generateId(),
|
||||
name: messageData.subject,
|
||||
description: '',
|
||||
private: true,
|
||||
members: [account.primarySocialId],
|
||||
archived: false,
|
||||
preview: getMessagePreview(messageData.text)
|
||||
}
|
||||
|
||||
return await client.createDoc(mail.class.MailThread, space._id, data)
|
||||
}
|
||||
|
||||
function getMessagePreview (message: string): string {
|
||||
return message.length > 300 ? message.substring(0, 300) + '...' : message
|
||||
}
|
||||
|
||||
function getSpace (doc: Doc): Ref<Space> {
|
||||
return isSpace(doc) ? doc._id : doc.space
|
||||
}
|
||||
|
||||
export function isValidEmail (email: string): boolean {
|
||||
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
|
||||
return emailRegex.test(email)
|
||||
}
|
||||
|
||||
export function getReplySubject (subject: string): string {
|
||||
return subject.startsWith('Re:') ? subject : `Re: ${subject}`
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Copyright © 2025 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 { mergeIds } from '@hcengineering/platform'
|
||||
|
||||
import mail, { mailId } from '@hcengineering/mail'
|
||||
|
||||
export default mergeIds(mailId, mail, {
|
||||
string: {}
|
||||
})
|
||||
@@ -0,0 +1,5 @@
|
||||
const sveltePreprocess = require('svelte-preprocess')
|
||||
|
||||
module.exports = {
|
||||
preprocess: sveltePreprocess()
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/ui/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/default/eslint.config.json'],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
|
||||
roots: ["./src"],
|
||||
coverageReporters: ["text-summary", "html"]
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "@hcengineering/mail",
|
||||
"version": "0.6.0",
|
||||
"main": "lib/index.js",
|
||||
"svelte": "src/index.ts",
|
||||
"types": "types/index.d.ts",
|
||||
"files": [
|
||||
"lib/**/*",
|
||||
"types/**/*",
|
||||
"tsconfig.json"
|
||||
],
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "compile",
|
||||
"build:watch": "compile",
|
||||
"format": "format src",
|
||||
"test": "jest --passWithNoTests --silent",
|
||||
"_phase:build": "compile transpile src",
|
||||
"_phase:test": "jest --passWithNoTests --silent",
|
||||
"_phase:format": "format src",
|
||||
"_phase:validate": "compile validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-n": "^15.4.0",
|
||||
"eslint": "^8.54.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||
"prettier": "^3.1.0",
|
||||
"typescript": "^5.3.3",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest": "^29.5.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/core": "^0.6.32",
|
||||
"@hcengineering/chunter": "^0.6.20",
|
||||
"@hcengineering/ui": "^0.6.15"
|
||||
},
|
||||
"repository": "https://github.com/hcengineering/platform",
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// Copyright © 2025 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import type { Class, Ref } from '@hcengineering/core'
|
||||
import { Asset, IntlString, type Plugin, plugin } from '@hcengineering/platform'
|
||||
import type { ChunterSpace } from '@hcengineering/chunter'
|
||||
import type { AnyComponent } from '@hcengineering/ui'
|
||||
|
||||
export interface MailThread extends ChunterSpace {
|
||||
subject: string
|
||||
mailThreadId: string
|
||||
from: string
|
||||
to: string
|
||||
preview: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const mailId = 'mail' as Plugin
|
||||
|
||||
export default plugin(mailId, {
|
||||
class: {
|
||||
MailThread: '' as Ref<Class<MailThread>>
|
||||
},
|
||||
component: {
|
||||
CreateMail: '' as AnyComponent,
|
||||
MailThreadPresenter: '' as AnyComponent,
|
||||
MailThread: '' as AnyComponent
|
||||
},
|
||||
string: {
|
||||
MailThread: '' as IntlString,
|
||||
MailThreadId: '' as IntlString,
|
||||
MailPreview: '' as IntlString,
|
||||
Subject: '' as IntlString,
|
||||
To: '' as IntlString,
|
||||
From: '' as IntlString,
|
||||
CreateMail: '' as IntlString,
|
||||
Reply: '' as IntlString,
|
||||
Date: '' as IntlString
|
||||
},
|
||||
icon: {
|
||||
NewMail: '' as Asset,
|
||||
Inbox: '' as Asset,
|
||||
Done: '' as Asset,
|
||||
Sent: '' as Asset
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/default/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types",
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/assets/eslint.config.json'],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="browser" viewBox="0 0 32 32">
|
||||
<path d="M16,2C9.8,2,3.4,3.8,3.4,7.3V16v8.7C3.4,28.2,9.8,30,16,30c0.6,0,1-0.4,1-1s-0.4-1-1-1c-6.4,0-10.6-2-10.6-3.3V19c2.4,1.5,6.5,2.3,10.6,2.3c0.6,0,1-0.4,1-1s-0.4-1-1-1c-6.4,0-10.6-2-10.6-3.3v-5.7c2.4,1.5,6.5,2.3,10.6,2.3s8.2-0.8,10.6-2.3v4.9c0,0.6,0.4,1,1,1s1-0.4,1-1V7.3C28.6,3.8,22.2,2,16,2z M16,10.7c-6.4,0-10.6-2-10.6-3.3S9.6,4,16,4c6.4,0,10.6,2,10.6,3.3S22.4,10.7,16,10.7z" />
|
||||
<path d="M29.7,28.3l-2-2c0.6-0.8,0.9-1.9,0.9-3c0-2.9-2.4-5.3-5.3-5.3c-2.9,0-5.3,2.4-5.3,5.3c0,2.9,2.4,5.3,5.3,5.3c1.1,0,2.1-0.3,3-0.9l2,2c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3C30.1,29.3,30.1,28.7,29.7,28.3z M20,23.3c0-1.8,1.5-3.3,3.3-3.3s3.3,1.5,3.3,3.3s-1.5,3.3-3.3,3.3S20,25.1,20,23.3z" />
|
||||
</symbol>
|
||||
<symbol id="email" viewBox="0 0 12 12" style="fill-rule:evenodd;clip-rule:evenodd;">
|
||||
<path d="M2.2,3.1C1.9,3.4,1.9,3.9,1.9,4.8v2.4c0,0.9,0,1.4,0.3,1.7c0.3,0.3,0.8,0.3,1.7,0.3h4.2c0.9,0,1.4,0,1.7-0.3 c0.3-0.3,0.3-0.8,0.3-1.7V4.8c0-0.9,0-1.4-0.3-1.7C9.5,2.8,9.1,2.8,8.1,2.8H3.9C2.9,2.8,2.5,2.8,2.2,3.1z M3.5,4.3 C3.3,4.1,3,4.2,2.8,4.4C2.7,4.6,2.7,4.9,3,5.1l2.2,1.5c0.5,0.3,1.2,0.3,1.7,0L9,5.1c0.2-0.2,0.3-0.5,0.1-0.7C9,4.2,8.7,4.1,8.5,4.3 L6.3,5.7c-0.2,0.1-0.4,0.1-0.6,0L3.5,4.3z"/>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig",
|
||||
"rigProfile": "assets"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
|
||||
roots: ["./src"],
|
||||
coverageReporters: ["text-summary", "html"]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"string": {
|
||||
"ConfigLabel": "Osobní prohlížeč",
|
||||
"ConfigDescription": "Osobní prohlížeč",
|
||||
"MySpace": "Osobní prohlížeč",
|
||||
"Mail": "Pošta"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"string": {
|
||||
"ConfigLabel": "Persönlicher Browser",
|
||||
"ConfigDescription": "Persönlicher Browser",
|
||||
"MySpace": "Persönlicher Browser",
|
||||
"Mail": "E-Mail"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"string": {
|
||||
"ConfigLabel": "My Space",
|
||||
"ConfigDescription": "My Space",
|
||||
"MySpace": "My Space",
|
||||
"Mail": "Mail"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"string": {
|
||||
"ConfigLabel": "Navigateur Personnel",
|
||||
"ConfigDescription": "Navigateur Personnel",
|
||||
"MySpace": "Navigateur Personnel",
|
||||
"Mail": "Courrier"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"string": {
|
||||
"ConfigLabel": "Browser Personale",
|
||||
"ConfigDescription": "Browser Personale",
|
||||
"MySpace": "Browser Personale",
|
||||
"Mail": "Posta"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"string": {
|
||||
"ConfigLabel": "Персональный браузер",
|
||||
"ConfigDescription": "Персональный браузер",
|
||||
"MySpace": "Персональный браузер",
|
||||
"Mail": "Почта"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"string": {
|
||||
"ConfigLabel": "个人浏览器",
|
||||
"ConfigDescription": "个人浏览器",
|
||||
"MySpace": "个人浏览器",
|
||||
"Mail": "邮件"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "@hcengineering/my-space-assets",
|
||||
"version": "0.6.0",
|
||||
"main": "src/index.ts",
|
||||
"author": "Hardcore Engineering Inc",
|
||||
"template": "@hcengineering/assets-package",
|
||||
"scripts": {
|
||||
"build": "compile",
|
||||
"build:watch": "compile",
|
||||
"build:docs": "",
|
||||
"test": "jest --passWithNoTests --silent",
|
||||
"format": "format src",
|
||||
"_phase:build": "compile transpile src",
|
||||
"_phase:test": "jest --passWithNoTests --silent",
|
||||
"_phase:format": "format src",
|
||||
"_phase:validate": "compile validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-n": "^15.4.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint": "^8.54.0",
|
||||
"prettier": "^3.1.0",
|
||||
"@types/node": "~20.11.16",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest": "^29.5.5",
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/questions": "^0.1.0",
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/my-space": "^0.6.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { makeLocalesTest } from '@hcengineering/platform'
|
||||
|
||||
it(
|
||||
'Locales are equale',
|
||||
makeLocalesTest((lang) => import(`../../lang/${lang}.json`))
|
||||
)
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Copyright © 2025 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 } from '@hcengineering/platform'
|
||||
import mySpace from '@hcengineering/my-space'
|
||||
|
||||
const icons = require('../assets/icons.svg') as string // eslint-disable-line
|
||||
loadMetadata(mySpace.icon, {
|
||||
MySpace: `${icons}#browser`,
|
||||
Mail: `${icons}#email`
|
||||
})
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/assets/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types",
|
||||
"types": ["node", "jest"],
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/ui/eslint.config.json'],
|
||||
parserOptions: { tsconfigRootDir: __dirname }
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"trailingComma": "none",
|
||||
"tabWidth": 2,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"printWidth": 120,
|
||||
"useTabs": false,
|
||||
"bracketSpacing": true,
|
||||
"proseWrap": "preserve",
|
||||
"plugins": [
|
||||
"prettier-plugin-svelte"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": "*.svelte",
|
||||
"options": {
|
||||
"parser": "svelte"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig",
|
||||
"rigProfile": "ui"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)']
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"name": "@hcengineering/my-space-resources",
|
||||
"version": "0.6.0",
|
||||
"main": "src/index.ts",
|
||||
"author": "Hardcore Engineering Inc.",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "compile ui",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"format": "format src",
|
||||
"svelte-check": "do-svelte-check",
|
||||
"_phase:svelte-check": "do-svelte-check",
|
||||
"build:watch": "compile ui",
|
||||
"_phase:build": "compile ui",
|
||||
"_phase:format": "format src",
|
||||
"_phase:validate": "compile validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.2.0",
|
||||
"sass": "^1.53.0",
|
||||
"svelte-preprocess": "^5.1.3",
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-n": "^15.4.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-svelte": "^2.35.1",
|
||||
"prettier-plugin-svelte": "^3.2.2",
|
||||
"eslint": "^8.54.0",
|
||||
"prettier": "^3.1.0",
|
||||
"svelte-check": "^3.6.9",
|
||||
"typescript": "^5.3.3",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest": "^29.5.5",
|
||||
"svelte-eslint-parser": "^0.33.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/core": "^0.6.32",
|
||||
"@hcengineering/mail": "^0.6.0",
|
||||
"@hcengineering/presentation": "^0.6.3",
|
||||
"@hcengineering/theme": "^0.6.5",
|
||||
"@hcengineering/ui": "^0.6.15",
|
||||
"@hcengineering/view": "^0.6.13",
|
||||
"@hcengineering/view-resources": "^0.6.0",
|
||||
"@hcengineering/contact": "^0.6.24",
|
||||
"@hcengineering/contact-resources": "^0.6.0",
|
||||
"@hcengineering/my-space": "^0.6.0",
|
||||
"svelte": "^4.2.19",
|
||||
"fast-equals": "^5.2.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// Copyright © 2025 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { type Resources } from '@hcengineering/platform'
|
||||
import { resolveLocation } from './navigation'
|
||||
|
||||
export { default as plugin } from './plugin'
|
||||
|
||||
export default async (): Promise<Resources> => ({
|
||||
component: {},
|
||||
resolver: {
|
||||
Location: resolveLocation
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// Copyright © 2025 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import type { Client, Doc, Ref, Space, TxOperations } from '@hcengineering/core'
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
import { getPanelURI, type Location, type ResolvedLocation } from '@hcengineering/ui'
|
||||
import view, { type ObjectPanel } from '@hcengineering/view'
|
||||
import { accessDeniedStore } from '@hcengineering/view-resources'
|
||||
import contact, { type Employee, getCurrentEmployee } from '@hcengineering/contact'
|
||||
import mail, { type MailThread } from '@hcengineering/mail'
|
||||
import { mySpaceId } from '@hcengineering/my-space'
|
||||
|
||||
export async function resolveLocation (loc: Location): Promise<ResolvedLocation | undefined> {
|
||||
if (loc.path[2] !== mySpaceId) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
if (loc.path[3] === 'mail') {
|
||||
const threadId = loc.path[5] as Ref<MailThread>
|
||||
return await generateMailLocation(loc, threadId)
|
||||
}
|
||||
|
||||
return undefined
|
||||
}
|
||||
|
||||
function getPanelFragment<T extends Doc> (object: Pick<T, '_class' | '_id'>): string {
|
||||
const hierarchy = getClient().getHierarchy()
|
||||
const objectPanelMixin = hierarchy.classHierarchyMixin<Doc, ObjectPanel>(object._class, view.mixin.ObjectPanel)
|
||||
const component = objectPanelMixin?.component ?? view.component.EditDoc
|
||||
return getPanelURI(component, object._id, object._class, 'content')
|
||||
}
|
||||
|
||||
async function generateMailLocation (loc: Location, id: Ref<MailThread>): Promise<ResolvedLocation | undefined> {
|
||||
const client = getClient()
|
||||
|
||||
const employee = getCurrentEmployee()
|
||||
const personSpace = await getPersonSpace(client, employee)
|
||||
if (personSpace === undefined) {
|
||||
console.error(`Could not find person space for employee ${employee}.`)
|
||||
return undefined
|
||||
}
|
||||
|
||||
let doc: Doc | undefined
|
||||
if (id !== undefined) {
|
||||
doc = await client.findOne(mail.class.MailThread, { _id: id, space: personSpace })
|
||||
if (doc === undefined) {
|
||||
accessDeniedStore.set(true)
|
||||
console.error(`Could not find mail ${id}.`)
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
const appComponent = loc.path[0] ?? ''
|
||||
const workspace = loc.path[1] ?? ''
|
||||
|
||||
const fragment = doc !== undefined ? getPanelFragment(doc) : loc.fragment
|
||||
return {
|
||||
loc: {
|
||||
path: [appComponent, workspace, mySpaceId, personSpace, 'mail'],
|
||||
fragment
|
||||
},
|
||||
defaultLocation: {
|
||||
path: [appComponent, workspace, mySpaceId, personSpace, 'mail'],
|
||||
fragment
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function getPersonSpace (client: TxOperations & Client, employee: Ref<Employee>): Promise<Ref<Space> | undefined> {
|
||||
if (employee === undefined) {
|
||||
return undefined
|
||||
}
|
||||
const space = await client.findOne(contact.class.PersonSpace, { person: employee }, { projection: { _id: 1 } })
|
||||
return space?._id
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// Copyright © 2025 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import type { Ref } from '@hcengineering/core'
|
||||
import { mergeIds } from '@hcengineering/platform'
|
||||
import mySpace, { mySpaceId } from '@hcengineering/my-space'
|
||||
import type { Viewlet } from '@hcengineering/view'
|
||||
|
||||
export default mergeIds(mySpaceId, mySpace, {
|
||||
viewlet: {
|
||||
TableMail: '' as Ref<Viewlet>
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,5 @@
|
||||
const sveltePreprocess = require('svelte-preprocess')
|
||||
|
||||
module.exports = {
|
||||
preprocess: sveltePreprocess()
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/ui/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/default/eslint.config.json'],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
|
||||
roots: ["./src"],
|
||||
coverageReporters: ["text-summary", "html"]
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "@hcengineering/my-space",
|
||||
"version": "0.6.0",
|
||||
"main": "lib/index.js",
|
||||
"svelte": "src/index.ts",
|
||||
"types": "types/index.d.ts",
|
||||
"files": [
|
||||
"lib/**/*",
|
||||
"types/**/*",
|
||||
"tsconfig.json"
|
||||
],
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "compile",
|
||||
"build:watch": "compile",
|
||||
"format": "format src",
|
||||
"test": "jest --passWithNoTests --silent",
|
||||
"_phase:build": "compile transpile src",
|
||||
"_phase:test": "jest --passWithNoTests --silent",
|
||||
"_phase:format": "format src",
|
||||
"_phase:validate": "compile validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-n": "^15.4.0",
|
||||
"eslint": "^8.54.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||
"prettier": "^3.1.0",
|
||||
"typescript": "^5.3.3",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest": "^29.5.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/core": "^0.6.32",
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/ui": "^0.6.15"
|
||||
},
|
||||
"repository": "https://github.com/hcengineering/platform",
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// Copyright © 2025 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 { mySpaceId, mySpacePlugin } from './plugin'
|
||||
|
||||
export { mySpaceId }
|
||||
|
||||
export default mySpacePlugin
|
||||
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// Copyright © 2025 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { type Doc, type Ref, type SpaceTypeDescriptor } from '@hcengineering/core'
|
||||
import type { Asset, IntlString, Plugin, Resource } from '@hcengineering/platform'
|
||||
import { type Location, type ResolvedLocation } from '@hcengineering/ui'
|
||||
|
||||
import { plugin } from '@hcengineering/platform'
|
||||
|
||||
/** @public */
|
||||
export const mySpaceId = 'mySpace' as Plugin
|
||||
|
||||
/** @public */
|
||||
export const mySpacePlugin = plugin(mySpaceId, {
|
||||
app: {
|
||||
MySpace: '' as Ref<Doc>
|
||||
},
|
||||
icon: {
|
||||
MySpace: '' as Asset,
|
||||
Mail: '' as Asset
|
||||
},
|
||||
class: {},
|
||||
descriptors: {
|
||||
ProjectType: '' as Ref<SpaceTypeDescriptor>
|
||||
},
|
||||
string: {
|
||||
MySpace: '' as IntlString,
|
||||
ConfigLabel: '' as IntlString,
|
||||
ConfigDescription: '' as IntlString,
|
||||
Mail: '' as IntlString
|
||||
},
|
||||
resolver: {
|
||||
Location: '' as Resource<(loc: Location) => Promise<ResolvedLocation | undefined>>
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export default mySpacePlugin
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/default/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types",
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
}
|
||||
}
|
||||
@@ -2280,6 +2280,46 @@
|
||||
"packageName": "@hcengineering/model-server-card",
|
||||
"projectFolder": "models/server-card",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/mail",
|
||||
"projectFolder": "plugins/mail",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/model-mail",
|
||||
"projectFolder": "models/mail",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/mail-assets",
|
||||
"projectFolder": "plugins/mail-assets",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/mail-resources",
|
||||
"projectFolder": "plugins/mail-resources",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/my-space",
|
||||
"projectFolder": "plugins/my-space",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/my-space-assets",
|
||||
"projectFolder": "plugins/my-space-assets",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/my-space-resources",
|
||||
"projectFolder": "plugins/my-space-resources",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/model-my-space",
|
||||
"projectFolder": "models/my-space",
|
||||
"shouldPublish": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user