@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,107 +1,107 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
import { resolveAppearance as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useDesignerComponent as
|
|
7
|
-
import { withInstall as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as j, ref as y, computed as h, createVNode as v, Teleport as U, createApp as _, onUnmounted as X, inject as D, watch as R, nextTick as S, onMounted as F, withDirectives as z, vShow as J, Fragment as Q, mergeProps as A } from "vue";
|
|
2
|
+
import { isPlainObject as V, cloneDeep as Y } from "lodash-es";
|
|
3
|
+
import { resolveAppearance as Z } from "../dynamic-resolver/index.esm.js";
|
|
4
|
+
import K from "../tags/index.esm.js";
|
|
5
|
+
import ee from "../popover/index.esm.js";
|
|
6
|
+
import { useDesignerComponent as te } from "../designer-canvas/index.esm.js";
|
|
7
|
+
import { withInstall as ne } from "../common/index.esm.js";
|
|
8
|
+
const oe = {}, ue = {};
|
|
9
9
|
function N(e) {
|
|
10
|
-
const { properties: t, title:
|
|
11
|
-
return l.id = `${
|
|
10
|
+
const { properties: t, title: u, ignore: o } = e, n = o && Array.isArray(o), l = Object.keys(t).reduce((c, r) => ((!n || !o.find((b) => b == r)) && (c[r] = t[r].type === "object" && t[r].properties ? N(t[r]) : Y(t[r].default)), c), {});
|
|
11
|
+
return (!n || !o.find((c) => c == "id")) && (l.id = `${u}-${Date.now()}`), l;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
return Object.keys(e).reduce((
|
|
13
|
+
function ae(e, t) {
|
|
14
|
+
const u = N(t);
|
|
15
|
+
return Object.keys(e).reduce((o, n) => (o[n] && V(o[n]) && V(e[n]) ? Object.assign(o[n], e[n]) : o[n] = e[n], o), u), u;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return Object.keys(e).filter((
|
|
17
|
+
function le(e, t) {
|
|
18
|
+
return Object.keys(e).filter((o) => e[o] != null).reduce((o, n) => {
|
|
19
19
|
if (t.has(n)) {
|
|
20
|
-
const
|
|
21
|
-
if (typeof
|
|
22
|
-
l
|
|
20
|
+
const l = t.get(n);
|
|
21
|
+
if (typeof l == "string")
|
|
22
|
+
o[l] = e[n];
|
|
23
23
|
else {
|
|
24
|
-
const c =
|
|
25
|
-
Object.assign(
|
|
24
|
+
const c = l(n, e[n], e);
|
|
25
|
+
Object.assign(o, c);
|
|
26
26
|
}
|
|
27
27
|
} else
|
|
28
|
-
|
|
29
|
-
return
|
|
28
|
+
o[n] = e[n];
|
|
29
|
+
return o;
|
|
30
30
|
}, {});
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
const
|
|
34
|
-
return
|
|
32
|
+
function ie(e, t, u = /* @__PURE__ */ new Map()) {
|
|
33
|
+
const o = ae(e, t);
|
|
34
|
+
return le(o, u);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
function t(
|
|
36
|
+
function re(e = {}) {
|
|
37
|
+
function t(a, s, i, p) {
|
|
38
38
|
if (typeof i == "number")
|
|
39
|
-
return p[
|
|
39
|
+
return p[a].length === i;
|
|
40
40
|
if (typeof i == "object") {
|
|
41
|
-
const f = Object.keys(i)[0],
|
|
41
|
+
const f = Object.keys(i)[0], g = i[f];
|
|
42
42
|
if (f === "not")
|
|
43
|
-
return Number(p[
|
|
43
|
+
return Number(p[a].length) !== Number(g);
|
|
44
44
|
if (f === "moreThan")
|
|
45
|
-
return Number(p[
|
|
45
|
+
return Number(p[a].length) >= Number(g);
|
|
46
46
|
if (f === "lessThan")
|
|
47
|
-
return Number(p[
|
|
47
|
+
return Number(p[a].length) <= Number(g);
|
|
48
48
|
}
|
|
49
49
|
return !1;
|
|
50
50
|
}
|
|
51
|
-
function a
|
|
52
|
-
return p[
|
|
51
|
+
function u(a, s, i, p) {
|
|
52
|
+
return p[a] && p[a].propertyValue && String(p[a].propertyValue.value) === String(i);
|
|
53
53
|
}
|
|
54
|
-
const
|
|
54
|
+
const o = /* @__PURE__ */ new Map([
|
|
55
55
|
["length", t],
|
|
56
|
-
["getProperty",
|
|
56
|
+
["getProperty", u]
|
|
57
57
|
]);
|
|
58
|
-
Object.keys(e).reduce((
|
|
59
|
-
function n(
|
|
60
|
-
const i =
|
|
61
|
-
return typeof
|
|
58
|
+
Object.keys(e).reduce((a, s) => (a.set(s, e[s]), a), o);
|
|
59
|
+
function n(a, s) {
|
|
60
|
+
const i = a;
|
|
61
|
+
return typeof s == "number" ? [{ target: i, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: i, operator: "getProperty", param: a, value: !!s }] : typeof s == "object" ? Object.keys(s).map((p) => {
|
|
62
62
|
if (p === "length")
|
|
63
|
-
return { target: i, operator: "length", param: null, value:
|
|
64
|
-
const f = p,
|
|
65
|
-
return { target: i, operator: "getProperty", param: f, value:
|
|
63
|
+
return { target: i, operator: "length", param: null, value: s[p] };
|
|
64
|
+
const f = p, g = s[p];
|
|
65
|
+
return { target: i, operator: "getProperty", param: f, value: g };
|
|
66
66
|
}) : [];
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
return Object.keys(
|
|
70
|
-
const f = n(p,
|
|
68
|
+
function l(a) {
|
|
69
|
+
return Object.keys(a).reduce((i, p) => {
|
|
70
|
+
const f = n(p, a[p]);
|
|
71
71
|
return i.push(...f), i;
|
|
72
72
|
}, []);
|
|
73
73
|
}
|
|
74
|
-
function c(
|
|
75
|
-
if (
|
|
76
|
-
const i =
|
|
77
|
-
return i && i(
|
|
74
|
+
function c(a, s) {
|
|
75
|
+
if (o.has(a.operator)) {
|
|
76
|
+
const i = o.get(a.operator);
|
|
77
|
+
return i && i(a.target, a.param, a.value, s) || !1;
|
|
78
78
|
}
|
|
79
79
|
return !1;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
81
|
+
function r(a, s) {
|
|
82
|
+
return l(a).reduce((f, g) => f && c(g, s), !0);
|
|
83
83
|
}
|
|
84
|
-
function b(
|
|
85
|
-
const i = Object.keys(
|
|
86
|
-
return p ? !
|
|
84
|
+
function b(a, s) {
|
|
85
|
+
const i = Object.keys(a), p = i.includes("allOf"), f = i.includes("anyOf"), g = p || f, C = (g ? a[g ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((T) => r(T, s));
|
|
86
|
+
return p ? !C.includes(!1) : C.includes(!0);
|
|
87
87
|
}
|
|
88
88
|
return { parseValueSchema: b };
|
|
89
89
|
}
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
function
|
|
93
|
-
return
|
|
94
|
-
const
|
|
95
|
-
return Object.assign(b,
|
|
90
|
+
const se = {}, ce = {};
|
|
91
|
+
re();
|
|
92
|
+
function de(e, t, u = /* @__PURE__ */ new Map(), o = (c, r, b) => r, n = {}, l = (c) => c) {
|
|
93
|
+
return oe[t.title] = t, ue[t.title] = o, se[t.title] = n, ce[t.title] = l, (c = {}) => {
|
|
94
|
+
const r = ie(c, t, u), b = Object.keys(e).reduce((a, s) => (a[s] = e[s].default, a), {});
|
|
95
|
+
return Object.assign(b, r);
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
const
|
|
99
|
-
["appearance",
|
|
98
|
+
const pe = /* @__PURE__ */ new Map([
|
|
99
|
+
["appearance", Z]
|
|
100
100
|
]);
|
|
101
|
-
function
|
|
101
|
+
function fe(e, t, u) {
|
|
102
102
|
return t;
|
|
103
103
|
}
|
|
104
|
-
const
|
|
104
|
+
const be = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-design.gitee.io/button-edit.schema.json", ye = "button-edit", me = "A Farris Input Component", ve = "object", he = {
|
|
105
105
|
id: {
|
|
106
106
|
description: "The unique identifier for a Input Group",
|
|
107
107
|
type: "string"
|
|
@@ -285,18 +285,18 @@ const ve = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-
|
|
|
285
285
|
type: "string",
|
|
286
286
|
default: ""
|
|
287
287
|
}
|
|
288
|
-
},
|
|
288
|
+
}, Ce = [
|
|
289
289
|
"id",
|
|
290
290
|
"type"
|
|
291
|
-
],
|
|
292
|
-
$schema:
|
|
293
|
-
$id:
|
|
294
|
-
title:
|
|
295
|
-
description:
|
|
296
|
-
type:
|
|
297
|
-
properties:
|
|
298
|
-
required:
|
|
299
|
-
},
|
|
291
|
+
], Be = {
|
|
292
|
+
$schema: be,
|
|
293
|
+
$id: ge,
|
|
294
|
+
title: ye,
|
|
295
|
+
description: me,
|
|
296
|
+
type: ve,
|
|
297
|
+
properties: he,
|
|
298
|
+
required: Ce
|
|
299
|
+
}, xe = "buttonEdit", Oe = "A Farris Component", Te = "object", ke = {
|
|
300
300
|
basic: {
|
|
301
301
|
description: "Basic Infomation",
|
|
302
302
|
title: "基本信息",
|
|
@@ -378,12 +378,12 @@ const ve = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-
|
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
-
},
|
|
382
|
-
title:
|
|
383
|
-
description:
|
|
384
|
-
type:
|
|
385
|
-
categories:
|
|
386
|
-
},
|
|
381
|
+
}, we = {
|
|
382
|
+
title: xe,
|
|
383
|
+
description: Oe,
|
|
384
|
+
type: Te,
|
|
385
|
+
categories: ke
|
|
386
|
+
}, L = {
|
|
387
387
|
/**
|
|
388
388
|
* 组件标识
|
|
389
389
|
*/
|
|
@@ -488,510 +488,530 @@ const ve = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-
|
|
|
488
488
|
/**
|
|
489
489
|
* 打开前
|
|
490
490
|
*/
|
|
491
|
-
beforeOpen: { type: Function, default: null }
|
|
492
|
-
|
|
491
|
+
beforeOpen: { type: Function, default: null },
|
|
492
|
+
/** 更新方式 blur | change */
|
|
493
|
+
updateOn: { type: String, default: "change" }
|
|
494
|
+
}, G = de(L, Be, pe, fe, we), Ee = {
|
|
493
495
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
494
496
|
host: { type: Object },
|
|
495
497
|
backgroundColor: { type: String, default: "" }
|
|
496
|
-
},
|
|
498
|
+
}, Pe = /* @__PURE__ */ j({
|
|
497
499
|
name: "FOverlay",
|
|
498
|
-
props:
|
|
500
|
+
props: Ee,
|
|
499
501
|
emits: ["click"],
|
|
500
502
|
setup(e, t) {
|
|
501
|
-
const
|
|
503
|
+
const u = y(e.popupContentPosition), o = y(e.host), n = h(() => ({
|
|
502
504
|
backgroundColor: e.backgroundColor || "",
|
|
503
505
|
pointerEvents: "auto"
|
|
504
506
|
}));
|
|
505
|
-
function
|
|
506
|
-
t.emit("click"),
|
|
507
|
+
function l(r) {
|
|
508
|
+
t.emit("click"), r.preventDefault(), r.stopPropagation();
|
|
507
509
|
}
|
|
508
|
-
|
|
509
|
-
const
|
|
510
|
-
if (
|
|
511
|
-
const b =
|
|
512
|
-
left:
|
|
513
|
-
top:
|
|
510
|
+
h(() => {
|
|
511
|
+
const r = o.value;
|
|
512
|
+
if (r) {
|
|
513
|
+
const b = r.getBoundingClientRect(), {
|
|
514
|
+
left: a,
|
|
515
|
+
top: s,
|
|
514
516
|
height: i
|
|
515
517
|
} = b;
|
|
516
518
|
return {
|
|
517
|
-
left:
|
|
518
|
-
top:
|
|
519
|
+
left: a,
|
|
520
|
+
top: s + i
|
|
519
521
|
};
|
|
520
522
|
}
|
|
521
|
-
return
|
|
523
|
+
return u.value;
|
|
522
524
|
});
|
|
523
|
-
const c =
|
|
525
|
+
const c = h(() => ({
|
|
524
526
|
// position: 'relative',
|
|
525
527
|
// left: `${position.value.left}px`,
|
|
526
528
|
// top: `${position.value.top}px`
|
|
527
529
|
}));
|
|
528
|
-
return () =>
|
|
530
|
+
return () => v(U, {
|
|
529
531
|
to: "body"
|
|
530
532
|
}, {
|
|
531
533
|
default: () => {
|
|
532
|
-
var
|
|
533
|
-
return [
|
|
534
|
+
var r, b;
|
|
535
|
+
return [v("div", {
|
|
534
536
|
class: "overlay-container",
|
|
535
|
-
onClick: (
|
|
537
|
+
onClick: (a) => l(a),
|
|
536
538
|
style: n.value
|
|
537
|
-
}, [
|
|
539
|
+
}, [v("div", {
|
|
538
540
|
style: c.value
|
|
539
|
-
}, [(b = (
|
|
541
|
+
}, [(b = (r = t.slots).default) == null ? void 0 : b.call(r)])])];
|
|
540
542
|
}
|
|
541
543
|
});
|
|
542
544
|
}
|
|
543
545
|
});
|
|
544
|
-
function
|
|
546
|
+
function Me(e) {
|
|
545
547
|
if (e.content && e.content.render)
|
|
546
548
|
return e.content.render;
|
|
547
549
|
if (e.render && typeof e.render == "function")
|
|
548
550
|
return e.render;
|
|
549
551
|
}
|
|
550
|
-
function
|
|
552
|
+
function Ie(e) {
|
|
551
553
|
const t = document.createElement("div");
|
|
552
554
|
t.style.display = "contents";
|
|
553
|
-
let
|
|
554
|
-
const
|
|
555
|
+
let u;
|
|
556
|
+
const o = e.onClickCallback || (() => {
|
|
555
557
|
}), n = () => {
|
|
556
|
-
|
|
558
|
+
o(), u && u.unmount();
|
|
557
559
|
};
|
|
558
|
-
return
|
|
560
|
+
return u = _({
|
|
559
561
|
setup() {
|
|
560
|
-
|
|
562
|
+
X(() => {
|
|
561
563
|
document.body.removeChild(t);
|
|
562
564
|
});
|
|
563
|
-
const
|
|
564
|
-
return () =>
|
|
565
|
+
const l = Me(e);
|
|
566
|
+
return () => v(Pe, {
|
|
565
567
|
"popup-content-position": e.popupPosition,
|
|
566
568
|
host: e.host,
|
|
567
569
|
onClick: n,
|
|
568
570
|
backgroundColor: e.backgroundColor
|
|
569
571
|
}, {
|
|
570
|
-
default: () => [
|
|
572
|
+
default: () => [l && l()]
|
|
571
573
|
});
|
|
572
574
|
}
|
|
573
|
-
}), document.body.appendChild(t),
|
|
575
|
+
}), document.body.appendChild(t), u.mount(t), u;
|
|
574
576
|
}
|
|
575
|
-
class
|
|
577
|
+
class je {
|
|
576
578
|
static show(t) {
|
|
577
|
-
return
|
|
579
|
+
return Ie(t);
|
|
578
580
|
}
|
|
579
581
|
}
|
|
580
|
-
const
|
|
581
|
-
function
|
|
582
|
-
function
|
|
583
|
-
const
|
|
582
|
+
const Re = Symbol("FModalService");
|
|
583
|
+
function $(e, t) {
|
|
584
|
+
function u() {
|
|
585
|
+
const o = e.beforeOpen || e.beforeClickButton || null;
|
|
584
586
|
let n = Promise.resolve(!0);
|
|
585
|
-
if (
|
|
586
|
-
const
|
|
587
|
-
if (typeof
|
|
587
|
+
if (o) {
|
|
588
|
+
const l = o(t.value);
|
|
589
|
+
if (typeof l > "u")
|
|
588
590
|
return n;
|
|
589
|
-
typeof
|
|
591
|
+
typeof l == "boolean" ? n = Promise.resolve(l) : n = l;
|
|
590
592
|
}
|
|
591
593
|
return n;
|
|
592
594
|
}
|
|
593
|
-
return { judgeCanOpen:
|
|
595
|
+
return { judgeCanOpen: u };
|
|
594
596
|
}
|
|
595
|
-
function W(e, t,
|
|
596
|
-
const
|
|
597
|
+
function W(e, t, u, o, n) {
|
|
598
|
+
const l = y(e.buttonBehavior), c = y(e.popupOnInput), r = h(() => ({
|
|
597
599
|
"input-group-append": !0,
|
|
598
600
|
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
599
|
-
})), { judgeCanOpen: b } =
|
|
600
|
-
async function p(
|
|
601
|
-
if (await b() &&
|
|
602
|
-
const
|
|
603
|
-
if (
|
|
604
|
-
const
|
|
605
|
-
...
|
|
601
|
+
})), { judgeCanOpen: b } = $(e, n), a = h(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), s = D(Re, null), i = y();
|
|
602
|
+
async function p(m) {
|
|
603
|
+
if (await b() && a.value) {
|
|
604
|
+
const x = !!t.slots.default;
|
|
605
|
+
if (l.value === "Modal") {
|
|
606
|
+
const C = e.modalOptions, O = s == null ? void 0 : s.open({
|
|
607
|
+
...C,
|
|
606
608
|
render: () => t.slots.default && t.slots.default()
|
|
607
609
|
});
|
|
608
|
-
i.value =
|
|
610
|
+
i.value = O == null ? void 0 : O.modalRef;
|
|
609
611
|
}
|
|
610
|
-
|
|
612
|
+
l.value === "Overlay" && je.show({
|
|
611
613
|
// host: buttonEditRef.value,
|
|
612
614
|
host: document.body,
|
|
613
615
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
614
616
|
render: () => t.slots.default && t.slots.default()
|
|
615
|
-
}),
|
|
617
|
+
}), x && l.value === "Popup" && o.togglePopup(!0), x && c.value && o.hidePopup(), t.emit("clickButton", { origin: m, value: e.modelValue });
|
|
616
618
|
}
|
|
617
619
|
}
|
|
618
|
-
function f(
|
|
619
|
-
t.emit("mouseEnterIcon",
|
|
620
|
+
function f(m) {
|
|
621
|
+
t.emit("mouseEnterIcon", m);
|
|
620
622
|
}
|
|
621
|
-
function
|
|
622
|
-
t.emit("mouseLeaveIcon",
|
|
623
|
+
function g(m) {
|
|
624
|
+
t.emit("mouseLeaveIcon", m);
|
|
623
625
|
}
|
|
624
626
|
return {
|
|
625
|
-
buttonGroupClass:
|
|
627
|
+
buttonGroupClass: r,
|
|
626
628
|
onClickButton: p,
|
|
627
629
|
onMouseEnterButton: f,
|
|
628
|
-
onMouseLeaveButton:
|
|
630
|
+
onMouseLeaveButton: g,
|
|
629
631
|
modalRef: i
|
|
630
632
|
};
|
|
631
633
|
}
|
|
632
|
-
function
|
|
633
|
-
const c =
|
|
634
|
-
function
|
|
634
|
+
function Fe(e, t, u, o, n, l) {
|
|
635
|
+
const c = y(!1), r = h(() => e.enableClear && !e.readonly && !e.disable), { changeTextBoxValue: b } = l;
|
|
636
|
+
function a(f) {
|
|
635
637
|
c.value = f;
|
|
636
638
|
}
|
|
637
|
-
|
|
638
|
-
|
|
639
|
+
R(n, () => {
|
|
640
|
+
a(!!n.value);
|
|
639
641
|
});
|
|
640
|
-
function
|
|
641
|
-
const
|
|
642
|
-
f.stopPropagation(), (
|
|
642
|
+
function s(f) {
|
|
643
|
+
const g = !e.readonly && !e.disable && e.editable, m = !e.editable;
|
|
644
|
+
f.stopPropagation(), (g || m) && (b("", !1), a(!c.value), t.emit("clear"));
|
|
643
645
|
}
|
|
644
646
|
function i(f) {
|
|
645
|
-
if (
|
|
646
|
-
if (!
|
|
647
|
-
|
|
647
|
+
if (r.value) {
|
|
648
|
+
if (!u.value) {
|
|
649
|
+
a(!1);
|
|
648
650
|
return;
|
|
649
651
|
}
|
|
650
|
-
!e.disable && !e.readonly &&
|
|
652
|
+
!e.disable && !e.readonly && a(!0);
|
|
651
653
|
}
|
|
652
654
|
}
|
|
653
655
|
function p(f) {
|
|
654
|
-
|
|
656
|
+
r.value && a(!1);
|
|
655
657
|
}
|
|
656
658
|
return {
|
|
657
|
-
enableClearButton:
|
|
659
|
+
enableClearButton: r,
|
|
658
660
|
showClearButton: c,
|
|
659
|
-
onClearValue:
|
|
661
|
+
onClearValue: s,
|
|
660
662
|
onMouseEnterTextBox: i,
|
|
661
663
|
onMouseLeaveTextBox: p
|
|
662
664
|
};
|
|
663
665
|
}
|
|
664
|
-
function
|
|
665
|
-
const
|
|
666
|
+
function Le(e, t, u, o, n) {
|
|
667
|
+
const l = h(() => e.popupOnInput), c = h(() => e.popupOnFocus), { shouldPopupContent: r } = n, b = h(() => e.enableTitle ? u.value : ""), a = h(() => (e.disable || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), s = h(() => e.readonly || !e.editable), i = y(!1), p = h(() => !e.disable && i.value), f = h(() => ({
|
|
666
668
|
"text-left": e.textAlign === "left",
|
|
667
669
|
"text-center": e.textAlign === "center",
|
|
668
670
|
"text-right": e.textAlign === "right",
|
|
669
671
|
"form-control": !0,
|
|
670
672
|
"f-utils-fill": !0
|
|
671
|
-
})),
|
|
673
|
+
})), g = h(() => ({
|
|
672
674
|
"input-group": !0,
|
|
673
675
|
"f-state-disable": e.disable,
|
|
674
676
|
"f-state-editable": e.editable && !e.disable && !e.readonly,
|
|
675
677
|
"f-state-readonly": e.readonly && !e.disable,
|
|
676
678
|
"f-state-focus": p.value
|
|
677
679
|
}));
|
|
678
|
-
function
|
|
679
|
-
|
|
680
|
+
function m(d, B = !0) {
|
|
681
|
+
u.value !== d && (u.value = d, B && (t.emit("change", d), t.emit("update:modelValue", d)));
|
|
680
682
|
}
|
|
681
|
-
function
|
|
682
|
-
|
|
683
|
+
function x(d) {
|
|
684
|
+
r.value = !1, m(d, !0);
|
|
683
685
|
}
|
|
684
|
-
|
|
686
|
+
R(
|
|
685
687
|
() => e.modelValue,
|
|
686
688
|
(d) => {
|
|
687
|
-
|
|
689
|
+
u.value = d;
|
|
688
690
|
}
|
|
689
691
|
);
|
|
690
|
-
function
|
|
692
|
+
function C(d) {
|
|
691
693
|
i.value = !1, t.emit("blur", d), d.stopPropagation();
|
|
692
694
|
}
|
|
693
|
-
function
|
|
695
|
+
function O(d) {
|
|
694
696
|
t.emit("click", d);
|
|
695
697
|
}
|
|
696
|
-
function
|
|
697
|
-
e.disable || (i.value = !0,
|
|
698
|
+
function T(d) {
|
|
699
|
+
e.disable || (i.value = !0, s.value || (t.emit("focus", d), c.value && !r.value && n.popup()));
|
|
698
700
|
}
|
|
699
701
|
function k(d) {
|
|
700
702
|
t.emit("input", d.target.value);
|
|
701
|
-
const
|
|
702
|
-
|
|
703
|
+
const B = d.target.value;
|
|
704
|
+
o.value = B, u.value !== B && m(B, e.updateOn === "change"), l.value && !r.value && n.popup();
|
|
703
705
|
}
|
|
704
|
-
function
|
|
706
|
+
function M(d) {
|
|
705
707
|
d.target.tagName !== "INPUT" && d.preventDefault(), d.stopPropagation();
|
|
706
708
|
}
|
|
707
|
-
function
|
|
709
|
+
function w(d) {
|
|
708
710
|
t.emit("keydown", d);
|
|
709
711
|
}
|
|
710
|
-
function
|
|
711
|
-
d.key === "Enter" && (
|
|
712
|
+
function I(d) {
|
|
713
|
+
d.key === "Enter" && (l.value || c.value) && n.hidePopup(), t.emit("keyup", d);
|
|
712
714
|
}
|
|
713
|
-
function
|
|
714
|
-
const
|
|
715
|
-
d.stopPropagation(),
|
|
715
|
+
function E(d) {
|
|
716
|
+
const B = d.target.value;
|
|
717
|
+
d.stopPropagation(), m(B);
|
|
716
718
|
}
|
|
717
719
|
return {
|
|
718
720
|
hasFocusedTextBox: p,
|
|
719
|
-
isTextBoxReadonly:
|
|
721
|
+
isTextBoxReadonly: s,
|
|
720
722
|
textBoxClass: f,
|
|
721
|
-
textBoxPlaceholder:
|
|
723
|
+
textBoxPlaceholder: a,
|
|
722
724
|
textBoxTitle: b,
|
|
723
|
-
inputGroupClass:
|
|
724
|
-
changeTextBoxValue:
|
|
725
|
-
commitValue:
|
|
726
|
-
onBlurTextBox:
|
|
727
|
-
onClickTextBox:
|
|
728
|
-
onFocusTextBox:
|
|
725
|
+
inputGroupClass: g,
|
|
726
|
+
changeTextBoxValue: m,
|
|
727
|
+
commitValue: x,
|
|
728
|
+
onBlurTextBox: C,
|
|
729
|
+
onClickTextBox: O,
|
|
730
|
+
onFocusTextBox: T,
|
|
729
731
|
onInput: k,
|
|
730
|
-
onKeyDownTextBox:
|
|
731
|
-
onKeyUpTextBox:
|
|
732
|
-
onMouseDownTextBox:
|
|
733
|
-
onTextBoxValueChange:
|
|
732
|
+
onKeyDownTextBox: w,
|
|
733
|
+
onKeyUpTextBox: I,
|
|
734
|
+
onMouseDownTextBox: M,
|
|
735
|
+
onTextBoxValueChange: E
|
|
734
736
|
};
|
|
735
737
|
}
|
|
736
|
-
function
|
|
737
|
-
const n =
|
|
738
|
-
function
|
|
738
|
+
function H(e, t, u, o) {
|
|
739
|
+
const n = y(), l = y(!1), { judgeCanOpen: c } = $(e, o);
|
|
740
|
+
function r() {
|
|
739
741
|
const i = n.value;
|
|
740
|
-
i && i.show(
|
|
742
|
+
i && i.show(u.value);
|
|
741
743
|
}
|
|
742
744
|
async function b(i = !1) {
|
|
743
745
|
if (!!t.slots.default) {
|
|
744
|
-
if (!i && !
|
|
746
|
+
if (!i && !l.value && !await c())
|
|
745
747
|
return;
|
|
746
|
-
|
|
748
|
+
l.value = !l.value, await S(), r();
|
|
747
749
|
}
|
|
748
750
|
}
|
|
749
|
-
async function
|
|
751
|
+
async function a(i = !1) {
|
|
750
752
|
if (!!t.slots.default) {
|
|
751
753
|
if (!i && !await c())
|
|
752
754
|
return;
|
|
753
|
-
|
|
755
|
+
l.value = !0, await S(), r();
|
|
754
756
|
}
|
|
755
757
|
}
|
|
756
|
-
function
|
|
757
|
-
|
|
758
|
+
function s() {
|
|
759
|
+
l.value = !1;
|
|
758
760
|
}
|
|
759
|
-
return { hidePopup:
|
|
761
|
+
return { hidePopup: s, popup: a, shouldPopupContent: l, togglePopup: b, popoverRef: n };
|
|
760
762
|
}
|
|
761
|
-
function
|
|
762
|
-
const
|
|
763
|
+
function Se(e, t, u) {
|
|
764
|
+
const o = y(), {
|
|
763
765
|
isTextBoxReadonly: n,
|
|
764
|
-
textBoxClass:
|
|
766
|
+
textBoxClass: l,
|
|
765
767
|
textBoxPlaceholder: c,
|
|
766
|
-
textBoxTitle:
|
|
768
|
+
textBoxTitle: r,
|
|
767
769
|
onBlurTextBox: b,
|
|
768
|
-
onClickTextBox:
|
|
769
|
-
onFocusTextBox:
|
|
770
|
+
onClickTextBox: a,
|
|
771
|
+
onFocusTextBox: s,
|
|
770
772
|
onInput: i,
|
|
771
773
|
onKeyDownTextBox: p,
|
|
772
774
|
onKeyUpTextBox: f,
|
|
773
|
-
onMouseDownTextBox:
|
|
774
|
-
onTextBoxValueChange:
|
|
775
|
-
} =
|
|
775
|
+
onMouseDownTextBox: g,
|
|
776
|
+
onTextBoxValueChange: m
|
|
777
|
+
} = u;
|
|
776
778
|
return F(() => {
|
|
777
|
-
var
|
|
778
|
-
e.selectOnCreated && ((
|
|
779
|
-
}), () =>
|
|
780
|
-
ref:
|
|
779
|
+
var x, C;
|
|
780
|
+
e.selectOnCreated && ((x = o.value) == null || x.select()), e.focusOnCreated && ((C = o.value) == null || C.focus());
|
|
781
|
+
}), () => v("input", {
|
|
782
|
+
ref: o,
|
|
781
783
|
name: "input-group-value",
|
|
782
784
|
autocomplete: e.autoComplete ? "on" : "off",
|
|
783
|
-
class:
|
|
785
|
+
class: l.value,
|
|
784
786
|
disabled: e.disable,
|
|
785
787
|
maxlength: e.maxLength,
|
|
786
788
|
minlength: e.minLength,
|
|
787
789
|
placeholder: c.value,
|
|
788
790
|
readonly: n.value,
|
|
789
791
|
tabindex: e.tabIndex,
|
|
790
|
-
title:
|
|
792
|
+
title: r.value,
|
|
791
793
|
type: e.inputType,
|
|
792
794
|
value: t.value,
|
|
793
795
|
onBlur: b,
|
|
794
|
-
onChange:
|
|
795
|
-
onClick:
|
|
796
|
-
onFocus:
|
|
796
|
+
onChange: m,
|
|
797
|
+
onClick: a,
|
|
798
|
+
onFocus: s,
|
|
797
799
|
onInput: i,
|
|
798
800
|
onKeydown: p,
|
|
799
801
|
onKeyup: f,
|
|
800
|
-
onMousedown:
|
|
802
|
+
onMousedown: g
|
|
801
803
|
}, null);
|
|
802
804
|
}
|
|
803
|
-
function
|
|
804
|
-
const
|
|
805
|
+
function Ve(e, t, u) {
|
|
806
|
+
const o = y(e.separator), {
|
|
805
807
|
changeTextBoxValue: n
|
|
806
|
-
} =
|
|
807
|
-
name:
|
|
808
|
+
} = u, l = h(() => t.value ? t.value.split(o.value).map((r) => ({
|
|
809
|
+
name: r,
|
|
808
810
|
selectable: !0
|
|
809
811
|
})) : []);
|
|
810
|
-
function c(
|
|
811
|
-
n(
|
|
812
|
+
function c(r) {
|
|
813
|
+
n(r.map((b) => b.name).join(o.value), !0);
|
|
812
814
|
}
|
|
813
|
-
return () =>
|
|
815
|
+
return () => v(K, {
|
|
814
816
|
id: `${e.id}-tag-editor`,
|
|
815
817
|
class: "form-control",
|
|
816
|
-
data:
|
|
818
|
+
data: l.value,
|
|
817
819
|
showClose: !0,
|
|
818
820
|
showInput: !0,
|
|
819
821
|
onChange: c
|
|
820
822
|
}, null);
|
|
821
823
|
}
|
|
822
|
-
function
|
|
824
|
+
function De(e, t, u, o) {
|
|
823
825
|
const {
|
|
824
826
|
buttonGroupClass: n,
|
|
825
|
-
onClickButton:
|
|
827
|
+
onClickButton: l,
|
|
826
828
|
onMouseEnterButton: c,
|
|
827
|
-
onMouseLeaveButton:
|
|
828
|
-
} =
|
|
829
|
+
onMouseLeaveButton: r
|
|
830
|
+
} = u, {
|
|
829
831
|
enableClearButton: b,
|
|
830
|
-
showClearButton:
|
|
831
|
-
onClearValue:
|
|
832
|
-
} =
|
|
832
|
+
showClearButton: a,
|
|
833
|
+
onClearValue: s
|
|
834
|
+
} = o, i = y();
|
|
833
835
|
return {
|
|
834
|
-
renderButtonGroup: () =>
|
|
836
|
+
renderButtonGroup: () => v("div", {
|
|
835
837
|
id: `${e.id}-button-group`,
|
|
836
838
|
class: n.value
|
|
837
|
-
}, [b.value &&
|
|
839
|
+
}, [b.value && z(v("span", {
|
|
838
840
|
class: "input-group-text input-group-clear",
|
|
839
|
-
onClick:
|
|
840
|
-
}, [
|
|
841
|
+
onClick: s
|
|
842
|
+
}, [v("i", {
|
|
841
843
|
class: "f-icon modal_close"
|
|
842
|
-
}, null)]), [[
|
|
844
|
+
}, null)]), [[J, a.value]]), t.slots.buttonContent ? v("span", {
|
|
843
845
|
class: "input-group-text input-group-append-button",
|
|
844
|
-
onClick:
|
|
846
|
+
onClick: l,
|
|
845
847
|
onMouseenter: c,
|
|
846
|
-
onMouseleave:
|
|
847
|
-
}, [t.slots.buttonContent()]) : e.buttonContent ?
|
|
848
|
+
onMouseleave: r
|
|
849
|
+
}, [t.slots.buttonContent()]) : e.buttonContent ? v("span", {
|
|
848
850
|
class: "input-group-text input-group-append-button",
|
|
849
851
|
innerHTML: e.buttonContent,
|
|
850
852
|
ref: i,
|
|
851
|
-
onClick:
|
|
853
|
+
onClick: l,
|
|
852
854
|
onMouseenter: c,
|
|
853
|
-
onMouseleave:
|
|
855
|
+
onMouseleave: r
|
|
854
856
|
}, null) : null]),
|
|
855
857
|
buttonHandleElement: i
|
|
856
858
|
};
|
|
857
859
|
}
|
|
858
|
-
function
|
|
859
|
-
const
|
|
860
|
+
function Ae(e, t, u) {
|
|
861
|
+
const o = y(e.popupMinWidth), {
|
|
860
862
|
hidePopup: n,
|
|
861
|
-
popoverRef:
|
|
862
|
-
} =
|
|
863
|
-
return () =>
|
|
863
|
+
popoverRef: l
|
|
864
|
+
} = u;
|
|
865
|
+
return () => v(ee, {
|
|
864
866
|
id: `${e.id}-popover`,
|
|
865
|
-
ref:
|
|
867
|
+
ref: l,
|
|
866
868
|
visible: !0,
|
|
867
869
|
placement: "bottom-left",
|
|
868
870
|
host: e.popupHost,
|
|
869
871
|
"keep-width-with-reference": !0,
|
|
870
872
|
fitContent: !0,
|
|
871
873
|
"right-boundary": e.popupRightBoundary,
|
|
872
|
-
minWidth:
|
|
874
|
+
minWidth: o.value,
|
|
873
875
|
offsetX: e.popupOffsetX,
|
|
874
876
|
onHidden: n
|
|
875
877
|
}, {
|
|
876
878
|
default: () => {
|
|
877
|
-
var c,
|
|
878
|
-
return [(
|
|
879
|
+
var c, r;
|
|
880
|
+
return [(r = (c = t.slots).default) == null ? void 0 : r.call(c)];
|
|
879
881
|
}
|
|
880
882
|
});
|
|
881
883
|
}
|
|
882
|
-
const
|
|
884
|
+
const P = /* @__PURE__ */ j({
|
|
883
885
|
name: "FButtonEdit",
|
|
884
|
-
props:
|
|
886
|
+
props: L,
|
|
885
887
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
886
888
|
setup(e, t) {
|
|
887
|
-
const
|
|
889
|
+
const u = y(), o = y(e.customClass), n = y(e.modelValue), l = H(e, t, u, n), {
|
|
888
890
|
shouldPopupContent: c,
|
|
889
|
-
hidePopup:
|
|
891
|
+
hidePopup: r,
|
|
890
892
|
togglePopup: b
|
|
891
|
-
} =
|
|
893
|
+
} = l, a = W(e, t, u, l, n), s = y(""), i = Le(e, t, n, s, l), {
|
|
892
894
|
hasFocusedTextBox: p,
|
|
893
895
|
commitValue: f,
|
|
894
|
-
inputGroupClass:
|
|
895
|
-
} = i,
|
|
896
|
-
onMouseEnterTextBox:
|
|
897
|
-
onMouseLeaveTextBox:
|
|
898
|
-
} =
|
|
896
|
+
inputGroupClass: g
|
|
897
|
+
} = i, m = Fe(e, t, n, p, s, i), {
|
|
898
|
+
onMouseEnterTextBox: x,
|
|
899
|
+
onMouseLeaveTextBox: C
|
|
900
|
+
} = m, O = h(() => {
|
|
899
901
|
const d = {
|
|
900
902
|
"f-button-edit": !0,
|
|
901
903
|
"f-cmp-inputgroup": !0,
|
|
902
904
|
"f-button-edit-nowrap": !e.wrapText
|
|
903
905
|
};
|
|
904
|
-
return
|
|
906
|
+
return o.value && o.value.split(" ").reduce((B, q) => (B[q] = !0, B), d), d;
|
|
905
907
|
});
|
|
906
|
-
function
|
|
907
|
-
return e.multiSelect && e.inputType === "tag" ?
|
|
908
|
+
function T() {
|
|
909
|
+
return e.multiSelect && e.inputType === "tag" ? Ve(e, n, i) : Se(e, n, i);
|
|
908
910
|
}
|
|
909
|
-
let k =
|
|
910
|
-
|
|
911
|
-
k =
|
|
911
|
+
let k = T();
|
|
912
|
+
R([() => e.multiSelect, () => e.inputType], () => {
|
|
913
|
+
k = T();
|
|
912
914
|
});
|
|
913
915
|
const {
|
|
914
|
-
renderButtonGroup:
|
|
915
|
-
buttonHandleElement:
|
|
916
|
-
} =
|
|
916
|
+
renderButtonGroup: M,
|
|
917
|
+
buttonHandleElement: w
|
|
918
|
+
} = De(e, t, a, m), I = Ae(e, t, l), E = {
|
|
917
919
|
commitValue: f,
|
|
918
|
-
elementRef:
|
|
919
|
-
hidePopup:
|
|
920
|
+
elementRef: u,
|
|
921
|
+
hidePopup: r,
|
|
920
922
|
shouldPopupContent: c,
|
|
921
923
|
togglePopup: b,
|
|
922
924
|
openDialog: () => {
|
|
923
|
-
|
|
925
|
+
w.value && e.buttonBehavior === "Modal" && w.value.click();
|
|
924
926
|
},
|
|
925
927
|
getModal: () => {
|
|
926
928
|
var d;
|
|
927
|
-
return e.buttonBehavior === "Modal" ? (d =
|
|
929
|
+
return e.buttonBehavior === "Modal" ? (d = a.modalRef.value) == null ? void 0 : d.value : null;
|
|
928
930
|
}
|
|
929
931
|
};
|
|
930
932
|
return F(() => {
|
|
931
|
-
|
|
933
|
+
u.value.componentInstance = E, window.onresize = () => {
|
|
932
934
|
document.body.click();
|
|
933
935
|
};
|
|
934
|
-
}), t.expose(
|
|
935
|
-
ref:
|
|
936
|
-
class:
|
|
936
|
+
}), t.expose(E), () => v(Q, null, [v("div", A(t.attrs, {
|
|
937
|
+
ref: u,
|
|
938
|
+
class: O.value,
|
|
937
939
|
id: e.id
|
|
938
|
-
}), [
|
|
940
|
+
}), [v("div", {
|
|
939
941
|
id: `${e.id}-input-group`,
|
|
940
|
-
class:
|
|
941
|
-
onMouseenter:
|
|
942
|
-
onMouseleave:
|
|
943
|
-
}, [k(),
|
|
942
|
+
class: g.value,
|
|
943
|
+
onMouseenter: x,
|
|
944
|
+
onMouseleave: C
|
|
945
|
+
}, [k(), M()])]), c.value && I()]);
|
|
944
946
|
}
|
|
945
|
-
})
|
|
947
|
+
});
|
|
948
|
+
function Ne(e, t, u) {
|
|
949
|
+
const {
|
|
950
|
+
buttonGroupClass: o
|
|
951
|
+
} = u, n = y();
|
|
952
|
+
return {
|
|
953
|
+
renderButtonGroup: () => v("div", {
|
|
954
|
+
id: `${e.id}-button-group`,
|
|
955
|
+
class: o.value
|
|
956
|
+
}, [t.slots.buttonContent ? v("span", {
|
|
957
|
+
class: "input-group-text input-group-append-button"
|
|
958
|
+
}, [t.slots.buttonContent()]) : e.buttonContent ? v("span", {
|
|
959
|
+
class: "input-group-text input-group-append-button",
|
|
960
|
+
innerHTML: e.buttonContent,
|
|
961
|
+
ref: n
|
|
962
|
+
}, null) : null]),
|
|
963
|
+
buttonHandleElement: n
|
|
964
|
+
};
|
|
965
|
+
}
|
|
966
|
+
const Ge = /* @__PURE__ */ j({
|
|
946
967
|
name: "FButtonEdit",
|
|
947
|
-
props:
|
|
968
|
+
props: L,
|
|
948
969
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
949
970
|
setup(e, t) {
|
|
950
|
-
const
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
971
|
+
const u = y(), o = D("design-item-context"), n = te(u, o), l = y(e.customClass), c = y(e.modelValue), r = H(e, t, u, c), b = W(e, t, u, r, c), a = y(), s = h(() => ({
|
|
972
|
+
"f-cmp-inputgroup": !0,
|
|
973
|
+
"input-group": !0,
|
|
974
|
+
"f-state-disable": !0,
|
|
975
|
+
"f-state-editable": !1,
|
|
976
|
+
"f-state-readonly": !0
|
|
977
|
+
}));
|
|
954
978
|
F(() => {
|
|
955
|
-
|
|
979
|
+
u.value.componentInstance = n;
|
|
956
980
|
}), t.expose(n.value);
|
|
957
|
-
const
|
|
958
|
-
const
|
|
981
|
+
const i = h(() => {
|
|
982
|
+
const f = {
|
|
959
983
|
"f-button-edit": !0,
|
|
960
984
|
"f-cmp-inputgroup": !0,
|
|
961
985
|
"f-button-edit-nowrap": !e.wrapText
|
|
962
986
|
};
|
|
963
|
-
return
|
|
964
|
-
})
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
C = g();
|
|
971
|
-
});
|
|
972
|
-
const {
|
|
973
|
-
renderButtonGroup: B,
|
|
974
|
-
buttonHandleElement: T
|
|
975
|
-
} = X(e, t, b, f);
|
|
976
|
-
return () => h("div", L(t.attrs, {
|
|
977
|
-
ref: a,
|
|
978
|
-
class: y.value,
|
|
987
|
+
return l.value && l.value.split(" ").reduce((g, m) => (g[m] = !0, g), f), f;
|
|
988
|
+
}), {
|
|
989
|
+
renderButtonGroup: p
|
|
990
|
+
} = Ne(e, t, b);
|
|
991
|
+
return () => v("div", A(t.attrs, {
|
|
992
|
+
ref: u,
|
|
993
|
+
class: i.value,
|
|
979
994
|
id: e.id
|
|
980
|
-
}), [
|
|
981
|
-
class:
|
|
982
|
-
}, [
|
|
995
|
+
}), [v("div", {
|
|
996
|
+
class: s.value
|
|
997
|
+
}, [v("input", {
|
|
998
|
+
ref: a,
|
|
999
|
+
class: "form-control",
|
|
1000
|
+
readonly: !0,
|
|
1001
|
+
placeholder: e.placeholder
|
|
1002
|
+
}, null), p()])]);
|
|
983
1003
|
}
|
|
984
1004
|
});
|
|
985
|
-
|
|
986
|
-
e["button-edit"] =
|
|
1005
|
+
P.register = (e, t, u, o) => {
|
|
1006
|
+
e["button-edit"] = P, t["button-edit"] = G;
|
|
987
1007
|
};
|
|
988
|
-
|
|
989
|
-
e["button-edit"] =
|
|
1008
|
+
P.registerDesigner = (e, t, u) => {
|
|
1009
|
+
e["button-edit"] = Ge, t["button-edit"] = G;
|
|
990
1010
|
};
|
|
991
|
-
const
|
|
1011
|
+
const ze = ne(P);
|
|
992
1012
|
export {
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
1013
|
+
P as FButtonEdit,
|
|
1014
|
+
L as buttonEditProps,
|
|
1015
|
+
ze as default,
|
|
1016
|
+
G as propsResolver
|
|
997
1017
|
};
|