@dxos/plugin-pipeline 0.8.4-main.52d7546f51 → 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/PipelineContainer-FAOVECDX.mjs +318 -0
- package/dist/lib/browser/PipelineContainer-FAOVECDX.mjs.map +7 -0
- package/dist/lib/browser/{PipelineSettings-YSGSJHBT.mjs → PipelineObjectSettings-JFOS6Z37.mjs} +67 -59
- package/dist/lib/browser/PipelineObjectSettings-JFOS6Z37.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-QQKBLYFD.mjs +56 -0
- package/dist/lib/browser/app-graph-builder-QQKBLYFD.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QWNKLHBY.mjs → chunk-3A235GUD.mjs} +2 -9
- package/dist/lib/browser/{chunk-QWNKLHBY.mjs.map → chunk-3A235GUD.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +12 -36
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-JMMCTIL3.mjs → react-surface-XD6PVALN.mjs} +17 -13
- package/dist/lib/browser/react-surface-XD6PVALN.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +0 -9
- package/dist/types/src/PipelinePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/PipelineComponent/PipelineColumn.d.ts +9 -0
- package/dist/types/src/components/PipelineComponent/PipelineColumn.d.ts.map +1 -0
- package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts +47 -0
- package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts.map +1 -0
- package/dist/types/src/components/{PipelineComponent.stories.d.ts → PipelineComponent/PipelineComponent.stories.d.ts} +1 -0
- package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts.map +1 -0
- package/dist/types/src/components/PipelineComponent/index.d.ts +3 -0
- package/dist/types/src/components/PipelineComponent/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/{components → containers/PipelineContainer}/PipelineContainer.d.ts +3 -4
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts.map +1 -0
- package/dist/types/src/{components → containers/PipelineContainer}/PipelineContainer.stories.d.ts +1 -0
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/PipelineContainer/index.d.ts +3 -0
- package/dist/types/src/containers/PipelineContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components/PipelineSettings.d.ts → containers/PipelineObjectSettings/PipelineObjectSettings.d.ts} +1 -2
- package/dist/types/src/containers/PipelineObjectSettings/PipelineObjectSettings.d.ts.map +1 -0
- package/dist/types/src/containers/PipelineObjectSettings/index.d.ts +3 -0
- package/dist/types/src/containers/PipelineObjectSettings/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 +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/usePipelineBoardModel.d.ts +6 -0
- package/dist/types/src/hooks/usePipelineBoardModel.d.ts.map +1 -0
- package/dist/types/src/templates/research.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +0 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +42 -39
- package/src/PipelinePlugin.tsx +1 -14
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +7 -9
- package/src/capabilities/operation-resolver/operation-resolver.ts +1 -21
- package/src/capabilities/react-surface/react-surface.tsx +14 -9
- package/src/components/{PipelineColumn.tsx → PipelineComponent/PipelineColumn.tsx} +25 -37
- package/src/components/{PipelineComponent.stories.tsx → PipelineComponent/PipelineComponent.stories.tsx} +28 -15
- package/src/components/PipelineComponent/PipelineComponent.tsx +131 -0
- package/src/components/PipelineComponent/index.ts +6 -0
- package/src/components/index.ts +1 -7
- package/src/{components → containers/PipelineContainer}/PipelineContainer.stories.tsx +92 -89
- package/src/containers/PipelineContainer/PipelineContainer.tsx +86 -0
- package/src/containers/PipelineContainer/index.ts +7 -0
- package/src/{components/PipelineSettings.tsx → containers/PipelineObjectSettings/PipelineObjectSettings.tsx} +65 -54
- package/src/containers/PipelineObjectSettings/index.ts +7 -0
- package/src/containers/index.ts +8 -0
- package/src/hooks/index.ts +5 -0
- package/src/hooks/usePipelineBoardModel.ts +79 -0
- package/src/meta.ts +1 -1
- package/src/templates/research.ts +14 -15
- package/src/translations.ts +1 -0
- package/src/types/index.ts +0 -3
- package/dist/lib/browser/PipelineContainer-I3TPA7ZN.mjs +0 -217
- package/dist/lib/browser/PipelineContainer-I3TPA7ZN.mjs.map +0 -7
- package/dist/lib/browser/PipelineSettings-YSGSJHBT.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-NUJB33F7.mjs +0 -65
- package/dist/lib/browser/app-graph-builder-NUJB33F7.mjs.map +0 -7
- package/dist/lib/browser/chunk-7GVESVYR.mjs +0 -42
- package/dist/lib/browser/chunk-7GVESVYR.mjs.map +0 -7
- package/dist/lib/browser/react-surface-JMMCTIL3.mjs.map +0 -7
- package/dist/types/src/components/PipelineColumn.d.ts +0 -10
- package/dist/types/src/components/PipelineColumn.d.ts.map +0 -1
- package/dist/types/src/components/PipelineComponent.d.ts +0 -38
- package/dist/types/src/components/PipelineComponent.d.ts.map +0 -1
- package/dist/types/src/components/PipelineComponent.stories.d.ts.map +0 -1
- package/dist/types/src/components/PipelineContainer.d.ts.map +0 -1
- package/dist/types/src/components/PipelineContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/PipelineSettings.d.ts.map +0 -1
- package/dist/types/src/types/PipelineAction.d.ts +0 -25
- package/dist/types/src/types/PipelineAction.d.ts.map +0 -1
- package/src/components/PipelineComponent.tsx +0 -103
- package/src/components/PipelineContainer.tsx +0 -57
- package/src/types/PipelineAction.ts +0 -29
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineColumn.d.ts","sourceRoot":"","sources":["../../../../src/components/PipelineColumn.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAQrE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAY5C,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC;CACzB,CAAC;AAKF,eAAO,MAAM,cAAc;iBAAgB,mBAAmB;;CAwE7D,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React, { type FC } from 'react';
|
|
2
|
-
import { type Obj } from '@dxos/echo';
|
|
3
|
-
import { type ToolbarRootProps } from '@dxos/react-ui';
|
|
4
|
-
import { type ProjectionModel } from '@dxos/schema';
|
|
5
|
-
import { type Pipeline as PipelineType } from '@dxos/types';
|
|
6
|
-
type ItemProps = {
|
|
7
|
-
item: Obj.Unknown;
|
|
8
|
-
projectionModel?: ProjectionModel;
|
|
9
|
-
};
|
|
10
|
-
type PipelineContextValue = {
|
|
11
|
-
Item: FC<ItemProps>;
|
|
12
|
-
onAddColumn?: () => void;
|
|
13
|
-
};
|
|
14
|
-
type PipelineRootProps = PipelineContextValue;
|
|
15
|
-
declare const usePipeline: (consumerName: string) => PipelineContextValue;
|
|
16
|
-
type PipelineContentProps = {
|
|
17
|
-
pipeline: PipelineType.Pipeline;
|
|
18
|
-
};
|
|
19
|
-
export declare const PipelineToolbar: {
|
|
20
|
-
(props: ToolbarRootProps): React.JSX.Element;
|
|
21
|
-
displayName: string;
|
|
22
|
-
};
|
|
23
|
-
export declare const PipelineComponent: {
|
|
24
|
-
Root: React.FC<PipelineContextValue & {
|
|
25
|
-
children: React.ReactNode;
|
|
26
|
-
}>;
|
|
27
|
-
Content: {
|
|
28
|
-
({ pipeline }: PipelineContentProps): React.JSX.Element;
|
|
29
|
-
displayName: string;
|
|
30
|
-
};
|
|
31
|
-
Toolbar: {
|
|
32
|
-
(props: ToolbarRootProps): React.JSX.Element;
|
|
33
|
-
displayName: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export { usePipeline };
|
|
37
|
-
export type { ItemProps, PipelineContextValue, PipelineRootProps };
|
|
38
|
-
//# sourceMappingURL=PipelineComponent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/PipelineComponent.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAW,KAAK,gBAAgB,EAAkB,MAAM,gBAAgB,CAAC;AAEhF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,KAAK,QAAQ,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AAM5D,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,CAAC;AAIF,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;IAIpB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B,CAAC;AAMF,KAAK,iBAAiB,GAAG,oBAAoB,CAAC;AAI9C,QAAA,MAAqB,WAAW,gDAE9B,CAAC;AAUH,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC;CACjC,CAAC;AAsBF,eAAO,MAAM,eAAe;YAAW,gBAAgB;;CAStD,CAAC;AAQF,eAAO,MAAM,iBAAiB;;;;;uBArCS,oBAAoB;;;;gBAoBpB,gBAAgB;;;CAqBtD,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,YAAY,EAAE,SAAS,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineComponent.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/PipelineComponent.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAajE,OAAO,EAAU,QAAQ,EAAE,MAAM,aAAa,CAAC;AAoI/C,QAAA,MAAM,IAAI;;;;;;;yBA9IoC,CACzC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;;;;;;;;;;yBAOV,CAAQ,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;CAgLI,CAAC;AAE3C,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/PipelineContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAKlE,OAAO,EAAE,KAAK,QAAQ,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AAI5D,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AAElF,eAAO,MAAM,iBAAiB,GAAI,6BAA6B,sBAAsB,sBAsBpF,CAAC;AAeF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineContainer.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/PipelineContainer.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,OAAO,EAAiC,QAAQ,EAAQ,MAAM,aAAa,CAAC;AA0B5E,QAAA,MAAM,IAAI;;;;;;;;yBAxCwB,CAAO,QAAQ,CAAC,QAAQ,CAAC,QACzD,CAAC;;;;;;;;;;yBAOoB,CAAQ,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2MG,CAAC;AAE3C,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/PipelineSettings.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAOtE,OAAO,EAAc,KAAK,eAAe,EAAkC,MAAM,gBAAgB,CAAC;AAIlG,OAAO,EAAE,QAAQ,EAAQ,MAAM,aAAa,CAAC;AAY7C,MAAM,MAAM,2BAA2B,GAAG,eAAe,CAAC;IACxD,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;CAC7B,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,0BAA0B,2BAA2B,sBAgM3F,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { Capability } from '@dxos/app-framework';
|
|
3
|
-
export declare namespace PipelineOperation {
|
|
4
|
-
const OnCreateSpace: Omit<{
|
|
5
|
-
readonly meta: {
|
|
6
|
-
readonly key: `${string}/on-create-space`;
|
|
7
|
-
readonly name: "On Create Space";
|
|
8
|
-
};
|
|
9
|
-
readonly services: readonly [typeof Capability.Service];
|
|
10
|
-
readonly schema: {
|
|
11
|
-
readonly input: Schema.Struct<{
|
|
12
|
-
space: Schema.Schema<import("@dxos/client-protocol").Space, import("@dxos/client-protocol").Space, never>;
|
|
13
|
-
rootCollection: import("@dxos/echo/Type").Obj<{
|
|
14
|
-
readonly name?: string | undefined;
|
|
15
|
-
readonly objects: readonly import("@dxos/echo/internal").Ref<any>[];
|
|
16
|
-
}, Schema.Struct.Fields>;
|
|
17
|
-
isDefault: Schema.optional<typeof Schema.Boolean>;
|
|
18
|
-
}>;
|
|
19
|
-
readonly output: typeof Schema.Void;
|
|
20
|
-
};
|
|
21
|
-
}, "executionMode"> & import("effect/Pipeable").Pipeable & {
|
|
22
|
-
readonly executionMode: "sync" | "async";
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=PipelineAction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineAction.d.ts","sourceRoot":"","sources":["../../../../src/types/PipelineAction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AASjD,yBAAiB,iBAAiB,CAAC;IAC1B,MAAM,aAAa;;;;;;;;;;;;;;;;;;;KAWxB,CAAC;CACJ"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { createContext } from '@radix-ui/react-context';
|
|
6
|
-
import React, { type FC } from 'react';
|
|
7
|
-
|
|
8
|
-
import { type Obj } from '@dxos/echo';
|
|
9
|
-
import { useObject } from '@dxos/react-client/echo';
|
|
10
|
-
import { Toolbar, type ToolbarRootProps, useTranslation } from '@dxos/react-ui';
|
|
11
|
-
import { Stack } from '@dxos/react-ui-stack';
|
|
12
|
-
import { type ProjectionModel } from '@dxos/schema';
|
|
13
|
-
import { type Pipeline as PipelineType } from '@dxos/types';
|
|
14
|
-
|
|
15
|
-
import { meta } from '../meta';
|
|
16
|
-
|
|
17
|
-
import { PipelineColumn } from './PipelineColumn';
|
|
18
|
-
|
|
19
|
-
type ItemProps = {
|
|
20
|
-
item: Obj.Unknown;
|
|
21
|
-
projectionModel?: ProjectionModel;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const itemNoOp = ({ item }: ItemProps) => <span>{item.id}</span>;
|
|
25
|
-
|
|
26
|
-
type PipelineContextValue = {
|
|
27
|
-
Item: FC<ItemProps>;
|
|
28
|
-
// TODO(wittjosiah): Support adding items.
|
|
29
|
-
// If the created item doesn't match the current query, it will not be visible.
|
|
30
|
-
// onAddItem?: (schema: Schema.Schema.AnyNoContext) => void;
|
|
31
|
-
onAddColumn?: () => void;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
//
|
|
35
|
-
// Root
|
|
36
|
-
//
|
|
37
|
-
|
|
38
|
-
type PipelineRootProps = PipelineContextValue;
|
|
39
|
-
|
|
40
|
-
const PIPELINE_ROOT = 'Pipeline.Root';
|
|
41
|
-
|
|
42
|
-
const [PipelineRoot, usePipeline] = createContext<PipelineContextValue>(PIPELINE_ROOT, {
|
|
43
|
-
Item: itemNoOp,
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
PipelineRoot.displayName = PIPELINE_ROOT;
|
|
47
|
-
|
|
48
|
-
//
|
|
49
|
-
// Content
|
|
50
|
-
//
|
|
51
|
-
|
|
52
|
-
const PIPELINE_CONTENT_NAME = 'Pipeline.Content';
|
|
53
|
-
|
|
54
|
-
type PipelineContentProps = {
|
|
55
|
-
pipeline: PipelineType.Pipeline;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const PipelineContent = ({ pipeline }: PipelineContentProps) => {
|
|
59
|
-
const [columns] = useObject(pipeline, 'columns');
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<Stack orientation='horizontal' size='contain' rail={false}>
|
|
63
|
-
{columns.map((column) => {
|
|
64
|
-
return <PipelineColumn key={column.view.dxn.toString()} column={column} />;
|
|
65
|
-
})}
|
|
66
|
-
</Stack>
|
|
67
|
-
);
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
PipelineContent.displayName = PIPELINE_CONTENT_NAME;
|
|
71
|
-
|
|
72
|
-
//
|
|
73
|
-
// Toolbar
|
|
74
|
-
//
|
|
75
|
-
|
|
76
|
-
const PIPELINE_TOOLBAR_NAME = 'Pipeline.Toolbar';
|
|
77
|
-
|
|
78
|
-
export const PipelineToolbar = (props: ToolbarRootProps) => {
|
|
79
|
-
const { t } = useTranslation(meta.id);
|
|
80
|
-
const { onAddColumn } = usePipeline(PIPELINE_TOOLBAR_NAME);
|
|
81
|
-
|
|
82
|
-
return (
|
|
83
|
-
<Toolbar.Root {...props}>
|
|
84
|
-
<Toolbar.IconButton icon='ph--plus--regular' iconOnly label={t('add column label')} onClick={onAddColumn} />
|
|
85
|
-
</Toolbar.Root>
|
|
86
|
-
);
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
PipelineToolbar.displayName = PIPELINE_TOOLBAR_NAME;
|
|
90
|
-
|
|
91
|
-
//
|
|
92
|
-
// Project
|
|
93
|
-
//
|
|
94
|
-
|
|
95
|
-
export const PipelineComponent = {
|
|
96
|
-
Root: PipelineRoot,
|
|
97
|
-
Content: PipelineContent,
|
|
98
|
-
Toolbar: PipelineToolbar,
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export { usePipeline };
|
|
102
|
-
|
|
103
|
-
export type { ItemProps, PipelineContextValue, PipelineRootProps };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { useCallback } from 'react';
|
|
6
|
-
|
|
7
|
-
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
8
|
-
import { Surface } from '@dxos/app-framework/ui';
|
|
9
|
-
import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
|
|
10
|
-
import { Obj } from '@dxos/echo';
|
|
11
|
-
import { ATTENDABLE_PATH_SEPARATOR, DeckOperation } from '@dxos/plugin-deck/types';
|
|
12
|
-
import { Layout } from '@dxos/react-ui';
|
|
13
|
-
import { useAttention } from '@dxos/react-ui-attention';
|
|
14
|
-
import { type Pipeline as PipelineType } from '@dxos/types';
|
|
15
|
-
|
|
16
|
-
import { type ItemProps, PipelineComponent } from './PipelineComponent';
|
|
17
|
-
|
|
18
|
-
export type PipelineContainerProps = SurfaceComponentProps<PipelineType.Pipeline>;
|
|
19
|
-
|
|
20
|
-
export const PipelineContainer = ({ role, subject: pipeline }: PipelineContainerProps) => {
|
|
21
|
-
const { invokePromise } = useOperationInvoker();
|
|
22
|
-
const attendableId = Obj.getDXN(pipeline).toString();
|
|
23
|
-
const { hasAttention } = useAttention(attendableId);
|
|
24
|
-
|
|
25
|
-
const handleColumnAdd = useCallback(
|
|
26
|
-
() =>
|
|
27
|
-
invokePromise(DeckOperation.ChangeCompanion, {
|
|
28
|
-
primary: attendableId,
|
|
29
|
-
companion: `${attendableId}${ATTENDABLE_PATH_SEPARATOR}settings`,
|
|
30
|
-
}),
|
|
31
|
-
[invokePromise, attendableId],
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<Layout.Main role={role} toolbar>
|
|
36
|
-
<PipelineComponent.Root Item={PipelineItem} onAddColumn={handleColumnAdd}>
|
|
37
|
-
<PipelineComponent.Toolbar disabled={!hasAttention} />
|
|
38
|
-
<PipelineComponent.Content pipeline={pipeline} />
|
|
39
|
-
</PipelineComponent.Root>
|
|
40
|
-
</Layout.Main>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const PipelineItem = ({ item, projectionModel }: ItemProps) => {
|
|
45
|
-
return (
|
|
46
|
-
<Surface.Surface
|
|
47
|
-
role='card--content'
|
|
48
|
-
data={{
|
|
49
|
-
subject: item,
|
|
50
|
-
projection: projectionModel,
|
|
51
|
-
}}
|
|
52
|
-
limit={1}
|
|
53
|
-
/>
|
|
54
|
-
);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export default PipelineContainer;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Schema from 'effect/Schema';
|
|
6
|
-
|
|
7
|
-
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { Operation } from '@dxos/operation';
|
|
9
|
-
import { SpaceSchema } from '@dxos/react-client/echo';
|
|
10
|
-
import { Collection } from '@dxos/schema';
|
|
11
|
-
|
|
12
|
-
import { meta } from '../meta';
|
|
13
|
-
|
|
14
|
-
const PIPELINE_OPERATION = `${meta.id}/operation`;
|
|
15
|
-
|
|
16
|
-
export namespace PipelineOperation {
|
|
17
|
-
export const OnCreateSpace = Operation.make({
|
|
18
|
-
meta: { key: `${PIPELINE_OPERATION}/on-create-space`, name: 'On Create Space' },
|
|
19
|
-
services: [Capability.Service],
|
|
20
|
-
schema: {
|
|
21
|
-
input: Schema.Struct({
|
|
22
|
-
space: SpaceSchema,
|
|
23
|
-
rootCollection: Collection.Collection,
|
|
24
|
-
isDefault: Schema.optional(Schema.Boolean),
|
|
25
|
-
}),
|
|
26
|
-
output: Schema.Void,
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
}
|