@genesislcap/grid-pro 14.151.1 → 14.151.2-alpha-6dc6e2c.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.
@@ -454,6 +454,15 @@
454
454
  }
455
455
  ]
456
456
  },
457
+ {
458
+ "kind": "field",
459
+ "name": "blockScrollingOnContextMenu",
460
+ "type": {
461
+ "text": "boolean"
462
+ },
463
+ "default": "false",
464
+ "description": "If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records"
465
+ },
457
466
  {
458
467
  "kind": "field",
459
468
  "name": "classNames",
@@ -542,6 +551,20 @@
542
551
  "privacy": "private",
543
552
  "default": "undefined"
544
553
  },
554
+ {
555
+ "kind": "field",
556
+ "name": "selectedRowId",
557
+ "type": {
558
+ "text": "string"
559
+ }
560
+ },
561
+ {
562
+ "kind": "field",
563
+ "name": "selectedColId",
564
+ "type": {
565
+ "text": "string"
566
+ }
567
+ },
545
568
  {
546
569
  "kind": "field",
547
570
  "name": "gridOptionsConfig",
@@ -1110,6 +1133,15 @@
1110
1133
  "text": "string"
1111
1134
  },
1112
1135
  "fieldName": "theme"
1136
+ },
1137
+ {
1138
+ "name": "block-scrolling-on-context-menu",
1139
+ "type": {
1140
+ "text": "boolean"
1141
+ },
1142
+ "default": "false",
1143
+ "description": "If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records",
1144
+ "fieldName": "blockScrollingOnContextMenu"
1113
1145
  }
1114
1146
  ],
1115
1147
  "mixins": [
@@ -5905,6 +5937,11 @@
5905
5937
  }
5906
5938
  ]
5907
5939
  },
5940
+ {
5941
+ "kind": "method",
5942
+ "name": "setPreviouslySelectedCell",
5943
+ "privacy": "private"
5944
+ },
5908
5945
  {
5909
5946
  "kind": "method",
5910
5947
  "name": "applyTransaction",
@@ -7188,6 +7225,15 @@
7188
7225
  "module": "src/datasource/base.datasource.ts"
7189
7226
  }
7190
7227
  },
7228
+ {
7229
+ "kind": "method",
7230
+ "name": "setPreviouslySelectedCell",
7231
+ "privacy": "private",
7232
+ "inheritedFrom": {
7233
+ "name": "GridProBaseDatasource",
7234
+ "module": "src/datasource/base.datasource.ts"
7235
+ }
7236
+ },
7191
7237
  {
7192
7238
  "kind": "method",
7193
7239
  "name": "mapTransaction",
@@ -8491,6 +8537,15 @@
8491
8537
  "module": "src/datasource/base.datasource.ts"
8492
8538
  }
8493
8539
  },
8540
+ {
8541
+ "kind": "method",
8542
+ "name": "setPreviouslySelectedCell",
8543
+ "privacy": "private",
8544
+ "inheritedFrom": {
8545
+ "name": "GridProBaseDatasource",
8546
+ "module": "src/datasource/base.datasource.ts"
8547
+ }
8548
+ },
8494
8549
  {
8495
8550
  "kind": "method",
8496
8551
  "name": "mapTransaction",
@@ -9960,6 +10015,15 @@
9960
10015
  "module": "src/datasource/base.datasource.ts"
9961
10016
  }
9962
10017
  },
10018
+ {
10019
+ "kind": "method",
10020
+ "name": "setPreviouslySelectedCell",
10021
+ "privacy": "private",
10022
+ "inheritedFrom": {
10023
+ "name": "GridProBaseDatasource",
10024
+ "module": "src/datasource/base.datasource.ts"
10025
+ }
10026
+ },
9963
10027
  {
9964
10028
  "kind": "method",
9965
10029
  "name": "mapTransaction",
@@ -1,4 +1,4 @@
1
- import type { ColumnState, GridOptions, RowDataTransaction, ServerSideTransaction } from '@ag-grid-community/core';
1
+ import { ColumnState, GridOptions, RowDataTransaction, ServerSideTransaction } from '@ag-grid-community/core';
2
2
  import { Connect } from '@genesislcap/foundation-comms';
3
3
  import { FoundationElement } from '@microsoft/fast-foundation';
4
4
  import { GridPro } from '../grid-pro';
@@ -57,6 +57,7 @@ export declare class GridProBaseDatasource extends GenesisGridDatasourceElement
57
57
  protected applyAllAgTransactions(): void;
58
58
  private flashAddedCells;
59
59
  private applyMappedAgTransaction;
60
+ private setPreviouslySelectedCell;
60
61
  protected applyTransaction(agTransaction: RowDataTransaction): any;
61
62
  protected applyTransactionAsync(agTransaction: RowDataTransaction, callback?: (res: any) => void): void;
62
63
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"base.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/base.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,qBAAa,4BAA6B,SAAQ,iBAAiB;IACxD,OAAO,EAAG,OAAO,CAAC;IAEf,mBAAmB,EAAE,WAAW,CAAC;IACjC,oBAAoB,EAAE,WAAW,EAAE,CAAC;IAEhD;;OAEG;IACS,aAAa,EAAE,QAAQ,CAAC;IAE9B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACgC,UAAU,UAAS;IACvC,OAAO,EAAE,MAAM,CAAmC;IAClD,OAAO,EAAE,MAAM,CAAoC;IAC/B,UAAU,UAAS;IACvC,OAAO,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IAChC,OAAO,UAAS;IAE3C;;;;;OAKG;IAC4B,SAAS,MAAC;IAMzC,SAAS,KAAK,KAAK,IAAI,MAAM,CAI5B;IAED;;;OAGG;IACH,SAAS,KAAK,eAAe,IAAI,OAAO,CAMvC;IAED,SAAS,KAAK,0BAA0B,IAAI,MAAM,CAIjD;IAED,SAAS,CAAC,eAAe,UAAS;IAElC,SAAS,KAAK,MAAM,IAAI,OAAO,GAAG,IAAI,CAErC;CACF;AAED;;;GAGG;AACH,oBAAY,aAAa;IACvB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,qBAAa,qBAAsB,SAAQ,4BAA4B;IACrE,SAAS,CAAC,mBAAmB,UAAS;IAEtC,OAAO,EAAE,GAAG,CAAC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B;IAejC,SAAS,CAAC,gBAAgB,CAAC,aAAa,EAAE,kBAAkB,GAAG,GAAG;IAIlE,SAAS,CAAC,qBAAqB,CAAC,aAAa,EAAE,kBAAkB,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI;IAI3F;;;;;OAKG;IACH,OAAO,CAAC,cAAc;CAwBvB;AAED,qBAAa,oBAAoB;IAC/B,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAa;CACvC"}
@@ -128,12 +128,6 @@ declare const GridPro_base: (new (...args: any[]) => {
128
128
  appendChild<T_1 extends Node>(node: T_1): T_1;
129
129
  compareDocumentPosition(other: Node): number;
130
130
  contains(other: Node): boolean;
131
- /**
132
- * Gets the saved grid ColumnState[] from local storage
133
- * @remarks This is used to restore the grid state when the grid is rehydrated
134
- * @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
135
- * @public
136
- */
137
131
  getRootNode(options?: GetRootNodeOptions): Node;
138
132
  hasChildNodes(): boolean;
139
133
  insertBefore<T_2 extends Node>(node: T_2, child: Node): T_2;
@@ -405,6 +399,12 @@ export declare class GridPro extends GridPro_base {
405
399
  rowHeight: number;
406
400
  theme: string;
407
401
  themeChanged(oldValue: string, newValue: string): void;
402
+ /**
403
+ * If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records
404
+ * @remarks Defaults to false
405
+ * @alpha
406
+ */
407
+ blockScrollingOnContextMenu: boolean;
408
408
  classNames: string;
409
409
  agGrid: Grid;
410
410
  gridSlot: HTMLSlotElement;
@@ -418,6 +418,8 @@ export declare class GridPro extends GridPro_base {
418
418
  private rehydrationAttempted;
419
419
  private gridEventsQueue;
420
420
  private filterConfig;
421
+ selectedRowId: string;
422
+ selectedColId: string;
421
423
  /**
422
424
  * Injectable config that allows to change grid options on an app level basis
423
425
  * To modify options, register instance of the config in DOM container that is
@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AAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,yBAAyB;IAOjC;;OAEG;IACH,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,IAAI,iBAAiB,IAAI,qBAAqB,CAM7C;IAED,IAAI,WAAW,CAAC,OAAO,EAAE,WAAW,EAwHnC;IAED;;;;;;OAMG;IACH,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,yBAAyB,UAAQ;IAKhF;;;;;;;;OAQG;IACH,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,yBAAyB,UAAQ;IAwFnF,IAAI,kBAAkB,aAerB;IAED,0BAA0B,CAAC,OAAO,KAAA,EAAE,QAAQ,KAAA,EAAE,QAAQ,KAAA;IAqBtD,mBAAmB,CAAC,SAAS,KAAA,EAAE,KAAK,KAAA;IAiBpC,OAAO,CAAC,eAAe,CAAa;IAEpC,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,eAAe;CAMxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,EAAE,cAA0B,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;kBAM5B,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import { __decorate } from "tslib";
2
+ import { Events, } from '@ag-grid-community/core';
2
3
  import { DatasourceDefaults } from '@genesislcap/foundation-comms';
3
4
  import { Connect } from '@genesislcap/foundation-comms';
4
- import { attr, observable } from '@microsoft/fast-element';
5
+ import { attr, DOM, observable } from '@microsoft/fast-element';
5
6
  import { FoundationElement } from '@microsoft/fast-foundation';
6
7
  export class GenesisGridDatasourceElement extends FoundationElement {
7
8
  constructor() {
@@ -177,12 +178,35 @@ export class GridProBaseDatasource extends GenesisGridDatasourceElement {
177
178
  this.applyTransactionAsync(this.mapTransaction(agTransaction, [operation]), (changedNodes) => {
178
179
  this.flashAddedCells(changedNodes.add);
179
180
  });
181
+ if (this.agGrid.blockScrollingOnContextMenu) {
182
+ const listenerEvent = (e) => {
183
+ e.results.forEach((result) => {
184
+ if (result.add.length || result.remove.length) {
185
+ this.setPreviouslySelectedCell();
186
+ }
187
+ });
188
+ };
189
+ this.agGrid.gridApi.addEventListener(Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED, listenerEvent);
190
+ }
180
191
  }
181
192
  else {
182
193
  const changedNodes = this.applyTransaction(this.mapTransaction(agTransaction, [operation]));
183
194
  this.flashAddedCells(changedNodes.add);
195
+ if (this.agGrid.blockScrollingOnContextMenu) {
196
+ this.setPreviouslySelectedCell();
197
+ }
184
198
  }
185
199
  }
200
+ setPreviouslySelectedCell() {
201
+ const previouslySelectedRowNode = this.agGrid.gridApi.getRowNode(this.agGrid.selectedRowId);
202
+ const previouslySelectedColId = this.agGrid.selectedColId;
203
+ if (!previouslySelectedRowNode || !previouslySelectedColId)
204
+ return;
205
+ DOM.queueUpdate(() => {
206
+ this.agGrid.gridApi.setFocusedCell(previouslySelectedRowNode.rowIndex, previouslySelectedColId);
207
+ this.agGrid.gridApi.ensureIndexVisible(previouslySelectedRowNode.rowIndex, 'middle');
208
+ });
209
+ }
186
210
  applyTransaction(agTransaction) {
187
211
  throw new Error('Method not implemented.');
188
212
  }
@@ -90,6 +90,12 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
90
90
  this.gridFontFace = defaultAgGridFontFace;
91
91
  this.columnComponentName = 'grid-pro-column';
92
92
  this.theme = AgGridTheme.alpine;
93
+ /**
94
+ * If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records
95
+ * @remarks Defaults to false
96
+ * @alpha
97
+ */
98
+ this.blockScrollingOnContextMenu = false;
93
99
  this.rehydrationAttempted = false;
94
100
  this.gridEventsQueue = [];
95
101
  this.filterConfig = undefined;
@@ -266,7 +272,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
266
272
  return;
267
273
  this.agAttributes[attrName] = attribute.value;
268
274
  });
269
- const { columnDefs, components, defaultColDef, onGridReady, onFirstDataRendered } = options, rest = __rest(options, ["columnDefs", "components", "defaultColDef", "onGridReady", "onFirstDataRendered"]);
275
+ const { columnDefs, components, defaultColDef, onCellContextMenu, onGridReady, onFirstDataRendered } = options, rest = __rest(options, ["columnDefs", "components", "defaultColDef", "onCellContextMenu", "onGridReady", "onFirstDataRendered"]);
270
276
  const derivedOptions = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.gridOptionsConfig), { defaultColDef: Object.assign({ enableCellChangeFlash: this.enableCellFlashing, filter: true, resizable: true, sortable: true }, defaultColDef), components: this.combineAllGridComponents(components), suppressDragLeaveHidesColumns: true }), this.eventsAndCallbacks), { onGridReady: (event) => {
271
277
  var _a, _b;
272
278
  this.gridApi = (_a = options.api) !== null && _a !== void 0 ? _a : event.api;
@@ -290,7 +296,20 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
290
296
  if (onFirstDataRendered) {
291
297
  onFirstDataRendered(event);
292
298
  }
293
- }, onColumnPinned: gridOnChangeCallback, onColumnResized: gridOnChangeCallback, onColumnMoved: gridOnChangeCallback, onDisplayedColumnsChanged: gridOnChangeCallback, onFilterChanged: gridOnChangeCallback, onGridSizeChanged: gridOnChangeCallback, onSortChanged: gridOnChangeCallback }), rest);
299
+ }, onColumnPinned: gridOnChangeCallback, onColumnResized: gridOnChangeCallback, onColumnMoved: gridOnChangeCallback, onDisplayedColumnsChanged: gridOnChangeCallback, onFilterChanged: gridOnChangeCallback, onGridSizeChanged: gridOnChangeCallback, onSortChanged: gridOnChangeCallback, onCellContextMenu: (event) => {
300
+ if (this.blockScrollingOnContextMenu) {
301
+ debugger;
302
+ this.selectedRowId = event.node.id;
303
+ this.selectedColId = event.colDef.colId;
304
+ this.addEventListener('click', (e) => {
305
+ this.selectedRowId = undefined;
306
+ this.selectedColId = undefined;
307
+ }, { once: true });
308
+ }
309
+ if (onCellContextMenu) {
310
+ onCellContextMenu(event);
311
+ }
312
+ } }), rest);
294
313
  if (this.gridProDatasource) {
295
314
  derivedOptions.columnDefs = columnDefs;
296
315
  }
@@ -516,6 +535,9 @@ __decorate([
516
535
  __decorate([
517
536
  attr
518
537
  ], GridPro.prototype, "theme", void 0);
538
+ __decorate([
539
+ attr({ attribute: 'block-scrolling-on-context-menu', mode: 'boolean' })
540
+ ], GridPro.prototype, "blockScrollingOnContextMenu", void 0);
519
541
  __decorate([
520
542
  observable
521
543
  ], GridPro.prototype, "classNames", void 0);
@@ -8905,6 +8905,66 @@
8905
8905
  "isProtected": false,
8906
8906
  "isAbstract": false
8907
8907
  },
8908
+ {
8909
+ "kind": "Property",
8910
+ "canonicalReference": "@genesislcap/grid-pro!GridPro#selectedColId:member",
8911
+ "docComment": "",
8912
+ "excerptTokens": [
8913
+ {
8914
+ "kind": "Content",
8915
+ "text": "selectedColId: "
8916
+ },
8917
+ {
8918
+ "kind": "Content",
8919
+ "text": "string"
8920
+ },
8921
+ {
8922
+ "kind": "Content",
8923
+ "text": ";"
8924
+ }
8925
+ ],
8926
+ "isReadonly": false,
8927
+ "isOptional": false,
8928
+ "releaseTag": "Public",
8929
+ "name": "selectedColId",
8930
+ "propertyTypeTokenRange": {
8931
+ "startIndex": 1,
8932
+ "endIndex": 2
8933
+ },
8934
+ "isStatic": false,
8935
+ "isProtected": false,
8936
+ "isAbstract": false
8937
+ },
8938
+ {
8939
+ "kind": "Property",
8940
+ "canonicalReference": "@genesislcap/grid-pro!GridPro#selectedRowId:member",
8941
+ "docComment": "",
8942
+ "excerptTokens": [
8943
+ {
8944
+ "kind": "Content",
8945
+ "text": "selectedRowId: "
8946
+ },
8947
+ {
8948
+ "kind": "Content",
8949
+ "text": "string"
8950
+ },
8951
+ {
8952
+ "kind": "Content",
8953
+ "text": ";"
8954
+ }
8955
+ ],
8956
+ "isReadonly": false,
8957
+ "isOptional": false,
8958
+ "releaseTag": "Public",
8959
+ "name": "selectedRowId",
8960
+ "propertyTypeTokenRange": {
8961
+ "startIndex": 1,
8962
+ "endIndex": 2
8963
+ },
8964
+ "isStatic": false,
8965
+ "isProtected": false,
8966
+ "isAbstract": false
8967
+ },
8908
8968
  {
8909
8969
  "kind": "Method",
8910
8970
  "canonicalReference": "@genesislcap/grid-pro!GridPro#statePersistanceEnabled:member(1)",
@@ -37,9 +37,9 @@ import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
37
37
  import { Logger } from '@genesislcap/foundation-logger';
38
38
  import { MetadataDetail } from '@genesislcap/foundation-comms';
39
39
  import { OverrideFoundationElementDefinition } from '@microsoft/fast-foundation';
40
- import type { RowDataTransaction } from '@ag-grid-community/core';
40
+ import { RowDataTransaction } from '@ag-grid-community/core';
41
41
  import type { RowNodeTransaction } from '@ag-grid-community/core';
42
- import type { ServerSideTransaction } from '@ag-grid-community/core';
42
+ import { ServerSideTransaction } from '@ag-grid-community/core';
43
43
  import type { ServerSideTransactionResult } from '@ag-grid-community/core';
44
44
  import { SocketObservable } from '@genesislcap/foundation-comms';
45
45
  import { Swatch } from '@microsoft/fast-components';
@@ -1229,6 +1229,12 @@ export declare class GridPro extends GridPro_base {
1229
1229
  rowHeight: number;
1230
1230
  theme: string;
1231
1231
  themeChanged(oldValue: string, newValue: string): void;
1232
+ /**
1233
+ * If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records
1234
+ * @remarks Defaults to false
1235
+ * @alpha
1236
+ */
1237
+ blockScrollingOnContextMenu: boolean;
1232
1238
  classNames: string;
1233
1239
  agGrid: Grid;
1234
1240
  gridSlot: HTMLSlotElement;
@@ -1242,6 +1248,8 @@ export declare class GridPro extends GridPro_base {
1242
1248
  private rehydrationAttempted;
1243
1249
  private gridEventsQueue;
1244
1250
  private filterConfig;
1251
+ selectedRowId: string;
1252
+ selectedColId: string;
1245
1253
  /**
1246
1254
  * Injectable config that allows to change grid options on an app level basis
1247
1255
  * To modify options, register instance of the config in DOM container that is
@@ -1444,12 +1452,6 @@ declare const GridPro_base: (new (...args: any[]) => {
1444
1452
  appendChild<T_1 extends Node>(node: T_1): T_1;
1445
1453
  compareDocumentPosition(other: Node): number;
1446
1454
  contains(other: Node): boolean;
1447
- /**
1448
- * Gets the saved grid ColumnState[] from local storage
1449
- * @remarks This is used to restore the grid state when the grid is rehydrated
1450
- * @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
1451
- * @public
1452
- */
1453
1455
  getRootNode(options?: GetRootNodeOptions): Node;
1454
1456
  hasChildNodes(): boolean;
1455
1457
  insertBefore<T_2 extends Node>(node: T_2, child: Node): T_2;
@@ -1662,6 +1664,7 @@ declare class GridProBaseDatasource extends GenesisGridDatasourceElement {
1662
1664
  protected applyAllAgTransactions(): void;
1663
1665
  private flashAddedCells;
1664
1666
  private applyMappedAgTransaction;
1667
+ private setPreviouslySelectedCell;
1665
1668
  protected applyTransaction(agTransaction: RowDataTransaction): any;
1666
1669
  protected applyTransactionAsync(agTransaction: RowDataTransaction, callback?: (res: any) => void): void;
1667
1670
  /**
@@ -58,6 +58,8 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
58
58
  | [onlyTemplateColDefs](./grid-pro.gridpro.onlytemplatecoldefs.md) | | boolean | |
59
59
  | [persistColumnStateKey](./grid-pro.gridpro.persistcolumnstatekey.md) | | string | The key to use for persisting the column state in local storage. |
60
60
  | [rowHeight](./grid-pro.gridpro.rowheight.md) | | number | |
61
+ | [selectedColId](./grid-pro.gridpro.selectedcolid.md) | | string | |
62
+ | [selectedRowId](./grid-pro.gridpro.selectedrowid.md) | | string | |
61
63
  | [theme](./grid-pro.gridpro.theme.md) | | string | |
62
64
 
63
65
  ## Methods
@@ -0,0 +1,11 @@
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; [selectedColId](./grid-pro.gridpro.selectedcolid.md)
4
+
5
+ ## GridPro.selectedColId property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ selectedColId: string;
11
+ ```
@@ -0,0 +1,11 @@
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; [selectedRowId](./grid-pro.gridpro.selectedrowid.md)
4
+
5
+ ## GridPro.selectedRowId property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ selectedRowId: string;
11
+ ```
@@ -43,9 +43,9 @@ import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
43
43
  import { Logger } from '@genesislcap/foundation-logger';
44
44
  import { MetadataDetail } from '@genesislcap/foundation-comms';
45
45
  import { OverrideFoundationElementDefinition } from '@microsoft/fast-foundation';
46
- import type { RowDataTransaction } from '@ag-grid-community/core';
46
+ import { RowDataTransaction } from '@ag-grid-community/core';
47
47
  import type { RowNodeTransaction } from '@ag-grid-community/core';
48
- import type { ServerSideTransaction } from '@ag-grid-community/core';
48
+ import { ServerSideTransaction } from '@ag-grid-community/core';
49
49
  import type { ServerSideTransactionResult } from '@ag-grid-community/core';
50
50
  import { SocketObservable } from '@genesislcap/foundation-comms';
51
51
  import { Swatch } from '@microsoft/fast-components';
@@ -804,6 +804,8 @@ export class GridPro extends GridPro_base {
804
804
  asyncUpdate: boolean;
805
805
  // (undocumented)
806
806
  autoCellRendererByType: boolean;
807
+ // @alpha
808
+ blockScrollingOnContextMenu: boolean;
807
809
  // (undocumented)
808
810
  classNames: string;
809
811
  // (undocumented)
@@ -858,6 +860,10 @@ export class GridPro extends GridPro_base {
858
860
  // (undocumented)
859
861
  rowHeight: number;
860
862
  // (undocumented)
863
+ selectedColId: string;
864
+ // (undocumented)
865
+ selectedRowId: string;
866
+ // (undocumented)
861
867
  statePersistanceEnabled(): boolean;
862
868
  // (undocumented)
863
869
  theme: string;
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.151.1",
4
+ "version": "14.151.2-alpha-6dc6e2c.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -30,20 +30,20 @@
30
30
  "test:debug": "genx test --debug"
31
31
  },
32
32
  "devDependencies": {
33
- "@genesislcap/foundation-testing": "14.151.1",
34
- "@genesislcap/genx": "14.151.1",
35
- "@genesislcap/rollup-builder": "14.151.1",
36
- "@genesislcap/ts-builder": "14.151.1",
37
- "@genesislcap/uvu-playwright-builder": "14.151.1",
38
- "@genesislcap/vite-builder": "14.151.1",
39
- "@genesislcap/webpack-builder": "14.151.1",
33
+ "@genesislcap/foundation-testing": "14.151.2-alpha-6dc6e2c.0",
34
+ "@genesislcap/genx": "14.151.2-alpha-6dc6e2c.0",
35
+ "@genesislcap/rollup-builder": "14.151.2-alpha-6dc6e2c.0",
36
+ "@genesislcap/ts-builder": "14.151.2-alpha-6dc6e2c.0",
37
+ "@genesislcap/uvu-playwright-builder": "14.151.2-alpha-6dc6e2c.0",
38
+ "@genesislcap/vite-builder": "14.151.2-alpha-6dc6e2c.0",
39
+ "@genesislcap/webpack-builder": "14.151.2-alpha-6dc6e2c.0",
40
40
  "rimraf": "^3.0.2"
41
41
  },
42
42
  "dependencies": {
43
- "@genesislcap/foundation-comms": "14.151.1",
44
- "@genesislcap/foundation-logger": "14.151.1",
45
- "@genesislcap/foundation-ui": "14.151.1",
46
- "@genesislcap/foundation-utils": "14.151.1",
43
+ "@genesislcap/foundation-comms": "14.151.2-alpha-6dc6e2c.0",
44
+ "@genesislcap/foundation-logger": "14.151.2-alpha-6dc6e2c.0",
45
+ "@genesislcap/foundation-ui": "14.151.2-alpha-6dc6e2c.0",
46
+ "@genesislcap/foundation-utils": "14.151.2-alpha-6dc6e2c.0",
47
47
  "@microsoft/fast-colors": "^5.3.1",
48
48
  "@microsoft/fast-components": "^2.30.6",
49
49
  "@microsoft/fast-element": "^1.12.0",
@@ -68,5 +68,5 @@
68
68
  "access": "public"
69
69
  },
70
70
  "customElements": "dist/custom-elements.json",
71
- "gitHead": "b56ae0d22c24098e5fd2e771a9ec1749de9cabbf"
71
+ "gitHead": "ead29961faf124f80ee8195b7f318586cc51c71f"
72
72
  }