@farris/ui-vue 1.2.7 → 1.2.9
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 +136 -136
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +418 -456
- package/components/avatar/index.umd.cjs +1 -1
- package/components/border-editor/index.esm.js +4 -4
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button/index.esm.js +1 -1
- package/components/button/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +363 -436
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +5 -5
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +417 -417
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +176 -176
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +557 -594
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +119 -119
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +502 -535
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +69 -69
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +387 -275
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1219 -983
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +292 -219
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +5718 -5546
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3291 -2930
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2650 -2682
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +945 -932
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +175 -133
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/discussion-editor/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +246 -246
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1319 -1172
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +119 -82
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/enum-editor/index.esm.js +3 -3
- package/components/enum-editor/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +569 -514
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +104 -104
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3122 -2686
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +6780 -6608
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1466 -1523
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1048 -1035
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +422 -422
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +674 -716
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +291 -291
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +303 -230
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2486 -2130
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +7474 -7272
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6139 -5949
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +1 -1
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +432 -371
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +1124 -0
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1155 -0
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1215 -1178
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +147 -147
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1240 -1346
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +489 -428
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +220 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1512 -1540
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +749 -815
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +7074 -0
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +86 -86
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +442 -479
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +213 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +116 -116
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +943 -918
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1174 -1295
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5383 -5171
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +201 -201
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +684 -542
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +121 -121
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/spacing-editor/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +1158 -382
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +232 -232
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +451 -487
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2078 -2168
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +318 -320
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +192 -192
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +471 -497
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1421 -1441
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +430 -421
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +6806 -6624
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2793 -2433
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +165 -165
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +255 -255
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +413 -334
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +902 -902
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +54155 -52847
- package/farris.all.umd.cjs +9 -9
- 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/checkbox/index.d.ts +1 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -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/data-grid/index.d.ts +5 -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 +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- 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 +19 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +3 -3
- package/types/dynamic-form/index.d.ts +3 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- 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/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
|
@@ -1,115 +1,107 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
import { resolveAppearance as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { defineComponent as j, ref as y, computed as h, createVNode as v, Teleport as q, createApp as U, onUnmounted as _, inject as D, watch as R, nextTick as L, onMounted as F, withDirectives as X, vShow as z, Fragment as J, mergeProps as S } from "vue";
|
|
2
|
+
import { cloneDeep as Q } from "lodash-es";
|
|
3
|
+
import { resolveAppearance as Y } from "../dynamic-resolver/index.esm.js";
|
|
4
|
+
import Z from "../tags/index.esm.js";
|
|
5
|
+
import K from "../popover/index.esm.js";
|
|
6
|
+
import { useDesignerComponent as ee } from "../designer-canvas/index.esm.js";
|
|
7
|
+
import { withInstall as te } from "../common/index.esm.js";
|
|
8
|
+
const ne = {}, oe = {};
|
|
9
|
+
function A(e) {
|
|
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 ? A(t[r]) : Q(t[r].default)), c), {});
|
|
11
|
+
return (!n || !o.find((c) => c == "id")) && (l.id = `${u}-${Date.now()}`), l;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
let u = L(o);
|
|
16
|
-
const n = _[e];
|
|
17
|
-
return u = n ? n({ getSchemaByType: D }, u, t) : u, u;
|
|
18
|
-
}
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
function ce(e, t) {
|
|
22
|
-
const o = L(t);
|
|
23
|
-
return Object.keys(e).reduce((u, n) => (u[n] = e[n], u), o), o;
|
|
13
|
+
function ue(e, t) {
|
|
14
|
+
const u = A(t);
|
|
15
|
+
return Object.keys(e).reduce((o, n) => (o[n] && typeof o[n] == "object" ? Object.assign(o[n], e[n]) : o[n] = e[n], o), u), u;
|
|
24
16
|
}
|
|
25
|
-
function
|
|
26
|
-
return Object.keys(e).filter((
|
|
17
|
+
function ae(e, t) {
|
|
18
|
+
return Object.keys(e).filter((o) => e[o] != null).reduce((o, n) => {
|
|
27
19
|
if (t.has(n)) {
|
|
28
20
|
const l = t.get(n);
|
|
29
21
|
if (typeof l == "string")
|
|
30
|
-
|
|
22
|
+
o[l] = e[n];
|
|
31
23
|
else {
|
|
32
24
|
const c = l(n, e[n], e);
|
|
33
|
-
Object.assign(
|
|
25
|
+
Object.assign(o, c);
|
|
34
26
|
}
|
|
35
27
|
} else
|
|
36
|
-
|
|
37
|
-
return
|
|
28
|
+
o[n] = e[n];
|
|
29
|
+
return o;
|
|
38
30
|
}, {});
|
|
39
31
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
return
|
|
32
|
+
function le(e, t, u = /* @__PURE__ */ new Map()) {
|
|
33
|
+
const o = ue(e, t);
|
|
34
|
+
return ae(o, u);
|
|
43
35
|
}
|
|
44
|
-
function
|
|
45
|
-
function t(a,
|
|
46
|
-
if (typeof
|
|
47
|
-
return
|
|
48
|
-
if (typeof
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
return Number(
|
|
52
|
-
if (
|
|
53
|
-
return Number(
|
|
54
|
-
if (
|
|
55
|
-
return Number(
|
|
36
|
+
function ie(e = {}) {
|
|
37
|
+
function t(a, s, i, p) {
|
|
38
|
+
if (typeof i == "number")
|
|
39
|
+
return p[a].length === i;
|
|
40
|
+
if (typeof i == "object") {
|
|
41
|
+
const f = Object.keys(i)[0], g = i[f];
|
|
42
|
+
if (f === "not")
|
|
43
|
+
return Number(p[a].length) !== Number(g);
|
|
44
|
+
if (f === "moreThan")
|
|
45
|
+
return Number(p[a].length) >= Number(g);
|
|
46
|
+
if (f === "lessThan")
|
|
47
|
+
return Number(p[a].length) <= Number(g);
|
|
56
48
|
}
|
|
57
49
|
return !1;
|
|
58
50
|
}
|
|
59
|
-
function
|
|
60
|
-
return
|
|
51
|
+
function u(a, s, i, p) {
|
|
52
|
+
return p[a] && p[a].propertyValue && String(p[a].propertyValue.value) === String(i);
|
|
61
53
|
}
|
|
62
|
-
const
|
|
54
|
+
const o = /* @__PURE__ */ new Map([
|
|
63
55
|
["length", t],
|
|
64
|
-
["getProperty",
|
|
56
|
+
["getProperty", u]
|
|
65
57
|
]);
|
|
66
|
-
Object.keys(e).reduce((a,
|
|
67
|
-
function n(a,
|
|
68
|
-
const
|
|
69
|
-
return typeof
|
|
70
|
-
if (
|
|
71
|
-
return { target:
|
|
72
|
-
const
|
|
73
|
-
return { target:
|
|
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
|
+
if (p === "length")
|
|
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 };
|
|
74
66
|
}) : [];
|
|
75
67
|
}
|
|
76
68
|
function l(a) {
|
|
77
|
-
return Object.keys(a).reduce((
|
|
78
|
-
const
|
|
79
|
-
return
|
|
69
|
+
return Object.keys(a).reduce((i, p) => {
|
|
70
|
+
const f = n(p, a[p]);
|
|
71
|
+
return i.push(...f), i;
|
|
80
72
|
}, []);
|
|
81
73
|
}
|
|
82
|
-
function c(a,
|
|
83
|
-
if (
|
|
84
|
-
const
|
|
85
|
-
return
|
|
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;
|
|
86
78
|
}
|
|
87
79
|
return !1;
|
|
88
80
|
}
|
|
89
|
-
function
|
|
90
|
-
return l(a).reduce((
|
|
81
|
+
function r(a, s) {
|
|
82
|
+
return l(a).reduce((f, g) => f && c(g, s), !0);
|
|
91
83
|
}
|
|
92
|
-
function
|
|
93
|
-
const
|
|
94
|
-
return
|
|
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);
|
|
95
87
|
}
|
|
96
|
-
return { parseValueSchema:
|
|
88
|
+
return { parseValueSchema: b };
|
|
97
89
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
function
|
|
101
|
-
return
|
|
102
|
-
const
|
|
103
|
-
return Object.assign(
|
|
90
|
+
const re = {}, se = {};
|
|
91
|
+
ie();
|
|
92
|
+
function ce(e, t, u = /* @__PURE__ */ new Map(), o = (c, r, b) => r, n = {}, l = (c) => c) {
|
|
93
|
+
return ne[t.title] = t, oe[t.title] = o, re[t.title] = n, se[t.title] = l, (c = {}) => {
|
|
94
|
+
const r = le(c, t, u), b = Object.keys(e).reduce((a, s) => (a[s] = e[s].default, a), {});
|
|
95
|
+
return Object.assign(b, r);
|
|
104
96
|
};
|
|
105
97
|
}
|
|
106
|
-
const
|
|
107
|
-
["appearance",
|
|
98
|
+
const de = /* @__PURE__ */ new Map([
|
|
99
|
+
["appearance", Y]
|
|
108
100
|
]);
|
|
109
|
-
function
|
|
101
|
+
function pe(e, t, u) {
|
|
110
102
|
return t;
|
|
111
103
|
}
|
|
112
|
-
const
|
|
104
|
+
const fe = "https://json-schema.org/draft/2020-12/schema", be = "https://farris-design.gitee.io/button-edit.schema.json", ge = "button-edit", ye = "A Farris Input Component", me = "object", ve = {
|
|
113
105
|
id: {
|
|
114
106
|
description: "The unique identifier for a Input Group",
|
|
115
107
|
type: "string"
|
|
@@ -293,18 +285,18 @@ const ve = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-
|
|
|
293
285
|
type: "string",
|
|
294
286
|
default: ""
|
|
295
287
|
}
|
|
296
|
-
},
|
|
288
|
+
}, he = [
|
|
297
289
|
"id",
|
|
298
290
|
"type"
|
|
299
|
-
],
|
|
300
|
-
$schema:
|
|
301
|
-
$id:
|
|
302
|
-
title:
|
|
303
|
-
description:
|
|
304
|
-
type:
|
|
305
|
-
properties:
|
|
306
|
-
required:
|
|
307
|
-
},
|
|
291
|
+
], Ce = {
|
|
292
|
+
$schema: fe,
|
|
293
|
+
$id: be,
|
|
294
|
+
title: ge,
|
|
295
|
+
description: ye,
|
|
296
|
+
type: me,
|
|
297
|
+
properties: ve,
|
|
298
|
+
required: he
|
|
299
|
+
}, Be = "buttonEdit", xe = "A Farris Component", Oe = "object", Te = {
|
|
308
300
|
basic: {
|
|
309
301
|
description: "Basic Infomation",
|
|
310
302
|
title: "基本信息",
|
|
@@ -386,12 +378,12 @@ const ve = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-
|
|
|
386
378
|
}
|
|
387
379
|
}
|
|
388
380
|
}
|
|
389
|
-
},
|
|
390
|
-
title:
|
|
391
|
-
description:
|
|
392
|
-
type:
|
|
393
|
-
categories:
|
|
394
|
-
},
|
|
381
|
+
}, ke = {
|
|
382
|
+
title: Be,
|
|
383
|
+
description: xe,
|
|
384
|
+
type: Oe,
|
|
385
|
+
categories: Te
|
|
386
|
+
}, V = {
|
|
395
387
|
/**
|
|
396
388
|
* 组件标识
|
|
397
389
|
*/
|
|
@@ -497,79 +489,79 @@ const ve = "https://json-schema.org/draft/2020-12/schema", Be = "https://farris-
|
|
|
497
489
|
* 打开前
|
|
498
490
|
*/
|
|
499
491
|
beforeOpen: { type: Function, default: null }
|
|
500
|
-
},
|
|
492
|
+
}, N = ce(V, Ce, de, pe, ke), we = {
|
|
501
493
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
502
494
|
host: { type: Object },
|
|
503
495
|
backgroundColor: { type: String, default: "" }
|
|
504
|
-
},
|
|
496
|
+
}, Ee = /* @__PURE__ */ j({
|
|
505
497
|
name: "FOverlay",
|
|
506
|
-
props:
|
|
498
|
+
props: we,
|
|
507
499
|
emits: ["click"],
|
|
508
500
|
setup(e, t) {
|
|
509
|
-
const
|
|
501
|
+
const u = y(e.popupContentPosition), o = y(e.host), n = h(() => ({
|
|
510
502
|
backgroundColor: e.backgroundColor || "",
|
|
511
503
|
pointerEvents: "auto"
|
|
512
504
|
}));
|
|
513
|
-
function l(
|
|
514
|
-
t.emit("click"),
|
|
505
|
+
function l(r) {
|
|
506
|
+
t.emit("click"), r.preventDefault(), r.stopPropagation();
|
|
515
507
|
}
|
|
516
|
-
|
|
517
|
-
const
|
|
518
|
-
if (
|
|
519
|
-
const
|
|
508
|
+
h(() => {
|
|
509
|
+
const r = o.value;
|
|
510
|
+
if (r) {
|
|
511
|
+
const b = r.getBoundingClientRect(), {
|
|
520
512
|
left: a,
|
|
521
|
-
top:
|
|
522
|
-
height:
|
|
523
|
-
} =
|
|
513
|
+
top: s,
|
|
514
|
+
height: i
|
|
515
|
+
} = b;
|
|
524
516
|
return {
|
|
525
517
|
left: a,
|
|
526
|
-
top:
|
|
518
|
+
top: s + i
|
|
527
519
|
};
|
|
528
520
|
}
|
|
529
|
-
return
|
|
521
|
+
return u.value;
|
|
530
522
|
});
|
|
531
|
-
const c =
|
|
523
|
+
const c = h(() => ({
|
|
532
524
|
// position: 'relative',
|
|
533
525
|
// left: `${position.value.left}px`,
|
|
534
526
|
// top: `${position.value.top}px`
|
|
535
527
|
}));
|
|
536
|
-
return () =>
|
|
528
|
+
return () => v(q, {
|
|
537
529
|
to: "body"
|
|
538
530
|
}, {
|
|
539
531
|
default: () => {
|
|
540
|
-
var
|
|
541
|
-
return [
|
|
532
|
+
var r, b;
|
|
533
|
+
return [v("div", {
|
|
542
534
|
class: "overlay-container",
|
|
543
535
|
onClick: (a) => l(a),
|
|
544
536
|
style: n.value
|
|
545
|
-
}, [
|
|
537
|
+
}, [v("div", {
|
|
546
538
|
style: c.value
|
|
547
|
-
}, [(
|
|
539
|
+
}, [(b = (r = t.slots).default) == null ? void 0 : b.call(r)])])];
|
|
548
540
|
}
|
|
549
541
|
});
|
|
550
542
|
}
|
|
551
543
|
});
|
|
552
|
-
function
|
|
544
|
+
function Pe(e) {
|
|
553
545
|
if (e.content && e.content.render)
|
|
554
546
|
return e.content.render;
|
|
555
547
|
if (e.render && typeof e.render == "function")
|
|
556
548
|
return e.render;
|
|
557
549
|
}
|
|
558
|
-
function
|
|
550
|
+
function Me(e) {
|
|
559
551
|
const t = document.createElement("div");
|
|
560
552
|
t.style.display = "contents";
|
|
561
|
-
let
|
|
562
|
-
const
|
|
553
|
+
let u;
|
|
554
|
+
const o = e.onClickCallback || (() => {
|
|
563
555
|
}), n = () => {
|
|
564
|
-
|
|
556
|
+
o(), u && u.unmount();
|
|
565
557
|
};
|
|
566
|
-
return
|
|
558
|
+
return u = U({
|
|
567
559
|
setup() {
|
|
568
|
-
|
|
560
|
+
_(() => {
|
|
569
561
|
document.body.removeChild(t);
|
|
570
562
|
});
|
|
571
|
-
const l =
|
|
572
|
-
return () =>
|
|
563
|
+
const l = Pe(e);
|
|
564
|
+
return () => v(Ee, {
|
|
573
565
|
"popup-content-position": e.popupPosition,
|
|
574
566
|
host: e.host,
|
|
575
567
|
onClick: n,
|
|
@@ -578,214 +570,214 @@ function Ve(e) {
|
|
|
578
570
|
default: () => [l && l()]
|
|
579
571
|
});
|
|
580
572
|
}
|
|
581
|
-
}), document.body.appendChild(t),
|
|
573
|
+
}), document.body.appendChild(t), u.mount(t), u;
|
|
582
574
|
}
|
|
583
|
-
class
|
|
575
|
+
class Ie {
|
|
584
576
|
static show(t) {
|
|
585
|
-
return
|
|
577
|
+
return Me(t);
|
|
586
578
|
}
|
|
587
579
|
}
|
|
588
|
-
const
|
|
589
|
-
function
|
|
590
|
-
function
|
|
591
|
-
const
|
|
580
|
+
const je = Symbol("FModalService");
|
|
581
|
+
function G(e, t) {
|
|
582
|
+
function u() {
|
|
583
|
+
const o = e.beforeOpen || e.beforeClickButton || null;
|
|
592
584
|
let n = Promise.resolve(!0);
|
|
593
|
-
if (
|
|
594
|
-
const l =
|
|
585
|
+
if (o) {
|
|
586
|
+
const l = o(t.value);
|
|
595
587
|
if (typeof l > "u")
|
|
596
588
|
return n;
|
|
597
589
|
typeof l == "boolean" ? n = Promise.resolve(l) : n = l;
|
|
598
590
|
}
|
|
599
591
|
return n;
|
|
600
592
|
}
|
|
601
|
-
return { judgeCanOpen:
|
|
593
|
+
return { judgeCanOpen: u };
|
|
602
594
|
}
|
|
603
|
-
function
|
|
604
|
-
const l =
|
|
595
|
+
function $(e, t, u, o, n) {
|
|
596
|
+
const l = y(e.buttonBehavior), c = y(e.popupOnInput), r = h(() => ({
|
|
605
597
|
"input-group-append": !0,
|
|
606
598
|
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
607
|
-
})), { judgeCanOpen:
|
|
608
|
-
async function
|
|
609
|
-
if (await
|
|
610
|
-
const
|
|
599
|
+
})), { judgeCanOpen: b } = G(e, n), a = h(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), s = D(je, null), i = y();
|
|
600
|
+
async function p(m) {
|
|
601
|
+
if (await b() && a.value) {
|
|
602
|
+
const x = !!t.slots.default;
|
|
611
603
|
if (l.value === "Modal") {
|
|
612
|
-
const
|
|
613
|
-
...
|
|
604
|
+
const C = e.modalOptions, O = s == null ? void 0 : s.open({
|
|
605
|
+
...C,
|
|
614
606
|
render: () => t.slots.default && t.slots.default()
|
|
615
607
|
});
|
|
616
|
-
|
|
608
|
+
i.value = O == null ? void 0 : O.modalRef;
|
|
617
609
|
}
|
|
618
|
-
l.value === "Overlay" &&
|
|
610
|
+
l.value === "Overlay" && Ie.show({
|
|
619
611
|
// host: buttonEditRef.value,
|
|
620
612
|
host: document.body,
|
|
621
613
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
622
614
|
render: () => t.slots.default && t.slots.default()
|
|
623
|
-
}),
|
|
615
|
+
}), x && l.value === "Popup" && o.togglePopup(!0), x && c.value && o.hidePopup(), t.emit("clickButton", { origin: m, value: e.modelValue });
|
|
624
616
|
}
|
|
625
617
|
}
|
|
626
|
-
function
|
|
627
|
-
t.emit("mouseEnterIcon",
|
|
618
|
+
function f(m) {
|
|
619
|
+
t.emit("mouseEnterIcon", m);
|
|
628
620
|
}
|
|
629
|
-
function g(
|
|
630
|
-
t.emit("mouseLeaveIcon",
|
|
621
|
+
function g(m) {
|
|
622
|
+
t.emit("mouseLeaveIcon", m);
|
|
631
623
|
}
|
|
632
624
|
return {
|
|
633
|
-
buttonGroupClass:
|
|
634
|
-
onClickButton:
|
|
635
|
-
onMouseEnterButton:
|
|
625
|
+
buttonGroupClass: r,
|
|
626
|
+
onClickButton: p,
|
|
627
|
+
onMouseEnterButton: f,
|
|
636
628
|
onMouseLeaveButton: g,
|
|
637
|
-
modalRef:
|
|
629
|
+
modalRef: i
|
|
638
630
|
};
|
|
639
631
|
}
|
|
640
|
-
function
|
|
641
|
-
const c =
|
|
642
|
-
function a(
|
|
643
|
-
c.value =
|
|
632
|
+
function Re(e, t, u, o, n, l) {
|
|
633
|
+
const c = y(!1), r = h(() => e.enableClear && !e.readonly && !e.disable), { changeTextBoxValue: b } = l;
|
|
634
|
+
function a(f) {
|
|
635
|
+
c.value = f;
|
|
644
636
|
}
|
|
645
|
-
|
|
637
|
+
R(n, () => {
|
|
646
638
|
a(!!n.value);
|
|
647
639
|
});
|
|
648
|
-
function
|
|
649
|
-
const g = !e.readonly && !e.disable && e.editable,
|
|
650
|
-
|
|
640
|
+
function s(f) {
|
|
641
|
+
const g = !e.readonly && !e.disable && e.editable, m = !e.editable;
|
|
642
|
+
f.stopPropagation(), (g || m) && (b("", !1), a(!c.value), t.emit("clear"));
|
|
651
643
|
}
|
|
652
|
-
function
|
|
653
|
-
if (
|
|
654
|
-
if (!
|
|
644
|
+
function i(f) {
|
|
645
|
+
if (r.value) {
|
|
646
|
+
if (!u.value) {
|
|
655
647
|
a(!1);
|
|
656
648
|
return;
|
|
657
649
|
}
|
|
658
650
|
!e.disable && !e.readonly && a(!0);
|
|
659
651
|
}
|
|
660
652
|
}
|
|
661
|
-
function f
|
|
662
|
-
|
|
653
|
+
function p(f) {
|
|
654
|
+
r.value && a(!1);
|
|
663
655
|
}
|
|
664
656
|
return {
|
|
665
|
-
enableClearButton:
|
|
657
|
+
enableClearButton: r,
|
|
666
658
|
showClearButton: c,
|
|
667
|
-
onClearValue:
|
|
668
|
-
onMouseEnterTextBox:
|
|
669
|
-
onMouseLeaveTextBox:
|
|
659
|
+
onClearValue: s,
|
|
660
|
+
onMouseEnterTextBox: i,
|
|
661
|
+
onMouseLeaveTextBox: p
|
|
670
662
|
};
|
|
671
663
|
}
|
|
672
|
-
function
|
|
673
|
-
const l =
|
|
664
|
+
function Fe(e, t, u, o, n) {
|
|
665
|
+
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(() => ({
|
|
674
666
|
"text-left": e.textAlign === "left",
|
|
675
667
|
"text-center": e.textAlign === "center",
|
|
676
668
|
"text-right": e.textAlign === "right",
|
|
677
669
|
"form-control": !0,
|
|
678
670
|
"f-utils-fill": !0
|
|
679
|
-
})), g =
|
|
671
|
+
})), g = h(() => ({
|
|
680
672
|
"input-group": !0,
|
|
681
673
|
"f-state-disable": e.disable,
|
|
682
674
|
"f-state-editable": e.editable && !e.disable && !e.readonly,
|
|
683
675
|
"f-state-readonly": e.readonly && !e.disable,
|
|
684
|
-
"f-state-focus":
|
|
676
|
+
"f-state-focus": p.value
|
|
685
677
|
}));
|
|
686
|
-
function
|
|
687
|
-
|
|
678
|
+
function m(d, B = !0) {
|
|
679
|
+
u.value !== d && (u.value = d, B && t.emit("change", d), t.emit("update:modelValue", d));
|
|
688
680
|
}
|
|
689
|
-
function
|
|
690
|
-
|
|
681
|
+
function x(d) {
|
|
682
|
+
r.value = !1, m(d, !0);
|
|
691
683
|
}
|
|
692
|
-
|
|
684
|
+
R(
|
|
693
685
|
() => e.modelValue,
|
|
694
|
-
(
|
|
695
|
-
|
|
686
|
+
(d) => {
|
|
687
|
+
u.value = d;
|
|
696
688
|
}
|
|
697
689
|
);
|
|
698
|
-
function
|
|
699
|
-
|
|
690
|
+
function C(d) {
|
|
691
|
+
i.value = !1, t.emit("blur", d), d.stopPropagation();
|
|
700
692
|
}
|
|
701
|
-
function
|
|
702
|
-
t.emit("click",
|
|
693
|
+
function O(d) {
|
|
694
|
+
t.emit("click", d);
|
|
703
695
|
}
|
|
704
|
-
function
|
|
705
|
-
e.disable || (
|
|
696
|
+
function T(d) {
|
|
697
|
+
e.disable || (i.value = !0, s.value || (t.emit("focus", d), c.value && !r.value && n.popup()));
|
|
706
698
|
}
|
|
707
|
-
function
|
|
708
|
-
t.emit("input",
|
|
709
|
-
const
|
|
710
|
-
|
|
699
|
+
function k(d) {
|
|
700
|
+
t.emit("input", d.target.value);
|
|
701
|
+
const B = d.target.value;
|
|
702
|
+
o.value = B, u.value !== B && m(B, !0), l.value && !r.value && n.popup();
|
|
711
703
|
}
|
|
712
|
-
function
|
|
713
|
-
|
|
704
|
+
function M(d) {
|
|
705
|
+
d.target.tagName !== "INPUT" && d.preventDefault(), d.stopPropagation();
|
|
714
706
|
}
|
|
715
|
-
function
|
|
716
|
-
t.emit("keydown",
|
|
707
|
+
function w(d) {
|
|
708
|
+
t.emit("keydown", d);
|
|
717
709
|
}
|
|
718
|
-
function
|
|
719
|
-
|
|
710
|
+
function I(d) {
|
|
711
|
+
d.key === "Enter" && (l.value || c.value) && n.hidePopup(), t.emit("keyup", d);
|
|
720
712
|
}
|
|
721
|
-
function
|
|
722
|
-
const
|
|
723
|
-
|
|
713
|
+
function E(d) {
|
|
714
|
+
const B = d.target.value;
|
|
715
|
+
d.stopPropagation(), m(B);
|
|
724
716
|
}
|
|
725
717
|
return {
|
|
726
|
-
hasFocusedTextBox:
|
|
727
|
-
isTextBoxReadonly:
|
|
728
|
-
textBoxClass:
|
|
718
|
+
hasFocusedTextBox: p,
|
|
719
|
+
isTextBoxReadonly: s,
|
|
720
|
+
textBoxClass: f,
|
|
729
721
|
textBoxPlaceholder: a,
|
|
730
|
-
textBoxTitle:
|
|
722
|
+
textBoxTitle: b,
|
|
731
723
|
inputGroupClass: g,
|
|
732
|
-
changeTextBoxValue:
|
|
733
|
-
commitValue:
|
|
734
|
-
onBlurTextBox:
|
|
735
|
-
onClickTextBox:
|
|
736
|
-
onFocusTextBox:
|
|
737
|
-
onInput:
|
|
738
|
-
onKeyDownTextBox:
|
|
739
|
-
onKeyUpTextBox:
|
|
740
|
-
onMouseDownTextBox:
|
|
741
|
-
onTextBoxValueChange:
|
|
724
|
+
changeTextBoxValue: m,
|
|
725
|
+
commitValue: x,
|
|
726
|
+
onBlurTextBox: C,
|
|
727
|
+
onClickTextBox: O,
|
|
728
|
+
onFocusTextBox: T,
|
|
729
|
+
onInput: k,
|
|
730
|
+
onKeyDownTextBox: w,
|
|
731
|
+
onKeyUpTextBox: I,
|
|
732
|
+
onMouseDownTextBox: M,
|
|
733
|
+
onTextBoxValueChange: E
|
|
742
734
|
};
|
|
743
735
|
}
|
|
744
|
-
function
|
|
745
|
-
const n =
|
|
746
|
-
function
|
|
747
|
-
const
|
|
748
|
-
|
|
736
|
+
function W(e, t, u, o) {
|
|
737
|
+
const n = y(), l = y(!1), { judgeCanOpen: c } = G(e, o);
|
|
738
|
+
function r() {
|
|
739
|
+
const i = n.value;
|
|
740
|
+
i && i.show(u.value);
|
|
749
741
|
}
|
|
750
|
-
async function
|
|
742
|
+
async function b(i = !1) {
|
|
751
743
|
if (!!t.slots.default) {
|
|
752
|
-
if (!
|
|
744
|
+
if (!i && !l.value && !await c())
|
|
753
745
|
return;
|
|
754
|
-
l.value = !l.value, await
|
|
746
|
+
l.value = !l.value, await L(), r();
|
|
755
747
|
}
|
|
756
748
|
}
|
|
757
|
-
async function a(
|
|
749
|
+
async function a(i = !1) {
|
|
758
750
|
if (!!t.slots.default) {
|
|
759
|
-
if (!
|
|
751
|
+
if (!i && !await c())
|
|
760
752
|
return;
|
|
761
|
-
l.value = !0, await
|
|
753
|
+
l.value = !0, await L(), r();
|
|
762
754
|
}
|
|
763
755
|
}
|
|
764
|
-
function
|
|
756
|
+
function s() {
|
|
765
757
|
l.value = !1;
|
|
766
758
|
}
|
|
767
|
-
return { hidePopup:
|
|
759
|
+
return { hidePopup: s, popup: a, shouldPopupContent: l, togglePopup: b, popoverRef: n };
|
|
768
760
|
}
|
|
769
|
-
function
|
|
770
|
-
const
|
|
761
|
+
function Ve(e, t, u) {
|
|
762
|
+
const o = y(), {
|
|
771
763
|
isTextBoxReadonly: n,
|
|
772
764
|
textBoxClass: l,
|
|
773
765
|
textBoxPlaceholder: c,
|
|
774
|
-
textBoxTitle:
|
|
775
|
-
onBlurTextBox:
|
|
766
|
+
textBoxTitle: r,
|
|
767
|
+
onBlurTextBox: b,
|
|
776
768
|
onClickTextBox: a,
|
|
777
|
-
onFocusTextBox:
|
|
778
|
-
onInput:
|
|
779
|
-
onKeyDownTextBox:
|
|
780
|
-
onKeyUpTextBox:
|
|
769
|
+
onFocusTextBox: s,
|
|
770
|
+
onInput: i,
|
|
771
|
+
onKeyDownTextBox: p,
|
|
772
|
+
onKeyUpTextBox: f,
|
|
781
773
|
onMouseDownTextBox: g,
|
|
782
|
-
onTextBoxValueChange:
|
|
783
|
-
} =
|
|
784
|
-
return
|
|
785
|
-
var
|
|
786
|
-
e.selectOnCreated && ((
|
|
787
|
-
}), () =>
|
|
788
|
-
ref:
|
|
774
|
+
onTextBoxValueChange: m
|
|
775
|
+
} = u;
|
|
776
|
+
return F(() => {
|
|
777
|
+
var x, C;
|
|
778
|
+
e.selectOnCreated && ((x = o.value) == null || x.select()), e.focusOnCreated && ((C = o.value) == null || C.focus());
|
|
779
|
+
}), () => v("input", {
|
|
780
|
+
ref: o,
|
|
789
781
|
name: "input-group-value",
|
|
790
782
|
autocomplete: e.autoComplete ? "on" : "off",
|
|
791
783
|
class: l.value,
|
|
@@ -795,30 +787,30 @@ function Q(e, t, o) {
|
|
|
795
787
|
placeholder: c.value,
|
|
796
788
|
readonly: n.value,
|
|
797
789
|
tabindex: e.tabIndex,
|
|
798
|
-
title:
|
|
790
|
+
title: r.value,
|
|
799
791
|
type: e.inputType,
|
|
800
792
|
value: t.value,
|
|
801
|
-
onBlur:
|
|
802
|
-
onChange:
|
|
793
|
+
onBlur: b,
|
|
794
|
+
onChange: m,
|
|
803
795
|
onClick: a,
|
|
804
|
-
onFocus:
|
|
805
|
-
onInput:
|
|
806
|
-
onKeydown:
|
|
807
|
-
onKeyup:
|
|
796
|
+
onFocus: s,
|
|
797
|
+
onInput: i,
|
|
798
|
+
onKeydown: p,
|
|
799
|
+
onKeyup: f,
|
|
808
800
|
onMousedown: g
|
|
809
801
|
}, null);
|
|
810
802
|
}
|
|
811
|
-
function
|
|
812
|
-
const
|
|
803
|
+
function Le(e, t, u) {
|
|
804
|
+
const o = y(e.separator), {
|
|
813
805
|
changeTextBoxValue: n
|
|
814
|
-
} =
|
|
815
|
-
name:
|
|
806
|
+
} = u, l = h(() => t.value ? t.value.split(o.value).map((r) => ({
|
|
807
|
+
name: r,
|
|
816
808
|
selectable: !0
|
|
817
809
|
})) : []);
|
|
818
|
-
function c(
|
|
819
|
-
n(
|
|
810
|
+
function c(r) {
|
|
811
|
+
n(r.map((b) => b.name).join(o.value), !0);
|
|
820
812
|
}
|
|
821
|
-
return () =>
|
|
813
|
+
return () => v(Z, {
|
|
822
814
|
id: `${e.id}-tag-editor`,
|
|
823
815
|
class: "form-control",
|
|
824
816
|
data: l.value,
|
|
@@ -827,48 +819,48 @@ function Y(e, t, o) {
|
|
|
827
819
|
onChange: c
|
|
828
820
|
}, null);
|
|
829
821
|
}
|
|
830
|
-
function
|
|
822
|
+
function De(e, t, u, o) {
|
|
831
823
|
const {
|
|
832
824
|
buttonGroupClass: n,
|
|
833
825
|
onClickButton: l,
|
|
834
826
|
onMouseEnterButton: c,
|
|
835
|
-
onMouseLeaveButton:
|
|
836
|
-
} =
|
|
837
|
-
enableClearButton:
|
|
827
|
+
onMouseLeaveButton: r
|
|
828
|
+
} = u, {
|
|
829
|
+
enableClearButton: b,
|
|
838
830
|
showClearButton: a,
|
|
839
|
-
onClearValue:
|
|
840
|
-
} =
|
|
831
|
+
onClearValue: s
|
|
832
|
+
} = o, i = y();
|
|
841
833
|
return {
|
|
842
|
-
renderButtonGroup: () =>
|
|
834
|
+
renderButtonGroup: () => v("div", {
|
|
843
835
|
id: `${e.id}-button-group`,
|
|
844
836
|
class: n.value
|
|
845
|
-
}, [
|
|
837
|
+
}, [b.value && X(v("span", {
|
|
846
838
|
class: "input-group-text input-group-clear",
|
|
847
|
-
onClick:
|
|
848
|
-
}, [
|
|
839
|
+
onClick: s
|
|
840
|
+
}, [v("i", {
|
|
849
841
|
class: "f-icon modal_close"
|
|
850
|
-
}, null)]), [[
|
|
842
|
+
}, null)]), [[z, a.value]]), t.slots.buttonContent ? v("span", {
|
|
851
843
|
class: "input-group-text input-group-append-button",
|
|
852
844
|
onClick: l,
|
|
853
845
|
onMouseenter: c,
|
|
854
|
-
onMouseleave:
|
|
855
|
-
}, [t.slots.buttonContent()]) : e.buttonContent ?
|
|
846
|
+
onMouseleave: r
|
|
847
|
+
}, [t.slots.buttonContent()]) : e.buttonContent ? v("span", {
|
|
856
848
|
class: "input-group-text input-group-append-button",
|
|
857
849
|
innerHTML: e.buttonContent,
|
|
858
|
-
ref:
|
|
850
|
+
ref: i,
|
|
859
851
|
onClick: l,
|
|
860
852
|
onMouseenter: c,
|
|
861
|
-
onMouseleave:
|
|
853
|
+
onMouseleave: r
|
|
862
854
|
}, null) : null]),
|
|
863
|
-
buttonHandleElement:
|
|
855
|
+
buttonHandleElement: i
|
|
864
856
|
};
|
|
865
857
|
}
|
|
866
|
-
function
|
|
867
|
-
const
|
|
858
|
+
function Se(e, t, u) {
|
|
859
|
+
const o = y(e.popupMinWidth), {
|
|
868
860
|
hidePopup: n,
|
|
869
861
|
popoverRef: l
|
|
870
|
-
} =
|
|
871
|
-
return () =>
|
|
862
|
+
} = u;
|
|
863
|
+
return () => v(K, {
|
|
872
864
|
id: `${e.id}-popover`,
|
|
873
865
|
ref: l,
|
|
874
866
|
visible: !0,
|
|
@@ -877,212 +869,147 @@ function Ae(e, t, o) {
|
|
|
877
869
|
"keep-width-with-reference": !0,
|
|
878
870
|
fitContent: !0,
|
|
879
871
|
"right-boundary": e.popupRightBoundary,
|
|
880
|
-
minWidth:
|
|
872
|
+
minWidth: o.value,
|
|
881
873
|
offsetX: e.popupOffsetX,
|
|
882
874
|
onHidden: n
|
|
883
875
|
}, {
|
|
884
876
|
default: () => {
|
|
885
|
-
var c,
|
|
886
|
-
return [(
|
|
877
|
+
var c, r;
|
|
878
|
+
return [(r = (c = t.slots).default) == null ? void 0 : r.call(c)];
|
|
887
879
|
}
|
|
888
880
|
});
|
|
889
881
|
}
|
|
890
|
-
const
|
|
882
|
+
const P = /* @__PURE__ */ j({
|
|
891
883
|
name: "FButtonEdit",
|
|
892
|
-
props:
|
|
884
|
+
props: V,
|
|
893
885
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
894
886
|
setup(e, t) {
|
|
895
|
-
const
|
|
887
|
+
const u = y(), o = y(e.customClass), n = y(e.modelValue), l = W(e, t, u, n), {
|
|
896
888
|
shouldPopupContent: c,
|
|
897
|
-
hidePopup:
|
|
898
|
-
togglePopup:
|
|
899
|
-
} = l, a =
|
|
900
|
-
hasFocusedTextBox:
|
|
901
|
-
commitValue:
|
|
889
|
+
hidePopup: r,
|
|
890
|
+
togglePopup: b
|
|
891
|
+
} = l, a = $(e, t, u, l, n), s = y(""), i = Fe(e, t, n, s, l), {
|
|
892
|
+
hasFocusedTextBox: p,
|
|
893
|
+
commitValue: f,
|
|
902
894
|
inputGroupClass: g
|
|
903
|
-
} =
|
|
904
|
-
onMouseEnterTextBox:
|
|
905
|
-
onMouseLeaveTextBox:
|
|
906
|
-
} =
|
|
907
|
-
const
|
|
895
|
+
} = i, m = Re(e, t, n, p, s, i), {
|
|
896
|
+
onMouseEnterTextBox: x,
|
|
897
|
+
onMouseLeaveTextBox: C
|
|
898
|
+
} = m, O = h(() => {
|
|
899
|
+
const d = {
|
|
908
900
|
"f-button-edit": !0,
|
|
909
901
|
"f-cmp-inputgroup": !0,
|
|
910
902
|
"f-button-edit-nowrap": !e.wrapText
|
|
911
903
|
};
|
|
912
|
-
return
|
|
904
|
+
return o.value && o.value.split(" ").reduce((B, H) => (B[H] = !0, B), d), d;
|
|
913
905
|
});
|
|
914
|
-
function
|
|
915
|
-
return e.multiSelect && e.inputType === "tag" ?
|
|
906
|
+
function T() {
|
|
907
|
+
return e.multiSelect && e.inputType === "tag" ? Le(e, n, i) : Ve(e, n, i);
|
|
916
908
|
}
|
|
917
|
-
let
|
|
918
|
-
|
|
919
|
-
|
|
909
|
+
let k = T();
|
|
910
|
+
R([() => e.multiSelect, () => e.inputType], () => {
|
|
911
|
+
k = T();
|
|
920
912
|
});
|
|
921
913
|
const {
|
|
922
|
-
renderButtonGroup:
|
|
923
|
-
buttonHandleElement:
|
|
924
|
-
} =
|
|
925
|
-
commitValue:
|
|
926
|
-
elementRef:
|
|
927
|
-
hidePopup:
|
|
914
|
+
renderButtonGroup: M,
|
|
915
|
+
buttonHandleElement: w
|
|
916
|
+
} = De(e, t, a, m), I = Se(e, t, l), E = {
|
|
917
|
+
commitValue: f,
|
|
918
|
+
elementRef: u,
|
|
919
|
+
hidePopup: r,
|
|
928
920
|
shouldPopupContent: c,
|
|
929
|
-
togglePopup:
|
|
921
|
+
togglePopup: b,
|
|
930
922
|
openDialog: () => {
|
|
931
|
-
|
|
923
|
+
w.value && e.buttonBehavior === "Modal" && w.value.click();
|
|
932
924
|
},
|
|
933
925
|
getModal: () => {
|
|
934
|
-
var
|
|
935
|
-
return e.buttonBehavior === "Modal" ? (
|
|
926
|
+
var d;
|
|
927
|
+
return e.buttonBehavior === "Modal" ? (d = a.modalRef.value) == null ? void 0 : d.value : null;
|
|
936
928
|
}
|
|
937
929
|
};
|
|
938
|
-
return
|
|
939
|
-
|
|
930
|
+
return F(() => {
|
|
931
|
+
u.value.componentInstance = E, window.onresize = () => {
|
|
940
932
|
document.body.click();
|
|
941
933
|
};
|
|
942
|
-
}), t.expose(
|
|
943
|
-
ref:
|
|
944
|
-
class:
|
|
934
|
+
}), t.expose(E), () => v(J, null, [v("div", S(t.attrs, {
|
|
935
|
+
ref: u,
|
|
936
|
+
class: O.value,
|
|
945
937
|
id: e.id
|
|
946
|
-
}), [
|
|
938
|
+
}), [v("div", {
|
|
947
939
|
id: `${e.id}-input-group`,
|
|
948
940
|
class: g.value,
|
|
949
|
-
onMouseenter:
|
|
950
|
-
onMouseleave:
|
|
951
|
-
}, [
|
|
941
|
+
onMouseenter: x,
|
|
942
|
+
onMouseleave: C
|
|
943
|
+
}, [k(), M()])]), c.value && I()]);
|
|
952
944
|
}
|
|
953
945
|
});
|
|
954
|
-
function
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
}
|
|
971
|
-
function r(b) {
|
|
972
|
-
if (!b || !b.value)
|
|
973
|
-
return null;
|
|
974
|
-
if (b.value.schema && b.value.schema.type === "component")
|
|
975
|
-
return b.value;
|
|
976
|
-
const T = m(b == null ? void 0 : b.value.parent), v = r(T);
|
|
977
|
-
return v || null;
|
|
978
|
-
}
|
|
979
|
-
function f(b = t) {
|
|
980
|
-
const { componentInstance: T, designerItemElementRef: v } = b;
|
|
981
|
-
return !T || !T.value ? null : T.value.canMove ? v : f(b.parent);
|
|
982
|
-
}
|
|
983
|
-
function d(b) {
|
|
984
|
-
return !!o;
|
|
985
|
-
}
|
|
986
|
-
function g() {
|
|
987
|
-
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
988
|
-
}
|
|
989
|
-
function h() {
|
|
990
|
-
}
|
|
991
|
-
function O(b, T) {
|
|
992
|
-
}
|
|
993
|
-
function k(b) {
|
|
994
|
-
const { componentType: T } = b;
|
|
995
|
-
let v = D(T, b);
|
|
996
|
-
const p = T.toLowerCase().replace("-", "_");
|
|
997
|
-
return v && !v.id && v.type === T && (v.id = `${p}_${Math.random().toString().slice(2, 6)}`), v;
|
|
998
|
-
}
|
|
999
|
-
function E(b, T) {
|
|
1000
|
-
const v = String(b.getAttribute("data-controltype")), p = b.getAttribute("data-feature"), w = p ? JSON.parse(p) : {};
|
|
1001
|
-
w.parentComponentInstance = c.value;
|
|
1002
|
-
let S = D(v, w);
|
|
1003
|
-
const K = v.toLowerCase().replace("-", "_");
|
|
1004
|
-
return S && !S.id && S.type === v && (S.id = `${K}_${Math.random().toString().slice(2, 6)}`), S;
|
|
1005
|
-
}
|
|
1006
|
-
function M(b) {
|
|
1007
|
-
}
|
|
1008
|
-
function P(...b) {
|
|
1009
|
-
}
|
|
1010
|
-
return c.value = {
|
|
1011
|
-
canMove: s(),
|
|
1012
|
-
canSelectParent: y(),
|
|
1013
|
-
canDelete: a(),
|
|
1014
|
-
canNested: !i(),
|
|
1015
|
-
contents: t == null ? void 0 : t.schema.contents,
|
|
1016
|
-
elementRef: e,
|
|
1017
|
-
parent: (x = t == null ? void 0 : t.parent) == null ? void 0 : x.componentInstance,
|
|
1018
|
-
schema: t == null ? void 0 : t.schema,
|
|
1019
|
-
styles: n,
|
|
1020
|
-
designerClass: l,
|
|
1021
|
-
canAccepts: d,
|
|
1022
|
-
getBelongedComponentInstance: r,
|
|
1023
|
-
getDraggableDesignItemElement: f,
|
|
1024
|
-
getDraggingDisplayText: g,
|
|
1025
|
-
getPropConfig: P,
|
|
1026
|
-
getDragScopeElement: h,
|
|
1027
|
-
onAcceptMovedChildElement: O,
|
|
1028
|
-
onAcceptNewChildElement: E,
|
|
1029
|
-
onChildElementMovedOut: M,
|
|
1030
|
-
addNewChildComponentSchema: k,
|
|
1031
|
-
updateDragAndDropRules: u,
|
|
1032
|
-
triggerBelongedComponentToMoveWhenMoved: m(!1),
|
|
1033
|
-
triggerBelongedComponentToDeleteWhenDeleted: m(!1)
|
|
1034
|
-
}, c;
|
|
946
|
+
function Ae(e, t, u) {
|
|
947
|
+
const {
|
|
948
|
+
buttonGroupClass: o
|
|
949
|
+
} = u, n = y();
|
|
950
|
+
return {
|
|
951
|
+
renderButtonGroup: () => v("div", {
|
|
952
|
+
id: `${e.id}-button-group`,
|
|
953
|
+
class: o.value
|
|
954
|
+
}, [t.slots.buttonContent ? v("span", {
|
|
955
|
+
class: "input-group-text input-group-append-button"
|
|
956
|
+
}, [t.slots.buttonContent()]) : e.buttonContent ? v("span", {
|
|
957
|
+
class: "input-group-text input-group-append-button",
|
|
958
|
+
innerHTML: e.buttonContent,
|
|
959
|
+
ref: n
|
|
960
|
+
}, null) : null]),
|
|
961
|
+
buttonHandleElement: n
|
|
962
|
+
};
|
|
1035
963
|
}
|
|
1036
|
-
const
|
|
964
|
+
const Ne = /* @__PURE__ */ j({
|
|
1037
965
|
name: "FButtonEdit",
|
|
1038
|
-
props:
|
|
966
|
+
props: V,
|
|
1039
967
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
1040
968
|
setup(e, t) {
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
969
|
+
const u = y(), o = D("design-item-context"), n = ee(u, o), l = y(e.customClass), c = y(e.modelValue), r = W(e, t, u, c), b = $(e, t, u, r, c), a = y(), s = h(() => ({
|
|
970
|
+
"f-cmp-inputgroup": !0,
|
|
971
|
+
"input-group": !0,
|
|
972
|
+
"f-state-disable": !0,
|
|
973
|
+
"f-state-editable": !1,
|
|
974
|
+
"f-state-readonly": !0
|
|
975
|
+
}));
|
|
976
|
+
F(() => {
|
|
977
|
+
u.value.componentInstance = n;
|
|
1047
978
|
}), t.expose(n.value);
|
|
1048
|
-
const
|
|
1049
|
-
const
|
|
979
|
+
const i = h(() => {
|
|
980
|
+
const f = {
|
|
1050
981
|
"f-button-edit": !0,
|
|
1051
982
|
"f-cmp-inputgroup": !0,
|
|
1052
983
|
"f-button-edit-nowrap": !e.wrapText
|
|
1053
984
|
};
|
|
1054
|
-
return l.value && l.value.split(" ").reduce((
|
|
1055
|
-
})
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
O = h();
|
|
1062
|
-
});
|
|
1063
|
-
const {
|
|
1064
|
-
renderButtonGroup: k,
|
|
1065
|
-
buttonHandleElement: E
|
|
1066
|
-
} = Z(e, t, y, d);
|
|
1067
|
-
return () => C("div", G(t.attrs, {
|
|
1068
|
-
ref: o,
|
|
1069
|
-
class: g.value,
|
|
985
|
+
return l.value && l.value.split(" ").reduce((g, m) => (g[m] = !0, g), f), f;
|
|
986
|
+
}), {
|
|
987
|
+
renderButtonGroup: p
|
|
988
|
+
} = Ae(e, t, b);
|
|
989
|
+
return () => v("div", S(t.attrs, {
|
|
990
|
+
ref: u,
|
|
991
|
+
class: i.value,
|
|
1070
992
|
id: e.id
|
|
1071
|
-
}), [
|
|
1072
|
-
class:
|
|
1073
|
-
}, [
|
|
993
|
+
}), [v("div", {
|
|
994
|
+
class: s.value
|
|
995
|
+
}, [v("input", {
|
|
996
|
+
ref: a,
|
|
997
|
+
class: "form-control",
|
|
998
|
+
readonly: !0,
|
|
999
|
+
placeholder: e.placeholder
|
|
1000
|
+
}, null), p()])]);
|
|
1074
1001
|
}
|
|
1075
1002
|
});
|
|
1076
|
-
|
|
1077
|
-
e["button-edit"] =
|
|
1003
|
+
P.register = (e, t, u, o) => {
|
|
1004
|
+
e["button-edit"] = P, t["button-edit"] = N;
|
|
1078
1005
|
};
|
|
1079
|
-
|
|
1080
|
-
e["button-edit"] =
|
|
1006
|
+
P.registerDesigner = (e, t, u) => {
|
|
1007
|
+
e["button-edit"] = Ne, t["button-edit"] = N;
|
|
1081
1008
|
};
|
|
1082
|
-
const
|
|
1009
|
+
const Xe = te(P);
|
|
1083
1010
|
export {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1011
|
+
P as FButtonEdit,
|
|
1012
|
+
V as buttonEditProps,
|
|
1013
|
+
Xe as default,
|
|
1014
|
+
N as propsResolver
|
|
1088
1015
|
};
|