@code0-tech/pictor 0.0.0-mvp.rc.1
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 +29 -0
- package/README.md +0 -0
- package/dist/DFlowDataType.service-B7xAjgiJ.js +793 -0
- package/dist/assets/Avatar.css +1 -0
- package/dist/assets/Badge.css +1 -0
- package/dist/assets/Breadcrumb.css +1 -0
- package/dist/assets/Button.css +1 -0
- package/dist/assets/ButtonGroup.css +1 -0
- package/dist/assets/Card.css +1 -0
- package/dist/assets/Col.css +1 -0
- package/dist/assets/Command.css +1 -0
- package/dist/assets/Container.css +1 -0
- package/dist/assets/DFlow.css +1 -0
- package/dist/assets/DFlowFolder.css +1 -0
- package/dist/assets/DFlowFunctionDefaultCard.css +1 -0
- package/dist/assets/DFlowInputDataType.css +1 -0
- package/dist/assets/DFlowMiniMap.css +1 -0
- package/dist/assets/DFlowSuggestionSearchInput.css +1 -0
- package/dist/assets/DFlowValidation.css +1 -0
- package/dist/assets/DFullScreen.css +1 -0
- package/dist/assets/DLayout.css +1 -0
- package/dist/assets/DResizable.css +1 -0
- package/dist/assets/Dialog.css +1 -0
- package/dist/assets/FileTabs.css +1 -0
- package/dist/assets/Flex.css +1 -0
- package/dist/assets/Input.css +1 -0
- package/dist/assets/Menu.css +1 -0
- package/dist/assets/Quote.css +1 -0
- package/dist/assets/Row.css +1 -0
- package/dist/assets/ScrollArea.css +1 -0
- package/dist/assets/SegmentedControl.css +1 -0
- package/dist/assets/Text.css +1 -0
- package/dist/assets/Tooltip.css +1 -0
- package/dist/compiler-runtime-Cu50tn6L.js +54 -0
- package/dist/components/avatar/Avatar.d.ts +8 -0
- package/dist/components/avatar/Avatar.js +55 -0
- package/dist/components/badge/Badge.d.ts +7 -0
- package/dist/components/badge/Badge.js +22 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +7 -0
- package/dist/components/breadcrumb/Breadcrumb.js +31 -0
- package/dist/components/button/Button.d.ts +10 -0
- package/dist/components/button/Button.js +28 -0
- package/dist/components/button-group/ButtonGroup.d.ts +7 -0
- package/dist/components/button-group/ButtonGroup.js +26 -0
- package/dist/components/card/Card.d.ts +14 -0
- package/dist/components/card/Card.js +39 -0
- package/dist/components/card/CardSection.d.ts +9 -0
- package/dist/components/card/CardSection.js +22 -0
- package/dist/components/col/Col.d.ts +13 -0
- package/dist/components/col/Col.js +26 -0
- package/dist/components/command/Command.d.ts +30 -0
- package/dist/components/command/Command.js +102 -0
- package/dist/components/container/Container.d.ts +6 -0
- package/dist/components/container/Container.js +20 -0
- package/dist/components/d-flow/DFlow.d.ts +5 -0
- package/dist/components/d-flow/DFlow.edges.hook.d.ts +4 -0
- package/dist/components/d-flow/DFlow.edges.hook.js +145 -0
- package/dist/components/d-flow/DFlow.js +373 -0
- package/dist/components/d-flow/DFlow.nodes.hook.d.ts +3 -0
- package/dist/components/d-flow/DFlow.nodes.hook.js +140 -0
- package/dist/components/d-flow/DFlow.service.d.ts +10 -0
- package/dist/components/d-flow/DFlow.service.js +11 -0
- package/dist/components/d-flow/DFlow.view.d.ts +109 -0
- package/dist/components/d-flow/DFlow.view.js +209 -0
- package/dist/components/d-flow/control/DFlowControl.d.ts +2 -0
- package/dist/components/d-flow/control/DFlowControl.js +77 -0
- package/dist/components/d-flow/control/index.d.ts +1 -0
- package/dist/components/d-flow/control/index.js +4 -0
- package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +10 -0
- package/dist/components/d-flow/data-type/DFlowDataType.service.js +7 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +2 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +18 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +4 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +6 -0
- package/dist/components/d-flow/data-type/DFlowDataType.view.d.ts +32 -0
- package/dist/components/d-flow/data-type/DFlowDataType.view.js +65 -0
- package/dist/components/d-flow/data-type/index.d.ts +2 -0
- package/dist/components/d-flow/data-type/index.js +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.d.ts +7 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.d.ts +4 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.d.ts +9 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +217 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.d.ts +4 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +7 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.d.ts +8 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.js +10 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.d.ts +3 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +8 -0
- package/dist/components/d-flow/edge/DFlowEdge.d.ts +10 -0
- package/dist/components/d-flow/edge/DFlowEdge.js +48 -0
- package/dist/components/d-flow/folder/DFlowFolder.d.ts +19 -0
- package/dist/components/d-flow/folder/DFlowFolder.js +118 -0
- package/dist/components/d-flow/folder/index.d.ts +1 -0
- package/dist/components/d-flow/folder/index.js +6 -0
- package/dist/components/d-flow/function/DFlowFunction.input.hook.d.ts +4 -0
- package/dist/components/d-flow/function/DFlowFunction.input.hook.js +9 -0
- package/dist/components/d-flow/function/DFlowFunction.return.hook.d.ts +4 -0
- package/dist/components/d-flow/function/DFlowFunction.return.hook.js +11 -0
- package/dist/components/d-flow/function/DFlowFunction.service.d.ts +6 -0
- package/dist/components/d-flow/function/DFlowFunction.service.js +9 -0
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +10 -0
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +75 -0
- package/dist/components/d-flow/function/DFlowFunction.view.d.ts +66 -0
- package/dist/components/d-flow/function/DFlowFunction.view.js +117 -0
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.d.ts +15 -0
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +158 -0
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +5 -0
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +55 -0
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.d.ts +11 -0
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +26 -0
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.d.ts +9 -0
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +97 -0
- package/dist/components/d-flow/function/index.d.ts +2 -0
- package/dist/components/d-flow/function/index.js +7 -0
- package/dist/components/d-flow/index.d.ts +13 -0
- package/dist/components/d-flow/index.js +46 -0
- package/dist/components/d-flow/input/DFlowInputDataType.d.ts +8 -0
- package/dist/components/d-flow/input/DFlowInputDataType.js +422 -0
- package/dist/components/d-flow/minimap/DFlowMiniMap.d.ts +2 -0
- package/dist/components/d-flow/minimap/DFlowMiniMap.js +21 -0
- package/dist/components/d-flow/minimap/index.d.ts +1 -0
- package/dist/components/d-flow/minimap/index.js +4 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.d.ts +33 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +151 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +5 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +18 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +21 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +25 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.d.ts +8 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +67 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.d.ts +3 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.js +42 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.d.ts +2 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +69 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.d.ts +6 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +21 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.d.ts +7 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +21 -0
- package/dist/components/d-flow/suggestion/index.d.ts +2 -0
- package/dist/components/d-flow/suggestion/index.js +7 -0
- package/dist/components/d-flow/tab/DFlowTabDefault.d.ts +11 -0
- package/dist/components/d-flow/tab/DFlowTabDefault.js +97 -0
- package/dist/components/d-flow/tab/DFlowTabTrigger.d.ts +6 -0
- package/dist/components/d-flow/tab/DFlowTabTrigger.js +51 -0
- package/dist/components/d-flow/tab/DFlowTabs.d.ts +2 -0
- package/dist/components/d-flow/tab/DFlowTabs.js +105 -0
- package/dist/components/d-flow/type/DFlowType.service.d.ts +6 -0
- package/dist/components/d-flow/type/DFlowType.service.js +9 -0
- package/dist/components/d-flow/type/DFlowType.view.d.ts +35 -0
- package/dist/components/d-flow/type/DFlowType.view.js +69 -0
- package/dist/components/d-flow/type/index.d.ts +2 -0
- package/dist/components/d-flow/type/index.js +6 -0
- package/dist/components/d-flow/validation/DFlowValidation.d.ts +6 -0
- package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +3 -0
- package/dist/components/d-flow/validation/DFlowValidation.hook.js +10 -0
- package/dist/components/d-flow/validation/DFlowValidation.js +59 -0
- package/dist/components/d-flow/validation/index.d.ts +2 -0
- package/dist/components/d-flow/validation/index.js +6 -0
- package/dist/components/d-fullscreen/DFullScreen.d.ts +7 -0
- package/dist/components/d-fullscreen/DFullScreen.js +20 -0
- package/dist/components/d-layout/DLayout.d.ts +10 -0
- package/dist/components/d-layout/DLayout.js +51 -0
- package/dist/components/d-namespace/DNamespace.service.d.ts +6 -0
- package/dist/components/d-namespace/DNamespace.service.js +11 -0
- package/dist/components/d-namespace/DNamespace.view.d.ts +32 -0
- package/dist/components/d-namespace/DNamespace.view.js +65 -0
- package/dist/components/d-namespace/index.d.ts +12 -0
- package/dist/components/d-namespace/index.js +35 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +8 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.service.js +11 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.view.d.ts +26 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.view.js +57 -0
- package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +9 -0
- package/dist/components/d-namespace/member/DNamespaceMember.service.js +11 -0
- package/dist/components/d-namespace/member/DNamespaceMember.view.d.ts +26 -0
- package/dist/components/d-namespace/member/DNamespaceMember.view.js +57 -0
- package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProject.service.js +11 -0
- package/dist/components/d-namespace/project/DNamespaceProject.view.d.ts +35 -0
- package/dist/components/d-namespace/project/DNamespaceProject.view.js +69 -0
- package/dist/components/d-namespace/project/DNamespaceProjectCard.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProjectCard.js +57 -0
- package/dist/components/d-namespace/project/DNamespaceProjectMenu.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProjectMenu.js +18 -0
- package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +10 -0
- package/dist/components/d-namespace/role/DNamespaceRole.service.js +11 -0
- package/dist/components/d-namespace/role/DNamespaceRole.view.d.ts +26 -0
- package/dist/components/d-namespace/role/DNamespaceRole.view.js +57 -0
- package/dist/components/d-organization/DOrganization.service.d.ts +8 -0
- package/dist/components/d-organization/DOrganization.service.js +11 -0
- package/dist/components/d-organization/DOrganization.view.d.ts +20 -0
- package/dist/components/d-organization/DOrganization.view.js +52 -0
- package/dist/components/d-organization/DOrganizationCard.d.ts +10 -0
- package/dist/components/d-organization/DOrganizationCard.js +63 -0
- package/dist/components/d-organization/DOrganizationMenu.d.ts +9 -0
- package/dist/components/d-organization/DOrganizationMenu.js +18 -0
- package/dist/components/d-organization/index.d.ts +4 -0
- package/dist/components/d-organization/index.js +19 -0
- package/dist/components/d-resizable/DResizable.d.ts +10 -0
- package/dist/components/d-resizable/DResizable.js +31 -0
- package/dist/components/d-runtime/DRuntime.service.d.ts +9 -0
- package/dist/components/d-runtime/DRuntime.service.js +11 -0
- package/dist/components/d-runtime/DRuntime.view.d.ts +38 -0
- package/dist/components/d-runtime/DRuntime.view.js +73 -0
- package/dist/components/d-runtime/index.d.ts +2 -0
- package/dist/components/d-runtime/index.js +6 -0
- package/dist/components/d-user/DUser.service.d.ts +21 -0
- package/dist/components/d-user/DUser.service.js +17 -0
- package/dist/components/d-user/DUser.view.d.ts +52 -0
- package/dist/components/d-user/DUser.view.js +100 -0
- package/dist/components/d-user/DUserMenu.d.ts +8 -0
- package/dist/components/d-user/DUserMenu.js +28 -0
- package/dist/components/d-user/index.d.ts +3 -0
- package/dist/components/d-user/index.js +17 -0
- package/dist/components/dialog/Dialog.d.ts +28 -0
- package/dist/components/dialog/Dialog.js +98 -0
- package/dist/components/file-tabs/FileTabs.d.ts +17 -0
- package/dist/components/file-tabs/FileTabs.js +70 -0
- package/dist/components/file-tabs/FileTabs.service.d.ts +13 -0
- package/dist/components/file-tabs/FileTabs.service.js +47 -0
- package/dist/components/file-tabs/FileTabs.view.d.ts +9 -0
- package/dist/components/file-tabs/FileTabs.view.js +1 -0
- package/dist/components/flex/Flex.d.ts +7 -0
- package/dist/components/flex/Flex.js +21 -0
- package/dist/components/form/CheckboxInput.d.ts +5 -0
- package/dist/components/form/CheckboxInput.js +67 -0
- package/dist/components/form/EmailInput.d.ts +8 -0
- package/dist/components/form/EmailInput.js +20 -0
- package/dist/components/form/Input.d.ts +22 -0
- package/dist/components/form/Input.js +153 -0
- package/dist/components/form/InputDescription.d.ts +5 -0
- package/dist/components/form/InputDescription.js +12 -0
- package/dist/components/form/InputLabel.d.ts +5 -0
- package/dist/components/form/InputLabel.js +12 -0
- package/dist/components/form/InputMessage.d.ts +5 -0
- package/dist/components/form/InputMessage.js +18 -0
- package/dist/components/form/InputSuggestion.d.ts +19 -0
- package/dist/components/form/InputSuggestion.js +102 -0
- package/dist/components/form/NumberInput.d.ts +6 -0
- package/dist/components/form/NumberInput.js +20 -0
- package/dist/components/form/PasswordInput.d.ts +8 -0
- package/dist/components/form/PasswordInput.js +18 -0
- package/dist/components/form/PinInput.d.ts +11 -0
- package/dist/components/form/PinInput.js +66 -0
- package/dist/components/form/RadioGroup.d.ts +5 -0
- package/dist/components/form/RadioGroup.js +48 -0
- package/dist/components/form/RadioInput.d.ts +7 -0
- package/dist/components/form/RadioInput.js +27 -0
- package/dist/components/form/SwitchInput.d.ts +6 -0
- package/dist/components/form/SwitchInput.js +19 -0
- package/dist/components/form/TextInput.d.ts +7 -0
- package/dist/components/form/TextInput.js +19 -0
- package/dist/components/form/index.d.ts +15 -0
- package/dist/components/form/index.js +37 -0
- package/dist/components/form/useForm.d.ts +25 -0
- package/dist/components/form/useForm.js +57 -0
- package/dist/components/menu/Menu.d.ts +27 -0
- package/dist/components/menu/Menu.js +104 -0
- package/dist/components/quote/Quote.d.ts +10 -0
- package/dist/components/quote/Quote.js +48 -0
- package/dist/components/row/Row.d.ts +6 -0
- package/dist/components/row/Row.js +20 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +13 -0
- package/dist/components/scroll-area/ScrollArea.js +42 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts +8 -0
- package/dist/components/segmented-control/SegmentedControl.js +23 -0
- package/dist/components/text/Text.d.ts +8 -0
- package/dist/components/text/Text.js +23 -0
- package/dist/components/tooltip/Tooltip.d.ts +13 -0
- package/dist/components/tooltip/Tooltip.js +47 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +223 -0
- package/dist/utils/arrayService.d.ts +10 -0
- package/dist/utils/arrayService.js +1 -0
- package/dist/utils/contextStore.d.ts +62 -0
- package/dist/utils/contextStore.js +60 -0
- package/dist/utils/generics.d.ts +17 -0
- package/dist/utils/generics.js +311 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +28 -0
- package/dist/utils/inspection.d.ts +13 -0
- package/dist/utils/inspection.js +4 -0
- package/dist/utils/nonReactiveArrayService.d.ts +19 -0
- package/dist/utils/nonReactiveArrayService.js +54 -0
- package/dist/utils/objectStore.d.ts +12 -0
- package/dist/utils/objectStore.js +34 -0
- package/dist/utils/reactiveArrayService.d.ts +22 -0
- package/dist/utils/reactiveArrayService.js +81 -0
- package/dist/utils/types.d.ts +57 -0
- package/dist/utils/types.js +4 -0
- package/dist/utils/utils.d.ts +68 -0
- package/dist/utils/utils.js +216 -0
- package/package.json +125 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { useService as T } from "../../utils/contextStore.js";
|
|
2
|
+
import { DFlowReactiveService as A } from "./DFlow.service.js";
|
|
3
|
+
import { NodeFunctionView as $ } from "./DFlow.view.js";
|
|
4
|
+
import { DFlowFunctionReactiveService as M } from "./function/DFlowFunction.service.js";
|
|
5
|
+
import { D as R } from "../../DFlowDataType.service-B7xAjgiJ.js";
|
|
6
|
+
import { DataTypeVariant as V } from "@code0-tech/sagittarius-graphql-types";
|
|
7
|
+
const E = /* @__PURE__ */ new Map([["std", "default"]]), K = (s, x) => {
|
|
8
|
+
if (!x || s.size === 0) return "";
|
|
9
|
+
const f = /[:._\-\/\s]+/, d = x.trim().toLowerCase();
|
|
10
|
+
let t = null, i = -1 / 0;
|
|
11
|
+
for (const [l, v] of s.entries()) {
|
|
12
|
+
const n = l.trim().toLowerCase();
|
|
13
|
+
if (d === n)
|
|
14
|
+
return v;
|
|
15
|
+
let a = 0;
|
|
16
|
+
if (d.startsWith(n)) {
|
|
17
|
+
a = 2e3 + n.length * 2;
|
|
18
|
+
const u = d.charAt(n.length);
|
|
19
|
+
(u === "" || f.test(u)) && (a += 200);
|
|
20
|
+
} else {
|
|
21
|
+
const u = Math.min(d.length, n.length);
|
|
22
|
+
let r = 0;
|
|
23
|
+
for (; r < u && d.charCodeAt(r) === n.charCodeAt(r); )
|
|
24
|
+
r++;
|
|
25
|
+
if (r > 0) {
|
|
26
|
+
a = 1e3 + r;
|
|
27
|
+
const h = d.charAt(r), m = n.charAt(r);
|
|
28
|
+
(h === "" || f.test(h) || m === "" || f.test(m)) && (a += 50);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
a > i ? (i = a, t = l) : (a === i && t !== null && l.length > t.length || a === i && t === null) && (t = l);
|
|
32
|
+
}
|
|
33
|
+
return t !== null ? s.get(t) : "";
|
|
34
|
+
}, O = (s) => {
|
|
35
|
+
const x = T(A), f = T(M), d = T(R), t = x.getById(s);
|
|
36
|
+
if (!t) return [];
|
|
37
|
+
const i = [];
|
|
38
|
+
let l = 0;
|
|
39
|
+
const v = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), a = (e, o = v) => (o.has(e) || o.set(e, f.getById(e)), o.get(e)), u = (e, o = n) => (o.has(e) || o.set(e, d.getDataType(e)), o.get(e));
|
|
40
|
+
let r = 0;
|
|
41
|
+
const h = () => ++r;
|
|
42
|
+
let m = 0;
|
|
43
|
+
i.push({
|
|
44
|
+
id: `${t.id}`,
|
|
45
|
+
type: "trigger",
|
|
46
|
+
position: {
|
|
47
|
+
x: 0,
|
|
48
|
+
y: 0
|
|
49
|
+
},
|
|
50
|
+
draggable: !1,
|
|
51
|
+
data: {
|
|
52
|
+
instance: t,
|
|
53
|
+
flowId: s
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
const I = (e, o = !1, B, y = 0, D = [0], c, N = v, S = n) => {
|
|
57
|
+
const p = `${e.id}-${l++}`, C = ++m;
|
|
58
|
+
i.push({
|
|
59
|
+
id: p,
|
|
60
|
+
type: K(E, e.functionDefinition?.identifier),
|
|
61
|
+
position: {
|
|
62
|
+
x: 0,
|
|
63
|
+
y: 0
|
|
64
|
+
},
|
|
65
|
+
draggable: !1,
|
|
66
|
+
parentId: c,
|
|
67
|
+
extent: c ? "parent" : void 0,
|
|
68
|
+
data: {
|
|
69
|
+
instance: e,
|
|
70
|
+
isParameter: o,
|
|
71
|
+
flowId: s,
|
|
72
|
+
linkingId: o ? B : void 0,
|
|
73
|
+
scope: D,
|
|
74
|
+
// scope is now a PATH (number[])
|
|
75
|
+
depth: y,
|
|
76
|
+
// structural depth (0 at root, +1 per group)
|
|
77
|
+
index: C
|
|
78
|
+
// global node level
|
|
79
|
+
}
|
|
80
|
+
}), !e.nextNodeId && !o && i.push({
|
|
81
|
+
id: `${p}-suggestion`,
|
|
82
|
+
type: "suggestion",
|
|
83
|
+
position: {
|
|
84
|
+
x: 0,
|
|
85
|
+
y: 0
|
|
86
|
+
},
|
|
87
|
+
draggable: !1,
|
|
88
|
+
extent: c ? "parent" : void 0,
|
|
89
|
+
parentId: c,
|
|
90
|
+
data: {
|
|
91
|
+
flowId: s,
|
|
92
|
+
parentFunction: e
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
const k = a(e.functionDefinition?.id, N);
|
|
96
|
+
e.parameters?.forEach((g) => {
|
|
97
|
+
const F = k?.parameterDefinitions.find((b) => b.id == g.runtimeParameter?.id)?.dataTypeIdentifier;
|
|
98
|
+
if ((F ? u(F, S) : void 0)?.variant === V.Node) {
|
|
99
|
+
if (g.value && g.value instanceof $) {
|
|
100
|
+
const b = `${p}-group-${l++}`, w = [...D, h()];
|
|
101
|
+
i.push({
|
|
102
|
+
id: b,
|
|
103
|
+
type: "group",
|
|
104
|
+
position: {
|
|
105
|
+
x: 0,
|
|
106
|
+
y: 0
|
|
107
|
+
},
|
|
108
|
+
draggable: !1,
|
|
109
|
+
parentId: c,
|
|
110
|
+
extent: c ? "parent" : void 0,
|
|
111
|
+
data: {
|
|
112
|
+
isParameter: !0,
|
|
113
|
+
linkingId: p,
|
|
114
|
+
flowId: s,
|
|
115
|
+
depth: y + 1,
|
|
116
|
+
scope: w
|
|
117
|
+
}
|
|
118
|
+
}), I(g.value, !1, void 0, y + 1, w, b, N, S);
|
|
119
|
+
}
|
|
120
|
+
} else g.value && g.value instanceof $ && I(g.value, !0, p, y, D, c, N, S);
|
|
121
|
+
}), e.nextNodeId && I(t.getNodeById(e.nextNodeId), !1, void 0, y, D, c, N, S);
|
|
122
|
+
};
|
|
123
|
+
return t.startingNodeId ? I(t.getNodeById(t.startingNodeId), !1, void 0, 0, [0], void 0, v, n) : i.push({
|
|
124
|
+
id: `${t.id}-suggestion`,
|
|
125
|
+
type: "suggestion",
|
|
126
|
+
position: {
|
|
127
|
+
x: 0,
|
|
128
|
+
y: 0
|
|
129
|
+
},
|
|
130
|
+
draggable: !1,
|
|
131
|
+
extent: void 0,
|
|
132
|
+
data: {
|
|
133
|
+
flowId: s,
|
|
134
|
+
parentFunction: void 0
|
|
135
|
+
}
|
|
136
|
+
}), i;
|
|
137
|
+
};
|
|
138
|
+
export {
|
|
139
|
+
O as useFlowNodes
|
|
140
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FlowView } from './DFlow.view';
|
|
2
|
+
import { ReactiveArrayService } from '../../utils/reactiveArrayService';
|
|
3
|
+
import { Flow, NamespacesProjectsFlowsCreateInput, NamespacesProjectsFlowsCreatePayload, NamespacesProjectsFlowsDeleteInput, NamespacesProjectsFlowsDeletePayload } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
export declare abstract class DFlowReactiveService extends ReactiveArrayService<FlowView> {
|
|
5
|
+
getById(id: Flow['id']): FlowView | undefined;
|
|
6
|
+
/** Creates a new flow. */
|
|
7
|
+
abstract flowCreate(payload: NamespacesProjectsFlowsCreateInput): Promise<NamespacesProjectsFlowsCreatePayload | undefined>;
|
|
8
|
+
/** Deletes a namespace project. */
|
|
9
|
+
abstract flowDelete(payload: NamespacesProjectsFlowsDeleteInput): Promise<NamespacesProjectsFlowsDeletePayload | undefined>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactiveArrayService as i } from "../../utils/reactiveArrayService.js";
|
|
2
|
+
class c extends i {
|
|
3
|
+
//TODO: inject UI error handler for toasts
|
|
4
|
+
//inject: namespaceId and projectId because the runtimes query needs it
|
|
5
|
+
getById(e) {
|
|
6
|
+
return this.values().find((r) => r.id === e);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
c as DFlowReactiveService
|
|
11
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { DataType, Flow, FlowSetting, FlowType, FunctionDefinition, LiteralValue, Maybe, NodeFunction, NodeParameter, NodeParameterValue, ReferenceValue, RuntimeParameterDefinition, Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
import { ValidationResult } from '../../utils/inspection';
|
|
3
|
+
export declare class FlowView {
|
|
4
|
+
/** Time when this Flow was created */
|
|
5
|
+
private readonly _createdAt?;
|
|
6
|
+
/** Global ID of this Flow */
|
|
7
|
+
private readonly _id?;
|
|
8
|
+
/** The input data type of the flow */
|
|
9
|
+
private _inputType?;
|
|
10
|
+
/** Nodes of the flow */
|
|
11
|
+
private _nodes?;
|
|
12
|
+
/** The return data type of the flow */
|
|
13
|
+
private readonly _returnType?;
|
|
14
|
+
/** The settings of the flow */
|
|
15
|
+
private readonly _settings?;
|
|
16
|
+
/** The ID of the starting node of the flow */
|
|
17
|
+
private _startingNodeId?;
|
|
18
|
+
/** The flow type of the flow */
|
|
19
|
+
private readonly _type?;
|
|
20
|
+
/** Time when this Flow was last updated */
|
|
21
|
+
private readonly _updatedAt?;
|
|
22
|
+
/** Name of the flow */
|
|
23
|
+
private _name?;
|
|
24
|
+
constructor(flow: Flow);
|
|
25
|
+
get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
26
|
+
get id(): Maybe<Scalars["FlowID"]["output"]> | undefined;
|
|
27
|
+
get inputType(): Maybe<DataType> | undefined;
|
|
28
|
+
get nodes(): NodeFunctionView[] | undefined;
|
|
29
|
+
get returnType(): Maybe<DataType> | undefined;
|
|
30
|
+
get settings(): FlowSettingView[] | undefined;
|
|
31
|
+
get startingNodeId(): Maybe<Scalars["NodeFunctionID"]["output"]> | undefined;
|
|
32
|
+
get type(): Maybe<FlowType> | undefined;
|
|
33
|
+
get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
34
|
+
get name(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
35
|
+
set inputType(value: Maybe<DataType>);
|
|
36
|
+
set startingNodeId(value: Maybe<Scalars["NodeFunctionID"]["output"]>);
|
|
37
|
+
set name(value: Maybe<Scalars["String"]["output"]>);
|
|
38
|
+
addNode(node: NodeFunctionView): void;
|
|
39
|
+
updateNode(updatedNode: NodeFunctionView): void;
|
|
40
|
+
removeNode(nodeId: Scalars['NodeFunctionID']['output']): void;
|
|
41
|
+
getNodeById(nodeId: Scalars['NodeFunctionID']['output']): NodeFunctionView | undefined;
|
|
42
|
+
json(): Flow;
|
|
43
|
+
}
|
|
44
|
+
export declare class NodeFunctionView {
|
|
45
|
+
/** Time when this NodeFunction was created */
|
|
46
|
+
private readonly _createdAt?;
|
|
47
|
+
/** Global ID of this NodeFunction */
|
|
48
|
+
private readonly _id?;
|
|
49
|
+
/** The ID of the next Node Function in the flow */
|
|
50
|
+
private _nextNodeId?;
|
|
51
|
+
/** The parameters of the Node Function */
|
|
52
|
+
private readonly _parameters?;
|
|
53
|
+
/** The definition of the Node Function */
|
|
54
|
+
private readonly _functionDefinition?;
|
|
55
|
+
/** Time when this NodeFunction was last updated */
|
|
56
|
+
private readonly _updatedAt?;
|
|
57
|
+
constructor(nodeFunction: NodeFunction);
|
|
58
|
+
get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
59
|
+
get id(): Maybe<Scalars["NodeFunctionID"]["output"]> | undefined;
|
|
60
|
+
get nextNodeId(): Maybe<Scalars["NodeFunctionID"]["output"]> | undefined;
|
|
61
|
+
get parameters(): NodeParameterView[] | undefined;
|
|
62
|
+
get functionDefinition(): Maybe<FunctionDefinition> | undefined;
|
|
63
|
+
get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
64
|
+
set nextNodeId(value: Maybe<Scalars["NodeFunctionID"]["output"]>);
|
|
65
|
+
deleteNextNode(): void;
|
|
66
|
+
json(): NodeFunction | undefined;
|
|
67
|
+
}
|
|
68
|
+
export declare class NodeParameterView {
|
|
69
|
+
/** Time when this NodeParameter was created */
|
|
70
|
+
private readonly _createdAt?;
|
|
71
|
+
/** Global ID of this NodeParameter */
|
|
72
|
+
private readonly _id?;
|
|
73
|
+
/** The definition of the parameter */
|
|
74
|
+
private readonly _runtimeParameter?;
|
|
75
|
+
/** Time when this NodeParameter was last updated */
|
|
76
|
+
private readonly _updatedAt?;
|
|
77
|
+
/** The value of the parameter */
|
|
78
|
+
private _value?;
|
|
79
|
+
private _validationResults;
|
|
80
|
+
constructor(nodeParameter: NodeParameter);
|
|
81
|
+
get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
82
|
+
get id(): Maybe<Scalars["NodeParameterID"]["output"]> | undefined;
|
|
83
|
+
get runtimeParameter(): Maybe<RuntimeParameterDefinition> | undefined;
|
|
84
|
+
get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
85
|
+
get value(): LiteralValue | ReferenceValue | NodeFunctionView | undefined;
|
|
86
|
+
get validationResults(): ValidationResult[];
|
|
87
|
+
set validationResults(value: ValidationResult[]);
|
|
88
|
+
set value(value: NodeParameterValue | undefined);
|
|
89
|
+
json(): NodeParameter | undefined;
|
|
90
|
+
}
|
|
91
|
+
export declare class FlowSettingView {
|
|
92
|
+
private readonly _createdAt?;
|
|
93
|
+
/** The identifier of the flow setting */
|
|
94
|
+
private readonly _flowSettingIdentifier?;
|
|
95
|
+
/** Global ID of this FlowSetting */
|
|
96
|
+
private readonly _id?;
|
|
97
|
+
/** Time when this FlowSetting was last updated */
|
|
98
|
+
private readonly _updatedAt?;
|
|
99
|
+
/** The value of the flow setting */
|
|
100
|
+
private _value?;
|
|
101
|
+
constructor(flowSetting: FlowSetting);
|
|
102
|
+
get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
103
|
+
get flowSettingIdentifier(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
104
|
+
get id(): Maybe<Scalars["FlowSettingID"]["output"]> | undefined;
|
|
105
|
+
get value(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
106
|
+
get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
107
|
+
set value(value: Maybe<Scalars["JSON"]["output"]>);
|
|
108
|
+
json(): FlowSetting;
|
|
109
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
function e(s, t, i) {
|
|
2
|
+
return (t = n(t)) in s ? Object.defineProperty(s, t, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : s[t] = i, s;
|
|
3
|
+
}
|
|
4
|
+
function n(s) {
|
|
5
|
+
var t = a(s, "string");
|
|
6
|
+
return typeof t == "symbol" ? t : t + "";
|
|
7
|
+
}
|
|
8
|
+
function a(s, t) {
|
|
9
|
+
if (typeof s != "object" || !s) return s;
|
|
10
|
+
var i = s[Symbol.toPrimitive];
|
|
11
|
+
if (i !== void 0) {
|
|
12
|
+
var r = i.call(s, t);
|
|
13
|
+
if (typeof r != "object") return r;
|
|
14
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
15
|
+
}
|
|
16
|
+
return (t === "string" ? String : Number)(s);
|
|
17
|
+
}
|
|
18
|
+
class h {
|
|
19
|
+
constructor(t) {
|
|
20
|
+
e(this, "_createdAt", void 0), e(this, "_id", void 0), e(this, "_inputType", void 0), e(this, "_nodes", void 0), e(this, "_returnType", void 0), e(this, "_settings", void 0), e(this, "_startingNodeId", void 0), e(this, "_type", void 0), e(this, "_updatedAt", void 0), e(this, "_name", void 0), this._createdAt = t.createdAt, this._id = t.id, this._inputType = t.inputType, this._nodes = t.nodes?.nodes?.map((i) => new d(i)), this._returnType = t.returnType, this._settings = t.settings?.nodes?.map((i) => new _(i)), this._startingNodeId = t.startingNodeId, this._type = t.type, this._updatedAt = t.updatedAt, this._name = t.name;
|
|
21
|
+
}
|
|
22
|
+
get createdAt() {
|
|
23
|
+
return this._createdAt;
|
|
24
|
+
}
|
|
25
|
+
get id() {
|
|
26
|
+
return this._id;
|
|
27
|
+
}
|
|
28
|
+
get inputType() {
|
|
29
|
+
return this._inputType;
|
|
30
|
+
}
|
|
31
|
+
get nodes() {
|
|
32
|
+
return this._nodes;
|
|
33
|
+
}
|
|
34
|
+
get returnType() {
|
|
35
|
+
return this._returnType;
|
|
36
|
+
}
|
|
37
|
+
get settings() {
|
|
38
|
+
return this._settings;
|
|
39
|
+
}
|
|
40
|
+
get startingNodeId() {
|
|
41
|
+
return this._startingNodeId;
|
|
42
|
+
}
|
|
43
|
+
get type() {
|
|
44
|
+
return this._type;
|
|
45
|
+
}
|
|
46
|
+
get updatedAt() {
|
|
47
|
+
return this._updatedAt;
|
|
48
|
+
}
|
|
49
|
+
get name() {
|
|
50
|
+
return this._name;
|
|
51
|
+
}
|
|
52
|
+
set inputType(t) {
|
|
53
|
+
this._inputType = t;
|
|
54
|
+
}
|
|
55
|
+
set startingNodeId(t) {
|
|
56
|
+
this._startingNodeId = t;
|
|
57
|
+
}
|
|
58
|
+
set name(t) {
|
|
59
|
+
this._name = t;
|
|
60
|
+
}
|
|
61
|
+
addNode(t) {
|
|
62
|
+
this._nodes || (this._nodes = []), this._nodes.push(t);
|
|
63
|
+
}
|
|
64
|
+
updateNode(t) {
|
|
65
|
+
this._nodes && (this._nodes = this._nodes.map((i) => i.id === t.id ? t : i));
|
|
66
|
+
}
|
|
67
|
+
removeNode(t) {
|
|
68
|
+
this._nodes && (this._nodes = this._nodes.filter((i) => i.id !== t));
|
|
69
|
+
}
|
|
70
|
+
getNodeById(t) {
|
|
71
|
+
if (this._nodes)
|
|
72
|
+
return this._nodes.find((i) => i.id === t);
|
|
73
|
+
}
|
|
74
|
+
json() {
|
|
75
|
+
return {
|
|
76
|
+
createdAt: this._createdAt,
|
|
77
|
+
id: this._id,
|
|
78
|
+
inputType: this._inputType,
|
|
79
|
+
nodes: this._nodes ? {
|
|
80
|
+
nodes: this._nodes.map((t) => t.json())
|
|
81
|
+
} : void 0,
|
|
82
|
+
returnType: this._returnType,
|
|
83
|
+
settings: this._settings ? {
|
|
84
|
+
nodes: this._settings.map((t) => t.json())
|
|
85
|
+
} : void 0,
|
|
86
|
+
startingNodeId: this._startingNodeId,
|
|
87
|
+
type: this._type,
|
|
88
|
+
updatedAt: this._updatedAt,
|
|
89
|
+
name: this._name
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
class d {
|
|
94
|
+
constructor(t) {
|
|
95
|
+
e(this, "_createdAt", void 0), e(this, "_id", void 0), e(this, "_nextNodeId", void 0), e(this, "_parameters", void 0), e(this, "_functionDefinition", void 0), e(this, "_updatedAt", void 0), this._createdAt = t.createdAt, this._id = t.id, this._nextNodeId = t.nextNodeId, this._functionDefinition = t.functionDefinition, this._updatedAt = t.updatedAt, this._parameters = t.parameters ? t.parameters.nodes?.map((i) => new u(i)) : void 0;
|
|
96
|
+
}
|
|
97
|
+
get createdAt() {
|
|
98
|
+
return this._createdAt;
|
|
99
|
+
}
|
|
100
|
+
get id() {
|
|
101
|
+
return this._id;
|
|
102
|
+
}
|
|
103
|
+
get nextNodeId() {
|
|
104
|
+
return this._nextNodeId;
|
|
105
|
+
}
|
|
106
|
+
get parameters() {
|
|
107
|
+
return this._parameters;
|
|
108
|
+
}
|
|
109
|
+
get functionDefinition() {
|
|
110
|
+
return this._functionDefinition;
|
|
111
|
+
}
|
|
112
|
+
get updatedAt() {
|
|
113
|
+
return this._updatedAt;
|
|
114
|
+
}
|
|
115
|
+
set nextNodeId(t) {
|
|
116
|
+
this._nextNodeId = t;
|
|
117
|
+
}
|
|
118
|
+
deleteNextNode() {
|
|
119
|
+
this._nextNodeId = void 0;
|
|
120
|
+
}
|
|
121
|
+
json() {
|
|
122
|
+
return {
|
|
123
|
+
createdAt: this._createdAt,
|
|
124
|
+
id: this._id,
|
|
125
|
+
nextNodeId: this._nextNodeId,
|
|
126
|
+
parameters: this._parameters ? {
|
|
127
|
+
nodes: this._parameters.map((t) => t.json())
|
|
128
|
+
} : void 0,
|
|
129
|
+
functionDefinition: this._functionDefinition,
|
|
130
|
+
updatedAt: this._updatedAt
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
class u {
|
|
135
|
+
constructor(t) {
|
|
136
|
+
e(this, "_createdAt", void 0), e(this, "_id", void 0), e(this, "_runtimeParameter", void 0), e(this, "_updatedAt", void 0), e(this, "_value", void 0), e(this, "_validationResults", void 0), this._createdAt = t.createdAt, this._id = t.id, this._runtimeParameter = t.runtimeParameter, this._updatedAt = t.updatedAt, t.value?.__typename === "NodeFunction" ? this._value = new d(t.value) : this._value = t.value, this._validationResults = [];
|
|
137
|
+
}
|
|
138
|
+
get createdAt() {
|
|
139
|
+
return this._createdAt;
|
|
140
|
+
}
|
|
141
|
+
get id() {
|
|
142
|
+
return this._id;
|
|
143
|
+
}
|
|
144
|
+
get runtimeParameter() {
|
|
145
|
+
return this._runtimeParameter;
|
|
146
|
+
}
|
|
147
|
+
get updatedAt() {
|
|
148
|
+
return this._updatedAt;
|
|
149
|
+
}
|
|
150
|
+
get value() {
|
|
151
|
+
return this._value;
|
|
152
|
+
}
|
|
153
|
+
get validationResults() {
|
|
154
|
+
return this._validationResults;
|
|
155
|
+
}
|
|
156
|
+
set validationResults(t) {
|
|
157
|
+
this._validationResults = t;
|
|
158
|
+
}
|
|
159
|
+
set value(t) {
|
|
160
|
+
t?.__typename === "NodeFunction" ? this._value = new d(t) : this._value = t;
|
|
161
|
+
}
|
|
162
|
+
json() {
|
|
163
|
+
return {
|
|
164
|
+
createdAt: this._createdAt,
|
|
165
|
+
id: this._id,
|
|
166
|
+
runtimeParameter: this._runtimeParameter,
|
|
167
|
+
updatedAt: this._updatedAt,
|
|
168
|
+
value: this._value instanceof d ? this._value.json() : this._value
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
class _ {
|
|
173
|
+
constructor(t) {
|
|
174
|
+
e(this, "_createdAt", void 0), e(this, "_flowSettingIdentifier", void 0), e(this, "_id", void 0), e(this, "_updatedAt", void 0), e(this, "_value", void 0), this._createdAt = t.createdAt, this._flowSettingIdentifier = t.flowSettingIdentifier, this._id = t.id, this._value = t.value, this._updatedAt = t.updatedAt;
|
|
175
|
+
}
|
|
176
|
+
get createdAt() {
|
|
177
|
+
return this._createdAt;
|
|
178
|
+
}
|
|
179
|
+
get flowSettingIdentifier() {
|
|
180
|
+
return this._flowSettingIdentifier;
|
|
181
|
+
}
|
|
182
|
+
get id() {
|
|
183
|
+
return this._id;
|
|
184
|
+
}
|
|
185
|
+
get value() {
|
|
186
|
+
return this._value;
|
|
187
|
+
}
|
|
188
|
+
get updatedAt() {
|
|
189
|
+
return this._updatedAt;
|
|
190
|
+
}
|
|
191
|
+
set value(t) {
|
|
192
|
+
this._value = t;
|
|
193
|
+
}
|
|
194
|
+
json() {
|
|
195
|
+
return {
|
|
196
|
+
createdAt: this._createdAt,
|
|
197
|
+
flowSettingIdentifier: this._flowSettingIdentifier,
|
|
198
|
+
id: this._id,
|
|
199
|
+
value: this._value,
|
|
200
|
+
updatedAt: this._updatedAt
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
export {
|
|
205
|
+
_ as FlowSettingView,
|
|
206
|
+
h as FlowView,
|
|
207
|
+
d as NodeFunctionView,
|
|
208
|
+
u as NodeParameterView
|
|
209
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsx as o, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
import { c as j } from "../../../compiler-runtime-Cu50tn6L.js";
|
|
3
|
+
import { useViewport as D, useReactFlow as M, Panel as O } from "@xyflow/react";
|
|
4
|
+
import { ButtonGroup as R } from "../../button-group/ButtonGroup.js";
|
|
5
|
+
import { Button as B } from "../../button/Button.js";
|
|
6
|
+
import { IconPlus as V, IconMinus as v, IconFocusCentered as E } from "@tabler/icons-react";
|
|
7
|
+
import { Badge as G } from "../../badge/Badge.js";
|
|
8
|
+
import { Flex as P } from "../../flex/Flex.js";
|
|
9
|
+
const N = () => {
|
|
10
|
+
const e = j.c(36), C = D(), t = M();
|
|
11
|
+
let p;
|
|
12
|
+
e[0] !== t ? (p = () => {
|
|
13
|
+
t.zoomIn();
|
|
14
|
+
}, e[0] = t, e[1] = p) : p = e[1];
|
|
15
|
+
const I = p;
|
|
16
|
+
let d;
|
|
17
|
+
e[2] !== t ? (d = () => {
|
|
18
|
+
t.zoomOut();
|
|
19
|
+
}, e[2] = t, e[3] = d) : d = e[3];
|
|
20
|
+
const g = d;
|
|
21
|
+
let h;
|
|
22
|
+
e[4] !== t ? (h = () => {
|
|
23
|
+
t.fitView();
|
|
24
|
+
}, e[4] = t, e[5] = h) : h = e[5];
|
|
25
|
+
const F = h;
|
|
26
|
+
let u;
|
|
27
|
+
e[6] !== C.zoom ? (u = () => Math.round(C.zoom * 100), e[6] = C.zoom, e[7] = u) : u = e[7];
|
|
28
|
+
const S = u;
|
|
29
|
+
let y;
|
|
30
|
+
e[8] === Symbol.for("react.memo_cache_sentinel") ? (y = {
|
|
31
|
+
flexDirection: "column",
|
|
32
|
+
gap: "1rem"
|
|
33
|
+
}, e[8] = y) : y = e[8];
|
|
34
|
+
let z;
|
|
35
|
+
e[9] === Symbol.for("react.memo_cache_sentinel") ? (z = {
|
|
36
|
+
gap: ".35rem"
|
|
37
|
+
}, e[9] = z) : z = e[9];
|
|
38
|
+
let l;
|
|
39
|
+
e[10] !== I ? (l = () => I(), e[10] = I, e[11] = l) : l = e[11];
|
|
40
|
+
let _;
|
|
41
|
+
e[12] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ o(V, { size: 15 }), e[12] = _) : _ = e[12];
|
|
42
|
+
let r;
|
|
43
|
+
e[13] !== l ? (r = /* @__PURE__ */ o(B, { color: "secondary", onClick: l, children: _ }), e[13] = l, e[14] = r) : r = e[14];
|
|
44
|
+
let i;
|
|
45
|
+
e[15] !== g ? (i = () => g(), e[15] = g, e[16] = i) : i = e[16];
|
|
46
|
+
let b;
|
|
47
|
+
e[17] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ o(v, { size: 15 }), e[17] = b) : b = e[17];
|
|
48
|
+
let c;
|
|
49
|
+
e[18] !== i ? (c = /* @__PURE__ */ o(B, { color: "secondary", onClick: i, children: b }), e[18] = i, e[19] = c) : c = e[19];
|
|
50
|
+
let n;
|
|
51
|
+
e[20] !== F ? (n = () => F(), e[20] = F, e[21] = n) : n = e[21];
|
|
52
|
+
let w;
|
|
53
|
+
e[22] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ o(E, { size: 15 }), e[22] = w) : w = e[22];
|
|
54
|
+
let s;
|
|
55
|
+
e[23] !== n ? (s = /* @__PURE__ */ o(B, { color: "secondary", onClick: n, children: w }), e[23] = n, e[24] = s) : s = e[24];
|
|
56
|
+
let m;
|
|
57
|
+
e[25] !== c || e[26] !== s || e[27] !== r ? (m = /* @__PURE__ */ k(R, { children: [
|
|
58
|
+
r,
|
|
59
|
+
c,
|
|
60
|
+
s
|
|
61
|
+
] }), e[25] = c, e[26] = s, e[27] = r, e[28] = m) : m = e[28];
|
|
62
|
+
let f;
|
|
63
|
+
e[29] !== S ? (f = S(), e[29] = S, e[30] = f) : f = e[30];
|
|
64
|
+
let a;
|
|
65
|
+
e[31] !== f ? (a = /* @__PURE__ */ k(G, { color: "secondary", children: [
|
|
66
|
+
f,
|
|
67
|
+
"%"
|
|
68
|
+
] }), e[31] = f, e[32] = a) : a = e[32];
|
|
69
|
+
let x;
|
|
70
|
+
return e[33] !== m || e[34] !== a ? (x = /* @__PURE__ */ o(O, { position: "bottom-left", children: /* @__PURE__ */ o(P, { style: y, children: /* @__PURE__ */ k(P, { align: "stretch", style: z, children: [
|
|
71
|
+
m,
|
|
72
|
+
a
|
|
73
|
+
] }) }) }), e[33] = m, e[34] = a, e[35] = x) : x = e[35], x;
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
N as DFlowControl
|
|
77
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DFlowControl';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactiveArrayService } from '../../../utils/reactiveArrayService';
|
|
2
|
+
import { DataTypeView } from './DFlowDataType.view';
|
|
3
|
+
import { DataTypeIdentifier, Maybe, NodeParameterValue } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
import { FlowView } from '../DFlow.view';
|
|
5
|
+
export declare abstract class DFlowDataTypeReactiveService extends ReactiveArrayService<DataTypeView> {
|
|
6
|
+
getDataType(type: DataTypeIdentifier): DataTypeView | undefined;
|
|
7
|
+
getDataTypeFromValue(value: NodeParameterValue, flow?: FlowView): DataTypeView | undefined;
|
|
8
|
+
getTypeFromValue(value: NodeParameterValue, flow?: FlowView): Maybe<DataTypeIdentifier> | undefined;
|
|
9
|
+
hasDataTypes(types: DataTypeIdentifier[]): boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const g = ["id", "__typename", "createdAt", "updatedAt"], h = (c, u) => {
|
|
2
|
+
if (c.variant !== u.variant) return !1;
|
|
3
|
+
const l = (r) => r !== null && typeof r == "object", i = (r, e) => {
|
|
4
|
+
if (r === e) return !0;
|
|
5
|
+
const y = Array.isArray(r), a = Array.isArray(e);
|
|
6
|
+
if (y || a)
|
|
7
|
+
return !y || !a || r.length !== e.length ? !1 : r.every((s, f) => i(s, e[f]));
|
|
8
|
+
if (l(r) && l(e)) {
|
|
9
|
+
const s = Object.keys(r), f = Object.keys(e);
|
|
10
|
+
return s.length !== f.length ? !1 : s.every((o) => g.includes(o) ? !0 : i(r[o], e[o]));
|
|
11
|
+
}
|
|
12
|
+
return !1;
|
|
13
|
+
}, t = c.rules?.nodes ?? [], n = u.rules?.nodes ?? [];
|
|
14
|
+
return !t.length && !n.length ? !0 : !t.length || !n.length || t.length !== n.length ? !1 : t.every((r, e) => i(r, n[e]));
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
h as useValidateDataType
|
|
18
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { GenericMapper, NodeParameterValue } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
import { DataTypeView } from './DFlowDataType.view';
|
|
3
|
+
import { FlowView } from '../DFlow.view';
|
|
4
|
+
export declare const useValidateValue: (value: NodeParameterValue, dataType: DataTypeView, flow?: FlowView, generics?: GenericMapper[]) => boolean;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DataType, DataTypeRuleConnection, DataTypeVariant, Maybe, Runtime, Scalars, TranslationConnection } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
export declare class DataTypeView {
|
|
3
|
+
/** Time when this DataType was created */
|
|
4
|
+
private readonly _createdAt?;
|
|
5
|
+
/** Generic keys of the datatype */
|
|
6
|
+
private readonly _genericKeys?;
|
|
7
|
+
/** Global ID of this DataType */
|
|
8
|
+
private readonly _id?;
|
|
9
|
+
/** The identifier scoped to the namespace */
|
|
10
|
+
private readonly _identifier?;
|
|
11
|
+
/** Names of the flow type setting */
|
|
12
|
+
private readonly _name?;
|
|
13
|
+
/** The namespace where this datatype belongs to */
|
|
14
|
+
private readonly _runtime?;
|
|
15
|
+
/** Rules of the datatype */
|
|
16
|
+
private readonly _rules?;
|
|
17
|
+
/** Time when this DataType was last updated */
|
|
18
|
+
private readonly _updatedAt?;
|
|
19
|
+
/** The type of the datatype */
|
|
20
|
+
private readonly _variant?;
|
|
21
|
+
constructor(dataType: DataType);
|
|
22
|
+
get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
23
|
+
get genericKeys(): Maybe<Array<Scalars["String"]["output"]>> | undefined;
|
|
24
|
+
get id(): Maybe<Scalars["DataTypeID"]["output"]> | undefined;
|
|
25
|
+
get identifier(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
26
|
+
get name(): Maybe<TranslationConnection> | undefined;
|
|
27
|
+
get runtime(): Maybe<Runtime> | undefined;
|
|
28
|
+
get rules(): Maybe<DataTypeRuleConnection> | undefined;
|
|
29
|
+
get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
30
|
+
get variant(): Maybe<DataTypeVariant> | undefined;
|
|
31
|
+
get json(): DataType;
|
|
32
|
+
}
|