@genesislcap/grid-pro 14.175.0 → 14.176.1-alpha-6ef4895.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 +13 -1
- 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 +16 -3
- 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
|
@@ -502,6 +502,15 @@
|
|
|
502
502
|
}
|
|
503
503
|
]
|
|
504
504
|
},
|
|
505
|
+
{
|
|
506
|
+
"kind": "field",
|
|
507
|
+
"name": "blockScrollingOnContextMenu",
|
|
508
|
+
"type": {
|
|
509
|
+
"text": "boolean"
|
|
510
|
+
},
|
|
511
|
+
"default": "false",
|
|
512
|
+
"description": "If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records"
|
|
513
|
+
},
|
|
505
514
|
{
|
|
506
515
|
"kind": "field",
|
|
507
516
|
"name": "classNames",
|
|
@@ -633,6 +642,20 @@
|
|
|
633
642
|
}
|
|
634
643
|
]
|
|
635
644
|
},
|
|
645
|
+
{
|
|
646
|
+
"kind": "field",
|
|
647
|
+
"name": "selectedRowId",
|
|
648
|
+
"type": {
|
|
649
|
+
"text": "string"
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"kind": "field",
|
|
654
|
+
"name": "selectedColId",
|
|
655
|
+
"type": {
|
|
656
|
+
"text": "string"
|
|
657
|
+
}
|
|
658
|
+
},
|
|
636
659
|
{
|
|
637
660
|
"kind": "field",
|
|
638
661
|
"name": "gridOptionsConfig",
|
|
@@ -1250,6 +1273,15 @@
|
|
|
1250
1273
|
"text": "string"
|
|
1251
1274
|
},
|
|
1252
1275
|
"fieldName": "theme"
|
|
1276
|
+
},
|
|
1277
|
+
{
|
|
1278
|
+
"name": "block-scrolling-on-context-menu",
|
|
1279
|
+
"type": {
|
|
1280
|
+
"text": "boolean"
|
|
1281
|
+
},
|
|
1282
|
+
"default": "false",
|
|
1283
|
+
"description": "If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records",
|
|
1284
|
+
"fieldName": "blockScrollingOnContextMenu"
|
|
1253
1285
|
}
|
|
1254
1286
|
],
|
|
1255
1287
|
"mixins": [
|
|
@@ -6167,6 +6199,11 @@
|
|
|
6167
6199
|
}
|
|
6168
6200
|
]
|
|
6169
6201
|
},
|
|
6202
|
+
{
|
|
6203
|
+
"kind": "method",
|
|
6204
|
+
"name": "setPreviouslySelectedCell",
|
|
6205
|
+
"privacy": "private"
|
|
6206
|
+
},
|
|
6170
6207
|
{
|
|
6171
6208
|
"kind": "method",
|
|
6172
6209
|
"name": "applyTransaction",
|
|
@@ -7562,6 +7599,15 @@
|
|
|
7562
7599
|
"module": "src/datasource/base.datasource.ts"
|
|
7563
7600
|
}
|
|
7564
7601
|
},
|
|
7602
|
+
{
|
|
7603
|
+
"kind": "method",
|
|
7604
|
+
"name": "setPreviouslySelectedCell",
|
|
7605
|
+
"privacy": "private",
|
|
7606
|
+
"inheritedFrom": {
|
|
7607
|
+
"name": "GridProBaseDatasource",
|
|
7608
|
+
"module": "src/datasource/base.datasource.ts"
|
|
7609
|
+
}
|
|
7610
|
+
},
|
|
7565
7611
|
{
|
|
7566
7612
|
"kind": "method",
|
|
7567
7613
|
"name": "mapTransaction",
|
|
@@ -8940,6 +8986,15 @@
|
|
|
8940
8986
|
"module": "src/datasource/base.datasource.ts"
|
|
8941
8987
|
}
|
|
8942
8988
|
},
|
|
8989
|
+
{
|
|
8990
|
+
"kind": "method",
|
|
8991
|
+
"name": "setPreviouslySelectedCell",
|
|
8992
|
+
"privacy": "private",
|
|
8993
|
+
"inheritedFrom": {
|
|
8994
|
+
"name": "GridProBaseDatasource",
|
|
8995
|
+
"module": "src/datasource/base.datasource.ts"
|
|
8996
|
+
}
|
|
8997
|
+
},
|
|
8943
8998
|
{
|
|
8944
8999
|
"kind": "method",
|
|
8945
9000
|
"name": "mapTransaction",
|
|
@@ -10455,6 +10510,15 @@
|
|
|
10455
10510
|
"module": "src/datasource/base.datasource.ts"
|
|
10456
10511
|
}
|
|
10457
10512
|
},
|
|
10513
|
+
{
|
|
10514
|
+
"kind": "method",
|
|
10515
|
+
"name": "setPreviouslySelectedCell",
|
|
10516
|
+
"privacy": "private",
|
|
10517
|
+
"inheritedFrom": {
|
|
10518
|
+
"name": "GridProBaseDatasource",
|
|
10519
|
+
"module": "src/datasource/base.datasource.ts"
|
|
10520
|
+
}
|
|
10521
|
+
},
|
|
10458
10522
|
{
|
|
10459
10523
|
"kind": "method",
|
|
10460
10524
|
"name": "mapTransaction",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ColDef, ColumnState, GridOptions, RowDataTransaction, ServerSideTransaction } from '@ag-grid-community/core';
|
|
2
2
|
import { FieldMetadata } from '@genesislcap/foundation-comms';
|
|
3
3
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
4
4
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
@@ -59,6 +59,7 @@ export declare class GridProBaseDatasource extends GenesisGridDatasourceElement
|
|
|
59
59
|
protected applyAllAgTransactions(): void;
|
|
60
60
|
private flashAddedCells;
|
|
61
61
|
private applyMappedAgTransaction;
|
|
62
|
+
private setPreviouslySelectedCell;
|
|
62
63
|
protected applyTransaction(agTransaction: RowDataTransaction): any;
|
|
63
64
|
protected applyTransactionAsync(agTransaction: RowDataTransaction, callback?: (res: any) => void): void;
|
|
64
65
|
/**
|
|
@@ -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,MAAM,EACN,WAAW,EAEX,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,aAAa,EAGd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAStC,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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ION_CONTAINS: number;
|
|
154
154
|
readonly DOCUMENT_POSITION_DISCONNECTED: number;
|
|
155
|
-
readonly DOCUMENT_POSITION_FOLLOWING: number;
|
|
155
|
+
readonly DOCUMENT_POSITION_FOLLOWING: number; /**
|
|
156
|
+
* Because we try and resize the grid to fit using callbacks on events, this will cause
|
|
157
|
+
* a stack overflow of calls to resize, so we need to debounce it.
|
|
158
|
+
* @internal
|
|
159
|
+
*/
|
|
156
160
|
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
|
|
157
161
|
readonly DOCUMENT_POSITION_PRECEDING: number;
|
|
158
162
|
readonly DOCUMENT_TYPE_NODE: number;
|
|
@@ -409,6 +413,12 @@ export declare class GridPro extends GridPro_base {
|
|
|
409
413
|
rowHeight: number;
|
|
410
414
|
theme: string;
|
|
411
415
|
themeChanged(oldValue: string, newValue: string): void;
|
|
416
|
+
/**
|
|
417
|
+
* If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records
|
|
418
|
+
* @remarks Defaults to false
|
|
419
|
+
* @alpha
|
|
420
|
+
*/
|
|
421
|
+
blockScrollingOnContextMenu: boolean;
|
|
412
422
|
classNames: string;
|
|
413
423
|
agGrid: Grid;
|
|
414
424
|
gridSlot: HTMLSlotElement;
|
|
@@ -430,6 +440,8 @@ export declare class GridPro extends GridPro_base {
|
|
|
430
440
|
setFilterModel(value: {
|
|
431
441
|
[key: string]: any;
|
|
432
442
|
}): Promise<void>;
|
|
443
|
+
selectedRowId: string;
|
|
444
|
+
selectedColId: string;
|
|
433
445
|
/**
|
|
434
446
|
* Injectable config that allows to change grid options on an app level basis
|
|
435
447
|
* 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,WAAW,EAGZ,MA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C,WAAW,EAAE,CAAC;YAUrC,kBAAkB;IAYhC,OAAO,CAAC,iBAAiB;IAInB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC;IAShD;;OAEG;IACH,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,IAAI,iBAAiB,IACjB,wBAAwB,GACxB,2BAA2B,GAC3B,2BAA2B,CAM9B;IAED,IAAI,WAAW,CAAC,OAAO,EAAE,WAAW,EA0GnC;IAED,OAAO,CAAC,eAAe;IAwBvB;;;;;;OAMG;IACH,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,yBAAyB,UAAQ;IAKhF;;;;;;;;OAQG;IACG,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,yBAAyB,UAAQ;IAuFzF,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, FieldTypeEnum, logger, } 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
|
import { dateValueFormatter, dateTimeValueFormatter, getColumnType, getFilterByFieldType, } from '../grid-pro.definitions';
|
|
7
8
|
import { GridProRendererTypes } from '../grid-pro.types';
|
|
@@ -232,12 +233,35 @@ export class GridProBaseDatasource extends GenesisGridDatasourceElement {
|
|
|
232
233
|
this.applyTransactionAsync(this.mapTransaction(agTransaction, [operation]), (changedNodes) => {
|
|
233
234
|
this.flashAddedCells(changedNodes.add);
|
|
234
235
|
});
|
|
236
|
+
if (this.agGrid.blockScrollingOnContextMenu) {
|
|
237
|
+
const listenerEvent = (e) => {
|
|
238
|
+
e.results.forEach((result) => {
|
|
239
|
+
if (result.add.length || result.remove.length) {
|
|
240
|
+
this.setPreviouslySelectedCell();
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
this.agGrid.gridApi.addEventListener(Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED, listenerEvent);
|
|
245
|
+
}
|
|
235
246
|
}
|
|
236
247
|
else {
|
|
237
248
|
const changedNodes = this.applyTransaction(this.mapTransaction(agTransaction, [operation]));
|
|
238
249
|
this.flashAddedCells(changedNodes.add);
|
|
250
|
+
if (this.agGrid.blockScrollingOnContextMenu) {
|
|
251
|
+
this.setPreviouslySelectedCell();
|
|
252
|
+
}
|
|
239
253
|
}
|
|
240
254
|
}
|
|
255
|
+
setPreviouslySelectedCell() {
|
|
256
|
+
const previouslySelectedRowNode = this.agGrid.gridApi.getRowNode(this.agGrid.selectedRowId);
|
|
257
|
+
const previouslySelectedColId = this.agGrid.selectedColId;
|
|
258
|
+
if (!previouslySelectedRowNode || !previouslySelectedColId)
|
|
259
|
+
return;
|
|
260
|
+
DOM.queueUpdate(() => {
|
|
261
|
+
this.agGrid.gridApi.setFocusedCell(previouslySelectedRowNode.rowIndex, previouslySelectedColId);
|
|
262
|
+
this.agGrid.gridApi.ensureIndexVisible(previouslySelectedRowNode.rowIndex, 'middle');
|
|
263
|
+
});
|
|
264
|
+
}
|
|
241
265
|
applyTransaction(agTransaction) {
|
|
242
266
|
throw new Error('Method not implemented.');
|
|
243
267
|
}
|
package/dist/esm/grid-pro.js
CHANGED
|
@@ -111,6 +111,12 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
111
111
|
this.gridFontFace = defaultAgGridFontFace;
|
|
112
112
|
this.columnComponentName = 'grid-pro-column';
|
|
113
113
|
this.theme = AgGridTheme.alpine;
|
|
114
|
+
/**
|
|
115
|
+
* If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records
|
|
116
|
+
* @remarks Defaults to false
|
|
117
|
+
* @alpha
|
|
118
|
+
*/
|
|
119
|
+
this.blockScrollingOnContextMenu = false;
|
|
114
120
|
this.rehydrationAttempted = false;
|
|
115
121
|
this.rootEventsListeners = [];
|
|
116
122
|
this.gridEventsQueue = [];
|
|
@@ -313,7 +319,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
313
319
|
return;
|
|
314
320
|
this.agAttributes[attrName] = attribute.value;
|
|
315
321
|
});
|
|
316
|
-
const { columnDefs, components, defaultColDef, onGridReady, onFilterChanged } = options, rest = __rest(options, ["columnDefs", "components", "defaultColDef", "onGridReady", "onFilterChanged"]);
|
|
322
|
+
const { columnDefs, components, defaultColDef, onCellContextMenu, onGridReady, onFilterChanged } = options, rest = __rest(options, ["columnDefs", "components", "defaultColDef", "onCellContextMenu", "onGridReady", "onFilterChanged"]);
|
|
317
323
|
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) => {
|
|
318
324
|
var _a, _b;
|
|
319
325
|
this.gridApi = (_a = options.api) !== null && _a !== void 0 ? _a : event.api;
|
|
@@ -337,7 +343,20 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
337
343
|
if (onFilterChanged) {
|
|
338
344
|
onFilterChanged(filterChangedEvent);
|
|
339
345
|
}
|
|
340
|
-
}, onGridSizeChanged: gridOnChangeCallback, onSortChanged: gridOnChangeCallback
|
|
346
|
+
}, onGridSizeChanged: gridOnChangeCallback, onSortChanged: gridOnChangeCallback, onCellContextMenu: (event) => {
|
|
347
|
+
if (this.blockScrollingOnContextMenu) {
|
|
348
|
+
debugger;
|
|
349
|
+
this.selectedRowId = event.node.id;
|
|
350
|
+
this.selectedColId = event.colDef.colId;
|
|
351
|
+
this.addEventListener('click', (e) => {
|
|
352
|
+
this.selectedRowId = undefined;
|
|
353
|
+
this.selectedColId = undefined;
|
|
354
|
+
}, { once: true });
|
|
355
|
+
}
|
|
356
|
+
if (onCellContextMenu) {
|
|
357
|
+
onCellContextMenu(event);
|
|
358
|
+
}
|
|
359
|
+
} }), rest);
|
|
341
360
|
if (this.gridProDatasource) {
|
|
342
361
|
derivedOptions.columnDefs = columnDefs;
|
|
343
362
|
this.initGridOptions(derivedOptions, globalEventListener);
|
|
@@ -577,6 +596,9 @@ __decorate([
|
|
|
577
596
|
__decorate([
|
|
578
597
|
attr
|
|
579
598
|
], GridPro.prototype, "theme", void 0);
|
|
599
|
+
__decorate([
|
|
600
|
+
attr({ attribute: 'block-scrolling-on-context-menu', mode: 'boolean' })
|
|
601
|
+
], GridPro.prototype, "blockScrollingOnContextMenu", void 0);
|
|
580
602
|
__decorate([
|
|
581
603
|
observable
|
|
582
604
|
], GridPro.prototype, "classNames", void 0);
|
package/dist/grid-pro.api.json
CHANGED
|
@@ -9168,6 +9168,66 @@
|
|
|
9168
9168
|
"isProtected": false,
|
|
9169
9169
|
"isAbstract": false
|
|
9170
9170
|
},
|
|
9171
|
+
{
|
|
9172
|
+
"kind": "Property",
|
|
9173
|
+
"canonicalReference": "@genesislcap/grid-pro!GridPro#selectedColId:member",
|
|
9174
|
+
"docComment": "",
|
|
9175
|
+
"excerptTokens": [
|
|
9176
|
+
{
|
|
9177
|
+
"kind": "Content",
|
|
9178
|
+
"text": "selectedColId: "
|
|
9179
|
+
},
|
|
9180
|
+
{
|
|
9181
|
+
"kind": "Content",
|
|
9182
|
+
"text": "string"
|
|
9183
|
+
},
|
|
9184
|
+
{
|
|
9185
|
+
"kind": "Content",
|
|
9186
|
+
"text": ";"
|
|
9187
|
+
}
|
|
9188
|
+
],
|
|
9189
|
+
"isReadonly": false,
|
|
9190
|
+
"isOptional": false,
|
|
9191
|
+
"releaseTag": "Public",
|
|
9192
|
+
"name": "selectedColId",
|
|
9193
|
+
"propertyTypeTokenRange": {
|
|
9194
|
+
"startIndex": 1,
|
|
9195
|
+
"endIndex": 2
|
|
9196
|
+
},
|
|
9197
|
+
"isStatic": false,
|
|
9198
|
+
"isProtected": false,
|
|
9199
|
+
"isAbstract": false
|
|
9200
|
+
},
|
|
9201
|
+
{
|
|
9202
|
+
"kind": "Property",
|
|
9203
|
+
"canonicalReference": "@genesislcap/grid-pro!GridPro#selectedRowId:member",
|
|
9204
|
+
"docComment": "",
|
|
9205
|
+
"excerptTokens": [
|
|
9206
|
+
{
|
|
9207
|
+
"kind": "Content",
|
|
9208
|
+
"text": "selectedRowId: "
|
|
9209
|
+
},
|
|
9210
|
+
{
|
|
9211
|
+
"kind": "Content",
|
|
9212
|
+
"text": "string"
|
|
9213
|
+
},
|
|
9214
|
+
{
|
|
9215
|
+
"kind": "Content",
|
|
9216
|
+
"text": ";"
|
|
9217
|
+
}
|
|
9218
|
+
],
|
|
9219
|
+
"isReadonly": false,
|
|
9220
|
+
"isOptional": false,
|
|
9221
|
+
"releaseTag": "Public",
|
|
9222
|
+
"name": "selectedRowId",
|
|
9223
|
+
"propertyTypeTokenRange": {
|
|
9224
|
+
"startIndex": 1,
|
|
9225
|
+
"endIndex": 2
|
|
9226
|
+
},
|
|
9227
|
+
"isStatic": false,
|
|
9228
|
+
"isProtected": false,
|
|
9229
|
+
"isAbstract": false
|
|
9230
|
+
},
|
|
9171
9231
|
{
|
|
9172
9232
|
"kind": "Method",
|
|
9173
9233
|
"canonicalReference": "@genesislcap/grid-pro!GridPro#setFilterModel:member(1)",
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -39,9 +39,9 @@ import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
|
|
|
39
39
|
import { Logger } from '@genesislcap/foundation-logger';
|
|
40
40
|
import { MetadataDetail } from '@genesislcap/foundation-comms';
|
|
41
41
|
import { OverrideFoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
42
|
-
import
|
|
42
|
+
import { RowDataTransaction } from '@ag-grid-community/core';
|
|
43
43
|
import type { RowNodeTransaction } from '@ag-grid-community/core';
|
|
44
|
-
import
|
|
44
|
+
import { ServerSideTransaction } from '@ag-grid-community/core';
|
|
45
45
|
import type { ServerSideTransactionResult } from '@ag-grid-community/core';
|
|
46
46
|
import { Session } from '@genesislcap/foundation-comms';
|
|
47
47
|
import { SocketObservable } from '@genesislcap/foundation-comms';
|
|
@@ -1236,6 +1236,12 @@ export declare class GridPro extends GridPro_base {
|
|
|
1236
1236
|
rowHeight: number;
|
|
1237
1237
|
theme: string;
|
|
1238
1238
|
themeChanged(oldValue: string, newValue: string): void;
|
|
1239
|
+
/**
|
|
1240
|
+
* If true, will block scrolling when context menu is open and keep the grid in the same position without scrolling to new records
|
|
1241
|
+
* @remarks Defaults to false
|
|
1242
|
+
* @alpha
|
|
1243
|
+
*/
|
|
1244
|
+
blockScrollingOnContextMenu: boolean;
|
|
1239
1245
|
classNames: string;
|
|
1240
1246
|
agGrid: Grid;
|
|
1241
1247
|
gridSlot: HTMLSlotElement;
|
|
@@ -1257,6 +1263,8 @@ export declare class GridPro extends GridPro_base {
|
|
|
1257
1263
|
setFilterModel(value: {
|
|
1258
1264
|
[key: string]: any;
|
|
1259
1265
|
}): Promise<void>;
|
|
1266
|
+
selectedRowId: string;
|
|
1267
|
+
selectedColId: string;
|
|
1260
1268
|
/**
|
|
1261
1269
|
* Injectable config that allows to change grid options on an app level basis
|
|
1262
1270
|
* To modify options, register instance of the config in DOM container that is
|
|
@@ -1484,7 +1492,11 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
1484
1492
|
readonly DOCUMENT_POSITION_CONTAINED_BY: number;
|
|
1485
1493
|
readonly DOCUMENT_POSITION_CONTAINS: number;
|
|
1486
1494
|
readonly DOCUMENT_POSITION_DISCONNECTED: number;
|
|
1487
|
-
readonly DOCUMENT_POSITION_FOLLOWING: number;
|
|
1495
|
+
readonly DOCUMENT_POSITION_FOLLOWING: number; /**
|
|
1496
|
+
* Because we try and resize the grid to fit using callbacks on events, this will cause
|
|
1497
|
+
* a stack overflow of calls to resize, so we need to debounce it.
|
|
1498
|
+
* @internal
|
|
1499
|
+
*/
|
|
1488
1500
|
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
|
|
1489
1501
|
readonly DOCUMENT_POSITION_PRECEDING: number;
|
|
1490
1502
|
readonly DOCUMENT_TYPE_NODE: number;
|
|
@@ -1678,6 +1690,7 @@ declare class GridProBaseDatasource extends GenesisGridDatasourceElement {
|
|
|
1678
1690
|
protected applyAllAgTransactions(): void;
|
|
1679
1691
|
private flashAddedCells;
|
|
1680
1692
|
private applyMappedAgTransaction;
|
|
1693
|
+
private setPreviouslySelectedCell;
|
|
1681
1694
|
protected applyTransaction(agTransaction: RowDataTransaction): any;
|
|
1682
1695
|
protected applyTransactionAsync(agTransaction: RowDataTransaction, callback?: (res: any) => void): void;
|
|
1683
1696
|
/**
|
|
@@ -60,6 +60,8 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
|
60
60
|
| [persistColumnStateKey](./grid-pro.gridpro.persistcolumnstatekey.md) | | string | The key to use for persisting the column state in local broswer or KV storage. |
|
|
61
61
|
| [persistFilterModelKey](./grid-pro.gridpro.persistfiltermodelkey.md) | | string | The key to use for persisting the filter model in local browser or KV storage. |
|
|
62
62
|
| [rowHeight](./grid-pro.gridpro.rowheight.md) | | number | |
|
|
63
|
+
| [selectedColId](./grid-pro.gridpro.selectedcolid.md) | | string | |
|
|
64
|
+
| [selectedRowId](./grid-pro.gridpro.selectedrowid.md) | | string | |
|
|
63
65
|
| [statePersistence](./grid-pro.gridpro.statepersistence.md) | | [StatePersistence](./grid-pro.statepersistence.md) | |
|
|
64
66
|
| [theme](./grid-pro.gridpro.theme.md) | | string | |
|
|
65
67
|
|
|
@@ -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
|
@@ -45,9 +45,9 @@ import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
|
|
|
45
45
|
import { Logger } from '@genesislcap/foundation-logger';
|
|
46
46
|
import { MetadataDetail } from '@genesislcap/foundation-comms';
|
|
47
47
|
import { OverrideFoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
48
|
-
import
|
|
48
|
+
import { RowDataTransaction } from '@ag-grid-community/core';
|
|
49
49
|
import type { RowNodeTransaction } from '@ag-grid-community/core';
|
|
50
|
-
import
|
|
50
|
+
import { ServerSideTransaction } from '@ag-grid-community/core';
|
|
51
51
|
import type { ServerSideTransactionResult } from '@ag-grid-community/core';
|
|
52
52
|
import { Session } from '@genesislcap/foundation-comms';
|
|
53
53
|
import { SocketObservable } from '@genesislcap/foundation-comms';
|
|
@@ -807,6 +807,8 @@ export class GridPro extends GridPro_base {
|
|
|
807
807
|
asyncUpdate: boolean;
|
|
808
808
|
// (undocumented)
|
|
809
809
|
autoCellRendererByType: boolean;
|
|
810
|
+
// @alpha
|
|
811
|
+
blockScrollingOnContextMenu: boolean;
|
|
810
812
|
// (undocumented)
|
|
811
813
|
classNames: string;
|
|
812
814
|
// (undocumented)
|
|
@@ -872,6 +874,10 @@ export class GridPro extends GridPro_base {
|
|
|
872
874
|
// (undocumented)
|
|
873
875
|
rowHeight: number;
|
|
874
876
|
// (undocumented)
|
|
877
|
+
selectedColId: string;
|
|
878
|
+
// (undocumented)
|
|
879
|
+
selectedRowId: string;
|
|
880
|
+
// (undocumented)
|
|
875
881
|
setFilterModel(value: {
|
|
876
882
|
[key: string]: any;
|
|
877
883
|
}): Promise<void>;
|
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.
|
|
4
|
+
"version": "14.176.1-alpha-6ef4895.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.
|
|
34
|
-
"@genesislcap/genx": "14.
|
|
35
|
-
"@genesislcap/rollup-builder": "14.
|
|
36
|
-
"@genesislcap/ts-builder": "14.
|
|
37
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
38
|
-
"@genesislcap/vite-builder": "14.
|
|
39
|
-
"@genesislcap/webpack-builder": "14.
|
|
33
|
+
"@genesislcap/foundation-testing": "14.176.1-alpha-6ef4895.0",
|
|
34
|
+
"@genesislcap/genx": "14.176.1-alpha-6ef4895.0",
|
|
35
|
+
"@genesislcap/rollup-builder": "14.176.1-alpha-6ef4895.0",
|
|
36
|
+
"@genesislcap/ts-builder": "14.176.1-alpha-6ef4895.0",
|
|
37
|
+
"@genesislcap/uvu-playwright-builder": "14.176.1-alpha-6ef4895.0",
|
|
38
|
+
"@genesislcap/vite-builder": "14.176.1-alpha-6ef4895.0",
|
|
39
|
+
"@genesislcap/webpack-builder": "14.176.1-alpha-6ef4895.0",
|
|
40
40
|
"rimraf": "^3.0.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@genesislcap/foundation-comms": "14.
|
|
44
|
-
"@genesislcap/foundation-logger": "14.
|
|
45
|
-
"@genesislcap/foundation-ui": "14.
|
|
46
|
-
"@genesislcap/foundation-utils": "14.
|
|
43
|
+
"@genesislcap/foundation-comms": "14.176.1-alpha-6ef4895.0",
|
|
44
|
+
"@genesislcap/foundation-logger": "14.176.1-alpha-6ef4895.0",
|
|
45
|
+
"@genesislcap/foundation-ui": "14.176.1-alpha-6ef4895.0",
|
|
46
|
+
"@genesislcap/foundation-utils": "14.176.1-alpha-6ef4895.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": "7576777c410789f2699b2522129c8a206f3ccacf"
|
|
73
73
|
}
|