@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,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var h = (r, s, i) =>
|
|
4
|
-
import { getCustomClass as H, isMobilePhone as
|
|
5
|
-
import { computed as
|
|
6
|
-
import { LocaleService as
|
|
7
|
-
const
|
|
1
|
+
var ve = Object.defineProperty;
|
|
2
|
+
var Ce = (r, s, i) => s in r ? ve(r, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[s] = i;
|
|
3
|
+
var h = (r, s, i) => Ce(r, typeof s != "symbol" ? s + "" : s, i);
|
|
4
|
+
import { getCustomClass as H, extractDataAttrs as I, isMobilePhone as ye, useGuid as ke, withInstall as De } from "../common/index.esm.js";
|
|
5
|
+
import { computed as ee, createVNode as u, Teleport as Te, getCurrentInstance as Se, reactive as se, mergeProps as N, withDirectives as le, resolveDirective as re, ref as q, defineComponent as Re, watch as pe, onMounted as Oe, onUnmounted as Me, nextTick as fe } from "vue";
|
|
6
|
+
import { LocaleService as Ee } from "../locale/index.esm.js";
|
|
7
|
+
const je = {
|
|
8
8
|
/**
|
|
9
9
|
* 组件标识
|
|
10
10
|
* @default ''
|
|
@@ -43,7 +43,7 @@ const Me = {
|
|
|
43
43
|
*/
|
|
44
44
|
moreButtonClass: { type: String, default: "btn-secondary" }
|
|
45
45
|
};
|
|
46
|
-
class
|
|
46
|
+
class be {
|
|
47
47
|
constructor(s) {
|
|
48
48
|
/** 工具栏项标识 */
|
|
49
49
|
h(this, "id", "");
|
|
@@ -100,7 +100,7 @@ class fe {
|
|
|
100
100
|
}
|
|
101
101
|
/** 是否可用 */
|
|
102
102
|
get enable() {
|
|
103
|
-
return Object.keys(this.options).indexOf("disabled") > -1 ? !this.options.disabled :
|
|
103
|
+
return Object.keys(this.options).indexOf("disabled") > -1 ? !this.options.disabled : ee(() => !0);
|
|
104
104
|
}
|
|
105
105
|
/** 设置宽度 */
|
|
106
106
|
setWidth(s) {
|
|
@@ -111,20 +111,20 @@ class fe {
|
|
|
111
111
|
return this.visible ? this.width : !1;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class Be extends be {
|
|
115
115
|
constructor(s) {
|
|
116
116
|
super(s);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function ge() {
|
|
120
120
|
function r(s) {
|
|
121
121
|
const i = [];
|
|
122
|
-
return s.reduce((g, p) => (p.children && p.children.length > 0 ? g.push(new
|
|
122
|
+
return s.reduce((g, p) => (p.children && p.children.length > 0 ? g.push(new oe(p)) : g.push(new Be(p)), g), i), i;
|
|
123
123
|
}
|
|
124
124
|
return { buildResponseToolbarItems: r };
|
|
125
125
|
}
|
|
126
|
-
const { buildResponseToolbarItems:
|
|
127
|
-
class
|
|
126
|
+
const { buildResponseToolbarItems: Pe } = ge();
|
|
127
|
+
class oe extends be {
|
|
128
128
|
constructor(i) {
|
|
129
129
|
super(i);
|
|
130
130
|
h(this, "placement", "");
|
|
@@ -143,10 +143,10 @@ class ne extends fe {
|
|
|
143
143
|
const g = ["visible", "icon", "isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
144
144
|
Object.keys(i).filter((p) => g.indexOf(p) > -1).forEach((p) => {
|
|
145
145
|
p === "visible" ? this[p] = i[p] === void 0 ? !0 : i[p] : this[p] = i[p];
|
|
146
|
-
}), this.shown = this.visible, i.children && i.children.length && (this.children =
|
|
146
|
+
}), this.shown = this.visible, i.children && i.children.length && (this.children = Pe(i.children));
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function He() {
|
|
150
150
|
function r(i) {
|
|
151
151
|
const g = {
|
|
152
152
|
"f-icon": !0
|
|
@@ -162,7 +162,7 @@ function Be() {
|
|
|
162
162
|
}
|
|
163
163
|
return { iconClass: r, shouldShowIcon: s };
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function _e(r, s) {
|
|
166
166
|
function i(t) {
|
|
167
167
|
return H({
|
|
168
168
|
"dropdown-menu": !0
|
|
@@ -228,34 +228,34 @@ function Pe(r, s) {
|
|
|
228
228
|
function z(t, e) {
|
|
229
229
|
document.body.click(), e.enable && (t.stopPropagation(), typeof e.onClick == "function" && e.onClick(t, e.id), r.emit("click", t, e.id));
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function G(t, e) {
|
|
232
232
|
const a = t.target;
|
|
233
233
|
a.className.indexOf("dropdown-item") < 0 || (a.title = a.scrollWidth > a.clientWidth ? e : "");
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function Z(t, e, a) {
|
|
236
236
|
if (e.tipsEnable && e.tipsText) {
|
|
237
|
-
const l =
|
|
237
|
+
const l = se({
|
|
238
238
|
content: e.tipsText,
|
|
239
239
|
enable: e.tipsEnable
|
|
240
240
|
});
|
|
241
|
-
return
|
|
241
|
+
return le(u("li", N(I(e.options), {
|
|
242
242
|
class: p(e),
|
|
243
243
|
id: e.id,
|
|
244
244
|
key: e.id + "_" + a,
|
|
245
245
|
onClick: (b) => z(b, e)
|
|
246
|
-
}, [u("span", {
|
|
246
|
+
}), [u("span", {
|
|
247
247
|
class: T(e)
|
|
248
248
|
}, [s.shouldShowIcon(e) && u("i", {
|
|
249
249
|
class: s.iconClass(e)
|
|
250
|
-
}, null), e.text])]), [[
|
|
250
|
+
}, null), e.text])]), [[re("tooltip"), l]]);
|
|
251
251
|
}
|
|
252
|
-
return u("li", {
|
|
252
|
+
return u("li", N(I(e.options), {
|
|
253
253
|
class: p(e),
|
|
254
254
|
id: e.id,
|
|
255
255
|
onClick: (l) => z(l, e)
|
|
256
|
-
}, [u("span", {
|
|
256
|
+
}), [u("span", {
|
|
257
257
|
class: T(e),
|
|
258
|
-
onMouseenter: (l) =>
|
|
258
|
+
onMouseenter: (l) => G(l, e.text)
|
|
259
259
|
}, [s.shouldShowIcon(e) && u("i", {
|
|
260
260
|
class: s.iconClass(e)
|
|
261
261
|
}, null), e.text])]);
|
|
@@ -276,30 +276,30 @@ function Pe(r, s) {
|
|
|
276
276
|
}
|
|
277
277
|
function W(t, e, a) {
|
|
278
278
|
if (e.tipsEnable && e.tipsText) {
|
|
279
|
-
const l =
|
|
279
|
+
const l = se({
|
|
280
280
|
content: e.tipsText,
|
|
281
281
|
enable: e.tipsEnable
|
|
282
282
|
});
|
|
283
|
-
return u("li", {
|
|
283
|
+
return u("li", N(I(e.options), {
|
|
284
284
|
class: g(e),
|
|
285
285
|
id: e.id,
|
|
286
286
|
key: e.id + "_" + a,
|
|
287
287
|
onClick: (b) => o(b, e, t)
|
|
288
|
-
}, [
|
|
288
|
+
}), [le(u("span", {
|
|
289
289
|
class: w(e)
|
|
290
290
|
}, [s.shouldShowIcon(e) && u("i", {
|
|
291
291
|
class: s.iconClass(e)
|
|
292
|
-
}, null), e.text]), [[
|
|
292
|
+
}, null), e.text]), [[re("tooltip"), l]]), e.split && u("span", {
|
|
293
293
|
class: "dropdown-toggle dropdown-toggle-split f-rt-toggle",
|
|
294
294
|
onClick: (b) => f(b, e, t)
|
|
295
295
|
}, null), M(e, e)]);
|
|
296
296
|
}
|
|
297
|
-
return u("li", {
|
|
297
|
+
return u("li", N(I(e.options), {
|
|
298
298
|
class: g(e),
|
|
299
299
|
id: e.id,
|
|
300
300
|
onClick: (l) => o(l, e, t),
|
|
301
|
-
onMouseenter: (l) =>
|
|
302
|
-
}, [u("span", {
|
|
301
|
+
onMouseenter: (l) => G(l, e.text)
|
|
302
|
+
}), [u("span", {
|
|
303
303
|
class: w(e)
|
|
304
304
|
}, [s.shouldShowIcon(e) && u("i", {
|
|
305
305
|
class: s.iconClass(e)
|
|
@@ -308,10 +308,10 @@ function Pe(r, s) {
|
|
|
308
308
|
onClick: (l) => f(l, e, t)
|
|
309
309
|
}, null), M(e, e)]);
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
return t.children.filter((e) => e.visible).map((e, a) => e.children && e.children.length ? W(t, e, a) :
|
|
311
|
+
function ie(t) {
|
|
312
|
+
return t.children.filter((e) => e.visible).map((e, a) => e.children && e.children.length ? W(t, e, a) : Z(t, e, a));
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function de(t, e) {
|
|
315
315
|
if (!t)
|
|
316
316
|
return 1080;
|
|
317
317
|
let a = -1;
|
|
@@ -323,8 +323,8 @@ function Pe(r, s) {
|
|
|
323
323
|
}
|
|
324
324
|
return 1080 + l - a;
|
|
325
325
|
}
|
|
326
|
-
function
|
|
327
|
-
var
|
|
326
|
+
function ce(t, e, a) {
|
|
327
|
+
var F, J;
|
|
328
328
|
const l = {
|
|
329
329
|
display: t.expanded ? "block" : "none",
|
|
330
330
|
position: "fixed",
|
|
@@ -337,67 +337,67 @@ function Pe(r, s) {
|
|
|
337
337
|
}, b = document.querySelector(_);
|
|
338
338
|
if (!b)
|
|
339
339
|
return l;
|
|
340
|
-
const
|
|
341
|
-
let S = (
|
|
340
|
+
const U = Se();
|
|
341
|
+
let S = (J = (F = U == null ? void 0 : U.exposed) == null ? void 0 : F.elementRef.value) == null ? void 0 : J.querySelector("#" + e);
|
|
342
342
|
if (S || (S = b == null ? void 0 : b.querySelector("#" + e)), !S)
|
|
343
343
|
return l;
|
|
344
|
-
const
|
|
344
|
+
const ue = window.innerWidth, A = window.innerHeight, y = S == null ? void 0 : S.getClientRects();
|
|
345
345
|
if (S && y && y.length) {
|
|
346
346
|
const {
|
|
347
347
|
top: j,
|
|
348
|
-
width:
|
|
349
|
-
left:
|
|
350
|
-
right:
|
|
348
|
+
width: Q,
|
|
349
|
+
left: V,
|
|
350
|
+
right: ne,
|
|
351
351
|
height: L
|
|
352
|
-
} = y[0],
|
|
353
|
-
l.top = `${
|
|
354
|
-
const
|
|
352
|
+
} = y[0], $ = Math.ceil(L + j);
|
|
353
|
+
l.top = `${$}px`, l.left = `${V}px`;
|
|
354
|
+
const X = t.id + "_menu", P = (S == null ? void 0 : S.querySelector("#" + X)) || (b == null ? void 0 : b.querySelector("#" + X)) || null;
|
|
355
355
|
if (P) {
|
|
356
356
|
P.style.visibility = "hidden", P.style.display = "block";
|
|
357
|
-
const
|
|
358
|
-
l.zIndex = t.expanded ?
|
|
357
|
+
const Y = P.offsetHeight;
|
|
358
|
+
l.zIndex = t.expanded ? de(b, X) : 1080, l.display === "block" && (P.style.display = "block");
|
|
359
359
|
const n = P.getBoundingClientRect();
|
|
360
360
|
if (a) {
|
|
361
361
|
l.top = `${j - 6}px`;
|
|
362
|
-
const d = Math.ceil(
|
|
362
|
+
const d = Math.ceil(Q + V);
|
|
363
363
|
l.left = `${d}px`;
|
|
364
364
|
}
|
|
365
|
-
|
|
365
|
+
ue - V - Q < n.width && (l.left = `${(a ? V : ne) - n.width}px`), A - j - L < Y ? j > Y ? (l.top = `${j - Y - 6}px`, l.maxHeight = `${j - 16}px`) : (l.maxHeight = `${A - $}px`, j > A - j - L && (l.top = "10px", l.maxHeight = `${j - 16}px`)) : l.maxHeight = `${A - $}px`, P.style.visibility = "visible";
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
return l;
|
|
369
369
|
}
|
|
370
370
|
M = function(t, e) {
|
|
371
371
|
const a = e ? e.id : t.id;
|
|
372
|
-
return u(
|
|
372
|
+
return u(Te, {
|
|
373
373
|
to: _,
|
|
374
374
|
disabled: !t.expanded
|
|
375
375
|
}, {
|
|
376
376
|
default: () => [u("ul", {
|
|
377
377
|
class: i(t),
|
|
378
|
-
style:
|
|
378
|
+
style: ce(t, a, e),
|
|
379
379
|
id: t.id + "_menu",
|
|
380
380
|
onWheel: (l) => D(l, t)
|
|
381
|
-
}, [
|
|
381
|
+
}, [ie(t)])]
|
|
382
382
|
});
|
|
383
383
|
};
|
|
384
|
-
function
|
|
384
|
+
function ae() {
|
|
385
385
|
x.forEach((t) => {
|
|
386
386
|
t.expanded = !1;
|
|
387
387
|
}), x.clear();
|
|
388
388
|
}
|
|
389
389
|
return {
|
|
390
390
|
renderDropdownMenu: M,
|
|
391
|
-
clearAllDropDownMenu:
|
|
391
|
+
clearAllDropDownMenu: ae,
|
|
392
392
|
updateContainerId: k
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
const g =
|
|
395
|
+
function We(r, s, i) {
|
|
396
|
+
const g = q(r.alignment), {
|
|
397
397
|
renderDropdownMenu: p,
|
|
398
398
|
clearAllDropDownMenu: w,
|
|
399
399
|
updateContainerId: T
|
|
400
|
-
} =
|
|
400
|
+
} = _e(s, i);
|
|
401
401
|
function M(o) {
|
|
402
402
|
const f = {
|
|
403
403
|
"btn-group": !0,
|
|
@@ -446,22 +446,22 @@ function He(r, s, i) {
|
|
|
446
446
|
const D = f.expanded;
|
|
447
447
|
document.body.click(), f.expanded = !D;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function G(o, f = !0) {
|
|
450
450
|
if (o.tipsEnable && o.tipsText) {
|
|
451
|
-
const D =
|
|
451
|
+
const D = se({
|
|
452
452
|
content: o.tipsText,
|
|
453
453
|
enable: o.tipsEnable
|
|
454
454
|
});
|
|
455
455
|
return u("div", {
|
|
456
456
|
id: o.id,
|
|
457
457
|
class: M(o)
|
|
458
|
-
}, [
|
|
458
|
+
}, [le(u("div", {
|
|
459
459
|
class: x(o),
|
|
460
460
|
style: k(o),
|
|
461
461
|
onClick: (W) => o.enable && E(W, o)
|
|
462
462
|
}, [i.shouldShowIcon(o) && u("i", {
|
|
463
463
|
class: i.iconClass(o)
|
|
464
|
-
}, null), o.text && u("span", null, [o.text])]), [[
|
|
464
|
+
}, null), o.text && u("span", null, [o.text])]), [[re("tooltip"), D]]), o.split && u("button", {
|
|
465
465
|
class: _(o),
|
|
466
466
|
style: "border-radius:0 6px 6px 0;",
|
|
467
467
|
onClick: (W) => z(W, o)
|
|
@@ -482,40 +482,40 @@ function He(r, s, i) {
|
|
|
482
482
|
onClick: (D) => z(D, o)
|
|
483
483
|
}, null), f && p(o)]);
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function Z() {
|
|
486
486
|
w();
|
|
487
487
|
}
|
|
488
488
|
return {
|
|
489
|
-
renderToolbarDropdown:
|
|
490
|
-
clearAllDropDown:
|
|
489
|
+
renderToolbarDropdown: G,
|
|
490
|
+
clearAllDropDown: Z,
|
|
491
491
|
updateContainerId: T
|
|
492
492
|
};
|
|
493
493
|
}
|
|
494
494
|
const {
|
|
495
|
-
buildResponseToolbarItems:
|
|
496
|
-
} =
|
|
495
|
+
buildResponseToolbarItems: he
|
|
496
|
+
} = ge(), Ae = /* @__PURE__ */ Re({
|
|
497
497
|
name: "FResponseToolbar",
|
|
498
|
-
props:
|
|
498
|
+
props: je,
|
|
499
499
|
emits: ["click"],
|
|
500
500
|
setup(r, s) {
|
|
501
|
-
const i =
|
|
501
|
+
const i = q(he(r.items)), g = q(), p = q(), w = q(), T = ye(), M = {
|
|
502
502
|
id: "__more_buttons__",
|
|
503
|
-
text: T ? "" :
|
|
503
|
+
text: T ? "" : Ee.getLocaleValue("responseToolbar.more"),
|
|
504
504
|
icon: T ? "f-icon-more-horizontal" : ""
|
|
505
|
-
}, x =
|
|
505
|
+
}, x = q(new oe(M)), _ = Object.assign({}, M, {
|
|
506
506
|
id: M.id + "width"
|
|
507
|
-
}), k =
|
|
507
|
+
}), k = q(-1), E = He();
|
|
508
508
|
let z = !1;
|
|
509
509
|
const {
|
|
510
|
-
guid:
|
|
511
|
-
uuid:
|
|
512
|
-
} =
|
|
510
|
+
guid: G,
|
|
511
|
+
uuid: Z
|
|
512
|
+
} = ke(), o = r.id ? r.id : "toolbar-" + G(), f = q(), D = "dropdown-container-" + o + "-" + Z(4), {
|
|
513
513
|
renderToolbarDropdown: W,
|
|
514
|
-
clearAllDropDown:
|
|
515
|
-
updateContainerId:
|
|
516
|
-
} =
|
|
517
|
-
|
|
518
|
-
const
|
|
514
|
+
clearAllDropDown: ie,
|
|
515
|
+
updateContainerId: de
|
|
516
|
+
} = We(r, s, E);
|
|
517
|
+
de(D);
|
|
518
|
+
const ce = ee(() => x.value.children.length > 0), ae = ee(() => r.visible ? x.value.children.length > 0 ? !0 : i.value.findIndex((n) => n.shown && n.children && n.children.length > 0) > -1 : !1);
|
|
519
519
|
function t() {
|
|
520
520
|
r.visible && !f.value && document && (f.value = document.createElement("div"), f.value.id = D, document.body.appendChild(f.value));
|
|
521
521
|
}
|
|
@@ -523,10 +523,10 @@ const {
|
|
|
523
523
|
function e() {
|
|
524
524
|
f.value && document.body.contains(f.value) && (document.body.removeChild(f.value), f.value = null);
|
|
525
525
|
}
|
|
526
|
-
ae
|
|
526
|
+
pe(ae, (n, d) => {
|
|
527
527
|
n ? t() : e();
|
|
528
528
|
});
|
|
529
|
-
const a =
|
|
529
|
+
const a = ee(() => {
|
|
530
530
|
const n = {
|
|
531
531
|
"f-toolbar": !0,
|
|
532
532
|
"f-response-toolbar": !0,
|
|
@@ -537,7 +537,7 @@ const {
|
|
|
537
537
|
"is-mobile": T
|
|
538
538
|
};
|
|
539
539
|
return H(n, r.customClass);
|
|
540
|
-
}), l =
|
|
540
|
+
}), l = ee(() => ({
|
|
541
541
|
"w-100": !0,
|
|
542
542
|
"d-flex": !0,
|
|
543
543
|
"flex-nowrap": !0,
|
|
@@ -548,9 +548,9 @@ const {
|
|
|
548
548
|
function b(n) {
|
|
549
549
|
n && n.target.closest("ul.dropdown-menu") && n.type === "wheel" || (i.value.filter((d) => d.children && d.children.length > 0).forEach((d) => {
|
|
550
550
|
d.expanded = !1;
|
|
551
|
-
}), x.value.expanded = !1,
|
|
551
|
+
}), x.value.expanded = !1, ie());
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function U(n, d) {
|
|
554
554
|
var v;
|
|
555
555
|
const c = {
|
|
556
556
|
btn: !0,
|
|
@@ -564,42 +564,44 @@ const {
|
|
|
564
564
|
function S(n, d) {
|
|
565
565
|
document.body.click(), typeof d.onClick == "function" && d.onClick(n, d.id), s.emit("click", n, d.id);
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function ue(n, d) {
|
|
568
568
|
if (n.tipsEnable && n.tipsText) {
|
|
569
|
-
const c =
|
|
569
|
+
const c = se({
|
|
570
570
|
content: n.tipsText,
|
|
571
571
|
enable: n.tipsEnable
|
|
572
572
|
});
|
|
573
|
-
return
|
|
574
|
-
type: "button"
|
|
575
|
-
|
|
573
|
+
return le(u("button", N({
|
|
574
|
+
type: "button"
|
|
575
|
+
}, I(n.options), {
|
|
576
|
+
class: U(n, d),
|
|
576
577
|
id: n.id,
|
|
577
578
|
disabled: !n.enable,
|
|
578
579
|
onClick: (C) => S(C, n)
|
|
579
|
-
}, [E.shouldShowIcon(n) && u("i", {
|
|
580
|
+
}), [E.shouldShowIcon(n) && u("i", {
|
|
580
581
|
class: E.iconClass(n)
|
|
581
|
-
}, null), n.text]), [[
|
|
582
|
+
}, null), n.text]), [[re("tooltip"), c]]);
|
|
582
583
|
}
|
|
583
|
-
return u("button", {
|
|
584
|
-
type: "button"
|
|
585
|
-
|
|
584
|
+
return u("button", N({
|
|
585
|
+
type: "button"
|
|
586
|
+
}, I(n.options), {
|
|
587
|
+
class: U(n, d),
|
|
586
588
|
id: n.id,
|
|
587
589
|
disabled: !n.enable,
|
|
588
590
|
onClick: (c) => S(c, n)
|
|
589
|
-
}, [E.shouldShowIcon(n) && u("i", {
|
|
591
|
+
}), [E.shouldShowIcon(n) && u("i", {
|
|
590
592
|
class: E.iconClass(n)
|
|
591
593
|
}, null), n.text]);
|
|
592
594
|
}
|
|
593
595
|
let A = /* @__PURE__ */ new Map(), y = [];
|
|
594
|
-
function
|
|
596
|
+
function F(n) {
|
|
595
597
|
const d = Math.ceil(parseFloat(getComputedStyle(n).getPropertyValue("margin-left"))), c = Math.ceil(parseFloat(getComputedStyle(n).getPropertyValue("margin-right")));
|
|
596
598
|
return (d || 0) + n.getBoundingClientRect().width + (c || 0);
|
|
597
599
|
}
|
|
598
|
-
function
|
|
600
|
+
function J(n, d, c) {
|
|
599
601
|
if (d < k.value) {
|
|
600
602
|
let C = c - 1;
|
|
601
603
|
for (; C >= 0; C--) {
|
|
602
|
-
const v = n[C], R =
|
|
604
|
+
const v = n[C], R = F(v);
|
|
603
605
|
if (d += R, d >= k.value)
|
|
604
606
|
break;
|
|
605
607
|
}
|
|
@@ -614,48 +616,48 @@ const {
|
|
|
614
616
|
const d = w.value;
|
|
615
617
|
let c = n;
|
|
616
618
|
const v = Array.from(d.children).filter((B) => B.id !== "__more_buttons__"), R = v.length;
|
|
617
|
-
let
|
|
619
|
+
let te = !1, O = 0;
|
|
618
620
|
for (; O < R; O++) {
|
|
619
|
-
const B = v[O],
|
|
620
|
-
if (
|
|
621
|
-
c -=
|
|
621
|
+
const B = v[O], K = F(B);
|
|
622
|
+
if (K <= c)
|
|
623
|
+
c -= K;
|
|
622
624
|
else {
|
|
623
|
-
const
|
|
624
|
-
O =
|
|
625
|
+
const m = J(v, c, O);
|
|
626
|
+
O = m.start, c = m.space, te = !0;
|
|
625
627
|
break;
|
|
626
628
|
}
|
|
627
629
|
}
|
|
628
|
-
if (!
|
|
629
|
-
const B =
|
|
630
|
+
if (!te && y.length > 0) {
|
|
631
|
+
const B = J(v, c, O);
|
|
630
632
|
O = B.start, c = B.space;
|
|
631
633
|
}
|
|
632
|
-
const
|
|
634
|
+
const we = y.length > 0;
|
|
633
635
|
for (; O < R; O++) {
|
|
634
|
-
const B = v[O],
|
|
636
|
+
const B = v[O], K = F(B);
|
|
635
637
|
A.set(B.id, !0);
|
|
636
|
-
const
|
|
637
|
-
|
|
638
|
+
const m = y.find((xe) => xe.id === B.id);
|
|
639
|
+
m ? m.width = K : y[we ? "unshift" : "push"]({
|
|
638
640
|
id: B.id,
|
|
639
|
-
width:
|
|
641
|
+
width: K
|
|
640
642
|
});
|
|
641
643
|
}
|
|
642
644
|
return c;
|
|
643
645
|
}
|
|
644
|
-
function
|
|
646
|
+
function Q() {
|
|
645
647
|
A = /* @__PURE__ */ new Map(), y = [];
|
|
646
648
|
}
|
|
647
|
-
function
|
|
649
|
+
function V(n = !1) {
|
|
648
650
|
const d = Object.assign({}, x.value);
|
|
649
651
|
d.children = [];
|
|
650
|
-
const c = new
|
|
651
|
-
const
|
|
652
|
-
return n ? (c.children.push(R), R.shown = !1, v) : (A.has(R.id) ? (c.children.push(R), R.shown = !1) : R.shown =
|
|
652
|
+
const c = new oe(d), C = i.value.reduce((v, R) => {
|
|
653
|
+
const te = r.items.find((O) => O.id === R.id);
|
|
654
|
+
return n ? (c.children.push(R), R.shown = !1, v) : (A.has(R.id) ? (c.children.push(R), R.shown = !1) : R.shown = te.visible !== !1, v.push(R), v);
|
|
653
655
|
}, []);
|
|
654
656
|
x.value = c, i.value = C;
|
|
655
657
|
}
|
|
656
|
-
function
|
|
658
|
+
function ne(n) {
|
|
657
659
|
if (T) {
|
|
658
|
-
|
|
660
|
+
Q(), V(!0);
|
|
659
661
|
return;
|
|
660
662
|
}
|
|
661
663
|
let d = j(n);
|
|
@@ -675,77 +677,77 @@ const {
|
|
|
675
677
|
A.delete(y[C].id);
|
|
676
678
|
y.splice(0, c - 1);
|
|
677
679
|
}
|
|
678
|
-
|
|
680
|
+
V();
|
|
679
681
|
}
|
|
680
682
|
function L() {
|
|
681
683
|
if (g.value && k.value < 0) {
|
|
682
684
|
const n = g.value.querySelector("#" + _.id);
|
|
683
685
|
if (!n)
|
|
684
686
|
return;
|
|
685
|
-
n.getBoundingClientRect().width === 0 ? k.value = -1 : k.value =
|
|
687
|
+
n.getBoundingClientRect().width === 0 ? k.value = -1 : k.value = F(n);
|
|
686
688
|
}
|
|
687
689
|
}
|
|
688
|
-
function
|
|
690
|
+
function $(n = -1) {
|
|
689
691
|
if (n === 0 || !w.value || !p.value)
|
|
690
692
|
return;
|
|
691
693
|
n < 0 && (n = p.value.getBoundingClientRect().width), n = Math.ceil(n);
|
|
692
694
|
const d = Math.ceil(w.value.getBoundingClientRect().width);
|
|
693
695
|
if (T) {
|
|
694
|
-
|
|
696
|
+
ne(n), b();
|
|
695
697
|
return;
|
|
696
698
|
}
|
|
697
|
-
(n >= 0 && n < d || y.length) && (L(),
|
|
699
|
+
(n >= 0 && n < d || y.length) && (L(), ne(n), b());
|
|
698
700
|
}
|
|
699
|
-
function
|
|
701
|
+
function X() {
|
|
700
702
|
return k.value < 0 && u("div", {
|
|
701
703
|
style: "position:fixed;top:-40px;visibility:hidden;"
|
|
702
|
-
}, [W(new
|
|
704
|
+
}, [W(new oe(_))]);
|
|
703
705
|
}
|
|
704
706
|
const P = new ResizeObserver((n) => {
|
|
705
707
|
if (n.length) {
|
|
706
708
|
if (T)
|
|
707
709
|
return;
|
|
708
710
|
const c = n[0].contentRect.width;
|
|
709
|
-
|
|
711
|
+
$(c);
|
|
710
712
|
}
|
|
711
713
|
});
|
|
712
|
-
function
|
|
714
|
+
function Y() {
|
|
713
715
|
p.value && !z && (P.observe(p.value), z = !0);
|
|
714
716
|
}
|
|
715
|
-
return
|
|
716
|
-
L(),
|
|
717
|
-
}),
|
|
717
|
+
return Oe(() => {
|
|
718
|
+
L(), $(), Y(), document.body.addEventListener("click", b), document.body.addEventListener("wheel", b);
|
|
719
|
+
}), Me(() => {
|
|
718
720
|
P.disconnect(), e(), document.body.removeEventListener("click", b), document.body.removeEventListener("wheel", b);
|
|
719
|
-
}),
|
|
720
|
-
i.value =
|
|
721
|
-
L(),
|
|
721
|
+
}), pe(() => r.items, () => {
|
|
722
|
+
i.value = he(r.items), x.value.children = [], fe(() => {
|
|
723
|
+
L(), Q(), $();
|
|
722
724
|
});
|
|
723
725
|
}, {
|
|
724
726
|
deep: !0
|
|
725
|
-
}),
|
|
726
|
-
n &&
|
|
727
|
-
L(),
|
|
727
|
+
}), pe(() => r.visible, (n) => {
|
|
728
|
+
n && fe(() => {
|
|
729
|
+
L(), $(), Y();
|
|
728
730
|
});
|
|
729
731
|
}), s.expose({
|
|
730
732
|
elementRef: g
|
|
731
|
-
}), () => u("div", {
|
|
733
|
+
}), () => u("div", N(I(s.attrs), {
|
|
732
734
|
class: a.value,
|
|
733
735
|
id: o,
|
|
734
736
|
ref: g,
|
|
735
737
|
style: {
|
|
736
738
|
"overflow-y": k.value < 0 ? "hidden" : "initial"
|
|
737
739
|
}
|
|
738
|
-
}, [r.visible &&
|
|
740
|
+
}), [r.visible && X(), r.visible && u("div", {
|
|
739
741
|
ref: p,
|
|
740
742
|
class: l.value
|
|
741
743
|
}, [u("div", {
|
|
742
744
|
ref: w,
|
|
743
745
|
class: "d-inline-block f-response-content",
|
|
744
746
|
style: "white-space: nowrap;"
|
|
745
|
-
}, [i.value.filter((n) => n.shown).map((n, d) => n.children && n.children.length > 0 ? W(n) :
|
|
747
|
+
}, [i.value.filter((n) => n.shown).map((n, d) => n.children && n.children.length > 0 ? W(n) : ue(n, d)), ce.value && W(x.value)])])]);
|
|
746
748
|
}
|
|
747
749
|
});
|
|
748
|
-
class
|
|
750
|
+
class Fe {
|
|
749
751
|
constructor(s, i) {
|
|
750
752
|
h(this, "id");
|
|
751
753
|
h(this, "name");
|
|
@@ -790,12 +792,12 @@ class Ie {
|
|
|
790
792
|
return this.presetId.length === this.responsedIndex.length;
|
|
791
793
|
}
|
|
792
794
|
}
|
|
793
|
-
const
|
|
795
|
+
const Ve = De(Ae);
|
|
794
796
|
export {
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
797
|
+
Ae as FResponseToolbar,
|
|
798
|
+
oe as ResponseToolbarDropDownItem,
|
|
799
|
+
Fe as ResponseToolbarGroup,
|
|
800
|
+
Be as ResponseToolbarItem,
|
|
801
|
+
Ve as default,
|
|
802
|
+
je as responseToolbarProps
|
|
801
803
|
};
|