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