@genesislcap/grid-pro 14.311.0 → 14.312.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.
@@ -654,6 +654,15 @@
654
654
  "privacy": "private",
655
655
  "default": "[]"
656
656
  },
657
+ {
658
+ "kind": "field",
659
+ "name": "registeredGridEvents",
660
+ "type": {
661
+ "text": "Set<string>"
662
+ },
663
+ "privacy": "private",
664
+ "default": "new Set()"
665
+ },
657
666
  {
658
667
  "kind": "field",
659
668
  "name": "_filterConfig",
@@ -798,6 +807,28 @@
798
807
  }
799
808
  }
800
809
  },
810
+ {
811
+ "kind": "method",
812
+ "name": "getSelectedRows",
813
+ "return": {
814
+ "type": {
815
+ "text": ""
816
+ }
817
+ },
818
+ "description": "Gets the currently selected rows from the grid",
819
+ "privacy": "public"
820
+ },
821
+ {
822
+ "kind": "method",
823
+ "name": "hasSelectedRows",
824
+ "return": {
825
+ "type": {
826
+ "text": ""
827
+ }
828
+ },
829
+ "description": "Checks if any rows are currently selected",
830
+ "privacy": "public"
831
+ },
801
832
  {
802
833
  "kind": "method",
803
834
  "name": "saveColumnState",
@@ -512,6 +512,7 @@ export declare class GridPro extends GridPro_base {
512
512
  private rehydrationAttempted;
513
513
  private rootEventsListeners;
514
514
  private gridEventsQueue;
515
+ private registeredGridEvents;
515
516
  private _filterConfig;
516
517
  getfilterModel(): Promise<{
517
518
  [key: string]: any;
@@ -552,6 +553,24 @@ export declare class GridPro extends GridPro_base {
552
553
  disconnectedCallback(): void;
553
554
  combineAllGridComponents(gridOptionsComponents: GridComponents): GridComponents;
554
555
  statePersistanceEnabled(): boolean;
556
+ /**
557
+ * Gets the currently selected rows from the grid
558
+ * @public
559
+ * @returns Array of selected row data
560
+ */
561
+ getSelectedRows(): any[];
562
+ /**
563
+ * Gets the row data from selected cell ranges
564
+ * @internal
565
+ * @returns Array containing the row data from selected cell ranges, or empty array if none
566
+ */
567
+ private getCellRangeRowData;
568
+ /**
569
+ * Checks if any rows are currently selected
570
+ * @public
571
+ * @returns True if rows are selected, false otherwise
572
+ */
573
+ hasSelectedRows(): boolean;
555
574
  /**
556
575
  * Because we try and resize the grid to fit using callbacks on events, this will cause
557
576
  * a stack overflow of calls to resize, so we need to debounce it.
@@ -1 +1 @@
1
- {"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACN,SAAS,EAET,OAAO,EACP,WAAW,EACX,UAAU,EAEX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAyB,IAAI,EAAkB,MAAM,yBAAyB,CAAC;AASnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAuB/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAcrE,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAEhB,yBAAyB,EAE1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAQL,iBAAiB,EAEjB,sBAAsB,EAEvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAoBvD;;;;GAIG;AACH,eAAO,MAAM,aAAa,0yRAA8D,CAAC;;;;;;;kBAJ1D,CAAC;;;;;;;;8BA6CX,CAAC,cAClB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA6BE,CAAC;4IAGoE,CAAC;wFAK1C,CAAA;+IAKa,CAAA;2FACoC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAsC9C,CAAC;;;;;;;;;;;;;;;;;;;;;;;mBAgDpB,CAAC;;;;;;;;;;;;;6BA4BmB,CAAC;8BACR,CAAA;kBACrB,CAAC;;oBAGV,CAAF;;sBAE4C,CAAC;oBAEnC,CAAF;;;;;;;;gDAmBiB,CAAC;;;;;;;;;;;;;;;;;;uBAmBX,CAAC;;;;;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eners = [];
157
157
  this.gridEventsQueue = [];
158
+ this.registeredGridEvents = new Set();
158
159
  this._filterConfig = undefined;
159
160
  this.agAttributes = {};
160
161
  this.agPropertiesMap = AG_PROPERTIES.reduce((map, property) => {
@@ -188,11 +189,17 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
188
189
  this.addGridEventListener(eventType);
189
190
  }
190
191
  else {
191
- this.gridEventsQueue.push(eventType);
192
+ if (!this.gridEventsQueue.includes(eventType)) {
193
+ this.gridEventsQueue.push(eventType);
194
+ }
192
195
  }
193
196
  }
194
197
  }
195
198
  addGridEventListener(eventType) {
199
+ if (this.registeredGridEvents.has(eventType)) {
200
+ return;
201
+ }
202
+ this.registeredGridEvents.add(eventType);
196
203
  this.gridApi.addEventListener(eventType, (e) => {
197
204
  this.$emit(eventType, e);
198
205
  });
@@ -255,6 +262,8 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
255
262
  return;
256
263
  this.initialised = false;
257
264
  (_a = this.gridApi) === null || _a === void 0 ? void 0 : _a.destroy();
265
+ // Clear registered events when grid is destroyed
266
+ this.registeredGridEvents.clear();
258
267
  });
259
268
  }
260
269
  combineAllGridComponents(gridOptionsComponents) {
@@ -283,6 +292,85 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
283
292
  }
284
293
  return true;
285
294
  }
295
+ /**
296
+ * Gets the currently selected rows from the grid
297
+ * @public
298
+ * @returns Array of selected row data
299
+ */
300
+ getSelectedRows() {
301
+ var _a, _b, _c, _d;
302
+ try {
303
+ if (!this.initialised || !this.gridApi) {
304
+ return [];
305
+ }
306
+ const rowSelectionMode = (_a = this.gridOptions) === null || _a === void 0 ? void 0 : _a.rowSelection;
307
+ // If row selection is enabled (single or multiple), use row selection only
308
+ if (rowSelectionMode === 'single' || rowSelectionMode === 'multiple') {
309
+ if (this.gridApi.getSelectedRows && this.gridApi.getSelectedRows().length > 0) {
310
+ return this.gridApi.getSelectedRows();
311
+ }
312
+ return [];
313
+ }
314
+ // If row selection is disabled (undefined/none), use cell range selection
315
+ if (((_b = this.gridApi) === null || _b === void 0 ? void 0 : _b.getCellRanges) && this.gridApi.getCellRanges().length > 0) {
316
+ return this.getCellRangeRowData();
317
+ }
318
+ // Fallback: if no cell ranges but range selection is disabled,
319
+ // check for focused cell (single cell selection)
320
+ if (!((_c = this.gridOptions) === null || _c === void 0 ? void 0 : _c.enableRangeSelection)) {
321
+ const focusedCell = (_d = this.gridApi) === null || _d === void 0 ? void 0 : _d.getFocusedCell();
322
+ if (focusedCell) {
323
+ const rowNode = this.gridApi.getDisplayedRowAtIndex(focusedCell.rowIndex);
324
+ if (rowNode === null || rowNode === void 0 ? void 0 : rowNode.data) {
325
+ return [rowNode.data];
326
+ }
327
+ }
328
+ }
329
+ return [];
330
+ }
331
+ catch (error) {
332
+ logger.error('Grid Pro: Error getting selected rows:', error);
333
+ return [];
334
+ }
335
+ }
336
+ /**
337
+ * Gets the row data from selected cell ranges
338
+ * @internal
339
+ * @returns Array containing the row data from selected cell ranges, or empty array if none
340
+ */
341
+ getCellRangeRowData() {
342
+ var _a;
343
+ if (!((_a = this.gridApi) === null || _a === void 0 ? void 0 : _a.getCellRanges)) {
344
+ return [];
345
+ }
346
+ const cellRanges = this.gridApi.getCellRanges();
347
+ if (cellRanges.length === 0) {
348
+ return [];
349
+ }
350
+ const rowData = [];
351
+ // Collect unique row data from all selected cell ranges
352
+ cellRanges.forEach((range) => {
353
+ const startIndex = range.startRow.rowIndex;
354
+ const endIndex = range.endRow.rowIndex;
355
+ // Iterate over indices directly for better performance
356
+ for (let rowIndex = startIndex; rowIndex <= endIndex; rowIndex += 1) {
357
+ const rowNode = this.gridApi.getDisplayedRowAtIndex(rowIndex);
358
+ if ((rowNode === null || rowNode === void 0 ? void 0 : rowNode.data) && !rowData.some((existing) => existing === rowNode.data)) {
359
+ rowData.push(rowNode.data);
360
+ }
361
+ }
362
+ });
363
+ return rowData;
364
+ }
365
+ /**
366
+ * Checks if any rows are currently selected
367
+ * @public
368
+ * @returns True if rows are selected, false otherwise
369
+ */
370
+ hasSelectedRows() {
371
+ const selectedRows = this.getSelectedRows();
372
+ return selectedRows.length > 0;
373
+ }
286
374
  /**
287
375
  * Because we try and resize the grid to fit using callbacks on events, this will cause
288
376
  * a stack overflow of calls to resize, so we need to debounce it.
@@ -10799,6 +10799,37 @@
10799
10799
  "isAbstract": false,
10800
10800
  "name": "getSavedColumnState"
10801
10801
  },
10802
+ {
10803
+ "kind": "Method",
10804
+ "canonicalReference": "@genesislcap/grid-pro!GridPro#getSelectedRows:member(1)",
10805
+ "docComment": "/**\n * Gets the currently selected rows from the grid\n *\n * @returns Array of selected row data\n *\n * @public\n */\n",
10806
+ "excerptTokens": [
10807
+ {
10808
+ "kind": "Content",
10809
+ "text": "getSelectedRows(): "
10810
+ },
10811
+ {
10812
+ "kind": "Content",
10813
+ "text": "any[]"
10814
+ },
10815
+ {
10816
+ "kind": "Content",
10817
+ "text": ";"
10818
+ }
10819
+ ],
10820
+ "isStatic": false,
10821
+ "returnTypeTokenRange": {
10822
+ "startIndex": 1,
10823
+ "endIndex": 2
10824
+ },
10825
+ "releaseTag": "Public",
10826
+ "isProtected": false,
10827
+ "overloadIndex": 1,
10828
+ "parameters": [],
10829
+ "isOptional": false,
10830
+ "isAbstract": false,
10831
+ "name": "getSelectedRows"
10832
+ },
10802
10833
  {
10803
10834
  "kind": "Method",
10804
10835
  "canonicalReference": "@genesislcap/grid-pro!GridPro#globalEventListener:member(1)",
@@ -11192,6 +11223,37 @@
11192
11223
  "isProtected": false,
11193
11224
  "isAbstract": false
11194
11225
  },
11226
+ {
11227
+ "kind": "Method",
11228
+ "canonicalReference": "@genesislcap/grid-pro!GridPro#hasSelectedRows:member(1)",
11229
+ "docComment": "/**\n * Checks if any rows are currently selected\n *\n * @returns True if rows are selected, false otherwise\n *\n * @public\n */\n",
11230
+ "excerptTokens": [
11231
+ {
11232
+ "kind": "Content",
11233
+ "text": "hasSelectedRows(): "
11234
+ },
11235
+ {
11236
+ "kind": "Content",
11237
+ "text": "boolean"
11238
+ },
11239
+ {
11240
+ "kind": "Content",
11241
+ "text": ";"
11242
+ }
11243
+ ],
11244
+ "isStatic": false,
11245
+ "returnTypeTokenRange": {
11246
+ "startIndex": 1,
11247
+ "endIndex": 2
11248
+ },
11249
+ "releaseTag": "Public",
11250
+ "isProtected": false,
11251
+ "overloadIndex": 1,
11252
+ "parameters": [],
11253
+ "isOptional": false,
11254
+ "isAbstract": false,
11255
+ "name": "hasSelectedRows"
11256
+ },
11195
11257
  {
11196
11258
  "kind": "Property",
11197
11259
  "canonicalReference": "@genesislcap/grid-pro!GridPro#headerCaseType:member",
@@ -1821,6 +1821,7 @@ export declare class GridPro extends GridPro_base {
1821
1821
  private rehydrationAttempted;
1822
1822
  private rootEventsListeners;
1823
1823
  private gridEventsQueue;
1824
+ private registeredGridEvents;
1824
1825
  private _filterConfig;
1825
1826
  getfilterModel(): Promise<{
1826
1827
  [key: string]: any;
@@ -1861,6 +1862,24 @@ export declare class GridPro extends GridPro_base {
1861
1862
  disconnectedCallback(): void;
1862
1863
  combineAllGridComponents(gridOptionsComponents: GridComponents): GridComponents;
1863
1864
  statePersistanceEnabled(): boolean;
1865
+ /**
1866
+ * Gets the currently selected rows from the grid
1867
+ * @public
1868
+ * @returns Array of selected row data
1869
+ */
1870
+ getSelectedRows(): any[];
1871
+ /**
1872
+ * Gets the row data from selected cell ranges
1873
+ * @internal
1874
+ * @returns Array containing the row data from selected cell ranges, or empty array if none
1875
+ */
1876
+ private getCellRangeRowData;
1877
+ /**
1878
+ * Checks if any rows are currently selected
1879
+ * @public
1880
+ * @returns True if rows are selected, false otherwise
1881
+ */
1882
+ hasSelectedRows(): boolean;
1864
1883
  /**
1865
1884
  * Because we try and resize the grid to fit using callbacks on events, this will cause
1866
1885
  * a stack overflow of calls to resize, so we need to debounce it.
@@ -0,0 +1,19 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/grid-pro](./grid-pro.md) &gt; [GridPro](./grid-pro.gridpro.md) &gt; [getSelectedRows](./grid-pro.gridpro.getselectedrows.md)
4
+
5
+ ## GridPro.getSelectedRows() method
6
+
7
+ Gets the currently selected rows from the grid
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ getSelectedRows(): any[];
13
+ ```
14
+ **Returns:**
15
+
16
+ any\[\]
17
+
18
+ Array of selected row data
19
+
@@ -0,0 +1,19 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/grid-pro](./grid-pro.md) &gt; [GridPro](./grid-pro.gridpro.md) &gt; [hasSelectedRows](./grid-pro.gridpro.hasselectedrows.md)
4
+
5
+ ## GridPro.hasSelectedRows() method
6
+
7
+ Checks if any rows are currently selected
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ hasSelectedRows(): boolean;
13
+ ```
14
+ **Returns:**
15
+
16
+ boolean
17
+
18
+ True if rows are selected, false otherwise
19
+
@@ -988,6 +988,20 @@ Clears the local grid options, this is used to clear the grid options when the g
988
988
  Gets the saved grid ColumnState\[\] from storage
989
989
 
990
990
 
991
+ </td></tr>
992
+ <tr><td>
993
+
994
+ [getSelectedRows()](./grid-pro.gridpro.getselectedrows.md)
995
+
996
+
997
+ </td><td>
998
+
999
+
1000
+ </td><td>
1001
+
1002
+ Gets the currently selected rows from the grid
1003
+
1004
+
991
1005
  </td></tr>
992
1006
  <tr><td>
993
1007
 
@@ -1000,6 +1014,20 @@ Gets the saved grid ColumnState\[\] from storage
1000
1014
  </td><td>
1001
1015
 
1002
1016
 
1017
+ </td></tr>
1018
+ <tr><td>
1019
+
1020
+ [hasSelectedRows()](./grid-pro.gridpro.hasselectedrows.md)
1021
+
1022
+
1023
+ </td><td>
1024
+
1025
+
1026
+ </td><td>
1027
+
1028
+ Checks if any rows are currently selected
1029
+
1030
+
1003
1031
  </td></tr>
1004
1032
  <tr><td>
1005
1033
 
@@ -966,6 +966,7 @@ export class GridPro extends GridPro_base {
966
966
  [key: string]: any;
967
967
  }>;
968
968
  getSavedColumnState(): Promise<ColumnState[]>;
969
+ getSelectedRows(): any[];
969
970
  // (undocumented)
970
971
  globalEventListener(eventType: any, event: any): void;
971
972
  // (undocumented)
@@ -988,6 +989,7 @@ export class GridPro extends GridPro_base {
988
989
  get gridProDatasource(): GridProBaseDatasource;
989
990
  // (undocumented)
990
991
  gridSlot: HTMLSlotElement;
992
+ hasSelectedRows(): boolean;
991
993
  headerCaseType: GridProCaseType;
992
994
  // (undocumented)
993
995
  headerHeight: number;
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.311.0",
4
+ "version": "14.312.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -38,19 +38,19 @@
38
38
  }
39
39
  },
40
40
  "devDependencies": {
41
- "@genesislcap/foundation-testing": "14.311.0",
42
- "@genesislcap/genx": "14.311.0",
43
- "@genesislcap/rollup-builder": "14.311.0",
44
- "@genesislcap/ts-builder": "14.311.0",
45
- "@genesislcap/uvu-playwright-builder": "14.311.0",
46
- "@genesislcap/vite-builder": "14.311.0",
47
- "@genesislcap/webpack-builder": "14.311.0"
41
+ "@genesislcap/foundation-testing": "14.312.0",
42
+ "@genesislcap/genx": "14.312.0",
43
+ "@genesislcap/rollup-builder": "14.312.0",
44
+ "@genesislcap/ts-builder": "14.312.0",
45
+ "@genesislcap/uvu-playwright-builder": "14.312.0",
46
+ "@genesislcap/vite-builder": "14.312.0",
47
+ "@genesislcap/webpack-builder": "14.312.0"
48
48
  },
49
49
  "dependencies": {
50
- "@genesislcap/foundation-comms": "14.311.0",
51
- "@genesislcap/foundation-logger": "14.311.0",
52
- "@genesislcap/foundation-ui": "14.311.0",
53
- "@genesislcap/foundation-utils": "14.311.0",
50
+ "@genesislcap/foundation-comms": "14.312.0",
51
+ "@genesislcap/foundation-logger": "14.312.0",
52
+ "@genesislcap/foundation-ui": "14.312.0",
53
+ "@genesislcap/foundation-utils": "14.312.0",
54
54
  "@microsoft/fast-colors": "5.3.1",
55
55
  "@microsoft/fast-components": "2.30.6",
56
56
  "@microsoft/fast-element": "1.14.0",
@@ -75,5 +75,5 @@
75
75
  "access": "public"
76
76
  },
77
77
  "customElements": "dist/custom-elements.json",
78
- "gitHead": "2a02ca84136438cc9998c84175efc13fad71a1eb"
78
+ "gitHead": "44a1ea77c99b761fb37ee5f211ab7a954c9289d0"
79
79
  }