@farris/ui-vue 1.3.1 → 1.3.3
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 +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +301 -351
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +407 -396
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +266 -255
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +628 -641
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +379 -374
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +471 -471
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +155 -148
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +487 -478
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +330 -279
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1171 -1277
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +220 -204
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4743 -4641
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2916 -3019
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2375 -2590
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9518 -1198
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +149 -138
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1602 -1740
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +159 -151
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +533 -563
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2356 -2455
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3048 -3308
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10537 -3249
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9781 -1327
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +353 -341
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +510 -827
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +278 -268
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +144 -136
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2139 -2237
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6414 -6367
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5216 -5114
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +486 -984
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +446 -498
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +363 -388
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1050 -1308
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1072 -1082
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +412 -910
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +214 -203
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1361 -1536
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +650 -677
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12344 -5048
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1821 -565
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +251 -244
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +151 -140
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +707 -676
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +719 -740
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4977 -5249
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +145 -134
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +348 -337
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +141 -130
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +311 -301
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +231 -220
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +385 -432
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1932 -1914
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +351 -340
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +209 -199
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +388 -415
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +619 -666
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +493 -486
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3169 -3278
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2320 -2418
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +563 -554
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +287 -276
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +368 -324
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -487
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +51302 -47651
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +6 -6
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +2 -2
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -40
- package/types/designer-canvas/src/types.d.ts +8 -20
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
- /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
- /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
|
@@ -1,64 +1,69 @@
|
|
|
1
1
|
var ee = Object.defineProperty;
|
|
2
2
|
var te = (e, n, t) => n in e ? ee(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
3
|
var v = (e, n, t) => te(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
-
import { computed as
|
|
5
|
-
import { isPlainObject as
|
|
4
|
+
import { computed as B, ref as T, createVNode as E, onMounted as O, nextTick as j, defineComponent as $, watch as A, inject as G } from "vue";
|
|
5
|
+
import { isPlainObject as q, cloneDeep as z } from "lodash-es";
|
|
6
6
|
import N from "bignumber.js";
|
|
7
|
-
import { DgControl as
|
|
7
|
+
import { DgControl as W } from "../designer-canvas/index.esm.js";
|
|
8
|
+
import { withInstall as ne } from "../common/index.esm.js";
|
|
8
9
|
const Z = {}, X = {};
|
|
9
|
-
function
|
|
10
|
-
const { properties: n, title: t, ignore: r } = e, i = r && Array.isArray(r), s = Object.keys(n).reduce((
|
|
11
|
-
|
|
10
|
+
function x(e) {
|
|
11
|
+
const { properties: n, title: t, ignore: r } = e, i = r && Array.isArray(r), s = Object.keys(n).reduce((c, d) => ((!i || !r.find((m) => m === d)) && (c[d] = n[d].type === "object" && n[d].properties ? x(n[d]) : z(n[d].default)), c), {});
|
|
12
|
+
if (t && (!i || !r.find((c) => c === "id"))) {
|
|
13
|
+
const c = t.toLowerCase().replace(/-/g, "_");
|
|
14
|
+
s.id = `${c}_${Math.random().toString().slice(2, 6)}`;
|
|
15
|
+
}
|
|
16
|
+
return s;
|
|
12
17
|
}
|
|
13
|
-
function
|
|
18
|
+
function Q(e, n = {}, t) {
|
|
14
19
|
const r = Z[e];
|
|
15
20
|
if (r) {
|
|
16
|
-
let i =
|
|
21
|
+
let i = x(r);
|
|
17
22
|
const s = X[e];
|
|
18
|
-
return i = s ? s({ getSchemaByType:
|
|
23
|
+
return i = s ? s({ getSchemaByType: Q }, i, n, t) : i, i;
|
|
19
24
|
}
|
|
20
25
|
return null;
|
|
21
26
|
}
|
|
22
|
-
function ne(e, n) {
|
|
23
|
-
const t = O(n);
|
|
24
|
-
return Object.keys(e).reduce((r, i) => (r[i] && G(r[i]) && G(e[i]) ? Object.assign(r[i], e[i]) : r[i] = e[i], r), t), t;
|
|
25
|
-
}
|
|
26
27
|
function oe(e, n) {
|
|
28
|
+
const t = x(n);
|
|
29
|
+
return Object.keys(t).reduce((r, i) => (r[i] && q(r[i]) && q(e[i] || !e[i]) ? Object.assign(r[i], e[i] || {}) : r[i] = e[i], r), t), t;
|
|
30
|
+
}
|
|
31
|
+
function re(e, n) {
|
|
27
32
|
return Object.keys(e).filter((r) => e[r] != null).reduce((r, i) => {
|
|
28
33
|
if (n.has(i)) {
|
|
29
34
|
const s = n.get(i);
|
|
30
35
|
if (typeof s == "string")
|
|
31
36
|
r[s] = e[i];
|
|
32
37
|
else {
|
|
33
|
-
const
|
|
34
|
-
Object.assign(r,
|
|
38
|
+
const c = s(i, e[i], e);
|
|
39
|
+
Object.assign(r, c);
|
|
35
40
|
}
|
|
36
41
|
} else
|
|
37
42
|
r[i] = e[i];
|
|
38
43
|
return r;
|
|
39
44
|
}, {});
|
|
40
45
|
}
|
|
41
|
-
function
|
|
42
|
-
const r =
|
|
43
|
-
return
|
|
46
|
+
function ie(e, n, t = /* @__PURE__ */ new Map()) {
|
|
47
|
+
const r = oe(e, n);
|
|
48
|
+
return re(r, t);
|
|
44
49
|
}
|
|
45
|
-
function
|
|
46
|
-
function n(a, l, o,
|
|
50
|
+
function ae(e = {}) {
|
|
51
|
+
function n(a, l, o, u) {
|
|
47
52
|
if (typeof o == "number")
|
|
48
|
-
return
|
|
53
|
+
return u[a].length === o;
|
|
49
54
|
if (typeof o == "object") {
|
|
50
|
-
const f = Object.keys(o)[0],
|
|
55
|
+
const f = Object.keys(o)[0], p = o[f];
|
|
51
56
|
if (f === "not")
|
|
52
|
-
return Number(
|
|
57
|
+
return Number(u[a].length) !== Number(p);
|
|
53
58
|
if (f === "moreThan")
|
|
54
|
-
return Number(
|
|
59
|
+
return Number(u[a].length) >= Number(p);
|
|
55
60
|
if (f === "lessThan")
|
|
56
|
-
return Number(
|
|
61
|
+
return Number(u[a].length) <= Number(p);
|
|
57
62
|
}
|
|
58
63
|
return !1;
|
|
59
64
|
}
|
|
60
|
-
function t(a, l, o,
|
|
61
|
-
return
|
|
65
|
+
function t(a, l, o, u) {
|
|
66
|
+
return u[a] && u[a].propertyValue && String(u[a].propertyValue.value) === String(o);
|
|
62
67
|
}
|
|
63
68
|
const r = /* @__PURE__ */ new Map([
|
|
64
69
|
["length", n],
|
|
@@ -67,34 +72,34 @@ function ie(e = {}) {
|
|
|
67
72
|
Object.keys(e).reduce((a, l) => (a.set(l, e[l]), a), r);
|
|
68
73
|
function i(a, l) {
|
|
69
74
|
const o = a;
|
|
70
|
-
return typeof l == "number" ? [{ target: o, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: o, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((
|
|
71
|
-
if (
|
|
72
|
-
return { target: o, operator: "length", param: null, value: l[
|
|
73
|
-
const f =
|
|
74
|
-
return { target: o, operator: "getProperty", param: f, value:
|
|
75
|
+
return typeof l == "number" ? [{ target: o, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: o, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((u) => {
|
|
76
|
+
if (u === "length")
|
|
77
|
+
return { target: o, operator: "length", param: null, value: l[u] };
|
|
78
|
+
const f = u, p = l[u];
|
|
79
|
+
return { target: o, operator: "getProperty", param: f, value: p };
|
|
75
80
|
}) : [];
|
|
76
81
|
}
|
|
77
82
|
function s(a) {
|
|
78
|
-
return Object.keys(a).reduce((o,
|
|
79
|
-
const f = i(
|
|
83
|
+
return Object.keys(a).reduce((o, u) => {
|
|
84
|
+
const f = i(u, a[u]);
|
|
80
85
|
return o.push(...f), o;
|
|
81
86
|
}, []);
|
|
82
87
|
}
|
|
83
|
-
function
|
|
88
|
+
function c(a, l) {
|
|
84
89
|
if (r.has(a.operator)) {
|
|
85
90
|
const o = r.get(a.operator);
|
|
86
91
|
return o && o(a.target, a.param, a.value, l) || !1;
|
|
87
92
|
}
|
|
88
93
|
return !1;
|
|
89
94
|
}
|
|
90
|
-
function p(a, l) {
|
|
91
|
-
return s(a).reduce((f, m) => f && u(m, l), !0);
|
|
92
|
-
}
|
|
93
95
|
function d(a, l) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
return s(a).reduce((f, p) => f && c(p, l), !0);
|
|
97
|
+
}
|
|
98
|
+
function m(a, l) {
|
|
99
|
+
const o = Object.keys(a), u = o.includes("allOf"), f = o.includes("anyOf"), p = u || f, S = (p ? a[p ? u ? "allOf" : "anyOf" : "allOf"] : [a]).map((V) => d(V, l));
|
|
100
|
+
return u ? !S.includes(!1) : S.includes(!0);
|
|
96
101
|
}
|
|
97
|
-
return { parseValueSchema:
|
|
102
|
+
return { parseValueSchema: m };
|
|
98
103
|
}
|
|
99
104
|
const y = {
|
|
100
105
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
@@ -134,21 +139,22 @@ const y = {
|
|
|
134
139
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
135
140
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
136
141
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
137
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
143
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
144
|
+
}, le = {}, se = {};
|
|
145
|
+
ae();
|
|
146
|
+
function ce(e, n, t = /* @__PURE__ */ new Map(), r = (c, d, m, a) => d, i = {}, s = (c) => c) {
|
|
147
|
+
return Z[n.title] = n, X[n.title] = r, le[n.title] = i, se[n.title] = s, (c = {}) => {
|
|
148
|
+
const d = ie(c, n, t), m = Object.keys(e).reduce((a, l) => (a[l] = e[l].default, a), {});
|
|
149
|
+
return Object.assign(m, d);
|
|
144
150
|
};
|
|
145
151
|
}
|
|
146
|
-
function
|
|
152
|
+
function ue(e, n) {
|
|
147
153
|
return { customClass: n.class, customStyle: n.style };
|
|
148
154
|
}
|
|
149
|
-
const
|
|
150
|
-
["appearance",
|
|
151
|
-
]),
|
|
155
|
+
const pe = /* @__PURE__ */ new Map([
|
|
156
|
+
["appearance", ue]
|
|
157
|
+
]), de = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-design.gitee.io/number-spinner.schema.json", fe = "number-spinner", ye = "A Farris Input Component", ge = "object", he = {
|
|
152
158
|
id: {
|
|
153
159
|
description: "The unique identifier for a number spinner",
|
|
154
160
|
type: "string"
|
|
@@ -181,20 +187,6 @@ const ue = /* @__PURE__ */ new Map([
|
|
|
181
187
|
type: "boolean",
|
|
182
188
|
default: !0
|
|
183
189
|
},
|
|
184
|
-
enableLinkLabel: {
|
|
185
|
-
description: "",
|
|
186
|
-
type: "boolean",
|
|
187
|
-
default: !1
|
|
188
|
-
},
|
|
189
|
-
label: {
|
|
190
|
-
description: "",
|
|
191
|
-
type: "string",
|
|
192
|
-
default: ""
|
|
193
|
-
},
|
|
194
|
-
lableWidth: {
|
|
195
|
-
description: "",
|
|
196
|
-
type: "number"
|
|
197
|
-
},
|
|
198
190
|
placeholder: {
|
|
199
191
|
description: "",
|
|
200
192
|
type: "string",
|
|
@@ -215,6 +207,20 @@ const ue = /* @__PURE__ */ new Map([
|
|
|
215
207
|
type: "boolean",
|
|
216
208
|
default: !1
|
|
217
209
|
},
|
|
210
|
+
precision: {
|
|
211
|
+
description: "",
|
|
212
|
+
type: "number",
|
|
213
|
+
default: 0
|
|
214
|
+
},
|
|
215
|
+
min: {
|
|
216
|
+
description: "",
|
|
217
|
+
type: "number"
|
|
218
|
+
},
|
|
219
|
+
step: {
|
|
220
|
+
description: "",
|
|
221
|
+
type: "number",
|
|
222
|
+
default: 1
|
|
223
|
+
},
|
|
218
224
|
tabindex: {
|
|
219
225
|
description: "",
|
|
220
226
|
type: "number",
|
|
@@ -249,24 +255,25 @@ const ue = /* @__PURE__ */ new Map([
|
|
|
249
255
|
type: "sting",
|
|
250
256
|
default: ""
|
|
251
257
|
}
|
|
252
|
-
},
|
|
258
|
+
}, be = [
|
|
253
259
|
"id",
|
|
254
260
|
"type"
|
|
255
|
-
],
|
|
261
|
+
], ve = [
|
|
256
262
|
"id",
|
|
257
263
|
"appearance",
|
|
258
|
-
"binding"
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
$
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
264
|
+
"binding",
|
|
265
|
+
"visible"
|
|
266
|
+
], Ce = {
|
|
267
|
+
$schema: de,
|
|
268
|
+
$id: me,
|
|
269
|
+
title: fe,
|
|
270
|
+
description: ye,
|
|
271
|
+
type: ge,
|
|
272
|
+
properties: he,
|
|
273
|
+
required: be,
|
|
274
|
+
ignore: ve
|
|
268
275
|
};
|
|
269
|
-
function
|
|
276
|
+
function Se(e, n, t) {
|
|
270
277
|
return n;
|
|
271
278
|
}
|
|
272
279
|
const U = {
|
|
@@ -373,84 +380,84 @@ const U = {
|
|
|
373
380
|
* 作为内嵌编辑器被创建后默认选中文本
|
|
374
381
|
*/
|
|
375
382
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
376
|
-
},
|
|
377
|
-
function
|
|
378
|
-
const { format: i } = t, { displayValue: s, getRealValue:
|
|
383
|
+
}, H = ce(U, Ce, pe, Se);
|
|
384
|
+
function J(e, n, t, r) {
|
|
385
|
+
const { format: i } = t, { displayValue: s, getRealValue: c, modelValue: d, onNumberValueChanged: m } = r;
|
|
379
386
|
function a() {
|
|
380
|
-
const b = new N(
|
|
387
|
+
const b = new N(d.value || 0);
|
|
381
388
|
return !(e.max && !new N(e.max).isNaN() && b.gte(new N(e.max)));
|
|
382
389
|
}
|
|
383
390
|
function l() {
|
|
384
|
-
const b = new N(
|
|
391
|
+
const b = new N(d.value || 0);
|
|
385
392
|
return !(e.min && !new N(e.min).isNaN() && b.lte(new N(e.min)));
|
|
386
393
|
}
|
|
387
394
|
function o(b) {
|
|
388
395
|
if (e.readonly || e.disabled)
|
|
389
396
|
return;
|
|
390
|
-
const
|
|
391
|
-
if (
|
|
392
|
-
const C = new N(
|
|
393
|
-
s.value = i(h),
|
|
397
|
+
const S = b === "up" ? a : l, w = b === "up" ? "plus" : "minus";
|
|
398
|
+
if (S()) {
|
|
399
|
+
const C = new N(d.value || 0)[w](Number(e.step)), h = C.toFixed();
|
|
400
|
+
s.value = i(h), m(c(C));
|
|
394
401
|
}
|
|
395
402
|
}
|
|
396
|
-
function
|
|
403
|
+
function u() {
|
|
397
404
|
o("up");
|
|
398
405
|
}
|
|
399
406
|
function f() {
|
|
400
407
|
o("down");
|
|
401
408
|
}
|
|
402
|
-
function
|
|
403
|
-
|
|
409
|
+
function p(b) {
|
|
410
|
+
u(), b.stopPropagation();
|
|
404
411
|
}
|
|
405
412
|
function g(b) {
|
|
406
413
|
f(), b.stopPropagation();
|
|
407
414
|
}
|
|
408
|
-
return { canDownward: l, canUpward: a, downward: f, onClickDownButton: g, onClickUpButton:
|
|
415
|
+
return { canDownward: l, canUpward: a, downward: f, onClickDownButton: g, onClickUpButton: p, upward: u };
|
|
409
416
|
}
|
|
410
|
-
function
|
|
411
|
-
const r =
|
|
417
|
+
function Y(e, n, t) {
|
|
418
|
+
const r = B(() => ({
|
|
412
419
|
prefix: e.prefix,
|
|
413
420
|
suffix: e.suffix,
|
|
414
421
|
decimalSeparator: e.decimalSeparator,
|
|
415
422
|
groupSeparator: e.useThousands ? e.groupSeparator : "",
|
|
416
423
|
groupSize: e.groupSize
|
|
417
424
|
})), { getValidNumberObject: i, precision: s } = t;
|
|
418
|
-
function
|
|
425
|
+
function c(a) {
|
|
419
426
|
return a = a == null || a === "" ? "" : String(a), a = a.replace(new RegExp(e.prefix, "g"), "").replace(new RegExp(e.suffix, "g"), "").replace(/,/g, ""), e.groupSeparator && e.groupSeparator !== "," && (a = a.replace(new RegExp(`\\${e.groupSeparator}`, "g"), "")), e.decimalSeparator && e.decimalSeparator !== "." && (a = a.replace(new RegExp(`\\${e.decimalSeparator}`, "g"), ".")), a;
|
|
420
427
|
}
|
|
421
|
-
function
|
|
428
|
+
function d(a, l) {
|
|
422
429
|
return e.precision !== null && e.precision !== void 0 ? a.toFormat(s.value, l) : a.toFormat(l);
|
|
423
430
|
}
|
|
424
|
-
function
|
|
425
|
-
const l =
|
|
426
|
-
return
|
|
431
|
+
function m(a) {
|
|
432
|
+
const l = c(a), o = new N(l, 10), u = i(o);
|
|
433
|
+
return u.valueOf() === "0" && !e.showZero || u.isNaN() ? "" : e.formatter ? e.formatter(u.toNumber()) : d(u, r.value);
|
|
427
434
|
}
|
|
428
|
-
return { cleanFormat:
|
|
435
|
+
return { cleanFormat: c, format: m };
|
|
429
436
|
}
|
|
430
437
|
function _(e, n) {
|
|
431
|
-
const t =
|
|
438
|
+
const t = T(""), r = T(e.modelValue), i = B(() => Number(e.precision) || 0);
|
|
432
439
|
function s(l) {
|
|
433
440
|
return l.toFixed(i.value);
|
|
434
441
|
}
|
|
435
|
-
function
|
|
442
|
+
function c(l) {
|
|
436
443
|
return isNaN(l) || l === null || l === void 0 || l === "";
|
|
437
444
|
}
|
|
438
|
-
function p(l) {
|
|
439
|
-
const o = u(e.max) ? null : new N(String(e.max), 10), c = u(e.min) ? null : new N(String(e.min), 10);
|
|
440
|
-
return o && l.gt(o) ? o : c && l.lt(c) ? c : l;
|
|
441
|
-
}
|
|
442
445
|
function d(l) {
|
|
446
|
+
const o = c(e.max) ? null : new N(String(e.max), 10), u = c(e.min) ? null : new N(String(e.min), 10);
|
|
447
|
+
return o && l.gt(o) ? o : u && l.lt(u) ? u : l;
|
|
448
|
+
}
|
|
449
|
+
function m(l) {
|
|
443
450
|
if (e.parser)
|
|
444
451
|
return isNaN(Number(l)) ? e.parser(l) : l;
|
|
445
|
-
let o =
|
|
452
|
+
let o = d(new N(l, 10));
|
|
446
453
|
if (o.isNaN()) {
|
|
447
454
|
if (e.canNull)
|
|
448
455
|
return null;
|
|
449
|
-
const f = new N("" + e.min, 10),
|
|
456
|
+
const f = new N("" + e.min, 10), p = new N("" + e.max, 10);
|
|
450
457
|
if (!f.isNaN())
|
|
451
458
|
o = f;
|
|
452
|
-
else if (!
|
|
453
|
-
o =
|
|
459
|
+
else if (!p.isNaN())
|
|
460
|
+
o = p;
|
|
454
461
|
else
|
|
455
462
|
return 0;
|
|
456
463
|
}
|
|
@@ -460,69 +467,69 @@ function _(e, n) {
|
|
|
460
467
|
const o = Number(l);
|
|
461
468
|
r.value = o, n.emit("update:modelValue", o), n.emit("valueChange", o), n.emit("change", o);
|
|
462
469
|
}
|
|
463
|
-
return { displayValue: t, getRealValue:
|
|
470
|
+
return { displayValue: t, getRealValue: m, modelValue: r, isEmpty: c, onNumberValueChanged: a, precision: i, getValidNumberObject: d };
|
|
464
471
|
}
|
|
465
472
|
function we(e, n, t, r, i) {
|
|
466
|
-
const { cleanFormat: s, format:
|
|
473
|
+
const { cleanFormat: s, format: c } = t, { displayValue: d, getRealValue: m, modelValue: a, isEmpty: l, onNumberValueChanged: o } = r, { downward: u, upward: f } = i, p = T(!1), g = B(() => d.value);
|
|
467
474
|
function b(C) {
|
|
468
475
|
var M;
|
|
469
|
-
if (C.stopPropagation(),
|
|
476
|
+
if (C.stopPropagation(), p.value = !1, e.readonly || e.disabled)
|
|
470
477
|
return;
|
|
471
478
|
let h = (M = C.target) == null ? void 0 : M.value;
|
|
472
479
|
e.canNull || (h = h || 0);
|
|
473
480
|
const k = s(h);
|
|
474
|
-
|
|
475
|
-
}
|
|
476
|
-
function w(C) {
|
|
477
|
-
C.stopPropagation(), m.value = !0, !(e.readonly || e.disabled) && (p.value = l(a.value) || !e.showZero && a.value === "0" ? "" : String(a.value), n.emit("focus", { event: C, formatted: p.value, value: a.value }));
|
|
481
|
+
d.value = c(k), o(m(k)), n.emit("blur", { event: C, formatted: d.value, value: a.value });
|
|
478
482
|
}
|
|
479
483
|
function S(C) {
|
|
484
|
+
C.stopPropagation(), p.value = !0, !(e.readonly || e.disabled) && (d.value = l(a.value) || !e.showZero && a.value === "0" ? "" : String(a.value), n.emit("focus", { event: C, formatted: d.value, value: a.value }));
|
|
485
|
+
}
|
|
486
|
+
function w(C) {
|
|
480
487
|
var M;
|
|
481
488
|
C.stopPropagation();
|
|
482
489
|
let h = (M = C.target) == null ? void 0 : M.value;
|
|
483
490
|
e.canNull || (h = h || 0);
|
|
484
491
|
const k = s(h);
|
|
485
|
-
|
|
492
|
+
d.value = k, o(m(k));
|
|
486
493
|
}
|
|
487
|
-
function
|
|
488
|
-
C.key === "ArrowDown" && (C.preventDefault(),
|
|
494
|
+
function V(C) {
|
|
495
|
+
C.key === "ArrowDown" && (C.preventDefault(), u()), C.key === "ArrowUp" && (C.preventDefault(), f()), C.stopPropagation();
|
|
489
496
|
}
|
|
490
|
-
return { textBoxValue: g, onBlurTextBox: b, onFocusTextBox:
|
|
497
|
+
return { textBoxValue: g, onBlurTextBox: b, onFocusTextBox: S, onInput: w, onKeyDown: V, isFocus: p };
|
|
491
498
|
}
|
|
492
|
-
function
|
|
499
|
+
function R(e, n, t) {
|
|
493
500
|
const {
|
|
494
501
|
canDownward: r,
|
|
495
502
|
canUpward: i,
|
|
496
503
|
onClickDownButton: s,
|
|
497
|
-
onClickUpButton:
|
|
498
|
-
} = t,
|
|
504
|
+
onClickUpButton: c
|
|
505
|
+
} = t, d = B(() => ({
|
|
499
506
|
"input-group-append": !0,
|
|
500
507
|
"btn-group": !0,
|
|
501
508
|
"btn-group-number": !0
|
|
502
|
-
})),
|
|
509
|
+
})), m = B(() => ({
|
|
503
510
|
btn: !0,
|
|
504
511
|
"btn-secondary": !0,
|
|
505
512
|
"btn-number-flag": !0
|
|
506
|
-
})), a =
|
|
513
|
+
})), a = B(() => ({
|
|
507
514
|
cursor: i() ? "pointer" : "not-allowed",
|
|
508
515
|
"margin-left": 0
|
|
509
|
-
})), l =
|
|
516
|
+
})), l = B(() => ({
|
|
510
517
|
cursor: r() ? "pointer" : "not-allowed",
|
|
511
518
|
"margin-left": 0
|
|
512
519
|
}));
|
|
513
520
|
return () => E("div", {
|
|
514
|
-
class:
|
|
521
|
+
class: d.value
|
|
515
522
|
}, [E("button", {
|
|
516
523
|
title: "upButton",
|
|
517
|
-
class:
|
|
524
|
+
class: m.value,
|
|
518
525
|
style: a.value,
|
|
519
|
-
onClick:
|
|
526
|
+
onClick: c,
|
|
520
527
|
disabled: !i()
|
|
521
528
|
}, [E("span", {
|
|
522
529
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
523
530
|
}, null)]), E("button", {
|
|
524
531
|
title: "downButton",
|
|
525
|
-
class:
|
|
532
|
+
class: m.value,
|
|
526
533
|
style: l.value,
|
|
527
534
|
onClick: s,
|
|
528
535
|
disabled: !r()
|
|
@@ -530,156 +537,161 @@ function K(e, n, t) {
|
|
|
530
537
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
531
538
|
}, null)])]);
|
|
532
539
|
}
|
|
533
|
-
function
|
|
534
|
-
const r =
|
|
540
|
+
function ke(e, n, t) {
|
|
541
|
+
const r = T(), {
|
|
535
542
|
onBlurTextBox: i,
|
|
536
543
|
onFocusTextBox: s,
|
|
537
|
-
onInput:
|
|
538
|
-
onKeyDown:
|
|
539
|
-
textBoxValue:
|
|
540
|
-
} = t, a =
|
|
544
|
+
onInput: c,
|
|
545
|
+
onKeyDown: d,
|
|
546
|
+
textBoxValue: m
|
|
547
|
+
} = t, a = B(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), l = B(() => ({
|
|
541
548
|
"form-control": !0,
|
|
542
549
|
"f-utils-fill": !0
|
|
543
|
-
})), o =
|
|
550
|
+
})), o = B(() => ({
|
|
544
551
|
"text-align": e.textAlign
|
|
545
552
|
}));
|
|
546
|
-
function
|
|
553
|
+
function u(g) {
|
|
547
554
|
g.stopPropagation();
|
|
548
555
|
}
|
|
549
556
|
function f() {
|
|
550
557
|
e.selectOnCreated, e.focusOnCreated;
|
|
551
558
|
}
|
|
552
|
-
async function
|
|
559
|
+
async function p(g) {
|
|
553
560
|
s(g), await j, f();
|
|
554
561
|
}
|
|
555
|
-
return
|
|
562
|
+
return O(async () => {
|
|
556
563
|
await j, f();
|
|
557
564
|
}), () => E("input", {
|
|
558
565
|
ref: r,
|
|
559
566
|
class: l.value,
|
|
560
567
|
style: o.value,
|
|
561
568
|
type: "text",
|
|
562
|
-
value:
|
|
569
|
+
value: m.value,
|
|
563
570
|
disabled: e.disabled,
|
|
564
571
|
readonly: e.readonly || !e.editable,
|
|
565
572
|
placeholder: a.value,
|
|
566
573
|
onBlur: i,
|
|
567
|
-
onChange:
|
|
568
|
-
onFocus:
|
|
569
|
-
onInput:
|
|
570
|
-
onKeydown:
|
|
574
|
+
onChange: u,
|
|
575
|
+
onFocus: p,
|
|
576
|
+
onInput: c,
|
|
577
|
+
onKeydown: d
|
|
571
578
|
}, null);
|
|
572
579
|
}
|
|
573
|
-
const
|
|
580
|
+
const D = /* @__PURE__ */ $({
|
|
574
581
|
name: "FNumberSpinner",
|
|
575
582
|
props: U,
|
|
576
583
|
emits: ["update:modelValue", "valueChange", "change", "blur", "focus", "click", "input"],
|
|
577
584
|
setup(e, n) {
|
|
578
|
-
const t = _(e, n), r =
|
|
579
|
-
displayValue:
|
|
580
|
-
modelValue:
|
|
585
|
+
const t = _(e, n), r = Y(e, n, t), i = J(e, n, r, t), s = we(e, n, r, t, i), c = R(e, n, i), {
|
|
586
|
+
displayValue: d,
|
|
587
|
+
modelValue: m,
|
|
581
588
|
getRealValue: a
|
|
582
|
-
} = t, l =
|
|
589
|
+
} = t, l = ke(e, n, s), {
|
|
583
590
|
format: o
|
|
584
591
|
} = r, {
|
|
585
|
-
isFocus:
|
|
586
|
-
} = s, f =
|
|
587
|
-
return
|
|
588
|
-
const
|
|
589
|
-
|
|
590
|
-
}),
|
|
591
|
-
const g = a(
|
|
592
|
-
|
|
593
|
-
}),
|
|
594
|
-
|
|
595
|
-
}),
|
|
596
|
-
|
|
592
|
+
isFocus: u
|
|
593
|
+
} = s, f = B(() => !e.disabled && !e.readonly && e.showButton);
|
|
594
|
+
return O(() => {
|
|
595
|
+
const p = a(e.modelValue);
|
|
596
|
+
d.value = o(p);
|
|
597
|
+
}), A(() => [e.value], ([p]) => {
|
|
598
|
+
const g = a(p);
|
|
599
|
+
m.value = g, d.value = o(g);
|
|
600
|
+
}), A(() => [e.modelValue], ([p]) => {
|
|
601
|
+
p !== m.value && (m.value = p, !u.value && (d.value = o(a(p))));
|
|
602
|
+
}), A(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
603
|
+
d.value = o(m.value);
|
|
597
604
|
}), () => E("div", {
|
|
598
605
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
599
|
-
}, [l(), f.value &&
|
|
606
|
+
}, [l(), f.value && c()]);
|
|
600
607
|
}
|
|
601
608
|
});
|
|
602
|
-
function
|
|
609
|
+
function Me(e, n, t) {
|
|
603
610
|
var C;
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
}
|
|
607
|
-
r();
|
|
608
|
-
const i = t && t.getStyles && t.getStyles() || "", s = t && t.getDesignerClass && t.getDesignerClass() || "", u = B();
|
|
609
|
-
function p() {
|
|
611
|
+
const r = t && t.getStyles && t.getStyles() || "", i = t && t.getDesignerClass && t.getDesignerClass() || "", s = T();
|
|
612
|
+
function c() {
|
|
610
613
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
611
614
|
}
|
|
612
615
|
function d() {
|
|
613
616
|
return !1;
|
|
614
617
|
}
|
|
615
|
-
function
|
|
618
|
+
function m() {
|
|
616
619
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
617
620
|
}
|
|
618
|
-
function
|
|
621
|
+
function a() {
|
|
619
622
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
620
623
|
}
|
|
621
|
-
function
|
|
624
|
+
function l(h) {
|
|
622
625
|
if (!h || !h.value)
|
|
623
626
|
return null;
|
|
624
627
|
if (h.value.schema && h.value.schema.type === "component")
|
|
625
628
|
return h.value;
|
|
626
|
-
const k =
|
|
629
|
+
const k = T(h == null ? void 0 : h.value.parent), M = l(k);
|
|
627
630
|
return M || null;
|
|
628
631
|
}
|
|
629
|
-
function
|
|
632
|
+
function o(h = n) {
|
|
630
633
|
const { componentInstance: k, designerItemElementRef: M } = h;
|
|
631
|
-
return !k || !k.value ? null : k.value.canMove ? M :
|
|
634
|
+
return !k || !k.value ? null : k.value.canMove ? M : o(h.parent);
|
|
632
635
|
}
|
|
633
|
-
function
|
|
636
|
+
function u(h) {
|
|
634
637
|
return !!t && t.canAccepts(h);
|
|
635
638
|
}
|
|
636
|
-
function
|
|
639
|
+
function f() {
|
|
637
640
|
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
638
641
|
}
|
|
639
|
-
function
|
|
642
|
+
function p() {
|
|
640
643
|
}
|
|
641
|
-
function
|
|
644
|
+
function g(h, k) {
|
|
642
645
|
k && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(k);
|
|
643
646
|
}
|
|
644
|
-
function
|
|
647
|
+
function b(h, k) {
|
|
645
648
|
const { componentType: M } = h;
|
|
646
|
-
let
|
|
647
|
-
t && t.onResolveNewComponentSchema && (
|
|
648
|
-
const
|
|
649
|
-
return
|
|
649
|
+
let F = Q(M, h, k);
|
|
650
|
+
t && t.onResolveNewComponentSchema && (F = t.onResolveNewComponentSchema(h, F));
|
|
651
|
+
const L = M.toLowerCase().replace(/-/g, "_");
|
|
652
|
+
return F && !F.id && F.type === M && (F.id = `${L}_${Math.random().toString().slice(2, 6)}`), F;
|
|
650
653
|
}
|
|
651
654
|
function S(h) {
|
|
652
655
|
}
|
|
653
|
-
function
|
|
656
|
+
function w(...h) {
|
|
654
657
|
if (t && t.getPropsConfig)
|
|
655
658
|
return t.getPropsConfig(...h);
|
|
656
659
|
}
|
|
657
|
-
|
|
658
|
-
|
|
660
|
+
function V() {
|
|
661
|
+
t && t.onRemoveComponent && t.onRemoveComponent(), n != null && n.schema.contents && n.schema.contents.map((h) => {
|
|
662
|
+
var F;
|
|
663
|
+
let k = h.id;
|
|
664
|
+
h.type === "component-ref" && (k = h.component);
|
|
665
|
+
const M = e.value.querySelector(`#${k}-design-item`);
|
|
666
|
+
(F = M == null ? void 0 : M.componentInstance) != null && F.value.onRemoveComponent && M.componentInstance.value.onRemoveComponent();
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
return s.value = {
|
|
670
|
+
canMove: c(),
|
|
659
671
|
canSelectParent: d(),
|
|
660
|
-
canDelete:
|
|
661
|
-
canNested: !
|
|
672
|
+
canDelete: m(),
|
|
673
|
+
canNested: !a(),
|
|
662
674
|
contents: n == null ? void 0 : n.schema.contents,
|
|
663
675
|
elementRef: e,
|
|
664
676
|
parent: (C = n == null ? void 0 : n.parent) == null ? void 0 : C.componentInstance,
|
|
665
677
|
schema: n == null ? void 0 : n.schema,
|
|
666
|
-
styles:
|
|
667
|
-
designerClass:
|
|
668
|
-
canAccepts:
|
|
669
|
-
getBelongedComponentInstance:
|
|
670
|
-
getDraggableDesignItemElement:
|
|
671
|
-
getDraggingDisplayText:
|
|
672
|
-
getPropConfig:
|
|
673
|
-
getDragScopeElement:
|
|
674
|
-
onAcceptMovedChildElement:
|
|
678
|
+
styles: r,
|
|
679
|
+
designerClass: i,
|
|
680
|
+
canAccepts: u,
|
|
681
|
+
getBelongedComponentInstance: l,
|
|
682
|
+
getDraggableDesignItemElement: o,
|
|
683
|
+
getDraggingDisplayText: f,
|
|
684
|
+
getPropConfig: w,
|
|
685
|
+
getDragScopeElement: p,
|
|
686
|
+
onAcceptMovedChildElement: g,
|
|
675
687
|
onChildElementMovedOut: S,
|
|
676
|
-
addNewChildComponentSchema:
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
},
|
|
688
|
+
addNewChildComponentSchema: b,
|
|
689
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || T(!1),
|
|
690
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || T(!1),
|
|
691
|
+
onRemoveComponent: V
|
|
692
|
+
}, s;
|
|
681
693
|
}
|
|
682
|
-
class
|
|
694
|
+
class Ne {
|
|
683
695
|
constructor(n, t) {
|
|
684
696
|
v(this, "componentId");
|
|
685
697
|
v(this, "viewModelId");
|
|
@@ -704,13 +716,14 @@ class Me {
|
|
|
704
716
|
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
705
717
|
}
|
|
706
718
|
setDesignViewModelField(n) {
|
|
719
|
+
var r;
|
|
707
720
|
const t = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
708
721
|
if (t) {
|
|
709
722
|
if (!this.designViewModelField) {
|
|
710
|
-
const
|
|
711
|
-
this.designViewModelField =
|
|
723
|
+
const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
724
|
+
this.designViewModelField = i.fields.find((s) => s.id === t);
|
|
712
725
|
}
|
|
713
|
-
n.updateOn = this.designViewModelField.updateOn;
|
|
726
|
+
n.updateOn = (r = this.designViewModelField) == null ? void 0 : r.updateOn;
|
|
714
727
|
}
|
|
715
728
|
}
|
|
716
729
|
changeFieldEditorType(n, t) {
|
|
@@ -770,16 +783,16 @@ class Me {
|
|
|
770
783
|
const r = t && t.parent && t.parent.schema;
|
|
771
784
|
if (!r)
|
|
772
785
|
return;
|
|
773
|
-
const i = r.contents.findIndex((
|
|
786
|
+
const i = r.contents.findIndex((c) => c.id === n), s = z(r.contents[i]);
|
|
774
787
|
r.contents.splice(i, 1), r.contents.splice(i, 0, s);
|
|
775
788
|
}
|
|
776
789
|
}
|
|
777
|
-
const
|
|
790
|
+
const P = class P {
|
|
778
791
|
/**
|
|
779
792
|
* 根据绑定字段类型获取可用的输入类控件
|
|
780
793
|
*/
|
|
781
794
|
static getEditorTypesByMDataType(n) {
|
|
782
|
-
const t =
|
|
795
|
+
const t = P.fieldControlTypeMapping[n];
|
|
783
796
|
return t || [{ key: "", value: "" }];
|
|
784
797
|
}
|
|
785
798
|
/**
|
|
@@ -787,8 +800,8 @@ const D = class D {
|
|
|
787
800
|
*/
|
|
788
801
|
static getAllInputTypes() {
|
|
789
802
|
const n = [];
|
|
790
|
-
for (
|
|
791
|
-
|
|
803
|
+
for (const t in P.fieldControlTypeMapping)
|
|
804
|
+
P.fieldControlTypeMapping[t].forEach((r) => {
|
|
792
805
|
n.find((i) => i.key === r.key && i.value === r.value) || n.push({ key: r.key, value: r.value });
|
|
793
806
|
});
|
|
794
807
|
return n;
|
|
@@ -797,7 +810,7 @@ const D = class D {
|
|
|
797
810
|
/**
|
|
798
811
|
* <字段类型,可配置的控件类型列表>的映射
|
|
799
812
|
*/
|
|
800
|
-
v(
|
|
813
|
+
v(P, "fieldControlTypeMapping", {
|
|
801
814
|
String: [
|
|
802
815
|
{ key: y["input-group"].type, value: y["input-group"].name },
|
|
803
816
|
{ key: y.lookup.type, value: y.lookup.name },
|
|
@@ -844,8 +857,8 @@ v(D, "fieldControlTypeMapping", {
|
|
|
844
857
|
{ key: y["radio-group"].type, value: y["radio-group"].name }
|
|
845
858
|
]
|
|
846
859
|
});
|
|
847
|
-
let I =
|
|
848
|
-
const
|
|
860
|
+
let I = P;
|
|
861
|
+
const Fe = T(0);
|
|
849
862
|
class Be {
|
|
850
863
|
constructor() {
|
|
851
864
|
/** 控件标题 */
|
|
@@ -876,47 +889,47 @@ class Be {
|
|
|
876
889
|
v(this, "fieldSetId", "");
|
|
877
890
|
}
|
|
878
891
|
}
|
|
879
|
-
function
|
|
892
|
+
function Te(e) {
|
|
880
893
|
let n, t;
|
|
881
894
|
const r = /* @__PURE__ */ new Map();
|
|
882
895
|
let i = [];
|
|
883
896
|
function s(l, o) {
|
|
884
|
-
const f = l.split(" ").filter((
|
|
897
|
+
const f = l.split(" ").filter((w) => w.startsWith("col-"));
|
|
885
898
|
if (f.length === 0) {
|
|
886
899
|
o.isSupportedClass = !1;
|
|
887
900
|
return;
|
|
888
901
|
}
|
|
889
|
-
let
|
|
890
|
-
|
|
902
|
+
let p = f.find((w) => /^col-([1-9]|10|11|12)$/.test(w)), g = f.find((w) => /^col-md-([1-9]|10|11|12)$/.test(w)), b = f.find((w) => /^col-xl-([1-9]|10|11|12)$/.test(w)), S = f.find((w) => /^col-el-([1-9]|10|11|12)$/.test(w));
|
|
903
|
+
p = p || "col-12", o.columnInSM = parseInt(p.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), g = g || "col-md-" + o.columnInSM, o.columnInMD = parseInt(g.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), b = b || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(b.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), S = S || "col-el-" + o.columnInLG, o.columnInEL = parseInt(S.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
891
904
|
}
|
|
892
|
-
function
|
|
893
|
-
let
|
|
905
|
+
function c(l, o, u, f = !1) {
|
|
906
|
+
let p = !1;
|
|
894
907
|
l.contents.forEach((g) => {
|
|
895
908
|
if (g.type === "fieldset") {
|
|
896
|
-
|
|
909
|
+
u += 1, c(g, o, u, !0), p = !0;
|
|
897
910
|
return;
|
|
898
911
|
}
|
|
899
|
-
|
|
900
|
-
const b = g.appearance && g.appearance.class,
|
|
901
|
-
b ? s(b,
|
|
912
|
+
p && (u += 1, p = !1);
|
|
913
|
+
const b = g.appearance && g.appearance.class, S = new Be();
|
|
914
|
+
b ? s(b, S) : S.isSupportedClass = !1, S.label = g.label || g.id, S.id = g.id, S.group = u, f && (S.fieldSetId = l.id), t === g.id && (n = u), r.set(g.id, g), o.push(S);
|
|
902
915
|
});
|
|
903
916
|
}
|
|
904
|
-
function
|
|
917
|
+
function d(l) {
|
|
905
918
|
const o = e.getComponentById(l);
|
|
906
919
|
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
907
920
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
908
|
-
const
|
|
909
|
-
return !
|
|
921
|
+
const u = e.selectNode(o, (f) => f.type === W["response-form"].type);
|
|
922
|
+
return !u || !u.contents || u.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: u };
|
|
910
923
|
}
|
|
911
|
-
function
|
|
924
|
+
function m(l, o) {
|
|
912
925
|
o = o || l.id;
|
|
913
|
-
const { result:
|
|
914
|
-
if (!
|
|
915
|
-
return { result:
|
|
926
|
+
const { result: u, message: f, formNode: p } = d(o);
|
|
927
|
+
if (!u)
|
|
928
|
+
return { result: u, message: f };
|
|
916
929
|
t = l.id, i = [], r.clear();
|
|
917
|
-
const g =
|
|
918
|
-
|
|
919
|
-
const b = i.find((
|
|
930
|
+
const g = p.contents[0].type === W.fieldset.type ? 0 : 1;
|
|
931
|
+
c(p, i, g);
|
|
932
|
+
const b = i.find((w) => !w.isSupportedClass);
|
|
920
933
|
return {
|
|
921
934
|
defaultState: {
|
|
922
935
|
defaultGroupNumber: n || 1,
|
|
@@ -927,46 +940,44 @@ function Fe(e) {
|
|
|
927
940
|
}
|
|
928
941
|
function a(l, o) {
|
|
929
942
|
o = o;
|
|
930
|
-
const { result:
|
|
931
|
-
if (!
|
|
943
|
+
const { result: u, formNode: f } = d(o);
|
|
944
|
+
if (!u)
|
|
932
945
|
return "";
|
|
933
|
-
const
|
|
946
|
+
const p = [];
|
|
934
947
|
return l.forEach((g) => {
|
|
935
|
-
var
|
|
936
|
-
const b = r.get(g.id),
|
|
937
|
-
if (
|
|
938
|
-
const C =
|
|
939
|
-
b.appearance.class =
|
|
948
|
+
var w;
|
|
949
|
+
const b = r.get(g.id), S = b.appearance && b.appearance.class;
|
|
950
|
+
if (S) {
|
|
951
|
+
const C = S.split(" ").filter((K) => !K.startsWith("col-")), h = "col-" + g.columnInSM, k = "col-md-" + g.columnInMD, M = "col-xl-" + g.columnInLG, F = "col-el-" + g.columnInEL, L = [h, k, M, F].concat(C);
|
|
952
|
+
b.appearance.class = L.join(" ");
|
|
940
953
|
}
|
|
941
954
|
if (g.fieldSetId) {
|
|
942
|
-
const
|
|
943
|
-
C ? (
|
|
955
|
+
const V = f.contents.find((h) => h.id === g.fieldSetId), C = p.find((h) => h.id === g.fieldSetId);
|
|
956
|
+
C ? (w = C.contents) == null || w.push(b) : (p.push(V), V.contents = [b]);
|
|
944
957
|
} else
|
|
945
|
-
|
|
946
|
-
}), f.contents =
|
|
958
|
+
p.push(b);
|
|
959
|
+
}), f.contents = p, f.id;
|
|
947
960
|
}
|
|
948
961
|
return {
|
|
949
|
-
checkCanFindFormNode:
|
|
950
|
-
checkCanOpenLayoutEditor:
|
|
962
|
+
checkCanFindFormNode: d,
|
|
963
|
+
checkCanOpenLayoutEditor: m,
|
|
951
964
|
changeFormControlsByResponseLayoutConfig: a,
|
|
952
|
-
getResonseFormLayoutConfig:
|
|
965
|
+
getResonseFormLayoutConfig: c
|
|
953
966
|
};
|
|
954
967
|
}
|
|
955
|
-
class
|
|
968
|
+
class Ve extends Ne {
|
|
956
969
|
constructor(t, r) {
|
|
957
970
|
super(t, r);
|
|
958
971
|
v(this, "responseLayoutEditorFunction");
|
|
959
|
-
this.responseLayoutEditorFunction =
|
|
972
|
+
this.responseLayoutEditorFunction = Te(this.formSchemaUtils);
|
|
960
973
|
}
|
|
961
974
|
getPropertyConfig(t, r) {
|
|
962
975
|
return this.propertyConfig.categories.basic = this.getBasicProperties(t, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t, r), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
|
|
963
976
|
}
|
|
964
977
|
getBasicProperties(t, r) {
|
|
965
|
-
var
|
|
966
|
-
|
|
967
|
-
this.setDesignViewModelField(t)
|
|
968
|
-
const s = this.formSchemaUtils.getFormMetadataBasicInfo(), u = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
969
|
-
return {
|
|
978
|
+
var s;
|
|
979
|
+
const i = this;
|
|
980
|
+
return this.setDesignViewModelField(t), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
970
981
|
description: "Basic Information",
|
|
971
982
|
title: "基本信息",
|
|
972
983
|
properties: {
|
|
@@ -987,7 +998,7 @@ class Te extends Me {
|
|
|
987
998
|
textField: "value",
|
|
988
999
|
valueField: "key",
|
|
989
1000
|
editable: !1,
|
|
990
|
-
data: i.designViewModelField ? I.getEditorTypesByMDataType((
|
|
1001
|
+
data: i.designViewModelField ? I.getEditorTypesByMDataType((s = i.designViewModelField.type) == null ? void 0 : s.name) : I.getAllInputTypes()
|
|
991
1002
|
}
|
|
992
1003
|
},
|
|
993
1004
|
label: {
|
|
@@ -998,33 +1009,29 @@ class Te extends Me {
|
|
|
998
1009
|
binding: {
|
|
999
1010
|
description: "绑定的表单字段",
|
|
1000
1011
|
title: "绑定",
|
|
1001
|
-
$converter: "/converter/field-selector.converter",
|
|
1002
1012
|
editor: {
|
|
1003
|
-
type: "
|
|
1013
|
+
type: "binding-selector",
|
|
1004
1014
|
bindingType: { enable: !1 },
|
|
1005
1015
|
editorParams: {
|
|
1006
|
-
|
|
1007
|
-
|
|
1016
|
+
componentSchema: t,
|
|
1017
|
+
needSyncToViewModel: !0,
|
|
1018
|
+
viewModelId: this.viewModelId,
|
|
1019
|
+
designerHostService: this.designerHostService,
|
|
1020
|
+
disableOccupiedFields: !0
|
|
1008
1021
|
},
|
|
1009
|
-
|
|
1010
|
-
{ field: "name", title: "字段名称" },
|
|
1011
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
1012
|
-
{ field: "fieldType", title: "字段类型" }
|
|
1013
|
-
],
|
|
1014
|
-
textField: "bindingField",
|
|
1015
|
-
data: u
|
|
1022
|
+
textField: "bindingField"
|
|
1016
1023
|
}
|
|
1017
1024
|
}
|
|
1018
1025
|
},
|
|
1019
|
-
setPropertyRelates(
|
|
1020
|
-
if (
|
|
1021
|
-
switch (
|
|
1026
|
+
setPropertyRelates(c, d) {
|
|
1027
|
+
if (c)
|
|
1028
|
+
switch (c && c.propertyID) {
|
|
1022
1029
|
case "type": {
|
|
1023
|
-
i.changeControlType(t,
|
|
1030
|
+
i.changeControlType(t, c, r);
|
|
1024
1031
|
break;
|
|
1025
1032
|
}
|
|
1026
1033
|
case "label": {
|
|
1027
|
-
|
|
1034
|
+
c.needRefreshControlTree = !0;
|
|
1028
1035
|
break;
|
|
1029
1036
|
}
|
|
1030
1037
|
}
|
|
@@ -1032,7 +1039,7 @@ class Te extends Me {
|
|
|
1032
1039
|
};
|
|
1033
1040
|
}
|
|
1034
1041
|
getAppearanceProperties(t, r) {
|
|
1035
|
-
|
|
1042
|
+
const i = this;
|
|
1036
1043
|
return {
|
|
1037
1044
|
title: "样式",
|
|
1038
1045
|
description: "Appearance",
|
|
@@ -1062,7 +1069,7 @@ class Te extends Me {
|
|
|
1062
1069
|
}
|
|
1063
1070
|
}
|
|
1064
1071
|
},
|
|
1065
|
-
setPropertyRelates(s,
|
|
1072
|
+
setPropertyRelates(s, c) {
|
|
1066
1073
|
if (s)
|
|
1067
1074
|
switch (s && s.propertyID) {
|
|
1068
1075
|
case "responseLayout":
|
|
@@ -1084,11 +1091,11 @@ class Te extends Me {
|
|
|
1084
1091
|
* @param newControlType 新控件类型
|
|
1085
1092
|
*/
|
|
1086
1093
|
changeControlType(t, r, i) {
|
|
1087
|
-
var l, o,
|
|
1088
|
-
const s = r.propertyValue,
|
|
1089
|
-
if (!
|
|
1094
|
+
var l, o, u, f;
|
|
1095
|
+
const s = r.propertyValue, c = i && i.parent && i.parent.schema;
|
|
1096
|
+
if (!c)
|
|
1090
1097
|
return;
|
|
1091
|
-
const
|
|
1098
|
+
const d = c.contents.findIndex((p) => p.id === t.id), m = c.contents[d];
|
|
1092
1099
|
let a;
|
|
1093
1100
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1094
1101
|
editor: {
|
|
@@ -1098,21 +1105,21 @@ class Te extends Me {
|
|
|
1098
1105
|
require: this.designViewModelField.require,
|
|
1099
1106
|
readonly: this.designViewModelField.readonly
|
|
1100
1107
|
}, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(a, {
|
|
1101
|
-
id:
|
|
1102
|
-
appearance:
|
|
1103
|
-
size:
|
|
1104
|
-
label:
|
|
1105
|
-
binding:
|
|
1106
|
-
visible:
|
|
1108
|
+
id: m.id,
|
|
1109
|
+
appearance: m.appearance,
|
|
1110
|
+
size: m.size,
|
|
1111
|
+
label: m.label,
|
|
1112
|
+
binding: m.binding,
|
|
1113
|
+
visible: m.visible
|
|
1107
1114
|
}), Object.assign(a.editor, {
|
|
1108
|
-
isTextArea: a.isTextArea &&
|
|
1109
|
-
placeholder: (l =
|
|
1110
|
-
holdPlace: (o =
|
|
1111
|
-
readonly: (
|
|
1112
|
-
require: (f =
|
|
1113
|
-
}),
|
|
1114
|
-
(
|
|
1115
|
-
),
|
|
1115
|
+
isTextArea: a.isTextArea && m.isTextArea,
|
|
1116
|
+
placeholder: (l = m.editor) == null ? void 0 : l.placeholder,
|
|
1117
|
+
holdPlace: (o = m.editor) == null ? void 0 : o.holdPlace,
|
|
1118
|
+
readonly: (u = m.editor) == null ? void 0 : u.readonly,
|
|
1119
|
+
require: (f = m.editor) == null ? void 0 : f.require
|
|
1120
|
+
}), c.contents.splice(d, 1), c.contents.splice(d, 0, a), i.schema = Object.assign(m, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1121
|
+
(p) => p.classList.remove("dgComponentSelected")
|
|
1122
|
+
), Fe.value++;
|
|
1116
1123
|
}
|
|
1117
1124
|
getComponentConfig(t, r = {}, i = {}) {
|
|
1118
1125
|
const s = Object.assign({
|
|
@@ -1120,7 +1127,7 @@ class Te extends Me {
|
|
|
1120
1127
|
title: "编辑器",
|
|
1121
1128
|
type: "input-group",
|
|
1122
1129
|
$converter: "/converter/property-editor.converter"
|
|
1123
|
-
}, r),
|
|
1130
|
+
}, r), c = Object.assign({
|
|
1124
1131
|
readonly: {
|
|
1125
1132
|
description: "",
|
|
1126
1133
|
title: "只读",
|
|
@@ -1142,7 +1149,7 @@ class Te extends Me {
|
|
|
1142
1149
|
type: "string"
|
|
1143
1150
|
}
|
|
1144
1151
|
}, i);
|
|
1145
|
-
return { ...s, properties: { ...
|
|
1152
|
+
return { ...s, properties: { ...c } };
|
|
1146
1153
|
}
|
|
1147
1154
|
/**
|
|
1148
1155
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -1152,13 +1159,13 @@ class Te extends Me {
|
|
|
1152
1159
|
*/
|
|
1153
1160
|
updateUnifiedLayoutAfterControlChanged(t, r, i) {
|
|
1154
1161
|
const s = t.split(" ");
|
|
1155
|
-
let
|
|
1156
|
-
|
|
1162
|
+
let c = s.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), d = s.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), m = s.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), a = s.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
1163
|
+
c = c || "col-12", d = d || "col-md-" + c.replace("col-", ""), m = m || "col-xl-" + d.replace("col-md-", ""), a = a || "col-el-" + m.replace("col-xl-", "");
|
|
1157
1164
|
const l = {
|
|
1158
1165
|
id: r,
|
|
1159
|
-
columnInSM: parseInt(
|
|
1160
|
-
columnInMD: parseInt(
|
|
1161
|
-
columnInLG: parseInt(
|
|
1166
|
+
columnInSM: parseInt(c.replace("col-", ""), 10),
|
|
1167
|
+
columnInMD: parseInt(d.replace("col-md-", ""), 10),
|
|
1168
|
+
columnInLG: parseInt(m.replace("col-xl-", ""), 10),
|
|
1162
1169
|
columnInEL: parseInt(a.replace("col-el-", ""), 10)
|
|
1163
1170
|
};
|
|
1164
1171
|
this.updateUnifiedLayoutAfterResponseLayoutChanged(i, l);
|
|
@@ -1174,14 +1181,14 @@ class Te extends Me {
|
|
|
1174
1181
|
return;
|
|
1175
1182
|
const s = [];
|
|
1176
1183
|
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, s, 1), r) {
|
|
1177
|
-
const
|
|
1178
|
-
Object.assign(
|
|
1184
|
+
const p = s.find((g) => g.id === r.id);
|
|
1185
|
+
Object.assign(p || {}, r);
|
|
1179
1186
|
}
|
|
1180
|
-
const
|
|
1187
|
+
const c = s.map((p) => p.columnInSM), d = s.map((p) => p.columnInMD), m = s.map((p) => p.columnInLG), a = s.map((p) => p.columnInEL), l = this.checkIsUniqueColumn(c) ? c[0] : null, o = this.checkIsUniqueColumn(d) ? d[0] : null, u = this.checkIsUniqueColumn(m) ? m[0] : null, f = this.checkIsUniqueColumn(a) ? a[0] : null;
|
|
1181
1188
|
Object.assign(i.unifiedLayout, {
|
|
1182
1189
|
uniqueColClassInSM: l,
|
|
1183
1190
|
uniqueColClassInMD: o,
|
|
1184
|
-
uniqueColClassInLG:
|
|
1191
|
+
uniqueColClassInLG: u,
|
|
1185
1192
|
uniqueColClassInEL: f
|
|
1186
1193
|
});
|
|
1187
1194
|
}
|
|
@@ -1193,12 +1200,38 @@ class Te extends Me {
|
|
|
1193
1200
|
return Array.from(r).length === 1;
|
|
1194
1201
|
}
|
|
1195
1202
|
}
|
|
1196
|
-
class
|
|
1203
|
+
class Ee extends Ve {
|
|
1197
1204
|
constructor(n, t) {
|
|
1198
1205
|
super(n, t);
|
|
1199
1206
|
}
|
|
1200
1207
|
getEditorProperties(n) {
|
|
1201
1208
|
return this.getComponentConfig(n, { type: "number-spinner" }, {
|
|
1209
|
+
precision: {
|
|
1210
|
+
description: "",
|
|
1211
|
+
title: "精度",
|
|
1212
|
+
type: "number"
|
|
1213
|
+
},
|
|
1214
|
+
step: {
|
|
1215
|
+
description: "",
|
|
1216
|
+
title: "步长",
|
|
1217
|
+
type: "number"
|
|
1218
|
+
},
|
|
1219
|
+
max: {
|
|
1220
|
+
description: "",
|
|
1221
|
+
title: "最大值",
|
|
1222
|
+
type: "number",
|
|
1223
|
+
editor: {
|
|
1224
|
+
canNull: !0
|
|
1225
|
+
}
|
|
1226
|
+
},
|
|
1227
|
+
min: {
|
|
1228
|
+
description: "",
|
|
1229
|
+
title: "最小值",
|
|
1230
|
+
type: "number",
|
|
1231
|
+
editor: {
|
|
1232
|
+
canNull: !0
|
|
1233
|
+
}
|
|
1234
|
+
},
|
|
1202
1235
|
textAlign: {
|
|
1203
1236
|
description: "",
|
|
1204
1237
|
title: "对齐方式",
|
|
@@ -1214,7 +1247,7 @@ class Ve extends Te {
|
|
|
1214
1247
|
},
|
|
1215
1248
|
{
|
|
1216
1249
|
value: "center",
|
|
1217
|
-
name: "
|
|
1250
|
+
name: "居中"
|
|
1218
1251
|
},
|
|
1219
1252
|
{
|
|
1220
1253
|
value: "right",
|
|
@@ -1226,78 +1259,25 @@ class Ve extends Te {
|
|
|
1226
1259
|
});
|
|
1227
1260
|
}
|
|
1228
1261
|
}
|
|
1229
|
-
function
|
|
1230
|
-
e.schema;
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
return !1;
|
|
1234
|
-
}
|
|
1235
|
-
function s() {
|
|
1236
|
-
return !1;
|
|
1237
|
-
}
|
|
1238
|
-
function u() {
|
|
1239
|
-
return !1;
|
|
1240
|
-
}
|
|
1241
|
-
function p() {
|
|
1242
|
-
return !0;
|
|
1243
|
-
}
|
|
1244
|
-
function d(o) {
|
|
1262
|
+
function Pe(e, n) {
|
|
1263
|
+
const t = e.schema;
|
|
1264
|
+
function r(i, s) {
|
|
1265
|
+
return new Ee(i, n).getPropertyConfig(t, s);
|
|
1245
1266
|
}
|
|
1246
|
-
|
|
1247
|
-
}
|
|
1248
|
-
function l(o) {
|
|
1249
|
-
return null;
|
|
1250
|
-
}
|
|
1251
|
-
return {
|
|
1252
|
-
canAccepts: i,
|
|
1253
|
-
checkCanDeleteComponent: s,
|
|
1254
|
-
checkCanMoveComponent: u,
|
|
1255
|
-
hideNestedPaddingInDesginerView: p,
|
|
1256
|
-
onAcceptMovedChildElement: d,
|
|
1257
|
-
resolveComponentContext: a,
|
|
1258
|
-
triggerBelongedComponentToMoveWhenMoved: t,
|
|
1259
|
-
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
1260
|
-
getPropsConfig: l
|
|
1261
|
-
};
|
|
1267
|
+
return { getPropsConfig: r };
|
|
1262
1268
|
}
|
|
1263
|
-
|
|
1264
|
-
const {
|
|
1265
|
-
canAccepts: t,
|
|
1266
|
-
checkCanDeleteComponent: r,
|
|
1267
|
-
checkCanMoveComponent: i,
|
|
1268
|
-
hideNestedPaddingInDesginerView: s,
|
|
1269
|
-
onAcceptMovedChildElement: u,
|
|
1270
|
-
resolveComponentContext: p,
|
|
1271
|
-
triggerBelongedComponentToMoveWhenMoved: d,
|
|
1272
|
-
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
1273
|
-
} = Ee(e), l = e.schema;
|
|
1274
|
-
function o(c, f) {
|
|
1275
|
-
return new Ve(c, n).getPropertyConfig(l, f);
|
|
1276
|
-
}
|
|
1277
|
-
return {
|
|
1278
|
-
canAccepts: t,
|
|
1279
|
-
checkCanDeleteComponent: r,
|
|
1280
|
-
checkCanMoveComponent: i,
|
|
1281
|
-
hideNestedPaddingInDesginerView: s,
|
|
1282
|
-
onAcceptMovedChildElement: u,
|
|
1283
|
-
resolveComponentContext: p,
|
|
1284
|
-
triggerBelongedComponentToMoveWhenMoved: d,
|
|
1285
|
-
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
1286
|
-
getPropsConfig: o
|
|
1287
|
-
};
|
|
1288
|
-
}
|
|
1289
|
-
const Pe = /* @__PURE__ */ q({
|
|
1269
|
+
const De = /* @__PURE__ */ $({
|
|
1290
1270
|
name: "FNumberSpinnerDesign",
|
|
1291
1271
|
props: U,
|
|
1292
1272
|
emits: ["update:modelValue", "valueChange", "change", "blur", "focus", "click", "input"],
|
|
1293
1273
|
setup(e, n) {
|
|
1294
|
-
const t = _(e, n), r =
|
|
1295
|
-
|
|
1296
|
-
|
|
1274
|
+
const t = _(e, n), r = Y(e, n, t), i = J(e, n, r, t), s = R(e, n, i), c = T(), d = G("designer-host-service"), m = G("design-item-context"), a = Pe(m, d), l = Me(c, m, a);
|
|
1275
|
+
O(() => {
|
|
1276
|
+
c.value.componentInstance = l, e.readonly = !0;
|
|
1297
1277
|
}), n.expose(l.value);
|
|
1298
|
-
const o =
|
|
1278
|
+
const o = T();
|
|
1299
1279
|
return () => E("div", {
|
|
1300
|
-
ref:
|
|
1280
|
+
ref: c,
|
|
1301
1281
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner test"
|
|
1302
1282
|
}, [E("input", {
|
|
1303
1283
|
ref: o,
|
|
@@ -1306,26 +1286,21 @@ const Pe = /* @__PURE__ */ q({
|
|
|
1306
1286
|
placeholder: e.placeholder
|
|
1307
1287
|
}, null), s()]);
|
|
1308
1288
|
}
|
|
1309
|
-
})
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
t.component(n.name, e);
|
|
1313
|
-
}, e;
|
|
1314
|
-
};
|
|
1315
|
-
P.register = (e, n, t, r) => {
|
|
1316
|
-
e["number-spinner"] = P, n["number-spinner"] = Q;
|
|
1289
|
+
});
|
|
1290
|
+
D.register = (e, n, t, r) => {
|
|
1291
|
+
e["number-spinner"] = D, n["number-spinner"] = H;
|
|
1317
1292
|
};
|
|
1318
|
-
|
|
1319
|
-
e["number-spinner"] =
|
|
1293
|
+
D.registerDesigner = (e, n, t) => {
|
|
1294
|
+
e["number-spinner"] = De, n["number-spinner"] = H;
|
|
1320
1295
|
};
|
|
1321
|
-
const je =
|
|
1296
|
+
const je = ne(D);
|
|
1322
1297
|
export {
|
|
1323
|
-
|
|
1298
|
+
D as FNumberSpinner,
|
|
1324
1299
|
je as default,
|
|
1325
1300
|
U as numberSpinnerProps,
|
|
1326
|
-
|
|
1327
|
-
|
|
1301
|
+
H as propsResolver,
|
|
1302
|
+
Y as useFormat,
|
|
1328
1303
|
_ as useNumber,
|
|
1329
|
-
|
|
1304
|
+
J as useSpinner,
|
|
1330
1305
|
we as useTextBox
|
|
1331
1306
|
};
|