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,19 +1,19 @@
|
|
|
1
1
|
import { jsxs as y, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { Filter as
|
|
2
|
+
import { useRef as Le, useCallback as Z, useState as Je } from "react";
|
|
3
|
+
import { Filter as Qe, Cross as R } from "impact-nova-icons";
|
|
4
4
|
import { cn as Ue } from "../../../../lib/utils.js";
|
|
5
5
|
import { DatePicker as Te } from "../../../forms/date-picker/date-picker.js";
|
|
6
6
|
import { MonthPicker as De } from "../../../forms/date-picker/month-picker.js";
|
|
7
7
|
import { WeekPicker as Ne } from "../../../forms/date-picker/week-picker.js";
|
|
8
8
|
import { Input as q } from "../../../forms/input/input.js";
|
|
9
9
|
import { Select as Pe } from "../../../forms/select/select.js";
|
|
10
|
-
import { Popover as
|
|
11
|
-
import { useImpactNovaI18n as
|
|
12
|
-
import { useGridHeader as
|
|
13
|
-
import { getMultiFilterIndices as
|
|
14
|
-
import {
|
|
15
|
-
import { useHeaderSearchEditingState as
|
|
16
|
-
const
|
|
10
|
+
import { Popover as Xe, PopoverTrigger as Ze, PopoverContent as _e, PopoverHeader as $e, PopoverTitle as et, PopoverBody as tt } from "../../../feedback/popover/popover.js";
|
|
11
|
+
import { useImpactNovaI18n as rt } from "../../../../i18n/use-impact-nova-i18n.js";
|
|
12
|
+
import { useGridHeader as lt } from "./context/grid-header-context.js";
|
|
13
|
+
import { getMultiFilterIndices as z, parseInputPattern as we, mapOperatorToAgGrid as ke } from "./utils/filter-utils.js";
|
|
14
|
+
import { resolveDateDisplayFormat as at, serializeWeek as nt, serializeMonth as ot, serializeDate as it, displayDateToIso as _ } from "./utils/date-utils.js";
|
|
15
|
+
import { useHeaderSearchEditingState as st } from "./use-header-search-editing-state.js";
|
|
16
|
+
const Dt = ({
|
|
17
17
|
column: P,
|
|
18
18
|
api: F,
|
|
19
19
|
onClose: $,
|
|
@@ -22,18 +22,21 @@ const Tt = ({
|
|
|
22
22
|
onAdvanceSearchClick: re,
|
|
23
23
|
toggleAdvanceSearch: le,
|
|
24
24
|
advanceSearchEnabled: Se = !1,
|
|
25
|
-
selectOptions:
|
|
25
|
+
selectOptions: G,
|
|
26
26
|
isMultiSelect: C,
|
|
27
|
-
onSelectScrollToBottom:
|
|
28
|
-
onSelectSearchChange:
|
|
29
|
-
onSelectOpen:
|
|
30
|
-
isLoadingSelect:
|
|
31
|
-
enableSpaceSplitting:
|
|
32
|
-
enableBooleanParsing:
|
|
27
|
+
onSelectScrollToBottom: He,
|
|
28
|
+
onSelectSearchChange: ze,
|
|
29
|
+
onSelectOpen: ae,
|
|
30
|
+
isLoadingSelect: ne,
|
|
31
|
+
enableSpaceSplitting: Be = !1,
|
|
32
|
+
enableBooleanParsing: Ae = !1,
|
|
33
33
|
enableDateParsing: Ie = !1
|
|
34
34
|
}) => {
|
|
35
|
-
const { t: s } =
|
|
36
|
-
|
|
35
|
+
const { t: s, dateLocale: Oe } = rt(), l = P.getColDef(), d = P.getColId(), K = l?.filter || "agTextColumnFilter", M = K === "agDateColumnFilter", V = K === "agSetColumnFilter" || G && G.length > 0 || l?.cellDataType === "boolean", Y = l?.headerComponentParams?.datePickerVariant || "date", B = M && Y === "month", A = M && Y === "week", c = l?.headerComponentParams?.fiscalConfig, x = at(
|
|
36
|
+
l?.headerComponentParams?.dateDisplayFormat,
|
|
37
|
+
Oe
|
|
38
|
+
), oe = lt(), L = Le(null), {
|
|
39
|
+
searchText: J,
|
|
37
40
|
dateDisplayString: I,
|
|
38
41
|
selectedDate: ie,
|
|
39
42
|
selectedMonth: se,
|
|
@@ -41,35 +44,35 @@ const Tt = ({
|
|
|
41
44
|
updateDraft: w,
|
|
42
45
|
handleFocus: p,
|
|
43
46
|
handleBlur: h,
|
|
44
|
-
clearEditingOverlay:
|
|
45
|
-
} =
|
|
47
|
+
clearEditingOverlay: We
|
|
48
|
+
} = st({
|
|
46
49
|
api: F,
|
|
47
50
|
colId: d,
|
|
48
51
|
colDef: l,
|
|
49
52
|
isDateFilter: M,
|
|
50
|
-
isMonthVariant:
|
|
51
|
-
isWeekVariant:
|
|
52
|
-
datePickerVariant:
|
|
53
|
+
isMonthVariant: B,
|
|
54
|
+
isWeekVariant: A,
|
|
55
|
+
datePickerVariant: Y,
|
|
53
56
|
dateDisplayFormat: x
|
|
54
57
|
}), D = (e, t) => {
|
|
55
|
-
const
|
|
58
|
+
const a = (n) => n.replace(/[^0-9.\-+eE]/g, ""), i = (n, E) => {
|
|
56
59
|
const S = we(
|
|
57
|
-
|
|
58
|
-
ze,
|
|
60
|
+
n,
|
|
59
61
|
Be,
|
|
62
|
+
Ae,
|
|
60
63
|
Ie
|
|
61
64
|
);
|
|
62
65
|
if (S.conditions.length === 0) return null;
|
|
63
66
|
const Ce = (u) => {
|
|
64
67
|
let b = ke(u.operator);
|
|
65
|
-
if (
|
|
66
|
-
const Me = parseFloat(
|
|
68
|
+
if (E === "number") {
|
|
69
|
+
const Me = parseFloat(a(u.value));
|
|
67
70
|
return ["contains", "notContains", "startsWith", "endsWith"].includes(
|
|
68
71
|
b
|
|
69
72
|
) && (b = b === "notContains" ? "notEqual" : "equals"), u.operator === "inRange" ? {
|
|
70
73
|
type: b,
|
|
71
|
-
filter: parseFloat(
|
|
72
|
-
filterTo: parseFloat(
|
|
74
|
+
filter: parseFloat(a(u.value)) || 0,
|
|
75
|
+
filterTo: parseFloat(a(u.valueTo || "")) || 0,
|
|
73
76
|
filterType: "number"
|
|
74
77
|
} : isNaN(Me) ? null : { type: b, filter: Me, filterType: "number" };
|
|
75
78
|
}
|
|
@@ -80,18 +83,18 @@ const Tt = ({
|
|
|
80
83
|
filterType: "text"
|
|
81
84
|
};
|
|
82
85
|
};
|
|
83
|
-
let
|
|
86
|
+
let H = null;
|
|
84
87
|
if (S.conditions.length === 1)
|
|
85
|
-
|
|
88
|
+
H = Ce(S.conditions[0]);
|
|
86
89
|
else {
|
|
87
90
|
const u = S.conditions.map(Ce).filter((b) => b !== null);
|
|
88
|
-
u.length === 0 ?
|
|
89
|
-
filterType:
|
|
91
|
+
u.length === 0 ? H = null : u.length === 1 ? H = u[0] : H = {
|
|
92
|
+
filterType: E,
|
|
90
93
|
operator: S.logic,
|
|
91
94
|
conditions: u
|
|
92
95
|
};
|
|
93
96
|
}
|
|
94
|
-
return
|
|
97
|
+
return H;
|
|
95
98
|
};
|
|
96
99
|
let o = null;
|
|
97
100
|
if (!(e === null || e === "" || Array.isArray(e) && e.length === 0))
|
|
@@ -101,33 +104,33 @@ const Tt = ({
|
|
|
101
104
|
filterType: "set"
|
|
102
105
|
};
|
|
103
106
|
else if (t === "date")
|
|
104
|
-
if (
|
|
105
|
-
const
|
|
107
|
+
if (A && e && typeof e == "object" && "startDate" in e && "endDate" in e) {
|
|
108
|
+
const n = nt(e);
|
|
106
109
|
o = {
|
|
107
110
|
type: "inRange",
|
|
108
|
-
dateFrom:
|
|
109
|
-
dateTo:
|
|
111
|
+
dateFrom: n.dateFrom,
|
|
112
|
+
dateTo: n.dateTo,
|
|
110
113
|
filterType: "date"
|
|
111
114
|
};
|
|
112
|
-
} else if (
|
|
113
|
-
const
|
|
115
|
+
} else if (B && e && typeof e == "object" && "month" in e && "year" in e) {
|
|
116
|
+
const n = ot(e);
|
|
114
117
|
o = {
|
|
115
118
|
type: "inRange",
|
|
116
|
-
dateFrom:
|
|
117
|
-
dateTo:
|
|
119
|
+
dateFrom: n.dateFrom,
|
|
120
|
+
dateTo: n.dateTo,
|
|
118
121
|
filterType: "date"
|
|
119
122
|
};
|
|
120
123
|
} else {
|
|
121
|
-
const
|
|
122
|
-
o =
|
|
124
|
+
const n = e instanceof Date ? it(e) : null;
|
|
125
|
+
o = n ? { type: "equals", dateFrom: n, filterType: "date" } : null;
|
|
123
126
|
}
|
|
124
127
|
else {
|
|
125
|
-
const
|
|
126
|
-
o = i(String(e),
|
|
128
|
+
const n = l.filter === "agMultiColumnFilter" ? z(l) : null, E = n ? n.text !== -1 ? "text" : "number" : K === "agNumberColumnFilter" ? "number" : "text";
|
|
129
|
+
o = i(String(e), E);
|
|
127
130
|
}
|
|
128
|
-
const f = l.filter === "agMultiColumnFilter" ?
|
|
129
|
-
|
|
130
|
-
},
|
|
131
|
+
const f = l.filter === "agMultiColumnFilter" ? z(l) : null, T = f ? t === "text" ? f.text !== -1 ? f.text : f.number : t === "set" ? f.set : f.date : 0;
|
|
132
|
+
U(o, T);
|
|
133
|
+
}, Q = (e) => {
|
|
131
134
|
if (ee) {
|
|
132
135
|
ee(Array.isArray(e) ? e.join(",") : e);
|
|
133
136
|
return;
|
|
@@ -135,31 +138,31 @@ const Tt = ({
|
|
|
135
138
|
D(e, M ? "date" : "text");
|
|
136
139
|
}, de = (e) => {
|
|
137
140
|
const t = e.target.value;
|
|
138
|
-
w({ searchText: t }),
|
|
141
|
+
w({ searchText: t }), Q(t);
|
|
139
142
|
}, ue = (e) => {
|
|
140
|
-
w({ selectedDate: e }),
|
|
143
|
+
w({ selectedDate: e }), Q(e);
|
|
141
144
|
}, fe = (e) => {
|
|
142
145
|
w({ selectedMonth: e }), D(e || null, "date");
|
|
143
146
|
}, pe = (e) => {
|
|
144
147
|
w({ selectedWeek: e }), D(e || null, "date");
|
|
145
|
-
},
|
|
148
|
+
}, je = (e) => {
|
|
146
149
|
if (!e.trim()) return null;
|
|
147
150
|
const t = we(e, !1, !1, !1);
|
|
148
151
|
if (t.conditions.length === 0) return null;
|
|
149
|
-
const
|
|
152
|
+
const a = (o) => {
|
|
150
153
|
let v = ke(o.operator);
|
|
151
154
|
if (["contains", "notContains", "startsWith", "endsWith"].includes(
|
|
152
155
|
v
|
|
153
156
|
) && (v = v === "notContains" ? "notEqual" : "equals"), o.operator === "inRange") {
|
|
154
|
-
let T =
|
|
155
|
-
return !T || !
|
|
157
|
+
let T = _(o.value, x), n = _(o.valueTo || "", x);
|
|
158
|
+
return !T || !n ? null : (T > n && ([T, n] = [n, T]), {
|
|
156
159
|
type: "inRange",
|
|
157
160
|
dateFrom: T,
|
|
158
|
-
dateTo:
|
|
161
|
+
dateTo: n,
|
|
159
162
|
filterType: "date"
|
|
160
163
|
});
|
|
161
164
|
}
|
|
162
|
-
const f =
|
|
165
|
+
const f = _(o.value, x);
|
|
163
166
|
return f ? {
|
|
164
167
|
type: v,
|
|
165
168
|
dateFrom: f,
|
|
@@ -167,19 +170,19 @@ const Tt = ({
|
|
|
167
170
|
} : null;
|
|
168
171
|
};
|
|
169
172
|
if (t.conditions.length === 1)
|
|
170
|
-
return
|
|
171
|
-
const i = t.conditions.map(
|
|
173
|
+
return a(t.conditions[0]);
|
|
174
|
+
const i = t.conditions.map(a).filter((o) => o !== null);
|
|
172
175
|
return i.length === 0 ? null : i.length === 1 ? i[0] : {
|
|
173
176
|
filterType: "date",
|
|
174
177
|
operator: t.logic,
|
|
175
178
|
conditions: i
|
|
176
179
|
};
|
|
177
|
-
},
|
|
180
|
+
}, U = Z(
|
|
178
181
|
(e, t) => {
|
|
179
|
-
const
|
|
182
|
+
const a = F.getFilterModel(), i = { ...a };
|
|
180
183
|
if (l.filter === "agMultiColumnFilter") {
|
|
181
184
|
if (t === -1) return;
|
|
182
|
-
const o =
|
|
185
|
+
const o = a[d], v = o && o.filterType === "multi" ? [...o.filterModels || []] : Array(l.filterParams?.filters?.length || 1).fill(null);
|
|
183
186
|
v[t] = e, v.every((f) => f === null) ? delete i[d] : i[d] = {
|
|
184
187
|
filterType: "multi",
|
|
185
188
|
filterModels: v
|
|
@@ -189,34 +192,34 @@ const Tt = ({
|
|
|
189
192
|
F.setFilterModel(i);
|
|
190
193
|
},
|
|
191
194
|
[F, d, l]
|
|
192
|
-
), he =
|
|
195
|
+
), he = Z(
|
|
193
196
|
(e) => {
|
|
194
|
-
const t = l.filter === "agMultiColumnFilter" ?
|
|
195
|
-
|
|
197
|
+
const t = l.filter === "agMultiColumnFilter" ? z(l).date : 0;
|
|
198
|
+
U(e, t);
|
|
196
199
|
},
|
|
197
|
-
[l,
|
|
200
|
+
[l, U]
|
|
198
201
|
), me = (e) => {
|
|
199
202
|
const t = e.target.value.replace(/[^0-9/\-!=><+,~]/g, "");
|
|
200
203
|
if (w({ dateDisplayString: t }), !t.trim()) {
|
|
201
204
|
he(null);
|
|
202
205
|
return;
|
|
203
206
|
}
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
},
|
|
207
|
-
|
|
207
|
+
const a = je(t);
|
|
208
|
+
a && he(a);
|
|
209
|
+
}, X = () => {
|
|
210
|
+
We(), Q(""), te && te();
|
|
208
211
|
}, O = (e) => {
|
|
209
212
|
D(e, "set");
|
|
210
|
-
}, W =
|
|
213
|
+
}, W = G || (l?.cellDataType === "boolean" ? [
|
|
211
214
|
{ label: s("gridHeader.true"), value: "true" },
|
|
212
215
|
{ label: s("gridHeader.false"), value: "false" }
|
|
213
|
-
] : []), ge =
|
|
216
|
+
] : []), ge = Z(() => {
|
|
214
217
|
const e = F.getFilterModel()[d];
|
|
215
218
|
if (!e) return [];
|
|
216
219
|
if ("filterType" in e && e.filterType === "multi" && e.filterModels) {
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
const i = e.filterModels[
|
|
220
|
+
const a = z(P.getColDef()).set;
|
|
221
|
+
if (a !== -1) {
|
|
222
|
+
const i = e.filterModels[a];
|
|
220
223
|
if (i?.filterType === "set" && i.values)
|
|
221
224
|
return i.values.filter((o) => o != null);
|
|
222
225
|
}
|
|
@@ -227,12 +230,12 @@ const Tt = ({
|
|
|
227
230
|
return [String(e.filter)];
|
|
228
231
|
}
|
|
229
232
|
return [];
|
|
230
|
-
}, [F, d, P]), [
|
|
231
|
-
const e =
|
|
233
|
+
}, [F, d, P]), [j, k] = Je(null), ve = () => {
|
|
234
|
+
const e = j !== null ? j : ge();
|
|
232
235
|
return C ? W.filter((t) => e.includes(t.value)) : W.find((t) => e.includes(t.value)) || null;
|
|
233
236
|
}, ye = (e) => {
|
|
234
237
|
let t = [];
|
|
235
|
-
if (Array.isArray(e) ? t = e.map((
|
|
238
|
+
if (Array.isArray(e) ? t = e.map((a) => a.value) : e && typeof e == "object" && "value" in e && (t = [e.value]), !C) {
|
|
236
239
|
O(t), e && $();
|
|
237
240
|
return;
|
|
238
241
|
}
|
|
@@ -243,14 +246,14 @@ const Tt = ({
|
|
|
243
246
|
if (C) {
|
|
244
247
|
if (e !== void 0) {
|
|
245
248
|
let t = [];
|
|
246
|
-
Array.isArray(e) ? t = e.map((
|
|
249
|
+
Array.isArray(e) ? t = e.map((a) => a.value) : e && typeof e == "object" && "value" in e ? t = [e.value] : e === null && (t = []), O(t), k(null);
|
|
247
250
|
return;
|
|
248
251
|
}
|
|
249
|
-
|
|
252
|
+
j !== null && (O(j), k(null));
|
|
250
253
|
}
|
|
251
|
-
},
|
|
252
|
-
k(ge()),
|
|
253
|
-
},
|
|
254
|
+
}, qe = () => {
|
|
255
|
+
k(ge()), ae && ae();
|
|
256
|
+
}, Ge = () => Se ? /* @__PURE__ */ r(
|
|
254
257
|
"svg",
|
|
255
258
|
{
|
|
256
259
|
className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover shrink-0",
|
|
@@ -265,19 +268,19 @@ const Tt = ({
|
|
|
265
268
|
},
|
|
266
269
|
children: /* @__PURE__ */ r("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" })
|
|
267
270
|
}
|
|
268
|
-
) : null,
|
|
271
|
+
) : null, Ke = () => /* @__PURE__ */ r(
|
|
269
272
|
"button",
|
|
270
273
|
{
|
|
271
274
|
onClick: $,
|
|
272
275
|
className: "cursor-pointer shrink-0 text-brand hover:text-brand-strong",
|
|
273
|
-
children: /* @__PURE__ */ r(
|
|
276
|
+
children: /* @__PURE__ */ r(R, { size: "xs" })
|
|
274
277
|
}
|
|
275
|
-
), N = l.filter === "agMultiColumnFilter", m =
|
|
278
|
+
), N = l.filter === "agMultiColumnFilter", m = z(l);
|
|
276
279
|
let g = "text";
|
|
277
|
-
N ? g = m.set !== -1 ? "set" : m.date !== -1 ? "date" : "text" :
|
|
278
|
-
const
|
|
279
|
-
const
|
|
280
|
-
return e !== null &&
|
|
280
|
+
N ? g = m.set !== -1 ? "set" : m.date !== -1 ? "date" : "text" : V ? g = "set" : M && (g = "date");
|
|
281
|
+
const Ve = N ? m.text !== -1 || m.number !== -1 : !M && !V, xe = N ? m.set !== -1 : V, be = N ? m.date !== -1 : M, Ye = F.getFilterModel()[d], Fe = N && Ye?.filterModels?.some((e, t) => {
|
|
282
|
+
const a = t === m.text || t === m.number ? "text" : t === m.set ? "set" : "date";
|
|
283
|
+
return e !== null && a !== g;
|
|
281
284
|
});
|
|
282
285
|
return /* @__PURE__ */ y("div", { className: "ag-header-cell-label flex items-center gap-1 w-full bg-brand-tint px-1 py-2 ag-header-cell-search-active h-full", children: [
|
|
283
286
|
g === "set" && xe ? /* @__PURE__ */ r(
|
|
@@ -293,12 +296,12 @@ const Tt = ({
|
|
|
293
296
|
menuWidth: "200px",
|
|
294
297
|
menuPortalTarget: document.body,
|
|
295
298
|
autoFocus: !0,
|
|
296
|
-
onMenuOpen:
|
|
299
|
+
onMenuOpen: qe,
|
|
297
300
|
onMenuClose: Re,
|
|
298
|
-
onMenuScrollToBottom:
|
|
299
|
-
onInputChange:
|
|
301
|
+
onMenuScrollToBottom: He,
|
|
302
|
+
onInputChange: ze,
|
|
300
303
|
onClearAll: Ee,
|
|
301
|
-
isLoading:
|
|
304
|
+
isLoading: ne,
|
|
302
305
|
onFocus: p,
|
|
303
306
|
onBlur: h
|
|
304
307
|
}
|
|
@@ -316,14 +319,14 @@ const Tt = ({
|
|
|
316
319
|
"button",
|
|
317
320
|
{
|
|
318
321
|
onClick: (e) => {
|
|
319
|
-
e.stopPropagation(),
|
|
322
|
+
e.stopPropagation(), X();
|
|
320
323
|
},
|
|
321
324
|
className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover",
|
|
322
|
-
children: /* @__PURE__ */ r(
|
|
325
|
+
children: /* @__PURE__ */ r(R, { size: "xs" })
|
|
323
326
|
}
|
|
324
327
|
)
|
|
325
328
|
}
|
|
326
|
-
) :
|
|
329
|
+
) : A ? /* @__PURE__ */ r(
|
|
327
330
|
Ne,
|
|
328
331
|
{
|
|
329
332
|
value: ce || void 0,
|
|
@@ -341,7 +344,7 @@ const Tt = ({
|
|
|
341
344
|
fiscalYearStartMonth: c?.fiscalYearStartMonth,
|
|
342
345
|
weekStartsOn: c?.weekStartsOn
|
|
343
346
|
}
|
|
344
|
-
) :
|
|
347
|
+
) : B ? /* @__PURE__ */ r(
|
|
345
348
|
De,
|
|
346
349
|
{
|
|
347
350
|
value: se || void 0,
|
|
@@ -371,7 +374,7 @@ const Tt = ({
|
|
|
371
374
|
) : /* @__PURE__ */ r(
|
|
372
375
|
q,
|
|
373
376
|
{
|
|
374
|
-
value:
|
|
377
|
+
value: J,
|
|
375
378
|
onChange: de,
|
|
376
379
|
placeholder: s("filter.search"),
|
|
377
380
|
type: "text",
|
|
@@ -379,21 +382,21 @@ const Tt = ({
|
|
|
379
382
|
ref: L,
|
|
380
383
|
onFocus: p,
|
|
381
384
|
onBlur: h,
|
|
382
|
-
suffix:
|
|
385
|
+
suffix: J && /* @__PURE__ */ r(
|
|
383
386
|
"button",
|
|
384
387
|
{
|
|
385
388
|
onClick: (e) => {
|
|
386
|
-
e.stopPropagation(),
|
|
389
|
+
e.stopPropagation(), X();
|
|
387
390
|
},
|
|
388
391
|
className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover",
|
|
389
|
-
children: /* @__PURE__ */ r(
|
|
392
|
+
children: /* @__PURE__ */ r(R, { size: "xs" })
|
|
390
393
|
}
|
|
391
394
|
)
|
|
392
395
|
}
|
|
393
396
|
),
|
|
394
397
|
/* @__PURE__ */ y("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
395
|
-
N && /* @__PURE__ */ y(
|
|
396
|
-
/* @__PURE__ */ r(
|
|
398
|
+
N && /* @__PURE__ */ y(Xe, { children: [
|
|
399
|
+
/* @__PURE__ */ r(Ze, { asChild: !0, children: /* @__PURE__ */ y(
|
|
397
400
|
"button",
|
|
398
401
|
{
|
|
399
402
|
type: "button",
|
|
@@ -401,7 +404,7 @@ const Tt = ({
|
|
|
401
404
|
className: "relative group p-1 hover:bg-brand-tint rounded-md transition-colors cursor-pointer bg-transparent border-none",
|
|
402
405
|
children: [
|
|
403
406
|
/* @__PURE__ */ r(
|
|
404
|
-
|
|
407
|
+
Qe,
|
|
405
408
|
{
|
|
406
409
|
size: "md",
|
|
407
410
|
className: Ue(
|
|
@@ -414,15 +417,15 @@ const Tt = ({
|
|
|
414
417
|
]
|
|
415
418
|
}
|
|
416
419
|
) }),
|
|
417
|
-
/* @__PURE__ */ y(
|
|
418
|
-
/* @__PURE__ */ r(
|
|
419
|
-
/* @__PURE__ */ y(
|
|
420
|
-
g !== "text" &&
|
|
420
|
+
/* @__PURE__ */ y(_e, { align: "end", className: "w-[300px]", children: [
|
|
421
|
+
/* @__PURE__ */ r($e, { children: /* @__PURE__ */ r(et, { children: s("gridHeader.activeFilters") }) }),
|
|
422
|
+
/* @__PURE__ */ y(tt, { className: "flex flex-col gap-4", children: [
|
|
423
|
+
g !== "text" && Ve && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
|
|
421
424
|
/* @__PURE__ */ r("span", { className: "text-xs font-semibold text-content-tertiary", children: s("gridHeader.textSearch") }),
|
|
422
425
|
/* @__PURE__ */ r(
|
|
423
426
|
q,
|
|
424
427
|
{
|
|
425
|
-
value:
|
|
428
|
+
value: J,
|
|
426
429
|
onChange: de,
|
|
427
430
|
placeholder: s("filter.searchPlaceholder"),
|
|
428
431
|
className: "bg-canvas-elevated",
|
|
@@ -442,7 +445,7 @@ const Tt = ({
|
|
|
442
445
|
isMulti: C !== void 0 ? C : l?.cellDataType !== "boolean",
|
|
443
446
|
placeholder: s("filter.select"),
|
|
444
447
|
className: "w-full bg-canvas-elevated",
|
|
445
|
-
isLoading:
|
|
448
|
+
isLoading: ne,
|
|
446
449
|
onFocus: p,
|
|
447
450
|
onBlur: h
|
|
448
451
|
}
|
|
@@ -462,14 +465,14 @@ const Tt = ({
|
|
|
462
465
|
"button",
|
|
463
466
|
{
|
|
464
467
|
onClick: (e) => {
|
|
465
|
-
e.stopPropagation(),
|
|
468
|
+
e.stopPropagation(), X();
|
|
466
469
|
},
|
|
467
470
|
className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover",
|
|
468
|
-
children: /* @__PURE__ */ r(
|
|
471
|
+
children: /* @__PURE__ */ r(R, { size: "xs" })
|
|
469
472
|
}
|
|
470
473
|
)
|
|
471
474
|
}
|
|
472
|
-
) :
|
|
475
|
+
) : A ? /* @__PURE__ */ r(
|
|
473
476
|
Ne,
|
|
474
477
|
{
|
|
475
478
|
value: ce || void 0,
|
|
@@ -484,7 +487,7 @@ const Tt = ({
|
|
|
484
487
|
fiscalYearStartMonth: c?.fiscalYearStartMonth,
|
|
485
488
|
weekStartsOn: c?.weekStartsOn
|
|
486
489
|
}
|
|
487
|
-
) :
|
|
490
|
+
) : B ? /* @__PURE__ */ r(
|
|
488
491
|
De,
|
|
489
492
|
{
|
|
490
493
|
value: se || void 0,
|
|
@@ -510,11 +513,11 @@ const Tt = ({
|
|
|
510
513
|
] })
|
|
511
514
|
] })
|
|
512
515
|
] }),
|
|
513
|
-
|
|
514
|
-
|
|
516
|
+
Ge(),
|
|
517
|
+
Ke()
|
|
515
518
|
] })
|
|
516
519
|
] });
|
|
517
520
|
};
|
|
518
521
|
export {
|
|
519
|
-
|
|
522
|
+
Dt as HeaderSearchInput
|
|
520
523
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MonthSelection, WeekSelection } from '../../../../data-display/calendar';
|
|
2
|
-
/**
|
|
2
|
+
/** Fallback when no locale is available (non-React utils / explicit US tests). */
|
|
3
3
|
export declare const DEFAULT_DATE_DISPLAY_FORMAT = "MM/dd/yyyy";
|
|
4
|
+
export declare function resolveDateDisplayFormat(explicit: string | undefined, locale: string): string;
|
|
4
5
|
/**
|
|
5
6
|
* Convert a MonthSelection to an AG Grid inRange date filter range.
|
|
6
7
|
* Returns { dateFrom: 'YYYY-MM-01', dateTo: 'YYYY-MM-lastDay' }.
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { parse as c, isValid as f, format as g } from "date-fns";
|
|
2
|
+
import { getLocalizedDatePattern as y } from "../../../../../i18n/format/date-pattern.js";
|
|
2
3
|
const D = "MM/dd/yyyy";
|
|
3
|
-
function
|
|
4
|
+
function m(t, n) {
|
|
5
|
+
return t && t.length > 0 ? t : y(n);
|
|
6
|
+
}
|
|
7
|
+
function M(t) {
|
|
4
8
|
if (t.start && t.end) {
|
|
5
9
|
const s = t.start, u = t.end, o = (p) => String(p).padStart(2, "0");
|
|
6
10
|
return {
|
|
@@ -14,7 +18,7 @@ function d(t) {
|
|
|
14
18
|
dateTo: `${n}-${a}-${String(r).padStart(2, "0")}`
|
|
15
19
|
};
|
|
16
20
|
}
|
|
17
|
-
function
|
|
21
|
+
function N(t) {
|
|
18
22
|
if (!t || typeof t != "string") return null;
|
|
19
23
|
const n = t.split(" ")[0].split("T")[0], [e, r] = n.split("-").map(Number);
|
|
20
24
|
return isNaN(e) || isNaN(r) ? null : { year: e, month: r - 1 };
|
|
@@ -29,43 +33,43 @@ function l(t) {
|
|
|
29
33
|
const n = t.split(" ")[0].split("T")[0], [e, r, a] = n.split("-").map(Number);
|
|
30
34
|
return isNaN(e) || isNaN(r) || isNaN(a) ? null : new Date(e, r - 1, a);
|
|
31
35
|
}
|
|
32
|
-
function
|
|
36
|
+
function T() {
|
|
33
37
|
return i(/* @__PURE__ */ new Date());
|
|
34
38
|
}
|
|
35
|
-
function
|
|
39
|
+
function h() {
|
|
36
40
|
const t = /* @__PURE__ */ new Date();
|
|
37
41
|
return t.setDate(t.getDate() - 1), i(t);
|
|
38
42
|
}
|
|
39
|
-
function
|
|
43
|
+
function F(t, n = D) {
|
|
40
44
|
if (!t || typeof t != "string") return null;
|
|
41
45
|
const e = c(t, n, /* @__PURE__ */ new Date());
|
|
42
46
|
return f(e) ? g(e, "yyyy-MM-dd") : null;
|
|
43
47
|
}
|
|
44
|
-
function
|
|
48
|
+
function S(t, n = D) {
|
|
45
49
|
if (!t || typeof t != "string") return "";
|
|
46
50
|
const e = t.split(" ")[0].split("T")[0], r = c(e, "yyyy-MM-dd", /* @__PURE__ */ new Date());
|
|
47
51
|
return f(r) ? g(r, n) : "";
|
|
48
52
|
}
|
|
49
|
-
function
|
|
53
|
+
function w(t) {
|
|
50
54
|
return {
|
|
51
55
|
from: `${t}-01-01`,
|
|
52
56
|
to: `${t}-12-31`
|
|
53
57
|
};
|
|
54
58
|
}
|
|
55
|
-
function
|
|
59
|
+
function z(t, n) {
|
|
56
60
|
const e = new Date(n, t, 0).getDate(), r = String(t).padStart(2, "0");
|
|
57
61
|
return {
|
|
58
62
|
from: `${n}-${r}-01`,
|
|
59
63
|
to: `${n}-${r}-${e}`
|
|
60
64
|
};
|
|
61
65
|
}
|
|
62
|
-
function
|
|
66
|
+
function Y(t) {
|
|
63
67
|
return {
|
|
64
68
|
dateFrom: i(t.startDate),
|
|
65
69
|
dateTo: i(t.endDate)
|
|
66
70
|
};
|
|
67
71
|
}
|
|
68
|
-
function
|
|
72
|
+
function A(t, n) {
|
|
69
73
|
if (!t || !n) return null;
|
|
70
74
|
const e = l(t), r = l(n);
|
|
71
75
|
return !e || !r ? null : {
|
|
@@ -79,15 +83,16 @@ function w(t, n) {
|
|
|
79
83
|
export {
|
|
80
84
|
D as DEFAULT_DATE_DISPLAY_FORMAT,
|
|
81
85
|
l as deserializeDate,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
N as deserializeMonth,
|
|
87
|
+
A as deserializeWeek,
|
|
88
|
+
F as displayDateToIso,
|
|
89
|
+
z as getMonthRange,
|
|
90
|
+
T as getTodayStr,
|
|
91
|
+
w as getYearRange,
|
|
92
|
+
h as getYesterdayStr,
|
|
93
|
+
S as isoToDisplay,
|
|
94
|
+
m as resolveDateDisplayFormat,
|
|
90
95
|
i as serializeDate,
|
|
91
|
-
|
|
92
|
-
|
|
96
|
+
M as serializeMonth,
|
|
97
|
+
Y as serializeWeek
|
|
93
98
|
};
|
|
@@ -65,7 +65,7 @@ export declare function hasAdvancedPatternSyntax(input: string): boolean;
|
|
|
65
65
|
* Detects ISO date strings and formats them using the given dateFormat.
|
|
66
66
|
*
|
|
67
67
|
* @param rule - The filter rule to format
|
|
68
|
-
* @param dateFormat - The date-fns display format for date values
|
|
68
|
+
* @param dateFormat - The date-fns display format for date values. Callers that omit this should pass a locale-derived pattern.
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* formatRuleForDisplay({ operator: 'contains', value: 'john' }) // 'john'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AgGridWrapperProps } from './ag-grid.types';
|
|
2
2
|
import { subscribeGridApiEvent, subscribeGridApiEvents } from './grid-api-event-subscription';
|
|
3
3
|
export { subscribeGridApiEvent, subscribeGridApiEvents };
|
|
4
|
-
export declare function AgGridWrapper<TData>({ children, defaultColDef, defaultColGroupDef, columnDefs, valueFormatters, onGridReady: userOnGridReady, onGridPreDestroyed: userOnGridPreDestroyed, onFilterChanged: userOnFilterChanged, onSelectionChanged: userOnSelectionChanged, onModelUpdated: userOnModelUpdated, ensureDomOrder, autoSizeStrategy, tooltipShowMode, tooltipShowDelay, tooltipHideDelay, tooltipInteraction, themeOverride, ...restProps }: AgGridWrapperProps<TData> & {
|
|
4
|
+
export declare function AgGridWrapper<TData>({ children, defaultColDef, defaultColGroupDef, columnDefs, valueFormatters, onGridReady: userOnGridReady, onGridPreDestroyed: userOnGridPreDestroyed, onFilterChanged: userOnFilterChanged, onSelectionChanged: userOnSelectionChanged, onModelUpdated: userOnModelUpdated, onCellMouseOver: userOnCellMouseOver, onCellMouseOut: userOnCellMouseOut, onCellClicked: userOnCellClicked, getContextMenuItems: userGetContextMenuItems, comments, notes, chat, ensureDomOrder, autoSizeStrategy, tooltipShowMode, tooltipShowDelay, tooltipHideDelay, tooltipInteraction, themeOverride, ...restProps }: AgGridWrapperProps<TData> & {
|
|
5
5
|
className?: string;
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export { useAgGridTruncationTooltip } from './use-ag-grid-truncation-tooltip';
|