@dxos/plugin-kanban 0.8.4-main.9735255 → 0.8.4-main.abd8ff62ef
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/blueprints/index.mjs +23 -4
- package/dist/lib/browser/blueprints/index.mjs.map +4 -4
- package/dist/lib/browser/chunk-T32TEM55.mjs +105 -0
- package/dist/lib/browser/chunk-T32TEM55.mjs.map +7 -0
- package/dist/lib/browser/delete-card-7OSCNCW2.mjs +24 -0
- package/dist/lib/browser/delete-card-7OSCNCW2.mjs.map +7 -0
- package/dist/lib/browser/delete-card-field-NSB2RE3Z.mjs +42 -0
- package/dist/lib/browser/delete-card-field-NSB2RE3Z.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +20 -89
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +13 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/restore-card-FO3WERIE.mjs +21 -0
- package/dist/lib/browser/restore-card-FO3WERIE.mjs.map +7 -0
- package/dist/lib/browser/restore-card-field-U5XYEEOW.mjs +40 -0
- package/dist/lib/browser/restore-card-field-U5XYEEOW.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +44 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +154 -8
- package/dist/lib/browser/types/index.mjs.map +4 -4
- package/dist/lib/node-esm/blueprints/index.mjs +23 -4
- package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-W2RNFBMZ.mjs +106 -0
- package/dist/lib/node-esm/chunk-W2RNFBMZ.mjs.map +7 -0
- package/dist/lib/node-esm/delete-card-ZIREL6HN.mjs +25 -0
- package/dist/lib/node-esm/delete-card-ZIREL6HN.mjs.map +7 -0
- package/dist/lib/node-esm/delete-card-field-IPTEGVPP.mjs +43 -0
- package/dist/lib/node-esm/delete-card-field-IPTEGVPP.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +20 -89
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operations/index.mjs +14 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/restore-card-WJJ4YB7K.mjs +22 -0
- package/dist/lib/node-esm/restore-card-WJJ4YB7K.mjs.map +7 -0
- package/dist/lib/node-esm/restore-card-field-L24WJXAW.mjs +41 -0
- package/dist/lib/node-esm/restore-card-field-L24WJXAW.mjs.map +7 -0
- package/dist/lib/node-esm/translations.mjs +45 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +154 -8
- package/dist/lib/node-esm/types/index.mjs.map +4 -4
- package/dist/types/src/KanbanPlugin.d.ts +1 -0
- package/dist/types/src/KanbanPlugin.d.ts.map +1 -1
- package/dist/types/src/KanbanPlugin.node.d.ts +4 -0
- package/dist/types/src/KanbanPlugin.node.d.ts.map +1 -0
- package/dist/types/src/KanbanPlugin.test.d.ts +2 -0
- package/dist/types/src/KanbanPlugin.test.d.ts.map +1 -0
- 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 → artifact-definition.d.ts} +1 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +7 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +5 -0
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts +5 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
- package/dist/types/src/components/KanbanBoard/KanbanBoard.d.ts +57 -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/containers/KanbanContainer/KanbanContainer.stories.d.ts +79 -0
- package/dist/types/src/containers/KanbanContainer/KanbanContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/KanbanContainer/index.d.ts +2 -0
- package/dist/types/src/containers/KanbanContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/KanbanSettings/KanbanSettings.d.ts +13 -0
- package/dist/types/src/containers/KanbanSettings/KanbanSettings.d.ts.map +1 -0
- package/dist/types/src/containers/KanbanSettings/index.d.ts +2 -0
- package/dist/types/src/containers/KanbanSettings/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 +7 -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/useItemsProjection.d.ts +10 -0
- package/dist/types/src/hooks/useItemsProjection.d.ts.map +1 -0
- package/dist/types/src/hooks/useKanbanBoardModel.browser.test.d.ts +2 -0
- package/dist/types/src/hooks/useKanbanBoardModel.browser.test.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/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/index.d.ts +2 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +52 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/delete-card-field.d.ts +5 -0
- package/dist/types/src/operations/delete-card-field.d.ts.map +1 -0
- package/dist/types/src/operations/delete-card.d.ts +5 -0
- package/dist/types/src/operations/delete-card.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/restore-card-field.d.ts +5 -0
- package/dist/types/src/operations/restore-card-field.d.ts.map +1 -0
- package/dist/types/src/operations/restore-card.d.ts +5 -0
- package/dist/types/src/operations/restore-card.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 +7 -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 +48 -32
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Kanban.d.ts +109 -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/migrations.test.d.ts +2 -0
- package/dist/types/src/types/migrations.test.d.ts.map +1 -0
- package/dist/types/src/types/schema.d.ts +15 -104
- 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 +72 -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 +74 -52
- package/src/KanbanPlugin.node.ts +55 -0
- package/src/KanbanPlugin.test.ts +31 -0
- package/src/KanbanPlugin.tsx +42 -24
- package/src/blueprints/index.ts +1 -1
- package/src/blueprints/kanban-blueprint.ts +12 -9
- package/src/capabilities/{artifact-definition/artifact-definition.ts → artifact-definition.ts} +11 -10
- package/src/capabilities/blueprint-definition.ts +19 -0
- package/src/capabilities/index.ts +12 -3
- package/src/capabilities/migrations.ts +35 -0
- package/src/capabilities/operation-handler.ts +14 -0
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +31 -22
- package/src/capabilities/undo-mappings.ts +34 -0
- package/src/components/KanbanBoard/KanbanBoard.stories.tsx +146 -0
- package/src/components/KanbanBoard/KanbanBoard.tsx +198 -0
- package/src/components/KanbanBoard/KanbanCard.tsx +98 -0
- package/src/components/KanbanBoard/KanbanColumn.tsx +71 -0
- package/src/components/KanbanBoard/index.ts +5 -0
- package/src/components/index.ts +1 -2
- package/src/{components → containers/KanbanContainer}/KanbanContainer.stories.tsx +85 -96
- package/src/containers/KanbanContainer/KanbanContainer.tsx +178 -0
- package/src/containers/KanbanContainer/index.ts +5 -0
- package/src/containers/KanbanSettings/KanbanSettings.tsx +94 -0
- package/src/containers/KanbanSettings/index.ts +5 -0
- package/src/containers/index.ts +8 -0
- package/src/hooks/index.ts +10 -0
- package/src/hooks/useEchoChangeCallback.ts +30 -0
- package/src/hooks/useItemsProjection.ts +44 -0
- package/src/hooks/useKanbanBoardModel.browser.test.ts +235 -0
- package/src/hooks/useKanbanBoardModel.ts +157 -0
- package/src/hooks/useKanbanColumnEventHandler.ts +106 -0
- package/src/hooks/useKanbanItemEventHandler.ts +133 -0
- package/src/hooks/useProjectionModel.ts +58 -0
- package/src/index.ts +6 -2
- package/src/meta.ts +1 -1
- package/src/operations/definitions.ts +63 -0
- package/src/operations/delete-card-field.ts +47 -0
- package/src/operations/delete-card.ts +23 -0
- package/src/operations/index.ts +12 -0
- package/src/operations/restore-card-field.ts +41 -0
- package/src/operations/restore-card.ts +21 -0
- 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 +82 -0
- package/src/testing/index.ts +5 -0
- package/src/translations.ts +26 -18
- package/src/types/Kanban.ts +151 -0
- package/src/types/constants.ts +9 -0
- package/src/types/index.ts +2 -0
- package/src/types/migrations.test.ts +83 -0
- package/src/types/schema.ts +19 -77
- package/src/types/types.ts +35 -0
- package/src/util/arrangement.test.ts +218 -0
- package/src/util/arrangement.ts +177 -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 +0 -35
- 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 +0 -162
- 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 +0 -18
- 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 +0 -36
- package/dist/lib/node-esm/chunk-ZHRMUKTF.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-5RPWHZCF.mjs +0 -163
- 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/capabilities/artifact-definition/artifact-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/artifact-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/artifact-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -9
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- 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 +0 -75
- 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/capabilities/artifact-definition/index.ts +0 -7
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +0 -23
- package/src/capabilities/blueprint-definition/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -133
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/components/KanbanContainer.tsx +0 -86
- package/src/components/KanbanViewEditor.tsx +0 -59
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.abd8ff62ef",
|
|
4
4
|
"description": "Kanban DXOS Surface plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -12,90 +12,112 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#blueprints": "./src/blueprints/index.ts",
|
|
17
|
+
"#capabilities": "./src/capabilities/index.ts",
|
|
18
|
+
"#components": "./src/components/index.ts",
|
|
19
|
+
"#containers": "./src/containers/index.ts",
|
|
20
|
+
"#hooks": "./src/hooks/index.ts",
|
|
21
|
+
"#meta": "./src/meta.ts",
|
|
22
|
+
"#operations": "./src/operations/index.ts",
|
|
23
|
+
"#plugin": {
|
|
24
|
+
"browser": "./src/KanbanPlugin.tsx",
|
|
25
|
+
"node": "./src/KanbanPlugin.node.ts",
|
|
26
|
+
"default": "./src/KanbanPlugin.tsx"
|
|
27
|
+
},
|
|
28
|
+
"#testing": "./src/testing/index.ts",
|
|
29
|
+
"#translations": "./src/translations.ts",
|
|
30
|
+
"#types": "./src/types/index.ts"
|
|
31
|
+
},
|
|
15
32
|
"exports": {
|
|
16
33
|
".": {
|
|
34
|
+
"source": "./src/index.ts",
|
|
17
35
|
"browser": "./dist/lib/browser/index.mjs",
|
|
18
36
|
"node": "./dist/lib/node-esm/index.mjs",
|
|
19
|
-
"source": "./src/index.ts",
|
|
20
37
|
"types": "./dist/types/src/index.d.ts"
|
|
21
38
|
},
|
|
22
39
|
"./blueprints": {
|
|
40
|
+
"source": "./src/blueprints/index.ts",
|
|
23
41
|
"browser": "./dist/lib/browser/blueprints/index.mjs",
|
|
24
42
|
"node": "./dist/lib/node-esm/blueprints/index.mjs",
|
|
25
|
-
"source": "./src/blueprints/index.ts",
|
|
26
43
|
"types": "./dist/types/src/blueprints/index.d.ts"
|
|
27
44
|
},
|
|
45
|
+
"./operations": {
|
|
46
|
+
"source": "./src/operations/index.ts",
|
|
47
|
+
"browser": "./dist/lib/browser/operations/index.mjs",
|
|
48
|
+
"node": "./dist/lib/node-esm/operations/index.mjs",
|
|
49
|
+
"types": "./dist/types/src/operations/index.d.ts"
|
|
50
|
+
},
|
|
51
|
+
"./translations": {
|
|
52
|
+
"source": "./src/translations.ts",
|
|
53
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
54
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
55
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
56
|
+
},
|
|
28
57
|
"./types": {
|
|
58
|
+
"source": "./src/types/index.ts",
|
|
29
59
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
30
60
|
"node": "./dist/lib/node-esm/types/index.mjs",
|
|
31
|
-
"source": "./src/types/index.ts",
|
|
32
61
|
"types": "./dist/types/src/types/index.d.ts"
|
|
33
62
|
}
|
|
34
63
|
},
|
|
35
64
|
"types": "dist/types/src/index.d.ts",
|
|
36
|
-
"typesVersions": {
|
|
37
|
-
"*": {
|
|
38
|
-
"blueprints": [
|
|
39
|
-
"dist/types/src/blueprints/index.d.ts"
|
|
40
|
-
],
|
|
41
|
-
"types": [
|
|
42
|
-
"dist/types/src/types/index.d.ts"
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
65
|
"files": [
|
|
47
66
|
"dist",
|
|
48
67
|
"src"
|
|
49
68
|
],
|
|
50
69
|
"dependencies": {
|
|
51
|
-
"@effect-atom/atom-react": "^0.
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
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/plugin-
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/react-
|
|
72
|
-
"@dxos/react-ui-form": "0.8.4-main.
|
|
73
|
-
"@dxos/react-ui-
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
70
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
71
|
+
"@radix-ui/react-context": "1.1.1",
|
|
72
|
+
"effect": "3.20.0",
|
|
73
|
+
"@dxos/ai": "0.8.4-main.abd8ff62ef",
|
|
74
|
+
"@dxos/app-framework": "0.8.4-main.abd8ff62ef",
|
|
75
|
+
"@dxos/async": "0.8.4-main.abd8ff62ef",
|
|
76
|
+
"@dxos/compute": "0.8.4-main.abd8ff62ef",
|
|
77
|
+
"@dxos/app-toolkit": "0.8.4-main.abd8ff62ef",
|
|
78
|
+
"@dxos/assistant": "0.8.4-main.abd8ff62ef",
|
|
79
|
+
"@dxos/echo": "0.8.4-main.abd8ff62ef",
|
|
80
|
+
"@dxos/echo-atom": "0.8.4-main.abd8ff62ef",
|
|
81
|
+
"@dxos/effect": "0.8.4-main.abd8ff62ef",
|
|
82
|
+
"@dxos/log": "0.8.4-main.abd8ff62ef",
|
|
83
|
+
"@dxos/invariant": "0.8.4-main.abd8ff62ef",
|
|
84
|
+
"@dxos/plugin-client": "0.8.4-main.abd8ff62ef",
|
|
85
|
+
"@dxos/plugin-search": "0.8.4-main.abd8ff62ef",
|
|
86
|
+
"@dxos/plugin-graph": "0.8.4-main.abd8ff62ef",
|
|
87
|
+
"@dxos/plugin-space": "0.8.4-main.abd8ff62ef",
|
|
88
|
+
"@dxos/react-ui": "0.8.4-main.abd8ff62ef",
|
|
89
|
+
"@dxos/random": "0.8.4-main.abd8ff62ef",
|
|
90
|
+
"@dxos/react-client": "0.8.4-main.abd8ff62ef",
|
|
91
|
+
"@dxos/react-ui-form": "0.8.4-main.abd8ff62ef",
|
|
92
|
+
"@dxos/react-ui-menu": "0.8.4-main.abd8ff62ef",
|
|
93
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.abd8ff62ef",
|
|
94
|
+
"@dxos/react-ui-stack": "0.8.4-main.abd8ff62ef",
|
|
95
|
+
"@dxos/schema": "0.8.4-main.abd8ff62ef",
|
|
96
|
+
"@dxos/types": "0.8.4-main.abd8ff62ef",
|
|
97
|
+
"@dxos/util": "0.8.4-main.abd8ff62ef"
|
|
78
98
|
},
|
|
79
99
|
"devDependencies": {
|
|
80
100
|
"@types/react": "~19.2.7",
|
|
81
101
|
"@types/react-dom": "~19.2.3",
|
|
82
102
|
"react": "~19.2.3",
|
|
83
103
|
"react-dom": "~19.2.3",
|
|
84
|
-
"vite": "
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/plugin-
|
|
87
|
-
"@dxos/plugin-theme": "0.8.4-main.
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/ui-
|
|
104
|
+
"vite": "^8.0.10",
|
|
105
|
+
"@dxos/echo-db": "0.8.4-main.abd8ff62ef",
|
|
106
|
+
"@dxos/plugin-testing": "0.8.4-main.abd8ff62ef",
|
|
107
|
+
"@dxos/plugin-theme": "0.8.4-main.abd8ff62ef",
|
|
108
|
+
"@dxos/plugin-preview": "0.8.4-main.abd8ff62ef",
|
|
109
|
+
"@dxos/storybook-utils": "0.8.4-main.abd8ff62ef",
|
|
110
|
+
"@dxos/keys": "0.8.4-main.abd8ff62ef",
|
|
111
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.abd8ff62ef",
|
|
112
|
+
"@dxos/test-utils": "0.8.4-main.abd8ff62ef",
|
|
113
|
+
"@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
|
|
92
114
|
},
|
|
93
115
|
"peerDependencies": {
|
|
94
|
-
"effect": "3.
|
|
116
|
+
"effect": "3.20.0",
|
|
95
117
|
"react": "~19.2.3",
|
|
96
118
|
"react-dom": "~19.2.3",
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/ui
|
|
119
|
+
"@dxos/ui-theme": "0.8.4-main.abd8ff62ef",
|
|
120
|
+
"@dxos/react-ui": "0.8.4-main.abd8ff62ef"
|
|
99
121
|
},
|
|
100
122
|
"publishConfig": {
|
|
101
123
|
"access": "public"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
7
|
+
|
|
8
|
+
import { Plugin } from '@dxos/app-framework';
|
|
9
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
|
+
import { Annotation, Type } from '@dxos/echo';
|
|
12
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
13
|
+
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
14
|
+
import { ViewModel } from '@dxos/schema';
|
|
15
|
+
|
|
16
|
+
import { BlueprintDefinition, OperationHandler, UndoMappings } from '#capabilities';
|
|
17
|
+
import { meta } from '#meta';
|
|
18
|
+
import { CreateKanbanSchema, Kanban } from '#types';
|
|
19
|
+
|
|
20
|
+
export const KanbanPlugin = Plugin.define(meta).pipe(
|
|
21
|
+
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
22
|
+
AppPlugin.addMetadataModule({
|
|
23
|
+
metadata: {
|
|
24
|
+
id: Type.getTypename(Kanban.Kanban),
|
|
25
|
+
metadata: {
|
|
26
|
+
icon: Annotation.IconAnnotation.get(Kanban.Kanban).pipe(Option.getOrThrow).icon,
|
|
27
|
+
iconHue: Annotation.IconAnnotation.get(Kanban.Kanban).pipe(Option.getOrThrow).hue ?? 'white',
|
|
28
|
+
inputSchema: CreateKanbanSchema,
|
|
29
|
+
createObject: ((props, options) =>
|
|
30
|
+
Effect.gen(function* () {
|
|
31
|
+
const object = yield* Effect.promise(async () => {
|
|
32
|
+
const { view } = await ViewModel.makeFromDatabase({
|
|
33
|
+
db: options.db,
|
|
34
|
+
typename: props.typename,
|
|
35
|
+
pivotFieldName: props.initialPivotColumn,
|
|
36
|
+
});
|
|
37
|
+
return Kanban.make({ name: props.name, view });
|
|
38
|
+
});
|
|
39
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
40
|
+
object,
|
|
41
|
+
target: options.target,
|
|
42
|
+
hidden: true,
|
|
43
|
+
targetNodeId: options.targetNodeId,
|
|
44
|
+
});
|
|
45
|
+
})) satisfies CreateObject,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
}),
|
|
49
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
50
|
+
AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),
|
|
51
|
+
AppPlugin.addSchemaModule({ schema: [Kanban.Kanban] }),
|
|
52
|
+
Plugin.make,
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
export default KanbanPlugin;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
8
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
9
|
+
|
|
10
|
+
import { KanbanPlugin } from '#plugin';
|
|
11
|
+
|
|
12
|
+
import { meta } from './meta';
|
|
13
|
+
|
|
14
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
15
|
+
|
|
16
|
+
describe('KanbanPlugin', () => {
|
|
17
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
18
|
+
await using harness = await createComposerTestApp({
|
|
19
|
+
plugins: [KanbanPlugin()],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// After autoStart: OperationHandler and UndoMappings auto-cascade from OperationPlugin.
|
|
23
|
+
expect(harness.manager.getActive()).toEqual(
|
|
24
|
+
expect.arrayContaining([moduleId('OperationHandler'), moduleId('UndoMappings')]),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
// BlueprintDefinition fires when AssistantPlugin loads blueprint definitions.
|
|
28
|
+
await harness.fire(AppActivationEvents.SetupArtifactDefinition);
|
|
29
|
+
expect(harness.manager.getActive()).toContain(moduleId('BlueprintDefinition'));
|
|
30
|
+
});
|
|
31
|
+
});
|
package/src/KanbanPlugin.tsx
CHANGED
|
@@ -3,43 +3,61 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import { Plugin } from '@dxos/app-framework';
|
|
9
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
|
+
import { Annotation, Type } from '@dxos/echo';
|
|
12
|
+
import { ClientEvents } from '@dxos/plugin-client/types';
|
|
13
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
9
14
|
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';
|
|
15
|
+
import { ViewModel } from '@dxos/schema';
|
|
13
16
|
|
|
14
|
-
import { BlueprintDefinition,
|
|
15
|
-
import { meta } from '
|
|
16
|
-
import { translations } from '
|
|
17
|
-
import { CreateKanbanSchema } from '
|
|
17
|
+
import { BlueprintDefinition, Migrations, OperationHandler, UndoMappings, ReactSurface } from '#capabilities';
|
|
18
|
+
import { meta } from '#meta';
|
|
19
|
+
import { translations } from '#translations';
|
|
20
|
+
import { CreateKanbanSchema, Kanban } from '#types';
|
|
18
21
|
|
|
19
22
|
export const KanbanPlugin = Plugin.define(meta).pipe(
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
24
|
+
AppPlugin.addMetadataModule({
|
|
22
25
|
metadata: {
|
|
23
26
|
id: Type.getTypename(Kanban.Kanban),
|
|
24
27
|
metadata: {
|
|
25
|
-
icon:
|
|
26
|
-
iconHue: '
|
|
28
|
+
icon: Annotation.IconAnnotation.get(Kanban.Kanban).pipe(Option.getOrThrow).icon,
|
|
29
|
+
iconHue: Annotation.IconAnnotation.get(Kanban.Kanban).pipe(Option.getOrThrow).hue ?? 'white',
|
|
27
30
|
inputSchema: CreateKanbanSchema,
|
|
28
|
-
createObject: ((props,
|
|
29
|
-
Effect.
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
createObject: ((props, options) =>
|
|
32
|
+
Effect.gen(function* () {
|
|
33
|
+
const object = yield* Effect.promise(async () => {
|
|
34
|
+
const { view } = await ViewModel.makeFromDatabase({
|
|
35
|
+
db: options.db,
|
|
36
|
+
typename: props.typename,
|
|
37
|
+
pivotFieldName: props.initialPivotColumn,
|
|
38
|
+
});
|
|
39
|
+
return Kanban.make({ name: props.name, view });
|
|
40
|
+
});
|
|
41
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
42
|
+
object,
|
|
43
|
+
target: options.target,
|
|
44
|
+
hidden: true,
|
|
45
|
+
targetNodeId: options.targetNodeId,
|
|
34
46
|
});
|
|
35
|
-
return Kanban.make({ name: props.name, view });
|
|
36
47
|
})) satisfies CreateObject,
|
|
37
48
|
},
|
|
38
49
|
},
|
|
39
50
|
}),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
52
|
+
AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),
|
|
53
|
+
AppPlugin.addSchemaModule({ schema: [Kanban.Kanban] }),
|
|
54
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
55
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
56
|
+
Plugin.addModule({
|
|
57
|
+
activatesOn: ClientEvents.SetupMigration,
|
|
58
|
+
activate: Migrations,
|
|
59
|
+
}),
|
|
44
60
|
Plugin.make,
|
|
45
61
|
);
|
|
62
|
+
|
|
63
|
+
export default KanbanPlugin;
|
package/src/blueprints/index.ts
CHANGED
|
@@ -2,23 +2,26 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Blueprint, Template } from '@dxos/
|
|
6
|
-
import { type FunctionDefinition } from '@dxos/functions';
|
|
5
|
+
import { Blueprint, Template } from '@dxos/compute';
|
|
7
6
|
import { trim } from '@dxos/util';
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
export const tools: string[] = [];
|
|
8
|
+
const BLUEPRINT_KEY = 'org.dxos.blueprint.kanban';
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export const make = () =>
|
|
10
|
+
const make = () =>
|
|
15
11
|
Blueprint.make({
|
|
16
|
-
key:
|
|
12
|
+
key: BLUEPRINT_KEY,
|
|
17
13
|
name: 'Kanban',
|
|
18
|
-
tools: Blueprint.toolDefinitions({
|
|
14
|
+
tools: Blueprint.toolDefinitions({ tools: [] }),
|
|
19
15
|
instructions: Template.make({
|
|
20
16
|
source: trim`
|
|
21
17
|
You can create and update kanban boards to show data in sorted columns defined by schema.
|
|
22
18
|
`,
|
|
23
19
|
}),
|
|
24
20
|
});
|
|
21
|
+
|
|
22
|
+
const blueprint: Blueprint.Definition = {
|
|
23
|
+
key: BLUEPRINT_KEY,
|
|
24
|
+
make,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default blueprint;
|
package/src/capabilities/{artifact-definition/artifact-definition.ts → artifact-definition.ts}
RENAMED
|
@@ -11,16 +11,17 @@ import * as Schema from 'effect/Schema';
|
|
|
11
11
|
import { ToolResult, createTool } from '@dxos/ai';
|
|
12
12
|
import { Capabilities, Capability, type PromiseIntentDispatcher } from '@dxos/app-framework';
|
|
13
13
|
import { createArtifactElement } from '@dxos/assistant';
|
|
14
|
-
import { defineArtifact } from '@dxos/
|
|
14
|
+
import { defineArtifact } from '@dxos/compute';
|
|
15
15
|
import { Obj, Query } from '@dxos/echo';
|
|
16
|
+
import { View } from '@dxos/echo';
|
|
16
17
|
import { invariant } from '@dxos/invariant';
|
|
17
|
-
import { SpaceOperation } from '@dxos/plugin-space/
|
|
18
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
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
|
-
import { meta } from '
|
|
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
|
},
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
10
|
+
import type { Blueprint } from '@dxos/compute';
|
|
11
|
+
|
|
12
|
+
import { KanbanBlueprint } from '#blueprints';
|
|
13
|
+
|
|
14
|
+
const blueprintDefinition = Capability.makeModule<
|
|
15
|
+
[],
|
|
16
|
+
Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]
|
|
17
|
+
>(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, KanbanBlueprint)]));
|
|
18
|
+
|
|
19
|
+
export default blueprintDefinition;
|
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
7
|
+
import type { Blueprint, OperationHandlerSet } from '@dxos/compute';
|
|
8
|
+
|
|
9
|
+
export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
|
|
10
|
+
export const Migrations = Capability.lazy('Migrations', () => import('./migrations'));
|
|
11
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
12
|
+
'OperationHandler',
|
|
13
|
+
() => import('./operation-handler'),
|
|
14
|
+
);
|
|
15
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
16
|
+
export const UndoMappings = Capability.lazy('UndoMappings', () => import('./undo-mappings'));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { defineObjectMigration } from '@dxos/client/echo';
|
|
9
|
+
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
10
|
+
|
|
11
|
+
import { Kanban } from '#types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* v0.1.0 → v0.2.0: nests the existing `view` ref under a `spec: { kind: 'view', view }`
|
|
15
|
+
* discriminated union. v0.2.0 introduced an items-variant for externally-synced kanbans;
|
|
16
|
+
* pre-migration objects were all view-based by construction.
|
|
17
|
+
*/
|
|
18
|
+
const migrations = [
|
|
19
|
+
defineObjectMigration({
|
|
20
|
+
from: Kanban.KanbanV1,
|
|
21
|
+
to: Kanban.Kanban,
|
|
22
|
+
transform: async (from) => ({
|
|
23
|
+
name: from.name,
|
|
24
|
+
arrangement: from.arrangement,
|
|
25
|
+
spec: { kind: 'view' as const, view: from.view },
|
|
26
|
+
}),
|
|
27
|
+
onMigration: async () => {},
|
|
28
|
+
}),
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
export default Capability.makeModule(
|
|
32
|
+
Effect.fnUntraced(function* () {
|
|
33
|
+
return Capability.contributes(ClientCapabilities.Migration, migrations);
|
|
34
|
+
}),
|
|
35
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright 2025 DXOS.org
|
|
2
|
+
|
|
3
|
+
import * as Effect from 'effect/Effect';
|
|
4
|
+
|
|
5
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
6
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
7
|
+
|
|
8
|
+
import { KanbanOperationHandlerSet } from '#operations';
|
|
9
|
+
|
|
10
|
+
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
11
|
+
Effect.fnUntraced(function* () {
|
|
12
|
+
return Capability.contributes(Capabilities.OperationHandler, KanbanOperationHandlerSet);
|
|
13
|
+
}),
|
|
14
|
+
);
|
|
@@ -4,37 +4,40 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import type * as Schema from 'effect/Schema';
|
|
7
|
+
import * as SchemaAST from 'effect/SchemaAST';
|
|
7
8
|
import React, { useMemo } from 'react';
|
|
8
9
|
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
10
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
11
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
12
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
13
|
+
import { Database, JsonSchema, Obj } from '@dxos/echo';
|
|
14
|
+
import { type Collection } from '@dxos/echo';
|
|
11
15
|
import { findAnnotation } from '@dxos/effect';
|
|
12
16
|
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
17
|
|
|
16
|
-
import { KanbanContainer,
|
|
17
|
-
import {
|
|
18
|
-
import { PivotColumnAnnotationId } from '../../types';
|
|
18
|
+
import { KanbanContainer, KanbanSettings } from '#containers';
|
|
19
|
+
import { Kanban, PivotColumnAnnotationId } from '#types';
|
|
19
20
|
|
|
20
21
|
export default Capability.makeModule(() =>
|
|
21
22
|
Effect.succeed(
|
|
22
|
-
Capability.contributes(
|
|
23
|
-
|
|
24
|
-
id:
|
|
25
|
-
|
|
26
|
-
filter:
|
|
23
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
24
|
+
Surface.create({
|
|
25
|
+
id: 'root',
|
|
26
|
+
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
27
|
+
filter: AppSurface.oneOf(
|
|
28
|
+
AppSurface.object(AppSurface.Article, Kanban.Kanban),
|
|
29
|
+
AppSurface.object(AppSurface.Section, Kanban.Kanban),
|
|
30
|
+
),
|
|
27
31
|
component: ({ data, role }) => <KanbanContainer role={role} subject={data.subject} />,
|
|
28
32
|
}),
|
|
29
|
-
|
|
30
|
-
id:
|
|
31
|
-
role: 'object-settings',
|
|
33
|
+
Surface.create({
|
|
34
|
+
id: 'object-properties',
|
|
32
35
|
position: 'hoist',
|
|
33
|
-
filter: (
|
|
34
|
-
component: ({ data }) => <
|
|
36
|
+
filter: AppSurface.object(AppSurface.ObjectProperties, Kanban.Kanban),
|
|
37
|
+
component: ({ data }) => <KanbanSettings subject={data.subject} />,
|
|
35
38
|
}),
|
|
36
|
-
|
|
37
|
-
id:
|
|
39
|
+
Surface.create({
|
|
40
|
+
id: 'create-initial-schema-form-[pivot-column]',
|
|
38
41
|
role: 'form-input',
|
|
39
42
|
filter: (
|
|
40
43
|
data,
|
|
@@ -42,12 +45,18 @@ export default Capability.makeModule(() =>
|
|
|
42
45
|
prop: string;
|
|
43
46
|
schema: Schema.Schema<any>;
|
|
44
47
|
target: Database.Database | Collection.Collection | undefined;
|
|
48
|
+
fieldPropertyAst?: SchemaAST.AST;
|
|
45
49
|
} => {
|
|
46
50
|
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, PivotColumnAnnotationId);
|
|
47
51
|
return !!annotation;
|
|
48
52
|
},
|
|
49
|
-
component: ({ data: { target }, ...inputProps }) => {
|
|
50
|
-
const
|
|
53
|
+
component: ({ data: { target, fieldPropertyAst }, ...inputProps }) => {
|
|
54
|
+
const ast = fieldPropertyAst;
|
|
55
|
+
if (!ast) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const props = { ...inputProps, type: ast } as any as FormFieldComponentProps;
|
|
51
60
|
const db = Database.isDatabase(target) ? target : target && Obj.getDatabase(target);
|
|
52
61
|
if (!db) {
|
|
53
62
|
return null;
|
|
@@ -59,7 +68,7 @@ export default Capability.makeModule(() =>
|
|
|
59
68
|
[db, typename],
|
|
60
69
|
);
|
|
61
70
|
const singleSelectColumns = useMemo(() => {
|
|
62
|
-
const properties =
|
|
71
|
+
const properties = JsonSchema.toJsonSchema(selectedSchema).properties;
|
|
63
72
|
if (!properties) {
|
|
64
73
|
return [];
|
|
65
74
|
}
|