@farris/ui-vue 1.8.5-beta.3 → 1.8.5-beta.4
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/batch-editor/index.esm.js +6850 -6840
- package/components/batch-editor/index.umd.cjs +20 -20
- package/components/button/index.esm.js +6852 -6842
- package/components/button/index.umd.cjs +20 -20
- package/components/button-edit/index.esm.js +140 -140
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +46 -45
- package/components/button-group/index.umd.cjs +1 -1
- package/components/common/index.esm.js +16 -12
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +411 -411
- package/components/component/index.umd.cjs +2 -2
- package/components/data-view/index.esm.js +6500 -6487
- package/components/data-view/index.umd.cjs +21 -21
- package/components/designer-canvas/index.esm.js +269 -269
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +458 -458
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +386 -386
- package/components/filter-condition-editor/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +1100 -1100
- package/components/flow-canvas/index.umd.cjs +7 -7
- package/components/mapping-editor/index.esm.js +243 -243
- package/components/mapping-editor/index.umd.cjs +2 -2
- package/components/message-box/index.esm.js +82 -82
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +76 -76
- package/components/modal/index.umd.cjs +1 -1
- package/components/order/index.esm.js +139 -138
- package/components/order/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +891 -891
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +151 -149
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +947 -941
- package/components/schema-selector/index.umd.cjs +6 -6
- package/components/section/index.esm.js +121 -121
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +539 -539
- package/components/sort-condition-editor/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +448 -442
- package/components/tabs/index.umd.cjs +1 -1
- package/designer/button-edit/index.esm.js +97 -97
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +6483 -6470
- package/designer/data-grid/index.umd.cjs +21 -21
- package/designer/farris-designer.all.esm.js +1891 -1885
- package/designer/farris-designer.all.umd.cjs +14 -14
- package/designer/radio-group/index.esm.js +183 -183
- package/designer/radio-group/index.umd.cjs +2 -2
- package/designer/response-toolbar/index.esm.js +558 -556
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +416 -416
- package/designer/tabs/index.umd.cjs +2 -2
- package/farris.all.esm.js +9133 -9119
- package/farris.all.umd.cjs +35 -35
- package/package.json +1 -1
- package/types/common/index.d.ts +1 -0
- package/types/common/utils/attrs.d.ts +26 -0
- package/types/modal/src/composition/type.d.ts +2 -0
- package/types/tabs/src/composition/types.d.ts +2 -0
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as c, computed as B, watch as A, nextTick as te, reactive as
|
|
5
|
-
import { FNotifyService as
|
|
6
|
-
import { getCustomClass as
|
|
7
|
-
import
|
|
1
|
+
var Kt = Object.defineProperty;
|
|
2
|
+
var Jt = (e, t, a) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
|
+
var ue = (e, t, a) => Jt(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
|
+
import { ref as c, computed as B, watch as A, nextTick as te, reactive as ft, createVNode as n, mergeProps as ae, withDirectives as Ne, resolveDirective as Zt, onMounted as ne, vModelText as vt, Fragment as Q, defineComponent as Y, shallowRef as Re, provide as Ue, inject as le, onUnmounted as xe, isVNode as mt, resolveComponent as Qt, withModifiers as en, createTextVNode as K, watchEffect as pt, createApp as Ae, Transition as gt, Teleport as ht, onBeforeMount as tn, render as _e, h as nn, cloneVNode as an, vShow as ln, onUpdated as on, onBeforeUnmount as sn } from "vue";
|
|
5
|
+
import { FNotifyService as un } from "../notify/index.esm.js";
|
|
6
|
+
import { getCustomClass as Ee, extractDataAttrs as yt, isMobilePhone as Ce, getCustomStyle as lt, withInstall as cn, getMaxZIndex as ot, useGuid as rn } from "../common/index.esm.js";
|
|
7
|
+
import dn from "../capsule/index.esm.js";
|
|
8
8
|
import { LocaleService as Z } from "../locale/index.esm.js";
|
|
9
|
-
import
|
|
9
|
+
import fn from "../response-toolbar/index.esm.js";
|
|
10
10
|
import "bignumber.js";
|
|
11
|
-
import { cloneDeep as
|
|
11
|
+
import { cloneDeep as vn, debounce as bt } from "lodash-es";
|
|
12
12
|
import st from "../section/index.esm.js";
|
|
13
13
|
import "../property-panel/index.esm.js";
|
|
14
|
-
import
|
|
15
|
-
import { resolveAppearance as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { useDesignerComponent as
|
|
19
|
-
import { useFilter as
|
|
20
|
-
import
|
|
21
|
-
import
|
|
14
|
+
import mn from "../button-edit/index.esm.js";
|
|
15
|
+
import { resolveAppearance as wt, createPropsResolver as Xe } from "../dynamic-resolver/index.esm.js";
|
|
16
|
+
import pn from "../list-view/index.esm.js";
|
|
17
|
+
import gn from "../loading/index.esm.js";
|
|
18
|
+
import { useDesignerComponent as Ct } from "../designer-canvas/index.esm.js";
|
|
19
|
+
import { useFilter as hn, useIdentify as yn, useHierarchy as bn, useGroupData as wn, useDataView as Cn, useSelection as Sn, usePagination as xn, useRow as In, useEdit as Tn, useVisualDataBound as Bn, useVisualDataCell as kn, useVisualDataRow as Fn, useVisualGroupRow as Mn, useVisualSummaryRow as On, useVisualData as Pn, useSidebar as Vn, useColumn as Rn, useVirtualScroll as Ln, useScreen as Hn } from "../data-view/index.esm.js";
|
|
20
|
+
import St, { FCheckbox as Ke } from "../checkbox/index.esm.js";
|
|
21
|
+
import xt from "../popover/index.esm.js";
|
|
22
22
|
import Je from "../drawer/index.esm.js";
|
|
23
23
|
import "../button/index.esm.js";
|
|
24
24
|
import "../field-selector/index.esm.js";
|
|
25
25
|
import "../collection-property-editor/index.esm.js/src/use-button-items.designer";
|
|
26
|
-
import
|
|
27
|
-
import { useInputExpand as
|
|
28
|
-
const
|
|
26
|
+
import Dn from "../tags/index.esm.js";
|
|
27
|
+
import { useInputExpand as En } from "../common/index.esm.js/text-box/use-input-expand";
|
|
28
|
+
const jn = {
|
|
29
29
|
injectSymbolToken: { type: Symbol },
|
|
30
30
|
/** 待选数据视图集合 */
|
|
31
31
|
viewOptions: { type: Array, default: [] },
|
|
@@ -34,7 +34,7 @@ const En = {
|
|
|
34
34
|
editorParams: { type: Object, default: null },
|
|
35
35
|
showFooter: { type: Boolean, default: !1 },
|
|
36
36
|
validateFunction: { type: Function, default: null }
|
|
37
|
-
},
|
|
37
|
+
}, Nn = {
|
|
38
38
|
/**
|
|
39
39
|
* 标签页显示样式
|
|
40
40
|
* @default 'default'
|
|
@@ -112,151 +112,151 @@ const En = {
|
|
|
112
112
|
*/
|
|
113
113
|
beforeTabSelect: { type: Function, default: null }
|
|
114
114
|
};
|
|
115
|
-
function
|
|
116
|
-
const u = new
|
|
115
|
+
function An(e, t, a) {
|
|
116
|
+
const u = new un(), l = c([]), o = c(e.activeId || "");
|
|
117
117
|
let i = "";
|
|
118
118
|
const s = c(!0), f = c([]), d = c(!0), r = c(0), m = B(() => {
|
|
119
|
-
const
|
|
120
|
-
return (
|
|
119
|
+
const h = l.value.find((D) => D.props.id === o.value);
|
|
120
|
+
return (h == null ? void 0 : h.props.toolbarPosition) === "inHead";
|
|
121
121
|
});
|
|
122
122
|
let x;
|
|
123
|
-
function I(
|
|
124
|
-
x =
|
|
123
|
+
function I(h) {
|
|
124
|
+
x = h;
|
|
125
125
|
}
|
|
126
|
-
function w(
|
|
127
|
-
const
|
|
128
|
-
if (
|
|
129
|
-
if (o.value =
|
|
126
|
+
function w(h, b = !0) {
|
|
127
|
+
const D = h.findIndex((j) => j.props.show !== !1 && !j.props.disabled);
|
|
128
|
+
if (D !== -1) {
|
|
129
|
+
if (o.value = h[D].props.id, !b)
|
|
130
130
|
return;
|
|
131
131
|
f.value = [];
|
|
132
|
-
const j =
|
|
132
|
+
const j = h[D];
|
|
133
133
|
j && j.props.toolbar && j.props.toolbar.buttons && j.props.toolbar.buttons.length && (f.value = [...j.props.toolbar.buttons], d.value = j.props.toolbarVisible);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
function v(
|
|
137
|
-
o.value =
|
|
138
|
-
const b = l.value.find((
|
|
139
|
-
f.value = [], b && b.props.toolbar && b.props.toolbar.buttons && b.props.toolbar.buttons.length && (f.value = [...b.props.toolbar.buttons], d.value = b.props.toolbarVisible), t.emit("update:activeId",
|
|
136
|
+
function v(h) {
|
|
137
|
+
o.value = h;
|
|
138
|
+
const b = l.value.find((D) => D.props.id === h);
|
|
139
|
+
f.value = [], b && b.props.toolbar && b.props.toolbar.buttons && b.props.toolbar.buttons.length && (f.value = [...b.props.toolbar.buttons], d.value = b.props.toolbarVisible), t.emit("update:activeId", h), t.emit("tabChange", {
|
|
140
140
|
prevId: i,
|
|
141
141
|
nextId: o.value
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
-
async function C(
|
|
145
|
-
var
|
|
146
|
-
const $ = await ((
|
|
147
|
-
prevId:
|
|
144
|
+
async function C(h, b, D, j) {
|
|
145
|
+
var L;
|
|
146
|
+
const $ = await ((L = e.beforeTabSelect) == null ? void 0 : L.call(e, {
|
|
147
|
+
prevId: h,
|
|
148
148
|
nextId: b
|
|
149
149
|
}));
|
|
150
|
-
(typeof $ == "boolean" ? $ : ($ == null ? void 0 : $.canSelect) ?? !0) ?
|
|
150
|
+
(typeof $ == "boolean" ? $ : ($ == null ? void 0 : $.canSelect) ?? !0) ? D && D() : (j && j(), typeof $ != "boolean" && $.message && (u == null || u.warning({ message: $.message, position: "top-center" })));
|
|
151
151
|
}
|
|
152
|
-
function S(
|
|
152
|
+
function S(h) {
|
|
153
153
|
let b = -1;
|
|
154
154
|
if (!o.value) {
|
|
155
|
-
if (b =
|
|
155
|
+
if (b = h.findIndex((D) => o.value === D.props.id && D.props.show !== !1 && !D.props.disabled), b > -1)
|
|
156
156
|
return;
|
|
157
157
|
i = o.value;
|
|
158
158
|
}
|
|
159
|
-
w(
|
|
159
|
+
w(h, !1), C(i, o.value, () => {
|
|
160
160
|
v(o.value), x && x();
|
|
161
161
|
}, () => {
|
|
162
162
|
o.value = i;
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
|
-
function h
|
|
165
|
+
function y(h) {
|
|
166
166
|
let b = !1;
|
|
167
|
-
if (
|
|
168
|
-
const
|
|
169
|
-
b = !
|
|
167
|
+
if (h) {
|
|
168
|
+
const D = l.value.find((j) => j.props.id === h);
|
|
169
|
+
b = !D || D.props.show === !1 || D.props.disabled === !0;
|
|
170
170
|
}
|
|
171
171
|
if (b)
|
|
172
172
|
S(l.value);
|
|
173
|
-
else if (o.value !==
|
|
174
|
-
const
|
|
175
|
-
C(
|
|
176
|
-
i =
|
|
173
|
+
else if (o.value !== h) {
|
|
174
|
+
const D = o.value;
|
|
175
|
+
C(D, h, () => {
|
|
176
|
+
i = D, o.value = h, v(o.value), x && x();
|
|
177
177
|
}, () => {
|
|
178
|
-
o.value =
|
|
178
|
+
o.value = D, t.emit("update:activeId", D);
|
|
179
179
|
});
|
|
180
180
|
} else
|
|
181
181
|
v(o.value);
|
|
182
182
|
}
|
|
183
|
-
A(() => e.activeId, (
|
|
184
|
-
|
|
183
|
+
A(() => e.activeId, (h, b) => {
|
|
184
|
+
h !== b && e.activeId !== o.value && y(h);
|
|
185
185
|
});
|
|
186
|
-
function
|
|
187
|
-
var
|
|
186
|
+
function P(h) {
|
|
187
|
+
var D;
|
|
188
188
|
if (e.autoTitleWidth)
|
|
189
189
|
return;
|
|
190
|
-
const b = (
|
|
190
|
+
const b = (D = h.value) == null ? void 0 : D.querySelectorAll(".st-tab-text");
|
|
191
191
|
if (!(!b || e.tabType === "pill"))
|
|
192
192
|
for (let j = 0; j < b.length; j++) {
|
|
193
193
|
const $ = b[j].parentNode;
|
|
194
194
|
b[j].scrollWidth > $.offsetWidth ? b[j].classList.contains("farris-title-text-custom") || b[j].classList.add("farris-title-text-custom") : b[j].classList.remove("farris-title-text-custom");
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
const k = (
|
|
198
|
-
|
|
197
|
+
const k = (h) => {
|
|
198
|
+
h.preventDefault(), h.stopPropagation();
|
|
199
199
|
};
|
|
200
|
-
function
|
|
200
|
+
function V(h, b, D = !1) {
|
|
201
201
|
const j = l.value.findIndex(($) => $.props.id === b);
|
|
202
|
-
l.value = l.value.filter(($) => $.props.id !== b), o.value === b && (i = b, o.value = "", w(l.value)), k(
|
|
203
|
-
r.value++,
|
|
202
|
+
l.value = l.value.filter(($) => $.props.id !== b), o.value === b && (i = b, o.value = "", w(l.value)), k(h), te(() => {
|
|
203
|
+
r.value++, P(a), D && (s.value = !0), t.emit("tabRemove", {
|
|
204
204
|
removeIndex: j,
|
|
205
205
|
removeId: b,
|
|
206
206
|
activeId: o.value
|
|
207
207
|
});
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
const
|
|
212
|
-
|
|
210
|
+
function R(h, b = !0) {
|
|
211
|
+
const D = l.value.find((j) => j.props.id === h);
|
|
212
|
+
D && (D.props.show === !1 && o.value === h ? (o.value = "", i = h, y("")) : D.props.show === !0 && !o.value && S(l.value), te(() => {
|
|
213
213
|
r.value++, b && (s.value = !0);
|
|
214
214
|
}));
|
|
215
215
|
}
|
|
216
|
-
function F(
|
|
217
|
-
o.value !==
|
|
218
|
-
i = o.value, v(
|
|
216
|
+
function F(h) {
|
|
217
|
+
o.value !== h && C(i, h, () => {
|
|
218
|
+
i = o.value, v(h), x && x();
|
|
219
219
|
}, null);
|
|
220
220
|
}
|
|
221
|
-
function g(
|
|
222
|
-
l.value.findIndex((
|
|
221
|
+
function g(h) {
|
|
222
|
+
l.value.findIndex((D) => D.props.id === h.props.id) === -1 && l.value.push(h), r.value++;
|
|
223
223
|
}
|
|
224
|
-
function T(
|
|
225
|
-
l.value.findIndex((
|
|
226
|
-
|
|
227
|
-
}),
|
|
228
|
-
r.value++,
|
|
224
|
+
function T(h) {
|
|
225
|
+
l.value.findIndex((D) => D.props.id === h.props.id) !== -1 && (l.value.forEach((D) => {
|
|
226
|
+
D.props.id === h.props.id && (D = h);
|
|
227
|
+
}), h.props.id === o.value && m.value, te(() => {
|
|
228
|
+
r.value++, P(a);
|
|
229
229
|
}));
|
|
230
230
|
}
|
|
231
231
|
return {
|
|
232
232
|
activeId: o,
|
|
233
233
|
addTab: g,
|
|
234
|
-
changeTitleStyle:
|
|
235
|
-
removeTab:
|
|
234
|
+
changeTitleStyle: P,
|
|
235
|
+
removeTab: V,
|
|
236
236
|
selectTab: F,
|
|
237
237
|
tabPages: l,
|
|
238
238
|
updateTab: T,
|
|
239
239
|
toolbarItems: f,
|
|
240
240
|
needUpdateNavigationLayout: r,
|
|
241
|
-
checkActiveIdAndSelect:
|
|
242
|
-
toggleShowTab:
|
|
241
|
+
checkActiveIdAndSelect: y,
|
|
242
|
+
toggleShowTab: R,
|
|
243
243
|
hasInHeadClass: m,
|
|
244
244
|
setScrollToSelectedTabFunction: I,
|
|
245
245
|
toolbarVisible: d
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function zn(e, t, a, u, l) {
|
|
249
249
|
const {
|
|
250
250
|
activeId: o,
|
|
251
251
|
removeTab: i,
|
|
252
252
|
selectTab: s
|
|
253
253
|
} = l, f = B(() => {
|
|
254
|
-
const
|
|
254
|
+
const P = {
|
|
255
255
|
"st-tab-text": !0,
|
|
256
256
|
"text-truncate": e.tabType === "pill" && !e.autoTitleWidth,
|
|
257
257
|
"farris-title-auto": e.autoTitleWidth
|
|
258
258
|
};
|
|
259
|
-
return
|
|
259
|
+
return Ee(P, t.customTitleClass);
|
|
260
260
|
}), d = B(() => ({
|
|
261
261
|
"nav-item": !0,
|
|
262
262
|
"d-none": t.show !== void 0 ? !t.show : !1,
|
|
@@ -269,7 +269,7 @@ function Nn(e, t, a, u, l) {
|
|
|
269
269
|
"tabs-text-truncate": !0,
|
|
270
270
|
active: t.id === o.value,
|
|
271
271
|
disabled: t.disabled
|
|
272
|
-
})), x =
|
|
272
|
+
})), x = ft({
|
|
273
273
|
content: t.title,
|
|
274
274
|
overflowShown: !0
|
|
275
275
|
});
|
|
@@ -277,7 +277,7 @@ function Nn(e, t, a, u, l) {
|
|
|
277
277
|
return e.tabType !== "pill" && !e.autoTitleWidth ? Ne(n("span", {
|
|
278
278
|
class: f.value,
|
|
279
279
|
"data-tabid": t.id
|
|
280
|
-
}, [t.title]), [[
|
|
280
|
+
}, [t.title]), [[Zt("tooltip"), x]]) : n("span", {
|
|
281
281
|
class: f.value,
|
|
282
282
|
"data-tabid": t.id,
|
|
283
283
|
title: t.title
|
|
@@ -287,35 +287,36 @@ function Nn(e, t, a, u, l) {
|
|
|
287
287
|
function v() {
|
|
288
288
|
return w.value ? n("span", {
|
|
289
289
|
class: "st-drop-close",
|
|
290
|
-
onClick: (
|
|
290
|
+
onClick: (P) => i(P, t.id)
|
|
291
291
|
}, [n("i", {
|
|
292
292
|
class: "f-icon f-icon-close"
|
|
293
293
|
}, null)]) : "";
|
|
294
294
|
}
|
|
295
|
-
function C(
|
|
295
|
+
function C(P) {
|
|
296
296
|
s(t.id), e.tabType === "one-page" && u.scrollToByPaggId(t.id);
|
|
297
297
|
}
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
const S = yt(a.attrs);
|
|
299
|
+
function y() {
|
|
300
|
+
return a.slots.title ? n("a", ae(S, {
|
|
300
301
|
class: m.value,
|
|
301
302
|
onClick: C,
|
|
302
303
|
id: `${t.id}-tab-title`
|
|
303
|
-
}, [a.slots.title(a), v()]) : t.titleRenderFunction ? n("a", {
|
|
304
|
+
}), [a.slots.title(a), v()]) : t.titleRenderFunction ? n("a", ae(S, {
|
|
304
305
|
class: m.value,
|
|
305
306
|
onClick: C,
|
|
306
307
|
id: `${t.id}-tab-title`
|
|
307
|
-
}, [t.titleRenderFunction(), v()]) : n("a", {
|
|
308
|
+
}), [t.titleRenderFunction(), v()]) : n("a", ae(S, {
|
|
308
309
|
class: m.value,
|
|
309
310
|
onClick: C,
|
|
310
311
|
id: `${t.id}-tab-title`
|
|
311
|
-
}, [I(), v()]);
|
|
312
|
+
}), [I(), v()]);
|
|
312
313
|
}
|
|
313
314
|
return n("li", {
|
|
314
315
|
class: d.value,
|
|
315
316
|
style: r.value
|
|
316
|
-
}, [
|
|
317
|
+
}, [y()]);
|
|
317
318
|
}
|
|
318
|
-
function
|
|
319
|
+
function $n(e, t, a, u, l) {
|
|
319
320
|
const {
|
|
320
321
|
shouldShowNavigationButtons: o
|
|
321
322
|
} = a, {
|
|
@@ -342,9 +343,9 @@ function An(e, t, a, u, l) {
|
|
|
342
343
|
}, [n("ul", {
|
|
343
344
|
class: d.value,
|
|
344
345
|
ref: t
|
|
345
|
-
}, [i.value.map((r) =>
|
|
346
|
+
}, [i.value.map((r) => zn(e, r.props, r, u, l))])]);
|
|
346
347
|
}
|
|
347
|
-
function
|
|
348
|
+
function Wn(e, t, a, u, l) {
|
|
348
349
|
const o = c(), {
|
|
349
350
|
shouldShowNavigationButtons: i
|
|
350
351
|
} = a, {
|
|
@@ -378,7 +379,7 @@ function zn(e, t, a, u, l) {
|
|
|
378
379
|
}), () => n("div", {
|
|
379
380
|
class: x.value,
|
|
380
381
|
style: I.value
|
|
381
|
-
}, [n(
|
|
382
|
+
}, [n(dn, {
|
|
382
383
|
items: m.value,
|
|
383
384
|
modelValue: r.value,
|
|
384
385
|
"onUpdate:modelValue": (v) => r.value = v,
|
|
@@ -386,7 +387,7 @@ function zn(e, t, a, u, l) {
|
|
|
386
387
|
ref: o
|
|
387
388
|
}, null)]);
|
|
388
389
|
}
|
|
389
|
-
function
|
|
390
|
+
function _n(e, t, a, u) {
|
|
390
391
|
const l = c(), {
|
|
391
392
|
activeId: o,
|
|
392
393
|
removeTab: i,
|
|
@@ -398,9 +399,9 @@ function $n(e, t, a, u) {
|
|
|
398
399
|
} = t, m = 600;
|
|
399
400
|
let x = null;
|
|
400
401
|
const I = B(() => {
|
|
401
|
-
var
|
|
402
|
+
var h, b;
|
|
402
403
|
let T = [];
|
|
403
|
-
return e.searchBoxVisible ? T = (
|
|
404
|
+
return e.searchBoxVisible ? T = (h = s.value) == null ? void 0 : h.filter((D) => D.props.title.includes(r.value)) : T = (b = s.value) == null ? void 0 : b.slice(), T;
|
|
404
405
|
}), w = B(() => ({
|
|
405
406
|
"dropdown-menu": !0,
|
|
406
407
|
"tabs-pt28": e.searchBoxVisible,
|
|
@@ -417,7 +418,7 @@ function $n(e, t, a, u) {
|
|
|
417
418
|
if (T)
|
|
418
419
|
l.value.style.width = null;
|
|
419
420
|
else {
|
|
420
|
-
const
|
|
421
|
+
const h = v.value.querySelector(".farris-tabs-header"), b = v.value.clientHeight - h.clientHeight - 20, j = h.querySelector(".farris-tabs-title").clientWidth - 20;
|
|
421
422
|
l.value.style.maxWidth = j + "px", l.value.style.maxHeight = b + "px", te(() => {
|
|
422
423
|
const {
|
|
423
424
|
width: $
|
|
@@ -436,10 +437,10 @@ function $n(e, t, a, u) {
|
|
|
436
437
|
"d-none": T.props.show !== !0
|
|
437
438
|
};
|
|
438
439
|
}
|
|
439
|
-
function
|
|
440
|
+
function y(T) {
|
|
440
441
|
T.preventDefault(), T.stopPropagation();
|
|
441
442
|
}
|
|
442
|
-
function
|
|
443
|
+
function P() {
|
|
443
444
|
x && clearTimeout(x);
|
|
444
445
|
}
|
|
445
446
|
function k() {
|
|
@@ -447,11 +448,11 @@ function $n(e, t, a, u) {
|
|
|
447
448
|
d.value = !0;
|
|
448
449
|
}, m));
|
|
449
450
|
}
|
|
450
|
-
function
|
|
451
|
-
T.stopPropagation(),
|
|
451
|
+
function V(T, h) {
|
|
452
|
+
T.stopPropagation(), h.disabled || f(h.id), d.value = !0;
|
|
452
453
|
}
|
|
453
|
-
function
|
|
454
|
-
T.stopPropagation(), i(T,
|
|
454
|
+
function R(T, h) {
|
|
455
|
+
T.stopPropagation(), i(T, h, !0);
|
|
455
456
|
}
|
|
456
457
|
function F(T) {
|
|
457
458
|
return T.slots.title ? n("a", {
|
|
@@ -469,25 +470,25 @@ function $n(e, t, a, u) {
|
|
|
469
470
|
return n("div", {
|
|
470
471
|
ref: l,
|
|
471
472
|
class: w.value,
|
|
472
|
-
onMouseenter: () =>
|
|
473
|
+
onMouseenter: () => P(),
|
|
473
474
|
onMouseleave: () => k()
|
|
474
475
|
}, [e.searchBoxVisible && n("div", {
|
|
475
|
-
onClick: (T) =>
|
|
476
|
+
onClick: (T) => y(T),
|
|
476
477
|
class: "pb-1 tabs-li-absolute"
|
|
477
478
|
}, [Ne(n("input", {
|
|
478
479
|
type: "text",
|
|
479
480
|
class: "form-control",
|
|
480
481
|
"onUpdate:modelValue": (T) => r.value = T
|
|
481
|
-
}, null), [[
|
|
482
|
+
}, null), [[vt, r.value]]), n("span", {
|
|
482
483
|
class: "f-icon f-icon-page-title-query tabs-icon-search"
|
|
483
484
|
}, null)]), I.value.length ? n("ul", {
|
|
484
485
|
class: "tab-dropdown-menu--items flex-fill"
|
|
485
486
|
}, [I.value.map((T) => n("li", {
|
|
486
487
|
class: S(T),
|
|
487
|
-
onClick: (
|
|
488
|
+
onClick: (h) => V(h, T.props)
|
|
488
489
|
}, [T.props.removeable && T.props.disabled !== !0 && n("span", {
|
|
489
490
|
class: "float-right st-drop-close",
|
|
490
|
-
onClick: (
|
|
491
|
+
onClick: (h) => R(h, T.props.id)
|
|
491
492
|
}, [n("i", {
|
|
492
493
|
class: "f-icon f-icon-close"
|
|
493
494
|
}, null)]), F(T)]))]) : n("div", {
|
|
@@ -499,13 +500,13 @@ function $n(e, t, a, u) {
|
|
|
499
500
|
setTabsRef: C
|
|
500
501
|
};
|
|
501
502
|
}
|
|
502
|
-
function
|
|
503
|
+
function Gn(e, t, a, u) {
|
|
503
504
|
const {
|
|
504
505
|
hideDropDown: l
|
|
505
506
|
} = t, {
|
|
506
507
|
renderDropdownMenu: o,
|
|
507
508
|
setTabsRef: i
|
|
508
|
-
} =
|
|
509
|
+
} = _n(e, t, a, u), s = c(e.showDropdown);
|
|
509
510
|
function f() {
|
|
510
511
|
return s.value && n(Q, null, [n("button", {
|
|
511
512
|
class: "btn dropdown-toggle-split dropdown-toggle",
|
|
@@ -519,7 +520,7 @@ function Wn(e, t, a, u) {
|
|
|
519
520
|
setTabsRef: i
|
|
520
521
|
};
|
|
521
522
|
}
|
|
522
|
-
function
|
|
523
|
+
function Un(e, t, a, u) {
|
|
523
524
|
const l = c(!1), { selectTab: o, tabPages: i, needUpdateNavigationLayout: s, activeId: f } = u, d = 4, r = B(() => ({
|
|
524
525
|
btn: !0,
|
|
525
526
|
"sc-nav-btn": !0,
|
|
@@ -536,41 +537,41 @@ function _n(e, t, a, u) {
|
|
|
536
537
|
"sc-nav-rg": !0,
|
|
537
538
|
"d-none": !l.value
|
|
538
539
|
}));
|
|
539
|
-
function I(
|
|
540
|
+
function I(y, P) {
|
|
540
541
|
if (!t.value)
|
|
541
542
|
return;
|
|
542
|
-
const k = t.value.scrollLeft,
|
|
543
|
-
if (
|
|
544
|
-
if (t.value.scrollLeft >=
|
|
543
|
+
const k = t.value.scrollLeft, V = t.value.scrollWidth - t.value.offsetWidth;
|
|
544
|
+
if (P > 0) {
|
|
545
|
+
if (t.value.scrollLeft >= V)
|
|
545
546
|
return;
|
|
546
|
-
t.value.scrollLeft = k + e.scrollStep +
|
|
547
|
-
} else if (
|
|
547
|
+
t.value.scrollLeft = k + e.scrollStep + y;
|
|
548
|
+
} else if (P < 0) {
|
|
548
549
|
if (t.value.scrollLeft <= 0)
|
|
549
550
|
return;
|
|
550
|
-
t.value.scrollLeft = k - e.scrollStep -
|
|
551
|
+
t.value.scrollLeft = k - e.scrollStep - y;
|
|
551
552
|
}
|
|
552
553
|
}
|
|
553
|
-
function w(
|
|
554
|
+
function w(y = -1) {
|
|
554
555
|
if (!l.value || !t.value)
|
|
555
556
|
return;
|
|
556
|
-
|
|
557
|
-
const
|
|
558
|
-
if (
|
|
559
|
-
const F =
|
|
560
|
-
T < F ? I(F - T, -1) : g <
|
|
557
|
+
y < 0 && (y = i.value.findIndex((F) => F.props.id === f.value));
|
|
558
|
+
const P = e.tabType === "pills" ? ".f-capsule-item" : ".nav-item", k = t.value.querySelectorAll(P), { parentElement: V } = t.value, R = k[y];
|
|
559
|
+
if (R && V) {
|
|
560
|
+
const F = V.getBoundingClientRect().left, g = V.getBoundingClientRect().right, T = R.getBoundingClientRect().left, h = R.getBoundingClientRect().right;
|
|
561
|
+
T < F ? I(F - T, -1) : g < h && I(h - g, 1), e.tabType === "one-page" && a.scrollTo(y);
|
|
561
562
|
}
|
|
562
563
|
}
|
|
563
564
|
function v() {
|
|
564
565
|
var k;
|
|
565
566
|
if (!t.value)
|
|
566
567
|
return;
|
|
567
|
-
const
|
|
568
|
-
l.value =
|
|
568
|
+
const y = t.value, P = (k = t.value) == null ? void 0 : k.parentElement;
|
|
569
|
+
l.value = P && y && P.offsetWidth < y.scrollWidth - d, l.value && te(() => {
|
|
569
570
|
w();
|
|
570
571
|
});
|
|
571
572
|
}
|
|
572
|
-
function C(
|
|
573
|
-
|
|
573
|
+
function C(y) {
|
|
574
|
+
y.disabled || o(y.id);
|
|
574
575
|
}
|
|
575
576
|
function S() {
|
|
576
577
|
["default", "one-page"].indexOf(e.tabType) > -1 && te(() => {
|
|
@@ -590,7 +591,7 @@ function _n(e, t, a, u) {
|
|
|
590
591
|
scrollToSelectedTab: S
|
|
591
592
|
};
|
|
592
593
|
}
|
|
593
|
-
function
|
|
594
|
+
function qn(e, t) {
|
|
594
595
|
const { tabPages: a } = t, u = c(""), l = c(!0), o = B(() => e.searchBoxVisible), i = B(() => o.value ? a.value.filter((f) => f.props.title.includes(u.value)) : a.value.slice());
|
|
595
596
|
return A(l, (s) => {
|
|
596
597
|
s || (u.value = "");
|
|
@@ -601,7 +602,7 @@ function Gn(e, t) {
|
|
|
601
602
|
tabsInDropdownMenu: i
|
|
602
603
|
};
|
|
603
604
|
}
|
|
604
|
-
function
|
|
605
|
+
function Yn(e, t, a) {
|
|
605
606
|
const u = ".farris-tab-page", { tabPages: l } = a;
|
|
606
607
|
let o = -1;
|
|
607
608
|
function i() {
|
|
@@ -627,8 +628,8 @@ function Un(e, t, a) {
|
|
|
627
628
|
}
|
|
628
629
|
return { scrollTo: s, scrollToByPaggId: f };
|
|
629
630
|
}
|
|
630
|
-
const
|
|
631
|
-
function
|
|
631
|
+
const Xn = ["moz", "ms", "webkit"];
|
|
632
|
+
function Kn() {
|
|
632
633
|
let e = 0;
|
|
633
634
|
return (t) => {
|
|
634
635
|
const a = (/* @__PURE__ */ new Date()).getTime(), u = Math.max(0, 16 - (a - e)), l = setTimeout(() => {
|
|
@@ -637,15 +638,15 @@ function Yn() {
|
|
|
637
638
|
return e = a + u, l;
|
|
638
639
|
};
|
|
639
640
|
}
|
|
640
|
-
function
|
|
641
|
+
function Jn() {
|
|
641
642
|
if (typeof window > "u")
|
|
642
643
|
return () => 0;
|
|
643
644
|
if (window.requestAnimationFrame)
|
|
644
645
|
return window.requestAnimationFrame.bind(window);
|
|
645
|
-
const e =
|
|
646
|
-
return e ? window[`${e}RequestAnimationFrame`] :
|
|
646
|
+
const e = Xn.filter((t) => `${t}RequestAnimationFrame` in window)[0];
|
|
647
|
+
return e ? window[`${e}RequestAnimationFrame`] : Kn();
|
|
647
648
|
}
|
|
648
|
-
|
|
649
|
+
Jn();
|
|
649
650
|
c("");
|
|
650
651
|
function Ze() {
|
|
651
652
|
if (typeof window > "u" || typeof navigator > "u")
|
|
@@ -680,19 +681,22 @@ function Ze() {
|
|
|
680
681
|
const u = "ontouchstart" in window || navigator.maxTouchPoints > 0, l = screen.width, o = screen.height, i = Math.min(l, o);
|
|
681
682
|
return !!(u && i <= 768);
|
|
682
683
|
}
|
|
683
|
-
function
|
|
684
|
+
function Zn() {
|
|
684
685
|
const e = Ze();
|
|
685
686
|
return e && document.body.classList.add("f-mobile"), e;
|
|
686
687
|
}
|
|
687
|
-
typeof document < "u" &&
|
|
688
|
+
typeof document < "u" && Zn();
|
|
689
|
+
function it(e) {
|
|
690
|
+
return e ? Object.keys(e).reduce((t, a) => (a.startsWith("data-") && (t[a] = e[a]), t), {}) : {};
|
|
691
|
+
}
|
|
688
692
|
const Le = /* @__PURE__ */ Y({
|
|
689
693
|
name: "FTabs",
|
|
690
|
-
props:
|
|
694
|
+
props: Nn,
|
|
691
695
|
emits: ["tabChange", "tabRemove", "update:activeId", "Click"],
|
|
692
696
|
setup(e, t) {
|
|
693
697
|
const a = c(e.tabType), u = Re(), l = Ze(), o = c(e.customClass), i = Re();
|
|
694
698
|
Re();
|
|
695
|
-
const s = c(), f =
|
|
699
|
+
const s = c(), f = An(e, t, i), {
|
|
696
700
|
activeId: d,
|
|
697
701
|
changeTitleStyle: r,
|
|
698
702
|
tabPages: m,
|
|
@@ -702,22 +706,22 @@ const Le = /* @__PURE__ */ Y({
|
|
|
702
706
|
checkActiveIdAndSelect: v,
|
|
703
707
|
toggleShowTab: C,
|
|
704
708
|
hasInHeadClass: S,
|
|
705
|
-
toolbarVisible:
|
|
706
|
-
} = f,
|
|
707
|
-
previousButtonClass:
|
|
708
|
-
nextButtonClass:
|
|
709
|
+
toolbarVisible: y
|
|
710
|
+
} = f, P = Yn(e, u, f), k = Un(e, i, P, f), {
|
|
711
|
+
previousButtonClass: V,
|
|
712
|
+
nextButtonClass: R,
|
|
709
713
|
nextButtonGroupClass: F,
|
|
710
714
|
scrollTab: g,
|
|
711
715
|
updateNavigationLayout: T,
|
|
712
|
-
scrollToSelectedTab:
|
|
716
|
+
scrollToSelectedTab: h
|
|
713
717
|
} = k;
|
|
714
|
-
f.setScrollToSelectedTabFunction(
|
|
715
|
-
const b =
|
|
718
|
+
f.setScrollToSelectedTabFunction(h);
|
|
719
|
+
const b = qn(e, f), D = $n(e, i, k, P, f), j = D, $ = Wn(e, i, k, P, f), H = /* @__PURE__ */ new Map([["default", D], ["one-page", j], ["pills", $]]);
|
|
716
720
|
B(() => {
|
|
717
721
|
const G = m.value.find((ee) => ee.props.id === d.value);
|
|
718
722
|
return G == null ? void 0 : G.slots;
|
|
719
723
|
});
|
|
720
|
-
const
|
|
724
|
+
const L = B(() => e.fill), N = (G, ee) => {
|
|
721
725
|
t.emit("Click", G, ee, d.value);
|
|
722
726
|
};
|
|
723
727
|
Ue("tabs", {
|
|
@@ -726,9 +730,9 @@ const Le = /* @__PURE__ */ Y({
|
|
|
726
730
|
updateTab: I,
|
|
727
731
|
tabPages: m,
|
|
728
732
|
tabType: a,
|
|
729
|
-
shouldFillParentContaner:
|
|
733
|
+
shouldFillParentContaner: L,
|
|
730
734
|
toggleShowTab: C,
|
|
731
|
-
toolbarVisible:
|
|
735
|
+
toolbarVisible: y,
|
|
732
736
|
clickToolbarItemHandler: N
|
|
733
737
|
});
|
|
734
738
|
let p = !1;
|
|
@@ -739,7 +743,7 @@ const Le = /* @__PURE__ */ Y({
|
|
|
739
743
|
"farris-tabs-nav-fill": e.tabType === "fill",
|
|
740
744
|
"farris-tabs-nav-pills": e.tabType === "pills",
|
|
741
745
|
"d-none": e.showHeader === !1
|
|
742
|
-
})),
|
|
746
|
+
})), E = B(() => {
|
|
743
747
|
const G = {
|
|
744
748
|
width: S.value && e.titleWidth ? `${e.titleWidth}%` : ""
|
|
745
749
|
};
|
|
@@ -747,23 +751,23 @@ const Le = /* @__PURE__ */ Y({
|
|
|
747
751
|
}), W = B(() => {
|
|
748
752
|
const G = {
|
|
749
753
|
"farris-tabs": !0,
|
|
750
|
-
"f-tabs-content-fill":
|
|
754
|
+
"f-tabs-content-fill": L.value,
|
|
751
755
|
"flex-column": e.position === "top",
|
|
752
756
|
"flex-column-reverse": e.position === "bottom",
|
|
753
757
|
"flex-row": e.position === "left",
|
|
754
758
|
"flex-row-reverse": e.position === "right",
|
|
755
759
|
"one-page": e.tabType === "one-page"
|
|
756
760
|
};
|
|
757
|
-
return o.value && o.value.split(" ").reduce((ee,
|
|
761
|
+
return o.value && o.value.split(" ").reduce((ee, ie) => (ee[ie] = !0, ee), G), G;
|
|
758
762
|
}), U = new ResizeObserver((G) => {
|
|
759
763
|
G.length && T();
|
|
760
764
|
});
|
|
761
|
-
function
|
|
765
|
+
function de() {
|
|
762
766
|
s.value && !p && (U.observe(s.value), p = !0);
|
|
763
767
|
}
|
|
764
768
|
A(() => e.visible, (G) => {
|
|
765
769
|
te(() => {
|
|
766
|
-
m.value.length && v(e.activeId || m.value[0].props.id), T(), r(i),
|
|
770
|
+
m.value.length && v(e.activeId || m.value[0].props.id), T(), r(i), de();
|
|
767
771
|
});
|
|
768
772
|
}), A(() => e.autoTitleWidth, (G) => {
|
|
769
773
|
te(() => {
|
|
@@ -772,13 +776,13 @@ const Le = /* @__PURE__ */ Y({
|
|
|
772
776
|
}), ne(() => {
|
|
773
777
|
e.visible && (m.value.length && v(e.activeId || m.value[0].props.id), te(() => {
|
|
774
778
|
T(), r(i);
|
|
775
|
-
}),
|
|
779
|
+
}), de());
|
|
776
780
|
});
|
|
777
|
-
function
|
|
781
|
+
function se() {
|
|
778
782
|
return n("button", {
|
|
779
783
|
title: Z.getLocaleValue("tabs.leftButton"),
|
|
780
784
|
type: "button",
|
|
781
|
-
class:
|
|
785
|
+
class: V.value,
|
|
782
786
|
onClick: () => {
|
|
783
787
|
g(0, -1);
|
|
784
788
|
}
|
|
@@ -788,52 +792,52 @@ const Le = /* @__PURE__ */ Y({
|
|
|
788
792
|
return n("button", {
|
|
789
793
|
title: Z.getLocaleValue("tabs.rightButton"),
|
|
790
794
|
type: "button",
|
|
791
|
-
class:
|
|
795
|
+
class: R.value,
|
|
792
796
|
onClick: () => {
|
|
793
797
|
g(0, 1);
|
|
794
798
|
}
|
|
795
799
|
}, null);
|
|
796
800
|
}
|
|
797
801
|
const {
|
|
798
|
-
renderMorePagesButtton:
|
|
802
|
+
renderMorePagesButtton: ye,
|
|
799
803
|
setTabsRef: Te
|
|
800
|
-
} =
|
|
804
|
+
} = Gn(e, b, k, f);
|
|
801
805
|
Te(u);
|
|
802
806
|
function Be() {
|
|
803
807
|
return w.value.length ? n("div", {
|
|
804
808
|
class: {
|
|
805
809
|
"farris-tabs-toolbar": !0,
|
|
806
|
-
"d-none": !
|
|
810
|
+
"d-none": !y.value
|
|
807
811
|
}
|
|
808
|
-
}, [n(
|
|
812
|
+
}, [n(fn, ae(it(t.attrs), {
|
|
809
813
|
class: "f-utils-fill",
|
|
810
814
|
alignment: S.value ? "right" : "left",
|
|
811
815
|
items: w.value,
|
|
812
|
-
visible:
|
|
816
|
+
visible: y.value,
|
|
813
817
|
onClick: N
|
|
814
|
-
}, null)]) : null;
|
|
818
|
+
}), null)]) : null;
|
|
815
819
|
}
|
|
816
|
-
const
|
|
820
|
+
const fe = H.get(e.tabType) || H.get("default");
|
|
817
821
|
function ke() {
|
|
818
|
-
var G, ee,
|
|
822
|
+
var G, ee, ie, Me;
|
|
819
823
|
return n("div", {
|
|
820
824
|
class: O.value
|
|
821
825
|
}, [n("div", {
|
|
822
826
|
class: "farris-tabs-header-pre"
|
|
823
827
|
}, [(ee = (G = t.slots).headerPrefix) == null ? void 0 : ee.call(G)]), n("div", {
|
|
824
828
|
class: "farris-tabs-title scroll-tabs",
|
|
825
|
-
style:
|
|
829
|
+
style: E.value,
|
|
826
830
|
ref: s
|
|
827
|
-
}, [!l &&
|
|
831
|
+
}, [!l && se(), fe && fe(), n("div", {
|
|
828
832
|
hidden: l,
|
|
829
833
|
class: F.value
|
|
830
|
-
}, [Ie(),
|
|
834
|
+
}, [Ie(), ye()])]), Be(), n("div", {
|
|
831
835
|
class: "farris-tabs-header-post"
|
|
832
|
-
}, [(Me = (
|
|
836
|
+
}, [(Me = (ie = t.slots).headerSuffix) == null ? void 0 : Me.call(ie)])]);
|
|
833
837
|
}
|
|
834
838
|
B(() => ({
|
|
835
839
|
"farris-tabs-content": !0,
|
|
836
|
-
"f-utils-fill-flex-column":
|
|
840
|
+
"f-utils-fill-flex-column": L.value
|
|
837
841
|
}));
|
|
838
842
|
function Fe() {
|
|
839
843
|
var G, ee;
|
|
@@ -842,12 +846,12 @@ const Le = /* @__PURE__ */ Y({
|
|
|
842
846
|
(ee = (G = t.slots).default) == null ? void 0 : ee.call(G)
|
|
843
847
|
);
|
|
844
848
|
}
|
|
845
|
-
return () => e.visible ? n("div", {
|
|
849
|
+
return () => e.visible ? n("div", ae(it(t.attrs), {
|
|
846
850
|
class: W.value,
|
|
847
851
|
ref: u
|
|
848
|
-
}, [ke(), Fe()]) : null;
|
|
852
|
+
}), [ke(), Fe()]) : null;
|
|
849
853
|
}
|
|
850
|
-
}),
|
|
854
|
+
}), Qn = {
|
|
851
855
|
tabWidth: { type: Number },
|
|
852
856
|
id: { type: String, default: "" },
|
|
853
857
|
customTitleClass: { type: String, default: "" },
|
|
@@ -870,19 +874,20 @@ const Le = /* @__PURE__ */ Y({
|
|
|
870
874
|
/** 标题 */
|
|
871
875
|
titleRenderFunction: { type: Function }
|
|
872
876
|
};
|
|
873
|
-
function
|
|
874
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
877
|
+
function ut(e) {
|
|
878
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !mt(e);
|
|
875
879
|
}
|
|
876
880
|
const qe = /* @__PURE__ */ Y({
|
|
877
881
|
name: "FTabPage",
|
|
878
|
-
props:
|
|
882
|
+
props: Qn,
|
|
879
883
|
emits: [],
|
|
880
884
|
setup(e, t) {
|
|
881
|
-
const a =
|
|
885
|
+
const a = le("tabs");
|
|
882
886
|
Ce();
|
|
883
887
|
const u = c(e.show), l = {
|
|
884
888
|
slots: t.slots,
|
|
885
|
-
props: e
|
|
889
|
+
props: e,
|
|
890
|
+
attrs: t.attrs
|
|
886
891
|
}, o = c((a == null ? void 0 : a.tabType.value) || "default");
|
|
887
892
|
ne(() => {
|
|
888
893
|
const v = a == null ? void 0 : a.tabPages.value.findIndex((C) => C.props.id === e.id);
|
|
@@ -895,7 +900,8 @@ const qe = /* @__PURE__ */ Y({
|
|
|
895
900
|
A(() => e, (v) => {
|
|
896
901
|
a == null || a.updateTab({
|
|
897
902
|
props: v,
|
|
898
|
-
slots: t.slots
|
|
903
|
+
slots: t.slots,
|
|
904
|
+
attrs: t.attrs
|
|
899
905
|
});
|
|
900
906
|
}, {
|
|
901
907
|
immediate: !0,
|
|
@@ -911,7 +917,7 @@ const qe = /* @__PURE__ */ Y({
|
|
|
911
917
|
return n(st, {
|
|
912
918
|
"main-title": e.title,
|
|
913
919
|
class: ["farris-tab-page", u.value ? "" : "f-tab-d-none"]
|
|
914
|
-
},
|
|
920
|
+
}, ut(v) ? v : {
|
|
915
921
|
default: () => [v]
|
|
916
922
|
});
|
|
917
923
|
}
|
|
@@ -929,7 +935,7 @@ const qe = /* @__PURE__ */ Y({
|
|
|
929
935
|
buttons: e.toolbar.buttons,
|
|
930
936
|
"button-position": e.toolbar.position || e.toolbarPosition,
|
|
931
937
|
"buttons-visible": e.toolbarVisible
|
|
932
|
-
},
|
|
938
|
+
}, ut(v) ? v : {
|
|
933
939
|
default: () => [v]
|
|
934
940
|
});
|
|
935
941
|
}
|
|
@@ -956,9 +962,9 @@ const qe = /* @__PURE__ */ Y({
|
|
|
956
962
|
Le.install = (e) => {
|
|
957
963
|
e.component(Le.name, Le), e.component(qe.name, qe);
|
|
958
964
|
};
|
|
959
|
-
const
|
|
960
|
-
["appearance",
|
|
961
|
-
]),
|
|
965
|
+
const ea = /* @__PURE__ */ new Map([
|
|
966
|
+
["appearance", wt]
|
|
967
|
+
]), ta = "https://json-schema.org/draft/2020-12/schema", na = "https://farris-design.gitee.io/search-box.schema.json", aa = "search-box", la = "A Farris Component", oa = "object", sa = {
|
|
962
968
|
id: {
|
|
963
969
|
description: "The unique identifier for a search-box",
|
|
964
970
|
type: "string"
|
|
@@ -1020,22 +1026,22 @@ const Zn = /* @__PURE__ */ new Map([
|
|
|
1020
1026
|
type: "boolean",
|
|
1021
1027
|
default: !0
|
|
1022
1028
|
}
|
|
1023
|
-
},
|
|
1029
|
+
}, ia = [
|
|
1024
1030
|
"id",
|
|
1025
1031
|
"type"
|
|
1026
|
-
],
|
|
1027
|
-
$schema:
|
|
1028
|
-
$id:
|
|
1029
|
-
title:
|
|
1030
|
-
description:
|
|
1031
|
-
type:
|
|
1032
|
-
properties:
|
|
1033
|
-
required:
|
|
1032
|
+
], ua = {
|
|
1033
|
+
$schema: ta,
|
|
1034
|
+
$id: na,
|
|
1035
|
+
title: aa,
|
|
1036
|
+
description: la,
|
|
1037
|
+
type: oa,
|
|
1038
|
+
properties: sa,
|
|
1039
|
+
required: ia
|
|
1034
1040
|
};
|
|
1035
|
-
function
|
|
1041
|
+
function ca(e, t, a) {
|
|
1036
1042
|
return t;
|
|
1037
1043
|
}
|
|
1038
|
-
const
|
|
1044
|
+
const ra = "search-box", da = "A Farris Component", fa = "object", va = {
|
|
1039
1045
|
basic: {
|
|
1040
1046
|
description: "Basic Infomation",
|
|
1041
1047
|
title: "基本信息",
|
|
@@ -1057,11 +1063,11 @@ const ua = "search-box", ca = "A Farris Component", ra = "object", da = {
|
|
|
1057
1063
|
}
|
|
1058
1064
|
}
|
|
1059
1065
|
}
|
|
1060
|
-
},
|
|
1061
|
-
title:
|
|
1062
|
-
description:
|
|
1063
|
-
type:
|
|
1064
|
-
categories:
|
|
1066
|
+
}, ma = {
|
|
1067
|
+
title: ra,
|
|
1068
|
+
description: da,
|
|
1069
|
+
type: fa,
|
|
1070
|
+
categories: va
|
|
1065
1071
|
}, Qe = {
|
|
1066
1072
|
/**
|
|
1067
1073
|
* 自定义图标
|
|
@@ -1129,7 +1135,7 @@ const ua = "search-box", ca = "A Farris Component", ra = "object", da = {
|
|
|
1129
1135
|
* 值变化事件触发时机
|
|
1130
1136
|
*/
|
|
1131
1137
|
updateOn: { default: "change", type: String }
|
|
1132
|
-
},
|
|
1138
|
+
}, It = Xe(Qe, ua, ea, ca, ma), pa = {
|
|
1133
1139
|
data: { type: Array, default: [] },
|
|
1134
1140
|
/** 确认结果事件 */
|
|
1135
1141
|
onConfirmResult: { type: Function, default: () => {
|
|
@@ -1153,9 +1159,9 @@ const ua = "search-box", ca = "A Farris Component", ra = "object", da = {
|
|
|
1153
1159
|
*/
|
|
1154
1160
|
maxHeight: { default: 350, type: Number },
|
|
1155
1161
|
loading: { default: !1, type: Boolean }
|
|
1156
|
-
},
|
|
1162
|
+
}, Tt = /* @__PURE__ */ Y({
|
|
1157
1163
|
name: "FSearchBoxContainer",
|
|
1158
|
-
props:
|
|
1164
|
+
props: pa,
|
|
1159
1165
|
emits: ["confirmResult", "searchedValue"],
|
|
1160
1166
|
setup(e, t) {
|
|
1161
1167
|
const a = c(e.data), u = c(), {
|
|
@@ -1191,10 +1197,10 @@ const ua = "search-box", ca = "A Farris Component", ra = "object", da = {
|
|
|
1191
1197
|
return n("div", {
|
|
1192
1198
|
class: o.value,
|
|
1193
1199
|
style: d.value
|
|
1194
|
-
}, [n(
|
|
1200
|
+
}, [n(gn, {
|
|
1195
1201
|
ref: "loadingInstance",
|
|
1196
1202
|
isActive: e.loading
|
|
1197
|
-
}, null), n(
|
|
1203
|
+
}, null), n(pn, {
|
|
1198
1204
|
ref: u,
|
|
1199
1205
|
itemClass: "dropdown-item",
|
|
1200
1206
|
data: a.value,
|
|
@@ -1207,7 +1213,7 @@ const ua = "search-box", ca = "A Farris Component", ra = "object", da = {
|
|
|
1207
1213
|
}, r)]);
|
|
1208
1214
|
};
|
|
1209
1215
|
}
|
|
1210
|
-
}),
|
|
1216
|
+
}), ce = /* @__PURE__ */ Y({
|
|
1211
1217
|
name: "FSearchBox",
|
|
1212
1218
|
props: Qe,
|
|
1213
1219
|
emits: ["update:modelValue", "change", "selectedValue", "clickButton"],
|
|
@@ -1258,7 +1264,7 @@ const ua = "search-box", ca = "A Farris Component", ra = "object", da = {
|
|
|
1258
1264
|
const v = {
|
|
1259
1265
|
default: t.slots.default
|
|
1260
1266
|
};
|
|
1261
|
-
return n(
|
|
1267
|
+
return n(mn, {
|
|
1262
1268
|
ref: a,
|
|
1263
1269
|
"button-content": i.value,
|
|
1264
1270
|
"custom-class": e.customClass,
|
|
@@ -1279,7 +1285,7 @@ const ua = "search-box", ca = "A Farris Component", ra = "object", da = {
|
|
|
1279
1285
|
limitContentBySpace: !0,
|
|
1280
1286
|
placement: "auto"
|
|
1281
1287
|
}, {
|
|
1282
|
-
default: () => [e.showDropdown && n(
|
|
1288
|
+
default: () => [e.showDropdown && n(Tt, {
|
|
1283
1289
|
ref: u,
|
|
1284
1290
|
data: e.data,
|
|
1285
1291
|
idField: e.idField,
|
|
@@ -1293,12 +1299,12 @@ const ua = "search-box", ca = "A Farris Component", ra = "object", da = {
|
|
|
1293
1299
|
});
|
|
1294
1300
|
};
|
|
1295
1301
|
}
|
|
1296
|
-
}),
|
|
1302
|
+
}), ga = /* @__PURE__ */ Y({
|
|
1297
1303
|
name: "FSearchBoxDesign",
|
|
1298
1304
|
props: Qe,
|
|
1299
1305
|
emits: ["update:modelValue", "change"],
|
|
1300
1306
|
setup(e, t) {
|
|
1301
|
-
const a = c(e.data), u = c(), l = c(), o = c("请输入关键词"), i = c('<i class="f-icon f-icon-search"></i>'), s = c(e.modelValue), f = c(), d =
|
|
1307
|
+
const a = c(e.data), u = c(), l = c(), o = c("请输入关键词"), i = c('<i class="f-icon f-icon-search"></i>'), s = c(e.modelValue), f = c(), d = le("design-item-context"), r = Ct(f, d);
|
|
1302
1308
|
ne(() => {
|
|
1303
1309
|
f.value.componentInstance = r;
|
|
1304
1310
|
}), t.expose(r.value), A(s, (I) => {
|
|
@@ -1315,7 +1321,7 @@ const ua = "search-box", ca = "A Farris Component", ra = "object", da = {
|
|
|
1315
1321
|
}
|
|
1316
1322
|
return () => n("div", {
|
|
1317
1323
|
ref: f
|
|
1318
|
-
}, [n(
|
|
1324
|
+
}, [n(Qt("f-button-edit"), {
|
|
1319
1325
|
ref: u,
|
|
1320
1326
|
"button-content": i.value,
|
|
1321
1327
|
placeholder: o.value,
|
|
@@ -1330,7 +1336,7 @@ const ua = "search-box", ca = "A Farris Component", ra = "object", da = {
|
|
|
1330
1336
|
"popup-on-input": !0,
|
|
1331
1337
|
"popup-on-focus": !0
|
|
1332
1338
|
}, {
|
|
1333
|
-
default: () => [n(
|
|
1339
|
+
default: () => [n(Tt, {
|
|
1334
1340
|
ref: l,
|
|
1335
1341
|
data: a.value,
|
|
1336
1342
|
onConfirmResult: m
|
|
@@ -1338,16 +1344,16 @@ const ua = "search-box", ca = "A Farris Component", ra = "object", da = {
|
|
|
1338
1344
|
})]);
|
|
1339
1345
|
}
|
|
1340
1346
|
});
|
|
1341
|
-
|
|
1342
|
-
e.component(
|
|
1347
|
+
ce.install = (e) => {
|
|
1348
|
+
e.component(ce.name, ce);
|
|
1343
1349
|
};
|
|
1344
|
-
|
|
1345
|
-
e["search-box"] =
|
|
1350
|
+
ce.register = (e, t, a, u) => {
|
|
1351
|
+
e["search-box"] = ce, t["search-box"] = It;
|
|
1346
1352
|
};
|
|
1347
|
-
|
|
1348
|
-
e["search-box"] =
|
|
1353
|
+
ce.registerDesigner = (e, t, a) => {
|
|
1354
|
+
e["search-box"] = ga, t["search-box"] = It;
|
|
1349
1355
|
};
|
|
1350
|
-
const
|
|
1356
|
+
const Bt = {
|
|
1351
1357
|
/**
|
|
1352
1358
|
* 列集合
|
|
1353
1359
|
*/
|
|
@@ -1506,7 +1512,7 @@ const It = {
|
|
|
1506
1512
|
*/
|
|
1507
1513
|
allowDelete: { type: Boolean, default: !0 }
|
|
1508
1514
|
};
|
|
1509
|
-
function
|
|
1515
|
+
function ha(e, t) {
|
|
1510
1516
|
function a(o) {
|
|
1511
1517
|
const i = [];
|
|
1512
1518
|
let s = o.nextNode();
|
|
@@ -1539,22 +1545,22 @@ function pa(e, t) {
|
|
|
1539
1545
|
}
|
|
1540
1546
|
return { search: l };
|
|
1541
1547
|
}
|
|
1542
|
-
function
|
|
1548
|
+
function ct(e, t, a, u, l, o, i, s, f, d) {
|
|
1543
1549
|
const r = c(e.size), m = c(e.textField), x = c(e.titleField), I = c(e.disableField), w = B(() => {
|
|
1544
|
-
var
|
|
1545
|
-
return ((
|
|
1550
|
+
var h, b;
|
|
1551
|
+
return ((h = e.selection) == null ? void 0 : h.multiSelect) && ((b = e.selection) == null ? void 0 : b.showCheckbox);
|
|
1546
1552
|
}), {
|
|
1547
1553
|
onMouseenterItem: v,
|
|
1548
1554
|
onMouseoverItem: C,
|
|
1549
1555
|
onMouseleaveItem: S
|
|
1550
1556
|
} = o, {
|
|
1551
|
-
getKey:
|
|
1552
|
-
listViewItemClass:
|
|
1557
|
+
getKey: y,
|
|
1558
|
+
listViewItemClass: P,
|
|
1553
1559
|
listViewItemStyle: k,
|
|
1554
|
-
onCheckItem:
|
|
1555
|
-
onClickItem:
|
|
1560
|
+
onCheckItem: V,
|
|
1561
|
+
onClickItem: R
|
|
1556
1562
|
} = i, F = B(() => {
|
|
1557
|
-
const
|
|
1563
|
+
const h = {
|
|
1558
1564
|
"text-overflow": "ellipsis",
|
|
1559
1565
|
overflow: "hidden",
|
|
1560
1566
|
"white-space": "nowrap",
|
|
@@ -1562,38 +1568,38 @@ function ut(e, t, a, u, l, o, i, s, f, d) {
|
|
|
1562
1568
|
"min-height": r.value === "small" ? "1.25rem" : "1.375rem",
|
|
1563
1569
|
"line-height": r.value === "small" ? "1.25rem" : "1.375rem"
|
|
1564
1570
|
};
|
|
1565
|
-
return e.itemClass ?
|
|
1571
|
+
return e.itemClass ? h : {
|
|
1566
1572
|
margin: r.value === "small" ? "0.25rem 0" : "8px 0",
|
|
1567
|
-
...
|
|
1573
|
+
...h
|
|
1568
1574
|
};
|
|
1569
1575
|
});
|
|
1570
|
-
function g(
|
|
1571
|
-
const b =
|
|
1576
|
+
function g(h) {
|
|
1577
|
+
const b = h.raw[m.value];
|
|
1572
1578
|
return b == null || b === "" ? " " : b;
|
|
1573
1579
|
}
|
|
1574
|
-
function T(
|
|
1575
|
-
|
|
1576
|
-
const j = g(
|
|
1580
|
+
function T(h, b, D) {
|
|
1581
|
+
h.checked = s.findIndexInSelectedItems(h) > -1;
|
|
1582
|
+
const j = g(h), $ = h.raw[x.value] || h.raw[m.value];
|
|
1577
1583
|
return n("li", {
|
|
1578
|
-
class:
|
|
1579
|
-
id: h
|
|
1580
|
-
key: h
|
|
1581
|
-
style: k(
|
|
1582
|
-
onClick: (H) =>
|
|
1583
|
-
onMouseenter: (H) => v(H,
|
|
1584
|
-
onMouseover: (H) => C(H,
|
|
1585
|
-
onMouseleave: (H) => S(H,
|
|
1584
|
+
class: P(h, b),
|
|
1585
|
+
id: y(h, b),
|
|
1586
|
+
key: y(h, b),
|
|
1587
|
+
style: k(h, b),
|
|
1588
|
+
onClick: (H) => R(h, b, H),
|
|
1589
|
+
onMouseenter: (H) => v(H, h, b),
|
|
1590
|
+
onMouseover: (H) => C(H, h, b),
|
|
1591
|
+
onMouseleave: (H) => S(H, h, b)
|
|
1586
1592
|
}, [w.value && n("div", {
|
|
1587
1593
|
class: "f-list-select",
|
|
1588
1594
|
onClick: (H) => H.stopPropagation()
|
|
1589
1595
|
}, [n(Ke, {
|
|
1590
|
-
id: "list-" + h
|
|
1596
|
+
id: "list-" + y(h, b),
|
|
1591
1597
|
customClass: "listview-checkbox float-left",
|
|
1592
|
-
disabled:
|
|
1593
|
-
checked:
|
|
1594
|
-
"onUpdate:checked": (H) =>
|
|
1598
|
+
disabled: h[I.value],
|
|
1599
|
+
checked: h.checked,
|
|
1600
|
+
"onUpdate:checked": (H) => h.checked = H,
|
|
1595
1601
|
onChange: (H) => {
|
|
1596
|
-
|
|
1602
|
+
V(h, b, !H.checked);
|
|
1597
1603
|
}
|
|
1598
1604
|
}, null)]), n("div", {
|
|
1599
1605
|
class: "f-list-content"
|
|
@@ -1607,7 +1613,7 @@ function ut(e, t, a, u, l, o, i, s, f, d) {
|
|
|
1607
1613
|
renderItem: T
|
|
1608
1614
|
};
|
|
1609
1615
|
}
|
|
1610
|
-
function
|
|
1616
|
+
function ya(e, t, a, u, l, o, i, s, f, d) {
|
|
1611
1617
|
const r = c(e.multiSelect), m = c(e.disableField), x = c(e.textField), {
|
|
1612
1618
|
onMouseenterItem: I,
|
|
1613
1619
|
onMouseoverItem: w,
|
|
@@ -1615,30 +1621,30 @@ function ga(e, t, a, u, l, o, i, s, f, d) {
|
|
|
1615
1621
|
} = o, {
|
|
1616
1622
|
getKey: C,
|
|
1617
1623
|
listViewItemClass: S,
|
|
1618
|
-
listViewItemStyle:
|
|
1619
|
-
onCheckItem:
|
|
1624
|
+
listViewItemStyle: y,
|
|
1625
|
+
onCheckItem: P,
|
|
1620
1626
|
onClickItem: k,
|
|
1621
|
-
updateSelectedItems:
|
|
1627
|
+
updateSelectedItems: V
|
|
1622
1628
|
} = i;
|
|
1623
|
-
function
|
|
1629
|
+
function R(g, T, h) {
|
|
1624
1630
|
return e.contentTemplate ? n(Q, null, [e.contentTemplate({
|
|
1625
1631
|
item: g.raw,
|
|
1626
1632
|
index: T,
|
|
1627
|
-
selectedItem:
|
|
1633
|
+
selectedItem: h
|
|
1628
1634
|
})]) : t.slots.content ? n(Q, null, [t.slots.content && t.slots.content({
|
|
1629
1635
|
item: g.raw,
|
|
1630
1636
|
index: T,
|
|
1631
|
-
selectedItem:
|
|
1637
|
+
selectedItem: h
|
|
1632
1638
|
})]) : n("div", {
|
|
1633
1639
|
style: "margin: 10px 0;"
|
|
1634
1640
|
}, [g.raw[x.value || "name"]]);
|
|
1635
1641
|
}
|
|
1636
|
-
function F(g, T,
|
|
1642
|
+
function F(g, T, h) {
|
|
1637
1643
|
return n("li", {
|
|
1638
1644
|
class: S(g, T),
|
|
1639
1645
|
id: C(g, T),
|
|
1640
1646
|
key: C(g, T),
|
|
1641
|
-
style:
|
|
1647
|
+
style: y(g, T),
|
|
1642
1648
|
onClick: (b) => k(g, T, b),
|
|
1643
1649
|
onMouseenter: (b) => I(b, g, T),
|
|
1644
1650
|
onMouseover: (b) => w(b, g, T),
|
|
@@ -1653,17 +1659,17 @@ function ga(e, t, a, u, l, o, i, s, f, d) {
|
|
|
1653
1659
|
checked: g.checked,
|
|
1654
1660
|
"onUpdate:checked": (b) => g.checked = b,
|
|
1655
1661
|
onChange: (b) => {
|
|
1656
|
-
|
|
1662
|
+
P(g, T, !b.checked), V();
|
|
1657
1663
|
}
|
|
1658
1664
|
}, null)]), n("div", {
|
|
1659
1665
|
class: "f-list-content"
|
|
1660
|
-
}, [
|
|
1666
|
+
}, [R(g, T, h)])]);
|
|
1661
1667
|
}
|
|
1662
1668
|
return {
|
|
1663
1669
|
renderItem: F
|
|
1664
1670
|
};
|
|
1665
1671
|
}
|
|
1666
|
-
function
|
|
1672
|
+
function ba(e, t, a, u, l, o, i, s, f, d) {
|
|
1667
1673
|
const r = c(e.multiSelect), m = c(e.disableField), x = c(e.textField), {
|
|
1668
1674
|
onMouseenterItem: I,
|
|
1669
1675
|
onMouseoverItem: w,
|
|
@@ -1671,62 +1677,62 @@ function ha(e, t, a, u, l, o, i, s, f, d) {
|
|
|
1671
1677
|
} = o, {
|
|
1672
1678
|
getKey: C,
|
|
1673
1679
|
listViewItemClass: S,
|
|
1674
|
-
onCheckItem:
|
|
1675
|
-
onClickItem:
|
|
1680
|
+
onCheckItem: y,
|
|
1681
|
+
onClickItem: P
|
|
1676
1682
|
} = i, {
|
|
1677
1683
|
dragstart: k,
|
|
1678
|
-
dragenter:
|
|
1679
|
-
dragover:
|
|
1684
|
+
dragenter: V,
|
|
1685
|
+
dragover: R,
|
|
1680
1686
|
dragend: F
|
|
1681
1687
|
} = u, {
|
|
1682
1688
|
removeItem: g
|
|
1683
1689
|
} = f, T = B(() => ({
|
|
1684
1690
|
margin: r.value ? "10px 0" : "10px 0px 10px 14px"
|
|
1685
1691
|
}));
|
|
1686
|
-
function
|
|
1692
|
+
function h(H, L = "") {
|
|
1687
1693
|
const N = H.target;
|
|
1688
|
-
N.title = N.scrollWidth > N.clientWidth ?
|
|
1694
|
+
N.title = N.scrollWidth > N.clientWidth ? L : "";
|
|
1689
1695
|
}
|
|
1690
1696
|
function b(H) {
|
|
1691
1697
|
return n("div", {
|
|
1692
1698
|
style: T.value,
|
|
1693
|
-
onMouseenter: (
|
|
1699
|
+
onMouseenter: (L) => h(L, H.raw[x.value || "name"])
|
|
1694
1700
|
}, [H.raw[x.value || "name"]]);
|
|
1695
1701
|
}
|
|
1696
|
-
function
|
|
1702
|
+
function D() {
|
|
1697
1703
|
return t.slots.itemContent ? t.slots.itemContent : b;
|
|
1698
1704
|
}
|
|
1699
|
-
const j =
|
|
1700
|
-
function $(H,
|
|
1705
|
+
const j = D();
|
|
1706
|
+
function $(H, L, N) {
|
|
1701
1707
|
return n("li", {
|
|
1702
|
-
class: S(H,
|
|
1703
|
-
id: C(H,
|
|
1704
|
-
key: C(H,
|
|
1705
|
-
onClick: (p) =>
|
|
1706
|
-
onMouseenter: (p) => I(p, H,
|
|
1707
|
-
onMouseover: (p) => w(p, H,
|
|
1708
|
-
onMouseout: (p) => v(p, H,
|
|
1708
|
+
class: S(H, L),
|
|
1709
|
+
id: C(H, L),
|
|
1710
|
+
key: C(H, L),
|
|
1711
|
+
onClick: (p) => P(H, L, p),
|
|
1712
|
+
onMouseenter: (p) => I(p, H, L),
|
|
1713
|
+
onMouseover: (p) => w(p, H, L),
|
|
1714
|
+
onMouseout: (p) => v(p, H, L),
|
|
1709
1715
|
draggable: "true",
|
|
1710
|
-
onDragstart: (p) => k(p, H,
|
|
1711
|
-
onDragenter: (p) =>
|
|
1716
|
+
onDragstart: (p) => k(p, H, L),
|
|
1717
|
+
onDragenter: (p) => V(p, L),
|
|
1712
1718
|
onDragend: (p) => F(p, H),
|
|
1713
|
-
onDragover: (p) =>
|
|
1719
|
+
onDragover: (p) => R(p)
|
|
1714
1720
|
}, [r.value && n("div", {
|
|
1715
1721
|
class: "f-list-select",
|
|
1716
1722
|
onClick: (p) => p.stopPropagation()
|
|
1717
1723
|
}, [n(Ke, {
|
|
1718
|
-
id: "list-" + C(H,
|
|
1724
|
+
id: "list-" + C(H, L),
|
|
1719
1725
|
customClass: "listview-checkbox",
|
|
1720
1726
|
disabled: H[m.value],
|
|
1721
1727
|
checked: H.checked,
|
|
1722
1728
|
"onUpdate:checked": (p) => H.checked = p,
|
|
1723
|
-
onChange: (p) =>
|
|
1729
|
+
onChange: (p) => y(H, L, !p.checked)
|
|
1724
1730
|
}, null)]), n("div", {
|
|
1725
1731
|
class: "f-list-content"
|
|
1726
1732
|
}, [j(H)]), e.allowDelete && n("div", {
|
|
1727
1733
|
class: "f-list-remove",
|
|
1728
1734
|
onClick: (p) => {
|
|
1729
|
-
p.stopPropagation(), g(
|
|
1735
|
+
p.stopPropagation(), g(L);
|
|
1730
1736
|
}
|
|
1731
1737
|
}, [n("div", {
|
|
1732
1738
|
class: "f-list-remove-icon"
|
|
@@ -1742,21 +1748,21 @@ function ha(e, t, a, u, l, o, i, s, f, d) {
|
|
|
1742
1748
|
renderItem: $
|
|
1743
1749
|
};
|
|
1744
1750
|
}
|
|
1745
|
-
function
|
|
1751
|
+
function wa(e, t, a, u, l, o, i, s, f, d) {
|
|
1746
1752
|
var C;
|
|
1747
1753
|
const r = c(((C = e.group) == null ? void 0 : C.groupFields) || []), {
|
|
1748
1754
|
collpaseGroupIconClass: m
|
|
1749
1755
|
} = l, {
|
|
1750
1756
|
toggleGroupRow: x
|
|
1751
1757
|
} = d;
|
|
1752
|
-
function I(S,
|
|
1753
|
-
S.stopPropagation(),
|
|
1758
|
+
function I(S, y) {
|
|
1759
|
+
S.stopPropagation(), y.collapse = !y.collapse, a.value = x(y.collapse ? "collapse" : "expand", y, a.value);
|
|
1754
1760
|
}
|
|
1755
|
-
function w(S,
|
|
1761
|
+
function w(S, y, P) {
|
|
1756
1762
|
return t.slots.group ? n(Q, null, [t.slots.content && t.slots.group({
|
|
1757
1763
|
item: S.raw,
|
|
1758
|
-
index:
|
|
1759
|
-
selectedItem:
|
|
1764
|
+
index: y,
|
|
1765
|
+
selectedItem: P
|
|
1760
1766
|
})]) : n("div", {
|
|
1761
1767
|
class: "f-navlookup-recentHeader",
|
|
1762
1768
|
onClick: (k) => I(k, S)
|
|
@@ -1768,14 +1774,14 @@ function ya(e, t, a, u, l, o, i, s, f, d) {
|
|
|
1768
1774
|
class: "f-navlookup-recommandLabel"
|
|
1769
1775
|
}, [S.raw[r.value[S.layer]]])]);
|
|
1770
1776
|
}
|
|
1771
|
-
function v(S,
|
|
1772
|
-
return S.layer > -1 && w(S,
|
|
1777
|
+
function v(S, y, P) {
|
|
1778
|
+
return S.layer > -1 && w(S, y, P);
|
|
1773
1779
|
}
|
|
1774
1780
|
return {
|
|
1775
1781
|
renderItem: v
|
|
1776
1782
|
};
|
|
1777
1783
|
}
|
|
1778
|
-
function
|
|
1784
|
+
function Ca(e, t, a, u) {
|
|
1779
1785
|
const { dataView: l } = a, { updateSelectedItems: o } = u;
|
|
1780
1786
|
function i(s) {
|
|
1781
1787
|
if (s > -1 && s < l.value.length) {
|
|
@@ -1787,8 +1793,8 @@ function ba(e, t, a, u) {
|
|
|
1787
1793
|
}
|
|
1788
1794
|
return { removeItem: i };
|
|
1789
1795
|
}
|
|
1790
|
-
function
|
|
1791
|
-
const r = c(e.view), m = c(e.view === "CardView"), x = c({}), I =
|
|
1796
|
+
function Sa(e, t, a, u, l, o, i, s, f, d) {
|
|
1797
|
+
const r = c(e.view), m = c(e.view === "CardView"), x = c({}), I = Ca(e, t, u, f), w = B(() => ({
|
|
1792
1798
|
"f-list-view-group": !0,
|
|
1793
1799
|
"f-list-view-group-multiselect": e.multiSelect,
|
|
1794
1800
|
"d-flex": m.value,
|
|
@@ -1796,15 +1802,15 @@ function wa(e, t, a, u, l, o, i, s, f, d) {
|
|
|
1796
1802
|
})), v = B(() => !!a.value && a.value.length > 0), C = B(() => a.value.length === 0);
|
|
1797
1803
|
B(() => C.value && !t.slots.empty);
|
|
1798
1804
|
function S() {
|
|
1799
|
-
return r.value === "SingleView" ?
|
|
1805
|
+
return r.value === "SingleView" ? ct : r.value === "DraggableView" ? ba : (r.value === "ContentView" || r.value === "CardView") && (e.contentTemplate || t.slots.content) ? ya : ct;
|
|
1800
1806
|
}
|
|
1801
|
-
const
|
|
1802
|
-
renderItem:
|
|
1803
|
-
} =
|
|
1807
|
+
const y = S(), {
|
|
1808
|
+
renderItem: P
|
|
1809
|
+
} = y(e, t, a, d, l, o, f, i, I, s), {
|
|
1804
1810
|
renderItem: k
|
|
1805
|
-
} =
|
|
1806
|
-
function
|
|
1807
|
-
return a.value.filter((T) => T.visible !== !1).map((T,
|
|
1811
|
+
} = wa(e, t, a, d, l, o, f, i, I, s), V = [P, k];
|
|
1812
|
+
function R() {
|
|
1813
|
+
return a.value.filter((T) => T.visible !== !1).map((T, h) => V[T.type](T, h, x));
|
|
1808
1814
|
}
|
|
1809
1815
|
function F() {
|
|
1810
1816
|
return n("div", {
|
|
@@ -1818,13 +1824,13 @@ function wa(e, t, a, u, l, o, i, s, f, d) {
|
|
|
1818
1824
|
return n("ul", {
|
|
1819
1825
|
class: w.value,
|
|
1820
1826
|
style: "list-style: none;"
|
|
1821
|
-
}, [v.value &&
|
|
1827
|
+
}, [v.value && R(), C.value && F()]);
|
|
1822
1828
|
}
|
|
1823
1829
|
return {
|
|
1824
1830
|
renderListArea: g
|
|
1825
1831
|
};
|
|
1826
1832
|
}
|
|
1827
|
-
function
|
|
1833
|
+
function xa(e, t, a, u, l) {
|
|
1828
1834
|
const {
|
|
1829
1835
|
showSelectAll: o,
|
|
1830
1836
|
selectAll: i,
|
|
@@ -1846,7 +1852,7 @@ function Ca(e, t, a, u, l) {
|
|
|
1846
1852
|
class: m.value
|
|
1847
1853
|
}, [n("div", {
|
|
1848
1854
|
class: "f-list-select"
|
|
1849
|
-
}, [n(
|
|
1855
|
+
}, [n(St, {
|
|
1850
1856
|
customClass: "listview-checkbox float-left",
|
|
1851
1857
|
modelValue: f.value,
|
|
1852
1858
|
indeterminate: d.value,
|
|
@@ -1857,7 +1863,7 @@ function Ca(e, t, a, u, l) {
|
|
|
1857
1863
|
renderHeader: x
|
|
1858
1864
|
};
|
|
1859
1865
|
}
|
|
1860
|
-
function
|
|
1866
|
+
function rt(e, t, a, u, l) {
|
|
1861
1867
|
const o = c(e.headerClass), i = c(e.placeholder), s = c(""), f = B(() => !s.value), d = B(() => !!s.value), {
|
|
1862
1868
|
showSelectAll: r,
|
|
1863
1869
|
selectAll: m,
|
|
@@ -1865,28 +1871,28 @@ function ct(e, t, a, u, l) {
|
|
|
1865
1871
|
selectAllStatus: I,
|
|
1866
1872
|
indeterminateStatus: w
|
|
1867
1873
|
} = u, v = B(() => "f-list-view-group-item f-combo-list-item f-un-select");
|
|
1868
|
-
function C(
|
|
1874
|
+
function C(V) {
|
|
1869
1875
|
s.value = "";
|
|
1870
1876
|
}
|
|
1871
|
-
function S(
|
|
1872
|
-
|
|
1877
|
+
function S(V) {
|
|
1878
|
+
V ? m() : x();
|
|
1873
1879
|
}
|
|
1874
|
-
A(s, (
|
|
1875
|
-
e.enableHighlightSearch && a.search(
|
|
1880
|
+
A(s, (V) => {
|
|
1881
|
+
e.enableHighlightSearch && a.search(V), t.emit("afterSearch", V);
|
|
1876
1882
|
});
|
|
1877
|
-
const
|
|
1878
|
-
const
|
|
1883
|
+
const y = B(() => {
|
|
1884
|
+
const V = {
|
|
1879
1885
|
"form-group": !0,
|
|
1880
1886
|
"farris-form-group": !0
|
|
1881
1887
|
};
|
|
1882
|
-
return o.value && o.value.split(" ").reduce((F, g) => (F[g] = !0, F),
|
|
1888
|
+
return o.value && o.value.split(" ").reduce((F, g) => (F[g] = !0, F), V), V;
|
|
1883
1889
|
});
|
|
1884
|
-
function
|
|
1890
|
+
function P(V) {
|
|
1885
1891
|
}
|
|
1886
1892
|
function k() {
|
|
1887
1893
|
return n("div", {
|
|
1888
1894
|
class: "f-list-view-header",
|
|
1889
|
-
onClick:
|
|
1895
|
+
onClick: en(() => P, ["prevent", "stop"])
|
|
1890
1896
|
}, [r.value && l.dataView.value.length > 0 && n("ul", {
|
|
1891
1897
|
class: "f-list-view-group f-list-view-group-multiselect",
|
|
1892
1898
|
style: "list-style: none;"
|
|
@@ -1894,13 +1900,13 @@ function ct(e, t, a, u, l) {
|
|
|
1894
1900
|
class: v.value
|
|
1895
1901
|
}, [n("div", {
|
|
1896
1902
|
class: "f-list-select"
|
|
1897
|
-
}, [n(
|
|
1903
|
+
}, [n(St, {
|
|
1898
1904
|
customClass: "listview-checkbox float-left",
|
|
1899
1905
|
modelValue: I.value,
|
|
1900
1906
|
indeterminate: w.value,
|
|
1901
|
-
"onUpdate:modelValue": (
|
|
1907
|
+
"onUpdate:modelValue": (V) => S(V)
|
|
1902
1908
|
}, null)])])]), n("div", {
|
|
1903
|
-
class:
|
|
1909
|
+
class: y.value
|
|
1904
1910
|
}, [n("div", {
|
|
1905
1911
|
class: "farris-input-wrap"
|
|
1906
1912
|
}, [n("div", {
|
|
@@ -1909,16 +1915,16 @@ function ct(e, t, a, u, l) {
|
|
|
1909
1915
|
class: "input-group f-state-editable"
|
|
1910
1916
|
}, [Ne(n("input", {
|
|
1911
1917
|
class: "form-control f-utils-fill text-left",
|
|
1912
|
-
"onUpdate:modelValue": (
|
|
1918
|
+
"onUpdate:modelValue": (V) => s.value = V,
|
|
1913
1919
|
name: "input-group-value",
|
|
1914
1920
|
type: "text",
|
|
1915
1921
|
placeholder: i.value,
|
|
1916
1922
|
autocomplete: "off"
|
|
1917
|
-
}, null), [[
|
|
1923
|
+
}, null), [[vt, s.value]]), n("div", {
|
|
1918
1924
|
class: "input-group-append"
|
|
1919
1925
|
}, [d.value && n("span", {
|
|
1920
1926
|
class: "input-group-text input-group-clear",
|
|
1921
|
-
onClick: (
|
|
1927
|
+
onClick: (V) => C()
|
|
1922
1928
|
}, [n("i", {
|
|
1923
1929
|
class: "f-icon f-icon-close-circle"
|
|
1924
1930
|
}, null)]), f.value && n("span", {
|
|
@@ -1931,7 +1937,7 @@ function ct(e, t, a, u, l) {
|
|
|
1931
1937
|
renderHeader: k
|
|
1932
1938
|
};
|
|
1933
1939
|
}
|
|
1934
|
-
function
|
|
1940
|
+
function Ia() {
|
|
1935
1941
|
const e = c(""), t = c(-1), a = c(""), u = c(-1), l = c(!1);
|
|
1936
1942
|
function o(m, x, I) {
|
|
1937
1943
|
u.value = I;
|
|
@@ -1963,42 +1969,42 @@ function Sa() {
|
|
|
1963
1969
|
suspendHover: f
|
|
1964
1970
|
};
|
|
1965
1971
|
}
|
|
1966
|
-
function
|
|
1972
|
+
function Ta(e, t, a, u, l) {
|
|
1967
1973
|
const o = c(e.idField), { dataView: i } = a, s = c(-1), f = c(!1), { activeIndex: d, focusedItemId: r, hoverIndex: m, resumeHover: x, suspendHover: I } = u;
|
|
1968
|
-
let w, v = 0, C = 0, S = null,
|
|
1969
|
-
const
|
|
1970
|
-
function
|
|
1974
|
+
let w, v = 0, C = 0, S = null, y = null;
|
|
1975
|
+
const P = 10, k = 50;
|
|
1976
|
+
function V(H) {
|
|
1971
1977
|
if (!H)
|
|
1972
1978
|
return null;
|
|
1973
|
-
const { overflowY:
|
|
1974
|
-
return
|
|
1979
|
+
const { overflowY: L } = getComputedStyle(H);
|
|
1980
|
+
return L === "auto" || L === "scroll" ? H : V(H.parentElement);
|
|
1975
1981
|
}
|
|
1976
|
-
function
|
|
1977
|
-
|
|
1978
|
-
|
|
1982
|
+
function R(H, L) {
|
|
1983
|
+
y && clearInterval(y), y = window.setInterval(() => {
|
|
1984
|
+
L === "up" ? H.scrollTop -= P : H.scrollTop += P;
|
|
1979
1985
|
}, 16);
|
|
1980
1986
|
}
|
|
1981
1987
|
function F() {
|
|
1982
|
-
|
|
1988
|
+
y && (clearInterval(y), y = null);
|
|
1983
1989
|
}
|
|
1984
1990
|
function g(H) {
|
|
1985
|
-
const
|
|
1986
|
-
if (S || (S =
|
|
1991
|
+
const L = H.target;
|
|
1992
|
+
if (S || (S = V(L)), !S) {
|
|
1987
1993
|
F();
|
|
1988
1994
|
return;
|
|
1989
1995
|
}
|
|
1990
|
-
const N = S.getBoundingClientRect(), p = H.clientY, O = p - N.top,
|
|
1991
|
-
O < k && S.scrollTop > 0 ?
|
|
1996
|
+
const N = S.getBoundingClientRect(), p = H.clientY, O = p - N.top, E = N.bottom - p;
|
|
1997
|
+
O < k && S.scrollTop > 0 ? R(S, "up") : E < k && S.scrollTop < S.scrollHeight - S.clientHeight ? R(S, "down") : F();
|
|
1992
1998
|
}
|
|
1993
|
-
function T(H,
|
|
1994
|
-
const N = H - v, p =
|
|
1995
|
-
w.style.left = parseInt(w.style.left) + N + "px", w.style.top = parseInt(w.style.top) + p + "px", v = H, C =
|
|
1999
|
+
function T(H, L) {
|
|
2000
|
+
const N = H - v, p = L - C;
|
|
2001
|
+
w.style.left = parseInt(w.style.left) + N + "px", w.style.top = parseInt(w.style.top) + p + "px", v = H, C = L;
|
|
1996
2002
|
}
|
|
1997
|
-
function
|
|
1998
|
-
const { left:
|
|
2003
|
+
function h(H) {
|
|
2004
|
+
const { left: L, top: N } = H.getBoundingClientRect(), p = H.cloneNode(!0);
|
|
1999
2005
|
return p.className = p.className + " f-listview-drag-moving", p.style.cssText = `
|
|
2000
2006
|
position:absolute;
|
|
2001
|
-
left:${
|
|
2007
|
+
left:${L}px;
|
|
2002
2008
|
top:${document.documentElement.scrollTop ? N + document.documentElement.scrollTop : N}px;
|
|
2003
2009
|
z-index: 999999;
|
|
2004
2010
|
pointer-events: none;
|
|
@@ -2015,204 +2021,204 @@ function xa(e, t, a, u, l) {
|
|
|
2015
2021
|
overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
|
|
2016
2022
|
`, p.children[1].style.cssText = "flex:1 1 auto; width:100%", p.children[2].style.cssText = "padding: 0 14px 0 0", p.children[2].children[0].style.cssText = "display: initial", document.body.appendChild(p), p;
|
|
2017
2023
|
}
|
|
2018
|
-
function b(H,
|
|
2019
|
-
if (H.stopPropagation(), I(),
|
|
2020
|
-
if (w =
|
|
2024
|
+
function b(H, L, N) {
|
|
2025
|
+
if (H.stopPropagation(), I(), L) {
|
|
2026
|
+
if (w = h(H.target), H.dataTransfer) {
|
|
2021
2027
|
const p = new Image();
|
|
2022
2028
|
p.src = "", H.dataTransfer.setDragImage(p, 0, 0);
|
|
2023
2029
|
}
|
|
2024
2030
|
v = H.pageX, C = H.pageY, setTimeout(() => {
|
|
2025
|
-
s.value = N, f.value = !0,
|
|
2031
|
+
s.value = N, f.value = !0, L.moving = !0;
|
|
2026
2032
|
});
|
|
2027
2033
|
}
|
|
2028
2034
|
}
|
|
2029
|
-
function
|
|
2030
|
-
if (H.preventDefault(), s.value !==
|
|
2035
|
+
function D(H, L) {
|
|
2036
|
+
if (H.preventDefault(), s.value !== L && s.value !== -1) {
|
|
2031
2037
|
const N = i.value[s.value], p = l.value[s.value];
|
|
2032
|
-
N && p && (i.value.splice(s.value, 1), i.value.splice(
|
|
2033
|
-
O.index =
|
|
2034
|
-
}), s.value =
|
|
2038
|
+
N && p && (i.value.splice(s.value, 1), i.value.splice(L, 0, N), l.value.splice(s.value, 1), l.value.splice(L, 0, p), l.value.forEach((O, E) => {
|
|
2039
|
+
O.index = E, O.raw.__fv_index__ = E;
|
|
2040
|
+
}), s.value = L, T(H.pageX, H.pageY));
|
|
2035
2041
|
}
|
|
2036
2042
|
}
|
|
2037
2043
|
function j(H) {
|
|
2038
2044
|
H.preventDefault(), H.dataTransfer && (H.dataTransfer.dropEffect = "move"), T(H.pageX, H.pageY), g(H);
|
|
2039
2045
|
}
|
|
2040
|
-
function $(H,
|
|
2046
|
+
function $(H, L) {
|
|
2041
2047
|
var p, O;
|
|
2042
|
-
F(), S = null,
|
|
2043
|
-
|
|
2044
|
-
}), l.value.forEach((
|
|
2045
|
-
|
|
2048
|
+
F(), S = null, L && (L.moving = !1, w && (document.body.removeChild(w), w = null)), i.value.forEach((E, W) => {
|
|
2049
|
+
E.__fv_index__ = W;
|
|
2050
|
+
}), l.value.forEach((E, W) => {
|
|
2051
|
+
E.index = W, E.raw && (E.raw.__fv_index__ = W);
|
|
2046
2052
|
}), f.value = !1, x();
|
|
2047
|
-
const N = ((p =
|
|
2048
|
-
m.value = N, d.value = N, r.value = (O =
|
|
2053
|
+
const N = ((p = L.raw) == null ? void 0 : p.__fv_index__) ?? 0;
|
|
2054
|
+
m.value = N, d.value = N, r.value = (O = L.raw) == null ? void 0 : O[o.value], t.emit("change", i.value), t.emit("activeChange", [L.raw]);
|
|
2049
2055
|
}
|
|
2050
2056
|
return {
|
|
2051
2057
|
dragstart: b,
|
|
2052
|
-
dragenter:
|
|
2058
|
+
dragenter: D,
|
|
2053
2059
|
dragover: j,
|
|
2054
2060
|
dragend: $,
|
|
2055
2061
|
isDragging: f
|
|
2056
2062
|
};
|
|
2057
2063
|
}
|
|
2058
|
-
function
|
|
2064
|
+
function Ba(e, t, a, u, l, o) {
|
|
2059
2065
|
var $, H;
|
|
2060
2066
|
const i = c(e.idField), s = c(e.disableField), f = c(e.draggable);
|
|
2061
2067
|
c(e.itemClass);
|
|
2062
|
-
const d = c((($ = e.selection) == null ? void 0 : $.multiSelect) ?? !1), r = c(((H = e.selection) == null ? void 0 : H.multiSelectMode) || "DependOnCheck"), { isDragging: m } = u, { activeIndex: x, focusedItemId: I, hoverIndex: w } = l, { clearSelection: v, getSelectedItems: C, toggleSelectItem: S, currentSelectedDataId:
|
|
2068
|
+
const d = c((($ = e.selection) == null ? void 0 : $.multiSelect) ?? !1), r = c(((H = e.selection) == null ? void 0 : H.multiSelectMode) || "DependOnCheck"), { isDragging: m } = u, { activeIndex: x, focusedItemId: I, hoverIndex: w } = l, { clearSelection: v, getSelectedItems: C, toggleSelectItem: S, currentSelectedDataId: y, multiSelectOnlyOnCheck: P } = o, k = c(C()), V = (L) => k.value.length === 0 ? !1 : k.value.some((N) => {
|
|
2063
2069
|
let p = "";
|
|
2064
|
-
return N.data ? p = N.data[i.value] : p = N[i.value], p ===
|
|
2070
|
+
return N.data ? p = N.data[i.value] : p = N[i.value], p === L;
|
|
2065
2071
|
});
|
|
2066
|
-
function
|
|
2072
|
+
function R() {
|
|
2067
2073
|
k.value = C();
|
|
2068
2074
|
}
|
|
2069
|
-
function F(
|
|
2070
|
-
return
|
|
2075
|
+
function F(L, N) {
|
|
2076
|
+
return L.raw[i.value] != null ? L.raw[i.value] + "_" + N : "";
|
|
2071
2077
|
}
|
|
2072
|
-
function g(
|
|
2078
|
+
function g(L, N) {
|
|
2073
2079
|
const p = {
|
|
2074
2080
|
"f-list-view-group-item": !0,
|
|
2075
2081
|
"f-list-view-draggable-item": f.value,
|
|
2076
|
-
"f-un-click": !
|
|
2077
|
-
"f-un-select": !!
|
|
2082
|
+
"f-un-click": !L.checked,
|
|
2083
|
+
"f-un-select": !!L.raw[s.value],
|
|
2078
2084
|
"f-listview-active": (
|
|
2079
2085
|
// 多选
|
|
2080
|
-
d.value &&
|
|
2081
|
-
!d.value &&
|
|
2086
|
+
d.value && V(F(L, N)) && e.showActiveWhenMultiSelect || // 单选
|
|
2087
|
+
!d.value && L.raw[i.value] === y.value || d.value && !e.showActiveWhenMultiSelect && L.raw[i.value] === y.value
|
|
2082
2088
|
),
|
|
2083
2089
|
"f-listview-hover": !m.value && N === w.value,
|
|
2084
|
-
moving: !!
|
|
2090
|
+
moving: !!L.moving
|
|
2085
2091
|
};
|
|
2086
2092
|
if (typeof e.itemClass == "string")
|
|
2087
|
-
return
|
|
2093
|
+
return Ee(p, e.itemClass);
|
|
2088
2094
|
if (typeof e.itemClass == "function") {
|
|
2089
|
-
const O = e.itemClass(
|
|
2090
|
-
return
|
|
2095
|
+
const O = e.itemClass(L);
|
|
2096
|
+
return Ee(p, O);
|
|
2091
2097
|
}
|
|
2092
2098
|
return p;
|
|
2093
2099
|
}
|
|
2094
|
-
function T(
|
|
2100
|
+
function T(L, N) {
|
|
2095
2101
|
const p = {};
|
|
2096
2102
|
if (typeof e.itemStyle == "string")
|
|
2097
2103
|
return lt(p, e.itemStyle);
|
|
2098
2104
|
if (typeof e.itemStyle == "function") {
|
|
2099
|
-
const O = e.itemStyle(
|
|
2105
|
+
const O = e.itemStyle(L);
|
|
2100
2106
|
return lt(p, O);
|
|
2101
2107
|
}
|
|
2102
2108
|
return p;
|
|
2103
2109
|
}
|
|
2104
|
-
const
|
|
2105
|
-
function b(
|
|
2106
|
-
|
|
2110
|
+
const h = B(() => !d.value);
|
|
2111
|
+
function b(L, N, p) {
|
|
2112
|
+
L.checked = p, !L.raw[s.value] && (h.value && (I.value = L.raw[i.value]), S(L));
|
|
2107
2113
|
}
|
|
2108
|
-
const
|
|
2109
|
-
function j(
|
|
2110
|
-
if (
|
|
2114
|
+
const D = B(() => !d.value || d.value && r.value === "OnCheckAndClick");
|
|
2115
|
+
function j(L, N, p) {
|
|
2116
|
+
if (L.raw[s.value]) {
|
|
2111
2117
|
p == null || p.preventDefault(), p == null || p.stopPropagation();
|
|
2112
2118
|
return;
|
|
2113
2119
|
}
|
|
2114
|
-
|
|
2120
|
+
y.value = L.raw[i.value], I.value = L.raw[i.value], x.value = N, D.value && (S(L), R()), t.emit("clickItem", { data: k.value, index: N, dataItem: L.raw }), t.emit("activeChange", k.value);
|
|
2115
2121
|
}
|
|
2116
2122
|
return {
|
|
2117
2123
|
getKey: F,
|
|
2118
2124
|
selectedItems: k,
|
|
2119
2125
|
listViewItemClass: g,
|
|
2120
2126
|
listViewItemStyle: T,
|
|
2121
|
-
updateSelectedItems:
|
|
2127
|
+
updateSelectedItems: R,
|
|
2122
2128
|
onCheckItem: b,
|
|
2123
2129
|
onClickItem: j
|
|
2124
2130
|
};
|
|
2125
2131
|
}
|
|
2126
|
-
const
|
|
2132
|
+
const re = /* @__PURE__ */ Y({
|
|
2127
2133
|
name: "FListView",
|
|
2128
|
-
props:
|
|
2134
|
+
props: Bt,
|
|
2129
2135
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectItem", "unSelectItem", "selectionChange", "removeItem", "change", "activeChange", "pageIndexChanged", "pageSizeChanged", "changed", "selectionUpdate"],
|
|
2130
2136
|
setup(e, t) {
|
|
2131
|
-
var
|
|
2132
|
-
const a = c(!1), u = c(), l = c(!0), o = c(((
|
|
2137
|
+
var be;
|
|
2138
|
+
const a = c(!1), u = c(), l = c(!0), o = c(((be = e.rowOption) == null ? void 0 : be.rowHeight) || 28), i = c(!1), s = c([]), f = 0, d = c(e.columns), r = hn(e, t), m = yn(e), x = bn(e), I = wn(e, m), w = Cn(e, /* @__PURE__ */ new Map(), r, x, m), v = Sn(e, w, m, s, t), C = ha(e, u), S = xn(e, w), y = B(() => w.dataView.value.length), P = In(e, t, v, m), k = Tn(e, t, m, P, s), V = Bn(e, w, o), R = kn(e, k, V), F = Fn(e, w, k, x, m, V, R, o), g = Mn(e, m, R, F), T = On(e, m, R, F), h = Pn(e, d, w, y, f, F, g, T), {
|
|
2133
2139
|
getVisualData: b
|
|
2134
|
-
} =
|
|
2135
|
-
s.value = b(0,
|
|
2136
|
-
const
|
|
2140
|
+
} = h;
|
|
2141
|
+
s.value = b(0, y.value + f - 1);
|
|
2142
|
+
const D = B(() => {
|
|
2137
2143
|
const _ = {
|
|
2138
2144
|
"f-list-view": !0,
|
|
2139
2145
|
"f-list-view-multiple": e.multiSelect
|
|
2140
2146
|
};
|
|
2141
|
-
return e.size !== "default" && (_[`${e.size}-item`] = !0),
|
|
2147
|
+
return e.size !== "default" && (_[`${e.size}-item`] = !0), Ee(_, e.customClass);
|
|
2142
2148
|
}), j = B(() => !!t.slots.footer || l.value);
|
|
2143
2149
|
function $() {
|
|
2144
|
-
return e.header === "SearchBar" ?
|
|
2150
|
+
return e.header === "SearchBar" ? rt : e.header === "ContentHeader" ? xa : rt;
|
|
2145
2151
|
}
|
|
2146
2152
|
const H = $(), {
|
|
2147
|
-
renderHeader:
|
|
2148
|
-
} = H(e, t, C, v, w), N =
|
|
2149
|
-
renderListArea:
|
|
2150
|
-
} =
|
|
2153
|
+
renderHeader: L
|
|
2154
|
+
} = H(e, t, C, v, w), N = Ia(), p = Ta(e, t, w, N, s), O = Ba(e, t, s, p, N, v), {
|
|
2155
|
+
renderListArea: E
|
|
2156
|
+
} = Sa(e, t, s, w, I, N, v, h, O, p);
|
|
2151
2157
|
function W(_) {
|
|
2152
2158
|
C.search(_);
|
|
2153
2159
|
}
|
|
2154
2160
|
function U(_) {
|
|
2155
|
-
_ && (w.load(_), s.value = b(0,
|
|
2161
|
+
_ && (w.load(_), s.value = b(0, y.value + f - 1));
|
|
2156
2162
|
}
|
|
2157
|
-
function
|
|
2163
|
+
function de() {
|
|
2158
2164
|
v.clearSelection(), N.clearActiveItem();
|
|
2159
2165
|
}
|
|
2160
|
-
function
|
|
2166
|
+
function se() {
|
|
2161
2167
|
return O.selectedItems.value;
|
|
2162
2168
|
}
|
|
2163
2169
|
function Ie() {
|
|
2164
2170
|
return O.selectedItems.value.map((_) => _[m.idField.value]);
|
|
2165
2171
|
}
|
|
2166
|
-
function
|
|
2172
|
+
function ye(_) {
|
|
2167
2173
|
v.selectedValues.value = _, O.updateSelectedItems();
|
|
2168
2174
|
}
|
|
2169
2175
|
function Te() {
|
|
2170
2176
|
return v.currentSelectedDataId.value;
|
|
2171
2177
|
}
|
|
2172
2178
|
function Be(_) {
|
|
2173
|
-
|
|
2179
|
+
P.activeRowById(_);
|
|
2174
2180
|
}
|
|
2175
|
-
function
|
|
2176
|
-
const
|
|
2177
|
-
|
|
2181
|
+
function fe(_) {
|
|
2182
|
+
const oe = m.idField.value, ve = s.value.find((Oe) => Oe.raw[oe] === _), we = s.value.findIndex((Oe) => Oe.raw[oe] === _);
|
|
2183
|
+
ve && we > -1 && O.onClickItem(ve, we);
|
|
2178
2184
|
}
|
|
2179
2185
|
function ke(_) {
|
|
2180
|
-
const
|
|
2181
|
-
|
|
2186
|
+
const oe = m.idField.value, ve = s.value.find((we) => we.raw[oe] === _);
|
|
2187
|
+
ve && P.changeRow(ve);
|
|
2182
2188
|
}
|
|
2183
2189
|
function Fe(_) {
|
|
2184
2190
|
S.updatePagination(_);
|
|
2185
2191
|
}
|
|
2186
2192
|
function G(_) {
|
|
2187
|
-
return s.value.filter((
|
|
2193
|
+
return s.value.filter((oe) => _.includes(oe.raw[e.idField]));
|
|
2188
2194
|
}
|
|
2189
2195
|
t.expose({
|
|
2190
2196
|
search: W,
|
|
2191
2197
|
updateDataSource: U,
|
|
2192
|
-
clearSelection:
|
|
2193
|
-
getSelections:
|
|
2194
|
-
updateSelectionByIds:
|
|
2198
|
+
clearSelection: de,
|
|
2199
|
+
getSelections: se,
|
|
2200
|
+
updateSelectionByIds: ye,
|
|
2195
2201
|
getSelectionIds: Ie,
|
|
2196
2202
|
activeRowById: Be,
|
|
2197
2203
|
getCurrentRowId: Te,
|
|
2198
|
-
clickRowItemById:
|
|
2204
|
+
clickRowItemById: fe,
|
|
2199
2205
|
updatePagination: Fe,
|
|
2200
2206
|
getVisibleDataByIds: G,
|
|
2201
2207
|
selectRowById: ke
|
|
2202
|
-
}), A(() => e.selectionValues, (_,
|
|
2203
|
-
_ !==
|
|
2208
|
+
}), A(() => e.selectionValues, (_, oe) => {
|
|
2209
|
+
_ !== oe && ye(_);
|
|
2204
2210
|
});
|
|
2205
|
-
const ee =
|
|
2206
|
-
sidebarWidth:
|
|
2211
|
+
const ee = Vn(e, v), {
|
|
2212
|
+
sidebarWidth: ie,
|
|
2207
2213
|
showSidebarCheckBox: Me
|
|
2208
|
-
} = ee, $e =
|
|
2214
|
+
} = ee, $e = Rn(e, t), {
|
|
2209
2215
|
applyColumnSorter: Ve,
|
|
2210
2216
|
columnContext: We,
|
|
2211
2217
|
updateColumnRenderContext: tt
|
|
2212
2218
|
} = $e;
|
|
2213
|
-
return
|
|
2214
|
-
class:
|
|
2215
|
-
}, [
|
|
2219
|
+
return Ln(e, w, s, We, h, y, f, ie, o, a, k), () => n("div", {
|
|
2220
|
+
class: D.value
|
|
2221
|
+
}, [L(), n("div", {
|
|
2216
2222
|
ref: u,
|
|
2217
2223
|
class: "f-list-view-content",
|
|
2218
2224
|
onMouseover: () => {
|
|
@@ -2221,13 +2227,13 @@ const ce = /* @__PURE__ */ Y({
|
|
|
2221
2227
|
onMouseleave: () => {
|
|
2222
2228
|
i.value && (i.value = !1);
|
|
2223
2229
|
}
|
|
2224
|
-
}, [
|
|
2230
|
+
}, [E()]), j.value && n("div", {
|
|
2225
2231
|
class: "f-list-view-footer"
|
|
2226
2232
|
}, [e.footerTemplate ? e.footerTemplate() : t.slots.footer && t.slots.footer()])]);
|
|
2227
2233
|
}
|
|
2228
|
-
}),
|
|
2234
|
+
}), dt = /* @__PURE__ */ Y({
|
|
2229
2235
|
name: "FListViewTable",
|
|
2230
|
-
props:
|
|
2236
|
+
props: Bt,
|
|
2231
2237
|
emits: ["outputValue", "currentEvent", "selectionChanged"],
|
|
2232
2238
|
setup(e, t) {
|
|
2233
2239
|
const a = [{
|
|
@@ -2300,12 +2306,12 @@ const ce = /* @__PURE__ */ Y({
|
|
|
2300
2306
|
};
|
|
2301
2307
|
}
|
|
2302
2308
|
});
|
|
2303
|
-
|
|
2304
|
-
e.component(
|
|
2309
|
+
re.install = (e) => {
|
|
2310
|
+
e.component(re.name, re), e.component(dt.name, dt);
|
|
2305
2311
|
};
|
|
2306
|
-
const
|
|
2307
|
-
["appearance",
|
|
2308
|
-
]),
|
|
2312
|
+
const ka = /* @__PURE__ */ new Map([
|
|
2313
|
+
["appearance", wt]
|
|
2314
|
+
]), Fa = "https://json-schema.org/draft/2020-12/schema", Ma = "https://farris-design.gitee.io/pagination.schema.json", Oa = "pagination", Pa = "A Farris Component", Va = "object", Ra = {
|
|
2309
2315
|
id: {
|
|
2310
2316
|
description: "The unique identifier for a pagination",
|
|
2311
2317
|
type: "string"
|
|
@@ -2397,18 +2403,18 @@ const Ta = /* @__PURE__ */ new Map([
|
|
|
2397
2403
|
type: "string",
|
|
2398
2404
|
default: ""
|
|
2399
2405
|
}
|
|
2400
|
-
},
|
|
2406
|
+
}, La = [
|
|
2401
2407
|
"id",
|
|
2402
2408
|
"type"
|
|
2403
|
-
],
|
|
2404
|
-
$schema:
|
|
2405
|
-
$id:
|
|
2406
|
-
title:
|
|
2407
|
-
description:
|
|
2408
|
-
type:
|
|
2409
|
-
properties:
|
|
2410
|
-
required:
|
|
2411
|
-
},
|
|
2409
|
+
], Ha = {
|
|
2410
|
+
$schema: Fa,
|
|
2411
|
+
$id: Ma,
|
|
2412
|
+
title: Oa,
|
|
2413
|
+
description: Pa,
|
|
2414
|
+
type: Va,
|
|
2415
|
+
properties: Ra,
|
|
2416
|
+
required: La
|
|
2417
|
+
}, Da = "pagination", Ea = "A Farris Component", ja = "object", Na = {
|
|
2412
2418
|
basic: {
|
|
2413
2419
|
description: "Basic Infomation",
|
|
2414
2420
|
title: "基本信息",
|
|
@@ -2490,13 +2496,13 @@ const Ta = /* @__PURE__ */ new Map([
|
|
|
2490
2496
|
}
|
|
2491
2497
|
}
|
|
2492
2498
|
}
|
|
2493
|
-
},
|
|
2494
|
-
title:
|
|
2495
|
-
description:
|
|
2496
|
-
type:
|
|
2497
|
-
categories:
|
|
2499
|
+
}, Aa = {
|
|
2500
|
+
title: Da,
|
|
2501
|
+
description: Ea,
|
|
2502
|
+
type: ja,
|
|
2503
|
+
categories: Na
|
|
2498
2504
|
};
|
|
2499
|
-
function
|
|
2505
|
+
function za(e, t, a) {
|
|
2500
2506
|
return t;
|
|
2501
2507
|
}
|
|
2502
2508
|
const et = {
|
|
@@ -2548,8 +2554,8 @@ const et = {
|
|
|
2548
2554
|
* 是否展示分页汇总信息
|
|
2549
2555
|
*/
|
|
2550
2556
|
showPageInfo: { type: Boolean, default: !1 }
|
|
2551
|
-
},
|
|
2552
|
-
function
|
|
2557
|
+
}, kt = Xe(et, Ha, ka, za, Aa);
|
|
2558
|
+
function Ft(e, t, a, u) {
|
|
2553
2559
|
B(() => Z.getLocaleValue("pagination.goto.prefix"));
|
|
2554
2560
|
const l = c(""), o = c(e.value);
|
|
2555
2561
|
A(e, (r) => {
|
|
@@ -2591,7 +2597,7 @@ function Bt(e, t, a, u) {
|
|
|
2591
2597
|
renderGotoButton: d
|
|
2592
2598
|
};
|
|
2593
2599
|
}
|
|
2594
|
-
function
|
|
2600
|
+
function Mt(e, t, a, u, l) {
|
|
2595
2601
|
const o = B(() => ({
|
|
2596
2602
|
"page-item": !0,
|
|
2597
2603
|
disabled: t.value
|
|
@@ -2649,7 +2655,7 @@ function kt(e, t, a, u, l) {
|
|
|
2649
2655
|
renderNextPage: f
|
|
2650
2656
|
};
|
|
2651
2657
|
}
|
|
2652
|
-
function
|
|
2658
|
+
function Ot(e, t) {
|
|
2653
2659
|
const a = B(() => Z.getLocaleValue("pagination.totalInfo.firstText")), u = B(() => Z.getLocaleValue("pagination.totalInfo.lastText")), l = B(() => ({
|
|
2654
2660
|
"pagination-message": !0,
|
|
2655
2661
|
"text-truncate": !0,
|
|
@@ -2674,7 +2680,7 @@ function Ft(e, t) {
|
|
|
2674
2680
|
renderPageInfo: o
|
|
2675
2681
|
};
|
|
2676
2682
|
}
|
|
2677
|
-
function
|
|
2683
|
+
function Pt(e, t, a, u, l) {
|
|
2678
2684
|
const o = c(!1), i = c(), s = c(), f = B(() => Z.getLocaleValue("pagination.show")), d = B(() => Z.getLocaleValue("pagination.totalInfo.lastText")), r = B(() => ({
|
|
2679
2685
|
dropup: !0,
|
|
2680
2686
|
"dropdown-right": !0,
|
|
@@ -2705,13 +2711,13 @@ function Mt(e, t, a, u, l) {
|
|
|
2705
2711
|
o.value = !1, i.value && i.value.hide(), x = null;
|
|
2706
2712
|
}, 200);
|
|
2707
2713
|
}
|
|
2708
|
-
function S(k,
|
|
2709
|
-
const g = k *
|
|
2710
|
-
return Math.ceil(g /
|
|
2714
|
+
function S(k, V, R) {
|
|
2715
|
+
const g = k * V - V + 1;
|
|
2716
|
+
return Math.ceil(g / R);
|
|
2711
2717
|
}
|
|
2712
|
-
function
|
|
2713
|
-
const
|
|
2714
|
-
e.value = S(e.value, t.value,
|
|
2718
|
+
function y(k, V) {
|
|
2719
|
+
const R = e.value;
|
|
2720
|
+
e.value = S(e.value, t.value, V), R !== e.value && l.emit("update:currentPage", e.value), t.value = V, o.value = !1, i.value && i.value.hide(), l.emit("update:pageSize", t.value), l.emit("changed", {
|
|
2715
2721
|
pageIndex: e.value,
|
|
2716
2722
|
pageSize: t.value
|
|
2717
2723
|
}), l.emit("pageSizeChanged", {
|
|
@@ -2719,7 +2725,7 @@ function Mt(e, t, a, u, l) {
|
|
|
2719
2725
|
pageSize: t.value
|
|
2720
2726
|
});
|
|
2721
2727
|
}
|
|
2722
|
-
function
|
|
2728
|
+
function P() {
|
|
2723
2729
|
return n("li", {
|
|
2724
2730
|
class: "pagination-pagelist"
|
|
2725
2731
|
}, [n("div", {
|
|
@@ -2737,7 +2743,7 @@ function Mt(e, t, a, u, l) {
|
|
|
2737
2743
|
class: "pagelist-text"
|
|
2738
2744
|
}, [d.value]), n("i", {
|
|
2739
2745
|
class: "f-icon f-icon-dropdown"
|
|
2740
|
-
}, null)]), n(
|
|
2746
|
+
}, null)]), n(xt, {
|
|
2741
2747
|
ref: i,
|
|
2742
2748
|
host: "body",
|
|
2743
2749
|
placement: "top-left",
|
|
@@ -2752,15 +2758,15 @@ function Mt(e, t, a, u, l) {
|
|
|
2752
2758
|
onMouseleave: () => C()
|
|
2753
2759
|
}, [a.value.map((k) => n("li", {
|
|
2754
2760
|
class: m(k),
|
|
2755
|
-
onClick: (
|
|
2761
|
+
onClick: (V) => y(V, k)
|
|
2756
2762
|
}, [n("span", null, [k])]))])]
|
|
2757
2763
|
})])]);
|
|
2758
2764
|
}
|
|
2759
2765
|
return {
|
|
2760
|
-
renderPageList:
|
|
2766
|
+
renderPageList: P
|
|
2761
2767
|
};
|
|
2762
2768
|
}
|
|
2763
|
-
function
|
|
2769
|
+
function Vt(e, t, a, u, l) {
|
|
2764
2770
|
const o = (d) => ({
|
|
2765
2771
|
"page-item": !0,
|
|
2766
2772
|
current: t.value === d.value,
|
|
@@ -2800,7 +2806,7 @@ function Ot(e, t, a, u, l) {
|
|
|
2800
2806
|
renderPageNumbers: f
|
|
2801
2807
|
};
|
|
2802
2808
|
}
|
|
2803
|
-
function
|
|
2809
|
+
function Rt(e, t, a, u, l) {
|
|
2804
2810
|
const o = B(() => ({
|
|
2805
2811
|
"page-item": !0,
|
|
2806
2812
|
disabled: t.value
|
|
@@ -2858,7 +2864,7 @@ function Pt(e, t, a, u, l) {
|
|
|
2858
2864
|
renderPreviousPage: d
|
|
2859
2865
|
};
|
|
2860
2866
|
}
|
|
2861
|
-
function
|
|
2867
|
+
function Lt(e) {
|
|
2862
2868
|
const t = c([]);
|
|
2863
2869
|
function a(l, o, i, s) {
|
|
2864
2870
|
const f = Math.ceil(i / 2);
|
|
@@ -2868,8 +2874,8 @@ function Vt(e) {
|
|
|
2868
2874
|
const f = [], d = Math.ceil(i / o), r = Math.ceil(s / 2), m = l <= r, x = d - r < l, I = !m && !x, w = s < d;
|
|
2869
2875
|
let v = 1;
|
|
2870
2876
|
for (; v <= d && v <= s; ) {
|
|
2871
|
-
const C = a(v, l, s, d), S = v === 2 && (I || x),
|
|
2872
|
-
f.push({ label:
|
|
2877
|
+
const C = a(v, l, s, d), S = v === 2 && (I || x), y = v === s - 1 && (I || m), P = w && (S || y) ? "..." : "" + C;
|
|
2878
|
+
f.push({ label: P, value: C }), v++;
|
|
2873
2879
|
}
|
|
2874
2880
|
t.value = f;
|
|
2875
2881
|
}
|
|
@@ -2883,7 +2889,7 @@ const Se = /* @__PURE__ */ Y({
|
|
|
2883
2889
|
const a = c(!1), u = c(""), l = c(!1), o = c(e.pageSize), i = c(e.currentPage), s = c(e.totalItems), {
|
|
2884
2890
|
pages: f,
|
|
2885
2891
|
updatePages: d
|
|
2886
|
-
} =
|
|
2892
|
+
} = Lt(), r = {
|
|
2887
2893
|
position: "relative",
|
|
2888
2894
|
overflowX: "auto"
|
|
2889
2895
|
}, m = {
|
|
@@ -2893,34 +2899,34 @@ const Se = /* @__PURE__ */ Y({
|
|
|
2893
2899
|
background: "rgba(250,250,252,.6)",
|
|
2894
2900
|
width: "100%",
|
|
2895
2901
|
height: "100%"
|
|
2896
|
-
}, x = B(() => !s.value || i.value === 1), I = B(() => typeof e.pageList == "string" ? e.pageList.split(",") : e.pageList), w = B(() => Math.ceil(s.value / o.value)), v = B(() => !s.value || i.value === w.value), C = B(() => e.showGoButton), S = B(() => !!s.value && i.value > 1),
|
|
2902
|
+
}, x = B(() => !s.value || i.value === 1), I = B(() => typeof e.pageList == "string" ? e.pageList.split(",") : e.pageList), w = B(() => Math.ceil(s.value / o.value)), v = B(() => !s.value || i.value === w.value), C = B(() => e.showGoButton), S = B(() => !!s.value && i.value > 1), y = B(() => !(l.value && f.value.length <= 1)), P = B(() => e.showPageInfo), k = B(() => e.showPageList), V = B(() => e.showPageNumbers), R = B(() => !0), {
|
|
2897
2903
|
renderFirstPage: F,
|
|
2898
2904
|
renderPreviousPage: g
|
|
2899
|
-
} =
|
|
2905
|
+
} = Rt(i, x, S, o, t), {
|
|
2900
2906
|
renderLastPage: T,
|
|
2901
|
-
renderNextPage:
|
|
2902
|
-
} =
|
|
2907
|
+
renderNextPage: h
|
|
2908
|
+
} = Mt(i, v, w, o, t), {
|
|
2903
2909
|
renderPageInfo: b
|
|
2904
|
-
} =
|
|
2905
|
-
renderPageList:
|
|
2906
|
-
} =
|
|
2910
|
+
} = Ot(u, s), {
|
|
2911
|
+
renderPageList: D
|
|
2912
|
+
} = Pt(i, o, I, s, t), {
|
|
2907
2913
|
renderPageNumbers: j
|
|
2908
|
-
} =
|
|
2914
|
+
} = Vt(e, i, f, o, t), {
|
|
2909
2915
|
renderGotoButton: $
|
|
2910
|
-
} =
|
|
2916
|
+
} = Ft(i, w, o, t);
|
|
2911
2917
|
d(i.value, o.value, s.value, 7), A(() => e.totalItems, (O) => {
|
|
2912
2918
|
s.value = O, d(i.value, o.value, s.value, 7);
|
|
2913
|
-
}), A(() => e.currentPage, (O,
|
|
2914
|
-
O !==
|
|
2915
|
-
}), A(() => e.pageSize, (O,
|
|
2916
|
-
O !==
|
|
2917
|
-
}),
|
|
2919
|
+
}), A(() => e.currentPage, (O, E) => {
|
|
2920
|
+
O !== E && (i.value = O, d(i.value, o.value, s.value, 7));
|
|
2921
|
+
}), A(() => e.pageSize, (O, E) => {
|
|
2922
|
+
O !== E && (o.value = O, d(i.value, o.value, s.value, 7));
|
|
2923
|
+
}), pt(() => {
|
|
2918
2924
|
if (!I.value || !I.value.length)
|
|
2919
2925
|
return;
|
|
2920
2926
|
const O = I.value.includes(o.value);
|
|
2921
2927
|
o.value = O ? o.value : I.value[0], O || t.emit("update:pageSize", o.value);
|
|
2922
2928
|
})();
|
|
2923
|
-
const
|
|
2929
|
+
const L = B(() => ({
|
|
2924
2930
|
"ml-auto": u.value !== "center",
|
|
2925
2931
|
"mx-auto": u.value === "center",
|
|
2926
2932
|
"ngx-pagination": !0,
|
|
@@ -2931,12 +2937,12 @@ const Se = /* @__PURE__ */ Y({
|
|
|
2931
2937
|
"position-relative": !0
|
|
2932
2938
|
}));
|
|
2933
2939
|
function N() {
|
|
2934
|
-
return n(Q, null, [
|
|
2940
|
+
return n(Q, null, [P.value && b(), k.value && D(), R.value && F(), R.value && g(), V.value && j(), R.value && h(), R.value && T(), C.value && $()]);
|
|
2935
2941
|
}
|
|
2936
2942
|
function p() {
|
|
2937
2943
|
return n(Q, null, [n("li", {
|
|
2938
2944
|
class: "page-item d-flex flex-fill"
|
|
2939
|
-
}, null),
|
|
2945
|
+
}, null), R.value && F(), R.value && g(), $(), n("li", {
|
|
2940
2946
|
class: "page-item page-separator",
|
|
2941
2947
|
style: "margin-left: 10px"
|
|
2942
2948
|
}, [n("span", {
|
|
@@ -2946,45 +2952,45 @@ const Se = /* @__PURE__ */ Y({
|
|
|
2946
2952
|
style: "margin-left: 5px"
|
|
2947
2953
|
}, [n("span", {
|
|
2948
2954
|
style: "font-size: 16px; font-weight: 600;"
|
|
2949
|
-
}, [K(" "), w.value])]),
|
|
2955
|
+
}, [K(" "), w.value])]), R.value && h(), R.value && T()]);
|
|
2950
2956
|
}
|
|
2951
2957
|
return () => n("div", {
|
|
2952
2958
|
class: "pagination-container d-flex",
|
|
2953
2959
|
style: r
|
|
2954
2960
|
}, [e.disabled && n("div", {
|
|
2955
2961
|
style: m
|
|
2956
|
-
}, null),
|
|
2962
|
+
}, null), y.value && n("ul", {
|
|
2957
2963
|
role: "navigation",
|
|
2958
|
-
class:
|
|
2964
|
+
class: L.value
|
|
2959
2965
|
}, [e.mode === "default" ? N() : p()])]);
|
|
2960
2966
|
}
|
|
2961
|
-
}),
|
|
2967
|
+
}), $a = /* @__PURE__ */ Y({
|
|
2962
2968
|
name: "FPagination",
|
|
2963
2969
|
props: et,
|
|
2964
2970
|
emits: ["pageIndexChanged", "pageSizeChanged"],
|
|
2965
2971
|
setup(e, t) {
|
|
2966
|
-
const a = c(!1), u = c(e.mode), l = c(""), o = c(!1), i = c(e.pageSize), s = c(e.currentPage), f = c(e.totalItems), d = c(), r =
|
|
2972
|
+
const a = c(!1), u = c(e.mode), l = c(""), o = c(!1), i = c(e.pageSize), s = c(e.currentPage), f = c(e.totalItems), d = c(), r = le("design-item-context"), m = Ct(d, r);
|
|
2967
2973
|
ne(() => {
|
|
2968
2974
|
d.value.componentInstance = m;
|
|
2969
2975
|
}), t.expose(m.value);
|
|
2970
2976
|
const {
|
|
2971
2977
|
pages: x,
|
|
2972
2978
|
updatePages: I
|
|
2973
|
-
} =
|
|
2979
|
+
} = Lt(), w = B(() => s.value === 1), v = B(() => [20, 50, 100]), C = B(() => Math.ceil(f.value / i.value)), S = B(() => s.value === C.value), y = B(() => !0), P = B(() => s.value > 1), k = B(() => !(o.value && x.value.length <= 1)), V = B(() => !0), R = B(() => !0), F = B(() => !0), g = B(() => !0), {
|
|
2974
2980
|
renderFirstPage: T,
|
|
2975
|
-
renderPreviousPage:
|
|
2976
|
-
} =
|
|
2981
|
+
renderPreviousPage: h
|
|
2982
|
+
} = Rt(s, w, P, i, t), {
|
|
2977
2983
|
renderLastPage: b,
|
|
2978
|
-
renderNextPage:
|
|
2979
|
-
} =
|
|
2984
|
+
renderNextPage: D
|
|
2985
|
+
} = Mt(s, S, C, i, t), {
|
|
2980
2986
|
renderPageInfo: j
|
|
2981
|
-
} =
|
|
2987
|
+
} = Ot(l, f), {
|
|
2982
2988
|
renderPageList: $
|
|
2983
|
-
} =
|
|
2989
|
+
} = Pt(s, i, v, f, t), {
|
|
2984
2990
|
renderPageNumbers: H
|
|
2985
|
-
} =
|
|
2986
|
-
renderGotoButton:
|
|
2987
|
-
} =
|
|
2991
|
+
} = Vt(e, s, x, i, t), {
|
|
2992
|
+
renderGotoButton: L
|
|
2993
|
+
} = Ft(s, C, i, t);
|
|
2988
2994
|
I(s.value, i.value, f.value, 7), A([s, i], () => {
|
|
2989
2995
|
I(s.value, i.value, f.value, 7);
|
|
2990
2996
|
}), A(s, () => {
|
|
@@ -3003,12 +3009,12 @@ const Se = /* @__PURE__ */ Y({
|
|
|
3003
3009
|
"justify-content": l.value === "center" ? "center" : "start"
|
|
3004
3010
|
}));
|
|
3005
3011
|
function O() {
|
|
3006
|
-
return n(Q, null, [
|
|
3012
|
+
return n(Q, null, [V.value && j(), R.value && $(), g.value && T(), g.value && h(), F.value && H(), g.value && D(), g.value && b(), y.value && L()]);
|
|
3007
3013
|
}
|
|
3008
|
-
function
|
|
3014
|
+
function E() {
|
|
3009
3015
|
return n(Q, null, [n("li", {
|
|
3010
3016
|
class: "page-item d-flex flex-fill"
|
|
3011
|
-
}, null), g.value && T(), g.value &&
|
|
3017
|
+
}, null), g.value && T(), g.value && h(), L(), n("li", {
|
|
3012
3018
|
class: "page-item page-separator",
|
|
3013
3019
|
style: "margin-left: 10px"
|
|
3014
3020
|
}, [n("span", {
|
|
@@ -3018,7 +3024,7 @@ const Se = /* @__PURE__ */ Y({
|
|
|
3018
3024
|
style: "margin-left: 5px"
|
|
3019
3025
|
}, [n("span", {
|
|
3020
3026
|
style: "font-size: 16px; font-weight: 600;"
|
|
3021
|
-
}, [K(" "), C.value])]), g.value &&
|
|
3027
|
+
}, [K(" "), C.value])]), g.value && D(), g.value && b()]);
|
|
3022
3028
|
}
|
|
3023
3029
|
return () => n("div", {
|
|
3024
3030
|
ref: d,
|
|
@@ -3027,16 +3033,16 @@ const Se = /* @__PURE__ */ Y({
|
|
|
3027
3033
|
role: "navigation",
|
|
3028
3034
|
class: N.value,
|
|
3029
3035
|
style: p.value
|
|
3030
|
-
}, [u.value === "default" ? O() :
|
|
3036
|
+
}, [u.value === "default" ? O() : E()])]);
|
|
3031
3037
|
}
|
|
3032
3038
|
});
|
|
3033
3039
|
Se.register = (e, t, a) => {
|
|
3034
|
-
e.pagination = Se, t.pagination =
|
|
3040
|
+
e.pagination = Se, t.pagination = kt;
|
|
3035
3041
|
};
|
|
3036
3042
|
Se.registerDesigner = (e, t, a) => {
|
|
3037
|
-
e.pagination =
|
|
3043
|
+
e.pagination = $a, t.pagination = kt;
|
|
3038
3044
|
};
|
|
3039
|
-
|
|
3045
|
+
cn(Se);
|
|
3040
3046
|
const ze = {
|
|
3041
3047
|
/** 启用分组 */
|
|
3042
3048
|
enableGroup: { type: Boolean, default: !1 },
|
|
@@ -3055,7 +3061,7 @@ const ze = {
|
|
|
3055
3061
|
},
|
|
3056
3062
|
pagination: { type: Boolean, default: !1 },
|
|
3057
3063
|
editorParams: { type: Object }
|
|
3058
|
-
},
|
|
3064
|
+
}, Wa = /* @__PURE__ */ Y({
|
|
3059
3065
|
name: "FSchemaSelectCardView",
|
|
3060
3066
|
props: ze,
|
|
3061
3067
|
emits: ["selectionChange"],
|
|
@@ -3063,18 +3069,18 @@ const ze = {
|
|
|
3063
3069
|
const a = e.getData, u = {
|
|
3064
3070
|
enable: e.enableGroup,
|
|
3065
3071
|
groupFields: [e.groupField || "category"]
|
|
3066
|
-
}, l = c([]), o = c(), i = c([]), s =
|
|
3072
|
+
}, l = c([]), o = c(), i = c([]), s = le("F_SCHEMA_SELECTOR_SEARCH_VALUE"), f = c(e.pagination), d = c(1), r = c(0), m = c(21), x = c([21]);
|
|
3067
3073
|
function I(k) {
|
|
3068
3074
|
o.value.updateDataSource(k);
|
|
3069
3075
|
}
|
|
3070
|
-
A(() => s == null ? void 0 : s.value, (k,
|
|
3071
|
-
let
|
|
3072
|
-
k && k !==
|
|
3076
|
+
A(() => s == null ? void 0 : s.value, (k, V) => {
|
|
3077
|
+
let R = l.value;
|
|
3078
|
+
k && k !== V && (R = l.value.filter((F) => `${F.name} ${F.code}`.toLowerCase().indexOf(k.toLowerCase()) > -1)), i.value = R, I(i.value), f.value = e.pagination && !k;
|
|
3073
3079
|
});
|
|
3074
3080
|
function w({
|
|
3075
3081
|
item: k,
|
|
3076
|
-
index:
|
|
3077
|
-
selectedItem:
|
|
3082
|
+
index: V,
|
|
3083
|
+
selectedItem: R
|
|
3078
3084
|
}) {
|
|
3079
3085
|
return n("div", {
|
|
3080
3086
|
class: "f-navForm-item"
|
|
@@ -3099,9 +3105,9 @@ const ze = {
|
|
|
3099
3105
|
if (!f.value)
|
|
3100
3106
|
return;
|
|
3101
3107
|
const {
|
|
3102
|
-
pageIndex:
|
|
3103
|
-
} = k,
|
|
3104
|
-
I(g), d.value =
|
|
3108
|
+
pageIndex: V
|
|
3109
|
+
} = k, R = (V - 1) * m.value, F = R + m.value, g = l.value.slice(R, F);
|
|
3110
|
+
I(g), d.value = V;
|
|
3105
3111
|
}
|
|
3106
3112
|
function C() {
|
|
3107
3113
|
return f.value && n(Se, {
|
|
@@ -3119,25 +3125,25 @@ const ze = {
|
|
|
3119
3125
|
function S(k) {
|
|
3120
3126
|
t.emit("selectionChange", k);
|
|
3121
3127
|
}
|
|
3122
|
-
async function
|
|
3128
|
+
async function y() {
|
|
3123
3129
|
var F;
|
|
3124
|
-
const k =
|
|
3130
|
+
const k = le("FLoadingService", null), V = k == null ? void 0 : k.show(), R = await a("", {
|
|
3125
3131
|
pageIndex: 1,
|
|
3126
3132
|
pageSize: 1
|
|
3127
3133
|
}, e.editorParams);
|
|
3128
|
-
l.value =
|
|
3134
|
+
l.value = R, i.value = R, I(i.value), r.value = R.length, v({
|
|
3129
3135
|
pageIndex: 1
|
|
3130
|
-
}), (F =
|
|
3136
|
+
}), (F = V.value) == null || F.close();
|
|
3131
3137
|
}
|
|
3132
3138
|
ne(() => {
|
|
3133
|
-
|
|
3139
|
+
y();
|
|
3134
3140
|
});
|
|
3135
|
-
function
|
|
3141
|
+
function P() {
|
|
3136
3142
|
o.value.activeRowById("");
|
|
3137
3143
|
}
|
|
3138
3144
|
return t.expose({
|
|
3139
|
-
clearSelection:
|
|
3140
|
-
}), () => n(
|
|
3145
|
+
clearSelection: P
|
|
3146
|
+
}), () => n(re, {
|
|
3141
3147
|
ref: o,
|
|
3142
3148
|
data: l.value,
|
|
3143
3149
|
group: u,
|
|
@@ -3149,7 +3155,7 @@ const ze = {
|
|
|
3149
3155
|
footer: C
|
|
3150
3156
|
});
|
|
3151
3157
|
}
|
|
3152
|
-
}),
|
|
3158
|
+
}), _a = /* @__PURE__ */ Y({
|
|
3153
3159
|
name: "FSchemaSelectIconView",
|
|
3154
3160
|
props: ze,
|
|
3155
3161
|
emits: ["selectionChange"],
|
|
@@ -3181,7 +3187,7 @@ const ze = {
|
|
|
3181
3187
|
function i(s) {
|
|
3182
3188
|
t.emit("selectionChange", s);
|
|
3183
3189
|
}
|
|
3184
|
-
return () => n(
|
|
3190
|
+
return () => n(re, {
|
|
3185
3191
|
data: l,
|
|
3186
3192
|
group: u,
|
|
3187
3193
|
view: "CardView",
|
|
@@ -3191,7 +3197,7 @@ const ze = {
|
|
|
3191
3197
|
content: o
|
|
3192
3198
|
});
|
|
3193
3199
|
}
|
|
3194
|
-
}),
|
|
3200
|
+
}), Ga = {
|
|
3195
3201
|
showCloseButton: { type: Boolean, default: !0 },
|
|
3196
3202
|
position: { type: String, default: "top-center" },
|
|
3197
3203
|
timeout: { type: Number, default: 3e3 },
|
|
@@ -3204,52 +3210,52 @@ const ze = {
|
|
|
3204
3210
|
animate: { type: String, default: "fadeIn" },
|
|
3205
3211
|
options: { type: Object },
|
|
3206
3212
|
safeHtml: { type: Boolean, default: !0 }
|
|
3207
|
-
},
|
|
3213
|
+
}, Ua = {
|
|
3208
3214
|
showCloseButton: { type: Boolean, default: !0 },
|
|
3209
3215
|
animate: { type: String, default: "fadeIn" },
|
|
3210
3216
|
options: { type: Object }
|
|
3211
3217
|
}, Ye = /* @__PURE__ */ Y({
|
|
3212
3218
|
name: "Toast",
|
|
3213
|
-
props:
|
|
3219
|
+
props: Ua,
|
|
3214
3220
|
emits: ["close", "click"],
|
|
3215
3221
|
setup: (e, t) => {
|
|
3216
3222
|
const a = c(e.animate), u = "fadeOut", l = B(() => e.options), o = c(!1), i = B(() => l.value.title && l.value.message), s = B(() => !l.value.title && l.value.message), f = B(() => {
|
|
3217
|
-
const
|
|
3223
|
+
const y = {
|
|
3218
3224
|
animated: o.value,
|
|
3219
3225
|
toast: !0,
|
|
3220
3226
|
"toast--only-content": !i.value
|
|
3221
3227
|
};
|
|
3222
|
-
return
|
|
3228
|
+
return y[e.animate] = !1, y[u] = o.value, y["toasty-type-" + l.value.type] = !0, l.value.theme && (y[l.value.theme] = !0), y;
|
|
3223
3229
|
}), d = B(() => {
|
|
3224
|
-
const k = `f-icon-${l.value && l.value.type ? l.value.type.replace("toasty-type-", "") : "default"}`,
|
|
3230
|
+
const k = `f-icon-${l.value && l.value.type ? l.value.type.replace("toasty-type-", "") : "default"}`, V = {
|
|
3225
3231
|
"f-icon": !0
|
|
3226
3232
|
};
|
|
3227
|
-
return
|
|
3233
|
+
return V[k] = !0, V;
|
|
3228
3234
|
}), r = B(() => l.value.title || l.value.message), m = B(() => e.showCloseButton), x = B(() => !!l.value.buttons || !!t.slots.default), I = B(() => Z.getLocale() === "en" ? {
|
|
3229
3235
|
wordBreak: "keep-all",
|
|
3230
3236
|
overflowWrap: "break-word"
|
|
3231
3237
|
} : {});
|
|
3232
|
-
function w(
|
|
3233
|
-
|
|
3238
|
+
function w(y) {
|
|
3239
|
+
y.stopPropagation(), y.preventDefault(), o.value = !1, setTimeout(() => {
|
|
3234
3240
|
t.emit("close", l.value);
|
|
3235
3241
|
}, 200);
|
|
3236
3242
|
}
|
|
3237
|
-
function v(
|
|
3243
|
+
function v(y, P) {
|
|
3238
3244
|
}
|
|
3239
|
-
function C(
|
|
3240
|
-
return `f-preten-link ${
|
|
3245
|
+
function C(y) {
|
|
3246
|
+
return `f-preten-link ${y.customClass ? y.customClass : ""}`;
|
|
3241
3247
|
}
|
|
3242
3248
|
A(a, () => {
|
|
3243
3249
|
a.value;
|
|
3244
3250
|
});
|
|
3245
3251
|
const S = () => {
|
|
3246
|
-
var
|
|
3252
|
+
var y;
|
|
3247
3253
|
return n(Q, null, [n("div", {
|
|
3248
3254
|
class: "after-toast-msg text-right"
|
|
3249
|
-
}, [!t.slots.default && ((
|
|
3250
|
-
class: C(
|
|
3255
|
+
}, [!t.slots.default && ((y = l.value.buttons) == null ? void 0 : y.map((P) => n("span", {
|
|
3256
|
+
class: C(P),
|
|
3251
3257
|
onClick: (k) => void 0
|
|
3252
|
-
}, [
|
|
3258
|
+
}, [P.text]))), t.slots.default && t.slots.default()])]);
|
|
3253
3259
|
};
|
|
3254
3260
|
return () => n("div", {
|
|
3255
3261
|
class: f.value,
|
|
@@ -3291,7 +3297,7 @@ const ze = {
|
|
|
3291
3297
|
}
|
|
3292
3298
|
}), He = /* @__PURE__ */ Y({
|
|
3293
3299
|
name: "Notify",
|
|
3294
|
-
props:
|
|
3300
|
+
props: Ga,
|
|
3295
3301
|
emits: ["close", "empty"],
|
|
3296
3302
|
setup(e, t) {
|
|
3297
3303
|
var v;
|
|
@@ -3304,14 +3310,14 @@ const ze = {
|
|
|
3304
3310
|
top: 20,
|
|
3305
3311
|
bottom: 12
|
|
3306
3312
|
}, s = c(), f = c(e.options), d = c(e.showCloseButton), r = B(() => e.position || "bottom-right"), m = B(() => e.timeout != null ? e.timeout : 3e3), x = B(() => {
|
|
3307
|
-
const C = e.bottom ? e.bottom : i.bottom, S = e.top ? e.top : i.top,
|
|
3313
|
+
const C = e.bottom ? e.bottom : i.bottom, S = e.top ? e.top : i.top, y = {
|
|
3308
3314
|
transition: "all 0.2s ease",
|
|
3309
3315
|
left: r.value.indexOf("left") > -1 ? `${e.left ? e.left : i.left}px` : "",
|
|
3310
3316
|
right: r.value.indexOf("right") > -1 ? `${e.right ? e.right : i.right}px` : "",
|
|
3311
3317
|
top: r.value.indexOf("top") > -1 ? `${S}px` : "",
|
|
3312
3318
|
bottom: r.value.indexOf("bottom") > -1 ? `${C}px` : ""
|
|
3313
3319
|
};
|
|
3314
|
-
return r.value.indexOf("center") > -1 && (
|
|
3320
|
+
return r.value.indexOf("center") > -1 && (y.left = "50%", y.marginLeft = "calc(-24rem / 2)", r.value === "center-center" && (y.top = "50%", y.transform = "translate(-50%, -50%)")), y;
|
|
3315
3321
|
});
|
|
3316
3322
|
function I(C) {
|
|
3317
3323
|
t.emit("close");
|
|
@@ -3344,10 +3350,10 @@ const ze = {
|
|
|
3344
3350
|
};
|
|
3345
3351
|
}
|
|
3346
3352
|
});
|
|
3347
|
-
class
|
|
3353
|
+
class Ht {
|
|
3348
3354
|
constructor() {
|
|
3349
|
-
|
|
3350
|
-
|
|
3355
|
+
ue(this, "notifyRefs", []);
|
|
3356
|
+
ue(this, "globalConfig", ft({}));
|
|
3351
3357
|
}
|
|
3352
3358
|
escapeAllHtml(t) {
|
|
3353
3359
|
if (typeof t != "string" || !t)
|
|
@@ -3385,12 +3391,12 @@ class Rt {
|
|
|
3385
3391
|
document.body.removeChild(o);
|
|
3386
3392
|
}), ne(() => {
|
|
3387
3393
|
a.updateNotifyPositionForCreate(l, s);
|
|
3388
|
-
}), () => n(
|
|
3394
|
+
}), () => n(gt, {
|
|
3389
3395
|
mode: "out-in",
|
|
3390
3396
|
name: "fade",
|
|
3391
3397
|
appear: !0
|
|
3392
3398
|
}, {
|
|
3393
|
-
default: () => [n(He,
|
|
3399
|
+
default: () => [n(He, ae({
|
|
3394
3400
|
ref: s
|
|
3395
3401
|
}, l, {
|
|
3396
3402
|
onClose: f
|
|
@@ -3463,13 +3469,13 @@ class Rt {
|
|
|
3463
3469
|
}), this.notifyRefs.length = 0;
|
|
3464
3470
|
}
|
|
3465
3471
|
}
|
|
3466
|
-
const
|
|
3472
|
+
const Dt = Symbol("NOTIFY_SERVICE_TOKEN");
|
|
3467
3473
|
He.install = (e) => {
|
|
3468
3474
|
e.component(He.name, He), e.component(Ye.name, Ye);
|
|
3469
|
-
const t = new
|
|
3470
|
-
e.provide(
|
|
3475
|
+
const t = new Ht();
|
|
3476
|
+
e.provide(Dt, t), e.provide("FNotifyService", t);
|
|
3471
3477
|
};
|
|
3472
|
-
const
|
|
3478
|
+
const qa = /* @__PURE__ */ Y({
|
|
3473
3479
|
name: "FSchemaNavListView",
|
|
3474
3480
|
props: ze,
|
|
3475
3481
|
emits: ["selectionChange"],
|
|
@@ -3509,35 +3515,35 @@ const Ga = /* @__PURE__ */ Y({
|
|
|
3509
3515
|
}
|
|
3510
3516
|
function S() {
|
|
3511
3517
|
var T;
|
|
3512
|
-
let g =
|
|
3513
|
-
if (i.value && (g = s.value.filter((
|
|
3514
|
-
const
|
|
3515
|
-
g = g.filter((b) =>
|
|
3518
|
+
let g = vn(s.value);
|
|
3519
|
+
if (i.value && (g = s.value.filter((h) => `${h.name} ${h.code}`.toLowerCase().indexOf(i.value.toLowerCase()) > -1)), (T = o.value) != null && T.id && o.value.id !== "all") {
|
|
3520
|
+
const h = o.value.contains || [];
|
|
3521
|
+
g = g.filter((b) => h.includes(b.code));
|
|
3516
3522
|
}
|
|
3517
3523
|
f.value = g, C(f.value);
|
|
3518
3524
|
}
|
|
3519
|
-
async function
|
|
3525
|
+
async function y() {
|
|
3520
3526
|
var b;
|
|
3521
|
-
const g =
|
|
3527
|
+
const g = le("FLoadingService", null), T = g == null ? void 0 : g.show(), h = await a("", {
|
|
3522
3528
|
pageIndex: 1,
|
|
3523
3529
|
pageSize: 1
|
|
3524
3530
|
}, e.editorParams);
|
|
3525
|
-
s.value =
|
|
3531
|
+
s.value = h, S(), (b = T.value) == null || b.close();
|
|
3526
3532
|
}
|
|
3527
3533
|
ne(() => {
|
|
3528
|
-
|
|
3534
|
+
y(), l != null && l.length && m.value.activeRowById(l[0].code);
|
|
3529
3535
|
});
|
|
3530
|
-
function
|
|
3536
|
+
function P(g) {
|
|
3531
3537
|
var T;
|
|
3532
3538
|
((T = o.value) == null ? void 0 : T.id) !== g[0].id && (o.value = g[0], S(), r.value = null);
|
|
3533
3539
|
}
|
|
3534
3540
|
function k(g) {
|
|
3535
3541
|
i.value = g, S(), r.value = null;
|
|
3536
3542
|
}
|
|
3537
|
-
function
|
|
3543
|
+
function V() {
|
|
3538
3544
|
i.value = "", S(), r.value = null;
|
|
3539
3545
|
}
|
|
3540
|
-
function
|
|
3546
|
+
function R() {
|
|
3541
3547
|
return n("div", {
|
|
3542
3548
|
class: "f-datagrid-norecords"
|
|
3543
3549
|
}, [n("div", {
|
|
@@ -3546,7 +3552,7 @@ const Ga = /* @__PURE__ */ Y({
|
|
|
3546
3552
|
}
|
|
3547
3553
|
function F() {
|
|
3548
3554
|
if (!(r != null && r.value)) {
|
|
3549
|
-
const g = new
|
|
3555
|
+
const g = new Ht();
|
|
3550
3556
|
return g.globalConfig = {
|
|
3551
3557
|
position: "top-center"
|
|
3552
3558
|
}, g.warning("请选择控制器"), !1;
|
|
@@ -3560,10 +3566,10 @@ const Ga = /* @__PURE__ */ Y({
|
|
|
3560
3566
|
class: "f-navSelector"
|
|
3561
3567
|
}, [n("div", {
|
|
3562
3568
|
class: "f-navSelector-left"
|
|
3563
|
-
}, [n(
|
|
3569
|
+
}, [n(re, {
|
|
3564
3570
|
ref: m,
|
|
3565
3571
|
data: l,
|
|
3566
|
-
onSelectionUpdate:
|
|
3572
|
+
onSelectionUpdate: P,
|
|
3567
3573
|
selectionValues: x.value
|
|
3568
3574
|
}, {
|
|
3569
3575
|
content: w
|
|
@@ -3577,13 +3583,13 @@ const Ga = /* @__PURE__ */ Y({
|
|
|
3577
3583
|
class: "f-navSelector-recommand-text"
|
|
3578
3584
|
}, [K("控制器列表")])]), n("div", {
|
|
3579
3585
|
class: "f-navSelector-remainder"
|
|
3580
|
-
}, [n(
|
|
3586
|
+
}, [n(ce, {
|
|
3581
3587
|
showDropdown: !1,
|
|
3582
3588
|
customClass: "f-schema-selector-search",
|
|
3583
3589
|
updateOn: "change",
|
|
3584
3590
|
placeholder: "请输入名称/编号搜索",
|
|
3585
3591
|
onChange: k,
|
|
3586
|
-
onClear:
|
|
3592
|
+
onClear: V
|
|
3587
3593
|
}, null)])]), n("div", {
|
|
3588
3594
|
class: "f-message-strip"
|
|
3589
3595
|
}, [n("section", {
|
|
@@ -3603,7 +3609,7 @@ const Ga = /* @__PURE__ */ Y({
|
|
|
3603
3609
|
style: "font-size: 13px;"
|
|
3604
3610
|
}, [K("未能展示的自定义控制器,需要在设计器代码编辑器里打开控制器代码,重新保存后再发布。")])])])])]), n("div", {
|
|
3605
3611
|
class: "f-navSelector-content"
|
|
3606
|
-
}, [n(
|
|
3612
|
+
}, [n(re, {
|
|
3607
3613
|
ref: d,
|
|
3608
3614
|
data: f.value,
|
|
3609
3615
|
view: "ContentView",
|
|
@@ -3611,10 +3617,10 @@ const Ga = /* @__PURE__ */ Y({
|
|
|
3611
3617
|
onSelectionUpdate: (g) => v(g)
|
|
3612
3618
|
}, {
|
|
3613
3619
|
content: I,
|
|
3614
|
-
empty:
|
|
3620
|
+
empty: R
|
|
3615
3621
|
})])])]);
|
|
3616
3622
|
}
|
|
3617
|
-
}),
|
|
3623
|
+
}), Ya = /* @__PURE__ */ Y({
|
|
3618
3624
|
name: "FSchemaSelectListView",
|
|
3619
3625
|
props: ze,
|
|
3620
3626
|
emits: ["selectionChange"],
|
|
@@ -3623,13 +3629,13 @@ const Ga = /* @__PURE__ */ Y({
|
|
|
3623
3629
|
enable: e.enableGroup,
|
|
3624
3630
|
groupFields: [e.groupField || "category"],
|
|
3625
3631
|
formatter: e.groupFormatter
|
|
3626
|
-
}, o = c([]), i = c([]), s =
|
|
3632
|
+
}, o = c([]), i = c([]), s = le("F_SCHEMA_SELECTOR_SEARCH_VALUE"), f = le("FLoadingService", null);
|
|
3627
3633
|
function d(v) {
|
|
3628
3634
|
a.value.updateDataSource(v);
|
|
3629
3635
|
}
|
|
3630
3636
|
A(() => s == null ? void 0 : s.value, (v, C) => {
|
|
3631
3637
|
let S = i.value;
|
|
3632
|
-
v && v !== C && (S = i.value.filter((
|
|
3638
|
+
v && v !== C && (S = i.value.filter((y) => `${y.name} ${y.code}`.toLowerCase().indexOf(v.toLowerCase()) > -1)), o.value = S, d(o.value);
|
|
3633
3639
|
});
|
|
3634
3640
|
async function r() {
|
|
3635
3641
|
var S;
|
|
@@ -3681,7 +3687,7 @@ const Ga = /* @__PURE__ */ Y({
|
|
|
3681
3687
|
function w(v) {
|
|
3682
3688
|
t.emit("selectionChange", v);
|
|
3683
3689
|
}
|
|
3684
|
-
return () => n(
|
|
3690
|
+
return () => n(re, {
|
|
3685
3691
|
data: o.value,
|
|
3686
3692
|
group: l,
|
|
3687
3693
|
view: "ContentView",
|
|
@@ -3694,7 +3700,7 @@ const Ga = /* @__PURE__ */ Y({
|
|
|
3694
3700
|
});
|
|
3695
3701
|
}
|
|
3696
3702
|
});
|
|
3697
|
-
function
|
|
3703
|
+
function Xa() {
|
|
3698
3704
|
function e(l, o) {
|
|
3699
3705
|
return [];
|
|
3700
3706
|
}
|
|
@@ -3709,7 +3715,7 @@ function qa() {
|
|
|
3709
3715
|
}
|
|
3710
3716
|
return { getNavigationData: e, getRecentlyData: t, getRecommandData: a, getSchemaData: u };
|
|
3711
3717
|
}
|
|
3712
|
-
const
|
|
3718
|
+
const Ka = {
|
|
3713
3719
|
/**
|
|
3714
3720
|
* 是否展示文案
|
|
3715
3721
|
* @default true
|
|
@@ -3751,7 +3757,7 @@ const Ya = {
|
|
|
3751
3757
|
* @default 300
|
|
3752
3758
|
*/
|
|
3753
3759
|
delay: { type: Number, default: 300 }
|
|
3754
|
-
}, { isSmall:
|
|
3760
|
+
}, { isSmall: Ja } = Hn(), Za = {
|
|
3755
3761
|
/**
|
|
3756
3762
|
* 是否展示文案
|
|
3757
3763
|
*/
|
|
@@ -3759,7 +3765,7 @@ const Ya = {
|
|
|
3759
3765
|
/**
|
|
3760
3766
|
* 展示信息
|
|
3761
3767
|
*/
|
|
3762
|
-
message:
|
|
3768
|
+
message: Ja() ? "正在加载..." : "正在加载,请稍候...",
|
|
3763
3769
|
/**
|
|
3764
3770
|
* 默认展示状态
|
|
3765
3771
|
*/
|
|
@@ -3780,7 +3786,7 @@ const Ya = {
|
|
|
3780
3786
|
* 延迟 300 毫秒显示加载,避免异步加载出现一闪而逝的问题
|
|
3781
3787
|
*/
|
|
3782
3788
|
delay: 300
|
|
3783
|
-
},
|
|
3789
|
+
}, Qa = [
|
|
3784
3790
|
'<div class="f-loading-round"></div>',
|
|
3785
3791
|
`<div class="f-loading-dot-wrapper">
|
|
3786
3792
|
<div class="f-loading-dot">
|
|
@@ -3791,70 +3797,70 @@ const Ya = {
|
|
|
3791
3797
|
</div>
|
|
3792
3798
|
</div>`,
|
|
3793
3799
|
'<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-coffee"><defs><linearGradient id="gradient" x1="0%" x2="0%" y1="0%" y2="100%"><stop offset="10%" stop-color="black" stop-opacity="0"></stop><stop offset="100%" stop-color="white" stop-opacity="1"></stop></linearGradient><mask id="mask" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"><rect x="22" y="8" width="56" height="54" fill="url(#gradient)"></rect></mask><path id="steam" d="M0-4c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9l0,0c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9l0,0 c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9l0,0c-2.1,2.6-2.1,6.4,0,9l0,0 c2.1,2.6,2.1,6.4,0,9l0,0c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9l0,0 c-2.1,2.6-2.1,6.4,0,9h0c2.1,2.6,2.1,6.4,0,9h0c-2.1,2.6-2.1,6.4,0,9h0c2.1,2.6,2.1,6.4,0,9" stroke-width="6" stroke-linecap="round" fill="#f00" stroke="#58a8f6"></path></defs><g mask="url(#mask)"><use x="29" y="1.00876" href="#steam"><animate attributeName="y" calcMode="linear" values="4;-14" keyTimes="0;1" dur="0.5" begin="0s" repeatCount="indefinite"></animate></use><use x="47" y="-5.98248" href="#steam"><animate attributeName="y" calcMode="linear" values="0;-18" keyTimes="0;1" dur="0.25" begin="0s" repeatCount="indefinite"></animate></use><use x="64" y="-8.48686" href="#steam"><animate attributeName="y" calcMode="linear" values="-4;-22" keyTimes="0;1" dur="0.3333333333333333" begin="0s" repeatCount="indefinite"></animate></use></g><path d="M81.2,52.5l-5.2,0V49c0-1.6-1.3-3-3-3H20c-1.6,0-3,1.3-3,3v11.6C17,71.3,25.7,80,36.5,80h20.1 c7.1,0,13.3-3.8,16.7-9.5h8.3c5.2,0,9.3-4.4,9-9.6C90.2,56.1,86,52.5,81.2,52.5z M81.5,67.5h-6.8c0.8-2.2,1.3-4.5,1.3-7v-5h5.5 c3.3,0,6,2.7,6,6S84.8,67.5,81.5,67.5z" fill="#58a8f6"></path><path d="M78.8,88H19.2c-1.1,0-2-0.9-2-2s0.9-2,2-2h59.5c1.1,0,2,0.9,2,2S79.9,88,78.8,88z" fill="rgba(80.78431372549018%,94.50980392156862%,72.15686274509802%,0)"></path></svg>'
|
|
3794
|
-
],
|
|
3800
|
+
], De = /* @__PURE__ */ Y({
|
|
3795
3801
|
name: "FLoading",
|
|
3796
|
-
props:
|
|
3802
|
+
props: Ka,
|
|
3797
3803
|
emits: ["closed", "hidden"],
|
|
3798
3804
|
setup(e, t) {
|
|
3799
|
-
const a =
|
|
3805
|
+
const a = Qa, u = c(e.showMessage), l = c(e.isActive), o = c(e.message), i = c(e.width), s = c(e.type), f = c(null), d = c(null), r = c(!1);
|
|
3800
3806
|
let m = "", x;
|
|
3801
3807
|
const I = B(() => s.value && s.value in [0, 1, 2] ? s.value : 0);
|
|
3802
3808
|
ne(() => {
|
|
3803
3809
|
v();
|
|
3804
3810
|
});
|
|
3805
3811
|
const w = B(() => {
|
|
3806
|
-
const
|
|
3812
|
+
const R = {
|
|
3807
3813
|
visibility: r.value ? "visible" : "hidden",
|
|
3808
3814
|
transform: "translate(-50%,-50%)"
|
|
3809
3815
|
};
|
|
3810
|
-
return e.target === document.body && (
|
|
3816
|
+
return e.target === document.body && (R.position = "fixed"), R;
|
|
3811
3817
|
});
|
|
3812
3818
|
function v() {
|
|
3813
3819
|
l.value && !x && (x = setTimeout(() => {
|
|
3814
|
-
x = null,
|
|
3820
|
+
x = null, P(), r.value = !0;
|
|
3815
3821
|
}, e.delay)), l.value || x && (clearTimeout(x), x = null);
|
|
3816
3822
|
}
|
|
3817
|
-
function C(
|
|
3818
|
-
m =
|
|
3823
|
+
function C(R) {
|
|
3824
|
+
m = R;
|
|
3819
3825
|
}
|
|
3820
3826
|
function S() {
|
|
3821
3827
|
return m;
|
|
3822
3828
|
}
|
|
3823
|
-
function
|
|
3829
|
+
function y(R = () => {
|
|
3824
3830
|
}) {
|
|
3825
3831
|
l.value = !1, r.value = !1, t.emit("closed", {
|
|
3826
3832
|
loadingId: m,
|
|
3827
|
-
callback:
|
|
3833
|
+
callback: R
|
|
3828
3834
|
});
|
|
3829
3835
|
}
|
|
3830
|
-
function
|
|
3831
|
-
const
|
|
3832
|
-
f.value && f.value.style && (f.value.style.zIndex = (
|
|
3836
|
+
function P() {
|
|
3837
|
+
const R = k();
|
|
3838
|
+
f.value && f.value.style && (f.value.style.zIndex = (R + 1).toString()), d.value && d.value.style && (d.value.style.zIndex = (R + 1).toString());
|
|
3833
3839
|
}
|
|
3834
|
-
function k(
|
|
3835
|
-
const F = ["body>.f-datagrid-settings-simple-host", "body>div", "body>farris-dialog>.farris-modal.show", "body>.farris-modal.show", "body>farris-filter-panel>.f-filter-panel-wrapper", "body .f-sidebar-show>.f-sidebar-main", "body>.popover.show", "body>filter-row-panel>.f-datagrid-filter-panel", "body>.f-section-maximize"], g = Array.from(document.body.querySelectorAll(F.join(","))).filter((
|
|
3840
|
+
function k(R = 1) {
|
|
3841
|
+
const F = ["body>.f-datagrid-settings-simple-host", "body>div", "body>farris-dialog>.farris-modal.show", "body>.farris-modal.show", "body>farris-filter-panel>.f-filter-panel-wrapper", "body .f-sidebar-show>.f-sidebar-main", "body>.popover.show", "body>filter-row-panel>.f-datagrid-filter-panel", "body>.f-section-maximize"], g = Array.from(document.body.querySelectorAll(F.join(","))).filter((h) => h).map((h) => {
|
|
3836
3842
|
const {
|
|
3837
3843
|
display: b,
|
|
3838
|
-
zIndex:
|
|
3839
|
-
} = window.getComputedStyle(
|
|
3840
|
-
return b === "none" ? 0 : parseInt(
|
|
3841
|
-
}).filter((
|
|
3844
|
+
zIndex: D
|
|
3845
|
+
} = window.getComputedStyle(h);
|
|
3846
|
+
return b === "none" ? 0 : parseInt(D, 10);
|
|
3847
|
+
}).filter((h) => h);
|
|
3842
3848
|
let T = Math.max(...g);
|
|
3843
|
-
return T < 1040 && (T = 1040), T +
|
|
3849
|
+
return T < 1040 && (T = 1040), T + R;
|
|
3844
3850
|
}
|
|
3845
3851
|
t.expose({
|
|
3846
|
-
close:
|
|
3852
|
+
close: y,
|
|
3847
3853
|
setLoadingId: C,
|
|
3848
3854
|
getLoadingId: S
|
|
3849
|
-
}), A(() => e.isActive, (
|
|
3850
|
-
l.value =
|
|
3855
|
+
}), A(() => e.isActive, (R) => {
|
|
3856
|
+
l.value = R, v(), R || y();
|
|
3851
3857
|
});
|
|
3852
|
-
function
|
|
3853
|
-
|
|
3858
|
+
function V(R) {
|
|
3859
|
+
R.stopPropagation();
|
|
3854
3860
|
}
|
|
3855
3861
|
return () => n(Q, null, [l.value && n("div", {
|
|
3856
3862
|
ref: f,
|
|
3857
|
-
onClick:
|
|
3863
|
+
onClick: V,
|
|
3858
3864
|
class: "farris-loading-backdrop loading-wait"
|
|
3859
3865
|
}, null), l.value && n("div", {
|
|
3860
3866
|
ref: d,
|
|
@@ -3882,9 +3888,9 @@ const Ya = {
|
|
|
3882
3888
|
}, null)])])])]);
|
|
3883
3889
|
}
|
|
3884
3890
|
});
|
|
3885
|
-
let
|
|
3886
|
-
const
|
|
3887
|
-
function
|
|
3891
|
+
let Et = -1;
|
|
3892
|
+
const he = {};
|
|
3893
|
+
function el(e) {
|
|
3888
3894
|
const t = document.createElement("div"), a = e.target || document.body, u = !!e.targetPosition;
|
|
3889
3895
|
let l = "unset";
|
|
3890
3896
|
if (u) {
|
|
@@ -3893,8 +3899,8 @@ function Za(e) {
|
|
|
3893
3899
|
} = window.getComputedStyle(a);
|
|
3894
3900
|
l = s, a.style.position = e.targetPosition;
|
|
3895
3901
|
}
|
|
3896
|
-
const o =
|
|
3897
|
-
|
|
3902
|
+
const o = nl();
|
|
3903
|
+
Et = o;
|
|
3898
3904
|
const i = Ae({
|
|
3899
3905
|
setup() {
|
|
3900
3906
|
const s = c(e.message);
|
|
@@ -3909,61 +3915,61 @@ function Za(e) {
|
|
|
3909
3915
|
d.value && d.value.setLoadingId(o);
|
|
3910
3916
|
});
|
|
3911
3917
|
function r(m) {
|
|
3912
|
-
i.unmount(), m.callback && m.callback(), delete
|
|
3918
|
+
i.unmount(), m.callback && m.callback(), delete he[m.loadingId];
|
|
3913
3919
|
}
|
|
3914
|
-
return
|
|
3920
|
+
return he[o] = d, () => n(De, ae({
|
|
3915
3921
|
ref: d
|
|
3916
3922
|
}, f, {
|
|
3917
3923
|
onClosed: r
|
|
3918
3924
|
}), null);
|
|
3919
3925
|
}
|
|
3920
3926
|
});
|
|
3921
|
-
return a.style = a.style ? a.style : {}, a.appendChild(t), i.use(Z.i18n), i.mount(t),
|
|
3927
|
+
return a.style = a.style ? a.style : {}, a.appendChild(t), i.use(Z.i18n), i.mount(t), he[o];
|
|
3922
3928
|
}
|
|
3923
|
-
function
|
|
3924
|
-
const e = Object.keys(
|
|
3929
|
+
function tl() {
|
|
3930
|
+
const e = Object.keys(he).map((t) => parseInt(t, 10));
|
|
3925
3931
|
return e.length ? Math.max(...e) : 0;
|
|
3926
3932
|
}
|
|
3927
|
-
function
|
|
3928
|
-
return
|
|
3933
|
+
function nl() {
|
|
3934
|
+
return tl() + 1;
|
|
3929
3935
|
}
|
|
3930
|
-
class
|
|
3936
|
+
class jt {
|
|
3931
3937
|
static show(t) {
|
|
3932
3938
|
const u = {
|
|
3933
3939
|
...{
|
|
3934
|
-
...
|
|
3940
|
+
...Za,
|
|
3935
3941
|
isActive: !0,
|
|
3936
3942
|
target: document.body,
|
|
3937
3943
|
targetPosition: ""
|
|
3938
3944
|
},
|
|
3939
3945
|
...t
|
|
3940
3946
|
};
|
|
3941
|
-
return
|
|
3947
|
+
return el(u);
|
|
3942
3948
|
}
|
|
3943
3949
|
static close(t, a = () => {
|
|
3944
3950
|
}) {
|
|
3945
|
-
const l =
|
|
3951
|
+
const l = he[t || Et];
|
|
3946
3952
|
l && l.value.close(a);
|
|
3947
3953
|
}
|
|
3948
3954
|
static clearAll() {
|
|
3949
|
-
const t = Object.keys(
|
|
3955
|
+
const t = Object.keys(he);
|
|
3950
3956
|
t.length && t.forEach((a) => {
|
|
3951
|
-
const u =
|
|
3957
|
+
const u = he[a];
|
|
3952
3958
|
u && u.value.close();
|
|
3953
3959
|
});
|
|
3954
3960
|
}
|
|
3955
3961
|
}
|
|
3956
|
-
|
|
3957
|
-
e.component(
|
|
3962
|
+
De.install = (e) => {
|
|
3963
|
+
e.component(De.name, De), e.provide("FLoadingService", jt);
|
|
3958
3964
|
};
|
|
3959
3965
|
const je = /* @__PURE__ */ Y({
|
|
3960
3966
|
name: "FSchemaSelector",
|
|
3961
|
-
props:
|
|
3967
|
+
props: jn,
|
|
3962
3968
|
emits: ["selectionChange", "cancel", "submit"],
|
|
3963
3969
|
setup(e, t) {
|
|
3964
|
-
const a = c(e.viewType), u = c(e.viewOptions), l = /* @__PURE__ */ new Map([["Card",
|
|
3965
|
-
Ue("F_SCHEMA_SELECTOR_SEARCH_VALUE", i), Ue("FLoadingService",
|
|
3966
|
-
const s =
|
|
3970
|
+
const a = c(e.viewType), u = c(e.viewOptions), l = /* @__PURE__ */ new Map([["Card", Wa], ["Icon", _a], ["List", Ya]]), o = e.injectSymbolToken, i = c("");
|
|
3971
|
+
Ue("F_SCHEMA_SELECTOR_SEARCH_VALUE", i), Ue("FLoadingService", jt);
|
|
3972
|
+
const s = le(o, Xa()), f = /* @__PURE__ */ new Map([["Recent", s.getRecentlyData], ["Recommand", s.getRecommandData], ["Total", s.getSchemaData]]), d = c(), r = c(!1), m = [];
|
|
3967
3973
|
function x(g) {
|
|
3968
3974
|
t.emit("selectionChange", g);
|
|
3969
3975
|
}
|
|
@@ -3975,7 +3981,7 @@ const je = /* @__PURE__ */ Y({
|
|
|
3975
3981
|
function w() {
|
|
3976
3982
|
return u.value.map((g, T) => {
|
|
3977
3983
|
if (l.has(g.type)) {
|
|
3978
|
-
const
|
|
3984
|
+
const h = l.get(g.type), b = {
|
|
3979
3985
|
enableGroup: g.enableGroup || !1,
|
|
3980
3986
|
groupField: g.groupField || "category",
|
|
3981
3987
|
groupFormatter: g.groupFormatter || null,
|
|
@@ -3988,12 +3994,12 @@ const je = /* @__PURE__ */ Y({
|
|
|
3988
3994
|
title: g.title,
|
|
3989
3995
|
class: "container h-100"
|
|
3990
3996
|
}, {
|
|
3991
|
-
default: () => [n(
|
|
3992
|
-
ref: (
|
|
3993
|
-
|
|
3997
|
+
default: () => [n(h, ae({
|
|
3998
|
+
ref: (D) => {
|
|
3999
|
+
D && (m[T] = D);
|
|
3994
4000
|
}
|
|
3995
4001
|
}, b, {
|
|
3996
|
-
onSelectionChange: (
|
|
4002
|
+
onSelectionChange: (D) => x(D)
|
|
3997
4003
|
}), null)]
|
|
3998
4004
|
});
|
|
3999
4005
|
}
|
|
@@ -4006,7 +4012,7 @@ const je = /* @__PURE__ */ Y({
|
|
|
4006
4012
|
i.value = "";
|
|
4007
4013
|
}
|
|
4008
4014
|
function S() {
|
|
4009
|
-
return n(
|
|
4015
|
+
return n(ce, {
|
|
4010
4016
|
showDropdown: !1,
|
|
4011
4017
|
updateOn: "change",
|
|
4012
4018
|
customClass: "f-schema-selector-search",
|
|
@@ -4015,7 +4021,7 @@ const je = /* @__PURE__ */ Y({
|
|
|
4015
4021
|
onClear: C
|
|
4016
4022
|
}, null);
|
|
4017
4023
|
}
|
|
4018
|
-
function
|
|
4024
|
+
function y() {
|
|
4019
4025
|
return n(Le, {
|
|
4020
4026
|
fill: !0,
|
|
4021
4027
|
onTabChange: I
|
|
@@ -4024,9 +4030,9 @@ const je = /* @__PURE__ */ Y({
|
|
|
4024
4030
|
headerSuffix: S
|
|
4025
4031
|
});
|
|
4026
4032
|
}
|
|
4027
|
-
function
|
|
4033
|
+
function P() {
|
|
4028
4034
|
const g = s.getSchemaData, T = s.getNavigationData;
|
|
4029
|
-
return n(
|
|
4035
|
+
return n(qa, {
|
|
4030
4036
|
ref: d,
|
|
4031
4037
|
getData: g,
|
|
4032
4038
|
getCategory: T,
|
|
@@ -4036,7 +4042,7 @@ const je = /* @__PURE__ */ Y({
|
|
|
4036
4042
|
function k() {
|
|
4037
4043
|
t.emit("cancel");
|
|
4038
4044
|
}
|
|
4039
|
-
async function
|
|
4045
|
+
async function V() {
|
|
4040
4046
|
var g, T;
|
|
4041
4047
|
if (!r.value) {
|
|
4042
4048
|
if (r.value = !0, a.value === "NavList") {
|
|
@@ -4050,7 +4056,7 @@ const je = /* @__PURE__ */ Y({
|
|
|
4050
4056
|
t.emit("submit");
|
|
4051
4057
|
}
|
|
4052
4058
|
}
|
|
4053
|
-
const F = (/* @__PURE__ */ new Map([["Tabs",
|
|
4059
|
+
const F = (/* @__PURE__ */ new Map([["Tabs", y], ["NavList", P]])).get(a.value);
|
|
4054
4060
|
return () => n("div", {
|
|
4055
4061
|
class: "f-schema-selector h-100 d-flex flex-column"
|
|
4056
4062
|
}, [F && F(), e.showFooter ? n("div", {
|
|
@@ -4062,10 +4068,10 @@ const je = /* @__PURE__ */ Y({
|
|
|
4062
4068
|
}, [K("取消")]), n("button", {
|
|
4063
4069
|
type: "button",
|
|
4064
4070
|
class: "btn btn-primary",
|
|
4065
|
-
onClick:
|
|
4071
|
+
onClick: V
|
|
4066
4072
|
}, [K("确定")])]) : ""]);
|
|
4067
4073
|
}
|
|
4068
|
-
}),
|
|
4074
|
+
}), al = {
|
|
4069
4075
|
/**
|
|
4070
4076
|
* 标记组件的唯一标识
|
|
4071
4077
|
*/
|
|
@@ -4236,23 +4242,23 @@ const je = /* @__PURE__ */ Y({
|
|
|
4236
4242
|
* 扩展按钮是否禁用
|
|
4237
4243
|
*/
|
|
4238
4244
|
expandDisabled: { type: Boolean, default: !1 }
|
|
4239
|
-
},
|
|
4245
|
+
}, ll = {
|
|
4240
4246
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
4241
4247
|
host: { type: Object },
|
|
4242
4248
|
backgroundColor: { type: String, default: "" }
|
|
4243
4249
|
};
|
|
4244
|
-
function
|
|
4250
|
+
function ol() {
|
|
4245
4251
|
const e = c(!1);
|
|
4246
4252
|
return ne(() => {
|
|
4247
4253
|
e.value = !0;
|
|
4248
4254
|
}), e;
|
|
4249
4255
|
}
|
|
4250
|
-
const
|
|
4256
|
+
const sl = /* @__PURE__ */ Y({
|
|
4251
4257
|
name: "FOverlay",
|
|
4252
|
-
props:
|
|
4258
|
+
props: ll,
|
|
4253
4259
|
emits: ["click"],
|
|
4254
4260
|
setup(e, t) {
|
|
4255
|
-
const a = c(e.popupContentPosition), u = c(e.host), l =
|
|
4261
|
+
const a = c(e.popupContentPosition), u = c(e.host), l = ol(), o = B(() => ({
|
|
4256
4262
|
backgroundColor: e.backgroundColor || "",
|
|
4257
4263
|
pointerEvents: "auto"
|
|
4258
4264
|
}));
|
|
@@ -4279,7 +4285,7 @@ const ll = /* @__PURE__ */ Y({
|
|
|
4279
4285
|
// left: `${position.value.left}px`,
|
|
4280
4286
|
// top: `${position.value.top}px`
|
|
4281
4287
|
}));
|
|
4282
|
-
return () => l.value ? n(
|
|
4288
|
+
return () => l.value ? n(ht, {
|
|
4283
4289
|
to: "body"
|
|
4284
4290
|
}, {
|
|
4285
4291
|
default: () => {
|
|
@@ -4295,13 +4301,13 @@ const ll = /* @__PURE__ */ Y({
|
|
|
4295
4301
|
}) : null;
|
|
4296
4302
|
}
|
|
4297
4303
|
});
|
|
4298
|
-
function
|
|
4304
|
+
function il(e) {
|
|
4299
4305
|
if (e.content && e.content.render)
|
|
4300
4306
|
return e.content.render;
|
|
4301
4307
|
if (e.render && typeof e.render == "function")
|
|
4302
4308
|
return e.render;
|
|
4303
4309
|
}
|
|
4304
|
-
function
|
|
4310
|
+
function ul(e) {
|
|
4305
4311
|
const t = document.createElement("div");
|
|
4306
4312
|
t.style.display = "contents";
|
|
4307
4313
|
let a;
|
|
@@ -4314,8 +4320,8 @@ function sl(e) {
|
|
|
4314
4320
|
xe(() => {
|
|
4315
4321
|
document.body.removeChild(t);
|
|
4316
4322
|
});
|
|
4317
|
-
const o =
|
|
4318
|
-
return () => n(
|
|
4323
|
+
const o = il(e);
|
|
4324
|
+
return () => n(sl, {
|
|
4319
4325
|
"popup-content-position": e.popupPosition,
|
|
4320
4326
|
host: e.host,
|
|
4321
4327
|
onClick: l,
|
|
@@ -4326,12 +4332,12 @@ function sl(e) {
|
|
|
4326
4332
|
}
|
|
4327
4333
|
}), document.body.appendChild(t), a.mount(t), a;
|
|
4328
4334
|
}
|
|
4329
|
-
class
|
|
4335
|
+
class cl {
|
|
4330
4336
|
static show(t) {
|
|
4331
|
-
return
|
|
4337
|
+
return ul(t);
|
|
4332
4338
|
}
|
|
4333
4339
|
}
|
|
4334
|
-
const
|
|
4340
|
+
const rl = {
|
|
4335
4341
|
/**
|
|
4336
4342
|
* 允许点击蒙层关闭对话框
|
|
4337
4343
|
* @default false
|
|
@@ -4530,12 +4536,12 @@ class J {
|
|
|
4530
4536
|
return this.x = t.x, this.y = t.y, this;
|
|
4531
4537
|
}
|
|
4532
4538
|
}
|
|
4533
|
-
class
|
|
4539
|
+
class ge {
|
|
4534
4540
|
constructor(t, a) {
|
|
4535
4541
|
this.width = t, this.height = a;
|
|
4536
4542
|
}
|
|
4537
4543
|
static getCurrent(t) {
|
|
4538
|
-
const a = new
|
|
4544
|
+
const a = new ge(0, 0);
|
|
4539
4545
|
if (window) {
|
|
4540
4546
|
const u = window.getComputedStyle(t);
|
|
4541
4547
|
return u && (a.width = parseInt(u.getPropertyValue("width"), 10), a.height = parseInt(u.getPropertyValue("height"), 10)), a;
|
|
@@ -4543,26 +4549,26 @@ class pe {
|
|
|
4543
4549
|
return null;
|
|
4544
4550
|
}
|
|
4545
4551
|
static copy(t) {
|
|
4546
|
-
return new
|
|
4552
|
+
return new ge(0, 0).set(t);
|
|
4547
4553
|
}
|
|
4548
4554
|
set(t) {
|
|
4549
4555
|
return this.width = t.width, this.height = t.height, this;
|
|
4550
4556
|
}
|
|
4551
4557
|
}
|
|
4552
|
-
function
|
|
4558
|
+
function dl(e, t) {
|
|
4553
4559
|
const a = c(), u = c(), l = c(), o = c(), i = c(), s = c(), f = c(), d = c(), r = c(), m = c(), x = c(), I = c(e.resizeable), w = c(), v = c(e.draggable), C = c(!1);
|
|
4554
4560
|
function S() {
|
|
4555
4561
|
const p = u.value || document.body, O = window.getComputedStyle(p);
|
|
4556
4562
|
if (!O || !a.value)
|
|
4557
4563
|
return;
|
|
4558
|
-
const
|
|
4564
|
+
const E = J.getTransformInfo(a.value), W = {};
|
|
4559
4565
|
f.value && (W.deltaL = a.value.offsetLeft - f.value.x, W.deltaT = a.value.offsetTop - f.value.y);
|
|
4560
4566
|
const U = O.getPropertyValue("position");
|
|
4561
|
-
W.width = p.clientWidth, W.height = p.clientHeight, W.pr = parseInt(O.getPropertyValue("padding-right"), 10), W.pb = parseInt(O.getPropertyValue("padding-bottom"), 10), W.position = O.getPropertyValue("position"), U === "static" && (p.style.position = "relative"), W.translateX =
|
|
4567
|
+
W.width = p.clientWidth, W.height = p.clientHeight, W.pr = parseInt(O.getPropertyValue("padding-right"), 10), W.pb = parseInt(O.getPropertyValue("padding-bottom"), 10), W.position = O.getPropertyValue("position"), U === "static" && (p.style.position = "relative"), W.translateX = E.x, W.translateY = E.y, m.value = W;
|
|
4562
4568
|
}
|
|
4563
|
-
function
|
|
4569
|
+
function y(p) {
|
|
4564
4570
|
if (a.value) {
|
|
4565
|
-
o.value =
|
|
4571
|
+
o.value = ge.getCurrent(a.value), i.value = J.getCurrent(a.value), s.value = o.value ? ge.copy(o.value) : null, f.value = i.value ? J.copy(i.value) : null, S();
|
|
4566
4572
|
const O = p.target.getAttribute("type") || "";
|
|
4567
4573
|
d.value = {
|
|
4568
4574
|
n: !!O.match(/n/),
|
|
@@ -4572,45 +4578,45 @@ function cl(e, t) {
|
|
|
4572
4578
|
};
|
|
4573
4579
|
}
|
|
4574
4580
|
}
|
|
4575
|
-
function
|
|
4576
|
-
var p, O,
|
|
4581
|
+
function P() {
|
|
4582
|
+
var p, O, E, W;
|
|
4577
4583
|
if (a.value) {
|
|
4578
4584
|
const U = a.value;
|
|
4579
|
-
d.value && ((d.value.n || d.value.s) && ((p = s.value) != null && p.height) && (U.style.height = s.value.height + "px"), (d.value.w || d.value.e) && ((O = s.value) != null && O.width) && (U.style.width = s.value.width + "px"), f.value && ((
|
|
4585
|
+
d.value && ((d.value.n || d.value.s) && ((p = s.value) != null && p.height) && (U.style.height = s.value.height + "px"), (d.value.w || d.value.e) && ((O = s.value) != null && O.width) && (U.style.width = s.value.width + "px"), f.value && ((E = f.value) != null && E.x && (U.style.left = f.value.x + "px"), (W = f.value) != null && W.y && (U.style.top = f.value.y + "px")));
|
|
4580
4586
|
}
|
|
4581
4587
|
}
|
|
4582
4588
|
function k() {
|
|
4583
4589
|
const p = e.minHeight ? e.minHeight : 1, O = e.minWidth ? e.minWidth : 1;
|
|
4584
4590
|
s.value && f.value && d.value && o.value && (s.value.height < p && (s.value.height = p, d.value.n && i.value && (f.value.y = i.value.y + (o.value.height - p))), s.value.width < O && (s.value.width = O, d.value.w && i.value && (f.value.x = i.value.x + (o.value.width - O))), e.maxHeight && s.value.height > e.maxHeight && (s.value.height = e.maxHeight, i.value && d.value.n && (f.value.y = i.value.y + (o.value.height - e.maxHeight))), e.maxWidth && s.value.width > e.maxWidth && (s.value.width = e.maxWidth, d.value.w && i.value && (f.value.x = i.value.x + (o.value.width - e.maxWidth))));
|
|
4585
4591
|
}
|
|
4586
|
-
function
|
|
4592
|
+
function V() {
|
|
4587
4593
|
if (u.value) {
|
|
4588
4594
|
const p = m.value;
|
|
4589
4595
|
if (f.value && s.value && d.value && o.value) {
|
|
4590
|
-
const O = p.width - p.pr - p.deltaL - p.translateX - f.value.x,
|
|
4591
|
-
d.value.n && f.value.y + p.translateY < 0 && i.value && (f.value.y = -p.translateY, s.value.height = o.value.height + i.value.y + p.translateY), d.value.w && f.value.x + p.translateX < 0 && i.value && (f.value.x = -p.translateX, s.value.width = o.value.width + i.value.x + p.translateX), s.value.width > O && (s.value.width = O), s.value.height >
|
|
4596
|
+
const O = p.width - p.pr - p.deltaL - p.translateX - f.value.x, E = p.height - p.pb - p.deltaT - p.translateY - f.value.y;
|
|
4597
|
+
d.value.n && f.value.y + p.translateY < 0 && i.value && (f.value.y = -p.translateY, s.value.height = o.value.height + i.value.y + p.translateY), d.value.w && f.value.x + p.translateX < 0 && i.value && (f.value.x = -p.translateX, s.value.width = o.value.width + i.value.x + p.translateX), s.value.width > O && (s.value.width = O), s.value.height > E && (s.value.height = E);
|
|
4592
4598
|
}
|
|
4593
4599
|
}
|
|
4594
4600
|
}
|
|
4595
|
-
function
|
|
4601
|
+
function R(p) {
|
|
4596
4602
|
if (!l.value || !o.value || !i.value || !d.value)
|
|
4597
4603
|
return;
|
|
4598
4604
|
p.subtract(l.value);
|
|
4599
|
-
const O = p.x,
|
|
4600
|
-
d.value.n ? (f.value.y = i.value.y +
|
|
4605
|
+
const O = p.x, E = p.y;
|
|
4606
|
+
d.value.n ? (f.value.y = i.value.y + E, s.value.height = o.value.height - E) : d.value.s && (s.value.height = o.value.height + E), d.value.e ? s.value.width = o.value.width + O : d.value.w && (s.value.width = o.value.width - O, f.value.x = i.value.x + O), V(), k(), P();
|
|
4601
4607
|
}
|
|
4602
4608
|
function F(p) {
|
|
4603
4609
|
if (!r.value)
|
|
4604
4610
|
return;
|
|
4605
4611
|
const O = J.fromEvent(p);
|
|
4606
|
-
O &&
|
|
4612
|
+
O && R(O);
|
|
4607
4613
|
}
|
|
4608
4614
|
function g() {
|
|
4609
4615
|
if (a.value) {
|
|
4610
4616
|
const {
|
|
4611
4617
|
width: p,
|
|
4612
4618
|
height: O,
|
|
4613
|
-
x:
|
|
4619
|
+
x: E,
|
|
4614
4620
|
y: W
|
|
4615
4621
|
} = a.value.getBoundingClientRect(), U = J.getTransformInfo(a.value);
|
|
4616
4622
|
return {
|
|
@@ -4619,7 +4625,7 @@ function cl(e, t) {
|
|
|
4619
4625
|
height: O
|
|
4620
4626
|
},
|
|
4621
4627
|
position: {
|
|
4622
|
-
x:
|
|
4628
|
+
x: E - U.x,
|
|
4623
4629
|
y: W - U.y
|
|
4624
4630
|
}
|
|
4625
4631
|
};
|
|
@@ -4633,13 +4639,13 @@ function cl(e, t) {
|
|
|
4633
4639
|
}
|
|
4634
4640
|
l.value = void 0, o.value = null, i.value = null, s.value = null, f.value = null, d.value = null, r.value = null, document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", T);
|
|
4635
4641
|
}
|
|
4636
|
-
function
|
|
4642
|
+
function h() {
|
|
4637
4643
|
document.addEventListener("mousemove", F), document.addEventListener("mouseup", T);
|
|
4638
4644
|
}
|
|
4639
4645
|
function b(p) {
|
|
4640
|
-
p instanceof MouseEvent && p.button === 2 || v.value && (document.body.click(), p.stopPropagation(), p.preventDefault(), l.value = J.fromEvent(p), r.value = p.target,
|
|
4646
|
+
p instanceof MouseEvent && p.button === 2 || v.value && (document.body.click(), p.stopPropagation(), p.preventDefault(), l.value = J.fromEvent(p), r.value = p.target, y(p), h());
|
|
4641
4647
|
}
|
|
4642
|
-
function
|
|
4648
|
+
function D(p) {
|
|
4643
4649
|
return a.value = p, I.value && n(Q, null, [n("div", {
|
|
4644
4650
|
class: "fv-resizable-handle fv-resizable-n",
|
|
4645
4651
|
type: "n",
|
|
@@ -4676,8 +4682,8 @@ function cl(e, t) {
|
|
|
4676
4682
|
}
|
|
4677
4683
|
function j(p = !0) {
|
|
4678
4684
|
document.body.click();
|
|
4679
|
-
const O = u.value || document.body,
|
|
4680
|
-
p && W && (w.value = g(), w.value.transform = W.style.transform),
|
|
4685
|
+
const O = u.value || document.body, E = ge.getCurrent(O), W = a.value;
|
|
4686
|
+
p && W && (w.value = g(), w.value.transform = W.style.transform), E && W && (s.value = E, s.value.height -= 14, s.value.width -= 14, W.style.height = s.value.height + "px", W.style.width = s.value.width + "px", W.style.left = "7px", W.style.top = "7px", W.style.transform = "", x.value = {
|
|
4681
4687
|
size: s.value,
|
|
4682
4688
|
position: {
|
|
4683
4689
|
x: 0,
|
|
@@ -4688,34 +4694,34 @@ function cl(e, t) {
|
|
|
4688
4694
|
function $() {
|
|
4689
4695
|
var p, O;
|
|
4690
4696
|
if (document.body.click(), w.value) {
|
|
4691
|
-
const
|
|
4697
|
+
const E = {
|
|
4692
4698
|
width: w.value.size.width || 0,
|
|
4693
4699
|
height: w.value.size.height || 0
|
|
4694
4700
|
}, W = {
|
|
4695
|
-
x: (window.innerWidth -
|
|
4696
|
-
y: (window.innerHeight -
|
|
4701
|
+
x: (window.innerWidth - E.width) / 2,
|
|
4702
|
+
y: (window.innerHeight - E.height) / 2
|
|
4697
4703
|
};
|
|
4698
|
-
(p = s.value) == null || p.set(
|
|
4704
|
+
(p = s.value) == null || p.set(E), (O = f.value) == null || O.set(W);
|
|
4699
4705
|
const U = a.value;
|
|
4700
|
-
U.style.height =
|
|
4701
|
-
size:
|
|
4706
|
+
U.style.height = E.height + "px", U.style.width = E.width + "px", U.style.left = `${W.x}px`, U.style.top = `${W.y}px`, U.style.transform = "", x.value = {
|
|
4707
|
+
size: E,
|
|
4702
4708
|
position: W
|
|
4703
4709
|
}, v.value = e.draggable, C.value = !1;
|
|
4704
4710
|
}
|
|
4705
4711
|
}
|
|
4706
4712
|
function H() {
|
|
4707
4713
|
if (a.value) {
|
|
4708
|
-
const p =
|
|
4714
|
+
const p = ge.getCurrent(a.value);
|
|
4709
4715
|
if (p) {
|
|
4710
4716
|
const {
|
|
4711
4717
|
width: O,
|
|
4712
|
-
height:
|
|
4718
|
+
height: E
|
|
4713
4719
|
} = p;
|
|
4714
|
-
a.value.style.left = `${(window.innerWidth - O) / 2}px`, a.value.style.top = `${(window.innerHeight -
|
|
4720
|
+
a.value.style.left = `${(window.innerWidth - O) / 2}px`, a.value.style.top = `${(window.innerHeight - E) / 2}px`, a.value.style.transform = "";
|
|
4715
4721
|
}
|
|
4716
4722
|
}
|
|
4717
4723
|
}
|
|
4718
|
-
function
|
|
4724
|
+
function L() {
|
|
4719
4725
|
const p = () => {
|
|
4720
4726
|
C.value ? j(!1) : H(), document.body.click();
|
|
4721
4727
|
};
|
|
@@ -4723,9 +4729,9 @@ function cl(e, t) {
|
|
|
4723
4729
|
window.removeEventListener("resize", p);
|
|
4724
4730
|
};
|
|
4725
4731
|
}
|
|
4726
|
-
const N =
|
|
4732
|
+
const N = L();
|
|
4727
4733
|
return {
|
|
4728
|
-
renderResizeBar:
|
|
4734
|
+
renderResizeBar: D,
|
|
4729
4735
|
boundingElement: u,
|
|
4730
4736
|
resizedEventParam: x,
|
|
4731
4737
|
maximize: j,
|
|
@@ -4736,7 +4742,7 @@ function cl(e, t) {
|
|
|
4736
4742
|
moveToCenter: H
|
|
4737
4743
|
};
|
|
4738
4744
|
}
|
|
4739
|
-
function
|
|
4745
|
+
function fl(e, t, a) {
|
|
4740
4746
|
const u = c(), l = c(e.draggable), o = c(e.lockAxis), i = c(), s = c(), f = c(!1), d = c(new J(0, 0)), r = c(new J(0, 0)), m = c(new J(0, 0)), x = c(new J(0, 0));
|
|
4741
4747
|
A(() => a.value, (F) => {
|
|
4742
4748
|
i.value.style.cursor = F ? "move" : "default";
|
|
@@ -4752,9 +4758,9 @@ function rl(e, t, a) {
|
|
|
4752
4758
|
return !1;
|
|
4753
4759
|
}
|
|
4754
4760
|
function w() {
|
|
4755
|
-
var
|
|
4761
|
+
var h, b;
|
|
4756
4762
|
let F = m.value.x + r.value.x, g = m.value.y + r.value.y;
|
|
4757
|
-
o.value === "x" ? (F = ((
|
|
4763
|
+
o.value === "x" ? (F = ((h = d.value) == null ? void 0 : h.x) || 0, m.value.x = 0) : o.value === "y" && (g = ((b = d.value) == null ? void 0 : b.y) || 0, m.value.y = 0);
|
|
4758
4764
|
const T = `translate3d(${Math.round(F)}px, ${Math.round(g)}px, 0px)`;
|
|
4759
4765
|
u.value && (u.value.style.transform = T), x.value.x = F, x.value.y = g;
|
|
4760
4766
|
}
|
|
@@ -4775,18 +4781,18 @@ function rl(e, t, a) {
|
|
|
4775
4781
|
function S(F) {
|
|
4776
4782
|
f.value && l.value && (F.stopPropagation(), F.preventDefault(), C(J.fromEvent(F, i.value)));
|
|
4777
4783
|
}
|
|
4778
|
-
function
|
|
4784
|
+
function y() {
|
|
4779
4785
|
var F;
|
|
4780
4786
|
if (f.value) {
|
|
4781
4787
|
if (f.value = !1, r.value.add(m.value), m.value.reset(), (F = u.value) == null || F.classList.remove("ng-dragging"), !e.useTransform && u.value) {
|
|
4782
4788
|
const { left: g, top: T } = u.value.getBoundingClientRect();
|
|
4783
4789
|
u.value.style.left = Math.ceil(g) + "px", u.value.style.top = Math.ceil(T) + "px", u.value.style.transform = "none";
|
|
4784
4790
|
}
|
|
4785
|
-
t.emit("stopMove"), document.removeEventListener("mousemove", S), document.removeEventListener("mouseup",
|
|
4791
|
+
t.emit("stopMove"), document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", y);
|
|
4786
4792
|
}
|
|
4787
4793
|
}
|
|
4788
|
-
function
|
|
4789
|
-
!f.value && i.value && (f.value = !0, i.value.classList.add("ng-dragging"), document.addEventListener("mousemove", S), document.addEventListener("mouseup",
|
|
4794
|
+
function P() {
|
|
4795
|
+
!f.value && i.value && (f.value = !0, i.value.classList.add("ng-dragging"), document.addEventListener("mousemove", S), document.addEventListener("mouseup", y));
|
|
4790
4796
|
}
|
|
4791
4797
|
function k() {
|
|
4792
4798
|
if (u.value) {
|
|
@@ -4796,13 +4802,13 @@ function rl(e, t, a) {
|
|
|
4796
4802
|
}
|
|
4797
4803
|
r.value.reset();
|
|
4798
4804
|
}
|
|
4799
|
-
function
|
|
4805
|
+
function V(F) {
|
|
4800
4806
|
if (!a.value || F instanceof MouseEvent && F.button === 2)
|
|
4801
4807
|
return;
|
|
4802
4808
|
const g = F.target || F.srcElement;
|
|
4803
|
-
i.value !== void 0 && g && !I(g, i.value) || l.value !== !1 && (document.body.click(), F.stopPropagation(), F.preventDefault(), d.value = J.fromEvent(F, u.value), k(),
|
|
4809
|
+
i.value !== void 0 && g && !I(g, i.value) || l.value !== !1 && (document.body.click(), F.stopPropagation(), F.preventDefault(), d.value = J.fromEvent(F, u.value), k(), P());
|
|
4804
4810
|
}
|
|
4805
|
-
function
|
|
4811
|
+
function R(F, g, T) {
|
|
4806
4812
|
if (l.value && g) {
|
|
4807
4813
|
if (F)
|
|
4808
4814
|
i.value = F;
|
|
@@ -4810,19 +4816,19 @@ function rl(e, t, a) {
|
|
|
4810
4816
|
if (e.dragHandle instanceof HTMLElement)
|
|
4811
4817
|
i.value = e.dragHandle;
|
|
4812
4818
|
else if (typeof e.dragHandle == "string") {
|
|
4813
|
-
const
|
|
4814
|
-
|
|
4819
|
+
const h = g.querySelector(e.dragHandle);
|
|
4820
|
+
h && (i.value = h);
|
|
4815
4821
|
}
|
|
4816
4822
|
}
|
|
4817
|
-
u.value = g, s.value = T, i.value ? (i.value.classList.add("ng-draggable"), i.value.addEventListener("mousedown",
|
|
4823
|
+
u.value = g, s.value = T, i.value ? (i.value.classList.add("ng-draggable"), i.value.addEventListener("mousedown", V)) : l.value = !1;
|
|
4818
4824
|
}
|
|
4819
4825
|
}
|
|
4820
4826
|
return {
|
|
4821
|
-
registerDraggle:
|
|
4827
|
+
registerDraggle: R,
|
|
4822
4828
|
resetTranslate: k
|
|
4823
4829
|
};
|
|
4824
4830
|
}
|
|
4825
|
-
function
|
|
4831
|
+
function Nt(e, t) {
|
|
4826
4832
|
if (e) {
|
|
4827
4833
|
const a = (u) => {
|
|
4828
4834
|
u.key.toLowerCase() === e.toLowerCase() && t({ event: u, key: e });
|
|
@@ -4832,19 +4838,19 @@ function Dt(e, t) {
|
|
|
4832
4838
|
};
|
|
4833
4839
|
}
|
|
4834
4840
|
}
|
|
4835
|
-
function
|
|
4841
|
+
function vl(e, t) {
|
|
4836
4842
|
const a = c(e.enableEsc);
|
|
4837
4843
|
let u = null;
|
|
4838
|
-
return a.value ? (u =
|
|
4844
|
+
return a.value ? (u = Nt("Escape", (l) => {
|
|
4839
4845
|
t.emit("esc", { event: l.event, type: "esc" });
|
|
4840
4846
|
}), {
|
|
4841
4847
|
remove: u
|
|
4842
4848
|
}) : null;
|
|
4843
4849
|
}
|
|
4844
|
-
function
|
|
4850
|
+
function ml(e, t) {
|
|
4845
4851
|
const a = c(e.enableEnter);
|
|
4846
4852
|
let u = null;
|
|
4847
|
-
return a.value ? (u =
|
|
4853
|
+
return a.value ? (u = Nt("Enter", (l) => {
|
|
4848
4854
|
t.emit("enter", { event: l.event, type: "enter" });
|
|
4849
4855
|
}), {
|
|
4850
4856
|
remove: u
|
|
@@ -4852,17 +4858,17 @@ function fl(e, t) {
|
|
|
4852
4858
|
}
|
|
4853
4859
|
const Pe = /* @__PURE__ */ Y({
|
|
4854
4860
|
name: "FModal",
|
|
4855
|
-
props:
|
|
4861
|
+
props: rl,
|
|
4856
4862
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter", "stopMove", "buttonClick"],
|
|
4857
4863
|
setup(e, t) {
|
|
4858
|
-
const a = c(e.width || 300), u = c(e.height || 200), l = c(e.modelValue), o = c(""), i = c(e.class), s = c(e.fitContent), f = c(e.showHeader), d = c(""), r = c(e.showCloseButton), m = c(e.showMaxButton), x = c(!1), I = c(e.dialogType), w = c(e.src), v = c(""), C = c(e.showButtons), S = c(e.title),
|
|
4864
|
+
const a = c(e.width || 300), u = c(e.height || 200), l = c(e.modelValue), o = c(""), i = c(e.class), s = c(e.fitContent), f = c(e.showHeader), d = c(""), r = c(e.showCloseButton), m = c(e.showMaxButton), x = c(!1), I = c(e.dialogType), w = c(e.src), v = c(""), C = c(e.showButtons), S = c(e.title), y = c(e.containment || null), P = c();
|
|
4859
4865
|
S.value === "错误提示" && (S.value = Z.getLocaleValue("messageBox.errorTitle"));
|
|
4860
4866
|
const k = c(!1);
|
|
4861
|
-
function
|
|
4867
|
+
function V() {
|
|
4862
4868
|
const M = document.querySelectorAll(".farris-modal").length;
|
|
4863
|
-
(!M || M - 1 <= 0) &&
|
|
4869
|
+
(!M || M - 1 <= 0) && P.value === document.querySelectorAll(".farris-modal")[0] && document.body.classList.remove("modal-open"), P.value && P.value.classList.remove("show");
|
|
4864
4870
|
}
|
|
4865
|
-
function
|
|
4871
|
+
function R(M, z) {
|
|
4866
4872
|
const q = z ? "accept" : "cancel";
|
|
4867
4873
|
Promise.resolve().then(() => {
|
|
4868
4874
|
var X;
|
|
@@ -4870,7 +4876,7 @@ const Pe = /* @__PURE__ */ Y({
|
|
|
4870
4876
|
closeType: q
|
|
4871
4877
|
});
|
|
4872
4878
|
}).then((X) => {
|
|
4873
|
-
X && (l.value = !1, t.emit("update:modelValue", !1), z != null && t.emit(z ? "accept" : "cancel"), t.emit("closed", M),
|
|
4879
|
+
X && (l.value = !1, t.emit("update:modelValue", !1), z != null && t.emit(z ? "accept" : "cancel"), t.emit("closed", M), V());
|
|
4874
4880
|
});
|
|
4875
4881
|
}
|
|
4876
4882
|
const F = [{
|
|
@@ -4878,36 +4884,36 @@ const Pe = /* @__PURE__ */ Y({
|
|
|
4878
4884
|
text: Z.getLocaleValue("messageBox.cancel") || "取消",
|
|
4879
4885
|
class: "btn btn-secondary",
|
|
4880
4886
|
handle: (M) => {
|
|
4881
|
-
|
|
4887
|
+
R(M, !1);
|
|
4882
4888
|
}
|
|
4883
4889
|
}, {
|
|
4884
4890
|
name: "accept",
|
|
4885
4891
|
text: Z.getLocaleValue("messageBox.ok") || "确定",
|
|
4886
4892
|
class: "btn btn-primary",
|
|
4887
4893
|
handle: (M) => {
|
|
4888
|
-
|
|
4894
|
+
R(M, !0);
|
|
4889
4895
|
}
|
|
4890
|
-
}], g = c(e.buttons && e.buttons.length ? e.buttons : F), T = B(() => !!d.value),
|
|
4896
|
+
}], g = c(e.buttons && e.buttons.length ? e.buttons : F), T = B(() => !!d.value), h = B(() => !!C.value && !!g.value), b = c(), D = c(), j = c(e.maximized || !1), {
|
|
4891
4897
|
renderResizeBar: $,
|
|
4892
4898
|
maximize: H,
|
|
4893
|
-
restore:
|
|
4899
|
+
restore: L,
|
|
4894
4900
|
boundingElement: N,
|
|
4895
4901
|
resizedEventParam: p,
|
|
4896
4902
|
allowDrag: O,
|
|
4897
|
-
unWindowResizeHandle:
|
|
4903
|
+
unWindowResizeHandle: E,
|
|
4898
4904
|
moveToCenter: W
|
|
4899
|
-
} =
|
|
4905
|
+
} = dl(e), {
|
|
4900
4906
|
registerDraggle: U
|
|
4901
|
-
} =
|
|
4902
|
-
function
|
|
4907
|
+
} = fl(e, t, O);
|
|
4908
|
+
function de() {
|
|
4903
4909
|
return !!document.querySelectorAll(".farris-modal").length && document.body.classList.contains("modal-open");
|
|
4904
4910
|
}
|
|
4905
4911
|
A(() => e.title, (M, z) => {
|
|
4906
4912
|
M !== z && (S.value = M);
|
|
4907
4913
|
}), A(() => e.modelValue, (M, z) => {
|
|
4908
4914
|
M !== z && (l.value = M, l.value && e.draggable && te(() => {
|
|
4909
|
-
|
|
4910
|
-
}), M || (
|
|
4915
|
+
D.value && !y.value && (y.value = D.value.parentElement, N.value = y.value, U(b.value, D.value, N.value), W());
|
|
4916
|
+
}), M || (y.value && (y.value = null), V())), l.value ? k.value = de() : (j.value = !1, O.value = e.draggable);
|
|
4911
4917
|
}), A(() => e.showHeader, (M, z) => {
|
|
4912
4918
|
M !== z && (f.value = M);
|
|
4913
4919
|
}), A(() => e.showButtons, (M, z) => {
|
|
@@ -4924,7 +4930,7 @@ const Pe = /* @__PURE__ */ Y({
|
|
|
4924
4930
|
}), A(() => e.class, (M, z) => {
|
|
4925
4931
|
i.value = M;
|
|
4926
4932
|
});
|
|
4927
|
-
const
|
|
4933
|
+
const se = B(() => (l.value && document.body.classList.add("modal-open"), l.value)), Ie = B(() => {
|
|
4928
4934
|
var q;
|
|
4929
4935
|
const M = {
|
|
4930
4936
|
modal: !0,
|
|
@@ -4932,15 +4938,15 @@ const Pe = /* @__PURE__ */ Y({
|
|
|
4932
4938
|
fade: !0,
|
|
4933
4939
|
"fe-cmp-page-modal": !!e.showFloatingClose
|
|
4934
4940
|
};
|
|
4935
|
-
M["f-modal-fitContent"] = !!s.value, M.show = !!
|
|
4941
|
+
M["f-modal-fitContent"] = !!s.value, M.show = !!se.value;
|
|
4936
4942
|
const z = (q = e.maskClass) == null ? void 0 : q.split(" ");
|
|
4937
|
-
return z == null || z.reduce((X,
|
|
4938
|
-
}),
|
|
4943
|
+
return z == null || z.reduce((X, me) => (X[me] = !0, X), M), M;
|
|
4944
|
+
}), ye = B(() => {
|
|
4939
4945
|
var q;
|
|
4940
4946
|
const M = {
|
|
4941
4947
|
"modal-dialog": !0
|
|
4942
4948
|
}, z = (q = i.value) == null ? void 0 : q.split(" ");
|
|
4943
|
-
return z == null || z.reduce((X,
|
|
4949
|
+
return z == null || z.reduce((X, me) => (X[me] = !0, X), M), M;
|
|
4944
4950
|
}), Te = () => Ce() && !e.isMessager || !!e.fullscreen, Be = B(() => {
|
|
4945
4951
|
const M = document.documentElement.clientWidth, z = document.documentElement.clientHeight;
|
|
4946
4952
|
if (j.value)
|
|
@@ -4952,20 +4958,20 @@ const Pe = /* @__PURE__ */ Y({
|
|
|
4952
4958
|
height: "100vh",
|
|
4953
4959
|
margin: "0"
|
|
4954
4960
|
};
|
|
4955
|
-
const q = Math.min(a.value, M), X = e.position === "right" ? "100%" : s.value ? "auto" : `${Math.min(u.value, z - 10)}px`,
|
|
4961
|
+
const q = Math.min(a.value, M), X = e.position === "right" ? "100%" : s.value ? "auto" : `${Math.min(u.value, z - 10)}px`, me = `${(window.innerHeight - (X === "100%" || X === "auto" ? 0 : parseInt(X))) / 2}px`, Xt = e.position === "right" ? `${window.innerWidth - q}px` : `${(window.innerWidth - q) / 2}px`, at = {
|
|
4956
4962
|
position: "absolute",
|
|
4957
|
-
top:
|
|
4958
|
-
left:
|
|
4963
|
+
top: me,
|
|
4964
|
+
left: Xt,
|
|
4959
4965
|
width: Ce() ? "auto" : `${q}px`,
|
|
4960
4966
|
height: X
|
|
4961
4967
|
};
|
|
4962
4968
|
return e.mask || (at.pointerEvents = "auto"), at;
|
|
4963
|
-
}),
|
|
4969
|
+
}), fe = c(ot() || 1050), ke = B(() => {
|
|
4964
4970
|
const M = {
|
|
4965
4971
|
display: "block",
|
|
4966
4972
|
overflow: "hidden"
|
|
4967
4973
|
};
|
|
4968
|
-
return e.mask || (M.pointerEvents = "none", M.backgroundColor = "transparent"), k.value && (M.backgroundColor = "transparent"), M.zIndex =
|
|
4974
|
+
return e.mask || (M.pointerEvents = "none", M.backgroundColor = "transparent"), k.value && (M.backgroundColor = "transparent"), M.zIndex = fe.value, M;
|
|
4969
4975
|
}), Fe = B(() => ({
|
|
4970
4976
|
"modal-content": !0,
|
|
4971
4977
|
"modal-content-has-header": f.value,
|
|
@@ -4979,7 +4985,7 @@ const Pe = /* @__PURE__ */ Y({
|
|
|
4979
4985
|
"f-icon": !0,
|
|
4980
4986
|
modal_maximize: !0,
|
|
4981
4987
|
modalrevert: j.value
|
|
4982
|
-
})),
|
|
4988
|
+
})), ie = B(() => ({
|
|
4983
4989
|
"modal-body": !0,
|
|
4984
4990
|
"f-utils-flex-column": I.value === "iframe",
|
|
4985
4991
|
"f-utils-fill": !0
|
|
@@ -4997,7 +5003,7 @@ const Pe = /* @__PURE__ */ Y({
|
|
|
4997
5003
|
});
|
|
4998
5004
|
function Ve(M) {
|
|
4999
5005
|
if (M == null || M.stopPropagation(), j.value) {
|
|
5000
|
-
j.value = !1,
|
|
5006
|
+
j.value = !1, L();
|
|
5001
5007
|
return;
|
|
5002
5008
|
}
|
|
5003
5009
|
H(), j.value = !0;
|
|
@@ -5011,17 +5017,17 @@ const Pe = /* @__PURE__ */ Y({
|
|
|
5011
5017
|
function tt(M) {
|
|
5012
5018
|
M.width && (a.value = M.width), M.height && (u.value = M.height), M.buttons && (g.value = M.buttons), M.title && (S.value = M.title);
|
|
5013
5019
|
}
|
|
5014
|
-
let
|
|
5015
|
-
|
|
5016
|
-
k.value =
|
|
5020
|
+
let be = null, _ = null;
|
|
5021
|
+
tn(() => {
|
|
5022
|
+
k.value = de();
|
|
5017
5023
|
}), ne(() => {
|
|
5018
|
-
|
|
5024
|
+
D.value && !y.value && (y.value = D.value.parentElement, N.value = y.value, U(b.value, D.value, N.value)), se.value && document.body.classList.add("modal-open"), be = vl(e, t), _ = ml(e, t);
|
|
5019
5025
|
}), xe(() => {
|
|
5020
|
-
|
|
5026
|
+
E && E(), be && be.remove(), _ && _.remove();
|
|
5021
5027
|
}), t.expose({
|
|
5022
|
-
modalElementRef:
|
|
5028
|
+
modalElementRef: D,
|
|
5023
5029
|
updateModalOptions: tt,
|
|
5024
|
-
close:
|
|
5030
|
+
close: R,
|
|
5025
5031
|
maxDialog: Ve,
|
|
5026
5032
|
isMaximized: j,
|
|
5027
5033
|
disableButtons: (M, z = !0) => {
|
|
@@ -5030,17 +5036,17 @@ const Pe = /* @__PURE__ */ Y({
|
|
|
5030
5036
|
});
|
|
5031
5037
|
}
|
|
5032
5038
|
});
|
|
5033
|
-
function
|
|
5039
|
+
function oe() {
|
|
5034
5040
|
return n("div", {
|
|
5035
5041
|
class: "action-wrapper",
|
|
5036
|
-
onClick: (M) =>
|
|
5042
|
+
onClick: (M) => R(M, !1)
|
|
5037
5043
|
}, [n("span", {
|
|
5038
5044
|
class: "close-icon"
|
|
5039
5045
|
}, [n("i", {
|
|
5040
5046
|
class: "f-icon f-icon-close"
|
|
5041
5047
|
}, null)])]);
|
|
5042
5048
|
}
|
|
5043
|
-
function
|
|
5049
|
+
function ve() {
|
|
5044
5050
|
return n("ul", null, [x.value && n("li", {
|
|
5045
5051
|
class: "f-btn-icon f-bare"
|
|
5046
5052
|
}, [n("span", {
|
|
@@ -5053,13 +5059,13 @@ const Pe = /* @__PURE__ */ Y({
|
|
|
5053
5059
|
class: ee.value
|
|
5054
5060
|
}, null)]), r.value && n("li", {
|
|
5055
5061
|
class: "f-btn-icon f-bare",
|
|
5056
|
-
onClick: (M) =>
|
|
5062
|
+
onClick: (M) => R(M, !1),
|
|
5057
5063
|
style: "pointer-events: auto;"
|
|
5058
5064
|
}, [n("span", {
|
|
5059
5065
|
class: "f-icon modal_close"
|
|
5060
5066
|
}, null)])]);
|
|
5061
5067
|
}
|
|
5062
|
-
const
|
|
5068
|
+
const we = (M) => {
|
|
5063
5069
|
M.preventDefault();
|
|
5064
5070
|
const z = M.currentTarget, q = M.deltaY * 0.5;
|
|
5065
5071
|
z.scrollLeft += q;
|
|
@@ -5070,20 +5076,20 @@ const Pe = /* @__PURE__ */ Y({
|
|
|
5070
5076
|
style: $e.value
|
|
5071
5077
|
}, [g.value && n("div", {
|
|
5072
5078
|
class: "buttons",
|
|
5073
|
-
onWheel:
|
|
5079
|
+
onWheel: we
|
|
5074
5080
|
}, [g.value.map((M) => {
|
|
5075
5081
|
var X;
|
|
5076
|
-
const z = c(M.disabled), q = M.class || ((X = M.appearance) == null ? void 0 : X.class);
|
|
5077
|
-
return n("button", {
|
|
5082
|
+
const z = c(M.disabled), q = M.class || ((X = M.appearance) == null ? void 0 : X.class) || "btn btn-secondary";
|
|
5083
|
+
return n("button", ae(yt(M), {
|
|
5078
5084
|
name: M.name,
|
|
5079
5085
|
style: M.styles,
|
|
5080
5086
|
type: "button",
|
|
5081
5087
|
disabled: z.value,
|
|
5082
5088
|
class: q + (M.iconClass ? " btn-icontext" : "") + (M.visible === !1 ? "d-none" : ""),
|
|
5083
|
-
onClick: (
|
|
5084
|
-
We(M,
|
|
5089
|
+
onClick: (me) => {
|
|
5090
|
+
We(M, me);
|
|
5085
5091
|
}
|
|
5086
|
-
}, [!!M.iconClass && n("i", {
|
|
5092
|
+
}), [!!M.iconClass && n("i", {
|
|
5087
5093
|
class: M.iconClass
|
|
5088
5094
|
}, null), M.text]);
|
|
5089
5095
|
})])]);
|
|
@@ -5091,7 +5097,7 @@ const Pe = /* @__PURE__ */ Y({
|
|
|
5091
5097
|
function nt(M) {
|
|
5092
5098
|
m.value && Ve();
|
|
5093
5099
|
}
|
|
5094
|
-
function
|
|
5100
|
+
function _t() {
|
|
5095
5101
|
return n(Q, null, [j.value && n("div", {
|
|
5096
5102
|
class: "modal-header",
|
|
5097
5103
|
style: "position: absolute;background: transparent;height: 45px;width: 100%;",
|
|
@@ -5110,66 +5116,66 @@ const Pe = /* @__PURE__ */ Y({
|
|
|
5110
5116
|
class: "modal-title-label"
|
|
5111
5117
|
}, [S.value])]), n("div", {
|
|
5112
5118
|
class: "actions"
|
|
5113
|
-
}, [
|
|
5119
|
+
}, [ve()])])]);
|
|
5114
5120
|
}
|
|
5115
|
-
function
|
|
5116
|
-
return t.slots.footerTemplate ? t.slots.footerTemplate() :
|
|
5121
|
+
function Gt() {
|
|
5122
|
+
return t.slots.footerTemplate ? t.slots.footerTemplate() : h.value && Oe();
|
|
5117
5123
|
}
|
|
5118
|
-
function
|
|
5124
|
+
function Ut(M) {
|
|
5119
5125
|
if (M.stopPropagation(), e.allowClickMaskToClose) {
|
|
5120
|
-
if (M.target !==
|
|
5126
|
+
if (M.target !== P.value)
|
|
5121
5127
|
return;
|
|
5122
|
-
|
|
5128
|
+
R(M, !1);
|
|
5123
5129
|
}
|
|
5124
5130
|
}
|
|
5125
|
-
function
|
|
5131
|
+
function qt() {
|
|
5126
5132
|
var M, z;
|
|
5127
5133
|
return n("div", {
|
|
5128
5134
|
id: o.value,
|
|
5129
|
-
class:
|
|
5135
|
+
class: ye.value,
|
|
5130
5136
|
style: Be.value,
|
|
5131
|
-
ref:
|
|
5132
|
-
}, [e.showFloatingClose &&
|
|
5137
|
+
ref: D
|
|
5138
|
+
}, [e.showFloatingClose && oe(), n("div", {
|
|
5133
5139
|
class: Fe.value
|
|
5134
|
-
}, [f.value &&
|
|
5135
|
-
class:
|
|
5140
|
+
}, [f.value && _t(), n("div", {
|
|
5141
|
+
class: ie.value
|
|
5136
5142
|
}, [(z = (M = t.slots).default) == null ? void 0 : z.call(M), I.value === "iframe" && n("iframe", {
|
|
5137
5143
|
title: o.value,
|
|
5138
5144
|
class: "f-utils-fill",
|
|
5139
5145
|
width: "100%",
|
|
5140
5146
|
frameborder: "0",
|
|
5141
5147
|
src: w.value
|
|
5142
|
-
}, null)]),
|
|
5148
|
+
}, null)]), Gt()]), !s.value && D.value && !j.value && $(D.value)]);
|
|
5143
5149
|
}
|
|
5144
|
-
function
|
|
5150
|
+
function Yt(M) {
|
|
5145
5151
|
return M || "body";
|
|
5146
5152
|
}
|
|
5147
|
-
return
|
|
5148
|
-
|
|
5149
|
-
}), () => n(
|
|
5150
|
-
to:
|
|
5153
|
+
return pt(() => {
|
|
5154
|
+
se.value && (fe.value = ot() || 1050);
|
|
5155
|
+
}), () => n(ht, {
|
|
5156
|
+
to: Yt(e.host)
|
|
5151
5157
|
}, {
|
|
5152
|
-
default: () => [
|
|
5158
|
+
default: () => [se.value && n(gt, {
|
|
5153
5159
|
name: "fade",
|
|
5154
5160
|
appear: !0
|
|
5155
5161
|
}, {
|
|
5156
5162
|
default: () => [n("div", {
|
|
5157
|
-
ref:
|
|
5163
|
+
ref: P,
|
|
5158
5164
|
class: Ie.value,
|
|
5159
5165
|
style: ke.value,
|
|
5160
|
-
onClick:
|
|
5161
|
-
}, [
|
|
5166
|
+
onClick: Ut
|
|
5167
|
+
}, [qt()])]
|
|
5162
5168
|
})]
|
|
5163
5169
|
});
|
|
5164
5170
|
}
|
|
5165
5171
|
});
|
|
5166
|
-
function
|
|
5172
|
+
function At(e) {
|
|
5167
5173
|
if (e.content && e.content.render)
|
|
5168
5174
|
return e.content.render;
|
|
5169
5175
|
if (e.render && typeof e.render == "function")
|
|
5170
5176
|
return e.render;
|
|
5171
5177
|
}
|
|
5172
|
-
function
|
|
5178
|
+
function pl(e) {
|
|
5173
5179
|
const t = document.createElement("div");
|
|
5174
5180
|
t.style.display = "contents";
|
|
5175
5181
|
const a = e.type || "modal", u = Ae({
|
|
@@ -5177,9 +5183,9 @@ function vl(e) {
|
|
|
5177
5183
|
xe(() => {
|
|
5178
5184
|
document.body.removeChild(t);
|
|
5179
5185
|
});
|
|
5180
|
-
const i = c(), s = c(e.class || ""), f = c(!0), d = c(e.title || ""), r =
|
|
5181
|
-
}), x = (
|
|
5182
|
-
f.value = !1, u.unmount(), m(
|
|
5186
|
+
const i = c(), s = c(e.class || ""), f = c(!0), d = c(e.title || ""), r = At(e), m = e.closedCallback || ((V) => {
|
|
5187
|
+
}), x = (V) => {
|
|
5188
|
+
f.value = !1, u.unmount(), m(V);
|
|
5183
5189
|
};
|
|
5184
5190
|
if (o.expose({
|
|
5185
5191
|
ref: i
|
|
@@ -5187,7 +5193,7 @@ function vl(e) {
|
|
|
5187
5193
|
return () => n(Je, {
|
|
5188
5194
|
ref: i,
|
|
5189
5195
|
modelValue: f.value,
|
|
5190
|
-
"onUpdate:modelValue": (
|
|
5196
|
+
"onUpdate:modelValue": (V) => f.value = V,
|
|
5191
5197
|
id: "modal-service-drawer",
|
|
5192
5198
|
title: d.value,
|
|
5193
5199
|
width: e.width,
|
|
@@ -5208,15 +5214,15 @@ function vl(e) {
|
|
|
5208
5214
|
default: () => [r && r(u)]
|
|
5209
5215
|
});
|
|
5210
5216
|
const I = c(!!e.showButtons), w = c(!!e.showHeader), v = c(e.showCloseButton == null ? !0 : e.showCloseButton), C = c(!!e.showFloatingClose), S = e.acceptCallback || (() => {
|
|
5211
|
-
}),
|
|
5212
|
-
}),
|
|
5213
|
-
}), k = e.stopMoveHandle || ((
|
|
5217
|
+
}), y = e.rejectCallback || (() => {
|
|
5218
|
+
}), P = e.resizeHandle || ((V) => {
|
|
5219
|
+
}), k = e.stopMoveHandle || ((V) => {
|
|
5214
5220
|
});
|
|
5215
5221
|
return () => n(Pe, {
|
|
5216
5222
|
ref: i,
|
|
5217
5223
|
class: s.value,
|
|
5218
5224
|
modelValue: f.value,
|
|
5219
|
-
"onUpdate:modelValue": (
|
|
5225
|
+
"onUpdate:modelValue": (V) => f.value = V,
|
|
5220
5226
|
title: d.value,
|
|
5221
5227
|
width: e.width,
|
|
5222
5228
|
height: e.height,
|
|
@@ -5227,10 +5233,10 @@ function vl(e) {
|
|
|
5227
5233
|
"show-max-button": !1,
|
|
5228
5234
|
showFloatingClose: C.value,
|
|
5229
5235
|
onAccept: S,
|
|
5230
|
-
onCancel:
|
|
5236
|
+
onCancel: y,
|
|
5231
5237
|
fitContent: e.fitContent == null ? !0 : e.fitContent,
|
|
5232
5238
|
onClosed: x,
|
|
5233
|
-
onResize:
|
|
5239
|
+
onResize: P,
|
|
5234
5240
|
onStopMove: k
|
|
5235
5241
|
}, {
|
|
5236
5242
|
default: () => [r && r(u)]
|
|
@@ -5239,16 +5245,16 @@ function vl(e) {
|
|
|
5239
5245
|
});
|
|
5240
5246
|
return document.body.appendChild(t), u.use(Z.i18n), u.mount(t), u;
|
|
5241
5247
|
}
|
|
5242
|
-
class
|
|
5248
|
+
class gl {
|
|
5243
5249
|
// private activeModalInstance = computed(() => {
|
|
5244
5250
|
// return this.modalRefs[this.activeModalIndex.value];
|
|
5245
5251
|
// });
|
|
5246
5252
|
constructor(t) {
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5253
|
+
ue(this, "appContext", null);
|
|
5254
|
+
ue(this, "modalRef", c());
|
|
5255
|
+
ue(this, "activeModalIndex", c(0));
|
|
5256
|
+
ue(this, "modalRefs", {});
|
|
5257
|
+
ue(this, "isUseEscCloseModal", c(!1));
|
|
5252
5258
|
this.app = t, this.appContext = t ? t._context : null;
|
|
5253
5259
|
}
|
|
5254
5260
|
getCurrentModal() {
|
|
@@ -5273,7 +5279,7 @@ class ml {
|
|
|
5273
5279
|
showButtons: !0,
|
|
5274
5280
|
showHeader: !0
|
|
5275
5281
|
}, t);
|
|
5276
|
-
return
|
|
5282
|
+
return pl(a);
|
|
5277
5283
|
}
|
|
5278
5284
|
close(t) {
|
|
5279
5285
|
var a, u;
|
|
@@ -5287,27 +5293,27 @@ class ml {
|
|
|
5287
5293
|
showButtons: !0,
|
|
5288
5294
|
showHeader: !0,
|
|
5289
5295
|
maximized: !1
|
|
5290
|
-
}, t)), o = c(!0), i =
|
|
5296
|
+
}, t)), o = c(!0), i = At(l.value), s = l.value.closedCallback || ((S, y) => {
|
|
5291
5297
|
}), f = l.value.openedCallback || ((S) => {
|
|
5292
5298
|
});
|
|
5293
5299
|
let d;
|
|
5294
5300
|
const r = (S) => {
|
|
5295
|
-
var
|
|
5301
|
+
var P;
|
|
5296
5302
|
o.value = !1;
|
|
5297
|
-
const
|
|
5298
|
-
s(S, this.isUseEscCloseModal.value ? "esc" :
|
|
5303
|
+
const y = (P = S == null ? void 0 : S.target) == null ? void 0 : P.classList.contains("modal_close");
|
|
5304
|
+
s(S, this.isUseEscCloseModal.value ? "esc" : y ? "icon" : "button");
|
|
5299
5305
|
}, m = (S) => {
|
|
5300
5306
|
r(S), d && te(() => {
|
|
5301
5307
|
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], _e(null, a), d = null, this.modalRef.value = null, this.modalRefs) {
|
|
5302
|
-
const
|
|
5303
|
-
|
|
5308
|
+
const y = Object.keys(this.modalRefs).map((P) => Number(P));
|
|
5309
|
+
y.length > 0 ? this.activeModalIndex.value = Math.max(...y) : this.activeModalIndex.value = 0, this.modalRefs[this.activeModalIndex.value] && (this.modalRef.value = this.modalRefs[this.activeModalIndex.value]);
|
|
5304
5310
|
}
|
|
5305
5311
|
this.isUseEscCloseModal.value = !1;
|
|
5306
5312
|
});
|
|
5307
5313
|
}, x = c();
|
|
5308
5314
|
let I;
|
|
5309
5315
|
if (u === "drawer")
|
|
5310
|
-
I = () => n(Je,
|
|
5316
|
+
I = () => n(Je, ae({
|
|
5311
5317
|
ref: x,
|
|
5312
5318
|
modelValue: o.value,
|
|
5313
5319
|
"onUpdate:modelValue": (S) => o.value = S,
|
|
@@ -5319,27 +5325,27 @@ class ml {
|
|
|
5319
5325
|
});
|
|
5320
5326
|
else {
|
|
5321
5327
|
const S = l.value.acceptCallback || (() => {
|
|
5322
|
-
}),
|
|
5323
|
-
}),
|
|
5328
|
+
}), y = l.value.rejectCallback || (() => {
|
|
5329
|
+
}), P = l.value.resizeHandle || ((T) => {
|
|
5324
5330
|
}), k = t.stopMoveHandle || ((T) => {
|
|
5325
|
-
}),
|
|
5326
|
-
var
|
|
5327
|
-
this.isUseEscCloseModal.value = !0, (
|
|
5331
|
+
}), V = (T) => {
|
|
5332
|
+
var h;
|
|
5333
|
+
this.isUseEscCloseModal.value = !0, (h = this.getCurrentModal()) == null || h.close(T == null ? void 0 : T.event);
|
|
5328
5334
|
}, {
|
|
5329
|
-
width:
|
|
5335
|
+
width: R,
|
|
5330
5336
|
height: F
|
|
5331
|
-
} = l.value, g = this.adaptToWindow(Number(
|
|
5332
|
-
Object.assign(l.value, g), I = () => n(Pe,
|
|
5337
|
+
} = l.value, g = this.adaptToWindow(Number(R) || 500, Number(F) || 320);
|
|
5338
|
+
Object.assign(l.value, g), I = () => n(Pe, ae({
|
|
5333
5339
|
ref: x,
|
|
5334
5340
|
modelValue: o.value,
|
|
5335
5341
|
"onUpdate:modelValue": (T) => o.value = T
|
|
5336
5342
|
}, l.value, {
|
|
5337
5343
|
isMessager: l.value.class && l.value.class.indexOf("modal-message") > -1,
|
|
5338
5344
|
onAccept: S,
|
|
5339
|
-
onCancel:
|
|
5345
|
+
onCancel: y,
|
|
5340
5346
|
onClosed: m,
|
|
5341
|
-
onResize:
|
|
5342
|
-
onEsc:
|
|
5347
|
+
onResize: P,
|
|
5348
|
+
onEsc: V,
|
|
5343
5349
|
onStopMove: k,
|
|
5344
5350
|
maximized: l.value.maximized
|
|
5345
5351
|
}), {
|
|
@@ -5347,8 +5353,8 @@ class ml {
|
|
|
5347
5353
|
});
|
|
5348
5354
|
}
|
|
5349
5355
|
d = ((S) => {
|
|
5350
|
-
const
|
|
5351
|
-
return
|
|
5356
|
+
const y = nn(I, S);
|
|
5357
|
+
return y.appContext = this.appContext, _e(y, a), y;
|
|
5352
5358
|
})({
|
|
5353
5359
|
...l.value
|
|
5354
5360
|
}), this.activeModalIndex.value++;
|
|
@@ -5358,7 +5364,7 @@ class ml {
|
|
|
5358
5364
|
l.value = {
|
|
5359
5365
|
...l.value,
|
|
5360
5366
|
...S
|
|
5361
|
-
}, d && _e(
|
|
5367
|
+
}, d && _e(an(d, {
|
|
5362
5368
|
...l
|
|
5363
5369
|
}), a);
|
|
5364
5370
|
};
|
|
@@ -5372,20 +5378,20 @@ class ml {
|
|
|
5372
5378
|
var S;
|
|
5373
5379
|
(S = x.value) == null || S.close();
|
|
5374
5380
|
},
|
|
5375
|
-
disableButtons: (S,
|
|
5376
|
-
var
|
|
5377
|
-
(k = (
|
|
5381
|
+
disableButtons: (S, y = !0) => {
|
|
5382
|
+
var P, k;
|
|
5383
|
+
(k = (P = x.value) == null ? void 0 : P.disableButtons) == null || k.call(P, S, y);
|
|
5378
5384
|
}
|
|
5379
5385
|
};
|
|
5380
5386
|
}
|
|
5381
5387
|
}
|
|
5382
|
-
const
|
|
5388
|
+
const zt = Symbol("FModalService");
|
|
5383
5389
|
Pe.install = (e) => {
|
|
5384
5390
|
e.component(Pe.name, Pe);
|
|
5385
|
-
const t = new
|
|
5386
|
-
e.provide(
|
|
5391
|
+
const t = new gl(e);
|
|
5392
|
+
e.provide(zt, t), e.provide("FModalService", t);
|
|
5387
5393
|
};
|
|
5388
|
-
function
|
|
5394
|
+
function $t(e, t) {
|
|
5389
5395
|
function a() {
|
|
5390
5396
|
const u = e.beforeOpen || e.beforeClickButton || null;
|
|
5391
5397
|
let l = Promise.resolve(!0);
|
|
@@ -5399,22 +5405,22 @@ function At(e, t) {
|
|
|
5399
5405
|
}
|
|
5400
5406
|
return { judgeCanOpen: a };
|
|
5401
5407
|
}
|
|
5402
|
-
function
|
|
5408
|
+
function hl(e, t, a, u, l) {
|
|
5403
5409
|
const o = c(e.buttonBehavior), i = c(e.popupOnInput), s = B(() => ({
|
|
5404
5410
|
"input-group-append": !0,
|
|
5405
5411
|
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
5406
|
-
})), { judgeCanOpen: f } =
|
|
5412
|
+
})), { judgeCanOpen: f } = $t(e, l), d = B(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), r = le(zt, null), m = c();
|
|
5407
5413
|
async function x(v) {
|
|
5408
5414
|
if (await f() && d.value) {
|
|
5409
5415
|
const C = !!t.slots.default;
|
|
5410
5416
|
if (o.value === "Modal") {
|
|
5411
|
-
const S = e.modalOptions,
|
|
5417
|
+
const S = e.modalOptions, y = r == null ? void 0 : r.open({
|
|
5412
5418
|
...S,
|
|
5413
5419
|
render: () => t.slots.default && t.slots.default()
|
|
5414
5420
|
});
|
|
5415
|
-
m.value =
|
|
5421
|
+
m.value = y == null ? void 0 : y.modalRef;
|
|
5416
5422
|
}
|
|
5417
|
-
o.value === "Overlay" &&
|
|
5423
|
+
o.value === "Overlay" && cl.show({
|
|
5418
5424
|
// host: buttonEditRef.value,
|
|
5419
5425
|
host: document.body,
|
|
5420
5426
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
@@ -5436,7 +5442,7 @@ function pl(e, t, a, u, l) {
|
|
|
5436
5442
|
modalRef: m
|
|
5437
5443
|
};
|
|
5438
5444
|
}
|
|
5439
|
-
function
|
|
5445
|
+
function yl(e, t, a, u, l, o) {
|
|
5440
5446
|
const i = c(!1), s = B(() => e.enableClear && !e.readonly && !e.disable && !Ce()), { changeTextBoxValue: f, hasClearClass: d } = o, r = c(!1);
|
|
5441
5447
|
function m(C) {
|
|
5442
5448
|
i.value = C, d.value = C;
|
|
@@ -5446,8 +5452,8 @@ function gl(e, t, a, u, l, o) {
|
|
|
5446
5452
|
m(x.value);
|
|
5447
5453
|
});
|
|
5448
5454
|
function I(C) {
|
|
5449
|
-
const S = !e.readonly && !e.disable && e.editable,
|
|
5450
|
-
C == null || C.stopPropagation(), (S ||
|
|
5455
|
+
const S = !e.readonly && !e.disable && e.editable, y = !e.editable;
|
|
5456
|
+
C == null || C.stopPropagation(), (S || y) && (f(""), l.value = "", m(!i.value), t.emit("clear"));
|
|
5451
5457
|
}
|
|
5452
5458
|
function w(C) {
|
|
5453
5459
|
if (r.value = !0, !!s.value) {
|
|
@@ -5469,7 +5475,7 @@ function gl(e, t, a, u, l, o) {
|
|
|
5469
5475
|
onMouseLeaveTextBox: v
|
|
5470
5476
|
};
|
|
5471
5477
|
}
|
|
5472
|
-
function
|
|
5478
|
+
function bl(e, t, a, u, l) {
|
|
5473
5479
|
const o = B(() => e.popupOnInput), i = B(() => e.popupOnFocus), { shouldPopupContent: s, closeAllPopover: f } = l, d = c(!1), r = B(() => e.enableTitle ? a.value : ""), m = B(() => (e.disable || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), x = B(() => e.readonly || !e.editable || Ce()), I = c(!1), w = B(() => !e.disable && I.value), v = B(() => ({
|
|
5474
5480
|
"text-left": e.textAlign === "left",
|
|
5475
5481
|
"text-center": e.textAlign === "center",
|
|
@@ -5484,10 +5490,10 @@ function hl(e, t, a, u, l) {
|
|
|
5484
5490
|
"f-state-focus": w.value,
|
|
5485
5491
|
"input-group--has-clear": e.enableClear && d.value
|
|
5486
5492
|
}));
|
|
5487
|
-
function S(b,
|
|
5488
|
-
a.value = b,
|
|
5493
|
+
function S(b, D = !0) {
|
|
5494
|
+
a.value = b, D && (t.emit("change", b), t.emit("update:modelValue", b));
|
|
5489
5495
|
}
|
|
5490
|
-
function
|
|
5496
|
+
function y(b) {
|
|
5491
5497
|
s.value = !1, S(b, !0);
|
|
5492
5498
|
}
|
|
5493
5499
|
A(
|
|
@@ -5496,19 +5502,19 @@ function hl(e, t, a, u, l) {
|
|
|
5496
5502
|
a.value = b;
|
|
5497
5503
|
}
|
|
5498
5504
|
);
|
|
5499
|
-
function
|
|
5505
|
+
function P(b) {
|
|
5500
5506
|
I.value = !1, t.emit("blur", b), b.stopPropagation();
|
|
5501
5507
|
}
|
|
5502
5508
|
function k(b) {
|
|
5503
5509
|
t.emit("click", b), f(), t.slots.default && !e.disable && !e.readonly && e.popupOnClick && l.togglePopup();
|
|
5504
5510
|
}
|
|
5505
|
-
function
|
|
5511
|
+
function V(b) {
|
|
5506
5512
|
!e.disable && !e.readonly && (I.value = !0, x.value || (t.emit("focus", b), i.value && !s.value && l.popup()));
|
|
5507
5513
|
}
|
|
5508
|
-
function
|
|
5514
|
+
function R(b) {
|
|
5509
5515
|
t.emit("input", b);
|
|
5510
|
-
const
|
|
5511
|
-
u.value =
|
|
5516
|
+
const D = b.target.value;
|
|
5517
|
+
u.value = D, a.value !== D && S(D, e.updateOn === "change"), o.value && !s.value && l.popup();
|
|
5512
5518
|
}
|
|
5513
5519
|
function F(b) {
|
|
5514
5520
|
b.target.tagName !== "INPUT" && b.preventDefault(), b.stopPropagation();
|
|
@@ -5519,9 +5525,9 @@ function hl(e, t, a, u, l) {
|
|
|
5519
5525
|
function T(b) {
|
|
5520
5526
|
b.key === "Enter" && (o.value || i.value) && l.hidePopup(), t.emit("keyup", b);
|
|
5521
5527
|
}
|
|
5522
|
-
function
|
|
5523
|
-
const
|
|
5524
|
-
b.stopPropagation(), S(
|
|
5528
|
+
function h(b) {
|
|
5529
|
+
const D = b.target.value;
|
|
5530
|
+
b.stopPropagation(), S(D);
|
|
5525
5531
|
}
|
|
5526
5532
|
return {
|
|
5527
5533
|
hasFocusedTextBox: w,
|
|
@@ -5532,26 +5538,26 @@ function hl(e, t, a, u, l) {
|
|
|
5532
5538
|
inputGroupClass: C,
|
|
5533
5539
|
hasClearClass: d,
|
|
5534
5540
|
changeTextBoxValue: S,
|
|
5535
|
-
commitValue:
|
|
5536
|
-
onBlurTextBox:
|
|
5541
|
+
commitValue: y,
|
|
5542
|
+
onBlurTextBox: P,
|
|
5537
5543
|
onClickTextBox: k,
|
|
5538
|
-
onFocusTextBox:
|
|
5539
|
-
onInput:
|
|
5544
|
+
onFocusTextBox: V,
|
|
5545
|
+
onInput: R,
|
|
5540
5546
|
onKeyDownTextBox: g,
|
|
5541
5547
|
onKeyUpTextBox: T,
|
|
5542
5548
|
onMouseDownTextBox: F,
|
|
5543
|
-
onTextBoxValueChange:
|
|
5549
|
+
onTextBoxValueChange: h
|
|
5544
5550
|
};
|
|
5545
5551
|
}
|
|
5546
|
-
const
|
|
5547
|
-
function
|
|
5548
|
-
const l = c(), o = c(!1), { judgeCanOpen: i } =
|
|
5552
|
+
const pe = "FarrisVue_PopoverInstancesKey";
|
|
5553
|
+
function wl(e, t, a, u) {
|
|
5554
|
+
const l = c(), o = c(!1), { judgeCanOpen: i } = $t(e, u);
|
|
5549
5555
|
A(() => l.value, (I, w) => {
|
|
5550
|
-
window[
|
|
5556
|
+
window[pe] = window[pe] || /* @__PURE__ */ new WeakMap(), I ? window[pe].set(a.value, I) : window[pe].delete(a.value);
|
|
5551
5557
|
});
|
|
5552
5558
|
function s() {
|
|
5553
|
-
if (window[
|
|
5554
|
-
const I = window[
|
|
5559
|
+
if (window[pe]) {
|
|
5560
|
+
const I = window[pe];
|
|
5555
5561
|
document.querySelectorAll(".f-button-edit,.v-popover").forEach((w) => {
|
|
5556
5562
|
const v = I.get(w);
|
|
5557
5563
|
v && w !== a.value && !a.value.closest(".popover-fitcontent") && v.hide();
|
|
@@ -5586,7 +5592,7 @@ function yl(e, t, a, u) {
|
|
|
5586
5592
|
}
|
|
5587
5593
|
return { hidePopup: m, showPopup: x, popup: r, shouldPopupContent: o, togglePopup: d, popoverRef: l, closeAllPopover: s };
|
|
5588
5594
|
}
|
|
5589
|
-
function
|
|
5595
|
+
function Cl(e, t, a) {
|
|
5590
5596
|
const u = c(), {
|
|
5591
5597
|
isTextBoxReadonly: l,
|
|
5592
5598
|
textBoxClass: o,
|
|
@@ -5602,7 +5608,7 @@ function bl(e, t, a) {
|
|
|
5602
5608
|
onTextBoxValueChange: v
|
|
5603
5609
|
} = a, C = c(e.id), {
|
|
5604
5610
|
uuid: S
|
|
5605
|
-
} =
|
|
5611
|
+
} = rn(), y = B(() => ({
|
|
5606
5612
|
// 'border-top-right-radius': '6px',
|
|
5607
5613
|
// 'border-bottom-right-radius': '6px'
|
|
5608
5614
|
}));
|
|
@@ -5612,13 +5618,13 @@ function bl(e, t, a) {
|
|
|
5612
5618
|
preventScroll: !0
|
|
5613
5619
|
})), C.value || (C.value = "button-edit_" + S(8)), C.value = C.value + "-textbox";
|
|
5614
5620
|
});
|
|
5615
|
-
const
|
|
5616
|
-
F.preventDefault(),
|
|
5617
|
-
},
|
|
5618
|
-
F.preventDefault(),
|
|
5621
|
+
const P = c(!1), k = (F) => {
|
|
5622
|
+
F.preventDefault(), P.value = !0;
|
|
5623
|
+
}, V = (F) => {
|
|
5624
|
+
F.preventDefault(), P.value = !1, m(F);
|
|
5619
5625
|
};
|
|
5620
|
-
function
|
|
5621
|
-
|
|
5626
|
+
function R(F) {
|
|
5627
|
+
P.value || m(F);
|
|
5622
5628
|
}
|
|
5623
5629
|
return () => n("input", {
|
|
5624
5630
|
id: e.id ? e.id + "-textbox" : void 0,
|
|
@@ -5626,7 +5632,7 @@ function bl(e, t, a) {
|
|
|
5626
5632
|
name: "input-group-value",
|
|
5627
5633
|
autocomplete: e.autoComplete ? "on" : "off",
|
|
5628
5634
|
class: o.value,
|
|
5629
|
-
style:
|
|
5635
|
+
style: y.value,
|
|
5630
5636
|
disabled: e.disable,
|
|
5631
5637
|
maxlength: e.maxLength,
|
|
5632
5638
|
minlength: e.minLength,
|
|
@@ -5640,15 +5646,15 @@ function bl(e, t, a) {
|
|
|
5640
5646
|
onChange: v,
|
|
5641
5647
|
onClick: d,
|
|
5642
5648
|
onFocus: r,
|
|
5643
|
-
onInput:
|
|
5649
|
+
onInput: R,
|
|
5644
5650
|
onKeydown: x,
|
|
5645
5651
|
onKeyup: I,
|
|
5646
5652
|
onMousedown: w,
|
|
5647
|
-
onCompositionend:
|
|
5653
|
+
onCompositionend: V,
|
|
5648
5654
|
onCompositionstart: k
|
|
5649
5655
|
}, null);
|
|
5650
5656
|
}
|
|
5651
|
-
function
|
|
5657
|
+
function Sl(e, t, a) {
|
|
5652
5658
|
const u = c(e.separator), l = B(() => e.readonly || e.disable), {
|
|
5653
5659
|
changeTextBoxValue: o,
|
|
5654
5660
|
onFocusTextBox: i,
|
|
@@ -5672,7 +5678,7 @@ function wl(e, t, a) {
|
|
|
5672
5678
|
function I(w) {
|
|
5673
5679
|
f(w);
|
|
5674
5680
|
}
|
|
5675
|
-
return () => n(
|
|
5681
|
+
return () => n(Dn, {
|
|
5676
5682
|
tabindex: e.tabIndex,
|
|
5677
5683
|
onFocus: i,
|
|
5678
5684
|
onBlur: s,
|
|
@@ -5687,7 +5693,7 @@ function wl(e, t, a) {
|
|
|
5687
5693
|
onClick: I
|
|
5688
5694
|
}, null);
|
|
5689
5695
|
}
|
|
5690
|
-
function
|
|
5696
|
+
function xl(e, t, a, u) {
|
|
5691
5697
|
const {
|
|
5692
5698
|
buttonGroupClass: l,
|
|
5693
5699
|
onClickButton: o,
|
|
@@ -5697,13 +5703,13 @@ function Cl(e, t, a, u) {
|
|
|
5697
5703
|
enableClearButton: f,
|
|
5698
5704
|
showClearButton: d,
|
|
5699
5705
|
onClearValue: r
|
|
5700
|
-
} = u, m = c(), x =
|
|
5706
|
+
} = u, m = c(), x = bt((v) => {
|
|
5701
5707
|
o(v);
|
|
5702
5708
|
}, e.buttonBehavior === "Modal" ? 0 : 200), I = () => {
|
|
5703
5709
|
t.emit("beforeClearValue");
|
|
5704
5710
|
}, {
|
|
5705
5711
|
renderExpandContent: w
|
|
5706
|
-
} =
|
|
5712
|
+
} = En(e, t);
|
|
5707
5713
|
return {
|
|
5708
5714
|
renderButtonGroup: () => n(Q, null, [n("div", {
|
|
5709
5715
|
id: e.id ? `${e.id}-button-group` : void 0,
|
|
@@ -5714,7 +5720,7 @@ function Cl(e, t, a, u) {
|
|
|
5714
5720
|
onMousedown: I
|
|
5715
5721
|
}, [n("i", {
|
|
5716
5722
|
class: "f-icon modal_close"
|
|
5717
|
-
}, null)]), [[
|
|
5723
|
+
}, null)]), [[ln, d.value]]), t.slots.buttonContent ? n("span", {
|
|
5718
5724
|
class: "input-group-text input-group-append-button",
|
|
5719
5725
|
onClick: x,
|
|
5720
5726
|
onMouseenter: i,
|
|
@@ -5730,7 +5736,7 @@ function Cl(e, t, a, u) {
|
|
|
5730
5736
|
buttonHandleElement: m
|
|
5731
5737
|
};
|
|
5732
5738
|
}
|
|
5733
|
-
function
|
|
5739
|
+
function Il(e, t, a) {
|
|
5734
5740
|
const u = c(e.popupMinWidth), {
|
|
5735
5741
|
hidePopup: l,
|
|
5736
5742
|
popoverRef: o
|
|
@@ -5755,7 +5761,7 @@ function Sl(e, t, a) {
|
|
|
5755
5761
|
var f, d;
|
|
5756
5762
|
return [K(" "), (d = (f = t.slots).default) == null ? void 0 : d.call(f), K(" ")];
|
|
5757
5763
|
}
|
|
5758
|
-
}) : n(
|
|
5764
|
+
}) : n(xt, {
|
|
5759
5765
|
id: `${e.id}-popover`,
|
|
5760
5766
|
ref: o,
|
|
5761
5767
|
placement: e.placement,
|
|
@@ -5778,32 +5784,32 @@ function Sl(e, t, a) {
|
|
|
5778
5784
|
}
|
|
5779
5785
|
});
|
|
5780
5786
|
}
|
|
5781
|
-
const
|
|
5787
|
+
const Tl = /* @__PURE__ */ Y({
|
|
5782
5788
|
name: "FButtonEdit",
|
|
5783
|
-
props:
|
|
5789
|
+
props: al,
|
|
5784
5790
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue", "beforeClearValue", "expandClick", "hidden", "shown"],
|
|
5785
5791
|
setup(e, t) {
|
|
5786
|
-
const a = c(), u = c(e.customClass), l = c(e.modelValue), o =
|
|
5792
|
+
const a = c(), u = c(e.customClass), l = c(e.modelValue), o = wl(e, t, a, l), {
|
|
5787
5793
|
shouldPopupContent: i,
|
|
5788
5794
|
hidePopup: s,
|
|
5789
5795
|
showPopup: f,
|
|
5790
5796
|
togglePopup: d
|
|
5791
|
-
} = o, r =
|
|
5797
|
+
} = o, r = hl(e, t, a, o, l), m = c(""), x = bl(e, t, l, m, o), {
|
|
5792
5798
|
hasFocusedTextBox: I,
|
|
5793
5799
|
commitValue: w,
|
|
5794
5800
|
inputGroupClass: v,
|
|
5795
5801
|
changeTextBoxValue: C
|
|
5796
|
-
} = x, S =
|
|
5797
|
-
onMouseEnterTextBox:
|
|
5798
|
-
onMouseLeaveTextBox:
|
|
5799
|
-
} = S, k = c(!1),
|
|
5802
|
+
} = x, S = yl(e, t, l, I, m, x), {
|
|
5803
|
+
onMouseEnterTextBox: y,
|
|
5804
|
+
onMouseLeaveTextBox: P
|
|
5805
|
+
} = S, k = c(!1), V = B(() => {
|
|
5800
5806
|
const p = {
|
|
5801
5807
|
"f-button-edit": !0,
|
|
5802
5808
|
"f-cmp-inputgroup": !0,
|
|
5803
5809
|
"f-button-edit-nowrap": !e.wrapText
|
|
5804
5810
|
};
|
|
5805
|
-
return u.value && u.value.split(" ").reduce((O,
|
|
5806
|
-
}),
|
|
5811
|
+
return u.value && u.value.split(" ").reduce((O, E) => (O[E] = !0, O), p), p;
|
|
5812
|
+
}), R = B(() => ({
|
|
5807
5813
|
overflow: e.wrapText ? "hidden" : ""
|
|
5808
5814
|
})), F = B(() => ({
|
|
5809
5815
|
// paddingLeft: '3px',
|
|
@@ -5814,28 +5820,28 @@ const xl = /* @__PURE__ */ Y({
|
|
|
5814
5820
|
return 0;
|
|
5815
5821
|
let p = 0;
|
|
5816
5822
|
const O = Array.from(a.value.querySelectorAll(".farris-tag-item"));
|
|
5817
|
-
return O && O.length && (p = O.map((
|
|
5823
|
+
return O && O.length && (p = O.map((E) => E.offsetTop).filter((E) => E > 20).length), p;
|
|
5818
5824
|
}
|
|
5819
|
-
const
|
|
5820
|
-
|
|
5821
|
-
|
|
5825
|
+
const h = c(T());
|
|
5826
|
+
on(() => {
|
|
5827
|
+
h.value = T();
|
|
5822
5828
|
});
|
|
5823
5829
|
function b() {
|
|
5824
|
-
return e.multiSelect && e.inputType === "tag" ? () => n(Q, null, [
|
|
5830
|
+
return e.multiSelect && e.inputType === "tag" ? () => n(Q, null, [Sl(e, l, x)(), !!h.value && n("div", {
|
|
5825
5831
|
class: "d-flex flex-row mr-2 more-tags",
|
|
5826
5832
|
"more-tags": !0
|
|
5827
5833
|
}, [n("span", {
|
|
5828
5834
|
class: "multi--more-text"
|
|
5829
|
-
}, [K("+"),
|
|
5835
|
+
}, [K("+"), h.value])])]) : Cl(e, l, x);
|
|
5830
5836
|
}
|
|
5831
|
-
let
|
|
5837
|
+
let D = b();
|
|
5832
5838
|
A([() => e.multiSelect, () => e.inputType], () => {
|
|
5833
|
-
|
|
5839
|
+
D = b();
|
|
5834
5840
|
});
|
|
5835
5841
|
const {
|
|
5836
5842
|
renderButtonGroup: j,
|
|
5837
5843
|
buttonHandleElement: $
|
|
5838
|
-
} =
|
|
5844
|
+
} = xl(e, t, r, S), H = Il(e, t, o), L = c(i.value), N = {
|
|
5839
5845
|
displayText: m,
|
|
5840
5846
|
commitValue: w,
|
|
5841
5847
|
elementRef: a,
|
|
@@ -5845,7 +5851,7 @@ const xl = /* @__PURE__ */ Y({
|
|
|
5845
5851
|
shouldPopupContent: i,
|
|
5846
5852
|
togglePopup: d,
|
|
5847
5853
|
openDialog: () => {
|
|
5848
|
-
$.value && e.buttonBehavior === "Modal" && $.value.click(), t.slots.content &&
|
|
5854
|
+
$.value && e.buttonBehavior === "Modal" && $.value.click(), t.slots.content && bt(() => {
|
|
5849
5855
|
r.onClickButton(null);
|
|
5850
5856
|
}, e.buttonBehavior === "Modal" ? 0 : 200)();
|
|
5851
5857
|
},
|
|
@@ -5858,7 +5864,7 @@ const xl = /* @__PURE__ */ Y({
|
|
|
5858
5864
|
return (p = a.value) == null ? void 0 : p.querySelector("input");
|
|
5859
5865
|
},
|
|
5860
5866
|
forceClosePopup: () => {
|
|
5861
|
-
|
|
5867
|
+
L.value = !1, k.value = !0, i.value = !1;
|
|
5862
5868
|
},
|
|
5863
5869
|
clear: () => {
|
|
5864
5870
|
C(""), m.value = "";
|
|
@@ -5871,41 +5877,41 @@ const xl = /* @__PURE__ */ Y({
|
|
|
5871
5877
|
a.value.componentInstance = N, window.onresize = () => {
|
|
5872
5878
|
document.body.click();
|
|
5873
5879
|
};
|
|
5874
|
-
}),
|
|
5880
|
+
}), sn(() => {
|
|
5875
5881
|
var p;
|
|
5876
|
-
window.onresize = null, (p = window[
|
|
5882
|
+
window.onresize = null, (p = window[pe]) == null || p.delete(a.value);
|
|
5877
5883
|
}), t.expose(N), A(() => i.value, async (p, O) => {
|
|
5878
5884
|
if (k.value) {
|
|
5879
|
-
|
|
5885
|
+
L.value = p, k.value = !1;
|
|
5880
5886
|
return;
|
|
5881
5887
|
}
|
|
5882
5888
|
if (!p && e.beforeClosePopup && typeof e.beforeClosePopup == "function") {
|
|
5883
5889
|
try {
|
|
5884
|
-
const
|
|
5885
|
-
|
|
5886
|
-
} catch (
|
|
5887
|
-
console.error("Error in beforeClosePopup:",
|
|
5890
|
+
const E = await e.beforeClosePopup();
|
|
5891
|
+
L.value = !E, (!E || e.readonly) && (i.value = !0);
|
|
5892
|
+
} catch (E) {
|
|
5893
|
+
console.error("Error in beforeClosePopup:", E), L.value = O, i.value = O;
|
|
5888
5894
|
}
|
|
5889
5895
|
return;
|
|
5890
5896
|
}
|
|
5891
|
-
|
|
5897
|
+
L.value = p;
|
|
5892
5898
|
}), () => {
|
|
5893
5899
|
var p, O;
|
|
5894
|
-
return n(Q, null, [n("div",
|
|
5900
|
+
return n(Q, null, [n("div", ae(t.attrs, {
|
|
5895
5901
|
ref: a,
|
|
5896
|
-
class:
|
|
5902
|
+
class: V.value,
|
|
5897
5903
|
id: e.id ? e.id : void 0,
|
|
5898
|
-
style:
|
|
5904
|
+
style: R.value
|
|
5899
5905
|
}), [n("div", {
|
|
5900
5906
|
id: e.id ? `${e.id}-input-group` : void 0,
|
|
5901
5907
|
class: v.value,
|
|
5902
5908
|
style: F.value,
|
|
5903
|
-
onMouseenter:
|
|
5904
|
-
onMouseleave:
|
|
5905
|
-
}, [(O = (p = t.slots).precontent) == null ? void 0 : O.call(p), t.slots.content ? t.slots.content() :
|
|
5909
|
+
onMouseenter: y,
|
|
5910
|
+
onMouseleave: P
|
|
5911
|
+
}, [(O = (p = t.slots).precontent) == null ? void 0 : O.call(p), t.slots.content ? t.slots.content() : D(), t.slots.content ? null : g.value && j()])]), L.value && H()]);
|
|
5906
5912
|
};
|
|
5907
5913
|
}
|
|
5908
|
-
}),
|
|
5914
|
+
}), Bl = "https://json-schema.org/draft/2020-12/schema", kl = "https://farris-design.gitee.io/schema-editor.schema.json", Fl = "schema-editor", Ml = "A Farris Input Component", Ol = "object", Pl = {
|
|
5909
5915
|
title: {
|
|
5910
5916
|
description: "",
|
|
5911
5917
|
type: "string",
|
|
@@ -5986,16 +5992,16 @@ const xl = /* @__PURE__ */ Y({
|
|
|
5986
5992
|
type: "object",
|
|
5987
5993
|
default: null
|
|
5988
5994
|
}
|
|
5989
|
-
},
|
|
5990
|
-
$schema:
|
|
5991
|
-
$id:
|
|
5992
|
-
title:
|
|
5993
|
-
description:
|
|
5994
|
-
type:
|
|
5995
|
-
properties:
|
|
5996
|
-
required:
|
|
5997
|
-
ignore:
|
|
5998
|
-
},
|
|
5995
|
+
}, Vl = [], Rl = [], Ll = {
|
|
5996
|
+
$schema: Bl,
|
|
5997
|
+
$id: kl,
|
|
5998
|
+
title: Fl,
|
|
5999
|
+
description: Ml,
|
|
6000
|
+
type: Ol,
|
|
6001
|
+
properties: Pl,
|
|
6002
|
+
required: Vl,
|
|
6003
|
+
ignore: Rl
|
|
6004
|
+
}, Wt = {
|
|
5999
6005
|
title: { type: String, default: "选择数据源" },
|
|
6000
6006
|
textField: { type: String, default: "name" },
|
|
6001
6007
|
viewOptions: { type: Array, default: [] },
|
|
@@ -6012,16 +6018,16 @@ const xl = /* @__PURE__ */ Y({
|
|
|
6012
6018
|
modalWidth: { type: Number, default: 800 },
|
|
6013
6019
|
requiredTip: { type: String, default: "请选择数据源" },
|
|
6014
6020
|
validateFunction: { type: Function, default: null }
|
|
6015
|
-
},
|
|
6016
|
-
function
|
|
6017
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
6021
|
+
}, Hl = Xe(Wt, Ll);
|
|
6022
|
+
function Dl(e) {
|
|
6023
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !mt(e);
|
|
6018
6024
|
}
|
|
6019
6025
|
const Ge = /* @__PURE__ */ Y({
|
|
6020
6026
|
name: "FSchemaSelectorEditor",
|
|
6021
|
-
props:
|
|
6027
|
+
props: Wt,
|
|
6022
6028
|
emits: ["selectionChange", "update:modelValue"],
|
|
6023
6029
|
setup(e, t) {
|
|
6024
|
-
const a =
|
|
6030
|
+
const a = le(Dt);
|
|
6025
6031
|
a.globalConfig = {
|
|
6026
6032
|
position: "top-center"
|
|
6027
6033
|
};
|
|
@@ -6087,7 +6093,7 @@ const Ge = /* @__PURE__ */ Y({
|
|
|
6087
6093
|
}
|
|
6088
6094
|
return () => {
|
|
6089
6095
|
let w;
|
|
6090
|
-
return n(
|
|
6096
|
+
return n(Tl, {
|
|
6091
6097
|
modelValue: i.value,
|
|
6092
6098
|
"onUpdate:modelValue": (v) => i.value = v,
|
|
6093
6099
|
editable: !1,
|
|
@@ -6100,22 +6106,22 @@ const Ge = /* @__PURE__ */ Y({
|
|
|
6100
6106
|
buttonBehavior: "Modal",
|
|
6101
6107
|
modalOptions: x,
|
|
6102
6108
|
beforeOpen: I
|
|
6103
|
-
},
|
|
6109
|
+
}, Dl(w = m()) ? w : {
|
|
6104
6110
|
default: () => [w]
|
|
6105
6111
|
});
|
|
6106
6112
|
};
|
|
6107
6113
|
}
|
|
6108
|
-
}),
|
|
6114
|
+
}), uo = {
|
|
6109
6115
|
install(e) {
|
|
6110
6116
|
e.component(je.name, je), e.component(Ge.name, Ge);
|
|
6111
6117
|
},
|
|
6112
6118
|
register(e, t, a) {
|
|
6113
|
-
e["schema-selector"] = Ge, t["schema-selector"] =
|
|
6119
|
+
e["schema-selector"] = Ge, t["schema-selector"] = Hl;
|
|
6114
6120
|
}
|
|
6115
6121
|
};
|
|
6116
6122
|
export {
|
|
6117
6123
|
je as FSchemaSelector,
|
|
6118
6124
|
Ge as FSchemaSelectorEditor,
|
|
6119
|
-
|
|
6120
|
-
|
|
6125
|
+
uo as default,
|
|
6126
|
+
jn as schemaSelectorProps
|
|
6121
6127
|
};
|