@das-fed/ui 6.4.0-dev.55.23 → 6.4.0-dev.55.24
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/package.json +5 -5
- package/packages/components/autocomplete/index.d.ts +13 -4
- package/packages/components/autocomplete/index.js +158 -139
- package/packages/components/autocomplete/index.js.gz +0 -0
- package/packages/components/autocomplete/src/index.vue.d.ts +2 -1
- package/packages/components/autocomplete/src/type.d.ts +4 -1
- package/packages/components/autocomplete/style.css +1 -1
- package/packages/components/autocomplete/style.css.gz +0 -0
- package/packages/components/edit-table/index.d.ts +9 -9
- package/packages/components/edit-table/index.js +2004 -1640
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/edit-table/src/hooks/use-validator.d.ts +8 -3
- package/packages/components/edit-table/src/index.vue.d.ts +1 -1
- package/packages/components/edit-table/src/type.d.ts +13 -0
- package/packages/components/edit-table/src/utils.d.ts +11 -5
- package/packages/components/edit-table/style.css +1 -1
- package/packages/components/edit-table/style.css.gz +0 -0
- package/packages/components/input/index.js +42 -41
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input/style.css +1 -1
- package/packages/components/input/style.css.gz +0 -0
- package/packages/components/select/index.js +199 -199
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/tree-select/index.js +379 -345
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/src/App.vue.d.ts +1 -0
- package/packages/components/tree-select/src/hooks/use-tree-select.d.ts +2 -1
- package/packages/components/tree-select/src/type.d.ts +3 -0
- package/packages/components/tree-select/style.css +1 -1
- package/packages/components/tree-select/style.css.gz +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/autocomplete/style.css';
|
|
2
|
-
import { pushScopeId as
|
|
3
|
-
import { withInstall as
|
|
4
|
-
import { ElPopover as
|
|
2
|
+
import { pushScopeId as Oe, popScopeId as Te, nextTick as ue, openBlock as k, createBlock as U, withScopeId as xe, markRaw as Ce, shallowReactive as Ne, resolveComponent as Me, resolveDirective as Pe, withDirectives as F, createElementBlock as E, normalizeClass as ee, renderSlot as j, createCommentVNode as te, resolveDynamicComponent as he, normalizeStyle as ie, withCtx as B, Fragment as Re, renderList as Se, mergeProps as se, toHandlers as Ee, createVNode as re, defineComponent as Ae, computed as q, ref as x, watch as Y, onMounted as Le, onUnmounted as De, withModifiers as me, unref as P, isRef as He, createSlots as Fe, createTextVNode as pe, toDisplayString as ve, createElementVNode as Be, vShow as ye } from "vue";
|
|
3
|
+
import { withInstall as je } from "@das-fed/utils/with-install/index";
|
|
4
|
+
import { ElPopover as Ue } from "element-plus/es";
|
|
5
5
|
import "element-plus/es/components/base/style/css";
|
|
6
6
|
import "element-plus/es/components/popover/style/css";
|
|
7
|
-
import { DasInput as
|
|
8
|
-
import { vDasTooltip as
|
|
7
|
+
import { DasInput as We } from "@das-fed/ui/packages/components/input/index";
|
|
8
|
+
import { vDasTooltip as be } from "@das-fed/ui/packages/components/text-tooltip/index";
|
|
9
9
|
import { vOverlay as Ke } from "@das-fed/ui/packages/components/overlay/index";
|
|
10
10
|
import { DasTree as qe } from "@das-fed/ui/packages/components/tree/index";
|
|
11
11
|
import { useModelValue as Q } from "@das-fed/utils/vue";
|
|
@@ -22,11 +22,11 @@ function Ye() {
|
|
|
22
22
|
var n = e.indexOf("Edge/");
|
|
23
23
|
return n > 0 ? parseInt(e.substring(n + 5, e.indexOf(".", n)), 10) : -1;
|
|
24
24
|
}
|
|
25
|
-
let
|
|
25
|
+
let X;
|
|
26
26
|
function ne() {
|
|
27
|
-
ne.init || (ne.init = !0,
|
|
27
|
+
ne.init || (ne.init = !0, X = Ye() !== -1);
|
|
28
28
|
}
|
|
29
|
-
var
|
|
29
|
+
var J = {
|
|
30
30
|
name: "ResizeObserver",
|
|
31
31
|
props: {
|
|
32
32
|
emitOnMount: {
|
|
@@ -50,7 +50,7 @@ var G = {
|
|
|
50
50
|
this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight, this.emitOnMount && this.emitSize();
|
|
51
51
|
});
|
|
52
52
|
const e = document.createElement("object");
|
|
53
|
-
this._resizeObject = e, e.setAttribute("aria-hidden", "true"), e.setAttribute("tabindex", -1), e.onload = this.addResizeHandlers, e.type = "text/html",
|
|
53
|
+
this._resizeObject = e, e.setAttribute("aria-hidden", "true"), e.setAttribute("tabindex", -1), e.onload = this.addResizeHandlers, e.type = "text/html", X && this.$el.appendChild(e), e.data = "about:blank", X || this.$el.appendChild(e);
|
|
54
54
|
},
|
|
55
55
|
beforeUnmount() {
|
|
56
56
|
this.removeResizeHandlers();
|
|
@@ -69,28 +69,28 @@ var G = {
|
|
|
69
69
|
this._resizeObject.contentDocument.defaultView.addEventListener("resize", this.compareAndNotify), this.compareAndNotify();
|
|
70
70
|
},
|
|
71
71
|
removeResizeHandlers() {
|
|
72
|
-
this._resizeObject && this._resizeObject.onload && (!
|
|
72
|
+
this._resizeObject && this._resizeObject.onload && (!X && this._resizeObject.contentDocument && this._resizeObject.contentDocument.defaultView.removeEventListener("resize", this.compareAndNotify), this.$el.removeChild(this._resizeObject), this._resizeObject.onload = null, this._resizeObject = null);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
-
const Xe = /* @__PURE__ */
|
|
77
|
-
|
|
76
|
+
const Xe = /* @__PURE__ */ xe("data-v-b329ee4c");
|
|
77
|
+
Oe("data-v-b329ee4c");
|
|
78
78
|
const Ge = {
|
|
79
79
|
class: "resize-observer",
|
|
80
80
|
tabindex: "-1"
|
|
81
81
|
};
|
|
82
|
-
|
|
83
|
-
const Je = /* @__PURE__ */ Xe((e, t, i, s, n, u) => (
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
function
|
|
82
|
+
Te();
|
|
83
|
+
const Je = /* @__PURE__ */ Xe((e, t, i, s, n, u) => (k(), U("div", Ge)));
|
|
84
|
+
J.render = Je;
|
|
85
|
+
J.__scopeId = "data-v-b329ee4c";
|
|
86
|
+
J.__file = "src/components/ResizeObserver.vue";
|
|
87
|
+
function G(e) {
|
|
88
88
|
"@babel/helpers - typeof";
|
|
89
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
89
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? G = function(t) {
|
|
90
90
|
return typeof t;
|
|
91
|
-
} :
|
|
91
|
+
} : G = function(t) {
|
|
92
92
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
93
|
-
},
|
|
93
|
+
}, G(e);
|
|
94
94
|
}
|
|
95
95
|
function Qe(e, t) {
|
|
96
96
|
if (!(e instanceof t))
|
|
@@ -105,7 +105,7 @@ function Ze(e, t) {
|
|
|
105
105
|
function et(e, t, i) {
|
|
106
106
|
return t && Ze(e.prototype, t), e;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function ge(e) {
|
|
109
109
|
return tt(e) || it(e) || st(e) || rt();
|
|
110
110
|
}
|
|
111
111
|
function tt(e) {
|
|
@@ -142,9 +142,9 @@ function lt(e, t) {
|
|
|
142
142
|
for (var h = arguments.length, b = new Array(h > 1 ? h - 1 : 0), V = 1; V < h; V++)
|
|
143
143
|
b[V - 1] = arguments[V];
|
|
144
144
|
if (u = b, !(s && l === n)) {
|
|
145
|
-
var
|
|
146
|
-
typeof
|
|
147
|
-
e.apply(void 0, [l].concat(
|
|
145
|
+
var R = i.leading;
|
|
146
|
+
typeof R == "function" && (R = R(l, n)), (!s || l !== n) && R && e.apply(void 0, [l].concat(ge(u))), n = l, clearTimeout(s), s = setTimeout(function() {
|
|
147
|
+
e.apply(void 0, [l].concat(ge(u))), s = 0;
|
|
148
148
|
}, t);
|
|
149
149
|
}
|
|
150
150
|
};
|
|
@@ -152,11 +152,11 @@ function lt(e, t) {
|
|
|
152
152
|
clearTimeout(s), s = null;
|
|
153
153
|
}, c;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function ze(e, t) {
|
|
156
156
|
if (e === t) return !0;
|
|
157
|
-
if (
|
|
157
|
+
if (G(e) === "object") {
|
|
158
158
|
for (var i in e)
|
|
159
|
-
if (!
|
|
159
|
+
if (!ze(e[i], t[i]))
|
|
160
160
|
return !1;
|
|
161
161
|
return !0;
|
|
162
162
|
}
|
|
@@ -211,7 +211,7 @@ var ot = /* @__PURE__ */ function() {
|
|
|
211
211
|
}
|
|
212
212
|
}]), e;
|
|
213
213
|
}();
|
|
214
|
-
function
|
|
214
|
+
function _e(e, t, i) {
|
|
215
215
|
var s = t.value;
|
|
216
216
|
if (s && !(typeof IntersectionObserver > "u")) {
|
|
217
217
|
var n = new ot(e, s, i);
|
|
@@ -220,30 +220,30 @@ function Se(e, t, i) {
|
|
|
220
220
|
}
|
|
221
221
|
function at(e, t, i) {
|
|
222
222
|
var s = t.value, n = t.oldValue;
|
|
223
|
-
if (!
|
|
223
|
+
if (!ze(s, n)) {
|
|
224
224
|
var u = e._vue_visibilityState;
|
|
225
225
|
if (!s) {
|
|
226
|
-
|
|
226
|
+
Ie(e);
|
|
227
227
|
return;
|
|
228
228
|
}
|
|
229
|
-
u ? u.createObserver(s, i) :
|
|
229
|
+
u ? u.createObserver(s, i) : _e(e, {
|
|
230
230
|
value: s
|
|
231
231
|
}, i);
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function Ie(e) {
|
|
235
235
|
var t = e._vue_visibilityState;
|
|
236
236
|
t && (t.destroyObserver(), delete e._vue_visibilityState);
|
|
237
237
|
}
|
|
238
238
|
var ut = {
|
|
239
|
-
beforeMount:
|
|
239
|
+
beforeMount: _e,
|
|
240
240
|
updated: at,
|
|
241
|
-
unmounted:
|
|
241
|
+
unmounted: Ie
|
|
242
242
|
}, dt = {
|
|
243
243
|
itemsLimit: 1e3
|
|
244
244
|
}, ct = /(auto|scroll)/;
|
|
245
|
-
function
|
|
246
|
-
return e.parentNode === null ? t :
|
|
245
|
+
function $e(e, t) {
|
|
246
|
+
return e.parentNode === null ? t : $e(e.parentNode, t.concat([e]));
|
|
247
247
|
}
|
|
248
248
|
var Z = function(t, i) {
|
|
249
249
|
return getComputedStyle(t, null).getPropertyValue(i);
|
|
@@ -252,9 +252,9 @@ var Z = function(t, i) {
|
|
|
252
252
|
}, ht = function(t) {
|
|
253
253
|
return ct.test(ft(t));
|
|
254
254
|
};
|
|
255
|
-
function
|
|
255
|
+
function we(e) {
|
|
256
256
|
if (e instanceof HTMLElement || e instanceof SVGElement) {
|
|
257
|
-
for (var t =
|
|
257
|
+
for (var t = $e(e.parentNode, []), i = 0; i < t.length; i += 1)
|
|
258
258
|
if (ht(t[i]))
|
|
259
259
|
return t[i];
|
|
260
260
|
return document.scrollingElement || document.documentElement;
|
|
@@ -313,7 +313,7 @@ let yt = 0;
|
|
|
313
313
|
var de = {
|
|
314
314
|
name: "RecycleScroller",
|
|
315
315
|
components: {
|
|
316
|
-
ResizeObserver:
|
|
316
|
+
ResizeObserver: J
|
|
317
317
|
},
|
|
318
318
|
directives: {
|
|
319
319
|
ObserveVisibility: ut
|
|
@@ -461,13 +461,13 @@ var de = {
|
|
|
461
461
|
},
|
|
462
462
|
methods: {
|
|
463
463
|
addView(e, t, i, s, n) {
|
|
464
|
-
const u =
|
|
464
|
+
const u = Ce({
|
|
465
465
|
id: yt++,
|
|
466
466
|
index: t,
|
|
467
467
|
used: !0,
|
|
468
468
|
key: s,
|
|
469
469
|
type: n
|
|
470
|
-
}), c =
|
|
470
|
+
}), c = Ne({
|
|
471
471
|
item: i,
|
|
472
472
|
position: 0,
|
|
473
473
|
nr: u
|
|
@@ -501,12 +501,12 @@ var de = {
|
|
|
501
501
|
})) : this.$emit("hidden"));
|
|
502
502
|
},
|
|
503
503
|
updateVisibleItems(e, t = !1) {
|
|
504
|
-
const i = this.itemSize, s = this.gridItems || 1, n = this.itemSecondarySize || i, u = this.$_computedMinItemSize, c = this.typeField, f = this.simpleArray ? null : this.keyField, l = this.items, h = l.length, b = this.sizes, V = this.$_views,
|
|
505
|
-
let w, m,
|
|
504
|
+
const i = this.itemSize, s = this.gridItems || 1, n = this.itemSecondarySize || i, u = this.$_computedMinItemSize, c = this.typeField, f = this.simpleArray ? null : this.keyField, l = this.items, h = l.length, b = this.sizes, V = this.$_views, R = this.$_unusedViews, z = this.pool, W = this.itemIndexByKey;
|
|
505
|
+
let w, m, p, _, O;
|
|
506
506
|
if (!h)
|
|
507
|
-
w = m = _ =
|
|
507
|
+
w = m = _ = O = p = 0;
|
|
508
508
|
else if (this.$_prerender)
|
|
509
|
-
w = _ = 0, m =
|
|
509
|
+
w = _ = 0, m = O = Math.min(this.prerender, l.length), p = null;
|
|
510
510
|
else {
|
|
511
511
|
const a = this.getScroll();
|
|
512
512
|
if (t) {
|
|
@@ -525,20 +525,20 @@ var de = {
|
|
|
525
525
|
a.end += g;
|
|
526
526
|
}
|
|
527
527
|
if (i === null) {
|
|
528
|
-
let g, M = 0, L = h - 1, S = ~~(h / 2),
|
|
528
|
+
let g, M = 0, L = h - 1, S = ~~(h / 2), D;
|
|
529
529
|
do
|
|
530
|
-
|
|
531
|
-
while (S !==
|
|
532
|
-
for (S < 0 && (S = 0), w = S,
|
|
530
|
+
D = S, g = b[S].accumulator, g < a.start ? M = S : S < h - 1 && b[S + 1].accumulator > a.start && (L = S), S = ~~((M + L) / 2);
|
|
531
|
+
while (S !== D);
|
|
532
|
+
for (S < 0 && (S = 0), w = S, p = b[h - 1].accumulator, m = S; m < h && b[m].accumulator < a.end; m++) ;
|
|
533
533
|
for (m === -1 ? m = l.length - 1 : (m++, m > h && (m = h)), _ = w; _ < h && y + b[_].accumulator < a.start; _++) ;
|
|
534
|
-
for (
|
|
534
|
+
for (O = _; O < h && y + b[O].accumulator < a.end; O++) ;
|
|
535
535
|
} else {
|
|
536
536
|
w = ~~(a.start / i * s);
|
|
537
537
|
const g = w % s;
|
|
538
|
-
w -= g, m = Math.ceil(a.end / i * s), _ = Math.max(0, Math.floor((a.start - y) / i * s)),
|
|
538
|
+
w -= g, m = Math.ceil(a.end / i * s), _ = Math.max(0, Math.floor((a.start - y) / i * s)), O = Math.floor((a.end - y) / i * s), w < 0 && (w = 0), m > h && (m = h), _ < 0 && (_ = 0), O > h && (O = h), p = Math.ceil(h / s) * i;
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
|
-
m - w > dt.itemsLimit && this.itemsLimitError(), this.totalSize =
|
|
541
|
+
m - w > dt.itemsLimit && this.itemsLimitError(), this.totalSize = p;
|
|
542
542
|
let d;
|
|
543
543
|
const A = w <= this.$_endIndex && m >= this.$_startIndex;
|
|
544
544
|
if (A)
|
|
@@ -556,21 +556,21 @@ var de = {
|
|
|
556
556
|
continue;
|
|
557
557
|
}
|
|
558
558
|
I = C[c];
|
|
559
|
-
let y =
|
|
559
|
+
let y = R.get(I), g = !1;
|
|
560
560
|
if (!d)
|
|
561
|
-
A ? y && y.length ? d = y.pop() : d = this.addView(z, a, C, $, I) : (N = K.get(I) || 0, (!y || N >= y.length) && (d = this.addView(z, a, C, $, I), this.unuseView(d, !0), y =
|
|
561
|
+
A ? y && y.length ? d = y.pop() : d = this.addView(z, a, C, $, I) : (N = K.get(I) || 0, (!y || N >= y.length) && (d = this.addView(z, a, C, $, I), this.unuseView(d, !0), y = R.get(I)), d = y[N], K.set(I, N + 1)), V.delete(d.nr.key), d.nr.used = !0, d.nr.index = a, d.nr.key = $, d.nr.type = I, V.set($, d), g = !0;
|
|
562
562
|
else if (!d.nr.used && (d.nr.used = !0, g = !0, y)) {
|
|
563
563
|
const M = y.indexOf(d);
|
|
564
564
|
M !== -1 && y.splice(M, 1);
|
|
565
565
|
}
|
|
566
566
|
d.item = C, g && (a === l.length - 1 && this.$emit("scroll-end"), a === 0 && this.$emit("scroll-start")), i === null ? (d.position = b[a - 1].accumulator, d.offset = 0) : (d.position = Math.floor(a / s) * i, d.offset = a % s * n);
|
|
567
567
|
}
|
|
568
|
-
return this.$_startIndex = w, this.$_endIndex = m, this.emitUpdate && this.$emit("update", w, m, _,
|
|
568
|
+
return this.$_startIndex = w, this.$_endIndex = m, this.emitUpdate && this.$emit("update", w, m, _, O), clearTimeout(this.$_sortTimer), this.$_sortTimer = setTimeout(this.sortViews, this.updateInterval + 300), {
|
|
569
569
|
continuous: A
|
|
570
570
|
};
|
|
571
571
|
},
|
|
572
572
|
getListenerTarget() {
|
|
573
|
-
let e =
|
|
573
|
+
let e = we(this.$el);
|
|
574
574
|
return window.document && (e === window.document.documentElement || e === window.document.body) && (e = window), e;
|
|
575
575
|
},
|
|
576
576
|
getScroll() {
|
|
@@ -612,7 +612,7 @@ var de = {
|
|
|
612
612
|
const t = this.direction === "vertical" ? { scroll: "scrollTop", start: "top" } : { scroll: "scrollLeft", start: "left" };
|
|
613
613
|
let i, s, n;
|
|
614
614
|
if (this.pageMode) {
|
|
615
|
-
const u =
|
|
615
|
+
const u = we(this.$el), c = u.tagName === "HTML" ? 0 : u[t.scroll], f = u.getBoundingClientRect(), h = this.$el.getBoundingClientRect()[t.start] - f[t.start];
|
|
616
616
|
i = u, s = t.scroll, n = e + c + h;
|
|
617
617
|
} else
|
|
618
618
|
i = this.$el, s = t.scroll, n = e;
|
|
@@ -637,8 +637,8 @@ const bt = {
|
|
|
637
637
|
class: "vue-recycle-scroller__slot"
|
|
638
638
|
};
|
|
639
639
|
function wt(e, t, i, s, n, u) {
|
|
640
|
-
const c =
|
|
641
|
-
return
|
|
640
|
+
const c = Me("ResizeObserver"), f = Pe("observe-visibility");
|
|
641
|
+
return F((k(), E(
|
|
642
642
|
"div",
|
|
643
643
|
{
|
|
644
644
|
class: ee(["vue-recycle-scroller", {
|
|
@@ -649,7 +649,7 @@ function wt(e, t, i, s, n, u) {
|
|
|
649
649
|
onScrollPassive: t[0] || (t[0] = (...l) => u.handleScroll && u.handleScroll(...l))
|
|
650
650
|
},
|
|
651
651
|
[
|
|
652
|
-
e.$slots.before ? (
|
|
652
|
+
e.$slots.before ? (k(), E(
|
|
653
653
|
"div",
|
|
654
654
|
bt,
|
|
655
655
|
[
|
|
@@ -658,16 +658,16 @@ function wt(e, t, i, s, n, u) {
|
|
|
658
658
|
512
|
|
659
659
|
/* NEED_PATCH */
|
|
660
660
|
)) : te("v-if", !0),
|
|
661
|
-
(
|
|
661
|
+
(k(), U(he(i.listTag), {
|
|
662
662
|
ref: "wrapper",
|
|
663
663
|
style: ie({ [e.direction === "vertical" ? "minHeight" : "minWidth"]: n.totalSize + "px" }),
|
|
664
664
|
class: ee(["vue-recycle-scroller__item-wrapper", i.listClass])
|
|
665
665
|
}, {
|
|
666
|
-
default:
|
|
667
|
-
(
|
|
668
|
-
|
|
666
|
+
default: B(() => [
|
|
667
|
+
(k(!0), E(
|
|
668
|
+
Re,
|
|
669
669
|
null,
|
|
670
|
-
|
|
670
|
+
Se(n.pool, (l) => (k(), U(he(i.itemTag), se({
|
|
671
671
|
key: l.nr.id,
|
|
672
672
|
style: n.ready ? {
|
|
673
673
|
transform: `translate${e.direction === "vertical" ? "Y" : "X"}(${l.position}px) translate${e.direction === "vertical" ? "X" : "Y"}(${l.offset}px)`,
|
|
@@ -680,7 +680,7 @@ function wt(e, t, i, s, n, u) {
|
|
|
680
680
|
hover: !i.skipHover && n.hoverKey === l.nr.key
|
|
681
681
|
}
|
|
682
682
|
]]
|
|
683
|
-
},
|
|
683
|
+
}, Ee(i.skipHover ? {} : {
|
|
684
684
|
mouseenter: () => {
|
|
685
685
|
n.hoverKey = l.nr.key;
|
|
686
686
|
},
|
|
@@ -688,7 +688,7 @@ function wt(e, t, i, s, n, u) {
|
|
|
688
688
|
n.hoverKey = null;
|
|
689
689
|
}
|
|
690
690
|
})), {
|
|
691
|
-
default:
|
|
691
|
+
default: B(() => [
|
|
692
692
|
j(e.$slots, "default", {
|
|
693
693
|
item: l.item,
|
|
694
694
|
index: l.nr.index,
|
|
@@ -706,7 +706,7 @@ function wt(e, t, i, s, n, u) {
|
|
|
706
706
|
_: 3
|
|
707
707
|
/* FORWARDED */
|
|
708
708
|
}, 8, ["style", "class"])),
|
|
709
|
-
e.$slots.after ? (
|
|
709
|
+
e.$slots.after ? (k(), E(
|
|
710
710
|
"div",
|
|
711
711
|
gt,
|
|
712
712
|
[
|
|
@@ -725,9 +725,13 @@ function wt(e, t, i, s, n, u) {
|
|
|
725
725
|
}
|
|
726
726
|
de.render = wt;
|
|
727
727
|
de.__file = "src/components/RecycleScroller.vue";
|
|
728
|
-
const St = ["onClick"], zt = { style: { display: "inline-block" } }, _t =
|
|
728
|
+
const St = ["onClick"], zt = { style: { display: "inline-block" } }, _t = {
|
|
729
|
+
key: 1,
|
|
730
|
+
class: "input-text-content"
|
|
731
|
+
}, It = /* @__PURE__ */ Ae({
|
|
729
732
|
__name: "index",
|
|
730
733
|
props: {
|
|
734
|
+
mode: { default: "tree" },
|
|
731
735
|
modelValue: { default: "" },
|
|
732
736
|
isView: { type: Boolean, default: !1 },
|
|
733
737
|
width: { default: "" },
|
|
@@ -745,12 +749,12 @@ const St = ["onClick"], zt = { style: { display: "inline-block" } }, _t = /* @__
|
|
|
745
749
|
treeOptions: { default: () => ({}) },
|
|
746
750
|
path: {},
|
|
747
751
|
nodeKey: {},
|
|
748
|
-
|
|
752
|
+
showInputDom: { type: Boolean, default: !0 }
|
|
749
753
|
},
|
|
750
754
|
emits: ["update:modelValue", "input", "change", "node-click", "update:path"],
|
|
751
755
|
setup(e, { emit: t }) {
|
|
752
756
|
const i = t, s = e, n = q(() => s.nodeKey || s.fieldNames.label), u = x("");
|
|
753
|
-
|
|
757
|
+
Y(
|
|
754
758
|
() => s.path,
|
|
755
759
|
(r) => {
|
|
756
760
|
r && r !== u.value && (u.value = r);
|
|
@@ -761,12 +765,18 @@ const St = ["onClick"], zt = { style: { display: "inline-block" } }, _t = /* @__
|
|
|
761
765
|
function f() {
|
|
762
766
|
I.value = !1;
|
|
763
767
|
}
|
|
768
|
+
Y(
|
|
769
|
+
() => s.showInputDom,
|
|
770
|
+
(r) => {
|
|
771
|
+
r || f();
|
|
772
|
+
}
|
|
773
|
+
);
|
|
764
774
|
function l() {
|
|
765
775
|
document.documentElement.click();
|
|
766
776
|
}
|
|
767
|
-
|
|
777
|
+
Le(() => {
|
|
768
778
|
document.addEventListener("click", f);
|
|
769
|
-
}),
|
|
779
|
+
}), De(() => {
|
|
770
780
|
document.removeEventListener("click", f);
|
|
771
781
|
});
|
|
772
782
|
const h = q(() => {
|
|
@@ -778,32 +788,32 @@ const St = ["onClick"], zt = { style: { display: "inline-block" } }, _t = /* @__
|
|
|
778
788
|
}), V = async (r) => {
|
|
779
789
|
if (i("update:path", r.path || ""), s.mode === "tree") {
|
|
780
790
|
if (b.value) {
|
|
781
|
-
s.showFullPath ?
|
|
791
|
+
s.showFullPath ? p.value = r.pathName || "" : p.value = r.name || "";
|
|
782
792
|
return;
|
|
783
793
|
}
|
|
784
794
|
let o = _.value.treeRef.getNode(r), T = [o.data[s.fieldNames.label] || ""];
|
|
785
795
|
if (s.showFullPath)
|
|
786
796
|
for (; o.parent && o.parent.data[s.fieldNames.label]; )
|
|
787
797
|
o = o.parent, T.unshift(o.data[s.fieldNames.label]);
|
|
788
|
-
|
|
798
|
+
p.value = T.join("/");
|
|
789
799
|
} else {
|
|
790
800
|
let o = r[s.fieldNames.label] || "";
|
|
791
|
-
|
|
801
|
+
p.value = o;
|
|
792
802
|
}
|
|
793
|
-
},
|
|
794
|
-
V(r), l(), i("node-click", r), i("update:modelValue",
|
|
803
|
+
}, R = (r) => {
|
|
804
|
+
V(r), l(), i("node-click", r), i("update:modelValue", p.value), i("change", p.value);
|
|
795
805
|
}, z = x(""), W = x(null), w = Q(s, "size"), m = Q(s, "isView");
|
|
796
|
-
|
|
806
|
+
Y(
|
|
797
807
|
() => s.isView,
|
|
798
808
|
(r) => {
|
|
799
809
|
r && l();
|
|
800
810
|
}
|
|
801
811
|
);
|
|
802
|
-
const
|
|
812
|
+
const p = Q(s, "modelValue"), _ = x(null), O = (r) => {
|
|
803
813
|
N.value = a(), L().then((o) => {
|
|
804
814
|
C(o), ue(() => {
|
|
805
|
-
var T,
|
|
806
|
-
(
|
|
815
|
+
var T, v, H;
|
|
816
|
+
(H = (v = (T = W.value) == null ? void 0 : T.popperRef) == null ? void 0 : v.popperInstanceRef) == null || H.forceUpdate();
|
|
807
817
|
});
|
|
808
818
|
}), i("update:modelValue", r), i("input", r);
|
|
809
819
|
}, d = (r) => {
|
|
@@ -814,18 +824,18 @@ const St = ["onClick"], zt = { style: { display: "inline-block" } }, _t = /* @__
|
|
|
814
824
|
});
|
|
815
825
|
}, K = () => {
|
|
816
826
|
if (s.showFullPath) {
|
|
817
|
-
let r =
|
|
827
|
+
let r = p.value.split("/");
|
|
818
828
|
z.value = r[r.length - 1] || "";
|
|
819
829
|
} else
|
|
820
|
-
z.value =
|
|
830
|
+
z.value = p.value || "";
|
|
821
831
|
}, C = (r) => {
|
|
822
832
|
r.length > 0 ? (I.value = !m.value && !0, S.value = r) : I.value = !1;
|
|
823
|
-
}, I = x(!1), N = x(!1), a = () =>
|
|
824
|
-
N.value = a(), l(),
|
|
833
|
+
}, I = x(!1), N = x(!1), a = () => p.value.length > 0, $ = () => {
|
|
834
|
+
N.value = a(), l(), ke(), L().then((r) => {
|
|
825
835
|
C(r);
|
|
826
836
|
});
|
|
827
837
|
}, y = async (r) => {
|
|
828
|
-
r.disabled || (V(r), l(), i("node-click", r), i("update:modelValue",
|
|
838
|
+
r.disabled || (V(r), l(), i("node-click", r), i("update:modelValue", p.value), i("change", p.value));
|
|
829
839
|
}, g = (r) => {
|
|
830
840
|
let o = 0;
|
|
831
841
|
switch (r) {
|
|
@@ -839,34 +849,34 @@ const St = ["onClick"], zt = { style: { display: "inline-block" } }, _t = /* @__
|
|
|
839
849
|
}, M = (r, o) => {
|
|
840
850
|
if (!o) return r;
|
|
841
851
|
let T = [];
|
|
842
|
-
for (let
|
|
843
|
-
r[
|
|
852
|
+
for (let v = 0; v < r.length; v++)
|
|
853
|
+
r[v][s.fieldNames.label].includes(o) && T.push(r[v]), r[v][s.fieldNames.children] && r[v][s.fieldNames.children].length > 0 && T.push(...M(r[v][s.fieldNames.children], o));
|
|
844
854
|
return T;
|
|
845
855
|
}, L = async () => {
|
|
846
856
|
K();
|
|
847
857
|
let r = [];
|
|
848
858
|
if (!b.value)
|
|
849
859
|
r = M(s.options, z.value);
|
|
850
|
-
else if (!
|
|
860
|
+
else if (!p.value)
|
|
851
861
|
r = M([""], null);
|
|
852
862
|
else {
|
|
853
863
|
let o = await s.treeOptions.search(z.value);
|
|
854
864
|
r = M(o, z.value);
|
|
855
865
|
}
|
|
856
866
|
return r;
|
|
857
|
-
}, S = x([]),
|
|
867
|
+
}, S = x([]), D = q(() => {
|
|
858
868
|
var r;
|
|
859
869
|
if (s.width) {
|
|
860
870
|
const o = (r = s.width) == null ? void 0 : r.toString();
|
|
861
871
|
return o.includes("%") || o.includes("px") ? o : o + "px";
|
|
862
872
|
}
|
|
863
873
|
return g(s.size);
|
|
864
|
-
}), ce = x(), fe = x(""),
|
|
874
|
+
}), ce = x(), fe = x(""), ke = () => {
|
|
865
875
|
var o;
|
|
866
876
|
const r = (o = ce.value) == null ? void 0 : o.offsetWidth;
|
|
867
|
-
fe.value = r ? r + "px" :
|
|
877
|
+
fe.value = r ? r + "px" : D.value;
|
|
868
878
|
};
|
|
869
|
-
return
|
|
879
|
+
return Y(
|
|
870
880
|
() => s.options,
|
|
871
881
|
() => {
|
|
872
882
|
L().then((r) => {
|
|
@@ -874,14 +884,14 @@ const St = ["onClick"], zt = { style: { display: "inline-block" } }, _t = /* @__
|
|
|
874
884
|
});
|
|
875
885
|
}
|
|
876
886
|
), (r, o) => {
|
|
877
|
-
const T =
|
|
878
|
-
return
|
|
887
|
+
const T = Ue;
|
|
888
|
+
return k(), E(
|
|
879
889
|
"div",
|
|
880
890
|
{
|
|
881
|
-
class: "autocomplete
|
|
891
|
+
class: "das-ui-autocomplete",
|
|
882
892
|
ref_key: "$completeEL",
|
|
883
893
|
ref: ce,
|
|
884
|
-
style: ie(`width:${
|
|
894
|
+
style: ie(`width:${D.value}`)
|
|
885
895
|
},
|
|
886
896
|
[
|
|
887
897
|
re(T, {
|
|
@@ -895,80 +905,89 @@ const St = ["onClick"], zt = { style: { display: "inline-block" } }, _t = /* @__
|
|
|
895
905
|
offset: r.offset,
|
|
896
906
|
"popper-options": r.popperOptions
|
|
897
907
|
}, {
|
|
898
|
-
reference:
|
|
899
|
-
|
|
908
|
+
reference: B(() => [
|
|
909
|
+
r.showInputDom ? (k(), E("div", {
|
|
910
|
+
key: 0,
|
|
900
911
|
class: "slot-component-box",
|
|
901
|
-
onClick:
|
|
912
|
+
onClick: me($, ["stop"])
|
|
902
913
|
}, [
|
|
903
|
-
re(
|
|
914
|
+
re(P(We), se({
|
|
904
915
|
ref_key: "inputRef",
|
|
905
916
|
ref: c,
|
|
906
|
-
modelValue:
|
|
907
|
-
"onUpdate:modelValue": o[3] || (o[3] = (
|
|
917
|
+
modelValue: P(p),
|
|
918
|
+
"onUpdate:modelValue": o[3] || (o[3] = (v) => He(p) ? p.value = v : null),
|
|
908
919
|
modelModifiers: { trim: !0 },
|
|
909
|
-
size:
|
|
910
|
-
width:
|
|
911
|
-
isView:
|
|
920
|
+
size: P(w),
|
|
921
|
+
width: D.value,
|
|
922
|
+
isView: P(m)
|
|
912
923
|
}, r.$attrs, {
|
|
913
924
|
onClear: A,
|
|
914
|
-
onInput:
|
|
925
|
+
onInput: O,
|
|
915
926
|
onChange: d
|
|
916
|
-
}),
|
|
927
|
+
}), Fe({
|
|
917
928
|
_: 2
|
|
918
929
|
/* DYNAMIC */
|
|
919
930
|
}, [
|
|
920
|
-
|
|
921
|
-
name:
|
|
922
|
-
fn:
|
|
923
|
-
j(r.$slots,
|
|
931
|
+
Se(r.$slots, (v, H, Ve) => ({
|
|
932
|
+
name: H,
|
|
933
|
+
fn: B(() => [
|
|
934
|
+
j(r.$slots, H, {}, void 0, !0)
|
|
924
935
|
])
|
|
925
936
|
}))
|
|
926
937
|
]), 1040, ["modelValue", "size", "width", "isView"])
|
|
938
|
+
])) : F((k(), E("div", _t, [
|
|
939
|
+
pe(
|
|
940
|
+
ve(P(p)),
|
|
941
|
+
1
|
|
942
|
+
/* TEXT */
|
|
943
|
+
)
|
|
944
|
+
])), [
|
|
945
|
+
[P(be)]
|
|
927
946
|
])
|
|
928
947
|
]),
|
|
929
|
-
default:
|
|
930
|
-
|
|
948
|
+
default: B(() => [
|
|
949
|
+
F((k(), E(
|
|
931
950
|
"div",
|
|
932
951
|
{
|
|
933
952
|
class: "autocomplete-select-box",
|
|
934
953
|
style: ie(`max-height: ${32 * r.maxCount}px;`),
|
|
935
|
-
onClick: o[2] || (o[2] =
|
|
954
|
+
onClick: o[2] || (o[2] = me(() => {
|
|
936
955
|
}, ["stop"]))
|
|
937
956
|
},
|
|
938
957
|
[
|
|
939
|
-
|
|
958
|
+
F((k(), U(P(de), {
|
|
940
959
|
key: S.value.length,
|
|
941
960
|
items: S.value,
|
|
942
961
|
"item-size": 32,
|
|
943
962
|
"key-field": r.fieldNames.value || r.fieldNames.label,
|
|
944
963
|
class: "virtual-list"
|
|
945
964
|
}, {
|
|
946
|
-
default:
|
|
947
|
-
|
|
948
|
-
onClick: (
|
|
965
|
+
default: B(({ item: v, index: H }) => [
|
|
966
|
+
Be("div", {
|
|
967
|
+
onClick: (Ve) => y(v),
|
|
949
968
|
class: ee([
|
|
950
969
|
"select-label",
|
|
951
|
-
{ "current-select-label":
|
|
952
|
-
{ "is-disabled":
|
|
970
|
+
{ "current-select-label": v[r.fieldNames.label] === z.value },
|
|
971
|
+
{ "is-disabled": v.disabled }
|
|
953
972
|
])
|
|
954
973
|
}, [
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
974
|
+
F((k(), E("span", zt, [
|
|
975
|
+
pe(
|
|
976
|
+
ve(v[r.fieldNames.label]),
|
|
958
977
|
1
|
|
959
978
|
/* TEXT */
|
|
960
979
|
)
|
|
961
980
|
])), [
|
|
962
|
-
[
|
|
981
|
+
[P(be)]
|
|
963
982
|
])
|
|
964
983
|
], 10, St)
|
|
965
984
|
]),
|
|
966
985
|
_: 1
|
|
967
986
|
/* STABLE */
|
|
968
987
|
}, 8, ["items", "key-field"])), [
|
|
969
|
-
[
|
|
988
|
+
[ye, s.mode === "list" || N.value]
|
|
970
989
|
]),
|
|
971
|
-
s.mode === "tree" ?
|
|
990
|
+
s.mode === "tree" ? F((k(), U(P(qe), se({
|
|
972
991
|
key: 0,
|
|
973
992
|
width: "120px",
|
|
974
993
|
filterMode: "input",
|
|
@@ -981,18 +1000,18 @@ const St = ["onClick"], zt = { style: { display: "inline-block" } }, _t = /* @__
|
|
|
981
1000
|
}, r.treeOptions, {
|
|
982
1001
|
props: { ...r.fieldNames },
|
|
983
1002
|
modelValue: z.value,
|
|
984
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
1003
|
+
"onUpdate:modelValue": o[0] || (o[0] = (v) => z.value = v),
|
|
985
1004
|
path: u.value,
|
|
986
|
-
"onUpdate:path": o[1] || (o[1] = (
|
|
987
|
-
onNodeClick:
|
|
1005
|
+
"onUpdate:path": o[1] || (o[1] = (v) => u.value = v),
|
|
1006
|
+
onNodeClick: R
|
|
988
1007
|
}), null, 16, ["node-key", "data", "props", "modelValue", "path"])), [
|
|
989
|
-
[
|
|
1008
|
+
[ye, !N.value]
|
|
990
1009
|
]) : te("v-if", !0)
|
|
991
1010
|
],
|
|
992
1011
|
4
|
|
993
1012
|
/* STYLE */
|
|
994
1013
|
)), [
|
|
995
|
-
[
|
|
1014
|
+
[P(Ke)]
|
|
996
1015
|
])
|
|
997
1016
|
]),
|
|
998
1017
|
_: 3
|
|
@@ -1004,14 +1023,14 @@ const St = ["onClick"], zt = { style: { display: "inline-block" } }, _t = /* @__
|
|
|
1004
1023
|
);
|
|
1005
1024
|
};
|
|
1006
1025
|
}
|
|
1007
|
-
}),
|
|
1026
|
+
}), $t = (e, t) => {
|
|
1008
1027
|
const i = e.__vccOpts || e;
|
|
1009
1028
|
for (const [s, n] of t)
|
|
1010
1029
|
i[s] = n;
|
|
1011
1030
|
return i;
|
|
1012
|
-
},
|
|
1031
|
+
}, kt = /* @__PURE__ */ $t(It, [["__scopeId", "data-v-8d27a655"]]), Lt = () => x(null), Dt = je(kt);
|
|
1013
1032
|
export {
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1033
|
+
Dt as DasAutocomplete,
|
|
1034
|
+
Lt as DasAutocompleteRef,
|
|
1035
|
+
Dt as default
|
|
1017
1036
|
};
|