mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 11:01:54 +03:00
TSK-1668: Side changes from Surveys (#4271)
Signed-off-by: Petr Vyazovetskiy <develop.pit@gmail.com>
This commit is contained in:
parent
564ad122e1
commit
66a932b2c9
2
.github/pull_request_template.md
vendored
2
.github/pull_request_template.md
vendored
@ -7,7 +7,7 @@
|
||||
* [ ] - UI test added to added/changed functionality?
|
||||
* [ ] - Screenshot is added to PR if applicable ?
|
||||
* [ ] - Does a local formatting is applied (rush format)
|
||||
* [ ] - Does a local svele-check is applied (rush svelte check)
|
||||
* [ ] - Does a local svele-check is applied (rush svelte-check)
|
||||
* [ ] - Does a local UI tests are executed [UI Testing](../tests/readme.md)
|
||||
* [ ] - Does the code work? Check whether function and logic are correct.
|
||||
* [ ] - Does Changelog.md is updated with changes?
|
||||
|
@ -320,9 +320,6 @@ dependencies:
|
||||
'@rush-temp/model-support':
|
||||
specifier: file:./projects/model-support.tgz
|
||||
version: file:projects/model-support.tgz(svelte@4.2.5)(typescript@5.2.2)
|
||||
'@rush-temp/model-survey':
|
||||
specifier: file:./projects/model-survey.tgz
|
||||
version: file:projects/model-survey.tgz(svelte@4.2.5)(typescript@5.2.2)
|
||||
'@rush-temp/model-tags':
|
||||
specifier: file:./projects/model-tags.tgz
|
||||
version: file:projects/model-tags.tgz(svelte@4.2.5)(typescript@5.2.2)
|
||||
@ -575,15 +572,6 @@ dependencies:
|
||||
'@rush-temp/support-resources':
|
||||
specifier: file:./projects/support-resources.tgz
|
||||
version: file:projects/support-resources.tgz(@types/node@16.11.68)(esbuild@0.16.17)(postcss-load-config@4.0.1)(postcss@8.4.31)(ts-node@10.9.1)
|
||||
'@rush-temp/survey':
|
||||
specifier: file:./projects/survey.tgz
|
||||
version: file:projects/survey.tgz(@types/node@16.11.68)(esbuild@0.16.17)(svelte@4.2.5)(ts-node@10.9.1)(typescript@5.2.2)
|
||||
'@rush-temp/survey-assets':
|
||||
specifier: file:./projects/survey-assets.tgz
|
||||
version: file:projects/survey-assets.tgz(esbuild@0.16.17)(svelte@4.2.5)(ts-node@10.9.1)(typescript@5.2.2)
|
||||
'@rush-temp/survey-resources':
|
||||
specifier: file:./projects/survey-resources.tgz
|
||||
version: file:projects/survey-resources.tgz(@types/node@16.11.68)(esbuild@0.16.17)(postcss-load-config@4.0.1)(postcss@8.4.31)(svelte@4.2.5)(ts-node@10.9.1)(typescript@5.2.2)
|
||||
'@rush-temp/tags':
|
||||
specifier: file:./projects/tags.tgz
|
||||
version: file:projects/tags.tgz(@types/node@16.11.68)(esbuild@0.16.17)(ts-node@10.9.1)
|
||||
@ -815,6 +803,9 @@ dependencies:
|
||||
'@types/minio':
|
||||
specifier: ~7.0.11
|
||||
version: 7.0.18
|
||||
'@types/morgan':
|
||||
specifier: ~1.9.9
|
||||
version: 1.9.9
|
||||
'@types/node':
|
||||
specifier: ~16.11.12
|
||||
version: 16.11.68
|
||||
@ -18181,7 +18172,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/collaborator.tgz(@tiptap/pm@2.1.12)(bufferutil@4.0.7)(prosemirror-model@1.19.3)(svelte@4.2.5):
|
||||
resolution: {integrity: sha512-37tcslNB1OuZncrABis1O54JHogvoU8oT3FYo91epmBvzoriNrS6wYuV2Odc+UI4frX6bZGQJEIYxmNYLNMajQ==, tarball: file:projects/collaborator.tgz}
|
||||
resolution: {integrity: sha512-2XPuNVr/ULt0jAfZ0yWSZqiQy+O/kRETpI25a2LfbVAp1MQF9+4wqRV31wwGKV/I7j6oVaF+kDOT7k7vMVYSkg==, tarball: file:projects/collaborator.tgz}
|
||||
id: file:projects/collaborator.tgz
|
||||
name: '@rush-temp/collaborator'
|
||||
version: 0.0.0
|
||||
@ -19496,7 +19487,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/model-all.tgz(svelte@4.2.5)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-bqRngFhfXoPedb0IMaXya9LnZ5agvGBsd49EUmpJuM/BWIDMW8Oj4iU2fnkTVYQEiBsprhXX1POk4chGR6dHvA==, tarball: file:projects/model-all.tgz}
|
||||
resolution: {integrity: sha512-PEl4zAGjvSsQ5stSRUuj2PYcZ0BdWTkxyaJNP63dbX4U6QA5sf7BuXamJRgETTD74jA40pGRXUAMnprS6t9z4w==, tarball: file:projects/model-all.tgz}
|
||||
id: file:projects/model-all.tgz
|
||||
name: '@rush-temp/model-all'
|
||||
version: 0.0.0
|
||||
@ -20342,27 +20333,6 @@ packages:
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
file:projects/model-survey.tgz(svelte@4.2.5)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-HqvLuhQJO8PpOeuDEPr7dcrxA2xZKXp7FLIwdckKONYx506mZVzErCiU3eXy3M4YyLXIQCTy272vnxJZnemJTw==, tarball: file:projects/model-survey.tgz}
|
||||
id: file:projects/model-survey.tgz
|
||||
name: '@rush-temp/model-survey'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.54.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/parser': 6.11.0(eslint@8.54.0)(typescript@5.2.2)
|
||||
eslint: 8.54.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint-plugin-import@2.28.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.54.0)(typescript@5.2.2)
|
||||
eslint-plugin-import: 2.28.1(eslint@8.54.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.54.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.54.0)
|
||||
prettier: 3.1.0
|
||||
prettier-plugin-svelte: 3.1.0(prettier@3.1.0)(svelte@4.2.5)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- svelte
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
file:projects/model-tags.tgz(svelte@4.2.5)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-8IMdeZBRZMTuVzzAMB3RVNm/XumQTKt+2mzeMjD5wF2YadXreHf95rLtYAR2URnToZPO0BS74KGR6+toixYVUw==, tarball: file:projects/model-tags.tgz}
|
||||
id: file:projects/model-tags.tgz
|
||||
@ -21026,7 +20996,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/pod-server.tgz(svelte@4.2.5):
|
||||
resolution: {integrity: sha512-P3qTbPOzsBBFCp/JsSNERRx6ITah+3bfpBDqPgP4dzydWPEcbW9AALPYjrYviv/GRZuFzgcBu32ZxrUMCZ6DwA==, tarball: file:projects/pod-server.tgz}
|
||||
resolution: {integrity: sha512-7Griqc83Xh/jubUWlO8qA+Cx1+2pjzZgouGteeQZXfCokol6X813h3O5vkKO3fenjg6doFII5zI+DJx1R4jBnQ==, tarball: file:projects/pod-server.tgz}
|
||||
id: file:projects/pod-server.tgz
|
||||
name: '@rush-temp/pod-server'
|
||||
version: 0.0.0
|
||||
@ -21174,7 +21144,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/prod.tgz(bufferutil@4.0.7)(esbuild@0.16.17)(sass@1.69.0)(ts-node@10.9.1)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-RpgrKzlPUDZ5L+pT2NPQmXxUomiw84N6898NdEYNbbXERliDL6II+7Qw9LwoEBHtVDChgnU8ez+5WcuknHrjlw==, tarball: file:projects/prod.tgz}
|
||||
resolution: {integrity: sha512-AMQUJ8O71HSvI9iGDSj/32iyRs75Qepku6ir0Xq6n2/IwVW4BE3n0Fzhh5tfFTsbPtjL2p4qcA0mmJ0zg28D+g==, tarball: file:projects/prod.tgz}
|
||||
id: file:projects/prod.tgz
|
||||
name: '@rush-temp/prod'
|
||||
version: 0.0.0
|
||||
@ -23217,115 +23187,6 @@ packages:
|
||||
- ts-node
|
||||
dev: false
|
||||
|
||||
file:projects/survey-assets.tgz(esbuild@0.16.17)(svelte@4.2.5)(ts-node@10.9.1)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-KqJbIkEBJ7f4dqGEd1ztPbMCP6l6l+wdYOTr83WN37YOUj8ucMuTcDWcZv1aCMZl/T/C6EUIDf5TgYvl1CHjcw==, tarball: file:projects/survey-assets.tgz}
|
||||
id: file:projects/survey-assets.tgz
|
||||
name: '@rush-temp/survey-assets'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@types/jest': 29.5.5
|
||||
'@types/node': 16.11.68
|
||||
'@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.54.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/parser': 6.11.0(eslint@8.54.0)(typescript@5.2.2)
|
||||
eslint: 8.54.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint-plugin-import@2.28.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.54.0)(typescript@5.2.2)
|
||||
eslint-plugin-import: 2.28.1(eslint@8.54.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.54.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.54.0)
|
||||
jest: 29.7.0(@types/node@16.11.68)(ts-node@10.9.1)
|
||||
prettier: 3.1.0
|
||||
prettier-plugin-svelte: 3.1.0(prettier@3.1.0)(svelte@4.2.5)
|
||||
ts-jest: 29.1.1(esbuild@0.16.17)(jest@29.7.0)(typescript@5.2.2)
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- esbuild
|
||||
- node-notifier
|
||||
- supports-color
|
||||
- svelte
|
||||
- ts-node
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
file:projects/survey-resources.tgz(@types/node@16.11.68)(esbuild@0.16.17)(postcss-load-config@4.0.1)(postcss@8.4.31)(svelte@4.2.5)(ts-node@10.9.1)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-S4t+6+J3q1YibQwIzBOYpeWlSPTiFyvVhnhw07Eqnxy1z3ADHLlHpsxCXUI+zQQQzzo9zvGLRoK1hSYmtcPGfA==, tarball: file:projects/survey-resources.tgz}
|
||||
id: file:projects/survey-resources.tgz
|
||||
name: '@rush-temp/survey-resources'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@types/jest': 29.5.5
|
||||
'@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.54.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/parser': 6.11.0(eslint@8.54.0)(typescript@5.2.2)
|
||||
eslint: 8.54.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint-plugin-import@2.28.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.54.0)(typescript@5.2.2)
|
||||
eslint-plugin-import: 2.28.1(eslint@8.54.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.54.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.54.0)
|
||||
eslint-plugin-svelte: 2.35.0(eslint@8.54.0)(svelte@4.2.5)(ts-node@10.9.1)
|
||||
jest: 29.7.0(@types/node@16.11.68)(ts-node@10.9.1)
|
||||
prettier: 3.1.0
|
||||
prettier-plugin-svelte: 3.1.0(prettier@3.1.0)(svelte@4.2.5)
|
||||
sass: 1.69.0
|
||||
svelte-check: 3.6.0(postcss-load-config@4.0.1)(postcss@8.4.31)(sass@1.69.0)(svelte@4.2.5)
|
||||
svelte-eslint-parser: 0.33.1(svelte@4.2.5)
|
||||
svelte-loader: 3.1.9(svelte@4.2.5)
|
||||
svelte-preprocess: 5.1.0(postcss-load-config@4.0.1)(postcss@8.4.31)(sass@1.69.0)(svelte@4.2.5)(typescript@5.2.2)
|
||||
ts-jest: 29.1.1(esbuild@0.16.17)(jest@29.7.0)(typescript@5.2.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
|
||||
- svelte
|
||||
- ts-node
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
file:projects/survey.tgz(@types/node@16.11.68)(esbuild@0.16.17)(svelte@4.2.5)(ts-node@10.9.1)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-VQ5Ne0MuO8zCvfvMqROddHTfinHEmiybMnz3XM/YfxOTxU1RRwZDGSoaixBU/tK98BURHp+NDnCiD5X3Q48DtQ==, tarball: file:projects/survey.tgz}
|
||||
id: file:projects/survey.tgz
|
||||
name: '@rush-temp/survey'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@types/jest': 29.5.5
|
||||
'@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.54.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/parser': 6.11.0(eslint@8.54.0)(typescript@5.2.2)
|
||||
eslint: 8.54.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint-plugin-import@2.28.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.54.0)(typescript@5.2.2)
|
||||
eslint-plugin-import: 2.28.1(eslint@8.54.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.54.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.54.0)
|
||||
jest: 29.7.0(@types/node@16.11.68)(ts-node@10.9.1)
|
||||
prettier: 3.1.0
|
||||
prettier-plugin-svelte: 3.1.0(prettier@3.1.0)(svelte@4.2.5)
|
||||
ts-jest: 29.1.1(esbuild@0.16.17)(jest@29.7.0)(typescript@5.2.2)
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- '@types/node'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- esbuild
|
||||
- node-notifier
|
||||
- supports-color
|
||||
- svelte
|
||||
- ts-node
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
file:projects/tags-assets.tgz(esbuild@0.16.17)(svelte@4.2.5)(ts-node@10.9.1):
|
||||
resolution: {integrity: sha512-NCYX/a34eY06sVmEOY/3q/G+CSERAcTCcz/HekWWuNw9AUCN5swZI++T+OXSsl+82vaEd08Qg6pz8G2Onh6msw==, tarball: file:projects/tags-assets.tgz}
|
||||
id: file:projects/tags-assets.tgz
|
||||
@ -23795,7 +23656,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/text-editor.tgz(@types/node@16.11.68)(bufferutil@4.0.7)(esbuild@0.16.17)(postcss-load-config@4.0.1)(postcss@8.4.31)(prosemirror-model@1.19.3)(ts-node@10.9.1):
|
||||
resolution: {integrity: sha512-42rs06vaqb/uM49NzAf4ggZxatYbBqfT2Qy0rZLsK72tSUAxZC86E97pxUjYaLKguUoAGkou/bQf2iOFySZQwA==, tarball: file:projects/text-editor.tgz}
|
||||
resolution: {integrity: sha512-s3a0AnlJS8WBnLjA5ggHaLcbSh9tT9DA6Szy9wYWGJzt9R82/nfhh4qMOLWbvHbTgOu/ieWGrhG2FpWAzHSwzw==, tarball: file:projects/text-editor.tgz}
|
||||
id: file:projects/text-editor.tgz
|
||||
name: '@rush-temp/text-editor'
|
||||
version: 0.0.0
|
||||
|
@ -161,9 +161,6 @@
|
||||
"@hcengineering/support": "^0.6.1",
|
||||
"@hcengineering/support-assets": "^0.6.1",
|
||||
"@hcengineering/support-resources": "^0.6.0",
|
||||
"@hcengineering/survey": "^0.6.0",
|
||||
"@hcengineering/survey-assets": "^0.6.0",
|
||||
"@hcengineering/survey-resources": "^0.6.0",
|
||||
"@hcengineering/request": "^0.6.6",
|
||||
"@hcengineering/request-assets": "^0.6.0",
|
||||
"@hcengineering/request-resources": "^0.6.0",
|
||||
|
@ -34,7 +34,6 @@ import rekoni from '@hcengineering/rekoni'
|
||||
import { requestId } from '@hcengineering/request'
|
||||
import { settingId } from '@hcengineering/setting'
|
||||
import { supportId } from '@hcengineering/support'
|
||||
import { surveyId } from '@hcengineering/survey'
|
||||
import { tagsId } from '@hcengineering/tags'
|
||||
import { taskId } from '@hcengineering/task'
|
||||
import telegram, { telegramId } from '@hcengineering/telegram'
|
||||
@ -64,7 +63,6 @@ import '@hcengineering/recruit-assets'
|
||||
import '@hcengineering/request-assets'
|
||||
import '@hcengineering/setting-assets'
|
||||
import '@hcengineering/support-assets'
|
||||
import '@hcengineering/survey-assets'
|
||||
import '@hcengineering/tags-assets'
|
||||
import '@hcengineering/task-assets'
|
||||
import '@hcengineering/telegram-assets'
|
||||
@ -123,7 +121,6 @@ function configureI18n(): void {
|
||||
addStringsLoader(requestId, async (lang: string) => await import(`@hcengineering/request-assets/lang/${lang}.json`))
|
||||
addStringsLoader(settingId, async (lang: string) => await import(`@hcengineering/setting-assets/lang/${lang}.json`))
|
||||
addStringsLoader(supportId, async (lang: string) => await import(`@hcengineering/support-assets/lang/${lang}.json`))
|
||||
addStringsLoader(surveyId, async (lang: string) => await import(`@hcengineering/survey-assets/lang/${lang}.json`))
|
||||
addStringsLoader(tagsId, async (lang: string) => await import(`@hcengineering/tags-assets/lang/${lang}.json`))
|
||||
addStringsLoader(taskId, async (lang: string) => await import(`@hcengineering/task-assets/lang/${lang}.json`))
|
||||
addStringsLoader(telegramId, async (lang: string) => await import(`@hcengineering/telegram-assets/lang/${lang}.json`))
|
||||
@ -200,7 +197,6 @@ export async function configurePlatform() {
|
||||
addLocation(bitrixId, () => import(/* webpackChunkName: "bitrix" */ '@hcengineering/bitrix-resources'))
|
||||
addLocation(requestId, () => import(/* webpackChunkName: "request" */ '@hcengineering/request-resources'))
|
||||
addLocation(supportId, () => import(/* webpackChunkName: "support" */ '@hcengineering/support-resources'))
|
||||
addLocation(surveyId, () => import(/* webpackChunkName: "support" */ '@hcengineering/survey-resources'))
|
||||
|
||||
setMetadata(client.metadata.FilterModel, true)
|
||||
setMetadata(client.metadata.ExtraPlugins, ['preference' as Plugin])
|
||||
|
@ -120,7 +120,7 @@ export function devTool (
|
||||
|
||||
program.version('0.0.1')
|
||||
|
||||
// create-user john.appleseed@gmail.com --password 123 --workspace workspace --fullname "John Appleseed"
|
||||
// create-account john.appleseed@gmail.com --password 123 --workspace workspace --fullname "John Appleseed"
|
||||
program
|
||||
.command('create-account <email>')
|
||||
.description('create user and corresponding account in master database')
|
||||
@ -476,7 +476,7 @@ export function devTool (
|
||||
|
||||
program
|
||||
.command('clean-workspace <workspace>')
|
||||
.description('set user role')
|
||||
.description('clean workspace')
|
||||
.option('--recruit', 'Clean recruit', false)
|
||||
.option('--tracker', 'Clean tracker', false)
|
||||
.option('--removedTx', 'Clean removed transactions', false)
|
||||
@ -501,7 +501,7 @@ export function devTool (
|
||||
|
||||
program
|
||||
.command('clean-removed-transactions <workspace>')
|
||||
.description('set user role')
|
||||
.description('clean removed transactions')
|
||||
.action(async (workspace: string, cmd: any) => {
|
||||
await cleanRemovedTransactions(getWorkspaceId(workspace, productId), transactorUrl)
|
||||
})
|
||||
|
@ -103,7 +103,7 @@ export class TActivityMessage extends TAttachedDoc implements ActivityMessage {
|
||||
reactions?: number
|
||||
}
|
||||
|
||||
@Model(activity.class.DocUpdateMessage, activity.class.ActivityMessage, DOMAIN_ACTIVITY)
|
||||
@Model(activity.class.DocUpdateMessage, activity.class.ActivityMessage)
|
||||
export class TDocUpdateMessage extends TActivityMessage implements DocUpdateMessage {
|
||||
@Prop(TypeRef(core.class.Doc), core.string.Object)
|
||||
@Index(IndexKind.Indexed)
|
||||
@ -122,7 +122,7 @@ export class TDocUpdateMessage extends TActivityMessage implements DocUpdateMess
|
||||
attributeUpdates?: DocAttributeUpdates
|
||||
}
|
||||
|
||||
@Model(activity.class.ActivityInfoMessage, activity.class.ActivityMessage, DOMAIN_ACTIVITY)
|
||||
@Model(activity.class.ActivityInfoMessage, activity.class.ActivityMessage)
|
||||
export class TActivityInfoMessage extends TActivityMessage implements ActivityInfoMessage {
|
||||
@Prop(TypeIntlString(), activity.string.Update)
|
||||
message!: IntlString
|
||||
|
@ -80,7 +80,6 @@
|
||||
"@hcengineering/model-server-activity": "^0.6.0",
|
||||
"@hcengineering/model-server-openai": "^0.6.0",
|
||||
"@hcengineering/model-server-translate": "^0.6.0",
|
||||
"@hcengineering/model-support": "^0.6.0",
|
||||
"@hcengineering/model-survey": "^0.6.0"
|
||||
"@hcengineering/model-support": "^0.6.0"
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,6 @@ import { taskId, createModel as taskModel } from '@hcengineering/model-task'
|
||||
import telegram, { telegramId, createModel as telegramModel } from '@hcengineering/model-telegram'
|
||||
import { templatesId, createModel as templatesModel } from '@hcengineering/model-templates'
|
||||
import { textEditorId, createModel as textEditorModel } from '@hcengineering/model-text-editor'
|
||||
import survey, { surveyId, createModel as surveyModel } from '@hcengineering/model-survey'
|
||||
import tracker, { trackerId, createModel as trackerModel } from '@hcengineering/model-tracker'
|
||||
import view, { viewId, createModel as viewModel } from '@hcengineering/model-view'
|
||||
import workbench, { workbenchId, createModel as workbenchModel } from '@hcengineering/model-workbench'
|
||||
@ -254,25 +253,14 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
requestModel,
|
||||
requestId,
|
||||
{
|
||||
label: survey.string.ConfigLabel,
|
||||
description: survey.string.ConfigDescription,
|
||||
// request: request.string.ConfigLabel,
|
||||
// request: request.string.ConfigDescription,
|
||||
enabled: false,
|
||||
beta: true,
|
||||
icon: survey.icon.SurveyApplication,
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[supportModel, supportId],
|
||||
[
|
||||
surveyModel,
|
||||
surveyId,
|
||||
{
|
||||
// TODO: icon, label, description?
|
||||
enabled: true,
|
||||
beta: true,
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
|
||||
[serverCoreModel, serverCoreId],
|
||||
[serverAttachmentModel, serverAttachmentId],
|
||||
|
@ -19,7 +19,7 @@ import bitrix from '@hcengineering/bitrix-resources/src/plugin'
|
||||
import { type IntlString, mergeIds } from '@hcengineering/platform'
|
||||
import { type Action } from '@hcengineering/view'
|
||||
|
||||
import { type Ref } from '@hcengineering/core'
|
||||
import { type Doc, type Ref } from '@hcengineering/core'
|
||||
import type { AnyComponent } from '@hcengineering/ui/src/types'
|
||||
|
||||
export default mergeIds(bitrixId, bitrix, {
|
||||
@ -34,6 +34,6 @@ export default mergeIds(bitrixId, bitrix, {
|
||||
ConfigDescription: '' as IntlString
|
||||
},
|
||||
action: {
|
||||
BitrixImport: '' as Ref<Action>
|
||||
BitrixImport: '' as Ref<Action<Doc, any>>
|
||||
}
|
||||
})
|
||||
|
@ -41,9 +41,9 @@ export default mergeIds(chunterId, chunter, {
|
||||
ArchiveChannel: '' as Ref<Action>,
|
||||
UnarchiveChannel: '' as Ref<Action>,
|
||||
ConvertToPrivate: '' as Ref<Action>,
|
||||
CopyCommentLink: '' as Ref<Action>,
|
||||
CopyThreadMessageLink: '' as Ref<Action>,
|
||||
CopyMessageLink: '' as Ref<Action>
|
||||
CopyCommentLink: '' as Ref<Action<Doc, any>>,
|
||||
CopyThreadMessageLink: '' as Ref<Action<Doc, any>>,
|
||||
CopyMessageLink: '' as Ref<Action<Doc, any>>
|
||||
},
|
||||
actionImpl: {
|
||||
MarkUnread: '' as ViewAction,
|
||||
|
@ -121,7 +121,7 @@ export default mergeIds(contactId, contact, {
|
||||
action: {
|
||||
KickEmployee: '' as Ref<Action>,
|
||||
DeleteEmployee: '' as Ref<Action>,
|
||||
MergePersons: '' as Ref<Action>
|
||||
MergePersons: '' as Ref<Action<Doc, any>>
|
||||
},
|
||||
actionImpl: {
|
||||
KickEmployee: '' as ViewAction,
|
||||
|
@ -25,7 +25,7 @@ import { type NotificationGroup } from '@hcengineering/notification'
|
||||
|
||||
export default mergeIds(gmailId, gmail, {
|
||||
action: {
|
||||
WriteEmail: '' as Ref<Action>
|
||||
WriteEmail: '' as Ref<Action<Doc, any>>
|
||||
},
|
||||
string: {
|
||||
MessageID: '' as IntlString,
|
||||
|
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { type Ref } from '@hcengineering/core'
|
||||
import { type Doc, type Ref } from '@hcengineering/core'
|
||||
import { hrId } from '@hcengineering/hr'
|
||||
import hr from '@hcengineering/hr-resources/src/plugin'
|
||||
import { type NotificationGroup } from '@hcengineering/notification'
|
||||
@ -55,7 +55,7 @@ export default mergeIds(hrId, hr, {
|
||||
HR: '' as Ref<ActionCategory>
|
||||
},
|
||||
action: {
|
||||
CreateDepartment: '' as Ref<Action>,
|
||||
CreateDepartment: '' as Ref<Action<Doc, any>>,
|
||||
EditDepartment: '' as Ref<Action>,
|
||||
ArchiveDepartment: '' as Ref<Action>,
|
||||
EditRequest: '' as Ref<Action>,
|
||||
|
@ -15,7 +15,7 @@
|
||||
//
|
||||
|
||||
import { type ChatMessageViewlet } from '@hcengineering/chunter'
|
||||
import type { Ref } from '@hcengineering/core'
|
||||
import type { Doc, Ref } from '@hcengineering/core'
|
||||
import { type Funnel, leadId } from '@hcengineering/lead'
|
||||
import lead from '@hcengineering/lead-resources/src/plugin'
|
||||
import { type NotificationGroup, type NotificationType } from '@hcengineering/notification'
|
||||
@ -63,7 +63,7 @@ export default mergeIds(leadId, lead, {
|
||||
},
|
||||
action: {
|
||||
EditStatuses: '' as Ref<Action>,
|
||||
CreateGlobalLead: '' as Ref<Action>
|
||||
CreateGlobalLead: '' as Ref<Action<Doc, any>>
|
||||
},
|
||||
ids: {
|
||||
LeadNotificationGroup: '' as Ref<NotificationGroup>,
|
||||
|
@ -28,12 +28,12 @@ import { type ChatMessageViewlet } from '@hcengineering/chunter'
|
||||
export default mergeIds(recruitId, recruit, {
|
||||
action: {
|
||||
CreateOpinion: '' as Ref<Action>,
|
||||
CreateGlobalApplication: '' as Ref<Action>,
|
||||
CopyApplicationId: '' as Ref<Action>,
|
||||
CopyApplicationLink: '' as Ref<Action>,
|
||||
CopyCandidateLink: '' as Ref<Action>,
|
||||
CreateGlobalApplication: '' as Ref<Action<Doc, any>>,
|
||||
CopyApplicationId: '' as Ref<Action<Doc, any>>,
|
||||
CopyApplicationLink: '' as Ref<Action<Doc, any>>,
|
||||
CopyCandidateLink: '' as Ref<Action<Doc, any>>,
|
||||
MoveApplicant: '' as Ref<Action>,
|
||||
GetTalentIds: '' as Ref<Action>,
|
||||
GetTalentIds: '' as Ref<Action<Doc, any>>,
|
||||
EditStatuses: '' as Ref<Action>
|
||||
},
|
||||
actionImpl: {
|
||||
|
@ -1,7 +0,0 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/model/eslint.config.json'],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig",
|
||||
"rigProfile": "model"
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
{
|
||||
"name": "@hcengineering/model-survey",
|
||||
"version": "0.6.0",
|
||||
"main": "lib/index.js",
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build:watch": "tsc",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"lint": "eslint src",
|
||||
"format": "format src"
|
||||
},
|
||||
"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",
|
||||
"prettier-plugin-svelte": "^3.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/core": "^0.6.28",
|
||||
"@hcengineering/model": "^0.6.7",
|
||||
"@hcengineering/model-core": "^0.6.0",
|
||||
"@hcengineering/model-workbench": "^0.6.1",
|
||||
"@hcengineering/platform": "^0.6.9",
|
||||
"@hcengineering/survey": "^0.6.0",
|
||||
"@hcengineering/survey-resources": "^0.6.0",
|
||||
"@hcengineering/ui": "^0.6.11",
|
||||
"@hcengineering/view": "^0.6.9",
|
||||
"@hcengineering/workbench": "^0.6.9"
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
//
|
||||
// Copyright © 2023 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 { surveyId } from '@hcengineering/survey'
|
||||
import survey from './plugin'
|
||||
|
||||
export { surveyId } from '@hcengineering/survey'
|
||||
export { default } from './plugin'
|
||||
|
||||
export function createModel (builder: Builder): void {
|
||||
builder.createDoc(
|
||||
workbench.class.Application,
|
||||
core.space.Model,
|
||||
{
|
||||
label: survey.string.SurveyApplication,
|
||||
icon: survey.icon.SurveyApplication,
|
||||
alias: surveyId,
|
||||
hidden: false
|
||||
},
|
||||
survey.app.Survey
|
||||
)
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
//
|
||||
// Copyright © 2023 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 { surveyId } from '@hcengineering/survey'
|
||||
import survey from '@hcengineering/survey-resources/src/plugin'
|
||||
import { type Ref } from '@hcengineering/core'
|
||||
import { type Application } from '@hcengineering/workbench'
|
||||
|
||||
export default mergeIds(surveyId, survey, {
|
||||
app: {
|
||||
Survey: '' as Ref<Application>
|
||||
}
|
||||
})
|
@ -1,18 +0,0 @@
|
||||
//
|
||||
// Copyright © 2023 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 Domain } from '@hcengineering/core'
|
||||
|
||||
export const DOMAIN_SURVEY = 'survey' as Domain
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/model/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { type Ref } from '@hcengineering/core'
|
||||
import { type Doc, type Ref } from '@hcengineering/core'
|
||||
import { type IntlString, mergeIds, type Resource } from '@hcengineering/platform'
|
||||
import { type SettingsCategory } from '@hcengineering/setting'
|
||||
import { templatesId } from '@hcengineering/templates'
|
||||
@ -35,9 +35,9 @@ export default mergeIds(templatesId, templates, {
|
||||
EditGroup: '' as AnyComponent
|
||||
},
|
||||
action: {
|
||||
Copy: '' as Ref<Action>,
|
||||
Move: '' as Ref<Action>,
|
||||
EditGroup: '' as Ref<Action>,
|
||||
Copy: '' as Ref<Action<Doc, any>>,
|
||||
Move: '' as Ref<Action<Doc, any>>,
|
||||
EditGroup: '' as Ref<Action<Doc, any>>,
|
||||
ShowTemplates: '' as Resource<RefInputAction>
|
||||
},
|
||||
category: {
|
||||
|
@ -104,7 +104,7 @@ export default mergeIds(trackerId, tracker, {
|
||||
DeleteMilestone: '' as ViewAction
|
||||
},
|
||||
action: {
|
||||
NewRelatedIssue: '' as Ref<Action<Doc, Record<string, any>>>,
|
||||
NewRelatedIssue: '' as Ref<Action<Doc, any>>,
|
||||
DeleteMilestone: '' as Ref<Action<Doc, Record<string, any>>>,
|
||||
DeleteProject: '' as Ref<Action<Doc, Record<string, any>>>,
|
||||
DeleteProjectClean: '' as Ref<Action<Doc, Record<string, any>>>,
|
||||
|
@ -99,10 +99,10 @@ export const DOMAIN_VIEW = 'view' as Domain
|
||||
export function createAction<T extends Doc = Doc, P = Record<string, any>> (
|
||||
builder: Builder,
|
||||
data: Data<Action<T, P>>,
|
||||
id?: Ref<Action>
|
||||
id?: Ref<Action<T, P>>
|
||||
): void {
|
||||
const { label, ...adata } = data as Data<Action>
|
||||
builder.createDoc(view.class.Action, core.space.Model, { label, ...adata }, id)
|
||||
const { label, ...adata } = data
|
||||
builder.createDoc<Action<T, P>>(view.class.Action, core.space.Model, { label, ...adata }, id)
|
||||
}
|
||||
|
||||
export function classPresenter (
|
||||
|
@ -18,7 +18,7 @@
|
||||
"Markup": "Разметка",
|
||||
"Number": "Число",
|
||||
"Boolean": "Логическое",
|
||||
"Timestamp": "Времянная отметка",
|
||||
"Timestamp": "Временная отметка",
|
||||
"Date": "Дата",
|
||||
"IntlString": "Интернационализированная строка",
|
||||
"Ref": "Ссылка",
|
||||
|
@ -56,9 +56,9 @@ export interface Obj {
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface Doc extends Obj {
|
||||
export interface Doc<S extends Space = Space> extends Obj {
|
||||
_id: Ref<this>
|
||||
space: Ref<Space>
|
||||
space: Ref<S>
|
||||
modifiedOn: Timestamp
|
||||
modifiedBy: Ref<Account>
|
||||
createdBy?: Ref<Account> // Marked as optional since it will be filled by platform.
|
||||
@ -83,10 +83,14 @@ export interface UXObject extends Obj {
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface AttachedDoc extends Doc {
|
||||
attachedTo: Ref<Doc>
|
||||
attachedToClass: Ref<Class<Doc>>
|
||||
collection: string
|
||||
export interface AttachedDoc<
|
||||
Parent extends Doc = Doc,
|
||||
Collection extends Extract<keyof Parent, string> | string = Extract<keyof Parent, string> | string,
|
||||
S extends Space = Space
|
||||
> extends Doc<S> {
|
||||
attachedTo: Ref<Parent>
|
||||
attachedToClass: Ref<Class<Parent>>
|
||||
collection: Collection
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -143,7 +143,7 @@ export class Hierarchy {
|
||||
return result
|
||||
}
|
||||
|
||||
getClass (_class: Ref<Class<Obj>>): Class<Obj> {
|
||||
getClass<T extends Obj = Obj>(_class: Ref<Class<T>>): Class<T> {
|
||||
const data = this.classifiers.get(_class)
|
||||
if (data === undefined || this.isInterface(data)) {
|
||||
throw new Error('class not found: ' + _class)
|
||||
@ -151,7 +151,7 @@ export class Hierarchy {
|
||||
return data
|
||||
}
|
||||
|
||||
hasClass (_class: Ref<Class<Obj>>): boolean {
|
||||
hasClass<T extends Obj = Obj>(_class: Ref<Class<T>>): boolean {
|
||||
const data = this.classifiers.get(_class)
|
||||
|
||||
return !(data === undefined || this.isInterface(data))
|
||||
@ -272,7 +272,7 @@ export class Hierarchy {
|
||||
|
||||
/**
|
||||
* Check if passed _class is derived from `from` class.
|
||||
* It will iterave over parents.
|
||||
* It will iterate over parents.
|
||||
*/
|
||||
isDerived<T extends Obj>(_class: Ref<Class<T>>, from: Ref<Class<T>>): boolean {
|
||||
let cl: Ref<Class<T>> | undefined = _class
|
||||
@ -289,7 +289,7 @@ export class Hierarchy {
|
||||
getBaseClass<T extends Doc>(_class: Ref<Mixin<T>>): Ref<Class<T>> {
|
||||
let cl: Ref<Class<T>> | undefined = _class
|
||||
while (cl !== undefined) {
|
||||
const clz = this.getClass(cl)
|
||||
const clz: Class<T> = this.getClass(cl)
|
||||
if (this.isClass(clz)) return cl
|
||||
cl = clz.extends
|
||||
}
|
||||
@ -298,12 +298,12 @@ export class Hierarchy {
|
||||
|
||||
/**
|
||||
* Check if passed _class implements passed interfaces `from`.
|
||||
* It will check for class parents and they interfaces.
|
||||
* It will check for class parents and their interfaces.
|
||||
*/
|
||||
isImplements<T extends Doc>(_class: Ref<Class<T>>, from: Ref<Interface<T>>): boolean {
|
||||
let cl: Ref<Class<T>> | undefined = _class
|
||||
while (cl !== undefined) {
|
||||
const klazz = this.getClass(cl)
|
||||
const klazz: Class<T> = this.getClass(cl)
|
||||
if (this.isExtends(klazz.implements ?? [], from)) {
|
||||
return true
|
||||
}
|
||||
@ -313,7 +313,7 @@ export class Hierarchy {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if interface is extends passed interface.
|
||||
* Check if interface extends passed interface.
|
||||
*/
|
||||
private isExtends<T extends Doc>(extendsOrImplements: Ref<Interface<Doc>>[], from: Ref<Interface<T>>): boolean {
|
||||
const result: Ref<Interface<Doc>>[] = []
|
||||
|
@ -103,7 +103,7 @@ export class TxOperations implements Omit<Client, 'notify'> {
|
||||
space: Ref<Space>,
|
||||
attachedTo: Ref<T>,
|
||||
attachedToClass: Ref<Class<T>>,
|
||||
collection: string,
|
||||
collection: Extract<keyof T, string> | string,
|
||||
attributes: AttachedData<P>,
|
||||
id?: Ref<P>,
|
||||
modifiedOn?: Timestamp,
|
||||
@ -128,7 +128,7 @@ export class TxOperations implements Omit<Client, 'notify'> {
|
||||
objectId: Ref<P>,
|
||||
attachedTo: Ref<T>,
|
||||
attachedToClass: Ref<Class<T>>,
|
||||
collection: string,
|
||||
collection: Extract<keyof T, string> | string,
|
||||
operations: DocumentUpdate<P>,
|
||||
retrieve?: boolean,
|
||||
modifiedOn?: Timestamp,
|
||||
@ -153,7 +153,7 @@ export class TxOperations implements Omit<Client, 'notify'> {
|
||||
objectId: Ref<P>,
|
||||
attachedTo: Ref<T>,
|
||||
attachedToClass: Ref<Class<T>>,
|
||||
collection: string,
|
||||
collection: Extract<keyof T, string> | string,
|
||||
modifiedOn?: Timestamp,
|
||||
modifiedBy?: Ref<Account>
|
||||
): Promise<Ref<T>> {
|
||||
|
@ -235,7 +235,8 @@ export function fillDefaults<T extends Doc> (
|
||||
for (const attribute of attributes) {
|
||||
if (attribute[1].defaultValue !== undefined) {
|
||||
if ((object as any)[attribute[0]] === undefined) {
|
||||
;(object as any)[attribute[0]] = attribute[1].defaultValue
|
||||
// Clone default value as it might be an object (e.g. array)
|
||||
;(object as any)[attribute[0]] = structuredClone(attribute[1].defaultValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -301,6 +301,22 @@ export class Builder {
|
||||
byId.set(tx._id, tx)
|
||||
})
|
||||
|
||||
Array.from(byId.entries()).forEach(([id, txes]) => {
|
||||
if (txes.kind === ClassifierKind.CLASS && txes.domain !== undefined && txes.extends !== undefined) {
|
||||
let parentTxes: ClassTxes | undefined = txes
|
||||
let parentDomain: Domain | undefined
|
||||
do {
|
||||
parentTxes = parentTxes.extends === undefined ? undefined : byId.get(parentTxes.extends)
|
||||
parentDomain = parentTxes === undefined ? undefined : parentTxes.domain
|
||||
} while (parentTxes !== undefined && parentDomain === undefined)
|
||||
if (parentDomain !== undefined) {
|
||||
throw new Error(
|
||||
`Class '${id}' should not specify its own domain '${txes.domain}', as it already extends class '${parentTxes?._id}' in domain '${parentDomain}'`
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const generated = this.generateTransactions(txes, byId)
|
||||
|
||||
for (const tx of generated) {
|
||||
|
@ -35,6 +35,11 @@
|
||||
"parser": "@typescript-eslint/parser"
|
||||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/no-unused-vars": ["warn", {
|
||||
// Registered Svelte names for better component typings,
|
||||
// see https://raqueebuddinaziz.com/blog/svelte-type-events-slots-and-props/#restprops-props
|
||||
"varsIgnorePattern": "^\\$\\$(Props|Events|Slots)$"
|
||||
}],
|
||||
"@typescript-eslint/array-type": "off",
|
||||
"@typescript-eslint/promise-function-async": "off",
|
||||
"@typescript-eslint/consistent-type-imports": "off",
|
||||
|
@ -48,6 +48,7 @@
|
||||
|
||||
export let attachFile: FileAttachFunction | undefined = undefined
|
||||
|
||||
// TODO: Expose
|
||||
const Mode = {
|
||||
View: 1,
|
||||
Edit: 2
|
||||
|
@ -130,12 +130,20 @@
|
||||
...extensions,
|
||||
InlineStyleToolbarExtension.configure({
|
||||
tippyOptions,
|
||||
// TODO: Toolbar element is updated on every component update,
|
||||
// but extensions is created only on mount. This causes issues when
|
||||
// you're trying to use TextEditor in long-living components that
|
||||
// get updated, e.g. in QuestionCollectionItemEditor in Surveys
|
||||
element: textToolbarElement,
|
||||
isSupported: () => true,
|
||||
isSelectionOnly: () => false
|
||||
}),
|
||||
InlinePopupExtension.configure({
|
||||
pluginKey: 'show-image-actions-popup',
|
||||
// TODO: Toolbar element is updated on every component update,
|
||||
// but extensions is created only on mount. This causes issues when
|
||||
// you're trying to use TextEditor in long-living components that
|
||||
// get updated, e.g. in QuestionCollectionItemEditor in Surveys
|
||||
element: imageToolbarElement,
|
||||
tippyOptions: {
|
||||
...tippyOptions,
|
||||
|
@ -58,7 +58,7 @@
|
||||
{#if labelIntl}
|
||||
<Label label={labelIntl} params={labelParams} />
|
||||
{:else}
|
||||
{label}
|
||||
{label ?? ''}
|
||||
{/if}
|
||||
</slot>
|
||||
</label>
|
||||
|
@ -104,13 +104,13 @@ const boards = plugin(boardId, {
|
||||
},
|
||||
action: {
|
||||
Open: '' as Ref<Action>,
|
||||
Cover: '' as Ref<Action>,
|
||||
Dates: '' as Ref<Action>,
|
||||
Labels: '' as Ref<Action>,
|
||||
Move: '' as Ref<Action>,
|
||||
Copy: '' as Ref<Action>,
|
||||
Archive: '' as Ref<Action>,
|
||||
SendToBoard: '' as Ref<Action>,
|
||||
Cover: '' as Ref<Action<Doc, any>>,
|
||||
Dates: '' as Ref<Action<Doc, any>>,
|
||||
Labels: '' as Ref<Action<Doc, any>>,
|
||||
Move: '' as Ref<Action<Doc, any>>,
|
||||
Copy: '' as Ref<Action<Doc, any>>,
|
||||
Archive: '' as Ref<Action<Doc, any>>,
|
||||
SendToBoard: '' as Ref<Action<Doc, any>>,
|
||||
Delete: '' as Ref<Action>
|
||||
},
|
||||
string: {
|
||||
|
@ -1,7 +0,0 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/assets/eslint.config.json'],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
@ -1,5 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="survey" viewBox="0 0 32 32">
|
||||
<path clip-rule="evenodd" d="M10 4C8.89543 4 8 4.89543 8 6V26C8 27.1046 8.89543 28 10 28H22C23.1046 28 24 27.1046 24 26V12H20C17.7909 12 16 10.2091 16 8V4H10ZM18 4.41421V8C18 9.10457 18.8954 10 20 10H23.5858L18 4.41421ZM6 6C6 3.79086 7.79086 2 10 2H17.5858C18.1162 2 18.6249 2.21071 19 2.58579L25.4142 9C25.7893 9.37507 26 9.88378 26 10.4142V26C26 28.2091 24.2091 30 22 30H10C7.79086 30 6 28.2091 6 26V6ZM16 17C16 16.4477 16.4477 16 17 16H21C21.5523 16 22 16.4477 22 17C22 17.5523 21.5523 18 21 18H17C16.4477 18 16 17.5523 16 17Z M17 20C16.4477 20 16 20.4477 16 21C16 21.5523 16.4477 22 17 22H21C21.5523 22 22 21.5523 22 21C22 20.4477 21.5523 20 21 20H17Z M14.7801 14.3016C15.1706 14.6921 15.1706 15.3253 14.7801 15.7158L12.7801 17.7158C12.3896 18.1063 11.7564 18.1063 11.3659 17.7158L10.3659 16.7158C9.97535 16.3253 9.97535 15.6921 10.3659 15.3016C10.7564 14.9111 11.3896 14.9111 11.7801 15.3016L12.073 15.5945L13.3659 14.3016C13.7564 13.9111 14.3896 13.9111 14.7801 14.3016Z M13.7037 19.2929C14.0942 19.6834 14.0942 20.3166 13.7037 20.7071L11.7037 22.7071C11.3132 23.0976 10.68 23.0976 10.2895 22.7071C9.89895 22.3166 9.9172 21.6651 10.2895 21.2929L12.2895 19.2929C12.68 18.9024 13.3132 18.9024 13.7037 19.2929Z M13.7071 22.7037C13.3166 23.0942 12.6834 23.0942 12.2929 22.7037L10.2929 20.7037C9.90237 20.3132 9.90237 19.68 10.2929 19.2895C10.6833 18.899 11.3348 18.9172 11.7071 19.2895L13.7071 21.2895C14.0976 21.68 14.0976 22.3132 13.7071 22.7037Z" />
|
||||
</symbol>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.6 KiB |
@ -1,5 +0,0 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig",
|
||||
"rigProfile": "assets"
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
|
||||
roots: ['./src'],
|
||||
coverageReporters: ['text-summary', 'html']
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"string": {
|
||||
"ConfigDescription": "Extension to manage surveys",
|
||||
"ConfigLabel": "Surveys",
|
||||
"SurveyApplication": "Surveys"
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"string": {
|
||||
"ConfigDescription": "Расширение для управления анкетами",
|
||||
"ConfigLabel": "Анкеты",
|
||||
"SurveyApplication": "Анкеты"
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
{
|
||||
"name": "@hcengineering/survey-assets",
|
||||
"version": "0.6.0",
|
||||
"main": "lib/index.js",
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build:watch": "tsc",
|
||||
"build:docs": "",
|
||||
"test": "jest --passWithNoTests --silent",
|
||||
"lint": "eslint src",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"format": "format src"
|
||||
},
|
||||
"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",
|
||||
"prettier-plugin-svelte": "^3.1.0",
|
||||
"@types/node": "~16.11.12",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest": "^29.5.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/platform": "^0.6.9",
|
||||
"@hcengineering/survey": "^0.6.0"
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
import { makeLocalesTest } from '@hcengineering/platform'
|
||||
|
||||
it(
|
||||
'Locales are equale',
|
||||
makeLocalesTest((lang) => import(`../../lang/${lang}.json`))
|
||||
)
|
@ -1,22 +0,0 @@
|
||||
//
|
||||
// Copyright © 2023 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 survey from '@hcengineering/survey'
|
||||
|
||||
const icons = require('../assets/icons.svg') as string // eslint-disable-line
|
||||
loadMetadata(survey.icon, {
|
||||
SurveyApplication: `${icons}#survey`
|
||||
})
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/default/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"types": ["node", "jest"],
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/ui/eslint.config.json'],
|
||||
parserOptions: { tsconfigRootDir: __dirname }
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig",
|
||||
"rigProfile": "ui"
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
|
||||
roots: ['./src'],
|
||||
coverageReporters: ['text-summary', 'html']
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
{
|
||||
"name": "@hcengineering/survey-resources",
|
||||
"version": "0.6.0",
|
||||
"main": "src/index.ts",
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "tsc --noEmit --outDir ./dist_cache && echo build",
|
||||
"build:watch": "tsc --noEmit --outDir ./dist_cache",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"lint": "eslint src",
|
||||
"format": "format src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"svelte-loader":"^3.1.9",
|
||||
"sass":"^1.53.0",
|
||||
"svelte-preprocess":"^5.1.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",
|
||||
"eslint-plugin-svelte": "^2.34.0",
|
||||
"prettier-plugin-svelte": "^3.1.0",
|
||||
"svelte-eslint-parser": "^0.33.1",
|
||||
"prettier": "^3.1.0",
|
||||
"svelte-check": "^3.6.0",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest":"^29.5.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/core": "^0.6.28",
|
||||
"@hcengineering/platform": "^0.6.9",
|
||||
"@hcengineering/survey": "^0.6.0",
|
||||
"@hcengineering/ui": "^0.6.11",
|
||||
"@hcengineering/view": "^0.6.9"
|
||||
}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
//
|
||||
// Copyright © 2023 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'
|
||||
|
||||
export default async (): Promise<Resources> => ({})
|
@ -1,19 +0,0 @@
|
||||
//
|
||||
// Copyright © 2023 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 survey, { surveyId } from '@hcengineering/survey'
|
||||
import { mergeIds } from '@hcengineering/platform'
|
||||
|
||||
export default mergeIds(surveyId, survey, {})
|
@ -1,5 +0,0 @@
|
||||
const sveltePreprocess = require('svelte-preprocess')
|
||||
|
||||
module.exports = {
|
||||
preprocess: sveltePreprocess()
|
||||
};
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/ui/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib"
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/default/eslint.config.json'],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig"
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
|
||||
roots: ['./src'],
|
||||
coverageReporters: ['text-summary', 'html']
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
{
|
||||
"name": "@hcengineering/survey",
|
||||
"version": "0.6.0",
|
||||
"main": "lib/index.js",
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"test": "jest --passWithNoTests --silent",
|
||||
"build:watch": "tsc",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"lint": "eslint src",
|
||||
"format": "format src"
|
||||
},
|
||||
"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",
|
||||
"prettier-plugin-svelte": "^3.1.0",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest":"^29.5.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/attachment": "^0.6.9",
|
||||
"@hcengineering/core": "^0.6.28",
|
||||
"@hcengineering/platform": "^0.6.9",
|
||||
"@hcengineering/ui": "^0.6.11",
|
||||
"@hcengineering/view": "^0.6.9"
|
||||
}
|
||||
}
|
@ -1,103 +0,0 @@
|
||||
//
|
||||
// Copyright © 2023 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 { IntlString, Plugin } from '@hcengineering/platform'
|
||||
import type { AttachedDoc, Class, CollectionSize, Markup, Ref } from '@hcengineering/core'
|
||||
import type { Attachment } from '@hcengineering/attachment'
|
||||
import { Asset, plugin } from '@hcengineering/platform'
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type Rank = string
|
||||
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
* ∈ [0.0, 100.0]
|
||||
*/
|
||||
export type Percentage = number
|
||||
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
* Arbitrary survey item
|
||||
*/
|
||||
export interface SurveyItem extends AttachedDoc {
|
||||
rank: Rank
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
* Interactive survey item, e.g. a question
|
||||
*/
|
||||
export interface SurveyInteractiveItem extends SurveyItem {
|
||||
title: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*
|
||||
* Assessable interactive survey item, e.g. a question with correct answers
|
||||
*/
|
||||
export interface SurveyAssessableItem extends SurveyInteractiveItem {
|
||||
weight: Percentage
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface Survey extends AttachedDoc {
|
||||
title: string
|
||||
description: Markup
|
||||
|
||||
threshold: Percentage
|
||||
items: CollectionSize<SurveyItem>
|
||||
attachments: CollectionSize<Attachment>
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const surveyId = 'survey' as Plugin
|
||||
|
||||
const survey = plugin(surveyId, {
|
||||
class: {
|
||||
Survey: '' as Ref<Class<Survey>>,
|
||||
SurveyItem: '' as Ref<Class<SurveyItem>>,
|
||||
SurveyInteractiveItem: '' as Ref<Class<SurveyInteractiveItem>>,
|
||||
SurveyAssessableItem: '' as Ref<Class<SurveyAssessableItem>>
|
||||
},
|
||||
string: {
|
||||
ConfigDescription: '' as IntlString,
|
||||
ConfigLabel: '' as IntlString,
|
||||
SurveyApplication: '' as IntlString
|
||||
},
|
||||
icon: {
|
||||
SurveyApplication: '' as Asset
|
||||
},
|
||||
action: {
|
||||
// TODO: Declare actions?
|
||||
},
|
||||
component: {
|
||||
// TODO: Declare components?
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export default survey
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/default/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
}
|
||||
}
|
@ -493,26 +493,26 @@ const pluginState = plugin(trackerId, {
|
||||
Issue: '' as Ref<TaskTypeDescriptor>
|
||||
},
|
||||
action: {
|
||||
SetDueDate: '' as Ref<Action>,
|
||||
SetParent: '' as Ref<Action>,
|
||||
SetDueDate: '' as Ref<Action<Doc, any>>,
|
||||
SetParent: '' as Ref<Action<Doc, any>>,
|
||||
SetStatus: '' as Ref<Action>,
|
||||
SetPriority: '' as Ref<Action>,
|
||||
SetAssignee: '' as Ref<Action>,
|
||||
SetComponent: '' as Ref<Action>,
|
||||
CopyIssueId: '' as Ref<Action>,
|
||||
CopyIssueTitle: '' as Ref<Action>,
|
||||
CopyIssueLink: '' as Ref<Action>,
|
||||
SetPriority: '' as Ref<Action<Doc, any>>,
|
||||
SetAssignee: '' as Ref<Action<Doc, any>>,
|
||||
SetComponent: '' as Ref<Action<Doc, any>>,
|
||||
CopyIssueId: '' as Ref<Action<Doc, any>>,
|
||||
CopyIssueTitle: '' as Ref<Action<Doc, any>>,
|
||||
CopyIssueLink: '' as Ref<Action<Doc, any>>,
|
||||
MoveToProject: '' as Ref<Action>,
|
||||
Duplicate: '' as Ref<Action>,
|
||||
Relations: '' as Ref<Action>,
|
||||
NewIssue: '' as Ref<Action>,
|
||||
NewIssueGlobal: '' as Ref<Action>,
|
||||
NewSubIssue: '' as Ref<Action>,
|
||||
Duplicate: '' as Ref<Action<Doc, any>>,
|
||||
Relations: '' as Ref<Action<Doc, any>>,
|
||||
NewIssue: '' as Ref<Action<Doc, any>>,
|
||||
NewIssueGlobal: '' as Ref<Action<Doc, any>>,
|
||||
NewSubIssue: '' as Ref<Action<Doc, any>>,
|
||||
EditWorkflowStatuses: '' as Ref<Action>,
|
||||
EditProject: '' as Ref<Action>,
|
||||
SetMilestone: '' as Ref<Action>,
|
||||
SetLabels: '' as Ref<Action>,
|
||||
EditRelatedTargets: '' as Ref<Action>
|
||||
SetMilestone: '' as Ref<Action<Doc, any>>,
|
||||
SetLabels: '' as Ref<Action<Doc, any>>,
|
||||
EditRelatedTargets: '' as Ref<Action<Doc, any>>
|
||||
},
|
||||
project: {
|
||||
DefaultProject: '' as Ref<Project>
|
||||
|
@ -137,6 +137,7 @@
|
||||
|
||||
const editors: Array<{ key: KeyedAttribute, editor: AnyComponent, category: AttributeCategory }> = []
|
||||
const newInplaceAttributes: string[] = []
|
||||
|
||||
for (const k of collections) {
|
||||
if (allowedCollections.includes(k.key.key)) continue
|
||||
const editor = await getFieldEditor(k.key)
|
||||
@ -206,7 +207,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
let title: string = ''
|
||||
let title: string | undefined = undefined
|
||||
let rawTitle: string = ''
|
||||
|
||||
$: if (object !== undefined) {
|
||||
@ -332,14 +333,14 @@
|
||||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="header">
|
||||
{#if mainEditor && mainEditor.pinned}
|
||||
{#if mainEditor && mainEditor.editor && mainEditor.pinned}
|
||||
<div class="flex-col flex-grow my-4">
|
||||
<Component is={mainEditor.editor} props={{ object }} on:open={handleOpen} />
|
||||
</div>
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
|
||||
{#if mainEditor && !mainEditor.pinned}
|
||||
{#if mainEditor && mainEditor.editor && !mainEditor.pinned}
|
||||
<div class="flex-col flex-grow flex-no-shrink step-tb-6">
|
||||
<Component is={mainEditor.editor} props={{ object }} on:open={handleOpen} />
|
||||
</div>
|
||||
@ -362,6 +363,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
{#if editorFooter}
|
||||
<div class="step-tb-6">
|
||||
<Component is={editorFooter.footer} props={{ object, _class, ...editorFooter.props }} />
|
||||
|
@ -435,9 +435,21 @@ export type ViewActionInput = 'focus' | 'selection' | 'any' | 'none'
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type ViewAction<T = Record<string, any>> = Resource<
|
||||
(doc: Doc | Doc[] | undefined, evt: Event, params?: T) => Promise<void>
|
||||
>
|
||||
export type ViewActionFunction<T extends Doc = Doc, P = Record<string, any>> = (
|
||||
doc: T | T[] | undefined,
|
||||
evt: Event,
|
||||
params?: P
|
||||
) => Promise<void>
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type ViewActionAvailabilityFunction<T extends Doc = Doc> = (doc: T | T[] | undefined) => Promise<boolean>
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type ViewAction<P = Record<string, any>> = Resource<ViewActionFunction<Doc, P>>
|
||||
|
||||
/**
|
||||
* @public
|
||||
@ -457,7 +469,7 @@ export type ActionGroup = 'create' | 'edit' | 'associate' | 'copy' | 'tools' | '
|
||||
*/
|
||||
export interface Action<T extends Doc = Doc, P = Record<string, any>> extends Doc, UXObject {
|
||||
// Action implementation details
|
||||
action: ViewAction<P>
|
||||
action: Resource<ViewActionFunction<T, P>>
|
||||
// Action implementation parameters
|
||||
actionProps?: P
|
||||
|
||||
@ -477,7 +489,7 @@ export interface Action<T extends Doc = Doc, P = Record<string, any>> extends Do
|
||||
query?: DocumentQuery<T>
|
||||
|
||||
// Action is shown only if the check is passed
|
||||
visibilityTester?: Resource<(doc?: Doc | Doc[]) => Promise<boolean>>
|
||||
visibilityTester?: Resource<ViewActionAvailabilityFunction<T>>
|
||||
|
||||
// If defined, types should be matched to proposed list
|
||||
inputProps?: Record<string, Ref<Class<Doc>>>
|
||||
@ -495,7 +507,7 @@ export interface Action<T extends Doc = Doc, P = Record<string, any>> extends Do
|
||||
context: ViewContext
|
||||
|
||||
// A list of actions replaced by this one.
|
||||
// For example it could be global action and action for focus class, second one fill override first one.
|
||||
// For example, it could be global action and action for focus class, second one fill override first one.
|
||||
override?: Ref<Action>[]
|
||||
|
||||
// Avaible only for workspace owners
|
||||
|
@ -116,7 +116,6 @@
|
||||
"@hcengineering/hr-assets": "^0.6.12",
|
||||
"@hcengineering/bitrix-assets": "^0.6.0",
|
||||
"@hcengineering/request-assets": "^0.6.0",
|
||||
"@hcengineering/survey-assets": "^0.6.0",
|
||||
"@hcengineering/login": "^0.6.8",
|
||||
"@hcengineering/view": "^0.6.9",
|
||||
"@hcengineering/task": "^0.6.13",
|
||||
@ -141,7 +140,6 @@
|
||||
"@hcengineering/hr": "^0.6.12",
|
||||
"@hcengineering/bitrix": "^0.6.44",
|
||||
"@hcengineering/request": "^0.6.6",
|
||||
"@hcengineering/support": "^0.6.1",
|
||||
"@hcengineering/survey": "^0.6.0"
|
||||
"@hcengineering/support": "^0.6.1"
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,6 @@ import { recruitId } from '@hcengineering/recruit'
|
||||
import { requestId } from '@hcengineering/request'
|
||||
import { settingId } from '@hcengineering/setting'
|
||||
import { supportId } from '@hcengineering/support'
|
||||
import { surveyId } from '@hcengineering/survey'
|
||||
import { tagsId } from '@hcengineering/tags'
|
||||
import { taskId } from '@hcengineering/task'
|
||||
import { telegramId } from '@hcengineering/telegram'
|
||||
@ -137,7 +136,6 @@ import recruitEn from '@hcengineering/recruit-assets/lang/en.json'
|
||||
import requestEn from '@hcengineering/request-assets/lang/en.json'
|
||||
import settingEn from '@hcengineering/setting-assets/lang/en.json'
|
||||
import supportEn from '@hcengineering/support-assets/lang/en.json'
|
||||
import surveyEn from '@hcengineering/survey-assets/lang/en.json'
|
||||
import tagsEn from '@hcengineering/tags-assets/lang/en.json'
|
||||
import taskEn from '@hcengineering/task-assets/lang/en.json'
|
||||
import telegramEn from '@hcengineering/telegram-assets/lang/en.json'
|
||||
@ -158,7 +156,6 @@ addStringsLoader(recruitId, async (lang: string) => recruitEn)
|
||||
addStringsLoader(activityId, async (lang: string) => activityEn)
|
||||
addStringsLoader(settingId, async (lang: string) => settingEn)
|
||||
addStringsLoader(supportId, async (lang: string) => supportEn)
|
||||
addStringsLoader(surveyId, async (lang: string) => surveyEn)
|
||||
addStringsLoader(telegramId, async (lang: string) => telegramEn)
|
||||
addStringsLoader(leadId, async (lang: string) => leadEn)
|
||||
addStringsLoader(gmailId, async (lang: string) => gmailEn)
|
||||
|
20
rush.json
20
rush.json
@ -1501,26 +1501,6 @@
|
||||
"packageName": "@hcengineering/support-resources",
|
||||
"projectFolder": "plugins/support-resources",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/model-survey",
|
||||
"projectFolder": "models/survey",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/survey",
|
||||
"projectFolder": "plugins/survey",
|
||||
"shouldPublish": true
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/survey-assets",
|
||||
"projectFolder": "plugins/survey-assets",
|
||||
"shouldPublish": true
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/survey-resources",
|
||||
"projectFolder": "plugins/survey-resources",
|
||||
"shouldPublish": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user