@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,37 +1,37 @@
|
|
|
1
1
|
var ee = Object.defineProperty;
|
|
2
2
|
var te = (t, e, n) => e in t ? ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
-
var
|
|
4
|
-
import { computed as M, ref as
|
|
3
|
+
var C = (t, e, n) => te(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { computed as M, ref as k, createVNode as V, onMounted as L, nextTick as G, defineComponent as J, watch as U, inject as z } from "vue";
|
|
5
5
|
import { cloneDeep as ne } from "lodash-es";
|
|
6
|
-
import
|
|
6
|
+
import S from "bignumber.js";
|
|
7
7
|
import { getSchemaByType as Z } from "../dynamic-resolver/index.esm.js";
|
|
8
8
|
const Q = {}, X = {};
|
|
9
|
-
function
|
|
10
|
-
const { properties: e, title: n } = t, r = Object.keys(e).reduce((
|
|
11
|
-
return r.id = `${n}-${Date.now()}
|
|
9
|
+
function W(t) {
|
|
10
|
+
const { properties: e, title: n, ignore: r } = t, l = r && Array.isArray(r), d = Object.keys(e).reduce((u, c) => ((!l || !r.find((s) => s == c)) && (u[c] = e[c].type === "object" && e[c].properties ? W(e[c]) : ne(e[c].default)), u), {});
|
|
11
|
+
return (!l || !r.find((u) => u == "id")) && (d.id = `${n}-${Date.now()}`), d;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
let
|
|
17
|
-
const
|
|
18
|
-
return
|
|
13
|
+
function $(t, e = {}, n) {
|
|
14
|
+
const r = Q[t];
|
|
15
|
+
if (r) {
|
|
16
|
+
let l = W(r);
|
|
17
|
+
const d = X[t];
|
|
18
|
+
return l = d ? d({ getSchemaByType: $ }, l, e, n) : l, l;
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
22
|
function oe(t, e) {
|
|
23
|
-
const n =
|
|
23
|
+
const n = W(e);
|
|
24
24
|
return Object.keys(t).reduce((r, l) => (r[l] && typeof r[l] == "object" ? Object.assign(r[l], t[l]) : r[l] = t[l], r), n), n;
|
|
25
25
|
}
|
|
26
26
|
function re(t, e) {
|
|
27
27
|
return Object.keys(t).filter((r) => t[r] != null).reduce((r, l) => {
|
|
28
28
|
if (e.has(l)) {
|
|
29
|
-
const
|
|
30
|
-
if (typeof
|
|
31
|
-
r[
|
|
29
|
+
const d = e.get(l);
|
|
30
|
+
if (typeof d == "string")
|
|
31
|
+
r[d] = t[l];
|
|
32
32
|
else {
|
|
33
|
-
const
|
|
34
|
-
Object.assign(r,
|
|
33
|
+
const u = d(l, t[l], t);
|
|
34
|
+
Object.assign(r, u);
|
|
35
35
|
}
|
|
36
36
|
} else
|
|
37
37
|
r[l] = t[l];
|
|
@@ -43,22 +43,22 @@ function ie(t, e, n = /* @__PURE__ */ new Map()) {
|
|
|
43
43
|
return re(r, n);
|
|
44
44
|
}
|
|
45
45
|
function ae(t = {}) {
|
|
46
|
-
function e(o, i, a,
|
|
46
|
+
function e(o, i, a, p) {
|
|
47
47
|
if (typeof a == "number")
|
|
48
|
-
return
|
|
48
|
+
return p[o].length === a;
|
|
49
49
|
if (typeof a == "object") {
|
|
50
50
|
const f = Object.keys(a)[0], y = a[f];
|
|
51
51
|
if (f === "not")
|
|
52
|
-
return Number(
|
|
52
|
+
return Number(p[o].length) !== Number(y);
|
|
53
53
|
if (f === "moreThan")
|
|
54
|
-
return Number(
|
|
54
|
+
return Number(p[o].length) >= Number(y);
|
|
55
55
|
if (f === "lessThan")
|
|
56
|
-
return Number(
|
|
56
|
+
return Number(p[o].length) <= Number(y);
|
|
57
57
|
}
|
|
58
58
|
return !1;
|
|
59
59
|
}
|
|
60
|
-
function n(o, i, a,
|
|
61
|
-
return
|
|
60
|
+
function n(o, i, a, p) {
|
|
61
|
+
return p[o] && p[o].propertyValue && String(p[o].propertyValue.value) === String(a);
|
|
62
62
|
}
|
|
63
63
|
const r = /* @__PURE__ */ new Map([
|
|
64
64
|
["length", e],
|
|
@@ -67,20 +67,20 @@ function ae(t = {}) {
|
|
|
67
67
|
Object.keys(t).reduce((o, i) => (o.set(i, t[i]), o), r);
|
|
68
68
|
function l(o, i) {
|
|
69
69
|
const a = o;
|
|
70
|
-
return typeof i == "number" ? [{ target: a, operator: "length", param: null, value: Number(i) }] : typeof i == "boolean" ? [{ target: a, operator: "getProperty", param: o, value: !!i }] : typeof i == "object" ? Object.keys(i).map((
|
|
71
|
-
if (
|
|
72
|
-
return { target: a, operator: "length", param: null, value: i[
|
|
73
|
-
const f =
|
|
70
|
+
return typeof i == "number" ? [{ target: a, operator: "length", param: null, value: Number(i) }] : typeof i == "boolean" ? [{ target: a, operator: "getProperty", param: o, value: !!i }] : typeof i == "object" ? Object.keys(i).map((p) => {
|
|
71
|
+
if (p === "length")
|
|
72
|
+
return { target: a, operator: "length", param: null, value: i[p] };
|
|
73
|
+
const f = p, y = i[p];
|
|
74
74
|
return { target: a, operator: "getProperty", param: f, value: y };
|
|
75
75
|
}) : [];
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return Object.keys(o).reduce((a,
|
|
79
|
-
const f = l(
|
|
77
|
+
function d(o) {
|
|
78
|
+
return Object.keys(o).reduce((a, p) => {
|
|
79
|
+
const f = l(p, o[p]);
|
|
80
80
|
return a.push(...f), a;
|
|
81
81
|
}, []);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function u(o, i) {
|
|
84
84
|
if (r.has(o.operator)) {
|
|
85
85
|
const a = r.get(o.operator);
|
|
86
86
|
return a && a(o.target, o.param, o.value, i) || !1;
|
|
@@ -88,15 +88,15 @@ function ae(t = {}) {
|
|
|
88
88
|
return !1;
|
|
89
89
|
}
|
|
90
90
|
function c(o, i) {
|
|
91
|
-
return
|
|
91
|
+
return d(o).reduce((f, y) => f && u(y, i), !0);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
const a = Object.keys(o),
|
|
95
|
-
return
|
|
93
|
+
function s(o, i) {
|
|
94
|
+
const a = Object.keys(o), p = a.includes("allOf"), f = a.includes("anyOf"), y = p || f, F = (y ? o[y ? p ? "allOf" : "anyOf" : "allOf"] : [o]).map((P) => c(P, i));
|
|
95
|
+
return p ? !F.includes(!1) : F.includes(!0);
|
|
96
96
|
}
|
|
97
|
-
return { parseValueSchema:
|
|
97
|
+
return { parseValueSchema: s };
|
|
98
98
|
}
|
|
99
|
-
const
|
|
99
|
+
const m = {
|
|
100
100
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
101
101
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
102
102
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -136,10 +136,10 @@ const d = {
|
|
|
136
136
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
137
137
|
}, le = {}, ce = {};
|
|
138
138
|
ae();
|
|
139
|
-
function ue(t, e, n = /* @__PURE__ */ new Map(), r = (
|
|
140
|
-
return Q[e.title] = e, X[e.title] = r, le[e.title] = l, ce[e.title] =
|
|
141
|
-
const c = ie(
|
|
142
|
-
return Object.assign(
|
|
139
|
+
function ue(t, e, n = /* @__PURE__ */ new Map(), r = (u, c, s) => c, l = {}, d = (u) => u) {
|
|
140
|
+
return Q[e.title] = e, X[e.title] = r, le[e.title] = l, ce[e.title] = d, (u = {}) => {
|
|
141
|
+
const c = ie(u, e, n), s = Object.keys(t).reduce((o, i) => (o[i] = t[i].default, o), {});
|
|
142
|
+
return Object.assign(s, c);
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
function se(t, e) {
|
|
@@ -251,19 +251,24 @@ const pe = /* @__PURE__ */ new Map([
|
|
|
251
251
|
}, he = [
|
|
252
252
|
"id",
|
|
253
253
|
"type"
|
|
254
|
-
], ve =
|
|
254
|
+
], ve = [
|
|
255
|
+
"id",
|
|
256
|
+
"appearance",
|
|
257
|
+
"binding"
|
|
258
|
+
], we = {
|
|
255
259
|
$schema: de,
|
|
256
260
|
$id: me,
|
|
257
261
|
title: fe,
|
|
258
262
|
description: ye,
|
|
259
263
|
type: ge,
|
|
260
264
|
properties: be,
|
|
261
|
-
required: he
|
|
265
|
+
required: he,
|
|
266
|
+
ignore: ve
|
|
262
267
|
};
|
|
263
|
-
function
|
|
268
|
+
function Ce(t, e, n) {
|
|
264
269
|
return e;
|
|
265
270
|
}
|
|
266
|
-
const
|
|
271
|
+
const q = {
|
|
267
272
|
/**
|
|
268
273
|
* 组件标识
|
|
269
274
|
*/
|
|
@@ -367,39 +372,39 @@ const W = {
|
|
|
367
372
|
* 作为内嵌编辑器被创建后默认选中文本
|
|
368
373
|
*/
|
|
369
374
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
370
|
-
}, Y = ue(
|
|
375
|
+
}, Y = ue(q, we, pe, Ce);
|
|
371
376
|
function _(t, e, n, r) {
|
|
372
|
-
const { format: l } = n, { displayValue:
|
|
377
|
+
const { format: l } = n, { displayValue: d, getRealValue: u, modelValue: c, onNumberValueChanged: s } = r;
|
|
373
378
|
function o() {
|
|
374
|
-
const
|
|
375
|
-
return !(t.max && !new
|
|
379
|
+
const w = new S(c.value || 0);
|
|
380
|
+
return !(t.max && !new S(t.max).isNaN() && w.gte(new S(t.max)));
|
|
376
381
|
}
|
|
377
382
|
function i() {
|
|
378
|
-
const
|
|
379
|
-
return !(t.min && !new
|
|
383
|
+
const w = new S(c.value || 0);
|
|
384
|
+
return !(t.min && !new S(t.min).isNaN() && w.lte(new S(t.min)));
|
|
380
385
|
}
|
|
381
|
-
function a(
|
|
386
|
+
function a(w) {
|
|
382
387
|
if (t.readonly || t.disabled)
|
|
383
388
|
return;
|
|
384
|
-
const
|
|
385
|
-
if (
|
|
386
|
-
const b = new
|
|
387
|
-
|
|
389
|
+
const F = w === "up" ? o : i, D = w === "up" ? "plus" : "minus";
|
|
390
|
+
if (F()) {
|
|
391
|
+
const b = new S(c.value || 0)[D](Number(t.step)), N = b.toFixed();
|
|
392
|
+
d.value = l(N), s(u(b));
|
|
388
393
|
}
|
|
389
394
|
}
|
|
390
|
-
function
|
|
395
|
+
function p() {
|
|
391
396
|
a("up");
|
|
392
397
|
}
|
|
393
398
|
function f() {
|
|
394
399
|
a("down");
|
|
395
400
|
}
|
|
396
|
-
function y(
|
|
397
|
-
|
|
401
|
+
function y(w) {
|
|
402
|
+
p(), w.stopPropagation();
|
|
398
403
|
}
|
|
399
|
-
function w
|
|
400
|
-
f(),
|
|
404
|
+
function v(w) {
|
|
405
|
+
f(), w.stopPropagation();
|
|
401
406
|
}
|
|
402
|
-
return { canDownward: i, canUpward: o, downward: f, onClickDownButton:
|
|
407
|
+
return { canDownward: i, canUpward: o, downward: f, onClickDownButton: v, onClickUpButton: y, upward: p };
|
|
403
408
|
}
|
|
404
409
|
function H(t, e, n) {
|
|
405
410
|
const r = M(() => ({
|
|
@@ -408,39 +413,39 @@ function H(t, e, n) {
|
|
|
408
413
|
decimalSeparator: t.decimalSeparator,
|
|
409
414
|
groupSeparator: t.useThousands ? t.groupSeparator : "",
|
|
410
415
|
groupSize: t.groupSize
|
|
411
|
-
})), { getValidNumberObject: l, precision:
|
|
412
|
-
function
|
|
416
|
+
})), { getValidNumberObject: l, precision: d } = n;
|
|
417
|
+
function u(o) {
|
|
413
418
|
return o = o == null || o === "" ? "" : String(o), o = o.replace(new RegExp(t.prefix, "g"), "").replace(new RegExp(t.suffix, "g"), "").replace(/,/g, ""), t.groupSeparator && t.groupSeparator !== "," && (o = o.replace(new RegExp(`\\${t.groupSeparator}`, "g"), "")), t.decimalSeparator && t.decimalSeparator !== "." && (o = o.replace(new RegExp(`\\${t.decimalSeparator}`, "g"), ".")), o;
|
|
414
419
|
}
|
|
415
420
|
function c(o, i) {
|
|
416
|
-
return t.precision !== null && t.precision !== void 0 ? o.toFormat(
|
|
421
|
+
return t.precision !== null && t.precision !== void 0 ? o.toFormat(d.value, i) : o.toFormat(i);
|
|
417
422
|
}
|
|
418
|
-
function
|
|
419
|
-
const i =
|
|
420
|
-
return
|
|
423
|
+
function s(o) {
|
|
424
|
+
const i = u(o), a = new S(i, 10), p = l(a);
|
|
425
|
+
return p.valueOf() === "0" && !t.showZero || p.isNaN() ? "" : t.formatter ? t.formatter(p.toNumber()) : c(p, r.value);
|
|
421
426
|
}
|
|
422
|
-
return { cleanFormat:
|
|
427
|
+
return { cleanFormat: u, format: s };
|
|
423
428
|
}
|
|
424
429
|
function R(t, e) {
|
|
425
|
-
const n =
|
|
426
|
-
function
|
|
430
|
+
const n = k(""), r = k(t.modelValue), l = M(() => Number(t.precision) || 0);
|
|
431
|
+
function d(i) {
|
|
427
432
|
return i.toFixed(l.value);
|
|
428
433
|
}
|
|
429
|
-
function
|
|
434
|
+
function u(i) {
|
|
430
435
|
return isNaN(i) || i === null || i === void 0 || i === "";
|
|
431
436
|
}
|
|
432
437
|
function c(i) {
|
|
433
|
-
const a =
|
|
434
|
-
return a && i.gt(a) ? a :
|
|
438
|
+
const a = u(t.max) ? null : new S(String(t.max), 10), p = u(t.min) ? null : new S(String(t.min), 10);
|
|
439
|
+
return a && i.gt(a) ? a : p && i.lt(p) ? p : i;
|
|
435
440
|
}
|
|
436
|
-
function
|
|
441
|
+
function s(i) {
|
|
437
442
|
if (t.parser)
|
|
438
443
|
return isNaN(Number(i)) ? t.parser(i) : i;
|
|
439
|
-
let a = c(new
|
|
444
|
+
let a = c(new S(i, 10));
|
|
440
445
|
if (a.isNaN()) {
|
|
441
446
|
if (t.canNull)
|
|
442
447
|
return null;
|
|
443
|
-
const f = new
|
|
448
|
+
const f = new S("" + t.min, 10), y = new S("" + t.max, 10);
|
|
444
449
|
if (!f.isNaN())
|
|
445
450
|
a = f;
|
|
446
451
|
else if (!y.isNaN())
|
|
@@ -448,52 +453,52 @@ function R(t, e) {
|
|
|
448
453
|
else
|
|
449
454
|
return 0;
|
|
450
455
|
}
|
|
451
|
-
return
|
|
456
|
+
return d(a);
|
|
452
457
|
}
|
|
453
458
|
function o(i) {
|
|
454
459
|
const a = Number(i);
|
|
455
460
|
r.value = a, e.emit("update:modelValue", a), e.emit("valueChange", a), e.emit("change", a);
|
|
456
461
|
}
|
|
457
|
-
return { displayValue: n, getRealValue:
|
|
462
|
+
return { displayValue: n, getRealValue: s, modelValue: r, isEmpty: u, onNumberValueChanged: o, precision: l, getValidNumberObject: c };
|
|
458
463
|
}
|
|
459
|
-
function
|
|
460
|
-
const { cleanFormat:
|
|
461
|
-
function
|
|
464
|
+
function Se(t, e, n, r, l) {
|
|
465
|
+
const { cleanFormat: d, format: u } = n, { displayValue: c, getRealValue: s, modelValue: o, isEmpty: i, onNumberValueChanged: a } = r, { downward: p, upward: f } = l, y = k(!1), v = M(() => c.value);
|
|
466
|
+
function w(b) {
|
|
462
467
|
var h;
|
|
463
468
|
if (b.stopPropagation(), y.value = !1, t.readonly || t.disabled)
|
|
464
469
|
return;
|
|
465
|
-
let
|
|
466
|
-
t.canNull || (
|
|
467
|
-
const g =
|
|
468
|
-
c.value =
|
|
470
|
+
let N = (h = b.target) == null ? void 0 : h.value;
|
|
471
|
+
t.canNull || (N = N || 0);
|
|
472
|
+
const g = d(N);
|
|
473
|
+
c.value = u(g), a(s(g)), e.emit("blur", { event: b, formatted: c.value, value: o.value });
|
|
469
474
|
}
|
|
470
|
-
function
|
|
475
|
+
function F(b) {
|
|
471
476
|
b.stopPropagation(), y.value = !0, !(t.readonly || t.disabled) && (c.value = i(o.value) || !t.showZero && o.value === "0" ? "" : String(o.value), e.emit("focus", { event: b, formatted: c.value, value: o.value }));
|
|
472
477
|
}
|
|
473
|
-
function
|
|
478
|
+
function D(b) {
|
|
474
479
|
var h;
|
|
475
480
|
b.stopPropagation();
|
|
476
|
-
let
|
|
477
|
-
t.canNull || (
|
|
478
|
-
const g =
|
|
479
|
-
c.value = g, a(
|
|
481
|
+
let N = (h = b.target) == null ? void 0 : h.value;
|
|
482
|
+
t.canNull || (N = N || 0);
|
|
483
|
+
const g = d(N);
|
|
484
|
+
c.value = g, a(s(g));
|
|
480
485
|
}
|
|
481
|
-
function
|
|
482
|
-
b.key === "ArrowDown" && (b.preventDefault(),
|
|
486
|
+
function P(b) {
|
|
487
|
+
b.key === "ArrowDown" && (b.preventDefault(), p()), b.key === "ArrowUp" && (b.preventDefault(), f()), b.stopPropagation();
|
|
483
488
|
}
|
|
484
|
-
return { textBoxValue:
|
|
489
|
+
return { textBoxValue: v, onBlurTextBox: w, onFocusTextBox: F, onInput: D, onKeyDown: P, isFocus: y };
|
|
485
490
|
}
|
|
486
491
|
function I(t, e, n) {
|
|
487
492
|
const {
|
|
488
493
|
canDownward: r,
|
|
489
494
|
canUpward: l,
|
|
490
|
-
onClickDownButton:
|
|
491
|
-
onClickUpButton:
|
|
495
|
+
onClickDownButton: d,
|
|
496
|
+
onClickUpButton: u
|
|
492
497
|
} = n, c = M(() => ({
|
|
493
498
|
"input-group-append": !0,
|
|
494
499
|
"btn-group": !0,
|
|
495
500
|
"btn-group-number": !0
|
|
496
|
-
})),
|
|
501
|
+
})), s = M(() => ({
|
|
497
502
|
btn: !0,
|
|
498
503
|
"btn-secondary": !0,
|
|
499
504
|
"btn-number-flag": !0
|
|
@@ -504,106 +509,106 @@ function I(t, e, n) {
|
|
|
504
509
|
cursor: r() ? "pointer" : "not-allowed",
|
|
505
510
|
"margin-left": 0
|
|
506
511
|
}));
|
|
507
|
-
return () =>
|
|
512
|
+
return () => V("div", {
|
|
508
513
|
class: c.value
|
|
509
|
-
}, [
|
|
514
|
+
}, [V("button", {
|
|
510
515
|
title: "upButton",
|
|
511
|
-
class:
|
|
516
|
+
class: s.value,
|
|
512
517
|
style: o.value,
|
|
513
|
-
onClick:
|
|
518
|
+
onClick: u,
|
|
514
519
|
disabled: !l()
|
|
515
|
-
}, [
|
|
520
|
+
}, [V("span", {
|
|
516
521
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
517
|
-
}, null)]),
|
|
522
|
+
}, null)]), V("button", {
|
|
518
523
|
title: "downButton",
|
|
519
|
-
class:
|
|
524
|
+
class: s.value,
|
|
520
525
|
style: i.value,
|
|
521
|
-
onClick:
|
|
526
|
+
onClick: d,
|
|
522
527
|
disabled: !r()
|
|
523
|
-
}, [
|
|
528
|
+
}, [V("span", {
|
|
524
529
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
525
530
|
}, null)])]);
|
|
526
531
|
}
|
|
527
|
-
function
|
|
528
|
-
const r =
|
|
532
|
+
function ke(t, e, n) {
|
|
533
|
+
const r = k(), {
|
|
529
534
|
onBlurTextBox: l,
|
|
530
|
-
onFocusTextBox:
|
|
531
|
-
onInput:
|
|
535
|
+
onFocusTextBox: d,
|
|
536
|
+
onInput: u,
|
|
532
537
|
onKeyDown: c,
|
|
533
|
-
textBoxValue:
|
|
538
|
+
textBoxValue: s
|
|
534
539
|
} = n, o = M(() => t.disabled || t.readonly || !t.editable ? "" : t.placeholder), i = M(() => ({
|
|
535
540
|
"form-control": !0,
|
|
536
541
|
"f-utils-fill": !0
|
|
537
542
|
})), a = M(() => ({
|
|
538
543
|
"text-align": t.textAlign
|
|
539
544
|
}));
|
|
540
|
-
function
|
|
541
|
-
|
|
545
|
+
function p(v) {
|
|
546
|
+
v.stopPropagation();
|
|
542
547
|
}
|
|
543
548
|
function f() {
|
|
544
549
|
t.selectOnCreated, t.focusOnCreated;
|
|
545
550
|
}
|
|
546
|
-
async function y(
|
|
547
|
-
|
|
551
|
+
async function y(v) {
|
|
552
|
+
d(v), await G, f();
|
|
548
553
|
}
|
|
549
|
-
return
|
|
554
|
+
return L(async () => {
|
|
550
555
|
await G, f();
|
|
551
|
-
}), () =>
|
|
556
|
+
}), () => V("input", {
|
|
552
557
|
ref: r,
|
|
553
558
|
class: i.value,
|
|
554
559
|
style: a.value,
|
|
555
560
|
type: "text",
|
|
556
|
-
value:
|
|
561
|
+
value: s.value,
|
|
557
562
|
disabled: t.disabled,
|
|
558
563
|
readonly: t.readonly || !t.editable,
|
|
559
564
|
placeholder: o.value,
|
|
560
565
|
onBlur: l,
|
|
561
|
-
onChange:
|
|
566
|
+
onChange: p,
|
|
562
567
|
onFocus: y,
|
|
563
|
-
onInput:
|
|
568
|
+
onInput: u,
|
|
564
569
|
onKeydown: c
|
|
565
570
|
}, null);
|
|
566
571
|
}
|
|
567
|
-
const
|
|
572
|
+
const A = /* @__PURE__ */ J({
|
|
568
573
|
name: "FNumberSpinner",
|
|
569
|
-
props:
|
|
574
|
+
props: q,
|
|
570
575
|
emits: ["update:modelValue", "valueChange", "change", "blur", "focus", "click", "input"],
|
|
571
576
|
setup(t, e) {
|
|
572
|
-
const n = R(t, e), r = H(t, e, n), l = _(t, e, r, n),
|
|
577
|
+
const n = R(t, e), r = H(t, e, n), l = _(t, e, r, n), d = Se(t, e, r, n, l), u = I(t, e, l), {
|
|
573
578
|
displayValue: c,
|
|
574
|
-
modelValue:
|
|
579
|
+
modelValue: s,
|
|
575
580
|
getRealValue: o
|
|
576
|
-
} = n, i =
|
|
581
|
+
} = n, i = ke(t, e, d), {
|
|
577
582
|
format: a
|
|
578
583
|
} = r, {
|
|
579
|
-
isFocus:
|
|
580
|
-
} =
|
|
581
|
-
return
|
|
584
|
+
isFocus: p
|
|
585
|
+
} = d, f = M(() => !t.disabled && !t.readonly && t.showButton);
|
|
586
|
+
return L(() => {
|
|
582
587
|
const y = o(t.modelValue);
|
|
583
588
|
c.value = a(y);
|
|
584
|
-
}),
|
|
585
|
-
const
|
|
586
|
-
|
|
587
|
-
}),
|
|
588
|
-
y !==
|
|
589
|
-
}),
|
|
590
|
-
c.value = a(
|
|
591
|
-
}), () =>
|
|
589
|
+
}), U(() => [t.value], ([y]) => {
|
|
590
|
+
const v = o(y);
|
|
591
|
+
s.value = v, c.value = a(v);
|
|
592
|
+
}), U(() => [t.modelValue], ([y]) => {
|
|
593
|
+
y !== s.value && (s.value = y, !p.value && (c.value = a(o(y))));
|
|
594
|
+
}), U(() => [t.precision, t.useThousands, t.prefix, t.suffix, t.showZero], () => {
|
|
595
|
+
c.value = a(s.value);
|
|
596
|
+
}), () => V("div", {
|
|
592
597
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
593
|
-
}, [i(), f.value &&
|
|
598
|
+
}, [i(), f.value && u()]);
|
|
594
599
|
}
|
|
595
600
|
});
|
|
596
|
-
function
|
|
597
|
-
var
|
|
601
|
+
function Ne(t, e, n) {
|
|
602
|
+
var N;
|
|
598
603
|
function r() {
|
|
599
604
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
600
605
|
}
|
|
601
606
|
r();
|
|
602
|
-
const l = n && n.getStyles && n.getStyles() || "",
|
|
607
|
+
const l = n && n.getStyles && n.getStyles() || "", d = n && n.getDesignerClass && n.getDesignerClass() || "", u = k();
|
|
603
608
|
function c() {
|
|
604
609
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
605
610
|
}
|
|
606
|
-
function
|
|
611
|
+
function s() {
|
|
607
612
|
return !1;
|
|
608
613
|
}
|
|
609
614
|
function o() {
|
|
@@ -617,12 +622,12 @@ function ke(t, e, n) {
|
|
|
617
622
|
return null;
|
|
618
623
|
if (g.value.schema && g.value.schema.type === "component")
|
|
619
624
|
return g.value;
|
|
620
|
-
const h =
|
|
621
|
-
return
|
|
625
|
+
const h = k(g == null ? void 0 : g.value.parent), B = a(h);
|
|
626
|
+
return B || null;
|
|
622
627
|
}
|
|
623
|
-
function
|
|
624
|
-
const { componentInstance: h, designerItemElementRef:
|
|
625
|
-
return !h || !h.value ? null : h.value.canMove ?
|
|
628
|
+
function p(g = e) {
|
|
629
|
+
const { componentInstance: h, designerItemElementRef: B } = g;
|
|
630
|
+
return !h || !h.value ? null : h.value.canMove ? B : p(g.parent);
|
|
626
631
|
}
|
|
627
632
|
function f(g) {
|
|
628
633
|
return !!n && n.canAccepts(g);
|
|
@@ -630,72 +635,72 @@ function ke(t, e, n) {
|
|
|
630
635
|
function y() {
|
|
631
636
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
632
637
|
}
|
|
633
|
-
function
|
|
638
|
+
function v() {
|
|
634
639
|
}
|
|
635
|
-
function
|
|
640
|
+
function w(g, h) {
|
|
636
641
|
h && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(h);
|
|
637
642
|
}
|
|
638
|
-
function
|
|
639
|
-
const { componentType:
|
|
640
|
-
let
|
|
641
|
-
n && n.onResolveNewComponentSchema && (
|
|
642
|
-
const
|
|
643
|
-
return
|
|
643
|
+
function F(g, h) {
|
|
644
|
+
const { componentType: B } = g;
|
|
645
|
+
let T = $(B, g, h);
|
|
646
|
+
n && n.onResolveNewComponentSchema && (T = n.onResolveNewComponentSchema(g, T));
|
|
647
|
+
const O = B.toLowerCase().replace("-", "_");
|
|
648
|
+
return T && !T.id && T.type === B && (T.id = `${O}_${Math.random().toString().slice(2, 6)}`), T;
|
|
644
649
|
}
|
|
645
|
-
function
|
|
646
|
-
const
|
|
647
|
-
|
|
648
|
-
let
|
|
649
|
-
n && n.onAcceptNewChildElement && (
|
|
650
|
-
const K =
|
|
651
|
-
return
|
|
650
|
+
function D(g, h) {
|
|
651
|
+
const B = String(g.getAttribute("data-controltype")), T = g.getAttribute("data-feature"), O = T ? JSON.parse(T) : {};
|
|
652
|
+
O.parentComponentInstance = u.value;
|
|
653
|
+
let x = $(B, O);
|
|
654
|
+
n && n.onAcceptNewChildElement && (x = n.onAcceptNewChildElement(g, h, x));
|
|
655
|
+
const K = B.toLowerCase().replace("-", "_");
|
|
656
|
+
return x && !x.id && x.type === B && (x.id = `${K}_${Math.random().toString().slice(2, 6)}`), x;
|
|
652
657
|
}
|
|
653
|
-
function
|
|
658
|
+
function P(g) {
|
|
654
659
|
}
|
|
655
660
|
function b(...g) {
|
|
656
661
|
if (n && n.getPropsConfig)
|
|
657
662
|
return n.getPropsConfig(...g);
|
|
658
663
|
}
|
|
659
|
-
return
|
|
664
|
+
return u.value = {
|
|
660
665
|
canMove: c(),
|
|
661
|
-
canSelectParent:
|
|
666
|
+
canSelectParent: s(),
|
|
662
667
|
canDelete: o(),
|
|
663
668
|
canNested: !i(),
|
|
664
669
|
contents: e == null ? void 0 : e.schema.contents,
|
|
665
670
|
elementRef: t,
|
|
666
|
-
parent: (
|
|
671
|
+
parent: (N = e == null ? void 0 : e.parent) == null ? void 0 : N.componentInstance,
|
|
667
672
|
schema: e == null ? void 0 : e.schema,
|
|
668
673
|
styles: l,
|
|
669
|
-
designerClass:
|
|
674
|
+
designerClass: d,
|
|
670
675
|
canAccepts: f,
|
|
671
676
|
getBelongedComponentInstance: a,
|
|
672
|
-
getDraggableDesignItemElement:
|
|
677
|
+
getDraggableDesignItemElement: p,
|
|
673
678
|
getDraggingDisplayText: y,
|
|
674
679
|
getPropConfig: b,
|
|
675
|
-
getDragScopeElement:
|
|
676
|
-
onAcceptMovedChildElement:
|
|
677
|
-
onAcceptNewChildElement:
|
|
678
|
-
onChildElementMovedOut:
|
|
679
|
-
addNewChildComponentSchema:
|
|
680
|
+
getDragScopeElement: v,
|
|
681
|
+
onAcceptMovedChildElement: w,
|
|
682
|
+
onAcceptNewChildElement: D,
|
|
683
|
+
onChildElementMovedOut: P,
|
|
684
|
+
addNewChildComponentSchema: F,
|
|
680
685
|
updateDragAndDropRules: r,
|
|
681
|
-
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved ||
|
|
682
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
683
|
-
},
|
|
686
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || k(!1),
|
|
687
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
|
|
688
|
+
}, u;
|
|
684
689
|
}
|
|
685
|
-
class
|
|
690
|
+
class Be {
|
|
686
691
|
constructor(e, n) {
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
692
|
+
C(this, "componentId");
|
|
693
|
+
C(this, "viewModelId");
|
|
694
|
+
C(this, "eventsEditorUtils");
|
|
695
|
+
C(this, "formSchemaUtils");
|
|
696
|
+
C(this, "formMetadataConverter");
|
|
697
|
+
C(this, "designViewModelUtils");
|
|
698
|
+
C(this, "designViewModelField");
|
|
699
|
+
C(this, "controlCreatorUtils");
|
|
700
|
+
C(this, "designerHostService");
|
|
701
|
+
C(this, "schemaService", null);
|
|
702
|
+
C(this, "metadataService", null);
|
|
703
|
+
C(this, "propertyConfig", {
|
|
699
704
|
type: "object",
|
|
700
705
|
categories: {}
|
|
701
706
|
});
|
|
@@ -737,7 +742,7 @@ class Ne {
|
|
|
737
742
|
type: "combo-list",
|
|
738
743
|
textField: "name",
|
|
739
744
|
valueField: "value",
|
|
740
|
-
data: [{ value: e.type, name:
|
|
745
|
+
data: [{ value: e.type, name: m[e.type].name }]
|
|
741
746
|
}
|
|
742
747
|
}
|
|
743
748
|
}
|
|
@@ -764,12 +769,12 @@ class Ne {
|
|
|
764
769
|
};
|
|
765
770
|
}
|
|
766
771
|
}
|
|
767
|
-
const
|
|
772
|
+
const E = class E {
|
|
768
773
|
/**
|
|
769
774
|
* 根据绑定字段类型获取可用的输入类控件
|
|
770
775
|
*/
|
|
771
776
|
static getEditorTypesByMDataType(e) {
|
|
772
|
-
const n =
|
|
777
|
+
const n = E.fieldControlTypeMapping[e];
|
|
773
778
|
return n || [{ key: "", value: "" }];
|
|
774
779
|
}
|
|
775
780
|
/**
|
|
@@ -777,8 +782,8 @@ const P = class P {
|
|
|
777
782
|
*/
|
|
778
783
|
static getAllInputTypes() {
|
|
779
784
|
const e = [];
|
|
780
|
-
for (let n in
|
|
781
|
-
|
|
785
|
+
for (let n in E.fieldControlTypeMapping)
|
|
786
|
+
E.fieldControlTypeMapping[n].forEach((r) => {
|
|
782
787
|
e.find((l) => l.key === r.key && l.value === r.value) || e.push({ key: r.key, value: r.value });
|
|
783
788
|
});
|
|
784
789
|
return e;
|
|
@@ -787,55 +792,55 @@ const P = class P {
|
|
|
787
792
|
/**
|
|
788
793
|
* <字段类型,可配置的控件类型列表>的映射
|
|
789
794
|
*/
|
|
790
|
-
|
|
795
|
+
C(E, "fieldControlTypeMapping", {
|
|
791
796
|
String: [
|
|
792
|
-
{ key:
|
|
793
|
-
{ key:
|
|
794
|
-
{ key:
|
|
795
|
-
{ key:
|
|
796
|
-
{ key:
|
|
797
|
-
{ key:
|
|
798
|
-
{ key:
|
|
797
|
+
{ key: m["input-group"].type, value: m["input-group"].name },
|
|
798
|
+
{ key: m.lookup.type, value: m.lookup.name },
|
|
799
|
+
{ key: m["date-picker"].type, value: m["date-picker"].name },
|
|
800
|
+
{ key: m["check-box"].type, value: m["check-box"].name },
|
|
801
|
+
{ key: m["radio-group"].type, value: m["radio-group"].name },
|
|
802
|
+
{ key: m["combo-list"].type, value: m["combo-list"].name },
|
|
803
|
+
{ key: m.textarea.type, value: m.textarea.name }
|
|
799
804
|
],
|
|
800
805
|
Text: [
|
|
801
|
-
{ key:
|
|
802
|
-
{ key:
|
|
806
|
+
{ key: m.textarea.type, value: m.textarea.name },
|
|
807
|
+
{ key: m.lookup.type, value: m.lookup.name }
|
|
803
808
|
],
|
|
804
809
|
Decimal: [
|
|
805
|
-
{ key:
|
|
810
|
+
{ key: m["number-spinner"].type, value: m["number-spinner"].name }
|
|
806
811
|
],
|
|
807
812
|
Integer: [
|
|
808
|
-
{ key:
|
|
813
|
+
{ key: m["number-spinner"].type, value: m["number-spinner"].name }
|
|
809
814
|
],
|
|
810
815
|
Number: [
|
|
811
|
-
{ key:
|
|
816
|
+
{ key: m["number-spinner"].type, value: m["number-spinner"].name }
|
|
812
817
|
],
|
|
813
818
|
BigNumber: [
|
|
814
|
-
{ key:
|
|
819
|
+
{ key: m["number-spinner"].type, value: m["number-spinner"].name }
|
|
815
820
|
],
|
|
816
821
|
Date: [
|
|
817
|
-
{ key:
|
|
822
|
+
{ key: m["date-picker"].type, value: m["date-picker"].name }
|
|
818
823
|
],
|
|
819
824
|
DateTime: [
|
|
820
|
-
{ key:
|
|
825
|
+
{ key: m["date-picker"].type, value: m["date-picker"].name }
|
|
821
826
|
],
|
|
822
827
|
Boolean: [
|
|
823
|
-
{ key:
|
|
824
|
-
{ key:
|
|
828
|
+
{ key: m.switch.type, value: m.switch.name },
|
|
829
|
+
{ key: m["check-box"].type, value: m["check-box"].name }
|
|
825
830
|
],
|
|
826
831
|
Enum: [
|
|
827
|
-
{ key:
|
|
828
|
-
{ key:
|
|
832
|
+
{ key: m["combo-list"].type, value: m["combo-list"].name },
|
|
833
|
+
{ key: m["radio-group"].type, value: m["radio-group"].name }
|
|
829
834
|
],
|
|
830
835
|
Object: [
|
|
831
|
-
{ key:
|
|
832
|
-
{ key:
|
|
833
|
-
{ key:
|
|
836
|
+
{ key: m.lookup.type, value: m.lookup.name },
|
|
837
|
+
{ key: m["combo-list"].type, value: m["combo-list"].name },
|
|
838
|
+
{ key: m["radio-group"].type, value: m["radio-group"].name }
|
|
834
839
|
]
|
|
835
840
|
});
|
|
836
|
-
let j =
|
|
837
|
-
const
|
|
838
|
-
class
|
|
841
|
+
let j = E;
|
|
842
|
+
const Me = k(0);
|
|
843
|
+
class Te extends Be {
|
|
839
844
|
constructor(e, n) {
|
|
840
845
|
super(e, n);
|
|
841
846
|
}
|
|
@@ -843,10 +848,10 @@ class Me extends Ne {
|
|
|
843
848
|
return this.propertyConfig.categories.basic = this.getBasicProperties(e, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
844
849
|
}
|
|
845
850
|
getBasicProperties(e, n) {
|
|
846
|
-
var
|
|
851
|
+
var u;
|
|
847
852
|
var r = this;
|
|
848
853
|
this.setDesignViewModelField(e);
|
|
849
|
-
const l = this.formSchemaUtils.getFormMetadataBasicInfo(),
|
|
854
|
+
const l = this.formSchemaUtils.getFormMetadataBasicInfo(), d = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
850
855
|
return {
|
|
851
856
|
description: "Basic Information",
|
|
852
857
|
title: "基本信息",
|
|
@@ -858,8 +863,8 @@ class Me extends Ne {
|
|
|
858
863
|
readonly: !0
|
|
859
864
|
},
|
|
860
865
|
type: {
|
|
861
|
-
description: "
|
|
862
|
-
title: "
|
|
866
|
+
description: "编辑器类型",
|
|
867
|
+
title: "编辑器类型",
|
|
863
868
|
type: "string",
|
|
864
869
|
refreshPanelAfterChanged: !0,
|
|
865
870
|
$converter: "/converter/change-editor.converter",
|
|
@@ -868,7 +873,7 @@ class Me extends Ne {
|
|
|
868
873
|
textField: "value",
|
|
869
874
|
valueField: "key",
|
|
870
875
|
editable: !1,
|
|
871
|
-
data: r.designViewModelField ? j.getEditorTypesByMDataType((
|
|
876
|
+
data: r.designViewModelField ? j.getEditorTypesByMDataType((u = r.designViewModelField.type) == null ? void 0 : u.name) : j.getAllInputTypes()
|
|
872
877
|
}
|
|
873
878
|
},
|
|
874
879
|
label: {
|
|
@@ -893,17 +898,21 @@ class Me extends Ne {
|
|
|
893
898
|
{ field: "fieldType", title: "字段类型" }
|
|
894
899
|
],
|
|
895
900
|
textField: "bindingField",
|
|
896
|
-
data:
|
|
901
|
+
data: d
|
|
897
902
|
}
|
|
898
903
|
}
|
|
899
904
|
},
|
|
900
|
-
setPropertyRelates(c,
|
|
905
|
+
setPropertyRelates(c, s) {
|
|
901
906
|
if (c)
|
|
902
907
|
switch (c && c.propertyID) {
|
|
903
908
|
case "type": {
|
|
904
909
|
r.changeControlType(e, c, n);
|
|
905
910
|
break;
|
|
906
911
|
}
|
|
912
|
+
case "label": {
|
|
913
|
+
c.needRefreshControlTree = !0;
|
|
914
|
+
break;
|
|
915
|
+
}
|
|
907
916
|
}
|
|
908
917
|
}
|
|
909
918
|
};
|
|
@@ -947,12 +956,12 @@ class Me extends Ne {
|
|
|
947
956
|
* @param newControlType 新控件类型
|
|
948
957
|
*/
|
|
949
958
|
changeControlType(e, n, r) {
|
|
950
|
-
var o, i, a,
|
|
951
|
-
const l = n.propertyValue,
|
|
952
|
-
if (!
|
|
959
|
+
var o, i, a, p;
|
|
960
|
+
const l = n.propertyValue, d = r && r.parent && r.parent.schema;
|
|
961
|
+
if (!d)
|
|
953
962
|
return;
|
|
954
|
-
const
|
|
955
|
-
let
|
|
963
|
+
const u = d.contents.findIndex((f) => f.id === e.id), c = d.contents[u];
|
|
964
|
+
let s;
|
|
956
965
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
957
966
|
editor: {
|
|
958
967
|
$type: l
|
|
@@ -960,30 +969,30 @@ class Me extends Ne {
|
|
|
960
969
|
name: this.designViewModelField.name,
|
|
961
970
|
require: this.designViewModelField.require,
|
|
962
971
|
readonly: this.designViewModelField.readonly
|
|
963
|
-
}, !1),
|
|
972
|
+
}, !1), s = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), s || (s = Z("form-group") || {}, s.editor = Z(l) || {}, delete s.editor.id, delete s.editor.binding, delete s.editor.appearance), Object.assign(s, {
|
|
964
973
|
id: c.id,
|
|
965
974
|
appearance: c.appearance,
|
|
966
975
|
size: c.size,
|
|
967
976
|
label: c.label,
|
|
968
977
|
binding: c.binding,
|
|
969
978
|
visible: c.visible
|
|
970
|
-
}), Object.assign(
|
|
971
|
-
isTextArea:
|
|
979
|
+
}), Object.assign(s.editor, {
|
|
980
|
+
isTextArea: s.isTextArea && c.isTextArea,
|
|
972
981
|
placeholder: (o = c.editor) == null ? void 0 : o.placeholder,
|
|
973
982
|
holdPlace: (i = c.editor) == null ? void 0 : i.holdPlace,
|
|
974
983
|
readonly: (a = c.editor) == null ? void 0 : a.readonly,
|
|
975
|
-
require: (
|
|
976
|
-
}),
|
|
984
|
+
require: (p = c.editor) == null ? void 0 : p.require
|
|
985
|
+
}), d.contents.splice(u, 1), d.contents.splice(u, 0, s), r.schema = Object.assign(c, s), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
977
986
|
(f) => f.classList.remove("dgComponentSelected")
|
|
978
|
-
),
|
|
987
|
+
), Me.value++;
|
|
979
988
|
}
|
|
980
989
|
getComponentConfig(e, n = {}, r = {}) {
|
|
981
990
|
const l = Object.assign({
|
|
982
|
-
description: "
|
|
983
|
-
title: "
|
|
991
|
+
description: "编辑器",
|
|
992
|
+
title: "编辑器",
|
|
984
993
|
type: "input-group",
|
|
985
994
|
$converter: "/converter/property-editor.converter"
|
|
986
|
-
}, n),
|
|
995
|
+
}, n), d = Object.assign({
|
|
987
996
|
readonly: {
|
|
988
997
|
description: "",
|
|
989
998
|
title: "只读",
|
|
@@ -1005,10 +1014,10 @@ class Me extends Ne {
|
|
|
1005
1014
|
type: "string"
|
|
1006
1015
|
}
|
|
1007
1016
|
}, r);
|
|
1008
|
-
return { ...l, properties: { ...
|
|
1017
|
+
return { ...l, properties: { ...d } };
|
|
1009
1018
|
}
|
|
1010
1019
|
}
|
|
1011
|
-
class
|
|
1020
|
+
class Ve extends Te {
|
|
1012
1021
|
constructor(e, n) {
|
|
1013
1022
|
super(e, n);
|
|
1014
1023
|
}
|
|
@@ -1041,22 +1050,22 @@ class Te extends Me {
|
|
|
1041
1050
|
});
|
|
1042
1051
|
}
|
|
1043
1052
|
}
|
|
1044
|
-
function
|
|
1053
|
+
function Fe(t, e) {
|
|
1045
1054
|
t.schema;
|
|
1046
|
-
const n =
|
|
1055
|
+
const n = k(!0), r = k(!0);
|
|
1047
1056
|
function l(a) {
|
|
1048
1057
|
return !1;
|
|
1049
1058
|
}
|
|
1050
|
-
function
|
|
1059
|
+
function d() {
|
|
1051
1060
|
return !1;
|
|
1052
1061
|
}
|
|
1053
|
-
function
|
|
1062
|
+
function u() {
|
|
1054
1063
|
return !1;
|
|
1055
1064
|
}
|
|
1056
1065
|
function c() {
|
|
1057
1066
|
return !0;
|
|
1058
1067
|
}
|
|
1059
|
-
function
|
|
1068
|
+
function s(a) {
|
|
1060
1069
|
}
|
|
1061
1070
|
function o() {
|
|
1062
1071
|
}
|
|
@@ -1065,82 +1074,82 @@ function Ve(t, e) {
|
|
|
1065
1074
|
}
|
|
1066
1075
|
return {
|
|
1067
1076
|
canAccepts: l,
|
|
1068
|
-
checkCanDeleteComponent:
|
|
1069
|
-
checkCanMoveComponent:
|
|
1077
|
+
checkCanDeleteComponent: d,
|
|
1078
|
+
checkCanMoveComponent: u,
|
|
1070
1079
|
hideNestedPaddingInDesginerView: c,
|
|
1071
|
-
onAcceptMovedChildElement:
|
|
1080
|
+
onAcceptMovedChildElement: s,
|
|
1072
1081
|
resolveComponentContext: o,
|
|
1073
1082
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
1074
1083
|
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
1075
1084
|
getPropsConfig: i
|
|
1076
1085
|
};
|
|
1077
1086
|
}
|
|
1078
|
-
function
|
|
1087
|
+
function xe(t, e) {
|
|
1079
1088
|
const {
|
|
1080
1089
|
canAccepts: n,
|
|
1081
1090
|
checkCanDeleteComponent: r,
|
|
1082
1091
|
checkCanMoveComponent: l,
|
|
1083
|
-
hideNestedPaddingInDesginerView:
|
|
1084
|
-
onAcceptMovedChildElement:
|
|
1092
|
+
hideNestedPaddingInDesginerView: d,
|
|
1093
|
+
onAcceptMovedChildElement: u,
|
|
1085
1094
|
resolveComponentContext: c,
|
|
1086
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1095
|
+
triggerBelongedComponentToMoveWhenMoved: s,
|
|
1087
1096
|
triggerBelongedComponentToDeleteWhenDeleted: o
|
|
1088
|
-
} =
|
|
1089
|
-
function a(
|
|
1090
|
-
return new
|
|
1097
|
+
} = Fe(t), i = t.schema;
|
|
1098
|
+
function a(p, f) {
|
|
1099
|
+
return new Ve(p, e).getPropertyConfig(i, f);
|
|
1091
1100
|
}
|
|
1092
1101
|
return {
|
|
1093
1102
|
canAccepts: n,
|
|
1094
1103
|
checkCanDeleteComponent: r,
|
|
1095
1104
|
checkCanMoveComponent: l,
|
|
1096
|
-
hideNestedPaddingInDesginerView:
|
|
1097
|
-
onAcceptMovedChildElement:
|
|
1105
|
+
hideNestedPaddingInDesginerView: d,
|
|
1106
|
+
onAcceptMovedChildElement: u,
|
|
1098
1107
|
resolveComponentContext: c,
|
|
1099
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1108
|
+
triggerBelongedComponentToMoveWhenMoved: s,
|
|
1100
1109
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
1101
1110
|
getPropsConfig: a
|
|
1102
1111
|
};
|
|
1103
1112
|
}
|
|
1104
|
-
const
|
|
1113
|
+
const De = /* @__PURE__ */ J({
|
|
1105
1114
|
name: "FNumberSpinnerDesign",
|
|
1106
|
-
props:
|
|
1115
|
+
props: q,
|
|
1107
1116
|
emits: ["update:modelValue", "valueChange", "change", "blur", "focus", "click", "input"],
|
|
1108
1117
|
setup(t, e) {
|
|
1109
|
-
const n = R(t, e), r = H(t, e, n), l = _(t, e, r, n),
|
|
1110
|
-
|
|
1111
|
-
|
|
1118
|
+
const n = R(t, e), r = H(t, e, n), l = _(t, e, r, n), d = I(t, e, l), u = k(), c = z("designer-host-service"), s = z("design-item-context"), o = xe(s, c), i = Ne(u, s, o);
|
|
1119
|
+
L(() => {
|
|
1120
|
+
u.value.componentInstance = i, t.readonly = !0;
|
|
1112
1121
|
}), e.expose(i.value);
|
|
1113
|
-
const a =
|
|
1114
|
-
return () =>
|
|
1115
|
-
ref:
|
|
1122
|
+
const a = k();
|
|
1123
|
+
return () => V("div", {
|
|
1124
|
+
ref: u,
|
|
1116
1125
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner test"
|
|
1117
|
-
}, [
|
|
1126
|
+
}, [V("input", {
|
|
1118
1127
|
ref: a,
|
|
1119
1128
|
class: "form-control",
|
|
1120
1129
|
readonly: !0,
|
|
1121
1130
|
placeholder: t.placeholder
|
|
1122
|
-
}, null),
|
|
1131
|
+
}, null), d()]);
|
|
1123
1132
|
}
|
|
1124
|
-
}),
|
|
1133
|
+
}), Pe = (t) => {
|
|
1125
1134
|
const e = t;
|
|
1126
1135
|
return e.install = function(n) {
|
|
1127
1136
|
n.component(e.name, t);
|
|
1128
1137
|
}, t;
|
|
1129
1138
|
};
|
|
1130
|
-
|
|
1131
|
-
t["number-spinner"] =
|
|
1139
|
+
A.register = (t, e, n, r) => {
|
|
1140
|
+
t["number-spinner"] = A, e["number-spinner"] = Y;
|
|
1132
1141
|
};
|
|
1133
|
-
|
|
1134
|
-
t["number-spinner"] =
|
|
1142
|
+
A.registerDesigner = (t, e, n) => {
|
|
1143
|
+
t["number-spinner"] = De, e["number-spinner"] = Y;
|
|
1135
1144
|
};
|
|
1136
|
-
const
|
|
1145
|
+
const $e = Pe(A);
|
|
1137
1146
|
export {
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1147
|
+
A as FNumberSpinner,
|
|
1148
|
+
$e as default,
|
|
1149
|
+
q as numberSpinnerProps,
|
|
1141
1150
|
Y as propsResolver,
|
|
1142
1151
|
H as useFormat,
|
|
1143
1152
|
R as useNumber,
|
|
1144
1153
|
_ as useSpinner,
|
|
1145
|
-
|
|
1154
|
+
Se as useTextBox
|
|
1146
1155
|
};
|