@dxos/plugin-pipeline 0.8.3-main.ef1bc66f44
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/LICENSE +8 -0
- package/README.md +13 -0
- package/dist/lib/browser/PipelineContainer-TRO66W6L.mjs +216 -0
- package/dist/lib/browser/PipelineContainer-TRO66W6L.mjs.map +7 -0
- package/dist/lib/browser/PipelineSettings-EBR3UU5C.mjs +212 -0
- package/dist/lib/browser/PipelineSettings-EBR3UU5C.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-NKUZQ6A7.mjs +64 -0
- package/dist/lib/browser/app-graph-builder-NKUZQ6A7.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5YNPKHT.mjs +28 -0
- package/dist/lib/browser/chunk-J5YNPKHT.mjs.map +7 -0
- package/dist/lib/browser/chunk-XDHJKK7D.mjs +42 -0
- package/dist/lib/browser/chunk-XDHJKK7D.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +108 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/browser/react-surface-CH2SUJTQ.mjs +56 -0
- package/dist/lib/browser/react-surface-CH2SUJTQ.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -0
- package/dist/lib/browser/types/index.mjs.map +7 -0
- package/dist/types/src/PipelinePlugin.d.ts +3 -0
- package/dist/types/src/PipelinePlugin.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +4 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +2 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/PipelineColumn.d.ts +10 -0
- package/dist/types/src/components/PipelineColumn.d.ts.map +1 -0
- package/dist/types/src/components/PipelineComponent.d.ts +38 -0
- package/dist/types/src/components/PipelineComponent.d.ts.map +1 -0
- package/dist/types/src/components/PipelineComponent.stories.d.ts +42 -0
- package/dist/types/src/components/PipelineComponent.stories.d.ts.map +1 -0
- package/dist/types/src/components/PipelineContainer.d.ts +7 -0
- package/dist/types/src/components/PipelineContainer.d.ts.map +1 -0
- package/dist/types/src/components/PipelineContainer.stories.d.ts +56 -0
- package/dist/types/src/components/PipelineContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/PipelineSettings.d.ts +12 -0
- package/dist/types/src/components/PipelineSettings.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +5 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +3 -0
- package/dist/types/src/meta.d.ts.map +1 -0
- package/dist/types/src/templates/index.d.ts +2 -0
- package/dist/types/src/templates/index.d.ts.map +1 -0
- package/dist/types/src/templates/research.d.ts +4 -0
- package/dist/types/src/templates/research.d.ts.map +1 -0
- package/dist/types/src/templates/templates.d.ts +4 -0
- package/dist/types/src/templates/templates.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +31 -0
- package/dist/types/src/translations.d.ts.map +1 -0
- package/dist/types/src/types/PipelineAction.d.ts +25 -0
- package/dist/types/src/types/PipelineAction.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +98 -0
- package/src/PipelinePlugin.tsx +46 -0
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +51 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/index.ts +7 -0
- package/src/capabilities/operation-resolver/index.ts +5 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +29 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +50 -0
- package/src/components/PipelineColumn.tsx +145 -0
- package/src/components/PipelineComponent.stories.tsx +204 -0
- package/src/components/PipelineComponent.tsx +103 -0
- package/src/components/PipelineContainer.stories.tsx +226 -0
- package/src/components/PipelineContainer.tsx +57 -0
- package/src/components/PipelineSettings.tsx +230 -0
- package/src/components/index.ts +11 -0
- package/src/index.ts +6 -0
- package/src/meta.ts +19 -0
- package/src/templates/index.ts +5 -0
- package/src/templates/research.ts +71 -0
- package/src/templates/templates.ts +11 -0
- package/src/translations.ts +38 -0
- package/src/types/PipelineAction.ts +29 -0
- package/src/types/index.ts +6 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Database, Filter, Query, Ref, Type } from '@dxos/echo';
|
|
6
|
+
import { Mailbox } from '@dxos/plugin-inbox/types';
|
|
7
|
+
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
8
|
+
import { View } from '@dxos/schema';
|
|
9
|
+
import { Message, Organization, Person, Pipeline } from '@dxos/types';
|
|
10
|
+
|
|
11
|
+
export const createResearchProject = async (
|
|
12
|
+
db: Database.Database,
|
|
13
|
+
name?: string,
|
|
14
|
+
): Promise<Pipeline.Pipeline | null> => {
|
|
15
|
+
const mailboxes = await db.query(Filter.type(Mailbox.Mailbox)).run();
|
|
16
|
+
if (!mailboxes.length) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const mailbox = mailboxes[0];
|
|
21
|
+
const mailboxView = View.make({
|
|
22
|
+
query: Query.select(Filter.type(Message.Message)).options({
|
|
23
|
+
queues: [mailbox.queue.dxn.toString()],
|
|
24
|
+
}),
|
|
25
|
+
jsonSchema: Type.toJsonSchema(Message.Message),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const contactsQuery = Query.select(Filter.type(Person.Person));
|
|
29
|
+
const contactsView = View.make({
|
|
30
|
+
query: contactsQuery,
|
|
31
|
+
jsonSchema: Type.toJsonSchema(Person.Person),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const organizationsQuery = Query.select(Filter.type(Organization.Organization));
|
|
35
|
+
const organizationsView = View.make({
|
|
36
|
+
query: organizationsQuery,
|
|
37
|
+
jsonSchema: Type.toJsonSchema(Organization.Organization),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const notesQuery = Query.select(Filter.type(Markdown.Document));
|
|
41
|
+
const notesView = View.make({
|
|
42
|
+
query: notesQuery,
|
|
43
|
+
jsonSchema: Type.toJsonSchema(Markdown.Document),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
return Pipeline.make({
|
|
47
|
+
name: name ?? 'Research',
|
|
48
|
+
columns: [
|
|
49
|
+
{
|
|
50
|
+
name: 'Mailbox',
|
|
51
|
+
view: Ref.make(mailboxView),
|
|
52
|
+
order: [],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'Contacts',
|
|
56
|
+
view: Ref.make(contactsView),
|
|
57
|
+
order: [],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'Organizations',
|
|
61
|
+
view: Ref.make(organizationsView),
|
|
62
|
+
order: [],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Notes',
|
|
66
|
+
view: Ref.make(notesView),
|
|
67
|
+
order: [],
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
});
|
|
71
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Database } from '@dxos/echo';
|
|
2
|
+
import { type Pipeline } from '@dxos/types';
|
|
3
|
+
//
|
|
4
|
+
// Copyright 2025 DXOS.org
|
|
5
|
+
//
|
|
6
|
+
|
|
7
|
+
import { createResearchProject } from './research';
|
|
8
|
+
|
|
9
|
+
export const templates: Record<string, (db: Database.Database) => Promise<Pipeline.Pipeline | null>> = {
|
|
10
|
+
'org-research': createResearchProject,
|
|
11
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type Resource } from '@dxos/react-ui';
|
|
2
|
+
import { Pipeline } from '@dxos/types';
|
|
3
|
+
//
|
|
4
|
+
// Copyright 2023 DXOS.org
|
|
5
|
+
//
|
|
6
|
+
|
|
7
|
+
import { meta } from './meta';
|
|
8
|
+
|
|
9
|
+
export const translations = [
|
|
10
|
+
{
|
|
11
|
+
'en-US': {
|
|
12
|
+
[Pipeline.Pipeline.typename]: {
|
|
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
|
+
'rename object label': 'Rename pipeline',
|
|
19
|
+
'delete object label': 'Delete pipeline',
|
|
20
|
+
'object deleted label': 'Pipeline deleted',
|
|
21
|
+
},
|
|
22
|
+
[meta.id]: {
|
|
23
|
+
'plugin name': 'Pipelines',
|
|
24
|
+
'add column label': 'Add column',
|
|
25
|
+
'add card label': 'Add object',
|
|
26
|
+
'untitled view title': 'New view',
|
|
27
|
+
'enumerating tab label': 'List',
|
|
28
|
+
'editing tab label': 'Edit',
|
|
29
|
+
'views label': 'Views',
|
|
30
|
+
'pipeline invocations label': 'Invocations',
|
|
31
|
+
'pipeline automation label': 'Automations',
|
|
32
|
+
'toggle expand label': 'Toggle expand',
|
|
33
|
+
'delete view label': 'Delete view',
|
|
34
|
+
'add view label': 'Add view',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
] as const satisfies Resource[];
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
}
|