@genesislcap/grid-pro 15.11.0 → 15.12.0-FUI-2601.1

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.
@@ -26,8 +26,8 @@ import { ColDef as ColDef_2 } from 'ag-grid-community';
26
26
  import { ColGroupDef } from '@ag-grid-community/core';
27
27
  import { ColSpanFunc } from 'ag-grid-community';
28
28
  import { ColSpanParams } from '@ag-grid-community/core';
29
- import { Column } from '@ag-grid-community/core';
30
- import { Column as Column_2 } from 'ag-grid-community';
29
+ import { Column } from 'ag-grid-community';
30
+ import { Column as Column_2 } from '@ag-grid-community/core';
31
31
  import type { ColumnApi } from '@ag-grid-community/core';
32
32
  import { ColumnChooserParams } from 'ag-grid-community';
33
33
  import { ColumnMenuTab } from '@ag-grid-community/core';
@@ -69,8 +69,8 @@ import { GetQuickFilterTextParams } from '@ag-grid-community/core';
69
69
  import { Grid } from '@ag-grid-community/core';
70
70
  import type { GridApi } from '@ag-grid-community/core';
71
71
  import type { GridApi as GridApi_2 } from 'ag-grid-community';
72
- import { GridOptions } from '@ag-grid-community/core';
73
- import { GridOptions as GridOptions_2 } from 'ag-grid-community';
72
+ import { GridOptions } from 'ag-grid-community';
73
+ import { GridOptions as GridOptions_2 } from '@ag-grid-community/core';
74
74
  import type { GridParams } from '@ag-grid-community/core';
75
75
  import type { GridParams as GridParams_2 } from 'ag-grid-community';
76
76
  import { GridReadyEvent } from 'ag-grid-community';
@@ -99,6 +99,8 @@ import { IRowDragItem } from '@ag-grid-community/core';
99
99
  import { IRowNode } from '@ag-grid-community/core';
100
100
  import { IStatusPanelComp } from 'ag-grid-community';
101
101
  import { IStatusPanelParams } from 'ag-grid-community';
102
+ import type { IToolPanelComp } from 'ag-grid-community';
103
+ import type { IToolPanelParams } from 'ag-grid-community';
102
104
  import { ITooltipComp } from '@ag-grid-community/core';
103
105
  import { ITooltipParams } from '@ag-grid-community/core';
104
106
  import { JSONSerializer } from '@genesislcap/foundation-utils';
@@ -145,6 +147,7 @@ import { SwatchRGB } from '@microsoft/fast-components';
145
147
  import { TextField } from '@genesislcap/foundation-ui';
146
148
  import { ToolPanelClassParams } from '@ag-grid-community/core';
147
149
  import { ToolPanelClassParams as ToolPanelClassParams_2 } from 'ag-grid-community';
150
+ import type { ToolPanelDef } from 'ag-grid-community';
148
151
  import { TooltipValueGetterFunc } from 'ag-grid-community';
149
152
  import { ValueFormatterFunc } from '@ag-grid-community/core';
150
153
  import { ValueFormatterFunc as ValueFormatterFunc_2 } from 'ag-grid-community';
@@ -569,6 +572,11 @@ export declare const agThemeTokenMapClassname: (themeName: string) => string;
569
572
  */
570
573
  export declare const agThemeTokenMapCSS: (themeName: string, tokenMap: CSSVarTokenMap<any>) => ElementStyles;
571
574
 
575
+ export declare function applyVisibleOrder<T extends {
576
+ colId?: string;
577
+ hide?: boolean | null;
578
+ }>(columnState: T[], visibleOrder: string[]): T[];
579
+
572
580
  /**
573
581
  * The background color swatch.
574
582
  * @internal
@@ -642,6 +650,73 @@ export declare type BooleanRendererParams = {
642
650
  */
643
651
  export declare const CellTemplate: ViewTemplate<GridProCell, any>;
644
652
 
653
+ export declare interface ColumnPickerItem {
654
+ colId: string;
655
+ headerName: string;
656
+ visible: boolean;
657
+ lockVisible: boolean;
658
+ }
659
+
660
+ /**
661
+ * Custom columns tool panel. Replaces AG Grid Enterprise `agColumnsToolPanel`.
662
+ *
663
+ * @public
664
+ * @remarks
665
+ * Registered as `gridProColumnsToolPanel` (`GridProToolPanelTypes.columns`).
666
+ * `resolveGridProSideBar` rewrites `sideBar: ['columns']` / `agColumnsToolPanel` to this
667
+ * component so hosts do not need `ColumnsToolPanelModule` — only `SideBarModule`.
668
+ *
669
+ * Layout: search → visible columns (drag to reorder) → divider → hidden columns.
670
+ * Checkboxes toggle visibility via `api.setColumnsVisible`; drag is limited to the
671
+ * visible list and disabled while a search filter is active.
672
+ */
673
+ export declare class ColumnsToolPanel implements IToolPanelComp {
674
+ private params;
675
+ private api;
676
+ private eGui;
677
+ private searchInput;
678
+ /** Visible (checked) columns, in grid display order. */
679
+ private selectedList;
680
+ /** Hidden columns, alphabetical after search filter. */
681
+ private unselectedList;
682
+ private divider;
683
+ private search;
684
+ /** Source colId while a visible-row drag is in progress. */
685
+ private dragColId;
686
+ /** Stable listener refs so `destroy` can remove the same functions `init` added. */
687
+ private readonly boundRefresh;
688
+ /**
689
+ * AG Grid `IToolPanelComp` entry. Builds the DOM once and subscribes to column
690
+ * events so the picker stays in sync with header menu / API visibility changes.
691
+ */
692
+ init(params: IToolPanelParams): void;
693
+ /**
694
+ * Rebuilds both lists from current grid column state.
695
+ * Displayed columns stay first (grid order); hidden columns follow so search
696
+ * and drag operate on a single ordered picker model.
697
+ */
698
+ refresh(): void;
699
+ /** Root element AG Grid mounts into the sidebar. */
700
+ getGui(): HTMLElement;
701
+ destroy(): void;
702
+ /** One-time DOM: scoped styles, search, visible list, divider, hidden list. */
703
+ private buildGui;
704
+ private renderList;
705
+ /**
706
+ * One picker row: drag handle + visibility checkbox + header label.
707
+ * Drag is only bound for visible rows when search is empty so reorder
708
+ * matches full grid order, not a filtered subset.
709
+ */
710
+ private createItem;
711
+ /** HTML5 drag-and-drop between visible rows; drop target colId is `colId`. */
712
+ private bindDrag;
713
+ /**
714
+ * Applies a new visible-column order via `applyColumnState({ applyOrder: true })`.
715
+ * Hidden columns keep their relative positions; only the visible slice is permuted.
716
+ */
717
+ private reorderSelected;
718
+ }
719
+
645
720
  /**
646
721
  * The Grid Pro Column Template.
647
722
  * @public
@@ -1399,7 +1474,7 @@ export declare interface FuiCellRendererParams extends ICellRendererParams {
1399
1474
  export declare class GenesisGridDatasourceElement extends GenesisGridDatasourceElement_base {
1400
1475
  connect: Connect;
1401
1476
  datasource: Datasource;
1402
- deferredGridOptions: GridOptions;
1477
+ deferredGridOptions: GridOptions_2;
1403
1478
  deferredColumnStates: ColumnState[];
1404
1479
  /**
1405
1480
  * Allows grid data updates to be processed via and external function before applying in grid
@@ -2033,6 +2108,8 @@ export declare const getMultiselectEditorTemplate: (designSystem?: string) => Vi
2033
2108
  */
2034
2109
  export declare const getNumberEditorTemplate: (designSystem?: string) => ViewTemplate<NumberEditor, any>;
2035
2110
 
2111
+ export declare function getPickerItems(columns: Column[]): ColumnPickerItem[];
2112
+
2036
2113
  /**
2037
2114
  * Get a Design System prefixed Select template.
2038
2115
  * @param designSystem - The design system prefix to use. Defaults to 'foundation'.
@@ -2107,7 +2184,7 @@ export declare interface GridCssClassEventDetail {
2107
2184
  * Grid options config used to configure grids across the application
2108
2185
  * @public
2109
2186
  */
2110
- export declare type GridOptionsConfig = GridOptions_2 | GridOptions;
2187
+ export declare type GridOptionsConfig = GridOptions | GridOptions_2;
2111
2188
 
2112
2189
  /**
2113
2190
  * Grid options config used to inject into grids in application
@@ -2260,7 +2337,7 @@ export declare class GridPro extends GridPro_base {
2260
2337
  private columnState;
2261
2338
  protected agAttributes: Record<string, string>;
2262
2339
  protected agPropertiesMap: Record<string, string>;
2263
- protected agGridOptions: GridOptions;
2340
+ protected agGridOptions: GridOptions_2;
2264
2341
  /**
2265
2342
  * Last grid options supplied via the public `gridOptions` setter (not datasource init).
2266
2343
  * Used as the merge base in `handleInitialize` so user options survive datasource restart.
@@ -2534,7 +2611,7 @@ export declare class GridPro extends GridPro_base {
2534
2611
  private addMaxRowsPanel;
2535
2612
  private addAggregationPanel;
2536
2613
  private addDatasourcePanels;
2537
- protected setupStatusBar(gridOptions: GridOptions): void;
2614
+ protected setupStatusBar(gridOptions: GridOptions_2): void;
2538
2615
  /**
2539
2616
  * Handles column sizing based on sizeColumnsToContent and sizeColumnsToFit attributes
2540
2617
  * @private
@@ -3103,7 +3180,7 @@ export declare class GridProBeta extends GridProBeta_base {
3103
3180
  private columnState;
3104
3181
  protected agAttributes: Record<string, any>;
3105
3182
  protected agPropertiesMap: Record<string, string>;
3106
- protected agGridOptions: GridOptions_2;
3183
+ protected agGridOptions: GridOptions;
3107
3184
  /** User-supplied grid options cached as merge base for datasource re-init. */
3108
3185
  private userProvidedGridOptions;
3109
3186
  private applyingDatasourceGridOptions;
@@ -3310,7 +3387,7 @@ export declare class GridProBeta extends GridProBeta_base {
3310
3387
  /**
3311
3388
  * @public
3312
3389
  */
3313
- get gridOptions(): GridOptions_2;
3390
+ get gridOptions(): GridOptions;
3314
3391
  /**
3315
3392
  * @public
3316
3393
  */
@@ -3331,7 +3408,7 @@ export declare class GridProBeta extends GridProBeta_base {
3331
3408
  * @internal
3332
3409
  */
3333
3410
  private notifyDatasourceVisibleColumns;
3334
- set gridOptions(options: GridOptions_2);
3411
+ set gridOptions(options: GridOptions);
3335
3412
  private setLocalGridOptions;
3336
3413
  /**
3337
3414
  * Clears the local grid options, this is used to clear the grid options when the grid is restarted.
@@ -3457,7 +3534,7 @@ export declare class GridProBeta extends GridProBeta_base {
3457
3534
  resizable?: boolean;
3458
3535
  suppressSizeToFit?: boolean;
3459
3536
  suppressAutoSize?: boolean;
3460
- pivotValueColumn?: Column | Column_2<any>;
3537
+ pivotValueColumn?: Column_2 | Column<any>;
3461
3538
  pivotTotalColumnIds?: string[];
3462
3539
  spanHeaderHeight?: boolean;
3463
3540
  headerName?: string;
@@ -3521,7 +3598,7 @@ export declare class GridProBeta extends GridProBeta_base {
3521
3598
  private addMaxRowsPanel;
3522
3599
  private addAggregationPanel;
3523
3600
  private addDatasourcePanels;
3524
- protected setupStatusBar(gridOptions: GridOptions_2): void;
3601
+ protected setupStatusBar(gridOptions: GridOptions): void;
3525
3602
  get observedAttributes(): string[];
3526
3603
  agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
3527
3604
  globalEventListener(eventType: any, event: any): void;
@@ -3603,9 +3680,7 @@ declare const GridProBeta_base: (new (...args: any[]) => {
3603
3680
  slot: string;
3604
3681
  readonly tagName: string;
3605
3682
  attachShadow(init: ShadowRootInit): ShadowRoot;
3606
- checkVisibility(options? /**
3607
- * The key to use for persisting the filter model in local browser or KV storage.
3608
- */: CheckVisibilityOptions): boolean;
3683
+ checkVisibility(options?: CheckVisibilityOptions): boolean;
3609
3684
  closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K];
3610
3685
  closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K];
3611
3686
  closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K];
@@ -4347,6 +4422,8 @@ declare const GridProColumn_base: (new (...args: any[]) => {
4347
4422
  */
4348
4423
  export declare function gridProColumns<TSource = any>(itemsBinding: Binding<TSource, readonly ColDef[]> | readonly ColDef[], includeRenderers?: boolean): CaptureType<TSource>;
4349
4424
 
4425
+ export declare const gridProColumnsToolPanelDef: ToolPanelDef;
4426
+
4350
4427
  /**
4351
4428
  * Grid Pro possible error events
4352
4429
  * @public
@@ -4390,7 +4467,7 @@ export declare const gridProEventNames: {
4390
4467
  * @remarks - This type is used to define the events and callbacks that can be passed to the grid
4391
4468
  * @public
4392
4469
  */
4393
- export declare type GridProEventsAndCallbacks = OnlyFunctions<UntypeNonFunctions<GridOptions_2>>;
4470
+ export declare type GridProEventsAndCallbacks = OnlyFunctions<UntypeNonFunctions<GridOptions>>;
4394
4471
 
4395
4472
  /**
4396
4473
  * Grid Pro Event Listeners
@@ -5660,6 +5737,15 @@ export declare enum GridProStatusBarTypes {
5660
5737
  */
5661
5738
  export declare const gridProTemplate: ViewTemplate;
5662
5739
 
5740
+ /**
5741
+ * Custom Grid Pro tool panel component names.
5742
+ * @public
5743
+ * @remarks Replaces AG Grid Enterprise `agColumnsToolPanel`. Requires `SideBarModule`.
5744
+ */
5745
+ export declare enum GridProToolPanelTypes {
5746
+ columns = "gridProColumnsToolPanel"
5747
+ }
5748
+
5663
5749
  /**
5664
5750
  * Event detail for the `gridReady`/`onGridReady` signals.
5665
5751
  * @public
@@ -6480,6 +6566,11 @@ export declare enum OperationType {
6480
6566
  /** The CSS class to use for the options element's class in the dropdown */
6481
6567
  export declare const optionsClass = "options";
6482
6568
 
6569
+ export declare function partitionPickerItems(items: ColumnPickerItem[], search: string): {
6570
+ selected: ColumnPickerItem[];
6571
+ unselected: ColumnPickerItem[];
6572
+ };
6573
+
6483
6574
  /**
6484
6575
  * Event detail for requesting a server-side row model refresh.
6485
6576
  */
@@ -6523,6 +6614,13 @@ export declare type ReloadStatusBarParams = {
6523
6614
  tooltip?: string;
6524
6615
  };
6525
6616
 
6617
+ export declare function reorderVisibleIds(allVisibleIds: string[], shownIds: string[], fromId: string, toId: string): string[] | null;
6618
+
6619
+ /**
6620
+ * Rewrites `sideBar: ['columns']` / `agColumnsToolPanel` to the custom Grid Pro picker.
6621
+ */
6622
+ export declare function resolveGridProSideBar(sideBar: GridOptions['sideBar']): GridOptions['sideBar'];
6623
+
6526
6624
  /**
6527
6625
  * Resolves the field names of the currently visible columns.
6528
6626
  * @remarks Prefers the grid's displayed columns (`getAllDisplayedColumns()` — already excludes
@@ -6815,6 +6913,8 @@ export declare const textFieldRendererStyles: ElementStyles;
6815
6913
  */
6816
6914
  export declare const textRendererStyles: ElementStyles;
6817
6915
 
6916
+ export declare function toPickerItem(col: Column): ColumnPickerItem | null;
6917
+
6818
6918
  /**
6819
6919
  * @public
6820
6920
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/grid-pro",
3
3
  "description": "Genesis Foundation AG Grid",
4
- "version": "15.11.0",
4
+ "version": "15.12.0-FUI-2601.1",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -40,20 +40,20 @@
40
40
  }
41
41
  },
42
42
  "devDependencies": {
43
- "@genesislcap/foundation-testing": "15.11.0",
44
- "@genesislcap/genx": "15.11.0",
45
- "@genesislcap/rollup-builder": "15.11.0",
46
- "@genesislcap/ts-builder": "15.11.0",
47
- "@genesislcap/uvu-playwright-builder": "15.11.0",
48
- "@genesislcap/vite-builder": "15.11.0",
49
- "@genesislcap/webpack-builder": "15.11.0"
43
+ "@genesislcap/foundation-testing": "15.12.0-FUI-2601.1",
44
+ "@genesislcap/genx": "15.12.0-FUI-2601.1",
45
+ "@genesislcap/rollup-builder": "15.12.0-FUI-2601.1",
46
+ "@genesislcap/ts-builder": "15.12.0-FUI-2601.1",
47
+ "@genesislcap/uvu-playwright-builder": "15.12.0-FUI-2601.1",
48
+ "@genesislcap/vite-builder": "15.12.0-FUI-2601.1",
49
+ "@genesislcap/webpack-builder": "15.12.0-FUI-2601.1"
50
50
  },
51
51
  "dependencies": {
52
- "@genesislcap/foundation-comms": "15.11.0",
53
- "@genesislcap/foundation-criteria": "15.11.0",
54
- "@genesislcap/foundation-logger": "15.11.0",
55
- "@genesislcap/foundation-ui": "15.11.0",
56
- "@genesislcap/foundation-utils": "15.11.0",
52
+ "@genesislcap/foundation-comms": "15.12.0-FUI-2601.1",
53
+ "@genesislcap/foundation-criteria": "15.12.0-FUI-2601.1",
54
+ "@genesislcap/foundation-logger": "15.12.0-FUI-2601.1",
55
+ "@genesislcap/foundation-ui": "15.12.0-FUI-2601.1",
56
+ "@genesislcap/foundation-utils": "15.12.0-FUI-2601.1",
57
57
  "@microsoft/fast-colors": "5.3.1",
58
58
  "@microsoft/fast-components": "2.30.6",
59
59
  "@microsoft/fast-element": "1.14.0",
@@ -91,5 +91,5 @@
91
91
  "require": "./dist/react.cjs"
92
92
  }
93
93
  },
94
- "gitHead": "261d900881ea1ca2b613033af497ffd449868eb0"
94
+ "gitHead": "7a4081c72e81fa1307d4aab9280dca81f0cb2e38"
95
95
  }