@kp-ui/lowcode 2.14.0-beta.2 → 2.14.0-beta.21
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/package.json +1 -1
- package/src/components/FormRender/useFormRender.js +18 -0
- package/src/components/form-designer/designer.js +78 -75
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +18 -18
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js +18 -20
- package/src/components/form-designer/form-widget/container-widget/vf-box-item.vue.js +9 -9
- package/src/components/form-designer/form-widget/container-widget/vf-dialog-widget.vue.js +29 -21
- package/src/components/form-designer/form-widget/field-widget/cascader-widget.vue.js +32 -39
- package/src/components/form-designer/form-widget/field-widget/date-range-widget.vue.js +24 -31
- package/src/components/form-designer/form-widget/field-widget/date-widget.vue.js +26 -33
- package/src/components/form-designer/form-widget/field-widget/diy-compontent-widget.vue.js +4 -4
- package/src/components/form-designer/form-widget/field-widget/fieldMixin.js +4 -1
- package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue.js +84 -152
- package/src/components/form-designer/form-widget/field-widget/input-widget.vue.js +31 -38
- package/src/components/form-designer/form-widget/field-widget/number-widget.vue.js +23 -30
- package/src/components/form-designer/form-widget/field-widget/select-widget.vue.js +56 -63
- package/src/components/form-designer/form-widget/field-widget/switch-widget.vue.js +1 -1
- package/src/components/form-designer/form-widget/field-widget/textarea-widget.vue.js +23 -32
- package/src/components/form-designer/form-widget/field-widget/treeSelect-widget.vue.js +26 -33
- package/src/components/form-designer/setting-panel/form-setting.vue.js +2 -2
- package/src/components/form-designer/setting-panel/form-setting.vue2.js +81 -94
- package/src/components/form-designer/setting-panel/index.vue.js +2 -2
- package/src/components/form-designer/setting-panel/index.vue2.js +135 -135
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-colorRow-editor.vue2.js +8 -7
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js +23 -22
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +3 -3
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +7 -7
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/formCode-editor.vue.js +25 -19
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/line-height-editor.vue2.js +7 -6
- package/src/components/form-designer/setting-panel/property-editor/index.js +41 -42
- package/src/components/form-designer/setting-panel/propertyRegister.js +3 -6
- package/src/components/form-designer/widget-panel/PanelItemDrag.vue.js +50 -0
- package/src/components/form-designer/widget-panel/PanelItemDrag.vue2.js +4 -0
- package/src/components/form-designer/widget-panel/advanced/cascader.js +0 -1
- package/src/components/form-designer/widget-panel/advanced/data-table.js +1 -1
- package/src/components/form-designer/widget-panel/advanced/file-upload.js +0 -1
- package/src/components/form-designer/widget-panel/advanced/rich-editor.js +4 -5
- package/src/components/form-designer/widget-panel/advanced/tree-select.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/checkbox.js +2 -3
- package/src/components/form-designer/widget-panel/basicFields/color.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/date.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/dateRange.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/input.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/number.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/radio.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/rate.js +5 -6
- package/src/components/form-designer/widget-panel/basicFields/select.js +2 -3
- package/src/components/form-designer/widget-panel/basicFields/slider.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/switch.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/textarea.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/time.js +0 -1
- package/src/components/form-designer/widget-panel/basicFields/timeRange.js +0 -1
- package/src/components/form-designer/widget-panel/business/department-select.js +0 -1
- package/src/components/form-designer/widget-panel/business/material-select.js +0 -1
- package/src/components/form-designer/widget-panel/business/operation-select.js +2 -3
- package/src/components/form-designer/widget-panel/business/post-select.js +0 -1
- package/src/components/form-designer/widget-panel/business/project-group-select.js +2 -3
- package/src/components/form-designer/widget-panel/business/project-select.js +2 -3
- package/src/components/form-designer/widget-panel/business/user-select.js +0 -1
- package/src/components/form-designer/widget-panel/containers/vf-dialog.js +3 -2
- package/src/components/form-designer/widget-panel/index.vue.js +4 -338
- package/src/components/form-designer/widget-panel/index.vue2.js +82 -0
- package/src/components/form-designer/widget-panel/widgetsConfig.js +19 -18
- package/src/components/form-render/RenderWigetList.vue.js +61 -0
- package/src/components/form-render/RenderWigetList.vue2.js +4 -0
- package/src/components/form-render/SubmitButtonRender.vue.js +41 -29
- package/src/components/form-render/container-item/container-item-wrapper.vue.js +2 -23
- package/src/components/form-render/container-item/container-item-wrapper.vue2.js +20 -0
- package/src/components/form-render/container-item/data-table-item.vue.js +22 -36
- package/src/components/form-render/container-item/grid-item.vue.js +7 -7
- package/src/components/form-render/container-item/grid-sub-form-item.vue.js +1 -1
- package/src/components/form-render/container-item/sub-form-item.vue.js +115 -146
- package/src/components/form-render/container-item/tab-item.vue.js +19 -19
- package/src/components/form-render/container-item/table-item.vue.js +7 -7
- package/src/components/form-render/container-item/vf-collapse-item.vue.js +27 -27
- package/src/components/form-render/dynamic-dialog.vue.js +87 -86
- package/src/components/form-render/index.vue.js +94 -110
- package/src/components/public/ActionButtonListDialog.vue.js +82 -75
- package/src/components/public/ActionButtonListDialog.vue2.js +16 -10
- package/src/components/public/ActionButtonListRender.vue.js +12 -11
- package/src/components/public/CustomerModal/CustomerModal.vue2.js +49 -42
- package/src/hooks/useLowcode.js +40 -39
- package/src/lang/en-US.js +5 -1
- package/src/lang/zh-CN.js +5 -1
- package/src/mixins/useDataTableMixin.js +29 -31
- package/src/utils/asyncExecuteFunction.js +4 -0
- package/stats.html +1 -1
- package/styles/style.css +1 -1
- package/src/components/form-designer/setting-panel/property-editor/labelTooltip-editor.vue.js +0 -31
- package/src/components/form-designer/widget-panel/templatesConfig.js +0 -53
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUuidKey as a } from "@kp-ui/tool";
|
|
2
|
-
const
|
|
2
|
+
const t = (e = {}) => ({
|
|
3
3
|
key: a(),
|
|
4
4
|
id: e.name,
|
|
5
5
|
showName: "选择工序",
|
|
@@ -63,7 +63,6 @@ const l = (e = {}) => ({
|
|
|
63
63
|
customClass: [],
|
|
64
64
|
labelIconClass: null,
|
|
65
65
|
labelIconPosition: "rear",
|
|
66
|
-
labelTooltip: null,
|
|
67
66
|
onCreated: "",
|
|
68
67
|
onMounted: "",
|
|
69
68
|
onChange: "",
|
|
@@ -75,5 +74,5 @@ const l = (e = {}) => ({
|
|
|
75
74
|
}
|
|
76
75
|
});
|
|
77
76
|
export {
|
|
78
|
-
|
|
77
|
+
t as operationSelect
|
|
79
78
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUuidKey as a } from "@kp-ui/tool";
|
|
2
|
-
const
|
|
2
|
+
const t = (e = {}) => ({
|
|
3
3
|
key: a(),
|
|
4
4
|
id: e.name,
|
|
5
5
|
showName: "选择项目组",
|
|
@@ -63,7 +63,6 @@ const l = (e = {}) => ({
|
|
|
63
63
|
customClass: [],
|
|
64
64
|
labelIconClass: null,
|
|
65
65
|
labelIconPosition: "rear",
|
|
66
|
-
labelTooltip: null,
|
|
67
66
|
onCreated: "",
|
|
68
67
|
onMounted: "",
|
|
69
68
|
onChange: "",
|
|
@@ -75,5 +74,5 @@ const l = (e = {}) => ({
|
|
|
75
74
|
}
|
|
76
75
|
});
|
|
77
76
|
export {
|
|
78
|
-
|
|
77
|
+
t as projectGroupSelect
|
|
79
78
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUuidKey as a } from "@kp-ui/tool";
|
|
2
|
-
const
|
|
2
|
+
const l = (e = {}) => ({
|
|
3
3
|
key: a(),
|
|
4
4
|
id: e.name,
|
|
5
5
|
showName: "选择项目",
|
|
@@ -59,7 +59,6 @@ const o = (e = {}) => ({
|
|
|
59
59
|
customClass: [],
|
|
60
60
|
labelIconClass: null,
|
|
61
61
|
labelIconPosition: "rear",
|
|
62
|
-
labelTooltip: null,
|
|
63
62
|
onCreated: "",
|
|
64
63
|
onMounted: "",
|
|
65
64
|
onChange: "",
|
|
@@ -71,5 +70,5 @@ const o = (e = {}) => ({
|
|
|
71
70
|
}
|
|
72
71
|
});
|
|
73
72
|
export {
|
|
74
|
-
|
|
73
|
+
l as projectSelect
|
|
75
74
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUuidKey as o } from "@kp-ui/tool";
|
|
2
|
-
const
|
|
2
|
+
const t = (e = {}) => ({
|
|
3
3
|
key: o(),
|
|
4
4
|
type: "vf-dialog",
|
|
5
5
|
category: "container",
|
|
@@ -17,6 +17,7 @@ const l = (e = {}) => ({
|
|
|
17
17
|
closeOnPressEscape: !1,
|
|
18
18
|
readMode: !1,
|
|
19
19
|
disabledMode: !1,
|
|
20
|
+
disabled: !1,
|
|
20
21
|
okButtonLabel: "",
|
|
21
22
|
okButtonHidden: !1,
|
|
22
23
|
cancelButtonLabel: "",
|
|
@@ -29,5 +30,5 @@ const l = (e = {}) => ({
|
|
|
29
30
|
}
|
|
30
31
|
});
|
|
31
32
|
export {
|
|
32
|
-
|
|
33
|
+
t as vfDialog
|
|
33
34
|
};
|
|
@@ -1,341 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import w from "../../../lib/vuedraggable/src/vuedraggable.js";
|
|
3
|
-
import { containers as C, basicFields as T, advancedFields as D, customFields as N, businessFields as L } from "./widgetsConfig.js";
|
|
4
|
-
import { formTemplates as B } from "./templatesConfig.js";
|
|
5
|
-
import { generateId as c, addWindowResizeHandler as W } from "../../../utils/util.js";
|
|
6
|
-
import x from "../../../utils/i18n.js";
|
|
7
|
-
import H from "axios";
|
|
8
|
-
import { TpfConfirm as M } from "../../../hooks/TpfConfirm.js";
|
|
9
|
-
import { resolveComponent as r, createElementBlock as $, openBlock as F, createElementVNode as a, createVNode as t, withCtx as l, createCommentVNode as b, createBlock as E, createTextVNode as g, toDisplayString as m } from "vue";
|
|
1
|
+
import o from "./index.vue2.js";
|
|
10
2
|
/* empty css */
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
name: "FieldPanel",
|
|
14
|
-
mixins: [x],
|
|
15
|
-
components: { SvgIcon: _, Draggable: w },
|
|
16
|
-
props: {
|
|
17
|
-
designer: Object
|
|
18
|
-
},
|
|
19
|
-
inject: ["getBannedWidgets", "getDesignerConfig"],
|
|
20
|
-
data() {
|
|
21
|
-
return {
|
|
22
|
-
designerConfig: this.getDesignerConfig(),
|
|
23
|
-
firstTab: "componentLib",
|
|
24
|
-
scrollerHeight: 0,
|
|
25
|
-
activeNames: [
|
|
26
|
-
"containerTitle",
|
|
27
|
-
"basicFieldTitle",
|
|
28
|
-
"advancedFieldTitle",
|
|
29
|
-
"yyzj",
|
|
30
|
-
"customFieldTitle"
|
|
31
|
-
],
|
|
32
|
-
containers: [],
|
|
33
|
-
basicFields: [],
|
|
34
|
-
advancedFields: [],
|
|
35
|
-
customFields: [],
|
|
36
|
-
businessFields: [],
|
|
37
|
-
formTemplates: B,
|
|
38
|
-
ftImages: []
|
|
39
|
-
};
|
|
40
|
-
},
|
|
41
|
-
computed: {
|
|
42
|
-
//
|
|
43
|
-
},
|
|
44
|
-
created() {
|
|
45
|
-
this.loadWidgets();
|
|
46
|
-
},
|
|
47
|
-
mounted() {
|
|
48
|
-
this.scrollerHeight = window.innerHeight - 56 + "px", W(() => {
|
|
49
|
-
this.$nextTick(() => {
|
|
50
|
-
this.scrollerHeight = window.innerHeight - 56 + "px";
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
},
|
|
54
|
-
methods: {
|
|
55
|
-
isBanned(e) {
|
|
56
|
-
return this.getBannedWidgets().indexOf(e) > -1;
|
|
57
|
-
},
|
|
58
|
-
showFormTemplates() {
|
|
59
|
-
return this.designerConfig.formTemplates === void 0 ? !0 : !!this.designerConfig.formTemplates;
|
|
60
|
-
},
|
|
61
|
-
loadWidgets() {
|
|
62
|
-
this.containers = C.map((e) => ({
|
|
63
|
-
key: c(),
|
|
64
|
-
...e,
|
|
65
|
-
displayName: this.i18n2t(
|
|
66
|
-
`designer.widgetLabel.${e.type}`,
|
|
67
|
-
`extension.widgetLabel.${e.type}`
|
|
68
|
-
)
|
|
69
|
-
})).filter((e) => !e.internal && !this.isBanned(e.type)), this.basicFields = T.map((e) => ({
|
|
70
|
-
key: c(),
|
|
71
|
-
...e,
|
|
72
|
-
displayName: this.i18n2t(
|
|
73
|
-
`designer.widgetLabel.${e.type}`,
|
|
74
|
-
`extension.widgetLabel.${e.type}`
|
|
75
|
-
)
|
|
76
|
-
})).filter((e) => !this.isBanned(e.type)), this.advancedFields = D.map((e) => ({
|
|
77
|
-
key: c(),
|
|
78
|
-
...e,
|
|
79
|
-
displayName: this.i18n2t(
|
|
80
|
-
`designer.widgetLabel.${e.type}`,
|
|
81
|
-
`extension.widgetLabel.${e.type}`
|
|
82
|
-
)
|
|
83
|
-
})).filter((e) => !this.isBanned(e.type)), this.customFields = N.map((e) => ({
|
|
84
|
-
key: c(),
|
|
85
|
-
...e,
|
|
86
|
-
displayName: this.i18n2t(
|
|
87
|
-
`designer.widgetLabel.${e.type}`,
|
|
88
|
-
`extension.widgetLabel.${e.type}`
|
|
89
|
-
)
|
|
90
|
-
})).filter((e) => !this.isBanned(e.type)), this.businessFields = L.map((e) => ({
|
|
91
|
-
key: c(),
|
|
92
|
-
...e,
|
|
93
|
-
displayName: this.i18n2t(
|
|
94
|
-
`designer.widgetLabel.${e.type}`,
|
|
95
|
-
`extension.widgetLabel.${e.type}`
|
|
96
|
-
)
|
|
97
|
-
})).filter((e) => !this.isBanned(e.type));
|
|
98
|
-
},
|
|
99
|
-
handleContainerWidgetClone(e) {
|
|
100
|
-
return this.designer.copyNewContainerWidget(e);
|
|
101
|
-
},
|
|
102
|
-
handleFieldWidgetClone(e) {
|
|
103
|
-
return this.designer.copyNewFieldWidget(e);
|
|
104
|
-
},
|
|
105
|
-
/* draggable组件的move钩子是在内部子组件被拖放到其他draggable组件时触发!! */
|
|
106
|
-
checkContainerMove(e) {
|
|
107
|
-
return this.designer.checkWidgetMove(e);
|
|
108
|
-
},
|
|
109
|
-
/* draggable组件的move钩子是在内部子组件被拖放到其他draggable组件时触发!! */
|
|
110
|
-
checkFieldMove(e) {
|
|
111
|
-
return this.designer.checkFieldMove(e);
|
|
112
|
-
},
|
|
113
|
-
onContainerDragEnd(e) {
|
|
114
|
-
},
|
|
115
|
-
addContainerByDbClick(e) {
|
|
116
|
-
this.designer.addContainerByDbClick(e);
|
|
117
|
-
},
|
|
118
|
-
addFieldByDbClick(e) {
|
|
119
|
-
this.designer.addFieldByDbClick(e);
|
|
120
|
-
},
|
|
121
|
-
loadFormTemplate(e) {
|
|
122
|
-
M({
|
|
123
|
-
type: "confirm",
|
|
124
|
-
content: this.i18nt("designer.setting.loadFormTemplateHint"),
|
|
125
|
-
title: this.i18nt("render.hint.prompt"),
|
|
126
|
-
okText: this.i18nt("render.hint.confirm"),
|
|
127
|
-
cancelText: this.i18nt("render.hint.cancel")
|
|
128
|
-
}).then(() => {
|
|
129
|
-
H.get(e).then((n) => {
|
|
130
|
-
let p = !1;
|
|
131
|
-
typeof n.data == "string" ? p = this.designer.loadFormJson(JSON.parse(n.data)) : n.data.constructor === Object && (p = this.designer.loadFormJson(n.data)), p && this.designer.emitHistoryChange(), this.$message.success(
|
|
132
|
-
this.i18nt("designer.hint.loadFormTemplateSuccess")
|
|
133
|
-
);
|
|
134
|
-
}).catch((n) => {
|
|
135
|
-
this.$message.error(
|
|
136
|
-
this.i18nt("designer.hint.loadFormTemplateFailed") + ":" + n
|
|
137
|
-
);
|
|
138
|
-
});
|
|
139
|
-
}).catch((n) => {
|
|
140
|
-
console.error(n);
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}, G = { class: "side-scroll-bar" }, I = { class: "panel-container" }, O = ["title", "onDblclick"], S = ["title", "onDblclick"], V = ["title", "onDblclick"], J = ["title", "onDblclick"];
|
|
145
|
-
function z(e, n, p, P, o, s) {
|
|
146
|
-
const d = r("svg-icon"), h = r("draggable"), u = r("a-collapse-panel"), v = r("a-collapse"), k = r("a-tab-pane");
|
|
147
|
-
r("a-popover"), r("a-button"), r("a-card");
|
|
148
|
-
const f = r("a-tabs");
|
|
149
|
-
return F(), $("div", G, [
|
|
150
|
-
a("div", I, [
|
|
151
|
-
t(f, {
|
|
152
|
-
activeKey: o.firstTab,
|
|
153
|
-
"onUpdate:activeKey": n[1] || (n[1] = (i) => o.firstTab = i),
|
|
154
|
-
class: "no-bottom-margin indent-left-margin"
|
|
155
|
-
}, {
|
|
156
|
-
default: l(() => [
|
|
157
|
-
t(k, { key: "componentLib" }, {
|
|
158
|
-
tab: l(() => [
|
|
159
|
-
a("span", null, [
|
|
160
|
-
t(d, { "icon-class": "icon-el-set-up" }),
|
|
161
|
-
g(" " + m(e.i18nt("designer.componentLib")), 1)
|
|
162
|
-
])
|
|
163
|
-
]),
|
|
164
|
-
default: l(() => [
|
|
165
|
-
t(v, {
|
|
166
|
-
activeKey: o.activeNames,
|
|
167
|
-
"onUpdate:activeKey": n[0] || (n[0] = (i) => o.activeNames = i),
|
|
168
|
-
class: "widget-collapse"
|
|
169
|
-
}, {
|
|
170
|
-
default: l(() => [
|
|
171
|
-
t(u, {
|
|
172
|
-
key: "containerTitle",
|
|
173
|
-
header: e.i18nt("designer.containerTitle")
|
|
174
|
-
}, {
|
|
175
|
-
default: l(() => [
|
|
176
|
-
t(h, {
|
|
177
|
-
tag: "ul",
|
|
178
|
-
list: o.containers,
|
|
179
|
-
"item-key": "key",
|
|
180
|
-
group: { name: "dragGroup", pull: "clone", put: !1 },
|
|
181
|
-
clone: s.handleContainerWidgetClone,
|
|
182
|
-
"ghost-class": "ghost",
|
|
183
|
-
sort: !1,
|
|
184
|
-
move: s.checkContainerMove,
|
|
185
|
-
onEnd: s.onContainerDragEnd
|
|
186
|
-
}, {
|
|
187
|
-
item: l(({ element: i }) => [
|
|
188
|
-
a("li", {
|
|
189
|
-
class: "container-widget-item",
|
|
190
|
-
title: i.displayName,
|
|
191
|
-
onDblclick: (y) => s.addContainerByDbClick(i)
|
|
192
|
-
}, [
|
|
193
|
-
a("span", null, [
|
|
194
|
-
t(d, {
|
|
195
|
-
"icon-class": "icon-" + i.icon,
|
|
196
|
-
class: "color-svg-icon"
|
|
197
|
-
}, null, 8, ["icon-class"]),
|
|
198
|
-
g(" " + m(i.showName || e.i18n2t(
|
|
199
|
-
`designer.widgetLabel.${i.type}`,
|
|
200
|
-
`extension.widgetLabel.${i.type}`
|
|
201
|
-
)), 1)
|
|
202
|
-
])
|
|
203
|
-
], 40, O)
|
|
204
|
-
]),
|
|
205
|
-
_: 1
|
|
206
|
-
}, 8, ["list", "clone", "move", "onEnd"])
|
|
207
|
-
]),
|
|
208
|
-
_: 1
|
|
209
|
-
}, 8, ["header"]),
|
|
210
|
-
t(u, {
|
|
211
|
-
key: "basicFieldTitle",
|
|
212
|
-
header: e.i18nt("designer.basicFieldTitle")
|
|
213
|
-
}, {
|
|
214
|
-
default: l(() => [
|
|
215
|
-
t(h, {
|
|
216
|
-
tag: "ul",
|
|
217
|
-
list: o.basicFields,
|
|
218
|
-
"item-key": "key",
|
|
219
|
-
group: { name: "dragGroup", pull: "clone", put: !1 },
|
|
220
|
-
move: s.checkFieldMove,
|
|
221
|
-
clone: s.handleFieldWidgetClone,
|
|
222
|
-
"ghost-class": "ghost",
|
|
223
|
-
sort: !1
|
|
224
|
-
}, {
|
|
225
|
-
item: l(({ element: i }) => [
|
|
226
|
-
a("li", {
|
|
227
|
-
class: "field-widget-item",
|
|
228
|
-
title: i.displayName,
|
|
229
|
-
onDblclick: (y) => s.addFieldByDbClick(i)
|
|
230
|
-
}, [
|
|
231
|
-
a("span", null, [
|
|
232
|
-
t(d, {
|
|
233
|
-
"icon-class": "icon-" + i.icon,
|
|
234
|
-
class: "color-svg-icon"
|
|
235
|
-
}, null, 8, ["icon-class"]),
|
|
236
|
-
g(" " + m(i.showName || e.i18n2t(
|
|
237
|
-
`designer.widgetLabel.${i.type}`,
|
|
238
|
-
`extension.widgetLabel.${i.type}`
|
|
239
|
-
)), 1)
|
|
240
|
-
])
|
|
241
|
-
], 40, S)
|
|
242
|
-
]),
|
|
243
|
-
_: 1
|
|
244
|
-
}, 8, ["list", "move", "clone"])
|
|
245
|
-
]),
|
|
246
|
-
_: 1
|
|
247
|
-
}, 8, ["header"]),
|
|
248
|
-
t(u, {
|
|
249
|
-
key: "advancedFieldTitle",
|
|
250
|
-
header: e.i18nt("designer.advancedFieldTitle")
|
|
251
|
-
}, {
|
|
252
|
-
default: l(() => [
|
|
253
|
-
t(h, {
|
|
254
|
-
tag: "ul",
|
|
255
|
-
list: o.advancedFields,
|
|
256
|
-
"item-key": "key",
|
|
257
|
-
group: { name: "dragGroup", pull: "clone", put: !1 },
|
|
258
|
-
move: s.checkFieldMove,
|
|
259
|
-
clone: s.handleFieldWidgetClone,
|
|
260
|
-
"ghost-class": "ghost",
|
|
261
|
-
sort: !1
|
|
262
|
-
}, {
|
|
263
|
-
item: l(({ element: i }) => [
|
|
264
|
-
a("li", {
|
|
265
|
-
class: "field-widget-item",
|
|
266
|
-
title: i.displayName,
|
|
267
|
-
onDblclick: (y) => s.addFieldByDbClick(i)
|
|
268
|
-
}, [
|
|
269
|
-
a("span", null, [
|
|
270
|
-
t(d, {
|
|
271
|
-
"icon-class": "icon-" + i.icon,
|
|
272
|
-
class: "color-svg-icon"
|
|
273
|
-
}, null, 8, ["icon-class"]),
|
|
274
|
-
g(" " + m(i.showName || e.i18n2t(
|
|
275
|
-
`designer.widgetLabel.${i.type}`,
|
|
276
|
-
`extension.widgetLabel.${i.type}`
|
|
277
|
-
)), 1)
|
|
278
|
-
])
|
|
279
|
-
], 40, V)
|
|
280
|
-
]),
|
|
281
|
-
_: 1
|
|
282
|
-
}, 8, ["list", "move", "clone"])
|
|
283
|
-
]),
|
|
284
|
-
_: 1
|
|
285
|
-
}, 8, ["header"]),
|
|
286
|
-
b("", !0),
|
|
287
|
-
o.customFields.length ? (F(), E(u, {
|
|
288
|
-
key: "customFieldTitle",
|
|
289
|
-
header: e.i18nt("designer.customFieldTitle")
|
|
290
|
-
}, {
|
|
291
|
-
default: l(() => [
|
|
292
|
-
t(h, {
|
|
293
|
-
tag: "ul",
|
|
294
|
-
list: o.customFields,
|
|
295
|
-
"item-key": "key",
|
|
296
|
-
group: { name: "dragGroup", pull: "clone", put: !1 },
|
|
297
|
-
move: s.checkFieldMove,
|
|
298
|
-
clone: s.handleFieldWidgetClone,
|
|
299
|
-
"ghost-class": "ghost",
|
|
300
|
-
sort: !1
|
|
301
|
-
}, {
|
|
302
|
-
item: l(({ element: i }) => [
|
|
303
|
-
a("li", {
|
|
304
|
-
class: "field-widget-item",
|
|
305
|
-
title: i.displayName,
|
|
306
|
-
onDblclick: (y) => s.addFieldByDbClick(i)
|
|
307
|
-
}, [
|
|
308
|
-
a("span", null, [
|
|
309
|
-
t(d, {
|
|
310
|
-
"icon-class": i.icon,
|
|
311
|
-
class: "color-svg-icon"
|
|
312
|
-
}, null, 8, ["icon-class"]),
|
|
313
|
-
g(" " + m(e.i18n2t(
|
|
314
|
-
`designer.widgetLabel.${i.type}`,
|
|
315
|
-
`extension.widgetLabel.${i.type}`
|
|
316
|
-
)), 1)
|
|
317
|
-
])
|
|
318
|
-
], 40, J)
|
|
319
|
-
]),
|
|
320
|
-
_: 1
|
|
321
|
-
}, 8, ["list", "move", "clone"])
|
|
322
|
-
]),
|
|
323
|
-
_: 1
|
|
324
|
-
}, 8, ["header"])) : b("", !0)
|
|
325
|
-
]),
|
|
326
|
-
_: 1
|
|
327
|
-
}, 8, ["activeKey"])
|
|
328
|
-
]),
|
|
329
|
-
_: 1
|
|
330
|
-
}),
|
|
331
|
-
b("", !0)
|
|
332
|
-
]),
|
|
333
|
-
_: 1
|
|
334
|
-
}, 8, ["activeKey"])
|
|
335
|
-
])
|
|
336
|
-
]);
|
|
337
|
-
}
|
|
338
|
-
const ne = /* @__PURE__ */ K(j, [["render", z], ["__scopeId", "data-v-bf88a5e1"]]);
|
|
3
|
+
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-195b815e"]]);
|
|
339
5
|
export {
|
|
340
|
-
|
|
6
|
+
m as default
|
|
341
7
|
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent as T, ref as d, computed as k, resolveComponent as o, createElementBlock as m, openBlock as l, createElementVNode as p, createVNode as t, withCtx as n, Fragment as F, renderList as K, createBlock as x, createTextVNode as L, unref as _, toDisplayString as N } from "vue";
|
|
2
|
+
import { SvgIcon as B } from "tmgc2-share";
|
|
3
|
+
import C from "./PanelItemDrag.vue.js";
|
|
4
|
+
import { containers as I, basicFields as V, advancedFields as h } from "./widgetsConfig.js";
|
|
5
|
+
import { useI18n as w } from "../../../utils/i18n.js";
|
|
6
|
+
const E = { class: "side-scroll-bar" }, S = { class: "panel-container" }, W = /* @__PURE__ */ T({
|
|
7
|
+
name: "WidgetPanel",
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
designer: Object
|
|
11
|
+
},
|
|
12
|
+
setup(u) {
|
|
13
|
+
const { i18nt: a } = w(), s = d(["containerTitle", "basicFieldTitle", "advancedFieldTitle"]), c = d("componentLib"), v = k(() => [
|
|
14
|
+
{
|
|
15
|
+
title: a("designer.containerTitle"),
|
|
16
|
+
key: "containerTitle",
|
|
17
|
+
items: I.filter((r) => !r.internal)
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: a("designer.basicFieldTitle"),
|
|
21
|
+
key: "basicFieldTitle",
|
|
22
|
+
items: V
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
title: a("designer.advancedFieldTitle"),
|
|
26
|
+
key: "advancedFieldTitle",
|
|
27
|
+
items: h
|
|
28
|
+
}
|
|
29
|
+
]);
|
|
30
|
+
return (r, i) => {
|
|
31
|
+
const f = o("a-collapse-panel"), b = o("a-collapse"), g = o("a-tab-pane"), y = o("a-tabs");
|
|
32
|
+
return l(), m("div", E, [
|
|
33
|
+
p("div", S, [
|
|
34
|
+
t(y, {
|
|
35
|
+
activeKey: c.value,
|
|
36
|
+
"onUpdate:activeKey": i[1] || (i[1] = (e) => c.value = e),
|
|
37
|
+
class: "no-bottom-margin indent-left-margin"
|
|
38
|
+
}, {
|
|
39
|
+
default: n(() => [
|
|
40
|
+
t(g, { key: "componentLib" }, {
|
|
41
|
+
tab: n(() => [
|
|
42
|
+
p("span", null, [
|
|
43
|
+
t(_(B), { "icon-class": "icon-el-set-up" }),
|
|
44
|
+
L(" " + N(_(a)("designer.componentLib")), 1)
|
|
45
|
+
])
|
|
46
|
+
]),
|
|
47
|
+
default: n(() => [
|
|
48
|
+
t(b, {
|
|
49
|
+
activeKey: s.value,
|
|
50
|
+
"onUpdate:activeKey": i[0] || (i[0] = (e) => s.value = e),
|
|
51
|
+
class: "widget-collapse"
|
|
52
|
+
}, {
|
|
53
|
+
default: n(() => [
|
|
54
|
+
(l(!0), m(F, null, K(v.value, (e) => (l(), x(f, {
|
|
55
|
+
key: e.key,
|
|
56
|
+
header: e.title
|
|
57
|
+
}, {
|
|
58
|
+
default: n(() => [
|
|
59
|
+
t(C, {
|
|
60
|
+
designer: u.designer,
|
|
61
|
+
items: e.items
|
|
62
|
+
}, null, 8, ["designer", "items"])
|
|
63
|
+
]),
|
|
64
|
+
_: 2
|
|
65
|
+
}, 1032, ["header"]))), 128))
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
}, 8, ["activeKey"])
|
|
69
|
+
]),
|
|
70
|
+
_: 1
|
|
71
|
+
})
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
}, 8, ["activeKey"])
|
|
75
|
+
])
|
|
76
|
+
]);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
export {
|
|
81
|
+
W as default
|
|
82
|
+
};
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { basicFieldsEnums as
|
|
2
|
-
import * as
|
|
1
|
+
import { basicFieldsEnums as a } from "./basicFieldsEnums.js";
|
|
2
|
+
import * as s from "./business/index.js";
|
|
3
3
|
import * as d from "./containers/index.js";
|
|
4
|
-
import { advancedFieldsEnums as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { advancedFieldsEnums as c } from "./advancedFieldsEnums.js";
|
|
5
|
+
const i = Object.values(d).map((e) => e()), n = Object.values(a).map((e) => e());
|
|
6
|
+
Object.values(s).map((e) => e());
|
|
7
|
+
const t = Object.values(c).map((e) => e()), o = [];
|
|
8
|
+
function p(e) {
|
|
9
|
+
i.push(e);
|
|
8
10
|
}
|
|
9
|
-
function
|
|
10
|
-
n.push(
|
|
11
|
+
function l(e) {
|
|
12
|
+
n.push(e);
|
|
11
13
|
}
|
|
12
|
-
function
|
|
13
|
-
t.push(
|
|
14
|
+
function r(e) {
|
|
15
|
+
t.push(e);
|
|
14
16
|
}
|
|
15
|
-
function
|
|
16
|
-
o.push(
|
|
17
|
+
function f(e) {
|
|
18
|
+
o.push(e);
|
|
17
19
|
}
|
|
18
20
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
r as addAdvancedFieldSchema,
|
|
22
|
+
l as addBasicFieldSchema,
|
|
23
|
+
p as addContainerWidgetSchema,
|
|
24
|
+
f as addCustomWidgetSchema,
|
|
23
25
|
t as advancedFields,
|
|
24
26
|
n as basicFields,
|
|
25
|
-
|
|
26
|
-
c as containers,
|
|
27
|
+
i as containers,
|
|
27
28
|
o as customFields
|
|
28
29
|
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { defineComponent as U, mergeModels as W, useModel as C, createElementBlock as i, openBlock as r, Fragment as m, renderList as d, createBlock as p, resolveDynamicComponent as f, unref as u, createSlots as g, withCtx as v, renderSlot as M, mergeProps as k } from "vue";
|
|
2
|
+
import { useFormRender as $ } from "../FormRender/useFormRender.js";
|
|
3
|
+
const F = /* @__PURE__ */ U({
|
|
4
|
+
name: "RenderWigetList",
|
|
5
|
+
__name: "RenderWigetList",
|
|
6
|
+
props: /* @__PURE__ */ W({
|
|
7
|
+
widgetList: { default: () => [] },
|
|
8
|
+
parentWidget: { default: null }
|
|
9
|
+
}, {
|
|
10
|
+
formDataModel: {
|
|
11
|
+
default: () => ({})
|
|
12
|
+
},
|
|
13
|
+
formDataModelModifiers: {}
|
|
14
|
+
}),
|
|
15
|
+
emits: ["update:formDataModel"],
|
|
16
|
+
setup(y) {
|
|
17
|
+
const a = C(y, "formDataModel"), { getContainerWidget: D, getFieldWidget: L } = $();
|
|
18
|
+
return (n, o) => (r(!0), i(m, null, d(n.widgetList, (e, s) => (r(), i(m, null, [
|
|
19
|
+
e.category === "container" ? (r(), p(f(u(D)(e)), {
|
|
20
|
+
widget: e,
|
|
21
|
+
key: e.id,
|
|
22
|
+
data: a.value[e.options.name],
|
|
23
|
+
"onUpdate:data": (t) => a.value[e.options.name] = t,
|
|
24
|
+
"parent-list": n.parentWidget,
|
|
25
|
+
"index-of-parent-list": s,
|
|
26
|
+
"parent-widget": e,
|
|
27
|
+
model: a.value,
|
|
28
|
+
"onUpdate:model": o[0] || (o[0] = (t) => a.value = t)
|
|
29
|
+
}, g({ _: 2 }, [
|
|
30
|
+
d(Object.keys(n.$slots), (t) => ({
|
|
31
|
+
name: t,
|
|
32
|
+
fn: v((l) => [
|
|
33
|
+
M(n.$slots, t, k({ ref_for: !0 }, l))
|
|
34
|
+
])
|
|
35
|
+
}))
|
|
36
|
+
]), 1064, ["widget", "data", "onUpdate:data", "parent-list", "index-of-parent-list", "parent-widget", "model"])) : (r(), p(f(u(L)(e)), {
|
|
37
|
+
field: e,
|
|
38
|
+
"form-model": a.value,
|
|
39
|
+
"onUpdate:formModel": o[1] || (o[1] = (t) => a.value = t),
|
|
40
|
+
designer: null,
|
|
41
|
+
key: e.id,
|
|
42
|
+
widget: e,
|
|
43
|
+
"parent-list": n.widgetList,
|
|
44
|
+
"index-of-parent-list": s,
|
|
45
|
+
"parent-widget": e,
|
|
46
|
+
data: a.value[e.options.name],
|
|
47
|
+
"onUpdate:data": (t) => a.value[e.options.name] = t
|
|
48
|
+
}, g({ _: 2 }, [
|
|
49
|
+
d(Object.keys(n.$slots), (t) => ({
|
|
50
|
+
name: t,
|
|
51
|
+
fn: v((l) => [
|
|
52
|
+
M(n.$slots, t, k({ ref_for: !0 }, l))
|
|
53
|
+
])
|
|
54
|
+
}))
|
|
55
|
+
]), 1064, ["field", "form-model", "widget", "parent-list", "index-of-parent-list", "parent-widget", "data", "onUpdate:data"]))
|
|
56
|
+
], 64))), 256));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
F as default
|
|
61
|
+
};
|