impact-nova 2.5.16 → 2.6.0-alpha.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/README.md +27 -25
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +28 -1
- package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.d.ts +0 -3
- package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.js +31 -38
- package/dist/components/data/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
- package/dist/components/data/ag-grid-react/chat/chat-capabilities.d.ts +9 -0
- package/dist/components/data/ag-grid-react/chat/chat-capabilities.js +22 -0
- package/dist/components/data/ag-grid-react/chat/chat-column.d.ts +20 -0
- package/dist/components/data/ag-grid-react/chat/chat-column.js +81 -0
- package/dist/components/data/ag-grid-react/chat/chat-composer.d.ts +10 -0
- package/dist/components/data/ag-grid-react/chat/chat-composer.js +352 -0
- package/dist/components/data/ag-grid-react/chat/chat-constants.d.ts +17 -0
- package/dist/components/data/ag-grid-react/chat/chat-constants.js +22 -0
- package/dist/components/data/ag-grid-react/chat/chat-format.d.ts +41 -0
- package/dist/components/data/ag-grid-react/chat/chat-format.js +94 -0
- package/dist/components/data/ag-grid-react/chat/chat-host.d.ts +10 -0
- package/dist/components/data/ag-grid-react/chat/chat-host.js +651 -0
- package/dist/components/data/ag-grid-react/chat/chat-host.types.d.ts +13 -0
- package/dist/components/data/ag-grid-react/chat/chat-html.d.ts +2 -0
- package/dist/components/data/ag-grid-react/chat/chat-html.js +40 -0
- package/dist/components/data/ag-grid-react/chat/chat-identity.d.ts +13 -0
- package/dist/components/data/ag-grid-react/chat/chat-identity.js +24 -0
- package/dist/components/data/ag-grid-react/chat/chat-menu.d.ts +13 -0
- package/dist/components/data/ag-grid-react/chat/chat-menu.js +15 -0
- package/dist/components/data/ag-grid-react/chat/chat-notify.d.ts +17 -0
- package/dist/components/data/ag-grid-react/chat/chat-notify.js +124 -0
- package/dist/components/data/ag-grid-react/chat/chat-persist.d.ts +13 -0
- package/dist/components/data/ag-grid-react/chat/chat-persist.js +34 -0
- package/dist/components/data/ag-grid-react/chat/chat-priority.d.ts +13 -0
- package/dist/components/data/ag-grid-react/chat/chat-priority.js +79 -0
- package/dist/components/data/ag-grid-react/chat/chat-summaries.d.ts +2 -0
- package/dist/components/data/ag-grid-react/chat/chat-summaries.js +24 -0
- package/dist/components/data/ag-grid-react/chat/chat-thread-ui.d.ts +72 -0
- package/dist/components/data/ag-grid-react/chat/chat-thread-ui.js +713 -0
- package/dist/components/data/ag-grid-react/chat/chat-toggle.d.ts +6 -0
- package/dist/components/data/ag-grid-react/chat/chat-toggle.js +25 -0
- package/dist/components/data/ag-grid-react/chat/chat-ui-actions.d.ts +13 -0
- package/dist/components/data/ag-grid-react/chat/chat-ui-actions.js +26 -0
- package/dist/components/data/ag-grid-react/chat/chat-window.d.ts +14 -0
- package/dist/components/data/ag-grid-react/chat/chat-window.js +82 -0
- package/dist/components/data/ag-grid-react/chat/chat-workspace.d.ts +91 -0
- package/dist/components/data/ag-grid-react/chat/chat-workspace.js +555 -0
- package/dist/components/data/ag-grid-react/chat/chat.types.d.ts +319 -0
- package/dist/components/data/ag-grid-react/chat/index.d.ts +6 -0
- package/dist/components/data/ag-grid-react/chat/index.js +24 -0
- package/dist/components/data/ag-grid-react/chat.story-data.d.ts +34 -0
- package/dist/components/data/ag-grid-react/chat.story-sources.d.ts +4 -0
- package/dist/components/data/ag-grid-react/comments/assets/comments-no-results.png.js +4 -0
- package/dist/components/data/ag-grid-react/comments/comment-mode-toggle.d.ts +6 -0
- package/dist/components/data/ag-grid-react/comments/comment-mode-toggle.js +29 -0
- package/dist/components/data/ag-grid-react/comments/comments-actions-menu.d.ts +8 -0
- package/dist/components/data/ag-grid-react/comments/comments-actions-menu.js +18 -0
- package/dist/components/data/ag-grid-react/comments/comments-ag-grid-presence.d.ts +18 -0
- package/dist/components/data/ag-grid-react/comments/comments-ag-grid-presence.js +16 -0
- package/dist/components/data/ag-grid-react/comments/comments-capabilities.d.ts +11 -0
- package/dist/components/data/ag-grid-react/comments/comments-capabilities.js +26 -0
- package/dist/components/data/ag-grid-react/comments/comments-constants.d.ts +12 -0
- package/dist/components/data/ag-grid-react/comments/comments-constants.js +21 -0
- package/dist/components/data/ag-grid-react/comments/comments-format.d.ts +20 -0
- package/dist/components/data/ag-grid-react/comments/comments-format.js +49 -0
- package/dist/components/data/ag-grid-react/comments/comments-generation.d.ts +14 -0
- package/dist/components/data/ag-grid-react/comments/comments-generation.js +18 -0
- package/dist/components/data/ag-grid-react/comments/comments-host.d.ts +10 -0
- package/dist/components/data/ag-grid-react/comments/comments-host.js +343 -0
- package/dist/components/data/ag-grid-react/comments/comments-host.types.d.ts +18 -0
- package/dist/components/data/ag-grid-react/comments/comments-identity.d.ts +7 -0
- package/dist/components/data/ag-grid-react/comments/comments-identity.js +20 -0
- package/dist/components/data/ag-grid-react/comments/comments-menu.d.ts +29 -0
- package/dist/components/data/ag-grid-react/comments/comments-menu.js +35 -0
- package/dist/components/data/ag-grid-react/comments/comments-overlay-anchor.d.ts +22 -0
- package/dist/components/data/ag-grid-react/comments/comments-overlay-anchor.js +98 -0
- package/dist/components/data/ag-grid-react/comments/comments-overlay.d.ts +21 -0
- package/dist/components/data/ag-grid-react/comments/comments-overlay.js +406 -0
- package/dist/components/data/ag-grid-react/comments/comments-panel.d.ts +9 -0
- package/dist/components/data/ag-grid-react/comments/comments-panel.js +272 -0
- package/dist/components/data/ag-grid-react/comments/comments-persist.d.ts +11 -0
- package/dist/components/data/ag-grid-react/comments/comments-persist.js +19 -0
- package/dist/components/data/ag-grid-react/comments/comments-reveal.d.ts +11 -0
- package/dist/components/data/ag-grid-react/comments/comments-reveal.js +31 -0
- package/dist/components/data/ag-grid-react/comments/comments-ui-actions.d.ts +18 -0
- package/dist/components/data/ag-grid-react/comments/comments-ui-actions.js +22 -0
- package/dist/components/data/ag-grid-react/comments/comments-window.d.ts +10 -0
- package/dist/components/data/ag-grid-react/comments/comments-window.js +62 -0
- package/dist/components/data/ag-grid-react/comments/comments.types.d.ts +178 -0
- package/dist/components/data/ag-grid-react/comments/index.d.ts +5 -0
- package/dist/components/data/ag-grid-react/comments/index.js +15 -0
- package/dist/components/data/ag-grid-react/comments-cell-renderers-showcase.d.ts +25 -0
- package/dist/components/data/ag-grid-react/comments.story-data.d.ts +37 -0
- package/dist/components/data/ag-grid-react/comments.story-sources.d.ts +11 -0
- package/dist/components/data/ag-grid-react/grid-cell-address.d.ts +21 -0
- package/dist/components/data/ag-grid-react/grid-cell-address.js +21 -0
- package/dist/components/data/ag-grid-react/grid-row-reveal.d.ts +34 -0
- package/dist/components/data/ag-grid-react/grid-row-reveal.js +33 -0
- package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +75 -65
- package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.d.ts +1 -1
- package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.js +54 -54
- package/dist/components/data/ag-grid-react/headers/components/date-filter-picker.d.ts +1 -1
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +122 -119
- package/dist/components/data/ag-grid-react/headers/utils/date-utils.d.ts +2 -1
- package/dist/components/data/ag-grid-react/headers/utils/date-utils.js +25 -20
- package/dist/components/data/ag-grid-react/headers/utils/filter-utils.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +481 -254
- package/dist/components/data/ag-grid-react/notes/index.d.ts +2 -0
- package/dist/components/data/ag-grid-react/notes/index.js +1 -0
- package/dist/components/data/ag-grid-react/notes/notes-ag-grid-adapter.d.ts +25 -0
- package/dist/components/data/ag-grid-react/notes/notes-ag-grid-adapter.js +32 -0
- package/dist/components/data/ag-grid-react/notes/notes-constants.d.ts +2 -0
- package/dist/components/data/ag-grid-react/notes/notes-constants.js +4 -0
- package/dist/components/data/ag-grid-react/notes/notes.types.d.ts +12 -0
- package/dist/components/data/ag-grid-react/notes.story-sources.d.ts +7 -0
- package/dist/components/data/ag-grid-react/nova-system-column.d.ts +7 -0
- package/dist/components/data/ag-grid-react/nova-system-column.js +18 -0
- package/dist/components/data/ag-grid-react/theme.js +6 -2
- package/dist/components/data/ag-grid-react/value-formatter.types.d.ts +4 -0
- package/dist/components/data/ag-grid-react/value-formatters.d.ts +0 -19
- package/dist/components/data/ag-grid-react/value-formatters.js +88 -90
- 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 +49 -53
- 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-def-pin.js +34 -31
- 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/data-table-context.js +5 -5
- package/dist/components/data/data-table/data-table-sheet-context.js +1 -1
- package/dist/components/data/data-table/data-table-sheet.js +2 -1
- 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/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-config.js +22 -21
- package/dist/components/data-display/calendar/calendar-day-button.js +21 -21
- package/dist/components/data-display/calendar/calendar-day-picker-view.js +36 -35
- package/dist/components/data-display/calendar/calendar-fiscal-labels.d.ts +3 -3
- package/dist/components/data-display/calendar/calendar-fiscal-labels.js +50 -62
- package/dist/components/data-display/calendar/calendar.js +138 -137
- package/dist/components/data-display/calendar/fiscal-period-caption-select.js +23 -22
- package/dist/components/data-display/calendar/use-calendar-i18n.d.ts +1 -0
- package/dist/components/data-display/calendar/use-calendar-i18n.js +10 -9
- package/dist/components/data-display/chart/chart.js +72 -72
- package/dist/components/data-display/chart/chart.utils.d.ts +1 -1
- package/dist/components/data-display/chart/chart.utils.js +40 -31
- package/dist/components/feedback/sheet/sheet.js +1 -1
- package/dist/components/feedback/toast/toast.d.ts +1 -1
- package/dist/components/feedback/toast/toast.variants.d.ts +1 -1
- package/dist/components/flows/filter-panel/filter-panel.d.ts +1 -1
- package/dist/components/flows/filter-panel/filter-panel.js +65 -64
- package/dist/components/flows/filter-panel/filter-panel.types.d.ts +1 -0
- package/dist/components/forms/date-picker/date-picker.js +125 -126
- package/dist/components/forms/date-picker/date-range-picker.js +191 -192
- package/dist/components/forms/date-picker/multi-date-picker.js +66 -67
- package/dist/components/forms/date-picker/multi-week-picker.js +82 -83
- package/dist/components/forms/date-picker/use-picker-i18n.d.ts +6 -0
- package/dist/components/forms/date-picker/use-picker-i18n.js +11 -0
- package/dist/components/forms/date-picker/week-picker.js +146 -147
- package/dist/components/forms/date-picker/week-range-picker.js +158 -159
- package/dist/components/ui/local-raster-icons/message3d.webp.js +4 -0
- package/dist/components/ui/local-raster-icons/rasterIcons.d.ts +1 -0
- package/dist/components/ui/local-raster-icons/rasterIcons.js +27 -25
- package/dist/form-react/Fields/WeekRangePicker.js +16 -16
- package/dist/i18n/defaultMessages.d.ts +144 -0
- package/dist/i18n/defaultMessages.js +161 -19
- package/dist/i18n/format/collator.d.ts +1 -0
- package/dist/i18n/format/collator.js +7 -0
- package/dist/i18n/format/date-pattern.d.ts +5 -0
- package/dist/i18n/format/date-pattern.js +20 -0
- package/dist/i18n/format/format-date.d.ts +9 -0
- package/dist/i18n/format/format-date.js +56 -0
- package/dist/i18n/format/format-number.d.ts +20 -0
- package/dist/i18n/format/format-number.js +68 -0
- package/dist/i18n/format/formatter-cache.d.ts +9 -0
- package/dist/i18n/format/formatter-cache.js +66 -0
- package/dist/i18n/format/index.d.ts +6 -0
- package/dist/i18n/format/parse-number.d.ts +6 -0
- package/dist/i18n/format/parse-number.js +53 -0
- package/dist/i18n/getDateFnsLocale.d.ts +5 -4
- package/dist/i18n/getDateFnsLocale.js +46 -16
- package/dist/i18n/i18n.types.d.ts +13 -0
- package/dist/i18n/impact-nova-i18n-context.d.ts +1 -1
- package/dist/i18n/impact-nova-i18n-context.js +33 -25
- package/dist/i18n/impact-nova-i18n-defaults.js +8 -6
- package/dist/i18n/index.d.ts +4 -1
- package/dist/i18n/index.js +41 -16
- package/dist/i18n/locale-config.d.ts +28 -0
- package/dist/i18n/locale-config.js +32 -0
- package/dist/i18n/locales/de.js +142 -0
- package/dist/i18n/locales/es.js +142 -0
- package/dist/i18n/locales/hi.js +142 -0
- package/dist/i18n/locales/kn.js +142 -0
- package/dist/i18n/week-start.d.ts +6 -0
- package/dist/i18n/week-start.js +30 -0
- package/dist/impact-nova-components.css +249 -0
- package/dist/impact-nova-tokens.scss +6 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +624 -601
- package/dist/llms/index.js +26 -2
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/best-practices.js +1 -1
- package/dist/llms/rules/data-table-chat.js +1 -0
- package/dist/llms/rules/data-table-comments.js +1 -0
- package/dist/llms/rules/data-table-notes.js +1 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/migration.js +1 -1
- package/dist/llms/rules/real-world-patterns.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/llms/rules/troubleshooting.js +1 -1
- package/dist/providers/app-providers.d.ts +3 -1
- package/dist/providers/app-providers.js +22 -11
- package/package.json +13 -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,40 +1,39 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsxs as R, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
3
|
import { Cross as Te, CalendarMonth as Ee } from "impact-nova-icons";
|
|
4
|
-
import { format as
|
|
4
|
+
import { format as z } from "date-fns";
|
|
5
5
|
import { cn as Se } from "../../../lib/utils.js";
|
|
6
|
-
import { usePickerDismissActionsRef as Ae, usePickerFooterDismissNudge as
|
|
6
|
+
import { usePickerDismissActionsRef as Ae, usePickerFooterDismissNudge as we, isDateInputInvalid as Ne, resolveSingleValueDismissFlash as Ve, handlePickerEscapeKeyDown as Oe, handlePickerSurfacePointerDown as je, resolveDateInputOnBlur as Be, maskDateInput as Le, parseDateInput as Fe, resolveDateInputOnEnter as ze } from "./date-input-behavior.js";
|
|
7
7
|
import { Input as He } from "../input/input.js";
|
|
8
|
-
import { Popover as Ke, PopoverAnchor as
|
|
9
|
-
import { Calendar as
|
|
10
|
-
import { Tooltip as
|
|
11
|
-
import { resolveWeekSelection as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}, g = (n, c, t) => n ? B(n.startDate, c, t ? { locale: t } : {}) : "", Fe = s.forwardRef(
|
|
8
|
+
import { Popover as Ke, PopoverAnchor as Me, PopoverContent as $e } from "../../feedback/popover/popover.js";
|
|
9
|
+
import { Calendar as qe } from "../../data-display/calendar/calendar.js";
|
|
10
|
+
import { Tooltip as Z, TooltipTrigger as _, TooltipContent as Y } from "../../feedback/tooltip/tooltip.js";
|
|
11
|
+
import { resolveWeekSelection as Ge } from "../../../lib/fiscal-calendar/week-selection.js";
|
|
12
|
+
import { usePickerI18n as Je } from "./use-picker-i18n.js";
|
|
13
|
+
import { coerceSingleWeekApply as Qe, coerceSingleWeek as Ue } from "./calendar-selection-adapters.js";
|
|
14
|
+
import { buildDateBoundsMatcher as Xe } from "../../../lib/date-bounds-matcher.js";
|
|
15
|
+
import { fiscalCalendarPassThrough as Ze } from "./fiscal-pass-through.js";
|
|
16
|
+
const ee = (t, c = "MM/dd/yyyy", f) => {
|
|
17
|
+
const b = z(t.startDate, c, f ? { locale: f } : {}), x = z(t.endDate, c, f ? { locale: f } : {});
|
|
18
|
+
return `${b} - ${x}`;
|
|
19
|
+
}, P = (t, c, f) => t ? z(t.startDate, c, f ? { locale: f } : {}) : "", _e = r.forwardRef(
|
|
21
20
|
({
|
|
22
|
-
value:
|
|
21
|
+
value: t,
|
|
23
22
|
onChange: c,
|
|
24
|
-
format:
|
|
25
|
-
placeholder:
|
|
26
|
-
minDate:
|
|
23
|
+
format: f,
|
|
24
|
+
placeholder: b,
|
|
25
|
+
minDate: x,
|
|
27
26
|
maxDate: te,
|
|
28
27
|
startMonth: ne,
|
|
29
28
|
endMonth: re,
|
|
30
29
|
showFooter: l = !0,
|
|
31
|
-
calendarKind:
|
|
32
|
-
fiscalMode:
|
|
33
|
-
granularity:
|
|
34
|
-
fiscalMonthPattern:
|
|
35
|
-
fiscalYearStartMonth:
|
|
36
|
-
fiscalConfig:
|
|
37
|
-
weekStartsOn: N
|
|
30
|
+
calendarKind: I,
|
|
31
|
+
fiscalMode: T = "basic",
|
|
32
|
+
granularity: E,
|
|
33
|
+
fiscalMonthPattern: S,
|
|
34
|
+
fiscalYearStartMonth: A = 1,
|
|
35
|
+
fiscalConfig: w,
|
|
36
|
+
weekStartsOn: N,
|
|
38
37
|
showPresets: se,
|
|
39
38
|
showPeriodBoundaries: oe,
|
|
40
39
|
autoNavigateToAvailable: ie,
|
|
@@ -44,186 +43,186 @@ const ee = (n, c = "MM/dd/yyyy", t) => {
|
|
|
44
43
|
className: le,
|
|
45
44
|
...pe
|
|
46
45
|
}, ue) => {
|
|
47
|
-
const {
|
|
48
|
-
|
|
49
|
-
const [
|
|
50
|
-
|
|
51
|
-
}, [
|
|
52
|
-
|
|
53
|
-
}, [u,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}, [
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, [
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
},
|
|
46
|
+
const { dateFnsLocale: i, dateFormat: o, t: h } = Je(f), fe = b ?? h("datePicker.selectWeek"), v = I === "fiscal", V = r.useRef(null), H = r.useRef(null), C = r.useRef(!1);
|
|
47
|
+
r.useImperativeHandle(ue, () => V.current);
|
|
48
|
+
const [s, K] = r.useState(!1), M = Ae(), { footerFlashKey: de, footerFlashTarget: me, popoverHandlers: ke } = we(l, s, M, H), [De, O] = r.useState(!1), [u, d] = r.useState(t), [y, k] = r.useState(""), [he, g] = r.useState(t?.startDate || /* @__PURE__ */ new Date()), ye = t ? ee(t, o, i) : "", $ = u ? ee(u, o, i) : "", j = s || De, ge = j ? y : $, q = r.useCallback(() => {
|
|
49
|
+
d(t), k(P(t, o, i)), v || g(t?.startDate || /* @__PURE__ */ new Date());
|
|
50
|
+
}, [t, o, i, v]), W = r.useCallback(() => {
|
|
51
|
+
k(P(u ?? t, o, i)), v || g((u ?? t)?.startDate || /* @__PURE__ */ new Date());
|
|
52
|
+
}, [u, t, o, i, v]);
|
|
53
|
+
r.useEffect(() => {
|
|
54
|
+
s || d(t);
|
|
55
|
+
}, [s, t]);
|
|
56
|
+
const G = r.useRef(!1);
|
|
57
|
+
r.useEffect(() => {
|
|
58
|
+
s && !G.current && W(), G.current = s;
|
|
59
|
+
}, [s, W]);
|
|
60
|
+
const m = () => {
|
|
61
|
+
O(!1), K(!1);
|
|
62
|
+
}, D = (e) => {
|
|
64
63
|
if (!p) {
|
|
65
64
|
if (e) {
|
|
66
|
-
|
|
65
|
+
W(), K(!0);
|
|
67
66
|
return;
|
|
68
67
|
}
|
|
69
|
-
l ||
|
|
68
|
+
l || m();
|
|
70
69
|
}
|
|
71
|
-
},
|
|
72
|
-
(e) =>
|
|
73
|
-
calendarKind:
|
|
74
|
-
fiscalMode:
|
|
75
|
-
granularity:
|
|
76
|
-
fiscalMonthPattern:
|
|
77
|
-
fiscalYearStartMonth:
|
|
70
|
+
}, B = r.useCallback(
|
|
71
|
+
(e) => Ge(e, {
|
|
72
|
+
calendarKind: I,
|
|
73
|
+
fiscalMode: T,
|
|
74
|
+
granularity: E,
|
|
75
|
+
fiscalMonthPattern: S,
|
|
76
|
+
fiscalYearStartMonth: A,
|
|
78
77
|
weekStartsOn: N,
|
|
79
|
-
fiscalConfig:
|
|
78
|
+
fiscalConfig: w
|
|
80
79
|
}),
|
|
81
80
|
[
|
|
82
|
-
|
|
83
|
-
x,
|
|
81
|
+
I,
|
|
84
82
|
T,
|
|
85
83
|
E,
|
|
86
84
|
S,
|
|
85
|
+
A,
|
|
87
86
|
N,
|
|
88
|
-
|
|
87
|
+
w
|
|
89
88
|
]
|
|
90
|
-
),
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
const
|
|
95
|
-
c?.(
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
106
|
-
|
|
89
|
+
), Pe = (e) => {
|
|
90
|
+
const n = Ue(e);
|
|
91
|
+
d(n), n && (k(P(n, o, i)), v || g(n.startDate)), l || (c?.(n), m());
|
|
92
|
+
}, J = (e) => {
|
|
93
|
+
const n = Qe(e, u);
|
|
94
|
+
c?.(n), m();
|
|
95
|
+
}, L = () => {
|
|
96
|
+
q(), m();
|
|
97
|
+
}, Q = () => {
|
|
98
|
+
d(void 0), k(""), c?.(void 0), l || m();
|
|
99
|
+
}, ve = (e) => {
|
|
100
|
+
const n = B(e);
|
|
101
|
+
d(n), k(P(n, o, i)), g(e), c?.(n), m();
|
|
102
|
+
}, Ce = (e) => {
|
|
103
|
+
const n = Le(e.target.value, o, y);
|
|
104
|
+
if (k(n), n === "") {
|
|
105
|
+
d(void 0), l || c?.(void 0);
|
|
107
106
|
return;
|
|
108
107
|
}
|
|
109
|
-
const { parsed:
|
|
110
|
-
if (xe &&
|
|
111
|
-
const
|
|
112
|
-
|
|
108
|
+
const { parsed: F, isValid: xe } = Fe(n, o, i);
|
|
109
|
+
if (xe && F) {
|
|
110
|
+
const X = B(F);
|
|
111
|
+
d(X), g(F), l || c?.(X);
|
|
113
112
|
}
|
|
114
|
-
},
|
|
115
|
-
if (
|
|
116
|
-
const e =
|
|
113
|
+
}, Ie = () => {
|
|
114
|
+
if (O(!1), s) return;
|
|
115
|
+
const e = Be(
|
|
117
116
|
y,
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
o,
|
|
118
|
+
P(u ?? t, o, i),
|
|
120
119
|
i
|
|
121
120
|
);
|
|
122
121
|
if (e.resetToCommitted) {
|
|
123
|
-
|
|
122
|
+
q();
|
|
124
123
|
return;
|
|
125
124
|
}
|
|
126
125
|
if (e.parsed) {
|
|
127
|
-
const
|
|
128
|
-
|
|
126
|
+
const n = B(e.parsed);
|
|
127
|
+
d(n), k(P(n, o, i)), l || c?.(n);
|
|
129
128
|
return;
|
|
130
129
|
}
|
|
131
|
-
y || (
|
|
130
|
+
y || (d(void 0), l || c?.(void 0));
|
|
132
131
|
}, We = () => {
|
|
133
|
-
if (
|
|
134
|
-
|
|
132
|
+
if (s && l) {
|
|
133
|
+
J();
|
|
135
134
|
return;
|
|
136
135
|
}
|
|
137
|
-
const e = ze(y,
|
|
136
|
+
const e = ze(y, o, i);
|
|
138
137
|
if (e.parsed) {
|
|
139
|
-
l &&
|
|
138
|
+
l && ve(e.parsed);
|
|
140
139
|
return;
|
|
141
140
|
}
|
|
142
|
-
|
|
143
|
-
},
|
|
141
|
+
s || (C.current = !0, D(!0));
|
|
142
|
+
}, U = ye !== $, Re = j && Ne(y, o, i), be = r.useCallback(
|
|
144
143
|
() => Ve(
|
|
145
144
|
u,
|
|
146
|
-
|
|
147
|
-
(e,
|
|
145
|
+
t,
|
|
146
|
+
(e, n) => e.startDate.getTime() === n.startDate.getTime()
|
|
148
147
|
),
|
|
149
|
-
[u,
|
|
148
|
+
[u, t]
|
|
150
149
|
);
|
|
151
|
-
return
|
|
152
|
-
|
|
153
|
-
onDismiss:
|
|
150
|
+
return r.useLayoutEffect(() => {
|
|
151
|
+
M.current = {
|
|
152
|
+
onDismiss: L,
|
|
154
153
|
resolveFlash: be
|
|
155
154
|
};
|
|
156
|
-
}), /* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */ a(
|
|
155
|
+
}), /* @__PURE__ */ R(Ke, { open: p ? !1 : s, onOpenChange: D, children: [
|
|
156
|
+
/* @__PURE__ */ a(Me, { asChild: !0, children: /* @__PURE__ */ a(
|
|
158
157
|
"div",
|
|
159
158
|
{
|
|
160
159
|
ref: H,
|
|
161
160
|
"data-component": "week-picker",
|
|
162
|
-
"data-state":
|
|
163
|
-
"data-pending":
|
|
164
|
-
onPointerDown: (e) =>
|
|
161
|
+
"data-state": s ? "open" : "closed",
|
|
162
|
+
"data-pending": U || void 0,
|
|
163
|
+
onPointerDown: (e) => je({
|
|
165
164
|
disabled: p,
|
|
166
165
|
event: e,
|
|
167
|
-
onOpen: () =>
|
|
168
|
-
focusField: () =>
|
|
166
|
+
onOpen: () => D(!0),
|
|
167
|
+
focusField: () => V.current?.focus()
|
|
169
168
|
}),
|
|
170
169
|
children: /* @__PURE__ */ a(
|
|
171
170
|
He,
|
|
172
171
|
{
|
|
173
|
-
ref:
|
|
172
|
+
ref: V,
|
|
174
173
|
value: ge,
|
|
175
|
-
onChange:
|
|
174
|
+
onChange: Ce,
|
|
176
175
|
onFocus: () => {
|
|
177
|
-
p || (
|
|
176
|
+
p || (O(!0), W());
|
|
178
177
|
},
|
|
179
|
-
onBlur:
|
|
180
|
-
onClick: () => !p &&
|
|
178
|
+
onBlur: Ie,
|
|
179
|
+
onClick: () => !p && D(!0),
|
|
181
180
|
onKeyDown: (e) => {
|
|
182
|
-
e.key === "Enter" && !p && (e.preventDefault(), We()), e.key === "ArrowDown" && !
|
|
181
|
+
e.key === "Enter" && !p && (e.preventDefault(), We()), e.key === "ArrowDown" && !s && !p && (e.preventDefault(), C.current = !0, D(!0)), e.key === "Escape" && s && Oe(e, { open: s, onCancel: L });
|
|
183
182
|
},
|
|
184
|
-
placeholder:
|
|
183
|
+
placeholder: j ? o : fe,
|
|
185
184
|
disabled: p,
|
|
186
185
|
"data-form-control": "input",
|
|
187
186
|
className: Se(
|
|
188
187
|
"cursor-pointer",
|
|
189
|
-
Re ? "text-destructive" :
|
|
188
|
+
Re ? "text-destructive" : U ? "text-content-placeholder" : "",
|
|
190
189
|
le
|
|
191
190
|
),
|
|
192
|
-
suffix: /* @__PURE__ */
|
|
193
|
-
|
|
194
|
-
/* @__PURE__ */ a(
|
|
191
|
+
suffix: /* @__PURE__ */ R("div", { className: "flex items-center gap-1", children: [
|
|
192
|
+
t && !p && /* @__PURE__ */ R(Z, { children: [
|
|
193
|
+
/* @__PURE__ */ a(_, { asChild: !0, children: /* @__PURE__ */ a(
|
|
195
194
|
"button",
|
|
196
195
|
{
|
|
197
196
|
type: "button",
|
|
198
197
|
tabIndex: 0,
|
|
199
|
-
"aria-label":
|
|
198
|
+
"aria-label": h("calendar.clear"),
|
|
200
199
|
onClick: (e) => {
|
|
201
|
-
e.stopPropagation(),
|
|
200
|
+
e.stopPropagation(), Q();
|
|
202
201
|
},
|
|
203
202
|
className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
|
|
204
203
|
children: /* @__PURE__ */ a(Te, { className: "size-3 hover:text-content" })
|
|
205
204
|
}
|
|
206
205
|
) }),
|
|
207
|
-
/* @__PURE__ */ a(
|
|
206
|
+
/* @__PURE__ */ a(Y, { variant: "tertiary", side: "top", children: h("calendar.clear") })
|
|
208
207
|
] }),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */ a(
|
|
208
|
+
/* @__PURE__ */ R(Z, { children: [
|
|
209
|
+
/* @__PURE__ */ a(_, { asChild: !0, children: /* @__PURE__ */ a(
|
|
211
210
|
"button",
|
|
212
211
|
{
|
|
213
212
|
type: "button",
|
|
214
213
|
tabIndex: 0,
|
|
215
|
-
"aria-label":
|
|
214
|
+
"aria-label": h("datePicker.selectWeek"),
|
|
216
215
|
onClick: (e) => {
|
|
217
|
-
e.stopPropagation(), p || (
|
|
216
|
+
e.stopPropagation(), p || (s ? m() : D(!0));
|
|
218
217
|
},
|
|
219
218
|
onKeyDown: (e) => {
|
|
220
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), p || (
|
|
219
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), p || (C.current = !0, s ? m() : D(!0)));
|
|
221
220
|
},
|
|
222
221
|
className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
|
|
223
222
|
children: /* @__PURE__ */ a(Ee, { className: "h-4 w-4 text-secondary-foreground" })
|
|
224
223
|
}
|
|
225
224
|
) }),
|
|
226
|
-
/* @__PURE__ */ a(
|
|
225
|
+
/* @__PURE__ */ a(Y, { variant: "tertiary", side: "top", children: h("datePicker.selectWeek") })
|
|
227
226
|
] })
|
|
228
227
|
] }),
|
|
229
228
|
...pe
|
|
@@ -232,37 +231,37 @@ const ee = (n, c = "MM/dd/yyyy", t) => {
|
|
|
232
231
|
}
|
|
233
232
|
) }),
|
|
234
233
|
/* @__PURE__ */ a(
|
|
235
|
-
|
|
234
|
+
$e,
|
|
236
235
|
{
|
|
237
236
|
className: "w-auto p-0",
|
|
238
237
|
align: "start",
|
|
239
|
-
"aria-label":
|
|
238
|
+
"aria-label": h("datePicker.selectWeek"),
|
|
240
239
|
onOpenAutoFocus: (e) => {
|
|
241
|
-
|
|
240
|
+
C.current || e.preventDefault(), C.current = !1;
|
|
242
241
|
},
|
|
243
242
|
...ke,
|
|
244
243
|
children: /* @__PURE__ */ a(
|
|
245
|
-
|
|
244
|
+
qe,
|
|
246
245
|
{
|
|
247
246
|
pickerType: "week",
|
|
248
247
|
weekMode: "single",
|
|
249
248
|
selectedWeeks: u,
|
|
250
249
|
footerFlashKey: de,
|
|
251
250
|
footerFlashTarget: me,
|
|
252
|
-
onWeekSelect:
|
|
253
|
-
month:
|
|
254
|
-
onMonthChange:
|
|
255
|
-
disabled:
|
|
251
|
+
onWeekSelect: Pe,
|
|
252
|
+
month: he,
|
|
253
|
+
onMonthChange: g,
|
|
254
|
+
disabled: Xe(x, te),
|
|
256
255
|
startMonth: ne,
|
|
257
256
|
endMonth: re,
|
|
258
257
|
showFooter: l,
|
|
259
|
-
...
|
|
260
|
-
calendarKind:
|
|
261
|
-
fiscalMode:
|
|
262
|
-
granularity:
|
|
263
|
-
fiscalMonthPattern:
|
|
264
|
-
fiscalYearStartMonth:
|
|
265
|
-
fiscalConfig:
|
|
258
|
+
...Ze({
|
|
259
|
+
calendarKind: I,
|
|
260
|
+
fiscalMode: T,
|
|
261
|
+
granularity: E,
|
|
262
|
+
fiscalMonthPattern: S,
|
|
263
|
+
fiscalYearStartMonth: A,
|
|
264
|
+
fiscalConfig: w,
|
|
266
265
|
weekStartsOn: N,
|
|
267
266
|
showPresets: se,
|
|
268
267
|
showPeriodBoundaries: oe,
|
|
@@ -270,9 +269,9 @@ const ee = (n, c = "MM/dd/yyyy", t) => {
|
|
|
270
269
|
comparison: ce,
|
|
271
270
|
onComparisonChange: ae
|
|
272
271
|
}),
|
|
273
|
-
onApply:
|
|
274
|
-
onCancel:
|
|
275
|
-
onClear:
|
|
272
|
+
onApply: J,
|
|
273
|
+
onCancel: L,
|
|
274
|
+
onClear: Q,
|
|
276
275
|
captionLayout: "dropdown"
|
|
277
276
|
}
|
|
278
277
|
)
|
|
@@ -281,7 +280,7 @@ const ee = (n, c = "MM/dd/yyyy", t) => {
|
|
|
281
280
|
] });
|
|
282
281
|
}
|
|
283
282
|
);
|
|
284
|
-
|
|
283
|
+
_e.displayName = "WeekPicker";
|
|
285
284
|
export {
|
|
286
|
-
|
|
285
|
+
_e as WeekPicker
|
|
287
286
|
};
|