react-ecosistema-unp 1.7.21 → 1.7.22
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as M, Fragment as Je, jsx as
|
|
2
|
-
import { useState as H, useEffect as
|
|
3
|
-
import { L as
|
|
1
|
+
import { jsxs as M, Fragment as Je, jsx as P } from "react/jsx-runtime";
|
|
2
|
+
import { useState as H, useEffect as En } from "react";
|
|
3
|
+
import { L as Ae, i as An, n as Bn, a as Pn } from "../../isLoading-B9qN9mny.js";
|
|
4
4
|
import { Tabla as Tn } from "./tabla/Tabla.js";
|
|
5
5
|
import { EcoModal as Ln } from "./modal-v2/EcoModal.js";
|
|
6
6
|
import { EncabezadoTabla as $n } from "./encabezado-tabla/EncabezadoTabla.js";
|
|
@@ -38,7 +38,7 @@ const Dn = 100, a = {}, Hn = () => {
|
|
|
38
38
|
(e, t) => (e[t] = wt + t, e),
|
|
39
39
|
/** @type {SwalClasses} */
|
|
40
40
|
{}
|
|
41
|
-
), Fn = ["success", "warning", "info", "question", "error"],
|
|
41
|
+
), Fn = ["success", "warning", "info", "question", "error"], de = Fn.reduce(
|
|
42
42
|
(e, t) => (e[t] = wt + t, e),
|
|
43
43
|
/** @type {SwalIcons} */
|
|
44
44
|
{}
|
|
@@ -51,19 +51,19 @@ const Dn = 100, a = {}, Hn = () => {
|
|
|
51
51
|
}, mt = function(e) {
|
|
52
52
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
53
53
|
qn(`"${e}" is deprecated and will be removed in the next major release.${t ? ` Use "${t}" instead.` : ""}`);
|
|
54
|
-
}, ye = (e) => typeof e == "function" ? e() : e, Se = (e) => e && typeof e.toPromise == "function",
|
|
54
|
+
}, ye = (e) => typeof e == "function" ? e() : e, Se = (e) => e && typeof e.toPromise == "function", Q = (e) => Se(e) ? e.toPromise() : Promise.resolve(e), Ie = (e) => e && Promise.resolve(e) === e, k = () => document.body.querySelector(`.${i.container}`), ee = (e) => {
|
|
55
55
|
const t = k();
|
|
56
56
|
return t ? t.querySelector(e) : null;
|
|
57
|
-
}, A = (e) =>
|
|
57
|
+
}, A = (e) => ee(`.${e}`), u = () => A(i.popup), _ = () => A(i.icon), Vn = () => A(i["icon-content"]), ht = () => A(i.title), Me = () => A(i["html-container"]), gt = () => A(i.image), Oe = () => A(i["progress-steps"]), ve = () => A(i["validation-message"]), S = () => (
|
|
58
58
|
/** @type {HTMLButtonElement} */
|
|
59
|
-
|
|
59
|
+
ee(`.${i.actions} .${i.confirm}`)
|
|
60
60
|
), Y = () => (
|
|
61
61
|
/** @type {HTMLButtonElement} */
|
|
62
|
-
|
|
62
|
+
ee(`.${i.actions} .${i.cancel}`)
|
|
63
63
|
), V = () => (
|
|
64
64
|
/** @type {HTMLButtonElement} */
|
|
65
|
-
|
|
66
|
-
), Nn = () => A(i["input-label"]), X = () =>
|
|
65
|
+
ee(`.${i.actions} .${i.deny}`)
|
|
66
|
+
), Nn = () => A(i["input-label"]), X = () => ee(`.${i.loader}`), te = () => A(i.actions), pt = () => A(i.footer), ke = () => A(i["timer-progress-bar"]), De = () => A(i.close), Rn = `
|
|
67
67
|
a[href],
|
|
68
68
|
area[href],
|
|
69
69
|
input:not([disabled]),
|
|
@@ -87,13 +87,13 @@ const Dn = 100, a = {}, Hn = () => {
|
|
|
87
87
|
return c > w ? 1 : c < w ? -1 : 0;
|
|
88
88
|
}), o = e.querySelectorAll(Rn), s = Array.from(o).filter((r) => r.getAttribute("tabindex") !== "-1");
|
|
89
89
|
return [...new Set(n.concat(s))].filter((r) => x(r));
|
|
90
|
-
}, je = () =>
|
|
90
|
+
}, je = () => I(document.body, i.shown) && !I(document.body, i["toast-shown"]) && !I(document.body, i["no-backdrop"]), xe = () => {
|
|
91
91
|
const e = u();
|
|
92
|
-
return e ?
|
|
92
|
+
return e ? I(e, i.toast) : !1;
|
|
93
93
|
}, Wn = () => {
|
|
94
94
|
const e = u();
|
|
95
95
|
return e ? e.hasAttribute("data-loading") : !1;
|
|
96
|
-
},
|
|
96
|
+
}, B = (e, t) => {
|
|
97
97
|
if (e.textContent = "", t) {
|
|
98
98
|
const o = new DOMParser().parseFromString(t, "text/html"), s = o.querySelector("head");
|
|
99
99
|
s && Array.from(s.childNodes).forEach((l) => {
|
|
@@ -104,7 +104,7 @@ const Dn = 100, a = {}, Hn = () => {
|
|
|
104
104
|
l instanceof HTMLVideoElement || l instanceof HTMLAudioElement ? e.appendChild(l.cloneNode(!0)) : e.appendChild(l);
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
},
|
|
107
|
+
}, I = (e, t) => {
|
|
108
108
|
if (!t)
|
|
109
109
|
return !1;
|
|
110
110
|
const n = t.split(/\s+/);
|
|
@@ -114,9 +114,9 @@ const Dn = 100, a = {}, Hn = () => {
|
|
|
114
114
|
return !0;
|
|
115
115
|
}, Un = (e, t) => {
|
|
116
116
|
Array.from(e.classList).forEach((n) => {
|
|
117
|
-
!Object.values(i).includes(n) && !Object.values(
|
|
117
|
+
!Object.values(i).includes(n) && !Object.values(de).includes(n) && !Object.values(t.showClass || {}).includes(n) && e.classList.remove(n);
|
|
118
118
|
});
|
|
119
|
-
},
|
|
119
|
+
}, E = (e, t, n) => {
|
|
120
120
|
if (Un(e, t), !t.customClass)
|
|
121
121
|
return;
|
|
122
122
|
const o = t.customClass[
|
|
@@ -160,18 +160,18 @@ const Dn = 100, a = {}, Hn = () => {
|
|
|
160
160
|
}));
|
|
161
161
|
}, d = (e, t) => {
|
|
162
162
|
yt(e, t, !0);
|
|
163
|
-
},
|
|
163
|
+
}, T = (e, t) => {
|
|
164
164
|
yt(e, t, !1);
|
|
165
165
|
}, O = (e, t) => {
|
|
166
166
|
const n = Array.from(e.children);
|
|
167
167
|
for (let o = 0; o < n.length; o++) {
|
|
168
168
|
const s = n[o];
|
|
169
|
-
if (s instanceof HTMLElement &&
|
|
169
|
+
if (s instanceof HTMLElement && I(s, t))
|
|
170
170
|
return s;
|
|
171
171
|
}
|
|
172
172
|
}, z = (e, t, n) => {
|
|
173
173
|
n === `${parseInt(n)}` && (n = parseInt(n)), n || parseInt(n) === 0 ? e.style.setProperty(t, typeof n == "number" ? `${n}px` : n) : e.style.removeProperty(t);
|
|
174
|
-
},
|
|
174
|
+
}, p = function(e) {
|
|
175
175
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "flex";
|
|
176
176
|
e && (e.style.display = t);
|
|
177
177
|
}, y = (e) => {
|
|
@@ -179,7 +179,7 @@ const Dn = 100, a = {}, Hn = () => {
|
|
|
179
179
|
}, ze = function(e) {
|
|
180
180
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "block";
|
|
181
181
|
e && new MutationObserver(() => {
|
|
182
|
-
|
|
182
|
+
ne(e, e.innerHTML, t);
|
|
183
183
|
}).observe(e, {
|
|
184
184
|
childList: !0,
|
|
185
185
|
subtree: !0
|
|
@@ -187,10 +187,10 @@ const Dn = 100, a = {}, Hn = () => {
|
|
|
187
187
|
}, et = (e, t, n, o) => {
|
|
188
188
|
const s = e.querySelector(t);
|
|
189
189
|
s && s.style.setProperty(n, o);
|
|
190
|
-
},
|
|
190
|
+
}, ne = function(e, t) {
|
|
191
191
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "flex";
|
|
192
|
-
t ?
|
|
193
|
-
}, x = (e) => !!(e && (e.offsetWidth || e.offsetHeight || e.getClientRects().length)), _n = () => !x(
|
|
192
|
+
t ? p(e, n) : y(e);
|
|
193
|
+
}, x = (e) => !!(e && (e.offsetWidth || e.offsetHeight || e.getClientRects().length)), _n = () => !x(S()) && !x(V()) && !x(Y()), tt = (e) => e.scrollHeight > e.clientHeight, vt = (e) => {
|
|
194
194
|
const t = window.getComputedStyle(e), n = parseFloat(t.getPropertyValue("animation-duration") || "0"), o = parseFloat(t.getPropertyValue("transition-duration") || "0");
|
|
195
195
|
return n > 0 || o > 0;
|
|
196
196
|
}, Fe = function(e) {
|
|
@@ -242,7 +242,7 @@ const Dn = 100, a = {}, Hn = () => {
|
|
|
242
242
|
</div>
|
|
243
243
|
`.replace(/(^|\n)\s*/g, ""), Zn = () => {
|
|
244
244
|
const e = k();
|
|
245
|
-
return e ? (e.remove(),
|
|
245
|
+
return e ? (e.remove(), T([document.documentElement, document.body], [i["no-backdrop"], i["toast-shown"], i["has-column"]]), !0) : !1;
|
|
246
246
|
}, j = () => {
|
|
247
247
|
a.currentInstance.resetValidationMessage();
|
|
248
248
|
}, Jn = () => {
|
|
@@ -264,13 +264,13 @@ const Dn = 100, a = {}, Hn = () => {
|
|
|
264
264
|
return;
|
|
265
265
|
}
|
|
266
266
|
const n = document.createElement("div");
|
|
267
|
-
n.className = i.container, t && d(n, i["no-transition"]),
|
|
267
|
+
n.className = i.container, t && d(n, i["no-transition"]), B(n, Kn), n.dataset.swal2Theme = e.theme;
|
|
268
268
|
const o = Gn(e.target);
|
|
269
269
|
o.appendChild(n), Qn(e), eo(o), Jn();
|
|
270
270
|
}, qe = (e, t) => {
|
|
271
|
-
e instanceof HTMLElement ? t.appendChild(e) : typeof e == "object" ? no(e, t) : e &&
|
|
271
|
+
e instanceof HTMLElement ? t.appendChild(e) : typeof e == "object" ? no(e, t) : e && B(t, e);
|
|
272
272
|
}, no = (e, t) => {
|
|
273
|
-
e.jquery ? oo(t, e) :
|
|
273
|
+
e.jquery ? oo(t, e) : B(t, e.toString());
|
|
274
274
|
}, oo = (e, t) => {
|
|
275
275
|
if (e.textContent = "", 0 in t)
|
|
276
276
|
for (let n = 0; n in t; n++)
|
|
@@ -278,16 +278,16 @@ const Dn = 100, a = {}, Hn = () => {
|
|
|
278
278
|
else
|
|
279
279
|
e.appendChild(t.cloneNode(!0));
|
|
280
280
|
}, so = (e, t) => {
|
|
281
|
-
const n =
|
|
282
|
-
!n || !o || (!t.showConfirmButton && !t.showDenyButton && !t.showCancelButton ? y(n) :
|
|
281
|
+
const n = te(), o = X();
|
|
282
|
+
!n || !o || (!t.showConfirmButton && !t.showDenyButton && !t.showCancelButton ? y(n) : p(n), E(n, t, "actions"), io(n, o, t), B(o, t.loaderHtml || ""), E(o, t, "loader"));
|
|
283
283
|
};
|
|
284
284
|
function io(e, t, n) {
|
|
285
|
-
const o =
|
|
285
|
+
const o = S(), s = V(), r = Y();
|
|
286
286
|
!o || !s || !r || (Be(o, "confirm", n), Be(s, "deny", n), Be(r, "cancel", n), ro(o, s, r, n), n.reverseButtons && (n.toast ? (e.insertBefore(r, o), e.insertBefore(s, o)) : (e.insertBefore(r, t), e.insertBefore(s, t), e.insertBefore(o, t))));
|
|
287
287
|
}
|
|
288
288
|
function ro(e, t, n, o) {
|
|
289
289
|
if (!o.buttonsStyling) {
|
|
290
|
-
|
|
290
|
+
T([e, t, n], i.styled);
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
293
|
d([e, t, n], i.styled), o.confirmButtonColor && (e.style.backgroundColor = o.confirmButtonColor, d(e, i["default-outline"])), o.denyButtonColor && (t.style.backgroundColor = o.denyButtonColor, d(t, i["default-outline"])), o.cancelButtonColor && (n.style.backgroundColor = o.cancelButtonColor, d(n, i["default-outline"]));
|
|
@@ -297,14 +297,14 @@ function Be(e, t, n) {
|
|
|
297
297
|
/** @type {'Confirm' | 'Deny' | 'Cancel'} */
|
|
298
298
|
$e(t)
|
|
299
299
|
);
|
|
300
|
-
|
|
300
|
+
ne(e, n[`show${o}Button`], "inline-block"), B(e, n[`${t}ButtonText`] || ""), e.setAttribute("aria-label", n[`${t}ButtonAriaLabel`] || ""), e.className = i[t], E(e, n, `${t}Button`);
|
|
301
301
|
}
|
|
302
302
|
const ao = (e, t) => {
|
|
303
303
|
const n = De();
|
|
304
|
-
n && (
|
|
304
|
+
n && (B(n, t.closeButtonHtml || ""), E(n, t, "closeButton"), ne(n, t.showCloseButton), n.setAttribute("aria-label", t.closeButtonAriaLabel || ""));
|
|
305
305
|
}, lo = (e, t) => {
|
|
306
306
|
const n = k();
|
|
307
|
-
n && (co(n, t.backdrop), uo(n, t.position), wo(n, t.grow),
|
|
307
|
+
n && (co(n, t.backdrop), uo(n, t.position), wo(n, t.grow), E(n, t, "container"));
|
|
308
308
|
};
|
|
309
309
|
function co(e, t) {
|
|
310
310
|
typeof t == "string" ? e.style.background = t : t || d([document.documentElement, document.body], i["no-backdrop"]);
|
|
@@ -339,7 +339,7 @@ const fo = ["input", "file", "range", "select", "radio", "checkbox", "textarea"]
|
|
|
339
339
|
if (!t)
|
|
340
340
|
return;
|
|
341
341
|
const n = m[e.input](t, e);
|
|
342
|
-
|
|
342
|
+
p(t), e.inputAutoFocus && setTimeout(() => {
|
|
343
343
|
bt(n);
|
|
344
344
|
});
|
|
345
345
|
}, go = (e) => {
|
|
@@ -361,10 +361,10 @@ const fo = ["input", "file", "range", "select", "radio", "checkbox", "textarea"]
|
|
|
361
361
|
if (!e.input)
|
|
362
362
|
return;
|
|
363
363
|
const t = kt(e.input);
|
|
364
|
-
t &&
|
|
364
|
+
t && E(t, e, "input");
|
|
365
365
|
}, Ve = (e, t) => {
|
|
366
366
|
!e.placeholder && t.inputPlaceholder && (e.placeholder = t.inputPlaceholder);
|
|
367
|
-
},
|
|
367
|
+
}, oe = (e, t, n) => {
|
|
368
368
|
if (n.inputLabel) {
|
|
369
369
|
const o = document.createElement("label"), s = i["input-label"];
|
|
370
370
|
o.setAttribute("for", e.id), o.className = s, typeof n.customClass == "object" && d(o, n.customClass.inputLabel), o.innerText = n.inputLabel, t.insertAdjacentElement("beforebegin", o);
|
|
@@ -376,32 +376,32 @@ const fo = ["input", "file", "range", "select", "radio", "checkbox", "textarea"]
|
|
|
376
376
|
/** @type {SwalClass} */
|
|
377
377
|
e
|
|
378
378
|
] || i.input);
|
|
379
|
-
},
|
|
379
|
+
}, ue = (e, t) => {
|
|
380
380
|
["string", "number"].includes(typeof t) ? e.value = `${t}` : Ie(t) || v(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`);
|
|
381
381
|
}, m = {};
|
|
382
382
|
m.text = m.email = m.password = m.number = m.tel = m.url = m.search = m.date = m["datetime-local"] = m.time = m.week = m.month = /** @type {(input: Input | HTMLElement, params: SweetAlertOptions) => Input} */
|
|
383
|
-
(e, t) => (
|
|
384
|
-
m.file = (e, t) => (
|
|
383
|
+
(e, t) => (ue(e, t.inputValue), oe(e, e, t), Ve(e, t), e.type = t.input, e);
|
|
384
|
+
m.file = (e, t) => (oe(e, e, t), Ve(e, t), e);
|
|
385
385
|
m.range = (e, t) => {
|
|
386
386
|
const n = e.querySelector("input"), o = e.querySelector("output");
|
|
387
|
-
return
|
|
387
|
+
return ue(n, t.inputValue), n.type = t.input, ue(o, t.inputValue), oe(n, e, t), e;
|
|
388
388
|
};
|
|
389
389
|
m.select = (e, t) => {
|
|
390
390
|
if (e.textContent = "", t.inputPlaceholder) {
|
|
391
391
|
const n = document.createElement("option");
|
|
392
|
-
|
|
392
|
+
B(n, t.inputPlaceholder), n.value = "", n.disabled = !0, n.selected = !0, e.appendChild(n);
|
|
393
393
|
}
|
|
394
|
-
return
|
|
394
|
+
return oe(e, e, t), e;
|
|
395
395
|
};
|
|
396
396
|
m.radio = (e) => (e.textContent = "", e);
|
|
397
397
|
m.checkbox = (e, t) => {
|
|
398
398
|
const n = Ce(u(), "checkbox");
|
|
399
399
|
n.value = "1", n.checked = !!t.inputValue;
|
|
400
400
|
const o = e.querySelector("span");
|
|
401
|
-
return
|
|
401
|
+
return B(o, t.inputPlaceholder || t.inputLabel), n;
|
|
402
402
|
};
|
|
403
403
|
m.textarea = (e, t) => {
|
|
404
|
-
|
|
404
|
+
ue(e, t.inputValue), Ve(e, t), oe(e, e, t);
|
|
405
405
|
const n = (o) => parseInt(window.getComputedStyle(o).marginLeft) + parseInt(window.getComputedStyle(o).marginRight);
|
|
406
406
|
return setTimeout(() => {
|
|
407
407
|
if ("MutationObserver" in window) {
|
|
@@ -420,10 +420,10 @@ m.textarea = (e, t) => {
|
|
|
420
420
|
};
|
|
421
421
|
const yo = (e, t) => {
|
|
422
422
|
const n = Me();
|
|
423
|
-
n && (ze(n),
|
|
423
|
+
n && (ze(n), E(n, t, "htmlContainer"), t.html ? (qe(t.html, n), p(n, "block")) : t.text ? (n.textContent = t.text, p(n, "block")) : y(n), mo(e, t));
|
|
424
424
|
}, vo = (e, t) => {
|
|
425
425
|
const n = pt();
|
|
426
|
-
n && (ze(n),
|
|
426
|
+
n && (ze(n), ne(n, t.footer, "block"), t.footer && qe(t.footer, n), E(n, t, "footer"));
|
|
427
427
|
}, ko = (e, t) => {
|
|
428
428
|
const n = f.innerParams.get(e), o = _();
|
|
429
429
|
if (!o)
|
|
@@ -436,15 +436,15 @@ const yo = (e, t) => {
|
|
|
436
436
|
y(o);
|
|
437
437
|
return;
|
|
438
438
|
}
|
|
439
|
-
if (t.icon && Object.keys(
|
|
439
|
+
if (t.icon && Object.keys(de).indexOf(t.icon) === -1) {
|
|
440
440
|
q(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`), y(o);
|
|
441
441
|
return;
|
|
442
442
|
}
|
|
443
|
-
|
|
443
|
+
p(o), ot(o, t), nt(o, t), d(o, t.showClass && t.showClass.icon), window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", xt);
|
|
444
444
|
}, nt = (e, t) => {
|
|
445
|
-
for (const [n, o] of Object.entries(
|
|
446
|
-
t.icon !== n &&
|
|
447
|
-
d(e, t.icon &&
|
|
445
|
+
for (const [n, o] of Object.entries(de))
|
|
446
|
+
t.icon !== n && T(e, o);
|
|
447
|
+
d(e, t.icon && de[t.icon]), Eo(e, t), xt(), E(e, t, "icon");
|
|
448
448
|
}, xt = () => {
|
|
449
449
|
const e = u();
|
|
450
450
|
if (!e)
|
|
@@ -470,30 +470,30 @@ const yo = (e, t) => {
|
|
|
470
470
|
question: "?",
|
|
471
471
|
warning: "!",
|
|
472
472
|
info: "i"
|
|
473
|
-
}[t.icon])), n.trim() !== o.trim() &&
|
|
474
|
-
},
|
|
473
|
+
}[t.icon])), n.trim() !== o.trim() && B(e, o);
|
|
474
|
+
}, Eo = (e, t) => {
|
|
475
475
|
if (t.iconColor) {
|
|
476
476
|
e.style.color = t.iconColor, e.style.borderColor = t.iconColor;
|
|
477
477
|
for (const n of [".swal2-success-line-tip", ".swal2-success-line-long", ".swal2-x-mark-line-left", ".swal2-x-mark-line-right"])
|
|
478
478
|
et(e, n, "background-color", t.iconColor);
|
|
479
479
|
et(e, ".swal2-success-ring", "border-color", t.iconColor);
|
|
480
480
|
}
|
|
481
|
-
}, st = (e) => `<div class="${i["icon-content"]}">${e}</div>`,
|
|
481
|
+
}, st = (e) => `<div class="${i["icon-content"]}">${e}</div>`, Ao = (e, t) => {
|
|
482
482
|
const n = gt();
|
|
483
483
|
if (n) {
|
|
484
484
|
if (!t.imageUrl) {
|
|
485
485
|
y(n);
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
|
-
|
|
488
|
+
p(n, ""), n.setAttribute("src", t.imageUrl), n.setAttribute("alt", t.imageAlt || ""), z(n, "width", t.imageWidth), z(n, "height", t.imageHeight), n.className = i.image, E(n, t, "image");
|
|
489
489
|
}
|
|
490
490
|
};
|
|
491
|
-
let Ne = !1, Ct = 0,
|
|
491
|
+
let Ne = !1, Ct = 0, Et = 0, At = 0, Bt = 0;
|
|
492
492
|
const Bo = (e) => {
|
|
493
|
-
e.addEventListener("mousedown",
|
|
493
|
+
e.addEventListener("mousedown", we), document.body.addEventListener("mousemove", fe), e.addEventListener("mouseup", me), e.addEventListener("touchstart", we), document.body.addEventListener("touchmove", fe), e.addEventListener("touchend", me);
|
|
494
494
|
}, Po = (e) => {
|
|
495
|
-
e.removeEventListener("mousedown",
|
|
496
|
-
},
|
|
495
|
+
e.removeEventListener("mousedown", we), document.body.removeEventListener("mousemove", fe), e.removeEventListener("mouseup", me), e.removeEventListener("touchstart", we), document.body.removeEventListener("touchmove", fe), e.removeEventListener("touchend", me);
|
|
496
|
+
}, we = (e) => {
|
|
497
497
|
const t = u();
|
|
498
498
|
if (e.target === t || _().contains(
|
|
499
499
|
/** @type {HTMLElement} */
|
|
@@ -501,20 +501,20 @@ const Bo = (e) => {
|
|
|
501
501
|
)) {
|
|
502
502
|
Ne = !0;
|
|
503
503
|
const n = Pt(e);
|
|
504
|
-
Ct = n.clientX,
|
|
504
|
+
Ct = n.clientX, Et = n.clientY, At = parseInt(t.style.insetInlineStart) || 0, Bt = parseInt(t.style.insetBlockStart) || 0, d(t, "swal2-dragging");
|
|
505
505
|
}
|
|
506
|
-
},
|
|
506
|
+
}, fe = (e) => {
|
|
507
507
|
const t = u();
|
|
508
508
|
if (Ne) {
|
|
509
509
|
let {
|
|
510
510
|
clientX: n,
|
|
511
511
|
clientY: o
|
|
512
512
|
} = Pt(e);
|
|
513
|
-
t.style.insetInlineStart = `${
|
|
513
|
+
t.style.insetInlineStart = `${At + (n - Ct)}px`, t.style.insetBlockStart = `${Bt + (o - Et)}px`;
|
|
514
514
|
}
|
|
515
|
-
},
|
|
515
|
+
}, me = () => {
|
|
516
516
|
const e = u();
|
|
517
|
-
Ne = !1,
|
|
517
|
+
Ne = !1, T(e, "swal2-dragging");
|
|
518
518
|
}, Pt = (e) => {
|
|
519
519
|
let t = 0, n = 0;
|
|
520
520
|
return e.type.startsWith("mouse") ? (t = /** @type {MouseEvent} */
|
|
@@ -534,11 +534,11 @@ const Bo = (e) => {
|
|
|
534
534
|
s && o.insertBefore(s, _());
|
|
535
535
|
} else
|
|
536
536
|
z(o, "width", t.width);
|
|
537
|
-
z(o, "padding", t.padding), t.color && (o.style.color = t.color), t.background && (o.style.background = t.background), y(ve()), Lo(o, t), t.draggable && !t.toast ? (d(o, i.draggable), Bo(o)) : (
|
|
537
|
+
z(o, "padding", t.padding), t.color && (o.style.color = t.color), t.background && (o.style.background = t.background), y(ve()), Lo(o, t), t.draggable && !t.toast ? (d(o, i.draggable), Bo(o)) : (T(o, i.draggable), Po(o));
|
|
538
538
|
}
|
|
539
539
|
}, Lo = (e, t) => {
|
|
540
540
|
const n = t.showClass || {};
|
|
541
|
-
e.className = `${i.popup} ${x(e) ? n.popup : ""}`, t.toast ? (d([document.documentElement, document.body], i["toast-shown"]), d(e, i.toast)) : d(e, i.modal),
|
|
541
|
+
e.className = `${i.popup} ${x(e) ? n.popup : ""}`, t.toast ? (d([document.documentElement, document.body], i["toast-shown"]), d(e, i.toast)) : d(e, i.modal), E(e, t, "popup"), typeof t.customClass == "string" && d(e, t.customClass), t.icon && d(e, i[`icon-${t.icon}`]);
|
|
542
542
|
}, $o = (e, t) => {
|
|
543
543
|
const n = Oe();
|
|
544
544
|
if (!n)
|
|
@@ -551,7 +551,7 @@ const Bo = (e) => {
|
|
|
551
551
|
y(n);
|
|
552
552
|
return;
|
|
553
553
|
}
|
|
554
|
-
|
|
554
|
+
p(n), n.textContent = "", s >= o.length && v("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"), o.forEach((r, l) => {
|
|
555
555
|
const c = So(r);
|
|
556
556
|
if (n.appendChild(c), l === s && d(c, i["active-progress-step"]), l !== o.length - 1) {
|
|
557
557
|
const w = Io(t);
|
|
@@ -560,20 +560,20 @@ const Bo = (e) => {
|
|
|
560
560
|
});
|
|
561
561
|
}, So = (e) => {
|
|
562
562
|
const t = document.createElement("li");
|
|
563
|
-
return d(t, i["progress-step"]),
|
|
563
|
+
return d(t, i["progress-step"]), B(t, e), t;
|
|
564
564
|
}, Io = (e) => {
|
|
565
565
|
const t = document.createElement("li");
|
|
566
566
|
return d(t, i["progress-step-line"]), e.progressStepsDistance && z(t, "width", e.progressStepsDistance), t;
|
|
567
567
|
}, Mo = (e, t) => {
|
|
568
568
|
const n = ht();
|
|
569
|
-
n && (ze(n),
|
|
569
|
+
n && (ze(n), ne(n, t.title || t.titleText, "block"), t.title && qe(t.title, n), t.titleText && (n.innerText = t.titleText), E(n, t, "title"));
|
|
570
570
|
}, Tt = (e, t) => {
|
|
571
|
-
To(e, t), lo(e, t), $o(e, t), ko(e, t),
|
|
571
|
+
To(e, t), lo(e, t), $o(e, t), ko(e, t), Ao(e, t), Mo(e, t), ao(e, t), yo(e, t), so(e, t), vo(e, t);
|
|
572
572
|
const n = u();
|
|
573
573
|
typeof t.didRender == "function" && n && t.didRender(n), a.eventEmitter.emit("didRender", n);
|
|
574
574
|
}, Oo = () => x(u()), Lt = () => {
|
|
575
575
|
var e;
|
|
576
|
-
return (e =
|
|
576
|
+
return (e = S()) === null || e === void 0 ? void 0 : e.click();
|
|
577
577
|
}, Do = () => {
|
|
578
578
|
var e;
|
|
579
579
|
return (e = V()) === null || e === void 0 ? void 0 : e.click();
|
|
@@ -623,7 +623,7 @@ const Bo = (e) => {
|
|
|
623
623
|
}
|
|
624
624
|
e.shiftKey ? Te(o, -1) : Te(o, 1), e.stopPropagation(), e.preventDefault();
|
|
625
625
|
}, No = (e) => {
|
|
626
|
-
const t =
|
|
626
|
+
const t = te(), n = S(), o = V(), s = Y();
|
|
627
627
|
if (!t || !n || !o || !s)
|
|
628
628
|
return;
|
|
629
629
|
const r = [n, o, s];
|
|
@@ -657,7 +657,7 @@ const Wo = () => {
|
|
|
657
657
|
t.hasAttribute("data-previous-aria-hidden") ? (t.setAttribute("aria-hidden", t.getAttribute("data-previous-aria-hidden") || ""), t.removeAttribute("data-previous-aria-hidden")) : t.removeAttribute("aria-hidden");
|
|
658
658
|
});
|
|
659
659
|
}, Mt = typeof window < "u" && !!window.GestureEvent, Uo = () => {
|
|
660
|
-
if (Mt && !
|
|
660
|
+
if (Mt && !I(document.body, i.iosfix)) {
|
|
661
661
|
const e = document.body.scrollTop;
|
|
662
662
|
document.body.style.top = `${e * -1}px`, d(document.body, i.iosfix), _o();
|
|
663
663
|
}
|
|
@@ -678,9 +678,9 @@ const Wo = () => {
|
|
|
678
678
|
!(tt(o) && // #1944
|
|
679
679
|
o.contains(t));
|
|
680
680
|
}, Xo = (e) => e.touches && e.touches.length && e.touches[0].touchType === "stylus", Ko = (e) => e.touches && e.touches.length > 1, Zo = () => {
|
|
681
|
-
if (
|
|
681
|
+
if (I(document.body, i.iosfix)) {
|
|
682
682
|
const e = parseInt(document.body.style.top, 10);
|
|
683
|
-
|
|
683
|
+
T(document.body, i.iosfix), document.body.style.top = "", document.body.scrollTop = e * -1;
|
|
684
684
|
}
|
|
685
685
|
}, Jo = () => {
|
|
686
686
|
const e = document.createElement("div");
|
|
@@ -698,29 +698,29 @@ function Ot(e, t, n, o) {
|
|
|
698
698
|
xe() ? it(e, o) : (jn(n).then(() => it(e, o)), $t(a)), Mt ? (t.setAttribute("style", "display:none !important"), t.removeAttribute("class"), t.innerHTML = "") : t.remove(), je() && (Qo(), Zo(), It()), es();
|
|
699
699
|
}
|
|
700
700
|
function es() {
|
|
701
|
-
|
|
701
|
+
T([document.documentElement, document.body], [i.shown, i["height-auto"], i["no-backdrop"], i["toast-shown"]]);
|
|
702
702
|
}
|
|
703
703
|
function D(e) {
|
|
704
704
|
e = ns(e);
|
|
705
705
|
const t = W.swalPromiseResolve.get(this), n = ts(this);
|
|
706
|
-
this.isAwaitingPromise ? e.isDismissed || (
|
|
706
|
+
this.isAwaitingPromise ? e.isDismissed || (se(this), t(e)) : n && t(e);
|
|
707
707
|
}
|
|
708
708
|
const ts = (e) => {
|
|
709
709
|
const t = u();
|
|
710
710
|
if (!t)
|
|
711
711
|
return !1;
|
|
712
712
|
const n = f.innerParams.get(e);
|
|
713
|
-
if (!n ||
|
|
713
|
+
if (!n || I(t, n.hideClass.popup))
|
|
714
714
|
return !1;
|
|
715
|
-
|
|
715
|
+
T(t, n.showClass.popup), d(t, n.hideClass.popup);
|
|
716
716
|
const o = k();
|
|
717
|
-
return
|
|
717
|
+
return T(o, n.showClass.backdrop), d(o, n.hideClass.backdrop), os(e, t, n), !0;
|
|
718
718
|
};
|
|
719
719
|
function Dt(e) {
|
|
720
720
|
const t = W.swalPromiseReject.get(this);
|
|
721
|
-
|
|
721
|
+
se(this), t && t(e);
|
|
722
722
|
}
|
|
723
|
-
const
|
|
723
|
+
const se = (e) => {
|
|
724
724
|
e.isAwaitingPromise && (delete e.isAwaitingPromise, f.innerParams.get(e) || e._destroy());
|
|
725
725
|
}, ns = (e) => typeof e > "u" ? {
|
|
726
726
|
isConfirmed: !1,
|
|
@@ -750,15 +750,15 @@ const oe = (e) => {
|
|
|
750
750
|
});
|
|
751
751
|
}, U = (e) => {
|
|
752
752
|
let t = u();
|
|
753
|
-
if (t || new
|
|
753
|
+
if (t || new G(), t = u(), !t)
|
|
754
754
|
return;
|
|
755
755
|
const n = X();
|
|
756
|
-
xe() ? y(_()) : is(t, e),
|
|
756
|
+
xe() ? y(_()) : is(t, e), p(n), t.setAttribute("data-loading", "true"), t.setAttribute("aria-busy", "true"), t.focus();
|
|
757
757
|
}, is = (e, t) => {
|
|
758
|
-
const n =
|
|
759
|
-
!n || !o || (!t && x(
|
|
758
|
+
const n = te(), o = X();
|
|
759
|
+
!n || !o || (!t && x(S()) && (t = S()), p(n), t && (y(t), o.setAttribute("data-button-to-replace", t.className), n.insertBefore(o, t)), d([e, n], i.loading));
|
|
760
760
|
}, rs = (e, t) => {
|
|
761
|
-
t.input === "select" || t.input === "radio" ? us(e, t) : ["text", "email", "number", "tel", "textarea"].some((n) => n === t.input) && (Se(t.inputValue) || Ie(t.inputValue)) && (U(
|
|
761
|
+
t.input === "select" || t.input === "radio" ? us(e, t) : ["text", "email", "number", "tel", "textarea"].some((n) => n === t.input) && (Se(t.inputValue) || Ie(t.inputValue)) && (U(S()), ws(e, t));
|
|
762
762
|
}, as = (e, t) => {
|
|
763
763
|
const n = e.getInput();
|
|
764
764
|
if (!n)
|
|
@@ -778,17 +778,17 @@ const oe = (e) => {
|
|
|
778
778
|
if (!n)
|
|
779
779
|
return;
|
|
780
780
|
const o = (s) => {
|
|
781
|
-
t.input === "select" ? fs(n,
|
|
781
|
+
t.input === "select" ? fs(n, he(s), t) : t.input === "radio" && ms(n, he(s), t);
|
|
782
782
|
};
|
|
783
|
-
Se(t.inputOptions) || Ie(t.inputOptions) ? (U(
|
|
783
|
+
Se(t.inputOptions) || Ie(t.inputOptions) ? (U(S()), Q(t.inputOptions).then((s) => {
|
|
784
784
|
e.hideLoading(), o(s);
|
|
785
785
|
})) : typeof t.inputOptions == "object" ? o(t.inputOptions) : q(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof t.inputOptions}`);
|
|
786
786
|
}, ws = (e, t) => {
|
|
787
787
|
const n = e.getInput();
|
|
788
|
-
n && (y(n),
|
|
789
|
-
n.value = t.input === "number" ? `${parseFloat(o) || 0}` : `${o}`,
|
|
788
|
+
n && (y(n), Q(t.inputValue).then((o) => {
|
|
789
|
+
n.value = t.input === "number" ? `${parseFloat(o) || 0}` : `${o}`, p(n), n.focus(), e.hideLoading();
|
|
790
790
|
}).catch((o) => {
|
|
791
|
-
q(`Error in inputValue promise: ${o}`), n.value = "",
|
|
791
|
+
q(`Error in inputValue promise: ${o}`), n.value = "", p(n), n.focus(), e.hideLoading();
|
|
792
792
|
}));
|
|
793
793
|
};
|
|
794
794
|
function fs(e, t, n) {
|
|
@@ -797,13 +797,13 @@ function fs(e, t, n) {
|
|
|
797
797
|
return;
|
|
798
798
|
const s = (r, l, c) => {
|
|
799
799
|
const w = document.createElement("option");
|
|
800
|
-
w.value = c,
|
|
800
|
+
w.value = c, B(w, l), w.selected = Ht(c, n.inputValue), r.appendChild(w);
|
|
801
801
|
};
|
|
802
802
|
t.forEach((r) => {
|
|
803
803
|
const l = r[0], c = r[1];
|
|
804
804
|
if (Array.isArray(c)) {
|
|
805
805
|
const w = document.createElement("optgroup");
|
|
806
|
-
w.label = l, w.disabled = !1, o.appendChild(w), c.forEach((
|
|
806
|
+
w.label = l, w.disabled = !1, o.appendChild(w), c.forEach((C) => s(w, C[1], C[0]));
|
|
807
807
|
} else
|
|
808
808
|
s(o, c, l);
|
|
809
809
|
}), o.focus();
|
|
@@ -813,22 +813,22 @@ function ms(e, t, n) {
|
|
|
813
813
|
if (!o)
|
|
814
814
|
return;
|
|
815
815
|
t.forEach((r) => {
|
|
816
|
-
const l = r[0], c = r[1], w = document.createElement("input"),
|
|
816
|
+
const l = r[0], c = r[1], w = document.createElement("input"), C = document.createElement("label");
|
|
817
817
|
w.type = "radio", w.name = i.radio, w.value = l, Ht(l, n.inputValue) && (w.checked = !0);
|
|
818
818
|
const Z = document.createElement("span");
|
|
819
|
-
|
|
819
|
+
B(Z, c), Z.className = i.label, C.appendChild(w), C.appendChild(Z), o.appendChild(C);
|
|
820
820
|
});
|
|
821
821
|
const s = o.querySelectorAll("input");
|
|
822
822
|
s.length && s[0].focus();
|
|
823
823
|
}
|
|
824
|
-
const
|
|
824
|
+
const he = (e) => {
|
|
825
825
|
const t = [];
|
|
826
826
|
return e instanceof Map ? e.forEach((n, o) => {
|
|
827
827
|
let s = n;
|
|
828
|
-
typeof s == "object" && (s =
|
|
828
|
+
typeof s == "object" && (s = he(s)), t.push([o, s]);
|
|
829
829
|
}) : Object.keys(e).forEach((n) => {
|
|
830
830
|
let o = e[n];
|
|
831
|
-
typeof o == "object" && (o =
|
|
831
|
+
typeof o == "object" && (o = he(o)), t.push([n, o]);
|
|
832
832
|
}), t;
|
|
833
833
|
}, Ht = (e, t) => !!t && t.toString() === e.toString(), hs = (e) => {
|
|
834
834
|
const t = f.innerParams.get(e);
|
|
@@ -848,13 +848,13 @@ const me = (e) => {
|
|
|
848
848
|
n.inputValidator ? bs(e, s, t) : o && !o.checkValidity() ? (e.enableButtons(), e.showValidationMessage(n.validationMessage || o.validationMessage)) : t === "deny" ? Re(e, s) : We(e, s);
|
|
849
849
|
}, bs = (e, t, n) => {
|
|
850
850
|
const o = f.innerParams.get(e);
|
|
851
|
-
e.disableInput(), Promise.resolve().then(() =>
|
|
851
|
+
e.disableInput(), Promise.resolve().then(() => Q(o.inputValidator(t, o.validationMessage))).then((r) => {
|
|
852
852
|
e.enableButtons(), e.enableInput(), r ? e.showValidationMessage(r) : n === "deny" ? Re(e, t) : We(e, t);
|
|
853
853
|
});
|
|
854
854
|
}, Re = (e, t) => {
|
|
855
855
|
const n = f.innerParams.get(e || void 0);
|
|
856
|
-
n.showLoaderOnDeny && U(V()), n.preDeny ? (e.isAwaitingPromise = !0, Promise.resolve().then(() =>
|
|
857
|
-
s === !1 ? (e.hideLoading(),
|
|
856
|
+
n.showLoaderOnDeny && U(V()), n.preDeny ? (e.isAwaitingPromise = !0, Promise.resolve().then(() => Q(n.preDeny(t, n.validationMessage))).then((s) => {
|
|
857
|
+
s === !1 ? (e.hideLoading(), se(e)) : e.close({
|
|
858
858
|
isDenied: !0,
|
|
859
859
|
value: typeof s > "u" ? t : s
|
|
860
860
|
});
|
|
@@ -871,20 +871,20 @@ const me = (e) => {
|
|
|
871
871
|
e.rejectPromise(t);
|
|
872
872
|
}, We = (e, t) => {
|
|
873
873
|
const n = f.innerParams.get(e || void 0);
|
|
874
|
-
n.showLoaderOnConfirm && U(), n.preConfirm ? (e.resetValidationMessage(), e.isAwaitingPromise = !0, Promise.resolve().then(() =>
|
|
875
|
-
x(ve()) || s === !1 ? (e.hideLoading(),
|
|
874
|
+
n.showLoaderOnConfirm && U(), n.preConfirm ? (e.resetValidationMessage(), e.isAwaitingPromise = !0, Promise.resolve().then(() => Q(n.preConfirm(t, n.validationMessage))).then((s) => {
|
|
875
|
+
x(ve()) || s === !1 ? (e.hideLoading(), se(e)) : rt(e, typeof s > "u" ? t : s);
|
|
876
876
|
}).catch((s) => zt(e || void 0, s))) : rt(e, t);
|
|
877
877
|
};
|
|
878
|
-
function
|
|
878
|
+
function ge() {
|
|
879
879
|
const e = f.innerParams.get(this);
|
|
880
880
|
if (!e)
|
|
881
881
|
return;
|
|
882
882
|
const t = f.domCache.get(this);
|
|
883
|
-
y(t.loader), xe() ? e.icon &&
|
|
883
|
+
y(t.loader), xe() ? e.icon && p(_()) : ys(t), T([t.popup, t.actions], i.loading), t.popup.removeAttribute("aria-busy"), t.popup.removeAttribute("data-loading"), t.confirmButton.disabled = !1, t.denyButton.disabled = !1, t.cancelButton.disabled = !1;
|
|
884
884
|
}
|
|
885
885
|
const ys = (e) => {
|
|
886
886
|
const t = e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));
|
|
887
|
-
t.length ?
|
|
887
|
+
t.length ? p(t[0], "inline-block") : _n() && y(e.actions);
|
|
888
888
|
};
|
|
889
889
|
function Ft() {
|
|
890
890
|
const e = f.innerParams.get(this), t = f.domCache.get(this);
|
|
@@ -920,7 +920,7 @@ function Ut() {
|
|
|
920
920
|
}
|
|
921
921
|
function _t(e) {
|
|
922
922
|
const t = f.domCache.get(this), n = f.innerParams.get(this);
|
|
923
|
-
|
|
923
|
+
B(t.validationMessage, e), t.validationMessage.className = i["validation-message"], n.customClass && n.customClass.validationMessage && d(t.validationMessage, n.customClass.validationMessage), p(t.validationMessage);
|
|
924
924
|
const o = this.getInput();
|
|
925
925
|
o && (o.setAttribute("aria-invalid", "true"), o.setAttribute("aria-describedby", i["validation-message"]), bt(o), d(o, i.inputerror));
|
|
926
926
|
}
|
|
@@ -928,7 +928,7 @@ function Yt() {
|
|
|
928
928
|
const e = f.domCache.get(this);
|
|
929
929
|
e.validationMessage && y(e.validationMessage);
|
|
930
930
|
const t = this.getInput();
|
|
931
|
-
t && (t.removeAttribute("aria-invalid"), t.removeAttribute("aria-describedby"),
|
|
931
|
+
t && (t.removeAttribute("aria-invalid"), t.removeAttribute("aria-describedby"), T(t, i.inputerror));
|
|
932
932
|
}
|
|
933
933
|
const R = {
|
|
934
934
|
title: "",
|
|
@@ -1026,19 +1026,19 @@ const R = {
|
|
|
1026
1026
|
allowEnterKey: void 0
|
|
1027
1027
|
}, xs = ["allowOutsideClick", "allowEnterKey", "backdrop", "draggable", "focusConfirm", "focusDeny", "focusCancel", "returnFocus", "heightAuto", "keydownListenerCapture"], Xt = (e) => Object.prototype.hasOwnProperty.call(R, e), Kt = (e) => vs.indexOf(e) !== -1, Zt = (e) => ks[e], Cs = (e) => {
|
|
1028
1028
|
Xt(e) || v(`Unknown parameter "${e}"`);
|
|
1029
|
-
}, As = (e) => {
|
|
1030
|
-
xs.includes(e) && v(`The parameter "${e}" is incompatible with toasts`);
|
|
1031
1029
|
}, Es = (e) => {
|
|
1030
|
+
xs.includes(e) && v(`The parameter "${e}" is incompatible with toasts`);
|
|
1031
|
+
}, As = (e) => {
|
|
1032
1032
|
const t = Zt(e);
|
|
1033
1033
|
t && mt(e, t);
|
|
1034
1034
|
}, Jt = (e) => {
|
|
1035
1035
|
e.backdrop === !1 && e.allowOutsideClick && v('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'), e.theme && !["light", "dark", "auto"].includes(e.theme) && v(`Invalid theme "${e.theme}". Expected "light", "dark", or "auto"`);
|
|
1036
1036
|
for (const t in e)
|
|
1037
|
-
Cs(t), e.toast &&
|
|
1037
|
+
Cs(t), e.toast && Es(t), As(t);
|
|
1038
1038
|
};
|
|
1039
1039
|
function Gt(e) {
|
|
1040
1040
|
const t = k(), n = u(), o = f.innerParams.get(this);
|
|
1041
|
-
if (!n ||
|
|
1041
|
+
if (!n || I(n, o.hideClass.popup)) {
|
|
1042
1042
|
v("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");
|
|
1043
1043
|
return;
|
|
1044
1044
|
}
|
|
@@ -1082,12 +1082,12 @@ var Ts = /* @__PURE__ */ Object.freeze({
|
|
|
1082
1082
|
closeToast: D,
|
|
1083
1083
|
disableButtons: Rt,
|
|
1084
1084
|
disableInput: Ut,
|
|
1085
|
-
disableLoading:
|
|
1085
|
+
disableLoading: ge,
|
|
1086
1086
|
enableButtons: Nt,
|
|
1087
1087
|
enableInput: Wt,
|
|
1088
1088
|
getInput: Ft,
|
|
1089
|
-
handleAwaitingPromise:
|
|
1090
|
-
hideLoading:
|
|
1089
|
+
handleAwaitingPromise: se,
|
|
1090
|
+
hideLoading: ge,
|
|
1091
1091
|
rejectPromise: Dt,
|
|
1092
1092
|
resetValidationMessage: Yt,
|
|
1093
1093
|
showValidationMessage: _t,
|
|
@@ -1100,25 +1100,25 @@ const Ls = (e, t, n) => {
|
|
|
1100
1100
|
e && (Ss(e) || e.timer || e.input) || n(K.close);
|
|
1101
1101
|
};
|
|
1102
1102
|
}, Ss = (e) => !!(e.showConfirmButton || e.showDenyButton || e.showCancelButton || e.showCloseButton);
|
|
1103
|
-
let
|
|
1103
|
+
let pe = !1;
|
|
1104
1104
|
const Is = (e) => {
|
|
1105
1105
|
e.popup.onmousedown = () => {
|
|
1106
1106
|
e.container.onmouseup = function(t) {
|
|
1107
1107
|
e.container.onmouseup = () => {
|
|
1108
|
-
}, t.target === e.container && (
|
|
1108
|
+
}, t.target === e.container && (pe = !0);
|
|
1109
1109
|
};
|
|
1110
1110
|
};
|
|
1111
1111
|
}, Ms = (e) => {
|
|
1112
1112
|
e.container.onmousedown = (t) => {
|
|
1113
1113
|
t.target === e.container && t.preventDefault(), e.popup.onmouseup = function(n) {
|
|
1114
1114
|
e.popup.onmouseup = () => {
|
|
1115
|
-
}, (n.target === e.popup || n.target instanceof HTMLElement && e.popup.contains(n.target)) && (
|
|
1115
|
+
}, (n.target === e.popup || n.target instanceof HTMLElement && e.popup.contains(n.target)) && (pe = !0);
|
|
1116
1116
|
};
|
|
1117
1117
|
};
|
|
1118
1118
|
}, Os = (e, t, n) => {
|
|
1119
1119
|
t.container.onclick = (o) => {
|
|
1120
|
-
if (
|
|
1121
|
-
|
|
1120
|
+
if (pe) {
|
|
1121
|
+
pe = !1;
|
|
1122
1122
|
return;
|
|
1123
1123
|
}
|
|
1124
1124
|
o.target === t.container && ye(e.allowOutsideClick) && n(K.backdrop);
|
|
@@ -1270,10 +1270,10 @@ var Ks = /* @__PURE__ */ Object.freeze({
|
|
|
1270
1270
|
clickDeny: Do,
|
|
1271
1271
|
enableLoading: U,
|
|
1272
1272
|
fire: js,
|
|
1273
|
-
getActions:
|
|
1273
|
+
getActions: te,
|
|
1274
1274
|
getCancelButton: Y,
|
|
1275
1275
|
getCloseButton: De,
|
|
1276
|
-
getConfirmButton:
|
|
1276
|
+
getConfirmButton: S,
|
|
1277
1277
|
getContainer: k,
|
|
1278
1278
|
getDenyButton: V,
|
|
1279
1279
|
getFocusableElements: He,
|
|
@@ -1423,23 +1423,23 @@ const on = ["swal-title", "swal-html", "swal-footer"], Js = (e) => {
|
|
|
1423
1423
|
const s = window.getComputedStyle(document.body).overflowY;
|
|
1424
1424
|
ci(t, n, e), setTimeout(() => {
|
|
1425
1425
|
ai(t, n);
|
|
1426
|
-
}, sn), je() && (li(t, e.scrollbarPadding, s), Wo()), !xe() && !a.previousActiveElement && (a.previousActiveElement = document.activeElement), typeof e.didOpen == "function" && setTimeout(() => e.didOpen(n)), a.eventEmitter.emit("didOpen", n),
|
|
1427
|
-
},
|
|
1426
|
+
}, sn), je() && (li(t, e.scrollbarPadding, s), Wo()), !xe() && !a.previousActiveElement && (a.previousActiveElement = document.activeElement), typeof e.didOpen == "function" && setTimeout(() => e.didOpen(n)), a.eventEmitter.emit("didOpen", n), T(t, i["no-transition"]);
|
|
1427
|
+
}, be = (e) => {
|
|
1428
1428
|
const t = u();
|
|
1429
1429
|
if (e.target !== t)
|
|
1430
1430
|
return;
|
|
1431
1431
|
const n = k();
|
|
1432
|
-
t.removeEventListener("animationend",
|
|
1432
|
+
t.removeEventListener("animationend", be), t.removeEventListener("transitionend", be), n.style.overflowY = "auto";
|
|
1433
1433
|
}, ai = (e, t) => {
|
|
1434
|
-
vt(t) ? (e.style.overflowY = "hidden", t.addEventListener("animationend",
|
|
1434
|
+
vt(t) ? (e.style.overflowY = "hidden", t.addEventListener("animationend", be), t.addEventListener("transitionend", be)) : e.style.overflowY = "auto";
|
|
1435
1435
|
}, li = (e, t, n) => {
|
|
1436
1436
|
Uo(), t && n !== "hidden" && Go(n), setTimeout(() => {
|
|
1437
1437
|
e.scrollTop = 0;
|
|
1438
1438
|
});
|
|
1439
1439
|
}, ci = (e, t, n) => {
|
|
1440
|
-
d(e, n.showClass.backdrop), n.animation ? (t.style.setProperty("opacity", "0", "important"),
|
|
1440
|
+
d(e, n.showClass.backdrop), n.animation ? (t.style.setProperty("opacity", "0", "important"), p(t, "grid"), setTimeout(() => {
|
|
1441
1441
|
d(t, n.showClass.popup), t.style.removeProperty("opacity");
|
|
1442
|
-
}, sn)) :
|
|
1442
|
+
}, sn)) : p(t, "grid"), d([document.documentElement, document.body], i.shown), n.heightAuto && n.backdrop && !n.toast && d([document.documentElement, document.body], i["height-auto"]);
|
|
1443
1443
|
};
|
|
1444
1444
|
var ct = {
|
|
1445
1445
|
/**
|
|
@@ -1467,21 +1467,21 @@ showLoaderOnConfirm should be used together with preConfirm, see usage example:
|
|
|
1467
1467
|
https://sweetalert2.github.io/#ajax-request`), ui(e), typeof e.title == "string" && (e.title = e.title.split(`
|
|
1468
1468
|
`).join("<br />")), to(e);
|
|
1469
1469
|
}
|
|
1470
|
-
let
|
|
1471
|
-
var
|
|
1470
|
+
let $;
|
|
1471
|
+
var ce = /* @__PURE__ */ new WeakMap();
|
|
1472
1472
|
class h {
|
|
1473
1473
|
/**
|
|
1474
1474
|
* @param {...any} args
|
|
1475
1475
|
* @this {SweetAlert}
|
|
1476
1476
|
*/
|
|
1477
1477
|
constructor() {
|
|
1478
|
-
if (Mn(this,
|
|
1478
|
+
if (Mn(this, ce, void 0), typeof window > "u")
|
|
1479
1479
|
return;
|
|
1480
|
-
|
|
1480
|
+
$ = this;
|
|
1481
1481
|
for (var t = arguments.length, n = new Array(t), o = 0; o < t; o++)
|
|
1482
1482
|
n[o] = arguments[o];
|
|
1483
1483
|
const s = Object.freeze(this.constructor.argsToParams(n));
|
|
1484
|
-
this.params = s, this.isAwaitingPromise = !1, On(
|
|
1484
|
+
this.params = s, this.isAwaitingPromise = !1, On(ce, this, this._main($.params));
|
|
1485
1485
|
}
|
|
1486
1486
|
_main(t) {
|
|
1487
1487
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -1493,18 +1493,18 @@ class h {
|
|
|
1493
1493
|
isDismissed: !0
|
|
1494
1494
|
}), je() && It();
|
|
1495
1495
|
}
|
|
1496
|
-
a.currentInstance =
|
|
1496
|
+
a.currentInstance = $;
|
|
1497
1497
|
const o = mi(t, n);
|
|
1498
1498
|
wi(o), Object.freeze(o), a.timeout && (a.timeout.stop(), delete a.timeout), clearTimeout(a.restoreFocusTimeout);
|
|
1499
|
-
const s = hi(
|
|
1500
|
-
return Tt(
|
|
1499
|
+
const s = hi($);
|
|
1500
|
+
return Tt($, o), f.innerParams.set($, o), fi($, s, o);
|
|
1501
1501
|
}
|
|
1502
1502
|
// `catch` cannot be the name of a module export, so we define our thenable methods here instead
|
|
1503
1503
|
then(t) {
|
|
1504
|
-
return Ge(
|
|
1504
|
+
return Ge(ce, this).then(t);
|
|
1505
1505
|
}
|
|
1506
1506
|
finally(t) {
|
|
1507
|
-
return Ge(
|
|
1507
|
+
return Ge(ce, this).finally(t);
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
1510
|
const fi = (e, t, n) => new Promise((o, s) => {
|
|
@@ -1534,8 +1534,8 @@ const fi = (e, t, n) => new Promise((o, s) => {
|
|
|
1534
1534
|
const t = {
|
|
1535
1535
|
popup: u(),
|
|
1536
1536
|
container: k(),
|
|
1537
|
-
actions:
|
|
1538
|
-
confirmButton:
|
|
1537
|
+
actions: te(),
|
|
1538
|
+
confirmButton: S(),
|
|
1539
1539
|
denyButton: V(),
|
|
1540
1540
|
cancelButton: Y(),
|
|
1541
1541
|
loader: X(),
|
|
@@ -1548,7 +1548,7 @@ const fi = (e, t, n) => new Promise((o, s) => {
|
|
|
1548
1548
|
const o = ke();
|
|
1549
1549
|
y(o), t.timer && (e.timeout = new Zs(() => {
|
|
1550
1550
|
n("timer"), delete e.timeout;
|
|
1551
|
-
}, t.timer), t.timerProgressBar && (
|
|
1551
|
+
}, t.timer), t.timerProgressBar && (p(o), E(o, t, "timerProgressBar"), setTimeout(() => {
|
|
1552
1552
|
e.timeout && e.timeout.running && Fe(t.timer);
|
|
1553
1553
|
})));
|
|
1554
1554
|
}, pi = (e, t) => {
|
|
@@ -1584,8 +1584,8 @@ h.prototype.enableButtons = Nt;
|
|
|
1584
1584
|
h.prototype.getInput = Ft;
|
|
1585
1585
|
h.prototype.disableInput = Ut;
|
|
1586
1586
|
h.prototype.enableInput = Wt;
|
|
1587
|
-
h.prototype.hideLoading =
|
|
1588
|
-
h.prototype.disableLoading =
|
|
1587
|
+
h.prototype.hideLoading = ge;
|
|
1588
|
+
h.prototype.disableLoading = ge;
|
|
1589
1589
|
h.prototype.showValidationMessage = _t;
|
|
1590
1590
|
h.prototype.resetValidationMessage = Yt;
|
|
1591
1591
|
h.prototype.close = D;
|
|
@@ -1598,13 +1598,13 @@ h.prototype._destroy = Qt;
|
|
|
1598
1598
|
Object.assign(h, Ks);
|
|
1599
1599
|
Object.keys(Ts).forEach((e) => {
|
|
1600
1600
|
h[e] = function() {
|
|
1601
|
-
return
|
|
1601
|
+
return $ && $[e] ? $[e](...arguments) : null;
|
|
1602
1602
|
};
|
|
1603
1603
|
});
|
|
1604
1604
|
h.DismissReason = K;
|
|
1605
1605
|
h.version = "11.16.1";
|
|
1606
|
-
const
|
|
1607
|
-
|
|
1606
|
+
const G = h;
|
|
1607
|
+
G.default = G;
|
|
1608
1608
|
typeof document < "u" && function(e, t) {
|
|
1609
1609
|
var n = e.createElement("style");
|
|
1610
1610
|
if (e.getElementsByTagName("head")[0].appendChild(n), n.styleSheet) n.styleSheet.disabled || (n.styleSheet.cssText = t);
|
|
@@ -1624,10 +1624,10 @@ const ki = () => (/* @__PURE__ */ new Date()).getFullYear(), dt = (e) => e.norma
|
|
|
1624
1624
|
extraInput: l,
|
|
1625
1625
|
subtitle: c,
|
|
1626
1626
|
dateColumnKey: w,
|
|
1627
|
-
isShared:
|
|
1627
|
+
isShared: C = !1,
|
|
1628
1628
|
isLoading: Z,
|
|
1629
1629
|
closeModalOut: rn = !0,
|
|
1630
|
-
enableColumnSearch:
|
|
1630
|
+
enableColumnSearch: Ee = !1,
|
|
1631
1631
|
enableColumnSorter: an = !1,
|
|
1632
1632
|
disableClose: ln = !1,
|
|
1633
1633
|
enableRowSelection: cn = !1,
|
|
@@ -1635,27 +1635,42 @@ const ki = () => (/* @__PURE__ */ new Date()).getFullYear(), dt = (e) => e.norma
|
|
|
1635
1635
|
extendedSelection: un = !1,
|
|
1636
1636
|
cellSelectionColor: wn
|
|
1637
1637
|
}) => {
|
|
1638
|
-
const [
|
|
1639
|
-
|
|
1638
|
+
const [ie, fn] = H(""), [J, mn] = H({}), [re, Ue] = H(null), [hn, ae] = H(!1), [_e, Ye] = H(23), [gn, Xe] = H(t.length > 23), [pn, bn] = H(!1), yn = ki(), Ke = Sn();
|
|
1639
|
+
En(() => {
|
|
1640
1640
|
bn(t.length < 1), Ye(25), Xe(t.length > 25);
|
|
1641
|
-
}, [
|
|
1642
|
-
const vn = (
|
|
1643
|
-
mn((
|
|
1641
|
+
}, [ie, J, t.length]);
|
|
1642
|
+
const vn = (b, g) => {
|
|
1643
|
+
mn((L) => ({ ...L, [b]: g }));
|
|
1644
1644
|
}, kn = t.filter(
|
|
1645
|
-
(
|
|
1646
|
-
), Ze = Object.values(J).some((
|
|
1647
|
-
(
|
|
1645
|
+
(b) => e.every((g) => Ee && J[g.key] ? String(b[g.key]).toLowerCase().includes(J[g.key].toLowerCase()) : !0)
|
|
1646
|
+
), Ze = Object.values(J).some((b) => b.trim() !== ""), xn = t.slice().sort(
|
|
1647
|
+
(b, g) => w ? new Date(g[w]).getTime() - new Date(b[w]).getTime() : 0
|
|
1648
1648
|
).filter(
|
|
1649
|
-
(
|
|
1650
|
-
(
|
|
1649
|
+
(b) => !Ze && e.some(
|
|
1650
|
+
(g) => dt(String(b[g.key])).includes(dt(ie))
|
|
1651
1651
|
)
|
|
1652
|
-
),
|
|
1653
|
-
if (
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1652
|
+
), le = Ze ? kn : xn, Cn = (b, g) => {
|
|
1653
|
+
if (b.redirectTo) {
|
|
1654
|
+
if (g.estadoRegistro === "por_gestionar" && C && o)
|
|
1655
|
+
G.fire({
|
|
1656
|
+
title: "<small>¿Tomar este registro?</small>",
|
|
1657
|
+
text: "Tenga presente que, una vez lo haga, deberá darle trámite en los tiempos definidos en el procedimiento.",
|
|
1658
|
+
icon: "info",
|
|
1659
|
+
showCancelButton: !0,
|
|
1660
|
+
confirmButtonColor: "#178250",
|
|
1661
|
+
cancelButtonColor: "#cc5159",
|
|
1662
|
+
confirmButtonText: "Sí, tomar registro",
|
|
1663
|
+
cancelButtonText: "No, cancelar"
|
|
1664
|
+
}).then(async (L) => {
|
|
1665
|
+
L.isConfirmed && o(g);
|
|
1666
|
+
});
|
|
1667
|
+
else if (g.estadoRegistro === "en_gestion" || !C) {
|
|
1668
|
+
const L = b.redirectTo(g);
|
|
1669
|
+
typeof L == "string" ? Ke(L) : Ke(L.pathname, { state: L.state });
|
|
1670
|
+
return;
|
|
1671
|
+
}
|
|
1657
1672
|
}
|
|
1658
|
-
|
|
1673
|
+
b.hasModal ? g.estadoRegistro === "por_gestionar" && C && o ? G.fire({
|
|
1659
1674
|
title: "<small>¿Tomar este registro?</small>",
|
|
1660
1675
|
text: "Tenga presente que, una vez lo haga, deberá darle trámite en los tiempos definidos en el procedimiento.",
|
|
1661
1676
|
icon: "info",
|
|
@@ -1664,12 +1679,12 @@ const ki = () => (/* @__PURE__ */ new Date()).getFullYear(), dt = (e) => e.norma
|
|
|
1664
1679
|
cancelButtonColor: "#cc5159",
|
|
1665
1680
|
confirmButtonText: "Sí, tomar registro",
|
|
1666
1681
|
cancelButtonText: "No, cancelar"
|
|
1667
|
-
}).then(async (
|
|
1668
|
-
|
|
1669
|
-
}) : (
|
|
1682
|
+
}).then(async (L) => {
|
|
1683
|
+
L.isConfirmed && o(g);
|
|
1684
|
+
}) : (g.estadoRegistro === "en_gestion" || !C) && (Ue({ row: g, column: b }), ae(!0)) : b.hasModal && n && !C && (Ue({ row: g, column: b }), ae(!0));
|
|
1670
1685
|
};
|
|
1671
1686
|
return /* @__PURE__ */ M(Je, { children: [
|
|
1672
|
-
/* @__PURE__ */
|
|
1687
|
+
/* @__PURE__ */ P(
|
|
1673
1688
|
$n,
|
|
1674
1689
|
{
|
|
1675
1690
|
title: r,
|
|
@@ -1677,33 +1692,33 @@ const ki = () => (/* @__PURE__ */ new Date()).getFullYear(), dt = (e) => e.norma
|
|
|
1677
1692
|
data: t,
|
|
1678
1693
|
setSearchTerm: fn,
|
|
1679
1694
|
extraInput: l,
|
|
1680
|
-
enableColumnSearch:
|
|
1695
|
+
enableColumnSearch: Ee
|
|
1681
1696
|
}
|
|
1682
1697
|
),
|
|
1683
1698
|
Z ? /* @__PURE__ */ M("div", { className: "animation-container", children: [
|
|
1684
|
-
/* @__PURE__ */
|
|
1685
|
-
/* @__PURE__ */
|
|
1699
|
+
/* @__PURE__ */ P("div", { style: { width: 500, height: 125 }, children: /* @__PURE__ */ P(Ae, { animationData: An, loop: !0 }) }),
|
|
1700
|
+
/* @__PURE__ */ P("span", { className: "lottie", children: "Actualizando y cargando registros, por favor espere..." })
|
|
1686
1701
|
] }) : pn ? /* @__PURE__ */ M("div", { className: "animation-container", children: [
|
|
1687
|
-
/* @__PURE__ */
|
|
1688
|
-
/* @__PURE__ */
|
|
1689
|
-
] }) :
|
|
1690
|
-
/* @__PURE__ */
|
|
1691
|
-
/* @__PURE__ */
|
|
1702
|
+
/* @__PURE__ */ P("div", { style: { width: 150, height: 150 }, children: /* @__PURE__ */ P(Ae, { animationData: Bn, loop: !0 }) }),
|
|
1703
|
+
/* @__PURE__ */ P("span", { className: "lottie", children: "No existen registros pendientes por tramitar" })
|
|
1704
|
+
] }) : ie && le.length === 0 ? /* @__PURE__ */ M("div", { className: "animation-container", children: [
|
|
1705
|
+
/* @__PURE__ */ P("div", { style: { width: 150, height: 150 }, children: /* @__PURE__ */ P(Ae, { animationData: Pn, loop: !0 }) }),
|
|
1706
|
+
/* @__PURE__ */ P("span", { className: "lottie", children: "No se encontró registro con el criterio de búsqueda definido" })
|
|
1692
1707
|
] }) : /* @__PURE__ */ M(Je, { children: [
|
|
1693
|
-
/* @__PURE__ */
|
|
1708
|
+
/* @__PURE__ */ P(
|
|
1694
1709
|
Tn,
|
|
1695
1710
|
{
|
|
1696
1711
|
columns: e,
|
|
1697
|
-
displayedData:
|
|
1712
|
+
displayedData: le,
|
|
1698
1713
|
hasMoreData: gn,
|
|
1699
1714
|
setHasMoreData: Xe,
|
|
1700
1715
|
setVisibleData: Ye,
|
|
1701
1716
|
visibleData: _e,
|
|
1702
|
-
searchTerm:
|
|
1717
|
+
searchTerm: ie,
|
|
1703
1718
|
handleCellClick: Cn,
|
|
1704
1719
|
totalDias: s,
|
|
1705
|
-
isShared:
|
|
1706
|
-
enableColumnSearch:
|
|
1720
|
+
isShared: C,
|
|
1721
|
+
enableColumnSearch: Ee,
|
|
1707
1722
|
columnSearch: J,
|
|
1708
1723
|
handleColumnSearch: vn,
|
|
1709
1724
|
enableColumnSorter: an,
|
|
@@ -1720,27 +1735,27 @@ const ki = () => (/* @__PURE__ */ new Date()).getFullYear(), dt = (e) => e.norma
|
|
|
1720
1735
|
] }),
|
|
1721
1736
|
/* @__PURE__ */ M("div", { className: "data-count", children: [
|
|
1722
1737
|
"Mostrando ",
|
|
1723
|
-
Math.min(_e,
|
|
1738
|
+
Math.min(_e, le.length),
|
|
1724
1739
|
" de",
|
|
1725
1740
|
" ",
|
|
1726
|
-
|
|
1741
|
+
le.length,
|
|
1727
1742
|
" elementos"
|
|
1728
1743
|
] })
|
|
1729
1744
|
] })
|
|
1730
1745
|
] }),
|
|
1731
|
-
|
|
1746
|
+
re && n && /* @__PURE__ */ P(
|
|
1732
1747
|
Ln,
|
|
1733
1748
|
{
|
|
1734
1749
|
show: hn,
|
|
1735
|
-
onHide: () =>
|
|
1736
|
-
title: `${
|
|
1750
|
+
onHide: () => ae(!1),
|
|
1751
|
+
title: `${re.column.label}`,
|
|
1737
1752
|
closeModalOut: rn,
|
|
1738
1753
|
modalType: "primary",
|
|
1739
1754
|
disableClose: ln,
|
|
1740
1755
|
children: n(
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
() =>
|
|
1756
|
+
re.row,
|
|
1757
|
+
re.column,
|
|
1758
|
+
() => ae(!1)
|
|
1744
1759
|
)
|
|
1745
1760
|
}
|
|
1746
1761
|
)
|