@code0-tech/pictor 0.0.0-mvp.3 → 0.0.0-mvp.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/compiler-runtime.js +5 -0
- package/dist/_virtual/compiler-runtime2.js +4 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/react-compiler-runtime.development.js +4 -0
- package/dist/_virtual/react-compiler-runtime.production.js +4 -0
- package/dist/_virtual/react-contenteditable.js +7 -0
- package/dist/_virtual/react-contenteditable2.js +4 -0
- package/dist/_virtual/react-dom-server-legacy.browser.development.js +4 -0
- package/dist/_virtual/react-dom-server-legacy.browser.production.js +4 -0
- package/dist/_virtual/react-dom-server.browser.development.js +4 -0
- package/dist/_virtual/react-dom-server.browser.production.js +4 -0
- package/dist/_virtual/react-is.development.js +4 -0
- package/dist/_virtual/react-is.production.min.js +4 -0
- package/dist/_virtual/server.browser.js +5 -0
- package/dist/_virtual/server.browser2.js +4 -0
- package/dist/assets/components/alert/Alert.style.css +1 -0
- package/dist/assets/components/aurora/Aurora.style.css +1 -0
- package/dist/assets/components/avatar/Avatar.style.css +1 -0
- package/dist/assets/components/badge/Badge.style.css +1 -0
- package/dist/assets/{Breadcrumb.css → components/breadcrumb/Breadcrumb.style.css} +1 -1
- package/dist/assets/components/button/Button.style.css +1 -0
- package/dist/assets/components/button-group/ButtonGroup.style.css +1 -0
- package/dist/assets/components/card/Card.style.css +1 -0
- package/dist/assets/components/command/Command.style.css +1 -0
- package/dist/assets/components/context-menu/ContextMenu.style.css +1 -0
- package/dist/assets/components/d-flow/DFlow.style.css +1 -0
- package/dist/assets/components/d-flow-folder/DFlowFolder.style.css +1 -0
- package/dist/assets/components/d-flow-function/DFlowFunctionDefaultCard.style.css +1 -0
- package/dist/assets/components/d-flow-input/DFlowInputDataType.style.css +1 -0
- package/dist/assets/components/d-flow-panel/DFlowMiniMap.style.css +1 -0
- package/dist/assets/components/d-flow-suggestion/DFlowSuggestionSearchInput.style.css +1 -0
- package/dist/assets/components/d-flow-validation/DFlowValidation.style.css +1 -0
- package/dist/assets/components/d-layout/DLayout.style.css +1 -0
- package/dist/assets/components/d-resizable/DResizable.style.css +1 -0
- package/dist/assets/components/dialog/Dialog.style.css +1 -0
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -0
- package/dist/assets/components/form/Input.style.css +1 -0
- package/dist/assets/components/menu/Menu.style.css +1 -0
- package/dist/assets/{ScrollArea.css → components/scroll-area/ScrollArea.style.css} +1 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -0
- package/dist/assets/components/spacing/Spacing.style.css +1 -0
- package/dist/assets/components/tab/Tab.style.css +1 -0
- package/dist/assets/components/text/Text.style.css +1 -0
- package/dist/assets/components/toast/Toast.style.css +1 -0
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -0
- package/dist/assets/{DFlow.css → node_modules/@xyflow/react/dist/style.css} +1 -1
- package/dist/components/alert/Alert.d.ts +7 -0
- package/dist/components/alert/Alert.js +38 -0
- package/dist/components/aurora/Aurora.d.ts +5 -0
- package/dist/components/aurora/Aurora.js +23 -0
- package/dist/components/avatar/Avatar.js +9 -9
- package/dist/components/badge/Badge.d.ts +2 -1
- package/dist/components/badge/Badge.js +58 -17
- package/dist/components/breadcrumb/Breadcrumb.js +16 -28
- package/dist/components/button/Button.d.ts +3 -2
- package/dist/components/button/Button.js +23 -20
- package/dist/components/button-group/ButtonGroup.js +12 -11
- package/dist/components/card/Card.d.ts +2 -1
- package/dist/components/card/Card.js +25 -22
- package/dist/components/card/CardSection.d.ts +1 -0
- package/dist/components/card/CardSection.js +18 -12
- package/dist/components/col/Col.js +9 -8
- package/dist/components/command/Command.js +19 -18
- package/dist/components/container/Container.js +12 -11
- package/dist/components/context-menu/ContextMenu.d.ts +31 -0
- package/dist/components/context-menu/ContextMenu.js +191 -0
- package/dist/components/d-application/DApplication.service.d.ts +5 -0
- package/dist/components/d-application/DApplication.service.js +9 -0
- package/dist/components/d-flow/DFlow.d.ts +7 -3
- package/dist/components/d-flow/DFlow.edges.hook.d.ts +3 -2
- package/dist/components/d-flow/DFlow.edges.hook.js +100 -136
- package/dist/components/d-flow/DFlow.js +313 -258
- package/dist/components/d-flow/DFlow.nodes.hook.d.ts +6 -2
- package/dist/components/d-flow/DFlow.nodes.hook.js +102 -121
- package/dist/components/d-flow/DFlow.service.d.ts +17 -7
- package/dist/components/d-flow/DFlow.service.js +132 -7
- package/dist/components/d-flow/DFlow.util.d.ts +4 -0
- package/dist/components/d-flow/DFlow.util.js +63 -0
- package/dist/components/d-flow/{edge/DFlowEdge.d.ts → DFlowEdge.d.ts} +5 -3
- package/dist/components/d-flow/DFlowEdge.js +69 -0
- package/dist/components/d-flow/index.d.ts +1 -10
- package/dist/components/d-flow/index.js +9 -44
- package/dist/components/d-flow-data-type/DFlowDataType.service.d.ts +14 -0
- package/dist/components/d-flow-data-type/DFlowDataType.service.js +96 -0
- package/dist/components/{d-flow/data-type → d-flow-data-type}/DFlowDataType.view.d.ts +13 -4
- package/dist/components/d-flow-data-type/DFlowDataType.view.js +76 -0
- package/dist/components/{d-flow/data-type → d-flow-data-type}/index.js +1 -1
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsKeyRule.d.ts +2 -3
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js +222 -0
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsTypeRule.d.ts +2 -3
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js +229 -0
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeParentRule.d.ts +2 -3
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeParentRule.js +3 -3
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeReturnTypeRule.d.ts +2 -3
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js +246 -0
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRule.d.ts +2 -3
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeRules.js +10 -0
- package/dist/components/d-flow-file/DFlowTabDefault.d.ts +7 -0
- package/dist/components/d-flow-file/DFlowTabDefault.js +104 -0
- package/dist/components/{d-flow/tab → d-flow-file}/DFlowTabTrigger.d.ts +2 -2
- package/dist/components/d-flow-file/DFlowTabTrigger.js +64 -0
- package/dist/components/d-flow-file/DFlowTabs.d.ts +8 -0
- package/dist/components/d-flow-file/DFlowTabs.js +132 -0
- package/dist/components/d-flow-file/index.d.ts +1 -0
- package/dist/components/d-flow-file/index.js +4 -0
- package/dist/components/d-flow-folder/DFlowFolder.d.ts +33 -0
- package/dist/components/d-flow-folder/DFlowFolder.js +208 -0
- package/dist/components/d-flow-folder/DFlowFolderContextMenu.d.ts +18 -0
- package/dist/components/d-flow-folder/DFlowFolderContextMenu.js +45 -0
- package/dist/components/d-flow-folder/DFlowFolderCreateDialog.d.ts +9 -0
- package/dist/components/d-flow-folder/DFlowFolderCreateDialog.js +76 -0
- package/dist/components/d-flow-folder/DFlowFolderDeleteDialog.d.ts +10 -0
- package/dist/components/d-flow-folder/DFlowFolderDeleteDialog.js +55 -0
- package/dist/components/d-flow-folder/DFlowFolderItemPathInput.d.ts +5 -0
- package/dist/components/d-flow-folder/DFlowFolderItemPathInput.js +50 -0
- package/dist/components/d-flow-folder/DFlowFolderRenameDialog.d.ts +10 -0
- package/dist/components/d-flow-folder/DFlowFolderRenameDialog.js +55 -0
- package/dist/components/d-flow-folder/index.d.ts +4 -0
- package/dist/components/d-flow-folder/index.js +12 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.input.hook.d.ts +1 -1
- package/dist/components/d-flow-function/DFlowFunction.input.hook.js +8 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.return.hook.d.ts +2 -2
- package/dist/components/d-flow-function/DFlowFunction.return.hook.js +9 -0
- package/dist/components/d-flow-function/DFlowFunction.service.d.ts +11 -0
- package/dist/components/d-flow-function/DFlowFunction.service.js +12 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.view.d.ts +24 -9
- package/dist/components/d-flow-function/DFlowFunction.view.js +139 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionDefaultCard.d.ts +4 -4
- package/dist/components/d-flow-function/DFlowFunctionDefaultCard.js +117 -0
- package/dist/components/d-flow-function/DFlowFunctionGroupCard.d.ts +13 -0
- package/dist/components/d-flow-function/DFlowFunctionGroupCard.js +68 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionSuggestionCard.d.ts +3 -4
- package/dist/components/d-flow-function/DFlowFunctionSuggestionCard.js +43 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionTriggerCard.d.ts +3 -3
- package/dist/components/d-flow-function/DFlowFunctionTriggerCard.js +78 -0
- package/dist/components/{d-flow/input → d-flow-input}/DFlowInputDataType.d.ts +1 -1
- package/dist/components/d-flow-input/DFlowInputDataType.js +437 -0
- package/dist/components/d-flow-input/DFlowInputDefault.d.ts +10 -0
- package/dist/components/d-flow-input/DFlowInputDefault.js +128 -0
- package/dist/components/d-flow-input/DFlowInputLiteralBadge.d.ts +7 -0
- package/dist/components/d-flow-input/DFlowInputLiteralBadge.js +24 -0
- package/dist/components/d-flow-input/DFlowInputNodeBadge.d.ts +11 -0
- package/dist/components/d-flow-input/DFlowInputNodeBadge.js +44 -0
- package/dist/components/d-flow-input/DFlowInputReferenceBadge.d.ts +11 -0
- package/dist/components/d-flow-input/DFlowInputReferenceBadge.js +33 -0
- package/dist/components/d-flow-panel/DFlowExport.d.ts +6 -0
- package/dist/components/d-flow-panel/DFlowExport.js +32 -0
- package/dist/components/d-flow-panel/DFlowMiniMap.js +33 -0
- package/dist/components/d-flow-panel/DFlowPanelControl.d.ts +6 -0
- package/dist/components/d-flow-panel/DFlowPanelControl.js +72 -0
- package/dist/components/d-flow-panel/DFlowPanelLayout.d.ts +4 -0
- package/dist/components/d-flow-panel/DFlowPanelLayout.js +47 -0
- package/dist/components/d-flow-panel/DFlowPanelSize.d.ts +2 -0
- package/dist/components/d-flow-panel/DFlowPanelSize.js +94 -0
- package/dist/components/d-flow-panel/index.d.ts +5 -0
- package/dist/components/d-flow-panel/index.js +12 -0
- package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.d.ts +3 -0
- package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.js +34 -0
- package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.d.ts +3 -0
- package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.js +50 -0
- package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.d.ts +3 -0
- package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.js +133 -0
- package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.d.ts +3 -0
- package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +24 -0
- package/dist/components/d-flow-suggestion/DFlowSuggestion.view.d.ts +14 -0
- package/dist/components/d-flow-suggestion/DFlowSuggestion.view.js +4 -0
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +72 -0
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.util.d.ts +1 -1
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.util.js +12 -11
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuFooter.js +5 -5
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuSearchBar.d.ts +1 -1
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuSearchBar.js +1 -1
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionSearchInput.d.ts +1 -1
- package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.js +35 -0
- package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.d.ts +3 -0
- package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.js +44 -0
- package/dist/components/d-flow-suggestion/index.d.ts +1 -0
- package/dist/components/d-flow-suggestion/index.js +4 -0
- package/dist/components/d-flow-type/DFlowType.service.d.ts +11 -0
- package/dist/components/d-flow-type/DFlowType.service.js +12 -0
- package/dist/components/{d-flow/type → d-flow-type}/DFlowType.view.d.ts +10 -4
- package/dist/components/d-flow-type/DFlowType.view.js +85 -0
- package/dist/components/d-flow-validation/DDataTypeValidation.hook.d.ts +2 -0
- package/dist/components/d-flow-validation/DDataTypeValidation.hook.js +18 -0
- package/dist/components/d-flow-validation/DFlowValidation.hook.d.ts +3 -0
- package/dist/components/d-flow-validation/DFlowValidation.hook.js +22 -0
- package/dist/components/d-flow-validation/DFlowValidation.js +66 -0
- package/dist/components/d-flow-validation/DNodeValidation.hook.d.ts +3 -0
- package/dist/components/d-flow-validation/DNodeValidation.hook.js +58 -0
- package/dist/components/d-flow-validation/DValueValidation.hook.d.ts +3 -0
- package/dist/components/d-flow-validation/DValueValidation.hook.js +8 -0
- package/dist/components/{d-flow/validation → d-flow-validation}/index.js +2 -2
- package/dist/components/d-fullscreen/DFullScreen.d.ts +1 -2
- package/dist/components/d-fullscreen/DFullScreen.js +24 -18
- package/dist/components/d-layout/DLayout.js +27 -26
- package/dist/components/d-license/DNamespaceLicense.service.d.ts +11 -0
- package/dist/components/d-license/DNamespaceLicense.service.js +12 -0
- package/dist/components/d-license/index.d.ts +2 -0
- package/dist/components/d-license/index.js +6 -0
- package/dist/components/d-member/DNamespaceMember.service.d.ts +13 -0
- package/dist/components/d-member/DNamespaceMember.service.js +17 -0
- package/dist/components/{d-namespace/member → d-member}/DNamespaceMember.view.d.ts +4 -1
- package/dist/components/{d-namespace/member → d-member}/DNamespaceMember.view.js +16 -11
- package/dist/components/d-member/DNamespaceMemberCard.d.ts +10 -0
- package/dist/components/d-member/DNamespaceMemberCard.js +16 -0
- package/dist/components/d-member/DNamespaceMemberContent.d.ts +10 -0
- package/dist/components/d-member/DNamespaceMemberContent.js +224 -0
- package/dist/components/d-member/DNamespaceMemberList.d.ts +12 -0
- package/dist/components/d-member/DNamespaceMemberList.js +23 -0
- package/dist/components/d-member/index.d.ts +4 -0
- package/dist/components/d-member/index.js +10 -0
- package/dist/components/d-namespace/DNamespace.service.d.ts +1 -1
- package/dist/components/d-namespace/DNamespace.service.js +7 -6
- package/dist/components/d-namespace/index.d.ts +0 -10
- package/dist/components/d-namespace/index.js +4 -33
- package/dist/components/d-organization/DOrganization.service.d.ts +3 -3
- package/dist/components/d-organization/DOrganization.service.js +8 -7
- package/dist/components/d-organization/DOrganization.view.d.ts +4 -1
- package/dist/components/d-organization/DOrganization.view.js +21 -18
- package/dist/components/d-organization/DOrganizationCard.d.ts +4 -3
- package/dist/components/d-organization/DOrganizationCard.js +13 -60
- package/dist/components/d-organization/DOrganizationList.d.ts +10 -0
- package/dist/components/d-organization/DOrganizationList.js +23 -0
- package/dist/components/d-organization/DOrganizationMenu.js +5 -5
- package/dist/components/d-organization/DOrganizatonContent.d.ts +10 -0
- package/dist/components/d-organization/DOrganizatonContent.js +101 -0
- package/dist/components/d-organization/index.d.ts +1 -0
- package/dist/components/d-organization/index.js +30 -10
- package/dist/components/d-project/DNamespaceProject.service.d.ts +12 -0
- package/dist/components/d-project/DNamespaceProject.service.js +12 -0
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProject.view.d.ts +4 -1
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProject.view.js +13 -10
- package/dist/components/d-project/DNamespaceProjectCard.d.ts +9 -0
- package/dist/components/d-project/DNamespaceProjectCard.js +17 -0
- package/dist/components/d-project/DNamespaceProjectContent.d.ts +10 -0
- package/dist/components/d-project/DNamespaceProjectContent.js +71 -0
- package/dist/components/d-project/DNamespaceProjectList.d.ts +11 -0
- package/dist/components/d-project/DNamespaceProjectList.js +25 -0
- package/dist/components/d-project/DNamespaceProjectMenu.d.ts +13 -0
- package/dist/components/d-project/DNamespaceProjectMenu.js +57 -0
- package/dist/components/d-project/index.d.ts +5 -0
- package/dist/components/d-project/index.js +26 -0
- package/dist/components/d-resizable/DResizable.d.ts +4 -4
- package/dist/components/d-resizable/DResizable.js +26 -23
- package/dist/components/d-role/DNamespaceRole.service.d.ts +13 -0
- package/dist/components/d-role/DNamespaceRole.service.js +12 -0
- package/dist/components/{d-namespace/role → d-role}/DNamespaceRole.view.d.ts +4 -1
- package/dist/components/{d-namespace/role → d-role}/DNamespaceRole.view.js +8 -4
- package/dist/components/d-role/DNamespaceRoleCard.d.ts +11 -0
- package/dist/components/d-role/DNamespaceRoleCard.js +17 -0
- package/dist/components/d-role/DNamespaceRoleContent.d.ts +10 -0
- package/dist/components/d-role/DNamespaceRoleContent.js +162 -0
- package/dist/components/d-role/DNamespaceRoleList.d.ts +12 -0
- package/dist/components/d-role/DNamespaceRoleList.js +24 -0
- package/dist/components/d-role/DNamespaceRolePermissions.d.ts +5 -0
- package/dist/components/d-role/DNamespaceRolePermissions.js +123 -0
- package/dist/components/d-role/index.d.ts +4 -0
- package/dist/components/d-role/index.js +10 -0
- package/dist/components/d-runtime/DRuntime.service.d.ts +5 -2
- package/dist/components/d-runtime/DRuntime.service.js +2 -4
- package/dist/components/d-runtime/DRuntime.view.d.ts +4 -1
- package/dist/components/d-runtime/DRuntime.view.js +6 -3
- package/dist/components/d-runtime/DRuntimeCard.d.ts +9 -0
- package/dist/components/d-runtime/DRuntimeCard.js +18 -0
- package/dist/components/d-runtime/DRuntimeContent.d.ts +9 -0
- package/dist/components/d-runtime/DRuntimeContent.js +45 -0
- package/dist/components/d-runtime/DRuntimeList.d.ts +12 -0
- package/dist/components/d-runtime/DRuntimeList.js +28 -0
- package/dist/components/d-runtime/index.d.ts +2 -0
- package/dist/components/d-runtime/index.js +6 -2
- package/dist/components/d-user/DUser.service.d.ts +3 -4
- package/dist/components/d-user/DUser.service.js +9 -9
- package/dist/components/d-user/DUser.session.hook.d.ts +3 -0
- package/dist/components/d-user/DUser.session.hook.js +16 -0
- package/dist/components/d-user/DUser.view.d.ts +4 -1
- package/dist/components/d-user/DUser.view.js +13 -10
- package/dist/components/d-user/DUserCard.d.ts +8 -0
- package/dist/components/d-user/DUserCard.js +15 -0
- package/dist/components/d-user/DUserContent.d.ts +8 -0
- package/dist/components/d-user/DUserContent.js +84 -0
- package/dist/components/d-user/DUserInput.d.ts +7 -0
- package/dist/components/d-user/DUserInput.js +100 -0
- package/dist/components/d-user/DUserList.d.ts +9 -0
- package/dist/components/d-user/DUserList.js +22 -0
- package/dist/components/d-user/DUserMenu.js +20 -19
- package/dist/components/d-user/index.d.ts +4 -0
- package/dist/components/d-user/index.js +17 -8
- package/dist/components/dialog/Dialog.d.ts +2 -1
- package/dist/components/dialog/Dialog.js +69 -60
- package/dist/components/file-tabs/FileTabs.js +41 -40
- package/dist/components/file-tabs/FileTabs.service.d.ts +5 -1
- package/dist/components/file-tabs/FileTabs.service.js +74 -26
- package/dist/components/file-tabs/FileTabs.view.d.ts +1 -0
- package/dist/components/flex/Flex.js +2 -2
- package/dist/components/form/CheckboxInput.js +62 -53
- package/dist/components/form/EmailInput.js +11 -10
- package/dist/components/form/Input.d.ts +18 -5
- package/dist/components/form/Input.js +333 -139
- package/dist/components/form/Input.syntax.hook.d.ts +10 -0
- package/dist/components/form/Input.syntax.hook.js +14 -0
- package/dist/components/form/Input.utils.d.ts +10 -0
- package/dist/components/form/Input.utils.js +38 -0
- package/dist/components/form/InputContentEditable.hook.d.ts +40 -0
- package/dist/components/form/InputContentEditable.hook.js +471 -0
- package/dist/components/form/InputDescription.js +1 -1
- package/dist/components/form/InputLabel.js +1 -1
- package/dist/components/form/InputMessage.js +1 -1
- package/dist/components/form/InputSuggestion.d.ts +16 -8
- package/dist/components/form/InputSuggestion.js +189 -73
- package/dist/components/form/NumberInput.js +9 -9
- package/dist/components/form/PasswordInput.js +11 -10
- package/dist/components/form/PinInput.js +2 -2
- package/dist/components/form/RadioGroup.js +2 -2
- package/dist/components/form/RadioInput.js +2 -2
- package/dist/components/form/SwitchInput.js +7 -7
- package/dist/components/form/TextInput.js +12 -11
- package/dist/components/form/index.js +26 -27
- package/dist/components/form/useForm.d.ts +3 -1
- package/dist/components/form/useForm.js +53 -33
- package/dist/components/menu/Menu.d.ts +7 -3
- package/dist/components/menu/Menu.js +24 -24
- package/dist/components/quote/Quote.js +32 -36
- package/dist/components/row/Row.js +10 -9
- package/dist/components/scroll-area/ScrollArea.js +18 -17
- package/dist/components/segmented-control/SegmentedControl.d.ts +1 -1
- package/dist/components/segmented-control/SegmentedControl.js +19 -16
- package/dist/components/spacing/Spacing.d.ts +6 -0
- package/dist/components/spacing/Spacing.js +23 -0
- package/dist/components/tab/Tab.d.ts +11 -0
- package/dist/components/tab/Tab.js +40 -0
- package/dist/components/text/Text.js +2 -2
- package/dist/components/toast/Toast.d.ts +13 -0
- package/dist/components/toast/Toast.js +62 -0
- package/dist/components/tooltip/Tooltip.js +36 -35
- package/dist/index.d.ts +17 -0
- package/dist/index.js +264 -216
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +527 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +402 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +208 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +136 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +130 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +48 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +53 -0
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +222 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +17 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +13 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +636 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +219 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +183 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +27 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
- package/dist/node_modules/fast-deep-equal/index.js +31 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +7 -0
- package/dist/node_modules/object-assign/index.js +49 -0
- package/dist/node_modules/prop-types/checkPropTypes.js +54 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +52 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +329 -0
- package/dist/node_modules/prop-types/index.js +17 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +10 -0
- package/dist/node_modules/prop-types/lib/has.js +7 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +87 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +70 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +10 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +14 -0
- package/dist/node_modules/react/compiler-runtime.js +10 -0
- package/dist/node_modules/react-contenteditable/lib/react-contenteditable.js +132 -0
- package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +6235 -0
- package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +4096 -0
- package/dist/node_modules/react-dom/cjs/react-dom-server.browser.development.js +6753 -0
- package/dist/node_modules/react-dom/cjs/react-dom-server.browser.production.js +4645 -0
- package/dist/node_modules/react-dom/server.browser.js +15 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +112 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +68 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +71 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +7 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +30 -0
- package/dist/node_modules/tslib/tslib.es6.js +27 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +25 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +67 -0
- package/dist/utils/arrayService.d.ts +2 -2
- package/dist/utils/contextStore.js +1 -1
- package/dist/utils/generics.d.ts +7 -6
- package/dist/utils/generics.js +136 -124
- package/dist/utils/index.js +22 -21
- package/dist/utils/inspection.d.ts +4 -2
- package/dist/utils/inspection.js +27 -2
- package/dist/utils/objectStore.js +15 -15
- package/dist/utils/reactiveArrayService.d.ts +3 -3
- package/dist/utils/reactiveArrayService.js +53 -43
- package/dist/utils/types.d.ts +2 -2
- package/package.json +38 -33
- package/dist/DFlowDataType.service-Dz8pQUeO.js +0 -793
- package/dist/assets/Avatar.css +0 -1
- package/dist/assets/Badge.css +0 -1
- package/dist/assets/Button.css +0 -1
- package/dist/assets/ButtonGroup.css +0 -1
- package/dist/assets/Card.css +0 -1
- package/dist/assets/Command.css +0 -1
- package/dist/assets/DFlowFolder.css +0 -1
- package/dist/assets/DFlowFunctionDefaultCard.css +0 -1
- package/dist/assets/DFlowInputDataType.css +0 -1
- package/dist/assets/DFlowMiniMap.css +0 -1
- package/dist/assets/DFlowSuggestionSearchInput.css +0 -1
- package/dist/assets/DFlowValidation.css +0 -1
- package/dist/assets/DLayout.css +0 -1
- package/dist/assets/DResizable.css +0 -1
- package/dist/assets/Dialog.css +0 -1
- package/dist/assets/FileTabs.css +0 -1
- package/dist/assets/Input.css +0 -1
- package/dist/assets/Menu.css +0 -1
- package/dist/assets/SegmentedControl.css +0 -1
- package/dist/assets/Text.css +0 -1
- package/dist/assets/Tooltip.css +0 -1
- package/dist/compiler-runtime-BNHg76kC.js +0 -36
- package/dist/components/d-flow/DFlow.view.d.ts +0 -109
- package/dist/components/d-flow/DFlow.view.js +0 -213
- package/dist/components/d-flow/control/DFlowControl.d.ts +0 -2
- package/dist/components/d-flow/control/DFlowControl.js +0 -77
- package/dist/components/d-flow/control/index.d.ts +0 -1
- package/dist/components/d-flow/control/index.js +0 -4
- package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +0 -10
- package/dist/components/d-flow/data-type/DFlowDataType.service.js +0 -7
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +0 -2
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +0 -18
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +0 -4
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +0 -6
- package/dist/components/d-flow/data-type/DFlowDataType.view.js +0 -65
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +0 -6
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +0 -6
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +0 -7
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +0 -8
- package/dist/components/d-flow/edge/DFlowEdge.js +0 -48
- package/dist/components/d-flow/folder/DFlowFolder.d.ts +0 -19
- package/dist/components/d-flow/folder/DFlowFolder.js +0 -118
- package/dist/components/d-flow/folder/index.d.ts +0 -1
- package/dist/components/d-flow/folder/index.js +0 -6
- package/dist/components/d-flow/function/DFlowFunction.input.hook.js +0 -9
- package/dist/components/d-flow/function/DFlowFunction.return.hook.js +0 -11
- package/dist/components/d-flow/function/DFlowFunction.service.d.ts +0 -6
- package/dist/components/d-flow/function/DFlowFunction.service.js +0 -9
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +0 -10
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +0 -75
- package/dist/components/d-flow/function/DFlowFunction.view.js +0 -117
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +0 -158
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +0 -5
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +0 -55
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +0 -26
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +0 -97
- package/dist/components/d-flow/input/DFlowInputDataType.js +0 -422
- package/dist/components/d-flow/minimap/DFlowMiniMap.js +0 -21
- package/dist/components/d-flow/minimap/index.d.ts +0 -1
- package/dist/components/d-flow/minimap/index.js +0 -4
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.d.ts +0 -33
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +0 -151
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +0 -5
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +0 -18
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +0 -21
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +0 -25
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +0 -67
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +0 -21
- package/dist/components/d-flow/suggestion/index.d.ts +0 -2
- package/dist/components/d-flow/suggestion/index.js +0 -7
- package/dist/components/d-flow/tab/DFlowTabDefault.d.ts +0 -11
- package/dist/components/d-flow/tab/DFlowTabDefault.js +0 -97
- package/dist/components/d-flow/tab/DFlowTabTrigger.js +0 -51
- package/dist/components/d-flow/tab/DFlowTabs.d.ts +0 -2
- package/dist/components/d-flow/tab/DFlowTabs.js +0 -105
- package/dist/components/d-flow/type/DFlowType.service.d.ts +0 -6
- package/dist/components/d-flow/type/DFlowType.service.js +0 -9
- package/dist/components/d-flow/type/DFlowType.view.js +0 -69
- package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +0 -3
- package/dist/components/d-flow/validation/DFlowValidation.hook.js +0 -10
- package/dist/components/d-flow/validation/DFlowValidation.js +0 -59
- package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +0 -8
- package/dist/components/d-namespace/license/DNamespaceLicense.service.js +0 -11
- package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +0 -9
- package/dist/components/d-namespace/member/DNamespaceMember.service.js +0 -11
- package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +0 -9
- package/dist/components/d-namespace/project/DNamespaceProject.service.js +0 -11
- package/dist/components/d-namespace/project/DNamespaceProjectCard.d.ts +0 -9
- package/dist/components/d-namespace/project/DNamespaceProjectCard.js +0 -57
- package/dist/components/d-namespace/project/DNamespaceProjectMenu.d.ts +0 -9
- package/dist/components/d-namespace/project/DNamespaceProjectMenu.js +0 -18
- package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +0 -10
- package/dist/components/d-namespace/role/DNamespaceRole.service.js +0 -11
- /package/dist/assets/{Col.css → components/col/Col.style.css} +0 -0
- /package/dist/assets/{Container.css → components/container/Container.style.css} +0 -0
- /package/dist/assets/{DFullScreen.css → components/d-fullscreen/DFullScreen.style.css} +0 -0
- /package/dist/assets/{Flex.css → components/flex/Flex.style.css} +0 -0
- /package/dist/assets/{Quote.css → components/quote/Quote.style.css} +0 -0
- /package/dist/assets/{Row.css → components/row/Row.style.css} +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/index.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeItemOfCollectionRule.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeItemOfCollectionRule.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeNumberRangeRule.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeNumberRangeRule.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRegexRule.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRegexRule.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRule.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRules.d.ts +0 -0
- /package/dist/components/{d-flow/function → d-flow-function}/index.d.ts +0 -0
- /package/dist/components/{d-flow/function → d-flow-function}/index.js +0 -0
- /package/dist/components/{d-flow/minimap → d-flow-panel}/DFlowMiniMap.d.ts +0 -0
- /package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.d.ts +0 -0
- /package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuFooter.d.ts +0 -0
- /package/dist/components/{d-flow/type → d-flow-type}/index.d.ts +0 -0
- /package/dist/components/{d-flow/type → d-flow-type}/index.js +0 -0
- /package/dist/components/{d-flow/validation → d-flow-validation}/DFlowValidation.d.ts +0 -0
- /package/dist/components/{d-flow/validation → d-flow-validation}/index.d.ts +0 -0
- /package/dist/components/{d-namespace/license → d-license}/DNamespaceLicense.view.d.ts +0 -0
- /package/dist/components/{d-namespace/license → d-license}/DNamespaceLicense.view.js +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as m, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { c as b } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { memo as h } from "react";
|
|
4
|
+
import { Handle as i, Position as f } from "@xyflow/react";
|
|
5
|
+
import { Card as g } from "../card/Card.js";
|
|
6
|
+
const M = h((a) => {
|
|
7
|
+
const t = b.c(9), {
|
|
8
|
+
data: o
|
|
9
|
+
} = a;
|
|
10
|
+
let e;
|
|
11
|
+
t[0] !== o.color ? (e = w(o.color, 9), t[0] = o.color, t[1] = e) : e = t[1];
|
|
12
|
+
const s = `2px dashed ${y(o.color, 0.1)}`;
|
|
13
|
+
let r;
|
|
14
|
+
t[2] !== e || t[3] !== s ? (r = {
|
|
15
|
+
background: e,
|
|
16
|
+
border: s
|
|
17
|
+
}, t[2] = e, t[3] = s, t[4] = r) : r = t[4];
|
|
18
|
+
let l;
|
|
19
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ m(i, { type: "target", position: f.Top, className: "d-flow-viewport-default-card__handle d-flow-viewport-default-card__handle--target", isConnectable: !1, draggable: !1, style: {
|
|
20
|
+
top: "0px",
|
|
21
|
+
left: "50%",
|
|
22
|
+
transform: "translateX(-50%)"
|
|
23
|
+
} }), t[5] = l) : l = t[5];
|
|
24
|
+
let n;
|
|
25
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ m(i, { type: "source", position: f.Bottom, className: "d-flow-viewport-default-card__handle d-flow-viewport-default-card__handle--source", isConnectable: !1, draggable: !1, style: {
|
|
26
|
+
bottom: "0px",
|
|
27
|
+
left: "50%",
|
|
28
|
+
transform: "translateX(-50%)"
|
|
29
|
+
} }), t[6] = n) : n = t[6];
|
|
30
|
+
let c;
|
|
31
|
+
return t[7] !== r ? (c = /* @__PURE__ */ u(g, { w: "100%", h: "100%", style: r, children: [
|
|
32
|
+
l,
|
|
33
|
+
n
|
|
34
|
+
] }), t[7] = r, t[8] = c) : c = t[8], c;
|
|
35
|
+
}), p = (a) => Math.min(Math.max(a, 0), 1), d = (a) => {
|
|
36
|
+
if (typeof document > "u")
|
|
37
|
+
return {
|
|
38
|
+
r: 0,
|
|
39
|
+
g: 0,
|
|
40
|
+
b: 0,
|
|
41
|
+
a: 1
|
|
42
|
+
};
|
|
43
|
+
const t = document.createElement("span");
|
|
44
|
+
t.style.color = a, document.body.appendChild(t);
|
|
45
|
+
const o = getComputedStyle(t).color;
|
|
46
|
+
document.body.removeChild(t);
|
|
47
|
+
const e = o.match(/rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*([\d.]+))?\s*\)/);
|
|
48
|
+
return e ? {
|
|
49
|
+
r: Math.round(Number(e[1])),
|
|
50
|
+
g: Math.round(Number(e[2])),
|
|
51
|
+
b: Math.round(Number(e[3])),
|
|
52
|
+
a: e[4] !== void 0 ? Number(e[4]) : 1
|
|
53
|
+
} : {
|
|
54
|
+
r: 0,
|
|
55
|
+
g: 0,
|
|
56
|
+
b: 0,
|
|
57
|
+
a: 1
|
|
58
|
+
};
|
|
59
|
+
}, w = (a, t) => {
|
|
60
|
+
const o = p(t * 0.1), e = d(a), s = d("#030014"), r = (l, n) => Math.round(l * (1 - o) + n * o);
|
|
61
|
+
return `rgb(${r(e.r, s.r)}, ${r(e.g, s.g)}, ${r(e.b, s.b)})`;
|
|
62
|
+
}, y = (a, t) => {
|
|
63
|
+
const o = d(a);
|
|
64
|
+
return `rgba(${o.r}, ${o.g}, ${o.b}, ${p(t)})`;
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
M as DFlowFunctionGroupCard
|
|
68
|
+
};
|
package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionSuggestionCard.d.ts
RENAMED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Code0Component } from '
|
|
1
|
+
import { Code0Component } from '../../utils';
|
|
2
2
|
import { Node, NodeProps } from '@xyflow/react';
|
|
3
3
|
import { default as React } from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import { Flow } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
import { Flow, NodeFunction } from '@code0-tech/sagittarius-graphql-types';
|
|
6
5
|
export interface DFlowFunctionSuggestionCardDataProps extends Code0Component<HTMLDivElement> {
|
|
7
6
|
flowId: Flow['id'];
|
|
8
|
-
parentFunction?:
|
|
7
|
+
parentFunction?: NodeFunction;
|
|
9
8
|
}
|
|
10
9
|
export type DFlowFunctionSuggestionCardProps = NodeProps<Node<DFlowFunctionSuggestionCardDataProps>>;
|
|
11
10
|
export declare const DFlowFunctionSuggestionCard: React.FC<DFlowFunctionSuggestionCardProps>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsxs as f, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { c as u } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { useService as p } from "../../utils/contextStore.js";
|
|
4
|
+
import g, { memo as w } from "react";
|
|
5
|
+
import "merge-props";
|
|
6
|
+
import { Handle as S, Position as _ } from "@xyflow/react";
|
|
7
|
+
import { Button as v } from "../button/Button.js";
|
|
8
|
+
import { IconPlus as F } from "@tabler/icons-react";
|
|
9
|
+
import { useSuggestions as x } from "../d-flow-suggestion/DFlowSuggestion.hook.js";
|
|
10
|
+
import "../d-flow/DFlow.js";
|
|
11
|
+
import { DFlowReactiveService as y } from "../d-flow/DFlow.service.js";
|
|
12
|
+
import "js-md5";
|
|
13
|
+
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
14
|
+
import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
|
|
15
|
+
import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
|
|
16
|
+
import "../d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js";
|
|
17
|
+
import "../d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js";
|
|
18
|
+
import "../d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js";
|
|
19
|
+
import { DFlowSuggestionMenu as I } from "../d-flow-suggestion/DFlowSuggestionMenu.js";
|
|
20
|
+
const J = w((e) => {
|
|
21
|
+
const t = u.c(12), [, l] = g.useTransition(), d = x(e.data.flowId, e.data.parentFunction?.id), o = p(y);
|
|
22
|
+
let a;
|
|
23
|
+
t[0] !== o || t[1] !== e.data.flowId ? (a = o.getById(e.data.flowId), t[0] = o, t[1] = e.data.flowId, t[2] = a) : a = t[2];
|
|
24
|
+
const m = a;
|
|
25
|
+
let i;
|
|
26
|
+
t[3] !== m?.id || t[4] !== o || t[5] !== e.data.parentFunction?.id || t[6] !== l ? (i = (c) => {
|
|
27
|
+
l(async () => {
|
|
28
|
+
c.value.__typename === "NodeFunction" && await o.addNextNodeById(m?.id, e.data.parentFunction?.id ?? null, c.value);
|
|
29
|
+
});
|
|
30
|
+
}, t[3] = m?.id, t[4] = o, t[5] = e.data.parentFunction?.id, t[6] = l, t[7] = i) : i = t[7];
|
|
31
|
+
let n;
|
|
32
|
+
t[8] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ f(v, { paddingSize: "xxs", variant: "normal", color: "secondary", children: [
|
|
33
|
+
/* @__PURE__ */ s(S, { isConnectable: !1, draggable: !1, type: "target", className: "d-flow-viewport-default-card__handle d-flow-viewport-default-card__handle--target", style: {
|
|
34
|
+
top: "2px"
|
|
35
|
+
}, position: _.Top }),
|
|
36
|
+
/* @__PURE__ */ s(F, { size: 12 })
|
|
37
|
+
] }), t[8] = n) : n = t[8];
|
|
38
|
+
let r;
|
|
39
|
+
return t[9] !== d || t[10] !== i ? (r = /* @__PURE__ */ s(I, { onSuggestionSelect: i, suggestions: d, triggerContent: n }), t[9] = d, t[10] = i, t[11] = r) : r = t[11], r;
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
J as DFlowFunctionSuggestionCard
|
|
43
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Code0Component } from '
|
|
3
|
-
import { FlowView } from '../DFlow.view';
|
|
2
|
+
import { Code0Component } from '../../utils';
|
|
4
3
|
import { Node, NodeProps } from '@xyflow/react';
|
|
4
|
+
import { Flow } from '@code0-tech/sagittarius-graphql-types';
|
|
5
5
|
export interface DFlowFunctionTriggerCardDataProps extends Omit<Code0Component<HTMLDivElement>, "scope"> {
|
|
6
|
-
instance:
|
|
6
|
+
instance: Flow;
|
|
7
7
|
}
|
|
8
8
|
export type DFlowFunctionTriggerCardProps = NodeProps<Node<DFlowFunctionTriggerCardDataProps>>;
|
|
9
9
|
export declare const DFlowFunctionTriggerCard: React.FC<DFlowFunctionTriggerCardProps>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import b, { memo as y } from "react";
|
|
3
|
+
import { useReactFlow as T, useStore as s, Handle as x, Position as S } from "@xyflow/react";
|
|
4
|
+
import { Text as l } from "../text/Text.js";
|
|
5
|
+
import { useService as m } from "../../utils/contextStore.js";
|
|
6
|
+
import "merge-props";
|
|
7
|
+
import { FileTabsService as R } from "../file-tabs/FileTabs.service.js";
|
|
8
|
+
import { Card as z } from "../card/Card.js";
|
|
9
|
+
import { Flex as n } from "../flex/Flex.js";
|
|
10
|
+
import { IconBolt as p, IconChevronDown as F } from "@tabler/icons-react";
|
|
11
|
+
import { Button as B } from "../button/Button.js";
|
|
12
|
+
import { DFlowTabTrigger as _ } from "../d-flow-file/DFlowTabTrigger.js";
|
|
13
|
+
import { DFlowTypeReactiveService as C } from "../d-flow-type/DFlowType.service.js";
|
|
14
|
+
import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
|
|
15
|
+
import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
|
|
16
|
+
import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
|
|
17
|
+
import "../d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js";
|
|
18
|
+
import "../d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js";
|
|
19
|
+
import "../d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js";
|
|
20
|
+
import "js-md5";
|
|
21
|
+
import { Badge as D } from "../badge/Badge.js";
|
|
22
|
+
const $ = y((i) => {
|
|
23
|
+
const {
|
|
24
|
+
data: a,
|
|
25
|
+
id: d
|
|
26
|
+
} = i, r = m(R), f = T(), t = m(C).getById(a.instance.type?.id), h = i.width ?? 0, u = i.height ?? 0, g = s((c) => c.width), w = s((c) => c.height);
|
|
27
|
+
return b.useEffect(() => {
|
|
28
|
+
r.registerTab({
|
|
29
|
+
id: t?.id,
|
|
30
|
+
active: !0,
|
|
31
|
+
closeable: !0,
|
|
32
|
+
children: /* @__PURE__ */ o(v, { children: [
|
|
33
|
+
/* @__PURE__ */ e(p, { size: 12 }),
|
|
34
|
+
/* @__PURE__ */ e(l, { size: "sm", children: t?.names[0]?.content })
|
|
35
|
+
] }),
|
|
36
|
+
content: /* @__PURE__ */ e(_, { instance: a.instance }),
|
|
37
|
+
show: !0
|
|
38
|
+
});
|
|
39
|
+
}, [t?.id, a.instance, r, t?.names]), /* @__PURE__ */ o(n, { align: "center", style: {
|
|
40
|
+
flexDirection: "column"
|
|
41
|
+
}, "data-flow-refernce": d, children: [
|
|
42
|
+
/* @__PURE__ */ e(D, { color: "info", style: {
|
|
43
|
+
borderTopRightRadius: "0.35rem",
|
|
44
|
+
borderTopLeftRadius: "0.35rem",
|
|
45
|
+
borderBottomLeftRadius: 0,
|
|
46
|
+
borderBottomRightRadius: 0
|
|
47
|
+
}, children: "Starting node" }),
|
|
48
|
+
/* @__PURE__ */ o(z, { variant: "normal", color: "info", paddingSize: "xs", className: r.getActiveTab()?.id == t?.id ? "d-flow-viewport-default-card--active" : void 0, onClick: () => {
|
|
49
|
+
f.setViewport({
|
|
50
|
+
x: g / 2 + i.positionAbsoluteX * -1 - h / 2,
|
|
51
|
+
y: w / 2 + i.positionAbsoluteY * -1 - u / 2,
|
|
52
|
+
zoom: 1
|
|
53
|
+
}, {
|
|
54
|
+
duration: 250
|
|
55
|
+
}), r.activateTab(t?.id);
|
|
56
|
+
}, children: [
|
|
57
|
+
/* @__PURE__ */ o(n, { style: {
|
|
58
|
+
gap: "1.3rem"
|
|
59
|
+
}, align: "center", justify: "space-between", children: [
|
|
60
|
+
/* @__PURE__ */ o(n, { style: {
|
|
61
|
+
gap: "0.7rem"
|
|
62
|
+
}, align: "center", children: [
|
|
63
|
+
/* @__PURE__ */ e(p, { size: 16 }),
|
|
64
|
+
/* @__PURE__ */ e(l, { display: "block", size: "md", children: t?.names[0]?.content ?? t?.id })
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ e(n, { align: "center", style: {
|
|
67
|
+
gap: "0.7rem"
|
|
68
|
+
}, children: /* @__PURE__ */ e(B, { p: "0", paddingSize: "xxs", variant: "none", disabled: !0, children: /* @__PURE__ */ e(F, { size: 16 }) }) })
|
|
69
|
+
] }),
|
|
70
|
+
/* @__PURE__ */ e(x, { isConnectable: !1, type: "source", style: {
|
|
71
|
+
bottom: "2px"
|
|
72
|
+
}, className: "d-flow-viewport-default-card__handle d-flow-viewport-default-card__handle--source", position: S.Bottom })
|
|
73
|
+
] })
|
|
74
|
+
] }, d);
|
|
75
|
+
});
|
|
76
|
+
export {
|
|
77
|
+
$ as DFlowFunctionTriggerCard
|
|
78
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ValidationProps } from '
|
|
2
|
+
import { ValidationProps } from '../form';
|
|
3
3
|
import { DataType, GenericType } from '@code0-tech/sagittarius-graphql-types';
|
|
4
4
|
export interface DFlowInputDataTypeProps extends ValidationProps<DataType | GenericType> {
|
|
5
5
|
onDataTypeChange?: (value: DataType | GenericType) => void;
|
|
@@ -0,0 +1,437 @@
|
|
|
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
|
+
import m from "react";
|
|
4
|
+
import "@radix-ui/react-checkbox";
|
|
5
|
+
import { InputLabel as ve } from "../form/InputLabel.js";
|
|
6
|
+
import "merge-props";
|
|
7
|
+
import { InputMessage as Me } from "../form/InputMessage.js";
|
|
8
|
+
import '../../assets/components/d-flow-input/DFlowInputDataType.style.css';import '../../assets/components/form/Input.style.css';/* empty css */
|
|
9
|
+
import { IconSettings as le, IconTrash as Oe } from "@tabler/icons-react";
|
|
10
|
+
import "../form/EmailInput.js";
|
|
11
|
+
import "../form/Input.js";
|
|
12
|
+
import { InputSuggestionMenuContent as De, InputSuggestionMenuContentItems as ke } from "../form/InputSuggestion.js";
|
|
13
|
+
import "../form/NumberInput.js";
|
|
14
|
+
import "../form/PasswordInput.js";
|
|
15
|
+
import "@radix-ui/react-one-time-password-field";
|
|
16
|
+
import "@radix-ui/react-radio-group";
|
|
17
|
+
import "../form/SwitchInput.js";
|
|
18
|
+
import { TextInput as F } from "../form/TextInput.js";
|
|
19
|
+
/* empty css */
|
|
20
|
+
import { Button as re } from "../button/Button.js";
|
|
21
|
+
import { Text as A } from "../text/Text.js";
|
|
22
|
+
import { Flex as X } from "../flex/Flex.js";
|
|
23
|
+
import { Badge as Be } from "../badge/Badge.js";
|
|
24
|
+
import { useDataTypeSuggestions as Ve } from "../d-flow-suggestion/DFlowDataTypeSuggestions.hook.js";
|
|
25
|
+
import { DFlowSuggestionMenuFooter as ye } from "../d-flow-suggestion/DFlowSuggestionMenuFooter.js";
|
|
26
|
+
import { toInputSuggestions as Ae } from "../d-flow-suggestion/DFlowSuggestionMenu.util.js";
|
|
27
|
+
import { Menu as _e, MenuTrigger as Ke, MenuPortal as we } from "../menu/Menu.js";
|
|
28
|
+
const Te = /* @__PURE__ */ new Set(["ITEM_OF_COLLECTION", "REGEX", "NUMBER_RANGE"]), he = "__blockingSignature", Ge = ["CONTAINS_KEY", "CONTAINS_TYPE", "ITEM_OF_COLLECTION", "NUMBER_RANGE", "REGEX"], de = (t) => {
|
|
29
|
+
const {
|
|
30
|
+
formValidation: e,
|
|
31
|
+
initialValue: n,
|
|
32
|
+
onDataTypeChange: p = () => {
|
|
33
|
+
},
|
|
34
|
+
blockingDataType: a
|
|
35
|
+
} = t, y = m.useMemo(() => Ie(n, a), [n, a]), [s, u] = m.useState(y), T = m.useMemo(() => Y(s), [s]), l = m.useMemo(() => Y(a), [a]), B = m.useMemo(() => new Map((J(s) ? s.genericMappers ?? [] : []).map((r) => [r.target ?? "", r])), [s]), I = m.useMemo(() => l?.rules?.nodes?.filter(Boolean), [l]), E = m.useCallback((r) => {
|
|
36
|
+
u((o) => {
|
|
37
|
+
if (!o) return o;
|
|
38
|
+
const i = q(o);
|
|
39
|
+
return r(i), p(i), Je(o, i), i;
|
|
40
|
+
});
|
|
41
|
+
}, []), b = m.useCallback((r, o, i) => {
|
|
42
|
+
E((N) => {
|
|
43
|
+
const h = Y(N);
|
|
44
|
+
if (!h) return;
|
|
45
|
+
const v = oe(h), R = v[r];
|
|
46
|
+
if (!R) return;
|
|
47
|
+
const f = Ce(R, l);
|
|
48
|
+
if (f && !i?.allowBlocked) return;
|
|
49
|
+
const g = o(q(R));
|
|
50
|
+
g !== void 0 && (f && (se(g, f), ae(g, f)), v[r] = g);
|
|
51
|
+
});
|
|
52
|
+
}, [l, E]), V = m.useCallback((r) => {
|
|
53
|
+
E((o) => {
|
|
54
|
+
const i = Y(o);
|
|
55
|
+
if (!i) return;
|
|
56
|
+
const N = oe(i), h = N[r];
|
|
57
|
+
h && (Le(h, l) || N.splice(r, 1));
|
|
58
|
+
});
|
|
59
|
+
}, [l, E]), d = m.useCallback((r, o) => {
|
|
60
|
+
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), {
|
|
61
|
+
allowBlocked: !0
|
|
62
|
+
});
|
|
63
|
+
}, [b]), D = m.useCallback((r, o, i) => {
|
|
64
|
+
E((N) => {
|
|
65
|
+
if (!J(N)) return;
|
|
66
|
+
const h = N.genericMappers ?? [], v = h.findIndex((g) => g.target === r);
|
|
67
|
+
if (v === -1) return;
|
|
68
|
+
const R = h[v], f = R?.sourceDataTypeIdentifiers ?? [];
|
|
69
|
+
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[v] = R);
|
|
70
|
+
});
|
|
71
|
+
}, [E]);
|
|
72
|
+
return /* @__PURE__ */ S("div", { children: [
|
|
73
|
+
/* @__PURE__ */ S("div", { className: "d-flow-viewport-data-type-input", children: [
|
|
74
|
+
T?.rules?.nodes?.map((r, o) => {
|
|
75
|
+
if (!r) return null;
|
|
76
|
+
const i = I?.find((f) => ce(r, f)), N = r?.variant === "PARENT_TYPE", h = r?.config, v = (h?.dataTypeIdentifier?.dataType?.rules?.nodes?.length ?? 0) > 0 || (h?.dataTypeIdentifier?.genericType?.dataType?.rules?.nodes?.length ?? 0) > 0;
|
|
77
|
+
return !N || v ? /* @__PURE__ */ c(Fe, { 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) => {
|
|
78
|
+
g.config || (g.config = {}), "dataTypeIdentifier" in g.config || (g.config.dataTypeIdentifier = {});
|
|
79
|
+
const M = g.config.dataTypeIdentifier;
|
|
80
|
+
return f ? (L(f) ? (M.dataType = f, delete M.genericType) : J(f) && (M.genericType = f, delete M.dataType), g) : (delete M?.dataType, delete M?.genericType, g);
|
|
81
|
+
}), onNestedChange: (f) => d(o, f), onGenericMapperChange: D }, `${r.variant}-${o}`) : null;
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ S(_e, { children: [
|
|
84
|
+
/* @__PURE__ */ c(Ke, { asChild: !0, children: /* @__PURE__ */ S(re, { color: "primary", children: [
|
|
85
|
+
/* @__PURE__ */ c(le, { size: 16 }),
|
|
86
|
+
" Add new rule"
|
|
87
|
+
] }) }),
|
|
88
|
+
/* @__PURE__ */ c(we, { children: /* @__PURE__ */ S(De, { children: [
|
|
89
|
+
/* @__PURE__ */ c(ke, { onSuggestionSelect: (r) => {
|
|
90
|
+
E((o) => {
|
|
91
|
+
if (o) {
|
|
92
|
+
if ("rules" in o) {
|
|
93
|
+
o.rules?.nodes?.push(r.value);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
"dataType" in o && o.dataType?.rules?.nodes?.push(r.value);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}, suggestions: Ge.filter((r) => T?.variant == "OBJECT" ? r == "CONTAINS_KEY" : T?.variant == "ARRAY" ? r == "CONTAINS_TYPE" : !(r == "CONTAINS_TYPE" || r == "CONTAINS_KEY")).map((r) => ({
|
|
100
|
+
children: /* @__PURE__ */ S(j, { children: [
|
|
101
|
+
/* @__PURE__ */ c(le, { size: 16 }),
|
|
102
|
+
/* @__PURE__ */ c(A, { children: r })
|
|
103
|
+
] }),
|
|
104
|
+
value: {
|
|
105
|
+
variant: r,
|
|
106
|
+
config: {
|
|
107
|
+
__typename: `DataTypeRules${r[0]}Config`,
|
|
108
|
+
...r === "NUMBER_RANGE" ? {
|
|
109
|
+
from: void 0,
|
|
110
|
+
to: void 0,
|
|
111
|
+
steps: void 0
|
|
112
|
+
} : {},
|
|
113
|
+
...r === "REGEX" ? {
|
|
114
|
+
pattern: void 0
|
|
115
|
+
} : {},
|
|
116
|
+
...r === "ITEM_OF_COLLECTION" ? {
|
|
117
|
+
items: void 0
|
|
118
|
+
} : {}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
})) }),
|
|
122
|
+
/* @__PURE__ */ c(ye, {})
|
|
123
|
+
] }) })
|
|
124
|
+
] })
|
|
125
|
+
] }),
|
|
126
|
+
!e?.valid && e?.notValidMessage && /* @__PURE__ */ c(Me, { children: e.notValidMessage })
|
|
127
|
+
] });
|
|
128
|
+
}, Fe = (t) => {
|
|
129
|
+
const e = be.c(56), {
|
|
130
|
+
rule: n,
|
|
131
|
+
blockingRule: p,
|
|
132
|
+
genericMap: a,
|
|
133
|
+
onRemove: y,
|
|
134
|
+
onConfigChange: s,
|
|
135
|
+
onHeaderKeyChange: u,
|
|
136
|
+
onHeaderDataTypeChange: T,
|
|
137
|
+
onNestedChange: l,
|
|
138
|
+
onGenericMapperChange: B
|
|
139
|
+
} = t, I = n?.config?.dataTypeIdentifier ?? void 0, E = !!I?.genericKey, [b, V] = m.useState(!1), d = !!p, D = n.variant, r = D ? !Te.has(D) : !1;
|
|
140
|
+
let o;
|
|
141
|
+
e[0] !== n.config ? (o = () => ue(n?.config), e[0] = n.config, e[1] = o) : o = e[1];
|
|
142
|
+
const [i, N] = m.useState(o);
|
|
143
|
+
let h;
|
|
144
|
+
e[2] !== n.config ? (h = () => {
|
|
145
|
+
N(ue(n?.config));
|
|
146
|
+
}, e[2] = n.config, e[3] = h) : h = e[3];
|
|
147
|
+
let v;
|
|
148
|
+
e[4] !== n ? (v = [n], e[4] = n, e[5] = v) : v = e[5], m.useEffect(h, v);
|
|
149
|
+
let R;
|
|
150
|
+
e: {
|
|
151
|
+
if (!r) {
|
|
152
|
+
R = void 0;
|
|
153
|
+
break e;
|
|
154
|
+
}
|
|
155
|
+
if (!I) {
|
|
156
|
+
R = void 0;
|
|
157
|
+
break e;
|
|
158
|
+
}
|
|
159
|
+
if (I.genericKey) {
|
|
160
|
+
let C;
|
|
161
|
+
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];
|
|
162
|
+
const k = C?.sourceDataTypeIdentifiers?.[0];
|
|
163
|
+
R = k?.dataType?.name?.[0]?.content ?? k?.genericType?.dataType?.name?.[0]?.content;
|
|
164
|
+
break e;
|
|
165
|
+
}
|
|
166
|
+
R = I.dataType?.name?.[0]?.content ?? I.genericType?.dataType?.name?.[0]?.content;
|
|
167
|
+
}
|
|
168
|
+
const f = R;
|
|
169
|
+
let g;
|
|
170
|
+
e[9] === Symbol.for("react.memo_cache_sentinel") ? (g = (C) => {
|
|
171
|
+
const O = C.target.value;
|
|
172
|
+
N(O);
|
|
173
|
+
}, e[9] = g) : g = e[9];
|
|
174
|
+
const M = g;
|
|
175
|
+
let z;
|
|
176
|
+
e[10] !== i || e[11] !== d || e[12] !== s || e[13] !== n.config || e[14] !== D ? (z = (C) => {
|
|
177
|
+
if (d)
|
|
178
|
+
return;
|
|
179
|
+
const O = C?.target?.name, k = Ye(i, n.config, {
|
|
180
|
+
variant: D,
|
|
181
|
+
numberRangeKey: O
|
|
182
|
+
});
|
|
183
|
+
k && s(k);
|
|
184
|
+
}, e[10] = i, e[11] = d, e[12] = s, e[13] = n.config, e[14] = D, e[15] = z) : z = e[15];
|
|
185
|
+
const _ = z;
|
|
186
|
+
let P;
|
|
187
|
+
e[16] !== n ? (P = me(n), e[16] = n, e[17] = P) : P = e[17];
|
|
188
|
+
const K = P;
|
|
189
|
+
let U;
|
|
190
|
+
e[18] !== p ? (U = me(p), e[18] = p, e[19] = U) : U = e[19];
|
|
191
|
+
const W = U;
|
|
192
|
+
let $;
|
|
193
|
+
e[20] !== f || e[21] !== a || 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] !== y || e[33] !== n ? ($ = () => {
|
|
194
|
+
if (!K && !E)
|
|
195
|
+
return null;
|
|
196
|
+
const C = /* @__PURE__ */ c(ge, { rule: n, genericMap: a, isBlocked: d, dataTypeLabel: f, onClick: () => V(ze), onRemove: d ? void 0 : y, onKeyChange: d ? void 0 : u, onDataTypeChange: d ? void 0 : T });
|
|
197
|
+
if (K)
|
|
198
|
+
return /* @__PURE__ */ S(j, { children: [
|
|
199
|
+
C,
|
|
200
|
+
b ? /* @__PURE__ */ c(de, { initialValue: K, blockingDataType: W, onDataTypeChange: l }) : null
|
|
201
|
+
] });
|
|
202
|
+
if (I?.genericKey) {
|
|
203
|
+
const O = a.get(I.genericKey);
|
|
204
|
+
return /* @__PURE__ */ S(j, { children: [
|
|
205
|
+
C,
|
|
206
|
+
b ? O?.sourceDataTypeIdentifiers?.map((k, fe) => {
|
|
207
|
+
const ne = k?.dataType ?? k?.genericType;
|
|
208
|
+
if (!ne)
|
|
209
|
+
return null;
|
|
210
|
+
const Se = d ? ne : void 0, ie = I.genericKey;
|
|
211
|
+
return ie ? /* @__PURE__ */ c(de, { initialValue: ne, blockingDataType: Se, onDataTypeChange: (Re) => B(ie, fe, Re) }, `${ie}-${fe}`) : null;
|
|
212
|
+
}) : null
|
|
213
|
+
] });
|
|
214
|
+
}
|
|
215
|
+
return null;
|
|
216
|
+
}, e[20] = f, e[21] = a, 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] = y, e[33] = n, e[34] = $) : $ = e[34];
|
|
217
|
+
const Q = $;
|
|
218
|
+
if (r && (K || E)) {
|
|
219
|
+
let C;
|
|
220
|
+
e[35] !== Q ? (C = Q(), e[35] = Q, e[36] = C) : C = e[36];
|
|
221
|
+
let O;
|
|
222
|
+
return e[37] !== C ? (O = /* @__PURE__ */ c("div", { className: "d-flow-viewport-data-type-input__rule", children: C }), e[37] = C, e[38] = O) : O = e[38], O;
|
|
223
|
+
}
|
|
224
|
+
let H;
|
|
225
|
+
e[39] === Symbol.for("react.memo_cache_sentinel") ? (H = {
|
|
226
|
+
flex: 1
|
|
227
|
+
}, e[39] = H) : H = e[39];
|
|
228
|
+
const Z = d ? void 0 : y, ee = d ? void 0 : u, te = d ? void 0 : T;
|
|
229
|
+
let w;
|
|
230
|
+
e[40] !== f || e[41] !== a || e[42] !== d || e[43] !== n || e[44] !== Z || e[45] !== ee || e[46] !== te ? (w = /* @__PURE__ */ c(ge, { rule: n, genericMap: a, isBlocked: d, dataTypeLabel: f, onRemove: Z, onKeyChange: ee, onDataTypeChange: te }), e[40] = f, e[41] = a, e[42] = d, e[43] = n, e[44] = Z, e[45] = ee, e[46] = te, e[47] = w) : w = e[47];
|
|
231
|
+
let G;
|
|
232
|
+
e[48] !== i || e[49] !== _ || e[50] !== d || e[51] !== n.variant ? (G = n.variant === "REGEX" || n.variant === "ITEM_OF_COLLECTION" ? /* @__PURE__ */ c(F, { clearable: !0, left: /* @__PURE__ */ c(A, { size: "sm", children: n.variant === "REGEX" ? "Pattern" : "Items" }), leftType: "icon", defaultValue: i, onChange: M, onBlur: _, w: "100%", disabled: d }) : n.variant === "NUMBER_RANGE" ? /* @__PURE__ */ S(j, { children: [
|
|
233
|
+
/* @__PURE__ */ c(F, { clearable: !0, defaultValue: i?.from?.toString() ?? "", onChange: M, onBlur: _, w: "100%", left: /* @__PURE__ */ c(A, { size: "sm", children: "From" }), leftType: "icon", disabled: d, name: "from" }),
|
|
234
|
+
/* @__PURE__ */ c(F, { clearable: !0, defaultValue: i?.steps?.toString() ?? "", onChange: M, onBlur: _, left: /* @__PURE__ */ c(A, { size: "sm", children: "Steps" }), leftType: "icon", w: "100%", disabled: d, name: "steps" }),
|
|
235
|
+
/* @__PURE__ */ c(F, { clearable: !0, left: /* @__PURE__ */ c(A, { size: "sm", children: "To" }), leftType: "icon", defaultValue: i?.to?.toString() ?? "", onChange: M, onBlur: _, w: "100%", disabled: d, name: "to" })
|
|
236
|
+
] }) : null, e[48] = i, e[49] = _, e[50] = d, e[51] = n.variant, e[52] = G) : G = e[52];
|
|
237
|
+
let x;
|
|
238
|
+
return e[53] !== w || e[54] !== G ? (x = /* @__PURE__ */ c("div", { className: "d-flow-viewport-data-type-input__rule", children: /* @__PURE__ */ S("div", { style: H, children: [
|
|
239
|
+
w,
|
|
240
|
+
G
|
|
241
|
+
] }) }), e[53] = w, e[54] = G, e[55] = x) : x = e[55], x;
|
|
242
|
+
}, ge = ({
|
|
243
|
+
rule: t,
|
|
244
|
+
dataTypeLabel: e,
|
|
245
|
+
onClick: n,
|
|
246
|
+
onRemove: p,
|
|
247
|
+
isBlocked: a,
|
|
248
|
+
onKeyChange: y,
|
|
249
|
+
onDataTypeChange: s,
|
|
250
|
+
genericMap: u
|
|
251
|
+
}) => {
|
|
252
|
+
const T = t.variant, l = T ? !Te.has(T) : !1, B = l ? Ve({
|
|
253
|
+
dataType: {
|
|
254
|
+
id: "gid://sagittarius/DataType/-1"
|
|
255
|
+
}
|
|
256
|
+
}) : [], I = t?.config?.dataTypeIdentifier?.dataType?.rules?.nodes?.length ?? t?.config?.dataTypeIdentifier?.genericType?.dataType?.rules?.nodes?.length ?? u.get(t?.config?.dataTypeIdentifier?.genericKey)?.sourceDataTypeIdentifiers?.map((i) => i?.dataType?.rules?.nodes?.length ?? i.genericType?.dataType?.rules?.nodes?.length) ?? 0, [E, b] = m.useState(() => "key" in (t?.config ?? {}) ? t?.config?.key ?? "" : ""), [V, d] = m.useState(() => e ?? "");
|
|
257
|
+
m.useEffect(() => {
|
|
258
|
+
b("key" in (t?.config ?? {}) ? t?.config?.key ?? "" : "");
|
|
259
|
+
}, [t]), m.useEffect(() => {
|
|
260
|
+
d(e ?? "");
|
|
261
|
+
}, [e]);
|
|
262
|
+
const D = m.useCallback(() => {
|
|
263
|
+
!y || a || y(E);
|
|
264
|
+
}, [a, E, y]), r = m.useCallback(() => {
|
|
265
|
+
!s || a || V.trim() === "" && s(void 0);
|
|
266
|
+
}, [V, a, s]), o = m.useCallback((i) => {
|
|
267
|
+
if (!s || a) return;
|
|
268
|
+
const N = i.value;
|
|
269
|
+
if (!N) return;
|
|
270
|
+
s(N);
|
|
271
|
+
const h = i?.valueData?.displayText?.join(" ") ?? e ?? "";
|
|
272
|
+
d(h);
|
|
273
|
+
}, [e, a, s]);
|
|
274
|
+
return /* @__PURE__ */ S("div", { children: [
|
|
275
|
+
/* @__PURE__ */ S(X, { justify: "space-between", children: [
|
|
276
|
+
/* @__PURE__ */ c(Be, { color: "info", children: t?.variant }),
|
|
277
|
+
p ? /* @__PURE__ */ c(re, { color: "error", onClick: p, children: /* @__PURE__ */ c(Oe, { size: 16 }) }) : null
|
|
278
|
+
] }),
|
|
279
|
+
/* @__PURE__ */ S(X, { mt: 0.7, style: {
|
|
280
|
+
flexDirection: "column",
|
|
281
|
+
gap: ".7rem"
|
|
282
|
+
}, children: [
|
|
283
|
+
l ? /* @__PURE__ */ S(X, { align: "center", style: {
|
|
284
|
+
gap: ".7rem"
|
|
285
|
+
}, children: [
|
|
286
|
+
t.variant === "CONTAINS_KEY" ? /* @__PURE__ */ c(F, { left: /* @__PURE__ */ c(A, { size: "sm", children: "Key" }), leftType: "icon", disabled: a, defaultValue: E, onChange: (i) => "value" in i.target && b(i.target.value), onBlur: D }) : null,
|
|
287
|
+
/* @__PURE__ */ c(F, { left: /* @__PURE__ */ c(A, { size: "sm", children: "DataType" }), leftType: "icon", disabled: a, suggestionsFooter: /* @__PURE__ */ c(ye, {}), suggestions: Ae(B), value: V, onChange: (i) => "value" in i.target && d(i.target.value), onBlur: r, onSuggestionSelect: o })
|
|
288
|
+
] }) : null,
|
|
289
|
+
t.variant != "REGEX" && t.variant != "ITEM_OF_COLLECTION" && t.variant != "NUMBER_RANGE" ? /* @__PURE__ */ c(ve, { children: /* @__PURE__ */ S(X, { align: "center", style: {
|
|
290
|
+
gap: ".7rem"
|
|
291
|
+
}, children: [
|
|
292
|
+
"+",
|
|
293
|
+
I,
|
|
294
|
+
" rules included",
|
|
295
|
+
/* @__PURE__ */ c(re, { color: "primary", onClick: n, children: "Show/Hide Rules" })
|
|
296
|
+
] }) }) : null
|
|
297
|
+
] })
|
|
298
|
+
] });
|
|
299
|
+
}, ue = (t) => t ? "pattern" in t || t?.__typename === "DataTypeRulesRegexConfig" ? t?.pattern ?? "" : "items" in t || t?.__typename === "DataTypeRulesItemOfCollectionConfig" ? JSON.stringify(t.items) : t : "", Ye = (t, e, n) => {
|
|
300
|
+
const {
|
|
301
|
+
variant: p,
|
|
302
|
+
numberRangeKey: a
|
|
303
|
+
} = n ?? {}, y = p === "NUMBER_RANGE", s = e ?? void 0;
|
|
304
|
+
if (y) {
|
|
305
|
+
const u = {
|
|
306
|
+
__typename: "DataTypeRulesNumberRangeConfig",
|
|
307
|
+
...s
|
|
308
|
+
};
|
|
309
|
+
if (typeof t != "string")
|
|
310
|
+
return {
|
|
311
|
+
...u,
|
|
312
|
+
...t
|
|
313
|
+
};
|
|
314
|
+
if (!a)
|
|
315
|
+
return u;
|
|
316
|
+
const T = {
|
|
317
|
+
...u
|
|
318
|
+
};
|
|
319
|
+
switch (a) {
|
|
320
|
+
case "from":
|
|
321
|
+
T.from = (() => {
|
|
322
|
+
if (t.trim() === "") return;
|
|
323
|
+
const l = Number(t);
|
|
324
|
+
return Number.isFinite(l) ? l : u.from;
|
|
325
|
+
})();
|
|
326
|
+
break;
|
|
327
|
+
case "steps":
|
|
328
|
+
T.steps = (() => {
|
|
329
|
+
if (t.trim() === "") return;
|
|
330
|
+
const l = Number(t);
|
|
331
|
+
return Number.isFinite(l) ? l : u.steps;
|
|
332
|
+
})();
|
|
333
|
+
break;
|
|
334
|
+
case "to":
|
|
335
|
+
T.to = (() => {
|
|
336
|
+
if (t.trim() === "") return;
|
|
337
|
+
const l = Number(t);
|
|
338
|
+
return Number.isFinite(l) ? l : u.to;
|
|
339
|
+
})();
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
return T;
|
|
343
|
+
}
|
|
344
|
+
if (!s) {
|
|
345
|
+
if (typeof t != "string")
|
|
346
|
+
return t;
|
|
347
|
+
try {
|
|
348
|
+
return JSON.parse(t);
|
|
349
|
+
} catch {
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
if (typeof t != "string")
|
|
354
|
+
return t;
|
|
355
|
+
if (s.__typename === "DataTypeRulesRegexConfig" || "pattern" in s)
|
|
356
|
+
return {
|
|
357
|
+
...s,
|
|
358
|
+
pattern: t
|
|
359
|
+
};
|
|
360
|
+
if (s.__typename === "DataTypeRulesItemOfCollectionConfig" || "items" in s)
|
|
361
|
+
try {
|
|
362
|
+
return {
|
|
363
|
+
...s,
|
|
364
|
+
items: JSON.parse(t)
|
|
365
|
+
};
|
|
366
|
+
} catch {
|
|
367
|
+
return s;
|
|
368
|
+
}
|
|
369
|
+
try {
|
|
370
|
+
return JSON.parse(t);
|
|
371
|
+
} catch {
|
|
372
|
+
return s;
|
|
373
|
+
}
|
|
374
|
+
}, q = (t) => t == null ? t : JSON.parse(JSON.stringify(t)), pe = (t) => {
|
|
375
|
+
if (t)
|
|
376
|
+
return JSON.stringify(t);
|
|
377
|
+
}, me = (t) => {
|
|
378
|
+
if (t?.config?.dataTypeIdentifier)
|
|
379
|
+
return t?.config?.dataTypeIdentifier?.dataType ?? t?.config?.dataTypeIdentifier?.genericType ?? void 0;
|
|
380
|
+
}, Je = (t, e) => pe(t) === pe(e), Le = (t, e) => !t || !e?.rules?.nodes || !Ne(t) ? !1 : !!Ce(t, e), Ce = (t, e) => !t || !e?.rules?.nodes ? void 0 : e.rules.nodes?.filter(Boolean).find((p) => ce(t, p)), L = (t) => t != null && t.rules !== void 0, J = (t) => t != null && typeof t == "object" && "genericMappers" in t, Y = (t) => {
|
|
381
|
+
if (t)
|
|
382
|
+
return L(t) ? t : t.dataType ?? void 0;
|
|
383
|
+
}, oe = (t) => (t.rules ? t.rules.nodes || (t.rules.nodes = []) : t.rules = {
|
|
384
|
+
nodes: []
|
|
385
|
+
}, t.rules.nodes), Ie = (t, e) => {
|
|
386
|
+
if (!t && !e) return;
|
|
387
|
+
const n = q(t ?? e), p = Y(n), a = Y(e);
|
|
388
|
+
if (!p || !a)
|
|
389
|
+
return n;
|
|
390
|
+
const y = oe(p);
|
|
391
|
+
return a.rules?.nodes?.filter(Boolean)?.forEach((u) => {
|
|
392
|
+
if (!u) return;
|
|
393
|
+
const T = y.findIndex((l) => ce(l, u));
|
|
394
|
+
if (T === -1) {
|
|
395
|
+
const l = q(u);
|
|
396
|
+
se(l, u), y.push(l), ae(l, u);
|
|
397
|
+
} else {
|
|
398
|
+
const l = y[T];
|
|
399
|
+
se(l, u), ae(l, u);
|
|
400
|
+
}
|
|
401
|
+
}), n;
|
|
402
|
+
}, ae = (t, e) => {
|
|
403
|
+
const n = t?.config?.dataTypeIdentifier, p = e?.config?.dataTypeIdentifier;
|
|
404
|
+
if (!n || !p) return;
|
|
405
|
+
const a = n.dataType ?? n.genericType, y = p.dataType ?? p.genericType;
|
|
406
|
+
if (!a || !y) return;
|
|
407
|
+
const s = Ie(a, y);
|
|
408
|
+
s && (L(s) ? n.dataType = s : n.genericType = s);
|
|
409
|
+
}, ce = (t, e) => {
|
|
410
|
+
if (!t || !e) return !1;
|
|
411
|
+
const n = Ne(t), p = Ee(e);
|
|
412
|
+
return n && p ? n === p : t.id && e.id ? t.id === e.id : JSON.stringify({
|
|
413
|
+
variant: t.variant,
|
|
414
|
+
config: t.config
|
|
415
|
+
}) === JSON.stringify({
|
|
416
|
+
variant: e.variant,
|
|
417
|
+
config: e.config
|
|
418
|
+
});
|
|
419
|
+
}, Ne = (t) => {
|
|
420
|
+
if (t)
|
|
421
|
+
return t?.[he];
|
|
422
|
+
}, Ee = (t) => {
|
|
423
|
+
if (t)
|
|
424
|
+
return t.id ? `id:${t.id}` : `config:${JSON.stringify({
|
|
425
|
+
variant: t.variant,
|
|
426
|
+
config: t.config
|
|
427
|
+
})}`;
|
|
428
|
+
}, se = (t, e) => {
|
|
429
|
+
const n = Ee(e);
|
|
430
|
+
n && (t[he] = n);
|
|
431
|
+
};
|
|
432
|
+
function ze(t) {
|
|
433
|
+
return !t;
|
|
434
|
+
}
|
|
435
|
+
export {
|
|
436
|
+
de as DFlowInputDataType
|
|
437
|
+
};
|