@code0-tech/pictor 0.0.0-mvp.45 → 0.0.0-mvp.47
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/components/avatar/Avatar.js +6 -7
- package/dist/components/data-table/DataTableFilterInput.js +5 -3
- package/dist/components/editor/Editor.js +29 -30
- package/dist/components/form/InputSuggestion.js +29 -29
- package/dist/components/form/useForm.d.ts +3 -3
- package/dist/components/form/useForm.js +16 -16
- package/dist/components/{d-fullscreen/DFullScreen.d.ts → fullscreen/FullScreen.d.ts} +2 -2
- package/dist/components/{d-fullscreen/DFullScreen.js → fullscreen/FullScreen.js} +2 -2
- package/dist/components/{d-layout/DLayout.d.ts → layout/Layout.d.ts} +2 -2
- package/dist/components/{d-layout/DLayout.js → layout/Layout.js} +11 -11
- package/dist/components/menu/Menu.js +8 -8
- package/dist/components/resizable/Resizable.d.ts +12 -0
- package/dist/components/{d-resizable/DResizable.js → resizable/Resizable.js} +7 -7
- package/dist/components/tab/Tab.js +4 -4
- package/dist/components/toast/Toast.js +1 -1
- package/dist/index.d.ts +0 -20
- package/dist/index.js +152 -273
- package/dist/node_modules/prettier/plugins/babel.js +6674 -6685
- package/dist/node_modules/prettier/plugins/estree.js +2830 -2628
- package/dist/node_modules/prettier/standalone.js +1657 -1440
- package/package.json +29 -29
- package/dist/assets/components/d-flow/DFlow.style.css +0 -1
- package/dist/assets/components/d-flow-folder/DFlowFolder.style.css +0 -1
- package/dist/assets/components/d-flow-input/DFlowInputDataType.style.css +0 -1
- package/dist/assets/components/d-flow-node/DFlowNode.style.css +0 -1
- package/dist/assets/components/d-flow-panel/DFlowMiniMap.style.css +0 -1
- package/dist/assets/components/d-flow-suggestion/DFlowSuggestionSearchInput.style.css +0 -1
- package/dist/assets/components/d-flow-validation/DFlowValidation.style.css +0 -1
- package/dist/assets/node_modules/@xyflow/react/dist/style.css +0 -1
- package/dist/assets/node_modules/ldrs/dist/react/LineWobble.css +0 -1
- package/dist/components/d-application/DApplication.service.d.ts +0 -9
- package/dist/components/d-application/DApplication.service.js +0 -10
- package/dist/components/d-flow/DFlow.d.ts +0 -9
- package/dist/components/d-flow/DFlow.edges.hook.d.ts +0 -4
- package/dist/components/d-flow/DFlow.edges.hook.js +0 -110
- package/dist/components/d-flow/DFlow.js +0 -484
- package/dist/components/d-flow/DFlow.nodes.hook.d.ts +0 -4
- package/dist/components/d-flow/DFlow.nodes.hook.js +0 -128
- package/dist/components/d-flow/DFlow.service.d.ts +0 -21
- package/dist/components/d-flow/DFlow.service.js +0 -148
- package/dist/components/d-flow/DFlow.util.d.ts +0 -4
- package/dist/components/d-flow/DFlow.util.js +0 -63
- package/dist/components/d-flow/DFlow.view.d.ts +0 -4
- package/dist/components/d-flow/DFlow.view.js +0 -1
- package/dist/components/d-flow/DFlowEdge.d.ts +0 -12
- package/dist/components/d-flow/DFlowEdge.js +0 -69
- package/dist/components/d-flow/index.d.ts +0 -4
- package/dist/components/d-flow/index.js +0 -10
- package/dist/components/d-flow-data-type/DFlowDataType.service.d.ts +0 -15
- package/dist/components/d-flow-data-type/DFlowDataType.service.js +0 -203
- package/dist/components/d-flow-data-type/DFlowDataType.view.d.ts +0 -41
- package/dist/components/d-flow-data-type/DFlowDataType.view.js +0 -76
- package/dist/components/d-flow-data-type/index.d.ts +0 -2
- package/dist/components/d-flow-data-type/index.js +0 -6
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +0 -5
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js +0 -222
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +0 -5
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js +0 -229
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.d.ts +0 -7
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js +0 -214
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.d.ts +0 -4
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js +0 -214
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeParentRule.d.ts +0 -8
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeParentRule.js +0 -217
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeRegexRule.d.ts +0 -4
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeRegexRule.js +0 -214
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +0 -7
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js +0 -250
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeRule.d.ts +0 -8
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeRule.js +0 -10
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeRules.d.ts +0 -3
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeRules.js +0 -10
- package/dist/components/d-flow-data-type/variants/DFlowDataTypeNodeVariant.d.ts +0 -4
- package/dist/components/d-flow-data-type/variants/DFlowDataTypeNodeVariant.js +0 -214
- package/dist/components/d-flow-data-type/variants/DFlowDataTypeVariant.d.ts +0 -4
- package/dist/components/d-flow-data-type/variants/DFlowDataTypeVariant.js +0 -1
- package/dist/components/d-flow-data-type/variants/DFlowDataTypeVariants.d.ts +0 -3
- package/dist/components/d-flow-data-type/variants/DFlowDataTypeVariants.js +0 -5
- package/dist/components/d-flow-file/DFlowTabDefault.d.ts +0 -7
- package/dist/components/d-flow-file/DFlowTabDefault.js +0 -105
- package/dist/components/d-flow-file/DFlowTabTrigger.d.ts +0 -6
- package/dist/components/d-flow-file/DFlowTabTrigger.js +0 -75
- package/dist/components/d-flow-file/DFlowTabs.d.ts +0 -8
- package/dist/components/d-flow-file/DFlowTabs.js +0 -84
- package/dist/components/d-flow-file/index.d.ts +0 -1
- package/dist/components/d-flow-file/index.js +0 -4
- package/dist/components/d-flow-folder/DFlowFolder.d.ts +0 -36
- package/dist/components/d-flow-folder/DFlowFolder.js +0 -273
- package/dist/components/d-flow-folder/DFlowFolderContextMenu.d.ts +0 -18
- package/dist/components/d-flow-folder/DFlowFolderContextMenu.js +0 -53
- package/dist/components/d-flow-folder/DFlowFolderCreateDialog.d.ts +0 -9
- package/dist/components/d-flow-folder/DFlowFolderCreateDialog.js +0 -115
- package/dist/components/d-flow-folder/DFlowFolderDeleteDialog.d.ts +0 -10
- package/dist/components/d-flow-folder/DFlowFolderDeleteDialog.js +0 -64
- package/dist/components/d-flow-folder/DFlowFolderItemPathInput.d.ts +0 -5
- package/dist/components/d-flow-folder/DFlowFolderItemPathInput.js +0 -51
- package/dist/components/d-flow-folder/DFlowFolderRenameDialog.d.ts +0 -10
- package/dist/components/d-flow-folder/DFlowFolderRenameDialog.js +0 -59
- package/dist/components/d-flow-folder/index.d.ts +0 -4
- package/dist/components/d-flow-folder/index.js +0 -13
- package/dist/components/d-flow-function/DFlowFunction.input.hook.d.ts +0 -5
- package/dist/components/d-flow-function/DFlowFunction.input.hook.js +0 -8
- package/dist/components/d-flow-function/DFlowFunction.return.hook.d.ts +0 -5
- package/dist/components/d-flow-function/DFlowFunction.return.hook.js +0 -9
- package/dist/components/d-flow-function/DFlowFunction.service.d.ts +0 -11
- package/dist/components/d-flow-function/DFlowFunction.service.js +0 -13
- package/dist/components/d-flow-function/DFlowFunction.view.d.ts +0 -81
- package/dist/components/d-flow-function/DFlowFunction.view.js +0 -139
- package/dist/components/d-flow-function/index.d.ts +0 -2
- package/dist/components/d-flow-function/index.js +0 -7
- package/dist/components/d-flow-input/DFlowInputDataType.d.ts +0 -15
- package/dist/components/d-flow-input/DFlowInputDataType.js +0 -131
- package/dist/components/d-flow-input/DFlowInputDataTypeEditDialog.d.ts +0 -9
- package/dist/components/d-flow-input/DFlowInputDataTypeEditDialog.js +0 -102
- package/dist/components/d-flow-input/DFlowInputDefault.d.ts +0 -10
- package/dist/components/d-flow-input/DFlowInputDefault.js +0 -129
- package/dist/components/d-flow-input/DFlowInputLiteralBadge.d.ts +0 -7
- package/dist/components/d-flow-input/DFlowInputLiteralBadge.js +0 -24
- package/dist/components/d-flow-input/DFlowInputNodeBadge.d.ts +0 -11
- package/dist/components/d-flow-input/DFlowInputNodeBadge.js +0 -47
- package/dist/components/d-flow-input/DFlowInputReferenceBadge.d.ts +0 -11
- package/dist/components/d-flow-input/DFlowInputReferenceBadge.js +0 -33
- package/dist/components/d-flow-node/DFlowNode.d.ts +0 -10
- package/dist/components/d-flow-node/DFlowNode.js +0 -1
- package/dist/components/d-flow-node/DFlowNode.return.hook.d.ts +0 -5
- package/dist/components/d-flow-node/DFlowNode.return.hook.js +0 -27
- package/dist/components/d-flow-node/DFlowNodeDefaultCard.d.ts +0 -5
- package/dist/components/d-flow-node/DFlowNodeDefaultCard.js +0 -118
- package/dist/components/d-flow-node/DFlowNodeGroupCard.d.ts +0 -5
- package/dist/components/d-flow-node/DFlowNodeGroupCard.js +0 -69
- package/dist/components/d-flow-node/DFlowNodeTriggerCard.d.ts +0 -5
- package/dist/components/d-flow-node/DFlowNodeTriggerCard.js +0 -66
- package/dist/components/d-flow-panel/DFlowExport.d.ts +0 -6
- package/dist/components/d-flow-panel/DFlowExport.js +0 -33
- package/dist/components/d-flow-panel/DFlowMiniMap.d.ts +0 -2
- package/dist/components/d-flow-panel/DFlowMiniMap.js +0 -15
- package/dist/components/d-flow-panel/DFlowPanelControl.d.ts +0 -6
- package/dist/components/d-flow-panel/DFlowPanelControl.js +0 -51
- package/dist/components/d-flow-panel/DFlowPanelLayout.d.ts +0 -4
- package/dist/components/d-flow-panel/DFlowPanelLayout.js +0 -38
- package/dist/components/d-flow-panel/DFlowPanelSize.d.ts +0 -2
- package/dist/components/d-flow-panel/DFlowPanelSize.js +0 -89
- package/dist/components/d-flow-panel/DFlowPanelUpdate.d.ts +0 -6
- package/dist/components/d-flow-panel/DFlowPanelUpdate.js +0 -77
- package/dist/components/d-flow-panel/index.d.ts +0 -5
- package/dist/components/d-flow-panel/index.js +0 -12
- package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.d.ts +0 -3
- package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.js +0 -34
- package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.d.ts +0 -3
- package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.js +0 -50
- package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.d.ts +0 -3
- package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.js +0 -132
- package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.d.ts +0 -3
- package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +0 -28
- package/dist/components/d-flow-suggestion/DFlowSuggestion.view.d.ts +0 -14
- package/dist/components/d-flow-suggestion/DFlowSuggestion.view.js +0 -4
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.d.ts +0 -8
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +0 -73
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.util.d.ts +0 -3
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.util.js +0 -43
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenuFooter.d.ts +0 -2
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenuFooter.js +0 -69
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenuSearchBar.d.ts +0 -6
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenuSearchBar.js +0 -21
- package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.d.ts +0 -7
- package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.js +0 -36
- package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.d.ts +0 -3
- package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.js +0 -44
- package/dist/components/d-flow-suggestion/index.d.ts +0 -1
- package/dist/components/d-flow-suggestion/index.js +0 -4
- package/dist/components/d-flow-type/DFlowType.service.d.ts +0 -11
- package/dist/components/d-flow-type/DFlowType.service.js +0 -13
- package/dist/components/d-flow-type/DFlowType.view.d.ts +0 -44
- package/dist/components/d-flow-type/DFlowType.view.js +0 -93
- package/dist/components/d-flow-type/index.d.ts +0 -2
- package/dist/components/d-flow-type/index.js +0 -6
- package/dist/components/d-flow-validation/DDataTypeValidation.hook.d.ts +0 -2
- package/dist/components/d-flow-validation/DDataTypeValidation.hook.js +0 -18
- package/dist/components/d-flow-validation/DFlowValidation.d.ts +0 -6
- package/dist/components/d-flow-validation/DFlowValidation.hook.d.ts +0 -3
- package/dist/components/d-flow-validation/DFlowValidation.hook.js +0 -23
- package/dist/components/d-flow-validation/DFlowValidation.js +0 -67
- package/dist/components/d-flow-validation/DNodeValidation.hook.d.ts +0 -3
- package/dist/components/d-flow-validation/DNodeValidation.hook.js +0 -58
- package/dist/components/d-flow-validation/DValueValidation.hook.d.ts +0 -4
- package/dist/components/d-flow-validation/DValueValidation.hook.js +0 -9
- package/dist/components/d-flow-validation/index.d.ts +0 -2
- package/dist/components/d-flow-validation/index.js +0 -6
- package/dist/components/d-license/DNamespaceLicense.service.d.ts +0 -11
- package/dist/components/d-license/DNamespaceLicense.service.js +0 -13
- package/dist/components/d-license/DNamespaceLicense.view.d.ts +0 -26
- package/dist/components/d-license/DNamespaceLicense.view.js +0 -57
- package/dist/components/d-license/index.d.ts +0 -2
- package/dist/components/d-license/index.js +0 -6
- package/dist/components/d-member/DNamespaceMember.service.d.ts +0 -13
- package/dist/components/d-member/DNamespaceMember.service.js +0 -18
- package/dist/components/d-member/DNamespaceMember.view.d.ts +0 -29
- package/dist/components/d-member/DNamespaceMember.view.js +0 -62
- package/dist/components/d-member/DNamespaceMemberCard.d.ts +0 -10
- package/dist/components/d-member/DNamespaceMemberCard.js +0 -16
- package/dist/components/d-member/DNamespaceMemberContent.d.ts +0 -10
- package/dist/components/d-member/DNamespaceMemberContent.js +0 -225
- package/dist/components/d-member/DNamespaceMemberList.d.ts +0 -12
- package/dist/components/d-member/DNamespaceMemberList.js +0 -24
- package/dist/components/d-member/index.d.ts +0 -4
- package/dist/components/d-member/index.js +0 -10
- package/dist/components/d-namespace/DNamespace.service.d.ts +0 -6
- package/dist/components/d-namespace/DNamespace.service.js +0 -13
- package/dist/components/d-namespace/DNamespace.view.d.ts +0 -32
- package/dist/components/d-namespace/DNamespace.view.js +0 -65
- package/dist/components/d-namespace/index.d.ts +0 -2
- package/dist/components/d-namespace/index.js +0 -6
- package/dist/components/d-organization/DOrganization.service.d.ts +0 -8
- package/dist/components/d-organization/DOrganization.service.js +0 -13
- package/dist/components/d-organization/DOrganization.view.d.ts +0 -23
- package/dist/components/d-organization/DOrganization.view.js +0 -55
- package/dist/components/d-organization/DOrganizationCard.d.ts +0 -11
- package/dist/components/d-organization/DOrganizationCard.js +0 -16
- package/dist/components/d-organization/DOrganizationList.d.ts +0 -10
- package/dist/components/d-organization/DOrganizationList.js +0 -24
- package/dist/components/d-organization/DOrganizationMenu.d.ts +0 -9
- package/dist/components/d-organization/DOrganizationMenu.js +0 -18
- package/dist/components/d-organization/DOrganizatonContent.d.ts +0 -10
- package/dist/components/d-organization/DOrganizatonContent.js +0 -102
- package/dist/components/d-organization/index.d.ts +0 -5
- package/dist/components/d-organization/index.js +0 -40
- package/dist/components/d-project/DNamespaceProject.service.d.ts +0 -13
- package/dist/components/d-project/DNamespaceProject.service.js +0 -13
- package/dist/components/d-project/DNamespaceProject.view.d.ts +0 -44
- package/dist/components/d-project/DNamespaceProject.view.js +0 -78
- package/dist/components/d-project/DNamespaceProjectCard.d.ts +0 -9
- package/dist/components/d-project/DNamespaceProjectCard.js +0 -17
- package/dist/components/d-project/DNamespaceProjectContent.d.ts +0 -10
- package/dist/components/d-project/DNamespaceProjectContent.js +0 -72
- package/dist/components/d-project/DNamespaceProjectList.d.ts +0 -11
- package/dist/components/d-project/DNamespaceProjectList.js +0 -26
- package/dist/components/d-project/DNamespaceProjectMenu.d.ts +0 -13
- package/dist/components/d-project/DNamespaceProjectMenu.js +0 -57
- package/dist/components/d-project/index.d.ts +0 -5
- package/dist/components/d-project/index.js +0 -27
- package/dist/components/d-resizable/DResizable.d.ts +0 -12
- package/dist/components/d-role/DNamespaceRole.service.d.ts +0 -13
- package/dist/components/d-role/DNamespaceRole.service.js +0 -13
- package/dist/components/d-role/DNamespaceRole.view.d.ts +0 -29
- package/dist/components/d-role/DNamespaceRole.view.js +0 -61
- package/dist/components/d-role/DNamespaceRoleCard.d.ts +0 -11
- package/dist/components/d-role/DNamespaceRoleCard.js +0 -17
- package/dist/components/d-role/DNamespaceRoleContent.d.ts +0 -10
- package/dist/components/d-role/DNamespaceRoleContent.js +0 -163
- package/dist/components/d-role/DNamespaceRoleList.d.ts +0 -12
- package/dist/components/d-role/DNamespaceRoleList.js +0 -25
- package/dist/components/d-role/DNamespaceRolePermissions.d.ts +0 -5
- package/dist/components/d-role/DNamespaceRolePermissions.js +0 -123
- package/dist/components/d-role/index.d.ts +0 -4
- package/dist/components/d-role/index.js +0 -10
- package/dist/components/d-runtime/DRuntime.service.d.ts +0 -12
- package/dist/components/d-runtime/DRuntime.service.js +0 -9
- package/dist/components/d-runtime/DRuntime.view.d.ts +0 -41
- package/dist/components/d-runtime/DRuntime.view.js +0 -76
- package/dist/components/d-runtime/DRuntimeCard.d.ts +0 -9
- package/dist/components/d-runtime/DRuntimeCard.js +0 -18
- package/dist/components/d-runtime/DRuntimeContent.d.ts +0 -9
- package/dist/components/d-runtime/DRuntimeContent.js +0 -46
- package/dist/components/d-runtime/DRuntimeList.d.ts +0 -12
- package/dist/components/d-runtime/DRuntimeList.js +0 -29
- package/dist/components/d-runtime/index.d.ts +0 -4
- package/dist/components/d-runtime/index.js +0 -10
- package/dist/components/d-user/DUser.service.d.ts +0 -20
- package/dist/components/d-user/DUser.service.js +0 -18
- package/dist/components/d-user/DUser.session.hook.d.ts +0 -3
- package/dist/components/d-user/DUser.session.hook.js +0 -16
- package/dist/components/d-user/DUser.view.d.ts +0 -55
- package/dist/components/d-user/DUser.view.js +0 -103
- package/dist/components/d-user/DUserCard.d.ts +0 -8
- package/dist/components/d-user/DUserCard.js +0 -15
- package/dist/components/d-user/DUserContent.d.ts +0 -8
- package/dist/components/d-user/DUserContent.js +0 -52
- package/dist/components/d-user/DUserInput.d.ts +0 -7
- package/dist/components/d-user/DUserInput.js +0 -101
- package/dist/components/d-user/DUserList.d.ts +0 -9
- package/dist/components/d-user/DUserList.js +0 -23
- package/dist/components/d-user/DUserMenu.d.ts +0 -8
- package/dist/components/d-user/DUserMenu.js +0 -30
- package/dist/components/d-user/index.d.ts +0 -7
- package/dist/components/d-user/index.js +0 -27
- package/dist/node_modules/ldrs/dist/react/LineWobble.js +0 -6
- package/dist/utils/generics.d.ts +0 -21
- package/dist/utils/generics.js +0 -385
- /package/dist/assets/components/{d-fullscreen/DFullScreen.style.css → fullscreen/FullScreen.style.css} +0 -0
- /package/dist/assets/components/{d-layout/DLayout.style.css → layout/Layout.style.css} +0 -0
- /package/dist/assets/components/{d-resizable/DResizable.style.css → resizable/Resizable.style.css} +0 -0
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import "../../utils/contextStore.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { ReactiveArrayService as l } from "../../utils/reactiveArrayService.js";
|
|
4
|
-
import "merge-props";
|
|
5
|
-
import "js-md5";
|
|
6
|
-
import { View as c } from "../../utils/view.js";
|
|
7
|
-
class x extends l {
|
|
8
|
-
getById(n, i) {
|
|
9
|
-
return this.values(i).find((t) => t.id === n);
|
|
10
|
-
}
|
|
11
|
-
removeParameterNode(n, i) {
|
|
12
|
-
if (i?.value?.__typename === "NodeFunctionIdWrapper") {
|
|
13
|
-
const t = n?.nodes?.nodes?.find((e) => e?.id === i.value?.id);
|
|
14
|
-
if (t) {
|
|
15
|
-
n.nodes.nodes = n.nodes.nodes.filter((d) => d?.id !== i.value?.id);
|
|
16
|
-
let e = t.nextNodeId;
|
|
17
|
-
for (; e; ) {
|
|
18
|
-
const d = n.nodes.nodes.find((o) => o?.id === e);
|
|
19
|
-
d ? (n.nodes.nodes = n.nodes.nodes.filter((o) => o?.id !== e), e = d.nextNodeId) : e = null;
|
|
20
|
-
}
|
|
21
|
-
t.parameters?.nodes?.forEach((d) => {
|
|
22
|
-
this.removeParameterNode(n, d);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
getLinkedNodesById(n, i) {
|
|
28
|
-
const t = this.getNodeById(n, i), e = t ? this.getLinkedNodesById(n, t.nextNodeId) : [], d = [];
|
|
29
|
-
return t?.parameters?.nodes?.forEach((o) => {
|
|
30
|
-
if (o?.value?.__typename === "NodeFunctionIdWrapper") {
|
|
31
|
-
const r = this.getNodeById(n, o.value?.id);
|
|
32
|
-
r && (d.push(r), d.push(...r ? this.getLinkedNodesById(n, r.nextNodeId) : []));
|
|
33
|
-
}
|
|
34
|
-
}), [...t ? [t] : [], ...d, ...e];
|
|
35
|
-
}
|
|
36
|
-
getNodeById(n, i) {
|
|
37
|
-
return this.getById(n)?.nodes?.nodes?.find((t) => t?.id === i);
|
|
38
|
-
}
|
|
39
|
-
getPayloadById(n) {
|
|
40
|
-
const i = this.getById(n);
|
|
41
|
-
return {
|
|
42
|
-
name: i?.name,
|
|
43
|
-
type: i?.type?.id,
|
|
44
|
-
settings: i?.settings?.nodes?.map((t) => ({
|
|
45
|
-
flowSettingIdentifier: t?.flowSettingIdentifier,
|
|
46
|
-
value: t?.value
|
|
47
|
-
})) ?? [],
|
|
48
|
-
nodes: (i?.nodes?.nodes ?? []).map((t) => ({
|
|
49
|
-
id: t?.id,
|
|
50
|
-
nextNodeId: t?.nextNodeId,
|
|
51
|
-
functionDefinitionId: t?.functionDefinition?.id,
|
|
52
|
-
parameters: (t?.parameters?.nodes ?? []).map((e) => {
|
|
53
|
-
let d;
|
|
54
|
-
switch (e?.value?.__typename) {
|
|
55
|
-
case "NodeFunctionIdWrapper":
|
|
56
|
-
d = {
|
|
57
|
-
nodeFunctionId: e.value.id
|
|
58
|
-
};
|
|
59
|
-
break;
|
|
60
|
-
case "LiteralValue":
|
|
61
|
-
d = {
|
|
62
|
-
literalValue: e.value.value
|
|
63
|
-
};
|
|
64
|
-
break;
|
|
65
|
-
case "ReferenceValue": {
|
|
66
|
-
const o = e.value;
|
|
67
|
-
d = {
|
|
68
|
-
referenceValue: {
|
|
69
|
-
nodeFunctionId: o.nodeFunctionId,
|
|
70
|
-
referencePath: o.referencePath ?? []
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
default:
|
|
76
|
-
d = {
|
|
77
|
-
literalValue: null
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
return {
|
|
81
|
-
parameterDefinitionId: e?.parameterDefinition?.id,
|
|
82
|
-
value: d
|
|
83
|
-
};
|
|
84
|
-
})
|
|
85
|
-
})),
|
|
86
|
-
startingNodeId: i?.startingNodeId
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
async deleteNodeById(n, i) {
|
|
90
|
-
const t = this.getById(n), e = this.getNodeById(n, i), d = t?.nodes?.nodes?.find((s) => s?.parameters?.nodes?.find((a) => a?.value?.__typename === "NodeFunctionIdWrapper" && a.value?.id === i)), o = t?.nodes?.nodes?.find((s) => s?.nextNodeId === i), r = this.values().findIndex((s) => s.id === n);
|
|
91
|
-
if (!(!t || !e)) {
|
|
92
|
-
if (t.nodes.nodes = t.nodes.nodes.filter((s) => s?.id !== i), e.parameters?.nodes?.forEach((s) => this.removeParameterNode(t, s)), o ? o.nextNodeId = e.nextNodeId : d || (t.startingNodeId = e.nextNodeId ?? void 0), d) {
|
|
93
|
-
const s = d.parameters?.nodes?.find((a) => a?.value?.__typename === "NodeFunctionIdWrapper" && a.value?.id === i);
|
|
94
|
-
s && (s.value = void 0);
|
|
95
|
-
}
|
|
96
|
-
t.editedAt = (/* @__PURE__ */ new Date()).toISOString(), this.set(r, new c(t));
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
async addNextNodeById(n, i, t) {
|
|
100
|
-
const e = this.getById(n), d = this.values().findIndex((u) => u.id === n), o = i ? this.getNodeById(n, i) : void 0;
|
|
101
|
-
if (!e || i && !o) return;
|
|
102
|
-
const s = `gid://sagittarius/NodeFunction/${Math.max(0, ...e.nodes?.nodes?.map((u) => Number(u?.id?.match(/NodeFunction\/(\d+)$/)?.[1] ?? 0)) ?? [0]) + 1}`, a = {
|
|
103
|
-
...JSON.parse(JSON.stringify(t)),
|
|
104
|
-
id: s
|
|
105
|
-
};
|
|
106
|
-
o && o.nextNodeId ? a.nextNodeId = o.nextNodeId : !o && e.startingNodeId && (a.nextNodeId = e.startingNodeId), e.nodes?.nodes?.push(a), o ? o.nextNodeId = a.id : e.startingNodeId = a.id, e.editedAt = (/* @__PURE__ */ new Date()).toISOString(), this.set(d, new c(e));
|
|
107
|
-
}
|
|
108
|
-
async setSettingValue(n, i, t) {
|
|
109
|
-
const e = this.getById(n), d = this.values().findIndex((r) => r.id === n);
|
|
110
|
-
if (!e) return;
|
|
111
|
-
e.editedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
112
|
-
const o = e.settings?.nodes?.find((r) => r?.flowSettingIdentifier === i);
|
|
113
|
-
if (o)
|
|
114
|
-
o.value = t;
|
|
115
|
-
else {
|
|
116
|
-
const r = {
|
|
117
|
-
flowSettingIdentifier: i,
|
|
118
|
-
value: null
|
|
119
|
-
};
|
|
120
|
-
r.value = t, e.settings.nodes.push(r);
|
|
121
|
-
}
|
|
122
|
-
this.set(d, new c(e));
|
|
123
|
-
}
|
|
124
|
-
async setParameterValue(n, i, t, e) {
|
|
125
|
-
const d = this.getById(n), o = this.values().findIndex((a) => a.id === n);
|
|
126
|
-
if (!d) return;
|
|
127
|
-
const r = this.getNodeById(n, i);
|
|
128
|
-
if (!r) return;
|
|
129
|
-
const s = r.parameters?.nodes?.find((a) => a?.id === t);
|
|
130
|
-
if (s) {
|
|
131
|
-
if (this.removeParameterNode(d, s), e?.__typename === "NodeFunction") {
|
|
132
|
-
const a = Math.max(0, ...d.nodes?.nodes?.map((N) => Number(N?.id?.match(/NodeFunction\/(\d+)$/)?.[1] ?? 0)) ?? [0]), u = {
|
|
133
|
-
...e,
|
|
134
|
-
id: `gid://sagittarius/NodeFunction/${a + 1}`
|
|
135
|
-
};
|
|
136
|
-
d.nodes?.nodes?.push(u), s.value = {
|
|
137
|
-
id: `gid://sagittarius/NodeFunction/${a + 1}`,
|
|
138
|
-
__typename: "NodeFunctionIdWrapper"
|
|
139
|
-
};
|
|
140
|
-
} else
|
|
141
|
-
s.value = e;
|
|
142
|
-
d.editedAt = (/* @__PURE__ */ new Date()).toISOString(), this.set(o, new c(d));
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
export {
|
|
147
|
-
x as DFlowReactiveService
|
|
148
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { DataTypeIdentifier } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
-
export declare const hashToColor: (s: string) => string;
|
|
3
|
-
export declare const attachDataTypeIdentifiers: <T>(identifiers: DataTypeIdentifier[], input: T) => T;
|
|
4
|
-
export declare const resolveDataTypeIdentifiers: (list: DataTypeIdentifier[]) => DataTypeIdentifier[];
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { md5 as d } from "js-md5";
|
|
2
|
-
const f = 137.50776405003785, T = (t) => {
|
|
3
|
-
const a = t.match(/\/(\d+)\s*$/);
|
|
4
|
-
return a ? Number(a[1]) : null;
|
|
5
|
-
}, m = (t) => {
|
|
6
|
-
const a = T(t);
|
|
7
|
-
if (a != null)
|
|
8
|
-
return `hsl(${25 + a * f % 320}, 100%, 72%)`;
|
|
9
|
-
const n = d(d(t));
|
|
10
|
-
return `hsl(${25 + parseInt(n.slice(0, 8), 16) % 320}, 100%, 72%)`;
|
|
11
|
-
}, l = (t, a) => {
|
|
12
|
-
const n = new Map(t.filter((r) => r?.id).map((r) => [r.id, r])), i = (r) => Array.isArray(r) ? r.map(i) : r && typeof r == "object" ? {
|
|
13
|
-
...Object.fromEntries(Object.entries(r).map(([s, e]) => [s, i(e)])),
|
|
14
|
-
...r.dataTypeIdentifierId ? {
|
|
15
|
-
dataTypeIdentifier: n.get(r.dataTypeIdentifierId) ?? null
|
|
16
|
-
} : {},
|
|
17
|
-
...Array.isArray(r.sourceDataTypeIdentifierIds) ? {
|
|
18
|
-
sourceDataTypeIdentifiers: r.sourceDataTypeIdentifierIds.map((s) => n.get(s)).filter(Boolean)
|
|
19
|
-
} : {}
|
|
20
|
-
} : r;
|
|
21
|
-
return i(a);
|
|
22
|
-
}, u = (t) => {
|
|
23
|
-
const a = new Map(t.filter((e) => e?.id).map((e) => [e.id, e])), n = /* @__PURE__ */ new Map(), i = (e) => {
|
|
24
|
-
if (!e?.id) return e;
|
|
25
|
-
if (n.has(e.id)) return n.get(e.id);
|
|
26
|
-
const o = {
|
|
27
|
-
...e
|
|
28
|
-
};
|
|
29
|
-
if (n.set(e.id, o), e.genericType) {
|
|
30
|
-
o.genericType = {
|
|
31
|
-
...e.genericType
|
|
32
|
-
};
|
|
33
|
-
const p = e.genericType.genericMappers;
|
|
34
|
-
Array.isArray(p) && (o.genericType.genericMappers = p.map((c) => ({
|
|
35
|
-
...c,
|
|
36
|
-
...Array.isArray(c.sourceDataTypeIdentifierIds) ? {
|
|
37
|
-
sourceDataTypeIdentifiers: c.sourceDataTypeIdentifierIds.map((y) => i(a.get(y) ?? null)).filter(Boolean)
|
|
38
|
-
} : {}
|
|
39
|
-
})));
|
|
40
|
-
}
|
|
41
|
-
return o;
|
|
42
|
-
}, r = t.map((e) => i(e)).filter(Boolean), s = (e) => {
|
|
43
|
-
if (!e) return e;
|
|
44
|
-
const o = e?.dataTypeIdentifiers?.nodes;
|
|
45
|
-
if (!Array.isArray(o)) return e;
|
|
46
|
-
const p = u(o), c = {
|
|
47
|
-
...e,
|
|
48
|
-
dataTypeIdentifiers: {
|
|
49
|
-
...e.dataTypeIdentifiers,
|
|
50
|
-
nodes: p
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
return l(p, c);
|
|
54
|
-
};
|
|
55
|
-
return r.forEach((e) => {
|
|
56
|
-
e?.dataType && (e.dataType = s(e.dataType)), e?.genericType?.dataType && (e.genericType.dataType = s(e.genericType.dataType));
|
|
57
|
-
}), r;
|
|
58
|
-
};
|
|
59
|
-
export {
|
|
60
|
-
l as attachDataTypeIdentifiers,
|
|
61
|
-
m as hashToColor,
|
|
62
|
-
u as resolveDataTypeIdentifiers
|
|
63
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Code0Component } from '../../utils';
|
|
2
|
-
import { Edge, EdgeProps } from '@xyflow/react';
|
|
3
|
-
import { default as React } from 'react';
|
|
4
|
-
import { Flow, NodeFunction } from '@code0-tech/sagittarius-graphql-types';
|
|
5
|
-
export interface DFlowEdgeDataProps extends Code0Component<HTMLDivElement> {
|
|
6
|
-
color?: string;
|
|
7
|
-
type: 'parameter' | 'suggestion' | 'group' | 'default';
|
|
8
|
-
parentNodeId?: NodeFunction['id'] | null;
|
|
9
|
-
flowId: Flow['id'];
|
|
10
|
-
}
|
|
11
|
-
export type DFlowEdgeProps = EdgeProps<Edge<DFlowEdgeDataProps>>;
|
|
12
|
-
export declare const DFlowEdge: React.FC<DFlowEdgeProps>;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as O, Fragment as z } from "react/jsx-runtime";
|
|
2
|
-
import { c as D } from "../../_virtual/compiler-runtime.js";
|
|
3
|
-
import { Position as P, getSmoothStepPath as G, BaseEdge as T, EdgeLabelRenderer as W } from "@xyflow/react";
|
|
4
|
-
import { memo as q } from "react";
|
|
5
|
-
import { Badge as A } from "../badge/Badge.js";
|
|
6
|
-
const V = q((E) => {
|
|
7
|
-
const t = D.c(43);
|
|
8
|
-
let s, i, a, d, e, o, r, l;
|
|
9
|
-
if (t[0] !== E) {
|
|
10
|
-
const {
|
|
11
|
-
sourceX: S,
|
|
12
|
-
sourceY: j,
|
|
13
|
-
targetX: v,
|
|
14
|
-
targetY: w,
|
|
15
|
-
id: C,
|
|
16
|
-
data: F,
|
|
17
|
-
label: I,
|
|
18
|
-
style: H,
|
|
19
|
-
...U
|
|
20
|
-
} = E;
|
|
21
|
-
e = S, o = j, r = v, l = w, i = C, s = F, a = I, d = U, t[0] = E, t[1] = s, t[2] = i, t[3] = a, t[4] = d, t[5] = e, t[6] = o, t[7] = r, t[8] = l;
|
|
22
|
-
} else
|
|
23
|
-
s = t[1], i = t[2], a = t[3], d = t[4], e = t[5], o = t[6], r = t[7], l = t[8];
|
|
24
|
-
const X = s?.type === "parameter" ? P.Left : P.Bottom, Y = s?.type === "parameter" ? P.Right : P.Top;
|
|
25
|
-
let h;
|
|
26
|
-
t[9] !== e || t[10] !== o || t[11] !== X || t[12] !== Y || t[13] !== r || t[14] !== l ? (h = G({
|
|
27
|
-
sourceX: e,
|
|
28
|
-
sourceY: o,
|
|
29
|
-
sourcePosition: X,
|
|
30
|
-
targetX: r,
|
|
31
|
-
targetY: l,
|
|
32
|
-
targetPosition: Y,
|
|
33
|
-
borderRadius: 16,
|
|
34
|
-
stepPosition: 0.5
|
|
35
|
-
}), t[9] = e, t[10] = o, t[11] = X, t[12] = Y, t[13] = r, t[14] = l, t[15] = h) : h = t[15];
|
|
36
|
-
const [$, R, k] = h, x = s?.color ?? "#ffffff", y = `dflow-edge-gradient-${i}`;
|
|
37
|
-
let c, p;
|
|
38
|
-
t[16] !== x ? (c = /* @__PURE__ */ n("stop", { offset: "0", stopColor: x, stopOpacity: 0.05 }), p = /* @__PURE__ */ n("stop", { offset: "1", stopColor: x, stopOpacity: 0.5 }), t[16] = x, t[17] = c, t[18] = p) : (c = t[17], p = t[18]);
|
|
39
|
-
let f;
|
|
40
|
-
t[19] !== y || t[20] !== e || t[21] !== o || t[22] !== c || t[23] !== p || t[24] !== r || t[25] !== l ? (f = /* @__PURE__ */ n("defs", { children: /* @__PURE__ */ O("linearGradient", { id: y, x1: e, y1: o, x2: r, y2: l, gradientUnits: "userSpaceOnUse", children: [
|
|
41
|
-
c,
|
|
42
|
-
p
|
|
43
|
-
] }) }), t[19] = y, t[20] = e, t[21] = o, t[22] = c, t[23] = p, t[24] = r, t[25] = l, t[26] = f) : f = t[26];
|
|
44
|
-
const B = `url(#${y})`, L = s?.type === "default" ? "3px" : "2px";
|
|
45
|
-
let m;
|
|
46
|
-
t[27] !== B || t[28] !== L ? (m = {
|
|
47
|
-
stroke: B,
|
|
48
|
-
strokeWidth: L,
|
|
49
|
-
strokeLinecap: "round"
|
|
50
|
-
}, t[27] = B, t[28] = L, t[29] = m) : m = t[29];
|
|
51
|
-
let g;
|
|
52
|
-
t[30] !== $ || t[31] !== i || t[32] !== d || t[33] !== m ? (g = /* @__PURE__ */ n(T, { id: i, path: $, ...d, style: m }), t[30] = $, t[31] = i, t[32] = d, t[33] = m, t[34] = g) : g = t[34];
|
|
53
|
-
let u;
|
|
54
|
-
t[35] !== a || t[36] !== R || t[37] !== k ? (u = a ? /* @__PURE__ */ n(W, { children: /* @__PURE__ */ n("div", { style: {
|
|
55
|
-
position: "absolute",
|
|
56
|
-
transform: `translate(-50%, -50%) translate(${R}px, ${k}px)`,
|
|
57
|
-
pointerEvents: "all",
|
|
58
|
-
zIndex: 100
|
|
59
|
-
}, children: /* @__PURE__ */ n(A, { color: "primary", border: !0, children: a }) }) }) : null, t[35] = a, t[36] = R, t[37] = k, t[38] = u) : u = t[38];
|
|
60
|
-
let b;
|
|
61
|
-
return t[39] !== u || t[40] !== f || t[41] !== g ? (b = /* @__PURE__ */ O(z, { children: [
|
|
62
|
-
f,
|
|
63
|
-
g,
|
|
64
|
-
u
|
|
65
|
-
] }), t[39] = u, t[40] = f, t[41] = g, t[42] = b) : b = t[42], b;
|
|
66
|
-
});
|
|
67
|
-
export {
|
|
68
|
-
V as DFlowEdge
|
|
69
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DFlow as r } from "./DFlow.js";
|
|
2
|
-
import { DFlowReactiveService as f } from "./DFlow.service.js";
|
|
3
|
-
import { useFlowEdges as m } from "./DFlow.edges.hook.js";
|
|
4
|
-
import { useFlowNodes as s } from "./DFlow.nodes.hook.js";
|
|
5
|
-
export {
|
|
6
|
-
r as DFlow,
|
|
7
|
-
f as DFlowReactiveService,
|
|
8
|
-
m as useFlowEdges,
|
|
9
|
-
s as useFlowNodes
|
|
10
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ReactiveArrayService } from '../../utils';
|
|
2
|
-
import { DataTypeView } from './DFlowDataType.view';
|
|
3
|
-
import { DataTypeIdentifier, Flow, Maybe, Namespace, NamespaceProject, NodeParameterValue, Runtime } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
-
export type DFlowDataTypeDependencies = {
|
|
5
|
-
namespaceId: Namespace['id'];
|
|
6
|
-
projectId: NamespaceProject['id'];
|
|
7
|
-
runtimeId: Runtime['id'];
|
|
8
|
-
};
|
|
9
|
-
export declare abstract class DFlowDataTypeReactiveService extends ReactiveArrayService<DataTypeView, DFlowDataTypeDependencies> {
|
|
10
|
-
getDataType(type: DataTypeIdentifier, dependencies?: DFlowDataTypeDependencies): DataTypeView | undefined;
|
|
11
|
-
getDataTypeFromValue(value: NodeParameterValue, flow?: Flow, dependencies?: DFlowDataTypeDependencies): DataTypeView | undefined;
|
|
12
|
-
getValueFromType(dataTypeIdentifier: DataTypeIdentifier, flow?: Flow, dependencies?: DFlowDataTypeDependencies): NodeParameterValue | undefined;
|
|
13
|
-
getTypeFromValue(value: NodeParameterValue, flow?: Flow, dependencies?: DFlowDataTypeDependencies): Maybe<DataTypeIdentifier> | undefined;
|
|
14
|
-
hasDataTypes(types: DataTypeIdentifier[], dependencies?: DFlowDataTypeDependencies): boolean;
|
|
15
|
-
}
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import "../../utils/contextStore.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { ReactiveArrayService as c } from "../../utils/reactiveArrayService.js";
|
|
4
|
-
import "merge-props";
|
|
5
|
-
import { md5 as g } from "js-md5";
|
|
6
|
-
import { DataTypeView as l } from "./DFlowDataType.view.js";
|
|
7
|
-
import { resolveType as m } from "../../utils/generics.js";
|
|
8
|
-
import { useValueValidation as v } from "../d-flow-validation/DValueValidation.hook.js";
|
|
9
|
-
import { findReturnNode as _ } from "./rules/DFlowDataTypeReturnTypeRule.js";
|
|
10
|
-
class R extends c {
|
|
11
|
-
getDataType(e, n) {
|
|
12
|
-
if (!e || e.genericKey) return;
|
|
13
|
-
const i = e.dataType ?? e.genericType?.dataType, t = i?.identifier, u = i?.id;
|
|
14
|
-
return i?.rules ? new l(i) : this.values().find((y) => y.identifier == t || y.id == u);
|
|
15
|
-
}
|
|
16
|
-
getDataTypeFromValue(e, n, i) {
|
|
17
|
-
if (!e) return;
|
|
18
|
-
if (e.__typename == "LiteralValue") {
|
|
19
|
-
if (Array.isArray(e.value) && Array.from(e.value).length > 0) return this.getDataType({
|
|
20
|
-
dataType: {
|
|
21
|
-
identifier: "LIST"
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
if (typeof e.value == "object") return this.getDataType({
|
|
25
|
-
dataType: {
|
|
26
|
-
identifier: "OBJECT"
|
|
27
|
-
}
|
|
28
|
-
}, i);
|
|
29
|
-
if (typeof e.value == "string") return this.getDataType({
|
|
30
|
-
dataType: {
|
|
31
|
-
identifier: "TEXT"
|
|
32
|
-
}
|
|
33
|
-
}, i);
|
|
34
|
-
if (typeof e.value == "number") return this.getDataType({
|
|
35
|
-
dataType: {
|
|
36
|
-
identifier: "NUMBER"
|
|
37
|
-
}
|
|
38
|
-
}, i);
|
|
39
|
-
if (typeof e.value == "boolean") return this.getDataType({
|
|
40
|
-
dataType: {
|
|
41
|
-
identifier: "BOOLEAN"
|
|
42
|
-
}
|
|
43
|
-
}, i);
|
|
44
|
-
}
|
|
45
|
-
const t = this.values(i).filter((u) => e.__typename === "NodeFunctionIdWrapper" && (u.variant != "NODE" || !n) ? !1 : v(e, u, this, n));
|
|
46
|
-
return t[t.length - 1];
|
|
47
|
-
}
|
|
48
|
-
getValueFromType(e, n, i) {
|
|
49
|
-
const t = this.getDataType(e, i);
|
|
50
|
-
if (!t) return;
|
|
51
|
-
if (t.identifier === "TEXT") return {
|
|
52
|
-
__typename: "LiteralValue",
|
|
53
|
-
value: ""
|
|
54
|
-
};
|
|
55
|
-
if (t.identifier === "NUMBER") return {
|
|
56
|
-
__typename: "LiteralValue",
|
|
57
|
-
value: 0
|
|
58
|
-
};
|
|
59
|
-
if (t.identifier === "BOOLEAN") return {
|
|
60
|
-
__typename: "LiteralValue",
|
|
61
|
-
value: !1
|
|
62
|
-
};
|
|
63
|
-
const u = t.rules?.nodes ?? [];
|
|
64
|
-
if (u.length === 0) return {
|
|
65
|
-
__typename: "LiteralValue",
|
|
66
|
-
value: null
|
|
67
|
-
};
|
|
68
|
-
const y = u.some((r) => r?.variant === "CONTAINS_TYPE"), p = !y && u.some((r) => r?.variant === "CONTAINS_KEY" || r?.variant === "PARENT_TYPE");
|
|
69
|
-
if (!y && !p)
|
|
70
|
-
return {
|
|
71
|
-
__typename: "LiteralValue",
|
|
72
|
-
value: null
|
|
73
|
-
};
|
|
74
|
-
const s = u.map((r) => {
|
|
75
|
-
if (r) {
|
|
76
|
-
if (r.variant === "CONTAINS_TYPE" && y) {
|
|
77
|
-
const a = r.config?.dataTypeIdentifier;
|
|
78
|
-
if (a) {
|
|
79
|
-
const T = (a.genericKey && e.genericType?.genericMappers ? e.genericType.genericMappers.find((d) => d.target === a.genericKey) : void 0)?.sourceDataTypeIdentifiers?.[0] ?? a, o = this.getValueFromType(T, n, i);
|
|
80
|
-
if (o && o.__typename === "LiteralValue")
|
|
81
|
-
return o.value;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
if (r.variant === "CONTAINS_KEY" && p) {
|
|
85
|
-
const a = r.config;
|
|
86
|
-
if (a?.key && a?.dataTypeIdentifier) {
|
|
87
|
-
const T = (a.dataTypeIdentifier?.genericKey && e.genericType?.genericMappers ? e.genericType.genericMappers.find((d) => d.target === a.dataTypeIdentifier?.genericKey) : void 0)?.sourceDataTypeIdentifiers?.[0] ?? a.dataTypeIdentifier, o = this.getValueFromType(T, n, i);
|
|
88
|
-
if (o && o.__typename === "LiteralValue")
|
|
89
|
-
return {
|
|
90
|
-
[a.key]: o.value
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
if (r.variant === "PARENT_TYPE" && p) {
|
|
95
|
-
const a = r.config?.dataTypeIdentifier;
|
|
96
|
-
if (a) {
|
|
97
|
-
const T = (a.genericKey && e.genericType?.genericMappers ? e.genericType.genericMappers.find((d) => d.target === a.genericKey) : void 0)?.sourceDataTypeIdentifiers?.[0] ?? a, o = this.getValueFromType(T, n, i);
|
|
98
|
-
if (o && o.__typename === "LiteralValue" && typeof o.value == "object" && !Array.isArray(o.value))
|
|
99
|
-
return o.value;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}).filter((r) => r !== void 0);
|
|
104
|
-
return {
|
|
105
|
-
__typename: "LiteralValue",
|
|
106
|
-
value: y ? s : Object.assign({}, ...s)
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
getTypeFromValue(e, n, i) {
|
|
110
|
-
if (!e) return;
|
|
111
|
-
const t = this.getDataTypeFromValue(e, n, i);
|
|
112
|
-
if ((t?.genericKeys?.length ?? 0) <= 0 || !t?.genericKeys) return {
|
|
113
|
-
dataType: {
|
|
114
|
-
id: t?.id,
|
|
115
|
-
identifier: t?.identifier
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
const u = t.genericKeys.map((p) => {
|
|
119
|
-
const s = t.rules?.nodes?.find((r) => "dataTypeIdentifier" in (r?.config ?? {}) && r?.config?.dataTypeIdentifier?.genericKey == p || "inputTypes" in (r?.config ?? {}) && r.config.inputTypes?.some((a) => a.dataTypeIdentifier?.genericKey == p));
|
|
120
|
-
if (s && s.variant == "CONTAINS_TYPE" && "value" in e && e?.value && t.variant === "ARRAY")
|
|
121
|
-
return {
|
|
122
|
-
sourceDataTypeIdentifiers: [this.getTypeFromValue({
|
|
123
|
-
__typename: "LiteralValue",
|
|
124
|
-
value: e.value[0]
|
|
125
|
-
}, n, i)],
|
|
126
|
-
target: p
|
|
127
|
-
};
|
|
128
|
-
if (s && s.variant == "CONTAINS_KEY" && "value" in e && e?.value && t.variant === "OBJECT")
|
|
129
|
-
return {
|
|
130
|
-
sourceDataTypeIdentifiers: [this.getTypeFromValue({
|
|
131
|
-
__typename: "LiteralValue",
|
|
132
|
-
/* @ts-ignore */
|
|
133
|
-
value: e.value[s.config?.key ?? ""]
|
|
134
|
-
}, n, i)],
|
|
135
|
-
target: p
|
|
136
|
-
};
|
|
137
|
-
if (s && s.variant == "RETURN_TYPE" && t.variant === "NODE") {
|
|
138
|
-
const a = _(e, n)?.parameters?.nodes?.[0]?.value;
|
|
139
|
-
return {
|
|
140
|
-
sourceDataTypeIdentifiers: [this.getTypeFromValue(a ?? {
|
|
141
|
-
__typename: "LiteralValue",
|
|
142
|
-
value: null
|
|
143
|
-
}, n, i)],
|
|
144
|
-
target: p
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
if (s && s.variant == "INPUT_TYPES" && t.variant === "NODE")
|
|
148
|
-
return {
|
|
149
|
-
sourceDataTypeIdentifiers: [{
|
|
150
|
-
genericKey: p
|
|
151
|
-
}],
|
|
152
|
-
target: p
|
|
153
|
-
};
|
|
154
|
-
if (s && s.variant == "PARENT_TYPE" && t.identifier === "OBJECT" && e.__typename === "LiteralValue" && e.value) {
|
|
155
|
-
const r = Object.entries(e.value).map((f) => ({
|
|
156
|
-
__typename: "DataTypeRule",
|
|
157
|
-
variant: "CONTAINS_KEY",
|
|
158
|
-
config: {
|
|
159
|
-
key: f[0],
|
|
160
|
-
dataTypeIdentifier: this.getTypeFromValue({
|
|
161
|
-
__typename: "LiteralValue",
|
|
162
|
-
value: f[1]
|
|
163
|
-
}, n, i) ?? null
|
|
164
|
-
}
|
|
165
|
-
}));
|
|
166
|
-
return {
|
|
167
|
-
sourceDataTypeIdentifiers: [{
|
|
168
|
-
dataType: new l({
|
|
169
|
-
...t.json,
|
|
170
|
-
genericKeys: [],
|
|
171
|
-
identifier: g(String(e.value)),
|
|
172
|
-
rules: {
|
|
173
|
-
nodes: r
|
|
174
|
-
}
|
|
175
|
-
}).json
|
|
176
|
-
}],
|
|
177
|
-
target: p
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
return null;
|
|
181
|
-
}).filter((p) => !!p), y = u.length > 0 ? {
|
|
182
|
-
genericType: {
|
|
183
|
-
dataType: {
|
|
184
|
-
id: t.id,
|
|
185
|
-
identifier: t.identifier
|
|
186
|
-
},
|
|
187
|
-
genericMappers: u
|
|
188
|
-
}
|
|
189
|
-
} : {
|
|
190
|
-
dataType: {
|
|
191
|
-
id: t.id,
|
|
192
|
-
identifier: t.identifier
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
return m(y, this);
|
|
196
|
-
}
|
|
197
|
-
hasDataTypes(e, n) {
|
|
198
|
-
return e.every((i) => this.values(n).find((t) => t.id === (i.genericType?.dataType?.id ?? i.dataType?.id)));
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
export {
|
|
202
|
-
R as DFlowDataTypeReactiveService
|
|
203
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { DataType, DataTypeIdentifierConnection, DataTypeRuleConnection, DataTypeVariant, Maybe, Runtime, Scalars, Translation } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
-
export declare class DataTypeView {
|
|
3
|
-
/** Name of the function */
|
|
4
|
-
private readonly _aliases?;
|
|
5
|
-
/** Time when this DataType was created */
|
|
6
|
-
private readonly _createdAt?;
|
|
7
|
-
/** The data type identifiers that are referenced in this data type and its rules */
|
|
8
|
-
private readonly _dataTypeIdentifiers?;
|
|
9
|
-
/** Display message of the function */
|
|
10
|
-
private readonly _displayMessages?;
|
|
11
|
-
/** Generic keys of the datatype */
|
|
12
|
-
private readonly _genericKeys?;
|
|
13
|
-
/** Global ID of this DataType */
|
|
14
|
-
private readonly _id?;
|
|
15
|
-
/** The identifier scoped to the namespace */
|
|
16
|
-
private readonly _identifier?;
|
|
17
|
-
/** Names of the flow type setting */
|
|
18
|
-
private readonly _name?;
|
|
19
|
-
/** Rules of the datatype */
|
|
20
|
-
private readonly _rules?;
|
|
21
|
-
/** The namespace where this datatype belongs to */
|
|
22
|
-
private readonly _runtime?;
|
|
23
|
-
/** Time when this DataType was last updated */
|
|
24
|
-
private readonly _updatedAt?;
|
|
25
|
-
/** The type of the datatype */
|
|
26
|
-
private readonly _variant?;
|
|
27
|
-
constructor(dataType: DataType);
|
|
28
|
-
get aliases(): Maybe<Array<Translation>> | undefined;
|
|
29
|
-
get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
30
|
-
get dataTypeIdentifiers(): Maybe<DataTypeIdentifierConnection> | undefined;
|
|
31
|
-
get displayMessages(): Maybe<Array<Translation>> | undefined;
|
|
32
|
-
get genericKeys(): Maybe<Array<Scalars["String"]["output"]>> | undefined;
|
|
33
|
-
get id(): Maybe<Scalars["DataTypeID"]["output"]> | undefined;
|
|
34
|
-
get identifier(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
35
|
-
get name(): Maybe<Array<Translation>> | undefined;
|
|
36
|
-
get runtime(): Maybe<Runtime> | undefined;
|
|
37
|
-
get rules(): Maybe<DataTypeRuleConnection> | undefined;
|
|
38
|
-
get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
39
|
-
get variant(): Maybe<DataTypeVariant> | undefined;
|
|
40
|
-
get json(): DataType;
|
|
41
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { attachDataTypeIdentifiers as n, resolveDataTypeIdentifiers as a } from "../d-flow/DFlow.util.js";
|
|
2
|
-
function t(i, e, r) {
|
|
3
|
-
return (e = d(e)) in i ? Object.defineProperty(i, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : i[e] = r, i;
|
|
4
|
-
}
|
|
5
|
-
function d(i) {
|
|
6
|
-
var e = u(i, "string");
|
|
7
|
-
return typeof e == "symbol" ? e : e + "";
|
|
8
|
-
}
|
|
9
|
-
function u(i, e) {
|
|
10
|
-
if (typeof i != "object" || !i) return i;
|
|
11
|
-
var r = i[Symbol.toPrimitive];
|
|
12
|
-
if (r !== void 0) {
|
|
13
|
-
var s = r.call(i, e);
|
|
14
|
-
if (typeof s != "object") return s;
|
|
15
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
16
|
-
}
|
|
17
|
-
return (e === "string" ? String : Number)(i);
|
|
18
|
-
}
|
|
19
|
-
class h {
|
|
20
|
-
constructor(e) {
|
|
21
|
-
t(this, "_aliases", void 0), t(this, "_createdAt", void 0), t(this, "_dataTypeIdentifiers", void 0), t(this, "_displayMessages", void 0), t(this, "_genericKeys", void 0), t(this, "_id", void 0), t(this, "_identifier", void 0), t(this, "_name", void 0), t(this, "_rules", void 0), t(this, "_runtime", void 0), t(this, "_updatedAt", void 0), t(this, "_variant", void 0), this._aliases = e.aliases, this._createdAt = e.createdAt, this._dataTypeIdentifiers = e.dataTypeIdentifiers, this._displayMessages = e.displayMessages, this._genericKeys = e.genericKeys, this._id = e.id, this._identifier = e.identifier, this._name = e.name, this._runtime = e.runtime, this._rules = n(a(this._dataTypeIdentifiers?.nodes ?? []), e.rules), this._updatedAt = e.updatedAt, this._variant = e.variant;
|
|
22
|
-
}
|
|
23
|
-
get aliases() {
|
|
24
|
-
return this._aliases;
|
|
25
|
-
}
|
|
26
|
-
get createdAt() {
|
|
27
|
-
return this._createdAt;
|
|
28
|
-
}
|
|
29
|
-
get dataTypeIdentifiers() {
|
|
30
|
-
return this._dataTypeIdentifiers;
|
|
31
|
-
}
|
|
32
|
-
get displayMessages() {
|
|
33
|
-
return this._displayMessages;
|
|
34
|
-
}
|
|
35
|
-
get genericKeys() {
|
|
36
|
-
return this._genericKeys;
|
|
37
|
-
}
|
|
38
|
-
get id() {
|
|
39
|
-
return this._id;
|
|
40
|
-
}
|
|
41
|
-
get identifier() {
|
|
42
|
-
return this._identifier;
|
|
43
|
-
}
|
|
44
|
-
get name() {
|
|
45
|
-
return this._name;
|
|
46
|
-
}
|
|
47
|
-
get runtime() {
|
|
48
|
-
return this._runtime;
|
|
49
|
-
}
|
|
50
|
-
get rules() {
|
|
51
|
-
return this._rules;
|
|
52
|
-
}
|
|
53
|
-
get updatedAt() {
|
|
54
|
-
return this._updatedAt;
|
|
55
|
-
}
|
|
56
|
-
get variant() {
|
|
57
|
-
return this._variant;
|
|
58
|
-
}
|
|
59
|
-
get json() {
|
|
60
|
-
return {
|
|
61
|
-
id: this._id,
|
|
62
|
-
createdAt: this._createdAt,
|
|
63
|
-
updatedAt: this._updatedAt,
|
|
64
|
-
identifier: this._identifier,
|
|
65
|
-
name: this._name,
|
|
66
|
-
runtime: this._runtime,
|
|
67
|
-
variant: this._variant,
|
|
68
|
-
genericKeys: this._genericKeys,
|
|
69
|
-
rules: this._rules,
|
|
70
|
-
dataTypeIdentifiers: this._dataTypeIdentifiers
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
export {
|
|
75
|
-
h as DataTypeView
|
|
76
|
-
};
|