impact-nova 2.5.9 → 2.5.11

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 (73) hide show
  1. package/dist/components/data/data-table/column-runtime-state-guard.js +42 -42
  2. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +15 -0
  3. package/dist/components/data/data-table/data-table-column-tree-cache.js +109 -80
  4. package/dist/components/data/data-table/use-data-table-column-list-sync.js +65 -62
  5. package/dist/components/data-display/calendar/calendar-apply-validation.d.ts +2 -0
  6. package/dist/components/data-display/calendar/calendar-apply-validation.js +64 -67
  7. package/dist/components/data-display/calendar/calendar-available-view.d.ts +27 -0
  8. package/dist/components/data-display/calendar/calendar-available-view.js +85 -0
  9. package/dist/components/data-display/calendar/calendar-day-picker-classnames.d.ts +6 -1
  10. package/dist/components/data-display/calendar/calendar-day-picker-classnames.js +31 -23
  11. package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +5 -2
  12. package/dist/components/data-display/calendar/calendar-day-picker-components.js +210 -167
  13. package/dist/components/data-display/calendar/calendar-day-picker-view.d.ts +3 -2
  14. package/dist/components/data-display/calendar/calendar-day-picker-view.js +126 -124
  15. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.d.ts +6 -0
  16. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.js +34 -18
  17. package/dist/components/data-display/calendar/calendar-month-utils.d.ts +5 -0
  18. package/dist/components/data-display/calendar/calendar-month-utils.js +85 -64
  19. package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +5 -1
  20. package/dist/components/data-display/calendar/calendar-padding-week.utils.js +20 -16
  21. package/dist/components/data-display/calendar/calendar-selection-appearance.d.ts +1 -0
  22. package/dist/components/data-display/calendar/calendar-selection-appearance.js +31 -30
  23. package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +3 -1
  24. package/dist/components/data-display/calendar/calendar-week-number-cell.js +68 -53
  25. package/dist/components/data-display/calendar/calendar-week-utils.d.ts +6 -0
  26. package/dist/components/data-display/calendar/calendar-week-utils.js +51 -47
  27. package/dist/components/data-display/calendar/calendar-year-panes.d.ts +2 -0
  28. package/dist/components/data-display/calendar/calendar-year-panes.js +3 -1
  29. package/dist/components/data-display/calendar/calendar.js +170 -165
  30. package/dist/components/data-display/calendar/calendar.types.d.ts +7 -0
  31. package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +5 -2
  32. package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +86 -76
  33. package/dist/components/data-display/calendar/use-calendar-state.d.ts +3 -1
  34. package/dist/components/data-display/calendar/use-calendar-state.js +403 -325
  35. package/dist/components/feedback/dialog/dialog.js +12 -12
  36. package/dist/components/feedback/sheet/sheet.js +22 -22
  37. package/dist/components/forms/date-picker/calendar-selection-adapters.d.ts +2 -0
  38. package/dist/components/forms/date-picker/calendar-selection-adapters.js +36 -31
  39. package/dist/components/forms/date-picker/date-input-behavior.d.ts +10 -0
  40. package/dist/components/forms/date-picker/date-input-behavior.js +111 -90
  41. package/dist/components/forms/date-picker/date-picker.js +74 -70
  42. package/dist/components/forms/date-picker/date-picker.types.d.ts +7 -0
  43. package/dist/components/forms/date-picker/date-range-picker.js +148 -144
  44. package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +2 -0
  45. package/dist/components/forms/date-picker/fiscal-pass-through.js +4 -2
  46. package/dist/components/forms/date-picker/month-picker.js +84 -80
  47. package/dist/components/forms/date-picker/month-range-picker.js +147 -143
  48. package/dist/components/forms/date-picker/multi-date-picker.js +53 -49
  49. package/dist/components/forms/date-picker/multi-month-picker.js +51 -47
  50. package/dist/components/forms/date-picker/multi-quarter-picker.js +48 -44
  51. package/dist/components/forms/date-picker/multi-week-picker.js +55 -51
  52. package/dist/components/forms/date-picker/multi-year-picker.js +50 -46
  53. package/dist/components/forms/date-picker/picker-story-layout.d.ts +2 -0
  54. package/dist/components/forms/date-picker/quarter-picker.js +48 -44
  55. package/dist/components/forms/date-picker/quarter-range-picker.js +47 -43
  56. package/dist/components/forms/date-picker/week-picker.js +86 -82
  57. package/dist/components/forms/date-picker/week-range-picker.js +171 -164
  58. package/dist/components/forms/date-picker/year-picker.js +49 -45
  59. package/dist/components/forms/date-picker/year-range-picker.js +49 -45
  60. package/dist/components/forms/select/components/SelectMenuPanel.js +3 -2
  61. package/dist/components/forms/select/select.js +1 -0
  62. package/dist/form-react/Fields/DateInputField.js +51 -50
  63. package/dist/form-react/Fields/DateRangeField.js +14 -13
  64. package/dist/form-react/Fields/MonthRangeField.js +29 -28
  65. package/dist/form-react/Fields/MultiMonthPickerField.js +13 -12
  66. package/dist/form-react/Fields/MultiWeekPickerField.js +18 -17
  67. package/dist/form-react/Fields/WeekRangePicker.js +48 -48
  68. package/dist/form-react/types/fields.types.d.ts +14 -0
  69. package/dist/impact-nova.css +1 -1
  70. package/dist/lib/overlay/overlay-portal-context.js +16 -16
  71. package/dist/llms/rules/installation.js +1 -1
  72. package/dist/llms/rules/requirements.js +1 -1
  73. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { cn as e } from "../../../lib/utils.js";
2
- const l = "h-9 w-9 min-h-9 min-w-9", y = "min-w-[292px]", d = "w-9 flex-shrink-0", s = "bg-accent", i = "bg-brand text-brand-foreground", c = "hover:bg-brand-strong hover:text-brand-foreground hover:border-transparent", a = "rounded-lg", I = "rounded-l-lg", k = "rounded-r-lg", u = e(
2
+ const l = "h-9 w-9 min-h-9 min-w-9", E = "min-w-[292px]", d = "w-9 flex-shrink-0", s = "bg-accent", c = "bg-brand text-brand-foreground", i = "hover:bg-brand-strong hover:text-brand-foreground hover:border-transparent", a = "rounded-lg", k = "rounded-l-lg", I = "rounded-r-lg", u = e(
3
3
  "flex items-center justify-center p-0 font-normal text-sm transition-colors",
4
4
  "border border-transparent",
5
5
  a,
@@ -8,65 +8,66 @@ const l = "h-9 w-9 min-h-9 min-w-9", y = "min-w-[292px]", d = "w-9 flex-shrink-0
8
8
  l,
9
9
  "rdp-day rdp-day_button"
10
10
  ), p = "hover:bg-accent hover:text-accent-foreground hover:border-transparent", m = "hover:bg-transparent hover:text-inherit hover:border-transparent", v = e(
11
- i,
12
11
  c,
12
+ i,
13
13
  a,
14
14
  "border-transparent"
15
- ), b = "text-accent-foreground rounded-none border-transparent", L = e(
15
+ ), b = "text-accent-foreground rounded-none border-transparent", B = e(
16
16
  "group/day relative select-none p-0 text-center flex-1 flex items-center justify-center",
17
17
  "h-9 [&:nth-child(2)]:pl-2 rdp-day"
18
- ), C = "calendar-interval-cap-start", S = e(s, "rounded-none"), N = "calendar-interval-cap-end", A = e(s, "rounded-none"), B = C, R = N, f = "text-[11px] font-medium text-content-icon", D = "text-brand group-has-[.rdp-selected]/week:text-brand group-hover/week:text-brand", O = e(
18
+ ), N = "calendar-interval-cap-start", L = e(s, "rounded-none"), C = "calendar-interval-cap-end", S = e(s, "rounded-none"), A = N, R = C, f = "text-[11px] font-medium text-content-icon", D = "text-brand group-has-[.rdp-selected]/week:text-brand group-hover/week:text-brand", O = "cursor-not-allowed text-content-placeholder opacity-50 group-hover/week:text-content-placeholder group-has-[.rdp-selected]/week:text-content-placeholder", H = e(
19
19
  "select-none flex items-center justify-center",
20
20
  f,
21
21
  l,
22
22
  d,
23
23
  "rdp-week_number"
24
- ), H = "group-data-[week-selected]/week:bg-accent", M = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring", o = e(
24
+ ), M = "group-data-[week-selected]/week:bg-accent", P = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring", o = e(
25
25
  "relative z-10 border border-transparent p-0 text-sm font-normal transition-colors",
26
26
  a,
27
27
  "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-ring focus-visible:ring-offset-0"
28
- ), g = e(i, c), h = "hover:border-brand hover:bg-accent hover:text-accent-foreground", x = "text-accent-foreground", T = "cursor-not-allowed text-content-placeholder opacity-50", P = s;
29
- function U(n, t) {
30
- const r = n === "point" || n === "interval-start" || n === "interval-end";
31
- return e(u, r ? v : n === "interval-middle" ? b : void 0, t === "week" ? r ? void 0 : m : n === "none" ? p : void 0);
28
+ ), g = e(c, i), h = "hover:border-brand hover:bg-accent hover:text-accent-foreground", x = "text-accent-foreground", w = "cursor-not-allowed text-content-placeholder opacity-50", U = s;
29
+ function F(t, n) {
30
+ const r = t === "point" || t === "interval-start" || t === "interval-end";
31
+ return e(u, r ? v : t === "interval-middle" ? b : void 0, n === "week" ? r ? void 0 : m : t === "none" ? p : void 0);
32
32
  }
33
- function F(n) {
34
- const { kind: t, disabled: r } = n;
35
- return r ? e(o, T) : t === "point" || t === "interval-start" || t === "interval-end" ? e(o, g) : t === "interval-middle" ? e(o, x) : e(o, h);
33
+ function j(t) {
34
+ const { kind: n, disabled: r } = t;
35
+ return r ? e(o, w) : n === "point" || n === "interval-start" || n === "interval-end" ? e(o, g) : n === "interval-middle" ? e(o, x) : e(o, h);
36
36
  }
37
37
  export {
38
38
  l as DAY_CELL_SIZE,
39
- y as DAY_MONTH_MIN_WIDTH,
39
+ E as DAY_MONTH_MIN_WIDTH,
40
40
  s as INTERVAL_TRACK,
41
- i as POINT_FILL,
42
- c as POINT_FILL_HOVER,
41
+ c as POINT_FILL,
42
+ i as POINT_FILL_HOVER,
43
43
  a as SELECTION_RADIUS,
44
- k as SELECTION_RADIUS_END,
45
- I as SELECTION_RADIUS_START,
44
+ I as SELECTION_RADIUS_END,
45
+ k as SELECTION_RADIUS_START,
46
46
  d as WEEK_GUTTER_RULE,
47
- U as dayButtonAppearanceClassName,
47
+ F as dayButtonAppearanceClassName,
48
48
  u as dayButtonBaseClassName,
49
49
  p as dayButtonHoverClassName,
50
50
  b as dayButtonMiddleClassName,
51
51
  v as dayButtonPointClassName,
52
52
  m as dayButtonWeekHoverClassName,
53
- L as dayCellBaseClassName,
54
- P as periodRangeTrackClassName,
55
- F as periodTileAppearanceClassName,
53
+ B as dayCellBaseClassName,
54
+ U as periodRangeTrackClassName,
55
+ j as periodTileAppearanceClassName,
56
56
  o as periodTileBaseClassName,
57
- T as periodTileDisabledClassName,
57
+ w as periodTileDisabledClassName,
58
58
  h as periodTileHoverClassName,
59
59
  x as periodTileMiddleClassName,
60
60
  g as periodTilePointClassName,
61
61
  R as previewCapEndCellClassName,
62
- B as previewCapStartCellClassName,
63
- A as previewCellClassName,
64
- N as rangeEndCellClassName,
65
- S as rangeMiddleCellClassName,
66
- C as rangeStartCellClassName,
67
- O as weekNumberBaseClassName,
68
- M as weekNumberFocusClassName,
62
+ A as previewCapStartCellClassName,
63
+ S as previewCellClassName,
64
+ C as rangeEndCellClassName,
65
+ L as rangeMiddleCellClassName,
66
+ N as rangeStartCellClassName,
67
+ H as weekNumberBaseClassName,
68
+ O as weekNumberBlockedClassName,
69
+ P as weekNumberFocusClassName,
69
70
  D as weekNumberInteractiveClassName,
70
- H as weekNumberSelectedFillClassName,
71
+ M as weekNumberSelectedFillClassName,
71
72
  f as weekNumberTypeClassName
72
73
  };
@@ -17,6 +17,8 @@ export interface CalendarWeekNumberCellProps {
17
17
  fiscalWeekAriaLabel?: (meta: DateCellMeta) => string;
18
18
  getCellMeta?: (date: Date) => DateCellMeta | undefined;
19
19
  onWeekSelect: (input: WeekPickerInput) => void;
20
+ blank?: boolean;
21
+ blocked?: boolean;
20
22
  className?: string;
21
23
  }
22
- export declare function CalendarWeekNumberCell({ week, weekStartsOn, pickerType, calendarKind, weekNumberLabel, weekLabel, fiscalWeekNumberLabel, fiscalWeekAriaLabel, getCellMeta, onWeekSelect, className, ...weekProps }: CalendarWeekNumberCellProps & React.HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
24
+ export declare function CalendarWeekNumberCell({ week, weekStartsOn, pickerType, calendarKind, weekNumberLabel, weekLabel, fiscalWeekNumberLabel, fiscalWeekAriaLabel, getCellMeta, onWeekSelect, blank, blocked, className, ...weekProps }: CalendarWeekNumberCellProps & React.HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
@@ -1,87 +1,102 @@
1
- import { jsx as n } from "react/jsx-runtime";
1
+ import { jsx as r } from "react/jsx-runtime";
2
2
  import "react";
3
- import { cn as k } from "../../../lib/utils.js";
4
- import { weekNumberBaseClassName as h, weekNumberInteractiveClassName as C, weekNumberSelectedFillClassName as M, weekNumberFocusClassName as v } from "./calendar-selection-appearance.js";
5
- function F(e, s) {
6
- const o = e.getFullYear(), u = e.getMonth(), c = (new Date(o, u, 1).getDay() + 7 - s) % 7, i = new Date(o, u, 1 - c), l = new Date(e), r = (e.getDay() + 7 - s) % 7;
7
- return l.setDate(e.getDate() - r), Math.round(
8
- (l.getTime() - i.getTime()) / (10080 * 60 * 1e3)
3
+ import { cn as w } from "../../../lib/utils.js";
4
+ import { weekNumberBaseClassName as k, weekNumberBlockedClassName as M, weekNumberInteractiveClassName as j, weekNumberSelectedFillClassName as F, weekNumberFocusClassName as W } from "./calendar-selection-appearance.js";
5
+ function B(e, n) {
6
+ const s = e.getFullYear(), h = e.getMonth(), o = (new Date(s, h, 1).getDay() + 7 - n) % 7, i = new Date(s, h, 1 - o), c = new Date(e), p = (e.getDay() + 7 - n) % 7;
7
+ return c.setDate(e.getDate() - p), Math.round(
8
+ (c.getTime() - i.getTime()) / (10080 * 60 * 1e3)
9
9
  ) + 1;
10
10
  }
11
- function O({
11
+ function S({
12
12
  week: e,
13
- weekStartsOn: s,
14
- pickerType: o,
15
- calendarKind: u = "gregorian",
16
- weekNumberLabel: y,
17
- weekLabel: D,
18
- fiscalWeekNumberLabel: c,
13
+ weekStartsOn: n,
14
+ pickerType: s,
15
+ calendarKind: h = "gregorian",
16
+ weekNumberLabel: N,
17
+ weekLabel: g,
18
+ fiscalWeekNumberLabel: o,
19
19
  fiscalWeekAriaLabel: i,
20
- getCellMeta: l,
21
- onWeekSelect: g,
22
- className: r,
23
- ...N
20
+ getCellMeta: c,
21
+ onWeekSelect: x,
22
+ blank: p = !1,
23
+ blocked: C = !1,
24
+ className: l,
25
+ ...v
24
26
  }) {
25
- const d = e.days.find((f) => !f.outside)?.date;
26
- if (!d)
27
- return /* @__PURE__ */ n(
27
+ const d = e.days.find((m) => !m.outside)?.date;
28
+ if (p || !d)
29
+ return /* @__PURE__ */ r(
28
30
  "th",
29
31
  {
30
32
  scope: "row",
31
33
  "aria-hidden": "true",
32
- className: k(
33
- h,
34
- r
34
+ className: w(
35
+ k,
36
+ l
35
37
  )
36
38
  }
37
39
  );
38
- const m = l?.(d), a = m?.fiscalWeek, w = F(d, s), p = a ?? w, b = a && c ? c(a) : y(p), x = a && m && i ? i(m) : D(w);
39
- if (o === "week") {
40
- const f = () => g(d);
41
- return /* @__PURE__ */ n(
40
+ const y = c?.(d), t = y?.fiscalWeek, f = B(d, n), u = t ?? f, D = t && o ? o(t) : N(u), b = t && y && i ? i(y) : g(f);
41
+ if (s === "week") {
42
+ if (C)
43
+ return /* @__PURE__ */ r(
44
+ "td",
45
+ {
46
+ "aria-label": b,
47
+ "aria-disabled": "true",
48
+ "data-week-index": f,
49
+ "data-week-number": u,
50
+ "data-fiscal-week": t,
51
+ className: w(k, l, M),
52
+ children: /* @__PURE__ */ r("div", { className: "flex h-9 w-full items-center justify-center text-center", children: D })
53
+ }
54
+ );
55
+ const m = () => x(d);
56
+ return /* @__PURE__ */ r(
42
57
  "td",
43
58
  {
44
- "aria-label": x,
45
- "data-week-index": w,
46
- "data-week-number": p,
47
- "data-fiscal-week": a,
59
+ "aria-label": b,
60
+ "data-week-index": f,
61
+ "data-week-number": u,
62
+ "data-fiscal-week": t,
48
63
  "data-selection": "period-row",
49
64
  tabIndex: 0,
50
65
  role: "button",
51
- className: k(
52
- h,
53
- v,
54
- M,
55
- C,
66
+ className: w(
67
+ k,
68
+ W,
69
+ F,
70
+ j,
56
71
  "cursor-pointer transition-colors",
57
- r
72
+ l
58
73
  ),
59
- onClick: (t) => {
60
- t.preventDefault(), t.stopPropagation(), f();
74
+ onClick: (a) => {
75
+ a.preventDefault(), a.stopPropagation(), m();
61
76
  },
62
- onKeyDown: (t) => {
63
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), f());
77
+ onKeyDown: (a) => {
78
+ (a.key === "Enter" || a.key === " ") && (a.preventDefault(), a.stopPropagation(), m());
64
79
  },
65
- children: /* @__PURE__ */ n("div", { className: "flex h-9 w-full items-center justify-center text-center", children: b })
80
+ children: /* @__PURE__ */ r("div", { className: "flex h-9 w-full items-center justify-center text-center", children: D })
66
81
  }
67
82
  );
68
83
  }
69
- return /* @__PURE__ */ n(
84
+ return /* @__PURE__ */ r(
70
85
  "th",
71
86
  {
72
- ...N,
73
- "aria-label": x,
74
- "data-week-number": p,
75
- "data-fiscal-week": a,
76
- className: k(
77
- h,
78
- r
87
+ ...v,
88
+ "aria-label": b,
89
+ "data-week-number": u,
90
+ "data-fiscal-week": t,
91
+ className: w(
92
+ k,
93
+ l
79
94
  ),
80
95
  scope: "row",
81
- children: /* @__PURE__ */ n("div", { className: "flex h-9 w-full items-center justify-center text-center whitespace-nowrap", children: b })
96
+ children: /* @__PURE__ */ r("div", { className: "flex h-9 w-full items-center justify-center text-center whitespace-nowrap", children: D })
82
97
  }
83
98
  );
84
99
  }
85
100
  export {
86
- O as CalendarWeekNumberCell
101
+ S as CalendarWeekNumberCell
87
102
  };
@@ -14,6 +14,12 @@ export declare function fiscalPeriodForWeek(week: {
14
14
  }, getCellMeta?: (date: Date) => {
15
15
  fiscalPeriod?: number;
16
16
  } | undefined): number | undefined;
17
+ /** A fiscal week belongs to one period pane. Other panes keep a blank reserved row. */
18
+ export declare function isForeignFiscalWeekRow(options: {
19
+ calendarKind: CalendarKind;
20
+ weekPeriod?: number;
21
+ panePeriod?: number;
22
+ }): boolean;
17
23
  export declare function isSameWeek(w1: WeekSelection, w2: WeekSelection): boolean;
18
24
  export declare function calculateWeekSelection(weekOrDate: WeekPickerInput, options: {
19
25
  calendarKind: CalendarKind;
@@ -1,71 +1,74 @@
1
- import { civilFromLocalDate as m } from "../../../lib/fiscal-calendar/civil-date.js";
2
- import { resolveWeekSelection as T } from "../../../lib/fiscal-calendar/week-selection.js";
3
- function A(t, n) {
4
- const o = t.days.find((e) => !e.outside)?.date ?? t.days[0]?.date;
1
+ import { civilFromLocalDate as l } from "../../../lib/fiscal-calendar/civil-date.js";
2
+ import { resolveWeekSelection as W } from "../../../lib/fiscal-calendar/week-selection.js";
3
+ function v(e, n) {
4
+ const o = e.days[0]?.date;
5
5
  if (o)
6
6
  return n?.(o)?.fiscalPeriod;
7
7
  }
8
- function d(t, n) {
9
- return t.year === n.year && t.month === n.month && t.weekOfMonth === n.weekOfMonth;
8
+ function A(e) {
9
+ return e.calendarKind !== "fiscal" || e.weekPeriod == null || e.panePeriod == null ? !1 : e.weekPeriod !== e.panePeriod;
10
10
  }
11
- function _(t, n) {
12
- const o = t instanceof Date ? t : t.days.find((e) => !e.outside)?.date ?? t.days[0]?.date ?? /* @__PURE__ */ new Date();
13
- return T(o, n);
11
+ function m(e, n) {
12
+ return e.year === n.year && e.month === n.month && e.weekOfMonth === n.weekOfMonth;
14
13
  }
15
- function E(t, n, o) {
16
- if (o === "single") return t;
14
+ function _(e, n) {
15
+ const o = e instanceof Date ? e : e.days.find((t) => !t.outside)?.date ?? e.days[0]?.date ?? /* @__PURE__ */ new Date();
16
+ return W(o, n);
17
+ }
18
+ function E(e, n, o) {
19
+ if (o === "single") return e;
17
20
  if (o === "multiple") {
18
21
  const a = n || [];
19
- return a.some((f) => d(f, t)) ? a.filter((f) => !d(f, t)) : [...a, t];
22
+ return a.some((f) => m(f, e)) ? a.filter((f) => !m(f, e)) : [...a, e];
20
23
  }
21
- const e = n;
22
- if (!e?.from || e.to) return { from: t };
23
- if (d(t, e.from)) return e;
24
- const s = { from: e.from, to: t };
25
- return t.startDate < e.from.startDate && (s.from = t, s.to = e.from), s;
24
+ const t = n;
25
+ if (!t?.from || t.to) return { from: e };
26
+ if (m(e, t.from)) return t;
27
+ const s = { from: t.from, to: e };
28
+ return e.startDate < t.from.startDate && (s.from = e, s.to = t.from), s;
26
29
  }
27
- function x(t) {
28
- if (!t) return;
29
- const n = [], o = (e) => {
30
- const s = new Date(e.startDate);
30
+ function x(e) {
31
+ if (!e) return;
32
+ const n = [], o = (t) => {
33
+ const s = new Date(t.startDate);
31
34
  s.setHours(0, 0, 0, 0);
32
- const a = new Date(e.endDate);
35
+ const a = new Date(t.endDate);
33
36
  for (a.setHours(0, 0, 0, 0); s <= a; )
34
37
  n.push(new Date(s)), s.setDate(s.getDate() + 1);
35
38
  };
36
- if (Array.isArray(t))
37
- t.forEach(o);
38
- else if ("from" in t) {
39
- if (t.from)
40
- if (!t.to)
41
- o(t.from);
39
+ if (Array.isArray(e))
40
+ e.forEach(o);
41
+ else if ("from" in e) {
42
+ if (e.from)
43
+ if (!e.to)
44
+ o(e.from);
42
45
  else {
43
- const e = new Date(t.from.startDate);
44
- e.setHours(0, 0, 0, 0);
45
- const s = new Date(t.to.endDate);
46
- for (s.setHours(0, 0, 0, 0); e <= s; )
47
- n.push(new Date(e)), e.setDate(e.getDate() + 1);
46
+ const t = new Date(e.from.startDate);
47
+ t.setHours(0, 0, 0, 0);
48
+ const s = new Date(e.to.endDate);
49
+ for (s.setHours(0, 0, 0, 0); t <= s; )
50
+ n.push(new Date(t)), t.setDate(t.getDate() + 1);
48
51
  }
49
52
  } else
50
- o(t);
53
+ o(e);
51
54
  return n;
52
55
  }
53
- function H(t, n, o) {
54
- if (!t || t.length === 0)
56
+ function F(e, n, o) {
57
+ if (!e || e.length === 0)
55
58
  return { range_start: [], range_middle: [], range_end: [] };
56
- const e = [...t].sort((r, i) => r.getTime() - i.getTime()), s = [], a = [], u = [], f = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
59
+ const t = [...e].sort((r, i) => r.getTime() - i.getTime()), s = [], a = [], u = [], f = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
57
60
  n === "multiple" && Array.isArray(o) && o.forEach((r) => {
58
- f.add(m(r.startDate)), l.add(m(r.endDate));
61
+ f.add(l(r.startDate)), d.add(l(r.endDate));
59
62
  });
60
- const p = (r, i) => {
63
+ const D = (r, i) => {
61
64
  if (i === 0) return !1;
62
- const c = e[i - 1];
65
+ const c = t[i - 1];
63
66
  return r.getTime() - c.getTime() <= 1440 * 60 * 1e3;
64
- }, D = (r, i) => i === e.length - 1 ? !1 : e[i + 1].getTime() - r.getTime() <= 1440 * 60 * 1e3;
65
- return e.forEach((r, i) => {
66
- const c = m(r), y = f.has(c), S = l.has(c), h = p(r, i), g = D(r, i);
67
+ }, p = (r, i) => i === t.length - 1 ? !1 : t[i + 1].getTime() - r.getTime() <= 1440 * 60 * 1e3;
68
+ return t.forEach((r, i) => {
69
+ const c = l(r), S = f.has(c), y = d.has(c), h = D(r, i), g = p(r, i);
67
70
  if (n === "multiple") {
68
- y ? s.push(r) : S ? u.push(r) : a.push(r);
71
+ S ? s.push(r) : y ? u.push(r) : a.push(r);
69
72
  return;
70
73
  }
71
74
  !h && !g ? (s.push(r), u.push(r)) : h ? g ? a.push(r) : u.push(r) : s.push(r);
@@ -73,9 +76,10 @@ function H(t, n, o) {
73
76
  }
74
77
  export {
75
78
  _ as calculateWeekSelection,
76
- H as computeWeekRangeModifiers,
77
- A as fiscalPeriodForWeek,
78
- d as isSameWeek,
79
+ F as computeWeekRangeModifiers,
80
+ v as fiscalPeriodForWeek,
81
+ A as isForeignFiscalWeekRow,
82
+ m as isSameWeek,
79
83
  E as nextWeekSelection,
80
84
  x as weekSelectionsToDates
81
85
  };
@@ -1,4 +1,6 @@
1
1
  import { YearRange, YearSelection } from './calendar.types';
2
+ export declare const YEAR_PAGE_SIZE = 12;
3
+ export declare const YEAR_CAPTION_PAGE_SIZE = 6;
2
4
  export interface CalendarYearPanesProps {
3
5
  pickerYear: number;
4
6
  resolvedStartYear: number;
@@ -94,5 +94,7 @@ function U({
94
94
  );
95
95
  }
96
96
  export {
97
- U as CalendarYearPanes
97
+ U as CalendarYearPanes,
98
+ q as YEAR_CAPTION_PAGE_SIZE,
99
+ T as YEAR_PAGE_SIZE
98
100
  };