@genesislcap/grid-pro 14.325.1 → 14.326.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/README.md +49 -0
- package/dist/custom-elements.json +236 -0
- package/dist/dts/cell-renderers/action.renderer.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +57 -0
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/dts/state-persistence/kv-state.d.ts +1 -0
- package/dist/dts/state-persistence/kv-state.d.ts.map +1 -1
- package/dist/dts/state-persistence/local-state.d.ts +1 -0
- package/dist/dts/state-persistence/local-state.d.ts.map +1 -1
- package/dist/dts/state-persistence/state-persistence.d.ts +5 -0
- package/dist/dts/state-persistence/state-persistence.d.ts.map +1 -1
- package/dist/dts/utils/array.d.ts +14 -0
- package/dist/dts/utils/array.d.ts.map +1 -1
- package/dist/esm/cell-renderers/action.renderer.js +5 -3
- package/dist/esm/cell-renderers/boolean.renderer.js +4 -3
- package/dist/esm/grid-pro.js +156 -2
- package/dist/esm/state-persistence/kv-state.js +5 -0
- package/dist/esm/state-persistence/local-state.js +7 -0
- package/dist/esm/utils/array.js +31 -0
- package/dist/grid-pro.api.json +406 -0
- package/dist/grid-pro.d.ts +80 -0
- package/docs/api/grid-pro.convertcoldefstocolumnstates.md +56 -0
- package/docs/api/grid-pro.convertcoldeftocolumnstate.md +56 -0
- package/docs/api/grid-pro.gridpro.defaultcolumnconfig.md +13 -0
- package/docs/api/grid-pro.gridpro.deletecolumnstate.md +58 -0
- package/docs/api/grid-pro.gridpro.md +71 -0
- package/docs/api/grid-pro.gridpro.sizecolumnstocontent.md +13 -0
- package/docs/api/grid-pro.gridpro.sizecolumnstofit.md +13 -0
- package/docs/api/grid-pro.kvstoragestatepersistence.deletecolumnstate.md +50 -0
- package/docs/api/grid-pro.kvstoragestatepersistence.md +12 -0
- package/docs/api/grid-pro.localstoragestatepersistence.deletecolumnstate.md +50 -0
- package/docs/api/grid-pro.localstoragestatepersistence.md +12 -0
- package/docs/api/grid-pro.md +22 -0
- package/docs/api/grid-pro.statepersistence.deletecolumnstate.md +52 -0
- package/docs/api/grid-pro.statepersistence.md +11 -0
- package/docs/api-report.md.api.md +15 -0
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -123,6 +123,8 @@ The `<grid-pro>` element supports the following attributes and properties:
|
|
|
123
123
|
| `persist-column-state-key` | `string` | - | **Key for persisting column state** in local browser or KV storage. Essential for maintaining user preferences. |
|
|
124
124
|
| `persist-filter-model-key` | `string` | - | **Key for persisting filter model** in local browser or KV storage. Maintains filter state across sessions. |
|
|
125
125
|
| `row-height` | `number` | - | Custom row height in pixels. Overrides theme defaults. |
|
|
126
|
+
| `size-columns-to-content` | `boolean` | `false` | **Auto-size columns**: Automatically sizes columns to fit their content using AG Grid's autoSizeAllColumns() method. When both `size-columns-to-fit` and `size-columns-to-content` are enabled, intelligent sizing automatically chooses the best approach based on content width vs available space. |
|
|
127
|
+
| `size-columns-to-fit` | `boolean` | `false` | **Fit columns to viewport**: Automatically sizes columns to fit the available horizontal space using AG Grid's sizeColumnsToFit() method. When both `size-columns-to-content` and `size-columns-to-fit` are enabled, intelligent sizing automatically chooses the best approach based on content width vs available space. |
|
|
126
128
|
| `theme` | `string` | `alpine` | AG Grid theme name. Available: `alpine`, `alpine-dark`, `balham`, `balham-dark`, `material`. |
|
|
127
129
|
| `with-status-bar` | `boolean` | `false` | **Enterprise Feature**: Enables status bar at bottom of grid. **Requires AG Grid Enterprise module**. |
|
|
128
130
|
| `:customErrorHandlerTemplate` | `(prefix: string, gridErrorItems: GridProErrorItem<any>[]) => ViewTemplate` | - | **Custom error handling**: Function that returns a custom template for displaying datasource errors. If not provided, uses the default error dialog. |
|
|
@@ -416,6 +418,53 @@ export class ManualDataGrid extends GenesisElement {
|
|
|
416
418
|
}
|
|
417
419
|
```
|
|
418
420
|
|
|
421
|
+
**4. Grid with Auto-Size Columns:**
|
|
422
|
+
|
|
423
|
+
```typescript
|
|
424
|
+
@customElement({
|
|
425
|
+
name: 'auto-size-columns-grid',
|
|
426
|
+
template: html`
|
|
427
|
+
<grid-pro
|
|
428
|
+
size-columns-to-content
|
|
429
|
+
theme="alpine"
|
|
430
|
+
persist-column-state-key="auto-size-grid-state">
|
|
431
|
+
<grid-pro-client-side-datasource
|
|
432
|
+
resource-name="ALL_TRADES"
|
|
433
|
+
></grid-pro-client-side-datasource>
|
|
434
|
+
</grid-pro>
|
|
435
|
+
`
|
|
436
|
+
})
|
|
437
|
+
export class AutoSizeColumnsGrid extends GenesisElement {
|
|
438
|
+
// The size-columns-to-content attribute will automatically adjust column widths
|
|
439
|
+
// based on content when data is loaded or updated
|
|
440
|
+
}
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
**5. Grid with Intelligent Column Sizing (Both Attributes Enabled):**
|
|
444
|
+
|
|
445
|
+
```typescript
|
|
446
|
+
@customElement({
|
|
447
|
+
name: 'intelligent-sizing-grid',
|
|
448
|
+
template: html`
|
|
449
|
+
<grid-pro
|
|
450
|
+
grid-autosizing
|
|
451
|
+
size-columns-to-content
|
|
452
|
+
theme="alpine"
|
|
453
|
+
persist-column-state-key="intelligent-grid-state">
|
|
454
|
+
<grid-pro-client-side-datasource
|
|
455
|
+
resource-name="ALL_TRADES"
|
|
456
|
+
></grid-pro-client-side-datasource>
|
|
457
|
+
</grid-pro>
|
|
458
|
+
`
|
|
459
|
+
})
|
|
460
|
+
export class IntelligentSizingGrid extends GenesisElement {
|
|
461
|
+
// When both grid-autosizing and size-columns-to-content are enabled:
|
|
462
|
+
// - If content width <= available width: uses sizeColumnsToContent (natural content width)
|
|
463
|
+
// - If content width > available width: uses sizeColumnsToFit (fits to viewport)
|
|
464
|
+
// This provides optimal user experience by avoiding horizontal scrollbars when possible
|
|
465
|
+
}
|
|
466
|
+
```
|
|
467
|
+
|
|
419
468
|
**4. Theme and Font Customization:**
|
|
420
469
|
|
|
421
470
|
```typescript
|
|
@@ -315,6 +315,24 @@
|
|
|
315
315
|
"text": "GridApi"
|
|
316
316
|
}
|
|
317
317
|
},
|
|
318
|
+
{
|
|
319
|
+
"kind": "field",
|
|
320
|
+
"name": "cachedTotalColumnWidth",
|
|
321
|
+
"type": {
|
|
322
|
+
"text": "number | null"
|
|
323
|
+
},
|
|
324
|
+
"privacy": "private",
|
|
325
|
+
"default": "null"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"kind": "field",
|
|
329
|
+
"name": "columnCount",
|
|
330
|
+
"type": {
|
|
331
|
+
"text": "number"
|
|
332
|
+
},
|
|
333
|
+
"privacy": "private",
|
|
334
|
+
"default": "0"
|
|
335
|
+
},
|
|
318
336
|
{
|
|
319
337
|
"kind": "field",
|
|
320
338
|
"name": "gridErrorItems",
|
|
@@ -355,6 +373,26 @@
|
|
|
355
373
|
"default": "false",
|
|
356
374
|
"description": "Boolean attribute to control whether the grid autosizes the columns upon interaction.\nThis will disable the column widths from being manually set, and doesn't save the widths\nin local storage if you are using `persist-column-state-key`."
|
|
357
375
|
},
|
|
376
|
+
{
|
|
377
|
+
"kind": "field",
|
|
378
|
+
"name": "sizeColumnsToContent",
|
|
379
|
+
"type": {
|
|
380
|
+
"text": "boolean"
|
|
381
|
+
},
|
|
382
|
+
"default": "false",
|
|
383
|
+
"description": "Boolean attribute to control whether the grid automatically sizes columns to fit their content.\nThis will call AG Grid's autoSizeColumns() method to automatically adjust column widths based on content.",
|
|
384
|
+
"privacy": "public"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"kind": "field",
|
|
388
|
+
"name": "sizeColumnsToFit",
|
|
389
|
+
"type": {
|
|
390
|
+
"text": "boolean"
|
|
391
|
+
},
|
|
392
|
+
"default": "false",
|
|
393
|
+
"description": "Boolean attribute to adjust the size of columns to fit the available horizontal space.\nThis will call AG Grid's sizeColumnsToFit() method.",
|
|
394
|
+
"privacy": "public"
|
|
395
|
+
},
|
|
358
396
|
{
|
|
359
397
|
"kind": "field",
|
|
360
398
|
"name": "addIndex",
|
|
@@ -434,6 +472,15 @@
|
|
|
434
472
|
},
|
|
435
473
|
"description": "The key to use for persisting the filter model in local browser or KV storage."
|
|
436
474
|
},
|
|
475
|
+
{
|
|
476
|
+
"kind": "field",
|
|
477
|
+
"name": "defaultColumnConfig",
|
|
478
|
+
"type": {
|
|
479
|
+
"text": "ColDef[]"
|
|
480
|
+
},
|
|
481
|
+
"default": "[]",
|
|
482
|
+
"description": "The default column config to reset to when deleteColumnState is called."
|
|
483
|
+
},
|
|
437
484
|
{
|
|
438
485
|
"kind": "field",
|
|
439
486
|
"name": "headerCaseType",
|
|
@@ -858,6 +905,27 @@
|
|
|
858
905
|
"description": "Gets the saved grid ColumnState[] from storage",
|
|
859
906
|
"privacy": "public"
|
|
860
907
|
},
|
|
908
|
+
{
|
|
909
|
+
"kind": "method",
|
|
910
|
+
"name": "deleteColumnState",
|
|
911
|
+
"return": {
|
|
912
|
+
"type": {
|
|
913
|
+
"text": "Promise<void>"
|
|
914
|
+
}
|
|
915
|
+
},
|
|
916
|
+
"parameters": [
|
|
917
|
+
{
|
|
918
|
+
"name": "resetToDefault",
|
|
919
|
+
"default": "true",
|
|
920
|
+
"type": {
|
|
921
|
+
"text": "boolean"
|
|
922
|
+
},
|
|
923
|
+
"description": "Whether to reset columns to their default configuration. Defaults to true."
|
|
924
|
+
}
|
|
925
|
+
],
|
|
926
|
+
"description": "Deletes the saved column state for the current grid",
|
|
927
|
+
"privacy": "public"
|
|
928
|
+
},
|
|
861
929
|
{
|
|
862
930
|
"kind": "method",
|
|
863
931
|
"name": "restoreColumnState",
|
|
@@ -1123,6 +1191,57 @@
|
|
|
1123
1191
|
}
|
|
1124
1192
|
]
|
|
1125
1193
|
},
|
|
1194
|
+
{
|
|
1195
|
+
"kind": "method",
|
|
1196
|
+
"name": "handleColumnSizing",
|
|
1197
|
+
"privacy": "private",
|
|
1198
|
+
"description": "Handles column sizing based on sizeColumnsToContent and sizeColumnsToFit attributes"
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"kind": "method",
|
|
1202
|
+
"name": "handleBothSizingModes",
|
|
1203
|
+
"privacy": "private",
|
|
1204
|
+
"description": "Handles when both sizeColumnsToContent and sizeColumnsToFit are enabled"
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
"kind": "method",
|
|
1208
|
+
"name": "handleIndividualSizingModes",
|
|
1209
|
+
"privacy": "private",
|
|
1210
|
+
"description": "Handles individual sizing modes when only one is enabled"
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
"kind": "method",
|
|
1214
|
+
"name": "calculateTotalColumnWidth",
|
|
1215
|
+
"privacy": "private",
|
|
1216
|
+
"return": {
|
|
1217
|
+
"type": {
|
|
1218
|
+
"text": "number"
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
"description": "Calculates the total width of all columns"
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
"kind": "method",
|
|
1225
|
+
"name": "invalidateColumnWidthCache",
|
|
1226
|
+
"privacy": "private",
|
|
1227
|
+
"return": {
|
|
1228
|
+
"type": {
|
|
1229
|
+
"text": "void"
|
|
1230
|
+
}
|
|
1231
|
+
},
|
|
1232
|
+
"description": "Invalidates the cached column width calculation"
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
"kind": "method",
|
|
1236
|
+
"name": "getGridWidth",
|
|
1237
|
+
"privacy": "private",
|
|
1238
|
+
"return": {
|
|
1239
|
+
"type": {
|
|
1240
|
+
"text": "number"
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
"description": "Gets the available grid width with fallbacks"
|
|
1244
|
+
},
|
|
1126
1245
|
{
|
|
1127
1246
|
"kind": "method",
|
|
1128
1247
|
"name": "agAttributeChangedCallback",
|
|
@@ -1398,6 +1517,24 @@
|
|
|
1398
1517
|
"description": "Boolean attribute to control whether the grid autosizes the columns upon interaction.\nThis will disable the column widths from being manually set, and doesn't save the widths\nin local storage if you are using `persist-column-state-key`.",
|
|
1399
1518
|
"fieldName": "gridAutosizingEnabled"
|
|
1400
1519
|
},
|
|
1520
|
+
{
|
|
1521
|
+
"name": "size-columns-to-content",
|
|
1522
|
+
"type": {
|
|
1523
|
+
"text": "boolean"
|
|
1524
|
+
},
|
|
1525
|
+
"default": "false",
|
|
1526
|
+
"description": "Boolean attribute to control whether the grid automatically sizes columns to fit their content.\nThis will call AG Grid's autoSizeColumns() method to automatically adjust column widths based on content.",
|
|
1527
|
+
"fieldName": "sizeColumnsToContent"
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
"name": "size-columns-to-fit",
|
|
1531
|
+
"type": {
|
|
1532
|
+
"text": "boolean"
|
|
1533
|
+
},
|
|
1534
|
+
"default": "false",
|
|
1535
|
+
"description": "Boolean attribute to adjust the size of columns to fit the available horizontal space.\nThis will call AG Grid's sizeColumnsToFit() method.",
|
|
1536
|
+
"fieldName": "sizeColumnsToFit"
|
|
1537
|
+
},
|
|
1401
1538
|
{
|
|
1402
1539
|
"name": "add-index",
|
|
1403
1540
|
"type": {
|
|
@@ -1477,6 +1614,15 @@
|
|
|
1477
1614
|
"description": "The key to use for persisting the filter model in local browser or KV storage.",
|
|
1478
1615
|
"fieldName": "persistFilterModelKey"
|
|
1479
1616
|
},
|
|
1617
|
+
{
|
|
1618
|
+
"name": "default-column-config",
|
|
1619
|
+
"type": {
|
|
1620
|
+
"text": "ColDef[]"
|
|
1621
|
+
},
|
|
1622
|
+
"default": "[]",
|
|
1623
|
+
"description": "The default column config to reset to when deleteColumnState is called.",
|
|
1624
|
+
"fieldName": "defaultColumnConfig"
|
|
1625
|
+
},
|
|
1480
1626
|
{
|
|
1481
1627
|
"name": "header-case-type",
|
|
1482
1628
|
"type": {
|
|
@@ -15341,6 +15487,23 @@
|
|
|
15341
15487
|
}
|
|
15342
15488
|
]
|
|
15343
15489
|
},
|
|
15490
|
+
{
|
|
15491
|
+
"kind": "method",
|
|
15492
|
+
"name": "deleteColumnState",
|
|
15493
|
+
"return": {
|
|
15494
|
+
"type": {
|
|
15495
|
+
"text": "Promise<void>"
|
|
15496
|
+
}
|
|
15497
|
+
},
|
|
15498
|
+
"parameters": [
|
|
15499
|
+
{
|
|
15500
|
+
"name": "persistColumnStateKey",
|
|
15501
|
+
"type": {
|
|
15502
|
+
"text": "string"
|
|
15503
|
+
}
|
|
15504
|
+
}
|
|
15505
|
+
]
|
|
15506
|
+
},
|
|
15344
15507
|
{
|
|
15345
15508
|
"kind": "method",
|
|
15346
15509
|
"name": "migrateLocalStorageToKVStorage",
|
|
@@ -15469,6 +15632,23 @@
|
|
|
15469
15632
|
}
|
|
15470
15633
|
]
|
|
15471
15634
|
},
|
|
15635
|
+
{
|
|
15636
|
+
"kind": "method",
|
|
15637
|
+
"name": "deleteColumnState",
|
|
15638
|
+
"return": {
|
|
15639
|
+
"type": {
|
|
15640
|
+
"text": "Promise<void>"
|
|
15641
|
+
}
|
|
15642
|
+
},
|
|
15643
|
+
"parameters": [
|
|
15644
|
+
{
|
|
15645
|
+
"name": "persistColumnStateKey",
|
|
15646
|
+
"type": {
|
|
15647
|
+
"text": "string"
|
|
15648
|
+
}
|
|
15649
|
+
}
|
|
15650
|
+
]
|
|
15651
|
+
},
|
|
15472
15652
|
{
|
|
15473
15653
|
"kind": "method",
|
|
15474
15654
|
"name": "getFilterModel",
|
|
@@ -16279,6 +16459,46 @@
|
|
|
16279
16459
|
"kind": "javascript-module",
|
|
16280
16460
|
"path": "src/utils/array.ts",
|
|
16281
16461
|
"declarations": [
|
|
16462
|
+
{
|
|
16463
|
+
"kind": "function",
|
|
16464
|
+
"name": "convertColDefToColumnState",
|
|
16465
|
+
"return": {
|
|
16466
|
+
"type": {
|
|
16467
|
+
"text": ""
|
|
16468
|
+
}
|
|
16469
|
+
},
|
|
16470
|
+
"parameters": [
|
|
16471
|
+
{
|
|
16472
|
+
"name": "colDef",
|
|
16473
|
+
"type": {
|
|
16474
|
+
"text": "ColDef"
|
|
16475
|
+
},
|
|
16476
|
+
"description": "The column definition to convert"
|
|
16477
|
+
}
|
|
16478
|
+
],
|
|
16479
|
+
"description": "Converts a ColDef to a ColumnState",
|
|
16480
|
+
"privacy": "public"
|
|
16481
|
+
},
|
|
16482
|
+
{
|
|
16483
|
+
"kind": "function",
|
|
16484
|
+
"name": "convertColDefsToColumnStates",
|
|
16485
|
+
"return": {
|
|
16486
|
+
"type": {
|
|
16487
|
+
"text": ""
|
|
16488
|
+
}
|
|
16489
|
+
},
|
|
16490
|
+
"parameters": [
|
|
16491
|
+
{
|
|
16492
|
+
"name": "colDefs",
|
|
16493
|
+
"type": {
|
|
16494
|
+
"text": "ColDef[]"
|
|
16495
|
+
},
|
|
16496
|
+
"description": "The column definitions to convert"
|
|
16497
|
+
}
|
|
16498
|
+
],
|
|
16499
|
+
"description": "Converts an array of ColDef to an array of ColumnState",
|
|
16500
|
+
"privacy": "public"
|
|
16501
|
+
},
|
|
16282
16502
|
{
|
|
16283
16503
|
"kind": "function",
|
|
16284
16504
|
"name": "mergeAndDedupColDefWithColumnState",
|
|
@@ -16306,6 +16526,22 @@
|
|
|
16306
16526
|
}
|
|
16307
16527
|
],
|
|
16308
16528
|
"exports": [
|
|
16529
|
+
{
|
|
16530
|
+
"kind": "js",
|
|
16531
|
+
"name": "convertColDefToColumnState",
|
|
16532
|
+
"declaration": {
|
|
16533
|
+
"name": "convertColDefToColumnState",
|
|
16534
|
+
"module": "src/utils/array.ts"
|
|
16535
|
+
}
|
|
16536
|
+
},
|
|
16537
|
+
{
|
|
16538
|
+
"kind": "js",
|
|
16539
|
+
"name": "convertColDefsToColumnStates",
|
|
16540
|
+
"declaration": {
|
|
16541
|
+
"name": "convertColDefsToColumnStates",
|
|
16542
|
+
"module": "src/utils/array.ts"
|
|
16543
|
+
}
|
|
16544
|
+
},
|
|
16309
16545
|
{
|
|
16310
16546
|
"kind": "js",
|
|
16311
16547
|
"name": "mergeAndDedupColDefWithColumnState",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.renderer.d.ts","sourceRoot":"","sources":["../../../src/cell-renderers/action.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAW,MAAM,yBAAyB,CAAC;AAE1F,OAAO,EAAe,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG5E;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAErC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC;IAEvC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,iBAAkB,YAAW,iBAAiB;IAEzE,MAAM,EAAE,mBAAmB,GAAG,oBAAoB,CAAC;IAGnD,aAAa,EAAE,OAAO,CAAC;IAEvB,IAAI,CAAC,MAAM,EAAE,mBAAmB,GAAG,oBAAoB;IAYvD,MAAM,IAAI,WAAW;IAIrB,OAAO,CAAC,MAAM,EAAE,mBAAmB;IAMnC,UAAU,CAAC,IAAI,KAAA,GAAG,OAAO;IAWnB,YAAY;
|
|
1
|
+
{"version":3,"file":"action.renderer.d.ts","sourceRoot":"","sources":["../../../src/cell-renderers/action.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAW,MAAM,yBAAyB,CAAC;AAE1F,OAAO,EAAe,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG5E;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAErC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC;IAEvC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,iBAAkB,YAAW,iBAAiB;IAEzE,MAAM,EAAE,mBAAmB,GAAG,oBAAoB,CAAC;IAGnD,aAAa,EAAE,OAAO,CAAC;IAEvB,IAAI,CAAC,MAAM,EAAE,mBAAmB,GAAG,oBAAoB;IAYvD,MAAM,IAAI,WAAW;IAIrB,OAAO,CAAC,MAAM,EAAE,mBAAmB;IAMnC,UAAU,CAAC,IAAI,KAAA,GAAG,OAAO;IAWnB,YAAY;IAOzB,IAAI,UAAU,WAMb;CACF;AAID;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,6DAElC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,iDAelC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;yBAgB1C,CAAC"}
|
package/dist/dts/grid-pro.d.ts
CHANGED
|
@@ -387,6 +387,8 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
387
387
|
export declare class GridPro extends GridPro_base {
|
|
388
388
|
columnApi: ColumnApi;
|
|
389
389
|
gridApi: GridApi;
|
|
390
|
+
private cachedTotalColumnWidth;
|
|
391
|
+
private columnCount;
|
|
390
392
|
gridErrorItems: GridProErrorItem<GridProErrorEvent['detail']>[];
|
|
391
393
|
statePersistence: StatePersistence;
|
|
392
394
|
/**
|
|
@@ -402,6 +404,18 @@ export declare class GridPro extends GridPro_base {
|
|
|
402
404
|
* in local storage if you are using `persist-column-state-key`.
|
|
403
405
|
*/
|
|
404
406
|
gridAutosizingEnabled: boolean;
|
|
407
|
+
/**
|
|
408
|
+
* Boolean attribute to control whether the grid automatically sizes columns to fit their content.
|
|
409
|
+
* This will call AG Grid's autoSizeColumns() method to automatically adjust column widths based on content.
|
|
410
|
+
* @public
|
|
411
|
+
*/
|
|
412
|
+
sizeColumnsToContent: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* Boolean attribute to adjust the size of columns to fit the available horizontal space.
|
|
415
|
+
* This will call AG Grid's sizeColumnsToFit() method.
|
|
416
|
+
* @public
|
|
417
|
+
*/
|
|
418
|
+
sizeColumnsToFit: boolean;
|
|
405
419
|
/**
|
|
406
420
|
* The index to add new rows to when using `applyTransaction` or `applyTransactionAsync`
|
|
407
421
|
*/
|
|
@@ -442,6 +456,10 @@ export declare class GridPro extends GridPro_base {
|
|
|
442
456
|
* The key to use for persisting the filter model in local browser or KV storage.
|
|
443
457
|
*/
|
|
444
458
|
persistFilterModelKey: string;
|
|
459
|
+
/**
|
|
460
|
+
* The default column config to reset to when deleteColumnState is called.
|
|
461
|
+
*/
|
|
462
|
+
defaultColumnConfig: ColDef[];
|
|
445
463
|
/**
|
|
446
464
|
* The case type to use for the header names. If not set, the default CONSTANT_CASE will be used.
|
|
447
465
|
* @remarks Can be one of the following: camelCase, capitalCase, dotCase, headerCase, noCase, paramCase, pascalCase, pathCase, sentenceCase, snakeCase.
|
|
@@ -599,6 +617,13 @@ export declare class GridPro extends GridPro_base {
|
|
|
599
617
|
* @public
|
|
600
618
|
*/
|
|
601
619
|
getSavedColumnState(): Promise<ColumnState[]>;
|
|
620
|
+
/**
|
|
621
|
+
* Deletes the saved column state for the current grid
|
|
622
|
+
* @param resetToDefault - Whether to reset columns to their default configuration. Defaults to true.
|
|
623
|
+
* @remarks This removes the persisted column state from storage, allowing the grid to use default column configuration
|
|
624
|
+
* @public
|
|
625
|
+
*/
|
|
626
|
+
deleteColumnState(resetToDefault?: boolean): Promise<void>;
|
|
602
627
|
private restoreColumnState;
|
|
603
628
|
cacheFilterConfig(): void;
|
|
604
629
|
restoreCachedFilterConfig(): Promise<void>;
|
|
@@ -653,6 +678,38 @@ export declare class GridPro extends GridPro_base {
|
|
|
653
678
|
private addDatasourcePanels;
|
|
654
679
|
private addPaginationPanel;
|
|
655
680
|
protected setupPaginationAndStatusBar(gridOptions: GridOptions): void;
|
|
681
|
+
/**
|
|
682
|
+
* Handles column sizing based on sizeColumnsToContent and sizeColumnsToFit attributes
|
|
683
|
+
* @private
|
|
684
|
+
*/
|
|
685
|
+
private handleColumnSizing;
|
|
686
|
+
/**
|
|
687
|
+
* Handles when both sizeColumnsToContent and sizeColumnsToFit are enabled
|
|
688
|
+
* @private
|
|
689
|
+
*/
|
|
690
|
+
private handleBothSizingModes;
|
|
691
|
+
/**
|
|
692
|
+
* Handles individual sizing modes when only one is enabled
|
|
693
|
+
* @private
|
|
694
|
+
*/
|
|
695
|
+
private handleIndividualSizingModes;
|
|
696
|
+
/**
|
|
697
|
+
* Calculates the total width of all columns
|
|
698
|
+
* @private
|
|
699
|
+
*/
|
|
700
|
+
private calculateTotalColumnWidth;
|
|
701
|
+
/**
|
|
702
|
+
* Invalidates the cached column width calculation
|
|
703
|
+
* @private
|
|
704
|
+
* @remarks This method is called automatically when column changes occur (resize, move, pin, etc.)
|
|
705
|
+
* to ensure the cached width calculation remains accurate.
|
|
706
|
+
*/
|
|
707
|
+
private invalidateColumnWidthCache;
|
|
708
|
+
/**
|
|
709
|
+
* Gets the available grid width with fallbacks
|
|
710
|
+
* @private
|
|
711
|
+
*/
|
|
712
|
+
private getGridWidth;
|
|
656
713
|
get observedAttributes(): string[];
|
|
657
714
|
agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
|
|
658
715
|
globalEventListener(eventType: any, event: any): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACN,SAAS,EAET,OAAO,EACP,WAAW,EACX,UAAU,
|
|
1
|
+
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACN,SAAS,EAET,OAAO,EACP,WAAW,EACX,UAAU,EAGX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAyB,IAAI,EAAkB,MAAM,yBAAyB,CAAC;AAQnG,OAAO,EAAyB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAuB/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAcrE,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAEhB,yBAAyB,EAE1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAQL,iBAAiB,EAEjB,sBAAsB,EAEvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAyBvD;;;;GAIG;AACH,eAAO,MAAM,aAAa,0yRAA8D,CAAC;;;;;;;kBAT3B,CAAC;;;;;;;;8BAiD7C,CAAC,cAAe,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAyBoC,CAAA;4IAMxC,CAAC;wFAGgB,CAAC;+IAMtC,CAAA;2FAGqC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA6Bd,CAAC;;;;;;;;;;;;;;;;;;;;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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"}
|
|
@@ -10,6 +10,7 @@ export declare class KVStorageStatePersistence implements StatePersistence {
|
|
|
10
10
|
session: Session;
|
|
11
11
|
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
12
12
|
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
13
|
+
deleteColumnState(persistColumnStateKey: string): Promise<void>;
|
|
13
14
|
private migrateLocalStorageToKVStorage;
|
|
14
15
|
getFilterModel(persistFilterModelKey: string): Promise<{
|
|
15
16
|
[key: string]: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kv-state.d.ts","sourceRoot":"","sources":["../../../src/state-persistence/kv-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;GAGG;AACH,qBAAa,yBAA0B,YAAW,gBAAgB;IACrD,SAAS,EAAE,SAAS,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IAEpB,cAAc,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAarE,eAAe,CAAC,qBAAqB,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"kv-state.d.ts","sourceRoot":"","sources":["../../../src/state-persistence/kv-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;GAGG;AACH,qBAAa,yBAA0B,YAAW,gBAAgB;IACrD,SAAS,EAAE,SAAS,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IAEpB,cAAc,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAarE,eAAe,CAAC,qBAAqB,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IASzF,iBAAiB,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAIvD,8BAA8B;IAsBtC,cAAc,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAW9E,eAAe,CACnB,qBAAqB,EAAE,MAAM,EAC7B,WAAW,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAClC,OAAO,CAAC,IAAI,CAAC;CAQjB"}
|
|
@@ -9,6 +9,7 @@ export declare class LocalStorageStatePersistence implements StatePersistence {
|
|
|
9
9
|
session: Session;
|
|
10
10
|
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
11
11
|
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
12
|
+
deleteColumnState(persistColumnStateKey: string): Promise<void>;
|
|
12
13
|
getFilterModel(persistFilterModelKey: string): Promise<{
|
|
13
14
|
[key: string]: any;
|
|
14
15
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-state.d.ts","sourceRoot":"","sources":["../../../src/state-persistence/local-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D;;;GAGG;AACH,qBAAa,4BAA6B,YAAW,gBAAgB;IAC1D,OAAO,EAAE,OAAO,CAAC;IAEpB,cAAc,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAarE,eAAe,CAAC,qBAAqB,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IASzF,cAAc,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAa9E,eAAe,CACnB,qBAAqB,EAAE,MAAM,EAC7B,WAAW,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAClC,OAAO,CAAC,IAAI,CAAC;CAQjB"}
|
|
1
|
+
{"version":3,"file":"local-state.d.ts","sourceRoot":"","sources":["../../../src/state-persistence/local-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D;;;GAGG;AACH,qBAAa,4BAA6B,YAAW,gBAAgB;IAC1D,OAAO,EAAE,OAAO,CAAC;IAEpB,cAAc,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAarE,eAAe,CAAC,qBAAqB,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IASzF,iBAAiB,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS/D,cAAc,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAa9E,eAAe,CACnB,qBAAqB,EAAE,MAAM,EAC7B,WAAW,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAClC,OAAO,CAAC,IAAI,CAAC;CAQjB"}
|
|
@@ -15,6 +15,11 @@ export interface StatePersistence {
|
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
17
|
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Deletes the column state for the given key.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
deleteColumnState(persistColumnStateKey: string): Promise<void>;
|
|
18
23
|
/**
|
|
19
24
|
* Returns the filter model for the given key.
|
|
20
25
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-persistence.d.ts","sourceRoot":"","sources":["../../../src/state-persistence/state-persistence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,cAAc,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACtE;;;OAGG;IACH,eAAe,CAAC,qBAAqB,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1F;;;OAGG;IACH,cAAc,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,CAAC;IAC/E;;;OAGG;IACH,eAAe,CACb,qBAAqB,EAAE,MAAM,EAC7B,WAAW,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAClC,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,wEAE5B,CAAC"}
|
|
1
|
+
{"version":3,"file":"state-persistence.d.ts","sourceRoot":"","sources":["../../../src/state-persistence/state-persistence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,cAAc,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACtE;;;OAGG;IACH,eAAe,CAAC,qBAAqB,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1F;;;OAGG;IACH,iBAAiB,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE;;;OAGG;IACH,cAAc,CAAC,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,CAAC;IAC/E;;;OAGG;IACH,eAAe,CACb,qBAAqB,EAAE,MAAM,EAC7B,WAAW,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAClC,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,wEAE5B,CAAC"}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { ColDef, ColumnState } from '@ag-grid-community/core';
|
|
2
|
+
/**
|
|
3
|
+
* Converts a ColDef to a ColumnState
|
|
4
|
+
* @param colDef - The column definition to convert
|
|
5
|
+
* @returns The corresponding ColumnState
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare function convertColDefToColumnState(colDef: ColDef): ColumnState;
|
|
9
|
+
/**
|
|
10
|
+
* Converts an array of ColDef to an array of ColumnState
|
|
11
|
+
* @param colDefs - The column definitions to convert
|
|
12
|
+
* @returns The corresponding ColumnState array
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export declare function convertColDefsToColumnStates(colDefs: ColDef[]): ColumnState[];
|
|
2
16
|
/**
|
|
3
17
|
* Merges two arrays, one of `ColDef` and one of `ColumnState`, and deduplicates them.
|
|
4
18
|
* @remarks ColDef uses `field` and ColumnState uses `colId` to identify columns.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../src/utils/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,MAAM,EAAE,EACjB,YAAY,EAAE,WAAW,EAAE,GAC1B,MAAM,EAAE,CA8BV"}
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../src/utils/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAetE;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAE7E;AAED;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,MAAM,EAAE,EACjB,YAAY,EAAE,WAAW,EAAE,GAC1B,MAAM,EAAE,CA8BV"}
|
|
@@ -40,15 +40,17 @@ export class ActionRenderer extends FoundationElement {
|
|
|
40
40
|
}
|
|
41
41
|
clickHandler() {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
if (!this.params.actionClick)
|
|
44
|
+
return;
|
|
43
45
|
this.pendingAction = true;
|
|
44
46
|
yield this.params.actionClick(this.params.data);
|
|
45
47
|
this.pendingAction = false;
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
get dataTestId() {
|
|
49
|
-
var _a;
|
|
50
|
-
if (this.params.dataTestId) {
|
|
51
|
-
return this.params.dataTestId + ((
|
|
51
|
+
var _a, _b;
|
|
52
|
+
if ((_a = this.params) === null || _a === void 0 ? void 0 : _a.dataTestId) {
|
|
53
|
+
return this.params.dataTestId + ((_b = this.params.data[this.params.uniqueFieldName]) !== null && _b !== void 0 ? _b : '');
|
|
52
54
|
}
|
|
53
55
|
return undefined;
|
|
54
56
|
}
|
|
@@ -11,7 +11,7 @@ import { logger } from '../utils';
|
|
|
11
11
|
*/
|
|
12
12
|
export class BooleanRenderer extends FoundationElement {
|
|
13
13
|
isDisabled(data) {
|
|
14
|
-
var _a;
|
|
14
|
+
var _a, _b;
|
|
15
15
|
if (typeof ((_a = this.params) === null || _a === void 0 ? void 0 : _a.isDisabled) === 'function') {
|
|
16
16
|
try {
|
|
17
17
|
return this.params.isDisabled(data);
|
|
@@ -20,7 +20,7 @@ export class BooleanRenderer extends FoundationElement {
|
|
|
20
20
|
logger.error('Error executing grid action cell renderer isDisabled callback:', error);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
return !this.params.colDef.editable;
|
|
23
|
+
return !((_b = this.params) === null || _b === void 0 ? void 0 : _b.colDef.editable);
|
|
24
24
|
}
|
|
25
25
|
init(params) {
|
|
26
26
|
if (!params)
|
|
@@ -101,7 +101,8 @@ export class BooleanRenderer extends FoundationElement {
|
|
|
101
101
|
}
|
|
102
102
|
/** @internal */
|
|
103
103
|
getDataTestId() {
|
|
104
|
-
|
|
104
|
+
var _a;
|
|
105
|
+
if (!((_a = this.params) === null || _a === void 0 ? void 0 : _a.dataTestId))
|
|
105
106
|
return undefined;
|
|
106
107
|
if (typeof this.params.dataTestId === 'function')
|
|
107
108
|
return this.params.dataTestId(this.params.node.data);
|