impact-nova 2.5.8 → 2.5.10
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/column-runtime-state-guard.js +42 -42
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +15 -0
- package/dist/components/data/data-table/data-table-column-tree-cache.js +109 -80
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +65 -62
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +2 -3
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
- package/dist/components/data-display/calendar/calendar-day-picker-classnames.d.ts +6 -1
- package/dist/components/data-display/calendar/calendar-day-picker-classnames.js +31 -23
- package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +2 -1
- package/dist/components/data-display/calendar/calendar-day-picker-components.js +197 -164
- package/dist/components/data-display/calendar/calendar-day-picker-view.d.ts +3 -2
- package/dist/components/data-display/calendar/calendar-day-picker-view.js +130 -129
- package/dist/components/data-display/calendar/calendar-fiscal-labels.js +6 -6
- package/dist/components/data-display/calendar/calendar-fiscal-period-nav.d.ts +16 -0
- package/dist/components/data-display/calendar/calendar-fiscal-period-nav.js +41 -0
- package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +5 -1
- package/dist/components/data-display/calendar/calendar-padding-week.utils.js +20 -16
- 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 +43 -42
- package/dist/components/data-display/calendar/calendar-week-utils.d.ts +6 -0
- package/dist/components/data-display/calendar/calendar-week-utils.js +51 -47
- package/dist/components/data-display/calendar/calendar.js +102 -100
- package/dist/components/data-display/calendar/calendar.types.d.ts +2 -0
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +4 -2
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +77 -72
- package/dist/components/data-display/calendar/use-fiscal-calendar.js +16 -15
- package/dist/components/feedback/dialog/dialog.js +12 -12
- package/dist/components/feedback/sheet/sheet.js +22 -22
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
- 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/calendar-selection-adapters.d.ts +2 -0
- package/dist/components/forms/date-picker/calendar-selection-adapters.js +36 -31
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +10 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +111 -90
- package/dist/components/forms/date-picker/date-picker.js +71 -69
- package/dist/components/forms/date-picker/date-picker.types.d.ts +2 -0
- package/dist/components/forms/date-picker/date-range-picker.js +146 -144
- package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +1 -0
- package/dist/components/forms/date-picker/fiscal-pass-through.js +1 -0
- package/dist/components/forms/date-picker/month-picker.js +82 -80
- package/dist/components/forms/date-picker/month-range-picker.js +145 -143
- 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 +46 -44
- package/dist/components/forms/date-picker/multi-week-picker.js +53 -51
- package/dist/components/forms/date-picker/multi-year-picker.js +48 -46
- package/dist/components/forms/date-picker/picker-story-layout.d.ts +2 -0
- package/dist/components/forms/date-picker/quarter-picker.js +46 -44
- package/dist/components/forms/date-picker/quarter-range-picker.js +45 -43
- package/dist/components/forms/date-picker/week-picker.js +82 -80
- package/dist/components/forms/date-picker/week-range-picker.js +169 -164
- package/dist/components/forms/date-picker/year-picker.js +47 -45
- package/dist/components/forms/date-picker/year-range-picker.js +47 -45
- package/dist/components/forms/select/components/SelectMenuPanel.js +3 -2
- package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
- package/dist/components/forms/select/components/Submenu.js +2 -3
- package/dist/components/forms/select/select.js +1 -0
- package/dist/components/forms/smart-input/smart-input.js +106 -85
- package/dist/components/forms/smart-input/smart-input.types.d.ts +5 -0
- package/dist/components/forms/textarea/textarea.js +29 -28
- package/dist/components/forms/textarea/textarea.types.d.ts +1 -0
- package/dist/form-react/Fields/TextField.js +25 -24
- package/dist/form-react/Fields/WeekRangePicker.js +47 -48
- package/dist/form-react/types/fields.types.d.ts +8 -0
- package/dist/impact-nova.css +1 -1
- package/dist/lib/fiscal-calendar/civil-date.js +18 -18
- package/dist/lib/overlay/overlay-portal-context.js +16 -16
- package/dist/llms/rules/best-practices.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/real-world-patterns.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -1,71 +1,74 @@
|
|
|
1
|
-
import { civilFromLocalDate as
|
|
2
|
-
import { resolveWeekSelection as
|
|
3
|
-
function
|
|
4
|
-
const o =
|
|
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
|
|
9
|
-
return
|
|
8
|
+
function A(e) {
|
|
9
|
+
return e.calendarKind !== "fiscal" || e.weekPeriod == null || e.panePeriod == null ? !1 : e.weekPeriod !== e.panePeriod;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
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
|
|
16
|
-
|
|
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) =>
|
|
22
|
+
return a.some((f) => m(f, e)) ? a.filter((f) => !m(f, e)) : [...a, e];
|
|
20
23
|
}
|
|
21
|
-
const
|
|
22
|
-
if (!
|
|
23
|
-
if (
|
|
24
|
-
const s = { from:
|
|
25
|
-
return
|
|
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(
|
|
28
|
-
if (!
|
|
29
|
-
const n = [], o = (
|
|
30
|
-
const s = new Date(
|
|
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(
|
|
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(
|
|
37
|
-
|
|
38
|
-
else if ("from" in
|
|
39
|
-
if (
|
|
40
|
-
if (!
|
|
41
|
-
o(
|
|
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
|
|
44
|
-
|
|
45
|
-
const s = new Date(
|
|
46
|
-
for (s.setHours(0, 0, 0, 0);
|
|
47
|
-
n.push(new Date(
|
|
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(
|
|
53
|
+
o(e);
|
|
51
54
|
return n;
|
|
52
55
|
}
|
|
53
|
-
function
|
|
54
|
-
if (!
|
|
56
|
+
function F(e, n, o) {
|
|
57
|
+
if (!e || e.length === 0)
|
|
55
58
|
return { range_start: [], range_middle: [], range_end: [] };
|
|
56
|
-
const
|
|
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(
|
|
61
|
+
f.add(l(r.startDate)), d.add(l(r.endDate));
|
|
59
62
|
});
|
|
60
|
-
const
|
|
63
|
+
const D = (r, i) => {
|
|
61
64
|
if (i === 0) return !1;
|
|
62
|
-
const c =
|
|
65
|
+
const c = t[i - 1];
|
|
63
66
|
return r.getTime() - c.getTime() <= 1440 * 60 * 1e3;
|
|
64
|
-
},
|
|
65
|
-
return
|
|
66
|
-
const c =
|
|
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
|
-
|
|
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
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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,22 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createComponent as
|
|
3
|
-
import { CALENDAR_DEFAULT_END_MONTH as
|
|
1
|
+
import { jsxs as Xe, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { createComponent as Ze } from "../../../lib/primitives/create-component.js";
|
|
3
|
+
import { CALENDAR_DEFAULT_END_MONTH as $e, CALENDAR_DEFAULT_START_MONTH as Ke, getCalendarDayLayoutAttr as ea, getCalendarMonthLayoutAttr as aa, resolveFiscalConfig as ra, resolveFiscalPattern as la } from "./calendar-config.js";
|
|
4
4
|
import { civilFromLocalDate as O } from "../../../lib/fiscal-calendar/civil-date.js";
|
|
5
|
-
import { getFiscalPresets as
|
|
6
|
-
import { getGregorianPresets as
|
|
5
|
+
import { getFiscalPresets as na } from "../../../lib/fiscal-calendar/presets.js";
|
|
6
|
+
import { getGregorianPresets as ta } 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 oa, formatFiscalYearLabel as k, formatQuarterLabelsForYear as ia, formatYearIntervalCaption as sa } from "./calendar-fiscal-labels.js";
|
|
9
|
+
import { CalendarDayPickerView as ca } from "./calendar-day-picker-view.js";
|
|
10
|
+
import { CalendarFooter as da } from "./calendar-footer.js";
|
|
11
|
+
import { CalendarMonthPanes as ma } from "./calendar-month-panes.js";
|
|
12
|
+
import { CalendarPresetStrip as ua } from "./calendar-preset-strip.js";
|
|
13
|
+
import { CalendarQuarterPanes as ga } from "./calendar-quarter-panes.js";
|
|
14
|
+
import { CalendarYearPanes as fa } from "./calendar-year-panes.js";
|
|
15
|
+
import { isDateRangeArray as pa, asDayPickerSelection as D, formatMultiRangeFooterSummary as ba, asRangeSelection as Ca } from "./calendar-interval-utils.js";
|
|
16
|
+
import { useCalendarI18n as ha } from "./use-calendar-i18n.js";
|
|
17
|
+
import { useCalendarState as Ya } from "./use-calendar-state.js";
|
|
18
|
+
import { useFiscalCalendar as va } from "./use-fiscal-calendar.js";
|
|
19
|
+
const wa = Ze(
|
|
20
20
|
"Calendar",
|
|
21
21
|
({
|
|
22
22
|
className: U,
|
|
@@ -58,60 +58,61 @@ const _a = Xe(
|
|
|
58
58
|
onYearSelect: de,
|
|
59
59
|
yearMode: h = "single",
|
|
60
60
|
showIntervalCaption: me = !1,
|
|
61
|
+
showPeriodBoundaries: ue = !1,
|
|
61
62
|
showPresets: W = !1,
|
|
62
|
-
comparison:
|
|
63
|
-
onComparisonChange:
|
|
64
|
-
onRangesChange:
|
|
65
|
-
month:
|
|
66
|
-
defaultMonth:
|
|
67
|
-
onMonthChange:
|
|
68
|
-
startMonth:
|
|
69
|
-
endMonth:
|
|
63
|
+
comparison: ge,
|
|
64
|
+
onComparisonChange: fe,
|
|
65
|
+
onRangesChange: pe,
|
|
66
|
+
month: be,
|
|
67
|
+
defaultMonth: Ce,
|
|
68
|
+
onMonthChange: he,
|
|
69
|
+
startMonth: Ye,
|
|
70
|
+
endMonth: ve,
|
|
70
71
|
...Y
|
|
71
|
-
},
|
|
72
|
-
const { t: a, intlLocale:
|
|
72
|
+
}, ye) => {
|
|
73
|
+
const { t: a, intlLocale: Pe, dateFnsLocale: Se, monthsFull: Le, monthsShort: E } = ha(), l = ra({
|
|
73
74
|
fiscalConfig: ie,
|
|
74
75
|
calendarKind: r,
|
|
75
76
|
fiscalMode: p,
|
|
76
77
|
fiscalMonthPattern: R,
|
|
77
78
|
fiscalYearStartMonth: A,
|
|
78
79
|
weekStartsOn: C
|
|
79
|
-
}), q =
|
|
80
|
+
}), q = la({
|
|
80
81
|
calendarKind: r,
|
|
81
82
|
fiscalMode: p,
|
|
82
83
|
fiscalMonthPattern: R
|
|
83
|
-
}), d =
|
|
84
|
+
}), d = Ye ?? Ke, m = ve ?? $e, {
|
|
84
85
|
pendingSelection: u,
|
|
85
86
|
currentMonth: g,
|
|
86
|
-
pendingWeekSelection:
|
|
87
|
+
pendingWeekSelection: ke,
|
|
87
88
|
pendingMonthSelection: I,
|
|
88
89
|
pendingQuarterSelection: Q,
|
|
89
90
|
pendingYearSelection: _,
|
|
90
91
|
monthPickerYear: v,
|
|
91
92
|
handleMonthChangeInternal: f,
|
|
92
|
-
resolveWeekFromInput:
|
|
93
|
-
handleWeekClick:
|
|
94
|
-
handleMonthClick:
|
|
95
|
-
handleQuarterClick:
|
|
96
|
-
handleYearClick:
|
|
97
|
-
handlePresetSelect:
|
|
93
|
+
resolveWeekFromInput: De,
|
|
94
|
+
handleWeekClick: Fe,
|
|
95
|
+
handleMonthClick: Re,
|
|
96
|
+
handleQuarterClick: Ae,
|
|
97
|
+
handleYearClick: Ne,
|
|
98
|
+
handlePresetSelect: Me,
|
|
98
99
|
availableYears: w,
|
|
99
|
-
selectedDaysFromWeeks:
|
|
100
|
+
selectedDaysFromWeeks: xe,
|
|
100
101
|
selectedDaysFromRanges: y,
|
|
101
|
-
weekRangeModifiers:
|
|
102
|
-
handleInternalSelect:
|
|
103
|
-
handleApply:
|
|
104
|
-
handleCancel:
|
|
105
|
-
handleClear:
|
|
106
|
-
isMonthSelected:
|
|
107
|
-
getMonthRangeProps:
|
|
108
|
-
isMonthDisabled:
|
|
109
|
-
isQuarterSelected:
|
|
110
|
-
isQuarterDisabled:
|
|
111
|
-
isYearSelected:
|
|
112
|
-
isYearDisabled:
|
|
113
|
-
isApplyDisabledInternal:
|
|
114
|
-
} =
|
|
102
|
+
weekRangeModifiers: We,
|
|
103
|
+
handleInternalSelect: Ee,
|
|
104
|
+
handleApply: qe,
|
|
105
|
+
handleCancel: Ie,
|
|
106
|
+
handleClear: Qe,
|
|
107
|
+
isMonthSelected: _e,
|
|
108
|
+
getMonthRangeProps: we,
|
|
109
|
+
isMonthDisabled: He,
|
|
110
|
+
isQuarterSelected: Oe,
|
|
111
|
+
isQuarterDisabled: je,
|
|
112
|
+
isYearSelected: Ue,
|
|
113
|
+
isYearDisabled: Ge,
|
|
114
|
+
isApplyDisabledInternal: Te
|
|
115
|
+
} = Ya({
|
|
115
116
|
showFooter: i,
|
|
116
117
|
mode: n,
|
|
117
118
|
selected: F,
|
|
@@ -136,36 +137,36 @@ const _a = Xe(
|
|
|
136
137
|
selectedYear: x,
|
|
137
138
|
onYearSelect: de,
|
|
138
139
|
yearMode: h,
|
|
139
|
-
comparison:
|
|
140
|
-
onComparisonChange:
|
|
141
|
-
onRangesChange:
|
|
142
|
-
month:
|
|
143
|
-
defaultMonth:
|
|
144
|
-
onMonthChange:
|
|
140
|
+
comparison: ge,
|
|
141
|
+
onComparisonChange: fe,
|
|
142
|
+
onRangesChange: pe,
|
|
143
|
+
month: be,
|
|
144
|
+
defaultMonth: Ce,
|
|
145
|
+
onMonthChange: he,
|
|
145
146
|
resolvedStartMonth: d,
|
|
146
147
|
resolvedEndMonth: m,
|
|
147
148
|
disabled: Y.disabled,
|
|
148
149
|
onApply: ee,
|
|
149
150
|
onCancel: ae,
|
|
150
151
|
onClear: re
|
|
151
|
-
}), { getCellMeta:
|
|
152
|
+
}), { getCellMeta: Ve, model: P } = va(
|
|
152
153
|
r === "fiscal" ? l : void 0,
|
|
153
154
|
g
|
|
154
|
-
),
|
|
155
|
+
), ze = r === "fiscal" && P ? P.periods.map((e) => oa(e)) : void 0, S = l?.fyLabel ?? "fy-long", L = r === "fiscal" ? w.map((e) => ({
|
|
155
156
|
...e,
|
|
156
157
|
label: k(Number(e.value), S)
|
|
157
|
-
})) : w, H = W ? r === "fiscal" && l ?
|
|
158
|
-
return /* @__PURE__ */
|
|
158
|
+
})) : w, H = W ? r === "fiscal" && l ? na(l, O(/* @__PURE__ */ new Date())) : ta(O(/* @__PURE__ */ new Date())) : [], Be = t === "week" ? "week" : "date", Je = n === "multi-range" ? y : pa(u) ? void 0 : u;
|
|
159
|
+
return /* @__PURE__ */ Xe(
|
|
159
160
|
"div",
|
|
160
161
|
{
|
|
161
|
-
ref:
|
|
162
|
+
ref: ye,
|
|
162
163
|
"data-component": "calendar",
|
|
163
|
-
"data-month-layout":
|
|
164
|
-
"data-day-layout":
|
|
164
|
+
"data-month-layout": aa(t, o),
|
|
165
|
+
"data-day-layout": ea(t, n, s),
|
|
165
166
|
children: [
|
|
166
|
-
W && H.length > 0 ? /* @__PURE__ */ c(
|
|
167
|
+
W && H.length > 0 ? /* @__PURE__ */ c(ua, { presets: H, onPresetSelect: Me }) : null,
|
|
167
168
|
t === "month" ? /* @__PURE__ */ c(
|
|
168
|
-
|
|
169
|
+
ma,
|
|
169
170
|
{
|
|
170
171
|
monthMode: o === "multi-range" ? "multiple" : o,
|
|
171
172
|
monthPickerYear: v,
|
|
@@ -179,15 +180,15 @@ const _a = Xe(
|
|
|
179
180
|
previousYearLabel: a("calendar.previousYear"),
|
|
180
181
|
nextYearLabel: a("calendar.nextYear"),
|
|
181
182
|
currentMonth: g,
|
|
182
|
-
isMonthSelected:
|
|
183
|
-
getMonthRangeProps:
|
|
184
|
-
isMonthDisabled:
|
|
183
|
+
isMonthSelected: _e,
|
|
184
|
+
getMonthRangeProps: we,
|
|
185
|
+
isMonthDisabled: He,
|
|
185
186
|
onMonthChange: f,
|
|
186
|
-
onMonthClick:
|
|
187
|
-
periodLabels:
|
|
187
|
+
onMonthClick: Re,
|
|
188
|
+
periodLabels: ze
|
|
188
189
|
}
|
|
189
190
|
) : t === "quarter" ? /* @__PURE__ */ c(
|
|
190
|
-
|
|
191
|
+
ga,
|
|
191
192
|
{
|
|
192
193
|
quarterMode: o,
|
|
193
194
|
pickerYear: v,
|
|
@@ -200,17 +201,17 @@ const _a = Xe(
|
|
|
200
201
|
previousYearLabel: a("calendar.previousYear"),
|
|
201
202
|
nextYearLabel: a("calendar.nextYear"),
|
|
202
203
|
currentMonth: g,
|
|
203
|
-
quarterLabelsForYear: (e) =>
|
|
204
|
+
quarterLabelsForYear: (e) => ia(
|
|
204
205
|
e,
|
|
205
206
|
r === "fiscal" ? l : void 0
|
|
206
207
|
),
|
|
207
|
-
isQuarterSelected:
|
|
208
|
-
isQuarterDisabled:
|
|
208
|
+
isQuarterSelected: Oe,
|
|
209
|
+
isQuarterDisabled: je,
|
|
209
210
|
onMonthChange: f,
|
|
210
|
-
onQuarterClick:
|
|
211
|
+
onQuarterClick: Ae
|
|
211
212
|
}
|
|
212
213
|
) : t === "year" ? /* @__PURE__ */ c(
|
|
213
|
-
|
|
214
|
+
fa,
|
|
214
215
|
{
|
|
215
216
|
pickerYear: v,
|
|
216
217
|
resolvedStartYear: d.getFullYear(),
|
|
@@ -218,23 +219,23 @@ const _a = Xe(
|
|
|
218
219
|
previousYearLabel: a("calendar.previousYear"),
|
|
219
220
|
nextYearLabel: a("calendar.nextYear"),
|
|
220
221
|
yearLabels: r === "fiscal" ? (e) => k(e, S) : void 0,
|
|
221
|
-
yearCaptions: me ? (e) =>
|
|
222
|
+
yearCaptions: me ? (e) => sa(
|
|
222
223
|
e,
|
|
223
224
|
r === "fiscal" ? l : void 0
|
|
224
225
|
) : void 0,
|
|
225
226
|
showFooter: i,
|
|
226
227
|
pendingYearSelection: _,
|
|
227
228
|
selectedYear: x,
|
|
228
|
-
isYearSelected:
|
|
229
|
-
isYearDisabled:
|
|
229
|
+
isYearSelected: Ue,
|
|
230
|
+
isYearDisabled: Ge,
|
|
230
231
|
onYearPageChange: (e) => f(new Date(e, 0, 1)),
|
|
231
|
-
onYearClick:
|
|
232
|
+
onYearClick: Ne
|
|
232
233
|
}
|
|
233
234
|
) : /* @__PURE__ */ c(
|
|
234
|
-
|
|
235
|
+
ca,
|
|
235
236
|
{
|
|
236
237
|
className: U,
|
|
237
|
-
pickerType:
|
|
238
|
+
pickerType: Be,
|
|
238
239
|
mode: n === "multi-range" ? "multiple" : n,
|
|
239
240
|
weekMode: s === "multi-range" ? "multiple" : s,
|
|
240
241
|
calendarKind: r,
|
|
@@ -249,23 +250,24 @@ const _a = Xe(
|
|
|
249
250
|
components: X,
|
|
250
251
|
selected: n === "multi-range" ? y : D(F),
|
|
251
252
|
showFooter: i,
|
|
252
|
-
|
|
253
|
-
|
|
253
|
+
showPeriodBoundaries: ue,
|
|
254
|
+
pendingSelection: D(Je),
|
|
255
|
+
selectedDaysFromWeeks: xe ?? y,
|
|
254
256
|
currentMonth: g,
|
|
255
|
-
monthsFull:
|
|
257
|
+
monthsFull: Le,
|
|
256
258
|
monthsShort: E,
|
|
257
259
|
resolvedStartMonth: d,
|
|
258
260
|
resolvedEndMonth: m,
|
|
259
261
|
availableYears: L,
|
|
260
262
|
fiscalPeriods: P?.periods,
|
|
261
263
|
fiscalConfig: l,
|
|
262
|
-
dateFnsLocale:
|
|
263
|
-
intlLocale:
|
|
264
|
-
weekRangeModifiers:
|
|
265
|
-
getCellMeta:
|
|
266
|
-
onSelect:
|
|
264
|
+
dateFnsLocale: Se,
|
|
265
|
+
intlLocale: Pe,
|
|
266
|
+
weekRangeModifiers: We,
|
|
267
|
+
getCellMeta: Ve,
|
|
268
|
+
onSelect: Ee,
|
|
267
269
|
onMonthChange: f,
|
|
268
|
-
onWeekSelect: (e) => De(
|
|
270
|
+
onWeekSelect: (e) => Fe(De(e)),
|
|
269
271
|
previousMonthLabel: a("calendar.previousMonth"),
|
|
270
272
|
nextMonthLabel: a("calendar.nextMonth"),
|
|
271
273
|
monthPlaceholder: a(r === "fiscal" ? "calendar.periodPlaceholder" : "calendar.monthPlaceholder"),
|
|
@@ -284,7 +286,7 @@ const _a = Xe(
|
|
|
284
286
|
}
|
|
285
287
|
),
|
|
286
288
|
i ? /* @__PURE__ */ c(
|
|
287
|
-
|
|
289
|
+
da,
|
|
288
290
|
{
|
|
289
291
|
pickerType: t,
|
|
290
292
|
mode: n,
|
|
@@ -296,13 +298,13 @@ const _a = Xe(
|
|
|
296
298
|
resolvedFiscalPattern: q,
|
|
297
299
|
fiscalConfig: l,
|
|
298
300
|
pendingSelection: D(u),
|
|
299
|
-
pendingWeekSelection:
|
|
301
|
+
pendingWeekSelection: ke,
|
|
300
302
|
pendingMonthSelection: I,
|
|
301
303
|
pendingQuarterSelection: Q,
|
|
302
304
|
pendingYearSelection: _,
|
|
303
|
-
multiRangeSummary: n === "multi-range" ?
|
|
305
|
+
multiRangeSummary: n === "multi-range" ? ba(Ca(u)) : void 0,
|
|
304
306
|
disableApply: K,
|
|
305
|
-
isApplyDisabled:
|
|
307
|
+
isApplyDisabled: Te,
|
|
306
308
|
footerFlashKey: Z,
|
|
307
309
|
footerFlashTarget: $,
|
|
308
310
|
labels: {
|
|
@@ -317,9 +319,9 @@ const _a = Xe(
|
|
|
317
319
|
yearSingle: a("calendar.yearRange"),
|
|
318
320
|
yearPlural: (e) => a("calendar.yearRangePlural", { count: e })
|
|
319
321
|
},
|
|
320
|
-
onClear:
|
|
321
|
-
onCancel:
|
|
322
|
-
onApply:
|
|
322
|
+
onClear: Qe,
|
|
323
|
+
onCancel: Ie,
|
|
324
|
+
onApply: qe
|
|
323
325
|
}
|
|
324
326
|
) : null
|
|
325
327
|
]
|
|
@@ -328,5 +330,5 @@ const _a = Xe(
|
|
|
328
330
|
}
|
|
329
331
|
);
|
|
330
332
|
export {
|
|
331
|
-
|
|
333
|
+
wa as Calendar
|
|
332
334
|
};
|
|
@@ -86,6 +86,8 @@ export interface CalendarProps extends Omit<React.ComponentProps<typeof DayPicke
|
|
|
86
86
|
yearMode?: "single" | "multiple" | "range" | "multi-range";
|
|
87
87
|
/** Show civil/FY start–end under year cells. Default false. */
|
|
88
88
|
showIntervalCaption?: boolean;
|
|
89
|
+
/** Draw `(` / `)` on fiscal period start/end days. Default false — periods are already labeled in the caption. */
|
|
90
|
+
showPeriodBoundaries?: boolean;
|
|
89
91
|
onSelectionChange?: (selection: CalendarSelection) => void;
|
|
90
92
|
showPresets?: boolean;
|
|
91
93
|
comparison?: "prior-fy";
|
|
@@ -33,9 +33,11 @@ export interface UseCalendarDayPickerConfigParams {
|
|
|
33
33
|
onMonthChange: (month: Date) => void;
|
|
34
34
|
onWeekSelect: (input: WeekPickerInput) => void;
|
|
35
35
|
weekMode?: "single" | "multiple" | "range" | "multi-range";
|
|
36
|
+
showPeriodBoundaries?: boolean;
|
|
37
|
+
showWeekNumber?: boolean;
|
|
36
38
|
components?: React.ComponentProps<typeof DayPicker>["components"];
|
|
37
39
|
}
|
|
38
|
-
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, components, }: UseCalendarDayPickerConfigParams): {
|
|
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): {
|
|
39
41
|
dayPickerClassNames: {
|
|
40
42
|
root: string;
|
|
41
43
|
chevron?: string | undefined;
|
|
@@ -55,7 +57,7 @@ export declare function useCalendarDayPickerConfig({ buttonVariant, pickerType,
|
|
|
55
57
|
button_next: string;
|
|
56
58
|
button_previous: string;
|
|
57
59
|
week: string;
|
|
58
|
-
weeks
|
|
60
|
+
weeks: string;
|
|
59
61
|
weekday: string;
|
|
60
62
|
weekdays: string;
|
|
61
63
|
week_number: string;
|