impact-nova 2.5.11 → 2.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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/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-day-picker-components.d.ts +2 -4
- package/dist/components/data-display/calendar/calendar-day-picker-components.js +152 -163
- 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-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-selection-appearance.d.ts +0 -1
- package/dist/components/data-display/calendar/calendar-selection-appearance.js +30 -31
- 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 +41 -55
- package/dist/components/data-display/calendar/calendar-year-panes.d.ts +0 -2
- package/dist/components/data-display/calendar/calendar-year-panes.js +1 -3
- 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/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/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 +44 -46
- package/dist/components/forms/date-picker/multi-week-picker.js +51 -53
- package/dist/components/forms/date-picker/multi-year-picker.js +46 -48
- package/dist/components/forms/date-picker/quarter-picker.js +44 -46
- package/dist/components/forms/date-picker/quarter-range-picker.js +43 -45
- 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 +45 -47
- package/dist/components/forms/date-picker/year-range-picker.js +45 -47
- package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
- package/dist/components/forms/select/components/Submenu.js +2 -3
- 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 +17 -18
- package/dist/form-react/Fields/WeekRangePicker.js +21 -22
- package/dist/form-react/types/fields.types.d.ts +0 -12
- package/dist/impact-nova.css +1 -1
- 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/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
|
@@ -1,73 +1,67 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { useDayPicker as
|
|
4
|
-
import { ChevronRight 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
5
|
import { cn as y } from "../../../lib/utils.js";
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Select as
|
|
8
|
-
import { CalendarCaptionHeader as
|
|
9
|
-
import { CalendarDayButton as
|
|
10
|
-
import { PanelIndexContext as
|
|
11
|
-
import { CalendarWeekNumberCell as
|
|
12
|
-
import { paneCivilMonthIndex as
|
|
13
|
-
import { buildFiscalYear as
|
|
14
|
-
import { civilMonthAtOffset as N, midMonthDate as
|
|
15
|
-
import { getAvailableMonths as
|
|
16
|
-
import { isCalendarPaddingWeek as
|
|
17
|
-
import { isForeignFiscalWeekRow as
|
|
18
|
-
import { FiscalPeriodCaptionSelect as
|
|
19
|
-
function
|
|
20
|
-
if (
|
|
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
|
+
import { PanelIndexContext as P } from "./calendar-panel-context.js";
|
|
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)
|
|
21
21
|
try {
|
|
22
|
-
return
|
|
22
|
+
return ue(D, h).periods;
|
|
23
23
|
} catch {
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return d ?? [];
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
monthsShort: ee,
|
|
39
|
-
resolvedStartMonth: te,
|
|
40
|
-
resolvedEndMonth: oe,
|
|
41
|
-
availableYears: Y,
|
|
42
|
-
fiscalPeriods: F,
|
|
27
|
+
function ze({
|
|
28
|
+
buttonVariant: D,
|
|
29
|
+
pickerType: h,
|
|
30
|
+
calendarKind: d,
|
|
31
|
+
currentMonth: x,
|
|
32
|
+
monthsFull: g,
|
|
33
|
+
monthsShort: T,
|
|
34
|
+
resolvedStartMonth: V,
|
|
35
|
+
resolvedEndMonth: K,
|
|
36
|
+
availableYears: C,
|
|
37
|
+
fiscalPeriods: S,
|
|
43
38
|
fiscalConfig: W,
|
|
44
|
-
weekStartsOn:
|
|
45
|
-
previousMonthLabel:
|
|
46
|
-
nextMonthLabel:
|
|
47
|
-
monthPlaceholder:
|
|
48
|
-
yearPlaceholder:
|
|
49
|
-
weekNumberLabel:
|
|
50
|
-
weekNumberHeader:
|
|
51
|
-
weekLabel:
|
|
52
|
-
fiscalWeekNumberLabel:
|
|
53
|
-
fiscalWeekAriaLabel:
|
|
54
|
-
getCellMeta:
|
|
55
|
-
onMonthChange:
|
|
56
|
-
onWeekSelect:
|
|
57
|
-
periodRowHover:
|
|
58
|
-
weekMode:
|
|
59
|
-
showPeriodBoundaries:
|
|
60
|
-
|
|
61
|
-
components: de
|
|
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
|
|
62
56
|
}) {
|
|
63
|
-
function
|
|
64
|
-
if (
|
|
65
|
-
const t = N(
|
|
66
|
-
return
|
|
67
|
-
|
|
57
|
+
function _(e) {
|
|
58
|
+
if (d !== "fiscal") return;
|
|
59
|
+
const t = N(x, e);
|
|
60
|
+
return X(
|
|
61
|
+
I(
|
|
68
62
|
W,
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
c?.(F(t))?.fy ?? c?.(t)?.fy,
|
|
64
|
+
S
|
|
71
65
|
),
|
|
72
66
|
t.getFullYear(),
|
|
73
67
|
t.getMonth()
|
|
@@ -76,231 +70,226 @@ function Je({
|
|
|
76
70
|
return {
|
|
77
71
|
Root: ({ className: e, rootRef: t, ...o }) => /* @__PURE__ */ i("div", { "data-slot": "calendar", ref: t, className: y(e), ...o }),
|
|
78
72
|
Chevron: ({ className: e, orientation: t, ...o }) => t === "left" ? /* @__PURE__ */ i(
|
|
79
|
-
|
|
73
|
+
J,
|
|
80
74
|
{
|
|
81
75
|
size: 16,
|
|
82
76
|
className: y("rotate-180 text-content", e),
|
|
83
77
|
...o
|
|
84
78
|
}
|
|
85
|
-
) : t === "right" ? /* @__PURE__ */ i(
|
|
79
|
+
) : t === "right" ? /* @__PURE__ */ i(J, { size: 16, className: y("text-content", e), ...o }) : /* @__PURE__ */ i("span", {}),
|
|
86
80
|
PreviousMonthButton: (e) => /* @__PURE__ */ i(
|
|
87
|
-
|
|
81
|
+
M,
|
|
88
82
|
{
|
|
89
|
-
variant:
|
|
83
|
+
variant: D,
|
|
90
84
|
size: "icon",
|
|
91
85
|
className: "h-7 w-7",
|
|
92
|
-
"aria-label":
|
|
93
|
-
title:
|
|
86
|
+
"aria-label": A,
|
|
87
|
+
title: A,
|
|
94
88
|
...e
|
|
95
89
|
}
|
|
96
90
|
),
|
|
97
91
|
NextMonthButton: (e) => /* @__PURE__ */ i(
|
|
98
|
-
|
|
92
|
+
M,
|
|
99
93
|
{
|
|
100
|
-
variant:
|
|
94
|
+
variant: D,
|
|
101
95
|
size: "icon",
|
|
102
96
|
className: "h-7 w-7",
|
|
103
|
-
"aria-label":
|
|
104
|
-
title:
|
|
97
|
+
"aria-label": Y,
|
|
98
|
+
title: Y,
|
|
105
99
|
...e
|
|
106
100
|
}
|
|
107
101
|
),
|
|
108
102
|
MonthCaption: ({ displayIndex: e, calendarMonth: t, ...o }) => /* @__PURE__ */ i("div", { ...o }),
|
|
109
103
|
Month: ({ calendarMonth: e, displayIndex: t, className: o, children: r, ...s }) => {
|
|
110
|
-
const
|
|
111
|
-
return /* @__PURE__ */ i(
|
|
112
|
-
a.length > 0 ? /* @__PURE__ */ i(
|
|
113
|
-
|
|
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
|
|
114
108
|
] }) });
|
|
115
109
|
},
|
|
116
110
|
Months: ({ className: e, children: t, ...o }) => /* @__PURE__ */ i(
|
|
117
111
|
"div",
|
|
118
112
|
{
|
|
119
113
|
"data-slot": "day-months",
|
|
120
|
-
"data-period-row-hover":
|
|
121
|
-
"data-week-gutter-track":
|
|
114
|
+
"data-period-row-hover": z ? "true" : void 0,
|
|
115
|
+
"data-week-gutter-track": h === "week" ? "true" : void 0,
|
|
122
116
|
className: y(e),
|
|
123
117
|
...o,
|
|
124
118
|
children: t
|
|
125
119
|
}
|
|
126
120
|
),
|
|
127
121
|
DropdownNav: ({ children: e, className: t, ...o }) => {
|
|
128
|
-
if (
|
|
122
|
+
if (d !== "fiscal")
|
|
129
123
|
return /* @__PURE__ */ i("div", { className: t, ...o, children: e });
|
|
130
|
-
const r =
|
|
131
|
-
const
|
|
132
|
-
return !
|
|
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");
|
|
133
127
|
});
|
|
134
|
-
return /* @__PURE__ */
|
|
135
|
-
|
|
136
|
-
|
|
128
|
+
return /* @__PURE__ */ q("div", { className: t, ...o, children: [
|
|
129
|
+
l,
|
|
130
|
+
f,
|
|
137
131
|
a
|
|
138
132
|
] });
|
|
139
133
|
},
|
|
140
134
|
MonthsDropdown: ({ value: e }) => {
|
|
141
|
-
const t =
|
|
142
|
-
if (
|
|
143
|
-
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(
|
|
144
138
|
n,
|
|
145
139
|
r.getFullYear(),
|
|
146
140
|
r.getMonth()
|
|
147
141
|
);
|
|
148
142
|
return /* @__PURE__ */ i(
|
|
149
|
-
|
|
143
|
+
xe,
|
|
150
144
|
{
|
|
151
|
-
periods:
|
|
152
|
-
selectedPeriod:
|
|
153
|
-
placeholder:
|
|
154
|
-
onPeriodChange: (
|
|
155
|
-
|
|
145
|
+
periods: n,
|
|
146
|
+
selectedPeriod: m,
|
|
147
|
+
placeholder: j,
|
|
148
|
+
onPeriodChange: (u) => {
|
|
149
|
+
k(U(u, o));
|
|
156
150
|
}
|
|
157
151
|
}
|
|
158
152
|
);
|
|
159
153
|
}
|
|
160
|
-
const
|
|
154
|
+
const f = pe(
|
|
161
155
|
s,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
156
|
+
g,
|
|
157
|
+
V,
|
|
158
|
+
K
|
|
165
159
|
);
|
|
166
160
|
return /* @__PURE__ */ i(
|
|
167
|
-
|
|
161
|
+
Q,
|
|
168
162
|
{
|
|
169
|
-
value:
|
|
163
|
+
value: f.find((a) => a.value === e?.toString()),
|
|
170
164
|
onChange: (a) => {
|
|
171
165
|
if (a && "value" in a) {
|
|
172
166
|
const n = parseInt(a.value);
|
|
173
|
-
|
|
167
|
+
k(o ? new Date(s, n - 1, 1) : new Date(s, n, 1));
|
|
174
168
|
}
|
|
175
169
|
},
|
|
176
170
|
scrollToSelectedOnOpen: !0,
|
|
177
|
-
options:
|
|
171
|
+
options: f,
|
|
178
172
|
className: "w-[116px] shrink-0",
|
|
179
173
|
menuWidth: "160px",
|
|
180
174
|
isSearchable: !0,
|
|
181
175
|
isClearable: !1,
|
|
182
|
-
placeholder:
|
|
176
|
+
placeholder: j
|
|
183
177
|
}
|
|
184
178
|
);
|
|
185
179
|
},
|
|
186
180
|
YearsDropdown: ({ value: e }) => {
|
|
187
|
-
const t =
|
|
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();
|
|
188
182
|
return /* @__PURE__ */ i(
|
|
189
|
-
|
|
183
|
+
Q,
|
|
190
184
|
{
|
|
191
|
-
value:
|
|
185
|
+
value: C.find((n) => n.value === f),
|
|
192
186
|
onChange: (n) => {
|
|
193
187
|
if (n && "value" in n) {
|
|
194
|
-
const
|
|
188
|
+
const m = parseInt(n.value);
|
|
195
189
|
if (r) {
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
preferredPeriod: c?.fiscalPeriod,
|
|
199
|
-
disabled: w
|
|
200
|
-
});
|
|
201
|
-
v && P(Z(v, o));
|
|
190
|
+
const u = I(W, m, S), p = u.find((b) => b.period === l?.fiscalPeriod) ?? u[0];
|
|
191
|
+
p && k(U(p, o));
|
|
202
192
|
return;
|
|
203
193
|
}
|
|
204
194
|
if (o) {
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
|
|
195
|
+
const u = new Date(
|
|
196
|
+
x.getFullYear(),
|
|
197
|
+
x.getMonth() + 1,
|
|
208
198
|
1
|
|
209
199
|
).getMonth();
|
|
210
|
-
|
|
200
|
+
k(new Date(m, u - 1, 1));
|
|
211
201
|
} else
|
|
212
|
-
|
|
202
|
+
k(new Date(m, x.getMonth(), 1));
|
|
213
203
|
}
|
|
214
204
|
},
|
|
215
205
|
scrollToSelectedOnOpen: !0,
|
|
216
|
-
options:
|
|
206
|
+
options: C,
|
|
217
207
|
className: "w-[116px] shrink-0",
|
|
218
208
|
menuWidth: "140px",
|
|
219
209
|
isSearchable: !0,
|
|
220
210
|
isClearable: !1,
|
|
221
|
-
placeholder:
|
|
211
|
+
placeholder: te
|
|
222
212
|
}
|
|
223
213
|
);
|
|
224
214
|
},
|
|
225
215
|
DayButton: (e) => /* @__PURE__ */ i(
|
|
226
|
-
|
|
216
|
+
de,
|
|
227
217
|
{
|
|
228
218
|
...e,
|
|
229
|
-
pickerType:
|
|
219
|
+
pickerType: h,
|
|
230
220
|
modifiers: {
|
|
231
221
|
...e.modifiers,
|
|
232
|
-
...
|
|
233
|
-
fiscal_period_start: !!
|
|
234
|
-
fiscal_period_end: !!
|
|
222
|
+
...se ? {
|
|
223
|
+
fiscal_period_start: !!c?.(e.day.date)?.isPeriodStart,
|
|
224
|
+
fiscal_period_end: !!c?.(e.day.date)?.isPeriodEnd
|
|
235
225
|
} : {}
|
|
236
226
|
}
|
|
237
227
|
}
|
|
238
228
|
),
|
|
239
229
|
Week: ({ week: e, className: t, children: o, onClick: r, ...s }) => {
|
|
240
|
-
const { isSelected:
|
|
241
|
-
calendarKind:
|
|
242
|
-
weekPeriod:
|
|
243
|
-
panePeriod:
|
|
244
|
-
}),
|
|
245
|
-
joinAdjacentWeek:
|
|
246
|
-
panePeriod:
|
|
247
|
-
periodForDate: (
|
|
230
|
+
const { isSelected: l } = le(), f = v.useContext(P), a = Z(e), n = h === "week", m = L(e, c), u = _(f), p = a || $({
|
|
231
|
+
calendarKind: d,
|
|
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, {
|
|
235
|
+
joinAdjacentWeek: d === "fiscal",
|
|
236
|
+
panePeriod: u,
|
|
237
|
+
periodForDate: (w) => c?.(w)?.fiscalPeriod
|
|
248
238
|
}) : { prev: !1, next: !1 };
|
|
249
239
|
return /* @__PURE__ */ i(
|
|
250
240
|
"tr",
|
|
251
241
|
{
|
|
252
242
|
className: y(
|
|
253
243
|
t,
|
|
254
|
-
|
|
255
|
-
n && !
|
|
244
|
+
p && "invisible order-last",
|
|
245
|
+
n && !p && "cursor-pointer"
|
|
256
246
|
),
|
|
257
247
|
...s,
|
|
258
|
-
"aria-hidden":
|
|
259
|
-
"data-fiscal-period":
|
|
260
|
-
"data-week-selected":
|
|
261
|
-
"data-week-continues-next":
|
|
262
|
-
"data-week-continues-prev":
|
|
263
|
-
onClick: n && !
|
|
264
|
-
if (r?.(
|
|
265
|
-
const
|
|
266
|
-
|
|
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);
|
|
267
257
|
} : r,
|
|
268
258
|
children: o
|
|
269
259
|
}
|
|
270
260
|
);
|
|
271
261
|
},
|
|
272
262
|
WeekNumber: ({ week: e, ...t }) => {
|
|
273
|
-
const o =
|
|
274
|
-
calendarKind:
|
|
275
|
-
weekPeriod:
|
|
276
|
-
panePeriod:
|
|
263
|
+
const o = v.useContext(P), r = Z(e) || $({
|
|
264
|
+
calendarKind: d,
|
|
265
|
+
weekPeriod: L(e, c),
|
|
266
|
+
panePeriod: _(o)
|
|
277
267
|
});
|
|
278
268
|
return /* @__PURE__ */ i(
|
|
279
|
-
|
|
269
|
+
me,
|
|
280
270
|
{
|
|
281
271
|
week: e,
|
|
282
|
-
weekStartsOn:
|
|
283
|
-
pickerType:
|
|
284
|
-
calendarKind:
|
|
285
|
-
weekNumberLabel:
|
|
286
|
-
weekLabel:
|
|
287
|
-
fiscalWeekNumberLabel:
|
|
288
|
-
fiscalWeekAriaLabel:
|
|
289
|
-
getCellMeta:
|
|
290
|
-
onWeekSelect:
|
|
272
|
+
weekStartsOn: ee,
|
|
273
|
+
pickerType: h,
|
|
274
|
+
calendarKind: d,
|
|
275
|
+
weekNumberLabel: oe,
|
|
276
|
+
weekLabel: ne,
|
|
277
|
+
fiscalWeekNumberLabel: re,
|
|
278
|
+
fiscalWeekAriaLabel: ie,
|
|
279
|
+
getCellMeta: c,
|
|
280
|
+
onWeekSelect: R,
|
|
291
281
|
...t,
|
|
292
|
-
blank: r
|
|
293
|
-
blocked: f === "week" && !K(e, w, S)
|
|
282
|
+
blank: r
|
|
294
283
|
}
|
|
295
284
|
);
|
|
296
285
|
},
|
|
297
286
|
WeekNumberHeader: (e) => {
|
|
298
|
-
const t =
|
|
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];
|
|
299
288
|
return /* @__PURE__ */ i("th", { ...e, "aria-label": s, children: r });
|
|
300
289
|
},
|
|
301
|
-
...
|
|
290
|
+
...ae
|
|
302
291
|
};
|
|
303
292
|
}
|
|
304
293
|
export {
|
|
305
|
-
|
|
294
|
+
ze as buildCalendarDayPickerComponents
|
|
306
295
|
};
|