@dxos/plugin-kanban 0.8.4-main.69d29f4 → 0.8.4-main.6fa680abb7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/KanbanContainer-LUFCGLXA.mjs +303 -0
- package/dist/lib/browser/KanbanContainer-LUFCGLXA.mjs.map +7 -0
- package/dist/lib/browser/KanbanViewEditor-JGJXYP6E.mjs +66 -0
- package/dist/lib/browser/KanbanViewEditor-JGJXYP6E.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-2NNRB2ZQ.mjs +17 -0
- package/dist/lib/browser/blueprint-definition-2NNRB2ZQ.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +3 -3
- package/dist/lib/browser/{chunk-L6N4ZDZ7.mjs → chunk-B6RIAQMI.mjs} +11 -17
- package/dist/lib/browser/chunk-B6RIAQMI.mjs.map +7 -0
- package/dist/lib/browser/chunk-XNHYJTI4.mjs +385 -0
- package/dist/lib/browser/chunk-XNHYJTI4.mjs.map +7 -0
- package/dist/lib/browser/chunk-YCJAZ27A.mjs +210 -0
- package/dist/lib/browser/chunk-YCJAZ27A.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +31 -27
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{operation-resolver-UEJHX42A.mjs → operation-resolver-ZWHXZBPF.mjs} +7 -7
- package/dist/lib/browser/operation-resolver-ZWHXZBPF.mjs.map +7 -0
- package/dist/lib/browser/react-surface-JSJYXYPF.mjs +99 -0
- package/dist/lib/browser/react-surface-JSJYXYPF.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +9 -3
- package/dist/lib/node-esm/KanbanContainer-LLBEBTVG.mjs +304 -0
- package/dist/lib/node-esm/KanbanContainer-LLBEBTVG.mjs.map +7 -0
- package/dist/lib/node-esm/KanbanViewEditor-Z6PM75TB.mjs +67 -0
- package/dist/lib/node-esm/KanbanViewEditor-Z6PM75TB.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-APJQFSHJ.mjs → blueprint-definition-5GWECQLZ.mjs} +6 -6
- package/dist/lib/node-esm/blueprint-definition-5GWECQLZ.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +3 -3
- package/dist/lib/node-esm/chunk-3APLKFTO.mjs +211 -0
- package/dist/lib/node-esm/chunk-3APLKFTO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MS6KRXNX.mjs +386 -0
- package/dist/lib/node-esm/chunk-MS6KRXNX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ZHRMUKTF.mjs → chunk-SD555I65.mjs} +11 -16
- package/dist/lib/node-esm/chunk-SD555I65.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +31 -27
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{operation-resolver-5RPWHZCF.mjs → operation-resolver-KV5GNNHN.mjs} +7 -7
- package/dist/lib/node-esm/operation-resolver-KV5GNNHN.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-PQEYNBJY.mjs +100 -0
- package/dist/lib/node-esm/react-surface-PQEYNBJY.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +9 -3
- package/dist/types/src/KanbanPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +1 -1
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/kanban-blueprint.d.ts +3 -21
- package/dist/types/src/blueprints/kanban-blueprint.d.ts.map +1 -1
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts +1 -1
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +3 -6
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +1 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/KanbanBoard/KanbanBoard.d.ts +59 -0
- package/dist/types/src/components/KanbanBoard/KanbanBoard.d.ts.map +1 -0
- package/dist/types/src/components/KanbanBoard/KanbanBoard.stories.d.ts +72 -0
- package/dist/types/src/components/KanbanBoard/KanbanBoard.stories.d.ts.map +1 -0
- package/dist/types/src/components/KanbanBoard/KanbanCard.d.ts +10 -0
- package/dist/types/src/components/KanbanBoard/KanbanCard.d.ts.map +1 -0
- package/dist/types/src/components/KanbanBoard/KanbanColumn.d.ts +9 -0
- package/dist/types/src/components/KanbanBoard/KanbanColumn.d.ts.map +1 -0
- package/dist/types/src/components/KanbanBoard/index.d.ts +2 -0
- package/dist/types/src/components/KanbanBoard/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/KanbanContainer/KanbanContainer.d.ts +6 -0
- package/dist/types/src/containers/KanbanContainer/KanbanContainer.d.ts.map +1 -0
- package/dist/types/src/{components → containers/KanbanContainer}/KanbanContainer.stories.d.ts +18 -14
- package/dist/types/src/containers/KanbanContainer/KanbanContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/KanbanContainer/index.d.ts +3 -0
- package/dist/types/src/containers/KanbanContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/KanbanViewEditor/KanbanViewEditor.d.ts +6 -0
- package/dist/types/src/containers/KanbanViewEditor/KanbanViewEditor.d.ts.map +1 -0
- package/dist/types/src/containers/KanbanViewEditor/index.d.ts +3 -0
- package/dist/types/src/containers/KanbanViewEditor/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +4 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +6 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useEchoChangeCallback.d.ts +13 -0
- package/dist/types/src/hooks/useEchoChangeCallback.d.ts.map +1 -0
- package/dist/types/src/hooks/useKanbanBoardModel.d.ts +16 -0
- package/dist/types/src/hooks/useKanbanBoardModel.d.ts.map +1 -0
- package/dist/types/src/hooks/useKanbanBoardModel.test.d.ts +2 -0
- package/dist/types/src/hooks/useKanbanBoardModel.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useKanbanColumnEventHandler.d.ts +22 -0
- package/dist/types/src/hooks/useKanbanColumnEventHandler.d.ts.map +1 -0
- package/dist/types/src/hooks/useKanbanItemEventHandler.d.ts +19 -0
- package/dist/types/src/hooks/useKanbanItemEventHandler.d.ts.map +1 -0
- package/dist/types/src/hooks/useProjectionModel.d.ts +15 -0
- package/dist/types/src/hooks/useProjectionModel.d.ts.map +1 -0
- package/dist/types/src/playwright/board-manager.d.ts +5 -0
- package/dist/types/src/playwright/board-manager.d.ts.map +1 -0
- package/dist/types/src/playwright/playwright.config.d.ts +3 -0
- package/dist/types/src/playwright/playwright.config.d.ts.map +1 -0
- package/dist/types/src/playwright/smoke.spec.d.ts +2 -0
- package/dist/types/src/playwright/smoke.spec.d.ts.map +1 -0
- package/dist/types/src/testing/KanbanCardTileSimple.d.ts +5 -0
- package/dist/types/src/testing/KanbanCardTileSimple.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +16 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Kanban.d.ts +37 -0
- package/dist/types/src/types/Kanban.d.ts.map +1 -0
- package/dist/types/src/types/constants.d.ts +6 -0
- package/dist/types/src/types/constants.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +5 -5
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +28 -0
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util/arrangement.d.ts +68 -0
- package/dist/types/src/util/arrangement.d.ts.map +1 -0
- package/dist/types/src/util/arrangement.test.d.ts +2 -0
- package/dist/types/src/util/arrangement.test.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +2 -0
- package/dist/types/src/util/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +47 -42
- package/src/KanbanPlugin.tsx +11 -12
- package/src/blueprints/index.ts +1 -1
- package/src/blueprints/kanban-blueprint.ts +14 -7
- package/src/capabilities/artifact-definition/artifact-definition.ts +8 -7
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +6 -12
- package/src/capabilities/operation-resolver/operation-resolver.ts +5 -5
- package/src/capabilities/react-surface/react-surface.tsx +14 -14
- package/src/components/KanbanBoard/KanbanBoard.stories.tsx +142 -0
- package/src/components/KanbanBoard/KanbanBoard.tsx +183 -0
- package/src/components/KanbanBoard/KanbanCard.tsx +87 -0
- package/src/components/KanbanBoard/KanbanColumn.tsx +69 -0
- package/src/components/KanbanBoard/index.ts +5 -0
- package/src/components/index.ts +1 -2
- package/src/{components → containers/KanbanContainer}/KanbanContainer.stories.tsx +62 -85
- package/src/containers/KanbanContainer/KanbanContainer.tsx +87 -0
- package/src/containers/KanbanContainer/index.ts +7 -0
- package/src/{components → containers/KanbanViewEditor}/KanbanViewEditor.tsx +23 -19
- package/src/containers/KanbanViewEditor/index.ts +7 -0
- package/src/containers/index.ts +8 -0
- package/src/hooks/index.ts +9 -0
- package/src/hooks/useEchoChangeCallback.ts +30 -0
- package/src/hooks/useKanbanBoardModel.test.ts +235 -0
- package/src/hooks/useKanbanBoardModel.ts +143 -0
- package/src/hooks/useKanbanColumnEventHandler.ts +106 -0
- package/src/hooks/useKanbanItemEventHandler.ts +133 -0
- package/src/hooks/useProjectionModel.ts +58 -0
- package/src/meta.ts +1 -1
- package/src/playwright/board-manager.ts +13 -0
- package/src/playwright/playwright.config.ts +19 -0
- package/src/playwright/smoke.spec.ts +107 -0
- package/src/testing/KanbanCardTileSimple.tsx +76 -0
- package/src/testing/index.ts +5 -0
- package/src/translations.ts +9 -1
- package/src/types/Kanban.ts +67 -0
- package/src/types/constants.ts +9 -0
- package/src/types/index.ts +2 -0
- package/src/types/schema.ts +8 -9
- package/src/types/types.ts +35 -0
- package/src/util/arrangement.test.ts +208 -0
- package/src/util/arrangement.ts +167 -0
- package/src/util/index.ts +5 -0
- package/dist/lib/browser/blueprint-definition-T2544VMJ.mjs +0 -17
- package/dist/lib/browser/blueprint-definition-T2544VMJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-L6N4ZDZ7.mjs.map +0 -7
- package/dist/lib/browser/chunk-XYQO4VL7.mjs +0 -150
- package/dist/lib/browser/chunk-XYQO4VL7.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-UEJHX42A.mjs.map +0 -7
- package/dist/lib/browser/react-surface-LFUJAPRL.mjs +0 -236
- package/dist/lib/browser/react-surface-LFUJAPRL.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-APJQFSHJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NN6JMKIT.mjs +0 -152
- package/dist/lib/node-esm/chunk-NN6JMKIT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZHRMUKTF.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-5RPWHZCF.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-7TSGBRJL.mjs +0 -237
- package/dist/lib/node-esm/react-surface-7TSGBRJL.mjs.map +0 -7
- package/dist/types/src/components/KanbanContainer.d.ts +0 -6
- package/dist/types/src/components/KanbanContainer.d.ts.map +0 -1
- package/dist/types/src/components/KanbanContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/KanbanViewEditor.d.ts +0 -8
- package/dist/types/src/components/KanbanViewEditor.d.ts.map +0 -1
- package/src/components/KanbanContainer.tsx +0 -86
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-kanban",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.6fa680abb7",
|
|
4
4
|
"description": "Kanban DXOS Surface plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -14,21 +14,21 @@
|
|
|
14
14
|
"type": "module",
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
17
|
+
"source": "./src/index.ts",
|
|
17
18
|
"browser": "./dist/lib/browser/index.mjs",
|
|
18
19
|
"node": "./dist/lib/node-esm/index.mjs",
|
|
19
|
-
"source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/src/index.d.ts"
|
|
21
21
|
},
|
|
22
22
|
"./blueprints": {
|
|
23
|
+
"source": "./src/blueprints/index.ts",
|
|
23
24
|
"browser": "./dist/lib/browser/blueprints/index.mjs",
|
|
24
25
|
"node": "./dist/lib/node-esm/blueprints/index.mjs",
|
|
25
|
-
"source": "./src/blueprints/index.ts",
|
|
26
26
|
"types": "./dist/types/src/blueprints/index.d.ts"
|
|
27
27
|
},
|
|
28
28
|
"./types": {
|
|
29
|
+
"source": "./src/types/index.ts",
|
|
29
30
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
30
31
|
"node": "./dist/lib/node-esm/types/index.mjs",
|
|
31
|
-
"source": "./src/types/index.ts",
|
|
32
32
|
"types": "./dist/types/src/types/index.d.ts"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
@@ -48,54 +48,59 @@
|
|
|
48
48
|
"src"
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@effect-atom/atom-react": "^0.
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/app-
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/plugin-
|
|
66
|
-
"@dxos/plugin-
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/react-
|
|
71
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/react-ui-
|
|
74
|
-
"@dxos/react-ui-
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
51
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
52
|
+
"@radix-ui/react-context": "1.1.1",
|
|
53
|
+
"effect": "3.19.16",
|
|
54
|
+
"@dxos/ai": "0.8.4-main.6fa680abb7",
|
|
55
|
+
"@dxos/app-toolkit": "0.8.4-main.6fa680abb7",
|
|
56
|
+
"@dxos/assistant": "0.8.4-main.6fa680abb7",
|
|
57
|
+
"@dxos/async": "0.8.4-main.6fa680abb7",
|
|
58
|
+
"@dxos/blueprints": "0.8.4-main.6fa680abb7",
|
|
59
|
+
"@dxos/echo": "0.8.4-main.6fa680abb7",
|
|
60
|
+
"@dxos/effect": "0.8.4-main.6fa680abb7",
|
|
61
|
+
"@dxos/echo-atom": "0.8.4-main.6fa680abb7",
|
|
62
|
+
"@dxos/functions": "0.8.4-main.6fa680abb7",
|
|
63
|
+
"@dxos/invariant": "0.8.4-main.6fa680abb7",
|
|
64
|
+
"@dxos/operation": "0.8.4-main.6fa680abb7",
|
|
65
|
+
"@dxos/plugin-client": "0.8.4-main.6fa680abb7",
|
|
66
|
+
"@dxos/plugin-graph": "0.8.4-main.6fa680abb7",
|
|
67
|
+
"@dxos/plugin-search": "0.8.4-main.6fa680abb7",
|
|
68
|
+
"@dxos/log": "0.8.4-main.6fa680abb7",
|
|
69
|
+
"@dxos/random": "0.8.4-main.6fa680abb7",
|
|
70
|
+
"@dxos/react-client": "0.8.4-main.6fa680abb7",
|
|
71
|
+
"@dxos/react-ui": "0.8.4-main.6fa680abb7",
|
|
72
|
+
"@dxos/plugin-space": "0.8.4-main.6fa680abb7",
|
|
73
|
+
"@dxos/react-ui-menu": "0.8.4-main.6fa680abb7",
|
|
74
|
+
"@dxos/react-ui-form": "0.8.4-main.6fa680abb7",
|
|
75
|
+
"@dxos/app-framework": "0.8.4-main.6fa680abb7",
|
|
76
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.6fa680abb7",
|
|
77
|
+
"@dxos/schema": "0.8.4-main.6fa680abb7",
|
|
78
|
+
"@dxos/types": "0.8.4-main.6fa680abb7",
|
|
79
|
+
"@dxos/util": "0.8.4-main.6fa680abb7",
|
|
80
|
+
"@dxos/react-ui-stack": "0.8.4-main.6fa680abb7"
|
|
78
81
|
},
|
|
79
82
|
"devDependencies": {
|
|
80
83
|
"@types/react": "~19.2.7",
|
|
81
84
|
"@types/react-dom": "~19.2.3",
|
|
82
85
|
"react": "~19.2.3",
|
|
83
86
|
"react-dom": "~19.2.3",
|
|
84
|
-
"vite": "7.1.
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/
|
|
87
|
-
"@dxos/
|
|
88
|
-
"@dxos/plugin-
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
87
|
+
"vite": "^7.1.11",
|
|
88
|
+
"@dxos/echo-db": "0.8.4-main.6fa680abb7",
|
|
89
|
+
"@dxos/keys": "0.8.4-main.6fa680abb7",
|
|
90
|
+
"@dxos/plugin-testing": "0.8.4-main.6fa680abb7",
|
|
91
|
+
"@dxos/plugin-theme": "0.8.4-main.6fa680abb7",
|
|
92
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.6fa680abb7",
|
|
93
|
+
"@dxos/storybook-utils": "0.8.4-main.6fa680abb7",
|
|
94
|
+
"@dxos/ui-theme": "0.8.4-main.6fa680abb7",
|
|
95
|
+
"@dxos/plugin-preview": "0.8.4-main.6fa680abb7",
|
|
96
|
+
"@dxos/test-utils": "0.8.4-main.6fa680abb7"
|
|
92
97
|
},
|
|
93
98
|
"peerDependencies": {
|
|
94
|
-
"effect": "3.19.
|
|
99
|
+
"effect": "3.19.16",
|
|
95
100
|
"react": "~19.2.3",
|
|
96
101
|
"react-dom": "~19.2.3",
|
|
97
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
98
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
102
|
+
"@dxos/react-ui": "0.8.4-main.6fa680abb7",
|
|
103
|
+
"@dxos/ui-theme": "0.8.4-main.6fa680abb7"
|
|
99
104
|
},
|
|
100
105
|
"publishConfig": {
|
|
101
106
|
"access": "public"
|
package/src/KanbanPlugin.tsx
CHANGED
|
@@ -4,21 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Plugin } from '@dxos/app-framework';
|
|
8
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
8
9
|
import { Type } from '@dxos/echo';
|
|
9
10
|
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
10
|
-
import {
|
|
11
|
-
import { Kanban } from '@dxos/react-ui-kanban/types';
|
|
12
|
-
import { View } from '@dxos/schema';
|
|
11
|
+
import { ViewModel } from '@dxos/schema';
|
|
13
12
|
|
|
14
13
|
import { BlueprintDefinition, OperationResolver, ReactSurface } from './capabilities';
|
|
15
14
|
import { meta } from './meta';
|
|
16
15
|
import { translations } from './translations';
|
|
17
|
-
import { CreateKanbanSchema } from './types';
|
|
16
|
+
import { CreateKanbanSchema, Kanban } from './types';
|
|
18
17
|
|
|
19
18
|
export const KanbanPlugin = Plugin.define(meta).pipe(
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
20
|
+
AppPlugin.addMetadataModule({
|
|
22
21
|
metadata: {
|
|
23
22
|
id: Type.getTypename(Kanban.Kanban),
|
|
24
23
|
metadata: {
|
|
@@ -27,7 +26,7 @@ export const KanbanPlugin = Plugin.define(meta).pipe(
|
|
|
27
26
|
inputSchema: CreateKanbanSchema,
|
|
28
27
|
createObject: ((props, { db }) =>
|
|
29
28
|
Effect.promise(async () => {
|
|
30
|
-
const { view } = await
|
|
29
|
+
const { view } = await ViewModel.makeFromDatabase({
|
|
31
30
|
db,
|
|
32
31
|
typename: props.typename,
|
|
33
32
|
pivotFieldName: props.initialPivotColumn,
|
|
@@ -37,9 +36,9 @@ export const KanbanPlugin = Plugin.define(meta).pipe(
|
|
|
37
36
|
},
|
|
38
37
|
},
|
|
39
38
|
}),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
AppPlugin.addOperationResolverModule({ activate: OperationResolver }),
|
|
40
|
+
AppPlugin.addSchemaModule({ schema: [Kanban.Kanban] }),
|
|
41
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
42
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
44
43
|
Plugin.make,
|
|
45
44
|
);
|
package/src/blueprints/index.ts
CHANGED
|
@@ -2,23 +2,30 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { type AppCapabilities } from '@dxos/app-toolkit';
|
|
5
6
|
import { Blueprint, Template } from '@dxos/blueprints';
|
|
6
|
-
import { type FunctionDefinition } from '@dxos/functions';
|
|
7
7
|
import { trim } from '@dxos/util';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
export const tools: string[] = [];
|
|
9
|
+
const BLUEPRINT_KEY = 'org.dxos.blueprint.kanban';
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
const functions: AppCapabilities.BlueprintDefinition['functions'] = [];
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
const make = () =>
|
|
15
14
|
Blueprint.make({
|
|
16
|
-
key:
|
|
15
|
+
key: BLUEPRINT_KEY,
|
|
17
16
|
name: 'Kanban',
|
|
18
|
-
tools: Blueprint.toolDefinitions({ functions, tools }),
|
|
17
|
+
tools: Blueprint.toolDefinitions({ functions, tools: [] }),
|
|
19
18
|
instructions: Template.make({
|
|
20
19
|
source: trim`
|
|
21
20
|
You can create and update kanban boards to show data in sorted columns defined by schema.
|
|
22
21
|
`,
|
|
23
22
|
}),
|
|
24
23
|
});
|
|
24
|
+
|
|
25
|
+
const blueprint: AppCapabilities.BlueprintDefinition = {
|
|
26
|
+
key: BLUEPRINT_KEY,
|
|
27
|
+
functions,
|
|
28
|
+
make,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default blueprint;
|
|
@@ -13,14 +13,15 @@ import { Capabilities, Capability, type PromiseIntentDispatcher } from '@dxos/ap
|
|
|
13
13
|
import { createArtifactElement } from '@dxos/assistant';
|
|
14
14
|
import { defineArtifact } from '@dxos/blueprints';
|
|
15
15
|
import { Obj, Query } from '@dxos/echo';
|
|
16
|
+
import { View } from '@dxos/echo';
|
|
16
17
|
import { invariant } from '@dxos/invariant';
|
|
17
18
|
import { SpaceOperation } from '@dxos/plugin-space/types';
|
|
18
19
|
import { Filter, type Space } from '@dxos/react-client/echo';
|
|
19
|
-
import {
|
|
20
|
-
import { View } from '@dxos/schema';
|
|
20
|
+
import { ViewModel } from '@dxos/schema';
|
|
21
21
|
import { isNonNullable } from '@dxos/util';
|
|
22
22
|
|
|
23
23
|
import { meta } from '../../meta';
|
|
24
|
+
import { Kanban } from '../../types';
|
|
24
25
|
|
|
25
26
|
const QualifiedId = Schema.String.annotations({
|
|
26
27
|
description: 'The fully qualified ID of the kanban `spaceID:objectID`',
|
|
@@ -43,7 +44,7 @@ export default Capability.makeModule(() =>
|
|
|
43
44
|
- When adding items, you must not include the 'id' field -- it is automatically generated
|
|
44
45
|
- BEFORE adding items, always make sure the board has been shown to the user!
|
|
45
46
|
`,
|
|
46
|
-
schema:
|
|
47
|
+
schema: Kanban.Kanban,
|
|
47
48
|
tools: [
|
|
48
49
|
createTool(meta.id, {
|
|
49
50
|
name: 'create',
|
|
@@ -69,7 +70,7 @@ export default Capability.makeModule(() =>
|
|
|
69
70
|
return ToolResult.Error(`Schema not found: ${typename}`);
|
|
70
71
|
}
|
|
71
72
|
|
|
72
|
-
const { view } = await
|
|
73
|
+
const { view } = await ViewModel.makeFromDatabase({
|
|
73
74
|
db: extensions.space.db,
|
|
74
75
|
typename,
|
|
75
76
|
pivotFieldName: pivotColumn,
|
|
@@ -100,7 +101,7 @@ export default Capability.makeModule(() =>
|
|
|
100
101
|
const boardInfo = await Promise.all(
|
|
101
102
|
objects.map(async (view) => {
|
|
102
103
|
const kanban = await view.presentation.load();
|
|
103
|
-
if (!Obj.instanceOf(
|
|
104
|
+
if (!Obj.instanceOf(Kanban.Kanban, kanban)) {
|
|
104
105
|
return null;
|
|
105
106
|
}
|
|
106
107
|
|
|
@@ -129,7 +130,7 @@ export default Capability.makeModule(() =>
|
|
|
129
130
|
.first()) as View.View;
|
|
130
131
|
|
|
131
132
|
const kanban = await view.presentation.load();
|
|
132
|
-
invariant(Obj.instanceOf(
|
|
133
|
+
invariant(Obj.instanceOf(Kanban.Kanban, kanban));
|
|
133
134
|
|
|
134
135
|
const typename = view.query.typename;
|
|
135
136
|
const schema = await space.db.schemaRegistry.query({ typename }).firstOrUndefined();
|
|
@@ -137,7 +138,7 @@ export default Capability.makeModule(() =>
|
|
|
137
138
|
|
|
138
139
|
return ToolResult.Success({
|
|
139
140
|
schema,
|
|
140
|
-
columnField:
|
|
141
|
+
columnField: view.projection.pivotFieldId,
|
|
141
142
|
viewFields: view.projection.fields,
|
|
142
143
|
});
|
|
143
144
|
},
|
|
@@ -4,20 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { Capability
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
8
9
|
|
|
9
10
|
import { KanbanBlueprint } from '../../blueprints';
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Capability.Capability<typeof
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
const blueprintDefinition = Capability.makeModule<[], BlueprintCapabilities>(() =>
|
|
17
|
-
Effect.succeed([
|
|
18
|
-
Capability.contributes(Common.Capability.Functions, KanbanBlueprint.functions),
|
|
19
|
-
Capability.contributes(Common.Capability.BlueprintDefinition, KanbanBlueprint.make()),
|
|
20
|
-
]),
|
|
21
|
-
);
|
|
12
|
+
const blueprintDefinition = Capability.makeModule<
|
|
13
|
+
[],
|
|
14
|
+
Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]
|
|
15
|
+
>(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, KanbanBlueprint)]));
|
|
22
16
|
|
|
23
17
|
export default blueprintDefinition;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capabilities, Capability, UndoMapping } from '@dxos/app-framework';
|
|
8
8
|
import { JsonSchema, Obj } from '@dxos/echo';
|
|
9
9
|
import { type EchoSchema } from '@dxos/echo/internal';
|
|
10
10
|
import { invariant } from '@dxos/invariant';
|
|
@@ -16,7 +16,7 @@ import { KanbanOperation } from '../../types';
|
|
|
16
16
|
|
|
17
17
|
export default Capability.makeModule(() =>
|
|
18
18
|
Effect.succeed([
|
|
19
|
-
Capability.contributes(
|
|
19
|
+
Capability.contributes(Capabilities.UndoMapping, [
|
|
20
20
|
UndoMapping.make({
|
|
21
21
|
operation: KanbanOperation.DeleteCardField,
|
|
22
22
|
inverse: KanbanOperation.RestoreCardField,
|
|
@@ -37,11 +37,11 @@ export default Capability.makeModule(() =>
|
|
|
37
37
|
message: ['card deleted label', { ns: meta.id }],
|
|
38
38
|
}),
|
|
39
39
|
]),
|
|
40
|
-
Capability.contributes(
|
|
40
|
+
Capability.contributes(Capabilities.OperationResolver, [
|
|
41
41
|
OperationResolver.make({
|
|
42
42
|
operation: KanbanOperation.DeleteCardField,
|
|
43
43
|
handler: Effect.fnUntraced(function* ({ view, fieldId }) {
|
|
44
|
-
const registry = yield* Capability.get(
|
|
44
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
45
45
|
const db = Obj.getDatabase(view);
|
|
46
46
|
invariant(db, 'Database not found');
|
|
47
47
|
const schema = yield* Effect.promise(() =>
|
|
@@ -91,7 +91,7 @@ export default Capability.makeModule(() =>
|
|
|
91
91
|
OperationResolver.make({
|
|
92
92
|
operation: KanbanOperation.RestoreCardField,
|
|
93
93
|
handler: Effect.fnUntraced(function* ({ view, field, props, index }) {
|
|
94
|
-
const registry = yield* Capability.get(
|
|
94
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
95
95
|
const db = Obj.getDatabase(view);
|
|
96
96
|
invariant(db, 'Database not found');
|
|
97
97
|
const schema = yield* Effect.promise(() =>
|
|
@@ -6,35 +6,35 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
import type * as Schema from 'effect/Schema';
|
|
7
7
|
import React, { useMemo } from 'react';
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
10
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
11
|
+
import { Database, JsonSchema, Obj } from '@dxos/echo';
|
|
12
|
+
import { type Collection } from '@dxos/echo';
|
|
11
13
|
import { findAnnotation } from '@dxos/effect';
|
|
12
14
|
import { type FormFieldComponentProps, SelectField, useFormValues } from '@dxos/react-ui-form';
|
|
13
|
-
import { Kanban } from '@dxos/react-ui-kanban/types';
|
|
14
|
-
import { type Collection } from '@dxos/schema';
|
|
15
15
|
|
|
16
|
-
import { KanbanContainer, KanbanViewEditor } from '../../
|
|
16
|
+
import { KanbanContainer, KanbanViewEditor } from '../../containers';
|
|
17
17
|
import { meta } from '../../meta';
|
|
18
|
-
import { PivotColumnAnnotationId } from '../../types';
|
|
18
|
+
import { Kanban, PivotColumnAnnotationId } from '../../types';
|
|
19
19
|
|
|
20
20
|
export default Capability.makeModule(() =>
|
|
21
21
|
Effect.succeed(
|
|
22
|
-
Capability.contributes(
|
|
23
|
-
|
|
22
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
23
|
+
Surface.create({
|
|
24
24
|
id: meta.id,
|
|
25
25
|
role: ['article', 'section'],
|
|
26
26
|
filter: (data): data is { subject: Kanban.Kanban } => Obj.instanceOf(Kanban.Kanban, data.subject),
|
|
27
27
|
component: ({ data, role }) => <KanbanContainer role={role} subject={data.subject} />,
|
|
28
28
|
}),
|
|
29
|
-
|
|
30
|
-
id: `${meta.id}
|
|
29
|
+
Surface.create({
|
|
30
|
+
id: `${meta.id}.object-settings`,
|
|
31
31
|
role: 'object-settings',
|
|
32
32
|
position: 'hoist',
|
|
33
33
|
filter: (data): data is { subject: Kanban.Kanban } => Obj.instanceOf(Kanban.Kanban, data.subject),
|
|
34
|
-
component: ({ data }) => <KanbanViewEditor
|
|
34
|
+
component: ({ data }) => <KanbanViewEditor subject={data.subject} />,
|
|
35
35
|
}),
|
|
36
|
-
|
|
37
|
-
id: `${meta.id}
|
|
36
|
+
Surface.create({
|
|
37
|
+
id: `${meta.id}.create-initial-schema-form-[pivot-column]`,
|
|
38
38
|
role: 'form-input',
|
|
39
39
|
filter: (
|
|
40
40
|
data,
|
|
@@ -59,7 +59,7 @@ export default Capability.makeModule(() =>
|
|
|
59
59
|
[db, typename],
|
|
60
60
|
);
|
|
61
61
|
const singleSelectColumns = useMemo(() => {
|
|
62
|
-
const properties =
|
|
62
|
+
const properties = JsonSchema.toJsonSchema(selectedSchema).properties;
|
|
63
63
|
if (!properties) {
|
|
64
64
|
return [];
|
|
65
65
|
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Atom, RegistryContext } from '@effect-atom/atom-react';
|
|
6
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
7
|
+
import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
|
|
8
|
+
|
|
9
|
+
import { Filter, JsonSchema, Obj, Query } from '@dxos/echo';
|
|
10
|
+
import { type View } from '@dxos/echo';
|
|
11
|
+
import { faker } from '@dxos/random';
|
|
12
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
13
|
+
import { withMosaic } from '@dxos/react-ui-mosaic/testing';
|
|
14
|
+
import { ProjectionModel, ViewModel, createEchoChangeCallback } from '@dxos/schema';
|
|
15
|
+
import { withRegistry } from '@dxos/storybook-utils';
|
|
16
|
+
import { Organization } from '@dxos/types';
|
|
17
|
+
|
|
18
|
+
import { createEchoChangeCallback as createKanbanChangeCallback } from '../../hooks';
|
|
19
|
+
import { KanbanCardTileSimple } from '../../testing';
|
|
20
|
+
import { translations } from '../../translations';
|
|
21
|
+
import { Kanban } from '../../types';
|
|
22
|
+
|
|
23
|
+
import { KanbanBoard } from './KanbanBoard';
|
|
24
|
+
|
|
25
|
+
faker.seed(1);
|
|
26
|
+
|
|
27
|
+
const createOrg = () => ({
|
|
28
|
+
name: faker.commerce.productName(),
|
|
29
|
+
description: faker.lorem.sentence(),
|
|
30
|
+
image: faker.image.url(),
|
|
31
|
+
website: faker.internet.url(),
|
|
32
|
+
status: faker.helpers.arrayElement(Organization.StatusOptions).id as Organization.Organization['status'],
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* In-memory Kanban board: View + ProjectionModel + Kanban + items, no plugin manager or Space.
|
|
37
|
+
* Similar to react-ui-kanban Kanban.stories.tsx.
|
|
38
|
+
*/
|
|
39
|
+
const DefaultStory = () => {
|
|
40
|
+
const registry = useContext(RegistryContext);
|
|
41
|
+
const items = useMemo(() => Atom.make<Obj.Unknown[]>([]), []);
|
|
42
|
+
const [state, setState] = useState<{
|
|
43
|
+
view: View.View;
|
|
44
|
+
kanban: Kanban.Kanban;
|
|
45
|
+
projection: ProjectionModel;
|
|
46
|
+
change: ReturnType<typeof createKanbanChangeCallback>;
|
|
47
|
+
}>();
|
|
48
|
+
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
const view = ViewModel.make({
|
|
51
|
+
query: Query.select(Filter.typename(Organization.Organization.typename)),
|
|
52
|
+
jsonSchema: JsonSchema.toJsonSchema(Organization.Organization),
|
|
53
|
+
pivotFieldName: 'status',
|
|
54
|
+
});
|
|
55
|
+
const kanban = Kanban.make({ view });
|
|
56
|
+
const change = createKanbanChangeCallback(kanban);
|
|
57
|
+
const projection = new ProjectionModel({
|
|
58
|
+
registry,
|
|
59
|
+
view,
|
|
60
|
+
baseSchema: JsonSchema.toJsonSchema(Organization.Organization),
|
|
61
|
+
change: createEchoChangeCallback(view),
|
|
62
|
+
});
|
|
63
|
+
projection.normalizeView();
|
|
64
|
+
|
|
65
|
+
const statuses = Organization.StatusOptions.map((o) => o.id);
|
|
66
|
+
const initialItems = Array.from({ length: 12 }, () =>
|
|
67
|
+
Obj.make(Organization.Organization, {
|
|
68
|
+
...createOrg(),
|
|
69
|
+
status: faker.helpers.arrayElement(statuses) as Organization.Organization['status'],
|
|
70
|
+
}),
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
setState({ view, kanban, projection, change });
|
|
74
|
+
registry.set(items, initialItems);
|
|
75
|
+
}, [registry, items]);
|
|
76
|
+
|
|
77
|
+
const columnFieldPath =
|
|
78
|
+
state?.projection.tryGetFieldProjection(state.projection.getFieldId('status') ?? '')?.props.property ?? 'status';
|
|
79
|
+
|
|
80
|
+
const handleCardAdd = useCallback(
|
|
81
|
+
(columnValue: string | undefined) => {
|
|
82
|
+
if (!state || !columnFieldPath || !registry) return undefined;
|
|
83
|
+
const card = Obj.make(Organization.Organization, {
|
|
84
|
+
...createOrg(),
|
|
85
|
+
...(columnFieldPath ? { [columnFieldPath]: columnValue } : {}),
|
|
86
|
+
});
|
|
87
|
+
const current = registry.get(items) ?? [];
|
|
88
|
+
registry.set(items, [...current, card]);
|
|
89
|
+
return card.id;
|
|
90
|
+
},
|
|
91
|
+
[state, columnFieldPath, registry, items],
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
const handleCardRemove = useCallback(
|
|
95
|
+
(card: Obj.Unknown) => {
|
|
96
|
+
if (!registry) return;
|
|
97
|
+
const current = registry.get(items) ?? [];
|
|
98
|
+
registry.set(
|
|
99
|
+
items,
|
|
100
|
+
current.filter((i) => i.id !== card.id),
|
|
101
|
+
);
|
|
102
|
+
},
|
|
103
|
+
[registry, items],
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
if (!state) {
|
|
107
|
+
return <></>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<KanbanBoard.Root
|
|
112
|
+
kanban={state.kanban}
|
|
113
|
+
projection={state.projection}
|
|
114
|
+
items={items}
|
|
115
|
+
itemTile={KanbanCardTileSimple}
|
|
116
|
+
change={state.change}
|
|
117
|
+
onCardAdd={handleCardAdd}
|
|
118
|
+
onCardRemove={handleCardRemove}
|
|
119
|
+
>
|
|
120
|
+
<KanbanBoard.Content />
|
|
121
|
+
</KanbanBoard.Root>
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const meta = {
|
|
126
|
+
title: 'plugins/plugin-kanban/components/KanbanBoard',
|
|
127
|
+
component: DefaultStory,
|
|
128
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' }), withMosaic(), withRegistry],
|
|
129
|
+
parameters: {
|
|
130
|
+
layout: 'fullscreen',
|
|
131
|
+
translations,
|
|
132
|
+
},
|
|
133
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
134
|
+
|
|
135
|
+
export default meta;
|
|
136
|
+
|
|
137
|
+
type Story = StoryObj<typeof meta>;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* In-memory board with Echo-shaped objects. No plugin manager, client, or Space.
|
|
141
|
+
*/
|
|
142
|
+
export const Default: Story = {};
|