impact-nova 2.2.9 → 2.4.0
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/ag-grid-react/headers/utils/filter-utils.js +9 -9
- package/dist/components/data-display/calendar/calendar-day-picker-components.js +69 -56
- package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +5 -0
- package/dist/components/data-display/calendar/calendar-padding-week.utils.js +6 -0
- package/dist/components/data-display/calendar/calendar.types.d.ts +1 -1
- package/dist/components/forms/combobox/combobox.js +185 -160
- package/dist/components/forms/combobox/combobox.types.d.ts +2 -0
- package/dist/filter-shell/index.d.ts +12 -0
- package/dist/filter-shell/index.js +9 -0
- package/dist/filter-shell/utils/buildFilterFieldValidationRules.d.ts +1 -0
- package/dist/filter-shell/utils/validateVisibleRequiredFilterFields.d.ts +1 -0
- package/dist/filter-shell/utils/validationNavigation.utils.d.ts +26 -0
- package/dist/filter-shell/utils/validationNavigation.utils.js +38 -0
- package/dist/form-engine/field-dependency-graph.d.ts +17 -0
- package/dist/form-engine/field-dependency-graph.js +90 -0
- package/dist/form-engine/index.d.ts +9 -0
- package/dist/form-engine/index.js +16 -0
- package/dist/form-engine/is-empty-value.d.ts +1 -0
- package/dist/form-engine/is-empty-value.js +8 -0
- package/dist/form-engine/types.d.ts +17 -0
- package/dist/form-react/Fields/ButtonsGroupField.d.ts +3 -0
- package/dist/form-react/Fields/ButtonsGroupField.js +52 -0
- package/dist/form-react/Fields/CheckboxField.d.ts +3 -0
- package/dist/form-react/Fields/CheckboxField.js +46 -0
- package/dist/form-react/Fields/ChipsField.d.ts +3 -0
- package/dist/form-react/Fields/ChipsField.js +146 -0
- package/dist/form-react/Fields/DateInputField.d.ts +8 -0
- package/dist/form-react/Fields/DateInputField.js +134 -0
- package/dist/form-react/Fields/DateRangeField.d.ts +8 -0
- package/dist/form-react/Fields/DateRangeField.js +57 -0
- package/dist/form-react/Fields/DividerField.d.ts +3 -0
- package/dist/form-react/Fields/DividerField.js +9 -0
- package/dist/form-react/Fields/DividerWithLabelField.d.ts +3 -0
- package/dist/form-react/Fields/DividerWithLabelField.js +31 -0
- package/dist/form-react/Fields/FileUploadField.d.ts +3 -0
- package/dist/form-react/Fields/FileUploadField.js +42 -0
- package/dist/form-react/Fields/FillFormByFileUploadField.d.ts +3 -0
- package/dist/form-react/Fields/FillFormByFileUploadField.js +65 -0
- package/dist/form-react/Fields/FillFormByPasteField.d.ts +3 -0
- package/dist/form-react/Fields/FillFormByPasteField.js +106 -0
- package/dist/form-react/Fields/LabelField.d.ts +3 -0
- package/dist/form-react/Fields/LabelField.js +14 -0
- package/dist/form-react/Fields/MonthRangeField.d.ts +8 -0
- package/dist/form-react/Fields/MonthRangeField.js +72 -0
- package/dist/form-react/Fields/MultiMonthPickerField.d.ts +8 -0
- package/dist/form-react/Fields/MultiMonthPickerField.js +46 -0
- package/dist/form-react/Fields/MultiWeekPickerField.d.ts +8 -0
- package/dist/form-react/Fields/MultiWeekPickerField.js +47 -0
- package/dist/form-react/Fields/NumericComboboxField.d.ts +18 -0
- package/dist/form-react/Fields/NumericComboboxField.js +51 -0
- package/dist/form-react/Fields/RadioField.d.ts +3 -0
- package/dist/form-react/Fields/RadioField.js +68 -0
- package/dist/form-react/Fields/SelectField.d.ts +3 -0
- package/dist/form-react/Fields/SelectField.js +76 -0
- package/dist/form-react/Fields/SwitchField.d.ts +3 -0
- package/dist/form-react/Fields/SwitchField.js +47 -0
- package/dist/form-react/Fields/TextAreaField.d.ts +3 -0
- package/dist/form-react/Fields/TextAreaField.js +41 -0
- package/dist/form-react/Fields/TextField.d.ts +3 -0
- package/dist/form-react/Fields/TextField.js +75 -0
- package/dist/form-react/Fields/TextFieldWithBackendValidation.d.ts +3 -0
- package/dist/form-react/Fields/TextFieldWithBackendValidation.js +117 -0
- package/dist/form-react/Fields/WeekRangePicker.d.ts +8 -0
- package/dist/form-react/Fields/WeekRangePicker.js +71 -0
- package/dist/form-react/ReactHooksForm.d.ts +3 -0
- package/dist/form-react/ReactHooksForm.js +132 -0
- package/dist/form-react/components/ArrayFieldRenderer.d.ts +13 -0
- package/dist/form-react/components/ArrayFieldRenderer.js +90 -0
- package/dist/form-react/components/FieldRenderer.d.ts +16 -0
- package/dist/form-react/components/FieldRenderer.js +68 -0
- package/dist/form-react/components/FormFieldRow.d.ts +13 -0
- package/dist/form-react/components/FormFieldRow.js +47 -0
- package/dist/form-react/components/FormFileUploadWrapper.d.ts +22 -0
- package/dist/form-react/components/FormFileUploadWrapper.js +88 -0
- package/dist/form-react/components/ObjectFieldRenderer.d.ts +13 -0
- package/dist/form-react/components/ObjectFieldRenderer.js +46 -0
- package/dist/form-react/components/SetToEmptyWrapper.d.ts +16 -0
- package/dist/form-react/components/SetToEmptyWrapper.js +49 -0
- package/dist/form-react/fields.d.ts +23 -0
- package/dist/form-react/fields.js +40 -0
- package/dist/form-react/hooks/useCascadingForm.d.ts +17 -0
- package/dist/form-react/hooks/useCascadingForm.js +122 -0
- package/dist/form-react/hooks/useFieldVisibility.d.ts +14 -0
- package/dist/form-react/hooks/useFieldVisibility.js +60 -0
- package/dist/form-react/hooks/useFillFormByFileUpload.d.ts +33 -0
- package/dist/form-react/hooks/useFillFormByFileUpload.js +199 -0
- package/dist/form-react/hooks/useFillFormByPaste.d.ts +33 -0
- package/dist/form-react/hooks/useFillFormByPaste.js +104 -0
- package/dist/form-react/hooks/useFormFieldChangeSubscription.d.ts +13 -0
- package/dist/form-react/hooks/useFormFieldChangeSubscription.js +42 -0
- package/dist/form-react/hooks/useReactHookForm.d.ts +3 -0
- package/dist/form-react/hooks/useReactHookForm.js +161 -0
- package/dist/form-react/hooks/useSelectOptions.d.ts +8 -0
- package/dist/form-react/hooks/useSelectOptions.js +116 -0
- package/dist/form-react/index.d.ts +62 -0
- package/dist/form-react/index.js +97 -0
- package/dist/form-react/registry/defaultFieldRegistrations.d.ts +2 -0
- package/dist/form-react/registry/defaultFieldRegistrations.js +30 -0
- package/dist/form-react/registry/fieldRegistry.d.ts +14 -0
- package/dist/form-react/registry/fieldRegistry.js +19 -0
- package/dist/form-react/registry/resolveFieldComponent.d.ts +10 -0
- package/dist/form-react/registry/resolveFieldComponent.js +137 -0
- package/dist/form-react/types/fields.types.d.ts +402 -0
- package/dist/form-react/types/fieldsOutput.types.d.ts +73 -0
- package/dist/form-react/types/reactHookForm.types.d.ts +196 -0
- package/dist/form-react/utils/batchFormFieldUpdates.d.ts +14 -0
- package/dist/form-react/utils/batchFormFieldUpdates.js +13 -0
- package/dist/form-react/utils/buildFieldValidationRules.d.ts +6 -0
- package/dist/form-react/utils/buildFieldValidationRules.js +13 -0
- package/dist/form-react/utils/buildSelectRemountKey.d.ts +14 -0
- package/dist/form-react/utils/buildSelectRemountKey.js +14 -0
- package/dist/form-react/utils/calendar-boundary.d.ts +3 -0
- package/dist/form-react/utils/calendar-boundary.js +33 -0
- package/dist/form-react/utils/date.utils.d.ts +31 -0
- package/dist/form-react/utils/date.utils.js +86 -0
- package/dist/form-react/utils/evaluateFieldValidation.d.ts +19 -0
- package/dist/form-react/utils/evaluateFieldValidation.js +53 -0
- package/dist/form-react/utils/fieldDefaults.utils.d.ts +6 -0
- package/dist/form-react/utils/fieldDefaults.utils.js +25 -0
- package/dist/form-react/utils/fieldPath.utils.d.ts +23 -0
- package/dist/form-react/utils/fieldPath.utils.js +26 -0
- package/dist/form-react/utils/fieldRangeValidation.utils.d.ts +3 -0
- package/dist/form-react/utils/fieldRangeValidation.utils.js +24 -0
- package/dist/form-react/utils/fieldRendererUtils.d.ts +10 -0
- package/dist/form-react/utils/fieldRendererUtils.js +47 -0
- package/dist/form-react/utils/fieldTestIds.d.ts +3 -0
- package/dist/form-react/utils/fieldTestIds.js +13 -0
- package/dist/form-react/utils/formDate.utils.d.ts +13 -0
- package/dist/form-react/utils/formDate.utils.js +9 -0
- package/dist/form-react/utils/formValidationFeedback.utils.d.ts +32 -0
- package/dist/form-react/utils/formValidationFeedback.utils.js +153 -0
- package/dist/form-react/utils/icons.d.ts +5 -0
- package/dist/form-react/utils/icons.js +10 -0
- package/dist/form-react/utils/optionFlag.d.ts +11 -0
- package/dist/form-react/utils/optionFlag.js +17 -0
- package/dist/form-react/utils/pastedValues.d.ts +1 -0
- package/dist/form-react/utils/resolveFormSubmittable.d.ts +18 -0
- package/dist/form-react/utils/resolveFormSubmittable.js +32 -0
- package/dist/form-react/utils/select-option-filter-values.d.ts +5 -0
- package/dist/form-react/utils/select-option-filter-values.js +30 -0
- package/dist/form-react/utils/serializeFormStateForQueryKey.d.ts +1 -0
- package/dist/form-react/utils/serializeFormStateForQueryKey.js +21 -0
- package/dist/form-react/utils/stableSerialize.d.ts +5 -0
- package/dist/form-react/utils/stableSerialize.js +11 -0
- package/dist/form-react/utils/validateVisibleRequiredFormFields.d.ts +21 -0
- package/dist/form-react/utils/validateVisibleRequiredFormFields.js +64 -0
- package/dist/form-react/utils/validationUtils.d.ts +3 -0
- package/dist/form-react/utils/validationUtils.js +77 -0
- package/dist/impact-nova.css +1 -1
- package/dist/lib/primitives/use-field-chrome.js +16 -16
- 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 +21 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_DATE_DISPLAY_FORMAT as O, isoToDisplay as
|
|
1
|
+
import { DEFAULT_DATE_DISPLAY_FORMAT as O, isoToDisplay as C, getTodayStr as b, getYesterdayStr as W, getMonthRange as S, getYearRange as F } from "./date-utils.js";
|
|
2
2
|
const v = {
|
|
3
3
|
yes: !0,
|
|
4
4
|
true: !0,
|
|
@@ -96,14 +96,14 @@ function E(i, n = !1, e = !1) {
|
|
|
96
96
|
if (a === "today") return { operator: "equals", value: b() };
|
|
97
97
|
if (a === "yesterday") return { operator: "equals", value: W() };
|
|
98
98
|
if (/^\d{4}$/.test(t)) {
|
|
99
|
-
const r =
|
|
99
|
+
const r = F(Number(t));
|
|
100
100
|
return { operator: "inRange", value: r.from, valueTo: r.to };
|
|
101
101
|
}
|
|
102
102
|
const o = t.match(/^([a-zA-Z]+)\s*(\d{4})$/);
|
|
103
103
|
if (o) {
|
|
104
104
|
const r = $[o[1].toLowerCase()];
|
|
105
105
|
if (r) {
|
|
106
|
-
const l =
|
|
106
|
+
const l = S(r, Number(o[2]));
|
|
107
107
|
return { operator: "inRange", value: l.from, valueTo: l.to };
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -137,7 +137,7 @@ function m(i, n = O) {
|
|
|
137
137
|
if (Array.isArray(i))
|
|
138
138
|
return i.map((e) => m(e, n)).join(", ");
|
|
139
139
|
if (/^\d{4}-\d{2}-\d{2}/.test(i)) {
|
|
140
|
-
const e =
|
|
140
|
+
const e = C(i, n);
|
|
141
141
|
if (e) return e;
|
|
142
142
|
}
|
|
143
143
|
return i;
|
|
@@ -175,7 +175,7 @@ function N(i, n = O) {
|
|
|
175
175
|
return e;
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
const
|
|
178
|
+
const x = {
|
|
179
179
|
contains: "contains",
|
|
180
180
|
notContains: "notContains",
|
|
181
181
|
equals: "equals",
|
|
@@ -211,7 +211,7 @@ function A(i, n, e = O) {
|
|
|
211
211
|
}
|
|
212
212
|
const t = n;
|
|
213
213
|
if ("type" in t && t.type) {
|
|
214
|
-
const s = t.type, c =
|
|
214
|
+
const s = t.type, c = x[s] || s, p = t.filter !== void 0 ? String(t.filter) : t.dateFrom !== void 0 ? String(t.dateFrom) : "", a = t.filterTo !== void 0 ? String(t.filterTo) : t.dateTo !== void 0 ? String(t.dateTo) : void 0;
|
|
215
215
|
return N({
|
|
216
216
|
operator: c,
|
|
217
217
|
value: p,
|
|
@@ -269,7 +269,7 @@ function h(i) {
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
function M(i, n, e) {
|
|
272
|
-
return e === "number" ? "number" : e === "date" ? "date" : e === "select" || e === "set" || Array.isArray(n) ? i === "notEqual" || i === "notContains" ? "text" : "set" : typeof n == "string" && /^\d{4}-\d{2}-\d{2}/.test(n) ? "date" : ["greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual", "inRange"].includes(i) && n && !I(n) && !isNaN(Number(n)) || typeof n == "string" && n && /^-?\d+(\.\d+)?$/.test(n.trim()) ? "number" : "text";
|
|
272
|
+
return e === "number" ? "number" : e === "date" ? "date" : e === "text" ? "text" : e === "select" || e === "set" || Array.isArray(n) ? i === "notEqual" || i === "notContains" ? "text" : "set" : typeof n == "string" && /^\d{4}-\d{2}-\d{2}/.test(n) ? "date" : ["greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual", "inRange"].includes(i) && n && !I(n) && !isNaN(Number(n)) || typeof n == "string" && n && /^-?\d+(\.\d+)?$/.test(n.trim()) ? "number" : "text";
|
|
273
273
|
}
|
|
274
274
|
function I(i) {
|
|
275
275
|
return Array.isArray(i);
|
|
@@ -443,7 +443,7 @@ function V(i) {
|
|
|
443
443
|
return o.conditions.flatMap((d) => p(d));
|
|
444
444
|
if ("filterType" in o && o.filterType === "multi" && o.filterModels)
|
|
445
445
|
return o.filterModels?.filter((d) => d != null).flatMap((d) => p(d)) ?? [];
|
|
446
|
-
const r = o, l = "type" in r && r.type ? r.type : "equals", u = r.filterType === "set" ? "equals" :
|
|
446
|
+
const r = o, l = "type" in r && r.type ? r.type : "equals", u = r.filterType === "set" ? "equals" : x[l] || "contains", f = r.values, g = r.filter !== void 0 ? String(r.filter) : r.dateFrom !== void 0 ? String(r.dateFrom) : f ? f.filter((d) => d != null) : "";
|
|
447
447
|
return [{
|
|
448
448
|
id: R(),
|
|
449
449
|
columnId: t,
|
|
@@ -462,7 +462,7 @@ function V(i) {
|
|
|
462
462
|
};
|
|
463
463
|
}
|
|
464
464
|
export {
|
|
465
|
-
|
|
465
|
+
x as agToInternalOperator,
|
|
466
466
|
V as convertFromAgGridFilterModel,
|
|
467
467
|
k as convertToAgGridFilterModel,
|
|
468
468
|
D as createEmptyRule,
|
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
1
|
+
import { jsx as n, jsxs as R } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "react";
|
|
3
3
|
import "react-day-picker";
|
|
4
4
|
import { ChevronRight as C } from "impact-nova-icons";
|
|
5
|
-
import { cn as
|
|
5
|
+
import { cn as s } from "../../../lib/utils.js";
|
|
6
6
|
import { Button as N } from "../../primitives/button/button.js";
|
|
7
7
|
import { Select as D } from "../../forms/select/select.js";
|
|
8
|
-
import { CalendarCaptionHeader as
|
|
9
|
-
import { CalendarDayButton as
|
|
8
|
+
import { CalendarCaptionHeader as Y } from "./calendar-caption-header.js";
|
|
9
|
+
import { CalendarDayButton as z } from "./calendar-day-button.js";
|
|
10
10
|
import { PanelIndexContext as h } from "./calendar-panel-context.js";
|
|
11
|
-
import { CalendarWeekNumberCell as
|
|
11
|
+
import { CalendarWeekNumberCell as O } from "./calendar-week-number-cell.js";
|
|
12
12
|
import { getAvailableMonths as A } from "./calendar-month-utils.js";
|
|
13
|
-
|
|
13
|
+
import { isCalendarPaddingWeek as F } from "./calendar-padding-week.utils.js";
|
|
14
|
+
function _({
|
|
14
15
|
buttonVariant: u,
|
|
15
16
|
pickerType: f,
|
|
16
|
-
currentMonth:
|
|
17
|
+
currentMonth: d,
|
|
17
18
|
monthsFull: w,
|
|
18
19
|
resolvedStartMonth: b,
|
|
19
|
-
resolvedEndMonth:
|
|
20
|
+
resolvedEndMonth: k,
|
|
20
21
|
availableYears: v,
|
|
21
|
-
weekStartsOn:
|
|
22
|
-
previousMonthLabel:
|
|
23
|
-
nextMonthLabel:
|
|
24
|
-
monthPlaceholder:
|
|
25
|
-
yearPlaceholder:
|
|
26
|
-
weekNumberLabel:
|
|
27
|
-
weekLabel:
|
|
22
|
+
weekStartsOn: I,
|
|
23
|
+
previousMonthLabel: g,
|
|
24
|
+
nextMonthLabel: x,
|
|
25
|
+
monthPlaceholder: M,
|
|
26
|
+
yearPlaceholder: P,
|
|
27
|
+
weekNumberLabel: S,
|
|
28
|
+
weekLabel: W,
|
|
28
29
|
onMonthChange: m,
|
|
29
|
-
onWeekSelect:
|
|
30
|
-
components:
|
|
30
|
+
onWeekSelect: y,
|
|
31
|
+
components: B
|
|
31
32
|
}) {
|
|
32
33
|
return {
|
|
33
|
-
Root: ({ className: e, rootRef: t, ...a }) => /* @__PURE__ */ n("div", { "data-slot": "calendar", ref: t, className:
|
|
34
|
+
Root: ({ className: e, rootRef: t, ...a }) => /* @__PURE__ */ n("div", { "data-slot": "calendar", ref: t, className: s(e), ...a }),
|
|
34
35
|
Chevron: ({ className: e, orientation: t, ...a }) => t === "left" ? /* @__PURE__ */ n(
|
|
35
36
|
C,
|
|
36
37
|
{
|
|
37
38
|
size: 16,
|
|
38
|
-
className:
|
|
39
|
+
className: s("rotate-180 text-content", e),
|
|
39
40
|
...a
|
|
40
41
|
}
|
|
41
|
-
) : t === "right" ? /* @__PURE__ */ n(C, { size: 16, className:
|
|
42
|
+
) : t === "right" ? /* @__PURE__ */ n(C, { size: 16, className: s("text-content", e), ...a }) : /* @__PURE__ */ n("span", {}),
|
|
42
43
|
PreviousMonthButton: (e) => /* @__PURE__ */ n(
|
|
43
44
|
N,
|
|
44
45
|
{
|
|
45
46
|
variant: u,
|
|
46
47
|
size: "icon",
|
|
47
48
|
className: "h-7 w-7",
|
|
48
|
-
"aria-label":
|
|
49
|
-
title:
|
|
49
|
+
"aria-label": g,
|
|
50
|
+
title: g,
|
|
50
51
|
...e
|
|
51
52
|
}
|
|
52
53
|
),
|
|
@@ -56,35 +57,35 @@ function X({
|
|
|
56
57
|
variant: u,
|
|
57
58
|
size: "icon",
|
|
58
59
|
className: "h-7 w-7",
|
|
59
|
-
"aria-label":
|
|
60
|
-
title:
|
|
60
|
+
"aria-label": x,
|
|
61
|
+
title: x,
|
|
61
62
|
...e
|
|
62
63
|
}
|
|
63
64
|
),
|
|
64
65
|
MonthCaption: ({ displayIndex: e, calendarMonth: t, ...a }) => /* @__PURE__ */ n(h.Provider, { value: e, children: /* @__PURE__ */ n("div", { ...a }) }),
|
|
65
|
-
Month: ({ calendarMonth: e, displayIndex: t, className: a, children:
|
|
66
|
-
const o = p.Children.toArray(
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
-
c.length > 0 ? /* @__PURE__ */ n(
|
|
69
|
-
|
|
66
|
+
Month: ({ calendarMonth: e, displayIndex: t, className: a, children: l, ...r }) => {
|
|
67
|
+
const o = p.Children.toArray(l), i = o[o.length - 1], c = o.slice(0, -1);
|
|
68
|
+
return /* @__PURE__ */ R("div", { className: s(a), ...r, children: [
|
|
69
|
+
c.length > 0 ? /* @__PURE__ */ n(Y, { children: c }) : null,
|
|
70
|
+
i
|
|
70
71
|
] });
|
|
71
72
|
},
|
|
72
|
-
Months: ({ className: e, children: t, ...a }) => /* @__PURE__ */ n("div", { "data-slot": "day-months", className:
|
|
73
|
+
Months: ({ className: e, children: t, ...a }) => /* @__PURE__ */ n("div", { "data-slot": "day-months", className: s(e), ...a, children: t }),
|
|
73
74
|
MonthsDropdown: ({ value: e }) => {
|
|
74
|
-
const t = p.useContext(h), a = t > 0,
|
|
75
|
-
|
|
75
|
+
const t = p.useContext(h), a = t > 0, r = new Date(d.getFullYear(), d.getMonth() + t, 1).getFullYear(), o = A(
|
|
76
|
+
r,
|
|
76
77
|
w,
|
|
77
78
|
b,
|
|
78
|
-
|
|
79
|
+
k
|
|
79
80
|
);
|
|
80
81
|
return /* @__PURE__ */ n(
|
|
81
82
|
D,
|
|
82
83
|
{
|
|
83
|
-
value: o.find((
|
|
84
|
-
onChange: (
|
|
85
|
-
if (
|
|
86
|
-
const c = parseInt(
|
|
87
|
-
m(a ? new Date(
|
|
84
|
+
value: o.find((i) => i.value === e?.toString()),
|
|
85
|
+
onChange: (i) => {
|
|
86
|
+
if (i && "value" in i) {
|
|
87
|
+
const c = parseInt(i.value);
|
|
88
|
+
m(a ? new Date(r, c - 1, 1) : new Date(r, c, 1));
|
|
88
89
|
}
|
|
89
90
|
},
|
|
90
91
|
scrollToSelectedOnOpen: !0,
|
|
@@ -93,7 +94,7 @@ function X({
|
|
|
93
94
|
menuWidth: "160px",
|
|
94
95
|
isSearchable: !0,
|
|
95
96
|
isClearable: !1,
|
|
96
|
-
placeholder:
|
|
97
|
+
placeholder: M
|
|
97
98
|
}
|
|
98
99
|
);
|
|
99
100
|
},
|
|
@@ -102,19 +103,19 @@ function X({
|
|
|
102
103
|
return /* @__PURE__ */ n(
|
|
103
104
|
D,
|
|
104
105
|
{
|
|
105
|
-
value: v.find((
|
|
106
|
-
onChange: (
|
|
107
|
-
if (
|
|
108
|
-
const
|
|
106
|
+
value: v.find((l) => l.value === e?.toString()),
|
|
107
|
+
onChange: (l) => {
|
|
108
|
+
if (l && "value" in l) {
|
|
109
|
+
const r = parseInt(l.value);
|
|
109
110
|
if (a) {
|
|
110
111
|
const o = new Date(
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
d.getFullYear(),
|
|
113
|
+
d.getMonth() + 1,
|
|
113
114
|
1
|
|
114
115
|
).getMonth();
|
|
115
|
-
m(new Date(
|
|
116
|
+
m(new Date(r, o - 1, 1));
|
|
116
117
|
} else
|
|
117
|
-
m(new Date(
|
|
118
|
+
m(new Date(r, d.getMonth(), 1));
|
|
118
119
|
}
|
|
119
120
|
},
|
|
120
121
|
scrollToSelectedOnOpen: !0,
|
|
@@ -123,26 +124,38 @@ function X({
|
|
|
123
124
|
menuWidth: "140px",
|
|
124
125
|
isSearchable: !0,
|
|
125
126
|
isClearable: !1,
|
|
126
|
-
placeholder:
|
|
127
|
+
placeholder: P
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
},
|
|
131
|
+
DayButton: (e) => /* @__PURE__ */ n(z, { ...e, pickerType: f }),
|
|
132
|
+
Week: ({ week: e, className: t, children: a, ...l }) => {
|
|
133
|
+
const r = F(e);
|
|
134
|
+
return /* @__PURE__ */ n(
|
|
135
|
+
"tr",
|
|
136
|
+
{
|
|
137
|
+
className: s(t, r && "invisible"),
|
|
138
|
+
"aria-hidden": r || void 0,
|
|
139
|
+
...l,
|
|
140
|
+
children: a
|
|
127
141
|
}
|
|
128
142
|
);
|
|
129
143
|
},
|
|
130
|
-
DayButton: (e) => /* @__PURE__ */ n(O, { ...e, pickerType: f }),
|
|
131
144
|
WeekNumber: ({ week: e, ...t }) => /* @__PURE__ */ n(
|
|
132
|
-
|
|
145
|
+
O,
|
|
133
146
|
{
|
|
134
147
|
week: e,
|
|
135
|
-
weekStartsOn:
|
|
148
|
+
weekStartsOn: I,
|
|
136
149
|
pickerType: f,
|
|
137
|
-
weekNumberLabel:
|
|
138
|
-
weekLabel:
|
|
139
|
-
onWeekSelect:
|
|
150
|
+
weekNumberLabel: S,
|
|
151
|
+
weekLabel: W,
|
|
152
|
+
onWeekSelect: y,
|
|
140
153
|
...t
|
|
141
154
|
}
|
|
142
155
|
),
|
|
143
|
-
...
|
|
156
|
+
...B
|
|
144
157
|
};
|
|
145
158
|
}
|
|
146
159
|
export {
|
|
147
|
-
|
|
160
|
+
_ as buildCalendarDayPickerComponents
|
|
148
161
|
};
|
|
@@ -54,6 +54,6 @@ export interface CalendarProps extends Omit<React.ComponentProps<typeof DayPicke
|
|
|
54
54
|
monthMode?: "single" | "multiple" | "range";
|
|
55
55
|
selectedMonths?: MonthSelection | MonthSelection[] | MonthRange;
|
|
56
56
|
onMonthSelect?: (months: MonthSelection | MonthSelection[] | MonthRange | undefined) => void;
|
|
57
|
-
/** Always render 6 week rows to prevent layout shift when navigating months. Default true. */
|
|
57
|
+
/** Always render 6 week rows to prevent layout shift when navigating months. Default true. Padding weeks (all days outside the month) are visually hidden via the Week component. */
|
|
58
58
|
fixedWeeks?: boolean;
|
|
59
59
|
}
|