@farris/ui-vue 1.3.0 → 1.3.1
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 +1 -1
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +472 -366
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +472 -480
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +225 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +615 -517
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +325 -333
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +578 -472
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +49 -49
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +832 -722
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +303 -981
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +8 -8
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4429 -4312
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3037 -3020
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2216 -2119
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +223 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1691 -2187
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +143 -136
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +250 -258
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +1 -1
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2672 -3438
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2965 -2970
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +1650 -1602
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +453 -461
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +604 -507
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +402 -378
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +1658 -1666
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +5209 -5088
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4329 -4213
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +905 -1357
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +517 -420
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +588 -491
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1376 -1965
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +1 -1
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1073 -1905
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +809 -1237
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +198 -206
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1297 -1200
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +609 -507
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3391 -3758
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +1 -1
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +544 -447
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +247 -255
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +146 -154
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +700 -675
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +956 -1786
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4963 -5617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +158 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +436 -1124
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +92 -100
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +571 -1210
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +239 -247
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +445 -348
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2278 -3031
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +311 -319
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +215 -223
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +468 -371
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1271 -1174
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +469 -477
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3060 -3065
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2476 -2481
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +374 -382
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +248 -256
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +414 -1093
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -506
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +20216 -21844
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +8 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- package/types/data-grid/src/data-grid.component.d.ts +3 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +7 -9
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -2
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { computed as P, ref as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
function le(e, n, t) {
|
|
1
|
+
var oe = Object.defineProperty;
|
|
2
|
+
var re = (e, n, t) => n in e ? oe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
|
+
var v = (e, n, t) => re(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
+
import { computed as P, ref as F, createVNode as D, defineComponent as J, onMounted as $, watch as A, createTextVNode as Q, inject as Z } from "vue";
|
|
5
|
+
import { isPlainObject as X, cloneDeep as Y } from "lodash-es";
|
|
6
|
+
import E from "bignumber.js";
|
|
7
|
+
import { DgControl as H } from "../designer-canvas/index.esm.js";
|
|
8
|
+
function ie(e, n, t) {
|
|
10
9
|
return n;
|
|
11
10
|
}
|
|
12
|
-
const _ = {},
|
|
13
|
-
function
|
|
14
|
-
const { properties: n, title: t, ignore: o } = e, r = o && Array.isArray(o),
|
|
15
|
-
return (!r || !o.find((u) => u == "id")) && (
|
|
11
|
+
const _ = {}, R = {};
|
|
12
|
+
function q(e) {
|
|
13
|
+
const { properties: n, title: t, ignore: o } = e, r = o && Array.isArray(o), c = Object.keys(n).reduce((u, p) => ((!r || !o.find((l) => l == p)) && (u[p] = n[p].type === "object" && n[p].properties ? q(n[p]) : Y(n[p].default)), u), {});
|
|
14
|
+
return t && (!r || !o.find((u) => u == "id")) && (c.id = `${t}-${Date.now()}`), c;
|
|
16
15
|
}
|
|
17
|
-
function
|
|
16
|
+
function K(e, n = {}, t) {
|
|
18
17
|
const o = _[e];
|
|
19
18
|
if (o) {
|
|
20
|
-
let r =
|
|
21
|
-
const
|
|
22
|
-
return r =
|
|
19
|
+
let r = q(o);
|
|
20
|
+
const c = R[e];
|
|
21
|
+
return r = c ? c({ getSchemaByType: K }, r, n, t) : r, r;
|
|
23
22
|
}
|
|
24
23
|
return null;
|
|
25
24
|
}
|
|
26
|
-
function
|
|
27
|
-
const t =
|
|
28
|
-
return Object.keys(e).reduce((o, r) => (o[r] &&
|
|
25
|
+
function ae(e, n) {
|
|
26
|
+
const t = q(n);
|
|
27
|
+
return Object.keys(e).reduce((o, r) => (o[r] && X(o[r]) && X(e[r]) ? Object.assign(o[r], e[r]) : o[r] = e[r], o), t), t;
|
|
29
28
|
}
|
|
30
|
-
function
|
|
29
|
+
function le(e, n) {
|
|
31
30
|
return Object.keys(e).filter((o) => e[o] != null).reduce((o, r) => {
|
|
32
31
|
if (n.has(r)) {
|
|
33
|
-
const
|
|
34
|
-
if (typeof
|
|
35
|
-
o[
|
|
32
|
+
const c = n.get(r);
|
|
33
|
+
if (typeof c == "string")
|
|
34
|
+
o[c] = e[r];
|
|
36
35
|
else {
|
|
37
|
-
const u =
|
|
36
|
+
const u = c(r, e[r], e);
|
|
38
37
|
Object.assign(o, u);
|
|
39
38
|
}
|
|
40
39
|
} else
|
|
@@ -43,64 +42,64 @@ function ce(e, n) {
|
|
|
43
42
|
}, {});
|
|
44
43
|
}
|
|
45
44
|
function se(e, n, t = /* @__PURE__ */ new Map()) {
|
|
46
|
-
const o =
|
|
47
|
-
return
|
|
45
|
+
const o = ae(e, n);
|
|
46
|
+
return le(o, t);
|
|
48
47
|
}
|
|
49
|
-
function
|
|
50
|
-
function n(
|
|
51
|
-
if (typeof
|
|
52
|
-
return d[
|
|
53
|
-
if (typeof
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
return Number(d[
|
|
57
|
-
if (
|
|
58
|
-
return Number(d[
|
|
59
|
-
if (
|
|
60
|
-
return Number(d[
|
|
48
|
+
function ce(e = {}) {
|
|
49
|
+
function n(a, s, i, d) {
|
|
50
|
+
if (typeof i == "number")
|
|
51
|
+
return d[a].length === i;
|
|
52
|
+
if (typeof i == "object") {
|
|
53
|
+
const f = Object.keys(i)[0], m = i[f];
|
|
54
|
+
if (f === "not")
|
|
55
|
+
return Number(d[a].length) !== Number(m);
|
|
56
|
+
if (f === "moreThan")
|
|
57
|
+
return Number(d[a].length) >= Number(m);
|
|
58
|
+
if (f === "lessThan")
|
|
59
|
+
return Number(d[a].length) <= Number(m);
|
|
61
60
|
}
|
|
62
61
|
return !1;
|
|
63
62
|
}
|
|
64
|
-
function t(
|
|
65
|
-
return d[
|
|
63
|
+
function t(a, s, i, d) {
|
|
64
|
+
return d[a] && d[a].propertyValue && String(d[a].propertyValue.value) === String(i);
|
|
66
65
|
}
|
|
67
66
|
const o = /* @__PURE__ */ new Map([
|
|
68
67
|
["length", n],
|
|
69
68
|
["getProperty", t]
|
|
70
69
|
]);
|
|
71
|
-
Object.keys(e).reduce((
|
|
72
|
-
function r(
|
|
73
|
-
const
|
|
74
|
-
return typeof s == "number" ? [{ target:
|
|
70
|
+
Object.keys(e).reduce((a, s) => (a.set(s, e[s]), a), o);
|
|
71
|
+
function r(a, s) {
|
|
72
|
+
const i = a;
|
|
73
|
+
return typeof s == "number" ? [{ target: i, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: i, operator: "getProperty", param: a, value: !!s }] : typeof s == "object" ? Object.keys(s).map((d) => {
|
|
75
74
|
if (d === "length")
|
|
76
|
-
return { target:
|
|
77
|
-
const
|
|
78
|
-
return { target:
|
|
75
|
+
return { target: i, operator: "length", param: null, value: s[d] };
|
|
76
|
+
const f = d, m = s[d];
|
|
77
|
+
return { target: i, operator: "getProperty", param: f, value: m };
|
|
79
78
|
}) : [];
|
|
80
79
|
}
|
|
81
|
-
function
|
|
82
|
-
return Object.keys(
|
|
83
|
-
const
|
|
84
|
-
return
|
|
80
|
+
function c(a) {
|
|
81
|
+
return Object.keys(a).reduce((i, d) => {
|
|
82
|
+
const f = r(d, a[d]);
|
|
83
|
+
return i.push(...f), i;
|
|
85
84
|
}, []);
|
|
86
85
|
}
|
|
87
|
-
function u(
|
|
88
|
-
if (o.has(
|
|
89
|
-
const
|
|
90
|
-
return
|
|
86
|
+
function u(a, s) {
|
|
87
|
+
if (o.has(a.operator)) {
|
|
88
|
+
const i = o.get(a.operator);
|
|
89
|
+
return i && i(a.target, a.param, a.value, s) || !1;
|
|
91
90
|
}
|
|
92
91
|
return !1;
|
|
93
92
|
}
|
|
94
|
-
function p(
|
|
95
|
-
return
|
|
93
|
+
function p(a, s) {
|
|
94
|
+
return c(a).reduce((f, m) => f && u(m, s), !0);
|
|
96
95
|
}
|
|
97
|
-
function a
|
|
98
|
-
const
|
|
99
|
-
return d ? !
|
|
96
|
+
function l(a, s) {
|
|
97
|
+
const i = Object.keys(a), d = i.includes("allOf"), f = i.includes("anyOf"), m = d || f, C = (m ? a[m ? d ? "allOf" : "anyOf" : "allOf"] : [a]).map((N) => p(N, s));
|
|
98
|
+
return d ? !C.includes(!1) : C.includes(!0);
|
|
100
99
|
}
|
|
101
|
-
return { parseValueSchema:
|
|
100
|
+
return { parseValueSchema: l };
|
|
102
101
|
}
|
|
103
|
-
const
|
|
102
|
+
const g = {
|
|
104
103
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
105
104
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
106
105
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -139,20 +138,20 @@ const m = {
|
|
|
139
138
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
140
139
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
141
140
|
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
function
|
|
145
|
-
return _[n.title] = n,
|
|
146
|
-
const p = se(u, n, t),
|
|
147
|
-
return Object.assign(
|
|
141
|
+
}, ue = {}, de = {};
|
|
142
|
+
ce();
|
|
143
|
+
function pe(e, n, t = /* @__PURE__ */ new Map(), o = (u, p, l) => p, r = {}, c = (u) => u) {
|
|
144
|
+
return _[n.title] = n, R[n.title] = o, ue[n.title] = r, de[n.title] = c, (u = {}) => {
|
|
145
|
+
const p = se(u, n, t), l = Object.keys(e).reduce((a, s) => (a[s] = e[s].default, a), {});
|
|
146
|
+
return Object.assign(l, p);
|
|
148
147
|
};
|
|
149
148
|
}
|
|
150
|
-
function
|
|
149
|
+
function me(e, n) {
|
|
151
150
|
return { customClass: n.class, customStyle: n.style };
|
|
152
151
|
}
|
|
153
|
-
const
|
|
154
|
-
["appearance",
|
|
155
|
-
]),
|
|
152
|
+
const fe = /* @__PURE__ */ new Map([
|
|
153
|
+
["appearance", me]
|
|
154
|
+
]), ge = "https://json-schema.org/draft/2020-12/schema", ye = "https://farris-design.gitee.io/number-range.schema.json", be = "number-range", he = "A Farris Component", ve = "object", Ce = {
|
|
156
155
|
id: {
|
|
157
156
|
description: "The unique identifier for a number-range",
|
|
158
157
|
type: "string"
|
|
@@ -214,17 +213,17 @@ const ye = /* @__PURE__ */ new Map([
|
|
|
214
213
|
type: "boolean",
|
|
215
214
|
default: !0
|
|
216
215
|
}
|
|
217
|
-
},
|
|
216
|
+
}, we = [
|
|
218
217
|
"id",
|
|
219
218
|
"type"
|
|
220
|
-
],
|
|
221
|
-
$schema:
|
|
222
|
-
$id:
|
|
223
|
-
title:
|
|
224
|
-
description:
|
|
225
|
-
type:
|
|
226
|
-
properties:
|
|
227
|
-
required:
|
|
219
|
+
], Se = {
|
|
220
|
+
$schema: ge,
|
|
221
|
+
$id: ye,
|
|
222
|
+
title: be,
|
|
223
|
+
description: he,
|
|
224
|
+
type: ve,
|
|
225
|
+
properties: Ce,
|
|
226
|
+
required: we
|
|
228
227
|
}, z = {
|
|
229
228
|
/**
|
|
230
229
|
* 组件标识
|
|
@@ -337,42 +336,42 @@ const ye = /* @__PURE__ */ new Map([
|
|
|
337
336
|
* 是否使用千分值
|
|
338
337
|
*/
|
|
339
338
|
useThousands: { type: Boolean, default: !0 }
|
|
340
|
-
}, ee =
|
|
339
|
+
}, ee = pe(z, Se, fe, ie);
|
|
341
340
|
function te(e, n) {
|
|
342
341
|
const t = P(() => Number(e.precision) || 0);
|
|
343
|
-
function o(
|
|
344
|
-
return
|
|
342
|
+
function o(l) {
|
|
343
|
+
return l.toFixed(t.value);
|
|
345
344
|
}
|
|
346
|
-
function r(
|
|
347
|
-
return isNaN(
|
|
345
|
+
function r(l) {
|
|
346
|
+
return isNaN(l) || l === null || l === void 0 || l === "";
|
|
348
347
|
}
|
|
349
|
-
function l
|
|
350
|
-
const
|
|
351
|
-
return
|
|
348
|
+
function c(l) {
|
|
349
|
+
const a = r(e.max) ? null : new E(String(e.max), 10), s = r(e.min) ? null : new E(String(e.min), 10);
|
|
350
|
+
return a && l.gt(a) ? a : s && l.lt(s) ? s : l;
|
|
352
351
|
}
|
|
353
|
-
function u(
|
|
354
|
-
const d = new
|
|
355
|
-
let
|
|
356
|
-
return
|
|
352
|
+
function u(l, a, s, i) {
|
|
353
|
+
const d = new E(l, 10), f = r(s && s.value) ? null : new E(String(s.value), 10), m = r(a && a.value) ? null : new E(String(a.value), 10);
|
|
354
|
+
let y;
|
|
355
|
+
return i ? y = f && d.gt(f) ? f : d : y = m && d.lt(m) ? m : d, y.toString();
|
|
357
356
|
}
|
|
358
|
-
function p(
|
|
357
|
+
function p(l) {
|
|
359
358
|
if (e.parser)
|
|
360
|
-
return isNaN(Number(
|
|
361
|
-
let
|
|
362
|
-
if (
|
|
359
|
+
return isNaN(Number(l)) ? e.parser(l) : l;
|
|
360
|
+
let a = c(new E(l, 10));
|
|
361
|
+
if (a.isNaN()) {
|
|
363
362
|
if (e.canNull)
|
|
364
363
|
return null;
|
|
365
|
-
const
|
|
366
|
-
if (!
|
|
367
|
-
|
|
364
|
+
const i = new E("" + e.min, 10), d = new E("" + e.max, 10);
|
|
365
|
+
if (!i.isNaN())
|
|
366
|
+
a = i;
|
|
368
367
|
else if (!d.isNaN())
|
|
369
|
-
|
|
368
|
+
a = d;
|
|
370
369
|
else
|
|
371
370
|
return 0;
|
|
372
371
|
}
|
|
373
|
-
return o(
|
|
372
|
+
return o(a);
|
|
374
373
|
}
|
|
375
|
-
return { getRealValue: p, isEmpty: r, precision: t, getValidNumberObject:
|
|
374
|
+
return { getRealValue: p, isEmpty: r, precision: t, getValidNumberObject: c, getValidNumberInRange: u };
|
|
376
375
|
}
|
|
377
376
|
function ne(e, n, t) {
|
|
378
377
|
const o = P(() => ({
|
|
@@ -381,291 +380,282 @@ function ne(e, n, t) {
|
|
|
381
380
|
decimalSeparator: e.decimalSeparator,
|
|
382
381
|
groupSeparator: e.useThousands ? e.groupSeparator : "",
|
|
383
382
|
groupSize: e.groupSize
|
|
384
|
-
})), { getValidNumberObject: r, precision:
|
|
385
|
-
function u(
|
|
386
|
-
return
|
|
383
|
+
})), { getValidNumberObject: r, precision: c } = t;
|
|
384
|
+
function u(a) {
|
|
385
|
+
return a = a == null || a === "" ? "" : String(a), a = a.replace(new RegExp(e.prefix, "g"), "").replace(new RegExp(e.suffix, "g"), "").replace(/,/g, ""), e.groupSeparator && e.groupSeparator !== "," && (a = a.replace(new RegExp(`\\${e.groupSeparator}`, "g"), "")), e.decimalSeparator && e.decimalSeparator !== "." && (a = a.replace(new RegExp(`\\${e.decimalSeparator}`, "g"), ".")), a;
|
|
387
386
|
}
|
|
388
|
-
function p(
|
|
389
|
-
return e.precision !== null && e.precision !== void 0 ?
|
|
387
|
+
function p(a, s) {
|
|
388
|
+
return e.precision !== null && e.precision !== void 0 ? a.toFormat(c.value, s) : a.toFormat(s);
|
|
390
389
|
}
|
|
391
|
-
function a
|
|
392
|
-
const s = u(
|
|
390
|
+
function l(a) {
|
|
391
|
+
const s = u(a), i = new E(s, 10), d = r(i);
|
|
393
392
|
return d.valueOf() === "0" && !e.showZero || d.isNaN() ? "" : e.formatter ? e.formatter(d.toNumber()) : p(d, o.value);
|
|
394
393
|
}
|
|
395
|
-
return { cleanFormat: u, format:
|
|
394
|
+
return { cleanFormat: u, format: l };
|
|
396
395
|
}
|
|
397
|
-
function
|
|
398
|
-
const { format: s } = r, { getRealValue:
|
|
399
|
-
function g() {
|
|
400
|
-
const B = new M(o.value || 0);
|
|
401
|
-
return !(e.max && !new M(e.max).isNaN() && B.gte(new M(e.max)));
|
|
402
|
-
}
|
|
396
|
+
function L(e, n, t, o, r, c, u, p, l, a) {
|
|
397
|
+
const { format: s } = r, { getRealValue: i, getValidNumberInRange: d } = c;
|
|
403
398
|
function f() {
|
|
404
|
-
const
|
|
405
|
-
return !(e.
|
|
399
|
+
const M = new E(o.value || 0);
|
|
400
|
+
return !(e.max && !new E(e.max).isNaN() && M.gte(new E(e.max)));
|
|
401
|
+
}
|
|
402
|
+
function m() {
|
|
403
|
+
const M = new E(o.value || 0);
|
|
404
|
+
return !(e.min && !new E(e.min).isNaN() && M.lte(new E(e.min)));
|
|
406
405
|
}
|
|
407
|
-
function
|
|
406
|
+
function y(M) {
|
|
408
407
|
if (e.readonly || e.disabled)
|
|
409
408
|
return;
|
|
410
|
-
const
|
|
411
|
-
if (
|
|
412
|
-
let
|
|
413
|
-
|
|
409
|
+
const b = M === "up" ? f : m, k = M === "up" ? "plus" : "minus";
|
|
410
|
+
if (b()) {
|
|
411
|
+
let B = new E(o.value || 0)[k](Number(e.step)).toFixed();
|
|
412
|
+
B = d(B, p, l, a), t.value = s(B), o.value = i(B), u(o.value);
|
|
414
413
|
}
|
|
415
414
|
}
|
|
416
|
-
function
|
|
417
|
-
|
|
415
|
+
function S() {
|
|
416
|
+
y("up");
|
|
418
417
|
}
|
|
419
|
-
function
|
|
420
|
-
|
|
418
|
+
function C() {
|
|
419
|
+
y("down");
|
|
421
420
|
}
|
|
422
|
-
function
|
|
423
|
-
|
|
421
|
+
function w(M) {
|
|
422
|
+
S(), M.stopPropagation();
|
|
424
423
|
}
|
|
425
|
-
function
|
|
426
|
-
|
|
424
|
+
function N(M) {
|
|
425
|
+
C(), M.stopPropagation();
|
|
427
426
|
}
|
|
428
|
-
return { canDownward:
|
|
427
|
+
return { canDownward: m, canUpward: f, downward: C, onClickDownButton: N, onClickUpButton: w, upward: S };
|
|
429
428
|
}
|
|
430
|
-
function
|
|
431
|
-
const { cleanFormat:
|
|
432
|
-
function
|
|
433
|
-
var
|
|
434
|
-
if (
|
|
429
|
+
function O(e, n, t, o, r, c, u, p, l, a, s) {
|
|
430
|
+
const { cleanFormat: i, format: d } = r, { getRealValue: f, isEmpty: m, getValidNumberInRange: y } = c, { downward: S, upward: C } = u, w = P(() => t.value), N = F(!1);
|
|
431
|
+
function M(h) {
|
|
432
|
+
var I;
|
|
433
|
+
if (h.stopPropagation(), e.readonly || e.disabled)
|
|
435
434
|
return;
|
|
436
|
-
|
|
437
|
-
let
|
|
438
|
-
e.canNull || (
|
|
439
|
-
let
|
|
440
|
-
|
|
441
|
-
}
|
|
442
|
-
function
|
|
443
|
-
|
|
444
|
-
}
|
|
445
|
-
function
|
|
446
|
-
var
|
|
447
|
-
|
|
448
|
-
let
|
|
449
|
-
e.canNull || (
|
|
450
|
-
const
|
|
451
|
-
t.value =
|
|
452
|
-
}
|
|
453
|
-
function
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
return { textBoxValue:
|
|
435
|
+
N.value = !1;
|
|
436
|
+
let B = (I = h.target) == null ? void 0 : I.value;
|
|
437
|
+
e.canNull || (B = B || 0);
|
|
438
|
+
let V = i(B);
|
|
439
|
+
V = y(V, l, a, s), t.value = d(V), o.value = f(V), p(o.value), n.emit("blur", { event: h, formatted: t.value, value: o.value });
|
|
440
|
+
}
|
|
441
|
+
function b(h) {
|
|
442
|
+
h.stopPropagation(), !(e.readonly || e.disabled) && (N.value = !0, t.value = m(o.value) || !e.showZero && o.value === "0" ? "" : String(o.value), n.emit("focus", { event: h, formatted: t.value, value: o.value }));
|
|
443
|
+
}
|
|
444
|
+
function k(h) {
|
|
445
|
+
var I;
|
|
446
|
+
h.stopPropagation();
|
|
447
|
+
let B = (I = h.target) == null ? void 0 : I.value;
|
|
448
|
+
e.canNull || (B = B || 0);
|
|
449
|
+
const V = i(B);
|
|
450
|
+
t.value = V, o.value = f(V), p(o.value);
|
|
451
|
+
}
|
|
452
|
+
function T(h) {
|
|
453
|
+
h.key === "ArrowDown" && (h.preventDefault(), S()), h.key === "ArrowUp" && (h.preventDefault(), C()), h.stopPropagation();
|
|
454
|
+
}
|
|
455
|
+
return { textBoxValue: w, onBlurTextBox: M, onFocusTextBox: b, onInput: k, onKeyDown: T, isTextBoxFocused: N };
|
|
457
456
|
}
|
|
458
|
-
function
|
|
457
|
+
function j(e, n, t, o) {
|
|
459
458
|
const {
|
|
460
459
|
onBlurTextBox: r,
|
|
461
|
-
onFocusTextBox:
|
|
460
|
+
onFocusTextBox: c,
|
|
462
461
|
onInput: u,
|
|
463
462
|
onKeyDown: p,
|
|
464
|
-
textBoxValue:
|
|
465
|
-
} = t,
|
|
463
|
+
textBoxValue: l
|
|
464
|
+
} = t, a = P(() => e.disabled || e.readonly || !e.editable ? "" : o ? e.beginPlaceHolder : e.endPlaceHolder), s = P(() => ({
|
|
466
465
|
"form-control": !0,
|
|
467
466
|
"sub-input": !0
|
|
468
|
-
})),
|
|
467
|
+
})), i = P(() => ({
|
|
469
468
|
"text-align": e.textAlign
|
|
470
469
|
}));
|
|
471
|
-
function d(
|
|
472
|
-
|
|
470
|
+
function d(f) {
|
|
471
|
+
f.stopPropagation();
|
|
473
472
|
}
|
|
474
|
-
return () =>
|
|
473
|
+
return () => D("input", {
|
|
475
474
|
class: s.value,
|
|
476
|
-
style:
|
|
475
|
+
style: i.value,
|
|
477
476
|
type: "text",
|
|
478
|
-
value:
|
|
477
|
+
value: l.value,
|
|
479
478
|
disabled: e.disabled,
|
|
480
479
|
readonly: e.readonly || !e.editable,
|
|
481
|
-
placeholder:
|
|
480
|
+
placeholder: a.value,
|
|
482
481
|
onBlur: r,
|
|
483
482
|
onChange: d,
|
|
484
|
-
onFocus:
|
|
483
|
+
onFocus: c,
|
|
485
484
|
onInput: u,
|
|
486
485
|
onKeydown: p
|
|
487
486
|
}, null);
|
|
488
487
|
}
|
|
489
|
-
function
|
|
488
|
+
function U(e, n, t) {
|
|
490
489
|
const {
|
|
491
490
|
canDownward: o,
|
|
492
491
|
canUpward: r,
|
|
493
|
-
onClickDownButton:
|
|
492
|
+
onClickDownButton: c,
|
|
494
493
|
onClickUpButton: u
|
|
495
494
|
} = t, p = P(() => ({
|
|
496
495
|
"input-group-append": !0,
|
|
497
496
|
"btn-group": !0,
|
|
498
497
|
"btn-group-number": !0,
|
|
499
498
|
"sub-btn-group": !0
|
|
500
|
-
})),
|
|
499
|
+
})), l = P(() => ({
|
|
501
500
|
btn: !0,
|
|
502
501
|
"btn-secondary": !0,
|
|
503
502
|
"btn-number-flag": !0
|
|
504
|
-
})),
|
|
503
|
+
})), a = P(() => ({
|
|
505
504
|
cursor: r() ? "pointer" : "not-allowed",
|
|
506
505
|
"margin-left": 0
|
|
507
506
|
})), s = P(() => ({
|
|
508
507
|
cursor: o() ? "pointer" : "not-allowed",
|
|
509
508
|
"margin-left": 0
|
|
510
509
|
}));
|
|
511
|
-
return () =>
|
|
510
|
+
return () => D("div", {
|
|
512
511
|
class: p.value
|
|
513
|
-
}, [
|
|
512
|
+
}, [D("button", {
|
|
514
513
|
title: "upButton",
|
|
515
|
-
class:
|
|
516
|
-
style:
|
|
514
|
+
class: l.value,
|
|
515
|
+
style: a.value,
|
|
517
516
|
onClick: u,
|
|
518
517
|
disabled: !r()
|
|
519
|
-
}, [
|
|
518
|
+
}, [D("span", {
|
|
520
519
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
521
|
-
}, null)]),
|
|
520
|
+
}, null)]), D("button", {
|
|
522
521
|
title: "downButton",
|
|
523
|
-
class:
|
|
522
|
+
class: l.value,
|
|
524
523
|
style: s.value,
|
|
525
|
-
onClick:
|
|
524
|
+
onClick: c,
|
|
526
525
|
disabled: !o()
|
|
527
|
-
}, [
|
|
526
|
+
}, [D("span", {
|
|
528
527
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
529
528
|
}, null)])]);
|
|
530
529
|
}
|
|
531
|
-
const
|
|
530
|
+
const W = /* @__PURE__ */ J({
|
|
532
531
|
name: "FNumberRange",
|
|
533
532
|
props: z,
|
|
534
533
|
emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
|
|
535
534
|
setup(e, n) {
|
|
536
|
-
const t =
|
|
537
|
-
n.emit("beginValueChange",
|
|
538
|
-
},
|
|
539
|
-
n.emit("endValueChange",
|
|
540
|
-
},
|
|
541
|
-
getRealValue:
|
|
535
|
+
const t = F(e.beginValue), o = F(""), r = F(e.endValue), c = F(""), u = te(e), p = ne(e, n, u), l = (b) => {
|
|
536
|
+
n.emit("beginValueChange", b);
|
|
537
|
+
}, a = L(e, n, o, t, p, u, l, t, r, !0), s = O(e, n, o, t, p, u, a, l, t, r, !0), i = U(e, n, a), d = j(e, n, s, !0), f = (b) => {
|
|
538
|
+
n.emit("endValueChange", b);
|
|
539
|
+
}, m = L(e, n, c, r, p, u, f, t, r, !1), y = O(e, n, c, r, p, u, m, f, t, r, !1), S = U(e, n, m), C = j(e, n, y, !1), {
|
|
540
|
+
getRealValue: w
|
|
542
541
|
} = u, {
|
|
543
|
-
format:
|
|
544
|
-
} = p,
|
|
545
|
-
return
|
|
546
|
-
const
|
|
547
|
-
o.value =
|
|
548
|
-
}),
|
|
542
|
+
format: N
|
|
543
|
+
} = p, M = P(() => !e.disabled && !e.readonly && e.showButton);
|
|
544
|
+
return $(() => {
|
|
545
|
+
const b = w(e.beginValue), k = w(e.endValue);
|
|
546
|
+
o.value = N(b), c.value = N(k);
|
|
547
|
+
}), A(() => [e.beginValue], ([b]) => {
|
|
549
548
|
if (!s.isTextBoxFocused.value) {
|
|
550
|
-
const
|
|
551
|
-
o.value =
|
|
549
|
+
const k = w(b);
|
|
550
|
+
o.value = N(k);
|
|
552
551
|
}
|
|
553
|
-
}),
|
|
554
|
-
if (!
|
|
555
|
-
const
|
|
556
|
-
|
|
552
|
+
}), A(() => [e.endValue], ([b]) => {
|
|
553
|
+
if (!y.isTextBoxFocused.value) {
|
|
554
|
+
const k = w(b);
|
|
555
|
+
c.value = N(k);
|
|
557
556
|
}
|
|
558
|
-
}),
|
|
559
|
-
o.value =
|
|
560
|
-
}), () =>
|
|
557
|
+
}), A(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
558
|
+
o.value = N(t.value), c.value = N(r.value);
|
|
559
|
+
}), () => D("div", {
|
|
561
560
|
class: "input-group number-range f-cmp-number-spinner"
|
|
562
|
-
}, [
|
|
561
|
+
}, [D("div", {
|
|
563
562
|
class: "form-control input-container"
|
|
564
|
-
}, [
|
|
563
|
+
}, [D("div", {
|
|
565
564
|
class: "sub-input-group"
|
|
566
|
-
}, [d(),
|
|
565
|
+
}, [d(), M.value && i()]), D("span", {
|
|
567
566
|
class: "spliter"
|
|
568
|
-
}, [Q("~")]),
|
|
567
|
+
}, [Q("~")]), D("div", {
|
|
569
568
|
class: "sub-input-group"
|
|
570
|
-
}, [
|
|
569
|
+
}, [C(), M.value && S()])])]);
|
|
571
570
|
}
|
|
572
571
|
});
|
|
573
|
-
function
|
|
574
|
-
var
|
|
572
|
+
function Me(e, n, t) {
|
|
573
|
+
var M;
|
|
575
574
|
function o() {
|
|
576
575
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
577
576
|
}
|
|
578
577
|
o();
|
|
579
|
-
const r = t && t.getStyles && t.getStyles() || "",
|
|
578
|
+
const r = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", u = F();
|
|
580
579
|
function p() {
|
|
581
580
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
582
581
|
}
|
|
583
|
-
function
|
|
582
|
+
function l() {
|
|
584
583
|
return !1;
|
|
585
584
|
}
|
|
586
|
-
function
|
|
585
|
+
function a() {
|
|
587
586
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
588
587
|
}
|
|
589
588
|
function s() {
|
|
590
589
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
591
590
|
}
|
|
592
|
-
function
|
|
593
|
-
if (!
|
|
591
|
+
function i(b) {
|
|
592
|
+
if (!b || !b.value)
|
|
594
593
|
return null;
|
|
595
|
-
if (
|
|
596
|
-
return
|
|
597
|
-
const
|
|
598
|
-
return
|
|
594
|
+
if (b.value.schema && b.value.schema.type === "component")
|
|
595
|
+
return b.value;
|
|
596
|
+
const k = F(b == null ? void 0 : b.value.parent), T = i(k);
|
|
597
|
+
return T || null;
|
|
599
598
|
}
|
|
600
|
-
function d(
|
|
601
|
-
const { componentInstance:
|
|
602
|
-
return !
|
|
599
|
+
function d(b = n) {
|
|
600
|
+
const { componentInstance: k, designerItemElementRef: T } = b;
|
|
601
|
+
return !k || !k.value ? null : k.value.canMove ? T : d(b.parent);
|
|
603
602
|
}
|
|
604
|
-
function
|
|
605
|
-
return !!t && t.canAccepts(
|
|
603
|
+
function f(b) {
|
|
604
|
+
return !!t && t.canAccepts(b);
|
|
606
605
|
}
|
|
607
|
-
function
|
|
606
|
+
function m() {
|
|
608
607
|
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
609
608
|
}
|
|
610
|
-
function
|
|
609
|
+
function y() {
|
|
611
610
|
}
|
|
612
|
-
function
|
|
613
|
-
|
|
611
|
+
function S(b, k) {
|
|
612
|
+
k && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(k);
|
|
614
613
|
}
|
|
615
|
-
function
|
|
616
|
-
const { componentType:
|
|
617
|
-
let h =
|
|
618
|
-
t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(
|
|
619
|
-
const
|
|
620
|
-
return h && !h.id && h.type ===
|
|
614
|
+
function C(b, k) {
|
|
615
|
+
const { componentType: T } = b;
|
|
616
|
+
let h = K(T, b, k);
|
|
617
|
+
t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(b, h));
|
|
618
|
+
const B = T.toLowerCase().replace("-", "_");
|
|
619
|
+
return h && !h.id && h.type === T && (h.id = `${B}_${Math.random().toString().slice(2, 6)}`), h;
|
|
621
620
|
}
|
|
622
|
-
function
|
|
623
|
-
const b = String(y.getAttribute("data-controltype")), h = y.getAttribute("data-feature"), v = h ? JSON.parse(h) : {};
|
|
624
|
-
v.parentComponentInstance = u.value;
|
|
625
|
-
let k = R(b, v);
|
|
626
|
-
t && t.onAcceptNewChildElement && (k = t.onAcceptNewChildElement(y, C, k));
|
|
627
|
-
const oe = b.toLowerCase().replace("-", "_");
|
|
628
|
-
return k && !k.id && k.type === b && (k.id = `${oe}_${Math.random().toString().slice(2, 6)}`), k;
|
|
621
|
+
function w(b) {
|
|
629
622
|
}
|
|
630
|
-
function
|
|
631
|
-
}
|
|
632
|
-
function B(...y) {
|
|
623
|
+
function N(...b) {
|
|
633
624
|
if (t && t.getPropsConfig)
|
|
634
|
-
return t.getPropsConfig(...
|
|
625
|
+
return t.getPropsConfig(...b);
|
|
635
626
|
}
|
|
636
627
|
return u.value = {
|
|
637
628
|
canMove: p(),
|
|
638
|
-
canSelectParent:
|
|
639
|
-
canDelete:
|
|
629
|
+
canSelectParent: l(),
|
|
630
|
+
canDelete: a(),
|
|
640
631
|
canNested: !s(),
|
|
641
632
|
contents: n == null ? void 0 : n.schema.contents,
|
|
642
633
|
elementRef: e,
|
|
643
|
-
parent: (
|
|
634
|
+
parent: (M = n == null ? void 0 : n.parent) == null ? void 0 : M.componentInstance,
|
|
644
635
|
schema: n == null ? void 0 : n.schema,
|
|
645
636
|
styles: r,
|
|
646
|
-
designerClass:
|
|
647
|
-
canAccepts:
|
|
648
|
-
getBelongedComponentInstance:
|
|
637
|
+
designerClass: c,
|
|
638
|
+
canAccepts: f,
|
|
639
|
+
getBelongedComponentInstance: i,
|
|
649
640
|
getDraggableDesignItemElement: d,
|
|
650
|
-
getDraggingDisplayText:
|
|
651
|
-
getPropConfig:
|
|
652
|
-
getDragScopeElement:
|
|
653
|
-
onAcceptMovedChildElement:
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
addNewChildComponentSchema: E,
|
|
641
|
+
getDraggingDisplayText: m,
|
|
642
|
+
getPropConfig: N,
|
|
643
|
+
getDragScopeElement: y,
|
|
644
|
+
onAcceptMovedChildElement: S,
|
|
645
|
+
onChildElementMovedOut: w,
|
|
646
|
+
addNewChildComponentSchema: C,
|
|
657
647
|
updateDragAndDropRules: o,
|
|
658
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
659
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
648
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || F(!1),
|
|
649
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || F(!1)
|
|
660
650
|
}, u;
|
|
661
651
|
}
|
|
662
|
-
function
|
|
652
|
+
function ke(e, n) {
|
|
663
653
|
e.schema;
|
|
664
|
-
const t =
|
|
665
|
-
function r(
|
|
654
|
+
const t = F(!0), o = F(!0);
|
|
655
|
+
function r(i) {
|
|
666
656
|
return !1;
|
|
667
657
|
}
|
|
668
|
-
function
|
|
658
|
+
function c() {
|
|
669
659
|
return !1;
|
|
670
660
|
}
|
|
671
661
|
function u() {
|
|
@@ -674,39 +664,39 @@ function Ve(e, n) {
|
|
|
674
664
|
function p() {
|
|
675
665
|
return !0;
|
|
676
666
|
}
|
|
677
|
-
function
|
|
667
|
+
function l(i) {
|
|
678
668
|
}
|
|
679
|
-
function
|
|
669
|
+
function a() {
|
|
680
670
|
}
|
|
681
|
-
function s(
|
|
671
|
+
function s(i) {
|
|
682
672
|
return null;
|
|
683
673
|
}
|
|
684
674
|
return {
|
|
685
675
|
canAccepts: r,
|
|
686
|
-
checkCanDeleteComponent:
|
|
676
|
+
checkCanDeleteComponent: c,
|
|
687
677
|
checkCanMoveComponent: u,
|
|
688
678
|
hideNestedPaddingInDesginerView: p,
|
|
689
|
-
onAcceptMovedChildElement:
|
|
690
|
-
resolveComponentContext:
|
|
679
|
+
onAcceptMovedChildElement: l,
|
|
680
|
+
resolveComponentContext: a,
|
|
691
681
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
692
682
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
693
683
|
getPropsConfig: s
|
|
694
684
|
};
|
|
695
685
|
}
|
|
696
|
-
class
|
|
686
|
+
class Ne {
|
|
697
687
|
constructor(n, t) {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
688
|
+
v(this, "componentId");
|
|
689
|
+
v(this, "viewModelId");
|
|
690
|
+
v(this, "eventsEditorUtils");
|
|
691
|
+
v(this, "formSchemaUtils");
|
|
692
|
+
v(this, "formMetadataConverter");
|
|
693
|
+
v(this, "designViewModelUtils");
|
|
694
|
+
v(this, "designViewModelField");
|
|
695
|
+
v(this, "controlCreatorUtils");
|
|
696
|
+
v(this, "designerHostService");
|
|
697
|
+
v(this, "schemaService", null);
|
|
698
|
+
v(this, "metadataService", null);
|
|
699
|
+
v(this, "propertyConfig", {
|
|
710
700
|
type: "object",
|
|
711
701
|
categories: {}
|
|
712
702
|
});
|
|
@@ -748,7 +738,7 @@ class Me {
|
|
|
748
738
|
type: "combo-list",
|
|
749
739
|
textField: "name",
|
|
750
740
|
valueField: "value",
|
|
751
|
-
data: [{ value: n.type, name:
|
|
741
|
+
data: [{ value: n.type, name: g[n.type].name }]
|
|
752
742
|
}
|
|
753
743
|
}
|
|
754
744
|
}
|
|
@@ -784,16 +774,16 @@ class Me {
|
|
|
784
774
|
const o = t && t.parent && t.parent.schema;
|
|
785
775
|
if (!o)
|
|
786
776
|
return;
|
|
787
|
-
const r = o.contents.findIndex((u) => u.id === n),
|
|
788
|
-
o.contents.splice(r, 1), o.contents.splice(r, 0,
|
|
777
|
+
const r = o.contents.findIndex((u) => u.id === n), c = Y(o.contents[r]);
|
|
778
|
+
o.contents.splice(r, 1), o.contents.splice(r, 0, c);
|
|
789
779
|
}
|
|
790
780
|
}
|
|
791
|
-
const
|
|
781
|
+
const x = class x {
|
|
792
782
|
/**
|
|
793
783
|
* 根据绑定字段类型获取可用的输入类控件
|
|
794
784
|
*/
|
|
795
785
|
static getEditorTypesByMDataType(n) {
|
|
796
|
-
const t =
|
|
786
|
+
const t = x.fieldControlTypeMapping[n];
|
|
797
787
|
return t || [{ key: "", value: "" }];
|
|
798
788
|
}
|
|
799
789
|
/**
|
|
@@ -801,8 +791,8 @@ const A = class A {
|
|
|
801
791
|
*/
|
|
802
792
|
static getAllInputTypes() {
|
|
803
793
|
const n = [];
|
|
804
|
-
for (let t in
|
|
805
|
-
|
|
794
|
+
for (let t in x.fieldControlTypeMapping)
|
|
795
|
+
x.fieldControlTypeMapping[t].forEach((o) => {
|
|
806
796
|
n.find((r) => r.key === o.key && r.value === o.value) || n.push({ key: o.key, value: o.value });
|
|
807
797
|
});
|
|
808
798
|
return n;
|
|
@@ -811,59 +801,166 @@ const A = class A {
|
|
|
811
801
|
/**
|
|
812
802
|
* <字段类型,可配置的控件类型列表>的映射
|
|
813
803
|
*/
|
|
814
|
-
x
|
|
804
|
+
v(x, "fieldControlTypeMapping", {
|
|
815
805
|
String: [
|
|
816
|
-
{ key:
|
|
817
|
-
{ key:
|
|
818
|
-
{ key:
|
|
819
|
-
{ key:
|
|
820
|
-
{ key:
|
|
821
|
-
{ key:
|
|
822
|
-
{ key:
|
|
806
|
+
{ key: g["input-group"].type, value: g["input-group"].name },
|
|
807
|
+
{ key: g.lookup.type, value: g.lookup.name },
|
|
808
|
+
{ key: g["date-picker"].type, value: g["date-picker"].name },
|
|
809
|
+
{ key: g["check-box"].type, value: g["check-box"].name },
|
|
810
|
+
{ key: g["check-group"].type, value: g["check-group"].name },
|
|
811
|
+
{ key: g["radio-group"].type, value: g["radio-group"].name },
|
|
812
|
+
{ key: g["combo-list"].type, value: g["combo-list"].name },
|
|
813
|
+
{ key: g.textarea.type, value: g.textarea.name }
|
|
823
814
|
],
|
|
824
815
|
Text: [
|
|
825
|
-
{ key:
|
|
826
|
-
{ key:
|
|
816
|
+
{ key: g.textarea.type, value: g.textarea.name },
|
|
817
|
+
{ key: g.lookup.type, value: g.lookup.name }
|
|
827
818
|
],
|
|
828
819
|
Decimal: [
|
|
829
|
-
{ key:
|
|
820
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
830
821
|
],
|
|
831
822
|
Integer: [
|
|
832
|
-
{ key:
|
|
823
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
833
824
|
],
|
|
834
825
|
Number: [
|
|
835
|
-
{ key:
|
|
826
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
836
827
|
],
|
|
837
828
|
BigNumber: [
|
|
838
|
-
{ key:
|
|
829
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
839
830
|
],
|
|
840
831
|
Date: [
|
|
841
|
-
{ key:
|
|
832
|
+
{ key: g["date-picker"].type, value: g["date-picker"].name }
|
|
842
833
|
],
|
|
843
834
|
DateTime: [
|
|
844
|
-
{ key:
|
|
835
|
+
{ key: g["date-picker"].type, value: g["date-picker"].name }
|
|
845
836
|
],
|
|
846
837
|
Boolean: [
|
|
847
|
-
{ key:
|
|
848
|
-
{ key:
|
|
838
|
+
{ key: g.switch.type, value: g.switch.name },
|
|
839
|
+
{ key: g["check-box"].type, value: g["check-box"].name }
|
|
849
840
|
],
|
|
850
841
|
Enum: [
|
|
851
|
-
{ key:
|
|
852
|
-
{ key:
|
|
842
|
+
{ key: g["combo-list"].type, value: g["combo-list"].name },
|
|
843
|
+
{ key: g["radio-group"].type, value: g["radio-group"].name }
|
|
853
844
|
],
|
|
854
845
|
Object: [
|
|
855
|
-
{ key:
|
|
856
|
-
{ key:
|
|
857
|
-
{ key:
|
|
846
|
+
{ key: g.lookup.type, value: g.lookup.name },
|
|
847
|
+
{ key: g["combo-list"].type, value: g["combo-list"].name },
|
|
848
|
+
{ key: g["radio-group"].type, value: g["radio-group"].name }
|
|
858
849
|
]
|
|
859
850
|
});
|
|
860
|
-
let
|
|
861
|
-
const
|
|
862
|
-
class
|
|
851
|
+
let G = x;
|
|
852
|
+
const Be = F(0);
|
|
853
|
+
class Ve {
|
|
854
|
+
constructor() {
|
|
855
|
+
/** 控件标题 */
|
|
856
|
+
v(this, "label", "");
|
|
857
|
+
/** 控件id */
|
|
858
|
+
v(this, "id", "");
|
|
859
|
+
/** 每个控件占用的栅格数 */
|
|
860
|
+
v(this, "columnInSM", 12);
|
|
861
|
+
v(this, "columnInMD", 6);
|
|
862
|
+
v(this, "columnInLG", 3);
|
|
863
|
+
v(this, "columnInEL", 2);
|
|
864
|
+
/** 每个控件占用的列数 */
|
|
865
|
+
v(this, "displayWidthInSM", 1);
|
|
866
|
+
v(this, "displayWidthInMD", 1);
|
|
867
|
+
v(this, "displayWidthInLG", 1);
|
|
868
|
+
v(this, "displayWidthInEL", 1);
|
|
869
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
870
|
+
v(this, "displayColumnCountAtBreakPoint", "md");
|
|
871
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
872
|
+
v(this, "tagRow", 0);
|
|
873
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
874
|
+
v(this, "showTopBorder", 0);
|
|
875
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
876
|
+
v(this, "group", 1);
|
|
877
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
878
|
+
v(this, "isSupportedClass", !0);
|
|
879
|
+
/** 控件所在分组id(设计器用的) */
|
|
880
|
+
v(this, "fieldSetId", "");
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
function Te(e) {
|
|
884
|
+
let n, t;
|
|
885
|
+
const o = /* @__PURE__ */ new Map();
|
|
886
|
+
let r = [];
|
|
887
|
+
function c(s, i) {
|
|
888
|
+
const f = s.split(" ").filter((w) => w.startsWith("col-"));
|
|
889
|
+
if (f.length === 0) {
|
|
890
|
+
i.isSupportedClass = !1;
|
|
891
|
+
return;
|
|
892
|
+
}
|
|
893
|
+
let m = f.find((w) => /^col-([1-9]|10|11|12)$/.test(w)), y = f.find((w) => /^col-md-([1-9]|10|11|12)$/.test(w)), S = f.find((w) => /^col-xl-([1-9]|10|11|12)$/.test(w)), C = f.find((w) => /^col-el-([1-9]|10|11|12)$/.test(w));
|
|
894
|
+
m = m || "col-12", i.columnInSM = parseInt(m.replace("col-", ""), 10), i.displayWidthInSM = i.columnInSM / 12, i.displayWidthInSM !== 1 && (i.isSupportedClass = !1), y = y || "col-md-" + i.columnInSM, i.columnInMD = parseInt(y.replace("col-md-", ""), 10), i.displayWidthInMD = i.columnInMD / 6, [1, 2].includes(i.displayWidthInMD) || (i.isSupportedClass = !1), S = S || "col-xl-" + i.columnInMD, i.columnInLG = parseInt(S.replace("col-xl-", ""), 10), i.displayWidthInLG = i.columnInLG / 3, [1, 2, 3, 4].includes(i.displayWidthInLG) || (i.isSupportedClass = !1), C = C || "col-el-" + i.columnInLG, i.columnInEL = parseInt(C.replace("col-el-", ""), 10), i.displayWidthInEL = i.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(i.displayWidthInEL) || (i.isSupportedClass = !1);
|
|
895
|
+
}
|
|
896
|
+
function u(s, i, d, f = !1) {
|
|
897
|
+
let m = !1;
|
|
898
|
+
s.contents.forEach((y) => {
|
|
899
|
+
if (y.type === "fieldset") {
|
|
900
|
+
d += 1, u(y, i, d, !0), m = !0;
|
|
901
|
+
return;
|
|
902
|
+
}
|
|
903
|
+
m && (d += 1, m = !1);
|
|
904
|
+
const S = y.appearance && y.appearance.class, C = new Ve();
|
|
905
|
+
S ? c(S, C) : C.isSupportedClass = !1, C.label = y.label || y.id, C.id = y.id, C.group = d, f && (C.fieldSetId = s.id), t === y.id && (n = d), o.set(y.id, y), i.push(C);
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
function p(s) {
|
|
909
|
+
const i = e.getComponentById(s);
|
|
910
|
+
if (!i || !i.componentType || !i.componentType.startsWith("form"))
|
|
911
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
912
|
+
const d = e.selectNode(i, (f) => f.type === H["response-form"].type);
|
|
913
|
+
return !d || !d.contents || d.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: d };
|
|
914
|
+
}
|
|
915
|
+
function l(s, i) {
|
|
916
|
+
i = i || s.id;
|
|
917
|
+
const { result: d, message: f, formNode: m } = p(i);
|
|
918
|
+
if (!d)
|
|
919
|
+
return { result: d, message: f };
|
|
920
|
+
t = s.id, r = [], o.clear();
|
|
921
|
+
const y = m.contents[0].type === H.fieldset.type ? 0 : 1;
|
|
922
|
+
u(m, r, y);
|
|
923
|
+
const S = r.find((w) => !w.isSupportedClass);
|
|
924
|
+
return {
|
|
925
|
+
defaultState: {
|
|
926
|
+
defaultGroupNumber: n || 1,
|
|
927
|
+
model: S ? "customize" : "standard"
|
|
928
|
+
},
|
|
929
|
+
importData: r
|
|
930
|
+
};
|
|
931
|
+
}
|
|
932
|
+
function a(s, i) {
|
|
933
|
+
i = i;
|
|
934
|
+
const { result: d, formNode: f } = p(i);
|
|
935
|
+
if (!d)
|
|
936
|
+
return "";
|
|
937
|
+
const m = [];
|
|
938
|
+
return s.forEach((y) => {
|
|
939
|
+
var w;
|
|
940
|
+
const S = o.get(y.id), C = S.appearance && S.appearance.class;
|
|
941
|
+
if (C) {
|
|
942
|
+
const M = C.split(" ").filter((V) => !V.startsWith("col-")), b = "col-" + y.columnInSM, k = "col-md-" + y.columnInMD, T = "col-xl-" + y.columnInLG, h = "col-el-" + y.columnInEL, B = [b, k, T, h].concat(M);
|
|
943
|
+
S.appearance.class = B.join(" ");
|
|
944
|
+
}
|
|
945
|
+
if (y.fieldSetId) {
|
|
946
|
+
const N = f.contents.find((b) => b.id === y.fieldSetId), M = m.find((b) => b.id === y.fieldSetId);
|
|
947
|
+
M ? (w = M.contents) == null || w.push(S) : (m.push(N), N.contents = [S]);
|
|
948
|
+
} else
|
|
949
|
+
m.push(S);
|
|
950
|
+
}), f.contents = m, f.id;
|
|
951
|
+
}
|
|
952
|
+
return {
|
|
953
|
+
checkCanFindFormNode: p,
|
|
954
|
+
checkCanOpenLayoutEditor: l,
|
|
955
|
+
changeFormControlsByResponseLayoutConfig: a,
|
|
956
|
+
getResonseFormLayoutConfig: u
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
class Fe extends Ne {
|
|
863
960
|
constructor(t, o) {
|
|
864
961
|
super(t, o);
|
|
865
|
-
|
|
866
|
-
this.responseLayoutEditorFunction =
|
|
962
|
+
v(this, "responseLayoutEditorFunction");
|
|
963
|
+
this.responseLayoutEditorFunction = Te(this.formSchemaUtils);
|
|
867
964
|
}
|
|
868
965
|
getPropertyConfig(t, o) {
|
|
869
966
|
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;
|
|
@@ -872,7 +969,7 @@ class xe extends Me {
|
|
|
872
969
|
var p;
|
|
873
970
|
var r = this;
|
|
874
971
|
this.setDesignViewModelField(t);
|
|
875
|
-
const
|
|
972
|
+
const c = this.formSchemaUtils.getFormMetadataBasicInfo(), u = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
876
973
|
return {
|
|
877
974
|
description: "Basic Information",
|
|
878
975
|
title: "基本信息",
|
|
@@ -894,7 +991,7 @@ class xe extends Me {
|
|
|
894
991
|
textField: "value",
|
|
895
992
|
valueField: "key",
|
|
896
993
|
editable: !1,
|
|
897
|
-
data: r.designViewModelField ?
|
|
994
|
+
data: r.designViewModelField ? G.getEditorTypesByMDataType((p = r.designViewModelField.type) == null ? void 0 : p.name) : G.getAllInputTypes()
|
|
898
995
|
}
|
|
899
996
|
},
|
|
900
997
|
label: {
|
|
@@ -911,7 +1008,7 @@ class xe extends Me {
|
|
|
911
1008
|
bindingType: { enable: !1 },
|
|
912
1009
|
editorParams: {
|
|
913
1010
|
propertyData: t,
|
|
914
|
-
formBasicInfo:
|
|
1011
|
+
formBasicInfo: c
|
|
915
1012
|
},
|
|
916
1013
|
columns: [
|
|
917
1014
|
{ field: "name", title: "字段名称" },
|
|
@@ -923,15 +1020,15 @@ class xe extends Me {
|
|
|
923
1020
|
}
|
|
924
1021
|
}
|
|
925
1022
|
},
|
|
926
|
-
setPropertyRelates(
|
|
927
|
-
if (
|
|
928
|
-
switch (
|
|
1023
|
+
setPropertyRelates(l, a) {
|
|
1024
|
+
if (l)
|
|
1025
|
+
switch (l && l.propertyID) {
|
|
929
1026
|
case "type": {
|
|
930
|
-
r.changeControlType(t,
|
|
1027
|
+
r.changeControlType(t, l, o);
|
|
931
1028
|
break;
|
|
932
1029
|
}
|
|
933
1030
|
case "label": {
|
|
934
|
-
|
|
1031
|
+
l.needRefreshControlTree = !0;
|
|
935
1032
|
break;
|
|
936
1033
|
}
|
|
937
1034
|
}
|
|
@@ -969,14 +1066,14 @@ class xe extends Me {
|
|
|
969
1066
|
}
|
|
970
1067
|
}
|
|
971
1068
|
},
|
|
972
|
-
setPropertyRelates(
|
|
973
|
-
if (
|
|
974
|
-
switch (
|
|
1069
|
+
setPropertyRelates(c, u) {
|
|
1070
|
+
if (c)
|
|
1071
|
+
switch (c && c.propertyID) {
|
|
975
1072
|
case "responseLayout":
|
|
976
|
-
r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(
|
|
1073
|
+
r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(c.propertyValue, r.componentId || t.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(t.id, o), delete t.responseLayout;
|
|
977
1074
|
break;
|
|
978
1075
|
case "class":
|
|
979
|
-
r.updateUnifiedLayoutAfterControlChanged(
|
|
1076
|
+
r.updateUnifiedLayoutAfterControlChanged(c.propertyValue, t.id, this.componentId), r.updateElementByParentContainer(t.id, o);
|
|
980
1077
|
break;
|
|
981
1078
|
}
|
|
982
1079
|
}
|
|
@@ -991,38 +1088,38 @@ class xe extends Me {
|
|
|
991
1088
|
* @param newControlType 新控件类型
|
|
992
1089
|
*/
|
|
993
1090
|
changeControlType(t, o, r) {
|
|
994
|
-
var s,
|
|
995
|
-
const
|
|
1091
|
+
var s, i, d, f;
|
|
1092
|
+
const c = o.propertyValue, u = r && r.parent && r.parent.schema;
|
|
996
1093
|
if (!u)
|
|
997
1094
|
return;
|
|
998
|
-
const p = u.contents.findIndex((
|
|
999
|
-
let
|
|
1095
|
+
const p = u.contents.findIndex((m) => m.id === t.id), l = u.contents[p];
|
|
1096
|
+
let a;
|
|
1000
1097
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1001
1098
|
editor: {
|
|
1002
|
-
$type:
|
|
1099
|
+
$type: c
|
|
1003
1100
|
},
|
|
1004
1101
|
name: this.designViewModelField.name,
|
|
1005
1102
|
require: this.designViewModelField.require,
|
|
1006
1103
|
readonly: this.designViewModelField.readonly
|
|
1007
|
-
}, !1),
|
|
1008
|
-
id:
|
|
1009
|
-
appearance:
|
|
1010
|
-
size:
|
|
1011
|
-
label:
|
|
1012
|
-
binding:
|
|
1013
|
-
visible:
|
|
1014
|
-
}), Object.assign(
|
|
1015
|
-
isTextArea:
|
|
1016
|
-
placeholder: (s =
|
|
1017
|
-
holdPlace: (
|
|
1018
|
-
readonly: (d =
|
|
1019
|
-
require: (
|
|
1020
|
-
}), u.contents.splice(p, 1), u.contents.splice(p, 0,
|
|
1021
|
-
(
|
|
1022
|
-
),
|
|
1104
|
+
}, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, c)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(c)), Object.assign(a, {
|
|
1105
|
+
id: l.id,
|
|
1106
|
+
appearance: l.appearance,
|
|
1107
|
+
size: l.size,
|
|
1108
|
+
label: l.label,
|
|
1109
|
+
binding: l.binding,
|
|
1110
|
+
visible: l.visible
|
|
1111
|
+
}), Object.assign(a.editor, {
|
|
1112
|
+
isTextArea: a.isTextArea && l.isTextArea,
|
|
1113
|
+
placeholder: (s = l.editor) == null ? void 0 : s.placeholder,
|
|
1114
|
+
holdPlace: (i = l.editor) == null ? void 0 : i.holdPlace,
|
|
1115
|
+
readonly: (d = l.editor) == null ? void 0 : d.readonly,
|
|
1116
|
+
require: (f = l.editor) == null ? void 0 : f.require
|
|
1117
|
+
}), u.contents.splice(p, 1), u.contents.splice(p, 0, a), r.schema = Object.assign(l, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1118
|
+
(m) => m.classList.remove("dgComponentSelected")
|
|
1119
|
+
), Be.value++;
|
|
1023
1120
|
}
|
|
1024
1121
|
getComponentConfig(t, o = {}, r = {}) {
|
|
1025
|
-
const
|
|
1122
|
+
const c = Object.assign({
|
|
1026
1123
|
description: "编辑器",
|
|
1027
1124
|
title: "编辑器",
|
|
1028
1125
|
type: "input-group",
|
|
@@ -1049,7 +1146,7 @@ class xe extends Me {
|
|
|
1049
1146
|
type: "string"
|
|
1050
1147
|
}
|
|
1051
1148
|
}, r);
|
|
1052
|
-
return { ...
|
|
1149
|
+
return { ...c, properties: { ...u } };
|
|
1053
1150
|
}
|
|
1054
1151
|
/**
|
|
1055
1152
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -1058,15 +1155,15 @@ class xe extends Me {
|
|
|
1058
1155
|
* @param componentId 控件所在组件id
|
|
1059
1156
|
*/
|
|
1060
1157
|
updateUnifiedLayoutAfterControlChanged(t, o, r) {
|
|
1061
|
-
const
|
|
1062
|
-
let u =
|
|
1063
|
-
u = u || "col-12", p = p || "col-md-" + u.replace("col-", ""),
|
|
1158
|
+
const c = t.split(" ");
|
|
1159
|
+
let u = c.find((i) => /^col-([1-9]|10|11|12)$/.test(i)), p = c.find((i) => /^col-md-([1-9]|10|11|12)$/.test(i)), l = c.find((i) => /^col-xl-([1-9]|10|11|12)$/.test(i)), a = c.find((i) => /^col-el-([1-9]|10|11|12)$/.test(i));
|
|
1160
|
+
u = u || "col-12", p = p || "col-md-" + u.replace("col-", ""), l = l || "col-xl-" + p.replace("col-md-", ""), a = a || "col-el-" + l.replace("col-xl-", "");
|
|
1064
1161
|
const s = {
|
|
1065
1162
|
id: o,
|
|
1066
1163
|
columnInSM: parseInt(u.replace("col-", ""), 10),
|
|
1067
1164
|
columnInMD: parseInt(p.replace("col-md-", ""), 10),
|
|
1068
|
-
columnInLG: parseInt(
|
|
1069
|
-
columnInEL: parseInt(
|
|
1165
|
+
columnInLG: parseInt(l.replace("col-xl-", ""), 10),
|
|
1166
|
+
columnInEL: parseInt(a.replace("col-el-", ""), 10)
|
|
1070
1167
|
};
|
|
1071
1168
|
this.updateUnifiedLayoutAfterResponseLayoutChanged(r, s);
|
|
1072
1169
|
}
|
|
@@ -1079,17 +1176,17 @@ class xe extends Me {
|
|
|
1079
1176
|
const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(t);
|
|
1080
1177
|
if (!r || !r.unifiedLayout)
|
|
1081
1178
|
return;
|
|
1082
|
-
const
|
|
1083
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r,
|
|
1084
|
-
const
|
|
1085
|
-
Object.assign(
|
|
1179
|
+
const c = [];
|
|
1180
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, c, 1), o) {
|
|
1181
|
+
const m = c.find((y) => y.id === o.id);
|
|
1182
|
+
Object.assign(m || {}, o);
|
|
1086
1183
|
}
|
|
1087
|
-
const u =
|
|
1184
|
+
const u = c.map((m) => m.columnInSM), p = c.map((m) => m.columnInMD), l = c.map((m) => m.columnInLG), a = c.map((m) => m.columnInEL), s = this.checkIsUniqueColumn(u) ? u[0] : null, i = this.checkIsUniqueColumn(p) ? p[0] : null, d = this.checkIsUniqueColumn(l) ? l[0] : null, f = this.checkIsUniqueColumn(a) ? a[0] : null;
|
|
1088
1185
|
Object.assign(r.unifiedLayout, {
|
|
1089
1186
|
uniqueColClassInSM: s,
|
|
1090
|
-
uniqueColClassInMD:
|
|
1187
|
+
uniqueColClassInMD: i,
|
|
1091
1188
|
uniqueColClassInLG: d,
|
|
1092
|
-
uniqueColClassInEL:
|
|
1189
|
+
uniqueColClassInEL: f
|
|
1093
1190
|
});
|
|
1094
1191
|
}
|
|
1095
1192
|
/**
|
|
@@ -1100,7 +1197,7 @@ class xe extends Me {
|
|
|
1100
1197
|
return Array.from(o).length === 1;
|
|
1101
1198
|
}
|
|
1102
1199
|
}
|
|
1103
|
-
class
|
|
1200
|
+
class Ee extends Fe {
|
|
1104
1201
|
constructor(n, t) {
|
|
1105
1202
|
super(n, t);
|
|
1106
1203
|
}
|
|
@@ -1114,90 +1211,90 @@ class Fe extends xe {
|
|
|
1114
1211
|
});
|
|
1115
1212
|
}
|
|
1116
1213
|
}
|
|
1117
|
-
function
|
|
1214
|
+
function De(e, n) {
|
|
1118
1215
|
const {
|
|
1119
1216
|
canAccepts: t,
|
|
1120
1217
|
checkCanDeleteComponent: o,
|
|
1121
1218
|
checkCanMoveComponent: r,
|
|
1122
|
-
hideNestedPaddingInDesginerView:
|
|
1219
|
+
hideNestedPaddingInDesginerView: c,
|
|
1123
1220
|
onAcceptMovedChildElement: u,
|
|
1124
1221
|
resolveComponentContext: p,
|
|
1125
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1126
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1127
|
-
} =
|
|
1128
|
-
function
|
|
1129
|
-
return new
|
|
1222
|
+
triggerBelongedComponentToMoveWhenMoved: l,
|
|
1223
|
+
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
1224
|
+
} = ke(e), s = e.schema;
|
|
1225
|
+
function i(d, f) {
|
|
1226
|
+
return new Ee(d, n).getPropertyConfig(s, f);
|
|
1130
1227
|
}
|
|
1131
1228
|
return {
|
|
1132
1229
|
canAccepts: t,
|
|
1133
1230
|
checkCanDeleteComponent: o,
|
|
1134
1231
|
checkCanMoveComponent: r,
|
|
1135
|
-
hideNestedPaddingInDesginerView:
|
|
1232
|
+
hideNestedPaddingInDesginerView: c,
|
|
1136
1233
|
onAcceptMovedChildElement: u,
|
|
1137
1234
|
resolveComponentContext: p,
|
|
1138
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1139
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1140
|
-
getPropsConfig:
|
|
1235
|
+
triggerBelongedComponentToMoveWhenMoved: l,
|
|
1236
|
+
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
1237
|
+
getPropsConfig: i
|
|
1141
1238
|
};
|
|
1142
1239
|
}
|
|
1143
|
-
const Pe = /* @__PURE__ */
|
|
1240
|
+
const Pe = /* @__PURE__ */ J({
|
|
1144
1241
|
name: "FNumberRangeDesign",
|
|
1145
1242
|
props: z,
|
|
1146
1243
|
emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
|
|
1147
1244
|
setup(e, n) {
|
|
1148
|
-
const t =
|
|
1149
|
-
n.emit("beginValueChange",
|
|
1150
|
-
},
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
}), n.expose(
|
|
1154
|
-
const
|
|
1155
|
-
n.emit("endValueChange",
|
|
1156
|
-
},
|
|
1157
|
-
getRealValue:
|
|
1245
|
+
const t = F(e.beginValue), o = F(""), r = F(e.endValue), c = F(""), u = te(e), p = ne(e, n, u), l = (V) => {
|
|
1246
|
+
n.emit("beginValueChange", V);
|
|
1247
|
+
}, a = F(), s = Z("designer-host-service"), i = Z("design-item-context"), d = De(i, s), f = Me(a, i, d);
|
|
1248
|
+
$(() => {
|
|
1249
|
+
a.value.componentInstance = f;
|
|
1250
|
+
}), n.expose(f.value);
|
|
1251
|
+
const m = L(e, n, o, t, p, u, l, t, r, !0), y = O(e, n, o, t, p, u, m, l, t, r, !0), S = U(e, n, m), C = j(e, n, y, !0), w = (V) => {
|
|
1252
|
+
n.emit("endValueChange", V);
|
|
1253
|
+
}, N = L(e, n, c, r, p, u, w, t, r, !1), M = O(e, n, c, r, p, u, N, w, t, r, !1), b = U(e, n, N), k = j(e, n, M, !1), {
|
|
1254
|
+
getRealValue: T
|
|
1158
1255
|
} = u, {
|
|
1159
|
-
format:
|
|
1160
|
-
} = p,
|
|
1161
|
-
return
|
|
1162
|
-
const
|
|
1163
|
-
o.value =
|
|
1164
|
-
}),
|
|
1165
|
-
const
|
|
1166
|
-
o.value =
|
|
1167
|
-
}),
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1170
|
-
}),
|
|
1171
|
-
o.value =
|
|
1172
|
-
}), () =>
|
|
1173
|
-
ref:
|
|
1256
|
+
format: h
|
|
1257
|
+
} = p, B = P(() => !e.disabled && !e.readonly && e.showButton);
|
|
1258
|
+
return $(() => {
|
|
1259
|
+
const V = T(e.beginValue), I = T(e.endValue);
|
|
1260
|
+
o.value = h(V), c.value = h(I);
|
|
1261
|
+
}), A(() => [e.beginValue], ([V]) => {
|
|
1262
|
+
const I = T(V);
|
|
1263
|
+
o.value = h(I);
|
|
1264
|
+
}), A(() => [e.endValue], ([V]) => {
|
|
1265
|
+
const I = T(V);
|
|
1266
|
+
c.value = h(I);
|
|
1267
|
+
}), A(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
1268
|
+
o.value = h(t.value), c.value = h(r.value);
|
|
1269
|
+
}), () => D("div", {
|
|
1270
|
+
ref: a,
|
|
1174
1271
|
class: "input-group number-range f-cmp-number-spinner"
|
|
1175
|
-
}, [
|
|
1272
|
+
}, [D("div", {
|
|
1176
1273
|
class: "form-control input-container"
|
|
1177
|
-
}, [
|
|
1274
|
+
}, [D("div", {
|
|
1178
1275
|
class: "sub-input-group"
|
|
1179
|
-
}, [
|
|
1276
|
+
}, [C(), B.value && S()]), D("span", {
|
|
1180
1277
|
class: "spliter"
|
|
1181
|
-
}, [Q("~")]),
|
|
1278
|
+
}, [Q("~")]), D("div", {
|
|
1182
1279
|
class: "sub-input-group"
|
|
1183
|
-
}, [
|
|
1280
|
+
}, [k(), B.value && b()])])]);
|
|
1184
1281
|
}
|
|
1185
|
-
}),
|
|
1282
|
+
}), Ie = (e) => {
|
|
1186
1283
|
const n = e;
|
|
1187
1284
|
return n.install = function(t) {
|
|
1188
1285
|
t.component(n.name, e);
|
|
1189
1286
|
}, e;
|
|
1190
1287
|
};
|
|
1191
|
-
|
|
1192
|
-
e["number-range"] =
|
|
1288
|
+
W.register = (e, n, t, o) => {
|
|
1289
|
+
e["number-range"] = W, n["number-range"] = ee;
|
|
1193
1290
|
};
|
|
1194
|
-
|
|
1291
|
+
W.registerDesigner = (e, n, t) => {
|
|
1195
1292
|
e["number-range"] = Pe, n["number-range"] = ee;
|
|
1196
1293
|
};
|
|
1197
|
-
const
|
|
1294
|
+
const Ue = Ie(W);
|
|
1198
1295
|
export {
|
|
1199
|
-
|
|
1200
|
-
|
|
1296
|
+
W as FNumberRange,
|
|
1297
|
+
Ue as default,
|
|
1201
1298
|
z as numberRangeProps,
|
|
1202
1299
|
ee as propsResolver
|
|
1203
1300
|
};
|