mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-11 04:07:43 +02:00
Add Home application (#9811)
* Add Home application Signed-off-by: Artem Savchenko <armisav@gmail.com> * Update labels and clean up Signed-off-by: Artem Savchenko <armisav@gmail.com> * Revert version Signed-off-by: Artem Savchenko <armisav@gmail.com> * Move home page Signed-off-by: Artem Savchenko <armisav@gmail.com> * Fix thread icon and translations Signed-off-by: Artem Savchenko <armisav@gmail.com> * Remove home from chat Signed-off-by: Artem Savchenko <armisav@gmail.com> * Fix typo Signed-off-by: Artem Savchenko <armisav@gmail.com> * Disable Home by default Signed-off-by: Artem Savchenko <armisav@gmail.com> --------- Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
Generated
+147
-3
@@ -436,6 +436,15 @@ importers:
|
||||
'@rush-temp/hls':
|
||||
specifier: file:./projects/hls.tgz
|
||||
version: file:projects/hls.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@22.15.29)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(postcss-load-config@4.0.2(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))
|
||||
'@rush-temp/home':
|
||||
specifier: file:./projects/home.tgz
|
||||
version: file:projects/home.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@22.15.29)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))
|
||||
'@rush-temp/home-assets':
|
||||
specifier: file:./projects/home-assets.tgz
|
||||
version: file:projects/home-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(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))
|
||||
'@rush-temp/home-resources':
|
||||
specifier: file:./projects/home-resources.tgz
|
||||
version: file:projects/home-resources.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@22.15.29)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(postcss-load-config@4.0.2(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))
|
||||
'@rush-temp/hr':
|
||||
specifier: file:./projects/hr.tgz
|
||||
version: file:projects/hr.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@22.15.29)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))
|
||||
@@ -634,6 +643,9 @@ importers:
|
||||
'@rush-temp/model-guest':
|
||||
specifier: file:./projects/model-guest.tgz
|
||||
version: file:projects/model-guest.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(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))
|
||||
'@rush-temp/model-home':
|
||||
specifier: file:./projects/model-home.tgz
|
||||
version: file:projects/model-home.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(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))
|
||||
'@rush-temp/model-hr':
|
||||
specifier: file:./projects/model-hr.tgz
|
||||
version: file:projects/model-hr.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(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))
|
||||
@@ -4638,7 +4650,7 @@ packages:
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/card-resources@file:projects/card-resources.tgz':
|
||||
resolution: {integrity: sha512-FT20KjpbhUpBVFihXnJGGQkLUxjFchfrJ+oC3We3JjaRBjDhidsTHulxPduQuOck/WJlbtzTG+gO8y6OO/E5/g==, tarball: file:projects/card-resources.tgz}
|
||||
resolution: {integrity: sha512-p+B23RR9oPlR1KyH7v+7hk96bvthfpEXpmWExh8Qit7cjDMeAlMFD8QCaGh6PDPnNhgmuZU1Jr12B/L4jI2feA==, tarball: file:projects/card-resources.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/card@file:projects/card.tgz':
|
||||
@@ -4921,6 +4933,18 @@ packages:
|
||||
resolution: {integrity: sha512-8NM5s9LUxNU+flsQvDz5oEGzVSNX1MZnoMBG0Qk+Jb0LJ/9aUIRkuaTOQMX6r+7s4NJbvkQxElKx0kJ0SWDFXw==, tarball: file:projects/hls.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/home-assets@file:projects/home-assets.tgz':
|
||||
resolution: {integrity: sha512-X70gK5STU72BH7qpbGG+7dBGczEpfZzWnm63zvnKEudhx7t2uf9mLzQKiP+U3NfVhySBneAjM43Q+hJICV7wsA==, tarball: file:projects/home-assets.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/home-resources@file:projects/home-resources.tgz':
|
||||
resolution: {integrity: sha512-MHRW0L8AY2bNYpzrm3LhHwRgEOwqIeWc7C83SIqZme2435Fu8zSSGd73GPbcb+juw770tiNQ5DNbcg/bhEc7WQ==, tarball: file:projects/home-resources.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/home@file:projects/home.tgz':
|
||||
resolution: {integrity: sha512-rdekzJmsD0T3s8W31vA9GLHkXz3euNTjv9EvOluzkS7bK8WTcKmgtS2DfmyrxwfIo8W9zXjD/ju1AOMP9qwRgA==, tarball: file:projects/home.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/hr-assets@file:projects/hr-assets.tgz':
|
||||
resolution: {integrity: sha512-hGQa+GtCy/Zp3WxkkmI9bnoB0chnNA1OilG8C8Q9OdIrIBkE6bJUYgECwSxXsvxYNR02DVGfj45pKSwM+caw+w==, tarball: file:projects/hr-assets.tgz}
|
||||
version: 0.0.0
|
||||
@@ -5090,7 +5114,7 @@ packages:
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/model-all@file:projects/model-all.tgz':
|
||||
resolution: {integrity: sha512-Z9BGAkUiWoTbDM2Bd0AHJSCAb094NOeXknL1TZ1P9hS6waq7OJ4J3NSi6/8Ls7RRSblp0Gm0bHKYe7GOSFbhmQ==, tarball: file:projects/model-all.tgz}
|
||||
resolution: {integrity: sha512-vgCC7/2H8W8807BRBFsSvMGmaVmhuGu+ATwdtPzDHcEUlm3NTZbPKMGQ5q3/0mtSgmQziDQR30MRVsINNqkLiw==, tarball: file:projects/model-all.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/model-analytics-collector@file:projects/model-analytics-collector.tgz':
|
||||
@@ -5181,6 +5205,10 @@ packages:
|
||||
resolution: {integrity: sha512-kKs3ou5CtoDanrPvhLK/PPbvL38gGOyy9kf3/IOtmV5E+cBZ7+4NmaY44sLgUrv2+s4LBytAJDFTrWaEMjG46g==, tarball: file:projects/model-guest.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/model-home@file:projects/model-home.tgz':
|
||||
resolution: {integrity: sha512-TPps1Rv4wE6cg/cslfxtJPveWIGnZWj4tnWBkVDCwVvuvvVzkh85+I+pPx93gzVdBHkICD8tJP1xZdhORE9G4A==, tarball: file:projects/model-home.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/model-hr@file:projects/model-hr.tgz':
|
||||
resolution: {integrity: sha512-84aXICE02BHlrNiYDoUaZkO23jI1I77JaWcLOQPIKWXyh781IJyaNAnz8dSzeNQ9OW2GVoGXy/3oGErqcmNIeg==, tarball: file:projects/model-hr.tgz}
|
||||
version: 0.0.0
|
||||
@@ -5670,7 +5698,7 @@ packages:
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/prod@file:projects/prod.tgz':
|
||||
resolution: {integrity: sha512-hS9pkkwUUUYlP3t7orkFEAS8lv3TkOZ2iTgxaikc2u7AQSI+SfuD+HaNQ26onEwftVJOhrcXEYapPq1eCHMoPg==, tarball: file:projects/prod.tgz}
|
||||
resolution: {integrity: sha512-zVqv+QwGQtWZZL7J2DVfTGiAZAnOlf2qMqg9ANofYnIfkItKQOr3Nj+uu5C7h7PnthtYNWeEtKwxfTK2WA9X8w==, tarball: file:projects/prod.tgz}
|
||||
version: 0.0.0
|
||||
|
||||
'@rush-temp/products-assets@file:projects/products-assets.tgz':
|
||||
@@ -20915,6 +20943,97 @@ snapshots:
|
||||
- supports-color
|
||||
- ts-node
|
||||
|
||||
'@rush-temp/home-assets@file:projects/home-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(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))':
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
'@types/node': 22.15.29
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.3))(eslint@8.56.0)(typescript@5.8.3)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.8.3)
|
||||
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.8.3))(eslint@8.56.0)(typescript@5.8.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.8.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)
|
||||
jest: 29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.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@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(typescript@5.8.3)
|
||||
typescript: 5.8.3
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- esbuild
|
||||
- node-notifier
|
||||
- supports-color
|
||||
- ts-node
|
||||
|
||||
'@rush-temp/home-resources@file:projects/home-resources.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@22.15.29)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(postcss-load-config@4.0.2(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.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.8.3))(eslint@8.56.0)(typescript@5.8.3)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.8.3)
|
||||
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.8.3))(eslint@8.56.0)(typescript@5.8.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.8.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-plugin-svelte: 2.35.1(eslint@8.56.0)(svelte@4.2.19)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))
|
||||
fast-equals: 5.2.2
|
||||
jest: 29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.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.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(postcss@8.5.3)(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.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(postcss@8.5.3)(sass@1.71.1)(svelte@4.2.19)(typescript@5.8.3)
|
||||
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@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(typescript@5.8.3)
|
||||
typescript: 5.8.3
|
||||
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/home@file:projects/home.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@22.15.29)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.24.2)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.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.8.3))(eslint@8.56.0)(typescript@5.8.3)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.8.3)
|
||||
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.8.3))(eslint@8.56.0)(typescript@5.8.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.8.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)
|
||||
jest: 29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.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@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(typescript@5.8.3)
|
||||
typescript: 5.8.3
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- '@types/node'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- esbuild
|
||||
- node-notifier
|
||||
- supports-color
|
||||
- ts-node
|
||||
|
||||
'@rush-temp/hr-assets@file:projects/hr-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(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))':
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
@@ -22775,6 +22894,31 @@ snapshots:
|
||||
- supports-color
|
||||
- ts-node
|
||||
|
||||
'@rush-temp/model-home@file:projects/model-home.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(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))':
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
'@types/node': 22.15.29
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.3))(eslint@8.56.0)(typescript@5.8.3)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.8.3)
|
||||
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.8.3))(eslint@8.56.0)(typescript@5.8.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.8.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)
|
||||
jest: 29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.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@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(typescript@5.8.3)
|
||||
typescript: 5.8.3
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- esbuild
|
||||
- node-notifier
|
||||
- supports-color
|
||||
- ts-node
|
||||
|
||||
'@rush-temp/model-hr@file:projects/model-hr.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(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))':
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
|
||||
@@ -282,6 +282,9 @@
|
||||
"@hcengineering/huly-mail": "^0.6.0",
|
||||
"@hcengineering/huly-mail-assets": "^0.6.0",
|
||||
"@hcengineering/huly-mail-resources": "^0.6.0",
|
||||
"@hcengineering/home": "^0.6.0",
|
||||
"@hcengineering/home-assets": "^0.6.0",
|
||||
"@hcengineering/home-resources": "^0.6.0",
|
||||
"@sentry/svelte": "^9.22.0",
|
||||
"posthog-js": "^1.246.0",
|
||||
"readable-stream": "^4.7.0",
|
||||
|
||||
@@ -78,6 +78,7 @@ import communication, { communicationId } from '@hcengineering/communication'
|
||||
import {emojiId} from '@hcengineering/emoji'
|
||||
import billingPlugin, {billingId} from '@hcengineering/billing'
|
||||
import { hulyMailId } from '@hcengineering/huly-mail'
|
||||
import {homeId} from '@hcengineering/home'
|
||||
|
||||
import '@hcengineering/activity-assets'
|
||||
import '@hcengineering/analytics-collector-assets'
|
||||
@@ -135,6 +136,7 @@ import '@hcengineering/communication-assets'
|
||||
import '@hcengineering/emoji-assets'
|
||||
import '@hcengineering/billing-assets'
|
||||
import '@hcengineering/huly-mail-assets'
|
||||
import '@hcengineering/home-assets'
|
||||
|
||||
import { coreId } from '@hcengineering/core'
|
||||
import presentation, {
|
||||
@@ -377,6 +379,7 @@ function configureI18n(): void {
|
||||
addStringsLoader(emojiId, async (lang: string) => await import(`@hcengineering/emoji-assets/lang/${lang}.json`))
|
||||
addStringsLoader(billingId, async (lang: string) => await import(`@hcengineering/billing-assets/lang/${lang}.json`))
|
||||
addStringsLoader(hulyMailId, async (lang: string) => await import(`@hcengineering/huly-mail-assets/lang/${lang}.json`))
|
||||
addStringsLoader(homeId, async (lang: string) => await import(`@hcengineering/home-assets/lang/${lang}.json`))
|
||||
}
|
||||
|
||||
export async function configurePlatform() {
|
||||
@@ -587,6 +590,7 @@ export async function configurePlatform() {
|
||||
addLocation(emojiId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/emoji-resources'))
|
||||
addLocation(billingId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/billing-resources'))
|
||||
addLocation(hulyMailId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/huly-mail-resources'))
|
||||
addLocation(homeId, () => import(/* webpackChunkName: "home" */ '@hcengineering/home-resources'))
|
||||
|
||||
setMetadata(client.metadata.FilterModel, 'ui')
|
||||
setMetadata(client.metadata.ExtraPlugins, ['preference' as Plugin])
|
||||
|
||||
@@ -133,6 +133,7 @@
|
||||
"@hcengineering/model-communication": "^0.6.0",
|
||||
"@hcengineering/model-emoji": "^0.6.0",
|
||||
"@hcengineering/model-billing": "^0.6.0",
|
||||
"@hcengineering/model-huly-mail": "^0.6.0"
|
||||
"@hcengineering/model-huly-mail": "^0.6.0",
|
||||
"@hcengineering/model-home": "^0.6.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,6 +118,7 @@ import { presenceId, createModel as presenceModel } from '@hcengineering/model-p
|
||||
import chat, { chatId, createModel as chatModel } from '@hcengineering/model-chat'
|
||||
import processes, { processId, createModel as processModel } from '@hcengineering/model-process'
|
||||
import inbox, { createModel as inboxModel, inboxId } from '@hcengineering/model-inbox'
|
||||
import home, { createModel as homeModel, homeId } from '@hcengineering/model-home'
|
||||
import { achievementId, createModel as achievementModel } from '@hcengineering/model-achievement'
|
||||
import { emojiId, createModel as emojiModel } from '@hcengineering/model-emoji'
|
||||
import { billingId, createModel as billingModel } from '@hcengineering/model-billing'
|
||||
@@ -487,6 +488,11 @@ export default function buildModel (): Builder {
|
||||
[mailModel, mailId],
|
||||
[billingModel, billingId, { beta: false, hidden: true, enabled: true }],
|
||||
[hulyMailModel, hulyMailId],
|
||||
[
|
||||
homeModel,
|
||||
homeId,
|
||||
{ label: home.string.Home, hidden: true, enabled: false, beta: true, classFilter: defaultFilter }
|
||||
],
|
||||
|
||||
[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,7 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
|
||||
roots: ["./src"],
|
||||
coverageReporters: ["text-summary", "html"]
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "@hcengineering/model-home",
|
||||
"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",
|
||||
"_phase:test": "jest --passWithNoTests --silent --forceExit",
|
||||
"test": "jest --passWithNoTests --silent --forceExit"
|
||||
},
|
||||
"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.8.3",
|
||||
"@types/node": "^22.15.29",
|
||||
"jest": "^29.7.0",
|
||||
"@types/jest": "^29.5.5",
|
||||
"ts-jest": "^29.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/card": "^0.6.0",
|
||||
"@hcengineering/home": "^0.6.0",
|
||||
"@hcengineering/home-resources": "^0.6.0",
|
||||
"@hcengineering/core": "^0.6.32",
|
||||
"@hcengineering/model": "^0.6.11",
|
||||
"@hcengineering/model-core": "^0.6.0",
|
||||
"@hcengineering/model-workbench": "^0.6.1",
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/setting": "^0.6.17",
|
||||
"@hcengineering/ui": "^0.6.15",
|
||||
"@hcengineering/view": "^0.6.13",
|
||||
"@hcengineering/workbench": "^0.6.16"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// 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 Builder } from '@hcengineering/model'
|
||||
import core from '@hcengineering/model-core'
|
||||
import workbench from '@hcengineering/model-workbench'
|
||||
import { homeId } from '@hcengineering/home'
|
||||
|
||||
import home from './plugin'
|
||||
|
||||
export { homeId } from '@hcengineering/home'
|
||||
export { homeOperation } from './migration'
|
||||
export default home
|
||||
|
||||
export function createModel (builder: Builder): void {
|
||||
builder.createDoc(
|
||||
workbench.class.Application,
|
||||
core.space.Model,
|
||||
{
|
||||
label: home.string.Home,
|
||||
icon: home.icon.Home,
|
||||
alias: homeId,
|
||||
hidden: false,
|
||||
component: home.component.HomeApplication,
|
||||
position: 'top',
|
||||
order: 90
|
||||
},
|
||||
home.app.Home
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// 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 MigrateOperation, type MigrationClient, type MigrationUpgradeClient } from '@hcengineering/model'
|
||||
|
||||
export const homeOperation: MigrateOperation = {
|
||||
async migrate (client: MigrationClient, mode): Promise<void> {},
|
||||
async upgrade (state: Map<string, Set<string>>, client: () => Promise<MigrationUpgradeClient>, mode): Promise<void> {}
|
||||
}
|
||||
@@ -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 { homeId } from '@hcengineering/home'
|
||||
import home from '@hcengineering/home-resources/src/plugin'
|
||||
import { type Ref } from '@hcengineering/core'
|
||||
import { type Application } from '@hcengineering/model-workbench'
|
||||
import { mergeIds } from '@hcengineering/platform'
|
||||
|
||||
export default mergeIds(homeId, home, {
|
||||
app: {
|
||||
Home: '' as Ref<Application>
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/model/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types",
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "lib", "dist", "types", "bundle"]
|
||||
}
|
||||
@@ -42,12 +42,8 @@
|
||||
"NoChildren": "Žádné děti",
|
||||
"ConfigDescription": "Rozšíření pro správu znalostí ve stylu databáze.",
|
||||
"AddCollaborators": "Přidat spolupracovníky",
|
||||
"Home": "Domů",
|
||||
"CardTitle": "Název",
|
||||
"Post": "Přidat",
|
||||
"Compact": "Kompaktní",
|
||||
"Comfortable": "Komfortní",
|
||||
"Comfortable2": "Komfortní 2",
|
||||
"GetIndividualPublicLink": "Získat personalizovaný veřejný odkaz",
|
||||
"ShowLess": "Skrýt detaily",
|
||||
"CardContent": "Co chcete sdílet?"
|
||||
|
||||
@@ -42,12 +42,8 @@
|
||||
"NoChildren": "Keine Kinder",
|
||||
"ConfigDescription": "Erweiterung für Datenbank-basiertes Wissensmanagement.",
|
||||
"AddCollaborators": "Mitarbeiter hinzufügen",
|
||||
"Home": "Startseite",
|
||||
"CardTitle": "Titel",
|
||||
"Post": "Beitrag",
|
||||
"Compact": "Kompakt",
|
||||
"Comfortable": "Komfortabel",
|
||||
"Comfortable2": "Komfortabel 2",
|
||||
"GetIndividualPublicLink": "Personalisierten öffentlichen Link erhalten",
|
||||
"ShowLess": "Weniger anzeigen",
|
||||
"CardContent": "Was möchten Sie teilen?"
|
||||
|
||||
@@ -42,12 +42,8 @@
|
||||
"NoChildren": "No children",
|
||||
"ConfigDescription": "Extension for database-style knowledge management.",
|
||||
"AddCollaborators": "Add collaborators",
|
||||
"Home": "Home",
|
||||
"CardTitle": "Title",
|
||||
"Post": "Post",
|
||||
"Compact": "Compact",
|
||||
"Comfortable": "Comfortable",
|
||||
"Comfortable2": "Comfortable 2",
|
||||
"GetIndividualPublicLink": "Get personalized public link",
|
||||
"ShowLess": "Show less",
|
||||
"CardContent": "What do you want to share?"
|
||||
|
||||
@@ -42,12 +42,8 @@
|
||||
"NoChildren": "No hay hijos",
|
||||
"ConfigDescription": "Extensión para la gestión del conocimiento al estilo de una base de datos.",
|
||||
"AddCollaborators": "Agregar colaboradores",
|
||||
"Home": "Inicio",
|
||||
"CardTitle": "Título",
|
||||
"Post": "Publicar",
|
||||
"Compact": "Compacto",
|
||||
"Comfortable": "Confortable",
|
||||
"Comfortable2": "Confortable 2",
|
||||
"GetIndividualPublicLink": "Obtener enlace público personalizado",
|
||||
"ShowLess": "Mostrar menos",
|
||||
"CardContent": "¿Qué quieres compartir?"
|
||||
|
||||
@@ -42,12 +42,8 @@
|
||||
"NoChildren": "Pas d'enfants",
|
||||
"ConfigDescription": "Extension pour la gestion des connaissances de style base de données.",
|
||||
"AddCollaborators": "Ajouter des collaborateurs",
|
||||
"Home": "Accueil",
|
||||
"CardTitle": "Titre",
|
||||
"Post": "Publier",
|
||||
"Compact": "Compact",
|
||||
"Comfortable": "Confortable",
|
||||
"Comfortable2": "Confortable 2",
|
||||
"GetIndividualPublicLink": "Obtenir un lien public personnalisé",
|
||||
"ShowLess": "Afficher moins",
|
||||
"CardContent": "Que voulez-vous partager ?"
|
||||
|
||||
@@ -42,12 +42,8 @@
|
||||
"NumberTypes": "{count, plural, one {# tipo} other {# tipi}}",
|
||||
"ConfigDescription": "Estensione per la gestione della conoscenza in stile database.",
|
||||
"AddCollaborators": "Aggiungi collaboratori",
|
||||
"Home": "Home",
|
||||
"CardTitle": "Titolo",
|
||||
"Post": "Pubblica",
|
||||
"Compact": "Compatto",
|
||||
"Comfortable": "Confortabile",
|
||||
"Comfortable2": "Confortabile 2",
|
||||
"GetIndividualPublicLink": "Ottieni link pubblico personalizzato",
|
||||
"ShowLess": "Mostra meno",
|
||||
"CardContent": "Cosa vuoi condividere?"
|
||||
|
||||
@@ -42,12 +42,8 @@
|
||||
"NoChildren": "子がありません",
|
||||
"ConfigDescription": "データベーススタイルのナレッジマネジメント用の拡張機能。",
|
||||
"AddCollaborators": "コラボレーターを追加",
|
||||
"Home": "ホーム",
|
||||
"CardTitle": "タイトル",
|
||||
"Post": "投稿",
|
||||
"Compact": "コンパクト",
|
||||
"Comfortable": "コンファンティブ",
|
||||
"Comfortable2": "コンファンティブ 2",
|
||||
"GetIndividualPublicLink": "パーソナライズされた公開リンクを取得",
|
||||
"ShowLess": "詳細を隠す",
|
||||
"CardContent": "何を共有しますか?"
|
||||
|
||||
@@ -42,12 +42,8 @@
|
||||
"NoChildren": "Sem filhos",
|
||||
"ConfigDescription": "Extensão para gerenciamento de conhecimento no estilo de banco de dados.",
|
||||
"AddCollaborators": "Adicionar colaboradores",
|
||||
"Home": "Início",
|
||||
"CardTitle": "Título",
|
||||
"Post": "Publicar",
|
||||
"Compact": "Compacto",
|
||||
"Comfortable": "Confortável",
|
||||
"Comfortable2": "Confortável 2",
|
||||
"GetIndividualPublicLink": "Obter link público personalizado",
|
||||
"ShowLess": "Mostrar menos",
|
||||
"CardContent": "O que você quer compartilhar?"
|
||||
|
||||
@@ -42,12 +42,8 @@
|
||||
"NoChildren": "Нет потомков",
|
||||
"ConfigDescription": "Расширение для управления знаниями в стиле базы данных.",
|
||||
"AddCollaborators": "Добавить сотрудников",
|
||||
"Home": "Дом",
|
||||
"CardTitle": "Название",
|
||||
"Post": "Опубликовать",
|
||||
"Compact": "Компактный",
|
||||
"Comfortable": "Комфортный",
|
||||
"Comfortable2": "Комфортный 2",
|
||||
"GetIndividualPublicLink": "Получить персональную публичную ссылку",
|
||||
"ShowLess": "Скрыть детали",
|
||||
"CardContent": "Чем вы хотите поделиться?"
|
||||
|
||||
@@ -42,12 +42,8 @@
|
||||
"NoChildren": "没有子级",
|
||||
"ConfigDescription": "用于数据库风格知识管理的扩展。",
|
||||
"AddCollaborators": "添加协作者",
|
||||
"Home": "主页",
|
||||
"CardTitle": "标题",
|
||||
"Post": "发布",
|
||||
"Compact": "紧凑",
|
||||
"Comfortable": "舒适",
|
||||
"Comfortable2": "舒适 2",
|
||||
"GetIndividualPublicLink": "获取个性化公共链接",
|
||||
"ShowLess": "收起详情",
|
||||
"CardContent": "你想分享什么?"
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
"@hcengineering/communication": "^0.6.0",
|
||||
"@hcengineering/preference": "^0.6.13",
|
||||
"@hcengineering/account-client": "^0.6.0",
|
||||
"@hcengineering/chat": "^0.6.0",
|
||||
"fast-equals": "^5.2.2",
|
||||
"svelte": "^4.2.19"
|
||||
}
|
||||
|
||||
@@ -30,13 +30,14 @@
|
||||
import { markupToMarkdown } from '@hcengineering/text-markdown'
|
||||
import textEditor, { type RefAction } from '@hcengineering/text-editor'
|
||||
import { defaultMessageInputActions } from '@hcengineering/communication-resources'
|
||||
import chat from '@hcengineering/chat'
|
||||
|
||||
import EditorActions from './EditorActions.svelte'
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
const communicationClient = getCommunicationClient()
|
||||
|
||||
const threadMasterTag = 'chat:masterTag:Thread' as Ref<MasterTag>
|
||||
const threadMasterTag = chat.masterTag.Thread
|
||||
|
||||
let title: string = ''
|
||||
let space: Ref<CardSpace> | undefined = undefined
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { SavedView } from '@hcengineering/workbench-resources'
|
||||
import { getCurrentAccount, SortingOrder, Ref } from '@hcengineering/core'
|
||||
import { TreeItem } from '@hcengineering/view-resources'
|
||||
|
||||
import { type NavigatorConfig } from '../../types'
|
||||
import NavigatorSpace from './NavigatorSpace.svelte'
|
||||
@@ -97,13 +96,6 @@
|
||||
selectedSpecial = 'favorites'
|
||||
dispatch('favorites')
|
||||
}
|
||||
|
||||
function onHomeClick (): void {
|
||||
selectedCard = undefined
|
||||
selectedType = undefined
|
||||
selectedSpecial = 'home'
|
||||
dispatch('home')
|
||||
}
|
||||
</script>
|
||||
|
||||
<Scroller shrink>
|
||||
@@ -111,15 +103,6 @@
|
||||
{#if config.savedViews}
|
||||
<SavedView alias={applicationId} />
|
||||
{/if}
|
||||
{#if config.home}
|
||||
<TreeItem
|
||||
_id={'home'}
|
||||
label={cardPlugin.string.Home}
|
||||
selected={selectedSpecial === 'home'}
|
||||
icon={cardPlugin.icon.Home}
|
||||
on:click={onHomeClick}
|
||||
/>
|
||||
{/if}
|
||||
{#if config.groupBySpace}
|
||||
{#each spaces as space (space._id)}
|
||||
<NavigatorSpace
|
||||
|
||||
@@ -76,10 +76,13 @@ export { default as Favorites } from './components/Favorites.svelte'
|
||||
export { default as CardPresenter } from './components/CardPresenter.svelte'
|
||||
export { default as TypeSelector } from './components/TypeSelector.svelte'
|
||||
export { default as AssociationsSelect } from './components/settings/view/AssociationsSelect.svelte'
|
||||
export { default as Home } from './components/Home.svelte'
|
||||
export { default as CardTagsColored } from './components/CardTagsColored.svelte'
|
||||
export { default as CardPathPresenter } from './components/CardPathPresenter.svelte'
|
||||
export { default as CardTimestamp } from './components/CardTimestamp.svelte'
|
||||
export { default as NewCardForm } from './components/NewCardForm.svelte'
|
||||
|
||||
export * from './types'
|
||||
export { getCardIconInfo } from './utils'
|
||||
export { getCardIconInfo, openCardInSidebar } from './utils'
|
||||
|
||||
export default async (): Promise<Resources> => ({
|
||||
component: {
|
||||
|
||||
@@ -101,13 +101,9 @@ export default mergeIds(cardId, card, {
|
||||
Properties: '' as IntlString,
|
||||
NoChildren: '' as IntlString,
|
||||
AddCollaborators: '' as IntlString,
|
||||
Home: '' as IntlString,
|
||||
CardTitle: '' as IntlString,
|
||||
CardContent: '' as IntlString,
|
||||
Post: '' as IntlString,
|
||||
Compact: '' as IntlString,
|
||||
Comfortable: '' as IntlString,
|
||||
Comfortable2: '' as IntlString,
|
||||
ShowLess: '' as IntlString
|
||||
}
|
||||
})
|
||||
|
||||
@@ -18,7 +18,6 @@ import { type Heading } from '@hcengineering/text-editor'
|
||||
|
||||
interface BaseNavigatorConfig {
|
||||
types: Array<Ref<MasterTag>>
|
||||
home?: boolean
|
||||
groupBySpace?: boolean
|
||||
savedViews?: boolean
|
||||
allowCreate?: boolean
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
import { chatId } from '@hcengineering/chat'
|
||||
import { Ref } from '@hcengineering/core'
|
||||
import view from '@hcengineering/view'
|
||||
import { Favorites, Home } from '@hcengineering/card-resources'
|
||||
import { Favorites } from '@hcengineering/card-resources'
|
||||
|
||||
import ChatNavigation from './ChatNavigation.svelte'
|
||||
import {
|
||||
@@ -39,9 +39,7 @@
|
||||
navigateToType,
|
||||
getTypeIdFromLocation,
|
||||
isFavoritesLocation,
|
||||
navigateToFavorites,
|
||||
navigateToHome,
|
||||
isHomeLocation
|
||||
navigateToFavorites
|
||||
} from '../location'
|
||||
import ChatNavigationCategoryList from './ChatNavigationCategoryList.svelte'
|
||||
|
||||
@@ -57,7 +55,6 @@
|
||||
doc: MasterTag
|
||||
}
|
||||
| { type: 'favorites' }
|
||||
| { type: 'home' }
|
||||
|
||||
const client = getClient()
|
||||
const hierarchy = client.getHierarchy()
|
||||
@@ -77,18 +74,12 @@
|
||||
const typeId = getTypeIdFromLocation(loc)
|
||||
const cardId = getCardIdFromLocation(loc)
|
||||
const isFavorites = isFavoritesLocation(loc)
|
||||
const isHome = isHomeLocation(loc)
|
||||
|
||||
if (isFavorites) {
|
||||
selection = { type: 'favorites' }
|
||||
return
|
||||
}
|
||||
|
||||
if (isHome) {
|
||||
selection = { type: 'home' }
|
||||
return
|
||||
}
|
||||
|
||||
const type = typeId != null ? await client.findOne(cardPlugin.class.MasterTag, { _id: typeId }) : undefined
|
||||
|
||||
if (type != null) {
|
||||
@@ -136,13 +127,6 @@
|
||||
navigateToFavorites()
|
||||
}
|
||||
|
||||
function selectHome (): void {
|
||||
if (selection?.type === 'home') return
|
||||
closePanel(false)
|
||||
selection = { type: 'home' }
|
||||
navigateToHome()
|
||||
}
|
||||
|
||||
function getSelectedCard (selection: Selection | undefined): Card | undefined {
|
||||
if (selection?.type !== 'card') return undefined
|
||||
return selection.doc
|
||||
@@ -184,7 +168,6 @@
|
||||
on:selectCard={selectCard}
|
||||
on:selectType={selectType}
|
||||
on:favorites={selectFavorites}
|
||||
on:home={selectHome}
|
||||
/>
|
||||
</div>
|
||||
{#if !($deviceInfo.isMobile && $deviceInfo.isPortrait && $deviceInfo.minWidth)}
|
||||
@@ -205,10 +188,6 @@
|
||||
{#key selection.type}
|
||||
<Favorites application={chatId} />
|
||||
{/key}
|
||||
{:else if selection?.type === 'home'}
|
||||
{#key selection.type}
|
||||
<Home on:selectCard={selectCard} />
|
||||
{/key}
|
||||
{:else if selectedCard}
|
||||
{@const panelComponent = hierarchy.classHierarchyMixin(selectedCard._class, view.mixin.ObjectPanel)}
|
||||
{@const comp = panelComponent?.component ?? view.component.EditDoc}
|
||||
|
||||
@@ -23,15 +23,12 @@
|
||||
|
||||
export let card: Card | undefined = undefined
|
||||
export let type: Ref<MasterTag> | undefined = undefined
|
||||
export let special: 'home' | 'favorites' | string | undefined = undefined
|
||||
export let special: 'favorites' | string | undefined = undefined
|
||||
|
||||
function getSpecial (special: 'home' | 'favorites' | string | undefined): string | undefined {
|
||||
function getSpecial (special: 'favorites' | string | undefined): string | undefined {
|
||||
if (special === 'favorites') {
|
||||
return 'favorites'
|
||||
}
|
||||
if (special === 'home') {
|
||||
return 'home'
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
</script>
|
||||
@@ -44,7 +41,6 @@
|
||||
groupBySpace: false,
|
||||
hideEmpty: true,
|
||||
limit: 5,
|
||||
home: true,
|
||||
labelFilter: [SubscriptionLabelID],
|
||||
preorder: [
|
||||
{ type: chat.masterTag.Thread, order: 1 },
|
||||
@@ -67,5 +63,4 @@
|
||||
on:selectType
|
||||
on:selectCard
|
||||
on:favorites
|
||||
on:home
|
||||
/>
|
||||
|
||||
@@ -26,10 +26,6 @@ export function isFavoritesLocation (loc: Location): boolean {
|
||||
return loc.path[2] === chatId && loc.path[3] === 'favorites'
|
||||
}
|
||||
|
||||
export function isHomeLocation (loc: Location): boolean {
|
||||
return loc.path[2] === chatId && loc.path[3] === 'home'
|
||||
}
|
||||
|
||||
export function getCardIdFromLocation (loc: Location): Ref<Card> | undefined {
|
||||
if (loc.path[2] !== chatId) {
|
||||
return undefined
|
||||
@@ -82,16 +78,6 @@ export function navigateToFavorites (): void {
|
||||
navigate(loc)
|
||||
}
|
||||
|
||||
export function navigateToHome (): void {
|
||||
const loc = getCurrentResolvedLocation()
|
||||
|
||||
loc.path[2] = chatId
|
||||
loc.path[3] = 'home'
|
||||
delete loc.query?.message
|
||||
|
||||
navigate(loc)
|
||||
}
|
||||
|
||||
export async function resolveLocation (loc: Location): Promise<ResolvedLocation | undefined> {
|
||||
if (loc.path[2] !== chatId) {
|
||||
return undefined
|
||||
|
||||
@@ -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,17 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="home" viewBox="0 0 32 32">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.2929 2.29302C15.6834 1.90249 16.3166 1.90249 16.7071 2.29302L29.7071 15.293C30.0976 15.6835 30.0976 16.3167 29.7071 16.7072C29.3166 17.0978 28.6834 17.0978 28.2929 16.7072L28 16.4143V26.0001C28 27.1047 27.1046 28.0001 26 28.0001H6C4.89543 28.0001 4 27.1047 4 26.0001V16.4143L3.70711 16.7072C3.31658 17.0978 2.68342 17.0978 2.29289 16.7072C1.90237 16.3167 1.90237 15.6835 2.29289 15.293L15.2929 2.29302ZM6 14.4143V26.0001H12V17.0001C12 16.4478 12.4477 16.0001 13 16.0001H19C19.5523 16.0001 20 16.4478 20 17.0001V26.0001H26V14.4143L16 4.41434L6 14.4143ZM18 26.0001V18.0001H14V26.0001H18Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
<symbol id="person" viewBox="0 0 16 16">
|
||||
<path d="M8 3.99988C7.50555 3.99988 7.0222 4.1465 6.61108 4.4212C6.19995 4.69591 5.87952 5.08635 5.6903 5.54317C5.50108 5.99998 5.45158 6.50265 5.54804 6.9876C5.6445 7.47256 5.88261 7.91801 6.23224 8.26764C6.58187 8.61728 7.02733 8.85538 7.51228 8.95184C7.99723 9.0483 8.4999 8.9988 8.95671 8.80958C9.41353 8.62036 9.80397 8.29993 10.0787 7.8888C10.3534 7.47768 10.5 6.99433 10.5 6.49988C10.5 5.83684 10.2366 5.20095 9.76777 4.73211C9.29893 4.26327 8.66304 3.99988 8 3.99988ZM8 7.99988C7.70333 7.99988 7.41332 7.9119 7.16665 7.74708C6.91997 7.58226 6.72771 7.34799 6.61418 7.0739C6.50065 6.79981 6.47095 6.49821 6.52882 6.20724C6.5867 5.91627 6.72956 5.649 6.93934 5.43922C7.14912 5.22944 7.4164 5.08658 7.70737 5.0287C7.99834 4.97082 8.29994 5.00053 8.57403 5.11406C8.84812 5.22759 9.08239 5.41985 9.24721 5.66652C9.41203 5.9132 9.5 6.20321 9.5 6.49988C9.49955 6.89756 9.34137 7.27883 9.06017 7.56004C8.77896 7.84125 8.39769 7.99943 8 7.99988Z" />
|
||||
<path d="M8 0.999878C6.61553 0.999878 5.26216 1.41042 4.11101 2.17959C2.95987 2.94876 2.06266 4.04201 1.53285 5.32109C1.00303 6.60018 0.86441 8.00764 1.13451 9.36551C1.4046 10.7234 2.07129 11.9707 3.05026 12.9496C4.02922 13.9286 5.2765 14.5953 6.63437 14.8654C7.99224 15.1355 9.3997 14.9968 10.6788 14.467C11.9579 13.9372 13.0511 13.04 13.8203 11.8889C14.5895 10.7377 15 9.38435 15 7.99988C14.9979 6.144 14.2597 4.36474 12.9474 3.05244C11.6351 1.74014 9.85588 1.00197 8 0.999878ZM5 13.1881V12.4999C5.00044 12.1022 5.15862 11.7209 5.43983 11.4397C5.72104 11.1585 6.10231 11.0003 6.5 10.9999H9.5C9.89769 11.0003 10.279 11.1585 10.5602 11.4397C10.8414 11.7209 10.9996 12.1022 11 12.4999V13.1881C10.0896 13.7197 9.05426 13.9999 8 13.9999C6.94574 13.9999 5.91042 13.7197 5 13.1881ZM11.9963 12.4628C11.9863 11.8069 11.7191 11.1812 11.2521 10.7205C10.7852 10.2598 10.156 10.001 9.5 9.99988H6.5C5.84405 10.001 5.2148 10.2598 4.74786 10.7205C4.28093 11.1812 4.01369 11.8069 4.00375 12.4628C3.09703 11.6532 2.45762 10.5872 2.17017 9.40611C1.88272 8.22501 1.9608 6.98445 2.39407 5.84871C2.82734 4.71297 3.59536 3.73561 4.59644 3.04606C5.59751 2.35651 6.78442 1.98729 8 1.98729C9.21558 1.98729 10.4025 2.35651 11.4036 3.04606C12.4046 3.73561 13.1727 4.71297 13.6059 5.84871C14.0392 6.98445 14.1173 8.22501 13.8298 9.40611C13.5424 10.5872 12.903 11.6532 11.9963 12.4628Z" />
|
||||
</symbol>
|
||||
<symbol id="thread" viewBox="0 0 24 24">
|
||||
<path d="M9.00433 11H6.99536V13H9.00433V11Z" fill="currentColor"/>
|
||||
<path d="M12.9999 11H10.9909V13H12.9999V11Z" fill="currentColor"/>
|
||||
<path d="M16.9954 11H14.9864V13H16.9954V11Z" fill="currentColor"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M12 1.25C6.10068 1.25 1.2522 5.80367 1.2522 11.5004C1.2522 14.2501 2.38351 16.6493 4.16893 18.5083L3.28136 21.7834L3.28087 21.7853C3.11452 22.4053 3.74109 22.934 4.32195 22.6775L4.32598 22.6757L8.01227 21.022C9.24674 21.4927 10.5929 21.7508 12 21.7508C17.8993 21.7508 22.7478 17.1972 22.7478 11.5004C22.7478 5.80367 17.8993 1.25 12 1.25ZM2.7522 11.5004C2.7522 6.70331 6.85606 2.75 12 2.75C17.1439 2.75 21.2478 6.70331 21.2478 11.5004C21.2478 16.2976 17.1439 20.2508 12 20.2508C10.6757 20.2508 9.41882 19.9878 8.28293 19.5153L7.98364 19.3908L5.13791 20.6674L5.84605 18.0544L5.52727 17.7465C3.80892 16.0869 2.7522 13.945 2.7522 11.5004Z"
|
||||
fill="currentColor"/>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.1 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": {
|
||||
"Home": "Domov",
|
||||
"All": "Všechny aktualizace",
|
||||
"CreatedByMe": "Vytvořeno mnou",
|
||||
"Threads": "Vlákna",
|
||||
"Compact": "Kompaktní",
|
||||
"Comfortable": "Komfortní",
|
||||
"Comfortable2": "Komfortní 2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Home": "Startseite",
|
||||
"All": "Alle Updates",
|
||||
"CreatedByMe": "Von mir erstellt",
|
||||
"Threads": "Threads",
|
||||
"Compact": "Kompakt",
|
||||
"Comfortable": "Komfortabel",
|
||||
"Comfortable2": "Komfortabel 2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Home": "Home",
|
||||
"All": "All updates",
|
||||
"CreatedByMe": "Created by me",
|
||||
"Threads": "Threads",
|
||||
"Compact": "Compact",
|
||||
"Comfortable": "Comfortable",
|
||||
"Comfortable2": "Comfortable 2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Home": "Inicio",
|
||||
"All": "Todas las actualizaciones",
|
||||
"CreatedByMe": "Creado por mí",
|
||||
"Threads": "Hilos",
|
||||
"Compact": "Compacto",
|
||||
"Comfortable": "Confortable",
|
||||
"Comfortable2": "Confortable 2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Home": "Accueil",
|
||||
"All": "Toutes les mises à jour",
|
||||
"CreatedByMe": "Créé par moi",
|
||||
"Threads": "Fils",
|
||||
"Compact": "Compact",
|
||||
"Comfortable": "Confortable",
|
||||
"Comfortable2": "Confortable 2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Home": "Casa",
|
||||
"All": "Tutti gli aggiornamenti",
|
||||
"CreatedByMe": "Creato da me",
|
||||
"Threads": "Thread",
|
||||
"Compact": "Compatto",
|
||||
"Comfortable": "Comodo",
|
||||
"Comfortable2": "Comodo 2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Home": "ホーム",
|
||||
"All": "すべての更新",
|
||||
"CreatedByMe": "自分が作成",
|
||||
"Threads": "スレッド",
|
||||
"Compact": "コンパクト",
|
||||
"Comfortable": "快適",
|
||||
"Comfortable2": "快適2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Home": "Início",
|
||||
"All": "Todas as atualizações",
|
||||
"CreatedByMe": "Criado por mim",
|
||||
"Threads": "Threads",
|
||||
"Compact": "Compacto",
|
||||
"Comfortable": "Confortável",
|
||||
"Comfortable2": "Confortável 2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Home": "Главная",
|
||||
"All": "Все обновления",
|
||||
"CreatedByMe": "Созданные мной",
|
||||
"Threads": "Потоки",
|
||||
"Compact": "Компактный",
|
||||
"Comfortable": "Комфортный",
|
||||
"Comfortable2": "Комфортный 2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"string": {
|
||||
"Home": "主页",
|
||||
"All": "所有更新",
|
||||
"CreatedByMe": "我创建的",
|
||||
"Threads": "主题",
|
||||
"Compact": "紧凑",
|
||||
"Comfortable": "舒适",
|
||||
"Comfortable2": "舒适2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "@hcengineering/home-assets",
|
||||
"version": "0.6.0",
|
||||
"main": "src/index.ts",
|
||||
"author": "Hardcore Engineering Inc",
|
||||
"template": "@hcengineering/assets-package",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "compile",
|
||||
"test": "jest --passWithNoTests --silent",
|
||||
"build:docs": "",
|
||||
"format": "format src",
|
||||
"build:watch": "compile",
|
||||
"_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": "^22.15.29",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest": "^29.5.5",
|
||||
"typescript": "^5.8.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/home": "^0.6.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// 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 { makeLocalesTest } from '@hcengineering/platform'
|
||||
|
||||
it(
|
||||
'Locales are equal',
|
||||
makeLocalesTest((lang) => import(`../../lang/${lang}.json`))
|
||||
)
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// 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 home from '@hcengineering/home'
|
||||
|
||||
const icons = require('../assets/icons.svg') as string // eslint-disable-line
|
||||
loadMetadata(home.icon, {
|
||||
Home: `${icons}#home`,
|
||||
Person: `${icons}#person`,
|
||||
Thread: `${icons}#thread`
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/assets/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types",
|
||||
"types": ["node", "jest"],
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "lib", "dist", "types", "bundle"]
|
||||
}
|
||||
@@ -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,60 @@
|
||||
{
|
||||
"name": "@hcengineering/home-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": {
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"@types/jest": "^29.5.5",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint": "^8.54.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",
|
||||
"jest": "^29.7.0",
|
||||
"prettier": "^3.1.0",
|
||||
"prettier-plugin-svelte": "^3.2.2",
|
||||
"sass": "^1.53.0",
|
||||
"svelte-check": "^3.6.9",
|
||||
"svelte-eslint-parser": "^0.33.1",
|
||||
"svelte-loader": "^3.2.0",
|
||||
"svelte-preprocess": "^5.1.3",
|
||||
"ts-jest": "^29.1.1",
|
||||
"typescript": "^5.8.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/analytics": "^0.6.0",
|
||||
"@hcengineering/card": "^0.6.0",
|
||||
"@hcengineering/card-resources": "^0.6.0",
|
||||
"@hcengineering/chat": "^0.6.0",
|
||||
"@hcengineering/core": "^0.6.32",
|
||||
"@hcengineering/contact": "^0.6.24",
|
||||
"@hcengineering/contact-resources": "^0.6.0",
|
||||
"@hcengineering/communication-types": "^0.1.0",
|
||||
"@hcengineering/communication-resources": "^0.6.0",
|
||||
"@hcengineering/home": "^0.6.0",
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/presentation": "^0.6.3",
|
||||
"@hcengineering/ui": "^0.6.15",
|
||||
"@hcengineering/view": "^0.6.13",
|
||||
"@hcengineering/view-resources": "^0.6.0",
|
||||
"@hcengineering/workbench-resources": "^0.6.1",
|
||||
"fast-equals": "^5.2.2",
|
||||
"svelte": "^4.2.19"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
||||
+28
-8
@@ -11,9 +11,9 @@
|
||||
<!-- See the License for the specific language governing permissions and -->
|
||||
<!-- limitations under the License. -->
|
||||
<script lang="ts">
|
||||
import { createQuery } from '@hcengineering/presentation'
|
||||
import { Card } from '@hcengineering/card'
|
||||
import core, { SortingOrder } from '@hcengineering/core'
|
||||
import { createQuery, getClient } from '@hcengineering/presentation'
|
||||
import { Card, type MasterTag } from '@hcengineering/card'
|
||||
import core, { type Ref, SortingOrder } from '@hcengineering/core'
|
||||
import ui, {
|
||||
eventToHTMLElement,
|
||||
IconSettings,
|
||||
@@ -25,14 +25,22 @@
|
||||
showPopup
|
||||
} from '@hcengineering/ui'
|
||||
import { FilterBar, FilterButton } from '@hcengineering/view-resources'
|
||||
import { type IntlString } from '@hcengineering/platform'
|
||||
import { NewCardForm } from '@hcengineering/card-resources'
|
||||
import card from '@hcengineering/card'
|
||||
import chat from '@hcengineering/chat'
|
||||
|
||||
import HomeCardPresenter from './HomeCardPresenter.svelte'
|
||||
import HomeSettings from './HomeSettings.svelte'
|
||||
import NewCardForm from './NewCardForm.svelte'
|
||||
import card from '../plugin'
|
||||
import home from '../plugin'
|
||||
|
||||
const cardsQuery = createQuery()
|
||||
const limitStep = 50
|
||||
const client = getClient()
|
||||
|
||||
export let header: IntlString = home.string.Home
|
||||
export let baseQuery: Record<string, unknown> = {}
|
||||
export let baseClass: Ref<MasterTag> | undefined = undefined
|
||||
|
||||
let divScroll: HTMLDivElement
|
||||
let limit = limitStep
|
||||
@@ -40,9 +48,21 @@
|
||||
let total = -1
|
||||
let isLoading = true
|
||||
let search: string = ''
|
||||
let classQuery: Record<string, unknown> = {}
|
||||
|
||||
// Get descendants for baseClass using model hierarchy
|
||||
$: if (baseClass !== undefined) {
|
||||
const hierarchy = client.getHierarchy()
|
||||
const descendants = hierarchy.getDescendants(baseClass)
|
||||
const allClasses = [baseClass, ...descendants]
|
||||
classQuery = allClasses.length > 1 ? { _class: { $in: allClasses } } : { _class: baseClass }
|
||||
} else {
|
||||
classQuery = {}
|
||||
}
|
||||
|
||||
$: searchQuery = search != null && search.trim() !== '' ? { $search: search } : {}
|
||||
$: resultQuery = { ...searchQuery }
|
||||
$: filterQuery = {}
|
||||
$: resultQuery = { ...baseQuery, ...classQuery, ...searchQuery, ...filterQuery }
|
||||
$: cardsQuery.query(
|
||||
card.class.Card,
|
||||
resultQuery,
|
||||
@@ -113,7 +133,7 @@
|
||||
<div class="home">
|
||||
<div class="header flex-gap-2">
|
||||
<div class="header__title">
|
||||
<Label label={card.string.Home} />
|
||||
<Label label={header} />
|
||||
</div>
|
||||
<div class="flex flex-gap-2">
|
||||
<SearchInput bind:value={search} collapsed />
|
||||
@@ -126,7 +146,7 @@
|
||||
_class={card.class.Card}
|
||||
query={searchQuery}
|
||||
space={undefined}
|
||||
on:change={({ detail }) => (resultQuery = detail)}
|
||||
on:change={({ detail }) => (filterQuery = detail)}
|
||||
/>
|
||||
<NewCardForm />
|
||||
<div class="body flex-gap-2">
|
||||
@@ -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.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { Separator, deviceOptionsStore as deviceInfo } from '@hcengineering/ui'
|
||||
import { onDestroy } from 'svelte'
|
||||
import { getCurrentAccount } from '@hcengineering/core'
|
||||
import view from '@hcengineering/view'
|
||||
import chat from '@hcengineering/chat'
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
|
||||
import Navigator from './Navigator.svelte'
|
||||
import Home from './Home.svelte'
|
||||
import plugin from '../plugin'
|
||||
import { Special } from '../types'
|
||||
|
||||
export let currentSpace: string
|
||||
|
||||
let replacedPanel: HTMLElement
|
||||
$: $deviceInfo.replacedPanel = replacedPanel
|
||||
onDestroy(() => ($deviceInfo.replacedPanel = undefined))
|
||||
|
||||
const myAcc = getCurrentAccount()
|
||||
const client = getClient()
|
||||
const hierarchy = client.getHierarchy()
|
||||
|
||||
const threadClass = hierarchy.getClass(chat.masterTag.Thread)
|
||||
|
||||
const allSection: Special = {
|
||||
_id: 'all',
|
||||
icon: view.icon.List,
|
||||
label: plugin.string.All,
|
||||
baseQuery: {}
|
||||
}
|
||||
|
||||
const specials: Special[] = [
|
||||
allSection,
|
||||
{
|
||||
_id: 'threads',
|
||||
icon: threadClass.icon ?? plugin.icon.Thread,
|
||||
label: plugin.string.Threads,
|
||||
baseQuery: {},
|
||||
baseClass: chat.masterTag.Thread
|
||||
},
|
||||
{
|
||||
_id: 'createdByMe',
|
||||
icon: plugin.icon.Person,
|
||||
label: plugin.string.CreatedByMe,
|
||||
baseQuery: { createdBy: { $in: myAcc.socialIds } }
|
||||
}
|
||||
]
|
||||
|
||||
$: selectedSpecial = specials.find((s) => s._id === currentSpace) ?? allSection
|
||||
</script>
|
||||
|
||||
<div class="hulyPanels-container">
|
||||
{#if $deviceInfo.navigator.visible}
|
||||
<Navigator currentSpace={currentSpace ?? allSection._id} {specials} />
|
||||
<Separator
|
||||
name={'workbench'}
|
||||
float={$deviceInfo.navigator.float}
|
||||
index={0}
|
||||
color={'transparent'}
|
||||
separatorSize={0}
|
||||
short
|
||||
/>
|
||||
{/if}
|
||||
|
||||
<div class="hulyComponent" bind:this={replacedPanel}>
|
||||
<Home
|
||||
baseQuery={selectedSpecial?.baseQuery ?? {}}
|
||||
baseClass={selectedSpecial?.baseClass}
|
||||
header={selectedSpecial?.label}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
+1
-4
@@ -22,12 +22,9 @@
|
||||
import { Button, IconMoreH, tooltip } from '@hcengineering/ui'
|
||||
import { showMenu } from '@hcengineering/view-resources'
|
||||
import { getEmbeddedLabel } from '@hcengineering/platform'
|
||||
import { CardTagsColored, CardPathPresenter, CardTimestamp, openCardInSidebar } from '@hcengineering/card-resources'
|
||||
|
||||
import { isHomeSettingEnabled, compactSettingId, homeSettingsStore, comfortableSettingId2 } from '../home'
|
||||
import { openCardInSidebar } from '../utils'
|
||||
import CardTagsColored from './CardTagsColored.svelte'
|
||||
import CardPathPresenter from './CardPathPresenter.svelte'
|
||||
import CardTimestamp from './CardTimestamp.svelte'
|
||||
import SystemAvatar from '@hcengineering/contact-resources/src/components/SystemAvatar.svelte'
|
||||
|
||||
export let card: WithLookup<Card>
|
||||
+4
-4
@@ -16,7 +16,7 @@
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { createFocusManager, FocusHandler, Label, ListView, ModernToggle, resizeObserver } from '@hcengineering/ui'
|
||||
|
||||
import card from '../plugin'
|
||||
import home from '../plugin'
|
||||
|
||||
import {
|
||||
updateHomeSetting,
|
||||
@@ -35,15 +35,15 @@
|
||||
const items = [
|
||||
{
|
||||
id: compactSettingId,
|
||||
label: card.string.Compact
|
||||
label: home.string.Compact
|
||||
},
|
||||
{
|
||||
id: comfortableSettingId,
|
||||
label: card.string.Comfortable
|
||||
label: home.string.Comfortable
|
||||
},
|
||||
{
|
||||
id: comfortableSettingId2,
|
||||
label: card.string.Comfortable2
|
||||
label: home.string.Comfortable2
|
||||
}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<!--
|
||||
// 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 { homeId } from '@hcengineering/home'
|
||||
import { deviceOptionsStore as deviceInfo, NavItem } from '@hcengineering/ui'
|
||||
import { NavLink } from '@hcengineering/view-resources'
|
||||
import { NavFooter, NavHeader, SavedView } from '@hcengineering/workbench-resources'
|
||||
import plugin from '../plugin'
|
||||
import { Special } from '../types'
|
||||
|
||||
export let currentSpace: string
|
||||
|
||||
export let specials: Special[]
|
||||
|
||||
let menuSelection: boolean = false
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="antiPanel-navigator {$deviceInfo.navigator.direction === 'horizontal' ? 'portrait' : 'landscape'} border-left"
|
||||
class:fly={$deviceInfo.navigator.float}
|
||||
>
|
||||
<div class="antiPanel-wrap__content hulyNavPanel-container">
|
||||
<NavHeader label={plugin.string.Home} />
|
||||
{#each specials as special}
|
||||
<NavLink space={special._id} app={homeId}>
|
||||
<NavItem
|
||||
_id={special._id}
|
||||
label={special.label}
|
||||
icon={special.icon}
|
||||
empty
|
||||
selected={!menuSelection && special._id === currentSpace}
|
||||
/>
|
||||
</NavLink>
|
||||
{/each}
|
||||
|
||||
<SavedView alias={homeId} on:select={(res) => (menuSelection = res.detail)} />
|
||||
|
||||
<div class="mt-2" />
|
||||
|
||||
<NavFooter split />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// 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 HomeApplication from './components/HomeApplication.svelte'
|
||||
|
||||
export default async (): Promise<Resources> => ({
|
||||
component: {
|
||||
HomeApplication
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// 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 home, { homeId } from '@hcengineering/home'
|
||||
import { type IntlString, mergeIds } from '@hcengineering/platform'
|
||||
import type { AnyComponent } from '@hcengineering/ui'
|
||||
|
||||
export default mergeIds(homeId, home, {
|
||||
component: {
|
||||
HomeApplication: '' as AnyComponent
|
||||
},
|
||||
string: {
|
||||
All: '' as IntlString,
|
||||
CreatedByMe: '' as IntlString,
|
||||
Threads: '' as IntlString,
|
||||
Compact: '' as IntlString,
|
||||
Comfortable: '' as IntlString,
|
||||
Comfortable2: '' as IntlString
|
||||
}
|
||||
})
|
||||
@@ -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 { Card, MasterTag } from '@hcengineering/card'
|
||||
import { type DocumentQuery, type Ref } from '@hcengineering/core'
|
||||
import { type IntlString, type Asset } from '@hcengineering/platform'
|
||||
import type { AnySvelteComponent } from '@hcengineering/ui'
|
||||
|
||||
export interface Special {
|
||||
_id: string
|
||||
label: IntlString
|
||||
icon: Asset | AnySvelteComponent
|
||||
baseQuery: DocumentQuery<Card>
|
||||
baseClass?: Ref<MasterTag>
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
const sveltePreprocess = require('svelte-preprocess')
|
||||
|
||||
module.exports = {
|
||||
preprocess: sveltePreprocess()
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/ui/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "lib", "dist", "types", "bundle"]
|
||||
}
|
||||
@@ -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,47 @@
|
||||
{
|
||||
"name": "@hcengineering/home",
|
||||
"version": "0.6.0",
|
||||
"main": "lib/index.js",
|
||||
"svelte": "src/index.ts",
|
||||
"types": "types/index.d.ts",
|
||||
"files": [
|
||||
"lib/**/*",
|
||||
"types/**/*",
|
||||
"tsconfig.json"
|
||||
],
|
||||
"author": "Hardcore Engineering Inc",
|
||||
"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.8.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"
|
||||
},
|
||||
"repository": "https://github.com/hcengineering/platform",
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// 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 { Asset, IntlString, type Plugin, plugin } from '@hcengineering/platform'
|
||||
|
||||
export const homeId = 'home' as Plugin
|
||||
|
||||
const home = plugin(homeId, {
|
||||
string: {
|
||||
Home: '' as IntlString
|
||||
},
|
||||
icon: {
|
||||
Home: '' as Asset,
|
||||
Person: '' as Asset,
|
||||
Thread: '' as Asset
|
||||
}
|
||||
})
|
||||
|
||||
export default home
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/default/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types",
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "lib", "dist", "types", "bundle"]
|
||||
}
|
||||
@@ -2697,6 +2697,26 @@
|
||||
"packageName": "@hcengineering/pod-worker",
|
||||
"projectFolder": "services/worker",
|
||||
"shouldPublish": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/home",
|
||||
"projectFolder": "plugins/home",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/home-assets",
|
||||
"projectFolder": "plugins/home-assets",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/home-resources",
|
||||
"projectFolder": "plugins/home-resources",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/model-home",
|
||||
"projectFolder": "models/home",
|
||||
"shouldPublish": false
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user