@farris/ui-vue 1.2.9 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +64 -64
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +521 -336
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +99 -97
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +496 -504
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +251 -259
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +696 -519
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +368 -376
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1141 -340
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +116 -116
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +986 -798
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +463 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2233 -1057
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6193 -4702
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4562 -3294
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3420 -2623
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +204 -212
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2795 -1835
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +180 -130
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +328 -336
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3349 -3626
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5344 -8588
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +2179 -2227
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +482 -490
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +746 -569
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +409 -385
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3606 -2388
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10871 -8970
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6019 -5631
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +912 -1281
- package/components/nav/index.umd.cjs +3 -3
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +660 -484
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +682 -506
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1848 -1658
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1120 -1923
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +875 -1214
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +229 -237
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2314 -1521
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +867 -868
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +4332 -3623
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +613 -437
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +255 -263
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +144 -152
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1101 -1038
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +935 -1750
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5264 -5677
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +151 -154
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +438 -1125
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +93 -101
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +563 -1202
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +248 -256
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +549 -373
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2436 -3110
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +328 -336
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +339 -347
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +554 -378
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1322 -1144
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +537 -543
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5113 -9426
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3900 -2677
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +568 -570
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +266 -274
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +553 -1052
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +558 -566
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +22009 -22688
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +9 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +11 -5
- package/types/data-grid/src/data-grid.component.d.ts +4 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +19 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- 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/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +2 -3
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/index.d.ts +2 -0
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,96 +1,95 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return (!l || !i.find((u) => u == "id")) && (m.id = `${n}-${Date.now()}`), m;
|
|
1
|
+
var Y = Object.defineProperty;
|
|
2
|
+
var Z = (e, t, n) => t in e ? Y(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var v = (e, t, n) => Z(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as E, ref as C, computed as k, watch as O, createVNode as F, Teleport as _, createApp as K, onUnmounted as ee, inject as T, nextTick as $, onMounted as G, mergeProps as te } from "vue";
|
|
5
|
+
import { isPlainObject as N, cloneDeep as R } from "lodash-es";
|
|
6
|
+
import ne from "../list-view/index.esm.js";
|
|
7
|
+
import oe from "../button-edit/index.esm.js";
|
|
8
|
+
import { resolveAppearance as ie } from "../dynamic-resolver/index.esm.js";
|
|
9
|
+
import { useDesignerComponent as W, DgControl as U } from "../designer-canvas/index.esm.js";
|
|
10
|
+
const le = {}, ae = {};
|
|
11
|
+
function q(e) {
|
|
12
|
+
const { properties: t, title: n, ignore: i } = e, l = i && Array.isArray(i), r = Object.keys(t).reduce((c, d) => ((!l || !i.find((p) => p == d)) && (c[d] = t[d].type === "object" && t[d].properties ? q(t[d]) : R(t[d].default)), c), {});
|
|
13
|
+
return n && (!l || !i.find((c) => c == "id")) && (r.id = `${n}-${Date.now()}`), r;
|
|
15
14
|
}
|
|
16
|
-
function
|
|
17
|
-
const n =
|
|
18
|
-
return Object.keys(e).reduce((i, l) => (i[l] &&
|
|
15
|
+
function re(e, t) {
|
|
16
|
+
const n = q(t);
|
|
17
|
+
return Object.keys(e).reduce((i, l) => (i[l] && N(i[l]) && N(e[l]) ? Object.assign(i[l], e[l]) : i[l] = e[l], i), n), n;
|
|
19
18
|
}
|
|
20
|
-
function
|
|
19
|
+
function se(e, t) {
|
|
21
20
|
return Object.keys(e).filter((i) => e[i] != null).reduce((i, l) => {
|
|
22
21
|
if (t.has(l)) {
|
|
23
|
-
const
|
|
24
|
-
if (typeof
|
|
25
|
-
i[
|
|
22
|
+
const r = t.get(l);
|
|
23
|
+
if (typeof r == "string")
|
|
24
|
+
i[r] = e[l];
|
|
26
25
|
else {
|
|
27
|
-
const
|
|
28
|
-
Object.assign(i,
|
|
26
|
+
const c = r(l, e[l], e);
|
|
27
|
+
Object.assign(i, c);
|
|
29
28
|
}
|
|
30
29
|
} else
|
|
31
30
|
i[l] = e[l];
|
|
32
31
|
return i;
|
|
33
32
|
}, {});
|
|
34
33
|
}
|
|
35
|
-
function
|
|
36
|
-
const i =
|
|
37
|
-
return
|
|
34
|
+
function ue(e, t, n = /* @__PURE__ */ new Map()) {
|
|
35
|
+
const i = re(e, t);
|
|
36
|
+
return se(i, n);
|
|
38
37
|
}
|
|
39
|
-
function
|
|
40
|
-
function t(
|
|
41
|
-
if (typeof
|
|
42
|
-
return
|
|
43
|
-
if (typeof
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
return Number(
|
|
47
|
-
if (
|
|
48
|
-
return Number(
|
|
49
|
-
if (
|
|
50
|
-
return Number(
|
|
38
|
+
function ce(e = {}) {
|
|
39
|
+
function t(s, u, o, a) {
|
|
40
|
+
if (typeof o == "number")
|
|
41
|
+
return a[s].length === o;
|
|
42
|
+
if (typeof o == "object") {
|
|
43
|
+
const f = Object.keys(o)[0], m = o[f];
|
|
44
|
+
if (f === "not")
|
|
45
|
+
return Number(a[s].length) !== Number(m);
|
|
46
|
+
if (f === "moreThan")
|
|
47
|
+
return Number(a[s].length) >= Number(m);
|
|
48
|
+
if (f === "lessThan")
|
|
49
|
+
return Number(a[s].length) <= Number(m);
|
|
51
50
|
}
|
|
52
51
|
return !1;
|
|
53
52
|
}
|
|
54
|
-
function n(
|
|
55
|
-
return
|
|
53
|
+
function n(s, u, o, a) {
|
|
54
|
+
return a[s] && a[s].propertyValue && String(a[s].propertyValue.value) === String(o);
|
|
56
55
|
}
|
|
57
56
|
const i = /* @__PURE__ */ new Map([
|
|
58
57
|
["length", t],
|
|
59
58
|
["getProperty", n]
|
|
60
59
|
]);
|
|
61
|
-
Object.keys(e).reduce((
|
|
62
|
-
function l(
|
|
63
|
-
const
|
|
64
|
-
return typeof
|
|
65
|
-
if (
|
|
66
|
-
return { target:
|
|
67
|
-
const
|
|
68
|
-
return { target:
|
|
60
|
+
Object.keys(e).reduce((s, u) => (s.set(u, e[u]), s), i);
|
|
61
|
+
function l(s, u) {
|
|
62
|
+
const o = s;
|
|
63
|
+
return typeof u == "number" ? [{ target: o, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: o, operator: "getProperty", param: s, value: !!u }] : typeof u == "object" ? Object.keys(u).map((a) => {
|
|
64
|
+
if (a === "length")
|
|
65
|
+
return { target: o, operator: "length", param: null, value: u[a] };
|
|
66
|
+
const f = a, m = u[a];
|
|
67
|
+
return { target: o, operator: "getProperty", param: f, value: m };
|
|
69
68
|
}) : [];
|
|
70
69
|
}
|
|
71
|
-
function
|
|
72
|
-
return Object.keys(
|
|
73
|
-
const
|
|
74
|
-
return
|
|
70
|
+
function r(s) {
|
|
71
|
+
return Object.keys(s).reduce((o, a) => {
|
|
72
|
+
const f = l(a, s[a]);
|
|
73
|
+
return o.push(...f), o;
|
|
75
74
|
}, []);
|
|
76
75
|
}
|
|
77
|
-
function
|
|
78
|
-
if (i.has(
|
|
79
|
-
const
|
|
80
|
-
return
|
|
76
|
+
function c(s, u) {
|
|
77
|
+
if (i.has(s.operator)) {
|
|
78
|
+
const o = i.get(s.operator);
|
|
79
|
+
return o && o(s.target, s.param, s.value, u) || !1;
|
|
81
80
|
}
|
|
82
81
|
return !1;
|
|
83
82
|
}
|
|
84
|
-
function
|
|
85
|
-
return
|
|
83
|
+
function d(s, u) {
|
|
84
|
+
return r(s).reduce((f, m) => f && c(m, u), !0);
|
|
86
85
|
}
|
|
87
|
-
function
|
|
88
|
-
const
|
|
89
|
-
return
|
|
86
|
+
function p(s, u) {
|
|
87
|
+
const o = Object.keys(s), a = o.includes("allOf"), f = o.includes("anyOf"), m = a || f, h = (m ? s[m ? a ? "allOf" : "anyOf" : "allOf"] : [s]).map((B) => d(B, u));
|
|
88
|
+
return a ? !h.includes(!1) : h.includes(!0);
|
|
90
89
|
}
|
|
91
|
-
return { parseValueSchema:
|
|
90
|
+
return { parseValueSchema: p };
|
|
92
91
|
}
|
|
93
|
-
const
|
|
92
|
+
const g = {
|
|
94
93
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
95
94
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
96
95
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -127,21 +126,22 @@ const s = {
|
|
|
127
126
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
128
127
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
129
128
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
130
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
130
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
131
|
+
}, de = {}, pe = {};
|
|
132
|
+
ce();
|
|
133
|
+
function H(e, t, n = /* @__PURE__ */ new Map(), i = (c, d, p) => d, l = {}, r = (c) => c) {
|
|
134
|
+
return le[t.title] = t, ae[t.title] = i, de[t.title] = l, pe[t.title] = r, (c = {}) => {
|
|
135
|
+
const d = ue(c, t, n), p = Object.keys(e).reduce((s, u) => (s[u] = e[u].default, s), {});
|
|
136
|
+
return Object.assign(p, d);
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function fe(e, t) {
|
|
140
140
|
return { customClass: t.class, customStyle: t.style };
|
|
141
141
|
}
|
|
142
|
-
const
|
|
143
|
-
["appearance",
|
|
144
|
-
]),
|
|
142
|
+
const me = /* @__PURE__ */ new Map([
|
|
143
|
+
["appearance", fe]
|
|
144
|
+
]), ye = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-design.gitee.io/combo-list.schema.json", he = "combo-list", be = "A Farris Input Component", Ce = "object", ve = {
|
|
145
145
|
id: {
|
|
146
146
|
description: "The unique identifier for a combo list",
|
|
147
147
|
type: "string"
|
|
@@ -257,28 +257,28 @@ const ae = /* @__PURE__ */ new Map([
|
|
|
257
257
|
type: "sting",
|
|
258
258
|
default: ""
|
|
259
259
|
}
|
|
260
|
-
},
|
|
260
|
+
}, Se = [
|
|
261
261
|
"id",
|
|
262
262
|
"type"
|
|
263
|
-
],
|
|
263
|
+
], Ie = [
|
|
264
264
|
"id",
|
|
265
265
|
"appearance",
|
|
266
266
|
"binding"
|
|
267
|
-
],
|
|
268
|
-
$schema:
|
|
269
|
-
$id:
|
|
270
|
-
title:
|
|
271
|
-
description:
|
|
272
|
-
type:
|
|
273
|
-
properties:
|
|
274
|
-
required:
|
|
275
|
-
ignore:
|
|
267
|
+
], Fe = {
|
|
268
|
+
$schema: ye,
|
|
269
|
+
$id: ge,
|
|
270
|
+
title: he,
|
|
271
|
+
description: be,
|
|
272
|
+
type: Ce,
|
|
273
|
+
properties: ve,
|
|
274
|
+
required: Se,
|
|
275
|
+
ignore: Ie
|
|
276
276
|
};
|
|
277
|
-
function
|
|
277
|
+
function ke(e, t, n) {
|
|
278
278
|
return t;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
const
|
|
280
|
+
var Be = /* @__PURE__ */ ((e) => (e.Text = "text", e.Tag = "tag", e))(Be || {}), we = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.auto = "auto", e))(we || {});
|
|
281
|
+
const j = {
|
|
282
282
|
/**
|
|
283
283
|
* 组件标识
|
|
284
284
|
*/
|
|
@@ -444,7 +444,7 @@ const D = {
|
|
|
444
444
|
},
|
|
445
445
|
// 搜索启用高亮
|
|
446
446
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
447
|
-
},
|
|
447
|
+
}, z = H(j, Fe, me, ke), Me = {
|
|
448
448
|
dataSource: { type: Array, default: [] },
|
|
449
449
|
enableSearch: { type: Boolean, default: !1 },
|
|
450
450
|
idField: { type: String, default: "id" },
|
|
@@ -464,158 +464,156 @@ const D = {
|
|
|
464
464
|
default: !1
|
|
465
465
|
},
|
|
466
466
|
// 搜索启用高亮
|
|
467
|
-
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
468
|
-
|
|
469
|
-
showCheckbox: { type: Boolean, default: !1 }
|
|
470
|
-
}, ve = /* @__PURE__ */ P({
|
|
467
|
+
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
468
|
+
}, xe = /* @__PURE__ */ E({
|
|
471
469
|
name: "FComboListContainer",
|
|
472
|
-
props:
|
|
470
|
+
props: Me,
|
|
473
471
|
emits: ["selectionChange"],
|
|
474
472
|
setup(e, t) {
|
|
475
|
-
const n =
|
|
473
|
+
const n = C(), i = C(e.dataSource), l = C([]), r = C(e.separator), c = C(e.width), d = C(e.maxHeight), p = C(String(e.selectedValues).split(r.value)), s = k(() => e.multiSelect), u = k(() => ({
|
|
476
474
|
enableSelectRow: !0,
|
|
477
475
|
multiSelect: e.multiSelect,
|
|
478
476
|
multiSelectMode: "OnCheckAndClick",
|
|
479
|
-
showCheckbox:
|
|
477
|
+
showCheckbox: s.value,
|
|
480
478
|
showSelectAll: !1,
|
|
481
479
|
showSelection: !0
|
|
482
480
|
}));
|
|
483
|
-
|
|
481
|
+
O(e.dataSource, () => {
|
|
484
482
|
i.value = e.dataSource;
|
|
485
483
|
});
|
|
486
|
-
const
|
|
487
|
-
const
|
|
488
|
-
return
|
|
484
|
+
const o = k(() => e.enableSearch ? "SearchBar" : "ContentHeader"), a = k(() => {
|
|
485
|
+
const y = {};
|
|
486
|
+
return c.value !== void 0 && (y.width = `${c.value}px`), d.value !== void 0 && d.value > 0 && (y.maxHeight = `${d.value}px`), y;
|
|
489
487
|
});
|
|
490
|
-
function
|
|
491
|
-
l.value =
|
|
488
|
+
function f(y) {
|
|
489
|
+
l.value = y.map((b) => Object.assign({}, b)), p.value = y.map((b) => b[e.idField]), t.emit("selectionChange", l.value);
|
|
492
490
|
}
|
|
493
|
-
function y
|
|
491
|
+
function m(y) {
|
|
494
492
|
if (e.enableHighlightSearch)
|
|
495
493
|
return;
|
|
496
494
|
let b = [];
|
|
497
|
-
typeof e.searchOption == "function" ? b = i.value.filter((
|
|
495
|
+
typeof e.searchOption == "function" ? b = i.value.filter((h) => e.searchOption(y, h)) : b = i.value.filter((h) => h[e.valueField].indexOf(y) > -1 || h[e.textField].indexOf(y) > -1), n.value.updateDataSource(b);
|
|
498
496
|
}
|
|
499
|
-
return
|
|
500
|
-
|
|
501
|
-
}), () =>
|
|
497
|
+
return O([() => e.selectedValues], ([y]) => {
|
|
498
|
+
p.value = y.split(r.value);
|
|
499
|
+
}), () => F("div", {
|
|
502
500
|
class: "f-combo-list-container pl-1",
|
|
503
|
-
style:
|
|
504
|
-
}, [
|
|
501
|
+
style: a.value
|
|
502
|
+
}, [F(ne, {
|
|
505
503
|
ref: n,
|
|
506
504
|
size: "small",
|
|
507
505
|
itemClass: "f-combo-list-item",
|
|
508
|
-
header:
|
|
506
|
+
header: o.value,
|
|
509
507
|
headerClass: "f-combo-list-search-box",
|
|
510
508
|
data: i.value,
|
|
511
509
|
idField: e.idField,
|
|
512
510
|
textField: e.textField,
|
|
513
511
|
titleField: e.titleField,
|
|
514
512
|
multiSelect: e.multiSelect,
|
|
515
|
-
selection:
|
|
513
|
+
selection: u.value,
|
|
516
514
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
517
|
-
selectionValues:
|
|
518
|
-
onSelectionChange:
|
|
519
|
-
onAfterSearch:
|
|
515
|
+
selectionValues: p.value,
|
|
516
|
+
onSelectionChange: f,
|
|
517
|
+
onAfterSearch: m
|
|
520
518
|
}, null)]);
|
|
521
519
|
}
|
|
522
520
|
});
|
|
523
|
-
function
|
|
524
|
-
const t =
|
|
525
|
-
function
|
|
526
|
-
const
|
|
527
|
-
return i.value.filter((b) =>
|
|
528
|
-
const
|
|
529
|
-
return
|
|
521
|
+
function Oe(e) {
|
|
522
|
+
const t = C(""), n = C(e.modelValue), i = C(e.data || []), l = C(e.editable);
|
|
523
|
+
function r(o) {
|
|
524
|
+
const a = String(o).split(e.separator), f = a.map((b) => [b, !0]), m = new Map(f);
|
|
525
|
+
return i.value.filter((b) => m.has(String(b[e.valueField]))).sort((b, h) => {
|
|
526
|
+
const S = a.indexOf(b[e.valueField]), B = a.indexOf(h[e.valueField]);
|
|
527
|
+
return S - B;
|
|
530
528
|
});
|
|
531
529
|
}
|
|
532
|
-
function
|
|
533
|
-
const
|
|
534
|
-
t.value = l.value ?
|
|
530
|
+
function c(o) {
|
|
531
|
+
const a = r(o).map((f) => f[e.textField]).join(e.separator);
|
|
532
|
+
t.value = l.value ? a || o : a;
|
|
535
533
|
}
|
|
536
|
-
function
|
|
537
|
-
const
|
|
538
|
-
return i.value.filter((
|
|
534
|
+
function d(o) {
|
|
535
|
+
const a = o.split(e.separator).map((m) => [m, !0]), f = new Map(a);
|
|
536
|
+
return i.value.filter((m) => f.has(m[e.textField]));
|
|
539
537
|
}
|
|
540
|
-
function
|
|
541
|
-
const
|
|
542
|
-
return
|
|
538
|
+
function p(o) {
|
|
539
|
+
const a = {};
|
|
540
|
+
return a[e.idField] = o, a[e.textField] = o, [a];
|
|
543
541
|
}
|
|
544
|
-
function
|
|
545
|
-
let
|
|
546
|
-
const
|
|
547
|
-
return l.value && !
|
|
542
|
+
function s(o) {
|
|
543
|
+
let a = d(o);
|
|
544
|
+
const f = a && a.length > 0;
|
|
545
|
+
return l.value && !f && (a = p(o)), a;
|
|
548
546
|
}
|
|
549
|
-
function
|
|
550
|
-
const { url:
|
|
547
|
+
function u() {
|
|
548
|
+
const { url: o, method: a = "GET", headers: f = {}, body: m = null } = e.remote, y = a.toLowerCase() == "get" ? { method: a, headers: f } : { method: a, headers: f, body: m };
|
|
551
549
|
let b = !1;
|
|
552
|
-
fetch(
|
|
553
|
-
var
|
|
554
|
-
if (
|
|
555
|
-
return b = !!((
|
|
556
|
-
throw new Error(
|
|
557
|
-
}).then((
|
|
558
|
-
i.value = b ? JSON.parse(
|
|
559
|
-
}).catch((
|
|
560
|
-
console.error(
|
|
550
|
+
fetch(o, y).then((h) => {
|
|
551
|
+
var B, w;
|
|
552
|
+
if (h.status === 200)
|
|
553
|
+
return b = !!((w = (B = h.headers) == null ? void 0 : B.get("content-type")) != null && w.includes("application/json")), b ? h.text() : h.json();
|
|
554
|
+
throw new Error(h.statusText);
|
|
555
|
+
}).then((h) => {
|
|
556
|
+
i.value = b ? JSON.parse(h) : h;
|
|
557
|
+
}).catch((h) => {
|
|
558
|
+
console.error(h);
|
|
561
559
|
});
|
|
562
560
|
}
|
|
563
|
-
return e.remote &&
|
|
561
|
+
return e.remote && u(), O(() => e.data, () => {
|
|
564
562
|
i.value = e.data;
|
|
565
|
-
}),
|
|
566
|
-
if (e.modelValue) {
|
|
567
|
-
const
|
|
568
|
-
|
|
563
|
+
}), O([i], ([o]) => {
|
|
564
|
+
if (e.modelValue != null) {
|
|
565
|
+
const a = o.find((f) => f[e.valueField] === e.modelValue);
|
|
566
|
+
a && (t.value = a[e.textField]);
|
|
569
567
|
}
|
|
570
|
-
}),
|
|
571
|
-
n.value =
|
|
572
|
-
}),
|
|
568
|
+
}), O(() => e.modelValue, (o) => {
|
|
569
|
+
n.value = o, c(o);
|
|
570
|
+
}), c(e.modelValue), { dataSource: i, displayText: t, editable: l, modelValue: n, getItemsByDisplayText: d, getItemsByValue: r, getSelectedItemsByDisplayText: s };
|
|
573
571
|
}
|
|
574
|
-
const
|
|
572
|
+
const P = /* @__PURE__ */ E({
|
|
575
573
|
name: "FComboList",
|
|
576
|
-
props:
|
|
574
|
+
props: j,
|
|
577
575
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
578
576
|
setup(e, t) {
|
|
579
|
-
const n =
|
|
580
|
-
dataSource:
|
|
581
|
-
displayText:
|
|
582
|
-
editable:
|
|
583
|
-
modelValue:
|
|
584
|
-
getSelectedItemsByDisplayText:
|
|
585
|
-
} =
|
|
586
|
-
function
|
|
587
|
-
!
|
|
577
|
+
const n = C(), i = C(e.disabled), l = C(e.enableClear), r = C(e.enableSearch), c = C(e.readonly), {
|
|
578
|
+
dataSource: d,
|
|
579
|
+
displayText: p,
|
|
580
|
+
editable: s,
|
|
581
|
+
modelValue: u,
|
|
582
|
+
getSelectedItemsByDisplayText: o
|
|
583
|
+
} = Oe(e), a = k(() => e.multiSelect), f = k(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
584
|
+
function m() {
|
|
585
|
+
!a.value && n.value && n.value.hidePopup();
|
|
588
586
|
}
|
|
589
|
-
function
|
|
590
|
-
|
|
587
|
+
function y(I) {
|
|
588
|
+
p.value = I.map((M) => M[e.textField]).join(e.separator), I.length === 1 ? u.value = I[0][e.valueField] : u.value = I.map((M) => M[e.valueField]).join(e.separator), t.emit("update:modelValue", u.value), t.emit("change", I, u.value), m();
|
|
591
589
|
}
|
|
592
590
|
function b() {
|
|
593
|
-
|
|
591
|
+
c.value || n.value.togglePopup();
|
|
594
592
|
}
|
|
595
|
-
function
|
|
596
|
-
|
|
593
|
+
function h(I) {
|
|
594
|
+
u.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
597
595
|
}
|
|
598
|
-
function
|
|
599
|
-
const
|
|
600
|
-
|
|
596
|
+
function S(I) {
|
|
597
|
+
const M = o(I);
|
|
598
|
+
y(M);
|
|
601
599
|
}
|
|
602
|
-
function
|
|
603
|
-
return
|
|
600
|
+
function B() {
|
|
601
|
+
return p.value;
|
|
604
602
|
}
|
|
605
|
-
function
|
|
606
|
-
t.emit("input",
|
|
603
|
+
function w(I) {
|
|
604
|
+
t.emit("input", I);
|
|
607
605
|
}
|
|
608
606
|
return t.expose({
|
|
609
|
-
getDisplayText:
|
|
610
|
-
}),
|
|
611
|
-
i.value =
|
|
612
|
-
}), () =>
|
|
607
|
+
getDisplayText: B
|
|
608
|
+
}), O([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([I, M, V, A, D]) => {
|
|
609
|
+
i.value = I, s.value = M, l.value = V, r.value = A, c.value = D;
|
|
610
|
+
}), () => F(oe, {
|
|
613
611
|
ref: n,
|
|
614
612
|
id: e.id,
|
|
615
613
|
disable: i.value,
|
|
616
|
-
readonly:
|
|
614
|
+
readonly: c.value,
|
|
617
615
|
forcePlaceholder: e.forcePlaceholder,
|
|
618
|
-
editable:
|
|
616
|
+
editable: s.value,
|
|
619
617
|
buttonContent: e.dropDownIcon,
|
|
620
618
|
placeholder: e.placeholder,
|
|
621
619
|
enableClear: l.value,
|
|
@@ -624,81 +622,700 @@ const I = /* @__PURE__ */ P({
|
|
|
624
622
|
enableTitle: e.enableTitle,
|
|
625
623
|
multiSelect: e.multiSelect,
|
|
626
624
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
627
|
-
modelValue:
|
|
628
|
-
"onUpdate:modelValue": (
|
|
625
|
+
modelValue: p.value,
|
|
626
|
+
"onUpdate:modelValue": (I) => p.value = I,
|
|
629
627
|
focusOnCreated: e.focusOnCreated,
|
|
630
628
|
selectOnCreated: e.selectOnCreated,
|
|
631
|
-
onClear:
|
|
629
|
+
onClear: h,
|
|
632
630
|
onClick: b,
|
|
633
|
-
onChange:
|
|
634
|
-
onInput:
|
|
631
|
+
onChange: S,
|
|
632
|
+
onInput: w,
|
|
635
633
|
beforeOpen: e.beforeOpen
|
|
636
634
|
}, {
|
|
637
|
-
default: () => [
|
|
635
|
+
default: () => [F(xe, {
|
|
638
636
|
idField: e.idField,
|
|
639
637
|
valueField: e.valueField,
|
|
640
638
|
textField: e.textField,
|
|
641
639
|
titleField: e.titleField,
|
|
642
|
-
dataSource:
|
|
643
|
-
selectedValues:
|
|
640
|
+
dataSource: d.value,
|
|
641
|
+
selectedValues: u.value,
|
|
644
642
|
multiSelect: e.multiSelect,
|
|
645
|
-
enableSearch:
|
|
643
|
+
enableSearch: r.value,
|
|
646
644
|
maxHeight: e.maxHeight,
|
|
647
645
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
648
|
-
width: e.fitEditor ?
|
|
649
|
-
onSelectionChange:
|
|
646
|
+
width: e.fitEditor ? f.value : void 0,
|
|
647
|
+
onSelectionChange: y
|
|
650
648
|
}, null)]
|
|
651
649
|
});
|
|
652
650
|
}
|
|
651
|
+
}), Ee = /* @__PURE__ */ new Map([
|
|
652
|
+
["appearance", ie]
|
|
653
|
+
]);
|
|
654
|
+
function Te(e, t, n) {
|
|
655
|
+
return t;
|
|
656
|
+
}
|
|
657
|
+
const Pe = "https://json-schema.org/draft/2020-12/schema", Le = "https://farris-design.gitee.io/button-edit.schema.json", Ve = "button-edit", Ae = "A Farris Input Component", De = "object", je = {
|
|
658
|
+
id: {
|
|
659
|
+
description: "The unique identifier for a Input Group",
|
|
660
|
+
type: "string"
|
|
661
|
+
},
|
|
662
|
+
type: {
|
|
663
|
+
description: "The type string of Input Group component",
|
|
664
|
+
type: "string",
|
|
665
|
+
default: "button-edit"
|
|
666
|
+
},
|
|
667
|
+
appearance: {
|
|
668
|
+
description: "",
|
|
669
|
+
type: "object",
|
|
670
|
+
properties: {
|
|
671
|
+
class: {
|
|
672
|
+
type: "string"
|
|
673
|
+
},
|
|
674
|
+
style: {
|
|
675
|
+
type: "string"
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
default: {}
|
|
679
|
+
},
|
|
680
|
+
binding: {
|
|
681
|
+
description: "",
|
|
682
|
+
type: "object",
|
|
683
|
+
default: {}
|
|
684
|
+
},
|
|
685
|
+
disable: {
|
|
686
|
+
type: "string",
|
|
687
|
+
default: !1
|
|
688
|
+
},
|
|
689
|
+
editable: {
|
|
690
|
+
description: "",
|
|
691
|
+
type: "boolean",
|
|
692
|
+
default: !0
|
|
693
|
+
},
|
|
694
|
+
enableLinkLabel: {
|
|
695
|
+
description: "",
|
|
696
|
+
type: "boolean",
|
|
697
|
+
default: !1
|
|
698
|
+
},
|
|
699
|
+
label: {
|
|
700
|
+
description: "",
|
|
701
|
+
type: "string",
|
|
702
|
+
default: ""
|
|
703
|
+
},
|
|
704
|
+
lableWidth: {
|
|
705
|
+
description: "",
|
|
706
|
+
type: "number"
|
|
707
|
+
},
|
|
708
|
+
placeholder: {
|
|
709
|
+
description: "",
|
|
710
|
+
type: "string",
|
|
711
|
+
default: ""
|
|
712
|
+
},
|
|
713
|
+
readonly: {
|
|
714
|
+
description: "",
|
|
715
|
+
type: "boolean",
|
|
716
|
+
default: !1
|
|
717
|
+
},
|
|
718
|
+
require: {
|
|
719
|
+
description: "",
|
|
720
|
+
type: "boolean",
|
|
721
|
+
default: !1
|
|
722
|
+
},
|
|
723
|
+
tabindex: {
|
|
724
|
+
description: "",
|
|
725
|
+
type: "number",
|
|
726
|
+
default: -1
|
|
727
|
+
},
|
|
728
|
+
textAlign: {
|
|
729
|
+
description: "",
|
|
730
|
+
type: "string",
|
|
731
|
+
enum: [
|
|
732
|
+
"left",
|
|
733
|
+
"middle",
|
|
734
|
+
"right"
|
|
735
|
+
],
|
|
736
|
+
default: "left"
|
|
737
|
+
},
|
|
738
|
+
visible: {
|
|
739
|
+
description: "",
|
|
740
|
+
type: "boolean",
|
|
741
|
+
default: !0
|
|
742
|
+
},
|
|
743
|
+
onBlur: {
|
|
744
|
+
description: "",
|
|
745
|
+
type: "string",
|
|
746
|
+
default: ""
|
|
747
|
+
},
|
|
748
|
+
onClickLinkLabel: {
|
|
749
|
+
description: "",
|
|
750
|
+
type: "sting",
|
|
751
|
+
default: ""
|
|
752
|
+
},
|
|
753
|
+
autoComplete: {
|
|
754
|
+
description: "",
|
|
755
|
+
type: "boolean",
|
|
756
|
+
default: !1
|
|
757
|
+
},
|
|
758
|
+
buttonContent: {
|
|
759
|
+
description: "",
|
|
760
|
+
type: "string",
|
|
761
|
+
default: ""
|
|
762
|
+
},
|
|
763
|
+
enableClear: {
|
|
764
|
+
description: "",
|
|
765
|
+
type: "boolean",
|
|
766
|
+
default: !0
|
|
767
|
+
},
|
|
768
|
+
inputType: {
|
|
769
|
+
description: "",
|
|
770
|
+
type: "string",
|
|
771
|
+
enum: [
|
|
772
|
+
"text",
|
|
773
|
+
"tag"
|
|
774
|
+
],
|
|
775
|
+
default: "text"
|
|
776
|
+
},
|
|
777
|
+
multiSelect: {
|
|
778
|
+
description: "",
|
|
779
|
+
type: "boolean",
|
|
780
|
+
default: !1
|
|
781
|
+
},
|
|
782
|
+
popup: {
|
|
783
|
+
description: "",
|
|
784
|
+
type: "object",
|
|
785
|
+
properties: {
|
|
786
|
+
footerButtons: {
|
|
787
|
+
type: "array",
|
|
788
|
+
default: []
|
|
789
|
+
},
|
|
790
|
+
height: {
|
|
791
|
+
type: "number",
|
|
792
|
+
default: 600
|
|
793
|
+
},
|
|
794
|
+
dataMapping: {
|
|
795
|
+
type: "object"
|
|
796
|
+
},
|
|
797
|
+
contents: {
|
|
798
|
+
type: "array",
|
|
799
|
+
default: []
|
|
800
|
+
},
|
|
801
|
+
showMaxButton: {
|
|
802
|
+
type: "boolean",
|
|
803
|
+
default: !0
|
|
804
|
+
},
|
|
805
|
+
showCloseButton: {
|
|
806
|
+
type: "boolean",
|
|
807
|
+
default: !0
|
|
808
|
+
},
|
|
809
|
+
showFooter: {
|
|
810
|
+
type: "boolean",
|
|
811
|
+
default: !0
|
|
812
|
+
},
|
|
813
|
+
title: {
|
|
814
|
+
type: "string",
|
|
815
|
+
default: ""
|
|
816
|
+
},
|
|
817
|
+
width: {
|
|
818
|
+
type: "number",
|
|
819
|
+
default: 800
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
},
|
|
823
|
+
separator: {
|
|
824
|
+
type: "string",
|
|
825
|
+
default: ","
|
|
826
|
+
},
|
|
827
|
+
showButtonWhenDisabled: {
|
|
828
|
+
description: "",
|
|
829
|
+
type: "boolean",
|
|
830
|
+
default: !1
|
|
831
|
+
},
|
|
832
|
+
wrapText: {
|
|
833
|
+
type: "boolean",
|
|
834
|
+
default: !1
|
|
835
|
+
},
|
|
836
|
+
onClear: {
|
|
837
|
+
description: "",
|
|
838
|
+
type: "string",
|
|
839
|
+
default: ""
|
|
840
|
+
}
|
|
841
|
+
}, $e = [
|
|
842
|
+
"id",
|
|
843
|
+
"type"
|
|
844
|
+
], Ne = {
|
|
845
|
+
$schema: Pe,
|
|
846
|
+
$id: Le,
|
|
847
|
+
title: Ve,
|
|
848
|
+
description: Ae,
|
|
849
|
+
type: De,
|
|
850
|
+
properties: je,
|
|
851
|
+
required: $e
|
|
852
|
+
}, Ue = "buttonEdit", Ge = "A Farris Component", Re = "object", We = {
|
|
853
|
+
basic: {
|
|
854
|
+
description: "Basic Infomation",
|
|
855
|
+
title: "基本信息",
|
|
856
|
+
properties: {
|
|
857
|
+
id: {
|
|
858
|
+
description: "组件标识",
|
|
859
|
+
title: "标识",
|
|
860
|
+
type: "string",
|
|
861
|
+
readonly: !0
|
|
862
|
+
},
|
|
863
|
+
type: {
|
|
864
|
+
description: "组件类型",
|
|
865
|
+
title: "控件类型",
|
|
866
|
+
type: "select",
|
|
867
|
+
editor: {
|
|
868
|
+
type: "waiting for modification",
|
|
869
|
+
enum: []
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
behavior: {
|
|
875
|
+
description: "Basic Infomation",
|
|
876
|
+
title: "行为",
|
|
877
|
+
properties: {
|
|
878
|
+
editable: {
|
|
879
|
+
description: "",
|
|
880
|
+
title: "允许编辑",
|
|
881
|
+
type: "boolean"
|
|
882
|
+
},
|
|
883
|
+
readonly: {
|
|
884
|
+
description: "",
|
|
885
|
+
title: "只读",
|
|
886
|
+
type: "string"
|
|
887
|
+
},
|
|
888
|
+
required: {
|
|
889
|
+
description: "",
|
|
890
|
+
title: "必填",
|
|
891
|
+
type: "boolean"
|
|
892
|
+
},
|
|
893
|
+
visible: {
|
|
894
|
+
description: "",
|
|
895
|
+
title: "可见",
|
|
896
|
+
type: "boolean"
|
|
897
|
+
},
|
|
898
|
+
placeholder: {
|
|
899
|
+
description: "",
|
|
900
|
+
title: "提示文本",
|
|
901
|
+
type: "string"
|
|
902
|
+
},
|
|
903
|
+
tabindex: {
|
|
904
|
+
description: "",
|
|
905
|
+
title: "tab索引",
|
|
906
|
+
type: "number"
|
|
907
|
+
},
|
|
908
|
+
textAlign: {
|
|
909
|
+
description: "",
|
|
910
|
+
title: "对齐方式",
|
|
911
|
+
type: "enum",
|
|
912
|
+
editor: {
|
|
913
|
+
type: "combo-list",
|
|
914
|
+
textField: "name",
|
|
915
|
+
valueField: "value",
|
|
916
|
+
data: [
|
|
917
|
+
{
|
|
918
|
+
value: "left",
|
|
919
|
+
name: "左对齐"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
value: "center",
|
|
923
|
+
name: "居中对齐"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
value: "right",
|
|
927
|
+
name: "右对齐"
|
|
928
|
+
}
|
|
929
|
+
]
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
}, qe = {
|
|
935
|
+
title: Ue,
|
|
936
|
+
description: Ge,
|
|
937
|
+
type: Re,
|
|
938
|
+
categories: We
|
|
939
|
+
}, X = {
|
|
940
|
+
/**
|
|
941
|
+
* 组件标识
|
|
942
|
+
*/
|
|
943
|
+
id: String,
|
|
944
|
+
/**
|
|
945
|
+
* 扩展按钮显示内容,这是一段现在扩展按钮中的html标签
|
|
946
|
+
*/
|
|
947
|
+
buttonContent: { type: String, default: '<i class="f-icon f-icon-lookup"></i>' },
|
|
948
|
+
buttonBehavior: { type: String, default: "Popup" },
|
|
949
|
+
/**
|
|
950
|
+
* 启用输入框自动完成功能
|
|
951
|
+
*/
|
|
952
|
+
autoComplete: { type: Boolean, default: !1 },
|
|
953
|
+
/**
|
|
954
|
+
* 组件自定义样式
|
|
955
|
+
*/
|
|
956
|
+
customClass: { type: String, default: "" },
|
|
957
|
+
/**
|
|
958
|
+
* 禁用组件,既不允许在输入框中录入,也不允许点击扩展按钮。
|
|
959
|
+
*/
|
|
960
|
+
disable: { type: Boolean, default: !1 },
|
|
961
|
+
/**
|
|
962
|
+
* 允许在输入框中录入文本。
|
|
963
|
+
*/
|
|
964
|
+
editable: { type: Boolean, default: !0 },
|
|
965
|
+
/**
|
|
966
|
+
* 显示清空文本按钮
|
|
967
|
+
*/
|
|
968
|
+
enableClear: { type: Boolean, default: !1 },
|
|
969
|
+
/**
|
|
970
|
+
* 组件值
|
|
971
|
+
*/
|
|
972
|
+
modelValue: { type: String, default: "" },
|
|
973
|
+
/**
|
|
974
|
+
* 将组件设置为只读,既不允许在输入框中录入,也不允许点击扩展按钮,但是允许复制输入框中的内容。
|
|
975
|
+
*/
|
|
976
|
+
readonly: { type: Boolean, default: !1 },
|
|
977
|
+
/**
|
|
978
|
+
* 禁用组件时,是否显示扩展按钮
|
|
979
|
+
*/
|
|
980
|
+
showButtonWhenDisabled: { type: Boolean, default: !1 },
|
|
981
|
+
/**
|
|
982
|
+
* 显示输入框的标签
|
|
983
|
+
*/
|
|
984
|
+
enableTitle: { type: Boolean, default: !1 },
|
|
985
|
+
/**
|
|
986
|
+
* 输入框类型
|
|
987
|
+
*/
|
|
988
|
+
inputType: { type: String, default: "text" },
|
|
989
|
+
/**
|
|
990
|
+
* 显示输入框提示信息
|
|
991
|
+
*/
|
|
992
|
+
forcePlaceholder: { type: Boolean, default: !1 },
|
|
993
|
+
/**
|
|
994
|
+
* 输入框提示文本
|
|
995
|
+
*/
|
|
996
|
+
placeholder: { type: String, default: "" },
|
|
997
|
+
/**
|
|
998
|
+
* 输入框最小长度
|
|
999
|
+
*/
|
|
1000
|
+
minLength: Number,
|
|
1001
|
+
/**
|
|
1002
|
+
* 输入框最大长度
|
|
1003
|
+
*/
|
|
1004
|
+
maxLength: Number,
|
|
1005
|
+
/**
|
|
1006
|
+
* 输入框Tab键索引
|
|
1007
|
+
*/
|
|
1008
|
+
tabIndex: Number,
|
|
1009
|
+
popupHost: { type: Object },
|
|
1010
|
+
popupRightBoundary: { type: Object },
|
|
1011
|
+
popupOffsetX: { type: Object },
|
|
1012
|
+
popupOnInput: { type: Boolean, default: !1 },
|
|
1013
|
+
popupOnFocus: { type: Boolean, default: !1 },
|
|
1014
|
+
popupMinWidth: { type: Number, default: 160 },
|
|
1015
|
+
modalOptions: { type: Object, default: {} },
|
|
1016
|
+
wrapText: { type: Boolean, default: !1 },
|
|
1017
|
+
/**
|
|
1018
|
+
* 可选,是否支持多选
|
|
1019
|
+
* 默认`false`
|
|
1020
|
+
*/
|
|
1021
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
1022
|
+
/**
|
|
1023
|
+
* 可选,分隔符
|
|
1024
|
+
* 默认`,`
|
|
1025
|
+
*/
|
|
1026
|
+
separator: { type: String, default: "," },
|
|
1027
|
+
/** 对齐方式 */
|
|
1028
|
+
textAlign: { type: String, default: "left" },
|
|
1029
|
+
/**
|
|
1030
|
+
* 废弃
|
|
1031
|
+
*/
|
|
1032
|
+
beforeClickButton: { type: Function, default: null },
|
|
1033
|
+
/**
|
|
1034
|
+
* 作为内嵌编辑器被创建后默认获得焦点
|
|
1035
|
+
*/
|
|
1036
|
+
focusOnCreated: { type: Boolean, default: !1 },
|
|
1037
|
+
/**
|
|
1038
|
+
* 作为内嵌编辑器被创建后默认选中文本
|
|
1039
|
+
*/
|
|
1040
|
+
selectOnCreated: { type: Boolean, default: !1 },
|
|
1041
|
+
/**
|
|
1042
|
+
* 打开前
|
|
1043
|
+
*/
|
|
1044
|
+
beforeOpen: { type: Function, default: null },
|
|
1045
|
+
/** 更新方式 blur | change */
|
|
1046
|
+
updateOn: { type: String, default: "change" }
|
|
1047
|
+
};
|
|
1048
|
+
H(X, Ne, Ee, Te, qe);
|
|
1049
|
+
const He = {
|
|
1050
|
+
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
1051
|
+
host: { type: Object },
|
|
1052
|
+
backgroundColor: { type: String, default: "" }
|
|
1053
|
+
}, ze = /* @__PURE__ */ E({
|
|
1054
|
+
name: "FOverlay",
|
|
1055
|
+
props: He,
|
|
1056
|
+
emits: ["click"],
|
|
1057
|
+
setup(e, t) {
|
|
1058
|
+
const n = C(e.popupContentPosition), i = C(e.host), l = k(() => ({
|
|
1059
|
+
backgroundColor: e.backgroundColor || "",
|
|
1060
|
+
pointerEvents: "auto"
|
|
1061
|
+
}));
|
|
1062
|
+
function r(d) {
|
|
1063
|
+
t.emit("click"), d.preventDefault(), d.stopPropagation();
|
|
1064
|
+
}
|
|
1065
|
+
k(() => {
|
|
1066
|
+
const d = i.value;
|
|
1067
|
+
if (d) {
|
|
1068
|
+
const p = d.getBoundingClientRect(), {
|
|
1069
|
+
left: s,
|
|
1070
|
+
top: u,
|
|
1071
|
+
height: o
|
|
1072
|
+
} = p;
|
|
1073
|
+
return {
|
|
1074
|
+
left: s,
|
|
1075
|
+
top: u + o
|
|
1076
|
+
};
|
|
1077
|
+
}
|
|
1078
|
+
return n.value;
|
|
1079
|
+
});
|
|
1080
|
+
const c = k(() => ({
|
|
1081
|
+
// position: 'relative',
|
|
1082
|
+
// left: `${position.value.left}px`,
|
|
1083
|
+
// top: `${position.value.top}px`
|
|
1084
|
+
}));
|
|
1085
|
+
return () => F(_, {
|
|
1086
|
+
to: "body"
|
|
1087
|
+
}, {
|
|
1088
|
+
default: () => {
|
|
1089
|
+
var d, p;
|
|
1090
|
+
return [F("div", {
|
|
1091
|
+
class: "overlay-container",
|
|
1092
|
+
onClick: (s) => r(s),
|
|
1093
|
+
style: l.value
|
|
1094
|
+
}, [F("div", {
|
|
1095
|
+
style: c.value
|
|
1096
|
+
}, [(p = (d = t.slots).default) == null ? void 0 : p.call(d)])])];
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
});
|
|
1101
|
+
function Xe(e) {
|
|
1102
|
+
if (e.content && e.content.render)
|
|
1103
|
+
return e.content.render;
|
|
1104
|
+
if (e.render && typeof e.render == "function")
|
|
1105
|
+
return e.render;
|
|
1106
|
+
}
|
|
1107
|
+
function Je(e) {
|
|
1108
|
+
const t = document.createElement("div");
|
|
1109
|
+
t.style.display = "contents";
|
|
1110
|
+
let n;
|
|
1111
|
+
const i = e.onClickCallback || (() => {
|
|
1112
|
+
}), l = () => {
|
|
1113
|
+
i(), n && n.unmount();
|
|
1114
|
+
};
|
|
1115
|
+
return n = K({
|
|
1116
|
+
setup() {
|
|
1117
|
+
ee(() => {
|
|
1118
|
+
document.body.removeChild(t);
|
|
1119
|
+
});
|
|
1120
|
+
const r = Xe(e);
|
|
1121
|
+
return () => F(ze, {
|
|
1122
|
+
"popup-content-position": e.popupPosition,
|
|
1123
|
+
host: e.host,
|
|
1124
|
+
onClick: l,
|
|
1125
|
+
backgroundColor: e.backgroundColor
|
|
1126
|
+
}, {
|
|
1127
|
+
default: () => [r && r()]
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
}), document.body.appendChild(t), n.mount(t), n;
|
|
1131
|
+
}
|
|
1132
|
+
class Qe {
|
|
1133
|
+
static show(t) {
|
|
1134
|
+
return Je(t);
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
const Ye = Symbol("FModalService");
|
|
1138
|
+
function J(e, t) {
|
|
1139
|
+
function n() {
|
|
1140
|
+
const i = e.beforeOpen || e.beforeClickButton || null;
|
|
1141
|
+
let l = Promise.resolve(!0);
|
|
1142
|
+
if (i) {
|
|
1143
|
+
const r = i(t.value);
|
|
1144
|
+
if (typeof r > "u")
|
|
1145
|
+
return l;
|
|
1146
|
+
typeof r == "boolean" ? l = Promise.resolve(r) : l = r;
|
|
1147
|
+
}
|
|
1148
|
+
return l;
|
|
1149
|
+
}
|
|
1150
|
+
return { judgeCanOpen: n };
|
|
1151
|
+
}
|
|
1152
|
+
function Ze(e, t, n, i, l) {
|
|
1153
|
+
const r = C(e.buttonBehavior), c = C(e.popupOnInput), d = k(() => ({
|
|
1154
|
+
"input-group-append": !0,
|
|
1155
|
+
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
1156
|
+
})), { judgeCanOpen: p } = J(e, l), s = k(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), u = T(Ye, null), o = C();
|
|
1157
|
+
async function a(y) {
|
|
1158
|
+
if (await p() && s.value) {
|
|
1159
|
+
const b = !!t.slots.default;
|
|
1160
|
+
if (r.value === "Modal") {
|
|
1161
|
+
const h = e.modalOptions, S = u == null ? void 0 : u.open({
|
|
1162
|
+
...h,
|
|
1163
|
+
render: () => t.slots.default && t.slots.default()
|
|
1164
|
+
});
|
|
1165
|
+
o.value = S == null ? void 0 : S.modalRef;
|
|
1166
|
+
}
|
|
1167
|
+
r.value === "Overlay" && Qe.show({
|
|
1168
|
+
// host: buttonEditRef.value,
|
|
1169
|
+
host: document.body,
|
|
1170
|
+
backgroundColor: "rgba(0,0,0,.15)",
|
|
1171
|
+
render: () => t.slots.default && t.slots.default()
|
|
1172
|
+
}), b && r.value === "Popup" && i.togglePopup(!0), b && c.value && i.hidePopup(), t.emit("clickButton", { origin: y, value: e.modelValue });
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
function f(y) {
|
|
1176
|
+
t.emit("mouseEnterIcon", y);
|
|
1177
|
+
}
|
|
1178
|
+
function m(y) {
|
|
1179
|
+
t.emit("mouseLeaveIcon", y);
|
|
1180
|
+
}
|
|
1181
|
+
return {
|
|
1182
|
+
buttonGroupClass: d,
|
|
1183
|
+
onClickButton: a,
|
|
1184
|
+
onMouseEnterButton: f,
|
|
1185
|
+
onMouseLeaveButton: m,
|
|
1186
|
+
modalRef: o
|
|
1187
|
+
};
|
|
1188
|
+
}
|
|
1189
|
+
function _e(e, t, n, i) {
|
|
1190
|
+
const l = C(), r = C(!1), { judgeCanOpen: c } = J(e, i);
|
|
1191
|
+
function d() {
|
|
1192
|
+
const o = l.value;
|
|
1193
|
+
o && o.show(n.value);
|
|
1194
|
+
}
|
|
1195
|
+
async function p(o = !1) {
|
|
1196
|
+
if (!!t.slots.default) {
|
|
1197
|
+
if (!o && !r.value && !await c())
|
|
1198
|
+
return;
|
|
1199
|
+
r.value = !r.value, await $(), d();
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
async function s(o = !1) {
|
|
1203
|
+
if (!!t.slots.default) {
|
|
1204
|
+
if (!o && !await c())
|
|
1205
|
+
return;
|
|
1206
|
+
r.value = !0, await $(), d();
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
function u() {
|
|
1210
|
+
r.value = !1;
|
|
1211
|
+
}
|
|
1212
|
+
return { hidePopup: u, popup: s, shouldPopupContent: r, togglePopup: p, popoverRef: l };
|
|
1213
|
+
}
|
|
1214
|
+
function Ke(e, t, n) {
|
|
1215
|
+
const {
|
|
1216
|
+
buttonGroupClass: i
|
|
1217
|
+
} = n, l = C();
|
|
1218
|
+
return {
|
|
1219
|
+
renderButtonGroup: () => F("div", {
|
|
1220
|
+
id: `${e.id}-button-group`,
|
|
1221
|
+
class: i.value
|
|
1222
|
+
}, [t.slots.buttonContent ? F("span", {
|
|
1223
|
+
class: "input-group-text input-group-append-button"
|
|
1224
|
+
}, [t.slots.buttonContent()]) : e.buttonContent ? F("span", {
|
|
1225
|
+
class: "input-group-text input-group-append-button",
|
|
1226
|
+
innerHTML: e.buttonContent,
|
|
1227
|
+
ref: l
|
|
1228
|
+
}, null) : null]),
|
|
1229
|
+
buttonHandleElement: l
|
|
1230
|
+
};
|
|
1231
|
+
}
|
|
1232
|
+
const et = /* @__PURE__ */ E({
|
|
1233
|
+
name: "FButtonEdit",
|
|
1234
|
+
props: X,
|
|
1235
|
+
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
1236
|
+
setup(e, t) {
|
|
1237
|
+
const n = C(), i = T("design-item-context"), l = W(n, i), r = C(e.customClass), c = C(e.modelValue), d = _e(e, t, n, c), p = Ze(e, t, n, d, c), s = C(), u = k(() => ({
|
|
1238
|
+
"f-cmp-inputgroup": !0,
|
|
1239
|
+
"input-group": !0,
|
|
1240
|
+
"f-state-disable": !0,
|
|
1241
|
+
"f-state-editable": !1,
|
|
1242
|
+
"f-state-readonly": !0
|
|
1243
|
+
}));
|
|
1244
|
+
G(() => {
|
|
1245
|
+
n.value.componentInstance = l;
|
|
1246
|
+
}), t.expose(l.value);
|
|
1247
|
+
const o = k(() => {
|
|
1248
|
+
const f = {
|
|
1249
|
+
"f-button-edit": !0,
|
|
1250
|
+
"f-cmp-inputgroup": !0,
|
|
1251
|
+
"f-button-edit-nowrap": !e.wrapText
|
|
1252
|
+
};
|
|
1253
|
+
return r.value && r.value.split(" ").reduce((m, y) => (m[y] = !0, m), f), f;
|
|
1254
|
+
}), {
|
|
1255
|
+
renderButtonGroup: a
|
|
1256
|
+
} = Ke(e, t, p);
|
|
1257
|
+
return () => F("div", te(t.attrs, {
|
|
1258
|
+
ref: n,
|
|
1259
|
+
class: o.value,
|
|
1260
|
+
id: e.id
|
|
1261
|
+
}), [F("div", {
|
|
1262
|
+
class: u.value
|
|
1263
|
+
}, [F("input", {
|
|
1264
|
+
ref: s,
|
|
1265
|
+
class: "form-control",
|
|
1266
|
+
readonly: !0,
|
|
1267
|
+
placeholder: e.placeholder
|
|
1268
|
+
}, null), a()])]);
|
|
1269
|
+
}
|
|
653
1270
|
});
|
|
654
|
-
function
|
|
1271
|
+
function tt(e, t) {
|
|
655
1272
|
e.schema;
|
|
656
|
-
const n =
|
|
657
|
-
function l(
|
|
1273
|
+
const n = C(!0), i = C(!0);
|
|
1274
|
+
function l(o) {
|
|
658
1275
|
return !1;
|
|
659
1276
|
}
|
|
660
|
-
function
|
|
1277
|
+
function r() {
|
|
661
1278
|
return !1;
|
|
662
1279
|
}
|
|
663
|
-
function
|
|
1280
|
+
function c() {
|
|
664
1281
|
return !1;
|
|
665
1282
|
}
|
|
666
|
-
function
|
|
1283
|
+
function d() {
|
|
667
1284
|
return !0;
|
|
668
1285
|
}
|
|
669
|
-
function
|
|
1286
|
+
function p(o) {
|
|
670
1287
|
}
|
|
671
|
-
function
|
|
1288
|
+
function s() {
|
|
672
1289
|
}
|
|
673
|
-
function
|
|
1290
|
+
function u(o) {
|
|
674
1291
|
return null;
|
|
675
1292
|
}
|
|
676
1293
|
return {
|
|
677
1294
|
canAccepts: l,
|
|
678
|
-
checkCanDeleteComponent:
|
|
679
|
-
checkCanMoveComponent:
|
|
680
|
-
hideNestedPaddingInDesginerView:
|
|
681
|
-
onAcceptMovedChildElement:
|
|
682
|
-
resolveComponentContext:
|
|
1295
|
+
checkCanDeleteComponent: r,
|
|
1296
|
+
checkCanMoveComponent: c,
|
|
1297
|
+
hideNestedPaddingInDesginerView: d,
|
|
1298
|
+
onAcceptMovedChildElement: p,
|
|
1299
|
+
resolveComponentContext: s,
|
|
683
1300
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
684
1301
|
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
685
|
-
getPropsConfig:
|
|
1302
|
+
getPropsConfig: u
|
|
686
1303
|
};
|
|
687
1304
|
}
|
|
688
|
-
class
|
|
1305
|
+
class nt {
|
|
689
1306
|
constructor(t, n) {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
1307
|
+
v(this, "componentId");
|
|
1308
|
+
v(this, "viewModelId");
|
|
1309
|
+
v(this, "eventsEditorUtils");
|
|
1310
|
+
v(this, "formSchemaUtils");
|
|
1311
|
+
v(this, "formMetadataConverter");
|
|
1312
|
+
v(this, "designViewModelUtils");
|
|
1313
|
+
v(this, "designViewModelField");
|
|
1314
|
+
v(this, "controlCreatorUtils");
|
|
1315
|
+
v(this, "designerHostService");
|
|
1316
|
+
v(this, "schemaService", null);
|
|
1317
|
+
v(this, "metadataService", null);
|
|
1318
|
+
v(this, "propertyConfig", {
|
|
702
1319
|
type: "object",
|
|
703
1320
|
categories: {}
|
|
704
1321
|
});
|
|
@@ -740,7 +1357,7 @@ class Fe {
|
|
|
740
1357
|
type: "combo-list",
|
|
741
1358
|
textField: "name",
|
|
742
1359
|
valueField: "value",
|
|
743
|
-
data: [{ value: t.type, name:
|
|
1360
|
+
data: [{ value: t.type, name: g[t.type].name }]
|
|
744
1361
|
}
|
|
745
1362
|
}
|
|
746
1363
|
}
|
|
@@ -766,13 +1383,26 @@ class Fe {
|
|
|
766
1383
|
}
|
|
767
1384
|
};
|
|
768
1385
|
}
|
|
1386
|
+
/**
|
|
1387
|
+
*
|
|
1388
|
+
* @param propertyId
|
|
1389
|
+
* @param componentInstance
|
|
1390
|
+
* @returns
|
|
1391
|
+
*/
|
|
1392
|
+
updateElementByParentContainer(t, n) {
|
|
1393
|
+
const i = n && n.parent && n.parent.schema;
|
|
1394
|
+
if (!i)
|
|
1395
|
+
return;
|
|
1396
|
+
const l = i.contents.findIndex((c) => c.id === t), r = R(i.contents[l]);
|
|
1397
|
+
i.contents.splice(l, 1), i.contents.splice(l, 0, r);
|
|
1398
|
+
}
|
|
769
1399
|
}
|
|
770
|
-
const
|
|
1400
|
+
const x = class x {
|
|
771
1401
|
/**
|
|
772
1402
|
* 根据绑定字段类型获取可用的输入类控件
|
|
773
1403
|
*/
|
|
774
1404
|
static getEditorTypesByMDataType(t) {
|
|
775
|
-
const n =
|
|
1405
|
+
const n = x.fieldControlTypeMapping[t];
|
|
776
1406
|
return n || [{ key: "", value: "" }];
|
|
777
1407
|
}
|
|
778
1408
|
/**
|
|
@@ -780,8 +1410,8 @@ const w = class w {
|
|
|
780
1410
|
*/
|
|
781
1411
|
static getAllInputTypes() {
|
|
782
1412
|
const t = [];
|
|
783
|
-
for (let n in
|
|
784
|
-
|
|
1413
|
+
for (let n in x.fieldControlTypeMapping)
|
|
1414
|
+
x.fieldControlTypeMapping[n].forEach((i) => {
|
|
785
1415
|
t.find((l) => l.key === i.key && l.value === i.value) || t.push({ key: i.key, value: i.value });
|
|
786
1416
|
});
|
|
787
1417
|
return t;
|
|
@@ -790,66 +1420,175 @@ const w = class w {
|
|
|
790
1420
|
/**
|
|
791
1421
|
* <字段类型,可配置的控件类型列表>的映射
|
|
792
1422
|
*/
|
|
793
|
-
|
|
1423
|
+
v(x, "fieldControlTypeMapping", {
|
|
794
1424
|
String: [
|
|
795
|
-
{ key:
|
|
796
|
-
{ key:
|
|
797
|
-
{ key:
|
|
798
|
-
{ key:
|
|
799
|
-
{ key:
|
|
800
|
-
{ key:
|
|
801
|
-
{ key:
|
|
1425
|
+
{ key: g["input-group"].type, value: g["input-group"].name },
|
|
1426
|
+
{ key: g.lookup.type, value: g.lookup.name },
|
|
1427
|
+
{ key: g["date-picker"].type, value: g["date-picker"].name },
|
|
1428
|
+
{ key: g["check-box"].type, value: g["check-box"].name },
|
|
1429
|
+
{ key: g["check-group"].type, value: g["check-group"].name },
|
|
1430
|
+
{ key: g["radio-group"].type, value: g["radio-group"].name },
|
|
1431
|
+
{ key: g["combo-list"].type, value: g["combo-list"].name },
|
|
1432
|
+
{ key: g.textarea.type, value: g.textarea.name }
|
|
802
1433
|
],
|
|
803
1434
|
Text: [
|
|
804
|
-
{ key:
|
|
805
|
-
{ key:
|
|
1435
|
+
{ key: g.textarea.type, value: g.textarea.name },
|
|
1436
|
+
{ key: g.lookup.type, value: g.lookup.name }
|
|
806
1437
|
],
|
|
807
1438
|
Decimal: [
|
|
808
|
-
{ key:
|
|
1439
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
809
1440
|
],
|
|
810
1441
|
Integer: [
|
|
811
|
-
{ key:
|
|
1442
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
812
1443
|
],
|
|
813
1444
|
Number: [
|
|
814
|
-
{ key:
|
|
1445
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
815
1446
|
],
|
|
816
1447
|
BigNumber: [
|
|
817
|
-
{ key:
|
|
1448
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
818
1449
|
],
|
|
819
1450
|
Date: [
|
|
820
|
-
{ key:
|
|
1451
|
+
{ key: g["date-picker"].type, value: g["date-picker"].name }
|
|
821
1452
|
],
|
|
822
1453
|
DateTime: [
|
|
823
|
-
{ key:
|
|
1454
|
+
{ key: g["date-picker"].type, value: g["date-picker"].name }
|
|
824
1455
|
],
|
|
825
1456
|
Boolean: [
|
|
826
|
-
{ key:
|
|
827
|
-
{ key:
|
|
1457
|
+
{ key: g.switch.type, value: g.switch.name },
|
|
1458
|
+
{ key: g["check-box"].type, value: g["check-box"].name }
|
|
828
1459
|
],
|
|
829
1460
|
Enum: [
|
|
830
|
-
{ key:
|
|
831
|
-
{ key:
|
|
1461
|
+
{ key: g["combo-list"].type, value: g["combo-list"].name },
|
|
1462
|
+
{ key: g["radio-group"].type, value: g["radio-group"].name }
|
|
832
1463
|
],
|
|
833
1464
|
Object: [
|
|
834
|
-
{ key:
|
|
835
|
-
{ key:
|
|
836
|
-
{ key:
|
|
1465
|
+
{ key: g.lookup.type, value: g.lookup.name },
|
|
1466
|
+
{ key: g["combo-list"].type, value: g["combo-list"].name },
|
|
1467
|
+
{ key: g["radio-group"].type, value: g["radio-group"].name }
|
|
837
1468
|
]
|
|
838
1469
|
});
|
|
839
|
-
let
|
|
840
|
-
const
|
|
841
|
-
class
|
|
842
|
-
constructor(
|
|
843
|
-
|
|
1470
|
+
let L = x;
|
|
1471
|
+
const ot = C(0);
|
|
1472
|
+
class it {
|
|
1473
|
+
constructor() {
|
|
1474
|
+
/** 控件标题 */
|
|
1475
|
+
v(this, "label", "");
|
|
1476
|
+
/** 控件id */
|
|
1477
|
+
v(this, "id", "");
|
|
1478
|
+
/** 每个控件占用的栅格数 */
|
|
1479
|
+
v(this, "columnInSM", 12);
|
|
1480
|
+
v(this, "columnInMD", 6);
|
|
1481
|
+
v(this, "columnInLG", 3);
|
|
1482
|
+
v(this, "columnInEL", 2);
|
|
1483
|
+
/** 每个控件占用的列数 */
|
|
1484
|
+
v(this, "displayWidthInSM", 1);
|
|
1485
|
+
v(this, "displayWidthInMD", 1);
|
|
1486
|
+
v(this, "displayWidthInLG", 1);
|
|
1487
|
+
v(this, "displayWidthInEL", 1);
|
|
1488
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
1489
|
+
v(this, "displayColumnCountAtBreakPoint", "md");
|
|
1490
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
1491
|
+
v(this, "tagRow", 0);
|
|
1492
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
1493
|
+
v(this, "showTopBorder", 0);
|
|
1494
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
1495
|
+
v(this, "group", 1);
|
|
1496
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
1497
|
+
v(this, "isSupportedClass", !0);
|
|
1498
|
+
/** 控件所在分组id(设计器用的) */
|
|
1499
|
+
v(this, "fieldSetId", "");
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
function lt(e) {
|
|
1503
|
+
let t, n;
|
|
1504
|
+
const i = /* @__PURE__ */ new Map();
|
|
1505
|
+
let l = [];
|
|
1506
|
+
function r(u, o) {
|
|
1507
|
+
const f = u.split(" ").filter((S) => S.startsWith("col-"));
|
|
1508
|
+
if (f.length === 0) {
|
|
1509
|
+
o.isSupportedClass = !1;
|
|
1510
|
+
return;
|
|
1511
|
+
}
|
|
1512
|
+
let m = f.find((S) => /^col-([1-9]|10|11|12)$/.test(S)), y = f.find((S) => /^col-md-([1-9]|10|11|12)$/.test(S)), b = f.find((S) => /^col-xl-([1-9]|10|11|12)$/.test(S)), h = f.find((S) => /^col-el-([1-9]|10|11|12)$/.test(S));
|
|
1513
|
+
m = m || "col-12", o.columnInSM = parseInt(m.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), y = y || "col-md-" + o.columnInSM, o.columnInMD = parseInt(y.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), h = h || "col-el-" + o.columnInLG, o.columnInEL = parseInt(h.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
1514
|
+
}
|
|
1515
|
+
function c(u, o, a, f = !1) {
|
|
1516
|
+
let m = !1;
|
|
1517
|
+
u.contents.forEach((y) => {
|
|
1518
|
+
if (y.type === "fieldset") {
|
|
1519
|
+
a += 1, c(y, o, a, !0), m = !0;
|
|
1520
|
+
return;
|
|
1521
|
+
}
|
|
1522
|
+
m && (a += 1, m = !1);
|
|
1523
|
+
const b = y.appearance && y.appearance.class, h = new it();
|
|
1524
|
+
b ? r(b, h) : h.isSupportedClass = !1, h.label = y.label || y.id, h.id = y.id, h.group = a, f && (h.fieldSetId = u.id), n === y.id && (t = a), i.set(y.id, y), o.push(h);
|
|
1525
|
+
});
|
|
1526
|
+
}
|
|
1527
|
+
function d(u) {
|
|
1528
|
+
const o = e.getComponentById(u);
|
|
1529
|
+
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
1530
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
1531
|
+
const a = e.selectNode(o, (f) => f.type === U["response-form"].type);
|
|
1532
|
+
return !a || !a.contents || a.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: a };
|
|
1533
|
+
}
|
|
1534
|
+
function p(u, o) {
|
|
1535
|
+
o = o || u.id;
|
|
1536
|
+
const { result: a, message: f, formNode: m } = d(o);
|
|
1537
|
+
if (!a)
|
|
1538
|
+
return { result: a, message: f };
|
|
1539
|
+
n = u.id, l = [], i.clear();
|
|
1540
|
+
const y = m.contents[0].type === U.fieldset.type ? 0 : 1;
|
|
1541
|
+
c(m, l, y);
|
|
1542
|
+
const b = l.find((S) => !S.isSupportedClass);
|
|
1543
|
+
return {
|
|
1544
|
+
defaultState: {
|
|
1545
|
+
defaultGroupNumber: t || 1,
|
|
1546
|
+
model: b ? "customize" : "standard"
|
|
1547
|
+
},
|
|
1548
|
+
importData: l
|
|
1549
|
+
};
|
|
1550
|
+
}
|
|
1551
|
+
function s(u, o) {
|
|
1552
|
+
o = o;
|
|
1553
|
+
const { result: a, formNode: f } = d(o);
|
|
1554
|
+
if (!a)
|
|
1555
|
+
return "";
|
|
1556
|
+
const m = [];
|
|
1557
|
+
return u.forEach((y) => {
|
|
1558
|
+
var S;
|
|
1559
|
+
const b = i.get(y.id), h = b.appearance && b.appearance.class;
|
|
1560
|
+
if (h) {
|
|
1561
|
+
const w = h.split(" ").filter((Q) => !Q.startsWith("col-")), I = "col-" + y.columnInSM, M = "col-md-" + y.columnInMD, V = "col-xl-" + y.columnInLG, A = "col-el-" + y.columnInEL, D = [I, M, V, A].concat(w);
|
|
1562
|
+
b.appearance.class = D.join(" ");
|
|
1563
|
+
}
|
|
1564
|
+
if (y.fieldSetId) {
|
|
1565
|
+
const B = f.contents.find((I) => I.id === y.fieldSetId), w = m.find((I) => I.id === y.fieldSetId);
|
|
1566
|
+
w ? (S = w.contents) == null || S.push(b) : (m.push(B), B.contents = [b]);
|
|
1567
|
+
} else
|
|
1568
|
+
m.push(b);
|
|
1569
|
+
}), f.contents = m, f.id;
|
|
1570
|
+
}
|
|
1571
|
+
return {
|
|
1572
|
+
checkCanFindFormNode: d,
|
|
1573
|
+
checkCanOpenLayoutEditor: p,
|
|
1574
|
+
changeFormControlsByResponseLayoutConfig: s,
|
|
1575
|
+
getResonseFormLayoutConfig: c
|
|
1576
|
+
};
|
|
1577
|
+
}
|
|
1578
|
+
class at extends nt {
|
|
1579
|
+
constructor(n, i) {
|
|
1580
|
+
super(n, i);
|
|
1581
|
+
v(this, "responseLayoutEditorFunction");
|
|
1582
|
+
this.responseLayoutEditorFunction = lt(this.formSchemaUtils);
|
|
844
1583
|
}
|
|
845
|
-
getPropertyConfig(
|
|
846
|
-
return this.propertyConfig.categories.basic = this.getBasicProperties(
|
|
1584
|
+
getPropertyConfig(n, i) {
|
|
1585
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(n, i), this.propertyConfig.categories.appearance = this.getAppearanceProperties(n, i), this.propertyConfig.categories.editor = this.getEditorProperties(n), this.propertyConfig;
|
|
847
1586
|
}
|
|
848
|
-
getBasicProperties(
|
|
849
|
-
var
|
|
850
|
-
var
|
|
851
|
-
this.setDesignViewModelField(
|
|
852
|
-
const
|
|
1587
|
+
getBasicProperties(n, i) {
|
|
1588
|
+
var d;
|
|
1589
|
+
var l = this;
|
|
1590
|
+
this.setDesignViewModelField(n);
|
|
1591
|
+
const r = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
853
1592
|
return {
|
|
854
1593
|
description: "Basic Information",
|
|
855
1594
|
title: "基本信息",
|
|
@@ -871,7 +1610,7 @@ class ke extends Fe {
|
|
|
871
1610
|
textField: "value",
|
|
872
1611
|
valueField: "key",
|
|
873
1612
|
editable: !1,
|
|
874
|
-
data:
|
|
1613
|
+
data: l.designViewModelField ? L.getEditorTypesByMDataType((d = l.designViewModelField.type) == null ? void 0 : d.name) : L.getAllInputTypes()
|
|
875
1614
|
}
|
|
876
1615
|
},
|
|
877
1616
|
label: {
|
|
@@ -887,8 +1626,8 @@ class ke extends Fe {
|
|
|
887
1626
|
type: "field-selector",
|
|
888
1627
|
bindingType: { enable: !1 },
|
|
889
1628
|
editorParams: {
|
|
890
|
-
propertyData:
|
|
891
|
-
formBasicInfo:
|
|
1629
|
+
propertyData: n,
|
|
1630
|
+
formBasicInfo: r
|
|
892
1631
|
},
|
|
893
1632
|
columns: [
|
|
894
1633
|
{ field: "name", title: "字段名称" },
|
|
@@ -896,26 +1635,27 @@ class ke extends Fe {
|
|
|
896
1635
|
{ field: "fieldType", title: "字段类型" }
|
|
897
1636
|
],
|
|
898
1637
|
textField: "bindingField",
|
|
899
|
-
data:
|
|
1638
|
+
data: c
|
|
900
1639
|
}
|
|
901
1640
|
}
|
|
902
1641
|
},
|
|
903
|
-
setPropertyRelates(
|
|
904
|
-
if (
|
|
905
|
-
switch (
|
|
1642
|
+
setPropertyRelates(p, s) {
|
|
1643
|
+
if (p)
|
|
1644
|
+
switch (p && p.propertyID) {
|
|
906
1645
|
case "type": {
|
|
907
|
-
|
|
1646
|
+
l.changeControlType(n, p, i);
|
|
908
1647
|
break;
|
|
909
1648
|
}
|
|
910
1649
|
case "label": {
|
|
911
|
-
|
|
1650
|
+
p.needRefreshControlTree = !0;
|
|
912
1651
|
break;
|
|
913
1652
|
}
|
|
914
1653
|
}
|
|
915
1654
|
}
|
|
916
1655
|
};
|
|
917
1656
|
}
|
|
918
|
-
getAppearanceProperties(
|
|
1657
|
+
getAppearanceProperties(n, i) {
|
|
1658
|
+
var l = this;
|
|
919
1659
|
return {
|
|
920
1660
|
title: "样式",
|
|
921
1661
|
description: "Appearance",
|
|
@@ -936,61 +1676,74 @@ class ke extends Fe {
|
|
|
936
1676
|
description: "响应式列宽",
|
|
937
1677
|
title: "响应式列宽",
|
|
938
1678
|
type: "boolean",
|
|
939
|
-
visible: !
|
|
1679
|
+
visible: !0,
|
|
1680
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1681
|
+
refreshPanelAfterChanged: !0,
|
|
940
1682
|
editor: {
|
|
941
|
-
type: "response-layout-editor-setting"
|
|
942
|
-
|
|
943
|
-
|
|
1683
|
+
type: "response-layout-editor-setting",
|
|
1684
|
+
initialState: l.responseLayoutEditorFunction.checkCanOpenLayoutEditor(n, l.componentId)
|
|
1685
|
+
}
|
|
944
1686
|
}
|
|
1687
|
+
},
|
|
1688
|
+
setPropertyRelates(r, c) {
|
|
1689
|
+
if (r)
|
|
1690
|
+
switch (r && r.propertyID) {
|
|
1691
|
+
case "responseLayout":
|
|
1692
|
+
l.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(r.propertyValue, l.componentId || n.id), l.updateUnifiedLayoutAfterResponseLayoutChanged(l.componentId), l.updateElementByParentContainer(n.id, i), delete n.responseLayout;
|
|
1693
|
+
break;
|
|
1694
|
+
case "class":
|
|
1695
|
+
l.updateUnifiedLayoutAfterControlChanged(r.propertyValue, n.id, this.componentId), l.updateElementByParentContainer(n.id, i);
|
|
1696
|
+
break;
|
|
1697
|
+
}
|
|
945
1698
|
}
|
|
946
1699
|
};
|
|
947
1700
|
}
|
|
948
|
-
getEditorProperties(
|
|
949
|
-
return this.getComponentConfig(
|
|
1701
|
+
getEditorProperties(n) {
|
|
1702
|
+
return this.getComponentConfig(n);
|
|
950
1703
|
}
|
|
951
1704
|
/**
|
|
952
1705
|
* 卡片控件:切换控件类型后事件
|
|
953
1706
|
* @param propertyData 控件DOM属性
|
|
954
1707
|
* @param newControlType 新控件类型
|
|
955
1708
|
*/
|
|
956
|
-
changeControlType(
|
|
957
|
-
var
|
|
958
|
-
const
|
|
959
|
-
if (!
|
|
1709
|
+
changeControlType(n, i, l) {
|
|
1710
|
+
var u, o, a, f;
|
|
1711
|
+
const r = i.propertyValue, c = l && l.parent && l.parent.schema;
|
|
1712
|
+
if (!c)
|
|
960
1713
|
return;
|
|
961
|
-
const
|
|
962
|
-
let
|
|
1714
|
+
const d = c.contents.findIndex((m) => m.id === n.id), p = c.contents[d];
|
|
1715
|
+
let s;
|
|
963
1716
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
964
1717
|
editor: {
|
|
965
|
-
$type:
|
|
1718
|
+
$type: r
|
|
966
1719
|
},
|
|
967
1720
|
name: this.designViewModelField.name,
|
|
968
1721
|
require: this.designViewModelField.require,
|
|
969
1722
|
readonly: this.designViewModelField.readonly
|
|
970
|
-
}, !1),
|
|
971
|
-
id:
|
|
972
|
-
appearance:
|
|
973
|
-
size:
|
|
974
|
-
label:
|
|
975
|
-
binding:
|
|
976
|
-
visible:
|
|
977
|
-
}), Object.assign(
|
|
978
|
-
isTextArea:
|
|
979
|
-
placeholder: (
|
|
980
|
-
holdPlace: (
|
|
981
|
-
readonly: (a =
|
|
982
|
-
require: (
|
|
983
|
-
}),
|
|
984
|
-
(
|
|
985
|
-
),
|
|
986
|
-
}
|
|
987
|
-
getComponentConfig(
|
|
988
|
-
const
|
|
1723
|
+
}, !1), s = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r)), s || (s = this.controlCreatorUtils.createFormGroupWithoutField(r)), Object.assign(s, {
|
|
1724
|
+
id: p.id,
|
|
1725
|
+
appearance: p.appearance,
|
|
1726
|
+
size: p.size,
|
|
1727
|
+
label: p.label,
|
|
1728
|
+
binding: p.binding,
|
|
1729
|
+
visible: p.visible
|
|
1730
|
+
}), Object.assign(s.editor, {
|
|
1731
|
+
isTextArea: s.isTextArea && p.isTextArea,
|
|
1732
|
+
placeholder: (u = p.editor) == null ? void 0 : u.placeholder,
|
|
1733
|
+
holdPlace: (o = p.editor) == null ? void 0 : o.holdPlace,
|
|
1734
|
+
readonly: (a = p.editor) == null ? void 0 : a.readonly,
|
|
1735
|
+
require: (f = p.editor) == null ? void 0 : f.require
|
|
1736
|
+
}), c.contents.splice(d, 1), c.contents.splice(d, 0, s), l.schema = Object.assign(p, s), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1737
|
+
(m) => m.classList.remove("dgComponentSelected")
|
|
1738
|
+
), ot.value++;
|
|
1739
|
+
}
|
|
1740
|
+
getComponentConfig(n, i = {}, l = {}) {
|
|
1741
|
+
const r = Object.assign({
|
|
989
1742
|
description: "编辑器",
|
|
990
1743
|
title: "编辑器",
|
|
991
1744
|
type: "input-group",
|
|
992
1745
|
$converter: "/converter/property-editor.converter"
|
|
993
|
-
},
|
|
1746
|
+
}, i), c = Object.assign({
|
|
994
1747
|
readonly: {
|
|
995
1748
|
description: "",
|
|
996
1749
|
title: "只读",
|
|
@@ -1011,11 +1764,59 @@ class ke extends Fe {
|
|
|
1011
1764
|
title: "提示文本",
|
|
1012
1765
|
type: "string"
|
|
1013
1766
|
}
|
|
1014
|
-
},
|
|
1015
|
-
return { ...
|
|
1767
|
+
}, l);
|
|
1768
|
+
return { ...r, properties: { ...c } };
|
|
1769
|
+
}
|
|
1770
|
+
/**
|
|
1771
|
+
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
1772
|
+
* @param controlClass 控件样式
|
|
1773
|
+
* @param controlId 控件Id
|
|
1774
|
+
* @param componentId 控件所在组件id
|
|
1775
|
+
*/
|
|
1776
|
+
updateUnifiedLayoutAfterControlChanged(n, i, l) {
|
|
1777
|
+
const r = n.split(" ");
|
|
1778
|
+
let c = r.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), d = r.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), p = r.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), s = r.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
1779
|
+
c = c || "col-12", d = d || "col-md-" + c.replace("col-", ""), p = p || "col-xl-" + d.replace("col-md-", ""), s = s || "col-el-" + p.replace("col-xl-", "");
|
|
1780
|
+
const u = {
|
|
1781
|
+
id: i,
|
|
1782
|
+
columnInSM: parseInt(c.replace("col-", ""), 10),
|
|
1783
|
+
columnInMD: parseInt(d.replace("col-md-", ""), 10),
|
|
1784
|
+
columnInLG: parseInt(p.replace("col-xl-", ""), 10),
|
|
1785
|
+
columnInEL: parseInt(s.replace("col-el-", ""), 10)
|
|
1786
|
+
};
|
|
1787
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(l, u);
|
|
1788
|
+
}
|
|
1789
|
+
/**
|
|
1790
|
+
* 修改控件布局配置后更新Form统一布局配置
|
|
1791
|
+
* @param componentId 组件Id
|
|
1792
|
+
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
1793
|
+
*/
|
|
1794
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(n, i) {
|
|
1795
|
+
const { formNode: l } = this.responseLayoutEditorFunction.checkCanFindFormNode(n);
|
|
1796
|
+
if (!l || !l.unifiedLayout)
|
|
1797
|
+
return;
|
|
1798
|
+
const r = [];
|
|
1799
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(l, r, 1), i) {
|
|
1800
|
+
const m = r.find((y) => y.id === i.id);
|
|
1801
|
+
Object.assign(m || {}, i);
|
|
1802
|
+
}
|
|
1803
|
+
const c = r.map((m) => m.columnInSM), d = r.map((m) => m.columnInMD), p = r.map((m) => m.columnInLG), s = r.map((m) => m.columnInEL), u = this.checkIsUniqueColumn(c) ? c[0] : null, o = this.checkIsUniqueColumn(d) ? d[0] : null, a = this.checkIsUniqueColumn(p) ? p[0] : null, f = this.checkIsUniqueColumn(s) ? s[0] : null;
|
|
1804
|
+
Object.assign(l.unifiedLayout, {
|
|
1805
|
+
uniqueColClassInSM: u,
|
|
1806
|
+
uniqueColClassInMD: o,
|
|
1807
|
+
uniqueColClassInLG: a,
|
|
1808
|
+
uniqueColClassInEL: f
|
|
1809
|
+
});
|
|
1810
|
+
}
|
|
1811
|
+
/**
|
|
1812
|
+
* 校验宽度样式值是否一致
|
|
1813
|
+
*/
|
|
1814
|
+
checkIsUniqueColumn(n) {
|
|
1815
|
+
const i = new Set(n);
|
|
1816
|
+
return Array.from(i).length === 1;
|
|
1016
1817
|
}
|
|
1017
1818
|
}
|
|
1018
|
-
class
|
|
1819
|
+
class rt extends at {
|
|
1019
1820
|
constructor(t, n) {
|
|
1020
1821
|
super(t, n);
|
|
1021
1822
|
}
|
|
@@ -1039,41 +1840,41 @@ class we extends ke {
|
|
|
1039
1840
|
});
|
|
1040
1841
|
}
|
|
1041
1842
|
}
|
|
1042
|
-
function
|
|
1843
|
+
function st(e, t) {
|
|
1043
1844
|
const {
|
|
1044
1845
|
canAccepts: n,
|
|
1045
1846
|
checkCanDeleteComponent: i,
|
|
1046
1847
|
checkCanMoveComponent: l,
|
|
1047
|
-
hideNestedPaddingInDesginerView:
|
|
1048
|
-
onAcceptMovedChildElement:
|
|
1049
|
-
resolveComponentContext:
|
|
1050
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1051
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1052
|
-
} =
|
|
1053
|
-
function a
|
|
1054
|
-
return new
|
|
1848
|
+
hideNestedPaddingInDesginerView: r,
|
|
1849
|
+
onAcceptMovedChildElement: c,
|
|
1850
|
+
resolveComponentContext: d,
|
|
1851
|
+
triggerBelongedComponentToMoveWhenMoved: p,
|
|
1852
|
+
triggerBelongedComponentToDeleteWhenDeleted: s
|
|
1853
|
+
} = tt(e), u = e.schema;
|
|
1854
|
+
function o(a, f) {
|
|
1855
|
+
return new rt(a, t).getPropertyConfig(u, f);
|
|
1055
1856
|
}
|
|
1056
1857
|
return {
|
|
1057
1858
|
canAccepts: n,
|
|
1058
1859
|
checkCanDeleteComponent: i,
|
|
1059
1860
|
checkCanMoveComponent: l,
|
|
1060
|
-
hideNestedPaddingInDesginerView:
|
|
1061
|
-
onAcceptMovedChildElement:
|
|
1062
|
-
resolveComponentContext:
|
|
1063
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1064
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1065
|
-
getPropsConfig:
|
|
1861
|
+
hideNestedPaddingInDesginerView: r,
|
|
1862
|
+
onAcceptMovedChildElement: c,
|
|
1863
|
+
resolveComponentContext: d,
|
|
1864
|
+
triggerBelongedComponentToMoveWhenMoved: p,
|
|
1865
|
+
triggerBelongedComponentToDeleteWhenDeleted: s,
|
|
1866
|
+
getPropsConfig: o
|
|
1066
1867
|
};
|
|
1067
1868
|
}
|
|
1068
|
-
const
|
|
1869
|
+
const ut = /* @__PURE__ */ E({
|
|
1069
1870
|
name: "FComboListDesign",
|
|
1070
|
-
props:
|
|
1871
|
+
props: j,
|
|
1071
1872
|
emits: ["clear", "update:modelValue", "change"],
|
|
1072
1873
|
setup(e, t) {
|
|
1073
|
-
const n =
|
|
1074
|
-
return
|
|
1075
|
-
n.value.componentInstance =
|
|
1076
|
-
}), t.expose(
|
|
1874
|
+
const n = C(), i = T("designer-host-service"), l = T("design-item-context"), r = st(l, i), c = W(n, l, r);
|
|
1875
|
+
return G(() => {
|
|
1876
|
+
n.value.componentInstance = c;
|
|
1877
|
+
}), t.expose(c.value), () => F(et, {
|
|
1077
1878
|
ref: n,
|
|
1078
1879
|
buttonContent: e.dropDownIcon,
|
|
1079
1880
|
readonly: !0,
|
|
@@ -1083,24 +1884,24 @@ const Te = /* @__PURE__ */ P({
|
|
|
1083
1884
|
enableClear: !0
|
|
1084
1885
|
}, null);
|
|
1085
1886
|
}
|
|
1086
|
-
}),
|
|
1887
|
+
}), ct = (e) => {
|
|
1087
1888
|
const t = e;
|
|
1088
1889
|
return t.install = function(n) {
|
|
1089
1890
|
n.component(t.name, e);
|
|
1090
1891
|
}, e;
|
|
1091
1892
|
};
|
|
1092
|
-
|
|
1093
|
-
e["combo-list"] =
|
|
1893
|
+
P.register = (e, t, n, i) => {
|
|
1894
|
+
e["combo-list"] = P, t["combo-list"] = z;
|
|
1094
1895
|
};
|
|
1095
|
-
|
|
1096
|
-
e["combo-list"] =
|
|
1896
|
+
P.registerDesigner = (e, t, n) => {
|
|
1897
|
+
e["combo-list"] = ut, t["combo-list"] = z;
|
|
1097
1898
|
};
|
|
1098
|
-
const
|
|
1899
|
+
const bt = ct(P);
|
|
1099
1900
|
export {
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1901
|
+
P as FComboList,
|
|
1902
|
+
we as Placement,
|
|
1903
|
+
Be as ViewType,
|
|
1904
|
+
j as comboListProps,
|
|
1905
|
+
bt as default,
|
|
1906
|
+
z as propsResolver
|
|
1106
1907
|
};
|