@code0-tech/pictor 0.0.0-mvp.2 → 0.0.0-mvp.20

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 (232) hide show
  1. package/dist/_virtual/compiler-runtime.js +5 -0
  2. package/dist/_virtual/compiler-runtime2.js +4 -0
  3. package/dist/_virtual/react-compiler-runtime.development.js +4 -0
  4. package/dist/_virtual/react-compiler-runtime.production.js +4 -0
  5. package/dist/assets/components/alert/Alert.style.css +1 -0
  6. package/dist/assets/components/avatar/Avatar.style.css +1 -0
  7. package/dist/assets/components/badge/Badge.style.css +1 -0
  8. package/dist/assets/components/button/Button.style.css +1 -0
  9. package/dist/assets/components/card/Card.style.css +1 -0
  10. package/dist/assets/components/command/Command.style.css +1 -0
  11. package/dist/assets/components/d-flow/DFlow.style.css +1 -0
  12. package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +1 -0
  13. package/dist/assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css +1 -0
  14. package/dist/assets/components/d-flow/input/DFlowInputDataType.style.css +1 -0
  15. package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +1 -0
  16. package/dist/assets/components/d-flow/validation/DFlowValidation.style.css +1 -0
  17. package/dist/assets/components/d-layout/DLayout.style.css +1 -0
  18. package/dist/assets/components/d-resizable/DResizable.style.css +1 -0
  19. package/dist/assets/components/dialog/Dialog.style.css +1 -0
  20. package/dist/assets/components/file-tabs/FileTabs.style.css +1 -0
  21. package/dist/assets/components/form/Input.style.css +1 -0
  22. package/dist/assets/components/menu/Menu.style.css +1 -0
  23. package/dist/assets/{ScrollArea.css → components/scroll-area/ScrollArea.style.css} +1 -1
  24. package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -0
  25. package/dist/assets/components/spacing/Spacing.style.css +1 -0
  26. package/dist/assets/components/tab/Tab.style.css +1 -0
  27. package/dist/assets/components/text/Text.style.css +1 -0
  28. package/dist/assets/components/toast/Toast.style.css +1 -0
  29. package/dist/assets/components/tooltip/Tooltip.style.css +1 -0
  30. package/dist/assets/{DFlow.css → node_modules/@xyflow/react/dist/style.css} +1 -1
  31. package/dist/components/alert/Alert.d.ts +7 -0
  32. package/dist/components/alert/Alert.js +38 -0
  33. package/dist/components/avatar/Avatar.js +2 -2
  34. package/dist/components/badge/Badge.js +2 -2
  35. package/dist/components/breadcrumb/Breadcrumb.js +16 -28
  36. package/dist/components/button/Button.d.ts +2 -1
  37. package/dist/components/button/Button.js +23 -20
  38. package/dist/components/button-group/ButtonGroup.js +6 -5
  39. package/dist/components/card/Card.d.ts +2 -1
  40. package/dist/components/card/Card.js +25 -22
  41. package/dist/components/card/CardSection.d.ts +1 -0
  42. package/dist/components/card/CardSection.js +18 -12
  43. package/dist/components/col/Col.js +9 -8
  44. package/dist/components/command/Command.js +19 -18
  45. package/dist/components/container/Container.js +12 -11
  46. package/dist/components/d-flow/DFlow.edges.hook.js +9 -10
  47. package/dist/components/d-flow/DFlow.js +6 -4
  48. package/dist/components/d-flow/DFlow.nodes.hook.js +18 -19
  49. package/dist/components/d-flow/control/DFlowControl.js +50 -46
  50. package/dist/components/d-flow/data-type/DFlowDataType.service.js +89 -5
  51. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +18 -4
  52. package/dist/components/d-flow/data-type/index.js +1 -1
  53. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +220 -4
  54. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +227 -4
  55. package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +1 -1
  56. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +241 -5
  57. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +8 -6
  58. package/dist/components/d-flow/edge/DFlowEdge.js +1 -1
  59. package/dist/components/d-flow/folder/DFlowFolder.js +16 -15
  60. package/dist/components/d-flow/function/DFlowFunction.return.hook.js +1 -1
  61. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +19 -20
  62. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +56 -56
  63. package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +1 -1
  64. package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +1 -1
  65. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +72 -76
  66. package/dist/components/d-flow/index.js +8 -8
  67. package/dist/components/d-flow/input/DFlowInputDataType.js +201 -201
  68. package/dist/components/d-flow/minimap/DFlowMiniMap.js +6 -5
  69. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +61 -62
  70. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +1 -1
  71. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +1 -1
  72. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +1 -1
  73. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +9 -8
  74. package/dist/components/d-flow/tab/DFlowTabs.js +1 -1
  75. package/dist/components/d-flow/validation/DFlowValidation.js +15 -14
  76. package/dist/components/d-fullscreen/DFullScreen.d.ts +1 -2
  77. package/dist/components/d-fullscreen/DFullScreen.js +24 -18
  78. package/dist/components/d-layout/DLayout.js +27 -26
  79. package/dist/components/d-license/DNamespaceLicense.service.d.ts +11 -0
  80. package/dist/components/d-license/DNamespaceLicense.service.js +12 -0
  81. package/dist/components/d-license/index.d.ts +2 -0
  82. package/dist/components/d-license/index.js +6 -0
  83. package/dist/components/d-member/DNamespaceMember.service.d.ts +13 -0
  84. package/dist/components/d-member/DNamespaceMember.service.js +15 -0
  85. package/dist/components/{d-namespace/member → d-member}/DNamespaceMember.view.d.ts +4 -1
  86. package/dist/components/{d-namespace/member → d-member}/DNamespaceMember.view.js +4 -1
  87. package/dist/components/d-member/index.d.ts +2 -0
  88. package/dist/components/d-member/index.js +6 -0
  89. package/dist/components/d-namespace/DNamespace.service.d.ts +1 -1
  90. package/dist/components/d-namespace/DNamespace.service.js +5 -4
  91. package/dist/components/d-namespace/index.d.ts +0 -10
  92. package/dist/components/d-namespace/index.js +4 -33
  93. package/dist/components/d-organization/DOrganization.service.d.ts +3 -3
  94. package/dist/components/d-organization/DOrganization.service.js +5 -4
  95. package/dist/components/d-organization/DOrganization.view.d.ts +4 -1
  96. package/dist/components/d-organization/DOrganization.view.js +21 -18
  97. package/dist/components/d-organization/DOrganizationCard.d.ts +3 -3
  98. package/dist/components/d-organization/DOrganizationCard.js +13 -60
  99. package/dist/components/d-organization/DOrganizationList.d.ts +11 -0
  100. package/dist/components/d-organization/DOrganizationList.js +23 -0
  101. package/dist/components/d-organization/DOrganizatonContent.d.ts +9 -0
  102. package/dist/components/d-organization/DOrganizatonContent.js +86 -0
  103. package/dist/components/d-organization/index.d.ts +1 -0
  104. package/dist/components/d-organization/index.js +15 -10
  105. package/dist/components/d-project/DNamespaceProject.service.d.ts +12 -0
  106. package/dist/components/d-project/DNamespaceProject.service.js +12 -0
  107. package/dist/components/{d-namespace/project → d-project}/DNamespaceProject.view.d.ts +4 -1
  108. package/dist/components/{d-namespace/project → d-project}/DNamespaceProject.view.js +13 -10
  109. package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectCard.d.ts +1 -1
  110. package/dist/components/d-project/DNamespaceProjectCard.js +15 -0
  111. package/dist/components/d-project/DNamespaceProjectContent.d.ts +8 -0
  112. package/dist/components/d-project/DNamespaceProjectContent.js +70 -0
  113. package/dist/components/d-project/DNamespaceProjectList.d.ts +11 -0
  114. package/dist/components/d-project/DNamespaceProjectList.js +25 -0
  115. package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectMenu.d.ts +1 -1
  116. package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectMenu.js +3 -3
  117. package/dist/components/d-project/index.d.ts +5 -0
  118. package/dist/components/d-project/index.js +24 -0
  119. package/dist/components/d-resizable/DResizable.js +17 -16
  120. package/dist/components/d-role/DNamespaceRole.service.d.ts +13 -0
  121. package/dist/components/d-role/DNamespaceRole.service.js +12 -0
  122. package/dist/components/d-role/index.d.ts +2 -0
  123. package/dist/components/d-role/index.js +6 -0
  124. package/dist/components/d-runtime/DRuntime.service.d.ts +5 -2
  125. package/dist/components/d-runtime/DRuntime.service.js +0 -2
  126. package/dist/components/d-runtime/DRuntime.view.d.ts +4 -1
  127. package/dist/components/d-runtime/DRuntime.view.js +6 -3
  128. package/dist/components/d-runtime/DRuntimeCard.d.ts +7 -0
  129. package/dist/components/d-runtime/DRuntimeCard.js +17 -0
  130. package/dist/components/d-runtime/DRuntimeContent.d.ts +7 -0
  131. package/dist/components/d-runtime/DRuntimeContent.js +40 -0
  132. package/dist/components/d-runtime/DRuntimeList.d.ts +10 -0
  133. package/dist/components/d-runtime/DRuntimeList.js +22 -0
  134. package/dist/components/d-runtime/index.d.ts +2 -0
  135. package/dist/components/d-runtime/index.js +6 -2
  136. package/dist/components/d-user/DUser.service.d.ts +1 -3
  137. package/dist/components/d-user/DUser.service.js +3 -9
  138. package/dist/components/d-user/DUser.session.hook.d.ts +3 -0
  139. package/dist/components/d-user/DUser.session.hook.js +16 -0
  140. package/dist/components/d-user/DUser.view.d.ts +4 -1
  141. package/dist/components/d-user/DUser.view.js +13 -10
  142. package/dist/components/d-user/DUserCard.d.ts +7 -0
  143. package/dist/components/d-user/DUserCard.js +15 -0
  144. package/dist/components/d-user/DUserContent.d.ts +7 -0
  145. package/dist/components/d-user/DUserContent.js +84 -0
  146. package/dist/components/d-user/DUserList.d.ts +10 -0
  147. package/dist/components/d-user/DUserList.js +22 -0
  148. package/dist/components/d-user/DUserMenu.js +19 -19
  149. package/dist/components/d-user/index.d.ts +3 -0
  150. package/dist/components/d-user/index.js +15 -8
  151. package/dist/components/dialog/Dialog.js +18 -17
  152. package/dist/components/file-tabs/FileTabs.js +41 -40
  153. package/dist/components/flex/Flex.js +2 -2
  154. package/dist/components/form/CheckboxInput.js +2 -2
  155. package/dist/components/form/Input.js +1 -1
  156. package/dist/components/form/InputDescription.js +1 -1
  157. package/dist/components/form/InputLabel.js +1 -1
  158. package/dist/components/form/InputMessage.js +1 -1
  159. package/dist/components/form/InputSuggestion.js +1 -1
  160. package/dist/components/form/PinInput.js +2 -2
  161. package/dist/components/form/RadioGroup.js +2 -2
  162. package/dist/components/form/RadioInput.js +2 -2
  163. package/dist/components/form/useForm.d.ts +2 -1
  164. package/dist/components/form/useForm.js +27 -18
  165. package/dist/components/menu/Menu.js +2 -2
  166. package/dist/components/quote/Quote.js +32 -36
  167. package/dist/components/row/Row.js +10 -9
  168. package/dist/components/scroll-area/ScrollArea.js +18 -17
  169. package/dist/components/segmented-control/SegmentedControl.js +12 -11
  170. package/dist/components/spacing/Spacing.d.ts +6 -0
  171. package/dist/components/spacing/Spacing.js +23 -0
  172. package/dist/components/tab/Tab.d.ts +11 -0
  173. package/dist/components/tab/Tab.js +40 -0
  174. package/dist/components/text/Text.js +2 -2
  175. package/dist/components/toast/Toast.d.ts +13 -0
  176. package/dist/components/toast/Toast.js +62 -0
  177. package/dist/components/tooltip/Tooltip.js +10 -9
  178. package/dist/index.d.ts +8 -0
  179. package/dist/index.js +238 -210
  180. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -0
  181. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +14 -0
  182. package/dist/node_modules/react/compiler-runtime.js +10 -0
  183. package/dist/utils/arrayService.d.ts +2 -2
  184. package/dist/utils/contextStore.js +1 -1
  185. package/dist/utils/generics.js +88 -89
  186. package/dist/utils/reactiveArrayService.d.ts +3 -3
  187. package/dist/utils/reactiveArrayService.js +52 -42
  188. package/dist/utils/types.d.ts +2 -2
  189. package/package.json +31 -30
  190. package/dist/DFlowDataType.service-Dz8pQUeO.js +0 -793
  191. package/dist/assets/Avatar.css +0 -1
  192. package/dist/assets/Badge.css +0 -1
  193. package/dist/assets/Button.css +0 -1
  194. package/dist/assets/Card.css +0 -1
  195. package/dist/assets/Command.css +0 -1
  196. package/dist/assets/DFlowFolder.css +0 -1
  197. package/dist/assets/DFlowFunctionDefaultCard.css +0 -1
  198. package/dist/assets/DFlowInputDataType.css +0 -1
  199. package/dist/assets/DFlowMiniMap.css +0 -1
  200. package/dist/assets/DFlowValidation.css +0 -1
  201. package/dist/assets/DLayout.css +0 -1
  202. package/dist/assets/DResizable.css +0 -1
  203. package/dist/assets/Dialog.css +0 -1
  204. package/dist/assets/FileTabs.css +0 -1
  205. package/dist/assets/Input.css +0 -1
  206. package/dist/assets/Menu.css +0 -1
  207. package/dist/assets/SegmentedControl.css +0 -1
  208. package/dist/assets/Text.css +0 -1
  209. package/dist/assets/Tooltip.css +0 -1
  210. package/dist/compiler-runtime-BNHg76kC.js +0 -36
  211. package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +0 -8
  212. package/dist/components/d-namespace/license/DNamespaceLicense.service.js +0 -11
  213. package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +0 -9
  214. package/dist/components/d-namespace/member/DNamespaceMember.service.js +0 -11
  215. package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +0 -9
  216. package/dist/components/d-namespace/project/DNamespaceProject.service.js +0 -11
  217. package/dist/components/d-namespace/project/DNamespaceProjectCard.js +0 -57
  218. package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +0 -10
  219. package/dist/components/d-namespace/role/DNamespaceRole.service.js +0 -11
  220. /package/dist/assets/{Breadcrumb.css → components/breadcrumb/Breadcrumb.style.css} +0 -0
  221. /package/dist/assets/{ButtonGroup.css → components/button-group/ButtonGroup.style.css} +0 -0
  222. /package/dist/assets/{Col.css → components/col/Col.style.css} +0 -0
  223. /package/dist/assets/{Container.css → components/container/Container.style.css} +0 -0
  224. /package/dist/assets/{DFlowSuggestionSearchInput.css → components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css} +0 -0
  225. /package/dist/assets/{DFullScreen.css → components/d-fullscreen/DFullScreen.style.css} +0 -0
  226. /package/dist/assets/{Flex.css → components/flex/Flex.style.css} +0 -0
  227. /package/dist/assets/{Quote.css → components/quote/Quote.style.css} +0 -0
  228. /package/dist/assets/{Row.css → components/row/Row.style.css} +0 -0
  229. /package/dist/components/{d-namespace/license → d-license}/DNamespaceLicense.view.d.ts +0 -0
  230. /package/dist/components/{d-namespace/license → d-license}/DNamespaceLicense.view.js +0 -0
  231. /package/dist/components/{d-namespace/role → d-role}/DNamespaceRole.view.d.ts +0 -0
  232. /package/dist/components/{d-namespace/role → d-role}/DNamespaceRole.view.js +0 -0
@@ -1,307 +1,307 @@
1
- import { jsxs as R, jsx as c, Fragment as q } from "react/jsx-runtime";
2
- import { c as Me } from "../../../compiler-runtime-BNHg76kC.js";
1
+ import { jsxs as S, jsx as c, Fragment as j } from "react/jsx-runtime";
2
+ import { c as be } from "../../../_virtual/compiler-runtime.js";
3
3
  import y from "react";
4
- import { DataTypeRulesVariant as S, DataTypeVariant as de } from "@code0-tech/sagittarius-graphql-types";
5
- import { InputMessage as ke } from "../../form/InputMessage.js";
6
- import { TextInput as z } from "../../form/TextInput.js";
7
- import { Button as oe } from "../../button/Button.js";
8
- import { IconSettings as ge, IconTrash as Ee } from "@tabler/icons-react";
9
- import { Text as w } from "../../text/Text.js";
4
+ import { InputMessage as Me } from "../../form/InputMessage.js";
5
+ import '../../../assets/components/d-flow/input/DFlowInputDataType.style.css';/* empty css */
6
+ import { TextInput as F } from "../../form/TextInput.js";
7
+ import { Button as re } from "../../button/Button.js";
8
+ import { IconSettings as le, IconTrash as Oe } from "@tabler/icons-react";
9
+ import { Text as A } from "../../text/Text.js";
10
10
  import { Flex as X } from "../../flex/Flex.js";
11
- import { Badge as Ve } from "../../badge/Badge.js";
12
- import { InputLabel as Oe } from "../../form/InputLabel.js";
13
- import { useSuggestions as Be } from "../suggestion/DFlowSuggestion.hook.js";
14
- import { DFlowSuggestionMenuFooter as he } from "../suggestion/DFlowSuggestionMenuFooter.js";
15
- import { toInputSuggestions as Ke } from "../suggestion/DFlowSuggestionMenu.util.js";
16
- import { DFlowSuggestionType as we } from "../suggestion/DFlowSuggestion.view.js";
17
- import { Menu as Ae, MenuTrigger as Fe, MenuPortal as Ge } from "../../menu/Menu.js";
18
- import { InputSuggestionMenuContent as xe, InputSuggestionMenuContentItems as ze } from "../../form/InputSuggestion.js";
19
- import '../../../assets/DFlowInputDataType.css';const Ce = /* @__PURE__ */ new Set([S.ItemOfCollection, S.Regex, S.NumberRange]), Ie = "__blockingSignature", Je = [S.ContainsKey, S.ContainsType, S.ItemOfCollection, S.NumberRange, S.Regex], ue = (n) => {
11
+ import { Badge as ve } from "../../badge/Badge.js";
12
+ import { InputLabel as De } from "../../form/InputLabel.js";
13
+ import { useSuggestions as ke } from "../suggestion/DFlowSuggestion.hook.js";
14
+ import { DFlowSuggestionMenuFooter as me } from "../suggestion/DFlowSuggestionMenuFooter.js";
15
+ import { toInputSuggestions as Be } from "../suggestion/DFlowSuggestionMenu.util.js";
16
+ import { DFlowSuggestionType as Ve } from "../suggestion/DFlowSuggestion.view.js";
17
+ import { Menu as Ae, MenuTrigger as _e, MenuPortal as Ke } from "../../menu/Menu.js";
18
+ import { InputSuggestionMenuContent as we, InputSuggestionMenuContentItems as Ge } from "../../form/InputSuggestion.js";
19
+ const Te = /* @__PURE__ */ new Set(["ITEM_OF_COLLECTION", "REGEX", "NUMBER_RANGE"]), he = "__blockingSignature", Fe = ["CONTAINS_KEY", "CONTAINS_TYPE", "ITEM_OF_COLLECTION", "NUMBER_RANGE", "REGEX"], de = (n) => {
20
20
  const {
21
21
  formValidation: e,
22
22
  initialValue: t,
23
23
  onDataTypeChange: p = () => {
24
24
  },
25
- blockingDataType: a
26
- } = n, m = y.useMemo(() => Ne(t, a), [t, a]), [s, u] = y.useState(m), T = y.useMemo(() => J(s), [s]), l = y.useMemo(() => J(a), [a]), B = y.useMemo(() => new Map((_(s) ? s.genericMappers ?? [] : []).map((r) => [r.target ?? "", r])), [s]), I = y.useMemo(() => l?.rules?.nodes?.filter(Boolean), [l]), N = y.useCallback((r) => {
25
+ blockingDataType: s
26
+ } = n, m = y.useMemo(() => Ie(t, s), [t, s]), [a, u] = y.useState(m), T = y.useMemo(() => Y(a), [a]), l = y.useMemo(() => Y(s), [s]), B = y.useMemo(() => new Map((J(a) ? a.genericMappers ?? [] : []).map((r) => [r.target ?? "", r])), [a]), I = y.useMemo(() => l?.rules?.nodes?.filter(Boolean), [l]), E = y.useCallback((r) => {
27
27
  u((o) => {
28
28
  if (!o) return o;
29
- const i = W(o);
30
- return r(i), p(i), $e(o, i), i;
29
+ const i = q(o);
30
+ return r(i), p(i), Le(o, i), i;
31
31
  });
32
- }, []), D = y.useCallback((r, o, i) => {
33
- N((b) => {
34
- const h = J(b);
32
+ }, []), b = y.useCallback((r, o, i) => {
33
+ E((N) => {
34
+ const h = Y(N);
35
35
  if (!h) return;
36
- const M = ae(h), v = M[r];
37
- if (!v) return;
38
- const f = be(v, l);
36
+ const M = oe(h), R = M[r];
37
+ if (!R) return;
38
+ const f = Ce(R, l);
39
39
  if (f && !i?.allowBlocked) return;
40
- const g = o(W(v));
41
- g !== void 0 && (f && (ce(g, f), se(g, f)), M[r] = g);
40
+ const g = o(q(R));
41
+ g !== void 0 && (f && (ae(g, f), se(g, f)), M[r] = g);
42
42
  });
43
- }, [l, N]), K = y.useCallback((r) => {
44
- N((o) => {
45
- const i = J(o);
43
+ }, [l, E]), V = y.useCallback((r) => {
44
+ E((o) => {
45
+ const i = Y(o);
46
46
  if (!i) return;
47
- const b = ae(i), h = b[r];
48
- h && (He(h, l) || b.splice(r, 1));
47
+ const N = oe(i), h = N[r];
48
+ h && (Pe(h, l) || N.splice(r, 1));
49
49
  });
50
- }, [l, N]), d = y.useCallback((r, o) => {
51
- D(r, (i) => (!("dataTypeIdentifier" in i?.config) || !i?.config?.dataTypeIdentifier || (P(o) ? (i.config.dataTypeIdentifier.dataType = o, delete i.config.dataTypeIdentifier.genericType) : _(o) && (i.config.dataTypeIdentifier.genericType = o, delete i.config.dataTypeIdentifier.dataType)), i), {
50
+ }, [l, E]), d = y.useCallback((r, o) => {
51
+ b(r, (i) => (!("dataTypeIdentifier" in i?.config) || !i?.config?.dataTypeIdentifier || (L(o) ? (i.config.dataTypeIdentifier.dataType = o, delete i.config.dataTypeIdentifier.genericType) : J(o) && (i.config.dataTypeIdentifier.genericType = o, delete i.config.dataTypeIdentifier.dataType)), i), {
52
52
  allowBlocked: !0
53
53
  });
54
- }, [D]), V = y.useCallback((r, o, i) => {
55
- N((b) => {
56
- if (!_(b)) return;
57
- const h = b.genericMappers ?? [], M = h.findIndex((g) => g.target === r);
54
+ }, [b]), D = y.useCallback((r, o, i) => {
55
+ E((N) => {
56
+ if (!J(N)) return;
57
+ const h = N.genericMappers ?? [], M = h.findIndex((g) => g.target === r);
58
58
  if (M === -1) return;
59
- const v = h[M], f = v?.sourceDataTypeIdentifiers ?? [];
60
- f[o] && (P(i) ? (f[o].dataType = i, delete f[o].genericType) : _(i) && (f[o].genericType = i, delete f[o].dataType), v.sourceDataTypeIdentifiers = f, b.genericMappers = [...h], b.genericMappers[M] = v);
59
+ const R = h[M], f = R?.sourceDataTypeIdentifiers ?? [];
60
+ f[o] && (L(i) ? (f[o].dataType = i, delete f[o].genericType) : J(i) && (f[o].genericType = i, delete f[o].dataType), R.sourceDataTypeIdentifiers = f, N.genericMappers = [...h], N.genericMappers[M] = R);
61
61
  });
62
- }, [N]);
63
- return /* @__PURE__ */ R("div", { children: [
64
- /* @__PURE__ */ R("div", { className: "d-flow-viewport-data-type-input", children: [
62
+ }, [E]);
63
+ return /* @__PURE__ */ S("div", { children: [
64
+ /* @__PURE__ */ S("div", { className: "d-flow-viewport-data-type-input", children: [
65
65
  T?.rules?.nodes?.map((r, o) => {
66
66
  if (!r) return null;
67
- const i = I?.find((f) => fe(r, f)), b = r?.variant === "PARENT_TYPE", h = r?.config, M = (h?.dataTypeIdentifier?.dataType?.rules?.nodes?.length ?? 0) > 0 || (h?.dataTypeIdentifier?.genericType?.dataType?.rules?.nodes?.length ?? 0) > 0;
68
- return !b || M ? /* @__PURE__ */ c(_e, { rule: r, blockingRule: i, genericMap: B, onRemove: () => K(o), onConfigChange: (f) => D(o, (g) => (g.config = f, g)), onHeaderKeyChange: (f) => D(o, (g) => (g.config || (g.config = {}), g.config.key = f || null, g)), onHeaderDataTypeChange: (f) => D(o, (g) => {
67
+ const i = I?.find((f) => ce(r, f)), N = r?.variant === "PARENT_TYPE", h = r?.config, M = (h?.dataTypeIdentifier?.dataType?.rules?.nodes?.length ?? 0) > 0 || (h?.dataTypeIdentifier?.genericType?.dataType?.rules?.nodes?.length ?? 0) > 0;
68
+ return !N || M ? /* @__PURE__ */ c(Ye, { rule: r, blockingRule: i, genericMap: B, onRemove: () => V(o), onConfigChange: (f) => b(o, (g) => (g.config = f, g)), onHeaderKeyChange: (f) => b(o, (g) => (g.config || (g.config = {}), g.config.key = f || null, g)), onHeaderDataTypeChange: (f) => b(o, (g) => {
69
69
  g.config || (g.config = {}), "dataTypeIdentifier" in g.config || (g.config.dataTypeIdentifier = {});
70
- const k = g.config.dataTypeIdentifier;
71
- return f ? (P(f) ? (k.dataType = f, delete k.genericType) : _(f) && (k.genericType = f, delete k.dataType), g) : (delete k?.dataType, delete k?.genericType, g);
72
- }), onNestedChange: (f) => d(o, f), onGenericMapperChange: V }, `${r.variant}-${o}`) : null;
70
+ const O = g.config.dataTypeIdentifier;
71
+ return f ? (L(f) ? (O.dataType = f, delete O.genericType) : J(f) && (O.genericType = f, delete O.dataType), g) : (delete O?.dataType, delete O?.genericType, g);
72
+ }), onNestedChange: (f) => d(o, f), onGenericMapperChange: D }, `${r.variant}-${o}`) : null;
73
73
  }),
74
- /* @__PURE__ */ R(Ae, { children: [
75
- /* @__PURE__ */ c(Fe, { asChild: !0, children: /* @__PURE__ */ R(oe, { color: "primary", children: [
76
- /* @__PURE__ */ c(ge, { size: 16 }),
74
+ /* @__PURE__ */ S(Ae, { children: [
75
+ /* @__PURE__ */ c(_e, { asChild: !0, children: /* @__PURE__ */ S(re, { color: "primary", children: [
76
+ /* @__PURE__ */ c(le, { size: 16 }),
77
77
  " Add new rule"
78
78
  ] }) }),
79
- /* @__PURE__ */ c(Ge, { children: /* @__PURE__ */ R(xe, { children: [
80
- /* @__PURE__ */ c(ze, { onSuggestionSelect: (r) => {
81
- N((o) => {
79
+ /* @__PURE__ */ c(Ke, { children: /* @__PURE__ */ S(we, { children: [
80
+ /* @__PURE__ */ c(Ge, { onSuggestionSelect: (r) => {
81
+ E((o) => {
82
82
  "rules" in o ? o?.rules?.nodes?.push(r.value) : "dataType" in o?.genericType && o?.genericType?.dataType?.rules?.nodes?.push(r.value);
83
83
  });
84
- }, suggestions: Je.filter((r) => T?.variant == de.Object ? r == S.ContainsKey : T?.variant == de.Array ? r == S.ContainsType : !(r == S.ContainsType || r == S.ContainsKey)).map((r) => ({
85
- children: /* @__PURE__ */ R(q, { children: [
86
- /* @__PURE__ */ c(ge, { size: 16 }),
87
- /* @__PURE__ */ c(w, { children: r })
84
+ }, suggestions: Fe.filter((r) => T?.variant == "OBJECT" ? r == "CONTAINS_KEY" : T?.variant == "ARRAY" ? r == "CONTAINS_TYPE" : !(r == "CONTAINS_TYPE" || r == "CONTAINS_KEY")).map((r) => ({
85
+ children: /* @__PURE__ */ S(j, { children: [
86
+ /* @__PURE__ */ c(le, { size: 16 }),
87
+ /* @__PURE__ */ c(A, { children: r })
88
88
  ] }),
89
89
  value: {
90
90
  variant: r,
91
91
  config: {
92
92
  __typename: `DataTypeRules${r[0]}Config`,
93
- ...r === S.NumberRange ? {
93
+ ...r === "NUMBER_RANGE" ? {
94
94
  from: void 0,
95
95
  to: void 0,
96
96
  steps: void 0
97
97
  } : {},
98
- ...r === S.Regex ? {
98
+ ...r === "REGEX" ? {
99
99
  pattern: void 0
100
100
  } : {},
101
- ...r === S.ItemOfCollection ? {
101
+ ...r === "ITEM_OF_COLLECTION" ? {
102
102
  items: void 0
103
103
  } : {}
104
104
  }
105
105
  }
106
106
  })) }),
107
- /* @__PURE__ */ c(he, {})
107
+ /* @__PURE__ */ c(me, {})
108
108
  ] }) })
109
109
  ] })
110
110
  ] }),
111
- !e?.valid && e?.notValidMessage && /* @__PURE__ */ c(ke, { children: e.notValidMessage })
111
+ !e?.valid && e?.notValidMessage && /* @__PURE__ */ c(Me, { children: e.notValidMessage })
112
112
  ] });
113
- }, _e = (n) => {
114
- const e = Me.c(56), {
113
+ }, Ye = (n) => {
114
+ const e = be.c(56), {
115
115
  rule: t,
116
116
  blockingRule: p,
117
- genericMap: a,
117
+ genericMap: s,
118
118
  onRemove: m,
119
- onConfigChange: s,
119
+ onConfigChange: a,
120
120
  onHeaderKeyChange: u,
121
121
  onHeaderDataTypeChange: T,
122
122
  onNestedChange: l,
123
123
  onGenericMapperChange: B
124
- } = n, I = t?.config?.dataTypeIdentifier ?? void 0, N = !!I?.genericKey, [D, K] = y.useState(!1), d = !!p, V = t.variant, r = V ? !Ce.has(V) : !1;
124
+ } = n, I = t?.config?.dataTypeIdentifier ?? void 0, E = !!I?.genericKey, [b, V] = y.useState(!1), d = !!p, D = t.variant, r = D ? !Te.has(D) : !1;
125
125
  let o;
126
- e[0] !== t.config ? (o = () => ye(t?.config), e[0] = t.config, e[1] = o) : o = e[1];
127
- const [i, b] = y.useState(o);
126
+ e[0] !== t.config ? (o = () => ue(t?.config), e[0] = t.config, e[1] = o) : o = e[1];
127
+ const [i, N] = y.useState(o);
128
128
  let h;
129
129
  e[2] !== t.config ? (h = () => {
130
- b(ye(t?.config));
130
+ N(ue(t?.config));
131
131
  }, e[2] = t.config, e[3] = h) : h = e[3];
132
132
  let M;
133
133
  e[4] !== t ? (M = [t], e[4] = t, e[5] = M) : M = e[5], y.useEffect(h, M);
134
- let v;
134
+ let R;
135
135
  e: {
136
136
  if (!r) {
137
- v = void 0;
137
+ R = void 0;
138
138
  break e;
139
139
  }
140
140
  if (!I) {
141
- v = void 0;
141
+ R = void 0;
142
142
  break e;
143
143
  }
144
144
  if (I.genericKey) {
145
145
  let C;
146
- e[6] !== a || e[7] !== I.genericKey ? (C = a.get(I.genericKey), e[6] = a, e[7] = I.genericKey, e[8] = C) : C = e[8];
147
- const O = C?.sourceDataTypeIdentifiers?.[0];
148
- v = O?.dataType?.name?.nodes?.[0]?.content ?? O?.genericType?.dataType?.name?.nodes?.[0]?.content;
146
+ e[6] !== s || e[7] !== I.genericKey ? (C = s.get(I.genericKey), e[6] = s, e[7] = I.genericKey, e[8] = C) : C = e[8];
147
+ const k = C?.sourceDataTypeIdentifiers?.[0];
148
+ R = k?.dataType?.name?.nodes?.[0]?.content ?? k?.genericType?.dataType?.name?.nodes?.[0]?.content;
149
149
  break e;
150
150
  }
151
- v = I.dataType?.name?.nodes?.[0]?.content ?? I.genericType?.dataType?.name?.nodes?.[0]?.content;
151
+ R = I.dataType?.name?.nodes?.[0]?.content ?? I.genericType?.dataType?.name?.nodes?.[0]?.content;
152
152
  }
153
- const f = v;
153
+ const f = R;
154
154
  let g;
155
155
  e[9] === Symbol.for("react.memo_cache_sentinel") ? (g = (C) => {
156
- const E = C.target.value;
157
- b(E);
156
+ const v = C.target.value;
157
+ N(v);
158
158
  }, e[9] = g) : g = e[9];
159
- const k = g;
160
- let $;
161
- e[10] !== i || e[11] !== d || e[12] !== s || e[13] !== t.config || e[14] !== V ? ($ = (C) => {
159
+ const O = g;
160
+ let P;
161
+ e[10] !== i || e[11] !== d || e[12] !== a || e[13] !== t.config || e[14] !== D ? (P = (C) => {
162
162
  if (d)
163
163
  return;
164
- const E = C?.target?.name, O = Pe(i, t.config, {
165
- variant: V,
166
- numberRangeKey: E
164
+ const v = C?.target?.name, k = Je(i, t.config, {
165
+ variant: D,
166
+ numberRangeKey: v
167
167
  });
168
- O && s(O);
169
- }, e[10] = i, e[11] = d, e[12] = s, e[13] = t.config, e[14] = V, e[15] = $) : $ = e[15];
170
- const A = $;
171
- let H;
172
- e[16] !== t ? (H = Te(t), e[16] = t, e[17] = H) : H = e[17];
173
- const F = H;
174
- let j;
175
- e[18] !== p ? (j = Te(p), e[18] = p, e[19] = j) : j = e[19];
176
- const Q = j;
177
- let Y;
178
- e[20] !== f || e[21] !== a || e[22] !== N || e[23] !== I || e[24] !== d || e[25] !== D || e[26] !== Q || e[27] !== F || e[28] !== B || e[29] !== T || e[30] !== u || e[31] !== l || e[32] !== m || e[33] !== t ? (Y = () => {
179
- if (!F && !N)
168
+ k && a(k);
169
+ }, e[10] = i, e[11] = d, e[12] = a, e[13] = t.config, e[14] = D, e[15] = P) : P = e[15];
170
+ const _ = P;
171
+ let z;
172
+ e[16] !== t ? (z = ye(t), e[16] = t, e[17] = z) : z = e[17];
173
+ const K = z;
174
+ let U;
175
+ e[18] !== p ? (U = ye(p), e[18] = p, e[19] = U) : U = e[19];
176
+ const W = U;
177
+ let $;
178
+ e[20] !== f || e[21] !== s || e[22] !== E || e[23] !== I || e[24] !== d || e[25] !== b || e[26] !== W || e[27] !== K || e[28] !== B || e[29] !== T || e[30] !== u || e[31] !== l || e[32] !== m || e[33] !== t ? ($ = () => {
179
+ if (!K && !E)
180
180
  return null;
181
- const C = /* @__PURE__ */ c(pe, { rule: t, genericMap: a, isBlocked: d, dataTypeLabel: f, onClick: () => K(je), onRemove: d ? void 0 : m, onKeyChange: d ? void 0 : u, onDataTypeChange: d ? void 0 : T });
182
- if (F)
183
- return /* @__PURE__ */ R(q, { children: [
181
+ const C = /* @__PURE__ */ c(ge, { rule: t, genericMap: s, isBlocked: d, dataTypeLabel: f, onClick: () => V(ze), onRemove: d ? void 0 : m, onKeyChange: d ? void 0 : u, onDataTypeChange: d ? void 0 : T });
182
+ if (K)
183
+ return /* @__PURE__ */ S(j, { children: [
184
184
  C,
185
- D ? /* @__PURE__ */ c(ue, { initialValue: F, blockingDataType: Q, onDataTypeChange: l }) : null
185
+ b ? /* @__PURE__ */ c(de, { initialValue: K, blockingDataType: W, onDataTypeChange: l }) : null
186
186
  ] });
187
187
  if (I?.genericKey) {
188
- const E = a.get(I.genericKey);
189
- return /* @__PURE__ */ R(q, { children: [
188
+ const v = s.get(I.genericKey);
189
+ return /* @__PURE__ */ S(j, { children: [
190
190
  C,
191
- D ? E?.sourceDataTypeIdentifiers?.map((O, le) => {
192
- const ie = O?.dataType ?? O?.genericType;
193
- if (!ie)
191
+ b ? v?.sourceDataTypeIdentifiers?.map((k, fe) => {
192
+ const te = k?.dataType ?? k?.genericType;
193
+ if (!te)
194
194
  return null;
195
- const ve = d ? ie : void 0, re = I.genericKey;
196
- return re ? /* @__PURE__ */ c(ue, { initialValue: ie, blockingDataType: ve, onDataTypeChange: (De) => B(re, le, De) }, `${re}-${le}`) : null;
195
+ const Se = d ? te : void 0, ie = I.genericKey;
196
+ return ie ? /* @__PURE__ */ c(de, { initialValue: te, blockingDataType: Se, onDataTypeChange: (Re) => B(ie, fe, Re) }, `${ie}-${fe}`) : null;
197
197
  }) : null
198
198
  ] });
199
199
  }
200
200
  return null;
201
- }, e[20] = f, e[21] = a, e[22] = N, e[23] = I, e[24] = d, e[25] = D, e[26] = Q, e[27] = F, e[28] = B, e[29] = T, e[30] = u, e[31] = l, e[32] = m, e[33] = t, e[34] = Y) : Y = e[34];
202
- const Z = Y;
203
- if (r && (F || N)) {
201
+ }, e[20] = f, e[21] = s, e[22] = E, e[23] = I, e[24] = d, e[25] = b, e[26] = W, e[27] = K, e[28] = B, e[29] = T, e[30] = u, e[31] = l, e[32] = m, e[33] = t, e[34] = $) : $ = e[34];
202
+ const Q = $;
203
+ if (r && (K || E)) {
204
204
  let C;
205
- e[35] !== Z ? (C = Z(), e[35] = Z, e[36] = C) : C = e[36];
206
- let E;
207
- return e[37] !== C ? (E = /* @__PURE__ */ c("div", { className: "d-flow-viewport-data-type-input__rule", children: C }), e[37] = C, e[38] = E) : E = e[38], E;
205
+ e[35] !== Q ? (C = Q(), e[35] = Q, e[36] = C) : C = e[36];
206
+ let v;
207
+ return e[37] !== C ? (v = /* @__PURE__ */ c("div", { className: "d-flow-viewport-data-type-input__rule", children: C }), e[37] = C, e[38] = v) : v = e[38], v;
208
208
  }
209
- let L;
210
- e[39] === Symbol.for("react.memo_cache_sentinel") ? (L = {
209
+ let x;
210
+ e[39] === Symbol.for("react.memo_cache_sentinel") ? (x = {
211
211
  flex: 1
212
- }, e[39] = L) : L = e[39];
213
- const ee = d ? void 0 : m, ne = d ? void 0 : u, te = d ? void 0 : T;
212
+ }, e[39] = x) : x = e[39];
213
+ const Z = d ? void 0 : m, ee = d ? void 0 : u, ne = d ? void 0 : T;
214
+ let w;
215
+ e[40] !== f || e[41] !== s || e[42] !== d || e[43] !== t || e[44] !== Z || e[45] !== ee || e[46] !== ne ? (w = /* @__PURE__ */ c(ge, { rule: t, genericMap: s, isBlocked: d, dataTypeLabel: f, onRemove: Z, onKeyChange: ee, onDataTypeChange: ne }), e[40] = f, e[41] = s, e[42] = d, e[43] = t, e[44] = Z, e[45] = ee, e[46] = ne, e[47] = w) : w = e[47];
214
216
  let G;
215
- e[40] !== f || e[41] !== a || e[42] !== d || e[43] !== t || e[44] !== ee || e[45] !== ne || e[46] !== te ? (G = /* @__PURE__ */ c(pe, { rule: t, genericMap: a, isBlocked: d, dataTypeLabel: f, onRemove: ee, onKeyChange: ne, onDataTypeChange: te }), e[40] = f, e[41] = a, e[42] = d, e[43] = t, e[44] = ee, e[45] = ne, e[46] = te, e[47] = G) : G = e[47];
216
- let x;
217
- e[48] !== i || e[49] !== A || e[50] !== d || e[51] !== t.variant ? (x = t.variant === "REGEX" || t.variant === "ITEM_OF_COLLECTION" ? /* @__PURE__ */ c(z, { clearable: !0, left: /* @__PURE__ */ c(w, { size: "sm", children: t.variant === "REGEX" ? "Pattern" : "Items" }), leftType: "icon", defaultValue: i, onChange: k, onBlur: A, w: "100%", disabled: d }) : t.variant === "NUMBER_RANGE" ? /* @__PURE__ */ R(q, { children: [
218
- /* @__PURE__ */ c(z, { clearable: !0, defaultValue: i?.from?.toString() ?? "", onChange: k, onBlur: A, w: "100%", left: /* @__PURE__ */ c(w, { size: "sm", children: "From" }), leftType: "icon", disabled: d, name: "from" }),
219
- /* @__PURE__ */ c(z, { clearable: !0, defaultValue: i?.steps?.toString() ?? "", onChange: k, onBlur: A, left: /* @__PURE__ */ c(w, { size: "sm", children: "Steps" }), leftType: "icon", w: "100%", disabled: d, name: "steps" }),
220
- /* @__PURE__ */ c(z, { clearable: !0, left: /* @__PURE__ */ c(w, { size: "sm", children: "To" }), leftType: "icon", defaultValue: i?.to?.toString() ?? "", onChange: k, onBlur: A, w: "100%", disabled: d, name: "to" })
221
- ] }) : null, e[48] = i, e[49] = A, e[50] = d, e[51] = t.variant, e[52] = x) : x = e[52];
222
- let U;
223
- return e[53] !== G || e[54] !== x ? (U = /* @__PURE__ */ c("div", { className: "d-flow-viewport-data-type-input__rule", children: /* @__PURE__ */ R("div", { style: L, children: [
224
- G,
225
- x
226
- ] }) }), e[53] = G, e[54] = x, e[55] = U) : U = e[55], U;
227
- }, pe = ({
217
+ e[48] !== i || e[49] !== _ || e[50] !== d || e[51] !== t.variant ? (G = t.variant === "REGEX" || t.variant === "ITEM_OF_COLLECTION" ? /* @__PURE__ */ c(F, { clearable: !0, left: /* @__PURE__ */ c(A, { size: "sm", children: t.variant === "REGEX" ? "Pattern" : "Items" }), leftType: "icon", defaultValue: i, onChange: O, onBlur: _, w: "100%", disabled: d }) : t.variant === "NUMBER_RANGE" ? /* @__PURE__ */ S(j, { children: [
218
+ /* @__PURE__ */ c(F, { clearable: !0, defaultValue: i?.from?.toString() ?? "", onChange: O, onBlur: _, w: "100%", left: /* @__PURE__ */ c(A, { size: "sm", children: "From" }), leftType: "icon", disabled: d, name: "from" }),
219
+ /* @__PURE__ */ c(F, { clearable: !0, defaultValue: i?.steps?.toString() ?? "", onChange: O, onBlur: _, left: /* @__PURE__ */ c(A, { size: "sm", children: "Steps" }), leftType: "icon", w: "100%", disabled: d, name: "steps" }),
220
+ /* @__PURE__ */ c(F, { clearable: !0, left: /* @__PURE__ */ c(A, { size: "sm", children: "To" }), leftType: "icon", defaultValue: i?.to?.toString() ?? "", onChange: O, onBlur: _, w: "100%", disabled: d, name: "to" })
221
+ ] }) : null, e[48] = i, e[49] = _, e[50] = d, e[51] = t.variant, e[52] = G) : G = e[52];
222
+ let H;
223
+ return e[53] !== w || e[54] !== G ? (H = /* @__PURE__ */ c("div", { className: "d-flow-viewport-data-type-input__rule", children: /* @__PURE__ */ S("div", { style: x, children: [
224
+ w,
225
+ G
226
+ ] }) }), e[53] = w, e[54] = G, e[55] = H) : H = e[55], H;
227
+ }, ge = ({
228
228
  rule: n,
229
229
  dataTypeLabel: e,
230
230
  onClick: t,
231
231
  onRemove: p,
232
- isBlocked: a,
232
+ isBlocked: s,
233
233
  onKeyChange: m,
234
- onDataTypeChange: s,
234
+ onDataTypeChange: a,
235
235
  genericMap: u
236
236
  }) => {
237
- const T = n.variant, l = T ? !Ce.has(T) : !1, B = l ? Be({
237
+ const T = n.variant, l = T ? !Te.has(T) : !1, B = l ? ke({
238
238
  dataType: {
239
239
  id: "gid://sagittarius/DataType/878634678"
240
240
  }
241
- }, [], "", 0, [0], 1, [we.DATA_TYPE]) : [], I = n?.config?.dataTypeIdentifier?.dataType?.rules?.nodes?.length ?? n?.config?.dataTypeIdentifier?.genericType?.dataType?.rules?.nodes?.length ?? u.get(n?.config?.dataTypeIdentifier?.genericKey)?.sourceDataTypeIdentifiers?.map((i) => i?.dataType?.rules?.nodes?.length ?? i.genericType?.dataType?.rules?.nodes?.length) ?? 0, [N, D] = y.useState(() => "key" in (n?.config ?? {}) ? n?.config?.key ?? "" : ""), [K, d] = y.useState(() => e ?? "");
241
+ }, [], "", 0, [0], 1, [Ve.DATA_TYPE]) : [], I = n?.config?.dataTypeIdentifier?.dataType?.rules?.nodes?.length ?? n?.config?.dataTypeIdentifier?.genericType?.dataType?.rules?.nodes?.length ?? u.get(n?.config?.dataTypeIdentifier?.genericKey)?.sourceDataTypeIdentifiers?.map((i) => i?.dataType?.rules?.nodes?.length ?? i.genericType?.dataType?.rules?.nodes?.length) ?? 0, [E, b] = y.useState(() => "key" in (n?.config ?? {}) ? n?.config?.key ?? "" : ""), [V, d] = y.useState(() => e ?? "");
242
242
  y.useEffect(() => {
243
- D("key" in (n?.config ?? {}) ? n?.config?.key ?? "" : "");
243
+ b("key" in (n?.config ?? {}) ? n?.config?.key ?? "" : "");
244
244
  }, [n]), y.useEffect(() => {
245
245
  d(e ?? "");
246
246
  }, [e]);
247
- const V = y.useCallback(() => {
248
- !m || a || m(N);
249
- }, [a, N, m]), r = y.useCallback(() => {
250
- !s || a || K.trim() === "" && s(void 0);
251
- }, [K, a, s]), o = y.useCallback((i) => {
252
- if (!s || a) return;
253
- const b = i.value;
254
- if (!b) return;
255
- s(b);
247
+ const D = y.useCallback(() => {
248
+ !m || s || m(E);
249
+ }, [s, E, m]), r = y.useCallback(() => {
250
+ !a || s || V.trim() === "" && a(void 0);
251
+ }, [V, s, a]), o = y.useCallback((i) => {
252
+ if (!a || s) return;
253
+ const N = i.value;
254
+ if (!N) return;
255
+ a(N);
256
256
  const h = i?.ref?.displayText?.join(" ") ?? e ?? "";
257
257
  d(h);
258
- }, [e, a, s]);
259
- return /* @__PURE__ */ R("div", { children: [
260
- /* @__PURE__ */ R(X, { justify: "space-between", children: [
261
- /* @__PURE__ */ c(Ve, { color: "info", children: n?.variant }),
262
- p ? /* @__PURE__ */ c(oe, { color: "error", onClick: p, children: /* @__PURE__ */ c(Ee, { size: 16 }) }) : null
258
+ }, [e, s, a]);
259
+ return /* @__PURE__ */ S("div", { children: [
260
+ /* @__PURE__ */ S(X, { justify: "space-between", children: [
261
+ /* @__PURE__ */ c(ve, { color: "info", children: n?.variant }),
262
+ p ? /* @__PURE__ */ c(re, { color: "error", onClick: p, children: /* @__PURE__ */ c(Oe, { size: 16 }) }) : null
263
263
  ] }),
264
- /* @__PURE__ */ R(X, { mt: 0.7, style: {
264
+ /* @__PURE__ */ S(X, { mt: 0.7, style: {
265
265
  flexDirection: "column",
266
266
  gap: ".7rem"
267
267
  }, children: [
268
- l ? /* @__PURE__ */ R(X, { align: "center", style: {
268
+ l ? /* @__PURE__ */ S(X, { align: "center", style: {
269
269
  gap: ".7rem"
270
270
  }, children: [
271
- n.variant === "CONTAINS_KEY" ? /* @__PURE__ */ c(z, { left: /* @__PURE__ */ c(w, { size: "sm", children: "Key" }), leftType: "icon", disabled: a, defaultValue: N, onChange: (i) => "value" in i.target && D(i.target.value), onBlur: V }) : null,
272
- /* @__PURE__ */ c(z, { left: /* @__PURE__ */ c(w, { size: "sm", children: "DataType" }), leftType: "icon", disabled: a, suggestionsFooter: /* @__PURE__ */ c(he, {}), suggestions: Ke(B), value: K, onChange: (i) => "value" in i.target && d(i.target.value), onBlur: r, onSuggestionSelect: o })
271
+ n.variant === "CONTAINS_KEY" ? /* @__PURE__ */ c(F, { left: /* @__PURE__ */ c(A, { size: "sm", children: "Key" }), leftType: "icon", disabled: s, defaultValue: E, onChange: (i) => "value" in i.target && b(i.target.value), onBlur: D }) : null,
272
+ /* @__PURE__ */ c(F, { left: /* @__PURE__ */ c(A, { size: "sm", children: "DataType" }), leftType: "icon", disabled: s, suggestionsFooter: /* @__PURE__ */ c(me, {}), suggestions: Be(B), value: V, onChange: (i) => "value" in i.target && d(i.target.value), onBlur: r, onSuggestionSelect: o })
273
273
  ] }) : null,
274
- n.variant != "REGEX" && n.variant != "ITEM_OF_COLLECTION" && n.variant != "NUMBER_RANGE" ? /* @__PURE__ */ c(Oe, { children: /* @__PURE__ */ R(X, { align: "center", style: {
274
+ n.variant != "REGEX" && n.variant != "ITEM_OF_COLLECTION" && n.variant != "NUMBER_RANGE" ? /* @__PURE__ */ c(De, { children: /* @__PURE__ */ S(X, { align: "center", style: {
275
275
  gap: ".7rem"
276
276
  }, children: [
277
277
  "+",
278
278
  I,
279
279
  " rules included",
280
- /* @__PURE__ */ c(oe, { color: "primary", onClick: t, children: "Show/Hide Rules" })
280
+ /* @__PURE__ */ c(re, { color: "primary", onClick: t, children: "Show/Hide Rules" })
281
281
  ] }) }) : null
282
282
  ] })
283
283
  ] });
284
- }, ye = (n) => n ? "pattern" in n || n?.__typename === "DataTypeRulesRegexConfig" ? n?.pattern ?? "" : "items" in n || n?.__typename === "DataTypeRulesItemOfCollectionConfig" ? JSON.stringify(n.items) : n : "", Pe = (n, e, t) => {
284
+ }, ue = (n) => n ? "pattern" in n || n?.__typename === "DataTypeRulesRegexConfig" ? n?.pattern ?? "" : "items" in n || n?.__typename === "DataTypeRulesItemOfCollectionConfig" ? JSON.stringify(n.items) : n : "", Je = (n, e, t) => {
285
285
  const {
286
286
  variant: p,
287
- numberRangeKey: a
288
- } = t ?? {}, m = p === S.NumberRange, s = e ?? void 0;
287
+ numberRangeKey: s
288
+ } = t ?? {}, m = p === "NUMBER_RANGE", a = e ?? void 0;
289
289
  if (m) {
290
290
  const u = {
291
291
  __typename: "DataTypeRulesNumberRangeConfig",
292
- ...s
292
+ ...a
293
293
  };
294
294
  if (typeof n != "string")
295
295
  return {
296
296
  ...u,
297
297
  ...n
298
298
  };
299
- if (!a)
299
+ if (!s)
300
300
  return u;
301
301
  const T = {
302
302
  ...u
303
303
  };
304
- switch (a) {
304
+ switch (s) {
305
305
  case "from":
306
306
  T.from = (() => {
307
307
  if (n.trim() === "") return;
@@ -326,7 +326,7 @@ import '../../../assets/DFlowInputDataType.css';const Ce = /* @__PURE__ */ new S
326
326
  }
327
327
  return T;
328
328
  }
329
- if (!s) {
329
+ if (!a) {
330
330
  if (typeof n != "string")
331
331
  return n;
332
332
  try {
@@ -337,63 +337,63 @@ import '../../../assets/DFlowInputDataType.css';const Ce = /* @__PURE__ */ new S
337
337
  }
338
338
  if (typeof n != "string")
339
339
  return n;
340
- if (s.__typename === "DataTypeRulesRegexConfig" || "pattern" in s)
340
+ if (a.__typename === "DataTypeRulesRegexConfig" || "pattern" in a)
341
341
  return {
342
- ...s,
342
+ ...a,
343
343
  pattern: n
344
344
  };
345
- if (s.__typename === "DataTypeRulesItemOfCollectionConfig" || "items" in s)
345
+ if (a.__typename === "DataTypeRulesItemOfCollectionConfig" || "items" in a)
346
346
  try {
347
347
  return {
348
- ...s,
348
+ ...a,
349
349
  items: JSON.parse(n)
350
350
  };
351
351
  } catch {
352
- return s;
352
+ return a;
353
353
  }
354
354
  try {
355
355
  return JSON.parse(n);
356
356
  } catch {
357
- return s;
357
+ return a;
358
358
  }
359
- }, W = (n) => n == null ? n : JSON.parse(JSON.stringify(n)), me = (n) => {
359
+ }, q = (n) => n == null ? n : JSON.parse(JSON.stringify(n)), pe = (n) => {
360
360
  if (n)
361
361
  return JSON.stringify(n);
362
- }, Te = (n) => {
362
+ }, ye = (n) => {
363
363
  if (n?.config?.dataTypeIdentifier)
364
364
  return n?.config?.dataTypeIdentifier?.dataType ?? n?.config?.dataTypeIdentifier?.genericType ?? void 0;
365
- }, $e = (n, e) => me(n) === me(e), He = (n, e) => !n || !e?.rules?.nodes || !Se(n) ? !1 : !!be(n, e), be = (n, e) => !n || !e?.rules?.nodes ? void 0 : e.rules.nodes?.filter(Boolean).find((p) => fe(n, p)), P = (n) => n != null && n.rules !== void 0, _ = (n) => n != null && typeof n == "object" && "genericMappers" in n, J = (n) => {
365
+ }, Le = (n, e) => pe(n) === pe(e), Pe = (n, e) => !n || !e?.rules?.nodes || !Ne(n) ? !1 : !!Ce(n, e), Ce = (n, e) => !n || !e?.rules?.nodes ? void 0 : e.rules.nodes?.filter(Boolean).find((p) => ce(n, p)), L = (n) => n != null && n.rules !== void 0, J = (n) => n != null && typeof n == "object" && "genericMappers" in n, Y = (n) => {
366
366
  if (n)
367
- return P(n) ? n : n.dataType ?? void 0;
368
- }, ae = (n) => (n.rules ? n.rules.nodes || (n.rules.nodes = []) : n.rules = {
367
+ return L(n) ? n : n.dataType ?? void 0;
368
+ }, oe = (n) => (n.rules ? n.rules.nodes || (n.rules.nodes = []) : n.rules = {
369
369
  nodes: []
370
- }, n.rules.nodes), Ne = (n, e) => {
370
+ }, n.rules.nodes), Ie = (n, e) => {
371
371
  if (!n && !e) return;
372
- const t = W(n ?? e), p = J(t), a = J(e);
373
- if (!p || !a)
372
+ const t = q(n ?? e), p = Y(t), s = Y(e);
373
+ if (!p || !s)
374
374
  return t;
375
- const m = ae(p);
376
- return a.rules?.nodes?.filter(Boolean)?.forEach((u) => {
375
+ const m = oe(p);
376
+ return s.rules?.nodes?.filter(Boolean)?.forEach((u) => {
377
377
  if (!u) return;
378
- const T = m.findIndex((l) => fe(l, u));
378
+ const T = m.findIndex((l) => ce(l, u));
379
379
  if (T === -1) {
380
- const l = W(u);
381
- ce(l, u), m.push(l), se(l, u);
380
+ const l = q(u);
381
+ ae(l, u), m.push(l), se(l, u);
382
382
  } else {
383
383
  const l = m[T];
384
- ce(l, u), se(l, u);
384
+ ae(l, u), se(l, u);
385
385
  }
386
386
  }), t;
387
387
  }, se = (n, e) => {
388
388
  const t = n?.config?.dataTypeIdentifier, p = e?.config?.dataTypeIdentifier;
389
389
  if (!t || !p) return;
390
- const a = t.dataType ?? t.genericType, m = p.dataType ?? p.genericType;
391
- if (!a || !m) return;
392
- const s = Ne(a, m);
393
- s && (P(s) ? t.dataType = s : t.genericType = s);
394
- }, fe = (n, e) => {
390
+ const s = t.dataType ?? t.genericType, m = p.dataType ?? p.genericType;
391
+ if (!s || !m) return;
392
+ const a = Ie(s, m);
393
+ a && (L(a) ? t.dataType = a : t.genericType = a);
394
+ }, ce = (n, e) => {
395
395
  if (!n || !e) return !1;
396
- const t = Se(n), p = Re(e);
396
+ const t = Ne(n), p = Ee(e);
397
397
  return t && p ? t === p : n.id && e.id ? n.id === e.id : JSON.stringify({
398
398
  variant: n.variant,
399
399
  config: n.config
@@ -401,22 +401,22 @@ import '../../../assets/DFlowInputDataType.css';const Ce = /* @__PURE__ */ new S
401
401
  variant: e.variant,
402
402
  config: e.config
403
403
  });
404
- }, Se = (n) => {
404
+ }, Ne = (n) => {
405
405
  if (n)
406
- return n?.[Ie];
407
- }, Re = (n) => {
406
+ return n?.[he];
407
+ }, Ee = (n) => {
408
408
  if (n)
409
409
  return n.id ? `id:${n.id}` : `config:${JSON.stringify({
410
410
  variant: n.variant,
411
411
  config: n.config
412
412
  })}`;
413
- }, ce = (n, e) => {
414
- const t = Re(e);
415
- t && (n[Ie] = t);
413
+ }, ae = (n, e) => {
414
+ const t = Ee(e);
415
+ t && (n[he] = t);
416
416
  };
417
- function je(n) {
417
+ function ze(n) {
418
418
  return !n;
419
419
  }
420
420
  export {
421
- ue as DFlowInputDataType
421
+ de as DFlowInputDataType
422
422
  };