@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,37 +1,51 @@
|
|
|
1
1
|
var oe = Object.defineProperty;
|
|
2
2
|
var re = (e, n, t) => n in e ? oe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
3
|
var v = (e, n, t) => re(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
-
import { computed as D, ref as P, createVNode as E, defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
4
|
+
import { computed as D, ref as P, createVNode as E, defineComponent as _, onMounted as $, watch as x, createTextVNode as Q, inject as H } from "vue";
|
|
5
|
+
import { isPlainObject as X, cloneDeep as W } from "lodash-es";
|
|
6
6
|
import T from "bignumber.js";
|
|
7
|
-
import { DgControl as
|
|
7
|
+
import { DgControl as R } from "../designer-canvas/index.esm.js";
|
|
8
8
|
import { withInstall as ie } from "../common/index.esm.js";
|
|
9
9
|
function ae(e, n, t) {
|
|
10
10
|
return n;
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
const { properties: n, title: t, ignore: o } = e, r = o && Array.isArray(o), l = Object.keys(n).reduce((s, m) => ((!r || !o.find((d) => d === m)) && (s[m] = n[m].type === "object" && n[m].properties ?
|
|
12
|
+
const J = {}, Y = {};
|
|
13
|
+
function z(e) {
|
|
14
|
+
const { properties: n, title: t, ignore: o } = e, r = o && Array.isArray(o), l = Object.keys(n).reduce((s, m) => ((!r || !o.find((d) => d === m)) && (s[m] = n[m].type === "object" && n[m].properties ? z(n[m]) : W(n[m].default)), s), {});
|
|
15
15
|
if (t && (!r || !o.find((s) => s === "id"))) {
|
|
16
16
|
const s = t.toLowerCase().replace(/-/g, "_");
|
|
17
17
|
l.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
18
18
|
}
|
|
19
19
|
return l;
|
|
20
20
|
}
|
|
21
|
+
function le(e) {
|
|
22
|
+
const { properties: n, title: t, required: o } = e;
|
|
23
|
+
if (o && Array.isArray(o)) {
|
|
24
|
+
const r = o.reduce((l, s) => (l[s] = n[s].type === "object" && n[s].properties ? z(n[s]) : W(n[s].default), l), {});
|
|
25
|
+
if (t && o.find((l) => l === "id")) {
|
|
26
|
+
const l = t.toLowerCase().replace(/-/g, "_");
|
|
27
|
+
r.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
28
|
+
}
|
|
29
|
+
return r;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
type: t
|
|
33
|
+
};
|
|
34
|
+
}
|
|
21
35
|
function K(e, n = {}, t) {
|
|
22
|
-
const o =
|
|
36
|
+
const o = J[e];
|
|
23
37
|
if (o) {
|
|
24
|
-
let r =
|
|
25
|
-
const l =
|
|
38
|
+
let r = le(o);
|
|
39
|
+
const l = Y[e];
|
|
26
40
|
return r = l ? l({ getSchemaByType: K }, r, n, t) : r, r;
|
|
27
41
|
}
|
|
28
42
|
return null;
|
|
29
43
|
}
|
|
30
|
-
function le(e, n) {
|
|
31
|
-
const t = $(n);
|
|
32
|
-
return Object.keys(t).reduce((o, r) => (o[r] && H(o[r]) && H(e[r] || !e[r]) ? Object.assign(o[r], e[r] || {}) : o[r] = e[r], o), t), t;
|
|
33
|
-
}
|
|
34
44
|
function se(e, n) {
|
|
45
|
+
const t = z(n);
|
|
46
|
+
return Object.keys(t).reduce((o, r) => (Object.prototype.hasOwnProperty.call(e, r) && (o[r] && X(o[r]) && X(e[r] || !e[r]) ? Object.assign(o[r], e[r] || {}) : o[r] = e[r]), o), t), t;
|
|
47
|
+
}
|
|
48
|
+
function ce(e, n) {
|
|
35
49
|
return Object.keys(e).filter((o) => e[o] != null).reduce((o, r) => {
|
|
36
50
|
if (n.has(r)) {
|
|
37
51
|
const l = n.get(r);
|
|
@@ -46,11 +60,11 @@ function se(e, n) {
|
|
|
46
60
|
return o;
|
|
47
61
|
}, {});
|
|
48
62
|
}
|
|
49
|
-
function
|
|
50
|
-
const o =
|
|
51
|
-
return
|
|
63
|
+
function ue(e, n, t = /* @__PURE__ */ new Map()) {
|
|
64
|
+
const o = se(e, n);
|
|
65
|
+
return ce(o, t);
|
|
52
66
|
}
|
|
53
|
-
function
|
|
67
|
+
function de(e = {}) {
|
|
54
68
|
function n(a, c, i, u) {
|
|
55
69
|
if (typeof i == "number")
|
|
56
70
|
return u[a].length === i;
|
|
@@ -104,7 +118,7 @@ function ue(e = {}) {
|
|
|
104
118
|
}
|
|
105
119
|
return { parseValueSchema: d };
|
|
106
120
|
}
|
|
107
|
-
const
|
|
121
|
+
const g = {
|
|
108
122
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
109
123
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
110
124
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -144,20 +158,20 @@ const y = {
|
|
|
144
158
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
145
159
|
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
146
160
|
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
function
|
|
150
|
-
return
|
|
151
|
-
const m =
|
|
161
|
+
}, pe = {}, me = {};
|
|
162
|
+
de();
|
|
163
|
+
function fe(e, n, t = /* @__PURE__ */ new Map(), o = (s, m, d, a) => m, r = {}, l = (s) => s) {
|
|
164
|
+
return J[n.title] = n, Y[n.title] = o, pe[n.title] = r, me[n.title] = l, (s = {}) => {
|
|
165
|
+
const m = ue(s, n, t), d = Object.keys(e).reduce((a, c) => (a[c] = e[c].default, a), {});
|
|
152
166
|
return Object.assign(d, m);
|
|
153
167
|
};
|
|
154
168
|
}
|
|
155
|
-
function
|
|
169
|
+
function ye(e, n) {
|
|
156
170
|
return { customClass: n.class, customStyle: n.style };
|
|
157
171
|
}
|
|
158
172
|
const ge = /* @__PURE__ */ new Map([
|
|
159
|
-
["appearance",
|
|
160
|
-
]),
|
|
173
|
+
["appearance", ye]
|
|
174
|
+
]), be = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/number-range.schema.json", ve = "number-range", Ce = "A Farris Component", we = "object", Se = {
|
|
161
175
|
id: {
|
|
162
176
|
description: "The unique identifier for a number-range",
|
|
163
177
|
type: "string"
|
|
@@ -219,18 +233,17 @@ const ge = /* @__PURE__ */ new Map([
|
|
|
219
233
|
type: "boolean",
|
|
220
234
|
default: !0
|
|
221
235
|
}
|
|
222
|
-
},
|
|
223
|
-
"id",
|
|
236
|
+
}, Me = [
|
|
224
237
|
"type"
|
|
225
|
-
],
|
|
226
|
-
$schema:
|
|
227
|
-
$id:
|
|
228
|
-
title:
|
|
229
|
-
description:
|
|
230
|
-
type:
|
|
231
|
-
properties:
|
|
232
|
-
required:
|
|
233
|
-
},
|
|
238
|
+
], Ne = {
|
|
239
|
+
$schema: be,
|
|
240
|
+
$id: he,
|
|
241
|
+
title: ve,
|
|
242
|
+
description: Ce,
|
|
243
|
+
type: we,
|
|
244
|
+
properties: Se,
|
|
245
|
+
required: Me
|
|
246
|
+
}, Z = {
|
|
234
247
|
/**
|
|
235
248
|
* 组件标识
|
|
236
249
|
*/
|
|
@@ -342,7 +355,7 @@ const ge = /* @__PURE__ */ new Map([
|
|
|
342
355
|
* 是否使用千分值
|
|
343
356
|
*/
|
|
344
357
|
useThousands: { type: Boolean, default: !0 }
|
|
345
|
-
}, ee =
|
|
358
|
+
}, ee = fe(Z, Ne, ge, ae);
|
|
346
359
|
function te(e, n) {
|
|
347
360
|
const t = D(() => Number(e.precision) || 0);
|
|
348
361
|
function o(d) {
|
|
@@ -412,8 +425,8 @@ function A(e, n, t, o, r, l, s, m, d, a) {
|
|
|
412
425
|
function b(N) {
|
|
413
426
|
if (e.readonly || e.disabled)
|
|
414
427
|
return;
|
|
415
|
-
const
|
|
416
|
-
if (
|
|
428
|
+
const y = N === "up" ? f : p, M = N === "up" ? "plus" : "minus";
|
|
429
|
+
if (y()) {
|
|
417
430
|
let V = new T(o.value || 0)[M](Number(e.step)).toFixed();
|
|
418
431
|
V = u(V, m, d, a), t.value = c(V), o.value = i(V), s(o.value);
|
|
419
432
|
}
|
|
@@ -444,7 +457,7 @@ function O(e, n, t, o, r, l, s, m, d, a, c) {
|
|
|
444
457
|
let F = i(V);
|
|
445
458
|
F = b(F, d, a, c), t.value = u(F), o.value = f(F), m(o.value), n.emit("blur", { event: h, formatted: t.value, value: o.value });
|
|
446
459
|
}
|
|
447
|
-
function
|
|
460
|
+
function y(h) {
|
|
448
461
|
h.stopPropagation(), !(e.readonly || e.disabled) && (k.value = !0, t.value = p(o.value) || !e.showZero && o.value === "0" ? "" : String(o.value), n.emit("focus", { event: h, formatted: t.value, value: o.value }));
|
|
449
462
|
}
|
|
450
463
|
function M(h) {
|
|
@@ -458,7 +471,7 @@ function O(e, n, t, o, r, l, s, m, d, a, c) {
|
|
|
458
471
|
function B(h) {
|
|
459
472
|
h.key === "ArrowDown" && (h.preventDefault(), S()), h.key === "ArrowUp" && (h.preventDefault(), C()), h.stopPropagation();
|
|
460
473
|
}
|
|
461
|
-
return { textBoxValue: w, onBlurTextBox: N, onFocusTextBox:
|
|
474
|
+
return { textBoxValue: w, onBlurTextBox: N, onFocusTextBox: y, onInput: M, onKeyDown: B, isTextBoxFocused: k };
|
|
462
475
|
}
|
|
463
476
|
function j(e, n, t, o) {
|
|
464
477
|
const {
|
|
@@ -533,31 +546,31 @@ function U(e, n, t) {
|
|
|
533
546
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
534
547
|
}, null)])]);
|
|
535
548
|
}
|
|
536
|
-
const
|
|
549
|
+
const q = /* @__PURE__ */ _({
|
|
537
550
|
name: "FNumberRange",
|
|
538
|
-
props:
|
|
551
|
+
props: Z,
|
|
539
552
|
emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
|
|
540
553
|
setup(e, n) {
|
|
541
|
-
const t = P(e.beginValue), o = P(""), r = P(e.endValue), l = P(""), s = te(e), m = ne(e, n, s), d = (
|
|
542
|
-
n.emit("beginValueChange",
|
|
543
|
-
}, a = A(e, n, o, t, m, s, d, t, r, !0), c = O(e, n, o, t, m, s, a, d, t, r, !0), i = U(e, n, a), u = j(e, n, c, !0), f = (
|
|
544
|
-
n.emit("endValueChange",
|
|
554
|
+
const t = P(e.beginValue), o = P(""), r = P(e.endValue), l = P(""), s = te(e), m = ne(e, n, s), d = (y) => {
|
|
555
|
+
n.emit("beginValueChange", y);
|
|
556
|
+
}, a = A(e, n, o, t, m, s, d, t, r, !0), c = O(e, n, o, t, m, s, a, d, t, r, !0), i = U(e, n, a), u = j(e, n, c, !0), f = (y) => {
|
|
557
|
+
n.emit("endValueChange", y);
|
|
545
558
|
}, p = A(e, n, l, r, m, s, f, t, r, !1), b = O(e, n, l, r, m, s, p, f, t, r, !1), S = U(e, n, p), C = j(e, n, b, !1), {
|
|
546
559
|
getRealValue: w
|
|
547
560
|
} = s, {
|
|
548
561
|
format: k
|
|
549
562
|
} = m, N = D(() => !e.disabled && !e.readonly && e.showButton);
|
|
550
|
-
return
|
|
551
|
-
const
|
|
552
|
-
o.value = k(
|
|
553
|
-
}), x(() => [e.beginValue], ([
|
|
563
|
+
return $(() => {
|
|
564
|
+
const y = w(e.beginValue), M = w(e.endValue);
|
|
565
|
+
o.value = k(y), l.value = k(M);
|
|
566
|
+
}), x(() => [e.beginValue], ([y]) => {
|
|
554
567
|
if (!c.isTextBoxFocused.value) {
|
|
555
|
-
const M = w(
|
|
568
|
+
const M = w(y);
|
|
556
569
|
o.value = k(M);
|
|
557
570
|
}
|
|
558
|
-
}), x(() => [e.endValue], ([
|
|
571
|
+
}), x(() => [e.endValue], ([y]) => {
|
|
559
572
|
if (!b.isTextBoxFocused.value) {
|
|
560
|
-
const M = w(
|
|
573
|
+
const M = w(y);
|
|
561
574
|
l.value = k(M);
|
|
562
575
|
}
|
|
563
576
|
}), x(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
@@ -570,12 +583,12 @@ const G = /* @__PURE__ */ Q({
|
|
|
570
583
|
class: "sub-input-group"
|
|
571
584
|
}, [u(), N.value && i()]), E("span", {
|
|
572
585
|
class: "spliter"
|
|
573
|
-
}, [
|
|
586
|
+
}, [Q("~")]), E("div", {
|
|
574
587
|
class: "sub-input-group"
|
|
575
588
|
}, [C(), N.value && S()])])]);
|
|
576
589
|
}
|
|
577
590
|
});
|
|
578
|
-
function
|
|
591
|
+
function ke(e, n, t) {
|
|
579
592
|
var N;
|
|
580
593
|
const o = t && t.getStyles && t.getStyles() || "", r = t && t.getDesignerClass && t.getDesignerClass() || "", l = P();
|
|
581
594
|
function s() {
|
|
@@ -590,47 +603,47 @@ function Ne(e, n, t) {
|
|
|
590
603
|
function a() {
|
|
591
604
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
592
605
|
}
|
|
593
|
-
function c(
|
|
594
|
-
if (!
|
|
606
|
+
function c(y) {
|
|
607
|
+
if (!y || !y.value)
|
|
595
608
|
return null;
|
|
596
|
-
if (
|
|
597
|
-
return
|
|
598
|
-
const M = P(
|
|
609
|
+
if (y.value.schema && y.value.schema.type === "component")
|
|
610
|
+
return y.value;
|
|
611
|
+
const M = P(y == null ? void 0 : y.value.parent), B = c(M);
|
|
599
612
|
return B || null;
|
|
600
613
|
}
|
|
601
|
-
function i(
|
|
602
|
-
const { componentInstance: M, designerItemElementRef: B } =
|
|
603
|
-
return !M || !M.value ? null : M.value.canMove ? B : i(
|
|
614
|
+
function i(y = n) {
|
|
615
|
+
const { componentInstance: M, designerItemElementRef: B } = y;
|
|
616
|
+
return !M || !M.value ? null : M.value.canMove ? B : i(y.parent);
|
|
604
617
|
}
|
|
605
|
-
function u(
|
|
606
|
-
return !!t && t.canAccepts(
|
|
618
|
+
function u(y) {
|
|
619
|
+
return !!t && t.canAccepts(y);
|
|
607
620
|
}
|
|
608
621
|
function f() {
|
|
609
622
|
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
610
623
|
}
|
|
611
624
|
function p() {
|
|
612
625
|
}
|
|
613
|
-
function b(
|
|
626
|
+
function b(y, M) {
|
|
614
627
|
M && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(M);
|
|
615
628
|
}
|
|
616
|
-
function S(
|
|
617
|
-
const { componentType: B } =
|
|
618
|
-
let h = K(B,
|
|
619
|
-
t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(
|
|
629
|
+
function S(y, M) {
|
|
630
|
+
const { componentType: B } = y;
|
|
631
|
+
let h = K(B, y, M);
|
|
632
|
+
t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(y, h));
|
|
620
633
|
const V = B.toLowerCase().replace(/-/g, "_");
|
|
621
634
|
return h && !h.id && h.type === B && (h.id = `${V}_${Math.random().toString().slice(2, 6)}`), h;
|
|
622
635
|
}
|
|
623
|
-
function C(
|
|
636
|
+
function C(y) {
|
|
624
637
|
}
|
|
625
|
-
function w(...
|
|
638
|
+
function w(...y) {
|
|
626
639
|
if (t && t.getPropsConfig)
|
|
627
|
-
return t.getPropsConfig(...
|
|
640
|
+
return t.getPropsConfig(...y);
|
|
628
641
|
}
|
|
629
642
|
function k() {
|
|
630
|
-
t && t.onRemoveComponent && t.onRemoveComponent(), n != null && n.schema.contents && n.schema.contents.map((
|
|
643
|
+
t && t.onRemoveComponent && t.onRemoveComponent(), n != null && n.schema.contents && n.schema.contents.map((y) => {
|
|
631
644
|
var h;
|
|
632
|
-
let M =
|
|
633
|
-
|
|
645
|
+
let M = y.id;
|
|
646
|
+
y.type === "component-ref" && (M = y.component);
|
|
634
647
|
const B = e.value.querySelector(`#${M}-design-item`);
|
|
635
648
|
(h = B == null ? void 0 : B.componentInstance) != null && h.value.onRemoveComponent && B.componentInstance.value.onRemoveComponent();
|
|
636
649
|
});
|
|
@@ -660,7 +673,7 @@ function Ne(e, n, t) {
|
|
|
660
673
|
onRemoveComponent: k
|
|
661
674
|
}, l;
|
|
662
675
|
}
|
|
663
|
-
class
|
|
676
|
+
class Be {
|
|
664
677
|
constructor(n, t) {
|
|
665
678
|
v(this, "componentId");
|
|
666
679
|
v(this, "viewModelId");
|
|
@@ -716,7 +729,7 @@ class ke {
|
|
|
716
729
|
type: "combo-list",
|
|
717
730
|
textField: "name",
|
|
718
731
|
valueField: "value",
|
|
719
|
-
data: [{ value: n.type, name:
|
|
732
|
+
data: [{ value: n.type, name: g[n.type].name }]
|
|
720
733
|
}
|
|
721
734
|
}
|
|
722
735
|
}
|
|
@@ -752,7 +765,7 @@ class ke {
|
|
|
752
765
|
const o = t && t.parent && t.parent.schema;
|
|
753
766
|
if (!o)
|
|
754
767
|
return;
|
|
755
|
-
const r = o.contents.findIndex((s) => s.id === n), l =
|
|
768
|
+
const r = o.contents.findIndex((s) => s.id === n), l = W(o.contents[r]);
|
|
756
769
|
o.contents.splice(r, 1), o.contents.splice(r, 0, l);
|
|
757
770
|
}
|
|
758
771
|
}
|
|
@@ -781,54 +794,54 @@ const L = class L {
|
|
|
781
794
|
*/
|
|
782
795
|
v(L, "fieldControlTypeMapping", {
|
|
783
796
|
String: [
|
|
784
|
-
{ key:
|
|
785
|
-
{ key:
|
|
786
|
-
{ key:
|
|
787
|
-
{ key:
|
|
788
|
-
{ key:
|
|
789
|
-
{ key:
|
|
790
|
-
{ key:
|
|
791
|
-
{ key:
|
|
797
|
+
{ key: g["input-group"].type, value: g["input-group"].name },
|
|
798
|
+
{ key: g.lookup.type, value: g.lookup.name },
|
|
799
|
+
{ key: g["date-picker"].type, value: g["date-picker"].name },
|
|
800
|
+
{ key: g["check-box"].type, value: g["check-box"].name },
|
|
801
|
+
{ key: g["check-group"].type, value: g["check-group"].name },
|
|
802
|
+
{ key: g["radio-group"].type, value: g["radio-group"].name },
|
|
803
|
+
{ key: g["combo-list"].type, value: g["combo-list"].name },
|
|
804
|
+
{ key: g.textarea.type, value: g.textarea.name }
|
|
792
805
|
],
|
|
793
806
|
Text: [
|
|
794
|
-
{ key:
|
|
795
|
-
{ key:
|
|
807
|
+
{ key: g.textarea.type, value: g.textarea.name },
|
|
808
|
+
{ key: g.lookup.type, value: g.lookup.name }
|
|
796
809
|
],
|
|
797
810
|
Decimal: [
|
|
798
|
-
{ key:
|
|
811
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
799
812
|
],
|
|
800
813
|
Integer: [
|
|
801
|
-
{ key:
|
|
814
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
802
815
|
],
|
|
803
816
|
Number: [
|
|
804
|
-
{ key:
|
|
817
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
805
818
|
],
|
|
806
819
|
BigNumber: [
|
|
807
|
-
{ key:
|
|
820
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
808
821
|
],
|
|
809
822
|
Date: [
|
|
810
|
-
{ key:
|
|
823
|
+
{ key: g["date-picker"].type, value: g["date-picker"].name }
|
|
811
824
|
],
|
|
812
825
|
DateTime: [
|
|
813
|
-
{ key:
|
|
826
|
+
{ key: g["date-picker"].type, value: g["date-picker"].name }
|
|
814
827
|
],
|
|
815
828
|
Boolean: [
|
|
816
|
-
{ key:
|
|
817
|
-
{ key:
|
|
829
|
+
{ key: g.switch.type, value: g.switch.name },
|
|
830
|
+
{ key: g["check-box"].type, value: g["check-box"].name }
|
|
818
831
|
],
|
|
819
832
|
Enum: [
|
|
820
|
-
{ key:
|
|
821
|
-
{ key:
|
|
833
|
+
{ key: g["combo-list"].type, value: g["combo-list"].name },
|
|
834
|
+
{ key: g["radio-group"].type, value: g["radio-group"].name }
|
|
822
835
|
],
|
|
823
836
|
Object: [
|
|
824
|
-
{ key:
|
|
825
|
-
{ key:
|
|
826
|
-
{ key:
|
|
837
|
+
{ key: g.lookup.type, value: g.lookup.name },
|
|
838
|
+
{ key: g["combo-list"].type, value: g["combo-list"].name },
|
|
839
|
+
{ key: g["radio-group"].type, value: g["radio-group"].name }
|
|
827
840
|
]
|
|
828
841
|
});
|
|
829
|
-
let
|
|
830
|
-
const
|
|
831
|
-
class
|
|
842
|
+
let G = L;
|
|
843
|
+
const Ve = P(0);
|
|
844
|
+
class Fe {
|
|
832
845
|
constructor() {
|
|
833
846
|
/** 控件标题 */
|
|
834
847
|
v(this, "label", "");
|
|
@@ -858,7 +871,7 @@ class Ve {
|
|
|
858
871
|
v(this, "fieldSetId", "");
|
|
859
872
|
}
|
|
860
873
|
}
|
|
861
|
-
function
|
|
874
|
+
function Te(e) {
|
|
862
875
|
let n, t;
|
|
863
876
|
const o = /* @__PURE__ */ new Map();
|
|
864
877
|
let r = [];
|
|
@@ -879,7 +892,7 @@ function Fe(e) {
|
|
|
879
892
|
return;
|
|
880
893
|
}
|
|
881
894
|
p && (u += 1, p = !1);
|
|
882
|
-
const S = b.appearance && b.appearance.class, C = new
|
|
895
|
+
const S = b.appearance && b.appearance.class, C = new Fe();
|
|
883
896
|
S ? l(S, C) : C.isSupportedClass = !1, C.label = b.label || b.id, C.id = b.id, C.group = u, f && (C.fieldSetId = c.id), t === b.id && (n = u), o.set(b.id, b), i.push(C);
|
|
884
897
|
});
|
|
885
898
|
}
|
|
@@ -887,7 +900,7 @@ function Fe(e) {
|
|
|
887
900
|
const i = e.getComponentById(c);
|
|
888
901
|
if (!i || !i.componentType || !i.componentType.startsWith("form"))
|
|
889
902
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
890
|
-
const u = e.selectNode(i, (f) => f.type ===
|
|
903
|
+
const u = e.selectNode(i, (f) => f.type === R["response-form"].type);
|
|
891
904
|
return !u || !u.contents || u.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: u };
|
|
892
905
|
}
|
|
893
906
|
function d(c, i) {
|
|
@@ -896,7 +909,7 @@ function Fe(e) {
|
|
|
896
909
|
if (!u)
|
|
897
910
|
return { result: u, message: f };
|
|
898
911
|
t = c.id, r = [], o.clear();
|
|
899
|
-
const b = p.contents[0].type ===
|
|
912
|
+
const b = p.contents[0].type === R.fieldset.type ? 0 : 1;
|
|
900
913
|
s(p, r, b);
|
|
901
914
|
const S = r.find((w) => !w.isSupportedClass);
|
|
902
915
|
return {
|
|
@@ -917,11 +930,11 @@ function Fe(e) {
|
|
|
917
930
|
var w;
|
|
918
931
|
const S = o.get(b.id), C = S.appearance && S.appearance.class;
|
|
919
932
|
if (C) {
|
|
920
|
-
const N = C.split(" ").filter((F) => !F.startsWith("col-")),
|
|
933
|
+
const N = C.split(" ").filter((F) => !F.startsWith("col-")), y = "col-" + b.columnInSM, M = "col-md-" + b.columnInMD, B = "col-xl-" + b.columnInLG, h = "col-el-" + b.columnInEL, V = [y, M, B, h].concat(N);
|
|
921
934
|
S.appearance.class = V.join(" ");
|
|
922
935
|
}
|
|
923
936
|
if (b.fieldSetId) {
|
|
924
|
-
const k = f.contents.find((
|
|
937
|
+
const k = f.contents.find((y) => y.id === b.fieldSetId), N = p.find((y) => y.id === b.fieldSetId);
|
|
925
938
|
N ? (w = N.contents) == null || w.push(S) : (p.push(k), k.contents = [S]);
|
|
926
939
|
} else
|
|
927
940
|
p.push(S);
|
|
@@ -934,11 +947,11 @@ function Fe(e) {
|
|
|
934
947
|
getResonseFormLayoutConfig: s
|
|
935
948
|
};
|
|
936
949
|
}
|
|
937
|
-
class
|
|
950
|
+
class Ee extends Be {
|
|
938
951
|
constructor(t, o) {
|
|
939
952
|
super(t, o);
|
|
940
953
|
v(this, "responseLayoutEditorFunction");
|
|
941
|
-
this.responseLayoutEditorFunction =
|
|
954
|
+
this.responseLayoutEditorFunction = Te(this.formSchemaUtils);
|
|
942
955
|
}
|
|
943
956
|
getPropertyConfig(t, o) {
|
|
944
957
|
return this.propertyConfig.categories.basic = this.getBasicProperties(t, o), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t, o), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
|
|
@@ -946,7 +959,7 @@ class Te extends ke {
|
|
|
946
959
|
getBasicProperties(t, o) {
|
|
947
960
|
var l;
|
|
948
961
|
const r = this;
|
|
949
|
-
return this.setDesignViewModelField(t),
|
|
962
|
+
return this.setDesignViewModelField(t), {
|
|
950
963
|
description: "Basic Information",
|
|
951
964
|
title: "基本信息",
|
|
952
965
|
properties: {
|
|
@@ -967,7 +980,7 @@ class Te extends ke {
|
|
|
967
980
|
textField: "value",
|
|
968
981
|
valueField: "key",
|
|
969
982
|
editable: !1,
|
|
970
|
-
data: r.designViewModelField ?
|
|
983
|
+
data: r.designViewModelField ? G.getEditorTypesByMDataType((l = r.designViewModelField.type) == null ? void 0 : l.name) : G.getAllInputTypes()
|
|
971
984
|
}
|
|
972
985
|
},
|
|
973
986
|
label: {
|
|
@@ -1088,7 +1101,7 @@ class Te extends ke {
|
|
|
1088
1101
|
require: (f = d.editor) == null ? void 0 : f.require
|
|
1089
1102
|
}), s.contents.splice(m, 1), s.contents.splice(m, 0, a), r.schema = Object.assign(d, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1090
1103
|
(p) => p.classList.remove("dgComponentSelected")
|
|
1091
|
-
),
|
|
1104
|
+
), Ve.value++;
|
|
1092
1105
|
}
|
|
1093
1106
|
getComponentConfig(t, o = {}, r = {}) {
|
|
1094
1107
|
const l = Object.assign({
|
|
@@ -1169,7 +1182,7 @@ class Te extends ke {
|
|
|
1169
1182
|
return Array.from(o).length === 1;
|
|
1170
1183
|
}
|
|
1171
1184
|
}
|
|
1172
|
-
class
|
|
1185
|
+
class Pe extends Ee {
|
|
1173
1186
|
constructor(n, t) {
|
|
1174
1187
|
super(n, t);
|
|
1175
1188
|
}
|
|
@@ -1183,32 +1196,32 @@ class Ee extends Te {
|
|
|
1183
1196
|
});
|
|
1184
1197
|
}
|
|
1185
1198
|
}
|
|
1186
|
-
function
|
|
1199
|
+
function De(e, n) {
|
|
1187
1200
|
const t = e.schema;
|
|
1188
1201
|
function o(r, l) {
|
|
1189
|
-
return new
|
|
1202
|
+
return new Pe(r, n).getPropertyConfig(t, l);
|
|
1190
1203
|
}
|
|
1191
1204
|
return { getPropsConfig: o };
|
|
1192
1205
|
}
|
|
1193
|
-
const
|
|
1206
|
+
const Ie = /* @__PURE__ */ _({
|
|
1194
1207
|
name: "FNumberRangeDesign",
|
|
1195
|
-
props:
|
|
1208
|
+
props: Z,
|
|
1196
1209
|
emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
|
|
1197
1210
|
setup(e, n) {
|
|
1198
1211
|
const t = P(e.beginValue), o = P(""), r = P(e.endValue), l = P(""), s = te(e), m = ne(e, n, s), d = (F) => {
|
|
1199
1212
|
n.emit("beginValueChange", F);
|
|
1200
|
-
}, a = P(), c =
|
|
1201
|
-
|
|
1213
|
+
}, a = P(), c = H("designer-host-service"), i = H("design-item-context"), u = De(i, c), f = ke(a, i, u);
|
|
1214
|
+
$(() => {
|
|
1202
1215
|
a.value.componentInstance = f;
|
|
1203
1216
|
}), n.expose(f.value);
|
|
1204
1217
|
const p = A(e, n, o, t, m, s, d, t, r, !0), b = O(e, n, o, t, m, s, p, d, t, r, !0), S = U(e, n, p), C = j(e, n, b, !0), w = (F) => {
|
|
1205
1218
|
n.emit("endValueChange", F);
|
|
1206
|
-
}, k = A(e, n, l, r, m, s, w, t, r, !1), N = O(e, n, l, r, m, s, k, w, t, r, !1),
|
|
1219
|
+
}, k = A(e, n, l, r, m, s, w, t, r, !1), N = O(e, n, l, r, m, s, k, w, t, r, !1), y = U(e, n, k), M = j(e, n, N, !1), {
|
|
1207
1220
|
getRealValue: B
|
|
1208
1221
|
} = s, {
|
|
1209
1222
|
format: h
|
|
1210
1223
|
} = m, V = D(() => !e.disabled && !e.readonly && e.showButton);
|
|
1211
|
-
return
|
|
1224
|
+
return $(() => {
|
|
1212
1225
|
const F = B(e.beginValue), I = B(e.endValue);
|
|
1213
1226
|
o.value = h(F), l.value = h(I);
|
|
1214
1227
|
}), x(() => [e.beginValue], ([F]) => {
|
|
@@ -1228,21 +1241,21 @@ const De = /* @__PURE__ */ Q({
|
|
|
1228
1241
|
class: "sub-input-group"
|
|
1229
1242
|
}, [C(), V.value && S()]), E("span", {
|
|
1230
1243
|
class: "spliter"
|
|
1231
|
-
}, [
|
|
1244
|
+
}, [Q("~")]), E("div", {
|
|
1232
1245
|
class: "sub-input-group"
|
|
1233
|
-
}, [M(), V.value &&
|
|
1246
|
+
}, [M(), V.value && y()])])]);
|
|
1234
1247
|
}
|
|
1235
1248
|
});
|
|
1236
|
-
|
|
1237
|
-
e["number-range"] =
|
|
1249
|
+
q.register = (e, n, t, o) => {
|
|
1250
|
+
e["number-range"] = q, n["number-range"] = ee;
|
|
1238
1251
|
};
|
|
1239
|
-
|
|
1240
|
-
e["number-range"] =
|
|
1252
|
+
q.registerDesigner = (e, n, t) => {
|
|
1253
|
+
e["number-range"] = Ie, n["number-range"] = ee;
|
|
1241
1254
|
};
|
|
1242
|
-
const
|
|
1255
|
+
const qe = ie(q);
|
|
1243
1256
|
export {
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1257
|
+
q as FNumberRange,
|
|
1258
|
+
qe as default,
|
|
1259
|
+
Z as numberRangeProps,
|
|
1247
1260
|
ee as propsResolver
|
|
1248
1261
|
};
|