@code0-tech/pictor 0.0.0-mvp.2 → 0.0.0-mvp.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/compiler-runtime.js +5 -0
- package/dist/_virtual/compiler-runtime2.js +4 -0
- package/dist/_virtual/react-compiler-runtime.development.js +4 -0
- package/dist/_virtual/react-compiler-runtime.production.js +4 -0
- package/dist/assets/components/alert/Alert.style.css +1 -0
- package/dist/assets/components/avatar/Avatar.style.css +1 -0
- package/dist/assets/components/badge/Badge.style.css +1 -0
- package/dist/assets/components/button/Button.style.css +1 -0
- package/dist/assets/components/card/Card.style.css +1 -0
- package/dist/assets/components/command/Command.style.css +1 -0
- package/dist/assets/components/d-flow/DFlow.style.css +1 -0
- package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +1 -0
- package/dist/assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css +1 -0
- package/dist/assets/components/d-flow/input/DFlowInputDataType.style.css +1 -0
- package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +1 -0
- package/dist/assets/components/d-flow/validation/DFlowValidation.style.css +1 -0
- package/dist/assets/components/d-layout/DLayout.style.css +1 -0
- package/dist/assets/components/d-resizable/DResizable.style.css +1 -0
- package/dist/assets/components/dialog/Dialog.style.css +1 -0
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -0
- package/dist/assets/components/form/Input.style.css +1 -0
- package/dist/assets/components/menu/Menu.style.css +1 -0
- package/dist/assets/{ScrollArea.css → components/scroll-area/ScrollArea.style.css} +1 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -0
- package/dist/assets/components/spacing/Spacing.style.css +1 -0
- package/dist/assets/components/tab/Tab.style.css +1 -0
- package/dist/assets/components/text/Text.style.css +1 -0
- package/dist/assets/components/toast/Toast.style.css +1 -0
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -0
- package/dist/assets/{DFlow.css → node_modules/@xyflow/react/dist/style.css} +1 -1
- package/dist/components/alert/Alert.d.ts +7 -0
- package/dist/components/alert/Alert.js +38 -0
- package/dist/components/avatar/Avatar.js +2 -2
- package/dist/components/badge/Badge.js +2 -2
- package/dist/components/breadcrumb/Breadcrumb.js +16 -28
- package/dist/components/button/Button.d.ts +2 -1
- package/dist/components/button/Button.js +23 -20
- package/dist/components/button-group/ButtonGroup.js +6 -5
- package/dist/components/card/Card.d.ts +2 -1
- package/dist/components/card/Card.js +25 -22
- package/dist/components/card/CardSection.d.ts +1 -0
- package/dist/components/card/CardSection.js +18 -12
- package/dist/components/col/Col.js +9 -8
- package/dist/components/command/Command.js +19 -18
- package/dist/components/container/Container.js +12 -11
- package/dist/components/d-flow/DFlow.edges.hook.js +9 -10
- package/dist/components/d-flow/DFlow.js +6 -4
- package/dist/components/d-flow/DFlow.nodes.hook.js +18 -19
- package/dist/components/d-flow/control/DFlowControl.js +50 -46
- package/dist/components/d-flow/data-type/DFlowDataType.service.js +89 -5
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +18 -4
- package/dist/components/d-flow/data-type/index.js +1 -1
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +220 -4
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +227 -4
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +1 -1
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +241 -5
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +8 -6
- package/dist/components/d-flow/edge/DFlowEdge.js +1 -1
- package/dist/components/d-flow/folder/DFlowFolder.js +16 -15
- package/dist/components/d-flow/function/DFlowFunction.return.hook.js +1 -1
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +19 -20
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +56 -56
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +1 -1
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +1 -1
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +72 -76
- package/dist/components/d-flow/index.js +8 -8
- package/dist/components/d-flow/input/DFlowInputDataType.js +201 -201
- package/dist/components/d-flow/minimap/DFlowMiniMap.js +6 -5
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +61 -62
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +9 -8
- package/dist/components/d-flow/tab/DFlowTabs.js +1 -1
- package/dist/components/d-flow/validation/DFlowValidation.js +15 -14
- package/dist/components/d-fullscreen/DFullScreen.d.ts +1 -2
- package/dist/components/d-fullscreen/DFullScreen.js +24 -18
- package/dist/components/d-layout/DLayout.js +27 -26
- package/dist/components/d-license/DNamespaceLicense.service.d.ts +11 -0
- package/dist/components/d-license/DNamespaceLicense.service.js +12 -0
- package/dist/components/d-license/index.d.ts +2 -0
- package/dist/components/d-license/index.js +6 -0
- package/dist/components/d-member/DNamespaceMember.service.d.ts +13 -0
- package/dist/components/d-member/DNamespaceMember.service.js +15 -0
- package/dist/components/{d-namespace/member → d-member}/DNamespaceMember.view.d.ts +4 -1
- package/dist/components/{d-namespace/member → d-member}/DNamespaceMember.view.js +4 -1
- package/dist/components/d-member/index.d.ts +2 -0
- package/dist/components/d-member/index.js +6 -0
- package/dist/components/d-namespace/DNamespace.service.d.ts +1 -1
- package/dist/components/d-namespace/DNamespace.service.js +5 -4
- package/dist/components/d-namespace/index.d.ts +0 -10
- package/dist/components/d-namespace/index.js +4 -33
- package/dist/components/d-organization/DOrganization.service.d.ts +3 -3
- package/dist/components/d-organization/DOrganization.service.js +5 -4
- package/dist/components/d-organization/DOrganization.view.d.ts +4 -1
- package/dist/components/d-organization/DOrganization.view.js +21 -18
- package/dist/components/d-organization/DOrganizationCard.d.ts +3 -3
- package/dist/components/d-organization/DOrganizationCard.js +13 -60
- package/dist/components/d-organization/DOrganizationList.d.ts +11 -0
- package/dist/components/d-organization/DOrganizationList.js +23 -0
- package/dist/components/d-organization/DOrganizatonContent.d.ts +9 -0
- package/dist/components/d-organization/DOrganizatonContent.js +86 -0
- package/dist/components/d-organization/index.d.ts +1 -0
- package/dist/components/d-organization/index.js +15 -10
- package/dist/components/d-project/DNamespaceProject.service.d.ts +12 -0
- package/dist/components/d-project/DNamespaceProject.service.js +12 -0
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProject.view.d.ts +4 -1
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProject.view.js +13 -10
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectCard.d.ts +1 -1
- package/dist/components/d-project/DNamespaceProjectCard.js +15 -0
- package/dist/components/d-project/DNamespaceProjectContent.d.ts +8 -0
- package/dist/components/d-project/DNamespaceProjectContent.js +70 -0
- package/dist/components/d-project/DNamespaceProjectList.d.ts +11 -0
- package/dist/components/d-project/DNamespaceProjectList.js +25 -0
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectMenu.d.ts +1 -1
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectMenu.js +3 -3
- package/dist/components/d-project/index.d.ts +5 -0
- package/dist/components/d-project/index.js +24 -0
- package/dist/components/d-resizable/DResizable.js +17 -16
- package/dist/components/d-role/DNamespaceRole.service.d.ts +13 -0
- package/dist/components/d-role/DNamespaceRole.service.js +12 -0
- package/dist/components/d-role/index.d.ts +2 -0
- package/dist/components/d-role/index.js +6 -0
- package/dist/components/d-runtime/DRuntime.service.d.ts +5 -2
- package/dist/components/d-runtime/DRuntime.service.js +0 -2
- package/dist/components/d-runtime/DRuntime.view.d.ts +4 -1
- package/dist/components/d-runtime/DRuntime.view.js +6 -3
- package/dist/components/d-runtime/DRuntimeCard.d.ts +7 -0
- package/dist/components/d-runtime/DRuntimeCard.js +17 -0
- package/dist/components/d-runtime/DRuntimeContent.d.ts +7 -0
- package/dist/components/d-runtime/DRuntimeContent.js +40 -0
- package/dist/components/d-runtime/DRuntimeList.d.ts +10 -0
- package/dist/components/d-runtime/DRuntimeList.js +22 -0
- package/dist/components/d-runtime/index.d.ts +2 -0
- package/dist/components/d-runtime/index.js +6 -2
- package/dist/components/d-user/DUser.service.d.ts +1 -3
- package/dist/components/d-user/DUser.service.js +3 -9
- package/dist/components/d-user/DUser.session.hook.d.ts +3 -0
- package/dist/components/d-user/DUser.session.hook.js +16 -0
- package/dist/components/d-user/DUser.view.d.ts +4 -1
- package/dist/components/d-user/DUser.view.js +13 -10
- package/dist/components/d-user/DUserCard.d.ts +7 -0
- package/dist/components/d-user/DUserCard.js +15 -0
- package/dist/components/d-user/DUserContent.d.ts +7 -0
- package/dist/components/d-user/DUserContent.js +84 -0
- package/dist/components/d-user/DUserList.d.ts +10 -0
- package/dist/components/d-user/DUserList.js +22 -0
- package/dist/components/d-user/DUserMenu.js +19 -19
- package/dist/components/d-user/index.d.ts +3 -0
- package/dist/components/d-user/index.js +15 -8
- package/dist/components/dialog/Dialog.js +18 -17
- package/dist/components/file-tabs/FileTabs.js +41 -40
- package/dist/components/flex/Flex.js +2 -2
- package/dist/components/form/CheckboxInput.js +2 -2
- package/dist/components/form/Input.js +1 -1
- package/dist/components/form/InputDescription.js +1 -1
- package/dist/components/form/InputLabel.js +1 -1
- package/dist/components/form/InputMessage.js +1 -1
- package/dist/components/form/InputSuggestion.js +1 -1
- package/dist/components/form/PinInput.js +2 -2
- package/dist/components/form/RadioGroup.js +2 -2
- package/dist/components/form/RadioInput.js +2 -2
- package/dist/components/form/useForm.d.ts +2 -1
- package/dist/components/form/useForm.js +27 -18
- package/dist/components/menu/Menu.js +2 -2
- package/dist/components/quote/Quote.js +32 -36
- package/dist/components/row/Row.js +10 -9
- package/dist/components/scroll-area/ScrollArea.js +18 -17
- package/dist/components/segmented-control/SegmentedControl.js +12 -11
- package/dist/components/spacing/Spacing.d.ts +6 -0
- package/dist/components/spacing/Spacing.js +23 -0
- package/dist/components/tab/Tab.d.ts +11 -0
- package/dist/components/tab/Tab.js +40 -0
- package/dist/components/text/Text.js +2 -2
- package/dist/components/toast/Toast.d.ts +13 -0
- package/dist/components/toast/Toast.js +62 -0
- package/dist/components/tooltip/Tooltip.js +10 -9
- package/dist/index.d.ts +8 -0
- package/dist/index.js +238 -210
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +14 -0
- package/dist/node_modules/react/compiler-runtime.js +10 -0
- package/dist/utils/arrayService.d.ts +2 -2
- package/dist/utils/contextStore.js +1 -1
- package/dist/utils/generics.js +88 -89
- package/dist/utils/reactiveArrayService.d.ts +3 -3
- package/dist/utils/reactiveArrayService.js +52 -42
- package/dist/utils/types.d.ts +2 -2
- package/package.json +31 -30
- package/dist/DFlowDataType.service-Dz8pQUeO.js +0 -793
- package/dist/assets/Avatar.css +0 -1
- package/dist/assets/Badge.css +0 -1
- package/dist/assets/Button.css +0 -1
- package/dist/assets/Card.css +0 -1
- package/dist/assets/Command.css +0 -1
- package/dist/assets/DFlowFolder.css +0 -1
- package/dist/assets/DFlowFunctionDefaultCard.css +0 -1
- package/dist/assets/DFlowInputDataType.css +0 -1
- package/dist/assets/DFlowMiniMap.css +0 -1
- package/dist/assets/DFlowValidation.css +0 -1
- package/dist/assets/DLayout.css +0 -1
- package/dist/assets/DResizable.css +0 -1
- package/dist/assets/Dialog.css +0 -1
- package/dist/assets/FileTabs.css +0 -1
- package/dist/assets/Input.css +0 -1
- package/dist/assets/Menu.css +0 -1
- package/dist/assets/SegmentedControl.css +0 -1
- package/dist/assets/Text.css +0 -1
- package/dist/assets/Tooltip.css +0 -1
- package/dist/compiler-runtime-BNHg76kC.js +0 -36
- package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +0 -8
- package/dist/components/d-namespace/license/DNamespaceLicense.service.js +0 -11
- package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +0 -9
- package/dist/components/d-namespace/member/DNamespaceMember.service.js +0 -11
- package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +0 -9
- package/dist/components/d-namespace/project/DNamespaceProject.service.js +0 -11
- package/dist/components/d-namespace/project/DNamespaceProjectCard.js +0 -57
- package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +0 -10
- package/dist/components/d-namespace/role/DNamespaceRole.service.js +0 -11
- /package/dist/assets/{Breadcrumb.css → components/breadcrumb/Breadcrumb.style.css} +0 -0
- /package/dist/assets/{ButtonGroup.css → components/button-group/ButtonGroup.style.css} +0 -0
- /package/dist/assets/{Col.css → components/col/Col.style.css} +0 -0
- /package/dist/assets/{Container.css → components/container/Container.style.css} +0 -0
- /package/dist/assets/{DFlowSuggestionSearchInput.css → components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css} +0 -0
- /package/dist/assets/{DFullScreen.css → components/d-fullscreen/DFullScreen.style.css} +0 -0
- /package/dist/assets/{Flex.css → components/flex/Flex.style.css} +0 -0
- /package/dist/assets/{Quote.css → components/quote/Quote.style.css} +0 -0
- /package/dist/assets/{Row.css → components/row/Row.style.css} +0 -0
- /package/dist/components/{d-namespace/license → d-license}/DNamespaceLicense.view.d.ts +0 -0
- /package/dist/components/{d-namespace/license → d-license}/DNamespaceLicense.view.js +0 -0
- /package/dist/components/{d-namespace/role → d-role}/DNamespaceRole.view.d.ts +0 -0
- /package/dist/components/{d-namespace/role → d-role}/DNamespaceRole.view.js +0 -0
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useStore as h, useReactFlow as
|
|
2
|
+
import { useStore as h, useReactFlow as j, useStoreApi as B, Handle as I, Position as u } from "@xyflow/react";
|
|
3
3
|
import { NodeFunctionView as b } from "../DFlow.view.js";
|
|
4
|
-
import { memo as
|
|
4
|
+
import { memo as G } from "react";
|
|
5
5
|
import { Card as H } from "../../card/Card.js";
|
|
6
|
+
import '../../../assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css';/* empty css */
|
|
6
7
|
import C from "../../card/CardSection.js";
|
|
7
8
|
import { Flex as s } from "../../flex/Flex.js";
|
|
8
|
-
import { IconFileLambdaFilled as
|
|
9
|
-
import { Text as
|
|
10
|
-
import { Button as
|
|
11
|
-
import { Menu as
|
|
12
|
-
import { Badge as
|
|
9
|
+
import { IconFileLambdaFilled as V, IconDots as W, IconTrash as k, IconCopy as $, IconChevronDown as X, IconExclamationCircle as Y, IconAlertTriangle as q, IconMessageExclamation as J, IconArrowRightCircle as K } from "@tabler/icons-react";
|
|
10
|
+
import { Text as D } from "../../text/Text.js";
|
|
11
|
+
import { Button as R } from "../../button/Button.js";
|
|
12
|
+
import { Menu as Q, MenuTrigger as U, MenuPortal as Z, MenuContent as ee, MenuLabel as te, MenuItem as T } from "../../menu/Menu.js";
|
|
13
|
+
import { Badge as x } from "../../badge/Badge.js";
|
|
13
14
|
import { useService as g } from "../../../utils/contextStore.js";
|
|
14
|
-
import { DFlowFunctionReactiveService as
|
|
15
|
-
import { useFunctionValidation as
|
|
16
|
-
import {
|
|
15
|
+
import { DFlowFunctionReactiveService as ie } from "./DFlowFunction.service.js";
|
|
16
|
+
import { useFunctionValidation as ne } from "./DFlowFunction.vaildation.hook.js";
|
|
17
|
+
import { DFlowDataTypeReactiveService as oe } from "../data-type/DFlowDataType.service.js";
|
|
17
18
|
import { InspectionSeverity as c } from "../../../utils/inspection.js";
|
|
18
|
-
import { DFlowReactiveService as
|
|
19
|
-
import { DFlowSuggestionMenu as
|
|
20
|
-
import { useSuggestions as
|
|
21
|
-
import { FileTabsService as
|
|
22
|
-
import { DFlowTabDefault as
|
|
23
|
-
|
|
24
|
-
import '../../../assets/DFlowFunctionDefaultCard.css';const Ee = V((d) => {
|
|
19
|
+
import { DFlowReactiveService as re } from "../DFlow.service.js";
|
|
20
|
+
import { DFlowSuggestionMenu as ae } from "../suggestion/DFlowSuggestionMenu.js";
|
|
21
|
+
import { useSuggestions as le } from "../suggestion/DFlowSuggestion.hook.js";
|
|
22
|
+
import { FileTabsService as de } from "../../file-tabs/FileTabs.service.js";
|
|
23
|
+
import { DFlowTabDefault as se } from "../tab/DFlowTabDefault.js";
|
|
24
|
+
const Me = G((d) => {
|
|
25
25
|
const {
|
|
26
26
|
data: i,
|
|
27
27
|
id: m
|
|
28
|
-
} = d,
|
|
28
|
+
} = d, N = h((e) => e.width), A = h((e) => e.height), F = j(), z = B(), v = g(de), S = g(re), _ = g(ie), w = g(oe), f = _.getById(i.instance.functionDefinition?.id), r = ne(f, i.instance.parameters.map((e) => e.value instanceof b ? e.value.json() : e.value), w, d.data.flowId), M = h((e) => e.edges), E = d.width ?? 0, P = d.height ?? 0;
|
|
29
29
|
i.instance.parameters?.forEach((e) => {
|
|
30
30
|
const a = f?.parameterDefinitions.find((n) => n.id == e?.id);
|
|
31
31
|
e.validationResults = r ? r.filter((n) => n.parameterId === a?.id) : [];
|
|
32
32
|
});
|
|
33
|
-
function
|
|
34
|
-
return
|
|
33
|
+
function L(e) {
|
|
34
|
+
return M.some((a) => a.target === m && a.targetHandle === `param-${e}`);
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const O = h((e) => {
|
|
37
37
|
const a = e.nodes.filter((l) => l.parentId === d.parentId);
|
|
38
38
|
let n;
|
|
39
39
|
return a.forEach((l) => {
|
|
40
|
-
const
|
|
41
|
-
(!n ||
|
|
40
|
+
const y = l.data?.index ?? 1 / 0, p = n?.data?.index ?? 1 / 0;
|
|
41
|
+
(!n || y < p) && (n = l);
|
|
42
42
|
}), n;
|
|
43
43
|
});
|
|
44
|
-
return /* @__PURE__ */ o(H, { outline:
|
|
45
|
-
|
|
46
|
-
x:
|
|
44
|
+
return /* @__PURE__ */ o(H, { paddingSize: "xs", outline: O.id === m, borderColor: v.getActiveTab()?.id == m ? "info" : void 0, className: v.getActiveTab()?.id == m ? "d-flow-viewport-default-card--active" : void 0, color: (r?.filter((e) => e.type === c.ERROR)?.length ?? 0) > 0 ? "error" : "primary", onClick: () => {
|
|
45
|
+
F.setViewport({
|
|
46
|
+
x: N / 2 + d.positionAbsoluteX * -1 - E / 2,
|
|
47
47
|
y: A / 2 + d.positionAbsoluteY * -1 - P / 2,
|
|
48
48
|
zoom: 1
|
|
49
49
|
}, {
|
|
@@ -52,25 +52,25 @@ import '../../../assets/DFlowFunctionDefaultCard.css';const Ee = V((d) => {
|
|
|
52
52
|
id: m,
|
|
53
53
|
active: !0,
|
|
54
54
|
closeable: !0,
|
|
55
|
-
children: /* @__PURE__ */ t(
|
|
56
|
-
content: /* @__PURE__ */ t(
|
|
55
|
+
children: /* @__PURE__ */ t(D, { size: "md", children: f?.names?.nodes[0]?.content }),
|
|
56
|
+
content: /* @__PURE__ */ t(se, { flowId: d.data.flowId, depthLevel: i.depth, scopeLevel: i.scope, nodeLevel: i.index, functionInstance: i.instance })
|
|
57
57
|
});
|
|
58
58
|
}, style: {
|
|
59
59
|
position: "relative"
|
|
60
60
|
}, children: [
|
|
61
61
|
/* @__PURE__ */ t(C, { border: !0, children: /* @__PURE__ */ o(s, { align: "center", justify: "space-between", style: {
|
|
62
|
-
gap: "
|
|
62
|
+
gap: "1.3rem"
|
|
63
63
|
}, children: [
|
|
64
64
|
/* @__PURE__ */ o(s, { align: "center", style: {
|
|
65
65
|
gap: "0.7rem"
|
|
66
66
|
}, children: [
|
|
67
|
-
/* @__PURE__ */ t(
|
|
68
|
-
/* @__PURE__ */ t(
|
|
67
|
+
/* @__PURE__ */ t(V, { size: 16 }),
|
|
68
|
+
/* @__PURE__ */ t(D, { size: "md", children: f?.names?.nodes[0]?.content })
|
|
69
69
|
] }),
|
|
70
70
|
/* @__PURE__ */ o(s, { align: "center", style: {
|
|
71
71
|
gap: "0.7rem"
|
|
72
72
|
}, children: [
|
|
73
|
-
/* @__PURE__ */ o(
|
|
73
|
+
/* @__PURE__ */ o(Q, { onOpenChange: (e) => {
|
|
74
74
|
setTimeout(() => {
|
|
75
75
|
z.setState({
|
|
76
76
|
nodesDraggable: !e,
|
|
@@ -79,22 +79,22 @@ import '../../../assets/DFlowFunctionDefaultCard.css';const Ee = V((d) => {
|
|
|
79
79
|
});
|
|
80
80
|
}, 250);
|
|
81
81
|
}, children: [
|
|
82
|
-
/* @__PURE__ */ t(
|
|
83
|
-
/* @__PURE__ */ t(
|
|
84
|
-
/* @__PURE__ */ t(
|
|
85
|
-
/* @__PURE__ */ o(
|
|
86
|
-
i.instance.deleteNextNode(),
|
|
82
|
+
/* @__PURE__ */ t(U, { asChild: !0, children: /* @__PURE__ */ t(R, { p: "0", variant: "none", children: /* @__PURE__ */ t(W, { size: 16 }) }) }),
|
|
83
|
+
/* @__PURE__ */ t(Z, { children: /* @__PURE__ */ o(ee, { children: [
|
|
84
|
+
/* @__PURE__ */ t(te, { children: "Actions" }),
|
|
85
|
+
/* @__PURE__ */ o(T, { onClick: () => {
|
|
86
|
+
i.instance.deleteNextNode(), S.update();
|
|
87
87
|
}, children: [
|
|
88
|
-
/* @__PURE__ */ t(
|
|
88
|
+
/* @__PURE__ */ t(k, { size: 16 }),
|
|
89
89
|
" Delete node"
|
|
90
90
|
] }),
|
|
91
|
-
/* @__PURE__ */ o(
|
|
92
|
-
/* @__PURE__ */ t(
|
|
91
|
+
/* @__PURE__ */ o(T, { disabled: !0, children: [
|
|
92
|
+
/* @__PURE__ */ t($, { size: 16 }),
|
|
93
93
|
" Copy node"
|
|
94
94
|
] })
|
|
95
95
|
] }) })
|
|
96
96
|
] }),
|
|
97
|
-
/* @__PURE__ */ t(
|
|
97
|
+
/* @__PURE__ */ t(R, { p: "0", variant: "none", disabled: !0, children: /* @__PURE__ */ t(X, { size: 16 }) })
|
|
98
98
|
] })
|
|
99
99
|
] }) }),
|
|
100
100
|
/* @__PURE__ */ t(I, { isConnectable: !1, draggable: !1, type: "target", className: "d-flow-viewport-default-card__handle d-flow-viewport-default-card__handle--target", style: {
|
|
@@ -107,41 +107,41 @@ import '../../../assets/DFlowFunctionDefaultCard.css';const Ee = V((d) => {
|
|
|
107
107
|
(r?.length ?? 0) > 0 ? /* @__PURE__ */ t("div", { className: "d-flow-viewport-default-card__inspection", children: /* @__PURE__ */ o(s, { style: {
|
|
108
108
|
gap: "0.35rem"
|
|
109
109
|
}, children: [
|
|
110
|
-
(r?.filter((e) => e.type === c.ERROR)?.length ?? 0) > 0 ? /* @__PURE__ */ t(
|
|
110
|
+
(r?.filter((e) => e.type === c.ERROR)?.length ?? 0) > 0 ? /* @__PURE__ */ t(x, { color: "error", children: /* @__PURE__ */ o(s, { align: "center", style: {
|
|
111
111
|
gap: "0.35rem"
|
|
112
112
|
}, children: [
|
|
113
|
-
/* @__PURE__ */ t(
|
|
113
|
+
/* @__PURE__ */ t(Y, { size: 12 }),
|
|
114
114
|
r?.filter((e) => e.type === c.ERROR)?.length
|
|
115
115
|
] }) }) : null,
|
|
116
|
-
(r?.filter((e) => e.type === c.WARNING)?.length ?? 0) > 0 ? /* @__PURE__ */ t(
|
|
116
|
+
(r?.filter((e) => e.type === c.WARNING)?.length ?? 0) > 0 ? /* @__PURE__ */ t(x, { color: "warning", children: /* @__PURE__ */ o(s, { align: "center", style: {
|
|
117
117
|
gap: "0.35rem"
|
|
118
118
|
}, children: [
|
|
119
|
-
/* @__PURE__ */ t(
|
|
119
|
+
/* @__PURE__ */ t(q, { size: 12 }),
|
|
120
120
|
r?.filter((e) => e.type === c.WARNING)?.length
|
|
121
121
|
] }) }) : null,
|
|
122
|
-
(r?.filter((e) => e.type === c.GRAMMAR)?.length ?? 0) > 0 ? /* @__PURE__ */ t(
|
|
122
|
+
(r?.filter((e) => e.type === c.GRAMMAR)?.length ?? 0) > 0 ? /* @__PURE__ */ t(x, { children: /* @__PURE__ */ o(s, { align: "center", style: {
|
|
123
123
|
gap: "0.35rem"
|
|
124
124
|
}, children: [
|
|
125
|
-
/* @__PURE__ */ t(
|
|
125
|
+
/* @__PURE__ */ t(J, { size: 12 }),
|
|
126
126
|
r?.filter((e) => e.type === c.GRAMMAR)?.length
|
|
127
127
|
] }) }) : null
|
|
128
128
|
] }) }) : null,
|
|
129
129
|
i.instance.parameters?.some((e) => {
|
|
130
|
-
const a = f?.parameterDefinitions.find((l) => l.id == e.id), n =
|
|
130
|
+
const a = f?.parameterDefinitions.find((l) => l.id == e.id), n = w.getDataType(a?.dataTypeIdentifier)?.variant === "NODE";
|
|
131
131
|
return e.value instanceof b && !n || !e.value;
|
|
132
|
-
}) ? /* @__PURE__ */ t(C, { children: i.instance.parameters?.map((e, a) => {
|
|
133
|
-
const n = f?.parameterDefinitions.find((p) => p.id == e.id), l =
|
|
132
|
+
}) ? /* @__PURE__ */ t(C, { border: !0, children: i.instance.parameters?.map((e, a) => {
|
|
133
|
+
const n = f?.parameterDefinitions.find((p) => p.id == e.id), l = w.getDataType(n?.dataTypeIdentifier)?.variant === "NODE", y = le(n?.dataTypeIdentifier ?? void 0, [], d.data.flowId, i.depth, i.scope, i.index);
|
|
134
134
|
return e.value instanceof b && !l || !e.value ? /* @__PURE__ */ o(s, { pos: "relative", justify: "space-between", align: "center", children: [
|
|
135
|
-
n?.names?.nodes[0]?.content ?? e.id,
|
|
136
|
-
e.value ? null : /* @__PURE__ */ t(
|
|
137
|
-
e.value = p.value,
|
|
138
|
-
}, suggestions:
|
|
135
|
+
/* @__PURE__ */ t(D, { size: "xs", hierarchy: "tertiary", children: n?.names?.nodes[0]?.content ?? e.id }),
|
|
136
|
+
e.value ? null : /* @__PURE__ */ t(ae, { onSuggestionSelect: (p) => {
|
|
137
|
+
e.value = p.value, S.update();
|
|
138
|
+
}, suggestions: y, triggerContent: /* @__PURE__ */ t(R, { p: "0", variant: "none", children: /* @__PURE__ */ t(K, { size: 16 }) }) }),
|
|
139
139
|
/* @__PURE__ */ t(I, { type: "target", position: u.Right, style: {
|
|
140
140
|
position: "absolute",
|
|
141
141
|
transform: l ? "translate(-50%, -50%)" : "translate(50%, -50%)",
|
|
142
142
|
top: "50%",
|
|
143
143
|
right: l ? "50%" : "0"
|
|
144
|
-
}, id: `param-${e.id}`, isConnectable: !1, hidden: !
|
|
144
|
+
}, id: `param-${e.id}`, isConnectable: !1, hidden: !L(e.id), className: "d-flow-viewport-default-card__handle d-flow-viewport-default-card__handle--target" }, e.id)
|
|
145
145
|
] }, a) : null;
|
|
146
146
|
}) }) : null,
|
|
147
147
|
/* @__PURE__ */ t(I, { isConnectable: !1, type: "source", style: {
|
|
@@ -154,5 +154,5 @@ import '../../../assets/DFlowFunctionDefaultCard.css';const Ee = V((d) => {
|
|
|
154
154
|
] });
|
|
155
155
|
});
|
|
156
156
|
export {
|
|
157
|
-
|
|
157
|
+
Me as DFlowFunctionDefaultCard
|
|
158
158
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as w, jsxs as C } from "react/jsx-runtime";
|
|
2
|
-
import { c as E } from "../../../compiler-runtime
|
|
2
|
+
import { c as E } from "../../../_virtual/compiler-runtime.js";
|
|
3
3
|
import { memo as F } from "react";
|
|
4
4
|
import { useStore as N, Handle as g, Position as x } from "@xyflow/react";
|
|
5
5
|
import { FLOW_EDGE_RAINBOW as b } from "../DFlow.edges.hook.js";
|
|
@@ -13,7 +13,7 @@ const b = m((o) => {
|
|
|
13
13
|
return /* @__PURE__ */ n(v, { onSuggestionSelect: (a) => {
|
|
14
14
|
const e = new g(a.value);
|
|
15
15
|
o.data.parentFunction ? o.data.parentFunction.nextNodeId = e.id : t && (t.startingNodeId = e.id), t?.addNode(e), i.update();
|
|
16
|
-
}, suggestions: r, triggerContent: /* @__PURE__ */ d(c, {
|
|
16
|
+
}, suggestions: r, triggerContent: /* @__PURE__ */ d(c, { paddingSize: "xxs", variant: "normal", color: "secondary", children: [
|
|
17
17
|
/* @__PURE__ */ n(s, { isConnectable: !1, draggable: !1, type: "target", className: "d-flow-viewport-default-card__handle d-flow-viewport-default-card__handle--target", style: {
|
|
18
18
|
top: "2px"
|
|
19
19
|
}, position: l.Top }),
|
|
@@ -1,97 +1,93 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { memo as
|
|
4
|
-
import { useReactFlow as
|
|
5
|
-
import { Text as
|
|
6
|
-
import { useService as
|
|
7
|
-
import { FileTabsService as
|
|
8
|
-
import { Card as
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
1
|
+
import { jsx as o, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { c as j } from "../../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { memo as X } from "react";
|
|
4
|
+
import { useReactFlow as Y, useStore as D, Handle as k, Position as H } from "@xyflow/react";
|
|
5
|
+
import { Text as I } from "../../text/Text.js";
|
|
6
|
+
import { useService as R } from "../../../utils/contextStore.js";
|
|
7
|
+
import { FileTabsService as N } from "../../file-tabs/FileTabs.service.js";
|
|
8
|
+
import { Card as E } from "../../card/Card.js";
|
|
9
|
+
import { Flex as v } from "../../flex/Flex.js";
|
|
10
|
+
import { IconBolt as P, IconChevronDown as V } from "@tabler/icons-react";
|
|
11
|
+
import { Button as W } from "../../button/Button.js";
|
|
12
|
+
import { DFlowTabTrigger as $ } from "../tab/DFlowTabTrigger.js";
|
|
13
|
+
import { DFlowTypeReactiveService as q } from "../type/DFlowType.service.js";
|
|
13
14
|
import { Badge as G } from "../../badge/Badge.js";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
y: F / 2 + t.positionAbsoluteY * -1 - x / 2,
|
|
15
|
+
const se = X((t) => {
|
|
16
|
+
const e = j.c(31), {
|
|
17
|
+
data: i,
|
|
18
|
+
id: s
|
|
19
|
+
} = t, a = R(N), S = Y(), x = R(q);
|
|
20
|
+
let m;
|
|
21
|
+
e[0] !== i.instance.type?.id || e[1] !== x ? (m = x.getById(i.instance.type?.id), e[0] = i.instance.type?.id, e[1] = x, e[2] = m) : m = e[2];
|
|
22
|
+
const c = m, T = t.width ?? 0, A = t.height ?? 0, z = D(J), F = D(K);
|
|
23
|
+
let d, f;
|
|
24
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
25
|
+
flexDirection: "column",
|
|
26
|
+
gap: "0.35rem"
|
|
27
|
+
}, f = /* @__PURE__ */ o(G, { color: "primary", children: "START" }), e[3] = d, e[4] = f) : (d = e[3], f = e[4]);
|
|
28
|
+
const B = a.getActiveTab()?.id == s ? "d-flow-viewport-default-card--active" : void 0;
|
|
29
|
+
let n;
|
|
30
|
+
e[5] !== i.instance || e[6] !== c?.names?.nodes || e[7] !== a || e[8] !== S || e[9] !== A || e[10] !== s || e[11] !== t.positionAbsoluteX || e[12] !== t.positionAbsoluteY || e[13] !== F || e[14] !== z || e[15] !== T ? (n = () => {
|
|
31
|
+
S.setViewport({
|
|
32
|
+
x: z / 2 + t.positionAbsoluteX * -1 - T / 2,
|
|
33
|
+
y: F / 2 + t.positionAbsoluteY * -1 - A / 2,
|
|
34
34
|
zoom: 1
|
|
35
35
|
}, {
|
|
36
36
|
duration: 250
|
|
37
|
-
}),
|
|
38
|
-
id:
|
|
37
|
+
}), a.add({
|
|
38
|
+
id: s,
|
|
39
39
|
active: !0,
|
|
40
40
|
closeable: !0,
|
|
41
|
-
children: /* @__PURE__ */ o(
|
|
42
|
-
content: /* @__PURE__ */ o(
|
|
41
|
+
children: /* @__PURE__ */ o(I, { size: "md", children: c?.names?.nodes[0]?.content }),
|
|
42
|
+
content: /* @__PURE__ */ o($, { instance: i.instance })
|
|
43
43
|
});
|
|
44
|
-
}, e[
|
|
45
|
-
let h;
|
|
46
|
-
e[16] === Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
47
|
-
gap: "0.35rem"
|
|
48
|
-
}, e[16] = h) : h = e[16];
|
|
44
|
+
}, e[5] = i.instance, e[6] = c?.names?.nodes, e[7] = a, e[8] = S, e[9] = A, e[10] = s, e[11] = t.positionAbsoluteX, e[12] = t.positionAbsoluteY, e[13] = F, e[14] = z, e[15] = T, e[16] = n) : n = e[16];
|
|
49
45
|
let p;
|
|
50
46
|
e[17] === Symbol.for("react.memo_cache_sentinel") ? (p = {
|
|
51
|
-
gap: "
|
|
47
|
+
gap: "1.3rem"
|
|
52
48
|
}, e[17] = p) : p = e[17];
|
|
53
|
-
let
|
|
54
|
-
e[18] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
] }) }), e[18] = b) : b = e[18];
|
|
49
|
+
let h;
|
|
50
|
+
e[18] === Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
51
|
+
gap: "0.7rem"
|
|
52
|
+
}, e[18] = h) : h = e[18];
|
|
58
53
|
let u;
|
|
59
|
-
e[19] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */
|
|
60
|
-
|
|
61
|
-
/* @__PURE__ */ o(q, { disabled: !0, children: /* @__PURE__ */ o($, { size: 16 }) })
|
|
62
|
-
] }), e[19] = u) : u = e[19];
|
|
63
|
-
let y;
|
|
64
|
-
e[20] === Symbol.for("react.memo_cache_sentinel") ? (y = {
|
|
65
|
-
borderRadius: "calc(1rem - 0.35rem)"
|
|
66
|
-
}, e[20] = y) : y = e[20];
|
|
67
|
-
const B = i?.names?.nodes[0]?.content ?? i?.id;
|
|
54
|
+
e[19] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ o(P, { size: 16 }), e[19] = u) : u = e[19];
|
|
55
|
+
const C = c?.names?.nodes[0]?.content ?? c?.id;
|
|
68
56
|
let l;
|
|
69
|
-
e[
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
let
|
|
74
|
-
e[
|
|
57
|
+
e[20] !== C ? (l = /* @__PURE__ */ _(v, { style: h, align: "center", children: [
|
|
58
|
+
u,
|
|
59
|
+
/* @__PURE__ */ o(I, { display: "block", size: "md", children: C })
|
|
60
|
+
] }), e[20] = C, e[21] = l) : l = e[21];
|
|
61
|
+
let b;
|
|
62
|
+
e[22] === Symbol.for("react.memo_cache_sentinel") ? (b = {
|
|
63
|
+
gap: "0.7rem"
|
|
64
|
+
}, e[22] = b) : b = e[22];
|
|
65
|
+
let y;
|
|
66
|
+
e[23] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ o(v, { align: "center", style: b, children: /* @__PURE__ */ o(W, { p: "0", paddingSize: "xxs", variant: "none", disabled: !0, children: /* @__PURE__ */ o(V, { size: 16 }) }) }), e[23] = y) : y = e[23];
|
|
67
|
+
let r;
|
|
68
|
+
e[24] !== l ? (r = /* @__PURE__ */ _(v, { style: p, align: "center", justify: "space-between", children: [
|
|
75
69
|
l,
|
|
76
|
-
|
|
77
|
-
] })
|
|
78
|
-
let
|
|
79
|
-
e[
|
|
70
|
+
y
|
|
71
|
+
] }), e[24] = l, e[25] = r) : r = e[25];
|
|
72
|
+
let g;
|
|
73
|
+
e[26] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ o(k, { isConnectable: !1, type: "source", style: {
|
|
80
74
|
bottom: "2px"
|
|
81
|
-
}, className: "d-flow-viewport-default-card__handle d-flow-viewport-default-card__handle--source", position:
|
|
82
|
-
let
|
|
83
|
-
return e[
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
75
|
+
}, className: "d-flow-viewport-default-card__handle d-flow-viewport-default-card__handle--source", position: H.Bottom }), e[26] = g) : g = e[26];
|
|
76
|
+
let w;
|
|
77
|
+
return e[27] !== r || e[28] !== B || e[29] !== n ? (w = /* @__PURE__ */ _(v, { align: "center", style: d, children: [
|
|
78
|
+
f,
|
|
79
|
+
/* @__PURE__ */ _(E, { variant: "normal", color: "success", paddingSize: "xs", className: B, onClick: n, children: [
|
|
80
|
+
r,
|
|
81
|
+
g
|
|
82
|
+
] })
|
|
83
|
+
] }), e[27] = r, e[28] = B, e[29] = n, e[30] = w) : w = e[30], w;
|
|
88
84
|
});
|
|
89
|
-
function
|
|
85
|
+
function J(t) {
|
|
90
86
|
return t.width;
|
|
91
87
|
}
|
|
92
|
-
function
|
|
88
|
+
function K(t) {
|
|
93
89
|
return t.height;
|
|
94
90
|
}
|
|
95
91
|
export {
|
|
96
|
-
|
|
92
|
+
se as DFlowFunctionTriggerCard
|
|
97
93
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FlowSettingView as r, FlowView as t, NodeFunctionView as i, NodeParameterView as w } from "./DFlow.view.js";
|
|
2
2
|
import { DFlowReactiveService as l } from "./DFlow.service.js";
|
|
3
|
-
import { FLOW_EDGE_RAINBOW as m, useFlowEdges as
|
|
3
|
+
import { FLOW_EDGE_RAINBOW as m, useFlowEdges as f } from "./DFlow.edges.hook.js";
|
|
4
4
|
import { useFlowNodes as a } from "./DFlow.nodes.hook.js";
|
|
5
5
|
import { DFlow as x } from "./DFlow.js";
|
|
6
|
-
import { DFlowControl as
|
|
7
|
-
import {
|
|
8
|
-
import { DataTypeView as
|
|
6
|
+
import { DFlowControl as u } from "./control/DFlowControl.js";
|
|
7
|
+
import { DFlowDataTypeReactiveService as V } from "./data-type/DFlowDataType.service.js";
|
|
8
|
+
import { DataTypeView as s } from "./data-type/DFlowDataType.view.js";
|
|
9
9
|
import { DFlowFolder as g, DFlowFolderGroup as R, DFlowFolderItem as y } from "./folder/DFlowFolder.js";
|
|
10
10
|
import { DFlowFunctionReactiveService as N } from "./function/DFlowFunction.service.js";
|
|
11
11
|
import { FunctionDefinitionView as G, ParameterDefinitionView as I } from "./function/DFlowFunction.view.js";
|
|
@@ -18,8 +18,8 @@ import { useDFlowValidations as k } from "./validation/DFlowValidation.hook.js";
|
|
|
18
18
|
import { DFlowValidation as z } from "./validation/DFlowValidation.js";
|
|
19
19
|
export {
|
|
20
20
|
x as DFlow,
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
u as DFlowControl,
|
|
22
|
+
V as DFlowDataTypeReactiveService,
|
|
23
23
|
g as DFlowFolder,
|
|
24
24
|
R as DFlowFolderGroup,
|
|
25
25
|
y as DFlowFolderItem,
|
|
@@ -31,7 +31,7 @@ export {
|
|
|
31
31
|
B as DFlowSuggestionType,
|
|
32
32
|
L as DFlowTypeReactiveService,
|
|
33
33
|
z as DFlowValidation,
|
|
34
|
-
|
|
34
|
+
s as DataTypeView,
|
|
35
35
|
m as FLOW_EDGE_RAINBOW,
|
|
36
36
|
r as FlowSettingView,
|
|
37
37
|
h as FlowTypeView,
|
|
@@ -41,6 +41,6 @@ export {
|
|
|
41
41
|
w as NodeParameterView,
|
|
42
42
|
I as ParameterDefinitionView,
|
|
43
43
|
k as useDFlowValidations,
|
|
44
|
-
|
|
44
|
+
f as useFlowEdges,
|
|
45
45
|
a as useFlowNodes
|
|
46
46
|
};
|