@namba_one/ui-kit-2 1.0.145 → 1.0.146
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.es.js +103 -98
- package/dist/index.umd.js +12 -12
- 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, On, 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 (On) {
|
|
1928
|
+
this._lastX = On.clientX, this._lastY = On.clientY, hp();
|
|
1929
|
+
for (var e = document.elementFromPoint(On.clientX, On.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(On.clientX, On.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: On.clientX,
|
|
1937
|
+
clientY: On.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, On = 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 = On = 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, An = $.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 = An, 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 An = parseFloat(pn.marginRight);
|
|
3927
|
+
$.style.marginRight = "".concat(An + 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 An = 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, An, !1);
|
|
3969
3969
|
if (K(de))
|
|
3970
3970
|
return !1;
|
|
3971
|
-
if (Ie || O(de) && h(de,
|
|
3971
|
+
if (Ie || O(de) && h(de, An) || m(de, An)) {
|
|
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*\\)?"), Dn = {
|
|
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 = Dn.rgb.exec(n);
|
|
8258
|
+
return t ? { r: t[1], g: t[2], b: t[3] } : (t = Dn.rgba.exec(n), t ? { r: t[1], g: t[2], b: t[3], a: t[4] } : (t = Dn.hsl.exec(n), t ? { h: t[1], s: t[2], l: t[3] } : (t = Dn.hsla.exec(n), t ? { h: t[1], s: t[2], l: t[3], a: t[4] } : (t = Dn.hsv.exec(n), t ? { h: t[1], s: t[2], v: t[3] } : (t = Dn.hsva.exec(n), t ? { h: t[1], s: t[2], v: t[3], a: t[4] } : (t = Dn.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 = Dn.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 = Dn.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 = Dn.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 !!Dn.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 Sn(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,7 +9647,12 @@ 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 +
|
|
9650
|
+
const { innerWidth: l, innerHeight: u } = window, d = a.getBoundingClientRect(), c = s.left + (s.width + Sn(Number(o))) - d.width > 0, h = s.left + d.width + Sn(Number(o)) < l;
|
|
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({
|
|
9651
9656
|
isCanPositionRight: c,
|
|
9652
9657
|
isCanPositionLeft: h,
|
|
9653
9658
|
parentElementRect: s,
|
|
@@ -9715,13 +9720,13 @@ function F2({
|
|
|
9715
9720
|
};
|
|
9716
9721
|
}
|
|
9717
9722
|
function Ip(n, e) {
|
|
9718
|
-
return n.left +
|
|
9723
|
+
return n.left + Sn(Number(e));
|
|
9719
9724
|
}
|
|
9720
9725
|
function Lp(n, e) {
|
|
9721
|
-
return window.innerWidth - n.right +
|
|
9726
|
+
return window.innerWidth - n.right + Sn(Number(e));
|
|
9722
9727
|
}
|
|
9723
9728
|
function bu(n, e, t) {
|
|
9724
|
-
return n.left - (e.width - n.width) / 2 +
|
|
9729
|
+
return n.left - (e.width - n.width) / 2 + Sn(Number(t));
|
|
9725
9730
|
}
|
|
9726
9731
|
function N2({
|
|
9727
9732
|
isCanPositionRight: n,
|
|
@@ -9763,7 +9768,7 @@ function z2({
|
|
|
9763
9768
|
fixedElementRect: o
|
|
9764
9769
|
}) {
|
|
9765
9770
|
let i, s;
|
|
9766
|
-
return n ? (i = r.bottom +
|
|
9771
|
+
return n ? (i = r.bottom + Sn(Number(t)), s = "bottom") : e ? (i = Pp(
|
|
9767
9772
|
r,
|
|
9768
9773
|
o,
|
|
9769
9774
|
t
|
|
@@ -9833,13 +9838,13 @@ function j2({
|
|
|
9833
9838
|
};
|
|
9834
9839
|
}
|
|
9835
9840
|
function Pp(n, e, t) {
|
|
9836
|
-
return n.top - e.height -
|
|
9841
|
+
return n.top - e.height - Sn(Number(t));
|
|
9837
9842
|
}
|
|
9838
9843
|
function V2(n, e) {
|
|
9839
|
-
return n.bottom +
|
|
9844
|
+
return n.bottom + Sn(Number(e));
|
|
9840
9845
|
}
|
|
9841
9846
|
function yu(n, e, t) {
|
|
9842
|
-
return n.top - (e.height - n.height) / 2 +
|
|
9847
|
+
return n.top - (e.height - n.height) / 2 + Sn(Number(t));
|
|
9843
9848
|
}
|
|
9844
9849
|
function Ko() {
|
|
9845
9850
|
const [n, e] = bp(!1), t = uu(), r = U(null), o = U(null), i = R(() => {
|
|
@@ -10351,7 +10356,7 @@ function ct(n, e) {
|
|
|
10351
10356
|
function Pe(n, e) {
|
|
10352
10357
|
return ct(e || n, n);
|
|
10353
10358
|
}
|
|
10354
|
-
function
|
|
10359
|
+
function Mn(n, e, t) {
|
|
10355
10360
|
const r = Pe(n, t == null ? void 0 : t.in);
|
|
10356
10361
|
return isNaN(e) ? ct((t == null ? void 0 : t.in) || n, NaN) : (e && r.setDate(r.getDate() + e), r);
|
|
10357
10362
|
}
|
|
@@ -10378,7 +10383,7 @@ function jp(n, e, t) {
|
|
|
10378
10383
|
hours: a = 0,
|
|
10379
10384
|
minutes: l = 0,
|
|
10380
10385
|
seconds: u = 0
|
|
10381
|
-
} = e, d = Pe(n, t == null ? void 0 : t.in), c = o || r ? Rn(d, o + r * 12) : d, h = s || i ?
|
|
10386
|
+
} = e, d = Pe(n, t == null ? void 0 : t.in), c = o || r ? Rn(d, o + r * 12) : d, h = s || i ? Mn(c, s + i * 7) : c, m = l + a * 60, g = (u + m * 60) * 1e3;
|
|
10382
10387
|
return ct(n, +h + g);
|
|
10383
10388
|
}
|
|
10384
10389
|
function kC(n, e, t) {
|
|
@@ -12582,7 +12587,7 @@ class Wx extends at {
|
|
|
12582
12587
|
function Eu(n, e, t) {
|
|
12583
12588
|
var c, h, m, f;
|
|
12584
12589
|
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;
|
|
12585
|
-
return
|
|
12590
|
+
return Mn(i, d, t);
|
|
12586
12591
|
}
|
|
12587
12592
|
class qx extends at {
|
|
12588
12593
|
constructor() {
|
|
@@ -12769,7 +12774,7 @@ class Kx extends at {
|
|
|
12769
12774
|
}
|
|
12770
12775
|
function Xx(n, e, t) {
|
|
12771
12776
|
const r = Pe(n, t == null ? void 0 : t.in), o = xx(r, t), i = e - o;
|
|
12772
|
-
return
|
|
12777
|
+
return Mn(r, i, t);
|
|
12773
12778
|
}
|
|
12774
12779
|
class Qx extends at {
|
|
12775
12780
|
constructor() {
|
|
@@ -13360,7 +13365,7 @@ function ch(n, e, t) {
|
|
|
13360
13365
|
return +ro(r) == +ro(o);
|
|
13361
13366
|
}
|
|
13362
13367
|
function of(n, e, t) {
|
|
13363
|
-
return
|
|
13368
|
+
return Mn(n, -e, t);
|
|
13364
13369
|
}
|
|
13365
13370
|
function sf(n, e, t) {
|
|
13366
13371
|
const r = Pe(n, t == null ? void 0 : t.in), o = r.getFullYear(), i = r.getDate(), s = ct(n, 0);
|
|
@@ -13589,7 +13594,7 @@ const un = (n, e) => e ? new Date(n.toLocaleString("en-US", { timeZone: e })) :
|
|
|
13589
13594
|
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;
|
|
13590
13595
|
return (+r - +o) / (1e3 * 60 * 60) - i;
|
|
13591
13596
|
};
|
|
13592
|
-
var
|
|
13597
|
+
var In = /* @__PURE__ */ ((n) => (n.month = "month", n.year = "year", n))(In || {}), Ln = /* @__PURE__ */ ((n) => (n.top = "top", n.bottom = "bottom", n))(Ln || {}), 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 || {});
|
|
13593
13598
|
const TE = ["timestamp", "date", "iso"];
|
|
13594
13599
|
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 || {});
|
|
13595
13600
|
function dh(n) {
|
|
@@ -13747,7 +13752,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
13747
13752
|
}, zr = (n, e, t, r) => {
|
|
13748
13753
|
let o = n ? pe(n) : pe();
|
|
13749
13754
|
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);
|
|
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,
|
|
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, Pn = (n) => {
|
|
13751
13756
|
const e = dt(new Date(n), { date: 1 });
|
|
13752
13757
|
return jt(e);
|
|
13753
13758
|
}, ul = (n, e, t) => e && (t || t === 0) ? Object.fromEntries(
|
|
@@ -13837,7 +13842,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
13837
13842
|
}
|
|
13838
13843
|
return !0;
|
|
13839
13844
|
}, 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) => {
|
|
13840
|
-
const t = of(jt(e), n), r =
|
|
13845
|
+
const t = of(jt(e), n), r = Mn(jt(e), n);
|
|
13841
13846
|
return { before: t, after: r };
|
|
13842
13847
|
}, oi = zi({
|
|
13843
13848
|
menuFocused: !1,
|
|
@@ -14927,7 +14932,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
14927
14932
|
emit: d
|
|
14928
14933
|
}) => {
|
|
14929
14934
|
const c = R(() => Ou(s.yearRange, s.locale, s.reverseYears)), h = U([!1]), m = R(() => (T, H) => {
|
|
14930
|
-
const te = dt(
|
|
14935
|
+
const te = dt(Pn(/* @__PURE__ */ new Date()), {
|
|
14931
14936
|
month: u.value(T),
|
|
14932
14937
|
year: l.value(T)
|
|
14933
14938
|
}), ce = H ? Gp(te) : Mi(te);
|
|
@@ -15049,7 +15054,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
15049
15054
|
if (s.value.enabled) {
|
|
15050
15055
|
const le = te();
|
|
15051
15056
|
if (Array.isArray(m.value) && Array.isArray(le)) {
|
|
15052
|
-
const b = C(G, ee, 0) || C(G, ee, 1), Z = hr(
|
|
15057
|
+
const b = C(G, ee, 0) || C(G, ee, 1), Z = hr(Pn(pe()), G, f.value(ee));
|
|
15053
15058
|
return Bi(m.value, B.value, Z) && !b;
|
|
15054
15059
|
}
|
|
15055
15060
|
return !1;
|
|
@@ -15063,8 +15068,8 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
15063
15068
|
bf(f.value(G), l.value.maxDate)
|
|
15064
15069
|
) || 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));
|
|
15065
15070
|
return { active: b, disabled: Z, isBetween: ge, highlighted: Re };
|
|
15066
|
-
})), F = (G, ee) => hr(
|
|
15067
|
-
const le = m.value ? m.value :
|
|
15071
|
+
})), F = (G, ee) => hr(Pn(pe()), G, f.value(ee)), j = (G, ee) => {
|
|
15072
|
+
const le = m.value ? m.value : Pn(/* @__PURE__ */ new Date());
|
|
15068
15073
|
m.value = hr(le, G, f.value(ee)), e("auto-apply"), e("update-flow-step");
|
|
15069
15074
|
}, Y = (G, ee) => {
|
|
15070
15075
|
const le = F(G, ee);
|
|
@@ -15245,13 +15250,13 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
15245
15250
|
Yo(u.value.maxDate)
|
|
15246
15251
|
) || a.value.years.includes(x.value) || !m(x.value) || f(x.value), K = h(x.value) && !B, A = Lu(i.value, x.value);
|
|
15247
15252
|
return { active: B, disabled: O, isBetween: K, highlighted: A };
|
|
15248
|
-
})), S = (x) => Xn(
|
|
15253
|
+
})), S = (x) => Xn(Pn(Mi(/* @__PURE__ */ new Date())), x);
|
|
15249
15254
|
return {
|
|
15250
15255
|
groupedYears: g,
|
|
15251
15256
|
modelValue: r,
|
|
15252
15257
|
focusYear: d,
|
|
15253
15258
|
setHoverValue: (x) => {
|
|
15254
|
-
o.value = Xn(
|
|
15259
|
+
o.value = Xn(Pn(/* @__PURE__ */ new Date()), x);
|
|
15255
15260
|
},
|
|
15256
15261
|
selectYear: (x) => {
|
|
15257
15262
|
var B;
|
|
@@ -16033,16 +16038,16 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16033
16038
|
const w = (L) => ({
|
|
16034
16039
|
get: () => o[L],
|
|
16035
16040
|
set: (G) => {
|
|
16036
|
-
const ee = L ===
|
|
16037
|
-
r("update-month-year", { [L]: G, [ee]: o[ee] }), L ===
|
|
16041
|
+
const ee = L === In.month ? In.year : In.month;
|
|
16042
|
+
r("update-month-year", { [L]: G, [ee]: o[ee] }), L === In.month ? F(!0) : j(!0);
|
|
16038
16043
|
}
|
|
16039
|
-
}), T = R(w(
|
|
16044
|
+
}), T = R(w(In.month)), H = R(w(In.year)), te = R(() => (L) => ({
|
|
16040
16045
|
month: o.month,
|
|
16041
16046
|
year: o.year,
|
|
16042
|
-
items: L ===
|
|
16047
|
+
items: L === In.month ? o.months : o.years,
|
|
16043
16048
|
instance: o.instance,
|
|
16044
16049
|
updateMonthYear: B,
|
|
16045
|
-
toggle: L ===
|
|
16050
|
+
toggle: L === In.month ? F : j
|
|
16046
16051
|
})), ce = R(() => o.months.find((G) => G.value === o.month) || { text: "", value: 0 }), C = R(() => Vo(o.months, (L) => {
|
|
16047
16052
|
const G = o.month === L.value, ee = $i(
|
|
16048
16053
|
L.value,
|
|
@@ -16071,7 +16076,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16071
16076
|
var L, G, ee, le, b, Z;
|
|
16072
16077
|
return [
|
|
16073
16078
|
{
|
|
16074
|
-
type:
|
|
16079
|
+
type: In.month,
|
|
16075
16080
|
index: 1,
|
|
16076
16081
|
toggle: F,
|
|
16077
16082
|
modelValue: T.value,
|
|
@@ -16083,7 +16088,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16083
16088
|
overlayLabel: ((ee = (G = s.value).monthPicker) == null ? void 0 : ee.call(G, !0)) ?? void 0
|
|
16084
16089
|
},
|
|
16085
16090
|
{
|
|
16086
|
-
type:
|
|
16091
|
+
type: In.year,
|
|
16087
16092
|
index: 2,
|
|
16088
16093
|
toggle: j,
|
|
16089
16094
|
modelValue: H.value,
|
|
@@ -16641,10 +16646,10 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16641
16646
|
const se = 6 - Q.length, Se = (de.getDay() + 7 - qe) % 7, Oe = 6 - (Ie.getDay() + 7 - qe) % 7, [or, Hn] = _e(Se, Oe);
|
|
16642
16647
|
for (let Kr = 1; Kr <= se; Kr++)
|
|
16643
16648
|
if (Hn ? !!(Kr % 2) == or : or) {
|
|
16644
|
-
const Tr = Q[0].days[0], ja = Xe(
|
|
16649
|
+
const Tr = Q[0].days[0], ja = Xe(Mn(Tr.value, -7), Je(de));
|
|
16645
16650
|
Q.unshift({ days: ja });
|
|
16646
16651
|
} else {
|
|
16647
|
-
const Tr = Q[Q.length - 1], ja = Tr.days[Tr.days.length - 1], Ov = Xe(
|
|
16652
|
+
const Tr = Q[Q.length - 1], ja = Tr.days[Tr.days.length - 1], Ov = Xe(Mn(ja.value, 1), Je(de));
|
|
16648
16653
|
Q.push({ days: Ov });
|
|
16649
16654
|
}
|
|
16650
16655
|
}
|
|
@@ -16652,7 +16657,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16652
16657
|
}, Xe = (Q, de) => {
|
|
16653
16658
|
const Ie = pe(Q), qe = [];
|
|
16654
16659
|
for (let se = 0; se < 7; se++) {
|
|
16655
|
-
const Se =
|
|
16660
|
+
const Se = Mn(Ie, se), Oe = Je(Se) !== de;
|
|
16656
16661
|
qe.push({
|
|
16657
16662
|
text: n.hideOffsetDates && Oe ? "" : Se.getDate(),
|
|
16658
16663
|
value: Se,
|
|
@@ -16667,7 +16672,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16667
16672
|
if (Ie.push({ days: Kr }), !Ie[Ie.length - 1].days.some(
|
|
16668
16673
|
(Tr) => et(jt(Tr.value), jt(se))
|
|
16669
16674
|
)) {
|
|
16670
|
-
const Tr =
|
|
16675
|
+
const Tr = Mn(Hn, 7);
|
|
16671
16676
|
or(Tr);
|
|
16672
16677
|
}
|
|
16673
16678
|
};
|
|
@@ -16682,7 +16687,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16682
16687
|
}, xe = (Q, de) => {
|
|
16683
16688
|
const Ie = [
|
|
16684
16689
|
pe(Q.value),
|
|
16685
|
-
|
|
16690
|
+
Mn(pe(Q.value), +f.value.autoRange)
|
|
16686
16691
|
];
|
|
16687
16692
|
A(Ie) ? (de && nt(Q.value), o.value = Ie) : e("invalid-date", Q.value);
|
|
16688
16693
|
}, nt = (Q) => {
|
|
@@ -16723,7 +16728,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16723
16728
|
_(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);
|
|
16724
16729
|
const qe = (Ie = n.flow) != null && Ie.length ? n.flow[n.flowStep] : void 0;
|
|
16725
16730
|
!de.fromNav && (qe === Kt.month || qe === Kt.year) && r();
|
|
16726
|
-
},
|
|
16731
|
+
}, An = (Q, de) => {
|
|
16727
16732
|
Tf({
|
|
16728
16733
|
value: Q,
|
|
16729
16734
|
modelValue: l,
|
|
@@ -16760,7 +16765,7 @@ const Ul = (n, e) => n == null ? void 0 : n.querySelector(`[data-dp-element="${e
|
|
|
16760
16765
|
handleArrow: ke,
|
|
16761
16766
|
selectDate: Ae,
|
|
16762
16767
|
updateMonthYear: pn,
|
|
16763
|
-
presetDate:
|
|
16768
|
+
presetDate: An,
|
|
16764
16769
|
selectCurrentDate: En,
|
|
16765
16770
|
updateTime: (Q, de = !0, Ie = !1) => {
|
|
16766
16771
|
z(Q, de, Ie, Er);
|
|
@@ -17575,13 +17580,13 @@ const hS = ({
|
|
|
17575
17580
|
}, T = () => {
|
|
17576
17581
|
const _ = Rt(t);
|
|
17577
17582
|
if (_) {
|
|
17578
|
-
if (s.autoPosition ===
|
|
17579
|
-
if (s.autoPosition ===
|
|
17583
|
+
if (s.autoPosition === Ln.top) return Ln.top;
|
|
17584
|
+
if (s.autoPosition === Ln.bottom) return Ln.bottom;
|
|
17580
17585
|
const { height: F } = u.value, { top: j, height: Y } = _.getBoundingClientRect(), ne = window.innerHeight - j - Y, W = j;
|
|
17581
|
-
return F <= ne ?
|
|
17586
|
+
return F <= ne ? Ln.bottom : F > ne && F <= W ? Ln.top : ne >= W ? Ln.bottom : Ln.top;
|
|
17582
17587
|
}
|
|
17583
|
-
return
|
|
17584
|
-
}, H = (_) => T() ===
|
|
17588
|
+
return Ln.bottom;
|
|
17589
|
+
}, H = (_) => T() === Ln.bottom ? z(_) : I(_), te = () => {
|
|
17585
17590
|
const _ = Rt(t);
|
|
17586
17591
|
if (_)
|
|
17587
17592
|
return s.autoPosition ? H(_) : z(_);
|
|
@@ -17768,7 +17773,7 @@ const hS = ({
|
|
|
17768
17773
|
if (l.value.autoRange || e.weekPicker) {
|
|
17769
17774
|
if (d.value) {
|
|
17770
17775
|
if (e.hideOffsetDates && !b.current) return !1;
|
|
17771
|
-
const Z =
|
|
17776
|
+
const Z = Mn(d.value, +l.value.autoRange), ge = lr(pe(d.value), e.weekStart);
|
|
17772
17777
|
return e.weekPicker ? et(ge[1], pe(b.value)) : et(Z, pe(b.value));
|
|
17773
17778
|
}
|
|
17774
17779
|
return !1;
|
|
@@ -17777,7 +17782,7 @@ const hS = ({
|
|
|
17777
17782
|
}, A = (b) => {
|
|
17778
17783
|
if (l.value.autoRange || e.weekPicker) {
|
|
17779
17784
|
if (d.value) {
|
|
17780
|
-
const Z =
|
|
17785
|
+
const Z = Mn(d.value, +l.value.autoRange);
|
|
17781
17786
|
if (e.hideOffsetDates && !b.current) return !1;
|
|
17782
17787
|
const ge = lr(pe(d.value), e.weekStart);
|
|
17783
17788
|
return e.weekPicker ? Ot(b.value, ge[0]) && Mt(b.value, ge[1]) : Ot(b.value, d.value) && Mt(b.value, Z);
|
|
@@ -17944,17 +17949,17 @@ const hS = ({
|
|
|
17944
17949
|
}, H = (C) => {
|
|
17945
17950
|
if (!n.monthPicker) return !0;
|
|
17946
17951
|
let k = !0;
|
|
17947
|
-
const _ = pe(
|
|
17952
|
+
const _ = pe(Pn(C));
|
|
17948
17953
|
if (r.value.minDate && r.value.maxDate) {
|
|
17949
|
-
const F = pe(
|
|
17954
|
+
const F = pe(Pn(r.value.minDate)), j = pe(Pn(r.value.maxDate));
|
|
17950
17955
|
return Ot(_, F) && Mt(_, j) || et(_, F) || et(_, j);
|
|
17951
17956
|
}
|
|
17952
17957
|
if (r.value.minDate) {
|
|
17953
|
-
const F = pe(
|
|
17958
|
+
const F = pe(Pn(r.value.minDate));
|
|
17954
17959
|
k = Ot(_, F) || et(_, F);
|
|
17955
17960
|
}
|
|
17956
17961
|
if (r.value.maxDate) {
|
|
17957
|
-
const F = pe(
|
|
17962
|
+
const F = pe(Pn(r.value.maxDate));
|
|
17958
17963
|
k = Mt(_, F) || et(_, F);
|
|
17959
17964
|
}
|
|
17960
17965
|
return k;
|
|
@@ -18369,7 +18374,7 @@ const hS = ({
|
|
|
18369
18374
|
o.autoApply && D(le.value) && Z(), Bt();
|
|
18370
18375
|
}, Ae = () => s.value ? $() : ot(), pn = (se) => {
|
|
18371
18376
|
le.value = se;
|
|
18372
|
-
},
|
|
18377
|
+
}, An = () => {
|
|
18373
18378
|
I.value.enabled && (h.value = !0, ge()), r("focus");
|
|
18374
18379
|
}, En = () => {
|
|
18375
18380
|
if (I.value.enabled && (h.value = !1, b(o.modelValue), f.value)) {
|
|
@@ -18432,7 +18437,7 @@ const hS = ({
|
|
|
18432
18437
|
onSelectDate: xe,
|
|
18433
18438
|
onToggle: Ae,
|
|
18434
18439
|
onClose: $,
|
|
18435
|
-
onFocus:
|
|
18440
|
+
onFocus: An,
|
|
18436
18441
|
onBlur: En,
|
|
18437
18442
|
onRealBlur: Se[1] || (Se[1] = (Oe) => h.value = !1),
|
|
18438
18443
|
onTextInput: Se[2] || (Se[2] = (Oe) => se.$emit("text-input", Oe))
|
|
@@ -21288,7 +21293,7 @@ Ki.logLevel = "VERBOSE";
|
|
|
21288
21293
|
function kA(n) {
|
|
21289
21294
|
Ki.logLevel = n;
|
|
21290
21295
|
}
|
|
21291
|
-
const lt = Ki.bind(window, !1),
|
|
21296
|
+
const lt = Ki.bind(window, !1), $n = Ki.bind(window, !0);
|
|
21292
21297
|
function ho(n) {
|
|
21293
21298
|
return Object.prototype.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
|
|
21294
21299
|
}
|
|
@@ -21310,7 +21315,7 @@ function Eh(n) {
|
|
|
21310
21315
|
function Th(n) {
|
|
21311
21316
|
return ho(n) === "undefined";
|
|
21312
21317
|
}
|
|
21313
|
-
function
|
|
21318
|
+
function Bn(n) {
|
|
21314
21319
|
return n ? Object.keys(n).length === 0 && n.constructor === Object : !0;
|
|
21315
21320
|
}
|
|
21316
21321
|
function Gf(n) {
|
|
@@ -21414,7 +21419,7 @@ function BA(n = "") {
|
|
|
21414
21419
|
}
|
|
21415
21420
|
function Zl(n, e, t) {
|
|
21416
21421
|
const r = `«${e}» is deprecated and will be removed in the next major release. Please use the «${t}» instead.`;
|
|
21417
|
-
n &&
|
|
21422
|
+
n && $n(r, "warn");
|
|
21418
21423
|
}
|
|
21419
21424
|
function Zo(n, e, t) {
|
|
21420
21425
|
const r = t.value ? "value" : "get", o = t[r], i = `#${e}Cache`;
|
|
@@ -22023,7 +22028,7 @@ let Xi = class {
|
|
|
22023
22028
|
* @param data - subscribers get this data when they were fired
|
|
22024
22029
|
*/
|
|
22025
22030
|
emit(e, t) {
|
|
22026
|
-
|
|
22031
|
+
Bn(this.subscribers) || !this.subscribers[e] || this.subscribers[e].reduce((r, o) => {
|
|
22027
22032
|
const i = o(r);
|
|
22028
22033
|
return i !== void 0 ? i : r;
|
|
22029
22034
|
}, t);
|
|
@@ -22658,7 +22663,7 @@ async function sm(n, e) {
|
|
|
22658
22663
|
if (!tu(i, "import") || i.toolbox === void 0)
|
|
22659
22664
|
return o;
|
|
22660
22665
|
const s = i.toolbox.filter((a) => {
|
|
22661
|
-
if (
|
|
22666
|
+
if (Bn(a) || a.icon === void 0)
|
|
22662
22667
|
return !1;
|
|
22663
22668
|
if (a.data !== void 0) {
|
|
22664
22669
|
if (im(a.data, t))
|
|
@@ -22799,7 +22804,7 @@ let fr = class Br extends Xi {
|
|
|
22799
22804
|
* @returns {object}
|
|
22800
22805
|
*/
|
|
22801
22806
|
get data() {
|
|
22802
|
-
return this.save().then((e) => e &&
|
|
22807
|
+
return this.save().then((e) => e && !Bn(e.data) ? e.data : {});
|
|
22803
22808
|
}
|
|
22804
22809
|
/**
|
|
22805
22810
|
* Returns tool's sanitizer config
|
|
@@ -23233,7 +23238,7 @@ class zA extends rt {
|
|
|
23233
23238
|
getBlockIndex(e) {
|
|
23234
23239
|
const t = this.Editor.BlockManager.getBlockById(e);
|
|
23235
23240
|
if (!t) {
|
|
23236
|
-
|
|
23241
|
+
$n("There is no block with id `" + e + "`", "warn");
|
|
23237
23242
|
return;
|
|
23238
23243
|
}
|
|
23239
23244
|
return this.Editor.BlockManager.getBlockIndex(t);
|
|
@@ -23246,7 +23251,7 @@ class zA extends rt {
|
|
|
23246
23251
|
getBlockByIndex(e) {
|
|
23247
23252
|
const t = this.Editor.BlockManager.getBlockByIndex(e);
|
|
23248
23253
|
if (t === void 0) {
|
|
23249
|
-
|
|
23254
|
+
$n("There is no block at index `" + e + "`", "warn");
|
|
23250
23255
|
return;
|
|
23251
23256
|
}
|
|
23252
23257
|
return new ar(t);
|
|
@@ -23258,7 +23263,7 @@ class zA extends rt {
|
|
|
23258
23263
|
*/
|
|
23259
23264
|
getById(e) {
|
|
23260
23265
|
const t = this.Editor.BlockManager.getBlockById(e);
|
|
23261
|
-
return t === void 0 ? (
|
|
23266
|
+
return t === void 0 ? ($n("There is no block with id `" + e + "`", "warn"), null) : new ar(t);
|
|
23262
23267
|
}
|
|
23263
23268
|
/**
|
|
23264
23269
|
* Get Block API object by any child html element
|
|
@@ -23268,7 +23273,7 @@ class zA extends rt {
|
|
|
23268
23273
|
getBlockByElement(e) {
|
|
23269
23274
|
const t = this.Editor.BlockManager.getBlock(e);
|
|
23270
23275
|
if (t === void 0) {
|
|
23271
|
-
|
|
23276
|
+
$n("There is no block corresponding to element `" + e + "`", "warn");
|
|
23272
23277
|
return;
|
|
23273
23278
|
}
|
|
23274
23279
|
return new ar(t);
|
|
@@ -23305,7 +23310,7 @@ class zA extends rt {
|
|
|
23305
23310
|
const t = this.Editor.BlockManager.getBlockByIndex(e);
|
|
23306
23311
|
this.Editor.BlockManager.removeBlock(t);
|
|
23307
23312
|
} catch (t) {
|
|
23308
|
-
|
|
23313
|
+
$n(t, "warn");
|
|
23309
23314
|
return;
|
|
23310
23315
|
}
|
|
23311
23316
|
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();
|
|
@@ -23458,7 +23463,7 @@ let YA = class am extends rt {
|
|
|
23458
23463
|
get methods() {
|
|
23459
23464
|
return {
|
|
23460
23465
|
t: () => {
|
|
23461
|
-
|
|
23466
|
+
$n("I18n.t() method can be accessed only from Tools", "warn");
|
|
23462
23467
|
}
|
|
23463
23468
|
};
|
|
23464
23469
|
}
|
|
@@ -24047,7 +24052,7 @@ const e3 = /* @__PURE__ */ xa(JA);
|
|
|
24047
24052
|
function Wu(n, e) {
|
|
24048
24053
|
return n.map((t) => {
|
|
24049
24054
|
const r = xt(e) ? e(t.tool) : e;
|
|
24050
|
-
return
|
|
24055
|
+
return Bn(r) || (t.data = qu(t.data, r)), t;
|
|
24051
24056
|
});
|
|
24052
24057
|
}
|
|
24053
24058
|
function Qn(n, e = {}) {
|
|
@@ -24118,7 +24123,7 @@ class s3 extends rt {
|
|
|
24118
24123
|
*/
|
|
24119
24124
|
save() {
|
|
24120
24125
|
const e = "Editor's content can not be saved in read-only mode";
|
|
24121
|
-
return this.Editor.ReadOnly.isEnabled ? (
|
|
24126
|
+
return this.Editor.ReadOnly.isEnabled ? ($n(e, "warn"), Promise.reject(new Error(e))) : this.Editor.Saver.save();
|
|
24122
24127
|
}
|
|
24123
24128
|
}
|
|
24124
24129
|
class a3 extends rt {
|
|
@@ -24231,7 +24236,7 @@ class c3 extends rt {
|
|
|
24231
24236
|
*/
|
|
24232
24237
|
toggleBlockSettings(e) {
|
|
24233
24238
|
if (this.Editor.BlockManager.currentBlockIndex === -1) {
|
|
24234
|
-
|
|
24239
|
+
$n("Could't toggle the Toolbar because there is no block selected ", "warn");
|
|
24235
24240
|
return;
|
|
24236
24241
|
}
|
|
24237
24242
|
e ?? !this.Editor.BlockSettings.opened ? (this.Editor.Toolbar.moveAndOpen(), this.Editor.BlockSettings.open()) : this.Editor.BlockSettings.close();
|
|
@@ -24243,7 +24248,7 @@ class c3 extends rt {
|
|
|
24243
24248
|
*/
|
|
24244
24249
|
toggleToolbox(e) {
|
|
24245
24250
|
if (this.Editor.BlockManager.currentBlockIndex === -1) {
|
|
24246
|
-
|
|
24251
|
+
$n("Could't toggle the Toolbox because there is no block selected ", "warn");
|
|
24247
24252
|
return;
|
|
24248
24253
|
}
|
|
24249
24254
|
e ?? !this.Editor.Toolbar.toolbox.opened ? (this.Editor.Toolbar.moveAndOpen(), this.Editor.Toolbar.toolbox.open()) : this.Editor.Toolbar.toolbox.close();
|
|
@@ -28761,7 +28766,7 @@ class OD extends rt {
|
|
|
28761
28766
|
let r;
|
|
28762
28767
|
if (e.name === t.name && e.mergeable) {
|
|
28763
28768
|
const o = await t.data;
|
|
28764
|
-
if (
|
|
28769
|
+
if (Bn(o)) {
|
|
28765
28770
|
console.error("Could not merge Block. Failed to extract original Block data.");
|
|
28766
28771
|
return;
|
|
28767
28772
|
}
|
|
@@ -29754,7 +29759,7 @@ const Qm = class Zm extends rt {
|
|
|
29754
29759
|
*/
|
|
29755
29760
|
async processDataTransfer(e, t = !1) {
|
|
29756
29761
|
const { Tools: r } = this.Editor, o = e.types;
|
|
29757
|
-
if ((o.includes ? o.includes("Files") : o.contains("Files")) &&
|
|
29762
|
+
if ((o.includes ? o.includes("Files") : o.contains("Files")) && !Bn(this.toolsFiles)) {
|
|
29758
29763
|
await this.processFiles(e.files);
|
|
29759
29764
|
return;
|
|
29760
29765
|
}
|
|
@@ -29865,7 +29870,7 @@ const Qm = class Zm extends rt {
|
|
|
29865
29870
|
* @param tool - BlockTool object
|
|
29866
29871
|
*/
|
|
29867
29872
|
getPatternsConfig(e) {
|
|
29868
|
-
e.pasteConfig === !1 || !e.pasteConfig.patterns ||
|
|
29873
|
+
e.pasteConfig === !1 || !e.pasteConfig.patterns || Bn(e.pasteConfig.patterns) || Object.entries(e.pasteConfig.patterns).forEach(([t, r]) => {
|
|
29869
29874
|
r instanceof RegExp || lt(
|
|
29870
29875
|
`Pattern ${r} for «${e.name}» Tool is skipped because it should be a Regexp instance.`,
|
|
29871
29876
|
"warn"
|
|
@@ -30458,7 +30463,7 @@ class VD extends rt {
|
|
|
30458
30463
|
o.insert();
|
|
30459
30464
|
else {
|
|
30460
30465
|
const i = e.map(({ type: s, data: a, tunes: l, id: u }) => {
|
|
30461
|
-
r.available.has(s) === !1 && (
|
|
30466
|
+
r.available.has(s) === !1 && ($n(`Tool «${s}» is not found. Check 'tools' property at the Editor.js config.`, "warn"), a = this.composeStubDataForTool(s, a, u), s = r.stubTool);
|
|
30462
30467
|
let d;
|
|
30463
30468
|
try {
|
|
30464
30469
|
d = o.composeBlock({
|
|
@@ -30526,7 +30531,7 @@ class YD extends rt {
|
|
|
30526
30531
|
const i = await Promise.all(o), s = await Wu(i, (a) => t.blockTools.get(a).sanitizeConfig);
|
|
30527
30532
|
return this.makeOutput(s);
|
|
30528
30533
|
} catch (i) {
|
|
30529
|
-
|
|
30534
|
+
$n("Saving failed due to the Error %o", "error", i);
|
|
30530
30535
|
}
|
|
30531
30536
|
}
|
|
30532
30537
|
/**
|
|
@@ -30563,7 +30568,7 @@ class YD extends rt {
|
|
|
30563
30568
|
id: r,
|
|
30564
30569
|
type: o,
|
|
30565
30570
|
data: i,
|
|
30566
|
-
|
|
30571
|
+
...!Bn(s) && {
|
|
30567
30572
|
tunes: s
|
|
30568
30573
|
}
|
|
30569
30574
|
};
|
|
@@ -31259,7 +31264,7 @@ class Vc extends Zu {
|
|
|
31259
31264
|
*/
|
|
31260
31265
|
get toolbox() {
|
|
31261
31266
|
const e = this.constructable[So.Toolbox], t = this.config[Ss.Toolbox];
|
|
31262
|
-
if (
|
|
31267
|
+
if (!Bn(e) && t !== !1)
|
|
31263
31268
|
return t ? Array.isArray(e) ? Array.isArray(t) ? t.map((r, o) => {
|
|
31264
31269
|
const i = e[o];
|
|
31265
31270
|
return i ? {
|
|
@@ -31299,7 +31304,7 @@ class Vc extends Zu {
|
|
|
31299
31304
|
}
|
|
31300
31305
|
get sanitizeConfig() {
|
|
31301
31306
|
const e = super.sanitizeConfig, t = this.baseSanitizeConfig;
|
|
31302
|
-
if (
|
|
31307
|
+
if (Bn(e))
|
|
31303
31308
|
return t;
|
|
31304
31309
|
const r = {};
|
|
31305
31310
|
for (const o in e)
|
|
@@ -31853,7 +31858,7 @@ class nI extends rt {
|
|
|
31853
31858
|
id: e,
|
|
31854
31859
|
textContent: tI.toString()
|
|
31855
31860
|
});
|
|
31856
|
-
this.config.style &&
|
|
31861
|
+
this.config.style && !Bn(this.config.style) && this.config.style.nonce && t.setAttribute("nonce", this.config.style.nonce), ie.prepend(document.head, t);
|
|
31857
31862
|
}
|
|
31858
31863
|
/**
|
|
31859
31864
|
* Adds listeners that should work both in read-only and read-write modes
|
|
@@ -32178,7 +32183,7 @@ class oI {
|
|
|
32178
32183
|
a: !0
|
|
32179
32184
|
}, 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 || (() => {
|
|
32180
32185
|
}), this.config.onChange = this.config.onChange || (() => {
|
|
32181
|
-
}), this.config.inlineToolbar = this.config.inlineToolbar !== void 0 ? this.config.inlineToolbar : !0, (
|
|
32186
|
+
}), this.config.inlineToolbar = this.config.inlineToolbar !== void 0 ? this.config.inlineToolbar : !0, (Bn(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";
|
|
32182
32187
|
}
|
|
32183
32188
|
/**
|
|
32184
32189
|
* Returns private property
|