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,6 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip as l, TooltipTrigger as n, TooltipContent as o } from "./tooltip.js";
|
|
3
|
-
|
|
3
|
+
import "react";
|
|
4
|
+
const p = (i, r, a) => /* @__PURE__ */ t(l, { children: [
|
|
4
5
|
/* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "inline-flex items-center justify-center h-full w-full", children: i }) }),
|
|
5
6
|
/* @__PURE__ */ e(o, { variant: "tertiary", className: a, children: r })
|
|
6
7
|
] }), h = (i, r) => /* @__PURE__ */ t(l, { children: [
|
|
@@ -9,5 +10,5 @@ const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
|
|
|
9
10
|
] });
|
|
10
11
|
export {
|
|
11
12
|
h as defaultAccordionTooltipRender,
|
|
12
|
-
|
|
13
|
+
p as defaultTabTooltipRender
|
|
13
14
|
};
|
|
@@ -2,17 +2,17 @@ import { jsx as r, jsxs as h, Fragment as z } from "react/jsx-runtime";
|
|
|
2
2
|
import * as o from "react";
|
|
3
3
|
import { Person as G, Monitor as U, PriorityAlert as q, Locked as O, Reset as B } from "impact-nova-icons";
|
|
4
4
|
import { cn as p } from "../../../lib/utils.js";
|
|
5
|
+
import { Kbd as $ } from "../../primitives/kbd/kbd.js";
|
|
6
|
+
import { keybindingToString as H } from "../../primitives/kbd/keybinding-display.js";
|
|
5
7
|
import { OverflowTooltip as A } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
6
|
-
import { ModuleRegistry as
|
|
7
|
-
import { AllEnterpriseModule as
|
|
8
|
-
import { DataTable as
|
|
8
|
+
import { ModuleRegistry as V, AllCommunityModule as J } from "ag-grid-community";
|
|
9
|
+
import { AllEnterpriseModule as Q } from "ag-grid-enterprise";
|
|
10
|
+
import { DataTable as X, DataTableContent as Y } from "../../data/data-table/data-table.js";
|
|
9
11
|
import { AG_CELL_NO_PADDING as F } from "../../data/ag-grid-react/cell-renderers/index.js";
|
|
10
|
-
import { Kbd as X } from "../../primitives/kbd/kbd.js";
|
|
11
|
-
import { keybindingToString as Y } from "../../primitives/kbd/keybinding-display.js";
|
|
12
12
|
import { useCommandPalette as Z } from "./use-command-palette.js";
|
|
13
13
|
import { COMMAND_SOURCE_LABELS as m, keybindingFromEvent as W, isReservedShortcut as ee } from "./utils.js";
|
|
14
14
|
import { BadgeCellRenderer as te } from "../../data/ag-grid-react/cell-renderers/badge-cell-renderer.js";
|
|
15
|
-
|
|
15
|
+
V.registerModules([J, Q]);
|
|
16
16
|
function re(a) {
|
|
17
17
|
const t = a.data;
|
|
18
18
|
return t ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
|
|
@@ -69,7 +69,7 @@ function ne(a) {
|
|
|
69
69
|
"flex items-center justify-end h-full w-full text-end",
|
|
70
70
|
t.customisable ? "cursor-pointer" : "cursor-default opacity-70"
|
|
71
71
|
),
|
|
72
|
-
children: /* @__PURE__ */ r(
|
|
72
|
+
children: /* @__PURE__ */ r($, { keybinding: t.keybinding, size: "sm" })
|
|
73
73
|
}
|
|
74
74
|
) : t.customisable ? /* @__PURE__ */ r(
|
|
75
75
|
"button",
|
|
@@ -133,7 +133,7 @@ function le({
|
|
|
133
133
|
description: e.description || "",
|
|
134
134
|
category: e.category || "General",
|
|
135
135
|
keybinding: i,
|
|
136
|
-
keybindingDisplay: i ?
|
|
136
|
+
keybindingDisplay: i ? H(i) : "",
|
|
137
137
|
scope: e.scope,
|
|
138
138
|
source: D,
|
|
139
139
|
sourceColor: T ? "primary" : "neutral",
|
|
@@ -278,10 +278,10 @@ function le({
|
|
|
278
278
|
u?.type === "conflict" ? /* @__PURE__ */ r(q, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(O, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
|
|
279
279
|
/* @__PURE__ */ r("span", { children: u ? u.text : L })
|
|
280
280
|
] }) : null;
|
|
281
|
-
return /* @__PURE__ */ h(
|
|
281
|
+
return /* @__PURE__ */ h(X, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
|
|
282
282
|
s ? s(E) : E,
|
|
283
283
|
/* @__PURE__ */ r(
|
|
284
|
-
|
|
284
|
+
Y,
|
|
285
285
|
{
|
|
286
286
|
rowData: y,
|
|
287
287
|
columnDefs: I,
|
|
@@ -6,8 +6,8 @@ import { cn as o } from "../../../lib/utils.js";
|
|
|
6
6
|
import { MultiColorFilter as F, Cross as P, InfoBadge as u } from "impact-nova-icons";
|
|
7
7
|
import { Button as D } from "../../primitives/button/button.js";
|
|
8
8
|
import { Tooltip as c, TooltipTrigger as f, TooltipContent as h } from "../../feedback/tooltip/tooltip.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { Kbd as S } from "../../primitives/kbd/kbd.js";
|
|
10
|
+
import { OverflowTooltip as j } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
11
11
|
import { useImpactNovaI18n as v } from "../../../i18n/use-impact-nova-i18n.js";
|
|
12
12
|
import { useOverlayHostDismissNestedLayersOnNavigation as I } from "../../../lib/overlay/overlay-portal-context.js";
|
|
13
13
|
import { preventDismissOnTooltipOutside as x } from "../../../lib/overlay/prevent-dismiss-on-tooltip-outside.js";
|
|
@@ -145,14 +145,14 @@ const O = ({
|
|
|
145
145
|
),
|
|
146
146
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1 min-w-0", children: [
|
|
147
147
|
/* @__PURE__ */ e(
|
|
148
|
-
|
|
148
|
+
j,
|
|
149
149
|
{
|
|
150
150
|
triggerClassName: "truncate font-['Manrope'] block min-w-0",
|
|
151
151
|
content: t.tooltipKeybinding ? /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
|
|
152
152
|
t.label,
|
|
153
153
|
" ",
|
|
154
154
|
/* @__PURE__ */ e(
|
|
155
|
-
|
|
155
|
+
S,
|
|
156
156
|
{
|
|
157
157
|
keybinding: t.tooltipKeybinding,
|
|
158
158
|
size: "sm"
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as s, jsxs as S } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
|
-
import { Cross as
|
|
3
|
+
import { Cross as ge, CalendarMonth as ye } from "impact-nova-icons";
|
|
4
4
|
import { format as b } from "date-fns";
|
|
5
|
-
import { cn as
|
|
6
|
-
import { usePickerDismissActionsRef as
|
|
7
|
-
import { Input as
|
|
8
|
-
import { Calendar as
|
|
5
|
+
import { cn as ke } from "../../../lib/utils.js";
|
|
6
|
+
import { usePickerDismissActionsRef as ve, usePickerFooterDismissNudge as Ce, isDateInputInvalid as Ie, resolveSingleValueDismissFlash as Pe, handlePickerEscapeKeyDown as Me, handlePickerSurfacePointerDown as xe, maskDateInput as Re, parseDateInput as Se, resolveDateInputOnBlur as be, resolveDateInputOnEnter as we } from "./date-input-behavior.js";
|
|
7
|
+
import { Input as Te } from "../input/input.js";
|
|
8
|
+
import { Calendar as Ee } from "../../data-display/calendar/calendar.js";
|
|
9
9
|
import { Tooltip as K, TooltipTrigger as j, TooltipContent as B } from "../../feedback/tooltip/tooltip.js";
|
|
10
|
-
import { useImpactNovaI18n as
|
|
11
|
-
import { getDateFnsLocale as
|
|
12
|
-
import { createComponent as
|
|
13
|
-
import { coerceSingleDateApply as
|
|
14
|
-
import { buildDateBoundsMatcher as
|
|
15
|
-
import { fiscalCalendarPassThrough as
|
|
16
|
-
import { DatePickerShell as
|
|
17
|
-
const
|
|
10
|
+
import { useImpactNovaI18n as Ae } from "../../../i18n/use-impact-nova-i18n.js";
|
|
11
|
+
import { getDateFnsLocale as Ne } from "../../../i18n/getDateFnsLocale.js";
|
|
12
|
+
import { createComponent as Le } from "../../../lib/primitives/create-component.js";
|
|
13
|
+
import { coerceSingleDateApply as Oe, coerceSingleDate as Ve } from "./calendar-selection-adapters.js";
|
|
14
|
+
import { buildDateBoundsMatcher as Ke } from "../../../lib/date-bounds-matcher.js";
|
|
15
|
+
import { fiscalCalendarPassThrough as je } from "./fiscal-pass-through.js";
|
|
16
|
+
import { DatePickerShell as Be } from "./date-picker-shell.js";
|
|
17
|
+
const tt = Le(
|
|
18
18
|
"DatePicker",
|
|
19
19
|
({
|
|
20
20
|
value: n,
|
|
@@ -37,13 +37,14 @@ const et = Ne(
|
|
|
37
37
|
fiscalConfig: _,
|
|
38
38
|
showPresets: $,
|
|
39
39
|
showPeriodBoundaries: F,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
r.
|
|
46
|
-
|
|
40
|
+
autoNavigateToAvailable: ee,
|
|
41
|
+
comparison: te,
|
|
42
|
+
onComparisonChange: ne,
|
|
43
|
+
...re
|
|
44
|
+
}, ie) => {
|
|
45
|
+
const { locale: T, t: h } = Ae(), f = r.useMemo(() => Ne(T), [T]), oe = z ?? h("datePicker.selectDate"), g = r.useRef(null), E = r.useRef(null), I = r.useRef(null);
|
|
46
|
+
r.useImperativeHandle(ie, () => g.current);
|
|
47
|
+
const [i, A] = r.useState(!1), N = ve(), { footerFlashKey: se, footerFlashTarget: ce, popoverHandlers: le } = Ce(a, i, N, E), y = r.useRef(!1), [x, o] = r.useState(null), k = n ? b(n, l, { locale: f }) : "", d = x?.input ?? k, P = i ? x?.pending ?? n : n, ae = x?.viewMonth ?? n ?? /* @__PURE__ */ new Date(), u = r.useCallback(() => {
|
|
47
48
|
o(null), A(!1);
|
|
48
49
|
}, []), m = (e) => {
|
|
49
50
|
if (!c) {
|
|
@@ -61,13 +62,13 @@ const et = Ne(
|
|
|
61
62
|
r.useEffect(() => {
|
|
62
63
|
g.current && I.current !== null && (g.current.setSelectionRange(I.current, I.current), I.current = null);
|
|
63
64
|
}, [d]);
|
|
64
|
-
const
|
|
65
|
-
const t =
|
|
65
|
+
const ue = (e) => {
|
|
66
|
+
const t = Ve(e), D = t ? b(t, l, { locale: f }) : "";
|
|
66
67
|
o(
|
|
67
68
|
(v) => v ? { ...v, pending: t, input: D, viewMonth: t ?? v.viewMonth } : null
|
|
68
69
|
), t && !a && (p?.(t), u());
|
|
69
70
|
}, L = (e) => {
|
|
70
|
-
const t =
|
|
71
|
+
const t = Oe(e, P);
|
|
71
72
|
p?.(t), u();
|
|
72
73
|
}, R = () => {
|
|
73
74
|
u();
|
|
@@ -82,27 +83,27 @@ const et = Ne(
|
|
|
82
83
|
viewMonth: n ?? /* @__PURE__ */ new Date()
|
|
83
84
|
}),
|
|
84
85
|
[k, n]
|
|
85
|
-
),
|
|
86
|
-
const t =
|
|
86
|
+
), pe = (e) => {
|
|
87
|
+
const t = Re(e.target.value, l, d);
|
|
87
88
|
if (o((C) => ({ ...C ?? M(), input: t })), t === "") {
|
|
88
89
|
o((C) => ({ ...C ?? M(), input: "", pending: void 0 })), a || p?.(void 0);
|
|
89
90
|
return;
|
|
90
91
|
}
|
|
91
|
-
const { parsed: D, isValid: v } =
|
|
92
|
+
const { parsed: D, isValid: v } = Se(t, l, f);
|
|
92
93
|
v && D && (o((C) => ({
|
|
93
94
|
...C ?? M(),
|
|
94
95
|
input: t,
|
|
95
96
|
pending: D,
|
|
96
97
|
viewMonth: D
|
|
97
98
|
})), a || p?.(D));
|
|
98
|
-
},
|
|
99
|
+
}, fe = r.useCallback(
|
|
99
100
|
(e) => {
|
|
100
101
|
p?.(e), u();
|
|
101
102
|
},
|
|
102
103
|
[p, u]
|
|
103
|
-
),
|
|
104
|
+
), de = () => {
|
|
104
105
|
if (i) return;
|
|
105
|
-
const e =
|
|
106
|
+
const e = be(
|
|
106
107
|
d,
|
|
107
108
|
l,
|
|
108
109
|
k,
|
|
@@ -122,19 +123,19 @@ const et = Ne(
|
|
|
122
123
|
return;
|
|
123
124
|
}
|
|
124
125
|
o(null);
|
|
125
|
-
},
|
|
126
|
+
}, me = () => {
|
|
126
127
|
if (i && a) {
|
|
127
128
|
L();
|
|
128
129
|
return;
|
|
129
130
|
}
|
|
130
|
-
const e =
|
|
131
|
+
const e = we(d, l, f);
|
|
131
132
|
if (e.parsed) {
|
|
132
|
-
a &&
|
|
133
|
+
a && fe(e.parsed);
|
|
133
134
|
return;
|
|
134
135
|
}
|
|
135
136
|
i || (y.current = !0, m(!0));
|
|
136
|
-
}, V = (n ? b(n, l, { locale: f }) : "") !== d,
|
|
137
|
-
() =>
|
|
137
|
+
}, V = (n ? b(n, l, { locale: f }) : "") !== d, he = Ie(d, l, f), De = r.useCallback(
|
|
138
|
+
() => Pe(
|
|
138
139
|
P,
|
|
139
140
|
n,
|
|
140
141
|
(e, t) => e.getTime() === t.getTime()
|
|
@@ -144,10 +145,10 @@ const et = Ne(
|
|
|
144
145
|
return r.useLayoutEffect(() => {
|
|
145
146
|
N.current = {
|
|
146
147
|
onDismiss: R,
|
|
147
|
-
resolveFlash:
|
|
148
|
+
resolveFlash: De
|
|
148
149
|
};
|
|
149
150
|
}), /* @__PURE__ */ s(
|
|
150
|
-
|
|
151
|
+
Be,
|
|
151
152
|
{
|
|
152
153
|
open: i,
|
|
153
154
|
disabled: c,
|
|
@@ -156,7 +157,7 @@ const et = Ne(
|
|
|
156
157
|
onOpenAutoFocus: (e) => {
|
|
157
158
|
y.current || e.preventDefault(), y.current = !1;
|
|
158
159
|
},
|
|
159
|
-
popoverHandlers:
|
|
160
|
+
popoverHandlers: le,
|
|
160
161
|
trigger: /* @__PURE__ */ s(
|
|
161
162
|
"div",
|
|
162
163
|
{
|
|
@@ -164,29 +165,29 @@ const et = Ne(
|
|
|
164
165
|
"data-component": "date-picker",
|
|
165
166
|
"data-state": i ? "open" : "closed",
|
|
166
167
|
"data-pending": V || void 0,
|
|
167
|
-
onPointerDown: (e) =>
|
|
168
|
+
onPointerDown: (e) => xe({
|
|
168
169
|
disabled: c,
|
|
169
170
|
event: e,
|
|
170
171
|
onOpen: () => m(!0),
|
|
171
172
|
focusField: () => g.current?.focus()
|
|
172
173
|
}),
|
|
173
174
|
children: /* @__PURE__ */ s(
|
|
174
|
-
|
|
175
|
+
Te,
|
|
175
176
|
{
|
|
176
177
|
ref: g,
|
|
177
178
|
value: d,
|
|
178
|
-
onChange:
|
|
179
|
-
onBlur:
|
|
179
|
+
onChange: pe,
|
|
180
|
+
onBlur: de,
|
|
180
181
|
onClick: () => !c && m(!0),
|
|
181
182
|
onKeyDown: (e) => {
|
|
182
|
-
e.key === "Enter" && !c && (e.preventDefault(),
|
|
183
|
+
e.key === "Enter" && !c && (e.preventDefault(), me()), e.key === "ArrowDown" && !i && !c && (e.preventDefault(), y.current = !0, m(!0)), e.key === "Escape" && i && Me(e, { open: i, onCancel: R });
|
|
183
184
|
},
|
|
184
|
-
placeholder: i ? l :
|
|
185
|
+
placeholder: i ? l : oe,
|
|
185
186
|
disabled: c,
|
|
186
187
|
"data-form-control": "input",
|
|
187
|
-
className:
|
|
188
|
+
className: ke(
|
|
188
189
|
"cursor-pointer",
|
|
189
|
-
|
|
190
|
+
he ? "text-destructive" : V ? "text-content-placeholder" : "",
|
|
190
191
|
Q
|
|
191
192
|
),
|
|
192
193
|
suffix: /* @__PURE__ */ S("div", { className: "flex items-center gap-1", children: [
|
|
@@ -201,7 +202,7 @@ const et = Ne(
|
|
|
201
202
|
e.stopPropagation(), O();
|
|
202
203
|
},
|
|
203
204
|
className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
|
|
204
|
-
children: /* @__PURE__ */ s(
|
|
205
|
+
children: /* @__PURE__ */ s(ge, { className: "size-3 hover:text-content" })
|
|
205
206
|
}
|
|
206
207
|
) }),
|
|
207
208
|
/* @__PURE__ */ s(B, { variant: "tertiary", side: "top", children: h("calendar.clear") })
|
|
@@ -211,28 +212,28 @@ const et = Ne(
|
|
|
211
212
|
e.stopPropagation(), c || (i ? u() : m(!0));
|
|
212
213
|
}, onKeyDown: (e) => {
|
|
213
214
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), c || (y.current = !0, i ? u() : m(!0)));
|
|
214
|
-
}, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ s(
|
|
215
|
+
}, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ s(ye, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
|
|
215
216
|
/* @__PURE__ */ s(B, { variant: "tertiary", side: "top", children: h("datePicker.selectDate") })
|
|
216
217
|
] })
|
|
217
218
|
] }),
|
|
218
|
-
...
|
|
219
|
+
...re
|
|
219
220
|
}
|
|
220
221
|
)
|
|
221
222
|
}
|
|
222
223
|
),
|
|
223
224
|
children: /* @__PURE__ */ s(
|
|
224
|
-
|
|
225
|
+
Ee,
|
|
225
226
|
{
|
|
226
227
|
mode: "single",
|
|
227
228
|
selected: P,
|
|
228
|
-
footerFlashKey:
|
|
229
|
-
footerFlashTarget:
|
|
230
|
-
onSelect:
|
|
231
|
-
month:
|
|
229
|
+
footerFlashKey: se,
|
|
230
|
+
footerFlashTarget: ce,
|
|
231
|
+
onSelect: ue,
|
|
232
|
+
month: ae,
|
|
232
233
|
onMonthChange: (e) => o(
|
|
233
234
|
(t) => t ? { ...t, viewMonth: e } : null
|
|
234
235
|
),
|
|
235
|
-
disabled:
|
|
236
|
+
disabled: Ke(H, q),
|
|
236
237
|
startMonth: G,
|
|
237
238
|
endMonth: J,
|
|
238
239
|
showFooter: a,
|
|
@@ -241,7 +242,7 @@ const et = Ne(
|
|
|
241
242
|
onClear: O,
|
|
242
243
|
captionLayout: "dropdown",
|
|
243
244
|
...w !== void 0 ? { weekStartsOn: w } : {},
|
|
244
|
-
...
|
|
245
|
+
...je({
|
|
245
246
|
calendarKind: U,
|
|
246
247
|
fiscalMode: W,
|
|
247
248
|
granularity: X,
|
|
@@ -250,8 +251,9 @@ const et = Ne(
|
|
|
250
251
|
fiscalConfig: _,
|
|
251
252
|
showPresets: $,
|
|
252
253
|
showPeriodBoundaries: F,
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
autoNavigateToAvailable: ee,
|
|
255
|
+
comparison: te,
|
|
256
|
+
onComparisonChange: ne
|
|
255
257
|
})
|
|
256
258
|
}
|
|
257
259
|
)
|
|
@@ -260,5 +262,5 @@ const et = Ne(
|
|
|
260
262
|
}
|
|
261
263
|
);
|
|
262
264
|
export {
|
|
263
|
-
|
|
265
|
+
tt as DatePicker
|
|
264
266
|
};
|
|
@@ -13,6 +13,11 @@ export interface FiscalPickerProps {
|
|
|
13
13
|
showPresets?: boolean;
|
|
14
14
|
/** Draw `(` / `)` on fiscal period start/end days. Default false. */
|
|
15
15
|
showPeriodBoundaries?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* When true and there is no selection, open on the first enabled period.
|
|
18
|
+
* Navigate only — does not select a value. Default false.
|
|
19
|
+
*/
|
|
20
|
+
autoNavigateToAvailable?: boolean;
|
|
16
21
|
comparison?: "prior-fy";
|
|
17
22
|
onComparisonChange?: (value: YoYComparison | undefined) => void;
|
|
18
23
|
}
|