@code0-tech/pictor 0.0.0-mvp.29 → 0.0.0-mvp.30
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/_commonjsHelpers.js +6 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/react-contenteditable.js +7 -0
- package/dist/_virtual/react-contenteditable2.js +4 -0
- package/dist/_virtual/react-dom-server-legacy.browser.development.js +4 -0
- package/dist/_virtual/react-dom-server-legacy.browser.production.js +4 -0
- package/dist/_virtual/react-dom-server.browser.development.js +4 -0
- package/dist/_virtual/react-dom-server.browser.production.js +4 -0
- package/dist/_virtual/react-is.development.js +4 -0
- package/dist/_virtual/react-is.production.min.js +4 -0
- package/dist/_virtual/server.browser.js +5 -0
- package/dist/_virtual/server.browser2.js +4 -0
- package/dist/assets/components/d-resizable/DResizable.style.css +1 -1
- package/dist/assets/components/form/Input.style.css +1 -1
- package/dist/components/breadcrumb/Breadcrumb.js +12 -12
- package/dist/components/button-group/ButtonGroup.js +12 -12
- package/dist/components/d-flow/DFlow.edges.hook.js +57 -54
- package/dist/components/d-flow/DFlow.js +304 -268
- package/dist/components/d-flow/DFlow.nodes.hook.js +60 -59
- package/dist/components/d-flow/DFlow.service.d.ts +3 -2
- package/dist/components/d-flow/DFlow.service.js +62 -47
- package/dist/components/d-flow/DFlow.util.d.ts +4 -0
- package/dist/components/d-flow/DFlow.util.js +63 -0
- package/dist/components/d-flow/DFlowEdge.js +34 -34
- package/dist/components/d-flow-data-type/DFlowDataType.service.js +17 -14
- package/dist/components/d-flow-data-type/DFlowDataType.view.d.ts +7 -4
- package/dist/components/d-flow-data-type/DFlowDataType.view.js +11 -6
- package/dist/components/d-flow-file/DFlowTabDefault.d.ts +0 -3
- package/dist/components/d-flow-file/DFlowTabDefault.js +77 -112
- package/dist/components/d-flow-file/DFlowTabTrigger.js +38 -49
- package/dist/components/d-flow-file/DFlowTabs.js +26 -27
- package/dist/components/d-flow-folder/DFlowFolder.js +170 -143
- package/dist/components/d-flow-folder/DFlowFolderContextMenu.js +18 -11
- package/dist/components/d-flow-folder/DFlowFolderItemPathInput.js +1 -0
- package/dist/components/d-flow-function/DFlowFunction.input.hook.js +4 -5
- package/dist/components/d-flow-function/DFlowFunction.return.hook.js +1 -1
- package/dist/components/d-flow-function/DFlowFunction.view.d.ts +14 -11
- package/dist/components/d-flow-function/DFlowFunction.view.js +19 -12
- package/dist/components/d-flow-function/DFlowFunctionDefaultCard.js +72 -75
- package/dist/components/d-flow-function/DFlowFunctionSuggestionCard.js +27 -32
- package/dist/components/d-flow-function/DFlowFunctionTriggerCard.js +17 -10
- package/dist/components/d-flow-input/DFlowInputDataType.js +38 -33
- package/dist/components/d-flow-input/DFlowInputDefault.d.ts +10 -0
- package/dist/components/d-flow-input/DFlowInputDefault.js +128 -0
- package/dist/components/d-flow-input/DFlowInputLiteralBadge.d.ts +7 -0
- package/dist/components/d-flow-input/DFlowInputLiteralBadge.js +24 -0
- package/dist/components/d-flow-input/DFlowInputNodeBadge.d.ts +11 -0
- package/dist/components/d-flow-input/DFlowInputNodeBadge.js +44 -0
- package/dist/components/d-flow-input/DFlowInputReferenceBadge.d.ts +11 -0
- package/dist/components/d-flow-input/DFlowInputReferenceBadge.js +33 -0
- package/dist/components/d-flow-panel/DFlowExport.js +1 -1
- package/dist/components/d-flow-panel/DFlowMiniMap.js +1 -1
- package/dist/components/d-flow-panel/DFlowPanelControl.js +34 -32
- package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.d.ts +3 -0
- package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.js +34 -0
- package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.d.ts +3 -0
- package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.js +50 -0
- package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.d.ts +3 -0
- package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.js +133 -0
- package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.d.ts +3 -18
- package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +19 -156
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +47 -58
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.util.js +5 -4
- package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.js +6 -6
- package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.d.ts +3 -0
- package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.js +44 -0
- package/dist/components/d-flow-type/DFlowType.view.d.ts +5 -5
- package/dist/components/d-flow-type/DFlowType.view.js +22 -12
- package/dist/components/d-flow-validation/DFlowValidation.hook.js +1 -1
- package/dist/components/d-flow-validation/DNodeValidation.hook.js +39 -43
- package/dist/components/d-resizable/DResizable.d.ts +4 -4
- package/dist/components/d-resizable/DResizable.js +22 -21
- package/dist/components/d-user/DUserInput.js +23 -21
- package/dist/components/file-tabs/FileTabs.service.d.ts +0 -1
- package/dist/components/file-tabs/FileTabs.service.js +49 -53
- package/dist/components/form/EmailInput.js +9 -9
- package/dist/components/form/Input.d.ts +2 -1
- package/dist/components/form/Input.js +294 -397
- package/dist/components/form/Input.syntax.hook.d.ts +1 -18
- package/dist/components/form/Input.syntax.hook.js +7 -73
- package/dist/components/form/Input.utils.d.ts +1 -2
- package/dist/components/form/Input.utils.js +26 -21
- package/dist/components/form/InputContentEditable.hook.d.ts +40 -0
- package/dist/components/form/InputContentEditable.hook.js +471 -0
- package/dist/components/form/InputSuggestion.d.ts +2 -2
- package/dist/components/form/InputSuggestion.js +169 -107
- package/dist/components/form/PasswordInput.js +8 -8
- package/dist/components/form/TextInput.js +11 -11
- package/dist/components/form/useForm.d.ts +1 -0
- package/dist/components/form/useForm.js +45 -60
- package/dist/components/menu/Menu.js +4 -4
- package/dist/index.js +155 -154
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +30 -30
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +8 -8
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +8 -8
- package/dist/node_modules/fast-deep-equal/index.js +31 -0
- package/dist/node_modules/object-assign/index.js +49 -0
- package/dist/node_modules/prop-types/checkPropTypes.js +54 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +52 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +329 -0
- package/dist/node_modules/prop-types/index.js +17 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +10 -0
- package/dist/node_modules/prop-types/lib/has.js +7 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +87 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +70 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +10 -0
- package/dist/node_modules/react-contenteditable/lib/react-contenteditable.js +132 -0
- package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +6235 -0
- package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +4096 -0
- package/dist/node_modules/react-dom/cjs/react-dom-server.browser.development.js +6753 -0
- package/dist/node_modules/react-dom/cjs/react-dom-server.browser.production.js +4645 -0
- package/dist/node_modules/react-dom/server.browser.js +15 -0
- package/dist/utils/generics.d.ts +2 -0
- package/dist/utils/generics.js +93 -80
- package/dist/utils/index.js +22 -21
- package/dist/utils/inspection.d.ts +4 -2
- package/dist/utils/inspection.js +27 -2
- package/package.json +10 -8
- package/dist/components/form/Input.selection.hook.d.ts +0 -17
- package/dist/components/form/Input.selection.hook.js +0 -78
- package/dist/components/form/InputSyntax.d.ts +0 -19
- package/dist/components/form/InputSyntax.js +0 -52
- package/dist/components/form/inputSyntaxMapping.d.ts +0 -3
- package/dist/components/form/inputSyntaxMapping.js +0 -42
|
@@ -1,181 +1,208 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsxs as R, Fragment as B, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { c as E } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import '../../assets/components/d-flow-folder/DFlowFolder.style.css';/* empty css */
|
|
4
4
|
import p from "react";
|
|
5
|
-
import { useService as
|
|
6
|
-
import { mergeCode0Props as
|
|
7
|
-
import { IconFolderOpen as
|
|
5
|
+
import { useService as V, useStore as q } from "../../utils/contextStore.js";
|
|
6
|
+
import { mergeCode0Props as N } from "../../utils/utils.js";
|
|
7
|
+
import { IconFolderOpen as J, IconFolderFilled as K, IconChevronDown as L, IconChevronRight as Q, IconFile as U } from "@tabler/icons-react";
|
|
8
8
|
import "../d-flow/DFlow.js";
|
|
9
|
-
import { DFlowReactiveService as
|
|
9
|
+
import { DFlowReactiveService as z } from "../d-flow/DFlow.service.js";
|
|
10
|
+
import { hashToColor as W } from "../d-flow/DFlow.util.js";
|
|
10
11
|
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
11
12
|
import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
|
|
12
13
|
import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
|
|
13
14
|
import "../d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js";
|
|
14
15
|
import "../d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js";
|
|
15
16
|
import "../d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
const be = p.forwardRef((h, e) => {
|
|
17
|
+
import { ScrollArea as X, ScrollAreaViewport as Y, ScrollAreaScrollbar as Z, ScrollAreaThumb as ee } from "../scroll-area/ScrollArea.js";
|
|
18
|
+
import { Flex as T } from "../flex/Flex.js";
|
|
19
|
+
import { Text as G } from "../text/Text.js";
|
|
20
|
+
import { Button as te } from "../button/Button.js";
|
|
21
|
+
import { DFlowFolderContextMenu as H } from "./DFlowFolderContextMenu.js";
|
|
22
|
+
const Oe = p.forwardRef((I, e) => {
|
|
23
23
|
const {
|
|
24
|
-
activeFlowId:
|
|
25
|
-
namespaceId:
|
|
26
|
-
projectId:
|
|
27
|
-
} =
|
|
28
|
-
namespaceId:
|
|
29
|
-
projectId:
|
|
30
|
-
}) ?? []).filter((
|
|
31
|
-
const l =
|
|
32
|
-
return l?.name ?
|
|
33
|
-
}, [
|
|
24
|
+
activeFlowId: s,
|
|
25
|
+
namespaceId: d,
|
|
26
|
+
projectId: v
|
|
27
|
+
} = I, D = V(z), h = q(z), u = (l) => l.replace(/^\/+|\/+$/g, "").split("/").filter(Boolean), f = p.useMemo(() => (D.values?.({
|
|
28
|
+
namespaceId: d,
|
|
29
|
+
projectId: v
|
|
30
|
+
}) ?? []).filter((r) => !!r?.name), [h]), w = p.useMemo(() => {
|
|
31
|
+
const l = f.find((r) => r.id === s);
|
|
32
|
+
return l?.name ? u(l.name) : [];
|
|
33
|
+
}, [f, s]), C = p.useMemo(() => {
|
|
34
34
|
const l = {
|
|
35
35
|
name: "",
|
|
36
36
|
path: "",
|
|
37
37
|
children: {}
|
|
38
38
|
};
|
|
39
|
-
for (const
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
let
|
|
43
|
-
for (let
|
|
44
|
-
const
|
|
45
|
-
t = t ? `${t}/${
|
|
46
|
-
name:
|
|
39
|
+
for (const r of f) {
|
|
40
|
+
const c = u(r.name);
|
|
41
|
+
if (c.length === 0) continue;
|
|
42
|
+
let o = l, t = "";
|
|
43
|
+
for (let i = 0; i < c.length; i++) {
|
|
44
|
+
const n = c[i];
|
|
45
|
+
t = t ? `${t}/${n}` : n, i === c.length - 1 ? o.children[n] ? o.children[n].flow = r : o.children[n] = {
|
|
46
|
+
name: n,
|
|
47
47
|
path: t,
|
|
48
48
|
children: {},
|
|
49
|
-
flow:
|
|
50
|
-
} : (
|
|
51
|
-
name:
|
|
49
|
+
flow: r
|
|
50
|
+
} : (o.children[n] || (o.children[n] = {
|
|
51
|
+
name: n,
|
|
52
52
|
path: t,
|
|
53
53
|
children: {}
|
|
54
|
-
}),
|
|
54
|
+
}), o = o.children[n]);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
return l;
|
|
58
|
-
}, [
|
|
59
|
-
|
|
60
|
-
}, []),
|
|
61
|
-
|
|
62
|
-
}, []),
|
|
63
|
-
|
|
58
|
+
}, [f]), P = p.useCallback((l) => l ? l.split("/").filter(Boolean).every((c, o) => w[o] === c) : !1, [w]), [S, _] = p.useState("default"), [m, F] = p.useState(0), g = p.useCallback(() => {
|
|
59
|
+
_("allOpen"), F((l) => l + 1);
|
|
60
|
+
}, []), k = p.useCallback(() => {
|
|
61
|
+
_("allClosed"), F((l) => l + 1);
|
|
62
|
+
}, []), y = p.useCallback(() => {
|
|
63
|
+
_("activePath"), F((l) => l + 1);
|
|
64
64
|
}, []);
|
|
65
65
|
p.useImperativeHandle(e, () => ({
|
|
66
|
-
openAll:
|
|
67
|
-
closeAll:
|
|
68
|
-
openActivePath:
|
|
69
|
-
}), [
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
return
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
openAll: g,
|
|
67
|
+
closeAll: k,
|
|
68
|
+
openActivePath: y
|
|
69
|
+
}), [g, k, y]);
|
|
70
|
+
const b = p.useCallback((l) => S === "allOpen" ? !0 : S === "allClosed" ? !1 : P(l), [P, S]), x = p.useCallback((l) => {
|
|
71
|
+
const r = Object.values(l), c = r.filter((t) => !t.flow), o = r.filter((t) => !!t.flow);
|
|
72
|
+
return c.sort((t, i) => t.name.localeCompare(i.name)), o.sort((t, i) => t.name.localeCompare(i.name)), /* @__PURE__ */ R(B, { children: [
|
|
73
|
+
c.map((t) => /* @__PURE__ */ a(le, { name: t.name, flows: Object.values(t.children).map((i) => i.flow), defaultOpen: b(t.path), ...I, children: x(t.children) }, `${t.path}-${m}`)),
|
|
74
|
+
o.map((t) => /* @__PURE__ */ a(oe, { name: t.name, path: t.path, flow: t.flow, active: t.flow.id === s, "data-flow-id": t.flow.id ?? void 0, ...I }, t.flow.id ?? t.path))
|
|
75
75
|
] });
|
|
76
|
-
}, [
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */
|
|
76
|
+
}, [s, b, m]);
|
|
77
|
+
return /* @__PURE__ */ R(X, { h: "100%", children: [
|
|
78
|
+
/* @__PURE__ */ a(Y, { children: /* @__PURE__ */ a("div", { className: "d-folder__root", children: x(C.children) }) }),
|
|
79
|
+
/* @__PURE__ */ a(Z, { orientation: "vertical", children: /* @__PURE__ */ a(ee, {}) })
|
|
80
80
|
] });
|
|
81
|
-
}),
|
|
82
|
-
const e =
|
|
83
|
-
name:
|
|
84
|
-
flows:
|
|
85
|
-
defaultOpen:
|
|
86
|
-
children:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
81
|
+
}), le = (I) => {
|
|
82
|
+
const e = E.c(37), {
|
|
83
|
+
name: s,
|
|
84
|
+
flows: d,
|
|
85
|
+
defaultOpen: v,
|
|
86
|
+
children: D,
|
|
87
|
+
onCreate: h,
|
|
88
|
+
onDelete: u,
|
|
89
|
+
onRename: f,
|
|
90
|
+
activeFlowId: w,
|
|
91
|
+
namespaceId: C,
|
|
92
|
+
projectId: P,
|
|
93
|
+
...S
|
|
94
|
+
} = I, _ = v === void 0 ? !1 : v, [m, F] = p.useState(_);
|
|
95
|
+
let g;
|
|
96
|
+
e[0] !== w || e[1] !== C || e[2] !== h || e[3] !== u || e[4] !== f || e[5] !== P ? (g = {
|
|
97
|
+
onCreate: h,
|
|
98
|
+
onDelete: u,
|
|
99
|
+
onRename: f,
|
|
100
|
+
activeFlowId: w,
|
|
101
|
+
namespaceId: C,
|
|
102
|
+
projectId: P
|
|
103
|
+
}, e[0] = w, e[1] = C, e[2] = h, e[3] = u, e[4] = f, e[5] = P, e[6] = g) : g = e[6];
|
|
104
|
+
const k = g, y = H;
|
|
105
|
+
let b;
|
|
106
|
+
e[7] !== d || e[8] !== s ? (b = {
|
|
107
|
+
name: s,
|
|
108
|
+
flow: d,
|
|
93
109
|
type: "folder"
|
|
94
|
-
}, e[
|
|
95
|
-
let
|
|
96
|
-
e[
|
|
97
|
-
const
|
|
98
|
-
let
|
|
99
|
-
e[
|
|
110
|
+
}, e[7] = d, e[8] = s, e[9] = b) : b = e[9];
|
|
111
|
+
let x;
|
|
112
|
+
e[10] === Symbol.for("react.memo_cache_sentinel") ? (x = () => F(ne), e[10] = x) : x = e[10];
|
|
113
|
+
const l = N("d-folder", S);
|
|
114
|
+
let r;
|
|
115
|
+
e[11] === Symbol.for("react.memo_cache_sentinel") ? (r = {
|
|
100
116
|
gap: "0.35rem"
|
|
101
|
-
}, e[
|
|
102
|
-
let
|
|
103
|
-
e[
|
|
104
|
-
let
|
|
105
|
-
e[
|
|
106
|
-
let
|
|
107
|
-
e[
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
] }), e[
|
|
111
|
-
let
|
|
112
|
-
e[
|
|
117
|
+
}, e[11] = r) : r = e[11];
|
|
118
|
+
let c;
|
|
119
|
+
e[12] !== m ? (c = m ? /* @__PURE__ */ a(J, { size: 12 }) : /* @__PURE__ */ a(K, { size: 12 }), e[12] = m, e[13] = c) : c = e[13];
|
|
120
|
+
let o;
|
|
121
|
+
e[14] !== s ? (o = /* @__PURE__ */ a(G, { children: s }), e[14] = s, e[15] = o) : o = e[15];
|
|
122
|
+
let t;
|
|
123
|
+
e[16] !== c || e[17] !== o ? (t = /* @__PURE__ */ R(T, { align: "center", style: r, children: [
|
|
124
|
+
c,
|
|
125
|
+
o
|
|
126
|
+
] }), e[16] = c, e[17] = o, e[18] = t) : t = e[18];
|
|
127
|
+
let i;
|
|
128
|
+
e[19] === Symbol.for("react.memo_cache_sentinel") ? (i = {
|
|
113
129
|
gap: "0.35rem"
|
|
114
|
-
}, e[
|
|
115
|
-
let y;
|
|
116
|
-
e[13] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ c(M, { p: "0", variant: "none", children: /* @__PURE__ */ c(V, { size: 12 }) }), e[13] = y) : y = e[13];
|
|
117
|
-
let F;
|
|
118
|
-
e[14] !== o ? (F = /* @__PURE__ */ k(z, { align: "center", style: I, children: [
|
|
119
|
-
y,
|
|
120
|
-
/* @__PURE__ */ c(M, { p: "0", variant: "none", children: o ? /* @__PURE__ */ c(q, { size: 12 }) : /* @__PURE__ */ c(J, { size: 12 }) })
|
|
121
|
-
] }), e[14] = o, e[15] = F) : F = e[15];
|
|
122
|
-
let l;
|
|
123
|
-
e[16] !== F || e[17] !== s || e[18] !== m || e[19] !== f ? (l = /* @__PURE__ */ k("div", { onClick: s, ...m, children: [
|
|
124
|
-
f,
|
|
125
|
-
F
|
|
126
|
-
] }), e[16] = F, e[17] = s, e[18] = m, e[19] = f, e[20] = l) : l = e[20];
|
|
130
|
+
}, e[19] = i) : i = e[19];
|
|
127
131
|
let n;
|
|
128
|
-
e[
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
let
|
|
140
|
-
|
|
132
|
+
e[20] !== m ? (n = /* @__PURE__ */ a(T, { align: "center", style: i, children: /* @__PURE__ */ a(te, { p: "0", variant: "none", children: m ? /* @__PURE__ */ a(L, { size: 12 }) : /* @__PURE__ */ a(Q, { size: 12 }) }) }), e[20] = m, e[21] = n) : n = e[21];
|
|
133
|
+
let A;
|
|
134
|
+
e[22] !== n || e[23] !== x || e[24] !== l || e[25] !== t ? (A = /* @__PURE__ */ R("div", { onClick: x, ...l, children: [
|
|
135
|
+
t,
|
|
136
|
+
n
|
|
137
|
+
] }), e[22] = n, e[23] = x, e[24] = l, e[25] = t, e[26] = A) : A = e[26];
|
|
138
|
+
let O;
|
|
139
|
+
e[27] !== y || e[28] !== k || e[29] !== A || e[30] !== b ? (O = /* @__PURE__ */ a(y, { contextData: b, ...k, children: A }), e[27] = y, e[28] = k, e[29] = A, e[30] = b, e[31] = O) : O = e[31];
|
|
140
|
+
const $ = m ? D : null;
|
|
141
|
+
let M;
|
|
142
|
+
e[32] !== $ ? (M = /* @__PURE__ */ a("div", { className: "d-folder__content", children: $ }), e[32] = $, e[33] = M) : M = e[33];
|
|
143
|
+
let j;
|
|
144
|
+
return e[34] !== O || e[35] !== M ? (j = /* @__PURE__ */ R(B, { children: [
|
|
145
|
+
O,
|
|
146
|
+
M
|
|
147
|
+
] }), e[34] = O, e[35] = M, e[36] = j) : j = e[36], j;
|
|
148
|
+
}, oe = (I) => {
|
|
149
|
+
const e = E.c(38);
|
|
150
|
+
let s, d, v, D, h, u, f, w;
|
|
151
|
+
if (e[0] !== I) {
|
|
141
152
|
const {
|
|
142
|
-
name:
|
|
143
|
-
path:
|
|
144
|
-
flow:
|
|
145
|
-
onSelect:
|
|
146
|
-
active:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
name: k,
|
|
154
|
+
path: y,
|
|
155
|
+
flow: b,
|
|
156
|
+
onSelect: x,
|
|
157
|
+
active: l,
|
|
158
|
+
onCreate: r,
|
|
159
|
+
onDelete: c,
|
|
160
|
+
onRename: o,
|
|
161
|
+
activeFlowId: t,
|
|
162
|
+
namespaceId: i,
|
|
163
|
+
projectId: n,
|
|
164
|
+
...A
|
|
165
|
+
} = I;
|
|
166
|
+
v = k, h = y, d = b, D = x;
|
|
167
|
+
let O;
|
|
168
|
+
e[9] !== t || e[10] !== i || e[11] !== r || e[12] !== c || e[13] !== o || e[14] !== n ? (O = {
|
|
169
|
+
onCreate: r,
|
|
170
|
+
onDelete: c,
|
|
171
|
+
onRename: o,
|
|
172
|
+
activeFlowId: t,
|
|
173
|
+
namespaceId: i,
|
|
174
|
+
projectId: n
|
|
175
|
+
}, e[9] = t, e[10] = i, e[11] = r, e[12] = c, e[13] = o, e[14] = n, e[15] = O) : O = e[15];
|
|
176
|
+
const $ = O;
|
|
177
|
+
s = H, e[16] !== d || e[17] !== h ? (f = {
|
|
178
|
+
name: h,
|
|
179
|
+
flow: d,
|
|
154
180
|
type: "item"
|
|
155
|
-
}, e[
|
|
181
|
+
}, e[16] = d, e[17] = h, e[18] = f) : f = e[18], w = $, u = N(`d-folder__item ${l ? "d-folder__item--active" : ""}`, A), e[0] = I, e[1] = s, e[2] = d, e[3] = v, e[4] = D, e[5] = h, e[6] = u, e[7] = f, e[8] = w;
|
|
156
182
|
} else
|
|
157
|
-
|
|
158
|
-
const D = `hsl(${$}, 100%, 72%)`;
|
|
159
|
-
let a;
|
|
160
|
-
e[15] !== i || e[16] !== D ? (a = /* @__PURE__ */ c(i, { color: D, size: 12 }), e[15] = i, e[16] = D, e[17] = a) : a = e[17];
|
|
161
|
-
let s;
|
|
162
|
-
e[18] !== S ? (s = /* @__PURE__ */ c(P, { children: S }), e[18] = S, e[19] = s) : s = e[19];
|
|
163
|
-
let m;
|
|
164
|
-
e[20] !== u || e[21] !== v || e[22] !== a || e[23] !== s ? (m = /* @__PURE__ */ k("div", { ...u, onClick: v, children: [
|
|
165
|
-
a,
|
|
166
|
-
s
|
|
167
|
-
] }), e[20] = u, e[21] = v, e[22] = a, e[23] = s, e[24] = m) : m = e[24];
|
|
183
|
+
s = e[1], d = e[2], v = e[3], D = e[4], h = e[5], u = e[6], f = e[7], w = e[8];
|
|
168
184
|
let C;
|
|
169
|
-
|
|
185
|
+
e[19] !== d || e[20] !== D ? (C = () => D?.(d), e[19] = d, e[20] = D, e[21] = C) : C = e[21];
|
|
186
|
+
const P = h + v;
|
|
187
|
+
let S;
|
|
188
|
+
e[22] !== P ? (S = W(P), e[22] = P, e[23] = S) : S = e[23];
|
|
189
|
+
let _;
|
|
190
|
+
e[24] !== S ? (_ = /* @__PURE__ */ a(U, { color: S, size: 12 }), e[24] = S, e[25] = _) : _ = e[25];
|
|
191
|
+
let m;
|
|
192
|
+
e[26] !== v ? (m = /* @__PURE__ */ a(G, { children: v }), e[26] = v, e[27] = m) : m = e[27];
|
|
193
|
+
let F;
|
|
194
|
+
e[28] !== u || e[29] !== C || e[30] !== _ || e[31] !== m ? (F = /* @__PURE__ */ R("div", { ...u, onClick: C, children: [
|
|
195
|
+
_,
|
|
196
|
+
m
|
|
197
|
+
] }), e[28] = u, e[29] = C, e[30] = _, e[31] = m, e[32] = F) : F = e[32];
|
|
198
|
+
let g;
|
|
199
|
+
return e[33] !== s || e[34] !== f || e[35] !== w || e[36] !== F ? (g = /* @__PURE__ */ a(s, { contextData: f, ...w, children: F }), e[33] = s, e[34] = f, e[35] = w, e[36] = F, e[37] = g) : g = e[37], g;
|
|
170
200
|
};
|
|
171
|
-
function
|
|
172
|
-
return !
|
|
173
|
-
}
|
|
174
|
-
function te(h) {
|
|
175
|
-
return parseInt(h.slice(0, 8), 16) % 360;
|
|
201
|
+
function ne(I) {
|
|
202
|
+
return !I;
|
|
176
203
|
}
|
|
177
204
|
export {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
205
|
+
Oe as DFlowFolder,
|
|
206
|
+
le as DFlowFolderGroup,
|
|
207
|
+
oe as DFlowFolderItem
|
|
181
208
|
};
|
|
@@ -1,27 +1,34 @@
|
|
|
1
1
|
import { jsx as e, Fragment as a, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import h from "react";
|
|
3
|
-
import { ContextMenu as
|
|
3
|
+
import { ContextMenu as x, ContextMenuTrigger as s, ContextMenuPortal as C, ContextMenuContent as p, ContextMenuSub as S, ContextMenuSubTrigger as f, ContextMenuSubContent as M, ContextMenuItem as r, ContextMenuSeparator as g } from "../context-menu/ContextMenu.js";
|
|
4
4
|
import { Flex as v } from "../flex/Flex.js";
|
|
5
5
|
import { Text as i } from "../text/Text.js";
|
|
6
6
|
import { IconChevronRight as w, IconEdit as D, IconTrash as F } from "@tabler/icons-react";
|
|
7
7
|
import { useService as R, useStore as T } from "../../utils/contextStore.js";
|
|
8
8
|
import "merge-props";
|
|
9
9
|
import { DFlowTypeReactiveService as c } from "../d-flow-type/DFlowType.service.js";
|
|
10
|
-
|
|
10
|
+
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
11
|
+
import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
|
|
12
|
+
import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
|
|
13
|
+
import "../d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js";
|
|
14
|
+
import "../d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js";
|
|
15
|
+
import "../d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js";
|
|
16
|
+
import "js-md5";
|
|
17
|
+
const K = (t) => {
|
|
11
18
|
const {
|
|
12
19
|
children: l
|
|
13
|
-
} = t,
|
|
14
|
-
return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ n(
|
|
15
|
-
/* @__PURE__ */ e(
|
|
16
|
-
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
|
|
17
|
-
/* @__PURE__ */ e(
|
|
20
|
+
} = t, m = R(c), d = T(c), u = h.useMemo(() => m.values(), [d]);
|
|
21
|
+
return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ n(x, { children: [
|
|
22
|
+
/* @__PURE__ */ e(s, { asChild: !0, children: l }),
|
|
23
|
+
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(p, { children: /* @__PURE__ */ n(S, { children: [
|
|
24
|
+
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ n(v, { align: "center", justify: "space-between", w: "100%", children: [
|
|
18
25
|
/* @__PURE__ */ e(i, { children: "New flow" }),
|
|
19
26
|
/* @__PURE__ */ e(w, { size: 12 })
|
|
20
27
|
] }) }),
|
|
21
|
-
/* @__PURE__ */ e(
|
|
28
|
+
/* @__PURE__ */ e(M, { children: u.map((o) => /* @__PURE__ */ e(r, { onSelect: () => {
|
|
22
29
|
t.onCreate?.(o.id);
|
|
23
|
-
}, children: o.names
|
|
24
|
-
/* @__PURE__ */ e(
|
|
30
|
+
}, children: o.names[0]?.content ?? o.id }, o.id)) }),
|
|
31
|
+
/* @__PURE__ */ e(g, {}),
|
|
25
32
|
/* @__PURE__ */ n(r, { onSelect: () => t.onRename?.(t.contextData), children: [
|
|
26
33
|
/* @__PURE__ */ e(D, { size: 12, color: "purple" }),
|
|
27
34
|
/* @__PURE__ */ e(i, { children: "Rename" })
|
|
@@ -34,5 +41,5 @@ const k = (t) => {
|
|
|
34
41
|
] }) });
|
|
35
42
|
};
|
|
36
43
|
export {
|
|
37
|
-
|
|
44
|
+
K as DFlowFolderContextMenu
|
|
38
45
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { resolveGenericKeys as o, replaceGenericKeysInType as s } from "../../utils/generics.js";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return s(r, t);
|
|
2
|
+
const y = (e, r, n, p) => {
|
|
3
|
+
const c = o(r, n, p);
|
|
4
|
+
return s(e, c);
|
|
6
5
|
};
|
|
7
6
|
export {
|
|
8
|
-
|
|
7
|
+
y as useInputType
|
|
9
8
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { DataTypeIdentifier, FunctionDefinition, Maybe, ParameterDefinition, RuntimeFunctionDefinition, Scalars,
|
|
1
|
+
import { DataTypeIdentifier, DataTypeIdentifierConnection, FunctionDefinition, Maybe, ParameterDefinition, RuntimeFunctionDefinition, Scalars, Translation } from '@code0-tech/sagittarius-graphql-types';
|
|
2
2
|
export declare class FunctionDefinitionView {
|
|
3
3
|
/** Name of the function */
|
|
4
4
|
private readonly _aliases?;
|
|
5
5
|
/** Time when this FunctionDefinition was created */
|
|
6
6
|
private readonly _createdAt?;
|
|
7
|
+
/** All data type identifiers used within this Node Function */
|
|
8
|
+
private readonly _dataTypeIdentifiers?;
|
|
7
9
|
/** Deprecation message of the function */
|
|
8
10
|
private readonly _deprecationMessages?;
|
|
9
11
|
/** Description of the function */
|
|
@@ -31,16 +33,17 @@ export declare class FunctionDefinitionView {
|
|
|
31
33
|
/** Time when this FunctionDefinition was last updated */
|
|
32
34
|
private readonly _updatedAt?;
|
|
33
35
|
constructor(object: FunctionDefinition);
|
|
34
|
-
get aliases(): Maybe<
|
|
36
|
+
get aliases(): Maybe<Array<Translation>> | undefined;
|
|
35
37
|
get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
36
|
-
get
|
|
37
|
-
get
|
|
38
|
-
get
|
|
39
|
-
get
|
|
38
|
+
get dataTypeIdentifiers(): Maybe<DataTypeIdentifierConnection> | undefined;
|
|
39
|
+
get deprecationMessages(): Maybe<Array<Translation>> | undefined;
|
|
40
|
+
get descriptions(): Maybe<Array<Translation>> | undefined;
|
|
41
|
+
get displayMessages(): Maybe<Array<Translation>> | undefined;
|
|
42
|
+
get documentations(): Maybe<Array<Translation>> | undefined;
|
|
40
43
|
get genericKeys(): Maybe<Array<Scalars["String"]["output"]>> | undefined;
|
|
41
44
|
get id(): Maybe<Scalars["FunctionDefinitionID"]["output"]> | undefined;
|
|
42
45
|
get identifier(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
43
|
-
get names(): Maybe<
|
|
46
|
+
get names(): Maybe<Array<Translation>> | undefined;
|
|
44
47
|
get parameterDefinitions(): Maybe<ParameterDefinitionView[]> | undefined;
|
|
45
48
|
get returnType(): Maybe<DataTypeIdentifier> | undefined;
|
|
46
49
|
get runtimeFunctionDefinition(): Maybe<RuntimeFunctionDefinition> | undefined;
|
|
@@ -65,14 +68,14 @@ export declare class ParameterDefinitionView {
|
|
|
65
68
|
private readonly _names?;
|
|
66
69
|
/** Time when this ParameterDefinition was last updated */
|
|
67
70
|
private readonly _updatedAt?;
|
|
68
|
-
constructor(object: ParameterDefinition);
|
|
71
|
+
constructor(object: ParameterDefinition, dataTypeIdentifiers: DataTypeIdentifier[]);
|
|
69
72
|
get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
70
73
|
get dataTypeIdentifier(): Maybe<DataTypeIdentifier> | undefined;
|
|
71
|
-
get descriptions(): Maybe<
|
|
72
|
-
get documentations(): Maybe<
|
|
74
|
+
get descriptions(): Maybe<Array<Translation>> | undefined;
|
|
75
|
+
get documentations(): Maybe<Array<Translation>> | undefined;
|
|
73
76
|
get id(): Maybe<Scalars["ParameterDefinitionID"]["output"]> | undefined;
|
|
74
77
|
get identifier(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
75
|
-
get names(): Maybe<
|
|
78
|
+
get names(): Maybe<Array<Translation>> | undefined;
|
|
76
79
|
get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
77
80
|
json(): ParameterDefinition;
|
|
78
81
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { resolveDataTypeIdentifiers as d, attachDataTypeIdentifiers as n } from "../d-flow/DFlow.util.js";
|
|
1
2
|
function t(e, i, s) {
|
|
2
|
-
return (i =
|
|
3
|
+
return (i = a(i)) in e ? Object.defineProperty(e, i, { value: s, enumerable: !0, configurable: !0, writable: !0 }) : e[i] = s, e;
|
|
3
4
|
}
|
|
4
|
-
function
|
|
5
|
-
var i =
|
|
5
|
+
function a(e) {
|
|
6
|
+
var i = o(e, "string");
|
|
6
7
|
return typeof i == "symbol" ? i : i + "";
|
|
7
8
|
}
|
|
8
|
-
function
|
|
9
|
+
function o(e, i) {
|
|
9
10
|
if (typeof e != "object" || !e) return e;
|
|
10
11
|
var s = e[Symbol.toPrimitive];
|
|
11
12
|
if (s !== void 0) {
|
|
@@ -15,9 +16,11 @@ function d(e, i) {
|
|
|
15
16
|
}
|
|
16
17
|
return (i === "string" ? String : Number)(e);
|
|
17
18
|
}
|
|
18
|
-
class
|
|
19
|
+
class u {
|
|
19
20
|
constructor(i) {
|
|
20
|
-
t(this, "_aliases", void 0), t(this, "_createdAt", void 0), t(this, "_deprecationMessages", void 0), t(this, "_descriptions", void 0), t(this, "_displayMessages", void 0), t(this, "_documentations", void 0), t(this, "_genericKeys", void 0), t(this, "_id", void 0), t(this, "_identifier", void 0), t(this, "_names", void 0), t(this, "_parameterDefinitions", void 0), t(this, "_returnType", void 0), t(this, "_runtimeFunctionDefinition", void 0), t(this, "_throwsError", void 0), t(this, "_updatedAt", void 0)
|
|
21
|
+
t(this, "_aliases", void 0), t(this, "_createdAt", void 0), t(this, "_dataTypeIdentifiers", void 0), t(this, "_deprecationMessages", void 0), t(this, "_descriptions", void 0), t(this, "_displayMessages", void 0), t(this, "_documentations", void 0), t(this, "_genericKeys", void 0), t(this, "_id", void 0), t(this, "_identifier", void 0), t(this, "_names", void 0), t(this, "_parameterDefinitions", void 0), t(this, "_returnType", void 0), t(this, "_runtimeFunctionDefinition", void 0), t(this, "_throwsError", void 0), t(this, "_updatedAt", void 0);
|
|
22
|
+
const s = d(i.dataTypeIdentifiers?.nodes ?? []);
|
|
23
|
+
this._aliases = i.aliases, this._createdAt = i.createdAt, this._dataTypeIdentifiers = i.dataTypeIdentifiers, this._deprecationMessages = i.deprecationMessages, this._descriptions = i.descriptions, this._displayMessages = i.displayMessages, this._documentations = i.documentations, this._genericKeys = i.genericKeys, this._id = i.id, this._identifier = i.identifier, this._names = i.names, this._parameterDefinitions = i.parameterDefinitions?.nodes?.map((r) => new h(r, s)) ?? void 0, this._returnType = n(s, i.returnType), this._runtimeFunctionDefinition = i.runtimeFunctionDefinition, this._throwsError = i.throwsError, this._updatedAt = i.updatedAt;
|
|
21
24
|
}
|
|
22
25
|
get aliases() {
|
|
23
26
|
return this._aliases;
|
|
@@ -25,6 +28,9 @@ class o {
|
|
|
25
28
|
get createdAt() {
|
|
26
29
|
return this._createdAt;
|
|
27
30
|
}
|
|
31
|
+
get dataTypeIdentifiers() {
|
|
32
|
+
return this._dataTypeIdentifiers;
|
|
33
|
+
}
|
|
28
34
|
get deprecationMessages() {
|
|
29
35
|
return this._deprecationMessages;
|
|
30
36
|
}
|
|
@@ -82,13 +88,14 @@ class o {
|
|
|
82
88
|
returnType: this._returnType,
|
|
83
89
|
runtimeFunctionDefinition: this._runtimeFunctionDefinition,
|
|
84
90
|
throwsError: this._throwsError,
|
|
85
|
-
updatedAt: this._updatedAt
|
|
91
|
+
updatedAt: this._updatedAt,
|
|
92
|
+
dataTypeIdentifiers: this._dataTypeIdentifiers
|
|
86
93
|
};
|
|
87
94
|
}
|
|
88
95
|
}
|
|
89
|
-
class
|
|
90
|
-
constructor(i) {
|
|
91
|
-
t(this, "_createdAt", void 0), t(this, "_dataTypeIdentifier", void 0), t(this, "_descriptions", void 0), t(this, "_documentations", void 0), t(this, "_id", void 0), t(this, "_identifier", void 0), t(this, "_names", void 0), t(this, "_updatedAt", void 0), this._createdAt = i.createdAt, this._dataTypeIdentifier = i.dataTypeIdentifier, this._descriptions = i.descriptions, this._documentations = i.documentations, this._id = i.id, this._identifier = i.identifier, this._names = i.names, this._updatedAt = i.updatedAt;
|
|
96
|
+
class h {
|
|
97
|
+
constructor(i, s) {
|
|
98
|
+
t(this, "_createdAt", void 0), t(this, "_dataTypeIdentifier", void 0), t(this, "_descriptions", void 0), t(this, "_documentations", void 0), t(this, "_id", void 0), t(this, "_identifier", void 0), t(this, "_names", void 0), t(this, "_updatedAt", void 0), this._createdAt = i.createdAt, this._dataTypeIdentifier = n(s, i.dataTypeIdentifier), this._descriptions = i.descriptions, this._documentations = i.documentations, this._id = i.id, this._identifier = i.identifier, this._names = i.names, this._updatedAt = i.updatedAt;
|
|
92
99
|
}
|
|
93
100
|
get createdAt() {
|
|
94
101
|
return this._createdAt;
|
|
@@ -127,6 +134,6 @@ class a {
|
|
|
127
134
|
}
|
|
128
135
|
}
|
|
129
136
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
137
|
+
u as FunctionDefinitionView,
|
|
138
|
+
h as ParameterDefinitionView
|
|
132
139
|
};
|