@adyen/adyen-platform-experience-web 1.0.2 → 1.0.3

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.
Files changed (54) hide show
  1. package/dist/cjs/index.js +2 -2
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/es/components/internal/Calendar/calendar/facade/Calendar.js +221 -211
  4. package/dist/es/components/internal/Calendar/calendar/timeframe/frames/MonthFrame.js +103 -94
  5. package/dist/es/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.js +201 -200
  6. package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastNDays.js +19 -18
  7. package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetMonth.js +18 -17
  8. package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetWeek.js +17 -20
  9. package/dist/es/components/internal/Calendar/calendar/timerange/presets/yearToDate.js +9 -12
  10. package/dist/es/components/internal/Calendar/calendar/timerange/utils.js +39 -43
  11. package/dist/es/components/internal/Calendar/calendar/timeslice/TimeSlice.js +10 -10
  12. package/dist/es/components/internal/Calendar/calendar/timeslice/index.js +25 -26
  13. package/dist/es/components/internal/Calendar/calendar/utils.js +64 -16
  14. package/dist/es/components/internal/Calendar/hooks/useCalendar.js +40 -38
  15. package/dist/es/components/internal/Calendar/hooks/useTimezone.js +2 -2
  16. package/dist/es/components/internal/DatePicker/DatePicker.js +17 -16
  17. package/dist/es/components/internal/FilterBar/filters/AmountFilter/AmountFilter.js +14 -14
  18. package/dist/es/components/internal/FilterBar/filters/AmountFilter/RangeSelection.js +19 -17
  19. package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilterCore.js +81 -76
  20. package/dist/es/core/Http/utils.js +1 -1
  21. package/dist/es/core/Localization/datetime/restamper/utils.js +26 -26
  22. package/dist/es/core/core.js +1 -1
  23. package/dist/es/primitives/time/today/main.js +38 -43
  24. package/dist/style.css +1 -1
  25. package/dist/types/components/internal/Calendar/calendar/facade/Calendar.d.ts.map +1 -1
  26. package/dist/types/components/internal/Calendar/calendar/timeframe/frames/MonthFrame.d.ts +1 -1
  27. package/dist/types/components/internal/Calendar/calendar/timeframe/frames/MonthFrame.d.ts.map +1 -1
  28. package/dist/types/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.d.ts +3 -3
  29. package/dist/types/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.d.ts.map +1 -1
  30. package/dist/types/components/internal/Calendar/calendar/timeframe/frames/YearFrame.d.ts +1 -1
  31. package/dist/types/components/internal/Calendar/calendar/timeframe/frames/YearFrame.d.ts.map +1 -1
  32. package/dist/types/components/internal/Calendar/calendar/timerange/presets/lastNDays.d.ts.map +1 -1
  33. package/dist/types/components/internal/Calendar/calendar/timerange/presets/shared/offsetMonth.d.ts.map +1 -1
  34. package/dist/types/components/internal/Calendar/calendar/timerange/presets/shared/offsetWeek.d.ts.map +1 -1
  35. package/dist/types/components/internal/Calendar/calendar/timerange/presets/yearToDate.d.ts.map +1 -1
  36. package/dist/types/components/internal/Calendar/calendar/timerange/utils.d.ts +0 -5
  37. package/dist/types/components/internal/Calendar/calendar/timerange/utils.d.ts.map +1 -1
  38. package/dist/types/components/internal/Calendar/calendar/timeslice/TimeSlice.d.ts +2 -2
  39. package/dist/types/components/internal/Calendar/calendar/timeslice/TimeSlice.d.ts.map +1 -1
  40. package/dist/types/components/internal/Calendar/calendar/timeslice/index.d.ts.map +1 -1
  41. package/dist/types/components/internal/Calendar/calendar/types.d.ts +6 -1
  42. package/dist/types/components/internal/Calendar/calendar/types.d.ts.map +1 -1
  43. package/dist/types/components/internal/Calendar/calendar/utils.d.ts +13 -4
  44. package/dist/types/components/internal/Calendar/calendar/utils.d.ts.map +1 -1
  45. package/dist/types/components/internal/Calendar/hooks/useCalendar.d.ts +1 -1
  46. package/dist/types/components/internal/Calendar/hooks/useCalendar.d.ts.map +1 -1
  47. package/dist/types/components/internal/Calendar/types.d.ts +1 -0
  48. package/dist/types/components/internal/Calendar/types.d.ts.map +1 -1
  49. package/dist/types/components/internal/DatePicker/DatePicker.d.ts.map +1 -1
  50. package/dist/types/components/internal/FilterBar/filters/AmountFilter/RangeSelection.d.ts.map +1 -1
  51. package/dist/types/components/internal/FilterBar/filters/DateFilter/DateFilterCore.d.ts.map +1 -1
  52. package/dist/types/core/Localization/datetime/restamper/utils.d.ts.map +1 -1
  53. package/dist/types/primitives/time/today/main.d.ts.map +1 -1
  54. package/package.json +2 -1
@@ -1,36 +1,33 @@
1
1
  import p from "../../factory.js";
2
- import { offsetsForNDays as F, startOfDay as W, startOfWeekOffset as d, getRangeTimestampsContextIntegerPropertyFactory as k, nowTimestamp as E } from "../../utils.js";
3
- import { clamp as O } from "../../../../../../../utils/value/number.js";
4
- const r = 1, T = F(7), _ = k(0, 6, r), u = (f = 0) => {
5
- const s = ~~O(0, f, 1 / 0) || 0;
2
+ import { offsetsForNDays as D, getRangeTimestampsContextIntegerPropertyFactory as y, nowTimestamp as F } from "../../utils.js";
3
+ import { startOfWeek as W } from "../../../utils.js";
4
+ import { clamp as g } from "../../../../../../../utils/value/number.js";
5
+ const r = 1, k = D(7), E = y(0, 6, r), T = (s = 0) => {
6
+ const e = ~~g(0, s, 1 / 0) || 0;
6
7
  return (n = r) => {
7
- const D = s ? {
8
- offsets: T
8
+ const a = e ? {
9
+ offsets: k
9
10
  } : {
10
- to: E
11
- }, o = _(n);
11
+ to: F
12
+ }, o = E(n);
12
13
  return p({
13
14
  from: ({
14
- now: a,
15
+ now: f,
16
+ timezone: m,
15
17
  systemToTimezone: c,
16
18
  timezoneToSystem: i
17
19
  }) => {
18
- const t = new Date(a), m = new Date(i(a)), e = t.getDay() - m.getDay();
19
- if (W(t), e) {
20
- const g = e > 1 ? -1 : e < -1 ? 1 : e;
21
- t.setDate(t.getDate() - g);
22
- }
23
- const y = d(o.value, t.getDay()) - s * 7;
24
- return t.setDate(t.getDate() + y), c(t);
20
+ const t = new Date(i(W(f, m, o.value)));
21
+ return t.setDate(t.getDate() - e * 7), c(t);
25
22
  },
26
- ...D
23
+ ...a
27
24
  }, {
28
25
  firstWeekDay: o.descriptor
29
26
  })();
30
27
  };
31
- }, w = u;
28
+ }, d = T;
32
29
  export {
33
30
  r as DEFAULT_FIRST_WEEK_DAY,
34
- T as ONE_WEEK_OFFSETS,
35
- w as default
31
+ k as ONE_WEEK_OFFSETS,
32
+ d as default
36
33
  };
@@ -1,16 +1,13 @@
1
- import m from "../factory.js";
2
- import { startOfYear as l, nowTimestamp as n } from "../utils.js";
3
- const c = m({
1
+ import r from "../factory.js";
2
+ import { nowTimestamp as a } from "../utils.js";
3
+ import { startOfYear as e } from "../../utils.js";
4
+ const m = r({
4
5
  from: ({
5
6
  now: t,
6
- systemToTimezone: a,
7
- timezoneToSystem: r
8
- }) => {
9
- const e = new Date(t), o = new Date(r(t)), s = e.getFullYear() - o.getFullYear();
10
- return l(e), e.setFullYear(e.getFullYear() - s), a(e);
11
- },
12
- to: n
13
- }), u = c;
7
+ timezone: o
8
+ }) => e(t, o),
9
+ to: a
10
+ }), i = m;
14
11
  export {
15
- u as default
12
+ i as default
16
13
  };
@@ -1,59 +1,55 @@
1
- import { systemToTimezone as g, timezoneToSystem as T } from "../../../../../core/Localization/datetime/restamper/utils.js";
2
- import { clamp as u, isBitSafeInteger as l } from "../../../../../utils/value/number.js";
3
- import { enumerable as m, getter as z, hasOwnProperty as a } from "../../../../../utils/struct/property.js";
4
- import { struct as h } from "../../../../../utils/struct/main.js";
5
- import { isUndefined as O, isNullish as d, isFunction as w } from "../../../../../utils/value/is.js";
6
- const V = (t) => Object.freeze({
7
- systemToTimezone: m((e) => g(t, e)),
8
- timezoneToSystem: m((e) => T(t, e)),
9
- timezoneOffset: m((e) => t(e).offset)
10
- }), x = (t, e, s = t) => {
11
- const f = (n, r) => {
12
- let o = n;
13
- d(n) ? o = s : l(n) || (o = r ?? s);
14
- const i = u(t, o, e);
15
- return i === o ? i : r ?? s;
1
+ import { systemToTimezone as p, timezoneToSystem as g } from "../../../../../core/Localization/datetime/restamper/utils.js";
2
+ import { clamp as T, isBitSafeInteger as l } from "../../../../../utils/value/number.js";
3
+ import { enumerable as m, getter as z, hasOwnProperty as c } from "../../../../../utils/struct/property.js";
4
+ import { struct as u } from "../../../../../utils/struct/main.js";
5
+ import { isUndefined as d, isNullish as h, isFunction as w } from "../../../../../utils/value/is.js";
6
+ const O = (e) => Object.freeze({
7
+ systemToTimezone: m((t) => p(e, t)),
8
+ timezoneToSystem: m((t) => g(e, t)),
9
+ timezoneOffset: m((t) => e(t).offset)
10
+ }), V = (e, t, o = e) => {
11
+ const a = (n, i) => {
12
+ let s = n;
13
+ h(n) ? s = o : l(n) || (s = i ?? o);
14
+ const r = T(e, s, t);
15
+ return r === s ? r : i ?? o;
16
16
  };
17
17
  return (n) => {
18
- const r = z(() => o);
19
- let o = f(n);
20
- return h({
21
- value: r,
18
+ const i = z(() => s);
19
+ let s = a(n);
20
+ return u({
21
+ value: i,
22
22
  descriptor: m({
23
- ...r,
24
- set(i) {
25
- const p = o;
26
- o = f(i, o), p !== o && (this.now = this.now);
23
+ ...i,
24
+ set(r) {
25
+ const f = s;
26
+ s = a(r, s), f !== s && (this.now = this.now);
27
27
  }
28
28
  })
29
29
  });
30
30
  };
31
- }, M = (t, e) => (s) => w(s) ? s.call(t, e) : s, P = (t) => !a(t, "offsets"), S = (t) => a(t, "from"), j = ({
32
- now: t
33
- }) => t, D = (() => {
34
- const t = /* @__PURE__ */ new Map();
35
- return (e) => {
36
- let s = t.get(e);
37
- return O(s) && (s = Object.freeze([0, 0, e, 0, 0, 0, -1]), t.set(e, s)), s;
31
+ }, x = (e, t) => (o) => w(o) ? o.call(e, t) : o, P = (e) => !c(e, "offsets"), S = (e) => c(e, "from"), j = ({
32
+ now: e
33
+ }) => e, U = (() => {
34
+ const e = /* @__PURE__ */ new Map();
35
+ return (t) => {
36
+ let o = e.get(t);
37
+ return d(o) && (o = Object.freeze([0, 0, t, 0, 0, 0, -1]), e.set(t, o)), o;
38
38
  };
39
- })(), U = (t) => {
39
+ })(), W = (e) => {
40
40
  try {
41
- const e = t instanceof Date || +t === t ? t : void 0, s = new Date(e).getTime();
42
- return isNaN(s) ? void 0 : s;
41
+ const t = e instanceof Date || +e === e ? e : void 0, o = new Date(t).getTime();
42
+ return isNaN(o) ? void 0 : o;
43
43
  } catch {
44
44
  }
45
- }, c = (t) => t.setHours(0, 0, 0, 0), W = (t) => (c(t), t.setDate(1)), _ = (t) => (c(t), t.setMonth(0, 1)), B = (t, e = t) => 0 + (-e % 7 + (t - 7)) % 7;
45
+ };
46
46
  export {
47
- V as createRangeTimestampsConfigRestampingContext,
48
- M as getRangeTimestampsConfigParameterUnwrapper,
49
- x as getRangeTimestampsContextIntegerPropertyFactory,
47
+ O as createRangeTimestampsConfigRestampingContext,
48
+ x as getRangeTimestampsConfigParameterUnwrapper,
49
+ V as getRangeTimestampsContextIntegerPropertyFactory,
50
50
  S as isRangeTimestampsConfigWithFromOffsets,
51
51
  P as isRangeTimestampsConfigWithoutOffsets,
52
52
  j as nowTimestamp,
53
- D as offsetsForNDays,
54
- U as parseRangeTimestamp,
55
- c as startOfDay,
56
- W as startOfMonth,
57
- B as startOfWeekOffset,
58
- _ as startOfYear
53
+ U as offsetsForNDays,
54
+ W as parseRangeTimestamp
59
55
  };
@@ -16,27 +16,27 @@ var u = (i, t, s, T) => ({
16
16
  }
17
17
  });
18
18
  import { RANGE_FROM as l, RANGE_TO as d } from "../constants.js";
19
- import { computeTimestampOffset as o, getEdgesDistance as g } from "../utils.js";
19
+ import { computeTimestampOffset as o, getEdgesDistance as _ } from "../utils.js";
20
20
  var p, h, m, a, r;
21
- class N {
21
+ class w {
22
22
  constructor(...t) {
23
23
  n(this, p, 1 / 0);
24
24
  n(this, h, 1 / 0);
25
25
  n(this, m, -1 / 0);
26
26
  n(this, a, 0);
27
27
  n(this, r, 0);
28
- if (t.length >= 2) {
29
- let s = new Date(t[0]).getTime();
30
- if (typeof t[1] != "symbol")
31
- f(this, m, s || e(this, m)), f(this, h, new Date(t[1]).getTime() || e(this, h)), e(this, h) < e(this, m) && ([u(this, h)._, u(this, m)._] = [e(this, m), e(this, h)]), f(this, r, o(e(this, m))), f(this, a, o(e(this, h))), f(this, p, g(e(this, m), e(this, h)) + 1);
28
+ if (t.length >= 3) {
29
+ let s = new Date(t[1]).getTime();
30
+ if (typeof t[2] != "symbol")
31
+ f(this, m, s || e(this, m)), f(this, h, new Date(t[2]).getTime() || e(this, h)), e(this, h) < e(this, m) && ([u(this, h)._, u(this, m)._] = [e(this, m), e(this, h)]), f(this, r, o(e(this, m), t[0])), f(this, a, o(e(this, h), t[0])), f(this, p, _(e(this, m), e(this, h), t[0]) + 1);
32
32
  else if (!isNaN(s))
33
- switch (t[1]) {
33
+ switch (t[2]) {
34
34
  case d:
35
- f(this, h, s), f(this, a, o(e(this, h)));
35
+ f(this, h, s), f(this, a, o(e(this, h), t[0]));
36
36
  break;
37
37
  case l:
38
38
  default:
39
- f(this, m, s), f(this, r, o(e(this, m)));
39
+ f(this, m, s), f(this, r, o(e(this, m), t[0]));
40
40
  break;
41
41
  }
42
42
  }
@@ -59,5 +59,5 @@ class N {
59
59
  }
60
60
  p = new WeakMap(), h = new WeakMap(), m = new WeakMap(), a = new WeakMap(), r = new WeakMap();
61
61
  export {
62
- N as default
62
+ w as default
63
63
  };
@@ -1,33 +1,32 @@
1
- import m from "./TimeSlice.js";
2
- import { RANGE_FROM as n, RANGE_TO as a } from "../constants.js";
3
- import { struct as s } from "../../../../../utils/struct/main.js";
4
- const o = (...e) => {
5
- const t = new m(...e);
6
- return s({
7
- from: {
8
- value: t.startTimestamp
9
- },
10
- to: {
11
- value: t.endTimestamp
12
- },
1
+ import n from "./TimeSlice.js";
2
+ import { RANGE_FROM as c, RANGE_TO as l } from "../constants.js";
3
+ import { withTimezone as r } from "../utils.js";
4
+ import { struct as f } from "../../../../../utils/struct/main.js";
5
+ import { getter as o } from "../../../../../utils/struct/property.js";
6
+ const m = (...s) => {
7
+ let t = r().tz.current, e = new n(t, ...s);
8
+ return f({
9
+ from: o(() => e.startTimestamp, !1),
10
+ to: o(() => e.endTimestamp, !1),
13
11
  offsets: {
14
- value: s({
15
- from: {
16
- value: t.startTimestampOffset
17
- },
18
- to: {
19
- value: t.endTimestampOffset
20
- }
12
+ value: f({
13
+ from: o(() => e.startTimestampOffset, !1),
14
+ to: o(() => e.endTimestampOffset, !1)
21
15
  })
22
16
  },
23
- span: {
24
- value: t.numberOfMonths
17
+ span: o(() => e.numberOfMonths, !1),
18
+ timezone: {
19
+ ...o(() => t, !1),
20
+ set: (i) => {
21
+ const a = t;
22
+ t = r(i ?? void 0).tz.current, t !== a && (e = new n(t, ...s));
23
+ }
25
24
  }
26
25
  });
27
- }, r = o(), l = () => o(Date.now(), n), u = () => o(Date.now(), a), p = (...e) => e.length === 0 ? r : o(...e);
26
+ }, p = m(), N = () => m(Date.now(), c), O = () => m(Date.now(), l), d = (...s) => s.length === 0 ? p : m(...s);
28
27
  export {
29
- r as UNBOUNDED_SLICE,
30
- p as default,
31
- l as sinceNow,
32
- u as untilNow
28
+ p as UNBOUNDED_SLICE,
29
+ d as default,
30
+ N as sinceNow,
31
+ O as untilNow
33
32
  };
@@ -1,20 +1,68 @@
1
- import { isInfinity as c, mod as f } from "../../../../utils/value/number.js";
2
- import { isUndefined as g } from "../../../../utils/value/is.js";
3
- const h = (t) => c(t) ? 0 : t - new Date(t).setHours(0, 0, 0, 0), i = (t) => g(t) ? t : new Date(t), M = (t, n) => {
4
- if (c(t) || c(n))
5
- return 1 / 0;
6
- const e = new Date(t), o = new Date(n);
7
- return Math.abs(o.getMonth() - e.getMonth() + (o.getFullYear() - e.getFullYear()) * 12);
8
- }, l = (() => {
9
- const t = [31, [29, 28], 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
10
- return (n, e, o = 0) => {
11
- const a = n + o, r = f(a, 12), s = e + Math.floor(a / 12);
12
- return [r === 1 ? t[1][(s % 100 ? s % 4 : s % 400) && 1] : t[r], r, s];
1
+ import { BASE_FORMAT_OPTIONS as p, BASE_LOCALE as u } from "../../../../core/Localization/datetime/restamper/constants.js";
2
+ import { DEFAULT_DATETIME_FORMAT as f } from "../../../../core/Localization/constants/localization.js";
3
+ import O from "../../../../core/Localization/datetime/restamper/restamper.js";
4
+ import { timezoneToSystem as E, systemToTimezone as M } from "../../../../core/Localization/datetime/restamper/utils.js";
5
+ import { isInfinity as m, mod as g } from "../../../../utils/value/number.js";
6
+ import { identity as A } from "../../../../utils/common.js";
7
+ import { EMPTY_ARRAY as _, EMPTY_OBJECT as y } from "../../../../utils/value/constants.js";
8
+ import { isUndefined as S } from "../../../../utils/value/is.js";
9
+ const Y = /^(\d{2})\/(\d{2})\/(-?\d+),\s+(\d{2}):(\d{2}):(\d{2}).(\d{3})/, c = (t = A) => (e, o, ...n) => {
10
+ const s = d(o), r = new Date(E(s, e));
11
+ return r.setHours(0, 0, 0, 0), M(s, t(r, ...n));
12
+ }, z = c(), C = c((t) => t.setDate(1)), U = c((t) => t.setMonth(0, 1)), W = c((t, e) => {
13
+ const o = R(t.getDay(), e ?? 0);
14
+ return t.setDate(t.getDate() - o);
15
+ }), I = (t) => (t % 100 ? t % 4 : t % 400) === 0, Z = (t, e, o = 0) => {
16
+ const n = t + o, s = g(n, 12), r = e + Math.floor(n / 12);
17
+ let a = 31;
18
+ switch (s) {
19
+ case 1:
20
+ a = I(r) ? 29 : 28;
21
+ break;
22
+ case 3:
23
+ case 5:
24
+ case 8:
25
+ case 10:
26
+ a = 30;
27
+ break;
28
+ }
29
+ return [a, s, r];
30
+ }, R = (t, e = 0) => (7 - e + t) % 7, j = (t, e) => m(t) ? 0 : t - z(t, e), v = (t) => S(t) ? t : new Date(t), w = (t, e = y) => {
31
+ const o = d(e.timeZone), n = {
32
+ ...f,
33
+ ...e,
34
+ timeZone: o.tz.current
13
35
  };
36
+ return new Date(t).toLocaleDateString(u, n);
37
+ }, i = (t, e) => {
38
+ const o = w(t, {
39
+ ...p,
40
+ ...f,
41
+ timeZone: e,
42
+ hour12: !1
43
+ }), [, n = "", s = "", r = "", a = "", D = "", T = "", h = ""] = o.match(Y) ?? _;
44
+ return [+r, +n - 1, +s, +a % 24, +D, +T, +h];
45
+ }, G = (t, e, o) => {
46
+ if (m(t) || m(e))
47
+ return 1 / 0;
48
+ const [n, s] = i(t, o), [r, a] = i(e, o);
49
+ return Math.abs(a - s + (r - n) * 12);
50
+ }, d = (() => {
51
+ const t = O();
52
+ return (e) => (t.tz = void 0, t.tz = e, t);
14
53
  })();
15
54
  export {
16
- h as computeTimestampOffset,
17
- i as getDateObjectFromTimestamp,
18
- M as getEdgesDistance,
19
- l as getMonthDays
55
+ j as computeTimestampOffset,
56
+ v as getDateObjectFromTimestamp,
57
+ G as getEdgesDistance,
58
+ Z as getMonthDays,
59
+ i as getTimezoneDateParts,
60
+ w as getTimezoneDateString,
61
+ R as getWeekDayIndex,
62
+ I as isLeapYear,
63
+ z as startOfDay,
64
+ C as startOfMonth,
65
+ W as startOfWeek,
66
+ U as startOfYear,
67
+ d as withTimezone
20
68
  };
@@ -1,11 +1,11 @@
1
- import { useState as q, useMemo as l, useRef as J, useCallback as $, useImperativeHandle as y, useEffect as A } from "../../../../external/preact/hooks/dist/hooks.module.js";
2
- import z from "../../../../core/Context/useCoreContext.js";
3
- import { getDateObjectFromTimestamp as P } from "../calendar/utils.js";
4
- import G from "../../../../hooks/element/useFocusCursor.js";
1
+ import { useState as J, useMemo as l, useRef as $, useCallback as y, useImperativeHandle as G, useEffect as P } from "../../../../external/preact/hooks/dist/hooks.module.js";
2
+ import Q from "../../../../core/Context/useCoreContext.js";
3
+ import { getDateObjectFromTimestamp as K } from "../calendar/utils.js";
4
+ import U from "../../../../hooks/element/useFocusCursor.js";
5
5
  import n from "../calendar/facade/index.js";
6
6
  import { EMPTY_OBJECT as u } from "../../../../utils/value/constants.js";
7
- import { isFunction as K } from "../../../../utils/value/is.js";
8
- const Q = ({
7
+ import { isFunction as L } from "../../../../utils/value/is.js";
8
+ const X = ({
9
9
  blocks: a,
10
10
  controls: f,
11
11
  dynamicBlockRows: m,
@@ -13,24 +13,25 @@ const Q = ({
13
13
  highlight: p,
14
14
  locale: C,
15
15
  onHighlight: s,
16
- originDate: L,
16
+ originDate: w,
17
17
  renderControl: N,
18
18
  sinceDate: E,
19
- trackCurrentDay: M,
20
- untilDate: T,
21
- useYearView: d
22
- }, w) => {
19
+ timezone: M,
20
+ trackCurrentDay: T,
21
+ untilDate: d,
22
+ useYearView: b
23
+ }, B) => {
23
24
  const {
24
- i18n: b
25
- } = z(), [B, R] = q(performance.now()), O = l(() => n.slice(E, T), [E, T]), x = J(u), F = l(() => f ?? (K(N) ? n.controls.MINIMAL : n.controls.NONE), [f, N]), I = l(() => p ?? (K(s) ? n.highlight.ONE : n.highlight.NONE), [p, s]), {
25
+ i18n: O
26
+ } = Q(), [R, S] = J(performance.now()), x = l(() => n.slice(E, d), [E, d]), F = $(u), I = l(() => f ?? (L(N) ? n.controls.MINIMAL : n.controls.NONE), [f, N]), k = l(() => p ?? (L(s) ? n.highlight.ONE : n.highlight.NONE), [p, s]), {
26
27
  grid: t,
27
- kill: S
28
+ kill: _
28
29
  } = l(() => {
29
30
  const {
30
31
  grid: e,
31
32
  kill: r
32
33
  } = n(function() {
33
- R(performance.now()), x.current = this, !(o === e.highlight.from && h === e.highlight.to) && (o = e.highlight.from, h = e.highlight.to, s == null || s(o, h));
34
+ S(performance.now()), F.current = this, !(o === e.highlight.from && h === e.highlight.to) && (o = e.highlight.from, h = e.highlight.to, s == null || s(o, h));
34
35
  });
35
36
  let {
36
37
  from: o,
@@ -39,9 +40,9 @@ const Q = ({
39
40
  return e.config.cursorIndex = (i) => {
40
41
  let c = i.target;
41
42
  for (; c && c !== i.currentTarget; ) {
42
- const k = Number(c.dataset.cursorPosition);
43
- if (Number.isFinite(k))
44
- return k;
43
+ const A = Number(c.dataset.cursorPosition);
44
+ if (Number.isFinite(A))
45
+ return A;
45
46
  c = c.parentNode;
46
47
  }
47
48
  }, e.config.shiftFactor = function(i) {
@@ -51,7 +52,7 @@ const Q = ({
51
52
  grid: e,
52
53
  kill: r
53
54
  };
54
- }, []), _ = l(() => {
55
+ }, []), j = l(() => {
55
56
  const e = (r) => {
56
57
  t.cursor(r);
57
58
  };
@@ -63,10 +64,10 @@ const Q = ({
63
64
  t.cursor(r) && r.preventDefault();
64
65
  }
65
66
  };
66
- }, [t]), j = G($((e, r) => {
67
+ }, [t]), q = U(y((e, r) => {
67
68
  r instanceof Element && r.removeAttribute("aria-selected"), e instanceof Element && e.setAttribute("aria-selected", "true");
68
69
  }, []));
69
- return y(w, () => {
70
+ return G(B, () => {
70
71
  const {
71
72
  from: e,
72
73
  to: r
@@ -77,43 +78,44 @@ const Q = ({
77
78
  },
78
79
  get config() {
79
80
  return {
80
- ...x.current ?? u
81
+ ...F.current ?? u
81
82
  };
82
83
  },
83
84
  get from() {
84
- return P(e);
85
+ return K(e);
85
86
  },
86
87
  set from(o) {
87
88
  t != null && t.highlight && o && (t.highlight.from = o.getTime());
88
89
  },
89
90
  get to() {
90
- return P(r);
91
+ return K(r);
91
92
  },
92
93
  set to(o) {
93
94
  t != null && t.highlight && o && (t.highlight.to = o.getTime());
94
95
  }
95
96
  };
96
- }, [t, B]), A(() => {
97
+ }, [t, R]), P(() => {
97
98
  t.config({
98
99
  blocks: a,
99
- controls: F,
100
+ controls: I,
100
101
  firstWeekDay: g,
101
102
  fixedBlockHeight: !m,
102
- highlight: I,
103
- locale: C ?? b.locale,
104
- minified: d,
105
- timeslice: O,
106
- trackCurrentDay: M
103
+ highlight: k,
104
+ locale: C ?? O.locale,
105
+ minified: b,
106
+ timeslice: x,
107
+ timezone: M,
108
+ trackCurrentDay: T
107
109
  });
108
- }, [F, I, a, m, g, t, b, C, O, M, d]), A(() => {
109
- const e = [].concat(L).slice(0, 2).map(Number).filter(Boolean);
110
- return e[0] && (t.highlight.from = +e[0]), e[1] && (t.highlight.to = +e[1]), S;
110
+ }, [I, k, a, m, g, t, O, C, x, M, T, b]), P(() => {
111
+ const e = [].concat(w).slice(0, 2).map(Number).filter(Boolean);
112
+ return e[0] && (t.highlight.from = +e[0]), e[1] && (t.highlight.to = +e[1]), _;
111
113
  }, []), {
112
- cursorElementRef: j,
113
- cursorRootProps: _,
114
+ cursorElementRef: q,
115
+ cursorRootProps: j,
114
116
  grid: t
115
117
  };
116
- }, H = Q;
118
+ }, v = X;
117
119
  export {
118
- H as default
120
+ v as default
119
121
  };
@@ -10,13 +10,13 @@ const {
10
10
  getTimezoneTime: R,
11
11
  getUsedTimezone: U
12
12
  } = (() => {
13
- const n = /(\d{2}):(\d{2})(?=:\d{2}(?:\.\d+)?\s+([AP]M))/i, m = /^GMT|0(?=\d:00)|:00/g, e = M();
13
+ const n = /\d{2}:\d{2}(?=:\d{2}(?:\.\d+)?\s+([AP]M))/i, m = /^GMT|0(?=\d:00)|:00/g, e = M();
14
14
  return {
15
15
  getTimezoneTime: (t, i = Date.now()) => {
16
16
  e.tz = t;
17
17
  const {
18
18
  formatted: o
19
- } = e(i), [f = "", , , s = ""] = (o == null ? void 0 : o.match(n)) ?? F, u = l(o), z = `${f}${s && ` ${s}`}`, p = E(u).replace(m, "");
19
+ } = e(i), [f = "", s = ""] = (o == null ? void 0 : o.match(n)) ?? F, u = l(o), z = `${f}${s && ` ${s}`}`, p = E(u).replace(m, "");
20
20
  return [z, p];
21
21
  },
22
22
  getUsedTimezone: (t) => (e.tz = t, e.tz.current)
@@ -1,23 +1,23 @@
1
1
  import _ from "classnames";
2
2
  import { forwardRef as p } from "../../../external/preact/compat/dist/compat.module.js";
3
- import { useState as N, useMemo as r, useCallback as y } from "../../../external/preact/hooks/dist/hooks.module.js";
3
+ import { useState as y, useMemo as r, useCallback as N } from "../../../external/preact/hooks/dist/hooks.module.js";
4
4
  import O from "../../../core/Context/useCoreContext.js";
5
5
  import P from "../Calendar/hooks/useTimezone.js";
6
- import { DEFAULT_FIRST_WEEK_DAY as I } from "../Calendar/calendar/timerange/presets/shared/offsetWeek.js";
7
- import M from "../Calendar/hooks/useCalendarControlsRendering.js";
6
+ import { DEFAULT_FIRST_WEEK_DAY as D } from "../Calendar/calendar/timerange/presets/shared/offsetWeek.js";
7
+ import I from "../Calendar/hooks/useCalendarControlsRendering.js";
8
8
  import "./DatePicker.scss.js";
9
9
  import { jsx as n } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
10
- import v from "../../../hooks/useReflex/useReflex.js";
11
- import x from "./components/TimeRangeSelector/TimeRangeSelector.js";
12
- import D from "../Calendar/Calendar.js";
13
- import g from "../Calendar/calendar/facade/index.js";
10
+ import M from "../../../hooks/useReflex/useReflex.js";
11
+ import v from "./components/TimeRangeSelector/TimeRangeSelector.js";
12
+ import x from "../Calendar/Calendar.js";
13
+ import u from "../Calendar/calendar/facade/index.js";
14
14
  import { boolOrTrue as E } from "../../../utils/value/bool.js";
15
15
  import { EMPTY_OBJECT as S } from "../../../utils/value/constants.js";
16
16
  import { noop as A } from "../../../utils/common.js";
17
- const b = p((e, u) => {
17
+ const b = p((e, g) => {
18
18
  const {
19
19
  i18n: i
20
- } = O(), [T, k] = M(e.renderControl), [C, a] = N(performance.now()), t = r(() => E(e.showTimezoneInfo), [e.showTimezoneInfo]), {
20
+ } = O(), [T, k] = I(e.renderControl), [C, a] = y(performance.now()), t = r(() => E(e.showTimezoneInfo), [e.showTimezoneInfo]), {
21
21
  clockTime: m,
22
22
  GMTOffset: c
23
23
  } = P({
@@ -30,7 +30,7 @@ const b = p((e, u) => {
30
30
  offset: c,
31
31
  time: m
32
32
  }
33
- } : S, [c, m, t]), o = v(A, u), R = y(() => {
33
+ } : S, [c, m, t]), o = M(A, g), R = N(() => {
34
34
  var l, s, d, f, h;
35
35
  a(performance.now()), (l = o.current) != null && l.from && ((s = o.current) != null && s.to) && ((h = e.onHighlight) == null || h.call(e, +((d = o.current) == null ? void 0 : d.from), +((f = o.current) == null ? void 0 : f.to)));
36
36
  }, [a, e.onHighlight]);
@@ -38,7 +38,7 @@ const b = p((e, u) => {
38
38
  className: z,
39
39
  children: [n("div", {
40
40
  className: "adyen-pe-datepicker__selector-container",
41
- children: n(x, {
41
+ children: n(v, {
42
42
  now: e.now,
43
43
  calendarRef: o,
44
44
  onTimeRangeSelected: e.onPresetOptionSelected,
@@ -52,16 +52,17 @@ const b = p((e, u) => {
52
52
  role: "group",
53
53
  className: "adyen-pe-datepicker__controls",
54
54
  "aria-label": i.get("calendar.controls")
55
- }), n(D, {
55
+ }), n(x, {
56
56
  ...e,
57
57
  ref: o,
58
- firstWeekDay: I,
58
+ firstWeekDay: D,
59
59
  dynamicBlockRows: !0,
60
60
  onlyCellsWithin: !0,
61
- controls: e.controls ?? g.controls.MINIMAL,
62
- highlight: e.highlight ?? g.highlight.MANY,
61
+ controls: e.controls ?? u.controls.MINIMAL,
62
+ highlight: e.highlight ?? u.highlight.MANY,
63
63
  onHighlight: R,
64
- renderControl: T
64
+ renderControl: T,
65
+ trackCurrentDay: !0
65
66
  }), t && n("div", {
66
67
  className: "adyen-pe-datepicker__timezone",
67
68
  children: i.get("calendar.timezone", w)