@farris/ui-vue 1.0.0 → 1.0.2
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/accordion/package.json +1 -1
- package/avatar/package.json +1 -1
- package/button/package.json +1 -1
- package/button-edit/package.json +1 -1
- package/calculator/package.json +1 -1
- package/calendar/package.json +1 -1
- package/capsule/package.json +1 -1
- package/checkbox/package.json +1 -1
- package/color-picker/package.json +1 -1
- package/combo-list/index.esm.js +759 -751
- package/combo-list/index.umd.js +1 -1
- package/combo-list/package.json +1 -1
- package/combo-list/style.css +1 -1
- package/component/package.json +1 -1
- package/condition/index.esm.js +1999 -1991
- package/condition/index.umd.js +1 -1
- package/condition/package.json +1 -1
- package/condition/style.css +1 -1
- package/content-container/package.json +1 -1
- package/data-grid/index.esm.js +1565 -1557
- package/data-grid/index.umd.js +1 -1
- package/data-grid/package.json +1 -1
- package/data-grid/style.css +1 -1
- package/date-picker/package.json +1 -1
- package/designer-canvas/index.esm.js +1646 -1638
- package/designer-canvas/index.umd.js +1 -1
- package/designer-canvas/package.json +1 -1
- package/designer-canvas/style.css +1 -1
- package/discussion-editor/package.json +1 -1
- package/discussion-list/package.json +1 -1
- package/dropdown/package.json +1 -1
- package/dynamic-form/index.esm.js +1999 -1991
- package/dynamic-form/index.umd.js +1 -1
- package/dynamic-form/package.json +1 -1
- package/dynamic-form/style.css +1 -1
- package/dynamic-resolver/package.json +1 -1
- package/dynamic-view/index.esm.js +2014 -2006
- package/dynamic-view/index.umd.js +1 -1
- package/dynamic-view/package.json +1 -1
- package/dynamic-view/style.css +1 -1
- package/farris.all.esm.js +2033 -2025
- package/farris.all.umd.js +5 -5
- package/filter-bar/package.json +1 -1
- package/image-cropper/package.json +1 -1
- package/input-group/package.json +1 -1
- package/list-nav/package.json +1 -1
- package/list-view/package.json +1 -1
- package/loading/package.json +1 -1
- package/locale/package.json +1 -1
- package/message-box/package.json +1 -1
- package/modal/package.json +1 -1
- package/nav/package.json +1 -1
- package/notify/package.json +1 -1
- package/order/index.esm.js +796 -788
- package/order/index.umd.js +1 -1
- package/order/package.json +1 -1
- package/order/style.css +1 -1
- package/package.json +4 -4
- package/page-footer/package.json +1 -1
- package/page-header/package.json +1 -1
- package/pagination/package.json +1 -1
- package/popover/package.json +1 -1
- package/propress/package.json +1 -1
- package/radio-group/package.json +1 -1
- package/rate/package.json +1 -1
- package/response-toolbar/package.json +1 -1
- package/search-box/package.json +1 -1
- package/section/package.json +1 -1
- package/splitter/package.json +1 -1
- package/step/package.json +1 -1
- package/style.css +1 -1
- package/switch/package.json +1 -1
- package/tabs/package.json +1 -1
- package/tags/package.json +1 -1
- package/text/package.json +1 -1
- package/time-picker/package.json +1 -1
- package/tooltip/package.json +1 -1
- package/transfer/package.json +1 -1
- package/tree-view/package.json +1 -1
- package/types/combo-list/src/components/list-container.props.d.ts +3 -1
- package/types/combo-list/src/composition/types.d.ts +1 -0
- package/uploader/package.json +1 -1
- package/verify-detail/package.json +1 -1
package/combo-list/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as a, computed as B, watch as W, defineComponent as G, createVNode as
|
|
1
|
+
import { ref as a, computed as B, watch as W, defineComponent as G, createVNode as v, withDirectives as Q, vModelCheckbox as Me, Fragment as re, withModifiers as Fe, vModelText as Oe, Teleport as de, createApp as Le, onUnmounted as fe, nextTick as K, vShow as ve, onMounted as ne, mergeProps as Ve, inject as De } from "vue";
|
|
2
2
|
const pe = {};
|
|
3
3
|
function oe(e) {
|
|
4
4
|
const { properties: t } = e;
|
|
@@ -15,11 +15,11 @@ function Re(e, t) {
|
|
|
15
15
|
function Ae(e, t) {
|
|
16
16
|
return Object.keys(e).filter((l) => e[l] != null).reduce((l, n) => {
|
|
17
17
|
if (t.has(n)) {
|
|
18
|
-
const
|
|
19
|
-
if (typeof
|
|
20
|
-
l[
|
|
18
|
+
const s = t.get(n);
|
|
19
|
+
if (typeof s == "string")
|
|
20
|
+
l[s] = e[n];
|
|
21
21
|
else {
|
|
22
|
-
const u =
|
|
22
|
+
const u = s(n, e[n]);
|
|
23
23
|
Object.assign(l, u);
|
|
24
24
|
}
|
|
25
25
|
} else
|
|
@@ -33,8 +33,8 @@ function Ee(e, t, o = /* @__PURE__ */ new Map()) {
|
|
|
33
33
|
}
|
|
34
34
|
function ge(e, t, o = /* @__PURE__ */ new Map()) {
|
|
35
35
|
return pe[t.title] = t, (l) => {
|
|
36
|
-
const n = Ee(l, t, o),
|
|
37
|
-
return Object.assign(
|
|
36
|
+
const n = Ee(l, t, o), s = Object.keys(e).reduce((u, r) => (u[r] = e[r].default, u), {});
|
|
37
|
+
return Object.assign(s, n);
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
function me(e, t) {
|
|
@@ -287,7 +287,8 @@ const ae = {
|
|
|
287
287
|
selectedValues: { type: String, default: "" },
|
|
288
288
|
separator: { type: String, default: "," },
|
|
289
289
|
textField: { type: String, default: "name" },
|
|
290
|
-
width: { type: Number
|
|
290
|
+
width: { type: Number },
|
|
291
|
+
height: { type: Number },
|
|
291
292
|
valueField: { type: String, default: "id" }
|
|
292
293
|
}, Qe = {
|
|
293
294
|
data: { type: Array, default: [] },
|
|
@@ -308,99 +309,99 @@ const ae = {
|
|
|
308
309
|
disableField: { type: String, default: "disabled" }
|
|
309
310
|
};
|
|
310
311
|
function Ye(e, t, o, l, n) {
|
|
311
|
-
const
|
|
312
|
+
const s = a(e.idField), u = a(e.disableField), r = a(e.draggable), y = a(e.itemClass), d = a(e.multiSelect), f = a(e.multiSelectMode);
|
|
312
313
|
a(!0);
|
|
313
|
-
const { isDragging:
|
|
314
|
-
function
|
|
315
|
-
const
|
|
314
|
+
const { isDragging: i } = o, { activeIndex: c, focusedItemId: m, hoverIndex: p } = l, { clearSelection: b, selectedItems: M, toggleSelectItem: P } = n;
|
|
315
|
+
function S(C, j) {
|
|
316
|
+
const L = {
|
|
316
317
|
"f-list-view-group-item": !0,
|
|
317
|
-
"f-list-view-draggable-item":
|
|
318
|
+
"f-list-view-draggable-item": r.value,
|
|
318
319
|
"f-un-click": !!C.unClick,
|
|
319
320
|
"f-un-select": !!C[u.value],
|
|
320
|
-
"f-listview-active": C.__fv_index__ ===
|
|
321
|
-
"f-listview-hover": !
|
|
321
|
+
"f-listview-active": C.__fv_index__ === c.value,
|
|
322
|
+
"f-listview-hover": !i.value && j === p.value,
|
|
322
323
|
moving: !!C.moving
|
|
323
324
|
};
|
|
324
|
-
return
|
|
325
|
+
return y.value.split(" ").reduce((z, D) => (z[D] = !0, z), L), L;
|
|
325
326
|
}
|
|
326
|
-
function
|
|
327
|
-
return C[
|
|
327
|
+
function h(C, j) {
|
|
328
|
+
return C[s.value] || "";
|
|
328
329
|
}
|
|
329
|
-
const
|
|
330
|
-
function
|
|
331
|
-
C.unClick || C[u.value] || (
|
|
330
|
+
const T = B(() => !d.value);
|
|
331
|
+
function k(C, j) {
|
|
332
|
+
C.unClick || C[u.value] || (T.value && (m.value = C[s.value]), P(C, j));
|
|
332
333
|
}
|
|
333
|
-
const
|
|
334
|
-
function
|
|
334
|
+
const x = B(() => d.value && f.value === "OnCheckClearByClick"), E = B(() => !d.value || d.value && (f.value === "OnCheckAndClick" || f.value === "OnClick"));
|
|
335
|
+
function V(C, j, L) {
|
|
335
336
|
if (j.unClick || j[u.value]) {
|
|
336
337
|
C.preventDefault(), C.stopPropagation();
|
|
337
338
|
return;
|
|
338
339
|
}
|
|
339
|
-
|
|
340
|
+
m.value = j[s.value], c.value = L, x.value && b(), E.value && P(j, L), t.emit("clickItem", { data: M.value, index: L });
|
|
340
341
|
}
|
|
341
342
|
return {
|
|
342
|
-
getKey:
|
|
343
|
-
listViewItemClass:
|
|
344
|
-
onCheckItem:
|
|
345
|
-
onClickItem:
|
|
343
|
+
getKey: h,
|
|
344
|
+
listViewItemClass: S,
|
|
345
|
+
onCheckItem: k,
|
|
346
|
+
onClickItem: V
|
|
346
347
|
};
|
|
347
348
|
}
|
|
348
349
|
function Ze(e, t, o) {
|
|
349
350
|
const l = a(e.idField), n = a(e.multiSelect);
|
|
350
351
|
a(e.multiSelectMode);
|
|
351
|
-
const { getSelectionItems:
|
|
352
|
-
W(() => e.selectionValues, (
|
|
353
|
-
u.value = a(
|
|
352
|
+
const { getSelectionItems: s } = o, u = a(s(e.selectionValues));
|
|
353
|
+
W(() => e.selectionValues, (c) => {
|
|
354
|
+
u.value = a(s(c)).value;
|
|
354
355
|
});
|
|
355
|
-
const
|
|
356
|
-
function
|
|
357
|
-
return
|
|
356
|
+
const r = B(() => !n.value);
|
|
357
|
+
function y(c) {
|
|
358
|
+
return c[l.value] || "";
|
|
358
359
|
}
|
|
359
|
-
function
|
|
360
|
-
return u.value.findIndex((
|
|
360
|
+
function d(c) {
|
|
361
|
+
return u.value.findIndex((p) => y(p) === y(c));
|
|
361
362
|
}
|
|
362
363
|
function f() {
|
|
363
|
-
u.value.forEach((
|
|
364
|
-
|
|
364
|
+
u.value.forEach((c) => {
|
|
365
|
+
c.checked = !1;
|
|
365
366
|
}), u.value = [];
|
|
366
367
|
}
|
|
367
|
-
function
|
|
368
|
-
|
|
369
|
-
const
|
|
370
|
-
|
|
368
|
+
function i(c, m) {
|
|
369
|
+
r.value && f();
|
|
370
|
+
const p = d(c);
|
|
371
|
+
p > -1 ? (u.value.splice(p, 1), c.checked = !1) : (u.value.push(c), c.checked = !0), t.emit("selectionChange", u.value);
|
|
371
372
|
}
|
|
372
|
-
return { clearSelection: f, findIndexInSelectedItems:
|
|
373
|
+
return { clearSelection: f, findIndexInSelectedItems: d, selectedItems: u, toggleSelectItem: i };
|
|
373
374
|
}
|
|
374
375
|
function et(e, t) {
|
|
375
|
-
function o(
|
|
376
|
+
function o(s) {
|
|
376
377
|
const u = [];
|
|
377
|
-
let
|
|
378
|
-
for (;
|
|
379
|
-
u.push(
|
|
378
|
+
let r = s.nextNode();
|
|
379
|
+
for (; r; )
|
|
380
|
+
u.push(r), r = s.nextNode();
|
|
380
381
|
return u;
|
|
381
382
|
}
|
|
382
|
-
function l(
|
|
383
|
-
const
|
|
384
|
-
return o(
|
|
385
|
-
const
|
|
386
|
-
let
|
|
387
|
-
for (;
|
|
388
|
-
const
|
|
389
|
-
if (
|
|
383
|
+
function l(s, u) {
|
|
384
|
+
const r = document.createTreeWalker(s, NodeFilter.SHOW_TEXT);
|
|
385
|
+
return o(r).map((i) => ({ textNode: i, text: (i.textContent || "").toLocaleLowerCase() })).map(({ textNode: i, text: c }) => {
|
|
386
|
+
const m = [];
|
|
387
|
+
let p = 0;
|
|
388
|
+
for (; p < c.length; ) {
|
|
389
|
+
const b = c.indexOf(u, p);
|
|
390
|
+
if (b === -1)
|
|
390
391
|
break;
|
|
391
|
-
|
|
392
|
+
m.push(b), p = b + u.length;
|
|
392
393
|
}
|
|
393
|
-
return
|
|
394
|
-
const
|
|
395
|
-
return
|
|
394
|
+
return m.map((b) => {
|
|
395
|
+
const M = new Range();
|
|
396
|
+
return M.setStart(i, b), M.setEnd(i, b + u.length), M;
|
|
396
397
|
});
|
|
397
398
|
}).flat();
|
|
398
399
|
}
|
|
399
|
-
function n(
|
|
400
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !
|
|
400
|
+
function n(s) {
|
|
401
|
+
if (!CSS.highlights || (CSS.highlights.clear(), !s || !t))
|
|
401
402
|
return;
|
|
402
|
-
const u = l(t.value,
|
|
403
|
-
CSS.highlights.set("search-result",
|
|
403
|
+
const u = l(t.value, s.toLocaleLowerCase()), r = new Highlight(...u);
|
|
404
|
+
CSS.highlights.set("search-result", r);
|
|
404
405
|
}
|
|
405
406
|
return { search: n };
|
|
406
407
|
}
|
|
@@ -418,7 +419,7 @@ const tt = {
|
|
|
418
419
|
emits: ["change", "update:modelValue"],
|
|
419
420
|
setup(e, t) {
|
|
420
421
|
const o = a(e.checked), l = a(e.disabled), n = a(e.id);
|
|
421
|
-
function
|
|
422
|
+
function s(u) {
|
|
422
423
|
u.stopPropagation(), u.preventDefault(), l.value || (o.value = !o.value, t.emit("change", {
|
|
423
424
|
originalEvent: u,
|
|
424
425
|
checked: o.value
|
|
@@ -426,170 +427,170 @@ const tt = {
|
|
|
426
427
|
}
|
|
427
428
|
return W(() => e.checked, (u) => {
|
|
428
429
|
o.value = u;
|
|
429
|
-
}), () =>
|
|
430
|
+
}), () => v("div", {
|
|
430
431
|
class: "custom-control custom-checkbox custom-control-inline listview-checkbox"
|
|
431
|
-
}, [Q(
|
|
432
|
+
}, [Q(v("input", {
|
|
432
433
|
id: n.value,
|
|
433
434
|
title: n.value,
|
|
434
435
|
type: "checkbox",
|
|
435
436
|
class: "custom-control-input",
|
|
436
437
|
"onUpdate:modelValue": (u) => o.value = u,
|
|
437
438
|
onChange: (u) => console.log(u)
|
|
438
|
-
}, null), [[Me, o.value]]),
|
|
439
|
+
}, null), [[Me, o.value]]), v("label", {
|
|
439
440
|
for: n.value,
|
|
440
441
|
class: "custom-control-label",
|
|
441
|
-
onClick: (u) =>
|
|
442
|
+
onClick: (u) => s(u)
|
|
442
443
|
}, null)]);
|
|
443
444
|
}
|
|
444
445
|
});
|
|
445
|
-
function se(e, t, o, l, n,
|
|
446
|
-
const
|
|
447
|
-
onMouseenterItem:
|
|
448
|
-
onMouseoverItem:
|
|
449
|
-
onMouseoutItem:
|
|
446
|
+
function se(e, t, o, l, n, s, u, r) {
|
|
447
|
+
const y = a(e.size), d = a(e.textField), f = a(e.multiSelect), i = a(e.disableField), {
|
|
448
|
+
onMouseenterItem: c,
|
|
449
|
+
onMouseoverItem: m,
|
|
450
|
+
onMouseoutItem: p
|
|
450
451
|
} = n, {
|
|
451
|
-
getKey:
|
|
452
|
-
listViewItemClass:
|
|
453
|
-
onCheckItem:
|
|
454
|
-
onClickItem:
|
|
455
|
-
} =
|
|
456
|
-
margin:
|
|
452
|
+
getKey: b,
|
|
453
|
+
listViewItemClass: M,
|
|
454
|
+
onCheckItem: P,
|
|
455
|
+
onClickItem: S
|
|
456
|
+
} = s, h = B(() => ({
|
|
457
|
+
margin: y.value === "small" ? "0.25rem 0" : "10px 0"
|
|
457
458
|
}));
|
|
458
|
-
function
|
|
459
|
-
return
|
|
460
|
-
class:
|
|
461
|
-
id:
|
|
462
|
-
key:
|
|
463
|
-
onClick: (
|
|
464
|
-
onMouseenter: (
|
|
465
|
-
onMouseover: (
|
|
466
|
-
onMouseout: (
|
|
467
|
-
}, [f.value &&
|
|
459
|
+
function T(k, x, E) {
|
|
460
|
+
return k.checked = u.findIndexInSelectedItems(k) > -1, v("li", {
|
|
461
|
+
class: M(k, x),
|
|
462
|
+
id: b(k, x),
|
|
463
|
+
key: b(k, x),
|
|
464
|
+
onClick: (V) => S(V, k, x),
|
|
465
|
+
onMouseenter: (V) => c(V, k, x),
|
|
466
|
+
onMouseover: (V) => m(V, k, x),
|
|
467
|
+
onMouseout: (V) => p(V, k, x)
|
|
468
|
+
}, [f.value && v("div", {
|
|
468
469
|
class: "f-list-select",
|
|
469
|
-
onClick: (
|
|
470
|
-
}, [
|
|
471
|
-
id: "list-" +
|
|
472
|
-
disabled:
|
|
473
|
-
checked:
|
|
474
|
-
onChange: (
|
|
475
|
-
}, null)]),
|
|
470
|
+
onClick: (V) => V.stopPropagation()
|
|
471
|
+
}, [v(le, {
|
|
472
|
+
id: "list-" + b(k, x),
|
|
473
|
+
disabled: k[i.value] || k.unClick,
|
|
474
|
+
checked: k.checked,
|
|
475
|
+
onChange: (V) => P(k, x)
|
|
476
|
+
}, null)]), v("div", {
|
|
476
477
|
class: "f-list-content"
|
|
477
|
-
}, [
|
|
478
|
-
style:
|
|
479
|
-
}, [
|
|
478
|
+
}, [v("div", {
|
|
479
|
+
style: h.value
|
|
480
|
+
}, [k[d.value]])])]);
|
|
480
481
|
}
|
|
481
482
|
return {
|
|
482
|
-
renderItem:
|
|
483
|
+
renderItem: T
|
|
483
484
|
};
|
|
484
485
|
}
|
|
485
|
-
function nt(e, t, o, l, n,
|
|
486
|
-
const
|
|
486
|
+
function nt(e, t, o, l, n, s, u, r) {
|
|
487
|
+
const y = a(e.multiSelect), d = a(e.disableField), {
|
|
487
488
|
onMouseenterItem: f,
|
|
488
|
-
onMouseoverItem:
|
|
489
|
-
onMouseoutItem:
|
|
489
|
+
onMouseoverItem: i,
|
|
490
|
+
onMouseoutItem: c
|
|
490
491
|
} = n, {
|
|
491
|
-
getKey:
|
|
492
|
-
listViewItemClass:
|
|
493
|
-
onCheckItem:
|
|
494
|
-
onClickItem:
|
|
495
|
-
} =
|
|
496
|
-
function
|
|
497
|
-
return t.slots.content ?
|
|
498
|
-
item:
|
|
499
|
-
index:
|
|
500
|
-
selectedItem:
|
|
501
|
-
})]) :
|
|
492
|
+
getKey: m,
|
|
493
|
+
listViewItemClass: p,
|
|
494
|
+
onCheckItem: b,
|
|
495
|
+
onClickItem: M
|
|
496
|
+
} = s;
|
|
497
|
+
function P(h, T, k) {
|
|
498
|
+
return t.slots.content ? v(re, null, [t.slots.content && t.slots.content({
|
|
499
|
+
item: h,
|
|
500
|
+
index: T,
|
|
501
|
+
selectedItem: k
|
|
502
|
+
})]) : v("div", {
|
|
502
503
|
style: "margin: 10px 0;"
|
|
503
|
-
}, [
|
|
504
|
-
}
|
|
505
|
-
function
|
|
506
|
-
return
|
|
507
|
-
class:
|
|
508
|
-
id:
|
|
509
|
-
key:
|
|
510
|
-
onClick: (
|
|
511
|
-
onMouseenter: (
|
|
512
|
-
onMouseover: (
|
|
513
|
-
onMouseout: (
|
|
514
|
-
}, [
|
|
504
|
+
}, [h.name]);
|
|
505
|
+
}
|
|
506
|
+
function S(h, T, k) {
|
|
507
|
+
return v("li", {
|
|
508
|
+
class: p(h, T),
|
|
509
|
+
id: m(h, T),
|
|
510
|
+
key: m(h, T),
|
|
511
|
+
onClick: (x) => M(x, h, T),
|
|
512
|
+
onMouseenter: (x) => f(x, h, T),
|
|
513
|
+
onMouseover: (x) => i(x, h, T),
|
|
514
|
+
onMouseout: (x) => c(x, h, T)
|
|
515
|
+
}, [y.value && v("div", {
|
|
515
516
|
class: "f-list-select",
|
|
516
|
-
onClick: (
|
|
517
|
-
}, [
|
|
518
|
-
id: "list-" +
|
|
519
|
-
disabled:
|
|
520
|
-
checked:
|
|
521
|
-
onChange: (
|
|
522
|
-
}, null)]),
|
|
517
|
+
onClick: (x) => x.stopPropagation()
|
|
518
|
+
}, [v(le, {
|
|
519
|
+
id: "list-" + m(h, T),
|
|
520
|
+
disabled: h[d.value] || h.unClick,
|
|
521
|
+
checked: h.checked,
|
|
522
|
+
onChange: (x) => b(h, T)
|
|
523
|
+
}, null)]), v("div", {
|
|
523
524
|
class: "f-list-content"
|
|
524
|
-
}, [
|
|
525
|
+
}, [P(h, T, k)])]);
|
|
525
526
|
}
|
|
526
527
|
return {
|
|
527
|
-
renderItem:
|
|
528
|
+
renderItem: S
|
|
528
529
|
};
|
|
529
530
|
}
|
|
530
|
-
function ot(e, t, o, l, n,
|
|
531
|
-
const
|
|
531
|
+
function ot(e, t, o, l, n, s, u, r) {
|
|
532
|
+
const y = a(e.multiSelect), d = a(e.disableField), {
|
|
532
533
|
onMouseenterItem: f,
|
|
533
|
-
onMouseoverItem:
|
|
534
|
-
onMouseoutItem:
|
|
534
|
+
onMouseoverItem: i,
|
|
535
|
+
onMouseoutItem: c
|
|
535
536
|
} = n, {
|
|
536
|
-
getKey:
|
|
537
|
-
listViewItemClass:
|
|
538
|
-
onCheckItem:
|
|
539
|
-
onClickItem:
|
|
540
|
-
} =
|
|
541
|
-
dragstart:
|
|
542
|
-
dragenter:
|
|
543
|
-
dragover:
|
|
544
|
-
dragend:
|
|
537
|
+
getKey: m,
|
|
538
|
+
listViewItemClass: p,
|
|
539
|
+
onCheckItem: b,
|
|
540
|
+
onClickItem: M
|
|
541
|
+
} = s, {
|
|
542
|
+
dragstart: P,
|
|
543
|
+
dragenter: S,
|
|
544
|
+
dragover: h,
|
|
545
|
+
dragend: T
|
|
545
546
|
} = l, {
|
|
546
|
-
removeItem:
|
|
547
|
-
} =
|
|
548
|
-
margin:
|
|
547
|
+
removeItem: k
|
|
548
|
+
} = r, x = B(() => ({
|
|
549
|
+
margin: y.value ? "10px 0" : "10px 0px 10px 14px"
|
|
549
550
|
}));
|
|
550
|
-
function E(
|
|
551
|
-
return
|
|
552
|
-
style:
|
|
553
|
-
}, [
|
|
551
|
+
function E(L) {
|
|
552
|
+
return v("div", {
|
|
553
|
+
style: x.value
|
|
554
|
+
}, [L.name]);
|
|
554
555
|
}
|
|
555
|
-
function
|
|
556
|
+
function V() {
|
|
556
557
|
return t.slots.itemContent ? t.slots.itemContent : E;
|
|
557
558
|
}
|
|
558
|
-
const C =
|
|
559
|
-
function j(
|
|
560
|
-
return
|
|
561
|
-
class:
|
|
562
|
-
id:
|
|
563
|
-
key:
|
|
564
|
-
onClick: (D) =>
|
|
565
|
-
onMouseenter: (D) => f(D,
|
|
566
|
-
onMouseover: (D) =>
|
|
567
|
-
onMouseout: (D) =>
|
|
559
|
+
const C = V();
|
|
560
|
+
function j(L, R, z) {
|
|
561
|
+
return v("li", {
|
|
562
|
+
class: p(L, R),
|
|
563
|
+
id: m(L, R),
|
|
564
|
+
key: m(L, R),
|
|
565
|
+
onClick: (D) => M(D, L, R),
|
|
566
|
+
onMouseenter: (D) => f(D, L, R),
|
|
567
|
+
onMouseover: (D) => i(D, L, R),
|
|
568
|
+
onMouseout: (D) => c(D, L, R),
|
|
568
569
|
draggable: "true",
|
|
569
|
-
onDragstart: (D) =>
|
|
570
|
-
onDragenter: (D) =>
|
|
571
|
-
onDragend: (D) =>
|
|
572
|
-
onDragover: (D) =>
|
|
573
|
-
}, [
|
|
570
|
+
onDragstart: (D) => P(D, L, R),
|
|
571
|
+
onDragenter: (D) => S(D, R),
|
|
572
|
+
onDragend: (D) => T(D, L),
|
|
573
|
+
onDragover: (D) => h(D, R)
|
|
574
|
+
}, [y.value && v("div", {
|
|
574
575
|
class: "f-list-select",
|
|
575
576
|
onClick: (D) => D.stopPropagation()
|
|
576
|
-
}, [
|
|
577
|
-
id: "list-" +
|
|
578
|
-
disabled:
|
|
579
|
-
checked:
|
|
580
|
-
onChange: (D) =>
|
|
581
|
-
}, null)]),
|
|
577
|
+
}, [v(le, {
|
|
578
|
+
id: "list-" + m(L, R),
|
|
579
|
+
disabled: L[d.value] || L.unClick,
|
|
580
|
+
checked: L.checked,
|
|
581
|
+
onChange: (D) => b(L, R)
|
|
582
|
+
}, null)]), v("div", {
|
|
582
583
|
class: "f-list-content"
|
|
583
|
-
}, [C(
|
|
584
|
+
}, [C(L)]), v("div", {
|
|
584
585
|
class: "f-list-remove",
|
|
585
|
-
onClick: (D) =>
|
|
586
|
-
}, [
|
|
586
|
+
onClick: (D) => k(R)
|
|
587
|
+
}, [v("div", {
|
|
587
588
|
class: "f-list-remove-icon"
|
|
588
|
-
}, [
|
|
589
|
+
}, [v("i", {
|
|
589
590
|
class: "f-icon f-icon-remove_face"
|
|
590
|
-
}, null)])]),
|
|
591
|
+
}, null)])]), v("div", {
|
|
591
592
|
class: "f-list-handle"
|
|
592
|
-
}, [
|
|
593
|
+
}, [v("div", null, [v("i", {
|
|
593
594
|
class: "f-icon f-icon-drag-vertical"
|
|
594
595
|
}, null)])])]);
|
|
595
596
|
}
|
|
@@ -599,7 +600,7 @@ function ot(e, t, o, l, n, i, u, c) {
|
|
|
599
600
|
}
|
|
600
601
|
function at(e, t, o) {
|
|
601
602
|
function l() {
|
|
602
|
-
return t.slots.header &&
|
|
603
|
+
return t.slots.header && v("div", {
|
|
603
604
|
class: "f-list-view-header"
|
|
604
605
|
}, [t.slots.header()]);
|
|
605
606
|
}
|
|
@@ -608,121 +609,121 @@ function at(e, t, o) {
|
|
|
608
609
|
};
|
|
609
610
|
}
|
|
610
611
|
function ce(e, t, o) {
|
|
611
|
-
const l = a(e.headerClass), n = a(e.placeholder),
|
|
612
|
-
function
|
|
613
|
-
|
|
612
|
+
const l = a(e.headerClass), n = a(e.placeholder), s = a(""), u = B(() => !s.value), r = B(() => !!s.value);
|
|
613
|
+
function y(c) {
|
|
614
|
+
s.value = "";
|
|
614
615
|
}
|
|
615
|
-
W(
|
|
616
|
-
o.search(
|
|
616
|
+
W(s, (c) => {
|
|
617
|
+
o.search(c);
|
|
617
618
|
});
|
|
618
|
-
const
|
|
619
|
-
const
|
|
619
|
+
const d = B(() => {
|
|
620
|
+
const c = {
|
|
620
621
|
"form-group": !0,
|
|
621
622
|
"farris-form-group": !0
|
|
622
623
|
};
|
|
623
|
-
return l.value && l.value.split(" ").reduce((
|
|
624
|
+
return l.value && l.value.split(" ").reduce((p, b) => (p[b] = !0, p), c), c;
|
|
624
625
|
});
|
|
625
|
-
function f(
|
|
626
|
+
function f(c) {
|
|
626
627
|
}
|
|
627
|
-
function
|
|
628
|
-
return
|
|
628
|
+
function i() {
|
|
629
|
+
return v("div", {
|
|
629
630
|
class: "f-list-view-header",
|
|
630
631
|
onClick: Fe(f, ["prevent", "stop"])
|
|
631
|
-
}, [
|
|
632
|
-
class:
|
|
633
|
-
}, [
|
|
632
|
+
}, [v("div", {
|
|
633
|
+
class: d.value
|
|
634
|
+
}, [v("div", {
|
|
634
635
|
class: "farris-input-wrap"
|
|
635
|
-
}, [
|
|
636
|
+
}, [v("div", {
|
|
636
637
|
class: "f-cmp-inputgroup"
|
|
637
|
-
}, [
|
|
638
|
+
}, [v("div", {
|
|
638
639
|
class: "input-group f-state-editable"
|
|
639
|
-
}, [Q(
|
|
640
|
+
}, [Q(v("input", {
|
|
640
641
|
class: "form-control f-utils-fill text-left",
|
|
641
|
-
"onUpdate:modelValue": (
|
|
642
|
+
"onUpdate:modelValue": (c) => s.value = c,
|
|
642
643
|
name: "input-group-value",
|
|
643
644
|
type: "text",
|
|
644
645
|
placeholder: n.value,
|
|
645
646
|
autocomplete: "off"
|
|
646
|
-
}, null), [[Oe,
|
|
647
|
+
}, null), [[Oe, s.value]]), v("div", {
|
|
647
648
|
class: "input-group-append"
|
|
648
|
-
}, [
|
|
649
|
+
}, [r.value && v("span", {
|
|
649
650
|
class: "input-group-text input-group-clear",
|
|
650
|
-
onClick: (
|
|
651
|
-
}, [
|
|
651
|
+
onClick: (c) => y()
|
|
652
|
+
}, [v("i", {
|
|
652
653
|
class: "f-icon f-icon-close-circle"
|
|
653
|
-
}, null)]), u.value &&
|
|
654
|
+
}, null)]), u.value && v("span", {
|
|
654
655
|
class: "input-group-text"
|
|
655
|
-
}, [
|
|
656
|
+
}, [v("span", {
|
|
656
657
|
class: "f-icon f-icon-search"
|
|
657
658
|
}, null)])])])])])])]);
|
|
658
659
|
}
|
|
659
660
|
return {
|
|
660
|
-
renderHeader:
|
|
661
|
+
renderHeader: i
|
|
661
662
|
};
|
|
662
663
|
}
|
|
663
664
|
function lt(e, t) {
|
|
664
|
-
const o = a(e.idField), l = a(e.data), n = a(e.data),
|
|
665
|
+
const o = a(e.idField), l = a(e.data), n = a(e.data), s = a(e.keepOrder);
|
|
665
666
|
function u() {
|
|
666
|
-
const
|
|
667
|
-
return n.value =
|
|
667
|
+
const d = l.value.map((f, i) => typeof f != "object" ? { __fv_index__: i, name: f } : (f.__fv_index__ = i, f));
|
|
668
|
+
return n.value = d, d;
|
|
668
669
|
}
|
|
669
|
-
const
|
|
670
|
+
const r = a(u());
|
|
670
671
|
W(
|
|
671
672
|
() => e.data,
|
|
672
|
-
(
|
|
673
|
-
if (
|
|
674
|
-
const f =
|
|
675
|
-
l.value = [...
|
|
673
|
+
(d) => {
|
|
674
|
+
if (s.value) {
|
|
675
|
+
const f = d.reduce((p, b) => (p.set(b.id, !0), p), /* @__PURE__ */ new Map()), i = l.value.reduce((p, b) => (p.set(b.id, !0), p), /* @__PURE__ */ new Map()), c = r.value.filter((p) => f.has(p.id)), m = d.filter((p) => !i.has(p.id));
|
|
676
|
+
l.value = [...c, ...m];
|
|
676
677
|
} else
|
|
677
|
-
l.value =
|
|
678
|
-
|
|
678
|
+
l.value = d;
|
|
679
|
+
r.value = u();
|
|
679
680
|
}
|
|
680
681
|
);
|
|
681
|
-
function
|
|
682
|
-
return
|
|
683
|
-
const
|
|
684
|
-
return
|
|
685
|
-
}).filter((
|
|
682
|
+
function y(d) {
|
|
683
|
+
return d.map((i) => {
|
|
684
|
+
const c = n.value.findIndex((m) => m[o.value] === i);
|
|
685
|
+
return c > -1 ? n.value[c] : null;
|
|
686
|
+
}).filter((i) => i != null);
|
|
686
687
|
}
|
|
687
688
|
return {
|
|
688
|
-
dataView:
|
|
689
|
-
getSelectionItems:
|
|
689
|
+
dataView: r,
|
|
690
|
+
getSelectionItems: y
|
|
690
691
|
};
|
|
691
692
|
}
|
|
692
693
|
function ut(e, t, o, l) {
|
|
693
|
-
const n = a(e.idField), { dataView:
|
|
694
|
-
function
|
|
695
|
-
|
|
696
|
-
u.value =
|
|
694
|
+
const n = a(e.idField), { dataView: s } = o, u = a(-1), r = a(!1), { activeIndex: y, focusedItemId: d, hoverIndex: f, resumeHover: i, suspendHover: c } = l;
|
|
695
|
+
function m(P, S, h) {
|
|
696
|
+
P.stopPropagation(), c(), S && setTimeout(() => {
|
|
697
|
+
u.value = h, r.value = !0, S.moving = !0;
|
|
697
698
|
});
|
|
698
699
|
}
|
|
699
|
-
function
|
|
700
|
-
if (
|
|
701
|
-
const
|
|
702
|
-
|
|
700
|
+
function p(P, S) {
|
|
701
|
+
if (P.preventDefault(), u.value !== S) {
|
|
702
|
+
const h = s.value[u.value], T = s.value;
|
|
703
|
+
T.splice(u.value, 1), T.splice(S, 0, h), u.value = S;
|
|
703
704
|
}
|
|
704
705
|
}
|
|
705
|
-
function
|
|
706
|
-
|
|
706
|
+
function b(P, S) {
|
|
707
|
+
P.preventDefault(), P.dataTransfer && (P.dataTransfer.dropEffect = "move");
|
|
707
708
|
}
|
|
708
|
-
function P
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
}),
|
|
709
|
+
function M(P, S) {
|
|
710
|
+
S && (S.moving = !1), s.value.forEach((h, T) => {
|
|
711
|
+
h.__fv_index__ = T;
|
|
712
|
+
}), r.value = !1, i(), f.value = S.__fv_index__, y.value = S.__fv_index__, d.value = S[n.value], t.emit("change", s.value);
|
|
712
713
|
}
|
|
713
714
|
return {
|
|
714
|
-
dragstart:
|
|
715
|
-
dragenter:
|
|
716
|
-
dragover:
|
|
717
|
-
dragend:
|
|
718
|
-
isDragging:
|
|
715
|
+
dragstart: m,
|
|
716
|
+
dragenter: p,
|
|
717
|
+
dragover: b,
|
|
718
|
+
dragend: M,
|
|
719
|
+
isDragging: r
|
|
719
720
|
};
|
|
720
721
|
}
|
|
721
722
|
function it(e, t, o) {
|
|
722
723
|
const { dataView: l } = o;
|
|
723
|
-
function n(
|
|
724
|
-
if (
|
|
725
|
-
const u = l.value.splice(
|
|
724
|
+
function n(s) {
|
|
725
|
+
if (s > -1 && s < l.value.length) {
|
|
726
|
+
const u = l.value.splice(s, 1);
|
|
726
727
|
t.emit("removeItem", u[0]);
|
|
727
728
|
}
|
|
728
729
|
}
|
|
@@ -730,19 +731,19 @@ function it(e, t, o) {
|
|
|
730
731
|
}
|
|
731
732
|
function st() {
|
|
732
733
|
const e = a(-1), t = a(""), o = a(-1), l = a(!1);
|
|
733
|
-
function n(
|
|
734
|
-
o.value =
|
|
734
|
+
function n(d, f, i) {
|
|
735
|
+
o.value = i;
|
|
735
736
|
}
|
|
736
|
-
function
|
|
737
|
-
l.value || (o.value =
|
|
737
|
+
function s(d, f, i) {
|
|
738
|
+
l.value || (o.value = i);
|
|
738
739
|
}
|
|
739
|
-
function u(
|
|
740
|
+
function u(d, f, i) {
|
|
740
741
|
o.value = -1;
|
|
741
742
|
}
|
|
742
|
-
function
|
|
743
|
+
function r() {
|
|
743
744
|
l.value = !0;
|
|
744
745
|
}
|
|
745
|
-
function
|
|
746
|
+
function y() {
|
|
746
747
|
l.value = !1;
|
|
747
748
|
}
|
|
748
749
|
return {
|
|
@@ -750,10 +751,10 @@ function st() {
|
|
|
750
751
|
focusedItemId: t,
|
|
751
752
|
hoverIndex: o,
|
|
752
753
|
onMouseenterItem: n,
|
|
753
|
-
onMouseoverItem:
|
|
754
|
+
onMouseoverItem: s,
|
|
754
755
|
onMouseoutItem: u,
|
|
755
|
-
resumeHover:
|
|
756
|
-
suspendHover:
|
|
756
|
+
resumeHover: y,
|
|
757
|
+
suspendHover: r
|
|
757
758
|
};
|
|
758
759
|
}
|
|
759
760
|
const ct = /* @__PURE__ */ G({
|
|
@@ -761,56 +762,56 @@ const ct = /* @__PURE__ */ G({
|
|
|
761
762
|
props: Qe,
|
|
762
763
|
emits: ["checkValuesChange", "clickItem", "selectionChange", "removeItem", "change"],
|
|
763
764
|
setup(e, t) {
|
|
764
|
-
const o = a(), l = a(e.view), n = a(e.header),
|
|
765
|
+
const o = a(), l = a(e.view), n = a(e.header), s = a(e.multiSelect), u = a(e.view === "CardView"), r = a(!0), y = a({}), d = a("暂无数据");
|
|
765
766
|
a(!0), a(!1), a("id");
|
|
766
767
|
const f = lt(e), {
|
|
767
|
-
dataView:
|
|
768
|
-
} = f,
|
|
769
|
-
const
|
|
768
|
+
dataView: i
|
|
769
|
+
} = f, c = B(() => {
|
|
770
|
+
const F = {
|
|
770
771
|
"f-list-view": !0,
|
|
771
|
-
"f-list-view-multiple":
|
|
772
|
+
"f-list-view-multiple": s.value
|
|
772
773
|
};
|
|
773
|
-
return e.size !== "default" && (
|
|
774
|
-
}),
|
|
774
|
+
return e.size !== "default" && (F[`${e.size}-item`] = !0), F;
|
|
775
|
+
}), m = B(() => ({
|
|
775
776
|
"f-list-view-group": !0,
|
|
776
777
|
"d-flex": u.value,
|
|
777
778
|
"flex-wrap": u.value
|
|
778
|
-
})),
|
|
779
|
-
function
|
|
779
|
+
})), p = B(() => !!i.value && i.value.length > 0), b = st(), M = Ze(e, t, f), P = ut(e, t, f, b), S = it(e, t, f), h = Ye(e, t, P, b, M), T = et(e, o), k = B(() => i.value.length === 0), x = B(() => k.value && !t.slots.empty), E = B(() => !!t.slots.footer || r.value);
|
|
780
|
+
function V() {
|
|
780
781
|
return l.value === "SingleView" ? se : l.value === "DraggableView" ? ot : l.value === "ContentView" && t.slots.content ? nt : se;
|
|
781
782
|
}
|
|
782
|
-
const C =
|
|
783
|
+
const C = V(), {
|
|
783
784
|
renderItem: j
|
|
784
|
-
} = C(e, t, f,
|
|
785
|
-
function
|
|
785
|
+
} = C(e, t, f, P, b, h, M, S);
|
|
786
|
+
function L() {
|
|
786
787
|
return n.value === "SearchBar" ? ce : n.value === "ContentHeader" ? at : ce;
|
|
787
788
|
}
|
|
788
|
-
const R =
|
|
789
|
+
const R = L(), {
|
|
789
790
|
renderHeader: z
|
|
790
|
-
} = R(e, t,
|
|
791
|
-
function D(
|
|
792
|
-
|
|
791
|
+
} = R(e, t, T);
|
|
792
|
+
function D(F) {
|
|
793
|
+
T.search(F);
|
|
793
794
|
}
|
|
794
795
|
t.expose({
|
|
795
796
|
search: D
|
|
796
797
|
});
|
|
797
|
-
function O(
|
|
798
|
-
|
|
798
|
+
function O(F) {
|
|
799
|
+
s.value && (F.preventDefault(), F.stopPropagation());
|
|
799
800
|
}
|
|
800
|
-
return () =>
|
|
801
|
-
class:
|
|
801
|
+
return () => v("div", {
|
|
802
|
+
class: c.value,
|
|
802
803
|
onClick: O
|
|
803
|
-
}, [z(),
|
|
804
|
+
}, [z(), v("div", {
|
|
804
805
|
ref: o,
|
|
805
806
|
class: "f-list-view-content"
|
|
806
|
-
}, [
|
|
807
|
-
class:
|
|
807
|
+
}, [v("ul", {
|
|
808
|
+
class: m.value,
|
|
808
809
|
style: "list-style: none;"
|
|
809
|
-
}, [
|
|
810
|
+
}, [p.value && i.value.map((F, A) => j(F, A, y)), x.value && v("div", {
|
|
810
811
|
class: "f-list-view-emptydata"
|
|
811
|
-
}, [
|
|
812
|
+
}, [v("p", {
|
|
812
813
|
class: "f-empty-title"
|
|
813
|
-
}, [
|
|
814
|
+
}, [d.value])]), t.slots.empty && t.slots.empty()])]), E.value && v("div", {
|
|
814
815
|
class: "f-list-view-footer"
|
|
815
816
|
}, [t.slots.footer && t.slots.footer()])]);
|
|
816
817
|
}
|
|
@@ -819,28 +820,32 @@ const ct = /* @__PURE__ */ G({
|
|
|
819
820
|
props: Je,
|
|
820
821
|
emits: ["selectionChange"],
|
|
821
822
|
setup(e, t) {
|
|
822
|
-
const o = a(e.dataSource), l = a([]), n = a(e.separator),
|
|
823
|
+
const o = a(e.dataSource), l = a([]), n = a(e.separator), s = a(e.width), u = a(e.height), r = a(e.selectedValues.split(n.value));
|
|
823
824
|
W(e.dataSource, () => {
|
|
824
825
|
o.value = e.dataSource;
|
|
825
826
|
});
|
|
826
|
-
const
|
|
827
|
-
|
|
828
|
-
|
|
827
|
+
const y = B(() => e.enableSearch ? "SearchBar" : "ContentHeader"), d = B(() => {
|
|
828
|
+
const i = {};
|
|
829
|
+
return s.value !== void 0 && (i.width = `${s.value}px`), u.value !== void 0 && (i.height = `${u.value}px`), i;
|
|
830
|
+
});
|
|
831
|
+
function f(i) {
|
|
832
|
+
l.value = i.map((c) => Object.assign({}, c)), r.value = i.map((c) => c[e.idField]), t.emit("selectionChange", l.value);
|
|
829
833
|
}
|
|
830
|
-
return () =>
|
|
831
|
-
class: "f-combo-list-container"
|
|
832
|
-
|
|
834
|
+
return () => v("div", {
|
|
835
|
+
class: "f-combo-list-container",
|
|
836
|
+
style: d.value
|
|
837
|
+
}, [v(ct, {
|
|
833
838
|
size: "small",
|
|
834
839
|
itemClass: "f-combo-list-item",
|
|
835
|
-
header:
|
|
840
|
+
header: y.value,
|
|
836
841
|
headerClass: "f-combo-list-search-box",
|
|
837
842
|
data: o.value,
|
|
838
843
|
idField: e.idField,
|
|
839
844
|
textField: e.textField,
|
|
840
845
|
multiSelect: e.multiSelect,
|
|
841
846
|
multiSelectMode: "OnCheckAndClick",
|
|
842
|
-
"selection-values":
|
|
843
|
-
onSelectionChange:
|
|
847
|
+
"selection-values": r.value,
|
|
848
|
+
onSelectionChange: f
|
|
844
849
|
}, null)]);
|
|
845
850
|
}
|
|
846
851
|
}), dt = /* @__PURE__ */ new Map([
|
|
@@ -1142,40 +1147,40 @@ const Ct = {
|
|
|
1142
1147
|
emits: ["click"],
|
|
1143
1148
|
setup(e, t) {
|
|
1144
1149
|
const o = a(e.popupContentPosition), l = a(e.host);
|
|
1145
|
-
function n(
|
|
1146
|
-
t.emit("click"),
|
|
1150
|
+
function n(r) {
|
|
1151
|
+
t.emit("click"), r.preventDefault(), r.stopPropagation();
|
|
1147
1152
|
}
|
|
1148
|
-
const
|
|
1149
|
-
const
|
|
1150
|
-
if (
|
|
1151
|
-
const
|
|
1152
|
-
left:
|
|
1153
|
+
const s = B(() => {
|
|
1154
|
+
const r = l.value;
|
|
1155
|
+
if (r) {
|
|
1156
|
+
const y = r.getBoundingClientRect(), {
|
|
1157
|
+
left: d,
|
|
1153
1158
|
top: f,
|
|
1154
|
-
height:
|
|
1155
|
-
} =
|
|
1159
|
+
height: i
|
|
1160
|
+
} = y;
|
|
1156
1161
|
return {
|
|
1157
|
-
left:
|
|
1158
|
-
top: f +
|
|
1162
|
+
left: d,
|
|
1163
|
+
top: f + i
|
|
1159
1164
|
};
|
|
1160
1165
|
}
|
|
1161
1166
|
return o.value;
|
|
1162
1167
|
}), u = B(() => ({
|
|
1163
1168
|
position: "relative",
|
|
1164
|
-
left: `${
|
|
1165
|
-
top: `${
|
|
1169
|
+
left: `${s.value.left}px`,
|
|
1170
|
+
top: `${s.value.top}px`
|
|
1166
1171
|
}));
|
|
1167
|
-
return () =>
|
|
1172
|
+
return () => v(de, {
|
|
1168
1173
|
to: "body"
|
|
1169
1174
|
}, {
|
|
1170
1175
|
default: () => {
|
|
1171
|
-
var
|
|
1172
|
-
return [
|
|
1176
|
+
var r, y;
|
|
1177
|
+
return [v("div", {
|
|
1173
1178
|
class: "overlay-container",
|
|
1174
1179
|
style: "pointer-events: auto;",
|
|
1175
|
-
onClick: (
|
|
1176
|
-
}, [
|
|
1180
|
+
onClick: (d) => n(d)
|
|
1181
|
+
}, [v("div", {
|
|
1177
1182
|
style: u.value
|
|
1178
|
-
}, [(
|
|
1183
|
+
}, [(y = (r = t.slots).default) == null ? void 0 : y.call(r)])])];
|
|
1179
1184
|
}
|
|
1180
1185
|
});
|
|
1181
1186
|
}
|
|
@@ -1194,115 +1199,115 @@ function Tt(e) {
|
|
|
1194
1199
|
}), n = () => {
|
|
1195
1200
|
l(), o && o.unmount();
|
|
1196
1201
|
};
|
|
1197
|
-
return o =
|
|
1202
|
+
return o = Le({
|
|
1198
1203
|
setup() {
|
|
1199
1204
|
fe(() => {
|
|
1200
1205
|
document.body.removeChild(t);
|
|
1201
1206
|
});
|
|
1202
|
-
const
|
|
1203
|
-
return () =>
|
|
1207
|
+
const s = St(e);
|
|
1208
|
+
return () => v(wt, {
|
|
1204
1209
|
"popup-content-position": e.popupPosition,
|
|
1205
1210
|
host: e.host,
|
|
1206
1211
|
onClick: n
|
|
1207
1212
|
}, {
|
|
1208
|
-
default: () => [
|
|
1213
|
+
default: () => [s && s()]
|
|
1209
1214
|
});
|
|
1210
1215
|
}
|
|
1211
1216
|
}), document.body.appendChild(t), o.mount(t), o;
|
|
1212
1217
|
}
|
|
1213
|
-
class
|
|
1218
|
+
class It {
|
|
1214
1219
|
static show(t) {
|
|
1215
1220
|
return Tt(t);
|
|
1216
1221
|
}
|
|
1217
1222
|
}
|
|
1218
|
-
function
|
|
1219
|
-
const n = a(e.buttonBehavior),
|
|
1223
|
+
function Bt(e, t, o, l) {
|
|
1224
|
+
const n = a(e.buttonBehavior), s = a(e.popupOnInput), u = B(() => ({
|
|
1220
1225
|
"input-group-append": !0,
|
|
1221
1226
|
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
1222
|
-
})),
|
|
1223
|
-
async function
|
|
1224
|
-
if (
|
|
1225
|
-
const
|
|
1226
|
-
n.value === "Overlay" &&
|
|
1227
|
+
})), r = B(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable);
|
|
1228
|
+
async function y(c) {
|
|
1229
|
+
if (r.value) {
|
|
1230
|
+
const m = !!t.slots.default;
|
|
1231
|
+
n.value === "Overlay" && It.show({
|
|
1227
1232
|
host: o.value,
|
|
1228
1233
|
render: () => {
|
|
1229
1234
|
if (t.slots.default)
|
|
1230
1235
|
return t.slots.default();
|
|
1231
1236
|
}
|
|
1232
|
-
}),
|
|
1237
|
+
}), m && n.value === "Popup" && l.togglePopup(), m && s.value && l.hidePopup(), t.emit("clickButton", { origin: c, value: e.modelValue });
|
|
1233
1238
|
}
|
|
1234
|
-
|
|
1239
|
+
c.stopPropagation();
|
|
1235
1240
|
}
|
|
1236
|
-
function
|
|
1237
|
-
t.emit("mouseEnterIcon",
|
|
1241
|
+
function d(c) {
|
|
1242
|
+
t.emit("mouseEnterIcon", c);
|
|
1238
1243
|
}
|
|
1239
|
-
function f(
|
|
1240
|
-
t.emit("mouseLeaveIcon",
|
|
1244
|
+
function f(c) {
|
|
1245
|
+
t.emit("mouseLeaveIcon", c);
|
|
1241
1246
|
}
|
|
1242
|
-
function
|
|
1247
|
+
function i() {
|
|
1243
1248
|
t.emit("mouseOverButton");
|
|
1244
1249
|
}
|
|
1245
1250
|
return {
|
|
1246
1251
|
buttonClass: u,
|
|
1247
|
-
onClickButton:
|
|
1248
|
-
onMouseEnterButton:
|
|
1252
|
+
onClickButton: y,
|
|
1253
|
+
onMouseEnterButton: d,
|
|
1249
1254
|
onMouseLeaveButton: f,
|
|
1250
|
-
onMouseOverButton:
|
|
1255
|
+
onMouseOverButton: i
|
|
1251
1256
|
};
|
|
1252
1257
|
}
|
|
1253
|
-
function kt(e, t, o, l, n,
|
|
1254
|
-
const u = a(!1),
|
|
1255
|
-
function
|
|
1256
|
-
u.value =
|
|
1258
|
+
function kt(e, t, o, l, n, s) {
|
|
1259
|
+
const u = a(!1), r = B(() => e.enableClear && !e.readonly && !e.disable), { changeTextBoxValue: y } = s;
|
|
1260
|
+
function d(m) {
|
|
1261
|
+
u.value = m;
|
|
1257
1262
|
}
|
|
1258
1263
|
W(n, () => {
|
|
1259
|
-
l.value ?
|
|
1264
|
+
l.value ? d(!!n.value) : d(!1);
|
|
1260
1265
|
});
|
|
1261
|
-
function f(
|
|
1262
|
-
const
|
|
1263
|
-
|
|
1266
|
+
function f(m) {
|
|
1267
|
+
const p = !e.readonly && !e.disable && e.editable, b = !e.editable;
|
|
1268
|
+
m.stopPropagation(), (p || b) && (y("", !1), d(!u.value), t.emit("clear"));
|
|
1264
1269
|
}
|
|
1265
|
-
function
|
|
1266
|
-
if (
|
|
1270
|
+
function i(m) {
|
|
1271
|
+
if (r.value) {
|
|
1267
1272
|
if (!o.value) {
|
|
1268
|
-
|
|
1273
|
+
d(!1);
|
|
1269
1274
|
return;
|
|
1270
1275
|
}
|
|
1271
|
-
(!e.editable || !e.readonly) && !e.disable &&
|
|
1276
|
+
(!e.editable || !e.readonly) && !e.disable && d(!0);
|
|
1272
1277
|
}
|
|
1273
1278
|
}
|
|
1274
|
-
function
|
|
1275
|
-
|
|
1279
|
+
function c(m) {
|
|
1280
|
+
r.value && d(!1);
|
|
1276
1281
|
}
|
|
1277
1282
|
return {
|
|
1278
|
-
enableClearButton:
|
|
1283
|
+
enableClearButton: r,
|
|
1279
1284
|
showClearButton: u,
|
|
1280
1285
|
onClearValue: f,
|
|
1281
|
-
onMouseEnterTextBox:
|
|
1282
|
-
onMouseLeaveTextBox:
|
|
1286
|
+
onMouseEnterTextBox: i,
|
|
1287
|
+
onMouseLeaveTextBox: c
|
|
1283
1288
|
};
|
|
1284
1289
|
}
|
|
1285
1290
|
function xt(e, t, o, l, n) {
|
|
1286
|
-
const
|
|
1287
|
-
let
|
|
1288
|
-
const
|
|
1291
|
+
const s = a(e.popupOnInput), u = a(e.popupOnFocus), { shouldPopupContent: r } = n, y = B(() => e.enableTitle ? o.value : ""), d = B(() => (e.disable || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), f = B(() => e.readonly || !e.editable);
|
|
1292
|
+
let i = !1;
|
|
1293
|
+
const c = B(() => !e.disable && i), m = B(() => ({
|
|
1289
1294
|
"text-left": e.textAlign === "left",
|
|
1290
1295
|
"text-center": e.textAlign === "center",
|
|
1291
1296
|
"text-right": e.textAlign === "right",
|
|
1292
1297
|
"form-control": !0,
|
|
1293
1298
|
"f-utils-fill": !0
|
|
1294
|
-
})),
|
|
1299
|
+
})), p = B(() => ({
|
|
1295
1300
|
"input-group": !0,
|
|
1296
1301
|
"f-state-disable": e.disable,
|
|
1297
1302
|
"f-state-editable": e.editable && !e.disable && !e.readonly,
|
|
1298
1303
|
"f-state-readonly": e.readonly && !e.disable,
|
|
1299
|
-
"f-state-focus":
|
|
1304
|
+
"f-state-focus": c.value
|
|
1300
1305
|
}));
|
|
1301
|
-
function
|
|
1306
|
+
function b(C, j = !0) {
|
|
1302
1307
|
o.value !== C && (o.value = C, j && t.emit("change", C), t.emit("update:modelValue", C));
|
|
1303
1308
|
}
|
|
1304
|
-
function
|
|
1305
|
-
|
|
1309
|
+
function M(C) {
|
|
1310
|
+
r.value = !1, b(C, !0);
|
|
1306
1311
|
}
|
|
1307
1312
|
W(
|
|
1308
1313
|
() => e.modelValue,
|
|
@@ -1310,109 +1315,109 @@ function xt(e, t, o, l, n) {
|
|
|
1310
1315
|
o.value = C, t.emit("change", C);
|
|
1311
1316
|
}
|
|
1312
1317
|
);
|
|
1313
|
-
function
|
|
1314
|
-
|
|
1318
|
+
function P(C) {
|
|
1319
|
+
i = !1, t.emit("blur", C), C.stopPropagation();
|
|
1315
1320
|
}
|
|
1316
|
-
function
|
|
1321
|
+
function S(C) {
|
|
1317
1322
|
t.emit("click", C);
|
|
1318
1323
|
}
|
|
1319
|
-
function
|
|
1324
|
+
function h(C) {
|
|
1320
1325
|
if (e.disable) {
|
|
1321
|
-
|
|
1326
|
+
i = !0;
|
|
1322
1327
|
return;
|
|
1323
1328
|
}
|
|
1324
|
-
|
|
1329
|
+
i = !0, f.value || (t.emit("focus", C), u.value && !r.value && n.popup());
|
|
1325
1330
|
}
|
|
1326
|
-
function
|
|
1331
|
+
function T(C) {
|
|
1327
1332
|
t.emit("input", C.target.value);
|
|
1328
1333
|
const j = C.target.value;
|
|
1329
|
-
l.value = j, o.value !== j &&
|
|
1334
|
+
l.value = j, o.value !== j && b(j, !1), s.value && !r.value && n.popup();
|
|
1330
1335
|
}
|
|
1331
|
-
function
|
|
1336
|
+
function k(C) {
|
|
1332
1337
|
C.target.tagName !== "INPUT" && C.preventDefault(), C.stopPropagation();
|
|
1333
1338
|
}
|
|
1334
|
-
function
|
|
1339
|
+
function x(C) {
|
|
1335
1340
|
t.emit("keydown", C);
|
|
1336
1341
|
}
|
|
1337
1342
|
function E(C) {
|
|
1338
|
-
C.key === "Enter" && (
|
|
1343
|
+
C.key === "Enter" && (s.value || u.value) && n.hidePopup(), t.emit("keyup", C);
|
|
1339
1344
|
}
|
|
1340
|
-
function
|
|
1345
|
+
function V(C) {
|
|
1341
1346
|
const j = C.target.value;
|
|
1342
|
-
C.stopPropagation(),
|
|
1347
|
+
C.stopPropagation(), b(j);
|
|
1343
1348
|
}
|
|
1344
1349
|
return {
|
|
1345
|
-
hasFocusedTextBox:
|
|
1350
|
+
hasFocusedTextBox: c,
|
|
1346
1351
|
isTextBoxReadonly: f,
|
|
1347
|
-
textBoxClass:
|
|
1348
|
-
textBoxPlaceholder:
|
|
1349
|
-
textBoxTitle:
|
|
1350
|
-
inputGroupClass:
|
|
1351
|
-
changeTextBoxValue:
|
|
1352
|
-
commitValue:
|
|
1353
|
-
onBlurTextBox:
|
|
1354
|
-
onClickTextBox:
|
|
1355
|
-
onFocusTextBox:
|
|
1356
|
-
onInput:
|
|
1357
|
-
onKeyDownTextBox:
|
|
1352
|
+
textBoxClass: m,
|
|
1353
|
+
textBoxPlaceholder: d,
|
|
1354
|
+
textBoxTitle: y,
|
|
1355
|
+
inputGroupClass: p,
|
|
1356
|
+
changeTextBoxValue: b,
|
|
1357
|
+
commitValue: M,
|
|
1358
|
+
onBlurTextBox: P,
|
|
1359
|
+
onClickTextBox: S,
|
|
1360
|
+
onFocusTextBox: h,
|
|
1361
|
+
onInput: T,
|
|
1362
|
+
onKeyDownTextBox: x,
|
|
1358
1363
|
onKeyUpTextBox: E,
|
|
1359
|
-
onMouseDownTextBox:
|
|
1360
|
-
onTextBoxValueChange:
|
|
1364
|
+
onMouseDownTextBox: k,
|
|
1365
|
+
onTextBoxValueChange: V
|
|
1361
1366
|
};
|
|
1362
1367
|
}
|
|
1363
1368
|
function Pt(e, t, o) {
|
|
1364
1369
|
const l = a(), n = a(!1);
|
|
1365
|
-
function
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1370
|
+
function s() {
|
|
1371
|
+
const d = l.value;
|
|
1372
|
+
d && d.show(o.value);
|
|
1368
1373
|
}
|
|
1369
1374
|
async function u() {
|
|
1370
|
-
!!t.slots.default && (n.value = !n.value, await K(),
|
|
1375
|
+
!!t.slots.default && (n.value = !n.value, await K(), s());
|
|
1371
1376
|
}
|
|
1372
|
-
async function
|
|
1373
|
-
!!t.slots.default && (n.value = !0, await K(),
|
|
1377
|
+
async function r() {
|
|
1378
|
+
!!t.slots.default && (n.value = !0, await K(), s());
|
|
1374
1379
|
}
|
|
1375
|
-
function
|
|
1380
|
+
function y() {
|
|
1376
1381
|
n.value = !1;
|
|
1377
1382
|
}
|
|
1378
|
-
return { hidePopup:
|
|
1383
|
+
return { hidePopup: y, popup: r, shouldPopupContent: n, togglePopup: u, popoverRef: l };
|
|
1379
1384
|
}
|
|
1380
1385
|
function Mt(e, t, o) {
|
|
1381
1386
|
const {
|
|
1382
1387
|
isTextBoxReadonly: l,
|
|
1383
1388
|
textBoxClass: n,
|
|
1384
|
-
textBoxPlaceholder:
|
|
1389
|
+
textBoxPlaceholder: s,
|
|
1385
1390
|
textBoxTitle: u,
|
|
1386
|
-
onBlurTextBox:
|
|
1387
|
-
onClickTextBox:
|
|
1388
|
-
onFocusTextBox:
|
|
1391
|
+
onBlurTextBox: r,
|
|
1392
|
+
onClickTextBox: y,
|
|
1393
|
+
onFocusTextBox: d,
|
|
1389
1394
|
onInput: f,
|
|
1390
|
-
onKeyDownTextBox:
|
|
1391
|
-
onKeyUpTextBox:
|
|
1392
|
-
onMouseDownTextBox:
|
|
1393
|
-
onTextBoxValueChange:
|
|
1395
|
+
onKeyDownTextBox: i,
|
|
1396
|
+
onKeyUpTextBox: c,
|
|
1397
|
+
onMouseDownTextBox: m,
|
|
1398
|
+
onTextBoxValueChange: p
|
|
1394
1399
|
} = o;
|
|
1395
|
-
return () =>
|
|
1400
|
+
return () => v("input", {
|
|
1396
1401
|
name: "input-group-value",
|
|
1397
1402
|
autocomplete: e.autoComplete ? "on" : "off",
|
|
1398
1403
|
class: n.value,
|
|
1399
1404
|
disabled: e.disable,
|
|
1400
1405
|
maxlength: e.maxLength,
|
|
1401
1406
|
minlength: e.minLength,
|
|
1402
|
-
placeholder:
|
|
1407
|
+
placeholder: s.value,
|
|
1403
1408
|
readonly: l.value,
|
|
1404
1409
|
tabindex: e.tabIndex,
|
|
1405
1410
|
title: u.value,
|
|
1406
1411
|
type: e.inputType,
|
|
1407
1412
|
value: t.value,
|
|
1408
|
-
onBlur:
|
|
1409
|
-
onChange:
|
|
1410
|
-
onClick:
|
|
1411
|
-
onFocus:
|
|
1413
|
+
onBlur: r,
|
|
1414
|
+
onChange: p,
|
|
1415
|
+
onClick: y,
|
|
1416
|
+
onFocus: d,
|
|
1412
1417
|
onInput: f,
|
|
1413
|
-
onKeydown:
|
|
1414
|
-
onKeyup:
|
|
1415
|
-
onMousedown:
|
|
1418
|
+
onKeydown: i,
|
|
1419
|
+
onKeyup: c,
|
|
1420
|
+
onMousedown: m
|
|
1416
1421
|
}, null);
|
|
1417
1422
|
}
|
|
1418
1423
|
const Ft = {
|
|
@@ -1434,152 +1439,152 @@ const Ft = {
|
|
|
1434
1439
|
draggable: { Type: Boolean, default: !1 }
|
|
1435
1440
|
};
|
|
1436
1441
|
function Ot(e, t, o, l) {
|
|
1437
|
-
const n = a(-1),
|
|
1438
|
-
function u(f,
|
|
1439
|
-
f.stopPropagation(),
|
|
1440
|
-
n.value =
|
|
1442
|
+
const n = a(-1), s = a(!1);
|
|
1443
|
+
function u(f, i, c) {
|
|
1444
|
+
f.stopPropagation(), i && setTimeout(() => {
|
|
1445
|
+
n.value = c, s.value = !0, i.moving = !0;
|
|
1441
1446
|
});
|
|
1442
1447
|
}
|
|
1443
|
-
function
|
|
1444
|
-
if (f.preventDefault(), n.value !==
|
|
1445
|
-
const
|
|
1446
|
-
|
|
1448
|
+
function r(f, i) {
|
|
1449
|
+
if (f.preventDefault(), n.value !== i) {
|
|
1450
|
+
const c = l.value[n.value], m = l.value;
|
|
1451
|
+
m.splice(n.value, 1), m.splice(i, 0, c), n.value = i;
|
|
1447
1452
|
}
|
|
1448
1453
|
}
|
|
1449
|
-
function
|
|
1454
|
+
function y(f, i) {
|
|
1450
1455
|
f.preventDefault(), f.dataTransfer && (f.dataTransfer.dropEffect = "move");
|
|
1451
1456
|
}
|
|
1452
|
-
function
|
|
1453
|
-
|
|
1457
|
+
function d(f, i) {
|
|
1458
|
+
i && (i.moving = !1), o.value = l.value.filter((c) => c.type === "Tag").map((c) => c.payload), s.value = !1, t.emit("change", o.value);
|
|
1454
1459
|
}
|
|
1455
1460
|
return {
|
|
1456
1461
|
dragstart: u,
|
|
1457
|
-
dragenter:
|
|
1458
|
-
dragover:
|
|
1459
|
-
dragend:
|
|
1460
|
-
isDragging:
|
|
1462
|
+
dragenter: r,
|
|
1463
|
+
dragover: y,
|
|
1464
|
+
dragend: d,
|
|
1465
|
+
isDragging: s
|
|
1461
1466
|
};
|
|
1462
1467
|
}
|
|
1463
|
-
const
|
|
1468
|
+
const Lt = /* @__PURE__ */ G({
|
|
1464
1469
|
name: "FTags",
|
|
1465
1470
|
props: Ft,
|
|
1466
1471
|
emits: ["remove", "selectionChange", "change"],
|
|
1467
1472
|
setup(e, t) {
|
|
1468
|
-
const o = a(e.selectable), l = a(e.customClass), n = a(e.data),
|
|
1473
|
+
const o = a(e.selectable), l = a(e.customClass), n = a(e.data), s = a(e.tagType), u = a(e.tagStyle), r = a(e.showColor), y = a(e.activeTag), d = a(e.customStyle), f = a(e.showClose), i = a(e.showAddButton), c = a(e.showInput), m = a(e.addButtonText), p = a(e.enableAddButton);
|
|
1469
1474
|
a(e.placeholder), a(""), a();
|
|
1470
|
-
const
|
|
1471
|
-
function
|
|
1475
|
+
const b = a(), M = a(e.wrapText), P = a();
|
|
1476
|
+
function S() {
|
|
1472
1477
|
const g = n.value.map((w) => ({
|
|
1473
1478
|
type: "Tag",
|
|
1474
1479
|
payload: w
|
|
1475
1480
|
}));
|
|
1476
|
-
return
|
|
1481
|
+
return i.value && g.push({
|
|
1477
1482
|
type: "AddButton"
|
|
1478
1483
|
}), g;
|
|
1479
1484
|
}
|
|
1480
|
-
const
|
|
1481
|
-
function
|
|
1482
|
-
n.value = g,
|
|
1485
|
+
const h = a(S());
|
|
1486
|
+
function T(g) {
|
|
1487
|
+
n.value = g, h.value = S();
|
|
1483
1488
|
}
|
|
1484
|
-
const
|
|
1489
|
+
const k = B(() => h.value.findIndex((g) => g.type === "Input")), x = Ot(e, t, n, h), {
|
|
1485
1490
|
dragstart: E,
|
|
1486
|
-
dragenter:
|
|
1491
|
+
dragenter: V,
|
|
1487
1492
|
dragover: C,
|
|
1488
1493
|
dragend: j
|
|
1489
|
-
} =
|
|
1490
|
-
W(() => e.data, (g) =>
|
|
1491
|
-
const
|
|
1494
|
+
} = x;
|
|
1495
|
+
W(() => e.data, (g) => T(g));
|
|
1496
|
+
const L = B(() => {
|
|
1492
1497
|
const g = {
|
|
1493
1498
|
"farris-tags": !0,
|
|
1494
1499
|
"farris-tags-checkable": o.value,
|
|
1495
|
-
"farris-tags-nowrap": !
|
|
1500
|
+
"farris-tags-nowrap": !M.value
|
|
1496
1501
|
};
|
|
1497
|
-
return l.value.split(" ").reduce((w,
|
|
1502
|
+
return l.value.split(" ").reduce((w, I) => (w[I] = !0, w), g), g;
|
|
1498
1503
|
});
|
|
1499
1504
|
function R(g) {
|
|
1500
1505
|
const w = {
|
|
1501
1506
|
"farris-tag-item": !0,
|
|
1502
1507
|
"farris-tag-item-checked": o.value && g.checked,
|
|
1503
1508
|
"farris-tag-item-checkable": o.value,
|
|
1504
|
-
"farris-tag-item-has-color":
|
|
1505
|
-
"farris-tag-item-actived":
|
|
1509
|
+
"farris-tag-item-has-color": r.value,
|
|
1510
|
+
"farris-tag-item-actived": y.value === g.name
|
|
1506
1511
|
};
|
|
1507
|
-
if (
|
|
1508
|
-
const
|
|
1509
|
-
w[
|
|
1512
|
+
if (s.value) {
|
|
1513
|
+
const I = `farris-tag-item-${s.value}`;
|
|
1514
|
+
w[I] = !0;
|
|
1510
1515
|
}
|
|
1511
1516
|
return w;
|
|
1512
1517
|
}
|
|
1513
1518
|
const z = B(() => {
|
|
1514
1519
|
const g = {};
|
|
1515
|
-
return
|
|
1516
|
-
const H =
|
|
1520
|
+
return d.value && d.value.split(";").reduce((w, I) => {
|
|
1521
|
+
const H = I.split(":");
|
|
1517
1522
|
return w[H[0]] = H[1], w;
|
|
1518
1523
|
}, g), g;
|
|
1519
1524
|
});
|
|
1520
1525
|
function D(g, w) {
|
|
1521
|
-
o.value && w.selectable && (w.checked = !w.checked,
|
|
1522
|
-
|
|
1526
|
+
o.value && w.selectable && (w.checked = !w.checked, y.value = w.checked ? w.name : "", w.checked && n.value.filter((I) => I.name !== w.name).forEach((I) => {
|
|
1527
|
+
I.checked = !w.checked;
|
|
1523
1528
|
}), t.emit("change", n.value), t.emit("selectionChange", w));
|
|
1524
1529
|
}
|
|
1525
1530
|
function O(g, w) {
|
|
1526
|
-
let
|
|
1531
|
+
let I;
|
|
1527
1532
|
switch (g.key) {
|
|
1528
1533
|
case "Backspace":
|
|
1529
1534
|
n.value = n.value.filter((H) => H.name !== w.name), t.emit("change", n.value);
|
|
1530
1535
|
break;
|
|
1531
1536
|
case "ArrowLeft":
|
|
1532
|
-
|
|
1537
|
+
I = Math.max(b.value.scrollLeft + 20, 0), b.value.scrollLeft = I;
|
|
1533
1538
|
break;
|
|
1534
1539
|
case "ArrowRight":
|
|
1535
|
-
|
|
1540
|
+
I = Math.max(b.value.scrollLeft - 20, 0), b.value.scrollLeft = I;
|
|
1536
1541
|
}
|
|
1537
1542
|
}
|
|
1538
|
-
function
|
|
1539
|
-
const
|
|
1540
|
-
if (
|
|
1541
|
-
const [H] = n.value.splice(
|
|
1542
|
-
|
|
1543
|
+
function F(g, w) {
|
|
1544
|
+
const I = n.value.findIndex((H) => H.name === w.name);
|
|
1545
|
+
if (I > -1) {
|
|
1546
|
+
const [H] = n.value.splice(I, 1);
|
|
1547
|
+
h.value = S(), t.emit("change", n.value), t.emit("remove", n.value, H, I);
|
|
1543
1548
|
}
|
|
1544
1549
|
g.stopPropagation();
|
|
1545
1550
|
}
|
|
1546
1551
|
const A = B(() => ({
|
|
1547
1552
|
"farris-tag-item": !0,
|
|
1548
1553
|
"farris-tag-add-button": !0,
|
|
1549
|
-
"farris-tag-add-button-disabled": !
|
|
1554
|
+
"farris-tag-add-button-disabled": !p.value
|
|
1550
1555
|
}));
|
|
1551
1556
|
function $(g) {
|
|
1552
1557
|
}
|
|
1553
1558
|
function _() {
|
|
1554
|
-
return
|
|
1559
|
+
return v("li", {
|
|
1555
1560
|
class: A.value,
|
|
1556
1561
|
onClick: (g) => void 0
|
|
1557
|
-
}, [
|
|
1562
|
+
}, [v("span", {
|
|
1558
1563
|
class: "f-icon f-icon-amplification"
|
|
1559
|
-
}, null),
|
|
1564
|
+
}, null), v("span", {
|
|
1560
1565
|
class: "farris-tag-add-text"
|
|
1561
|
-
}, [
|
|
1566
|
+
}, [m.value])]);
|
|
1562
1567
|
}
|
|
1563
1568
|
function N(g) {
|
|
1564
1569
|
if (g && !g.innerText) {
|
|
1565
|
-
const w =
|
|
1570
|
+
const w = k.value;
|
|
1566
1571
|
if (w > 0) {
|
|
1567
|
-
const [
|
|
1568
|
-
|
|
1572
|
+
const [I] = n.value.splice(w - 1, 1);
|
|
1573
|
+
h.value.splice(w - 1, 1), t.emit("remove", n.value, I, w - 1);
|
|
1569
1574
|
}
|
|
1570
1575
|
}
|
|
1571
1576
|
}
|
|
1572
|
-
function U(g, w,
|
|
1577
|
+
function U(g, w, I) {
|
|
1573
1578
|
g > -1 && (n.value.splice(g, 0, {
|
|
1574
1579
|
name: w,
|
|
1575
|
-
value:
|
|
1580
|
+
value: I,
|
|
1576
1581
|
selectable: o.value
|
|
1577
|
-
}),
|
|
1582
|
+
}), h.value = S(), t.emit("change", n.value));
|
|
1578
1583
|
}
|
|
1579
1584
|
function J(g) {
|
|
1580
1585
|
if (g && g.innerText) {
|
|
1581
|
-
const w = g.innerText,
|
|
1582
|
-
U(
|
|
1586
|
+
const w = g.innerText, I = k.value;
|
|
1587
|
+
U(I, w, w), g.innerText = "";
|
|
1583
1588
|
}
|
|
1584
1589
|
}
|
|
1585
1590
|
function Y(g) {
|
|
@@ -1588,14 +1593,14 @@ const Vt = /* @__PURE__ */ G({
|
|
|
1588
1593
|
}
|
|
1589
1594
|
function be(g) {
|
|
1590
1595
|
g.key === "Enter" && J(g.target), g.key === "Backspace" && (N(g.target), K(() => {
|
|
1591
|
-
|
|
1596
|
+
P.value && P.value.focus();
|
|
1592
1597
|
}));
|
|
1593
1598
|
}
|
|
1594
1599
|
function Ce() {
|
|
1595
|
-
return
|
|
1600
|
+
return v("li", {
|
|
1596
1601
|
class: "farris-tag-input-box"
|
|
1597
|
-
}, [
|
|
1598
|
-
ref:
|
|
1602
|
+
}, [v("div", {
|
|
1603
|
+
ref: P,
|
|
1599
1604
|
class: "form-control",
|
|
1600
1605
|
contenteditable: "true",
|
|
1601
1606
|
onKeyup: be,
|
|
@@ -1603,31 +1608,31 @@ const Vt = /* @__PURE__ */ G({
|
|
|
1603
1608
|
}, null)]);
|
|
1604
1609
|
}
|
|
1605
1610
|
function we(g, w) {
|
|
1606
|
-
return
|
|
1611
|
+
return v("li", {
|
|
1607
1612
|
class: R(g),
|
|
1608
1613
|
style: z.value,
|
|
1609
1614
|
tabindex: 0,
|
|
1610
1615
|
id: g.name,
|
|
1611
1616
|
key: g.name,
|
|
1612
|
-
onClick: (
|
|
1613
|
-
onKeydown: (
|
|
1617
|
+
onClick: (I) => D(I, g),
|
|
1618
|
+
onKeydown: (I) => O(I, g),
|
|
1614
1619
|
draggable: "true",
|
|
1615
|
-
onDragstart: (
|
|
1616
|
-
onDragenter: (
|
|
1617
|
-
onDragend: (
|
|
1618
|
-
onDragover: (
|
|
1619
|
-
}, [
|
|
1620
|
+
onDragstart: (I) => E(I, g, w),
|
|
1621
|
+
onDragenter: (I) => V(I, w),
|
|
1622
|
+
onDragend: (I) => j(I, g),
|
|
1623
|
+
onDragover: (I) => C(I, w)
|
|
1624
|
+
}, [v("div", {
|
|
1620
1625
|
title: g.name,
|
|
1621
1626
|
class: "tag-box"
|
|
1622
|
-
}, [g.name]), f.value &&
|
|
1627
|
+
}, [g.name]), f.value && v("span", {
|
|
1623
1628
|
class: "tag-delete"
|
|
1624
|
-
}, [
|
|
1629
|
+
}, [v("i", {
|
|
1625
1630
|
class: "f-icon f-icon-close",
|
|
1626
|
-
onClick: (
|
|
1631
|
+
onClick: (I) => F(I, g)
|
|
1627
1632
|
}, null)])]);
|
|
1628
1633
|
}
|
|
1629
1634
|
function Se() {
|
|
1630
|
-
return
|
|
1635
|
+
return h.value.map((g, w) => {
|
|
1631
1636
|
switch (g.type) {
|
|
1632
1637
|
case "Tag":
|
|
1633
1638
|
return we(g.payload, w);
|
|
@@ -1642,12 +1647,12 @@ const Vt = /* @__PURE__ */ G({
|
|
|
1642
1647
|
"farris-tags-item-container": !0,
|
|
1643
1648
|
"farris-tag-item-capsule": u.value === "capsule"
|
|
1644
1649
|
}));
|
|
1645
|
-
function Be(g) {
|
|
1646
|
-
const w = Math.max(v.value.scrollLeft - g.deltaX, 0);
|
|
1647
|
-
v.value.scrollLeft = w;
|
|
1648
|
-
}
|
|
1649
1650
|
function Ie(g) {
|
|
1650
|
-
const w =
|
|
1651
|
+
const w = Math.max(b.value.scrollLeft - g.deltaX, 0);
|
|
1652
|
+
b.value.scrollLeft = w;
|
|
1653
|
+
}
|
|
1654
|
+
function Be(g) {
|
|
1655
|
+
const w = b.value, I = n.value.length - 1;
|
|
1651
1656
|
if (w) {
|
|
1652
1657
|
const H = Array.from(w.children).filter((X) => X.className.indexOf("farris-tag-item") > -1).findIndex((X) => {
|
|
1653
1658
|
const q = X.getBoundingClientRect(), Z = window.getComputedStyle(X), ue = parseInt(Z["margin-left"], 10) + q.width + parseInt(Z["margin-right"], 10);
|
|
@@ -1656,22 +1661,22 @@ const Vt = /* @__PURE__ */ G({
|
|
|
1656
1661
|
if (H > -1)
|
|
1657
1662
|
return H;
|
|
1658
1663
|
}
|
|
1659
|
-
return
|
|
1664
|
+
return I;
|
|
1660
1665
|
}
|
|
1661
1666
|
function ke(g) {
|
|
1662
|
-
if (
|
|
1663
|
-
const
|
|
1664
|
-
X.splice(
|
|
1667
|
+
if (c.value) {
|
|
1668
|
+
const I = Be(g.clientX) + 1, X = h.value.filter((q) => q.type !== "Input");
|
|
1669
|
+
X.splice(I, 0, {
|
|
1665
1670
|
type: "Input"
|
|
1666
|
-
}),
|
|
1667
|
-
|
|
1671
|
+
}), h.value = X, K(() => {
|
|
1672
|
+
P.value && P.value.focus();
|
|
1668
1673
|
});
|
|
1669
1674
|
}
|
|
1670
1675
|
}
|
|
1671
1676
|
function xe(g) {
|
|
1672
|
-
var
|
|
1677
|
+
var I;
|
|
1673
1678
|
g.preventDefault(), g.stopPropagation();
|
|
1674
|
-
const w = (
|
|
1679
|
+
const w = (I = g.dataTransfer) == null ? void 0 : I.getData("Text");
|
|
1675
1680
|
if (w) {
|
|
1676
1681
|
const H = w.split(":"), X = H[0], q = H[1];
|
|
1677
1682
|
[...n.value].findIndex((ee) => (console.log(`${ee.value} === ${q} is ${ee.value === q}`), ee.value === q)) > -1 || U(n.value.length, X, q);
|
|
@@ -1680,31 +1685,31 @@ const Vt = /* @__PURE__ */ G({
|
|
|
1680
1685
|
function Pe(g) {
|
|
1681
1686
|
g.preventDefault();
|
|
1682
1687
|
}
|
|
1683
|
-
return () =>
|
|
1684
|
-
class:
|
|
1688
|
+
return () => v("div", {
|
|
1689
|
+
class: L.value,
|
|
1685
1690
|
onClick: ke,
|
|
1686
1691
|
onDrop: xe,
|
|
1687
1692
|
onDragover: Pe
|
|
1688
|
-
}, [
|
|
1689
|
-
ref:
|
|
1693
|
+
}, [v("ul", {
|
|
1694
|
+
ref: b,
|
|
1690
1695
|
class: Te.value,
|
|
1691
|
-
onWheel: (g) =>
|
|
1696
|
+
onWheel: (g) => Ie(g)
|
|
1692
1697
|
}, [Se()])]);
|
|
1693
1698
|
}
|
|
1694
1699
|
});
|
|
1695
|
-
function
|
|
1700
|
+
function Vt(e, t, o) {
|
|
1696
1701
|
const l = a(e.separator), {
|
|
1697
1702
|
changeTextBoxValue: n
|
|
1698
|
-
} = o,
|
|
1699
|
-
name:
|
|
1703
|
+
} = o, s = B(() => t.value ? t.value.split(l.value).map((r) => ({
|
|
1704
|
+
name: r,
|
|
1700
1705
|
selectable: !0
|
|
1701
1706
|
})) : []);
|
|
1702
|
-
function u(
|
|
1703
|
-
n(
|
|
1707
|
+
function u(r) {
|
|
1708
|
+
n(r.map((y) => y.name).join(l.value), !0);
|
|
1704
1709
|
}
|
|
1705
|
-
return () =>
|
|
1710
|
+
return () => v(Lt, {
|
|
1706
1711
|
class: "form-control",
|
|
1707
|
-
data:
|
|
1712
|
+
data: s.value,
|
|
1708
1713
|
showClose: !0,
|
|
1709
1714
|
showInput: !0,
|
|
1710
1715
|
onChange: u
|
|
@@ -1714,25 +1719,25 @@ function Dt(e, t, o) {
|
|
|
1714
1719
|
const {
|
|
1715
1720
|
buttonClass: l,
|
|
1716
1721
|
onClickButton: n,
|
|
1717
|
-
onMouseEnterButton:
|
|
1722
|
+
onMouseEnterButton: s,
|
|
1718
1723
|
onMouseLeaveButton: u
|
|
1719
1724
|
} = t, {
|
|
1720
|
-
enableClearButton:
|
|
1721
|
-
showClearButton:
|
|
1722
|
-
onClearValue:
|
|
1725
|
+
enableClearButton: r,
|
|
1726
|
+
showClearButton: y,
|
|
1727
|
+
onClearValue: d
|
|
1723
1728
|
} = o;
|
|
1724
|
-
return () =>
|
|
1729
|
+
return () => v("div", {
|
|
1725
1730
|
class: l.value
|
|
1726
|
-
}, [
|
|
1731
|
+
}, [r.value && Q(v("span", {
|
|
1727
1732
|
class: "input-group-text input-group-clear",
|
|
1728
|
-
onClick:
|
|
1729
|
-
}, [
|
|
1733
|
+
onClick: d
|
|
1734
|
+
}, [v("i", {
|
|
1730
1735
|
class: "f-icon modal_close"
|
|
1731
|
-
}, null)]), [[ve,
|
|
1736
|
+
}, null)]), [[ve, y.value]]), e.buttonContent && v("span", {
|
|
1732
1737
|
class: "input-group-text input-group-append-button",
|
|
1733
1738
|
innerHTML: e.buttonContent,
|
|
1734
1739
|
onClick: n,
|
|
1735
|
-
onMouseenter:
|
|
1740
|
+
onMouseenter: s,
|
|
1736
1741
|
onMouseleave: u
|
|
1737
1742
|
}, null)]);
|
|
1738
1743
|
}
|
|
@@ -1765,165 +1770,165 @@ function Rt(e) {
|
|
|
1765
1770
|
}
|
|
1766
1771
|
function At(e, t, o, l) {
|
|
1767
1772
|
var D;
|
|
1768
|
-
const n = a(0),
|
|
1773
|
+
const n = a(0), s = a(((D = e.offsetX) == null ? void 0 : D.value) || 0), u = a(-1), r = a(-1), y = a(-1), d = a(e.placement), f = a(0), i = a(0), c = a(0), m = a(document.documentElement.scrollLeft), p = a(document.documentElement.scrollTop), { hostLeft: b, hostTop: M, hostWidth: P } = l;
|
|
1769
1774
|
W(e.offsetX, (O) => {
|
|
1770
|
-
n.value = O -
|
|
1775
|
+
n.value = O - s.value;
|
|
1771
1776
|
});
|
|
1772
|
-
const
|
|
1777
|
+
const S = B(() => {
|
|
1773
1778
|
const O = {
|
|
1774
|
-
left: `${
|
|
1775
|
-
top: `${
|
|
1779
|
+
left: `${i.value}px`,
|
|
1780
|
+
top: `${c.value}px`,
|
|
1776
1781
|
transform: `translateX(${n.value}px)`
|
|
1777
1782
|
};
|
|
1778
1783
|
return e.zIndex !== -1 && (O["z-index"] = e.zIndex), u.value !== -1 && (O.width = `${u.value}px`), O;
|
|
1779
|
-
}),
|
|
1784
|
+
}), h = B(() => ({
|
|
1780
1785
|
left: `${f.value}px`
|
|
1781
1786
|
}));
|
|
1782
|
-
function
|
|
1787
|
+
function T(O) {
|
|
1783
1788
|
if (O && e.keepWidthWithReference) {
|
|
1784
|
-
const
|
|
1785
|
-
u.value = Math.max(e.minWidth,
|
|
1789
|
+
const F = O.getBoundingClientRect();
|
|
1790
|
+
u.value = Math.max(e.minWidth, F.width);
|
|
1786
1791
|
}
|
|
1787
1792
|
}
|
|
1788
|
-
function
|
|
1789
|
-
const A =
|
|
1790
|
-
return A > 0 ? A :
|
|
1793
|
+
function k(O, F) {
|
|
1794
|
+
const A = P.value - O.width - 4;
|
|
1795
|
+
return A > 0 ? A : F;
|
|
1791
1796
|
}
|
|
1792
|
-
function
|
|
1793
|
-
const $ = f.value, _ =
|
|
1797
|
+
function x(O, F, A) {
|
|
1798
|
+
const $ = f.value, _ = F.left - b.value + F.width / 2 + m.value, N = F.top - M.value - (O.height + A.height) + p.value;
|
|
1794
1799
|
return { popoverLeft: _, popoverTop: N, arrowLeft: $ };
|
|
1795
1800
|
}
|
|
1796
|
-
function E(O,
|
|
1797
|
-
return
|
|
1801
|
+
function E(O, F, A) {
|
|
1802
|
+
return F.top - M.value + (F.height + A.height) + p.value;
|
|
1798
1803
|
}
|
|
1799
|
-
function
|
|
1800
|
-
const A =
|
|
1804
|
+
function V(O, F) {
|
|
1805
|
+
const A = k(F, O), $ = O <= A ? f.value : O - A;
|
|
1801
1806
|
return { popoverLeft: Math.min(O, A), arrowLeft: $ };
|
|
1802
1807
|
}
|
|
1803
|
-
function C(O,
|
|
1804
|
-
const $ =
|
|
1808
|
+
function C(O, F, A) {
|
|
1809
|
+
const $ = F.left - b.value + F.width / 2 - (A.width / 2 - (O.left - b.value)) + m.value, { arrowLeft: _, popoverLeft: N } = V($, O), U = E(O, F, A);
|
|
1805
1810
|
return { popoverLeft: N, popoverTop: U, arrowLeft: _ };
|
|
1806
1811
|
}
|
|
1807
|
-
function j(O,
|
|
1808
|
-
const $ =
|
|
1812
|
+
function j(O, F, A) {
|
|
1813
|
+
const $ = F.left - b.value + m.value, { arrowLeft: _, popoverLeft: N } = V($, O), U = E(O, F, A);
|
|
1809
1814
|
return { popoverLeft: N, popoverTop: U, arrowLeft: _ };
|
|
1810
1815
|
}
|
|
1811
|
-
const
|
|
1812
|
-
["top",
|
|
1816
|
+
const L = /* @__PURE__ */ new Map([
|
|
1817
|
+
["top", x],
|
|
1813
1818
|
["bottom", C],
|
|
1814
1819
|
["bottom-left", j]
|
|
1815
1820
|
]);
|
|
1816
1821
|
function R(O) {
|
|
1817
1822
|
var N;
|
|
1818
|
-
const
|
|
1819
|
-
|
|
1820
|
-
const A = t.value.getBoundingClientRect(), $ = (N = o.value) == null ? void 0 : N.getBoundingClientRect(), _ =
|
|
1823
|
+
const F = O.getBoundingClientRect();
|
|
1824
|
+
r.value = F.top, y.value = F.left;
|
|
1825
|
+
const A = t.value.getBoundingClientRect(), $ = (N = o.value) == null ? void 0 : N.getBoundingClientRect(), _ = L.get(d.value);
|
|
1821
1826
|
if (_) {
|
|
1822
|
-
const { arrowLeft: U, popoverLeft: J, popoverTop: Y } = _($,
|
|
1823
|
-
f.value = U,
|
|
1827
|
+
const { arrowLeft: U, popoverLeft: J, popoverTop: Y } = _($, F, A);
|
|
1828
|
+
f.value = U, i.value = J, c.value = Y;
|
|
1824
1829
|
}
|
|
1825
|
-
e.keepWidthWithReference &&
|
|
1830
|
+
e.keepWidthWithReference && T(O);
|
|
1826
1831
|
}
|
|
1827
1832
|
function z(O) {
|
|
1828
1833
|
if (O) {
|
|
1829
|
-
const
|
|
1830
|
-
(
|
|
1834
|
+
const F = O.getBoundingClientRect();
|
|
1835
|
+
(F.left !== y.value || F.top !== r.value) && R(O);
|
|
1831
1836
|
}
|
|
1832
1837
|
}
|
|
1833
1838
|
return {
|
|
1834
|
-
arrowStyle:
|
|
1835
|
-
popoverStyle:
|
|
1836
|
-
position:
|
|
1839
|
+
arrowStyle: h,
|
|
1840
|
+
popoverStyle: S,
|
|
1841
|
+
position: d,
|
|
1837
1842
|
popoverWidth: u,
|
|
1838
|
-
fitToReference:
|
|
1843
|
+
fitToReference: T,
|
|
1839
1844
|
followToReferencePosition: z,
|
|
1840
1845
|
locateToReference: R
|
|
1841
1846
|
};
|
|
1842
1847
|
}
|
|
1843
|
-
function Et(e, t, o, l, n,
|
|
1844
|
-
const
|
|
1845
|
-
let
|
|
1846
|
-
function
|
|
1847
|
-
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
if (!n.value.contains(
|
|
1851
|
-
const
|
|
1852
|
-
|
|
1848
|
+
function Et(e, t, o, l, n, s, u) {
|
|
1849
|
+
const r = a(e.visible), y = B(() => r.value), { fitToReference: d, locateToReference: f } = u;
|
|
1850
|
+
let i;
|
|
1851
|
+
function c() {
|
|
1852
|
+
r.value = !1, document.body.removeEventListener("click", i), t.emit("hidden");
|
|
1853
|
+
}
|
|
1854
|
+
i = (p) => {
|
|
1855
|
+
if (!n.value.contains(p.target)) {
|
|
1856
|
+
const b = n.value.closest(".popover");
|
|
1857
|
+
b && b.removeEventListener("click", i), c();
|
|
1853
1858
|
}
|
|
1854
1859
|
};
|
|
1855
|
-
async function
|
|
1856
|
-
if (l.value && o.value &&
|
|
1857
|
-
|
|
1858
|
-
const
|
|
1859
|
-
|
|
1860
|
+
async function m(p) {
|
|
1861
|
+
if (l.value && o.value && p) {
|
|
1862
|
+
r.value = !0, n.value = p, await K(), f(p), s.value && d(p), document.body.addEventListener("click", i);
|
|
1863
|
+
const b = p.closest(".popover");
|
|
1864
|
+
b && b.addEventListener("click", i), t.emit("shown");
|
|
1860
1865
|
}
|
|
1861
1866
|
}
|
|
1862
|
-
return t.expose({ hide:
|
|
1867
|
+
return t.expose({ hide: c, show: m, shown: y }), { showPopover: r, hidePopverOnClickBodyHandler: i };
|
|
1863
1868
|
}
|
|
1864
1869
|
function Ht(e, t, o, l, n) {
|
|
1865
|
-
const { popoverWidth:
|
|
1866
|
-
function
|
|
1870
|
+
const { popoverWidth: s, fitToReference: u, followToReferencePosition: r } = n;
|
|
1871
|
+
function y() {
|
|
1867
1872
|
if (o.value) {
|
|
1868
|
-
|
|
1869
|
-
const
|
|
1870
|
-
l.value &&
|
|
1873
|
+
r(o.value);
|
|
1874
|
+
const d = o.value.getBoundingClientRect();
|
|
1875
|
+
l.value && d.width !== s.value && u(o.value);
|
|
1871
1876
|
}
|
|
1872
1877
|
}
|
|
1873
|
-
return { onResize:
|
|
1878
|
+
return { onResize: y };
|
|
1874
1879
|
}
|
|
1875
1880
|
const Wt = /* @__PURE__ */ G({
|
|
1876
1881
|
name: "FPopover",
|
|
1877
1882
|
props: jt,
|
|
1878
1883
|
emits: ["shown", "hidden"],
|
|
1879
1884
|
setup(e, t) {
|
|
1880
|
-
const o = a(), l = a(), n = a(e.reference),
|
|
1881
|
-
host:
|
|
1882
|
-
} =
|
|
1885
|
+
const o = a(), l = a(), n = a(e.reference), s = a(e.keepWidthWithReference), u = B(() => !!e.title), r = Rt(e), {
|
|
1886
|
+
host: y
|
|
1887
|
+
} = r, d = At(e, o, l, r), {
|
|
1883
1888
|
position: f,
|
|
1884
|
-
arrowStyle:
|
|
1885
|
-
popoverStyle:
|
|
1886
|
-
fitToReference:
|
|
1887
|
-
locateToReference:
|
|
1888
|
-
} =
|
|
1889
|
-
showPopover:
|
|
1890
|
-
hidePopverOnClickBodyHandler:
|
|
1891
|
-
} = Et(e, t, o, l, n,
|
|
1892
|
-
onResize:
|
|
1893
|
-
} = Ht(e, t, n,
|
|
1894
|
-
const
|
|
1889
|
+
arrowStyle: i,
|
|
1890
|
+
popoverStyle: c,
|
|
1891
|
+
fitToReference: m,
|
|
1892
|
+
locateToReference: p
|
|
1893
|
+
} = d, {
|
|
1894
|
+
showPopover: b,
|
|
1895
|
+
hidePopverOnClickBodyHandler: M
|
|
1896
|
+
} = Et(e, t, o, l, n, s, d), {
|
|
1897
|
+
onResize: P
|
|
1898
|
+
} = Ht(e, t, n, s, d), S = B(() => {
|
|
1899
|
+
const T = `popover in popover-${f.value}`, k = `bs-popover-${f.value}`, x = {
|
|
1895
1900
|
"popover-fitcontent": e.fitContent
|
|
1896
1901
|
};
|
|
1897
|
-
return
|
|
1898
|
-
}),
|
|
1902
|
+
return x[T] = !0, x[k] = !0, (e.class || "").split(" ").reduce((V, C) => (V[C] = !0, V), x), x;
|
|
1903
|
+
}), h = B(() => ({
|
|
1899
1904
|
"popover-content": !0,
|
|
1900
1905
|
"popover-body": !0
|
|
1901
1906
|
}));
|
|
1902
1907
|
return ne(() => {
|
|
1903
|
-
e.reference &&
|
|
1908
|
+
e.reference && p(n.value), s.value && m(n.value), window.addEventListener("resize", P);
|
|
1904
1909
|
}), fe(() => {
|
|
1905
|
-
document.body.removeEventListener("click",
|
|
1906
|
-
}), () =>
|
|
1907
|
-
to:
|
|
1910
|
+
document.body.removeEventListener("click", M), window.removeEventListener("resize", P);
|
|
1911
|
+
}), () => v(de, {
|
|
1912
|
+
to: y
|
|
1908
1913
|
}, {
|
|
1909
1914
|
default: () => {
|
|
1910
|
-
var
|
|
1911
|
-
return [Q(
|
|
1915
|
+
var T;
|
|
1916
|
+
return [Q(v("div", {
|
|
1912
1917
|
ref: l,
|
|
1913
|
-
class:
|
|
1914
|
-
style:
|
|
1915
|
-
onClick: (
|
|
1916
|
-
|
|
1918
|
+
class: S.value,
|
|
1919
|
+
style: c.value,
|
|
1920
|
+
onClick: (k) => {
|
|
1921
|
+
k.stopPropagation();
|
|
1917
1922
|
}
|
|
1918
|
-
}, [
|
|
1923
|
+
}, [v("div", {
|
|
1919
1924
|
ref: o,
|
|
1920
1925
|
class: "popover-arrow arrow",
|
|
1921
|
-
style:
|
|
1922
|
-
}, null), u.value &&
|
|
1926
|
+
style: i.value
|
|
1927
|
+
}, null), u.value && v("h3", {
|
|
1923
1928
|
class: "popover-title popover-header"
|
|
1924
|
-
}, [e.title]),
|
|
1925
|
-
class:
|
|
1926
|
-
}, [t.slots.default && ((
|
|
1929
|
+
}, [e.title]), v("div", {
|
|
1930
|
+
class: h.value
|
|
1931
|
+
}, [t.slots.default && ((T = t.slots) == null ? void 0 : T.default())])]), [[ve, b.value]])];
|
|
1927
1932
|
}
|
|
1928
1933
|
});
|
|
1929
1934
|
}
|
|
@@ -1931,10 +1936,10 @@ const Wt = /* @__PURE__ */ G({
|
|
|
1931
1936
|
function _t(e, t, o) {
|
|
1932
1937
|
const l = a(e.popupMinWidth), {
|
|
1933
1938
|
hidePopup: n,
|
|
1934
|
-
popoverRef:
|
|
1939
|
+
popoverRef: s
|
|
1935
1940
|
} = o;
|
|
1936
|
-
return () =>
|
|
1937
|
-
ref:
|
|
1941
|
+
return () => v(Wt, {
|
|
1942
|
+
ref: s,
|
|
1938
1943
|
visible: !0,
|
|
1939
1944
|
placement: "bottom-left",
|
|
1940
1945
|
host: e.popupHost,
|
|
@@ -1946,8 +1951,8 @@ function _t(e, t, o) {
|
|
|
1946
1951
|
onHidden: n
|
|
1947
1952
|
}, {
|
|
1948
1953
|
default: () => {
|
|
1949
|
-
var u,
|
|
1950
|
-
return [(
|
|
1954
|
+
var u, r;
|
|
1955
|
+
return [(r = (u = t.slots).default) == null ? void 0 : r.call(u)];
|
|
1951
1956
|
}
|
|
1952
1957
|
});
|
|
1953
1958
|
}
|
|
@@ -1956,222 +1961,225 @@ const ye = /* @__PURE__ */ G({
|
|
|
1956
1961
|
props: he,
|
|
1957
1962
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
1958
1963
|
setup(e, t) {
|
|
1959
|
-
const o = a(), l = a(e.customClass), n = a(e.modelValue),
|
|
1964
|
+
const o = a(), l = a(e.customClass), n = a(e.modelValue), s = Pt(e, t, o), {
|
|
1960
1965
|
shouldPopupContent: u,
|
|
1961
|
-
hidePopup:
|
|
1962
|
-
} =
|
|
1963
|
-
hasFocusedTextBox:
|
|
1964
|
-
commitValue:
|
|
1965
|
-
inputGroupClass:
|
|
1966
|
-
} = f,
|
|
1967
|
-
onMouseEnterTextBox:
|
|
1968
|
-
onMouseLeaveTextBox:
|
|
1969
|
-
} =
|
|
1966
|
+
hidePopup: r
|
|
1967
|
+
} = s, y = Bt(e, t, o, s), d = a(""), f = xt(e, t, n, d, s), {
|
|
1968
|
+
hasFocusedTextBox: i,
|
|
1969
|
+
commitValue: c,
|
|
1970
|
+
inputGroupClass: m
|
|
1971
|
+
} = f, p = kt(e, t, n, i, d, f), {
|
|
1972
|
+
onMouseEnterTextBox: b,
|
|
1973
|
+
onMouseLeaveTextBox: M
|
|
1974
|
+
} = p, P = B(() => {
|
|
1970
1975
|
const E = {
|
|
1971
1976
|
"f-button-edit": !0,
|
|
1972
1977
|
"f-cmp-inputgroup": !0,
|
|
1973
1978
|
"f-button-edit-nowrap": !e.wrapText
|
|
1974
1979
|
};
|
|
1975
|
-
return l.value && l.value.split(" ").reduce((
|
|
1980
|
+
return l.value && l.value.split(" ").reduce((V, C) => (V[C] = !0, V), E), E;
|
|
1976
1981
|
});
|
|
1977
|
-
function
|
|
1978
|
-
return e.multiSelect && e.inputType === "tag" ?
|
|
1982
|
+
function S() {
|
|
1983
|
+
return e.multiSelect && e.inputType === "tag" ? Vt(e, n, f) : Mt(e, n, f);
|
|
1979
1984
|
}
|
|
1980
|
-
let
|
|
1985
|
+
let h = S();
|
|
1981
1986
|
W([() => e.multiSelect, () => e.inputType], () => {
|
|
1982
|
-
|
|
1987
|
+
h = S();
|
|
1983
1988
|
});
|
|
1984
|
-
const
|
|
1985
|
-
commitValue:
|
|
1989
|
+
const T = Dt(e, y, p), k = _t(e, t, s), x = {
|
|
1990
|
+
commitValue: c,
|
|
1986
1991
|
elementRef: o,
|
|
1987
|
-
hidePopup:
|
|
1992
|
+
hidePopup: r
|
|
1988
1993
|
};
|
|
1989
1994
|
return ne(() => {
|
|
1990
|
-
o.value.componentInstance =
|
|
1991
|
-
}), t.expose(
|
|
1995
|
+
o.value.componentInstance = x;
|
|
1996
|
+
}), t.expose(x), () => v(re, null, [v("div", Ve(t.attrs, {
|
|
1992
1997
|
ref: o,
|
|
1993
|
-
class:
|
|
1998
|
+
class: P.value,
|
|
1994
1999
|
id: e.id
|
|
1995
|
-
}), [
|
|
1996
|
-
class:
|
|
1997
|
-
onMouseenter:
|
|
1998
|
-
onMouseleave:
|
|
1999
|
-
}, [
|
|
2000
|
+
}), [v("div", {
|
|
2001
|
+
class: m.value,
|
|
2002
|
+
onMouseenter: b,
|
|
2003
|
+
onMouseleave: M
|
|
2004
|
+
}, [h(), T()])]), u.value && k()]);
|
|
2000
2005
|
}
|
|
2001
2006
|
});
|
|
2002
2007
|
function $t(e) {
|
|
2003
2008
|
const t = a(""), o = a(e.modelValue), l = a(e.data || []), n = a(e.editable);
|
|
2004
|
-
function i
|
|
2005
|
-
const
|
|
2006
|
-
return l.value.filter((
|
|
2007
|
-
}
|
|
2008
|
-
function u(
|
|
2009
|
-
const
|
|
2010
|
-
t.value = n.value ?
|
|
2011
|
-
}
|
|
2012
|
-
function
|
|
2013
|
-
const
|
|
2014
|
-
return l.value.filter((
|
|
2015
|
-
}
|
|
2016
|
-
function
|
|
2017
|
-
const
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2009
|
+
function s(i) {
|
|
2010
|
+
const c = i.split(e.separator).map((p) => [p, !0]), m = new Map(c);
|
|
2011
|
+
return l.value.filter((p) => m.has(p[e.valueField]));
|
|
2012
|
+
}
|
|
2013
|
+
function u(i) {
|
|
2014
|
+
const c = s(i).map((m) => m[e.textField]).join(e.separator);
|
|
2015
|
+
t.value = n.value ? c || i : c;
|
|
2016
|
+
}
|
|
2017
|
+
function r(i) {
|
|
2018
|
+
const c = i.split(e.separator).map((p) => [p, !0]), m = new Map(c);
|
|
2019
|
+
return l.value.filter((p) => m.has(p[e.textField]));
|
|
2020
|
+
}
|
|
2021
|
+
function y(i) {
|
|
2022
|
+
const c = {};
|
|
2023
|
+
return c[e.idField] = i, c[e.textField] = i, [c];
|
|
2024
|
+
}
|
|
2025
|
+
function d(i) {
|
|
2026
|
+
let c = r(i);
|
|
2027
|
+
const m = c && c.length > 0;
|
|
2028
|
+
return n.value && !m && (c = y(i)), c;
|
|
2029
|
+
}
|
|
2030
|
+
function f() {
|
|
2031
|
+
const { url: i, method: c = "GET", headers: m = {}, body: p = null } = e.remote;
|
|
2032
|
+
fetch(i, { method: c, headers: m, body: p }).then((M) => {
|
|
2033
|
+
if (M.status === 200)
|
|
2034
|
+
return M.json();
|
|
2035
|
+
throw new Error(M.statusText);
|
|
2036
|
+
}).then((M) => {
|
|
2037
|
+
l.value = M;
|
|
2038
|
+
}).catch((M) => {
|
|
2039
|
+
console.error(M);
|
|
2026
2040
|
});
|
|
2027
2041
|
}
|
|
2028
|
-
return e.remote &&
|
|
2042
|
+
return e.remote && f(), W(() => e.data, () => {
|
|
2029
2043
|
l.value = e.data;
|
|
2030
|
-
}), W([l], ([
|
|
2044
|
+
}), W([l], ([i]) => {
|
|
2031
2045
|
if (e.modelValue) {
|
|
2032
|
-
const
|
|
2033
|
-
|
|
2046
|
+
const c = i.find((m) => m[e.valueField] === e.modelValue);
|
|
2047
|
+
c && (t.value = c[e.textField]);
|
|
2034
2048
|
}
|
|
2035
|
-
}), W(() => e.modelValue, (
|
|
2036
|
-
o.value =
|
|
2037
|
-
}), u(e.modelValue), { dataSource: l, displayText: t, editable: n, modelValue: o, getItemsByDisplayText:
|
|
2049
|
+
}), W(() => e.modelValue, (i) => {
|
|
2050
|
+
o.value = i, u(i);
|
|
2051
|
+
}), u(e.modelValue), { dataSource: l, displayText: t, editable: n, modelValue: o, getItemsByDisplayText: r, getItemsByValue: s, getSelectedItemsByDisplayText: d };
|
|
2038
2052
|
}
|
|
2039
2053
|
const te = /* @__PURE__ */ G({
|
|
2040
2054
|
name: "FComboList",
|
|
2041
2055
|
props: ae,
|
|
2042
2056
|
emits: ["clear", "update:modelValue", "change"],
|
|
2043
2057
|
setup(e, t) {
|
|
2044
|
-
const o = a(), {
|
|
2045
|
-
dataSource:
|
|
2046
|
-
displayText:
|
|
2047
|
-
editable:
|
|
2048
|
-
modelValue:
|
|
2049
|
-
|
|
2050
|
-
} = $t(e),
|
|
2051
|
-
function
|
|
2052
|
-
!
|
|
2053
|
-
}
|
|
2054
|
-
function f(v) {
|
|
2055
|
-
n.value = v.map((P) => P[e.textField]).join(e.separator), u.value = v.map((P) => P[e.valueField]).join(e.separator), t.emit("update:modelValue", u.value), t.emit("change", v), s();
|
|
2058
|
+
const o = a(), l = a(e.disabled), n = a(e.enableClear), s = a(e.enableSearch), u = a(e.readonly), {
|
|
2059
|
+
dataSource: r,
|
|
2060
|
+
displayText: y,
|
|
2061
|
+
editable: d,
|
|
2062
|
+
modelValue: f,
|
|
2063
|
+
getSelectedItemsByDisplayText: i
|
|
2064
|
+
} = $t(e), c = B(() => e.multiSelect);
|
|
2065
|
+
function m() {
|
|
2066
|
+
!c.value && o.value && o.value.hidePopup();
|
|
2056
2067
|
}
|
|
2057
|
-
function
|
|
2058
|
-
|
|
2068
|
+
function p(S) {
|
|
2069
|
+
y.value = S.map((h) => h[e.textField]).join(e.separator), f.value = S.map((h) => h[e.valueField]).join(e.separator), t.emit("update:modelValue", f.value), t.emit("change", S), m();
|
|
2059
2070
|
}
|
|
2060
|
-
function
|
|
2061
|
-
|
|
2062
|
-
const P = {};
|
|
2063
|
-
P[e.idField] = v, P[e.textField] = v, t.emit("change", [P]);
|
|
2071
|
+
function b(S) {
|
|
2072
|
+
f.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
2064
2073
|
}
|
|
2065
|
-
function
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
return;
|
|
2069
|
-
}
|
|
2070
|
-
const P = c(v);
|
|
2071
|
-
f(P);
|
|
2074
|
+
function M(S) {
|
|
2075
|
+
const h = i(S);
|
|
2076
|
+
p(h);
|
|
2072
2077
|
}
|
|
2073
|
-
function
|
|
2074
|
-
return
|
|
2078
|
+
function P() {
|
|
2079
|
+
return y.value;
|
|
2075
2080
|
}
|
|
2076
2081
|
return t.expose({
|
|
2077
|
-
getDisplayText:
|
|
2078
|
-
}), () =>
|
|
2082
|
+
getDisplayText: P
|
|
2083
|
+
}), W([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([S, h, T, k, x]) => {
|
|
2084
|
+
l.value = S, d.value = h, n.value = T, s.value = k, u.value = x;
|
|
2085
|
+
}), () => v(ye, {
|
|
2079
2086
|
ref: o,
|
|
2080
2087
|
id: e.id,
|
|
2081
|
-
disable:
|
|
2082
|
-
readonly:
|
|
2088
|
+
disable: l.value,
|
|
2089
|
+
readonly: u.value,
|
|
2083
2090
|
forcePlaceholder: e.forcePlaceholder,
|
|
2084
|
-
editable:
|
|
2091
|
+
editable: d.value,
|
|
2085
2092
|
buttonContent: e.dropDownIcon,
|
|
2086
2093
|
placeholder: e.placeholder,
|
|
2087
|
-
enableClear:
|
|
2094
|
+
enableClear: n.value,
|
|
2088
2095
|
maxLength: e.maxLength,
|
|
2089
2096
|
tabIndex: e.tabIndex,
|
|
2090
2097
|
enableTitle: e.enableTitle,
|
|
2091
2098
|
multiSelect: e.multiSelect,
|
|
2092
2099
|
inputType: e.multiSelect ? "tag" : "text",
|
|
2093
|
-
modelValue:
|
|
2094
|
-
"onUpdate:modelValue": (
|
|
2095
|
-
onClear:
|
|
2096
|
-
onChange:
|
|
2100
|
+
modelValue: y.value,
|
|
2101
|
+
"onUpdate:modelValue": (S) => y.value = S,
|
|
2102
|
+
onClear: b,
|
|
2103
|
+
onChange: M
|
|
2097
2104
|
}, {
|
|
2098
|
-
default: () => [
|
|
2105
|
+
default: () => [v(rt, {
|
|
2099
2106
|
idField: e.idField,
|
|
2100
2107
|
valueField: e.valueField,
|
|
2101
2108
|
textField: e.textField,
|
|
2102
|
-
dataSource:
|
|
2103
|
-
selectedValues:
|
|
2109
|
+
dataSource: r.value,
|
|
2110
|
+
selectedValues: f.value,
|
|
2104
2111
|
multiSelect: e.multiSelect,
|
|
2105
|
-
enableSearch:
|
|
2106
|
-
|
|
2112
|
+
enableSearch: s.value,
|
|
2113
|
+
height: e.maxHeight,
|
|
2114
|
+
onSelectionChange: p
|
|
2107
2115
|
}, null)]
|
|
2108
2116
|
});
|
|
2109
2117
|
}
|
|
2110
2118
|
});
|
|
2111
2119
|
function Nt(e, t, o) {
|
|
2112
|
-
var
|
|
2120
|
+
var S;
|
|
2113
2121
|
const l = o == null ? void 0 : o.checkIsInFixedContextRules(), n = o && o.getStyles && o.getStyles() || "";
|
|
2114
|
-
function
|
|
2122
|
+
function s() {
|
|
2115
2123
|
return !(t.schema.componentType || l);
|
|
2116
2124
|
}
|
|
2117
2125
|
function u() {
|
|
2118
2126
|
return !1;
|
|
2119
2127
|
}
|
|
2120
|
-
function
|
|
2128
|
+
function r() {
|
|
2121
2129
|
return !(t.schema.componentType || l);
|
|
2122
2130
|
}
|
|
2123
|
-
function
|
|
2131
|
+
function y() {
|
|
2124
2132
|
return !!l;
|
|
2125
2133
|
}
|
|
2126
|
-
function
|
|
2127
|
-
if (!
|
|
2134
|
+
function d(h) {
|
|
2135
|
+
if (!h)
|
|
2128
2136
|
return null;
|
|
2129
|
-
if (
|
|
2130
|
-
return
|
|
2131
|
-
const
|
|
2132
|
-
return
|
|
2137
|
+
if (h.schema.type === "Component")
|
|
2138
|
+
return h;
|
|
2139
|
+
const T = d(h.parent);
|
|
2140
|
+
return T || null;
|
|
2133
2141
|
}
|
|
2134
|
-
function f(
|
|
2142
|
+
function f(h, T, k) {
|
|
2135
2143
|
return !!o && o.canAccepts();
|
|
2136
2144
|
}
|
|
2137
|
-
function
|
|
2145
|
+
function i() {
|
|
2138
2146
|
return t.schema.label || t.schema.title || t.schema.name;
|
|
2139
2147
|
}
|
|
2140
|
-
function
|
|
2148
|
+
function c() {
|
|
2141
2149
|
}
|
|
2142
|
-
function
|
|
2143
|
-
|
|
2150
|
+
function m(h, T) {
|
|
2151
|
+
T && (o == null || o.onAcceptMovedChildElement(T));
|
|
2144
2152
|
}
|
|
2145
|
-
function
|
|
2146
|
-
const
|
|
2147
|
-
return je(
|
|
2153
|
+
function p(h, T) {
|
|
2154
|
+
const k = String(h.getAttribute("data-controltype"));
|
|
2155
|
+
return je(k);
|
|
2148
2156
|
}
|
|
2149
|
-
function
|
|
2150
|
-
return
|
|
2157
|
+
function b(h) {
|
|
2158
|
+
return h.contents ? h.contents.length : -1;
|
|
2151
2159
|
}
|
|
2152
|
-
function
|
|
2160
|
+
function M(h) {
|
|
2153
2161
|
}
|
|
2154
|
-
const
|
|
2155
|
-
canMove:
|
|
2162
|
+
const P = {
|
|
2163
|
+
canMove: s(),
|
|
2156
2164
|
canSelectParent: u(),
|
|
2157
|
-
canDelete:
|
|
2158
|
-
canNested: !
|
|
2165
|
+
canDelete: r(),
|
|
2166
|
+
canNested: !y(),
|
|
2159
2167
|
contents: t.schema.contents,
|
|
2160
2168
|
elementRef: e,
|
|
2161
|
-
parent: (
|
|
2169
|
+
parent: (S = t.parent) == null ? void 0 : S.componentInstance.value,
|
|
2162
2170
|
schema: t.schema,
|
|
2163
2171
|
styles: n,
|
|
2164
2172
|
canAccepts: f,
|
|
2165
|
-
getBelongedComponentInstance:
|
|
2166
|
-
getDraggingDisplayText:
|
|
2167
|
-
getDragScopeElement:
|
|
2168
|
-
onAcceptMovedChildElement:
|
|
2169
|
-
onAcceptNewChildElement:
|
|
2170
|
-
onAddNewChildElement:
|
|
2171
|
-
onChildElementMovedOut:
|
|
2173
|
+
getBelongedComponentInstance: d,
|
|
2174
|
+
getDraggingDisplayText: i,
|
|
2175
|
+
getDragScopeElement: c,
|
|
2176
|
+
onAcceptMovedChildElement: m,
|
|
2177
|
+
onAcceptNewChildElement: p,
|
|
2178
|
+
onAddNewChildElement: b,
|
|
2179
|
+
onChildElementMovedOut: M,
|
|
2172
2180
|
triggerBelongedComponentToMoveWhenMoved: !!o && o.triggerBelongedComponentToMoveWhenMoved
|
|
2173
2181
|
};
|
|
2174
|
-
return a(
|
|
2182
|
+
return a(P);
|
|
2175
2183
|
}
|
|
2176
2184
|
const zt = /* @__PURE__ */ G({
|
|
2177
2185
|
name: "FComboListDesign",
|
|
@@ -2181,7 +2189,7 @@ const zt = /* @__PURE__ */ G({
|
|
|
2181
2189
|
const o = a(), l = De("design-item-context"), n = Nt(o, l);
|
|
2182
2190
|
return ne(() => {
|
|
2183
2191
|
o.value.componentInstance = n;
|
|
2184
|
-
}), t.expose(n.value), () =>
|
|
2192
|
+
}), t.expose(n.value), () => v(ye, {
|
|
2185
2193
|
ref: o,
|
|
2186
2194
|
id: e.id,
|
|
2187
2195
|
disable: e.disabled,
|