@dxos/plugin-pipeline 0.9.0 → 0.9.1-staging.ee54ba693a
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/neutral/{PipelineArticle-6JIVXMYF.mjs → PipelineArticle-DG4TCEML.mjs} +2 -2
- package/dist/lib/neutral/{PipelineArticle-6JIVXMYF.mjs.map → PipelineArticle-DG4TCEML.mjs.map} +2 -2
- package/dist/lib/neutral/PipelinePlugin.mjs +4 -6
- package/dist/lib/neutral/PipelinePlugin.mjs.map +4 -4
- package/dist/lib/neutral/PipelinePlugin.node.mjs +2 -4
- package/dist/lib/neutral/PipelinePlugin.node.mjs.map +3 -3
- package/dist/lib/neutral/{PipelineProperties-JZQYG2CN.mjs → PipelineProperties-LDD4P4RA.mjs} +28 -55
- package/dist/lib/neutral/PipelineProperties-LDD4P4RA.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +2 -4
- package/dist/lib/neutral/capabilities/index.mjs.map +3 -3
- package/dist/lib/neutral/chunk-RHSONY5F.mjs +44 -0
- package/dist/lib/neutral/chunk-RHSONY5F.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +11 -9
- package/dist/lib/neutral/components/index.mjs.map +3 -3
- package/dist/lib/neutral/containers/index.mjs +2 -2
- package/dist/lib/neutral/{create-object-6Z4MMGX4.mjs → create-object-B4FHAFWY.mjs} +1 -2
- package/dist/lib/neutral/{create-object-6Z4MMGX4.mjs.map → create-object-B4FHAFWY.mjs.map} +3 -3
- package/dist/lib/neutral/index.mjs +1 -1
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +1 -1
- package/dist/lib/neutral/{react-surface-QG7QSZSS.mjs → react-surface-G6WO2XOI.mjs} +2 -21
- package/dist/lib/neutral/react-surface-G6WO2XOI.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +4 -7
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/PipelinePlugin.d.ts.map +1 -1
- package/dist/types/src/PipelinePlugin.node.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +1 -7
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -8
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts +1 -1
- package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts.map +1 -1
- package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts +6 -12
- package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts +8 -27
- package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineProperties/PipelineProperties.d.ts +3 -5
- package/dist/types/src/containers/PipelineProperties/PipelineProperties.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineProperties/PipelineProperties.stories.d.ts +130 -0
- package/dist/types/src/containers/PipelineProperties/PipelineProperties.stories.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +32 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +6 -12
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +32 -0
- package/package.json +45 -44
- package/src/PipelinePlugin.node.ts +1 -2
- package/src/PipelinePlugin.test.ts +3 -5
- package/src/PipelinePlugin.tsx +2 -3
- package/src/capabilities/create-object.ts +0 -1
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/react-surface.tsx +1 -22
- package/src/components/PipelineComponent/PipelineColumn.tsx +10 -13
- package/src/components/PipelineComponent/PipelineComponent.tsx +2 -2
- package/src/containers/PipelineArticle/PipelineArticle.stories.tsx +5 -10
- package/src/containers/PipelineArticle/PipelineArticle.tsx +1 -1
- package/src/containers/PipelineProperties/PipelineProperties.stories.tsx +145 -0
- package/src/containers/PipelineProperties/PipelineProperties.tsx +65 -89
- package/src/meta.ts +2 -25
- package/src/translations.ts +8 -10
- package/dist/lib/neutral/PipelineProperties-JZQYG2CN.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-ZLGRWRJU.mjs +0 -44
- package/dist/lib/neutral/app-graph-builder-ZLGRWRJU.mjs.map +0 -7
- package/dist/lib/neutral/chunk-CYXDAAKN.mjs +0 -35
- package/dist/lib/neutral/chunk-CYXDAAKN.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-QG7QSZSS.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -6
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -40
|
@@ -6,35 +6,29 @@ import * as Schema from 'effect/Schema';
|
|
|
6
6
|
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { resolveSchemaWithRegistry } from '@dxos/app-toolkit/query';
|
|
9
|
-
import { useTypeOptions } from '@dxos/app-toolkit/ui';
|
|
9
|
+
import { AppSurface, useTypeOptions } from '@dxos/app-toolkit/ui';
|
|
10
10
|
import { EID, Filter, JsonSchema, Obj, Query, type QueryAST, Ref, Scope, Tag, type Type } from '@dxos/echo';
|
|
11
11
|
import { type Mutable } from '@dxos/echo/Obj';
|
|
12
12
|
import { SchemaEx } from '@dxos/effect';
|
|
13
13
|
import { useObject, useQuery } from '@dxos/react-client/echo';
|
|
14
|
-
import {
|
|
15
|
-
import { Form, ViewEditor } from '@dxos/react-ui-form';
|
|
16
|
-
import {
|
|
14
|
+
import { useAsyncEffect, useTranslation } from '@dxos/react-ui';
|
|
15
|
+
import { Form, FormFieldHeader, ViewEditor } from '@dxos/react-ui-form';
|
|
16
|
+
import { OrderedList } from '@dxos/react-ui-list';
|
|
17
17
|
import { type ProjectionModel, ViewModel } from '@dxos/schema';
|
|
18
18
|
import { Pipeline } from '@dxos/types';
|
|
19
|
-
import { mx, osTranslations } from '@dxos/ui-theme';
|
|
20
19
|
import { arrayMove } from '@dxos/util';
|
|
21
20
|
|
|
22
21
|
import { meta } from '#meta';
|
|
23
22
|
|
|
24
|
-
const listGrid = 'grid grid-cols-[min-content_1fr_min-content_min-content_min-content]';
|
|
25
|
-
const listItemGrid = 'grid grid-cols-subgrid col-span-5';
|
|
26
|
-
|
|
27
23
|
const ColumnFormSchema = Pipeline.Column.pipe(Schema.mutable, Schema.pick('name'));
|
|
28
24
|
|
|
29
|
-
export type PipelinePropertiesProps =
|
|
30
|
-
pipeline: Pipeline.Pipeline;
|
|
31
|
-
}>;
|
|
25
|
+
export type PipelinePropertiesProps = AppSurface.ObjectPropertiesProps<Pipeline.Pipeline>;
|
|
32
26
|
|
|
33
27
|
/**
|
|
34
28
|
* Supports editing the pipeline view.
|
|
35
29
|
*/
|
|
36
|
-
export const PipelineProperties = ({
|
|
37
|
-
const { t } = useTranslation(meta.
|
|
30
|
+
export const PipelineProperties = ({ subject: pipeline }: PipelinePropertiesProps) => {
|
|
31
|
+
const { t } = useTranslation(meta.profile.key);
|
|
38
32
|
const db = Obj.getDatabase(pipeline);
|
|
39
33
|
const [expandedId, setExpandedId] = useState<string>();
|
|
40
34
|
const [columns, updateColumns] = useObject(pipeline, 'columns');
|
|
@@ -115,10 +109,6 @@ export const PipelineProperties = ({ classNames, pipeline }: PipelinePropertiesP
|
|
|
115
109
|
[columns, updateColumns],
|
|
116
110
|
);
|
|
117
111
|
|
|
118
|
-
const handleToggleField = useCallback((column: Pipeline.Column) => {
|
|
119
|
-
setExpandedId((prevExpandedId) => (prevExpandedId === column.view.uri ? undefined : column.view.uri));
|
|
120
|
-
}, []);
|
|
121
|
-
|
|
122
112
|
const handleDelete = useCallback(
|
|
123
113
|
async (column: Pipeline.Column) => {
|
|
124
114
|
if (column.view.uri === expandedId) {
|
|
@@ -139,11 +129,14 @@ export const PipelineProperties = ({ classNames, pipeline }: PipelinePropertiesP
|
|
|
139
129
|
if (!db) {
|
|
140
130
|
return;
|
|
141
131
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
132
|
+
|
|
133
|
+
const newView = db.add(
|
|
134
|
+
ViewModel.make({
|
|
135
|
+
query: Query.select(Filter.nothing()),
|
|
136
|
+
jsonSchema: JsonSchema.toJsonSchema(Schema.Struct({})),
|
|
137
|
+
}),
|
|
138
|
+
);
|
|
139
|
+
|
|
147
140
|
updateColumns((columns) => {
|
|
148
141
|
columns.push({
|
|
149
142
|
name: '',
|
|
@@ -156,79 +149,62 @@ export const PipelineProperties = ({ classNames, pipeline }: PipelinePropertiesP
|
|
|
156
149
|
}, [db, updateColumns]);
|
|
157
150
|
|
|
158
151
|
return (
|
|
159
|
-
<
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
<List.Root<Pipeline.Column>
|
|
152
|
+
<Form.Section>
|
|
153
|
+
<FormFieldHeader label={t('columns.label')} add={{ label: t('add-column.label'), onClick: handleAdd }} />
|
|
154
|
+
<OrderedList.Root<Pipeline.Column>
|
|
163
155
|
items={columns}
|
|
164
156
|
isItem={Schema.is(Pipeline.Column)}
|
|
165
157
|
getId={(column) => column.view.uri}
|
|
166
158
|
onMove={handleMove}
|
|
159
|
+
expandedId={expandedId}
|
|
160
|
+
onExpandedChange={setExpandedId}
|
|
167
161
|
>
|
|
168
|
-
{({ items
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
162
|
+
{({ items }) => (
|
|
163
|
+
<OrderedList.Content>
|
|
164
|
+
{items.map((column) => (
|
|
165
|
+
<OrderedList.DetailItem<Pipeline.Column>
|
|
166
|
+
key={column.view.uri}
|
|
167
|
+
id={column.view.uri}
|
|
168
|
+
item={column}
|
|
169
|
+
title={column.name || t('untitled-column.title')}
|
|
170
|
+
trailing={
|
|
171
|
+
<OrderedList.DeleteButton
|
|
172
|
+
label={t('delete-column.label')}
|
|
173
|
+
onClick={() => handleDelete(column)}
|
|
174
|
+
data-testid='column.delete'
|
|
175
|
+
/>
|
|
176
|
+
}
|
|
177
|
+
>
|
|
178
|
+
{column.view.target && (
|
|
179
|
+
<>
|
|
180
|
+
<Form.Root
|
|
181
|
+
schema={ColumnFormSchema}
|
|
182
|
+
values={column}
|
|
183
|
+
onValuesChanged={handleColumnValuesChanged(column)}
|
|
184
|
+
>
|
|
185
|
+
<Form.Content>
|
|
186
|
+
<Form.FieldSet />
|
|
187
|
+
</Form.Content>
|
|
188
|
+
</Form.Root>
|
|
189
|
+
<ViewEditor
|
|
190
|
+
ref={projectionRef}
|
|
191
|
+
mode='tag'
|
|
192
|
+
readonly
|
|
193
|
+
type={type}
|
|
194
|
+
view={column.view.target}
|
|
195
|
+
registry={db?.graph.registry}
|
|
196
|
+
db={db}
|
|
197
|
+
tags={tags}
|
|
198
|
+
types={types}
|
|
199
|
+
onQueryChanged={handleQueryChanged}
|
|
188
200
|
/>
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
onClick={() => handleToggleField(column)}
|
|
195
|
-
/>
|
|
196
|
-
</div>
|
|
197
|
-
{expandedId === column.view.uri && column?.view.target && (
|
|
198
|
-
<div className='col-span-5 my-2 border border-separator rounded-md'>
|
|
199
|
-
<Form.Root
|
|
200
|
-
schema={ColumnFormSchema}
|
|
201
|
-
values={column}
|
|
202
|
-
onValuesChanged={handleColumnValuesChanged(column)}
|
|
203
|
-
>
|
|
204
|
-
<Form.Content>
|
|
205
|
-
<Form.FieldSet />
|
|
206
|
-
</Form.Content>
|
|
207
|
-
</Form.Root>
|
|
208
|
-
<ViewEditor
|
|
209
|
-
ref={projectionRef}
|
|
210
|
-
mode='tag'
|
|
211
|
-
readonly
|
|
212
|
-
type={type}
|
|
213
|
-
view={column.view.target}
|
|
214
|
-
registry={db?.graph.registry}
|
|
215
|
-
db={db}
|
|
216
|
-
tags={tags}
|
|
217
|
-
types={types}
|
|
218
|
-
onQueryChanged={handleQueryChanged}
|
|
219
|
-
/>
|
|
220
|
-
</div>
|
|
221
|
-
)}
|
|
222
|
-
</List.Item>
|
|
223
|
-
))}
|
|
224
|
-
</div>
|
|
225
|
-
</>
|
|
201
|
+
</>
|
|
202
|
+
)}
|
|
203
|
+
</OrderedList.DetailItem>
|
|
204
|
+
))}
|
|
205
|
+
</OrderedList.Content>
|
|
226
206
|
)}
|
|
227
|
-
</
|
|
228
|
-
|
|
229
|
-
<div className='my-form-padding'>
|
|
230
|
-
<IconButton icon='ph--plus--regular' label={t('add-view.label')} onClick={handleAdd} classNames='w-full' />
|
|
231
|
-
</div>
|
|
232
|
-
</div>
|
|
207
|
+
</OrderedList.Root>
|
|
208
|
+
</Form.Section>
|
|
233
209
|
);
|
|
234
210
|
};
|
package/src/meta.ts
CHANGED
|
@@ -3,30 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Plugin } from '@dxos/app-framework';
|
|
6
|
-
import { DXN } from '@dxos/keys';
|
|
7
|
-
import { trim } from '@dxos/util';
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
key: DXN.make('org.dxos.plugin.pipeline'),
|
|
11
|
-
name: 'Pipelines',
|
|
12
|
-
author: 'DXOS',
|
|
13
|
-
description: trim`
|
|
14
|
-
A multi-column Kanban-style pipeline plugin for DXOS Composer.
|
|
15
|
-
Each Pipeline holds an ordered set of Columns; each Column is backed by a ViewModel whose query
|
|
16
|
-
can select any ECHO object type — messages, contacts, documents, or custom types — from the active space.
|
|
7
|
+
import config from '../dx.config';
|
|
17
8
|
|
|
18
|
-
|
|
19
|
-
reorder, and delete columns and edit the underlying query and projection for each column.
|
|
20
|
-
Objects can be dragged between columns and the full pipeline state, including column order and
|
|
21
|
-
per-column item order, persists collaboratively via ECHO.
|
|
22
|
-
|
|
23
|
-
A built-in Research template scaffolds a four-column pipeline wired to the Mailbox, Contacts,
|
|
24
|
-
Organizations, and Notes objects in the space, providing an out-of-the-box CRM-style workflow.
|
|
25
|
-
Pipeline articles also expose Invocations and Automation companion tabs for AI-driven automation.
|
|
26
|
-
`,
|
|
27
|
-
icon: 'ph--path--regular',
|
|
28
|
-
iconHue: 'purple',
|
|
29
|
-
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-pipeline',
|
|
30
|
-
spec: 'PLUGIN.mdl',
|
|
31
|
-
tags: ['labs'],
|
|
32
|
-
});
|
|
9
|
+
export const meta = Plugin.getMetaFromConfig(config);
|
package/src/translations.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Type } from '@dxos/echo';
|
|
2
|
-
import { type Resource } from '@dxos/react-ui';
|
|
3
|
-
import { Pipeline } from '@dxos/types';
|
|
4
1
|
//
|
|
5
2
|
// Copyright 2023 DXOS.org
|
|
6
3
|
//
|
|
7
4
|
|
|
5
|
+
import { Type } from '@dxos/echo';
|
|
6
|
+
import { type Resource } from '@dxos/react-ui';
|
|
7
|
+
import { Pipeline } from '@dxos/types';
|
|
8
|
+
|
|
8
9
|
import { meta } from '#meta';
|
|
9
10
|
|
|
10
11
|
export const translations = [
|
|
@@ -21,19 +22,16 @@ export const translations = [
|
|
|
21
22
|
'delete-object.label': 'Delete pipeline',
|
|
22
23
|
'object-deleted.label': 'Pipeline deleted',
|
|
23
24
|
},
|
|
24
|
-
[meta.
|
|
25
|
+
[meta.profile.key]: {
|
|
25
26
|
'plugin.name': 'Pipelines',
|
|
26
27
|
'add-column.label': 'Add column',
|
|
27
28
|
'add-card.label': 'Add object',
|
|
28
|
-
'untitled-
|
|
29
|
+
'untitled-column.title': 'New column',
|
|
29
30
|
'enumerating-tab.label': 'List',
|
|
30
31
|
'editing-tab.label': 'Edit',
|
|
31
|
-
'
|
|
32
|
-
'pipeline-invocations.label': 'Invocations',
|
|
33
|
-
'pipeline-automation.label': 'Automations',
|
|
32
|
+
'columns.label': 'Columns',
|
|
34
33
|
'toggle-expand.label': 'Toggle expand',
|
|
35
|
-
'delete-
|
|
36
|
-
'add-view.label': 'Add view',
|
|
34
|
+
'delete-column.label': 'Delete column',
|
|
37
35
|
},
|
|
38
36
|
},
|
|
39
37
|
},
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/PipelineProperties/PipelineProperties.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\n\nimport { resolveSchemaWithRegistry } from '@dxos/app-toolkit/query';\nimport { useTypeOptions } from '@dxos/app-toolkit/ui';\nimport { EID, Filter, JsonSchema, Obj, Query, type QueryAST, Ref, Scope, Tag, type Type } from '@dxos/echo';\nimport { type Mutable } from '@dxos/echo/Obj';\nimport { SchemaEx } from '@dxos/effect';\nimport { useObject, useQuery } from '@dxos/react-client/echo';\nimport { IconButton, type ThemedClassName, useAsyncEffect, useTranslation } from '@dxos/react-ui';\nimport { Form, ViewEditor } from '@dxos/react-ui-form';\nimport { List } from '@dxos/react-ui-list';\nimport { type ProjectionModel, ViewModel } from '@dxos/schema';\nimport { Pipeline } from '@dxos/types';\nimport { mx, osTranslations } from '@dxos/ui-theme';\nimport { arrayMove } from '@dxos/util';\n\nimport { meta } from '#meta';\n\nconst listGrid = 'grid grid-cols-[min-content_1fr_min-content_min-content_min-content]';\nconst listItemGrid = 'grid grid-cols-subgrid col-span-5';\n\nconst ColumnFormSchema = Pipeline.Column.pipe(Schema.mutable, Schema.pick('name'));\n\nexport type PipelinePropertiesProps = ThemedClassName<{\n pipeline: Pipeline.Pipeline;\n}>;\n\n/**\n * Supports editing the pipeline view.\n */\nexport const PipelineProperties = ({ classNames, pipeline }: PipelinePropertiesProps) => {\n const { t } = useTranslation(meta.id);\n const db = Obj.getDatabase(pipeline);\n const [expandedId, setExpandedId] = useState<string>();\n const [columns, updateColumns] = useObject(pipeline, 'columns');\n const column = useMemo(() => columns.find((column) => column.view.uri === expandedId), [columns, expandedId]);\n const [view, updateView] = useObject(column?.view);\n const [type, setType] = useState<Type.AnyEntity>();\n const projectionRef = useRef<ProjectionModel>(null);\n const tags = useQuery(db, Filter.type(Tag.Tag));\n const types = useTypeOptions({\n db,\n annotation: {\n location: ['database', 'runtime'],\n kind: ['user'],\n },\n });\n\n useAsyncEffect(async () => {\n if (!view?.query || !db) {\n return;\n }\n\n const foundType = await resolveSchemaWithRegistry(db, view.query.ast);\n if (foundType && foundType !== type) {\n setType(() => foundType);\n }\n }, [db, view, type]);\n\n const handleMove = useCallback(\n (fromIndex: number, toIndex: number) =>\n updateColumns((columns) => {\n arrayMove(columns, fromIndex, toIndex);\n }),\n [updateColumns],\n );\n\n const handleQueryChanged = useCallback(\n async (newQuery: QueryAST.Query, target?: EID.EID) => {\n if (!view || !db) {\n return;\n }\n\n const queue = target;\n const query = queue ? Query.fromAst(newQuery).from([Scope.feed(String(queue))]) : Query.fromAst(newQuery);\n updateView((view) => {\n view.query.ast = query.ast as Mutable<typeof query.ast>;\n });\n const newType = await resolveSchemaWithRegistry(db, query.ast);\n if (!newType) {\n return;\n }\n\n const newView = ViewModel.make({\n query,\n jsonSchema: newType.jsonSchema,\n });\n updateView((view) => {\n view.projection = Obj.getSnapshot(newView).projection as Mutable<typeof view.projection>;\n });\n\n setType(() => newType);\n },\n [db, view, updateView, type],\n );\n\n const handleColumnValuesChanged = useCallback(\n (column: Pipeline.Column) =>\n (newValues: { name?: string }, { changed }: { changed: Record<SchemaEx.JsonPath, boolean> }) => {\n if (changed['name' as SchemaEx.JsonPath]) {\n const columnIndex = columns.findIndex((c) => c === column);\n if (columnIndex === -1) {\n return;\n }\n updateColumns((cols) => {\n cols[columnIndex].name = newValues.name ?? '';\n });\n }\n },\n [columns, updateColumns],\n );\n\n const handleToggleField = useCallback((column: Pipeline.Column) => {\n setExpandedId((prevExpandedId) => (prevExpandedId === column.view.uri ? undefined : column.view.uri));\n }, []);\n\n const handleDelete = useCallback(\n async (column: Pipeline.Column) => {\n if (column.view.uri === expandedId) {\n setExpandedId(undefined);\n }\n\n const index = columns.findIndex((l) => l === column);\n const viewToRemove = await column.view.load();\n updateColumns((columns) => {\n columns.splice(index, 1);\n });\n db?.remove(viewToRemove);\n },\n [expandedId, columns, updateColumns, db],\n );\n\n const handleAdd = useCallback(() => {\n if (!db) {\n return;\n }\n const newView = ViewModel.make({\n query: Query.select(Filter.nothing()),\n jsonSchema: JsonSchema.toJsonSchema(Schema.Struct({})),\n });\n db.add(newView);\n updateColumns((columns) => {\n columns.push({\n name: '',\n // Type assertion needed due to QueryAST type variance.\n view: Ref.make(newView) as (typeof columns)[number]['view'],\n order: [],\n });\n });\n setExpandedId(newView.id);\n }, [db, updateColumns]);\n\n return (\n <div className={mx('py-form-padding overflow-y-auto', classNames)}>\n <h2 className='text-sm text-description py-1'>{t('views.label')}</h2>\n\n <List.Root<Pipeline.Column>\n items={columns}\n isItem={Schema.is(Pipeline.Column)}\n getId={(column) => column.view.uri}\n onMove={handleMove}\n >\n {({ items: columns }) => (\n <>\n <div role='list' className={mx(listGrid)}>\n {columns.map((column) => (\n <List.Item<Pipeline.Column>\n key={column.view.uri}\n item={column}\n classNames={listItemGrid}\n aria-expanded={expandedId === column.view.uri}\n >\n <div className={mx(listItemGrid, 'dx-hover rounded-xs cursor-pointer min-h-10')}>\n <List.ItemDragHandle />\n <List.ItemTitle onClick={() => handleToggleField(column)}>\n {column.name || t('untitled-view.title')}\n </List.ItemTitle>\n <List.ItemDeleteButton\n label={t('delete-view.label')}\n autoHide={false}\n onClick={() => handleDelete(column)}\n data-testid='view.delete'\n />\n <IconButton\n iconOnly\n variant='ghost'\n label={t('toggle-expand.label', { ns: osTranslations })}\n icon={expandedId === column.view.uri ? 'ph--caret-down--regular' : 'ph--caret-right--regular'}\n onClick={() => handleToggleField(column)}\n />\n </div>\n {expandedId === column.view.uri && column?.view.target && (\n <div className='col-span-5 my-2 border border-separator rounded-md'>\n <Form.Root\n schema={ColumnFormSchema}\n values={column}\n onValuesChanged={handleColumnValuesChanged(column)}\n >\n <Form.Content>\n <Form.FieldSet />\n </Form.Content>\n </Form.Root>\n <ViewEditor\n ref={projectionRef}\n mode='tag'\n readonly\n type={type}\n view={column.view.target}\n registry={db?.graph.registry}\n db={db}\n tags={tags}\n types={types}\n onQueryChanged={handleQueryChanged}\n />\n </div>\n )}\n </List.Item>\n ))}\n </div>\n </>\n )}\n </List.Root>\n\n <div className='my-form-padding'>\n <IconButton icon='ph--plus--regular' label={t('add-view.label')} onClick={handleAdd} classNames='w-full' />\n </div>\n </div>\n );\n};\n"],
|
|
5
|
-
"mappings": ";AAIA,YAAYA,YAAY;AACxB,OAAOC,SAASC,aAAaC,SAASC,QAAQC,gBAAgB;AAE9D,SAASC,iCAAiC;AAC1C,SAASC,sBAAsB;AAC/B,SAAcC,QAAQC,YAAYC,KAAKC,OAAsBC,KAAKC,OAAOC,WAAsB;AAG/F,SAASC,WAAWC,gBAAgB;AACpC,SAASC,YAAkCC,gBAAgBC,sBAAsB;AACjF,SAASC,MAAMC,kBAAkB;AACjC,SAASC,YAAY;AACrB,SAA+BC,iBAAiB;AAChD,SAASC,gBAAgB;AACzB,SAASC,IAAIC,sBAAsB;AACnC,SAASC,iBAAiB;AAE1B,SAASC,YAAY;AAErB,IAAMC,WAAW;AACjB,IAAMC,eAAe;AAErB,IAAMC,mBAAmBP,SAASQ,OAAOC,KAAYC,gBAAgBC,Y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AAoBN,OAAOtF,EAAE,gBAAA;IAAmBoF,SAASzB;IAAW7D,YAAW;;AAIxG;",
|
|
6
|
-
"names": ["Schema", "React", "useCallback", "useMemo", "useRef", "useState", "resolveSchemaWithRegistry", "useTypeOptions", "Filter", "JsonSchema", "Obj", "Query", "Ref", "Scope", "Tag", "useObject", "useQuery", "IconButton", "useAsyncEffect", "useTranslation", "Form", "ViewEditor", "List", "ViewModel", "Pipeline", "mx", "osTranslations", "arrayMove", "meta", "listGrid", "listItemGrid", "ColumnFormSchema", "Column", "pipe", "mutable", "pick", "PipelineProperties", "classNames", "pipeline", "t", "id", "db", "getDatabase", "expandedId", "setExpandedId", "columns", "updateColumns", "column", "find", "view", "uri", "updateView", "type", "setType", "projectionRef", "tags", "types", "annotation", "location", "kind", "query", "foundType", "ast", "handleMove", "fromIndex", "toIndex", "handleQueryChanged", "newQuery", "target", "queue", "fromAst", "from", "feed", "String", "newType", "newView", "make", "jsonSchema", "projection", "getSnapshot", "handleColumnValuesChanged", "newValues", "changed", "columnIndex", "findIndex", "c", "cols", "name", "handleToggleField", "prevExpandedId", "undefined", "handleDelete", "index", "l", "viewToRemove", "load", "splice", "remove", "handleAdd", "select", "nothing", "toJsonSchema", "Struct", "add", "push", "order", "div", "className", "h2", "Root", "items", "isItem", "is", "getId", "onMove", "role", "map", "Item", "key", "item", "aria-expanded", "ItemDragHandle", "ItemTitle", "onClick", "ItemDeleteButton", "label", "autoHide", "data-testid", "iconOnly", "variant", "ns", "icon", "schema", "values", "onValuesChanged", "Content", "FieldSet", "ref", "mode", "readonly", "registry", "graph", "onQueryChanged"]
|
|
7
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// src/capabilities/app-graph-builder.ts
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import { Capability } from "@dxos/app-framework";
|
|
4
|
-
import { AppCapabilities, AppNode } from "@dxos/app-toolkit";
|
|
5
|
-
import { GraphBuilder } from "@dxos/plugin-graph";
|
|
6
|
-
import { Pipeline } from "@dxos/types";
|
|
7
|
-
import { meta } from "#meta";
|
|
8
|
-
var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
9
|
-
const extensions = yield* Effect.all([
|
|
10
|
-
GraphBuilder.createTypeExtension({
|
|
11
|
-
id: "triggers",
|
|
12
|
-
type: Pipeline.Pipeline,
|
|
13
|
-
connector: () => Effect.succeed([
|
|
14
|
-
AppNode.makeCompanion({
|
|
15
|
-
id: "invocations",
|
|
16
|
-
label: [
|
|
17
|
-
"pipeline-invocations.label",
|
|
18
|
-
{
|
|
19
|
-
ns: meta.id
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
icon: "ph--clock-countdown--regular",
|
|
23
|
-
data: "invocations"
|
|
24
|
-
}),
|
|
25
|
-
AppNode.makeCompanion({
|
|
26
|
-
id: "automation",
|
|
27
|
-
label: [
|
|
28
|
-
"pipeline-automation.label",
|
|
29
|
-
{
|
|
30
|
-
ns: meta.id
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
icon: "ph--lightning--regular",
|
|
34
|
-
data: "automation"
|
|
35
|
-
})
|
|
36
|
-
])
|
|
37
|
-
})
|
|
38
|
-
]);
|
|
39
|
-
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
40
|
-
}));
|
|
41
|
-
export {
|
|
42
|
-
app_graph_builder_default as default
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=app-graph-builder-ZLGRWRJU.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, AppNode } from '@dxos/app-toolkit';\nimport { GraphBuilder } from '@dxos/plugin-graph';\nimport { Pipeline } from '@dxos/types';\n\nimport { meta } from '#meta';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* Effect.all([\n GraphBuilder.createTypeExtension({\n id: 'triggers',\n type: Pipeline.Pipeline,\n connector: () =>\n Effect.succeed([\n AppNode.makeCompanion({\n id: 'invocations',\n label: ['pipeline-invocations.label', { ns: meta.id }],\n icon: 'ph--clock-countdown--regular',\n data: 'invocations',\n }),\n AppNode.makeCompanion({\n id: 'automation',\n label: ['pipeline-automation.label', { ns: meta.id }],\n icon: 'ph--lightning--regular',\n data: 'automation',\n }),\n ]),\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,eAAe;AACzC,SAASC,oBAAoB;AAC7B,SAASC,gBAAgB;AAEzB,SAASC,YAAY;AAErB,IAAA,4BAAeL,WAAWM,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAcC,WAAI;IACnCN,aAAaO,oBAAoB;MAC/BC,IAAI;MACJC,MAAMR,SAASA;MACfS,WAAW,MACFC,eAAQ;QACbZ,QAAQa,cAAc;UACpBJ,IAAI;UACJK,OAAO;YAAC;YAA8B;cAAEC,IAAIZ,KAAKM;YAAG;;UACpDO,MAAM;UACNC,MAAM;QACR,CAAA;QACAjB,QAAQa,cAAc;UACpBJ,IAAI;UACJK,OAAO;YAAC;YAA6B;cAAEC,IAAIZ,KAAKM;YAAG;;UACnDO,MAAM;UACNC,MAAM;QACR,CAAA;OACD;IACL,CAAA;GACD;AAED,SAAOnB,WAAWoB,YAAYnB,gBAAgBoB,iBAAiBb,UAAAA;AACjE,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capability", "AppCapabilities", "AppNode", "GraphBuilder", "Pipeline", "meta", "makeModule", "fnUntraced", "extensions", "all", "createTypeExtension", "id", "type", "connector", "succeed", "makeCompanion", "label", "ns", "icon", "data", "contributes", "AppGraphBuilder"]
|
|
7
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
|
-
import { Plugin } from "@dxos/app-framework";
|
|
3
|
-
import { DXN } from "@dxos/keys";
|
|
4
|
-
import { trim } from "@dxos/util";
|
|
5
|
-
var meta = Plugin.makeMeta({
|
|
6
|
-
key: DXN.make("org.dxos.plugin.pipeline"),
|
|
7
|
-
name: "Pipelines",
|
|
8
|
-
author: "DXOS",
|
|
9
|
-
description: trim`
|
|
10
|
-
A multi-column Kanban-style pipeline plugin for DXOS Composer.
|
|
11
|
-
Each Pipeline holds an ordered set of Columns; each Column is backed by a ViewModel whose query
|
|
12
|
-
can select any ECHO object type — messages, contacts, documents, or custom types — from the active space.
|
|
13
|
-
|
|
14
|
-
Columns are fully configurable through the Settings companion panel, where users can add, rename,
|
|
15
|
-
reorder, and delete columns and edit the underlying query and projection for each column.
|
|
16
|
-
Objects can be dragged between columns and the full pipeline state, including column order and
|
|
17
|
-
per-column item order, persists collaboratively via ECHO.
|
|
18
|
-
|
|
19
|
-
A built-in Research template scaffolds a four-column pipeline wired to the Mailbox, Contacts,
|
|
20
|
-
Organizations, and Notes objects in the space, providing an out-of-the-box CRM-style workflow.
|
|
21
|
-
Pipeline articles also expose Invocations and Automation companion tabs for AI-driven automation.
|
|
22
|
-
`,
|
|
23
|
-
icon: "ph--path--regular",
|
|
24
|
-
iconHue: "purple",
|
|
25
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-pipeline",
|
|
26
|
-
spec: "PLUGIN.mdl",
|
|
27
|
-
tags: [
|
|
28
|
-
"labs"
|
|
29
|
-
]
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export {
|
|
33
|
-
meta
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=chunk-CYXDAAKN.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\nimport { trim } from '@dxos/util';\n\nexport const meta = Plugin.makeMeta({\n key: DXN.make('org.dxos.plugin.pipeline'),\n name: 'Pipelines',\n author: 'DXOS',\n description: trim`\n A multi-column Kanban-style pipeline plugin for DXOS Composer.\n Each Pipeline holds an ordered set of Columns; each Column is backed by a ViewModel whose query\n can select any ECHO object type — messages, contacts, documents, or custom types — from the active space.\n\n Columns are fully configurable through the Settings companion panel, where users can add, rename,\n reorder, and delete columns and edit the underlying query and projection for each column.\n Objects can be dragged between columns and the full pipeline state, including column order and\n per-column item order, persists collaboratively via ECHO.\n\n A built-in Research template scaffolds a four-column pipeline wired to the Mailbox, Contacts,\n Organizations, and Notes objects in the space, providing an out-of-the-box CRM-style workflow.\n Pipeline articles also expose Invocations and Automation companion tabs for AI-driven automation.\n `,\n icon: 'ph--path--regular',\n iconHue: 'purple',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-pipeline',\n spec: 'PLUGIN.mdl',\n tags: ['labs'],\n});\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,YAAY;AAEd,IAAMC,OAAOH,OAAOI,SAAS;EAClCC,KAAKJ,IAAIK,KAAK,0BAAA;EACdC,MAAM;EACNC,QAAQ;EACRC,aAAaP;;;;;;;;;;;;;;EAcbQ,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;EACNC,MAAM;IAAC;;AACT,CAAA;",
|
|
6
|
-
"names": ["Plugin", "DXN", "trim", "meta", "makeMeta", "key", "make", "name", "author", "description", "icon", "iconHue", "source", "spec", "tags"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { InvocationTraceContainer } from '@dxos/devtools';\nimport { Obj } from '@dxos/echo';\nimport { Panel } from '@dxos/react-ui';\nimport { Pipeline } from '@dxos/types';\n\nimport { PipelineArticle, PipelineProperties } from '#containers';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: 'root',\n filter: AppSurface.object(AppSurface.Article, Pipeline.Pipeline),\n component: ({ data, role }) => (\n <PipelineArticle role={role} subject={data.subject} attendableId={data.attendableId} />\n ),\n }),\n Surface.create({\n id: 'companion.invocations',\n filter: AppSurface.allOf(\n AppSurface.literal(AppSurface.Article, 'invocations'),\n AppSurface.companion(AppSurface.Article, Pipeline.Pipeline),\n ),\n component: ({ data, role }) => {\n const db = Obj.getDatabase(data.companionTo);\n // TODO(wittjosiah): Filter the invocations to those relevant to the project.\n return (\n <Panel.Root role={role} className='dx-document'>\n <Panel.Content asChild>\n <InvocationTraceContainer db={db} detailAxis='block' />\n </Panel.Content>\n </Panel.Root>\n );\n },\n }),\n Surface.create({\n id: 'objectProperties',\n filter: AppSurface.object(AppSurface.ObjectProperties, Pipeline.Pipeline),\n component: ({ data }) => <PipelineProperties pipeline={data.subject} />,\n }),\n ]),\n ),\n);\n"],
|
|
5
|
-
"mappings": ";AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,kBAAkB;AAC3B,SAASC,gCAAgC;AACzC,SAASC,WAAW;AACpB,SAASC,aAAa;AACtB,SAASC,gBAAgB;AAEzB,SAASC,iBAAiBC,0BAA0B;AAEpD,IAAA,wBAAeR,WAAWS,WAAW,MAC5BC,eACLV,WAAWW,YAAYZ,aAAaa,cAAc;EAChDX,QAAQY,OAAO;IACbC,IAAI;IACJC,QAAQb,WAAWc,OAAOd,WAAWe,SAASX,SAASA,QAAQ;IAC/DY,WAAW,CAAC,EAAEC,MAAMC,KAAI,MACtB,sBAAA,cAACb,iBAAAA;MAAgBa;MAAYC,SAASF,KAAKE;MAASC,cAAcH,KAAKG;;EAE3E,CAAA;EACArB,QAAQY,OAAO;IACbC,IAAI;IACJC,QAAQb,WAAWqB,MACjBrB,WAAWsB,QAAQtB,WAAWe,SAAS,aAAA,GACvCf,WAAWuB,UAAUvB,WAAWe,SAASX,SAASA,QAAQ,CAAA;IAE5DY,WAAW,CAAC,EAAEC,MAAMC,KAAI,MAAE;AACxB,YAAMM,KAAKtB,IAAIuB,YAAYR,KAAKS,WAAW;AAE3C,aACE,sBAAA,cAACvB,MAAMwB,MAAI;QAACT;QAAYU,WAAU;SAChC,sBAAA,cAACzB,MAAM0B,SAAO;QAACC,SAAAA;SACb,sBAAA,cAAC7B,0BAAAA;QAAyBuB;QAAQO,YAAW;;IAIrD;EACF,CAAA;EACAhC,QAAQY,OAAO;IACbC,IAAI;IACJC,QAAQb,WAAWc,OAAOd,WAAWgC,kBAAkB5B,SAASA,QAAQ;IACxEY,WAAW,CAAC,EAAEC,KAAI,MAAO,sBAAA,cAACX,oBAAAA;MAAmB2B,UAAUhB,KAAKE;;EAC9D,CAAA;CACD,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capabilities", "Capability", "Surface", "AppSurface", "InvocationTraceContainer", "Obj", "Panel", "Pipeline", "PipelineArticle", "PipelineProperties", "makeModule", "succeed", "contributes", "ReactSurface", "create", "id", "filter", "object", "Article", "component", "data", "role", "subject", "attendableId", "allOf", "literal", "companion", "db", "getDatabase", "companionTo", "Root", "className", "Content", "asChild", "detailAxis", "ObjectProperties", "pipeline"]
|
|
7
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as Effect from 'effect/Effect';
|
|
2
|
-
import { Capability } from '@dxos/app-framework';
|
|
3
|
-
import { GraphBuilder } from '@dxos/plugin-graph';
|
|
4
|
-
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<GraphBuilder.BuilderExtensions>>, never, never>;
|
|
5
|
-
export default _default;
|
|
6
|
-
//# sourceMappingURL=app-graph-builder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
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, AppNode } from '@dxos/app-toolkit';
|
|
9
|
-
import { GraphBuilder } from '@dxos/plugin-graph';
|
|
10
|
-
import { Pipeline } from '@dxos/types';
|
|
11
|
-
|
|
12
|
-
import { meta } from '#meta';
|
|
13
|
-
|
|
14
|
-
export default Capability.makeModule(
|
|
15
|
-
Effect.fnUntraced(function* () {
|
|
16
|
-
const extensions = yield* Effect.all([
|
|
17
|
-
GraphBuilder.createTypeExtension({
|
|
18
|
-
id: 'triggers',
|
|
19
|
-
type: Pipeline.Pipeline,
|
|
20
|
-
connector: () =>
|
|
21
|
-
Effect.succeed([
|
|
22
|
-
AppNode.makeCompanion({
|
|
23
|
-
id: 'invocations',
|
|
24
|
-
label: ['pipeline-invocations.label', { ns: meta.id }],
|
|
25
|
-
icon: 'ph--clock-countdown--regular',
|
|
26
|
-
data: 'invocations',
|
|
27
|
-
}),
|
|
28
|
-
AppNode.makeCompanion({
|
|
29
|
-
id: 'automation',
|
|
30
|
-
label: ['pipeline-automation.label', { ns: meta.id }],
|
|
31
|
-
icon: 'ph--lightning--regular',
|
|
32
|
-
data: 'automation',
|
|
33
|
-
}),
|
|
34
|
-
]),
|
|
35
|
-
}),
|
|
36
|
-
]);
|
|
37
|
-
|
|
38
|
-
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
39
|
-
}),
|
|
40
|
-
);
|