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