@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,53 +1,67 @@
|
|
|
1
1
|
var ee = Object.defineProperty;
|
|
2
|
-
var te = (
|
|
3
|
-
var v = (
|
|
4
|
-
import { computed as
|
|
5
|
-
import { isPlainObject as
|
|
2
|
+
var te = (t, n, e) => n in t ? ee(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
|
|
3
|
+
var v = (t, n, e) => te(t, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
+
import { computed as F, ref as T, createVNode as E, onMounted as O, nextTick as q, defineComponent as z, watch as A, inject as G } from "vue";
|
|
5
|
+
import { isPlainObject as $, cloneDeep as x } from "lodash-es";
|
|
6
6
|
import N from "bignumber.js";
|
|
7
7
|
import { DgControl as W } from "../designer-canvas/index.esm.js";
|
|
8
8
|
import { withInstall as ne } from "../common/index.esm.js";
|
|
9
9
|
const Z = {}, X = {};
|
|
10
|
-
function
|
|
11
|
-
const { properties: n, title:
|
|
12
|
-
if (
|
|
13
|
-
const c =
|
|
10
|
+
function j(t) {
|
|
11
|
+
const { properties: n, title: e, ignore: r } = t, i = r && Array.isArray(r), s = Object.keys(n).reduce((c, d) => ((!i || !r.find((m) => m === d)) && (c[d] = n[d].type === "object" && n[d].properties ? j(n[d]) : x(n[d].default)), c), {});
|
|
12
|
+
if (e && (!i || !r.find((c) => c === "id"))) {
|
|
13
|
+
const c = e.toLowerCase().replace(/-/g, "_");
|
|
14
14
|
s.id = `${c}_${Math.random().toString().slice(2, 6)}`;
|
|
15
15
|
}
|
|
16
16
|
return s;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
const r =
|
|
18
|
+
function oe(t) {
|
|
19
|
+
const { properties: n, title: e, required: r } = t;
|
|
20
|
+
if (r && Array.isArray(r)) {
|
|
21
|
+
const i = r.reduce((s, c) => (s[c] = n[c].type === "object" && n[c].properties ? j(n[c]) : x(n[c].default), s), {});
|
|
22
|
+
if (e && r.find((s) => s === "id")) {
|
|
23
|
+
const s = e.toLowerCase().replace(/-/g, "_");
|
|
24
|
+
i.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
25
|
+
}
|
|
26
|
+
return i;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
type: e
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function _(t, n = {}, e) {
|
|
33
|
+
const r = Z[t];
|
|
20
34
|
if (r) {
|
|
21
|
-
let i =
|
|
22
|
-
const s = X[
|
|
23
|
-
return i = s ? s({ getSchemaByType:
|
|
35
|
+
let i = oe(r);
|
|
36
|
+
const s = X[t];
|
|
37
|
+
return i = s ? s({ getSchemaByType: _ }, i, n, e) : i, i;
|
|
24
38
|
}
|
|
25
39
|
return null;
|
|
26
40
|
}
|
|
27
|
-
function
|
|
28
|
-
const
|
|
29
|
-
return Object.keys(
|
|
41
|
+
function re(t, n) {
|
|
42
|
+
const e = j(n);
|
|
43
|
+
return Object.keys(e).reduce((r, i) => (Object.prototype.hasOwnProperty.call(t, i) && (r[i] && $(r[i]) && $(t[i] || !t[i]) ? Object.assign(r[i], t[i] || {}) : r[i] = t[i]), r), e), e;
|
|
30
44
|
}
|
|
31
|
-
function
|
|
32
|
-
return Object.keys(
|
|
45
|
+
function ie(t, n) {
|
|
46
|
+
return Object.keys(t).filter((r) => t[r] != null).reduce((r, i) => {
|
|
33
47
|
if (n.has(i)) {
|
|
34
48
|
const s = n.get(i);
|
|
35
49
|
if (typeof s == "string")
|
|
36
|
-
r[s] =
|
|
50
|
+
r[s] = t[i];
|
|
37
51
|
else {
|
|
38
|
-
const c = s(i,
|
|
52
|
+
const c = s(i, t[i], t);
|
|
39
53
|
Object.assign(r, c);
|
|
40
54
|
}
|
|
41
55
|
} else
|
|
42
|
-
r[i] =
|
|
56
|
+
r[i] = t[i];
|
|
43
57
|
return r;
|
|
44
58
|
}, {});
|
|
45
59
|
}
|
|
46
|
-
function
|
|
47
|
-
const r =
|
|
48
|
-
return
|
|
60
|
+
function ae(t, n, e = /* @__PURE__ */ new Map()) {
|
|
61
|
+
const r = re(t, n);
|
|
62
|
+
return ie(r, e);
|
|
49
63
|
}
|
|
50
|
-
function
|
|
64
|
+
function le(t = {}) {
|
|
51
65
|
function n(a, l, o, u) {
|
|
52
66
|
if (typeof o == "number")
|
|
53
67
|
return u[a].length === o;
|
|
@@ -62,14 +76,14 @@ function ae(e = {}) {
|
|
|
62
76
|
}
|
|
63
77
|
return !1;
|
|
64
78
|
}
|
|
65
|
-
function
|
|
79
|
+
function e(a, l, o, u) {
|
|
66
80
|
return u[a] && u[a].propertyValue && String(u[a].propertyValue.value) === String(o);
|
|
67
81
|
}
|
|
68
82
|
const r = /* @__PURE__ */ new Map([
|
|
69
83
|
["length", n],
|
|
70
|
-
["getProperty",
|
|
84
|
+
["getProperty", e]
|
|
71
85
|
]);
|
|
72
|
-
Object.keys(
|
|
86
|
+
Object.keys(t).reduce((a, l) => (a.set(l, t[l]), a), r);
|
|
73
87
|
function i(a, l) {
|
|
74
88
|
const o = a;
|
|
75
89
|
return typeof l == "number" ? [{ target: o, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: o, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((u) => {
|
|
@@ -141,20 +155,20 @@ const y = {
|
|
|
141
155
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
142
156
|
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
143
157
|
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
function
|
|
147
|
-
return Z[n.title] = n, X[n.title] = r,
|
|
148
|
-
const d =
|
|
158
|
+
}, se = {}, ce = {};
|
|
159
|
+
le();
|
|
160
|
+
function ue(t, n, e = /* @__PURE__ */ new Map(), r = (c, d, m, a) => d, i = {}, s = (c) => c) {
|
|
161
|
+
return Z[n.title] = n, X[n.title] = r, se[n.title] = i, ce[n.title] = s, (c = {}) => {
|
|
162
|
+
const d = ae(c, n, e), m = Object.keys(t).reduce((a, l) => (a[l] = t[l].default, a), {});
|
|
149
163
|
return Object.assign(m, d);
|
|
150
164
|
};
|
|
151
165
|
}
|
|
152
|
-
function
|
|
166
|
+
function pe(t, n) {
|
|
153
167
|
return { customClass: n.class, customStyle: n.style };
|
|
154
168
|
}
|
|
155
|
-
const
|
|
156
|
-
["appearance",
|
|
157
|
-
]),
|
|
169
|
+
const de = /* @__PURE__ */ new Map([
|
|
170
|
+
["appearance", pe]
|
|
171
|
+
]), me = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/number-spinner.schema.json", ye = "number-spinner", ge = "A Farris Input Component", he = "object", be = {
|
|
158
172
|
id: {
|
|
159
173
|
description: "The unique identifier for a number spinner",
|
|
160
174
|
type: "string"
|
|
@@ -255,25 +269,24 @@ const pe = /* @__PURE__ */ new Map([
|
|
|
255
269
|
type: "sting",
|
|
256
270
|
default: ""
|
|
257
271
|
}
|
|
258
|
-
},
|
|
259
|
-
"id",
|
|
272
|
+
}, ve = [
|
|
260
273
|
"type"
|
|
261
|
-
],
|
|
274
|
+
], Ce = [
|
|
262
275
|
"id",
|
|
263
276
|
"appearance",
|
|
264
277
|
"binding",
|
|
265
278
|
"visible"
|
|
266
|
-
],
|
|
267
|
-
$schema:
|
|
268
|
-
$id:
|
|
269
|
-
title:
|
|
270
|
-
description:
|
|
271
|
-
type:
|
|
272
|
-
properties:
|
|
273
|
-
required:
|
|
274
|
-
ignore:
|
|
279
|
+
], Se = {
|
|
280
|
+
$schema: me,
|
|
281
|
+
$id: fe,
|
|
282
|
+
title: ye,
|
|
283
|
+
description: ge,
|
|
284
|
+
type: he,
|
|
285
|
+
properties: be,
|
|
286
|
+
required: ve,
|
|
287
|
+
ignore: Ce
|
|
275
288
|
};
|
|
276
|
-
function
|
|
289
|
+
function we(t, n, e) {
|
|
277
290
|
return n;
|
|
278
291
|
}
|
|
279
292
|
const U = {
|
|
@@ -380,23 +393,23 @@ const U = {
|
|
|
380
393
|
* 作为内嵌编辑器被创建后默认选中文本
|
|
381
394
|
*/
|
|
382
395
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
383
|
-
},
|
|
384
|
-
function
|
|
385
|
-
const { format: i } =
|
|
396
|
+
}, Q = ue(U, Se, de, we);
|
|
397
|
+
function H(t, n, e, r) {
|
|
398
|
+
const { format: i } = e, { displayValue: s, getRealValue: c, modelValue: d, onNumberValueChanged: m } = r;
|
|
386
399
|
function a() {
|
|
387
400
|
const b = new N(d.value || 0);
|
|
388
|
-
return !(
|
|
401
|
+
return !(t.max && !new N(t.max).isNaN() && b.gte(new N(t.max)));
|
|
389
402
|
}
|
|
390
403
|
function l() {
|
|
391
404
|
const b = new N(d.value || 0);
|
|
392
|
-
return !(
|
|
405
|
+
return !(t.min && !new N(t.min).isNaN() && b.lte(new N(t.min)));
|
|
393
406
|
}
|
|
394
407
|
function o(b) {
|
|
395
|
-
if (
|
|
408
|
+
if (t.readonly || t.disabled)
|
|
396
409
|
return;
|
|
397
410
|
const S = b === "up" ? a : l, w = b === "up" ? "plus" : "minus";
|
|
398
411
|
if (S()) {
|
|
399
|
-
const C = new N(d.value || 0)[w](Number(
|
|
412
|
+
const C = new N(d.value || 0)[w](Number(t.step)), h = C.toFixed();
|
|
400
413
|
s.value = i(h), m(c(C));
|
|
401
414
|
}
|
|
402
415
|
}
|
|
@@ -414,28 +427,28 @@ function J(e, n, t, r) {
|
|
|
414
427
|
}
|
|
415
428
|
return { canDownward: l, canUpward: a, downward: f, onClickDownButton: g, onClickUpButton: p, upward: u };
|
|
416
429
|
}
|
|
417
|
-
function
|
|
418
|
-
const r =
|
|
419
|
-
prefix:
|
|
420
|
-
suffix:
|
|
421
|
-
decimalSeparator:
|
|
422
|
-
groupSeparator:
|
|
423
|
-
groupSize:
|
|
424
|
-
})), { getValidNumberObject: i, precision: s } =
|
|
430
|
+
function J(t, n, e) {
|
|
431
|
+
const r = F(() => ({
|
|
432
|
+
prefix: t.prefix,
|
|
433
|
+
suffix: t.suffix,
|
|
434
|
+
decimalSeparator: t.decimalSeparator,
|
|
435
|
+
groupSeparator: t.useThousands ? t.groupSeparator : "",
|
|
436
|
+
groupSize: t.groupSize
|
|
437
|
+
})), { getValidNumberObject: i, precision: s } = e;
|
|
425
438
|
function c(a) {
|
|
426
|
-
return a = a == null || a === "" ? "" : String(a), a = a.replace(new RegExp(
|
|
439
|
+
return a = a == null || a === "" ? "" : String(a), a = a.replace(new RegExp(t.prefix, "g"), "").replace(new RegExp(t.suffix, "g"), "").replace(/,/g, ""), t.groupSeparator && t.groupSeparator !== "," && (a = a.replace(new RegExp(`\\${t.groupSeparator}`, "g"), "")), t.decimalSeparator && t.decimalSeparator !== "." && (a = a.replace(new RegExp(`\\${t.decimalSeparator}`, "g"), ".")), a;
|
|
427
440
|
}
|
|
428
441
|
function d(a, l) {
|
|
429
|
-
return
|
|
442
|
+
return t.precision !== null && t.precision !== void 0 ? a.toFormat(s.value, l) : a.toFormat(l);
|
|
430
443
|
}
|
|
431
444
|
function m(a) {
|
|
432
445
|
const l = c(a), o = new N(l, 10), u = i(o);
|
|
433
|
-
return u.valueOf() === "0" && !
|
|
446
|
+
return u.valueOf() === "0" && !t.showZero || u.isNaN() ? "" : t.formatter ? t.formatter(u.toNumber()) : d(u, r.value);
|
|
434
447
|
}
|
|
435
448
|
return { cleanFormat: c, format: m };
|
|
436
449
|
}
|
|
437
|
-
function
|
|
438
|
-
const
|
|
450
|
+
function Y(t, n) {
|
|
451
|
+
const e = T(""), r = T(t.modelValue), i = F(() => Number(t.precision) || 0);
|
|
439
452
|
function s(l) {
|
|
440
453
|
return l.toFixed(i.value);
|
|
441
454
|
}
|
|
@@ -443,17 +456,17 @@ function _(e, n) {
|
|
|
443
456
|
return isNaN(l) || l === null || l === void 0 || l === "";
|
|
444
457
|
}
|
|
445
458
|
function d(l) {
|
|
446
|
-
const o = c(
|
|
459
|
+
const o = c(t.max) ? null : new N(String(t.max), 10), u = c(t.min) ? null : new N(String(t.min), 10);
|
|
447
460
|
return o && l.gt(o) ? o : u && l.lt(u) ? u : l;
|
|
448
461
|
}
|
|
449
462
|
function m(l) {
|
|
450
|
-
if (
|
|
451
|
-
return isNaN(Number(l)) ?
|
|
463
|
+
if (t.parser)
|
|
464
|
+
return isNaN(Number(l)) ? t.parser(l) : l;
|
|
452
465
|
let o = d(new N(l, 10));
|
|
453
466
|
if (o.isNaN()) {
|
|
454
|
-
if (
|
|
467
|
+
if (t.canNull)
|
|
455
468
|
return null;
|
|
456
|
-
const f = new N("" +
|
|
469
|
+
const f = new N("" + t.min, 10), p = new N("" + t.max, 10);
|
|
457
470
|
if (!f.isNaN())
|
|
458
471
|
o = f;
|
|
459
472
|
else if (!p.isNaN())
|
|
@@ -467,27 +480,27 @@ function _(e, n) {
|
|
|
467
480
|
const o = Number(l);
|
|
468
481
|
r.value = o, n.emit("update:modelValue", o), n.emit("valueChange", o), n.emit("change", o);
|
|
469
482
|
}
|
|
470
|
-
return { displayValue:
|
|
483
|
+
return { displayValue: e, getRealValue: m, modelValue: r, isEmpty: c, onNumberValueChanged: a, precision: i, getValidNumberObject: d };
|
|
471
484
|
}
|
|
472
|
-
function
|
|
473
|
-
const { cleanFormat: s, format: c } =
|
|
485
|
+
function ke(t, n, e, r, i) {
|
|
486
|
+
const { cleanFormat: s, format: c } = e, { displayValue: d, getRealValue: m, modelValue: a, isEmpty: l, onNumberValueChanged: o } = r, { downward: u, upward: f } = i, p = T(!1), g = F(() => d.value);
|
|
474
487
|
function b(C) {
|
|
475
488
|
var M;
|
|
476
|
-
if (C.stopPropagation(), p.value = !1,
|
|
489
|
+
if (C.stopPropagation(), p.value = !1, t.readonly || t.disabled)
|
|
477
490
|
return;
|
|
478
491
|
let h = (M = C.target) == null ? void 0 : M.value;
|
|
479
|
-
|
|
492
|
+
t.canNull || (h = h || 0);
|
|
480
493
|
const k = s(h);
|
|
481
494
|
d.value = c(k), o(m(k)), n.emit("blur", { event: C, formatted: d.value, value: a.value });
|
|
482
495
|
}
|
|
483
496
|
function S(C) {
|
|
484
|
-
C.stopPropagation(), p.value = !0, !(
|
|
497
|
+
C.stopPropagation(), p.value = !0, !(t.readonly || t.disabled) && (d.value = l(a.value) || !t.showZero && a.value === "0" ? "" : String(a.value), n.emit("focus", { event: C, formatted: d.value, value: a.value }));
|
|
485
498
|
}
|
|
486
499
|
function w(C) {
|
|
487
500
|
var M;
|
|
488
501
|
C.stopPropagation();
|
|
489
502
|
let h = (M = C.target) == null ? void 0 : M.value;
|
|
490
|
-
|
|
503
|
+
t.canNull || (h = h || 0);
|
|
491
504
|
const k = s(h);
|
|
492
505
|
d.value = k, o(m(k));
|
|
493
506
|
}
|
|
@@ -496,24 +509,24 @@ function we(e, n, t, r, i) {
|
|
|
496
509
|
}
|
|
497
510
|
return { textBoxValue: g, onBlurTextBox: b, onFocusTextBox: S, onInput: w, onKeyDown: V, isFocus: p };
|
|
498
511
|
}
|
|
499
|
-
function R(
|
|
512
|
+
function R(t, n, e) {
|
|
500
513
|
const {
|
|
501
514
|
canDownward: r,
|
|
502
515
|
canUpward: i,
|
|
503
516
|
onClickDownButton: s,
|
|
504
517
|
onClickUpButton: c
|
|
505
|
-
} =
|
|
518
|
+
} = e, d = F(() => ({
|
|
506
519
|
"input-group-append": !0,
|
|
507
520
|
"btn-group": !0,
|
|
508
521
|
"btn-group-number": !0
|
|
509
|
-
})), m =
|
|
522
|
+
})), m = F(() => ({
|
|
510
523
|
btn: !0,
|
|
511
524
|
"btn-secondary": !0,
|
|
512
525
|
"btn-number-flag": !0
|
|
513
|
-
})), a =
|
|
526
|
+
})), a = F(() => ({
|
|
514
527
|
cursor: i() ? "pointer" : "not-allowed",
|
|
515
528
|
"margin-left": 0
|
|
516
|
-
})), l =
|
|
529
|
+
})), l = F(() => ({
|
|
517
530
|
cursor: r() ? "pointer" : "not-allowed",
|
|
518
531
|
"margin-left": 0
|
|
519
532
|
}));
|
|
@@ -537,38 +550,38 @@ function R(e, n, t) {
|
|
|
537
550
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
538
551
|
}, null)])]);
|
|
539
552
|
}
|
|
540
|
-
function
|
|
553
|
+
function Me(t, n, e) {
|
|
541
554
|
const r = T(), {
|
|
542
555
|
onBlurTextBox: i,
|
|
543
556
|
onFocusTextBox: s,
|
|
544
557
|
onInput: c,
|
|
545
558
|
onKeyDown: d,
|
|
546
559
|
textBoxValue: m
|
|
547
|
-
} =
|
|
560
|
+
} = e, a = F(() => t.disabled || t.readonly || !t.editable ? "" : t.placeholder), l = F(() => ({
|
|
548
561
|
"form-control": !0,
|
|
549
562
|
"f-utils-fill": !0
|
|
550
|
-
})), o =
|
|
551
|
-
"text-align":
|
|
563
|
+
})), o = F(() => ({
|
|
564
|
+
"text-align": t.textAlign
|
|
552
565
|
}));
|
|
553
566
|
function u(g) {
|
|
554
567
|
g.stopPropagation();
|
|
555
568
|
}
|
|
556
569
|
function f() {
|
|
557
|
-
|
|
570
|
+
t.selectOnCreated, t.focusOnCreated;
|
|
558
571
|
}
|
|
559
572
|
async function p(g) {
|
|
560
|
-
s(g), await
|
|
573
|
+
s(g), await q, f();
|
|
561
574
|
}
|
|
562
575
|
return O(async () => {
|
|
563
|
-
await
|
|
576
|
+
await q, f();
|
|
564
577
|
}), () => E("input", {
|
|
565
578
|
ref: r,
|
|
566
579
|
class: l.value,
|
|
567
580
|
style: o.value,
|
|
568
581
|
type: "text",
|
|
569
582
|
value: m.value,
|
|
570
|
-
disabled:
|
|
571
|
-
readonly:
|
|
583
|
+
disabled: t.disabled,
|
|
584
|
+
readonly: t.readonly || !t.editable,
|
|
572
585
|
placeholder: a.value,
|
|
573
586
|
onBlur: i,
|
|
574
587
|
onChange: u,
|
|
@@ -577,49 +590,49 @@ function ke(e, n, t) {
|
|
|
577
590
|
onKeydown: d
|
|
578
591
|
}, null);
|
|
579
592
|
}
|
|
580
|
-
const D = /* @__PURE__ */
|
|
593
|
+
const D = /* @__PURE__ */ z({
|
|
581
594
|
name: "FNumberSpinner",
|
|
582
595
|
props: U,
|
|
583
596
|
emits: ["update:modelValue", "valueChange", "change", "blur", "focus", "click", "input"],
|
|
584
|
-
setup(
|
|
585
|
-
const
|
|
597
|
+
setup(t, n) {
|
|
598
|
+
const e = Y(t, n), r = J(t, n, e), i = H(t, n, r, e), s = ke(t, n, r, e, i), c = R(t, n, i), {
|
|
586
599
|
displayValue: d,
|
|
587
600
|
modelValue: m,
|
|
588
601
|
getRealValue: a
|
|
589
|
-
} =
|
|
602
|
+
} = e, l = Me(t, n, s), {
|
|
590
603
|
format: o
|
|
591
604
|
} = r, {
|
|
592
605
|
isFocus: u
|
|
593
|
-
} = s, f =
|
|
606
|
+
} = s, f = F(() => !t.disabled && !t.readonly && t.showButton);
|
|
594
607
|
return O(() => {
|
|
595
|
-
const p = a(
|
|
608
|
+
const p = a(t.modelValue);
|
|
596
609
|
d.value = o(p);
|
|
597
|
-
}), A(() => [
|
|
610
|
+
}), A(() => [t.value], ([p]) => {
|
|
598
611
|
const g = a(p);
|
|
599
612
|
m.value = g, d.value = o(g);
|
|
600
|
-
}), A(() => [
|
|
613
|
+
}), A(() => [t.modelValue], ([p]) => {
|
|
601
614
|
p !== m.value && (m.value = p, !u.value && (d.value = o(a(p))));
|
|
602
|
-
}), A(() => [
|
|
615
|
+
}), A(() => [t.precision, t.useThousands, t.prefix, t.suffix, t.showZero], () => {
|
|
603
616
|
d.value = o(m.value);
|
|
604
617
|
}), () => E("div", {
|
|
605
618
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
606
619
|
}, [l(), f.value && c()]);
|
|
607
620
|
}
|
|
608
621
|
});
|
|
609
|
-
function
|
|
622
|
+
function Ne(t, n, e) {
|
|
610
623
|
var C;
|
|
611
|
-
const r =
|
|
624
|
+
const r = e && e.getStyles && e.getStyles() || "", i = e && e.getDesignerClass && e.getDesignerClass() || "", s = T();
|
|
612
625
|
function c() {
|
|
613
|
-
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 :
|
|
626
|
+
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
614
627
|
}
|
|
615
628
|
function d() {
|
|
616
629
|
return !1;
|
|
617
630
|
}
|
|
618
631
|
function m() {
|
|
619
|
-
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 :
|
|
632
|
+
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
|
|
620
633
|
}
|
|
621
634
|
function a() {
|
|
622
|
-
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 :
|
|
635
|
+
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
623
636
|
}
|
|
624
637
|
function l(h) {
|
|
625
638
|
if (!h || !h.value)
|
|
@@ -634,7 +647,7 @@ function Me(e, n, t) {
|
|
|
634
647
|
return !k || !k.value ? null : k.value.canMove ? M : o(h.parent);
|
|
635
648
|
}
|
|
636
649
|
function u(h) {
|
|
637
|
-
return !!
|
|
650
|
+
return !!e && e.canAccepts(h);
|
|
638
651
|
}
|
|
639
652
|
function f() {
|
|
640
653
|
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
@@ -642,28 +655,28 @@ function Me(e, n, t) {
|
|
|
642
655
|
function p() {
|
|
643
656
|
}
|
|
644
657
|
function g(h, k) {
|
|
645
|
-
k &&
|
|
658
|
+
k && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(k);
|
|
646
659
|
}
|
|
647
660
|
function b(h, k) {
|
|
648
661
|
const { componentType: M } = h;
|
|
649
|
-
let
|
|
650
|
-
|
|
662
|
+
let B = _(M, h, k);
|
|
663
|
+
e && e.onResolveNewComponentSchema && (B = e.onResolveNewComponentSchema(h, B));
|
|
651
664
|
const L = M.toLowerCase().replace(/-/g, "_");
|
|
652
|
-
return
|
|
665
|
+
return B && !B.id && B.type === M && (B.id = `${L}_${Math.random().toString().slice(2, 6)}`), B;
|
|
653
666
|
}
|
|
654
667
|
function S(h) {
|
|
655
668
|
}
|
|
656
669
|
function w(...h) {
|
|
657
|
-
if (
|
|
658
|
-
return
|
|
670
|
+
if (e && e.getPropsConfig)
|
|
671
|
+
return e.getPropsConfig(...h);
|
|
659
672
|
}
|
|
660
673
|
function V() {
|
|
661
|
-
|
|
662
|
-
var
|
|
674
|
+
e && e.onRemoveComponent && e.onRemoveComponent(), n != null && n.schema.contents && n.schema.contents.map((h) => {
|
|
675
|
+
var B;
|
|
663
676
|
let k = h.id;
|
|
664
677
|
h.type === "component-ref" && (k = h.component);
|
|
665
|
-
const M =
|
|
666
|
-
(
|
|
678
|
+
const M = t.value.querySelector(`#${k}-design-item`);
|
|
679
|
+
(B = M == null ? void 0 : M.componentInstance) != null && B.value.onRemoveComponent && M.componentInstance.value.onRemoveComponent();
|
|
667
680
|
});
|
|
668
681
|
}
|
|
669
682
|
return s.value = {
|
|
@@ -672,7 +685,7 @@ function Me(e, n, t) {
|
|
|
672
685
|
canDelete: m(),
|
|
673
686
|
canNested: !a(),
|
|
674
687
|
contents: n == null ? void 0 : n.schema.contents,
|
|
675
|
-
elementRef:
|
|
688
|
+
elementRef: t,
|
|
676
689
|
parent: (C = n == null ? void 0 : n.parent) == null ? void 0 : C.componentInstance,
|
|
677
690
|
schema: n == null ? void 0 : n.schema,
|
|
678
691
|
styles: r,
|
|
@@ -686,13 +699,13 @@ function Me(e, n, t) {
|
|
|
686
699
|
onAcceptMovedChildElement: g,
|
|
687
700
|
onChildElementMovedOut: S,
|
|
688
701
|
addNewChildComponentSchema: b,
|
|
689
|
-
triggerBelongedComponentToMoveWhenMoved: !!
|
|
690
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!
|
|
702
|
+
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || T(!1),
|
|
703
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || T(!1),
|
|
691
704
|
onRemoveComponent: V
|
|
692
705
|
}, s;
|
|
693
706
|
}
|
|
694
|
-
class
|
|
695
|
-
constructor(n,
|
|
707
|
+
class Be {
|
|
708
|
+
constructor(n, e) {
|
|
696
709
|
v(this, "componentId");
|
|
697
710
|
v(this, "viewModelId");
|
|
698
711
|
v(this, "eventsEditorUtils");
|
|
@@ -709,7 +722,7 @@ class Ne {
|
|
|
709
722
|
categories: {}
|
|
710
723
|
});
|
|
711
724
|
var r;
|
|
712
|
-
this.componentId = n, this.designerHostService =
|
|
725
|
+
this.componentId = n, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
713
726
|
}
|
|
714
727
|
getTableInfo() {
|
|
715
728
|
var n;
|
|
@@ -717,16 +730,16 @@ class Ne {
|
|
|
717
730
|
}
|
|
718
731
|
setDesignViewModelField(n) {
|
|
719
732
|
var r;
|
|
720
|
-
const
|
|
721
|
-
if (
|
|
733
|
+
const e = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
734
|
+
if (e) {
|
|
722
735
|
if (!this.designViewModelField) {
|
|
723
736
|
const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
724
|
-
this.designViewModelField = i.fields.find((s) => s.id ===
|
|
737
|
+
this.designViewModelField = i.fields.find((s) => s.id === e);
|
|
725
738
|
}
|
|
726
739
|
n.updateOn = (r = this.designViewModelField) == null ? void 0 : r.updateOn;
|
|
727
740
|
}
|
|
728
741
|
}
|
|
729
|
-
changeFieldEditorType(n,
|
|
742
|
+
changeFieldEditorType(n, e) {
|
|
730
743
|
}
|
|
731
744
|
getBasicPropConfig(n) {
|
|
732
745
|
return {
|
|
@@ -779,11 +792,11 @@ class Ne {
|
|
|
779
792
|
* @param componentInstance
|
|
780
793
|
* @returns
|
|
781
794
|
*/
|
|
782
|
-
updateElementByParentContainer(n,
|
|
783
|
-
const r =
|
|
795
|
+
updateElementByParentContainer(n, e) {
|
|
796
|
+
const r = e && e.parent && e.parent.schema;
|
|
784
797
|
if (!r)
|
|
785
798
|
return;
|
|
786
|
-
const i = r.contents.findIndex((c) => c.id === n), s =
|
|
799
|
+
const i = r.contents.findIndex((c) => c.id === n), s = x(r.contents[i]);
|
|
787
800
|
r.contents.splice(i, 1), r.contents.splice(i, 0, s);
|
|
788
801
|
}
|
|
789
802
|
}
|
|
@@ -792,16 +805,16 @@ const P = class P {
|
|
|
792
805
|
* 根据绑定字段类型获取可用的输入类控件
|
|
793
806
|
*/
|
|
794
807
|
static getEditorTypesByMDataType(n) {
|
|
795
|
-
const
|
|
796
|
-
return
|
|
808
|
+
const e = P.fieldControlTypeMapping[n];
|
|
809
|
+
return e || [{ key: "", value: "" }];
|
|
797
810
|
}
|
|
798
811
|
/**
|
|
799
812
|
* 获取所有输入类控件
|
|
800
813
|
*/
|
|
801
814
|
static getAllInputTypes() {
|
|
802
815
|
const n = [];
|
|
803
|
-
for (const
|
|
804
|
-
P.fieldControlTypeMapping[
|
|
816
|
+
for (const e in P.fieldControlTypeMapping)
|
|
817
|
+
P.fieldControlTypeMapping[e].forEach((r) => {
|
|
805
818
|
n.find((i) => i.key === r.key && i.value === r.value) || n.push({ key: r.key, value: r.value });
|
|
806
819
|
});
|
|
807
820
|
return n;
|
|
@@ -859,7 +872,7 @@ v(P, "fieldControlTypeMapping", {
|
|
|
859
872
|
});
|
|
860
873
|
let I = P;
|
|
861
874
|
const Fe = T(0);
|
|
862
|
-
class
|
|
875
|
+
class Te {
|
|
863
876
|
constructor() {
|
|
864
877
|
/** 控件标题 */
|
|
865
878
|
v(this, "label", "");
|
|
@@ -889,8 +902,8 @@ class Be {
|
|
|
889
902
|
v(this, "fieldSetId", "");
|
|
890
903
|
}
|
|
891
904
|
}
|
|
892
|
-
function
|
|
893
|
-
let n,
|
|
905
|
+
function Ve(t) {
|
|
906
|
+
let n, e;
|
|
894
907
|
const r = /* @__PURE__ */ new Map();
|
|
895
908
|
let i = [];
|
|
896
909
|
function s(l, o) {
|
|
@@ -910,15 +923,15 @@ function Te(e) {
|
|
|
910
923
|
return;
|
|
911
924
|
}
|
|
912
925
|
p && (u += 1, p = !1);
|
|
913
|
-
const b = g.appearance && g.appearance.class, S = new
|
|
914
|
-
b ? s(b, S) : S.isSupportedClass = !1, S.label = g.label || g.id, S.id = g.id, S.group = u, f && (S.fieldSetId = l.id),
|
|
926
|
+
const b = g.appearance && g.appearance.class, S = new Te();
|
|
927
|
+
b ? s(b, S) : S.isSupportedClass = !1, S.label = g.label || g.id, S.id = g.id, S.group = u, f && (S.fieldSetId = l.id), e === g.id && (n = u), r.set(g.id, g), o.push(S);
|
|
915
928
|
});
|
|
916
929
|
}
|
|
917
930
|
function d(l) {
|
|
918
|
-
const o =
|
|
931
|
+
const o = t.getComponentById(l);
|
|
919
932
|
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
920
933
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
921
|
-
const u =
|
|
934
|
+
const u = t.selectNode(o, (f) => f.type === W["response-form"].type);
|
|
922
935
|
return !u || !u.contents || u.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: u };
|
|
923
936
|
}
|
|
924
937
|
function m(l, o) {
|
|
@@ -926,7 +939,7 @@ function Te(e) {
|
|
|
926
939
|
const { result: u, message: f, formNode: p } = d(o);
|
|
927
940
|
if (!u)
|
|
928
941
|
return { result: u, message: f };
|
|
929
|
-
|
|
942
|
+
e = l.id, i = [], r.clear();
|
|
930
943
|
const g = p.contents[0].type === W.fieldset.type ? 0 : 1;
|
|
931
944
|
c(p, i, g);
|
|
932
945
|
const b = i.find((w) => !w.isSupportedClass);
|
|
@@ -948,7 +961,7 @@ function Te(e) {
|
|
|
948
961
|
var w;
|
|
949
962
|
const b = r.get(g.id), S = b.appearance && b.appearance.class;
|
|
950
963
|
if (S) {
|
|
951
|
-
const C = S.split(" ").filter((K) => !K.startsWith("col-")), h = "col-" + g.columnInSM, k = "col-md-" + g.columnInMD, M = "col-xl-" + g.columnInLG,
|
|
964
|
+
const C = S.split(" ").filter((K) => !K.startsWith("col-")), h = "col-" + g.columnInSM, k = "col-md-" + g.columnInMD, M = "col-xl-" + g.columnInLG, B = "col-el-" + g.columnInEL, L = [h, k, M, B].concat(C);
|
|
952
965
|
b.appearance.class = L.join(" ");
|
|
953
966
|
}
|
|
954
967
|
if (g.fieldSetId) {
|
|
@@ -965,19 +978,19 @@ function Te(e) {
|
|
|
965
978
|
getResonseFormLayoutConfig: c
|
|
966
979
|
};
|
|
967
980
|
}
|
|
968
|
-
class
|
|
969
|
-
constructor(
|
|
970
|
-
super(
|
|
981
|
+
class Ee extends Be {
|
|
982
|
+
constructor(e, r) {
|
|
983
|
+
super(e, r);
|
|
971
984
|
v(this, "responseLayoutEditorFunction");
|
|
972
|
-
this.responseLayoutEditorFunction =
|
|
985
|
+
this.responseLayoutEditorFunction = Ve(this.formSchemaUtils);
|
|
973
986
|
}
|
|
974
|
-
getPropertyConfig(
|
|
975
|
-
return this.propertyConfig.categories.basic = this.getBasicProperties(
|
|
987
|
+
getPropertyConfig(e, r) {
|
|
988
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, r), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
976
989
|
}
|
|
977
|
-
getBasicProperties(
|
|
990
|
+
getBasicProperties(e, r) {
|
|
978
991
|
var s;
|
|
979
992
|
const i = this;
|
|
980
|
-
return this.setDesignViewModelField(
|
|
993
|
+
return this.setDesignViewModelField(e), {
|
|
981
994
|
description: "Basic Information",
|
|
982
995
|
title: "基本信息",
|
|
983
996
|
properties: {
|
|
@@ -1013,7 +1026,7 @@ class Ve extends Ne {
|
|
|
1013
1026
|
type: "binding-selector",
|
|
1014
1027
|
bindingType: { enable: !1 },
|
|
1015
1028
|
editorParams: {
|
|
1016
|
-
componentSchema:
|
|
1029
|
+
componentSchema: e,
|
|
1017
1030
|
needSyncToViewModel: !0,
|
|
1018
1031
|
viewModelId: this.viewModelId,
|
|
1019
1032
|
designerHostService: this.designerHostService,
|
|
@@ -1027,7 +1040,7 @@ class Ve extends Ne {
|
|
|
1027
1040
|
if (c)
|
|
1028
1041
|
switch (c && c.propertyID) {
|
|
1029
1042
|
case "type": {
|
|
1030
|
-
i.changeControlType(
|
|
1043
|
+
i.changeControlType(e, c, r);
|
|
1031
1044
|
break;
|
|
1032
1045
|
}
|
|
1033
1046
|
case "label": {
|
|
@@ -1038,7 +1051,7 @@ class Ve extends Ne {
|
|
|
1038
1051
|
}
|
|
1039
1052
|
};
|
|
1040
1053
|
}
|
|
1041
|
-
getAppearanceProperties(
|
|
1054
|
+
getAppearanceProperties(e, r) {
|
|
1042
1055
|
const i = this;
|
|
1043
1056
|
return {
|
|
1044
1057
|
title: "样式",
|
|
@@ -1065,7 +1078,7 @@ class Ve extends Ne {
|
|
|
1065
1078
|
refreshPanelAfterChanged: !0,
|
|
1066
1079
|
editor: {
|
|
1067
1080
|
type: "response-layout-editor-setting",
|
|
1068
|
-
initialState: i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(
|
|
1081
|
+
initialState: i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, i.componentId)
|
|
1069
1082
|
}
|
|
1070
1083
|
}
|
|
1071
1084
|
},
|
|
@@ -1073,29 +1086,29 @@ class Ve extends Ne {
|
|
|
1073
1086
|
if (s)
|
|
1074
1087
|
switch (s && s.propertyID) {
|
|
1075
1088
|
case "responseLayout":
|
|
1076
|
-
i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue, i.componentId ||
|
|
1089
|
+
i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue, i.componentId || e.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(e.id, r), delete e.responseLayout;
|
|
1077
1090
|
break;
|
|
1078
1091
|
case "class":
|
|
1079
|
-
i.updateUnifiedLayoutAfterControlChanged(s.propertyValue,
|
|
1092
|
+
i.updateUnifiedLayoutAfterControlChanged(s.propertyValue, e.id, this.componentId), i.updateElementByParentContainer(e.id, r);
|
|
1080
1093
|
break;
|
|
1081
1094
|
}
|
|
1082
1095
|
}
|
|
1083
1096
|
};
|
|
1084
1097
|
}
|
|
1085
|
-
getEditorProperties(
|
|
1086
|
-
return this.getComponentConfig(
|
|
1098
|
+
getEditorProperties(e) {
|
|
1099
|
+
return this.getComponentConfig(e);
|
|
1087
1100
|
}
|
|
1088
1101
|
/**
|
|
1089
1102
|
* 卡片控件:切换控件类型后事件
|
|
1090
1103
|
* @param propertyData 控件DOM属性
|
|
1091
1104
|
* @param newControlType 新控件类型
|
|
1092
1105
|
*/
|
|
1093
|
-
changeControlType(
|
|
1106
|
+
changeControlType(e, r, i) {
|
|
1094
1107
|
var l, o, u, f;
|
|
1095
1108
|
const s = r.propertyValue, c = i && i.parent && i.parent.schema;
|
|
1096
1109
|
if (!c)
|
|
1097
1110
|
return;
|
|
1098
|
-
const d = c.contents.findIndex((p) => p.id ===
|
|
1111
|
+
const d = c.contents.findIndex((p) => p.id === e.id), m = c.contents[d];
|
|
1099
1112
|
let a;
|
|
1100
1113
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1101
1114
|
editor: {
|
|
@@ -1121,7 +1134,7 @@ class Ve extends Ne {
|
|
|
1121
1134
|
(p) => p.classList.remove("dgComponentSelected")
|
|
1122
1135
|
), Fe.value++;
|
|
1123
1136
|
}
|
|
1124
|
-
getComponentConfig(
|
|
1137
|
+
getComponentConfig(e, r = {}, i = {}) {
|
|
1125
1138
|
const s = Object.assign({
|
|
1126
1139
|
description: "编辑器",
|
|
1127
1140
|
title: "编辑器",
|
|
@@ -1157,8 +1170,8 @@ class Ve extends Ne {
|
|
|
1157
1170
|
* @param controlId 控件Id
|
|
1158
1171
|
* @param componentId 控件所在组件id
|
|
1159
1172
|
*/
|
|
1160
|
-
updateUnifiedLayoutAfterControlChanged(
|
|
1161
|
-
const s =
|
|
1173
|
+
updateUnifiedLayoutAfterControlChanged(e, r, i) {
|
|
1174
|
+
const s = e.split(" ");
|
|
1162
1175
|
let c = s.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), d = s.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), m = s.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), a = s.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
1163
1176
|
c = c || "col-12", d = d || "col-md-" + c.replace("col-", ""), m = m || "col-xl-" + d.replace("col-md-", ""), a = a || "col-el-" + m.replace("col-xl-", "");
|
|
1164
1177
|
const l = {
|
|
@@ -1175,8 +1188,8 @@ class Ve extends Ne {
|
|
|
1175
1188
|
* @param componentId 组件Id
|
|
1176
1189
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
1177
1190
|
*/
|
|
1178
|
-
updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
1179
|
-
const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(
|
|
1191
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, r) {
|
|
1192
|
+
const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
1180
1193
|
if (!i || !i.unifiedLayout)
|
|
1181
1194
|
return;
|
|
1182
1195
|
const s = [];
|
|
@@ -1195,14 +1208,14 @@ class Ve extends Ne {
|
|
|
1195
1208
|
/**
|
|
1196
1209
|
* 校验宽度样式值是否一致
|
|
1197
1210
|
*/
|
|
1198
|
-
checkIsUniqueColumn(
|
|
1199
|
-
const r = new Set(
|
|
1211
|
+
checkIsUniqueColumn(e) {
|
|
1212
|
+
const r = new Set(e);
|
|
1200
1213
|
return Array.from(r).length === 1;
|
|
1201
1214
|
}
|
|
1202
1215
|
}
|
|
1203
|
-
class
|
|
1204
|
-
constructor(n,
|
|
1205
|
-
super(n,
|
|
1216
|
+
class Pe extends Ee {
|
|
1217
|
+
constructor(n, e) {
|
|
1218
|
+
super(n, e);
|
|
1206
1219
|
}
|
|
1207
1220
|
getEditorProperties(n) {
|
|
1208
1221
|
return this.getComponentConfig(n, { type: "number-spinner" }, {
|
|
@@ -1259,21 +1272,21 @@ class Ee extends Ve {
|
|
|
1259
1272
|
});
|
|
1260
1273
|
}
|
|
1261
1274
|
}
|
|
1262
|
-
function
|
|
1263
|
-
const
|
|
1275
|
+
function De(t, n) {
|
|
1276
|
+
const e = t.schema;
|
|
1264
1277
|
function r(i, s) {
|
|
1265
|
-
return new
|
|
1278
|
+
return new Pe(i, n).getPropertyConfig(e, s);
|
|
1266
1279
|
}
|
|
1267
1280
|
return { getPropsConfig: r };
|
|
1268
1281
|
}
|
|
1269
|
-
const
|
|
1282
|
+
const Ie = /* @__PURE__ */ z({
|
|
1270
1283
|
name: "FNumberSpinnerDesign",
|
|
1271
1284
|
props: U,
|
|
1272
1285
|
emits: ["update:modelValue", "valueChange", "change", "blur", "focus", "click", "input"],
|
|
1273
|
-
setup(
|
|
1274
|
-
const
|
|
1286
|
+
setup(t, n) {
|
|
1287
|
+
const e = Y(t, n), r = J(t, n, e), i = H(t, n, r, e), s = R(t, n, i), c = T(), d = G("designer-host-service"), m = G("design-item-context"), a = De(m, d), l = Ne(c, m, a);
|
|
1275
1288
|
O(() => {
|
|
1276
|
-
c.value.componentInstance = l,
|
|
1289
|
+
c.value.componentInstance = l, t.readonly = !0;
|
|
1277
1290
|
}), n.expose(l.value);
|
|
1278
1291
|
const o = T();
|
|
1279
1292
|
return () => E("div", {
|
|
@@ -1283,24 +1296,24 @@ const De = /* @__PURE__ */ $({
|
|
|
1283
1296
|
ref: o,
|
|
1284
1297
|
class: "form-control",
|
|
1285
1298
|
readonly: !0,
|
|
1286
|
-
placeholder:
|
|
1299
|
+
placeholder: t.placeholder
|
|
1287
1300
|
}, null), s()]);
|
|
1288
1301
|
}
|
|
1289
1302
|
});
|
|
1290
|
-
D.register = (
|
|
1291
|
-
|
|
1303
|
+
D.register = (t, n, e, r) => {
|
|
1304
|
+
t["number-spinner"] = D, n["number-spinner"] = Q;
|
|
1292
1305
|
};
|
|
1293
|
-
D.registerDesigner = (
|
|
1294
|
-
|
|
1306
|
+
D.registerDesigner = (t, n, e) => {
|
|
1307
|
+
t["number-spinner"] = Ie, n["number-spinner"] = Q;
|
|
1295
1308
|
};
|
|
1296
|
-
const
|
|
1309
|
+
const qe = ne(D);
|
|
1297
1310
|
export {
|
|
1298
1311
|
D as FNumberSpinner,
|
|
1299
|
-
|
|
1312
|
+
qe as default,
|
|
1300
1313
|
U as numberSpinnerProps,
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1314
|
+
Q as propsResolver,
|
|
1315
|
+
J as useFormat,
|
|
1316
|
+
Y as useNumber,
|
|
1317
|
+
H as useSpinner,
|
|
1318
|
+
ke as useTextBox
|
|
1306
1319
|
};
|