@dxos/plugin-pipeline 0.8.4-main.7996785055 → 0.8.4-main.8baae0fced
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/{browser/PipelineObjectSettings-QFMIKJH5.mjs → neutral/PipelineProperties-GED4FJSS.mjs} +32 -41
- 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/chunk-3A235GUD.mjs → neutral/chunk-CNUFCMUC.mjs} +2 -1
- package/dist/lib/neutral/chunk-CNUFCMUC.mjs.map +7 -0
- package/dist/lib/{browser/PipelineContainer-LY2P4JPA.mjs → neutral/components/index.mjs} +23 -162
- 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/{browser/react-surface-QVPKOGEI.mjs → neutral/react-surface-4W5YLCHT.mjs} +12 -24
- package/dist/lib/neutral/react-surface-4W5YLCHT.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +38 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/PipelinePlugin.d.ts +1 -0
- package/dist/types/src/PipelinePlugin.d.ts.map +1 -1
- package/dist/types/src/PipelinePlugin.node.d.ts +4 -0
- package/dist/types/src/PipelinePlugin.node.d.ts.map +1 -0
- package/dist/types/src/PipelinePlugin.test.d.ts +2 -0
- package/dist/types/src/PipelinePlugin.test.d.ts.map +1 -0
- 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/app-graph-builder.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 +9 -2
- 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 +4 -4
- package/dist/types/src/components/PipelineComponent/PipelineColumn.d.ts.map +1 -1
- package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts +8 -20
- package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts.map +1 -1
- package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts +44 -25
- 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/PipelineArticle/PipelineArticle.stories.d.ts +76 -0
- 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/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 +2 -2
- 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/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.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/src/templates/research.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +44 -26
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +100 -55
- package/src/PipelinePlugin.node.ts +19 -0
- package/src/PipelinePlugin.test.ts +27 -0
- package/src/PipelinePlugin.tsx +6 -30
- package/src/PipelinePlugin.workerd.ts +16 -0
- package/src/capabilities/app-graph-builder.ts +40 -0
- package/src/capabilities/create-object.ts +29 -0
- package/src/capabilities/index.ts +5 -2
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +13 -15
- package/src/components/PipelineComponent/PipelineColumn.tsx +13 -13
- package/src/components/PipelineComponent/PipelineComponent.stories.tsx +17 -19
- package/src/components/PipelineComponent/PipelineComponent.tsx +4 -4
- package/src/containers/{PipelineContainer/PipelineContainer.stories.tsx → PipelineArticle/PipelineArticle.stories.tsx} +36 -38
- package/src/containers/{PipelineContainer/PipelineContainer.tsx → PipelineArticle/PipelineArticle.tsx} +11 -13
- package/src/containers/PipelineArticle/index.ts +5 -0
- package/src/containers/{PipelineObjectSettings/PipelineObjectSettings.tsx → PipelineProperties/PipelineProperties.tsx} +33 -34
- package/src/containers/PipelineProperties/index.ts +5 -0
- package/src/containers/index.ts +2 -2
- package/src/hooks/usePipelineBoardModel.ts +1 -1
- package/src/index.ts +0 -1
- package/src/meta.ts +1 -0
- package/src/plugin.ts +9 -0
- package/src/templates/research.ts +2 -2
- package/src/translations.ts +22 -22
- package/dist/lib/browser/PipelineContainer-LY2P4JPA.mjs.map +0 -7
- package/dist/lib/browser/PipelineObjectSettings-QFMIKJH5.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-QQKBLYFD.mjs +0 -56
- package/dist/lib/browser/app-graph-builder-QQKBLYFD.mjs.map +0 -7
- package/dist/lib/browser/chunk-3A235GUD.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -90
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-QVPKOGEI.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/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/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 +0 -57
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/PipelineContainer/index.d.ts +0 -3
- package/dist/types/src/containers/PipelineContainer/index.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/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -49
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/containers/PipelineContainer/index.ts +0 -7
- package/src/containers/PipelineObjectSettings/index.ts +0 -7
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/types/index.mjs +0 -0
- /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/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
|
+
}
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
meta
|
|
3
|
-
} from "./chunk-3A235GUD.mjs";
|
|
4
|
-
|
|
5
|
-
// src/containers/PipelineObjectSettings/PipelineObjectSettings.tsx
|
|
1
|
+
// src/containers/PipelineProperties/PipelineProperties.tsx
|
|
6
2
|
import * as Schema from "effect/Schema";
|
|
7
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";
|
|
8
6
|
import { DXN, Filter, JsonSchema, Obj, Query, Ref, Tag } from "@dxos/echo";
|
|
9
|
-
import {
|
|
10
|
-
import { resolveSchemaWithRegistry } from "@dxos/plugin-space";
|
|
11
|
-
import { getSpace, useObject, useQuery } from "@dxos/react-client/echo";
|
|
7
|
+
import { useObject, useQuery } from "@dxos/react-client/echo";
|
|
12
8
|
import { IconButton, useAsyncEffect, useTranslation } from "@dxos/react-ui";
|
|
13
9
|
import { Form, ViewEditor } from "@dxos/react-ui-form";
|
|
14
10
|
import { List } from "@dxos/react-ui-list";
|
|
15
11
|
import { ViewModel } from "@dxos/schema";
|
|
16
12
|
import { Pipeline } from "@dxos/types";
|
|
17
|
-
import { mx, osTranslations
|
|
13
|
+
import { mx, osTranslations } from "@dxos/ui-theme";
|
|
18
14
|
import { arrayMove } from "@dxos/util";
|
|
15
|
+
import { meta } from "#meta";
|
|
19
16
|
var listGrid = "grid grid-cols-[min-content_1fr_min-content_min-content_min-content]";
|
|
20
17
|
var listItemGrid = "grid grid-cols-subgrid col-span-5";
|
|
21
18
|
var ColumnFormSchema = Pipeline.Column.pipe(Schema.mutable, Schema.pick("name"));
|
|
22
|
-
var
|
|
19
|
+
var PipelineProperties = ({ classNames, pipeline }) => {
|
|
23
20
|
const { t } = useTranslation(meta.id);
|
|
24
|
-
const
|
|
21
|
+
const db = Obj.getDatabase(pipeline);
|
|
25
22
|
const [expandedId, setExpandedId] = useState();
|
|
26
23
|
const [columns, updateColumns] = useObject(pipeline, "columns");
|
|
27
24
|
const column = useMemo(() => columns.find((column2) => column2.view.dxn.toString() === expandedId), [
|
|
@@ -31,9 +28,9 @@ var PipelineObjectSettings = ({ classNames, pipeline }) => {
|
|
|
31
28
|
const [view, updateView] = useObject(column?.view);
|
|
32
29
|
const [schema, setSchema] = useState(() => Schema.Struct({}));
|
|
33
30
|
const projectionRef = useRef(null);
|
|
34
|
-
const tags = useQuery(
|
|
31
|
+
const tags = useQuery(db, Filter.type(Tag.Tag));
|
|
35
32
|
const types = useTypeOptions({
|
|
36
|
-
|
|
33
|
+
db,
|
|
37
34
|
annotation: {
|
|
38
35
|
location: [
|
|
39
36
|
"database",
|
|
@@ -45,15 +42,15 @@ var PipelineObjectSettings = ({ classNames, pipeline }) => {
|
|
|
45
42
|
}
|
|
46
43
|
});
|
|
47
44
|
useAsyncEffect(async () => {
|
|
48
|
-
if (!view?.query || !
|
|
45
|
+
if (!view?.query || !db) {
|
|
49
46
|
return;
|
|
50
47
|
}
|
|
51
|
-
const foundSchema = await resolveSchemaWithRegistry(
|
|
48
|
+
const foundSchema = await resolveSchemaWithRegistry(db.schemaRegistry, view.query.ast);
|
|
52
49
|
if (foundSchema && foundSchema !== schema) {
|
|
53
50
|
setSchema(() => foundSchema);
|
|
54
51
|
}
|
|
55
52
|
}, [
|
|
56
|
-
|
|
53
|
+
db,
|
|
57
54
|
view,
|
|
58
55
|
schema
|
|
59
56
|
]);
|
|
@@ -63,19 +60,19 @@ var PipelineObjectSettings = ({ classNames, pipeline }) => {
|
|
|
63
60
|
updateColumns
|
|
64
61
|
]);
|
|
65
62
|
const handleQueryChanged = useCallback(async (newQuery, target) => {
|
|
66
|
-
if (!view || !
|
|
63
|
+
if (!view || !db) {
|
|
67
64
|
return;
|
|
68
65
|
}
|
|
69
66
|
const queue = target && DXN.tryParse(target) ? target : void 0;
|
|
70
67
|
const query = queue ? Query.fromAst(newQuery).from({
|
|
71
|
-
|
|
68
|
+
feeds: [
|
|
72
69
|
queue
|
|
73
70
|
]
|
|
74
71
|
}) : Query.fromAst(newQuery);
|
|
75
72
|
updateView((view2) => {
|
|
76
73
|
view2.query.ast = query.ast;
|
|
77
74
|
});
|
|
78
|
-
const newSchema = await resolveSchemaWithRegistry(
|
|
75
|
+
const newSchema = await resolveSchemaWithRegistry(db.schemaRegistry, query.ast);
|
|
79
76
|
if (!newSchema) {
|
|
80
77
|
return;
|
|
81
78
|
}
|
|
@@ -88,6 +85,7 @@ var PipelineObjectSettings = ({ classNames, pipeline }) => {
|
|
|
88
85
|
});
|
|
89
86
|
setSchema(() => newSchema);
|
|
90
87
|
}, [
|
|
88
|
+
db,
|
|
91
89
|
view,
|
|
92
90
|
updateView,
|
|
93
91
|
schema
|
|
@@ -118,22 +116,22 @@ var PipelineObjectSettings = ({ classNames, pipeline }) => {
|
|
|
118
116
|
updateColumns((columns2) => {
|
|
119
117
|
columns2.splice(index, 1);
|
|
120
118
|
});
|
|
121
|
-
|
|
119
|
+
db?.remove(viewToRemove);
|
|
122
120
|
}, [
|
|
123
121
|
expandedId,
|
|
124
122
|
columns,
|
|
125
123
|
updateColumns,
|
|
126
|
-
|
|
124
|
+
db
|
|
127
125
|
]);
|
|
128
126
|
const handleAdd = useCallback(() => {
|
|
129
|
-
if (!
|
|
127
|
+
if (!db) {
|
|
130
128
|
return;
|
|
131
129
|
}
|
|
132
130
|
const newView = ViewModel.make({
|
|
133
131
|
query: Query.select(Filter.nothing()),
|
|
134
132
|
jsonSchema: JsonSchema.toJsonSchema(Schema.Struct({}))
|
|
135
133
|
});
|
|
136
|
-
|
|
134
|
+
db.add(newView);
|
|
137
135
|
updateColumns((columns2) => {
|
|
138
136
|
columns2.push({
|
|
139
137
|
name: "",
|
|
@@ -144,15 +142,14 @@ var PipelineObjectSettings = ({ classNames, pipeline }) => {
|
|
|
144
142
|
});
|
|
145
143
|
setExpandedId(newView.id);
|
|
146
144
|
}, [
|
|
147
|
-
|
|
145
|
+
db,
|
|
148
146
|
updateColumns
|
|
149
147
|
]);
|
|
150
148
|
return /* @__PURE__ */ React.createElement("div", {
|
|
151
|
-
role: "none",
|
|
152
149
|
className: mx("py-form-padding overflow-y-auto", classNames)
|
|
153
150
|
}, /* @__PURE__ */ React.createElement("h2", {
|
|
154
151
|
className: "text-sm text-description py-1"
|
|
155
|
-
}, t("views
|
|
152
|
+
}, t("views.label")), /* @__PURE__ */ React.createElement(List.Root, {
|
|
156
153
|
items: columns,
|
|
157
154
|
isItem: Schema.is(Pipeline.Column),
|
|
158
155
|
getId: (column2) => column2.view.dxn.toString(),
|
|
@@ -166,25 +163,23 @@ var PipelineObjectSettings = ({ classNames, pipeline }) => {
|
|
|
166
163
|
classNames: listItemGrid,
|
|
167
164
|
"aria-expanded": expandedId === column2.view.dxn.toString()
|
|
168
165
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
169
|
-
|
|
170
|
-
className: mx(subtleHover, listItemGrid, "rounded-xs cursor-pointer min-h-10")
|
|
166
|
+
className: mx(listItemGrid, "dx-hover rounded-xs cursor-pointer min-h-10")
|
|
171
167
|
}, /* @__PURE__ */ React.createElement(List.ItemDragHandle, null), /* @__PURE__ */ React.createElement(List.ItemTitle, {
|
|
172
168
|
onClick: () => handleToggleField(column2)
|
|
173
|
-
}, column2.name || t("untitled
|
|
174
|
-
label: t("delete
|
|
169
|
+
}, column2.name || t("untitled-view.title")), /* @__PURE__ */ React.createElement(List.ItemDeleteButton, {
|
|
170
|
+
label: t("delete-view.label"),
|
|
175
171
|
autoHide: false,
|
|
176
172
|
onClick: () => handleDelete(column2),
|
|
177
173
|
"data-testid": "view.delete"
|
|
178
174
|
}), /* @__PURE__ */ React.createElement(IconButton, {
|
|
179
175
|
iconOnly: true,
|
|
180
176
|
variant: "ghost",
|
|
181
|
-
label: t("toggle
|
|
177
|
+
label: t("toggle-expand.label", {
|
|
182
178
|
ns: osTranslations
|
|
183
179
|
}),
|
|
184
180
|
icon: expandedId === column2.view.dxn.toString() ? "ph--caret-down--regular" : "ph--caret-right--regular",
|
|
185
181
|
onClick: () => handleToggleField(column2)
|
|
186
182
|
})), expandedId === column2.view.dxn.toString() && column2?.view.target && /* @__PURE__ */ React.createElement("div", {
|
|
187
|
-
role: "none",
|
|
188
183
|
className: "col-span-5 my-2 border border-separator rounded-md"
|
|
189
184
|
}, /* @__PURE__ */ React.createElement(Form.Root, {
|
|
190
185
|
schema: ColumnFormSchema,
|
|
@@ -196,25 +191,21 @@ var PipelineObjectSettings = ({ classNames, pipeline }) => {
|
|
|
196
191
|
readonly: true,
|
|
197
192
|
schema,
|
|
198
193
|
view: column2.view.target,
|
|
199
|
-
registry:
|
|
200
|
-
db
|
|
194
|
+
registry: db?.schemaRegistry,
|
|
195
|
+
db,
|
|
201
196
|
tags,
|
|
202
197
|
types,
|
|
203
198
|
onQueryChanged: handleQueryChanged
|
|
204
199
|
}))))))), /* @__PURE__ */ React.createElement("div", {
|
|
205
|
-
role: "none",
|
|
206
200
|
className: "my-form-padding"
|
|
207
201
|
}, /* @__PURE__ */ React.createElement(IconButton, {
|
|
208
202
|
icon: "ph--plus--regular",
|
|
209
|
-
label: t("add
|
|
203
|
+
label: t("add-view.label"),
|
|
210
204
|
onClick: handleAdd,
|
|
211
205
|
classNames: "w-full"
|
|
212
206
|
})));
|
|
213
207
|
};
|
|
214
|
-
|
|
215
|
-
// src/containers/PipelineObjectSettings/index.ts
|
|
216
|
-
var PipelineObjectSettings_default = PipelineObjectSettings;
|
|
217
208
|
export {
|
|
218
|
-
|
|
209
|
+
PipelineProperties as default
|
|
219
210
|
};
|
|
220
|
-
//# sourceMappingURL=
|
|
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,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,YAAK,MAAA,CAAA;AASnE,IAAMC,qBAAqB,CAAC,EAAEC,YAAYC,SAAQ,MAA2B;AAClF,QAAM,EAAEC,EAAC,IAAKpB,eAAeS,KAAKY,EAAE;AACpC,QAAMC,KAAK9B,IAAI+B,YAAYJ,QAAAA;AAC3B,QAAM,CAACK,YAAYC,aAAAA,IAAiBvC,SAAAA;AACpC,QAAM,CAACwC,SAASC,aAAAA,IAAiB/B,UAAUuB,UAAU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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
|
+
}
|
|
@@ -3,6 +3,7 @@ import { trim } from "@dxos/util";
|
|
|
3
3
|
var meta = {
|
|
4
4
|
id: "org.dxos.plugin.pipeline",
|
|
5
5
|
name: "Pipelines",
|
|
6
|
+
author: "DXOS",
|
|
6
7
|
description: trim`
|
|
7
8
|
Pipelines for organizing tasks, milestones, and deliverables.
|
|
8
9
|
Track progress across multiple pipelines and coordinate team activities in a structured environment.
|
|
@@ -18,4 +19,4 @@ var meta = {
|
|
|
18
19
|
export {
|
|
19
20
|
meta
|
|
20
21
|
};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-CNUFCMUC.mjs.map
|