@dxos/plugin-pipeline 0.8.4-main.c85a9c8dae → 0.8.4-main.fcfe5033a5
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/index.mjs +63 -74
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- 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.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +3 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/PipelineComponent/PipelineColumn.d.ts.map +1 -0
- package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts +49 -0
- package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts.map +1 -0
- package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts +43 -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 +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts +3 -3
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts +29 -28
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineContainer/index.d.ts +1 -2
- package/dist/types/src/containers/PipelineContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineProperties/PipelineProperties.d.ts +11 -0
- package/dist/types/src/containers/PipelineProperties/PipelineProperties.d.ts.map +1 -0
- package/dist/types/src/containers/PipelineProperties/index.d.ts +2 -0
- package/dist/types/src/containers/PipelineProperties/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +1 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/hooks/usePipelineBoardModel.d.ts.map +1 -1
- package/dist/types/src/templates/research.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +22 -21
- 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 +52 -43
- package/src/PipelinePlugin.tsx +20 -19
- package/src/capabilities/app-graph-builder.ts +40 -0
- package/src/capabilities/index.ts +4 -3
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +16 -15
- package/src/components/{PipelineColumn.tsx → PipelineComponent/PipelineColumn.tsx} +64 -33
- package/src/components/{PipelineComponent.stories.tsx → PipelineComponent/PipelineComponent.stories.tsx} +20 -18
- package/src/components/{PipelineComponent.tsx → PipelineComponent/PipelineComponent.tsx} +22 -13
- package/src/components/PipelineComponent/index.ts +6 -0
- package/src/components/index.ts +0 -1
- package/src/containers/PipelineContainer/PipelineContainer.stories.tsx +30 -30
- package/src/containers/PipelineContainer/PipelineContainer.tsx +12 -13
- package/src/containers/PipelineContainer/index.ts +1 -3
- package/src/containers/{PipelineObjectSettings/PipelineObjectSettings.tsx → PipelineProperties/PipelineProperties.tsx} +16 -16
- package/src/containers/PipelineProperties/index.ts +5 -0
- package/src/containers/index.ts +1 -1
- package/src/hooks/usePipelineBoardModel.ts +1 -1
- package/src/meta.ts +1 -1
- package/src/templates/research.ts +6 -5
- package/src/translations.ts +22 -21
- package/src/types/index.ts +0 -3
- package/dist/lib/browser/PipelineContainer-2ZYSZATA.mjs +0 -320
- package/dist/lib/browser/PipelineContainer-2ZYSZATA.mjs.map +0 -7
- package/dist/lib/browser/PipelineObjectSettings-D36OYVHW.mjs +0 -224
- package/dist/lib/browser/PipelineObjectSettings-D36OYVHW.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-N6FZHYWT.mjs +0 -42
- package/dist/lib/browser/chunk-N6FZHYWT.mjs.map +0 -7
- package/dist/lib/browser/chunk-QWNKLHBY.mjs +0 -28
- package/dist/lib/browser/chunk-QWNKLHBY.mjs.map +0 -7
- package/dist/lib/browser/react-surface-ZGQVH4VX.mjs +0 -60
- package/dist/lib/browser/react-surface-ZGQVH4VX.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -2
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/components/PipelineColumn.d.ts.map +0 -1
- package/dist/types/src/components/PipelineComponent.d.ts +0 -47
- package/dist/types/src/components/PipelineComponent.d.ts.map +0 -1
- package/dist/types/src/components/PipelineComponent.stories.d.ts +0 -42
- package/dist/types/src/components/PipelineComponent.stories.d.ts.map +0 -1
- package/dist/types/src/containers/PipelineObjectSettings/PipelineObjectSettings.d.ts +0 -11
- package/dist/types/src/containers/PipelineObjectSettings/PipelineObjectSettings.d.ts.map +0 -1
- package/dist/types/src/containers/PipelineObjectSettings/index.d.ts +0 -3
- package/dist/types/src/containers/PipelineObjectSettings/index.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/capabilities/app-graph-builder/app-graph-builder.ts +0 -51
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -5
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -29
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/containers/PipelineObjectSettings/index.ts +0 -7
- package/src/types/PipelineAction.ts +0 -29
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/dist/types/src/components/{PipelineColumn.d.ts → PipelineComponent/PipelineColumn.d.ts} +0 -0
|
@@ -13,23 +13,23 @@ import { Database, Feed, JsonSchema, Obj, Query, Tag } from '@dxos/echo';
|
|
|
13
13
|
import { Collection, View } from '@dxos/echo';
|
|
14
14
|
import { createFeedServiceLayer } from '@dxos/echo-db';
|
|
15
15
|
import { ClientPlugin } from '@dxos/plugin-client';
|
|
16
|
+
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
16
17
|
import { InboxPlugin } from '@dxos/plugin-inbox';
|
|
17
18
|
import { PreviewPlugin } from '@dxos/plugin-preview';
|
|
18
19
|
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
19
|
-
import {
|
|
20
|
+
import { random } from '@dxos/random';
|
|
20
21
|
import { useDatabase, useQuery } from '@dxos/react-client/echo';
|
|
21
|
-
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
22
22
|
import { translations as stackTranslations } from '@dxos/react-ui-stack';
|
|
23
|
+
import { withLayout } from '@dxos/react-ui/testing';
|
|
23
24
|
import { ViewModel } from '@dxos/schema';
|
|
24
25
|
import { createObjectFactory } from '@dxos/schema/testing';
|
|
25
26
|
import { Message, Organization, Person, Pipeline, Task } from '@dxos/types';
|
|
26
27
|
|
|
27
28
|
import { translations } from '../../translations';
|
|
28
|
-
import
|
|
29
|
-
|
|
29
|
+
import PipelineProperties from '../PipelineProperties';
|
|
30
30
|
import { PipelineContainer } from './PipelineContainer';
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
random.seed(0);
|
|
33
33
|
|
|
34
34
|
const DefaultStory = () => {
|
|
35
35
|
const db = useDatabase();
|
|
@@ -42,8 +42,8 @@ const DefaultStory = () => {
|
|
|
42
42
|
|
|
43
43
|
return (
|
|
44
44
|
<div className='grow grid grid-cols-[1fr_350px] overflow-hidden h-full w-full'>
|
|
45
|
-
<PipelineContainer role='article' subject={pipeline} />
|
|
46
|
-
<
|
|
45
|
+
<PipelineContainer role='article' subject={pipeline} attendableId='test' />
|
|
46
|
+
<PipelineProperties pipeline={pipeline} classNames='border-s border-separator' />
|
|
47
47
|
</div>
|
|
48
48
|
);
|
|
49
49
|
};
|
|
@@ -52,7 +52,6 @@ const meta = {
|
|
|
52
52
|
title: 'plugins/plugin-pipeline/containers/PipelineContainer',
|
|
53
53
|
render: DefaultStory,
|
|
54
54
|
decorators: [
|
|
55
|
-
withTheme(),
|
|
56
55
|
withLayout({ layout: 'fullscreen' }),
|
|
57
56
|
withPluginManager({
|
|
58
57
|
plugins: [
|
|
@@ -71,10 +70,7 @@ const meta = {
|
|
|
71
70
|
Message.Message,
|
|
72
71
|
],
|
|
73
72
|
onClientInitialized: Effect.fnUntraced(function* ({ client }) {
|
|
74
|
-
yield*
|
|
75
|
-
yield* Effect.promise(() => client.spaces.waitUntilReady());
|
|
76
|
-
const space = client.spaces.default;
|
|
77
|
-
yield* Effect.promise(() => space.waitUntilReady());
|
|
73
|
+
const { personalSpace } = yield* initializeIdentity(client);
|
|
78
74
|
|
|
79
75
|
yield* Effect.gen(function* () {
|
|
80
76
|
const tag = yield* Database.add(Tag.make({ label: 'important', hue: 'green' }));
|
|
@@ -108,9 +104,9 @@ const meta = {
|
|
|
108
104
|
const messageFeed = yield* Database.add(Feed.make({ name: 'Messages' }));
|
|
109
105
|
const messages = Array.from({ length: 20 }).map(() =>
|
|
110
106
|
Obj.make(Message.Message, {
|
|
111
|
-
created:
|
|
107
|
+
created: random.date.recent().toISOString(),
|
|
112
108
|
sender: { role: 'user' },
|
|
113
|
-
blocks: [{ _tag: 'text' as const, text:
|
|
109
|
+
blocks: [{ _tag: 'text' as const, text: random.lorem.sentences(2) }],
|
|
114
110
|
}),
|
|
115
111
|
);
|
|
116
112
|
yield* Feed.append(messageFeed, messages);
|
|
@@ -127,9 +123,9 @@ const meta = {
|
|
|
127
123
|
const taskFeed = yield* Database.add(Feed.make({ name: 'Tasks' }));
|
|
128
124
|
const feedTasks = Array.from({ length: 10 }).map(() =>
|
|
129
125
|
Obj.make(Task.Task, {
|
|
130
|
-
title:
|
|
131
|
-
status:
|
|
132
|
-
priority:
|
|
126
|
+
title: random.lorem.sentence(),
|
|
127
|
+
status: random.helpers.arrayElement(['todo', 'in-progress', 'done']) as any,
|
|
128
|
+
priority: random.helpers.arrayElement(['low', 'medium', 'high']) as any,
|
|
133
129
|
}),
|
|
134
130
|
);
|
|
135
131
|
yield* Feed.append(taskFeed, feedTasks);
|
|
@@ -171,12 +167,12 @@ const meta = {
|
|
|
171
167
|
yield* Database.add(
|
|
172
168
|
Obj.make(Organization.Organization, {
|
|
173
169
|
[Obj.Meta]: {
|
|
174
|
-
tags:
|
|
170
|
+
tags: random.datatype.boolean() ? [tagDxn] : [],
|
|
175
171
|
},
|
|
176
|
-
name:
|
|
177
|
-
website:
|
|
178
|
-
description:
|
|
179
|
-
image:
|
|
172
|
+
name: random.company.name(),
|
|
173
|
+
website: random.internet.url(),
|
|
174
|
+
description: random.lorem.paragraph(),
|
|
175
|
+
image: random.image.url(),
|
|
180
176
|
}),
|
|
181
177
|
);
|
|
182
178
|
}
|
|
@@ -186,29 +182,33 @@ const meta = {
|
|
|
186
182
|
yield* Database.add(
|
|
187
183
|
Obj.make(Task.Task, {
|
|
188
184
|
[Obj.Meta]: {
|
|
189
|
-
tags:
|
|
185
|
+
tags: random.datatype.boolean() ? [tagDxn] : [],
|
|
190
186
|
},
|
|
191
|
-
title:
|
|
192
|
-
status:
|
|
193
|
-
priority:
|
|
187
|
+
title: random.lorem.sentence(),
|
|
188
|
+
status: random.helpers.arrayElement(['todo', 'in-progress', 'done']) as any,
|
|
189
|
+
priority: random.helpers.arrayElement(['low', 'medium', 'high']) as any,
|
|
194
190
|
}),
|
|
195
191
|
);
|
|
196
192
|
}
|
|
197
193
|
|
|
198
194
|
// Generate sample Contacts.
|
|
199
|
-
const factory = createObjectFactory(
|
|
195
|
+
const factory = createObjectFactory(personalSpace.db, random as any);
|
|
200
196
|
yield* Effect.promise(() => factory([{ type: Person.Person, count: 12 }]));
|
|
201
197
|
|
|
202
198
|
// Generate sample Projects.
|
|
203
199
|
for (const _ of Array.from({ length: 20 })) {
|
|
204
200
|
yield* Database.add(
|
|
205
201
|
Pipeline.make({
|
|
206
|
-
name:
|
|
207
|
-
description:
|
|
202
|
+
name: random.commerce.productName(),
|
|
203
|
+
description: random.lorem.sentence(),
|
|
208
204
|
}),
|
|
209
205
|
);
|
|
210
206
|
}
|
|
211
|
-
}).pipe(
|
|
207
|
+
}).pipe(
|
|
208
|
+
Effect.provide(
|
|
209
|
+
Layer.merge(Database.layer(personalSpace.db), createFeedServiceLayer(personalSpace.queues)),
|
|
210
|
+
),
|
|
211
|
+
);
|
|
212
212
|
}),
|
|
213
213
|
}),
|
|
214
214
|
InboxPlugin(),
|
|
@@ -9,48 +9,47 @@ import { useCapability } from '@dxos/app-framework/ui';
|
|
|
9
9
|
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
10
10
|
import { Surface } from '@dxos/app-framework/ui';
|
|
11
11
|
import {
|
|
12
|
+
AppSurface,
|
|
12
13
|
OBJECT_ACTIONS_CONTRIBUTION_ID,
|
|
13
14
|
OBJECT_ACTIONS_CONTRIBUTION_PRIORITY,
|
|
14
|
-
type SurfaceComponentProps,
|
|
15
15
|
useObjectMenuItems,
|
|
16
16
|
} from '@dxos/app-toolkit/ui';
|
|
17
|
-
import {
|
|
18
|
-
import { ATTENDABLE_PATH_SEPARATOR, DeckOperation } from '@dxos/plugin-deck/types';
|
|
17
|
+
import { DeckOperation } from '@dxos/plugin-deck/operations';
|
|
19
18
|
import { Panel } from '@dxos/react-ui';
|
|
19
|
+
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
20
20
|
import { useAttention } from '@dxos/react-ui-attention';
|
|
21
21
|
import { useMenu } from '@dxos/react-ui-menu';
|
|
22
22
|
import { type Pipeline } from '@dxos/types';
|
|
23
23
|
|
|
24
|
-
import { type ItemProps, PipelineComponent } from '
|
|
25
|
-
import { usePipelineBoardModel } from '
|
|
24
|
+
import { type ItemProps, PipelineComponent } from '#components';
|
|
25
|
+
import { usePipelineBoardModel } from '#hooks';
|
|
26
26
|
|
|
27
27
|
const PIPELINE_ITEM = 'PipelineItem';
|
|
28
28
|
|
|
29
|
-
export type PipelineContainerProps =
|
|
29
|
+
export type PipelineContainerProps = AppSurface.ObjectArticleProps<Pipeline.Pipeline>;
|
|
30
30
|
|
|
31
|
-
export const PipelineContainer = ({ role, subject: pipeline }: PipelineContainerProps) => {
|
|
31
|
+
export const PipelineContainer = ({ role, subject: pipeline, attendableId }: PipelineContainerProps) => {
|
|
32
32
|
const registry = useCapability(Capabilities.AtomRegistry);
|
|
33
33
|
const model = usePipelineBoardModel(pipeline, registry);
|
|
34
34
|
const { invokePromise } = useOperationInvoker();
|
|
35
|
-
const attendableId = Obj.getDXN(pipeline).toString();
|
|
36
35
|
const { hasAttention } = useAttention(attendableId);
|
|
37
36
|
|
|
38
37
|
const handleColumnAdd = useCallback(
|
|
39
38
|
() =>
|
|
40
39
|
invokePromise(DeckOperation.ChangeCompanion, {
|
|
41
|
-
companion:
|
|
40
|
+
companion: linkedSegment('settings'),
|
|
42
41
|
}),
|
|
43
|
-
[invokePromise
|
|
42
|
+
[invokePromise],
|
|
44
43
|
);
|
|
45
44
|
|
|
46
45
|
return (
|
|
47
46
|
<PipelineComponent.Root Item={PipelineItem} onAddColumn={handleColumnAdd}>
|
|
48
|
-
<Panel.Root role={role}
|
|
47
|
+
<Panel.Root role={role}>
|
|
49
48
|
<Panel.Toolbar asChild>
|
|
50
49
|
<PipelineComponent.Toolbar disabled={!hasAttention} />
|
|
51
50
|
</Panel.Toolbar>
|
|
52
51
|
<Panel.Content asChild>
|
|
53
|
-
<PipelineComponent.Content model={model}>
|
|
52
|
+
<PipelineComponent.Content asChild model={model}>
|
|
54
53
|
<PipelineComponent.Columns pipeline={pipeline} />
|
|
55
54
|
</PipelineComponent.Content>
|
|
56
55
|
</Panel.Content>
|
|
@@ -76,7 +75,7 @@ const PipelineItem = ({ item, projectionModel }: ItemProps) => {
|
|
|
76
75
|
|
|
77
76
|
return (
|
|
78
77
|
<Surface.Surface
|
|
79
|
-
|
|
78
|
+
type={AppSurface.Card}
|
|
80
79
|
data={{
|
|
81
80
|
subject: item,
|
|
82
81
|
projection: projectionModel,
|
|
@@ -5,35 +5,34 @@
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
7
7
|
|
|
8
|
+
import { resolveSchemaWithRegistry } from '@dxos/app-toolkit/query';
|
|
9
|
+
import { useTypeOptions } from '@dxos/app-toolkit/ui';
|
|
8
10
|
import { DXN, Filter, JsonSchema, Obj, Query, type QueryAST, Ref, Tag } from '@dxos/echo';
|
|
9
11
|
import { type JsonPath, type Mutable } from '@dxos/echo/internal';
|
|
10
|
-
import { useTypeOptions } from '@dxos/plugin-space';
|
|
11
|
-
import { resolveSchemaWithRegistry } from '@dxos/plugin-space';
|
|
12
12
|
import { getSpace, useObject, useQuery } from '@dxos/react-client/echo';
|
|
13
13
|
import { IconButton, type ThemedClassName, useAsyncEffect, useTranslation } from '@dxos/react-ui';
|
|
14
14
|
import { Form, ViewEditor } from '@dxos/react-ui-form';
|
|
15
15
|
import { List } from '@dxos/react-ui-list';
|
|
16
16
|
import { type ProjectionModel, ViewModel } from '@dxos/schema';
|
|
17
|
-
import { Pipeline
|
|
17
|
+
import { Pipeline } from '@dxos/types';
|
|
18
18
|
import { mx, osTranslations, subtleHover } from '@dxos/ui-theme';
|
|
19
19
|
import { arrayMove } from '@dxos/util';
|
|
20
20
|
|
|
21
|
-
import { meta } from '
|
|
21
|
+
import { meta } from '#meta';
|
|
22
22
|
|
|
23
23
|
const listGrid = 'grid grid-cols-[min-content_1fr_min-content_min-content_min-content]';
|
|
24
24
|
const listItemGrid = 'grid grid-cols-subgrid col-span-5';
|
|
25
25
|
|
|
26
26
|
const ColumnFormSchema = Pipeline.Column.pipe(Schema.mutable, Schema.pick('name'));
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
export type PipelineObjectSettingsProps = ThemedClassName<{
|
|
28
|
+
export type PipelinePropertiesProps = ThemedClassName<{
|
|
30
29
|
pipeline: Pipeline.Pipeline;
|
|
31
30
|
}>;
|
|
32
31
|
|
|
33
32
|
/**
|
|
34
33
|
* Supports editing the pipeline view.
|
|
35
34
|
*/
|
|
36
|
-
export const
|
|
35
|
+
export const PipelineProperties = ({ classNames, pipeline }: PipelinePropertiesProps) => {
|
|
37
36
|
const { t } = useTranslation(meta.id);
|
|
38
37
|
const space = getSpace(pipeline);
|
|
39
38
|
const [expandedId, setExpandedId] = useState<string>();
|
|
@@ -51,7 +50,6 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
|
|
|
51
50
|
annotation: {
|
|
52
51
|
location: ['database', 'runtime'],
|
|
53
52
|
kind: ['user'],
|
|
54
|
-
registered: ['registered', 'unregistered'],
|
|
55
53
|
},
|
|
56
54
|
});
|
|
57
55
|
|
|
@@ -146,13 +144,13 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
|
|
|
146
144
|
return;
|
|
147
145
|
}
|
|
148
146
|
const newView = ViewModel.make({
|
|
149
|
-
query: Query.select(Filter.
|
|
150
|
-
jsonSchema: JsonSchema.toJsonSchema(
|
|
147
|
+
query: Query.select(Filter.nothing()),
|
|
148
|
+
jsonSchema: JsonSchema.toJsonSchema(Schema.Struct({})),
|
|
151
149
|
});
|
|
152
150
|
space.db.add(newView);
|
|
153
151
|
updateColumns((columns) => {
|
|
154
152
|
columns.push({
|
|
155
|
-
name: '
|
|
153
|
+
name: '',
|
|
156
154
|
// Type assertion needed due to QueryAST type variance.
|
|
157
155
|
view: Ref.make(newView) as (typeof columns)[number]['view'],
|
|
158
156
|
order: [],
|
|
@@ -163,7 +161,7 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
|
|
|
163
161
|
|
|
164
162
|
return (
|
|
165
163
|
<div role='none' className={mx('py-form-padding overflow-y-auto', classNames)}>
|
|
166
|
-
<h2 className='text-sm text-description py-1'>{t('views
|
|
164
|
+
<h2 className='text-sm text-description py-1'>{t('views.label')}</h2>
|
|
167
165
|
|
|
168
166
|
<List.Root<Pipeline.Column>
|
|
169
167
|
items={columns}
|
|
@@ -183,9 +181,11 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
|
|
|
183
181
|
>
|
|
184
182
|
<div role='none' className={mx(subtleHover, listItemGrid, 'rounded-xs cursor-pointer min-h-10')}>
|
|
185
183
|
<List.ItemDragHandle />
|
|
186
|
-
<List.ItemTitle onClick={() => handleToggleField(column)}>
|
|
184
|
+
<List.ItemTitle onClick={() => handleToggleField(column)}>
|
|
185
|
+
{column.name || t('untitled-view.title')}
|
|
186
|
+
</List.ItemTitle>
|
|
187
187
|
<List.ItemDeleteButton
|
|
188
|
-
label={t('delete
|
|
188
|
+
label={t('delete-view.label')}
|
|
189
189
|
autoHide={false}
|
|
190
190
|
onClick={() => handleDelete(column)}
|
|
191
191
|
data-testid='view.delete'
|
|
@@ -193,7 +193,7 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
|
|
|
193
193
|
<IconButton
|
|
194
194
|
iconOnly
|
|
195
195
|
variant='ghost'
|
|
196
|
-
label={t('toggle
|
|
196
|
+
label={t('toggle-expand.label', { ns: osTranslations })}
|
|
197
197
|
icon={
|
|
198
198
|
expandedId === column.view.dxn.toString()
|
|
199
199
|
? 'ph--caret-down--regular'
|
|
@@ -235,7 +235,7 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
|
|
|
235
235
|
</List.Root>
|
|
236
236
|
|
|
237
237
|
<div role='none' className='my-form-padding'>
|
|
238
|
-
<IconButton icon='ph--plus--regular' label={t('add
|
|
238
|
+
<IconButton icon='ph--plus--regular' label={t('add-view.label')} onClick={handleAdd} classNames='w-full' />
|
|
239
239
|
</div>
|
|
240
240
|
</div>
|
|
241
241
|
);
|
package/src/containers/index.ts
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
import { type ComponentType, lazy } from 'react';
|
|
6
6
|
|
|
7
7
|
export const PipelineContainer: ComponentType<any> = lazy(() => import('./PipelineContainer'));
|
|
8
|
-
export const
|
|
8
|
+
export const PipelineProperties: ComponentType<any> = lazy(() => import('./PipelineProperties'));
|
|
@@ -6,9 +6,9 @@ import { Atom, type Registry } from '@effect-atom/atom-react';
|
|
|
6
6
|
import * as Schema from 'effect/Schema';
|
|
7
7
|
import { useMemo } from 'react';
|
|
8
8
|
|
|
9
|
+
import { getQueryTarget } from '@dxos/app-toolkit/query';
|
|
9
10
|
import { Obj, Query } from '@dxos/echo';
|
|
10
11
|
import { AtomObj, AtomQuery } from '@dxos/echo-atom';
|
|
11
|
-
import { getQueryTarget } from '@dxos/plugin-space';
|
|
12
12
|
import { getSpace, isSpace } from '@dxos/react-client/echo';
|
|
13
13
|
import { type BoardModel } from '@dxos/react-ui-mosaic';
|
|
14
14
|
import { Pipeline } from '@dxos/types';
|
package/src/meta.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { type Plugin } from '@dxos/app-framework';
|
|
|
6
6
|
import { trim } from '@dxos/util';
|
|
7
7
|
|
|
8
8
|
export const meta: Plugin.Meta = {
|
|
9
|
-
id: 'dxos.
|
|
9
|
+
id: 'org.dxos.plugin.pipeline',
|
|
10
10
|
name: 'Pipelines',
|
|
11
11
|
description: trim`
|
|
12
12
|
Pipelines for organizing tasks, milestones, and deliverables.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type Database,
|
|
5
|
+
import { type Database, Filter, JsonSchema, Query, Ref } from '@dxos/echo';
|
|
6
6
|
import { Mailbox } from '@dxos/plugin-inbox/types';
|
|
7
7
|
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
8
8
|
import { ViewModel } from '@dxos/schema';
|
|
@@ -12,14 +12,15 @@ export const createResearchProject = async (
|
|
|
12
12
|
db: Database.Database,
|
|
13
13
|
name?: string,
|
|
14
14
|
): Promise<Pipeline.Pipeline | null> => {
|
|
15
|
-
const
|
|
16
|
-
const mailbox =
|
|
17
|
-
|
|
15
|
+
const mailboxes = await db.query(Filter.type(Mailbox.Mailbox)).run();
|
|
16
|
+
const mailbox = mailboxes[0];
|
|
17
|
+
const feed = await mailbox?.feed?.tryLoad();
|
|
18
|
+
if (!mailbox || !feed) {
|
|
18
19
|
return null;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
const mailboxView = ViewModel.make({
|
|
22
|
-
query: Query.select(Filter.type(Message.Message)).from(
|
|
23
|
+
query: Query.select(Filter.type(Message.Message)).from(feed),
|
|
23
24
|
jsonSchema: JsonSchema.toJsonSchema(Message.Message),
|
|
24
25
|
});
|
|
25
26
|
|
package/src/translations.ts
CHANGED
|
@@ -4,34 +4,35 @@ import { Pipeline } from '@dxos/types';
|
|
|
4
4
|
// Copyright 2023 DXOS.org
|
|
5
5
|
//
|
|
6
6
|
|
|
7
|
-
import { meta } from '
|
|
7
|
+
import { meta } from '#meta';
|
|
8
8
|
|
|
9
9
|
export const translations = [
|
|
10
10
|
{
|
|
11
11
|
'en-US': {
|
|
12
12
|
[Pipeline.Pipeline.typename]: {
|
|
13
|
-
'typename
|
|
14
|
-
'typename
|
|
15
|
-
'typename
|
|
16
|
-
'typename
|
|
17
|
-
'object
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'object
|
|
13
|
+
'typename.label': 'Pipeline',
|
|
14
|
+
'typename.label_zero': 'Pipelines',
|
|
15
|
+
'typename.label_one': 'Pipeline',
|
|
16
|
+
'typename.label_other': 'Pipelines',
|
|
17
|
+
'object-name.placeholder': 'New pipeline',
|
|
18
|
+
'add-object.label': 'Add pipeline',
|
|
19
|
+
'rename-object.label': 'Rename pipeline',
|
|
20
|
+
'delete-object.label': 'Delete pipeline',
|
|
21
|
+
'object-deleted.label': 'Pipeline deleted',
|
|
21
22
|
},
|
|
22
23
|
[meta.id]: {
|
|
23
|
-
'plugin
|
|
24
|
-
'add
|
|
25
|
-
'add
|
|
26
|
-
'untitled
|
|
27
|
-
'enumerating
|
|
28
|
-
'editing
|
|
29
|
-
'views
|
|
30
|
-
'pipeline
|
|
31
|
-
'pipeline
|
|
32
|
-
'toggle
|
|
33
|
-
'delete
|
|
34
|
-
'add
|
|
24
|
+
'plugin.name': 'Pipelines',
|
|
25
|
+
'add-column.label': 'Add column',
|
|
26
|
+
'add-card.label': 'Add object',
|
|
27
|
+
'untitled-view.title': 'New view',
|
|
28
|
+
'enumerating-tab.label': 'List',
|
|
29
|
+
'editing-tab.label': 'Edit',
|
|
30
|
+
'views.label': 'Views',
|
|
31
|
+
'pipeline-invocations.label': 'Invocations',
|
|
32
|
+
'pipeline-automation.label': 'Automations',
|
|
33
|
+
'toggle-expand.label': 'Toggle expand',
|
|
34
|
+
'delete-view.label': 'Delete view',
|
|
35
|
+
'add-view.label': 'Add view',
|
|
35
36
|
},
|
|
36
37
|
},
|
|
37
38
|
},
|