@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.
Files changed (74) hide show
  1. package/dist/assets/components/avatar/Avatar.style.css +1 -1
  2. package/dist/assets/components/menu/Menu.style.css +1 -1
  3. package/dist/components/avatar/Avatar.d.ts +1 -0
  4. package/dist/components/avatar/Avatar.js +44 -48
  5. package/dist/components/d-application/DApplication.service.js +1 -0
  6. package/dist/components/d-flow/DFlow.edges.hook.js +3 -2
  7. package/dist/components/d-flow/DFlow.nodes.hook.js +16 -15
  8. package/dist/components/d-flow/DFlow.service.js +3 -2
  9. package/dist/components/d-flow-data-type/DFlowDataType.service.js +8 -8
  10. package/dist/components/d-flow-file/DFlowTabDefault.js +1 -1
  11. package/dist/components/d-flow-file/DFlowTabTrigger.js +1 -1
  12. package/dist/components/d-flow-file/DFlowTabs.js +58 -106
  13. package/dist/components/d-flow-folder/DFlowFolderContextMenu.js +1 -1
  14. package/dist/components/d-flow-folder/DFlowFolderCreateDialog.js +52 -50
  15. package/dist/components/d-flow-folder/DFlowFolderDeleteDialog.js +43 -38
  16. package/dist/components/d-flow-folder/DFlowFolderItemPathInput.js +3 -2
  17. package/dist/components/d-flow-folder/DFlowFolderRenameDialog.js +26 -22
  18. package/dist/components/d-flow-function/DFlowFunction.service.js +3 -2
  19. package/dist/components/d-flow-input/DFlowInputDataType.js +15 -14
  20. package/dist/components/d-flow-input/DFlowInputDataTypeEditDialog.js +3 -2
  21. package/dist/components/d-flow-input/DFlowInputDefault.js +1 -1
  22. package/dist/components/d-flow-input/DFlowInputNodeBadge.js +1 -1
  23. package/dist/components/d-flow-node/DFlowNode.return.hook.js +1 -1
  24. package/dist/components/d-flow-node/DFlowNodeDefaultCard.js +1 -1
  25. package/dist/components/d-flow-panel/DFlowExport.js +1 -1
  26. package/dist/components/d-flow-panel/DFlowPanelControl.js +1 -1
  27. package/dist/components/d-flow-panel/DFlowPanelUpdate.js +1 -1
  28. package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.js +1 -1
  29. package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.js +1 -1
  30. package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.js +1 -1
  31. package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +1 -1
  32. package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +6 -5
  33. package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.js +3 -2
  34. package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.js +1 -1
  35. package/dist/components/d-flow-type/DFlowType.service.d.ts +3 -3
  36. package/dist/components/d-flow-type/DFlowType.service.js +3 -2
  37. package/dist/components/d-flow-type/DFlowType.view.d.ts +4 -1
  38. package/dist/components/d-flow-type/DFlowType.view.js +16 -10
  39. package/dist/components/d-flow-validation/DFlowValidation.hook.js +1 -1
  40. package/dist/components/d-flow-validation/DFlowValidation.js +3 -2
  41. package/dist/components/d-flow-validation/DNodeValidation.hook.js +1 -1
  42. package/dist/components/d-license/DNamespaceLicense.service.js +3 -2
  43. package/dist/components/d-member/DNamespaceMember.service.js +1 -0
  44. package/dist/components/d-member/DNamespaceMemberContent.js +3 -2
  45. package/dist/components/d-member/DNamespaceMemberList.js +5 -4
  46. package/dist/components/d-namespace/DNamespace.service.js +3 -2
  47. package/dist/components/d-organization/DOrganization.service.js +3 -2
  48. package/dist/components/d-organization/DOrganizationList.js +7 -6
  49. package/dist/components/d-organization/DOrganizatonContent.js +3 -2
  50. package/dist/components/d-organization/index.js +9 -8
  51. package/dist/components/d-project/DNamespaceProject.service.js +3 -2
  52. package/dist/components/d-project/DNamespaceProject.view.d.ts +7 -1
  53. package/dist/components/d-project/DNamespaceProject.view.js +7 -1
  54. package/dist/components/d-project/DNamespaceProjectContent.js +3 -2
  55. package/dist/components/d-project/DNamespaceProjectList.js +3 -2
  56. package/dist/components/d-project/index.js +10 -9
  57. package/dist/components/d-role/DNamespaceRole.service.js +3 -2
  58. package/dist/components/d-role/DNamespaceRoleContent.js +3 -2
  59. package/dist/components/d-role/DNamespaceRoleList.js +6 -5
  60. package/dist/components/d-runtime/DRuntimeContent.js +3 -2
  61. package/dist/components/d-runtime/DRuntimeList.js +3 -2
  62. package/dist/components/d-user/DUser.service.js +3 -2
  63. package/dist/components/d-user/DUserContent.js +6 -5
  64. package/dist/components/d-user/DUserInput.js +3 -2
  65. package/dist/components/d-user/DUserList.js +5 -4
  66. package/dist/components/d-user/DUserMenu.js +5 -4
  67. package/dist/components/d-user/index.js +15 -14
  68. package/dist/components/form/index.d.ts +1 -0
  69. package/dist/components/form/index.js +25 -23
  70. package/dist/index.js +178 -181
  71. package/dist/utils/index.js +19 -24
  72. package/dist/utils/utils.d.ts +3 -18
  73. package/dist/utils/utils.js +101 -176
  74. package/package.json +16 -14
@@ -1 +1 @@
1
- .avatar{aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;overflow:hidden}.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}
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 +1 @@
1
- .menu__content,.menu__sub-content{padding:.35rem;position:relative;box-sizing:border-box;z-index:999}.menu__content,.menu__sub-content{border-radius:1rem}.menu__label{text-transform:uppercase;font-size:.7rem;display:flex;gap:.35rem;align-items:center;padding:.35rem .7rem;color:#ffffff80}.menu__label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item,.menu__sub-trigger,.menu__checkbox-item{border-radius:.65rem;padding:.35rem .7rem;gap:.7rem;cursor:pointer;width:100%;display:flex;align-items:center;font-size:.8rem}.menu__item,.menu__sub-trigger,.menu__checkbox-item{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.menu__item:focus,.menu__sub-trigger:focus,.menu__checkbox-item:focus{outline:none}.menu__item,.menu__sub-trigger,.menu__checkbox-item{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item:disabled,.menu__item[data-disabled],.menu__item[aria-disabled=true],.menu__item--disabled,.menu__sub-trigger:disabled,.menu__sub-trigger[data-disabled],.menu__sub-trigger[aria-disabled=true],.menu__sub-trigger--disabled,.menu__checkbox-item:disabled,.menu__checkbox-item[data-disabled],.menu__checkbox-item[aria-disabled=true],.menu__checkbox-item--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.menu__item,.menu__sub-trigger,.menu__checkbox-item{box-shadow:none}.menu__item:focus,.menu__item[data-focus=true],.menu__sub-trigger:focus,.menu__sub-trigger[data-focus=true],.menu__checkbox-item:focus,.menu__checkbox-item[data-focus=true]{background:#201e2c;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;box-shadow:none;width:100%}.menu__separator{border:none;margin:.35rem 0;color:#ffffff1a;height:1px;background-color:#ffffff1a}.menu__content--primary,.menu__sub-content--primary{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.menu__content--secondary,.menu__sub-content--secondary{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.menu__content--tertiary,.menu__sub-content--tertiary{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.menu__content--success,.menu__sub-content--success{background:#0a1814;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.menu__content--warning,.menu__sub-content--warning{background:#201813;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.menu__content--error,.menu__sub-content--error{background:#1c0516;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.menu__content--info,.menu__sub-content--info{background:#121e24;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}
1
+ .menu__content,.menu__sub-content{padding:.35rem;position:relative;box-sizing:border-box;z-index:999}.menu__content,.menu__sub-content{border-radius:1rem}.menu__label{text-transform:uppercase;font-size:.7rem;display:flex;gap:.35rem;align-items:center;padding:.35rem .7rem;color:#ffffff80}.menu__label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item,.menu__sub-trigger,.menu__checkbox-item{border-radius:.65rem;padding:.35rem .7rem;gap:.7rem;cursor:pointer;width:100%;display:flex;align-items:center;font-size:.8rem}.menu__item,.menu__sub-trigger,.menu__checkbox-item{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box}.menu__item:focus,.menu__sub-trigger:focus,.menu__checkbox-item:focus{outline:none}.menu__item,.menu__sub-trigger,.menu__checkbox-item{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.menu__item:disabled,.menu__item[data-disabled],.menu__item[aria-disabled=true],.menu__item--disabled,.menu__sub-trigger:disabled,.menu__sub-trigger[data-disabled],.menu__sub-trigger[aria-disabled=true],.menu__sub-trigger--disabled,.menu__checkbox-item:disabled,.menu__checkbox-item[data-disabled],.menu__checkbox-item[aria-disabled=true],.menu__checkbox-item--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.menu__item,.menu__sub-trigger,.menu__checkbox-item{box-shadow:none}.menu__item:focus,.menu__item[data-focus=true],.menu__sub-trigger:focus,.menu__sub-trigger[data-focus=true],.menu__checkbox-item:focus,.menu__checkbox-item[data-focus=true]{background:#191825;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;box-shadow:none;width:100%}.menu__separator{border:none;margin:.35rem 0;color:#ffffff1a;height:1px;background-color:#ffffff1a}.menu__content--primary,.menu__sub-content--primary{background:#070514;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}.menu__content--secondary,.menu__sub-content--secondary{background:#191825;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}.menu__content--tertiary,.menu__sub-content--tertiary{background:#201e2c;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}.menu__content--success,.menu__sub-content--success{background:#0a1814;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}.menu__content--warning,.menu__sub-content--warning{background:#201813;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}.menu__content--error,.menu__sub-content--error{background:#1c0516;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}.menu__content--info,.menu__sub-content--info{background:#121e24;box-shadow:inset 0 1px 1px #bfbfbf1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;border:rgb(25.4,23.6,37.1) 2px solid}
@@ -5,5 +5,6 @@ export interface AvatarProps extends Code0Component<HTMLDivElement> {
5
5
  src?: string;
6
6
  size?: number;
7
7
  color?: string;
8
+ type?: 'character' | 'shape';
8
9
  }
9
10
  export declare const Avatar: React.FC<AvatarProps>;
@@ -1,58 +1,54 @@
1
- import { jsx as u } from "react/jsx-runtime";
1
+ import { jsx as d } from "react/jsx-runtime";
2
2
  import { c as v } from "../../_virtual/compiler-runtime.js";
3
- import g from "react";
4
- import { md5 as R } from "js-md5";
5
3
  import '../../assets/components/avatar/Avatar.style.css';/* empty css */
6
- import { mergeCode0Props as x } from "../../utils/utils.js";
7
- import { hashToColor as C } from "../d-flow/DFlow.util.js";
8
- const E = (l) => {
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) => {
9
8
  const t = v.c(3), {
10
- src: c,
11
- size: e
12
- } = l;
9
+ src: e,
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;
13
21
  let o;
14
- return t[0] !== e || t[1] !== c ? (o = /* @__PURE__ */ u("img", { src: c, width: e, height: e, alt: "Avatar image" }), t[0] = e, t[1] = c, t[2] = o) : o = t[2], o;
15
- }, z = ({
16
- identifier: l,
17
- size: t,
18
- color: c
19
- }) => {
20
- const e = g.useRef(null);
21
- g.useEffect(() => {
22
- o();
23
- });
24
- const o = () => {
25
- const i = R(l), r = Math.floor(t / 5), s = c ?? C(l);
26
- e.current.width = r * 5, e.current.height = r * 5;
27
- let a = i.split("").map((m) => (m = parseInt(m, 16), m < 8 ? 0 : 1)), n = [];
28
- n[0] = n[4] = a.slice(0, 5), n[1] = n[3] = a.slice(5, 10), n[2] = a.slice(10, 15);
29
- const f = e.current.getContext("2d");
30
- f.imageSmoothingEnabled = !1, f.clearRect(0, 0, e.current.width, e.current.height), n.forEach((m, h) => {
31
- m.forEach((d, p) => {
32
- d ? (f.fillStyle = s, f.fillRect(r * h, r * p, r, r)) : (f.fillStyle = "transparent", f.fillRect(r * h, r * p, r, r));
33
- });
34
- });
35
- };
36
- return /* @__PURE__ */ u("canvas", { ref: e });
37
- }, k = (l) => {
38
- const t = v.c(14);
39
- let c, e, o, i, r;
40
- if (t[0] !== l) {
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) {
41
36
  const {
42
- identifier: n,
37
+ identifier: a,
43
38
  color: f,
44
- src: m,
45
- size: h,
46
- ...d
47
- } = l;
48
- e = n, c = f, i = m, o = h === void 0 ? 25 : h, r = x(`avatar ${!e && i ? "avatar--image" : ""}`, d), t[0] = l, t[1] = c, t[2] = e, t[3] = o, t[4] = i, t[5] = r;
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;
49
45
  } else
50
- c = t[1], e = t[2], o = t[3], i = t[4], r = t[5];
51
- let s;
52
- t[6] !== c || t[7] !== e || t[8] !== o || t[9] !== i ? (s = e ? /* @__PURE__ */ u(z, { color: c, identifier: e, size: o }) : i ? /* @__PURE__ */ u(E, { src: i, size: o + 13 }) : null, t[6] = c, t[7] = e, t[8] = o, t[9] = i, t[10] = s) : s = t[10];
53
- let a;
54
- return t[11] !== r || t[12] !== s ? (a = /* @__PURE__ */ u("div", { ...r, children: s }), t[11] = r, t[12] = s, t[13] = a) : a = t[13], a;
46
+ e = t[1], i = t[2], r = t[3], s = t[4], o = t[5], l = t[6];
47
+ let c;
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;
55
51
  };
56
52
  export {
57
- k as Avatar
53
+ R as Avatar
58
54
  };
@@ -2,6 +2,7 @@ import "../../utils/contextStore.js";
2
2
  import "react";
3
3
  import { ReactiveArrayService as r } from "../../utils/reactiveArrayService.js";
4
4
  import "merge-props";
5
+ import "js-md5";
5
6
  class c extends r {
6
7
  }
7
8
  export {
@@ -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 H = (i, S, N) => {
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
- H as useFlowEdges
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 g = /[:._\-\/\s]+/, o = y.trim().toLowerCase();
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 === "" || g.test(s)) && (e += 200);
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 v = o.charAt(t), m = a.charAt(t);
29
- (v === "" || g.test(v) || m === "" || g.test(m)) && (e += 50);
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
- }, V = (i, y, g) => {
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: g
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 v = 0, m = 0;
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: ++m,
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((p) => {
84
- const h = p?.value;
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 === p?.parameterDefinition?.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-${v++}`;
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 p = o.getNodeById(e.id, r.nextNodeId);
115
- p && I(p, !1, void 0, u);
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
- V as useFlowNodes
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 v extends l {
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
- v as DFlowReactiveService
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 g } from "../../utils/generics.js";
7
- import { useValueValidation as m } from "../d-flow-validation/DValueValidation.hook.js";
8
- import { findReturnNode as v } from "./rules/DFlowDataTypeReturnTypeRule.js";
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 : m(e, u, this, n));
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 = v(e, n)?.parameters?.nodes?.[0]?.value;
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: _(String(e.value)),
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 g(y, this);
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";
@@ -1,17 +1,17 @@
1
- import { jsx as e, Fragment as E, jsxs as o } from "react/jsx-runtime";
2
- import { useService as f, useStore as g } from "../../utils/contextStore.js";
3
- import t from "react";
1
+ import { jsx as i, Fragment as q, jsxs as s } from "react/jsx-runtime";
2
+ import { useService as u, useStore as f } from "../../utils/contextStore.js";
3
+ import o from "react";
4
4
  import "merge-props";
5
+ import "js-md5";
5
6
  import { FileTabsService as S } from "../file-tabs/FileTabs.service.js";
6
- import { FileTabs as U, FileTabsContent as H, FileTabsList as J, FileTabsTrigger as K } from "../file-tabs/FileTabs.js";
7
- 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";
7
+ import { FileTabs as N, FileTabsContent as O, FileTabsList as W, FileTabsTrigger as G } from "../file-tabs/FileTabs.js";
8
+ import { Menu as b, MenuTrigger as y, MenuPortal as C, MenuContent as w, MenuLabel as h, MenuItem as r, MenuSeparator as p } from "../menu/Menu.js";
8
9
  import { Button as M } from "../button/Button.js";
9
- import { IconPlus as Q, IconArrowUp as z, IconArrowDown as F, IconCornerDownLeft as L, IconDotsVertical as X } from "@tabler/icons-react";
10
- import { DLayout as Y } from "../d-layout/DLayout.js";
11
- import { ButtonGroup as Z } from "../button-group/ButtonGroup.js";
10
+ import { IconPlus as P, IconDotsVertical as V } from "@tabler/icons-react";
11
+ import { DLayout as E } from "../d-layout/DLayout.js";
12
+ import { ButtonGroup as H } from "../button-group/ButtonGroup.js";
12
13
  import "../d-flow/DFlow.js";
13
- import { DFlowReactiveService as A } from "../d-flow/DFlow.service.js";
14
- import "js-md5";
14
+ import { DFlowReactiveService as I } from "../d-flow/DFlow.service.js";
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";
@@ -19,114 +19,66 @@ import "../d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js";
19
19
  import "../d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js";
20
20
  import "../d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js";
21
21
  import "../d-flow-data-type/variants/DFlowDataTypeNodeVariant.js";
22
- import { DFlowTypeReactiveService as B } from "../d-flow-type/DFlowType.service.js";
23
- import { Card as D } from "../card/Card.js";
24
- import { Flex as n } from "../flex/Flex.js";
25
- import { Badge as s } from "../badge/Badge.js";
26
- import { Spacing as k } from "../spacing/Spacing.js";
27
- const Ie = (R) => {
22
+ import { DFlowTypeReactiveService as F } from "../d-flow-type/DFlowType.service.js";
23
+ const he = (x) => {
28
24
  const {
29
- flowId: $,
30
- namespaceId: j,
31
- projectId: q
32
- } = R, i = f(S), a = g(S), N = f(A), O = g(A), W = f(B), G = g(B), h = t.useId(), b = t.useMemo(() => N.getById($, {
33
- namespaceId: j,
34
- projectId: q
35
- }), [O]), p = t.useMemo(() => W.getById(b?.type?.id), [G, b]), y = t.useMemo(() => a.find((r) => r.active)?.id ?? i.getActiveTab()?.id, [a, i]), c = t.useMemo(() => {
36
- if (p?.id)
37
- return i.values().find((r) => r.id === p.id);
38
- }, [a, p]), T = t.useMemo(() => i.values().filter((r) => r.show), [a, c]), P = t.useMemo(() => i.values().filter((r) => !r.show && r.id !== c?.id), [a, c]);
39
- return t.useEffect(() => {
25
+ flowId: L,
26
+ namespaceId: B,
27
+ projectId: A
28
+ } = x, t = u(S), c = f(S), D = u(I), k = f(I), z = u(F), R = f(F), a = o.useId(), v = o.useMemo(() => D.getById(L, {
29
+ namespaceId: B,
30
+ projectId: A
31
+ }), [k]), d = o.useMemo(() => z.getById(v?.type?.id), [R, v]), T = o.useMemo(() => c.find((e) => e.active)?.id ?? t.getActiveTab()?.id, [c, t]), n = o.useMemo(() => {
32
+ if (d?.id)
33
+ return t.values().find((e) => e.id === d.id);
34
+ }, [c, d]), g = o.useMemo(() => t.values().filter((e) => e.show), [c, n]), $ = o.useMemo(() => t.values().filter((e) => !e.show && e.id !== n?.id), [c, n]);
35
+ return o.useEffect(() => {
40
36
  setTimeout(() => {
41
- const d = document.querySelector('[data-id="' + h + '"]').querySelector(".file-tabs__list-content"), u = d.querySelector('[data-value="' + i.getActiveTab()?.id + '"]');
42
- if (d && u) {
43
- const V = u.offsetLeft + u.offsetWidth / 2 - d.offsetWidth / 2;
44
- d.scrollLeft = 0, d.scrollBy({
45
- left: V,
37
+ const l = document.querySelector('[data-id="' + a + '"]').querySelector(".file-tabs__list-content"), m = l.querySelector('[data-value="' + t.getActiveTab()?.id + '"]');
38
+ if (l && m) {
39
+ const j = m.offsetLeft + m.offsetWidth / 2 - l.offsetWidth / 2;
40
+ l.scrollLeft = 0, l.scrollBy({
41
+ left: j,
46
42
  behavior: "smooth"
47
43
  });
48
44
  }
49
45
  }, 0);
50
- }, [y, h]), /* @__PURE__ */ e(U, { "data-id": h, value: y, onValueChange: (r) => {
51
- i.activateTab(r);
52
- }, children: /* @__PURE__ */ e(Y, { layoutGap: "0", topContent: /* @__PURE__ */ e(J, { controls: /* @__PURE__ */ o(Z, { color: "primary", p: 0, style: {
46
+ }, [T, a]), /* @__PURE__ */ i(N, { "data-id": a, value: T, onValueChange: (e) => {
47
+ t.activateTab(e);
48
+ }, children: /* @__PURE__ */ i(E, { layoutGap: "0", topContent: /* @__PURE__ */ i(W, { controls: /* @__PURE__ */ s(H, { color: "primary", p: 0, style: {
53
49
  boxShadow: "none"
54
50
  }, children: [
55
- /* @__PURE__ */ o(x, { children: [
56
- /* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(M, { variant: "none", paddingSize: "xxs", color: "primary", children: /* @__PURE__ */ e(Q, { size: 12 }) }) }),
57
- /* @__PURE__ */ e(C, { children: /* @__PURE__ */ o(I, { align: "start", sideOffset: 8, color: "secondary", children: [
58
- /* @__PURE__ */ o(D, { paddingSize: "xxs", mt: -0.2, mx: -0.2, children: [
59
- /* @__PURE__ */ e(m, { children: "Starting Node" }),
60
- c && /* @__PURE__ */ e(l, { onSelect: () => i.activateTab(c.id), children: c.children }),
61
- /* @__PURE__ */ e(v, {}),
62
- /* @__PURE__ */ e(m, { children: "Opened Nodes" }),
63
- T.map((r) => /* @__PURE__ */ e(l, { onSelect: () => {
64
- i.activateTab(r.id);
65
- }, children: r.children }, `menu-${r.id}`)),
66
- /* @__PURE__ */ e(v, {}),
67
- /* @__PURE__ */ e(m, { children: "Available Node" }),
68
- P.map((r) => /* @__PURE__ */ e(l, { onSelect: () => {
69
- i.activateTab(r.id);
70
- }, children: r.children }, `menu-${r.id}`))
71
- ] }),
72
- /* @__PURE__ */ e(m, { children: /* @__PURE__ */ o(n, { style: {
73
- gap: ".35rem"
74
- }, children: [
75
- /* @__PURE__ */ o(n, { align: "center", style: {
76
- gap: "0.35rem"
77
- }, children: [
78
- /* @__PURE__ */ o(n, { children: [
79
- /* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(z, { size: 12 }) }),
80
- /* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(F, { size: 12 }) })
81
- ] }),
82
- "move"
83
- ] }),
84
- /* @__PURE__ */ e(k, { spacing: "xxs" }),
85
- /* @__PURE__ */ o(n, { align: "center", style: {
86
- gap: ".35rem"
87
- }, children: [
88
- /* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(L, { size: 12 }) }),
89
- "select"
90
- ] })
91
- ] }) })
51
+ /* @__PURE__ */ s(b, { children: [
52
+ /* @__PURE__ */ i(y, { asChild: !0, children: /* @__PURE__ */ i(M, { variant: "none", paddingSize: "xxs", color: "primary", children: /* @__PURE__ */ i(P, { size: 12 }) }) }),
53
+ /* @__PURE__ */ i(C, { children: /* @__PURE__ */ s(w, { align: "start", sideOffset: 8, children: [
54
+ /* @__PURE__ */ i(h, { children: "Starting Node" }),
55
+ n && /* @__PURE__ */ i(r, { onSelect: () => t.activateTab(n.id), children: n.children }),
56
+ /* @__PURE__ */ i(p, {}),
57
+ /* @__PURE__ */ i(h, { children: "Opened Nodes" }),
58
+ g.map((e) => /* @__PURE__ */ i(r, { onSelect: () => {
59
+ t.activateTab(e.id);
60
+ }, children: e.children }, `menu-${e.id}`)),
61
+ /* @__PURE__ */ i(p, {}),
62
+ /* @__PURE__ */ i(h, { children: "Available Node" }),
63
+ $.map((e) => /* @__PURE__ */ i(r, { onSelect: () => {
64
+ t.activateTab(e.id);
65
+ }, children: e.children }, `menu-${e.id}`))
92
66
  ] }) })
93
67
  ] }),
94
- /* @__PURE__ */ o(x, { children: [
95
- /* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(M, { variant: "none", paddingSize: "xxs", color: "primary", children: /* @__PURE__ */ e(X, { size: 12 }) }) }),
96
- /* @__PURE__ */ e(C, { children: /* @__PURE__ */ o(I, { align: "end", sideOffset: 8, color: "secondary", children: [
97
- /* @__PURE__ */ o(D, { paddingSize: "xxs", mt: -0.2, mx: -0.2, children: [
98
- /* @__PURE__ */ e(l, { onClick: () => i.clearAll(), children: "Close all tabs" }),
99
- /* @__PURE__ */ e(l, { onClick: () => i.clearWithoutActive(), children: "Close other tabs" }),
100
- /* @__PURE__ */ e(v, {}),
101
- /* @__PURE__ */ e(l, { onClick: () => i.clearLeft(), children: "Close all tabs to left" }),
102
- /* @__PURE__ */ e(l, { onClick: () => i.clearRight(), children: "Close all tabs to right" })
103
- ] }),
104
- /* @__PURE__ */ e(m, { children: /* @__PURE__ */ o(n, { style: {
105
- gap: ".35rem"
106
- }, children: [
107
- /* @__PURE__ */ o(n, { align: "center", style: {
108
- gap: "0.35rem"
109
- }, children: [
110
- /* @__PURE__ */ o(n, { children: [
111
- /* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(z, { size: 12 }) }),
112
- /* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(F, { size: 12 }) })
113
- ] }),
114
- "move"
115
- ] }),
116
- /* @__PURE__ */ e(k, { spacing: "xxs" }),
117
- /* @__PURE__ */ o(n, { align: "center", style: {
118
- gap: ".35rem"
119
- }, children: [
120
- /* @__PURE__ */ e(s, { border: !0, children: /* @__PURE__ */ e(L, { size: 12 }) }),
121
- "select"
122
- ] })
123
- ] }) })
68
+ /* @__PURE__ */ s(b, { children: [
69
+ /* @__PURE__ */ i(y, { asChild: !0, children: /* @__PURE__ */ i(M, { variant: "none", paddingSize: "xxs", color: "primary", children: /* @__PURE__ */ i(V, { size: 12 }) }) }),
70
+ /* @__PURE__ */ i(C, { children: /* @__PURE__ */ s(w, { align: "end", sideOffset: 8, children: [
71
+ /* @__PURE__ */ i(r, { onClick: () => t.clearAll(), children: "Close all tabs" }),
72
+ /* @__PURE__ */ i(r, { onClick: () => t.clearWithoutActive(), children: "Close other tabs" }),
73
+ /* @__PURE__ */ i(p, {}),
74
+ /* @__PURE__ */ i(r, { onClick: () => t.clearLeft(), children: "Close all tabs to left" }),
75
+ /* @__PURE__ */ i(r, { onClick: () => t.clearRight(), children: "Close all tabs to right" })
124
76
  ] }) })
125
77
  ] })
126
- ] }), children: T.map((r, d) => r.show && /* @__PURE__ */ e(K, { closable: r.closeable, value: r.id, onClose: () => {
127
- i.removeTabById(r.id);
128
- }, children: r.children }, `trigger-${r.id}`)) }), children: /* @__PURE__ */ e(E, { children: i.values().map((r) => /* @__PURE__ */ e(H, { value: r.id, children: r.content }, `content-${r.id}`)) }) }) });
78
+ ] }), children: g.map((e, l) => e.show && /* @__PURE__ */ i(G, { closable: e.closeable, value: e.id, onClose: () => {
79
+ t.removeTabById(e.id);
80
+ }, children: e.children }, `trigger-${e.id}`)) }), children: /* @__PURE__ */ i(q, { children: t.values().map((e) => /* @__PURE__ */ i(O, { value: e.id, children: e.content }, `content-${e.id}`)) }) }) });
129
81
  };
130
82
  export {
131
- Ie as DFlowTabs
83
+ he as DFlowTabs
132
84
  };
@@ -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";