@genesislcap/grid-pro 14.154.3-alpha-005efd0.0 → 14.154.3-alpha-359bdfd.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.
- package/dist/custom-elements.json +64 -0
- package/dist/dts/datasource/base.datasource.d.ts +2 -1
- package/dist/dts/datasource/base.datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +8 -14
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/esm/datasource/base.datasource.js +25 -1
- package/dist/esm/grid-pro.js +24 -2
- package/dist/grid-pro.api.json +60 -0
- package/dist/grid-pro.d.ts +11 -16
- package/docs/api/grid-pro.gridpro.md +2 -0
- package/docs/api/grid-pro.gridpro.selectedcolid.md +11 -0
- package/docs/api/grid-pro.gridpro.selectedrowid.md +11 -0
- package/docs/api-report.md +8 -2
- package/package.json +13 -13
|
@@ -453,6 +453,15 @@
|
|
|
453
453
|
}
|
|
454
454
|
]
|
|
455
455
|
},
|
|
456
|
+
{
|
|
457
|
+
"kind": "field",
|
|
458
|
+
"name": "blockScrollingOnContextMenu",
|
|
459
|
+
"type": {
|
|
460
|
+
"text": "boolean"
|
|
461
|
+
},
|
|
462
|
+
"default": "false",
|
|
463
|
+
"description": "If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records"
|
|
464
|
+
},
|
|
456
465
|
{
|
|
457
466
|
"kind": "field",
|
|
458
467
|
"name": "classNames",
|
|
@@ -549,6 +558,20 @@
|
|
|
549
558
|
"privacy": "private",
|
|
550
559
|
"default": "undefined"
|
|
551
560
|
},
|
|
561
|
+
{
|
|
562
|
+
"kind": "field",
|
|
563
|
+
"name": "selectedRowId",
|
|
564
|
+
"type": {
|
|
565
|
+
"text": "string"
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"kind": "field",
|
|
570
|
+
"name": "selectedColId",
|
|
571
|
+
"type": {
|
|
572
|
+
"text": "string"
|
|
573
|
+
}
|
|
574
|
+
},
|
|
552
575
|
{
|
|
553
576
|
"kind": "field",
|
|
554
577
|
"name": "gridOptionsConfig",
|
|
@@ -1136,6 +1159,15 @@
|
|
|
1136
1159
|
"text": "string"
|
|
1137
1160
|
},
|
|
1138
1161
|
"fieldName": "theme"
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"name": "block-scrolling-on-context-menu",
|
|
1165
|
+
"type": {
|
|
1166
|
+
"text": "boolean"
|
|
1167
|
+
},
|
|
1168
|
+
"default": "false",
|
|
1169
|
+
"description": "If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records",
|
|
1170
|
+
"fieldName": "blockScrollingOnContextMenu"
|
|
1139
1171
|
}
|
|
1140
1172
|
],
|
|
1141
1173
|
"mixins": [
|
|
@@ -5939,6 +5971,11 @@
|
|
|
5939
5971
|
}
|
|
5940
5972
|
]
|
|
5941
5973
|
},
|
|
5974
|
+
{
|
|
5975
|
+
"kind": "method",
|
|
5976
|
+
"name": "setPreviouslySelectedCell",
|
|
5977
|
+
"privacy": "private"
|
|
5978
|
+
},
|
|
5942
5979
|
{
|
|
5943
5980
|
"kind": "method",
|
|
5944
5981
|
"name": "applyTransaction",
|
|
@@ -7222,6 +7259,15 @@
|
|
|
7222
7259
|
"module": "src/datasource/base.datasource.ts"
|
|
7223
7260
|
}
|
|
7224
7261
|
},
|
|
7262
|
+
{
|
|
7263
|
+
"kind": "method",
|
|
7264
|
+
"name": "setPreviouslySelectedCell",
|
|
7265
|
+
"privacy": "private",
|
|
7266
|
+
"inheritedFrom": {
|
|
7267
|
+
"name": "GridProBaseDatasource",
|
|
7268
|
+
"module": "src/datasource/base.datasource.ts"
|
|
7269
|
+
}
|
|
7270
|
+
},
|
|
7225
7271
|
{
|
|
7226
7272
|
"kind": "method",
|
|
7227
7273
|
"name": "mapTransaction",
|
|
@@ -8525,6 +8571,15 @@
|
|
|
8525
8571
|
"module": "src/datasource/base.datasource.ts"
|
|
8526
8572
|
}
|
|
8527
8573
|
},
|
|
8574
|
+
{
|
|
8575
|
+
"kind": "method",
|
|
8576
|
+
"name": "setPreviouslySelectedCell",
|
|
8577
|
+
"privacy": "private",
|
|
8578
|
+
"inheritedFrom": {
|
|
8579
|
+
"name": "GridProBaseDatasource",
|
|
8580
|
+
"module": "src/datasource/base.datasource.ts"
|
|
8581
|
+
}
|
|
8582
|
+
},
|
|
8528
8583
|
{
|
|
8529
8584
|
"kind": "method",
|
|
8530
8585
|
"name": "mapTransaction",
|
|
@@ -9994,6 +10049,15 @@
|
|
|
9994
10049
|
"module": "src/datasource/base.datasource.ts"
|
|
9995
10050
|
}
|
|
9996
10051
|
},
|
|
10052
|
+
{
|
|
10053
|
+
"kind": "method",
|
|
10054
|
+
"name": "setPreviouslySelectedCell",
|
|
10055
|
+
"privacy": "private",
|
|
10056
|
+
"inheritedFrom": {
|
|
10057
|
+
"name": "GridProBaseDatasource",
|
|
10058
|
+
"module": "src/datasource/base.datasource.ts"
|
|
10059
|
+
}
|
|
10060
|
+
},
|
|
9997
10061
|
{
|
|
9998
10062
|
"kind": "method",
|
|
9999
10063
|
"name": "mapTransaction",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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,
|
|
1
|
+
{"version":3,"file":"base.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/base.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EAEX,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,MAAM,EAAE,GAAG,CAAC,CAAa;IAEtC,SAAS,CAAC,aAAa,EAAE,kBAAkB,GAAG,qBAAqB,CAIjE;IAEF,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC;IAChC,SAAS,CAAC,kBAAkB,EAAE,MAAM,CAAC;IAErC,SAAS,CAAC,mBAAmB,CAAC,YAAY,EAAE,GAAG,EAAE;IAgBjD,SAAS,CAAC,mBAAmB,CAAC,WAAW,EAAE,GAAG,EAAE;IAgBhD,SAAS,CAAC,mBAAmB,CAAC,WAAW,EAAE,GAAG,EAAE;IAuBhD,SAAS,CAAC,sBAAsB;IAsChC,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,wBAAwB;IAqChC,OAAO,CAAC,yBAAyB;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"}
|
package/dist/dts/grid-pro.d.ts
CHANGED
|
@@ -45,20 +45,6 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
45
45
|
removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions): void;
|
|
46
46
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
47
47
|
readonly attributes: NamedNodeMap;
|
|
48
|
-
/**
|
|
49
|
-
* Injectable config that allows to change grid options on an app level basis
|
|
50
|
-
* To modify options, register instance of the config in DOM container that is
|
|
51
|
-
* above the grid or on the top level of the application, so it applies to all grids.
|
|
52
|
-
*
|
|
53
|
-
* @example
|
|
54
|
-
* ```
|
|
55
|
-
* DI.getOrCreateDOMContainer().register([
|
|
56
|
-
* Registration.instance<GridOptionsConfig>(GridOptionsConfig, {
|
|
57
|
-
* headerHeight: 50,
|
|
58
|
-
* }),
|
|
59
|
-
* ]);
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
48
|
readonly classList: DOMTokenList;
|
|
63
49
|
className: string;
|
|
64
50
|
readonly clientHeight: number;
|
|
@@ -414,6 +400,12 @@ export declare class GridPro extends GridPro_base {
|
|
|
414
400
|
rowHeight: number;
|
|
415
401
|
theme: string;
|
|
416
402
|
themeChanged(oldValue: string, newValue: string): void;
|
|
403
|
+
/**
|
|
404
|
+
* If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records
|
|
405
|
+
* @remarks Defaults to false
|
|
406
|
+
* @alpha
|
|
407
|
+
*/
|
|
408
|
+
blockScrollingOnContextMenu: boolean;
|
|
417
409
|
classNames: string;
|
|
418
410
|
agGrid: Grid;
|
|
419
411
|
gridSlot: HTMLSlotElement;
|
|
@@ -428,6 +420,8 @@ export declare class GridPro extends GridPro_base {
|
|
|
428
420
|
private rehydrationAttempted;
|
|
429
421
|
private gridEventsQueue;
|
|
430
422
|
private filterConfig;
|
|
423
|
+
selectedRowId: string;
|
|
424
|
+
selectedColId: string;
|
|
431
425
|
/**
|
|
432
426
|
* Injectable config that allows to change grid options on an app level basis
|
|
433
427
|
* To modify options, register instance of the config in DOM container that is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,SAAS,EACT,WAAW,EAGX,IAAI,EACJ,OAAO,EACP,WA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AAe;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
|
}
|
package/dist/esm/grid-pro.js
CHANGED
|
@@ -92,6 +92,12 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
92
92
|
this.gridFontFace = defaultAgGridFontFace;
|
|
93
93
|
this.columnComponentName = 'grid-pro-column';
|
|
94
94
|
this.theme = AgGridTheme.alpine;
|
|
95
|
+
/**
|
|
96
|
+
* If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records
|
|
97
|
+
* @remarks Defaults to false
|
|
98
|
+
* @alpha
|
|
99
|
+
*/
|
|
100
|
+
this.blockScrollingOnContextMenu = false;
|
|
95
101
|
this.rehydrationAttempted = false;
|
|
96
102
|
this.gridEventsQueue = [];
|
|
97
103
|
this.filterConfig = undefined;
|
|
@@ -270,7 +276,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
270
276
|
return;
|
|
271
277
|
this.agAttributes[attrName] = attribute.value;
|
|
272
278
|
});
|
|
273
|
-
const { columnDefs, components, defaultColDef, onGridReady, onFirstDataRendered } = options, rest = __rest(options, ["columnDefs", "components", "defaultColDef", "onGridReady", "onFirstDataRendered"]);
|
|
279
|
+
const { columnDefs, components, defaultColDef, onCellContextMenu, onGridReady, onFirstDataRendered } = options, rest = __rest(options, ["columnDefs", "components", "defaultColDef", "onCellContextMenu", "onGridReady", "onFirstDataRendered"]);
|
|
274
280
|
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) => {
|
|
275
281
|
var _a, _b;
|
|
276
282
|
this.gridApi = (_a = options.api) !== null && _a !== void 0 ? _a : event.api;
|
|
@@ -294,7 +300,20 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
294
300
|
if (onFirstDataRendered) {
|
|
295
301
|
onFirstDataRendered(event);
|
|
296
302
|
}
|
|
297
|
-
}, onColumnPinned: gridOnChangeCallback, onColumnResized: gridOnChangeCallback, onColumnMoved: gridOnChangeCallback, onDisplayedColumnsChanged: gridOnChangeCallback, onFilterChanged: gridOnChangeCallback, onGridSizeChanged: gridOnChangeCallback, onSortChanged: gridOnChangeCallback
|
|
303
|
+
}, onColumnPinned: gridOnChangeCallback, onColumnResized: gridOnChangeCallback, onColumnMoved: gridOnChangeCallback, onDisplayedColumnsChanged: gridOnChangeCallback, onFilterChanged: gridOnChangeCallback, onGridSizeChanged: gridOnChangeCallback, onSortChanged: gridOnChangeCallback, onCellContextMenu: (event) => {
|
|
304
|
+
if (this.blockScrollingOnContextMenu) {
|
|
305
|
+
debugger;
|
|
306
|
+
this.selectedRowId = event.node.id;
|
|
307
|
+
this.selectedColId = event.colDef.colId;
|
|
308
|
+
this.addEventListener('click', (e) => {
|
|
309
|
+
this.selectedRowId = undefined;
|
|
310
|
+
this.selectedColId = undefined;
|
|
311
|
+
}, { once: true });
|
|
312
|
+
}
|
|
313
|
+
if (onCellContextMenu) {
|
|
314
|
+
onCellContextMenu(event);
|
|
315
|
+
}
|
|
316
|
+
} }), rest);
|
|
298
317
|
if (this.gridProDatasource) {
|
|
299
318
|
derivedOptions.columnDefs = columnDefs;
|
|
300
319
|
this.initGridOptions(derivedOptions, globalEventListener);
|
|
@@ -528,6 +547,9 @@ __decorate([
|
|
|
528
547
|
__decorate([
|
|
529
548
|
attr
|
|
530
549
|
], GridPro.prototype, "theme", void 0);
|
|
550
|
+
__decorate([
|
|
551
|
+
attr({ attribute: 'block-scrolling-on-context-menu', mode: 'boolean' })
|
|
552
|
+
], GridPro.prototype, "blockScrollingOnContextMenu", void 0);
|
|
531
553
|
__decorate([
|
|
532
554
|
observable
|
|
533
555
|
], GridPro.prototype, "classNames", void 0);
|
package/dist/grid-pro.api.json
CHANGED
|
@@ -8932,6 +8932,66 @@
|
|
|
8932
8932
|
"isProtected": false,
|
|
8933
8933
|
"isAbstract": false
|
|
8934
8934
|
},
|
|
8935
|
+
{
|
|
8936
|
+
"kind": "Property",
|
|
8937
|
+
"canonicalReference": "@genesislcap/grid-pro!GridPro#selectedColId:member",
|
|
8938
|
+
"docComment": "",
|
|
8939
|
+
"excerptTokens": [
|
|
8940
|
+
{
|
|
8941
|
+
"kind": "Content",
|
|
8942
|
+
"text": "selectedColId: "
|
|
8943
|
+
},
|
|
8944
|
+
{
|
|
8945
|
+
"kind": "Content",
|
|
8946
|
+
"text": "string"
|
|
8947
|
+
},
|
|
8948
|
+
{
|
|
8949
|
+
"kind": "Content",
|
|
8950
|
+
"text": ";"
|
|
8951
|
+
}
|
|
8952
|
+
],
|
|
8953
|
+
"isReadonly": false,
|
|
8954
|
+
"isOptional": false,
|
|
8955
|
+
"releaseTag": "Public",
|
|
8956
|
+
"name": "selectedColId",
|
|
8957
|
+
"propertyTypeTokenRange": {
|
|
8958
|
+
"startIndex": 1,
|
|
8959
|
+
"endIndex": 2
|
|
8960
|
+
},
|
|
8961
|
+
"isStatic": false,
|
|
8962
|
+
"isProtected": false,
|
|
8963
|
+
"isAbstract": false
|
|
8964
|
+
},
|
|
8965
|
+
{
|
|
8966
|
+
"kind": "Property",
|
|
8967
|
+
"canonicalReference": "@genesislcap/grid-pro!GridPro#selectedRowId:member",
|
|
8968
|
+
"docComment": "",
|
|
8969
|
+
"excerptTokens": [
|
|
8970
|
+
{
|
|
8971
|
+
"kind": "Content",
|
|
8972
|
+
"text": "selectedRowId: "
|
|
8973
|
+
},
|
|
8974
|
+
{
|
|
8975
|
+
"kind": "Content",
|
|
8976
|
+
"text": "string"
|
|
8977
|
+
},
|
|
8978
|
+
{
|
|
8979
|
+
"kind": "Content",
|
|
8980
|
+
"text": ";"
|
|
8981
|
+
}
|
|
8982
|
+
],
|
|
8983
|
+
"isReadonly": false,
|
|
8984
|
+
"isOptional": false,
|
|
8985
|
+
"releaseTag": "Public",
|
|
8986
|
+
"name": "selectedRowId",
|
|
8987
|
+
"propertyTypeTokenRange": {
|
|
8988
|
+
"startIndex": 1,
|
|
8989
|
+
"endIndex": 2
|
|
8990
|
+
},
|
|
8991
|
+
"isStatic": false,
|
|
8992
|
+
"isProtected": false,
|
|
8993
|
+
"isAbstract": false
|
|
8994
|
+
},
|
|
8935
8995
|
{
|
|
8936
8996
|
"kind": "Method",
|
|
8937
8997
|
"canonicalReference": "@genesislcap/grid-pro!GridPro#statePersistanceEnabled:member(1)",
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -38,9 +38,9 @@ import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
|
|
|
38
38
|
import { Logger } from '@genesislcap/foundation-logger';
|
|
39
39
|
import { MetadataDetail } from '@genesislcap/foundation-comms';
|
|
40
40
|
import { OverrideFoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
41
|
-
import
|
|
41
|
+
import { RowDataTransaction } from '@ag-grid-community/core';
|
|
42
42
|
import type { RowNodeTransaction } from '@ag-grid-community/core';
|
|
43
|
-
import
|
|
43
|
+
import { ServerSideTransaction } from '@ag-grid-community/core';
|
|
44
44
|
import type { ServerSideTransactionResult } from '@ag-grid-community/core';
|
|
45
45
|
import { Session } from '@genesislcap/foundation-comms';
|
|
46
46
|
import { SocketObservable } from '@genesislcap/foundation-comms';
|
|
@@ -1231,6 +1231,12 @@ export declare class GridPro extends GridPro_base {
|
|
|
1231
1231
|
rowHeight: number;
|
|
1232
1232
|
theme: string;
|
|
1233
1233
|
themeChanged(oldValue: string, newValue: string): void;
|
|
1234
|
+
/**
|
|
1235
|
+
* If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records
|
|
1236
|
+
* @remarks Defaults to false
|
|
1237
|
+
* @alpha
|
|
1238
|
+
*/
|
|
1239
|
+
blockScrollingOnContextMenu: boolean;
|
|
1234
1240
|
classNames: string;
|
|
1235
1241
|
agGrid: Grid;
|
|
1236
1242
|
gridSlot: HTMLSlotElement;
|
|
@@ -1245,6 +1251,8 @@ export declare class GridPro extends GridPro_base {
|
|
|
1245
1251
|
private rehydrationAttempted;
|
|
1246
1252
|
private gridEventsQueue;
|
|
1247
1253
|
private filterConfig;
|
|
1254
|
+
selectedRowId: string;
|
|
1255
|
+
selectedColId: string;
|
|
1248
1256
|
/**
|
|
1249
1257
|
* Injectable config that allows to change grid options on an app level basis
|
|
1250
1258
|
* To modify options, register instance of the config in DOM container that is
|
|
@@ -1364,20 +1372,6 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
1364
1372
|
removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions): void;
|
|
1365
1373
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1366
1374
|
readonly attributes: NamedNodeMap;
|
|
1367
|
-
/**
|
|
1368
|
-
* Injectable config that allows to change grid options on an app level basis
|
|
1369
|
-
* To modify options, register instance of the config in DOM container that is
|
|
1370
|
-
* above the grid or on the top level of the application, so it applies to all grids.
|
|
1371
|
-
*
|
|
1372
|
-
* @example
|
|
1373
|
-
* ```
|
|
1374
|
-
* DI.getOrCreateDOMContainer().register([
|
|
1375
|
-
* Registration.instance<GridOptionsConfig>(GridOptionsConfig, {
|
|
1376
|
-
* headerHeight: 50,
|
|
1377
|
-
* }),
|
|
1378
|
-
* ]);
|
|
1379
|
-
* ```
|
|
1380
|
-
*/
|
|
1381
1375
|
readonly classList: DOMTokenList;
|
|
1382
1376
|
className: string;
|
|
1383
1377
|
readonly clientHeight: number;
|
|
@@ -1674,6 +1668,7 @@ declare class GridProBaseDatasource extends GenesisGridDatasourceElement {
|
|
|
1674
1668
|
protected applyAllAgTransactions(): void;
|
|
1675
1669
|
private flashAddedCells;
|
|
1676
1670
|
private applyMappedAgTransaction;
|
|
1671
|
+
private setPreviouslySelectedCell;
|
|
1677
1672
|
protected applyTransaction(agTransaction: RowDataTransaction): any;
|
|
1678
1673
|
protected applyTransactionAsync(agTransaction: RowDataTransaction, callback?: (res: any) => void): void;
|
|
1679
1674
|
/**
|
|
@@ -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
|
| [statePersistence](./grid-pro.gridpro.statepersistence.md) | | [StatePersistence](./grid-pro.statepersistence.md) | |
|
|
62
64
|
| [theme](./grid-pro.gridpro.theme.md) | | string | |
|
|
63
65
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [GridPro](./grid-pro.gridpro.md) > [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) > [@genesislcap/grid-pro](./grid-pro.md) > [GridPro](./grid-pro.gridpro.md) > [selectedRowId](./grid-pro.gridpro.selectedrowid.md)
|
|
4
|
+
|
|
5
|
+
## GridPro.selectedRowId property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
selectedRowId: string;
|
|
11
|
+
```
|
package/docs/api-report.md
CHANGED
|
@@ -44,9 +44,9 @@ import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
|
|
|
44
44
|
import { Logger } from '@genesislcap/foundation-logger';
|
|
45
45
|
import { MetadataDetail } from '@genesislcap/foundation-comms';
|
|
46
46
|
import { OverrideFoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
47
|
-
import
|
|
47
|
+
import { RowDataTransaction } from '@ag-grid-community/core';
|
|
48
48
|
import type { RowNodeTransaction } from '@ag-grid-community/core';
|
|
49
|
-
import
|
|
49
|
+
import { ServerSideTransaction } from '@ag-grid-community/core';
|
|
50
50
|
import type { ServerSideTransactionResult } from '@ag-grid-community/core';
|
|
51
51
|
import { Session } from '@genesislcap/foundation-comms';
|
|
52
52
|
import { SocketObservable } from '@genesislcap/foundation-comms';
|
|
@@ -806,6 +806,8 @@ export class GridPro extends GridPro_base {
|
|
|
806
806
|
asyncUpdate: boolean;
|
|
807
807
|
// (undocumented)
|
|
808
808
|
autoCellRendererByType: boolean;
|
|
809
|
+
// @alpha
|
|
810
|
+
blockScrollingOnContextMenu: boolean;
|
|
809
811
|
// (undocumented)
|
|
810
812
|
classNames: string;
|
|
811
813
|
// (undocumented)
|
|
@@ -860,6 +862,10 @@ export class GridPro extends GridPro_base {
|
|
|
860
862
|
// (undocumented)
|
|
861
863
|
rowHeight: number;
|
|
862
864
|
// (undocumented)
|
|
865
|
+
selectedColId: string;
|
|
866
|
+
// (undocumented)
|
|
867
|
+
selectedRowId: string;
|
|
868
|
+
// (undocumented)
|
|
863
869
|
statePersistanceEnabled(): boolean;
|
|
864
870
|
// (undocumented)
|
|
865
871
|
statePersistence: StatePersistence;
|
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.154.3-alpha-
|
|
4
|
+
"version": "14.154.3-alpha-359bdfd.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.154.3-alpha-
|
|
34
|
-
"@genesislcap/genx": "14.154.3-alpha-
|
|
35
|
-
"@genesislcap/rollup-builder": "14.154.3-alpha-
|
|
36
|
-
"@genesislcap/ts-builder": "14.154.3-alpha-
|
|
37
|
-
"@genesislcap/uvu-playwright-builder": "14.154.3-alpha-
|
|
38
|
-
"@genesislcap/vite-builder": "14.154.3-alpha-
|
|
39
|
-
"@genesislcap/webpack-builder": "14.154.3-alpha-
|
|
33
|
+
"@genesislcap/foundation-testing": "14.154.3-alpha-359bdfd.0",
|
|
34
|
+
"@genesislcap/genx": "14.154.3-alpha-359bdfd.0",
|
|
35
|
+
"@genesislcap/rollup-builder": "14.154.3-alpha-359bdfd.0",
|
|
36
|
+
"@genesislcap/ts-builder": "14.154.3-alpha-359bdfd.0",
|
|
37
|
+
"@genesislcap/uvu-playwright-builder": "14.154.3-alpha-359bdfd.0",
|
|
38
|
+
"@genesislcap/vite-builder": "14.154.3-alpha-359bdfd.0",
|
|
39
|
+
"@genesislcap/webpack-builder": "14.154.3-alpha-359bdfd.0",
|
|
40
40
|
"rimraf": "^3.0.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@genesislcap/foundation-comms": "14.154.3-alpha-
|
|
44
|
-
"@genesislcap/foundation-logger": "14.154.3-alpha-
|
|
45
|
-
"@genesislcap/foundation-ui": "14.154.3-alpha-
|
|
46
|
-
"@genesislcap/foundation-utils": "14.154.3-alpha-
|
|
43
|
+
"@genesislcap/foundation-comms": "14.154.3-alpha-359bdfd.0",
|
|
44
|
+
"@genesislcap/foundation-logger": "14.154.3-alpha-359bdfd.0",
|
|
45
|
+
"@genesislcap/foundation-ui": "14.154.3-alpha-359bdfd.0",
|
|
46
|
+
"@genesislcap/foundation-utils": "14.154.3-alpha-359bdfd.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",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
71
|
"customElements": "dist/custom-elements.json",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "835f258ddff9da4f231dbe6493ebf0fa385a5c6b"
|
|
73
73
|
}
|