@commercelayer/app-elements 1.14.5 → 1.15.0
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-Xu_WxUM4.js → InputDateComponent-BifqVA3t.js} +142 -145
- package/dist/helpers/route.d.ts +27 -1
- package/dist/{main-TnhZckKL.js → main-B_P2rWFk.js} +8933 -8836
- package/dist/main.d.ts +2 -0
- package/dist/main.js +173 -177
- package/dist/mocks/server.d.ts +1 -1
- package/dist/providers/TokenProvider/MockTokenProvider.d.ts +1 -1
- package/dist/providers/TokenProvider/TokenProvider.d.ts +11 -1
- package/dist/providers/TokenProvider/reducer.d.ts +0 -1
- package/dist/providers/TokenProvider/types.d.ts +31 -2
- package/dist/providers/createApp.d.ts +57 -0
- package/dist/style.css +1 -1
- package/dist/ui/atoms/PageHeading.d.ts +7 -7
- package/dist/ui/atoms/Tooltip.d.ts +1 -1
- package/dist/ui/composite/HomePageLayout.d.ts +16 -0
- package/dist/ui/composite/HomePageLayout.test.d.ts +1 -0
- package/dist/ui/composite/PageLayout.d.ts +1 -0
- package/dist/ui/forms/InputDate/InputDate.d.ts +1 -1
- package/dist/ui/forms/InputDate/InputDateComponent.d.ts +5 -1
- package/dist/ui/resources/ResourceLineItems/ResourceLineItems.mocks.d.ts +1 -1
- package/dist/ui/resources/ResourceListItem/ResourceListItem.mocks.d.ts +4 -4
- package/dist/vendor.css +1 -1
- package/package.json +10 -10
|
@@ -2,15 +2,11 @@
|
|
|
2
2
|
var ur = Object.defineProperty;
|
|
3
3
|
var lr = (a, n, e) => n in a ? ur(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e;
|
|
4
4
|
var D = (a, n, e) => (lr(a, typeof n != "symbol" ? n + "" : n, e), e);
|
|
5
|
-
import { a as Ut, c as pr, i as Fe, p as dr, b as hr, f as fr, o as mr, d as q, j as be, I as gr, g as yr, w as wr, X as Dr } from "./main-
|
|
5
|
+
import { a as Ut, c as pr, i as Fe, p as dr, b as hr, f as fr, o as mr, d as q, j as be, I as gr, g as yr, w as wr, X as Dr } from "./main-B_P2rWFk.js";
|
|
6
6
|
import * as C from "react";
|
|
7
7
|
import f, { createElement as vr, Component as br, useLayoutEffect as On, useEffect as Nn, createRef as kr, forwardRef as Mr } from "react";
|
|
8
8
|
import * as _r from "react-dom";
|
|
9
9
|
import Cr, { findDOMNode as xr } from "react-dom";
|
|
10
|
-
import "@commercelayer/sdk";
|
|
11
|
-
import "react-gtm-module";
|
|
12
|
-
import "react-hook-form";
|
|
13
|
-
import "query-string";
|
|
14
10
|
function Ce(a) {
|
|
15
11
|
return a instanceof Date || typeof a == "object" && Object.prototype.toString.call(a) === "[object Date]";
|
|
16
12
|
}
|
|
@@ -341,11 +337,11 @@ function Kr(a) {
|
|
|
341
337
|
return { value: o, rest: i };
|
|
342
338
|
};
|
|
343
339
|
}
|
|
344
|
-
const Vr = /^(\d+)(th|st|nd|rd)?/i, Ur = /\d+/i,
|
|
340
|
+
const Vr = /^(\d+)(th|st|nd|rd)?/i, Ur = /\d+/i, $r = {
|
|
345
341
|
narrow: /^(b|a)/i,
|
|
346
342
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
347
343
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
348
|
-
},
|
|
344
|
+
}, Xr = {
|
|
349
345
|
any: [/^b/i, /^(a|c)/i]
|
|
350
346
|
}, Gr = {
|
|
351
347
|
narrow: /^[1234]/i,
|
|
@@ -415,9 +411,9 @@ const Vr = /^(\d+)(th|st|nd|rd)?/i, Ur = /\d+/i, Xr = {
|
|
|
415
411
|
valueCallback: (a) => parseInt(a, 10)
|
|
416
412
|
}),
|
|
417
413
|
era: Ae({
|
|
418
|
-
matchPatterns:
|
|
414
|
+
matchPatterns: $r,
|
|
419
415
|
defaultMatchWidth: "wide",
|
|
420
|
-
parsePatterns:
|
|
416
|
+
parsePatterns: Xr,
|
|
421
417
|
defaultParseWidth: "any"
|
|
422
418
|
}),
|
|
423
419
|
quarter: Ae({
|
|
@@ -604,7 +600,7 @@ const he = {
|
|
|
604
600
|
afternoon: "afternoon",
|
|
605
601
|
evening: "evening",
|
|
606
602
|
night: "night"
|
|
607
|
-
},
|
|
603
|
+
}, $t = {
|
|
608
604
|
// Era
|
|
609
605
|
G: function(a, n, e) {
|
|
610
606
|
const t = a.getFullYear() > 0 ? 1 : 0;
|
|
@@ -1062,7 +1058,7 @@ const he = {
|
|
|
1062
1058
|
case "O":
|
|
1063
1059
|
case "OO":
|
|
1064
1060
|
case "OOO":
|
|
1065
|
-
return "GMT" +
|
|
1061
|
+
return "GMT" + Xt(t, ":");
|
|
1066
1062
|
case "OOOO":
|
|
1067
1063
|
default:
|
|
1068
1064
|
return "GMT" + ke(t, ":");
|
|
@@ -1075,7 +1071,7 @@ const he = {
|
|
|
1075
1071
|
case "z":
|
|
1076
1072
|
case "zz":
|
|
1077
1073
|
case "zzz":
|
|
1078
|
-
return "GMT" +
|
|
1074
|
+
return "GMT" + Xt(t, ":");
|
|
1079
1075
|
case "zzzz":
|
|
1080
1076
|
default:
|
|
1081
1077
|
return "GMT" + ke(t, ":");
|
|
@@ -1092,7 +1088,7 @@ const he = {
|
|
|
1092
1088
|
return N(t, n.length);
|
|
1093
1089
|
}
|
|
1094
1090
|
};
|
|
1095
|
-
function
|
|
1091
|
+
function Xt(a, n = "") {
|
|
1096
1092
|
const e = a > 0 ? "-" : "+", t = Math.abs(a), r = Math.trunc(t / 60), s = t % 60;
|
|
1097
1093
|
return s === 0 ? e + String(r) : e + String(r) + n + N(s, 2);
|
|
1098
1094
|
}
|
|
@@ -1169,8 +1165,8 @@ function ma(a, n, e) {
|
|
|
1169
1165
|
}
|
|
1170
1166
|
const ga = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ya = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, wa = /^'([^]*?)'?$/, Da = /''/g, va = /[a-zA-Z]/;
|
|
1171
1167
|
function Zt(a, n, e) {
|
|
1172
|
-
var d, h, g, m, y, w,
|
|
1173
|
-
const t = Pe(), r = (e == null ? void 0 : e.locale) ?? t.locale ?? Tn, s = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((h = (d = e == null ? void 0 : e.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? t.firstWeekContainsDate ?? ((m = (g = t.locale) == null ? void 0 : g.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, o = (e == null ? void 0 : e.weekStartsOn) ?? ((w = (y = e == null ? void 0 : e.locale) == null ? void 0 : y.options) == null ? void 0 : w.weekStartsOn) ?? t.weekStartsOn ?? ((
|
|
1168
|
+
var d, h, g, m, y, w, x, S;
|
|
1169
|
+
const t = Pe(), r = (e == null ? void 0 : e.locale) ?? t.locale ?? Tn, s = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((h = (d = e == null ? void 0 : e.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? t.firstWeekContainsDate ?? ((m = (g = t.locale) == null ? void 0 : g.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, o = (e == null ? void 0 : e.weekStartsOn) ?? ((w = (y = e == null ? void 0 : e.locale) == null ? void 0 : y.options) == null ? void 0 : w.weekStartsOn) ?? t.weekStartsOn ?? ((S = (x = t.locale) == null ? void 0 : x.options) == null ? void 0 : S.weekStartsOn) ?? 0, i = b(a);
|
|
1174
1170
|
if (!qe(i))
|
|
1175
1171
|
throw new RangeError("Invalid time value");
|
|
1176
1172
|
let c = n.match(ya).map((v) => {
|
|
@@ -1186,7 +1182,7 @@ function Zt(a, n, e) {
|
|
|
1186
1182
|
const _ = v[0];
|
|
1187
1183
|
if (_ === "'")
|
|
1188
1184
|
return { isToken: !1, value: ba(v) };
|
|
1189
|
-
if (
|
|
1185
|
+
if ($t[_])
|
|
1190
1186
|
return { isToken: !0, value: v };
|
|
1191
1187
|
if (_.match(va))
|
|
1192
1188
|
throw new RangeError(
|
|
@@ -1205,7 +1201,7 @@ function Zt(a, n, e) {
|
|
|
1205
1201
|
return v.value;
|
|
1206
1202
|
const _ = v.value;
|
|
1207
1203
|
(!(e != null && e.useAdditionalWeekYearTokens) && Wn(_) || !(e != null && e.useAdditionalDayOfYearTokens) && Fn(_)) && Pt(_, n, String(a));
|
|
1208
|
-
const E =
|
|
1204
|
+
const E = $t[_[0]];
|
|
1209
1205
|
return E(i, _, r.localize, u);
|
|
1210
1206
|
}).join("");
|
|
1211
1207
|
}
|
|
@@ -1283,14 +1279,14 @@ function Ca(a) {
|
|
|
1283
1279
|
function tn(a) {
|
|
1284
1280
|
return b(a).getDate();
|
|
1285
1281
|
}
|
|
1286
|
-
function
|
|
1282
|
+
function $(a) {
|
|
1287
1283
|
return b(a).getMonth();
|
|
1288
1284
|
}
|
|
1289
1285
|
function Te(a) {
|
|
1290
1286
|
const n = b(a);
|
|
1291
1287
|
return Math.trunc(n.getMonth() / 3) + 1;
|
|
1292
1288
|
}
|
|
1293
|
-
function
|
|
1289
|
+
function P(a) {
|
|
1294
1290
|
return b(a).getFullYear();
|
|
1295
1291
|
}
|
|
1296
1292
|
function Ot(a) {
|
|
@@ -1897,7 +1893,7 @@ class Ua extends O {
|
|
|
1897
1893
|
return e.setMonth((r - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
1898
1894
|
}
|
|
1899
1895
|
}
|
|
1900
|
-
class
|
|
1896
|
+
class $a extends O {
|
|
1901
1897
|
constructor() {
|
|
1902
1898
|
super(...arguments);
|
|
1903
1899
|
D(this, "incompatibleTokens", [
|
|
@@ -1959,7 +1955,7 @@ class Xa extends O {
|
|
|
1959
1955
|
return e.setMonth(r, 1), e.setHours(0, 0, 0, 0), e;
|
|
1960
1956
|
}
|
|
1961
1957
|
}
|
|
1962
|
-
class
|
|
1958
|
+
class Xa extends O {
|
|
1963
1959
|
constructor() {
|
|
1964
1960
|
super(...arguments);
|
|
1965
1961
|
D(this, "priority", 110);
|
|
@@ -2853,8 +2849,8 @@ const Co = {
|
|
|
2853
2849
|
u: new Ka(),
|
|
2854
2850
|
Q: new Va(),
|
|
2855
2851
|
q: new Ua(),
|
|
2856
|
-
M: new
|
|
2857
|
-
L: new
|
|
2852
|
+
M: new $a(),
|
|
2853
|
+
L: new Xa(),
|
|
2858
2854
|
w: new za(),
|
|
2859
2855
|
I: new Ja(),
|
|
2860
2856
|
d: new no(),
|
|
@@ -2879,8 +2875,8 @@ const Co = {
|
|
|
2879
2875
|
T: new _o()
|
|
2880
2876
|
}, xo = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, So = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Po = /^'([^]*?)'?$/, Eo = /''/g, Oo = /\S/, No = /[a-zA-Z]/;
|
|
2881
2877
|
function yt(a, n, e, t) {
|
|
2882
|
-
var w,
|
|
2883
|
-
const r = La(), s = (t == null ? void 0 : t.locale) ?? r.locale ?? Tn, o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((
|
|
2878
|
+
var w, x, S, v, _, E, L, W;
|
|
2879
|
+
const r = La(), s = (t == null ? void 0 : t.locale) ?? r.locale ?? Tn, o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((x = (w = t == null ? void 0 : t.locale) == null ? void 0 : w.options) == null ? void 0 : x.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((v = (S = r.locale) == null ? void 0 : S.options) == null ? void 0 : v.firstWeekContainsDate) ?? 1, i = (t == null ? void 0 : t.weekStartsOn) ?? ((E = (_ = t == null ? void 0 : t.locale) == null ? void 0 : _.options) == null ? void 0 : E.weekStartsOn) ?? r.weekStartsOn ?? ((W = (L = r.locale) == null ? void 0 : L.options) == null ? void 0 : W.weekStartsOn) ?? 0;
|
|
2884
2880
|
if (n === "")
|
|
2885
2881
|
return a === "" ? b(e) : T(e, NaN);
|
|
2886
2882
|
const c = {
|
|
@@ -3049,7 +3045,7 @@ function Qo(a) {
|
|
|
3049
3045
|
if (!n)
|
|
3050
3046
|
return 0;
|
|
3051
3047
|
const e = n[1] === "+" ? -1 : 1, t = parseInt(n[2]), r = n[3] && parseInt(n[3]) || 0;
|
|
3052
|
-
return
|
|
3048
|
+
return $o(t, r) ? e * (t * dt + r * pt) : NaN;
|
|
3053
3049
|
}
|
|
3054
3050
|
function Bo(a, n, e) {
|
|
3055
3051
|
const t = /* @__PURE__ */ new Date(0);
|
|
@@ -3073,10 +3069,10 @@ function Vo(a, n, e) {
|
|
|
3073
3069
|
function Uo(a, n, e) {
|
|
3074
3070
|
return a === 24 ? n === 0 && e === 0 : e >= 0 && e < 60 && n >= 0 && n < 60 && a >= 0 && a < 25;
|
|
3075
3071
|
}
|
|
3076
|
-
function
|
|
3072
|
+
function $o(a, n) {
|
|
3077
3073
|
return n >= 0 && n <= 59;
|
|
3078
3074
|
}
|
|
3079
|
-
function
|
|
3075
|
+
function Xo(a, n) {
|
|
3080
3076
|
a.prototype = Object.create(n.prototype), a.prototype.constructor = a, Yt(a, n);
|
|
3081
3077
|
}
|
|
3082
3078
|
function Yt(a, n) {
|
|
@@ -3137,7 +3133,7 @@ function on(a, n) {
|
|
|
3137
3133
|
function ht(a, n) {
|
|
3138
3134
|
var e, t, r = a.displayName || a.name || "Component";
|
|
3139
3135
|
return t = e = /* @__PURE__ */ function(s) {
|
|
3140
|
-
|
|
3136
|
+
Xo(o, s);
|
|
3141
3137
|
function o(c) {
|
|
3142
3138
|
var u;
|
|
3143
3139
|
return u = s.call(this, c) || this, u.__outsideClickHandler = function(d) {
|
|
@@ -3307,21 +3303,21 @@ function ss(a) {
|
|
|
3307
3303
|
isPositioned: !1
|
|
3308
3304
|
}), [g, m] = C.useState(t);
|
|
3309
3305
|
ct(g, t) || m(t);
|
|
3310
|
-
const [y, w] = C.useState(null), [
|
|
3311
|
-
|
|
3312
|
-
}, []), _ = C.useCallback((
|
|
3313
|
-
|
|
3314
|
-
}, []), E = s || y, L = o ||
|
|
3306
|
+
const [y, w] = C.useState(null), [x, S] = C.useState(null), v = C.useCallback((X) => {
|
|
3307
|
+
X !== W.current && (W.current = X, w(X));
|
|
3308
|
+
}, []), _ = C.useCallback((X) => {
|
|
3309
|
+
X !== M.current && (M.current = X, S(X));
|
|
3310
|
+
}, []), E = s || y, L = o || x, W = C.useRef(null), M = C.useRef(null), k = C.useRef(d), A = c != null, z = cn(c), ce = cn(r), te = C.useCallback(() => {
|
|
3315
3311
|
if (!W.current || !M.current)
|
|
3316
3312
|
return;
|
|
3317
|
-
const
|
|
3313
|
+
const X = {
|
|
3318
3314
|
placement: n,
|
|
3319
3315
|
strategy: e,
|
|
3320
3316
|
middleware: g
|
|
3321
3317
|
};
|
|
3322
|
-
ce.current && (
|
|
3318
|
+
ce.current && (X.platform = ce.current), pr(W.current, M.current, X).then((Xe) => {
|
|
3323
3319
|
const Ee = {
|
|
3324
|
-
|
|
3320
|
+
...Xe,
|
|
3325
3321
|
isPositioned: !0
|
|
3326
3322
|
};
|
|
3327
3323
|
ue.current && !ct(k.current, Ee) && (k.current = Ee, _r.flushSync(() => {
|
|
@@ -3330,8 +3326,8 @@ function ss(a) {
|
|
|
3330
3326
|
});
|
|
3331
3327
|
}, [g, n, e, ce]);
|
|
3332
3328
|
et(() => {
|
|
3333
|
-
u === !1 && k.current.isPositioned && (k.current.isPositioned = !1, h((
|
|
3334
|
-
|
|
3329
|
+
u === !1 && k.current.isPositioned && (k.current.isPositioned = !1, h((X) => ({
|
|
3330
|
+
...X,
|
|
3335
3331
|
isPositioned: !1
|
|
3336
3332
|
})));
|
|
3337
3333
|
}, [u]);
|
|
@@ -3345,7 +3341,7 @@ function ss(a) {
|
|
|
3345
3341
|
te();
|
|
3346
3342
|
}
|
|
3347
3343
|
}, [E, L, te, z, A]);
|
|
3348
|
-
const
|
|
3344
|
+
const $e = C.useMemo(() => ({
|
|
3349
3345
|
reference: W,
|
|
3350
3346
|
floating: M,
|
|
3351
3347
|
setReference: v,
|
|
@@ -3354,33 +3350,33 @@ function ss(a) {
|
|
|
3354
3350
|
reference: E,
|
|
3355
3351
|
floating: L
|
|
3356
3352
|
}), [E, L]), Vt = C.useMemo(() => {
|
|
3357
|
-
const
|
|
3353
|
+
const X = {
|
|
3358
3354
|
position: e,
|
|
3359
3355
|
left: 0,
|
|
3360
3356
|
top: 0
|
|
3361
3357
|
};
|
|
3362
3358
|
if (!ve.floating)
|
|
3363
|
-
return
|
|
3364
|
-
const
|
|
3359
|
+
return X;
|
|
3360
|
+
const Xe = sn(ve.floating, d.x), Ee = sn(ve.floating, d.y);
|
|
3365
3361
|
return i ? {
|
|
3366
|
-
|
|
3367
|
-
transform: "translate(" +
|
|
3362
|
+
...X,
|
|
3363
|
+
transform: "translate(" + Xe + "px, " + Ee + "px)",
|
|
3368
3364
|
...Un(ve.floating) >= 1.5 && {
|
|
3369
3365
|
willChange: "transform"
|
|
3370
3366
|
}
|
|
3371
3367
|
} : {
|
|
3372
3368
|
position: e,
|
|
3373
|
-
left:
|
|
3369
|
+
left: Xe,
|
|
3374
3370
|
top: Ee
|
|
3375
3371
|
};
|
|
3376
3372
|
}, [e, i, ve.floating, d.x, d.y]);
|
|
3377
3373
|
return C.useMemo(() => ({
|
|
3378
3374
|
...d,
|
|
3379
3375
|
update: te,
|
|
3380
|
-
refs:
|
|
3376
|
+
refs: $e,
|
|
3381
3377
|
elements: ve,
|
|
3382
3378
|
floatingStyles: Vt
|
|
3383
|
-
}), [d, te,
|
|
3379
|
+
}), [d, te, $e, ve, Vt]);
|
|
3384
3380
|
}
|
|
3385
3381
|
const is = C.useInsertionEffect, cs = is || ((a) => a());
|
|
3386
3382
|
function us(a) {
|
|
@@ -3396,7 +3392,7 @@ function us(a) {
|
|
|
3396
3392
|
return n.current == null ? void 0 : n.current(...t);
|
|
3397
3393
|
}, []);
|
|
3398
3394
|
}
|
|
3399
|
-
var
|
|
3395
|
+
var $n = typeof document < "u" ? On : Nn;
|
|
3400
3396
|
function Rt() {
|
|
3401
3397
|
return Rt = Object.assign ? Object.assign.bind() : function(a) {
|
|
3402
3398
|
for (var n = 1; n < arguments.length; n++) {
|
|
@@ -3411,13 +3407,13 @@ let vt = !1, ls = 0;
|
|
|
3411
3407
|
const un = () => "floating-ui-" + ls++;
|
|
3412
3408
|
function ps() {
|
|
3413
3409
|
const [a, n] = C.useState(() => vt ? un() : void 0);
|
|
3414
|
-
return
|
|
3410
|
+
return $n(() => {
|
|
3415
3411
|
a == null && n(un());
|
|
3416
3412
|
}, []), C.useEffect(() => {
|
|
3417
3413
|
vt || (vt = !0);
|
|
3418
3414
|
}, []), a;
|
|
3419
3415
|
}
|
|
3420
|
-
const ds = C.useId,
|
|
3416
|
+
const ds = C.useId, Xn = ds || ps, hs = /* @__PURE__ */ C.forwardRef(function(n, e) {
|
|
3421
3417
|
let {
|
|
3422
3418
|
context: {
|
|
3423
3419
|
placement: t,
|
|
@@ -3442,15 +3438,15 @@ const ds = C.useId, $n = ds || ps, hs = /* @__PURE__ */ C.forwardRef(function(n,
|
|
|
3442
3438
|
...w
|
|
3443
3439
|
} = n;
|
|
3444
3440
|
process.env.NODE_ENV !== "production" && (e || console.warn("Floating UI: The `ref` prop is required for the `FloatingArrow`", "component."));
|
|
3445
|
-
const
|
|
3441
|
+
const x = Xn();
|
|
3446
3442
|
if (!r)
|
|
3447
3443
|
return null;
|
|
3448
3444
|
u *= 2;
|
|
3449
|
-
const
|
|
3445
|
+
const S = u / 2, v = o / 2 * (c / -8 + 1), _ = i / 2 * c / 4, [E, L] = t.split("-"), W = dr.isRTL(r), M = !!g, k = E === "top" || E === "bottom", A = d && L === "end" ? "bottom" : "top";
|
|
3450
3446
|
let z = d && L === "end" ? "right" : "left";
|
|
3451
3447
|
d && W && (z = L === "end" ? "left" : "right");
|
|
3452
3448
|
const ce = (s == null ? void 0 : s.x) != null ? d || s.x : "", te = (s == null ? void 0 : s.y) != null ? d || s.y : "", ue = g || // biome-ignore lint/style/useTemplate: readability
|
|
3453
|
-
"M0,0" + (" H" + o) + (" L" + (o - v) + "," + (i - _)) + (" Q" + o / 2 + "," + i + " " + v + "," + (i - _)) + " Z",
|
|
3449
|
+
"M0,0" + (" H" + o) + (" L" + (o - v) + "," + (i - _)) + (" Q" + o / 2 + "," + i + " " + v + "," + (i - _)) + " Z", $e = {
|
|
3454
3450
|
top: M ? "rotate(180deg)" : "",
|
|
3455
3451
|
left: M ? "rotate(90deg)" : "rotate(-90deg)",
|
|
3456
3452
|
bottom: M ? "" : "rotate(180deg)",
|
|
@@ -3468,11 +3464,11 @@ const ds = C.useId, $n = ds || ps, hs = /* @__PURE__ */ C.forwardRef(function(n,
|
|
|
3468
3464
|
[z]: ce,
|
|
3469
3465
|
[A]: te,
|
|
3470
3466
|
[E]: k || M ? "100%" : "calc(100% - " + u / 2 + "px)",
|
|
3471
|
-
transform: "" +
|
|
3467
|
+
transform: "" + $e + (m ?? ""),
|
|
3472
3468
|
...y
|
|
3473
3469
|
}
|
|
3474
3470
|
}), u > 0 && /* @__PURE__ */ C.createElement("path", {
|
|
3475
|
-
clipPath: "url(#" +
|
|
3471
|
+
clipPath: "url(#" + x + ")",
|
|
3476
3472
|
fill: "none",
|
|
3477
3473
|
stroke: h,
|
|
3478
3474
|
strokeWidth: u + (g ? 0 : 1),
|
|
@@ -3481,10 +3477,10 @@ const ds = C.useId, $n = ds || ps, hs = /* @__PURE__ */ C.forwardRef(function(n,
|
|
|
3481
3477
|
stroke: u && !g ? w.fill : "none",
|
|
3482
3478
|
d: ue
|
|
3483
3479
|
}), /* @__PURE__ */ C.createElement("clipPath", {
|
|
3484
|
-
id:
|
|
3480
|
+
id: x
|
|
3485
3481
|
}, /* @__PURE__ */ C.createElement("rect", {
|
|
3486
|
-
x: -
|
|
3487
|
-
y:
|
|
3482
|
+
x: -S,
|
|
3483
|
+
y: S * (M ? -1 : 1),
|
|
3488
3484
|
width: o + u,
|
|
3489
3485
|
height: o
|
|
3490
3486
|
})));
|
|
@@ -3531,13 +3527,13 @@ function Ds(a) {
|
|
|
3531
3527
|
}
|
|
3532
3528
|
}
|
|
3533
3529
|
const [c, u] = C.useState(null), d = ((n = a.elements) == null ? void 0 : n.reference) || c, h = ss(a), g = ws(), m = ys() != null, y = us((k, A, z) => {
|
|
3534
|
-
k && (
|
|
3530
|
+
k && (x.current.openEvent = A), S.emit("openchange", {
|
|
3535
3531
|
open: k,
|
|
3536
3532
|
event: A,
|
|
3537
3533
|
reason: z,
|
|
3538
3534
|
nested: m
|
|
3539
3535
|
}), t == null || t(k, A, z);
|
|
3540
|
-
}), w = C.useRef(null),
|
|
3536
|
+
}), w = C.useRef(null), x = C.useRef({}), S = C.useState(() => fs())[0], v = Xn(), _ = C.useCallback((k) => {
|
|
3541
3537
|
const A = Fe(k) ? {
|
|
3542
3538
|
getBoundingClientRect: () => k.getBoundingClientRect(),
|
|
3543
3539
|
contextElement: k
|
|
@@ -3560,14 +3556,14 @@ function Ds(a) {
|
|
|
3560
3556
|
...h,
|
|
3561
3557
|
refs: L,
|
|
3562
3558
|
elements: W,
|
|
3563
|
-
dataRef:
|
|
3559
|
+
dataRef: x,
|
|
3564
3560
|
nodeId: r,
|
|
3565
3561
|
floatingId: v,
|
|
3566
|
-
events:
|
|
3562
|
+
events: S,
|
|
3567
3563
|
open: e,
|
|
3568
3564
|
onOpenChange: y
|
|
3569
|
-
}), [h, r, v,
|
|
3570
|
-
return
|
|
3565
|
+
}), [h, r, v, S, e, y, L, W]);
|
|
3566
|
+
return $n(() => {
|
|
3571
3567
|
const k = g == null ? void 0 : g.nodesRef.current.find((A) => A.id === r);
|
|
3572
3568
|
k && (k.context = M);
|
|
3573
3569
|
}), C.useMemo(() => ({
|
|
@@ -3827,7 +3823,7 @@ function Jn(a) {
|
|
|
3827
3823
|
}) || o && !o(I(a)) || !1;
|
|
3828
3824
|
}
|
|
3829
3825
|
function kt(a, n, e, t) {
|
|
3830
|
-
var r =
|
|
3826
|
+
var r = P(a), s = $(a), o = P(n), i = $(n), c = P(t);
|
|
3831
3827
|
return r === o && r === c ? s <= e && e <= i : r < o ? c === r && s <= e || c === o && i >= e || c < o && c > r : void 0;
|
|
3832
3828
|
}
|
|
3833
3829
|
function ks(a) {
|
|
@@ -3841,7 +3837,7 @@ function ks(a) {
|
|
|
3841
3837
|
function Mt(a, n, e) {
|
|
3842
3838
|
if (!qe(n) || !qe(e))
|
|
3843
3839
|
return !1;
|
|
3844
|
-
var t =
|
|
3840
|
+
var t = P(n), r = P(e);
|
|
3845
3841
|
return t <= a && r >= a;
|
|
3846
3842
|
}
|
|
3847
3843
|
function er(a) {
|
|
@@ -3853,7 +3849,7 @@ function er(a) {
|
|
|
3853
3849
|
}) || o && !o(I(i)) || !1;
|
|
3854
3850
|
}
|
|
3855
3851
|
function _t(a, n, e, t) {
|
|
3856
|
-
var r =
|
|
3852
|
+
var r = P(a), s = Te(a), o = P(n), i = Te(n), c = P(t);
|
|
3857
3853
|
return r === o && r === c ? s <= e && e <= i : r < o ? c === r && s <= e || c === o && i >= e || c < o && c > r : void 0;
|
|
3858
3854
|
}
|
|
3859
3855
|
function mt(a) {
|
|
@@ -3970,7 +3966,7 @@ function Mn(a) {
|
|
|
3970
3966
|
return a < 10 ? "0".concat(a) : "".concat(a);
|
|
3971
3967
|
}
|
|
3972
3968
|
function Ye(a) {
|
|
3973
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Be, e = Math.ceil(
|
|
3969
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Be, e = Math.ceil(P(a) / n) * n;
|
|
3974
3970
|
return { startPeriod: e - (n - 1), endPeriod: e };
|
|
3975
3971
|
}
|
|
3976
3972
|
function _n(a) {
|
|
@@ -3992,7 +3988,7 @@ function xn(a, n) {
|
|
|
3992
3988
|
function Cs(a, n, e, t) {
|
|
3993
3989
|
for (var r = [], s = 0; s < 2 * n + 1; s++) {
|
|
3994
3990
|
var o = a + n - s, i = !0;
|
|
3995
|
-
e && (i =
|
|
3991
|
+
e && (i = P(e) <= o), t && i && (i = P(t) >= o), i && r.push(o);
|
|
3996
3992
|
}
|
|
3997
3993
|
return r;
|
|
3998
3994
|
}
|
|
@@ -4002,7 +3998,7 @@ var xs = ht(function(a) {
|
|
|
4002
3998
|
K(this, n), l(p(t = j(this, n, [e])), "renderOptions", function() {
|
|
4003
3999
|
var i = t.props.year, c = t.state.yearsList.map(function(h) {
|
|
4004
4000
|
return f.createElement("div", { className: i === h ? "react-datepicker__year-option react-datepicker__year-option--selected_year" : "react-datepicker__year-option", key: h, onClick: t.onChange.bind(p(t), h), "aria-selected": i === h ? "true" : void 0 }, i === h ? f.createElement("span", { className: "react-datepicker__year-option--selected" }, "✓") : "", h);
|
|
4005
|
-
}), u = t.props.minDate ?
|
|
4001
|
+
}), u = t.props.minDate ? P(t.props.minDate) : null, d = t.props.maxDate ? P(t.props.maxDate) : null;
|
|
4006
4002
|
return d && t.state.yearsList.find(function(h) {
|
|
4007
4003
|
return h === d;
|
|
4008
4004
|
}) || c.unshift(f.createElement("div", { className: "react-datepicker__year-option", key: "upcoming", onClick: t.incrementYears }, f.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming" }))), u && t.state.yearsList.find(function(h) {
|
|
@@ -4044,7 +4040,7 @@ var xs = ht(function(a) {
|
|
|
4044
4040
|
for (var t = arguments.length, r = new Array(t), s = 0; s < t; s++)
|
|
4045
4041
|
r[s] = arguments[s];
|
|
4046
4042
|
return l(p(e = j(this, n, [].concat(r))), "state", { dropdownVisible: !1 }), l(p(e), "renderSelectOptions", function() {
|
|
4047
|
-
for (var o = e.props.minDate ?
|
|
4043
|
+
for (var o = e.props.minDate ? P(e.props.minDate) : 1900, i = e.props.maxDate ? P(e.props.maxDate) : 2100, c = [], u = o; u <= i; u++)
|
|
4048
4044
|
c.push(f.createElement("option", { key: u, value: u }, u));
|
|
4049
4045
|
return c;
|
|
4050
4046
|
}), l(p(e), "onSelectChange", function(o) {
|
|
@@ -4281,9 +4277,9 @@ var Ns = ht(function(a) {
|
|
|
4281
4277
|
var o = Ca(e.props.day);
|
|
4282
4278
|
return o === 0 || o === 6;
|
|
4283
4279
|
}), l(p(e), "isAfterMonth", function() {
|
|
4284
|
-
return e.props.month !== void 0 && (e.props.month + 1) % 12 ===
|
|
4280
|
+
return e.props.month !== void 0 && (e.props.month + 1) % 12 === $(e.props.day);
|
|
4285
4281
|
}), l(p(e), "isBeforeMonth", function() {
|
|
4286
|
-
return e.props.month !== void 0 && (
|
|
4282
|
+
return e.props.month !== void 0 && ($(e.props.day) + 1) % 12 === e.props.month;
|
|
4287
4283
|
}), l(p(e), "isCurrentDay", function() {
|
|
4288
4284
|
return e.isSameDay(I());
|
|
4289
4285
|
}), l(p(e), "isSelected", function() {
|
|
@@ -4447,15 +4443,15 @@ var Ls = function(a) {
|
|
|
4447
4443
|
var i = e.props.day, c = De(o, 6);
|
|
4448
4444
|
return Z(o, i) || Z(c, i);
|
|
4449
4445
|
}), l(p(e), "isCurrentMonth", function(o, i) {
|
|
4450
|
-
return
|
|
4446
|
+
return P(o) === P(I()) && i === $(I());
|
|
4451
4447
|
}), l(p(e), "isCurrentQuarter", function(o, i) {
|
|
4452
|
-
return
|
|
4448
|
+
return P(o) === P(I()) && i === Te(I());
|
|
4453
4449
|
}), l(p(e), "isSelectedMonth", function(o, i, c) {
|
|
4454
|
-
return
|
|
4450
|
+
return $(c) === i && P(o) === P(c);
|
|
4455
4451
|
}), l(p(e), "isSelectedQuarter", function(o, i, c) {
|
|
4456
|
-
return Te(o) === i &&
|
|
4452
|
+
return Te(o) === i && P(o) === P(c);
|
|
4457
4453
|
}), l(p(e), "renderWeeks", function() {
|
|
4458
|
-
for (var o = [], i = e.props.fixedHeight, c = 0, u = !1, d = J(ge(e.props.day), e.props.locale, e.props.calendarStartDay); o.push(f.createElement(Rs, { ariaLabelPrefix: e.props.weekAriaLabelPrefix, chooseDayAriaLabelPrefix: e.props.chooseDayAriaLabelPrefix, disabledDayAriaLabelPrefix: e.props.disabledDayAriaLabelPrefix, key: c, day: d, month:
|
|
4454
|
+
for (var o = [], i = e.props.fixedHeight, c = 0, u = !1, d = J(ge(e.props.day), e.props.locale, e.props.calendarStartDay); o.push(f.createElement(Rs, { ariaLabelPrefix: e.props.weekAriaLabelPrefix, chooseDayAriaLabelPrefix: e.props.chooseDayAriaLabelPrefix, disabledDayAriaLabelPrefix: e.props.disabledDayAriaLabelPrefix, key: c, day: d, month: $(e.props.day), onDayClick: e.handleDayClick, onDayMouseEnter: e.handleDayMouseEnter, onWeekSelect: e.props.onWeekSelect, formatWeekNumber: e.props.formatWeekNumber, locale: e.props.locale, minDate: e.props.minDate, maxDate: e.props.maxDate, excludeDates: e.props.excludeDates, excludeDateIntervals: e.props.excludeDateIntervals, includeDates: e.props.includeDates, includeDateIntervals: e.props.includeDateIntervals, inline: e.props.inline, shouldFocusDayInline: e.props.shouldFocusDayInline, highlightDates: e.props.highlightDates, holidays: e.props.holidays, selectingDate: e.props.selectingDate, filterDate: e.props.filterDate, preSelection: e.props.preSelection, selected: e.props.selected, selectsStart: e.props.selectsStart, selectsEnd: e.props.selectsEnd, selectsRange: e.props.selectsRange, selectsDisabledDaysInRange: e.props.selectsDisabledDaysInRange, showWeekNumber: e.props.showWeekNumbers, showWeekPicker: e.props.showWeekPicker, startDate: e.props.startDate, endDate: e.props.endDate, dayClassName: e.props.dayClassName, setOpen: e.props.setOpen, shouldCloseOnSelect: e.props.shouldCloseOnSelect, disabledKeyboardNavigation: e.props.disabledKeyboardNavigation, renderDayContents: e.props.renderDayContents, handleOnKeyDown: e.props.handleOnKeyDown, isInputFocused: e.props.isInputFocused, containerRef: e.props.containerRef, calendarStartDay: e.props.calendarStartDay, monthShowsDuplicateDaysEnd: e.props.monthShowsDuplicateDaysEnd, monthShowsDuplicateDaysStart: e.props.monthShowsDuplicateDaysStart })), !u; ) {
|
|
4459
4455
|
c++, d = at(d, 1);
|
|
4460
4456
|
var h = i && c >= 6, g = !i && !e.isWeekInMonth(d);
|
|
4461
4457
|
if (h || g) {
|
|
@@ -4474,7 +4470,7 @@ var Ls = function(a) {
|
|
|
4474
4470
|
}), l(p(e), "onMonthKeyDown", function(o, i) {
|
|
4475
4471
|
var c = e.props, u = c.selected, d = c.preSelection, h = c.disabledKeyboardNavigation, g = c.showTwoColumnMonthYearPicker, m = c.showFourColumnMonthYearPicker, y = c.setPreSelection, w = o.key;
|
|
4476
4472
|
if (w !== "Tab" && o.preventDefault(), !h) {
|
|
4477
|
-
var
|
|
4473
|
+
var x = Sn(m, g), S = Ct[x].verticalNavigationOffset, v = Ct[x].grid;
|
|
4478
4474
|
switch (w) {
|
|
4479
4475
|
case "Enter":
|
|
4480
4476
|
e.onMonthClick(o, i), y(u);
|
|
@@ -4486,10 +4482,10 @@ var Ls = function(a) {
|
|
|
4486
4482
|
e.handleMonthNavigation(i === 0 ? 11 : i - 1, Le(d, 1));
|
|
4487
4483
|
break;
|
|
4488
4484
|
case "ArrowUp":
|
|
4489
|
-
e.handleMonthNavigation(v[0].includes(i) ? i + 12 -
|
|
4485
|
+
e.handleMonthNavigation(v[0].includes(i) ? i + 12 - S : i - S, Le(d, S));
|
|
4490
4486
|
break;
|
|
4491
4487
|
case "ArrowDown":
|
|
4492
|
-
e.handleMonthNavigation(v[v.length - 1].includes(i) ? i - 12 +
|
|
4488
|
+
e.handleMonthNavigation(v[v.length - 1].includes(i) ? i - 12 + S : i + S, ee(d, S));
|
|
4493
4489
|
}
|
|
4494
4490
|
}
|
|
4495
4491
|
}), l(p(e), "onQuarterClick", function(o, i) {
|
|
@@ -4512,10 +4508,10 @@ var Ls = function(a) {
|
|
|
4512
4508
|
e.handleQuarterNavigation(i === 1 ? 4 : i - 1, _a(e.props.preSelection, 1));
|
|
4513
4509
|
}
|
|
4514
4510
|
}), l(p(e), "getMonthClassNames", function(o) {
|
|
4515
|
-
var i = e.props, c = i.day, u = i.startDate, d = i.endDate, h = i.selected, g = i.minDate, m = i.maxDate, y = i.preSelection, w = i.monthClassName,
|
|
4516
|
-
return q("react-datepicker__month-text", "react-datepicker__month-".concat(o), v, { "react-datepicker__month-text--disabled": (g || m ||
|
|
4511
|
+
var i = e.props, c = i.day, u = i.startDate, d = i.endDate, h = i.selected, g = i.minDate, m = i.maxDate, y = i.preSelection, w = i.monthClassName, x = i.excludeDates, S = i.includeDates, v = w ? w(G(c, o)) : void 0, _ = G(c, o);
|
|
4512
|
+
return q("react-datepicker__month-text", "react-datepicker__month-".concat(o), v, { "react-datepicker__month-text--disabled": (g || m || x || S) && Jn(_, e.props), "react-datepicker__month-text--selected": e.isSelectedMonth(c, o, h), "react-datepicker__month-text--keyboard-selected": !e.props.disabledKeyboardNavigation && $(y) === o, "react-datepicker__month-text--in-selecting-range": e.isInSelectingRangeMonth(o), "react-datepicker__month-text--in-range": kt(u, d, o, c), "react-datepicker__month-text--range-start": e.isRangeStartMonth(o), "react-datepicker__month-text--range-end": e.isRangeEndMonth(o), "react-datepicker__month-text--selecting-range-start": e.isSelectingMonthRangeStart(o), "react-datepicker__month-text--selecting-range-end": e.isSelectingMonthRangeEnd(o), "react-datepicker__month-text--today": e.isCurrentMonth(c, o) });
|
|
4517
4513
|
}), l(p(e), "getTabIndex", function(o) {
|
|
4518
|
-
var i =
|
|
4514
|
+
var i = $(e.props.preSelection);
|
|
4519
4515
|
return e.props.disabledKeyboardNavigation || o !== i ? "-1" : "0";
|
|
4520
4516
|
}), l(p(e), "getQuarterTabIndex", function(o) {
|
|
4521
4517
|
var i = Te(e.props.preSelection);
|
|
@@ -4598,19 +4594,19 @@ var Ls = function(a) {
|
|
|
4598
4594
|
}(u), m = g / c, y = 0; y < m; y++) {
|
|
4599
4595
|
var w = Et(d, y * c);
|
|
4600
4596
|
if (o.push(w), h) {
|
|
4601
|
-
var
|
|
4602
|
-
o = o.concat(
|
|
4597
|
+
var x = _s(d, w, y, c, h);
|
|
4598
|
+
o = o.concat(x);
|
|
4603
4599
|
}
|
|
4604
4600
|
}
|
|
4605
|
-
var
|
|
4601
|
+
var S = o.reduce(function(v, _) {
|
|
4606
4602
|
return _.getTime() <= u.getTime() ? _ : v;
|
|
4607
4603
|
}, o[0]);
|
|
4608
4604
|
return o.map(function(v, _) {
|
|
4609
4605
|
return f.createElement("li", { key: _, onClick: e.handleClick.bind(p(e), v), className: e.liClasses(v), ref: function(E) {
|
|
4610
|
-
v ===
|
|
4606
|
+
v === S && (e.centerLi = E);
|
|
4611
4607
|
}, onKeyDown: function(E) {
|
|
4612
4608
|
e.handleOnKeyDown(E, v);
|
|
4613
|
-
}, tabIndex: v ===
|
|
4609
|
+
}, tabIndex: v === S ? 0 : -1, role: "option", "aria-selected": e.isSelectedTime(v) ? "true" : void 0, "aria-disabled": e.isDisabledTime(v) ? "true" : void 0 }, R(v, i, e.props.locale));
|
|
4614
4610
|
});
|
|
4615
4611
|
}), e;
|
|
4616
4612
|
}
|
|
@@ -4656,7 +4652,7 @@ var Fs = function(a) {
|
|
|
4656
4652
|
}), l(p(t), "isSameDay", function(r, s) {
|
|
4657
4653
|
return Y(r, s);
|
|
4658
4654
|
}), l(p(t), "isCurrentYear", function(r) {
|
|
4659
|
-
return r ===
|
|
4655
|
+
return r === P(I());
|
|
4660
4656
|
}), l(p(t), "isRangeStart", function(r) {
|
|
4661
4657
|
return t.props.startDate && t.props.endDate && me(le(I(), r), t.props.startDate);
|
|
4662
4658
|
}), l(p(t), "isRangeEnd", function(r) {
|
|
@@ -4697,9 +4693,9 @@ var Fs = function(a) {
|
|
|
4697
4693
|
}
|
|
4698
4694
|
}), l(p(t), "getYearClassNames", function(r) {
|
|
4699
4695
|
var s = t.props, o = s.minDate, i = s.maxDate, c = s.selected, u = s.excludeDates, d = s.includeDates, h = s.filterDate;
|
|
4700
|
-
return q("react-datepicker__year-text", { "react-datepicker__year-text--selected": r ===
|
|
4696
|
+
return q("react-datepicker__year-text", { "react-datepicker__year-text--selected": r === P(c), "react-datepicker__year-text--disabled": (o || i || u || d || h) && er(r, t.props), "react-datepicker__year-text--keyboard-selected": t.isKeyboardSelected(r), "react-datepicker__year-text--range-start": t.isRangeStart(r), "react-datepicker__year-text--range-end": t.isRangeEnd(r), "react-datepicker__year-text--in-range": t.isInRange(r), "react-datepicker__year-text--in-selecting-range": t.isInSelectingRange(r), "react-datepicker__year-text--selecting-range-start": t.isSelectingRangeStart(r), "react-datepicker__year-text--selecting-range-end": t.isSelectingRangeEnd(r), "react-datepicker__year-text--today": t.isCurrentYear(r) });
|
|
4701
4697
|
}), l(p(t), "getYearTabIndex", function(r) {
|
|
4702
|
-
return t.props.disabledKeyboardNavigation ? "-1" : r ===
|
|
4698
|
+
return t.props.disabledKeyboardNavigation ? "-1" : r === P(t.props.preSelection) ? "0" : "-1";
|
|
4703
4699
|
}), l(p(t), "getYearContainerClassNames", function() {
|
|
4704
4700
|
var r = t.props, s = r.selectingDate, o = r.selectsStart, i = r.selectsEnd, c = r.selectsRange;
|
|
4705
4701
|
return q("react-datepicker__year", { "react-datepicker__year--selecting-range": s && (o || i || c) });
|
|
@@ -4812,7 +4808,7 @@ var Hs = ["react-datepicker__year-select", "react-datepicker__month-select", "re
|
|
|
4812
4808
|
}), l(p(t), "changeMonthYear", function(r) {
|
|
4813
4809
|
t.setState(function(s) {
|
|
4814
4810
|
var o = s.date;
|
|
4815
|
-
return { date: le(G(o,
|
|
4811
|
+
return { date: le(G(o, $(r)), P(r)) };
|
|
4816
4812
|
}, function() {
|
|
4817
4813
|
return t.handleMonthYearChange(t.state.date);
|
|
4818
4814
|
});
|
|
@@ -4847,8 +4843,8 @@ var Hs = ["react-datepicker__year-select", "react-datepicker__month-select", "re
|
|
|
4847
4843
|
r = vn(t.state.date, t.props);
|
|
4848
4844
|
break;
|
|
4849
4845
|
case t.props.showYearPicker:
|
|
4850
|
-
r = function(
|
|
4851
|
-
var
|
|
4846
|
+
r = function(x) {
|
|
4847
|
+
var S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, v = S.minDate, _ = S.yearItemNumber, E = _ === void 0 ? Be : _, L = Ye(Qe(Ke(x, E)), E).endPeriod, W = v && P(v);
|
|
4852
4848
|
return W && W > L || !1;
|
|
4853
4849
|
}(t.state.date, t.props);
|
|
4854
4850
|
break;
|
|
@@ -4877,8 +4873,8 @@ var Hs = ["react-datepicker__year-select", "react-datepicker__month-select", "re
|
|
|
4877
4873
|
r = bn(t.state.date, t.props);
|
|
4878
4874
|
break;
|
|
4879
4875
|
case t.props.showYearPicker:
|
|
4880
|
-
r = function(
|
|
4881
|
-
var
|
|
4876
|
+
r = function(x) {
|
|
4877
|
+
var S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, v = S.maxDate, _ = S.yearItemNumber, E = _ === void 0 ? Be : _, L = Ye(Re(x, E), E).startPeriod, W = v && P(v);
|
|
4882
4878
|
return W && W < L || !1;
|
|
4883
4879
|
}(t.state.date, t.props);
|
|
4884
4880
|
break;
|
|
@@ -4900,11 +4896,11 @@ var Hs = ["react-datepicker__year-select", "react-datepicker__month-select", "re
|
|
|
4900
4896
|
}), l(p(t), "renderYearDropdown", function() {
|
|
4901
4897
|
var r = arguments.length > 0 && arguments[0] !== void 0 && arguments[0];
|
|
4902
4898
|
if (t.props.showYearDropdown && !r)
|
|
4903
|
-
return f.createElement(Ss, { adjustDateOnChange: t.props.adjustDateOnChange, date: t.state.date, onSelect: t.props.onSelect, setOpen: t.props.setOpen, dropdownMode: t.props.dropdownMode, onChange: t.changeYear, minDate: t.props.minDate, maxDate: t.props.maxDate, year:
|
|
4899
|
+
return f.createElement(Ss, { adjustDateOnChange: t.props.adjustDateOnChange, date: t.state.date, onSelect: t.props.onSelect, setOpen: t.props.setOpen, dropdownMode: t.props.dropdownMode, onChange: t.changeYear, minDate: t.props.minDate, maxDate: t.props.maxDate, year: P(t.state.date), scrollableYearDropdown: t.props.scrollableYearDropdown, yearDropdownItemNumber: t.props.yearDropdownItemNumber });
|
|
4904
4900
|
}), l(p(t), "renderMonthDropdown", function() {
|
|
4905
4901
|
var r = arguments.length > 0 && arguments[0] !== void 0 && arguments[0];
|
|
4906
4902
|
if (t.props.showMonthDropdown && !r)
|
|
4907
|
-
return f.createElement(Es, { dropdownMode: t.props.dropdownMode, locale: t.props.locale, onChange: t.changeMonth, month:
|
|
4903
|
+
return f.createElement(Es, { dropdownMode: t.props.dropdownMode, locale: t.props.locale, onChange: t.changeMonth, month: $(t.state.date), useShortMonthInDropdown: t.props.useShortMonthInDropdown });
|
|
4908
4904
|
}), l(p(t), "renderMonthYearDropdown", function() {
|
|
4909
4905
|
var r = arguments.length > 0 && arguments[0] !== void 0 && arguments[0];
|
|
4910
4906
|
if (t.props.showMonthYearDropdown && !r)
|
|
@@ -4927,7 +4923,7 @@ var Hs = ["react-datepicker__year-select", "react-datepicker__month-select", "re
|
|
|
4927
4923
|
return f.createElement("div", { className: "react-datepicker__header react-datepicker__header--custom", onFocus: t.props.onDropdownFocus }, t.props.renderCustomHeader(pe(pe({}, t.state), {}, { customHeaderCount: o, monthDate: s, changeMonth: t.changeMonth, changeYear: t.changeYear, decreaseMonth: t.decreaseMonth, increaseMonth: t.increaseMonth, decreaseYear: t.decreaseYear, increaseYear: t.increaseYear, prevMonthButtonDisabled: i, nextMonthButtonDisabled: c, prevYearButtonDisabled: u, nextYearButtonDisabled: d })), h && f.createElement("div", { className: "react-datepicker__day-names" }, t.header(s)));
|
|
4928
4924
|
}), l(p(t), "renderYearHeader", function() {
|
|
4929
4925
|
var r = t.state.date, s = t.props, o = s.showYearPicker, i = Ye(r, s.yearItemNumber), c = i.startPeriod, u = i.endPeriod;
|
|
4930
|
-
return f.createElement("div", { className: "react-datepicker__header react-datepicker-year-header" }, o ? "".concat(c, " - ").concat(u) :
|
|
4926
|
+
return f.createElement("div", { className: "react-datepicker__header react-datepicker-year-header" }, o ? "".concat(c, " - ").concat(u) : P(r));
|
|
4931
4927
|
}), l(p(t), "renderHeader", function(r) {
|
|
4932
4928
|
switch (!0) {
|
|
4933
4929
|
case t.props.renderCustomHeader !== void 0:
|
|
@@ -4960,7 +4956,7 @@ var Hs = ["react-datepicker__year-select", "react-datepicker__month-select", "re
|
|
|
4960
4956
|
return f.createElement(Ws, { date: r, timeString: s, timeInputLabel: t.props.timeInputLabel, onChange: t.props.onTimeChange, customTimeInput: t.props.customTimeInput });
|
|
4961
4957
|
}), l(p(t), "renderAriaLiveRegion", function() {
|
|
4962
4958
|
var r, s = Ye(t.state.date, t.props.yearItemNumber), o = s.startPeriod, i = s.endPeriod;
|
|
4963
|
-
return r = t.props.showYearPicker ? "".concat(o, " - ").concat(i) : t.props.showMonthYearPicker || t.props.showQuarterYearPicker ?
|
|
4959
|
+
return r = t.props.showYearPicker ? "".concat(o, " - ").concat(i) : t.props.showMonthYearPicker || t.props.showQuarterYearPicker ? P(t.state.date) : "".concat(jt($(t.state.date), t.props.locale), " ").concat(P(t.state.date)), f.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, t.state.isRenderAriaLiveMessage && r);
|
|
4964
4960
|
}), l(p(t), "renderChildren", function() {
|
|
4965
4961
|
if (t.props.children)
|
|
4966
4962
|
return f.createElement("div", { className: "react-datepicker__children-container" }, t.props.children);
|
|
@@ -5034,8 +5030,8 @@ var Hs = ["react-datepicker__year-select", "react-datepicker__month-select", "re
|
|
|
5034
5030
|
e = f.createElement(cr, { enableTabLoop: u }, f.createElement("div", { ref: m.refs.setFloating, style: m.floatingStyles, className: w, "data-placement": m.placement, onKeyDown: d }, i, y && f.createElement(hs, { ref: m.arrowRef, context: m.context, fill: "currentColor", strokeWidth: 1, height: 8, width: 16, style: { transform: "translateY(-1px)" }, className: "react-datepicker__triangle" })));
|
|
5035
5031
|
}
|
|
5036
5032
|
this.props.popperContainer && (e = f.createElement(this.props.popperContainer, {}, e)), h && !o && (e = f.createElement(ir, { portalId: h, portalHost: g }, e));
|
|
5037
|
-
var
|
|
5038
|
-
return f.createElement(f.Fragment, null, f.createElement("div", { ref: m.refs.setReference, className:
|
|
5033
|
+
var x = q("react-datepicker-wrapper", s);
|
|
5034
|
+
return f.createElement(f.Fragment, null, f.createElement("div", { ref: m.refs.setReference, className: x }, c), e);
|
|
5039
5035
|
} }], [{ key: "defaultProps", get: function() {
|
|
5040
5036
|
return { hidePopper: !0 };
|
|
5041
5037
|
} }]), n;
|
|
@@ -5101,18 +5097,18 @@ var Hs = ["react-datepicker__year-select", "react-datepicker__month-select", "re
|
|
|
5101
5097
|
var i = s[0];
|
|
5102
5098
|
if (!t.props.onChangeRaw || (t.props.onChangeRaw.apply(p(t), s), typeof i.isDefaultPrevented == "function" && !i.isDefaultPrevented())) {
|
|
5103
5099
|
t.setState({ inputValue: i.target.value, lastPreSelectChange: Us });
|
|
5104
|
-
var c, u, d, h, g, m, y, w,
|
|
5105
|
-
var v = yt(c,
|
|
5106
|
-
h && (w = fe(v, g) && c === R(v,
|
|
5107
|
-
}), m) : (m = yt(c, u, /* @__PURE__ */ new Date(), { locale: y, useAdditionalWeekYearTokens: !0, useAdditionalDayOfYearTokens: !0 }), h ? w = fe(m) && c === R(m, u, d) : fe(m) || (u = u.match(bs).map(function(
|
|
5108
|
-
var v =
|
|
5100
|
+
var c, u, d, h, g, m, y, w, x = (c = i.target.value, u = t.props.dateFormat, d = t.props.locale, h = t.props.strictParsing, g = t.props.minDate, m = null, y = ye(d) || ye(_e()), w = !0, Array.isArray(u) ? (u.forEach(function(S) {
|
|
5101
|
+
var v = yt(c, S, /* @__PURE__ */ new Date(), { locale: y, useAdditionalWeekYearTokens: !0, useAdditionalDayOfYearTokens: !0 });
|
|
5102
|
+
h && (w = fe(v, g) && c === R(v, S, d)), fe(v, g) && w && (m = v);
|
|
5103
|
+
}), m) : (m = yt(c, u, /* @__PURE__ */ new Date(), { locale: y, useAdditionalWeekYearTokens: !0, useAdditionalDayOfYearTokens: !0 }), h ? w = fe(m) && c === R(m, u, d) : fe(m) || (u = u.match(bs).map(function(S) {
|
|
5104
|
+
var v = S[0];
|
|
5109
5105
|
if (v === "p" || v === "P") {
|
|
5110
5106
|
var _ = rt[v];
|
|
5111
|
-
return y ? _(
|
|
5107
|
+
return y ? _(S, y.formatLong) : v;
|
|
5112
5108
|
}
|
|
5113
|
-
return
|
|
5109
|
+
return S;
|
|
5114
5110
|
}).join(""), c.length > 0 && (m = yt(c, u.slice(0, c.length), /* @__PURE__ */ new Date(), { useAdditionalWeekYearTokens: !0, useAdditionalDayOfYearTokens: !0 })), fe(m) || (m = new Date(c))), fe(m) && w ? m : null));
|
|
5115
|
-
t.props.showTimeSelectOnly && t.props.selected &&
|
|
5111
|
+
t.props.showTimeSelectOnly && t.props.selected && x && !Y(x, t.props.selected) && (x = vs(t.props.selected, { hours: ie(x), minutes: se(x), seconds: en(x) })), !x && i.target.value || (t.props.showWeekPicker && (x = J(x, t.props.locale, t.props.calendarStartDay)), t.setSelected(x, i, !0));
|
|
5116
5112
|
}
|
|
5117
5113
|
}), l(p(t), "handleSelect", function(r, s, o) {
|
|
5118
5114
|
if (t.props.shouldCloseOnSelect && !t.props.showTimeSelect && t.sendFocusBackToInput(), t.props.onChangeRaw && t.props.onChangeRaw(s), t.props.showWeekPicker && (r = J(r, t.props.locale, t.props.calendarStartDay)), t.setSelected(r, s, !1, o), t.props.showDateSelect && t.setState({ isRenderAriaLiveMessage: !0 }), !t.props.shouldCloseOnSelect || t.props.showTimeSelect)
|
|
@@ -5125,7 +5121,7 @@ var Hs = ["react-datepicker__year-select", "react-datepicker__month-select", "re
|
|
|
5125
5121
|
}), l(p(t), "setSelected", function(r, s, o, i) {
|
|
5126
5122
|
var c = r;
|
|
5127
5123
|
if (t.props.showYearPicker) {
|
|
5128
|
-
if (c !== null && er(
|
|
5124
|
+
if (c !== null && er(P(c), t.props))
|
|
5129
5125
|
return;
|
|
5130
5126
|
} else if (t.props.showMonthYearPicker) {
|
|
5131
5127
|
if (c !== null && Jn(c, t.props))
|
|
@@ -5224,7 +5220,7 @@ var Hs = ["react-datepicker__year-select", "react-datepicker__month-select", "re
|
|
|
5224
5220
|
if (!c)
|
|
5225
5221
|
return void (t.props.onInputError && t.props.onInputError({ code: 1, msg: xt }));
|
|
5226
5222
|
if (r.preventDefault(), t.setState({ lastPreSelectChange: St }), t.props.adjustDateOnChange && t.setSelected(c), t.setPreSelection(c), t.props.inline) {
|
|
5227
|
-
var u =
|
|
5223
|
+
var u = $(i), d = $(c), h = P(i), g = P(c);
|
|
5228
5224
|
u !== d || h !== g ? t.setState({ shouldFocusDayInline: !0 }) : t.setState({ shouldFocusDayInline: !1 });
|
|
5229
5225
|
}
|
|
5230
5226
|
}
|
|
@@ -5262,7 +5258,7 @@ var Hs = ["react-datepicker__year-select", "react-datepicker__month-select", "re
|
|
|
5262
5258
|
window.addEventListener("scroll", this.onScroll, !0);
|
|
5263
5259
|
} }, { key: "componentDidUpdate", value: function(e, t) {
|
|
5264
5260
|
var r, s;
|
|
5265
|
-
e.inline && (r = e.selected, s = this.props.selected, r && s ?
|
|
5261
|
+
e.inline && (r = e.selected, s = this.props.selected, r && s ? $(r) !== $(s) || P(r) !== P(s) : r !== s) && this.setPreSelection(this.props.selected), this.state.monthSelectedIn !== void 0 && e.monthsShown !== this.props.monthsShown && this.setState({ monthSelectedIn: 0 }), e.highlightDates !== this.props.highlightDates && this.setState({ highlightDates: kn(this.props.highlightDates) }), t.focused || Me(e.selected, this.props.selected) || this.setState({ inputValue: null }), t.open !== this.state.open && (t.open === !1 && this.state.open === !0 && this.props.onCalendarOpen(), t.open === !0 && this.state.open === !1 && this.props.onCalendarClose());
|
|
5266
5262
|
} }, { key: "componentWillUnmount", value: function() {
|
|
5267
5263
|
this.clearPreventFocusTimeout(), window.removeEventListener("scroll", this.onScroll, !0);
|
|
5268
5264
|
} }, { key: "renderInputContainer", value: function() {
|
|
@@ -5293,55 +5289,57 @@ var Hs = ["react-datepicker__year-select", "react-datepicker__month-select", "re
|
|
|
5293
5289
|
}, monthsShown: 1, readOnly: !1, withPortal: !1, selectsDisabledDaysInRange: !1, shouldCloseOnSelect: !0, showTimeSelect: !1, showTimeInput: !1, showPreviousMonths: !1, showMonthYearPicker: !1, showFullMonthYearPicker: !1, showTwoColumnMonthYearPicker: !1, showFourColumnMonthYearPicker: !1, showYearPicker: !1, showQuarterYearPicker: !1, showWeekPicker: !1, strictParsing: !1, timeIntervals: 30, timeCaption: "Time", previousMonthAriaLabel: "Previous Month", previousMonthButtonLabel: "Previous Month", nextMonthAriaLabel: "Next Month", nextMonthButtonLabel: "Next Month", previousYearAriaLabel: "Previous Year", previousYearButtonLabel: "Previous Year", nextYearAriaLabel: "Next Year", nextYearButtonLabel: "Next Year", timeInputLabel: "Time", enableTabLoop: !0, yearItemNumber: Be, focusSelectedMonth: !1, showPopperArrow: !0, excludeScrollbar: !0, customTimeInput: null, calendarStartDay: void 0, toggleCalendarOnIconClick: !1 };
|
|
5294
5290
|
} }]), n;
|
|
5295
5291
|
}(), Us = "input", St = "navigate";
|
|
5296
|
-
const
|
|
5292
|
+
const $s = Mr(
|
|
5297
5293
|
({
|
|
5298
5294
|
onChange: a,
|
|
5299
5295
|
value: n,
|
|
5300
5296
|
wrapperClassName: e,
|
|
5301
5297
|
inputClassName: t,
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5298
|
+
showTimeSelect: r = !1,
|
|
5299
|
+
format: s,
|
|
5300
|
+
placeholder: o,
|
|
5301
|
+
minDate: i,
|
|
5302
|
+
label: c,
|
|
5303
|
+
autoPlaceholder: u,
|
|
5304
|
+
isClearable: d,
|
|
5305
|
+
hint: h,
|
|
5306
|
+
feedback: g,
|
|
5307
|
+
preventOpenOnFocus: m,
|
|
5308
|
+
...y
|
|
5309
|
+
}, w) => {
|
|
5310
|
+
const x = s ?? Xs(r);
|
|
5314
5311
|
return /* @__PURE__ */ be.jsx(
|
|
5315
5312
|
gr,
|
|
5316
5313
|
{
|
|
5317
|
-
...
|
|
5314
|
+
...y,
|
|
5318
5315
|
className: e,
|
|
5319
|
-
hint:
|
|
5320
|
-
feedback:
|
|
5321
|
-
label:
|
|
5316
|
+
hint: h,
|
|
5317
|
+
feedback: g,
|
|
5318
|
+
label: c,
|
|
5322
5319
|
children: /* @__PURE__ */ be.jsxs("div", { className: "relative w-full", children: [
|
|
5323
5320
|
/* @__PURE__ */ be.jsx(
|
|
5324
5321
|
Vs,
|
|
5325
5322
|
{
|
|
5326
|
-
ref:
|
|
5323
|
+
ref: w,
|
|
5327
5324
|
selected: n,
|
|
5328
5325
|
onChange: a,
|
|
5329
|
-
dateFormat:
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5326
|
+
dateFormat: x,
|
|
5327
|
+
showTimeSelect: r,
|
|
5328
|
+
placeholderText: u === !0 ? x.toLowerCase() : o,
|
|
5329
|
+
minDate: i,
|
|
5330
|
+
openToDate: n ?? i,
|
|
5333
5331
|
className: q(
|
|
5334
5332
|
"block w-full px-4 py-2.5 placeholder:text-gray-400 font-medium",
|
|
5335
5333
|
"rounded outline-0",
|
|
5336
5334
|
"transition duration-500 ease-in-out focus:outline-0 focus:border-primary-light",
|
|
5337
|
-
yr(
|
|
5335
|
+
yr(g),
|
|
5338
5336
|
t
|
|
5339
5337
|
),
|
|
5340
|
-
preventOpenOnFocus:
|
|
5338
|
+
preventOpenOnFocus: m
|
|
5341
5339
|
}
|
|
5342
5340
|
),
|
|
5343
5341
|
/* @__PURE__ */ be.jsx("div", { className: "absolute top-0 bottom-0 right-4 flex items-center pointer-events-none touch-none", children: /* @__PURE__ */ be.jsx(wr, {}) }),
|
|
5344
|
-
n != null &&
|
|
5342
|
+
n != null && d === !0 ? /* @__PURE__ */ be.jsx(
|
|
5345
5343
|
"button",
|
|
5346
5344
|
{
|
|
5347
5345
|
className: "absolute top-0 bottom-0 right-11 flex items-center",
|
|
@@ -5356,11 +5354,10 @@ const Xs = Mr(
|
|
|
5356
5354
|
);
|
|
5357
5355
|
}
|
|
5358
5356
|
);
|
|
5359
|
-
|
|
5360
|
-
function
|
|
5361
|
-
|
|
5362
|
-
return n = n.replace("15", "dd"), n = n.replace("12", "MM"), n = n.replace("2023", "yyyy"), n;
|
|
5357
|
+
$s.displayName = "InputDateComponent";
|
|
5358
|
+
function Xs(a) {
|
|
5359
|
+
return `${new Date(2023, 11, 15).toLocaleDateString().replace("15", "dd").replace("12", "MM").replace("2023", "yyyy")}${a ? ", h:mm aa" : ""}`;
|
|
5363
5360
|
}
|
|
5364
5361
|
export {
|
|
5365
|
-
|
|
5362
|
+
$s as InputDateComponent
|
|
5366
5363
|
};
|