diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..959b1f03e5 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,19 @@ +{ + "files.exclude": { + "**/.git": true, + "**/.svn": true, + "**/.hg": true, + "**/CVS": true, + "**/.DS_Store": true, + "**/Thumbs.db": true, + "**/.rush": true, + "**/lib": true, + "**/.heft": true, + "**/_api-extractor-temp": true, + "**/svelte.config.js": true, + "**/postcss.config.js": true, + "**/node_modules": true, + "**/temp": true + }, + "explorerExclude.backup": null +} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 9536734400..3583581fb2 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -46,6 +46,7 @@ specifiers: '@rush-temp/inventory': file:./projects/inventory.tgz '@rush-temp/inventory-assets': file:./projects/inventory-assets.tgz '@rush-temp/inventory-resources': file:./projects/inventory-resources.tgz + '@rush-temp/kanban': file:./projects/kanban.tgz '@rush-temp/lead': file:./projects/lead.tgz '@rush-temp/lead-assets': file:./projects/lead-assets.tgz '@rush-temp/lead-resources': file:./projects/lead-resources.tgz @@ -233,7 +234,6 @@ specifiers: koa: ^2.13.1 koa-bodyparser: ^4.3.0 koa-router: ^10.1.1 - lexorank: ~1.0.4 mime-types: ~2.1.34 mini-css-extract-plugin: ^2.2.0 minio: ~7.0.26 @@ -313,6 +313,7 @@ dependencies: '@rush-temp/inventory': file:projects/inventory.tgz '@rush-temp/inventory-assets': file:projects/inventory-assets.tgz '@rush-temp/inventory-resources': file:projects/inventory-resources.tgz_096c09b0b673a57c275d9767a12070b1 + '@rush-temp/kanban': file:projects/kanban.tgz_096c09b0b673a57c275d9767a12070b1 '@rush-temp/lead': file:projects/lead.tgz '@rush-temp/lead-assets': file:projects/lead-assets.tgz_typescript@4.5.4 '@rush-temp/lead-resources': file:projects/lead-resources.tgz_096c09b0b673a57c275d9767a12070b1 @@ -500,7 +501,6 @@ dependencies: koa: 2.13.4 koa-bodyparser: 4.3.0 koa-router: 10.1.1 - lexorank: 1.0.4 mime-types: 2.1.34 mini-css-extract-plugin: 2.4.5_webpack@5.65.0 minio: 7.0.26 @@ -11738,7 +11738,7 @@ packages: dev: false file:projects/board-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-QT/HdEwK5Qk97hQP5yYA3YqTxvjugiT5mQAwzzqG969O2bKHQ2FVR8lAvU1fMO3fwC5yhK7e7cPYmp4BkxUB7Q==, tarball: file:projects/board-resources.tgz} + resolution: {integrity: sha512-vNNtH4in7D54mv4ckcYvE+iLxqt10x0kpToPg+xMRl4LuXIehuKDM+x9uiSb61y7FBesLyrJ3+606D99cc+1fQ==, tarball: file:projects/board-resources.tgz} id: file:projects/board-resources.tgz name: '@rush-temp/board-resources' version: 0.0.0 @@ -12580,6 +12580,42 @@ packages: - supports-color dev: false + file:projects/kanban.tgz_096c09b0b673a57c275d9767a12070b1: + resolution: {integrity: sha512-OCiINFLnTioUd5bChs/+3XWrsG3ogWEG/EIN0xLle9bW3SFW8VEG9Zzint+nnKA9ZNSPvopQoQ0nfI+Cw27yyw==, tarball: file:projects/kanban.tgz} + id: file:projects/kanban.tgz + name: '@rush-temp/kanban' + version: 0.0.0 + dependencies: + '@typescript-eslint/eslint-plugin': 5.7.0_c25e8c1f4f4f7aaed27aa6f9ce042237 + '@typescript-eslint/parser': 5.7.0_eslint@7.32.0+typescript@4.5.4 + eslint: 7.32.0 + eslint-config-standard-with-typescript: 21.0.1_ce2fa0c4dfa1c256100cababd749a13a + eslint-plugin-import: 2.25.3_eslint@7.32.0 + eslint-plugin-node: 11.1.0_eslint@7.32.0 + eslint-plugin-promise: 5.2.0_eslint@7.32.0 + eslint-plugin-svelte3: 3.2.1_eslint@7.32.0+svelte@3.46.6 + lexorank: 1.0.4 + prettier: 2.5.1 + prettier-plugin-svelte: 2.5.1_prettier@2.5.1+svelte@3.46.6 + sass: 1.45.0 + svelte: 3.46.6 + svelte-check: 2.3.0_b04a52a339c2665a42d74bbf4bb86835 + svelte-loader: 3.1.2_svelte@3.46.6 + svelte-preprocess: 4.10.5_6f8bc07a13fa60df66bfb708fddfe692 + typescript: 4.5.4 + transitivePeerDependencies: + - '@babel/core' + - coffeescript + - less + - node-sass + - postcss + - postcss-load-config + - pug + - stylus + - sugarss + - supports-color + dev: false + file:projects/lead-assets.tgz_typescript@4.5.4: resolution: {integrity: sha512-xzyDq7/BBdTObN+yQybWaB+9BuGKc3ucavQhEfQvrtRF4IryAt+SeCSX3W1bbJlZoq76OAkNf8wPXY5FAJC+3w==, tarball: file:projects/lead-assets.tgz} id: file:projects/lead-assets.tgz diff --git a/packages/kanban/.eslintrc.js b/packages/kanban/.eslintrc.js new file mode 100644 index 0000000000..a327214967 --- /dev/null +++ b/packages/kanban/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: ['./node_modules/@anticrm/platform-rig/profiles/ui/config/eslint.config.json'], + parserOptions: { tsconfigRootDir: __dirname }, + settings: { + 'svelte3/ignore-styles': () => true + } +} diff --git a/packages/kanban/package.json b/packages/kanban/package.json new file mode 100644 index 0000000000..7ba07a1f67 --- /dev/null +++ b/packages/kanban/package.json @@ -0,0 +1,42 @@ +{ + "name": "@anticrm/kanban", + "version": "0.6.0", + "main": "src/index.ts", + "author": "Anticrm Platform Contributors", + "license": "EPL-2.0", + "scripts": { + "build": "echo 'no build for ui'", + "build:docs": "api-extractor run --local", + "lint": "svelte-check && eslint", + "lint:fix": "eslint --fix src", + "format": "prettier --write --plugin-search-dir=. src && eslint --fix src", + "svelte-check": "svelte-check" + }, + "devDependencies": { + "svelte-loader": "^3.1.2", + "sass": "^1.37.5", + "svelte-preprocess": "^4.10.5", + "svelte-check": "^2.2.10", + "@anticrm/platform-rig": "~0.6.0", + "@typescript-eslint/eslint-plugin": "^5.4.0", + "@typescript-eslint/parser": "^5.4.0", + "eslint-config-standard-with-typescript": "^21.0.1", + "eslint-plugin-import": "^2.25.3", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^5.1.1", + "eslint-plugin-svelte3": "~3.2.1", + "prettier-plugin-svelte": "^2.2.0", + "eslint": "^7.32.0", + "prettier": "^2.4.1", + "typescript": "^4.3.5" + }, + "dependencies": { + "@anticrm/ui": "~0.6.0", + "svelte": "^3.46", + "lexorank": "^1.0.4", + "@anticrm/platform": "~0.6.5", + "@anticrm/core": "~0.6.16", + "@anticrm/presentation": "~0.6.2", + "@anticrm/notification": "~0.6.0" + } +} diff --git a/packages/kanban/postcss.config.js b/packages/kanban/postcss.config.js new file mode 100644 index 0000000000..88752c6cb0 --- /dev/null +++ b/packages/kanban/postcss.config.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: [ + require('autoprefixer') + ] +} diff --git a/packages/kanban/src/components/Kanban.svelte b/packages/kanban/src/components/Kanban.svelte new file mode 100644 index 0000000000..083b16a664 --- /dev/null +++ b/packages/kanban/src/components/Kanban.svelte @@ -0,0 +1,269 @@ + + + +
+
+ +
+ {#each states as state} + {@const stateObjects = getStateObjects(objects, state, dragCard)} + panelDragOver(event, state)} + on:drop={() => { + move(state._id) + isDragging = false + }} + customHeader={$$slots.header !== undefined} + > + + + + + {#each stateObjects as object} + {@const dragged = isDragging && object.it._id === dragCard?._id} +
cardDragOver(evt, object)} + on:drop|preventDefault={(evt) => cardDrop(evt, object)} + > +
onDragStart(object, state)} + on:dragend={() => { + isDragging = false + }} + > + +
+
+ {/each} + +
+ {/each} + +
+
+
+ {#if isDragging} + + {/if} +
+ + diff --git a/plugins/task-resources/src/components/kanban/KanbanCardEmpty.svelte b/packages/kanban/src/components/KanbanCardEmpty.svelte similarity index 77% rename from plugins/task-resources/src/components/kanban/KanbanCardEmpty.svelte rename to packages/kanban/src/components/KanbanCardEmpty.svelte index 35ad2e9ab5..af77e1e6e4 100644 --- a/plugins/task-resources/src/components/kanban/KanbanCardEmpty.svelte +++ b/packages/kanban/src/components/KanbanCardEmpty.svelte @@ -1,5 +1,5 @@ - -
-
- -
-
diff --git a/plugins/task-resources/src/components/kanban/KanbanPanelEmpty.svelte b/plugins/board-resources/src/components/KanbanPanelEmpty.svelte similarity index 75% rename from plugins/task-resources/src/components/kanban/KanbanPanelEmpty.svelte rename to plugins/board-resources/src/components/KanbanPanelEmpty.svelte index d3ce6945e5..cd23167c78 100644 --- a/plugins/task-resources/src/components/kanban/KanbanPanelEmpty.svelte +++ b/plugins/board-resources/src/components/KanbanPanelEmpty.svelte @@ -1,7 +1,7 @@ @@ -21,13 +21,13 @@
+ + + + + {@const issue = toIssue(object) } +
+
+ + {#if issue.$lookup?.assignee } + + {/if} +
+ + {object.title} + + +
+
+ +{/if} + diff --git a/plugins/tracker-resources/src/plugin.ts b/plugins/tracker-resources/src/plugin.ts index 044cbdcdbb..6096978582 100644 --- a/plugins/tracker-resources/src/plugin.ts +++ b/plugins/tracker-resources/src/plugin.ts @@ -49,7 +49,6 @@ export default mergeIds(trackerId, tracker, { High: '' as IntlString, Medium: '' as IntlString, Low: '' as IntlString, - Title: '' as IntlString, Identifier: '' as IntlString, Description: '' as IntlString, @@ -72,7 +71,8 @@ export default mergeIds(trackerId, tracker, { IssueTitlePlaceholder: '' as IntlString, IssueDescriptionPlaceholder: '' as IntlString, - TaskUnAssign: '' as IntlString + TaskUnAssign: '' as IntlString, + AddIssueTooltip: '' as IntlString }, component: { NopeComponent: '' as AnyComponent, diff --git a/plugins/view-resources/src/components/ObjectPresenter.svelte b/plugins/view-resources/src/components/ObjectPresenter.svelte index 5f44b5f181..fc3a5d0fac 100644 --- a/plugins/view-resources/src/components/ObjectPresenter.svelte +++ b/plugins/view-resources/src/components/ObjectPresenter.svelte @@ -23,6 +23,7 @@ export let _class: Ref> export let value: Doc | undefined export let attributeType: Type + export let props: Record = {} const client = getClient() let presenter: AttributeModel | undefined @@ -44,5 +45,5 @@ {#if presenter} - + {/if} diff --git a/rush.json b/rush.json index 2197774c46..341b7ca5a9 100644 --- a/rush.json +++ b/rush.json @@ -1257,6 +1257,11 @@ "packageName": "@anticrm/model-board", "projectFolder": "models/board", "shouldPublish": true + }, + { + "packageName": "@anticrm/kanban", + "projectFolder": "packages/kanban", + "shouldPublish": true } ] }