impact-nova 2.5.11 → 2.5.13

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 (111) hide show
  1. package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +1 -0
  2. package/dist/components/data/data-table/build-column-tree-from-grid.js +55 -50
  3. package/dist/components/data/data-table/column-picker-authority.d.ts +34 -0
  4. package/dist/components/data/data-table/column-picker-authority.js +116 -0
  5. package/dist/components/data/data-table/column-picker-drop-validation.d.ts +7 -0
  6. package/dist/components/data/data-table/column-picker-drop-validation.js +37 -0
  7. package/dist/components/data/data-table/data-table-column-apply.d.ts +2 -0
  8. package/dist/components/data/data-table/data-table-column-apply.js +84 -73
  9. package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +10 -0
  10. package/dist/components/data/data-table/data-table-column-list-tree-apply.js +79 -0
  11. package/dist/components/data/data-table/data-table-column-list.js +94 -64
  12. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +12 -6
  13. package/dist/components/data/data-table/data-table-column-tree-cache.js +250 -131
  14. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +26 -0
  15. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +195 -0
  16. package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +1 -0
  17. package/dist/components/data/data-table/data-table-picker-column-eligibility.js +7 -0
  18. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +5 -0
  19. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +28 -11
  20. package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +12 -0
  21. package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +12 -0
  22. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +10 -0
  23. package/dist/components/data/data-table/use-data-table-column-list-sync.js +250 -196
  24. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +2 -3
  25. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
  26. package/dist/components/data/nested-list/components/NestedListContent.d.ts +10 -2
  27. package/dist/components/data/nested-list/components/NestedListContent.js +253 -138
  28. package/dist/components/data/nested-list/components/SortableItem.d.ts +2 -1
  29. package/dist/components/data/nested-list/components/SortableItem.js +62 -60
  30. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +10 -20
  31. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +44 -233
  32. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +24 -0
  33. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +128 -0
  34. package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -1
  35. package/dist/components/data/nested-list/nested-list-constants.js +10 -4
  36. package/dist/components/data/nested-list/nested-list-display-utils.d.ts +11 -0
  37. package/dist/components/data/nested-list/nested-list-display-utils.js +74 -0
  38. package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +31 -0
  39. package/dist/components/data/nested-list/nested-list-drop-engine.js +209 -0
  40. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +26 -0
  41. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +67 -0
  42. package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +4 -0
  43. package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +43 -0
  44. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +3 -0
  45. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +34 -0
  46. package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +9 -0
  47. package/dist/components/data/nested-list/nested-list-row-estimates.js +14 -0
  48. package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +36 -0
  49. package/dist/components/data/nested-list/nested-list-scroll-anchor.js +47 -0
  50. package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +59 -0
  51. package/dist/components/data/nested-list/nested-list-virtual-drop.js +341 -0
  52. package/dist/components/data/nested-list/nested-list.js +322 -336
  53. package/dist/components/data/nested-list/nested-list.types.d.ts +17 -0
  54. package/dist/components/data-display/calendar/calendar-apply-validation.d.ts +0 -2
  55. package/dist/components/data-display/calendar/calendar-apply-validation.js +67 -64
  56. package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +2 -4
  57. package/dist/components/data-display/calendar/calendar-day-picker-components.js +152 -163
  58. package/dist/components/data-display/calendar/calendar-day-picker-view.js +76 -77
  59. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.d.ts +0 -6
  60. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.js +18 -34
  61. package/dist/components/data-display/calendar/calendar-month-utils.d.ts +0 -5
  62. package/dist/components/data-display/calendar/calendar-month-utils.js +64 -85
  63. package/dist/components/data-display/calendar/calendar-selection-appearance.d.ts +0 -1
  64. package/dist/components/data-display/calendar/calendar-selection-appearance.js +30 -31
  65. package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +1 -2
  66. package/dist/components/data-display/calendar/calendar-week-number-cell.js +41 -55
  67. package/dist/components/data-display/calendar/calendar-year-panes.d.ts +0 -2
  68. package/dist/components/data-display/calendar/calendar-year-panes.js +1 -3
  69. package/dist/components/data-display/calendar/calendar.js +143 -146
  70. package/dist/components/data-display/calendar/calendar.types.d.ts +0 -5
  71. package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +1 -2
  72. package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +74 -79
  73. package/dist/components/data-display/calendar/use-calendar-state.d.ts +1 -3
  74. package/dist/components/data-display/calendar/use-calendar-state.js +325 -403
  75. package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
  76. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  77. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  78. package/dist/components/forms/date-picker/date-picker.js +58 -60
  79. package/dist/components/forms/date-picker/date-picker.types.d.ts +0 -5
  80. package/dist/components/forms/date-picker/date-range-picker.js +64 -66
  81. package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +0 -1
  82. package/dist/components/forms/date-picker/fiscal-pass-through.js +2 -3
  83. package/dist/components/forms/date-picker/month-picker.js +59 -61
  84. package/dist/components/forms/date-picker/month-range-picker.js +61 -63
  85. package/dist/components/forms/date-picker/multi-date-picker.js +49 -51
  86. package/dist/components/forms/date-picker/multi-month-picker.js +47 -49
  87. package/dist/components/forms/date-picker/multi-quarter-picker.js +44 -46
  88. package/dist/components/forms/date-picker/multi-week-picker.js +51 -53
  89. package/dist/components/forms/date-picker/multi-year-picker.js +46 -48
  90. package/dist/components/forms/date-picker/quarter-picker.js +44 -46
  91. package/dist/components/forms/date-picker/quarter-range-picker.js +43 -45
  92. package/dist/components/forms/date-picker/week-picker.js +66 -68
  93. package/dist/components/forms/date-picker/week-range-picker.js +80 -82
  94. package/dist/components/forms/date-picker/year-picker.js +45 -47
  95. package/dist/components/forms/date-picker/year-range-picker.js +45 -47
  96. package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
  97. package/dist/components/forms/select/components/Submenu.js +2 -3
  98. package/dist/form-react/Fields/DateInputField.js +50 -51
  99. package/dist/form-react/Fields/DateRangeField.js +13 -14
  100. package/dist/form-react/Fields/MonthRangeField.js +28 -29
  101. package/dist/form-react/Fields/MultiMonthPickerField.js +12 -13
  102. package/dist/form-react/Fields/MultiWeekPickerField.js +17 -18
  103. package/dist/form-react/Fields/WeekRangePicker.js +21 -22
  104. package/dist/form-react/types/fields.types.d.ts +0 -12
  105. package/dist/impact-nova.css +1 -1
  106. package/dist/lib/hash/fnv1a128.d.ts +16 -0
  107. package/dist/lib/hash/fnv1a128.js +21 -0
  108. package/dist/llms/rules/ag-grid.js +1 -1
  109. package/package.json +1 -1
  110. package/dist/components/data-display/calendar/calendar-available-view.d.ts +0 -27
  111. package/dist/components/data-display/calendar/calendar-available-view.js +0 -85
@@ -1,152 +1,151 @@
1
- import { jsx as x } from "react/jsx-runtime";
2
- import * as B from "react";
1
+ import { jsx as H } from "react/jsx-runtime";
2
+ import * as x from "react";
3
3
  import { DayPicker as pr } from "react-day-picker";
4
- import { cn as ur } from "../../../lib/utils.js";
5
- import { formatPeriodOption as dr } from "./calendar-fiscal-labels.js";
4
+ import { cn as dr } from "../../../lib/utils.js";
5
+ import { formatPeriodOption as ur } from "./calendar-fiscal-labels.js";
6
6
  import { CalendarDayHoverProvider as gr } from "./calendar-day-hover.js";
7
7
  import { previewModifierClassNames as vr, fiscalPeriodBoundaryClassNames as Pr } from "./calendar-day-picker-classnames.js";
8
- import { isPreviewCap as u, dayKey as l, isPreviewMiddle as _r } from "./calendar-selection.js";
8
+ import { isPreviewCap as d, dayKey as l, isPreviewMiddle as _r } from "./calendar-selection.js";
9
9
  import { useCalendarDayPickerConfig as yr } from "./use-calendar-day-picker-config.js";
10
10
  function Br({
11
- className: E,
11
+ className: B,
12
12
  pickerType: s,
13
13
  mode: e,
14
14
  weekMode: f,
15
15
  calendarKind: m,
16
- granularity: F,
17
- showOutsideDays: d,
16
+ granularity: E,
17
+ showOutsideDays: u,
18
18
  fixedWeeks: g,
19
- captionLayout: L,
20
- buttonVariant: O,
19
+ captionLayout: F,
20
+ buttonVariant: L,
21
21
  weekStartsOn: v,
22
- formatters: V,
23
- classNames: Y,
24
- components: k,
22
+ formatters: O,
23
+ classNames: V,
24
+ components: Y,
25
25
  selected: P,
26
26
  showFooter: _,
27
27
  showPeriodBoundaries: p,
28
28
  pendingSelection: y,
29
- selectedDaysFromWeeks: R,
29
+ selectedDaysFromWeeks: k,
30
30
  currentMonth: D,
31
- monthsFull: $,
32
- monthsShort: q,
33
- weekNumberHeader: z,
34
- resolvedStartMonth: w,
35
- resolvedEndMonth: b,
36
- availableYears: A,
31
+ monthsFull: R,
32
+ monthsShort: $,
33
+ weekNumberHeader: q,
34
+ resolvedStartMonth: b,
35
+ resolvedEndMonth: w,
36
+ availableYears: z,
37
37
  fiscalPeriods: C,
38
- fiscalConfig: G,
39
- dateFnsLocale: I,
40
- intlLocale: J,
41
- weekRangeModifiers: M,
42
- onSelect: Q,
38
+ fiscalConfig: A,
39
+ dateFnsLocale: G,
40
+ intlLocale: I,
41
+ weekRangeModifiers: J,
42
+ onSelect: M,
43
43
  onMonthChange: N,
44
- onWeekSelect: U,
45
- previousMonthLabel: X,
46
- nextMonthLabel: Z,
47
- monthPlaceholder: W,
48
- yearPlaceholder: K,
44
+ onWeekSelect: Q,
45
+ previousMonthLabel: U,
46
+ nextMonthLabel: X,
47
+ monthPlaceholder: Z,
48
+ yearPlaceholder: W,
49
49
  weekNumberLabel: S,
50
- weekLabel: T,
51
- fiscalWeekAriaLabel: rr,
50
+ weekLabel: K,
51
+ fiscalWeekAriaLabel: T,
52
52
  getCellMeta: n,
53
- formatWeekNumber: or,
54
- disabled: h,
55
- showWeekNumber: j = !0,
53
+ formatWeekNumber: rr,
54
+ disabled: or,
55
+ showWeekNumber: h = !0,
56
56
  ...tr
57
57
  }) {
58
58
  const { dayPickerClassNames: ar, dayPickerComponents: ir } = yr({
59
- buttonVariant: O,
59
+ buttonVariant: L,
60
60
  pickerType: s,
61
61
  calendarKind: m,
62
- granularity: F,
63
- showOutsideDays: d,
64
- classNames: Y,
62
+ granularity: E,
63
+ showOutsideDays: u,
64
+ classNames: V,
65
65
  currentMonth: D,
66
- monthsFull: $,
67
- monthsShort: q,
68
- weekNumberHeader: z,
69
- resolvedStartMonth: w,
70
- resolvedEndMonth: b,
71
- availableYears: A,
66
+ monthsFull: R,
67
+ monthsShort: $,
68
+ weekNumberHeader: q,
69
+ resolvedStartMonth: b,
70
+ resolvedEndMonth: w,
71
+ availableYears: z,
72
72
  fiscalPeriods: C,
73
- fiscalConfig: G,
73
+ fiscalConfig: A,
74
74
  weekStartsOn: v,
75
- previousMonthLabel: X,
76
- nextMonthLabel: Z,
77
- monthPlaceholder: W,
78
- yearPlaceholder: K,
75
+ previousMonthLabel: U,
76
+ nextMonthLabel: X,
77
+ monthPlaceholder: Z,
78
+ yearPlaceholder: W,
79
79
  weekNumberLabel: S,
80
- weekLabel: T,
80
+ weekLabel: K,
81
81
  fiscalWeekNumberLabel: S,
82
- fiscalWeekAriaLabel: rr,
82
+ fiscalWeekAriaLabel: T,
83
83
  getCellMeta: n,
84
84
  onMonthChange: N,
85
- onWeekSelect: U,
85
+ onWeekSelect: Q,
86
86
  weekMode: f,
87
87
  showPeriodBoundaries: p,
88
- showWeekNumber: j,
89
- disabled: h,
90
- components: k
91
- }), er = e === "range" || e === "multiple" || e === "multi-range" || f === "range" || f === "multiple" || f === "multi-range" ? 2 : 1, nr = s === "week" || e === "multi-range" ? "multiple" : e, sr = g || m === "fiscal" || d, H = p && n ? {
88
+ showWeekNumber: h,
89
+ components: Y
90
+ }), er = e === "range" || e === "multiple" || e === "multi-range" || f === "range" || f === "multiple" || f === "multi-range" ? 2 : 1, nr = s === "week" || e === "multi-range" ? "multiple" : e, sr = g || m === "fiscal" || u, j = p && n ? {
92
91
  fiscal_period_start: (r) => !!n(r)?.isPeriodStart,
93
92
  fiscal_period_end: (r) => !!n(r)?.isPeriodEnd
94
- } : void 0, [t, cr] = B.useState(), fr = B.useCallback((r) => {
93
+ } : void 0, [t, cr] = x.useState(), fr = x.useCallback((r) => {
95
94
  cr((o) => !o && !r || o && r && o.getFullYear() === r.getFullYear() && o.getMonth() === r.getMonth() && o.getDate() === r.getDate() ? o : r);
96
95
  }, []), a = _ ? y : P, i = e === "range" && a && typeof a == "object" && "from" in a ? a.from : void 0, mr = e === "range" && a && typeof a == "object" && "to" in a ? a.to : void 0;
97
- return /* @__PURE__ */ x(gr, { onDayHover: fr, children: /* @__PURE__ */ x(
96
+ return /* @__PURE__ */ H(gr, { onDayHover: fr, children: /* @__PURE__ */ H(
98
97
  pr,
99
98
  {
100
99
  mode: nr,
101
- selected: s === "week" ? R : _ ? y : P,
100
+ selected: s === "week" ? k : _ ? y : P,
102
101
  onSelect: (...r) => {
103
102
  const [o, c] = r;
104
- Q(o, c instanceof Date ? c : void 0);
103
+ M(o, c instanceof Date ? c : void 0);
105
104
  },
106
105
  month: D,
107
106
  onMonthChange: N,
108
107
  fixedWeeks: g,
109
108
  showOutsideDays: sr,
110
109
  weekStartsOn: v,
111
- modifiers: s === "week" ? { ...M, ...H } : { ...H, ...s === "date" && !!(i && !mr && t) && i && t ? {
110
+ modifiers: s === "week" ? { ...J, ...j } : { ...j, ...s === "date" && !!(i && !mr && t) && i && t ? {
112
111
  preview: (r) => _r(r, i, t),
113
- preview_cap: (r) => u(r, i, t),
114
- preview_cap_start: (r) => u(r, i, t) && l(t) < l(i),
115
- preview_cap_end: (r) => u(r, i, t) && l(t) > l(i)
112
+ preview_cap: (r) => d(r, i, t),
113
+ preview_cap_start: (r) => d(r, i, t) && l(t) < l(i),
114
+ preview_cap_end: (r) => d(r, i, t) && l(t) > l(i)
116
115
  } : void 0 },
117
116
  modifiersClassNames: {
118
117
  ...p && m === "fiscal" ? Pr : void 0,
119
118
  ...vr
120
119
  },
121
- locale: I,
122
- className: ur(
120
+ locale: G,
121
+ className: dr(
123
122
  "bg-canvas group/calendar p-2 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
124
123
  String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
125
124
  String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
126
- E
125
+ B
127
126
  ),
128
- captionLayout: L,
127
+ captionLayout: F,
129
128
  navLayout: "around",
130
- startMonth: w,
131
- endMonth: b,
132
- disabled: h,
129
+ startMonth: b,
130
+ endMonth: w,
131
+ disabled: or,
133
132
  numberOfMonths: er,
134
133
  formatters: {
135
134
  formatMonthDropdown: (r) => {
136
135
  if (m === "fiscal" && n) {
137
136
  const o = n(r), c = C?.find((lr) => lr.period === o?.fiscalPeriod);
138
- if (c) return dr(c);
137
+ if (c) return ur(c);
139
138
  if (o?.fiscalPeriod != null) return `P${o.fiscalPeriod}`;
140
139
  }
141
- return r.toLocaleString(J, { month: "short" });
140
+ return r.toLocaleString(I, { month: "short" });
142
141
  },
143
- formatWeekNumber: or,
144
- ...V
142
+ formatWeekNumber: rr,
143
+ ...O
145
144
  },
146
145
  classNames: ar,
147
146
  components: ir,
148
147
  ...tr,
149
- showWeekNumber: j
148
+ showWeekNumber: h
150
149
  }
151
150
  ) });
152
151
  }
@@ -14,9 +14,3 @@ export declare function dominantCivilMonthForPeriod(period: FiscalPeriod): {
14
14
  export declare function visibleMonthForPeriod(period: FiscalPeriod, isRightPanel: boolean): Date;
15
15
  /** Period that occupies the most days of a civil month (caption selected value). */
16
16
  export declare function periodForCivilMonth(periods: readonly FiscalPeriod[], year: number, monthIndex: number): FiscalPeriod | undefined;
17
- export declare function periodsAvailableInBounds(periods: readonly FiscalPeriod[], disabled?: unknown): FiscalPeriod[];
18
- export declare function periodForFiscalYearChange(options: {
19
- periods: readonly FiscalPeriod[];
20
- preferredPeriod?: number;
21
- disabled?: unknown;
22
- }): FiscalPeriod | undefined;
@@ -1,18 +1,17 @@
1
- import { setDate as m, startOfMonth as s, addMonths as f } from "date-fns";
2
- import { localDateFromCivil as d, parseCivilDate as h, toCivilDate as u, lastDayOfMonth as v, compareCivil as y, diffDays as p, minCivil as D, maxCivil as M } from "../../../lib/fiscal-calendar/civil-date.js";
3
- import { isDateIntervalDisabled as C } from "./calendar-month-utils.js";
4
- function O(t) {
1
+ import { setDate as m, startOfMonth as s, addMonths as h } from "date-fns";
2
+ import { parseCivilDate as d, toCivilDate as l, lastDayOfMonth as y, compareCivil as u, diffDays as v, minCivil as M, maxCivil as p } from "../../../lib/fiscal-calendar/civil-date.js";
3
+ function x(t) {
5
4
  return m(s(t), 15);
6
5
  }
7
- function S(t, n) {
8
- return s(f(t, n));
6
+ function b(t, n) {
7
+ return s(h(t, n));
9
8
  }
10
9
  function c(t, n, o, e) {
11
- const r = u(o, e + 1, 1), a = v(o, e + 1), i = M(t, r), l = D(n, a);
12
- return y(i, l) > 0 ? 0 : p(l, i) + 1;
10
+ const r = l(o, e + 1, 1), a = y(o, e + 1), i = p(t, r), f = M(n, a);
11
+ return u(i, f) > 0 ? 0 : v(f, i) + 1;
13
12
  }
14
- function b(t) {
15
- const n = h(t.start);
13
+ function C(t) {
14
+ const n = d(t.start);
16
15
  let o = { year: n.y, monthIndex: n.m - 1, days: 0 };
17
16
  const e = t.gregorianMonthSpan.length > 0 ? t.gregorianMonthSpan : [{ year: n.y, month: n.m - 1 }];
18
17
  for (const { year: r, month: a } of e) {
@@ -21,11 +20,11 @@ function b(t) {
21
20
  }
22
21
  return { year: o.year, monthIndex: o.monthIndex };
23
22
  }
24
- function P(t, n) {
25
- const { year: o, monthIndex: e } = b(t), r = s(new Date(o, e, 1));
26
- return n ? f(r, -1) : r;
23
+ function I(t, n) {
24
+ const { year: o, monthIndex: e } = C(t), r = s(new Date(o, e, 1));
25
+ return n ? h(r, -1) : r;
27
26
  }
28
- function A(t, n, o) {
27
+ function O(t, n, o) {
29
28
  let e, r = 0;
30
29
  for (const a of t) {
31
30
  const i = c(a.start, a.end, n, o);
@@ -33,25 +32,10 @@ function A(t, n, o) {
33
32
  }
34
33
  return e;
35
34
  }
36
- function g(t, n) {
37
- return t.filter(
38
- (o) => !C(
39
- d(o.start),
40
- d(o.end),
41
- n
42
- )
43
- );
44
- }
45
- function E(t) {
46
- const n = g(t.periods, t.disabled);
47
- return n.find((o) => o.period === t.preferredPeriod) ?? n[0];
48
- }
49
35
  export {
50
- S as civilMonthAtOffset,
51
- b as dominantCivilMonthForPeriod,
52
- O as midMonthDate,
53
- A as periodForCivilMonth,
54
- E as periodForFiscalYearChange,
55
- g as periodsAvailableInBounds,
56
- P as visibleMonthForPeriod
36
+ b as civilMonthAtOffset,
37
+ C as dominantCivilMonthForPeriod,
38
+ x as midMonthDate,
39
+ O as periodForCivilMonth,
40
+ I as visibleMonthForPeriod
57
41
  };
@@ -1,5 +1,4 @@
1
1
  import { Option } from '../../forms/select';
2
- import { Granularity } from '../../../lib/fiscal-calendar';
3
2
  import { MonthRange, MonthSelection } from './calendar.types';
4
3
  export declare function isSameMonth(m1: MonthSelection, m2: MonthSelection): boolean;
5
4
  export declare function nextMonthSelection(selection: MonthSelection, prev: MonthSelection | MonthSelection[] | MonthRange | undefined, monthMode: "single" | "multiple" | "range"): MonthSelection | MonthSelection[] | MonthRange | undefined;
@@ -11,10 +10,6 @@ export declare function getMonthRangeProps(year: number, month: number, currentS
11
10
  };
12
11
  /** True when the interval lies completely outside `disabled.before` / `disabled.after`. */
13
12
  export declare function isDateIntervalDisabled(start: Date, end: Date, disabled?: unknown): boolean;
14
- /** True when every day of `[start, end]` is inside `disabled.before` / `disabled.after`. */
15
- export declare function isWeekFullyInsideBounds(start: Date, end: Date, disabled?: unknown): boolean;
16
- /** Week granularity requires every day in bounds; other granularities allow mixed weeks. */
17
- export declare function isWeekSelectableInBounds(start: Date, end: Date, disabled?: unknown, granularity?: Granularity): boolean;
18
13
  export declare function isMonthDisabled(year: number, monthIndex: number, disabled?: unknown): boolean;
19
14
  export declare function getAvailableYears(startMonth: Date, endMonth: Date): Option[];
20
15
  export declare function getAvailableMonths(year: number, monthsFull: string[], startMonth: Date, endMonth: Date): Option[];
@@ -1,118 +1,97 @@
1
- import { isMonthRangeSelection as c } from "../../forms/date-picker/calendar-selection-adapters.js";
2
- function u(t, n) {
3
- return t.fy != null && n.fy != null && t.period != null && n.period != null ? t.fy === n.fy && t.period === n.period : t.year === n.year && t.month === n.month;
1
+ import { isMonthRangeSelection as d } from "../../forms/date-picker/calendar-selection-adapters.js";
2
+ function l(e, n) {
3
+ return e.fy != null && n.fy != null && e.period != null && n.period != null ? e.fy === n.fy && e.period === n.period : e.year === n.year && e.month === n.month;
4
4
  }
5
- function g(t, n, o) {
6
- if (o === "single") return t;
5
+ function g(e, n, o) {
6
+ if (o === "single") return e;
7
7
  if (o === "multiple") {
8
- const r = n || [];
9
- return r.some((i) => u(i, t)) ? r.filter((i) => !u(i, t)) : [...r, t];
8
+ const a = n || [];
9
+ return a.some((f) => l(f, e)) ? a.filter((f) => !l(f, e)) : [...a, e];
10
10
  }
11
- const e = n;
12
- if (!e?.from || e.to) return { from: t };
13
- const s = new Date(e.from.year, e.from.month, 1);
14
- return new Date(t.year, t.month, 1) < s ? { from: t, to: e.from } : { from: e.from, to: t };
11
+ const t = n;
12
+ if (!t?.from || t.to) return { from: e };
13
+ const s = new Date(t.from.year, t.from.month, 1);
14
+ return new Date(e.year, e.month, 1) < s ? { from: e, to: t.from } : { from: t.from, to: e };
15
15
  }
16
- function w(t, n, o) {
16
+ function m(e, n, o) {
17
17
  if (!o) return !1;
18
18
  if (Array.isArray(o)) {
19
- const s = { year: t, month: n, fy: t, period: n + 1 };
20
- return o.some((a) => u(a, s) || a.year === t && a.month === n);
19
+ const s = { year: e, month: n, fy: e, period: n + 1 };
20
+ return o.some((r) => l(r, s) || r.year === e && r.month === n);
21
21
  }
22
- if (c(o)) {
23
- const s = o, a = s.from, r = s.to;
24
- if (!a && !r) return !1;
25
- const f = new Date(t, n, 1).getTime();
26
- if (!a) return r ? f === new Date(r.year, r.month, 1).getTime() : !1;
27
- const i = new Date(a.year, a.month, 1).getTime();
28
- if (!r) return f === i;
29
- const d = new Date(r.year, r.month, 1).getTime();
30
- return f >= i && f <= d;
22
+ if (d(o)) {
23
+ const s = o, r = s.from, a = s.to;
24
+ if (!r && !a) return !1;
25
+ const i = new Date(e, n, 1).getTime();
26
+ if (!r) return a ? i === new Date(a.year, a.month, 1).getTime() : !1;
27
+ const f = new Date(r.year, r.month, 1).getTime();
28
+ if (!a) return i === f;
29
+ const u = new Date(a.year, a.month, 1).getTime();
30
+ return i >= f && i <= u;
31
31
  }
32
- const e = o;
33
- return e.fy != null && e.period != null ? e.fy === t && e.period === n + 1 : e.year === t && e.month === n;
32
+ const t = o;
33
+ return t.fy != null && t.period != null ? t.fy === e && t.period === n + 1 : t.year === e && t.month === n;
34
34
  }
35
- function y(t, n, o) {
35
+ function y(e, n, o) {
36
36
  if (!o || !("from" in o))
37
37
  return { isStart: !1, isEnd: !1, isMiddle: !1 };
38
- const e = o, s = e.from, a = e.to;
39
- if (!s && !a) return { isStart: !1, isEnd: !1, isMiddle: !1 };
40
- const r = new Date(t, n, 1).getTime();
38
+ const t = o, s = t.from, r = t.to;
39
+ if (!s && !r) return { isStart: !1, isEnd: !1, isMiddle: !1 };
40
+ const a = new Date(e, n, 1).getTime();
41
41
  if (!s)
42
42
  return {
43
43
  isStart: !1,
44
- isEnd: a ? r === new Date(a.year, a.month, 1).getTime() : !1,
44
+ isEnd: r ? a === new Date(r.year, r.month, 1).getTime() : !1,
45
45
  isMiddle: !1
46
46
  };
47
- const f = new Date(s.year, s.month, 1).getTime();
48
- if (!a) return { isStart: r === f, isEnd: !1, isMiddle: !1 };
49
- const i = new Date(a.year, a.month, 1).getTime();
47
+ const i = new Date(s.year, s.month, 1).getTime();
48
+ if (!r) return { isStart: a === i, isEnd: !1, isMiddle: !1 };
49
+ const f = new Date(r.year, r.month, 1).getTime();
50
50
  return {
51
- isStart: r === f,
52
- isEnd: r === i,
53
- isMiddle: r > f && r < i
51
+ isStart: a === i,
52
+ isEnd: a === f,
53
+ isMiddle: a > i && a < f
54
54
  };
55
55
  }
56
- function l(t, n, o) {
57
- const e = o;
58
- if (!e || typeof e != "object" || !("before" in e) && !("after" in e)) return !1;
59
- const s = new Date(t);
56
+ function D(e, n, o) {
57
+ const t = o;
58
+ if (!t || typeof t != "object" || !("before" in t) && !("after" in t)) return !1;
59
+ const s = new Date(e);
60
60
  s.setHours(0, 0, 0, 0);
61
- const a = new Date(n);
62
- if (a.setHours(23, 59, 59, 999), e.before) {
63
- const r = new Date(e.before);
64
- if (r.setHours(0, 0, 0, 0), a < r) return !0;
61
+ const r = new Date(n);
62
+ if (r.setHours(23, 59, 59, 999), t.before) {
63
+ const a = new Date(t.before);
64
+ if (a.setHours(0, 0, 0, 0), r < a) return !0;
65
65
  }
66
- if (e.after) {
67
- const r = new Date(e.after);
68
- if (r.setHours(23, 59, 59, 999), s > r) return !0;
66
+ if (t.after) {
67
+ const a = new Date(t.after);
68
+ if (a.setHours(23, 59, 59, 999), s > a) return !0;
69
69
  }
70
70
  return !1;
71
71
  }
72
- function D(t, n, o) {
73
- const e = o;
74
- if (!e || typeof e != "object" || !("before" in e) && !("after" in e)) return !0;
75
- const s = new Date(t);
76
- s.setHours(0, 0, 0, 0);
77
- const a = new Date(n);
78
- if (a.setHours(0, 0, 0, 0), e.before) {
79
- const r = new Date(e.before);
80
- if (r.setHours(0, 0, 0, 0), s < r) return !1;
81
- }
82
- if (e.after) {
83
- const r = new Date(e.after);
84
- if (r.setHours(0, 0, 0, 0), a > r) return !1;
85
- }
86
- return !0;
87
- }
88
- function b(t, n, o, e) {
89
- return e && e !== "week" ? !l(t, n, o) : D(t, n, o);
90
- }
91
- function h(t, n, o) {
92
- const e = new Date(t, n, 1, 0, 0, 0, 0), s = new Date(t, n + 1, 0, 23, 59, 59, 999);
93
- return l(e, s, o);
72
+ function w(e, n, o) {
73
+ const t = new Date(e, n, 1, 0, 0, 0, 0), s = new Date(e, n + 1, 0, 23, 59, 59, 999);
74
+ return D(t, s, o);
94
75
  }
95
- function p(t, n) {
96
- const o = t.getFullYear(), e = n.getFullYear(), s = [];
97
- for (let a = o; a <= e; a++)
98
- s.push({ label: a.toString(), value: a.toString() });
76
+ function h(e, n) {
77
+ const o = e.getFullYear(), t = n.getFullYear(), s = [];
78
+ for (let r = o; r <= t; r++)
79
+ s.push({ label: r.toString(), value: r.toString() });
99
80
  return s;
100
81
  }
101
- function M(t, n, o, e) {
102
- return n.map((s, a) => ({ label: s, value: a.toString() })).filter((s, a) => {
103
- const r = new Date(t, a, 1);
104
- return !(r < new Date(o.getFullYear(), o.getMonth(), 1) || r > new Date(e.getFullYear(), e.getMonth(), 1));
82
+ function p(e, n, o, t) {
83
+ return n.map((s, r) => ({ label: s, value: r.toString() })).filter((s, r) => {
84
+ const a = new Date(e, r, 1);
85
+ return !(a < new Date(o.getFullYear(), o.getMonth(), 1) || a > new Date(t.getFullYear(), t.getMonth(), 1));
105
86
  });
106
87
  }
107
88
  export {
108
- M as getAvailableMonths,
109
- p as getAvailableYears,
89
+ p as getAvailableMonths,
90
+ h as getAvailableYears,
110
91
  y as getMonthRangeProps,
111
- l as isDateIntervalDisabled,
112
- h as isMonthDisabled,
113
- w as isMonthSelected,
114
- u as isSameMonth,
115
- D as isWeekFullyInsideBounds,
116
- b as isWeekSelectableInBounds,
92
+ D as isDateIntervalDisabled,
93
+ w as isMonthDisabled,
94
+ m as isMonthSelected,
95
+ l as isSameMonth,
117
96
  g as nextMonthSelection
118
97
  };
@@ -22,7 +22,6 @@ export declare const previewCapStartCellClassName = "calendar-interval-cap-start
22
22
  export declare const previewCapEndCellClassName = "calendar-interval-cap-end";
23
23
  export declare const weekNumberTypeClassName = "text-[11px] font-medium text-content-icon";
24
24
  export declare const weekNumberInteractiveClassName = "text-brand group-has-[.rdp-selected]/week:text-brand group-hover/week:text-brand";
25
- export declare const weekNumberBlockedClassName = "cursor-not-allowed text-content-placeholder opacity-50 group-hover/week:text-content-placeholder group-has-[.rdp-selected]/week:text-content-placeholder";
26
25
  export declare const weekNumberBaseClassName: string;
27
26
  export declare const weekNumberSelectedFillClassName = "group-data-[week-selected]/week:bg-accent";
28
27
  export declare const weekNumberFocusClassName = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring";
@@ -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", 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(
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(
3
3
  "flex items-center justify-center p-0 font-normal text-sm transition-colors",
4
4
  "border border-transparent",
5
5
  a,
@@ -8,66 +8,65 @@ const l = "h-9 w-9 min-h-9 min-w-9", E = "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
- c,
12
11
  i,
12
+ c,
13
13
  a,
14
14
  "border-transparent"
15
- ), b = "text-accent-foreground rounded-none border-transparent", B = e(
15
+ ), b = "text-accent-foreground rounded-none border-transparent", L = 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
- ), 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(
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(
19
19
  "select-none flex items-center justify-center",
20
20
  f,
21
21
  l,
22
22
  d,
23
23
  "rdp-week_number"
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(
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(
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(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);
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);
32
32
  }
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);
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);
36
36
  }
37
37
  export {
38
38
  l as DAY_CELL_SIZE,
39
- E as DAY_MONTH_MIN_WIDTH,
39
+ y as DAY_MONTH_MIN_WIDTH,
40
40
  s as INTERVAL_TRACK,
41
- c as POINT_FILL,
42
- i as POINT_FILL_HOVER,
41
+ i as POINT_FILL,
42
+ c as POINT_FILL_HOVER,
43
43
  a as SELECTION_RADIUS,
44
- I as SELECTION_RADIUS_END,
45
- k as SELECTION_RADIUS_START,
44
+ k as SELECTION_RADIUS_END,
45
+ I as SELECTION_RADIUS_START,
46
46
  d as WEEK_GUTTER_RULE,
47
- F as dayButtonAppearanceClassName,
47
+ U 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
- B as dayCellBaseClassName,
54
- U as periodRangeTrackClassName,
55
- j as periodTileAppearanceClassName,
53
+ L as dayCellBaseClassName,
54
+ P as periodRangeTrackClassName,
55
+ F as periodTileAppearanceClassName,
56
56
  o as periodTileBaseClassName,
57
- w as periodTileDisabledClassName,
57
+ T as periodTileDisabledClassName,
58
58
  h as periodTileHoverClassName,
59
59
  x as periodTileMiddleClassName,
60
60
  g as periodTilePointClassName,
61
61
  R as previewCapEndCellClassName,
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,
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,
70
69
  D as weekNumberInteractiveClassName,
71
- M as weekNumberSelectedFillClassName,
70
+ H as weekNumberSelectedFillClassName,
72
71
  f as weekNumberTypeClassName
73
72
  };
@@ -18,7 +18,6 @@ export interface CalendarWeekNumberCellProps {
18
18
  getCellMeta?: (date: Date) => DateCellMeta | undefined;
19
19
  onWeekSelect: (input: WeekPickerInput) => void;
20
20
  blank?: boolean;
21
- blocked?: boolean;
22
21
  className?: string;
23
22
  }
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;
23
+ export declare function CalendarWeekNumberCell({ week, weekStartsOn, pickerType, calendarKind, weekNumberLabel, weekLabel, fiscalWeekNumberLabel, fiscalWeekAriaLabel, getCellMeta, onWeekSelect, blank, className, ...weekProps }: CalendarWeekNumberCellProps & React.HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;