@genesislcap/grid-pro 14.144.1 → 14.144.2-alpha-d5a1f36.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.
@@ -465,6 +465,15 @@
465
465
  }
466
466
  ]
467
467
  },
468
+ {
469
+ "kind": "field",
470
+ "name": "blockScrollingOnContextMenu",
471
+ "type": {
472
+ "text": "boolean"
473
+ },
474
+ "default": "false",
475
+ "description": "If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records"
476
+ },
468
477
  {
469
478
  "kind": "field",
470
479
  "name": "classNames",
@@ -1069,6 +1078,15 @@
1069
1078
  "text": "string"
1070
1079
  },
1071
1080
  "fieldName": "theme"
1081
+ },
1082
+ {
1083
+ "name": "block-scrolling-on-context-menu",
1084
+ "type": {
1085
+ "text": "boolean"
1086
+ },
1087
+ "default": "false",
1088
+ "description": "If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records",
1089
+ "fieldName": "blockScrollingOnContextMenu"
1072
1090
  }
1073
1091
  ],
1074
1092
  "mixins": [
@@ -5428,6 +5446,13 @@
5428
5446
  "text": "Connect"
5429
5447
  }
5430
5448
  },
5449
+ {
5450
+ "kind": "field",
5451
+ "name": "session",
5452
+ "type": {
5453
+ "text": "Session"
5454
+ }
5455
+ },
5431
5456
  {
5432
5457
  "kind": "field",
5433
5458
  "name": "deferredGridOptions",
@@ -5872,6 +5897,11 @@
5872
5897
  }
5873
5898
  ]
5874
5899
  },
5900
+ {
5901
+ "kind": "method",
5902
+ "name": "setPreviouslySelectedCell",
5903
+ "privacy": "private"
5904
+ },
5875
5905
  {
5876
5906
  "kind": "method",
5877
5907
  "name": "applyTransaction",
@@ -5949,6 +5979,17 @@
5949
5979
  "module": "src/datasource/base.datasource.ts"
5950
5980
  }
5951
5981
  },
5982
+ {
5983
+ "kind": "field",
5984
+ "name": "session",
5985
+ "type": {
5986
+ "text": "Session"
5987
+ },
5988
+ "inheritedFrom": {
5989
+ "name": "GenesisGridDatasourceElement",
5990
+ "module": "src/datasource/base.datasource.ts"
5991
+ }
5992
+ },
5952
5993
  {
5953
5994
  "kind": "field",
5954
5995
  "name": "deferredGridOptions",
@@ -7155,6 +7196,15 @@
7155
7196
  "module": "src/datasource/base.datasource.ts"
7156
7197
  }
7157
7198
  },
7199
+ {
7200
+ "kind": "method",
7201
+ "name": "setPreviouslySelectedCell",
7202
+ "privacy": "private",
7203
+ "inheritedFrom": {
7204
+ "name": "GridProBaseDatasource",
7205
+ "module": "src/datasource/base.datasource.ts"
7206
+ }
7207
+ },
7158
7208
  {
7159
7209
  "kind": "method",
7160
7210
  "name": "mapTransaction",
@@ -7198,6 +7248,17 @@
7198
7248
  "module": "src/datasource/base.datasource.ts"
7199
7249
  }
7200
7250
  },
7251
+ {
7252
+ "kind": "field",
7253
+ "name": "session",
7254
+ "type": {
7255
+ "text": "Session"
7256
+ },
7257
+ "inheritedFrom": {
7258
+ "name": "GenesisGridDatasourceElement",
7259
+ "module": "src/datasource/base.datasource.ts"
7260
+ }
7261
+ },
7201
7262
  {
7202
7263
  "kind": "field",
7203
7264
  "name": "deferredGridOptions",
@@ -8440,6 +8501,15 @@
8440
8501
  "module": "src/datasource/base.datasource.ts"
8441
8502
  }
8442
8503
  },
8504
+ {
8505
+ "kind": "method",
8506
+ "name": "setPreviouslySelectedCell",
8507
+ "privacy": "private",
8508
+ "inheritedFrom": {
8509
+ "name": "GridProBaseDatasource",
8510
+ "module": "src/datasource/base.datasource.ts"
8511
+ }
8512
+ },
8443
8513
  {
8444
8514
  "kind": "method",
8445
8515
  "name": "mapTransaction",
@@ -8483,6 +8553,17 @@
8483
8553
  "module": "src/datasource/base.datasource.ts"
8484
8554
  }
8485
8555
  },
8556
+ {
8557
+ "kind": "field",
8558
+ "name": "session",
8559
+ "type": {
8560
+ "text": "Session"
8561
+ },
8562
+ "inheritedFrom": {
8563
+ "name": "GenesisGridDatasourceElement",
8564
+ "module": "src/datasource/base.datasource.ts"
8565
+ }
8566
+ },
8486
8567
  {
8487
8568
  "kind": "field",
8488
8569
  "name": "deferredGridOptions",
@@ -9909,6 +9990,15 @@
9909
9990
  "module": "src/datasource/base.datasource.ts"
9910
9991
  }
9911
9992
  },
9993
+ {
9994
+ "kind": "method",
9995
+ "name": "setPreviouslySelectedCell",
9996
+ "privacy": "private",
9997
+ "inheritedFrom": {
9998
+ "name": "GridProBaseDatasource",
9999
+ "module": "src/datasource/base.datasource.ts"
10000
+ }
10001
+ },
9912
10002
  {
9913
10003
  "kind": "method",
9914
10004
  "name": "mapTransaction",
@@ -9952,6 +10042,17 @@
9952
10042
  "module": "src/datasource/base.datasource.ts"
9953
10043
  }
9954
10044
  },
10045
+ {
10046
+ "kind": "field",
10047
+ "name": "session",
10048
+ "type": {
10049
+ "text": "Session"
10050
+ },
10051
+ "inheritedFrom": {
10052
+ "name": "GenesisGridDatasourceElement",
10053
+ "module": "src/datasource/base.datasource.ts"
10054
+ }
10055
+ },
9955
10056
  {
9956
10057
  "kind": "field",
9957
10058
  "name": "deferredGridOptions",
@@ -1,9 +1,11 @@
1
- import type { ColumnState, GridOptions, RowDataTransaction, ServerSideTransaction } from '@ag-grid-community/core';
1
+ import { ColumnState, GridOptions, RowDataTransaction, ServerSideTransaction } from '@ag-grid-community/core';
2
+ import { Session } from '@genesislcap/foundation-comms';
2
3
  import { Connect } from '@genesislcap/foundation-comms';
3
4
  import { FoundationElement } from '@microsoft/fast-foundation';
4
5
  import { GridPro } from '../grid-pro';
5
6
  export declare class GenesisGridDatasourceElement extends FoundationElement {
6
7
  connect: Connect;
8
+ session: Session;
7
9
  deferredGridOptions: GridOptions;
8
10
  deferredColumnStates: ColumnState[];
9
11
  /**
@@ -57,6 +59,7 @@ export declare class GridProBaseDatasource extends GenesisGridDatasourceElement
57
59
  protected applyAllAgTransactions(): void;
58
60
  private flashAddedCells;
59
61
  private applyMappedAgTransaction;
62
+ private setPreviouslySelectedCell;
60
63
  protected applyTransaction(agTransaction: RowDataTransaction): any;
61
64
  protected applyTransactionAsync(agTransaction: RowDataTransaction, callback?: (res: any) => void): void;
62
65
  /**
@@ -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,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,CAAC,WAAW,EAAE,GAAG,EAAE;IAuBhD,SAAS,CAAC,sBAAsB;IAsChC,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,wBAAwB;IA8BhC,OAAO,CAAC,yBAAyB;IAqBjC,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"}
@@ -230,27 +230,9 @@ declare const GridPro_base: (new (...args: any[]) => {
230
230
  querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6];
231
231
  querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7];
232
232
  querySelector<E_1 extends Element = Element>(selectors: string): E_1;
233
- querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>; /**
234
- * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
235
- * @deprecated use `applyTemplateDefinitions` instead.
236
- * @param columnDefs - The column definitions to apply to the grid.
237
- * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
238
- * @returns The merged column definitions.
239
- */
240
- querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>; /**
241
- * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
242
- * @deprecated use `applyTemplateDefinitions` instead.
243
- * @param columnDefs - The column definitions to apply to the grid.
244
- * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
245
- * @returns The merged column definitions.
246
- */
247
- querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>; /**
248
- * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
249
- * @deprecated use `applyTemplateDefinitions` instead.
250
- * @param columnDefs - The column definitions to apply to the grid.
251
- * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
252
- * @returns The merged column definitions.
253
- */
233
+ querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
234
+ querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
235
+ querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
254
236
  replaceChildren(...nodes: (string | Node)[]): void;
255
237
  readonly assignedSlot: HTMLSlotElement;
256
238
  oncopy: (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any;
@@ -425,6 +407,12 @@ export declare class GridPro extends GridPro_base {
425
407
  rowHeight: number;
426
408
  theme: string;
427
409
  themeChanged(oldValue: string, newValue: string): void;
410
+ /**
411
+ * If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records
412
+ * @remarks Defaults to false
413
+ * @alpha
414
+ */
415
+ blockScrollingOnContextMenu: boolean;
428
416
  classNames: string;
429
417
  agGrid: Grid;
430
418
  gridSlot: HTMLSlotElement;
@@ -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,EACT,WAAW,EAEX,OAAO,EACP,WAAW,EAEZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAiB,IAAI,EA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,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 { DatasourceDefaults } from '@genesislcap/foundation-comms';
2
+ import { Events, } from '@ag-grid-community/core';
3
+ import { DatasourceDefaults, Session } 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() {
@@ -45,6 +46,9 @@ export class GenesisGridDatasourceElement extends FoundationElement {
45
46
  __decorate([
46
47
  Connect
47
48
  ], GenesisGridDatasourceElement.prototype, "connect", void 0);
49
+ __decorate([
50
+ Session
51
+ ], GenesisGridDatasourceElement.prototype, "session", void 0);
48
52
  __decorate([
49
53
  observable
50
54
  ], GenesisGridDatasourceElement.prototype, "deferredGridOptions", void 0);
@@ -177,12 +181,35 @@ export class GridProBaseDatasource extends GenesisGridDatasourceElement {
177
181
  this.applyTransactionAsync(this.mapTransaction(agTransaction, [operation]), (changedNodes) => {
178
182
  this.flashAddedCells(changedNodes.add);
179
183
  });
184
+ this.agGrid.gridApi.addEventListener(Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED, (e) => {
185
+ e.results.forEach((result) => {
186
+ if (result.add.length || result.remove.length) {
187
+ this.setPreviouslySelectedCell();
188
+ }
189
+ });
190
+ });
180
191
  }
181
192
  else {
182
193
  const changedNodes = this.applyTransaction(this.mapTransaction(agTransaction, [operation]));
183
194
  this.flashAddedCells(changedNodes.add);
195
+ this.setPreviouslySelectedCell();
184
196
  }
185
197
  }
198
+ setPreviouslySelectedCell() {
199
+ debugger;
200
+ if (!this.agGrid.blockScrollingOnContextMenu) {
201
+ return;
202
+ }
203
+ const previouslySelectedRowId = this.session.getSessionStorageItem('selectedRowId');
204
+ const previouslySelectedRowNode = this.agGrid.gridApi.getRowNode(previouslySelectedRowId);
205
+ const previouslySelectedColId = this.session.getSessionStorageItem('selectedColId');
206
+ if (!previouslySelectedRowNode || !previouslySelectedColId)
207
+ return;
208
+ DOM.queueUpdate(() => {
209
+ this.agGrid.gridApi.setFocusedCell(previouslySelectedRowNode.rowIndex, previouslySelectedColId);
210
+ this.agGrid.gridApi.ensureIndexVisible(previouslySelectedRowNode.rowIndex, 'middle');
211
+ });
212
+ }
186
213
  applyTransaction(agTransaction) {
187
214
  throw new Error('Method not implemented.');
188
215
  }
@@ -96,6 +96,12 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
96
96
  this.gridFontFace = defaultAgGridFontFace;
97
97
  this.columnComponentName = 'grid-pro-column';
98
98
  this.theme = AgGridTheme.alpine;
99
+ /**
100
+ * If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records
101
+ * @remarks Defaults to false
102
+ * @alpha
103
+ */
104
+ this.blockScrollingOnContextMenu = false;
99
105
  this.rehydrationAttempted = false;
100
106
  this.filterConfig = undefined;
101
107
  this.agAttributes = {};
@@ -255,7 +261,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
255
261
  return;
256
262
  this.agAttributes[attrName] = attribute.value;
257
263
  });
258
- const { columnDefs, components, defaultColDef, onGridReady, onFirstDataRendered } = options, rest = __rest(options, ["columnDefs", "components", "defaultColDef", "onGridReady", "onFirstDataRendered"]);
264
+ const { columnDefs, components, defaultColDef, onCellContextMenu, onGridReady, onFirstDataRendered } = options, rest = __rest(options, ["columnDefs", "components", "defaultColDef", "onCellContextMenu", "onGridReady", "onFirstDataRendered"]);
259
265
  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) => {
260
266
  var _a, _b;
261
267
  this.gridApi = (_a = options.api) !== null && _a !== void 0 ? _a : event.api;
@@ -274,7 +280,19 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
274
280
  if (onFirstDataRendered) {
275
281
  onFirstDataRendered(event);
276
282
  }
277
- }, onColumnPinned: gridOnChangeCallback, onColumnResized: gridOnChangeCallback, onColumnMoved: gridOnChangeCallback, onDisplayedColumnsChanged: gridOnChangeCallback, onFilterChanged: gridOnChangeCallback, onGridSizeChanged: gridOnChangeCallback, onSortChanged: gridOnChangeCallback }), rest);
283
+ }, onColumnPinned: gridOnChangeCallback, onColumnResized: gridOnChangeCallback, onColumnMoved: gridOnChangeCallback, onDisplayedColumnsChanged: gridOnChangeCallback, onFilterChanged: gridOnChangeCallback, onGridSizeChanged: gridOnChangeCallback, onSortChanged: gridOnChangeCallback, onCellContextMenu: (event) => {
284
+ if (this.blockScrollingOnContextMenu) {
285
+ this.session.setSessionStorageItem('selectedRowId', event.node.id);
286
+ this.session.setSessionStorageItem('selectedColId', event.colDef.colId);
287
+ this.addEventListener('click', (e) => {
288
+ this.session.removeSessionStorageItem('selectedRowId');
289
+ this.session.removeSessionStorageItem('selectedColId');
290
+ }, { once: true });
291
+ }
292
+ if (onCellContextMenu) {
293
+ onCellContextMenu(event);
294
+ }
295
+ } }), rest);
278
296
  if (this.gridProDatasource) {
279
297
  derivedOptions.columnDefs = columnDefs;
280
298
  }
@@ -486,6 +504,9 @@ __decorate([
486
504
  __decorate([
487
505
  attr
488
506
  ], GridPro.prototype, "theme", void 0);
507
+ __decorate([
508
+ attr({ attribute: 'block-scrolling-on-context-menu', mode: 'boolean' })
509
+ ], GridPro.prototype, "blockScrollingOnContextMenu", void 0);
489
510
  __decorate([
490
511
  observable
491
512
  ], GridPro.prototype, "classNames", void 0);
@@ -37,10 +37,11 @@ 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
+ import { Session } from '@genesislcap/foundation-comms';
44
45
  import { SocketObservable } from '@genesislcap/foundation-comms';
45
46
  import { Swatch } from '@microsoft/fast-components';
46
47
  import { SwatchRGB } from '@microsoft/fast-components';
@@ -939,6 +940,7 @@ declare interface FuiCellRendererParams extends ICellRendererParams {
939
940
 
940
941
  declare class GenesisGridDatasourceElement extends FoundationElement {
941
942
  connect: Connect;
943
+ session: Session;
942
944
  deferredGridOptions: GridOptions;
943
945
  deferredColumnStates: ColumnState[];
944
946
  /**
@@ -1205,6 +1207,12 @@ export declare class GridPro extends GridPro_base {
1205
1207
  rowHeight: number;
1206
1208
  theme: string;
1207
1209
  themeChanged(oldValue: string, newValue: string): void;
1210
+ /**
1211
+ * If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records
1212
+ * @remarks Defaults to false
1213
+ * @alpha
1214
+ */
1215
+ blockScrollingOnContextMenu: boolean;
1208
1216
  classNames: string;
1209
1217
  agGrid: Grid;
1210
1218
  gridSlot: HTMLSlotElement;
@@ -1511,27 +1519,9 @@ declare const GridPro_base: (new (...args: any[]) => {
1511
1519
  querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6];
1512
1520
  querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7];
1513
1521
  querySelector<E_1 extends Element = Element>(selectors: string): E_1;
1514
- querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>; /**
1515
- * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
1516
- * @deprecated use `applyTemplateDefinitions` instead.
1517
- * @param columnDefs - The column definitions to apply to the grid.
1518
- * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
1519
- * @returns The merged column definitions.
1520
- */
1521
- querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>; /**
1522
- * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
1523
- * @deprecated use `applyTemplateDefinitions` instead.
1524
- * @param columnDefs - The column definitions to apply to the grid.
1525
- * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
1526
- * @returns The merged column definitions.
1527
- */
1528
- querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>; /**
1529
- * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
1530
- * @deprecated use `applyTemplateDefinitions` instead.
1531
- * @param columnDefs - The column definitions to apply to the grid.
1532
- * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
1533
- * @returns The merged column definitions.
1534
- */
1522
+ querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
1523
+ querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
1524
+ querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
1535
1525
  replaceChildren(...nodes: (string | Node)[]): void;
1536
1526
  readonly assignedSlot: HTMLSlotElement;
1537
1527
  oncopy: (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any;
@@ -1653,6 +1643,7 @@ declare class GridProBaseDatasource extends GenesisGridDatasourceElement {
1653
1643
  protected applyAllAgTransactions(): void;
1654
1644
  private flashAddedCells;
1655
1645
  private applyMappedAgTransaction;
1646
+ private setPreviouslySelectedCell;
1656
1647
  protected applyTransaction(agTransaction: RowDataTransaction): any;
1657
1648
  protected applyTransactionAsync(agTransaction: RowDataTransaction, callback?: (res: any) => void): void;
1658
1649
  /**
@@ -43,10 +43,11 @@ 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
+ import { Session } from '@genesislcap/foundation-comms';
50
51
  import { SocketObservable } from '@genesislcap/foundation-comms';
51
52
  import { Swatch } from '@microsoft/fast-components';
52
53
  import { SwatchRGB } from '@microsoft/fast-components';
@@ -796,6 +797,8 @@ export class GridPro extends GridPro_base {
796
797
  asyncUpdate: boolean;
797
798
  // (undocumented)
798
799
  autoCellRendererByType: boolean;
800
+ // @alpha
801
+ blockScrollingOnContextMenu: boolean;
799
802
  // (undocumented)
800
803
  classNames: string;
801
804
  // (undocumented)
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.144.1",
4
+ "version": "14.144.2-alpha-d5a1f36.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -30,15 +30,15 @@
30
30
  "test:debug": "genx test --debug"
31
31
  },
32
32
  "devDependencies": {
33
- "@genesislcap/foundation-testing": "14.144.1",
34
- "@genesislcap/genx": "14.144.1",
33
+ "@genesislcap/foundation-testing": "14.144.2-alpha-d5a1f36.0",
34
+ "@genesislcap/genx": "14.144.2-alpha-d5a1f36.0",
35
35
  "rimraf": "^3.0.2"
36
36
  },
37
37
  "dependencies": {
38
- "@genesislcap/foundation-comms": "14.144.1",
39
- "@genesislcap/foundation-logger": "14.144.1",
40
- "@genesislcap/foundation-ui": "14.144.1",
41
- "@genesislcap/foundation-utils": "14.144.1",
38
+ "@genesislcap/foundation-comms": "14.144.2-alpha-d5a1f36.0",
39
+ "@genesislcap/foundation-logger": "14.144.2-alpha-d5a1f36.0",
40
+ "@genesislcap/foundation-ui": "14.144.2-alpha-d5a1f36.0",
41
+ "@genesislcap/foundation-utils": "14.144.2-alpha-d5a1f36.0",
42
42
  "@microsoft/fast-colors": "^5.3.1",
43
43
  "@microsoft/fast-components": "^2.30.6",
44
44
  "@microsoft/fast-element": "^1.12.0",
@@ -62,5 +62,5 @@
62
62
  "access": "public"
63
63
  },
64
64
  "customElements": "dist/custom-elements.json",
65
- "gitHead": "35ac01f58ce5a5502d34247e49ab93d0888cd3f7"
65
+ "gitHead": "c6ae2c9e0d8774373917940b74613776a1010fa7"
66
66
  }