impact-nova 2.5.13 → 2.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +0 -1
- package/dist/components/data/data-table/build-column-tree-from-grid.js +50 -55
- package/dist/components/data/data-table/data-table-column-apply.d.ts +0 -2
- package/dist/components/data/data-table/data-table-column-apply.js +73 -84
- package/dist/components/data/data-table/data-table-column-list.js +64 -94
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +6 -12
- package/dist/components/data/data-table/data-table-column-tree-cache.js +131 -250
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +0 -5
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +11 -28
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +0 -10
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +196 -250
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- package/dist/components/data/nested-list/components/NestedListContent.d.ts +2 -10
- package/dist/components/data/nested-list/components/NestedListContent.js +138 -253
- package/dist/components/data/nested-list/components/SortableItem.d.ts +1 -2
- package/dist/components/data/nested-list/components/SortableItem.js +60 -62
- package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +20 -10
- package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +233 -44
- package/dist/components/data/nested-list/nested-list-constants.d.ts +1 -4
- package/dist/components/data/nested-list/nested-list-constants.js +4 -10
- package/dist/components/data/nested-list/nested-list.js +336 -322
- package/dist/components/data/nested-list/nested-list.types.d.ts +0 -17
- package/dist/components/data-display/calendar/calendar-apply-validation.d.ts +2 -0
- package/dist/components/data-display/calendar/calendar-apply-validation.js +64 -67
- package/dist/components/data-display/calendar/calendar-available-view.d.ts +27 -0
- package/dist/components/data-display/calendar/calendar-available-view.js +85 -0
- package/dist/components/data-display/calendar/calendar-config.js +1 -1
- package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +4 -2
- package/dist/components/data-display/calendar/calendar-day-picker-components.js +234 -164
- package/dist/components/data-display/calendar/calendar-day-picker-view.js +77 -76
- package/dist/components/data-display/calendar/calendar-fiscal-day-cell.d.ts +9 -0
- package/dist/components/data-display/calendar/calendar-fiscal-day-cell.js +45 -0
- package/dist/components/data-display/calendar/calendar-fiscal-period-nav.d.ts +6 -0
- package/dist/components/data-display/calendar/calendar-fiscal-period-nav.js +34 -18
- package/dist/components/data-display/calendar/calendar-footer.js +21 -21
- package/dist/components/data-display/calendar/calendar-injected-week-row.d.ts +5 -0
- package/dist/components/data-display/calendar/calendar-injected-week-row.js +92 -0
- package/dist/components/data-display/calendar/calendar-leading-week.utils.d.ts +16 -0
- package/dist/components/data-display/calendar/calendar-leading-week.utils.js +51 -0
- package/dist/components/data-display/calendar/calendar-month-picker-panel.js +50 -49
- package/dist/components/data-display/calendar/calendar-month-utils.d.ts +5 -0
- package/dist/components/data-display/calendar/calendar-month-utils.js +85 -64
- package/dist/components/data-display/calendar/calendar-orphan-week.d.ts +23 -0
- package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +3 -1
- package/dist/components/data-display/calendar/calendar-padding-week.utils.js +7 -5
- package/dist/components/data-display/calendar/calendar-period-cell.js +45 -46
- package/dist/components/data-display/calendar/calendar-quarter-panes.js +33 -31
- package/dist/components/data-display/calendar/calendar-selection-appearance.d.ts +10 -0
- package/dist/components/data-display/calendar/calendar-selection-appearance.js +53 -39
- package/dist/components/data-display/calendar/calendar-selection.d.ts +25 -0
- package/dist/components/data-display/calendar/calendar-selection.js +52 -23
- package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +2 -1
- package/dist/components/data-display/calendar/calendar-week-number-cell.js +59 -45
- package/dist/components/data-display/calendar/calendar-week-utils.d.ts +15 -4
- package/dist/components/data-display/calendar/calendar-week-utils.js +59 -50
- package/dist/components/data-display/calendar/calendar-year-panes.d.ts +3 -0
- package/dist/components/data-display/calendar/calendar-year-panes.js +53 -49
- package/dist/components/data-display/calendar/calendar.js +146 -143
- package/dist/components/data-display/calendar/calendar.types.d.ts +5 -0
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +2 -1
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +79 -74
- package/dist/components/data-display/calendar/use-calendar-state.d.ts +3 -1
- package/dist/components/data-display/calendar/use-calendar-state.js +394 -314
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/forms/date-picker/date-picker.js +60 -58
- package/dist/components/forms/date-picker/date-picker.types.d.ts +5 -0
- package/dist/components/forms/date-picker/date-range-picker.js +66 -64
- package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +1 -0
- package/dist/components/forms/date-picker/fiscal-pass-through.js +3 -2
- package/dist/components/forms/date-picker/fiscal-picker-fixtures.d.ts +17 -0
- package/dist/components/forms/date-picker/month-picker.js +61 -59
- package/dist/components/forms/date-picker/month-range-picker.js +63 -61
- package/dist/components/forms/date-picker/multi-date-picker.js +51 -49
- package/dist/components/forms/date-picker/multi-month-picker.js +49 -47
- package/dist/components/forms/date-picker/multi-quarter-picker.js +51 -47
- package/dist/components/forms/date-picker/multi-week-picker.js +53 -51
- package/dist/components/forms/date-picker/multi-year-picker.js +53 -49
- package/dist/components/forms/date-picker/quarter-picker.js +51 -47
- package/dist/components/forms/date-picker/quarter-range-picker.js +50 -46
- package/dist/components/forms/date-picker/week-picker.js +130 -126
- package/dist/components/forms/date-picker/week-range-picker.js +159 -155
- package/dist/components/forms/date-picker/year-picker.js +52 -48
- package/dist/components/forms/date-picker/year-range-picker.js +52 -48
- package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/form-react/Fields/DateInputField.js +51 -50
- package/dist/form-react/Fields/DateRangeField.js +14 -13
- package/dist/form-react/Fields/MonthRangeField.js +29 -28
- package/dist/form-react/Fields/MultiMonthPickerField.js +13 -12
- package/dist/form-react/Fields/MultiWeekPickerField.js +35 -27
- package/dist/form-react/Fields/MultiYearPickerField.d.ts +8 -0
- package/dist/form-react/Fields/MultiYearPickerField.js +57 -0
- package/dist/form-react/Fields/WeekRangePicker.js +33 -32
- package/dist/form-react/Fields/YearPickerField.d.ts +8 -0
- package/dist/form-react/Fields/YearPickerField.js +57 -0
- package/dist/form-react/Fields/YearRangePickerField.d.ts +8 -0
- package/dist/form-react/Fields/YearRangePickerField.js +57 -0
- package/dist/form-react/registry/defaultFieldRegistrations.d.ts +1 -1
- package/dist/form-react/registry/defaultFieldRegistrations.js +16 -13
- package/dist/form-react/types/fields.types.d.ts +69 -1
- package/dist/form-react/types/fieldsOutput.types.d.ts +8 -2
- package/dist/form-react/utils/fieldDefaults.utils.js +1 -1
- package/dist/impact-nova-components.css +13 -6
- package/dist/impact-nova.css +1 -1
- package/dist/lib/fiscal-calendar/index.d.ts +2 -2
- package/dist/lib/fiscal-calendar/index.js +26 -28
- package/dist/lib/fiscal-calendar/types.d.ts +0 -7
- package/dist/lib/fiscal-calendar/week-selection.d.ts +3 -4
- package/dist/lib/fiscal-calendar/week-selection.js +52 -79
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
- package/dist/components/data/data-table/column-picker-authority.d.ts +0 -34
- package/dist/components/data/data-table/column-picker-authority.js +0 -116
- package/dist/components/data/data-table/column-picker-drop-validation.d.ts +0 -7
- package/dist/components/data/data-table/column-picker-drop-validation.js +0 -37
- package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +0 -10
- package/dist/components/data/data-table/data-table-column-list-tree-apply.js +0 -79
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +0 -26
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +0 -195
- package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +0 -1
- package/dist/components/data/data-table/data-table-picker-column-eligibility.js +0 -7
- package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +0 -12
- package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +0 -12
- package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +0 -24
- package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +0 -128
- package/dist/components/data/nested-list/nested-list-display-utils.d.ts +0 -11
- package/dist/components/data/nested-list/nested-list-display-utils.js +0 -74
- package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +0 -31
- package/dist/components/data/nested-list/nested-list-drop-engine.js +0 -209
- package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +0 -26
- package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +0 -67
- package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +0 -4
- package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +0 -43
- package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +0 -3
- package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +0 -34
- package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +0 -9
- package/dist/components/data/nested-list/nested-list-row-estimates.js +0 -14
- package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +0 -36
- package/dist/components/data/nested-list/nested-list-scroll-anchor.js +0 -47
- package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +0 -59
- package/dist/components/data/nested-list/nested-list-virtual-drop.js +0 -341
- package/dist/lib/hash/fnv1a128.d.ts +0 -16
- package/dist/lib/hash/fnv1a128.js +0 -21
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
import { jsxs as Xe, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { createComponent as
|
|
3
|
-
import { CALENDAR_DEFAULT_END_MONTH as
|
|
4
|
-
import { civilFromLocalDate as
|
|
5
|
-
import { getFiscalPresets as
|
|
6
|
-
import { getGregorianPresets as
|
|
2
|
+
import { createComponent as $e } from "../../../lib/primitives/create-component.js";
|
|
3
|
+
import { CALENDAR_DEFAULT_END_MONTH as Ke, CALENDAR_DEFAULT_START_MONTH as ea, getCalendarDayLayoutAttr as aa, getCalendarMonthLayoutAttr as ra, resolveFiscalConfig as la, resolveFiscalPattern as na } from "./calendar-config.js";
|
|
4
|
+
import { civilFromLocalDate as G } from "../../../lib/fiscal-calendar/civil-date.js";
|
|
5
|
+
import { getFiscalPresets as ta } from "../../../lib/fiscal-calendar/presets.js";
|
|
6
|
+
import { getGregorianPresets as oa } from "./calendar-gregorian-presets.js";
|
|
7
7
|
import { paddedWeekNumber as j } from "./calendar-week-number-header.js";
|
|
8
|
-
import { formatPeriodCell as
|
|
9
|
-
import { CalendarDayPickerView as
|
|
10
|
-
import { CalendarFooter as
|
|
11
|
-
import { CalendarMonthPanes as
|
|
12
|
-
import { CalendarPresetStrip as
|
|
13
|
-
import { CalendarQuarterPanes as
|
|
14
|
-
import { CalendarYearPanes as
|
|
15
|
-
import { isDateRangeArray as
|
|
16
|
-
import { useCalendarI18n as
|
|
17
|
-
import { useCalendarState as
|
|
18
|
-
import { useFiscalCalendar as
|
|
19
|
-
const
|
|
8
|
+
import { formatPeriodCell as ia, formatFiscalYearLabel as k, formatQuarterLabelsForYear as sa, formatYearIntervalCaption as ca } from "./calendar-fiscal-labels.js";
|
|
9
|
+
import { CalendarDayPickerView as da } from "./calendar-day-picker-view.js";
|
|
10
|
+
import { CalendarFooter as ma } from "./calendar-footer.js";
|
|
11
|
+
import { CalendarMonthPanes as ua } from "./calendar-month-panes.js";
|
|
12
|
+
import { CalendarPresetStrip as ga } from "./calendar-preset-strip.js";
|
|
13
|
+
import { CalendarQuarterPanes as fa } from "./calendar-quarter-panes.js";
|
|
14
|
+
import { CalendarYearPanes as pa, YEAR_CAPTION_PAGE_SIZE as ba, YEAR_PAGE_SIZE as Ca } from "./calendar-year-panes.js";
|
|
15
|
+
import { isDateRangeArray as ha, asDayPickerSelection as D, formatMultiRangeFooterSummary as Ya, asRangeSelection as ya } from "./calendar-interval-utils.js";
|
|
16
|
+
import { useCalendarI18n as va } from "./use-calendar-i18n.js";
|
|
17
|
+
import { useCalendarState as Pa } from "./use-calendar-state.js";
|
|
18
|
+
import { useFiscalCalendar as Sa } from "./use-fiscal-calendar.js";
|
|
19
|
+
const Ga = $e(
|
|
20
20
|
"Calendar",
|
|
21
21
|
({
|
|
22
|
-
className:
|
|
23
|
-
classNames:
|
|
24
|
-
showOutsideDays:
|
|
25
|
-
fixedWeeks:
|
|
26
|
-
captionLayout:
|
|
22
|
+
className: T,
|
|
23
|
+
classNames: U,
|
|
24
|
+
showOutsideDays: Z = !1,
|
|
25
|
+
fixedWeeks: z = !0,
|
|
26
|
+
captionLayout: V = "dropdown",
|
|
27
27
|
buttonVariant: B = "ghost",
|
|
28
28
|
formatters: J,
|
|
29
29
|
components: X,
|
|
30
30
|
showFooter: i = !0,
|
|
31
|
-
footerFlashKey:
|
|
32
|
-
footerFlashTarget:
|
|
33
|
-
disableApply:
|
|
34
|
-
onApply:
|
|
35
|
-
onCancel:
|
|
36
|
-
onClear:
|
|
31
|
+
footerFlashKey: $ = 0,
|
|
32
|
+
footerFlashTarget: K,
|
|
33
|
+
disableApply: ee = !1,
|
|
34
|
+
onApply: ae,
|
|
35
|
+
onCancel: re,
|
|
36
|
+
onClear: le,
|
|
37
37
|
mode: n = "single",
|
|
38
38
|
selected: F,
|
|
39
|
-
onSelect:
|
|
40
|
-
onSelectionChange:
|
|
39
|
+
onSelect: ne,
|
|
40
|
+
onSelectionChange: te,
|
|
41
41
|
pickerType: t = "date",
|
|
42
42
|
weekMode: s = "single",
|
|
43
|
-
selectedWeeks:
|
|
44
|
-
onWeekSelect:
|
|
43
|
+
selectedWeeks: oe,
|
|
44
|
+
onWeekSelect: ie,
|
|
45
45
|
calendarKind: r = "gregorian",
|
|
46
|
-
fiscalConfig:
|
|
46
|
+
fiscalConfig: se,
|
|
47
47
|
fiscalMode: p = "basic",
|
|
48
48
|
granularity: b,
|
|
49
|
-
fiscalMonthPattern:
|
|
50
|
-
fiscalYearStartMonth:
|
|
49
|
+
fiscalMonthPattern: A,
|
|
50
|
+
fiscalYearStartMonth: R = 1,
|
|
51
51
|
weekStartsOn: C = 1,
|
|
52
52
|
monthMode: o = "single",
|
|
53
|
-
selectedMonths:
|
|
54
|
-
onMonthSelect:
|
|
55
|
-
selectedQuarters:
|
|
56
|
-
onQuarterSelect:
|
|
57
|
-
selectedYear:
|
|
58
|
-
onYearSelect:
|
|
53
|
+
selectedMonths: E,
|
|
54
|
+
onMonthSelect: ce,
|
|
55
|
+
selectedQuarters: N,
|
|
56
|
+
onQuarterSelect: de,
|
|
57
|
+
selectedYear: M,
|
|
58
|
+
onYearSelect: me,
|
|
59
59
|
yearMode: h = "single",
|
|
60
|
-
showIntervalCaption:
|
|
60
|
+
showIntervalCaption: x = !1,
|
|
61
61
|
showPeriodBoundaries: ue = !1,
|
|
62
62
|
showPresets: W = !1,
|
|
63
63
|
comparison: ge,
|
|
@@ -67,75 +67,76 @@ const wa = Ze(
|
|
|
67
67
|
defaultMonth: Ce,
|
|
68
68
|
onMonthChange: he,
|
|
69
69
|
startMonth: Ye,
|
|
70
|
-
endMonth:
|
|
70
|
+
endMonth: ye,
|
|
71
|
+
autoNavigateToAvailable: ve = !1,
|
|
71
72
|
...Y
|
|
72
|
-
},
|
|
73
|
-
const { t: a, intlLocale:
|
|
74
|
-
fiscalConfig:
|
|
73
|
+
}, Pe) => {
|
|
74
|
+
const { t: a, intlLocale: Se, dateFnsLocale: Le, monthsFull: ke, monthsShort: _ } = va(), l = la({
|
|
75
|
+
fiscalConfig: se,
|
|
75
76
|
calendarKind: r,
|
|
76
77
|
fiscalMode: p,
|
|
77
|
-
fiscalMonthPattern:
|
|
78
|
-
fiscalYearStartMonth:
|
|
78
|
+
fiscalMonthPattern: A,
|
|
79
|
+
fiscalYearStartMonth: R,
|
|
79
80
|
weekStartsOn: C
|
|
80
|
-
}),
|
|
81
|
+
}), I = na({
|
|
81
82
|
calendarKind: r,
|
|
82
83
|
fiscalMode: p,
|
|
83
|
-
fiscalMonthPattern:
|
|
84
|
-
}), d = Ye ??
|
|
84
|
+
fiscalMonthPattern: A
|
|
85
|
+
}), d = Ye ?? ea, m = ye ?? Ke, {
|
|
85
86
|
pendingSelection: u,
|
|
86
87
|
currentMonth: g,
|
|
87
|
-
pendingWeekSelection:
|
|
88
|
-
pendingMonthSelection:
|
|
88
|
+
pendingWeekSelection: De,
|
|
89
|
+
pendingMonthSelection: q,
|
|
89
90
|
pendingQuarterSelection: Q,
|
|
90
|
-
pendingYearSelection:
|
|
91
|
-
monthPickerYear:
|
|
91
|
+
pendingYearSelection: H,
|
|
92
|
+
monthPickerYear: y,
|
|
92
93
|
handleMonthChangeInternal: f,
|
|
93
|
-
resolveWeekFromInput:
|
|
94
|
-
handleWeekClick:
|
|
94
|
+
resolveWeekFromInput: Fe,
|
|
95
|
+
handleWeekClick: Ae,
|
|
95
96
|
handleMonthClick: Re,
|
|
96
|
-
handleQuarterClick:
|
|
97
|
+
handleQuarterClick: Ee,
|
|
97
98
|
handleYearClick: Ne,
|
|
98
99
|
handlePresetSelect: Me,
|
|
99
|
-
availableYears:
|
|
100
|
+
availableYears: O,
|
|
100
101
|
selectedDaysFromWeeks: xe,
|
|
101
|
-
selectedDaysFromRanges:
|
|
102
|
+
selectedDaysFromRanges: v,
|
|
102
103
|
weekRangeModifiers: We,
|
|
103
|
-
handleInternalSelect:
|
|
104
|
-
handleApply:
|
|
105
|
-
handleCancel:
|
|
104
|
+
handleInternalSelect: _e,
|
|
105
|
+
handleApply: Ie,
|
|
106
|
+
handleCancel: qe,
|
|
106
107
|
handleClear: Qe,
|
|
107
|
-
isMonthSelected:
|
|
108
|
-
getMonthRangeProps:
|
|
109
|
-
isMonthDisabled:
|
|
110
|
-
isQuarterSelected:
|
|
108
|
+
isMonthSelected: He,
|
|
109
|
+
getMonthRangeProps: Oe,
|
|
110
|
+
isMonthDisabled: we,
|
|
111
|
+
isQuarterSelected: Ge,
|
|
111
112
|
isQuarterDisabled: je,
|
|
112
|
-
isYearSelected:
|
|
113
|
-
isYearDisabled:
|
|
114
|
-
isApplyDisabledInternal:
|
|
115
|
-
} =
|
|
113
|
+
isYearSelected: Te,
|
|
114
|
+
isYearDisabled: Ue,
|
|
115
|
+
isApplyDisabledInternal: Ze
|
|
116
|
+
} = Pa({
|
|
116
117
|
showFooter: i,
|
|
117
118
|
mode: n,
|
|
118
119
|
selected: F,
|
|
119
|
-
onSelect:
|
|
120
|
-
onSelectionChange:
|
|
120
|
+
onSelect: ne,
|
|
121
|
+
onSelectionChange: te,
|
|
121
122
|
pickerType: t,
|
|
122
123
|
weekMode: s,
|
|
123
|
-
selectedWeeks:
|
|
124
|
-
onWeekSelect:
|
|
124
|
+
selectedWeeks: oe,
|
|
125
|
+
onWeekSelect: ie,
|
|
125
126
|
calendarKind: r,
|
|
126
127
|
fiscalMode: p,
|
|
127
128
|
granularity: b,
|
|
128
|
-
resolvedFiscalPattern:
|
|
129
|
+
resolvedFiscalPattern: I,
|
|
129
130
|
fiscalConfig: l,
|
|
130
|
-
fiscalYearStartMonth:
|
|
131
|
+
fiscalYearStartMonth: R,
|
|
131
132
|
weekStartsOn: C,
|
|
132
133
|
monthMode: o,
|
|
133
|
-
selectedMonths:
|
|
134
|
-
onMonthSelect:
|
|
135
|
-
selectedQuarters:
|
|
136
|
-
onQuarterSelect:
|
|
137
|
-
selectedYear:
|
|
138
|
-
onYearSelect:
|
|
134
|
+
selectedMonths: E,
|
|
135
|
+
onMonthSelect: ce,
|
|
136
|
+
selectedQuarters: N,
|
|
137
|
+
onQuarterSelect: de,
|
|
138
|
+
selectedYear: M,
|
|
139
|
+
onYearSelect: me,
|
|
139
140
|
yearMode: h,
|
|
140
141
|
comparison: ge,
|
|
141
142
|
onComparisonChange: fe,
|
|
@@ -146,128 +147,130 @@ const wa = Ze(
|
|
|
146
147
|
resolvedStartMonth: d,
|
|
147
148
|
resolvedEndMonth: m,
|
|
148
149
|
disabled: Y.disabled,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
autoNavigateToAvailable: ve,
|
|
151
|
+
yearPageSize: x ? ba : Ca,
|
|
152
|
+
onApply: ae,
|
|
153
|
+
onCancel: re,
|
|
154
|
+
onClear: le
|
|
155
|
+
}), { getCellMeta: ze, model: P } = Sa(
|
|
153
156
|
r === "fiscal" ? l : void 0,
|
|
154
157
|
g
|
|
155
|
-
),
|
|
158
|
+
), Ve = r === "fiscal" && P ? P.periods.map((e) => ia(e)) : void 0, S = l?.fyLabel ?? "fy-long", L = r === "fiscal" ? O.map((e) => ({
|
|
156
159
|
...e,
|
|
157
160
|
label: k(Number(e.value), S)
|
|
158
|
-
})) :
|
|
161
|
+
})) : O, w = W ? r === "fiscal" && l ? ta(l, G(/* @__PURE__ */ new Date())) : oa(G(/* @__PURE__ */ new Date())) : [], Be = t === "week" ? "week" : "date", Je = n === "multi-range" ? v : ha(u) ? void 0 : u;
|
|
159
162
|
return /* @__PURE__ */ Xe(
|
|
160
163
|
"div",
|
|
161
164
|
{
|
|
162
|
-
ref:
|
|
165
|
+
ref: Pe,
|
|
163
166
|
"data-component": "calendar",
|
|
164
|
-
"data-month-layout":
|
|
165
|
-
"data-day-layout":
|
|
167
|
+
"data-month-layout": ra(t, o),
|
|
168
|
+
"data-day-layout": aa(t, n, s),
|
|
166
169
|
children: [
|
|
167
|
-
W &&
|
|
170
|
+
W && w.length > 0 ? /* @__PURE__ */ c(ga, { presets: w, onPresetSelect: Me }) : null,
|
|
168
171
|
t === "month" ? /* @__PURE__ */ c(
|
|
169
|
-
|
|
172
|
+
ua,
|
|
170
173
|
{
|
|
171
174
|
monthMode: o === "multi-range" ? "multiple" : o,
|
|
172
|
-
monthPickerYear:
|
|
173
|
-
monthsShort:
|
|
175
|
+
monthPickerYear: y,
|
|
176
|
+
monthsShort: _,
|
|
174
177
|
showFooter: i,
|
|
175
|
-
pendingMonthSelection:
|
|
176
|
-
selectedMonths:
|
|
178
|
+
pendingMonthSelection: q,
|
|
179
|
+
selectedMonths: E,
|
|
177
180
|
resolvedStartYear: d.getFullYear(),
|
|
178
181
|
resolvedEndYear: m.getFullYear(),
|
|
179
182
|
yearOptions: L,
|
|
180
183
|
previousYearLabel: a("calendar.previousYear"),
|
|
181
184
|
nextYearLabel: a("calendar.nextYear"),
|
|
182
185
|
currentMonth: g,
|
|
183
|
-
isMonthSelected:
|
|
184
|
-
getMonthRangeProps:
|
|
185
|
-
isMonthDisabled:
|
|
186
|
+
isMonthSelected: He,
|
|
187
|
+
getMonthRangeProps: Oe,
|
|
188
|
+
isMonthDisabled: we,
|
|
186
189
|
onMonthChange: f,
|
|
187
190
|
onMonthClick: Re,
|
|
188
|
-
periodLabels:
|
|
191
|
+
periodLabels: Ve
|
|
189
192
|
}
|
|
190
193
|
) : t === "quarter" ? /* @__PURE__ */ c(
|
|
191
|
-
|
|
194
|
+
fa,
|
|
192
195
|
{
|
|
193
196
|
quarterMode: o,
|
|
194
|
-
pickerYear:
|
|
197
|
+
pickerYear: y,
|
|
195
198
|
showFooter: i,
|
|
196
199
|
pendingQuarterSelection: Q,
|
|
197
|
-
selectedQuarters:
|
|
200
|
+
selectedQuarters: N,
|
|
198
201
|
resolvedStartYear: d.getFullYear(),
|
|
199
202
|
resolvedEndYear: m.getFullYear(),
|
|
200
203
|
yearOptions: L,
|
|
201
204
|
previousYearLabel: a("calendar.previousYear"),
|
|
202
205
|
nextYearLabel: a("calendar.nextYear"),
|
|
203
206
|
currentMonth: g,
|
|
204
|
-
quarterLabelsForYear: (e) =>
|
|
207
|
+
quarterLabelsForYear: (e) => sa(
|
|
205
208
|
e,
|
|
206
209
|
r === "fiscal" ? l : void 0
|
|
207
210
|
),
|
|
208
|
-
isQuarterSelected:
|
|
211
|
+
isQuarterSelected: Ge,
|
|
209
212
|
isQuarterDisabled: je,
|
|
210
213
|
onMonthChange: f,
|
|
211
|
-
onQuarterClick:
|
|
214
|
+
onQuarterClick: Ee
|
|
212
215
|
}
|
|
213
216
|
) : t === "year" ? /* @__PURE__ */ c(
|
|
214
|
-
|
|
217
|
+
pa,
|
|
215
218
|
{
|
|
216
|
-
pickerYear:
|
|
219
|
+
pickerYear: y,
|
|
217
220
|
resolvedStartYear: d.getFullYear(),
|
|
218
221
|
resolvedEndYear: m.getFullYear(),
|
|
219
222
|
previousYearLabel: a("calendar.previousYear"),
|
|
220
223
|
nextYearLabel: a("calendar.nextYear"),
|
|
221
224
|
yearLabels: r === "fiscal" ? (e) => k(e, S) : void 0,
|
|
222
|
-
yearCaptions:
|
|
225
|
+
yearCaptions: x ? (e) => ca(
|
|
223
226
|
e,
|
|
224
227
|
r === "fiscal" ? l : void 0
|
|
225
228
|
) : void 0,
|
|
226
229
|
showFooter: i,
|
|
227
|
-
pendingYearSelection:
|
|
228
|
-
selectedYear:
|
|
229
|
-
isYearSelected:
|
|
230
|
-
isYearDisabled:
|
|
230
|
+
pendingYearSelection: H,
|
|
231
|
+
selectedYear: M,
|
|
232
|
+
isYearSelected: Te,
|
|
233
|
+
isYearDisabled: Ue,
|
|
231
234
|
onYearPageChange: (e) => f(new Date(e, 0, 1)),
|
|
232
235
|
onYearClick: Ne
|
|
233
236
|
}
|
|
234
237
|
) : /* @__PURE__ */ c(
|
|
235
|
-
|
|
238
|
+
da,
|
|
236
239
|
{
|
|
237
|
-
className:
|
|
240
|
+
className: T,
|
|
238
241
|
pickerType: Be,
|
|
239
242
|
mode: n === "multi-range" ? "multiple" : n,
|
|
240
243
|
weekMode: s === "multi-range" ? "multiple" : s,
|
|
241
244
|
calendarKind: r,
|
|
242
245
|
granularity: b,
|
|
243
|
-
showOutsideDays:
|
|
244
|
-
fixedWeeks:
|
|
245
|
-
captionLayout:
|
|
246
|
+
showOutsideDays: Z,
|
|
247
|
+
fixedWeeks: z,
|
|
248
|
+
captionLayout: V,
|
|
246
249
|
buttonVariant: B,
|
|
247
250
|
weekStartsOn: C,
|
|
248
251
|
formatters: J,
|
|
249
|
-
classNames:
|
|
252
|
+
classNames: U,
|
|
250
253
|
components: X,
|
|
251
|
-
selected: n === "multi-range" ?
|
|
254
|
+
selected: n === "multi-range" ? v : D(F),
|
|
252
255
|
showFooter: i,
|
|
253
256
|
showPeriodBoundaries: ue,
|
|
254
257
|
pendingSelection: D(Je),
|
|
255
|
-
selectedDaysFromWeeks: xe ??
|
|
258
|
+
selectedDaysFromWeeks: xe ?? v,
|
|
256
259
|
currentMonth: g,
|
|
257
|
-
monthsFull:
|
|
258
|
-
monthsShort:
|
|
260
|
+
monthsFull: ke,
|
|
261
|
+
monthsShort: _,
|
|
259
262
|
resolvedStartMonth: d,
|
|
260
263
|
resolvedEndMonth: m,
|
|
261
264
|
availableYears: L,
|
|
262
265
|
fiscalPeriods: P?.periods,
|
|
263
266
|
fiscalConfig: l,
|
|
264
|
-
dateFnsLocale:
|
|
265
|
-
intlLocale:
|
|
267
|
+
dateFnsLocale: Le,
|
|
268
|
+
intlLocale: Se,
|
|
266
269
|
weekRangeModifiers: We,
|
|
267
|
-
getCellMeta:
|
|
268
|
-
onSelect:
|
|
270
|
+
getCellMeta: ze,
|
|
271
|
+
onSelect: _e,
|
|
269
272
|
onMonthChange: f,
|
|
270
|
-
onWeekSelect: (e) => Fe(
|
|
273
|
+
onWeekSelect: (e) => Ae(Fe(e)),
|
|
271
274
|
previousMonthLabel: a("calendar.previousMonth"),
|
|
272
275
|
nextMonthLabel: a("calendar.nextMonth"),
|
|
273
276
|
monthPlaceholder: a(r === "fiscal" ? "calendar.periodPlaceholder" : "calendar.monthPlaceholder"),
|
|
@@ -286,7 +289,7 @@ const wa = Ze(
|
|
|
286
289
|
}
|
|
287
290
|
),
|
|
288
291
|
i ? /* @__PURE__ */ c(
|
|
289
|
-
|
|
292
|
+
ma,
|
|
290
293
|
{
|
|
291
294
|
pickerType: t,
|
|
292
295
|
mode: n,
|
|
@@ -295,18 +298,18 @@ const wa = Ze(
|
|
|
295
298
|
yearMode: h === "multi-range" ? "range" : h,
|
|
296
299
|
calendarKind: r,
|
|
297
300
|
granularity: b,
|
|
298
|
-
resolvedFiscalPattern:
|
|
301
|
+
resolvedFiscalPattern: I,
|
|
299
302
|
fiscalConfig: l,
|
|
300
303
|
pendingSelection: D(u),
|
|
301
|
-
pendingWeekSelection:
|
|
302
|
-
pendingMonthSelection:
|
|
304
|
+
pendingWeekSelection: De,
|
|
305
|
+
pendingMonthSelection: q,
|
|
303
306
|
pendingQuarterSelection: Q,
|
|
304
|
-
pendingYearSelection:
|
|
305
|
-
multiRangeSummary: n === "multi-range" ?
|
|
306
|
-
disableApply:
|
|
307
|
-
isApplyDisabled:
|
|
308
|
-
footerFlashKey:
|
|
309
|
-
footerFlashTarget:
|
|
307
|
+
pendingYearSelection: H,
|
|
308
|
+
multiRangeSummary: n === "multi-range" ? Ya(ya(u)) : void 0,
|
|
309
|
+
disableApply: ee,
|
|
310
|
+
isApplyDisabled: Ze,
|
|
311
|
+
footerFlashKey: $,
|
|
312
|
+
footerFlashTarget: K,
|
|
310
313
|
labels: {
|
|
311
314
|
clear: a("calendar.clear"),
|
|
312
315
|
cancel: a("calendar.cancel"),
|
|
@@ -320,8 +323,8 @@ const wa = Ze(
|
|
|
320
323
|
yearPlural: (e) => a("calendar.yearRangePlural", { count: e })
|
|
321
324
|
},
|
|
322
325
|
onClear: Qe,
|
|
323
|
-
onCancel:
|
|
324
|
-
onApply:
|
|
326
|
+
onCancel: qe,
|
|
327
|
+
onApply: Ie
|
|
325
328
|
}
|
|
326
329
|
) : null
|
|
327
330
|
]
|
|
@@ -330,5 +333,5 @@ const wa = Ze(
|
|
|
330
333
|
}
|
|
331
334
|
);
|
|
332
335
|
export {
|
|
333
|
-
|
|
336
|
+
Ga as Calendar
|
|
334
337
|
};
|
|
@@ -95,4 +95,9 @@ export interface CalendarProps extends Omit<React.ComponentProps<typeof DayPicke
|
|
|
95
95
|
onRangesChange?: (ranges: DateRange[] | undefined) => void;
|
|
96
96
|
/** Always render 6 week rows to prevent layout shift when navigating months. Default true. Padding weeks (all days outside the month) are visually hidden via the Week component. */
|
|
97
97
|
fixedWeeks?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* When true and there is no selection, open on the first enabled day/month/quarter/year
|
|
100
|
+
* instead of the current period. Navigate only — does not select a value. Default false.
|
|
101
|
+
*/
|
|
102
|
+
autoNavigateToAvailable?: boolean;
|
|
98
103
|
}
|
|
@@ -35,9 +35,10 @@ export interface UseCalendarDayPickerConfigParams {
|
|
|
35
35
|
weekMode?: "single" | "multiple" | "range" | "multi-range";
|
|
36
36
|
showPeriodBoundaries?: boolean;
|
|
37
37
|
showWeekNumber?: boolean;
|
|
38
|
+
disabled?: unknown;
|
|
38
39
|
components?: React.ComponentProps<typeof DayPicker>["components"];
|
|
39
40
|
}
|
|
40
|
-
export declare function useCalendarDayPickerConfig({ buttonVariant, pickerType, calendarKind, granularity, showOutsideDays, classNames, currentMonth, monthsFull, monthsShort, resolvedStartMonth, resolvedEndMonth, availableYears, fiscalPeriods, fiscalConfig, weekStartsOn, previousMonthLabel, nextMonthLabel, monthPlaceholder, yearPlaceholder, weekNumberLabel, weekNumberHeader, weekLabel, fiscalWeekNumberLabel, fiscalWeekAriaLabel, getCellMeta, onMonthChange, onWeekSelect, weekMode, showPeriodBoundaries, showWeekNumber, components, }: UseCalendarDayPickerConfigParams): {
|
|
41
|
+
export declare function useCalendarDayPickerConfig({ buttonVariant, pickerType, calendarKind, granularity, showOutsideDays, classNames, currentMonth, monthsFull, monthsShort, resolvedStartMonth, resolvedEndMonth, availableYears, fiscalPeriods, fiscalConfig, weekStartsOn, previousMonthLabel, nextMonthLabel, monthPlaceholder, yearPlaceholder, weekNumberLabel, weekNumberHeader, weekLabel, fiscalWeekNumberLabel, fiscalWeekAriaLabel, getCellMeta, onMonthChange, onWeekSelect, weekMode, showPeriodBoundaries, showWeekNumber, disabled, components, }: UseCalendarDayPickerConfigParams): {
|
|
41
42
|
dayPickerClassNames: {
|
|
42
43
|
root: string;
|
|
43
44
|
chevron?: string | undefined;
|