@code0-tech/pictor 0.0.0-mvp.2 → 0.0.0-mvp.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/compiler-runtime.js +5 -0
- package/dist/_virtual/compiler-runtime2.js +4 -0
- package/dist/_virtual/react-compiler-runtime.development.js +4 -0
- package/dist/_virtual/react-compiler-runtime.production.js +4 -0
- package/dist/assets/components/alert/Alert.style.css +1 -0
- package/dist/assets/components/avatar/Avatar.style.css +1 -0
- package/dist/assets/components/badge/Badge.style.css +1 -0
- package/dist/assets/components/button/Button.style.css +1 -0
- package/dist/assets/components/card/Card.style.css +1 -0
- package/dist/assets/components/command/Command.style.css +1 -0
- package/dist/assets/components/d-flow/DFlow.style.css +1 -0
- package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +1 -0
- package/dist/assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css +1 -0
- package/dist/assets/components/d-flow/input/DFlowInputDataType.style.css +1 -0
- package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +1 -0
- package/dist/assets/components/d-flow/validation/DFlowValidation.style.css +1 -0
- package/dist/assets/components/d-layout/DLayout.style.css +1 -0
- package/dist/assets/components/d-resizable/DResizable.style.css +1 -0
- package/dist/assets/components/dialog/Dialog.style.css +1 -0
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -0
- package/dist/assets/components/form/Input.style.css +1 -0
- package/dist/assets/components/menu/Menu.style.css +1 -0
- package/dist/assets/{ScrollArea.css → components/scroll-area/ScrollArea.style.css} +1 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -0
- package/dist/assets/components/spacing/Spacing.style.css +1 -0
- package/dist/assets/components/tab/Tab.style.css +1 -0
- package/dist/assets/components/text/Text.style.css +1 -0
- package/dist/assets/components/toast/Toast.style.css +1 -0
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -0
- package/dist/assets/{DFlow.css → node_modules/@xyflow/react/dist/style.css} +1 -1
- package/dist/components/alert/Alert.d.ts +7 -0
- package/dist/components/alert/Alert.js +38 -0
- package/dist/components/avatar/Avatar.js +2 -2
- package/dist/components/badge/Badge.js +2 -2
- package/dist/components/breadcrumb/Breadcrumb.js +16 -28
- package/dist/components/button/Button.d.ts +2 -1
- package/dist/components/button/Button.js +23 -20
- package/dist/components/button-group/ButtonGroup.js +6 -5
- package/dist/components/card/Card.d.ts +2 -1
- package/dist/components/card/Card.js +25 -22
- package/dist/components/card/CardSection.d.ts +1 -0
- package/dist/components/card/CardSection.js +18 -12
- package/dist/components/col/Col.js +9 -8
- package/dist/components/command/Command.js +19 -18
- package/dist/components/container/Container.js +12 -11
- package/dist/components/d-flow/DFlow.edges.hook.js +9 -10
- package/dist/components/d-flow/DFlow.js +6 -4
- package/dist/components/d-flow/DFlow.nodes.hook.js +18 -19
- package/dist/components/d-flow/control/DFlowControl.js +50 -46
- package/dist/components/d-flow/data-type/DFlowDataType.service.js +89 -5
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +18 -4
- package/dist/components/d-flow/data-type/index.js +1 -1
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +220 -4
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +227 -4
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +1 -1
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +241 -5
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +8 -6
- package/dist/components/d-flow/edge/DFlowEdge.js +1 -1
- package/dist/components/d-flow/folder/DFlowFolder.js +16 -15
- package/dist/components/d-flow/function/DFlowFunction.return.hook.js +1 -1
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +19 -20
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +56 -56
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +1 -1
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +1 -1
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +72 -76
- package/dist/components/d-flow/index.js +8 -8
- package/dist/components/d-flow/input/DFlowInputDataType.js +201 -201
- package/dist/components/d-flow/minimap/DFlowMiniMap.js +6 -5
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +61 -62
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +9 -8
- package/dist/components/d-flow/tab/DFlowTabs.js +1 -1
- package/dist/components/d-flow/validation/DFlowValidation.js +15 -14
- package/dist/components/d-fullscreen/DFullScreen.d.ts +1 -2
- package/dist/components/d-fullscreen/DFullScreen.js +24 -18
- package/dist/components/d-layout/DLayout.js +27 -26
- package/dist/components/d-license/DNamespaceLicense.service.d.ts +11 -0
- package/dist/components/d-license/DNamespaceLicense.service.js +12 -0
- package/dist/components/d-license/index.d.ts +2 -0
- package/dist/components/d-license/index.js +6 -0
- package/dist/components/d-member/DNamespaceMember.service.d.ts +13 -0
- package/dist/components/d-member/DNamespaceMember.service.js +15 -0
- package/dist/components/{d-namespace/member → d-member}/DNamespaceMember.view.d.ts +4 -1
- package/dist/components/{d-namespace/member → d-member}/DNamespaceMember.view.js +4 -1
- package/dist/components/d-member/index.d.ts +2 -0
- package/dist/components/d-member/index.js +6 -0
- package/dist/components/d-namespace/DNamespace.service.d.ts +1 -1
- package/dist/components/d-namespace/DNamespace.service.js +5 -4
- package/dist/components/d-namespace/index.d.ts +0 -10
- package/dist/components/d-namespace/index.js +4 -33
- package/dist/components/d-organization/DOrganization.service.d.ts +3 -3
- package/dist/components/d-organization/DOrganization.service.js +5 -4
- package/dist/components/d-organization/DOrganization.view.d.ts +4 -1
- package/dist/components/d-organization/DOrganization.view.js +21 -18
- package/dist/components/d-organization/DOrganizationCard.d.ts +3 -3
- package/dist/components/d-organization/DOrganizationCard.js +13 -60
- package/dist/components/d-organization/DOrganizationList.d.ts +11 -0
- package/dist/components/d-organization/DOrganizationList.js +23 -0
- package/dist/components/d-organization/DOrganizatonContent.d.ts +9 -0
- package/dist/components/d-organization/DOrganizatonContent.js +86 -0
- package/dist/components/d-organization/index.d.ts +1 -0
- package/dist/components/d-organization/index.js +15 -10
- package/dist/components/d-project/DNamespaceProject.service.d.ts +12 -0
- package/dist/components/d-project/DNamespaceProject.service.js +12 -0
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProject.view.d.ts +4 -1
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProject.view.js +13 -10
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectCard.d.ts +1 -1
- package/dist/components/d-project/DNamespaceProjectCard.js +15 -0
- package/dist/components/d-project/DNamespaceProjectContent.d.ts +8 -0
- package/dist/components/d-project/DNamespaceProjectContent.js +70 -0
- package/dist/components/d-project/DNamespaceProjectList.d.ts +11 -0
- package/dist/components/d-project/DNamespaceProjectList.js +25 -0
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectMenu.d.ts +1 -1
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectMenu.js +3 -3
- package/dist/components/d-project/index.d.ts +5 -0
- package/dist/components/d-project/index.js +24 -0
- package/dist/components/d-resizable/DResizable.js +17 -16
- package/dist/components/d-role/DNamespaceRole.service.d.ts +13 -0
- package/dist/components/d-role/DNamespaceRole.service.js +12 -0
- package/dist/components/d-role/index.d.ts +2 -0
- package/dist/components/d-role/index.js +6 -0
- package/dist/components/d-runtime/DRuntime.service.d.ts +5 -2
- package/dist/components/d-runtime/DRuntime.service.js +0 -2
- package/dist/components/d-runtime/DRuntime.view.d.ts +4 -1
- package/dist/components/d-runtime/DRuntime.view.js +6 -3
- package/dist/components/d-runtime/DRuntimeCard.d.ts +7 -0
- package/dist/components/d-runtime/DRuntimeCard.js +17 -0
- package/dist/components/d-runtime/DRuntimeContent.d.ts +7 -0
- package/dist/components/d-runtime/DRuntimeContent.js +40 -0
- package/dist/components/d-runtime/DRuntimeList.d.ts +10 -0
- package/dist/components/d-runtime/DRuntimeList.js +22 -0
- package/dist/components/d-runtime/index.d.ts +2 -0
- package/dist/components/d-runtime/index.js +6 -2
- package/dist/components/d-user/DUser.service.d.ts +1 -3
- package/dist/components/d-user/DUser.service.js +3 -9
- package/dist/components/d-user/DUser.session.hook.d.ts +3 -0
- package/dist/components/d-user/DUser.session.hook.js +16 -0
- package/dist/components/d-user/DUser.view.d.ts +4 -1
- package/dist/components/d-user/DUser.view.js +13 -10
- package/dist/components/d-user/DUserCard.d.ts +7 -0
- package/dist/components/d-user/DUserCard.js +15 -0
- package/dist/components/d-user/DUserContent.d.ts +7 -0
- package/dist/components/d-user/DUserContent.js +84 -0
- package/dist/components/d-user/DUserList.d.ts +10 -0
- package/dist/components/d-user/DUserList.js +22 -0
- package/dist/components/d-user/DUserMenu.js +19 -19
- package/dist/components/d-user/index.d.ts +3 -0
- package/dist/components/d-user/index.js +15 -8
- package/dist/components/dialog/Dialog.js +18 -17
- package/dist/components/file-tabs/FileTabs.js +41 -40
- package/dist/components/flex/Flex.js +2 -2
- package/dist/components/form/CheckboxInput.js +2 -2
- package/dist/components/form/Input.js +1 -1
- package/dist/components/form/InputDescription.js +1 -1
- package/dist/components/form/InputLabel.js +1 -1
- package/dist/components/form/InputMessage.js +1 -1
- package/dist/components/form/InputSuggestion.js +1 -1
- package/dist/components/form/PinInput.js +2 -2
- package/dist/components/form/RadioGroup.js +2 -2
- package/dist/components/form/RadioInput.js +2 -2
- package/dist/components/form/useForm.d.ts +2 -1
- package/dist/components/form/useForm.js +66 -32
- package/dist/components/menu/Menu.js +2 -2
- package/dist/components/quote/Quote.js +32 -36
- package/dist/components/row/Row.js +10 -9
- package/dist/components/scroll-area/ScrollArea.js +18 -17
- package/dist/components/segmented-control/SegmentedControl.js +12 -11
- package/dist/components/spacing/Spacing.d.ts +6 -0
- package/dist/components/spacing/Spacing.js +23 -0
- package/dist/components/tab/Tab.d.ts +11 -0
- package/dist/components/tab/Tab.js +40 -0
- package/dist/components/text/Text.js +2 -2
- package/dist/components/toast/Toast.d.ts +13 -0
- package/dist/components/toast/Toast.js +62 -0
- package/dist/components/tooltip/Tooltip.js +10 -9
- package/dist/index.d.ts +8 -0
- package/dist/index.js +238 -210
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +14 -0
- package/dist/node_modules/react/compiler-runtime.js +10 -0
- package/dist/utils/arrayService.d.ts +2 -2
- package/dist/utils/contextStore.js +1 -1
- package/dist/utils/generics.js +88 -89
- package/dist/utils/reactiveArrayService.d.ts +3 -3
- package/dist/utils/reactiveArrayService.js +52 -42
- package/dist/utils/types.d.ts +2 -2
- package/package.json +31 -30
- package/dist/DFlowDataType.service-Dz8pQUeO.js +0 -793
- package/dist/assets/Avatar.css +0 -1
- package/dist/assets/Badge.css +0 -1
- package/dist/assets/Button.css +0 -1
- package/dist/assets/Card.css +0 -1
- package/dist/assets/Command.css +0 -1
- package/dist/assets/DFlowFolder.css +0 -1
- package/dist/assets/DFlowFunctionDefaultCard.css +0 -1
- package/dist/assets/DFlowInputDataType.css +0 -1
- package/dist/assets/DFlowMiniMap.css +0 -1
- package/dist/assets/DFlowValidation.css +0 -1
- package/dist/assets/DLayout.css +0 -1
- package/dist/assets/DResizable.css +0 -1
- package/dist/assets/Dialog.css +0 -1
- package/dist/assets/FileTabs.css +0 -1
- package/dist/assets/Input.css +0 -1
- package/dist/assets/Menu.css +0 -1
- package/dist/assets/SegmentedControl.css +0 -1
- package/dist/assets/Text.css +0 -1
- package/dist/assets/Tooltip.css +0 -1
- package/dist/compiler-runtime-BNHg76kC.js +0 -36
- package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +0 -8
- package/dist/components/d-namespace/license/DNamespaceLicense.service.js +0 -11
- package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +0 -9
- package/dist/components/d-namespace/member/DNamespaceMember.service.js +0 -11
- package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +0 -9
- package/dist/components/d-namespace/project/DNamespaceProject.service.js +0 -11
- package/dist/components/d-namespace/project/DNamespaceProjectCard.js +0 -57
- package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +0 -10
- package/dist/components/d-namespace/role/DNamespaceRole.service.js +0 -11
- /package/dist/assets/{Breadcrumb.css → components/breadcrumb/Breadcrumb.style.css} +0 -0
- /package/dist/assets/{ButtonGroup.css → components/button-group/ButtonGroup.style.css} +0 -0
- /package/dist/assets/{Col.css → components/col/Col.style.css} +0 -0
- /package/dist/assets/{Container.css → components/container/Container.style.css} +0 -0
- /package/dist/assets/{DFlowSuggestionSearchInput.css → components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css} +0 -0
- /package/dist/assets/{DFullScreen.css → components/d-fullscreen/DFullScreen.style.css} +0 -0
- /package/dist/assets/{Flex.css → components/flex/Flex.style.css} +0 -0
- /package/dist/assets/{Quote.css → components/quote/Quote.style.css} +0 -0
- /package/dist/assets/{Row.css → components/row/Row.style.css} +0 -0
- /package/dist/components/{d-namespace/license → d-license}/DNamespaceLicense.view.d.ts +0 -0
- /package/dist/components/{d-namespace/license → d-license}/DNamespaceLicense.view.js +0 -0
- /package/dist/components/{d-namespace/role → d-role}/DNamespaceRole.view.d.ts +0 -0
- /package/dist/components/{d-namespace/role → d-role}/DNamespaceRole.view.js +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { c as g } from "../../compiler-runtime
|
|
2
|
+
import { c as g } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import '../../assets/components/col/Col.style.css';/* empty css */
|
|
3
4
|
import { mergeCode0Props as p } from "../../utils/utils.js";
|
|
4
|
-
|
|
5
|
+
const j = (c) => {
|
|
5
6
|
const l = g.c(6);
|
|
6
|
-
let o,
|
|
7
|
+
let o, t;
|
|
7
8
|
if (l[0] !== c) {
|
|
8
9
|
const {
|
|
9
10
|
children: n,
|
|
@@ -15,12 +16,12 @@ import '../../assets/Col.css';const C = (c) => {
|
|
|
15
16
|
xxl: x,
|
|
16
17
|
...d
|
|
17
18
|
} = c;
|
|
18
|
-
o = n,
|
|
19
|
+
o = n, t = p(`col ${r ? `col-xs-${r}` : ""} ${m ? `col-sm-${m}` : ""} ${$ ? `col-md-${$}` : ""} ${s ? `col-lg-${s}` : ""} ${i ? `col-lg-${i}` : ""} ${x ? `col-xxl-${x}` : ""}`, d), l[0] = c, l[1] = o, l[2] = t;
|
|
19
20
|
} else
|
|
20
|
-
o = l[1],
|
|
21
|
-
let
|
|
22
|
-
return l[3] !== o || l[4] !==
|
|
21
|
+
o = l[1], t = l[2];
|
|
22
|
+
let e;
|
|
23
|
+
return l[3] !== o || l[4] !== t ? (e = /* @__PURE__ */ f("div", { ...t, children: o }), l[3] = o, l[4] = t, l[5] = e) : e = l[5], e;
|
|
23
24
|
};
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
+
j as Col
|
|
26
27
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { c as a } from "../../compiler-runtime
|
|
2
|
+
import { c as a } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import { Command as s } from "cmdk";
|
|
4
4
|
import { mergeCode0Props as d } from "../../utils/utils.js";
|
|
5
5
|
import { DialogContent as g, Dialog as h } from "../dialog/Dialog.js";
|
|
6
|
+
import '../../assets/components/command/Command.style.css';/* empty css */
|
|
6
7
|
import { Badge as _ } from "../badge/Badge.js";
|
|
7
8
|
import { TextInput as $ } from "../form/TextInput.js";
|
|
8
|
-
|
|
9
|
+
const P = (e) => {
|
|
9
10
|
const t = a.c(4);
|
|
10
11
|
let n;
|
|
11
12
|
t[0] !== e ? (n = d("command", e), t[0] = e, t[1] = n) : n = t[1];
|
|
12
13
|
const o = n;
|
|
13
14
|
let l;
|
|
14
15
|
return t[2] !== o ? (l = /* @__PURE__ */ m(s, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
|
|
15
|
-
},
|
|
16
|
+
}, G = (e) => {
|
|
16
17
|
const t = a.c(14), n = e.dialogProps, o = e.open, l = e.onOpenChange;
|
|
17
18
|
let c;
|
|
18
19
|
t[0] !== e.contentProps ? (c = e.contentProps ?? {}, t[0] = e.contentProps, t[1] = c) : c = t[1];
|
|
@@ -25,14 +26,14 @@ import '../../assets/Command.css';const P = (e) => {
|
|
|
25
26
|
t[6] !== u || t[7] !== f ? (r = /* @__PURE__ */ m(g, { ...u, children: f }), t[6] = u, t[7] = f, t[8] = r) : r = t[8];
|
|
26
27
|
let C;
|
|
27
28
|
return t[9] !== e.dialogProps || t[10] !== e.onOpenChange || t[11] !== e.open || t[12] !== r ? (C = /* @__PURE__ */ m(h, { ...n, open: o, onOpenChange: l, children: r }), t[9] = e.dialogProps, t[10] = e.onOpenChange, t[11] = e.open, t[12] = r, t[13] = C) : C = t[13], C;
|
|
28
|
-
},
|
|
29
|
+
}, L = (e) => {
|
|
29
30
|
const t = a.c(4);
|
|
30
31
|
let n;
|
|
31
32
|
t[0] !== e ? (n = d("command__list", e), t[0] = e, t[1] = n) : n = t[1];
|
|
32
33
|
const o = n;
|
|
33
34
|
let l;
|
|
34
35
|
return t[2] !== o ? (l = /* @__PURE__ */ m(s.List, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
|
|
35
|
-
},
|
|
36
|
+
}, j = (e) => {
|
|
36
37
|
const t = a.c(12);
|
|
37
38
|
let n;
|
|
38
39
|
t[0] !== e.value ? (n = e.value?.toString(), t[0] = e.value, t[1] = n) : n = t[1];
|
|
@@ -53,35 +54,35 @@ import '../../assets/Command.css';const P = (e) => {
|
|
|
53
54
|
t[6] !== l ? (c = /* @__PURE__ */ m($, { ...l }), t[6] = l, t[7] = c) : c = t[7];
|
|
54
55
|
let i;
|
|
55
56
|
return t[8] !== n || t[9] !== o || t[10] !== c ? (i = /* @__PURE__ */ m(s.Input, { value: n, onValueChange: o, asChild: !0, children: c }), t[8] = n, t[9] = o, t[10] = c, t[11] = i) : i = t[11], i;
|
|
56
|
-
},
|
|
57
|
+
}, B = (e) => {
|
|
57
58
|
const t = a.c(4);
|
|
58
59
|
let n;
|
|
59
60
|
t[0] !== e ? (n = d("command__empty", e), t[0] = e, t[1] = n) : n = t[1];
|
|
60
61
|
const o = n;
|
|
61
62
|
let l;
|
|
62
63
|
return t[2] !== o ? (l = /* @__PURE__ */ m(s.Empty, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
|
|
63
|
-
},
|
|
64
|
+
}, R = (e) => {
|
|
64
65
|
const t = a.c(4);
|
|
65
66
|
let n;
|
|
66
67
|
t[0] !== e ? (n = d("command__group", e), t[0] = e, t[1] = n) : n = t[1];
|
|
67
68
|
const o = n;
|
|
68
69
|
let l;
|
|
69
70
|
return t[2] !== o ? (l = /* @__PURE__ */ m(s.Group, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
|
|
70
|
-
},
|
|
71
|
+
}, T = (e) => {
|
|
71
72
|
const t = a.c(4);
|
|
72
73
|
let n;
|
|
73
74
|
t[0] !== e ? (n = d("command__item", e), t[0] = e, t[1] = n) : n = t[1];
|
|
74
75
|
const o = n;
|
|
75
76
|
let l;
|
|
76
77
|
return t[2] !== o ? (l = /* @__PURE__ */ m(s.Item, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
|
|
77
|
-
},
|
|
78
|
+
}, V = (e) => {
|
|
78
79
|
const t = a.c(4);
|
|
79
80
|
let n;
|
|
80
81
|
t[0] !== e ? (n = d("command__separator", e), t[0] = e, t[1] = n) : n = t[1];
|
|
81
82
|
const o = n;
|
|
82
83
|
let l;
|
|
83
84
|
return t[2] !== o ? (l = /* @__PURE__ */ m(s.Separator, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
|
|
84
|
-
},
|
|
85
|
+
}, b = (e) => {
|
|
85
86
|
const t = a.c(5);
|
|
86
87
|
let n;
|
|
87
88
|
t[0] !== e ? (n = d("command__shortcut", e), t[0] = e, t[1] = n) : n = t[1];
|
|
@@ -91,12 +92,12 @@ import '../../assets/Command.css';const P = (e) => {
|
|
|
91
92
|
};
|
|
92
93
|
export {
|
|
93
94
|
P as Command,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
G as CommandDialog,
|
|
96
|
+
B as CommandEmpty,
|
|
97
|
+
R as CommandGroup,
|
|
98
|
+
j as CommandInput,
|
|
99
|
+
T as CommandItem,
|
|
100
|
+
L as CommandList,
|
|
101
|
+
V as CommandSeparator,
|
|
102
|
+
b as CommandShortcut
|
|
102
103
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as l } from "../../compiler-runtime
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as l } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import '../../assets/components/container/Container.style.css';/* empty css */
|
|
3
4
|
import { mergeCode0Props as s } from "../../utils/utils.js";
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
let
|
|
7
|
-
if (
|
|
5
|
+
const x = (i) => {
|
|
6
|
+
const t = l.c(6);
|
|
7
|
+
let e, r;
|
|
8
|
+
if (t[0] !== i) {
|
|
8
9
|
const {
|
|
9
10
|
children: n,
|
|
10
|
-
...
|
|
11
|
+
...m
|
|
11
12
|
} = i;
|
|
12
|
-
|
|
13
|
+
e = n, r = s("container", m), t[0] = i, t[1] = e, t[2] = r;
|
|
13
14
|
} else
|
|
14
|
-
|
|
15
|
+
e = t[1], r = t[2];
|
|
15
16
|
let o;
|
|
16
|
-
return
|
|
17
|
+
return t[3] !== e || t[4] !== r ? (o = /* @__PURE__ */ c("div", { ...r, children: e }), t[3] = e, t[4] = r, t[5] = o) : o = t[5], o;
|
|
17
18
|
};
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
x as Container
|
|
20
21
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { useService as
|
|
1
|
+
import { useService as S, useStore as D } from "../../utils/contextStore.js";
|
|
2
2
|
import { DFlowReactiveService as v } from "./DFlow.service.js";
|
|
3
3
|
import { NodeFunctionView as w } from "./DFlow.view.js";
|
|
4
|
-
import { DFlowFunctionReactiveService as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { DataTypeVariant as W } from "@code0-tech/sagittarius-graphql-types";
|
|
4
|
+
import { DFlowFunctionReactiveService as N } from "./function/DFlowFunction.service.js";
|
|
5
|
+
import { DFlowDataTypeReactiveService as y } from "./data-type/DFlowDataType.service.js";
|
|
6
|
+
import O from "react";
|
|
8
7
|
const s = [
|
|
9
8
|
"#70ffb2",
|
|
10
9
|
// 0 – Primary (Grün)
|
|
@@ -22,8 +21,8 @@ const s = [
|
|
|
22
21
|
// 6 – Orange-Rot
|
|
23
22
|
"#fff170"
|
|
24
23
|
// 7 – Gelb
|
|
25
|
-
],
|
|
26
|
-
const
|
|
24
|
+
], k = (I) => {
|
|
25
|
+
const T = S(v), x = S(N), E = S(y), c = T.getById(I), F = D(v), B = D(N), P = D(y);
|
|
27
26
|
if (!c) return [];
|
|
28
27
|
const n = [], d = /* @__PURE__ */ new Map();
|
|
29
28
|
let m = 0;
|
|
@@ -72,7 +71,7 @@ const s = [
|
|
|
72
71
|
if (o.parameters?.forEach((t) => {
|
|
73
72
|
const r = t.value, l = R(o.functionDefinition?.id, g)?.parameterDefinitions?.find((f) => f.id === t.id), $ = l?.dataTypeIdentifier, G = $ ? M($, p) : void 0;
|
|
74
73
|
if (r) {
|
|
75
|
-
if (G?.variant ===
|
|
74
|
+
if (G?.variant === "NODE") {
|
|
76
75
|
const f = `${e}-group-${m++}`;
|
|
77
76
|
n.push({
|
|
78
77
|
id: `${e}-${f}-param-${t.id}`,
|
|
@@ -137,9 +136,9 @@ const s = [
|
|
|
137
136
|
}
|
|
138
137
|
return e;
|
|
139
138
|
};
|
|
140
|
-
return c.startingNodeId && u(c.getNodeById(c.startingNodeId), void 0, 0, b, h),
|
|
139
|
+
return c.startingNodeId && u(c.getNodeById(c.startingNodeId), void 0, 0, b, h), O.useMemo(() => n, [F, B, P, n]);
|
|
141
140
|
};
|
|
142
141
|
export {
|
|
143
142
|
s as FLOW_EDGE_RAINBOW,
|
|
144
|
-
|
|
143
|
+
k as useFlowEdges
|
|
145
144
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { jsx as K } from "react/jsx-runtime";
|
|
2
|
-
import { c as U } from "../../compiler-runtime
|
|
2
|
+
import { c as U } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import { ReactFlowProvider as $, useNodesState as J, useEdgesState as Q, useUpdateNodeInternals as Z, ReactFlow as tt } from "@xyflow/react";
|
|
4
4
|
import G from "react";
|
|
5
5
|
import { mergeCode0Props as et } from "../../utils/utils.js";
|
|
6
|
+
import '../../assets/components/d-flow/DFlow.style.css';import '../../assets/node_modules/@xyflow/react/dist/style.css';/* empty css */
|
|
7
|
+
/* empty css */
|
|
6
8
|
import { DFlowFunctionDefaultCard as ot } from "./function/DFlowFunctionDefaultCard.js";
|
|
7
9
|
import { DFlowFunctionGroupCard as st } from "./function/DFlowFunctionGroupCard.js";
|
|
8
10
|
import { DFlowFunctionSuggestionCard as nt } from "./function/DFlowFunctionSuggestionCard.js";
|
|
9
11
|
import { DFlowFunctionTriggerCard as it } from "./function/DFlowFunctionTriggerCard.js";
|
|
10
12
|
import { DFlowEdge as rt } from "./edge/DFlowEdge.js";
|
|
11
|
-
|
|
13
|
+
const at = (y, C) => {
|
|
12
14
|
if (!C || C.size === 0)
|
|
13
15
|
return {
|
|
14
16
|
nodes: y
|
|
@@ -319,7 +321,7 @@ import '../../assets/DFlow.css';const at = (y, C) => {
|
|
|
319
321
|
return {
|
|
320
322
|
nodes: f
|
|
321
323
|
};
|
|
322
|
-
}, q = G.cache(at),
|
|
324
|
+
}, q = G.cache(at), bt = (y) => {
|
|
323
325
|
const C = U.c(2);
|
|
324
326
|
let m;
|
|
325
327
|
return C[0] !== y ? (m = /* @__PURE__ */ K($, { children: /* @__PURE__ */ K(dt, { ...y }) }), C[0] = y, C[1] = m) : m = C[1], m;
|
|
@@ -369,5 +371,5 @@ import '../../assets/DFlow.css';const at = (y, C) => {
|
|
|
369
371
|
}, [y.nodes, y.edges, F]), /* @__PURE__ */ K(tt, { onlyRenderVisibleElements: !0, panOnScroll: !1, nodeTypes: f, edgeTypes: L, onInit: (M) => M.fitView(), onNodesChange: W, onEdgesChange: z, ...et("flow", y), nodes: C, edges: Y });
|
|
370
372
|
};
|
|
371
373
|
export {
|
|
372
|
-
|
|
374
|
+
bt as DFlow
|
|
373
375
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { useService as
|
|
1
|
+
import { useService as F } from "../../utils/contextStore.js";
|
|
2
2
|
import { DFlowReactiveService as A } from "./DFlow.service.js";
|
|
3
3
|
import { NodeFunctionView as $ } from "./DFlow.view.js";
|
|
4
4
|
import { DFlowFunctionReactiveService as M } from "./function/DFlowFunction.service.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const E = /* @__PURE__ */ new Map([["std", "default"]]), K = (s, x) => {
|
|
5
|
+
import { DFlowDataTypeReactiveService as E } from "./data-type/DFlowDataType.service.js";
|
|
6
|
+
const R = /* @__PURE__ */ new Map([["std", "default"]]), K = (s, x) => {
|
|
8
7
|
if (!x || s.size === 0) return "";
|
|
9
8
|
const f = /[:._\-\/\s]+/, d = x.trim().toLowerCase();
|
|
10
9
|
let t = null, i = -1 / 0;
|
|
@@ -24,22 +23,22 @@ const E = /* @__PURE__ */ new Map([["std", "default"]]), K = (s, x) => {
|
|
|
24
23
|
r++;
|
|
25
24
|
if (r > 0) {
|
|
26
25
|
a = 1e3 + r;
|
|
27
|
-
const h = d.charAt(r),
|
|
28
|
-
(h === "" || f.test(h) ||
|
|
26
|
+
const h = d.charAt(r), I = n.charAt(r);
|
|
27
|
+
(h === "" || f.test(h) || I === "" || f.test(I)) && (a += 50);
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
a > i ? (i = a, t = l) : (a === i && t !== null && l.length > t.length || a === i && t === null) && (t = l);
|
|
32
31
|
}
|
|
33
32
|
return t !== null ? s.get(t) : "";
|
|
34
|
-
},
|
|
35
|
-
const x =
|
|
33
|
+
}, q = (s) => {
|
|
34
|
+
const x = F(A), f = F(M), d = F(E), t = x.getById(s);
|
|
36
35
|
if (!t) return [];
|
|
37
36
|
const i = [];
|
|
38
37
|
let l = 0;
|
|
39
38
|
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
39
|
let r = 0;
|
|
41
40
|
const h = () => ++r;
|
|
42
|
-
let
|
|
41
|
+
let I = 0;
|
|
43
42
|
i.push({
|
|
44
43
|
id: `${t.id}`,
|
|
45
44
|
type: "trigger",
|
|
@@ -53,11 +52,11 @@ const E = /* @__PURE__ */ new Map([["std", "default"]]), K = (s, x) => {
|
|
|
53
52
|
flowId: s
|
|
54
53
|
}
|
|
55
54
|
});
|
|
56
|
-
const
|
|
57
|
-
const p = `${e.id}-${l++}`, C = ++
|
|
55
|
+
const m = (e, o = !1, B, y = 0, D = [0], c, N = v, S = n) => {
|
|
56
|
+
const p = `${e.id}-${l++}`, C = ++I;
|
|
58
57
|
i.push({
|
|
59
58
|
id: p,
|
|
60
|
-
type: K(
|
|
59
|
+
type: K(R, e.functionDefinition?.identifier),
|
|
61
60
|
position: {
|
|
62
61
|
x: 0,
|
|
63
62
|
y: 0
|
|
@@ -94,8 +93,8 @@ const E = /* @__PURE__ */ new Map([["std", "default"]]), K = (s, x) => {
|
|
|
94
93
|
});
|
|
95
94
|
const k = a(e.functionDefinition?.id, N);
|
|
96
95
|
e.parameters?.forEach((g) => {
|
|
97
|
-
const
|
|
98
|
-
if ((
|
|
96
|
+
const T = k?.parameterDefinitions.find((b) => b.id == g.runtimeParameter?.id)?.dataTypeIdentifier;
|
|
97
|
+
if ((T ? u(T, S) : void 0)?.variant === "NODE") {
|
|
99
98
|
if (g.value && g.value instanceof $) {
|
|
100
99
|
const b = `${p}-group-${l++}`, w = [...D, h()];
|
|
101
100
|
i.push({
|
|
@@ -115,12 +114,12 @@ const E = /* @__PURE__ */ new Map([["std", "default"]]), K = (s, x) => {
|
|
|
115
114
|
depth: y + 1,
|
|
116
115
|
scope: w
|
|
117
116
|
}
|
|
118
|
-
}),
|
|
117
|
+
}), m(g.value, !1, void 0, y + 1, w, b, N, S);
|
|
119
118
|
}
|
|
120
|
-
} else g.value && g.value instanceof $ &&
|
|
121
|
-
}), e.nextNodeId &&
|
|
119
|
+
} else g.value && g.value instanceof $ && m(g.value, !0, p, y, D, c, N, S);
|
|
120
|
+
}), e.nextNodeId && m(t.getNodeById(e.nextNodeId), !1, void 0, y, D, c, N, S);
|
|
122
121
|
};
|
|
123
|
-
return t.startingNodeId ?
|
|
122
|
+
return t.startingNodeId ? m(t.getNodeById(t.startingNodeId), !1, void 0, 0, [0], void 0, v, n) : i.push({
|
|
124
123
|
id: `${t.id}-suggestion`,
|
|
125
124
|
type: "suggestion",
|
|
126
125
|
position: {
|
|
@@ -136,5 +135,5 @@ const E = /* @__PURE__ */ new Map([["std", "default"]]), K = (s, x) => {
|
|
|
136
135
|
}), i;
|
|
137
136
|
};
|
|
138
137
|
export {
|
|
139
|
-
|
|
138
|
+
q as useFlowNodes
|
|
140
139
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { useViewport as
|
|
4
|
-
import { ButtonGroup as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { IconPlus as
|
|
7
|
-
import { Badge as
|
|
8
|
-
import { Flex as
|
|
9
|
-
const
|
|
10
|
-
const e =
|
|
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;
|
|
1
|
+
import { jsx as o, jsxs as B } from "react/jsx-runtime";
|
|
2
|
+
import { c as D } from "../../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { useViewport as M, useReactFlow as O, Panel as R } from "@xyflow/react";
|
|
4
|
+
import { ButtonGroup as V } from "../../button-group/ButtonGroup.js";
|
|
5
|
+
import { Button as P } from "../../button/Button.js";
|
|
6
|
+
import { IconPlus as v, IconMinus as E, IconFocusCentered as G } from "@tabler/icons-react";
|
|
7
|
+
import { Badge as Z } from "../../badge/Badge.js";
|
|
8
|
+
import { Flex as j } from "../../flex/Flex.js";
|
|
9
|
+
const Q = () => {
|
|
10
|
+
const e = D.c(37), w = M(), t = O();
|
|
16
11
|
let d;
|
|
17
|
-
e[
|
|
12
|
+
e[0] !== t ? (d = () => {
|
|
13
|
+
t.zoomIn();
|
|
14
|
+
}, e[0] = t, e[1] = d) : d = e[1];
|
|
15
|
+
const C = d;
|
|
16
|
+
let p;
|
|
17
|
+
e[2] !== t ? (p = () => {
|
|
18
18
|
t.zoomOut();
|
|
19
|
-
}, e[2] = t, e[3] =
|
|
20
|
-
const
|
|
19
|
+
}, e[2] = t, e[3] = p) : p = e[3];
|
|
20
|
+
const I = p;
|
|
21
21
|
let h;
|
|
22
22
|
e[4] !== t ? (h = () => {
|
|
23
23
|
t.fitView();
|
|
24
24
|
}, e[4] = t, e[5] = h) : h = e[5];
|
|
25
25
|
const F = h;
|
|
26
26
|
let u;
|
|
27
|
-
e[6] !==
|
|
28
|
-
const
|
|
27
|
+
e[6] !== w.zoom ? (u = () => Math.round(w.zoom * 100), e[6] = w.zoom, e[7] = u) : u = e[7];
|
|
28
|
+
const k = u;
|
|
29
29
|
let y;
|
|
30
30
|
e[8] === Symbol.for("react.memo_cache_sentinel") ? (y = {
|
|
31
31
|
flexDirection: "column",
|
|
@@ -33,45 +33,49 @@ const N = () => {
|
|
|
33
33
|
}, e[8] = y) : y = e[8];
|
|
34
34
|
let z;
|
|
35
35
|
e[9] === Symbol.for("react.memo_cache_sentinel") ? (z = {
|
|
36
|
-
gap: ".
|
|
36
|
+
gap: ".7rem"
|
|
37
37
|
}, e[9] = z) : z = e[9];
|
|
38
38
|
let l;
|
|
39
|
-
e[10] !==
|
|
40
|
-
let
|
|
41
|
-
e[12] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
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];
|
|
39
|
+
e[10] !== C ? (l = () => C(), e[10] = C, e[11] = l) : l = e[11];
|
|
40
|
+
let x;
|
|
41
|
+
e[12] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ o(v, { size: 15 }), e[12] = x) : x = e[12];
|
|
44
42
|
let i;
|
|
45
|
-
e[
|
|
46
|
-
let
|
|
47
|
-
e[
|
|
48
|
-
let
|
|
49
|
-
e[
|
|
43
|
+
e[13] !== l ? (i = /* @__PURE__ */ o(P, { paddingSize: "xxs", color: "secondary", onClick: l, children: x }), e[13] = l, e[14] = i) : i = e[14];
|
|
44
|
+
let r;
|
|
45
|
+
e[15] !== I ? (r = () => I(), e[15] = I, e[16] = r) : r = e[16];
|
|
46
|
+
let _;
|
|
47
|
+
e[17] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ o(E, { size: 15 }), e[17] = _) : _ = e[17];
|
|
50
48
|
let n;
|
|
51
|
-
e[
|
|
52
|
-
let
|
|
53
|
-
e[
|
|
49
|
+
e[18] !== r ? (n = /* @__PURE__ */ o(P, { paddingSize: "xxs", color: "secondary", onClick: r, children: _ }), e[18] = r, e[19] = n) : n = e[19];
|
|
50
|
+
let c;
|
|
51
|
+
e[20] !== F ? (c = () => F(), e[20] = F, e[21] = c) : c = e[21];
|
|
52
|
+
let S;
|
|
53
|
+
e[22] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ o(G, { size: 15 }), e[22] = S) : S = e[22];
|
|
54
54
|
let s;
|
|
55
|
-
e[23] !==
|
|
55
|
+
e[23] !== c ? (s = /* @__PURE__ */ o(P, { paddingSize: "xxs", color: "secondary", onClick: c, children: S }), e[23] = c, e[24] = s) : s = e[24];
|
|
56
56
|
let m;
|
|
57
|
-
e[25] !==
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
e[25] !== n || e[26] !== s || e[27] !== i ? (m = /* @__PURE__ */ B(V, { children: [
|
|
58
|
+
i,
|
|
59
|
+
n,
|
|
60
60
|
s
|
|
61
|
-
] }), e[25] =
|
|
61
|
+
] }), e[25] = n, e[26] = s, e[27] = i, e[28] = m) : m = e[28];
|
|
62
|
+
let b;
|
|
63
|
+
e[29] === Symbol.for("react.memo_cache_sentinel") ? (b = {
|
|
64
|
+
border: "none"
|
|
65
|
+
}, e[29] = b) : b = e[29];
|
|
62
66
|
let f;
|
|
63
|
-
e[
|
|
67
|
+
e[30] !== k ? (f = k(), e[30] = k, e[31] = f) : f = e[31];
|
|
64
68
|
let a;
|
|
65
|
-
e[
|
|
69
|
+
e[32] !== f ? (a = /* @__PURE__ */ B(Z, { color: "primary", style: b, children: [
|
|
66
70
|
f,
|
|
67
71
|
"%"
|
|
68
|
-
] }), e[
|
|
69
|
-
let
|
|
70
|
-
return e[
|
|
72
|
+
] }), e[32] = f, e[33] = a) : a = e[33];
|
|
73
|
+
let g;
|
|
74
|
+
return e[34] !== m || e[35] !== a ? (g = /* @__PURE__ */ o(R, { position: "bottom-left", children: /* @__PURE__ */ o(j, { style: y, children: /* @__PURE__ */ B(j, { align: "stretch", style: z, children: [
|
|
71
75
|
m,
|
|
72
76
|
a
|
|
73
|
-
] }) }) }), e[
|
|
77
|
+
] }) }) }), e[34] = m, e[35] = a, e[36] = g) : g = e[36], g;
|
|
74
78
|
};
|
|
75
79
|
export {
|
|
76
|
-
|
|
80
|
+
Q as DFlowControl
|
|
77
81
|
};
|
|
@@ -1,7 +1,91 @@
|
|
|
1
|
-
import "../../../utils/reactiveArrayService.js";
|
|
2
|
-
import "../../../utils/generics.js";
|
|
3
|
-
import "
|
|
4
|
-
|
|
1
|
+
import { ReactiveArrayService as s } from "../../../utils/reactiveArrayService.js";
|
|
2
|
+
import { resolveType as y } from "../../../utils/generics.js";
|
|
3
|
+
import { useValidateValue as f } from "./DFlowDataType.validation.value.js";
|
|
4
|
+
class l extends s {
|
|
5
|
+
//TODO: remove string because of sagittarius types update
|
|
6
|
+
getDataType(e) {
|
|
7
|
+
if (!e || e.genericKey) return;
|
|
8
|
+
const i = e.dataType?.identifier ?? e.genericType?.dataType?.identifier, t = e.dataType?.id ?? e.genericType?.dataType?.id;
|
|
9
|
+
return this.values().find((r) => r.identifier == i || r.id == t);
|
|
10
|
+
}
|
|
11
|
+
getDataTypeFromValue(e, i) {
|
|
12
|
+
if (!e) return;
|
|
13
|
+
if (e.__typename == "LiteralValue") {
|
|
14
|
+
if (Array.isArray(e.value) && Array.from(e.value).length > 0) return this.getDataType({
|
|
15
|
+
dataType: {
|
|
16
|
+
identifier: "ARRAY"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
if (typeof e.value == "string") return this.getDataType({
|
|
20
|
+
dataType: {
|
|
21
|
+
identifier: "TEXT"
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
if (typeof e.value == "number") return this.getDataType({
|
|
25
|
+
dataType: {
|
|
26
|
+
identifier: "NUMBER"
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
if (typeof e.value == "boolean") return this.getDataType({
|
|
30
|
+
dataType: {
|
|
31
|
+
identifier: "BOOLEAN"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const t = this.values().filter((r) => r.identifier === "OBJECT" || e.__typename === "NodeFunction" && (r.variant != "NODE" || !i) ? !1 : f(e, r, i));
|
|
36
|
+
return t[t.length - 1];
|
|
37
|
+
}
|
|
38
|
+
getTypeFromValue(e, i) {
|
|
39
|
+
if (!e) return;
|
|
40
|
+
if (e.__typename === "ReferenceValue") return e.dataTypeIdentifier;
|
|
41
|
+
const t = this.getDataTypeFromValue(e, i);
|
|
42
|
+
if ((t?.genericKeys?.length ?? 0) <= 0 || !t?.genericKeys) return {
|
|
43
|
+
dataType: {
|
|
44
|
+
id: t?.id
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const r = t.genericKeys.map((a) => {
|
|
48
|
+
const n = t.rules?.nodes?.find((d) => "dataTypeIdentifier" in (d?.config ?? {}) && d?.config?.dataTypeIdentifier?.genericKey == a || "inputTypes" in (d?.config ?? {}) && d.config.inputTypes?.some((p) => p.dataTypeIdentifier?.genericKey == a));
|
|
49
|
+
return n && n.variant == "CONTAINS_TYPE" && "value" in e && e?.value && t.variant === "ARRAY" ? {
|
|
50
|
+
sourceDataTypeIdentifiers: [this.getTypeFromValue({
|
|
51
|
+
__typename: "LiteralValue",
|
|
52
|
+
value: e.value[0]
|
|
53
|
+
}, i)],
|
|
54
|
+
target: a
|
|
55
|
+
} : n && n.variant == "CONTAINS_KEY" && "value" in e && e?.value && t.variant === "OBJECT" ? {
|
|
56
|
+
sourceDataTypeIdentifiers: [this.getTypeFromValue({
|
|
57
|
+
__typename: "LiteralValue",
|
|
58
|
+
/* @ts-ignore */
|
|
59
|
+
value: e.value[n.config?.key ?? ""]
|
|
60
|
+
}, i)],
|
|
61
|
+
target: a
|
|
62
|
+
} : n && n.variant == "RETURN_TYPE" && t.variant === "NODE" ? {
|
|
63
|
+
sourceDataTypeIdentifiers: [this.getTypeFromValue(e, i)],
|
|
64
|
+
target: a
|
|
65
|
+
} : n && n.variant == "INPUT_TYPE" && t.variant === "NODE" ? {
|
|
66
|
+
sourceDataTypeIdentifiers: [{
|
|
67
|
+
genericKey: a
|
|
68
|
+
}],
|
|
69
|
+
target: a
|
|
70
|
+
} : null;
|
|
71
|
+
}).filter((a) => !!a), T = r.length > 0 ? {
|
|
72
|
+
genericType: {
|
|
73
|
+
dataType: {
|
|
74
|
+
id: t.id
|
|
75
|
+
},
|
|
76
|
+
genericMappers: r
|
|
77
|
+
}
|
|
78
|
+
} : {
|
|
79
|
+
dataType: {
|
|
80
|
+
id: t.id
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
return y(T, this);
|
|
84
|
+
}
|
|
85
|
+
hasDataTypes(e) {
|
|
86
|
+
return e.every((i) => this.values().find((t) => t.id === (i.genericType?.dataType?.id ?? i.dataType?.id)));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
5
89
|
export {
|
|
6
|
-
|
|
90
|
+
l as DFlowDataTypeReactiveService
|
|
7
91
|
};
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
import "../../../compiler-runtime
|
|
2
|
-
import {
|
|
3
|
-
import "../../../utils/contextStore.js";
|
|
1
|
+
import { c } from "../../../_virtual/compiler-runtime.js";
|
|
2
|
+
import { RuleMap as m } from "./rules/DFlowDataTypeRules.js";
|
|
3
|
+
import { useService as f } from "../../../utils/contextStore.js";
|
|
4
|
+
import { DFlowDataTypeReactiveService as u } from "./DFlowDataType.service.js";
|
|
5
|
+
const g = (e, i, n, a) => {
|
|
6
|
+
const t = c.c(6), s = f(u);
|
|
7
|
+
let o;
|
|
8
|
+
if (t[0] !== i.rules?.nodes || t[1] !== s || t[2] !== n || t[3] !== a || t[4] !== e) {
|
|
9
|
+
const p = new Map(a?.map(v));
|
|
10
|
+
o = i.rules?.nodes?.every((r) => !r || !r.variant || !r.config ? !1 : m.get(r.variant) ? m.get(r.variant)?.validate(e, r.config, p, s, n) : !0) ?? !0, t[0] = i.rules?.nodes, t[1] = s, t[2] = n, t[3] = a, t[4] = e, t[5] = o;
|
|
11
|
+
} else
|
|
12
|
+
o = t[5];
|
|
13
|
+
return o;
|
|
14
|
+
};
|
|
15
|
+
function v(e) {
|
|
16
|
+
return [e.target, e];
|
|
17
|
+
}
|
|
4
18
|
export {
|
|
5
|
-
|
|
19
|
+
g as useValidateValue
|
|
6
20
|
};
|