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,295 +1,365 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { useDayPicker as
|
|
4
|
-
import { ChevronRight as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Select as
|
|
8
|
-
import { CalendarCaptionHeader as
|
|
9
|
-
import { CalendarDayButton as
|
|
1
|
+
import { jsx as s, jsxs as A } from "react/jsx-runtime";
|
|
2
|
+
import * as y from "react";
|
|
3
|
+
import { useDayPicker as ue } from "react-day-picker";
|
|
4
|
+
import { ChevronRight as Q } from "impact-nova-icons";
|
|
5
|
+
import { cn as w } from "../../../lib/utils.js";
|
|
6
|
+
import { Button as U } from "../../primitives/button/button.js";
|
|
7
|
+
import { Select as X } from "../../forms/select/select.js";
|
|
8
|
+
import { CalendarCaptionHeader as fe } from "./calendar-caption-header.js";
|
|
9
|
+
import { CalendarDayButton as me } from "./calendar-day-button.js";
|
|
10
10
|
import { PanelIndexContext as P } from "./calendar-panel-context.js";
|
|
11
|
-
import { CalendarWeekNumberCell as
|
|
12
|
-
import { paneCivilMonthIndex as
|
|
13
|
-
import { buildFiscalYear as
|
|
14
|
-
import { civilMonthAtOffset as
|
|
15
|
-
import { getAvailableMonths as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
import { CalendarWeekNumberCell as pe } from "./calendar-week-number-cell.js";
|
|
12
|
+
import { paneCivilMonthIndex as he } from "./calendar-week-number-header.js";
|
|
13
|
+
import { buildFiscalYear as ve } from "../../../lib/fiscal-calendar/build-year.js";
|
|
14
|
+
import { civilMonthAtOffset as S, midMonthDate as N, periodForFiscalYearChange as xe, visibleMonthForPeriod as Z, periodsAvailableInBounds as ye, periodForCivilMonth as $ } from "./calendar-fiscal-period-nav.js";
|
|
15
|
+
import { getAvailableMonths as ke, isWeekSelectableInBounds as we } from "./calendar-month-utils.js";
|
|
16
|
+
import { weekHasInMonthSelection as Pe, weekIntervalContinues as We } from "./calendar-padding-week.utils.js";
|
|
17
|
+
import { shouldHideCalendarWeekRow as L, fiscalPeriodForWeek as T, isOwnedFiscalWeekRow as De } from "./calendar-week-utils.js";
|
|
18
|
+
import { InjectedFiscalWeekRow as V } from "./calendar-injected-week-row.js";
|
|
19
|
+
import { FiscalDayCell as Ie } from "./calendar-fiscal-day-cell.js";
|
|
20
|
+
import { ownedWeeksOutsidePane as be, injectedWeekCollapseClass as ge } from "./calendar-leading-week.utils.js";
|
|
21
|
+
import { FiscalPeriodCaptionSelect as Fe } from "./fiscal-period-caption-select.js";
|
|
22
|
+
function O(m, v, d) {
|
|
23
|
+
if (v != null && m)
|
|
21
24
|
try {
|
|
22
|
-
return
|
|
25
|
+
return ve(m, v).periods;
|
|
23
26
|
} catch {
|
|
24
27
|
}
|
|
25
28
|
return d ?? [];
|
|
26
29
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
function K(m, v, d) {
|
|
31
|
+
const I = m.days[0]?.date, x = m.days[m.days.length - 1]?.date;
|
|
32
|
+
return !I || !x ? !1 : we(I, x, v, d);
|
|
33
|
+
}
|
|
34
|
+
function Se(m) {
|
|
35
|
+
return y.isValidElement(m) && !!m.props["aria-hidden"];
|
|
36
|
+
}
|
|
37
|
+
function Le({
|
|
38
|
+
buttonVariant: m,
|
|
39
|
+
pickerType: v,
|
|
30
40
|
calendarKind: d,
|
|
41
|
+
granularity: I,
|
|
31
42
|
currentMonth: x,
|
|
32
|
-
monthsFull:
|
|
33
|
-
monthsShort:
|
|
34
|
-
resolvedStartMonth:
|
|
35
|
-
resolvedEndMonth:
|
|
36
|
-
availableYears:
|
|
37
|
-
fiscalPeriods:
|
|
38
|
-
fiscalConfig:
|
|
39
|
-
weekStartsOn:
|
|
40
|
-
previousMonthLabel:
|
|
41
|
-
nextMonthLabel:
|
|
42
|
-
monthPlaceholder:
|
|
43
|
-
yearPlaceholder:
|
|
44
|
-
weekNumberLabel:
|
|
45
|
-
weekNumberHeader:
|
|
46
|
-
weekLabel:
|
|
47
|
-
fiscalWeekNumberLabel:
|
|
48
|
-
fiscalWeekAriaLabel:
|
|
49
|
-
getCellMeta:
|
|
50
|
-
onMonthChange:
|
|
51
|
-
onWeekSelect:
|
|
52
|
-
periodRowHover:
|
|
53
|
-
weekMode:
|
|
54
|
-
showPeriodBoundaries:
|
|
55
|
-
|
|
43
|
+
monthsFull: R,
|
|
44
|
+
monthsShort: ee,
|
|
45
|
+
resolvedStartMonth: te,
|
|
46
|
+
resolvedEndMonth: oe,
|
|
47
|
+
availableYears: j,
|
|
48
|
+
fiscalPeriods: C,
|
|
49
|
+
fiscalConfig: k,
|
|
50
|
+
weekStartsOn: ne,
|
|
51
|
+
previousMonthLabel: B,
|
|
52
|
+
nextMonthLabel: z,
|
|
53
|
+
monthPlaceholder: _,
|
|
54
|
+
yearPlaceholder: re,
|
|
55
|
+
weekNumberLabel: ie,
|
|
56
|
+
weekNumberHeader: E,
|
|
57
|
+
weekLabel: se,
|
|
58
|
+
fiscalWeekNumberLabel: ae,
|
|
59
|
+
fiscalWeekAriaLabel: le,
|
|
60
|
+
getCellMeta: u,
|
|
61
|
+
onMonthChange: W,
|
|
62
|
+
onWeekSelect: H,
|
|
63
|
+
periodRowHover: G = !1,
|
|
64
|
+
weekMode: M = "single",
|
|
65
|
+
showPeriodBoundaries: de = !1,
|
|
66
|
+
disabled: F,
|
|
67
|
+
components: ce
|
|
56
68
|
}) {
|
|
57
|
-
function
|
|
69
|
+
function Y(e) {
|
|
58
70
|
if (d !== "fiscal") return;
|
|
59
|
-
const t =
|
|
60
|
-
return
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
71
|
+
const t = S(x, e);
|
|
72
|
+
return $(
|
|
73
|
+
O(
|
|
74
|
+
k,
|
|
75
|
+
u?.(N(t))?.fy ?? u?.(t)?.fy,
|
|
76
|
+
C
|
|
65
77
|
),
|
|
66
78
|
t.getFullYear(),
|
|
67
79
|
t.getMonth()
|
|
68
80
|
)?.period;
|
|
69
81
|
}
|
|
70
82
|
return {
|
|
71
|
-
Root: ({ className: e, rootRef: t, ...o }) => /* @__PURE__ */
|
|
72
|
-
Chevron: ({ className: e, orientation: t, ...o }) => t === "left" ? /* @__PURE__ */
|
|
73
|
-
|
|
83
|
+
Root: ({ className: e, rootRef: t, ...o }) => /* @__PURE__ */ s("div", { "data-slot": "calendar", ref: t, className: w(e), ...o }),
|
|
84
|
+
Chevron: ({ className: e, orientation: t, ...o }) => t === "left" ? /* @__PURE__ */ s(
|
|
85
|
+
Q,
|
|
74
86
|
{
|
|
75
87
|
size: 16,
|
|
76
|
-
className:
|
|
88
|
+
className: w("rotate-180 text-content", e),
|
|
77
89
|
...o
|
|
78
90
|
}
|
|
79
|
-
) : t === "right" ? /* @__PURE__ */
|
|
80
|
-
PreviousMonthButton: (e) => /* @__PURE__ */
|
|
81
|
-
|
|
91
|
+
) : t === "right" ? /* @__PURE__ */ s(Q, { size: 16, className: w("text-content", e), ...o }) : /* @__PURE__ */ s("span", {}),
|
|
92
|
+
PreviousMonthButton: (e) => /* @__PURE__ */ s(
|
|
93
|
+
U,
|
|
82
94
|
{
|
|
83
|
-
variant:
|
|
95
|
+
variant: m,
|
|
84
96
|
size: "icon",
|
|
85
97
|
className: "h-7 w-7",
|
|
86
|
-
"aria-label":
|
|
87
|
-
title:
|
|
98
|
+
"aria-label": B,
|
|
99
|
+
title: B,
|
|
88
100
|
...e
|
|
89
101
|
}
|
|
90
102
|
),
|
|
91
|
-
NextMonthButton: (e) => /* @__PURE__ */
|
|
92
|
-
|
|
103
|
+
NextMonthButton: (e) => /* @__PURE__ */ s(
|
|
104
|
+
U,
|
|
93
105
|
{
|
|
94
|
-
variant:
|
|
106
|
+
variant: m,
|
|
95
107
|
size: "icon",
|
|
96
108
|
className: "h-7 w-7",
|
|
97
|
-
"aria-label":
|
|
98
|
-
title:
|
|
109
|
+
"aria-label": z,
|
|
110
|
+
title: z,
|
|
99
111
|
...e
|
|
100
112
|
}
|
|
101
113
|
),
|
|
102
|
-
MonthCaption: ({ displayIndex: e, calendarMonth: t, ...o }) => /* @__PURE__ */
|
|
103
|
-
Month: ({ calendarMonth: e, displayIndex: t, className: o, children: r, ...
|
|
104
|
-
const
|
|
105
|
-
return /* @__PURE__ */
|
|
106
|
-
a.length > 0 ? /* @__PURE__ */
|
|
107
|
-
|
|
114
|
+
MonthCaption: ({ displayIndex: e, calendarMonth: t, ...o }) => /* @__PURE__ */ s("div", { ...o }),
|
|
115
|
+
Month: ({ calendarMonth: e, displayIndex: t, className: o, children: r, ...i }) => {
|
|
116
|
+
const c = y.Children.toArray(r), p = c[c.length - 1], a = c.slice(0, -1);
|
|
117
|
+
return /* @__PURE__ */ s(P.Provider, { value: t, children: /* @__PURE__ */ A("div", { className: w(o), ...i, children: [
|
|
118
|
+
a.length > 0 ? /* @__PURE__ */ s(fe, { children: a }) : null,
|
|
119
|
+
p
|
|
108
120
|
] }) });
|
|
109
121
|
},
|
|
110
|
-
|
|
122
|
+
Weeks: ({ className: e, children: t, ...o }) => {
|
|
123
|
+
const r = y.useContext(P);
|
|
124
|
+
if (d !== "fiscal" || !k)
|
|
125
|
+
return /* @__PURE__ */ s("tbody", { className: e, ...o, children: t });
|
|
126
|
+
const i = S(x, r), c = Y(r), p = u?.(N(i))?.fy ?? u?.(i)?.fy, { leading: a, trailing: n } = be({
|
|
127
|
+
paneYear: i.getFullYear(),
|
|
128
|
+
paneMonthIndex: i.getMonth(),
|
|
129
|
+
panePeriod: c,
|
|
130
|
+
fiscalConfig: k,
|
|
131
|
+
fy: p
|
|
132
|
+
}), f = y.Children.toArray(t), l = [], D = [];
|
|
133
|
+
for (const h of f)
|
|
134
|
+
Se(h) ? D.push(h) : l.push(h);
|
|
135
|
+
const b = a.length + n.length;
|
|
136
|
+
return /* @__PURE__ */ A(
|
|
137
|
+
"tbody",
|
|
138
|
+
{
|
|
139
|
+
className: w(e, ge(b)),
|
|
140
|
+
"data-leading-week-count": a.length || void 0,
|
|
141
|
+
"data-trailing-week-count": n.length || void 0,
|
|
142
|
+
...o,
|
|
143
|
+
children: [
|
|
144
|
+
a.map((h) => /* @__PURE__ */ s(
|
|
145
|
+
V,
|
|
146
|
+
{
|
|
147
|
+
fiscalWeek: h,
|
|
148
|
+
displayMonth: i
|
|
149
|
+
},
|
|
150
|
+
h.start
|
|
151
|
+
)),
|
|
152
|
+
l,
|
|
153
|
+
n.map((h) => /* @__PURE__ */ s(
|
|
154
|
+
V,
|
|
155
|
+
{
|
|
156
|
+
fiscalWeek: h,
|
|
157
|
+
displayMonth: i
|
|
158
|
+
},
|
|
159
|
+
h.start
|
|
160
|
+
)),
|
|
161
|
+
D
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
},
|
|
166
|
+
Months: ({ className: e, children: t, ...o }) => /* @__PURE__ */ s(
|
|
111
167
|
"div",
|
|
112
168
|
{
|
|
113
169
|
"data-slot": "day-months",
|
|
114
|
-
"data-period-row-hover":
|
|
115
|
-
"data-week-gutter-track":
|
|
116
|
-
className:
|
|
170
|
+
"data-period-row-hover": G ? "true" : void 0,
|
|
171
|
+
"data-week-gutter-track": v === "week" ? "true" : void 0,
|
|
172
|
+
className: w(e),
|
|
117
173
|
...o,
|
|
118
174
|
children: t
|
|
119
175
|
}
|
|
120
176
|
),
|
|
121
177
|
DropdownNav: ({ children: e, className: t, ...o }) => {
|
|
122
178
|
if (d !== "fiscal")
|
|
123
|
-
return /* @__PURE__ */
|
|
124
|
-
const r =
|
|
125
|
-
const
|
|
126
|
-
return !
|
|
179
|
+
return /* @__PURE__ */ s("div", { className: t, ...o, children: e });
|
|
180
|
+
const r = y.Children.toArray(e), i = (n) => y.isValidElement(n) && n.key != null ? String(n.key) : "", c = r.find((n) => i(n).endsWith("year")), p = r.find((n) => i(n).endsWith("month")), a = r.filter((n) => {
|
|
181
|
+
const f = i(n);
|
|
182
|
+
return !f.endsWith("year") && !f.endsWith("month");
|
|
127
183
|
});
|
|
128
|
-
return /* @__PURE__ */
|
|
129
|
-
|
|
130
|
-
|
|
184
|
+
return /* @__PURE__ */ A("div", { className: t, ...o, children: [
|
|
185
|
+
c,
|
|
186
|
+
p,
|
|
131
187
|
a
|
|
132
188
|
] });
|
|
133
189
|
},
|
|
134
190
|
MonthsDropdown: ({ value: e }) => {
|
|
135
|
-
const t =
|
|
136
|
-
if (d === "fiscal" &&
|
|
137
|
-
const a =
|
|
191
|
+
const t = y.useContext(P), o = t > 0, r = S(x, t), i = r.getFullYear();
|
|
192
|
+
if (d === "fiscal" && k) {
|
|
193
|
+
const a = u?.(N(r)) ?? u?.(r), n = O(k, a?.fy, C), f = ye(n, F), l = $(
|
|
138
194
|
n,
|
|
139
195
|
r.getFullYear(),
|
|
140
196
|
r.getMonth()
|
|
141
197
|
);
|
|
142
|
-
return /* @__PURE__ */
|
|
143
|
-
|
|
198
|
+
return /* @__PURE__ */ s(
|
|
199
|
+
Fe,
|
|
144
200
|
{
|
|
145
|
-
periods:
|
|
146
|
-
selectedPeriod:
|
|
147
|
-
placeholder:
|
|
148
|
-
onPeriodChange: (
|
|
149
|
-
|
|
201
|
+
periods: f,
|
|
202
|
+
selectedPeriod: l,
|
|
203
|
+
placeholder: _,
|
|
204
|
+
onPeriodChange: (D) => {
|
|
205
|
+
W(Z(D, o));
|
|
150
206
|
}
|
|
151
207
|
}
|
|
152
208
|
);
|
|
153
209
|
}
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
210
|
+
const p = ke(
|
|
211
|
+
i,
|
|
212
|
+
R,
|
|
213
|
+
te,
|
|
214
|
+
oe
|
|
159
215
|
);
|
|
160
|
-
return /* @__PURE__ */
|
|
161
|
-
|
|
216
|
+
return /* @__PURE__ */ s(
|
|
217
|
+
X,
|
|
162
218
|
{
|
|
163
|
-
value:
|
|
219
|
+
value: p.find((a) => a.value === e?.toString()),
|
|
164
220
|
onChange: (a) => {
|
|
165
221
|
if (a && "value" in a) {
|
|
166
222
|
const n = parseInt(a.value);
|
|
167
|
-
|
|
223
|
+
W(o ? new Date(i, n - 1, 1) : new Date(i, n, 1));
|
|
168
224
|
}
|
|
169
225
|
},
|
|
170
226
|
scrollToSelectedOnOpen: !0,
|
|
171
|
-
options:
|
|
227
|
+
options: p,
|
|
172
228
|
className: "w-[116px] shrink-0",
|
|
173
229
|
menuWidth: "160px",
|
|
174
230
|
isSearchable: !0,
|
|
175
231
|
isClearable: !1,
|
|
176
|
-
placeholder:
|
|
232
|
+
placeholder: _
|
|
177
233
|
}
|
|
178
234
|
);
|
|
179
235
|
},
|
|
180
236
|
YearsDropdown: ({ value: e }) => {
|
|
181
|
-
const t =
|
|
182
|
-
return /* @__PURE__ */
|
|
183
|
-
|
|
237
|
+
const t = y.useContext(P), o = t > 0, r = d === "fiscal" && k, i = S(x, t), c = r ? u?.(N(i)) ?? u?.(i) : void 0, p = r && c?.fy != null ? String(c.fy) : e?.toString();
|
|
238
|
+
return /* @__PURE__ */ s(
|
|
239
|
+
X,
|
|
184
240
|
{
|
|
185
|
-
value:
|
|
241
|
+
value: j.find((n) => n.value === p),
|
|
186
242
|
onChange: (n) => {
|
|
187
243
|
if (n && "value" in n) {
|
|
188
|
-
const
|
|
244
|
+
const f = parseInt(n.value);
|
|
189
245
|
if (r) {
|
|
190
|
-
const
|
|
191
|
-
|
|
246
|
+
const l = xe({
|
|
247
|
+
periods: O(k, f, C),
|
|
248
|
+
preferredPeriod: c?.fiscalPeriod,
|
|
249
|
+
disabled: F
|
|
250
|
+
});
|
|
251
|
+
l && W(Z(l, o));
|
|
192
252
|
return;
|
|
193
253
|
}
|
|
194
254
|
if (o) {
|
|
195
|
-
const
|
|
255
|
+
const l = new Date(
|
|
196
256
|
x.getFullYear(),
|
|
197
257
|
x.getMonth() + 1,
|
|
198
258
|
1
|
|
199
259
|
).getMonth();
|
|
200
|
-
|
|
260
|
+
W(new Date(f, l - 1, 1));
|
|
201
261
|
} else
|
|
202
|
-
|
|
262
|
+
W(new Date(f, x.getMonth(), 1));
|
|
203
263
|
}
|
|
204
264
|
},
|
|
205
265
|
scrollToSelectedOnOpen: !0,
|
|
206
|
-
options:
|
|
266
|
+
options: j,
|
|
207
267
|
className: "w-[116px] shrink-0",
|
|
208
268
|
menuWidth: "140px",
|
|
209
269
|
isSearchable: !0,
|
|
210
270
|
isClearable: !1,
|
|
211
|
-
placeholder:
|
|
271
|
+
placeholder: re
|
|
212
272
|
}
|
|
213
273
|
);
|
|
214
274
|
},
|
|
215
|
-
|
|
216
|
-
|
|
275
|
+
Day: (e) => {
|
|
276
|
+
if (d !== "fiscal") {
|
|
277
|
+
const { day: t, modifiers: o, children: r, ...i } = e;
|
|
278
|
+
return /* @__PURE__ */ s("td", { ...i, children: r });
|
|
279
|
+
}
|
|
280
|
+
return /* @__PURE__ */ s(Ie, { ...e });
|
|
281
|
+
},
|
|
282
|
+
DayButton: (e) => /* @__PURE__ */ s(
|
|
283
|
+
me,
|
|
217
284
|
{
|
|
218
285
|
...e,
|
|
219
|
-
pickerType:
|
|
286
|
+
pickerType: v,
|
|
220
287
|
modifiers: {
|
|
221
288
|
...e.modifiers,
|
|
222
|
-
...
|
|
223
|
-
fiscal_period_start: !!
|
|
224
|
-
fiscal_period_end: !!
|
|
289
|
+
...de ? {
|
|
290
|
+
fiscal_period_start: !!u?.(e.day.date)?.isPeriodStart,
|
|
291
|
+
fiscal_period_end: !!u?.(e.day.date)?.isPeriodEnd
|
|
225
292
|
} : {}
|
|
226
293
|
}
|
|
227
294
|
}
|
|
228
295
|
),
|
|
229
|
-
Week: ({ week: e, className: t, children: o, onClick: r, ...
|
|
230
|
-
const { isSelected:
|
|
296
|
+
Week: ({ week: e, className: t, children: o, onClick: r, ...i }) => {
|
|
297
|
+
const { isSelected: c } = ue(), p = y.useContext(P), a = v === "week", n = T(e, u), f = Y(p), l = L(e, {
|
|
231
298
|
calendarKind: d,
|
|
232
|
-
weekPeriod:
|
|
233
|
-
panePeriod:
|
|
234
|
-
}),
|
|
299
|
+
weekPeriod: n,
|
|
300
|
+
panePeriod: f
|
|
301
|
+
}), D = G && !l ? n : void 0, b = a && !l && !K(e, F, I), h = !l && !b && Pe(e, c, {
|
|
302
|
+
includeOutside: De({ calendarKind: d, weekPeriod: n, panePeriod: f })
|
|
303
|
+
}), q = v === "week" && M !== "multiple" && M !== "multi-range" && h ? We(e, c, {
|
|
235
304
|
joinAdjacentWeek: d === "fiscal",
|
|
236
|
-
panePeriod:
|
|
237
|
-
periodForDate: (
|
|
305
|
+
panePeriod: f,
|
|
306
|
+
periodForDate: (g) => u?.(g)?.fiscalPeriod
|
|
238
307
|
}) : { prev: !1, next: !1 };
|
|
239
|
-
return /* @__PURE__ */
|
|
308
|
+
return /* @__PURE__ */ s(
|
|
240
309
|
"tr",
|
|
241
310
|
{
|
|
242
|
-
className:
|
|
311
|
+
className: w(
|
|
243
312
|
t,
|
|
244
|
-
|
|
245
|
-
|
|
313
|
+
l && "invisible order-last",
|
|
314
|
+
a && !l && !b && "cursor-pointer"
|
|
246
315
|
),
|
|
247
|
-
...
|
|
248
|
-
"aria-hidden":
|
|
249
|
-
"data-fiscal-period":
|
|
250
|
-
"data-week-selected":
|
|
251
|
-
"data-week-continues-next":
|
|
252
|
-
"data-week-continues-prev":
|
|
253
|
-
onClick:
|
|
254
|
-
if (r?.(
|
|
255
|
-
const
|
|
256
|
-
|
|
316
|
+
...i,
|
|
317
|
+
"aria-hidden": l || void 0,
|
|
318
|
+
"data-fiscal-period": D,
|
|
319
|
+
"data-week-selected": h ? !0 : void 0,
|
|
320
|
+
"data-week-continues-next": q.next || void 0,
|
|
321
|
+
"data-week-continues-prev": q.prev || void 0,
|
|
322
|
+
onClick: a && !l && !b ? (g) => {
|
|
323
|
+
if (r?.(g), g.defaultPrevented) return;
|
|
324
|
+
const J = g.target;
|
|
325
|
+
J.closest("button") || J.closest("[data-week-number]") || H(e);
|
|
257
326
|
} : r,
|
|
258
327
|
children: o
|
|
259
328
|
}
|
|
260
329
|
);
|
|
261
330
|
},
|
|
262
331
|
WeekNumber: ({ week: e, ...t }) => {
|
|
263
|
-
const o =
|
|
332
|
+
const o = y.useContext(P), r = L(e, {
|
|
264
333
|
calendarKind: d,
|
|
265
|
-
weekPeriod:
|
|
266
|
-
panePeriod:
|
|
334
|
+
weekPeriod: T(e, u),
|
|
335
|
+
panePeriod: Y(o)
|
|
267
336
|
});
|
|
268
|
-
return /* @__PURE__ */
|
|
269
|
-
|
|
337
|
+
return /* @__PURE__ */ s(
|
|
338
|
+
pe,
|
|
270
339
|
{
|
|
271
340
|
week: e,
|
|
272
|
-
weekStartsOn:
|
|
273
|
-
pickerType:
|
|
341
|
+
weekStartsOn: ne,
|
|
342
|
+
pickerType: v,
|
|
274
343
|
calendarKind: d,
|
|
275
|
-
weekNumberLabel:
|
|
276
|
-
weekLabel:
|
|
277
|
-
fiscalWeekNumberLabel:
|
|
278
|
-
fiscalWeekAriaLabel:
|
|
279
|
-
getCellMeta:
|
|
280
|
-
onWeekSelect:
|
|
344
|
+
weekNumberLabel: ie,
|
|
345
|
+
weekLabel: se,
|
|
346
|
+
fiscalWeekNumberLabel: ae,
|
|
347
|
+
fiscalWeekAriaLabel: le,
|
|
348
|
+
getCellMeta: u,
|
|
349
|
+
onWeekSelect: H,
|
|
281
350
|
...t,
|
|
282
|
-
blank: r
|
|
351
|
+
blank: r,
|
|
352
|
+
blocked: v === "week" && !K(e, F, I)
|
|
283
353
|
}
|
|
284
354
|
);
|
|
285
355
|
},
|
|
286
356
|
WeekNumberHeader: (e) => {
|
|
287
|
-
const t =
|
|
288
|
-
return /* @__PURE__ */
|
|
357
|
+
const t = y.useContext(P), o = he(d, x, t), r = o === void 0 ? E : ee[o], i = o === void 0 ? E : R[o];
|
|
358
|
+
return /* @__PURE__ */ s("th", { ...e, "aria-label": i, children: r });
|
|
289
359
|
},
|
|
290
|
-
...
|
|
360
|
+
...ce
|
|
291
361
|
};
|
|
292
362
|
}
|
|
293
363
|
export {
|
|
294
|
-
|
|
364
|
+
Le as buildCalendarDayPickerComponents
|
|
295
365
|
};
|