@genesislcap/grid-pro 14.486.1 → 14.487.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.
@@ -847,6 +847,13 @@ export declare const defaultGridProConfig: {
847
847
  /** Class name used to hide elements with display:none */
848
848
  export declare const DISPLAY_NONE_CLASS = "dnone";
849
849
 
850
+ /** Minimal shape of a displayed AG Grid column needed to resolve its field (package-agnostic). */
851
+ declare interface DisplayedColumnLike {
852
+ getColDef(): {
853
+ field?: string | null;
854
+ };
855
+ }
856
+
850
857
  /** The CSS variable to use for specifying the dropdown's width */
851
858
  export declare const dropdownWidthVar = "--dropdown-width";
852
859
 
@@ -2120,6 +2127,7 @@ export declare class GridPro extends GridPro_base {
2120
2127
  private disposed;
2121
2128
  private readonly debouncedSaveColumnState;
2122
2129
  private readonly debouncedSaveFilterModel;
2130
+ private readonly debouncedNotifyDatasourceVisibleColumns;
2123
2131
  autoCellRendererByType: boolean;
2124
2132
  onlyTemplateColDefs: boolean;
2125
2133
  /**
@@ -2485,6 +2493,12 @@ export declare class GridPro extends GridPro_base {
2485
2493
  * @public
2486
2494
  */
2487
2495
  get gridProDatasource(): GridProBaseDatasource;
2496
+ /**
2497
+ * Reports the currently visible columns to the datasource. The datasource decides what to do with
2498
+ * them (e.g. narrowing the server request); the grid stays agnostic of that behaviour.
2499
+ * @internal
2500
+ */
2501
+ private notifyDatasourceVisibleColumns;
2488
2502
  set gridOptions(options: GridOptionsConfig);
2489
2503
  private setLocalGridOptions;
2490
2504
  /**
@@ -2954,6 +2968,14 @@ export declare class GridProBaseDatasource extends GenesisGridDatasourceElement
2954
2968
  private mapTransaction;
2955
2969
  protected pagination: boolean;
2956
2970
  loadMore(): void;
2971
+ /**
2972
+ * Notifies the datasource of the field names of the currently visible columns.
2973
+ * @remarks No-op by default. Datasources that support column-scoped requests override this to
2974
+ * narrow the server query and reload data when the visible column set changes.
2975
+ * @param visibleFields - Field names of the currently visible columns.
2976
+ * @public
2977
+ */
2978
+ setVisibleColumns(visibleFields: string[]): void;
2957
2979
  restart(): void;
2958
2980
  reloadResourceData(): void;
2959
2981
  destroy(): void;
@@ -3006,6 +3028,7 @@ export declare class GridProBeta extends GridProBeta_base {
3006
3028
  private disposed;
3007
3029
  private readonly debouncedSaveColumnState;
3008
3030
  private readonly debouncedSaveFilterModel;
3031
+ private readonly debouncedNotifyDatasourceVisibleColumns;
3009
3032
  autoCellRendererByType: boolean;
3010
3033
  onlyTemplateColDefs: boolean;
3011
3034
  /**
@@ -3325,6 +3348,12 @@ export declare class GridProBeta extends GridProBeta_base {
3325
3348
  * @public
3326
3349
  */
3327
3350
  get gridProDatasource(): GridProBaseDatasource;
3351
+ /**
3352
+ * Reports the currently visible columns to the datasource. The datasource decides what to do with
3353
+ * them (e.g. narrowing the server request); the grid stays agnostic of that behaviour.
3354
+ * @internal
3355
+ */
3356
+ private notifyDatasourceVisibleColumns;
3328
3357
  set gridOptions(options: GridOptions_2);
3329
3358
  private setLocalGridOptions;
3330
3359
  /**
@@ -4420,6 +4449,16 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
4420
4449
  requestChanged(oldRequest: string, newRequest: string): void;
4421
4450
  resourceNameChanged(oldValue: string, newValue: string): void;
4422
4451
  keepColDefsOnClearRowData: boolean;
4452
+ /**
4453
+ * When enabled and column definitions are provided, the datasource requests data only for the
4454
+ * columns that are currently visible. The visible set is seeded from the column config (columns
4455
+ * not flagged with `hide`) and updated by the host grid via `setVisibleColumns`; the data
4456
+ * is reloaded whenever that set changes.
4457
+ * @remarks DATASERVER only.
4458
+ * @default false
4459
+ */
4460
+ requestVisibleColumnsOnly: boolean;
4461
+ private _visibleColumns;
4423
4462
  private dataSub;
4424
4463
  private updateSub;
4425
4464
  private requiresFullRowDataAndColDefs;
@@ -4536,6 +4575,38 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
4536
4575
  * @param deletes - List of records to remove from the grid stream
4537
4576
  */
4538
4577
  handleStreamDeletes(deletes?: any[]): void;
4578
+ /**
4579
+ * Extends the base options to constrain the requested fields to the visible columns when
4580
+ * `requestVisibleColumnsOnly` is enabled.
4581
+ * @remarks DATASERVER only; for other resource types the derived `fields` are ignored.
4582
+ * @internal
4583
+ */
4584
+ protected datasourceOptions(): DatasourceOptions;
4585
+ /**
4586
+ * Builds the DATASERVER `FIELDS` string (space-separated) from the visible columns, always
4587
+ * including the `rowId` so rows can be tracked.
4588
+ * @internal
4589
+ */
4590
+ private getRequestedFields;
4591
+ /**
4592
+ * Returns the field names of the configured columns that are not hidden, used to seed the visible
4593
+ * set before the host grid reports runtime visibility.
4594
+ * @internal
4595
+ */
4596
+ private getConfiguredVisibleColumns;
4597
+ /**
4598
+ * Updates the set of visible columns and reloads the data when the set changes.
4599
+ * @remarks Called by the host grid on column visibility changes; no-ops unless
4600
+ * `requestVisibleColumnsOnly` is enabled. DATASERVER only; no-ops for other resource types.
4601
+ * @param visibleFields - Field names of the currently visible columns.
4602
+ * @public
4603
+ */
4604
+ setVisibleColumns(visibleFields: string[]): void;
4605
+ /**
4606
+ * Compares two column field lists irrespective of order.
4607
+ * @internal
4608
+ */
4609
+ private columnsChanged;
4539
4610
  loadMore(): void;
4540
4611
  }
4541
4612
 
@@ -6494,6 +6565,19 @@ export declare type ReloadStatusBarParams = {
6494
6565
  tooltip?: string;
6495
6566
  };
6496
6567
 
6568
+ /**
6569
+ * Resolves the field names of the currently visible columns.
6570
+ * @remarks Prefers the grid's displayed columns (`getAllDisplayedColumns()` — already excludes
6571
+ * hidden columns and children of collapsed groups, so no extra visibility check is needed); falls
6572
+ * back to the current column defs (available earlier in the lifecycle than the columns), treating
6573
+ * `hide` as not visible. Shared by the host grids to report the visible set to the datasource.
6574
+ * Typed structurally so it works across the differing AG Grid type packages the grids depend on.
6575
+ * @param displayedColumns - The grid's currently displayed columns, when available.
6576
+ * @param colDefs - The current column defs, used as a fallback before the columns are populated.
6577
+ * @public
6578
+ */
6579
+ export declare function resolveVisibleColumnFields(displayedColumns: DisplayedColumnLike[] | null | undefined, colDefs: readonly unknown[] | null | undefined): string[];
6580
+
6497
6581
  /**
6498
6582
  * Row Count Status Bar Component for Server-Side Infinite Scroll
6499
6583
  * Displays current row count information for server-side grids without pagination.
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": "14.486.1",
4
+ "version": "14.487.0",
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": "14.486.1",
44
- "@genesislcap/genx": "14.486.1",
45
- "@genesislcap/rollup-builder": "14.486.1",
46
- "@genesislcap/ts-builder": "14.486.1",
47
- "@genesislcap/uvu-playwright-builder": "14.486.1",
48
- "@genesislcap/vite-builder": "14.486.1",
49
- "@genesislcap/webpack-builder": "14.486.1"
43
+ "@genesislcap/foundation-testing": "14.487.0",
44
+ "@genesislcap/genx": "14.487.0",
45
+ "@genesislcap/rollup-builder": "14.487.0",
46
+ "@genesislcap/ts-builder": "14.487.0",
47
+ "@genesislcap/uvu-playwright-builder": "14.487.0",
48
+ "@genesislcap/vite-builder": "14.487.0",
49
+ "@genesislcap/webpack-builder": "14.487.0"
50
50
  },
51
51
  "dependencies": {
52
- "@genesislcap/foundation-comms": "14.486.1",
53
- "@genesislcap/foundation-criteria": "14.486.1",
54
- "@genesislcap/foundation-logger": "14.486.1",
55
- "@genesislcap/foundation-ui": "14.486.1",
56
- "@genesislcap/foundation-utils": "14.486.1",
52
+ "@genesislcap/foundation-comms": "14.487.0",
53
+ "@genesislcap/foundation-criteria": "14.487.0",
54
+ "@genesislcap/foundation-logger": "14.487.0",
55
+ "@genesislcap/foundation-ui": "14.487.0",
56
+ "@genesislcap/foundation-utils": "14.487.0",
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": "1e4e55b1ba9ef3aca8177127b52111d3ef0e53ae"
94
+ "gitHead": "e91b34059e2dab1ad9b0799de26c31f3fdfc0ece"
95
95
  }