@duxweb/dvha-pro 1.0.45 → 1.0.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/cjs/component.cjs +1 -1
- package/dist/cjs/components/chart/echart.cjs +1 -1
- package/dist/cjs/components/crop/imageCrop.cjs +1 -1
- package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
- package/dist/cjs/components/data/selectModal.cjs +1 -1
- package/dist/cjs/components/designEditor/components/grid.cjs +1 -1
- package/dist/cjs/components/designEditor/editor/setting.cjs +1 -1
- package/dist/cjs/components/flowEditor/components/jsonEditor.cjs +1 -0
- package/dist/cjs/components/flowEditor/components/nodeCard.cjs +1 -0
- package/dist/cjs/components/flowEditor/components/setting.cjs +1 -0
- package/dist/cjs/components/flowEditor/components/toolbar.cjs +1 -0
- package/dist/cjs/components/flowEditor/flowEditor.cjs +1 -0
- package/dist/cjs/components/flowEditor/nodes/endNode.cjs +1 -0
- package/dist/cjs/components/flowEditor/nodes/index.cjs +1 -0
- package/dist/cjs/components/flowEditor/nodes/processNode.cjs +1 -0
- package/dist/cjs/components/flowEditor/nodes/startNode.cjs +1 -0
- package/dist/cjs/components/flowEditor/utils/nodeDataUtils.cjs +1 -0
- package/dist/cjs/components/form/drawerForm.cjs +1 -1
- package/dist/cjs/components/form/modalForm.cjs +1 -1
- package/dist/cjs/components/form/pageForm.cjs +1 -1
- package/dist/cjs/components/form/pageTabForm.cjs +1 -1
- package/dist/cjs/components/form/settingForm.cjs +1 -1
- package/dist/cjs/components/formEditor/base/base.cjs +1 -1
- package/dist/cjs/components/formEditor/base/setting.cjs +1 -1
- package/dist/cjs/components/formEditor/components/cascader.cjs +1 -1
- package/dist/cjs/components/formEditor/components/cascaderAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/checkbox.cjs +1 -1
- package/dist/cjs/components/formEditor/components/color.cjs +1 -1
- package/dist/cjs/components/formEditor/components/date.cjs +1 -1
- package/dist/cjs/components/formEditor/components/dynamicInput.cjs +1 -1
- package/dist/cjs/components/formEditor/components/dynamicTags.cjs +1 -1
- package/dist/cjs/components/formEditor/components/editor.cjs +1 -1
- package/dist/cjs/components/formEditor/components/fileUpload.cjs +1 -1
- package/dist/cjs/components/formEditor/components/imageUpload.cjs +1 -1
- package/dist/cjs/components/formEditor/components/input.cjs +1 -1
- package/dist/cjs/components/formEditor/components/inputNumber.cjs +1 -1
- package/dist/cjs/components/formEditor/components/mentionAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/radio.cjs +1 -1
- package/dist/cjs/components/formEditor/components/region.cjs +1 -1
- package/dist/cjs/components/formEditor/components/select.cjs +1 -1
- package/dist/cjs/components/formEditor/components/selectAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/sider.cjs +1 -1
- package/dist/cjs/components/formEditor/components/switch.cjs +1 -1
- package/dist/cjs/components/formEditor/components/time.cjs +1 -1
- package/dist/cjs/components/formEditor/components/transferAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/treeSelect.cjs +1 -1
- package/dist/cjs/components/formEditor/components/treeSelectAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/editor.cjs +1 -1
- package/dist/cjs/components/formEditor/renderer.cjs +1 -1
- package/dist/cjs/components/icon/icon.cjs +1 -1
- package/dist/cjs/components/layout/list.cjs +1 -1
- package/dist/cjs/components/layout/table.cjs +1 -1
- package/dist/cjs/components/layout/tools.cjs +1 -1
- package/dist/cjs/components/level/level.cjs +1 -1
- package/dist/cjs/components/list/card.cjs +1 -1
- package/dist/cjs/components/list/list.cjs +1 -1
- package/dist/cjs/components/posterEditor/pages/RightPanel.cjs +1 -1
- package/dist/cjs/components/posterEditor/posterEditor.cjs +1 -1
- package/dist/cjs/components/table/table.cjs +1 -1
- package/dist/cjs/components/table/tablePage.cjs +1 -1
- package/dist/cjs/components/upload/file.cjs +1 -1
- package/dist/cjs/components/upload/image.cjs +1 -1
- package/dist/cjs/components/upload/manage/item.cjs +1 -1
- package/dist/cjs/components/upload/manager.cjs +1 -1
- package/dist/cjs/dvha-pro.css +1 -1
- package/dist/cjs/hooks/dialog.cjs +1 -1
- package/dist/cjs/hooks/drawer.cjs +1 -1
- package/dist/cjs/hooks/modal.cjs +1 -1
- package/dist/cjs/hooks/table/image.cjs +1 -1
- package/dist/cjs/hooks/table/media.cjs +1 -1
- package/dist/cjs/hooks/table.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/langs/en-US.json.cjs +1 -1
- package/dist/cjs/langs/zh-CN.json.cjs +1 -1
- package/dist/cjs/main.cjs +1 -1
- package/dist/cjs/pages/authLayout.cjs +1 -1
- package/dist/cjs/pages/layout/page.cjs +1 -1
- package/dist/cjs/pages/login.cjs +1 -1
- package/dist/cjs/pages/menu/avatar.cjs +1 -1
- package/dist/cjs/pages/menu/button.cjs +1 -1
- package/dist/cjs/pages/menu/cmd.cjs +1 -1
- package/dist/cjs/pages/menu/main.cjs +1 -1
- package/dist/cjs/pages/menu/mobile.cjs +1 -1
- package/dist/cjs/pages/page404.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +75 -9
- package/dist/esm/component.js +5 -2
- package/dist/esm/components/chart/echart.js +5 -2
- package/dist/esm/components/crop/imageCrop.js +13 -10
- package/dist/esm/components/data/dynamicSelect.js +5 -2
- package/dist/esm/components/data/selectModal.js +5 -2
- package/dist/esm/components/designEditor/components/grid.js +5 -2
- package/dist/esm/components/designEditor/editor/setting.js +7 -4
- package/dist/esm/components/flowEditor/components/jsonEditor.js +53 -0
- package/dist/esm/components/flowEditor/components/nodeCard.js +160 -0
- package/dist/esm/components/flowEditor/components/setting.js +319 -0
- package/dist/esm/components/flowEditor/components/toolbar.js +120 -0
- package/dist/esm/components/flowEditor/flowEditor.js +287 -0
- package/dist/esm/components/flowEditor/nodes/endNode.js +144 -0
- package/dist/esm/components/flowEditor/nodes/index.js +66 -0
- package/dist/esm/components/flowEditor/nodes/processNode.js +142 -0
- package/dist/esm/components/flowEditor/nodes/startNode.js +144 -0
- package/dist/esm/components/flowEditor/utils/nodeDataUtils.js +82 -0
- package/dist/esm/components/form/drawerForm.js +5 -2
- package/dist/esm/components/form/modalForm.js +12 -9
- package/dist/esm/components/form/pageForm.js +21 -18
- package/dist/esm/components/form/pageTabForm.js +5 -2
- package/dist/esm/components/form/settingForm.js +11 -8
- package/dist/esm/components/formEditor/base/base.js +8 -5
- package/dist/esm/components/formEditor/base/setting.js +5 -2
- package/dist/esm/components/formEditor/components/cascader.js +6 -3
- package/dist/esm/components/formEditor/components/cascaderAsync.js +6 -3
- package/dist/esm/components/formEditor/components/checkbox.js +17 -14
- package/dist/esm/components/formEditor/components/color.js +6 -3
- package/dist/esm/components/formEditor/components/date.js +6 -3
- package/dist/esm/components/formEditor/components/dynamicInput.js +6 -3
- package/dist/esm/components/formEditor/components/dynamicTags.js +13 -10
- package/dist/esm/components/formEditor/components/editor.js +6 -3
- package/dist/esm/components/formEditor/components/fileUpload.js +6 -3
- package/dist/esm/components/formEditor/components/imageUpload.js +6 -3
- package/dist/esm/components/formEditor/components/input.js +6 -3
- package/dist/esm/components/formEditor/components/inputNumber.js +29 -26
- package/dist/esm/components/formEditor/components/mentionAsync.js +17 -14
- package/dist/esm/components/formEditor/components/radio.js +17 -14
- package/dist/esm/components/formEditor/components/region.js +19 -16
- package/dist/esm/components/formEditor/components/select.js +6 -3
- package/dist/esm/components/formEditor/components/selectAsync.js +12 -9
- package/dist/esm/components/formEditor/components/sider.js +6 -3
- package/dist/esm/components/formEditor/components/switch.js +22 -19
- package/dist/esm/components/formEditor/components/time.js +6 -3
- package/dist/esm/components/formEditor/components/transferAsync.js +26 -23
- package/dist/esm/components/formEditor/components/treeSelect.js +6 -3
- package/dist/esm/components/formEditor/components/treeSelectAsync.js +26 -23
- package/dist/esm/components/formEditor/editor.js +5 -2
- package/dist/esm/components/formEditor/renderer.js +5 -2
- package/dist/esm/components/icon/icon.js +5 -2
- package/dist/esm/components/layout/list.js +98 -86
- package/dist/esm/components/layout/table.js +125 -117
- package/dist/esm/components/layout/tools.js +109 -32
- package/dist/esm/components/level/level.js +5 -2
- package/dist/esm/components/list/card.js +27 -22
- package/dist/esm/components/list/list.js +16 -11
- package/dist/esm/components/posterEditor/pages/RightPanel.js +5 -2
- package/dist/esm/components/posterEditor/posterEditor.js +5 -2
- package/dist/esm/components/table/table.js +35 -28
- package/dist/esm/components/table/tablePage.js +17 -12
- package/dist/esm/components/upload/file.js +5 -2
- package/dist/esm/components/upload/image.js +18 -15
- package/dist/esm/components/upload/manage/item.js +5 -2
- package/dist/esm/components/upload/manager.js +5 -2
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/dialog.js +5 -2
- package/dist/esm/hooks/drawer.js +5 -2
- package/dist/esm/hooks/modal.js +5 -2
- package/dist/esm/hooks/table/image.js +5 -2
- package/dist/esm/hooks/table/media.js +5 -2
- package/dist/esm/hooks/table.js +25 -19
- package/dist/esm/index.js +252 -226
- package/dist/esm/langs/en-US.json.js +5 -5
- package/dist/esm/langs/zh-CN.json.js +6 -6
- package/dist/esm/main.js +4 -2
- package/dist/esm/pages/authLayout.js +5 -2
- package/dist/esm/pages/layout/page.js +9 -6
- package/dist/esm/pages/login.js +10 -7
- package/dist/esm/pages/menu/avatar.js +18 -15
- package/dist/esm/pages/menu/button.js +8 -5
- package/dist/esm/pages/menu/cmd.js +13 -10
- package/dist/esm/pages/menu/main.js +29 -26
- package/dist/esm/pages/menu/mobile.js +5 -2
- package/dist/esm/pages/page404.js +3 -0
- package/dist/esm/pages/pageStatus.js +5 -2
- package/dist/esm/theme/uno.css.js +75 -9
- package/dist/types/components/flowEditor/components/index.d.ts +3 -0
- package/dist/types/components/flowEditor/components/jsonEditor.d.ts +22 -0
- package/dist/types/components/flowEditor/components/nodeCard.d.ts +112 -0
- package/dist/types/components/flowEditor/components/setting.d.ts +16 -0
- package/dist/types/components/flowEditor/components/toolbar.d.ts +11 -0
- package/dist/types/components/flowEditor/flowEditor.d.ts +68 -0
- package/dist/types/components/flowEditor/index.d.ts +5 -0
- package/dist/types/components/flowEditor/nodes/endNode.d.ts +19 -0
- package/dist/types/components/flowEditor/nodes/index.d.ts +8 -0
- package/dist/types/components/flowEditor/nodes/processNode.d.ts +19 -0
- package/dist/types/components/flowEditor/nodes/startNode.d.ts +19 -0
- package/dist/types/components/flowEditor/types/index.d.ts +62 -0
- package/dist/types/components/flowEditor/utils/nodeDataUtils.d.ts +59 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/layout/list.d.ts +7 -0
- package/dist/types/components/layout/table.d.ts +7 -0
- package/dist/types/components/layout/tools.d.ts +28 -2
- package/dist/types/components/list/card.d.ts +6 -0
- package/dist/types/components/list/list.d.ts +6 -0
- package/dist/types/components/table/tablePage.d.ts +6 -0
- package/dist/types/main.d.ts +2 -0
- package/package.json +9 -3
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { defineComponent as a, createVNode as r } from "vue";
|
|
2
|
+
import { useI18n as s } from "@duxweb/dvha-core";
|
|
3
|
+
import { Position as m } from "@vue-flow/core";
|
|
4
|
+
import { useVModel as c } from "@vueuse/core";
|
|
5
|
+
import { NInput as l } from "naive-ui";
|
|
6
|
+
import "clsx";
|
|
7
|
+
import "vue-echarts";
|
|
8
|
+
import "vue-router";
|
|
9
|
+
import "@overlastic/vue";
|
|
10
|
+
import "dayjs";
|
|
11
|
+
import "mime";
|
|
12
|
+
import "lodash-es";
|
|
13
|
+
import "@tanstack/vue-query";
|
|
14
|
+
import "@duxweb/dvha-naiveui";
|
|
15
|
+
import "pinia";
|
|
16
|
+
import "vue3-ace-editor";
|
|
17
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
18
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
19
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
20
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
21
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
22
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
23
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
24
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
25
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
26
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
27
|
+
import "vue-cropper";
|
|
28
|
+
import "jinrishici";
|
|
29
|
+
import "vue-draggable-plus";
|
|
30
|
+
import "@vee-validate/i18n";
|
|
31
|
+
import "colorizr";
|
|
32
|
+
import "echarts";
|
|
33
|
+
import "highlight.js/lib/core";
|
|
34
|
+
import "highlight.js/lib/languages/bash";
|
|
35
|
+
import "highlight.js/lib/languages/css";
|
|
36
|
+
import "highlight.js/lib/languages/go";
|
|
37
|
+
import "highlight.js/lib/languages/java";
|
|
38
|
+
import "highlight.js/lib/languages/javascript";
|
|
39
|
+
import "highlight.js/lib/languages/json";
|
|
40
|
+
import "highlight.js/lib/languages/markdown";
|
|
41
|
+
import "highlight.js/lib/languages/php";
|
|
42
|
+
import "highlight.js/lib/languages/python";
|
|
43
|
+
import "highlight.js/lib/languages/shell";
|
|
44
|
+
import "highlight.js/lib/languages/sql";
|
|
45
|
+
import "highlight.js/lib/languages/typescript";
|
|
46
|
+
import "highlight.js/lib/languages/xml";
|
|
47
|
+
import "@ant-design/colors";
|
|
48
|
+
import "@unocss/preset-icons/browser";
|
|
49
|
+
import "@unocss/preset-typography";
|
|
50
|
+
import "unocss/preset-wind4";
|
|
51
|
+
import "@vee-validate/i18n/dist/locale/en.json";
|
|
52
|
+
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
53
|
+
import "vee-validate";
|
|
54
|
+
import "vue-command-palette";
|
|
55
|
+
import "../../../pages/page404.js";
|
|
56
|
+
import "short-unique-id";
|
|
57
|
+
import "aieditor";
|
|
58
|
+
import { FlowNodeCard as d } from "../components/nodeCard.js";
|
|
59
|
+
import "@vue-flow/background";
|
|
60
|
+
/* empty css */
|
|
61
|
+
import "@iconify-json/tabler/icons.json";
|
|
62
|
+
import "../../posterEditor/elements/index.js";
|
|
63
|
+
import "fabric";
|
|
64
|
+
import { DuxFormItem as n } from "../../form/formItem.js";
|
|
65
|
+
const u = (o) => {
|
|
66
|
+
const i = (t) => {
|
|
67
|
+
}, e = (t) => {
|
|
68
|
+
};
|
|
69
|
+
return r(d, {
|
|
70
|
+
nodeProps: o,
|
|
71
|
+
handlePosition: {
|
|
72
|
+
source: m.Right,
|
|
73
|
+
target: m.Left
|
|
74
|
+
},
|
|
75
|
+
onClick: i,
|
|
76
|
+
onDoubleClick: e
|
|
77
|
+
}, null);
|
|
78
|
+
}, f = /* @__PURE__ */ a({
|
|
79
|
+
name: "ProcessNodeSetting",
|
|
80
|
+
props: {
|
|
81
|
+
modelValue: {
|
|
82
|
+
type: Object,
|
|
83
|
+
default: () => ({})
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
emits: ["update:modelValue"],
|
|
87
|
+
setup(o, {
|
|
88
|
+
emit: i
|
|
89
|
+
}) {
|
|
90
|
+
const {
|
|
91
|
+
t: e
|
|
92
|
+
} = s(), t = c(o, "modelValue", i);
|
|
93
|
+
return () => r("div", {
|
|
94
|
+
class: "space-y-4"
|
|
95
|
+
}, [r(n, {
|
|
96
|
+
label: e("components.flowEditor.label") || ""
|
|
97
|
+
}, {
|
|
98
|
+
default: () => [r(l, {
|
|
99
|
+
value: t.value.label,
|
|
100
|
+
"onUpdate:value": (p) => t.value.label = p
|
|
101
|
+
}, null)]
|
|
102
|
+
}), r(n, {
|
|
103
|
+
label: e("components.flowEditor.description") || ""
|
|
104
|
+
}, {
|
|
105
|
+
default: () => [r(l, {
|
|
106
|
+
value: t.value.description,
|
|
107
|
+
"onUpdate:value": (p) => t.value.description = p,
|
|
108
|
+
type: "textarea",
|
|
109
|
+
rows: 3,
|
|
110
|
+
placeholder: e("components.flowEditor.descriptionPlaceholder") || ""
|
|
111
|
+
}, null)]
|
|
112
|
+
})]);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
function ko() {
|
|
116
|
+
const {
|
|
117
|
+
t: o
|
|
118
|
+
} = s();
|
|
119
|
+
return {
|
|
120
|
+
meta: {
|
|
121
|
+
name: "process",
|
|
122
|
+
label: o("components.flowEditor.processNode.label") || "",
|
|
123
|
+
description: o("components.flowEditor.processNode.description") || "",
|
|
124
|
+
category: "process",
|
|
125
|
+
nodeType: "process",
|
|
126
|
+
icon: "i-tabler:box",
|
|
127
|
+
color: "primary",
|
|
128
|
+
style: {
|
|
129
|
+
iconBgClass: "bg-blue"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
component: u,
|
|
133
|
+
settingComponent: f,
|
|
134
|
+
multiInput: !0,
|
|
135
|
+
multiOutput: !0
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
export {
|
|
139
|
+
u as ProcessNode,
|
|
140
|
+
f as ProcessNodeSetting,
|
|
141
|
+
ko as getProcessNodeRegistry
|
|
142
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { defineComponent as a, createVNode as r } from "vue";
|
|
2
|
+
import { useI18n as n } from "@duxweb/dvha-core";
|
|
3
|
+
import { Position as s } from "@vue-flow/core";
|
|
4
|
+
import { useVModel as d } from "@vueuse/core";
|
|
5
|
+
import { NInput as m } from "naive-ui";
|
|
6
|
+
import "clsx";
|
|
7
|
+
import "vue-echarts";
|
|
8
|
+
import "vue-router";
|
|
9
|
+
import "@overlastic/vue";
|
|
10
|
+
import "dayjs";
|
|
11
|
+
import "mime";
|
|
12
|
+
import "lodash-es";
|
|
13
|
+
import "@tanstack/vue-query";
|
|
14
|
+
import "@duxweb/dvha-naiveui";
|
|
15
|
+
import "pinia";
|
|
16
|
+
import "vue3-ace-editor";
|
|
17
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
18
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
19
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
20
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
21
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
22
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
23
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
24
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
25
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
26
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
27
|
+
import "vue-cropper";
|
|
28
|
+
import "jinrishici";
|
|
29
|
+
import "vue-draggable-plus";
|
|
30
|
+
import "@vee-validate/i18n";
|
|
31
|
+
import "colorizr";
|
|
32
|
+
import "echarts";
|
|
33
|
+
import "highlight.js/lib/core";
|
|
34
|
+
import "highlight.js/lib/languages/bash";
|
|
35
|
+
import "highlight.js/lib/languages/css";
|
|
36
|
+
import "highlight.js/lib/languages/go";
|
|
37
|
+
import "highlight.js/lib/languages/java";
|
|
38
|
+
import "highlight.js/lib/languages/javascript";
|
|
39
|
+
import "highlight.js/lib/languages/json";
|
|
40
|
+
import "highlight.js/lib/languages/markdown";
|
|
41
|
+
import "highlight.js/lib/languages/php";
|
|
42
|
+
import "highlight.js/lib/languages/python";
|
|
43
|
+
import "highlight.js/lib/languages/shell";
|
|
44
|
+
import "highlight.js/lib/languages/sql";
|
|
45
|
+
import "highlight.js/lib/languages/typescript";
|
|
46
|
+
import "highlight.js/lib/languages/xml";
|
|
47
|
+
import "@ant-design/colors";
|
|
48
|
+
import "@unocss/preset-icons/browser";
|
|
49
|
+
import "@unocss/preset-typography";
|
|
50
|
+
import "unocss/preset-wind4";
|
|
51
|
+
import "@vee-validate/i18n/dist/locale/en.json";
|
|
52
|
+
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
53
|
+
import "vee-validate";
|
|
54
|
+
import "vue-command-palette";
|
|
55
|
+
import "../../../pages/page404.js";
|
|
56
|
+
import "short-unique-id";
|
|
57
|
+
import "aieditor";
|
|
58
|
+
import { FlowNodeCard as c } from "../components/nodeCard.js";
|
|
59
|
+
import "@vue-flow/background";
|
|
60
|
+
/* empty css */
|
|
61
|
+
import "@iconify-json/tabler/icons.json";
|
|
62
|
+
import "../../posterEditor/elements/index.js";
|
|
63
|
+
import "fabric";
|
|
64
|
+
import { DuxFormItem as l } from "../../form/formItem.js";
|
|
65
|
+
function u(t) {
|
|
66
|
+
const i = (o) => {
|
|
67
|
+
}, e = (o) => {
|
|
68
|
+
};
|
|
69
|
+
return r(c, {
|
|
70
|
+
nodeProps: t,
|
|
71
|
+
showTargetHandle: !1,
|
|
72
|
+
color: "success",
|
|
73
|
+
handlePosition: {
|
|
74
|
+
source: s.Right
|
|
75
|
+
},
|
|
76
|
+
onClick: i,
|
|
77
|
+
onDoubleClick: e
|
|
78
|
+
}, null);
|
|
79
|
+
}
|
|
80
|
+
const f = /* @__PURE__ */ a({
|
|
81
|
+
name: "StartNodeSetting",
|
|
82
|
+
props: {
|
|
83
|
+
modelValue: {
|
|
84
|
+
type: Object,
|
|
85
|
+
default: () => ({})
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
emits: ["update:modelValue"],
|
|
89
|
+
setup(t, {
|
|
90
|
+
emit: i
|
|
91
|
+
}) {
|
|
92
|
+
const {
|
|
93
|
+
t: e
|
|
94
|
+
} = n(), o = d(t, "modelValue", i);
|
|
95
|
+
return () => r("div", {
|
|
96
|
+
class: "space-y-4"
|
|
97
|
+
}, [r(l, {
|
|
98
|
+
label: e("components.flowEditor.label") || ""
|
|
99
|
+
}, {
|
|
100
|
+
default: () => [r(m, {
|
|
101
|
+
value: o.value.label,
|
|
102
|
+
"onUpdate:value": (p) => o.value.label = p
|
|
103
|
+
}, null)]
|
|
104
|
+
}), r(l, {
|
|
105
|
+
label: e("components.flowEditor.description") || ""
|
|
106
|
+
}, {
|
|
107
|
+
default: () => [r(m, {
|
|
108
|
+
value: o.value.description,
|
|
109
|
+
"onUpdate:value": (p) => o.value.description = p,
|
|
110
|
+
type: "textarea",
|
|
111
|
+
rows: 3,
|
|
112
|
+
placeholder: e("components.flowEditor.descriptionPlaceholder") || ""
|
|
113
|
+
}, null)]
|
|
114
|
+
})]);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
function Vt() {
|
|
118
|
+
const {
|
|
119
|
+
t
|
|
120
|
+
} = n();
|
|
121
|
+
return {
|
|
122
|
+
meta: {
|
|
123
|
+
name: "start",
|
|
124
|
+
label: t("components.flowEditor.startNode.label") || "",
|
|
125
|
+
description: t("components.flowEditor.startNode.description") || "",
|
|
126
|
+
category: "start",
|
|
127
|
+
nodeType: "start",
|
|
128
|
+
icon: "i-tabler:player-play",
|
|
129
|
+
color: "success",
|
|
130
|
+
style: {
|
|
131
|
+
iconBgClass: "bg-emerald"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
component: u,
|
|
135
|
+
settingComponent: f,
|
|
136
|
+
multiInput: !1,
|
|
137
|
+
multiOutput: !0
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
export {
|
|
141
|
+
u as StartNode,
|
|
142
|
+
f as StartNodeSetting,
|
|
143
|
+
Vt as getStartNodeRegistry
|
|
144
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { useI18n as b } from "@duxweb/dvha-core";
|
|
2
|
+
import { useVueFlow as m } from "@vue-flow/core";
|
|
3
|
+
const E = () => {
|
|
4
|
+
const { findNode: l, getEdges: f } = m(), i = (n, a) => {
|
|
5
|
+
const d = f.value.filter((e) => e.target === n), r = [];
|
|
6
|
+
for (const e of d) {
|
|
7
|
+
const o = l(e.source);
|
|
8
|
+
if (!o) continue;
|
|
9
|
+
const u = a[o.type];
|
|
10
|
+
if (!u) continue;
|
|
11
|
+
(u.meta.nodeType || u.meta.category) === "start" ? o.data?.config?.fields && Array.isArray(o.data.config.fields) && r.push(...o.data.config.fields.map((s) => ({
|
|
12
|
+
label: `${o.data.label}: ${s.label || s.name}`,
|
|
13
|
+
value: `${e.source}.${s.name}`,
|
|
14
|
+
type: s.type || "text",
|
|
15
|
+
nodeId: e.source,
|
|
16
|
+
nodeName: o.data.label || o.type
|
|
17
|
+
}))) : u.outputFields && r.push(...u.outputFields.map((s) => ({
|
|
18
|
+
label: `${o.data.label}: ${s.label || s.name}`,
|
|
19
|
+
value: `${e.source}.${s.name}`,
|
|
20
|
+
type: s.type,
|
|
21
|
+
nodeId: e.source,
|
|
22
|
+
nodeName: o.data.label || o.type
|
|
23
|
+
})));
|
|
24
|
+
}
|
|
25
|
+
return r;
|
|
26
|
+
}, p = (n, a) => {
|
|
27
|
+
const t = l(n);
|
|
28
|
+
if (!t) return [];
|
|
29
|
+
const d = a[t.type];
|
|
30
|
+
if (!d) return [];
|
|
31
|
+
const r = [];
|
|
32
|
+
return t.data?.config?.fields && Array.isArray(t.data.config.fields) && r.push(...t.data.config.fields.map((e) => ({
|
|
33
|
+
name: e.name,
|
|
34
|
+
type: e.type || "text",
|
|
35
|
+
label: e.label || e.name,
|
|
36
|
+
description: e.description,
|
|
37
|
+
required: e.required
|
|
38
|
+
}))), d.outputFields && r.push(...d.outputFields), r;
|
|
39
|
+
}, c = (n) => {
|
|
40
|
+
const a = n.split(".");
|
|
41
|
+
return a.length !== 2 ? null : {
|
|
42
|
+
nodeId: a[0],
|
|
43
|
+
fieldName: a[1]
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
return {
|
|
47
|
+
getUpstreamFields: i,
|
|
48
|
+
getNodeOutputFields: p,
|
|
49
|
+
parseFieldReference: c,
|
|
50
|
+
validateFieldReference: (n, a) => {
|
|
51
|
+
const t = c(n);
|
|
52
|
+
return !t || !l(t.nodeId) ? !1 : p(t.nodeId, a).some((e) => e.name === t.fieldName);
|
|
53
|
+
},
|
|
54
|
+
getInputFieldOptions: (n, a) => i(n, a).map((t) => ({
|
|
55
|
+
label: t.label,
|
|
56
|
+
value: t.value,
|
|
57
|
+
type: t.type
|
|
58
|
+
}))
|
|
59
|
+
};
|
|
60
|
+
}, I = () => {
|
|
61
|
+
const { t: l } = b();
|
|
62
|
+
return [
|
|
63
|
+
{ label: l("components.flowEditor.fieldTypes.text") || "", value: "text" },
|
|
64
|
+
{ label: l("components.flowEditor.fieldTypes.number") || "", value: "number" },
|
|
65
|
+
{ label: l("components.flowEditor.fieldTypes.boolean") || "", value: "boolean" },
|
|
66
|
+
{ label: l("components.flowEditor.fieldTypes.date") || "", value: "date" },
|
|
67
|
+
{ label: l("components.flowEditor.fieldTypes.array") || "", value: "array" },
|
|
68
|
+
{ label: l("components.flowEditor.fieldTypes.object") || "", value: "object" }
|
|
69
|
+
];
|
|
70
|
+
}, N = [
|
|
71
|
+
{ label: "Text", value: "text" },
|
|
72
|
+
{ label: "Number", value: "number" },
|
|
73
|
+
{ label: "Boolean", value: "boolean" },
|
|
74
|
+
{ label: "Date", value: "date" },
|
|
75
|
+
{ label: "Array", value: "array" },
|
|
76
|
+
{ label: "Object", value: "object" }
|
|
77
|
+
];
|
|
78
|
+
export {
|
|
79
|
+
N as FIELD_TYPE_OPTIONS,
|
|
80
|
+
I as getFieldTypeOptions,
|
|
81
|
+
E as useNodeDataFlow
|
|
82
|
+
};
|
|
@@ -55,14 +55,17 @@ import "../../pages/page404.js";
|
|
|
55
55
|
import { DuxDrawerPage as O } from "../drawer/drawerPage.js";
|
|
56
56
|
import "short-unique-id";
|
|
57
57
|
import "aieditor";
|
|
58
|
+
import "@vue-flow/core";
|
|
58
59
|
import { DuxFormLayout as a } from "./formLayout.js";
|
|
60
|
+
import "@vue-flow/background";
|
|
61
|
+
/* empty css */
|
|
59
62
|
import "@iconify-json/tabler/icons.json";
|
|
60
63
|
import "../posterEditor/elements/index.js";
|
|
61
64
|
import "fabric";
|
|
62
65
|
function s(t) {
|
|
63
66
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !D(t);
|
|
64
67
|
}
|
|
65
|
-
const
|
|
68
|
+
const Qt = /* @__PURE__ */ b({
|
|
66
69
|
name: "DuxDrawerForm",
|
|
67
70
|
props: {
|
|
68
71
|
id: {
|
|
@@ -162,5 +165,5 @@ const Ht = /* @__PURE__ */ b({
|
|
|
162
165
|
}
|
|
163
166
|
});
|
|
164
167
|
export {
|
|
165
|
-
|
|
168
|
+
Qt as DuxDrawerForm
|
|
166
169
|
};
|
|
@@ -55,14 +55,17 @@ import "vue-command-palette";
|
|
|
55
55
|
import "../../pages/page404.js";
|
|
56
56
|
import "short-unique-id";
|
|
57
57
|
import "aieditor";
|
|
58
|
+
import "@vue-flow/core";
|
|
58
59
|
import { DuxFormLayout as a } from "./formLayout.js";
|
|
60
|
+
import "@vue-flow/background";
|
|
61
|
+
/* empty css */
|
|
59
62
|
import "@iconify-json/tabler/icons.json";
|
|
60
63
|
import "../posterEditor/elements/index.js";
|
|
61
64
|
import "fabric";
|
|
62
65
|
function c(t) {
|
|
63
66
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !x(t);
|
|
64
67
|
}
|
|
65
|
-
const
|
|
68
|
+
const Jt = /* @__PURE__ */ b({
|
|
66
69
|
name: "DuxModalForm",
|
|
67
70
|
props: {
|
|
68
71
|
id: {
|
|
@@ -102,7 +105,7 @@ const At = /* @__PURE__ */ b({
|
|
|
102
105
|
} = E(), u = v(() => {
|
|
103
106
|
const {
|
|
104
107
|
onClose: o,
|
|
105
|
-
onSuccess:
|
|
108
|
+
onSuccess: m,
|
|
106
109
|
onError: N,
|
|
107
110
|
action: O,
|
|
108
111
|
title: _,
|
|
@@ -112,7 +115,7 @@ const At = /* @__PURE__ */ b({
|
|
|
112
115
|
...S
|
|
113
116
|
} = t;
|
|
114
117
|
return S;
|
|
115
|
-
}), l = C(t, "data", {}),
|
|
118
|
+
}), l = C(t, "data", {}), e = D(), {
|
|
116
119
|
invalidate: d
|
|
117
120
|
} = h(), {
|
|
118
121
|
isLoading: n,
|
|
@@ -125,10 +128,10 @@ const At = /* @__PURE__ */ b({
|
|
|
125
128
|
form: l,
|
|
126
129
|
action: t.action,
|
|
127
130
|
onError: (o) => {
|
|
128
|
-
|
|
131
|
+
e.error(o.message || i("components.form.error")), t.onError?.(o);
|
|
129
132
|
},
|
|
130
133
|
onSuccess: (o) => {
|
|
131
|
-
t.invalidate && d(t.invalidate),
|
|
134
|
+
t.invalidate && d(t.invalidate), e.success(i("components.form.success")), t.onSuccess?.(o), t.onClose?.();
|
|
132
135
|
}
|
|
133
136
|
});
|
|
134
137
|
return () => r(M, {
|
|
@@ -139,7 +142,7 @@ const At = /* @__PURE__ */ b({
|
|
|
139
142
|
default: () => [s?.default?.()]
|
|
140
143
|
}),
|
|
141
144
|
footer: () => {
|
|
142
|
-
let o,
|
|
145
|
+
let o, m;
|
|
143
146
|
return r(F, null, [r(p, {
|
|
144
147
|
onClick: g,
|
|
145
148
|
loading: n.value
|
|
@@ -149,13 +152,13 @@ const At = /* @__PURE__ */ b({
|
|
|
149
152
|
type: "primary",
|
|
150
153
|
loading: n.value,
|
|
151
154
|
onClick: () => f()
|
|
152
|
-
}, c(
|
|
153
|
-
default: () => [
|
|
155
|
+
}, c(m = i("components.button.submit")) ? m : {
|
|
156
|
+
default: () => [m]
|
|
154
157
|
})]);
|
|
155
158
|
}
|
|
156
159
|
});
|
|
157
160
|
}
|
|
158
161
|
});
|
|
159
162
|
export {
|
|
160
|
-
|
|
163
|
+
Jt as DuxModalForm
|
|
161
164
|
};
|
|
@@ -24,8 +24,11 @@ import "lodash-es";
|
|
|
24
24
|
import "vue-draggable-plus";
|
|
25
25
|
import "short-unique-id";
|
|
26
26
|
import "aieditor";
|
|
27
|
+
import "@vue-flow/core";
|
|
27
28
|
import { DuxFormLayout as P } from "./formLayout.js";
|
|
28
29
|
import "vee-validate";
|
|
30
|
+
import "@vue-flow/background";
|
|
31
|
+
/* empty css */
|
|
29
32
|
import "@duxweb/dvha-naiveui";
|
|
30
33
|
import "mime";
|
|
31
34
|
import "@iconify-json/tabler/icons.json";
|
|
@@ -60,7 +63,7 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
60
63
|
import "vue-command-palette";
|
|
61
64
|
import { DuxPage as C } from "../../pages/page.js";
|
|
62
65
|
import "../../pages/page404.js";
|
|
63
|
-
const
|
|
66
|
+
const Ot = /* @__PURE__ */ f({
|
|
64
67
|
name: "DuxPageForm",
|
|
65
68
|
props: {
|
|
66
69
|
id: {
|
|
@@ -99,27 +102,27 @@ const zt = /* @__PURE__ */ f({
|
|
|
99
102
|
slots: n
|
|
100
103
|
}) {
|
|
101
104
|
const {
|
|
102
|
-
t:
|
|
105
|
+
t: r
|
|
103
106
|
} = g(), l = b(t, "data", {}), a = v(), s = E(), m = y(), {
|
|
104
107
|
invalidate: c
|
|
105
|
-
} = S(),
|
|
108
|
+
} = S(), i = x({
|
|
106
109
|
id: t.id,
|
|
107
110
|
path: t.path,
|
|
108
111
|
form: l,
|
|
109
112
|
action: t.action,
|
|
110
|
-
onError: (
|
|
111
|
-
a.error(
|
|
113
|
+
onError: (e) => {
|
|
114
|
+
a.error(e.message || r("components.form.error")), t.onError?.(e);
|
|
112
115
|
},
|
|
113
|
-
onSuccess: (
|
|
114
|
-
a.success(
|
|
116
|
+
onSuccess: (e) => {
|
|
117
|
+
a.success(r("components.form.success")), t.onSuccess?.(e), !i.isEdit.value && m.current && m.delTab(m.current, (d) => s.push(d.path || "")), t.invalidate && c(t.invalidate);
|
|
115
118
|
}
|
|
116
|
-
}), u = m.tabs.find((
|
|
119
|
+
}), u = m.tabs.find((e) => e.path === m.current);
|
|
117
120
|
return () => o(C, {
|
|
118
121
|
card: !1,
|
|
119
122
|
scrollbar: !1
|
|
120
123
|
}, {
|
|
121
124
|
default: () => [o(F, {
|
|
122
|
-
title: t?.title || u?.label || (
|
|
125
|
+
title: t?.title || u?.label || (i.isEdit.value ? r("components.form.edit") : r("components.form.create")),
|
|
123
126
|
description: t?.description,
|
|
124
127
|
class: "h-full flex flex-col",
|
|
125
128
|
contentClass: "flex-1 min-h-0",
|
|
@@ -131,27 +134,27 @@ const zt = /* @__PURE__ */ f({
|
|
|
131
134
|
labelPlacement: t.labelPlacement,
|
|
132
135
|
class: "p-4"
|
|
133
136
|
}, {
|
|
134
|
-
default: () => [n?.default?.(
|
|
137
|
+
default: () => [n?.default?.(i)]
|
|
135
138
|
})]
|
|
136
139
|
}),
|
|
137
140
|
headerExtra: () => o("div", {
|
|
138
141
|
class: "flex gap-6 items-center"
|
|
139
|
-
}, [n?.actions?.(
|
|
142
|
+
}, [n?.actions?.(i), o("div", {
|
|
140
143
|
class: "flex gap-2"
|
|
141
144
|
}, [o(p, {
|
|
142
|
-
onClick: () =>
|
|
143
|
-
loading:
|
|
145
|
+
onClick: () => i.onReset(),
|
|
146
|
+
loading: i.isLoading.value
|
|
144
147
|
}, {
|
|
145
|
-
default: () =>
|
|
148
|
+
default: () => r("components.button.reset"),
|
|
146
149
|
icon: () => o("i", {
|
|
147
150
|
class: "i-tabler:refresh"
|
|
148
151
|
}, null)
|
|
149
152
|
}), o(p, {
|
|
150
153
|
type: "primary",
|
|
151
|
-
onClick: () =>
|
|
152
|
-
loading:
|
|
154
|
+
onClick: () => i.onSubmit(),
|
|
155
|
+
loading: i.isLoading.value
|
|
153
156
|
}, {
|
|
154
|
-
default: () =>
|
|
157
|
+
default: () => r("components.button.submit"),
|
|
155
158
|
icon: () => o("i", {
|
|
156
159
|
class: "i-tabler:device-floppy"
|
|
157
160
|
}, null)
|
|
@@ -161,5 +164,5 @@ const zt = /* @__PURE__ */ f({
|
|
|
161
164
|
}
|
|
162
165
|
});
|
|
163
166
|
export {
|
|
164
|
-
|
|
167
|
+
Ot as DuxPageForm
|
|
165
168
|
};
|
|
@@ -24,7 +24,10 @@ import "lodash-es";
|
|
|
24
24
|
import "vue-draggable-plus";
|
|
25
25
|
import "short-unique-id";
|
|
26
26
|
import "aieditor";
|
|
27
|
+
import "@vue-flow/core";
|
|
27
28
|
import "vee-validate";
|
|
29
|
+
import "@vue-flow/background";
|
|
30
|
+
/* empty css */
|
|
28
31
|
import "@duxweb/dvha-naiveui";
|
|
29
32
|
import "mime";
|
|
30
33
|
import "@iconify-json/tabler/icons.json";
|
|
@@ -59,7 +62,7 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
59
62
|
import "vue-command-palette";
|
|
60
63
|
import { DuxPage as E } from "../../pages/page.js";
|
|
61
64
|
import "../../pages/page404.js";
|
|
62
|
-
const
|
|
65
|
+
const jt = /* @__PURE__ */ d({
|
|
63
66
|
name: "DuxPageTabForm",
|
|
64
67
|
props: {
|
|
65
68
|
id: {
|
|
@@ -155,5 +158,5 @@ const It = /* @__PURE__ */ d({
|
|
|
155
158
|
}
|
|
156
159
|
});
|
|
157
160
|
export {
|
|
158
|
-
|
|
161
|
+
jt as DuxPageTabForm
|
|
159
162
|
};
|
|
@@ -23,7 +23,10 @@ import "lodash-es";
|
|
|
23
23
|
import "vue-draggable-plus";
|
|
24
24
|
import "short-unique-id";
|
|
25
25
|
import "aieditor";
|
|
26
|
+
import "@vue-flow/core";
|
|
26
27
|
import "vee-validate";
|
|
28
|
+
import "@vue-flow/background";
|
|
29
|
+
/* empty css */
|
|
27
30
|
import "@duxweb/dvha-naiveui";
|
|
28
31
|
import "mime";
|
|
29
32
|
import "@iconify-json/tabler/icons.json";
|
|
@@ -58,7 +61,7 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
58
61
|
import "vue-command-palette";
|
|
59
62
|
import { DuxPage as b } from "../../pages/page.js";
|
|
60
63
|
import "../../pages/page404.js";
|
|
61
|
-
const
|
|
64
|
+
const Ct = /* @__PURE__ */ s({
|
|
62
65
|
name: "DuxSettingForm",
|
|
63
66
|
props: {
|
|
64
67
|
id: {
|
|
@@ -96,9 +99,9 @@ const Dt = /* @__PURE__ */ s({
|
|
|
96
99
|
}
|
|
97
100
|
},
|
|
98
101
|
setup(t, {
|
|
99
|
-
slots:
|
|
102
|
+
slots: r
|
|
100
103
|
}) {
|
|
101
|
-
const
|
|
104
|
+
const e = c(t.defaultTab), n = d(t, "data", {}), {
|
|
102
105
|
t: m
|
|
103
106
|
} = g(), a = v(), {
|
|
104
107
|
invalidate: u
|
|
@@ -129,17 +132,17 @@ const Dt = /* @__PURE__ */ s({
|
|
|
129
132
|
class: `flex flex-col gap-6 w-full ${l.value} mx-auto py-4`
|
|
130
133
|
}, [t.tabs ? i(S, {
|
|
131
134
|
defaultValue: t.defaultTab,
|
|
132
|
-
value:
|
|
135
|
+
value: e.value,
|
|
133
136
|
onUpdateValue: (o) => {
|
|
134
|
-
|
|
137
|
+
e.value = o;
|
|
135
138
|
},
|
|
136
139
|
type: "segment"
|
|
137
140
|
}, {
|
|
138
|
-
default: () => [
|
|
139
|
-
}) :
|
|
141
|
+
default: () => [r?.default?.(p)]
|
|
142
|
+
}) : r?.default?.(p)])]
|
|
140
143
|
});
|
|
141
144
|
}
|
|
142
145
|
});
|
|
143
146
|
export {
|
|
144
|
-
|
|
147
|
+
Ct as DuxSettingForm
|
|
145
148
|
};
|