@farris/ui-vue 1.2.8 → 1.2.9
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 +129 -129
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +166 -157
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.esm.js +343 -325
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +338 -338
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +182 -182
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +326 -317
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +118 -118
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.esm.js +338 -325
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +62 -62
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +382 -270
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.esm.js +1018 -895
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +285 -212
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +4761 -4319
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.esm.js +2901 -2664
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.esm.js +1502 -1488
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +27 -27
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +241 -241
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.esm.js +1074 -885
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +99 -94
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +577 -522
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +70 -70
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +2938 -2619
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +4766 -4325
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1231 -1215
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +373 -373
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +398 -394
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +268 -268
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +234 -161
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2288 -2048
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +5776 -5305
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5496 -5036
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +383 -322
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +273 -269
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +292 -283
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1008 -925
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +98 -98
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +949 -847
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +464 -403
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +226 -226
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.esm.js +1110 -1092
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +520 -513
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +1714 -1575
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +67 -67
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +298 -289
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +195 -190
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +112 -112
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.esm.js +902 -877
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +874 -778
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4594 -4289
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +126 -126
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +645 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +120 -120
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +421 -348
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +219 -219
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +232 -222
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.esm.js +1823 -1744
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +399 -401
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +164 -164
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +220 -215
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.esm.js +693 -666
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +422 -413
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +4799 -4358
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.esm.js +2448 -2215
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +164 -164
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +143 -143
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +410 -331
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +901 -901
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +12305 -11403
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +18 -6
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ne = Object.defineProperty;
|
|
2
2
|
var oe = (e, t, n) => t in e ? ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var F = (e, t, n) => oe(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { computed as P, ref as k, createVNode as M, defineComponent as Q, onMounted as G, watch as j, createTextVNode as X, inject as
|
|
4
|
+
import { computed as P, ref as k, createVNode as M, defineComponent as Q, onMounted as G, watch as j, createTextVNode as X, inject as H } from "vue";
|
|
5
5
|
import { cloneDeep as re } from "lodash-es";
|
|
6
6
|
import T from "bignumber.js";
|
|
7
7
|
import { getSchemaByType as J } from "../dynamic-resolver/index.esm.js";
|
|
@@ -10,15 +10,15 @@ function ae(e, t, n) {
|
|
|
10
10
|
}
|
|
11
11
|
const Y = {}, _ = {};
|
|
12
12
|
function Z(e) {
|
|
13
|
-
const { properties: t, title: n } = e, o = Object.keys(t).reduce((
|
|
14
|
-
return o.id = `${n}-${Date.now()}
|
|
13
|
+
const { properties: t, title: n, ignore: o } = e, a = o && Array.isArray(o), p = Object.keys(t).reduce((s, i) => ((!a || !o.find((l) => l == i)) && (s[i] = t[i].type === "object" && t[i].properties ? Z(t[i]) : re(t[i].default)), s), {});
|
|
14
|
+
return (!a || !o.find((s) => s == "id")) && (p.id = `${n}-${Date.now()}`), p;
|
|
15
15
|
}
|
|
16
|
-
function z(e, t = {}) {
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
19
|
-
let
|
|
20
|
-
const
|
|
21
|
-
return
|
|
16
|
+
function z(e, t = {}, n) {
|
|
17
|
+
const o = Y[e];
|
|
18
|
+
if (o) {
|
|
19
|
+
let a = Z(o);
|
|
20
|
+
const p = _[e];
|
|
21
|
+
return a = p ? p({ getSchemaByType: z }, a, t, n) : a, a;
|
|
22
22
|
}
|
|
23
23
|
return null;
|
|
24
24
|
}
|
|
@@ -29,12 +29,12 @@ function ie(e, t) {
|
|
|
29
29
|
function le(e, t) {
|
|
30
30
|
return Object.keys(e).filter((o) => e[o] != null).reduce((o, a) => {
|
|
31
31
|
if (t.has(a)) {
|
|
32
|
-
const
|
|
33
|
-
if (typeof
|
|
34
|
-
o[
|
|
32
|
+
const p = t.get(a);
|
|
33
|
+
if (typeof p == "string")
|
|
34
|
+
o[p] = e[a];
|
|
35
35
|
else {
|
|
36
|
-
const
|
|
37
|
-
Object.assign(o,
|
|
36
|
+
const s = p(a, e[a], e);
|
|
37
|
+
Object.assign(o, s);
|
|
38
38
|
}
|
|
39
39
|
} else
|
|
40
40
|
o[a] = e[a];
|
|
@@ -46,58 +46,58 @@ function ue(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
46
46
|
return le(o, n);
|
|
47
47
|
}
|
|
48
48
|
function ce(e = {}) {
|
|
49
|
-
function t(r,
|
|
50
|
-
if (typeof
|
|
51
|
-
return
|
|
52
|
-
if (typeof
|
|
53
|
-
const f = Object.keys(
|
|
49
|
+
function t(r, u, c, d) {
|
|
50
|
+
if (typeof c == "number")
|
|
51
|
+
return d[r].length === c;
|
|
52
|
+
if (typeof c == "object") {
|
|
53
|
+
const f = Object.keys(c)[0], b = c[f];
|
|
54
54
|
if (f === "not")
|
|
55
|
-
return Number(
|
|
55
|
+
return Number(d[r].length) !== Number(b);
|
|
56
56
|
if (f === "moreThan")
|
|
57
|
-
return Number(
|
|
57
|
+
return Number(d[r].length) >= Number(b);
|
|
58
58
|
if (f === "lessThan")
|
|
59
|
-
return Number(
|
|
59
|
+
return Number(d[r].length) <= Number(b);
|
|
60
60
|
}
|
|
61
61
|
return !1;
|
|
62
62
|
}
|
|
63
|
-
function n(r,
|
|
64
|
-
return
|
|
63
|
+
function n(r, u, c, d) {
|
|
64
|
+
return d[r] && d[r].propertyValue && String(d[r].propertyValue.value) === String(c);
|
|
65
65
|
}
|
|
66
66
|
const o = /* @__PURE__ */ new Map([
|
|
67
67
|
["length", t],
|
|
68
68
|
["getProperty", n]
|
|
69
69
|
]);
|
|
70
|
-
Object.keys(e).reduce((r,
|
|
71
|
-
function a(r,
|
|
72
|
-
const
|
|
73
|
-
return typeof
|
|
74
|
-
if (
|
|
75
|
-
return { target:
|
|
76
|
-
const f =
|
|
77
|
-
return { target:
|
|
70
|
+
Object.keys(e).reduce((r, u) => (r.set(u, e[u]), r), o);
|
|
71
|
+
function a(r, u) {
|
|
72
|
+
const c = r;
|
|
73
|
+
return typeof u == "number" ? [{ target: c, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: c, operator: "getProperty", param: r, value: !!u }] : typeof u == "object" ? Object.keys(u).map((d) => {
|
|
74
|
+
if (d === "length")
|
|
75
|
+
return { target: c, operator: "length", param: null, value: u[d] };
|
|
76
|
+
const f = d, b = u[d];
|
|
77
|
+
return { target: c, operator: "getProperty", param: f, value: b };
|
|
78
78
|
}) : [];
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
return Object.keys(r).reduce((
|
|
82
|
-
const f = a(
|
|
83
|
-
return
|
|
80
|
+
function p(r) {
|
|
81
|
+
return Object.keys(r).reduce((c, d) => {
|
|
82
|
+
const f = a(d, r[d]);
|
|
83
|
+
return c.push(...f), c;
|
|
84
84
|
}, []);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function s(r, u) {
|
|
87
87
|
if (o.has(r.operator)) {
|
|
88
|
-
const
|
|
89
|
-
return
|
|
88
|
+
const c = o.get(r.operator);
|
|
89
|
+
return c && c(r.target, r.param, r.value, u) || !1;
|
|
90
90
|
}
|
|
91
91
|
return !1;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return
|
|
93
|
+
function i(r, u) {
|
|
94
|
+
return p(r).reduce((f, b) => f && s(b, u), !0);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
return
|
|
96
|
+
function l(r, u) {
|
|
97
|
+
const c = Object.keys(r), d = c.includes("allOf"), f = c.includes("anyOf"), b = d || f, D = (b ? r[b ? d ? "allOf" : "anyOf" : "allOf"] : [r]).map((C) => i(C, u));
|
|
98
|
+
return d ? !D.includes(!1) : D.includes(!0);
|
|
99
99
|
}
|
|
100
|
-
return { parseValueSchema:
|
|
100
|
+
return { parseValueSchema: l };
|
|
101
101
|
}
|
|
102
102
|
const m = {
|
|
103
103
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
@@ -139,10 +139,10 @@ const m = {
|
|
|
139
139
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
140
140
|
}, se = {}, pe = {};
|
|
141
141
|
ce();
|
|
142
|
-
function de(e, t, n = /* @__PURE__ */ new Map(), o = (
|
|
143
|
-
return Y[t.title] = t, _[t.title] = o, se[t.title] = a, pe[t.title] =
|
|
144
|
-
const
|
|
145
|
-
return Object.assign(
|
|
142
|
+
function de(e, t, n = /* @__PURE__ */ new Map(), o = (s, i, l) => i, a = {}, p = (s) => s) {
|
|
143
|
+
return Y[t.title] = t, _[t.title] = o, se[t.title] = a, pe[t.title] = p, (s = {}) => {
|
|
144
|
+
const i = ue(s, t, n), l = Object.keys(e).reduce((r, u) => (r[u] = e[u].default, r), {});
|
|
145
|
+
return Object.assign(l, i);
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
148
|
function me(e, t) {
|
|
@@ -223,7 +223,7 @@ const fe = /* @__PURE__ */ new Map([
|
|
|
223
223
|
type: ve,
|
|
224
224
|
properties: we,
|
|
225
225
|
required: Ce
|
|
226
|
-
},
|
|
226
|
+
}, R = {
|
|
227
227
|
/**
|
|
228
228
|
* 组件标识
|
|
229
229
|
*/
|
|
@@ -335,42 +335,42 @@ const fe = /* @__PURE__ */ new Map([
|
|
|
335
335
|
* 是否使用千分值
|
|
336
336
|
*/
|
|
337
337
|
useThousands: { type: Boolean, default: !0 }
|
|
338
|
-
}, I = de(
|
|
338
|
+
}, I = de(R, Be, fe, ae);
|
|
339
339
|
function K(e, t) {
|
|
340
340
|
const n = P(() => Number(e.precision) || 0);
|
|
341
|
-
function o(
|
|
342
|
-
return
|
|
341
|
+
function o(l) {
|
|
342
|
+
return l.toFixed(n.value);
|
|
343
343
|
}
|
|
344
|
-
function a(
|
|
345
|
-
return isNaN(
|
|
344
|
+
function a(l) {
|
|
345
|
+
return isNaN(l) || l === null || l === void 0 || l === "";
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
const r = a(e.max) ? null : new T(String(e.max), 10),
|
|
349
|
-
return r &&
|
|
347
|
+
function p(l) {
|
|
348
|
+
const r = a(e.max) ? null : new T(String(e.max), 10), u = a(e.min) ? null : new T(String(e.min), 10);
|
|
349
|
+
return r && l.gt(r) ? r : u && l.lt(u) ? u : l;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
352
|
-
const
|
|
351
|
+
function s(l, r, u, c) {
|
|
352
|
+
const d = new T(l, 10), f = a(u && u.value) ? null : new T(String(u.value), 10), b = a(r && r.value) ? null : new T(String(r.value), 10);
|
|
353
353
|
let V;
|
|
354
|
-
return
|
|
354
|
+
return c ? V = f && d.gt(f) ? f : d : V = b && d.lt(b) ? b : d, V.toString();
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function i(l) {
|
|
357
357
|
if (e.parser)
|
|
358
|
-
return isNaN(Number(
|
|
359
|
-
let r =
|
|
358
|
+
return isNaN(Number(l)) ? e.parser(l) : l;
|
|
359
|
+
let r = p(new T(l, 10));
|
|
360
360
|
if (r.isNaN()) {
|
|
361
361
|
if (e.canNull)
|
|
362
362
|
return null;
|
|
363
|
-
const
|
|
364
|
-
if (!
|
|
365
|
-
r =
|
|
366
|
-
else if (!
|
|
367
|
-
r =
|
|
363
|
+
const c = new T("" + e.min, 10), d = new T("" + e.max, 10);
|
|
364
|
+
if (!c.isNaN())
|
|
365
|
+
r = c;
|
|
366
|
+
else if (!d.isNaN())
|
|
367
|
+
r = d;
|
|
368
368
|
else
|
|
369
369
|
return 0;
|
|
370
370
|
}
|
|
371
371
|
return o(r);
|
|
372
372
|
}
|
|
373
|
-
return { getRealValue:
|
|
373
|
+
return { getRealValue: i, isEmpty: a, precision: n, getValidNumberObject: p, getValidNumberInRange: s };
|
|
374
374
|
}
|
|
375
375
|
function ee(e, t, n) {
|
|
376
376
|
const o = P(() => ({
|
|
@@ -379,21 +379,21 @@ function ee(e, t, n) {
|
|
|
379
379
|
decimalSeparator: e.decimalSeparator,
|
|
380
380
|
groupSeparator: e.useThousands ? e.groupSeparator : "",
|
|
381
381
|
groupSize: e.groupSize
|
|
382
|
-
})), { getValidNumberObject: a, precision:
|
|
383
|
-
function
|
|
382
|
+
})), { getValidNumberObject: a, precision: p } = n;
|
|
383
|
+
function s(r) {
|
|
384
384
|
return r = r == null || r === "" ? "" : String(r), r = r.replace(new RegExp(e.prefix, "g"), "").replace(new RegExp(e.suffix, "g"), "").replace(/,/g, ""), e.groupSeparator && e.groupSeparator !== "," && (r = r.replace(new RegExp(`\\${e.groupSeparator}`, "g"), "")), e.decimalSeparator && e.decimalSeparator !== "." && (r = r.replace(new RegExp(`\\${e.decimalSeparator}`, "g"), ".")), r;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
387
|
-
return e.precision !== null && e.precision !== void 0 ? r.toFormat(
|
|
386
|
+
function i(r, u) {
|
|
387
|
+
return e.precision !== null && e.precision !== void 0 ? r.toFormat(p.value, u) : r.toFormat(u);
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
const
|
|
391
|
-
return
|
|
389
|
+
function l(r) {
|
|
390
|
+
const u = s(r), c = new T(u, 10), d = a(c);
|
|
391
|
+
return d.valueOf() === "0" && !e.showZero || d.isNaN() ? "" : e.formatter ? e.formatter(d.toNumber()) : i(d, o.value);
|
|
392
392
|
}
|
|
393
|
-
return { cleanFormat:
|
|
393
|
+
return { cleanFormat: s, format: l };
|
|
394
394
|
}
|
|
395
|
-
function A(e, t, n, o, a,
|
|
396
|
-
const { format:
|
|
395
|
+
function A(e, t, n, o, a, p, s, i, l, r) {
|
|
396
|
+
const { format: u } = a, { getRealValue: c, getValidNumberInRange: d } = p;
|
|
397
397
|
function f() {
|
|
398
398
|
const B = new T(o.value || 0);
|
|
399
399
|
return !(e.max && !new T(e.max).isNaN() && B.gte(new T(e.max)));
|
|
@@ -405,10 +405,10 @@ function A(e, t, n, o, a, c, d, s, i, r) {
|
|
|
405
405
|
function V(B) {
|
|
406
406
|
if (e.readonly || e.disabled)
|
|
407
407
|
return;
|
|
408
|
-
const S = B === "up" ? f : b,
|
|
408
|
+
const S = B === "up" ? f : b, g = B === "up" ? "plus" : "minus";
|
|
409
409
|
if (S()) {
|
|
410
|
-
let
|
|
411
|
-
|
|
410
|
+
let h = new T(o.value || 0)[g](Number(e.step)).toFixed();
|
|
411
|
+
h = d(h, i, l, r), n.value = u(h), o.value = c(h), s(o.value);
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
function E() {
|
|
@@ -425,143 +425,143 @@ function A(e, t, n, o, a, c, d, s, i, r) {
|
|
|
425
425
|
}
|
|
426
426
|
return { canDownward: b, canUpward: f, downward: D, onClickDownButton: C, onClickUpButton: x, upward: E };
|
|
427
427
|
}
|
|
428
|
-
function U(e, t, n, o, a,
|
|
429
|
-
const { cleanFormat:
|
|
430
|
-
function B(
|
|
428
|
+
function U(e, t, n, o, a, p, s, i, l, r, u) {
|
|
429
|
+
const { cleanFormat: c, format: d } = a, { getRealValue: f, isEmpty: b, getValidNumberInRange: V } = p, { downward: E, upward: D } = s, x = P(() => n.value), C = k(!1);
|
|
430
|
+
function B(y) {
|
|
431
431
|
var N;
|
|
432
|
-
if (
|
|
432
|
+
if (y.stopPropagation(), e.readonly || e.disabled)
|
|
433
433
|
return;
|
|
434
434
|
C.value = !1;
|
|
435
|
-
let
|
|
436
|
-
e.canNull || (
|
|
437
|
-
let
|
|
438
|
-
|
|
435
|
+
let h = (N = y.target) == null ? void 0 : N.value;
|
|
436
|
+
e.canNull || (h = h || 0);
|
|
437
|
+
let v = c(h);
|
|
438
|
+
v = V(v, l, r, u), n.value = d(v), o.value = f(v), i(o.value), t.emit("blur", { event: y, formatted: n.value, value: o.value });
|
|
439
439
|
}
|
|
440
|
-
function S(
|
|
441
|
-
|
|
440
|
+
function S(y) {
|
|
441
|
+
y.stopPropagation(), !(e.readonly || e.disabled) && (C.value = !0, n.value = b(o.value) || !e.showZero && o.value === "0" ? "" : String(o.value), t.emit("focus", { event: y, formatted: n.value, value: o.value }));
|
|
442
442
|
}
|
|
443
|
-
function y
|
|
443
|
+
function g(y) {
|
|
444
444
|
var N;
|
|
445
|
-
|
|
446
|
-
let
|
|
447
|
-
e.canNull || (
|
|
448
|
-
const
|
|
449
|
-
n.value =
|
|
445
|
+
y.stopPropagation();
|
|
446
|
+
let h = (N = y.target) == null ? void 0 : N.value;
|
|
447
|
+
e.canNull || (h = h || 0);
|
|
448
|
+
const v = c(h);
|
|
449
|
+
n.value = v, o.value = f(v), i(o.value);
|
|
450
450
|
}
|
|
451
|
-
function
|
|
452
|
-
|
|
451
|
+
function w(y) {
|
|
452
|
+
y.key === "ArrowDown" && (y.preventDefault(), E()), y.key === "ArrowUp" && (y.preventDefault(), D()), y.stopPropagation();
|
|
453
453
|
}
|
|
454
|
-
return { textBoxValue: x, onBlurTextBox: B, onFocusTextBox: S, onInput:
|
|
454
|
+
return { textBoxValue: x, onBlurTextBox: B, onFocusTextBox: S, onInput: g, onKeyDown: w, isTextBoxFocused: C };
|
|
455
455
|
}
|
|
456
456
|
function $(e, t, n, o) {
|
|
457
457
|
const {
|
|
458
458
|
onBlurTextBox: a,
|
|
459
|
-
onFocusTextBox:
|
|
460
|
-
onInput:
|
|
461
|
-
onKeyDown:
|
|
462
|
-
textBoxValue:
|
|
463
|
-
} = n, r = P(() => e.disabled || e.readonly || !e.editable ? "" : o ? e.beginPlaceHolder : e.endPlaceHolder),
|
|
459
|
+
onFocusTextBox: p,
|
|
460
|
+
onInput: s,
|
|
461
|
+
onKeyDown: i,
|
|
462
|
+
textBoxValue: l
|
|
463
|
+
} = n, r = P(() => e.disabled || e.readonly || !e.editable ? "" : o ? e.beginPlaceHolder : e.endPlaceHolder), u = P(() => ({
|
|
464
464
|
"form-control": !0,
|
|
465
465
|
"sub-input": !0
|
|
466
|
-
})),
|
|
466
|
+
})), c = P(() => ({
|
|
467
467
|
"text-align": e.textAlign
|
|
468
468
|
}));
|
|
469
|
-
function
|
|
469
|
+
function d(f) {
|
|
470
470
|
f.stopPropagation();
|
|
471
471
|
}
|
|
472
472
|
return () => M("input", {
|
|
473
|
-
class:
|
|
474
|
-
style:
|
|
473
|
+
class: u.value,
|
|
474
|
+
style: c.value,
|
|
475
475
|
type: "text",
|
|
476
|
-
value:
|
|
476
|
+
value: l.value,
|
|
477
477
|
disabled: e.disabled,
|
|
478
478
|
readonly: e.readonly || !e.editable,
|
|
479
479
|
placeholder: r.value,
|
|
480
480
|
onBlur: a,
|
|
481
|
-
onChange:
|
|
482
|
-
onFocus:
|
|
483
|
-
onInput:
|
|
484
|
-
onKeydown:
|
|
481
|
+
onChange: d,
|
|
482
|
+
onFocus: p,
|
|
483
|
+
onInput: s,
|
|
484
|
+
onKeydown: i
|
|
485
485
|
}, null);
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function L(e, t, n) {
|
|
488
488
|
const {
|
|
489
489
|
canDownward: o,
|
|
490
490
|
canUpward: a,
|
|
491
|
-
onClickDownButton:
|
|
492
|
-
onClickUpButton:
|
|
493
|
-
} = n,
|
|
491
|
+
onClickDownButton: p,
|
|
492
|
+
onClickUpButton: s
|
|
493
|
+
} = n, i = P(() => ({
|
|
494
494
|
"input-group-append": !0,
|
|
495
495
|
"btn-group": !0,
|
|
496
496
|
"btn-group-number": !0,
|
|
497
497
|
"sub-btn-group": !0
|
|
498
|
-
})),
|
|
498
|
+
})), l = P(() => ({
|
|
499
499
|
btn: !0,
|
|
500
500
|
"btn-secondary": !0,
|
|
501
501
|
"btn-number-flag": !0
|
|
502
502
|
})), r = P(() => ({
|
|
503
503
|
cursor: a() ? "pointer" : "not-allowed",
|
|
504
504
|
"margin-left": 0
|
|
505
|
-
})),
|
|
505
|
+
})), u = P(() => ({
|
|
506
506
|
cursor: o() ? "pointer" : "not-allowed",
|
|
507
507
|
"margin-left": 0
|
|
508
508
|
}));
|
|
509
509
|
return () => M("div", {
|
|
510
|
-
class:
|
|
510
|
+
class: i.value
|
|
511
511
|
}, [M("button", {
|
|
512
512
|
title: "upButton",
|
|
513
|
-
class:
|
|
513
|
+
class: l.value,
|
|
514
514
|
style: r.value,
|
|
515
|
-
onClick:
|
|
515
|
+
onClick: s,
|
|
516
516
|
disabled: !a()
|
|
517
517
|
}, [M("span", {
|
|
518
518
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
519
519
|
}, null)]), M("button", {
|
|
520
520
|
title: "downButton",
|
|
521
|
-
class:
|
|
522
|
-
style:
|
|
523
|
-
onClick:
|
|
521
|
+
class: l.value,
|
|
522
|
+
style: u.value,
|
|
523
|
+
onClick: p,
|
|
524
524
|
disabled: !o()
|
|
525
525
|
}, [M("span", {
|
|
526
526
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
527
527
|
}, null)])]);
|
|
528
528
|
}
|
|
529
|
-
const
|
|
529
|
+
const q = /* @__PURE__ */ Q({
|
|
530
530
|
name: "FNumberRange",
|
|
531
|
-
props:
|
|
531
|
+
props: R,
|
|
532
532
|
emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
|
|
533
533
|
setup(e, t) {
|
|
534
|
-
const n = k(e.beginValue), o = k(""), a = k(e.endValue),
|
|
534
|
+
const n = k(e.beginValue), o = k(""), a = k(e.endValue), p = k(""), s = K(e), i = ee(e, t, s), l = (S) => {
|
|
535
535
|
t.emit("beginValueChange", S);
|
|
536
|
-
}, r = A(e, t, o, n,
|
|
536
|
+
}, r = A(e, t, o, n, i, s, l, n, a, !0), u = U(e, t, o, n, i, s, r, l, n, a, !0), c = L(e, t, r), d = $(e, t, u, !0), f = (S) => {
|
|
537
537
|
t.emit("endValueChange", S);
|
|
538
|
-
}, b = A(e, t,
|
|
538
|
+
}, b = A(e, t, p, a, i, s, f, n, a, !1), V = U(e, t, p, a, i, s, b, f, n, a, !1), E = L(e, t, b), D = $(e, t, V, !1), {
|
|
539
539
|
getRealValue: x
|
|
540
|
-
} =
|
|
540
|
+
} = s, {
|
|
541
541
|
format: C
|
|
542
|
-
} =
|
|
542
|
+
} = i, B = P(() => !e.disabled && !e.readonly && e.showButton);
|
|
543
543
|
return G(() => {
|
|
544
|
-
const S = x(e.beginValue),
|
|
545
|
-
o.value = C(S),
|
|
544
|
+
const S = x(e.beginValue), g = x(e.endValue);
|
|
545
|
+
o.value = C(S), p.value = C(g);
|
|
546
546
|
}), j(() => [e.beginValue], ([S]) => {
|
|
547
|
-
if (!
|
|
548
|
-
const
|
|
549
|
-
o.value = C(
|
|
547
|
+
if (!u.isTextBoxFocused.value) {
|
|
548
|
+
const g = x(S);
|
|
549
|
+
o.value = C(g);
|
|
550
550
|
}
|
|
551
551
|
}), j(() => [e.endValue], ([S]) => {
|
|
552
552
|
if (!V.isTextBoxFocused.value) {
|
|
553
|
-
const
|
|
554
|
-
|
|
553
|
+
const g = x(S);
|
|
554
|
+
p.value = C(g);
|
|
555
555
|
}
|
|
556
556
|
}), j(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
557
|
-
o.value = C(n.value),
|
|
557
|
+
o.value = C(n.value), p.value = C(a.value);
|
|
558
558
|
}), () => M("div", {
|
|
559
559
|
class: "input-group number-range f-cmp-number-spinner"
|
|
560
560
|
}, [M("div", {
|
|
561
561
|
class: "form-control input-container"
|
|
562
562
|
}, [M("div", {
|
|
563
563
|
class: "sub-input-group"
|
|
564
|
-
}, [
|
|
564
|
+
}, [d(), B.value && c()]), M("span", {
|
|
565
565
|
class: "spliter"
|
|
566
566
|
}, [X("~")]), M("div", {
|
|
567
567
|
class: "sub-input-group"
|
|
@@ -574,77 +574,77 @@ function Ne(e, t, n) {
|
|
|
574
574
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
575
575
|
}
|
|
576
576
|
o();
|
|
577
|
-
const a = n && n.getStyles && n.getStyles() || "",
|
|
578
|
-
function
|
|
577
|
+
const a = n && n.getStyles && n.getStyles() || "", p = n && n.getDesignerClass && n.getDesignerClass() || "", s = k();
|
|
578
|
+
function i() {
|
|
579
579
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function l() {
|
|
582
582
|
return !1;
|
|
583
583
|
}
|
|
584
584
|
function r() {
|
|
585
585
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function u() {
|
|
588
588
|
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
589
589
|
}
|
|
590
|
-
function
|
|
591
|
-
if (!
|
|
590
|
+
function c(g) {
|
|
591
|
+
if (!g || !g.value)
|
|
592
592
|
return null;
|
|
593
|
-
if (
|
|
594
|
-
return
|
|
595
|
-
const
|
|
596
|
-
return
|
|
593
|
+
if (g.value.schema && g.value.schema.type === "component")
|
|
594
|
+
return g.value;
|
|
595
|
+
const w = k(g == null ? void 0 : g.value.parent), y = c(w);
|
|
596
|
+
return y || null;
|
|
597
597
|
}
|
|
598
|
-
function
|
|
599
|
-
const { componentInstance:
|
|
600
|
-
return !
|
|
598
|
+
function d(g = t) {
|
|
599
|
+
const { componentInstance: w, designerItemElementRef: y } = g;
|
|
600
|
+
return !w || !w.value ? null : w.value.canMove ? y : d(g.parent);
|
|
601
601
|
}
|
|
602
|
-
function f(
|
|
603
|
-
return !!n && n.canAccepts(
|
|
602
|
+
function f(g) {
|
|
603
|
+
return !!n && n.canAccepts(g);
|
|
604
604
|
}
|
|
605
605
|
function b() {
|
|
606
606
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
607
607
|
}
|
|
608
608
|
function V() {
|
|
609
609
|
}
|
|
610
|
-
function E(
|
|
611
|
-
|
|
610
|
+
function E(g, w) {
|
|
611
|
+
w && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(w);
|
|
612
612
|
}
|
|
613
|
-
function D(
|
|
614
|
-
const { componentType:
|
|
615
|
-
let
|
|
616
|
-
n && n.onResolveNewComponentSchema && (
|
|
617
|
-
const v =
|
|
618
|
-
return
|
|
613
|
+
function D(g, w) {
|
|
614
|
+
const { componentType: y } = g;
|
|
615
|
+
let h = z(y, g, w);
|
|
616
|
+
n && n.onResolveNewComponentSchema && (h = n.onResolveNewComponentSchema(g, h));
|
|
617
|
+
const v = y.toLowerCase().replace("-", "_");
|
|
618
|
+
return h && !h.id && h.type === y && (h.id = `${v}_${Math.random().toString().slice(2, 6)}`), h;
|
|
619
619
|
}
|
|
620
|
-
function x(
|
|
621
|
-
const
|
|
622
|
-
|
|
623
|
-
let N = z(
|
|
624
|
-
n && n.onAcceptNewChildElement && (N = n.onAcceptNewChildElement(
|
|
625
|
-
const te =
|
|
626
|
-
return N && !N.id && N.type ===
|
|
620
|
+
function x(g, w) {
|
|
621
|
+
const y = String(g.getAttribute("data-controltype")), h = g.getAttribute("data-feature"), v = h ? JSON.parse(h) : {};
|
|
622
|
+
v.parentComponentInstance = s.value;
|
|
623
|
+
let N = z(y, v);
|
|
624
|
+
n && n.onAcceptNewChildElement && (N = n.onAcceptNewChildElement(g, w, N));
|
|
625
|
+
const te = y.toLowerCase().replace("-", "_");
|
|
626
|
+
return N && !N.id && N.type === y && (N.id = `${te}_${Math.random().toString().slice(2, 6)}`), N;
|
|
627
627
|
}
|
|
628
|
-
function C(
|
|
628
|
+
function C(g) {
|
|
629
629
|
}
|
|
630
|
-
function B(...
|
|
630
|
+
function B(...g) {
|
|
631
631
|
if (n && n.getPropsConfig)
|
|
632
|
-
return n.getPropsConfig(...
|
|
632
|
+
return n.getPropsConfig(...g);
|
|
633
633
|
}
|
|
634
|
-
return
|
|
635
|
-
canMove:
|
|
636
|
-
canSelectParent:
|
|
634
|
+
return s.value = {
|
|
635
|
+
canMove: i(),
|
|
636
|
+
canSelectParent: l(),
|
|
637
637
|
canDelete: r(),
|
|
638
|
-
canNested: !
|
|
638
|
+
canNested: !u(),
|
|
639
639
|
contents: t == null ? void 0 : t.schema.contents,
|
|
640
640
|
elementRef: e,
|
|
641
641
|
parent: (S = t == null ? void 0 : t.parent) == null ? void 0 : S.componentInstance,
|
|
642
642
|
schema: t == null ? void 0 : t.schema,
|
|
643
643
|
styles: a,
|
|
644
|
-
designerClass:
|
|
644
|
+
designerClass: p,
|
|
645
645
|
canAccepts: f,
|
|
646
|
-
getBelongedComponentInstance:
|
|
647
|
-
getDraggableDesignItemElement:
|
|
646
|
+
getBelongedComponentInstance: c,
|
|
647
|
+
getDraggableDesignItemElement: d,
|
|
648
648
|
getDraggingDisplayText: b,
|
|
649
649
|
getPropConfig: B,
|
|
650
650
|
getDragScopeElement: V,
|
|
@@ -655,40 +655,40 @@ function Ne(e, t, n) {
|
|
|
655
655
|
updateDragAndDropRules: o,
|
|
656
656
|
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || k(!1),
|
|
657
657
|
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
|
|
658
|
-
},
|
|
658
|
+
}, s;
|
|
659
659
|
}
|
|
660
660
|
function Se(e, t) {
|
|
661
661
|
e.schema;
|
|
662
662
|
const n = k(!0), o = k(!0);
|
|
663
|
-
function a(
|
|
663
|
+
function a(c) {
|
|
664
664
|
return !1;
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function p() {
|
|
667
667
|
return !1;
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function s() {
|
|
670
670
|
return !1;
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function i() {
|
|
673
673
|
return !0;
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function l(c) {
|
|
676
676
|
}
|
|
677
677
|
function r() {
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function u(c) {
|
|
680
680
|
return null;
|
|
681
681
|
}
|
|
682
682
|
return {
|
|
683
683
|
canAccepts: a,
|
|
684
|
-
checkCanDeleteComponent:
|
|
685
|
-
checkCanMoveComponent:
|
|
686
|
-
hideNestedPaddingInDesginerView:
|
|
687
|
-
onAcceptMovedChildElement:
|
|
684
|
+
checkCanDeleteComponent: p,
|
|
685
|
+
checkCanMoveComponent: s,
|
|
686
|
+
hideNestedPaddingInDesginerView: i,
|
|
687
|
+
onAcceptMovedChildElement: l,
|
|
688
688
|
resolveComponentContext: r,
|
|
689
689
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
690
690
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
691
|
-
getPropsConfig:
|
|
691
|
+
getPropsConfig: u
|
|
692
692
|
};
|
|
693
693
|
}
|
|
694
694
|
class Ve {
|
|
@@ -852,10 +852,10 @@ class Te extends Ve {
|
|
|
852
852
|
return this.propertyConfig.categories.basic = this.getBasicProperties(t, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
|
|
853
853
|
}
|
|
854
854
|
getBasicProperties(t, n) {
|
|
855
|
-
var
|
|
855
|
+
var s;
|
|
856
856
|
var o = this;
|
|
857
857
|
this.setDesignViewModelField(t);
|
|
858
|
-
const a = this.formSchemaUtils.getFormMetadataBasicInfo(),
|
|
858
|
+
const a = this.formSchemaUtils.getFormMetadataBasicInfo(), p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
859
859
|
return {
|
|
860
860
|
description: "Basic Information",
|
|
861
861
|
title: "基本信息",
|
|
@@ -867,8 +867,8 @@ class Te extends Ve {
|
|
|
867
867
|
readonly: !0
|
|
868
868
|
},
|
|
869
869
|
type: {
|
|
870
|
-
description: "
|
|
871
|
-
title: "
|
|
870
|
+
description: "编辑器类型",
|
|
871
|
+
title: "编辑器类型",
|
|
872
872
|
type: "string",
|
|
873
873
|
refreshPanelAfterChanged: !0,
|
|
874
874
|
$converter: "/converter/change-editor.converter",
|
|
@@ -877,7 +877,7 @@ class Te extends Ve {
|
|
|
877
877
|
textField: "value",
|
|
878
878
|
valueField: "key",
|
|
879
879
|
editable: !1,
|
|
880
|
-
data: o.designViewModelField ? W.getEditorTypesByMDataType((
|
|
880
|
+
data: o.designViewModelField ? W.getEditorTypesByMDataType((s = o.designViewModelField.type) == null ? void 0 : s.name) : W.getAllInputTypes()
|
|
881
881
|
}
|
|
882
882
|
},
|
|
883
883
|
label: {
|
|
@@ -902,15 +902,19 @@ class Te extends Ve {
|
|
|
902
902
|
{ field: "fieldType", title: "字段类型" }
|
|
903
903
|
],
|
|
904
904
|
textField: "bindingField",
|
|
905
|
-
data:
|
|
905
|
+
data: p
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
908
|
},
|
|
909
|
-
setPropertyRelates(
|
|
910
|
-
if (
|
|
911
|
-
switch (
|
|
909
|
+
setPropertyRelates(i, l) {
|
|
910
|
+
if (i)
|
|
911
|
+
switch (i && i.propertyID) {
|
|
912
912
|
case "type": {
|
|
913
|
-
o.changeControlType(t,
|
|
913
|
+
o.changeControlType(t, i, n);
|
|
914
|
+
break;
|
|
915
|
+
}
|
|
916
|
+
case "label": {
|
|
917
|
+
i.needRefreshControlTree = !0;
|
|
914
918
|
break;
|
|
915
919
|
}
|
|
916
920
|
}
|
|
@@ -956,12 +960,12 @@ class Te extends Ve {
|
|
|
956
960
|
* @param newControlType 新控件类型
|
|
957
961
|
*/
|
|
958
962
|
changeControlType(t, n, o) {
|
|
959
|
-
var r,
|
|
960
|
-
const a = n.propertyValue,
|
|
961
|
-
if (!
|
|
963
|
+
var r, u, c, d;
|
|
964
|
+
const a = n.propertyValue, p = o && o.parent && o.parent.schema;
|
|
965
|
+
if (!p)
|
|
962
966
|
return;
|
|
963
|
-
const
|
|
964
|
-
let
|
|
967
|
+
const s = p.contents.findIndex((f) => f.id === t.id), i = p.contents[s];
|
|
968
|
+
let l;
|
|
965
969
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
966
970
|
editor: {
|
|
967
971
|
$type: a
|
|
@@ -969,30 +973,30 @@ class Te extends Ve {
|
|
|
969
973
|
name: this.designViewModelField.name,
|
|
970
974
|
require: this.designViewModelField.require,
|
|
971
975
|
readonly: this.designViewModelField.readonly
|
|
972
|
-
}, !1),
|
|
973
|
-
id:
|
|
974
|
-
appearance:
|
|
975
|
-
size:
|
|
976
|
-
label:
|
|
977
|
-
binding:
|
|
978
|
-
visible:
|
|
979
|
-
}), Object.assign(
|
|
980
|
-
isTextArea:
|
|
981
|
-
placeholder: (r =
|
|
982
|
-
holdPlace: (
|
|
983
|
-
readonly: (
|
|
984
|
-
require: (
|
|
985
|
-
}),
|
|
976
|
+
}, !1), l = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), l || (l = J("form-group") || {}, l.editor = J(a) || {}, delete l.editor.id, delete l.editor.binding, delete l.editor.appearance), Object.assign(l, {
|
|
977
|
+
id: i.id,
|
|
978
|
+
appearance: i.appearance,
|
|
979
|
+
size: i.size,
|
|
980
|
+
label: i.label,
|
|
981
|
+
binding: i.binding,
|
|
982
|
+
visible: i.visible
|
|
983
|
+
}), Object.assign(l.editor, {
|
|
984
|
+
isTextArea: l.isTextArea && i.isTextArea,
|
|
985
|
+
placeholder: (r = i.editor) == null ? void 0 : r.placeholder,
|
|
986
|
+
holdPlace: (u = i.editor) == null ? void 0 : u.holdPlace,
|
|
987
|
+
readonly: (c = i.editor) == null ? void 0 : c.readonly,
|
|
988
|
+
require: (d = i.editor) == null ? void 0 : d.require
|
|
989
|
+
}), p.contents.splice(s, 1), p.contents.splice(s, 0, l), o.schema = Object.assign(i, l), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
986
990
|
(f) => f.classList.remove("dgComponentSelected")
|
|
987
991
|
), ke.value++;
|
|
988
992
|
}
|
|
989
993
|
getComponentConfig(t, n = {}, o = {}) {
|
|
990
994
|
const a = Object.assign({
|
|
991
|
-
description: "
|
|
992
|
-
title: "
|
|
995
|
+
description: "编辑器",
|
|
996
|
+
title: "编辑器",
|
|
993
997
|
type: "input-group",
|
|
994
998
|
$converter: "/converter/property-editor.converter"
|
|
995
|
-
}, n),
|
|
999
|
+
}, n), p = Object.assign({
|
|
996
1000
|
readonly: {
|
|
997
1001
|
description: "",
|
|
998
1002
|
title: "只读",
|
|
@@ -1014,7 +1018,7 @@ class Te extends Ve {
|
|
|
1014
1018
|
type: "string"
|
|
1015
1019
|
}
|
|
1016
1020
|
}, o);
|
|
1017
|
-
return { ...a, properties: { ...
|
|
1021
|
+
return { ...a, properties: { ...p } };
|
|
1018
1022
|
}
|
|
1019
1023
|
}
|
|
1020
1024
|
class Me extends Te {
|
|
@@ -1036,56 +1040,56 @@ function xe(e, t) {
|
|
|
1036
1040
|
canAccepts: n,
|
|
1037
1041
|
checkCanDeleteComponent: o,
|
|
1038
1042
|
checkCanMoveComponent: a,
|
|
1039
|
-
hideNestedPaddingInDesginerView:
|
|
1040
|
-
onAcceptMovedChildElement:
|
|
1041
|
-
resolveComponentContext:
|
|
1042
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1043
|
+
hideNestedPaddingInDesginerView: p,
|
|
1044
|
+
onAcceptMovedChildElement: s,
|
|
1045
|
+
resolveComponentContext: i,
|
|
1046
|
+
triggerBelongedComponentToMoveWhenMoved: l,
|
|
1043
1047
|
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
1044
|
-
} = Se(e),
|
|
1045
|
-
function
|
|
1046
|
-
return new Me(
|
|
1048
|
+
} = Se(e), u = e.schema;
|
|
1049
|
+
function c(d, f) {
|
|
1050
|
+
return new Me(d, t).getPropertyConfig(u, f);
|
|
1047
1051
|
}
|
|
1048
1052
|
return {
|
|
1049
1053
|
canAccepts: n,
|
|
1050
1054
|
checkCanDeleteComponent: o,
|
|
1051
1055
|
checkCanMoveComponent: a,
|
|
1052
|
-
hideNestedPaddingInDesginerView:
|
|
1053
|
-
onAcceptMovedChildElement:
|
|
1054
|
-
resolveComponentContext:
|
|
1055
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1056
|
+
hideNestedPaddingInDesginerView: p,
|
|
1057
|
+
onAcceptMovedChildElement: s,
|
|
1058
|
+
resolveComponentContext: i,
|
|
1059
|
+
triggerBelongedComponentToMoveWhenMoved: l,
|
|
1056
1060
|
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
1057
|
-
getPropsConfig:
|
|
1061
|
+
getPropsConfig: c
|
|
1058
1062
|
};
|
|
1059
1063
|
}
|
|
1060
1064
|
const Fe = /* @__PURE__ */ Q({
|
|
1061
1065
|
name: "FNumberRangeDesign",
|
|
1062
|
-
props:
|
|
1066
|
+
props: R,
|
|
1063
1067
|
emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
|
|
1064
1068
|
setup(e, t) {
|
|
1065
|
-
const n = k(e.beginValue), o = k(""), a = k(e.endValue),
|
|
1066
|
-
t.emit("beginValueChange",
|
|
1067
|
-
}, r = k(),
|
|
1069
|
+
const n = k(e.beginValue), o = k(""), a = k(e.endValue), p = k(""), s = K(e), i = ee(e, t, s), l = (v) => {
|
|
1070
|
+
t.emit("beginValueChange", v);
|
|
1071
|
+
}, r = k(), u = H("designer-host-service"), c = H("design-item-context"), d = xe(c, u), f = Ne(r, c, d);
|
|
1068
1072
|
G(() => {
|
|
1069
1073
|
r.value.componentInstance = f;
|
|
1070
1074
|
}), t.expose(f.value);
|
|
1071
|
-
const b = A(e, t, o, n,
|
|
1072
|
-
t.emit("endValueChange",
|
|
1073
|
-
}, C = A(e, t,
|
|
1074
|
-
getRealValue:
|
|
1075
|
-
} =
|
|
1076
|
-
format:
|
|
1077
|
-
} =
|
|
1075
|
+
const b = A(e, t, o, n, i, s, l, n, a, !0), V = U(e, t, o, n, i, s, b, l, n, a, !0), E = L(e, t, b), D = $(e, t, V, !0), x = (v) => {
|
|
1076
|
+
t.emit("endValueChange", v);
|
|
1077
|
+
}, C = A(e, t, p, a, i, s, x, n, a, !1), B = U(e, t, p, a, i, s, C, x, n, a, !1), S = L(e, t, C), g = $(e, t, B, !1), {
|
|
1078
|
+
getRealValue: w
|
|
1079
|
+
} = s, {
|
|
1080
|
+
format: y
|
|
1081
|
+
} = i, h = P(() => !e.disabled && !e.readonly && e.showButton);
|
|
1078
1082
|
return G(() => {
|
|
1079
|
-
const
|
|
1080
|
-
o.value =
|
|
1081
|
-
}), j(() => [e.beginValue], ([
|
|
1082
|
-
const N =
|
|
1083
|
-
o.value =
|
|
1084
|
-
}), j(() => [e.endValue], ([
|
|
1085
|
-
const N =
|
|
1086
|
-
|
|
1083
|
+
const v = w(e.beginValue), N = w(e.endValue);
|
|
1084
|
+
o.value = y(v), p.value = y(N);
|
|
1085
|
+
}), j(() => [e.beginValue], ([v]) => {
|
|
1086
|
+
const N = w(v);
|
|
1087
|
+
o.value = y(N);
|
|
1088
|
+
}), j(() => [e.endValue], ([v]) => {
|
|
1089
|
+
const N = w(v);
|
|
1090
|
+
p.value = y(N);
|
|
1087
1091
|
}), j(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
1088
|
-
o.value =
|
|
1092
|
+
o.value = y(n.value), p.value = y(a.value);
|
|
1089
1093
|
}), () => M("div", {
|
|
1090
1094
|
ref: r,
|
|
1091
1095
|
class: "input-group number-range f-cmp-number-spinner"
|
|
@@ -1093,11 +1097,11 @@ const Fe = /* @__PURE__ */ Q({
|
|
|
1093
1097
|
class: "form-control input-container"
|
|
1094
1098
|
}, [M("div", {
|
|
1095
1099
|
class: "sub-input-group"
|
|
1096
|
-
}, [D(),
|
|
1100
|
+
}, [D(), h.value && E()]), M("span", {
|
|
1097
1101
|
class: "spliter"
|
|
1098
1102
|
}, [X("~")]), M("div", {
|
|
1099
1103
|
class: "sub-input-group"
|
|
1100
|
-
}, [
|
|
1104
|
+
}, [g(), h.value && S()])])]);
|
|
1101
1105
|
}
|
|
1102
1106
|
}), De = (e) => {
|
|
1103
1107
|
const t = e;
|
|
@@ -1105,16 +1109,16 @@ const Fe = /* @__PURE__ */ Q({
|
|
|
1105
1109
|
n.component(t.name, e);
|
|
1106
1110
|
}, e;
|
|
1107
1111
|
};
|
|
1108
|
-
|
|
1109
|
-
e["number-range"] =
|
|
1112
|
+
q.register = (e, t, n, o) => {
|
|
1113
|
+
e["number-range"] = q, t["number-range"] = I;
|
|
1110
1114
|
};
|
|
1111
|
-
|
|
1115
|
+
q.registerDesigner = (e, t, n) => {
|
|
1112
1116
|
e["number-range"] = Fe, t["number-range"] = I;
|
|
1113
1117
|
};
|
|
1114
|
-
const Ue = De(
|
|
1118
|
+
const Ue = De(q);
|
|
1115
1119
|
export {
|
|
1116
|
-
|
|
1120
|
+
q as FNumberRange,
|
|
1117
1121
|
Ue as default,
|
|
1118
|
-
|
|
1122
|
+
R as numberRangeProps,
|
|
1119
1123
|
I as propsResolver
|
|
1120
1124
|
};
|