@namba_one/ui-kit-2 1.0.146 → 1.0.148
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/index.d.ts +46 -34
- package/dist/index.es.js +99 -103
- package/dist/index.umd.js +14 -14
- package/dist/namba-one-uikit.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1677,7 +1677,7 @@ function en(n) {
|
|
|
1677
1677
|
newDraggableIndex: Or
|
|
1678
1678
|
}, n));
|
|
1679
1679
|
}
|
|
1680
|
-
var Ee, Et, Ke, yt, Jr, gs, St, Ir, $o, gn, bi, Or, ns, Vt, xo = !1, Ps = !1, Rs = [], Xr,
|
|
1680
|
+
var Ee, Et, Ke, yt, Jr, gs, St, Ir, $o, gn, bi, Or, ns, Vt, xo = !1, Ps = !1, Rs = [], Xr, An, Ua, Wa, Nd, zd, ui, yo, yi, wi = !1, rs = !1, bs, qt, qa = [], Ol = !1, Fs = [], la = typeof document < "u", os = rp, Hd = ji || xr ? "cssFloat" : "float", Oy = la && !_y && !rp && "draggable" in document.createElement("div"), up = function() {
|
|
1681
1681
|
if (la) {
|
|
1682
1682
|
if (xr)
|
|
1683
1683
|
return !1;
|
|
@@ -1924,17 +1924,17 @@ Ne.prototype = /** @lends Sortable.prototype */
|
|
|
1924
1924
|
this._nulling();
|
|
1925
1925
|
},
|
|
1926
1926
|
_emulateDragOver: function() {
|
|
1927
|
-
if (
|
|
1928
|
-
this._lastX =
|
|
1929
|
-
for (var e = document.elementFromPoint(
|
|
1927
|
+
if (An) {
|
|
1928
|
+
this._lastX = An.clientX, this._lastY = An.clientY, hp();
|
|
1929
|
+
for (var e = document.elementFromPoint(An.clientX, An.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(An.clientX, An.clientY), e !== t); )
|
|
1930
1930
|
t = e;
|
|
1931
1931
|
if (Ee.parentNode[yn]._isOutsideThisEl(e), t)
|
|
1932
1932
|
do {
|
|
1933
1933
|
if (t[yn]) {
|
|
1934
1934
|
var r = void 0;
|
|
1935
1935
|
if (r = t[yn]._onDragOver({
|
|
1936
|
-
clientX:
|
|
1937
|
-
clientY:
|
|
1936
|
+
clientX: An.clientX,
|
|
1937
|
+
clientY: An.clientY,
|
|
1938
1938
|
target: e,
|
|
1939
1939
|
rootEl: t
|
|
1940
1940
|
}), r && !this.options.dragoverBubble)
|
|
@@ -1963,7 +1963,7 @@ Ne.prototype = /** @lends Sortable.prototype */
|
|
|
1963
1963
|
f: c
|
|
1964
1964
|
};
|
|
1965
1965
|
var h = "matrix(".concat(s.a, ",").concat(s.b, ",").concat(s.c, ",").concat(s.d, ",").concat(s.e, ",").concat(s.f, ")");
|
|
1966
|
-
Fe(Ke, "webkitTransform", h), Fe(Ke, "mozTransform", h), Fe(Ke, "msTransform", h), Fe(Ke, "transform", h), Ua = d, Wa = c,
|
|
1966
|
+
Fe(Ke, "webkitTransform", h), Fe(Ke, "mozTransform", h), Fe(Ke, "msTransform", h), Fe(Ke, "transform", h), Ua = d, Wa = c, An = i;
|
|
1967
1967
|
}
|
|
1968
1968
|
e.cancelable && e.preventDefault();
|
|
1969
1969
|
}
|
|
@@ -2143,7 +2143,7 @@ Ne.prototype = /** @lends Sortable.prototype */
|
|
|
2143
2143
|
}), this.save()))), this._nulling();
|
|
2144
2144
|
},
|
|
2145
2145
|
_nulling: function() {
|
|
2146
|
-
sn("nulling", this), yt = Ee = Et = Ke = Jr = St = gs = Ir = Xr =
|
|
2146
|
+
sn("nulling", this), yt = Ee = Et = Ke = Jr = St = gs = Ir = Xr = An = ui = gn = Or = $o = bi = yo = yi = Vt = ns = Ne.dragged = Ne.ghost = Ne.clone = Ne.active = null, Fs.forEach(function(e) {
|
|
2147
2147
|
e.checked = !0;
|
|
2148
2148
|
}), Fs.length = Ua = Wa = 0;
|
|
2149
2149
|
},
|
|
@@ -3767,10 +3767,10 @@ function i1() {
|
|
|
3767
3767
|
var ve = document.documentElement.clientWidth, Me = window.innerWidth, Ae = Me - ve;
|
|
3768
3768
|
return Ae;
|
|
3769
3769
|
} else {
|
|
3770
|
-
var pn = $.style.borderLeftWidth,
|
|
3770
|
+
var pn = $.style.borderLeftWidth, Bn = $.style.borderRightWidth;
|
|
3771
3771
|
$.style.borderLeftWidth = "0px", $.style.borderRightWidth = "0px";
|
|
3772
3772
|
var En = $.offsetWidth - $.clientWidth;
|
|
3773
|
-
return $.style.borderLeftWidth = pn, $.style.borderRightWidth =
|
|
3773
|
+
return $.style.borderLeftWidth = pn, $.style.borderRightWidth = Bn, En;
|
|
3774
3774
|
}
|
|
3775
3775
|
else
|
|
3776
3776
|
return 0;
|
|
@@ -3923,8 +3923,8 @@ Available fill gap methods: `).concat(ve, "."));
|
|
|
3923
3923
|
$.getAttribute("data-scroll-lock-filled-gap") === "true" && ot($);
|
|
3924
3924
|
var pn = window.getComputedStyle($);
|
|
3925
3925
|
if ($.setAttribute("data-scroll-lock-filled-gap", "true"), $.setAttribute("data-scroll-lock-current-fill-gap-method", w.fillGapMethod), w.fillGapMethod === "margin") {
|
|
3926
|
-
var
|
|
3927
|
-
$.style.marginRight = "".concat(
|
|
3926
|
+
var Bn = parseFloat(pn.marginRight);
|
|
3927
|
+
$.style.marginRight = "".concat(Bn + Me, "px");
|
|
3928
3928
|
} else if (w.fillGapMethod === "width")
|
|
3929
3929
|
$.style.width = "calc(100% - ".concat(Me, "px)");
|
|
3930
3930
|
else if (w.fillGapMethod === "max-width")
|
|
@@ -3952,7 +3952,7 @@ Available fill gap methods: `).concat(ve, "."));
|
|
|
3952
3952
|
if (!w.scroll) {
|
|
3953
3953
|
var ve = w.startTouchY, Me = w.startTouchX, Ae = $.touches[0].clientY, pn = $.touches[0].clientX;
|
|
3954
3954
|
if ($.touches.length < 2) {
|
|
3955
|
-
var
|
|
3955
|
+
var Bn = d(w.scrollableSelectors), En = {
|
|
3956
3956
|
up: ve < Ae,
|
|
3957
3957
|
down: ve > Ae,
|
|
3958
3958
|
left: Me < pn,
|
|
@@ -3965,10 +3965,10 @@ Available fill gap methods: `).concat(ve, "."));
|
|
|
3965
3965
|
}, ei = function Q(de) {
|
|
3966
3966
|
var Ie = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
3967
3967
|
if (de) {
|
|
3968
|
-
var qe = h(de,
|
|
3968
|
+
var qe = h(de, Bn, !1);
|
|
3969
3969
|
if (K(de))
|
|
3970
3970
|
return !1;
|
|
3971
|
-
if (Ie || O(de) && h(de,
|
|
3971
|
+
if (Ie || O(de) && h(de, Bn) || m(de, Bn)) {
|
|
3972
3972
|
var se = !1;
|
|
3973
3973
|
x(de) && B(de) ? (En.up && g(de) || En.down && S(de)) && (se = !0) : g(de) && S(de) ? (En.left && x(de) || En.right && B(de)) && (se = !0) : (Er.up && g(de) || Er.down && S(de) || Er.left && x(de) || Er.right && B(de)) && (se = !0), se && (qe ? Q(qe, !0) : $.cancelable && $.preventDefault());
|
|
3974
3974
|
} else
|
|
@@ -8233,7 +8233,7 @@ function o_(n) {
|
|
|
8233
8233
|
a: t
|
|
8234
8234
|
};
|
|
8235
8235
|
}
|
|
8236
|
-
var i_ = "[-\\+]?\\d+%?", s_ = "[-\\+]?\\d*\\.\\d+%?", Pr = "(?:".concat(s_, ")|(?:").concat(i_, ")"), rl = "[\\s|\\(]+(".concat(Pr, ")[,|\\s]+(").concat(Pr, ")[,|\\s]+(").concat(Pr, ")\\s*\\)?"), ol = "[\\s|\\(]+(".concat(Pr, ")[,|\\s]+(").concat(Pr, ")[,|\\s]+(").concat(Pr, ")[,|\\s]+(").concat(Pr, ")\\s*\\)?"),
|
|
8236
|
+
var i_ = "[-\\+]?\\d+%?", s_ = "[-\\+]?\\d*\\.\\d+%?", Pr = "(?:".concat(s_, ")|(?:").concat(i_, ")"), rl = "[\\s|\\(]+(".concat(Pr, ")[,|\\s]+(").concat(Pr, ")[,|\\s]+(").concat(Pr, ")\\s*\\)?"), ol = "[\\s|\\(]+(".concat(Pr, ")[,|\\s]+(").concat(Pr, ")[,|\\s]+(").concat(Pr, ")[,|\\s]+(").concat(Pr, ")\\s*\\)?"), On = {
|
|
8237
8237
|
CSS_UNIT: new RegExp(Pr),
|
|
8238
8238
|
rgb: new RegExp("rgb" + rl),
|
|
8239
8239
|
rgba: new RegExp("rgba" + ol),
|
|
@@ -8254,25 +8254,25 @@ function a_(n) {
|
|
|
8254
8254
|
n = zl[n], e = !0;
|
|
8255
8255
|
else if (n === "transparent")
|
|
8256
8256
|
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
8257
|
-
var t =
|
|
8258
|
-
return t ? { r: t[1], g: t[2], b: t[3] } : (t =
|
|
8257
|
+
var t = On.rgb.exec(n);
|
|
8258
|
+
return t ? { r: t[1], g: t[2], b: t[3] } : (t = On.rgba.exec(n), t ? { r: t[1], g: t[2], b: t[3], a: t[4] } : (t = On.hsl.exec(n), t ? { h: t[1], s: t[2], l: t[3] } : (t = On.hsla.exec(n), t ? { h: t[1], s: t[2], l: t[3], a: t[4] } : (t = On.hsv.exec(n), t ? { h: t[1], s: t[2], v: t[3] } : (t = On.hsva.exec(n), t ? { h: t[1], s: t[2], v: t[3], a: t[4] } : (t = On.hex8.exec(n), t ? {
|
|
8259
8259
|
r: vn(t[1]),
|
|
8260
8260
|
g: vn(t[2]),
|
|
8261
8261
|
b: vn(t[3]),
|
|
8262
8262
|
a: eh(t[4]),
|
|
8263
8263
|
format: e ? "name" : "hex8"
|
|
8264
|
-
} : (t =
|
|
8264
|
+
} : (t = On.hex6.exec(n), t ? {
|
|
8265
8265
|
r: vn(t[1]),
|
|
8266
8266
|
g: vn(t[2]),
|
|
8267
8267
|
b: vn(t[3]),
|
|
8268
8268
|
format: e ? "name" : "hex"
|
|
8269
|
-
} : (t =
|
|
8269
|
+
} : (t = On.hex4.exec(n), t ? {
|
|
8270
8270
|
r: vn(t[1] + t[1]),
|
|
8271
8271
|
g: vn(t[2] + t[2]),
|
|
8272
8272
|
b: vn(t[3] + t[3]),
|
|
8273
8273
|
a: eh(t[4] + t[4]),
|
|
8274
8274
|
format: e ? "name" : "hex8"
|
|
8275
|
-
} : (t =
|
|
8275
|
+
} : (t = On.hex3.exec(n), t ? {
|
|
8276
8276
|
r: vn(t[1] + t[1]),
|
|
8277
8277
|
g: vn(t[2] + t[2]),
|
|
8278
8278
|
b: vn(t[3] + t[3]),
|
|
@@ -8280,7 +8280,7 @@ function a_(n) {
|
|
|
8280
8280
|
} : !1)))))))));
|
|
8281
8281
|
}
|
|
8282
8282
|
function ir(n) {
|
|
8283
|
-
return !!
|
|
8283
|
+
return !!On.CSS_UNIT.exec(String(n));
|
|
8284
8284
|
}
|
|
8285
8285
|
var l_ = (
|
|
8286
8286
|
/** @class */
|
|
@@ -9554,7 +9554,7 @@ const W_ = /* @__PURE__ */ ue({
|
|
|
9554
9554
|
}), k2 = {
|
|
9555
9555
|
$style: Dp
|
|
9556
9556
|
}, xP = /* @__PURE__ */ be(w2, [["__cssModules", k2]]);
|
|
9557
|
-
function
|
|
9557
|
+
function Pn(n) {
|
|
9558
9558
|
if (window) {
|
|
9559
9559
|
const t = Math.min(Math.max(window.innerWidth, 1200), 1440) / 100;
|
|
9560
9560
|
return Number((n * t / 12).toFixed(2));
|
|
@@ -9647,12 +9647,7 @@ function P2({
|
|
|
9647
9647
|
}) {
|
|
9648
9648
|
const s = n == null ? void 0 : n.getBoundingClientRect(), a = e;
|
|
9649
9649
|
if (!s || !a) return;
|
|
9650
|
-
const { innerWidth: l, innerHeight: u } = window, d = a.getBoundingClientRect(), c = s.left + (s.width +
|
|
9651
|
-
console.log("isCanPositionLeft: ", h), console.log("fixedElement: ", a), console.log("fixedElementRect: ", d), console.log("parent: ", n), console.log("parentElementRect: ", s), console.log(
|
|
9652
|
-
"toPxByRem(Number(horizontalOffset)): ",
|
|
9653
|
-
Sn(Number(o))
|
|
9654
|
-
), console.log("innerWidth: ", l);
|
|
9655
|
-
const m = s.bottom + d.height + Sn(Number(i)) < u, f = s.top > d.height + Sn(Number(i)), { coordinates: g, align: S } = N2({
|
|
9650
|
+
const { innerWidth: l, innerHeight: u } = window, d = a.getBoundingClientRect(), c = s.left + (s.width + Pn(Number(o))) - d.width > 0, h = s.left + d.width + Pn(Number(o)) < l, m = s.bottom + d.height + Pn(Number(i)) < u, f = s.top > d.height + Pn(Number(i)), { coordinates: g, align: S } = N2({
|
|
9656
9651
|
isCanPositionRight: c,
|
|
9657
9652
|
isCanPositionLeft: h,
|
|
9658
9653
|
parentElementRect: s,
|
|
@@ -9720,13 +9715,13 @@ function F2({
|
|
|
9720
9715
|
};
|
|
9721
9716
|
}
|
|
9722
9717
|
function Ip(n, e) {
|
|
9723
|
-
return n.left +
|
|
9718
|
+
return n.left + Pn(Number(e));
|
|
9724
9719
|
}
|
|
9725
9720
|
function Lp(n, e) {
|
|
9726
|
-
return window.innerWidth - n.right +
|
|
9721
|
+
return window.innerWidth - n.right + Pn(Number(e));
|
|
9727
9722
|
}
|
|
9728
9723
|
function bu(n, e, t) {
|
|
9729
|
-
return n.left - (e.width - n.width) / 2 +
|
|
9724
|
+
return n.left - (e.width - n.width) / 2 + Pn(Number(t));
|
|
9730
9725
|
}
|
|
9731
9726
|
function N2({
|
|
9732
9727
|
isCanPositionRight: n,
|
|
@@ -9768,7 +9763,7 @@ function z2({
|
|
|
9768
9763
|
fixedElementRect: o
|
|
9769
9764
|
}) {
|
|
9770
9765
|
let i, s;
|
|
9771
|
-
return n ? (i = r.bottom +
|
|
9766
|
+
return n ? (i = r.bottom + Pn(Number(t)), s = "bottom") : e ? (i = Pp(
|
|
9772
9767
|
r,
|
|
9773
9768
|
o,
|
|
9774
9769
|
t
|
|
@@ -9838,13 +9833,13 @@ function j2({
|
|
|
9838
9833
|
};
|
|
9839
9834
|
}
|
|
9840
9835
|
function Pp(n, e, t) {
|
|
9841
|
-
return n.top - e.height -
|
|
9836
|
+
return n.top - e.height - Pn(Number(t));
|
|
9842
9837
|
}
|
|
9843
9838
|
function V2(n, e) {
|
|
9844
|
-
return n.bottom +
|
|
9839
|
+
return n.bottom + Pn(Number(e));
|
|
9845
9840
|
}
|
|
9846
9841
|
function yu(n, e, t) {
|
|
9847
|
-
return n.top - (e.height - n.height) / 2 +
|
|
9842
|
+
return n.top - (e.height - n.height) / 2 + Pn(Number(t));
|
|
9848
9843
|
}
|
|
9849
9844
|
function Ko() {
|
|
9850
9845
|
const [n, e] = bp(!1), t = uu(), r = U(null), o = U(null), i = R(() => {
|
|
@@ -10356,7 +10351,7 @@ function ct(n, e) {
|
|
|
10356
10351
|
function Pe(n, e) {
|
|
10357
10352
|
return ct(e || n, n);
|
|
10358
10353
|
}
|
|
10359
|
-
function
|
|
10354
|
+
function Sn(n, e, t) {
|
|
10360
10355
|
const r = Pe(n, t == null ? void 0 : t.in);
|
|
10361
10356
|
return isNaN(e) ? ct((t == null ? void 0 : t.in) || n, NaN) : (e && r.setDate(r.getDate() + e), r);
|
|
10362
10357
|
}
|
|
@@ -10383,7 +10378,7 @@ function jp(n, e, t) {
|
|
|
10383
10378
|
hours: a = 0,
|
|
10384
10379
|
minutes: l = 0,
|
|
10385
10380
|
seconds: u = 0
|
|
10386
|
-
} = e, d = Pe(n, t == null ? void 0 : t.in), c = o || r ? Rn(d, o + r * 12) : d, h = s || i ?
|
|
10381
|
+
} = e, d = Pe(n, t == null ? void 0 : t.in), c = o || r ? Rn(d, o + r * 12) : d, h = s || i ? Sn(c, s + i * 7) : c, m = l + a * 60, g = (u + m * 60) * 1e3;
|
|
10387
10382
|
return ct(n, +h + g);
|
|
10388
10383
|
}
|
|
10389
10384
|
function kC(n, e, t) {
|
|
@@ -12587,7 +12582,7 @@ class Wx extends at {
|
|
|
12587
12582
|
function Eu(n, e, t) {
|
|
12588
12583
|
var c, h, m, f;
|
|
12589
12584
|
const r = po(), o = (t == null ? void 0 : t.weekStartsOn) ?? ((h = (c = t == null ? void 0 : t.locale) == null ? void 0 : c.options) == null ? void 0 : h.weekStartsOn) ?? r.weekStartsOn ?? ((f = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : f.weekStartsOn) ?? 0, i = Pe(n, t == null ? void 0 : t.in), s = i.getDay(), l = (e % 7 + 7) % 7, u = 7 - o, d = e < 0 || e > 6 ? e - (s + u) % 7 : (l + u) % 7 - (s + u) % 7;
|
|
12590
|
-
return
|
|
12585
|
+
return Sn(i, d, t);
|
|
12591
12586
|
}
|
|
12592
12587
|
class qx extends at {
|
|
12593
12588
|
constructor() {
|
|
@@ -12774,7 +12769,7 @@ class Kx extends at {
|
|
|
12774
12769
|
}
|
|
12775
12770
|
function Xx(n, e, t) {
|
|
12776
12771
|
const r = Pe(n, t == null ? void 0 : t.in), o = xx(r, t), i = e - o;
|
|
12777
|
-
return
|
|
12772
|
+
return Sn(r, i, t);
|
|
12778
12773
|
}
|
|
12779
12774
|
class Qx extends at {
|
|
12780
12775
|
constructor() {
|
|
@@ -13365,7 +13360,7 @@ function ch(n, e, t) {
|
|
|
13365
13360
|
return +ro(r) == +ro(o);
|
|
13366
13361
|
}
|
|
13367
13362
|
function of(n, e, t) {
|
|
13368
|
-
return
|
|
13363
|
+
return Sn(n, -e, t);
|
|
13369
13364
|
}
|
|
13370
13365
|
function sf(n, e, t) {
|
|
13371
13366
|
const r = Pe(n, t == null ? void 0 : t.in), o = r.getFullYear(), i = r.getDate(), s = ct(n, 0);
|
|
@@ -13594,7 +13589,7 @@ const un = (n, e) => e ? new Date(n.toLocaleString("en-US", { timeZone: e })) :
|
|
|
13594
13589
|
const t = /* @__PURE__ */ new Date(), r = new Date(t.toLocaleString("en-US", { timeZone: "UTC" })), o = new Date(t.toLocaleString("en-US", { timeZone: n })), i = (xE(e ?? o) ? o : e ?? o).getTimezoneOffset() / 60;
|
|
13595
13590
|
return (+r - +o) / (1e3 * 60 * 60) - i;
|
|
13596
13591
|
};
|
|
13597
|
-
var
|
|
13592
|
+
var Dn = /* @__PURE__ */ ((n) => (n.month = "month", n.year = "year", n))(Dn || {}), In = /* @__PURE__ */ ((n) => (n.top = "top", n.bottom = "bottom", n))(In || {}), so = /* @__PURE__ */ ((n) => (n.header = "header", n.calendar = "calendar", n.timePicker = "timePicker", n))(so || {}), Kt = /* @__PURE__ */ ((n) => (n.month = "month", n.year = "year", n.calendar = "calendar", n.time = "time", n.minutes = "minutes", n.hours = "hours", n.seconds = "seconds", n))(Kt || {});
|
|
13598
13593
|
const TE = ["timestamp", "date", "iso"];
|
|
13599
13594
|
var tn = /* @__PURE__ */ ((n) => (n.up = "up", n.down = "down", n.left = "left", n.right = "right", n))(tn || {}), gt = /* @__PURE__ */ ((n) => (n.arrowUp = "ArrowUp", n.arrowDown = "ArrowDown", n.arrowLeft = "ArrowLeft", n.arrowRight = "ArrowRight", n.enter = "Enter", n.space = " ", n.esc = "Escape", n.tab = "Tab", n.home = "Home", n.end = "End", n.pageUp = "PageUp", n.pageDown = "PageDown", n))(gt || {}), Do = /* @__PURE__ */ ((n) => (n.MONTH_AND_YEAR = "MM-yyyy", n.YEAR = "yyyy", n.DATE = "dd-MM-yyyy", n))(Do || {});
|
|
13600
13595
|
function dh(n) {
|
|
@@ -13752,7 +13747,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
13752
13747
|
}, zr = (n, e, t, r) => {
|
|
13753
13748
|
let o = n ? pe(n) : pe();
|
|
13754
13749
|
return (e || e === 0) && (o = wE(o, +e)), (t || t === 0) && (o = kE(o, +t)), (r || r === 0) && (o = lf(o, +r)), af(o, 0);
|
|
13755
|
-
}, Mt = (n, e) => !n || !e ? !1 : Ho(jt(n), jt(e)), et = (n, e) => !n || !e ? !1 : Bo(jt(n), jt(e)), Ot = (n, e) => !n || !e ? !1 : uo(jt(n), jt(e)), Bi = (n, e, t) => n != null && n[0] && n != null && n[1] ? Ot(t, n[0]) && Mt(t, n[1]) : n != null && n[0] && e ? Ot(t, n[0]) && Mt(t, e) || Mt(t, n[0]) && Ot(t, e) : !1,
|
|
13750
|
+
}, Mt = (n, e) => !n || !e ? !1 : Ho(jt(n), jt(e)), et = (n, e) => !n || !e ? !1 : Bo(jt(n), jt(e)), Ot = (n, e) => !n || !e ? !1 : uo(jt(n), jt(e)), Bi = (n, e, t) => n != null && n[0] && n != null && n[1] ? Ot(t, n[0]) && Mt(t, n[1]) : n != null && n[0] && e ? Ot(t, n[0]) && Mt(t, e) || Mt(t, n[0]) && Ot(t, e) : !1, Ln = (n) => {
|
|
13756
13751
|
const e = dt(new Date(n), { date: 1 });
|
|
13757
13752
|
return jt(e);
|
|
13758
13753
|
}, ul = (n, e, t) => e && (t || t === 0) ? Object.fromEntries(
|
|
@@ -13842,7 +13837,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
13842
13837
|
}
|
|
13843
13838
|
return !0;
|
|
13844
13839
|
}, Cf = (n, e, t) => typeof n == "function" ? n({ month: e, year: t }) : !!n.months.find((r) => r.month === e && r.year === t), Lu = (n, e) => typeof n == "function" ? n(e) : n.years.includes(e), ql = (n) => `dp-${er(n, "yyyy-MM-dd")}`, vh = (n, e) => {
|
|
13845
|
-
const t = of(jt(e), n), r =
|
|
13840
|
+
const t = of(jt(e), n), r = Sn(jt(e), n);
|
|
13846
13841
|
return { before: t, after: r };
|
|
13847
13842
|
}, oi = zi({
|
|
13848
13843
|
menuFocused: !1,
|
|
@@ -14932,7 +14927,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
14932
14927
|
emit: d
|
|
14933
14928
|
}) => {
|
|
14934
14929
|
const c = R(() => Ou(s.yearRange, s.locale, s.reverseYears)), h = U([!1]), m = R(() => (T, H) => {
|
|
14935
|
-
const te = dt(
|
|
14930
|
+
const te = dt(Ln(/* @__PURE__ */ new Date()), {
|
|
14936
14931
|
month: u.value(T),
|
|
14937
14932
|
year: l.value(T)
|
|
14938
14933
|
}), ce = H ? Gp(te) : Mi(te);
|
|
@@ -15054,7 +15049,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
15054
15049
|
if (s.value.enabled) {
|
|
15055
15050
|
const le = te();
|
|
15056
15051
|
if (Array.isArray(m.value) && Array.isArray(le)) {
|
|
15057
|
-
const b = C(G, ee, 0) || C(G, ee, 1), Z = hr(
|
|
15052
|
+
const b = C(G, ee, 0) || C(G, ee, 1), Z = hr(Ln(pe()), G, f.value(ee));
|
|
15058
15053
|
return Bi(m.value, B.value, Z) && !b;
|
|
15059
15054
|
}
|
|
15060
15055
|
return !1;
|
|
@@ -15068,8 +15063,8 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
15068
15063
|
bf(f.value(G), l.value.maxDate)
|
|
15069
15064
|
) || jE(l.value.disabledDates, f.value(G), ee.value) || ((le = d.value.months) == null ? void 0 : le.includes(ee.value)) || !VE(l.value.allowedDates, f.value(G), ee.value), ge = k(ee.value, G), Re = Cf(a.value, ee.value, f.value(G));
|
|
15070
15065
|
return { active: b, disabled: Z, isBetween: ge, highlighted: Re };
|
|
15071
|
-
})), F = (G, ee) => hr(
|
|
15072
|
-
const le = m.value ? m.value :
|
|
15066
|
+
})), F = (G, ee) => hr(Ln(pe()), G, f.value(ee)), j = (G, ee) => {
|
|
15067
|
+
const le = m.value ? m.value : Ln(/* @__PURE__ */ new Date());
|
|
15073
15068
|
m.value = hr(le, G, f.value(ee)), e("auto-apply"), e("update-flow-step");
|
|
15074
15069
|
}, Y = (G, ee) => {
|
|
15075
15070
|
const le = F(G, ee);
|
|
@@ -15250,13 +15245,13 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
15250
15245
|
Yo(u.value.maxDate)
|
|
15251
15246
|
) || a.value.years.includes(x.value) || !m(x.value) || f(x.value), K = h(x.value) && !B, A = Lu(i.value, x.value);
|
|
15252
15247
|
return { active: B, disabled: O, isBetween: K, highlighted: A };
|
|
15253
|
-
})), S = (x) => Xn(
|
|
15248
|
+
})), S = (x) => Xn(Ln(Mi(/* @__PURE__ */ new Date())), x);
|
|
15254
15249
|
return {
|
|
15255
15250
|
groupedYears: g,
|
|
15256
15251
|
modelValue: r,
|
|
15257
15252
|
focusYear: d,
|
|
15258
15253
|
setHoverValue: (x) => {
|
|
15259
|
-
o.value = Xn(
|
|
15254
|
+
o.value = Xn(Ln(/* @__PURE__ */ new Date()), x);
|
|
15260
15255
|
},
|
|
15261
15256
|
selectYear: (x) => {
|
|
15262
15257
|
var B;
|
|
@@ -16038,16 +16033,16 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16038
16033
|
const w = (L) => ({
|
|
16039
16034
|
get: () => o[L],
|
|
16040
16035
|
set: (G) => {
|
|
16041
|
-
const ee = L ===
|
|
16042
|
-
r("update-month-year", { [L]: G, [ee]: o[ee] }), L ===
|
|
16036
|
+
const ee = L === Dn.month ? Dn.year : Dn.month;
|
|
16037
|
+
r("update-month-year", { [L]: G, [ee]: o[ee] }), L === Dn.month ? F(!0) : j(!0);
|
|
16043
16038
|
}
|
|
16044
|
-
}), T = R(w(
|
|
16039
|
+
}), T = R(w(Dn.month)), H = R(w(Dn.year)), te = R(() => (L) => ({
|
|
16045
16040
|
month: o.month,
|
|
16046
16041
|
year: o.year,
|
|
16047
|
-
items: L ===
|
|
16042
|
+
items: L === Dn.month ? o.months : o.years,
|
|
16048
16043
|
instance: o.instance,
|
|
16049
16044
|
updateMonthYear: B,
|
|
16050
|
-
toggle: L ===
|
|
16045
|
+
toggle: L === Dn.month ? F : j
|
|
16051
16046
|
})), ce = R(() => o.months.find((G) => G.value === o.month) || { text: "", value: 0 }), C = R(() => Vo(o.months, (L) => {
|
|
16052
16047
|
const G = o.month === L.value, ee = $i(
|
|
16053
16048
|
L.value,
|
|
@@ -16076,7 +16071,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16076
16071
|
var L, G, ee, le, b, Z;
|
|
16077
16072
|
return [
|
|
16078
16073
|
{
|
|
16079
|
-
type:
|
|
16074
|
+
type: Dn.month,
|
|
16080
16075
|
index: 1,
|
|
16081
16076
|
toggle: F,
|
|
16082
16077
|
modelValue: T.value,
|
|
@@ -16088,7 +16083,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16088
16083
|
overlayLabel: ((ee = (G = s.value).monthPicker) == null ? void 0 : ee.call(G, !0)) ?? void 0
|
|
16089
16084
|
},
|
|
16090
16085
|
{
|
|
16091
|
-
type:
|
|
16086
|
+
type: Dn.year,
|
|
16092
16087
|
index: 2,
|
|
16093
16088
|
toggle: j,
|
|
16094
16089
|
modelValue: H.value,
|
|
@@ -16646,10 +16641,10 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16646
16641
|
const se = 6 - Q.length, Se = (de.getDay() + 7 - qe) % 7, Oe = 6 - (Ie.getDay() + 7 - qe) % 7, [or, Hn] = _e(Se, Oe);
|
|
16647
16642
|
for (let Kr = 1; Kr <= se; Kr++)
|
|
16648
16643
|
if (Hn ? !!(Kr % 2) == or : or) {
|
|
16649
|
-
const Tr = Q[0].days[0], ja = Xe(
|
|
16644
|
+
const Tr = Q[0].days[0], ja = Xe(Sn(Tr.value, -7), Je(de));
|
|
16650
16645
|
Q.unshift({ days: ja });
|
|
16651
16646
|
} else {
|
|
16652
|
-
const Tr = Q[Q.length - 1], ja = Tr.days[Tr.days.length - 1], Ov = Xe(
|
|
16647
|
+
const Tr = Q[Q.length - 1], ja = Tr.days[Tr.days.length - 1], Ov = Xe(Sn(ja.value, 1), Je(de));
|
|
16653
16648
|
Q.push({ days: Ov });
|
|
16654
16649
|
}
|
|
16655
16650
|
}
|
|
@@ -16657,7 +16652,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16657
16652
|
}, Xe = (Q, de) => {
|
|
16658
16653
|
const Ie = pe(Q), qe = [];
|
|
16659
16654
|
for (let se = 0; se < 7; se++) {
|
|
16660
|
-
const Se =
|
|
16655
|
+
const Se = Sn(Ie, se), Oe = Je(Se) !== de;
|
|
16661
16656
|
qe.push({
|
|
16662
16657
|
text: n.hideOffsetDates && Oe ? "" : Se.getDate(),
|
|
16663
16658
|
value: Se,
|
|
@@ -16672,7 +16667,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16672
16667
|
if (Ie.push({ days: Kr }), !Ie[Ie.length - 1].days.some(
|
|
16673
16668
|
(Tr) => et(jt(Tr.value), jt(se))
|
|
16674
16669
|
)) {
|
|
16675
|
-
const Tr =
|
|
16670
|
+
const Tr = Sn(Hn, 7);
|
|
16676
16671
|
or(Tr);
|
|
16677
16672
|
}
|
|
16678
16673
|
};
|
|
@@ -16687,7 +16682,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16687
16682
|
}, xe = (Q, de) => {
|
|
16688
16683
|
const Ie = [
|
|
16689
16684
|
pe(Q.value),
|
|
16690
|
-
|
|
16685
|
+
Sn(pe(Q.value), +f.value.autoRange)
|
|
16691
16686
|
];
|
|
16692
16687
|
A(Ie) ? (de && nt(Q.value), o.value = Ie) : e("invalid-date", Q.value);
|
|
16693
16688
|
}, nt = (Q) => {
|
|
@@ -16728,7 +16723,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16728
16723
|
_(Q, de.month, de.year, !0), h.value.count && !h.value.solo && Re(Q), e("update-month-year", { instance: Q, month: de.month, year: de.year }), t(h.value.solo ? Q : void 0);
|
|
16729
16724
|
const qe = (Ie = n.flow) != null && Ie.length ? n.flow[n.flowStep] : void 0;
|
|
16730
16725
|
!de.fromNav && (qe === Kt.month || qe === Kt.year) && r();
|
|
16731
|
-
},
|
|
16726
|
+
}, Bn = (Q, de) => {
|
|
16732
16727
|
Tf({
|
|
16733
16728
|
value: Q,
|
|
16734
16729
|
modelValue: l,
|
|
@@ -16765,7 +16760,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16765
16760
|
handleArrow: ke,
|
|
16766
16761
|
selectDate: Ae,
|
|
16767
16762
|
updateMonthYear: pn,
|
|
16768
|
-
presetDate:
|
|
16763
|
+
presetDate: Bn,
|
|
16769
16764
|
selectCurrentDate: En,
|
|
16770
16765
|
updateTime: (Q, de = !0, Ie = !1) => {
|
|
16771
16766
|
z(Q, de, Ie, Er);
|
|
@@ -17580,13 +17575,13 @@ const hS = ({
|
|
|
17580
17575
|
}, T = () => {
|
|
17581
17576
|
const _ = Rt(t);
|
|
17582
17577
|
if (_) {
|
|
17583
|
-
if (s.autoPosition ===
|
|
17584
|
-
if (s.autoPosition ===
|
|
17578
|
+
if (s.autoPosition === In.top) return In.top;
|
|
17579
|
+
if (s.autoPosition === In.bottom) return In.bottom;
|
|
17585
17580
|
const { height: F } = u.value, { top: j, height: Y } = _.getBoundingClientRect(), ne = window.innerHeight - j - Y, W = j;
|
|
17586
|
-
return F <= ne ?
|
|
17581
|
+
return F <= ne ? In.bottom : F > ne && F <= W ? In.top : ne >= W ? In.bottom : In.top;
|
|
17587
17582
|
}
|
|
17588
|
-
return
|
|
17589
|
-
}, H = (_) => T() ===
|
|
17583
|
+
return In.bottom;
|
|
17584
|
+
}, H = (_) => T() === In.bottom ? z(_) : I(_), te = () => {
|
|
17590
17585
|
const _ = Rt(t);
|
|
17591
17586
|
if (_)
|
|
17592
17587
|
return s.autoPosition ? H(_) : z(_);
|
|
@@ -17773,7 +17768,7 @@ const hS = ({
|
|
|
17773
17768
|
if (l.value.autoRange || e.weekPicker) {
|
|
17774
17769
|
if (d.value) {
|
|
17775
17770
|
if (e.hideOffsetDates && !b.current) return !1;
|
|
17776
|
-
const Z =
|
|
17771
|
+
const Z = Sn(d.value, +l.value.autoRange), ge = lr(pe(d.value), e.weekStart);
|
|
17777
17772
|
return e.weekPicker ? et(ge[1], pe(b.value)) : et(Z, pe(b.value));
|
|
17778
17773
|
}
|
|
17779
17774
|
return !1;
|
|
@@ -17782,7 +17777,7 @@ const hS = ({
|
|
|
17782
17777
|
}, A = (b) => {
|
|
17783
17778
|
if (l.value.autoRange || e.weekPicker) {
|
|
17784
17779
|
if (d.value) {
|
|
17785
|
-
const Z =
|
|
17780
|
+
const Z = Sn(d.value, +l.value.autoRange);
|
|
17786
17781
|
if (e.hideOffsetDates && !b.current) return !1;
|
|
17787
17782
|
const ge = lr(pe(d.value), e.weekStart);
|
|
17788
17783
|
return e.weekPicker ? Ot(b.value, ge[0]) && Mt(b.value, ge[1]) : Ot(b.value, d.value) && Mt(b.value, Z);
|
|
@@ -17949,17 +17944,17 @@ const hS = ({
|
|
|
17949
17944
|
}, H = (C) => {
|
|
17950
17945
|
if (!n.monthPicker) return !0;
|
|
17951
17946
|
let k = !0;
|
|
17952
|
-
const _ = pe(
|
|
17947
|
+
const _ = pe(Ln(C));
|
|
17953
17948
|
if (r.value.minDate && r.value.maxDate) {
|
|
17954
|
-
const F = pe(
|
|
17949
|
+
const F = pe(Ln(r.value.minDate)), j = pe(Ln(r.value.maxDate));
|
|
17955
17950
|
return Ot(_, F) && Mt(_, j) || et(_, F) || et(_, j);
|
|
17956
17951
|
}
|
|
17957
17952
|
if (r.value.minDate) {
|
|
17958
|
-
const F = pe(
|
|
17953
|
+
const F = pe(Ln(r.value.minDate));
|
|
17959
17954
|
k = Ot(_, F) || et(_, F);
|
|
17960
17955
|
}
|
|
17961
17956
|
if (r.value.maxDate) {
|
|
17962
|
-
const F = pe(
|
|
17957
|
+
const F = pe(Ln(r.value.maxDate));
|
|
17963
17958
|
k = Mt(_, F) || et(_, F);
|
|
17964
17959
|
}
|
|
17965
17960
|
return k;
|
|
@@ -18374,7 +18369,7 @@ const hS = ({
|
|
|
18374
18369
|
o.autoApply && D(le.value) && Z(), Bt();
|
|
18375
18370
|
}, Ae = () => s.value ? $() : ot(), pn = (se) => {
|
|
18376
18371
|
le.value = se;
|
|
18377
|
-
},
|
|
18372
|
+
}, Bn = () => {
|
|
18378
18373
|
I.value.enabled && (h.value = !0, ge()), r("focus");
|
|
18379
18374
|
}, En = () => {
|
|
18380
18375
|
if (I.value.enabled && (h.value = !1, b(o.modelValue), f.value)) {
|
|
@@ -18437,7 +18432,7 @@ const hS = ({
|
|
|
18437
18432
|
onSelectDate: xe,
|
|
18438
18433
|
onToggle: Ae,
|
|
18439
18434
|
onClose: $,
|
|
18440
|
-
onFocus:
|
|
18435
|
+
onFocus: Bn,
|
|
18441
18436
|
onBlur: En,
|
|
18442
18437
|
onRealBlur: Se[1] || (Se[1] = (Oe) => h.value = !1),
|
|
18443
18438
|
onTextInput: Se[2] || (Se[2] = (Oe) => se.$emit("text-input", Oe))
|
|
@@ -21293,7 +21288,7 @@ Ki.logLevel = "VERBOSE";
|
|
|
21293
21288
|
function kA(n) {
|
|
21294
21289
|
Ki.logLevel = n;
|
|
21295
21290
|
}
|
|
21296
|
-
const lt = Ki.bind(window, !1),
|
|
21291
|
+
const lt = Ki.bind(window, !1), Mn = Ki.bind(window, !0);
|
|
21297
21292
|
function ho(n) {
|
|
21298
21293
|
return Object.prototype.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
|
|
21299
21294
|
}
|
|
@@ -21315,7 +21310,7 @@ function Eh(n) {
|
|
|
21315
21310
|
function Th(n) {
|
|
21316
21311
|
return ho(n) === "undefined";
|
|
21317
21312
|
}
|
|
21318
|
-
function
|
|
21313
|
+
function $n(n) {
|
|
21319
21314
|
return n ? Object.keys(n).length === 0 && n.constructor === Object : !0;
|
|
21320
21315
|
}
|
|
21321
21316
|
function Gf(n) {
|
|
@@ -21419,7 +21414,7 @@ function BA(n = "") {
|
|
|
21419
21414
|
}
|
|
21420
21415
|
function Zl(n, e, t) {
|
|
21421
21416
|
const r = `«${e}» is deprecated and will be removed in the next major release. Please use the «${t}» instead.`;
|
|
21422
|
-
n &&
|
|
21417
|
+
n && Mn(r, "warn");
|
|
21423
21418
|
}
|
|
21424
21419
|
function Zo(n, e, t) {
|
|
21425
21420
|
const r = t.value ? "value" : "get", o = t[r], i = `#${e}Cache`;
|
|
@@ -22028,7 +22023,7 @@ let Xi = class {
|
|
|
22028
22023
|
* @param data - subscribers get this data when they were fired
|
|
22029
22024
|
*/
|
|
22030
22025
|
emit(e, t) {
|
|
22031
|
-
|
|
22026
|
+
$n(this.subscribers) || !this.subscribers[e] || this.subscribers[e].reduce((r, o) => {
|
|
22032
22027
|
const i = o(r);
|
|
22033
22028
|
return i !== void 0 ? i : r;
|
|
22034
22029
|
}, t);
|
|
@@ -22663,7 +22658,7 @@ async function sm(n, e) {
|
|
|
22663
22658
|
if (!tu(i, "import") || i.toolbox === void 0)
|
|
22664
22659
|
return o;
|
|
22665
22660
|
const s = i.toolbox.filter((a) => {
|
|
22666
|
-
if (
|
|
22661
|
+
if ($n(a) || a.icon === void 0)
|
|
22667
22662
|
return !1;
|
|
22668
22663
|
if (a.data !== void 0) {
|
|
22669
22664
|
if (im(a.data, t))
|
|
@@ -22804,7 +22799,7 @@ let fr = class Br extends Xi {
|
|
|
22804
22799
|
* @returns {object}
|
|
22805
22800
|
*/
|
|
22806
22801
|
get data() {
|
|
22807
|
-
return this.save().then((e) => e &&
|
|
22802
|
+
return this.save().then((e) => e && !$n(e.data) ? e.data : {});
|
|
22808
22803
|
}
|
|
22809
22804
|
/**
|
|
22810
22805
|
* Returns tool's sanitizer config
|
|
@@ -23238,7 +23233,7 @@ class zA extends rt {
|
|
|
23238
23233
|
getBlockIndex(e) {
|
|
23239
23234
|
const t = this.Editor.BlockManager.getBlockById(e);
|
|
23240
23235
|
if (!t) {
|
|
23241
|
-
|
|
23236
|
+
Mn("There is no block with id `" + e + "`", "warn");
|
|
23242
23237
|
return;
|
|
23243
23238
|
}
|
|
23244
23239
|
return this.Editor.BlockManager.getBlockIndex(t);
|
|
@@ -23251,7 +23246,7 @@ class zA extends rt {
|
|
|
23251
23246
|
getBlockByIndex(e) {
|
|
23252
23247
|
const t = this.Editor.BlockManager.getBlockByIndex(e);
|
|
23253
23248
|
if (t === void 0) {
|
|
23254
|
-
|
|
23249
|
+
Mn("There is no block at index `" + e + "`", "warn");
|
|
23255
23250
|
return;
|
|
23256
23251
|
}
|
|
23257
23252
|
return new ar(t);
|
|
@@ -23263,7 +23258,7 @@ class zA extends rt {
|
|
|
23263
23258
|
*/
|
|
23264
23259
|
getById(e) {
|
|
23265
23260
|
const t = this.Editor.BlockManager.getBlockById(e);
|
|
23266
|
-
return t === void 0 ? (
|
|
23261
|
+
return t === void 0 ? (Mn("There is no block with id `" + e + "`", "warn"), null) : new ar(t);
|
|
23267
23262
|
}
|
|
23268
23263
|
/**
|
|
23269
23264
|
* Get Block API object by any child html element
|
|
@@ -23273,7 +23268,7 @@ class zA extends rt {
|
|
|
23273
23268
|
getBlockByElement(e) {
|
|
23274
23269
|
const t = this.Editor.BlockManager.getBlock(e);
|
|
23275
23270
|
if (t === void 0) {
|
|
23276
|
-
|
|
23271
|
+
Mn("There is no block corresponding to element `" + e + "`", "warn");
|
|
23277
23272
|
return;
|
|
23278
23273
|
}
|
|
23279
23274
|
return new ar(t);
|
|
@@ -23310,7 +23305,7 @@ class zA extends rt {
|
|
|
23310
23305
|
const t = this.Editor.BlockManager.getBlockByIndex(e);
|
|
23311
23306
|
this.Editor.BlockManager.removeBlock(t);
|
|
23312
23307
|
} catch (t) {
|
|
23313
|
-
|
|
23308
|
+
Mn(t, "warn");
|
|
23314
23309
|
return;
|
|
23315
23310
|
}
|
|
23316
23311
|
this.Editor.BlockManager.blocks.length === 0 && this.Editor.BlockManager.insert(), this.Editor.BlockManager.currentBlock && this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock, this.Editor.Caret.positions.END), this.Editor.Toolbar.close();
|
|
@@ -23463,7 +23458,7 @@ let YA = class am extends rt {
|
|
|
23463
23458
|
get methods() {
|
|
23464
23459
|
return {
|
|
23465
23460
|
t: () => {
|
|
23466
|
-
|
|
23461
|
+
Mn("I18n.t() method can be accessed only from Tools", "warn");
|
|
23467
23462
|
}
|
|
23468
23463
|
};
|
|
23469
23464
|
}
|
|
@@ -24052,7 +24047,7 @@ const e3 = /* @__PURE__ */ xa(JA);
|
|
|
24052
24047
|
function Wu(n, e) {
|
|
24053
24048
|
return n.map((t) => {
|
|
24054
24049
|
const r = xt(e) ? e(t.tool) : e;
|
|
24055
|
-
return
|
|
24050
|
+
return $n(r) || (t.data = qu(t.data, r)), t;
|
|
24056
24051
|
});
|
|
24057
24052
|
}
|
|
24058
24053
|
function Qn(n, e = {}) {
|
|
@@ -24123,7 +24118,7 @@ class s3 extends rt {
|
|
|
24123
24118
|
*/
|
|
24124
24119
|
save() {
|
|
24125
24120
|
const e = "Editor's content can not be saved in read-only mode";
|
|
24126
|
-
return this.Editor.ReadOnly.isEnabled ? (
|
|
24121
|
+
return this.Editor.ReadOnly.isEnabled ? (Mn(e, "warn"), Promise.reject(new Error(e))) : this.Editor.Saver.save();
|
|
24127
24122
|
}
|
|
24128
24123
|
}
|
|
24129
24124
|
class a3 extends rt {
|
|
@@ -24236,7 +24231,7 @@ class c3 extends rt {
|
|
|
24236
24231
|
*/
|
|
24237
24232
|
toggleBlockSettings(e) {
|
|
24238
24233
|
if (this.Editor.BlockManager.currentBlockIndex === -1) {
|
|
24239
|
-
|
|
24234
|
+
Mn("Could't toggle the Toolbar because there is no block selected ", "warn");
|
|
24240
24235
|
return;
|
|
24241
24236
|
}
|
|
24242
24237
|
e ?? !this.Editor.BlockSettings.opened ? (this.Editor.Toolbar.moveAndOpen(), this.Editor.BlockSettings.open()) : this.Editor.BlockSettings.close();
|
|
@@ -24248,7 +24243,7 @@ class c3 extends rt {
|
|
|
24248
24243
|
*/
|
|
24249
24244
|
toggleToolbox(e) {
|
|
24250
24245
|
if (this.Editor.BlockManager.currentBlockIndex === -1) {
|
|
24251
|
-
|
|
24246
|
+
Mn("Could't toggle the Toolbox because there is no block selected ", "warn");
|
|
24252
24247
|
return;
|
|
24253
24248
|
}
|
|
24254
24249
|
e ?? !this.Editor.Toolbar.toolbox.opened ? (this.Editor.Toolbar.moveAndOpen(), this.Editor.Toolbar.toolbox.open()) : this.Editor.Toolbar.toolbox.close();
|
|
@@ -28766,7 +28761,7 @@ class OD extends rt {
|
|
|
28766
28761
|
let r;
|
|
28767
28762
|
if (e.name === t.name && e.mergeable) {
|
|
28768
28763
|
const o = await t.data;
|
|
28769
|
-
if (
|
|
28764
|
+
if ($n(o)) {
|
|
28770
28765
|
console.error("Could not merge Block. Failed to extract original Block data.");
|
|
28771
28766
|
return;
|
|
28772
28767
|
}
|
|
@@ -29759,7 +29754,7 @@ const Qm = class Zm extends rt {
|
|
|
29759
29754
|
*/
|
|
29760
29755
|
async processDataTransfer(e, t = !1) {
|
|
29761
29756
|
const { Tools: r } = this.Editor, o = e.types;
|
|
29762
|
-
if ((o.includes ? o.includes("Files") : o.contains("Files")) &&
|
|
29757
|
+
if ((o.includes ? o.includes("Files") : o.contains("Files")) && !$n(this.toolsFiles)) {
|
|
29763
29758
|
await this.processFiles(e.files);
|
|
29764
29759
|
return;
|
|
29765
29760
|
}
|
|
@@ -29870,7 +29865,7 @@ const Qm = class Zm extends rt {
|
|
|
29870
29865
|
* @param tool - BlockTool object
|
|
29871
29866
|
*/
|
|
29872
29867
|
getPatternsConfig(e) {
|
|
29873
|
-
e.pasteConfig === !1 || !e.pasteConfig.patterns ||
|
|
29868
|
+
e.pasteConfig === !1 || !e.pasteConfig.patterns || $n(e.pasteConfig.patterns) || Object.entries(e.pasteConfig.patterns).forEach(([t, r]) => {
|
|
29874
29869
|
r instanceof RegExp || lt(
|
|
29875
29870
|
`Pattern ${r} for «${e.name}» Tool is skipped because it should be a Regexp instance.`,
|
|
29876
29871
|
"warn"
|
|
@@ -30463,7 +30458,7 @@ class VD extends rt {
|
|
|
30463
30458
|
o.insert();
|
|
30464
30459
|
else {
|
|
30465
30460
|
const i = e.map(({ type: s, data: a, tunes: l, id: u }) => {
|
|
30466
|
-
r.available.has(s) === !1 && (
|
|
30461
|
+
r.available.has(s) === !1 && (Mn(`Tool «${s}» is not found. Check 'tools' property at the Editor.js config.`, "warn"), a = this.composeStubDataForTool(s, a, u), s = r.stubTool);
|
|
30467
30462
|
let d;
|
|
30468
30463
|
try {
|
|
30469
30464
|
d = o.composeBlock({
|
|
@@ -30531,7 +30526,7 @@ class YD extends rt {
|
|
|
30531
30526
|
const i = await Promise.all(o), s = await Wu(i, (a) => t.blockTools.get(a).sanitizeConfig);
|
|
30532
30527
|
return this.makeOutput(s);
|
|
30533
30528
|
} catch (i) {
|
|
30534
|
-
|
|
30529
|
+
Mn("Saving failed due to the Error %o", "error", i);
|
|
30535
30530
|
}
|
|
30536
30531
|
}
|
|
30537
30532
|
/**
|
|
@@ -30568,7 +30563,7 @@ class YD extends rt {
|
|
|
30568
30563
|
id: r,
|
|
30569
30564
|
type: o,
|
|
30570
30565
|
data: i,
|
|
30571
|
-
|
|
30566
|
+
...!$n(s) && {
|
|
30572
30567
|
tunes: s
|
|
30573
30568
|
}
|
|
30574
30569
|
};
|
|
@@ -31264,7 +31259,7 @@ class Vc extends Zu {
|
|
|
31264
31259
|
*/
|
|
31265
31260
|
get toolbox() {
|
|
31266
31261
|
const e = this.constructable[So.Toolbox], t = this.config[Ss.Toolbox];
|
|
31267
|
-
if (
|
|
31262
|
+
if (!$n(e) && t !== !1)
|
|
31268
31263
|
return t ? Array.isArray(e) ? Array.isArray(t) ? t.map((r, o) => {
|
|
31269
31264
|
const i = e[o];
|
|
31270
31265
|
return i ? {
|
|
@@ -31304,7 +31299,7 @@ class Vc extends Zu {
|
|
|
31304
31299
|
}
|
|
31305
31300
|
get sanitizeConfig() {
|
|
31306
31301
|
const e = super.sanitizeConfig, t = this.baseSanitizeConfig;
|
|
31307
|
-
if (
|
|
31302
|
+
if ($n(e))
|
|
31308
31303
|
return t;
|
|
31309
31304
|
const r = {};
|
|
31310
31305
|
for (const o in e)
|
|
@@ -31858,7 +31853,7 @@ class nI extends rt {
|
|
|
31858
31853
|
id: e,
|
|
31859
31854
|
textContent: tI.toString()
|
|
31860
31855
|
});
|
|
31861
|
-
this.config.style &&
|
|
31856
|
+
this.config.style && !$n(this.config.style) && this.config.style.nonce && t.setAttribute("nonce", this.config.style.nonce), ie.prepend(document.head, t);
|
|
31862
31857
|
}
|
|
31863
31858
|
/**
|
|
31864
31859
|
* Adds listeners that should work both in read-only and read-write modes
|
|
@@ -32183,7 +32178,7 @@ class oI {
|
|
|
32183
32178
|
a: !0
|
|
32184
32179
|
}, this.config.hideToolbar = this.config.hideToolbar ? this.config.hideToolbar : !1, this.config.tools = this.config.tools || {}, this.config.i18n = this.config.i18n || {}, this.config.data = this.config.data || { blocks: [] }, this.config.onReady = this.config.onReady || (() => {
|
|
32185
32180
|
}), this.config.onChange = this.config.onChange || (() => {
|
|
32186
|
-
}), this.config.inlineToolbar = this.config.inlineToolbar !== void 0 ? this.config.inlineToolbar : !0, (
|
|
32181
|
+
}), this.config.inlineToolbar = this.config.inlineToolbar !== void 0 ? this.config.inlineToolbar : !0, ($n(this.config.data) || !this.config.data.blocks || this.config.data.blocks.length === 0) && (this.config.data = { blocks: [o] }), this.config.readOnly = this.config.readOnly || !1, (t = this.config.i18n) != null && t.messages && on.setDictionary(this.config.i18n.messages), this.config.i18n.direction = ((r = this.config.i18n) == null ? void 0 : r.direction) || "ltr";
|
|
32187
32182
|
}
|
|
32188
32183
|
/**
|
|
32189
32184
|
* Returns private property
|
|
@@ -36468,6 +36463,7 @@ export {
|
|
|
36468
36463
|
EP as Container,
|
|
36469
36464
|
h6 as Currency,
|
|
36470
36465
|
yp as DYNAMIC_VISIBLE_AREA_PROVIDER_NAME,
|
|
36466
|
+
OS as Datepicker,
|
|
36471
36467
|
Df as DatepickerFilter,
|
|
36472
36468
|
gM as DatepickerFilterChip,
|
|
36473
36469
|
Df as DatepickerFilterView,
|