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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ColDef } from 'ag-grid-community';
|
|
2
|
+
export interface CellRenderersShowcaseRow {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
email: string;
|
|
6
|
+
price: number;
|
|
7
|
+
itemCountPercent: number;
|
|
8
|
+
quantity: number;
|
|
9
|
+
status: string;
|
|
10
|
+
statusColor: string;
|
|
11
|
+
category: string;
|
|
12
|
+
available: boolean;
|
|
13
|
+
featured: boolean;
|
|
14
|
+
description: string;
|
|
15
|
+
startDate: string;
|
|
16
|
+
country: string;
|
|
17
|
+
priority: string;
|
|
18
|
+
tagLabel: string;
|
|
19
|
+
tagColor: string;
|
|
20
|
+
tagVariant: string;
|
|
21
|
+
discount: number;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
export declare function generateCellRendererShowcaseRows(count: number): CellRenderersShowcaseRow[];
|
|
25
|
+
export declare function createCellRendererShowcaseColumnDefs(): ColDef<CellRenderersShowcaseRow>[];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ColDef } from 'ag-grid-community';
|
|
2
|
+
import { CellAddress, CellCommentThread } from './comments';
|
|
3
|
+
export type PlanRow = {
|
|
4
|
+
id: string;
|
|
5
|
+
sku: string;
|
|
6
|
+
product: string;
|
|
7
|
+
category: string;
|
|
8
|
+
region: string;
|
|
9
|
+
location: string;
|
|
10
|
+
inventory: number;
|
|
11
|
+
forecast: number;
|
|
12
|
+
demand: number;
|
|
13
|
+
plannedQuantity: number;
|
|
14
|
+
variance: number;
|
|
15
|
+
status: "On track" | "At risk" | "Shortage";
|
|
16
|
+
owner: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const PLAN_PAGE_SIZE = 12;
|
|
20
|
+
export declare const PLAN_LOCATE_MS = 400;
|
|
21
|
+
export declare const PLAN_ROWS: PlanRow[];
|
|
22
|
+
export declare const PLAN_COLUMNS: ColDef<PlanRow>[];
|
|
23
|
+
export declare function threadKey(address: CellAddress): string;
|
|
24
|
+
export declare function seedThread(input: {
|
|
25
|
+
rowId: string;
|
|
26
|
+
colId: string;
|
|
27
|
+
resolved?: boolean;
|
|
28
|
+
messages: Array<{
|
|
29
|
+
id: string;
|
|
30
|
+
text: string;
|
|
31
|
+
author: string;
|
|
32
|
+
createdAt?: string;
|
|
33
|
+
}>;
|
|
34
|
+
}): CellCommentThread;
|
|
35
|
+
export declare function seedReplyThread(rowId: string, colId: string, replyCount: number): CellCommentThread;
|
|
36
|
+
/** Seed used by Quick Start, panel, and pagination stories — threads live outside rowData. */
|
|
37
|
+
export declare const QUICK_START_SEED: CellCommentThread[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Copy-paste blocks for Data Display / DataTable / Comments Docs tab. Consumer imports only. */
|
|
2
|
+
export declare const COMMENTS_QUICK_START_SOURCE = "import { useCallback, useMemo, useRef, useState } from \"react\";\nimport { DataTable, DataTableContent, DataTableToolbar } from \"impact-nova/data-table\";\nimport {\n CommentModeToggle,\n defaultGetThreadId,\n type CellAddress,\n type CellCommentThread,\n type CommentsPersistEvent,\n type DataTableCommentsConfig,\n} from \"impact-nova/ag-grid-react/comments\";\n\n// Required: stable row identity. Comments attach to { rowId, colId }, not DOM or rowIndex.\n<DataTable className=\"h-[640px]\">\n <DataTableToolbar>\n <CommentModeToggle pressed={commentMode} onPressedChange={setCommentMode} />\n </DataTableToolbar>\n <DataTableContent\n getRowId={(params) => params.data.id}\n columnDefs={columnDefs}\n rowData={rowData}\n comments={comments}\n />\n</DataTable>\n\n// Required comments config \u2014 threads live in YOUR store, never in rowData.\nconst comments: DataTableCommentsConfig = {\n hasIndicator: (address) => unresolvedKeys.has(threadId(address)), // O(1)\n loadThread: async (threadId, address) => store.get(threadId) ?? store.get(threadIdOf(address)),\n persist: async (event) => { /* write event to your backend */ },\n getAuthor: () => currentUserName,\n // Optional: comments list in DataTableSheet\n getSummaries: async ({ cursor, limit, query }) => fetchSummaryPage({ cursor, limit, query }),\n};\n\nfunction threadId(address: CellAddress) {\n return defaultGetThreadId(address); // rowId + \"\\0\" + colId\n}\n";
|
|
3
|
+
export declare const COMMENTS_DISABLED_SOURCE = "import { DataTable, DataTableContent } from \"impact-nova/data-table\";\n\n// Omit comments \u2014 no host, overlay, panel, or presence adapter.\n<DataTable className=\"h-[640px]\">\n <DataTableContent\n getRowId={(params) => params.data.id}\n columnDefs={columnDefs}\n rowData={rowData}\n />\n</DataTable>\n";
|
|
4
|
+
export declare const COMMENTS_ADD_SOURCE = "import { DataTable, DataTableContent } from \"impact-nova/data-table\";\nimport type { DataTableCommentsConfig } from \"impact-nova/ag-grid-react/comments\";\n\nconst comments: DataTableCommentsConfig = {\n hasIndicator,\n loadThread,\n persist, // receives { type: \"add-message\", threadId, address, message }\n getAuthor: () => currentUserName,\n};\n\n<DataTableContent getRowId={(p) => p.data.id} comments={comments} columnDefs={columnDefs} rowData={rowData} />\n\n// Right-click a cell \u2192 Add comment. Comment mode is not required for the context menu.\n";
|
|
5
|
+
export declare const COMMENTS_CLIENT_PAGE_SOURCE = "import { DataTable, DataTableContent } from \"impact-nova/data-table\";\n\n// Client-side row model: all rows are in memory. AG Grid pagination only changes what is painted.\n// Comment identity is still { rowId, colId }. Do not persist page numbers on the thread.\n<DataTableContent\n getRowId={(params) => params.data.id}\n rowData={allRows}\n columnDefs={columnDefs}\n pagination\n paginationPageSize={12}\n comments={comments}\n/>\n\n// Panel click: Nova reads live rowIndex from getRowNode(rowId), then paginationGoToPage + ensureIndexVisible.\n// locateRow is not required when every commented row is already in rowData.\n";
|
|
6
|
+
export declare const COMMENTS_SERVER_PAGE_SOURCE = "import { flushSync } from \"react-dom\";\nimport { DataTable, DataTableContent } from \"impact-nova/data-table\";\nimport type { DataTableCommentsConfig } from \"impact-nova/ag-grid-react/comments\";\n\n// Server / app-paged grid: only the current page is in rowData.\n// Comments still live in a separate store keyed by { rowId, colId }.\n\nconst comments: DataTableCommentsConfig = {\n hasIndicator,\n loadThread,\n persist,\n getAuthor,\n getSummaries,\n locateRow: async (address) => {\n const located = await fetchRowPageForRowId(address.rowId); // your API\n if (!located) return { status: \"missing\" };\n flushSync(() => setRowData(located.pageRows)); // put the page in the grid before reveal\n return { status: \"ready\", rowIndex: located.rowIndex }; // optional live index for SSRM\n },\n};\n\n<DataTableContent\n getRowId={(params) => params.data.id}\n rowData={currentPageRows}\n columnDefs={columnDefs}\n comments={comments}\n/>\n";
|
|
7
|
+
export declare const COMMENTS_CUSTOM_APPEARANCE_SOURCE = "import { DataTable, DataTableContent } from \"impact-nova/data-table\";\n\n// Level 1: comments={config} is enough. No slots, renderers, or providers.\n// Level 2: optional CSS variables on a wrapper. They inherit into the grid.\n<div\n className=\"h-[640px]\"\n style={{\n [\"--iv-comment-indicator-color\"]: \"var(--color-success)\",\n [\"--iv-comment-indicator-size\"]: \"12px\",\n }}\n>\n <DataTable className=\"h-full\">\n <DataTableContent getRowId={(p) => p.data.id} comments={comments} columnDefs={columnDefs} rowData={rowData} />\n </DataTable>\n</div>\n\n// Overlay chrome (portaled): [data-slot=\"comments-popover\"]\n// Message row: [data-slot=\"comments-message\"]\n";
|
|
8
|
+
export declare const COMMENTS_EXTRA_MENU_ACTION_SOURCE = "import { DataTable, DataTableContent } from \"impact-nova/data-table\";\nimport type { DataTableCommentsConfig } from \"impact-nova/ag-grid-react/comments\";\n\nconst comments: DataTableCommentsConfig = {\n hasIndicator,\n loadThread,\n persist,\n getAuthor,\n messageActions: [\n {\n id: \"open\",\n label: \"Open\",\n onSelect: ({ address, message }) => {\n openRecord({ rowId: address.rowId, colId: address.colId, messageId: message.id });\n },\n },\n ],\n};\n\n<DataTableContent getRowId={(p) => p.data.id} comments={comments} columnDefs={columnDefs} rowData={rowData} />\n";
|
|
9
|
+
export declare const COMMENTS_CUSTOM_AVATAR_SOURCE = "import { DataTable, DataTableContent } from \"impact-nova/data-table\";\nimport type { DataTableCommentsConfig } from \"impact-nova/ag-grid-react/comments\";\n\nconst comments: DataTableCommentsConfig = {\n hasIndicator,\n loadThread,\n persist,\n getAuthor,\n renderAvatar: ({ author }) => <YourAvatar name={author} />,\n};\n\n<DataTableContent getRowId={(p) => p.data.id} comments={comments} columnDefs={columnDefs} rowData={rowData} />\n";
|
|
10
|
+
export declare const COMMENTS_CUSTOM_PRESENTATION_SOURCE = "import { DataTable, DataTableContent } from \"impact-nova/data-table\";\nimport type { DataTableCommentsConfig } from \"impact-nova/ag-grid-react/comments\";\n\nconst comments: DataTableCommentsConfig = {\n hasIndicator,\n loadThread,\n persist,\n getAuthor,\n messageActions: [{ id: \"open\", label: \"Open\", onSelect: ({ message }) => openRecord(message.id) }],\n renderAvatar: ({ author }) => <YourAvatar name={author} />,\n renderMessageBody: ({ message }) => <YourMarkdown text={message.text} />,\n renderComposer: ({ value, onChange, onSave, saving, author }) => (\n <YourComposer value={value} onChange={onChange} onSave={onSave} saving={saving} author={author} />\n ),\n renderMessageActions: ({ items }) => (\n <YourMenu items={items} />\n ),\n};\n\n<DataTableContent getRowId={(p) => p.data.id} comments={comments} columnDefs={columnDefs} rowData={rowData} />\n";
|
|
11
|
+
export declare const COMMENTS_PANEL_SOURCE = "import { DataTable, DataTableContent } from \"impact-nova/data-table\";\n\n// Grid pagination \u2260 comment-thread pagination \u2260 comments-panel pagination.\n<DataTableContent\n getRowId={(p) => p.data.id}\n comments={{\n hasIndicator,\n loadThread: (threadId, address, request) =>\n fetchThread(threadId, address, request), // request.purpose: \"preview\" | \"page\"\n persist,\n getAuthor,\n getSummaries: ({ cursor, limit, query }) => fetchCommentList({ cursor, limit, query }),\n }}\n/>\n";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logical grid cell identity and live-DOM lookup.
|
|
3
|
+
* Feature-agnostic: `{ rowId, colId }` plus the currently painted `.ag-cell`.
|
|
4
|
+
*/
|
|
5
|
+
export type GridCellAddress = {
|
|
6
|
+
rowId: string;
|
|
7
|
+
colId: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function cellAddressFromGridEvent(event: {
|
|
10
|
+
node?: {
|
|
11
|
+
id?: string | null;
|
|
12
|
+
} | null;
|
|
13
|
+
column?: {
|
|
14
|
+
getColId?: () => string;
|
|
15
|
+
} | null;
|
|
16
|
+
}): GridCellAddress | undefined;
|
|
17
|
+
export declare function cellElementFromGridEvent(event: {
|
|
18
|
+
eventTarget?: EventTarget | null;
|
|
19
|
+
event?: Event | null;
|
|
20
|
+
}): HTMLElement | null;
|
|
21
|
+
export declare function cellElementFromAddress(container: HTMLElement | null, address: GridCellAddress): HTMLElement | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
function l(e) {
|
|
2
|
+
const n = e.node?.id, r = e.column?.getColId?.();
|
|
3
|
+
if (!(!n || !r))
|
|
4
|
+
return { rowId: n, colId: r };
|
|
5
|
+
}
|
|
6
|
+
function t(e) {
|
|
7
|
+
return e instanceof HTMLElement ? e : e instanceof Node ? e.parentElement : null;
|
|
8
|
+
}
|
|
9
|
+
function c(e) {
|
|
10
|
+
return (t(e.eventTarget) ?? t(e.event?.target))?.closest(".ag-cell") ?? null;
|
|
11
|
+
}
|
|
12
|
+
function d(e, n) {
|
|
13
|
+
if (!e) return null;
|
|
14
|
+
const r = CSS.escape(n.rowId), o = CSS.escape(n.colId);
|
|
15
|
+
return e.querySelector(`.ag-row[row-id="${r}"] .ag-cell[col-id="${o}"]`);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
l as cellAddressFromGridEvent,
|
|
19
|
+
d as cellElementFromAddress,
|
|
20
|
+
c as cellElementFromGridEvent
|
|
21
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type GridRowLocateResult = {
|
|
2
|
+
status: "ready";
|
|
3
|
+
rowIndex?: number;
|
|
4
|
+
} | {
|
|
5
|
+
status: "missing";
|
|
6
|
+
};
|
|
7
|
+
export type GridRowRevealApi = {
|
|
8
|
+
isDestroyed: () => boolean;
|
|
9
|
+
getRowNode: (id: string) => {
|
|
10
|
+
rowIndex: number | null;
|
|
11
|
+
} | undefined | null;
|
|
12
|
+
ensureIndexVisible: (index: number, position?: "top" | "bottom" | "middle" | null) => void;
|
|
13
|
+
ensureColumnVisible?: (key: string, position?: "auto" | "start" | "middle" | "end") => void;
|
|
14
|
+
paginationGetPageSize?: () => number;
|
|
15
|
+
paginationGetCurrentPage?: () => number;
|
|
16
|
+
paginationGoToPage?: (page: number) => void;
|
|
17
|
+
};
|
|
18
|
+
export type RevealGridRowOptions = {
|
|
19
|
+
locateRow?: (rowId: string) => Promise<GridRowLocateResult>;
|
|
20
|
+
pagination?: boolean;
|
|
21
|
+
colId?: string;
|
|
22
|
+
};
|
|
23
|
+
export type RevealGridRowStatus = "revealed" | "filtered" | "missing" | "unloaded";
|
|
24
|
+
/**
|
|
25
|
+
* Locate a row by stable `rowId`. Does not invent a second mechanism —
|
|
26
|
+
* Comments `revealCommentCell` is a cell-shaped wrapper around this.
|
|
27
|
+
*
|
|
28
|
+
* - node + live index → scroll
|
|
29
|
+
* - node + `rowIndex == null` → filtered (never locateRow)
|
|
30
|
+
* - no node + locateRow ready → scroll
|
|
31
|
+
* - no node + locateRow missing → missing
|
|
32
|
+
* - no node + no locateRow → unloaded
|
|
33
|
+
*/
|
|
34
|
+
export declare function revealGridRow(gridApi: GridRowRevealApi | null | undefined, rowId: string, options?: RevealGridRowOptions): Promise<RevealGridRowStatus>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
function c(e, n, o) {
|
|
2
|
+
const t = e.getRowNode(n);
|
|
3
|
+
return t ? t.rowIndex : o ?? null;
|
|
4
|
+
}
|
|
5
|
+
function f(e, n, o) {
|
|
6
|
+
if (!o) return;
|
|
7
|
+
const t = e.paginationGetPageSize?.() ?? 0;
|
|
8
|
+
if (t <= 0 || !e.paginationGoToPage) return;
|
|
9
|
+
const a = Math.floor(n / t);
|
|
10
|
+
e.paginationGetCurrentPage?.() !== a && e.paginationGoToPage(a);
|
|
11
|
+
}
|
|
12
|
+
function d(e, n, o, t) {
|
|
13
|
+
f(e, n, o), e.ensureIndexVisible(n, "middle"), t && e.ensureColumnVisible && e.ensureColumnVisible(t, "middle");
|
|
14
|
+
}
|
|
15
|
+
async function w(e, n, o) {
|
|
16
|
+
if (!e || e.isDestroyed()) return "missing";
|
|
17
|
+
const t = o?.pagination === !0, a = o?.locateRow, l = e.getRowNode(n);
|
|
18
|
+
if (l && l.rowIndex == null) return "filtered";
|
|
19
|
+
let r;
|
|
20
|
+
if (!l) {
|
|
21
|
+
if (!a) return "unloaded";
|
|
22
|
+
const i = await a(n);
|
|
23
|
+
if (e.isDestroyed() || i.status === "missing") return "missing";
|
|
24
|
+
r = i.rowIndex;
|
|
25
|
+
const s = e.getRowNode(n);
|
|
26
|
+
if (s && s.rowIndex == null) return "filtered";
|
|
27
|
+
}
|
|
28
|
+
const u = c(e, n, r);
|
|
29
|
+
return u == null ? "unloaded" : (d(e, u, t, o?.colId), "revealed");
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
w as revealGridRow
|
|
33
|
+
};
|
package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsx as r, jsxs as g, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Dialog as
|
|
1
|
+
import { jsx as r, jsxs as g, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { useState as k } from "react";
|
|
3
|
+
import { Dialog as ee, DialogContent as te, DialogHeader as le, DialogTitle as oe, DialogClose as ne, DialogBody as re, DialogFooter as ae } from "../../../../feedback/dialog/dialog.js";
|
|
4
4
|
import { Button as y } from "../../../../primitives/button/button.js";
|
|
5
|
-
import { Tooltip as
|
|
6
|
-
import { Cross as
|
|
7
|
-
import { useImpactNovaI18n as
|
|
8
|
-
import { ColumnFilterSection as
|
|
5
|
+
import { Tooltip as se, TooltipTrigger as ie, TooltipContent as ce } from "../../../../feedback/tooltip/tooltip.js";
|
|
6
|
+
import { Cross as ue } from "impact-nova-icons";
|
|
7
|
+
import { useImpactNovaI18n as de } from "../../../../../i18n/use-impact-nova-i18n.js";
|
|
8
|
+
import { ColumnFilterSection as H } from "./column-filter-section.js";
|
|
9
9
|
import { generateFilterId as F, createEmptyRule as O } from "../utils/filter-utils.js";
|
|
10
|
-
import {
|
|
11
|
-
const
|
|
10
|
+
import { resolveDateDisplayFormat as P } from "../utils/date-utils.js";
|
|
11
|
+
const q = (L) => {
|
|
12
12
|
const m = {};
|
|
13
|
-
return
|
|
13
|
+
return L.forEach((p) => {
|
|
14
14
|
p.columnId && (m[p.columnId] || (m[p.columnId] = []), m[p.columnId].push(p));
|
|
15
15
|
}), m;
|
|
16
|
-
},
|
|
17
|
-
isOpen:
|
|
16
|
+
}, De = ({
|
|
17
|
+
isOpen: L,
|
|
18
18
|
onClose: m,
|
|
19
19
|
onApply: p,
|
|
20
20
|
columnId: a,
|
|
21
|
-
columnLabel:
|
|
21
|
+
columnLabel: W,
|
|
22
22
|
columnType: C,
|
|
23
|
-
selectOptions:
|
|
24
|
-
isMultiSelect:
|
|
25
|
-
initialModel:
|
|
23
|
+
selectOptions: z,
|
|
24
|
+
isMultiSelect: K,
|
|
25
|
+
initialModel: T,
|
|
26
26
|
api: u
|
|
27
27
|
}) => {
|
|
28
|
-
const { t: d } =
|
|
29
|
-
const e = {}, o =
|
|
28
|
+
const { t: d, dateLocale: S } = de(), A = () => (T?.rules || []).filter((e) => !("logic" in e)), [b, B] = k("column"), [D, j] = k(() => {
|
|
29
|
+
const e = {}, o = T?.columnLogic, l = A(), c = q(l);
|
|
30
30
|
return Object.keys(c).forEach((n) => {
|
|
31
|
-
e[n] = o?.[n] ||
|
|
31
|
+
e[n] = o?.[n] || T?.logic || "OR";
|
|
32
32
|
}), e[a] || (e[a] = o?.[a] || "OR"), e;
|
|
33
|
-
}), [v,
|
|
34
|
-
const e =
|
|
33
|
+
}), [v, E] = k(() => {
|
|
34
|
+
const e = A();
|
|
35
35
|
if (u) {
|
|
36
36
|
const l = u.getFilterModel();
|
|
37
37
|
l && Object.keys(l).forEach((n) => {
|
|
@@ -39,12 +39,12 @@ const M = (k) => {
|
|
|
39
39
|
const t = l[n];
|
|
40
40
|
let s = null;
|
|
41
41
|
if (t.filterType === "date") {
|
|
42
|
-
const i = t,
|
|
42
|
+
const i = t, w = u.getColumn(n)?.getColDef()?.headerComponentParams?.datePickerVariant, f = w === "week" || w === "month", _ = i.type === "inRange" && f ? "equals" : i.type || "equals";
|
|
43
43
|
s = {
|
|
44
44
|
id: F(),
|
|
45
45
|
columnId: n,
|
|
46
46
|
columnType: "date",
|
|
47
|
-
operator:
|
|
47
|
+
operator: _,
|
|
48
48
|
value: i.dateFrom || "",
|
|
49
49
|
valueTo: i.dateTo || ""
|
|
50
50
|
};
|
|
@@ -92,12 +92,12 @@ const M = (k) => {
|
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
return e.some((l) => l.columnId === a) || e.push(O(a, C)), e;
|
|
95
|
-
}), [R] =
|
|
95
|
+
}), [R] = k(() => ({
|
|
96
96
|
allRules: v,
|
|
97
97
|
// Use the computed rules (potentially synced)
|
|
98
98
|
columnLogic: { ...D }
|
|
99
|
-
})),
|
|
100
|
-
|
|
99
|
+
})), Q = JSON.stringify({ allRules: v, columnLogic: D }) !== JSON.stringify(R), J = (e) => v.filter((o) => o.columnId === e), N = (e, o) => {
|
|
100
|
+
E((l) => {
|
|
101
101
|
const c = /* @__PURE__ */ new Set(), n = [];
|
|
102
102
|
l.forEach((s) => {
|
|
103
103
|
c.has(s.columnId) || (c.add(s.columnId), n.push(s.columnId));
|
|
@@ -107,18 +107,18 @@ const M = (k) => {
|
|
|
107
107
|
s === e ? t.push(...o) : t.push(...l.filter((i) => i.columnId === s));
|
|
108
108
|
}), t;
|
|
109
109
|
});
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
b === "column" ? (N(a, [O(a, C)]),
|
|
110
|
+
}, V = (e) => D[e] || "OR", M = (e, o) => {
|
|
111
|
+
j((l) => ({ ...l, [e]: o }));
|
|
112
|
+
}, U = () => {
|
|
113
|
+
b === "column" ? (N(a, [O(a, C)]), M(a, "OR")) : (E([O(a, C)]), j({ [a]: "OR" }));
|
|
114
|
+
}, X = () => {
|
|
115
|
+
E(R.allRules.length > 0 ? R.allRules : [O(a, C)]), j(R.columnLogic);
|
|
114
116
|
}, Y = () => {
|
|
115
|
-
S(R.allRules.length > 0 ? R.allRules : [O(a, C)]), A(R.columnLogic);
|
|
116
|
-
}, K = () => {
|
|
117
117
|
const e = v.filter((o) => o.operator === "empty" || o.operator === "notEmpty" ? !!o.columnId : o.columnId && o.value !== "" && o.value !== null);
|
|
118
118
|
e.length === 0 ? p(null) : p({ logic: "OR", rules: e, columnLogic: { ...D } }), m();
|
|
119
|
-
},
|
|
119
|
+
}, Z = q(v), $ = Object.keys(Z), x = Object.keys(q(
|
|
120
120
|
v.filter((e) => e.operator === "empty" || e.operator === "notEmpty" ? !!e.columnId : e.columnId && e.value !== "" && e.value !== null)
|
|
121
|
-
)).length <= 1,
|
|
121
|
+
)).length <= 1, G = (e, o) => {
|
|
122
122
|
if (!u) return o;
|
|
123
123
|
const l = u.getColumn(e);
|
|
124
124
|
if (!l) return o;
|
|
@@ -131,10 +131,10 @@ const M = (k) => {
|
|
|
131
131
|
const s = c?.headerName || e;
|
|
132
132
|
return n.push(s), n.join(" > ");
|
|
133
133
|
};
|
|
134
|
-
return /* @__PURE__ */ r(
|
|
135
|
-
/* @__PURE__ */ g(
|
|
136
|
-
/* @__PURE__ */ r(
|
|
137
|
-
/* @__PURE__ */ r(
|
|
134
|
+
return /* @__PURE__ */ r(ee, { open: L, onOpenChange: m, children: /* @__PURE__ */ g(te, { className: "w-[800px] max-w-[95vw] max-h-[90vh] flex flex-col p-0", hideClose: !0, children: [
|
|
135
|
+
/* @__PURE__ */ g(le, { className: "flex flex-row items-center justify-between px-4 py-3 pe-4", children: [
|
|
136
|
+
/* @__PURE__ */ r(oe, { children: d("advancedFilter.title") }),
|
|
137
|
+
/* @__PURE__ */ r(ne, { asChild: !0, children: /* @__PURE__ */ r(y, { variant: "ghost", size: "icon", className: "h-8 w-8 p-0 text-content-tertiary hover:text-brand-variant-hover", onClick: m, "aria-label": d("aria.close"), children: /* @__PURE__ */ r(ue, { size: 14 }) }) })
|
|
138
138
|
] }),
|
|
139
139
|
/* @__PURE__ */ g("div", { className: "flex items-center justify-between px-4 py-4 pb-2", children: [
|
|
140
140
|
/* @__PURE__ */ g("div", { className: "inline-flex", role: "group", "data-component": "button-group", children: [
|
|
@@ -146,12 +146,12 @@ const M = (k) => {
|
|
|
146
146
|
variant: "ghost",
|
|
147
147
|
"aria-pressed": b === "column",
|
|
148
148
|
className: `!shadow-none relative border transition-colors min-w-14 !rounded-none !rounded-l-md z-[1] ${b === "column" ? "!bg-accent !border-brand !text-brand z-10" : "!bg-canvas-elevated !border-button-primary-disabled !text-content-secondary hover:!bg-canvas-elevated hover:!text-brand"}`,
|
|
149
|
-
onClick: () =>
|
|
149
|
+
onClick: () => B("column"),
|
|
150
150
|
children: d("advancedFilter.currentColumn")
|
|
151
151
|
}
|
|
152
152
|
),
|
|
153
|
-
/* @__PURE__ */ g(
|
|
154
|
-
/* @__PURE__ */ r(
|
|
153
|
+
/* @__PURE__ */ g(se, { children: [
|
|
154
|
+
/* @__PURE__ */ r(ie, { asChild: !0, children: /* @__PURE__ */ r(
|
|
155
155
|
"span",
|
|
156
156
|
{
|
|
157
157
|
style: {
|
|
@@ -168,79 +168,89 @@ const M = (k) => {
|
|
|
168
168
|
disabled: x,
|
|
169
169
|
style: x ? { pointerEvents: "none" } : void 0,
|
|
170
170
|
className: `!shadow-none relative border transition-colors min-w-14 !rounded-none !rounded-r-md -ml-px ${x ? "!bg-disabled-surface !border-disabled-border !text-disabled-foreground opacity-100" : b === "global" ? "!bg-accent !border-brand !text-brand z-10" : "!bg-canvas-elevated !border-button-primary-disabled !text-content-secondary hover:!bg-canvas-elevated hover:!text-brand z-[1]"}`,
|
|
171
|
-
onClick: () =>
|
|
171
|
+
onClick: () => B("global"),
|
|
172
172
|
children: d("advancedFilter.allFilters")
|
|
173
173
|
}
|
|
174
174
|
)
|
|
175
175
|
}
|
|
176
176
|
) }),
|
|
177
|
-
x && /* @__PURE__ */ r(
|
|
177
|
+
x && /* @__PURE__ */ r(ce, { variant: "tertiary", children: d("advancedFilter.allFiltersDisabledTooltip") })
|
|
178
178
|
] })
|
|
179
179
|
] }),
|
|
180
|
-
/* @__PURE__ */ r(y, { variant: "ghost", onClick:
|
|
180
|
+
/* @__PURE__ */ r(y, { variant: "ghost", onClick: U, className: "!text-brand", children: d("advancedFilter.clearAll") })
|
|
181
181
|
] }),
|
|
182
|
-
/* @__PURE__ */ r(
|
|
182
|
+
/* @__PURE__ */ r(re, { className: "px-0 py-4 flex-1 overflow-y-auto min-h-0", children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-6 w-full px-4", children: b === "column" ? (
|
|
183
183
|
// Column Mode: Single column section
|
|
184
184
|
/* @__PURE__ */ r(
|
|
185
|
-
|
|
185
|
+
H,
|
|
186
186
|
{
|
|
187
187
|
columnId: a,
|
|
188
|
-
columnLabel:
|
|
188
|
+
columnLabel: G(a, W),
|
|
189
189
|
columnType: C,
|
|
190
|
-
selectOptions:
|
|
191
|
-
isMultiSelect:
|
|
192
|
-
rules:
|
|
193
|
-
logic:
|
|
194
|
-
onLogicChange: (e) =>
|
|
190
|
+
selectOptions: z,
|
|
191
|
+
isMultiSelect: z ? !!K : !0,
|
|
192
|
+
rules: J(a),
|
|
193
|
+
logic: V(a),
|
|
194
|
+
onLogicChange: (e) => M(a, e),
|
|
195
195
|
onRulesChange: (e) => N(a, e),
|
|
196
|
-
dateDisplayFormat:
|
|
196
|
+
dateDisplayFormat: (() => {
|
|
197
|
+
if (!u) return P(void 0, S);
|
|
198
|
+
const e = u.getColumn(a);
|
|
199
|
+
return P(
|
|
200
|
+
e?.getColDef()?.headerComponentParams?.dateDisplayFormat,
|
|
201
|
+
S
|
|
202
|
+
);
|
|
203
|
+
})()
|
|
197
204
|
}
|
|
198
205
|
)
|
|
199
206
|
) : (
|
|
200
207
|
// Global Mode: All columns with filters
|
|
201
|
-
/* @__PURE__ */ r(
|
|
208
|
+
/* @__PURE__ */ r(I, { children: $.length === 0 ? /* @__PURE__ */ r("div", { className: "text-center py-8 text-content-placeholder", children: d("advancedFilter.noFiltersApplied") }) : $.map((e, o) => {
|
|
202
209
|
let l = null;
|
|
203
210
|
if (u) {
|
|
204
211
|
const f = u.getColumn(e);
|
|
205
212
|
f && (l = f.getColDef());
|
|
206
213
|
}
|
|
207
|
-
const c = l?.headerComponentParams, n = l?.headerName || e, t =
|
|
214
|
+
const c = l?.headerComponentParams, n = l?.headerName || e, t = G(e, n), s = l?.filter === "agNumberColumnFilter" ? "number" : l?.filter === "agDateColumnFilter" ? "date" : l?.filter === "agMultiColumnFilter" ? "multi" : l?.filter === "agSetColumnFilter" || c?.selectOptions ? "select" : "text", i = c?.selectOptions, h = c?.isMultiSelect, w = P(
|
|
215
|
+
c?.dateDisplayFormat,
|
|
216
|
+
S
|
|
217
|
+
);
|
|
208
218
|
return /* @__PURE__ */ g("div", { children: [
|
|
209
219
|
o > 0 && /* @__PURE__ */ r("hr", { className: "border-stroke-hairline mb-6" }),
|
|
210
220
|
/* @__PURE__ */ r(
|
|
211
|
-
|
|
221
|
+
H,
|
|
212
222
|
{
|
|
213
223
|
columnId: e,
|
|
214
224
|
columnLabel: t,
|
|
215
225
|
columnType: s,
|
|
216
226
|
selectOptions: i,
|
|
217
227
|
isMultiSelect: h,
|
|
218
|
-
rules:
|
|
219
|
-
logic:
|
|
220
|
-
onLogicChange: (f) =>
|
|
228
|
+
rules: J(e),
|
|
229
|
+
logic: V(e),
|
|
230
|
+
onLogicChange: (f) => M(e, f),
|
|
221
231
|
onRulesChange: (f) => N(e, f),
|
|
222
232
|
canDeleteLastRule: !0,
|
|
223
233
|
onDeleteColumnFilter: () => N(e, []),
|
|
224
|
-
dateDisplayFormat:
|
|
234
|
+
dateDisplayFormat: w
|
|
225
235
|
}
|
|
226
236
|
)
|
|
227
237
|
] }, e);
|
|
228
238
|
}) })
|
|
229
239
|
) }) }),
|
|
230
|
-
/* @__PURE__ */ r(
|
|
240
|
+
/* @__PURE__ */ r(ae, { className: "flex justify-end border-t border-stroke-subtle", children: /* @__PURE__ */ g("div", { className: "flex gap-3", children: [
|
|
231
241
|
/* @__PURE__ */ r(
|
|
232
242
|
y,
|
|
233
243
|
{
|
|
234
|
-
onClick:
|
|
244
|
+
onClick: X,
|
|
235
245
|
variant: "secondary",
|
|
236
|
-
disabled: !
|
|
246
|
+
disabled: !Q,
|
|
237
247
|
children: d("advancedFilter.discard")
|
|
238
248
|
}
|
|
239
249
|
),
|
|
240
|
-
/* @__PURE__ */ r(y, { onClick:
|
|
250
|
+
/* @__PURE__ */ r(y, { onClick: Y, variant: "default", children: d("advancedFilter.apply") })
|
|
241
251
|
] }) })
|
|
242
252
|
] }) });
|
|
243
253
|
};
|
|
244
254
|
export {
|
|
245
|
-
|
|
255
|
+
De as AdvancedFilterDialog
|
|
246
256
|
};
|
package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface ColumnFilterSectionProps {
|
|
|
15
15
|
onRulesChange: (rules: AdvancedFilterRule[]) => void;
|
|
16
16
|
canDeleteLastRule?: boolean;
|
|
17
17
|
onDeleteColumnFilter?: () => void;
|
|
18
|
-
/** Display format for dates in this column (date-fns token string).
|
|
18
|
+
/** Display format for dates in this column (date-fns token string). Omitted → locale-derived pattern. */
|
|
19
19
|
dateDisplayFormat?: string;
|
|
20
20
|
}
|
|
21
21
|
/**
|