@farris/ui-vue 1.3.4 → 1.3.6
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/components/accordion/index.esm.js +16 -16
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +65 -65
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +13 -13
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +504 -490
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +247 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +356 -344
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +159 -145
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +127 -128
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +15 -15
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +101 -87
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +9 -7
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +181 -167
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +746 -730
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +9 -7
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +789 -777
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3096 -3069
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +257 -243
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +322 -306
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +177 -163
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +78 -82
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +501 -487
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +37 -37
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +487 -472
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +440 -433
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +594 -587
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +2766 -2739
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +402 -388
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +201 -202
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +264 -245
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +157 -143
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +314 -298
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +862 -843
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1031 -1015
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +169 -155
- package/components/nav/index.umd.cjs +2 -2
- package/components/number-range/index.esm.js +150 -137
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +207 -194
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +427 -414
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +22 -22
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +510 -492
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +192 -178
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +234 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +288 -277
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +62 -61
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +776 -770
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +296 -283
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +222 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +187 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +554 -542
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +483 -469
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +634 -619
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +228 -214
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +419 -406
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +162 -148
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +308 -284
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +279 -265
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +183 -170
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +307 -294
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +320 -306
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +245 -231
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +260 -247
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +409 -396
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +424 -410
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +383 -376
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +595 -575
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +325 -311
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +304 -290
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +99 -85
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +947 -933
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +5492 -5470
- package/farris.all.umd.cjs +13 -13
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/condition/src/composition/condition-value/input-group-value.d.ts +1 -1
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
|
@@ -1,101 +1,115 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var b = (n, t, e) =>
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import { useTextBox as Z, useClear as
|
|
7
|
-
import { DgControl as
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
const { properties: t, title: e, ignore:
|
|
11
|
-
if (e && (!
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
return
|
|
1
|
+
var H = Object.defineProperty;
|
|
2
|
+
var Q = (n, t, e) => t in n ? H(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var b = (n, t, e) => Q(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { defineComponent as q, ref as P, computed as L, onMounted as O, createVNode as E, withDirectives as J, vModelText as Y, inject as U } from "vue";
|
|
5
|
+
import { isPlainObject as x, cloneDeep as A } from "lodash-es";
|
|
6
|
+
import { useTextBox as Z, useClear as R, withInstall as K } from "../common/index.esm.js";
|
|
7
|
+
import { DgControl as G } from "../designer-canvas/index.esm.js";
|
|
8
|
+
const W = {}, j = {};
|
|
9
|
+
function N(n) {
|
|
10
|
+
const { properties: t, title: e, ignore: o } = n, r = o && Array.isArray(o), i = Object.keys(t).reduce((l, y) => ((!r || !o.find((f) => f === y)) && (l[y] = t[y].type === "object" && t[y].properties ? N(t[y]) : A(t[y].default)), l), {});
|
|
11
|
+
if (e && (!r || !o.find((l) => l === "id"))) {
|
|
12
|
+
const l = e.toLowerCase().replace(/-/g, "_");
|
|
13
|
+
i.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
14
|
+
}
|
|
15
|
+
return i;
|
|
16
|
+
}
|
|
17
|
+
function ee(n) {
|
|
18
|
+
const { properties: t, title: e, required: o } = n;
|
|
19
|
+
if (o && Array.isArray(o)) {
|
|
20
|
+
const r = o.reduce((i, l) => (i[l] = t[l].type === "object" && t[l].properties ? N(t[l]) : A(t[l].default), i), {});
|
|
21
|
+
if (e && o.find((i) => i === "id")) {
|
|
22
|
+
const i = e.toLowerCase().replace(/-/g, "_");
|
|
23
|
+
r.id = `${i}_${Math.random().toString().slice(2, 6)}`;
|
|
24
|
+
}
|
|
25
|
+
return r;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
type: e
|
|
29
|
+
};
|
|
16
30
|
}
|
|
17
31
|
function z(n, t = {}, e) {
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
let
|
|
21
|
-
const
|
|
22
|
-
return
|
|
32
|
+
const o = W[n];
|
|
33
|
+
if (o) {
|
|
34
|
+
let r = ee(o);
|
|
35
|
+
const i = j[n];
|
|
36
|
+
return r = i ? i({ getSchemaByType: z }, r, t, e) : r, r;
|
|
23
37
|
}
|
|
24
38
|
return null;
|
|
25
39
|
}
|
|
26
|
-
function ee(n, t) {
|
|
27
|
-
const e = A(t);
|
|
28
|
-
return Object.keys(e).reduce((a, o) => (a[o] && $(a[o]) && $(n[o] || !n[o]) ? Object.assign(a[o], n[o] || {}) : a[o] = n[o], a), e), e;
|
|
29
|
-
}
|
|
30
40
|
function te(n, t) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
const e = N(t);
|
|
42
|
+
return Object.keys(e).reduce((o, r) => (Object.prototype.hasOwnProperty.call(n, r) && (o[r] && x(o[r]) && x(n[r] || !n[r]) ? Object.assign(o[r], n[r] || {}) : o[r] = n[r]), o), e), e;
|
|
43
|
+
}
|
|
44
|
+
function ne(n, t) {
|
|
45
|
+
return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
|
|
46
|
+
if (t.has(r)) {
|
|
47
|
+
const i = t.get(r);
|
|
48
|
+
if (typeof i == "string")
|
|
49
|
+
o[i] = n[r];
|
|
36
50
|
else {
|
|
37
|
-
const
|
|
38
|
-
Object.assign(
|
|
51
|
+
const l = i(r, n[r], n);
|
|
52
|
+
Object.assign(o, l);
|
|
39
53
|
}
|
|
40
54
|
} else
|
|
41
|
-
|
|
42
|
-
return
|
|
55
|
+
o[r] = n[r];
|
|
56
|
+
return o;
|
|
43
57
|
}, {});
|
|
44
58
|
}
|
|
45
|
-
function
|
|
46
|
-
const
|
|
47
|
-
return
|
|
59
|
+
function oe(n, t, e = /* @__PURE__ */ new Map()) {
|
|
60
|
+
const o = te(n, t);
|
|
61
|
+
return ne(o, e);
|
|
48
62
|
}
|
|
49
|
-
function
|
|
50
|
-
function t(
|
|
51
|
-
if (typeof
|
|
52
|
-
return p[
|
|
53
|
-
if (typeof
|
|
54
|
-
const m = Object.keys(
|
|
63
|
+
function re(n = {}) {
|
|
64
|
+
function t(s, c, a, p) {
|
|
65
|
+
if (typeof a == "number")
|
|
66
|
+
return p[s].length === a;
|
|
67
|
+
if (typeof a == "object") {
|
|
68
|
+
const m = Object.keys(a)[0], d = a[m];
|
|
55
69
|
if (m === "not")
|
|
56
|
-
return Number(p[
|
|
70
|
+
return Number(p[s].length) !== Number(d);
|
|
57
71
|
if (m === "moreThan")
|
|
58
|
-
return Number(p[
|
|
72
|
+
return Number(p[s].length) >= Number(d);
|
|
59
73
|
if (m === "lessThan")
|
|
60
|
-
return Number(p[
|
|
74
|
+
return Number(p[s].length) <= Number(d);
|
|
61
75
|
}
|
|
62
76
|
return !1;
|
|
63
77
|
}
|
|
64
|
-
function e(
|
|
65
|
-
return p[
|
|
78
|
+
function e(s, c, a, p) {
|
|
79
|
+
return p[s] && p[s].propertyValue && String(p[s].propertyValue.value) === String(a);
|
|
66
80
|
}
|
|
67
|
-
const
|
|
81
|
+
const o = /* @__PURE__ */ new Map([
|
|
68
82
|
["length", t],
|
|
69
83
|
["getProperty", e]
|
|
70
84
|
]);
|
|
71
|
-
Object.keys(n).reduce((
|
|
72
|
-
function
|
|
73
|
-
const
|
|
74
|
-
return typeof c == "number" ? [{ target:
|
|
85
|
+
Object.keys(n).reduce((s, c) => (s.set(c, n[c]), s), o);
|
|
86
|
+
function r(s, c) {
|
|
87
|
+
const a = s;
|
|
88
|
+
return typeof c == "number" ? [{ target: a, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: a, operator: "getProperty", param: s, value: !!c }] : typeof c == "object" ? Object.keys(c).map((p) => {
|
|
75
89
|
if (p === "length")
|
|
76
|
-
return { target:
|
|
90
|
+
return { target: a, operator: "length", param: null, value: c[p] };
|
|
77
91
|
const m = p, d = c[p];
|
|
78
|
-
return { target:
|
|
92
|
+
return { target: a, operator: "getProperty", param: m, value: d };
|
|
79
93
|
}) : [];
|
|
80
94
|
}
|
|
81
|
-
function
|
|
82
|
-
return Object.keys(
|
|
83
|
-
const m =
|
|
84
|
-
return
|
|
95
|
+
function i(s) {
|
|
96
|
+
return Object.keys(s).reduce((a, p) => {
|
|
97
|
+
const m = r(p, s[p]);
|
|
98
|
+
return a.push(...m), a;
|
|
85
99
|
}, []);
|
|
86
100
|
}
|
|
87
|
-
function s
|
|
88
|
-
if (
|
|
89
|
-
const
|
|
90
|
-
return
|
|
101
|
+
function l(s, c) {
|
|
102
|
+
if (o.has(s.operator)) {
|
|
103
|
+
const a = o.get(s.operator);
|
|
104
|
+
return a && a(s.target, s.param, s.value, c) || !1;
|
|
91
105
|
}
|
|
92
106
|
return !1;
|
|
93
107
|
}
|
|
94
|
-
function y(
|
|
95
|
-
return
|
|
108
|
+
function y(s, c) {
|
|
109
|
+
return i(s).reduce((m, d) => m && l(d, c), !0);
|
|
96
110
|
}
|
|
97
|
-
function f(
|
|
98
|
-
const
|
|
111
|
+
function f(s, c) {
|
|
112
|
+
const a = Object.keys(s), p = a.includes("allOf"), m = a.includes("anyOf"), d = p || m, v = (d ? s[d ? p ? "allOf" : "anyOf" : "allOf"] : [s]).map((k) => y(k, c));
|
|
99
113
|
return p ? !v.includes(!1) : v.includes(!0);
|
|
100
114
|
}
|
|
101
115
|
return { parseValueSchema: f };
|
|
@@ -140,20 +154,20 @@ const u = {
|
|
|
140
154
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
141
155
|
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
142
156
|
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
function
|
|
146
|
-
return
|
|
147
|
-
const y =
|
|
157
|
+
}, ae = {}, ie = {};
|
|
158
|
+
re();
|
|
159
|
+
function le(n, t, e = /* @__PURE__ */ new Map(), o = (l, y, f, s) => y, r = {}, i = (l) => l) {
|
|
160
|
+
return W[t.title] = t, j[t.title] = o, ae[t.title] = r, ie[t.title] = i, (l = {}) => {
|
|
161
|
+
const y = oe(l, t, e), f = Object.keys(n).reduce((s, c) => (s[c] = n[c].default, s), {});
|
|
148
162
|
return Object.assign(f, y);
|
|
149
163
|
};
|
|
150
164
|
}
|
|
151
|
-
function
|
|
165
|
+
function se(n, t) {
|
|
152
166
|
return { customClass: t.class, customStyle: t.style };
|
|
153
167
|
}
|
|
154
|
-
const
|
|
155
|
-
["appearance",
|
|
156
|
-
]),
|
|
168
|
+
const ce = /* @__PURE__ */ new Map([
|
|
169
|
+
["appearance", se]
|
|
170
|
+
]), pe = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-design.gitee.io/switch.schema.json", de = "textarea", me = "A Farris Component", ye = "object", fe = {
|
|
157
171
|
id: {
|
|
158
172
|
description: "The unique identifier for a textarea",
|
|
159
173
|
type: "string"
|
|
@@ -224,28 +238,27 @@ const se = /* @__PURE__ */ new Map([
|
|
|
224
238
|
type: "boolean",
|
|
225
239
|
default: !0
|
|
226
240
|
}
|
|
227
|
-
},
|
|
228
|
-
"id",
|
|
241
|
+
}, he = [
|
|
229
242
|
"type"
|
|
230
|
-
],
|
|
243
|
+
], ge = [
|
|
231
244
|
"id",
|
|
232
245
|
"appearance",
|
|
233
246
|
"binding",
|
|
234
247
|
"visible"
|
|
235
|
-
],
|
|
236
|
-
$schema:
|
|
237
|
-
$id:
|
|
238
|
-
title:
|
|
239
|
-
description:
|
|
240
|
-
type:
|
|
241
|
-
properties:
|
|
242
|
-
required:
|
|
243
|
-
ignore:
|
|
248
|
+
], be = {
|
|
249
|
+
$schema: pe,
|
|
250
|
+
$id: ue,
|
|
251
|
+
title: de,
|
|
252
|
+
description: me,
|
|
253
|
+
type: ye,
|
|
254
|
+
properties: fe,
|
|
255
|
+
required: he,
|
|
256
|
+
ignore: ge
|
|
244
257
|
};
|
|
245
|
-
function
|
|
258
|
+
function ve(n, t, e) {
|
|
246
259
|
return t;
|
|
247
260
|
}
|
|
248
|
-
const
|
|
261
|
+
const $ = {
|
|
249
262
|
/** 是否撑开高度 */
|
|
250
263
|
autoHeight: { type: Boolean, default: !1 },
|
|
251
264
|
/** 自动聚焦 */
|
|
@@ -276,37 +289,37 @@ const N = {
|
|
|
276
289
|
showBorder: { Type: Boolean, default: !0 },
|
|
277
290
|
/** 键盘按键索引 */
|
|
278
291
|
tabIndex: { type: Number, default: -1 }
|
|
279
|
-
}, X =
|
|
292
|
+
}, X = le($, be, ce, ve), I = /* @__PURE__ */ q({
|
|
280
293
|
name: "FTextarea",
|
|
281
|
-
props:
|
|
294
|
+
props: $,
|
|
282
295
|
emits: ["update:modelValue", "valueChange"],
|
|
283
296
|
setup(n, t) {
|
|
284
|
-
const e =
|
|
285
|
-
inputGroupClass:
|
|
297
|
+
const e = P(), o = P(n.modelValue), r = L(() => n.modelValue), i = Z(n, t, o, r), {
|
|
298
|
+
inputGroupClass: l,
|
|
286
299
|
onBlur: y,
|
|
287
300
|
onFocus: f
|
|
288
|
-
} =
|
|
301
|
+
} = i, s = R(n, t, i), {
|
|
289
302
|
onMouseEnter: c,
|
|
290
|
-
onMouseLeave:
|
|
303
|
+
onMouseLeave: a,
|
|
291
304
|
clearButtonClass: p,
|
|
292
305
|
shouldShowClearButton: m,
|
|
293
306
|
clearButtonStyle: d
|
|
294
|
-
} =
|
|
307
|
+
} = s, g = L(() => n.maxLength ? n.maxLength : n.modelValue.length), C = (k) => {
|
|
295
308
|
var F, h;
|
|
296
309
|
k.stopPropagation(), t.emit("update:modelValue", (F = k.target) == null ? void 0 : F.value), t.emit("valueChange", (h = k.target) == null ? void 0 : h.value);
|
|
297
310
|
}, v = (k) => {
|
|
298
311
|
k.stopPropagation(), e.value.value = "", t.emit("update:modelValue", ""), t.emit("valueChange", "");
|
|
299
|
-
}, M =
|
|
312
|
+
}, M = L(() => ({
|
|
300
313
|
"form-control": !0,
|
|
301
314
|
"h-100": n.autoHeight
|
|
302
315
|
}));
|
|
303
316
|
return t.expose({
|
|
304
317
|
elementRef: e
|
|
305
|
-
}),
|
|
318
|
+
}), O(() => {
|
|
306
319
|
}), () => E("div", {
|
|
307
|
-
class:
|
|
320
|
+
class: l.value,
|
|
308
321
|
onMouseenter: c,
|
|
309
|
-
onMouseleave:
|
|
322
|
+
onMouseleave: a,
|
|
310
323
|
style: "position:relative"
|
|
311
324
|
}, [J(E("textarea", {
|
|
312
325
|
class: M.value,
|
|
@@ -337,10 +350,10 @@ const N = {
|
|
|
337
350
|
}, [`${n.modelValue.length}/${g.value}`])]);
|
|
338
351
|
}
|
|
339
352
|
});
|
|
340
|
-
function
|
|
353
|
+
function Ce(n, t, e) {
|
|
341
354
|
var F;
|
|
342
|
-
const
|
|
343
|
-
function
|
|
355
|
+
const o = e && e.getStyles && e.getStyles() || "", r = e && e.getDesignerClass && e.getDesignerClass() || "", i = P();
|
|
356
|
+
function l() {
|
|
344
357
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
345
358
|
}
|
|
346
359
|
function y() {
|
|
@@ -349,7 +362,7 @@ function ve(n, t, e) {
|
|
|
349
362
|
function f() {
|
|
350
363
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
|
|
351
364
|
}
|
|
352
|
-
function
|
|
365
|
+
function s() {
|
|
353
366
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
354
367
|
}
|
|
355
368
|
function c(h) {
|
|
@@ -357,12 +370,12 @@ function ve(n, t, e) {
|
|
|
357
370
|
return null;
|
|
358
371
|
if (h.value.schema && h.value.schema.type === "component")
|
|
359
372
|
return h.value;
|
|
360
|
-
const w =
|
|
373
|
+
const w = P(h == null ? void 0 : h.value.parent), S = c(w);
|
|
361
374
|
return S || null;
|
|
362
375
|
}
|
|
363
|
-
function
|
|
376
|
+
function a(h = t) {
|
|
364
377
|
const { componentInstance: w, designerItemElementRef: S } = h;
|
|
365
|
-
return !w || !w.value ? null : w.value.canMove ? S :
|
|
378
|
+
return !w || !w.value ? null : w.value.canMove ? S : a(h.parent);
|
|
366
379
|
}
|
|
367
380
|
function p(h) {
|
|
368
381
|
return !!e && e.canAccepts(h);
|
|
@@ -397,32 +410,32 @@ function ve(n, t, e) {
|
|
|
397
410
|
(T = S == null ? void 0 : S.componentInstance) != null && T.value.onRemoveComponent && S.componentInstance.value.onRemoveComponent();
|
|
398
411
|
});
|
|
399
412
|
}
|
|
400
|
-
return
|
|
401
|
-
canMove:
|
|
413
|
+
return i.value = {
|
|
414
|
+
canMove: l(),
|
|
402
415
|
canSelectParent: y(),
|
|
403
416
|
canDelete: f(),
|
|
404
|
-
canNested: !
|
|
417
|
+
canNested: !s(),
|
|
405
418
|
contents: t == null ? void 0 : t.schema.contents,
|
|
406
419
|
elementRef: n,
|
|
407
420
|
parent: (F = t == null ? void 0 : t.parent) == null ? void 0 : F.componentInstance,
|
|
408
421
|
schema: t == null ? void 0 : t.schema,
|
|
409
|
-
styles:
|
|
410
|
-
designerClass:
|
|
422
|
+
styles: o,
|
|
423
|
+
designerClass: r,
|
|
411
424
|
canAccepts: p,
|
|
412
425
|
getBelongedComponentInstance: c,
|
|
413
|
-
getDraggableDesignItemElement:
|
|
426
|
+
getDraggableDesignItemElement: a,
|
|
414
427
|
getDraggingDisplayText: m,
|
|
415
428
|
getPropConfig: M,
|
|
416
429
|
getDragScopeElement: d,
|
|
417
430
|
onAcceptMovedChildElement: g,
|
|
418
431
|
onChildElementMovedOut: v,
|
|
419
432
|
addNewChildComponentSchema: C,
|
|
420
|
-
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved ||
|
|
421
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
433
|
+
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || P(!1),
|
|
434
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || P(!1),
|
|
422
435
|
onRemoveComponent: k
|
|
423
|
-
},
|
|
436
|
+
}, i;
|
|
424
437
|
}
|
|
425
|
-
class
|
|
438
|
+
class Me {
|
|
426
439
|
constructor(t, e) {
|
|
427
440
|
b(this, "componentId");
|
|
428
441
|
b(this, "viewModelId");
|
|
@@ -439,22 +452,22 @@ class Ce {
|
|
|
439
452
|
type: "object",
|
|
440
453
|
categories: {}
|
|
441
454
|
});
|
|
442
|
-
var
|
|
443
|
-
this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((
|
|
455
|
+
var o;
|
|
456
|
+
this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
444
457
|
}
|
|
445
458
|
getTableInfo() {
|
|
446
459
|
var t;
|
|
447
460
|
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
448
461
|
}
|
|
449
462
|
setDesignViewModelField(t) {
|
|
450
|
-
var
|
|
463
|
+
var o;
|
|
451
464
|
const e = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
452
465
|
if (e) {
|
|
453
466
|
if (!this.designViewModelField) {
|
|
454
|
-
const
|
|
455
|
-
this.designViewModelField =
|
|
467
|
+
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
468
|
+
this.designViewModelField = r.fields.find((i) => i.id === e);
|
|
456
469
|
}
|
|
457
|
-
t.updateOn = (
|
|
470
|
+
t.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn;
|
|
458
471
|
}
|
|
459
472
|
}
|
|
460
473
|
changeFieldEditorType(t, e) {
|
|
@@ -511,19 +524,19 @@ class Ce {
|
|
|
511
524
|
* @returns
|
|
512
525
|
*/
|
|
513
526
|
updateElementByParentContainer(t, e) {
|
|
514
|
-
const
|
|
515
|
-
if (!
|
|
527
|
+
const o = e && e.parent && e.parent.schema;
|
|
528
|
+
if (!o)
|
|
516
529
|
return;
|
|
517
|
-
const
|
|
518
|
-
|
|
530
|
+
const r = o.contents.findIndex((l) => l.id === t), i = A(o.contents[r]);
|
|
531
|
+
o.contents.splice(r, 1), o.contents.splice(r, 0, i);
|
|
519
532
|
}
|
|
520
533
|
}
|
|
521
|
-
const
|
|
534
|
+
const B = class B {
|
|
522
535
|
/**
|
|
523
536
|
* 根据绑定字段类型获取可用的输入类控件
|
|
524
537
|
*/
|
|
525
538
|
static getEditorTypesByMDataType(t) {
|
|
526
|
-
const e =
|
|
539
|
+
const e = B.fieldControlTypeMapping[t];
|
|
527
540
|
return e || [{ key: "", value: "" }];
|
|
528
541
|
}
|
|
529
542
|
/**
|
|
@@ -531,9 +544,9 @@ const P = class P {
|
|
|
531
544
|
*/
|
|
532
545
|
static getAllInputTypes() {
|
|
533
546
|
const t = [];
|
|
534
|
-
for (const e in
|
|
535
|
-
|
|
536
|
-
t.find((
|
|
547
|
+
for (const e in B.fieldControlTypeMapping)
|
|
548
|
+
B.fieldControlTypeMapping[e].forEach((o) => {
|
|
549
|
+
t.find((r) => r.key === o.key && r.value === o.value) || t.push({ key: o.key, value: o.value });
|
|
537
550
|
});
|
|
538
551
|
return t;
|
|
539
552
|
}
|
|
@@ -541,7 +554,7 @@ const P = class P {
|
|
|
541
554
|
/**
|
|
542
555
|
* <字段类型,可配置的控件类型列表>的映射
|
|
543
556
|
*/
|
|
544
|
-
b(
|
|
557
|
+
b(B, "fieldControlTypeMapping", {
|
|
545
558
|
String: [
|
|
546
559
|
{ key: u["input-group"].type, value: u["input-group"].name },
|
|
547
560
|
{ key: u.lookup.type, value: u.lookup.name },
|
|
@@ -588,9 +601,9 @@ b(P, "fieldControlTypeMapping", {
|
|
|
588
601
|
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
589
602
|
]
|
|
590
603
|
});
|
|
591
|
-
let V =
|
|
592
|
-
const
|
|
593
|
-
class
|
|
604
|
+
let V = B;
|
|
605
|
+
const ke = P(0);
|
|
606
|
+
class we {
|
|
594
607
|
constructor() {
|
|
595
608
|
/** 控件标题 */
|
|
596
609
|
b(this, "label", "");
|
|
@@ -620,66 +633,66 @@ class ke {
|
|
|
620
633
|
b(this, "fieldSetId", "");
|
|
621
634
|
}
|
|
622
635
|
}
|
|
623
|
-
function
|
|
636
|
+
function Se(n) {
|
|
624
637
|
let t, e;
|
|
625
|
-
const
|
|
626
|
-
let
|
|
627
|
-
function
|
|
638
|
+
const o = /* @__PURE__ */ new Map();
|
|
639
|
+
let r = [];
|
|
640
|
+
function i(c, a) {
|
|
628
641
|
const m = c.split(" ").filter((M) => M.startsWith("col-"));
|
|
629
642
|
if (m.length === 0) {
|
|
630
|
-
|
|
643
|
+
a.isSupportedClass = !1;
|
|
631
644
|
return;
|
|
632
645
|
}
|
|
633
646
|
let d = m.find((M) => /^col-([1-9]|10|11|12)$/.test(M)), g = m.find((M) => /^col-md-([1-9]|10|11|12)$/.test(M)), C = m.find((M) => /^col-xl-([1-9]|10|11|12)$/.test(M)), v = m.find((M) => /^col-el-([1-9]|10|11|12)$/.test(M));
|
|
634
|
-
d = d || "col-12",
|
|
647
|
+
d = d || "col-12", a.columnInSM = parseInt(d.replace("col-", ""), 10), a.displayWidthInSM = a.columnInSM / 12, a.displayWidthInSM !== 1 && (a.isSupportedClass = !1), g = g || "col-md-" + a.columnInSM, a.columnInMD = parseInt(g.replace("col-md-", ""), 10), a.displayWidthInMD = a.columnInMD / 6, [1, 2].includes(a.displayWidthInMD) || (a.isSupportedClass = !1), C = C || "col-xl-" + a.columnInMD, a.columnInLG = parseInt(C.replace("col-xl-", ""), 10), a.displayWidthInLG = a.columnInLG / 3, [1, 2, 3, 4].includes(a.displayWidthInLG) || (a.isSupportedClass = !1), v = v || "col-el-" + a.columnInLG, a.columnInEL = parseInt(v.replace("col-el-", ""), 10), a.displayWidthInEL = a.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(a.displayWidthInEL) || (a.isSupportedClass = !1);
|
|
635
648
|
}
|
|
636
|
-
function
|
|
649
|
+
function l(c, a, p, m = !1) {
|
|
637
650
|
let d = !1;
|
|
638
651
|
c.contents.forEach((g) => {
|
|
639
652
|
if (g.type === "fieldset") {
|
|
640
|
-
p += 1,
|
|
653
|
+
p += 1, l(g, a, p, !0), d = !0;
|
|
641
654
|
return;
|
|
642
655
|
}
|
|
643
656
|
d && (p += 1, d = !1);
|
|
644
|
-
const C = g.appearance && g.appearance.class, v = new
|
|
645
|
-
C ?
|
|
657
|
+
const C = g.appearance && g.appearance.class, v = new we();
|
|
658
|
+
C ? i(C, v) : v.isSupportedClass = !1, v.label = g.label || g.id, v.id = g.id, v.group = p, m && (v.fieldSetId = c.id), e === g.id && (t = p), o.set(g.id, g), a.push(v);
|
|
646
659
|
});
|
|
647
660
|
}
|
|
648
661
|
function y(c) {
|
|
649
|
-
const
|
|
650
|
-
if (!
|
|
662
|
+
const a = n.getComponentById(c);
|
|
663
|
+
if (!a || !a.componentType || !a.componentType.startsWith("form"))
|
|
651
664
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
652
|
-
const p = n.selectNode(
|
|
665
|
+
const p = n.selectNode(a, (m) => m.type === G["response-form"].type);
|
|
653
666
|
return !p || !p.contents || p.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: p };
|
|
654
667
|
}
|
|
655
|
-
function f(c,
|
|
656
|
-
|
|
657
|
-
const { result: p, message: m, formNode: d } = y(
|
|
668
|
+
function f(c, a) {
|
|
669
|
+
a = a || c.id;
|
|
670
|
+
const { result: p, message: m, formNode: d } = y(a);
|
|
658
671
|
if (!p)
|
|
659
672
|
return { result: p, message: m };
|
|
660
|
-
e = c.id,
|
|
661
|
-
const g = d.contents[0].type ===
|
|
662
|
-
|
|
663
|
-
const C =
|
|
673
|
+
e = c.id, r = [], o.clear();
|
|
674
|
+
const g = d.contents[0].type === G.fieldset.type ? 0 : 1;
|
|
675
|
+
l(d, r, g);
|
|
676
|
+
const C = r.find((M) => !M.isSupportedClass);
|
|
664
677
|
return {
|
|
665
678
|
defaultState: {
|
|
666
679
|
defaultGroupNumber: t || 1,
|
|
667
680
|
model: C ? "customize" : "standard"
|
|
668
681
|
},
|
|
669
|
-
importData:
|
|
682
|
+
importData: r
|
|
670
683
|
};
|
|
671
684
|
}
|
|
672
|
-
function
|
|
673
|
-
|
|
674
|
-
const { result: p, formNode: m } = y(
|
|
685
|
+
function s(c, a) {
|
|
686
|
+
a = a;
|
|
687
|
+
const { result: p, formNode: m } = y(a);
|
|
675
688
|
if (!p)
|
|
676
689
|
return "";
|
|
677
690
|
const d = [];
|
|
678
691
|
return c.forEach((g) => {
|
|
679
692
|
var M;
|
|
680
|
-
const C =
|
|
693
|
+
const C = o.get(g.id), v = C.appearance && C.appearance.class;
|
|
681
694
|
if (v) {
|
|
682
|
-
const F = v.split(" ").filter((
|
|
695
|
+
const F = v.split(" ").filter((_) => !_.startsWith("col-")), h = "col-" + g.columnInSM, w = "col-md-" + g.columnInMD, S = "col-xl-" + g.columnInLG, T = "col-el-" + g.columnInEL, D = [h, w, S, T].concat(F);
|
|
683
696
|
C.appearance.class = D.join(" ");
|
|
684
697
|
}
|
|
685
698
|
if (g.fieldSetId) {
|
|
@@ -692,23 +705,23 @@ function we(n) {
|
|
|
692
705
|
return {
|
|
693
706
|
checkCanFindFormNode: y,
|
|
694
707
|
checkCanOpenLayoutEditor: f,
|
|
695
|
-
changeFormControlsByResponseLayoutConfig:
|
|
696
|
-
getResonseFormLayoutConfig:
|
|
708
|
+
changeFormControlsByResponseLayoutConfig: s,
|
|
709
|
+
getResonseFormLayoutConfig: l
|
|
697
710
|
};
|
|
698
711
|
}
|
|
699
|
-
class
|
|
700
|
-
constructor(e,
|
|
701
|
-
super(e,
|
|
712
|
+
class Te extends Me {
|
|
713
|
+
constructor(e, o) {
|
|
714
|
+
super(e, o);
|
|
702
715
|
b(this, "responseLayoutEditorFunction");
|
|
703
|
-
this.responseLayoutEditorFunction =
|
|
716
|
+
this.responseLayoutEditorFunction = Se(this.formSchemaUtils);
|
|
704
717
|
}
|
|
705
|
-
getPropertyConfig(e,
|
|
706
|
-
return this.propertyConfig.categories.basic = this.getBasicProperties(e,
|
|
718
|
+
getPropertyConfig(e, o) {
|
|
719
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, o), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, o), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
707
720
|
}
|
|
708
|
-
getBasicProperties(e,
|
|
709
|
-
var
|
|
710
|
-
const
|
|
711
|
-
return this.setDesignViewModelField(e),
|
|
721
|
+
getBasicProperties(e, o) {
|
|
722
|
+
var i;
|
|
723
|
+
const r = this;
|
|
724
|
+
return this.setDesignViewModelField(e), {
|
|
712
725
|
description: "Basic Information",
|
|
713
726
|
title: "基本信息",
|
|
714
727
|
properties: {
|
|
@@ -729,7 +742,7 @@ class Se extends Ce {
|
|
|
729
742
|
textField: "value",
|
|
730
743
|
valueField: "key",
|
|
731
744
|
editable: !1,
|
|
732
|
-
data:
|
|
745
|
+
data: r.designViewModelField ? V.getEditorTypesByMDataType((i = r.designViewModelField.type) == null ? void 0 : i.name) : V.getAllInputTypes()
|
|
733
746
|
}
|
|
734
747
|
},
|
|
735
748
|
label: {
|
|
@@ -754,23 +767,23 @@ class Se extends Ce {
|
|
|
754
767
|
}
|
|
755
768
|
}
|
|
756
769
|
},
|
|
757
|
-
setPropertyRelates(
|
|
758
|
-
if (
|
|
759
|
-
switch (
|
|
770
|
+
setPropertyRelates(l, y) {
|
|
771
|
+
if (l)
|
|
772
|
+
switch (l && l.propertyID) {
|
|
760
773
|
case "type": {
|
|
761
|
-
|
|
774
|
+
r.changeControlType(e, l, o);
|
|
762
775
|
break;
|
|
763
776
|
}
|
|
764
777
|
case "label": {
|
|
765
|
-
|
|
778
|
+
l.needRefreshControlTree = !0;
|
|
766
779
|
break;
|
|
767
780
|
}
|
|
768
781
|
}
|
|
769
782
|
}
|
|
770
783
|
};
|
|
771
784
|
}
|
|
772
|
-
getAppearanceProperties(e,
|
|
773
|
-
const
|
|
785
|
+
getAppearanceProperties(e, o) {
|
|
786
|
+
const r = this;
|
|
774
787
|
return {
|
|
775
788
|
title: "样式",
|
|
776
789
|
description: "Appearance",
|
|
@@ -796,18 +809,18 @@ class Se extends Ce {
|
|
|
796
809
|
refreshPanelAfterChanged: !0,
|
|
797
810
|
editor: {
|
|
798
811
|
type: "response-layout-editor-setting",
|
|
799
|
-
initialState:
|
|
812
|
+
initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, r.componentId)
|
|
800
813
|
}
|
|
801
814
|
}
|
|
802
815
|
},
|
|
803
|
-
setPropertyRelates(
|
|
804
|
-
if (
|
|
805
|
-
switch (
|
|
816
|
+
setPropertyRelates(i, l) {
|
|
817
|
+
if (i)
|
|
818
|
+
switch (i && i.propertyID) {
|
|
806
819
|
case "responseLayout":
|
|
807
|
-
|
|
820
|
+
r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(i.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, o), delete e.responseLayout;
|
|
808
821
|
break;
|
|
809
822
|
case "class":
|
|
810
|
-
|
|
823
|
+
r.updateUnifiedLayoutAfterControlChanged(i.propertyValue, e.id, this.componentId), r.updateElementByParentContainer(e.id, o);
|
|
811
824
|
break;
|
|
812
825
|
}
|
|
813
826
|
}
|
|
@@ -821,44 +834,44 @@ class Se extends Ce {
|
|
|
821
834
|
* @param propertyData 控件DOM属性
|
|
822
835
|
* @param newControlType 新控件类型
|
|
823
836
|
*/
|
|
824
|
-
changeControlType(e,
|
|
825
|
-
var c,
|
|
826
|
-
const
|
|
827
|
-
if (!
|
|
837
|
+
changeControlType(e, o, r) {
|
|
838
|
+
var c, a, p, m;
|
|
839
|
+
const i = o.propertyValue, l = r && r.parent && r.parent.schema;
|
|
840
|
+
if (!l)
|
|
828
841
|
return;
|
|
829
|
-
const y =
|
|
830
|
-
let
|
|
842
|
+
const y = l.contents.findIndex((d) => d.id === e.id), f = l.contents[y];
|
|
843
|
+
let s;
|
|
831
844
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
832
845
|
editor: {
|
|
833
|
-
$type:
|
|
846
|
+
$type: i
|
|
834
847
|
},
|
|
835
848
|
name: this.designViewModelField.name,
|
|
836
849
|
require: this.designViewModelField.require,
|
|
837
850
|
readonly: this.designViewModelField.readonly
|
|
838
|
-
}, !1),
|
|
851
|
+
}, !1), s = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, i)), s || (s = this.controlCreatorUtils.createFormGroupWithoutField(i)), Object.assign(s, {
|
|
839
852
|
id: f.id,
|
|
840
853
|
appearance: f.appearance,
|
|
841
854
|
size: f.size,
|
|
842
855
|
label: f.label,
|
|
843
856
|
binding: f.binding,
|
|
844
857
|
visible: f.visible
|
|
845
|
-
}), Object.assign(
|
|
846
|
-
isTextArea:
|
|
858
|
+
}), Object.assign(s.editor, {
|
|
859
|
+
isTextArea: s.isTextArea && f.isTextArea,
|
|
847
860
|
placeholder: (c = f.editor) == null ? void 0 : c.placeholder,
|
|
848
|
-
holdPlace: (
|
|
861
|
+
holdPlace: (a = f.editor) == null ? void 0 : a.holdPlace,
|
|
849
862
|
readonly: (p = f.editor) == null ? void 0 : p.readonly,
|
|
850
863
|
require: (m = f.editor) == null ? void 0 : m.require
|
|
851
|
-
}),
|
|
864
|
+
}), l.contents.splice(y, 1), l.contents.splice(y, 0, s), r.schema = Object.assign(f, s), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
852
865
|
(d) => d.classList.remove("dgComponentSelected")
|
|
853
|
-
),
|
|
866
|
+
), ke.value++;
|
|
854
867
|
}
|
|
855
|
-
getComponentConfig(e,
|
|
856
|
-
const
|
|
868
|
+
getComponentConfig(e, o = {}, r = {}) {
|
|
869
|
+
const i = Object.assign({
|
|
857
870
|
description: "编辑器",
|
|
858
871
|
title: "编辑器",
|
|
859
872
|
type: "input-group",
|
|
860
873
|
$converter: "/converter/property-editor.converter"
|
|
861
|
-
},
|
|
874
|
+
}, o), l = Object.assign({
|
|
862
875
|
readonly: {
|
|
863
876
|
description: "",
|
|
864
877
|
title: "只读",
|
|
@@ -879,8 +892,8 @@ class Se extends Ce {
|
|
|
879
892
|
title: "提示文本",
|
|
880
893
|
type: "string"
|
|
881
894
|
}
|
|
882
|
-
},
|
|
883
|
-
return { ...
|
|
895
|
+
}, r);
|
|
896
|
+
return { ...i, properties: { ...l } };
|
|
884
897
|
}
|
|
885
898
|
/**
|
|
886
899
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -888,37 +901,37 @@ class Se extends Ce {
|
|
|
888
901
|
* @param controlId 控件Id
|
|
889
902
|
* @param componentId 控件所在组件id
|
|
890
903
|
*/
|
|
891
|
-
updateUnifiedLayoutAfterControlChanged(e,
|
|
892
|
-
const
|
|
893
|
-
let
|
|
894
|
-
|
|
904
|
+
updateUnifiedLayoutAfterControlChanged(e, o, r) {
|
|
905
|
+
const i = e.split(" ");
|
|
906
|
+
let l = i.find((a) => /^col-([1-9]|10|11|12)$/.test(a)), y = i.find((a) => /^col-md-([1-9]|10|11|12)$/.test(a)), f = i.find((a) => /^col-xl-([1-9]|10|11|12)$/.test(a)), s = i.find((a) => /^col-el-([1-9]|10|11|12)$/.test(a));
|
|
907
|
+
l = l || "col-12", y = y || "col-md-" + l.replace("col-", ""), f = f || "col-xl-" + y.replace("col-md-", ""), s = s || "col-el-" + f.replace("col-xl-", "");
|
|
895
908
|
const c = {
|
|
896
|
-
id:
|
|
897
|
-
columnInSM: parseInt(
|
|
909
|
+
id: o,
|
|
910
|
+
columnInSM: parseInt(l.replace("col-", ""), 10),
|
|
898
911
|
columnInMD: parseInt(y.replace("col-md-", ""), 10),
|
|
899
912
|
columnInLG: parseInt(f.replace("col-xl-", ""), 10),
|
|
900
|
-
columnInEL: parseInt(
|
|
913
|
+
columnInEL: parseInt(s.replace("col-el-", ""), 10)
|
|
901
914
|
};
|
|
902
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
915
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(r, c);
|
|
903
916
|
}
|
|
904
917
|
/**
|
|
905
918
|
* 修改控件布局配置后更新Form统一布局配置
|
|
906
919
|
* @param componentId 组件Id
|
|
907
920
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
908
921
|
*/
|
|
909
|
-
updateUnifiedLayoutAfterResponseLayoutChanged(e,
|
|
910
|
-
const { formNode:
|
|
911
|
-
if (!
|
|
922
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, o) {
|
|
923
|
+
const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
924
|
+
if (!r || !r.unifiedLayout)
|
|
912
925
|
return;
|
|
913
|
-
const
|
|
914
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(
|
|
915
|
-
const d =
|
|
916
|
-
Object.assign(d || {},
|
|
926
|
+
const i = [];
|
|
927
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, i, 1), o) {
|
|
928
|
+
const d = i.find((g) => g.id === o.id);
|
|
929
|
+
Object.assign(d || {}, o);
|
|
917
930
|
}
|
|
918
|
-
const
|
|
919
|
-
Object.assign(
|
|
931
|
+
const l = i.map((d) => d.columnInSM), y = i.map((d) => d.columnInMD), f = i.map((d) => d.columnInLG), s = i.map((d) => d.columnInEL), c = this.checkIsUniqueColumn(l) ? l[0] : null, a = this.checkIsUniqueColumn(y) ? y[0] : null, p = this.checkIsUniqueColumn(f) ? f[0] : null, m = this.checkIsUniqueColumn(s) ? s[0] : null;
|
|
932
|
+
Object.assign(r.unifiedLayout, {
|
|
920
933
|
uniqueColClassInSM: c,
|
|
921
|
-
uniqueColClassInMD:
|
|
934
|
+
uniqueColClassInMD: a,
|
|
922
935
|
uniqueColClassInLG: p,
|
|
923
936
|
uniqueColClassInEL: m
|
|
924
937
|
});
|
|
@@ -927,11 +940,11 @@ class Se extends Ce {
|
|
|
927
940
|
* 校验宽度样式值是否一致
|
|
928
941
|
*/
|
|
929
942
|
checkIsUniqueColumn(e) {
|
|
930
|
-
const
|
|
931
|
-
return Array.from(
|
|
943
|
+
const o = new Set(e);
|
|
944
|
+
return Array.from(o).length === 1;
|
|
932
945
|
}
|
|
933
946
|
}
|
|
934
|
-
class
|
|
947
|
+
class Fe extends Te {
|
|
935
948
|
constructor(t, e) {
|
|
936
949
|
super(t, e);
|
|
937
950
|
}
|
|
@@ -950,21 +963,21 @@ class Te extends Se {
|
|
|
950
963
|
});
|
|
951
964
|
}
|
|
952
965
|
}
|
|
953
|
-
function
|
|
966
|
+
function Ee(n, t) {
|
|
954
967
|
const e = n.schema;
|
|
955
|
-
function
|
|
956
|
-
return new
|
|
968
|
+
function o(r, i) {
|
|
969
|
+
return new Fe(r, t).getPropertyConfig(e, i);
|
|
957
970
|
}
|
|
958
|
-
return { getPropsConfig:
|
|
971
|
+
return { getPropsConfig: o };
|
|
959
972
|
}
|
|
960
|
-
const
|
|
973
|
+
const Pe = /* @__PURE__ */ q({
|
|
961
974
|
name: "FTextareaDesign",
|
|
962
|
-
props:
|
|
975
|
+
props: $,
|
|
963
976
|
emits: [""],
|
|
964
977
|
setup(n, t) {
|
|
965
|
-
const e =
|
|
978
|
+
const e = P(), o = U("designer-host-service"), r = U("design-item-context"), i = Ee(r, o), l = Ce(e, r, i), y = L(() => n.maxLength ? n.maxLength : n.modelValue.length), f = L(() => ({
|
|
966
979
|
position: "relative"
|
|
967
|
-
})),
|
|
980
|
+
})), s = L(() => ({
|
|
968
981
|
"box-shadow": "0 0 0 1px #dcdfe6 inset",
|
|
969
982
|
border: "none",
|
|
970
983
|
padding: "5px 10px",
|
|
@@ -974,9 +987,9 @@ const Ee = /* @__PURE__ */ G({
|
|
|
974
987
|
bottom: "5px",
|
|
975
988
|
right: "10px"
|
|
976
989
|
};
|
|
977
|
-
return
|
|
978
|
-
e.value.componentInstance =
|
|
979
|
-
}), t.expose(
|
|
990
|
+
return O(() => {
|
|
991
|
+
e.value.componentInstance = l;
|
|
992
|
+
}), t.expose(l.value), () => E("div", {
|
|
980
993
|
style: f.value,
|
|
981
994
|
ref: e
|
|
982
995
|
}, [E("textarea", {
|
|
@@ -984,7 +997,7 @@ const Ee = /* @__PURE__ */ G({
|
|
|
984
997
|
tabindex: n.tabIndex,
|
|
985
998
|
disabled: !1,
|
|
986
999
|
readonly: !0,
|
|
987
|
-
style:
|
|
1000
|
+
style: s.value,
|
|
988
1001
|
placeholder: n.placeholder,
|
|
989
1002
|
rows: n.rows
|
|
990
1003
|
}, null), n.showCount && E("span", {
|
|
@@ -992,16 +1005,16 @@ const Ee = /* @__PURE__ */ G({
|
|
|
992
1005
|
}, [`${n.modelValue.length}/${y.value}`])]);
|
|
993
1006
|
}
|
|
994
1007
|
});
|
|
995
|
-
|
|
996
|
-
n.textarea =
|
|
1008
|
+
I.register = (n, t, e, o) => {
|
|
1009
|
+
n.textarea = I, t.textarea = X;
|
|
997
1010
|
};
|
|
998
|
-
|
|
999
|
-
n.textarea =
|
|
1011
|
+
I.registerDesigner = (n, t, e) => {
|
|
1012
|
+
n.textarea = Pe, t.textarea = X;
|
|
1000
1013
|
};
|
|
1001
|
-
const
|
|
1014
|
+
const Ae = K(I);
|
|
1002
1015
|
export {
|
|
1003
|
-
|
|
1004
|
-
|
|
1016
|
+
I as FTextarea,
|
|
1017
|
+
Ae as default,
|
|
1005
1018
|
X as propsResolver,
|
|
1006
|
-
|
|
1019
|
+
$ as textAreaProps
|
|
1007
1020
|
};
|