@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,103 +1,103 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as b, computed as
|
|
5
|
-
import { cloneDeep as
|
|
1
|
+
var re = Object.defineProperty;
|
|
2
|
+
var ie = (e, n, t) => n in e ? re(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
|
+
var M = (e, n, t) => ie(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
+
import { ref as b, computed as g, watch as x, onMounted as N, nextTick as $, createVNode as E, reactive as se, withDirectives as ue, resolveDirective as ce, defineComponent as Z, Fragment as q, inject as H } from "vue";
|
|
5
|
+
import { isPlainObject as z, cloneDeep as J } from "lodash-es";
|
|
6
6
|
import "bignumber.js";
|
|
7
|
-
import { useNumber as
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
const { properties:
|
|
12
|
-
return (!a || !o.find((
|
|
7
|
+
import { useNumber as de, useFormat as pe, useSpinner as fe, useTextBox as me } from "../number-spinner/index.esm.js";
|
|
8
|
+
import { DgControl as X } from "../designer-canvas/index.esm.js";
|
|
9
|
+
const Q = {}, Y = {};
|
|
10
|
+
function j(e) {
|
|
11
|
+
const { properties: n, title: t, ignore: o } = e, a = o && Array.isArray(o), s = Object.keys(n).reduce((u, f) => ((!a || !o.find((i) => i == f)) && (u[f] = n[f].type === "object" && n[f].properties ? j(n[f]) : J(n[f].default)), u), {});
|
|
12
|
+
return t && (!a || !o.find((u) => u == "id")) && (s.id = `${t}-${Date.now()}`), s;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const o =
|
|
14
|
+
function _(e, n = {}, t) {
|
|
15
|
+
const o = Q[e];
|
|
16
16
|
if (o) {
|
|
17
|
-
let a =
|
|
18
|
-
const
|
|
19
|
-
return a =
|
|
17
|
+
let a = j(o);
|
|
18
|
+
const s = Y[e];
|
|
19
|
+
return a = s ? s({ getSchemaByType: _ }, a, n, t) : a, a;
|
|
20
20
|
}
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
const
|
|
25
|
-
return Object.keys(e).reduce((o, a) => (o[a] &&
|
|
23
|
+
function ye(e, n) {
|
|
24
|
+
const t = j(n);
|
|
25
|
+
return Object.keys(e).reduce((o, a) => (o[a] && z(o[a]) && z(e[a]) ? Object.assign(o[a], e[a]) : o[a] = e[a], o), t), t;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function he(e, n) {
|
|
28
28
|
return Object.keys(e).filter((o) => e[o] != null).reduce((o, a) => {
|
|
29
|
-
if (
|
|
30
|
-
const
|
|
31
|
-
if (typeof
|
|
32
|
-
o[
|
|
29
|
+
if (n.has(a)) {
|
|
30
|
+
const s = n.get(a);
|
|
31
|
+
if (typeof s == "string")
|
|
32
|
+
o[s] = e[a];
|
|
33
33
|
else {
|
|
34
|
-
const
|
|
35
|
-
Object.assign(o,
|
|
34
|
+
const u = s(a, e[a], e);
|
|
35
|
+
Object.assign(o, u);
|
|
36
36
|
}
|
|
37
37
|
} else
|
|
38
38
|
o[a] = e[a];
|
|
39
39
|
return o;
|
|
40
40
|
}, {});
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const o =
|
|
44
|
-
return
|
|
42
|
+
function ge(e, n, t = /* @__PURE__ */ new Map()) {
|
|
43
|
+
const o = ye(e, n);
|
|
44
|
+
return he(o, t);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
function
|
|
46
|
+
function ve(e = {}) {
|
|
47
|
+
function n(r, c, l, d) {
|
|
48
48
|
if (typeof l == "number")
|
|
49
|
-
return
|
|
49
|
+
return d[r].length === l;
|
|
50
50
|
if (typeof l == "object") {
|
|
51
|
-
const m = Object.keys(l)[0],
|
|
51
|
+
const m = Object.keys(l)[0], p = l[m];
|
|
52
52
|
if (m === "not")
|
|
53
|
-
return Number(
|
|
53
|
+
return Number(d[r].length) !== Number(p);
|
|
54
54
|
if (m === "moreThan")
|
|
55
|
-
return Number(
|
|
55
|
+
return Number(d[r].length) >= Number(p);
|
|
56
56
|
if (m === "lessThan")
|
|
57
|
-
return Number(
|
|
57
|
+
return Number(d[r].length) <= Number(p);
|
|
58
58
|
}
|
|
59
59
|
return !1;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
61
|
+
function t(r, c, l, d) {
|
|
62
|
+
return d[r] && d[r].propertyValue && String(d[r].propertyValue.value) === String(l);
|
|
63
63
|
}
|
|
64
64
|
const o = /* @__PURE__ */ new Map([
|
|
65
|
-
["length",
|
|
66
|
-
["getProperty",
|
|
65
|
+
["length", n],
|
|
66
|
+
["getProperty", t]
|
|
67
67
|
]);
|
|
68
68
|
Object.keys(e).reduce((r, c) => (r.set(c, e[c]), r), o);
|
|
69
69
|
function a(r, c) {
|
|
70
70
|
const l = r;
|
|
71
|
-
return typeof c == "number" ? [{ target: l, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: l, operator: "getProperty", param: r, value: !!c }] : typeof c == "object" ? Object.keys(c).map((
|
|
72
|
-
if (
|
|
73
|
-
return { target: l, operator: "length", param: null, value: c[
|
|
74
|
-
const m =
|
|
75
|
-
return { target: l, operator: "getProperty", param: m, value:
|
|
71
|
+
return typeof c == "number" ? [{ target: l, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: l, operator: "getProperty", param: r, value: !!c }] : typeof c == "object" ? Object.keys(c).map((d) => {
|
|
72
|
+
if (d === "length")
|
|
73
|
+
return { target: l, operator: "length", param: null, value: c[d] };
|
|
74
|
+
const m = d, p = c[d];
|
|
75
|
+
return { target: l, operator: "getProperty", param: m, value: p };
|
|
76
76
|
}) : [];
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return Object.keys(r).reduce((l,
|
|
80
|
-
const m = a(
|
|
78
|
+
function s(r) {
|
|
79
|
+
return Object.keys(r).reduce((l, d) => {
|
|
80
|
+
const m = a(d, r[d]);
|
|
81
81
|
return l.push(...m), l;
|
|
82
82
|
}, []);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function u(r, c) {
|
|
85
85
|
if (o.has(r.operator)) {
|
|
86
86
|
const l = o.get(r.operator);
|
|
87
87
|
return l && l(r.target, r.param, r.value, c) || !1;
|
|
88
88
|
}
|
|
89
89
|
return !1;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return
|
|
91
|
+
function f(r, c) {
|
|
92
|
+
return s(r).reduce((m, p) => m && u(p, c), !0);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
const l = Object.keys(r),
|
|
96
|
-
return
|
|
94
|
+
function i(r, c) {
|
|
95
|
+
const l = Object.keys(r), d = l.includes("allOf"), m = l.includes("anyOf"), p = d || m, w = (p ? r[p ? d ? "allOf" : "anyOf" : "allOf"] : [r]).map((F) => f(F, c));
|
|
96
|
+
return d ? !w.includes(!1) : w.includes(!0);
|
|
97
97
|
}
|
|
98
|
-
return { parseValueSchema:
|
|
98
|
+
return { parseValueSchema: i };
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const h = {
|
|
101
101
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
102
102
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
103
103
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -134,25 +134,26 @@ const f = {
|
|
|
134
134
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
135
135
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
136
136
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
137
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
138
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
139
|
+
}, be = {}, Ce = {};
|
|
140
|
+
ve();
|
|
141
|
+
function we(e, n, t = /* @__PURE__ */ new Map(), o = (u, f, i) => f, a = {}, s = (u) => u) {
|
|
142
|
+
return Q[n.title] = n, Y[n.title] = o, be[n.title] = a, Ce[n.title] = s, (u = {}) => {
|
|
143
|
+
const f = ge(u, n, t), i = Object.keys(e).reduce((r, c) => (r[c] = e[c].default, r), {});
|
|
144
|
+
return Object.assign(i, f);
|
|
144
145
|
};
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
-
return { customClass:
|
|
147
|
+
function Be(e, n) {
|
|
148
|
+
return { customClass: n.class, customStyle: n.style };
|
|
148
149
|
}
|
|
149
|
-
const
|
|
150
|
-
["appearance",
|
|
150
|
+
const Me = /* @__PURE__ */ new Map([
|
|
151
|
+
["appearance", Be]
|
|
151
152
|
]);
|
|
152
|
-
function Te(e,
|
|
153
|
-
return
|
|
153
|
+
function Te(e, n, t) {
|
|
154
|
+
return n;
|
|
154
155
|
}
|
|
155
|
-
const ke = "https://json-schema.org/draft/2020-12/schema",
|
|
156
|
+
const ke = "https://json-schema.org/draft/2020-12/schema", Se = "https://farris-design.gitee.io/input-group.schema.json", Ie = "input-group", Ee = "A Farris Input Component", Fe = "object", Ae = {
|
|
156
157
|
id: {
|
|
157
158
|
description: "The unique identifier for a Input Group",
|
|
158
159
|
type: "string"
|
|
@@ -354,18 +355,19 @@ const ke = "https://json-schema.org/draft/2020-12/schema", Me = "https://farris-
|
|
|
354
355
|
type: "string",
|
|
355
356
|
default: ""
|
|
356
357
|
}
|
|
357
|
-
},
|
|
358
|
+
}, Pe = [
|
|
358
359
|
"id",
|
|
359
360
|
"type"
|
|
360
|
-
],
|
|
361
|
+
], xe = {
|
|
361
362
|
$schema: ke,
|
|
362
|
-
$id:
|
|
363
|
-
title:
|
|
364
|
-
description:
|
|
365
|
-
type:
|
|
363
|
+
$id: Se,
|
|
364
|
+
title: Ie,
|
|
365
|
+
description: Ee,
|
|
366
|
+
type: Fe,
|
|
366
367
|
properties: Ae,
|
|
367
|
-
required:
|
|
368
|
-
},
|
|
368
|
+
required: Pe
|
|
369
|
+
}, U = {
|
|
370
|
+
id: { Type: String, default: "" },
|
|
369
371
|
/** 是否自动完成 */
|
|
370
372
|
autocomplete: { Type: String, default: "off" },
|
|
371
373
|
/** 自定义CLASS */
|
|
@@ -431,117 +433,117 @@ const ke = "https://json-schema.org/draft/2020-12/schema", Me = "https://farris-
|
|
|
431
433
|
* - input: 输入时更新
|
|
432
434
|
*/
|
|
433
435
|
updateOn: { type: String, default: "blur" }
|
|
434
|
-
},
|
|
435
|
-
function De(e,
|
|
436
|
-
const a = b(e.disabled),
|
|
436
|
+
}, K = we(U, xe, Me, Te);
|
|
437
|
+
function De(e, n, t, o) {
|
|
438
|
+
const a = b(e.disabled), s = b(!1), u = b("text"), f = b(e.showBorder), i = b(e.textAlign), r = b(e.updateOn), c = g(() => e.editable || !e.readonly), l = g(() => e.editable && !e.disabled && !e.readonly), d = g(() => !e.disabled && s.value), m = g(() => t.value === "" || t.value === null || t.value === void 0), p = g(() => (e.disabled || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), y = g(() => e.readonly || !e.editable), B = g(() => e.enableTitle ? t.value : ""), w = g(() => ({
|
|
437
439
|
"form-control": !0,
|
|
438
440
|
"f-utils-fill": !0,
|
|
439
|
-
"text-left":
|
|
440
|
-
"text-center":
|
|
441
|
-
"text-right":
|
|
442
|
-
})),
|
|
443
|
-
const
|
|
441
|
+
"text-left": i.value === "left",
|
|
442
|
+
"text-center": i.value === "center",
|
|
443
|
+
"text-right": i.value === "right"
|
|
444
|
+
})), T = g(() => {
|
|
445
|
+
const v = {
|
|
444
446
|
"f-cmp-inputgroup": !0,
|
|
445
447
|
"input-group": !0,
|
|
446
448
|
"f-state-disable": a.value,
|
|
447
449
|
"f-state-editable": l.value,
|
|
448
|
-
"f-state-readonly":
|
|
449
|
-
"f-state-focus":
|
|
450
|
+
"f-state-readonly": y.value,
|
|
451
|
+
"f-state-focus": d.value
|
|
450
452
|
};
|
|
451
|
-
return (e.customClass || "").split(" ").reduce((
|
|
452
|
-
}),
|
|
453
|
-
function
|
|
454
|
-
|
|
453
|
+
return (e.customClass || "").split(" ").reduce((W, le) => (W[le] = !0, W), v), v;
|
|
454
|
+
}), F = g(() => f.value ? "" : "border-width : 0 ");
|
|
455
|
+
function S(v, P = !0) {
|
|
456
|
+
t.value = v, o.value !== v && (o.value = v), P && n.emit("change", v), n.emit("update:modelValue", v), n.emit("update:value", v);
|
|
455
457
|
}
|
|
456
|
-
|
|
458
|
+
x(
|
|
457
459
|
() => e.modelValue,
|
|
458
|
-
(
|
|
459
|
-
|
|
460
|
+
(v, P) => {
|
|
461
|
+
v !== P && (t.value = v, o.value = v);
|
|
460
462
|
}
|
|
461
|
-
),
|
|
462
|
-
|
|
463
|
+
), x(() => e.disabled, (v, P) => {
|
|
464
|
+
v !== P && (a.value = v);
|
|
463
465
|
});
|
|
464
|
-
function
|
|
465
|
-
return
|
|
466
|
+
function C(v) {
|
|
467
|
+
return s.value = !1, n.emit("blur", v), v.stopPropagation(), !1;
|
|
466
468
|
}
|
|
467
|
-
function
|
|
468
|
-
|
|
469
|
+
function I(v) {
|
|
470
|
+
n.emit("click", v);
|
|
469
471
|
}
|
|
470
|
-
function
|
|
471
|
-
e.disabled || (
|
|
472
|
+
function k(v) {
|
|
473
|
+
e.disabled || (f.value && (s.value = !0), c.value && n.emit("focus", v));
|
|
472
474
|
}
|
|
473
|
-
function
|
|
474
|
-
|
|
475
|
-
const
|
|
476
|
-
o.value =
|
|
475
|
+
function A(v) {
|
|
476
|
+
n.emit("input", v.target.value);
|
|
477
|
+
const P = v.target.value;
|
|
478
|
+
o.value = P, r.value === "change" && (n.emit("update:modelValue", P), n.emit("update:value", P));
|
|
477
479
|
}
|
|
478
|
-
function
|
|
479
|
-
|
|
480
|
+
function D(v) {
|
|
481
|
+
n.emit("keydown", v);
|
|
480
482
|
}
|
|
481
|
-
function
|
|
482
|
-
|
|
483
|
+
function G(v) {
|
|
484
|
+
n.emit("keyup", v);
|
|
483
485
|
}
|
|
484
|
-
function
|
|
485
|
-
|
|
486
|
+
function oe(v) {
|
|
487
|
+
v.target.tagName !== "INPUT" && v.preventDefault(), v.stopPropagation();
|
|
486
488
|
}
|
|
487
|
-
function
|
|
489
|
+
function ae(v) {
|
|
488
490
|
if (r.value === "blur") {
|
|
489
|
-
const
|
|
490
|
-
|
|
491
|
+
const P = v.target.value;
|
|
492
|
+
v.stopPropagation(), S(P);
|
|
491
493
|
}
|
|
492
494
|
}
|
|
493
495
|
return {
|
|
494
|
-
changeTextBoxValue:
|
|
496
|
+
changeTextBoxValue: S,
|
|
495
497
|
disabled: a,
|
|
496
498
|
displayText: o,
|
|
497
499
|
editable: l,
|
|
498
|
-
hasFocused:
|
|
499
|
-
inputGroupClass:
|
|
500
|
-
inputType:
|
|
500
|
+
hasFocused: d,
|
|
501
|
+
inputGroupClass: T,
|
|
502
|
+
inputType: u,
|
|
501
503
|
isEmpty: m,
|
|
502
|
-
modelValue:
|
|
503
|
-
readonly:
|
|
504
|
-
onBlur:
|
|
505
|
-
onClick:
|
|
506
|
-
onFocus:
|
|
507
|
-
onInput:
|
|
508
|
-
onKeydown:
|
|
509
|
-
onKeyup:
|
|
510
|
-
onMousedown:
|
|
511
|
-
onTextBoxValueChange:
|
|
512
|
-
placeholder:
|
|
513
|
-
textBoxClass:
|
|
514
|
-
textBoxTitle:
|
|
515
|
-
inputGroupStyle:
|
|
504
|
+
modelValue: t,
|
|
505
|
+
readonly: y,
|
|
506
|
+
onBlur: C,
|
|
507
|
+
onClick: I,
|
|
508
|
+
onFocus: k,
|
|
509
|
+
onInput: A,
|
|
510
|
+
onKeydown: D,
|
|
511
|
+
onKeyup: G,
|
|
512
|
+
onMousedown: oe,
|
|
513
|
+
onTextBoxValueChange: ae,
|
|
514
|
+
placeholder: p,
|
|
515
|
+
textBoxClass: w,
|
|
516
|
+
textBoxTitle: B,
|
|
517
|
+
inputGroupStyle: F
|
|
516
518
|
};
|
|
517
519
|
}
|
|
518
|
-
function
|
|
519
|
-
const a = b(e.disabled),
|
|
520
|
-
|
|
521
|
-
const r =
|
|
520
|
+
function Le(e, n, t, o) {
|
|
521
|
+
const a = b(e.disabled), s = b(!1), u = b("text"), f = b(e.showBorder), i = b(e.textAlign);
|
|
522
|
+
g(() => e.editable || !e.readonly);
|
|
523
|
+
const r = g(() => e.editable && !e.disabled && !e.readonly), c = g(() => !e.disabled && s.value), l = g(() => t.value === "" || t.value === null || t.value === void 0), d = g(() => e.placeholder), m = g(() => e.readonly || !e.editable), p = g(() => e.enableTitle ? t.value : ""), y = g(() => ({
|
|
522
524
|
"form-control": !0,
|
|
523
525
|
// 'f-utils-fill': true,
|
|
524
|
-
"text-left":
|
|
525
|
-
"text-center":
|
|
526
|
-
"text-right":
|
|
527
|
-
})),
|
|
526
|
+
"text-left": i.value === "left",
|
|
527
|
+
"text-center": i.value === "center",
|
|
528
|
+
"text-right": i.value === "right"
|
|
529
|
+
})), B = g(() => ({
|
|
528
530
|
"f-cmp-inputgroup": !0,
|
|
529
531
|
"input-group": !0,
|
|
530
532
|
"f-state-disable": !0,
|
|
531
533
|
"f-state-editable": !1,
|
|
532
534
|
"f-state-readonly": !0
|
|
533
535
|
// 'f-state-focus': hasFocused.value
|
|
534
|
-
})),
|
|
536
|
+
})), w = g(() => f.value ? "" : "border-width : 0 ");
|
|
535
537
|
return {
|
|
536
538
|
// changeTextBoxValue,
|
|
537
539
|
disabled: a,
|
|
538
540
|
displayText: o,
|
|
539
541
|
editable: r,
|
|
540
542
|
hasFocused: c,
|
|
541
|
-
inputGroupClass:
|
|
542
|
-
inputType:
|
|
543
|
+
inputGroupClass: B,
|
|
544
|
+
inputType: u,
|
|
543
545
|
isEmpty: l,
|
|
544
|
-
modelValue:
|
|
546
|
+
modelValue: t,
|
|
545
547
|
readonly: m,
|
|
546
548
|
// onBlur,
|
|
547
549
|
// onClick,
|
|
@@ -551,350 +553,350 @@ function Ve(e, t, n, o) {
|
|
|
551
553
|
// onKeyup,
|
|
552
554
|
// onMousedown,
|
|
553
555
|
// onTextBoxValueChange,
|
|
554
|
-
placeholder:
|
|
555
|
-
textBoxClass:
|
|
556
|
-
textBoxTitle:
|
|
557
|
-
inputGroupStyle:
|
|
556
|
+
placeholder: d,
|
|
557
|
+
textBoxClass: y,
|
|
558
|
+
textBoxTitle: p,
|
|
559
|
+
inputGroupStyle: w
|
|
558
560
|
};
|
|
559
561
|
}
|
|
560
|
-
function
|
|
561
|
-
const o = b(!1), a =
|
|
562
|
-
function r(
|
|
563
|
-
o.value =
|
|
562
|
+
function R(e, n, t) {
|
|
563
|
+
const o = b(!1), a = g(() => e.enableClear && !e.readonly && !e.disabled), { changeTextBoxValue: s, displayText: u, hasFocused: f, isEmpty: i } = t;
|
|
564
|
+
function r(y) {
|
|
565
|
+
o.value = y;
|
|
564
566
|
}
|
|
565
|
-
|
|
566
|
-
|
|
567
|
+
x(u, () => {
|
|
568
|
+
f != null && f.value ? r(!!(u != null && u.value)) : r(!1);
|
|
567
569
|
});
|
|
568
|
-
const c =
|
|
570
|
+
const c = g(() => ({
|
|
569
571
|
"input-group-text": !0,
|
|
570
572
|
"input-group-clear": !0
|
|
571
|
-
})), l =
|
|
573
|
+
})), l = g(() => ({
|
|
572
574
|
width: "24px",
|
|
573
575
|
display: o.value ? "flex" : "none"
|
|
574
576
|
}));
|
|
575
|
-
function
|
|
576
|
-
|
|
577
|
+
function d(y) {
|
|
578
|
+
y.stopPropagation(), a.value && (s("", !0), r(!o.value), n.emit("clear"));
|
|
577
579
|
}
|
|
578
|
-
function m(
|
|
579
|
-
a.value && !
|
|
580
|
+
function m(y) {
|
|
581
|
+
a.value && !i.value && r(!0);
|
|
580
582
|
}
|
|
581
|
-
function
|
|
583
|
+
function p(y) {
|
|
582
584
|
a.value && r(!1);
|
|
583
585
|
}
|
|
584
|
-
return { clearButtonClass: c, clearButtonStyle: l, hasShownClearButton: o, onClearValue:
|
|
586
|
+
return { clearButtonClass: c, clearButtonStyle: l, hasShownClearButton: o, onClearValue: d, onMouseEnter: m, onMouseLeave: p, shouldShowClearButton: a };
|
|
585
587
|
}
|
|
586
|
-
const
|
|
587
|
-
function
|
|
588
|
+
const Ne = ["moz", "ms", "webkit"];
|
|
589
|
+
function Ve() {
|
|
588
590
|
let e = 0;
|
|
589
|
-
return (
|
|
590
|
-
const
|
|
591
|
-
t
|
|
591
|
+
return (n) => {
|
|
592
|
+
const t = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (t - e)), a = setTimeout(() => {
|
|
593
|
+
n(t + o);
|
|
592
594
|
}, o);
|
|
593
|
-
return e =
|
|
595
|
+
return e = t + o, a;
|
|
594
596
|
};
|
|
595
597
|
}
|
|
596
|
-
function
|
|
598
|
+
function Oe() {
|
|
597
599
|
if (typeof window > "u")
|
|
598
600
|
return () => 0;
|
|
599
601
|
if (window.requestAnimationFrame)
|
|
600
602
|
return window.requestAnimationFrame.bind(window);
|
|
601
|
-
const e =
|
|
602
|
-
return e ? window[`${e}RequestAnimationFrame`] :
|
|
603
|
+
const e = Ne.filter((n) => `${n}RequestAnimationFrame` in window)[0];
|
|
604
|
+
return e ? window[`${e}RequestAnimationFrame`] : Ve();
|
|
603
605
|
}
|
|
604
|
-
|
|
606
|
+
Oe();
|
|
605
607
|
const Ge = (e) => {
|
|
606
|
-
const
|
|
607
|
-
return
|
|
608
|
-
|
|
608
|
+
const n = e;
|
|
609
|
+
return n.install = function(t) {
|
|
610
|
+
t.component(n.name, e);
|
|
609
611
|
}, e;
|
|
610
612
|
};
|
|
611
|
-
function ee(e,
|
|
612
|
-
const
|
|
613
|
-
return { appendedButtonClass:
|
|
613
|
+
function ee(e, n) {
|
|
614
|
+
const t = b(e.groupText), o = g(() => e.showButtonWhenDisabled && (e.readonly || e.disabled)), a = g(() => e.enableClear || !!e.groupText);
|
|
615
|
+
return { appendedButtonClass: g(() => ({
|
|
614
616
|
"input-group-append": !0,
|
|
615
617
|
"append-force-show": o.value
|
|
616
|
-
})), appendedContent:
|
|
618
|
+
})), appendedContent: t, shouldShowAppendedButton: a };
|
|
617
619
|
}
|
|
618
|
-
function te(e,
|
|
619
|
-
const { appendedContent: a } = o,
|
|
620
|
-
|
|
621
|
-
|
|
620
|
+
function te(e, n, t, o) {
|
|
621
|
+
const { appendedContent: a } = o, s = b(e.enableViewPassword), u = g(() => e.type === "password"), f = '<span class="f-icon f-icon-eye" style="color: rgb(56, 143, 255);"></span>', i = '<span class="f-icon f-icon-eye"></span>', r = b(!1);
|
|
622
|
+
x(() => [e.readonly, e.disabled], ([d, m]) => {
|
|
623
|
+
u.value && (t.value = d || m ? "password" : t.value, a.value = d || m ? i : a.value);
|
|
622
624
|
});
|
|
623
625
|
function c() {
|
|
624
|
-
return r.value = !r.value,
|
|
626
|
+
return r.value = !r.value, t.value = r.value ? "text" : "password", a.value = r.value ? f : i, !1;
|
|
625
627
|
}
|
|
626
628
|
function l() {
|
|
627
|
-
|
|
629
|
+
t.value = u.value ? "password" : "text", a.value = u.value ? s.value ? i : "" : a.value;
|
|
628
630
|
}
|
|
629
|
-
return l(), { isPassword:
|
|
631
|
+
return l(), { isPassword: u, onClickAppendedButton: c };
|
|
630
632
|
}
|
|
631
|
-
function
|
|
633
|
+
function je(e, n, t) {
|
|
632
634
|
const o = b(), {
|
|
633
635
|
onBlurTextBox: a,
|
|
634
|
-
onFocusTextBox:
|
|
635
|
-
onInput:
|
|
636
|
-
onKeyDown:
|
|
637
|
-
textBoxValue:
|
|
638
|
-
} =
|
|
636
|
+
onFocusTextBox: s,
|
|
637
|
+
onInput: u,
|
|
638
|
+
onKeyDown: f,
|
|
639
|
+
textBoxValue: i
|
|
640
|
+
} = t, r = g(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), c = g(() => ({
|
|
639
641
|
"form-control": !0,
|
|
640
642
|
"f-utils-fill": !0
|
|
641
|
-
})), l =
|
|
643
|
+
})), l = g(() => ({
|
|
642
644
|
"text-align": e.textAlign
|
|
643
645
|
}));
|
|
644
|
-
function
|
|
645
|
-
|
|
646
|
+
function d(y) {
|
|
647
|
+
y.stopPropagation();
|
|
646
648
|
}
|
|
647
649
|
function m() {
|
|
648
650
|
e.selectOnCreated, e.focusOnCreated;
|
|
649
651
|
}
|
|
650
|
-
async function
|
|
651
|
-
|
|
652
|
+
async function p(y) {
|
|
653
|
+
s(y), await $, m();
|
|
652
654
|
}
|
|
653
|
-
return
|
|
654
|
-
await
|
|
655
|
-
}), () =>
|
|
655
|
+
return N(async () => {
|
|
656
|
+
await $, m();
|
|
657
|
+
}), () => E("input", {
|
|
656
658
|
ref: o,
|
|
657
659
|
class: c.value,
|
|
658
660
|
style: l.value,
|
|
659
661
|
type: "text",
|
|
660
|
-
value:
|
|
662
|
+
value: i.value,
|
|
661
663
|
disabled: e.disabled,
|
|
662
664
|
readonly: e.readonly || !e.editable,
|
|
663
665
|
placeholder: r.value,
|
|
664
666
|
onBlur: a,
|
|
665
|
-
onChange:
|
|
666
|
-
onFocus:
|
|
667
|
-
onInput:
|
|
668
|
-
onKeydown:
|
|
667
|
+
onChange: d,
|
|
668
|
+
onFocus: p,
|
|
669
|
+
onInput: u,
|
|
670
|
+
onKeydown: f
|
|
669
671
|
}, null);
|
|
670
672
|
}
|
|
671
|
-
function
|
|
673
|
+
function Ue(e, n, t) {
|
|
672
674
|
const {
|
|
673
675
|
canDownward: o,
|
|
674
676
|
canUpward: a,
|
|
675
|
-
onClickDownButton:
|
|
676
|
-
onClickUpButton:
|
|
677
|
-
} =
|
|
677
|
+
onClickDownButton: s,
|
|
678
|
+
onClickUpButton: u
|
|
679
|
+
} = t, f = g(() => ({
|
|
678
680
|
"input-group-append": !0,
|
|
679
681
|
"btn-group": !0,
|
|
680
682
|
"btn-group-number": !0
|
|
681
|
-
})),
|
|
683
|
+
})), i = g(() => ({
|
|
682
684
|
btn: !0,
|
|
683
685
|
"btn-secondary": !0,
|
|
684
686
|
"btn-number-flag": !0
|
|
685
|
-
})), r =
|
|
687
|
+
})), r = g(() => ({
|
|
686
688
|
cursor: a() ? "pointer" : "not-allowed",
|
|
687
689
|
"margin-left": 0
|
|
688
|
-
})), c =
|
|
690
|
+
})), c = g(() => ({
|
|
689
691
|
cursor: o() ? "pointer" : "not-allowed",
|
|
690
692
|
"margin-left": 0
|
|
691
693
|
}));
|
|
692
|
-
return () =>
|
|
693
|
-
class:
|
|
694
|
-
}, [
|
|
694
|
+
return () => E("div", {
|
|
695
|
+
class: f.value
|
|
696
|
+
}, [E("button", {
|
|
695
697
|
title: "upButton",
|
|
696
|
-
class:
|
|
698
|
+
class: i.value,
|
|
697
699
|
style: r.value,
|
|
698
|
-
onClick:
|
|
700
|
+
onClick: u,
|
|
699
701
|
disabled: !a()
|
|
700
|
-
}, [
|
|
702
|
+
}, [E("span", {
|
|
701
703
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
702
|
-
}, null)]),
|
|
704
|
+
}, null)]), E("button", {
|
|
703
705
|
title: "downButton",
|
|
704
|
-
class:
|
|
706
|
+
class: i.value,
|
|
705
707
|
style: c.value,
|
|
706
|
-
onClick:
|
|
708
|
+
onClick: s,
|
|
707
709
|
disabled: !o()
|
|
708
|
-
}, [
|
|
710
|
+
}, [E("span", {
|
|
709
711
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
710
712
|
}, null)])]);
|
|
711
713
|
}
|
|
712
|
-
function
|
|
713
|
-
const
|
|
714
|
-
displayValue:
|
|
715
|
-
modelValue:
|
|
714
|
+
function We(e, n) {
|
|
715
|
+
const t = de(e, n), o = pe(e, n, t), a = fe(e, n, o, t), s = me(e, n, o, t, a), u = Ue(e, n, a), {
|
|
716
|
+
displayValue: f,
|
|
717
|
+
modelValue: i,
|
|
716
718
|
getRealValue: r
|
|
717
|
-
} =
|
|
719
|
+
} = t, c = je(e, n, s), {
|
|
718
720
|
format: l
|
|
719
721
|
} = o, {
|
|
720
|
-
isFocus:
|
|
721
|
-
} =
|
|
722
|
-
return
|
|
723
|
-
const
|
|
724
|
-
|
|
725
|
-
}),
|
|
726
|
-
const
|
|
727
|
-
|
|
728
|
-
}),
|
|
729
|
-
|
|
730
|
-
}),
|
|
731
|
-
|
|
732
|
-
}), () =>
|
|
722
|
+
isFocus: d
|
|
723
|
+
} = s, m = g(() => !e.disabled && !e.readonly);
|
|
724
|
+
return N(() => {
|
|
725
|
+
const p = r(e.modelValue);
|
|
726
|
+
f.value = l(p);
|
|
727
|
+
}), x(() => [e.value], ([p]) => {
|
|
728
|
+
const y = r(p);
|
|
729
|
+
i.value = y, f.value = l(y);
|
|
730
|
+
}), x(() => [e.modelValue], ([p]) => {
|
|
731
|
+
p !== i.value && (i.value = p, !d.value && (f.value = l(r(p))));
|
|
732
|
+
}), x(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
733
|
+
f.value = l(i.value);
|
|
734
|
+
}), () => E("div", {
|
|
733
735
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
734
|
-
}, [c(), m.value &&
|
|
736
|
+
}, [c(), m.value && u()]);
|
|
735
737
|
}
|
|
736
|
-
function
|
|
737
|
-
const a = b(),
|
|
738
|
-
isPassword:
|
|
739
|
-
} =
|
|
738
|
+
function $e(e, n, t, o) {
|
|
739
|
+
const a = b(), s = b(e.autocomplete), u = b(e.enableTitle), {
|
|
740
|
+
isPassword: f
|
|
741
|
+
} = t, i = b(e.minLength), r = b(e.maxLength), c = b(e.tabIndex), {
|
|
740
742
|
disabled: l,
|
|
741
|
-
displayText:
|
|
743
|
+
displayText: d,
|
|
742
744
|
inputType: m,
|
|
743
|
-
onBlur:
|
|
744
|
-
onFocus:
|
|
745
|
-
onInput:
|
|
746
|
-
onClick:
|
|
747
|
-
onKeydown:
|
|
748
|
-
onKeyup:
|
|
749
|
-
onMousedown:
|
|
750
|
-
onTextBoxValueChange:
|
|
751
|
-
readonly:
|
|
752
|
-
placeholder:
|
|
753
|
-
textBoxClass:
|
|
754
|
-
textBoxTitle:
|
|
745
|
+
onBlur: p,
|
|
746
|
+
onFocus: y,
|
|
747
|
+
onInput: B,
|
|
748
|
+
onClick: w,
|
|
749
|
+
onKeydown: T,
|
|
750
|
+
onKeyup: F,
|
|
751
|
+
onMousedown: S,
|
|
752
|
+
onTextBoxValueChange: C,
|
|
753
|
+
readonly: I,
|
|
754
|
+
placeholder: k,
|
|
755
|
+
textBoxClass: A,
|
|
756
|
+
textBoxTitle: D
|
|
755
757
|
} = o;
|
|
756
|
-
return
|
|
758
|
+
return N(() => {
|
|
757
759
|
e.selectOnCreated, e.focusOnCreated;
|
|
758
|
-
}), () =>
|
|
760
|
+
}), () => E("input", {
|
|
759
761
|
ref: a,
|
|
760
762
|
name: "input-group-value",
|
|
761
|
-
autocomplete:
|
|
762
|
-
class:
|
|
763
|
+
autocomplete: s.value,
|
|
764
|
+
class: A.value,
|
|
763
765
|
disabled: l == null ? void 0 : l.value,
|
|
764
766
|
maxlength: r.value,
|
|
765
|
-
minlength:
|
|
766
|
-
placeholder:
|
|
767
|
-
readonly:
|
|
767
|
+
minlength: i.value,
|
|
768
|
+
placeholder: k.value,
|
|
769
|
+
readonly: I == null ? void 0 : I.value,
|
|
768
770
|
tabindex: c.value,
|
|
769
|
-
title:
|
|
771
|
+
title: u.value && !f.value ? D.value : "",
|
|
770
772
|
type: m.value,
|
|
771
|
-
value:
|
|
772
|
-
onBlur:
|
|
773
|
-
onClick:
|
|
774
|
-
onChange:
|
|
775
|
-
onFocus:
|
|
776
|
-
onInput:
|
|
777
|
-
onKeydown:
|
|
778
|
-
onKeyup:
|
|
779
|
-
onMousedown:
|
|
773
|
+
value: d == null ? void 0 : d.value,
|
|
774
|
+
onBlur: p,
|
|
775
|
+
onClick: w,
|
|
776
|
+
onChange: C,
|
|
777
|
+
onFocus: y,
|
|
778
|
+
onInput: B,
|
|
779
|
+
onKeydown: T,
|
|
780
|
+
onKeyup: F,
|
|
781
|
+
onMousedown: S
|
|
780
782
|
}, null);
|
|
781
783
|
}
|
|
782
|
-
function qe(e,
|
|
783
|
-
const
|
|
784
|
+
function qe(e, n) {
|
|
785
|
+
const t = g(() => e.useExtendInfo && !!e.extendInfo), o = se({
|
|
784
786
|
content: e.extendInfo
|
|
785
787
|
});
|
|
786
788
|
function a() {
|
|
787
|
-
|
|
789
|
+
n.emit("updateExtendInfo");
|
|
788
790
|
}
|
|
789
|
-
return () =>
|
|
791
|
+
return () => t.value && ue(E("span", {
|
|
790
792
|
class: "input-group-before-tips",
|
|
791
793
|
onMouseenter: a
|
|
792
|
-
}, [
|
|
794
|
+
}, [E("i", {
|
|
793
795
|
class: "f-icon f-icon-info-circle"
|
|
794
|
-
}, null),
|
|
796
|
+
}, null), E("b", {
|
|
795
797
|
class: "tips-arrow"
|
|
796
|
-
}, null)]), [[
|
|
798
|
+
}, null)]), [[ce("tooltip"), o]]);
|
|
797
799
|
}
|
|
798
|
-
function ne(e,
|
|
800
|
+
function ne(e, n, t, o, a) {
|
|
799
801
|
const {
|
|
800
|
-
appendedButtonClass:
|
|
801
|
-
appendedContent:
|
|
802
|
-
} =
|
|
802
|
+
appendedButtonClass: s,
|
|
803
|
+
appendedContent: u
|
|
804
|
+
} = t, f = g(() => e.showButtonWhenDisabled && (!e.editable || !e.readonly) && !e.disabled), i = g(() => u.value && !n.slots.groupTextTemplate), r = g(() => !!n.slots.groupTextTemplate), {
|
|
803
805
|
clearButtonClass: c,
|
|
804
806
|
clearButtonStyle: l,
|
|
805
|
-
onClearValue:
|
|
807
|
+
onClearValue: d,
|
|
806
808
|
shouldShowClearButton: m
|
|
807
809
|
} = o;
|
|
808
|
-
function
|
|
809
|
-
return
|
|
810
|
+
function p() {
|
|
811
|
+
return E("span", {
|
|
810
812
|
id: "clearIcon",
|
|
811
813
|
class: c.value,
|
|
812
814
|
style: l.value,
|
|
813
|
-
onClick: (
|
|
814
|
-
}, [
|
|
815
|
+
onClick: (k) => d(k)
|
|
816
|
+
}, [E("i", {
|
|
815
817
|
class: "f-icon modal_close"
|
|
816
818
|
}, null)]);
|
|
817
819
|
}
|
|
818
|
-
function
|
|
819
|
-
|
|
820
|
+
function y(k) {
|
|
821
|
+
n.emit("iconMouseEnter", k);
|
|
820
822
|
}
|
|
821
|
-
function
|
|
822
|
-
|
|
823
|
+
function B(k) {
|
|
824
|
+
n.emit("iconMouseLeave", k);
|
|
823
825
|
}
|
|
824
|
-
function
|
|
825
|
-
|
|
826
|
-
originalEvent:
|
|
827
|
-
}),
|
|
826
|
+
function w(k) {
|
|
827
|
+
f.value && n.emit("clickHandle", {
|
|
828
|
+
originalEvent: k
|
|
829
|
+
}), k.stopPropagation();
|
|
828
830
|
}
|
|
829
|
-
const
|
|
830
|
-
function
|
|
831
|
-
return
|
|
831
|
+
const T = e.type === "password" ? a.onClickAppendedButton : w;
|
|
832
|
+
function F() {
|
|
833
|
+
return E("span", {
|
|
832
834
|
class: "input-group-text",
|
|
833
|
-
onMouseenter: (
|
|
834
|
-
onMouseleave: (
|
|
835
|
-
innerHTML:
|
|
836
|
-
onClick: (
|
|
835
|
+
onMouseenter: (k) => y(k),
|
|
836
|
+
onMouseleave: (k) => B(k),
|
|
837
|
+
innerHTML: u.value,
|
|
838
|
+
onClick: (k) => T(k)
|
|
837
839
|
}, null);
|
|
838
840
|
}
|
|
839
|
-
function
|
|
840
|
-
return
|
|
841
|
+
function S() {
|
|
842
|
+
return n.slots.groupTextTemplate && n.slots.groupTextTemplate();
|
|
841
843
|
}
|
|
842
|
-
function
|
|
843
|
-
return
|
|
844
|
+
function C() {
|
|
845
|
+
return i.value ? F : r.value ? S : "";
|
|
844
846
|
}
|
|
845
|
-
const
|
|
846
|
-
return () =>
|
|
847
|
-
class:
|
|
848
|
-
}, [m.value &&
|
|
847
|
+
const I = C();
|
|
848
|
+
return () => E("div", {
|
|
849
|
+
class: s.value
|
|
850
|
+
}, [m.value && p(), I && I()]);
|
|
849
851
|
}
|
|
850
|
-
const
|
|
852
|
+
const V = /* @__PURE__ */ Z({
|
|
851
853
|
name: "FInputGroup",
|
|
852
|
-
props:
|
|
854
|
+
props: U,
|
|
853
855
|
emits: ["clear", "change", "blur", "click", "clickHandle", "focus", "input", "keydown", "keyup", "iconMouseEnter", "iconMouseLeave", "update:modelValue", "update:value", "updateExtendInfo", "valueChange"],
|
|
854
|
-
setup(e,
|
|
855
|
-
const
|
|
856
|
-
inputGroupClass:
|
|
857
|
-
inputType:
|
|
858
|
-
inputGroupStyle:
|
|
859
|
-
} = a,
|
|
856
|
+
setup(e, n) {
|
|
857
|
+
const t = b(e.modelValue), o = b(e.modelValue), a = De(e, n, t, o), {
|
|
858
|
+
inputGroupClass: s,
|
|
859
|
+
inputType: u,
|
|
860
|
+
inputGroupStyle: f
|
|
861
|
+
} = a, i = ee(e), {
|
|
860
862
|
shouldShowAppendedButton: r
|
|
861
|
-
} =
|
|
863
|
+
} = i, c = R(e, n, a), {
|
|
862
864
|
onMouseEnter: l,
|
|
863
|
-
onMouseLeave:
|
|
864
|
-
} = c, m = te(e,
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
}),
|
|
868
|
-
|
|
869
|
-
}),
|
|
870
|
-
e.value && (
|
|
865
|
+
onMouseLeave: d
|
|
866
|
+
} = c, m = te(e, n, u, i), p = We(e, n), y = $e(e, n, m, a), B = ne(e, n, i, c, m), w = qe(e, n), T = g(() => e.type === "number");
|
|
867
|
+
x(() => [e.value], ([S]) => {
|
|
868
|
+
t.value = S, o.value = S;
|
|
869
|
+
}), x(() => [e.modelValue], ([S]) => {
|
|
870
|
+
t.value = S, o.value = S;
|
|
871
|
+
}), N(() => {
|
|
872
|
+
e.value && (t.value = e.value, o.value = e.value);
|
|
871
873
|
});
|
|
872
|
-
const
|
|
873
|
-
id:
|
|
874
|
-
class:
|
|
875
|
-
style:
|
|
874
|
+
const F = () => E(q, null, [E("div", {
|
|
875
|
+
id: e.id,
|
|
876
|
+
class: s.value,
|
|
877
|
+
style: f.value,
|
|
876
878
|
onMouseenter: l,
|
|
877
|
-
onMouseleave:
|
|
878
|
-
}, [
|
|
879
|
-
return () =>
|
|
879
|
+
onMouseleave: d
|
|
880
|
+
}, [T.value ? p() : E(q, null, [w(), y(), r.value && B()])])]);
|
|
881
|
+
return () => F();
|
|
880
882
|
}
|
|
881
883
|
});
|
|
882
|
-
function
|
|
884
|
+
function He(e, n) {
|
|
883
885
|
e.schema;
|
|
884
|
-
const
|
|
886
|
+
const t = b(!0), o = b(!0);
|
|
885
887
|
function a(l) {
|
|
886
888
|
return !1;
|
|
887
889
|
}
|
|
888
|
-
function
|
|
890
|
+
function s() {
|
|
889
891
|
return !1;
|
|
890
892
|
}
|
|
891
|
-
function
|
|
893
|
+
function u() {
|
|
892
894
|
return !1;
|
|
893
895
|
}
|
|
894
|
-
function
|
|
896
|
+
function f() {
|
|
895
897
|
return !0;
|
|
896
898
|
}
|
|
897
|
-
function
|
|
899
|
+
function i(l) {
|
|
898
900
|
}
|
|
899
901
|
function r() {
|
|
900
902
|
}
|
|
@@ -903,53 +905,53 @@ function We(e, t) {
|
|
|
903
905
|
}
|
|
904
906
|
return {
|
|
905
907
|
canAccepts: a,
|
|
906
|
-
checkCanDeleteComponent:
|
|
907
|
-
checkCanMoveComponent:
|
|
908
|
-
hideNestedPaddingInDesginerView:
|
|
909
|
-
onAcceptMovedChildElement:
|
|
908
|
+
checkCanDeleteComponent: s,
|
|
909
|
+
checkCanMoveComponent: u,
|
|
910
|
+
hideNestedPaddingInDesginerView: f,
|
|
911
|
+
onAcceptMovedChildElement: i,
|
|
910
912
|
resolveComponentContext: r,
|
|
911
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
913
|
+
triggerBelongedComponentToMoveWhenMoved: t,
|
|
912
914
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
913
915
|
getPropsConfig: c
|
|
914
916
|
};
|
|
915
917
|
}
|
|
916
|
-
class
|
|
917
|
-
constructor(
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
918
|
+
class ze {
|
|
919
|
+
constructor(n, t) {
|
|
920
|
+
M(this, "componentId");
|
|
921
|
+
M(this, "viewModelId");
|
|
922
|
+
M(this, "eventsEditorUtils");
|
|
923
|
+
M(this, "formSchemaUtils");
|
|
924
|
+
M(this, "formMetadataConverter");
|
|
925
|
+
M(this, "designViewModelUtils");
|
|
926
|
+
M(this, "designViewModelField");
|
|
927
|
+
M(this, "controlCreatorUtils");
|
|
928
|
+
M(this, "designerHostService");
|
|
929
|
+
M(this, "schemaService", null);
|
|
930
|
+
M(this, "metadataService", null);
|
|
931
|
+
M(this, "propertyConfig", {
|
|
930
932
|
type: "object",
|
|
931
933
|
categories: {}
|
|
932
934
|
});
|
|
933
935
|
var o;
|
|
934
|
-
this.componentId =
|
|
936
|
+
this.componentId = n, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
935
937
|
}
|
|
936
938
|
getTableInfo() {
|
|
937
|
-
var
|
|
938
|
-
return (
|
|
939
|
+
var n;
|
|
940
|
+
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
939
941
|
}
|
|
940
|
-
setDesignViewModelField(
|
|
941
|
-
const
|
|
942
|
-
if (
|
|
942
|
+
setDesignViewModelField(n) {
|
|
943
|
+
const t = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
944
|
+
if (t) {
|
|
943
945
|
if (!this.designViewModelField) {
|
|
944
946
|
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
945
|
-
this.designViewModelField = o.fields.find((a) => a.id ===
|
|
947
|
+
this.designViewModelField = o.fields.find((a) => a.id === t);
|
|
946
948
|
}
|
|
947
|
-
|
|
949
|
+
n.updateOn = this.designViewModelField.updateOn;
|
|
948
950
|
}
|
|
949
951
|
}
|
|
950
|
-
changeFieldEditorType(
|
|
952
|
+
changeFieldEditorType(n, t) {
|
|
951
953
|
}
|
|
952
|
-
getBasicPropConfig(
|
|
954
|
+
getBasicPropConfig(n) {
|
|
953
955
|
return {
|
|
954
956
|
description: "Basic Information",
|
|
955
957
|
title: "基本信息",
|
|
@@ -968,13 +970,13 @@ class He {
|
|
|
968
970
|
type: "combo-list",
|
|
969
971
|
textField: "name",
|
|
970
972
|
valueField: "value",
|
|
971
|
-
data: [{ value:
|
|
973
|
+
data: [{ value: n.type, name: h[n.type].name }]
|
|
972
974
|
}
|
|
973
975
|
}
|
|
974
976
|
}
|
|
975
977
|
};
|
|
976
978
|
}
|
|
977
|
-
getAppearanceConfig(
|
|
979
|
+
getAppearanceConfig(n = null) {
|
|
978
980
|
return {
|
|
979
981
|
title: "样式",
|
|
980
982
|
description: "Appearance",
|
|
@@ -994,90 +996,212 @@ class He {
|
|
|
994
996
|
}
|
|
995
997
|
};
|
|
996
998
|
}
|
|
999
|
+
/**
|
|
1000
|
+
*
|
|
1001
|
+
* @param propertyId
|
|
1002
|
+
* @param componentInstance
|
|
1003
|
+
* @returns
|
|
1004
|
+
*/
|
|
1005
|
+
updateElementByParentContainer(n, t) {
|
|
1006
|
+
const o = t && t.parent && t.parent.schema;
|
|
1007
|
+
if (!o)
|
|
1008
|
+
return;
|
|
1009
|
+
const a = o.contents.findIndex((u) => u.id === n), s = J(o.contents[a]);
|
|
1010
|
+
o.contents.splice(a, 1), o.contents.splice(a, 0, s);
|
|
1011
|
+
}
|
|
997
1012
|
}
|
|
998
|
-
const
|
|
1013
|
+
const L = class L {
|
|
999
1014
|
/**
|
|
1000
1015
|
* 根据绑定字段类型获取可用的输入类控件
|
|
1001
1016
|
*/
|
|
1002
|
-
static getEditorTypesByMDataType(
|
|
1003
|
-
const
|
|
1004
|
-
return
|
|
1017
|
+
static getEditorTypesByMDataType(n) {
|
|
1018
|
+
const t = L.fieldControlTypeMapping[n];
|
|
1019
|
+
return t || [{ key: "", value: "" }];
|
|
1005
1020
|
}
|
|
1006
1021
|
/**
|
|
1007
1022
|
* 获取所有输入类控件
|
|
1008
1023
|
*/
|
|
1009
1024
|
static getAllInputTypes() {
|
|
1010
|
-
const
|
|
1011
|
-
for (let
|
|
1012
|
-
|
|
1013
|
-
|
|
1025
|
+
const n = [];
|
|
1026
|
+
for (let t in L.fieldControlTypeMapping)
|
|
1027
|
+
L.fieldControlTypeMapping[t].forEach((o) => {
|
|
1028
|
+
n.find((a) => a.key === o.key && a.value === o.value) || n.push({ key: o.key, value: o.value });
|
|
1014
1029
|
});
|
|
1015
|
-
return
|
|
1030
|
+
return n;
|
|
1016
1031
|
}
|
|
1017
1032
|
};
|
|
1018
1033
|
/**
|
|
1019
1034
|
* <字段类型,可配置的控件类型列表>的映射
|
|
1020
1035
|
*/
|
|
1021
|
-
|
|
1036
|
+
M(L, "fieldControlTypeMapping", {
|
|
1022
1037
|
String: [
|
|
1023
|
-
{ key:
|
|
1024
|
-
{ key:
|
|
1025
|
-
{ key:
|
|
1026
|
-
{ key:
|
|
1027
|
-
{ key:
|
|
1028
|
-
{ key:
|
|
1029
|
-
{ key:
|
|
1038
|
+
{ key: h["input-group"].type, value: h["input-group"].name },
|
|
1039
|
+
{ key: h.lookup.type, value: h.lookup.name },
|
|
1040
|
+
{ key: h["date-picker"].type, value: h["date-picker"].name },
|
|
1041
|
+
{ key: h["check-box"].type, value: h["check-box"].name },
|
|
1042
|
+
{ key: h["check-group"].type, value: h["check-group"].name },
|
|
1043
|
+
{ key: h["radio-group"].type, value: h["radio-group"].name },
|
|
1044
|
+
{ key: h["combo-list"].type, value: h["combo-list"].name },
|
|
1045
|
+
{ key: h.textarea.type, value: h.textarea.name }
|
|
1030
1046
|
],
|
|
1031
1047
|
Text: [
|
|
1032
|
-
{ key:
|
|
1033
|
-
{ key:
|
|
1048
|
+
{ key: h.textarea.type, value: h.textarea.name },
|
|
1049
|
+
{ key: h.lookup.type, value: h.lookup.name }
|
|
1034
1050
|
],
|
|
1035
1051
|
Decimal: [
|
|
1036
|
-
{ key:
|
|
1052
|
+
{ key: h["number-spinner"].type, value: h["number-spinner"].name }
|
|
1037
1053
|
],
|
|
1038
1054
|
Integer: [
|
|
1039
|
-
{ key:
|
|
1055
|
+
{ key: h["number-spinner"].type, value: h["number-spinner"].name }
|
|
1040
1056
|
],
|
|
1041
1057
|
Number: [
|
|
1042
|
-
{ key:
|
|
1058
|
+
{ key: h["number-spinner"].type, value: h["number-spinner"].name }
|
|
1043
1059
|
],
|
|
1044
1060
|
BigNumber: [
|
|
1045
|
-
{ key:
|
|
1061
|
+
{ key: h["number-spinner"].type, value: h["number-spinner"].name }
|
|
1046
1062
|
],
|
|
1047
1063
|
Date: [
|
|
1048
|
-
{ key:
|
|
1064
|
+
{ key: h["date-picker"].type, value: h["date-picker"].name }
|
|
1049
1065
|
],
|
|
1050
1066
|
DateTime: [
|
|
1051
|
-
{ key:
|
|
1067
|
+
{ key: h["date-picker"].type, value: h["date-picker"].name }
|
|
1052
1068
|
],
|
|
1053
1069
|
Boolean: [
|
|
1054
|
-
{ key:
|
|
1055
|
-
{ key:
|
|
1070
|
+
{ key: h.switch.type, value: h.switch.name },
|
|
1071
|
+
{ key: h["check-box"].type, value: h["check-box"].name }
|
|
1056
1072
|
],
|
|
1057
1073
|
Enum: [
|
|
1058
|
-
{ key:
|
|
1059
|
-
{ key:
|
|
1074
|
+
{ key: h["combo-list"].type, value: h["combo-list"].name },
|
|
1075
|
+
{ key: h["radio-group"].type, value: h["radio-group"].name }
|
|
1060
1076
|
],
|
|
1061
1077
|
Object: [
|
|
1062
|
-
{ key:
|
|
1063
|
-
{ key:
|
|
1064
|
-
{ key:
|
|
1078
|
+
{ key: h.lookup.type, value: h.lookup.name },
|
|
1079
|
+
{ key: h["combo-list"].type, value: h["combo-list"].name },
|
|
1080
|
+
{ key: h["radio-group"].type, value: h["radio-group"].name }
|
|
1065
1081
|
]
|
|
1066
1082
|
});
|
|
1067
|
-
let
|
|
1068
|
-
const
|
|
1069
|
-
class
|
|
1070
|
-
constructor(
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1083
|
+
let O = L;
|
|
1084
|
+
const Xe = b(0);
|
|
1085
|
+
class Ze {
|
|
1086
|
+
constructor() {
|
|
1087
|
+
/** 控件标题 */
|
|
1088
|
+
M(this, "label", "");
|
|
1089
|
+
/** 控件id */
|
|
1090
|
+
M(this, "id", "");
|
|
1091
|
+
/** 每个控件占用的栅格数 */
|
|
1092
|
+
M(this, "columnInSM", 12);
|
|
1093
|
+
M(this, "columnInMD", 6);
|
|
1094
|
+
M(this, "columnInLG", 3);
|
|
1095
|
+
M(this, "columnInEL", 2);
|
|
1096
|
+
/** 每个控件占用的列数 */
|
|
1097
|
+
M(this, "displayWidthInSM", 1);
|
|
1098
|
+
M(this, "displayWidthInMD", 1);
|
|
1099
|
+
M(this, "displayWidthInLG", 1);
|
|
1100
|
+
M(this, "displayWidthInEL", 1);
|
|
1101
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
1102
|
+
M(this, "displayColumnCountAtBreakPoint", "md");
|
|
1103
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
1104
|
+
M(this, "tagRow", 0);
|
|
1105
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
1106
|
+
M(this, "showTopBorder", 0);
|
|
1107
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
1108
|
+
M(this, "group", 1);
|
|
1109
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
1110
|
+
M(this, "isSupportedClass", !0);
|
|
1111
|
+
/** 控件所在分组id(设计器用的) */
|
|
1112
|
+
M(this, "fieldSetId", "");
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
function Je(e) {
|
|
1116
|
+
let n, t;
|
|
1117
|
+
const o = /* @__PURE__ */ new Map();
|
|
1118
|
+
let a = [];
|
|
1119
|
+
function s(c, l) {
|
|
1120
|
+
const m = c.split(" ").filter((T) => T.startsWith("col-"));
|
|
1121
|
+
if (m.length === 0) {
|
|
1122
|
+
l.isSupportedClass = !1;
|
|
1123
|
+
return;
|
|
1124
|
+
}
|
|
1125
|
+
let p = m.find((T) => /^col-([1-9]|10|11|12)$/.test(T)), y = m.find((T) => /^col-md-([1-9]|10|11|12)$/.test(T)), B = m.find((T) => /^col-xl-([1-9]|10|11|12)$/.test(T)), w = m.find((T) => /^col-el-([1-9]|10|11|12)$/.test(T));
|
|
1126
|
+
p = p || "col-12", l.columnInSM = parseInt(p.replace("col-", ""), 10), l.displayWidthInSM = l.columnInSM / 12, l.displayWidthInSM !== 1 && (l.isSupportedClass = !1), y = y || "col-md-" + l.columnInSM, l.columnInMD = parseInt(y.replace("col-md-", ""), 10), l.displayWidthInMD = l.columnInMD / 6, [1, 2].includes(l.displayWidthInMD) || (l.isSupportedClass = !1), B = B || "col-xl-" + l.columnInMD, l.columnInLG = parseInt(B.replace("col-xl-", ""), 10), l.displayWidthInLG = l.columnInLG / 3, [1, 2, 3, 4].includes(l.displayWidthInLG) || (l.isSupportedClass = !1), w = w || "col-el-" + l.columnInLG, l.columnInEL = parseInt(w.replace("col-el-", ""), 10), l.displayWidthInEL = l.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(l.displayWidthInEL) || (l.isSupportedClass = !1);
|
|
1127
|
+
}
|
|
1128
|
+
function u(c, l, d, m = !1) {
|
|
1129
|
+
let p = !1;
|
|
1130
|
+
c.contents.forEach((y) => {
|
|
1131
|
+
if (y.type === "fieldset") {
|
|
1132
|
+
d += 1, u(y, l, d, !0), p = !0;
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1135
|
+
p && (d += 1, p = !1);
|
|
1136
|
+
const B = y.appearance && y.appearance.class, w = new Ze();
|
|
1137
|
+
B ? s(B, w) : w.isSupportedClass = !1, w.label = y.label || y.id, w.id = y.id, w.group = d, m && (w.fieldSetId = c.id), t === y.id && (n = d), o.set(y.id, y), l.push(w);
|
|
1138
|
+
});
|
|
1139
|
+
}
|
|
1140
|
+
function f(c) {
|
|
1141
|
+
const l = e.getComponentById(c);
|
|
1142
|
+
if (!l || !l.componentType || !l.componentType.startsWith("form"))
|
|
1143
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
1144
|
+
const d = e.selectNode(l, (m) => m.type === X["response-form"].type);
|
|
1145
|
+
return !d || !d.contents || d.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: d };
|
|
1146
|
+
}
|
|
1147
|
+
function i(c, l) {
|
|
1148
|
+
l = l || c.id;
|
|
1149
|
+
const { result: d, message: m, formNode: p } = f(l);
|
|
1150
|
+
if (!d)
|
|
1151
|
+
return { result: d, message: m };
|
|
1152
|
+
t = c.id, a = [], o.clear();
|
|
1153
|
+
const y = p.contents[0].type === X.fieldset.type ? 0 : 1;
|
|
1154
|
+
u(p, a, y);
|
|
1155
|
+
const B = a.find((T) => !T.isSupportedClass);
|
|
1156
|
+
return {
|
|
1157
|
+
defaultState: {
|
|
1158
|
+
defaultGroupNumber: n || 1,
|
|
1159
|
+
model: B ? "customize" : "standard"
|
|
1160
|
+
},
|
|
1161
|
+
importData: a
|
|
1162
|
+
};
|
|
1163
|
+
}
|
|
1164
|
+
function r(c, l) {
|
|
1165
|
+
l = l;
|
|
1166
|
+
const { result: d, formNode: m } = f(l);
|
|
1167
|
+
if (!d)
|
|
1168
|
+
return "";
|
|
1169
|
+
const p = [];
|
|
1170
|
+
return c.forEach((y) => {
|
|
1171
|
+
var T;
|
|
1172
|
+
const B = o.get(y.id), w = B.appearance && B.appearance.class;
|
|
1173
|
+
if (w) {
|
|
1174
|
+
const S = w.split(" ").filter((G) => !G.startsWith("col-")), C = "col-" + y.columnInSM, I = "col-md-" + y.columnInMD, k = "col-xl-" + y.columnInLG, A = "col-el-" + y.columnInEL, D = [C, I, k, A].concat(S);
|
|
1175
|
+
B.appearance.class = D.join(" ");
|
|
1176
|
+
}
|
|
1177
|
+
if (y.fieldSetId) {
|
|
1178
|
+
const F = m.contents.find((C) => C.id === y.fieldSetId), S = p.find((C) => C.id === y.fieldSetId);
|
|
1179
|
+
S ? (T = S.contents) == null || T.push(B) : (p.push(F), F.contents = [B]);
|
|
1180
|
+
} else
|
|
1181
|
+
p.push(B);
|
|
1182
|
+
}), m.contents = p, m.id;
|
|
1183
|
+
}
|
|
1184
|
+
return {
|
|
1185
|
+
checkCanFindFormNode: f,
|
|
1186
|
+
checkCanOpenLayoutEditor: i,
|
|
1187
|
+
changeFormControlsByResponseLayoutConfig: r,
|
|
1188
|
+
getResonseFormLayoutConfig: u
|
|
1189
|
+
};
|
|
1190
|
+
}
|
|
1191
|
+
class Qe extends ze {
|
|
1192
|
+
constructor(t, o) {
|
|
1193
|
+
super(t, o);
|
|
1194
|
+
M(this, "responseLayoutEditorFunction");
|
|
1195
|
+
this.responseLayoutEditorFunction = Je(this.formSchemaUtils);
|
|
1196
|
+
}
|
|
1197
|
+
getPropertyConfig(t, o) {
|
|
1198
|
+
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;
|
|
1199
|
+
}
|
|
1200
|
+
getBasicProperties(t, o) {
|
|
1201
|
+
var f;
|
|
1202
|
+
var a = this;
|
|
1079
1203
|
this.setDesignViewModelField(t);
|
|
1080
|
-
const
|
|
1204
|
+
const s = this.formSchemaUtils.getFormMetadataBasicInfo(), u = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
1081
1205
|
return {
|
|
1082
1206
|
description: "Basic Information",
|
|
1083
1207
|
title: "基本信息",
|
|
@@ -1099,7 +1223,7 @@ class Je extends He {
|
|
|
1099
1223
|
textField: "value",
|
|
1100
1224
|
valueField: "key",
|
|
1101
1225
|
editable: !1,
|
|
1102
|
-
data:
|
|
1226
|
+
data: a.designViewModelField ? O.getEditorTypesByMDataType((f = a.designViewModelField.type) == null ? void 0 : f.name) : O.getAllInputTypes()
|
|
1103
1227
|
}
|
|
1104
1228
|
},
|
|
1105
1229
|
label: {
|
|
@@ -1116,7 +1240,7 @@ class Je extends He {
|
|
|
1116
1240
|
bindingType: { enable: !1 },
|
|
1117
1241
|
editorParams: {
|
|
1118
1242
|
propertyData: t,
|
|
1119
|
-
formBasicInfo:
|
|
1243
|
+
formBasicInfo: s
|
|
1120
1244
|
},
|
|
1121
1245
|
columns: [
|
|
1122
1246
|
{ field: "name", title: "字段名称" },
|
|
@@ -1124,15 +1248,15 @@ class Je extends He {
|
|
|
1124
1248
|
{ field: "fieldType", title: "字段类型" }
|
|
1125
1249
|
],
|
|
1126
1250
|
textField: "bindingField",
|
|
1127
|
-
data:
|
|
1251
|
+
data: u
|
|
1128
1252
|
}
|
|
1129
1253
|
}
|
|
1130
1254
|
},
|
|
1131
|
-
setPropertyRelates(i,
|
|
1255
|
+
setPropertyRelates(i, r) {
|
|
1132
1256
|
if (i)
|
|
1133
1257
|
switch (i && i.propertyID) {
|
|
1134
1258
|
case "type": {
|
|
1135
|
-
|
|
1259
|
+
a.changeControlType(t, i, o);
|
|
1136
1260
|
break;
|
|
1137
1261
|
}
|
|
1138
1262
|
case "label": {
|
|
@@ -1143,7 +1267,8 @@ class Je extends He {
|
|
|
1143
1267
|
}
|
|
1144
1268
|
};
|
|
1145
1269
|
}
|
|
1146
|
-
getAppearanceProperties(t) {
|
|
1270
|
+
getAppearanceProperties(t, o) {
|
|
1271
|
+
var a = this;
|
|
1147
1272
|
return {
|
|
1148
1273
|
title: "样式",
|
|
1149
1274
|
description: "Appearance",
|
|
@@ -1164,12 +1289,25 @@ class Je extends He {
|
|
|
1164
1289
|
description: "响应式列宽",
|
|
1165
1290
|
title: "响应式列宽",
|
|
1166
1291
|
type: "boolean",
|
|
1167
|
-
visible: !
|
|
1292
|
+
visible: !0,
|
|
1293
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1294
|
+
refreshPanelAfterChanged: !0,
|
|
1168
1295
|
editor: {
|
|
1169
|
-
type: "response-layout-editor-setting"
|
|
1170
|
-
|
|
1171
|
-
|
|
1296
|
+
type: "response-layout-editor-setting",
|
|
1297
|
+
initialState: a.responseLayoutEditorFunction.checkCanOpenLayoutEditor(t, a.componentId)
|
|
1298
|
+
}
|
|
1172
1299
|
}
|
|
1300
|
+
},
|
|
1301
|
+
setPropertyRelates(s, u) {
|
|
1302
|
+
if (s)
|
|
1303
|
+
switch (s && s.propertyID) {
|
|
1304
|
+
case "responseLayout":
|
|
1305
|
+
a.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue, a.componentId || t.id), a.updateUnifiedLayoutAfterResponseLayoutChanged(a.componentId), a.updateElementByParentContainer(t.id, o), delete t.responseLayout;
|
|
1306
|
+
break;
|
|
1307
|
+
case "class":
|
|
1308
|
+
a.updateUnifiedLayoutAfterControlChanged(s.propertyValue, t.id, this.componentId), a.updateElementByParentContainer(t.id, o);
|
|
1309
|
+
break;
|
|
1310
|
+
}
|
|
1173
1311
|
}
|
|
1174
1312
|
};
|
|
1175
1313
|
}
|
|
@@ -1181,44 +1319,44 @@ class Je extends He {
|
|
|
1181
1319
|
* @param propertyData 控件DOM属性
|
|
1182
1320
|
* @param newControlType 新控件类型
|
|
1183
1321
|
*/
|
|
1184
|
-
changeControlType(t,
|
|
1185
|
-
var
|
|
1186
|
-
const
|
|
1187
|
-
if (!
|
|
1322
|
+
changeControlType(t, o, a) {
|
|
1323
|
+
var c, l, d, m;
|
|
1324
|
+
const s = o.propertyValue, u = a && a.parent && a.parent.schema;
|
|
1325
|
+
if (!u)
|
|
1188
1326
|
return;
|
|
1189
|
-
const
|
|
1190
|
-
let
|
|
1327
|
+
const f = u.contents.findIndex((p) => p.id === t.id), i = u.contents[f];
|
|
1328
|
+
let r;
|
|
1191
1329
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1192
1330
|
editor: {
|
|
1193
|
-
$type:
|
|
1331
|
+
$type: s
|
|
1194
1332
|
},
|
|
1195
1333
|
name: this.designViewModelField.name,
|
|
1196
1334
|
require: this.designViewModelField.require,
|
|
1197
1335
|
readonly: this.designViewModelField.readonly
|
|
1198
|
-
}, !1),
|
|
1336
|
+
}, !1), r = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s)), r || (r = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(r, {
|
|
1199
1337
|
id: i.id,
|
|
1200
1338
|
appearance: i.appearance,
|
|
1201
1339
|
size: i.size,
|
|
1202
1340
|
label: i.label,
|
|
1203
1341
|
binding: i.binding,
|
|
1204
1342
|
visible: i.visible
|
|
1205
|
-
}), Object.assign(
|
|
1206
|
-
isTextArea:
|
|
1207
|
-
placeholder: (
|
|
1208
|
-
holdPlace: (
|
|
1209
|
-
readonly: (
|
|
1210
|
-
require: (
|
|
1211
|
-
}),
|
|
1212
|
-
(
|
|
1213
|
-
),
|
|
1214
|
-
}
|
|
1215
|
-
getComponentConfig(t,
|
|
1216
|
-
const
|
|
1343
|
+
}), Object.assign(r.editor, {
|
|
1344
|
+
isTextArea: r.isTextArea && i.isTextArea,
|
|
1345
|
+
placeholder: (c = i.editor) == null ? void 0 : c.placeholder,
|
|
1346
|
+
holdPlace: (l = i.editor) == null ? void 0 : l.holdPlace,
|
|
1347
|
+
readonly: (d = i.editor) == null ? void 0 : d.readonly,
|
|
1348
|
+
require: (m = i.editor) == null ? void 0 : m.require
|
|
1349
|
+
}), u.contents.splice(f, 1), u.contents.splice(f, 0, r), a.schema = Object.assign(i, r), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1350
|
+
(p) => p.classList.remove("dgComponentSelected")
|
|
1351
|
+
), Xe.value++;
|
|
1352
|
+
}
|
|
1353
|
+
getComponentConfig(t, o = {}, a = {}) {
|
|
1354
|
+
const s = Object.assign({
|
|
1217
1355
|
description: "编辑器",
|
|
1218
1356
|
title: "编辑器",
|
|
1219
1357
|
type: "input-group",
|
|
1220
1358
|
$converter: "/converter/property-editor.converter"
|
|
1221
|
-
},
|
|
1359
|
+
}, o), u = Object.assign({
|
|
1222
1360
|
readonly: {
|
|
1223
1361
|
description: "",
|
|
1224
1362
|
title: "只读",
|
|
@@ -1239,174 +1377,213 @@ class Je extends He {
|
|
|
1239
1377
|
title: "提示文本",
|
|
1240
1378
|
type: "string"
|
|
1241
1379
|
}
|
|
1242
|
-
},
|
|
1243
|
-
return { ...
|
|
1380
|
+
}, a);
|
|
1381
|
+
return { ...s, properties: { ...u } };
|
|
1382
|
+
}
|
|
1383
|
+
/**
|
|
1384
|
+
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
1385
|
+
* @param controlClass 控件样式
|
|
1386
|
+
* @param controlId 控件Id
|
|
1387
|
+
* @param componentId 控件所在组件id
|
|
1388
|
+
*/
|
|
1389
|
+
updateUnifiedLayoutAfterControlChanged(t, o, a) {
|
|
1390
|
+
const s = t.split(" ");
|
|
1391
|
+
let u = s.find((l) => /^col-([1-9]|10|11|12)$/.test(l)), f = s.find((l) => /^col-md-([1-9]|10|11|12)$/.test(l)), i = s.find((l) => /^col-xl-([1-9]|10|11|12)$/.test(l)), r = s.find((l) => /^col-el-([1-9]|10|11|12)$/.test(l));
|
|
1392
|
+
u = u || "col-12", f = f || "col-md-" + u.replace("col-", ""), i = i || "col-xl-" + f.replace("col-md-", ""), r = r || "col-el-" + i.replace("col-xl-", "");
|
|
1393
|
+
const c = {
|
|
1394
|
+
id: o,
|
|
1395
|
+
columnInSM: parseInt(u.replace("col-", ""), 10),
|
|
1396
|
+
columnInMD: parseInt(f.replace("col-md-", ""), 10),
|
|
1397
|
+
columnInLG: parseInt(i.replace("col-xl-", ""), 10),
|
|
1398
|
+
columnInEL: parseInt(r.replace("col-el-", ""), 10)
|
|
1399
|
+
};
|
|
1400
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(a, c);
|
|
1401
|
+
}
|
|
1402
|
+
/**
|
|
1403
|
+
* 修改控件布局配置后更新Form统一布局配置
|
|
1404
|
+
* @param componentId 组件Id
|
|
1405
|
+
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
1406
|
+
*/
|
|
1407
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(t, o) {
|
|
1408
|
+
const { formNode: a } = this.responseLayoutEditorFunction.checkCanFindFormNode(t);
|
|
1409
|
+
if (!a || !a.unifiedLayout)
|
|
1410
|
+
return;
|
|
1411
|
+
const s = [];
|
|
1412
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(a, s, 1), o) {
|
|
1413
|
+
const p = s.find((y) => y.id === o.id);
|
|
1414
|
+
Object.assign(p || {}, o);
|
|
1415
|
+
}
|
|
1416
|
+
const u = s.map((p) => p.columnInSM), f = s.map((p) => p.columnInMD), i = s.map((p) => p.columnInLG), r = s.map((p) => p.columnInEL), c = this.checkIsUniqueColumn(u) ? u[0] : null, l = this.checkIsUniqueColumn(f) ? f[0] : null, d = this.checkIsUniqueColumn(i) ? i[0] : null, m = this.checkIsUniqueColumn(r) ? r[0] : null;
|
|
1417
|
+
Object.assign(a.unifiedLayout, {
|
|
1418
|
+
uniqueColClassInSM: c,
|
|
1419
|
+
uniqueColClassInMD: l,
|
|
1420
|
+
uniqueColClassInLG: d,
|
|
1421
|
+
uniqueColClassInEL: m
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
/**
|
|
1425
|
+
* 校验宽度样式值是否一致
|
|
1426
|
+
*/
|
|
1427
|
+
checkIsUniqueColumn(t) {
|
|
1428
|
+
const o = new Set(t);
|
|
1429
|
+
return Array.from(o).length === 1;
|
|
1244
1430
|
}
|
|
1245
1431
|
}
|
|
1246
|
-
class
|
|
1247
|
-
constructor(
|
|
1248
|
-
super(
|
|
1432
|
+
class Ye extends Qe {
|
|
1433
|
+
constructor(n, t) {
|
|
1434
|
+
super(n, t);
|
|
1249
1435
|
}
|
|
1250
1436
|
}
|
|
1251
|
-
function _e(e,
|
|
1437
|
+
function _e(e, n) {
|
|
1252
1438
|
const {
|
|
1253
|
-
canAccepts:
|
|
1439
|
+
canAccepts: t,
|
|
1254
1440
|
checkCanDeleteComponent: o,
|
|
1255
1441
|
checkCanMoveComponent: a,
|
|
1256
|
-
hideNestedPaddingInDesginerView:
|
|
1257
|
-
onAcceptMovedChildElement:
|
|
1258
|
-
resolveComponentContext:
|
|
1259
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1442
|
+
hideNestedPaddingInDesginerView: s,
|
|
1443
|
+
onAcceptMovedChildElement: u,
|
|
1444
|
+
resolveComponentContext: f,
|
|
1445
|
+
triggerBelongedComponentToMoveWhenMoved: i,
|
|
1260
1446
|
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
1261
|
-
} =
|
|
1262
|
-
function l(
|
|
1263
|
-
return new
|
|
1447
|
+
} = He(e), c = e.schema;
|
|
1448
|
+
function l(d, m) {
|
|
1449
|
+
return new Ye(d, n).getPropertyConfig(c, m);
|
|
1264
1450
|
}
|
|
1265
1451
|
return {
|
|
1266
|
-
canAccepts:
|
|
1452
|
+
canAccepts: t,
|
|
1267
1453
|
checkCanDeleteComponent: o,
|
|
1268
1454
|
checkCanMoveComponent: a,
|
|
1269
|
-
hideNestedPaddingInDesginerView:
|
|
1270
|
-
onAcceptMovedChildElement:
|
|
1271
|
-
resolveComponentContext:
|
|
1272
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
1455
|
+
hideNestedPaddingInDesginerView: s,
|
|
1456
|
+
onAcceptMovedChildElement: u,
|
|
1457
|
+
resolveComponentContext: f,
|
|
1458
|
+
triggerBelongedComponentToMoveWhenMoved: i,
|
|
1273
1459
|
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
1274
1460
|
getPropsConfig: l
|
|
1275
1461
|
};
|
|
1276
1462
|
}
|
|
1277
|
-
function
|
|
1278
|
-
var
|
|
1463
|
+
function Ke(e, n, t) {
|
|
1464
|
+
var S;
|
|
1279
1465
|
function o() {
|
|
1280
|
-
|
|
1466
|
+
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
1281
1467
|
}
|
|
1282
1468
|
o();
|
|
1283
|
-
const a =
|
|
1284
|
-
function
|
|
1285
|
-
return (
|
|
1469
|
+
const a = t && t.getStyles && t.getStyles() || "", s = t && t.getDesignerClass && t.getDesignerClass() || "", u = b();
|
|
1470
|
+
function f() {
|
|
1471
|
+
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
1286
1472
|
}
|
|
1287
|
-
function
|
|
1473
|
+
function i() {
|
|
1288
1474
|
return !1;
|
|
1289
1475
|
}
|
|
1290
1476
|
function r() {
|
|
1291
|
-
return (
|
|
1477
|
+
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
1292
1478
|
}
|
|
1293
1479
|
function c() {
|
|
1294
|
-
return (
|
|
1480
|
+
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
1295
1481
|
}
|
|
1296
|
-
function l(
|
|
1297
|
-
if (!
|
|
1482
|
+
function l(C) {
|
|
1483
|
+
if (!C || !C.value)
|
|
1298
1484
|
return null;
|
|
1299
|
-
if (
|
|
1300
|
-
return
|
|
1301
|
-
const
|
|
1302
|
-
return
|
|
1485
|
+
if (C.value.schema && C.value.schema.type === "component")
|
|
1486
|
+
return C.value;
|
|
1487
|
+
const I = b(C == null ? void 0 : C.value.parent), k = l(I);
|
|
1488
|
+
return k || null;
|
|
1303
1489
|
}
|
|
1304
|
-
function
|
|
1305
|
-
const { componentInstance:
|
|
1306
|
-
return !
|
|
1490
|
+
function d(C = n) {
|
|
1491
|
+
const { componentInstance: I, designerItemElementRef: k } = C;
|
|
1492
|
+
return !I || !I.value ? null : I.value.canMove ? k : d(C.parent);
|
|
1307
1493
|
}
|
|
1308
|
-
function m(
|
|
1309
|
-
return !!
|
|
1494
|
+
function m(C) {
|
|
1495
|
+
return !!t && t.canAccepts(C);
|
|
1310
1496
|
}
|
|
1311
|
-
function
|
|
1312
|
-
return (
|
|
1497
|
+
function p() {
|
|
1498
|
+
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
1313
1499
|
}
|
|
1314
|
-
function
|
|
1500
|
+
function y() {
|
|
1501
|
+
}
|
|
1502
|
+
function B(C, I) {
|
|
1503
|
+
I && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(I);
|
|
1504
|
+
}
|
|
1505
|
+
function w(C, I) {
|
|
1506
|
+
const { componentType: k } = C;
|
|
1507
|
+
let A = _(k, C, I);
|
|
1508
|
+
t && t.onResolveNewComponentSchema && (A = t.onResolveNewComponentSchema(C, A));
|
|
1509
|
+
const D = k.toLowerCase().replace("-", "_");
|
|
1510
|
+
return A && !A.id && A.type === k && (A.id = `${D}_${Math.random().toString().slice(2, 6)}`), A;
|
|
1511
|
+
}
|
|
1512
|
+
function T(C) {
|
|
1513
|
+
}
|
|
1514
|
+
function F(...C) {
|
|
1515
|
+
if (t && t.getPropsConfig)
|
|
1516
|
+
return t.getPropsConfig(...C);
|
|
1315
1517
|
}
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
function T(h, w) {
|
|
1320
|
-
const { componentType: M } = h;
|
|
1321
|
-
let P = I(M, h, w);
|
|
1322
|
-
n && n.onResolveNewComponentSchema && (P = n.onResolveNewComponentSchema(h, P));
|
|
1323
|
-
const N = M.toLowerCase().replace("-", "_");
|
|
1324
|
-
return P && !P.id && P.type === M && (P.id = `${N}_${Math.random().toString().slice(2, 6)}`), P;
|
|
1325
|
-
}
|
|
1326
|
-
function S(h, w) {
|
|
1327
|
-
const M = String(h.getAttribute("data-controltype")), P = h.getAttribute("data-feature"), N = P ? JSON.parse(P) : {};
|
|
1328
|
-
N.parentComponentInstance = s.value;
|
|
1329
|
-
let D = I(M, N);
|
|
1330
|
-
n && n.onAcceptNewChildElement && (D = n.onAcceptNewChildElement(h, w, D));
|
|
1331
|
-
const U = M.toLowerCase().replace("-", "_");
|
|
1332
|
-
return D && !D.id && D.type === M && (D.id = `${U}_${Math.random().toString().slice(2, 6)}`), D;
|
|
1333
|
-
}
|
|
1334
|
-
function E(h) {
|
|
1335
|
-
}
|
|
1336
|
-
function k(...h) {
|
|
1337
|
-
if (n && n.getPropsConfig)
|
|
1338
|
-
return n.getPropsConfig(...h);
|
|
1339
|
-
}
|
|
1340
|
-
return s.value = {
|
|
1341
|
-
canMove: i(),
|
|
1342
|
-
canSelectParent: u(),
|
|
1518
|
+
return u.value = {
|
|
1519
|
+
canMove: f(),
|
|
1520
|
+
canSelectParent: i(),
|
|
1343
1521
|
canDelete: r(),
|
|
1344
1522
|
canNested: !c(),
|
|
1345
|
-
contents:
|
|
1523
|
+
contents: n == null ? void 0 : n.schema.contents,
|
|
1346
1524
|
elementRef: e,
|
|
1347
|
-
parent: (
|
|
1348
|
-
schema:
|
|
1525
|
+
parent: (S = n == null ? void 0 : n.parent) == null ? void 0 : S.componentInstance,
|
|
1526
|
+
schema: n == null ? void 0 : n.schema,
|
|
1349
1527
|
styles: a,
|
|
1350
|
-
designerClass:
|
|
1528
|
+
designerClass: s,
|
|
1351
1529
|
canAccepts: m,
|
|
1352
1530
|
getBelongedComponentInstance: l,
|
|
1353
|
-
getDraggableDesignItemElement:
|
|
1354
|
-
getDraggingDisplayText:
|
|
1355
|
-
getPropConfig:
|
|
1356
|
-
getDragScopeElement:
|
|
1357
|
-
onAcceptMovedChildElement:
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
addNewChildComponentSchema: T,
|
|
1531
|
+
getDraggableDesignItemElement: d,
|
|
1532
|
+
getDraggingDisplayText: p,
|
|
1533
|
+
getPropConfig: F,
|
|
1534
|
+
getDragScopeElement: y,
|
|
1535
|
+
onAcceptMovedChildElement: B,
|
|
1536
|
+
onChildElementMovedOut: T,
|
|
1537
|
+
addNewChildComponentSchema: w,
|
|
1361
1538
|
updateDragAndDropRules: o,
|
|
1362
|
-
triggerBelongedComponentToMoveWhenMoved: !!
|
|
1363
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!
|
|
1364
|
-
},
|
|
1539
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || b(!1),
|
|
1540
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || b(!1)
|
|
1541
|
+
}, u;
|
|
1365
1542
|
}
|
|
1366
|
-
const
|
|
1543
|
+
const Re = /* @__PURE__ */ Z({
|
|
1367
1544
|
name: "FInputGroupDesign",
|
|
1368
|
-
props:
|
|
1545
|
+
props: U,
|
|
1369
1546
|
emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
|
|
1370
|
-
setup(e,
|
|
1371
|
-
const
|
|
1372
|
-
inputGroupClass:
|
|
1373
|
-
inputType:
|
|
1374
|
-
inputGroupStyle:
|
|
1375
|
-
} = a,
|
|
1547
|
+
setup(e, n) {
|
|
1548
|
+
const t = b(e.modelValue), o = b(e.modelValue), a = Le(e, n, t, o), {
|
|
1549
|
+
inputGroupClass: s,
|
|
1550
|
+
inputType: u,
|
|
1551
|
+
inputGroupStyle: f
|
|
1552
|
+
} = a, i = ee(e), {
|
|
1376
1553
|
shouldShowAppendedButton: r
|
|
1377
|
-
} =
|
|
1554
|
+
} = i, c = R(e, n, a), {
|
|
1378
1555
|
onMouseEnter: l,
|
|
1379
|
-
onMouseLeave:
|
|
1380
|
-
} = c, m = te(e,
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
}),
|
|
1384
|
-
const
|
|
1385
|
-
return () =>
|
|
1556
|
+
onMouseLeave: d
|
|
1557
|
+
} = c, m = te(e, n, u, i), p = b(), y = H("designer-host-service"), B = H("design-item-context"), w = _e(B, y), T = Ke(p, B, w);
|
|
1558
|
+
N(() => {
|
|
1559
|
+
p.value.componentInstance = T;
|
|
1560
|
+
}), n.expose(T.value);
|
|
1561
|
+
const F = ne(e, n, i, c, m), S = b();
|
|
1562
|
+
return () => E("div", {
|
|
1386
1563
|
id: "inputGroup",
|
|
1387
|
-
ref:
|
|
1388
|
-
class:
|
|
1389
|
-
style:
|
|
1564
|
+
ref: p,
|
|
1565
|
+
class: s.value,
|
|
1566
|
+
style: f.value,
|
|
1390
1567
|
onMouseenter: l,
|
|
1391
|
-
onMouseleave:
|
|
1392
|
-
}, [
|
|
1393
|
-
ref:
|
|
1568
|
+
onMouseleave: d
|
|
1569
|
+
}, [E("input", {
|
|
1570
|
+
ref: S,
|
|
1394
1571
|
class: "form-control",
|
|
1395
1572
|
readonly: !0,
|
|
1396
1573
|
placeholder: e.placeholder
|
|
1397
|
-
}, null), r.value &&
|
|
1574
|
+
}, null), r.value && F()]);
|
|
1398
1575
|
}
|
|
1399
1576
|
});
|
|
1400
|
-
|
|
1401
|
-
e["input-group"] =
|
|
1577
|
+
V.register = (e, n, t, o) => {
|
|
1578
|
+
e["input-group"] = V, n["input-group"] = K;
|
|
1402
1579
|
};
|
|
1403
|
-
|
|
1404
|
-
e["input-group"] =
|
|
1580
|
+
V.registerDesigner = (e, n, t) => {
|
|
1581
|
+
e["input-group"] = Re, n["input-group"] = K;
|
|
1405
1582
|
};
|
|
1406
|
-
const
|
|
1583
|
+
const rt = Ge(V);
|
|
1407
1584
|
export {
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1585
|
+
V as FInputGroup,
|
|
1586
|
+
rt as default,
|
|
1587
|
+
U as inputGroupProps,
|
|
1588
|
+
K as propsResolver
|
|
1412
1589
|
};
|