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,9 +1,4 @@
|
|
|
1
|
-
import { FlatNestedListRow } from './nested-list-virtual-drop';
|
|
2
1
|
import type * as React from "react";
|
|
3
|
-
export interface FlatVirtualRowModel {
|
|
4
|
-
rowCount: number;
|
|
5
|
-
getRowAt: (index: number) => FlatNestedListRow;
|
|
6
|
-
}
|
|
7
2
|
export interface NestedListItem {
|
|
8
3
|
id: string;
|
|
9
4
|
label: string;
|
|
@@ -52,21 +47,9 @@ export interface NestedListProps {
|
|
|
52
47
|
initialCollapsedItems?: Record<string, boolean>;
|
|
53
48
|
onCollapseChange?: (collapsedItems: Record<string, boolean>) => void;
|
|
54
49
|
canDrag?: (item: NestedListItem, level: number) => boolean;
|
|
55
|
-
isValidDropTarget?: (options: {
|
|
56
|
-
activeItemId: string;
|
|
57
|
-
overItemId: string;
|
|
58
|
-
items: NestedListItem[];
|
|
59
|
-
insertAfter?: boolean;
|
|
60
|
-
}) => boolean;
|
|
61
50
|
searchPlaceholder?: string;
|
|
62
51
|
className?: string;
|
|
63
52
|
groupLabel?: string;
|
|
64
53
|
submitButtonLabel?: string;
|
|
65
54
|
cancelButtonLabel?: string;
|
|
66
|
-
dragMode?: NestedListDragMode;
|
|
67
|
-
onVirtualReorder?: (fromIndex: number, toIndex: number) => void;
|
|
68
|
-
onVirtualDrop?: (activeId: string, overId: string, insertAfter: boolean) => void;
|
|
69
|
-
flatVirtualRowResolver?: (searchQuery: string) => FlatVirtualRowModel;
|
|
70
|
-
onFlatVirtualSelectAll?: (shouldSelectAll: boolean) => void;
|
|
71
55
|
}
|
|
72
|
-
export type NestedListDragMode = 'sortable' | 'virtual-index';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { FISCAL_PATTERNS as
|
|
2
|
-
import { toFiscalCalendarConfig as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { FISCAL_PATTERNS as i } from "../../../lib/fiscal-calendar/types.js";
|
|
2
|
+
import { toFiscalCalendarConfig as o } from "../../../lib/fiscal-calendar/week-selection.js";
|
|
3
|
+
import { formatDate as a } from "../../../i18n/format/format-date.js";
|
|
4
|
+
const c = new Date(1900, 0, 1), g = new Date(2100, 11, 31);
|
|
5
|
+
function s(t) {
|
|
6
|
+
return t.fiscalConfig ? t.fiscalConfig : o({
|
|
6
7
|
calendarKind: t.calendarKind,
|
|
7
8
|
fiscalMode: t.fiscalMode,
|
|
8
9
|
fiscalMonthPattern: t.fiscalMonthPattern,
|
|
@@ -10,40 +11,40 @@ function c(t) {
|
|
|
10
11
|
weekStartsOn: t.weekStartsOn
|
|
11
12
|
});
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
+
function d(t) {
|
|
14
15
|
const { calendarKind: n, fiscalMode: r, fiscalMonthPattern: e } = t;
|
|
15
16
|
if (n === "fiscal") {
|
|
16
17
|
if (e) return e;
|
|
17
|
-
if (r === "advanced") return
|
|
18
|
+
if (r === "advanced") return i["4-5-4"];
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function h(t) {
|
|
21
22
|
return Array.from(
|
|
22
23
|
{ length: 12 },
|
|
23
|
-
(n, r) => new Date(2024, r, 1)
|
|
24
|
+
(n, r) => a(new Date(2024, r, 1), t, { month: "long" })
|
|
24
25
|
);
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
+
function A(t) {
|
|
27
28
|
return Array.from(
|
|
28
29
|
{ length: 12 },
|
|
29
|
-
(n, r) => new Date(2024, r, 1)
|
|
30
|
+
(n, r) => a(new Date(2024, r, 1), t, { month: "short" })
|
|
30
31
|
);
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function m(t, n) {
|
|
33
34
|
if (!(t !== "month" && t !== "quarter"))
|
|
34
35
|
return n === "range" || n === "multiple" || n === "multi-range" ? "dual" : "single";
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
+
function D(t, n, r) {
|
|
37
38
|
if (!(t === "month" || t === "quarter" || t === "year"))
|
|
38
39
|
return n === "range" || n === "multiple" || n === "multi-range" || r === "range" || r === "multiple" || r === "multi-range" ? "dual" : "single";
|
|
39
40
|
}
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
g as CALENDAR_DEFAULT_END_MONTH,
|
|
43
|
+
c as CALENDAR_DEFAULT_START_MONTH,
|
|
44
|
+
D as getCalendarDayLayoutAttr,
|
|
45
|
+
m as getCalendarMonthLayoutAttr,
|
|
46
|
+
h as getMonthNamesLong,
|
|
47
|
+
A as getMonthNamesShort,
|
|
48
|
+
s as resolveFiscalConfig,
|
|
49
|
+
d as resolveFiscalPattern
|
|
49
50
|
};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
3
|
import "react-day-picker";
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { useCalendarDayHover as
|
|
4
|
+
import { cn as g } from "../../../lib/utils.js";
|
|
5
|
+
import { Button as p } from "../../primitives/button/button.js";
|
|
6
|
+
import { useCalendarDayHover as v } from "./calendar-day-hover.js";
|
|
7
7
|
import { dayButtonAppearanceClassName as _ } from "./calendar-selection-appearance.js";
|
|
8
8
|
import { selectionKindFromModifiers as y } from "./calendar-selection.js";
|
|
9
|
-
function
|
|
10
|
-
className:
|
|
11
|
-
day:
|
|
9
|
+
function k({
|
|
10
|
+
className: o,
|
|
11
|
+
day: e,
|
|
12
12
|
modifiers: a,
|
|
13
13
|
pickerType: c,
|
|
14
|
-
...
|
|
14
|
+
...n
|
|
15
15
|
}) {
|
|
16
|
-
const
|
|
17
|
-
(
|
|
18
|
-
|
|
16
|
+
const r = v(), d = y(a), l = s.useCallback(
|
|
17
|
+
(t) => {
|
|
18
|
+
t && a.focused && t.focus({ preventScroll: !0 });
|
|
19
19
|
},
|
|
20
20
|
[a.focused]
|
|
21
21
|
);
|
|
22
22
|
return /* @__PURE__ */ u(
|
|
23
|
-
|
|
23
|
+
p,
|
|
24
24
|
{
|
|
25
|
-
...
|
|
25
|
+
...n,
|
|
26
26
|
ref: l,
|
|
27
27
|
tabIndex: a.focused ? 0 : -1,
|
|
28
28
|
variant: "ghost",
|
|
29
29
|
size: "sm",
|
|
30
|
-
"data-day":
|
|
30
|
+
"data-day": `${e.date.getFullYear()}-${String(e.date.getMonth() + 1).padStart(2, "0")}-${String(e.date.getDate()).padStart(2, "0")}`,
|
|
31
31
|
"data-selection": d,
|
|
32
32
|
"data-preview": a.preview || a.preview_cap ? !0 : void 0,
|
|
33
33
|
"data-today": a.today || void 0,
|
|
@@ -36,22 +36,22 @@ function B({
|
|
|
36
36
|
"data-range-end": a.range_end,
|
|
37
37
|
"data-range-middle": a.range_middle,
|
|
38
38
|
"aria-current": a.today ? "date" : void 0,
|
|
39
|
-
className:
|
|
39
|
+
className: g(
|
|
40
40
|
_(d, c === "week" ? "week" : "date"),
|
|
41
|
-
|
|
41
|
+
o
|
|
42
42
|
),
|
|
43
43
|
"data-component": "calendar-day",
|
|
44
|
-
onMouseEnter: (
|
|
45
|
-
|
|
44
|
+
onMouseEnter: (t) => {
|
|
45
|
+
n.onMouseEnter?.(t), r(e.date);
|
|
46
46
|
},
|
|
47
|
-
onMouseLeave: (
|
|
48
|
-
|
|
47
|
+
onMouseLeave: (t) => {
|
|
48
|
+
n.onMouseLeave?.(t), r(void 0);
|
|
49
49
|
},
|
|
50
50
|
"data-period-boundary": a.fiscal_period_start ? "start" : a.fiscal_period_end ? "end" : void 0,
|
|
51
|
-
disabled:
|
|
51
|
+
disabled: n.disabled || a.disabled
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
export {
|
|
56
|
-
|
|
56
|
+
k as CalendarDayButton
|
|
57
57
|
};
|
|
@@ -5,9 +5,10 @@ import { cn as ur } from "../../../lib/utils.js";
|
|
|
5
5
|
import { formatPeriodOption as dr } from "./calendar-fiscal-labels.js";
|
|
6
6
|
import { CalendarDayHoverProvider as gr } from "./calendar-day-hover.js";
|
|
7
7
|
import { previewModifierClassNames as vr, fiscalPeriodBoundaryClassNames as Pr } from "./calendar-day-picker-classnames.js";
|
|
8
|
-
import { isPreviewCap as u, dayKey as l, isPreviewMiddle as
|
|
9
|
-
import { useCalendarDayPickerConfig as
|
|
10
|
-
|
|
8
|
+
import { isPreviewCap as u, dayKey as l, isPreviewMiddle as Dr } from "./calendar-selection.js";
|
|
9
|
+
import { useCalendarDayPickerConfig as _r } from "./use-calendar-day-picker-config.js";
|
|
10
|
+
import { formatDate as yr } from "../../../i18n/format/format-date.js";
|
|
11
|
+
function Fr({
|
|
11
12
|
className: E,
|
|
12
13
|
pickerType: s,
|
|
13
14
|
mode: e,
|
|
@@ -16,18 +17,18 @@ function Br({
|
|
|
16
17
|
granularity: F,
|
|
17
18
|
showOutsideDays: d,
|
|
18
19
|
fixedWeeks: g,
|
|
19
|
-
captionLayout:
|
|
20
|
-
buttonVariant:
|
|
20
|
+
captionLayout: O,
|
|
21
|
+
buttonVariant: V,
|
|
21
22
|
weekStartsOn: v,
|
|
22
|
-
formatters:
|
|
23
|
-
classNames:
|
|
24
|
-
components:
|
|
23
|
+
formatters: Y,
|
|
24
|
+
classNames: k,
|
|
25
|
+
components: L,
|
|
25
26
|
selected: P,
|
|
26
|
-
showFooter:
|
|
27
|
+
showFooter: D,
|
|
27
28
|
showPeriodBoundaries: p,
|
|
28
|
-
pendingSelection:
|
|
29
|
+
pendingSelection: _,
|
|
29
30
|
selectedDaysFromWeeks: R,
|
|
30
|
-
currentMonth:
|
|
31
|
+
currentMonth: y,
|
|
31
32
|
monthsFull: $,
|
|
32
33
|
monthsShort: q,
|
|
33
34
|
weekNumberHeader: z,
|
|
@@ -46,23 +47,23 @@ function Br({
|
|
|
46
47
|
nextMonthLabel: Z,
|
|
47
48
|
monthPlaceholder: W,
|
|
48
49
|
yearPlaceholder: K,
|
|
49
|
-
weekNumberLabel:
|
|
50
|
+
weekNumberLabel: h,
|
|
50
51
|
weekLabel: T,
|
|
51
52
|
fiscalWeekAriaLabel: rr,
|
|
52
53
|
getCellMeta: n,
|
|
53
54
|
formatWeekNumber: or,
|
|
54
|
-
disabled:
|
|
55
|
-
showWeekNumber:
|
|
55
|
+
disabled: j,
|
|
56
|
+
showWeekNumber: H = !0,
|
|
56
57
|
...tr
|
|
57
58
|
}) {
|
|
58
|
-
const { dayPickerClassNames: ar, dayPickerComponents: ir } =
|
|
59
|
-
buttonVariant:
|
|
59
|
+
const { dayPickerClassNames: ar, dayPickerComponents: ir } = _r({
|
|
60
|
+
buttonVariant: V,
|
|
60
61
|
pickerType: s,
|
|
61
62
|
calendarKind: m,
|
|
62
63
|
granularity: F,
|
|
63
64
|
showOutsideDays: d,
|
|
64
|
-
classNames:
|
|
65
|
-
currentMonth:
|
|
65
|
+
classNames: k,
|
|
66
|
+
currentMonth: y,
|
|
66
67
|
monthsFull: $,
|
|
67
68
|
monthsShort: q,
|
|
68
69
|
weekNumberHeader: z,
|
|
@@ -76,40 +77,40 @@ function Br({
|
|
|
76
77
|
nextMonthLabel: Z,
|
|
77
78
|
monthPlaceholder: W,
|
|
78
79
|
yearPlaceholder: K,
|
|
79
|
-
weekNumberLabel:
|
|
80
|
+
weekNumberLabel: h,
|
|
80
81
|
weekLabel: T,
|
|
81
|
-
fiscalWeekNumberLabel:
|
|
82
|
+
fiscalWeekNumberLabel: h,
|
|
82
83
|
fiscalWeekAriaLabel: rr,
|
|
83
84
|
getCellMeta: n,
|
|
84
85
|
onMonthChange: N,
|
|
85
86
|
onWeekSelect: U,
|
|
86
87
|
weekMode: f,
|
|
87
88
|
showPeriodBoundaries: p,
|
|
88
|
-
showWeekNumber:
|
|
89
|
-
disabled:
|
|
90
|
-
components:
|
|
91
|
-
}), er = e === "range" || e === "multiple" || e === "multi-range" || f === "range" || f === "multiple" || f === "multi-range" ? 2 : 1, nr = s === "week" || e === "multi-range" ? "multiple" : e, sr = g || m === "fiscal" || d,
|
|
89
|
+
showWeekNumber: H,
|
|
90
|
+
disabled: j,
|
|
91
|
+
components: L
|
|
92
|
+
}), er = e === "range" || e === "multiple" || e === "multi-range" || f === "range" || f === "multiple" || f === "multi-range" ? 2 : 1, nr = s === "week" || e === "multi-range" ? "multiple" : e, sr = g || m === "fiscal" || d, S = p && n ? {
|
|
92
93
|
fiscal_period_start: (r) => !!n(r)?.isPeriodStart,
|
|
93
94
|
fiscal_period_end: (r) => !!n(r)?.isPeriodEnd
|
|
94
95
|
} : void 0, [t, cr] = B.useState(), fr = B.useCallback((r) => {
|
|
95
96
|
cr((o) => !o && !r || o && r && o.getFullYear() === r.getFullYear() && o.getMonth() === r.getMonth() && o.getDate() === r.getDate() ? o : r);
|
|
96
|
-
}, []), a =
|
|
97
|
+
}, []), a = D ? _ : P, i = e === "range" && a && typeof a == "object" && "from" in a ? a.from : void 0, mr = e === "range" && a && typeof a == "object" && "to" in a ? a.to : void 0;
|
|
97
98
|
return /* @__PURE__ */ x(gr, { onDayHover: fr, children: /* @__PURE__ */ x(
|
|
98
99
|
pr,
|
|
99
100
|
{
|
|
100
101
|
mode: nr,
|
|
101
|
-
selected: s === "week" ? R :
|
|
102
|
+
selected: s === "week" ? R : D ? _ : P,
|
|
102
103
|
onSelect: (...r) => {
|
|
103
104
|
const [o, c] = r;
|
|
104
105
|
Q(o, c instanceof Date ? c : void 0);
|
|
105
106
|
},
|
|
106
|
-
month:
|
|
107
|
+
month: y,
|
|
107
108
|
onMonthChange: N,
|
|
108
109
|
fixedWeeks: g,
|
|
109
110
|
showOutsideDays: sr,
|
|
110
111
|
weekStartsOn: v,
|
|
111
|
-
modifiers: s === "week" ? { ...M, ...
|
|
112
|
-
preview: (r) =>
|
|
112
|
+
modifiers: s === "week" ? { ...M, ...S } : { ...S, ...s === "date" && !!(i && !mr && t) && i && t ? {
|
|
113
|
+
preview: (r) => Dr(r, i, t),
|
|
113
114
|
preview_cap: (r) => u(r, i, t),
|
|
114
115
|
preview_cap_start: (r) => u(r, i, t) && l(t) < l(i),
|
|
115
116
|
preview_cap_end: (r) => u(r, i, t) && l(t) > l(i)
|
|
@@ -125,11 +126,11 @@ function Br({
|
|
|
125
126
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
126
127
|
E
|
|
127
128
|
),
|
|
128
|
-
captionLayout:
|
|
129
|
+
captionLayout: O,
|
|
129
130
|
navLayout: "around",
|
|
130
131
|
startMonth: w,
|
|
131
132
|
endMonth: b,
|
|
132
|
-
disabled:
|
|
133
|
+
disabled: j,
|
|
133
134
|
numberOfMonths: er,
|
|
134
135
|
formatters: {
|
|
135
136
|
formatMonthDropdown: (r) => {
|
|
@@ -138,18 +139,18 @@ function Br({
|
|
|
138
139
|
if (c) return dr(c);
|
|
139
140
|
if (o?.fiscalPeriod != null) return `P${o.fiscalPeriod}`;
|
|
140
141
|
}
|
|
141
|
-
return r
|
|
142
|
+
return yr(r, J, { month: "short" });
|
|
142
143
|
},
|
|
143
144
|
formatWeekNumber: or,
|
|
144
|
-
...
|
|
145
|
+
...Y
|
|
145
146
|
},
|
|
146
147
|
classNames: ar,
|
|
147
148
|
components: ir,
|
|
148
149
|
...tr,
|
|
149
|
-
showWeekNumber:
|
|
150
|
+
showWeekNumber: H
|
|
150
151
|
}
|
|
151
152
|
) });
|
|
152
153
|
}
|
|
153
154
|
export {
|
|
154
|
-
|
|
155
|
+
Fr as CalendarDayPickerView
|
|
155
156
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CivilDate, FiscalCalendarConfig, FyLabelStyle } from '../../../lib/fiscal-calendar';
|
|
2
2
|
import { QuarterSelection, YearSelection } from './calendar.types';
|
|
3
|
-
export declare function formatFiscalYearLabel(fy: number, style?: FyLabelStyle): string;
|
|
4
|
-
export declare function formatYearIntervalCaption(year: number, fiscalConfig?: FiscalCalendarConfig): string;
|
|
5
3
|
export declare function formatPeriodTooltip(period: {
|
|
6
4
|
period: number;
|
|
7
5
|
start: CivilDate;
|
|
8
6
|
end: CivilDate;
|
|
9
|
-
}): string;
|
|
7
|
+
}, locale?: string): string;
|
|
8
|
+
export declare function formatFiscalYearLabel(fy: number, style?: FyLabelStyle): string;
|
|
9
|
+
export declare function formatYearIntervalCaption(year: number, fiscalConfig?: FiscalCalendarConfig): string;
|
|
10
10
|
export declare function formatPeriodCell(period: {
|
|
11
11
|
period: number;
|
|
12
12
|
start: CivilDate;
|
|
@@ -1,90 +1,78 @@
|
|
|
1
|
-
import { formatCivilRange as
|
|
2
|
-
import { formatFyLabel as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"November",
|
|
15
|
-
"December"
|
|
16
|
-
];
|
|
17
|
-
function u(r, t = "fy-short") {
|
|
18
|
-
return c(r, t);
|
|
1
|
+
import { formatCivilRange as u, parseCivilDate as l } from "../../../lib/fiscal-calendar/civil-date.js";
|
|
2
|
+
import { formatFyLabel as y, buildFiscalYear as $ } from "../../../lib/fiscal-calendar/build-year.js";
|
|
3
|
+
import { DEFAULT_LOCALE as s } from "../../../i18n/locale-config.js";
|
|
4
|
+
import { formatDate as a } from "../../../i18n/format/format-date.js";
|
|
5
|
+
function d(t, r, n = s) {
|
|
6
|
+
const e = l(t), o = l(r), f = new Date(e.y, e.m - 1, e.d), m = new Date(o.y, o.m - 1, o.d);
|
|
7
|
+
return e.y === o.y ? `${a(f, n, { month: "long", day: "numeric" })} – ${a(m, n, { month: "long", day: "numeric" })}` : `${a(f, n, { month: "long", day: "numeric", year: "numeric" })} – ${a(m, n, { month: "long", day: "numeric", year: "numeric" })}`;
|
|
8
|
+
}
|
|
9
|
+
function F(t, r = s) {
|
|
10
|
+
return `Period ${t.period} (${d(t.start, t.end, r)})`;
|
|
11
|
+
}
|
|
12
|
+
function i(t, r = "fy-short") {
|
|
13
|
+
return y(t, r);
|
|
19
14
|
}
|
|
20
|
-
function
|
|
21
|
-
if (
|
|
15
|
+
function P(t, r) {
|
|
16
|
+
if (r)
|
|
22
17
|
try {
|
|
23
|
-
const n =
|
|
24
|
-
return `(${
|
|
18
|
+
const n = $(r, t);
|
|
19
|
+
return `(${u(n.start, n.end)})`;
|
|
25
20
|
} catch {
|
|
26
21
|
}
|
|
27
|
-
return `(${
|
|
28
|
-
}
|
|
29
|
-
function $(r, t) {
|
|
30
|
-
const n = l(r), e = l(t);
|
|
31
|
-
return n.y === e.y ? `${a[n.m - 1]} ${n.d} – ${a[e.m - 1]} ${e.d}` : `${a[n.m - 1]} ${n.d} ${n.y} – ${a[e.m - 1]} ${e.d} ${e.y}`;
|
|
32
|
-
}
|
|
33
|
-
function Q(r) {
|
|
34
|
-
return `Period ${r.period} (${$(r.start, r.end)})`;
|
|
22
|
+
return `(${u(`${t}-01-01`, `${t}-12-31`)})`;
|
|
35
23
|
}
|
|
36
|
-
function
|
|
24
|
+
function p(t) {
|
|
37
25
|
return {
|
|
38
|
-
label: `P${
|
|
39
|
-
caption: `(${
|
|
26
|
+
label: `P${t.period}`,
|
|
27
|
+
caption: `(${u(t.start, t.end)})`
|
|
40
28
|
};
|
|
41
29
|
}
|
|
42
|
-
function
|
|
43
|
-
const
|
|
44
|
-
return `${
|
|
30
|
+
function I(t) {
|
|
31
|
+
const r = p(t);
|
|
32
|
+
return `${r.label} ${r.caption}`;
|
|
45
33
|
}
|
|
46
|
-
function
|
|
34
|
+
function Q(t) {
|
|
47
35
|
return {
|
|
48
|
-
label: `Q${
|
|
49
|
-
caption: `(${
|
|
36
|
+
label: `Q${t.quarter}`,
|
|
37
|
+
caption: `(${u(t.start, t.end)})`
|
|
50
38
|
};
|
|
51
39
|
}
|
|
52
|
-
function
|
|
53
|
-
return `P${
|
|
40
|
+
function R(t, r) {
|
|
41
|
+
return `P${t} ${i(r)}`;
|
|
54
42
|
}
|
|
55
|
-
function b(
|
|
56
|
-
return `Q${
|
|
43
|
+
function b(t, r) {
|
|
44
|
+
return `Q${t} ${i(r)}`;
|
|
57
45
|
}
|
|
58
|
-
function
|
|
59
|
-
return
|
|
46
|
+
function A(t) {
|
|
47
|
+
return t.fy != null ? b(t.quarter, t.fy) : `Q${t.quarter} ${t.year}`;
|
|
60
48
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
49
|
+
function C(t, r = "fy-long") {
|
|
50
|
+
return t.fy != null ? i(t.fy, r) : String(t.year);
|
|
63
51
|
}
|
|
64
|
-
const
|
|
52
|
+
const c = [
|
|
65
53
|
{ label: "Q1" },
|
|
66
54
|
{ label: "Q2" },
|
|
67
55
|
{ label: "Q3" },
|
|
68
56
|
{ label: "Q4" }
|
|
69
57
|
];
|
|
70
|
-
function
|
|
71
|
-
if (!
|
|
58
|
+
function E(t, r) {
|
|
59
|
+
if (!r) return c;
|
|
72
60
|
try {
|
|
73
|
-
return
|
|
61
|
+
return $(r, t).quarters.map(Q);
|
|
74
62
|
} catch {
|
|
75
|
-
return
|
|
63
|
+
return c;
|
|
76
64
|
}
|
|
77
65
|
}
|
|
78
66
|
export {
|
|
79
|
-
|
|
67
|
+
R as formatFiscalPeriodInput,
|
|
80
68
|
b as formatFiscalQuarterInput,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
69
|
+
i as formatFiscalYearLabel,
|
|
70
|
+
p as formatPeriodCell,
|
|
71
|
+
I as formatPeriodOption,
|
|
72
|
+
F as formatPeriodTooltip,
|
|
73
|
+
Q as formatQuarterCell,
|
|
74
|
+
A as formatQuarterInput,
|
|
75
|
+
E as formatQuarterLabelsForYear,
|
|
76
|
+
C as formatYearInput,
|
|
77
|
+
P as formatYearIntervalCaption
|
|
90
78
|
};
|