@code0-tech/pictor 0.0.0-mvp.43 → 0.0.0-mvp.45
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/assets/components/menu/Menu.style.css +1 -1
- package/dist/components/avatar/Avatar.d.ts +1 -0
- package/dist/components/avatar/Avatar.js +44 -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 +58 -106
- 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 +1 -1
- 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/DNamespaceProject.view.d.ts +7 -1
- package/dist/components/d-project/DNamespaceProject.view.js +7 -1
- 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/form/index.d.ts +1 -0
- package/dist/components/form/index.js +25 -23
- package/dist/index.js +178 -181
- 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 +16 -14
|
@@ -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
|
};
|
|
@@ -1,59 +1,64 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { DialogClose as
|
|
4
|
-
import { Text as
|
|
5
|
-
import { Badge as
|
|
6
|
-
import { Flex as
|
|
7
|
-
import { Button as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
const e =
|
|
1
|
+
import { jsx as o, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { c as F } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { DialogOverlay as R, DialogClose as b, DialogPortal as S, DialogContent as B, Dialog as E } from "../dialog/Dialog.js";
|
|
4
|
+
import { Text as v } from "../text/Text.js";
|
|
5
|
+
import { Badge as k } from "../badge/Badge.js";
|
|
6
|
+
import { Flex as z } from "../flex/Flex.js";
|
|
7
|
+
import { Button as _ } from "../button/Button.js";
|
|
8
|
+
import O from "react";
|
|
9
|
+
const H = (t) => {
|
|
10
|
+
const e = F.c(24), {
|
|
11
11
|
open: r
|
|
12
|
-
} = t, [
|
|
12
|
+
} = t, [y, j] = O.useState(r);
|
|
13
13
|
let m, f;
|
|
14
14
|
e[0] !== r ? (m = () => {
|
|
15
|
-
|
|
16
|
-
}, f = [r], e[0] = r, e[1] = m, e[2] = f) : (m = e[1], f = e[2]),
|
|
15
|
+
j(r);
|
|
16
|
+
}, f = [r], e[0] = r, e[1] = m, e[2] = f) : (m = e[1], f = e[2]), O.useEffect(m, f);
|
|
17
17
|
let l;
|
|
18
|
-
e[3] !== t ? (l = (
|
|
19
|
-
const u = t.contextData.type == "item" ? "Remove flow" : "Remove folder", x = t.contextData.type == "item" ? "Are you sure you want to remove flow" : "Are you sure you want to remove folder";
|
|
18
|
+
e[3] !== t ? (l = (C) => t.onOpenChange?.(C), e[3] = t, e[4] = l) : l = e[4];
|
|
20
19
|
let s;
|
|
21
|
-
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = {
|
|
20
|
+
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ o(R, {}), e[5] = s) : s = e[5];
|
|
21
|
+
const x = t.contextData.type == "item" ? "Remove flow" : "Remove folder", g = t.contextData.type == "item" ? "Are you sure you want to remove flow" : "Are you sure you want to remove folder";
|
|
22
|
+
let d;
|
|
23
|
+
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
22
24
|
color: "inherit"
|
|
23
|
-
}, e[
|
|
25
|
+
}, e[6] = d) : d = e[6];
|
|
24
26
|
let n;
|
|
25
|
-
e[
|
|
26
|
-
const
|
|
27
|
+
e[7] !== t.contextData.name ? (n = /* @__PURE__ */ o(k, { color: "info", children: /* @__PURE__ */ o(v, { size: "md", style: d, children: t.contextData.name }) }), e[7] = t.contextData.name, e[8] = n) : n = e[8];
|
|
28
|
+
const w = t.contextData.type == "folder" ? ", all flows and sub-folders inside " : "";
|
|
27
29
|
let i;
|
|
28
|
-
e[
|
|
29
|
-
|
|
30
|
+
e[9] !== g || e[10] !== n || e[11] !== w ? (i = /* @__PURE__ */ u(v, { size: "md", hierarchy: "secondary", children: [
|
|
31
|
+
g,
|
|
30
32
|
" ",
|
|
31
33
|
" ",
|
|
32
34
|
n,
|
|
33
35
|
" ",
|
|
34
36
|
" ",
|
|
35
|
-
|
|
37
|
+
w,
|
|
36
38
|
"from the this project?"
|
|
37
|
-
] }), e[
|
|
38
|
-
let
|
|
39
|
-
e[
|
|
39
|
+
] }), e[9] = g, e[10] = n, e[11] = w, e[12] = i) : i = e[12];
|
|
40
|
+
let h;
|
|
41
|
+
e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ o(b, { asChild: !0, children: /* @__PURE__ */ o(_, { color: "secondary", children: "No, go back!" }) }), e[13] = h) : h = e[13];
|
|
40
42
|
let a;
|
|
41
|
-
e[
|
|
42
|
-
|
|
43
|
-
/* @__PURE__ */ o(
|
|
44
|
-
t.contextData.type === "item" ? t.onDelete?.(t.contextData.flow) : t.contextData.type === "folder" && t.contextData.flow.forEach((
|
|
45
|
-
t.onDelete?.(
|
|
43
|
+
e[14] !== t ? (a = /* @__PURE__ */ u(z, { justify: "space-between", align: "center", children: [
|
|
44
|
+
h,
|
|
45
|
+
/* @__PURE__ */ o(b, { asChild: !0, children: /* @__PURE__ */ o(_, { color: "error", onClick: () => {
|
|
46
|
+
t.contextData.type === "item" ? t.onDelete?.(t.contextData.flow) : t.contextData.type === "folder" && t.contextData.flow.forEach((C) => {
|
|
47
|
+
t.onDelete?.(C);
|
|
46
48
|
});
|
|
47
49
|
}, children: "Yes, remove!" }) })
|
|
48
|
-
] }), e[
|
|
50
|
+
] }), e[14] = t, e[15] = a) : a = e[15];
|
|
49
51
|
let c;
|
|
50
|
-
e[
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
e[16] !== a || e[17] !== x || e[18] !== i ? (c = /* @__PURE__ */ u(S, { children: [
|
|
53
|
+
s,
|
|
54
|
+
/* @__PURE__ */ u(B, { autoFocus: !0, showCloseButton: !0, title: x, children: [
|
|
55
|
+
i,
|
|
56
|
+
a
|
|
57
|
+
] })
|
|
58
|
+
] }), e[16] = a, e[17] = x, e[18] = i, e[19] = c) : c = e[19];
|
|
59
|
+
let D;
|
|
60
|
+
return e[20] !== y || e[21] !== c || e[22] !== l ? (D = /* @__PURE__ */ o(E, { open: y, onOpenChange: l, children: c }), e[20] = y, e[21] = c, e[22] = l, e[23] = D) : D = e[23], D;
|
|
56
61
|
};
|
|
57
62
|
export {
|
|
58
|
-
|
|
63
|
+
H as DFlowFolderDeleteDialog
|
|
59
64
|
};
|
|
@@ -3,6 +3,7 @@ import { c as l } from "../../_virtual/compiler-runtime.js";
|
|
|
3
3
|
import "react";
|
|
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";
|
|
@@ -15,7 +16,7 @@ import "@radix-ui/react-radio-group";
|
|
|
15
16
|
import "../form/SwitchInput.js";
|
|
16
17
|
import { TextInput as c } from "../form/TextInput.js";
|
|
17
18
|
import { Badge as h } from "../badge/Badge.js";
|
|
18
|
-
const
|
|
19
|
+
const S = (e) => {
|
|
19
20
|
const r = l.c(4);
|
|
20
21
|
let t;
|
|
21
22
|
r[0] !== e ? ({
|
|
@@ -46,5 +47,5 @@ function a(e, r) {
|
|
|
46
47
|
}).flat();
|
|
47
48
|
}
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
S as DFlowFolderItemPathInput
|
|
50
51
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Dialog as f, DialogPortal as D,
|
|
4
|
-
import { DFlowFolderItemPathInput as
|
|
5
|
-
import { Flex as
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import r from "react";
|
|
3
|
+
import { Dialog as f, DialogPortal as D, DialogOverlay as g, DialogContent as x, DialogClose as m } from "../dialog/Dialog.js";
|
|
4
|
+
import { DFlowFolderItemPathInput as w } from "./DFlowFolderItemPathInput.js";
|
|
5
|
+
import { Flex as y } from "../flex/Flex.js";
|
|
6
6
|
import { Button as l } from "../button/Button.js";
|
|
7
7
|
import "../../_virtual/compiler-runtime.js";
|
|
8
8
|
import "@radix-ui/react-checkbox";
|
|
9
9
|
import "merge-props";
|
|
10
|
+
import "js-md5";
|
|
10
11
|
import "@tabler/icons-react";
|
|
11
12
|
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
12
13
|
import "../form/EmailInput.js";
|
|
@@ -19,37 +20,40 @@ import "@radix-ui/react-radio-group";
|
|
|
19
20
|
import "../form/SwitchInput.js";
|
|
20
21
|
import "../form/TextInput.js";
|
|
21
22
|
import { useForm as C } from "../form/useForm.js";
|
|
22
|
-
const
|
|
23
|
+
const K = (e) => {
|
|
23
24
|
const {
|
|
24
|
-
open:
|
|
25
|
-
} = e, [c, h] =
|
|
25
|
+
open: a
|
|
26
|
+
} = e, [c, h] = r.useState(a), u = r.useMemo(() => ({
|
|
26
27
|
path: e.contextData.name
|
|
27
28
|
}), []);
|
|
28
|
-
|
|
29
|
-
h(
|
|
30
|
-
}, [
|
|
31
|
-
const [
|
|
29
|
+
r.useEffect(() => {
|
|
30
|
+
h(a);
|
|
31
|
+
}, [a]);
|
|
32
|
+
const [p, s] = C({
|
|
32
33
|
initialValues: u,
|
|
33
34
|
validate: {
|
|
34
35
|
path: (o) => null
|
|
35
36
|
},
|
|
36
37
|
onSubmit: (o) => {
|
|
37
|
-
e.contextData.type === "item" ? e.onRename?.(e.contextData.flow, o.path) : e.contextData.type === "folder" && e.contextData.flow.forEach((
|
|
38
|
-
const d =
|
|
39
|
-
e.onRename?.(
|
|
38
|
+
e.contextData.type === "item" ? e.onRename?.(e.contextData.flow, o.path) : e.contextData.type === "folder" && e.contextData.flow.forEach((n) => {
|
|
39
|
+
const d = n.name?.replace(e.contextData.name, o.path) ?? n.name;
|
|
40
|
+
e.onRename?.(n, d);
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
44
|
return /* @__PURE__ */ t(f, { open: c, onOpenChange: (o) => {
|
|
44
45
|
e.onOpenChange?.(o);
|
|
45
|
-
}, children: /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */ t(
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */ t(
|
|
49
|
-
/* @__PURE__ */
|
|
46
|
+
}, children: /* @__PURE__ */ i(D, { children: [
|
|
47
|
+
/* @__PURE__ */ t(g, {}),
|
|
48
|
+
/* @__PURE__ */ i(x, { autoFocus: !0, showCloseButton: !0, title: e.contextData.type == "item" ? "Rename flow" : "Rename folder", children: [
|
|
49
|
+
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(w, { description: "You can choose a new name here and only use alphanumeric names.", title: e.contextData.type == "item" ? "Name of the flow" : "Name of the folder", ...p.getInputProps("path") }) }),
|
|
50
|
+
/* @__PURE__ */ i(y, { justify: "space-between", align: "center", children: [
|
|
51
|
+
/* @__PURE__ */ t(m, { asChild: !0, children: /* @__PURE__ */ t(l, { color: "secondary", children: "No, go back!" }) }),
|
|
52
|
+
/* @__PURE__ */ t(m, { asChild: !0, children: /* @__PURE__ */ t(l, { color: "success", onClick: s, children: "Yes, save!" }) })
|
|
53
|
+
] })
|
|
50
54
|
] })
|
|
51
|
-
] }) })
|
|
55
|
+
] }) });
|
|
52
56
|
};
|
|
53
57
|
export {
|
|
54
|
-
|
|
58
|
+
K as DFlowFolderRenameDialog
|
|
55
59
|
};
|
|
@@ -2,11 +2,12 @@ import "../../utils/contextStore.js";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { ReactiveArrayService as t } from "../../utils/reactiveArrayService.js";
|
|
4
4
|
import "merge-props";
|
|
5
|
-
|
|
5
|
+
import "js-md5";
|
|
6
|
+
class s extends t {
|
|
6
7
|
getById(e, i) {
|
|
7
8
|
return this.values(i).find((r) => r.id === e);
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
s as DFlowFunctionReactiveService
|
|
12
13
|
};
|
|
@@ -5,6 +5,7 @@ import "@radix-ui/react-checkbox";
|
|
|
5
5
|
import { InputLabel as O } from "../form/InputLabel.js";
|
|
6
6
|
import { InputDescription as _ } from "../form/InputDescription.js";
|
|
7
7
|
import "merge-props";
|
|
8
|
+
import "js-md5";
|
|
8
9
|
import { IconEdit as Y } from "@tabler/icons-react";
|
|
9
10
|
import '../../assets/components/d-flow-input/DFlowInputDataType.style.css';import '../../assets/components/form/Input.style.css';/* empty css */
|
|
10
11
|
import "../form/EmailInput.js";
|
|
@@ -27,17 +28,17 @@ import { hashToColor as B } from "../d-flow/DFlow.util.js";
|
|
|
27
28
|
import { useService as P, useStore as R } from "../../utils/contextStore.js";
|
|
28
29
|
import { DFlowDataTypeReactiveService as I } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
29
30
|
import { DFlowInputDataTypeEditDialog as W } from "./DFlowInputDataTypeEditDialog.js";
|
|
30
|
-
const
|
|
31
|
+
const Ie = (f) => {
|
|
31
32
|
const {
|
|
32
33
|
initialValue: i,
|
|
33
34
|
defaultValue: o,
|
|
34
|
-
value:
|
|
35
|
-
label:
|
|
35
|
+
value: p,
|
|
36
|
+
label: s,
|
|
36
37
|
description: D
|
|
37
|
-
} = f, r =
|
|
38
|
+
} = f, r = p ?? i ?? o ?? null, h = P(I), g = R(I), [E, d] = m.useState(!1), t = m.useMemo(() => h.getDataType(r), [g, r]);
|
|
38
39
|
return /* @__PURE__ */ a("div", { children: [
|
|
39
40
|
/* @__PURE__ */ e(W, { dataTypeIdentifier: r, open: E, onDataTypeChange: f.onChange, onOpenChange: (n) => d(n) }),
|
|
40
|
-
/* @__PURE__ */ e(O, { children:
|
|
41
|
+
/* @__PURE__ */ e(O, { children: s }),
|
|
41
42
|
/* @__PURE__ */ e(_, { children: D }),
|
|
42
43
|
/* @__PURE__ */ a(K, { color: "secondary", paddingSize: "xs", children: [
|
|
43
44
|
/* @__PURE__ */ a(u, { style: {
|
|
@@ -57,18 +58,18 @@ const ve = (f) => {
|
|
|
57
58
|
const {
|
|
58
59
|
dataTypeIdentifier: i,
|
|
59
60
|
parentRule: o,
|
|
60
|
-
isRoot:
|
|
61
|
-
} = f,
|
|
61
|
+
isRoot: p = !o
|
|
62
|
+
} = f, s = P(I), D = R(I), r = m.useMemo(() => {
|
|
62
63
|
const t = i.genericType?.genericMappers ?? [];
|
|
63
64
|
return new Map(t.map((n) => [n.target, n]));
|
|
64
|
-
}, [i]), h = m.useMemo(() => i.genericKey ? r.get(i.genericKey)?.sourceDataTypeIdentifiers?.map((n) =>
|
|
65
|
+
}, [i]), h = m.useMemo(() => i.genericKey ? r.get(i.genericKey)?.sourceDataTypeIdentifiers?.map((n) => s.getDataType(n)) ?? [] : [s.getDataType(i)], [D, i, r]), g = m.useCallback((t) => t ? t.genericKey ? r.get(t.genericKey)?.sourceDataTypeIdentifiers?.[0] ?? null : t : null, [r]), d = m.useMemo(() => h.flatMap((t, n) => {
|
|
65
66
|
const N = t?.rules?.nodes ?? [];
|
|
66
67
|
return N.length ? N.map((l, k) => {
|
|
67
68
|
const x = `${n}-${k}`, w = l?.config?.dataTypeIdentifier, y = g(w);
|
|
68
69
|
if (l?.variant === "PARENT_TYPE" && y)
|
|
69
|
-
return /* @__PURE__ */ e(S, { dataTypeIdentifier: y, parentRule: l, isRoot:
|
|
70
|
+
return /* @__PURE__ */ e(S, { dataTypeIdentifier: y, parentRule: l, isRoot: p }, x);
|
|
70
71
|
if (!y) return null;
|
|
71
|
-
const b =
|
|
72
|
+
const b = s.getDataType(y), M = b?.variant === "PRIMITIVE", A = b?.name?.[0]?.content;
|
|
72
73
|
let T = null;
|
|
73
74
|
if (l?.variant === "CONTAINS_KEY") {
|
|
74
75
|
const v = l?.config;
|
|
@@ -107,7 +108,7 @@ const ve = (f) => {
|
|
|
107
108
|
] });
|
|
108
109
|
}
|
|
109
110
|
const z = /* @__PURE__ */ e(S, { dataTypeIdentifier: y, parentRule: l });
|
|
110
|
-
return
|
|
111
|
+
return p ? /* @__PURE__ */ a(j, { border: !0, children: [
|
|
111
112
|
" ",
|
|
112
113
|
T,
|
|
113
114
|
" ",
|
|
@@ -121,10 +122,10 @@ const ve = (f) => {
|
|
|
121
122
|
" "
|
|
122
123
|
] }, x);
|
|
123
124
|
}) : [];
|
|
124
|
-
}), [h,
|
|
125
|
-
return d.length === 0 ? null :
|
|
125
|
+
}), [h, p, g, s, o]).filter(Boolean);
|
|
126
|
+
return d.length === 0 ? null : p || o?.variant === "PARENT_TYPE" ? /* @__PURE__ */ e(F, { children: d }) : /* @__PURE__ */ e("ul", { children: d });
|
|
126
127
|
};
|
|
127
128
|
export {
|
|
128
|
-
|
|
129
|
+
Ie as DFlowInputDataType,
|
|
129
130
|
S as DFlowInputDataTypeRuleTree
|
|
130
131
|
};
|
|
@@ -9,6 +9,7 @@ import { Editor as M } from "../editor/Editor.js";
|
|
|
9
9
|
import { DFlowInputDataTypeRuleTree as G } from "./DFlowInputDataType.js";
|
|
10
10
|
import { useService as H, useStore as k } from "../../utils/contextStore.js";
|
|
11
11
|
import "merge-props";
|
|
12
|
+
import "js-md5";
|
|
12
13
|
import { DFlowDataTypeReactiveService as y } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
13
14
|
import { hashToColor as s } from "../d-flow/DFlow.util.js";
|
|
14
15
|
import { ScrollArea as U, ScrollAreaViewport as X, ScrollAreaScrollbar as f, ScrollAreaThumb as h } from "../scroll-area/ScrollArea.js";
|
|
@@ -17,7 +18,7 @@ import { Badge as c } from "../badge/Badge.js";
|
|
|
17
18
|
import { syntaxTree as T } from "@codemirror/language";
|
|
18
19
|
import { Button as q } from "../button/Button.js";
|
|
19
20
|
import { IconX as J } from "@tabler/icons-react";
|
|
20
|
-
const
|
|
21
|
+
const ye = (i) => {
|
|
21
22
|
const {
|
|
22
23
|
open: l,
|
|
23
24
|
onOpenChange: D,
|
|
@@ -97,5 +98,5 @@ const ue = (i) => {
|
|
|
97
98
|
] }) });
|
|
98
99
|
};
|
|
99
100
|
export {
|
|
100
|
-
|
|
101
|
+
ye as DFlowInputDataTypeEditDialog
|
|
101
102
|
};
|
|
@@ -3,6 +3,7 @@ import I 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";
|
|
@@ -20,7 +21,6 @@ import { DFlowSuggestionMenuFooter as T } from "../d-flow-suggestion/DFlowSugges
|
|
|
20
21
|
import { toInputSuggestions as x } from "../d-flow-suggestion/DFlowSuggestionMenu.util.js";
|
|
21
22
|
import { useService as S } from "../../utils/contextStore.js";
|
|
22
23
|
import { DFlowFunctionReactiveService as O } from "../d-flow-function/DFlowFunction.service.js";
|
|
23
|
-
import "js-md5";
|
|
24
24
|
import "../d-flow/DFlow.js";
|
|
25
25
|
import { DFlowReactiveService as h } from "../d-flow/DFlow.service.js";
|
|
26
26
|
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
@@ -5,6 +5,7 @@ import { IconBolt as N, IconNote as h } from "@tabler/icons-react";
|
|
|
5
5
|
import { Text as x } from "../text/Text.js";
|
|
6
6
|
import { useService as n, useStore as m } from "../../utils/contextStore.js";
|
|
7
7
|
import "merge-props";
|
|
8
|
+
import "js-md5";
|
|
8
9
|
import { DFlowFunctionReactiveService as f } from "../d-flow-function/DFlowFunction.service.js";
|
|
9
10
|
import { hashToColor as D } from "../d-flow/DFlow.util.js";
|
|
10
11
|
import "../d-flow/DFlow.js";
|
|
@@ -16,7 +17,6 @@ import "../d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js";
|
|
|
16
17
|
import "../d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js";
|
|
17
18
|
import "../d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js";
|
|
18
19
|
import "../d-flow-data-type/variants/DFlowDataTypeNodeVariant.js";
|
|
19
|
-
import "js-md5";
|
|
20
20
|
import { DFlowTypeReactiveService as l } from "../d-flow-type/DFlowType.service.js";
|
|
21
21
|
import { FlowTypeView as R } from "../d-flow-type/DFlowType.view.js";
|
|
22
22
|
const X = (a) => {
|
|
@@ -2,8 +2,8 @@ import { resolveGenericKeys as v, replaceGenericKeysInType as S } from "../../ut
|
|
|
2
2
|
import { useService as p, useStore as u } from "../../utils/contextStore.js";
|
|
3
3
|
import T from "react";
|
|
4
4
|
import "merge-props";
|
|
5
|
-
import { DFlowFunctionReactiveService as m } from "../d-flow-function/DFlowFunction.service.js";
|
|
6
5
|
import "js-md5";
|
|
6
|
+
import { DFlowFunctionReactiveService as m } from "../d-flow-function/DFlowFunction.service.js";
|
|
7
7
|
import { DFlowDataTypeReactiveService as w } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
8
8
|
import "../d-flow/DFlow.js";
|
|
9
9
|
import { DFlowReactiveService as a } from "../d-flow/DFlow.service.js";
|
|
@@ -3,6 +3,7 @@ import { useService as v, useStore as w } from "../../utils/contextStore.js";
|
|
|
3
3
|
import { underlineBySeverity as E } from "../../utils/inspection.js";
|
|
4
4
|
import c, { memo as H } from "react";
|
|
5
5
|
import "merge-props";
|
|
6
|
+
import "js-md5";
|
|
6
7
|
import { useStore as h, useReactFlow as X, Handle as g, Position as m } from "@xyflow/react";
|
|
7
8
|
import { Card as Y } from "../card/Card.js";
|
|
8
9
|
import '../../assets/components/d-flow-node/DFlowNode.style.css';/* empty css */
|
|
@@ -10,7 +11,6 @@ import { Flex as q } from "../flex/Flex.js";
|
|
|
10
11
|
import { IconNote as D } from "@tabler/icons-react";
|
|
11
12
|
import { Text as y } from "../text/Text.js";
|
|
12
13
|
import { DFlowFunctionReactiveService as F } from "../d-flow-function/DFlowFunction.service.js";
|
|
13
|
-
import "js-md5";
|
|
14
14
|
import { useNodeValidation as G } from "../d-flow-validation/DNodeValidation.hook.js";
|
|
15
15
|
import "../d-flow/DFlow.js";
|
|
16
16
|
import { DFlowReactiveService as _ } from "../d-flow/DFlow.service.js";
|
|
@@ -3,9 +3,9 @@ import c from "react";
|
|
|
3
3
|
import { Panel as u } from "@xyflow/react";
|
|
4
4
|
import { useService as w, useStore as b } from "../../utils/contextStore.js";
|
|
5
5
|
import "merge-props";
|
|
6
|
+
import "js-md5";
|
|
6
7
|
import "../d-flow/DFlow.js";
|
|
7
8
|
import { DFlowReactiveService as m } from "../d-flow/DFlow.service.js";
|
|
8
|
-
import "js-md5";
|
|
9
9
|
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
10
10
|
import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
|
|
11
11
|
import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
|
|
@@ -5,10 +5,10 @@ import { Button as m } from "../button/Button.js";
|
|
|
5
5
|
import { Panel as N } from "@xyflow/react";
|
|
6
6
|
import { useService as f, useStore as u } from "../../utils/contextStore.js";
|
|
7
7
|
import "merge-props";
|
|
8
|
+
import "js-md5";
|
|
8
9
|
import { FileTabsService as v } from "../file-tabs/FileTabs.service.js";
|
|
9
10
|
import "../d-flow/DFlow.js";
|
|
10
11
|
import { DFlowReactiveService as S } from "../d-flow/DFlow.service.js";
|
|
11
|
-
import "js-md5";
|
|
12
12
|
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
13
13
|
import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
|
|
14
14
|
import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
|
|
@@ -6,9 +6,9 @@ import { Tooltip as g, TooltipTrigger as T, TooltipPortal as y, TooltipContent a
|
|
|
6
6
|
import { Text as v } from "../text/Text.js";
|
|
7
7
|
import { useService as S, useStore as I } from "../../utils/contextStore.js";
|
|
8
8
|
import "merge-props";
|
|
9
|
+
import "js-md5";
|
|
9
10
|
import "../d-flow/DFlow.js";
|
|
10
11
|
import { DFlowReactiveService as C } from "../d-flow/DFlow.service.js";
|
|
11
|
-
import "js-md5";
|
|
12
12
|
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
13
13
|
import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
|
|
14
14
|
import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
|
|
@@ -2,8 +2,8 @@ import { c as s } from "../../_virtual/compiler-runtime.js";
|
|
|
2
2
|
import { useService as c, useStore as n } from "../../utils/contextStore.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "merge-props";
|
|
5
|
-
import { DFlowDataTypeReactiveService as p } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
6
5
|
import "js-md5";
|
|
6
|
+
import { DFlowDataTypeReactiveService as p } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
7
7
|
import { DFlowSuggestionType as l } from "./DFlowSuggestion.view.js";
|
|
8
8
|
const _ = (t) => {
|
|
9
9
|
const e = s.c(3), o = c(p);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import c from "react";
|
|
2
2
|
import { useService as F, useStore as v } from "../../utils/contextStore.js";
|
|
3
3
|
import "merge-props";
|
|
4
|
-
import { DFlowDataTypeReactiveService as d } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
5
4
|
import "js-md5";
|
|
5
|
+
import { DFlowDataTypeReactiveService as d } from "../d-flow-data-type/DFlowDataType.service.js";
|
|
6
6
|
import { DFlowSuggestionType as A } from "./DFlowSuggestion.view.js";
|
|
7
7
|
import { DFlowFunctionReactiveService as f } from "../d-flow-function/DFlowFunction.service.js";
|
|
8
8
|
import { replaceGenericsAndSortType as S, resolveType as y, isMatchingType as M } from "../../utils/generics.js";
|