@commercelayer/app-elements 6.0.0 → 6.0.1
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/{InputDateComponent-DeKe0ONv.js → InputDateComponent-CRYU-ypz.js} +83 -83
- package/dist/{RuleEngineComponent-C1DXm3EO.js → RuleEngineComponent-CtAd-_XC.js} +17 -18
- package/dist/{en-DdkLpGfg.js → en-DZFYYpbl.js} +1 -0
- package/dist/hooks/useViewJsonOverlay.d.ts +11 -0
- package/dist/{it-4Qxbs7VI.js → it-B_kKLza9.js} +1 -0
- package/dist/locales/en.d.ts +1 -0
- package/dist/{main-BANV9Udl.js → main-os-TPFjB.js} +8492 -7574
- package/dist/main.d.ts +1 -0
- package/dist/main.js +11 -10
- package/dist/{parseISO-8P5gMU86.js → parseISO-B-vBXvVj.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/tailwind.global.css +24 -1
- package/dist/ui/atoms/Tooltip.d.ts +5 -0
- package/dist/ui/forms/InputCheckboxGroup/InputCheckboxGroupItem.d.ts +2 -1
- package/dist/ui/internals/Overlay.d.ts +21 -6
- package/package.json +1 -1
- package/dist/CodeEditorComponent-9BjmYH9v.js +0 -720
- package/dist/fetchCoreResourcesSuggestions-DLZhtrDX.js +0 -124
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { c as X, t as _, m as fr, a as hr,
|
|
2
|
+
import { c as X, t as _, m as fr, a as hr, x as he, y as fe, z as dt, A as We, E as mr, F as Ur, G as Vr, H as rt, J as vr, K as qr, L as Dr, M as gr, N as jr, O as $r, P as Lt, Q as Gr, R as zr, S as Ft, T as Xr, U as Re, V as Zr, j as te, W as z, X as Pe, Y as be, o as wt, Z as xt, _ as yr, $ as Et, a0 as wr, a1 as Jr, a2 as xe, a3 as At, a4 as en, a5 as tn, a6 as rn, a7 as nn, a8 as nt, a9 as an, w as on, v as sn, aa as ln, ab as cn, ac as un } from "./main-os-TPFjB.js";
|
|
3
3
|
import * as b from "react";
|
|
4
4
|
import f, { useLayoutEffect as br, useEffect as Pt, cloneElement as _r, createRef as Me, Component as $, useRef as bt, useCallback as dn, createElement as pn, forwardRef as fn, useMemo as hn } from "react";
|
|
5
5
|
import * as mn from "react-dom";
|
|
6
6
|
import vn from "react-dom";
|
|
7
|
-
import { p as Dn } from "./parseISO-
|
|
7
|
+
import { p as Dn } from "./parseISO-B-vBXvVj.js";
|
|
8
8
|
function kr(o, r, t) {
|
|
9
9
|
return X(o, +_(o) + r);
|
|
10
10
|
}
|
|
@@ -387,7 +387,7 @@ class Nn extends O {
|
|
|
387
387
|
return r.setFullYear(a, 0, 1), r.setHours(0, 0, 0, 0), r;
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
class
|
|
390
|
+
class Yn extends O {
|
|
391
391
|
priority = 130;
|
|
392
392
|
parse(r, t, e) {
|
|
393
393
|
const n = (a) => ({
|
|
@@ -443,7 +443,7 @@ class In extends O {
|
|
|
443
443
|
"T"
|
|
444
444
|
];
|
|
445
445
|
}
|
|
446
|
-
class
|
|
446
|
+
class In extends O {
|
|
447
447
|
priority = 130;
|
|
448
448
|
parse(r, t) {
|
|
449
449
|
return it(t === "R" ? 4 : t.length, r);
|
|
@@ -1516,8 +1516,8 @@ class pa extends O {
|
|
|
1516
1516
|
const fa = {
|
|
1517
1517
|
G: new On(),
|
|
1518
1518
|
y: new Nn(),
|
|
1519
|
-
Y: new
|
|
1520
|
-
R: new
|
|
1519
|
+
Y: new Yn(),
|
|
1520
|
+
R: new In(),
|
|
1521
1521
|
u: new Rn(),
|
|
1522
1522
|
Q: new Ln(),
|
|
1523
1523
|
q: new Fn(),
|
|
@@ -1568,7 +1568,7 @@ function wa(o, r, t, e) {
|
|
|
1568
1568
|
const { incompatibleTokens: k } = w;
|
|
1569
1569
|
if (Array.isArray(k)) {
|
|
1570
1570
|
const N = p.find(
|
|
1571
|
-
(
|
|
1571
|
+
(Y) => k.includes(Y.token) || Y.token === D
|
|
1572
1572
|
);
|
|
1573
1573
|
if (N)
|
|
1574
1574
|
throw new RangeError(
|
|
@@ -1816,18 +1816,18 @@ function Sa(o) {
|
|
|
1816
1816
|
}), [p, m] = b.useState(e);
|
|
1817
1817
|
lt(p, e) || m(e);
|
|
1818
1818
|
const [v, g] = b.useState(null), [h, D] = b.useState(null), w = b.useCallback((L) => {
|
|
1819
|
-
L !==
|
|
1819
|
+
L !== Y.current && (Y.current = L, g(L));
|
|
1820
1820
|
}, []), k = b.useCallback((L) => {
|
|
1821
1821
|
L !== x.current && (x.current = L, D(L));
|
|
1822
|
-
}, []), C = a || v, N = s || h,
|
|
1823
|
-
if (!
|
|
1822
|
+
}, []), C = a || v, N = s || h, Y = b.useRef(null), x = b.useRef(null), E = b.useRef(c), R = l != null, W = ht(l), B = ht(n), K = ht(u), j = b.useCallback(() => {
|
|
1823
|
+
if (!Y.current || !x.current)
|
|
1824
1824
|
return;
|
|
1825
1825
|
const L = {
|
|
1826
1826
|
placement: r,
|
|
1827
1827
|
strategy: t,
|
|
1828
1828
|
middleware: p
|
|
1829
1829
|
};
|
|
1830
|
-
B.current && (L.platform = B.current), Xr(
|
|
1830
|
+
B.current && (L.platform = B.current), Xr(Y.current, x.current, L).then((se) => {
|
|
1831
1831
|
const me = {
|
|
1832
1832
|
...se,
|
|
1833
1833
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -1851,14 +1851,14 @@ function Sa(o) {
|
|
|
1851
1851
|
Je(() => (ae.current = !0, () => {
|
|
1852
1852
|
ae.current = !1;
|
|
1853
1853
|
}), []), Je(() => {
|
|
1854
|
-
if (C && (
|
|
1854
|
+
if (C && (Y.current = C), N && (x.current = N), C && N) {
|
|
1855
1855
|
if (W.current)
|
|
1856
1856
|
return W.current(C, N, j);
|
|
1857
1857
|
j();
|
|
1858
1858
|
}
|
|
1859
1859
|
}, [C, N, j, W, R]);
|
|
1860
1860
|
const U = b.useMemo(() => ({
|
|
1861
|
-
reference:
|
|
1861
|
+
reference: Y,
|
|
1862
1862
|
floating: x,
|
|
1863
1863
|
setReference: w,
|
|
1864
1864
|
setFloating: k
|
|
@@ -1924,10 +1924,10 @@ const xa = (o) => {
|
|
|
1924
1924
|
}), Ta = (o, r) => ({
|
|
1925
1925
|
...xa(o),
|
|
1926
1926
|
options: [o, r]
|
|
1927
|
-
}),
|
|
1927
|
+
}), Yr = {
|
|
1928
1928
|
...b
|
|
1929
|
-
}, Oa =
|
|
1930
|
-
function
|
|
1929
|
+
}, Oa = Yr.useInsertionEffect, Na = Oa || ((o) => o());
|
|
1930
|
+
function Ya(o) {
|
|
1931
1931
|
const r = b.useRef(() => {
|
|
1932
1932
|
if (process.env.NODE_ENV !== "production")
|
|
1933
1933
|
throw new Error("Cannot call an event handler while rendering.");
|
|
@@ -1941,11 +1941,11 @@ function Ia(o) {
|
|
|
1941
1941
|
}, []);
|
|
1942
1942
|
}
|
|
1943
1943
|
var ct = typeof document < "u" ? br : Pt;
|
|
1944
|
-
let jt = !1,
|
|
1944
|
+
let jt = !1, Ia = 0;
|
|
1945
1945
|
const $t = () => (
|
|
1946
1946
|
// Ensure the id is unique with multiple independent versions of Floating UI
|
|
1947
1947
|
// on <React 18
|
|
1948
|
-
"floating-ui-" + Math.random().toString(36).slice(2, 6) +
|
|
1948
|
+
"floating-ui-" + Math.random().toString(36).slice(2, 6) + Ia++
|
|
1949
1949
|
);
|
|
1950
1950
|
function Ra() {
|
|
1951
1951
|
const [o, r] = b.useState(() => jt ? $t() : void 0);
|
|
@@ -1955,7 +1955,7 @@ function Ra() {
|
|
|
1955
1955
|
jt = !0;
|
|
1956
1956
|
}, []), o;
|
|
1957
1957
|
}
|
|
1958
|
-
const La =
|
|
1958
|
+
const La = Yr.useId, Ir = La || Ra;
|
|
1959
1959
|
let Be;
|
|
1960
1960
|
process.env.NODE_ENV !== "production" && (Be = /* @__PURE__ */ new Set());
|
|
1961
1961
|
function Fa() {
|
|
@@ -2002,15 +2002,15 @@ const Ha = /* @__PURE__ */ b.forwardRef(function(r, t) {
|
|
|
2002
2002
|
...h
|
|
2003
2003
|
} = r;
|
|
2004
2004
|
process.env.NODE_ENV !== "production" && (t || Fa("The `ref` prop is required for `FloatingArrow`."));
|
|
2005
|
-
const D =
|
|
2005
|
+
const D = Ir(), [w, k] = b.useState(!1);
|
|
2006
2006
|
if (ct(() => {
|
|
2007
2007
|
if (!n) return;
|
|
2008
2008
|
Zr(n).direction === "rtl" && k(!0);
|
|
2009
2009
|
}, [n]), !n)
|
|
2010
2010
|
return null;
|
|
2011
|
-
const [C, N] = e.split("-"),
|
|
2011
|
+
const [C, N] = e.split("-"), Y = C === "top" || C === "bottom";
|
|
2012
2012
|
let x = d;
|
|
2013
|
-
(
|
|
2013
|
+
(Y && s != null && s.x || !Y && s != null && s.y) && (x = null);
|
|
2014
2014
|
const E = c * 2, R = E / 2, W = i / 2 * (u / -8 + 1), B = l / 2 * u / 4, K = !!m, j = x && N === "end" ? "bottom" : "top";
|
|
2015
2015
|
let ae = x && N === "end" ? "right" : "left";
|
|
2016
2016
|
x && w && (ae = N === "end" ? "left" : "right");
|
|
@@ -2032,7 +2032,7 @@ const Ha = /* @__PURE__ */ b.forwardRef(function(r, t) {
|
|
|
2032
2032
|
pointerEvents: "none",
|
|
2033
2033
|
[ae]: U,
|
|
2034
2034
|
[j]: S,
|
|
2035
|
-
[C]:
|
|
2035
|
+
[C]: Y || K ? "100%" : "calc(100% - " + E / 2 + "px)",
|
|
2036
2036
|
transform: [L, v].filter((se) => !!se).join(" "),
|
|
2037
2037
|
...g
|
|
2038
2038
|
},
|
|
@@ -2081,12 +2081,12 @@ function Va(o) {
|
|
|
2081
2081
|
open: r = !1,
|
|
2082
2082
|
onOpenChange: t,
|
|
2083
2083
|
elements: e
|
|
2084
|
-
} = o, n =
|
|
2084
|
+
} = o, n = Ir(), a = b.useRef({}), [s] = b.useState(() => Wa()), i = Ka() != null;
|
|
2085
2085
|
if (process.env.NODE_ENV !== "production") {
|
|
2086
2086
|
const m = e.reference;
|
|
2087
2087
|
m && !Re(m) && Aa("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
2088
2088
|
}
|
|
2089
|
-
const [l, u] = b.useState(e.reference), c =
|
|
2089
|
+
const [l, u] = b.useState(e.reference), c = Ya((m, v, g) => {
|
|
2090
2090
|
a.current.openEvent = m ? v : void 0, s.emit("openchange", {
|
|
2091
2091
|
open: m,
|
|
2092
2092
|
event: v,
|
|
@@ -2237,15 +2237,15 @@ function Rr() {
|
|
|
2237
2237
|
return o;
|
|
2238
2238
|
}
|
|
2239
2239
|
var Ke = 12;
|
|
2240
|
-
function
|
|
2240
|
+
function I(o) {
|
|
2241
2241
|
if (o == null)
|
|
2242
2242
|
return /* @__PURE__ */ new Date();
|
|
2243
2243
|
var r = typeof o == "string" ? Dn(o) : _(o);
|
|
2244
2244
|
return ft(r) ? r : /* @__PURE__ */ new Date();
|
|
2245
2245
|
}
|
|
2246
2246
|
function mt(o, r, t, e, n) {
|
|
2247
|
-
n === void 0 && (n =
|
|
2248
|
-
for (var a =
|
|
2247
|
+
n === void 0 && (n = I());
|
|
2248
|
+
for (var a = Ye(t) || Ye(Yt()), s = Array.isArray(r) ? r : [r], i = 0, l = s; i < l.length; i++) {
|
|
2249
2249
|
var u = l[i], c = wa(o, u, n, {
|
|
2250
2250
|
locale: a
|
|
2251
2251
|
});
|
|
@@ -2263,8 +2263,8 @@ function A(o, r, t) {
|
|
|
2263
2263
|
useAdditionalWeekYearTokens: !0,
|
|
2264
2264
|
useAdditionalDayOfYearTokens: !0
|
|
2265
2265
|
});
|
|
2266
|
-
var e = t ?
|
|
2267
|
-
return t && !e && console.warn('A locale object was not found for the provided string ["'.concat(t, '"].')), e = e ||
|
|
2266
|
+
var e = t ? Ye(t) : void 0;
|
|
2267
|
+
return t && !e && console.warn('A locale object was not found for the provided string ["'.concat(t, '"].')), e = e || Ye(Yt()), At(o, r, {
|
|
2268
2268
|
locale: e,
|
|
2269
2269
|
useAdditionalWeekYearTokens: !0,
|
|
2270
2270
|
useAdditionalDayOfYearTokens: !0
|
|
@@ -2308,7 +2308,7 @@ function et(o) {
|
|
|
2308
2308
|
return xt(o);
|
|
2309
2309
|
}
|
|
2310
2310
|
function ke(o, r, t) {
|
|
2311
|
-
var e =
|
|
2311
|
+
var e = Ye(r || Yt());
|
|
2312
2312
|
return rt(o, {
|
|
2313
2313
|
locale: e,
|
|
2314
2314
|
weekStartsOn: t
|
|
@@ -2324,7 +2324,7 @@ function Gt(o) {
|
|
|
2324
2324
|
return kt(o);
|
|
2325
2325
|
}
|
|
2326
2326
|
function zt() {
|
|
2327
|
-
return xt(
|
|
2327
|
+
return xt(I());
|
|
2328
2328
|
}
|
|
2329
2329
|
function Xt(o) {
|
|
2330
2330
|
return yr(o);
|
|
@@ -2359,11 +2359,11 @@ function Ae(o, r, t) {
|
|
|
2359
2359
|
}
|
|
2360
2360
|
return e;
|
|
2361
2361
|
}
|
|
2362
|
-
function
|
|
2362
|
+
function Yt() {
|
|
2363
2363
|
var o = Rr();
|
|
2364
2364
|
return o.__localeId__;
|
|
2365
2365
|
}
|
|
2366
|
-
function
|
|
2366
|
+
function Ye(o) {
|
|
2367
2367
|
if (typeof o == "string") {
|
|
2368
2368
|
var r = Rr();
|
|
2369
2369
|
return r.__localeData__ ? r.__localeData__[o] : void 0;
|
|
@@ -2379,14 +2379,14 @@ function ro(o, r) {
|
|
|
2379
2379
|
function no(o, r) {
|
|
2380
2380
|
return A(o, "EEE", r);
|
|
2381
2381
|
}
|
|
2382
|
-
function
|
|
2383
|
-
return A(re(
|
|
2382
|
+
function It(o, r) {
|
|
2383
|
+
return A(re(I(), o), "LLLL", r);
|
|
2384
2384
|
}
|
|
2385
2385
|
function Fr(o, r) {
|
|
2386
|
-
return A(re(
|
|
2386
|
+
return A(re(I(), o), "LLL", r);
|
|
2387
2387
|
}
|
|
2388
2388
|
function ao(o, r) {
|
|
2389
|
-
return A(Te(
|
|
2389
|
+
return A(Te(I(), o), "QQQ", r);
|
|
2390
2390
|
}
|
|
2391
2391
|
function ne(o, r) {
|
|
2392
2392
|
var t = r === void 0 ? {} : r, e = t.minDate, n = t.maxDate, a = t.excludeDates, s = t.excludeDateIntervals, i = t.includeDates, l = t.includeDateIntervals, u = t.filterDate;
|
|
@@ -2400,7 +2400,7 @@ function ne(o, r) {
|
|
|
2400
2400
|
}) || l && !l.some(function(c) {
|
|
2401
2401
|
var d = c.start, p = c.end;
|
|
2402
2402
|
return Qe(o, { start: d, end: p });
|
|
2403
|
-
}) || u && !u(
|
|
2403
|
+
}) || u && !u(I(o)) || !1;
|
|
2404
2404
|
}
|
|
2405
2405
|
function Rt(o, r) {
|
|
2406
2406
|
var t = r === void 0 ? {} : r, e = t.excludeDates, n = t.excludeDateIntervals;
|
|
@@ -2421,7 +2421,7 @@ function Ar(o, r) {
|
|
|
2421
2421
|
return J(o, l instanceof Date ? l : l.date);
|
|
2422
2422
|
}) || s && !s.some(function(l) {
|
|
2423
2423
|
return J(o, l);
|
|
2424
|
-
}) || i && !i(
|
|
2424
|
+
}) || i && !i(I(o)) || !1;
|
|
2425
2425
|
}
|
|
2426
2426
|
function Ve(o, r, t, e) {
|
|
2427
2427
|
var n = M(o), a = Z(o), s = M(r), i = Z(r), l = M(e);
|
|
@@ -2441,7 +2441,7 @@ function qe(o, r) {
|
|
|
2441
2441
|
return ut(o, l instanceof Date ? l : l.date);
|
|
2442
2442
|
}) || s && !s.some(function(l) {
|
|
2443
2443
|
return ut(o, l);
|
|
2444
|
-
}) || i && !i(
|
|
2444
|
+
}) || i && !i(I(o)) || !1;
|
|
2445
2445
|
}
|
|
2446
2446
|
function je(o, r, t) {
|
|
2447
2447
|
if (!r || !t || !wt(r) || !wt(t))
|
|
@@ -2458,7 +2458,7 @@ function tt(o, r) {
|
|
|
2458
2458
|
return le(l, u instanceof Date ? u : u.date);
|
|
2459
2459
|
}) || s && !s.some(function(u) {
|
|
2460
2460
|
return le(l, u);
|
|
2461
|
-
}) || i && !i(
|
|
2461
|
+
}) || i && !i(I(l)) || !1;
|
|
2462
2462
|
}
|
|
2463
2463
|
function $e(o, r, t, e) {
|
|
2464
2464
|
var n = M(o), a = Ee(o), s = M(r), i = Ee(r), l = M(e);
|
|
@@ -2481,11 +2481,11 @@ function er(o, r) {
|
|
|
2481
2481
|
var t = r.minTime, e = r.maxTime;
|
|
2482
2482
|
if (!t || !e)
|
|
2483
2483
|
throw new Error("Both minTime and maxTime props required");
|
|
2484
|
-
var n =
|
|
2484
|
+
var n = I();
|
|
2485
2485
|
n = ze(n, De(o)), n = Xe(n, ge(o)), n = Ze(n, _e(o));
|
|
2486
|
-
var a =
|
|
2486
|
+
var a = I();
|
|
2487
2487
|
a = ze(a, De(t)), a = Xe(a, ge(t)), a = Ze(a, _e(t));
|
|
2488
|
-
var s =
|
|
2488
|
+
var s = I();
|
|
2489
2489
|
s = ze(s, De(e)), s = Xe(s, ge(e)), s = Ze(s, _e(e));
|
|
2490
2490
|
var i;
|
|
2491
2491
|
try {
|
|
@@ -2781,7 +2781,7 @@ var vo = (
|
|
|
2781
2781
|
}, t.isBeforeMonth = function() {
|
|
2782
2782
|
return t.props.month !== void 0 && (Z(t.props.day) + 1) % 12 === t.props.month;
|
|
2783
2783
|
}, t.isCurrentDay = function() {
|
|
2784
|
-
return t.isSameDay(
|
|
2784
|
+
return t.isSameDay(I());
|
|
2785
2785
|
}, t.isSelected = function() {
|
|
2786
2786
|
var e;
|
|
2787
2787
|
return t.props.selectsMultiple ? (e = t.props.selectedDates) === null || e === void 0 ? void 0 : e.some(function(n) {
|
|
@@ -2966,11 +2966,11 @@ var vo = (
|
|
|
2966
2966
|
return f.createElement("div", { className: z(t) }, this.renderDays());
|
|
2967
2967
|
}, r;
|
|
2968
2968
|
}($)
|
|
2969
|
-
),
|
|
2969
|
+
), Ie, wo = 6, Oe = {
|
|
2970
2970
|
TWO_COLUMNS: "two_columns",
|
|
2971
2971
|
THREE_COLUMNS: "three_columns",
|
|
2972
2972
|
FOUR_COLUMNS: "four_columns"
|
|
2973
|
-
}, Dt = (
|
|
2973
|
+
}, Dt = (Ie = {}, Ie[Oe.TWO_COLUMNS] = {
|
|
2974
2974
|
grid: [
|
|
2975
2975
|
[0, 1],
|
|
2976
2976
|
[2, 3],
|
|
@@ -2980,7 +2980,7 @@ var vo = (
|
|
|
2980
2980
|
[10, 11]
|
|
2981
2981
|
],
|
|
2982
2982
|
verticalNavigationOffset: 2
|
|
2983
|
-
},
|
|
2983
|
+
}, Ie[Oe.THREE_COLUMNS] = {
|
|
2984
2984
|
grid: [
|
|
2985
2985
|
[0, 1, 2],
|
|
2986
2986
|
[3, 4, 5],
|
|
@@ -2988,14 +2988,14 @@ var vo = (
|
|
|
2988
2988
|
[9, 10, 11]
|
|
2989
2989
|
],
|
|
2990
2990
|
verticalNavigationOffset: 3
|
|
2991
|
-
},
|
|
2991
|
+
}, Ie[Oe.FOUR_COLUMNS] = {
|
|
2992
2992
|
grid: [
|
|
2993
2993
|
[0, 1, 2, 3],
|
|
2994
2994
|
[4, 5, 6, 7],
|
|
2995
2995
|
[8, 9, 10, 11]
|
|
2996
2996
|
],
|
|
2997
2997
|
verticalNavigationOffset: 4
|
|
2998
|
-
},
|
|
2998
|
+
}, Ie), Ge = 1;
|
|
2999
2999
|
function ur(o, r) {
|
|
3000
3000
|
return o ? Oe.FOUR_COLUMNS : r ? Oe.TWO_COLUMNS : Oe.THREE_COLUMNS;
|
|
3001
3001
|
}
|
|
@@ -3067,9 +3067,9 @@ var bo = (
|
|
|
3067
3067
|
var n = t.props.day, a = fe(e, 6);
|
|
3068
3068
|
return J(e, n) || J(a, n);
|
|
3069
3069
|
}, t.isCurrentMonth = function(e, n) {
|
|
3070
|
-
return M(e) === M(
|
|
3070
|
+
return M(e) === M(I()) && n === Z(I());
|
|
3071
3071
|
}, t.isCurrentQuarter = function(e, n) {
|
|
3072
|
-
return M(e) === M(
|
|
3072
|
+
return M(e) === M(I()) && n === Ee(I());
|
|
3073
3073
|
}, t.isSelectedMonth = function(e, n, a) {
|
|
3074
3074
|
return Z(a) === n && M(e) === M(a);
|
|
3075
3075
|
}, t.isSelectMonthInList = function(e, n, a) {
|
|
@@ -3156,13 +3156,13 @@ var bo = (
|
|
|
3156
3156
|
t.isMonthDisabled(a) || (t.onMonthClick(e, a), c?.(l));
|
|
3157
3157
|
return;
|
|
3158
3158
|
}
|
|
3159
|
-
var C = k(n, u, a), N = C.newCalculatedDate,
|
|
3159
|
+
var C = k(n, u, a), N = C.newCalculatedDate, Y = C.newCalculatedMonth;
|
|
3160
3160
|
switch (n) {
|
|
3161
3161
|
case y.ArrowRight:
|
|
3162
3162
|
case y.ArrowLeft:
|
|
3163
3163
|
case y.ArrowUp:
|
|
3164
3164
|
case y.ArrowDown:
|
|
3165
|
-
t.handleMonthNavigation(
|
|
3165
|
+
t.handleMonthNavigation(Y, N);
|
|
3166
3166
|
break;
|
|
3167
3167
|
}
|
|
3168
3168
|
}
|
|
@@ -3248,7 +3248,7 @@ var bo = (
|
|
|
3248
3248
|
"react-datepicker__quarter-text--today": t.isCurrentQuarter(a, e)
|
|
3249
3249
|
});
|
|
3250
3250
|
}, t.getMonthContent = function(e) {
|
|
3251
|
-
var n = t.props, a = n.showFullMonthYearPicker, s = n.renderMonthContent, i = n.locale, l = n.day, u = Fr(e, i), c =
|
|
3251
|
+
var n = t.props, a = n.showFullMonthYearPicker, s = n.renderMonthContent, i = n.locale, l = n.day, u = Fr(e, i), c = It(e, i);
|
|
3252
3252
|
return s ? s(e, u, c, l) : a ? c : u;
|
|
3253
3253
|
}, t.getQuarterContent = function(e) {
|
|
3254
3254
|
var n, a = t.props, s = a.renderQuarterContent, i = a.locale, l = ao(e, i);
|
|
@@ -3366,7 +3366,7 @@ var bo = (
|
|
|
3366
3366
|
var t = this, e = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map(this.props.useShortMonthInDropdown ? function(a) {
|
|
3367
3367
|
return Fr(a, t.props.locale);
|
|
3368
3368
|
} : function(a) {
|
|
3369
|
-
return
|
|
3369
|
+
return It(a, t.props.locale);
|
|
3370
3370
|
}), n;
|
|
3371
3371
|
switch (this.props.dropdownMode) {
|
|
3372
3372
|
case "scroll":
|
|
@@ -3382,7 +3382,7 @@ var bo = (
|
|
|
3382
3382
|
);
|
|
3383
3383
|
function Mo(o, r) {
|
|
3384
3384
|
for (var t = [], e = ye(o), n = ye(r); !Ce(e, n); )
|
|
3385
|
-
t.push(
|
|
3385
|
+
t.push(I(e)), e = he(e, 1);
|
|
3386
3386
|
return t;
|
|
3387
3387
|
}
|
|
3388
3388
|
var Co = (
|
|
@@ -3450,7 +3450,7 @@ var Co = (
|
|
|
3450
3450
|
return e && n.unshift(t.renderDropdown()), n;
|
|
3451
3451
|
}, t.onChange = function(e) {
|
|
3452
3452
|
t.toggleDropdown();
|
|
3453
|
-
var n =
|
|
3453
|
+
var n = I(e);
|
|
3454
3454
|
le(t.props.date, n) && J(t.props.date, n) || t.props.onChange(n);
|
|
3455
3455
|
}, t.toggleDropdown = function() {
|
|
3456
3456
|
return t.setState({
|
|
@@ -3501,7 +3501,7 @@ var Co = (
|
|
|
3501
3501
|
var a, s;
|
|
3502
3502
|
e.key === y.Space && (e.preventDefault(), e.key = y.Enter), (e.key === y.ArrowUp || e.key === y.ArrowLeft) && e.target instanceof HTMLElement && e.target.previousSibling && (e.preventDefault(), e.target.previousSibling instanceof HTMLElement && e.target.previousSibling.focus()), (e.key === y.ArrowDown || e.key === y.ArrowRight) && e.target instanceof HTMLElement && e.target.nextSibling && (e.preventDefault(), e.target.nextSibling instanceof HTMLElement && e.target.nextSibling.focus()), e.key === y.Enter && t.handleClick(n), (s = (a = t.props).handleOnKeyDown) === null || s === void 0 || s.call(a, e);
|
|
3503
3503
|
}, t.renderTimes = function() {
|
|
3504
|
-
for (var e, n = [], a = typeof t.props.format == "string" ? t.props.format : "p", s = (e = t.props.intervals) !== null && e !== void 0 ? e : r.defaultProps.intervals, i = t.props.selected || t.props.openToDate ||
|
|
3504
|
+
for (var e, n = [], a = typeof t.props.format == "string" ? t.props.format : "p", s = (e = t.props.intervals) !== null && e !== void 0 ? e : r.defaultProps.intervals, i = t.props.selected || t.props.openToDate || I(), l = et(i), u = t.props.injectTimes && t.props.injectTimes.sort(function(h, D) {
|
|
3505
3505
|
return h.getTime() - D.getTime();
|
|
3506
3506
|
}), c = 60 * ho(i), d = c / s, p = 0; p < d; p++) {
|
|
3507
3507
|
var m = _t(l, p * s);
|
|
@@ -3617,11 +3617,11 @@ var Co = (
|
|
|
3617
3617
|
}, e.isSameDay = function(n, a) {
|
|
3618
3618
|
return P(n, a);
|
|
3619
3619
|
}, e.isCurrentYear = function(n) {
|
|
3620
|
-
return n === M(
|
|
3620
|
+
return n === M(I());
|
|
3621
3621
|
}, e.isRangeStart = function(n) {
|
|
3622
|
-
return e.props.startDate && e.props.endDate && le(ie(
|
|
3622
|
+
return e.props.startDate && e.props.endDate && le(ie(I(), n), e.props.startDate);
|
|
3623
3623
|
}, e.isRangeEnd = function(n) {
|
|
3624
|
-
return e.props.startDate && e.props.endDate && le(ie(
|
|
3624
|
+
return e.props.startDate && e.props.endDate && le(ie(I(), n), e.props.endDate);
|
|
3625
3625
|
}, e.isInRange = function(n) {
|
|
3626
3626
|
return je(n, e.props.startDate, e.props.endDate);
|
|
3627
3627
|
}, e.isInSelectingRange = function(n) {
|
|
@@ -3631,13 +3631,13 @@ var Co = (
|
|
|
3631
3631
|
var a;
|
|
3632
3632
|
if (!e.isInSelectingRange(n))
|
|
3633
3633
|
return !1;
|
|
3634
|
-
var s = e.props, i = s.startDate, l = s.selectsStart, u = ie(
|
|
3634
|
+
var s = e.props, i = s.startDate, l = s.selectsStart, u = ie(I(), n);
|
|
3635
3635
|
return l ? le(u, (a = e.selectingDate()) !== null && a !== void 0 ? a : null) : le(u, i ?? null);
|
|
3636
3636
|
}, e.isSelectingRangeEnd = function(n) {
|
|
3637
3637
|
var a;
|
|
3638
3638
|
if (!e.isInSelectingRange(n))
|
|
3639
3639
|
return !1;
|
|
3640
|
-
var s = e.props, i = s.endDate, l = s.selectsEnd, u = s.selectsRange, c = ie(
|
|
3640
|
+
var s = e.props, i = s.endDate, l = s.selectsEnd, u = s.selectsRange, c = ie(I(), n);
|
|
3641
3641
|
return l || u ? le(c, (a = e.selectingDate()) !== null && a !== void 0 ? a : null) : le(c, i ?? null);
|
|
3642
3642
|
}, e.isKeyboardSelected = function(n) {
|
|
3643
3643
|
if (!(e.props.date === void 0 || e.props.selected == null || e.props.preSelection == null)) {
|
|
@@ -3884,12 +3884,12 @@ var To = (
|
|
|
3884
3884
|
"react-datepicker__year-select",
|
|
3885
3885
|
"react-datepicker__month-select",
|
|
3886
3886
|
"react-datepicker__month-year-select"
|
|
3887
|
-
],
|
|
3887
|
+
], Yo = function(o) {
|
|
3888
3888
|
var r = (o.className || "").split(/\s+/);
|
|
3889
3889
|
return No.some(function(t) {
|
|
3890
3890
|
return r.indexOf(t) >= 0;
|
|
3891
3891
|
});
|
|
3892
|
-
},
|
|
3892
|
+
}, Io = (
|
|
3893
3893
|
/** @class */
|
|
3894
3894
|
function(o) {
|
|
3895
3895
|
G(r, o);
|
|
@@ -3901,9 +3901,9 @@ var To = (
|
|
|
3901
3901
|
return e.containerRef.current;
|
|
3902
3902
|
}, e.handleDropdownFocus = function(n) {
|
|
3903
3903
|
var a, s;
|
|
3904
|
-
|
|
3904
|
+
Yo(n.target) && ((s = (a = e.props).onDropdownFocus) === null || s === void 0 || s.call(a, n));
|
|
3905
3905
|
}, e.getDateInView = function() {
|
|
3906
|
-
var n = e.props, a = n.preSelection, s = n.selected, i = n.openToDate, l = Hr(e.props), u = Wr(e.props), c =
|
|
3906
|
+
var n = e.props, a = n.preSelection, s = n.selected, i = n.openToDate, l = Hr(e.props), u = Wr(e.props), c = I(), d = i || s || a;
|
|
3907
3907
|
return d || (l && Pe(c, l) ? l : u && Ce(c, u) ? u : c);
|
|
3908
3908
|
}, e.increaseMonth = function() {
|
|
3909
3909
|
e.setState(function(n) {
|
|
@@ -3930,7 +3930,7 @@ var To = (
|
|
|
3930
3930
|
}, e.handleMonthMouseLeave = function() {
|
|
3931
3931
|
e.setState({ selectingDate: void 0 }), e.props.onMonthMouseLeave && e.props.onMonthMouseLeave();
|
|
3932
3932
|
}, e.handleYearMouseEnter = function(n, a) {
|
|
3933
|
-
e.setState({ selectingDate: ie(
|
|
3933
|
+
e.setState({ selectingDate: ie(I(), a) }), e.props.onYearMouseEnter && e.props.onYearMouseEnter(n, a);
|
|
3934
3934
|
}, e.handleYearMouseLeave = function(n, a) {
|
|
3935
3935
|
e.props.onYearMouseLeave && e.props.onYearMouseLeave(n, a);
|
|
3936
3936
|
}, e.handleYearChange = function(n) {
|
|
@@ -4029,7 +4029,7 @@ var To = (
|
|
|
4029
4029
|
"react-datepicker__navigation--previous"
|
|
4030
4030
|
], v = e.decreaseMonth;
|
|
4031
4031
|
(e.props.showMonthYearPicker || e.props.showQuarterYearPicker || e.props.showYearPicker) && (v = e.decreaseYear), d && e.props.showDisabledMonthNavigation && (m.push("react-datepicker__navigation--previous--disabled"), v = void 0);
|
|
4032
|
-
var g = e.props.showMonthYearPicker || e.props.showQuarterYearPicker || e.props.showYearPicker, h = e.props, D = h.previousMonthButtonLabel, w = D === void 0 ? r.defaultProps.previousMonthButtonLabel : D, k = h.previousYearButtonLabel, C = k === void 0 ? r.defaultProps.previousYearButtonLabel : k, N = e.props,
|
|
4032
|
+
var g = e.props.showMonthYearPicker || e.props.showQuarterYearPicker || e.props.showYearPicker, h = e.props, D = h.previousMonthButtonLabel, w = D === void 0 ? r.defaultProps.previousMonthButtonLabel : D, k = h.previousYearButtonLabel, C = k === void 0 ? r.defaultProps.previousYearButtonLabel : k, N = e.props, Y = N.previousMonthAriaLabel, x = Y === void 0 ? typeof w == "string" ? w : "Previous Month" : Y, E = N.previousYearAriaLabel, R = E === void 0 ? typeof C == "string" ? C : "Previous Year" : E;
|
|
4033
4033
|
return f.createElement(
|
|
4034
4034
|
"button",
|
|
4035
4035
|
{ type: "button", className: m.join(" "), onClick: v, onKeyDown: e.props.handleOnKeyDown, "aria-label": g ? R : x },
|
|
@@ -4173,7 +4173,7 @@ var To = (
|
|
|
4173
4173
|
return f.createElement(vo, T({}, r.defaultProps, e.props, { date: n, timeString: s, onChange: e.props.onTimeChange }));
|
|
4174
4174
|
}, e.renderAriaLiveRegion = function() {
|
|
4175
4175
|
var n, a = we(e.state.date, (n = e.props.yearItemNumber) !== null && n !== void 0 ? n : r.defaultProps.yearItemNumber), s = a.startPeriod, i = a.endPeriod, l;
|
|
4176
|
-
return e.props.showYearPicker ? l = "".concat(s, " - ").concat(i) : e.props.showMonthYearPicker || e.props.showQuarterYearPicker ? l = M(e.state.date) : l = "".concat(
|
|
4176
|
+
return e.props.showYearPicker ? l = "".concat(s, " - ").concat(i) : e.props.showMonthYearPicker || e.props.showQuarterYearPicker ? l = M(e.state.date) : l = "".concat(It(Z(e.state.date), e.props.locale), " ").concat(M(e.state.date)), f.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, e.state.isRenderAriaLiveMessage && l);
|
|
4177
4177
|
}, e.renderChildren = function() {
|
|
4178
4178
|
if (e.props.children)
|
|
4179
4179
|
return f.createElement("div", { className: "react-datepicker__children-container" }, e.props.children);
|
|
@@ -4372,7 +4372,7 @@ var gt = "Date input not valid.", Bo = (
|
|
|
4372
4372
|
function r(t) {
|
|
4373
4373
|
var e = o.call(this, t) || this;
|
|
4374
4374
|
return e.calendar = null, e.input = null, e.getPreSelection = function() {
|
|
4375
|
-
return e.props.openToDate ? e.props.openToDate : e.props.selectsEnd && e.props.startDate ? e.props.startDate : e.props.selectsStart && e.props.endDate ? e.props.endDate :
|
|
4375
|
+
return e.props.openToDate ? e.props.openToDate : e.props.selectsEnd && e.props.startDate ? e.props.startDate : e.props.selectsStart && e.props.endDate ? e.props.endDate : I();
|
|
4376
4376
|
}, e.modifyHolidays = function() {
|
|
4377
4377
|
var n;
|
|
4378
4378
|
return (n = e.props.holidays) === null || n === void 0 ? void 0 : n.reduce(function(a, s) {
|
|
@@ -4468,10 +4468,10 @@ var gt = "Date input not valid.", Bo = (
|
|
|
4468
4468
|
if (m) {
|
|
4469
4469
|
var k = w.split(h.includes("-") ? Lr : "-", 2).map(function(B) {
|
|
4470
4470
|
return B.trim();
|
|
4471
|
-
}), C = k[0], N = k[1],
|
|
4472
|
-
if (!E && !R ||
|
|
4471
|
+
}), C = k[0], N = k[1], Y = mt(C ?? "", h, e.props.locale, D), x = mt(N ?? "", h, e.props.locale, D), E = v?.getTime() !== Y?.getTime(), R = g?.getTime() !== x?.getTime();
|
|
4472
|
+
if (!E && !R || Y && ne(Y, e.props) || x && ne(x, e.props))
|
|
4473
4473
|
return;
|
|
4474
|
-
(i = (s = e.props).onChange) === null || i === void 0 || i.call(s, [
|
|
4474
|
+
(i = (s = e.props).onChange) === null || i === void 0 || i.call(s, [Y, x], d);
|
|
4475
4475
|
} else {
|
|
4476
4476
|
var W = mt(w, h, e.props.locale, D, (l = e.props.selected) !== null && l !== void 0 ? l : void 0);
|
|
4477
4477
|
(W || !w) && e.setSelected(W, d, !0);
|
|
@@ -4510,8 +4510,8 @@ var gt = "Date input not valid.", Bo = (
|
|
|
4510
4510
|
})), e.props.inline || e.setState({
|
|
4511
4511
|
preSelection: c
|
|
4512
4512
|
}), e.props.focusSelectedMonth || e.setState({ monthSelectedIn: i })), m) {
|
|
4513
|
-
var C = !v && !g, N = v && !g,
|
|
4514
|
-
C ? p?.([c, null], a) : N && (c === null ? p?.([null, null], a) : cr(c, v) ? p?.(k ? [c, v] : [c, null], a) : p?.([v, c], a)),
|
|
4513
|
+
var C = !v && !g, N = v && !g, Y = v && g;
|
|
4514
|
+
C ? p?.([c, null], a) : N && (c === null ? p?.([null, null], a) : cr(c, v) ? p?.(k ? [c, v] : [c, null], a) : p?.([v, c], a)), Y && p?.([c, null], a);
|
|
4515
4515
|
} else if (h) {
|
|
4516
4516
|
if (c !== null)
|
|
4517
4517
|
if (!D?.length)
|
|
@@ -4581,7 +4581,7 @@ var gt = "Date input not valid.", Bo = (
|
|
|
4581
4581
|
m instanceof HTMLElement && m.focus({ preventScroll: !0 });
|
|
4582
4582
|
return;
|
|
4583
4583
|
}
|
|
4584
|
-
var v =
|
|
4584
|
+
var v = I(e.state.preSelection);
|
|
4585
4585
|
d === y.Enter ? (n.preventDefault(), n.target.blur(), e.inputOk() && e.state.lastPreSelectChange === yt ? (e.handleSelect(v, n), !e.props.shouldCloseOnSelect && e.setPreSelection(v)) : e.setOpen(!1)) : d === y.Escape ? (n.preventDefault(), n.target.blur(), e.sendFocusBackToInput(), e.setOpen(!1)) : d === y.Tab && e.setOpen(!1), e.inputOk() || (c = (u = e.props).onInputError) === null || c === void 0 || c.call(u, { code: 1, msg: gt });
|
|
4586
4586
|
}
|
|
4587
4587
|
}, e.onPortalKeyDown = function(n) {
|
|
@@ -4596,7 +4596,7 @@ var gt = "Date input not valid.", Bo = (
|
|
|
4596
4596
|
}, e.onDayKeyDown = function(n) {
|
|
4597
4597
|
var a, s, i, l, u, c, d = e.props, p = d.minDate, m = d.maxDate, v = d.disabledKeyboardNavigation, g = d.showWeekPicker, h = d.shouldCloseOnSelect, D = d.locale, w = d.calendarStartDay, k = d.adjustDateOnChange, C = d.inline;
|
|
4598
4598
|
if ((s = (a = e.props).onKeyDown) === null || s === void 0 || s.call(a, n), !v) {
|
|
4599
|
-
var N = n.key,
|
|
4599
|
+
var N = n.key, Y = n.shiftKey, x = I(e.state.preSelection), E = function(U, S) {
|
|
4600
4600
|
var F = S;
|
|
4601
4601
|
switch (U) {
|
|
4602
4602
|
case y.ArrowRight:
|
|
@@ -4612,10 +4612,10 @@ var gt = "Date input not valid.", Bo = (
|
|
|
4612
4612
|
F = at(S, 1);
|
|
4613
4613
|
break;
|
|
4614
4614
|
case y.PageUp:
|
|
4615
|
-
F =
|
|
4615
|
+
F = Y ? Ne(S, 1) : xe(S, 1);
|
|
4616
4616
|
break;
|
|
4617
4617
|
case y.PageDown:
|
|
4618
|
-
F =
|
|
4618
|
+
F = Y ? ve(S, 1) : he(S, 1);
|
|
4619
4619
|
break;
|
|
4620
4620
|
case y.Home:
|
|
4621
4621
|
F = ke(S, D, w);
|
|
@@ -4677,7 +4677,7 @@ var gt = "Date input not valid.", Bo = (
|
|
|
4677
4677
|
typeof e.props.closeOnScroll == "boolean" && e.props.closeOnScroll ? (n.target === document || n.target === document.documentElement || n.target === document.body) && e.setOpen(!1) : typeof e.props.closeOnScroll == "function" && e.props.closeOnScroll(n) && e.setOpen(!1);
|
|
4678
4678
|
}, e.renderCalendar = function() {
|
|
4679
4679
|
var n, a;
|
|
4680
|
-
return !e.props.inline && !e.isCalendarOpen() ? null : f.createElement(
|
|
4680
|
+
return !e.props.inline && !e.isCalendarOpen() ? null : f.createElement(Io, T({ showMonthYearDropdown: void 0, ref: function(s) {
|
|
4681
4681
|
e.calendar = s;
|
|
4682
4682
|
} }, e.props, e.state, { setOpen: e.setOpen, dateFormat: (n = e.props.dateFormatCalendar) !== null && n !== void 0 ? n : r.defaultProps.dateFormatCalendar, onSelect: e.handleSelect, onClickOutside: e.handleCalendarClickOutside, holidays: po(e.modifyHolidays()), outsideClickIgnoreClass: pr, onDropdownFocus: e.handleDropdownFocus, onTimeChange: e.handleTimeChange, className: e.props.calendarClassName, container: e.props.calendarContainer, handleOnKeyDown: e.props.onKeyDown, handleOnDayKeyDown: e.onDayKeyDown, setPreSelection: e.setPreSelection, dropdownMode: (a = e.props.dropdownMode) !== null && a !== void 0 ? a : r.defaultProps.dropdownMode }), e.props.children);
|
|
4683
4683
|
}, e.renderAriaLiveRegion = function() {
|