@dxos/plugin-pipeline 0.8.4-main.abd8ff62ef → 0.8.4-main.bc2380dfbc
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 +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/PipelineArticle-6JIVXMYF.mjs +69 -0
- package/dist/lib/neutral/PipelineArticle-6JIVXMYF.mjs.map +7 -0
- package/dist/lib/neutral/PipelinePlugin.mjs +26 -0
- package/dist/lib/neutral/PipelinePlugin.mjs.map +7 -0
- package/dist/lib/neutral/PipelinePlugin.node.mjs +21 -0
- package/dist/lib/neutral/PipelinePlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/PipelinePlugin.workerd.mjs +16 -0
- package/dist/lib/neutral/PipelinePlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/PipelineProperties-GED4FJSS.mjs +211 -0
- package/dist/lib/neutral/PipelineProperties-GED4FJSS.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-ZLGRWRJU.mjs +44 -0
- package/dist/lib/neutral/app-graph-builder-ZLGRWRJU.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +11 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/{browser/index.mjs → neutral/chunk-ULB5DKWO.mjs} +1 -7
- package/dist/lib/neutral/chunk-ULB5DKWO.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +206 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +9 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-object-ZJYFACOI.mjs +25 -0
- package/dist/lib/neutral/create-object-ZJYFACOI.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +70 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +7 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +11 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-4W5YLCHT.mjs +49 -0
- package/dist/lib/neutral/react-surface-4W5YLCHT.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -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/PipelinePlugin.workerd.d.ts +4 -0
- package/dist/types/src/PipelinePlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineArticle/PipelineArticle.d.ts +6 -0
- package/dist/types/src/containers/PipelineArticle/PipelineArticle.d.ts.map +1 -0
- package/dist/types/src/containers/{PipelineContainer/PipelineContainer.stories.d.ts → PipelineArticle/PipelineArticle.stories.d.ts} +1 -1
- package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/PipelineArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PipelineArticle/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/index.d.ts +0 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +3 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +93 -60
- package/src/PipelinePlugin.node.ts +2 -27
- package/src/PipelinePlugin.test.ts +3 -3
- package/src/PipelinePlugin.tsx +2 -28
- package/src/PipelinePlugin.workerd.ts +16 -0
- package/src/capabilities/create-object.ts +29 -0
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/react-surface.tsx +2 -2
- package/src/components/PipelineComponent/PipelineColumn.tsx +9 -9
- package/src/components/PipelineComponent/PipelineComponent.stories.tsx +1 -3
- package/src/containers/{PipelineContainer/PipelineContainer.stories.tsx → PipelineArticle/PipelineArticle.stories.tsx} +15 -17
- package/src/containers/{PipelineContainer/PipelineContainer.tsx → PipelineArticle/PipelineArticle.tsx} +2 -2
- package/src/containers/PipelineArticle/index.ts +5 -0
- package/src/containers/PipelineProperties/PipelineProperties.tsx +23 -23
- package/src/containers/index.ts +1 -1
- package/src/index.ts +0 -6
- package/src/plugin.ts +9 -0
- package/src/templates/research.ts +2 -2
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts +0 -6
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts.map +0 -1
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/PipelineContainer/index.d.ts +0 -2
- package/dist/types/src/containers/PipelineContainer/index.d.ts.map +0 -1
- package/src/containers/PipelineContainer/index.ts +0 -5
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/translations.mjs +0 -0
- /package/dist/lib/{browser → neutral}/translations.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/types/index.mjs +0 -0
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 DXOS
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/README.md
CHANGED
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
|
|
11
11
|
Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
|
|
12
12
|
|
|
13
|
-
License: [
|
|
13
|
+
License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2023 © DXOS
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// src/containers/PipelineArticle/PipelineArticle.tsx
|
|
2
|
+
import React, { useCallback, useEffect } from "react";
|
|
3
|
+
import { Capabilities } from "@dxos/app-framework";
|
|
4
|
+
import { Surface, useCapability, useOperationInvoker } from "@dxos/app-framework/ui";
|
|
5
|
+
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
6
|
+
import { AppSurface, OBJECT_ACTIONS_CONTRIBUTION_ID, OBJECT_ACTIONS_CONTRIBUTION_PRIORITY, useObjectMenuItems } from "@dxos/app-toolkit/ui";
|
|
7
|
+
import { Panel } from "@dxos/react-ui";
|
|
8
|
+
import { linkedSegment } from "@dxos/react-ui-attention";
|
|
9
|
+
import { useAttention } from "@dxos/react-ui-attention";
|
|
10
|
+
import { useMenu } from "@dxos/react-ui-menu";
|
|
11
|
+
import { PipelineComponent } from "#components";
|
|
12
|
+
import { usePipelineBoardModel } from "#hooks";
|
|
13
|
+
var PIPELINE_ITEM = "PipelineItem";
|
|
14
|
+
var PipelineArticle = ({ role, subject: pipeline, attendableId }) => {
|
|
15
|
+
const registry = useCapability(Capabilities.AtomRegistry);
|
|
16
|
+
const model = usePipelineBoardModel(pipeline, registry);
|
|
17
|
+
const { invokePromise } = useOperationInvoker();
|
|
18
|
+
const { hasAttention } = useAttention(attendableId);
|
|
19
|
+
const handleColumnAdd = useCallback(() => invokePromise(LayoutOperation.UpdateCompanion, {
|
|
20
|
+
subject: linkedSegment("settings")
|
|
21
|
+
}), [
|
|
22
|
+
invokePromise
|
|
23
|
+
]);
|
|
24
|
+
return /* @__PURE__ */ React.createElement(PipelineComponent.Root, {
|
|
25
|
+
Item: PipelineItem,
|
|
26
|
+
onAddColumn: handleColumnAdd
|
|
27
|
+
}, /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
28
|
+
role
|
|
29
|
+
}, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
|
|
30
|
+
asChild: true
|
|
31
|
+
}, /* @__PURE__ */ React.createElement(PipelineComponent.Toolbar, {
|
|
32
|
+
disabled: !hasAttention
|
|
33
|
+
})), /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
34
|
+
asChild: true
|
|
35
|
+
}, /* @__PURE__ */ React.createElement(PipelineComponent.Content, {
|
|
36
|
+
asChild: true,
|
|
37
|
+
model
|
|
38
|
+
}, /* @__PURE__ */ React.createElement(PipelineComponent.Columns, {
|
|
39
|
+
pipeline
|
|
40
|
+
})))));
|
|
41
|
+
};
|
|
42
|
+
var PipelineItem = ({ item, projectionModel }) => {
|
|
43
|
+
const menu = useMenu(PIPELINE_ITEM);
|
|
44
|
+
const items = useObjectMenuItems(item);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
menu.addMenuItems({
|
|
47
|
+
id: OBJECT_ACTIONS_CONTRIBUTION_ID,
|
|
48
|
+
mode: "additive",
|
|
49
|
+
priority: OBJECT_ACTIONS_CONTRIBUTION_PRIORITY,
|
|
50
|
+
items
|
|
51
|
+
});
|
|
52
|
+
return () => menu.removeMenuItems(OBJECT_ACTIONS_CONTRIBUTION_ID);
|
|
53
|
+
}, [
|
|
54
|
+
menu,
|
|
55
|
+
items
|
|
56
|
+
]);
|
|
57
|
+
return /* @__PURE__ */ React.createElement(Surface.Surface, {
|
|
58
|
+
type: AppSurface.Card,
|
|
59
|
+
data: {
|
|
60
|
+
subject: item,
|
|
61
|
+
projection: projectionModel
|
|
62
|
+
},
|
|
63
|
+
limit: 1
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
PipelineArticle as default
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=PipelineArticle-6JIVXMYF.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/PipelineArticle/PipelineArticle.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useEffect } from 'react';\n\nimport { Capabilities } from '@dxos/app-framework';\nimport { Surface, useCapability, useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport {\n AppSurface,\n OBJECT_ACTIONS_CONTRIBUTION_ID,\n OBJECT_ACTIONS_CONTRIBUTION_PRIORITY,\n useObjectMenuItems,\n} from '@dxos/app-toolkit/ui';\nimport { Panel } from '@dxos/react-ui';\nimport { linkedSegment } from '@dxos/react-ui-attention';\nimport { useAttention } from '@dxos/react-ui-attention';\nimport { useMenu } from '@dxos/react-ui-menu';\nimport { type Pipeline } from '@dxos/types';\n\nimport { type ItemProps, PipelineComponent } from '#components';\nimport { usePipelineBoardModel } from '#hooks';\n\nconst PIPELINE_ITEM = 'PipelineItem';\n\nexport type PipelineArticleProps = AppSurface.ObjectArticleProps<Pipeline.Pipeline>;\n\nexport const PipelineArticle = ({ role, subject: pipeline, attendableId }: PipelineArticleProps) => {\n const registry = useCapability(Capabilities.AtomRegistry);\n const model = usePipelineBoardModel(pipeline, registry);\n const { invokePromise } = useOperationInvoker();\n const { hasAttention } = useAttention(attendableId);\n\n const handleColumnAdd = useCallback(\n () =>\n invokePromise(LayoutOperation.UpdateCompanion, {\n subject: linkedSegment('settings'),\n }),\n [invokePromise],\n );\n\n return (\n <PipelineComponent.Root Item={PipelineItem} onAddColumn={handleColumnAdd}>\n <Panel.Root role={role}>\n <Panel.Toolbar asChild>\n <PipelineComponent.Toolbar disabled={!hasAttention} />\n </Panel.Toolbar>\n <Panel.Content asChild>\n <PipelineComponent.Content asChild model={model}>\n <PipelineComponent.Columns pipeline={pipeline} />\n </PipelineComponent.Content>\n </Panel.Content>\n </Panel.Root>\n </PipelineComponent.Root>\n );\n};\n\nconst PipelineItem = ({ item, projectionModel }: ItemProps) => {\n const menu = useMenu(PIPELINE_ITEM);\n const items = useObjectMenuItems(item);\n\n useEffect(() => {\n menu.addMenuItems({\n id: OBJECT_ACTIONS_CONTRIBUTION_ID,\n mode: 'additive',\n priority: OBJECT_ACTIONS_CONTRIBUTION_PRIORITY,\n items,\n });\n\n return () => menu.removeMenuItems(OBJECT_ACTIONS_CONTRIBUTION_ID);\n }, [menu, items]);\n\n return (\n <Surface.Surface\n type={AppSurface.Card}\n data={{\n subject: item,\n projection: projectionModel,\n }}\n limit={1}\n />\n );\n};\n"],
|
|
5
|
+
"mappings": ";AAIA,OAAOA,SAASC,aAAaC,iBAAiB;AAE9C,SAASC,oBAAoB;AAC7B,SAASC,SAASC,eAAeC,2BAA2B;AAC5D,SAASC,uBAAuB;AAChC,SACEC,YACAC,gCACAC,sCACAC,0BACK;AACP,SAASC,aAAa;AACtB,SAASC,qBAAqB;AAC9B,SAASC,oBAAoB;AAC7B,SAASC,eAAe;AAGxB,SAAyBC,yBAAyB;AAClD,SAASC,6BAA6B;AAEtC,IAAMC,gBAAgB;AAIf,IAAMC,kBAAkB,CAAC,EAAEC,MAAMC,SAASC,UAAUC,aAAY,MAAwB;AAC7F,QAAMC,WAAWnB,cAAcF,aAAasB,YAAY;AACxD,QAAMC,QAAQT,sBAAsBK,UAAUE,QAAAA;AAC9C,QAAM,EAAEG,cAAa,IAAKrB,oBAAAA;AAC1B,QAAM,EAAEsB,aAAY,IAAKd,aAAaS,YAAAA;AAEtC,QAAMM,kBAAkB5B,YACtB,MACE0B,cAAcpB,gBAAgBuB,iBAAiB;IAC7CT,SAASR,cAAc,UAAA;EACzB,CAAA,GACF;IAACc;GAAc;AAGjB,SACE,sBAAA,cAACX,kBAAkBe,MAAI;IAACC,MAAMC;IAAcC,aAAaL;KACvD,sBAAA,cAACjB,MAAMmB,MAAI;IAACX;KACV,sBAAA,cAACR,MAAMuB,SAAO;IAACC,SAAAA;KACb,sBAAA,cAACpB,kBAAkBmB,SAAO;IAACE,UAAU,CAACT;OAExC,sBAAA,cAAChB,MAAM0B,SAAO;IAACF,SAAAA;KACb,sBAAA,cAACpB,kBAAkBsB,SAAO;IAACF,SAAAA;IAAQV;KACjC,sBAAA,cAACV,kBAAkBuB,SAAO;IAACjB;;AAMvC;AAEA,IAAMW,eAAe,CAAC,EAAEO,MAAMC,gBAAe,MAAa;AACxD,QAAMC,OAAO3B,QAAQG,aAAAA;AACrB,QAAMyB,QAAQhC,mBAAmB6B,IAAAA;AAEjCtC,YAAU,MAAA;AACRwC,SAAKE,aAAa;MAChBC,IAAIpC;MACJqC,MAAM;MACNC,UAAUrC;MACViC;IACF,CAAA;AAEA,WAAO,MAAMD,KAAKM,gBAAgBvC,8BAAAA;EACpC,GAAG;IAACiC;IAAMC;GAAM;AAEhB,SACE,sBAAA,cAACvC,QAAQA,SAAO;IACd6C,MAAMzC,WAAW0C;IACjBC,MAAM;MACJ9B,SAASmB;MACTY,YAAYX;IACd;IACAY,OAAO;;AAGb;",
|
|
6
|
+
"names": ["React", "useCallback", "useEffect", "Capabilities", "Surface", "useCapability", "useOperationInvoker", "LayoutOperation", "AppSurface", "OBJECT_ACTIONS_CONTRIBUTION_ID", "OBJECT_ACTIONS_CONTRIBUTION_PRIORITY", "useObjectMenuItems", "Panel", "linkedSegment", "useAttention", "useMenu", "PipelineComponent", "usePipelineBoardModel", "PIPELINE_ITEM", "PipelineArticle", "role", "subject", "pipeline", "attendableId", "registry", "AtomRegistry", "model", "invokePromise", "hasAttention", "handleColumnAdd", "UpdateCompanion", "Root", "Item", "PipelineItem", "onAddColumn", "Toolbar", "asChild", "disabled", "Content", "Columns", "item", "projectionModel", "menu", "items", "addMenuItems", "id", "mode", "priority", "removeMenuItems", "type", "Card", "data", "projection", "limit"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// src/PipelinePlugin.tsx
|
|
2
|
+
import { Plugin } from "@dxos/app-framework";
|
|
3
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
4
|
+
import { Pipeline } from "@dxos/types";
|
|
5
|
+
import { AppGraphBuilder, CreateObject, ReactSurface } from "#capabilities";
|
|
6
|
+
import { meta } from "#meta";
|
|
7
|
+
import { translations } from "#translations";
|
|
8
|
+
var PipelinePlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
9
|
+
activate: AppGraphBuilder
|
|
10
|
+
}), AppPlugin.addCreateObjectModule({
|
|
11
|
+
activate: CreateObject
|
|
12
|
+
}), AppPlugin.addSchemaModule({
|
|
13
|
+
schema: [
|
|
14
|
+
Pipeline.Pipeline
|
|
15
|
+
]
|
|
16
|
+
}), AppPlugin.addSurfaceModule({
|
|
17
|
+
activate: ReactSurface
|
|
18
|
+
}), AppPlugin.addTranslationsModule({
|
|
19
|
+
translations
|
|
20
|
+
}), Plugin.make);
|
|
21
|
+
var PipelinePlugin_default = PipelinePlugin;
|
|
22
|
+
export {
|
|
23
|
+
PipelinePlugin,
|
|
24
|
+
PipelinePlugin_default as default
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=PipelinePlugin.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/PipelinePlugin.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Pipeline } from '@dxos/types';\n\nimport { AppGraphBuilder, CreateObject, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nexport const PipelinePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addSchemaModule({ schema: [Pipeline.Pipeline] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n\nexport default PipelinePlugin;\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AAEzB,SAASC,iBAAiBC,cAAcC,oBAAoB;AAC5D,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAEtB,IAAMC,iBAAiBR,OAAOS,OAAOH,IAAAA,EAAMI,KAChDT,UAAUU,kBAAkB;EAAEC,UAAUT;AAAgB,CAAA,GACxDF,UAAUY,sBAAsB;EAAED,UAAUR;AAAa,CAAA,GACzDH,UAAUa,gBAAgB;EAAEC,QAAQ;IAACb,SAASA;;AAAU,CAAA,GACxDD,UAAUe,iBAAiB;EAAEJ,UAAUP;AAAa,CAAA,GACpDJ,UAAUgB,sBAAsB;EAAEV;AAAa,CAAA,GAC/CP,OAAOkB,IAAI;AAGb,IAAA,yBAAeV;",
|
|
6
|
+
"names": ["Plugin", "AppPlugin", "Pipeline", "AppGraphBuilder", "CreateObject", "ReactSurface", "meta", "translations", "PipelinePlugin", "define", "pipe", "addAppGraphModule", "activate", "addCreateObjectModule", "addSchemaModule", "schema", "addSurfaceModule", "addTranslationsModule", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/PipelinePlugin.node.ts
|
|
2
|
+
import { Plugin } from "@dxos/app-framework";
|
|
3
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
4
|
+
import { Pipeline } from "@dxos/types";
|
|
5
|
+
import { AppGraphBuilder, CreateObject } from "#capabilities";
|
|
6
|
+
import { meta } from "#meta";
|
|
7
|
+
var PipelinePlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
8
|
+
activate: AppGraphBuilder
|
|
9
|
+
}), AppPlugin.addCreateObjectModule({
|
|
10
|
+
activate: CreateObject
|
|
11
|
+
}), AppPlugin.addSchemaModule({
|
|
12
|
+
schema: [
|
|
13
|
+
Pipeline.Pipeline
|
|
14
|
+
]
|
|
15
|
+
}), Plugin.make);
|
|
16
|
+
var PipelinePlugin_node_default = PipelinePlugin;
|
|
17
|
+
export {
|
|
18
|
+
PipelinePlugin,
|
|
19
|
+
PipelinePlugin_node_default as default
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=PipelinePlugin.node.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/PipelinePlugin.node.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Pipeline } from '@dxos/types';\n\nimport { AppGraphBuilder, CreateObject } from '#capabilities';\nimport { meta } from '#meta';\n\nexport const PipelinePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addSchemaModule({ schema: [Pipeline.Pipeline] }),\n Plugin.make,\n);\n\nexport default PipelinePlugin;\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AAEzB,SAASC,iBAAiBC,oBAAoB;AAC9C,SAASC,YAAY;AAEd,IAAMC,iBAAiBN,OAAOO,OAAOF,IAAAA,EAAMG,KAChDP,UAAUQ,kBAAkB;EAAEC,UAAUP;AAAgB,CAAA,GACxDF,UAAUU,sBAAsB;EAAED,UAAUN;AAAa,CAAA,GACzDH,UAAUW,gBAAgB;EAAEC,QAAQ;IAACX,SAASA;;AAAU,CAAA,GACxDF,OAAOc,IAAI;AAGb,IAAA,8BAAeR;",
|
|
6
|
+
"names": ["Plugin", "AppPlugin", "Pipeline", "AppGraphBuilder", "CreateObject", "meta", "PipelinePlugin", "define", "pipe", "addAppGraphModule", "activate", "addCreateObjectModule", "addSchemaModule", "schema", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/PipelinePlugin.workerd.ts
|
|
2
|
+
import { Plugin } from "@dxos/app-framework";
|
|
3
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
4
|
+
import { Pipeline } from "@dxos/types";
|
|
5
|
+
import { meta } from "#meta";
|
|
6
|
+
var PipelinePlugin = Plugin.define(meta).pipe(AppPlugin.addSchemaModule({
|
|
7
|
+
schema: [
|
|
8
|
+
Pipeline.Pipeline
|
|
9
|
+
]
|
|
10
|
+
}), Plugin.make);
|
|
11
|
+
var PipelinePlugin_workerd_default = PipelinePlugin;
|
|
12
|
+
export {
|
|
13
|
+
PipelinePlugin,
|
|
14
|
+
PipelinePlugin_workerd_default as default
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=PipelinePlugin.workerd.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/PipelinePlugin.workerd.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Pipeline } from '@dxos/types';\n\nimport { meta } from '#meta';\n\nexport const PipelinePlugin = Plugin.define(meta).pipe(\n AppPlugin.addSchemaModule({ schema: [Pipeline.Pipeline] }),\n Plugin.make,\n);\n\nexport default PipelinePlugin;\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AAEzB,SAASC,YAAY;AAEd,IAAMC,iBAAiBJ,OAAOK,OAAOF,IAAAA,EAAMG,KAChDL,UAAUM,gBAAgB;EAAEC,QAAQ;IAACN,SAASA;;AAAU,CAAA,GACxDF,OAAOS,IAAI;AAGb,IAAA,iCAAeL;",
|
|
6
|
+
"names": ["Plugin", "AppPlugin", "Pipeline", "meta", "PipelinePlugin", "define", "pipe", "addSchemaModule", "schema", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
// src/containers/PipelineProperties/PipelineProperties.tsx
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
import React, { useCallback, useMemo, useRef, useState } from "react";
|
|
4
|
+
import { resolveSchemaWithRegistry } from "@dxos/app-toolkit/query";
|
|
5
|
+
import { useTypeOptions } from "@dxos/app-toolkit/ui";
|
|
6
|
+
import { DXN, Filter, JsonSchema, Obj, Query, Ref, Tag } from "@dxos/echo";
|
|
7
|
+
import { useObject, useQuery } from "@dxos/react-client/echo";
|
|
8
|
+
import { IconButton, useAsyncEffect, useTranslation } from "@dxos/react-ui";
|
|
9
|
+
import { Form, ViewEditor } from "@dxos/react-ui-form";
|
|
10
|
+
import { List } from "@dxos/react-ui-list";
|
|
11
|
+
import { ViewModel } from "@dxos/schema";
|
|
12
|
+
import { Pipeline } from "@dxos/types";
|
|
13
|
+
import { mx, osTranslations } from "@dxos/ui-theme";
|
|
14
|
+
import { arrayMove } from "@dxos/util";
|
|
15
|
+
import { meta } from "#meta";
|
|
16
|
+
var listGrid = "grid grid-cols-[min-content_1fr_min-content_min-content_min-content]";
|
|
17
|
+
var listItemGrid = "grid grid-cols-subgrid col-span-5";
|
|
18
|
+
var ColumnFormSchema = Pipeline.Column.pipe(Schema.mutable, Schema.pick("name"));
|
|
19
|
+
var PipelineProperties = ({ classNames, pipeline }) => {
|
|
20
|
+
const { t } = useTranslation(meta.id);
|
|
21
|
+
const db = Obj.getDatabase(pipeline);
|
|
22
|
+
const [expandedId, setExpandedId] = useState();
|
|
23
|
+
const [columns, updateColumns] = useObject(pipeline, "columns");
|
|
24
|
+
const column = useMemo(() => columns.find((column2) => column2.view.dxn.toString() === expandedId), [
|
|
25
|
+
columns,
|
|
26
|
+
expandedId
|
|
27
|
+
]);
|
|
28
|
+
const [view, updateView] = useObject(column?.view);
|
|
29
|
+
const [schema, setSchema] = useState(() => Schema.Struct({}));
|
|
30
|
+
const projectionRef = useRef(null);
|
|
31
|
+
const tags = useQuery(db, Filter.type(Tag.Tag));
|
|
32
|
+
const types = useTypeOptions({
|
|
33
|
+
db,
|
|
34
|
+
annotation: {
|
|
35
|
+
location: [
|
|
36
|
+
"database",
|
|
37
|
+
"runtime"
|
|
38
|
+
],
|
|
39
|
+
kind: [
|
|
40
|
+
"user"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
useAsyncEffect(async () => {
|
|
45
|
+
if (!view?.query || !db) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const foundSchema = await resolveSchemaWithRegistry(db.schemaRegistry, view.query.ast);
|
|
49
|
+
if (foundSchema && foundSchema !== schema) {
|
|
50
|
+
setSchema(() => foundSchema);
|
|
51
|
+
}
|
|
52
|
+
}, [
|
|
53
|
+
db,
|
|
54
|
+
view,
|
|
55
|
+
schema
|
|
56
|
+
]);
|
|
57
|
+
const handleMove = useCallback((fromIndex, toIndex) => updateColumns((columns2) => {
|
|
58
|
+
arrayMove(columns2, fromIndex, toIndex);
|
|
59
|
+
}), [
|
|
60
|
+
updateColumns
|
|
61
|
+
]);
|
|
62
|
+
const handleQueryChanged = useCallback(async (newQuery, target) => {
|
|
63
|
+
if (!view || !db) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const queue = target && DXN.tryParse(target) ? target : void 0;
|
|
67
|
+
const query = queue ? Query.fromAst(newQuery).from({
|
|
68
|
+
feeds: [
|
|
69
|
+
queue
|
|
70
|
+
]
|
|
71
|
+
}) : Query.fromAst(newQuery);
|
|
72
|
+
updateView((view2) => {
|
|
73
|
+
view2.query.ast = query.ast;
|
|
74
|
+
});
|
|
75
|
+
const newSchema = await resolveSchemaWithRegistry(db.schemaRegistry, query.ast);
|
|
76
|
+
if (!newSchema) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const newView = ViewModel.make({
|
|
80
|
+
query,
|
|
81
|
+
jsonSchema: JsonSchema.toJsonSchema(newSchema)
|
|
82
|
+
});
|
|
83
|
+
updateView((view2) => {
|
|
84
|
+
view2.projection = Obj.getSnapshot(newView).projection;
|
|
85
|
+
});
|
|
86
|
+
setSchema(() => newSchema);
|
|
87
|
+
}, [
|
|
88
|
+
db,
|
|
89
|
+
view,
|
|
90
|
+
updateView,
|
|
91
|
+
schema
|
|
92
|
+
]);
|
|
93
|
+
const handleColumnValuesChanged = useCallback((column2) => (newValues, { changed }) => {
|
|
94
|
+
if (changed["name"]) {
|
|
95
|
+
const columnIndex = columns.findIndex((c) => c === column2);
|
|
96
|
+
if (columnIndex === -1) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
updateColumns((cols) => {
|
|
100
|
+
cols[columnIndex].name = newValues.name ?? "";
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}, [
|
|
104
|
+
columns,
|
|
105
|
+
updateColumns
|
|
106
|
+
]);
|
|
107
|
+
const handleToggleField = useCallback((column2) => {
|
|
108
|
+
setExpandedId((prevExpandedId) => prevExpandedId === column2.view.dxn.toString() ? void 0 : column2.view.dxn.toString());
|
|
109
|
+
}, []);
|
|
110
|
+
const handleDelete = useCallback(async (column2) => {
|
|
111
|
+
if (column2.view.dxn.toString() === expandedId) {
|
|
112
|
+
setExpandedId(void 0);
|
|
113
|
+
}
|
|
114
|
+
const index = columns.findIndex((l) => l === column2);
|
|
115
|
+
const viewToRemove = await column2.view.load();
|
|
116
|
+
updateColumns((columns2) => {
|
|
117
|
+
columns2.splice(index, 1);
|
|
118
|
+
});
|
|
119
|
+
db?.remove(viewToRemove);
|
|
120
|
+
}, [
|
|
121
|
+
expandedId,
|
|
122
|
+
columns,
|
|
123
|
+
updateColumns,
|
|
124
|
+
db
|
|
125
|
+
]);
|
|
126
|
+
const handleAdd = useCallback(() => {
|
|
127
|
+
if (!db) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const newView = ViewModel.make({
|
|
131
|
+
query: Query.select(Filter.nothing()),
|
|
132
|
+
jsonSchema: JsonSchema.toJsonSchema(Schema.Struct({}))
|
|
133
|
+
});
|
|
134
|
+
db.add(newView);
|
|
135
|
+
updateColumns((columns2) => {
|
|
136
|
+
columns2.push({
|
|
137
|
+
name: "",
|
|
138
|
+
// Type assertion needed due to QueryAST type variance.
|
|
139
|
+
view: Ref.make(newView),
|
|
140
|
+
order: []
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
setExpandedId(newView.id);
|
|
144
|
+
}, [
|
|
145
|
+
db,
|
|
146
|
+
updateColumns
|
|
147
|
+
]);
|
|
148
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
149
|
+
className: mx("py-form-padding overflow-y-auto", classNames)
|
|
150
|
+
}, /* @__PURE__ */ React.createElement("h2", {
|
|
151
|
+
className: "text-sm text-description py-1"
|
|
152
|
+
}, t("views.label")), /* @__PURE__ */ React.createElement(List.Root, {
|
|
153
|
+
items: columns,
|
|
154
|
+
isItem: Schema.is(Pipeline.Column),
|
|
155
|
+
getId: (column2) => column2.view.dxn.toString(),
|
|
156
|
+
onMove: handleMove
|
|
157
|
+
}, ({ items: columns2 }) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
|
|
158
|
+
role: "list",
|
|
159
|
+
className: mx(listGrid)
|
|
160
|
+
}, columns2.map((column2) => /* @__PURE__ */ React.createElement(List.Item, {
|
|
161
|
+
key: column2.view.dxn.toString(),
|
|
162
|
+
item: column2,
|
|
163
|
+
classNames: listItemGrid,
|
|
164
|
+
"aria-expanded": expandedId === column2.view.dxn.toString()
|
|
165
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
166
|
+
className: mx(listItemGrid, "dx-hover rounded-xs cursor-pointer min-h-10")
|
|
167
|
+
}, /* @__PURE__ */ React.createElement(List.ItemDragHandle, null), /* @__PURE__ */ React.createElement(List.ItemTitle, {
|
|
168
|
+
onClick: () => handleToggleField(column2)
|
|
169
|
+
}, column2.name || t("untitled-view.title")), /* @__PURE__ */ React.createElement(List.ItemDeleteButton, {
|
|
170
|
+
label: t("delete-view.label"),
|
|
171
|
+
autoHide: false,
|
|
172
|
+
onClick: () => handleDelete(column2),
|
|
173
|
+
"data-testid": "view.delete"
|
|
174
|
+
}), /* @__PURE__ */ React.createElement(IconButton, {
|
|
175
|
+
iconOnly: true,
|
|
176
|
+
variant: "ghost",
|
|
177
|
+
label: t("toggle-expand.label", {
|
|
178
|
+
ns: osTranslations
|
|
179
|
+
}),
|
|
180
|
+
icon: expandedId === column2.view.dxn.toString() ? "ph--caret-down--regular" : "ph--caret-right--regular",
|
|
181
|
+
onClick: () => handleToggleField(column2)
|
|
182
|
+
})), expandedId === column2.view.dxn.toString() && column2?.view.target && /* @__PURE__ */ React.createElement("div", {
|
|
183
|
+
className: "col-span-5 my-2 border border-separator rounded-md"
|
|
184
|
+
}, /* @__PURE__ */ React.createElement(Form.Root, {
|
|
185
|
+
schema: ColumnFormSchema,
|
|
186
|
+
values: column2,
|
|
187
|
+
onValuesChanged: handleColumnValuesChanged(column2)
|
|
188
|
+
}, /* @__PURE__ */ React.createElement(Form.Content, null, /* @__PURE__ */ React.createElement(Form.FieldSet, null))), /* @__PURE__ */ React.createElement(ViewEditor, {
|
|
189
|
+
ref: projectionRef,
|
|
190
|
+
mode: "tag",
|
|
191
|
+
readonly: true,
|
|
192
|
+
schema,
|
|
193
|
+
view: column2.view.target,
|
|
194
|
+
registry: db?.schemaRegistry,
|
|
195
|
+
db,
|
|
196
|
+
tags,
|
|
197
|
+
types,
|
|
198
|
+
onQueryChanged: handleQueryChanged
|
|
199
|
+
}))))))), /* @__PURE__ */ React.createElement("div", {
|
|
200
|
+
className: "my-form-padding"
|
|
201
|
+
}, /* @__PURE__ */ React.createElement(IconButton, {
|
|
202
|
+
icon: "ph--plus--regular",
|
|
203
|
+
label: t("add-view.label"),
|
|
204
|
+
onClick: handleAdd,
|
|
205
|
+
classNames: "w-full"
|
|
206
|
+
})));
|
|
207
|
+
};
|
|
208
|
+
export {
|
|
209
|
+
PipelineProperties as default
|
|
210
|
+
};
|
|
211
|
+
//# sourceMappingURL=PipelineProperties-GED4FJSS.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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 { DXN, Filter, JsonSchema, Obj, Query, type QueryAST, Ref, Tag } from '@dxos/echo';\nimport { type JsonPath, type Mutable } from '@dxos/echo/internal';\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(\n () => columns.find((column) => column.view.dxn.toString() === expandedId),\n [columns, expandedId],\n );\n const [view, updateView] = useObject(column?.view);\n const [schema, setSchema] = useState<Schema.Schema.AnyNoContext>(() => Schema.Struct({}));\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 foundSchema = await resolveSchemaWithRegistry(db.schemaRegistry, view.query.ast);\n if (foundSchema && foundSchema !== schema) {\n setSchema(() => foundSchema);\n }\n }, [db, view, schema]);\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?: string) => {\n if (!view || !db) {\n return;\n }\n\n const queue = target && DXN.tryParse(target) ? target : undefined;\n const query = queue ? Query.fromAst(newQuery).from({ feeds: [queue] }) : Query.fromAst(newQuery);\n updateView((view) => {\n view.query.ast = query.ast as Mutable<typeof query.ast>;\n });\n const newSchema = await resolveSchemaWithRegistry(db.schemaRegistry, query.ast);\n if (!newSchema) {\n return;\n }\n\n const newView = ViewModel.make({\n query,\n jsonSchema: JsonSchema.toJsonSchema(newSchema),\n });\n updateView((view) => {\n view.projection = Obj.getSnapshot(newView).projection as Mutable<typeof view.projection>;\n });\n\n setSchema(() => newSchema);\n },\n [db, view, updateView, schema],\n );\n\n const handleColumnValuesChanged = useCallback(\n (column: Pipeline.Column) =>\n (newValues: { name?: string }, { changed }: { changed: Record<JsonPath, boolean> }) => {\n if (changed['name' as 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) =>\n prevExpandedId === column.view.dxn.toString() ? undefined : column.view.dxn.toString(),\n );\n }, []);\n\n const handleDelete = useCallback(\n async (column: Pipeline.Column) => {\n if (column.view.dxn.toString() === 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.dxn.toString()}\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.dxn.toString()}\n item={column}\n classNames={listItemGrid}\n aria-expanded={expandedId === column.view.dxn.toString()}\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={\n expandedId === column.view.dxn.toString()\n ? 'ph--caret-down--regular'\n : 'ph--caret-right--regular'\n }\n onClick={() => handleToggleField(column)}\n />\n </div>\n {expandedId === column.view.dxn.toString() && 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 schema={schema}\n view={column.view.target}\n registry={db?.schemaRegistry}\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,SAASC,KAAKC,QAAQC,YAAYC,KAAKC,OAAsBC,KAAKC,WAAW;AAE7E,SAASC,WAAWC,gBAAgB;AACpC,SAASC,YAAkCC,gBAAgBC,sBAAsB;AACjF,SA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AA;IAAIC,WAAU;KACb,sBAAA,cAAC1F,KAAK4F,MAAI;IACR3D,QAAQtB;IACRwG,QAAQxF;IACRyF,iBAAiBlD,0BAA0BvC,OAAAA;KAE3C,sBAAA,cAAC3B,KAAKqH,SAAO,MACX,sBAAA,cAACrH,KAAKsH,UAAQ,IAAA,CAAA,CAAA,GAGlB,sBAAA,cAACrH,YAAAA;IACCsH,KAAKnF;IACLoF,MAAK;IACLC,UAAAA;IACAxF;IACAJ,MAAMF,QAAOE,KAAKuB;IAClBsE,UAAUrG,IAAIwB;IACdxB;IACAgB;IACAE;IACAoF,gBAAgBzE;YAWlC,sBAAA,cAACuC,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAAC7F,YAAAA;IAAWqH,MAAK;IAAoBN,OAAOzF,EAAE,gBAAA;IAAmBuF,SAASvB;IAAWlE,YAAW;;AAIxG;",
|
|
6
|
+
"names": ["Schema", "React", "useCallback", "useMemo", "useRef", "useState", "resolveSchemaWithRegistry", "useTypeOptions", "DXN", "Filter", "JsonSchema", "Obj", "Query", "Ref", "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", "dxn", "toString", "updateView", "schema", "setSchema", "Struct", "projectionRef", "tags", "type", "types", "annotation", "location", "kind", "query", "foundSchema", "schemaRegistry", "ast", "handleMove", "fromIndex", "toIndex", "handleQueryChanged", "newQuery", "target", "queue", "tryParse", "undefined", "fromAst", "from", "feeds", "newSchema", "newView", "make", "jsonSchema", "toJsonSchema", "projection", "getSnapshot", "handleColumnValuesChanged", "newValues", "changed", "columnIndex", "findIndex", "c", "cols", "name", "handleToggleField", "prevExpandedId", "handleDelete", "index", "l", "viewToRemove", "load", "splice", "remove", "handleAdd", "select", "nothing", "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", "values", "onValuesChanged", "Content", "FieldSet", "ref", "mode", "readonly", "registry", "onQueryChanged"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/capabilities/index.ts
|
|
2
|
+
import { Capability } from "@dxos/app-framework";
|
|
3
|
+
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-ZLGRWRJU.mjs"));
|
|
4
|
+
var CreateObject = Capability.lazy("CreateObject", () => import("../create-object-ZJYFACOI.mjs"));
|
|
5
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-4W5YLCHT.mjs"));
|
|
6
|
+
export {
|
|
7
|
+
AppGraphBuilder,
|
|
8
|
+
CreateObject,
|
|
9
|
+
ReactSurface
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/capabilities/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\nexport const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,kBAAkB;AAEpB,IAAMC,kBAAkBD,WAAWE,KAAK,mBAAmB,MAAM,OAAO,mCAAA,CAAA;AACxE,IAAMC,eAAeH,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAME,eAAeJ,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;",
|
|
6
|
+
"names": ["Capability", "AppGraphBuilder", "lazy", "CreateObject", "ReactSurface"]
|
|
7
|
+
}
|