@code0-tech/pictor 0.0.0-mvp.10

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 (313) hide show
  1. package/LICENSE +29 -0
  2. package/README.md +0 -0
  3. package/dist/_virtual/compiler-runtime.js +5 -0
  4. package/dist/_virtual/compiler-runtime2.js +4 -0
  5. package/dist/_virtual/react-compiler-runtime.development.js +4 -0
  6. package/dist/_virtual/react-compiler-runtime.production.js +4 -0
  7. package/dist/assets/components/avatar/Avatar.style.css +1 -0
  8. package/dist/assets/components/badge/Badge.style.css +1 -0
  9. package/dist/assets/components/breadcrumb/Breadcrumb.style.css +1 -0
  10. package/dist/assets/components/button/Button.style.css +1 -0
  11. package/dist/assets/components/button-group/ButtonGroup.style.css +1 -0
  12. package/dist/assets/components/card/Card.style.css +1 -0
  13. package/dist/assets/components/col/Col.style.css +1 -0
  14. package/dist/assets/components/command/Command.style.css +1 -0
  15. package/dist/assets/components/container/Container.style.css +1 -0
  16. package/dist/assets/components/d-flow/DFlow.style.css +1 -0
  17. package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +1 -0
  18. package/dist/assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css +1 -0
  19. package/dist/assets/components/d-flow/input/DFlowInputDataType.style.css +1 -0
  20. package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +1 -0
  21. package/dist/assets/components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css +1 -0
  22. package/dist/assets/components/d-flow/validation/DFlowValidation.style.css +1 -0
  23. package/dist/assets/components/d-fullscreen/DFullScreen.style.css +1 -0
  24. package/dist/assets/components/d-layout/DLayout.style.css +1 -0
  25. package/dist/assets/components/d-resizable/DResizable.style.css +1 -0
  26. package/dist/assets/components/dialog/Dialog.style.css +1 -0
  27. package/dist/assets/components/file-tabs/FileTabs.style.css +1 -0
  28. package/dist/assets/components/flex/Flex.style.css +1 -0
  29. package/dist/assets/components/form/Input.style.css +1 -0
  30. package/dist/assets/components/menu/Menu.style.css +1 -0
  31. package/dist/assets/components/quote/Quote.style.css +1 -0
  32. package/dist/assets/components/row/Row.style.css +1 -0
  33. package/dist/assets/components/scroll-area/ScrollArea.style.css +1 -0
  34. package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -0
  35. package/dist/assets/components/spacing/Spacing.style.css +1 -0
  36. package/dist/assets/components/tab/Tab.style.css +1 -0
  37. package/dist/assets/components/text/Text.style.css +1 -0
  38. package/dist/assets/components/tooltip/Tooltip.style.css +1 -0
  39. package/dist/assets/node_modules/@xyflow/react/dist/style.css +1 -0
  40. package/dist/components/avatar/Avatar.d.ts +8 -0
  41. package/dist/components/avatar/Avatar.js +55 -0
  42. package/dist/components/badge/Badge.d.ts +7 -0
  43. package/dist/components/badge/Badge.js +22 -0
  44. package/dist/components/breadcrumb/Breadcrumb.d.ts +7 -0
  45. package/dist/components/breadcrumb/Breadcrumb.js +32 -0
  46. package/dist/components/button/Button.d.ts +10 -0
  47. package/dist/components/button/Button.js +29 -0
  48. package/dist/components/button-group/ButtonGroup.d.ts +7 -0
  49. package/dist/components/button-group/ButtonGroup.js +27 -0
  50. package/dist/components/card/Card.d.ts +14 -0
  51. package/dist/components/card/Card.js +39 -0
  52. package/dist/components/card/CardSection.d.ts +9 -0
  53. package/dist/components/card/CardSection.js +22 -0
  54. package/dist/components/col/Col.d.ts +13 -0
  55. package/dist/components/col/Col.js +27 -0
  56. package/dist/components/command/Command.d.ts +30 -0
  57. package/dist/components/command/Command.js +103 -0
  58. package/dist/components/container/Container.d.ts +6 -0
  59. package/dist/components/container/Container.js +21 -0
  60. package/dist/components/d-flow/DFlow.d.ts +5 -0
  61. package/dist/components/d-flow/DFlow.edges.hook.d.ts +4 -0
  62. package/dist/components/d-flow/DFlow.edges.hook.js +144 -0
  63. package/dist/components/d-flow/DFlow.js +375 -0
  64. package/dist/components/d-flow/DFlow.nodes.hook.d.ts +3 -0
  65. package/dist/components/d-flow/DFlow.nodes.hook.js +139 -0
  66. package/dist/components/d-flow/DFlow.service.d.ts +10 -0
  67. package/dist/components/d-flow/DFlow.service.js +11 -0
  68. package/dist/components/d-flow/DFlow.view.d.ts +109 -0
  69. package/dist/components/d-flow/DFlow.view.js +213 -0
  70. package/dist/components/d-flow/control/DFlowControl.d.ts +2 -0
  71. package/dist/components/d-flow/control/DFlowControl.js +77 -0
  72. package/dist/components/d-flow/control/index.d.ts +1 -0
  73. package/dist/components/d-flow/control/index.js +4 -0
  74. package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +10 -0
  75. package/dist/components/d-flow/data-type/DFlowDataType.service.js +91 -0
  76. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +2 -0
  77. package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +18 -0
  78. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +4 -0
  79. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +20 -0
  80. package/dist/components/d-flow/data-type/DFlowDataType.view.d.ts +32 -0
  81. package/dist/components/d-flow/data-type/DFlowDataType.view.js +65 -0
  82. package/dist/components/d-flow/data-type/index.d.ts +2 -0
  83. package/dist/components/d-flow/data-type/index.js +6 -0
  84. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +6 -0
  85. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +222 -0
  86. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +6 -0
  87. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +229 -0
  88. package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.d.ts +7 -0
  89. package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.js +214 -0
  90. package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.d.ts +4 -0
  91. package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.js +214 -0
  92. package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.d.ts +9 -0
  93. package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +217 -0
  94. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.d.ts +4 -0
  95. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.js +214 -0
  96. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +6 -0
  97. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +243 -0
  98. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.d.ts +8 -0
  99. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.js +10 -0
  100. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.d.ts +3 -0
  101. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +10 -0
  102. package/dist/components/d-flow/edge/DFlowEdge.d.ts +10 -0
  103. package/dist/components/d-flow/edge/DFlowEdge.js +48 -0
  104. package/dist/components/d-flow/folder/DFlowFolder.d.ts +19 -0
  105. package/dist/components/d-flow/folder/DFlowFolder.js +119 -0
  106. package/dist/components/d-flow/folder/index.d.ts +1 -0
  107. package/dist/components/d-flow/folder/index.js +6 -0
  108. package/dist/components/d-flow/function/DFlowFunction.input.hook.d.ts +4 -0
  109. package/dist/components/d-flow/function/DFlowFunction.input.hook.js +9 -0
  110. package/dist/components/d-flow/function/DFlowFunction.return.hook.d.ts +4 -0
  111. package/dist/components/d-flow/function/DFlowFunction.return.hook.js +11 -0
  112. package/dist/components/d-flow/function/DFlowFunction.service.d.ts +6 -0
  113. package/dist/components/d-flow/function/DFlowFunction.service.js +9 -0
  114. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +10 -0
  115. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +74 -0
  116. package/dist/components/d-flow/function/DFlowFunction.view.d.ts +66 -0
  117. package/dist/components/d-flow/function/DFlowFunction.view.js +117 -0
  118. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.d.ts +15 -0
  119. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +158 -0
  120. package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +5 -0
  121. package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +55 -0
  122. package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.d.ts +11 -0
  123. package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +26 -0
  124. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.d.ts +9 -0
  125. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +97 -0
  126. package/dist/components/d-flow/function/index.d.ts +2 -0
  127. package/dist/components/d-flow/function/index.js +7 -0
  128. package/dist/components/d-flow/index.d.ts +13 -0
  129. package/dist/components/d-flow/index.js +46 -0
  130. package/dist/components/d-flow/input/DFlowInputDataType.d.ts +8 -0
  131. package/dist/components/d-flow/input/DFlowInputDataType.js +422 -0
  132. package/dist/components/d-flow/minimap/DFlowMiniMap.d.ts +2 -0
  133. package/dist/components/d-flow/minimap/DFlowMiniMap.js +22 -0
  134. package/dist/components/d-flow/minimap/index.d.ts +1 -0
  135. package/dist/components/d-flow/minimap/index.js +4 -0
  136. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.d.ts +33 -0
  137. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +150 -0
  138. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +5 -0
  139. package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +18 -0
  140. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +21 -0
  141. package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +25 -0
  142. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.d.ts +8 -0
  143. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +67 -0
  144. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.d.ts +3 -0
  145. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.js +42 -0
  146. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.d.ts +2 -0
  147. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +69 -0
  148. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.d.ts +6 -0
  149. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +21 -0
  150. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.d.ts +7 -0
  151. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +22 -0
  152. package/dist/components/d-flow/suggestion/index.d.ts +2 -0
  153. package/dist/components/d-flow/suggestion/index.js +7 -0
  154. package/dist/components/d-flow/tab/DFlowTabDefault.d.ts +11 -0
  155. package/dist/components/d-flow/tab/DFlowTabDefault.js +97 -0
  156. package/dist/components/d-flow/tab/DFlowTabTrigger.d.ts +6 -0
  157. package/dist/components/d-flow/tab/DFlowTabTrigger.js +51 -0
  158. package/dist/components/d-flow/tab/DFlowTabs.d.ts +2 -0
  159. package/dist/components/d-flow/tab/DFlowTabs.js +105 -0
  160. package/dist/components/d-flow/type/DFlowType.service.d.ts +6 -0
  161. package/dist/components/d-flow/type/DFlowType.service.js +9 -0
  162. package/dist/components/d-flow/type/DFlowType.view.d.ts +35 -0
  163. package/dist/components/d-flow/type/DFlowType.view.js +69 -0
  164. package/dist/components/d-flow/type/index.d.ts +2 -0
  165. package/dist/components/d-flow/type/index.js +6 -0
  166. package/dist/components/d-flow/validation/DFlowValidation.d.ts +6 -0
  167. package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +3 -0
  168. package/dist/components/d-flow/validation/DFlowValidation.hook.js +10 -0
  169. package/dist/components/d-flow/validation/DFlowValidation.js +60 -0
  170. package/dist/components/d-flow/validation/index.d.ts +2 -0
  171. package/dist/components/d-flow/validation/index.js +6 -0
  172. package/dist/components/d-fullscreen/DFullScreen.d.ts +6 -0
  173. package/dist/components/d-fullscreen/DFullScreen.js +26 -0
  174. package/dist/components/d-layout/DLayout.d.ts +10 -0
  175. package/dist/components/d-layout/DLayout.js +52 -0
  176. package/dist/components/d-namespace/DNamespace.service.d.ts +6 -0
  177. package/dist/components/d-namespace/DNamespace.service.js +11 -0
  178. package/dist/components/d-namespace/DNamespace.view.d.ts +32 -0
  179. package/dist/components/d-namespace/DNamespace.view.js +65 -0
  180. package/dist/components/d-namespace/index.d.ts +12 -0
  181. package/dist/components/d-namespace/index.js +35 -0
  182. package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +8 -0
  183. package/dist/components/d-namespace/license/DNamespaceLicense.service.js +11 -0
  184. package/dist/components/d-namespace/license/DNamespaceLicense.view.d.ts +26 -0
  185. package/dist/components/d-namespace/license/DNamespaceLicense.view.js +57 -0
  186. package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +9 -0
  187. package/dist/components/d-namespace/member/DNamespaceMember.service.js +11 -0
  188. package/dist/components/d-namespace/member/DNamespaceMember.view.d.ts +26 -0
  189. package/dist/components/d-namespace/member/DNamespaceMember.view.js +57 -0
  190. package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +9 -0
  191. package/dist/components/d-namespace/project/DNamespaceProject.service.js +11 -0
  192. package/dist/components/d-namespace/project/DNamespaceProject.view.d.ts +35 -0
  193. package/dist/components/d-namespace/project/DNamespaceProject.view.js +69 -0
  194. package/dist/components/d-namespace/project/DNamespaceProjectCard.d.ts +9 -0
  195. package/dist/components/d-namespace/project/DNamespaceProjectCard.js +57 -0
  196. package/dist/components/d-namespace/project/DNamespaceProjectMenu.d.ts +9 -0
  197. package/dist/components/d-namespace/project/DNamespaceProjectMenu.js +18 -0
  198. package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +10 -0
  199. package/dist/components/d-namespace/role/DNamespaceRole.service.js +11 -0
  200. package/dist/components/d-namespace/role/DNamespaceRole.view.d.ts +26 -0
  201. package/dist/components/d-namespace/role/DNamespaceRole.view.js +57 -0
  202. package/dist/components/d-organization/DOrganization.service.d.ts +8 -0
  203. package/dist/components/d-organization/DOrganization.service.js +11 -0
  204. package/dist/components/d-organization/DOrganization.view.d.ts +20 -0
  205. package/dist/components/d-organization/DOrganization.view.js +52 -0
  206. package/dist/components/d-organization/DOrganizationCard.d.ts +10 -0
  207. package/dist/components/d-organization/DOrganizationCard.js +63 -0
  208. package/dist/components/d-organization/DOrganizationMenu.d.ts +9 -0
  209. package/dist/components/d-organization/DOrganizationMenu.js +18 -0
  210. package/dist/components/d-organization/index.d.ts +4 -0
  211. package/dist/components/d-organization/index.js +19 -0
  212. package/dist/components/d-resizable/DResizable.d.ts +10 -0
  213. package/dist/components/d-resizable/DResizable.js +32 -0
  214. package/dist/components/d-runtime/DRuntime.service.d.ts +9 -0
  215. package/dist/components/d-runtime/DRuntime.service.js +11 -0
  216. package/dist/components/d-runtime/DRuntime.view.d.ts +38 -0
  217. package/dist/components/d-runtime/DRuntime.view.js +73 -0
  218. package/dist/components/d-runtime/index.d.ts +2 -0
  219. package/dist/components/d-runtime/index.js +6 -0
  220. package/dist/components/d-user/DUser.service.d.ts +21 -0
  221. package/dist/components/d-user/DUser.service.js +17 -0
  222. package/dist/components/d-user/DUser.view.d.ts +52 -0
  223. package/dist/components/d-user/DUser.view.js +100 -0
  224. package/dist/components/d-user/DUserMenu.d.ts +8 -0
  225. package/dist/components/d-user/DUserMenu.js +28 -0
  226. package/dist/components/d-user/index.d.ts +3 -0
  227. package/dist/components/d-user/index.js +17 -0
  228. package/dist/components/dialog/Dialog.d.ts +28 -0
  229. package/dist/components/dialog/Dialog.js +99 -0
  230. package/dist/components/file-tabs/FileTabs.d.ts +17 -0
  231. package/dist/components/file-tabs/FileTabs.js +71 -0
  232. package/dist/components/file-tabs/FileTabs.service.d.ts +13 -0
  233. package/dist/components/file-tabs/FileTabs.service.js +47 -0
  234. package/dist/components/file-tabs/FileTabs.view.d.ts +9 -0
  235. package/dist/components/file-tabs/FileTabs.view.js +1 -0
  236. package/dist/components/flex/Flex.d.ts +7 -0
  237. package/dist/components/flex/Flex.js +21 -0
  238. package/dist/components/form/CheckboxInput.d.ts +5 -0
  239. package/dist/components/form/CheckboxInput.js +67 -0
  240. package/dist/components/form/EmailInput.d.ts +8 -0
  241. package/dist/components/form/EmailInput.js +20 -0
  242. package/dist/components/form/Input.d.ts +22 -0
  243. package/dist/components/form/Input.js +153 -0
  244. package/dist/components/form/InputDescription.d.ts +5 -0
  245. package/dist/components/form/InputDescription.js +12 -0
  246. package/dist/components/form/InputLabel.d.ts +5 -0
  247. package/dist/components/form/InputLabel.js +12 -0
  248. package/dist/components/form/InputMessage.d.ts +5 -0
  249. package/dist/components/form/InputMessage.js +18 -0
  250. package/dist/components/form/InputSuggestion.d.ts +19 -0
  251. package/dist/components/form/InputSuggestion.js +102 -0
  252. package/dist/components/form/NumberInput.d.ts +6 -0
  253. package/dist/components/form/NumberInput.js +20 -0
  254. package/dist/components/form/PasswordInput.d.ts +8 -0
  255. package/dist/components/form/PasswordInput.js +18 -0
  256. package/dist/components/form/PinInput.d.ts +11 -0
  257. package/dist/components/form/PinInput.js +66 -0
  258. package/dist/components/form/RadioGroup.d.ts +5 -0
  259. package/dist/components/form/RadioGroup.js +48 -0
  260. package/dist/components/form/RadioInput.d.ts +7 -0
  261. package/dist/components/form/RadioInput.js +27 -0
  262. package/dist/components/form/SwitchInput.d.ts +6 -0
  263. package/dist/components/form/SwitchInput.js +19 -0
  264. package/dist/components/form/TextInput.d.ts +7 -0
  265. package/dist/components/form/TextInput.js +19 -0
  266. package/dist/components/form/index.d.ts +15 -0
  267. package/dist/components/form/index.js +37 -0
  268. package/dist/components/form/useForm.d.ts +25 -0
  269. package/dist/components/form/useForm.js +57 -0
  270. package/dist/components/menu/Menu.d.ts +27 -0
  271. package/dist/components/menu/Menu.js +104 -0
  272. package/dist/components/quote/Quote.d.ts +10 -0
  273. package/dist/components/quote/Quote.js +49 -0
  274. package/dist/components/row/Row.d.ts +6 -0
  275. package/dist/components/row/Row.js +21 -0
  276. package/dist/components/scroll-area/ScrollArea.d.ts +13 -0
  277. package/dist/components/scroll-area/ScrollArea.js +43 -0
  278. package/dist/components/segmented-control/SegmentedControl.d.ts +8 -0
  279. package/dist/components/segmented-control/SegmentedControl.js +24 -0
  280. package/dist/components/spacing/Spacing.d.ts +6 -0
  281. package/dist/components/spacing/Spacing.js +23 -0
  282. package/dist/components/tab/Tab.d.ts +11 -0
  283. package/dist/components/tab/Tab.js +40 -0
  284. package/dist/components/text/Text.d.ts +8 -0
  285. package/dist/components/text/Text.js +23 -0
  286. package/dist/components/tooltip/Tooltip.d.ts +13 -0
  287. package/dist/components/tooltip/Tooltip.js +48 -0
  288. package/dist/index.d.ts +29 -0
  289. package/dist/index.js +226 -0
  290. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -0
  291. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +14 -0
  292. package/dist/node_modules/react/compiler-runtime.js +10 -0
  293. package/dist/utils/arrayService.d.ts +10 -0
  294. package/dist/utils/arrayService.js +1 -0
  295. package/dist/utils/contextStore.d.ts +62 -0
  296. package/dist/utils/contextStore.js +60 -0
  297. package/dist/utils/generics.d.ts +17 -0
  298. package/dist/utils/generics.js +310 -0
  299. package/dist/utils/index.d.ts +8 -0
  300. package/dist/utils/index.js +28 -0
  301. package/dist/utils/inspection.d.ts +13 -0
  302. package/dist/utils/inspection.js +4 -0
  303. package/dist/utils/nonReactiveArrayService.d.ts +19 -0
  304. package/dist/utils/nonReactiveArrayService.js +54 -0
  305. package/dist/utils/objectStore.d.ts +12 -0
  306. package/dist/utils/objectStore.js +34 -0
  307. package/dist/utils/reactiveArrayService.d.ts +22 -0
  308. package/dist/utils/reactiveArrayService.js +91 -0
  309. package/dist/utils/types.d.ts +57 -0
  310. package/dist/utils/types.js +4 -0
  311. package/dist/utils/utils.d.ts +68 -0
  312. package/dist/utils/utils.js +216 -0
  313. package/package.json +119 -0
@@ -0,0 +1,119 @@
1
+ import { jsxs as g, Fragment as O, jsx as s } from "react/jsx-runtime";
2
+ import { c as N } from "../../../_virtual/compiler-runtime.js";
3
+ import '../../../assets/components/d-flow/folder/DFlowFolder.style.css';/* empty css */
4
+ import S from "react";
5
+ import { mergeCode0Props as D } from "../../../utils/utils.js";
6
+ import { IconChevronDown as $, IconChevronRight as x, IconFolder as A } from "@tabler/icons-react";
7
+ import { useService as I, useStore as k } from "../../../utils/contextStore.js";
8
+ import { DFlowReactiveService as b } from "../DFlow.service.js";
9
+ import { ScrollArea as z, ScrollAreaViewport as R, ScrollAreaScrollbar as j, ScrollAreaThumb as M } from "../../scroll-area/ScrollArea.js";
10
+ const U = (f) => {
11
+ const {
12
+ flowId: e
13
+ } = f, a = I(b), m = k(b), h = (n) => n.replace(/^\/+|\/+$/g, "").split("/").filter(Boolean), d = S.useMemo(() => (a.values?.() ?? []).filter((l) => !!l?.name), [m]), p = S.useMemo(() => {
14
+ const n = d.find((l) => l.id === e);
15
+ return n?.name ? h(n.name) : [];
16
+ }, [d, e]), u = S.useMemo(() => {
17
+ const n = {
18
+ name: "",
19
+ path: "",
20
+ children: {}
21
+ };
22
+ for (const l of d) {
23
+ const i = h(l.name);
24
+ if (i.length === 0) continue;
25
+ let o = n, t = "";
26
+ for (let c = 0; c < i.length; c++) {
27
+ const r = i[c];
28
+ t = t ? `${t}/${r}` : r, c === i.length - 1 ? o.children[r] ? o.children[r].flow = l : o.children[r] = {
29
+ name: r,
30
+ path: t,
31
+ children: {},
32
+ flow: l
33
+ } : (o.children[r] || (o.children[r] = {
34
+ name: r,
35
+ path: t,
36
+ children: {}
37
+ }), o = o.children[r]);
38
+ }
39
+ }
40
+ return n;
41
+ }, [d]), v = S.useCallback((n) => n ? n.split("/").filter(Boolean).every((i, o) => p[o] === i) : !1, [p]), _ = S.useCallback((n) => {
42
+ const l = Object.values(n), i = l.filter((t) => !t.flow), o = l.filter((t) => !!t.flow);
43
+ return i.sort((t, c) => t.name.localeCompare(c.name)), o.sort((t, c) => t.name.localeCompare(c.name)), /* @__PURE__ */ g(O, { children: [
44
+ i.map((t) => /* @__PURE__ */ s(P, { name: t.name, defaultOpen: v(t.path), children: _(t.children) }, t.path)),
45
+ o.map((t) => /* @__PURE__ */ s(y, { name: t.name, active: t.flow.id === e, "data-flow-id": t.flow.id ?? void 0, title: t.flow.name ?? void 0 }, t.flow.id ?? t.path))
46
+ ] });
47
+ }, [e, v]);
48
+ return /* @__PURE__ */ g(z, { h: "100%", children: [
49
+ /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s("div", { className: "d-folder__root", children: _(u.children) }) }),
50
+ /* @__PURE__ */ s(j, { orientation: "vertical", children: /* @__PURE__ */ s(M, {}) })
51
+ ] });
52
+ }, P = (f) => {
53
+ const e = N.c(22), {
54
+ name: a,
55
+ defaultOpen: m,
56
+ children: h,
57
+ ...d
58
+ } = f, p = m === void 0 ? !1 : m, [u, v] = S.useState(p);
59
+ let _;
60
+ e[0] !== v ? (_ = () => v(B), e[0] = v, e[1] = _) : _ = e[1];
61
+ const n = D("d-folder", d);
62
+ let l;
63
+ e[2] !== v ? (l = () => v(E), e[2] = v, e[3] = l) : l = e[3];
64
+ let i;
65
+ e[4] !== u ? (i = u ? /* @__PURE__ */ s($, { size: 12 }) : /* @__PURE__ */ s(x, { size: 12 }), e[4] = u, e[5] = i) : i = e[5];
66
+ let o;
67
+ e[6] !== l || e[7] !== i ? (o = /* @__PURE__ */ s("span", { onClick: l, className: "d-folder__status", children: i }), e[6] = l, e[7] = i, e[8] = o) : o = e[8];
68
+ let t;
69
+ e[9] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ s("span", { className: "d-folder__icon", children: /* @__PURE__ */ s(A, { size: 12 }) }), e[9] = t) : t = e[9];
70
+ let c;
71
+ e[10] !== a ? (c = /* @__PURE__ */ s("span", { className: "d-folder__name", children: a }), e[10] = a, e[11] = c) : c = e[11];
72
+ let r;
73
+ e[12] !== _ || e[13] !== n || e[14] !== o || e[15] !== c ? (r = /* @__PURE__ */ g("div", { onDoubleClick: _, ...n, children: [
74
+ o,
75
+ t,
76
+ c
77
+ ] }), e[12] = _, e[13] = n, e[14] = o, e[15] = c, e[16] = r) : r = e[16];
78
+ const F = u ? h : null;
79
+ let w;
80
+ e[17] !== F ? (w = /* @__PURE__ */ s("div", { className: "d-folder__content", children: F }), e[17] = F, e[18] = w) : w = e[18];
81
+ let C;
82
+ return e[19] !== w || e[20] !== r ? (C = /* @__PURE__ */ g("div", { children: [
83
+ r,
84
+ w
85
+ ] }), e[19] = w, e[20] = r, e[21] = C) : C = e[21], C;
86
+ }, y = (f) => {
87
+ const e = N.c(12);
88
+ let a, m, h;
89
+ if (e[0] !== f) {
90
+ const {
91
+ name: v,
92
+ icon: _,
93
+ active: n,
94
+ ...l
95
+ } = f;
96
+ m = v, a = _, h = D(`d-folder__item ${n ? "d-folder__item--active" : ""}`, l), e[0] = f, e[1] = a, e[2] = m, e[3] = h;
97
+ } else
98
+ a = e[1], m = e[2], h = e[3];
99
+ let d;
100
+ e[4] !== a ? (d = a ? /* @__PURE__ */ s("span", { className: "d-folder__item-icon", children: a }) : null, e[4] = a, e[5] = d) : d = e[5];
101
+ let p;
102
+ e[6] !== m ? (p = /* @__PURE__ */ s("span", { className: "d-folder__item-name", children: m }), e[6] = m, e[7] = p) : p = e[7];
103
+ let u;
104
+ return e[8] !== h || e[9] !== d || e[10] !== p ? (u = /* @__PURE__ */ g("div", { ...h, children: [
105
+ d,
106
+ p
107
+ ] }), e[8] = h, e[9] = d, e[10] = p, e[11] = u) : u = e[11], u;
108
+ };
109
+ function B(f) {
110
+ return !f;
111
+ }
112
+ function E(f) {
113
+ return !f;
114
+ }
115
+ export {
116
+ U as DFlowFolder,
117
+ P as DFlowFolderGroup,
118
+ y as DFlowFolderItem
119
+ };
@@ -0,0 +1 @@
1
+ export * from './DFlowFolder';
@@ -0,0 +1,6 @@
1
+ import { DFlowFolder as r, DFlowFolderGroup as F, DFlowFolderItem as e } from "./DFlowFolder.js";
2
+ export {
3
+ r as DFlowFolder,
4
+ F as DFlowFolderGroup,
5
+ e as DFlowFolderItem
6
+ };
@@ -0,0 +1,4 @@
1
+ import { FunctionDefinitionView } from './DFlowFunction.view';
2
+ import { DFlowDataTypeReactiveService } from '../data-type/DFlowDataType.service';
3
+ import { DataTypeIdentifier, NodeParameterValue } from '@code0-tech/sagittarius-graphql-types';
4
+ export declare const useInputType: (type: DataTypeIdentifier, func: FunctionDefinitionView, values: NodeParameterValue[], dataTypeService: DFlowDataTypeReactiveService) => DataTypeIdentifier | null;
@@ -0,0 +1,9 @@
1
+ import { resolveGenericKeys as o, replaceGenericKeysInType as s } from "../../../utils/generics.js";
2
+ const c = (r, e, n, p) => {
3
+ if (!e.returnType) return null;
4
+ const t = o(e, n, p);
5
+ return s(r, t);
6
+ };
7
+ export {
8
+ c as useInputType
9
+ };
@@ -0,0 +1,4 @@
1
+ import { FunctionDefinitionView } from './DFlowFunction.view';
2
+ import { DFlowDataTypeReactiveService } from '../data-type/DFlowDataType.service';
3
+ import { DataTypeIdentifier, NodeParameterValue } from '@code0-tech/sagittarius-graphql-types';
4
+ export declare const useReturnType: (func: FunctionDefinitionView, values: NodeParameterValue[], dataTypeService?: DFlowDataTypeReactiveService) => DataTypeIdentifier | null;
@@ -0,0 +1,11 @@
1
+ import { DFlowDataTypeReactiveService as n } from "../data-type/DFlowDataType.service.js";
2
+ import { resolveGenericKeys as p, replaceGenericKeysInType as i } from "../../../utils/generics.js";
3
+ import { useService as s } from "../../../utils/contextStore.js";
4
+ const c = (e, o, r) => {
5
+ if (r = r ?? s(n), !e.returnType) return null;
6
+ const t = p(e, o, r);
7
+ return i(e.returnType, t);
8
+ };
9
+ export {
10
+ c as useReturnType
11
+ };
@@ -0,0 +1,6 @@
1
+ import { ReactiveArrayService } from '../../../utils/reactiveArrayService';
2
+ import { FunctionDefinitionView } from './DFlowFunction.view';
3
+ import { FunctionDefinition } from '@code0-tech/sagittarius-graphql-types';
4
+ export declare abstract class DFlowFunctionReactiveService extends ReactiveArrayService<FunctionDefinitionView> {
5
+ getById(id: FunctionDefinition['id']): FunctionDefinitionView | undefined;
6
+ }
@@ -0,0 +1,9 @@
1
+ import { ReactiveArrayService as r } from "../../../utils/reactiveArrayService.js";
2
+ class a extends r {
3
+ getById(e) {
4
+ return this.values().find((i) => i.id === e);
5
+ }
6
+ }
7
+ export {
8
+ a as DFlowFunctionReactiveService
9
+ };
@@ -0,0 +1,10 @@
1
+ import { FunctionDefinitionView } from './DFlowFunction.view';
2
+ import { DFlowDataTypeReactiveService } from '../data-type/DFlowDataType.service';
3
+ import { ValidationResult } from '../../../utils/inspection';
4
+ import { NodeParameterValue, Scalars } from '@code0-tech/sagittarius-graphql-types';
5
+ /**
6
+ * Validates function parameter values against a function definition, resolving all generics.
7
+ * For each parameter, determines if the provided value is a valid match for the parameter's (possibly generic) type.
8
+ * Returns an array of ValidationResults (errors for each parameter, null entry for valid).
9
+ */
10
+ export declare const useFunctionValidation: (func: FunctionDefinitionView, values: NodeParameterValue[], dataTypeService: DFlowDataTypeReactiveService, flowId: Scalars["FlowID"]["output"]) => ValidationResult[] | null;
@@ -0,0 +1,74 @@
1
+ import { DataTypeView as m } from "../data-type/DFlowDataType.view.js";
2
+ import { InspectionSeverity as G } from "../../../utils/inspection.js";
3
+ import { resolveGenericKeys as N, replaceGenericKeysInDataTypeObject as g, replaceGenericKeysInType as D } from "../../../utils/generics.js";
4
+ import { useReturnType as I } from "./DFlowFunction.return.hook.js";
5
+ import { useService as V } from "../../../utils/contextStore.js";
6
+ import { DFlowFunctionReactiveService as E } from "./DFlowFunction.service.js";
7
+ import { useValidateDataType as T } from "../data-type/DFlowDataType.validation.type.js";
8
+ import { useValidateValue as l } from "../data-type/DFlowDataType.validation.value.js";
9
+ import { DFlowReactiveService as M } from "../DFlow.service.js";
10
+ const q = (f, d, a, h) => {
11
+ const R = V(E), y = V(M).getById(h), u = N(f, d, a, y), w = f.parameterDefinitions ?? [], v = f.genericKeys ?? [], r = [];
12
+ return w.forEach((s, F) => {
13
+ const n = d[F];
14
+ if (!n) return;
15
+ const p = s.dataTypeIdentifier, e = a.getDataType(p), _ = n.__typename === "NodeFunction" && e?.variant != "NODE" ? I(R.getById(n.functionDefinition?.id), n.parameters?.nodes?.map((o) => o?.value)) : a.getTypeFromValue(n, y), t = a.getDataType(_), K = e && p?.genericType || p?.genericKey && v.includes(p.genericKey);
16
+ let i = !0;
17
+ if (K) {
18
+ if (_?.genericType && e) {
19
+ if (n.__typename === "ReferenceValue" || n.__typename === "NodeFunction") {
20
+ const o = new m(g(e.json, u)), j = new m(g(t?.json, u));
21
+ i = T(o, j), i || r.push(c(s.id, e, t));
22
+ } else {
23
+ const o = D(p, u);
24
+ i = l(n, e, y, o?.genericType?.genericMappers), i || r.push(c(s.id, e, t));
25
+ }
26
+ return;
27
+ }
28
+ if (p?.genericKey && v.includes(p?.genericKey)) {
29
+ if (n.__typename != "ReferenceValue") {
30
+ const o = D(p, u);
31
+ i = l(n, a.getDataType(o), y, o.genericType?.genericMappers), i || r.push(c(s.id, e, t));
32
+ }
33
+ return;
34
+ }
35
+ if (t && e && t.json && e.json) {
36
+ if (n.__typename === "ReferenceValue" || n.__typename === "NodeFunction") {
37
+ const o = new m(g(e.json, u));
38
+ i = T(o, t), i || r.push(c(s.id, e, t));
39
+ } else {
40
+ const o = D(p, u);
41
+ i = l(n, a.getDataType(o), y, o.genericType?.genericMappers), i || r.push(c(s.id, e, t));
42
+ }
43
+ return;
44
+ }
45
+ }
46
+ if (e) {
47
+ if (_?.genericType && e) {
48
+ if (n.__typename === "ReferenceValue" || n.__typename === "NodeFunction") {
49
+ const o = new m(g(t?.json, u));
50
+ i = T(e, o), i || r.push(c(s.id, e, t));
51
+ } else
52
+ i = l(n, e), i || r.push(c(s.id, e, t));
53
+ return;
54
+ }
55
+ if (t) {
56
+ (n.__typename === "ReferenceValue" || n.__typename === "NodeFunction") && e.variant !== "NODE" ? (i = T(e, t), i || r.push(c(s.id, e, t))) : (i = l(n, e), i || r.push(c(s.id, e, t)));
57
+ return;
58
+ }
59
+ }
60
+ r.push(c(s.id, e, t));
61
+ }), r.length > 0 ? r : null;
62
+ }, c = (f, d, a) => ({
63
+ parameterId: f,
64
+ type: G.ERROR,
65
+ message: {
66
+ nodes: [{
67
+ code: "en-US",
68
+ content: `Argument of type ${a?.name?.nodes[0]?.content} is not assignable to parameter of type ${d?.name?.nodes[0]?.content}`
69
+ }]
70
+ }
71
+ });
72
+ export {
73
+ q as useFunctionValidation
74
+ };
@@ -0,0 +1,66 @@
1
+ import { DataTypeIdentifier, FunctionDefinition, Maybe, ParameterDefinition, RuntimeFunctionDefinition, Scalars, TranslationConnection } from '@code0-tech/sagittarius-graphql-types';
2
+ export declare class FunctionDefinitionView {
3
+ /** Time when this FunctionDefinition was created */
4
+ private readonly _createdAt?;
5
+ /** Deprecation message of the function */
6
+ private readonly _deprecationMessages?;
7
+ /** Description of the function */
8
+ private readonly _descriptions?;
9
+ /** Documentation of the function */
10
+ private readonly _documentations?;
11
+ /** Generic keys of the function */
12
+ private readonly _genericKeys?;
13
+ /** Global ID of this FunctionDefinition */
14
+ private readonly _id?;
15
+ /** Name of the function */
16
+ private readonly _names?;
17
+ /** Parameters of the function */
18
+ private readonly _parameterDefinitions?;
19
+ /** Return type of the function */
20
+ private readonly _returnType?;
21
+ /** Runtime function definition */
22
+ private readonly _runtimeFunctionDefinition?;
23
+ /** Indicates if the function can throw an error */
24
+ private readonly _throwsError?;
25
+ /** Time when this FunctionDefinition was last updated */
26
+ private readonly _updatedAt?;
27
+ constructor(object: FunctionDefinition);
28
+ get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
29
+ get deprecationMessages(): Maybe<TranslationConnection> | undefined;
30
+ get descriptions(): Maybe<TranslationConnection> | undefined;
31
+ get documentations(): Maybe<TranslationConnection> | undefined;
32
+ get genericKeys(): Maybe<Array<Scalars["String"]["output"]>> | undefined;
33
+ get id(): Maybe<Scalars["FunctionDefinitionID"]["output"]> | undefined;
34
+ get names(): Maybe<TranslationConnection> | undefined;
35
+ get parameterDefinitions(): Maybe<ParameterDefinitionView[]> | undefined;
36
+ get returnType(): Maybe<DataTypeIdentifier> | undefined;
37
+ get runtimeFunctionDefinition(): Maybe<RuntimeFunctionDefinition> | undefined;
38
+ get throwsError(): Maybe<Scalars["Boolean"]["output"]> | undefined;
39
+ get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
40
+ json(): FunctionDefinition;
41
+ }
42
+ export declare class ParameterDefinitionView {
43
+ /** Time when this ParameterDefinition was created */
44
+ private readonly _createdAt?;
45
+ /** Data type of the parameter */
46
+ private readonly _dataTypeIdentifier?;
47
+ /** Description of the parameter */
48
+ private readonly _descriptions?;
49
+ /** Documentation of the parameter */
50
+ private readonly _documentations?;
51
+ /** Global ID of this ParameterDefinition */
52
+ private readonly _id?;
53
+ /** Name of the parameter */
54
+ private readonly _names?;
55
+ /** Time when this ParameterDefinition was last updated */
56
+ private readonly _updatedAt?;
57
+ constructor(object: ParameterDefinition);
58
+ get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
59
+ get dataTypeIdentifier(): Maybe<DataTypeIdentifier> | undefined;
60
+ get descriptions(): Maybe<TranslationConnection> | undefined;
61
+ get documentations(): Maybe<TranslationConnection> | undefined;
62
+ get id(): Maybe<Scalars["ParameterDefinitionID"]["output"]> | undefined;
63
+ get names(): Maybe<TranslationConnection> | undefined;
64
+ get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
65
+ json(): ParameterDefinition;
66
+ }
@@ -0,0 +1,117 @@
1
+ function i(e, t, r) {
2
+ return (t = s(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
3
+ }
4
+ function s(e) {
5
+ var t = d(e, "string");
6
+ return typeof t == "symbol" ? t : t + "";
7
+ }
8
+ function d(e, t) {
9
+ if (typeof e != "object" || !e) return e;
10
+ var r = e[Symbol.toPrimitive];
11
+ if (r !== void 0) {
12
+ var n = r.call(e, t);
13
+ if (typeof n != "object") return n;
14
+ throw new TypeError("@@toPrimitive must return a primitive value.");
15
+ }
16
+ return (t === "string" ? String : Number)(e);
17
+ }
18
+ class a {
19
+ constructor(t) {
20
+ i(this, "_createdAt", void 0), i(this, "_deprecationMessages", void 0), i(this, "_descriptions", void 0), i(this, "_documentations", void 0), i(this, "_genericKeys", void 0), i(this, "_id", void 0), i(this, "_names", void 0), i(this, "_parameterDefinitions", void 0), i(this, "_returnType", void 0), i(this, "_runtimeFunctionDefinition", void 0), i(this, "_throwsError", void 0), i(this, "_updatedAt", void 0), this._createdAt = t.createdAt, this._deprecationMessages = t.deprecationMessages, this._descriptions = t.descriptions, this._documentations = t.documentations, this._genericKeys = t.genericKeys, this._id = t.id, this._names = t.names, this._parameterDefinitions = t.parameterDefinitions?.nodes?.map((r) => new o(r)) ?? void 0, this._returnType = t.returnType, this._runtimeFunctionDefinition = t.runtimeFunctionDefinition, this._throwsError = t.throwsError, this._updatedAt = t.updatedAt;
21
+ }
22
+ get createdAt() {
23
+ return this._createdAt;
24
+ }
25
+ get deprecationMessages() {
26
+ return this._deprecationMessages;
27
+ }
28
+ get descriptions() {
29
+ return this._descriptions;
30
+ }
31
+ get documentations() {
32
+ return this._documentations;
33
+ }
34
+ get genericKeys() {
35
+ return this._genericKeys;
36
+ }
37
+ get id() {
38
+ return this._id;
39
+ }
40
+ get names() {
41
+ return this._names;
42
+ }
43
+ get parameterDefinitions() {
44
+ return this._parameterDefinitions;
45
+ }
46
+ get returnType() {
47
+ return this._returnType;
48
+ }
49
+ get runtimeFunctionDefinition() {
50
+ return this._runtimeFunctionDefinition;
51
+ }
52
+ get throwsError() {
53
+ return this._throwsError;
54
+ }
55
+ get updatedAt() {
56
+ return this._updatedAt;
57
+ }
58
+ json() {
59
+ return {
60
+ createdAt: this._createdAt,
61
+ deprecationMessages: this._deprecationMessages,
62
+ descriptions: this._descriptions,
63
+ documentations: this._documentations,
64
+ genericKeys: this._genericKeys,
65
+ id: this._id,
66
+ names: this._names,
67
+ parameterDefinitions: this._parameterDefinitions ? {
68
+ nodes: this._parameterDefinitions.map((t) => t.json())
69
+ } : void 0,
70
+ returnType: this._returnType,
71
+ runtimeFunctionDefinition: this._runtimeFunctionDefinition,
72
+ throwsError: this._throwsError,
73
+ updatedAt: this._updatedAt
74
+ };
75
+ }
76
+ }
77
+ class o {
78
+ constructor(t) {
79
+ i(this, "_createdAt", void 0), i(this, "_dataTypeIdentifier", void 0), i(this, "_descriptions", void 0), i(this, "_documentations", void 0), i(this, "_id", void 0), i(this, "_names", void 0), i(this, "_updatedAt", void 0), this._createdAt = t.createdAt, this._dataTypeIdentifier = t.dataTypeIdentifier, this._descriptions = t.descriptions, this._documentations = t.documentations, this._id = t.id, this._names = t.names, this._updatedAt = t.updatedAt;
80
+ }
81
+ get createdAt() {
82
+ return this._createdAt;
83
+ }
84
+ get dataTypeIdentifier() {
85
+ return this._dataTypeIdentifier;
86
+ }
87
+ get descriptions() {
88
+ return this._descriptions;
89
+ }
90
+ get documentations() {
91
+ return this._documentations;
92
+ }
93
+ get id() {
94
+ return this._id;
95
+ }
96
+ get names() {
97
+ return this._names;
98
+ }
99
+ get updatedAt() {
100
+ return this._updatedAt;
101
+ }
102
+ json() {
103
+ return {
104
+ createdAt: this._createdAt,
105
+ dataTypeIdentifier: this._dataTypeIdentifier,
106
+ descriptions: this._descriptions,
107
+ documentations: this._documentations,
108
+ id: this._id,
109
+ names: this._names,
110
+ updatedAt: this._updatedAt
111
+ };
112
+ }
113
+ }
114
+ export {
115
+ a as FunctionDefinitionView,
116
+ o as ParameterDefinitionView
117
+ };
@@ -0,0 +1,15 @@
1
+ import { Code0Component } from '../../../utils/types';
2
+ import { Node, NodeProps } from '@xyflow/react';
3
+ import { NodeFunctionView } from '../DFlow.view';
4
+ import { default as React } from 'react';
5
+ import { Scalars } from '@code0-tech/sagittarius-graphql-types';
6
+ export interface DFlowFunctionDefaultCardDataProps extends Omit<Code0Component<HTMLDivElement>, "scope"> {
7
+ instance: NodeFunctionView;
8
+ flowId: Scalars["FlowID"]["output"];
9
+ isParameter: boolean;
10
+ depth: number;
11
+ scope: number[];
12
+ index: number;
13
+ }
14
+ export type DFlowFunctionDefaultCardProps = NodeProps<Node<DFlowFunctionDefaultCardDataProps>>;
15
+ export declare const DFlowFunctionDefaultCard: React.FC<DFlowFunctionDefaultCardProps>;
@@ -0,0 +1,158 @@
1
+ import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
+ import { useStore as h, useReactFlow as j, useStoreApi as B, Handle as I, Position as u } from "@xyflow/react";
3
+ import { NodeFunctionView as b } from "../DFlow.view.js";
4
+ import { memo as G } from "react";
5
+ import { Card as H } from "../../card/Card.js";
6
+ import '../../../assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css';/* empty css */
7
+ import S from "../../card/CardSection.js";
8
+ import { Flex as s } from "../../flex/Flex.js";
9
+ import { IconFileLambdaFilled as V, IconDots as W, IconTrash as k, IconCopy as $, IconLayoutNavbarCollapseFilled as X, IconExclamationCircle as Y, IconAlertTriangle as q, IconMessageExclamation as J, IconArrowRightCircle as K } from "@tabler/icons-react";
10
+ import { Text as T } from "../../text/Text.js";
11
+ import { Button as D } from "../../button/Button.js";
12
+ import { Menu as Q, MenuTrigger as U, MenuPortal as Z, MenuContent as ee, MenuLabel as te, MenuItem as x } from "../../menu/Menu.js";
13
+ import { Badge as R } from "../../badge/Badge.js";
14
+ import { useService as g } from "../../../utils/contextStore.js";
15
+ import { DFlowFunctionReactiveService as ie } from "./DFlowFunction.service.js";
16
+ import { useFunctionValidation as ne } from "./DFlowFunction.vaildation.hook.js";
17
+ import { DFlowDataTypeReactiveService as oe } from "../data-type/DFlowDataType.service.js";
18
+ import { InspectionSeverity as c } from "../../../utils/inspection.js";
19
+ import { DFlowReactiveService as re } from "../DFlow.service.js";
20
+ import { DFlowSuggestionMenu as ae } from "../suggestion/DFlowSuggestionMenu.js";
21
+ import { useSuggestions as le } from "../suggestion/DFlowSuggestion.hook.js";
22
+ import { FileTabsService as de } from "../../file-tabs/FileTabs.service.js";
23
+ import { DFlowTabDefault as se } from "../tab/DFlowTabDefault.js";
24
+ const Me = G((d) => {
25
+ const {
26
+ data: i,
27
+ id: m
28
+ } = d, N = h((e) => e.width), F = h((e) => e.height), A = j(), _ = B(), v = g(de), C = g(re), z = g(ie), w = g(oe), f = z.getById(i.instance.functionDefinition?.id), r = ne(f, i.instance.parameters.map((e) => e.value instanceof b ? e.value.json() : e.value), w, d.data.flowId), M = h((e) => e.edges), E = d.width ?? 0, L = d.height ?? 0;
29
+ i.instance.parameters?.forEach((e) => {
30
+ const a = f?.parameterDefinitions.find((n) => n.id == e?.id);
31
+ e.validationResults = r ? r.filter((n) => n.parameterId === a?.id) : [];
32
+ });
33
+ function P(e) {
34
+ return M.some((a) => a.target === m && a.targetHandle === `param-${e}`);
35
+ }
36
+ const O = h((e) => {
37
+ const a = e.nodes.filter((l) => l.parentId === d.parentId);
38
+ let n;
39
+ return a.forEach((l) => {
40
+ const y = l.data?.index ?? 1 / 0, p = n?.data?.index ?? 1 / 0;
41
+ (!n || y < p) && (n = l);
42
+ }), n;
43
+ });
44
+ return /* @__PURE__ */ o(H, { outline: O.id === m, borderColor: v.getActiveTab()?.id == m ? "info" : void 0, className: v.getActiveTab()?.id == m ? "d-flow-viewport-default-card--active" : void 0, color: (r?.filter((e) => e.type === c.ERROR)?.length ?? 0) > 0 ? "error" : "secondary", onClick: () => {
45
+ A.setViewport({
46
+ x: N / 2 + d.positionAbsoluteX * -1 - E / 2,
47
+ y: F / 2 + d.positionAbsoluteY * -1 - L / 2,
48
+ zoom: 1
49
+ }, {
50
+ duration: 250
51
+ }), v.add({
52
+ id: m,
53
+ active: !0,
54
+ closeable: !0,
55
+ children: /* @__PURE__ */ t(T, { size: "md", children: f?.names?.nodes[0]?.content }),
56
+ content: /* @__PURE__ */ t(se, { flowId: d.data.flowId, depthLevel: i.depth, scopeLevel: i.scope, nodeLevel: i.index, functionInstance: i.instance })
57
+ });
58
+ }, style: {
59
+ position: "relative"
60
+ }, children: [
61
+ /* @__PURE__ */ t(S, { border: !0, children: /* @__PURE__ */ o(s, { align: "center", justify: "space-between", style: {
62
+ gap: "0.7rem"
63
+ }, children: [
64
+ /* @__PURE__ */ o(s, { align: "center", style: {
65
+ gap: "0.7rem"
66
+ }, children: [
67
+ /* @__PURE__ */ t(V, { size: 16 }),
68
+ /* @__PURE__ */ t(T, { size: "md", children: f?.names?.nodes[0]?.content })
69
+ ] }),
70
+ /* @__PURE__ */ o(s, { align: "center", style: {
71
+ gap: "0.7rem"
72
+ }, children: [
73
+ /* @__PURE__ */ o(Q, { onOpenChange: (e) => {
74
+ setTimeout(() => {
75
+ _.setState({
76
+ nodesDraggable: !e,
77
+ nodesConnectable: !e,
78
+ elementsSelectable: !e
79
+ });
80
+ }, 250);
81
+ }, children: [
82
+ /* @__PURE__ */ t(U, { asChild: !0, children: /* @__PURE__ */ t(D, { variant: "none", children: /* @__PURE__ */ t(W, { size: 16 }) }) }),
83
+ /* @__PURE__ */ t(Z, { children: /* @__PURE__ */ o(ee, { children: [
84
+ /* @__PURE__ */ t(te, { children: "Actions" }),
85
+ /* @__PURE__ */ o(x, { onClick: () => {
86
+ i.instance.deleteNextNode(), C.update();
87
+ }, children: [
88
+ /* @__PURE__ */ t(k, { size: 16 }),
89
+ " Delete node"
90
+ ] }),
91
+ /* @__PURE__ */ o(x, { disabled: !0, children: [
92
+ /* @__PURE__ */ t($, { size: 16 }),
93
+ " Copy node"
94
+ ] })
95
+ ] }) })
96
+ ] }),
97
+ /* @__PURE__ */ t(D, { disabled: !0, children: /* @__PURE__ */ t(X, { size: 16 }) })
98
+ ] })
99
+ ] }) }),
100
+ /* @__PURE__ */ t(I, { isConnectable: !1, draggable: !1, type: "target", className: "d-flow-viewport-default-card__handle d-flow-viewport-default-card__handle--target", style: {
101
+ ...i.isParameter ? {
102
+ right: "2px"
103
+ } : {
104
+ top: "2px"
105
+ }
106
+ }, position: i.isParameter ? u.Right : u.Top }),
107
+ (r?.length ?? 0) > 0 ? /* @__PURE__ */ t("div", { className: "d-flow-viewport-default-card__inspection", children: /* @__PURE__ */ o(s, { style: {
108
+ gap: "0.35rem"
109
+ }, children: [
110
+ (r?.filter((e) => e.type === c.ERROR)?.length ?? 0) > 0 ? /* @__PURE__ */ t(R, { color: "error", children: /* @__PURE__ */ o(s, { align: "center", style: {
111
+ gap: "0.35rem"
112
+ }, children: [
113
+ /* @__PURE__ */ t(Y, { size: 12 }),
114
+ r?.filter((e) => e.type === c.ERROR)?.length
115
+ ] }) }) : null,
116
+ (r?.filter((e) => e.type === c.WARNING)?.length ?? 0) > 0 ? /* @__PURE__ */ t(R, { color: "warning", children: /* @__PURE__ */ o(s, { align: "center", style: {
117
+ gap: "0.35rem"
118
+ }, children: [
119
+ /* @__PURE__ */ t(q, { size: 12 }),
120
+ r?.filter((e) => e.type === c.WARNING)?.length
121
+ ] }) }) : null,
122
+ (r?.filter((e) => e.type === c.GRAMMAR)?.length ?? 0) > 0 ? /* @__PURE__ */ t(R, { children: /* @__PURE__ */ o(s, { align: "center", style: {
123
+ gap: "0.35rem"
124
+ }, children: [
125
+ /* @__PURE__ */ t(J, { size: 12 }),
126
+ r?.filter((e) => e.type === c.GRAMMAR)?.length
127
+ ] }) }) : null
128
+ ] }) }) : null,
129
+ i.instance.parameters?.some((e) => {
130
+ const a = f?.parameterDefinitions.find((l) => l.id == e.id), n = w.getDataType(a?.dataTypeIdentifier)?.variant === "NODE";
131
+ return e.value instanceof b && !n || !e.value;
132
+ }) ? /* @__PURE__ */ t(S, { children: i.instance.parameters?.map((e, a) => {
133
+ const n = f?.parameterDefinitions.find((p) => p.id == e.id), l = w.getDataType(n?.dataTypeIdentifier)?.variant === "NODE", y = le(n?.dataTypeIdentifier ?? void 0, [], d.data.flowId, i.depth, i.scope, i.index);
134
+ return e.value instanceof b && !l || !e.value ? /* @__PURE__ */ o(s, { pos: "relative", justify: "space-between", align: "center", children: [
135
+ n?.names?.nodes[0]?.content ?? e.id,
136
+ e.value ? null : /* @__PURE__ */ t(ae, { onSuggestionSelect: (p) => {
137
+ e.value = p.value, C.update();
138
+ }, suggestions: y, triggerContent: /* @__PURE__ */ t(D, { variant: "none", children: /* @__PURE__ */ t(K, { size: 12 }) }) }),
139
+ /* @__PURE__ */ t(I, { type: "target", position: u.Right, style: {
140
+ position: "absolute",
141
+ transform: l ? "translate(-50%, -50%)" : "translate(50%, -50%)",
142
+ top: "50%",
143
+ right: l ? "50%" : "0"
144
+ }, id: `param-${e.id}`, isConnectable: !1, hidden: !P(e.id), className: "d-flow-viewport-default-card__handle d-flow-viewport-default-card__handle--target" }, e.id)
145
+ ] }, a) : null;
146
+ }) }) : null,
147
+ /* @__PURE__ */ t(I, { isConnectable: !1, type: "source", style: {
148
+ ...i.isParameter ? {
149
+ left: "2px"
150
+ } : {
151
+ bottom: "2px"
152
+ }
153
+ }, className: "d-flow-viewport-default-card__handle d-flow-viewport-default-card__handle--source", position: i.isParameter ? u.Left : u.Bottom })
154
+ ] });
155
+ });
156
+ export {
157
+ Me as DFlowFunctionDefaultCard
158
+ };
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { NodeProps } from '@xyflow/react';
3
+ export interface DFlowFunctionGroupCardProps extends NodeProps {
4
+ }
5
+ export declare const DFlowFunctionGroupCard: React.FC<DFlowFunctionGroupCardProps>;