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