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