@kp-ui/lowcode 2.14.0-alpha.4 → 2.14.0-beta

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.
Files changed (57) hide show
  1. package/install.js +24 -45
  2. package/package.json +1 -1
  3. package/src/components/form-designer/form-widget/container-widget/container-wrapper.vue.js +17 -17
  4. package/src/components/form-designer/form-widget/container-widget/grid-col-widget.vue.js +10 -10
  5. package/src/components/form-designer/form-widget/container-widget/index.js +6 -7
  6. package/src/components/form-designer/form-widget/container-widget/table-cell-widget.vue.js +9 -9
  7. package/src/components/form-designer/form-widget/field-widget/button-widget.vue.js +2 -2
  8. package/src/components/form-designer/form-widget/field-widget/diy-compontent-widget.vue.js +1 -1
  9. package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue.js +32 -32
  10. package/src/components/form-designer/form-widget/field-widget/input-widget.vue.js +3 -3
  11. package/src/components/form-designer/form-widget/field-widget/select-widget.vue.js +7 -7
  12. package/src/components/form-designer/form-widget/field-widget/static-content-wrapper.vue.js +18 -18
  13. package/src/components/form-designer/index.vue.js +21 -25
  14. package/src/components/form-designer/setting-panel/index.vue.js +55 -54
  15. package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue2.js +10 -10
  16. package/src/components/form-designer/setting-panel/property-editor/buttonIcon-editor.vue.js +14 -11
  17. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +2 -2
  18. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +116 -118
  19. package/src/components/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue.js +11 -11
  20. package/src/components/form-designer/setting-panel/property-editor/field-button/danger-editor.vue.js +13 -11
  21. package/src/components/form-designer/setting-panel/property-editor/field-button/ghost-editor.vue.js +15 -13
  22. package/src/components/form-designer/setting-panel/property-editor/field-button/icon-editor.vue.js +17 -14
  23. package/src/components/form-designer/setting-panel/property-editor/field-button/shape-editor.vue.js +14 -12
  24. package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue.js +15 -11
  25. package/src/components/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue.js +2 -2
  26. package/src/components/form-designer/setting-panel/property-editor/field-picture-upload/picture-upload-fileTypes-editor.vue.js +2 -2
  27. package/src/components/form-designer/setting-panel/property-editor/field-treeSelect/treeSelect-treeDefaultExpandAll-editor.vue.js +16 -14
  28. package/src/components/form-designer/setting-panel/property-editor/labelIconClass-editor.vue.js +16 -13
  29. package/src/components/form-designer/setting-panel/property-editor/name-editor.vue.js +7 -3
  30. package/src/components/form-designer/setting-panel/property-editor/placement-editor.vue.js +24 -22
  31. package/src/components/form-designer/setting-panel/property-editor/validation-editor.vue.js +15 -12
  32. package/src/components/form-designer/toolbar-panel/index.vue.js +2 -2
  33. package/src/components/form-designer/toolbar-panel/index.vue2.js +66 -67
  34. package/src/components/form-designer/widget-panel/advanced/data-table.js +6 -1
  35. package/src/components/form-designer/widget-panel/basicFields/color.js +2 -7
  36. package/src/components/form-designer/widget-panel/index.vue.js +16 -16
  37. package/src/components/form-render/index.vue.js +10 -10
  38. package/src/components/http-editor/index.vue.js +27 -23
  39. package/src/components/public/ActionButtonListRender.vue.js +24 -19
  40. package/src/components/public/ActionButtonListRender.vue2.js +1 -1
  41. package/src/lang/en-US.js +17 -0
  42. package/src/lang/zh-CN.js +17 -0
  43. package/stats.html +1 -1
  44. package/styles/style.css +1 -1
  45. package/types/install.d.ts +3 -14
  46. package/src/components/form-render/container-item/data-table-item.vue.js +0 -149
  47. package/src/components/form-render/container-item/grid-col-item.vue.js +0 -149
  48. package/src/components/form-render/container-item/grid-item.vue.js +0 -92
  49. package/src/components/form-render/container-item/grid-sub-form-item.vue.js +0 -319
  50. package/src/components/form-render/container-item/index.js +0 -24
  51. package/src/components/form-render/container-item/sub-form-item.vue.js +0 -429
  52. package/src/components/form-render/container-item/tab-item.vue.js +0 -160
  53. package/src/components/form-render/container-item/table-cell-item.vue.js +0 -95
  54. package/src/components/form-render/container-item/table-item.vue.js +0 -96
  55. package/src/components/form-render/container-item/vf-collapse-item.vue.js +0 -252
  56. package/src/components/form-render/container-item/vf-dialog-item.vue.js +0 -12
  57. package/src/components/form-render/container-item/vf-drawer-item.vue.js +0 -12
@@ -1,96 +0,0 @@
1
- import _ from "../../../utils/emitter.js";
2
- import x from "../../../utils/i18n.js";
3
- import I from "../refMixin.js";
4
- import C from "./container-item-wrapper.vue.js";
5
- import y from "./table-cell-item.vue.js";
6
- import h from "./containerItemMixin.js";
7
- import { resolveComponent as s, createBlock as c, openBlock as t, withCtx as u, withDirectives as F, createElementBlock as r, createElementVNode as f, normalizeClass as k, Fragment as n, renderList as i, createCommentVNode as R, createSlots as v, renderSlot as L, mergeProps as N, vShow as S } from "vue";
8
- /* empty css */
9
- import j from "../../../../_virtual/_plugin-vue_export-helper.js";
10
- const B = {
11
- name: "table-item",
12
- componentName: "ContainerItem",
13
- mixins: [_, x, I, h],
14
- components: {
15
- ContainerItemWrapper: C,
16
- TableCellItem: y
17
- },
18
- props: {
19
- widget: Object,
20
- subFormRowIndex: {
21
- /* 子表单组件行索引,从0开始计数 */
22
- type: Number,
23
- default: -1
24
- },
25
- subFormColIndex: {
26
- /* 子表单组件列索引,从0开始计数 */
27
- type: Number,
28
- default: -1
29
- },
30
- subFormRowId: {
31
- /* 子表单组件行Id,唯一id且不可变 */
32
- type: String,
33
- default: ""
34
- }
35
- },
36
- inject: ["refList", "sfRefList", "globalModel"],
37
- created() {
38
- this.initRefList();
39
- },
40
- mounted() {
41
- },
42
- beforeUnmount() {
43
- this.unregisterFromRefList();
44
- },
45
- methods: {}
46
- };
47
- function M(o, E, e, O, V, z) {
48
- const w = s("table-cell-item"), b = s("container-item-wrapper");
49
- return t(), c(b, { widget: e.widget }, {
50
- default: u(() => [
51
- F((t(), r("div", {
52
- key: e.widget.id,
53
- class: "table-container"
54
- }, [
55
- f("table", {
56
- ref: e.widget.id,
57
- class: k(["table-layout", [o.customClass]])
58
- }, [
59
- f("tbody", null, [
60
- (t(!0), r(n, null, i(e.widget.rows, (m, g) => (t(), r("tr", {
61
- key: m.id
62
- }, [
63
- (t(!0), r(n, null, i(m.cols, (d, l) => (t(), r(n, null, [
64
- d.merged ? R("", !0) : (t(), c(w, {
65
- widget: d,
66
- key: l,
67
- "parent-list": e.widget.cols,
68
- "row-index": g,
69
- "col-index": l,
70
- "parent-widget": e.widget,
71
- "sub-form-row-id": e.subFormRowId,
72
- "sub-form-row-index": e.subFormRowIndex,
73
- "sub-form-col-index": e.subFormColIndex
74
- }, v({ _: 2 }, [
75
- i(Object.keys(o.$slots), (a) => ({
76
- name: a,
77
- fn: u((p) => [
78
- L(o.$slots, a, N({ ref_for: !0 }, p), void 0, !0)
79
- ])
80
- }))
81
- ]), 1032, ["widget", "parent-list", "row-index", "col-index", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index"]))
82
- ], 64))), 256))
83
- ]))), 128))
84
- ])
85
- ], 2)
86
- ])), [
87
- [S, !e.widget.options.hidden]
88
- ])
89
- ]),
90
- _: 3
91
- }, 8, ["widget"]);
92
- }
93
- const K = /* @__PURE__ */ j(B, [["render", M], ["__scopeId", "data-v-48955c34"]]);
94
- export {
95
- K as default
96
- };
@@ -1,252 +0,0 @@
1
- import L from "./container-item-wrapper.vue.js";
2
- import I from "../../../utils/emitter.js";
3
- import { defineAsyncComponent as j, resolveComponent as f, withDirectives as F, createBlock as s, openBlock as i, withCtx as d, createElementVNode as C, createVNode as c, createElementBlock as m, createCommentVNode as y, normalizeClass as S, Fragment as u, renderList as l, resolveDynamicComponent as g, createSlots as p, renderSlot as w, mergeProps as h, Transition as D, normalizeStyle as N, vShow as O } from "vue";
4
- import M from "../../../utils/i18n.js";
5
- import T from "../../form-designer/form-widget/field-widget/index.js";
6
- import B from "../refMixin.js";
7
- import V from "./containerItemMixin.js";
8
- import { TpfCollapseTitle as z } from "tmgc2-share";
9
- import J from "../../svg-icon/index.vue.js";
10
- /* empty css */
11
- /* empty css */
12
- /* empty css */
13
- import A from "../../../../_virtual/_plugin-vue_export-helper.js";
14
- const E = {
15
- name: "VfCollapseItem",
16
- componentName: "ContainerItem",
17
- // 必须固定为ContainerItem,用于接收父级组件的broadcast事件
18
- mixins: [I, M, B, V],
19
- components: {
20
- ContainerItemWrapper: L,
21
- TpfCollapseTitle: z,
22
- SvgIcon: J,
23
- ...T,
24
- VFormRender: j(() => import("../index.vue.js"))
25
- },
26
- props: {
27
- widget: Object,
28
- parentWidget: Object,
29
- parentList: Array,
30
- indexOfParentList: Number,
31
- model: {
32
- type: Object,
33
- default: () => ({})
34
- },
35
- subFormRowIndex: {
36
- /* 子表单组件行索引,从0开始计数 */
37
- type: Number,
38
- default: -1
39
- },
40
- subFormColIndex: {
41
- /* 子表单组件列索引,从0开始计数 */
42
- type: Number,
43
- default: -1
44
- },
45
- subFormRowId: {
46
- /* 子表单组件行Id,唯一id且不可变 */
47
- type: String,
48
- default: ""
49
- },
50
- formJson: {
51
- type: Object
52
- },
53
- formData: {
54
- type: Object,
55
- default: () => ({})
56
- },
57
- optionData: {
58
- //prop传入的选项数据
59
- type: Object,
60
- default: () => ({})
61
- },
62
- globalDsv: {
63
- // 全局数据源变量
64
- type: Object,
65
- default: () => ({})
66
- },
67
- parentFormRef: {
68
- type: Object,
69
- default: null
70
- },
71
- extraData: {
72
- type: Object,
73
- default: () => ({})
74
- },
75
- wrapperId: {
76
- type: String,
77
- default: null
78
- }
79
- },
80
- inject: ["refList", "sfRefList", "globalModel", "getFormConfig", "getGlobalDsv"],
81
- data() {
82
- return {};
83
- },
84
- computed: {
85
- rightSlotCss() {
86
- return this.widget.options.rightSlotCss || "";
87
- },
88
- formConfig() {
89
- return this.getFormConfig();
90
- }
91
- },
92
- created() {
93
- this.initRefList(), this.handleOnCreated();
94
- },
95
- mounted() {
96
- this.loadFormCode(this.widget.options.formCode), this.$nextTick(() => {
97
- this.handleOnMounted();
98
- });
99
- },
100
- beforeUnmount() {
101
- this.unregisterFromRefList();
102
- },
103
- methods: {
104
- toggleCollapse() {
105
- this.widget.options.isCollapse = !this.widget.options.isCollapse;
106
- },
107
- async loadFormCode(t) {
108
- if (t) {
109
- const _ = await this.$http.get("/api/tmgc2-query/dataQuery/detail/FormDefinitionManagement", {
110
- params: { code: t }
111
- }).then((e) => e.data.object.frontendDefinition || "{}");
112
- this.$refs.dFormRef.setFormJson(JSON.parse(_));
113
- }
114
- },
115
- handleOnCreated() {
116
- this.widget.options.onCreated && new Function(this.widget.options.onCreated).call(this);
117
- },
118
- handleOnMounted() {
119
- this.widget.options.onMounted && new Function(this.widget.options.onMounted).call(this);
120
- },
121
- getFormRef() {
122
- return this.$refs.dFormRef;
123
- }
124
- }
125
- }, P = { class: "tpf-collapse" }, q = { class: "tpf-collapse-header" };
126
- function G(t, _, e, Q, U, b) {
127
- const R = f("TpfCollapseTitle"), v = f("SvgIcon"), k = f("a-space"), x = f("container-item-wrapper");
128
- return F((i(), s(x, { widget: e.widget }, {
129
- default: d(() => [
130
- C("div", P, [
131
- C("div", q, [
132
- c(k, { size: 5 }, {
133
- default: d(() => [
134
- c(R, {
135
- title: e.widget.options.title
136
- }, null, 8, ["title"]),
137
- c(v, {
138
- "icon-class": e.widget.options.isCollapse ? e.widget.options.collapseIcon : e.widget.options.unCollapseIcon,
139
- size: "24px",
140
- shadow: "",
141
- cursor: "",
142
- onClick: b.toggleCollapse
143
- }, null, 8, ["icon-class", "onClick"])
144
- ]),
145
- _: 1
146
- }),
147
- e.widget.options.isCollapse ? y("", !0) : (i(), m("div", {
148
- key: 0,
149
- class: S(["header-right", b.rightSlotCss])
150
- }, [
151
- e.widget.headerRightSlotList && e.widget.headerRightSlotList.length > 0 ? (i(!0), m(u, { key: 0 }, l(e.widget.headerRightSlotList, (n, a) => (i(), m(u, null, [
152
- n.category === "container" ? (i(), s(g(t.getComponentByContainer(n)), {
153
- widget: n,
154
- key: a,
155
- "parent-list": e.widget.headerRightSlotList,
156
- "index-of-parent-list": a,
157
- "parent-widget": e.widget,
158
- "sub-form-row-id": e.subFormRowId,
159
- "sub-form-row-index": e.subFormRowIndex,
160
- "sub-form-col-index": e.subFormColIndex,
161
- data: e.model[e.widget.options.name]
162
- }, p({ _: 2 }, [
163
- l(Object.keys(t.$slots), (o) => ({
164
- name: o,
165
- fn: d((r) => [
166
- w(t.$slots, o, h({ ref_for: !0 }, r), void 0, !0)
167
- ])
168
- }))
169
- ]), 1032, ["widget", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index", "data"])) : (i(), s(g(n.type + "-widget"), {
170
- field: n,
171
- designer: null,
172
- key: a,
173
- "parent-list": e.widget.headerRightSlotList,
174
- "index-of-parent-list": a,
175
- "parent-widget": e.widget
176
- }, p({ _: 2 }, [
177
- l(Object.keys(t.$slots), (o) => ({
178
- name: o,
179
- fn: d((r) => [
180
- w(t.$slots, o, h({ ref_for: !0 }, r), void 0, !0)
181
- ])
182
- }))
183
- ]), 1032, ["field", "parent-list", "index-of-parent-list", "parent-widget"]))
184
- ], 64))), 256)) : y("", !0)
185
- ], 2))
186
- ]),
187
- c(D, {
188
- mode: "out-in",
189
- appear: "",
190
- "enter-active-class": "animate__animated animate__fadeIn animate__faster",
191
- "leave-active-class": "animate__animated animate__fadeOut animate__faster"
192
- }, {
193
- default: d(() => [
194
- F(C("div", {
195
- class: S(["tpf-collapse-content"]),
196
- style: N({
197
- height: e.widget.options.height || "unset",
198
- ...JSON.parse(e.widget.options.bodyStyle || "{}")
199
- })
200
- }, [
201
- e.widget.defaultSlotsList && e.widget.defaultSlotsList.length > 0 ? (i(!0), m(u, { key: 0 }, l(e.widget.defaultSlotsList, (n, a) => (i(), m(u, null, [
202
- n.category === "container" ? (i(), s(g(t.getComponentByContainer(n)), {
203
- widget: n,
204
- key: a,
205
- "parent-list": e.widget.defaultSlotsList,
206
- "index-of-parent-list": a,
207
- "parent-widget": e.widget,
208
- "sub-form-row-id": e.subFormRowId,
209
- "sub-form-row-index": e.subFormRowIndex,
210
- "sub-form-col-index": e.subFormColIndex,
211
- data: e.model[n.options.name],
212
- model: e.model
213
- }, p({ _: 2 }, [
214
- l(Object.keys(t.$slots), (o) => ({
215
- name: o,
216
- fn: d((r) => [
217
- w(t.$slots, o, h({ ref_for: !0 }, r), void 0, !0)
218
- ])
219
- }))
220
- ]), 1032, ["widget", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index", "data", "model"])) : (i(), s(g(n.type + "-widget"), {
221
- field: n,
222
- designer: null,
223
- key: a,
224
- "parent-list": e.widget.defaultSlotsList,
225
- "index-of-parent-list": a,
226
- "parent-widget": e.widget
227
- }, p({ _: 2 }, [
228
- l(Object.keys(t.$slots), (o) => ({
229
- name: o,
230
- fn: d((r) => [
231
- w(t.$slots, o, h({ ref_for: !0 }, r), void 0, !0)
232
- ])
233
- }))
234
- ]), 1032, ["field", "parent-list", "index-of-parent-list", "parent-widget"]))
235
- ], 64))), 256)) : y("", !0)
236
- ], 4), [
237
- [O, !e.widget.options.isCollapse]
238
- ])
239
- ]),
240
- _: 3
241
- })
242
- ])
243
- ]),
244
- _: 3
245
- }, 8, ["widget"])), [
246
- [O, !e.widget.options.hidden]
247
- ]);
248
- }
249
- const re = /* @__PURE__ */ A(E, [["render", G], ["__scopeId", "data-v-dd25bb5f"]]);
250
- export {
251
- re as default
252
- };
@@ -1,12 +0,0 @@
1
- import { createCommentVNode as e } from "vue";
2
- import t from "../../../../_virtual/_plugin-vue_export-helper.js";
3
- const o = {
4
- name: "vf-dialog-item"
5
- };
6
- function r(n, a, c, m, f, s) {
7
- return e("", !0);
8
- }
9
- const _ = /* @__PURE__ */ t(o, [["render", r]]);
10
- export {
11
- _ as default
12
- };
@@ -1,12 +0,0 @@
1
- import { createCommentVNode as e } from "vue";
2
- import r from "../../../../_virtual/_plugin-vue_export-helper.js";
3
- const t = {
4
- name: "vf-drawer-item"
5
- };
6
- function o(n, a, c, m, f, s) {
7
- return e("", !0);
8
- }
9
- const d = /* @__PURE__ */ r(t, [["render", o]]);
10
- export {
11
- d as default
12
- };