@code0-tech/pictor 0.0.0-mvp.42 → 0.0.0-mvp.44
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/assets/components/avatar/Avatar.style.css +1 -1
- package/dist/components/avatar/Avatar.d.ts +2 -0
- package/dist/components/avatar/Avatar.js +46 -48
- package/dist/components/d-application/DApplication.service.js +1 -0
- package/dist/components/d-flow/DFlow.edges.hook.js +3 -2
- package/dist/components/d-flow/DFlow.nodes.hook.js +16 -15
- package/dist/components/d-flow/DFlow.service.js +3 -2
- package/dist/components/d-flow-data-type/DFlowDataType.service.js +8 -8
- package/dist/components/d-flow-file/DFlowTabDefault.js +1 -1
- package/dist/components/d-flow-file/DFlowTabTrigger.js +1 -1
- package/dist/components/d-flow-file/DFlowTabs.js +1 -1
- package/dist/components/d-flow-folder/DFlowFolderContextMenu.js +1 -1
- package/dist/components/d-flow-folder/DFlowFolderCreateDialog.js +52 -50
- package/dist/components/d-flow-folder/DFlowFolderDeleteDialog.js +43 -38
- package/dist/components/d-flow-folder/DFlowFolderItemPathInput.js +3 -2
- package/dist/components/d-flow-folder/DFlowFolderRenameDialog.js +26 -22
- package/dist/components/d-flow-function/DFlowFunction.service.js +3 -2
- package/dist/components/d-flow-input/DFlowInputDataType.js +15 -14
- package/dist/components/d-flow-input/DFlowInputDataTypeEditDialog.js +3 -2
- package/dist/components/d-flow-input/DFlowInputDefault.js +1 -1
- package/dist/components/d-flow-input/DFlowInputNodeBadge.js +1 -1
- package/dist/components/d-flow-node/DFlowNode.return.hook.js +1 -1
- package/dist/components/d-flow-node/DFlowNodeDefaultCard.js +1 -1
- package/dist/components/d-flow-panel/DFlowExport.js +1 -1
- package/dist/components/d-flow-panel/DFlowPanelControl.js +1 -1
- package/dist/components/d-flow-panel/DFlowPanelUpdate.js +1 -1
- package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.js +1 -1
- package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.js +1 -1
- package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.js +15 -15
- package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +1 -1
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +6 -5
- package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.js +3 -2
- package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.js +1 -1
- package/dist/components/d-flow-type/DFlowType.service.d.ts +3 -3
- package/dist/components/d-flow-type/DFlowType.service.js +3 -2
- package/dist/components/d-flow-type/DFlowType.view.d.ts +4 -1
- package/dist/components/d-flow-type/DFlowType.view.js +16 -10
- package/dist/components/d-flow-validation/DFlowValidation.hook.js +1 -1
- package/dist/components/d-flow-validation/DFlowValidation.js +3 -2
- package/dist/components/d-flow-validation/DNodeValidation.hook.js +1 -1
- package/dist/components/d-license/DNamespaceLicense.service.js +3 -2
- package/dist/components/d-member/DNamespaceMember.service.js +1 -0
- package/dist/components/d-member/DNamespaceMemberContent.js +3 -2
- package/dist/components/d-member/DNamespaceMemberList.js +5 -4
- package/dist/components/d-namespace/DNamespace.service.js +3 -2
- package/dist/components/d-organization/DOrganization.service.js +3 -2
- package/dist/components/d-organization/DOrganizationList.js +7 -6
- package/dist/components/d-organization/DOrganizatonContent.js +3 -2
- package/dist/components/d-organization/index.js +9 -8
- package/dist/components/d-project/DNamespaceProject.service.js +3 -2
- package/dist/components/d-project/DNamespaceProjectContent.js +3 -2
- package/dist/components/d-project/DNamespaceProjectList.js +3 -2
- package/dist/components/d-project/index.js +10 -9
- package/dist/components/d-role/DNamespaceRole.service.js +3 -2
- package/dist/components/d-role/DNamespaceRoleContent.js +3 -2
- package/dist/components/d-role/DNamespaceRoleList.js +6 -5
- package/dist/components/d-runtime/DRuntimeContent.js +3 -2
- package/dist/components/d-runtime/DRuntimeList.js +3 -2
- package/dist/components/d-user/DUser.service.js +3 -2
- package/dist/components/d-user/DUserContent.js +6 -5
- package/dist/components/d-user/DUserInput.js +3 -2
- package/dist/components/d-user/DUserList.js +5 -4
- package/dist/components/d-user/DUserMenu.js +5 -4
- package/dist/components/d-user/index.js +15 -14
- package/dist/components/data-table/DataTableFilterSuggestionMenu.js +8 -8
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/index.js +25 -23
- package/dist/index.js +178 -181
- package/dist/node_modules/@lezer/common/dist/index.js +146 -0
- package/dist/node_modules/@lezer/highlight/dist/index.js +1 -1
- package/dist/utils/generics.js +1 -1
- package/dist/utils/index.js +19 -24
- package/dist/utils/utils.d.ts +3 -18
- package/dist/utils/utils.js +101 -176
- package/package.json +12 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
.avatar{aspect-ratio:1/1;
|
|
1
|
+
.avatar{aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:50%}.avatar{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;background:transparent;box-shadow:none}.avatar--image{padding:0}.avatar--identicon>div>div{--color: inherit;background:#201e2c}.avatar--identicon>div>div>span,.avatar--identicon>div>div>p{color:var(--color)}
|
|
@@ -1,56 +1,54 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import d from "react";
|
|
4
|
-
import { md5 as v } from "js-md5";
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { c as v } from "../../_virtual/compiler-runtime.js";
|
|
5
3
|
import '../../assets/components/avatar/Avatar.style.css';/* empty css */
|
|
6
|
-
import { mergeCode0Props as
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { mergeCode0Props as y } from "../../utils/utils.js";
|
|
5
|
+
import z from "avvvatars-react";
|
|
6
|
+
import { hashToColor as A } from "../d-flow/DFlow.util.js";
|
|
7
|
+
const $ = (m) => {
|
|
8
|
+
const t = v.c(3), {
|
|
10
9
|
src: e,
|
|
11
|
-
size:
|
|
12
|
-
} =
|
|
13
|
-
let
|
|
14
|
-
return t[0] !==
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const t = p.c(12);
|
|
38
|
-
let e, o, i, r;
|
|
39
|
-
if (t[0] !== s) {
|
|
10
|
+
size: i
|
|
11
|
+
} = m;
|
|
12
|
+
let r;
|
|
13
|
+
return t[0] !== i || t[1] !== e ? (r = /* @__PURE__ */ d("img", { src: e, width: i, height: i, alt: "Avatar image" }), t[0] = i, t[1] = e, t[2] = r) : r = t[2], r;
|
|
14
|
+
}, x = (m) => {
|
|
15
|
+
const t = v.c(12), {
|
|
16
|
+
identifier: e,
|
|
17
|
+
size: i,
|
|
18
|
+
color: r,
|
|
19
|
+
type: s
|
|
20
|
+
} = m;
|
|
21
|
+
let o;
|
|
22
|
+
t[0] !== r || t[1] !== e ? (o = r ?? A(e), t[0] = r, t[1] = e, t[2] = o) : o = t[2];
|
|
23
|
+
let l;
|
|
24
|
+
t[3] !== o ? (l = {
|
|
25
|
+
"--color": o
|
|
26
|
+
}, t[3] = o, t[4] = l) : l = t[4];
|
|
27
|
+
const c = l, n = s ?? "shape";
|
|
28
|
+
let a;
|
|
29
|
+
t[5] !== e || t[6] !== i || t[7] !== n ? (a = /* @__PURE__ */ d(z, { style: n, value: e, size: i }), t[5] = e, t[6] = i, t[7] = n, t[8] = a) : a = t[8];
|
|
30
|
+
let f;
|
|
31
|
+
return t[9] !== c || t[10] !== a ? (f = /* @__PURE__ */ d("div", { style: c, children: a }), t[9] = c, t[10] = a, t[11] = f) : f = t[11], f;
|
|
32
|
+
}, R = (m) => {
|
|
33
|
+
const t = v.c(16);
|
|
34
|
+
let e, i, r, s, o, l;
|
|
35
|
+
if (t[0] !== m) {
|
|
40
36
|
const {
|
|
41
|
-
identifier:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
identifier: a,
|
|
38
|
+
color: f,
|
|
39
|
+
src: h,
|
|
40
|
+
size: p,
|
|
41
|
+
type: g,
|
|
42
|
+
...u
|
|
43
|
+
} = m;
|
|
44
|
+
i = a, e = f, s = h, l = g, r = p === void 0 ? 32 : p, o = y(`avatar ${!i && s ? "avatar--image" : "avatar--identicon"}`, u), t[0] = m, t[1] = e, t[2] = i, t[3] = r, t[4] = s, t[5] = o, t[6] = l;
|
|
47
45
|
} else
|
|
48
|
-
e = t[1],
|
|
49
|
-
let a;
|
|
50
|
-
t[5] !== e || t[6] !== o || t[7] !== i ? (a = e ? /* @__PURE__ */ m(E, { identifier: e, size: o }) : i ? /* @__PURE__ */ m(C, { src: i, size: o + 13 }) : null, t[5] = e, t[6] = o, t[7] = i, t[8] = a) : a = t[8];
|
|
46
|
+
e = t[1], i = t[2], r = t[3], s = t[4], o = t[5], l = t[6];
|
|
51
47
|
let c;
|
|
52
|
-
|
|
48
|
+
t[7] !== e || t[8] !== i || t[9] !== r || t[10] !== s || t[11] !== l ? (c = i ? /* @__PURE__ */ d(x, { type: l, color: e, identifier: i, size: r }) : s ? /* @__PURE__ */ d($, { src: s, size: r }) : null, t[7] = e, t[8] = i, t[9] = r, t[10] = s, t[11] = l, t[12] = c) : c = t[12];
|
|
49
|
+
let n;
|
|
50
|
+
return t[13] !== o || t[14] !== c ? (n = /* @__PURE__ */ d("div", { ...o, children: c }), t[13] = o, t[14] = c, t[15] = n) : n = t[15], n;
|
|
53
51
|
};
|
|
54
52
|
export {
|
|
55
|
-
|
|
53
|
+
R as Avatar
|
|
56
54
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { useService as u, useStore as p } from "../../utils/contextStore.js";
|
|
2
2
|
import $ from "react";
|
|
3
3
|
import "merge-props";
|
|
4
|
+
import "js-md5";
|
|
4
5
|
import { DFlowReactiveService as h } from "./DFlow.service.js";
|
|
5
6
|
import { DFlowFunctionReactiveService as I } from "../d-flow-function/DFlowFunction.service.js";
|
|
6
7
|
import { hashToColor as b } from "./DFlow.util.js";
|
|
7
8
|
import { DFlowDataTypeReactiveService as D } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
8
|
-
const
|
|
9
|
+
const O = (i, S, N) => {
|
|
9
10
|
const f = u(h), g = p(h), F = u(I), m = p(I), T = u(D), y = p(D), s = $.useMemo(() => f.getById(i, {
|
|
10
11
|
namespaceId: S,
|
|
11
12
|
projectId: N
|
|
@@ -105,5 +106,5 @@ const H = (i, S, N) => {
|
|
|
105
106
|
}, [s, g, m, y]);
|
|
106
107
|
};
|
|
107
108
|
export {
|
|
108
|
-
|
|
109
|
+
O as useFlowEdges
|
|
109
110
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { useService as S, useStore as x } from "../../utils/contextStore.js";
|
|
2
2
|
import B from "react";
|
|
3
3
|
import "merge-props";
|
|
4
|
+
import "js-md5";
|
|
4
5
|
import { DFlowReactiveService as F } from "./DFlow.service.js";
|
|
5
6
|
import { DFlowFunctionReactiveService as w } from "../d-flow-function/DFlowFunction.service.js";
|
|
6
7
|
import { hashToColor as D } from "./DFlow.util.js";
|
|
7
8
|
import { DFlowDataTypeReactiveService as A } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
8
9
|
const _ = /* @__PURE__ */ new Map([["std", "default"]]), k = (i, y) => {
|
|
9
10
|
if (!y || i.size === 0) return "";
|
|
10
|
-
const
|
|
11
|
+
const p = /[:._\-\/\s]+/, o = y.trim().toLowerCase();
|
|
11
12
|
let n = null, l = -1 / 0;
|
|
12
13
|
for (const [f, N] of i.entries()) {
|
|
13
14
|
const a = f.trim().toLowerCase();
|
|
@@ -17,7 +18,7 @@ const _ = /* @__PURE__ */ new Map([["std", "default"]]), k = (i, y) => {
|
|
|
17
18
|
if (o.startsWith(a)) {
|
|
18
19
|
e = 2e3 + a.length * 2;
|
|
19
20
|
const s = o.charAt(a.length);
|
|
20
|
-
(s === "" ||
|
|
21
|
+
(s === "" || p.test(s)) && (e += 200);
|
|
21
22
|
} else {
|
|
22
23
|
const s = Math.min(o.length, a.length);
|
|
23
24
|
let t = 0;
|
|
@@ -25,24 +26,24 @@ const _ = /* @__PURE__ */ new Map([["std", "default"]]), k = (i, y) => {
|
|
|
25
26
|
t++;
|
|
26
27
|
if (t > 0) {
|
|
27
28
|
e = 1e3 + t;
|
|
28
|
-
const
|
|
29
|
-
(
|
|
29
|
+
const m = o.charAt(t), v = a.charAt(t);
|
|
30
|
+
(m === "" || p.test(m) || v === "" || p.test(v)) && (e += 50);
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
e > l ? (l = e, n = f) : (e === l && n !== null && f.length > n.length || e === l && n === null) && (n = f);
|
|
33
34
|
}
|
|
34
35
|
return n !== null ? i.get(n) : "";
|
|
35
|
-
},
|
|
36
|
+
}, j = (i, y, p) => {
|
|
36
37
|
const o = S(F), n = x(F), l = S(w), f = x(w), N = S(A), a = x(A), e = B.useMemo(() => o.getById(i, {
|
|
37
38
|
namespaceId: y,
|
|
38
|
-
projectId:
|
|
39
|
+
projectId: p
|
|
39
40
|
}), [i, n]);
|
|
40
41
|
return B.useMemo(() => {
|
|
41
42
|
if (!e) return [];
|
|
42
43
|
if (f.length <= 0) return [];
|
|
43
44
|
if (a.length <= 0) return [];
|
|
44
45
|
const s = [], t = /* @__PURE__ */ new Set();
|
|
45
|
-
let
|
|
46
|
+
let m = 0, v = 0;
|
|
46
47
|
s.push({
|
|
47
48
|
id: `${e.id}`,
|
|
48
49
|
type: "trigger",
|
|
@@ -75,17 +76,17 @@ const _ = /* @__PURE__ */ new Map([["std", "default"]]), k = (i, y) => {
|
|
|
75
76
|
isParameter: C,
|
|
76
77
|
flowId: i,
|
|
77
78
|
parentNodeId: C ? M : void 0,
|
|
78
|
-
index: ++
|
|
79
|
+
index: ++v,
|
|
79
80
|
color: D(d)
|
|
80
81
|
}
|
|
81
82
|
}));
|
|
82
83
|
const R = r.functionDefinition?.id ? l.getById(r.functionDefinition.id) : void 0;
|
|
83
|
-
if (r.parameters?.nodes?.forEach((
|
|
84
|
-
const h =
|
|
84
|
+
if (r.parameters?.nodes?.forEach((g) => {
|
|
85
|
+
const h = g?.value;
|
|
85
86
|
if (!h || h.__typename !== "NodeFunctionIdWrapper") return;
|
|
86
|
-
const T = R?.parameterDefinitions?.find((c) => c.id ===
|
|
87
|
+
const T = R?.parameterDefinitions?.find((c) => c.id === g?.parameterDefinition?.id);
|
|
87
88
|
if ((T?.dataTypeIdentifier ? N.getDataType(T.dataTypeIdentifier) : void 0)?.variant === "NODE") {
|
|
88
|
-
const c = `${d}-group-${
|
|
89
|
+
const c = `${d}-group-${m++}`;
|
|
89
90
|
t.has(c) || (t.add(c), s.push({
|
|
90
91
|
id: c,
|
|
91
92
|
type: "group",
|
|
@@ -111,8 +112,8 @@ const _ = /* @__PURE__ */ new Map([["std", "default"]]), k = (i, y) => {
|
|
|
111
112
|
c && I(c, !0, d, u);
|
|
112
113
|
}
|
|
113
114
|
}), r.nextNodeId) {
|
|
114
|
-
const
|
|
115
|
-
|
|
115
|
+
const g = o.getNodeById(e.id, r.nextNodeId);
|
|
116
|
+
g && I(g, !1, void 0, u);
|
|
116
117
|
}
|
|
117
118
|
};
|
|
118
119
|
if (e.startingNodeId) {
|
|
@@ -123,5 +124,5 @@ const _ = /* @__PURE__ */ new Map([["std", "default"]]), k = (i, y) => {
|
|
|
123
124
|
}, [e, n, f, a]);
|
|
124
125
|
};
|
|
125
126
|
export {
|
|
126
|
-
|
|
127
|
+
j as useFlowNodes
|
|
127
128
|
};
|
|
@@ -2,8 +2,9 @@ import "../../utils/contextStore.js";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { ReactiveArrayService as l } from "../../utils/reactiveArrayService.js";
|
|
4
4
|
import "merge-props";
|
|
5
|
+
import "js-md5";
|
|
5
6
|
import { View as c } from "../../utils/view.js";
|
|
6
|
-
class
|
|
7
|
+
class x extends l {
|
|
7
8
|
getById(n, i) {
|
|
8
9
|
return this.values(i).find((t) => t.id === n);
|
|
9
10
|
}
|
|
@@ -143,5 +144,5 @@ class v extends l {
|
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
146
|
export {
|
|
146
|
-
|
|
147
|
+
x as DFlowReactiveService
|
|
147
148
|
};
|
|
@@ -2,11 +2,11 @@ import "../../utils/contextStore.js";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { ReactiveArrayService as c } from "../../utils/reactiveArrayService.js";
|
|
4
4
|
import "merge-props";
|
|
5
|
+
import { md5 as g } from "js-md5";
|
|
5
6
|
import { DataTypeView as l } from "./DFlowDataType.view.js";
|
|
6
|
-
import { resolveType as
|
|
7
|
-
import { useValueValidation as
|
|
8
|
-
import { findReturnNode as
|
|
9
|
-
import { md5 as _ } from "js-md5";
|
|
7
|
+
import { resolveType as m } from "../../utils/generics.js";
|
|
8
|
+
import { useValueValidation as v } from "../d-flow-validation/DValueValidation.hook.js";
|
|
9
|
+
import { findReturnNode as _ } from "./rules/DFlowDataTypeReturnTypeRule.js";
|
|
10
10
|
class R extends c {
|
|
11
11
|
getDataType(e, n) {
|
|
12
12
|
if (!e || e.genericKey) return;
|
|
@@ -42,7 +42,7 @@ class R extends c {
|
|
|
42
42
|
}
|
|
43
43
|
}, i);
|
|
44
44
|
}
|
|
45
|
-
const t = this.values(i).filter((u) => e.__typename === "NodeFunctionIdWrapper" && (u.variant != "NODE" || !n) ? !1 :
|
|
45
|
+
const t = this.values(i).filter((u) => e.__typename === "NodeFunctionIdWrapper" && (u.variant != "NODE" || !n) ? !1 : v(e, u, this, n));
|
|
46
46
|
return t[t.length - 1];
|
|
47
47
|
}
|
|
48
48
|
getValueFromType(e, n, i) {
|
|
@@ -135,7 +135,7 @@ class R extends c {
|
|
|
135
135
|
target: p
|
|
136
136
|
};
|
|
137
137
|
if (s && s.variant == "RETURN_TYPE" && t.variant === "NODE") {
|
|
138
|
-
const a =
|
|
138
|
+
const a = _(e, n)?.parameters?.nodes?.[0]?.value;
|
|
139
139
|
return {
|
|
140
140
|
sourceDataTypeIdentifiers: [this.getTypeFromValue(a ?? {
|
|
141
141
|
__typename: "LiteralValue",
|
|
@@ -168,7 +168,7 @@ class R extends c {
|
|
|
168
168
|
dataType: new l({
|
|
169
169
|
...t.json,
|
|
170
170
|
genericKeys: [],
|
|
171
|
-
identifier:
|
|
171
|
+
identifier: g(String(e.value)),
|
|
172
172
|
rules: {
|
|
173
173
|
nodes: r
|
|
174
174
|
}
|
|
@@ -192,7 +192,7 @@ class R extends c {
|
|
|
192
192
|
identifier: t.identifier
|
|
193
193
|
}
|
|
194
194
|
};
|
|
195
|
-
return
|
|
195
|
+
return m(y, this);
|
|
196
196
|
}
|
|
197
197
|
hasDataTypes(e, n) {
|
|
198
198
|
return e.every((i) => this.values(n).find((t) => t.id === (i.genericType?.dataType?.id ?? i.dataType?.id)));
|
|
@@ -3,6 +3,7 @@ import r from "react";
|
|
|
3
3
|
import "../../_virtual/compiler-runtime.js";
|
|
4
4
|
import "@radix-ui/react-checkbox";
|
|
5
5
|
import "merge-props";
|
|
6
|
+
import "js-md5";
|
|
6
7
|
import "@tabler/icons-react";
|
|
7
8
|
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
8
9
|
import "../form/EmailInput.js";
|
|
@@ -18,7 +19,6 @@ import { useForm as M } from "../form/useForm.js";
|
|
|
18
19
|
import { Flex as k } from "../flex/Flex.js";
|
|
19
20
|
import { useService as p, useStore as S } from "../../utils/contextStore.js";
|
|
20
21
|
import { DFlowFunctionReactiveService as g } from "../d-flow-function/DFlowFunction.service.js";
|
|
21
|
-
import "js-md5";
|
|
22
22
|
import "../d-flow/DFlow.js";
|
|
23
23
|
import { DFlowReactiveService as V } from "../d-flow/DFlow.service.js";
|
|
24
24
|
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
@@ -2,9 +2,9 @@ import { jsxs as V, jsx as u } from "react/jsx-runtime";
|
|
|
2
2
|
import I from "react";
|
|
3
3
|
import { useService as c } from "../../utils/contextStore.js";
|
|
4
4
|
import "merge-props";
|
|
5
|
+
import "js-md5";
|
|
5
6
|
import "../d-flow/DFlow.js";
|
|
6
7
|
import { DFlowReactiveService as b } from "../d-flow/DFlow.service.js";
|
|
7
|
-
import "js-md5";
|
|
8
8
|
import { DFlowDataTypeReactiveService as h } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
9
9
|
import { Flex as F } from "../flex/Flex.js";
|
|
10
10
|
import { DFlowTypeReactiveService as j } from "../d-flow-type/DFlowType.service.js";
|
|
@@ -2,6 +2,7 @@ import { jsx as e, Fragment as E, jsxs as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { useService as f, useStore as g } from "../../utils/contextStore.js";
|
|
3
3
|
import t from "react";
|
|
4
4
|
import "merge-props";
|
|
5
|
+
import "js-md5";
|
|
5
6
|
import { FileTabsService as S } from "../file-tabs/FileTabs.service.js";
|
|
6
7
|
import { FileTabs as U, FileTabsContent as H, FileTabsList as J, FileTabsTrigger as K } from "../file-tabs/FileTabs.js";
|
|
7
8
|
import { Menu as x, MenuTrigger as w, MenuPortal as C, MenuContent as I, MenuLabel as m, MenuItem as l, MenuSeparator as v } from "../menu/Menu.js";
|
|
@@ -11,7 +12,6 @@ import { DLayout as Y } from "../d-layout/DLayout.js";
|
|
|
11
12
|
import { ButtonGroup as Z } from "../button-group/ButtonGroup.js";
|
|
12
13
|
import "../d-flow/DFlow.js";
|
|
13
14
|
import { DFlowReactiveService as A } from "../d-flow/DFlow.service.js";
|
|
14
|
-
import "js-md5";
|
|
15
15
|
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
16
16
|
import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
|
|
17
17
|
import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
|
|
@@ -6,8 +6,8 @@ import { Text as i } from "../text/Text.js";
|
|
|
6
6
|
import { IconChevronRight as b, IconEdit as v, 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
|
-
import { DFlowTypeReactiveService as l } from "../d-flow-type/DFlowType.service.js";
|
|
10
9
|
import "js-md5";
|
|
10
|
+
import { DFlowTypeReactiveService as l } from "../d-flow-type/DFlowType.service.js";
|
|
11
11
|
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
12
12
|
import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
|
|
13
13
|
import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import n from "react";
|
|
3
3
|
import "../../_virtual/compiler-runtime.js";
|
|
4
4
|
import "@radix-ui/react-checkbox";
|
|
5
|
-
import { InputLabel as
|
|
6
|
-
import { InputDescription as
|
|
5
|
+
import { InputLabel as D } from "../form/InputLabel.js";
|
|
6
|
+
import { InputDescription as F } from "../form/InputDescription.js";
|
|
7
7
|
import "merge-props";
|
|
8
|
-
import
|
|
8
|
+
import "js-md5";
|
|
9
|
+
import { InputMessage as S } from "../form/InputMessage.js";
|
|
9
10
|
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
10
|
-
import { IconFile as
|
|
11
|
+
import { IconFile as M, IconArrowUp as v, IconArrowDown as x, IconCornerDownLeft as b } from "@tabler/icons-react";
|
|
11
12
|
import "../form/EmailInput.js";
|
|
12
13
|
import "../form/Input.js";
|
|
13
14
|
import "../form/InputSuggestion.js";
|
|
@@ -17,14 +18,14 @@ import "@radix-ui/react-one-time-password-field";
|
|
|
17
18
|
import "@radix-ui/react-radio-group";
|
|
18
19
|
import "../form/SwitchInput.js";
|
|
19
20
|
import "../form/TextInput.js";
|
|
20
|
-
import { useForm as
|
|
21
|
-
import { Dialog as
|
|
21
|
+
import { useForm as P } from "../form/useForm.js";
|
|
22
|
+
import { Dialog as O, DialogPortal as V, DialogOverlay as z, DialogContent as j, DialogClose as B } from "../dialog/Dialog.js";
|
|
22
23
|
import { Flex as l } from "../flex/Flex.js";
|
|
23
|
-
import { Button as
|
|
24
|
-
import { DFlowFolderItemPathInput as
|
|
25
|
-
import { useService as
|
|
26
|
-
import { DFlowTypeReactiveService as
|
|
27
|
-
import { hashToColor as
|
|
24
|
+
import { Button as p } from "../button/Button.js";
|
|
25
|
+
import { DFlowFolderItemPathInput as L } from "./DFlowFolderItemPathInput.js";
|
|
26
|
+
import { useService as N, useStore as Y } from "../../utils/contextStore.js";
|
|
27
|
+
import { DFlowTypeReactiveService as h } from "../d-flow-type/DFlowType.service.js";
|
|
28
|
+
import { hashToColor as k } from "../d-flow/DFlow.util.js";
|
|
28
29
|
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
29
30
|
import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
|
|
30
31
|
import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
|
|
@@ -32,22 +33,21 @@ import "../d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js";
|
|
|
32
33
|
import "../d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js";
|
|
33
34
|
import "../d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js";
|
|
34
35
|
import "../d-flow-data-type/variants/DFlowDataTypeNodeVariant.js";
|
|
35
|
-
import "js
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
|
|
40
|
-
const Pe = (t) => {
|
|
36
|
+
import { Menu as q, MenuTrigger as A, MenuPortal as R, MenuContent as E, MenuItem as U, MenuLabel as W } from "../menu/Menu.js";
|
|
37
|
+
import { Spacing as c } from "../spacing/Spacing.js";
|
|
38
|
+
import { Badge as s } from "../badge/Badge.js";
|
|
39
|
+
import { Card as G } from "../card/Card.js";
|
|
40
|
+
const Ve = (t) => {
|
|
41
41
|
const {
|
|
42
42
|
open: m
|
|
43
|
-
} = t,
|
|
43
|
+
} = t, d = N(h), u = Y(h), [g, y] = n.useState(m), [a, w] = n.useState(t.flowTypeId), f = n.useMemo(() => d.getById(a), [a, u]), I = n.useMemo(() => ({
|
|
44
44
|
name: "",
|
|
45
45
|
flowTypeId: t.flowTypeId ?? null
|
|
46
|
-
}), []);
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
}), []), C = n.useMemo(() => d.values(), [u]);
|
|
47
|
+
n.useEffect(() => {
|
|
48
|
+
y(m);
|
|
49
49
|
}, [m]);
|
|
50
|
-
const [
|
|
50
|
+
const [i, T] = P({
|
|
51
51
|
initialValues: I,
|
|
52
52
|
validate: {
|
|
53
53
|
name: (o) => o ? null : "Name is required",
|
|
@@ -57,57 +57,59 @@ const Pe = (t) => {
|
|
|
57
57
|
t.onCreate?.(o.name, o.flowTypeId), t.onOpenChange?.(!1);
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
return /* @__PURE__ */ e(
|
|
60
|
+
return /* @__PURE__ */ e(O, { open: g, onOpenChange: (o) => {
|
|
61
61
|
t.onOpenChange?.(o);
|
|
62
|
-
}, children: /* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
|
|
65
|
-
/* @__PURE__ */ e(D, { children: "
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
62
|
+
}, children: /* @__PURE__ */ r(V, { children: [
|
|
63
|
+
/* @__PURE__ */ e(z, {}),
|
|
64
|
+
/* @__PURE__ */ r(j, { autoFocus: !0, showCloseButton: !0, title: "Create new flow", children: [
|
|
65
|
+
/* @__PURE__ */ e(D, { children: "Type of flow" }),
|
|
66
|
+
/* @__PURE__ */ e(F, { children: "You can choose a flow type here" }),
|
|
67
|
+
/* @__PURE__ */ r(q, { children: [
|
|
68
|
+
/* @__PURE__ */ e(A, { asChild: !0, children: /* @__PURE__ */ r(p, { w: "100%", color: i.getInputProps("flowTypeId").formValidation?.valid ? "secondary" : "error", style: {
|
|
68
69
|
justifyContent: "start"
|
|
69
70
|
}, children: [
|
|
70
|
-
a ? /* @__PURE__ */ e(
|
|
71
|
-
|
|
71
|
+
a ? /* @__PURE__ */ e(M, { size: 13, color: k(a) }) : null,
|
|
72
|
+
f ? f?.names?.[0].content : "Select flow type"
|
|
72
73
|
] }) }),
|
|
73
|
-
/* @__PURE__ */ e(
|
|
74
|
-
/* @__PURE__ */ e(
|
|
74
|
+
/* @__PURE__ */ e(R, { children: /* @__PURE__ */ r(E, { align: "start", color: "secondary", sideOffset: 8, children: [
|
|
75
|
+
/* @__PURE__ */ e(G, { paddingSize: "xxs", mt: -0.35, mx: -0.35, style: {
|
|
75
76
|
borderWidth: "2px"
|
|
76
|
-
}, children:
|
|
77
|
-
|
|
77
|
+
}, children: C.map((o) => /* @__PURE__ */ e(U, { onSelect: () => {
|
|
78
|
+
i.getInputProps("flowTypeId").formValidation?.setValue(o.id), w(o.id);
|
|
78
79
|
}, children: o.names?.[0].content }, o.id)) }),
|
|
79
|
-
/* @__PURE__ */ e(
|
|
80
|
+
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ r(l, { style: {
|
|
80
81
|
gap: ".35rem"
|
|
81
82
|
}, children: [
|
|
82
83
|
/* @__PURE__ */ r(l, { align: "center", style: {
|
|
83
84
|
gap: "0.35rem"
|
|
84
85
|
}, children: [
|
|
85
86
|
/* @__PURE__ */ r(l, { children: [
|
|
86
|
-
/* @__PURE__ */ e(
|
|
87
|
-
/* @__PURE__ */ e(
|
|
87
|
+
/* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(v, { size: 12 }) }),
|
|
88
|
+
/* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(x, { size: 12 }) })
|
|
88
89
|
] }),
|
|
89
90
|
"move"
|
|
90
91
|
] }),
|
|
91
|
-
/* @__PURE__ */ e(
|
|
92
|
+
/* @__PURE__ */ e(c, { spacing: "xxs" }),
|
|
92
93
|
/* @__PURE__ */ r(l, { align: "center", style: {
|
|
93
94
|
gap: ".35rem"
|
|
94
95
|
}, children: [
|
|
95
|
-
/* @__PURE__ */ e(
|
|
96
|
+
/* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(b, { size: 12 }) }),
|
|
96
97
|
"select"
|
|
97
98
|
] })
|
|
98
99
|
] }) })
|
|
99
100
|
] }) })
|
|
100
101
|
] }),
|
|
101
|
-
|
|
102
|
-
/* @__PURE__ */ e(
|
|
103
|
-
/* @__PURE__ */ e(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
i.getInputProps("flowTypeId").formValidation?.valid ? null : /* @__PURE__ */ e(S, { children: i.getInputProps("flowTypeId").formValidation?.notValidMessage }),
|
|
103
|
+
/* @__PURE__ */ e(c, { spacing: "md" }),
|
|
104
|
+
/* @__PURE__ */ e(L, { description: "You can choose a name here and only use alphanumeric names.", title: "Name of the flow", ...i.getInputProps("name") }),
|
|
105
|
+
/* @__PURE__ */ e(c, { spacing: "md" }),
|
|
106
|
+
/* @__PURE__ */ r(l, { justify: "space-between", align: "center", children: [
|
|
107
|
+
/* @__PURE__ */ e(B, { asChild: !0, children: /* @__PURE__ */ e(p, { color: "secondary", children: "No, go back!" }) }),
|
|
108
|
+
/* @__PURE__ */ e(p, { color: "success", onClick: T, children: "Yes, create!" })
|
|
109
|
+
] })
|
|
108
110
|
] })
|
|
109
|
-
] }) })
|
|
111
|
+
] }) });
|
|
110
112
|
};
|
|
111
113
|
export {
|
|
112
|
-
|
|
114
|
+
Ve as DFlowFolderCreateDialog
|
|
113
115
|
};
|