@kupola/kupola 1.6.2 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kupola.cjs.js +4 -4
- package/dist/kupola.cjs.js.map +1 -1
- package/dist/kupola.esm.js +62 -58
- package/dist/kupola.esm.js.map +1 -1
- package/dist/kupola.umd.js +8 -8
- package/dist/kupola.umd.js.map +1 -1
- package/js/dropdown.js +9 -4
- package/js/select.js +6 -3
- package/package.json +1 -1
package/dist/kupola.esm.js
CHANGED
|
@@ -201,8 +201,8 @@ class ht {
|
|
|
201
201
|
console.error(`[KupolaLifecycle] Unhandled error in ${t.phase}:`, t.error);
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
const
|
|
205
|
-
function
|
|
204
|
+
const Ia = new ht("app");
|
|
205
|
+
function Ta(i = "app") {
|
|
206
206
|
return new ht(i);
|
|
207
207
|
}
|
|
208
208
|
const Le = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
@@ -218,10 +218,10 @@ function He(i) {
|
|
|
218
218
|
function Me(i) {
|
|
219
219
|
return i ? i.replace(/\s+$/, "") : "";
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function Ie(i) {
|
|
222
222
|
return i ? i.toUpperCase() : "";
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function Te(i) {
|
|
225
225
|
return i ? i.toLowerCase() : "";
|
|
226
226
|
}
|
|
227
227
|
function Ae(i) {
|
|
@@ -289,7 +289,7 @@ function Je() {
|
|
|
289
289
|
return (i === "x" ? t : t & 3 | 8).toString(16);
|
|
290
290
|
});
|
|
291
291
|
}
|
|
292
|
-
const Ze = { trim: De, trimLeft: He, trimRight: Me, toUpperCase:
|
|
292
|
+
const Ze = { trim: De, trimLeft: He, trimRight: Me, toUpperCase: Ie, toLowerCase: Te, capitalize: Ae, camelize: ze, hyphenate: Pe, padStart: $e, padEnd: Be, truncate: qe, replaceAll: Oe, format: Fe, startsWith: Ne, endsWith: Re, includes: Ve, repeat: Ke, reverse: We, countOccurrences: Ue, escapeHtml: Ye, unescapeHtml: Xe, generateRandom: je, generateUUID: Je };
|
|
293
293
|
function Ge(i) {
|
|
294
294
|
return Array.isArray(i);
|
|
295
295
|
}
|
|
@@ -415,14 +415,14 @@ function Ms(i, t) {
|
|
|
415
415
|
return e.has(n) ? !1 : (e.add(n), !0);
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function Is(i, t) {
|
|
419
419
|
if (!i || t <= 0) return [];
|
|
420
420
|
const e = [];
|
|
421
421
|
for (let s = 0; s < i.length; s += t)
|
|
422
422
|
e.push(i.slice(s, s + t));
|
|
423
423
|
return e;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function Ts(i) {
|
|
426
426
|
if (!i) return [];
|
|
427
427
|
const t = i.slice();
|
|
428
428
|
for (let e = t.length - 1; e > 0; e--) {
|
|
@@ -457,7 +457,7 @@ function Os(...i) {
|
|
|
457
457
|
const t = Math.max(...i.map((e) => e ? e.length : 0));
|
|
458
458
|
return Array.from({ length: t }, (e, s) => i.map((n) => n && n[s]));
|
|
459
459
|
}
|
|
460
|
-
const Fs = { isArray: Ge, isEmpty: Qe, size: ts, first: es, last: ss, get: is, slice: ns, concat: rs, join: as, indexOf: os, lastIndexOf: ls, includes: cs, push: hs, pop: ds, shift: us, unshift: ps, remove: fs, removeAt: ms, insert: gs, reverse: _s, sort: ys, sortBy: vs, filter: bs, map: xs, reduce: Es, forEach: ws, every: ks, some: Cs, find: Ss, findIndex: Ls, flat: Ds, flattenDeep: St, unique: Hs, uniqueBy: Ms, chunk:
|
|
460
|
+
const Fs = { isArray: Ge, isEmpty: Qe, size: ts, first: es, last: ss, get: is, slice: ns, concat: rs, join: as, indexOf: os, lastIndexOf: ls, includes: cs, push: hs, pop: ds, shift: us, unshift: ps, remove: fs, removeAt: ms, insert: gs, reverse: _s, sort: ys, sortBy: vs, filter: bs, map: xs, reduce: Es, forEach: ws, every: ks, some: Cs, find: Ss, findIndex: Ls, flat: Ds, flattenDeep: St, unique: Hs, uniqueBy: Ms, chunk: Is, shuffle: Ts, sum: Lt, average: As, max: zs, min: Ps, intersection: $s, union: Bs, difference: qs, zip: Os };
|
|
461
461
|
function rt(i) {
|
|
462
462
|
return i !== null && typeof i == "object" && !Array.isArray(i);
|
|
463
463
|
}
|
|
@@ -624,18 +624,18 @@ function yi(...i) {
|
|
|
624
624
|
const t = i.filter(L);
|
|
625
625
|
return t.length > 0 ? Math.max(...t) : void 0;
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function It(...i) {
|
|
628
628
|
return i.flat().filter(L).reduce((e, s) => e + s, 0);
|
|
629
629
|
}
|
|
630
630
|
function vi(...i) {
|
|
631
631
|
const t = i.flat().filter(L);
|
|
632
|
-
return t.length > 0 ?
|
|
632
|
+
return t.length > 0 ? It(t) / t.length : 0;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function Tt(i = 0, t = 1) {
|
|
635
635
|
return Math.random() * (t - i) + i;
|
|
636
636
|
}
|
|
637
637
|
function bi(i, t) {
|
|
638
|
-
return Math.floor(
|
|
638
|
+
return Math.floor(Tt(i, t + 1));
|
|
639
639
|
}
|
|
640
640
|
function xi(i, t = 2) {
|
|
641
641
|
return L(i) ? i.toFixed(t) : String(i);
|
|
@@ -668,13 +668,13 @@ function Mi(i, t = 0) {
|
|
|
668
668
|
const e = Number(i);
|
|
669
669
|
return isNaN(e) ? t : e;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function Ii(i, t, e = 0) {
|
|
672
672
|
return !L(i) || !L(t) || t === 0 ? e : i / t;
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function Ti(...i) {
|
|
675
675
|
return i.reduce((t, e) => !L(t) || !L(e) ? 0 : t * e, 1);
|
|
676
676
|
}
|
|
677
|
-
const Ai = { isNumber: L, isInteger: oi, isFloat: li, isPositive: ci, isNegative: hi, isZero: di, clamp: ui, round: pi, floor: fi, ceil: mi, abs: gi, min: _i, max: yi, sum:
|
|
677
|
+
const Ai = { isNumber: L, isInteger: oi, isFloat: li, isPositive: ci, isNegative: hi, isZero: di, clamp: ui, round: pi, floor: fi, ceil: mi, abs: gi, min: _i, max: yi, sum: It, average: vi, random: Tt, randomInt: bi, format: xi, formatCurrency: Ei, formatPercent: wi, toFixed: ki, toPrecision: Ci, isNaN: Si, isFinite: Li, parseInt: Di, parseFloat: Hi, toNumber: Mi, safeDivide: Ii, safeMultiply: Ti };
|
|
678
678
|
function tt() {
|
|
679
679
|
return Date.now();
|
|
680
680
|
}
|
|
@@ -934,10 +934,10 @@ function Hn(i) {
|
|
|
934
934
|
function Mn(i) {
|
|
935
935
|
return /^[a-zA-Z]+$/.test(i || "");
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function In(i) {
|
|
938
938
|
return /^[a-zA-Z0-9]+$/.test(i || "");
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function Tn(i) {
|
|
941
941
|
return /^[\u4e00-\u9fa5]+$/.test(i || "");
|
|
942
942
|
}
|
|
943
943
|
function An(i, t, e) {
|
|
@@ -996,7 +996,7 @@ function Wn(i, t) {
|
|
|
996
996
|
}), a.length > 0 && (e[s] = a);
|
|
997
997
|
}), { valid: Object.keys(e).length === 0, errors: e };
|
|
998
998
|
}
|
|
999
|
-
const Nt = { isEmail: pn, isPhone: fn, isURL: mn, isIPv4: Pt, isIPv6: $t, isIP: gn, isIDCard: _n, isPassport: yn, isCreditCard: vn, isHexColor: Bt, isRGB: qt, isRGBA: Ot, isColor: bn, isDate: xn, isJSON: En, isEmpty: wn, isWhitespace: kn, isNumber: Cn, isInteger: Sn, isFloat: Ln, isPositive: Dn, isNegative: Hn, isAlpha: Mn, isAlphaNumeric:
|
|
999
|
+
const Nt = { isEmail: pn, isPhone: fn, isURL: mn, isIPv4: Pt, isIPv6: $t, isIP: gn, isIDCard: _n, isPassport: yn, isCreditCard: vn, isHexColor: Bt, isRGB: qt, isRGBA: Ot, isColor: bn, isDate: xn, isJSON: En, isEmpty: wn, isWhitespace: kn, isNumber: Cn, isInteger: Sn, isFloat: Ln, isPositive: Dn, isNegative: Hn, isAlpha: Mn, isAlphaNumeric: In, isChinese: Tn, isLength: An, minLength: zn, maxLength: Pn, matches: $n, equals: Bn, contains: Ft, notContains: qn, isArray: On, arrayLength: Fn, arrayMinLength: Nn, arrayMaxLength: Rn, isObject: Vn, hasKeys: Kn, validate: Wn };
|
|
1000
1000
|
function Un(i) {
|
|
1001
1001
|
const t = i ? String(i) : "", e = [1732584193, 4023233417, 2562383102, 271733878], s = [3614090360, 3905402710, 606105819, 3250441966, 4118548399, 1200080426, 2821735955, 4249261313, 1770035416, 2336552879, 4294925233, 2304563134, 1804603682, 4254626195, 2792965006, 1236535329, 4129170786, 3225465664, 643717713, 3921069994, 3593408605, 38016083, 3634488961, 3889429448, 568446438, 3275163606, 4107603335, 1163531501, 2850285829, 4243563512, 1735328473, 2368359562, 4294588738, 2272392833, 1839030562, 4259657740, 2763975236, 1272893353, 4139469664, 3200236656, 681279174, 3936430074, 3572445317, 76029189, 3654602809, 3873151461, 530742520, 3299628645, 4096336452, 1126891415, 2878612391, 4237533241, 1700485571, 2399980690, 4293915773, 2240044497, 1873313359, 4264355552, 2734768916, 1309151649, 4149444226, 3174756917, 718787259, 3951481745], n = [[7, 12, 17, 22], [5, 9, 14, 20], [4, 11, 16, 23], [6, 10, 15, 21]];
|
|
1002
1002
|
function r(d, u) {
|
|
@@ -1854,7 +1854,7 @@ class lr {
|
|
|
1854
1854
|
}), this.events = {}, this.delegatedEvents = {}, this.eventListeners = {};
|
|
1855
1855
|
}
|
|
1856
1856
|
}
|
|
1857
|
-
function
|
|
1857
|
+
function T(i = null) {
|
|
1858
1858
|
const t = {
|
|
1859
1859
|
_value: i,
|
|
1860
1860
|
_subscribers: /* @__PURE__ */ new Set()
|
|
@@ -1881,7 +1881,7 @@ function Pa(i, t) {
|
|
|
1881
1881
|
function $a(i) {
|
|
1882
1882
|
return Kt.getStore(i);
|
|
1883
1883
|
}
|
|
1884
|
-
const
|
|
1884
|
+
const I = {
|
|
1885
1885
|
paths: {
|
|
1886
1886
|
icons: "/icons/",
|
|
1887
1887
|
base: "/"
|
|
@@ -1977,46 +1977,46 @@ const T = {
|
|
|
1977
1977
|
}
|
|
1978
1978
|
};
|
|
1979
1979
|
function Ba(i) {
|
|
1980
|
-
Ut(
|
|
1980
|
+
Ut(I, i);
|
|
1981
1981
|
}
|
|
1982
1982
|
function dt(i) {
|
|
1983
|
-
return i ? mr(
|
|
1983
|
+
return i ? mr(I, i) : I;
|
|
1984
1984
|
}
|
|
1985
1985
|
function Wt() {
|
|
1986
|
-
return
|
|
1986
|
+
return I.paths.base + I.paths.icons.replace(/^\//, "");
|
|
1987
1987
|
}
|
|
1988
1988
|
function qa() {
|
|
1989
|
-
return
|
|
1989
|
+
return I.paths.base;
|
|
1990
1990
|
}
|
|
1991
1991
|
function cr() {
|
|
1992
|
-
return
|
|
1992
|
+
return I.theme.default;
|
|
1993
1993
|
}
|
|
1994
1994
|
function hr() {
|
|
1995
|
-
return
|
|
1995
|
+
return I.theme.brand;
|
|
1996
1996
|
}
|
|
1997
1997
|
function Oa() {
|
|
1998
|
-
return
|
|
1998
|
+
return I.http;
|
|
1999
1999
|
}
|
|
2000
2000
|
function j() {
|
|
2001
|
-
return
|
|
2001
|
+
return I.ui;
|
|
2002
2002
|
}
|
|
2003
2003
|
function W() {
|
|
2004
|
-
return
|
|
2004
|
+
return I.zIndex;
|
|
2005
2005
|
}
|
|
2006
2006
|
function st() {
|
|
2007
|
-
return
|
|
2007
|
+
return I.security;
|
|
2008
2008
|
}
|
|
2009
2009
|
function dr() {
|
|
2010
|
-
return
|
|
2010
|
+
return I.performance;
|
|
2011
2011
|
}
|
|
2012
2012
|
function ur() {
|
|
2013
|
-
return
|
|
2013
|
+
return I.message;
|
|
2014
2014
|
}
|
|
2015
2015
|
function pr() {
|
|
2016
|
-
return
|
|
2016
|
+
return I.notification;
|
|
2017
2017
|
}
|
|
2018
2018
|
function fr() {
|
|
2019
|
-
return
|
|
2019
|
+
return I.validation;
|
|
2020
2020
|
}
|
|
2021
2021
|
function Ut(i, t) {
|
|
2022
2022
|
for (const e in t)
|
|
@@ -2998,12 +2998,14 @@ class Er {
|
|
|
2998
2998
|
}, this.triggerMode === "hover" ? (this.trigger.addEventListener("mouseenter", this._triggerMouseenterHandler), this.trigger.addEventListener("mouseleave", this._triggerMouseleaveHandler), this.menu.addEventListener("mouseenter", this._mouseenterHandler), this.menu.addEventListener("mouseleave", this._mouseleaveHandler)) : this.trigger.addEventListener("click", this._triggerClickHandler), this._triggerKeydownHandler = (t) => {
|
|
2999
2999
|
this.disabled || (t.key === "Enter" || t.key === " " || t.key === "ArrowDown") && (t.preventDefault(), this.showMenu());
|
|
3000
3000
|
}, this.trigger.addEventListener("keydown", this._triggerKeydownHandler), document.addEventListener("keydown", this._keydownHandler), this._documentClickHandler = (t) => {
|
|
3001
|
-
|
|
3001
|
+
if (!this.isOpen) return;
|
|
3002
|
+
const e = this.element.contains(t.target), s = this.menu && this.menu.contains(t.target);
|
|
3003
|
+
!e && !s && this.hideMenu();
|
|
3002
3004
|
}, this._documentClickListener = H.on(document, "click", this._documentClickHandler, { scope: this.scope }), this.menu.style.display = "none", this.element.__kupolaInitialized = !0);
|
|
3003
3005
|
}
|
|
3004
3006
|
_bindMenuItems() {
|
|
3005
3007
|
this.menu.querySelectorAll(".ds-dropdown__item").forEach((t) => {
|
|
3006
|
-
t.
|
|
3008
|
+
t._dropdownItemClickHandler = (e) => this._itemClickHandler(e), t.addEventListener("click", t._dropdownItemClickHandler);
|
|
3007
3009
|
});
|
|
3008
3010
|
}
|
|
3009
3011
|
_getNavigableItems() {
|
|
@@ -3067,9 +3069,9 @@ class Er {
|
|
|
3067
3069
|
s.className = "ds-dropdown__divider", this.menu.appendChild(s);
|
|
3068
3070
|
} else {
|
|
3069
3071
|
const s = document.createElement("div");
|
|
3070
|
-
s.className = "ds-dropdown__item" + (e.disabled ? " is-disabled" : "") + (e.active ? " is-selected" : ""), s.textContent = e.text || e.label || "", e.value !== void 0 && s.setAttribute("data-value", e.value), e.icon && (s.innerHTML = e.icon + s.innerHTML), e.disabled && s.classList.add("is-disabled"), this.menu.appendChild(s);
|
|
3072
|
+
s.className = "ds-dropdown__item" + (e.disabled ? " is-disabled" : "") + (e.active ? " is-selected" : ""), s.textContent = e.text || e.label || "", e.value !== void 0 && s.setAttribute("data-value", e.value), e.icon && (s.innerHTML = e.icon + s.innerHTML), e.disabled && s.classList.add("is-disabled"), s._dropdownItemClickHandler = (n) => this._itemClickHandler(n), s.addEventListener("click", s._dropdownItemClickHandler), this.menu.appendChild(s);
|
|
3071
3073
|
}
|
|
3072
|
-
})
|
|
3074
|
+
});
|
|
3073
3075
|
}
|
|
3074
3076
|
destroy() {
|
|
3075
3077
|
this.element.__kupolaInitialized && (clearTimeout(this._hoverTimer), clearTimeout(this._hoverLeaveTimer), this.trigger && (this._triggerClickHandler && this.trigger.removeEventListener("click", this._triggerClickHandler), this._triggerMouseenterHandler && this.trigger.removeEventListener("mouseenter", this._triggerMouseenterHandler), this._triggerMouseleaveHandler && this.trigger.removeEventListener("mouseleave", this._triggerMouseleaveHandler), this._triggerKeydownHandler && this.trigger.removeEventListener("keydown", this._triggerKeydownHandler)), this.menu && (this.menu.querySelectorAll(".ds-dropdown__item").forEach((t) => {
|
|
@@ -3127,7 +3129,9 @@ class wr {
|
|
|
3127
3129
|
break;
|
|
3128
3130
|
}
|
|
3129
3131
|
}, document.addEventListener("keydown", this._keydownHandler), this._documentClickHandler = (t) => {
|
|
3130
|
-
|
|
3132
|
+
if (!this.isOpen) return;
|
|
3133
|
+
const e = this.element.contains(t.target), s = this.optionsEl && this.optionsEl.contains(t.target);
|
|
3134
|
+
!e && !s && this.hideOptions();
|
|
3131
3135
|
}, this._documentClickListener = H.on(document, "click", this._documentClickHandler, { scope: this.scope }), this._restoreSelectedState(), this.optionsEl.style.display = "none", this.element.__kupolaInitialized = !0);
|
|
3132
3136
|
}
|
|
3133
3137
|
_collectOptions() {
|
|
@@ -3179,7 +3183,7 @@ class wr {
|
|
|
3179
3183
|
e._selectOptionClickHandler && e.removeEventListener("click", e._selectOptionClickHandler), e.remove();
|
|
3180
3184
|
}), t.forEach((e) => {
|
|
3181
3185
|
const s = document.createElement("div");
|
|
3182
|
-
s.className = "ds-select__option", s.setAttribute("data-value", e.value), s.textContent = e.text || e.label, e.disabled && s.classList.add("is-disabled"), this.selectedValues.has(e.value) && s.classList.add("is-selected"), s.
|
|
3186
|
+
s.className = "ds-select__option", s.setAttribute("data-value", e.value), s.textContent = e.text || e.label, e.disabled && s.classList.add("is-disabled"), this.selectedValues.has(e.value) && s.classList.add("is-selected"), s._selectOptionClickHandler = (n) => this._optionClickHandler(n), s.addEventListener("click", s._selectOptionClickHandler), this.optionsEl.appendChild(s);
|
|
3183
3187
|
}), this.allOptions = t.map((e) => ({
|
|
3184
3188
|
el: this.optionsEl.querySelector(`[data-value="${e.value}"]`),
|
|
3185
3189
|
value: e.value,
|
|
@@ -3256,7 +3260,7 @@ class wr {
|
|
|
3256
3260
|
}
|
|
3257
3261
|
_bindOptionClicks() {
|
|
3258
3262
|
this.optionsEl.querySelectorAll(".ds-select__option, .ds-select__item").forEach((t) => {
|
|
3259
|
-
t.
|
|
3263
|
+
t._selectOptionClickHandler = (e) => this._optionClickHandler(e), t.addEventListener("click", t._selectOptionClickHandler);
|
|
3260
3264
|
});
|
|
3261
3265
|
}
|
|
3262
3266
|
_getVisibleOptions() {
|
|
@@ -3984,7 +3988,7 @@ function xo() {
|
|
|
3984
3988
|
});
|
|
3985
3989
|
}
|
|
3986
3990
|
E.register("slider", ee, Mr);
|
|
3987
|
-
class
|
|
3991
|
+
class Ir {
|
|
3988
3992
|
constructor(t, e = {}) {
|
|
3989
3993
|
this.element = t, this.track = t.querySelector(".ds-carousel__track"), this.items = t.querySelectorAll(".ds-carousel__item"), this.prevBtn = t.querySelector(".ds-carousel__prev"), this.nextBtn = t.querySelector(".ds-carousel__next"), this.indicators = t.querySelectorAll(".ds-carousel__indicator"), this.autoBtn = t.querySelector(".ds-carousel__auto"), this.mode = e.mode || t.getAttribute("data-carousel-mode") || "slide", this.vertical = e.vertical || t.hasAttribute("data-carousel-vertical"), this.autoPlay = e.autoPlay !== !1, this.interval = e.interval || parseInt(t.getAttribute("data-carousel-interval")) || 3e3, this.transitionDuration = e.transitionDuration || parseInt(t.getAttribute("data-carousel-duration")) || 500, this.loop = e.loop !== !1, this.pauseOnHover = e.pauseOnHover !== !1, this.swipe = e.swipe !== !1, this.swipeThreshold = e.swipeThreshold || 50, this.keyboardNav = e.keyboardNav || t.hasAttribute("data-carousel-keyboard"), this.onChange = e.onChange || null, this.currentIndex = 0, this.totalItems = this.items.length, this.autoPlayTimer = null, this.isAutoPlaying = !1, this.isTransitioning = !1, this.touchStartX = 0, this.touchStartY = 0, this.touchDeltaX = 0, this.touchDeltaY = 0, this.isSwiping = !1, this._mouseEnterHandler = () => {
|
|
3990
3994
|
this.pauseOnHover && this.stopAutoPlay();
|
|
@@ -4067,7 +4071,7 @@ class Tr {
|
|
|
4067
4071
|
}
|
|
4068
4072
|
function se(i, t) {
|
|
4069
4073
|
if (i.__kupolaInitialized) return;
|
|
4070
|
-
const e = new
|
|
4074
|
+
const e = new Ir(i, t);
|
|
4071
4075
|
i.__kupolaInstance = e, i.__kupolaInitialized = !0;
|
|
4072
4076
|
}
|
|
4073
4077
|
function Eo(i = document) {
|
|
@@ -4075,11 +4079,11 @@ function Eo(i = document) {
|
|
|
4075
4079
|
se(t);
|
|
4076
4080
|
});
|
|
4077
4081
|
}
|
|
4078
|
-
function
|
|
4082
|
+
function Tr(i) {
|
|
4079
4083
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4080
4084
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4081
4085
|
}
|
|
4082
|
-
E.register("carousel", se,
|
|
4086
|
+
E.register("carousel", se, Tr);
|
|
4083
4087
|
class Ar {
|
|
4084
4088
|
constructor(t, e = {}) {
|
|
4085
4089
|
this.element = t, this.mask = t.querySelector(".ds-drawer-mask"), this.drawerEl = t.querySelector(".ds-drawer"), this.placement = e.placement || t.getAttribute("data-drawer-placement") || "right", this.width = e.width || t.getAttribute("data-drawer-width") || "400px", this.height = e.height || t.getAttribute("data-drawer-height") || "400px", this.escClose = e.escClose !== !1, this.maskClosable = e.maskClosable !== !1, this.showMask = e.showMask !== !1, this.onOpen = e.onOpen || null, this.onClose = e.onClose || null, this.onBeforeClose = e.onBeforeClose || null, this._keydownHandler = null, this._bindEvents();
|
|
@@ -4451,7 +4455,7 @@ const Mo = {
|
|
|
4451
4455
|
}, n);
|
|
4452
4456
|
}
|
|
4453
4457
|
};
|
|
4454
|
-
function
|
|
4458
|
+
function Io() {
|
|
4455
4459
|
}
|
|
4456
4460
|
function bt(i) {
|
|
4457
4461
|
return i ? i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
@@ -4623,7 +4627,7 @@ function Br(i) {
|
|
|
4623
4627
|
if (!i.__kupolaInitialized || !i.__kupolaInstance) return;
|
|
4624
4628
|
i.__kupolaInstance.destroy(), i.__kupolaInstance = null, i.__kupolaInitialized = !1;
|
|
4625
4629
|
}
|
|
4626
|
-
function
|
|
4630
|
+
function To() {
|
|
4627
4631
|
document.querySelectorAll(".ds-fileupload").forEach((i) => {
|
|
4628
4632
|
re(i);
|
|
4629
4633
|
});
|
|
@@ -7419,7 +7423,7 @@ function Zo(i, t) {
|
|
|
7419
7423
|
const o = {
|
|
7420
7424
|
...a,
|
|
7421
7425
|
cacheKey: a.cacheKey || `${r}-${JSON.stringify(wt(i))}`
|
|
7422
|
-
}, l = Ee(o, s), c =
|
|
7426
|
+
}, l = Ee(o, s), c = T(null), h = T(!0), d = T(null), u = T(null);
|
|
7423
7427
|
let f = 0;
|
|
7424
7428
|
async function m() {
|
|
7425
7429
|
const b = ++f;
|
|
@@ -7477,7 +7481,7 @@ function Zo(i, t) {
|
|
|
7477
7481
|
}, window.__kupolaDepInstances || (window.__kupolaDepInstances = []), window.__kupolaDepInstances.push(e), e;
|
|
7478
7482
|
}
|
|
7479
7483
|
function Go(i) {
|
|
7480
|
-
const t = new ve(), e = Ee(i, t), s =
|
|
7484
|
+
const t = new ve(), e = Ee(i, t), s = T(null), n = T(!0), r = T(null);
|
|
7481
7485
|
let a = 0;
|
|
7482
7486
|
async function o() {
|
|
7483
7487
|
const l = ++a;
|
|
@@ -7517,7 +7521,7 @@ function Qo() {
|
|
|
7517
7521
|
}
|
|
7518
7522
|
class Ea {
|
|
7519
7523
|
constructor(t, e = {}) {
|
|
7520
|
-
this.element = typeof t == "string" ? document.querySelector(t) : t, this.options = e, this.columns = (e.columns || []).map((s, n) => ({ ...s, _index: n })), this.rowKey = e.rowKey || "id", this._data = [], this._loading = !1, this.striped = e.striped !== !1, this.bordered = e.bordered || !1, this.hoverable = e.hoverable !== !1, this.compact = e.compact || !1, this.emptyText = e.emptyText || "暂无数据", this.loadingText = e.loadingText || "加载中...", this.multiSort = e.multiSort || !1, this._sorts = [], this._filterText = "", this._showPagination = e.pagination !== !1, this._pageSizes = e.pageSizes || [10, 20, 50, 100], this._pageSize = e.pageSize || 10, this._currentPage = 1, this._total = 0, this.selection = e.selection || null, this._selectedKeys = /* @__PURE__ */ new Set(), this.selectionColumnTitle = e.selectionColumnTitle || "", this.expandable = e.expandable || null, this._expandedKeys = /* @__PURE__ */ new Set(), this.expandColumnTitle = e.expandColumnTitle || "", this.editable = e.editable || !1, this._editingCell = null, this._editBuffer = {}, this.resizable = e.resizable || !1, this.draggable = e.draggable || !1, this._dragState = null, this.tree = e.tree || null, this._treeExpandedKeys = /* @__PURE__ */ new Set(), e.tree?.defaultExpandAll && (this._treeExpandAll = !0), this.virtualScroll = e.virtualScroll || null, this._scrollContainer = null, this._scrollHandler = null, this._resizeCleanups = [], this._filterDebounceTimer = null, this._reactiveCleanups = [], this.mergeCells = e.mergeCells || null, this.onSort = e.onSort || null, this.onPageChange = e.onPageChange || null, this.onRowClick = e.onRowClick || null, this.onFilter = e.onFilter || null, this.onSelect = e.onSelect || null, this.onExpand = e.onExpand || null, this.onEditSave = e.onEditSave || null, this.onEditCancel = e.onEditCancel || null, this.onRowDragEnd = e.onRowDragEnd || null, this.onColumnResize = e.onColumnResize || null, this.sortKey =
|
|
7524
|
+
this.element = typeof t == "string" ? document.querySelector(t) : t, this.options = e, this.columns = (e.columns || []).map((s, n) => ({ ...s, _index: n })), this.rowKey = e.rowKey || "id", this._data = [], this._loading = !1, this.striped = e.striped !== !1, this.bordered = e.bordered || !1, this.hoverable = e.hoverable !== !1, this.compact = e.compact || !1, this.emptyText = e.emptyText || "暂无数据", this.loadingText = e.loadingText || "加载中...", this.multiSort = e.multiSort || !1, this._sorts = [], this._filterText = "", this._showPagination = e.pagination !== !1, this._pageSizes = e.pageSizes || [10, 20, 50, 100], this._pageSize = e.pageSize || 10, this._currentPage = 1, this._total = 0, this.selection = e.selection || null, this._selectedKeys = /* @__PURE__ */ new Set(), this.selectionColumnTitle = e.selectionColumnTitle || "", this.expandable = e.expandable || null, this._expandedKeys = /* @__PURE__ */ new Set(), this.expandColumnTitle = e.expandColumnTitle || "", this.editable = e.editable || !1, this._editingCell = null, this._editBuffer = {}, this.resizable = e.resizable || !1, this.draggable = e.draggable || !1, this._dragState = null, this.tree = e.tree || null, this._treeExpandedKeys = /* @__PURE__ */ new Set(), e.tree?.defaultExpandAll && (this._treeExpandAll = !0), this.virtualScroll = e.virtualScroll || null, this._scrollContainer = null, this._scrollHandler = null, this._resizeCleanups = [], this._filterDebounceTimer = null, this._reactiveCleanups = [], this.mergeCells = e.mergeCells || null, this.onSort = e.onSort || null, this.onPageChange = e.onPageChange || null, this.onRowClick = e.onRowClick || null, this.onFilter = e.onFilter || null, this.onSelect = e.onSelect || null, this.onExpand = e.onExpand || null, this.onEditSave = e.onEditSave || null, this.onEditCancel = e.onEditCancel || null, this.onRowDragEnd = e.onRowDragEnd || null, this.onColumnResize = e.onColumnResize || null, this.sortKey = T(null), this.sortOrder = T(null), this.currentPage = T(1), this.filterText = T(""), this.selectedKeys = T([]), this._init();
|
|
7521
7525
|
}
|
|
7522
7526
|
_init() {
|
|
7523
7527
|
this.element.classList.add("kupola-table-wrapper"), this.virtualScroll && this.element.classList.add("kupola-table-virtual-wrapper"), this.render();
|
|
@@ -8073,7 +8077,7 @@ function tl() {
|
|
|
8073
8077
|
E.register("table", we);
|
|
8074
8078
|
class wa {
|
|
8075
8079
|
constructor(t, e = {}) {
|
|
8076
|
-
this.element = typeof t == "string" ? document.querySelector(t) : t, this.options = e, this._current = e.current || 1, this._total = e.total || 0, this._pageSize = e.pageSize || 10, this._maxPages = e.maxPages || 7, this._showTotal = e.showTotal !== !1, this._showSizeChanger = e.showSizeChanger || !1, this._pageSizes = e.pageSizes || [10, 20, 50, 100], this._simple = e.simple || !1, this.current =
|
|
8080
|
+
this.element = typeof t == "string" ? document.querySelector(t) : t, this.options = e, this._current = e.current || 1, this._total = e.total || 0, this._pageSize = e.pageSize || 10, this._maxPages = e.maxPages || 7, this._showTotal = e.showTotal !== !1, this._showSizeChanger = e.showSizeChanger || !1, this._pageSizes = e.pageSizes || [10, 20, 50, 100], this._simple = e.simple || !1, this.current = T(this._current), this.total = T(this._total), this.onChange = e.onChange || null, this.onPageSizeChange = e.onPageSizeChange || null, this._init();
|
|
8077
8081
|
}
|
|
8078
8082
|
_init() {
|
|
8079
8083
|
this.element.classList.add("kupola-pagination"), this.render();
|
|
@@ -8336,7 +8340,7 @@ export {
|
|
|
8336
8340
|
_a as CacheEntry,
|
|
8337
8341
|
ve as CacheManager,
|
|
8338
8342
|
Rr as Calendar,
|
|
8339
|
-
|
|
8343
|
+
Ir as Carousel,
|
|
8340
8344
|
qr as Collapse,
|
|
8341
8345
|
Fr as ColorPicker,
|
|
8342
8346
|
_r as ComponentInitializerRegistry,
|
|
@@ -8393,7 +8397,7 @@ export {
|
|
|
8393
8397
|
_o as cleanupAllDropdowns,
|
|
8394
8398
|
ua as cleanupAllSlideCaptchas,
|
|
8395
8399
|
Vr as cleanupCalendar,
|
|
8396
|
-
|
|
8400
|
+
Tr as cleanupCarousel,
|
|
8397
8401
|
Or as cleanupCollapse,
|
|
8398
8402
|
Nr as cleanupColorPicker,
|
|
8399
8403
|
aa as cleanupCountdown,
|
|
@@ -8418,7 +8422,7 @@ export {
|
|
|
8418
8422
|
ko as confirmModal,
|
|
8419
8423
|
Na as createBrandPicker,
|
|
8420
8424
|
Qa as createI18n,
|
|
8421
|
-
|
|
8425
|
+
Ta as createLifecycle,
|
|
8422
8426
|
ie as createModal,
|
|
8423
8427
|
Ee as createSource,
|
|
8424
8428
|
Pa as createStore,
|
|
@@ -8475,12 +8479,12 @@ export {
|
|
|
8475
8479
|
ce as initDynamicTags,
|
|
8476
8480
|
$o as initDynamicTagsAll,
|
|
8477
8481
|
re as initFileUpload,
|
|
8478
|
-
|
|
8482
|
+
To as initFileUploads,
|
|
8479
8483
|
fa as initFormValidation,
|
|
8480
8484
|
pe as initHeatmap,
|
|
8481
8485
|
No as initHeatmaps,
|
|
8482
8486
|
Bo as initImagePreview,
|
|
8483
|
-
|
|
8487
|
+
Io as initMessages,
|
|
8484
8488
|
ne as initModal,
|
|
8485
8489
|
So as initModals,
|
|
8486
8490
|
Ho as initNotifications,
|
|
@@ -8508,7 +8512,7 @@ export {
|
|
|
8508
8512
|
za as kupolaEvents,
|
|
8509
8513
|
N as kupolaI18n,
|
|
8510
8514
|
E as kupolaInitializer,
|
|
8511
|
-
|
|
8515
|
+
Ia as kupolaLifecycle,
|
|
8512
8516
|
M as kupolaRegistry,
|
|
8513
8517
|
Kt as kupolaStoreManager,
|
|
8514
8518
|
Wa as maskData,
|
|
@@ -8521,7 +8525,7 @@ export {
|
|
|
8521
8525
|
oo as on,
|
|
8522
8526
|
lo as once,
|
|
8523
8527
|
nr as preloadUtils,
|
|
8524
|
-
|
|
8528
|
+
T as ref,
|
|
8525
8529
|
Ya as registerComponent,
|
|
8526
8530
|
Xa as registerLazyComponent,
|
|
8527
8531
|
sl as registerWebComponents,
|