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,13 +1,13 @@
1
- import { useState as W, useRef as p, useEffect as j, useCallback as d, useLayoutEffect as $ } from "react";
1
+ import { useState as W, useRef as p, useEffect as j, useCallback as f, useLayoutEffect as $ } from "react";
2
2
  import { mergePartialOrderedColumnState as q } from "./data-table-column-state.js";
3
3
  import { afterSynchronousColumnApply as k, normalizeColumnPinned as z, GRID_AUTO_UNPIN_WAIT_MS as A, alignColumnTreePinMetadata as V, EXTERNAL_SYNC_DEBOUNCE_MS as ee, readGridColumnPinned as ne } from "./data-table-column-apply.js";
4
4
  import { buildColumnStateFromTree as te } from "./build-column-state-from-tree.js";
5
- import { isColumnRuntimeStateGuardUpdating as w } from "./column-runtime-state-guard.js";
5
+ import { isColumnRuntimeStateGuardUpdating as g } from "./column-runtime-state-guard.js";
6
6
  import { computeColumnListSyncFingerprints as re } from "./data-table-column-list-sync.js";
7
- import { writeColumnTreeCache as B, resolveColumnTreeFromCacheOrGrid as oe, peekColumnListSyncWouldSkip as ue, readColumnTreeCache as se } from "./data-table-column-tree-cache.js";
8
- import { patchColumnTreeIndicatorsFromGrid as ce } from "./patch-column-tree-indicators-from-grid.js";
7
+ import { writeColumnTreeCache as B, resolveColumnTreeFromCacheOrGrid as oe, peekColumnListSyncWouldSkip as ue, readColumnTreeCache as se, isGridColumnSetDifferentFromCachedLeaves as ce } from "./data-table-column-tree-cache.js";
8
+ import { patchColumnTreeIndicatorsFromGrid as le } from "./patch-column-tree-indicators-from-grid.js";
9
9
  import { subscribeGridApiEvent as X } from "../ag-grid-react/grid-api-event-subscription.js";
10
- import { subscribeColumnIndicatorSync as le } from "../ag-grid-react/column-indicator-sync-bus.js";
10
+ import { subscribeColumnIndicatorSync as ae } from "../ag-grid-react/column-indicator-sync-bus.js";
11
11
  function Y(e, C, h) {
12
12
  return {
13
13
  layout: e.current,
@@ -15,36 +15,36 @@ function Y(e, C, h) {
15
15
  indicators: h.current
16
16
  };
17
17
  }
18
- function x(e, C, h, c) {
18
+ function w(e, C, h, c) {
19
19
  C.current = e.layout, h.current = e.visibility, c.current = e.indicators;
20
20
  }
21
- function Te({
21
+ function Re({
22
22
  gridApi: e,
23
23
  frozenColumnsLabel: C,
24
24
  scrollableColumnsLabel: h,
25
25
  isSyncActive: c = !0
26
26
  }) {
27
- const [R, E] = W([]), [H, M] = W(!1), l = p(!1), J = p(null), D = p(R), S = p(""), b = p(""), I = p(""), N = p(c);
27
+ const [R, F] = W([]), [H, M] = W(!1), l = p(!1), J = p(null), x = p(R), S = p(""), I = p(""), b = p(""), N = p(c);
28
28
  j(() => {
29
- D.current = R;
29
+ x.current = R;
30
30
  }, [R]);
31
- const F = d(
31
+ const E = f(
32
32
  () => ({
33
33
  frozenColumns: C,
34
34
  scrollableColumns: h
35
35
  }),
36
36
  [C, h]
37
- ), y = d(
37
+ ), y = f(
38
38
  (n) => {
39
- x(
39
+ w(
40
40
  re(n),
41
41
  S,
42
- b,
43
- I
42
+ I,
43
+ b
44
44
  );
45
45
  },
46
46
  []
47
- ), T = d(
47
+ ), T = f(
48
48
  (n) => {
49
49
  if (!e) {
50
50
  l.current = !1;
@@ -53,36 +53,36 @@ function Te({
53
53
  l.current = !1, B(e, n), y(n);
54
54
  },
55
55
  [e, y]
56
- ), a = d(() => {
57
- if (!e || l.current || w(e))
56
+ ), a = f(() => {
57
+ if (!e || l.current || g(e))
58
58
  return;
59
59
  const n = oe({
60
60
  gridApi: e,
61
- labels: F(),
61
+ labels: E(),
62
62
  previousFingerprints: Y(
63
63
  S,
64
- b,
65
- I
64
+ I,
65
+ b
66
66
  )
67
67
  });
68
68
  if (n.syncMode === "skip" || !n.rootItems) {
69
69
  n.syncMode !== "skip" && M(!0);
70
70
  return;
71
71
  }
72
- x(
72
+ w(
73
73
  n.fingerprints,
74
74
  S,
75
- b,
76
- I
77
- ), E(n.rootItems), M(!0);
78
- }, [e, F]);
75
+ I,
76
+ b
77
+ ), F(n.rootItems), M(!0);
78
+ }, [e, E]);
79
79
  $(() => {
80
80
  const n = c && !N.current;
81
81
  if (N.current = c, !e || !c) return;
82
- const t = F(), r = Y(
82
+ const t = E(), r = Y(
83
83
  S,
84
- b,
85
- I
84
+ I,
85
+ b
86
86
  );
87
87
  if (!(!n && r.layout !== "" && ue({
88
88
  gridApi: e,
@@ -92,17 +92,20 @@ function Te({
92
92
  if (n) {
93
93
  queueMicrotask(() => {
94
94
  const o = se(e, t);
95
- if (o) {
96
- const i = ce(
95
+ if (o && !ce(
96
+ e,
97
+ o.leafColumnIds
98
+ )) {
99
+ const i = le(
97
100
  o.items,
98
101
  e
99
102
  );
100
- x(
103
+ w(
101
104
  B(e, i),
102
105
  S,
103
- b,
104
- I
105
- ), E(i), M(!0);
106
+ I,
107
+ b
108
+ ), F(i), M(!0);
106
109
  return;
107
110
  }
108
111
  a();
@@ -116,7 +119,7 @@ function Te({
116
119
  }, [
117
120
  e,
118
121
  c,
119
- F,
122
+ E,
120
123
  a
121
124
  ]), j(() => {
122
125
  if (!e || !c) return;
@@ -138,21 +141,21 @@ function Te({
138
141
  ];
139
142
  let t = null;
140
143
  const r = () => {
141
- l.current || w(e) || (t && clearTimeout(t), t = setTimeout(() => {
142
- t = null, !(l.current || w(e) || e.isDestroyed()) && a();
144
+ l.current || g(e) || (t && clearTimeout(t), t = setTimeout(() => {
145
+ t = null, !(l.current || g(e) || e.isDestroyed()) && a();
143
146
  }, ee));
144
147
  }, o = n.map(
145
148
  (m) => X(e, m, () => {
146
149
  r();
147
150
  })
148
- ), i = le(() => {
151
+ ), i = ae(() => {
149
152
  r();
150
153
  });
151
154
  return () => {
152
155
  t && clearTimeout(t), o.forEach((m) => m()), i();
153
156
  };
154
157
  }, [e, c, a]);
155
- const P = d(
158
+ const v = f(
156
159
  (n) => {
157
160
  if (!e) return;
158
161
  l.current = !0;
@@ -167,56 +170,56 @@ function Te({
167
170
  r.filter((s) => z(s.pinned)).map((s) => s.colId)
168
171
  ), m = o.filter(
169
172
  (s) => z(s.pinned) && !i.has(s.colId)
170
- ), v = new Set(m.map((s) => s.colId));
173
+ ), P = new Set(m.map((s) => s.colId));
171
174
  e.applyColumnState({ state: o, applyOrder: !0 });
172
175
  const u = () => {
173
176
  T(n);
174
177
  };
175
- if (v.size === 0) {
178
+ if (P.size === 0) {
176
179
  k(u);
177
180
  return;
178
181
  }
179
- let O = !1, U = null, _ = null;
180
- _ = X(e, "columnPinned", () => {
182
+ let O = !1, U = null, L = null;
183
+ L = X(e, "columnPinned", () => {
181
184
  if (O || e.isDestroyed()) return;
182
185
  const s = e.getColumnState();
183
186
  if (m.filter((G) => {
184
- const f = s.find((g) => g.colId === G.colId);
185
- return f && !f.pinned;
187
+ const d = s.find((_) => _.colId === G.colId);
188
+ return d && !d.pinned;
186
189
  }).length > 0) {
187
- O = !0, U && clearTimeout(U), _?.();
190
+ O = !0, U && clearTimeout(U), L?.();
188
191
  const G = o.filter(
189
- (f) => f.pinned && !v.has(f.colId)
192
+ (d) => d.pinned && !P.has(d.colId)
190
193
  );
191
194
  if (G.length > 0) {
192
- const f = G[0], g = o.map(
193
- (L) => L.colId === f.colId ? { ...L, pinned: null } : L
195
+ const d = G[0], _ = o.map(
196
+ (D) => D.colId === d.colId ? { ...D, pinned: null } : D
194
197
  );
195
- e.applyColumnState({ state: g, applyOrder: !0 });
198
+ e.applyColumnState({ state: _, applyOrder: !0 });
196
199
  }
197
200
  k(() => {
198
201
  l.current = !1, a();
199
202
  });
200
203
  }
201
204
  }), U = setTimeout(() => {
202
- _?.(), O || u();
205
+ L?.(), O || u();
203
206
  }, A);
204
207
  },
205
208
  [e, T, a]
206
- ), K = d(
209
+ ), K = f(
207
210
  (n) => {
208
- P(V(n));
211
+ v(V(n));
209
212
  },
210
- [P]
211
- ), Q = d(
213
+ [v]
214
+ ), Q = f(
212
215
  (n, t) => {
213
216
  const r = V(n);
214
- t || P(r), E(r), y(r);
217
+ t || v(r), F(r), y(r);
215
218
  },
216
- [P, y]
217
- ), Z = d(
219
+ [v, y]
220
+ ), Z = f(
218
221
  (n, t) => {
219
- const r = (v) => v.map((u) => u.id === n ? {
222
+ const r = (P) => P.map((u) => u.id === n ? {
220
223
  ...u,
221
224
  data: {
222
225
  ...u.data,
@@ -225,8 +228,8 @@ function Te({
225
228
  } : u.children ? {
226
229
  ...u,
227
230
  children: r(u.children)
228
- } : u), o = r(D.current);
229
- if (E(o), y(o), !e) return;
231
+ } : u), o = r(x.current);
232
+ if (F(o), y(o), !e) return;
230
233
  l.current = !0;
231
234
  const i = e.getColumnState(), m = q(i, [
232
235
  { colId: n, pinned: t }
@@ -251,5 +254,5 @@ function Te({
251
254
  };
252
255
  }
253
256
  export {
254
- Te as useDataTableColumnListSync
257
+ Re as useDataTableColumnListSync
255
258
  };
@@ -1,8 +1,10 @@
1
1
  import { DateRange } from 'react-day-picker';
2
+ import { Granularity } from '../../../lib/fiscal-calendar';
2
3
  import { MonthRange, MonthSelection, QuarterRange, QuarterSelection, WeekRange, WeekSelection, YearRange, YearSelection } from './calendar.types';
3
4
  export declare function isCalendarApplyDisabled(params: {
4
5
  showFooter: boolean;
5
6
  pickerType: "date" | "week" | "month" | "quarter" | "year";
7
+ granularity?: Granularity;
6
8
  disabled?: unknown;
7
9
  pendingSelection?: Date | Date[] | DateRange;
8
10
  pendingWeekSelection?: WeekSelection | WeekSelection[] | WeekRange;
@@ -1,96 +1,93 @@
1
- import { isMonthDisabled as S, isDateIntervalDisabled as b } from "./calendar-month-utils.js";
2
- function u(e) {
3
- return new Date(e.getFullYear(), e.getMonth(), e.getDate());
1
+ import { isMonthDisabled as S, isWeekSelectableInBounds as O, isDateIntervalDisabled as A } from "./calendar-month-utils.js";
2
+ function d(r) {
3
+ return new Date(r.getFullYear(), r.getMonth(), r.getDate());
4
4
  }
5
- function c(e, i, t) {
6
- const f = u(e);
5
+ function l(r, i, n) {
6
+ const a = d(r);
7
7
  if (i) {
8
- const o = u(i);
9
- if (f < o) return !0;
8
+ const f = d(i);
9
+ if (a < f) return !0;
10
10
  }
11
- if (t) {
12
- const o = u(t);
13
- if (f > o) return !0;
11
+ if (n) {
12
+ const f = d(n);
13
+ if (a > f) return !0;
14
14
  }
15
15
  return !1;
16
16
  }
17
- function O(e, i, t, f) {
18
- const o = u(e), g = u(i);
19
- return !!(t && g < u(t) || f && o > u(f));
17
+ function D(r, i, n) {
18
+ return !r || !i ? !1 : A(r, i, n);
20
19
  }
21
- function p(e, i, t) {
22
- return !e || !i ? !1 : b(e, i, t);
23
- }
24
- function d(e, i) {
25
- if (Array.isArray(e)) return e.some(i);
26
- if (typeof e == "object" && e !== null && "from" in e) {
27
- const t = e;
28
- return !!(t.from && i(t.from) || t.to && i(t.to));
20
+ function c(r, i) {
21
+ if (Array.isArray(r)) return r.some(i);
22
+ if (typeof r == "object" && r !== null && "from" in r) {
23
+ const n = r;
24
+ return !!(n.from && i(n.from) || n.to && i(n.to));
29
25
  }
30
- return i(e);
26
+ return i(r);
31
27
  }
32
- function v(e) {
28
+ function I(r) {
33
29
  const {
34
30
  showFooter: i,
35
- pickerType: t,
31
+ pickerType: n,
32
+ granularity: a,
36
33
  disabled: f,
37
- pendingSelection: o,
38
- pendingWeekSelection: g,
34
+ pendingSelection: g,
35
+ pendingWeekSelection: m,
39
36
  pendingMonthSelection: y,
40
- pendingQuarterSelection: D,
41
- pendingYearSelection: m
42
- } = e;
37
+ pendingQuarterSelection: p,
38
+ pendingYearSelection: b
39
+ } = r;
43
40
  if (!i) return !1;
44
- const a = f;
45
- if (!a || typeof a != "object" || !("before" in a) && !("after" in a)) return !1;
46
- const s = a.before, l = a.after;
47
- if (t === "month") {
48
- const r = y;
49
- return r ? d(
50
- r,
51
- (n) => S(n.year, n.month, f)
41
+ const o = f;
42
+ if (!o || typeof o != "object" || !("before" in o) && !("after" in o)) return !1;
43
+ const u = o.before, s = o.after;
44
+ if (n === "month") {
45
+ const e = y;
46
+ return e ? c(
47
+ e,
48
+ (t) => S(t.year, t.month, f)
52
49
  ) : !1;
53
50
  }
54
- if (t === "quarter") {
55
- const r = D;
56
- return r ? d(
57
- r,
58
- (n) => p(n.start, n.end, f)
51
+ if (n === "quarter") {
52
+ const e = p;
53
+ return e ? c(
54
+ e,
55
+ (t) => D(t.start, t.end, f)
59
56
  ) : !1;
60
57
  }
61
- if (t === "year") {
62
- const r = m;
63
- return r ? d(
64
- r,
65
- (n) => p(n.start, n.end, f)
58
+ if (n === "year") {
59
+ const e = b;
60
+ return e ? c(
61
+ e,
62
+ (t) => D(t.start, t.end, f)
66
63
  ) : !1;
67
64
  }
68
- if (t === "week") {
69
- const r = g;
70
- return r ? d(
71
- r,
72
- (n) => O(
73
- n.startDate,
74
- n.endDate,
75
- s,
76
- l
65
+ if (n === "week") {
66
+ const e = m;
67
+ return e ? c(
68
+ e,
69
+ (t) => !O(
70
+ t.startDate,
71
+ t.endDate,
72
+ f,
73
+ a
77
74
  )
78
75
  ) : !1;
79
76
  }
80
- if (t === "date") {
81
- const r = o;
82
- if (!r) return !1;
83
- if (Array.isArray(r))
84
- return r.some((n) => c(n, s, l));
85
- if (r instanceof Date)
86
- return c(r, s, l);
87
- if ("from" in r) {
88
- const n = r;
89
- if (n.from && c(n.from, s, l) || n.to && c(n.to, s, l)) return !0;
77
+ if (n === "date") {
78
+ const e = g;
79
+ if (!e) return !1;
80
+ if (Array.isArray(e))
81
+ return e.some((t) => l(t, u, s));
82
+ if (e instanceof Date)
83
+ return l(e, u, s);
84
+ if ("from" in e) {
85
+ const t = e;
86
+ if (t.from && l(t.from, u, s) || t.to && l(t.to, u, s)) return !0;
90
87
  }
91
88
  }
92
89
  return !1;
93
90
  }
94
91
  export {
95
- v as isCalendarApplyDisabled
92
+ I as isCalendarApplyDisabled
96
93
  };
@@ -0,0 +1,27 @@
1
+ export type AvailableViewPickerType = "date" | "week" | "month" | "quarter" | "year";
2
+ export declare const DEFAULT_YEAR_PAGE_SIZE = 12;
3
+ export interface ResolveAvailableViewMonthOptions {
4
+ seed: Date;
5
+ pickerType: AvailableViewPickerType;
6
+ minDate?: Date;
7
+ maxDate?: Date;
8
+ numberOfMonths?: number;
9
+ hasSelection?: boolean;
10
+ autoNavigateToAvailable?: boolean;
11
+ yearPageSize?: number;
12
+ }
13
+ export declare function startOfDayDate(date: Date): Date;
14
+ export declare function startOfMonthDate(date: Date): Date;
15
+ export declare function isSameCalendarMonth(left: Date, right: Date): boolean;
16
+ export declare function boundsFromDisabled(disabled?: unknown): {
17
+ minDate?: Date;
18
+ maxDate?: Date;
19
+ };
20
+ export declare function hasCalendarValue(value: unknown): boolean;
21
+ /** Clamp `from` into `[minDate, maxDate]`. O(1). */
22
+ export declare function firstAvailableDate(minDate?: Date, maxDate?: Date, from?: Date): Date;
23
+ /**
24
+ * When auto-navigate is on and there is no selection, land the visible pane on the
25
+ * first enabled period. Does not write a selected value.
26
+ */
27
+ export declare function resolveAvailableViewMonth(options: ResolveAvailableViewMonthOptions): Date;
@@ -0,0 +1,85 @@
1
+ const F = 12;
2
+ function u(t) {
3
+ return new Date(t.getFullYear(), t.getMonth(), t.getDate());
4
+ }
5
+ function f(t) {
6
+ return new Date(t.getFullYear(), t.getMonth(), 1);
7
+ }
8
+ function h(t, e) {
9
+ return t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth();
10
+ }
11
+ function A(t) {
12
+ if (!t || typeof t != "object" || Array.isArray(t))
13
+ return {};
14
+ const e = t;
15
+ return {
16
+ ...e.before instanceof Date ? { minDate: e.before } : {},
17
+ ...e.after instanceof Date ? { maxDate: e.after } : {}
18
+ };
19
+ }
20
+ function Y(t) {
21
+ if (t == null) return !1;
22
+ if (Array.isArray(t)) return t.length > 0;
23
+ if (t instanceof Date) return !0;
24
+ if (typeof t == "object") {
25
+ if ("from" in t || "to" in t) {
26
+ const e = t;
27
+ return e.from != null || e.to != null;
28
+ }
29
+ return !0;
30
+ }
31
+ return !1;
32
+ }
33
+ function g(t, e, n = /* @__PURE__ */ new Date()) {
34
+ const r = u(n);
35
+ if (t) {
36
+ const a = u(t);
37
+ if (r < a) return a;
38
+ }
39
+ if (e) {
40
+ const a = u(e);
41
+ if (r > a) return a;
42
+ }
43
+ return r;
44
+ }
45
+ function D(t, e, n) {
46
+ const r = f(t), a = new Date(
47
+ t.getFullYear(),
48
+ t.getMonth() + e,
49
+ 0,
50
+ 23,
51
+ 59,
52
+ 59,
53
+ 999
54
+ ), i = u(n).getTime();
55
+ return i >= r.getTime() && i <= a.getTime();
56
+ }
57
+ function m(t, e, n) {
58
+ const r = Math.floor(t / n) * n;
59
+ return e >= r && e <= r + n - 1;
60
+ }
61
+ function w(t) {
62
+ const {
63
+ seed: e,
64
+ pickerType: n,
65
+ minDate: r,
66
+ maxDate: a,
67
+ numberOfMonths: i = 1,
68
+ hasSelection: l = !1,
69
+ autoNavigateToAvailable: c = !1,
70
+ yearPageSize: s = 12
71
+ } = t;
72
+ if (!c || l) return e;
73
+ const o = g(r, a, e);
74
+ return n === "date" || n === "week" ? D(e, i, o) ? e : f(o) : n === "month" || n === "quarter" ? e.getFullYear() === o.getFullYear() ? e : new Date(o.getFullYear(), 0, 1) : m(e.getFullYear(), o.getFullYear(), s) ? e : new Date(o.getFullYear(), 0, 1);
75
+ }
76
+ export {
77
+ F as DEFAULT_YEAR_PAGE_SIZE,
78
+ A as boundsFromDisabled,
79
+ g as firstAvailableDate,
80
+ Y as hasCalendarValue,
81
+ h as isSameCalendarMonth,
82
+ w as resolveAvailableViewMonth,
83
+ u as startOfDayDate,
84
+ f as startOfMonthDate
85
+ };
@@ -7,6 +7,7 @@ export declare function getCalendarDayPickerClassNames(params: {
7
7
  calendarKind: CalendarKind;
8
8
  showOutsideDays: boolean;
9
9
  periodRowHover?: boolean;
10
+ showWeekNumber?: boolean;
10
11
  classNames?: Partial<DefaultClassNames>;
11
12
  }): {
12
13
  root: string;
@@ -27,7 +28,7 @@ export declare function getCalendarDayPickerClassNames(params: {
27
28
  button_next: string;
28
29
  button_previous: string;
29
30
  week: string;
30
- weeks?: string | undefined;
31
+ weeks: string;
31
32
  weekday: string;
32
33
  weekdays: string;
33
34
  week_number: string;
@@ -57,4 +58,8 @@ export declare const previewModifierClassNames: {
57
58
  preview_cap_start: string;
58
59
  preview_cap_end: string;
59
60
  };
61
+ export declare const fiscalPeriodBoundaryClassNames: {
62
+ fiscal_period_start: string;
63
+ fiscal_period_end: string;
64
+ };
60
65
  export {};