@dxos/plugin-kanban 0.8.2-main.fbd8ed0 → 0.8.2-staging.7ac8446
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/{artifact-definition-HABFQLG4.mjs → artifact-definition-SVNHDJQT.mjs} +12 -12
- package/dist/lib/browser/artifact-definition-SVNHDJQT.mjs.map +7 -0
- package/dist/lib/browser/{chunk-6JAA7YSW.mjs → chunk-K5BYEZ4Z.mjs} +35 -23
- package/dist/lib/browser/chunk-K5BYEZ4Z.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +4 -4
- package/dist/lib/browser/intent-resolver-XCDQ5N3Q.mjs +132 -0
- package/dist/lib/browser/intent-resolver-XCDQ5N3Q.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-BIBGD5OD.mjs → react-surface-5DLU7L63.mjs} +37 -69
- package/dist/lib/browser/react-surface-5DLU7L63.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +3 -1
- package/dist/lib/node/{artifact-definition-M57SFWWP.cjs → artifact-definition-M2XAYUI2.cjs} +19 -19
- package/dist/lib/node/artifact-definition-M2XAYUI2.cjs.map +7 -0
- package/dist/lib/node/{chunk-O4U7ZQ2I.cjs → chunk-3EUR6ZR2.cjs} +38 -25
- package/dist/lib/node/chunk-3EUR6ZR2.cjs.map +7 -0
- package/dist/lib/node/index.cjs +16 -16
- package/dist/lib/node/intent-resolver-P3PSZO7H.cjs +146 -0
- package/dist/lib/node/intent-resolver-P3PSZO7H.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-ZABOI7UC.cjs → react-surface-OWAYP7VQ.cjs} +43 -75
- package/dist/lib/node/react-surface-OWAYP7VQ.cjs.map +7 -0
- package/dist/lib/node/types.cjs +8 -6
- package/dist/lib/node/types.cjs.map +2 -2
- package/dist/lib/node-esm/{artifact-definition-OLVK4DCO.mjs → artifact-definition-HQ5I2OO5.mjs} +12 -12
- package/dist/lib/node-esm/artifact-definition-HQ5I2OO5.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-NOC32MF5.mjs → chunk-2N7CO3DI.mjs} +35 -23
- package/dist/lib/node-esm/chunk-2N7CO3DI.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +4 -4
- package/dist/lib/node-esm/intent-resolver-4G47V67J.mjs +133 -0
- package/dist/lib/node-esm/intent-resolver-4G47V67J.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-LDR423Y7.mjs → react-surface-CLEITUUD.mjs} +37 -69
- package/dist/lib/node-esm/react-surface-CLEITUUD.mjs.map +7 -0
- package/dist/lib/node-esm/types.mjs +3 -1
- package/dist/types/src/capabilities/index.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/KanbanContainer.d.ts.map +1 -1
- package/dist/types/src/components/KanbanViewEditor.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +28 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +50 -34
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -30
- package/src/capabilities/artifact-definition.ts +10 -10
- package/src/capabilities/intent-resolver.ts +6 -10
- package/src/capabilities/react-surface.tsx +12 -46
- package/src/components/KanbanContainer.tsx +11 -24
- package/src/components/KanbanViewEditor.tsx +7 -9
- package/src/types.ts +43 -26
- package/dist/lib/browser/artifact-definition-HABFQLG4.mjs.map +0 -7
- package/dist/lib/browser/chunk-6JAA7YSW.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-G6H6HZRG.mjs +0 -297
- package/dist/lib/browser/intent-resolver-G6H6HZRG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-BIBGD5OD.mjs.map +0 -7
- package/dist/lib/node/artifact-definition-M57SFWWP.cjs.map +0 -7
- package/dist/lib/node/chunk-O4U7ZQ2I.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-IBMSLMHX.cjs +0 -308
- package/dist/lib/node/intent-resolver-IBMSLMHX.cjs.map +0 -7
- package/dist/lib/node/react-surface-ZABOI7UC.cjs.map +0 -7
- package/dist/lib/node-esm/artifact-definition-OLVK4DCO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NOC32MF5.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-X66YN6H5.mjs +0 -298
- package/dist/lib/node-esm/intent-resolver-X66YN6H5.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-LDR423Y7.mjs.map +0 -7
- package/dist/types/src/components/KanbanContainer.stories.d.ts +0 -10
- package/dist/types/src/components/KanbanContainer.stories.d.ts.map +0 -1
- package/dist/types/src/testing/index.d.ts +0 -3
- package/dist/types/src/testing/index.d.ts.map +0 -1
- package/dist/types/src/testing/initialize-kanban.d.ts +0 -17
- package/dist/types/src/testing/initialize-kanban.d.ts.map +0 -1
- package/dist/types/src/testing/kanban-manager.d.ts +0 -7
- package/dist/types/src/testing/kanban-manager.d.ts.map +0 -1
- package/dist/types/src/testing/playwright/smoke.spec.d.ts +0 -2
- package/dist/types/src/testing/playwright/smoke.spec.d.ts.map +0 -1
- package/src/components/KanbanContainer.stories.tsx +0 -191
- package/src/testing/index.ts +0 -6
- package/src/testing/initialize-kanban.ts +0 -139
- package/src/testing/kanban-manager.ts +0 -13
- package/src/testing/playwright/playwright.config.cts +0 -18
- package/src/testing/playwright/smoke.spec.ts +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Capabilities
|
|
2
|
-
declare const _default: (
|
|
1
|
+
import { Capabilities } from '@dxos/app-framework';
|
|
2
|
+
declare const _default: () => import("@dxos/app-framework").Capability<Capabilities.IntentResolver>;
|
|
3
3
|
export default _default;
|
|
4
4
|
//# sourceMappingURL=intent-resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,YAAY,EAAkB,
|
|
1
|
+
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,YAAY,EAAkB,MAAM,qBAAqB,CAAC;;AAQhF,wBAsDK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA8B,MAAM,qBAAqB,CAAC;;AAY/E,wBAsEK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KanbanContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/KanbanContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"KanbanContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/KanbanContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAMhE,OAAO,EAAE,KAAK,UAAU,EAA0B,MAAM,uBAAuB,CAAC;AAMhF,eAAO,MAAM,eAAe,eAAgB;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,sBA+D/E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KanbanViewEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/KanbanViewEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"KanbanViewEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/KanbanViewEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,OAAO,EAAE,KAAK,UAAU,EAAwB,MAAM,uBAAuB,CAAC;AAK9E,KAAK,qBAAqB,GAAG;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,CAAC;AAEpD,eAAO,MAAM,gBAAgB,eAAgB,qBAAqB,6BAuEjE,CAAC"}
|
|
@@ -1,9 +1,35 @@
|
|
|
1
|
-
import { KanbanType } from '@dxos/react-ui-kanban';
|
|
2
1
|
declare const _default: {
|
|
3
2
|
'en-US': {
|
|
4
|
-
[
|
|
3
|
+
[x: string]: {
|
|
5
4
|
'typename label': string;
|
|
6
5
|
'object name placeholder': string;
|
|
6
|
+
'plugin name'?: undefined;
|
|
7
|
+
'kanban title label'?: undefined;
|
|
8
|
+
'column title label'?: undefined;
|
|
9
|
+
'column title placeholder'?: undefined;
|
|
10
|
+
'item title label'?: undefined;
|
|
11
|
+
'item title placeholder'?: undefined;
|
|
12
|
+
'add column label'?: undefined;
|
|
13
|
+
'add item label'?: undefined;
|
|
14
|
+
'delete column label'?: undefined;
|
|
15
|
+
'delete item label'?: undefined;
|
|
16
|
+
'card field deleted label'?: undefined;
|
|
17
|
+
'card deleted label'?: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
'plugin name': string;
|
|
20
|
+
'kanban title label': string;
|
|
21
|
+
'column title label': string;
|
|
22
|
+
'column title placeholder': string;
|
|
23
|
+
'item title label': string;
|
|
24
|
+
'item title placeholder': string;
|
|
25
|
+
'add column label': string;
|
|
26
|
+
'add item label': string;
|
|
27
|
+
'delete column label': string;
|
|
28
|
+
'delete item label': string;
|
|
29
|
+
'card field deleted label': string;
|
|
30
|
+
'card deleted label': string;
|
|
31
|
+
'typename label'?: undefined;
|
|
32
|
+
'object name placeholder'?: undefined;
|
|
7
33
|
};
|
|
8
34
|
"dxos.org/plugin/kanban": {
|
|
9
35
|
'plugin name': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBAuBE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S } from '@dxos/echo-schema';
|
|
2
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
2
3
|
import { KanbanType } from '@dxos/react-ui-kanban';
|
|
3
4
|
/**
|
|
4
5
|
* Kanban data model.
|
|
@@ -10,58 +11,67 @@ import { KanbanType } from '@dxos/react-ui-kanban';
|
|
|
10
11
|
*/
|
|
11
12
|
export declare const TypenameAnnotationId: unique symbol;
|
|
12
13
|
export declare const PivotColumnAnnotationId: unique symbol;
|
|
13
|
-
export declare const CreateKanbanSchema:
|
|
14
|
-
name:
|
|
15
|
-
typename:
|
|
16
|
-
initialPivotColumn:
|
|
14
|
+
export declare const CreateKanbanSchema: S.Struct<{
|
|
15
|
+
name: S.optional<typeof S.String>;
|
|
16
|
+
typename: S.optional<S.SchemaClass<string, string, never>>;
|
|
17
|
+
initialPivotColumn: S.optional<S.SchemaClass<string, string, never>>;
|
|
17
18
|
}>;
|
|
18
|
-
export type CreateKanbanType =
|
|
19
|
+
export type CreateKanbanType = S.Schema.Type<typeof CreateKanbanSchema>;
|
|
19
20
|
export declare namespace KanbanAction {
|
|
20
|
-
const Create_base:
|
|
21
|
-
readonly _tag:
|
|
21
|
+
const Create_base: S.TaggedClass<Create, "dxos.org/plugin/kanban/action/create", {
|
|
22
|
+
readonly _tag: S.tag<"dxos.org/plugin/kanban/action/create">;
|
|
22
23
|
} & {
|
|
23
|
-
input:
|
|
24
|
-
space:
|
|
25
|
-
}>,
|
|
26
|
-
name:
|
|
27
|
-
typename:
|
|
28
|
-
initialPivotColumn:
|
|
24
|
+
input: S.extend<S.Struct<{
|
|
25
|
+
space: S.Schema<Space, Space, never>;
|
|
26
|
+
}>, S.Struct<{
|
|
27
|
+
name: S.optional<typeof S.String>;
|
|
28
|
+
typename: S.optional<S.SchemaClass<string, string, never>>;
|
|
29
|
+
initialPivotColumn: S.optional<S.SchemaClass<string, string, never>>;
|
|
29
30
|
}>>;
|
|
30
|
-
output:
|
|
31
|
+
output: S.Struct<{
|
|
31
32
|
object: typeof KanbanType;
|
|
32
33
|
}>;
|
|
33
34
|
}>;
|
|
34
35
|
export class Create extends Create_base {
|
|
35
36
|
}
|
|
36
|
-
const DeleteCardField_base:
|
|
37
|
-
readonly _tag:
|
|
37
|
+
const DeleteCardField_base: S.TaggedClass<DeleteCardField, "dxos.org/plugin/kanban/action/delete-card-field", {
|
|
38
|
+
readonly _tag: S.tag<"dxos.org/plugin/kanban/action/delete-card-field">;
|
|
38
39
|
} & {
|
|
39
|
-
input:
|
|
40
|
+
input: S.Struct<{
|
|
40
41
|
kanban: typeof KanbanType;
|
|
41
|
-
fieldId: typeof
|
|
42
|
-
deletionData:
|
|
43
|
-
field:
|
|
44
|
-
id: typeof
|
|
45
|
-
path:
|
|
46
|
-
visible:
|
|
47
|
-
size:
|
|
48
|
-
|
|
42
|
+
fieldId: typeof S.String;
|
|
43
|
+
deletionData: S.optional<S.Struct<{
|
|
44
|
+
field: S.mutable<S.Struct<{
|
|
45
|
+
id: typeof S.String;
|
|
46
|
+
path: S.Schema<import("@dxos/effect").JsonPath, import("@dxos/effect").JsonPath, never>;
|
|
47
|
+
visible: S.optional<typeof S.Boolean>;
|
|
48
|
+
size: S.optional<typeof S.
|
|
49
|
+
/**
|
|
50
|
+
* Kanban data model.
|
|
51
|
+
* A Kanban board is a collection of columns, each of which contains a collection of items.
|
|
52
|
+
* The layout of columns and items is controlled by models.
|
|
53
|
+
* The underlying data model may be represented by direct object relationships
|
|
54
|
+
* (e.g., a column object containing an array of ordered items) or projections constructed
|
|
55
|
+
* by the model (e.g., a query of items based on metadata within a column object).
|
|
56
|
+
*/
|
|
57
|
+
Number>;
|
|
58
|
+
referencePath: S.optional<S.Schema<import("@dxos/effect").JsonPath, import("@dxos/effect").JsonPath, never>>;
|
|
49
59
|
}>>;
|
|
50
|
-
props: typeof
|
|
51
|
-
index: typeof
|
|
60
|
+
props: typeof S.Any;
|
|
61
|
+
index: typeof S.Number;
|
|
52
62
|
}>>;
|
|
53
63
|
}>;
|
|
54
|
-
output: typeof
|
|
64
|
+
output: typeof S.Void;
|
|
55
65
|
}>;
|
|
56
66
|
export class DeleteCardField extends DeleteCardField_base {
|
|
57
67
|
}
|
|
58
|
-
const DeleteCard_base:
|
|
59
|
-
readonly _tag:
|
|
68
|
+
const DeleteCard_base: S.TaggedClass<DeleteCard, "dxos.org/plugin/kanban/action/delete-card", {
|
|
69
|
+
readonly _tag: S.tag<"dxos.org/plugin/kanban/action/delete-card">;
|
|
60
70
|
} & {
|
|
61
|
-
input:
|
|
62
|
-
card: typeof
|
|
71
|
+
input: S.Struct<{
|
|
72
|
+
card: typeof S.Any;
|
|
63
73
|
}>;
|
|
64
|
-
output: typeof
|
|
74
|
+
output: typeof S.Void;
|
|
65
75
|
}>;
|
|
66
76
|
export class DeleteCard extends DeleteCard_base {
|
|
67
77
|
}
|
|
@@ -74,4 +84,10 @@ export type Location = {
|
|
|
74
84
|
idx?: number;
|
|
75
85
|
};
|
|
76
86
|
export declare const isKanban: (object: unknown) => object is KanbanType;
|
|
87
|
+
export declare const createKanban: ({ space, name, typename, initialPivotColumn, }: {
|
|
88
|
+
space: Space;
|
|
89
|
+
name?: string;
|
|
90
|
+
typename?: string;
|
|
91
|
+
initialPivotColumn?: string;
|
|
92
|
+
}) => Promise<KanbanType>;
|
|
77
93
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,KAAK,KAAK,EAAe,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAMnD;;;;;;;GAOG;AAGH,eAAO,MAAM,oBAAoB,eAAwD,CAAC;AAC1F,eAAO,MAAM,uBAAuB,eAA2D,CAAC;AAEhG,eAAO,MAAM,kBAAkB;;;;EAc7B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAExE,yBAAiB,YAAY,CAAC;;;;;;;;;;;;;;;IAG5B,MAAM,OAAO,MAAO,SAAQ,WAK1B;KAAG;;;;;;;;;+BA5CY,EAAG,MAAM;0BAAW,EAAG,MAAM;6BACzB,EAAG,QAAQ,QAAO,EAEzC,OAAM;0BAAY,EAAG,QAAQ,QAAO;oBAEpC;;;;;;;uBAOG;oBAGH,MATA;mCACC,EAAE,QAAO,CAAE,EAAC,MAAM;;;;;;;;IAuCjB,MAAM,OAAO,eAAgB,SAAQ,oBAgBnC;KAAG;;;;;;;;;IAEL,MAAM,OAAO,UAAW,SAAQ,eAK9B;KAAG;;CACN;AAUD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,QAAQ,WAAY,OAAO,KAAG,MAAM,IAAI,UAA4D,CAAC;AAElH,eAAO,MAAM,YAAY,mDAKtB;IACD,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,wBAGA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"5.
|
|
1
|
+
{"version":"5.7.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-kanban",
|
|
3
|
-
"version": "0.8.2-
|
|
3
|
+
"version": "0.8.2-staging.7ac8446",
|
|
4
4
|
"description": "Kanban DXOS Surface plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -34,26 +34,24 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@preact/signals-core": "^1.6.0",
|
|
37
|
-
"
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/echo": "0.8.2-
|
|
42
|
-
"@dxos/effect": "0.8.2-
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/plugin-
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/react-ui-
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/schema": "0.8.2-main.fbd8ed0",
|
|
56
|
-
"@dxos/util": "0.8.2-main.fbd8ed0"
|
|
37
|
+
"@dxos/app-framework": "0.8.2-staging.7ac8446",
|
|
38
|
+
"@dxos/assistant": "0.8.2-staging.7ac8446",
|
|
39
|
+
"@dxos/artifact": "0.8.2-staging.7ac8446",
|
|
40
|
+
"@dxos/invariant": "0.8.2-staging.7ac8446",
|
|
41
|
+
"@dxos/echo-schema": "0.8.2-staging.7ac8446",
|
|
42
|
+
"@dxos/effect": "0.8.2-staging.7ac8446",
|
|
43
|
+
"@dxos/plugin-client": "0.8.2-staging.7ac8446",
|
|
44
|
+
"@dxos/async": "0.8.2-staging.7ac8446",
|
|
45
|
+
"@dxos/plugin-graph": "0.8.2-staging.7ac8446",
|
|
46
|
+
"@dxos/random": "0.8.2-staging.7ac8446",
|
|
47
|
+
"@dxos/plugin-space": "0.8.2-staging.7ac8446",
|
|
48
|
+
"@dxos/react-client": "0.8.2-staging.7ac8446",
|
|
49
|
+
"@dxos/plugin-search": "0.8.2-staging.7ac8446",
|
|
50
|
+
"@dxos/react-ui-kanban": "0.8.2-staging.7ac8446",
|
|
51
|
+
"@dxos/react-ui-form": "0.8.2-staging.7ac8446",
|
|
52
|
+
"@dxos/schema": "0.8.2-staging.7ac8446",
|
|
53
|
+
"@dxos/react-ui-stack": "0.8.2-staging.7ac8446",
|
|
54
|
+
"@dxos/util": "0.8.2-staging.7ac8446"
|
|
57
55
|
},
|
|
58
56
|
"devDependencies": {
|
|
59
57
|
"@types/react": "~18.2.0",
|
|
@@ -61,19 +59,16 @@
|
|
|
61
59
|
"react": "~18.2.0",
|
|
62
60
|
"react-dom": "~18.2.0",
|
|
63
61
|
"vite": "5.4.7",
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/react-ui-theme": "0.8.2-main.fbd8ed0",
|
|
68
|
-
"@dxos/storybook-utils": "0.8.2-main.fbd8ed0",
|
|
69
|
-
"@dxos/react-ui": "0.8.2-main.fbd8ed0"
|
|
62
|
+
"@dxos/react-ui": "0.8.2-staging.7ac8446",
|
|
63
|
+
"@dxos/react-ui-theme": "0.8.2-staging.7ac8446",
|
|
64
|
+
"@dxos/storybook-utils": "0.8.2-staging.7ac8446"
|
|
70
65
|
},
|
|
71
66
|
"peerDependencies": {
|
|
72
|
-
"effect": "
|
|
67
|
+
"effect": "3.13.3",
|
|
73
68
|
"react": "~18.2.0",
|
|
74
69
|
"react-dom": "~18.2.0",
|
|
75
|
-
"@dxos/react-ui": "0.8.2-
|
|
76
|
-
"@dxos/react-ui
|
|
70
|
+
"@dxos/react-ui-theme": "0.8.2-staging.7ac8446",
|
|
71
|
+
"@dxos/react-ui": "0.8.2-staging.7ac8446"
|
|
77
72
|
},
|
|
78
73
|
"publishConfig": {
|
|
79
74
|
"access": "public"
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { pipe } from 'effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, chain, contributes, createIntent, type PromiseIntentDispatcher } from '@dxos/app-framework';
|
|
8
8
|
import { defineArtifact, defineTool, ToolResult } from '@dxos/artifact';
|
|
9
9
|
import { createArtifactElement } from '@dxos/assistant';
|
|
10
|
-
import { isInstanceOf } from '@dxos/echo-schema';
|
|
10
|
+
import { isInstanceOf, S } from '@dxos/echo-schema';
|
|
11
11
|
import { invariant } from '@dxos/invariant';
|
|
12
12
|
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
13
13
|
import { Filter, fullyQualifiedId, type Space } from '@dxos/react-client/echo';
|
|
@@ -16,7 +16,7 @@ import { KanbanType } from '@dxos/react-ui-kanban';
|
|
|
16
16
|
import { meta } from '../meta';
|
|
17
17
|
import { KanbanAction } from '../types';
|
|
18
18
|
|
|
19
|
-
const QualifiedId =
|
|
19
|
+
const QualifiedId = S.String.annotations({
|
|
20
20
|
description: 'The fully qualified ID of the kanban `spaceID:objectID`',
|
|
21
21
|
});
|
|
22
22
|
|
|
@@ -44,11 +44,11 @@ export default () => {
|
|
|
44
44
|
Create a new kanban board using an existing schema.
|
|
45
45
|
Use schema_create first to create a schema, or schema_list to choose an existing one.`,
|
|
46
46
|
caption: 'Creating kanban board...',
|
|
47
|
-
schema:
|
|
48
|
-
typename:
|
|
47
|
+
schema: S.Struct({
|
|
48
|
+
typename: S.String.annotations({
|
|
49
49
|
description: 'The fully qualified typename of the schema to use for the kanban cards.',
|
|
50
50
|
}),
|
|
51
|
-
pivotColumn:
|
|
51
|
+
pivotColumn: S.optional(S.String).annotations({
|
|
52
52
|
description: 'Optional field name to use as the column pivot.',
|
|
53
53
|
}),
|
|
54
54
|
}),
|
|
@@ -83,11 +83,11 @@ export default () => {
|
|
|
83
83
|
name: 'list',
|
|
84
84
|
description: 'List all kanban boards in the current space.',
|
|
85
85
|
caption: 'Listing kanban boards...',
|
|
86
|
-
schema:
|
|
86
|
+
schema: S.Struct({}),
|
|
87
87
|
execute: async (_input, { extensions }) => {
|
|
88
88
|
invariant(extensions?.space, 'No space');
|
|
89
89
|
const space = extensions.space;
|
|
90
|
-
const { objects: boards } = await space.db.query(Filter.
|
|
90
|
+
const { objects: boards } = await space.db.query(Filter.schema(KanbanType)).run();
|
|
91
91
|
|
|
92
92
|
const boardInfo = await Promise.all(
|
|
93
93
|
boards.map(async (board: KanbanType) => {
|
|
@@ -106,11 +106,11 @@ export default () => {
|
|
|
106
106
|
name: 'inspect',
|
|
107
107
|
description: 'Get details about a specific kanban board.',
|
|
108
108
|
caption: 'Inspecting kanban board...',
|
|
109
|
-
schema:
|
|
109
|
+
schema: S.Struct({ id: QualifiedId }),
|
|
110
110
|
execute: async ({ id }, { extensions }) => {
|
|
111
111
|
invariant(extensions?.space, 'No space');
|
|
112
112
|
const space = extensions.space;
|
|
113
|
-
const { objects: boards } = await space.db.query(Filter.
|
|
113
|
+
const { objects: boards } = await space.db.query(Filter.schema(KanbanType)).run();
|
|
114
114
|
const board = boards.find((board: KanbanType) => fullyQualifiedId(board) === id);
|
|
115
115
|
invariant(isInstanceOf(KanbanType, board));
|
|
116
116
|
|
|
@@ -2,25 +2,21 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { contributes, Capabilities, createResolver
|
|
5
|
+
import { contributes, Capabilities, createResolver } from '@dxos/app-framework';
|
|
6
6
|
import { invariant } from '@dxos/invariant';
|
|
7
|
-
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
8
7
|
import { getSpace } from '@dxos/react-client/echo';
|
|
9
8
|
import { ViewProjection } from '@dxos/schema';
|
|
10
9
|
|
|
11
10
|
import { KANBAN_PLUGIN } from '../meta';
|
|
12
|
-
import {
|
|
13
|
-
import { KanbanAction } from '../types';
|
|
11
|
+
import { createKanban, KanbanAction } from '../types';
|
|
14
12
|
|
|
15
|
-
export default (
|
|
13
|
+
export default () =>
|
|
16
14
|
contributes(Capabilities.IntentResolver, [
|
|
17
15
|
createResolver({
|
|
18
16
|
intent: KanbanAction.Create,
|
|
19
|
-
resolve: async ({ space, name, typename, initialPivotColumn }) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return { data: { object: kanban } };
|
|
23
|
-
},
|
|
17
|
+
resolve: async ({ space, name, typename, initialPivotColumn }) => ({
|
|
18
|
+
data: { object: await createKanban({ space, name, typename, initialPivotColumn }) },
|
|
19
|
+
}),
|
|
24
20
|
}),
|
|
25
21
|
createResolver({
|
|
26
22
|
intent: KanbanAction.DeleteCardField,
|
|
@@ -2,15 +2,12 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type Schema } from 'effect';
|
|
6
5
|
import React, { useMemo } from 'react';
|
|
7
6
|
|
|
8
|
-
import { Capabilities, contributes, createSurface
|
|
9
|
-
import {
|
|
7
|
+
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
|
+
import { type S } from '@dxos/echo-schema';
|
|
10
9
|
import { findAnnotation } from '@dxos/effect';
|
|
11
|
-
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
12
10
|
import { type CollectionType } from '@dxos/plugin-space/types';
|
|
13
|
-
import { useClient } from '@dxos/react-client';
|
|
14
11
|
import { getSpace, isSpace, type Space } from '@dxos/react-client/echo';
|
|
15
12
|
import { type InputProps, SelectInput, useFormValues } from '@dxos/react-ui-form';
|
|
16
13
|
import { type KanbanType } from '@dxos/react-ui-kanban';
|
|
@@ -34,53 +31,28 @@ export default () =>
|
|
|
34
31
|
component: ({ data }) => <KanbanViewEditor kanban={data.subject} />,
|
|
35
32
|
}),
|
|
36
33
|
createSurface({
|
|
37
|
-
id: `${KANBAN_PLUGIN}/create-initial-schema-form`,
|
|
34
|
+
id: `${KANBAN_PLUGIN}/create-initial-schema-form-[schema]`,
|
|
38
35
|
role: 'form-input',
|
|
39
|
-
filter: (
|
|
40
|
-
data,
|
|
41
|
-
): data is { prop: string; schema: Schema.Schema<any>; target: Space | CollectionType | undefined } => {
|
|
42
|
-
if (data.prop !== 'typename') {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, TypenameAnnotationId);
|
|
36
|
+
filter: (data): data is { prop: string; schema: S.Schema<any>; target: Space | CollectionType | undefined } => {
|
|
37
|
+
const annotation = findAnnotation<boolean>((data.schema as S.Schema.All).ast, TypenameAnnotationId);
|
|
47
38
|
return !!annotation;
|
|
48
39
|
},
|
|
49
40
|
component: ({ data: { target }, ...inputProps }) => {
|
|
50
|
-
const client = useClient();
|
|
51
41
|
const props = inputProps as any as InputProps;
|
|
52
42
|
const space = isSpace(target) ? target : getSpace(target);
|
|
53
43
|
if (!space) {
|
|
54
44
|
return null;
|
|
55
45
|
}
|
|
56
46
|
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
() => new Set(schemaWhitelists.flatMap((typeArray) => typeArray.map((type) => type.typename))),
|
|
60
|
-
[schemaWhitelists],
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
const fixed = client.graph.schemaRegistry.schemas.filter((schema) =>
|
|
64
|
-
whitelistedTypenames.has(getTypenameOrThrow(schema)),
|
|
65
|
-
);
|
|
66
|
-
const dynamic = space?.db.schemaRegistry.query().runSync();
|
|
67
|
-
const typenames = Array.from(
|
|
68
|
-
new Set<string>([
|
|
69
|
-
...fixed.map((schema) => getTypenameOrThrow(schema)),
|
|
70
|
-
...dynamic.map((schema) => schema.typename),
|
|
71
|
-
]),
|
|
72
|
-
).sort();
|
|
73
|
-
|
|
74
|
-
return <SelectInput {...props} options={typenames.map((typename) => ({ value: typename }))} />;
|
|
47
|
+
const schemata = space?.db.schemaRegistry.query().runSync();
|
|
48
|
+
return <SelectInput {...props} options={schemata.map((schema) => ({ value: schema.typename }))} />;
|
|
75
49
|
},
|
|
76
50
|
}),
|
|
77
51
|
createSurface({
|
|
78
52
|
id: `${KANBAN_PLUGIN}/create-initial-schema-form-[pivot-column]`,
|
|
79
53
|
role: 'form-input',
|
|
80
|
-
filter: (
|
|
81
|
-
data,
|
|
82
|
-
): data is { prop: string; schema: Schema.Schema<any>; target: Space | CollectionType | undefined } => {
|
|
83
|
-
const annotation = findAnnotation<boolean>((data.schema as Schema.Schema.All).ast, PivotColumnAnnotationId);
|
|
54
|
+
filter: (data): data is { prop: string; schema: S.Schema<any>; target: Space | CollectionType | undefined } => {
|
|
55
|
+
const annotation = findAnnotation<boolean>((data.schema as S.Schema.All).ast, PivotColumnAnnotationId);
|
|
84
56
|
return !!annotation;
|
|
85
57
|
},
|
|
86
58
|
component: ({ data: { target }, ...inputProps }) => {
|
|
@@ -90,20 +62,14 @@ export default () =>
|
|
|
90
62
|
return null;
|
|
91
63
|
}
|
|
92
64
|
const { typename } = useFormValues();
|
|
93
|
-
// TODO(wittjosiah): Unify this schema lookup.
|
|
94
|
-
const schemaWhitelists = useCapabilities(ClientCapabilities.SchemaWhiteList);
|
|
95
|
-
const staticSchema = schemaWhitelists.flat().find((schema) => getTypenameOrThrow(schema) === typename);
|
|
96
65
|
const [selectedSchema] = space?.db.schemaRegistry.query({ typename }).runSync();
|
|
97
66
|
|
|
98
67
|
const singleSelectColumns = useMemo(() => {
|
|
99
|
-
|
|
100
|
-
? toJsonSchema(staticSchema).properties
|
|
101
|
-
: selectedSchema?.jsonSchema?.properties;
|
|
102
|
-
if (!properties) {
|
|
68
|
+
if (!selectedSchema?.jsonSchema?.properties) {
|
|
103
69
|
return [];
|
|
104
70
|
}
|
|
105
71
|
|
|
106
|
-
const columns = Object.entries(properties).reduce<string[]>((acc, [key, value]) => {
|
|
72
|
+
const columns = Object.entries(selectedSchema.jsonSchema.properties).reduce<string[]>((acc, [key, value]) => {
|
|
107
73
|
if (typeof value === 'object' && value?.format === 'single-select') {
|
|
108
74
|
acc.push(key);
|
|
109
75
|
}
|
|
@@ -111,7 +77,7 @@ export default () =>
|
|
|
111
77
|
}, []);
|
|
112
78
|
|
|
113
79
|
return columns;
|
|
114
|
-
}, [selectedSchema?.jsonSchema
|
|
80
|
+
}, [selectedSchema?.jsonSchema]);
|
|
115
81
|
|
|
116
82
|
if (!typename) {
|
|
117
83
|
return null;
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, { useCallback, useEffect,
|
|
5
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
8
|
+
import { type EchoSchema } from '@dxos/echo-schema';
|
|
9
9
|
import { useGlobalFilteredObjects } from '@dxos/plugin-search';
|
|
10
|
-
import {
|
|
11
|
-
import { Filter, useQuery, getSpace, live } from '@dxos/react-client/echo';
|
|
10
|
+
import { Filter, useQuery, getSpace, create } from '@dxos/react-client/echo';
|
|
12
11
|
import { type KanbanType, useKanbanModel, Kanban } from '@dxos/react-ui-kanban';
|
|
13
12
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
14
13
|
import { ViewProjection } from '@dxos/schema';
|
|
@@ -16,26 +15,14 @@ import { ViewProjection } from '@dxos/schema';
|
|
|
16
15
|
import { KanbanAction } from '../types';
|
|
17
16
|
|
|
18
17
|
export const KanbanContainer = ({ kanban }: { kanban: KanbanType; role: string }) => {
|
|
19
|
-
const
|
|
20
|
-
const [cardSchema, setCardSchema] = useState<TypedObject<any, any>>();
|
|
18
|
+
const [cardSchema, setCardSchema] = useState<EchoSchema>();
|
|
21
19
|
const [projection, setProjection] = useState<ViewProjection>();
|
|
22
20
|
const space = getSpace(kanban);
|
|
23
21
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
24
22
|
|
|
25
|
-
const jsonSchema = useMemo(
|
|
26
|
-
() =>
|
|
27
|
-
cardSchema instanceof EchoSchema ? cardSchema.jsonSchema : cardSchema ? toJsonSchema(cardSchema) : undefined,
|
|
28
|
-
[cardSchema],
|
|
29
|
-
);
|
|
30
|
-
|
|
31
23
|
useEffect(() => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (staticSchema) {
|
|
35
|
-
setCardSchema(() => staticSchema as TypedObject<any, any>);
|
|
36
|
-
}
|
|
37
|
-
if (!staticSchema && typename && space) {
|
|
38
|
-
const query = space.db.schemaRegistry.query({ typename });
|
|
24
|
+
if (kanban.cardView?.target?.query?.typename && space) {
|
|
25
|
+
const query = space.db.schemaRegistry.query({ typename: kanban.cardView.target.query.typename });
|
|
39
26
|
const unsubscribe = query.subscribe(
|
|
40
27
|
() => {
|
|
41
28
|
const [schema] = query.results;
|
|
@@ -50,13 +37,13 @@ export const KanbanContainer = ({ kanban }: { kanban: KanbanType; role: string }
|
|
|
50
37
|
}, [kanban.cardView?.target?.query, space]);
|
|
51
38
|
|
|
52
39
|
useEffect(() => {
|
|
53
|
-
if (kanban.cardView?.target &&
|
|
54
|
-
setProjection(new ViewProjection(jsonSchema, kanban.cardView.target));
|
|
40
|
+
if (kanban.cardView?.target && cardSchema) {
|
|
41
|
+
setProjection(new ViewProjection(cardSchema.jsonSchema, kanban.cardView.target));
|
|
55
42
|
}
|
|
56
43
|
// TODO(ZaymonFC): Is there a better way to get notified about deep changes in the json schema?
|
|
57
|
-
}, [kanban.cardView?.target, JSON.stringify(jsonSchema)]);
|
|
44
|
+
}, [kanban.cardView?.target, cardSchema, JSON.stringify(cardSchema?.jsonSchema)]);
|
|
58
45
|
|
|
59
|
-
const objects = useQuery(space, cardSchema ? Filter.
|
|
46
|
+
const objects = useQuery(space, cardSchema ? Filter.schema(cardSchema) : Filter.nothing());
|
|
60
47
|
const filteredObjects = useGlobalFilteredObjects(objects);
|
|
61
48
|
|
|
62
49
|
const model = useKanbanModel({
|
|
@@ -70,7 +57,7 @@ export const KanbanContainer = ({ kanban }: { kanban: KanbanType; role: string }
|
|
|
70
57
|
(columnValue: string | undefined) => {
|
|
71
58
|
const path = model?.columnFieldPath;
|
|
72
59
|
if (space && cardSchema && path) {
|
|
73
|
-
const card =
|
|
60
|
+
const card = create(cardSchema, { [path]: columnValue });
|
|
74
61
|
space.db.add(card);
|
|
75
62
|
return card.id;
|
|
76
63
|
}
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
import React, { useCallback, useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
9
|
-
import { assertEchoSchema, FormatEnum, isMutable } from '@dxos/echo-schema';
|
|
8
|
+
import { FormatEnum } from '@dxos/echo-schema';
|
|
10
9
|
import { invariant } from '@dxos/invariant';
|
|
11
10
|
import { useClient } from '@dxos/react-client';
|
|
12
11
|
import { Filter, getSpace, useQuery, useSchema } from '@dxos/react-client/echo';
|
|
@@ -27,7 +26,7 @@ export const KanbanViewEditor = ({ kanban }: KanbanViewEditorProps) => {
|
|
|
27
26
|
[kanban?.cardView?.target?.query?.typename],
|
|
28
27
|
);
|
|
29
28
|
const schema = useSchema(client, space, currentTypename);
|
|
30
|
-
const views = useQuery(space, Filter.
|
|
29
|
+
const views = useQuery(space, Filter.schema(ViewType));
|
|
31
30
|
|
|
32
31
|
const handleUpdateTypename = useCallback(
|
|
33
32
|
(newTypename: string) => {
|
|
@@ -37,7 +36,7 @@ export const KanbanViewEditor = ({ kanban }: KanbanViewEditorProps) => {
|
|
|
37
36
|
view.query.typename = newTypename;
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
schema.mutable.updateTypename(newTypename);
|
|
41
40
|
},
|
|
42
41
|
[views, schema],
|
|
43
42
|
);
|
|
@@ -51,10 +50,9 @@ export const KanbanViewEditor = ({ kanban }: KanbanViewEditorProps) => {
|
|
|
51
50
|
|
|
52
51
|
const projection = useMemo(() => {
|
|
53
52
|
if (kanban?.cardView?.target && schema) {
|
|
54
|
-
|
|
55
|
-
return new ViewProjection(jsonSchema, kanban.cardView.target);
|
|
53
|
+
return new ViewProjection(schema.jsonSchema, kanban.cardView.target);
|
|
56
54
|
}
|
|
57
|
-
}, [kanban?.cardView?.target, schema, JSON.stringify(schema
|
|
55
|
+
}, [kanban?.cardView?.target, schema, JSON.stringify(schema)]);
|
|
58
56
|
|
|
59
57
|
const fieldProjections = projection?.getFieldProjections() || [];
|
|
60
58
|
const selectFields = fieldProjections
|
|
@@ -85,8 +83,8 @@ export const KanbanViewEditor = ({ kanban }: KanbanViewEditorProps) => {
|
|
|
85
83
|
registry={space.db.schemaRegistry}
|
|
86
84
|
schema={schema}
|
|
87
85
|
view={kanban.cardView.target}
|
|
88
|
-
onTypenameChanged={
|
|
89
|
-
onDelete={
|
|
86
|
+
onTypenameChanged={schema.readonly ? undefined : handleUpdateTypename}
|
|
87
|
+
onDelete={schema.readonly ? undefined : handleDelete}
|
|
90
88
|
/>
|
|
91
89
|
</>
|
|
92
90
|
);
|