@pisapp/core 7.0.0-dev.20260916-153034 → 7.0.0-dev.20261028-114206
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/LICENSE +26 -18
- package/README.md +3 -0
- package/catalogs.js +3 -3
- package/chunks/AttributesTable-2eulaCqv.js +3458 -0
- package/chunks/PisGlobal-C0nd_M3S.js +94 -0
- package/chunks/ProductsDetailsHeader-q6jMjbTw.js +4430 -0
- package/chunks/carousel.es-CFCwY--2.js +1602 -0
- package/chunks/directives-KA3MkImb.js +8045 -0
- package/chunks/entry-BPatcdhP.js +9939 -0
- package/chunks/entry-D-F1wf44.js +5681 -0
- package/chunks/entry-XHBj61ID.js +2195 -0
- package/chunks/registerCustomElements-BdPLSkf_.js +426 -0
- package/classifications.js +2 -2
- package/core.js +3 -3
- package/generated/registries.json +2775 -0
- package/index.js +7 -6
- package/migration/API_V1_TO_V2_MIGRATION.md +1704 -177
- package/migration/legacy-option-rules.json +51 -6
- package/migration/v7.json +2983 -441
- package/migration/v7.schema.json +61 -2
- package/package.json +17 -8
- package/pis-csp.js +7 -7
- package/pis.js +7 -7
- package/products.js +3 -1
- package/server.js +354 -0
- package/styles/pis.css +1 -1
- package/styles/theme-abb.optimized.css +1 -1
- package/styles/theme-cux2-blue-dark.css +1 -1
- package/styles/theme-cux2-blue-dark.optimized.css +1 -1
- package/styles/theme-cux2-blue-light.css +1 -1
- package/styles/theme-cux2-blue-light.optimized.css +1 -1
- package/styles/theme-cux2-lilac-dark.css +1 -1
- package/styles/theme-cux2-lilac-dark.optimized.css +1 -1
- package/styles/theme-cux2-lilac-light.css +1 -1
- package/styles/theme-cux2-lilac-light.optimized.css +1 -1
- package/styles/theme-cux2-mono-dark.css +1 -1
- package/styles/theme-cux2-mono-dark.optimized.css +1 -1
- package/styles/theme-cux2-mono-light.css +1 -1
- package/styles/theme-cux2-mono-light.optimized.css +1 -1
- package/styles/theme-cux2-red-dark.css +1 -1
- package/styles/theme-cux2-red-dark.optimized.css +1 -1
- package/styles/theme-cux2-red-light.css +1 -1
- package/styles/theme-cux2-red-light.optimized.css +1 -1
- package/types.d.ts +779 -588
- package/catalogs.d.ts +0 -7725
- package/chunks/catalogs-domain-DJxK_B5E.js +0 -9060
- package/chunks/catalogs-domain-DJxK_B5E.js.map +0 -1
- package/chunks/classifications-domain-DdIJaF1D.js +0 -1980
- package/chunks/classifications-domain-DdIJaF1D.js.map +0 -1
- package/chunks/icons-shared-B8v5z3BE.js +0 -1387
- package/chunks/icons-shared-B8v5z3BE.js.map +0 -1
- package/chunks/products-domain-99vJaUyI.js +0 -22587
- package/chunks/products-domain-99vJaUyI.js.map +0 -1
- package/classifications.d.ts +0 -7725
- package/core.d.ts +0 -7711
- package/index.d.ts +0 -7992
- package/pis-csp.js.map +0 -1
- package/pis.js.map +0 -1
- package/products.d.ts +0 -7746
|
@@ -0,0 +1,3458 @@
|
|
|
1
|
+
import { B as e, Cn as t, H as n, Sn as r, V as i, _ as a, at as o, dn as s, dt as c, f as l, fn as u, ft as d, g as f, i as p, l as m, lt as h, n as g, ot as _, pt as v, tt as y, u as b, v as x, w as S, x as C, z as w } from "./directives-KA3MkImb.js";
|
|
2
|
+
import { c as T } from "./PisGlobal-C0nd_M3S.js";
|
|
3
|
+
import { Fragment as E, computed as D, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createSlots as ee, createTextVNode as M, createVNode as N, defineComponent as P, effectScope as te, guardReactiveProps as ne, h as re, inject as F, markRaw as ie, mergeProps as I, nextTick as L, normalizeClass as R, normalizeProps as ae, normalizeStyle as z, onActivated as oe, onBeforeUnmount as se, onDeactivated as ce, onMounted as le, onUnmounted as ue, openBlock as B, provide as V, reactive as de, ref as H, renderList as U, renderSlot as W, resolveComponent as G, resolveDirective as fe, resolveDynamicComponent as pe, shallowReactive as me, shallowRef as he, toDisplayString as K, toHandlers as ge, toValue as q, unref as J, vShow as _e, watch as Y, withCtx as X, withDirectives as Z, withModifiers as Q } from "vue";
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region src/common/components/cell-defaults/TranslatedSpan.vue
|
|
6
|
+
var ve = /* @__PURE__ */ P({
|
|
7
|
+
__name: "TranslatedSpan",
|
|
8
|
+
props: {
|
|
9
|
+
ctx: {},
|
|
10
|
+
translationKey: { default: void 0 },
|
|
11
|
+
useCommon: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !0
|
|
14
|
+
},
|
|
15
|
+
translationNamespace: { default: "products" }
|
|
16
|
+
},
|
|
17
|
+
setup(e) {
|
|
18
|
+
let t = e, n = D(() => {
|
|
19
|
+
let e = t.translationKey ?? t.ctx.col.caption;
|
|
20
|
+
if (!e) return "";
|
|
21
|
+
let n = t.ctx.t(e, t.useCommon);
|
|
22
|
+
return n === `{${t.useCommon ? "common" : t.translationNamespace}:${e}}` ? t.ctx.col.caption ?? "" : n;
|
|
23
|
+
});
|
|
24
|
+
return (e, t) => (B(), A("span", null, K(n.value), 1));
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/common/components/cell-defaults/createTranslatedSpan.ts
|
|
29
|
+
function ye(e, t) {
|
|
30
|
+
return P({
|
|
31
|
+
name: "TranslatedSpanTemplate",
|
|
32
|
+
props: { ctx: {
|
|
33
|
+
type: Object,
|
|
34
|
+
required: !0
|
|
35
|
+
} },
|
|
36
|
+
setup(n) {
|
|
37
|
+
return () => re(ve, {
|
|
38
|
+
ctx: n.ctx,
|
|
39
|
+
translationKey: e,
|
|
40
|
+
useCommon: t === "common",
|
|
41
|
+
translationNamespace: t
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/common/helpers/downloadFile.ts
|
|
48
|
+
var be = async (e, t) => {
|
|
49
|
+
if (typeof document > "u") throw Error("downloadFile requires a browser document.");
|
|
50
|
+
let n = document.createElement("a");
|
|
51
|
+
n.href = t, n.download = e, n.click(), n.remove();
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/common/api/runtime/coercePagination.ts
|
|
55
|
+
function xe(e, t) {
|
|
56
|
+
let n = e.page;
|
|
57
|
+
n !== null && (e.page = parseInt(n, 10), isNaN(e.page) && (e.page = t == null ? void 0 : t.page));
|
|
58
|
+
let r = e.pageSize;
|
|
59
|
+
r !== null && (e.pageSize = parseInt(r, 10), isNaN(e.pageSize) && (e.pageSize = t == null ? void 0 : t.pageSize));
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/common/api/runtime/ProductSelectionStore.ts
|
|
63
|
+
var Se = class {
|
|
64
|
+
constructor(e) {
|
|
65
|
+
T(this, "instance", void 0), T(this, "trackSelectionPaused", !1), T(this, "select", (e) => {
|
|
66
|
+
let t = this.instance.eventBus;
|
|
67
|
+
if (!this.data || !(e != null && e.length)) return;
|
|
68
|
+
let n = [];
|
|
69
|
+
e.forEach((e) => {
|
|
70
|
+
if (e && e.productId && !this.isSelected(e)) {
|
|
71
|
+
var t;
|
|
72
|
+
(t = this.data) == null || t.set(e.productId, e), n.push(e);
|
|
73
|
+
}
|
|
74
|
+
}), n.length && (t.emit("selection-changed", {
|
|
75
|
+
added: n,
|
|
76
|
+
removed: [],
|
|
77
|
+
selected: this.selectedItems
|
|
78
|
+
}), this.trackSelection(n, []));
|
|
79
|
+
}), T(this, "deselect", (e) => {
|
|
80
|
+
let t = this.instance.eventBus;
|
|
81
|
+
if (!this.data || !(e != null && e.length)) return;
|
|
82
|
+
let n = [];
|
|
83
|
+
e.forEach((e) => {
|
|
84
|
+
if (e && e.productId && this.isSelected(e)) {
|
|
85
|
+
var t;
|
|
86
|
+
(t = this.data) == null || t.delete(e.productId), n.push(e);
|
|
87
|
+
}
|
|
88
|
+
}), n.length && (t.emit("selection-changed", {
|
|
89
|
+
added: [],
|
|
90
|
+
removed: n,
|
|
91
|
+
selected: this.selectedItems
|
|
92
|
+
}), this.trackSelection([], n));
|
|
93
|
+
}), T(this, "toggle", (e) => {
|
|
94
|
+
this.isSelected(e) ? this.deselect([e]) : this.select([e]);
|
|
95
|
+
}), T(this, "clear", () => {
|
|
96
|
+
var e;
|
|
97
|
+
let t = this.instance.eventBus;
|
|
98
|
+
if (!this.data) return;
|
|
99
|
+
let n = this.selectedItems;
|
|
100
|
+
(e = this.data) == null || e.clear(), n.length && (t.emit("selection-changed", {
|
|
101
|
+
added: [],
|
|
102
|
+
removed: n,
|
|
103
|
+
selected: this.selectedItems
|
|
104
|
+
}), this.trackSelection([], n));
|
|
105
|
+
}), T(this, "isSelected", (e) => this.data ? this.data.has(e.productId) : !1), this.instance = e, e.store.data.selectedItems || (e.store.data.selectedItems = /* @__PURE__ */ new Map()), e.on("search-loaded", () => {
|
|
106
|
+
var t, n;
|
|
107
|
+
if (!(e.instanceType === "Products" ? (t = e.store.options.components) != null && (t = t.search) != null && (t = t.selection) != null && t.persist : (n = e.store.options.components) != null && (n = n.products) != null && (n = n.search) != null && (n = n.selection) != null && n.persist)) {
|
|
108
|
+
this.trackSelectionPaused = !0;
|
|
109
|
+
try {
|
|
110
|
+
this.clear();
|
|
111
|
+
} finally {
|
|
112
|
+
this.trackSelectionPaused = !1;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
trackSelection(e, t) {
|
|
118
|
+
this.trackSelectionPaused || r(this.instance, {
|
|
119
|
+
kind: "selection",
|
|
120
|
+
action: "selection-changed",
|
|
121
|
+
trigger: "ui",
|
|
122
|
+
args: {
|
|
123
|
+
added: e.length,
|
|
124
|
+
removed: t.length,
|
|
125
|
+
selected: this.selectedItems.length
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
get data() {
|
|
130
|
+
return this.instance.store.data.selectedItems;
|
|
131
|
+
}
|
|
132
|
+
get selectedItems() {
|
|
133
|
+
return this.data ? Array.from(this.data.values()) : [];
|
|
134
|
+
}
|
|
135
|
+
get count() {
|
|
136
|
+
return this.selectedItems.length;
|
|
137
|
+
}
|
|
138
|
+
selectAll() {
|
|
139
|
+
return new Promise((e) => {
|
|
140
|
+
var t;
|
|
141
|
+
if ((t = this.instance.store.data.products) != null && t.items) {
|
|
142
|
+
let t = this.instance.store.data.products.items;
|
|
143
|
+
this.select(t), e();
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}, Ce = ["modal-open", "pis-modal-open"], we = P({
|
|
148
|
+
props: {
|
|
149
|
+
show: {
|
|
150
|
+
type: [Boolean, Object],
|
|
151
|
+
default: void 0
|
|
152
|
+
},
|
|
153
|
+
title: {
|
|
154
|
+
type: String,
|
|
155
|
+
default: void 0
|
|
156
|
+
},
|
|
157
|
+
lg: {
|
|
158
|
+
type: Boolean,
|
|
159
|
+
default: !1
|
|
160
|
+
},
|
|
161
|
+
xl: {
|
|
162
|
+
type: Boolean,
|
|
163
|
+
default: !1
|
|
164
|
+
},
|
|
165
|
+
closeOnOuterClick: {
|
|
166
|
+
type: Boolean,
|
|
167
|
+
default: !0
|
|
168
|
+
},
|
|
169
|
+
centered: {
|
|
170
|
+
type: Boolean,
|
|
171
|
+
default: !1
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
emits: ["update:show", "resize"],
|
|
175
|
+
setup(e, { slots: t, emit: n }) {
|
|
176
|
+
let r = H(), i = H();
|
|
177
|
+
S(i, (e) => {
|
|
178
|
+
let { width: t, height: r } = e[0].contentRect;
|
|
179
|
+
n("resize", {
|
|
180
|
+
width: t,
|
|
181
|
+
height: r
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
let a = () => {
|
|
185
|
+
e.closeOnOuterClick && c();
|
|
186
|
+
}, o = () => {
|
|
187
|
+
if (typeof document > "u") return;
|
|
188
|
+
let e = window.innerWidth - document.documentElement.clientWidth;
|
|
189
|
+
document.body.classList.add(...Ce), document.body.style.overflow = "hidden", document.body.style.paddingRight = e + "px";
|
|
190
|
+
}, s = () => {
|
|
191
|
+
typeof document > "u" || (document.body.classList.remove(...Ce), document.body.style.overflow = "", document.body.style.paddingRight = "");
|
|
192
|
+
}, c = () => {
|
|
193
|
+
n("update:show", !1), l.value = !1, s();
|
|
194
|
+
}, l = H(!1);
|
|
195
|
+
return Y(() => e.show, (e) => {
|
|
196
|
+
e ? (o(), l.value = !0) : (s(), l.value = !1);
|
|
197
|
+
}, { immediate: !0 }), se(() => {
|
|
198
|
+
s();
|
|
199
|
+
}), {
|
|
200
|
+
visible: l,
|
|
201
|
+
dialog: r,
|
|
202
|
+
modalBody: i,
|
|
203
|
+
slots: t,
|
|
204
|
+
close: c,
|
|
205
|
+
clickOutside: ({ target: t }) => {
|
|
206
|
+
if (e.closeOnOuterClick) {
|
|
207
|
+
var n;
|
|
208
|
+
t !== r.value && !((n = r.value) != null && n.contains(t)) && c();
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
overlayClose: a
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
}), Te = { class: "modal-content" }, Ee = { class: "modal-header d-flex" }, De = { class: "modal-title mt-1" }, Oe = { class: "d-flex flex-fill align-items-center justify-content-end" }, ke = {
|
|
215
|
+
ref: "modalBody",
|
|
216
|
+
class: "modal-body pis-scroll"
|
|
217
|
+
}, Ae = {
|
|
218
|
+
key: 0,
|
|
219
|
+
class: "modal-footer py-2"
|
|
220
|
+
};
|
|
221
|
+
function je(e, t, n, r, i, a) {
|
|
222
|
+
return B(), A(E, null, [j("div", {
|
|
223
|
+
class: R(["modal fade", { show: e.visible }]),
|
|
224
|
+
tabindex: "-1",
|
|
225
|
+
role: "dialog",
|
|
226
|
+
style: z({ display: e.visible ? "block" : "none" }),
|
|
227
|
+
onClick: t[1] || (t[1] = (...t) => e.clickOutside && e.clickOutside(...t))
|
|
228
|
+
}, [j("div", {
|
|
229
|
+
ref: "dialog",
|
|
230
|
+
class: R(["modal-dialog modal-fullscreen-md-down", [
|
|
231
|
+
e.lg && "modal-lg modal-fullscreen-md-down modal-fullscreen-sm-down modal-fullscreen-lg-down ",
|
|
232
|
+
e.xl && "modal-xl modal-fullscreen-lg-down modal-fullscreen-md-down modal-fullscreen-sm-down",
|
|
233
|
+
e.centered && "modal-dialog-centered"
|
|
234
|
+
]]),
|
|
235
|
+
role: "document"
|
|
236
|
+
}, [j("div", Te, [
|
|
237
|
+
j("div", Ee, [j("h5", De, K(e.title), 1), j("div", Oe, [W(e.$slots, "header-actions"), j("button", {
|
|
238
|
+
type: "button",
|
|
239
|
+
class: "btn-close ms-3",
|
|
240
|
+
"aria-label": "Close",
|
|
241
|
+
onClick: t[0] || (t[0] = Q((...t) => e.close && e.close(...t), ["prevent"]))
|
|
242
|
+
})])]),
|
|
243
|
+
j("div", ke, [W(e.$slots, "default")], 512),
|
|
244
|
+
e.slots.footer ? (B(), A("div", Ae, [W(e.$slots, "footer")])) : k("", !0)
|
|
245
|
+
])], 2)], 6), e.visible ? (B(), A("div", {
|
|
246
|
+
key: 0,
|
|
247
|
+
class: "modal-backdrop fade show",
|
|
248
|
+
onClick: t[2] || (t[2] = (...t) => e.overlayClose && e.overlayClose(...t))
|
|
249
|
+
})) : k("", !0)], 64);
|
|
250
|
+
}
|
|
251
|
+
var Me = /*#__PURE__*/ x(we, [["render", je]]), Ne = P({
|
|
252
|
+
components: { Icon: f },
|
|
253
|
+
props: {
|
|
254
|
+
dir: {
|
|
255
|
+
type: String,
|
|
256
|
+
default: "right"
|
|
257
|
+
},
|
|
258
|
+
size: {
|
|
259
|
+
type: Number,
|
|
260
|
+
default: 16
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
setup: (e) => ({ angle: D(() => {
|
|
264
|
+
switch (e.dir) {
|
|
265
|
+
case "down": return 90;
|
|
266
|
+
case "left": return 180;
|
|
267
|
+
case "up": return 270;
|
|
268
|
+
default: return 0;
|
|
269
|
+
}
|
|
270
|
+
}) })
|
|
271
|
+
});
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/common/components/Arrow.vue
|
|
274
|
+
function Pe(e, t, n, r, i, a) {
|
|
275
|
+
let o = G("Icon");
|
|
276
|
+
return B(), O(o, {
|
|
277
|
+
name: "chevron-right-reduced",
|
|
278
|
+
size: e.size,
|
|
279
|
+
style: z({ transform: `rotate(${e.angle}deg)` })
|
|
280
|
+
}, null, 8, ["size", "style"]);
|
|
281
|
+
}
|
|
282
|
+
var Fe = /*#__PURE__*/ x(Ne, [["render", Pe]]), Ie = P({
|
|
283
|
+
components: {
|
|
284
|
+
Arrow: Fe,
|
|
285
|
+
Clickable: a
|
|
286
|
+
},
|
|
287
|
+
props: {
|
|
288
|
+
total: {
|
|
289
|
+
type: Number,
|
|
290
|
+
default: 1
|
|
291
|
+
},
|
|
292
|
+
current: {
|
|
293
|
+
type: Number,
|
|
294
|
+
default: 1
|
|
295
|
+
},
|
|
296
|
+
trimTo: {
|
|
297
|
+
type: Number,
|
|
298
|
+
default: 5
|
|
299
|
+
},
|
|
300
|
+
narrowThan: {
|
|
301
|
+
type: Function,
|
|
302
|
+
default: void 0
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
emits: ["change"],
|
|
306
|
+
setup(e, { emit: t }) {
|
|
307
|
+
let n = D(() => {
|
|
308
|
+
let t = e.trimTo;
|
|
309
|
+
return e.narrowThan && (e.narrowThan("sm") ? t = Math.min(t, 1) : e.narrowThan("md") && (t = Math.min(t, 3))), t;
|
|
310
|
+
}), r = D(() => Math.floor(n.value / 2)), i = D(() => {
|
|
311
|
+
let { current: t } = e;
|
|
312
|
+
return t >= n.value ? t - r.value : 1;
|
|
313
|
+
}), a = D(() => {
|
|
314
|
+
let { total: t, current: i } = e, a = n.value;
|
|
315
|
+
return t < a || i > t - a ? t : i >= a ? i + r.value : a;
|
|
316
|
+
});
|
|
317
|
+
return {
|
|
318
|
+
threshold: r,
|
|
319
|
+
start: i,
|
|
320
|
+
end: a,
|
|
321
|
+
pagesToDisplay: D(() => [...Array(a.value - i.value + 1)].map((e, t) => i.value + t)),
|
|
322
|
+
goTo: (e) => t("change", e)
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
}), Le = { class: "pagination" }, Re = {
|
|
326
|
+
key: 0,
|
|
327
|
+
class: "page-item"
|
|
328
|
+
}, ze = { class: "page-item" }, Be = { class: "page-item" }, Ve = {
|
|
329
|
+
key: 3,
|
|
330
|
+
class: "page-item"
|
|
331
|
+
};
|
|
332
|
+
function He(e, t, n, r, i, a) {
|
|
333
|
+
let o = G("Arrow"), s = G("Clickable");
|
|
334
|
+
return B(), A("ul", Le, [
|
|
335
|
+
e.current > 1 ? (B(), A("li", Re, [N(s, {
|
|
336
|
+
class: "page-link",
|
|
337
|
+
onClick: t[0] || (t[0] = (t) => e.goTo(e.current - 1))
|
|
338
|
+
}, {
|
|
339
|
+
default: X(() => [N(o, { dir: "left" })]),
|
|
340
|
+
_: 1
|
|
341
|
+
})])) : k("", !0),
|
|
342
|
+
e.start === 1 ? k("", !0) : (B(), A(E, { key: 1 }, [j("li", ze, [N(s, {
|
|
343
|
+
class: "page-link",
|
|
344
|
+
title: "First",
|
|
345
|
+
"aria-label": "First",
|
|
346
|
+
onClick: t[1] || (t[1] = (t) => e.goTo(1))
|
|
347
|
+
}, {
|
|
348
|
+
default: X(() => [...t[4] || (t[4] = [M("1", -1)])]),
|
|
349
|
+
_: 1
|
|
350
|
+
})]), t[5] || (t[5] = j("li", { class: "page-item px-3" }, "...", -1))], 64)),
|
|
351
|
+
(B(!0), A(E, null, U(e.pagesToDisplay, (t) => (B(), A("li", {
|
|
352
|
+
key: t,
|
|
353
|
+
class: R(["page-item", [t === e.current && "active"]])
|
|
354
|
+
}, [N(s, {
|
|
355
|
+
class: "page-link",
|
|
356
|
+
onClick: (n) => e.goTo(t)
|
|
357
|
+
}, {
|
|
358
|
+
default: X(() => [M(K(t), 1)]),
|
|
359
|
+
_: 2
|
|
360
|
+
}, 1032, ["onClick"])], 2))), 128)),
|
|
361
|
+
e.current < e.total - e.trimTo + 1 ? (B(), A(E, { key: 2 }, [t[6] || (t[6] = j("li", { class: "page-item px-3" }, "...", -1)), j("li", Be, [N(s, {
|
|
362
|
+
class: "page-link",
|
|
363
|
+
title: "Last",
|
|
364
|
+
"aria-label": "Last",
|
|
365
|
+
onClick: t[2] || (t[2] = (t) => e.goTo(e.total))
|
|
366
|
+
}, {
|
|
367
|
+
default: X(() => [M(K(e.total), 1)]),
|
|
368
|
+
_: 1
|
|
369
|
+
})])], 64)) : k("", !0),
|
|
370
|
+
e.current < e.total ? (B(), A("li", Ve, [N(s, {
|
|
371
|
+
class: "page-link",
|
|
372
|
+
title: "Next",
|
|
373
|
+
"aria-label": "Next",
|
|
374
|
+
onClick: t[3] || (t[3] = (t) => e.goTo(e.current + 1))
|
|
375
|
+
}, {
|
|
376
|
+
default: X(() => [N(o)]),
|
|
377
|
+
_: 1
|
|
378
|
+
})])) : k("", !0)
|
|
379
|
+
]);
|
|
380
|
+
}
|
|
381
|
+
var Ue = /*#__PURE__*/ x(Ie, [["render", He]]), We = P({
|
|
382
|
+
components: {
|
|
383
|
+
Icon: f,
|
|
384
|
+
Arrow: Fe,
|
|
385
|
+
Clickable: a
|
|
386
|
+
},
|
|
387
|
+
props: {
|
|
388
|
+
icon: {
|
|
389
|
+
type: [String, Boolean],
|
|
390
|
+
default: void 0
|
|
391
|
+
},
|
|
392
|
+
header: {
|
|
393
|
+
type: String,
|
|
394
|
+
default: void 0
|
|
395
|
+
},
|
|
396
|
+
horizontal: Boolean,
|
|
397
|
+
stickyFooter: Boolean,
|
|
398
|
+
useMarkup: {
|
|
399
|
+
type: Boolean,
|
|
400
|
+
default: !0
|
|
401
|
+
},
|
|
402
|
+
collapsed: {
|
|
403
|
+
type: Boolean,
|
|
404
|
+
default: !1
|
|
405
|
+
},
|
|
406
|
+
transparent: {
|
|
407
|
+
type: Boolean,
|
|
408
|
+
default: !1
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
setup(e) {
|
|
412
|
+
let t = H(!e.collapsed);
|
|
413
|
+
return {
|
|
414
|
+
isOpen: t,
|
|
415
|
+
toggle: () => t.value = !t.value
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
}), Ge = { key: 1 }, Ke = { class: "position-relative my-2" };
|
|
419
|
+
function qe(e, t, n, r, i, a) {
|
|
420
|
+
let o = G("Icon"), s = G("Arrow"), c = G("Clickable");
|
|
421
|
+
return B(), A("div", { class: R([e.useMarkup && "card", e.useMarkup && e.transparent && "pis-card-transparent bg-transparent border-0 shadow-none"]) }, [e.useMarkup && (e.header || e.icon) ? (B(), O(c, {
|
|
422
|
+
key: 0,
|
|
423
|
+
class: R(["card-header d-flex align-items-center user-select-none", [e.transparent ? "bg-transparent border-0 shadow-none" : "bg-light", !e.isOpen && "border-bottom-0"]]),
|
|
424
|
+
onClick: e.toggle
|
|
425
|
+
}, {
|
|
426
|
+
default: X(() => [
|
|
427
|
+
e.icon ? (B(), O(o, {
|
|
428
|
+
key: 0,
|
|
429
|
+
name: e.icon,
|
|
430
|
+
class: "me-2"
|
|
431
|
+
}, null, 8, ["name"])) : k("", !0),
|
|
432
|
+
e.header ? (B(), A("strong", Ge, K(e.header), 1)) : k("", !0),
|
|
433
|
+
N(s, {
|
|
434
|
+
class: "d-flex align-items-center ms-auto",
|
|
435
|
+
size: 24,
|
|
436
|
+
dir: e.isOpen ? "up" : "down"
|
|
437
|
+
}, null, 8, ["dir"])
|
|
438
|
+
]),
|
|
439
|
+
_: 1
|
|
440
|
+
}, 8, ["class", "onClick"])) : k("", !0), Z(j("div", Ke, [
|
|
441
|
+
e.$slots.default ? (B(), A("div", {
|
|
442
|
+
key: 0,
|
|
443
|
+
class: R([e.useMarkup && "card-body", e.$slots.footer && "pb-0"])
|
|
444
|
+
}, [W(e.$slots, "default")], 2)) : k("", !0),
|
|
445
|
+
W(e.$slots, "list"),
|
|
446
|
+
e.$slots.footer ? (B(), A("div", {
|
|
447
|
+
key: 1,
|
|
448
|
+
class: R([
|
|
449
|
+
e.useMarkup && "card-body",
|
|
450
|
+
e.useMarkup && e.stickyFooter && "position-sticky bottom-0",
|
|
451
|
+
e.useMarkup && e.stickyFooter && (e.transparent ? "bg-transparent" : "bg-body")
|
|
452
|
+
])
|
|
453
|
+
}, [W(e.$slots, "footer")], 2)) : k("", !0)
|
|
454
|
+
], 512), [[_e, e.isOpen]])], 2);
|
|
455
|
+
}
|
|
456
|
+
var Je = /*#__PURE__*/ x(We, [["render", qe]]);
|
|
457
|
+
//#endregion
|
|
458
|
+
//#region ../../node_modules/.pnpm/mitt@2.1.0/node_modules/mitt/dist/mitt.es.js
|
|
459
|
+
function Ye(e) {
|
|
460
|
+
return {
|
|
461
|
+
all: e = e || /* @__PURE__ */ new Map(),
|
|
462
|
+
on: function(t, n) {
|
|
463
|
+
var r = e.get(t);
|
|
464
|
+
r && r.push(n) || e.set(t, [n]);
|
|
465
|
+
},
|
|
466
|
+
off: function(t, n) {
|
|
467
|
+
var r = e.get(t);
|
|
468
|
+
r && r.splice(r.indexOf(n) >>> 0, 1);
|
|
469
|
+
},
|
|
470
|
+
emit: function(t, n) {
|
|
471
|
+
(e.get(t) || []).slice().map(function(e) {
|
|
472
|
+
e(n);
|
|
473
|
+
}), (e.get("*") || []).slice().map(function(e) {
|
|
474
|
+
e(t, n);
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region ../../node_modules/.pnpm/vue-virtual-scroller@2.0.1_vue@3.5.40_typescript@6.0.3_/node_modules/vue-virtual-scroller/dist/vue-virtual-scroller.js
|
|
481
|
+
function Xe(e, t, n) {
|
|
482
|
+
if (!n) return t;
|
|
483
|
+
let r = e == null ? void 0 : e[n];
|
|
484
|
+
if (r == null) throw Error(`Key is ${r} on item (keyField is '${n}')`);
|
|
485
|
+
return r;
|
|
486
|
+
}
|
|
487
|
+
function Ze(e, t) {
|
|
488
|
+
return e.map((e, n) => Xe(e, n, t));
|
|
489
|
+
}
|
|
490
|
+
function Qe(e, t, n) {
|
|
491
|
+
let r = [], i = [];
|
|
492
|
+
for (let a = 0; a < e.length; a++) {
|
|
493
|
+
let o = e[a], s = Xe(o, a, t), c = n(o, a, s);
|
|
494
|
+
r.push(s), i.push(typeof c == "number" && c > 0 ? c : null);
|
|
495
|
+
}
|
|
496
|
+
return {
|
|
497
|
+
keys: r,
|
|
498
|
+
sizes: i
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
function $e(e, t, n) {
|
|
502
|
+
if (!e || e.keys.length !== t.length || e.sizes.length !== t.length) return !1;
|
|
503
|
+
for (let r = 0; r < t.length; r++) if (e.keys[r] !== Xe(t[r], r, n)) return !1;
|
|
504
|
+
return !0;
|
|
505
|
+
}
|
|
506
|
+
function et(e, t, n) {
|
|
507
|
+
if (!$e(e, t, n)) return {};
|
|
508
|
+
let r = {};
|
|
509
|
+
for (let t = 0; t < e.keys.length; t++) {
|
|
510
|
+
let n = e.sizes[t];
|
|
511
|
+
typeof n == "number" && n > 0 && (r[e.keys[t]] = n);
|
|
512
|
+
}
|
|
513
|
+
return r;
|
|
514
|
+
}
|
|
515
|
+
function tt(e, t) {
|
|
516
|
+
if (!e.length || t.length <= e.length) return 0;
|
|
517
|
+
let n = e[0], r = t.indexOf(n);
|
|
518
|
+
if (r <= 0 || r + e.length < t.length && e.length > t.length - r) return 0;
|
|
519
|
+
for (let n = 0; n < e.length; n++) if (t[r + n] !== e[n]) return 0;
|
|
520
|
+
return r;
|
|
521
|
+
}
|
|
522
|
+
function nt(e, t, n, r, i, a = 0) {
|
|
523
|
+
let o = i ?? "start";
|
|
524
|
+
if (o === "nearest") {
|
|
525
|
+
let i = n + r, o = e + t;
|
|
526
|
+
return e >= n && o <= i ? null : e < n ? e + a : o - r + a;
|
|
527
|
+
}
|
|
528
|
+
return o === "end" ? e + t - r + a : o === "center" ? e + (t - r) / 2 + a : e + a;
|
|
529
|
+
}
|
|
530
|
+
function rt(e, t, n, r) {
|
|
531
|
+
let i = null, a = null, o = null, s = !1, c = null, l = [], u = n.resizeObserver ? () => {} : n.onVscrollUpdate(g), d = D(() => {
|
|
532
|
+
let t = q(e);
|
|
533
|
+
if (n.vscrollData.simpleArray) {
|
|
534
|
+
if (t.index == null) throw Error("index is required when using simple-array mode with dynamic item measurement");
|
|
535
|
+
return t.index;
|
|
536
|
+
}
|
|
537
|
+
if (n.vscrollData.keyField in t.item) return t.item[n.vscrollData.keyField];
|
|
538
|
+
throw Error(`keyField '${n.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`);
|
|
539
|
+
}), f = D(() => n.vscrollData.sizes[d.value] || 0), p = D(() => q(e).active && n.vscrollData.active);
|
|
540
|
+
function m() {
|
|
541
|
+
p.value ? a !== d.value && (a = d.value, i = null, o = null, b(d.value)) : i = d.value;
|
|
542
|
+
}
|
|
543
|
+
function h() {
|
|
544
|
+
q(e).watchData && !n.resizeObserver ? c = Y(() => q(e).item, () => {
|
|
545
|
+
_();
|
|
546
|
+
}, { deep: !0 }) : c && (c(), c = null);
|
|
547
|
+
}
|
|
548
|
+
function g({ force: e }) {
|
|
549
|
+
!p.value && e && (o = d.value), (i === d.value || e || !f.value) && m();
|
|
550
|
+
}
|
|
551
|
+
function _() {
|
|
552
|
+
m();
|
|
553
|
+
}
|
|
554
|
+
function v(e) {
|
|
555
|
+
n.undefinedMap[e] && n.undefinedSizeCount.value--, n.undefinedMap[e] = void 0;
|
|
556
|
+
}
|
|
557
|
+
function y(e, t) {
|
|
558
|
+
if (n.vscrollData.sizes[e]) {
|
|
559
|
+
v(e);
|
|
560
|
+
return;
|
|
561
|
+
}
|
|
562
|
+
if (t) {
|
|
563
|
+
n.undefinedMap[e] || n.undefinedSizeCount.value++, n.undefinedMap[e] = !0;
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
n.undefinedMap[e] && (n.undefinedSizeCount.value--, n.undefinedMap[e] = !1);
|
|
567
|
+
}
|
|
568
|
+
function b(e) {
|
|
569
|
+
L(() => {
|
|
570
|
+
if (d.value === e) {
|
|
571
|
+
let e = q(t);
|
|
572
|
+
if (!e) return;
|
|
573
|
+
let n = e.offsetWidth, r = e.offsetHeight;
|
|
574
|
+
x(n, r);
|
|
575
|
+
}
|
|
576
|
+
a = null;
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
function x(e, t) {
|
|
580
|
+
let r = ~~(n.direction.value === "vertical" ? t : e);
|
|
581
|
+
r && f.value !== r && S(r);
|
|
582
|
+
}
|
|
583
|
+
function S(t) {
|
|
584
|
+
var i, a;
|
|
585
|
+
v(d.value), n.vscrollData.sizes[d.value] = t, q(e).emitResize && ((a = (i = q(r)) == null ? void 0 : i.onResize) == null || a.call(i, d.value));
|
|
586
|
+
}
|
|
587
|
+
function C() {
|
|
588
|
+
if (!n.resizeObserver || s) return;
|
|
589
|
+
let e = q(t);
|
|
590
|
+
e && (n.resizeObserver.observe(e), e.$_vs_id = d.value, e.$_vs_onResize = T, s = !0);
|
|
591
|
+
}
|
|
592
|
+
function w() {
|
|
593
|
+
if (!n.resizeObserver || !s) return;
|
|
594
|
+
let e = q(t);
|
|
595
|
+
e && (n.resizeObserver.unobserve(e), e.$_vs_onResize = void 0, s = !1);
|
|
596
|
+
}
|
|
597
|
+
function T(e, t, n) {
|
|
598
|
+
d.value === e && x(t, n);
|
|
599
|
+
}
|
|
600
|
+
l.push(Y(() => q(e).watchData, () => {
|
|
601
|
+
h();
|
|
602
|
+
})), n.resizeObserver || l.push(Y(() => q(e).sizeDependencies, () => {
|
|
603
|
+
_();
|
|
604
|
+
}, { deep: !0 })), l.push(Y(d, (e, r) => {
|
|
605
|
+
let a = q(t);
|
|
606
|
+
a && (a.$_vs_id = e), v(r), y(e, p.value);
|
|
607
|
+
let o = n.vscrollData.sizes[e];
|
|
608
|
+
if (!o) {
|
|
609
|
+
i = e, _();
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
v(e), s && (n.vscrollData.sizes[e] = o);
|
|
613
|
+
})), l.push(Y(p, (e) => {
|
|
614
|
+
y(d.value, e), n.resizeObserver ? e ? C() : w() : e && o === d.value && m();
|
|
615
|
+
})), h();
|
|
616
|
+
function E() {
|
|
617
|
+
p.value && (m(), C());
|
|
618
|
+
}
|
|
619
|
+
function O() {
|
|
620
|
+
u(), w(), v(d.value);
|
|
621
|
+
let e = q(t);
|
|
622
|
+
e && (e.$_vs_id = void 0, e.$_vs_onResize = void 0), c && (c(), c = null);
|
|
623
|
+
for (let e of l) e();
|
|
624
|
+
l.length = 0;
|
|
625
|
+
}
|
|
626
|
+
return {
|
|
627
|
+
id: d,
|
|
628
|
+
size: f,
|
|
629
|
+
finalActive: p,
|
|
630
|
+
updateSize: m,
|
|
631
|
+
mount: E,
|
|
632
|
+
unmount: O
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
var it = { itemsLimit: 1e3 };
|
|
636
|
+
function at(e) {
|
|
637
|
+
return typeof window < "u" && e === window;
|
|
638
|
+
}
|
|
639
|
+
var ot = (() => {
|
|
640
|
+
if (typeof document > "u") return "negative";
|
|
641
|
+
let e = document.createElement("div"), t = document.createElement("div");
|
|
642
|
+
e.style.width = "4px", e.style.height = "1px", e.style.overflow = "auto", e.style.direction = "rtl", t.style.width = "8px", t.style.height = "1px", e.appendChild(t), document.body.appendChild(e), e.scrollLeft = -1;
|
|
643
|
+
let n = e.scrollLeft < 0;
|
|
644
|
+
return document.body.removeChild(e), n ? "negative" : "default";
|
|
645
|
+
})();
|
|
646
|
+
function st(e, t, n) {
|
|
647
|
+
return t !== "horizontal" || !n || at(n) || getComputedStyle(n).direction !== "rtl" ? e : ot === "negative" ? -e : e;
|
|
648
|
+
}
|
|
649
|
+
function ct(e, t, n) {
|
|
650
|
+
return st(e, t, n);
|
|
651
|
+
}
|
|
652
|
+
function lt(e, t, n, r) {
|
|
653
|
+
let i = ct(n, t, e), a = !!(r != null && r.smooth);
|
|
654
|
+
if (at(e)) {
|
|
655
|
+
t === "vertical" ? e.scrollTo({
|
|
656
|
+
top: i,
|
|
657
|
+
behavior: a ? "smooth" : "auto"
|
|
658
|
+
}) : e.scrollTo({
|
|
659
|
+
left: i,
|
|
660
|
+
behavior: a ? "smooth" : "auto"
|
|
661
|
+
});
|
|
662
|
+
return;
|
|
663
|
+
}
|
|
664
|
+
if (typeof e.scrollTo == "function") {
|
|
665
|
+
e.scrollTo(t === "vertical" ? {
|
|
666
|
+
top: i,
|
|
667
|
+
behavior: a ? "smooth" : "auto"
|
|
668
|
+
} : {
|
|
669
|
+
left: i,
|
|
670
|
+
behavior: a ? "smooth" : "auto"
|
|
671
|
+
});
|
|
672
|
+
return;
|
|
673
|
+
}
|
|
674
|
+
t === "vertical" ? e.scrollTop = i : e.scrollLeft = i;
|
|
675
|
+
}
|
|
676
|
+
function ut(e, t, n) {
|
|
677
|
+
return n ? t === "vertical" ? window.innerHeight : window.innerWidth : t === "vertical" ? e.clientHeight : e.clientWidth;
|
|
678
|
+
}
|
|
679
|
+
var dt = /auto|scroll/;
|
|
680
|
+
function ft(e, t) {
|
|
681
|
+
return e.parentNode === null ? t : ft(e.parentNode, [...t, e]);
|
|
682
|
+
}
|
|
683
|
+
function pt(e, t) {
|
|
684
|
+
return getComputedStyle(e, null).getPropertyValue(t);
|
|
685
|
+
}
|
|
686
|
+
function mt(e) {
|
|
687
|
+
return pt(e, "overflow") + pt(e, "overflow-y") + pt(e, "overflow-x");
|
|
688
|
+
}
|
|
689
|
+
function ht(e) {
|
|
690
|
+
return dt.test(mt(e));
|
|
691
|
+
}
|
|
692
|
+
function gt(e) {
|
|
693
|
+
if (!(e instanceof HTMLElement || e instanceof SVGElement)) return;
|
|
694
|
+
let t = ft(e.parentNode, []);
|
|
695
|
+
for (let e = 0; e < t.length; e += 1) if (t[e] instanceof Element && ht(t[e])) return t[e];
|
|
696
|
+
return document.scrollingElement || document.documentElement;
|
|
697
|
+
}
|
|
698
|
+
var _t = !1;
|
|
699
|
+
function vt() {
|
|
700
|
+
return _t;
|
|
701
|
+
}
|
|
702
|
+
if (typeof window < "u") {
|
|
703
|
+
_t = !1;
|
|
704
|
+
try {
|
|
705
|
+
let e = Object.defineProperty({}, "passive", { get() {
|
|
706
|
+
_t = !0;
|
|
707
|
+
} });
|
|
708
|
+
window.addEventListener("test", null, e);
|
|
709
|
+
} catch {}
|
|
710
|
+
}
|
|
711
|
+
var yt = 0;
|
|
712
|
+
function bt(e) {
|
|
713
|
+
let t = e;
|
|
714
|
+
t._vs_styleStamp++;
|
|
715
|
+
}
|
|
716
|
+
function xt(e, t, n) {
|
|
717
|
+
let r = e == null ? void 0 : e[n];
|
|
718
|
+
if (r == null) throw Error(`Key is ${r} on item (keyField is '${n}')`);
|
|
719
|
+
return r;
|
|
720
|
+
}
|
|
721
|
+
function St(e, t, n, r, i) {
|
|
722
|
+
let a = H([]), o = H(0), s = H(!1), c = 0, l = 0, u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), f = !1, p = 0, m = 0, h = !1, g = null, _ = null, v = null, y = 0, b = null, x = [], S = null, C = null, w = null, T = !1, E = /* @__PURE__ */ new Set(), O = H({}), k = D(() => {
|
|
723
|
+
let t = q(e);
|
|
724
|
+
return t.items.length > 0 && typeof t.items[0] != "object";
|
|
725
|
+
}), A = D(() => {
|
|
726
|
+
let t = q(e);
|
|
727
|
+
if (t.itemSize === null) {
|
|
728
|
+
let e = { [-1]: { accumulator: 0 } }, n = t.items, r = t.sizeField ?? "size", i = t.minItemSize, a = O.value, o = 1e4, s = 0, c;
|
|
729
|
+
for (let l = 0, u = n.length; l < u; l++) c = a[k.value ? l : xt(n[l], l, t.keyField)] || n[l][r] || i, c < o && (o = c), s += c, e[l] = {
|
|
730
|
+
accumulator: s,
|
|
731
|
+
size: c
|
|
732
|
+
};
|
|
733
|
+
return y = o, e;
|
|
734
|
+
}
|
|
735
|
+
return [];
|
|
736
|
+
}), j = D(() => a.value.filter((e) => e.nr.used).sort((e, t) => e.nr.index - t.nr.index)), ee = D(() => {
|
|
737
|
+
let t = q(e), n = k.value ? null : t.keyField;
|
|
738
|
+
return Qe(t.items, n, (e, n, r) => t.itemSize == null ? O.value[r] || (e == null ? void 0 : e[t.sizeField ?? "size"]) || void 0 : t.itemSize);
|
|
739
|
+
});
|
|
740
|
+
function M(t) {
|
|
741
|
+
let n = q(e);
|
|
742
|
+
return O.value = et(t, n.items, k.value ? null : n.keyField), Object.keys(O.value).length > 0;
|
|
743
|
+
}
|
|
744
|
+
function N(e) {
|
|
745
|
+
let t = d.get(e);
|
|
746
|
+
return t || (t = [], d.set(e, t)), t;
|
|
747
|
+
}
|
|
748
|
+
function P(e, t, n, r, i) {
|
|
749
|
+
let a = ie({
|
|
750
|
+
id: yt++,
|
|
751
|
+
index: t,
|
|
752
|
+
used: !0,
|
|
753
|
+
key: r,
|
|
754
|
+
type: i
|
|
755
|
+
}), o = me({
|
|
756
|
+
item: n,
|
|
757
|
+
position: 0,
|
|
758
|
+
offset: 0,
|
|
759
|
+
nr: a,
|
|
760
|
+
_vs_styleStamp: 0
|
|
761
|
+
});
|
|
762
|
+
return e.push(o), o;
|
|
763
|
+
}
|
|
764
|
+
function te(e) {
|
|
765
|
+
let t = N(e);
|
|
766
|
+
if (t && t.length) {
|
|
767
|
+
let e = t.pop();
|
|
768
|
+
return e.nr.used = !0, bt(e), e;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
function ne(e) {
|
|
772
|
+
let t = e.nr.type;
|
|
773
|
+
N(t).push(e), e.nr.used = !1, e.position = -9999, bt(e), u.delete(e.nr.key);
|
|
774
|
+
}
|
|
775
|
+
function re() {
|
|
776
|
+
u.clear(), d.clear();
|
|
777
|
+
for (let e = 0, t = a.value.length; e < t; e++) {
|
|
778
|
+
let t = a.value[e];
|
|
779
|
+
t && ne(t);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
function F(e) {
|
|
783
|
+
let t = -1;
|
|
784
|
+
return t = requestAnimationFrame(() => {
|
|
785
|
+
E.delete(t), e();
|
|
786
|
+
}), E.add(t), t;
|
|
787
|
+
}
|
|
788
|
+
function I() {
|
|
789
|
+
for (let e of E) cancelAnimationFrame(e);
|
|
790
|
+
E.clear();
|
|
791
|
+
}
|
|
792
|
+
function R() {
|
|
793
|
+
g && (clearTimeout(g), g = null), _ && (clearTimeout(_), _ = null), v && (clearTimeout(v), v = null), C && (clearTimeout(C), C = null), w && (clearTimeout(w), w = null);
|
|
794
|
+
}
|
|
795
|
+
function ae() {
|
|
796
|
+
var e;
|
|
797
|
+
(e = i == null ? void 0 : i.onResize) == null || e.call(i), s.value && Q(!1);
|
|
798
|
+
}
|
|
799
|
+
function z() {
|
|
800
|
+
S && !T && fe();
|
|
801
|
+
let t = q(e);
|
|
802
|
+
if (!f) {
|
|
803
|
+
if (f = !0, g) return;
|
|
804
|
+
let e = () => F(() => {
|
|
805
|
+
f = !1;
|
|
806
|
+
let { continuous: e } = Q(!1, !0);
|
|
807
|
+
e || (_ && clearTimeout(_), _ = setTimeout(z, t.updateInterval + 100));
|
|
808
|
+
});
|
|
809
|
+
e(), t.updateInterval && (g = setTimeout(() => {
|
|
810
|
+
g = null, f && e();
|
|
811
|
+
}, t.updateInterval));
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
function ce(e, t) {
|
|
815
|
+
var n, r;
|
|
816
|
+
s.value && (e || t.boundingClientRect.width !== 0 || t.boundingClientRect.height !== 0 ? ((n = i == null ? void 0 : i.onVisible) == null || n.call(i), F(() => {
|
|
817
|
+
Q(!1);
|
|
818
|
+
})) : (r = i == null ? void 0 : i.onHidden) == null || r.call(i));
|
|
819
|
+
}
|
|
820
|
+
function ue() {
|
|
821
|
+
let e = q(t), n = e ? gt(e) : void 0;
|
|
822
|
+
return window.document && (n === window.document.documentElement || n === window.document.body) ? window : n || window;
|
|
823
|
+
}
|
|
824
|
+
function B() {
|
|
825
|
+
let t = q(n);
|
|
826
|
+
return t ? q(e).direction === "vertical" ? t.scrollHeight : t.scrollWidth : 0;
|
|
827
|
+
}
|
|
828
|
+
function V() {
|
|
829
|
+
let n = q(t);
|
|
830
|
+
if (!n) return {
|
|
831
|
+
start: 0,
|
|
832
|
+
end: 0
|
|
833
|
+
};
|
|
834
|
+
let r = q(e), i = r.direction === "vertical", a;
|
|
835
|
+
if (r.pageMode) {
|
|
836
|
+
let e = n.getBoundingClientRect(), t = i ? e.height : e.width, r = -(i ? e.top : e.left), o = i ? window.innerHeight : window.innerWidth;
|
|
837
|
+
r < 0 && (o += r, r = 0), r + o > t && (o = t - r), a = {
|
|
838
|
+
start: r,
|
|
839
|
+
end: r + o
|
|
840
|
+
};
|
|
841
|
+
} else a = i ? {
|
|
842
|
+
start: n.scrollTop,
|
|
843
|
+
end: n.scrollTop + n.clientHeight
|
|
844
|
+
} : {
|
|
845
|
+
start: st(n.scrollLeft, r.direction, n),
|
|
846
|
+
end: st(n.scrollLeft, r.direction, n) + n.clientWidth
|
|
847
|
+
};
|
|
848
|
+
return a;
|
|
849
|
+
}
|
|
850
|
+
function de() {
|
|
851
|
+
let n = q(t);
|
|
852
|
+
if (!n) return {
|
|
853
|
+
start: 0,
|
|
854
|
+
end: 0
|
|
855
|
+
};
|
|
856
|
+
if (q(e).direction === "vertical") {
|
|
857
|
+
let e = st(n.scrollLeft, "horizontal", n);
|
|
858
|
+
return {
|
|
859
|
+
start: e,
|
|
860
|
+
end: e + n.clientWidth
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
return {
|
|
864
|
+
start: n.scrollTop,
|
|
865
|
+
end: n.scrollTop + n.clientHeight
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
function U(t) {
|
|
869
|
+
let n = q(e);
|
|
870
|
+
if (n.itemSize != null) return n.itemSize;
|
|
871
|
+
let r = A.value[t];
|
|
872
|
+
return (r == null ? void 0 : r.size) || Number(n.minItemSize) || 0;
|
|
873
|
+
}
|
|
874
|
+
function W(t) {
|
|
875
|
+
var n;
|
|
876
|
+
let r = q(e), i = r.gridItems || 1;
|
|
877
|
+
return t <= 0 ? 0 : r.itemSize == null ? ((n = A.value[t - 1]) == null ? void 0 : n.accumulator) || 0 : Math.floor(t / i) * r.itemSize;
|
|
878
|
+
}
|
|
879
|
+
function G(t) {
|
|
880
|
+
let n = q(e), r = n.items.length, i = n.gridItems || 1;
|
|
881
|
+
if (!r) return 0;
|
|
882
|
+
if (n.itemSize != null) {
|
|
883
|
+
let e = Math.floor(t / n.itemSize) * i;
|
|
884
|
+
return Math.min(Math.max(e, 0), r - 1);
|
|
885
|
+
}
|
|
886
|
+
let a = 0, o = r - 1, s = 0;
|
|
887
|
+
for (; a <= o;) {
|
|
888
|
+
let e = Math.floor((a + o) / 2);
|
|
889
|
+
W(e) <= t ? (s = e, a = e + 1) : o = e - 1;
|
|
890
|
+
}
|
|
891
|
+
return s;
|
|
892
|
+
}
|
|
893
|
+
function fe() {
|
|
894
|
+
C && (clearTimeout(C), C = null), S = null;
|
|
895
|
+
}
|
|
896
|
+
function pe() {
|
|
897
|
+
C && clearTimeout(C), C = setTimeout(() => {
|
|
898
|
+
S = null, C = null;
|
|
899
|
+
}, 150);
|
|
900
|
+
}
|
|
901
|
+
function he(e, t) {
|
|
902
|
+
if (!e.length) {
|
|
903
|
+
fe();
|
|
904
|
+
return;
|
|
905
|
+
}
|
|
906
|
+
let n = Math.max(V().start - B(), 0), r = Math.min(G(n), e.length - 1), i = e[r], a = t ? i == null ? void 0 : i[t] : r;
|
|
907
|
+
if (a == null) {
|
|
908
|
+
fe();
|
|
909
|
+
return;
|
|
910
|
+
}
|
|
911
|
+
let o = B() + W(r);
|
|
912
|
+
S = {
|
|
913
|
+
key: a,
|
|
914
|
+
offset: V().start - o
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
function K(t) {
|
|
918
|
+
if (!S) return !1;
|
|
919
|
+
let n = q(e), r = Ze(t ?? n.items, k.value ? null : n.keyField).indexOf(S.key);
|
|
920
|
+
if (r === -1) return fe(), !1;
|
|
921
|
+
let i = B() + W(r) + S.offset, a = V().start;
|
|
922
|
+
return Math.abs(i - a) < .5 ? !1 : (T = !0, Se(i), F(() => {
|
|
923
|
+
T = !1;
|
|
924
|
+
}), !0);
|
|
925
|
+
}
|
|
926
|
+
function ge() {
|
|
927
|
+
q(e).pageMode ? J() : _e();
|
|
928
|
+
}
|
|
929
|
+
function J() {
|
|
930
|
+
b = ue(), b.addEventListener("scroll", z, vt() ? { passive: !0 } : !1), b.addEventListener("resize", ae);
|
|
931
|
+
}
|
|
932
|
+
function _e() {
|
|
933
|
+
b && (b.removeEventListener("scroll", z), b.removeEventListener("resize", ae), b = null);
|
|
934
|
+
}
|
|
935
|
+
function X(e, t, n, r, i, a) {
|
|
936
|
+
let o = Math.ceil(e / t) * n, s = Math.max(0, Math.floor(i.start / n)), c = Math.min(Math.ceil(i.end / n), Math.ceil(e / t)), l = Math.max(0, Math.floor(a.start / r)), u = Math.min(Math.ceil(a.end / r), t), d = [];
|
|
937
|
+
for (let n = s; n < c; n++) {
|
|
938
|
+
let r = n * t;
|
|
939
|
+
for (let t = l; t < u; t++) {
|
|
940
|
+
let n = r + t;
|
|
941
|
+
if (n >= e) break;
|
|
942
|
+
d.push(n);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
let f = d[0] ?? 0, p = d.at(-1) ?? -1;
|
|
946
|
+
return {
|
|
947
|
+
renderedIndices: d,
|
|
948
|
+
startIndex: f,
|
|
949
|
+
endIndex: p + 1,
|
|
950
|
+
visibleStartIndex: f,
|
|
951
|
+
visibleEndIndex: p,
|
|
952
|
+
totalSize: o
|
|
953
|
+
};
|
|
954
|
+
}
|
|
955
|
+
function Z() {
|
|
956
|
+
let n = q(e);
|
|
957
|
+
if (!n.gridItems || n.itemSize == null) return !1;
|
|
958
|
+
let r = q(t);
|
|
959
|
+
if (!r) return !1;
|
|
960
|
+
let i = n.itemSecondarySize || n.itemSize, a = n.direction === "vertical" ? r.clientWidth : r.clientHeight;
|
|
961
|
+
return i * n.gridItems > a;
|
|
962
|
+
}
|
|
963
|
+
function Q(t, s = !1) {
|
|
964
|
+
var d, f;
|
|
965
|
+
let g = q(e), _ = g.itemSize, b = g.gridItems || 1, x = g.itemSecondarySize || _, S = y, C = g.typeField, w = k.value ? null : g.keyField, T = g.items, E = T.length, D = A.value, O = u, j = a.value, ee = null, M = null, N, F, ie, I, L;
|
|
966
|
+
if (!E) N = F = I = L = ie = 0;
|
|
967
|
+
else if (h) N = I = 0, F = L = Math.min(g.prerender, T.length), ie = 0;
|
|
968
|
+
else {
|
|
969
|
+
let e = V(), t = de();
|
|
970
|
+
if (s) {
|
|
971
|
+
let n = e.start - p;
|
|
972
|
+
n < 0 && (n = -n);
|
|
973
|
+
let r = t.start - m;
|
|
974
|
+
if (r < 0 && (r = -r), !(_ === null && n >= S || _ !== null && n >= _) && !(b > 1 && _ != null && r >= x)) return { continuous: !0 };
|
|
975
|
+
}
|
|
976
|
+
p = e.start, m = t.start;
|
|
977
|
+
let i = g.buffer;
|
|
978
|
+
e.start -= i, e.end += i, t.start -= i, t.end += i;
|
|
979
|
+
let a = 0, o = q(n);
|
|
980
|
+
o && (a = o.scrollHeight, e.start -= a);
|
|
981
|
+
let c = q(r);
|
|
982
|
+
if (c) {
|
|
983
|
+
let t = c.scrollHeight;
|
|
984
|
+
e.end += t;
|
|
985
|
+
}
|
|
986
|
+
if (_ === null) {
|
|
987
|
+
let t, n = 0, r = E - 1, i = ~~(E / 2), o;
|
|
988
|
+
do
|
|
989
|
+
o = i, t = D[i].accumulator, t < e.start ? n = i : i < E - 1 && D[i + 1].accumulator > e.start && (r = i), i = ~~((n + r) / 2);
|
|
990
|
+
while (i !== o);
|
|
991
|
+
for (i < 0 && (i = 0), N = i, ie = D[E - 1].accumulator, F = i; F < E && D[F].accumulator < e.end; F++);
|
|
992
|
+
for (F === -1 ? F = T.length - 1 : (F++, F > E && (F = E)), I = N; I < E && a + D[I].accumulator < e.start; I++);
|
|
993
|
+
for (L = I; L < E && a + D[L].accumulator < e.end; L++);
|
|
994
|
+
} else if (b > 1) {
|
|
995
|
+
let n = X(E, b, _, x, e, t);
|
|
996
|
+
ee = n.renderedIndices, M = new Set(ee), N = n.startIndex, F = n.endIndex, I = n.visibleStartIndex, L = n.visibleEndIndex, ie = n.totalSize;
|
|
997
|
+
} else {
|
|
998
|
+
N = ~~(e.start / _ * b);
|
|
999
|
+
let t = N % b;
|
|
1000
|
+
N -= t, F = Math.ceil(e.end / _ * b), I = Math.max(0, Math.floor((e.start - a) / _ * b)), L = Math.floor((e.end - a) / _ * b), N < 0 && (N = 0), F > E && (F = E), I < 0 && (I = 0), L > E && (L = E), ie = Math.ceil(E / b) * _;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
F - N > it.itemsLimit && ve(), o.value = ie;
|
|
1004
|
+
let R, ae = N <= l && F >= c;
|
|
1005
|
+
if (!ae || t) re();
|
|
1006
|
+
else for (let e = 0, t = j.length; e < t; e++) {
|
|
1007
|
+
let t = j[e];
|
|
1008
|
+
if (t && (R = t, R.nr.used)) {
|
|
1009
|
+
let e = M ? M.has(R.nr.index) : R.nr.index >= N && R.nr.index < F, t = _ || D[R.nr.index] && D[R.nr.index].size;
|
|
1010
|
+
(!e || !t) && ne(R);
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
let z, oe, se = ee ?? Array.from({ length: Math.max(0, F - N) }, (e, t) => N + t);
|
|
1014
|
+
for (let e of se) {
|
|
1015
|
+
if (!(_ || D[e] && D[e].size)) continue;
|
|
1016
|
+
z = T[e];
|
|
1017
|
+
let t = w ? z[w] : e;
|
|
1018
|
+
if (t == null) throw Error(`Key is ${t} on item (keyField is '${w}')`);
|
|
1019
|
+
if (R = O.get(t), R) R.item !== z && (R.item = z), R.nr.used || console.warn(`Expected existing view's used flag to be true, got ${R.nr.used}`);
|
|
1020
|
+
else {
|
|
1021
|
+
if (oe = z[C], R = te(oe), R) {
|
|
1022
|
+
let n = R.nr.index !== e || R.nr.key !== t;
|
|
1023
|
+
R.item = z, R.nr.index = e, R.nr.key = t, R.nr.type !== oe && console.warn("Reused view's type does not match pool's type"), n && bt(R);
|
|
1024
|
+
} else R = P(j, e, z, t, oe);
|
|
1025
|
+
O.set(t, R);
|
|
1026
|
+
}
|
|
1027
|
+
_ === null ? (R.position = ((d = D[e - 1]) == null ? void 0 : d.accumulator) || 0, R.offset = 0) : (R.position = Math.floor(e / b) * _, R.offset = e % b * x);
|
|
1028
|
+
}
|
|
1029
|
+
return c = N, l = F, g.emitUpdate && ((f = i == null ? void 0 : i.onUpdate) == null || f.call(i, N, F, I, L)), v && clearTimeout(v), v = setTimeout(be, g.updateInterval + 300), { continuous: ae };
|
|
1030
|
+
}
|
|
1031
|
+
function ve() {
|
|
1032
|
+
throw w = setTimeout(() => {
|
|
1033
|
+
w = null, console.warn("It seems the scroller element isn't scrolling, so it tries to render all the items at once.", "Scroller:", q(t)), console.warn("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.");
|
|
1034
|
+
}), /* @__PURE__ */ Error("Rendered items limit reached");
|
|
1035
|
+
}
|
|
1036
|
+
function ye() {
|
|
1037
|
+
if (Z()) return !1;
|
|
1038
|
+
let e = a.value.filter(({ nr: e }) => e.used);
|
|
1039
|
+
for (let t = 1; t < e.length; t++) if (e[t].nr.index !== e[t - 1].nr.index + 1) return !0;
|
|
1040
|
+
return !1;
|
|
1041
|
+
}
|
|
1042
|
+
function be() {
|
|
1043
|
+
a.value.sort((e, t) => e.nr.index - t.nr.index), ye() && (Q(!1), v && clearTimeout(v));
|
|
1044
|
+
}
|
|
1045
|
+
function xe(n, r) {
|
|
1046
|
+
let i = q(e), a = q(t);
|
|
1047
|
+
if (!a) return;
|
|
1048
|
+
let o = Math.max(0, Math.min(n, i.items.length - 1)), s = V().start, c = ut(a, i.direction, i.pageMode), l = nt(W(o), U(o), s, c, r == null ? void 0 : r.align, (r == null ? void 0 : r.offset) ?? 0);
|
|
1049
|
+
if (l != null && (Se(l, r), i.gridItems && i.itemSize != null)) {
|
|
1050
|
+
let e = q(t);
|
|
1051
|
+
if (!e) return;
|
|
1052
|
+
let n = i.gridItems, a = i.itemSecondarySize || i.itemSize, s = o % n * a, c = i.direction === "vertical" ? "horizontal" : "vertical", l = nt(s, a, c === "horizontal" ? st(e.scrollLeft, "horizontal", e) : e.scrollTop, c === "horizontal" ? e.clientWidth : e.clientHeight, r == null ? void 0 : r.align, (r == null ? void 0 : r.offset) ?? 0);
|
|
1053
|
+
l != null && lt(e, c, l, r);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
function Se(n, r) {
|
|
1057
|
+
let i = q(e), a = q(t);
|
|
1058
|
+
if (a) if (i.pageMode) {
|
|
1059
|
+
let e = gt(a), t = e.getBoundingClientRect(), o = a.getBoundingClientRect(), s = i.direction === "vertical" ? "top" : "left", c = gt(a) === document.documentElement || gt(a) === document.body ? i.direction === "vertical" ? window.scrollY : window.scrollX : st(i.direction === "vertical" ? e.scrollTop : e.scrollLeft, i.direction, e), l = o[s] - t[s];
|
|
1060
|
+
lt(e.tagName === "HTML" ? window : e, i.direction, n + c + l, r);
|
|
1061
|
+
} else lt(a, i.direction, n, r);
|
|
1062
|
+
}
|
|
1063
|
+
let Ce = q(e);
|
|
1064
|
+
return x = Ze(Ce.items, Ce.items.length > 0 && typeof Ce.items[0] != "object" ? null : Ce.keyField), Ce.cache && M(Ce.cache), Ce.prerender && (h = !0, Q(!1)), Ce.gridItems && !Ce.itemSize && console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems"), le(() => {
|
|
1065
|
+
ge(), L(() => {
|
|
1066
|
+
h = !1, Q(!0), s.value = !0;
|
|
1067
|
+
});
|
|
1068
|
+
}), oe(() => {
|
|
1069
|
+
let e = p;
|
|
1070
|
+
typeof e == "number" && L(() => {
|
|
1071
|
+
Se(e);
|
|
1072
|
+
});
|
|
1073
|
+
}), se(() => {
|
|
1074
|
+
R(), I(), _e();
|
|
1075
|
+
}), Y(() => q(e).cache, (e) => {
|
|
1076
|
+
M(e), Q(!0);
|
|
1077
|
+
}), Y(() => q(e).items, (t, n) => {
|
|
1078
|
+
let r = q(e), i = k.value ? null : r.keyField, a = Ze(t, i);
|
|
1079
|
+
r.shift && tt(n ? Ze(n, i) : x, a) > 0 ? he(n ?? [], i) : fe(), x = a, K(t), Q(!0);
|
|
1080
|
+
}), Y(() => q(e).pageMode, () => {
|
|
1081
|
+
ge(), Q(!1);
|
|
1082
|
+
}), Y(A, () => {
|
|
1083
|
+
K() && pe(), Q(!1);
|
|
1084
|
+
}, { deep: !0 }), Y(() => q(e).gridItems, () => {
|
|
1085
|
+
Q(!0);
|
|
1086
|
+
}), Y(() => q(e).itemSecondarySize, () => {
|
|
1087
|
+
Q(!0);
|
|
1088
|
+
}), {
|
|
1089
|
+
pool: a,
|
|
1090
|
+
visiblePool: j,
|
|
1091
|
+
totalSize: o,
|
|
1092
|
+
ready: s,
|
|
1093
|
+
sizes: A,
|
|
1094
|
+
simpleArray: k,
|
|
1095
|
+
scrollToItem: xe,
|
|
1096
|
+
scrollToPosition: Se,
|
|
1097
|
+
getScroll: V,
|
|
1098
|
+
findItemIndex: G,
|
|
1099
|
+
getItemOffset: W,
|
|
1100
|
+
getItemSize: U,
|
|
1101
|
+
cacheSnapshot: ee,
|
|
1102
|
+
restoreCache: M,
|
|
1103
|
+
updateVisibleItems: Q,
|
|
1104
|
+
handleScroll: z,
|
|
1105
|
+
handleResize: ae,
|
|
1106
|
+
handleVisibilityChange: ce,
|
|
1107
|
+
sortViews: be
|
|
1108
|
+
};
|
|
1109
|
+
}
|
|
1110
|
+
function Ct(e) {
|
|
1111
|
+
return e.item;
|
|
1112
|
+
}
|
|
1113
|
+
function wt(e) {
|
|
1114
|
+
return e._vs_styleStamp ?? 0;
|
|
1115
|
+
}
|
|
1116
|
+
var Tt = [
|
|
1117
|
+
"position",
|
|
1118
|
+
"top",
|
|
1119
|
+
"left",
|
|
1120
|
+
"transform",
|
|
1121
|
+
"willChange",
|
|
1122
|
+
"visibility",
|
|
1123
|
+
"pointerEvents"
|
|
1124
|
+
];
|
|
1125
|
+
function Et(e) {
|
|
1126
|
+
let t = {};
|
|
1127
|
+
for (let n of Tt) t[n] = e.style[n];
|
|
1128
|
+
return t;
|
|
1129
|
+
}
|
|
1130
|
+
function Dt(e, t) {
|
|
1131
|
+
for (let n of Tt) e.style[n] = t[n] ?? "";
|
|
1132
|
+
}
|
|
1133
|
+
function Ot(e, t, n, r) {
|
|
1134
|
+
if (!("view" in t)) {
|
|
1135
|
+
Dt(e, r);
|
|
1136
|
+
return;
|
|
1137
|
+
}
|
|
1138
|
+
let i = n === "vertical", a = e.tagName === "TR", o = i ? `translateY(${t.view.position}px) translateX(${t.view.offset}px)` : `translateX(${t.view.position}px) translateY(${t.view.offset}px)`;
|
|
1139
|
+
e.style.position = "absolute", e.style.top = i && a ? `${t.view.position}px` : "0px", e.style.left = !i && a ? `${t.view.position}px` : "0px", e.style.transform = a ? "" : o, e.style.willChange = a ? "unset" : "transform", e.style.visibility = t.view.nr.used ? "visible" : "hidden", e.style.pointerEvents = t.view.nr.used ? "" : "none";
|
|
1140
|
+
}
|
|
1141
|
+
function kt(e) {
|
|
1142
|
+
return "view" in e ? {
|
|
1143
|
+
item: Ct(e.view).item,
|
|
1144
|
+
active: e.view.nr.used,
|
|
1145
|
+
index: e.view.nr.index,
|
|
1146
|
+
watchData: e.watchData ?? !1,
|
|
1147
|
+
emitResize: e.emitResize ?? !1,
|
|
1148
|
+
sizeDependencies: e.sizeDependencies ?? null,
|
|
1149
|
+
onResize: e.onResize
|
|
1150
|
+
} : {
|
|
1151
|
+
watchData: !1,
|
|
1152
|
+
emitResize: !1,
|
|
1153
|
+
sizeDependencies: null,
|
|
1154
|
+
...e
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
function At(e, t, n, r) {
|
|
1158
|
+
return n ? r ?? null : (e == null ? void 0 : e[t]) ?? null;
|
|
1159
|
+
}
|
|
1160
|
+
function jt(e) {
|
|
1161
|
+
let t = 0, n = {}, r = Ye(), i = !1, a, o = !1, s = [], c = null, l = null, u = /* @__PURE__ */ new Set(), d = de({
|
|
1162
|
+
active: !0,
|
|
1163
|
+
sizes: {},
|
|
1164
|
+
keyField: q(e).keyField,
|
|
1165
|
+
simpleArray: !1
|
|
1166
|
+
}), f = D(() => q(e).direction), p = D(() => q(q(e).el)), m = D(() => q(q(e).before)), h = D(() => q(q(e).after)), g = /* @__PURE__ */ new Map();
|
|
1167
|
+
function _(e) {
|
|
1168
|
+
let t = -1;
|
|
1169
|
+
return t = requestAnimationFrame(() => {
|
|
1170
|
+
u.delete(t), e();
|
|
1171
|
+
}), u.add(t), t;
|
|
1172
|
+
}
|
|
1173
|
+
function v() {
|
|
1174
|
+
for (let e of u) cancelAnimationFrame(e);
|
|
1175
|
+
u.clear();
|
|
1176
|
+
}
|
|
1177
|
+
typeof ResizeObserver < "u" && (a = new ResizeObserver((e) => {
|
|
1178
|
+
_(() => {
|
|
1179
|
+
if (Array.isArray(e)) {
|
|
1180
|
+
for (let t of e) if (t.target && t.target.$_vs_onResize) {
|
|
1181
|
+
let e, n;
|
|
1182
|
+
if (t.borderBoxSize) {
|
|
1183
|
+
let r = t.borderBoxSize[0];
|
|
1184
|
+
e = r.inlineSize, n = r.blockSize;
|
|
1185
|
+
} else e = t.contentRect.width, n = t.contentRect.height;
|
|
1186
|
+
t.target.$_vs_onResize(t.target.$_vs_id, e, n);
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
});
|
|
1190
|
+
}));
|
|
1191
|
+
let y = {
|
|
1192
|
+
vscrollData: d,
|
|
1193
|
+
resizeObserver: a,
|
|
1194
|
+
direction: f,
|
|
1195
|
+
undefinedMap: n,
|
|
1196
|
+
undefinedSizeCount: {
|
|
1197
|
+
get value() {
|
|
1198
|
+
return t;
|
|
1199
|
+
},
|
|
1200
|
+
set value(e) {
|
|
1201
|
+
t = e;
|
|
1202
|
+
}
|
|
1203
|
+
},
|
|
1204
|
+
onVscrollUpdate(e) {
|
|
1205
|
+
let t = (t) => {
|
|
1206
|
+
e(t);
|
|
1207
|
+
};
|
|
1208
|
+
return r.on("vscroll:update", t), () => r.off("vscroll:update", t);
|
|
1209
|
+
}
|
|
1210
|
+
};
|
|
1211
|
+
V("vscrollData", d), V("vscrollParent", {
|
|
1212
|
+
get $_undefinedSizes() {
|
|
1213
|
+
return t;
|
|
1214
|
+
},
|
|
1215
|
+
set $_undefinedSizes(e) {
|
|
1216
|
+
t = e;
|
|
1217
|
+
},
|
|
1218
|
+
get $_undefinedMap() {
|
|
1219
|
+
return n;
|
|
1220
|
+
},
|
|
1221
|
+
set $_undefinedMap(e) {
|
|
1222
|
+
n = e;
|
|
1223
|
+
},
|
|
1224
|
+
$_events: r,
|
|
1225
|
+
direction: f
|
|
1226
|
+
}), V("vscrollResizeObserver", a), V("vscrollMeasurementContext", y), V("vscrollAnchorRegistry", {
|
|
1227
|
+
delete(e) {
|
|
1228
|
+
g.delete(e);
|
|
1229
|
+
},
|
|
1230
|
+
set(e, t) {
|
|
1231
|
+
g.set(e, t);
|
|
1232
|
+
}
|
|
1233
|
+
});
|
|
1234
|
+
let b = D(() => {
|
|
1235
|
+
let t = q(e);
|
|
1236
|
+
return t.items.length > 0 && typeof t.items[0] != "object";
|
|
1237
|
+
}), x = D(() => {
|
|
1238
|
+
let t = [], { items: r, keyField: i } = q(e), a = b.value, o = d.sizes, s = r.length;
|
|
1239
|
+
for (let e = 0; e < s; e++) {
|
|
1240
|
+
let s = r[e], c = a ? e : s[i], l = o[c];
|
|
1241
|
+
typeof l > "u" && !n[c] && (l = 0), t.push({
|
|
1242
|
+
item: s,
|
|
1243
|
+
id: c,
|
|
1244
|
+
size: l
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
return t;
|
|
1248
|
+
}), S = q(e);
|
|
1249
|
+
s = Ze(S.items, b.value ? null : S.keyField), S.cache && (d.sizes = et(S.cache, S.items, b.value ? null : S.keyField));
|
|
1250
|
+
let C = D(() => {
|
|
1251
|
+
let t = q(e);
|
|
1252
|
+
return {
|
|
1253
|
+
items: x.value,
|
|
1254
|
+
keyField: "id",
|
|
1255
|
+
direction: t.direction,
|
|
1256
|
+
itemSize: null,
|
|
1257
|
+
gridItems: void 0,
|
|
1258
|
+
itemSecondarySize: void 0,
|
|
1259
|
+
minItemSize: t.minItemSize,
|
|
1260
|
+
sizeField: "size",
|
|
1261
|
+
typeField: "type",
|
|
1262
|
+
buffer: t.buffer ?? 200,
|
|
1263
|
+
pageMode: t.pageMode ?? !1,
|
|
1264
|
+
shift: !1,
|
|
1265
|
+
cache: t.cache,
|
|
1266
|
+
prerender: t.prerender ?? 0,
|
|
1267
|
+
emitUpdate: t.emitUpdate ?? !1,
|
|
1268
|
+
updateInterval: t.updateInterval ?? 0
|
|
1269
|
+
};
|
|
1270
|
+
});
|
|
1271
|
+
function w() {
|
|
1272
|
+
var t, n;
|
|
1273
|
+
F(), (n = (t = q(e)).onResize) == null || n.call(t);
|
|
1274
|
+
}
|
|
1275
|
+
function T() {
|
|
1276
|
+
var t, n;
|
|
1277
|
+
r.emit("vscroll:update", { force: !1 }), (n = (t = q(e)).onVisible) == null || n.call(t);
|
|
1278
|
+
}
|
|
1279
|
+
let E = St(C, p, m, h, {
|
|
1280
|
+
onResize: w,
|
|
1281
|
+
onVisible: T,
|
|
1282
|
+
onHidden: () => {
|
|
1283
|
+
var t, n;
|
|
1284
|
+
return (n = (t = q(e)).onHidden) == null ? void 0 : n.call(t);
|
|
1285
|
+
},
|
|
1286
|
+
onUpdate: (t, n, r, i) => {
|
|
1287
|
+
var a, o;
|
|
1288
|
+
return (o = (a = q(e)).onUpdate) == null ? void 0 : o.call(a, t, n, r, i);
|
|
1289
|
+
}
|
|
1290
|
+
}), O = /* @__PURE__ */ new WeakMap();
|
|
1291
|
+
function k() {
|
|
1292
|
+
l != null && (cancelAnimationFrame(l), u.delete(l), l = null);
|
|
1293
|
+
}
|
|
1294
|
+
function A() {
|
|
1295
|
+
k(), c = null;
|
|
1296
|
+
}
|
|
1297
|
+
function j() {
|
|
1298
|
+
c == null || l != null || (l = _(() => {
|
|
1299
|
+
l = null, P();
|
|
1300
|
+
}));
|
|
1301
|
+
}
|
|
1302
|
+
function ee() {
|
|
1303
|
+
let e = p.value;
|
|
1304
|
+
if (!e) return null;
|
|
1305
|
+
let t = e.getBoundingClientRect(), n = null;
|
|
1306
|
+
for (let [e, r] of g.entries()) {
|
|
1307
|
+
if (!r.active || getComputedStyle(e).visibility === "hidden") continue;
|
|
1308
|
+
let i = e.getBoundingClientRect();
|
|
1309
|
+
if (i.bottom <= t.top || i.top >= t.bottom) continue;
|
|
1310
|
+
let a = Math.max(i.top, t.top) - t.top;
|
|
1311
|
+
(!n || a < n.score) && (n = {
|
|
1312
|
+
key: r.id,
|
|
1313
|
+
offset: i.top - t.top,
|
|
1314
|
+
score: a
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1317
|
+
return n;
|
|
1318
|
+
}
|
|
1319
|
+
function M(e) {
|
|
1320
|
+
let t = p.value;
|
|
1321
|
+
if (!t) {
|
|
1322
|
+
A();
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1325
|
+
let n = t.scrollTop, r = Math.min(E.findItemIndex(n), e.length - 1), i = e[r];
|
|
1326
|
+
if (i == null) {
|
|
1327
|
+
A();
|
|
1328
|
+
return;
|
|
1329
|
+
}
|
|
1330
|
+
let a = ee();
|
|
1331
|
+
c = {
|
|
1332
|
+
logicalKey: i,
|
|
1333
|
+
logicalOffset: n - E.getItemOffset(r),
|
|
1334
|
+
pendingKeys: /* @__PURE__ */ new Set(),
|
|
1335
|
+
stableFrames: 0,
|
|
1336
|
+
visualKey: (a == null ? void 0 : a.key) ?? null,
|
|
1337
|
+
visualOffset: (a == null ? void 0 : a.offset) ?? 0
|
|
1338
|
+
};
|
|
1339
|
+
}
|
|
1340
|
+
function N(e) {
|
|
1341
|
+
let t = p.value;
|
|
1342
|
+
return !t || Math.abs(t.scrollTop - e) < .5 ? !1 : (o = !0, t.scrollTop = e, t.dispatchEvent(new Event("scroll")), _(() => {
|
|
1343
|
+
o = !1;
|
|
1344
|
+
}), !0);
|
|
1345
|
+
}
|
|
1346
|
+
function P() {
|
|
1347
|
+
let e = c, t = p.value;
|
|
1348
|
+
if (!e || !t) return;
|
|
1349
|
+
let n = x.value.findIndex((t) => t.id === e.logicalKey);
|
|
1350
|
+
if (n === -1) {
|
|
1351
|
+
A();
|
|
1352
|
+
return;
|
|
1353
|
+
}
|
|
1354
|
+
let r = !1;
|
|
1355
|
+
if (r = N(E.getItemOffset(n) + e.logicalOffset) || r, e.visualKey != null) for (let [n, i] of g.entries()) {
|
|
1356
|
+
if (!i.active || i.id !== e.visualKey || getComputedStyle(n).visibility === "hidden") continue;
|
|
1357
|
+
let a = n.getBoundingClientRect().top - t.getBoundingClientRect().top - e.visualOffset;
|
|
1358
|
+
r = N(t.scrollTop + a) || r;
|
|
1359
|
+
break;
|
|
1360
|
+
}
|
|
1361
|
+
let i = !0;
|
|
1362
|
+
for (let t of e.pendingKeys) if (!(typeof d.sizes[t] == "number" && d.sizes[t] > 0)) {
|
|
1363
|
+
i = !1;
|
|
1364
|
+
break;
|
|
1365
|
+
}
|
|
1366
|
+
if (!r && i) {
|
|
1367
|
+
if (e.stableFrames++, e.stableFrames >= 2) {
|
|
1368
|
+
A();
|
|
1369
|
+
return;
|
|
1370
|
+
}
|
|
1371
|
+
} else e.stableFrames = 0;
|
|
1372
|
+
j();
|
|
1373
|
+
}
|
|
1374
|
+
function ne(t, n, r, i) {
|
|
1375
|
+
let a = te(), o = he(n), s = he(r), c = he({ onResize: r.onResize }), l = he(t), u = a.run(() => (Y(() => {
|
|
1376
|
+
let t = o.value;
|
|
1377
|
+
if (!("view" in t)) return {
|
|
1378
|
+
active: s.value.active,
|
|
1379
|
+
direction: f.value,
|
|
1380
|
+
id: At(s.value.item, q(e).keyField, d.simpleArray, s.value.index),
|
|
1381
|
+
legacy: !0
|
|
1382
|
+
};
|
|
1383
|
+
let { view: n } = t;
|
|
1384
|
+
return {
|
|
1385
|
+
active: n.nr.used,
|
|
1386
|
+
direction: f.value,
|
|
1387
|
+
id: Ct(n).id,
|
|
1388
|
+
legacy: !1,
|
|
1389
|
+
position: n.position,
|
|
1390
|
+
offset: n.offset,
|
|
1391
|
+
styleStamp: wt(n)
|
|
1392
|
+
};
|
|
1393
|
+
}, () => {
|
|
1394
|
+
let t = l.value;
|
|
1395
|
+
if (t) {
|
|
1396
|
+
let n = o.value, r = "view" in n ? Ct(n.view).id : At(s.value.item, q(e).keyField, d.simpleArray, s.value.index);
|
|
1397
|
+
r != null && g.set(t, {
|
|
1398
|
+
active: s.value.active && d.active,
|
|
1399
|
+
id: r
|
|
1400
|
+
}), Ot(t, o.value, f.value, i);
|
|
1401
|
+
}
|
|
1402
|
+
}, { immediate: !0 }), rt(s, l, y, c)));
|
|
1403
|
+
u.mount(), O.set(t, {
|
|
1404
|
+
binding: o,
|
|
1405
|
+
scope: a,
|
|
1406
|
+
options: s,
|
|
1407
|
+
callbacks: c,
|
|
1408
|
+
el: l,
|
|
1409
|
+
controller: u,
|
|
1410
|
+
restoreStyles: i
|
|
1411
|
+
});
|
|
1412
|
+
}
|
|
1413
|
+
let re = {
|
|
1414
|
+
mounted(e, t) {
|
|
1415
|
+
let n = Et(e);
|
|
1416
|
+
ne(e, t.value, kt(t.value), n);
|
|
1417
|
+
},
|
|
1418
|
+
updated(e, t) {
|
|
1419
|
+
let n = O.get(e), r = kt(t.value);
|
|
1420
|
+
if (!n) {
|
|
1421
|
+
let n = Et(e);
|
|
1422
|
+
ne(e, t.value, r, n);
|
|
1423
|
+
return;
|
|
1424
|
+
}
|
|
1425
|
+
n.binding.value = t.value, n.options.value = r, n.callbacks.value = { onResize: r.onResize }, n.el.value = e, Ot(e, t.value, f.value, n.restoreStyles);
|
|
1426
|
+
},
|
|
1427
|
+
unmounted(e) {
|
|
1428
|
+
let t = O.get(e);
|
|
1429
|
+
t && (t.controller.unmount(), t.scope.stop(), Dt(e, t.restoreStyles), g.delete(e), O.delete(e));
|
|
1430
|
+
}
|
|
1431
|
+
};
|
|
1432
|
+
function F(e = !1) {
|
|
1433
|
+
(e || b.value) && (d.sizes = {}), r.emit("vscroll:update", { force: !0 });
|
|
1434
|
+
}
|
|
1435
|
+
function ie(e, t) {
|
|
1436
|
+
E.scrollToItem(e, t);
|
|
1437
|
+
}
|
|
1438
|
+
function I(t) {
|
|
1439
|
+
let n = q(e);
|
|
1440
|
+
return d.sizes = et(t, n.items, b.value ? null : n.keyField), E.restoreCache(t);
|
|
1441
|
+
}
|
|
1442
|
+
function R(t, n) {
|
|
1443
|
+
let r = q(e), i = b.value ? n ?? r.items.indexOf(t) : t[r.keyField];
|
|
1444
|
+
return d.sizes[i] || 0;
|
|
1445
|
+
}
|
|
1446
|
+
function ae() {
|
|
1447
|
+
let e = p.value;
|
|
1448
|
+
e && (i || (i = !0, L(() => {
|
|
1449
|
+
e.scrollTop = e.scrollHeight + 5e3;
|
|
1450
|
+
let n = () => {
|
|
1451
|
+
e.scrollTop = e.scrollHeight + 5e3, _(() => {
|
|
1452
|
+
e.scrollTop = e.scrollHeight + 5e3, t === 0 ? i = !1 : _(n);
|
|
1453
|
+
});
|
|
1454
|
+
};
|
|
1455
|
+
_(n);
|
|
1456
|
+
})));
|
|
1457
|
+
}
|
|
1458
|
+
function z() {
|
|
1459
|
+
c && !o && A();
|
|
1460
|
+
}
|
|
1461
|
+
return Y(() => q(e).items, (t, n) => {
|
|
1462
|
+
let r = q(e), i = b.value ? null : r.keyField, a = Ze(t, i);
|
|
1463
|
+
if (r.shift) {
|
|
1464
|
+
let e = n ? Ze(n, i) : s, t = tt(e, a);
|
|
1465
|
+
t > 0 ? (M(e), c && (c.pendingKeys = new Set(a.slice(0, t)), c.stableFrames = 0, L(() => {
|
|
1466
|
+
c && P();
|
|
1467
|
+
}))) : A();
|
|
1468
|
+
} else A();
|
|
1469
|
+
s = a, F();
|
|
1470
|
+
}, { flush: "sync" }), Y(() => q(e).cache, (e) => {
|
|
1471
|
+
e && I(e);
|
|
1472
|
+
}), Y(b, (e) => {
|
|
1473
|
+
d.simpleArray = e;
|
|
1474
|
+
}, { immediate: !0 }), Y(() => q(e).direction, () => {
|
|
1475
|
+
A(), F(!0);
|
|
1476
|
+
}), Y(p, (e, t) => {
|
|
1477
|
+
t == null || t.removeEventListener("scroll", z), e == null || e.addEventListener("scroll", z);
|
|
1478
|
+
}, { immediate: !0 }), Y(x, (t, n) => {
|
|
1479
|
+
let r = p.value;
|
|
1480
|
+
if (!r) return;
|
|
1481
|
+
if (c) {
|
|
1482
|
+
P();
|
|
1483
|
+
return;
|
|
1484
|
+
}
|
|
1485
|
+
let i = r.scrollTop, a = q(e), o = 0, s = 0, l = Math.min(t.length, n.length);
|
|
1486
|
+
for (let e = 0; e < l && !(o >= i); e++) o += n[e].size || a.minItemSize, s += t[e].size || a.minItemSize;
|
|
1487
|
+
let u = s - o;
|
|
1488
|
+
u !== 0 && (r.scrollTop += u);
|
|
1489
|
+
}, { flush: "post" }), oe(() => {
|
|
1490
|
+
d.active = !0;
|
|
1491
|
+
}), ce(() => {
|
|
1492
|
+
d.active = !1;
|
|
1493
|
+
}), ue(() => {
|
|
1494
|
+
var e;
|
|
1495
|
+
k(), v(), (e = p.value) == null || e.removeEventListener("scroll", z), r.all.clear();
|
|
1496
|
+
}), {
|
|
1497
|
+
vscrollData: d,
|
|
1498
|
+
itemsWithSize: x,
|
|
1499
|
+
resizeObserver: a,
|
|
1500
|
+
measurementContext: y,
|
|
1501
|
+
vDynamicScrollerItem: re,
|
|
1502
|
+
...E,
|
|
1503
|
+
simpleArray: b,
|
|
1504
|
+
forceUpdate: F,
|
|
1505
|
+
scrollToItem: ie,
|
|
1506
|
+
restoreCache: I,
|
|
1507
|
+
getItemSize: R,
|
|
1508
|
+
scrollToBottom: ae,
|
|
1509
|
+
onScrollerResize: w,
|
|
1510
|
+
onScrollerVisible: T
|
|
1511
|
+
};
|
|
1512
|
+
}
|
|
1513
|
+
var Mt = /* @__PURE__ */ new WeakMap();
|
|
1514
|
+
function Nt(e) {
|
|
1515
|
+
return typeof e == "function" ? {
|
|
1516
|
+
callback: e,
|
|
1517
|
+
observer: null,
|
|
1518
|
+
intersection: void 0,
|
|
1519
|
+
visible: null
|
|
1520
|
+
} : {
|
|
1521
|
+
callback: e.callback,
|
|
1522
|
+
observer: null,
|
|
1523
|
+
intersection: e.intersection,
|
|
1524
|
+
visible: null
|
|
1525
|
+
};
|
|
1526
|
+
}
|
|
1527
|
+
function Pt(e, t) {
|
|
1528
|
+
Ft(e);
|
|
1529
|
+
let n = Nt(t.value);
|
|
1530
|
+
if (Mt.set(e, n), typeof IntersectionObserver > "u") {
|
|
1531
|
+
let t = e.getBoundingClientRect();
|
|
1532
|
+
n.visible = !0, n.callback(!0, { boundingClientRect: t });
|
|
1533
|
+
return;
|
|
1534
|
+
}
|
|
1535
|
+
n.observer = new IntersectionObserver((e) => {
|
|
1536
|
+
let t = e[0], r = !!(t != null && t.isIntersecting);
|
|
1537
|
+
n.visible !== null && n.visible === r || (n.visible = r, n.callback(r, t));
|
|
1538
|
+
}, n.intersection), n.observer.observe(e);
|
|
1539
|
+
}
|
|
1540
|
+
function Ft(e) {
|
|
1541
|
+
let t = Mt.get(e);
|
|
1542
|
+
t != null && t.observer && (t.observer.disconnect(), t.observer = null);
|
|
1543
|
+
}
|
|
1544
|
+
var It = {
|
|
1545
|
+
mounted(e, t) {
|
|
1546
|
+
Pt(e, t);
|
|
1547
|
+
},
|
|
1548
|
+
updated(e, t) {
|
|
1549
|
+
t.value !== t.oldValue && Pt(e, t);
|
|
1550
|
+
},
|
|
1551
|
+
unmounted(e) {
|
|
1552
|
+
Ft(e), Mt.delete(e);
|
|
1553
|
+
}
|
|
1554
|
+
}, Lt = /* @__PURE__ */ P({
|
|
1555
|
+
__name: "ItemView",
|
|
1556
|
+
props: {
|
|
1557
|
+
view: {},
|
|
1558
|
+
itemTag: {}
|
|
1559
|
+
},
|
|
1560
|
+
setup(e) {
|
|
1561
|
+
let t = e;
|
|
1562
|
+
return (e, n) => (B(), O(pe(t.itemTag), { class: "vue-recycle-scroller__item-view" }, {
|
|
1563
|
+
default: X(() => [W(e.$slots, "default", {
|
|
1564
|
+
item: t.view.item,
|
|
1565
|
+
index: t.view.nr.index,
|
|
1566
|
+
active: t.view.nr.used
|
|
1567
|
+
})]),
|
|
1568
|
+
_: 3
|
|
1569
|
+
}));
|
|
1570
|
+
}
|
|
1571
|
+
}), Rt = /* @__PURE__ */ ((e, t) => {
|
|
1572
|
+
let n = e.__vccOpts || e;
|
|
1573
|
+
for (let [e, r] of t) n[e] = r;
|
|
1574
|
+
return n;
|
|
1575
|
+
})(/* @__PURE__ */ P({
|
|
1576
|
+
__name: "ResizeObserver",
|
|
1577
|
+
emits: ["notify"],
|
|
1578
|
+
setup(e, { emit: t }) {
|
|
1579
|
+
let n = t, r = H(), i = null, a = null;
|
|
1580
|
+
function o() {
|
|
1581
|
+
n("notify");
|
|
1582
|
+
}
|
|
1583
|
+
return le(() => {
|
|
1584
|
+
var e;
|
|
1585
|
+
let t = (e = r.value) == null ? void 0 : e.parentElement;
|
|
1586
|
+
if (t) {
|
|
1587
|
+
if (typeof ResizeObserver < "u") {
|
|
1588
|
+
i = new ResizeObserver(() => {
|
|
1589
|
+
o();
|
|
1590
|
+
}), i.observe(t);
|
|
1591
|
+
return;
|
|
1592
|
+
}
|
|
1593
|
+
a = () => o(), window.addEventListener("resize", a);
|
|
1594
|
+
}
|
|
1595
|
+
}), se(() => {
|
|
1596
|
+
i && (i.disconnect(), i = null), a && (window.removeEventListener("resize", a), a = null);
|
|
1597
|
+
}), (e, t) => (B(), A("div", {
|
|
1598
|
+
ref_key: "el",
|
|
1599
|
+
ref: r,
|
|
1600
|
+
class: "vue-recycle-scroller__resize-observer",
|
|
1601
|
+
"aria-hidden": "true"
|
|
1602
|
+
}, null, 512));
|
|
1603
|
+
}
|
|
1604
|
+
}), [["__scopeId", "data-v-08cc04ab"]]), zt = /* @__PURE__ */ P({
|
|
1605
|
+
__name: "RecycleScroller",
|
|
1606
|
+
props: {
|
|
1607
|
+
items: {},
|
|
1608
|
+
keyField: { default: "id" },
|
|
1609
|
+
direction: { default: "vertical" },
|
|
1610
|
+
listTag: { default: "div" },
|
|
1611
|
+
itemTag: { default: "div" },
|
|
1612
|
+
itemSize: { default: null },
|
|
1613
|
+
gridItems: { default: void 0 },
|
|
1614
|
+
itemSecondarySize: { default: void 0 },
|
|
1615
|
+
minItemSize: { default: null },
|
|
1616
|
+
sizeField: { default: "size" },
|
|
1617
|
+
typeField: { default: "type" },
|
|
1618
|
+
buffer: { default: 200 },
|
|
1619
|
+
pageMode: {
|
|
1620
|
+
type: Boolean,
|
|
1621
|
+
default: !1
|
|
1622
|
+
},
|
|
1623
|
+
shift: {
|
|
1624
|
+
type: Boolean,
|
|
1625
|
+
default: !1
|
|
1626
|
+
},
|
|
1627
|
+
cache: { default: void 0 },
|
|
1628
|
+
prerender: { default: 0 },
|
|
1629
|
+
emitUpdate: {
|
|
1630
|
+
type: Boolean,
|
|
1631
|
+
default: !1
|
|
1632
|
+
},
|
|
1633
|
+
disableTransform: {
|
|
1634
|
+
type: Boolean,
|
|
1635
|
+
default: !1
|
|
1636
|
+
},
|
|
1637
|
+
updateInterval: { default: 0 },
|
|
1638
|
+
skipHover: {
|
|
1639
|
+
type: Boolean,
|
|
1640
|
+
default: !1
|
|
1641
|
+
},
|
|
1642
|
+
listClass: { default: "" },
|
|
1643
|
+
itemClass: { default: "" }
|
|
1644
|
+
},
|
|
1645
|
+
emits: [
|
|
1646
|
+
"resize",
|
|
1647
|
+
"visible",
|
|
1648
|
+
"hidden",
|
|
1649
|
+
"update",
|
|
1650
|
+
"scrollStart",
|
|
1651
|
+
"scrollEnd"
|
|
1652
|
+
],
|
|
1653
|
+
setup(e, { expose: t, emit: n }) {
|
|
1654
|
+
let r = e, i = n, a = It, o = H(), s = H(), c = H(), l = H(null), { pool: u, visiblePool: d, totalSize: f, ready: p, scrollToItem: m, scrollToPosition: h, getScroll: g, findItemIndex: _, getItemOffset: v, getItemSize: y, cacheSnapshot: b, restoreCache: x, updateVisibleItems: S, handleScroll: C, handleResize: w, handleVisibilityChange: T } = St(r, o, s, c, {
|
|
1655
|
+
onResize: () => i("resize"),
|
|
1656
|
+
onVisible: () => i("visible"),
|
|
1657
|
+
onHidden: () => i("hidden"),
|
|
1658
|
+
onUpdate: (e, t, n, a) => {
|
|
1659
|
+
i("update", e, t, n, a), n <= 0 && i("scrollStart"), a >= r.items.length - 1 && i("scrollEnd");
|
|
1660
|
+
}
|
|
1661
|
+
});
|
|
1662
|
+
function j(e) {
|
|
1663
|
+
l.value = e;
|
|
1664
|
+
}
|
|
1665
|
+
function ee() {
|
|
1666
|
+
l.value = null;
|
|
1667
|
+
}
|
|
1668
|
+
let M = D(() => {
|
|
1669
|
+
let e = { [r.direction === "vertical" ? "minHeight" : "minWidth"]: `${f.value}px` };
|
|
1670
|
+
if (r.gridItems && r.itemSize != null) {
|
|
1671
|
+
let t = (r.itemSecondarySize || r.itemSize) * r.gridItems;
|
|
1672
|
+
e[r.direction === "vertical" ? "minWidth" : "minHeight"] = `${t}px`;
|
|
1673
|
+
}
|
|
1674
|
+
return e;
|
|
1675
|
+
});
|
|
1676
|
+
return t({
|
|
1677
|
+
el: o,
|
|
1678
|
+
visiblePool: d,
|
|
1679
|
+
scrollToItem: m,
|
|
1680
|
+
scrollToPosition: h,
|
|
1681
|
+
getScroll: g,
|
|
1682
|
+
findItemIndex: _,
|
|
1683
|
+
getItemOffset: v,
|
|
1684
|
+
getItemSize: y,
|
|
1685
|
+
cacheSnapshot: b,
|
|
1686
|
+
restoreCache: x,
|
|
1687
|
+
updateVisibleItems: S
|
|
1688
|
+
}), (e, t) => Z((B(), A("div", {
|
|
1689
|
+
ref_key: "el",
|
|
1690
|
+
ref: o,
|
|
1691
|
+
class: R(["vue-recycle-scroller", {
|
|
1692
|
+
"grid-mode": r.gridItems,
|
|
1693
|
+
ready: J(p),
|
|
1694
|
+
"page-mode": r.pageMode,
|
|
1695
|
+
[`direction-${r.direction}`]: !0
|
|
1696
|
+
}]),
|
|
1697
|
+
onScrollPassive: t[0] || (t[0] = (...e) => J(C) && J(C)(...e))
|
|
1698
|
+
}, [
|
|
1699
|
+
e.$slots.before ? (B(), A("div", {
|
|
1700
|
+
key: 0,
|
|
1701
|
+
ref_key: "before",
|
|
1702
|
+
ref: s,
|
|
1703
|
+
class: "vue-recycle-scroller__slot"
|
|
1704
|
+
}, [W(e.$slots, "before")], 512)) : k("", !0),
|
|
1705
|
+
(B(), O(pe(r.listTag), {
|
|
1706
|
+
style: z(M.value),
|
|
1707
|
+
class: R(["vue-recycle-scroller__item-wrapper", r.listClass])
|
|
1708
|
+
}, {
|
|
1709
|
+
default: X(() => [(B(!0), A(E, null, U(J(u), (t) => (B(), O(Lt, I({
|
|
1710
|
+
key: t.nr.id,
|
|
1711
|
+
view: t,
|
|
1712
|
+
"item-tag": r.itemTag,
|
|
1713
|
+
style: J(p) ? [r.disableTransform ? {
|
|
1714
|
+
[r.direction === "vertical" ? "top" : "left"]: `${t.position}px`,
|
|
1715
|
+
willChange: "unset"
|
|
1716
|
+
} : { transform: `translate${r.direction === "vertical" ? "Y" : "X"}(${t.position}px) translate${r.direction === "vertical" ? "X" : "Y"}(${t.offset}px)` }, {
|
|
1717
|
+
width: r.gridItems ? `${r.direction === "vertical" && r.itemSecondarySize || r.itemSize}px` : void 0,
|
|
1718
|
+
height: r.gridItems ? `${r.direction === "horizontal" && r.itemSecondarySize || r.itemSize}px` : void 0,
|
|
1719
|
+
visibility: t.nr.used ? "visible" : "hidden"
|
|
1720
|
+
}] : null,
|
|
1721
|
+
class: ["vue-recycle-scroller__item-view", [r.itemClass, { hover: !r.skipHover && l.value === t.nr.key }]]
|
|
1722
|
+
}, ge(r.skipHover ? {} : {
|
|
1723
|
+
mouseenter: () => {
|
|
1724
|
+
j(t.nr.key);
|
|
1725
|
+
},
|
|
1726
|
+
mouseleave: () => {
|
|
1727
|
+
ee();
|
|
1728
|
+
}
|
|
1729
|
+
})), {
|
|
1730
|
+
default: X((t) => [W(e.$slots, "default", I({ ref_for: !0 }, t))]),
|
|
1731
|
+
_: 2
|
|
1732
|
+
}, 1040, [
|
|
1733
|
+
"view",
|
|
1734
|
+
"item-tag",
|
|
1735
|
+
"style",
|
|
1736
|
+
"class"
|
|
1737
|
+
]))), 128)), r.items.length === 0 ? W(e.$slots, "empty", { key: 0 }) : k("", !0)]),
|
|
1738
|
+
_: 3
|
|
1739
|
+
}, 8, ["style", "class"])),
|
|
1740
|
+
e.$slots.after ? (B(), A("div", {
|
|
1741
|
+
key: 1,
|
|
1742
|
+
ref_key: "after",
|
|
1743
|
+
ref: c,
|
|
1744
|
+
class: "vue-recycle-scroller__slot"
|
|
1745
|
+
}, [W(e.$slots, "after")], 512)) : k("", !0),
|
|
1746
|
+
N(Rt, { onNotify: J(w) }, null, 8, ["onNotify"])
|
|
1747
|
+
], 34)), [[J(a), J(T)]]);
|
|
1748
|
+
}
|
|
1749
|
+
}), Bt = /* @__PURE__ */ P({
|
|
1750
|
+
inheritAttrs: !1,
|
|
1751
|
+
__name: "DynamicScroller",
|
|
1752
|
+
props: {
|
|
1753
|
+
items: {},
|
|
1754
|
+
keyField: { default: "id" },
|
|
1755
|
+
direction: { default: "vertical" },
|
|
1756
|
+
listTag: { default: "div" },
|
|
1757
|
+
itemTag: { default: "div" },
|
|
1758
|
+
minItemSize: {},
|
|
1759
|
+
shift: {
|
|
1760
|
+
type: Boolean,
|
|
1761
|
+
default: !1
|
|
1762
|
+
},
|
|
1763
|
+
cache: { default: void 0 }
|
|
1764
|
+
},
|
|
1765
|
+
emits: ["resize", "visible"],
|
|
1766
|
+
setup(e, { expose: t, emit: n }) {
|
|
1767
|
+
let r = e, i = n, a = H(), o = D(() => {
|
|
1768
|
+
var e;
|
|
1769
|
+
let t = (e = a.value) == null ? void 0 : e.el;
|
|
1770
|
+
return t && typeof t == "object" && "value" in t ? t.value : t;
|
|
1771
|
+
}), { itemsWithSize: s, forceUpdate: c, scrollToItem: l, scrollToPosition: u, findItemIndex: d, getItemOffset: f, getItemSize: p, cacheSnapshot: m, restoreCache: h, scrollToBottom: g, onScrollerResize: _, onScrollerVisible: v } = jt(D(() => ({
|
|
1772
|
+
items: r.items,
|
|
1773
|
+
keyField: r.keyField,
|
|
1774
|
+
direction: r.direction,
|
|
1775
|
+
minItemSize: r.minItemSize,
|
|
1776
|
+
shift: r.shift,
|
|
1777
|
+
cache: r.cache,
|
|
1778
|
+
el: o.value,
|
|
1779
|
+
onResize: () => i("resize"),
|
|
1780
|
+
onVisible: () => i("visible")
|
|
1781
|
+
})));
|
|
1782
|
+
function y(e, t, n) {
|
|
1783
|
+
return {
|
|
1784
|
+
item: e.item,
|
|
1785
|
+
index: t,
|
|
1786
|
+
active: n,
|
|
1787
|
+
itemWithSize: e
|
|
1788
|
+
};
|
|
1789
|
+
}
|
|
1790
|
+
return t({
|
|
1791
|
+
scrollToItem: l,
|
|
1792
|
+
scrollToPosition: u,
|
|
1793
|
+
findItemIndex: d,
|
|
1794
|
+
getItemOffset: f,
|
|
1795
|
+
scrollToBottom: g,
|
|
1796
|
+
getItemSize: p,
|
|
1797
|
+
cacheSnapshot: m,
|
|
1798
|
+
restoreCache: h,
|
|
1799
|
+
forceUpdate: c
|
|
1800
|
+
}), (e, t) => (B(), O(zt, I({
|
|
1801
|
+
ref_key: "scroller",
|
|
1802
|
+
ref: a,
|
|
1803
|
+
items: J(s),
|
|
1804
|
+
"min-item-size": r.minItemSize,
|
|
1805
|
+
direction: r.direction,
|
|
1806
|
+
cache: r.cache,
|
|
1807
|
+
"key-field": "id",
|
|
1808
|
+
"list-tag": r.listTag,
|
|
1809
|
+
"item-tag": r.itemTag
|
|
1810
|
+
}, e.$attrs, {
|
|
1811
|
+
onResize: J(_),
|
|
1812
|
+
onVisible: J(v)
|
|
1813
|
+
}), ee({
|
|
1814
|
+
default: X(({ item: t, index: n, active: r }) => [W(e.$slots, "default", ae(ne(y(t, n, r))))]),
|
|
1815
|
+
empty: X(() => [W(e.$slots, "empty")]),
|
|
1816
|
+
_: 2
|
|
1817
|
+
}, [e.$slots.before ? {
|
|
1818
|
+
name: "before",
|
|
1819
|
+
fn: X(() => [W(e.$slots, "before")]),
|
|
1820
|
+
key: "0"
|
|
1821
|
+
} : void 0, e.$slots.after ? {
|
|
1822
|
+
name: "after",
|
|
1823
|
+
fn: X(() => [W(e.$slots, "after")]),
|
|
1824
|
+
key: "1"
|
|
1825
|
+
} : void 0]), 1040, [
|
|
1826
|
+
"items",
|
|
1827
|
+
"min-item-size",
|
|
1828
|
+
"direction",
|
|
1829
|
+
"cache",
|
|
1830
|
+
"list-tag",
|
|
1831
|
+
"item-tag",
|
|
1832
|
+
"onResize",
|
|
1833
|
+
"onVisible"
|
|
1834
|
+
]));
|
|
1835
|
+
}
|
|
1836
|
+
});
|
|
1837
|
+
function Vt(e, t, n) {
|
|
1838
|
+
let r = F("vscrollMeasurementContext"), i = F("vscrollAnchorRegistry", null), a = rt(e, t, r, n);
|
|
1839
|
+
return le(() => {
|
|
1840
|
+
a.mount();
|
|
1841
|
+
}), i && Y([
|
|
1842
|
+
a.id,
|
|
1843
|
+
a.finalActive,
|
|
1844
|
+
() => q(t)
|
|
1845
|
+
], ([e, t, n], [r, a, o]) => {
|
|
1846
|
+
o && o !== n && i.delete(o), n && i.set(n, {
|
|
1847
|
+
active: t,
|
|
1848
|
+
id: e
|
|
1849
|
+
});
|
|
1850
|
+
}, { immediate: !0 }), se(() => {
|
|
1851
|
+
let e = q(t);
|
|
1852
|
+
i && e && i.delete(e), a.unmount();
|
|
1853
|
+
}), {
|
|
1854
|
+
id: a.id,
|
|
1855
|
+
size: a.size,
|
|
1856
|
+
finalActive: a.finalActive,
|
|
1857
|
+
updateSize: a.updateSize
|
|
1858
|
+
};
|
|
1859
|
+
}
|
|
1860
|
+
//#endregion
|
|
1861
|
+
//#region src/common/components/ScrollableList.vue?vue&type=script&lang.ts
|
|
1862
|
+
var Ht = P({
|
|
1863
|
+
components: {
|
|
1864
|
+
DynamicScroller: Bt,
|
|
1865
|
+
DynamicScrollerItem: /* @__PURE__ */ P({
|
|
1866
|
+
__name: "DynamicScrollerItem",
|
|
1867
|
+
props: {
|
|
1868
|
+
item: {},
|
|
1869
|
+
watchData: {
|
|
1870
|
+
type: Boolean,
|
|
1871
|
+
default: !1
|
|
1872
|
+
},
|
|
1873
|
+
active: { type: Boolean },
|
|
1874
|
+
index: { default: void 0 },
|
|
1875
|
+
sizeDependencies: { default: null },
|
|
1876
|
+
emitResize: {
|
|
1877
|
+
type: Boolean,
|
|
1878
|
+
default: !1
|
|
1879
|
+
},
|
|
1880
|
+
tag: { default: "div" }
|
|
1881
|
+
},
|
|
1882
|
+
emits: ["resize"],
|
|
1883
|
+
setup(e, { emit: t }) {
|
|
1884
|
+
let n = e, r = t, i = H();
|
|
1885
|
+
return Vt(n, i, { onResize: (e) => r("resize", e) }), (e, t) => (B(), O(pe(n.tag), {
|
|
1886
|
+
ref_key: "el",
|
|
1887
|
+
ref: i
|
|
1888
|
+
}, {
|
|
1889
|
+
default: X(() => [W(e.$slots, "default")]),
|
|
1890
|
+
_: 3
|
|
1891
|
+
}, 512));
|
|
1892
|
+
}
|
|
1893
|
+
}),
|
|
1894
|
+
RecycleScroller: zt
|
|
1895
|
+
},
|
|
1896
|
+
props: {
|
|
1897
|
+
items: {
|
|
1898
|
+
type: Array,
|
|
1899
|
+
required: !0
|
|
1900
|
+
},
|
|
1901
|
+
height: {
|
|
1902
|
+
type: String,
|
|
1903
|
+
default: "60vh"
|
|
1904
|
+
},
|
|
1905
|
+
keyField: {
|
|
1906
|
+
type: String,
|
|
1907
|
+
default: "name"
|
|
1908
|
+
},
|
|
1909
|
+
fixedItemSize: {
|
|
1910
|
+
type: Number,
|
|
1911
|
+
default: void 0
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
});
|
|
1915
|
+
//#endregion
|
|
1916
|
+
//#region src/common/components/ScrollableList.vue
|
|
1917
|
+
function Ut(e, t, n, r, i, a) {
|
|
1918
|
+
let o = G("RecycleScroller"), s = G("DynamicScrollerItem"), c = G("DynamicScroller");
|
|
1919
|
+
return e.items.length > 200 && e.fixedItemSize !== void 0 ? (B(), O(o, {
|
|
1920
|
+
key: 0,
|
|
1921
|
+
class: "pis-scroll",
|
|
1922
|
+
"key-field": e.keyField,
|
|
1923
|
+
style: z({ maxHeight: e.height }),
|
|
1924
|
+
items: e.items,
|
|
1925
|
+
"item-size": e.fixedItemSize,
|
|
1926
|
+
buffer: 96,
|
|
1927
|
+
"skip-hover": !0
|
|
1928
|
+
}, {
|
|
1929
|
+
default: X((t) => [t ? W(e.$slots, "item", { item: t.item }, void 0, void 0, 0) : k("", !0)]),
|
|
1930
|
+
_: 3
|
|
1931
|
+
}, 8, [
|
|
1932
|
+
"key-field",
|
|
1933
|
+
"style",
|
|
1934
|
+
"items",
|
|
1935
|
+
"item-size"
|
|
1936
|
+
])) : e.items.length > 200 ? (B(), O(c, {
|
|
1937
|
+
key: 1,
|
|
1938
|
+
class: "pis-scroll",
|
|
1939
|
+
"key-field": e.keyField,
|
|
1940
|
+
style: z({ maxHeight: e.height }),
|
|
1941
|
+
items: e.items,
|
|
1942
|
+
"min-item-size": 50,
|
|
1943
|
+
buffer: 96,
|
|
1944
|
+
"skip-hover": !0
|
|
1945
|
+
}, {
|
|
1946
|
+
default: X(({ item: t, index: n, active: r }) => [N(s, {
|
|
1947
|
+
item: t,
|
|
1948
|
+
active: r,
|
|
1949
|
+
"size-dependencies": [t.name],
|
|
1950
|
+
"data-index": n
|
|
1951
|
+
}, {
|
|
1952
|
+
default: X(() => [W(e.$slots, "item", { item: t })]),
|
|
1953
|
+
_: 2
|
|
1954
|
+
}, 1032, [
|
|
1955
|
+
"item",
|
|
1956
|
+
"active",
|
|
1957
|
+
"size-dependencies",
|
|
1958
|
+
"data-index"
|
|
1959
|
+
])]),
|
|
1960
|
+
_: 3
|
|
1961
|
+
}, 8, [
|
|
1962
|
+
"key-field",
|
|
1963
|
+
"style",
|
|
1964
|
+
"items"
|
|
1965
|
+
])) : (B(), A("div", {
|
|
1966
|
+
key: 2,
|
|
1967
|
+
class: "pis-scroll",
|
|
1968
|
+
style: z([{ "overflow-y": "auto" }, { maxHeight: e.height }])
|
|
1969
|
+
}, [(B(!0), A(E, null, U(e.items, (t, n) => W(e.$slots, "item", { item: t }, void 0, void 0, n)), 128))], 4));
|
|
1970
|
+
}
|
|
1971
|
+
var Wt = /*#__PURE__*/ x(Ht, [["render", Ut]]), Gt = P({
|
|
1972
|
+
components: {
|
|
1973
|
+
Clickable: a,
|
|
1974
|
+
ScrollableList: Wt
|
|
1975
|
+
},
|
|
1976
|
+
props: {
|
|
1977
|
+
items: {
|
|
1978
|
+
type: Array,
|
|
1979
|
+
required: !0
|
|
1980
|
+
},
|
|
1981
|
+
currentAttributeCode: {
|
|
1982
|
+
type: String,
|
|
1983
|
+
default: void 0
|
|
1984
|
+
},
|
|
1985
|
+
height: {
|
|
1986
|
+
type: String,
|
|
1987
|
+
default: void 0
|
|
1988
|
+
}
|
|
1989
|
+
},
|
|
1990
|
+
emits: ["item-click"],
|
|
1991
|
+
computed: { isReady() {
|
|
1992
|
+
return this.$props.items && this.$props.items.length;
|
|
1993
|
+
} },
|
|
1994
|
+
methods: { clickableClass(e) {
|
|
1995
|
+
return this.$props.currentAttributeCode === e.attributeCode && "active";
|
|
1996
|
+
} }
|
|
1997
|
+
}), Kt = { class: "text-break" }, qt = { class: "small text-muted text-nowrap ms-2" };
|
|
1998
|
+
function Jt(e, t, n, r, i, a) {
|
|
1999
|
+
let o = G("Clickable"), s = G("ScrollableList"), c = fe("safe-html");
|
|
2000
|
+
return e.isReady ? (B(), O(s, {
|
|
2001
|
+
key: 0,
|
|
2002
|
+
class: "list-group list-group-flush",
|
|
2003
|
+
"key-field": "attributeCode",
|
|
2004
|
+
items: e.items,
|
|
2005
|
+
height: e.height
|
|
2006
|
+
}, {
|
|
2007
|
+
item: X(({ item: t }) => [j("div", { class: R(e.items.length > 200 && "pb-1") }, [N(o, {
|
|
2008
|
+
class: R(["list-group-item list-group-item-action d-flex align-items-start border-0 user-select-none", [e.clickableClass(t)]]),
|
|
2009
|
+
onClick: Q((n) => e.$emit("item-click", t), ["prevent"])
|
|
2010
|
+
}, {
|
|
2011
|
+
default: X(() => [j("span", Kt, [Z(j("span", { class: R(["pis-label", e.currentAttributeCode === t.attributeCode && "fw-bold"]) }, null, 2), [[c, t.attributeNameHtml]]), j("span", qt, "(" + K(t.hitCount) + ")", 1)])]),
|
|
2012
|
+
_: 2
|
|
2013
|
+
}, 1032, ["class", "onClick"])], 2)]),
|
|
2014
|
+
_: 1
|
|
2015
|
+
}, 8, ["items", "height"])) : k("", !0);
|
|
2016
|
+
}
|
|
2017
|
+
var Yt = /*#__PURE__*/ x(Gt, [["render", Jt]]), Xt = P({
|
|
2018
|
+
components: { Icon: f },
|
|
2019
|
+
props: { icon: {
|
|
2020
|
+
type: String,
|
|
2021
|
+
default: void 0
|
|
2022
|
+
} }
|
|
2023
|
+
}), Zt = { class: "d-flex btn btn-link btn-sm" };
|
|
2024
|
+
function Qt(e, t, n, r, i, a) {
|
|
2025
|
+
let o = G("Icon");
|
|
2026
|
+
return B(), A("button", Zt, [e.icon ? (B(), O(o, {
|
|
2027
|
+
key: 0,
|
|
2028
|
+
name: e.icon,
|
|
2029
|
+
class: "me-2"
|
|
2030
|
+
}, null, 8, ["name"])) : k("", !0), W(e.$slots, "default")]);
|
|
2031
|
+
}
|
|
2032
|
+
var $t = /*#__PURE__*/ x(Xt, [["render", Qt]]), en = P({}), tn = { class: "small text-muted mb-0 pis-message" };
|
|
2033
|
+
function nn(e, t, n, r, i, a) {
|
|
2034
|
+
return B(), A("p", tn, [W(e.$slots, "default")]);
|
|
2035
|
+
}
|
|
2036
|
+
var rn = /*#__PURE__*/ x(en, [["render", nn]]), an = P({
|
|
2037
|
+
components: {
|
|
2038
|
+
Modal: Me,
|
|
2039
|
+
Spinner: b,
|
|
2040
|
+
Btn: m,
|
|
2041
|
+
LinkSecondary: $t,
|
|
2042
|
+
FormInputClearable: p,
|
|
2043
|
+
ScrollableList: Wt,
|
|
2044
|
+
Message: rn,
|
|
2045
|
+
FiltersList: Yt,
|
|
2046
|
+
Arrow: Fe
|
|
2047
|
+
},
|
|
2048
|
+
props: {
|
|
2049
|
+
show: Boolean,
|
|
2050
|
+
title: {
|
|
2051
|
+
type: String,
|
|
2052
|
+
required: !0
|
|
2053
|
+
},
|
|
2054
|
+
isMobile: Boolean,
|
|
2055
|
+
t: {
|
|
2056
|
+
type: Function,
|
|
2057
|
+
required: !0
|
|
2058
|
+
},
|
|
2059
|
+
filtersAll: {
|
|
2060
|
+
type: Array,
|
|
2061
|
+
default: void 0
|
|
2062
|
+
},
|
|
2063
|
+
filtersPromoted: {
|
|
2064
|
+
type: Array,
|
|
2065
|
+
default: void 0
|
|
2066
|
+
},
|
|
2067
|
+
filtersAdditional: {
|
|
2068
|
+
type: Array,
|
|
2069
|
+
default: void 0
|
|
2070
|
+
},
|
|
2071
|
+
filtersLoading: Boolean,
|
|
2072
|
+
filtersFetched: Map,
|
|
2073
|
+
filtersModel: {
|
|
2074
|
+
type: Object,
|
|
2075
|
+
default: void 0
|
|
2076
|
+
},
|
|
2077
|
+
filteredResultCount: {
|
|
2078
|
+
type: Number,
|
|
2079
|
+
default: void 0
|
|
2080
|
+
},
|
|
2081
|
+
filteredResultCountLoading: Boolean,
|
|
2082
|
+
fetchFilterValues: {
|
|
2083
|
+
type: Function,
|
|
2084
|
+
required: !0
|
|
2085
|
+
},
|
|
2086
|
+
clearFiltersModelFromEmptyValues: {
|
|
2087
|
+
type: Function,
|
|
2088
|
+
default: void 0
|
|
2089
|
+
},
|
|
2090
|
+
resetFilterOnOpen: {
|
|
2091
|
+
type: Boolean,
|
|
2092
|
+
default: !1
|
|
2093
|
+
},
|
|
2094
|
+
availableFiltersLabelSuffix: {
|
|
2095
|
+
type: String,
|
|
2096
|
+
default: ""
|
|
2097
|
+
}
|
|
2098
|
+
},
|
|
2099
|
+
emits: [
|
|
2100
|
+
"update:show",
|
|
2101
|
+
"value-change",
|
|
2102
|
+
"apply-filters",
|
|
2103
|
+
"clear"
|
|
2104
|
+
],
|
|
2105
|
+
setup(e, { emit: t }) {
|
|
2106
|
+
let n = H(!1), r = H(null), a = H(!1), o = H(""), s = H(""), c = H(), u = 0, d = D(() => {
|
|
2107
|
+
var t;
|
|
2108
|
+
return (t = e.filtersAll) == null ? void 0 : t.find(({ attributeCode: e }) => r.value === e);
|
|
2109
|
+
}), f = D(() => {
|
|
2110
|
+
if (o.value.length) {
|
|
2111
|
+
var t;
|
|
2112
|
+
let n = o.value.toLowerCase();
|
|
2113
|
+
return (t = e.filtersAdditional) == null ? void 0 : t.filter(({ attributeName: e }) => e.toLowerCase().includes(n));
|
|
2114
|
+
}
|
|
2115
|
+
return e.filtersAdditional;
|
|
2116
|
+
}), p = D(() => {
|
|
2117
|
+
var t;
|
|
2118
|
+
if ((t = e.filtersPromoted) != null && t.length && o.value.length) {
|
|
2119
|
+
var n;
|
|
2120
|
+
let t = o.value.toLowerCase();
|
|
2121
|
+
return (n = e.filtersPromoted) == null ? void 0 : n.filter(({ attributeName: e }) => e.toLowerCase().includes(t));
|
|
2122
|
+
}
|
|
2123
|
+
return e.filtersPromoted;
|
|
2124
|
+
}), m = D(() => {
|
|
2125
|
+
var t;
|
|
2126
|
+
if (r.value && (t = e.filtersFetched) != null && t.has(r.value)) {
|
|
2127
|
+
var n;
|
|
2128
|
+
return (n = e.filtersFetched) == null ? void 0 : n.get(r.value);
|
|
2129
|
+
}
|
|
2130
|
+
return null;
|
|
2131
|
+
});
|
|
2132
|
+
Y(() => e.show, (t) => {
|
|
2133
|
+
if (t === !0 && e.resetFilterOnOpen) {
|
|
2134
|
+
var n, i;
|
|
2135
|
+
(n = e.filtersAll) != null && n.length && !((i = e.filtersAll) != null && i.some(({ attributeCode: e }) => e === r.value)) ? T() : h();
|
|
2136
|
+
}
|
|
2137
|
+
});
|
|
2138
|
+
let h = () => {
|
|
2139
|
+
if (r.value && e.show) {
|
|
2140
|
+
var t;
|
|
2141
|
+
(t = e.filtersFetched) != null && t.has(r.value) || e.fetchFilterValues([r.value]);
|
|
2142
|
+
}
|
|
2143
|
+
}, g = D(() => {
|
|
2144
|
+
if (m.value) if (s.value.length) {
|
|
2145
|
+
var e;
|
|
2146
|
+
let t = s.value.toLowerCase();
|
|
2147
|
+
return (e = m.value) == null ? void 0 : e.filter(({ text: e }) => e.toLowerCase().includes(t));
|
|
2148
|
+
} else return m.value;
|
|
2149
|
+
return null;
|
|
2150
|
+
}), _ = async ({ attributeCode: t }) => {
|
|
2151
|
+
var i;
|
|
2152
|
+
if (!t) return;
|
|
2153
|
+
let a = ++u;
|
|
2154
|
+
if (s.value = "", r.value = t, (i = e.filtersFetched) != null && i.has(t)) {
|
|
2155
|
+
n.value = !1;
|
|
2156
|
+
return;
|
|
2157
|
+
}
|
|
2158
|
+
n.value = !0;
|
|
2159
|
+
try {
|
|
2160
|
+
await e.fetchFilterValues([t]);
|
|
2161
|
+
} finally {
|
|
2162
|
+
a === u && (n.value = !1);
|
|
2163
|
+
}
|
|
2164
|
+
}, v = (e, n, r) => {
|
|
2165
|
+
a.value = !0, t("value-change", {
|
|
2166
|
+
attributeCode: n,
|
|
2167
|
+
filterValueName: r,
|
|
2168
|
+
value: l(e)[0].checked
|
|
2169
|
+
});
|
|
2170
|
+
}, y = C((e) => o.value = e, 200), b = () => o.value = "", x = C((e) => s.value = e, 200), S = () => s.value = "", w, T = () => {
|
|
2171
|
+
let e = ++u;
|
|
2172
|
+
n.value = !1, w && clearTimeout(w), w = setTimeout(() => {
|
|
2173
|
+
w = void 0, e === u && (r.value = null);
|
|
2174
|
+
}, 50);
|
|
2175
|
+
};
|
|
2176
|
+
se(() => {
|
|
2177
|
+
u++, w && clearTimeout(w), y.cancel(), x.cancel();
|
|
2178
|
+
});
|
|
2179
|
+
let E = () => {
|
|
2180
|
+
u++, n.value = !1, r.value = null, t("clear");
|
|
2181
|
+
}, O = H("300px"), k = H("300px");
|
|
2182
|
+
return {
|
|
2183
|
+
areFiltersDirty: a,
|
|
2184
|
+
currentFilterData: d,
|
|
2185
|
+
currentFilterValues: m,
|
|
2186
|
+
filterValuesLoading: n,
|
|
2187
|
+
filtersSectionHeight: O,
|
|
2188
|
+
filtersSectionRightHeight: k,
|
|
2189
|
+
applyFilterNameSearch: y,
|
|
2190
|
+
currentFilterAttrCode: r,
|
|
2191
|
+
applyFilterValueSearch: x,
|
|
2192
|
+
filtersPromotedSearched: p,
|
|
2193
|
+
filterValueSearchPhrase: s,
|
|
2194
|
+
filtersAdditionalSearched: f,
|
|
2195
|
+
currentFilterValuesSearched: g,
|
|
2196
|
+
modalFooter: c,
|
|
2197
|
+
clear: E,
|
|
2198
|
+
openFilter: _,
|
|
2199
|
+
onValueChange: v,
|
|
2200
|
+
resetFilterNameSearch: b,
|
|
2201
|
+
criterionValueKey: i,
|
|
2202
|
+
resetFilterValueSearch: S,
|
|
2203
|
+
resetCurrentFilterAttrCode: T,
|
|
2204
|
+
modalResize: (t) => {
|
|
2205
|
+
var n;
|
|
2206
|
+
let r = t.height - 110;
|
|
2207
|
+
(n = e.filtersPromoted) != null && n.length ? O.value = r / 2 - 20 + "px" : O.value = r + "px", k.value = r + "px";
|
|
2208
|
+
},
|
|
2209
|
+
handleModalClose: (r) => {
|
|
2210
|
+
r || (u++, n.value = !1, e.clearFiltersModelFromEmptyValues && e.clearFiltersModelFromEmptyValues()), t("update:show", r);
|
|
2211
|
+
}
|
|
2212
|
+
};
|
|
2213
|
+
}
|
|
2214
|
+
}), on = {
|
|
2215
|
+
class: "row gx-3 gy-3",
|
|
2216
|
+
style: {
|
|
2217
|
+
height: "calc(100vh - 200px)",
|
|
2218
|
+
"max-height": "800px"
|
|
2219
|
+
}
|
|
2220
|
+
}, sn = {
|
|
2221
|
+
key: 0,
|
|
2222
|
+
class: "h-100 d-flex align-items-center justify-content-center"
|
|
2223
|
+
}, cn = {
|
|
2224
|
+
key: 0,
|
|
2225
|
+
class: "mb-3"
|
|
2226
|
+
}, ln = { key: 1 }, un = {
|
|
2227
|
+
key: 0,
|
|
2228
|
+
class: "text-center py-4"
|
|
2229
|
+
}, dn = { key: 1 }, fn = { key: 0 }, pn = { class: "mb-4" }, mn = { class: "form-check pe-1" }, hn = { class: "form-check-label pis-label d-flex align-items-start py-1 ms-2" }, gn = [
|
|
2230
|
+
"checked",
|
|
2231
|
+
"name",
|
|
2232
|
+
"onInput"
|
|
2233
|
+
], _n = { class: "text-break" }, vn = ["textContent"], yn = { class: "text-muted small text-nowrap ms-1" }, bn = {
|
|
2234
|
+
key: 1,
|
|
2235
|
+
class: "pis-message"
|
|
2236
|
+
}, xn = {
|
|
2237
|
+
key: 1,
|
|
2238
|
+
class: "pis-message pis-message-error"
|
|
2239
|
+
}, Sn = {
|
|
2240
|
+
key: 2,
|
|
2241
|
+
class: "h-100 d-flex align-items-center"
|
|
2242
|
+
}, Cn = {
|
|
2243
|
+
ref: "modalFooter",
|
|
2244
|
+
class: "w-100 d-flex align-items-center justify-content-center"
|
|
2245
|
+
};
|
|
2246
|
+
function wn(e, t, n, r, i, a) {
|
|
2247
|
+
let o = G("Spinner"), s = G("FormInputClearable"), c = G("FiltersList"), l = G("Message"), u = G("ScrollableList"), d = G("LinkSecondary"), f = G("Arrow"), p = G("Btn"), m = G("Modal"), h = fe("safe-html");
|
|
2248
|
+
return B(), O(m, {
|
|
2249
|
+
show: e.show,
|
|
2250
|
+
title: e.t("Filters", !0),
|
|
2251
|
+
xl: "",
|
|
2252
|
+
"onUpdate:show": e.handleModalClose,
|
|
2253
|
+
onResize: e.modalResize
|
|
2254
|
+
}, {
|
|
2255
|
+
footer: X(() => [j("div", Cn, [
|
|
2256
|
+
N(d, {
|
|
2257
|
+
icon: "stop-not-allowed",
|
|
2258
|
+
class: "ext-clear",
|
|
2259
|
+
onClick: e.clear
|
|
2260
|
+
}, {
|
|
2261
|
+
default: X(() => [M(K(e.t("ClearFilters", !0)), 1)]),
|
|
2262
|
+
_: 1
|
|
2263
|
+
}, 8, ["onClick"]),
|
|
2264
|
+
e.isMobile && e.currentFilterAttrCode ? (B(), O(p, {
|
|
2265
|
+
key: 0,
|
|
2266
|
+
class: "ms-4 ext-reset",
|
|
2267
|
+
onClick: Q(e.resetCurrentFilterAttrCode, ["prevent"])
|
|
2268
|
+
}, {
|
|
2269
|
+
default: X(() => [N(f, {
|
|
2270
|
+
dir: "left",
|
|
2271
|
+
class: "me-2"
|
|
2272
|
+
}), M(" " + K(e.t("ApproveFilterValuesSelected")), 1)]),
|
|
2273
|
+
_: 1
|
|
2274
|
+
}, 8, ["onClick"])) : k("", !0),
|
|
2275
|
+
!e.isMobile || !e.currentFilterAttrCode ? (B(), O(p, {
|
|
2276
|
+
key: 1,
|
|
2277
|
+
icon: "check-mark-circle",
|
|
2278
|
+
class: "ms-4 ext-apply",
|
|
2279
|
+
disabled: e.areFiltersDirty !== !0 || e.filteredResultCount === 0,
|
|
2280
|
+
"is-loading": e.filteredResultCountLoading,
|
|
2281
|
+
onClick: t[0] || (t[0] = Q((t) => e.$emit("apply-filters"), ["prevent"]))
|
|
2282
|
+
}, {
|
|
2283
|
+
default: X(() => [e.filteredResultCount === null ? (B(), A(E, { key: 0 }, [M(K(e.t("ShowResults", !0)), 1)], 64)) : e.filteredResultCount === 0 ? (B(), A(E, { key: 1 }, [M(K(e.t("NoFilteringResultsFound")), 1)], 64)) : (B(), A(E, { key: 2 }, [M(K(e.t("ShowNResults", !0, [e.filteredResultCount || 0])), 1)], 64))]),
|
|
2284
|
+
_: 1
|
|
2285
|
+
}, 8, ["disabled", "is-loading"])) : k("", !0)
|
|
2286
|
+
], 512)]),
|
|
2287
|
+
default: X(() => {
|
|
2288
|
+
var t, n, r, i, a, d, f, p;
|
|
2289
|
+
return [j("div", on, [Z(j("div", { class: R({
|
|
2290
|
+
"col-6": !e.isMobile,
|
|
2291
|
+
"col-12": e.isMobile
|
|
2292
|
+
}) }, [e.filtersLoading ? (B(), A("div", sn, [N(o)])) : (B(), A(E, { key: 1 }, [
|
|
2293
|
+
N(s, {
|
|
2294
|
+
placeholder: e.t("FindFilterAttribute"),
|
|
2295
|
+
class: "mb-4",
|
|
2296
|
+
"onUpdate:modelValue": e.applyFilterNameSearch,
|
|
2297
|
+
onClear: e.resetFilterNameSearch
|
|
2298
|
+
}, null, 8, [
|
|
2299
|
+
"placeholder",
|
|
2300
|
+
"onUpdate:modelValue",
|
|
2301
|
+
"onClear"
|
|
2302
|
+
]),
|
|
2303
|
+
(t = e.filtersPromoted) != null && t.length ? (B(), A("div", cn, [j("p", null, [j("strong", null, K(e.t("FiltersPromoted")), 1)]), (n = e.filtersPromotedSearched) != null && n.length ? (B(), O(c, {
|
|
2304
|
+
key: 0,
|
|
2305
|
+
height: e.filtersSectionHeight,
|
|
2306
|
+
items: e.filtersPromotedSearched,
|
|
2307
|
+
"current-attribute-code": (r = e.currentFilterData) == null ? void 0 : r.attributeCode,
|
|
2308
|
+
onItemClick: e.openFilter
|
|
2309
|
+
}, null, 8, [
|
|
2310
|
+
"height",
|
|
2311
|
+
"items",
|
|
2312
|
+
"current-attribute-code",
|
|
2313
|
+
"onItemClick"
|
|
2314
|
+
])) : (B(), O(l, { key: 1 }, {
|
|
2315
|
+
default: X(() => [M(K(e.t("NoFiltersSearchFound")), 1)]),
|
|
2316
|
+
_: 1
|
|
2317
|
+
}))])) : k("", !0),
|
|
2318
|
+
(i = e.filtersAdditional) != null && i.length ? (B(), A("div", ln, [j("p", null, [j("strong", null, K((a = e.filtersPromoted) != null && a.length ? e.t("AdditionalFilters") : e.t("AvailableFilters")) + K(e.availableFiltersLabelSuffix), 1)]), (d = e.filtersAdditionalSearched) != null && d.length ? (B(), O(c, {
|
|
2319
|
+
key: 0,
|
|
2320
|
+
height: e.filtersSectionHeight,
|
|
2321
|
+
items: e.filtersAdditionalSearched,
|
|
2322
|
+
"current-attribute-code": (f = e.currentFilterData) == null ? void 0 : f.attributeCode,
|
|
2323
|
+
onItemClick: e.openFilter
|
|
2324
|
+
}, null, 8, [
|
|
2325
|
+
"height",
|
|
2326
|
+
"items",
|
|
2327
|
+
"current-attribute-code",
|
|
2328
|
+
"onItemClick"
|
|
2329
|
+
])) : (B(), O(l, { key: 1 }, {
|
|
2330
|
+
default: X(() => [M(K(e.t("NoFiltersSearchFound")), 1)]),
|
|
2331
|
+
_: 1
|
|
2332
|
+
}))])) : k("", !0)
|
|
2333
|
+
], 64))], 2), [[_e, !e.isMobile || !(e.currentFilterAttrCode || e.filterValuesLoading)]]), Z(j("div", { class: R({
|
|
2334
|
+
"col-6": !e.isMobile,
|
|
2335
|
+
"col-12": e.isMobile
|
|
2336
|
+
}) }, [e.filterValuesLoading ? (B(), A("div", un, [N(o)])) : e.currentFilterAttrCode ? (B(), A("div", dn, [e.currentFilterValues && e.currentFilterData ? (B(), A("div", fn, [
|
|
2337
|
+
j("div", pn, [N(s, {
|
|
2338
|
+
placeholder: e.t("FindFilterValue"),
|
|
2339
|
+
class: "mb-4",
|
|
2340
|
+
"onUpdate:modelValue": e.applyFilterValueSearch,
|
|
2341
|
+
onClear: e.resetFilterValueSearch
|
|
2342
|
+
}, null, 8, [
|
|
2343
|
+
"placeholder",
|
|
2344
|
+
"onUpdate:modelValue",
|
|
2345
|
+
"onClear"
|
|
2346
|
+
])]),
|
|
2347
|
+
j("p", null, [Z(j("strong", null, null, 512), [[h, e.currentFilterData.attributeNameHtml]])]),
|
|
2348
|
+
(p = e.currentFilterValuesSearched) != null && p.length && e.filtersModel ? (B(), O(u, {
|
|
2349
|
+
key: 0,
|
|
2350
|
+
class: "list-group list-group-flush",
|
|
2351
|
+
items: e.currentFilterValuesSearched,
|
|
2352
|
+
height: e.filtersSectionRightHeight,
|
|
2353
|
+
"key-field": "_key"
|
|
2354
|
+
}, {
|
|
2355
|
+
item: X(({ item: t }) => {
|
|
2356
|
+
var n;
|
|
2357
|
+
return [j("div", { class: R(e.currentFilterValuesSearched.length > 200 && "pb-1") }, [j("div", mn, [j("label", hn, [j("input", {
|
|
2358
|
+
type: "checkbox",
|
|
2359
|
+
class: "form-check-input mt-1 me-2 flex-shrink-0",
|
|
2360
|
+
checked: (n = e.filtersModel[e.currentFilterData.attributeCode]) == null ? void 0 : n[e.criterionValueKey(t.value)],
|
|
2361
|
+
name: t.text,
|
|
2362
|
+
onInput: (n) => {
|
|
2363
|
+
var r;
|
|
2364
|
+
return e.onValueChange(n, ((r = e.currentFilterData) == null ? void 0 : r.attributeCode) || "", e.criterionValueKey(t.value));
|
|
2365
|
+
}
|
|
2366
|
+
}, null, 40, gn), j("span", _n, [j("span", {
|
|
2367
|
+
class: "text-break user-select-none",
|
|
2368
|
+
textContent: K(t.text)
|
|
2369
|
+
}, null, 8, vn), j("span", yn, "(" + K(t.hitCount) + ")", 1)])])])], 2)];
|
|
2370
|
+
}),
|
|
2371
|
+
_: 1
|
|
2372
|
+
}, 8, ["items", "height"])) : (B(), A("p", bn, K(e.t("NoFilterValuesSearchFound")), 1))
|
|
2373
|
+
])) : (B(), A("p", xn, K(e.t("NoFilterValues")), 1))])) : (B(), A("div", Sn, [N(l, null, {
|
|
2374
|
+
default: X(() => [M(K(e.t("SelectFilter")), 1)]),
|
|
2375
|
+
_: 1
|
|
2376
|
+
})]))], 2), [[_e, !e.isMobile || e.currentFilterAttrCode || e.filterValuesLoading]])])];
|
|
2377
|
+
}),
|
|
2378
|
+
_: 1
|
|
2379
|
+
}, 8, [
|
|
2380
|
+
"show",
|
|
2381
|
+
"title",
|
|
2382
|
+
"onUpdate:show",
|
|
2383
|
+
"onResize"
|
|
2384
|
+
]);
|
|
2385
|
+
}
|
|
2386
|
+
var Tn = /*#__PURE__*/ x(an, [["render", wn]]), En = P({
|
|
2387
|
+
components: {
|
|
2388
|
+
Spinner: b,
|
|
2389
|
+
Icon: f
|
|
2390
|
+
},
|
|
2391
|
+
props: {
|
|
2392
|
+
src: {
|
|
2393
|
+
type: String,
|
|
2394
|
+
default: void 0
|
|
2395
|
+
},
|
|
2396
|
+
active: Boolean,
|
|
2397
|
+
clickable: {
|
|
2398
|
+
type: Boolean,
|
|
2399
|
+
default: !0
|
|
2400
|
+
},
|
|
2401
|
+
hideFrame: Boolean,
|
|
2402
|
+
isLoading: Boolean,
|
|
2403
|
+
maxSize: {
|
|
2404
|
+
type: Number,
|
|
2405
|
+
default: void 0
|
|
2406
|
+
},
|
|
2407
|
+
maxSizeCss: {
|
|
2408
|
+
type: String,
|
|
2409
|
+
default: void 0
|
|
2410
|
+
},
|
|
2411
|
+
padding: {
|
|
2412
|
+
type: Number,
|
|
2413
|
+
default: 0
|
|
2414
|
+
},
|
|
2415
|
+
lazyLoading: Boolean
|
|
2416
|
+
}
|
|
2417
|
+
}), Dn = ["src", "loading"];
|
|
2418
|
+
function On(e, t, n, r, i, a) {
|
|
2419
|
+
let o = G("Spinner"), s = G("Icon");
|
|
2420
|
+
return B(), A("div", {
|
|
2421
|
+
class: R(["ratio ratio-1x1 flex-shrink-0 pis-image", [
|
|
2422
|
+
e.src || e.isLoading ? "bg-white" : "bg-light",
|
|
2423
|
+
e.active && "border-primary",
|
|
2424
|
+
!e.hideFrame && "border"
|
|
2425
|
+
]]),
|
|
2426
|
+
style: z({ cursor: e.clickable ? "pointer" : "default" })
|
|
2427
|
+
}, [j("div", { class: R(["d-flex align-items-center justify-content-center", "p-" + e.padding]) }, [e.isLoading ? (B(), O(o, {
|
|
2428
|
+
key: 0,
|
|
2429
|
+
sm: ""
|
|
2430
|
+
})) : e.src ? (B(), A("img", {
|
|
2431
|
+
key: 1,
|
|
2432
|
+
class: "w-100 h-100",
|
|
2433
|
+
style: z([{ "object-fit": "contain" }, [e.maxSize ? `max-width: ${e.maxSize}px; max-height: ${e.maxSize}px;` : null, e.maxSizeCss ? `max-width: ${e.maxSizeCss}; max-height: ${e.maxSizeCss};` : null].filter(Boolean)]),
|
|
2434
|
+
src: e.src,
|
|
2435
|
+
loading: e.lazyLoading ? "lazy" : "eager"
|
|
2436
|
+
}, null, 12, Dn)) : (B(), O(s, {
|
|
2437
|
+
key: 2,
|
|
2438
|
+
name: "photo-picture",
|
|
2439
|
+
class: "opacity-25",
|
|
2440
|
+
size: 32
|
|
2441
|
+
}))], 2)], 6);
|
|
2442
|
+
}
|
|
2443
|
+
var kn = /*#__PURE__*/ x(En, [["render", On]]), An = P({
|
|
2444
|
+
components: {
|
|
2445
|
+
Modal: Me,
|
|
2446
|
+
Image: kn,
|
|
2447
|
+
Arrow: Fe,
|
|
2448
|
+
Clickable: a
|
|
2449
|
+
},
|
|
2450
|
+
props: {
|
|
2451
|
+
images: {
|
|
2452
|
+
type: Array,
|
|
2453
|
+
default: void 0
|
|
2454
|
+
},
|
|
2455
|
+
showPreview: Boolean,
|
|
2456
|
+
hideThumbnails: Boolean,
|
|
2457
|
+
disableModal: Boolean,
|
|
2458
|
+
isLoading: Boolean,
|
|
2459
|
+
alwaysShowThumbnails: Boolean,
|
|
2460
|
+
showOverlayArrows: Boolean,
|
|
2461
|
+
title: {
|
|
2462
|
+
type: String,
|
|
2463
|
+
default: void 0
|
|
2464
|
+
}
|
|
2465
|
+
},
|
|
2466
|
+
setup(e) {
|
|
2467
|
+
let t = H(!1), n = H(0), r = D(() => {
|
|
2468
|
+
var t;
|
|
2469
|
+
return (t = e.images) != null && t.length ? e.images[n.value] : null;
|
|
2470
|
+
}), i = () => {
|
|
2471
|
+
var n;
|
|
2472
|
+
!e.disableModal && !((n = r.value) != null && n.noImage) && (t.value = !0);
|
|
2473
|
+
};
|
|
2474
|
+
return Y(() => e.images, () => {
|
|
2475
|
+
n.value = 0;
|
|
2476
|
+
}), {
|
|
2477
|
+
imageModalShown: t,
|
|
2478
|
+
currentIndex: n,
|
|
2479
|
+
currentImage: r,
|
|
2480
|
+
openImageModal: i,
|
|
2481
|
+
nextImage: () => {
|
|
2482
|
+
if (e.images) {
|
|
2483
|
+
let t = n.value;
|
|
2484
|
+
n.value = t < e.images.length - 1 ? t + 1 : 0;
|
|
2485
|
+
}
|
|
2486
|
+
},
|
|
2487
|
+
previousImage: () => {
|
|
2488
|
+
if (e.images) {
|
|
2489
|
+
let t = n.value;
|
|
2490
|
+
n.value = t === 0 ? e.images.length - 1 : t - 1;
|
|
2491
|
+
}
|
|
2492
|
+
},
|
|
2493
|
+
onItemClick: (t) => {
|
|
2494
|
+
n.value = t, e.showPreview || i();
|
|
2495
|
+
}
|
|
2496
|
+
};
|
|
2497
|
+
}
|
|
2498
|
+
}), jn = { class: "position-relative" }, Mn = {
|
|
2499
|
+
key: 0,
|
|
2500
|
+
class: "col-12 d-flex align-items-center justify-content-center pt-2 position-relative"
|
|
2501
|
+
}, Nn = { class: "d-flex flex-grow-1 justify-content-center" }, Pn = {
|
|
2502
|
+
key: 1,
|
|
2503
|
+
class: "position-relative"
|
|
2504
|
+
}, Fn = {
|
|
2505
|
+
key: 0,
|
|
2506
|
+
class: "position-relative ext-gallery-modal"
|
|
2507
|
+
}, In = { class: "px-2 position-absolute top-50 start-0 text-dark fs-3 ext-arrow-left" }, Ln = ["src"], Rn = { class: "px-2 position-absolute top-50 end-0 text-dark fs-3 ext-arrow-right" };
|
|
2508
|
+
function zn(e, t, n, r, i, a) {
|
|
2509
|
+
let o = G("Image"), s = G("Clickable"), c = G("Arrow"), l = G("Modal");
|
|
2510
|
+
return B(), A(E, null, [e.images && e.images.length ? (B(), A("div", {
|
|
2511
|
+
key: 0,
|
|
2512
|
+
class: R(["pis-gallery", [e.showPreview ? "row g-2" : "d-flex flex-wrap"]]),
|
|
2513
|
+
style: { "max-width": "700px" }
|
|
2514
|
+
}, [j("div", jn, [
|
|
2515
|
+
e.showPreview && e.currentImage ? (B(), O(s, {
|
|
2516
|
+
key: 0,
|
|
2517
|
+
class: "col-12",
|
|
2518
|
+
disabled: e.disableModal || !!e.currentImage.noImage,
|
|
2519
|
+
onClick: e.openImageModal
|
|
2520
|
+
}, {
|
|
2521
|
+
default: X(() => [N(o, {
|
|
2522
|
+
src: e.currentImage.url,
|
|
2523
|
+
"max-size": 500,
|
|
2524
|
+
"is-loading": e.isLoading,
|
|
2525
|
+
padding: 4
|
|
2526
|
+
}, null, 8, ["src", "is-loading"])]),
|
|
2527
|
+
_: 1
|
|
2528
|
+
}, 8, ["disabled", "onClick"])) : k("", !0),
|
|
2529
|
+
e.showOverlayArrows && e.images.length > 1 ? (B(), A(E, { key: 1 }, [j("a", {
|
|
2530
|
+
href: "",
|
|
2531
|
+
class: "text-dark ext-arrow-left",
|
|
2532
|
+
style: {
|
|
2533
|
+
"z-index": "2",
|
|
2534
|
+
"font-size": "1.6rem",
|
|
2535
|
+
position: "absolute",
|
|
2536
|
+
top: "calc(50% - 1rem)",
|
|
2537
|
+
left: "0.4rem"
|
|
2538
|
+
},
|
|
2539
|
+
onClick: t[0] || (t[0] = Q((...t) => e.previousImage && e.previousImage(...t), ["prevent"]))
|
|
2540
|
+
}, [N(c, { dir: "left" })]), j("a", {
|
|
2541
|
+
href: "",
|
|
2542
|
+
class: "text-dark ext-arrow-right",
|
|
2543
|
+
style: {
|
|
2544
|
+
"z-index": "2",
|
|
2545
|
+
"font-size": "1.6rem",
|
|
2546
|
+
position: "absolute",
|
|
2547
|
+
top: "calc(50% - 1rem)",
|
|
2548
|
+
right: "0.4rem"
|
|
2549
|
+
},
|
|
2550
|
+
onClick: t[1] || (t[1] = Q((...t) => e.nextImage && e.nextImage(...t), ["prevent"]))
|
|
2551
|
+
}, [N(c, { dir: "right" })])], 64)) : k("", !0),
|
|
2552
|
+
W(e.$slots, "default")
|
|
2553
|
+
]), e.images.length > +!e.alwaysShowThumbnails ? (B(), A(E, { key: 0 }, [e.hideThumbnails ? (B(), A("div", Mn, [j("div", Nn, [(B(!0), A(E, null, U(e.images, (t, n) => (B(), O(s, {
|
|
2554
|
+
key: n,
|
|
2555
|
+
class: "px-2",
|
|
2556
|
+
onClick: (t) => e.onItemClick(n)
|
|
2557
|
+
}, {
|
|
2558
|
+
default: X(() => [j("div", { class: R(["ps-3 pt-3 rounded-circle", [n === e.currentIndex ? "bg-primary" : "bg-light"]]) }, null, 2)]),
|
|
2559
|
+
_: 2
|
|
2560
|
+
}, 1032, ["onClick"]))), 128))])])) : (B(!0), A(E, { key: 1 }, U(e.images, (t, n) => (B(), O(s, {
|
|
2561
|
+
key: n,
|
|
2562
|
+
class: R([e.showPreview ? "col-4" : "me-2 mb-2"]),
|
|
2563
|
+
style: z([!e.showPreview && "width: 6rem;"]),
|
|
2564
|
+
onClick: (t) => e.onItemClick(n)
|
|
2565
|
+
}, {
|
|
2566
|
+
default: X(() => [N(o, {
|
|
2567
|
+
src: t.thumbnailUrl,
|
|
2568
|
+
active: n === e.currentIndex && e.showPreview,
|
|
2569
|
+
"max-size": 100,
|
|
2570
|
+
padding: 3
|
|
2571
|
+
}, null, 8, ["src", "active"])]),
|
|
2572
|
+
_: 2
|
|
2573
|
+
}, 1032, [
|
|
2574
|
+
"class",
|
|
2575
|
+
"style",
|
|
2576
|
+
"onClick"
|
|
2577
|
+
]))), 128))], 64)) : k("", !0)], 2)) : (B(), A("div", Pn, [N(o, {
|
|
2578
|
+
src: void 0,
|
|
2579
|
+
"is-loading": e.isLoading
|
|
2580
|
+
}, null, 8, ["is-loading"]), W(e.$slots, "default")])), N(l, {
|
|
2581
|
+
show: e.imageModalShown,
|
|
2582
|
+
"onUpdate:show": t[4] || (t[4] = (t) => e.imageModalShown = t),
|
|
2583
|
+
title: e.title,
|
|
2584
|
+
xl: ""
|
|
2585
|
+
}, {
|
|
2586
|
+
default: X(() => [e.images && e.images.length ? (B(), A("div", Fn, [
|
|
2587
|
+
e.images.length > 1 ? (B(), A("a", {
|
|
2588
|
+
key: 0,
|
|
2589
|
+
href: "",
|
|
2590
|
+
class: "position-absolute top-0 bottom-0 start-0 h-100 pis-hover",
|
|
2591
|
+
style: { width: "40px" },
|
|
2592
|
+
onClick: t[2] || (t[2] = Q((...t) => e.previousImage && e.previousImage(...t), ["prevent"]))
|
|
2593
|
+
}, [j("div", In, [N(c, { dir: "left" })])])) : k("", !0),
|
|
2594
|
+
e.currentImage ? (B(), A("img", {
|
|
2595
|
+
key: 1,
|
|
2596
|
+
class: "pis-scale-down p-2 p-lg-5",
|
|
2597
|
+
src: e.currentImage.masterUrl,
|
|
2598
|
+
alt: ""
|
|
2599
|
+
}, null, 8, Ln)) : k("", !0),
|
|
2600
|
+
e.images.length > 1 ? (B(), A("a", {
|
|
2601
|
+
key: 2,
|
|
2602
|
+
href: "",
|
|
2603
|
+
class: "position-absolute top-0 end-0 bottom-0 pis-hover",
|
|
2604
|
+
style: { width: "40px" },
|
|
2605
|
+
onClick: t[3] || (t[3] = Q((...t) => e.nextImage && e.nextImage(...t), ["prevent"]))
|
|
2606
|
+
}, [j("div", Rn, [N(c, { dir: "right" })])])) : k("", !0)
|
|
2607
|
+
])) : k("", !0)]),
|
|
2608
|
+
_: 1
|
|
2609
|
+
}, 8, ["show", "title"])], 64);
|
|
2610
|
+
}
|
|
2611
|
+
var Bn = /*#__PURE__*/ x(An, [["render", zn]]), Vn = {
|
|
2612
|
+
view: "search",
|
|
2613
|
+
search: {
|
|
2614
|
+
searchText: void 0,
|
|
2615
|
+
searchType: h.HIERARCHICAL,
|
|
2616
|
+
cid: void 0,
|
|
2617
|
+
filters: {
|
|
2618
|
+
type: "group",
|
|
2619
|
+
condition: y.AND,
|
|
2620
|
+
rules: []
|
|
2621
|
+
},
|
|
2622
|
+
pagination: {
|
|
2623
|
+
page: 1,
|
|
2624
|
+
pageSize: 24
|
|
2625
|
+
},
|
|
2626
|
+
subView: "table",
|
|
2627
|
+
sortField: d.PRODUCT,
|
|
2628
|
+
sortDirection: c.ASCENDING,
|
|
2629
|
+
partsType: _.ALL
|
|
2630
|
+
},
|
|
2631
|
+
detail: { productId: void 0 }
|
|
2632
|
+
}, Hn = {}, Un = [], Wn = (t, n) => {
|
|
2633
|
+
let r = {
|
|
2634
|
+
productId: t,
|
|
2635
|
+
relationshipCode: n.code,
|
|
2636
|
+
filter: H(void 0),
|
|
2637
|
+
filtersAll: H([]),
|
|
2638
|
+
filtersPromoted: H([]),
|
|
2639
|
+
filtersAdditional: H([]),
|
|
2640
|
+
filtersModel: H({}),
|
|
2641
|
+
filtersLoading: de(/* @__PURE__ */ new Set()),
|
|
2642
|
+
filtersFetched: de(/* @__PURE__ */ new Map()),
|
|
2643
|
+
filtersOpen: de(/* @__PURE__ */ new Set()),
|
|
2644
|
+
saveSettings: () => {
|
|
2645
|
+
Un.forEach((e) => {
|
|
2646
|
+
Hn[`${e.productId}${e.relationshipCode}`] = {
|
|
2647
|
+
filter: e.filter.value,
|
|
2648
|
+
filterModel: { ...e.filtersModel.value },
|
|
2649
|
+
filtersFetched: new Map(e.filtersFetched)
|
|
2650
|
+
};
|
|
2651
|
+
});
|
|
2652
|
+
},
|
|
2653
|
+
setFilters: (e) => {
|
|
2654
|
+
r.filtersAll.value = [], r.filtersPromoted.value = [], r.filtersAdditional.value = [], e.forEach((e) => {
|
|
2655
|
+
let t = {
|
|
2656
|
+
attributeCode: e.attributeCode,
|
|
2657
|
+
attributeName: e.attributeName,
|
|
2658
|
+
attributeNameHtml: e.attributeNameHtml,
|
|
2659
|
+
hitCount: e.hitCount,
|
|
2660
|
+
promoted: e.promoted,
|
|
2661
|
+
internal: e.internal
|
|
2662
|
+
};
|
|
2663
|
+
r.filtersAll.value.push(t), t.promoted ? r.filtersPromoted.value.push(t) : r.filtersAdditional.value.push(t), r.filtersModel.value[t.attributeCode] || (r.filtersModel.value[t.attributeCode] = {});
|
|
2664
|
+
});
|
|
2665
|
+
},
|
|
2666
|
+
setFilterValues: (e) => e.forEach((e) => {
|
|
2667
|
+
r.filtersLoading.delete(e.attributeCode), r.filtersFetched.set(e.attributeCode, e.values ?? []);
|
|
2668
|
+
}),
|
|
2669
|
+
getFiltersModelAsCriteriaGroup: () => e(r.filtersModel.value),
|
|
2670
|
+
resetFiltersApplied: () => {
|
|
2671
|
+
r.filtersOpen.clear(), r.filtersFetched.clear(), Object.keys(r.filtersModel.value).forEach((e) => r.filtersModel.value[e] = {});
|
|
2672
|
+
}
|
|
2673
|
+
};
|
|
2674
|
+
return Un.push(r), r;
|
|
2675
|
+
}, Gn = (e, t) => {
|
|
2676
|
+
let n = Wn(e, t), r = Hn[`${e}${t.code}`];
|
|
2677
|
+
return r ? (n.filter.value = r.filter, n.filtersModel.value = r.filterModel, r.filtersFetched.forEach((e, t) => n.filtersFetched.set(t, e))) : n.resetFiltersApplied(), n;
|
|
2678
|
+
}, Kn = () => {
|
|
2679
|
+
Hn = {}, Un = [];
|
|
2680
|
+
};
|
|
2681
|
+
//#endregion
|
|
2682
|
+
//#region src/common/helpers/removeWhere.ts
|
|
2683
|
+
function qn(e, t) {
|
|
2684
|
+
for (let n = e.length - 1; n >= 0; n--) t(e[n]) && e.splice(n, 1);
|
|
2685
|
+
}
|
|
2686
|
+
//#endregion
|
|
2687
|
+
//#region src/products/api/runtime/CommandExecutor.ts
|
|
2688
|
+
var $ = class extends t {}, Jn = class extends Error {
|
|
2689
|
+
constructor(...e) {
|
|
2690
|
+
super(...e), T(this, "isHandled", !0);
|
|
2691
|
+
}
|
|
2692
|
+
}, Yn = async (e, t, n) => {
|
|
2693
|
+
if (!n) {
|
|
2694
|
+
e.store.data.isLoadingData = !1;
|
|
2695
|
+
return;
|
|
2696
|
+
}
|
|
2697
|
+
try {
|
|
2698
|
+
e.store.data.isLoadingData = !0;
|
|
2699
|
+
let i = await n;
|
|
2700
|
+
if (e.store.data.isLoadingData = !1, !i || !i.success) {
|
|
2701
|
+
var r;
|
|
2702
|
+
throw i != null && (r = i.errors) != null && r.length ? (await e.execute(new Rr({
|
|
2703
|
+
errors: i.errors || [],
|
|
2704
|
+
warnings: i.warnings || []
|
|
2705
|
+
})), new Jn((i == null ? void 0 : i.message) || "Unknown error")) : Error((i == null ? void 0 : i.message) || "Unknown error");
|
|
2706
|
+
}
|
|
2707
|
+
return await e.execute(new Ar({
|
|
2708
|
+
type: "success",
|
|
2709
|
+
message: t.onSuccessMessage
|
|
2710
|
+
})), i;
|
|
2711
|
+
} catch (t) {
|
|
2712
|
+
throw e.store.data.isLoadingData = !1, t instanceof Jn || await e.execute(new Ar({
|
|
2713
|
+
type: "danger",
|
|
2714
|
+
message: t.message
|
|
2715
|
+
})), t;
|
|
2716
|
+
}
|
|
2717
|
+
}, Xn = class extends $ {
|
|
2718
|
+
constructor(...e) {
|
|
2719
|
+
super(...e), T(this, "name", "filter-search"), T(this, "execute", async (e) => {
|
|
2720
|
+
var t;
|
|
2721
|
+
let n = {
|
|
2722
|
+
sortField: this.args.searchText ? d.RELEVANCE : d.PRODUCT,
|
|
2723
|
+
sortDirection: this.args.searchText.length == 0 ? void 0 : this.args.searchText ? c.DESCENDING : c.ASCENDING,
|
|
2724
|
+
searchType: this.args.searchType,
|
|
2725
|
+
searchText: this.args.searchText.length == 0 ? void 0 : this.args.searchText,
|
|
2726
|
+
pagination: { page: 1 }
|
|
2727
|
+
};
|
|
2728
|
+
this.args.resetCategories && (n.cid = void 0), this.args.resetFilters && (n.filters = void 0), this.args.cid && (n.cid = this.args.cid);
|
|
2729
|
+
let r = {
|
|
2730
|
+
view: "search",
|
|
2731
|
+
search: n
|
|
2732
|
+
};
|
|
2733
|
+
return await ((t = e.router) == null ? void 0 : t.setRoute(r));
|
|
2734
|
+
});
|
|
2735
|
+
}
|
|
2736
|
+
}, Zn = class extends $ {
|
|
2737
|
+
constructor(...e) {
|
|
2738
|
+
super(...e), T(this, "name", "details"), T(this, "execute", async (e) => {
|
|
2739
|
+
var t;
|
|
2740
|
+
return e.store.data.productPreview = void 0, await ((t = e.router) == null ? void 0 : t.setRoute({
|
|
2741
|
+
view: "detail",
|
|
2742
|
+
detail: { productId: this.args.productId }
|
|
2743
|
+
}));
|
|
2744
|
+
});
|
|
2745
|
+
}
|
|
2746
|
+
}, Qn = class extends $ {
|
|
2747
|
+
constructor(...e) {
|
|
2748
|
+
super(...e), T(this, "name", "preview"), T(this, "execute", async (e) => {
|
|
2749
|
+
var t;
|
|
2750
|
+
return await ((t = e.httpService) == null ? void 0 : t.preview(this.args.productId));
|
|
2751
|
+
});
|
|
2752
|
+
}
|
|
2753
|
+
}, $n = class extends $ {
|
|
2754
|
+
constructor(...e) {
|
|
2755
|
+
super(...e), T(this, "name", "scroll-to-top"), T(this, "execute", async (e) => (e.eventBus.emit("internal:scroll-to-top"), Promise.resolve()));
|
|
2756
|
+
}
|
|
2757
|
+
}, er = class extends $ {
|
|
2758
|
+
constructor(...e) {
|
|
2759
|
+
super(...e), T(this, "name", "document"), T(this, "execute", async (e) => u(e, this.name));
|
|
2760
|
+
}
|
|
2761
|
+
}, tr = class extends $ {
|
|
2762
|
+
constructor(...e) {
|
|
2763
|
+
super(...e), T(this, "name", "configurator"), T(this, "execute", async (e) => u(e, this.name));
|
|
2764
|
+
}
|
|
2765
|
+
}, nr = class extends $ {
|
|
2766
|
+
constructor(e = { step: 1 }) {
|
|
2767
|
+
super(e), T(this, "name", "back"), T(this, "execute", async (e) => {
|
|
2768
|
+
var t;
|
|
2769
|
+
if (((t = e.router) == null ? void 0 : t.history.length) == 0) {
|
|
2770
|
+
var n;
|
|
2771
|
+
(n = e.router) == null || n.setRoute(Vn), Kn();
|
|
2772
|
+
} else {
|
|
2773
|
+
var r, i;
|
|
2774
|
+
await ((r = e.router) == null ? void 0 : r.back(this.args.step)), ((i = e.router) == null ? void 0 : i.routeData.view) !== "detail" && Kn();
|
|
2775
|
+
return;
|
|
2776
|
+
}
|
|
2777
|
+
});
|
|
2778
|
+
}
|
|
2779
|
+
}, rr = class extends $ {
|
|
2780
|
+
constructor(...e) {
|
|
2781
|
+
super(...e), T(this, "name", "search-view"), T(this, "execute", async (e) => {
|
|
2782
|
+
var t;
|
|
2783
|
+
return (t = e.router) == null ? void 0 : t.setRoute(Vn);
|
|
2784
|
+
});
|
|
2785
|
+
}
|
|
2786
|
+
}, ir = class extends $ {
|
|
2787
|
+
constructor(...e) {
|
|
2788
|
+
super(...e), T(this, "name", "sub-view"), T(this, "execute", async (e) => {
|
|
2789
|
+
var t;
|
|
2790
|
+
return await ((t = e.router) == null ? void 0 : t.setRoute({ search: { subView: this.args.subView } }, !0));
|
|
2791
|
+
});
|
|
2792
|
+
}
|
|
2793
|
+
}, ar = class extends $ {
|
|
2794
|
+
constructor(...e) {
|
|
2795
|
+
super(...e), T(this, "name", "filter-classification"), T(this, "execute", async (e) => {
|
|
2796
|
+
var t;
|
|
2797
|
+
let n = e.getRouteData();
|
|
2798
|
+
return n.view = "search", n.search && (n.search.sortField = d.PRODUCT, n.search.pagination && (n.search.pagination.page = 1), n.search.cid = this.args.cid, this.args.clearSearch && (n.search.searchText = void 0)), await ((t = e.router) == null ? void 0 : t.setRoute(n));
|
|
2799
|
+
});
|
|
2800
|
+
}
|
|
2801
|
+
}, or = class extends $ {
|
|
2802
|
+
constructor(...e) {
|
|
2803
|
+
super(...e), T(this, "name", "filter-parts-type"), T(this, "execute", async (e) => {
|
|
2804
|
+
var t;
|
|
2805
|
+
return await ((t = e.router) == null ? void 0 : t.setRoute({
|
|
2806
|
+
view: "search",
|
|
2807
|
+
search: {
|
|
2808
|
+
sortField: d.PRODUCT,
|
|
2809
|
+
pagination: { page: 1 },
|
|
2810
|
+
partsType: this.args.partsType
|
|
2811
|
+
}
|
|
2812
|
+
}));
|
|
2813
|
+
});
|
|
2814
|
+
}
|
|
2815
|
+
}, sr = class extends $ {
|
|
2816
|
+
constructor(...e) {
|
|
2817
|
+
super(...e), T(this, "name", "filter-master-product"), T(this, "execute", async (e) => {
|
|
2818
|
+
var t;
|
|
2819
|
+
return e.store.data.searchTitle = this.args.masterProductName, await ((t = e.router) == null ? void 0 : t.setRoute({
|
|
2820
|
+
view: "search",
|
|
2821
|
+
search: {
|
|
2822
|
+
sortField: d.PRODUCT,
|
|
2823
|
+
pagination: { page: 1 },
|
|
2824
|
+
masterProductId: this.args.masterProductId
|
|
2825
|
+
}
|
|
2826
|
+
}));
|
|
2827
|
+
});
|
|
2828
|
+
}
|
|
2829
|
+
}, cr = class extends $ {
|
|
2830
|
+
constructor(...e) {
|
|
2831
|
+
super(...e), T(this, "name", "paginate"), T(this, "execute", async (e) => {
|
|
2832
|
+
var t;
|
|
2833
|
+
return await ((t = e.router) == null ? void 0 : t.setRoute({
|
|
2834
|
+
view: "search",
|
|
2835
|
+
search: { pagination: { page: this.args.page } }
|
|
2836
|
+
}));
|
|
2837
|
+
});
|
|
2838
|
+
}
|
|
2839
|
+
}, lr = class extends $ {
|
|
2840
|
+
constructor(...e) {
|
|
2841
|
+
super(...e), T(this, "name", "page-size"), T(this, "execute", async (e) => {
|
|
2842
|
+
var t;
|
|
2843
|
+
return await ((t = e.router) == null ? void 0 : t.setRoute({
|
|
2844
|
+
view: "search",
|
|
2845
|
+
search: { pagination: {
|
|
2846
|
+
pageSize: this.args.pageSize,
|
|
2847
|
+
page: 1
|
|
2848
|
+
} }
|
|
2849
|
+
}));
|
|
2850
|
+
});
|
|
2851
|
+
}
|
|
2852
|
+
}, ur = class extends $ {
|
|
2853
|
+
constructor(...e) {
|
|
2854
|
+
super(...e), T(this, "name", "sort-by"), T(this, "execute", async (e) => {
|
|
2855
|
+
var t;
|
|
2856
|
+
return await ((t = e.router) == null ? void 0 : t.setRoute({
|
|
2857
|
+
view: "search",
|
|
2858
|
+
search: { sortField: this.args.sortField }
|
|
2859
|
+
}));
|
|
2860
|
+
});
|
|
2861
|
+
}
|
|
2862
|
+
}, dr = class extends $ {
|
|
2863
|
+
constructor(...e) {
|
|
2864
|
+
super(...e), T(this, "name", "filter-parametric-apply"), T(this, "execute", async (e) => {
|
|
2865
|
+
var t, n;
|
|
2866
|
+
return await ((t = e.router) == null ? void 0 : t.setRoute({
|
|
2867
|
+
view: "search",
|
|
2868
|
+
search: {
|
|
2869
|
+
filters: this.args.filters,
|
|
2870
|
+
pagination: {
|
|
2871
|
+
page: 1,
|
|
2872
|
+
pageSize: (n = e.router.routeData) == null || (n = n.search) == null || (n = n.pagination) == null ? void 0 : n.pageSize
|
|
2873
|
+
}
|
|
2874
|
+
}
|
|
2875
|
+
}));
|
|
2876
|
+
});
|
|
2877
|
+
}
|
|
2878
|
+
}, fr = class extends $ {
|
|
2879
|
+
constructor(...e) {
|
|
2880
|
+
super(...e), T(this, "name", "filter-parametric-remove"), T(this, "execute", async (e) => {
|
|
2881
|
+
var t, r, i;
|
|
2882
|
+
let a = (t = e.router.routeData.search) == null ? void 0 : t.filters, o = a ? n(a, this.args.attributeCode, this.args.value) : w();
|
|
2883
|
+
return await ((r = e.router) == null ? void 0 : r.setRoute({ search: {
|
|
2884
|
+
filters: o,
|
|
2885
|
+
pagination: {
|
|
2886
|
+
page: 1,
|
|
2887
|
+
pageSize: (i = e.router.routeData) == null || (i = i.search) == null || (i = i.pagination) == null ? void 0 : i.pageSize
|
|
2888
|
+
}
|
|
2889
|
+
} }));
|
|
2890
|
+
});
|
|
2891
|
+
}
|
|
2892
|
+
}, pr = class extends $ {
|
|
2893
|
+
constructor(...e) {
|
|
2894
|
+
super(...e), T(this, "name", "get-filter-values"), T(this, "execute", async (e) => {
|
|
2895
|
+
var t;
|
|
2896
|
+
return await ((t = e.httpService) == null ? void 0 : t.filterValues(this.args.attributeCodes));
|
|
2897
|
+
});
|
|
2898
|
+
}
|
|
2899
|
+
}, mr = class extends $ {
|
|
2900
|
+
constructor(...e) {
|
|
2901
|
+
super(...e), T(this, "name", "get-variant-table-group"), T(this, "execute", async (e) => {
|
|
2902
|
+
var t;
|
|
2903
|
+
return await ((t = e.httpService) == null ? void 0 : t.loadVariantTableGroup(this.args.attributeCode));
|
|
2904
|
+
});
|
|
2905
|
+
}
|
|
2906
|
+
}, hr = class extends $ {
|
|
2907
|
+
constructor(...e) {
|
|
2908
|
+
super(...e), T(this, "name", "get-filters"), T(this, "execute", async (e) => {
|
|
2909
|
+
var t;
|
|
2910
|
+
return await ((t = e.httpService) == null ? void 0 : t.filters());
|
|
2911
|
+
});
|
|
2912
|
+
}
|
|
2913
|
+
}, gr = class extends $ {
|
|
2914
|
+
constructor(...e) {
|
|
2915
|
+
super(...e), T(this, "name", "get-prm-list"), T(this, "execute", async (e) => {
|
|
2916
|
+
var t;
|
|
2917
|
+
return await ((t = e.httpService) == null ? void 0 : t.loadPrmRelationship(this.args.search, this.args.pager));
|
|
2918
|
+
});
|
|
2919
|
+
}
|
|
2920
|
+
}, _r = class extends $ {
|
|
2921
|
+
constructor(...e) {
|
|
2922
|
+
super(...e), T(this, "name", "get-prm-autocomplete"), T(this, "execute", async (e) => {
|
|
2923
|
+
var t;
|
|
2924
|
+
return await ((t = e.httpService) == null ? void 0 : t.loadPrmRelationshipAutocomplete(this.args.search, this.args.pager));
|
|
2925
|
+
});
|
|
2926
|
+
}
|
|
2927
|
+
}, vr = class extends $ {
|
|
2928
|
+
constructor(...e) {
|
|
2929
|
+
super(...e), T(this, "name", "get-autocomplete"), T(this, "execute", async (e) => {
|
|
2930
|
+
var t;
|
|
2931
|
+
return await ((t = e.httpService) == null ? void 0 : t.autocomplete(this.args.searchText, this.args.categorySearch ?? !1));
|
|
2932
|
+
});
|
|
2933
|
+
}
|
|
2934
|
+
}, yr = class extends $ {
|
|
2935
|
+
constructor(...e) {
|
|
2936
|
+
super(...e), T(this, "name", "get-prm-filter-values"), T(this, "execute", async (e) => {
|
|
2937
|
+
var t;
|
|
2938
|
+
return await ((t = e.httpService) == null ? void 0 : t.loadPrmRelationshipFilterValues(this.args));
|
|
2939
|
+
});
|
|
2940
|
+
}
|
|
2941
|
+
}, br = class extends $ {
|
|
2942
|
+
constructor(...e) {
|
|
2943
|
+
super(...e), T(this, "name", "export"), T(this, "execute", async (e) => u(e, this.name));
|
|
2944
|
+
}
|
|
2945
|
+
}, xr = class extends $ {
|
|
2946
|
+
constructor(...e) {
|
|
2947
|
+
super(...e), T(this, "name", "favorite-views-load"), T(this, "execute", async (e) => {
|
|
2948
|
+
var t;
|
|
2949
|
+
let n = { items: await ((t = e.httpService) == null ? void 0 : t.loadFavoriteViews(this.args.ids)) || [] };
|
|
2950
|
+
e.eventBus.emit("favorite-views-loaded", n);
|
|
2951
|
+
});
|
|
2952
|
+
}
|
|
2953
|
+
}, Sr = class extends $ {
|
|
2954
|
+
constructor(...e) {
|
|
2955
|
+
super(...e), T(this, "name", "favorite-views-save"), T(this, "execute", async (e) => {
|
|
2956
|
+
var t;
|
|
2957
|
+
let n = await ((t = e.httpService) == null ? void 0 : t.saveFavoriteView(this.args.id, this.args.code, this.args.routeData));
|
|
2958
|
+
n && e.eventBus.emit("favorite-views-saved", { item: n });
|
|
2959
|
+
});
|
|
2960
|
+
}
|
|
2961
|
+
}, Cr = class extends $ {
|
|
2962
|
+
constructor(...e) {
|
|
2963
|
+
super(...e), T(this, "name", "favorite-views-delete"), T(this, "execute", async (e) => {
|
|
2964
|
+
var t;
|
|
2965
|
+
let n = await ((t = e.httpService) == null ? void 0 : t.deleteFavoriteView(this.args.id));
|
|
2966
|
+
n && e.eventBus.emit("favorite-views-deleted", { id: n });
|
|
2967
|
+
});
|
|
2968
|
+
}
|
|
2969
|
+
}, wr = class extends $ {
|
|
2970
|
+
constructor(...e) {
|
|
2971
|
+
super(...e), T(this, "name", "favorite-views-apply"), T(this, "execute", async (e) => {
|
|
2972
|
+
let t = this.args.favoriteView.data;
|
|
2973
|
+
if (t) {
|
|
2974
|
+
var n;
|
|
2975
|
+
let r = Object.assign({}, e.router.routeData, { search: {
|
|
2976
|
+
searchText: t.search.searchText,
|
|
2977
|
+
searchType: t.search.searchType,
|
|
2978
|
+
cid: t.search.cid,
|
|
2979
|
+
filters: t.search.filter,
|
|
2980
|
+
pagination: t.pager,
|
|
2981
|
+
sortField: t.sort.field,
|
|
2982
|
+
sortDirection: t.sort.direction,
|
|
2983
|
+
masterProductId: t.search.masterProductId
|
|
2984
|
+
} });
|
|
2985
|
+
await ((n = e.router) == null ? void 0 : n.setRoute(r)), e.eventBus.emit("favorite-views-applied", { routeData: e.router.routeData });
|
|
2986
|
+
}
|
|
2987
|
+
});
|
|
2988
|
+
}
|
|
2989
|
+
}, Tr = class extends $ {
|
|
2990
|
+
constructor(...e) {
|
|
2991
|
+
super(...e), T(this, "name", "get-classifications-nodes"), T(this, "execute", async (e) => {
|
|
2992
|
+
var t;
|
|
2993
|
+
if (this.args.cids) return await ((t = e.httpService) == null ? void 0 : t.loadClassificationsNodes(this.args.cids));
|
|
2994
|
+
});
|
|
2995
|
+
}
|
|
2996
|
+
}, Er = class extends $ {
|
|
2997
|
+
constructor(...e) {
|
|
2998
|
+
super(...e), T(this, "name", "favorite-category-add"), T(this, "execute", async (e) => {
|
|
2999
|
+
if (this.args.cid) {
|
|
3000
|
+
var t, n, r, i;
|
|
3001
|
+
((t = e.store.options.appSettings) == null ? void 0 : t.treeType) === v.PRODUCTS && (n = e.store.options.components) != null && (n = n.search) != null && n.favoriteCategories ? (e.store.options.components.search.favoriteCategories.productCids === void 0 && (e.store.options.components.search.favoriteCategories.productCids = []), e.store.options.components.search.favoriteCategories.productCids.push(this.args.cid)) : ((r = e.store.options.appSettings) == null ? void 0 : r.treeType) === v.PARTS && (i = e.store.options.components) != null && (i = i.search) != null && i.favoriteCategories && (e.store.options.components.search.favoriteCategories.partCids === void 0 && (e.store.options.components.search.favoriteCategories.partCids = []), e.store.options.components.search.favoriteCategories.partCids.push(this.args.cid));
|
|
3002
|
+
}
|
|
3003
|
+
return e.eventBus.emit("favorite-category-added", this.args), Promise.resolve();
|
|
3004
|
+
});
|
|
3005
|
+
}
|
|
3006
|
+
}, Dr = class extends $ {
|
|
3007
|
+
constructor(...e) {
|
|
3008
|
+
super(...e), T(this, "name", "favorite-category-remove"), T(this, "execute", async (e) => {
|
|
3009
|
+
if (this.args.cid) {
|
|
3010
|
+
var t, n;
|
|
3011
|
+
if (((t = e.store.options.appSettings) == null ? void 0 : t.treeType) === v.PRODUCTS) {
|
|
3012
|
+
var r, i, a;
|
|
3013
|
+
(r = e.store.options.components) != null && (r = r.search) != null && (r = r.favoriteCategories) != null && r.productCids && qn((i = e.store.options.components) == null || (i = i.search) == null ? void 0 : i.favoriteCategories.productCids, (e) => e === this.args.cid), (a = e.store) != null && (a = a.data) != null && (a = a.favoriteProductCategories) != null && a.items && qn(e.store.data.favoriteProductCategories.items, (e) => e.cid === this.args.cid);
|
|
3014
|
+
} else if (((n = e.store.options.appSettings) == null ? void 0 : n.treeType) === v.PARTS) {
|
|
3015
|
+
var o, s;
|
|
3016
|
+
(o = e.store.options.components) != null && (o = o.search) != null && (o = o.favoriteCategories) != null && o.partCids && qn(e.store.options.components.search.favoriteCategories.partCids, (e) => e === this.args.cid), (s = e.store) != null && (s = s.data) != null && (s = s.favoritePartCategories) != null && s.items && qn(e.store.data.favoritePartCategories.items, (e) => e.cid === this.args.cid);
|
|
3017
|
+
}
|
|
3018
|
+
}
|
|
3019
|
+
return e.eventBus.emit("favorite-category-removed", this.args), Promise.resolve();
|
|
3020
|
+
});
|
|
3021
|
+
}
|
|
3022
|
+
}, Or = class extends $ {
|
|
3023
|
+
constructor(...e) {
|
|
3024
|
+
super(...e), T(this, "name", "print-to-pdf"), T(this, "execute", async (e) => {
|
|
3025
|
+
var t;
|
|
3026
|
+
let n = await ((t = e.httpService) == null ? void 0 : t.generatePDFUrl(this.args.productId));
|
|
3027
|
+
n && (await be(`Product ${this.args.productId}.pdf`, n), e.eventBus.emit("print-to-pdf-done", n));
|
|
3028
|
+
});
|
|
3029
|
+
}
|
|
3030
|
+
}, kr = class extends $ {
|
|
3031
|
+
constructor(...e) {
|
|
3032
|
+
super(...e), T(this, "name", "show-print-view"), T(this, "execute", async (e) => u(e, this.name));
|
|
3033
|
+
}
|
|
3034
|
+
}, Ar = class extends $ {
|
|
3035
|
+
constructor(...e) {
|
|
3036
|
+
super(...e), T(this, "name", "notification-show"), T(this, "excludeFromUserActions", !0), T(this, "execute", async (e) => {
|
|
3037
|
+
let t = 0, n = this.args.dismissAfter;
|
|
3038
|
+
e.store.notifications.length && (e.store.notifications = [], t = 1e3), !n && n !== 0 && this.args.type !== "danger" && (n = 6e3, e.store.notifications = []), n && n !== 0 && setTimeout(() => {
|
|
3039
|
+
let t = e.store.notifications.indexOf(this.args);
|
|
3040
|
+
t !== -1 && e.store.notifications.splice(t, 1);
|
|
3041
|
+
}, n), setTimeout(() => e.store.notifications.push(this.args), t);
|
|
3042
|
+
});
|
|
3043
|
+
}
|
|
3044
|
+
}, jr = class extends $ {
|
|
3045
|
+
constructor(...e) {
|
|
3046
|
+
super(...e), T(this, "name", "notification-hide"), T(this, "excludeFromUserActions", !0), T(this, "execute", async (e) => {
|
|
3047
|
+
let t = e.store.notifications.indexOf(this.args);
|
|
3048
|
+
t !== -1 && e.store.notifications.splice(t, 1);
|
|
3049
|
+
});
|
|
3050
|
+
}
|
|
3051
|
+
}, Mr = class extends $ {
|
|
3052
|
+
constructor(...e) {
|
|
3053
|
+
super(...e), T(this, "name", "filter-compare"), T(this, "execute", async (e) => {
|
|
3054
|
+
var t;
|
|
3055
|
+
let n = e.getRouteData();
|
|
3056
|
+
return n.compare && this.args.diffOnly != null && (n.compare.differencesOnly = this.args.diffOnly), n.compare && this.args.cid && (n.compare.cids = [this.args.cid]), await ((t = e.router) == null ? void 0 : t.setRoute(n));
|
|
3057
|
+
});
|
|
3058
|
+
}
|
|
3059
|
+
}, Nr = class extends $ {
|
|
3060
|
+
constructor(...e) {
|
|
3061
|
+
super(...e), T(this, "name", "remove-compare-item"), T(this, "execute", async (e) => {
|
|
3062
|
+
var t, n;
|
|
3063
|
+
let r = e.getRouteData();
|
|
3064
|
+
if ((t = r.compare) != null && t.productIds) {
|
|
3065
|
+
let e = r.compare.productIds.indexOf(this.args.item.productId) ?? -1;
|
|
3066
|
+
e > -1 && r.compare.productIds.splice(e, 1);
|
|
3067
|
+
}
|
|
3068
|
+
return await ((n = e.router) == null ? void 0 : n.setRoute(r));
|
|
3069
|
+
});
|
|
3070
|
+
}
|
|
3071
|
+
}, Pr = class extends $ {
|
|
3072
|
+
constructor(...e) {
|
|
3073
|
+
super(...e), T(this, "name", "show-compare-print-view"), T(this, "execute", async (e) => u(e, this.name));
|
|
3074
|
+
}
|
|
3075
|
+
}, Fr = async (e, t, n) => Object.assign(e.store.data.actions, {
|
|
3076
|
+
current: t,
|
|
3077
|
+
data: n
|
|
3078
|
+
}), Ir = class extends $ {
|
|
3079
|
+
constructor(...e) {
|
|
3080
|
+
super(...e), T(this, "name", "product-action-completed"), T(this, "execute", async (e) => Object.assign(e.store.data.actions, {
|
|
3081
|
+
current: null,
|
|
3082
|
+
data: null
|
|
3083
|
+
}));
|
|
3084
|
+
}
|
|
3085
|
+
}, Lr = class extends $ {
|
|
3086
|
+
constructor(...e) {
|
|
3087
|
+
super(...e), T(this, "name", "add-to-catalog"), T(this, "execute", async (e) => Fr(e, "ProductAddToCatalogAction", this.args));
|
|
3088
|
+
}
|
|
3089
|
+
}, Rr = class extends $ {
|
|
3090
|
+
constructor(...e) {
|
|
3091
|
+
super(...e), T(this, "name", "product-errors-action"), T(this, "excludeFromUserActions", !0), T(this, "execute", async (e) => Fr(e, "Errors", this.args));
|
|
3092
|
+
}
|
|
3093
|
+
}, zr = class extends $ {
|
|
3094
|
+
constructor(...e) {
|
|
3095
|
+
super(...e), T(this, "name", "catalog-get-options"), T(this, "execute", async (e) => {
|
|
3096
|
+
var t;
|
|
3097
|
+
return await ((t = e.httpService) == null ? void 0 : t.getCatalogOptions());
|
|
3098
|
+
});
|
|
3099
|
+
}
|
|
3100
|
+
}, Br = class extends $ {
|
|
3101
|
+
constructor(...e) {
|
|
3102
|
+
super(...e), T(this, "name", "catalogs-fetch"), T(this, "execute", async (e) => {
|
|
3103
|
+
var t;
|
|
3104
|
+
let n = await ((t = e.httpService) == null ? void 0 : t.getAllCatalogs());
|
|
3105
|
+
return !n || !n.items ? [] : n.items;
|
|
3106
|
+
});
|
|
3107
|
+
}
|
|
3108
|
+
}, Vr = class extends $ {
|
|
3109
|
+
constructor(...e) {
|
|
3110
|
+
super(...e), T(this, "name", "catalog-create-new"), T(this, "execute", async (e) => {
|
|
3111
|
+
var t, n;
|
|
3112
|
+
let r = await Yn(e, this.args, (t = e.httpService) == null ? void 0 : t.addCatalog(this.args.code, this.args.type, this.args.description));
|
|
3113
|
+
return r == null || (n = r.catalog) == null ? void 0 : n.id;
|
|
3114
|
+
});
|
|
3115
|
+
}
|
|
3116
|
+
}, Hr = class extends $ {
|
|
3117
|
+
constructor(...e) {
|
|
3118
|
+
super(...e), T(this, "name", "product-add-to-catalog"), T(this, "execute", async (e) => {
|
|
3119
|
+
var t;
|
|
3120
|
+
return Yn(e, this.args, (t = e.httpService) == null ? void 0 : t.addProductToCatalog(this.args.id, this.args.products));
|
|
3121
|
+
});
|
|
3122
|
+
}
|
|
3123
|
+
}, Ur = class extends s {
|
|
3124
|
+
constructor(e) {
|
|
3125
|
+
super(e, Wr, "products");
|
|
3126
|
+
}
|
|
3127
|
+
}, Wr = {
|
|
3128
|
+
"filter-search": Xn,
|
|
3129
|
+
details: Zn,
|
|
3130
|
+
preview: Qn,
|
|
3131
|
+
"scroll-to-top": $n,
|
|
3132
|
+
document: er,
|
|
3133
|
+
configurator: tr,
|
|
3134
|
+
back: nr,
|
|
3135
|
+
"search-view": rr,
|
|
3136
|
+
"sub-view": ir,
|
|
3137
|
+
"filter-classification": ar,
|
|
3138
|
+
"filter-parts-type": or,
|
|
3139
|
+
"filter-master-product": sr,
|
|
3140
|
+
paginate: cr,
|
|
3141
|
+
"page-size": lr,
|
|
3142
|
+
"sort-by": ur,
|
|
3143
|
+
"filter-parametric-apply": dr,
|
|
3144
|
+
"filter-parametric-remove": fr,
|
|
3145
|
+
"get-filters": hr,
|
|
3146
|
+
"get-filter-values": pr,
|
|
3147
|
+
"get-variant-table-group": mr,
|
|
3148
|
+
"get-autocomplete": vr,
|
|
3149
|
+
"get-prm-list": gr,
|
|
3150
|
+
"get-prm-autocomplete": _r,
|
|
3151
|
+
"get-prm-filter-values": yr,
|
|
3152
|
+
export: br,
|
|
3153
|
+
"favorite-views-load": xr,
|
|
3154
|
+
"favorite-views-save": Sr,
|
|
3155
|
+
"favorite-views-delete": Cr,
|
|
3156
|
+
"favorite-views-apply": wr,
|
|
3157
|
+
"get-classifications-nodes": Tr,
|
|
3158
|
+
"favorite-category-add": Er,
|
|
3159
|
+
"favorite-category-remove": Dr,
|
|
3160
|
+
"print-to-pdf": Or,
|
|
3161
|
+
"show-print-view": kr,
|
|
3162
|
+
"notification-show": Ar,
|
|
3163
|
+
"notification-hide": jr,
|
|
3164
|
+
"filter-compare": Mr,
|
|
3165
|
+
"remove-compare-item": Nr,
|
|
3166
|
+
"show-compare-print-view": Pr,
|
|
3167
|
+
"product-action-completed": Ir,
|
|
3168
|
+
"add-to-catalog": Lr,
|
|
3169
|
+
"product-errors-action": Rr,
|
|
3170
|
+
"catalog-get-options": zr,
|
|
3171
|
+
"catalogs-fetch": Br,
|
|
3172
|
+
"catalog-create-new": Vr,
|
|
3173
|
+
"product-add-to-catalog": Hr
|
|
3174
|
+
}, Gr = P({
|
|
3175
|
+
name: "InteractiveText",
|
|
3176
|
+
props: {
|
|
3177
|
+
text: {
|
|
3178
|
+
type: String,
|
|
3179
|
+
required: !0
|
|
3180
|
+
},
|
|
3181
|
+
instance: {
|
|
3182
|
+
type: Object,
|
|
3183
|
+
required: !0
|
|
3184
|
+
}
|
|
3185
|
+
},
|
|
3186
|
+
setup(e) {
|
|
3187
|
+
let t = async (t) => {
|
|
3188
|
+
try {
|
|
3189
|
+
var n;
|
|
3190
|
+
await ((n = e.instance) == null ? void 0 : n.execute(new Zn({ productId: t }).from("interactive-text")));
|
|
3191
|
+
} catch {}
|
|
3192
|
+
};
|
|
3193
|
+
return { renderText: () => {
|
|
3194
|
+
let n = /{{([^}]+)}}/, r = e.text.split("\n"), i = [];
|
|
3195
|
+
return r.forEach((e, a) => {
|
|
3196
|
+
let o = e, s;
|
|
3197
|
+
for (; (s = n.exec(o)) !== null;) {
|
|
3198
|
+
let e = o.slice(0, s.index);
|
|
3199
|
+
e && i.push(re("span", e));
|
|
3200
|
+
let n = s[1];
|
|
3201
|
+
i.push(re("a", {
|
|
3202
|
+
href: "#",
|
|
3203
|
+
role: "button",
|
|
3204
|
+
onClick: (e) => {
|
|
3205
|
+
e.preventDefault(), t(n);
|
|
3206
|
+
},
|
|
3207
|
+
onKeydown: (e) => {
|
|
3208
|
+
e.key === " " && (e.preventDefault(), t(n));
|
|
3209
|
+
}
|
|
3210
|
+
}, n)), o = o.slice(s.index + s[0].length);
|
|
3211
|
+
}
|
|
3212
|
+
o && i.push(re("span", o)), a < r.length - 1 && i.push(re("br"));
|
|
3213
|
+
}), re("span", i);
|
|
3214
|
+
} };
|
|
3215
|
+
}
|
|
3216
|
+
}), Kr = { style: { "white-space": "pre-wrap" } };
|
|
3217
|
+
function qr(e, t, n, r, i, a) {
|
|
3218
|
+
return B(), A("div", Kr, [(B(), O(pe(e.renderText)))]);
|
|
3219
|
+
}
|
|
3220
|
+
var Jr = /*#__PURE__*/ x(Gr, [["render", qr]]), Yr = P({
|
|
3221
|
+
name: "PisLink",
|
|
3222
|
+
props: {
|
|
3223
|
+
link: {
|
|
3224
|
+
type: Object,
|
|
3225
|
+
required: !0
|
|
3226
|
+
},
|
|
3227
|
+
instance: {
|
|
3228
|
+
type: Object,
|
|
3229
|
+
required: !0
|
|
3230
|
+
},
|
|
3231
|
+
clearSearch: {
|
|
3232
|
+
type: Boolean,
|
|
3233
|
+
default: !1
|
|
3234
|
+
},
|
|
3235
|
+
onBeforeClick: {
|
|
3236
|
+
type: Function,
|
|
3237
|
+
required: !1,
|
|
3238
|
+
default: void 0
|
|
3239
|
+
}
|
|
3240
|
+
},
|
|
3241
|
+
setup(e) {
|
|
3242
|
+
return { onLinkClick: async () => {
|
|
3243
|
+
if (e.onBeforeClick) try {
|
|
3244
|
+
e.onBeforeClick();
|
|
3245
|
+
} catch {}
|
|
3246
|
+
let t = e.link;
|
|
3247
|
+
switch (t.type) {
|
|
3248
|
+
case o.NONE: break;
|
|
3249
|
+
case o.CLASSIFICATION:
|
|
3250
|
+
if (t.cid) try {
|
|
3251
|
+
var n;
|
|
3252
|
+
await ((n = e.instance) == null ? void 0 : n.execute(new ar({
|
|
3253
|
+
cid: t.cid,
|
|
3254
|
+
clearSearch: e.clearSearch
|
|
3255
|
+
}).from("pis-link")));
|
|
3256
|
+
} catch {}
|
|
3257
|
+
break;
|
|
3258
|
+
case o.DETAIL:
|
|
3259
|
+
if (t.productId) try {
|
|
3260
|
+
var r;
|
|
3261
|
+
await ((r = e.instance) == null ? void 0 : r.execute(new Zn({ productId: t.productId }).from("pis-link")));
|
|
3262
|
+
} catch {}
|
|
3263
|
+
break;
|
|
3264
|
+
case o.DOCUMENT:
|
|
3265
|
+
if (t.documentId) try {
|
|
3266
|
+
var i;
|
|
3267
|
+
await ((i = e.instance) == null ? void 0 : i.execute(new er({ documentId: t.documentId }).from("pis-link")));
|
|
3268
|
+
} catch {}
|
|
3269
|
+
break;
|
|
3270
|
+
case o.SEARCH:
|
|
3271
|
+
if (t.searchText) try {
|
|
3272
|
+
var a;
|
|
3273
|
+
await ((a = e.instance) == null ? void 0 : a.execute(new Xn({
|
|
3274
|
+
searchText: t.searchText,
|
|
3275
|
+
searchType: h.EXACT_PHRASE
|
|
3276
|
+
}).from("pis-link")));
|
|
3277
|
+
} catch {}
|
|
3278
|
+
break;
|
|
3279
|
+
case o.TECHNICAL_INFORMATION:
|
|
3280
|
+
}
|
|
3281
|
+
} };
|
|
3282
|
+
}
|
|
3283
|
+
});
|
|
3284
|
+
//#endregion
|
|
3285
|
+
//#region src/products/components/shared/PisLink.vue
|
|
3286
|
+
function Xr(e, t, n, r, i, a) {
|
|
3287
|
+
return B(), A("a", {
|
|
3288
|
+
href: "#",
|
|
3289
|
+
onClick: t[0] || (t[0] = Q((...t) => e.onLinkClick && e.onLinkClick(...t), ["prevent"]))
|
|
3290
|
+
}, [W(e.$slots, "default")]);
|
|
3291
|
+
}
|
|
3292
|
+
var Zr = /*#__PURE__*/ x(Yr, [["render", Xr]]), Qr = P({
|
|
3293
|
+
name: "AttributeValueTable",
|
|
3294
|
+
props: { table: {
|
|
3295
|
+
type: Object,
|
|
3296
|
+
required: !0
|
|
3297
|
+
} }
|
|
3298
|
+
}), $r = { class: "table-responsive pis-scroll" }, ei = { class: "table table-sm mt-2" };
|
|
3299
|
+
function ti(e, t, n, r, i, a) {
|
|
3300
|
+
let o = fe("safe-html");
|
|
3301
|
+
return B(), A("div", $r, [j("table", ei, [j("thead", null, [j("tr", null, [(B(!0), A(E, null, U(e.table.columns, (e) => (B(), A("th", {
|
|
3302
|
+
key: e.dataField,
|
|
3303
|
+
class: "text-center"
|
|
3304
|
+
}, [Z(j("span", null, null, 512), [[o, e.text]])]))), 128))])]), j("tbody", null, [(B(!0), A(E, null, U(e.table.rows, (t, n) => (B(), A("tr", { key: n }, [(B(!0), A(E, null, U(e.table.columns, (e) => {
|
|
3305
|
+
var n, r;
|
|
3306
|
+
return B(), A("td", {
|
|
3307
|
+
key: e.dataField,
|
|
3308
|
+
class: "text-center"
|
|
3309
|
+
}, [(n = t.values) != null && n[e.dataField] ? (B(!0), A(E, { key: 0 }, U((r = t.values) == null ? void 0 : r[e.dataField], (e, t) => (B(), A("div", {
|
|
3310
|
+
key: t,
|
|
3311
|
+
class: "text-nowrap"
|
|
3312
|
+
}, K(e.text), 1))), 128)) : k("", !0)]);
|
|
3313
|
+
}), 128))]))), 128))])])]);
|
|
3314
|
+
}
|
|
3315
|
+
var ni = /*#__PURE__*/ x(Qr, [["render", ti]]), ri = P({
|
|
3316
|
+
name: "AttributesTable",
|
|
3317
|
+
components: {
|
|
3318
|
+
Icon: f,
|
|
3319
|
+
Arrow: Fe,
|
|
3320
|
+
Tooltip: g,
|
|
3321
|
+
PisLink: Zr,
|
|
3322
|
+
LinkSecondary: $t,
|
|
3323
|
+
InteractiveText: Jr,
|
|
3324
|
+
AttributeValueTable: ni
|
|
3325
|
+
},
|
|
3326
|
+
props: {
|
|
3327
|
+
attributes: {
|
|
3328
|
+
type: Object,
|
|
3329
|
+
default: void 0
|
|
3330
|
+
},
|
|
3331
|
+
instance: {
|
|
3332
|
+
type: Object,
|
|
3333
|
+
required: !0
|
|
3334
|
+
},
|
|
3335
|
+
hideDocumentLinks: {
|
|
3336
|
+
type: Boolean,
|
|
3337
|
+
required: !0
|
|
3338
|
+
},
|
|
3339
|
+
t: {
|
|
3340
|
+
type: Function,
|
|
3341
|
+
required: !0
|
|
3342
|
+
}
|
|
3343
|
+
},
|
|
3344
|
+
setup(e) {
|
|
3345
|
+
let t = D(() => {
|
|
3346
|
+
var t;
|
|
3347
|
+
if (((t = e.instance) == null ? void 0 : t.instanceType) == "Products") {
|
|
3348
|
+
var n;
|
|
3349
|
+
return ((n = e.instance.store) == null || (n = n.options.components) == null || (n = n.common) == null ? void 0 : n.maxAttributeValuesVisible) || Infinity;
|
|
3350
|
+
}
|
|
3351
|
+
return Infinity;
|
|
3352
|
+
}), n = ["#AllIdentifiers", "#DisplayName"], r = de({}), i = {}, a = (e, t) => {
|
|
3353
|
+
i[e] = t;
|
|
3354
|
+
}, o = (e) => r[e];
|
|
3355
|
+
return {
|
|
3356
|
+
records: D(() => Object.values(e.attributes || {}).reduce((e, r) => {
|
|
3357
|
+
if (!n.includes(r.attributeCode)) {
|
|
3358
|
+
var i;
|
|
3359
|
+
let n = r.values || [], a = (((i = r.values) == null ? void 0 : i.length) || 0) > t.value;
|
|
3360
|
+
e.push({
|
|
3361
|
+
shouldBeTrimmed: a,
|
|
3362
|
+
attr: r,
|
|
3363
|
+
trimmedValues: o(r.attributeCode) ? n : n.slice(0, t.value)
|
|
3364
|
+
});
|
|
3365
|
+
}
|
|
3366
|
+
return e;
|
|
3367
|
+
}, [])),
|
|
3368
|
+
storeAttrRef: a,
|
|
3369
|
+
isDisabledTrimming: o,
|
|
3370
|
+
toggleValueTrimming: (e) => {
|
|
3371
|
+
r[e] ? (delete r[e], i[e] && i[e].scrollIntoView()) : r[e] = !0;
|
|
3372
|
+
}
|
|
3373
|
+
};
|
|
3374
|
+
}
|
|
3375
|
+
}), ii = {
|
|
3376
|
+
key: 0,
|
|
3377
|
+
class: "col"
|
|
3378
|
+
}, ai = {
|
|
3379
|
+
key: 0,
|
|
3380
|
+
class: "fw-bold ps-lg-3"
|
|
3381
|
+
}, oi = { class: "col-md-4" }, si = ["id"], ci = { class: "w-100" }, li = { class: "ps-lg-3" }, ui = ["title"], di = {
|
|
3382
|
+
key: 0,
|
|
3383
|
+
class: "flex-shrink-1 px-2"
|
|
3384
|
+
}, fi = {
|
|
3385
|
+
key: 2,
|
|
3386
|
+
style: { "white-space": "pre-wrap" }
|
|
3387
|
+
}, pi = { class: "d-print-none ext-attr-val" }, mi = {
|
|
3388
|
+
key: 2,
|
|
3389
|
+
style: { "white-space": "pre-wrap" }
|
|
3390
|
+
}, hi = { key: 0 };
|
|
3391
|
+
function gi(e, t, n, r, i, a) {
|
|
3392
|
+
let o = G("AttributeValueTable"), s = G("Icon"), c = G("Tooltip"), l = G("InteractiveText"), u = G("PisLink"), d = G("Arrow"), f = G("LinkSecondary"), p = fe("safe-html");
|
|
3393
|
+
return B(!0), A(E, null, U(e.records, (t, n) => (B(), A("div", {
|
|
3394
|
+
key: n,
|
|
3395
|
+
class: R(["row g-0 py-1 py-lg-2", {
|
|
3396
|
+
"border-bottom": t.attr.type != "Table",
|
|
3397
|
+
"bg-warning": t.attr.highlight
|
|
3398
|
+
}])
|
|
3399
|
+
}, [t.attr.type == "Table" && t.attr.table ? (B(), A("div", ii, [t.attr.attributeName ? (B(), A("span", ai, K(t.attr.attributeName) + ": ", 1)) : k("", !0), N(o, { table: t.attr.table }, null, 8, ["table"])])) : (B(), A(E, { key: 1 }, [j("div", oi, [j("div", {
|
|
3400
|
+
id: t.attr.attributeCode == "TechnicalInformation" ? "pis-anchor-attr-TechnicalInformation" : void 0,
|
|
3401
|
+
class: "d-flex"
|
|
3402
|
+
}, [j("div", ci, [j("div", li, [Z(j("span", {
|
|
3403
|
+
class: "d-inline-block w-100 text-wrap fw-bold ext-attr-name",
|
|
3404
|
+
style: {
|
|
3405
|
+
overflow: "hidden",
|
|
3406
|
+
"text-overflow": "ellipsis"
|
|
3407
|
+
},
|
|
3408
|
+
title: t.attr.tooltip ?? void 0
|
|
3409
|
+
}, null, 8, ui), [[p, t.attr.attributeName + ":"]])])]), t.attr.internal ? (B(), A("div", di, [N(c, { text: e.t("Internal", !0) }, {
|
|
3410
|
+
default: X(() => [N(s, {
|
|
3411
|
+
class: "text-warning text-end",
|
|
3412
|
+
name: "warning-triangle"
|
|
3413
|
+
})]),
|
|
3414
|
+
_: 1
|
|
3415
|
+
}, 8, ["text"])])) : k("", !0)], 8, si)]), j("div", {
|
|
3416
|
+
ref_for: !0,
|
|
3417
|
+
ref: (n) => e.storeAttrRef(t.attr.attributeCode, n),
|
|
3418
|
+
class: "col-md-8"
|
|
3419
|
+
}, [(B(!0), A(E, null, U(t.attr.values, (t, n) => (B(), A("div", {
|
|
3420
|
+
key: n,
|
|
3421
|
+
class: "pis-print-only ext-attr-val"
|
|
3422
|
+
}, [t.interactiveText ? (B(), O(l, {
|
|
3423
|
+
key: 0,
|
|
3424
|
+
instance: e.instance,
|
|
3425
|
+
text: t.interactiveText
|
|
3426
|
+
}, null, 8, ["instance", "text"])) : t.link && !e.hideDocumentLinks ? (B(), O(u, {
|
|
3427
|
+
key: 1,
|
|
3428
|
+
link: t.link,
|
|
3429
|
+
instance: e.instance,
|
|
3430
|
+
"clear-search": !0
|
|
3431
|
+
}, {
|
|
3432
|
+
default: X(() => [M(K(t.link.text), 1)]),
|
|
3433
|
+
_: 2
|
|
3434
|
+
}, 1032, ["link", "instance"])) : Z((B(), A("div", fi, null, 512)), [[p, t.text]])]))), 128)), j("div", pi, [(B(!0), A(E, null, U(t.trimmedValues, (t, n) => (B(), A("div", { key: n }, [t.interactiveText ? (B(), O(l, {
|
|
3435
|
+
key: 0,
|
|
3436
|
+
instance: e.instance,
|
|
3437
|
+
text: t.interactiveText
|
|
3438
|
+
}, null, 8, ["instance", "text"])) : t.link && !e.hideDocumentLinks ? (B(), O(u, {
|
|
3439
|
+
key: 1,
|
|
3440
|
+
link: t.link,
|
|
3441
|
+
instance: e.instance,
|
|
3442
|
+
"clear-search": !0
|
|
3443
|
+
}, {
|
|
3444
|
+
default: X(() => [M(K(t.link.text), 1)]),
|
|
3445
|
+
_: 2
|
|
3446
|
+
}, 1032, ["link", "instance"])) : Z((B(), A("div", mi, null, 512)), [[p, t.text]])]))), 128)), t.shouldBeTrimmed ? (B(), A("div", hi, [N(f, { onClick: Q((n) => e.toggleValueTrimming(t.attr.attributeCode), ["prevent"]) }, {
|
|
3447
|
+
default: X(() => [N(d, {
|
|
3448
|
+
class: "me-2",
|
|
3449
|
+
dir: e.isDisabledTrimming(t.attr.attributeCode) ? "up" : "down"
|
|
3450
|
+
}, null, 8, ["dir"]), M(" " + K(e.isDisabledTrimming(t.attr.attributeCode) ? e.t("HideMore") : e.t("ShowMore")), 1)]),
|
|
3451
|
+
_: 2
|
|
3452
|
+
}, 1032, ["onClick"])])) : k("", !0)])], 512)], 64))], 2))), 128);
|
|
3453
|
+
}
|
|
3454
|
+
var _i = /*#__PURE__*/ x(ri, [["render", gi]]);
|
|
3455
|
+
//#endregion
|
|
3456
|
+
export { Tn as $, xr as A, Sr as B, Tr as C, yr as D, _r as E, Or as F, ur as G, Xn as H, Ir as I, ir as J, Pr as K, Hr as L, cr as M, or as N, gr as O, Qn as P, kn as Q, Nr as R, vr as S, hr as T, rr as U, $n as V, lr as W, Vn as X, Gn as Y, Bn as Z, Zn as _, Er as a, Fe as at, Mr as b, wr as c, xe as ct, Vr as d, rn as et, zr as f, Cr as g, tr as h, Jr as i, Ue as it, sr as j, mr as k, dr as l, be as lt, Ur as m, ni as n, Wt as nt, Ar as o, Me as ot, ar as p, kr as q, Zr as r, Je as rt, Lr as s, Se as st, _i as t, $t as tt, nr as u, ye as ut, fr as v, pr as w, Br as x, br as y, Dr as z };
|
|
3457
|
+
|
|
3458
|
+
//# sourceMappingURL=AttributesTable-2eulaCqv.js.map
|