@commercelayer/app-elements 6.9.0 → 6.9.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-B1XCGNY7.js → InputDateComponent-CLU0eefS.js} +79 -75
- package/dist/{RuleEngineComponent-Bq0XxZye.js → RuleEngineComponent-0_e_USma.js} +2 -2
- package/dist/{main-C21kkuh-.js → main-BuFWdBkv.js} +327 -318
- package/dist/main.js +1 -1
- package/dist/{parseISO-pkADR8oR.js → parseISO-CZGZrZsH.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/ui/forms/InputDate/InputDateComponent.d.ts +6 -0
- package/dist/ui/forms/InputDateRange/InputDateRange.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { c as X, t as M, m as dr, a as pr, N as me, O as ve, P as ht, Q as Be, R as fr, U as Kr, V as Ur, W as ot, X as hr, Y as Vr, Z as vr, _ as mr, $ as qr, a0 as jr, a1 as Yt, a2 as $r, a3 as Gr, a4 as Xr, a5 as Lt, a6 as Ae, a7 as zr, j as ae, a8 as G, a9 as pe, aa as be, f as bt, ab as xt, ac as Dr, ad as Et, ae as gr, af as Zr, ag as Ft, ah as Te, ai as Jr, aj as en, ak as tn, al as st, am as rn, an as nn, L as an, l as on, ao as sn, ap as ln, aq as cn } from "./main-
|
|
3
|
-
import * as
|
|
2
|
+
import { c as X, t as M, m as dr, a as pr, N as me, O as ve, P as ht, Q as Be, R as fr, U as Kr, V as Ur, W as ot, X as hr, Y as Vr, Z as vr, _ as mr, $ as qr, a0 as jr, a1 as Yt, a2 as $r, a3 as Gr, a4 as Xr, a5 as Lt, a6 as Ae, a7 as zr, j as ae, a8 as G, a9 as pe, aa as be, f as bt, ab as xt, ac as Dr, ad as Et, ae as gr, af as Zr, ag as Ft, ah as Te, ai as Jr, aj as en, ak as tn, al as st, am as rn, an as nn, L as an, l as on, ao as sn, ap as ln, aq as cn } from "./main-BuFWdBkv.js";
|
|
3
|
+
import * as k from "react";
|
|
4
4
|
import v, { useLayoutEffect as yr, cloneElement as wr, createRef as Me, Component as z, useRef as _t, useEffect as At, useCallback as un, createElement as dn, forwardRef as pn, useMemo as fn } from "react";
|
|
5
5
|
import * as hn from "react-dom";
|
|
6
6
|
import vn from "react-dom";
|
|
7
|
-
import { p as mn } from "./parseISO-
|
|
7
|
+
import { p as mn } from "./parseISO-CZGZrZsH.js";
|
|
8
8
|
function br(o, n, t) {
|
|
9
9
|
return X(o, +M(o) + n);
|
|
10
10
|
}
|
|
@@ -1553,15 +1553,15 @@ function ya(o, n, t, e) {
|
|
|
1553
1553
|
`The format string mustn't contain \`${h}\` and any other token at the same time`
|
|
1554
1554
|
);
|
|
1555
1555
|
p.push({ token: D, fullToken: h });
|
|
1556
|
-
const
|
|
1556
|
+
const _ = w.run(
|
|
1557
1557
|
o,
|
|
1558
1558
|
h,
|
|
1559
1559
|
s.match,
|
|
1560
1560
|
u
|
|
1561
1561
|
);
|
|
1562
|
-
if (!
|
|
1562
|
+
if (!_)
|
|
1563
1563
|
return r();
|
|
1564
|
-
c.push(
|
|
1564
|
+
c.push(_.setter), o = _.rest;
|
|
1565
1565
|
} else {
|
|
1566
1566
|
if (D.match(ga))
|
|
1567
1567
|
throw new RangeError(
|
|
@@ -1722,23 +1722,23 @@ function Pr(o) {
|
|
|
1722
1722
|
const p = Ee(o.timeZone, o), f = p > 0 ? Math.floor(p) : Math.ceil(p), g = -(/* @__PURE__ */ new Date(+o)).getTimezoneOffset() - f, h = f !== t, D = g - l;
|
|
1723
1723
|
if (h && D) {
|
|
1724
1724
|
Date.prototype.setUTCMinutes.call(o, Date.prototype.getUTCMinutes.call(o) + D);
|
|
1725
|
-
const w = Ee(o.timeZone, o), b = w > 0 ? Math.floor(w) : Math.ceil(w),
|
|
1726
|
-
|
|
1725
|
+
const w = Ee(o.timeZone, o), b = w > 0 ? Math.floor(w) : Math.ceil(w), _ = f - b;
|
|
1726
|
+
_ && (o.internal.setUTCMinutes(o.internal.getUTCMinutes() + _), Date.prototype.setUTCMinutes.call(o, Date.prototype.getUTCMinutes.call(o) + _));
|
|
1727
1727
|
}
|
|
1728
1728
|
}
|
|
1729
1729
|
var Ca = typeof document < "u", Sa = function() {
|
|
1730
1730
|
}, dt = Ca ? yr : Sa;
|
|
1731
1731
|
const xa = {
|
|
1732
|
-
...
|
|
1732
|
+
...k
|
|
1733
1733
|
}, Ea = xa.useInsertionEffect, Pa = Ea || ((o) => o());
|
|
1734
1734
|
function Ta(o) {
|
|
1735
|
-
const n =
|
|
1735
|
+
const n = k.useRef(() => {
|
|
1736
1736
|
if (process.env.NODE_ENV !== "production")
|
|
1737
1737
|
throw new Error("Cannot call an event handler while rendering.");
|
|
1738
1738
|
});
|
|
1739
1739
|
return Pa(() => {
|
|
1740
1740
|
n.current = o;
|
|
1741
|
-
}),
|
|
1741
|
+
}), k.useCallback(function() {
|
|
1742
1742
|
for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
|
|
1743
1743
|
e[r] = arguments[r];
|
|
1744
1744
|
return n.current == null ? void 0 : n.current(...e);
|
|
@@ -1784,7 +1784,7 @@ function qt(o, n) {
|
|
|
1784
1784
|
return Math.round(n * t) / t;
|
|
1785
1785
|
}
|
|
1786
1786
|
function mt(o) {
|
|
1787
|
-
const n =
|
|
1787
|
+
const n = k.useRef(o);
|
|
1788
1788
|
return nt(() => {
|
|
1789
1789
|
n.current = o;
|
|
1790
1790
|
}), n;
|
|
@@ -1803,20 +1803,20 @@ function Ra(o) {
|
|
|
1803
1803
|
transform: i = !0,
|
|
1804
1804
|
whileElementsMounted: l,
|
|
1805
1805
|
open: u
|
|
1806
|
-
} = o, [c, d] =
|
|
1806
|
+
} = o, [c, d] = k.useState({
|
|
1807
1807
|
x: 0,
|
|
1808
1808
|
y: 0,
|
|
1809
1809
|
strategy: t,
|
|
1810
1810
|
placement: n,
|
|
1811
1811
|
middlewareData: {},
|
|
1812
1812
|
isPositioned: !1
|
|
1813
|
-
}), [p, f] =
|
|
1813
|
+
}), [p, f] = k.useState(e);
|
|
1814
1814
|
pt(p, e) || f(e);
|
|
1815
|
-
const [m, g] =
|
|
1815
|
+
const [m, g] = k.useState(null), [h, D] = k.useState(null), w = k.useCallback(($) => {
|
|
1816
1816
|
$ !== L.current && (L.current = $, g($));
|
|
1817
|
-
}, []), b =
|
|
1817
|
+
}, []), b = k.useCallback(($) => {
|
|
1818
1818
|
$ !== Y.current && (Y.current = $, D($));
|
|
1819
|
-
}, []),
|
|
1819
|
+
}, []), _ = a || m, I = s || h, L = k.useRef(null), Y = k.useRef(null), C = k.useRef(c), T = l != null, W = mt(l), H = mt(r), S = mt(u), R = k.useCallback(() => {
|
|
1820
1820
|
if (!L.current || !Y.current)
|
|
1821
1821
|
return;
|
|
1822
1822
|
const $ = {
|
|
@@ -1844,25 +1844,25 @@ function Ra(o) {
|
|
|
1844
1844
|
isPositioned: !1
|
|
1845
1845
|
})));
|
|
1846
1846
|
}, [u]);
|
|
1847
|
-
const K =
|
|
1847
|
+
const K = k.useRef(!1);
|
|
1848
1848
|
nt(() => (K.current = !0, () => {
|
|
1849
1849
|
K.current = !1;
|
|
1850
1850
|
}), []), nt(() => {
|
|
1851
|
-
if (
|
|
1851
|
+
if (_ && (L.current = _), I && (Y.current = I), _ && I) {
|
|
1852
1852
|
if (W.current)
|
|
1853
|
-
return W.current(
|
|
1853
|
+
return W.current(_, I, R);
|
|
1854
1854
|
R();
|
|
1855
1855
|
}
|
|
1856
|
-
}, [
|
|
1857
|
-
const j =
|
|
1856
|
+
}, [_, I, R, W, T]);
|
|
1857
|
+
const j = k.useMemo(() => ({
|
|
1858
1858
|
reference: L,
|
|
1859
1859
|
floating: Y,
|
|
1860
1860
|
setReference: w,
|
|
1861
1861
|
setFloating: b
|
|
1862
|
-
}), [w, b]), U =
|
|
1863
|
-
reference:
|
|
1862
|
+
}), [w, b]), U = k.useMemo(() => ({
|
|
1863
|
+
reference: _,
|
|
1864
1864
|
floating: I
|
|
1865
|
-
}), [
|
|
1865
|
+
}), [_, I]), F = k.useMemo(() => {
|
|
1866
1866
|
const $ = {
|
|
1867
1867
|
position: t,
|
|
1868
1868
|
left: 0,
|
|
@@ -1883,7 +1883,7 @@ function Ra(o) {
|
|
|
1883
1883
|
top: Oe
|
|
1884
1884
|
};
|
|
1885
1885
|
}, [t, i, U.floating, c.x, c.y]);
|
|
1886
|
-
return
|
|
1886
|
+
return k.useMemo(() => ({
|
|
1887
1887
|
...c,
|
|
1888
1888
|
update: R,
|
|
1889
1889
|
refs: j,
|
|
@@ -1922,7 +1922,7 @@ const Ia = (o) => {
|
|
|
1922
1922
|
...Ia(o),
|
|
1923
1923
|
options: [o, n]
|
|
1924
1924
|
}), Aa = {
|
|
1925
|
-
...
|
|
1925
|
+
...k
|
|
1926
1926
|
};
|
|
1927
1927
|
let jt = !1, Ha = 0;
|
|
1928
1928
|
const $t = () => (
|
|
@@ -1931,10 +1931,10 @@ const $t = () => (
|
|
|
1931
1931
|
"floating-ui-" + Math.random().toString(36).slice(2, 6) + Ha++
|
|
1932
1932
|
);
|
|
1933
1933
|
function Wa() {
|
|
1934
|
-
const [o, n] =
|
|
1934
|
+
const [o, n] = k.useState(() => jt ? $t() : void 0);
|
|
1935
1935
|
return dt(() => {
|
|
1936
1936
|
o == null && n($t());
|
|
1937
|
-
}, []),
|
|
1937
|
+
}, []), k.useEffect(() => {
|
|
1938
1938
|
jt = !0;
|
|
1939
1939
|
}, []), o;
|
|
1940
1940
|
}
|
|
@@ -1959,7 +1959,7 @@ function Ka() {
|
|
|
1959
1959
|
(a = Ve) == null || a.add(r), console.error(r);
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
|
-
const Ua = /* @__PURE__ */
|
|
1962
|
+
const Ua = /* @__PURE__ */ k.forwardRef(function(n, t) {
|
|
1963
1963
|
const {
|
|
1964
1964
|
context: {
|
|
1965
1965
|
placement: e,
|
|
@@ -1985,13 +1985,13 @@ const Ua = /* @__PURE__ */ _.forwardRef(function(n, t) {
|
|
|
1985
1985
|
...h
|
|
1986
1986
|
} = n;
|
|
1987
1987
|
process.env.NODE_ENV !== "production" && (t || Ba("The `ref` prop is required for `FloatingArrow`."));
|
|
1988
|
-
const D = Or(), [w, b] =
|
|
1988
|
+
const D = Or(), [w, b] = k.useState(!1);
|
|
1989
1989
|
if (dt(() => {
|
|
1990
1990
|
if (!r) return;
|
|
1991
1991
|
zr(r).direction === "rtl" && b(!0);
|
|
1992
1992
|
}, [r]), !r)
|
|
1993
1993
|
return null;
|
|
1994
|
-
const [
|
|
1994
|
+
const [_, I] = e.split("-"), L = _ === "top" || _ === "bottom";
|
|
1995
1995
|
let Y = d;
|
|
1996
1996
|
(L && s != null && s.x || !L && s != null && s.y) && (Y = null);
|
|
1997
1997
|
const C = c * 2, T = C / 2, W = i / 2 * (u / -8 + 1), H = l / 2 * u / 4, S = !!f, R = Y && I === "end" ? "bottom" : "top";
|
|
@@ -2002,7 +2002,7 @@ const Ua = /* @__PURE__ */ _.forwardRef(function(n, t) {
|
|
|
2002
2002
|
left: S ? "rotate(90deg)" : "rotate(-90deg)",
|
|
2003
2003
|
bottom: S ? "" : "rotate(180deg)",
|
|
2004
2004
|
right: S ? "rotate(-90deg)" : "rotate(90deg)"
|
|
2005
|
-
}[
|
|
2005
|
+
}[_];
|
|
2006
2006
|
return /* @__PURE__ */ ae.jsxs("svg", {
|
|
2007
2007
|
...h,
|
|
2008
2008
|
"aria-hidden": !0,
|
|
@@ -2015,7 +2015,7 @@ const Ua = /* @__PURE__ */ _.forwardRef(function(n, t) {
|
|
|
2015
2015
|
pointerEvents: "none",
|
|
2016
2016
|
[K]: j,
|
|
2017
2017
|
[R]: U,
|
|
2018
|
-
[
|
|
2018
|
+
[_]: L || S ? "100%" : "calc(100% - " + C / 2 + "px)",
|
|
2019
2019
|
transform: [$, m].filter((Se) => !!Se).join(" "),
|
|
2020
2020
|
...g
|
|
2021
2021
|
},
|
|
@@ -2055,35 +2055,35 @@ function Va() {
|
|
|
2055
2055
|
}
|
|
2056
2056
|
};
|
|
2057
2057
|
}
|
|
2058
|
-
const qa = /* @__PURE__ */
|
|
2058
|
+
const qa = /* @__PURE__ */ k.createContext(null), ja = /* @__PURE__ */ k.createContext(null), $a = () => {
|
|
2059
2059
|
var o;
|
|
2060
|
-
return ((o =
|
|
2061
|
-
}, Ga = () =>
|
|
2060
|
+
return ((o = k.useContext(qa)) == null ? void 0 : o.id) || null;
|
|
2061
|
+
}, Ga = () => k.useContext(ja);
|
|
2062
2062
|
function Xa(o) {
|
|
2063
2063
|
const {
|
|
2064
2064
|
open: n = !1,
|
|
2065
2065
|
onOpenChange: t,
|
|
2066
2066
|
elements: e
|
|
2067
|
-
} = o, r = Or(), a =
|
|
2067
|
+
} = o, r = Or(), a = k.useRef({}), [s] = k.useState(() => Va()), i = $a() != null;
|
|
2068
2068
|
if (process.env.NODE_ENV !== "production") {
|
|
2069
2069
|
const f = e.reference;
|
|
2070
2070
|
f && !Ae(f) && Ka("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
2071
2071
|
}
|
|
2072
|
-
const [l, u] =
|
|
2072
|
+
const [l, u] = k.useState(e.reference), c = Ta((f, m, g) => {
|
|
2073
2073
|
a.current.openEvent = f ? m : void 0, s.emit("openchange", {
|
|
2074
2074
|
open: f,
|
|
2075
2075
|
event: m,
|
|
2076
2076
|
reason: g,
|
|
2077
2077
|
nested: i
|
|
2078
2078
|
}), t?.(f, m, g);
|
|
2079
|
-
}), d =
|
|
2079
|
+
}), d = k.useMemo(() => ({
|
|
2080
2080
|
setPositionReference: u
|
|
2081
|
-
}), []), p =
|
|
2081
|
+
}), []), p = k.useMemo(() => ({
|
|
2082
2082
|
reference: l || e.reference || null,
|
|
2083
2083
|
floating: e.floating || null,
|
|
2084
2084
|
domReference: e.reference
|
|
2085
2085
|
}), [l, e.reference, e.floating]);
|
|
2086
|
-
return
|
|
2086
|
+
return k.useMemo(() => ({
|
|
2087
2087
|
dataRef: a,
|
|
2088
2088
|
open: n,
|
|
2089
2089
|
onOpenChange: c,
|
|
@@ -2104,7 +2104,7 @@ function za(o) {
|
|
|
2104
2104
|
floating: null,
|
|
2105
2105
|
...o.elements
|
|
2106
2106
|
}
|
|
2107
|
-
}), e = o.rootContext || t, r = e.elements, [a, s] =
|
|
2107
|
+
}), e = o.rootContext || t, r = e.elements, [a, s] = k.useState(null), [i, l] = k.useState(null), c = r?.domReference || a, d = k.useRef(null), p = Ga();
|
|
2108
2108
|
dt(() => {
|
|
2109
2109
|
c && (d.current = c);
|
|
2110
2110
|
}, [c]);
|
|
@@ -2116,27 +2116,27 @@ function za(o) {
|
|
|
2116
2116
|
reference: i
|
|
2117
2117
|
}
|
|
2118
2118
|
}
|
|
2119
|
-
}), m =
|
|
2120
|
-
const
|
|
2119
|
+
}), m = k.useCallback((b) => {
|
|
2120
|
+
const _ = Ae(b) ? {
|
|
2121
2121
|
getBoundingClientRect: () => b.getBoundingClientRect(),
|
|
2122
2122
|
getClientRects: () => b.getClientRects(),
|
|
2123
2123
|
contextElement: b
|
|
2124
2124
|
} : b;
|
|
2125
|
-
l(
|
|
2126
|
-
}, [f.refs]), g =
|
|
2125
|
+
l(_), f.refs.setReference(_);
|
|
2126
|
+
}, [f.refs]), g = k.useCallback((b) => {
|
|
2127
2127
|
(Ae(b) || b === null) && (d.current = b, s(b)), (Ae(f.refs.reference.current) || f.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
|
|
2128
2128
|
// `null` to support `positionReference` + an unstable `reference`
|
|
2129
2129
|
// callback ref.
|
|
2130
2130
|
b !== null && !Ae(b)) && f.refs.setReference(b);
|
|
2131
|
-
}, [f.refs]), h =
|
|
2131
|
+
}, [f.refs]), h = k.useMemo(() => ({
|
|
2132
2132
|
...f.refs,
|
|
2133
2133
|
setReference: g,
|
|
2134
2134
|
setPositionReference: m,
|
|
2135
2135
|
domReference: d
|
|
2136
|
-
}), [f.refs, g, m]), D =
|
|
2136
|
+
}), [f.refs, g, m]), D = k.useMemo(() => ({
|
|
2137
2137
|
...f.elements,
|
|
2138
2138
|
domReference: c
|
|
2139
|
-
}), [f.elements, c]), w =
|
|
2139
|
+
}), [f.elements, c]), w = k.useMemo(() => ({
|
|
2140
2140
|
...f,
|
|
2141
2141
|
...e,
|
|
2142
2142
|
refs: h,
|
|
@@ -2145,9 +2145,9 @@ function za(o) {
|
|
|
2145
2145
|
}), [f, h, D, n, e]);
|
|
2146
2146
|
return dt(() => {
|
|
2147
2147
|
e.dataRef.current.floatingContext = w;
|
|
2148
|
-
const b = p?.nodesRef.current.find((
|
|
2148
|
+
const b = p?.nodesRef.current.find((_) => _.id === n);
|
|
2149
2149
|
b && (b.context = w);
|
|
2150
|
-
}),
|
|
2150
|
+
}), k.useMemo(() => ({
|
|
2151
2151
|
...f,
|
|
2152
2152
|
context: w,
|
|
2153
2153
|
refs: h,
|
|
@@ -3165,7 +3165,7 @@ var Co = (
|
|
|
3165
3165
|
t.isMonthDisabled(a) || (t.onMonthClick(e, a), c?.(l));
|
|
3166
3166
|
return;
|
|
3167
3167
|
}
|
|
3168
|
-
var
|
|
3168
|
+
var _ = b(r, u, a), I = _.newCalculatedDate, L = _.newCalculatedMonth;
|
|
3169
3169
|
switch (r) {
|
|
3170
3170
|
case y.ArrowRight:
|
|
3171
3171
|
case y.ArrowLeft:
|
|
@@ -4097,11 +4097,11 @@ var Io = (
|
|
|
4097
4097
|
"react-datepicker__navigation--previous"
|
|
4098
4098
|
], m = e.decreaseMonth;
|
|
4099
4099
|
(e.props.showMonthYearPicker || e.props.showQuarterYearPicker || e.props.showYearPicker) && (m = e.decreaseYear), d && e.props.showDisabledMonthNavigation && (f.push("react-datepicker__navigation--previous--disabled"), m = void 0);
|
|
4100
|
-
var g = e.props.showMonthYearPicker || e.props.showQuarterYearPicker || e.props.showYearPicker, h = e.props, D = h.previousMonthButtonLabel, w = D === void 0 ? n.defaultProps.previousMonthButtonLabel : D, b = h.previousYearButtonLabel,
|
|
4100
|
+
var g = e.props.showMonthYearPicker || e.props.showQuarterYearPicker || e.props.showYearPicker, h = e.props, D = h.previousMonthButtonLabel, w = D === void 0 ? n.defaultProps.previousMonthButtonLabel : D, b = h.previousYearButtonLabel, _ = b === void 0 ? n.defaultProps.previousYearButtonLabel : b, I = e.props, L = I.previousMonthAriaLabel, Y = L === void 0 ? typeof w == "string" ? w : "Previous Month" : L, C = I.previousYearAriaLabel, T = C === void 0 ? typeof _ == "string" ? _ : "Previous Year" : C;
|
|
4101
4101
|
return v.createElement(
|
|
4102
4102
|
"button",
|
|
4103
4103
|
{ type: "button", className: f.join(" "), onClick: m, onKeyDown: e.props.handleOnKeyDown, "aria-label": g ? T : Y },
|
|
4104
|
-
v.createElement("span", { className: p.join(" ") }, g ?
|
|
4104
|
+
v.createElement("span", { className: p.join(" ") }, g ? _ : w)
|
|
4105
4105
|
);
|
|
4106
4106
|
}
|
|
4107
4107
|
}
|
|
@@ -4544,7 +4544,7 @@ var yt = "Date input not valid.", qo = (
|
|
|
4544
4544
|
});
|
|
4545
4545
|
var p = e.props, f = p.selectsRange, m = p.startDate, g = p.endDate, h = (r = e.props.dateFormat) !== null && r !== void 0 ? r : n.defaultProps.dateFormat, D = (a = e.props.strictParsing) !== null && a !== void 0 ? a : n.defaultProps.strictParsing, w = d?.target instanceof HTMLInputElement ? d.target.value : "";
|
|
4546
4546
|
if (f) {
|
|
4547
|
-
var b = e.props.rangeSeparator,
|
|
4547
|
+
var b = e.props.rangeSeparator, _ = b.trim(), I = w.split(h.includes(_) ? b : _, 2).map(function(R) {
|
|
4548
4548
|
return R.trim();
|
|
4549
4549
|
}), L = I[0], Y = I[1], C = Ne(L ?? "", h, e.props.locale, D), T = C ? Ne(Y ?? "", h, e.props.locale, D) : null, W = m?.getTime() !== C?.getTime(), H = g?.getTime() !== T?.getTime();
|
|
4550
4550
|
if (!W && !H || C && oe(C, e.props) || T && oe(T, e.props))
|
|
@@ -4591,8 +4591,8 @@ var yt = "Date input not valid.", qo = (
|
|
|
4591
4591
|
})), e.props.inline || e.setState({
|
|
4592
4592
|
preSelection: c
|
|
4593
4593
|
}), e.props.focusSelectedMonth || e.setState({ monthSelectedIn: i })), f) {
|
|
4594
|
-
var
|
|
4595
|
-
|
|
4594
|
+
var _ = !m && !g, I = m && !g, L = !m && !!g, Y = m && g;
|
|
4595
|
+
_ ? p?.([c, null], a) : I ? c === null ? p?.([null, null], a) : Dt(c, m) ? p?.(b ? [c, m] : [c, null], a) : p?.([m, c], a) : L && (c && Dt(c, g) ? p?.([c, g], a) : p?.([c, null], a)), Y && p?.([c, null], a);
|
|
4596
4596
|
} else if (h) {
|
|
4597
4597
|
if (c !== null)
|
|
4598
4598
|
if (!D?.length)
|
|
@@ -4661,11 +4661,11 @@ var yt = "Date input not valid.", qo = (
|
|
|
4661
4661
|
preSelection: h,
|
|
4662
4662
|
inputValue: w
|
|
4663
4663
|
}), !(e.props.selectsRange || e.props.selectsMultiple)) {
|
|
4664
|
-
var b = e.props.selected ? e.props.selected : e.getPreSelection(),
|
|
4664
|
+
var b = e.props.selected ? e.props.selected : e.getPreSelection(), _ = e.props.selected ? h : $e(b, {
|
|
4665
4665
|
hour: se(h),
|
|
4666
4666
|
minute: ie(h)
|
|
4667
4667
|
});
|
|
4668
|
-
(l = (i = e.props).onChange) === null || l === void 0 || l.call(i,
|
|
4668
|
+
(l = (i = e.props).onChange) === null || l === void 0 || l.call(i, _), (e.props.showTimeSelectOnly || e.props.showTimeSelect) && e.setState({ isRenderAriaLiveMessage: !0 }), requestAnimationFrame(function() {
|
|
4669
4669
|
e.scrollToTimeOption(h);
|
|
4670
4670
|
});
|
|
4671
4671
|
}
|
|
@@ -4746,7 +4746,7 @@ var yt = "Date input not valid.", qo = (
|
|
|
4746
4746
|
});
|
|
4747
4747
|
}));
|
|
4748
4748
|
}, e.onDayKeyDown = function(r) {
|
|
4749
|
-
var a, s, i, l, u, c, d = e.props, p = d.minDate, f = d.maxDate, m = d.disabledKeyboardNavigation, g = d.showWeekPicker, h = d.shouldCloseOnSelect, D = d.locale, w = d.calendarStartDay, b = d.adjustDateOnChange,
|
|
4749
|
+
var a, s, i, l, u, c, d = e.props, p = d.minDate, f = d.maxDate, m = d.disabledKeyboardNavigation, g = d.showWeekPicker, h = d.shouldCloseOnSelect, D = d.locale, w = d.calendarStartDay, b = d.adjustDateOnChange, _ = d.inline;
|
|
4750
4750
|
if ((s = (a = e.props).onKeyDown) === null || s === void 0 || s.call(a, r), !m) {
|
|
4751
4751
|
var I = r.key, L = r.shiftKey, Y = O(e.state.preSelection), C = function(H, S) {
|
|
4752
4752
|
var R = S;
|
|
@@ -4811,7 +4811,7 @@ var yt = "Date input not valid.", qo = (
|
|
|
4811
4811
|
(c = (u = e.props).onInputError) === null || c === void 0 || c.call(u, { code: 1, msg: yt });
|
|
4812
4812
|
return;
|
|
4813
4813
|
}
|
|
4814
|
-
r.preventDefault(), e.setState({ lastPreSelectChange: wt }), b && e.setSelected(W), e.setPreSelection(W),
|
|
4814
|
+
r.preventDefault(), e.setState({ lastPreSelectChange: wt }), b && e.setSelected(W), e.setPreSelection(W), _ && e.setState({ shouldFocusDayInline: !0 });
|
|
4815
4815
|
}
|
|
4816
4816
|
}, e.onPopperKeyDown = function(r) {
|
|
4817
4817
|
var a = r.key;
|
|
@@ -4966,17 +4966,18 @@ const $o = pn(
|
|
|
4966
4966
|
hint: p,
|
|
4967
4967
|
feedback: f,
|
|
4968
4968
|
preventOpenOnFocus: m,
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4969
|
+
fixedPopper: g = !1,
|
|
4970
|
+
...h
|
|
4971
|
+
}, D) => {
|
|
4972
|
+
const w = fn(() => {
|
|
4972
4973
|
if (n == null) return null;
|
|
4973
|
-
const
|
|
4974
|
-
return nn(
|
|
4975
|
-
}, [n, s]),
|
|
4974
|
+
const _ = new fe(n, s);
|
|
4975
|
+
return nn(_) ? _ : n;
|
|
4976
|
+
}, [n, s]), b = a ?? Go(r);
|
|
4976
4977
|
return /* @__PURE__ */ ae.jsx(
|
|
4977
4978
|
an,
|
|
4978
4979
|
{
|
|
4979
|
-
...
|
|
4980
|
+
...h,
|
|
4980
4981
|
className: t,
|
|
4981
4982
|
hint: p,
|
|
4982
4983
|
feedback: f,
|
|
@@ -4985,14 +4986,17 @@ const $o = pn(
|
|
|
4985
4986
|
/* @__PURE__ */ ae.jsx(
|
|
4986
4987
|
qo,
|
|
4987
4988
|
{
|
|
4988
|
-
ref:
|
|
4989
|
-
|
|
4989
|
+
ref: D,
|
|
4990
|
+
popperProps: g ? {
|
|
4991
|
+
strategy: "fixed"
|
|
4992
|
+
} : void 0,
|
|
4993
|
+
selected: w,
|
|
4990
4994
|
onChange: o,
|
|
4991
|
-
dateFormat:
|
|
4995
|
+
dateFormat: b,
|
|
4992
4996
|
showTimeSelect: r,
|
|
4993
|
-
placeholderText: c === !0 ?
|
|
4997
|
+
placeholderText: c === !0 ? b.toLowerCase() : i,
|
|
4994
4998
|
minDate: l,
|
|
4995
|
-
openToDate:
|
|
4999
|
+
openToDate: w ?? l,
|
|
4996
5000
|
className: on(
|
|
4997
5001
|
"block w-full px-4 py-2.5 placeholder:text-gray-400 font-normal",
|
|
4998
5002
|
"rounded outline-0",
|
|
@@ -5004,7 +5008,7 @@ const $o = pn(
|
|
|
5004
5008
|
}
|
|
5005
5009
|
),
|
|
5006
5010
|
/* @__PURE__ */ ae.jsx("div", { className: "absolute top-0 bottom-0 right-4 flex items-center pointer-events-none touch-none", children: /* @__PURE__ */ ae.jsx(ln, {}) }),
|
|
5007
|
-
|
|
5011
|
+
w != null && d === !0 ? /* @__PURE__ */ ae.jsx(
|
|
5008
5012
|
"button",
|
|
5009
5013
|
{
|
|
5010
5014
|
type: "button",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as B, b as Ve, d as ke, e as Me, j as t, i as k, g as q, f as L, h as Re, u as Oe, k as Ee, I as v, D as S, l as A, n as g, o as y, p as _, q as z, B as V, r as j, T as $, s as ae, v as re, w as E, x as oe, y as Ie, z as ie, A as De, C as Y, S as X, H as qe, E as ue, F as Le, G as Fe, J as H, K as ze, L as Ge, M as Je } from "./main-
|
|
2
|
+
import { t as B, b as Ve, d as ke, e as Me, j as t, i as k, g as q, f as L, h as Re, u as Oe, k as Ee, I as v, D as S, l as A, n as g, o as y, p as _, q as z, B as V, r as j, T as $, s as ae, v as re, w as E, x as oe, y as Ie, z as ie, A as De, C as Y, S as X, H as qe, E as ue, F as Le, G as Fe, J as H, K as ze, L as Ge, M as Je } from "./main-BuFWdBkv.js";
|
|
3
3
|
import P, { useReducer as We, useCallback as M, useMemo as ce, createContext as Ue, useContext as Be, useState as x, useEffect as C, useRef as de } from "react";
|
|
4
4
|
import "react-hook-form";
|
|
5
5
|
import "wouter";
|
|
6
|
-
import { p as Z } from "./parseISO-
|
|
6
|
+
import { p as Z } from "./parseISO-CZGZrZsH.js";
|
|
7
7
|
function Q(e, s) {
|
|
8
8
|
const n = e.match(
|
|
9
9
|
/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/
|