impact-nova 2.1.0-alpha.1 → 2.1.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +3 -0
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +6 -0
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +21 -21
- package/dist/components/data/ag-grid-react/build-ag-grid-theme.d.ts +3 -0
- package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.js +1 -1
- package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.d.ts +1 -2
- package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.js +12 -6
- package/dist/components/data/ag-grid-react/cell-renderers/editors/input-cell-editor.js +58 -58
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-editor.js +73 -94
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.d.ts +53 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.js +98 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/textarea-cell-editor.js +19 -19
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +1 -1
- package/dist/components/data/ag-grid-react/cell-renderers/switch-display-renderer.js +15 -15
- package/dist/components/data/ag-grid-react/column-indicator-sync-bus.d.ts +9 -0
- package/dist/components/data/ag-grid-react/column-indicator-sync-bus.js +15 -0
- package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +1 -1
- package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.js +33 -33
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +80 -73
- package/dist/components/data/ag-grid-react/headers/components/header-info.js +66 -62
- package/dist/components/data/ag-grid-react/headers/components/info-modal.js +6 -6
- package/dist/components/data/ag-grid-react/headers/components/section-renderers.js +18 -18
- package/dist/components/data/ag-grid-react/headers/custom-header.js +112 -108
- package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.d.ts +12 -0
- package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.js +31 -0
- package/dist/components/data/ag-grid-react/headers/header-search-active-state.d.ts +10 -0
- package/dist/components/data/ag-grid-react/headers/header-search-active-state.js +38 -0
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +87 -91
- package/dist/components/data/ag-grid-react/index.d.ts +3 -1
- package/dist/components/data/ag-grid-react/index.js +191 -167
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +7 -0
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.js +7 -0
- package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.d.ts +3 -0
- package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.js +10 -0
- package/dist/components/data/ag-grid-react/theme.d.ts +1 -0
- package/dist/components/data/ag-grid-react/theme.js +92 -18
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.d.ts +5 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.js +13 -0
- package/dist/components/data/ag-grid-react/useGridAutoSizeStrategyOnResize.js +8 -5
- package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +14 -0
- package/dist/components/data/data-table/build-column-tree-from-grid.js +95 -0
- package/dist/components/data/data-table/column-indicator.d.ts +1 -1
- package/dist/components/data/data-table/column-indicator.js +15 -11
- package/dist/components/data/data-table/data-table-column-apply.d.ts +29 -0
- package/dist/components/data/data-table/data-table-column-apply.js +102 -0
- package/dist/components/data/data-table/data-table-column-def-pin.d.ts +30 -0
- package/dist/components/data/data-table/data-table-column-def-pin.js +66 -0
- package/dist/components/data/data-table/data-table-column-list-sync.d.ts +8 -0
- package/dist/components/data/data-table/data-table-column-list-sync.js +15 -0
- package/dist/components/data/data-table/data-table-column-list.d.ts +14 -4
- package/dist/components/data/data-table/data-table-column-list.js +74 -277
- package/dist/components/data/data-table/data-table-constants.d.ts +3 -4
- package/dist/components/data/data-table/data-table-context.d.ts +3 -6
- package/dist/components/data/data-table/data-table-context.js +21 -10
- package/dist/components/data/data-table/data-table-saved-views.js +61 -61
- package/dist/components/data/data-table/data-table-sheet-portal-store.d.ts +13 -0
- package/dist/components/data/data-table/data-table-sheet-portal-store.js +36 -0
- package/dist/components/data/data-table/data-table-sheet.d.ts +3 -6
- package/dist/components/data/data-table/data-table-sheet.js +19 -19
- package/dist/components/data/data-table/data-table-view-menu.js +40 -40
- package/dist/components/data/data-table/data-table.d.ts +8 -10
- package/dist/components/data/data-table/data-table.js +141 -109
- package/dist/components/data/data-table/data-table.types.d.ts +41 -0
- package/dist/components/data/data-table/index.js +28 -27
- package/dist/components/data/data-table/indicator-legend.d.ts +13 -2
- package/dist/components/data/data-table/indicator-legend.js +19 -16
- package/dist/components/data/data-table/pin-switch.js +9 -9
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +16 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +225 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.d.ts +8 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +72 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-context.d.ts +13 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-context.js +25 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.d.ts +6 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +41 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.d.ts +31 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +233 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-preset.d.ts +18 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-preset.js +133 -0
- package/dist/components/data/expandable-list-item/expandable-list-item.d.ts +5 -0
- package/dist/components/data/{expandable-sku/expandable-sku.types.d.ts → expandable-list-item/expandable-list-item.types.d.ts} +7 -7
- package/dist/components/data/expandable-list-item/index.d.ts +5 -0
- package/dist/components/data/expandable-list-item/index.js +19 -0
- package/dist/components/data/nested-list/components/NestedListHeader.js +11 -11
- package/dist/components/data/nested-list/components/SortableItem.d.ts +3 -1
- package/dist/components/data/nested-list/components/SortableItem.js +111 -109
- package/dist/components/data/nested-list/nested-list-change-detection.d.ts +11 -0
- package/dist/components/data/nested-list/nested-list-change-detection.js +13 -0
- package/dist/components/data/nested-list/nested-list.js +107 -97
- package/dist/components/data-display/avatar/avatar.types.d.ts +2 -0
- package/dist/components/data-display/badge/badge.types.d.ts +2 -0
- package/dist/components/data-display/calendar/calendar-day-picker-classnames.js +11 -11
- package/dist/components/data-display/calendar/calendar-month-picker-panel.js +7 -7
- package/dist/components/data-display/calendar/calendar-week-number-cell.js +31 -31
- package/dist/components/data-display/calendar/calendar.d.ts +1 -1
- package/dist/components/data-display/calendar/calendar.js +194 -189
- package/dist/components/data-display/card/card.js +8 -8
- package/dist/components/data-display/chart/chart-palette.d.ts +16 -0
- package/dist/components/data-display/chart/chart-palette.js +28 -0
- package/dist/components/data-display/chart/chart.js +121 -115
- package/dist/components/data-display/chart/chart.types.d.ts +9 -0
- package/dist/components/data-display/chart/chart.utils.js +9 -6
- package/dist/components/data-display/chart/index.d.ts +1 -0
- package/dist/components/data-display/chart/index.js +15 -9
- package/dist/components/data-display/chart/resolve-highcharts-options.d.ts +3 -0
- package/dist/components/data-display/chart/resolve-highcharts-options.js +35 -0
- package/dist/components/data-display/skeleton/skeleton.js +6 -6
- package/dist/components/data-display/statistics-card/statistics-card.color.d.ts +6 -0
- package/dist/components/data-display/statistics-card/statistics-card.color.js +19 -0
- package/dist/components/data-display/statistics-card/statistics-card.hooks.js +50 -48
- package/dist/components/data-display/statistics-card/statistics-card.js +135 -154
- package/dist/components/feedback/alert-dialog/alert-dialog.js +10 -10
- package/dist/components/feedback/dialog/dialog.js +4 -4
- package/dist/components/feedback/drawer/drawer.js +30 -30
- package/dist/components/feedback/dropdown-menu/dropdown-menu.js +68 -55
- package/dist/components/feedback/popover/popover.js +8 -1
- package/dist/components/feedback/sheet/sheet.js +9 -9
- package/dist/components/feedback/sheet/sheet.variants.js +1 -1
- package/dist/components/feedback/toast/toast.js +83 -92
- package/dist/components/feedback/tooltip/tooltip.js +22 -22
- package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
- package/dist/components/flows/command-palette/command-palette-context.types.d.ts +5 -0
- package/dist/components/flows/command-palette/command-palette.d.ts +4 -16
- package/dist/components/flows/command-palette/command-palette.js +226 -239
- package/dist/components/flows/command-palette/command-palette.types.d.ts +9 -0
- package/dist/components/flows/command-palette/shortcut-overlay.js +6 -6
- package/dist/components/flows/command-palette/shortcut-settings.js +34 -34
- package/dist/components/flows/filter-panel/filter-panel.d.ts +3 -2
- package/dist/components/flows/filter-panel/filter-panel.js +99 -104
- package/dist/components/flows/filter-strip/filter-strip.js +36 -29
- package/dist/components/flows/filter-strip/filter-summary.js +43 -43
- package/dist/components/flows/filter-strip/filter-tag-list.js +52 -52
- package/dist/components/flows/notification-panel/notification-list.js +17 -17
- package/dist/components/flows/notification-panel/notification-panel.js +4 -4
- package/dist/components/flows/notification-panel/notification-panel.types.d.ts +3 -0
- package/dist/components/flows/wizard/wizard.js +29 -29
- package/dist/components/forms/choice-card/choice-card.d.ts +2 -2
- package/dist/components/forms/choice-card/choice-card.js +156 -166
- package/dist/components/forms/combobox/combobox.js +83 -83
- package/dist/components/forms/date-picker/date-picker.js +42 -41
- package/dist/components/forms/date-picker/date-range-picker.js +3 -3
- package/dist/components/forms/date-picker/month-picker.js +1 -1
- package/dist/components/forms/date-picker/month-range-picker.js +42 -42
- package/dist/components/forms/date-picker/week-picker.js +15 -15
- package/dist/components/forms/date-picker/week-range-picker.js +3 -3
- package/dist/components/forms/file-upload/file-upload.js +322 -206
- package/dist/components/forms/file-upload/file-upload.types.d.ts +17 -2
- package/dist/components/forms/input/input.js +8 -8
- package/dist/components/forms/input/input.variants.js +3 -3
- package/dist/components/forms/prompt/prompt.js +47 -48
- package/dist/components/forms/select/components/SelectAllRow.js +14 -14
- package/dist/components/forms/select/components/SelectMenuFooter.js +12 -12
- package/dist/components/forms/select/components/SelectMenuHeader.js +44 -44
- package/dist/components/forms/select/components/SelectMenuListBody.js +22 -22
- package/dist/components/forms/select/components/SelectMenuPanel.d.ts +1 -2
- package/dist/components/forms/select/components/SelectMenuPanel.js +22 -24
- package/dist/components/forms/select/components/SelectOptionRow.js +62 -62
- package/dist/components/forms/select/components/SelectTrigger.d.ts +9 -6
- package/dist/components/forms/select/components/SelectTrigger.js +119 -116
- package/dist/components/forms/select/components/Submenu.js +7 -7
- package/dist/components/forms/select/hooks/useSelectKeyboardHandlers.d.ts +1 -1
- package/dist/components/forms/select/hooks/useSelectValueState.d.ts +19 -0
- package/dist/components/forms/select/hooks/useSelectValueState.js +41 -0
- package/dist/components/forms/select/index.js +4 -3
- package/dist/components/forms/select/select.d.ts +5 -4
- package/dist/components/forms/select/select.js +190 -182
- package/dist/components/forms/select/select.types.d.ts +95 -203
- package/dist/components/forms/select/select.variants.js +5 -5
- package/dist/components/forms/select/utils/select.d.ts +2 -1
- package/dist/components/forms/select/utils/select.js +47 -37
- package/dist/components/forms/slider/slider.js +17 -17
- package/dist/components/forms/smart-input/smart-input.js +49 -49
- package/dist/components/forms/textarea/textarea.js +25 -25
- package/dist/components/layout/breadcrumb/breadcrumb.js +112 -118
- package/dist/components/layout/header/header.d.ts +5 -17
- package/dist/components/layout/header/header.js +127 -123
- package/dist/components/layout/header/header.types.d.ts +3 -0
- package/dist/components/layout/horizontal-scroller/index.d.ts +1 -0
- package/dist/components/layout/horizontal-scroller/index.js +3 -2
- package/dist/components/layout/sidebar/sidebar.d.ts +10 -51
- package/dist/components/layout/sidebar/sidebar.js +19 -17
- package/dist/components/layout/sidebar/sidebar.types.d.ts +35 -1
- package/dist/components/layout/sidebar/sidebar.variants.js +1 -1
- package/dist/components/primitives/accordion/accordion.js +38 -41
- package/dist/components/primitives/button-group/button-group.js +32 -32
- package/dist/components/primitives/chips/chips.variants.js +5 -5
- package/dist/components/primitives/empty-container/empty-container.types.d.ts +3 -0
- package/dist/components/primitives/kbd/kbd.variants.js +4 -4
- package/dist/components/primitives/stepper/stepper.js +6 -6
- package/dist/components/primitives/tag/tag.variants.js +2 -2
- package/dist/components/ui/local-raster-icons/assets/excel-error-icon.webp.js +4 -0
- package/dist/components/ui/local-raster-icons/assets/file-upload-error.webp.js +4 -0
- package/dist/components/ui/local-raster-icons/rasterIcons.d.ts +2 -0
- package/dist/components/ui/local-raster-icons/rasterIcons.js +32 -22
- package/dist/components/ui/show.d.ts +10 -0
- package/dist/components/ui/show.js +7 -0
- package/dist/components/ui/show.types.d.ts +5 -0
- package/dist/i18n/defaultMessages.d.ts +19 -0
- package/dist/i18n/defaultMessages.js +27 -13
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +14 -0
- package/dist/i18n/locales/es.js +14 -0
- package/dist/i18n/locales/hi.js +14 -0
- package/dist/i18n/locales/kn.js +14 -0
- package/dist/impact-nova-base.scss +14 -7
- package/dist/impact-nova-components.css +257 -21
- package/dist/impact-nova-tokens.scss +359 -179
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +535 -493
- package/dist/lib/compose-refs.d.ts +8 -0
- package/dist/lib/compose-refs.js +14 -0
- package/dist/lib/primitives/create-component.d.ts +1 -1
- package/dist/lib/primitives/create-component.js +4 -4
- package/dist/lib/primitives/field.js +17 -18
- package/dist/lib/primitives/field.types.d.ts +8 -2
- package/dist/lib/resolve-design-token-color.d.ts +5 -0
- package/dist/lib/resolve-design-token-color.js +12 -0
- package/dist/lib/virtualized/index.d.ts +3 -0
- package/dist/lib/virtualized/index.js +33 -16
- package/dist/lib/virtualized/useVirtualizedList.d.ts +2 -0
- package/dist/lib/virtualized/useVirtualizedList.js +115 -109
- package/dist/lib/virtualized/virtualized-list-context.d.ts +12 -0
- package/dist/lib/virtualized/virtualized-list-context.js +21 -0
- package/dist/lib/virtualized/virtualized-list-parts.d.ts +50 -0
- package/dist/lib/virtualized/virtualized-list-parts.js +175 -0
- package/dist/lib/virtualized/virtualized-list-utils.d.ts +5 -0
- package/dist/lib/virtualized/virtualized-list-utils.js +6 -0
- package/dist/lib/virtualized/virtualized.types.d.ts +10 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- 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/tailwind.config.js +320 -0
- package/dist/theme/tailwind-colors.js +201 -0
- package/dist/theme/tokens/chart-series-palette.json.d.ts +53 -0
- package/dist/theme/tokens/chart-series-palette.json.js +7 -0
- package/package.json +58 -270
- package/tailwind.config.d.ts +3 -0
- package/dist/components/data/ag-grid-react/headers/components/truncated-text.d.ts +0 -15
- package/dist/components/data/ag-grid-react/headers/components/truncated-text.js +0 -27
- package/dist/components/data/ag-grid-react/headers/custom-header-group.d.ts +0 -10
- package/dist/components/data/ag-grid-react/headers/custom-header-group.js +0 -47
- package/dist/components/data/expandable-sku/expandable-sku.d.ts +0 -38
- package/dist/components/data/expandable-sku/expandable-sku.js +0 -245
- package/dist/components/data/expandable-sku/index.d.ts +0 -2
- package/dist/components/data/expandable-sku/index.js +0 -4
- package/tailwind.config.js +0 -334
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ColDef } from 'ag-grid-enterprise';
|
|
2
|
+
import { SplitConfig, SplitCellValue } from '../types';
|
|
3
|
+
export type SplitCellDocumentState = {
|
|
4
|
+
__splitCellLastClickY?: number;
|
|
5
|
+
__splitCellLastActiveIndex?: number;
|
|
6
|
+
__splitCellLastWasEditable?: boolean;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* True when edit was started by keyboard (Enter/F2/type-to-edit), not mouse click.
|
|
10
|
+
* eventKey wins over stale __splitCellLastClickY left by a prior mousedown that did not edit.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isSplitCellKeyboardEntry(eventKey: string | null | undefined, documentState: SplitCellDocumentState): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Call from colDef.suppressKeyboardEvent before AG Grid evaluates editable().
|
|
15
|
+
* Clears stale click coordinates so Enter/F2/type-to-edit use keyboard focus rules.
|
|
16
|
+
*/
|
|
17
|
+
export declare function prepareSplitCellKeyboardEditStart(eventKey: string, isEditing: boolean): void;
|
|
18
|
+
export type SplitCellFocusMeta = {
|
|
19
|
+
index: number;
|
|
20
|
+
wasEditable: boolean;
|
|
21
|
+
clearClickY: boolean;
|
|
22
|
+
activeIndex?: number;
|
|
23
|
+
};
|
|
24
|
+
type ResolveSplitEditable = (splits: SplitConfig[], index: number, data: unknown, colDef: ColDef | undefined, value: SplitCellValue | undefined) => boolean;
|
|
25
|
+
export declare function computeSplitCellFocusMeta(options: {
|
|
26
|
+
cellElement?: HTMLElement;
|
|
27
|
+
splits?: SplitConfig[];
|
|
28
|
+
isKeyboardEntry: boolean;
|
|
29
|
+
eventKey: string | null | undefined;
|
|
30
|
+
data: unknown;
|
|
31
|
+
colDef: ColDef | undefined;
|
|
32
|
+
value: SplitCellValue | undefined;
|
|
33
|
+
documentState: SplitCellDocumentState;
|
|
34
|
+
resolveSplitEditable: ResolveSplitEditable;
|
|
35
|
+
}): SplitCellFocusMeta;
|
|
36
|
+
export type SplitCellFocusSession = {
|
|
37
|
+
targetSplitIndex: number;
|
|
38
|
+
isKeyboardEntry: boolean;
|
|
39
|
+
lastWasEditable: boolean;
|
|
40
|
+
targetIsNonEditable: boolean;
|
|
41
|
+
};
|
|
42
|
+
export declare function initializeSplitCellFocusSession(options: {
|
|
43
|
+
cellElement?: HTMLElement;
|
|
44
|
+
splits?: SplitConfig[];
|
|
45
|
+
eventKey: string | null | undefined;
|
|
46
|
+
data: unknown;
|
|
47
|
+
colDef: ColDef | undefined;
|
|
48
|
+
value: SplitCellValue | undefined;
|
|
49
|
+
documentState: SplitCellDocumentState;
|
|
50
|
+
resolveSplitEditable: ResolveSplitEditable;
|
|
51
|
+
}): SplitCellFocusSession;
|
|
52
|
+
export declare function applySplitCellFocusMeta(documentState: SplitCellDocumentState, focusMeta: SplitCellFocusMeta): void;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
function x(e, l) {
|
|
2
|
+
return e != null && e !== "" ? !0 : l.__splitCellLastClickY == null;
|
|
3
|
+
}
|
|
4
|
+
function _(e, l, a, n, s, i) {
|
|
5
|
+
for (let t = 0; t < e.length; t++)
|
|
6
|
+
if (s(e, t, l, a, n))
|
|
7
|
+
return i.__splitCellLastActiveIndex = t, i.__splitCellLastWasEditable = !0, { index: t, wasEditable: !0, clearClickY: !1 };
|
|
8
|
+
return i.__splitCellLastWasEditable = !1, { index: 0, wasEditable: !1, clearClickY: !1 };
|
|
9
|
+
}
|
|
10
|
+
function b(e, l, a, n, s, i) {
|
|
11
|
+
const t = i.__splitCellLastActiveIndex;
|
|
12
|
+
if (t != null && t >= 0 && t < e.length) {
|
|
13
|
+
const r = s(e, t, l, a, n);
|
|
14
|
+
return i.__splitCellLastWasEditable = r, { index: t, wasEditable: r, clearClickY: !1 };
|
|
15
|
+
}
|
|
16
|
+
return _(e, l, a, n, s, i);
|
|
17
|
+
}
|
|
18
|
+
function p(e, l, a, n, s, i, t) {
|
|
19
|
+
const r = t.__splitCellLastClickY;
|
|
20
|
+
if (r == null)
|
|
21
|
+
return { index: 0, wasEditable: !0, clearClickY: !1 };
|
|
22
|
+
const c = e.getBoundingClientRect(), d = r - c.top, u = c.height / l.length, f = Math.floor(d / u), C = Math.max(0, Math.min(f, l.length - 1)), o = i(l, C, a, n, s);
|
|
23
|
+
return t.__splitCellLastClickY = void 0, t.__splitCellLastActiveIndex = C, t.__splitCellLastWasEditable = o, {
|
|
24
|
+
index: C,
|
|
25
|
+
wasEditable: o,
|
|
26
|
+
clearClickY: !1,
|
|
27
|
+
activeIndex: void 0
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function E(e) {
|
|
31
|
+
const {
|
|
32
|
+
cellElement: l,
|
|
33
|
+
splits: a,
|
|
34
|
+
isKeyboardEntry: n,
|
|
35
|
+
eventKey: s,
|
|
36
|
+
data: i,
|
|
37
|
+
colDef: t,
|
|
38
|
+
value: r,
|
|
39
|
+
documentState: c,
|
|
40
|
+
resolveSplitEditable: d
|
|
41
|
+
} = e;
|
|
42
|
+
return !l || !a?.length ? { index: 0, wasEditable: !0, clearClickY: !1 } : n ? s === "Tab" ? b(
|
|
43
|
+
a,
|
|
44
|
+
i,
|
|
45
|
+
t,
|
|
46
|
+
r,
|
|
47
|
+
d,
|
|
48
|
+
c
|
|
49
|
+
) : _(
|
|
50
|
+
a,
|
|
51
|
+
i,
|
|
52
|
+
t,
|
|
53
|
+
r,
|
|
54
|
+
d,
|
|
55
|
+
c
|
|
56
|
+
) : p(
|
|
57
|
+
l,
|
|
58
|
+
a,
|
|
59
|
+
i,
|
|
60
|
+
t,
|
|
61
|
+
r,
|
|
62
|
+
d,
|
|
63
|
+
c
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
const L = {
|
|
67
|
+
index: 0,
|
|
68
|
+
wasEditable: !0,
|
|
69
|
+
clearClickY: !1
|
|
70
|
+
};
|
|
71
|
+
function k(e) {
|
|
72
|
+
const { documentState: l, eventKey: a } = e, n = x(a, l);
|
|
73
|
+
n && (l.__splitCellLastClickY = void 0);
|
|
74
|
+
const s = l.__splitCellLastWasEditable !== !1;
|
|
75
|
+
let i = L;
|
|
76
|
+
try {
|
|
77
|
+
i = E({
|
|
78
|
+
...e,
|
|
79
|
+
isKeyboardEntry: n
|
|
80
|
+
}), v(l, i);
|
|
81
|
+
} catch {
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
targetSplitIndex: i.index,
|
|
85
|
+
isKeyboardEntry: n,
|
|
86
|
+
lastWasEditable: s,
|
|
87
|
+
targetIsNonEditable: !i.wasEditable
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function v(e, l) {
|
|
91
|
+
l.clearClickY && (e.__splitCellLastClickY = void 0), l.activeIndex != null && (e.__splitCellLastActiveIndex = l.activeIndex), e.__splitCellLastWasEditable = l.wasEditable;
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
v as applySplitCellFocusMeta,
|
|
95
|
+
E as computeSplitCellFocusMeta,
|
|
96
|
+
k as initializeSplitCellFocusSession,
|
|
97
|
+
x as isSplitCellKeyboardEntry
|
|
98
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as o, jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
const y =
|
|
1
|
+
import { jsxs as o, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as x, useRef as h, useState as b, useImperativeHandle as v, useCallback as s } from "react";
|
|
3
|
+
const y = x((u, d) => {
|
|
4
4
|
const {
|
|
5
5
|
value: a,
|
|
6
6
|
rows: i = 4,
|
|
7
|
-
maxLength:
|
|
7
|
+
maxLength: r,
|
|
8
8
|
placeholder: c
|
|
9
|
-
} = u,
|
|
9
|
+
} = u, t = h(null), [n, f] = b(a != null ? String(a) : "");
|
|
10
10
|
v(d, () => ({
|
|
11
11
|
getValue() {
|
|
12
12
|
return n;
|
|
@@ -21,37 +21,37 @@ const y = g((u, d) => {
|
|
|
21
21
|
return !0;
|
|
22
22
|
},
|
|
23
23
|
afterGuiAttached() {
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
const e =
|
|
27
|
-
|
|
24
|
+
if (t.current) {
|
|
25
|
+
t.current.focus();
|
|
26
|
+
const e = t.current.value.length;
|
|
27
|
+
t.current.setSelectionRange(e, e);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}));
|
|
31
|
-
const
|
|
31
|
+
const g = s((e) => {
|
|
32
32
|
const l = e.target.value;
|
|
33
|
-
|
|
34
|
-
}, [
|
|
33
|
+
r && l.length > r || f(l);
|
|
34
|
+
}, [r]), m = s((e) => {
|
|
35
35
|
e.key !== "Escape" && e.key !== "Tab" && (e.key === "Enter" && !e.shiftKey || e.stopPropagation());
|
|
36
36
|
}, []);
|
|
37
37
|
return /* @__PURE__ */ o("div", { className: "p-1 bg-canvas-elevated border border-brand rounded-md shadow-lg min-w-[250px]", children: [
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ p(
|
|
39
39
|
"textarea",
|
|
40
40
|
{
|
|
41
|
-
ref:
|
|
41
|
+
ref: t,
|
|
42
42
|
value: n,
|
|
43
|
-
onChange:
|
|
44
|
-
onKeyDown:
|
|
43
|
+
onChange: g,
|
|
44
|
+
onKeyDown: m,
|
|
45
45
|
placeholder: c,
|
|
46
46
|
rows: i,
|
|
47
|
-
maxLength:
|
|
47
|
+
maxLength: r,
|
|
48
48
|
className: "w-full px-2 py-1.5 text-sm font-medium bg-canvas-elevated border border-field rounded focus:outline-none focus:border-brand resize-y"
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
|
-
|
|
51
|
+
r && /* @__PURE__ */ o("div", { className: "text-right text-xs text-secondary-foreground px-1 mt-0.5", children: [
|
|
52
52
|
n.length,
|
|
53
53
|
"/",
|
|
54
|
-
|
|
54
|
+
r
|
|
55
55
|
] })
|
|
56
56
|
] });
|
|
57
57
|
});
|
|
@@ -18,7 +18,7 @@ const h = (u) => {
|
|
|
18
18
|
className: `flex w-full items-center justify-between rounded-[8px] px-1.5 h-7 ${t ? "bg-canvas-elevated cursor-pointer" : "bg-inherit"}`,
|
|
19
19
|
children: [
|
|
20
20
|
/* @__PURE__ */ n("span", { className: `truncate text-sm font-medium text-content ${f ? "text-content-empty" : ""}`, children: f ? b : d }),
|
|
21
|
-
t && /* @__PURE__ */ n(g, { className: "h-3.5 w-3.5 shrink-0 rotate-90 text-content-
|
|
21
|
+
t && /* @__PURE__ */ n(g, { className: "h-3.5 w-3.5 shrink-0 rotate-90 text-content-icon" })
|
|
22
22
|
]
|
|
23
23
|
}
|
|
24
24
|
)
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { jsxs as b, jsx as
|
|
1
|
+
import { jsxs as b, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback as c } from "react";
|
|
3
3
|
const p = (d) => {
|
|
4
|
-
const { value: h, node:
|
|
5
|
-
e || !
|
|
6
|
-
}, [e,
|
|
7
|
-
(
|
|
8
|
-
e || (
|
|
4
|
+
const { value: h, node: o, column: t, leftLabel: s, rightLabel: i, disabled: e } = d, n = !!h, r = c(() => {
|
|
5
|
+
e || !t || o.setDataValue(t.getColId(), !n);
|
|
6
|
+
}, [e, t, o, n]), u = c(
|
|
7
|
+
(l) => {
|
|
8
|
+
e || (l.key === " " || l.key === "Enter") && (l.preventDefault(), r());
|
|
9
9
|
},
|
|
10
|
-
[e,
|
|
10
|
+
[e, r]
|
|
11
11
|
);
|
|
12
12
|
return /* @__PURE__ */ b("div", { className: `flex items-center justify-center h-full w-full gap-2 ag-cell-inner-padding ${e ? "opacity-60 cursor-not-allowed" : !e ? "in-ag-editable-cell-highlight" : ""}`, children: [
|
|
13
|
-
s && /* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
13
|
+
s && /* @__PURE__ */ a("span", { className: "text-xs text-secondary-foreground", children: s }),
|
|
14
|
+
/* @__PURE__ */ a(
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
|
-
onClick:
|
|
17
|
+
onClick: r,
|
|
18
18
|
onKeyDown: u,
|
|
19
19
|
role: "switch",
|
|
20
|
-
"aria-checked":
|
|
20
|
+
"aria-checked": n,
|
|
21
21
|
"aria-disabled": e,
|
|
22
22
|
tabIndex: e ? -1 : 0,
|
|
23
|
-
className: `inline-flex h-4 w-6 shrink-0 items-center rounded-full border transition-colors ${e ? "cursor-not-allowed opacity-50" : "cursor-pointer"} ${
|
|
24
|
-
children: /* @__PURE__ */
|
|
23
|
+
className: `inline-flex h-4 w-6 shrink-0 items-center rounded-full border transition-colors ${e ? "cursor-not-allowed opacity-50" : "cursor-pointer"} ${n ? "bg-brand-tint border-canvas-accordion" : "bg-canvas-elevated border-canvas-tint"}`,
|
|
24
|
+
children: /* @__PURE__ */ a(
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
27
|
-
className: `pointer-events-none block h-[10px] w-[10px] rounded-full shadow-lg transition-transform ${
|
|
27
|
+
className: `pointer-events-none block h-[10px] w-[10px] rounded-full shadow-lg transition-transform ${n ? "translate-x-[10px] bg-brand" : "translate-x-[2px] bg-stroke-field"}`
|
|
28
28
|
}
|
|
29
29
|
)
|
|
30
30
|
}
|
|
31
31
|
),
|
|
32
|
-
|
|
32
|
+
i && /* @__PURE__ */ a("span", { className: "text-xs text-secondary-foreground", children: i })
|
|
33
33
|
] });
|
|
34
34
|
};
|
|
35
35
|
p.displayName = "SwitchDisplayRenderer";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight bus for column-picker filter/search indicators.
|
|
3
|
+
* Replaces synthetic `gridApi.onFilterChanged('api')` on search open/close,
|
|
4
|
+
* which incorrectly triggers SSRM refetches when the filter model is unchanged.
|
|
5
|
+
*/
|
|
6
|
+
type ColumnIndicatorSyncListener = () => void;
|
|
7
|
+
export declare function subscribeColumnIndicatorSync(listener: ColumnIndicatorSyncListener): () => void;
|
|
8
|
+
export declare function emitColumnIndicatorSync(): void;
|
|
9
|
+
export {};
|
package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js
CHANGED
|
@@ -132,7 +132,7 @@ const M = (k) => {
|
|
|
132
132
|
return n.push(s), n.join(" > ");
|
|
133
133
|
};
|
|
134
134
|
return /* @__PURE__ */ r(I, { open: k, onOpenChange: m, children: /* @__PURE__ */ g(ee, { className: "w-[800px] max-w-[95vw] max-h-[90vh] flex flex-col p-0", hideClose: !0, children: [
|
|
135
|
-
/* @__PURE__ */ g(te, { className: "flex flex-row items-center justify-between px-4 py-3", children: [
|
|
135
|
+
/* @__PURE__ */ g(te, { className: "flex flex-row items-center justify-between px-4 py-3 pe-4", children: [
|
|
136
136
|
/* @__PURE__ */ r(le, { children: d("advancedFilter.title") }),
|
|
137
137
|
/* @__PURE__ */ r(oe, { 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(ce, { size: 14 }) }) })
|
|
138
138
|
] }),
|
|
@@ -5,9 +5,9 @@ import { Input as f } from "../../../../forms/input/input.js";
|
|
|
5
5
|
import { DatePicker as V } from "../../../../forms/date-picker/date-picker.js";
|
|
6
6
|
import { DateRangePicker as I } from "../../../../forms/date-picker/date-range-picker.js";
|
|
7
7
|
import { Select as h } from "../../../../forms/select/select.js";
|
|
8
|
-
import { Bin as
|
|
8
|
+
import { Bin as y } from "impact-nova-icons";
|
|
9
9
|
import { useImpactNovaI18n as D } from "../../../../../i18n/use-impact-nova-i18n.js";
|
|
10
|
-
import { createEmptyRule as
|
|
10
|
+
import { createEmptyRule as R } from "../utils/filter-utils.js";
|
|
11
11
|
import { DEFAULT_DATE_DISPLAY_FORMAT as _ } from "../utils/date-utils.js";
|
|
12
12
|
const T = {
|
|
13
13
|
text: ["contains", "notContains", "equals", "notEqual", "startsWith", "endsWith", "empty", "notEmpty"],
|
|
@@ -29,24 +29,24 @@ const T = {
|
|
|
29
29
|
onDeleteColumnFilter: x,
|
|
30
30
|
dateDisplayFormat: b = _
|
|
31
31
|
}) => {
|
|
32
|
-
const { t:
|
|
32
|
+
const { t: r } = D(), N = E(() => (T[l] ?? T.text).map((n) => ({ label: r(`filter.operators.${l === "date" && n === "greaterThan" ? "after" : l === "date" && n === "lessThan" ? "before" : l === "date" && n === "inRange" ? "between" : n}`), value: n })), [l, r]), w = E(
|
|
33
33
|
() => [
|
|
34
|
-
{ label:
|
|
35
|
-
{ label:
|
|
34
|
+
{ label: r("filter.logicAll"), value: "AND" },
|
|
35
|
+
{ label: r("filter.logicAny"), value: "OR" }
|
|
36
36
|
],
|
|
37
|
-
[
|
|
37
|
+
[r]
|
|
38
38
|
), O = () => {
|
|
39
|
-
m([...s,
|
|
39
|
+
m([...s, R(p, l)]);
|
|
40
40
|
}, S = (e) => {
|
|
41
41
|
if (s.length > 1 || u) {
|
|
42
|
-
const
|
|
43
|
-
|
|
42
|
+
const n = s.filter((t) => t.id !== e);
|
|
43
|
+
n.length === 0 && u ? m([]) : m(n.length > 0 ? n : [R(p, l)]);
|
|
44
44
|
}
|
|
45
|
-
}, o = (e,
|
|
46
|
-
m(s.map((t) => t.id === e ? { ...t, ...
|
|
45
|
+
}, o = (e, n) => {
|
|
46
|
+
m(s.map((t) => t.id === e ? { ...t, ...n } : t));
|
|
47
47
|
}, k = (e) => {
|
|
48
48
|
if (e.operator === "empty" || e.operator === "notEmpty")
|
|
49
|
-
return /* @__PURE__ */ a("span", { className: "text-content-placeholder italic text-sm", children:
|
|
49
|
+
return /* @__PURE__ */ a("span", { className: "text-content-placeholder italic text-sm", children: r("advancedFilter.noValueNeeded") });
|
|
50
50
|
if (l === "date")
|
|
51
51
|
return e.operator === "inRange" ? /* @__PURE__ */ a(
|
|
52
52
|
I,
|
|
@@ -69,13 +69,13 @@ const T = {
|
|
|
69
69
|
{
|
|
70
70
|
value: e.value ? new Date(e.value) : void 0,
|
|
71
71
|
onChange: (t) => o(e.id, { value: t?.toISOString() || "" }),
|
|
72
|
-
placeholder:
|
|
72
|
+
placeholder: r("filter.selectDate"),
|
|
73
73
|
format: b,
|
|
74
74
|
showFooter: !0
|
|
75
75
|
}
|
|
76
76
|
);
|
|
77
|
-
const
|
|
78
|
-
return l === "select" || l === "multi" &&
|
|
77
|
+
const n = e.operator === "equals" || e.operator === "notEqual";
|
|
78
|
+
return l === "select" || l === "multi" && n ? /* @__PURE__ */ a(
|
|
79
79
|
h,
|
|
80
80
|
{
|
|
81
81
|
options: g || [],
|
|
@@ -87,7 +87,7 @@ const T = {
|
|
|
87
87
|
Array.isArray(t) ? o(e.id, { value: t.map((i) => i.value) }) : o(e.id, { value: t?.value || "" });
|
|
88
88
|
},
|
|
89
89
|
isMulti: c !== void 0 ? c : !0,
|
|
90
|
-
placeholder:
|
|
90
|
+
placeholder: r(c === !1 ? "filter.selectValue" : "filter.selectValues"),
|
|
91
91
|
className: "w-full",
|
|
92
92
|
menuPortalTarget: document.body
|
|
93
93
|
}
|
|
@@ -97,18 +97,18 @@ const T = {
|
|
|
97
97
|
{
|
|
98
98
|
value: e.value,
|
|
99
99
|
onChange: (t) => o(e.id, { value: t.target.value }),
|
|
100
|
-
placeholder:
|
|
100
|
+
placeholder: r("filter.from"),
|
|
101
101
|
type: l === "number" ? "number" : "text",
|
|
102
102
|
className: "flex-1"
|
|
103
103
|
}
|
|
104
104
|
),
|
|
105
|
-
/* @__PURE__ */ a("span", { className: "text-content-placeholder shrink-0", children:
|
|
105
|
+
/* @__PURE__ */ a("span", { className: "text-content-placeholder shrink-0", children: r("filter.to") }),
|
|
106
106
|
/* @__PURE__ */ a(
|
|
107
107
|
f,
|
|
108
108
|
{
|
|
109
109
|
value: e.valueTo || "",
|
|
110
110
|
onChange: (t) => o(e.id, { valueTo: t.target.value }),
|
|
111
|
-
placeholder:
|
|
111
|
+
placeholder: r("filter.to"),
|
|
112
112
|
type: l === "number" ? "number" : "text",
|
|
113
113
|
className: "flex-1"
|
|
114
114
|
}
|
|
@@ -118,26 +118,26 @@ const T = {
|
|
|
118
118
|
{
|
|
119
119
|
value: e.value,
|
|
120
120
|
onChange: (t) => o(e.id, { value: t.target.value }),
|
|
121
|
-
placeholder:
|
|
121
|
+
placeholder: r("filter.enterValue"),
|
|
122
122
|
type: l === "number" ? "number" : "text",
|
|
123
123
|
className: "w-full"
|
|
124
124
|
}
|
|
125
125
|
);
|
|
126
126
|
}, P = (e) => {
|
|
127
|
-
const
|
|
127
|
+
const n = N.find((t) => t.value === e.operator);
|
|
128
128
|
return /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
129
129
|
/* @__PURE__ */ a("div", { className: "w-[120px] shrink-0", children: /* @__PURE__ */ a(
|
|
130
130
|
h,
|
|
131
131
|
{
|
|
132
132
|
options: N,
|
|
133
|
-
value:
|
|
133
|
+
value: n || null,
|
|
134
134
|
onChange: (t) => {
|
|
135
135
|
const i = t;
|
|
136
136
|
if (!i) return;
|
|
137
137
|
const A = i.value === "inRange" && e.value && !e.valueTo ? Array.isArray(e.value) ? e.value[0] : e.value : void 0;
|
|
138
138
|
o(e.id, { operator: i.value, ...A != null && { valueTo: A } });
|
|
139
139
|
},
|
|
140
|
-
placeholder:
|
|
140
|
+
placeholder: r("filter.operator"),
|
|
141
141
|
className: "w-full",
|
|
142
142
|
menuPortalTarget: document.body
|
|
143
143
|
}
|
|
@@ -149,36 +149,36 @@ const T = {
|
|
|
149
149
|
onClick: () => S(e.id),
|
|
150
150
|
variant: "tertiary",
|
|
151
151
|
size: "icon",
|
|
152
|
-
"aria-label":
|
|
152
|
+
"aria-label": r("aria.removeRule"),
|
|
153
153
|
disabled: s.length === 1 && !u,
|
|
154
|
-
children: /* @__PURE__ */ a(
|
|
154
|
+
children: /* @__PURE__ */ a(y, { size: "xs" })
|
|
155
155
|
}
|
|
156
156
|
)
|
|
157
157
|
] }, e.id);
|
|
158
158
|
};
|
|
159
159
|
return /* @__PURE__ */ d("div", { className: "flex flex-col gap-4", children: [
|
|
160
|
-
/* @__PURE__ */ d("div", { className: "text-
|
|
161
|
-
/* @__PURE__ */ a("span", { children:
|
|
160
|
+
/* @__PURE__ */ d("div", { className: "text-secondary-foreground text-sm flex items-center gap-2 flex-wrap", children: [
|
|
161
|
+
/* @__PURE__ */ a("span", { children: r("advancedFilter.match") }),
|
|
162
162
|
/* @__PURE__ */ a("div", { className: "w-[80px]", children: /* @__PURE__ */ a(
|
|
163
163
|
h,
|
|
164
164
|
{
|
|
165
165
|
options: w,
|
|
166
166
|
value: w.find((e) => e.value === C),
|
|
167
167
|
onChange: (e) => {
|
|
168
|
-
const
|
|
169
|
-
|
|
168
|
+
const n = e;
|
|
169
|
+
n && F(n.value);
|
|
170
170
|
},
|
|
171
171
|
className: "h-8",
|
|
172
172
|
menuPortalTarget: document.body,
|
|
173
173
|
isClearable: !1
|
|
174
174
|
}
|
|
175
175
|
) }),
|
|
176
|
-
/* @__PURE__ */ a("span", { children:
|
|
176
|
+
/* @__PURE__ */ a("span", { children: r("advancedFilter.ofTheFollowingRulesForColumn") }),
|
|
177
177
|
/* @__PURE__ */ a("span", { className: "font-semibold text-content-tertiary", children: q })
|
|
178
178
|
] }),
|
|
179
179
|
/* @__PURE__ */ a("div", { className: "flex flex-col gap-3", children: s.map((e) => P(e)) }),
|
|
180
180
|
/* @__PURE__ */ d("div", { className: "flex items-center justify-between mt-1", children: [
|
|
181
|
-
/* @__PURE__ */ a(v, { onClick: O, variant: "outline", size: "sm", children:
|
|
181
|
+
/* @__PURE__ */ a(v, { onClick: O, variant: "outline", size: "sm", children: r("advancedFilter.addRule") }),
|
|
182
182
|
x && /* @__PURE__ */ d(
|
|
183
183
|
v,
|
|
184
184
|
{
|
|
@@ -187,8 +187,8 @@ const T = {
|
|
|
187
187
|
onClick: x,
|
|
188
188
|
className: "text-validation hover:text-destructive hover:bg-feedback-error-surface border-destructive",
|
|
189
189
|
children: [
|
|
190
|
-
/* @__PURE__ */ a(
|
|
191
|
-
|
|
190
|
+
/* @__PURE__ */ a(y, { size: "xs" }),
|
|
191
|
+
r("advancedFilter.deleteColumn")
|
|
192
192
|
]
|
|
193
193
|
}
|
|
194
194
|
)
|