@code0-tech/pictor 0.0.0-mvp.rc.1
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/LICENSE +29 -0
- package/README.md +0 -0
- package/dist/DFlowDataType.service-B7xAjgiJ.js +793 -0
- package/dist/assets/Avatar.css +1 -0
- package/dist/assets/Badge.css +1 -0
- package/dist/assets/Breadcrumb.css +1 -0
- package/dist/assets/Button.css +1 -0
- package/dist/assets/ButtonGroup.css +1 -0
- package/dist/assets/Card.css +1 -0
- package/dist/assets/Col.css +1 -0
- package/dist/assets/Command.css +1 -0
- package/dist/assets/Container.css +1 -0
- package/dist/assets/DFlow.css +1 -0
- package/dist/assets/DFlowFolder.css +1 -0
- package/dist/assets/DFlowFunctionDefaultCard.css +1 -0
- package/dist/assets/DFlowInputDataType.css +1 -0
- package/dist/assets/DFlowMiniMap.css +1 -0
- package/dist/assets/DFlowSuggestionSearchInput.css +1 -0
- package/dist/assets/DFlowValidation.css +1 -0
- package/dist/assets/DFullScreen.css +1 -0
- package/dist/assets/DLayout.css +1 -0
- package/dist/assets/DResizable.css +1 -0
- package/dist/assets/Dialog.css +1 -0
- package/dist/assets/FileTabs.css +1 -0
- package/dist/assets/Flex.css +1 -0
- package/dist/assets/Input.css +1 -0
- package/dist/assets/Menu.css +1 -0
- package/dist/assets/Quote.css +1 -0
- package/dist/assets/Row.css +1 -0
- package/dist/assets/ScrollArea.css +1 -0
- package/dist/assets/SegmentedControl.css +1 -0
- package/dist/assets/Text.css +1 -0
- package/dist/assets/Tooltip.css +1 -0
- package/dist/compiler-runtime-Cu50tn6L.js +54 -0
- package/dist/components/avatar/Avatar.d.ts +8 -0
- package/dist/components/avatar/Avatar.js +55 -0
- package/dist/components/badge/Badge.d.ts +7 -0
- package/dist/components/badge/Badge.js +22 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +7 -0
- package/dist/components/breadcrumb/Breadcrumb.js +31 -0
- package/dist/components/button/Button.d.ts +10 -0
- package/dist/components/button/Button.js +28 -0
- package/dist/components/button-group/ButtonGroup.d.ts +7 -0
- package/dist/components/button-group/ButtonGroup.js +26 -0
- package/dist/components/card/Card.d.ts +14 -0
- package/dist/components/card/Card.js +39 -0
- package/dist/components/card/CardSection.d.ts +9 -0
- package/dist/components/card/CardSection.js +22 -0
- package/dist/components/col/Col.d.ts +13 -0
- package/dist/components/col/Col.js +26 -0
- package/dist/components/command/Command.d.ts +30 -0
- package/dist/components/command/Command.js +102 -0
- package/dist/components/container/Container.d.ts +6 -0
- package/dist/components/container/Container.js +20 -0
- package/dist/components/d-flow/DFlow.d.ts +5 -0
- package/dist/components/d-flow/DFlow.edges.hook.d.ts +4 -0
- package/dist/components/d-flow/DFlow.edges.hook.js +145 -0
- package/dist/components/d-flow/DFlow.js +373 -0
- package/dist/components/d-flow/DFlow.nodes.hook.d.ts +3 -0
- package/dist/components/d-flow/DFlow.nodes.hook.js +140 -0
- package/dist/components/d-flow/DFlow.service.d.ts +10 -0
- package/dist/components/d-flow/DFlow.service.js +11 -0
- package/dist/components/d-flow/DFlow.view.d.ts +109 -0
- package/dist/components/d-flow/DFlow.view.js +209 -0
- package/dist/components/d-flow/control/DFlowControl.d.ts +2 -0
- package/dist/components/d-flow/control/DFlowControl.js +77 -0
- package/dist/components/d-flow/control/index.d.ts +1 -0
- package/dist/components/d-flow/control/index.js +4 -0
- package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +10 -0
- package/dist/components/d-flow/data-type/DFlowDataType.service.js +7 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +2 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +18 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +4 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +6 -0
- package/dist/components/d-flow/data-type/DFlowDataType.view.d.ts +32 -0
- package/dist/components/d-flow/data-type/DFlowDataType.view.js +65 -0
- package/dist/components/d-flow/data-type/index.d.ts +2 -0
- package/dist/components/d-flow/data-type/index.js +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.d.ts +7 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.d.ts +4 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.d.ts +9 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +217 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.d.ts +4 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +7 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.d.ts +8 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.js +10 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.d.ts +3 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +8 -0
- package/dist/components/d-flow/edge/DFlowEdge.d.ts +10 -0
- package/dist/components/d-flow/edge/DFlowEdge.js +48 -0
- package/dist/components/d-flow/folder/DFlowFolder.d.ts +19 -0
- package/dist/components/d-flow/folder/DFlowFolder.js +118 -0
- package/dist/components/d-flow/folder/index.d.ts +1 -0
- package/dist/components/d-flow/folder/index.js +6 -0
- package/dist/components/d-flow/function/DFlowFunction.input.hook.d.ts +4 -0
- package/dist/components/d-flow/function/DFlowFunction.input.hook.js +9 -0
- package/dist/components/d-flow/function/DFlowFunction.return.hook.d.ts +4 -0
- package/dist/components/d-flow/function/DFlowFunction.return.hook.js +11 -0
- package/dist/components/d-flow/function/DFlowFunction.service.d.ts +6 -0
- package/dist/components/d-flow/function/DFlowFunction.service.js +9 -0
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +10 -0
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +75 -0
- package/dist/components/d-flow/function/DFlowFunction.view.d.ts +66 -0
- package/dist/components/d-flow/function/DFlowFunction.view.js +117 -0
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.d.ts +15 -0
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +158 -0
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +5 -0
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +55 -0
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.d.ts +11 -0
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +26 -0
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.d.ts +9 -0
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +97 -0
- package/dist/components/d-flow/function/index.d.ts +2 -0
- package/dist/components/d-flow/function/index.js +7 -0
- package/dist/components/d-flow/index.d.ts +13 -0
- package/dist/components/d-flow/index.js +46 -0
- package/dist/components/d-flow/input/DFlowInputDataType.d.ts +8 -0
- package/dist/components/d-flow/input/DFlowInputDataType.js +422 -0
- package/dist/components/d-flow/minimap/DFlowMiniMap.d.ts +2 -0
- package/dist/components/d-flow/minimap/DFlowMiniMap.js +21 -0
- package/dist/components/d-flow/minimap/index.d.ts +1 -0
- package/dist/components/d-flow/minimap/index.js +4 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.d.ts +33 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +151 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +5 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +18 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +21 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +25 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.d.ts +8 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +67 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.d.ts +3 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.js +42 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.d.ts +2 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +69 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.d.ts +6 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +21 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.d.ts +7 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +21 -0
- package/dist/components/d-flow/suggestion/index.d.ts +2 -0
- package/dist/components/d-flow/suggestion/index.js +7 -0
- package/dist/components/d-flow/tab/DFlowTabDefault.d.ts +11 -0
- package/dist/components/d-flow/tab/DFlowTabDefault.js +97 -0
- package/dist/components/d-flow/tab/DFlowTabTrigger.d.ts +6 -0
- package/dist/components/d-flow/tab/DFlowTabTrigger.js +51 -0
- package/dist/components/d-flow/tab/DFlowTabs.d.ts +2 -0
- package/dist/components/d-flow/tab/DFlowTabs.js +105 -0
- package/dist/components/d-flow/type/DFlowType.service.d.ts +6 -0
- package/dist/components/d-flow/type/DFlowType.service.js +9 -0
- package/dist/components/d-flow/type/DFlowType.view.d.ts +35 -0
- package/dist/components/d-flow/type/DFlowType.view.js +69 -0
- package/dist/components/d-flow/type/index.d.ts +2 -0
- package/dist/components/d-flow/type/index.js +6 -0
- package/dist/components/d-flow/validation/DFlowValidation.d.ts +6 -0
- package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +3 -0
- package/dist/components/d-flow/validation/DFlowValidation.hook.js +10 -0
- package/dist/components/d-flow/validation/DFlowValidation.js +59 -0
- package/dist/components/d-flow/validation/index.d.ts +2 -0
- package/dist/components/d-flow/validation/index.js +6 -0
- package/dist/components/d-fullscreen/DFullScreen.d.ts +7 -0
- package/dist/components/d-fullscreen/DFullScreen.js +20 -0
- package/dist/components/d-layout/DLayout.d.ts +10 -0
- package/dist/components/d-layout/DLayout.js +51 -0
- package/dist/components/d-namespace/DNamespace.service.d.ts +6 -0
- package/dist/components/d-namespace/DNamespace.service.js +11 -0
- package/dist/components/d-namespace/DNamespace.view.d.ts +32 -0
- package/dist/components/d-namespace/DNamespace.view.js +65 -0
- package/dist/components/d-namespace/index.d.ts +12 -0
- package/dist/components/d-namespace/index.js +35 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +8 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.service.js +11 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.view.d.ts +26 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.view.js +57 -0
- package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +9 -0
- package/dist/components/d-namespace/member/DNamespaceMember.service.js +11 -0
- package/dist/components/d-namespace/member/DNamespaceMember.view.d.ts +26 -0
- package/dist/components/d-namespace/member/DNamespaceMember.view.js +57 -0
- package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProject.service.js +11 -0
- package/dist/components/d-namespace/project/DNamespaceProject.view.d.ts +35 -0
- package/dist/components/d-namespace/project/DNamespaceProject.view.js +69 -0
- package/dist/components/d-namespace/project/DNamespaceProjectCard.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProjectCard.js +57 -0
- package/dist/components/d-namespace/project/DNamespaceProjectMenu.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProjectMenu.js +18 -0
- package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +10 -0
- package/dist/components/d-namespace/role/DNamespaceRole.service.js +11 -0
- package/dist/components/d-namespace/role/DNamespaceRole.view.d.ts +26 -0
- package/dist/components/d-namespace/role/DNamespaceRole.view.js +57 -0
- package/dist/components/d-organization/DOrganization.service.d.ts +8 -0
- package/dist/components/d-organization/DOrganization.service.js +11 -0
- package/dist/components/d-organization/DOrganization.view.d.ts +20 -0
- package/dist/components/d-organization/DOrganization.view.js +52 -0
- package/dist/components/d-organization/DOrganizationCard.d.ts +10 -0
- package/dist/components/d-organization/DOrganizationCard.js +63 -0
- package/dist/components/d-organization/DOrganizationMenu.d.ts +9 -0
- package/dist/components/d-organization/DOrganizationMenu.js +18 -0
- package/dist/components/d-organization/index.d.ts +4 -0
- package/dist/components/d-organization/index.js +19 -0
- package/dist/components/d-resizable/DResizable.d.ts +10 -0
- package/dist/components/d-resizable/DResizable.js +31 -0
- package/dist/components/d-runtime/DRuntime.service.d.ts +9 -0
- package/dist/components/d-runtime/DRuntime.service.js +11 -0
- package/dist/components/d-runtime/DRuntime.view.d.ts +38 -0
- package/dist/components/d-runtime/DRuntime.view.js +73 -0
- package/dist/components/d-runtime/index.d.ts +2 -0
- package/dist/components/d-runtime/index.js +6 -0
- package/dist/components/d-user/DUser.service.d.ts +21 -0
- package/dist/components/d-user/DUser.service.js +17 -0
- package/dist/components/d-user/DUser.view.d.ts +52 -0
- package/dist/components/d-user/DUser.view.js +100 -0
- package/dist/components/d-user/DUserMenu.d.ts +8 -0
- package/dist/components/d-user/DUserMenu.js +28 -0
- package/dist/components/d-user/index.d.ts +3 -0
- package/dist/components/d-user/index.js +17 -0
- package/dist/components/dialog/Dialog.d.ts +28 -0
- package/dist/components/dialog/Dialog.js +98 -0
- package/dist/components/file-tabs/FileTabs.d.ts +17 -0
- package/dist/components/file-tabs/FileTabs.js +70 -0
- package/dist/components/file-tabs/FileTabs.service.d.ts +13 -0
- package/dist/components/file-tabs/FileTabs.service.js +47 -0
- package/dist/components/file-tabs/FileTabs.view.d.ts +9 -0
- package/dist/components/file-tabs/FileTabs.view.js +1 -0
- package/dist/components/flex/Flex.d.ts +7 -0
- package/dist/components/flex/Flex.js +21 -0
- package/dist/components/form/CheckboxInput.d.ts +5 -0
- package/dist/components/form/CheckboxInput.js +67 -0
- package/dist/components/form/EmailInput.d.ts +8 -0
- package/dist/components/form/EmailInput.js +20 -0
- package/dist/components/form/Input.d.ts +22 -0
- package/dist/components/form/Input.js +153 -0
- package/dist/components/form/InputDescription.d.ts +5 -0
- package/dist/components/form/InputDescription.js +12 -0
- package/dist/components/form/InputLabel.d.ts +5 -0
- package/dist/components/form/InputLabel.js +12 -0
- package/dist/components/form/InputMessage.d.ts +5 -0
- package/dist/components/form/InputMessage.js +18 -0
- package/dist/components/form/InputSuggestion.d.ts +19 -0
- package/dist/components/form/InputSuggestion.js +102 -0
- package/dist/components/form/NumberInput.d.ts +6 -0
- package/dist/components/form/NumberInput.js +20 -0
- package/dist/components/form/PasswordInput.d.ts +8 -0
- package/dist/components/form/PasswordInput.js +18 -0
- package/dist/components/form/PinInput.d.ts +11 -0
- package/dist/components/form/PinInput.js +66 -0
- package/dist/components/form/RadioGroup.d.ts +5 -0
- package/dist/components/form/RadioGroup.js +48 -0
- package/dist/components/form/RadioInput.d.ts +7 -0
- package/dist/components/form/RadioInput.js +27 -0
- package/dist/components/form/SwitchInput.d.ts +6 -0
- package/dist/components/form/SwitchInput.js +19 -0
- package/dist/components/form/TextInput.d.ts +7 -0
- package/dist/components/form/TextInput.js +19 -0
- package/dist/components/form/index.d.ts +15 -0
- package/dist/components/form/index.js +37 -0
- package/dist/components/form/useForm.d.ts +25 -0
- package/dist/components/form/useForm.js +57 -0
- package/dist/components/menu/Menu.d.ts +27 -0
- package/dist/components/menu/Menu.js +104 -0
- package/dist/components/quote/Quote.d.ts +10 -0
- package/dist/components/quote/Quote.js +48 -0
- package/dist/components/row/Row.d.ts +6 -0
- package/dist/components/row/Row.js +20 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +13 -0
- package/dist/components/scroll-area/ScrollArea.js +42 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts +8 -0
- package/dist/components/segmented-control/SegmentedControl.js +23 -0
- package/dist/components/text/Text.d.ts +8 -0
- package/dist/components/text/Text.js +23 -0
- package/dist/components/tooltip/Tooltip.d.ts +13 -0
- package/dist/components/tooltip/Tooltip.js +47 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +223 -0
- package/dist/utils/arrayService.d.ts +10 -0
- package/dist/utils/arrayService.js +1 -0
- package/dist/utils/contextStore.d.ts +62 -0
- package/dist/utils/contextStore.js +60 -0
- package/dist/utils/generics.d.ts +17 -0
- package/dist/utils/generics.js +311 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +28 -0
- package/dist/utils/inspection.d.ts +13 -0
- package/dist/utils/inspection.js +4 -0
- package/dist/utils/nonReactiveArrayService.d.ts +19 -0
- package/dist/utils/nonReactiveArrayService.js +54 -0
- package/dist/utils/objectStore.d.ts +12 -0
- package/dist/utils/objectStore.js +34 -0
- package/dist/utils/reactiveArrayService.d.ts +22 -0
- package/dist/utils/reactiveArrayService.js +81 -0
- package/dist/utils/types.d.ts +57 -0
- package/dist/utils/types.js +4 -0
- package/dist/utils/utils.d.ts +68 -0
- package/dist/utils/utils.js +216 -0
- package/package.json +125 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NodeParameterValue } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
export declare enum DFlowSuggestionType {
|
|
3
|
+
REF_OBJECT = 0,
|
|
4
|
+
VALUE = 1,
|
|
5
|
+
FUNCTION = 2,
|
|
6
|
+
FUNCTION_COMBINATION = 3,
|
|
7
|
+
DATA_TYPE = 4
|
|
8
|
+
}
|
|
9
|
+
export declare class DFlowSuggestion {
|
|
10
|
+
private readonly _hash;
|
|
11
|
+
private readonly _path;
|
|
12
|
+
private readonly _value;
|
|
13
|
+
private readonly _type;
|
|
14
|
+
private readonly _displayText;
|
|
15
|
+
constructor(_hash: string, _path: number[], _value: NodeParameterValue, _type: DFlowSuggestionType, _displayText: string[]);
|
|
16
|
+
get displayText(): string[];
|
|
17
|
+
get hash(): string;
|
|
18
|
+
get path(): number[];
|
|
19
|
+
get value(): NodeParameterValue;
|
|
20
|
+
get type(): DFlowSuggestionType;
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var s = /* @__PURE__ */ ((t) => (t[t.REF_OBJECT = 0] = "REF_OBJECT", t[t.VALUE = 1] = "VALUE", t[t.FUNCTION = 2] = "FUNCTION", t[t.FUNCTION_COMBINATION = 3] = "FUNCTION_COMBINATION", t[t.DATA_TYPE = 4] = "DATA_TYPE", t))(s || {});
|
|
2
|
+
class O {
|
|
3
|
+
constructor(h, r, _, a, N) {
|
|
4
|
+
this._hash = h, this._path = r, this._value = _, this._type = a, this._displayText = N;
|
|
5
|
+
}
|
|
6
|
+
get displayText() {
|
|
7
|
+
return this._displayText;
|
|
8
|
+
}
|
|
9
|
+
get hash() {
|
|
10
|
+
return this._hash;
|
|
11
|
+
}
|
|
12
|
+
get path() {
|
|
13
|
+
return this._path;
|
|
14
|
+
}
|
|
15
|
+
get value() {
|
|
16
|
+
return this._value;
|
|
17
|
+
}
|
|
18
|
+
get type() {
|
|
19
|
+
return this._type;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
O as DFlowSuggestion,
|
|
24
|
+
s as DFlowSuggestionType
|
|
25
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DFlowSuggestion } from './DFlowSuggestion.view';
|
|
3
|
+
export interface DFlowSuggestionMenuProps {
|
|
4
|
+
triggerContent: React.ReactNode;
|
|
5
|
+
suggestions?: DFlowSuggestion[];
|
|
6
|
+
onSuggestionSelect?: (suggestion: DFlowSuggestion) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const DFlowSuggestionMenu: React.FC<DFlowSuggestionMenuProps>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as o, jsxs as I } from "react/jsx-runtime";
|
|
2
|
+
import { c as k } from "../../../compiler-runtime-Cu50tn6L.js";
|
|
3
|
+
import { MenuTrigger as B, MenuSeparator as b, MenuPortal as E, Menu as L } from "../../menu/Menu.js";
|
|
4
|
+
import x from "react";
|
|
5
|
+
import { DFlowSuggestionMenuFooter as O } from "./DFlowSuggestionMenuFooter.js";
|
|
6
|
+
import { InputSuggestionMenuContentItems as P, InputSuggestionMenuContent as U } from "../../form/InputSuggestion.js";
|
|
7
|
+
import { toInputSuggestions as $ } from "./DFlowSuggestionMenu.util.js";
|
|
8
|
+
import { DFlowSuggestionMenuSearchBar as q } from "./DFlowSuggestionMenuSearchBar.js";
|
|
9
|
+
import { useStoreApi as z } from "@xyflow/react";
|
|
10
|
+
const Z = (F) => {
|
|
11
|
+
const e = k.c(25), {
|
|
12
|
+
suggestions: c,
|
|
13
|
+
triggerContent: h,
|
|
14
|
+
onSuggestionSelect: C
|
|
15
|
+
} = F;
|
|
16
|
+
let g;
|
|
17
|
+
e[0] !== c ? (g = c === void 0 ? [] : c, e[0] = c, e[1] = g) : g = e[1];
|
|
18
|
+
const m = g, M = C === void 0 ? G : C, D = z(), w = x.useRef(null), [y, T] = x.useState(m);
|
|
19
|
+
let s;
|
|
20
|
+
e[2] !== D ? (s = (t) => {
|
|
21
|
+
setTimeout(() => {
|
|
22
|
+
D.setState({
|
|
23
|
+
nodesDraggable: !t,
|
|
24
|
+
nodesConnectable: !t,
|
|
25
|
+
elementsSelectable: !t
|
|
26
|
+
});
|
|
27
|
+
}, 250);
|
|
28
|
+
}, e[2] = D, e[3] = s) : s = e[3];
|
|
29
|
+
let n;
|
|
30
|
+
e[4] !== h ? (n = /* @__PURE__ */ o(B, { asChild: !0, children: h }), e[4] = h, e[5] = n) : n = e[5];
|
|
31
|
+
let r;
|
|
32
|
+
e[6] !== m ? (r = /* @__PURE__ */ o(q, { onType: (t) => {
|
|
33
|
+
t.key === "ArrowDown" ? (t.preventDefault(), w.current?.focusFirstItem()) : t.key === "ArrowUp" && (t.preventDefault(), w.current?.focusLastItem());
|
|
34
|
+
const A = t.target.value;
|
|
35
|
+
return T(m.filter((R) => R.displayText.some((j) => j.includes(A)))), t.preventDefault(), !1;
|
|
36
|
+
} }), e[6] = m, e[7] = r) : r = e[7];
|
|
37
|
+
let a;
|
|
38
|
+
e[8] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ o(b, {}), e[8] = a) : a = e[8];
|
|
39
|
+
let i;
|
|
40
|
+
e[9] !== y ? (i = $(y), e[9] = y, e[10] = i) : i = e[10];
|
|
41
|
+
let l;
|
|
42
|
+
e[11] !== M ? (l = (t) => {
|
|
43
|
+
M(t.ref);
|
|
44
|
+
}, e[11] = M, e[12] = l) : l = e[12];
|
|
45
|
+
let u;
|
|
46
|
+
e[13] !== i || e[14] !== l ? (u = /* @__PURE__ */ o(P, { ref: w, suggestions: i, onSuggestionSelect: l }), e[13] = i, e[14] = l, e[15] = u) : u = e[15];
|
|
47
|
+
let p, S;
|
|
48
|
+
e[16] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ o(b, {}), S = /* @__PURE__ */ o(O, {}), e[16] = p, e[17] = S) : (p = e[16], S = e[17]);
|
|
49
|
+
let f;
|
|
50
|
+
e[18] !== r || e[19] !== u ? (f = /* @__PURE__ */ o(E, { children: /* @__PURE__ */ I(U, { children: [
|
|
51
|
+
r,
|
|
52
|
+
a,
|
|
53
|
+
u,
|
|
54
|
+
p,
|
|
55
|
+
S
|
|
56
|
+
] }) }), e[18] = r, e[19] = u, e[20] = f) : f = e[20];
|
|
57
|
+
let d;
|
|
58
|
+
return e[21] !== f || e[22] !== s || e[23] !== n ? (d = /* @__PURE__ */ I(L, { onOpenChange: s, children: [
|
|
59
|
+
n,
|
|
60
|
+
f
|
|
61
|
+
] }), e[21] = f, e[22] = s, e[23] = n, e[24] = d) : d = e[24], d;
|
|
62
|
+
};
|
|
63
|
+
function G() {
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
Z as DFlowSuggestionMenu
|
|
67
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as o, jsxs as T, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import { DFlowSuggestionType as e } from "./DFlowSuggestion.view.js";
|
|
3
|
+
import { IconCircleDot as c, IconCirclesRelation as I, IconFileFunctionFilled as p } from "@tabler/icons-react";
|
|
4
|
+
import { Text as N } from "../../text/Text.js";
|
|
5
|
+
const O = (a) => {
|
|
6
|
+
const f = {
|
|
7
|
+
[e.VALUE]: "Values",
|
|
8
|
+
[e.REF_OBJECT]: "Variables",
|
|
9
|
+
[e.DATA_TYPE]: "Datatypes"
|
|
10
|
+
};
|
|
11
|
+
return a.map((i) => {
|
|
12
|
+
const m = {
|
|
13
|
+
[e.FUNCTION]: /* @__PURE__ */ o(p, { color: "#70ffb2", size: 16 }),
|
|
14
|
+
[e.FUNCTION_COMBINATION]: /* @__PURE__ */ o(p, { color: "#70ffb2", size: 16 }),
|
|
15
|
+
[e.REF_OBJECT]: /* @__PURE__ */ o(I, { color: "#FFBE0B", size: 16 }),
|
|
16
|
+
[e.VALUE]: /* @__PURE__ */ o(c, { color: "#D90429", size: 16 }),
|
|
17
|
+
[e.DATA_TYPE]: /* @__PURE__ */ o(c, { color: "#D90429", size: 16 })
|
|
18
|
+
}, F = /* @__PURE__ */ T(d, { children: [
|
|
19
|
+
m[i.type],
|
|
20
|
+
/* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(N, { display: "flex", style: {
|
|
21
|
+
gap: ".5rem"
|
|
22
|
+
}, children: i.displayText.map((t, r) => /* @__PURE__ */ o("span", { children: t }, r)) }) })
|
|
23
|
+
] });
|
|
24
|
+
let n = f[i.type];
|
|
25
|
+
if (i.type === e.FUNCTION || i.type === e.FUNCTION_COMBINATION) {
|
|
26
|
+
const t = i.value.__typename === "NodeFunction" ? i.value.functionDefinition?.runtimeFunctionDefinition?.identifier : void 0;
|
|
27
|
+
if (t) {
|
|
28
|
+
const [r, l] = t.split("::");
|
|
29
|
+
r && l && (n = `${r}::${l}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
children: F,
|
|
34
|
+
ref: i,
|
|
35
|
+
value: i.value,
|
|
36
|
+
groupLabel: n
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
O as toInputSuggestions
|
|
42
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as y } from "../../../compiler-runtime-Cu50tn6L.js";
|
|
3
|
+
import { MenuLabel as p } from "../../menu/Menu.js";
|
|
4
|
+
import { IconCornerDownLeft as d, IconBulb as g, IconFileFunctionFilled as _, IconArrowsShuffle as b, IconCirclesRelation as u, IconCircleDot as x } from "@tabler/icons-react";
|
|
5
|
+
import { Text as f } from "../../text/Text.js";
|
|
6
|
+
import { Flex as i } from "../../flex/Flex.js";
|
|
7
|
+
import { TooltipTrigger as F, Tooltip as I, TooltipPortal as z, TooltipContent as S } from "../../tooltip/Tooltip.js";
|
|
8
|
+
const O = () => {
|
|
9
|
+
const e = y.c(8);
|
|
10
|
+
let l;
|
|
11
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (l = {
|
|
12
|
+
gap: ".35rem"
|
|
13
|
+
}, e[0] = l) : l = e[0];
|
|
14
|
+
let o;
|
|
15
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ t(i, { align: "center", style: l, children: [
|
|
16
|
+
"Press ",
|
|
17
|
+
/* @__PURE__ */ r(d, { size: 12 }),
|
|
18
|
+
" to insert"
|
|
19
|
+
] }), e[1] = o) : o = e[1];
|
|
20
|
+
let c;
|
|
21
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ r(F, { asChild: !0, children: /* @__PURE__ */ r(g, { size: 12 }) }), e[2] = c) : c = e[2];
|
|
22
|
+
let n;
|
|
23
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (n = {
|
|
24
|
+
flexDirection: "column",
|
|
25
|
+
gap: ".35rem"
|
|
26
|
+
}, e[3] = n) : n = e[3];
|
|
27
|
+
let s;
|
|
28
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ t(i, { align: "center", style: {
|
|
29
|
+
gap: ".35rem"
|
|
30
|
+
}, children: [
|
|
31
|
+
/* @__PURE__ */ r(_, { color: "#70ffb2", size: 16 }),
|
|
32
|
+
/* @__PURE__ */ r(f, { hierarchy: "tertiary", size: "xs", children: "FUNCTION" })
|
|
33
|
+
] }), e[4] = s) : s = e[4];
|
|
34
|
+
let m;
|
|
35
|
+
e[5] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ t(i, { align: "center", style: {
|
|
36
|
+
gap: ".35rem"
|
|
37
|
+
}, children: [
|
|
38
|
+
/* @__PURE__ */ r(b, { color: "#29BF12", size: 16 }),
|
|
39
|
+
/* @__PURE__ */ r(f, { hierarchy: "tertiary", size: "xs", children: "FUNCTION COMBINATION" })
|
|
40
|
+
] }), e[5] = m) : m = e[5];
|
|
41
|
+
let a;
|
|
42
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ t(i, { align: "center", style: {
|
|
43
|
+
gap: ".35rem"
|
|
44
|
+
}, children: [
|
|
45
|
+
/* @__PURE__ */ r(u, { color: "#FFBE0B", size: 16 }),
|
|
46
|
+
/* @__PURE__ */ r(f, { hierarchy: "tertiary", size: "xs", children: "VARIABLE" })
|
|
47
|
+
] }), e[6] = a) : a = e[6];
|
|
48
|
+
let h;
|
|
49
|
+
return e[7] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ r(p, { children: /* @__PURE__ */ t(i, { w: "100%", justify: "space-between", children: [
|
|
50
|
+
o,
|
|
51
|
+
/* @__PURE__ */ r(i, { ml: 1, align: "center", justify: "center", children: /* @__PURE__ */ t(I, { children: [
|
|
52
|
+
c,
|
|
53
|
+
/* @__PURE__ */ r(z, { children: /* @__PURE__ */ r(S, { align: "center", side: "right", sideOffset: 8, children: /* @__PURE__ */ t(i, { pt: 0.35, pb: 0.35, style: n, children: [
|
|
54
|
+
s,
|
|
55
|
+
m,
|
|
56
|
+
a,
|
|
57
|
+
/* @__PURE__ */ t(i, { align: "center", style: {
|
|
58
|
+
gap: ".35rem"
|
|
59
|
+
}, children: [
|
|
60
|
+
/* @__PURE__ */ r(x, { color: "#D90429", size: 16 }),
|
|
61
|
+
/* @__PURE__ */ r(f, { hierarchy: "tertiary", size: "xs", children: "VALUE" })
|
|
62
|
+
] })
|
|
63
|
+
] }) }) })
|
|
64
|
+
] }) })
|
|
65
|
+
] }) }), e[7] = h) : h = e[7], h;
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
O as DFlowSuggestionMenuFooter
|
|
69
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Code0Component } from '../../../utils/types';
|
|
3
|
+
export interface DFlowSuggestionMenuSearchBarProps extends Code0Component<HTMLDivElement> {
|
|
4
|
+
onType: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const DFlowSuggestionMenuSearchBar: React.FC<DFlowSuggestionMenuSearchBarProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "../../../compiler-runtime-Cu50tn6L.js";
|
|
3
|
+
import { DFlowSuggestionSearchInput as i } from "./DFlowSuggestionSearchInput.js";
|
|
4
|
+
import { IconSearch as s } from "@tabler/icons-react";
|
|
5
|
+
const p = (c) => {
|
|
6
|
+
const e = m.c(6);
|
|
7
|
+
let o;
|
|
8
|
+
e[0] !== c ? (o = (a) => c.onType(a), e[0] = c, e[1] = o) : o = e[1];
|
|
9
|
+
let t;
|
|
10
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (t = {
|
|
11
|
+
background: "none",
|
|
12
|
+
boxShadow: "none"
|
|
13
|
+
}, e[2] = t) : t = e[2];
|
|
14
|
+
let r;
|
|
15
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ n(s, { size: 12 }), e[3] = r) : r = e[3];
|
|
16
|
+
let l;
|
|
17
|
+
return e[4] !== o ? (l = /* @__PURE__ */ n(i, { placeholder: "Search...", onKeyUp: o, clearable: !0, style: t, autoFocus: !0, left: r }), e[4] = o, e[5] = l) : l = e[5], l;
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
p as DFlowSuggestionMenuSearchBar
|
|
21
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InputProps } from '../../form/Input';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface DFlowSuggestionSearchInputProps extends Omit<InputProps<string | null>, "wrapperComponent" | "type"> {
|
|
4
|
+
clearable?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const DFlowSuggestionSearchInput: React.ForwardRefExoticComponent<DFlowSuggestionSearchInputProps>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Input as l, setElementKey as p } from "../../form/Input.js";
|
|
3
|
+
import r from "react";
|
|
4
|
+
import { Button as m } from "../../button/Button.js";
|
|
5
|
+
import { IconX as u } from "@tabler/icons-react";
|
|
6
|
+
import '../../../assets/DFlowSuggestionSearchInput.css';const x = r.forwardRef((n, t) => {
|
|
7
|
+
t = t || r.useRef(null);
|
|
8
|
+
const {
|
|
9
|
+
clearable: i = !1,
|
|
10
|
+
right: s,
|
|
11
|
+
...a
|
|
12
|
+
} = n, c = () => {
|
|
13
|
+
t.current && p(t.current, "value", "", "change");
|
|
14
|
+
}, o = [s];
|
|
15
|
+
return i && o.push(/* @__PURE__ */ e(m, { variant: "none", onClick: c, children: /* @__PURE__ */ e(u, { size: 13 }) })), /* @__PURE__ */ e(l, { wrapperComponent: {
|
|
16
|
+
className: "d-flow-suggestion-search-input"
|
|
17
|
+
}, right: o, type: "text", ref: t, ...a });
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
x as DFlowSuggestionSearchInput
|
|
21
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DFlowReactiveSuggestionService as g } from "./DFlowSuggestion.service.js";
|
|
2
|
+
import { DFlowSuggestion as i, DFlowSuggestionType as r } from "./DFlowSuggestion.view.js";
|
|
3
|
+
export {
|
|
4
|
+
g as DFlowReactiveSuggestionService,
|
|
5
|
+
i as DFlowSuggestion,
|
|
6
|
+
r as DFlowSuggestionType
|
|
7
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { NodeFunctionView } from '../DFlow.view';
|
|
3
|
+
import { Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
export interface DFlowTabDefaultProps {
|
|
5
|
+
functionInstance: NodeFunctionView;
|
|
6
|
+
flowId: Scalars["FlowID"]["output"];
|
|
7
|
+
depthLevel?: number;
|
|
8
|
+
scopeLevel?: number[];
|
|
9
|
+
nodeLevel?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const DFlowTabDefault: React.FC<DFlowTabDefaultProps>;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { jsx as r, jsxs as I } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import { NodeFunctionView as w } from "../DFlow.view.js";
|
|
4
|
+
import { TextInput as R } from "../../form/TextInput.js";
|
|
5
|
+
import { Flex as b } from "../../flex/Flex.js";
|
|
6
|
+
import { useService as p } from "../../../utils/contextStore.js";
|
|
7
|
+
import { DFlowFunctionReactiveService as L } from "../function/DFlowFunction.service.js";
|
|
8
|
+
import { useSuggestions as j } from "../suggestion/DFlowSuggestion.hook.js";
|
|
9
|
+
import { DFlowSuggestionMenuFooter as x } from "../suggestion/DFlowSuggestionMenuFooter.js";
|
|
10
|
+
import { toInputSuggestions as B } from "../suggestion/DFlowSuggestionMenu.util.js";
|
|
11
|
+
import { DFlowReactiveService as T } from "../DFlow.service.js";
|
|
12
|
+
import { Badge as g } from "../../badge/Badge.js";
|
|
13
|
+
const Q = (v) => {
|
|
14
|
+
const {
|
|
15
|
+
functionInstance: s,
|
|
16
|
+
flowId: y,
|
|
17
|
+
depthLevel: S,
|
|
18
|
+
scopeLevel: V,
|
|
19
|
+
nodeLevel: N
|
|
20
|
+
} = v, a = p(L), D = p(T), u = a.getById(s.functionDefinition?.id), c = m.useMemo(() => {
|
|
21
|
+
const e = {};
|
|
22
|
+
return u?.parameterDefinitions?.forEach((o) => {
|
|
23
|
+
e[o.id] = o;
|
|
24
|
+
}), e;
|
|
25
|
+
}, [u?.parameterDefinitions]), l = m.useMemo(() => [...s.parameters || []].sort((e, o) => e.id.localeCompare(o.id)), [s.parameters]), f = {};
|
|
26
|
+
return l.forEach((e) => {
|
|
27
|
+
const o = c[e.id];
|
|
28
|
+
f[e.id] = j(o?.dataTypeIdentifier, [], y, S, V, N);
|
|
29
|
+
}), /* @__PURE__ */ r(b, { style: {
|
|
30
|
+
gap: ".7rem",
|
|
31
|
+
flexDirection: "column"
|
|
32
|
+
}, children: l.map((e) => {
|
|
33
|
+
const o = (t) => {
|
|
34
|
+
e.value = t, D.update();
|
|
35
|
+
}, d = (t) => {
|
|
36
|
+
try {
|
|
37
|
+
const n = JSON.parse(t.target.value);
|
|
38
|
+
if (!n.__typename) {
|
|
39
|
+
o(n ? {
|
|
40
|
+
__typename: "LiteralValue",
|
|
41
|
+
value: n
|
|
42
|
+
} : void 0);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
o(n.__typename === "LiteralValue" ? n.value ? n : void 0 : n);
|
|
46
|
+
} catch {
|
|
47
|
+
o(t.target.value == "" || !t.target.value ? void 0 : {
|
|
48
|
+
__typename: "LiteralValue",
|
|
49
|
+
value: t.target.value
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}, i = c[e.id], O = f[e.id], h = i?.names ? i?.names?.nodes[0]?.content : i?.id, F = i?.descriptions ? i?.descriptions?.nodes[0]?.content : JSON.stringify(i?.dataTypeIdentifier), J = e.value instanceof w ? JSON.stringify({
|
|
53
|
+
...e.value.json(),
|
|
54
|
+
__typename: "NodeFunction"
|
|
55
|
+
}) : e.value?.__typename === "ReferenceValue" ? JSON.stringify(e.value) : e.value?.__typename === "LiteralValue" ? typeof e.value?.value == "object" ? JSON.stringify(e.value?.value) : e.value.value : "";
|
|
56
|
+
return /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(R, { title: h, description: F, clearable: !0, transformValue: (t) => {
|
|
57
|
+
try {
|
|
58
|
+
if (!t) return t;
|
|
59
|
+
if (JSON.parse(t).__typename === "NodeFunction") {
|
|
60
|
+
const n = a.getById(JSON.parse(t).functionDefinition?.id);
|
|
61
|
+
return /* @__PURE__ */ r(g, { color: "info", children: n?.names?.nodes[0]?.content });
|
|
62
|
+
}
|
|
63
|
+
if (JSON.parse(t).__typename === "ReferenceValue") {
|
|
64
|
+
const n = JSON.parse(t);
|
|
65
|
+
return /* @__PURE__ */ I(g, { color: "warning", children: [
|
|
66
|
+
n.depth,
|
|
67
|
+
"-",
|
|
68
|
+
n.scope,
|
|
69
|
+
"-",
|
|
70
|
+
n.node,
|
|
71
|
+
"-",
|
|
72
|
+
JSON.stringify(n.dataTypeIdentifier)
|
|
73
|
+
] });
|
|
74
|
+
}
|
|
75
|
+
} catch {
|
|
76
|
+
}
|
|
77
|
+
return t;
|
|
78
|
+
}, disableOnValue: (t) => {
|
|
79
|
+
if (!t) return !1;
|
|
80
|
+
try {
|
|
81
|
+
return t.__typename === "NodeFunction" || t.__typename === "ReferenceValue";
|
|
82
|
+
} catch {
|
|
83
|
+
}
|
|
84
|
+
return !1;
|
|
85
|
+
}, defaultValue: J, onSuggestionSelect: (t) => {
|
|
86
|
+
o(t.value);
|
|
87
|
+
}, formValidation: {
|
|
88
|
+
setValue: () => {
|
|
89
|
+
},
|
|
90
|
+
valid: e.validationResults.length <= 0,
|
|
91
|
+
notValidMessage: e.validationResults.map((t) => t.message.nodes[0]?.content).join(", ")
|
|
92
|
+
}, onBlur: d, onClear: d, suggestionsFooter: /* @__PURE__ */ r(x, {}), suggestions: B(O) }, JSON.stringify(e.value)) });
|
|
93
|
+
}) });
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
Q as DFlowTabDefault
|
|
97
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsxs as d, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useService as p } from "../../../utils/contextStore.js";
|
|
3
|
+
import { DFlowReactiveService as S } from "../DFlow.service.js";
|
|
4
|
+
import { TextInput as T } from "../../form/TextInput.js";
|
|
5
|
+
import { Flex as w } from "../../flex/Flex.js";
|
|
6
|
+
import { DFlowTypeReactiveService as b } from "../type/DFlowType.service.js";
|
|
7
|
+
import { useSuggestions as F } from "../suggestion/DFlowSuggestion.hook.js";
|
|
8
|
+
import { DFlowSuggestionMenuFooter as V } from "../suggestion/DFlowSuggestionMenuFooter.js";
|
|
9
|
+
import { toInputSuggestions as x } from "../suggestion/DFlowSuggestionMenu.util.js";
|
|
10
|
+
import { DFlowInputDataType as I } from "../input/DFlowInputDataType.js";
|
|
11
|
+
const _ = (c) => {
|
|
12
|
+
const {
|
|
13
|
+
instance: i
|
|
14
|
+
} = c, m = p(b), u = p(S), n = m.getById(i.type?.id), s = {};
|
|
15
|
+
return n?.flowTypeSettings?.forEach((o) => {
|
|
16
|
+
s[o.identifier] = F({
|
|
17
|
+
dataType: o.dataType
|
|
18
|
+
}, [], i.id, 0, [0], 0);
|
|
19
|
+
}), /* @__PURE__ */ d(w, { style: {
|
|
20
|
+
gap: ".7rem",
|
|
21
|
+
flexDirection: "column"
|
|
22
|
+
}, children: [
|
|
23
|
+
n?.inputType ? /* @__PURE__ */ l(I, { onDataTypeChange: (o) => {
|
|
24
|
+
i.inputType = o, u.update();
|
|
25
|
+
}, initialValue: i.inputType || n.inputType, blockingDataType: n.inputType }) : null,
|
|
26
|
+
n?.flowTypeSettings?.map((o) => {
|
|
27
|
+
const e = i.settings?.find((t) => t.flowSettingIdentifier == o.identifier), f = o.names?.nodes[0]?.content ?? "", y = o?.descriptions?.nodes[0]?.content ?? "", g = s[o.identifier];
|
|
28
|
+
if (!e) return null;
|
|
29
|
+
const v = (e.value?.__typename === "LiteralValue", typeof e?.value == "object" ? JSON.stringify(e?.value) : e?.value), r = (t) => {
|
|
30
|
+
t.__typename == "LiteralValue" ? e.value = t.value : e.value = t, u.update();
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(T, { title: f, description: y, clearable: !0, defaultValue: v, onClear: (t) => {
|
|
33
|
+
try {
|
|
34
|
+
const a = JSON.parse(t.target.value);
|
|
35
|
+
if (a.__typename == "LiteralValue") {
|
|
36
|
+
r(a.value);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
r(a);
|
|
40
|
+
} catch {
|
|
41
|
+
r(t.target.value);
|
|
42
|
+
}
|
|
43
|
+
}, onSuggestionSelect: (t) => {
|
|
44
|
+
r(t.value);
|
|
45
|
+
}, suggestionsFooter: /* @__PURE__ */ l(V, {}), suggestions: x(g) }, JSON.stringify(e.value)) });
|
|
46
|
+
})
|
|
47
|
+
] });
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
_ as DFlowTabTrigger
|
|
51
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { jsx as l, jsxs as S, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { c as B } from "../../../compiler-runtime-Cu50tn6L.js";
|
|
3
|
+
import { useService as E, useStore as O } from "../../../utils/contextStore.js";
|
|
4
|
+
import { FileTabsService as x } from "../../file-tabs/FileTabs.service.js";
|
|
5
|
+
import { FileTabsContent as V, FileTabsTrigger as P, FileTabsList as G, FileTabs as H } from "../../file-tabs/FileTabs.js";
|
|
6
|
+
import $ from "react";
|
|
7
|
+
import { MenuTrigger as q, MenuItem as y, Menu as A, MenuPortal as D, MenuContent as W, MenuSeparator as J } from "../../menu/Menu.js";
|
|
8
|
+
import { Button as j } from "../../button/Button.js";
|
|
9
|
+
import { IconChevronDown as K, IconDotsVertical as N } from "@tabler/icons-react";
|
|
10
|
+
const ne = () => {
|
|
11
|
+
const e = B.c(53), t = E(x), r = O(x), n = $.useId();
|
|
12
|
+
let F;
|
|
13
|
+
e[0] !== t || e[1] !== r ? (F = r.find(Q)?.id ?? t.getActiveTab()?.id, e[0] = t, e[1] = r, e[2] = F) : F = e[2];
|
|
14
|
+
const s = F;
|
|
15
|
+
let M;
|
|
16
|
+
e[3] !== t || e[4] !== n ? (M = () => {
|
|
17
|
+
setTimeout(() => {
|
|
18
|
+
const i = document.querySelector('[data-id="' + n + '"]').querySelector(".file-tabs__list-content"), T = i.querySelector('[data-value="' + t.getActiveTab()?.id + '"]');
|
|
19
|
+
if (i && T) {
|
|
20
|
+
const w = T.offsetLeft + T.offsetWidth / 2 - i.offsetWidth / 2;
|
|
21
|
+
i.scrollLeft = 0, i.scrollBy({
|
|
22
|
+
left: w,
|
|
23
|
+
behavior: "smooth"
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}, 0);
|
|
27
|
+
}, e[3] = t, e[4] = n, e[5] = M) : M = e[5];
|
|
28
|
+
let k;
|
|
29
|
+
e[6] !== s || e[7] !== n ? (k = [s, n], e[6] = s, e[7] = n, e[8] = k) : k = e[8], $.useEffect(M, k);
|
|
30
|
+
let c;
|
|
31
|
+
e[9] !== t ? (c = (o) => {
|
|
32
|
+
t.activateTab(o);
|
|
33
|
+
}, e[9] = t, e[10] = c) : c = e[10];
|
|
34
|
+
let I;
|
|
35
|
+
e[11] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ l(q, { asChild: !0, children: /* @__PURE__ */ l(j, { variant: "none", color: "primary", style: {
|
|
36
|
+
aspectRatio: "1/1"
|
|
37
|
+
}, children: /* @__PURE__ */ l(K, { size: 12 }) }) }), e[11] = I) : I = e[11];
|
|
38
|
+
let a;
|
|
39
|
+
if (e[12] !== t || e[13] !== r) {
|
|
40
|
+
let o;
|
|
41
|
+
e[15] !== t ? (o = (i) => /* @__PURE__ */ l(y, { onClick: () => {
|
|
42
|
+
t.activateTab(i.id);
|
|
43
|
+
}, children: i.children }, `menu-${i.id}`), e[15] = t, e[16] = o) : o = e[16], a = r.map(o), e[12] = t, e[13] = r, e[14] = a;
|
|
44
|
+
} else
|
|
45
|
+
a = e[14];
|
|
46
|
+
let f;
|
|
47
|
+
e[17] !== a ? (f = /* @__PURE__ */ S(A, { children: [
|
|
48
|
+
I,
|
|
49
|
+
/* @__PURE__ */ l(D, { children: /* @__PURE__ */ l(W, { align: "end", sideOffset: 8, children: a }) })
|
|
50
|
+
] }), e[17] = a, e[18] = f) : f = e[18];
|
|
51
|
+
let L;
|
|
52
|
+
e[19] === Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ l(q, { asChild: !0, children: /* @__PURE__ */ l(j, { variant: "none", color: "primary", style: {
|
|
53
|
+
aspectRatio: "1/1"
|
|
54
|
+
}, children: /* @__PURE__ */ l(N, { size: 12 }) }) }), e[19] = L) : L = e[19];
|
|
55
|
+
let d;
|
|
56
|
+
e[20] !== t ? (d = /* @__PURE__ */ l(y, { onClick: () => t.clear(), children: "Close all tabs" }), e[20] = t, e[21] = d) : d = e[21];
|
|
57
|
+
let m;
|
|
58
|
+
e[22] !== t ? (m = /* @__PURE__ */ l(y, { onClick: () => t.clearWithoutActive(), children: "Close other tabs" }), e[22] = t, e[23] = m) : m = e[23];
|
|
59
|
+
let R;
|
|
60
|
+
e[24] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ l(J, {}), e[24] = R) : R = e[24];
|
|
61
|
+
let h;
|
|
62
|
+
e[25] !== t ? (h = /* @__PURE__ */ l(y, { onClick: () => t.clearLeft(), children: "Close all tabs to left" }), e[25] = t, e[26] = h) : h = e[26];
|
|
63
|
+
let u;
|
|
64
|
+
e[27] !== t ? (u = /* @__PURE__ */ l(y, { onClick: () => t.clearRight(), children: "Close all tabs to right" }), e[27] = t, e[28] = u) : u = e[28];
|
|
65
|
+
let p;
|
|
66
|
+
e[29] !== h || e[30] !== u || e[31] !== d || e[32] !== m ? (p = /* @__PURE__ */ S(A, { children: [
|
|
67
|
+
L,
|
|
68
|
+
/* @__PURE__ */ l(D, { children: /* @__PURE__ */ S(W, { align: "end", sideOffset: 8, children: [
|
|
69
|
+
d,
|
|
70
|
+
m,
|
|
71
|
+
R,
|
|
72
|
+
h,
|
|
73
|
+
u
|
|
74
|
+
] }) })
|
|
75
|
+
] }), e[29] = h, e[30] = u, e[31] = d, e[32] = m, e[33] = p) : p = e[33];
|
|
76
|
+
let b;
|
|
77
|
+
e[34] !== p || e[35] !== f ? (b = /* @__PURE__ */ S(z, { children: [
|
|
78
|
+
f,
|
|
79
|
+
p
|
|
80
|
+
] }), e[34] = p, e[35] = f, e[36] = b) : b = e[36];
|
|
81
|
+
let v;
|
|
82
|
+
if (e[37] !== t || e[38] !== r) {
|
|
83
|
+
let o;
|
|
84
|
+
e[40] !== t ? (o = (i, T) => /* @__PURE__ */ l(P, { closable: i.closeable, value: i.id, onClose: () => t.delete(T), children: i.children }, `trigger-${i.id}`), e[40] = t, e[41] = o) : o = e[41], v = r.map(o), e[37] = t, e[38] = r, e[39] = v;
|
|
85
|
+
} else
|
|
86
|
+
v = e[39];
|
|
87
|
+
let g;
|
|
88
|
+
e[42] !== b || e[43] !== v ? (g = /* @__PURE__ */ l(G, { controls: b, children: v }), e[42] = b, e[43] = v, e[44] = g) : g = e[44];
|
|
89
|
+
let C;
|
|
90
|
+
e[45] !== r ? (C = r.map(U), e[45] = r, e[46] = C) : C = e[46];
|
|
91
|
+
let _;
|
|
92
|
+
return e[47] !== s || e[48] !== n || e[49] !== g || e[50] !== C || e[51] !== c ? (_ = /* @__PURE__ */ S(H, { "data-id": n, value: s, onValueChange: c, children: [
|
|
93
|
+
g,
|
|
94
|
+
C
|
|
95
|
+
] }), e[47] = s, e[48] = n, e[49] = g, e[50] = C, e[51] = c, e[52] = _) : _ = e[52], _;
|
|
96
|
+
};
|
|
97
|
+
function Q(e) {
|
|
98
|
+
return e.active;
|
|
99
|
+
}
|
|
100
|
+
function U(e) {
|
|
101
|
+
return /* @__PURE__ */ l(V, { value: e.id, children: e.content }, `content-${e.id}`);
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
ne as DFlowTabs
|
|
105
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactiveArrayService } from '../../../utils/reactiveArrayService';
|
|
2
|
+
import { FlowTypeView } from './DFlowType.view';
|
|
3
|
+
import { FlowType } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
export declare abstract class DFlowTypeReactiveService extends ReactiveArrayService<FlowTypeView> {
|
|
5
|
+
getById(id: FlowType['id']): FlowTypeView | undefined;
|
|
6
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { DataType, FlowType, FlowTypeSetting, Maybe, Scalars, TranslationConnection } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
export declare class FlowTypeView {
|
|
3
|
+
/** Time when this FlowType was created */
|
|
4
|
+
private readonly _createdAt?;
|
|
5
|
+
/** Descriptions of the flow type */
|
|
6
|
+
private readonly _descriptions?;
|
|
7
|
+
/** Editable status of the flow type */
|
|
8
|
+
private readonly _editable?;
|
|
9
|
+
/** Flow type settings of the flow type */
|
|
10
|
+
private readonly _flowTypeSettings?;
|
|
11
|
+
/** Global ID of this FlowType */
|
|
12
|
+
private readonly _id?;
|
|
13
|
+
/** Identifier of the flow type */
|
|
14
|
+
private readonly _identifier?;
|
|
15
|
+
/** Input type of the flow type */
|
|
16
|
+
private readonly _inputType?;
|
|
17
|
+
/** Names of the flow type */
|
|
18
|
+
private readonly _names?;
|
|
19
|
+
/** Return type of the flow type */
|
|
20
|
+
private readonly _returnType?;
|
|
21
|
+
/** Time when this FlowType was last updated */
|
|
22
|
+
private readonly _updatedAt?;
|
|
23
|
+
constructor(flowType: FlowType);
|
|
24
|
+
get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
25
|
+
get descriptions(): Maybe<TranslationConnection> | undefined;
|
|
26
|
+
get editable(): Maybe<Scalars["Boolean"]["output"]> | undefined;
|
|
27
|
+
get flowTypeSettings(): Maybe<Array<FlowTypeSetting>> | undefined;
|
|
28
|
+
get id(): Maybe<Scalars["TypesFlowTypeID"]["output"]> | undefined;
|
|
29
|
+
get identifier(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
30
|
+
get inputType(): Maybe<DataType> | undefined;
|
|
31
|
+
get names(): Maybe<TranslationConnection> | undefined;
|
|
32
|
+
get returnType(): Maybe<DataType> | undefined;
|
|
33
|
+
get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
34
|
+
json(): FlowType;
|
|
35
|
+
}
|