@dialpad/dialtone 9.189.1 → 9.191.0
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/dist/tokens/doc.json +113367 -113367
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/components/scroller/modules/core_scroller.vue.d.ts +8 -1
- package/dist/vue3/components/scroller/modules/core_scroller.vue.d.ts.map +1 -1
- package/dist/vue3/components/scroller/modules/dynamic_scroller.vue.d.ts +16 -6
- package/dist/vue3/components/scroller/modules/dynamic_scroller.vue.d.ts.map +1 -1
- package/dist/vue3/components/scroller/scroller.vue.d.ts +34 -9
- package/dist/vue3/components/scroller/scroller.vue.d.ts.map +1 -1
- package/dist/vue3/dialtone-vue.cjs +1 -1
- package/dist/vue3/dialtone-vue.js +1 -1
- package/dist/vue3/lib/scroller/index.cjs +1 -1
- package/dist/vue3/lib/scroller/index.js +1 -1
- package/dist/vue3/lib/scroller/scroller.cjs +1 -1
- package/dist/vue3/lib/scroller/scroller.js +1 -1
- package/dist/vue3/{scroller-BGVDh3sq.js → scroller-BDgM9Yzb.js} +214 -146
- package/dist/vue3/scroller-BDgM9Yzb.js.map +1 -0
- package/dist/vue3/scroller-ByLBN7Bg.cjs +2 -0
- package/dist/vue3/scroller-ByLBN7Bg.cjs.map +1 -0
- package/package.json +3 -3
- package/dist/vue3/scroller-BGVDh3sq.js.map +0 -1
- package/dist/vue3/scroller-CjAsgjl9.cjs +0 -2
- package/dist/vue3/scroller-CjAsgjl9.cjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { returnFirstEl as e } from "./common/utils/index.js";
|
|
2
2
|
import { t } from "./_plugin-vue_export-helper-BTgDAbhb.js";
|
|
3
|
-
import { Fragment as n, computed as r, createBlock as i,
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createSlots as s, createVNode as c, guardReactiveProps as l, h as u, markRaw as d, mergeProps as f, nextTick as p, normalizeClass as m, normalizeProps as h, normalizeStyle as g, onMounted as _, openBlock as v, provide as y, reactive as b, ref as x, renderList as S, renderSlot as C, resolveComponent as w, resolveDynamicComponent as T, shallowReactive as E, toHandlers as D, unref as O, watch as k, withCtx as A } from "vue";
|
|
4
4
|
//#region components/scroller/modules/core_scroller.vue
|
|
5
|
-
var
|
|
5
|
+
var j = {
|
|
6
6
|
__name: "core_scroller",
|
|
7
7
|
props: {
|
|
8
8
|
items: {
|
|
@@ -63,36 +63,40 @@ var k = {
|
|
|
63
63
|
default: ""
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
emits: [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
emits: [
|
|
67
|
+
"user-position",
|
|
68
|
+
"scroll-start",
|
|
69
|
+
"scroll-end"
|
|
70
|
+
],
|
|
71
|
+
setup(e, { expose: t, emit: s }) {
|
|
72
|
+
let c = e, l = s, u = b(/* @__PURE__ */ new Map()), h = b(/* @__PURE__ */ new Map()), y = x([]), w = x(null), j = x(!1), M = x(null), N = x(null), P = x(null), F = x("top"), I = 0, L = 0, R = !1, z = 0, B = null, V = null, H = 0, U = 0, W = r(() => {
|
|
73
|
+
if (c.itemSize === null) {
|
|
74
|
+
let e = { "-1": { accumulator: 0 } }, t = c.items, n = c.sizeField, r = c.minItemSize, i = 1e4, a = 0, o;
|
|
71
75
|
for (let s = 0, c = t.length; s < c; s++) o = t[s][n] || r, o < i && (i = o), a += o, e[s] = {
|
|
72
76
|
accumulator: a,
|
|
73
77
|
size: o
|
|
74
78
|
};
|
|
75
|
-
return
|
|
79
|
+
return V = i, e;
|
|
76
80
|
}
|
|
77
81
|
return [];
|
|
78
|
-
}),
|
|
82
|
+
}), G = r(() => c.items.length && typeof c.items[0] != "object"), K = r(() => {
|
|
79
83
|
let e = {};
|
|
80
|
-
for (let t = 0, n =
|
|
84
|
+
for (let t = 0, n = c.items.length; t < n; t++) e[c.items[t][c.keyField]] = t;
|
|
81
85
|
return e;
|
|
82
86
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, { deep: !0 }),
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
k(W, () => {
|
|
88
|
+
Q(!1);
|
|
89
|
+
}, { deep: !0 }), _(() => {
|
|
90
|
+
p(() => {
|
|
91
|
+
Q(!0), j.value = !0;
|
|
88
92
|
});
|
|
89
93
|
});
|
|
90
|
-
let
|
|
91
|
-
let a =
|
|
94
|
+
let q = (e, t, n, r, i) => {
|
|
95
|
+
let a = E({
|
|
92
96
|
item: n,
|
|
93
97
|
position: 0,
|
|
94
|
-
nr:
|
|
95
|
-
id:
|
|
98
|
+
nr: d({
|
|
99
|
+
id: U++,
|
|
96
100
|
index: t,
|
|
97
101
|
used: !0,
|
|
98
102
|
key: r,
|
|
@@ -100,135 +104,155 @@ var k = {
|
|
|
100
104
|
})
|
|
101
105
|
});
|
|
102
106
|
return e.value.push(a), a;
|
|
103
|
-
},
|
|
104
|
-
let n =
|
|
107
|
+
}, J = (e, t = !1) => {
|
|
108
|
+
let n = h, r = e.nr.type, i = n.get(r);
|
|
105
109
|
i || (i = [], n.set(r, i)), i.push(e), t || (e.nr.used = !1, e.position = -9999);
|
|
106
|
-
},
|
|
107
|
-
let e =
|
|
110
|
+
}, Y = () => {
|
|
111
|
+
let e = c.direction === "vertical", t;
|
|
108
112
|
return t = e ? {
|
|
109
|
-
start:
|
|
110
|
-
end:
|
|
113
|
+
start: M.value.scrollTop,
|
|
114
|
+
end: M.value.scrollTop + M.value.clientHeight
|
|
111
115
|
} : {
|
|
112
|
-
start:
|
|
113
|
-
end:
|
|
116
|
+
start: M.value.scrollLeft,
|
|
117
|
+
end: M.value.scrollLeft + M.value.clientWidth
|
|
114
118
|
}, t;
|
|
115
|
-
},
|
|
119
|
+
}, X = () => {
|
|
116
120
|
throw setTimeout(() => {
|
|
117
|
-
console.error("It seems the scroller element isn't scrolling, so it tries to render all the items at once.", "Scroller:",
|
|
121
|
+
console.error("It seems the scroller element isn't scrolling, so it tries to render all the items at once.", "Scroller:", M), console.error("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.");
|
|
118
122
|
}), Error("Rendered items limit reached");
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
let n =
|
|
123
|
-
if (!o)
|
|
123
|
+
}, Z = () => {
|
|
124
|
+
y.value.sort((e, t) => e.nr.index - t.nr.index);
|
|
125
|
+
}, Q = (e, t = !1) => {
|
|
126
|
+
let n = c.itemSize, r = V, i = G.value ? null : c.keyField, a = c.items, o = a.length, s = W.value, d = u, f = h, p = y, m = K, g, _, v, b, x;
|
|
127
|
+
if (!o) g = _ = b = x = v = 0;
|
|
124
128
|
else {
|
|
125
|
-
let e =
|
|
129
|
+
let e = Y();
|
|
126
130
|
if (t) {
|
|
127
|
-
let t = e.start -
|
|
131
|
+
let t = e.start - z.value;
|
|
128
132
|
if (t < 0 && (t = -t), n === null && t < r.value || t < n) return { continuous: !0 };
|
|
129
133
|
}
|
|
130
|
-
|
|
131
|
-
let i =
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
z = e.start;
|
|
135
|
+
let i = c.buffer;
|
|
136
|
+
e.start -= i, e.end += i;
|
|
137
|
+
let l = c.direction === "vertical" ? "scrollHeight" : "scrollWidth";
|
|
138
|
+
if (N.value && (e.start -= N.value[l]), P.value && (e.end += P.value[l]), n === null) {
|
|
139
|
+
let t, n = 0, r = o - 1, i = ~~(o / 2), c;
|
|
134
140
|
do
|
|
135
|
-
|
|
136
|
-
while (i !==
|
|
137
|
-
for (i < 0 && (i = 0),
|
|
138
|
-
for (
|
|
139
|
-
for (
|
|
141
|
+
c = i, t = s[i]?.accumulator, t < e.start ? n = i : i < o - 1 && s[i + 1]?.accumulator > e.start && (r = i), i = ~~((n + r) / 2);
|
|
142
|
+
while (i !== c);
|
|
143
|
+
for (i < 0 && (i = 0), g = i, v = s[o - 1]?.accumulator, _ = i; _ < o && s[_]?.accumulator < e.end; _++);
|
|
144
|
+
for (_ === -1 ? _ = a.length - 1 : (_++, _ > o && (_ = o)), b = I; b < o && s[b]?.accumulator < e.start; b++);
|
|
145
|
+
for (x = b; x < o && s[x]?.accumulator < e.end; x++);
|
|
140
146
|
} else {
|
|
141
|
-
|
|
142
|
-
let t =
|
|
143
|
-
|
|
147
|
+
g = ~~(e.start / n);
|
|
148
|
+
let t = g % 1;
|
|
149
|
+
g -= t, _ = Math.ceil(e.end / n), b = Math.max(0, Math.floor(e.start / n)), x = Math.floor(e.end / n), g < 0 && (g = 0), _ > o && (_ = o), b < 0 && (b = 0), x > o && (x = o), v = Math.ceil(o / 1) * n;
|
|
144
150
|
}
|
|
145
151
|
}
|
|
146
|
-
|
|
147
|
-
let
|
|
148
|
-
if (
|
|
149
|
-
let
|
|
150
|
-
for (let e =
|
|
151
|
-
|
|
152
|
-
let t = i ?
|
|
152
|
+
_ - g > 1e3 && X(), H = v;
|
|
153
|
+
let S, C = g <= L && _ >= g;
|
|
154
|
+
if (C) for (let t = 0, n = p.value.length; t < n; t++) S = p.value[t], S?.nr.used && (e && (S.nr.index = m[S.item[i]]), (S.nr.index == null || S.nr.index < g || S.nr.index >= _) && J(S));
|
|
155
|
+
let w = C ? null : /* @__PURE__ */ new Map(), T, E, D;
|
|
156
|
+
for (let e = g; e < _; e++) {
|
|
157
|
+
T = a[e];
|
|
158
|
+
let t = i ? T?.[i] : T;
|
|
153
159
|
if (t == null) throw Error(`Key is ${t} on item (keyField is '${i}')`);
|
|
154
|
-
if (
|
|
155
|
-
|
|
160
|
+
if (S = d.get(t), !n && !s[e]?.size) {
|
|
161
|
+
S && J(S);
|
|
156
162
|
continue;
|
|
157
163
|
}
|
|
158
|
-
|
|
159
|
-
let r =
|
|
160
|
-
if (!
|
|
161
|
-
else if (!
|
|
162
|
-
let e = r.indexOf(
|
|
164
|
+
E = T.type;
|
|
165
|
+
let r = f.get(E), o = !1;
|
|
166
|
+
if (!S) C ? S = r && r.length ? r.pop() : q(p, e, T, t, E) : (D = w.get(E) || 0, (!r || D >= r.length) && (S = q(p, e, T, t, E), J(S, !0), r = f.get(E)), S = r[D], w.set(E, D + 1)), d.delete(S.nr.key), S.nr.used = !0, S.nr.index = e, S.nr.key = t, S.nr.type = E, d.set(t, S), o = !0;
|
|
167
|
+
else if (!S.nr.used && (S.nr.used = !0, o = !0, r)) {
|
|
168
|
+
let e = r.indexOf(S);
|
|
163
169
|
e !== -1 && r.splice(e, 1);
|
|
164
170
|
}
|
|
165
|
-
|
|
171
|
+
S.item = T, o && (e === a.length - 1 && l("scroll-end"), e === 0 && l("scroll-start")), n === null ? (S.position = s[e - 1]?.accumulator, S.offset = 0) : (S.position = Math.floor(e) * n, S.offset = e % 1 * n);
|
|
166
172
|
}
|
|
167
|
-
return
|
|
168
|
-
},
|
|
169
|
-
let t =
|
|
173
|
+
return I = g, L = _, clearTimeout(B), B = setTimeout(Z, 300), { continuous: C };
|
|
174
|
+
}, $ = (e) => {
|
|
175
|
+
let t = c.direction === "vertical" ? {
|
|
170
176
|
scroll: "scrollTop",
|
|
171
177
|
start: "top"
|
|
172
178
|
} : {
|
|
173
179
|
scroll: "scrollLeft",
|
|
174
180
|
start: "left"
|
|
175
|
-
}, n =
|
|
181
|
+
}, n = M.value, r = t.scroll;
|
|
176
182
|
n[r] = e;
|
|
177
|
-
},
|
|
183
|
+
}, ee = (e) => {
|
|
178
184
|
let t;
|
|
179
|
-
t =
|
|
180
|
-
},
|
|
181
|
-
let e =
|
|
182
|
-
|
|
183
|
-
|
|
185
|
+
t = c.itemSize === null ? e > 0 ? W.value[e - 1]?.accumulator : 0 : Math.floor(e) * c.itemSize, $(t);
|
|
186
|
+
}, te = () => {
|
|
187
|
+
let e = M.value;
|
|
188
|
+
F.value !== "middle" && (F.value = "middle", l("user-position", "middle")), e.scrollTop === 0 && (F.value = "top", l("user-position", "top")), e.scrollTop + e.clientHeight === e.scrollHeight && (F.value = "bottom", l("user-position", "bottom")), R || (R = !0, requestAnimationFrame(() => {
|
|
189
|
+
R = !1, Q(!1, !0);
|
|
184
190
|
}));
|
|
185
191
|
};
|
|
186
192
|
return t({
|
|
187
|
-
scrollToItem:
|
|
188
|
-
_updateVisibleItems:
|
|
189
|
-
}), (t, r) => (
|
|
193
|
+
scrollToItem: ee,
|
|
194
|
+
_updateVisibleItems: Q
|
|
195
|
+
}), (t, r) => (v(), o("div", {
|
|
190
196
|
ref_key: "scroller",
|
|
191
|
-
ref:
|
|
192
|
-
class:
|
|
193
|
-
ready:
|
|
197
|
+
ref: M,
|
|
198
|
+
class: m(["vue-recycle-scroller", {
|
|
199
|
+
ready: j.value,
|
|
194
200
|
[`direction-${e.direction}`]: !0
|
|
195
201
|
}]),
|
|
196
|
-
onScrollPassive:
|
|
197
|
-
}, [
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
class: ["vue-recycle-scroller__item-
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
202
|
+
onScrollPassive: te
|
|
203
|
+
}, [
|
|
204
|
+
t.$slots.before ? (v(), o("div", {
|
|
205
|
+
key: 0,
|
|
206
|
+
ref_key: "before",
|
|
207
|
+
ref: N,
|
|
208
|
+
"data-qa": "dt-scroller-before",
|
|
209
|
+
class: "vue-recycle-scroller__slot"
|
|
210
|
+
}, [C(t.$slots, "before")], 512)) : a("", !0),
|
|
211
|
+
(v(), i(T(e.listTag), {
|
|
212
|
+
ref: "wrapper",
|
|
213
|
+
style: g({ [e.direction === "vertical" ? "minHeight" : "minWidth"]: `${O(H)}px` }),
|
|
214
|
+
"data-qa": "dt-scroller-item-wrapper",
|
|
215
|
+
class: m(["vue-recycle-scroller__item-wrapper", e.listClass])
|
|
216
|
+
}, {
|
|
217
|
+
default: A(() => [(v(!0), o(n, null, S(y.value, (n) => (v(), i(T(e.itemTag), f({
|
|
218
|
+
key: n.nr.id,
|
|
219
|
+
"data-qa": "dt-scroller-item",
|
|
220
|
+
style: j.value ? {
|
|
221
|
+
transform: `translate${e.direction === "vertical" ? "Y" : "X"}(${n.position}px) translate${e.direction === "vertical" ? "X" : "Y"}(${n.offset}px)`,
|
|
222
|
+
width: void 0,
|
|
223
|
+
height: void 0
|
|
224
|
+
} : null,
|
|
225
|
+
class: ["vue-recycle-scroller__item-view", [e.itemClass, { hover: !e.skipHover && w.value === n.nr.key }]]
|
|
226
|
+
}, D(e.skipHover ? {} : {
|
|
227
|
+
mouseenter: () => {
|
|
228
|
+
w.value = n.nr.key;
|
|
229
|
+
},
|
|
230
|
+
mouseleave: () => {
|
|
231
|
+
w.value = null;
|
|
232
|
+
}
|
|
233
|
+
})), {
|
|
234
|
+
default: A(() => [C(t.$slots, "default", {
|
|
235
|
+
item: n.item,
|
|
236
|
+
index: n.nr.index,
|
|
237
|
+
active: n.nr.used
|
|
238
|
+
})]),
|
|
239
|
+
_: 2
|
|
240
|
+
}, 1040, ["style", "class"]))), 128)), e.items.length ? a("", !0) : C(t.$slots, "empty", { key: 0 })]),
|
|
241
|
+
_: 3
|
|
242
|
+
}, 8, ["style", "class"])),
|
|
243
|
+
t.$slots.after ? (v(), o("div", {
|
|
244
|
+
key: 1,
|
|
245
|
+
ref_key: "after",
|
|
246
|
+
ref: P,
|
|
247
|
+
"data-qa": "dt-scroller-after",
|
|
248
|
+
class: "vue-recycle-scroller__slot"
|
|
249
|
+
}, [C(t.$slots, "after")], 512)) : a("", !0)
|
|
250
|
+
], 34));
|
|
227
251
|
}
|
|
228
|
-
},
|
|
252
|
+
}, M = {
|
|
229
253
|
name: "DynamicScroller",
|
|
230
254
|
components: {
|
|
231
|
-
CoreScroller:
|
|
255
|
+
CoreScroller: j,
|
|
232
256
|
DtScrollerItem: {
|
|
233
257
|
name: "DtScrollerItem",
|
|
234
258
|
inject: [
|
|
@@ -335,7 +359,7 @@ var k = {
|
|
|
335
359
|
}
|
|
336
360
|
},
|
|
337
361
|
render() {
|
|
338
|
-
return
|
|
362
|
+
return u(this.tag, this.$slots.default());
|
|
339
363
|
}
|
|
340
364
|
}
|
|
341
365
|
},
|
|
@@ -465,24 +489,24 @@ var k = {
|
|
|
465
489
|
}
|
|
466
490
|
}
|
|
467
491
|
};
|
|
468
|
-
function
|
|
469
|
-
let
|
|
470
|
-
return
|
|
492
|
+
function N(e, t, n, r, a, o) {
|
|
493
|
+
let u = w("dt-scroller-item"), d = w("core-scroller");
|
|
494
|
+
return v(), i(d, f({
|
|
471
495
|
ref: "scroller",
|
|
472
|
-
items:
|
|
496
|
+
items: o.itemsWithSize,
|
|
473
497
|
"min-item-size": n.minItemSize,
|
|
474
498
|
direction: n.direction,
|
|
475
499
|
"key-field": n.keyField,
|
|
476
500
|
"list-tag": n.listTag,
|
|
477
501
|
"item-tag": n.itemTag
|
|
478
|
-
}, e.$attrs), {
|
|
479
|
-
default:
|
|
502
|
+
}, e.$attrs), s({
|
|
503
|
+
default: A(({ item: t, index: n, active: r }) => [c(u, {
|
|
480
504
|
item: t,
|
|
481
505
|
active: r,
|
|
482
506
|
"size-dependencies": [t.message],
|
|
483
507
|
"data-index": n
|
|
484
508
|
}, {
|
|
485
|
-
default:
|
|
509
|
+
default: A(() => [C(e.$slots, "default", h(l({
|
|
486
510
|
item: t.item,
|
|
487
511
|
index: n,
|
|
488
512
|
active: r,
|
|
@@ -495,8 +519,24 @@ function j(e, t, n, r, a, c) {
|
|
|
495
519
|
"size-dependencies",
|
|
496
520
|
"data-index"
|
|
497
521
|
])]),
|
|
498
|
-
_:
|
|
499
|
-
},
|
|
522
|
+
_: 2
|
|
523
|
+
}, [
|
|
524
|
+
e.$slots.before ? {
|
|
525
|
+
name: "before",
|
|
526
|
+
fn: A(() => [C(e.$slots, "before")]),
|
|
527
|
+
key: "0"
|
|
528
|
+
} : void 0,
|
|
529
|
+
e.$slots.empty ? {
|
|
530
|
+
name: "empty",
|
|
531
|
+
fn: A(() => [C(e.$slots, "empty")]),
|
|
532
|
+
key: "1"
|
|
533
|
+
} : void 0,
|
|
534
|
+
e.$slots.after ? {
|
|
535
|
+
name: "after",
|
|
536
|
+
fn: A(() => [C(e.$slots, "after")]),
|
|
537
|
+
key: "2"
|
|
538
|
+
} : void 0
|
|
539
|
+
]), 1040, [
|
|
500
540
|
"items",
|
|
501
541
|
"min-item-size",
|
|
502
542
|
"direction",
|
|
@@ -505,9 +545,13 @@ function j(e, t, n, r, a, c) {
|
|
|
505
545
|
"item-tag"
|
|
506
546
|
]);
|
|
507
547
|
}
|
|
508
|
-
var
|
|
548
|
+
var P = /* @__PURE__ */ t(M, [["render", N]]), F = /* @__PURE__ */ Object.assign({ name: "DtScroller" }, {
|
|
509
549
|
__name: "scroller",
|
|
510
550
|
props: {
|
|
551
|
+
buffer: {
|
|
552
|
+
type: Number,
|
|
553
|
+
default: 200
|
|
554
|
+
},
|
|
511
555
|
direction: {
|
|
512
556
|
type: String,
|
|
513
557
|
default: "vertical",
|
|
@@ -550,65 +594,89 @@ var M = /* @__PURE__ */ t(A, [["render", j]]), N = /* @__PURE__ */ Object.assign
|
|
|
550
594
|
default: "100%"
|
|
551
595
|
}
|
|
552
596
|
},
|
|
553
|
-
emits: [
|
|
597
|
+
emits: [
|
|
598
|
+
"user-position",
|
|
599
|
+
"scroll-start",
|
|
600
|
+
"scroll-end"
|
|
601
|
+
],
|
|
554
602
|
setup(e, { expose: t, emit: n }) {
|
|
555
603
|
let a = e;
|
|
556
|
-
|
|
557
|
-
let o =
|
|
604
|
+
y("emit", n);
|
|
605
|
+
let o = x(null), c = r(() => ({
|
|
558
606
|
width: typeof a.scrollerWidth == "number" ? `${a.scrollerWidth}px` : a.scrollerWidth,
|
|
559
607
|
height: typeof a.scrollerHeight == "number" ? `${a.scrollerHeight}px` : a.scrollerHeight
|
|
560
608
|
}));
|
|
561
|
-
|
|
562
|
-
|
|
609
|
+
k(a, () => {
|
|
610
|
+
m();
|
|
563
611
|
}, {
|
|
564
612
|
deep: !0,
|
|
565
613
|
immediate: !0
|
|
566
614
|
});
|
|
567
|
-
function
|
|
615
|
+
function u() {
|
|
568
616
|
o.value && o.value.scrollToBottom();
|
|
569
617
|
}
|
|
570
|
-
function
|
|
618
|
+
function d(e) {
|
|
571
619
|
o.value && o.value.scrollToItem(e);
|
|
572
620
|
}
|
|
573
|
-
function
|
|
621
|
+
function f() {
|
|
574
622
|
o.value && (a.dynamic ? o.value.dynamicScrollerUpdateItems() : o.value._updateVisibleItems(!0));
|
|
575
623
|
}
|
|
576
|
-
function
|
|
624
|
+
function p() {
|
|
577
625
|
o.value && (a.dynamic ? o.value.dynamicScrollerUpdateItemsFromBottom() : o.value._updateVisibleItems(!1, !0));
|
|
578
626
|
}
|
|
579
|
-
function
|
|
627
|
+
function m() {
|
|
580
628
|
a.dynamic && !a.minItemSize && console.error("scroller error: 'minItemSize' is required on 'dynamic' mode."), !a.dynamic && !a.itemSize && console.error("scroller error: 'itemSize' is required.");
|
|
581
629
|
}
|
|
582
630
|
return t({
|
|
583
|
-
scrollToBottom:
|
|
584
|
-
scrollToItem:
|
|
585
|
-
updateItems:
|
|
586
|
-
updateItemsFromBottom:
|
|
587
|
-
}), (t, n) => (
|
|
631
|
+
scrollToBottom: u,
|
|
632
|
+
scrollToItem: d,
|
|
633
|
+
updateItems: f,
|
|
634
|
+
updateItemsFromBottom: p
|
|
635
|
+
}), (t, n) => (v(), i(T(e.dynamic ? P : j), {
|
|
588
636
|
ref_key: "scroller",
|
|
589
637
|
ref: o,
|
|
590
638
|
"data-qa": "dt-scroller",
|
|
591
639
|
items: e.items,
|
|
592
640
|
"item-size": e.itemSize,
|
|
593
641
|
"min-item-size": e.minItemSize,
|
|
642
|
+
buffer: e.buffer,
|
|
594
643
|
direction: e.direction,
|
|
595
644
|
"key-field": e.keyField,
|
|
596
645
|
"list-tag": e.listTag,
|
|
597
646
|
"item-tag": e.itemTag,
|
|
598
|
-
style:
|
|
647
|
+
style: g(c.value),
|
|
599
648
|
tabindex: "0",
|
|
600
|
-
onUserPosition: n[0] || (n[0] = (e) => t.$emit("user-position", e))
|
|
601
|
-
|
|
602
|
-
|
|
649
|
+
onUserPosition: n[0] || (n[0] = (e) => t.$emit("user-position", e)),
|
|
650
|
+
onScrollStart: n[1] || (n[1] = (e) => t.$emit("scroll-start")),
|
|
651
|
+
onScrollEnd: n[2] || (n[2] = (e) => t.$emit("scroll-end"))
|
|
652
|
+
}, s({
|
|
653
|
+
default: A(({ item: e, index: n, active: r }) => [C(t.$slots, "default", h(l({
|
|
603
654
|
item: e,
|
|
604
655
|
index: n,
|
|
605
656
|
active: r
|
|
606
657
|
})))]),
|
|
607
|
-
_:
|
|
608
|
-
},
|
|
658
|
+
_: 2
|
|
659
|
+
}, [
|
|
660
|
+
t.$slots.before ? {
|
|
661
|
+
name: "before",
|
|
662
|
+
fn: A(() => [C(t.$slots, "before")]),
|
|
663
|
+
key: "0"
|
|
664
|
+
} : void 0,
|
|
665
|
+
t.$slots.empty ? {
|
|
666
|
+
name: "empty",
|
|
667
|
+
fn: A(() => [C(t.$slots, "empty")]),
|
|
668
|
+
key: "1"
|
|
669
|
+
} : void 0,
|
|
670
|
+
t.$slots.after ? {
|
|
671
|
+
name: "after",
|
|
672
|
+
fn: A(() => [C(t.$slots, "after")]),
|
|
673
|
+
key: "2"
|
|
674
|
+
} : void 0
|
|
675
|
+
]), 1064, [
|
|
609
676
|
"items",
|
|
610
677
|
"item-size",
|
|
611
678
|
"min-item-size",
|
|
679
|
+
"buffer",
|
|
612
680
|
"direction",
|
|
613
681
|
"key-field",
|
|
614
682
|
"list-tag",
|
|
@@ -618,6 +686,6 @@ var M = /* @__PURE__ */ t(A, [["render", j]]), N = /* @__PURE__ */ Object.assign
|
|
|
618
686
|
}
|
|
619
687
|
});
|
|
620
688
|
//#endregion
|
|
621
|
-
export {
|
|
689
|
+
export { F as t };
|
|
622
690
|
|
|
623
|
-
//# sourceMappingURL=scroller-
|
|
691
|
+
//# sourceMappingURL=scroller-BDgM9Yzb.js.map
|