@farris/ui-vue 1.2.7 → 1.2.8
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 +79 -79
- package/components/avatar/index.esm.js +393 -440
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +496 -542
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +437 -483
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +839 -726
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4702 -4972
- package/components/data-view/index.esm.js +2999 -2875
- package/components/date-picker/index.esm.js +2626 -2672
- 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.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +934 -976
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1892 -1775
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5245 -5514
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1483 -1556
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +668 -714
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1679 -1563
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6596 -6865
- package/components/mapping-editor/index.esm.js +5592 -5862
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +988 -1034
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1296
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1416 -1462
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +757 -830
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +452 -498
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +117 -117
- package/components/response-toolbar/index.esm.js +1021 -1238
- package/components/schema-selector/index.esm.js +3215 -3308
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +442 -488
- package/components/tabs/index.esm.js +1835 -2004
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +451 -482
- package/components/time-picker/index.esm.js +1345 -1392
- package/components/transfer/index.esm.js +135 -135
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5761 -6020
- package/components/tree-view/index.esm.js +2380 -2253
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +31630 -31224
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- 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-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.d.ts +1 -0
- 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-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/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- 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
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -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 R, ref as m, computed as v, createVNode as h, Teleport as J, createApp as Q, onUnmounted as Y, inject as D, watch as I, nextTick as V, onMounted as F, withDirectives as Z, vShow as K, Fragment as ee, mergeProps as L } from "vue";
|
|
2
|
+
import { cloneDeep as te } from "lodash-es";
|
|
3
|
+
import { resolveAppearance as ne } from "../dynamic-resolver/index.esm.js";
|
|
4
|
+
import oe from "../tags/index.esm.js";
|
|
5
|
+
import ue from "../popover/index.esm.js";
|
|
6
|
+
import { useDesignerComponent as ae } from "../designer-canvas/index.esm.js";
|
|
7
|
+
import { withInstall as le } from "../common/index.esm.js";
|
|
8
|
+
const ie = {}, re = {};
|
|
9
|
+
function N(e) {
|
|
10
|
+
const { properties: t, title: a } = e, l = Object.keys(t).reduce((n, u) => (n[u] = t[u].type === "object" && t[u].properties ? N(t[u]) : te(t[u].default), n), {});
|
|
11
|
+
return l.id = `${a}-${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;
|
|
13
|
+
function se(e, t) {
|
|
14
|
+
const a = N(t);
|
|
15
|
+
return Object.keys(e).reduce((l, n) => (l[n] && typeof l[n] == "object" ? Object.assign(l[n], e[n]) : l[n] = e[n], l), a), a;
|
|
20
16
|
}
|
|
21
17
|
function ce(e, t) {
|
|
22
|
-
|
|
23
|
-
return Object.keys(e).reduce((u, n) => (u[n] = e[n], u), o), o;
|
|
24
|
-
}
|
|
25
|
-
function pe(e, t) {
|
|
26
|
-
return Object.keys(e).filter((u) => e[u] != null).reduce((u, n) => {
|
|
18
|
+
return Object.keys(e).filter((l) => e[l] != null).reduce((l, n) => {
|
|
27
19
|
if (t.has(n)) {
|
|
28
|
-
const
|
|
29
|
-
if (typeof
|
|
30
|
-
u
|
|
20
|
+
const u = t.get(n);
|
|
21
|
+
if (typeof u == "string")
|
|
22
|
+
l[u] = e[n];
|
|
31
23
|
else {
|
|
32
|
-
const c =
|
|
33
|
-
Object.assign(
|
|
24
|
+
const c = u(n, e[n], e);
|
|
25
|
+
Object.assign(l, c);
|
|
34
26
|
}
|
|
35
27
|
} else
|
|
36
|
-
|
|
37
|
-
return
|
|
28
|
+
l[n] = e[n];
|
|
29
|
+
return l;
|
|
38
30
|
}, {});
|
|
39
31
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
return
|
|
32
|
+
function de(e, t, a = /* @__PURE__ */ new Map()) {
|
|
33
|
+
const l = se(e, t);
|
|
34
|
+
return ce(l, a);
|
|
43
35
|
}
|
|
44
|
-
function
|
|
45
|
-
function t(
|
|
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 pe(e = {}) {
|
|
37
|
+
function t(o, r, i, p) {
|
|
38
|
+
if (typeof i == "number")
|
|
39
|
+
return p[o].length === i;
|
|
40
|
+
if (typeof i == "object") {
|
|
41
|
+
const f = Object.keys(i)[0], y = i[f];
|
|
42
|
+
if (f === "not")
|
|
43
|
+
return Number(p[o].length) !== Number(y);
|
|
44
|
+
if (f === "moreThan")
|
|
45
|
+
return Number(p[o].length) >= Number(y);
|
|
46
|
+
if (f === "lessThan")
|
|
47
|
+
return Number(p[o].length) <= Number(y);
|
|
56
48
|
}
|
|
57
49
|
return !1;
|
|
58
50
|
}
|
|
59
|
-
function o
|
|
60
|
-
return
|
|
51
|
+
function a(o, r, i, p) {
|
|
52
|
+
return p[o] && p[o].propertyValue && String(p[o].propertyValue.value) === String(i);
|
|
61
53
|
}
|
|
62
|
-
const
|
|
54
|
+
const l = /* @__PURE__ */ new Map([
|
|
63
55
|
["length", t],
|
|
64
|
-
["getProperty",
|
|
56
|
+
["getProperty", a]
|
|
65
57
|
]);
|
|
66
|
-
Object.keys(e).reduce((
|
|
67
|
-
function n(
|
|
68
|
-
const
|
|
69
|
-
return typeof
|
|
70
|
-
if (
|
|
71
|
-
return { target:
|
|
72
|
-
const
|
|
73
|
-
return { target:
|
|
58
|
+
Object.keys(e).reduce((o, r) => (o.set(r, e[r]), o), l);
|
|
59
|
+
function n(o, r) {
|
|
60
|
+
const i = o;
|
|
61
|
+
return typeof r == "number" ? [{ target: i, operator: "length", param: null, value: Number(r) }] : typeof r == "boolean" ? [{ target: i, operator: "getProperty", param: o, value: !!r }] : typeof r == "object" ? Object.keys(r).map((p) => {
|
|
62
|
+
if (p === "length")
|
|
63
|
+
return { target: i, operator: "length", param: null, value: r[p] };
|
|
64
|
+
const f = p, y = r[p];
|
|
65
|
+
return { target: i, operator: "getProperty", param: f, value: y };
|
|
74
66
|
}) : [];
|
|
75
67
|
}
|
|
76
|
-
function
|
|
77
|
-
return Object.keys(
|
|
78
|
-
const
|
|
79
|
-
return
|
|
68
|
+
function u(o) {
|
|
69
|
+
return Object.keys(o).reduce((i, p) => {
|
|
70
|
+
const f = n(p, o[p]);
|
|
71
|
+
return i.push(...f), i;
|
|
80
72
|
}, []);
|
|
81
73
|
}
|
|
82
|
-
function c(
|
|
83
|
-
if (
|
|
84
|
-
const
|
|
85
|
-
return
|
|
74
|
+
function c(o, r) {
|
|
75
|
+
if (l.has(o.operator)) {
|
|
76
|
+
const i = l.get(o.operator);
|
|
77
|
+
return i && i(o.target, o.param, o.value, r) || !1;
|
|
86
78
|
}
|
|
87
79
|
return !1;
|
|
88
80
|
}
|
|
89
|
-
function s(
|
|
90
|
-
return
|
|
81
|
+
function s(o, r) {
|
|
82
|
+
return u(o).reduce((f, y) => f && c(y, r), !0);
|
|
91
83
|
}
|
|
92
|
-
function
|
|
93
|
-
const
|
|
94
|
-
return
|
|
84
|
+
function b(o, r) {
|
|
85
|
+
const i = Object.keys(o), p = i.includes("allOf"), f = i.includes("anyOf"), y = p || f, B = (y ? o[y ? p ? "allOf" : "anyOf" : "allOf"] : [o]).map((O) => s(O, r));
|
|
86
|
+
return p ? !B.includes(!1) : B.includes(!0);
|
|
95
87
|
}
|
|
96
|
-
return { parseValueSchema:
|
|
88
|
+
return { parseValueSchema: b };
|
|
97
89
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
function
|
|
101
|
-
return
|
|
102
|
-
const s =
|
|
103
|
-
return Object.assign(
|
|
90
|
+
const fe = {}, be = {};
|
|
91
|
+
pe();
|
|
92
|
+
function ye(e, t, a = /* @__PURE__ */ new Map(), l = (c, s, b) => s, n = {}, u = (c) => c) {
|
|
93
|
+
return ie[t.title] = t, re[t.title] = l, fe[t.title] = n, be[t.title] = u, (c = {}) => {
|
|
94
|
+
const s = de(c, t, a), b = Object.keys(e).reduce((o, r) => (o[r] = e[r].default, o), {});
|
|
95
|
+
return Object.assign(b, s);
|
|
104
96
|
};
|
|
105
97
|
}
|
|
106
98
|
const ge = /* @__PURE__ */ new Map([
|
|
107
|
-
["appearance",
|
|
99
|
+
["appearance", ne]
|
|
108
100
|
]);
|
|
109
|
-
function
|
|
101
|
+
function me(e, t, a) {
|
|
110
102
|
return t;
|
|
111
103
|
}
|
|
112
|
-
const ve = "https://json-schema.org/draft/2020-12/schema",
|
|
104
|
+
const ve = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/button-edit.schema.json", Ce = "button-edit", Be = "A Farris Input Component", xe = "object", Te = {
|
|
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
|
+
}, Oe = [
|
|
297
289
|
"id",
|
|
298
290
|
"type"
|
|
299
|
-
],
|
|
291
|
+
], ke = {
|
|
300
292
|
$schema: ve,
|
|
301
|
-
$id:
|
|
293
|
+
$id: he,
|
|
302
294
|
title: Ce,
|
|
303
|
-
description:
|
|
304
|
-
type:
|
|
305
|
-
properties:
|
|
306
|
-
required:
|
|
307
|
-
},
|
|
295
|
+
description: Be,
|
|
296
|
+
type: xe,
|
|
297
|
+
properties: Te,
|
|
298
|
+
required: Oe
|
|
299
|
+
}, we = "buttonEdit", Ee = "A Farris Component", Pe = "object", Me = {
|
|
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
|
+
}, Ie = {
|
|
382
|
+
title: we,
|
|
383
|
+
description: Ee,
|
|
384
|
+
type: Pe,
|
|
385
|
+
categories: Me
|
|
386
|
+
}, S = {
|
|
395
387
|
/**
|
|
396
388
|
* 组件标识
|
|
397
389
|
*/
|
|
@@ -497,54 +489,54 @@ 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
|
+
}, A = ye(S, ke, ge, me, Ie), je = {
|
|
501
493
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
502
494
|
host: { type: Object },
|
|
503
495
|
backgroundColor: { type: String, default: "" }
|
|
504
|
-
},
|
|
496
|
+
}, Re = /* @__PURE__ */ R({
|
|
505
497
|
name: "FOverlay",
|
|
506
498
|
props: je,
|
|
507
499
|
emits: ["click"],
|
|
508
500
|
setup(e, t) {
|
|
509
|
-
const
|
|
501
|
+
const a = m(e.popupContentPosition), l = m(e.host), n = v(() => ({
|
|
510
502
|
backgroundColor: e.backgroundColor || "",
|
|
511
503
|
pointerEvents: "auto"
|
|
512
504
|
}));
|
|
513
|
-
function
|
|
505
|
+
function u(s) {
|
|
514
506
|
t.emit("click"), s.preventDefault(), s.stopPropagation();
|
|
515
507
|
}
|
|
516
|
-
|
|
517
|
-
const s =
|
|
508
|
+
v(() => {
|
|
509
|
+
const s = l.value;
|
|
518
510
|
if (s) {
|
|
519
|
-
const
|
|
520
|
-
left:
|
|
521
|
-
top:
|
|
522
|
-
height:
|
|
523
|
-
} =
|
|
511
|
+
const b = s.getBoundingClientRect(), {
|
|
512
|
+
left: o,
|
|
513
|
+
top: r,
|
|
514
|
+
height: i
|
|
515
|
+
} = b;
|
|
524
516
|
return {
|
|
525
|
-
left:
|
|
526
|
-
top:
|
|
517
|
+
left: o,
|
|
518
|
+
top: r + i
|
|
527
519
|
};
|
|
528
520
|
}
|
|
529
|
-
return
|
|
521
|
+
return a.value;
|
|
530
522
|
});
|
|
531
|
-
const c =
|
|
523
|
+
const c = v(() => ({
|
|
532
524
|
// position: 'relative',
|
|
533
525
|
// left: `${position.value.left}px`,
|
|
534
526
|
// top: `${position.value.top}px`
|
|
535
527
|
}));
|
|
536
|
-
return () =>
|
|
528
|
+
return () => h(J, {
|
|
537
529
|
to: "body"
|
|
538
530
|
}, {
|
|
539
531
|
default: () => {
|
|
540
|
-
var s,
|
|
541
|
-
return [
|
|
532
|
+
var s, b;
|
|
533
|
+
return [h("div", {
|
|
542
534
|
class: "overlay-container",
|
|
543
|
-
onClick: (
|
|
535
|
+
onClick: (o) => u(o),
|
|
544
536
|
style: n.value
|
|
545
|
-
}, [
|
|
537
|
+
}, [h("div", {
|
|
546
538
|
style: c.value
|
|
547
|
-
}, [(
|
|
539
|
+
}, [(b = (s = t.slots).default) == null ? void 0 : b.call(s)])])];
|
|
548
540
|
}
|
|
549
541
|
});
|
|
550
542
|
}
|
|
@@ -555,240 +547,240 @@ function Fe(e) {
|
|
|
555
547
|
if (e.render && typeof e.render == "function")
|
|
556
548
|
return e.render;
|
|
557
549
|
}
|
|
558
|
-
function
|
|
550
|
+
function Se(e) {
|
|
559
551
|
const t = document.createElement("div");
|
|
560
552
|
t.style.display = "contents";
|
|
561
|
-
let
|
|
562
|
-
const
|
|
553
|
+
let a;
|
|
554
|
+
const l = e.onClickCallback || (() => {
|
|
563
555
|
}), n = () => {
|
|
564
|
-
|
|
556
|
+
l(), a && a.unmount();
|
|
565
557
|
};
|
|
566
|
-
return
|
|
558
|
+
return a = Q({
|
|
567
559
|
setup() {
|
|
568
|
-
|
|
560
|
+
Y(() => {
|
|
569
561
|
document.body.removeChild(t);
|
|
570
562
|
});
|
|
571
|
-
const
|
|
572
|
-
return () =>
|
|
563
|
+
const u = Fe(e);
|
|
564
|
+
return () => h(Re, {
|
|
573
565
|
"popup-content-position": e.popupPosition,
|
|
574
566
|
host: e.host,
|
|
575
567
|
onClick: n,
|
|
576
568
|
backgroundColor: e.backgroundColor
|
|
577
569
|
}, {
|
|
578
|
-
default: () => [
|
|
570
|
+
default: () => [u && u()]
|
|
579
571
|
});
|
|
580
572
|
}
|
|
581
|
-
}), document.body.appendChild(t),
|
|
573
|
+
}), document.body.appendChild(t), a.mount(t), a;
|
|
582
574
|
}
|
|
583
|
-
class
|
|
575
|
+
class Ve {
|
|
584
576
|
static show(t) {
|
|
585
|
-
return
|
|
577
|
+
return Se(t);
|
|
586
578
|
}
|
|
587
579
|
}
|
|
588
|
-
const
|
|
589
|
-
function
|
|
590
|
-
function
|
|
591
|
-
const
|
|
580
|
+
const De = Symbol("FModalService");
|
|
581
|
+
function G(e, t) {
|
|
582
|
+
function a() {
|
|
583
|
+
const l = e.beforeOpen || e.beforeClickButton || null;
|
|
592
584
|
let n = Promise.resolve(!0);
|
|
593
|
-
if (
|
|
594
|
-
const
|
|
595
|
-
if (typeof
|
|
585
|
+
if (l) {
|
|
586
|
+
const u = l(t.value);
|
|
587
|
+
if (typeof u > "u")
|
|
596
588
|
return n;
|
|
597
|
-
typeof
|
|
589
|
+
typeof u == "boolean" ? n = Promise.resolve(u) : n = u;
|
|
598
590
|
}
|
|
599
591
|
return n;
|
|
600
592
|
}
|
|
601
|
-
return { judgeCanOpen:
|
|
593
|
+
return { judgeCanOpen: a };
|
|
602
594
|
}
|
|
603
|
-
function
|
|
604
|
-
const
|
|
595
|
+
function W(e, t, a, l, n) {
|
|
596
|
+
const u = m(e.buttonBehavior), c = m(e.popupOnInput), s = v(() => ({
|
|
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
|
|
611
|
-
if (
|
|
612
|
-
const
|
|
613
|
-
...
|
|
599
|
+
})), { judgeCanOpen: b } = G(e, n), o = v(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), r = D(De, null), i = m();
|
|
600
|
+
async function p(g) {
|
|
601
|
+
if (await b() && o.value) {
|
|
602
|
+
const C = !!t.slots.default;
|
|
603
|
+
if (u.value === "Modal") {
|
|
604
|
+
const B = e.modalOptions, T = r == null ? void 0 : r.open({
|
|
605
|
+
...B,
|
|
614
606
|
render: () => t.slots.default && t.slots.default()
|
|
615
607
|
});
|
|
616
|
-
|
|
608
|
+
i.value = T == null ? void 0 : T.modalRef;
|
|
617
609
|
}
|
|
618
|
-
|
|
610
|
+
u.value === "Overlay" && Ve.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
|
+
}), C && u.value === "Popup" && l.togglePopup(!0), C && c.value && l.hidePopup(), t.emit("clickButton", { origin: g, value: e.modelValue });
|
|
624
616
|
}
|
|
625
617
|
}
|
|
626
|
-
function
|
|
627
|
-
t.emit("mouseEnterIcon",
|
|
618
|
+
function f(g) {
|
|
619
|
+
t.emit("mouseEnterIcon", g);
|
|
628
620
|
}
|
|
629
|
-
function g
|
|
630
|
-
t.emit("mouseLeaveIcon",
|
|
621
|
+
function y(g) {
|
|
622
|
+
t.emit("mouseLeaveIcon", g);
|
|
631
623
|
}
|
|
632
624
|
return {
|
|
633
625
|
buttonGroupClass: s,
|
|
634
|
-
onClickButton:
|
|
635
|
-
onMouseEnterButton:
|
|
636
|
-
onMouseLeaveButton:
|
|
637
|
-
modalRef:
|
|
626
|
+
onClickButton: p,
|
|
627
|
+
onMouseEnterButton: f,
|
|
628
|
+
onMouseLeaveButton: y,
|
|
629
|
+
modalRef: i
|
|
638
630
|
};
|
|
639
631
|
}
|
|
640
|
-
function
|
|
641
|
-
const c = m(!1), s =
|
|
642
|
-
function
|
|
643
|
-
c.value =
|
|
632
|
+
function $(e, t, a, l, n, u) {
|
|
633
|
+
const c = m(!1), s = v(() => e.enableClear && !e.readonly && !e.disable), { changeTextBoxValue: b } = u;
|
|
634
|
+
function o(f) {
|
|
635
|
+
c.value = f;
|
|
644
636
|
}
|
|
645
|
-
|
|
646
|
-
|
|
637
|
+
I(n, () => {
|
|
638
|
+
o(!!n.value);
|
|
647
639
|
});
|
|
648
|
-
function
|
|
649
|
-
const
|
|
650
|
-
|
|
640
|
+
function r(f) {
|
|
641
|
+
const y = !e.readonly && !e.disable && e.editable, g = !e.editable;
|
|
642
|
+
f.stopPropagation(), (y || g) && (b("", !1), o(!c.value), t.emit("clear"));
|
|
651
643
|
}
|
|
652
|
-
function
|
|
644
|
+
function i(f) {
|
|
653
645
|
if (s.value) {
|
|
654
|
-
if (!
|
|
655
|
-
|
|
646
|
+
if (!a.value) {
|
|
647
|
+
o(!1);
|
|
656
648
|
return;
|
|
657
649
|
}
|
|
658
|
-
!e.disable && !e.readonly &&
|
|
650
|
+
!e.disable && !e.readonly && o(!0);
|
|
659
651
|
}
|
|
660
652
|
}
|
|
661
|
-
function f
|
|
662
|
-
s.value &&
|
|
653
|
+
function p(f) {
|
|
654
|
+
s.value && o(!1);
|
|
663
655
|
}
|
|
664
656
|
return {
|
|
665
657
|
enableClearButton: s,
|
|
666
658
|
showClearButton: c,
|
|
667
|
-
onClearValue:
|
|
668
|
-
onMouseEnterTextBox:
|
|
669
|
-
onMouseLeaveTextBox:
|
|
659
|
+
onClearValue: r,
|
|
660
|
+
onMouseEnterTextBox: i,
|
|
661
|
+
onMouseLeaveTextBox: p
|
|
670
662
|
};
|
|
671
663
|
}
|
|
672
|
-
function
|
|
673
|
-
const
|
|
664
|
+
function H(e, t, a, l, n) {
|
|
665
|
+
const u = v(() => e.popupOnInput), c = v(() => e.popupOnFocus), { shouldPopupContent: s } = n, b = v(() => e.enableTitle ? a.value : ""), o = v(() => (e.disable || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), r = v(() => e.readonly || !e.editable), i = m(!1), p = v(() => !e.disable && i.value), f = v(() => ({
|
|
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
|
-
})),
|
|
671
|
+
})), y = v(() => ({
|
|
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 g(d, x = !0) {
|
|
679
|
+
a.value !== d && (a.value = d, x && t.emit("change", d), t.emit("update:modelValue", d));
|
|
688
680
|
}
|
|
689
|
-
function
|
|
690
|
-
s.value = !1,
|
|
681
|
+
function C(d) {
|
|
682
|
+
s.value = !1, g(d, !0);
|
|
691
683
|
}
|
|
692
|
-
|
|
684
|
+
I(
|
|
693
685
|
() => e.modelValue,
|
|
694
|
-
(
|
|
695
|
-
|
|
686
|
+
(d) => {
|
|
687
|
+
a.value = d;
|
|
696
688
|
}
|
|
697
689
|
);
|
|
698
|
-
function
|
|
699
|
-
|
|
690
|
+
function B(d) {
|
|
691
|
+
i.value = !1, t.emit("blur", d), d.stopPropagation();
|
|
700
692
|
}
|
|
701
|
-
function
|
|
702
|
-
t.emit("click",
|
|
693
|
+
function T(d) {
|
|
694
|
+
t.emit("click", d);
|
|
703
695
|
}
|
|
704
|
-
function
|
|
705
|
-
e.disable || (
|
|
696
|
+
function O(d) {
|
|
697
|
+
e.disable || (i.value = !0, r.value || (t.emit("focus", d), c.value && !s.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 x = d.target.value;
|
|
702
|
+
l.value = x, a.value !== x && g(x, !0), u.value && !s.value && n.popup();
|
|
711
703
|
}
|
|
712
|
-
function
|
|
713
|
-
|
|
704
|
+
function w(d) {
|
|
705
|
+
d.target.tagName !== "INPUT" && d.preventDefault(), d.stopPropagation();
|
|
714
706
|
}
|
|
715
|
-
function
|
|
716
|
-
t.emit("keydown",
|
|
707
|
+
function E(d) {
|
|
708
|
+
t.emit("keydown", d);
|
|
717
709
|
}
|
|
718
|
-
function
|
|
719
|
-
|
|
710
|
+
function j(d) {
|
|
711
|
+
d.key === "Enter" && (u.value || c.value) && n.hidePopup(), t.emit("keyup", d);
|
|
720
712
|
}
|
|
721
|
-
function
|
|
722
|
-
const
|
|
723
|
-
|
|
713
|
+
function P(d) {
|
|
714
|
+
const x = d.target.value;
|
|
715
|
+
d.stopPropagation(), g(x);
|
|
724
716
|
}
|
|
725
717
|
return {
|
|
726
|
-
hasFocusedTextBox:
|
|
727
|
-
isTextBoxReadonly:
|
|
728
|
-
textBoxClass:
|
|
729
|
-
textBoxPlaceholder:
|
|
730
|
-
textBoxTitle:
|
|
731
|
-
inputGroupClass:
|
|
732
|
-
changeTextBoxValue:
|
|
733
|
-
commitValue:
|
|
734
|
-
onBlurTextBox:
|
|
735
|
-
onClickTextBox:
|
|
736
|
-
onFocusTextBox:
|
|
737
|
-
onInput:
|
|
738
|
-
onKeyDownTextBox:
|
|
739
|
-
onKeyUpTextBox:
|
|
740
|
-
onMouseDownTextBox:
|
|
741
|
-
onTextBoxValueChange:
|
|
718
|
+
hasFocusedTextBox: p,
|
|
719
|
+
isTextBoxReadonly: r,
|
|
720
|
+
textBoxClass: f,
|
|
721
|
+
textBoxPlaceholder: o,
|
|
722
|
+
textBoxTitle: b,
|
|
723
|
+
inputGroupClass: y,
|
|
724
|
+
changeTextBoxValue: g,
|
|
725
|
+
commitValue: C,
|
|
726
|
+
onBlurTextBox: B,
|
|
727
|
+
onClickTextBox: T,
|
|
728
|
+
onFocusTextBox: O,
|
|
729
|
+
onInput: k,
|
|
730
|
+
onKeyDownTextBox: E,
|
|
731
|
+
onKeyUpTextBox: j,
|
|
732
|
+
onMouseDownTextBox: w,
|
|
733
|
+
onTextBoxValueChange: P
|
|
742
734
|
};
|
|
743
735
|
}
|
|
744
|
-
function
|
|
745
|
-
const n = m(),
|
|
736
|
+
function q(e, t, a, l) {
|
|
737
|
+
const n = m(), u = m(!1), { judgeCanOpen: c } = G(e, l);
|
|
746
738
|
function s() {
|
|
747
|
-
const
|
|
748
|
-
|
|
739
|
+
const i = n.value;
|
|
740
|
+
i && i.show(a.value);
|
|
749
741
|
}
|
|
750
|
-
async function
|
|
742
|
+
async function b(i = !1) {
|
|
751
743
|
if (!!t.slots.default) {
|
|
752
|
-
if (!
|
|
744
|
+
if (!i && !u.value && !await c())
|
|
753
745
|
return;
|
|
754
|
-
|
|
746
|
+
u.value = !u.value, await V(), s();
|
|
755
747
|
}
|
|
756
748
|
}
|
|
757
|
-
async function
|
|
749
|
+
async function o(i = !1) {
|
|
758
750
|
if (!!t.slots.default) {
|
|
759
|
-
if (!
|
|
751
|
+
if (!i && !await c())
|
|
760
752
|
return;
|
|
761
|
-
|
|
753
|
+
u.value = !0, await V(), s();
|
|
762
754
|
}
|
|
763
755
|
}
|
|
764
|
-
function
|
|
765
|
-
|
|
756
|
+
function r() {
|
|
757
|
+
u.value = !1;
|
|
766
758
|
}
|
|
767
|
-
return { hidePopup:
|
|
759
|
+
return { hidePopup: r, popup: o, shouldPopupContent: u, togglePopup: b, popoverRef: n };
|
|
768
760
|
}
|
|
769
|
-
function
|
|
770
|
-
const
|
|
761
|
+
function U(e, t, a) {
|
|
762
|
+
const l = m(), {
|
|
771
763
|
isTextBoxReadonly: n,
|
|
772
|
-
textBoxClass:
|
|
764
|
+
textBoxClass: u,
|
|
773
765
|
textBoxPlaceholder: c,
|
|
774
766
|
textBoxTitle: s,
|
|
775
|
-
onBlurTextBox:
|
|
776
|
-
onClickTextBox:
|
|
777
|
-
onFocusTextBox:
|
|
778
|
-
onInput:
|
|
779
|
-
onKeyDownTextBox:
|
|
780
|
-
onKeyUpTextBox:
|
|
781
|
-
onMouseDownTextBox:
|
|
782
|
-
onTextBoxValueChange:
|
|
783
|
-
} =
|
|
784
|
-
return
|
|
785
|
-
var
|
|
786
|
-
e.selectOnCreated && ((
|
|
787
|
-
}), () =>
|
|
788
|
-
ref:
|
|
767
|
+
onBlurTextBox: b,
|
|
768
|
+
onClickTextBox: o,
|
|
769
|
+
onFocusTextBox: r,
|
|
770
|
+
onInput: i,
|
|
771
|
+
onKeyDownTextBox: p,
|
|
772
|
+
onKeyUpTextBox: f,
|
|
773
|
+
onMouseDownTextBox: y,
|
|
774
|
+
onTextBoxValueChange: g
|
|
775
|
+
} = a;
|
|
776
|
+
return F(() => {
|
|
777
|
+
var C, B;
|
|
778
|
+
e.selectOnCreated && ((C = l.value) == null || C.select()), e.focusOnCreated && ((B = l.value) == null || B.focus());
|
|
779
|
+
}), () => h("input", {
|
|
780
|
+
ref: l,
|
|
789
781
|
name: "input-group-value",
|
|
790
782
|
autocomplete: e.autoComplete ? "on" : "off",
|
|
791
|
-
class:
|
|
783
|
+
class: u.value,
|
|
792
784
|
disabled: e.disable,
|
|
793
785
|
maxlength: e.maxLength,
|
|
794
786
|
minlength: e.minLength,
|
|
@@ -798,86 +790,86 @@ function Q(e, t, o) {
|
|
|
798
790
|
title: s.value,
|
|
799
791
|
type: e.inputType,
|
|
800
792
|
value: t.value,
|
|
801
|
-
onBlur:
|
|
802
|
-
onChange:
|
|
803
|
-
onClick:
|
|
804
|
-
onFocus:
|
|
805
|
-
onInput:
|
|
806
|
-
onKeydown:
|
|
807
|
-
onKeyup:
|
|
808
|
-
onMousedown:
|
|
793
|
+
onBlur: b,
|
|
794
|
+
onChange: g,
|
|
795
|
+
onClick: o,
|
|
796
|
+
onFocus: r,
|
|
797
|
+
onInput: i,
|
|
798
|
+
onKeydown: p,
|
|
799
|
+
onKeyup: f,
|
|
800
|
+
onMousedown: y
|
|
809
801
|
}, null);
|
|
810
802
|
}
|
|
811
|
-
function
|
|
812
|
-
const
|
|
803
|
+
function _(e, t, a) {
|
|
804
|
+
const l = m(e.separator), {
|
|
813
805
|
changeTextBoxValue: n
|
|
814
|
-
} =
|
|
806
|
+
} = a, u = v(() => t.value ? t.value.split(l.value).map((s) => ({
|
|
815
807
|
name: s,
|
|
816
808
|
selectable: !0
|
|
817
809
|
})) : []);
|
|
818
810
|
function c(s) {
|
|
819
|
-
n(s.map((
|
|
811
|
+
n(s.map((b) => b.name).join(l.value), !0);
|
|
820
812
|
}
|
|
821
|
-
return () =>
|
|
813
|
+
return () => h(oe, {
|
|
822
814
|
id: `${e.id}-tag-editor`,
|
|
823
815
|
class: "form-control",
|
|
824
|
-
data:
|
|
816
|
+
data: u.value,
|
|
825
817
|
showClose: !0,
|
|
826
818
|
showInput: !0,
|
|
827
819
|
onChange: c
|
|
828
820
|
}, null);
|
|
829
821
|
}
|
|
830
|
-
function
|
|
822
|
+
function X(e, t, a, l) {
|
|
831
823
|
const {
|
|
832
824
|
buttonGroupClass: n,
|
|
833
|
-
onClickButton:
|
|
825
|
+
onClickButton: u,
|
|
834
826
|
onMouseEnterButton: c,
|
|
835
827
|
onMouseLeaveButton: s
|
|
836
|
-
} =
|
|
837
|
-
enableClearButton:
|
|
838
|
-
showClearButton:
|
|
839
|
-
onClearValue:
|
|
840
|
-
} =
|
|
828
|
+
} = a, {
|
|
829
|
+
enableClearButton: b,
|
|
830
|
+
showClearButton: o,
|
|
831
|
+
onClearValue: r
|
|
832
|
+
} = l, i = m();
|
|
841
833
|
return {
|
|
842
|
-
renderButtonGroup: () =>
|
|
834
|
+
renderButtonGroup: () => h("div", {
|
|
843
835
|
id: `${e.id}-button-group`,
|
|
844
836
|
class: n.value
|
|
845
|
-
}, [
|
|
837
|
+
}, [b.value && Z(h("span", {
|
|
846
838
|
class: "input-group-text input-group-clear",
|
|
847
|
-
onClick:
|
|
848
|
-
}, [
|
|
839
|
+
onClick: r
|
|
840
|
+
}, [h("i", {
|
|
849
841
|
class: "f-icon modal_close"
|
|
850
|
-
}, null)]), [[
|
|
842
|
+
}, null)]), [[K, o.value]]), t.slots.buttonContent ? h("span", {
|
|
851
843
|
class: "input-group-text input-group-append-button",
|
|
852
|
-
onClick:
|
|
844
|
+
onClick: u,
|
|
853
845
|
onMouseenter: c,
|
|
854
846
|
onMouseleave: s
|
|
855
|
-
}, [t.slots.buttonContent()]) : e.buttonContent ?
|
|
847
|
+
}, [t.slots.buttonContent()]) : e.buttonContent ? h("span", {
|
|
856
848
|
class: "input-group-text input-group-append-button",
|
|
857
849
|
innerHTML: e.buttonContent,
|
|
858
|
-
ref:
|
|
859
|
-
onClick:
|
|
850
|
+
ref: i,
|
|
851
|
+
onClick: u,
|
|
860
852
|
onMouseenter: c,
|
|
861
853
|
onMouseleave: s
|
|
862
854
|
}, null) : null]),
|
|
863
|
-
buttonHandleElement:
|
|
855
|
+
buttonHandleElement: i
|
|
864
856
|
};
|
|
865
857
|
}
|
|
866
|
-
function
|
|
867
|
-
const
|
|
858
|
+
function Le(e, t, a) {
|
|
859
|
+
const l = m(e.popupMinWidth), {
|
|
868
860
|
hidePopup: n,
|
|
869
|
-
popoverRef:
|
|
870
|
-
} =
|
|
871
|
-
return () =>
|
|
861
|
+
popoverRef: u
|
|
862
|
+
} = a;
|
|
863
|
+
return () => h(ue, {
|
|
872
864
|
id: `${e.id}-popover`,
|
|
873
|
-
ref:
|
|
865
|
+
ref: u,
|
|
874
866
|
visible: !0,
|
|
875
867
|
placement: "bottom-left",
|
|
876
868
|
host: e.popupHost,
|
|
877
869
|
"keep-width-with-reference": !0,
|
|
878
870
|
fitContent: !0,
|
|
879
871
|
"right-boundary": e.popupRightBoundary,
|
|
880
|
-
minWidth:
|
|
872
|
+
minWidth: l.value,
|
|
881
873
|
offsetX: e.popupOffsetX,
|
|
882
874
|
onHidden: n
|
|
883
875
|
}, {
|
|
@@ -887,202 +879,119 @@ function Ae(e, t, o) {
|
|
|
887
879
|
}
|
|
888
880
|
});
|
|
889
881
|
}
|
|
890
|
-
const
|
|
882
|
+
const M = /* @__PURE__ */ R({
|
|
891
883
|
name: "FButtonEdit",
|
|
892
|
-
props:
|
|
884
|
+
props: S,
|
|
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 a = m(), l = m(e.customClass), n = m(e.modelValue), u = q(e, t, a, n), {
|
|
896
888
|
shouldPopupContent: c,
|
|
897
889
|
hidePopup: s,
|
|
898
|
-
togglePopup:
|
|
899
|
-
} =
|
|
900
|
-
hasFocusedTextBox:
|
|
901
|
-
commitValue:
|
|
902
|
-
inputGroupClass:
|
|
903
|
-
} =
|
|
904
|
-
onMouseEnterTextBox:
|
|
905
|
-
onMouseLeaveTextBox:
|
|
906
|
-
} =
|
|
907
|
-
const
|
|
890
|
+
togglePopup: b
|
|
891
|
+
} = u, o = W(e, t, a, u, n), r = m(""), i = H(e, t, n, r, u), {
|
|
892
|
+
hasFocusedTextBox: p,
|
|
893
|
+
commitValue: f,
|
|
894
|
+
inputGroupClass: y
|
|
895
|
+
} = i, g = $(e, t, n, p, r, i), {
|
|
896
|
+
onMouseEnterTextBox: C,
|
|
897
|
+
onMouseLeaveTextBox: B
|
|
898
|
+
} = g, T = v(() => {
|
|
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 l.value && l.value.split(" ").reduce((x, z) => (x[z] = !0, x), d), d;
|
|
913
905
|
});
|
|
914
|
-
function
|
|
915
|
-
return e.multiSelect && e.inputType === "tag" ?
|
|
906
|
+
function O() {
|
|
907
|
+
return e.multiSelect && e.inputType === "tag" ? _(e, n, i) : U(e, n, i);
|
|
916
908
|
}
|
|
917
|
-
let
|
|
918
|
-
|
|
919
|
-
|
|
909
|
+
let k = O();
|
|
910
|
+
I([() => e.multiSelect, () => e.inputType], () => {
|
|
911
|
+
k = O();
|
|
920
912
|
});
|
|
921
913
|
const {
|
|
922
|
-
renderButtonGroup:
|
|
923
|
-
buttonHandleElement:
|
|
924
|
-
} =
|
|
925
|
-
commitValue:
|
|
926
|
-
elementRef:
|
|
914
|
+
renderButtonGroup: w,
|
|
915
|
+
buttonHandleElement: E
|
|
916
|
+
} = X(e, t, o, g), j = Le(e, t, u), P = {
|
|
917
|
+
commitValue: f,
|
|
918
|
+
elementRef: a,
|
|
927
919
|
hidePopup: s,
|
|
928
920
|
shouldPopupContent: c,
|
|
929
|
-
togglePopup:
|
|
921
|
+
togglePopup: b,
|
|
930
922
|
openDialog: () => {
|
|
931
|
-
|
|
923
|
+
E.value && e.buttonBehavior === "Modal" && E.value.click();
|
|
932
924
|
},
|
|
933
925
|
getModal: () => {
|
|
934
|
-
var
|
|
935
|
-
return e.buttonBehavior === "Modal" ? (
|
|
926
|
+
var d;
|
|
927
|
+
return e.buttonBehavior === "Modal" ? (d = o.modalRef.value) == null ? void 0 : d.value : null;
|
|
936
928
|
}
|
|
937
929
|
};
|
|
938
|
-
return
|
|
939
|
-
|
|
930
|
+
return F(() => {
|
|
931
|
+
a.value.componentInstance = P, window.onresize = () => {
|
|
940
932
|
document.body.click();
|
|
941
933
|
};
|
|
942
|
-
}), t.expose(
|
|
943
|
-
ref:
|
|
944
|
-
class:
|
|
934
|
+
}), t.expose(P), () => h(ee, null, [h("div", L(t.attrs, {
|
|
935
|
+
ref: a,
|
|
936
|
+
class: T.value,
|
|
945
937
|
id: e.id
|
|
946
|
-
}), [
|
|
938
|
+
}), [h("div", {
|
|
947
939
|
id: `${e.id}-input-group`,
|
|
948
|
-
class:
|
|
949
|
-
onMouseenter:
|
|
950
|
-
onMouseleave:
|
|
951
|
-
}, [
|
|
952
|
-
}
|
|
953
|
-
});
|
|
954
|
-
function $e(e, t, o) {
|
|
955
|
-
var x;
|
|
956
|
-
function u() {
|
|
957
|
-
}
|
|
958
|
-
const n = "", l = "", c = m();
|
|
959
|
-
function s() {
|
|
960
|
-
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
961
|
-
}
|
|
962
|
-
function y() {
|
|
963
|
-
return !1;
|
|
940
|
+
class: y.value,
|
|
941
|
+
onMouseenter: C,
|
|
942
|
+
onMouseleave: B
|
|
943
|
+
}, [k(), w()])]), c.value && j()]);
|
|
964
944
|
}
|
|
965
|
-
|
|
966
|
-
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
967
|
-
}
|
|
968
|
-
function i() {
|
|
969
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame";
|
|
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;
|
|
1035
|
-
}
|
|
1036
|
-
const Ge = /* @__PURE__ */ F({
|
|
945
|
+
}), Ne = /* @__PURE__ */ R({
|
|
1037
946
|
name: "FButtonEdit",
|
|
1038
|
-
props:
|
|
947
|
+
props: S,
|
|
1039
948
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
1040
949
|
setup(e, t) {
|
|
1041
|
-
const
|
|
1042
|
-
hasFocusedTextBox:
|
|
1043
|
-
inputGroupClass:
|
|
1044
|
-
} =
|
|
1045
|
-
|
|
1046
|
-
|
|
950
|
+
const a = m(), l = D("design-item-context"), n = ae(a, l), u = m(e.customClass), c = m(e.modelValue), s = q(e, t, a, c), b = W(e, t, a, s, c), o = m(""), r = H(e, t, c, o, s), {
|
|
951
|
+
hasFocusedTextBox: i,
|
|
952
|
+
inputGroupClass: p
|
|
953
|
+
} = r, f = $(e, t, c, i, o, r);
|
|
954
|
+
F(() => {
|
|
955
|
+
a.value.componentInstance = n;
|
|
1047
956
|
}), t.expose(n.value);
|
|
1048
|
-
const
|
|
1049
|
-
const
|
|
957
|
+
const y = v(() => {
|
|
958
|
+
const O = {
|
|
1050
959
|
"f-button-edit": !0,
|
|
1051
960
|
"f-cmp-inputgroup": !0,
|
|
1052
961
|
"f-button-edit-nowrap": !e.wrapText
|
|
1053
962
|
};
|
|
1054
|
-
return
|
|
963
|
+
return u.value && u.value.split(" ").reduce((k, w) => (k[w] = !0, k), O), O;
|
|
1055
964
|
});
|
|
1056
|
-
function
|
|
1057
|
-
return e.multiSelect && e.inputType === "tag" ?
|
|
965
|
+
function g() {
|
|
966
|
+
return e.multiSelect && e.inputType === "tag" ? _(e, c, r) : U(e, c, r);
|
|
1058
967
|
}
|
|
1059
|
-
let
|
|
1060
|
-
|
|
1061
|
-
|
|
968
|
+
let C = g();
|
|
969
|
+
I([() => e.multiSelect, () => e.inputType], () => {
|
|
970
|
+
C = g();
|
|
1062
971
|
});
|
|
1063
972
|
const {
|
|
1064
|
-
renderButtonGroup:
|
|
1065
|
-
buttonHandleElement:
|
|
1066
|
-
} =
|
|
1067
|
-
return () =>
|
|
1068
|
-
ref:
|
|
1069
|
-
class:
|
|
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,
|
|
1070
979
|
id: e.id
|
|
1071
|
-
}), [
|
|
1072
|
-
class:
|
|
1073
|
-
}, [
|
|
980
|
+
}), [h("div", {
|
|
981
|
+
class: p.value
|
|
982
|
+
}, [C(), B()])]);
|
|
1074
983
|
}
|
|
1075
984
|
});
|
|
1076
|
-
|
|
1077
|
-
e["button-edit"] =
|
|
985
|
+
M.register = (e, t, a, l) => {
|
|
986
|
+
e["button-edit"] = M, t["button-edit"] = A;
|
|
1078
987
|
};
|
|
1079
|
-
|
|
1080
|
-
e["button-edit"] =
|
|
988
|
+
M.registerDesigner = (e, t, a) => {
|
|
989
|
+
e["button-edit"] = Ne, t["button-edit"] = A;
|
|
1081
990
|
};
|
|
1082
|
-
const
|
|
991
|
+
const _e = le(M);
|
|
1083
992
|
export {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
993
|
+
M as FButtonEdit,
|
|
994
|
+
S as buttonEditProps,
|
|
995
|
+
_e as default,
|
|
996
|
+
A as propsResolver
|
|
1088
997
|
};
|