@genesislcap/grid-pro 14.77.2 → 14.78.1-alpha-b86a5e4.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.
@@ -348,7 +348,19 @@
348
348
  "name": "persistColumnStateKey",
349
349
  "type": {
350
350
  "text": "string"
351
- }
351
+ },
352
+ "description": "The key to use for persisting the grid state in local/session storage.",
353
+ "privacy": "public"
354
+ },
355
+ {
356
+ "kind": "field",
357
+ "name": "columnStateStorageType",
358
+ "type": {
359
+ "text": "StorageType"
360
+ },
361
+ "default": "'session'",
362
+ "description": "The type of storage to use for persisting the column state.",
363
+ "privacy": "public"
352
364
  },
353
365
  {
354
366
  "kind": "field",
@@ -898,8 +910,18 @@
898
910
  "type": {
899
911
  "text": "string"
900
912
  },
913
+ "description": "The key to use for persisting the grid state in local/session storage.",
901
914
  "fieldName": "persistColumnStateKey"
902
915
  },
916
+ {
917
+ "name": "column-state-storage-type",
918
+ "type": {
919
+ "text": "StorageType"
920
+ },
921
+ "default": "'session'",
922
+ "description": "The type of storage to use for persisting the column state.",
923
+ "fieldName": "columnStateStorageType"
924
+ },
903
925
  {
904
926
  "name": "grid-autosizing",
905
927
  "type": {
@@ -3156,6 +3178,229 @@
3156
3178
  }
3157
3179
  ]
3158
3180
  },
3181
+ {
3182
+ "kind": "javascript-module",
3183
+ "path": "src/column/column.template.ts",
3184
+ "declarations": [
3185
+ {
3186
+ "kind": "variable",
3187
+ "name": "ColumnTemplate",
3188
+ "default": "html<GridColumn>`\n <template>\n <slot ${slotted('slottedAgCell')} @slotchange=\"${(x) => x.slottedAgCellChanged()}\"></slot>\n </template>\n`",
3189
+ "description": "The Grid Pro Column Template.",
3190
+ "privacy": "public"
3191
+ }
3192
+ ],
3193
+ "exports": [
3194
+ {
3195
+ "kind": "js",
3196
+ "name": "ColumnTemplate",
3197
+ "declaration": {
3198
+ "name": "ColumnTemplate",
3199
+ "module": "src/column/column.template.ts"
3200
+ }
3201
+ }
3202
+ ]
3203
+ },
3204
+ {
3205
+ "kind": "javascript-module",
3206
+ "path": "src/column/column.ts",
3207
+ "declarations": [
3208
+ {
3209
+ "kind": "class",
3210
+ "description": "The Grid Pro Column element.",
3211
+ "name": "GridColumn",
3212
+ "members": [
3213
+ {
3214
+ "kind": "field",
3215
+ "name": "slottedAgCell",
3216
+ "type": {
3217
+ "text": "HTMLElement[]"
3218
+ },
3219
+ "privacy": "public"
3220
+ },
3221
+ {
3222
+ "kind": "field",
3223
+ "name": "definition",
3224
+ "type": {
3225
+ "text": "ColDef"
3226
+ },
3227
+ "default": "{}"
3228
+ },
3229
+ {
3230
+ "kind": "method",
3231
+ "name": "slottedAgCellChanged",
3232
+ "privacy": "public"
3233
+ },
3234
+ {
3235
+ "kind": "field",
3236
+ "name": "_presentation",
3237
+ "type": {
3238
+ "text": "ComponentPresentation | null | undefined"
3239
+ },
3240
+ "privacy": "private",
3241
+ "default": "void 0",
3242
+ "inheritedFrom": {
3243
+ "name": "FoundationElement",
3244
+ "module": "src/foundation-element/foundation-element.ts"
3245
+ }
3246
+ },
3247
+ {
3248
+ "kind": "field",
3249
+ "name": "$presentation",
3250
+ "type": {
3251
+ "text": "ComponentPresentation | null"
3252
+ },
3253
+ "privacy": "public",
3254
+ "description": "A property which resolves the ComponentPresentation instance\nfor the current component.",
3255
+ "inheritedFrom": {
3256
+ "name": "FoundationElement",
3257
+ "module": "src/foundation-element/foundation-element.ts"
3258
+ }
3259
+ },
3260
+ {
3261
+ "kind": "field",
3262
+ "name": "template",
3263
+ "type": {
3264
+ "text": "ElementViewTemplate | void | null"
3265
+ },
3266
+ "privacy": "public",
3267
+ "description": "Sets the template of the element instance. When undefined,\nthe element will attempt to resolve the template from\nthe associated presentation or custom element definition.",
3268
+ "inheritedFrom": {
3269
+ "name": "FoundationElement",
3270
+ "module": "src/foundation-element/foundation-element.ts"
3271
+ }
3272
+ },
3273
+ {
3274
+ "kind": "method",
3275
+ "name": "templateChanged",
3276
+ "privacy": "protected",
3277
+ "return": {
3278
+ "type": {
3279
+ "text": "void"
3280
+ }
3281
+ },
3282
+ "inheritedFrom": {
3283
+ "name": "FoundationElement",
3284
+ "module": "src/foundation-element/foundation-element.ts"
3285
+ }
3286
+ },
3287
+ {
3288
+ "kind": "field",
3289
+ "name": "styles",
3290
+ "type": {
3291
+ "text": "ElementStyles | void | null"
3292
+ },
3293
+ "privacy": "public",
3294
+ "description": "Sets the default styles for the element instance. When undefined,\nthe element will attempt to resolve default styles from\nthe associated presentation or custom element definition.",
3295
+ "inheritedFrom": {
3296
+ "name": "FoundationElement",
3297
+ "module": "src/foundation-element/foundation-element.ts"
3298
+ }
3299
+ },
3300
+ {
3301
+ "kind": "method",
3302
+ "name": "stylesChanged",
3303
+ "privacy": "protected",
3304
+ "return": {
3305
+ "type": {
3306
+ "text": "void"
3307
+ }
3308
+ },
3309
+ "inheritedFrom": {
3310
+ "name": "FoundationElement",
3311
+ "module": "src/foundation-element/foundation-element.ts"
3312
+ }
3313
+ },
3314
+ {
3315
+ "kind": "method",
3316
+ "name": "compose",
3317
+ "privacy": "public",
3318
+ "static": true,
3319
+ "return": {
3320
+ "type": {
3321
+ "text": "(\n overrideDefinition?: OverrideFoundationElementDefinition<T>\n ) => FoundationElementRegistry<T, K>"
3322
+ }
3323
+ },
3324
+ "parameters": [
3325
+ {
3326
+ "name": "this",
3327
+ "type": {
3328
+ "text": "K"
3329
+ }
3330
+ },
3331
+ {
3332
+ "name": "elementDefinition",
3333
+ "type": {
3334
+ "text": "T"
3335
+ },
3336
+ "description": "The definition of the element to create the registry\nfunction for."
3337
+ }
3338
+ ],
3339
+ "description": "Defines an element registry function with a set of element definition defaults.",
3340
+ "inheritedFrom": {
3341
+ "name": "FoundationElement",
3342
+ "module": "src/foundation-element/foundation-element.ts"
3343
+ }
3344
+ }
3345
+ ],
3346
+ "superclass": {
3347
+ "name": "FoundationElement",
3348
+ "package": "@microsoft/fast-foundation"
3349
+ },
3350
+ "tagName": "grid-pro-column",
3351
+ "customElement": true
3352
+ }
3353
+ ],
3354
+ "exports": [
3355
+ {
3356
+ "kind": "js",
3357
+ "name": "GridColumn",
3358
+ "declaration": {
3359
+ "name": "GridColumn",
3360
+ "module": "src/column/column.ts"
3361
+ }
3362
+ },
3363
+ {
3364
+ "kind": "custom-element-definition",
3365
+ "name": "grid-pro-column",
3366
+ "declaration": {
3367
+ "name": "GridColumn",
3368
+ "module": "src/column/column.ts"
3369
+ }
3370
+ }
3371
+ ]
3372
+ },
3373
+ {
3374
+ "kind": "javascript-module",
3375
+ "path": "src/column/index.ts",
3376
+ "declarations": [],
3377
+ "exports": [
3378
+ {
3379
+ "kind": "js",
3380
+ "name": "*",
3381
+ "declaration": {
3382
+ "name": "*",
3383
+ "package": "./column.template"
3384
+ }
3385
+ },
3386
+ {
3387
+ "kind": "js",
3388
+ "name": "*",
3389
+ "declaration": {
3390
+ "name": "*",
3391
+ "package": "./column"
3392
+ }
3393
+ },
3394
+ {
3395
+ "kind": "js",
3396
+ "name": "*",
3397
+ "declaration": {
3398
+ "name": "*",
3399
+ "package": "./utils"
3400
+ }
3401
+ }
3402
+ ]
3403
+ },
3159
3404
  {
3160
3405
  "kind": "javascript-module",
3161
3406
  "path": "src/external/ag-grid-css.ts",
@@ -3428,229 +3673,6 @@
3428
3673
  }
3429
3674
  ]
3430
3675
  },
3431
- {
3432
- "kind": "javascript-module",
3433
- "path": "src/column/column.template.ts",
3434
- "declarations": [
3435
- {
3436
- "kind": "variable",
3437
- "name": "ColumnTemplate",
3438
- "default": "html<GridColumn>`\n <template>\n <slot ${slotted('slottedAgCell')} @slotchange=\"${(x) => x.slottedAgCellChanged()}\"></slot>\n </template>\n`",
3439
- "description": "The Grid Pro Column Template.",
3440
- "privacy": "public"
3441
- }
3442
- ],
3443
- "exports": [
3444
- {
3445
- "kind": "js",
3446
- "name": "ColumnTemplate",
3447
- "declaration": {
3448
- "name": "ColumnTemplate",
3449
- "module": "src/column/column.template.ts"
3450
- }
3451
- }
3452
- ]
3453
- },
3454
- {
3455
- "kind": "javascript-module",
3456
- "path": "src/column/column.ts",
3457
- "declarations": [
3458
- {
3459
- "kind": "class",
3460
- "description": "The Grid Pro Column element.",
3461
- "name": "GridColumn",
3462
- "members": [
3463
- {
3464
- "kind": "field",
3465
- "name": "slottedAgCell",
3466
- "type": {
3467
- "text": "HTMLElement[]"
3468
- },
3469
- "privacy": "public"
3470
- },
3471
- {
3472
- "kind": "field",
3473
- "name": "definition",
3474
- "type": {
3475
- "text": "ColDef"
3476
- },
3477
- "default": "{}"
3478
- },
3479
- {
3480
- "kind": "method",
3481
- "name": "slottedAgCellChanged",
3482
- "privacy": "public"
3483
- },
3484
- {
3485
- "kind": "field",
3486
- "name": "_presentation",
3487
- "type": {
3488
- "text": "ComponentPresentation | null | undefined"
3489
- },
3490
- "privacy": "private",
3491
- "default": "void 0",
3492
- "inheritedFrom": {
3493
- "name": "FoundationElement",
3494
- "module": "src/foundation-element/foundation-element.ts"
3495
- }
3496
- },
3497
- {
3498
- "kind": "field",
3499
- "name": "$presentation",
3500
- "type": {
3501
- "text": "ComponentPresentation | null"
3502
- },
3503
- "privacy": "public",
3504
- "description": "A property which resolves the ComponentPresentation instance\nfor the current component.",
3505
- "inheritedFrom": {
3506
- "name": "FoundationElement",
3507
- "module": "src/foundation-element/foundation-element.ts"
3508
- }
3509
- },
3510
- {
3511
- "kind": "field",
3512
- "name": "template",
3513
- "type": {
3514
- "text": "ElementViewTemplate | void | null"
3515
- },
3516
- "privacy": "public",
3517
- "description": "Sets the template of the element instance. When undefined,\nthe element will attempt to resolve the template from\nthe associated presentation or custom element definition.",
3518
- "inheritedFrom": {
3519
- "name": "FoundationElement",
3520
- "module": "src/foundation-element/foundation-element.ts"
3521
- }
3522
- },
3523
- {
3524
- "kind": "method",
3525
- "name": "templateChanged",
3526
- "privacy": "protected",
3527
- "return": {
3528
- "type": {
3529
- "text": "void"
3530
- }
3531
- },
3532
- "inheritedFrom": {
3533
- "name": "FoundationElement",
3534
- "module": "src/foundation-element/foundation-element.ts"
3535
- }
3536
- },
3537
- {
3538
- "kind": "field",
3539
- "name": "styles",
3540
- "type": {
3541
- "text": "ElementStyles | void | null"
3542
- },
3543
- "privacy": "public",
3544
- "description": "Sets the default styles for the element instance. When undefined,\nthe element will attempt to resolve default styles from\nthe associated presentation or custom element definition.",
3545
- "inheritedFrom": {
3546
- "name": "FoundationElement",
3547
- "module": "src/foundation-element/foundation-element.ts"
3548
- }
3549
- },
3550
- {
3551
- "kind": "method",
3552
- "name": "stylesChanged",
3553
- "privacy": "protected",
3554
- "return": {
3555
- "type": {
3556
- "text": "void"
3557
- }
3558
- },
3559
- "inheritedFrom": {
3560
- "name": "FoundationElement",
3561
- "module": "src/foundation-element/foundation-element.ts"
3562
- }
3563
- },
3564
- {
3565
- "kind": "method",
3566
- "name": "compose",
3567
- "privacy": "public",
3568
- "static": true,
3569
- "return": {
3570
- "type": {
3571
- "text": "(\n overrideDefinition?: OverrideFoundationElementDefinition<T>\n ) => FoundationElementRegistry<T, K>"
3572
- }
3573
- },
3574
- "parameters": [
3575
- {
3576
- "name": "this",
3577
- "type": {
3578
- "text": "K"
3579
- }
3580
- },
3581
- {
3582
- "name": "elementDefinition",
3583
- "type": {
3584
- "text": "T"
3585
- },
3586
- "description": "The definition of the element to create the registry\nfunction for."
3587
- }
3588
- ],
3589
- "description": "Defines an element registry function with a set of element definition defaults.",
3590
- "inheritedFrom": {
3591
- "name": "FoundationElement",
3592
- "module": "src/foundation-element/foundation-element.ts"
3593
- }
3594
- }
3595
- ],
3596
- "superclass": {
3597
- "name": "FoundationElement",
3598
- "package": "@microsoft/fast-foundation"
3599
- },
3600
- "tagName": "grid-pro-column",
3601
- "customElement": true
3602
- }
3603
- ],
3604
- "exports": [
3605
- {
3606
- "kind": "js",
3607
- "name": "GridColumn",
3608
- "declaration": {
3609
- "name": "GridColumn",
3610
- "module": "src/column/column.ts"
3611
- }
3612
- },
3613
- {
3614
- "kind": "custom-element-definition",
3615
- "name": "grid-pro-column",
3616
- "declaration": {
3617
- "name": "GridColumn",
3618
- "module": "src/column/column.ts"
3619
- }
3620
- }
3621
- ]
3622
- },
3623
- {
3624
- "kind": "javascript-module",
3625
- "path": "src/column/index.ts",
3626
- "declarations": [],
3627
- "exports": [
3628
- {
3629
- "kind": "js",
3630
- "name": "*",
3631
- "declaration": {
3632
- "name": "*",
3633
- "package": "./column.template"
3634
- }
3635
- },
3636
- {
3637
- "kind": "js",
3638
- "name": "*",
3639
- "declaration": {
3640
- "name": "*",
3641
- "package": "./column"
3642
- }
3643
- },
3644
- {
3645
- "kind": "js",
3646
- "name": "*",
3647
- "declaration": {
3648
- "name": "*",
3649
- "package": "./utils"
3650
- }
3651
- }
3652
- ]
3653
- },
3654
3676
  {
3655
3677
  "kind": "javascript-module",
3656
3678
  "path": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource-next.ts",
@@ -1,5 +1,6 @@
1
1
  import type { ColDef, ColumnApi, ColumnState, GridApi, GridOptions } from '@ag-grid-community/core';
2
2
  import { Grid } from '@ag-grid-community/core';
3
+ import { StorageType } from '@genesislcap/foundation-comms';
3
4
  import { FoundationElement } from '@microsoft/fast-foundation';
4
5
  import { GridProGenesisDatasource } from './grid-pro-genesis-datasource';
5
6
  import { GridComponents } from './grid-pro.types';
@@ -352,7 +353,16 @@ export declare class GridPro extends GridPro_base {
352
353
  * If true, will enable cell flashing for all cell renderers, unless otherwise defined in custom colDef
353
354
  */
354
355
  enableCellFlashing: boolean;
356
+ /**
357
+ * The key to use for persisting the grid state in local/session storage.
358
+ * @public
359
+ */
355
360
  persistColumnStateKey: string;
361
+ /**
362
+ * The type of storage to use for persisting the column state.
363
+ * @public
364
+ */
365
+ columnStateStorageType: StorageType;
356
366
  /**
357
367
  * Boolean attribute to control whether the grid autosizes the columns upon interaction.
358
368
  * This will disable the column widths from being manually set, and doesn't save the widths
@@ -1 +1 @@
1
- {"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"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AAC,oBAAoB,CAAS;IAErC,OAAO,CAAC,YAAY,CAAiD;;IAarE,iBAAiB,IAAI,IAAI;IAyBzB,oBAAoB,IAAI,IAAI;IAU5B,wBAAwB,CAAC,qBAAqB,EAAE,cAAc,GAAG,cAAc;IAc/E,uBAAuB,IAAI,OAAO;IAOlC;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;IAW/B;;;OAGG;IACH,OAAO,CAAC,4BAA4B;IAIpC,OAAO,CAAC,eAAe;IAsBvB;;;;;OAKG;IACH,mBAAmB,IAAI,WAAW,EAAE;IAgBpC,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,yBAAyB;IAOjC;;OAEG;IACH,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,IAAI,wBAAwB,IAAI,wBAAwB,CAEvD;IAED,IAAI,WAAW,CAAC,OAAO,EAAE,WAAW,EAkFnC;IAED,OAAO,CAAC,kBAAkB;IAiB1B,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,kBAAkB,UAAQ;IA8CzE,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"}
@@ -280,6 +280,7 @@ let GridProGenesisDatasourceNext = class GridProGenesisDatasourceNext extends Li
280
280
  onSortChanged: (params) => { }, // TODO: confirm FUI-512
281
281
  };
282
282
  this.agGrid.addEventListener('onGridReady', () => __awaiter(this, void 0, void 0, function* () {
283
+ var _a, _b;
283
284
  const meta = yield this.connect
284
285
  .getMetadata(this.resourceName)
285
286
  .catch((e) => logger.error(e));
@@ -289,7 +290,7 @@ let GridProGenesisDatasourceNext = class GridProGenesisDatasourceNext extends Li
289
290
  this.originalFieldDef = extractFieldDefinitions(meta);
290
291
  const fieldMetadata = toFieldMetadata(this.originalFieldDef);
291
292
  const agColumnDefs = this.getAgColumnDefs(fieldMetadata);
292
- this.agGrid.gridApi.setColumnDefs(agColumnDefs);
293
+ (_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.setColumnDefs(agColumnDefs);
293
294
  const dataserverStream = yield this.createDataserverStream();
294
295
  this.dataserverStream = new StreamDatasource({
295
296
  stream: dataserverStream,
@@ -302,17 +303,18 @@ let GridProGenesisDatasourceNext = class GridProGenesisDatasourceNext extends Li
302
303
  rowId: this.rowId,
303
304
  pagination: this.pagination,
304
305
  });
305
- this.agGrid.gridApi.setServerSideDatasource(this.dataserverStream);
306
+ (_b = this.agGrid.gridApi) === null || _b === void 0 ? void 0 : _b.setServerSideDatasource(this.dataserverStream);
306
307
  }), { once: true });
307
308
  return;
308
309
  }
309
310
  logger.warn(`Application not connected, falling back to local columnDefs/rowData`);
310
311
  }
311
312
  reset() {
313
+ var _a;
312
314
  this.clearRowData();
313
315
  this.dataserverStream = undefined;
314
316
  this.originalFieldDef = undefined;
315
- this.agGrid.gridApi.setServerSideDatasource(this.dataserverStream);
317
+ (_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.setServerSideDatasource(this.dataserverStream);
316
318
  }
317
319
  restart() {
318
320
  this.reset();
@@ -55,6 +55,11 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
55
55
  * If true, will enable cell flashing for all cell renderers, unless otherwise defined in custom colDef
56
56
  */
57
57
  this.enableCellFlashing = false;
58
+ /**
59
+ * The type of storage to use for persisting the column state.
60
+ * @public
61
+ */
62
+ this.columnStateStorageType = 'session';
58
63
  /**
59
64
  * Boolean attribute to control whether the grid autosizes the columns upon interaction.
60
65
  * This will disable the column widths from being manually set, and doesn't save the widths
@@ -104,6 +109,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
104
109
  if (!this.shouldRunDisconnect)
105
110
  return;
106
111
  (_a = this.gridApi) === null || _a === void 0 ? void 0 : _a.destroy();
112
+ this.gridApi = null;
107
113
  }
108
114
  combineAllGridComponents(gridOptionsComponents) {
109
115
  const defaultFoundationAgComponents = {
@@ -145,7 +151,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
145
151
  }
146
152
  saveColumnState() {
147
153
  if (this.rehydrationAttempted && this.statePersistanceEnabled()) {
148
- const existingOptions = JSON.parse(this.session.getLocalStorageItem('gridOptions') || '{}');
154
+ const existingOptions = JSON.parse(this.session.getCurrentUserItem('gridOptions', this.columnStateStorageType) || '{}');
149
155
  let colState = this.columnApi.getColumnState();
150
156
  colState = this.gridAutosizingEnabled
151
157
  ? this.removeConfigWidthsToAutosize(colState)
@@ -153,7 +159,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
153
159
  if (colState.length === 0)
154
160
  return;
155
161
  existingOptions[this.persistColumnStateKey] = JSON.stringify(colState);
156
- this.session.setLocalStorageItem('gridOptions', JSON.stringify(existingOptions));
162
+ this.session.setCurrentUserItem('gridOptions', JSON.stringify(existingOptions), this.columnStateStorageType);
157
163
  }
158
164
  }
159
165
  /**
@@ -163,9 +169,9 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
163
169
  * @public
164
170
  */
165
171
  getSavedColumnState() {
166
- const localStorageGridOptions = this.session.getLocalStorageItem('gridOptions');
167
- if (this.statePersistanceEnabled() && localStorageGridOptions) {
168
- const allGridOptions = JSON.parse(localStorageGridOptions);
172
+ const storedGridOptions = this.session.getCurrentUserItem('gridOptions', this.columnStateStorageType);
173
+ if (this.statePersistanceEnabled() && storedGridOptions) {
174
+ const allGridOptions = JSON.parse(storedGridOptions);
169
175
  if (this.persistColumnStateKey in allGridOptions) {
170
176
  return JSON.parse(allGridOptions[this.persistColumnStateKey]);
171
177
  }
@@ -386,6 +392,9 @@ __decorate([
386
392
  __decorate([
387
393
  attr({ attribute: 'persist-column-state-key' })
388
394
  ], GridPro.prototype, "persistColumnStateKey", void 0);
395
+ __decorate([
396
+ attr({ attribute: 'column-state-storage-type' })
397
+ ], GridPro.prototype, "columnStateStorageType", void 0);
389
398
  __decorate([
390
399
  attr({ mode: 'boolean', attribute: 'grid-autosizing' })
391
400
  ], GridPro.prototype, "gridAutosizingEnabled", void 0);
@@ -5195,6 +5195,37 @@
5195
5195
  "isProtected": false,
5196
5196
  "isAbstract": false
5197
5197
  },
5198
+ {
5199
+ "kind": "Property",
5200
+ "canonicalReference": "@genesislcap/grid-pro!GridPro#columnStateStorageType:member",
5201
+ "docComment": "/**\n * The type of storage to use for persisting the column state.\n *\n * @public\n */\n",
5202
+ "excerptTokens": [
5203
+ {
5204
+ "kind": "Content",
5205
+ "text": "columnStateStorageType: "
5206
+ },
5207
+ {
5208
+ "kind": "Reference",
5209
+ "text": "StorageType",
5210
+ "canonicalReference": "@genesislcap/foundation-comms!StorageType:type"
5211
+ },
5212
+ {
5213
+ "kind": "Content",
5214
+ "text": ";"
5215
+ }
5216
+ ],
5217
+ "isReadonly": false,
5218
+ "isOptional": false,
5219
+ "releaseTag": "Public",
5220
+ "name": "columnStateStorageType",
5221
+ "propertyTypeTokenRange": {
5222
+ "startIndex": 1,
5223
+ "endIndex": 2
5224
+ },
5225
+ "isStatic": false,
5226
+ "isProtected": false,
5227
+ "isAbstract": false
5228
+ },
5198
5229
  {
5199
5230
  "kind": "Method",
5200
5231
  "canonicalReference": "@genesislcap/grid-pro!GridPro#combineAllGridComponents:member(1)",
@@ -5843,7 +5874,7 @@
5843
5874
  {
5844
5875
  "kind": "Property",
5845
5876
  "canonicalReference": "@genesislcap/grid-pro!GridPro#persistColumnStateKey:member",
5846
- "docComment": "",
5877
+ "docComment": "/**\n * The key to use for persisting the grid state in local/session storage.\n *\n * @public\n */\n",
5847
5878
  "excerptTokens": [
5848
5879
  {
5849
5880
  "kind": "Content",
@@ -30,6 +30,7 @@ import { Logger } from '@genesislcap/foundation-utils';
30
30
  import { MetadataDetail } from '@genesislcap/foundation-comms';
31
31
  import { OverrideFoundationElementDefinition } from '@microsoft/fast-foundation';
32
32
  import { SocketObservable } from '@genesislcap/foundation-comms';
33
+ import { StorageType } from '@genesislcap/foundation-comms';
33
34
  import { Swatch } from '@microsoft/fast-components';
34
35
  import { SwatchRGB } from '@microsoft/fast-components';
35
36
  import { TextField } from '@genesislcap/foundation-ui';
@@ -790,7 +791,16 @@ export declare class GridPro extends GridPro_base {
790
791
  * If true, will enable cell flashing for all cell renderers, unless otherwise defined in custom colDef
791
792
  */
792
793
  enableCellFlashing: boolean;
794
+ /**
795
+ * The key to use for persisting the grid state in local/session storage.
796
+ * @public
797
+ */
793
798
  persistColumnStateKey: string;
799
+ /**
800
+ * The type of storage to use for persisting the column state.
801
+ * @public
802
+ */
803
+ columnStateStorageType: StorageType;
794
804
  /**
795
805
  * Boolean attribute to control whether the grid autosizes the columns upon interaction.
796
806
  * This will disable the column widths from being manually set, and doesn't save the widths
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/grid-pro](./grid-pro.md) &gt; [GridPro](./grid-pro.gridpro.md) &gt; [columnStateStorageType](./grid-pro.gridpro.columnstatestoragetype.md)
4
+
5
+ ## GridPro.columnStateStorageType property
6
+
7
+ The type of storage to use for persisting the column state.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ columnStateStorageType: StorageType;
13
+ ```
@@ -35,6 +35,7 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
35
35
  | [classNames](./grid-pro.gridpro.classnames.md) | | string | |
36
36
  | [columnApi](./grid-pro.gridpro.columnapi.md) | | ColumnApi | |
37
37
  | [columnComponentName](./grid-pro.gridpro.columncomponentname.md) | | string | |
38
+ | [columnStateStorageType](./grid-pro.gridpro.columnstatestoragetype.md) | | StorageType | The type of storage to use for persisting the column state. |
38
39
  | [enableCellFlashing](./grid-pro.gridpro.enablecellflashing.md) | | boolean | If true, will enable cell flashing for all cell renderers, unless otherwise defined in custom colDef |
39
40
  | [enabledRowFlashing](./grid-pro.gridpro.enabledrowflashing.md) | | boolean | |
40
41
  | [eventsAndCallbacks](./grid-pro.gridpro.eventsandcallbacks.md) | | any | |
@@ -49,7 +50,7 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
49
50
  | [initialised](./grid-pro.gridpro.initialised.md) | <code>protected</code> | boolean | |
50
51
  | [observedAttributes](./grid-pro.gridpro.observedattributes.md) | <code>readonly</code> | string\[\] | |
51
52
  | [onlyTemplateColDefs](./grid-pro.gridpro.onlytemplatecoldefs.md) | | boolean | |
52
- | [persistColumnStateKey](./grid-pro.gridpro.persistcolumnstatekey.md) | | string | |
53
+ | [persistColumnStateKey](./grid-pro.gridpro.persistcolumnstatekey.md) | | string | The key to use for persisting the grid state in local/session storage. |
53
54
  | [rowHeight](./grid-pro.gridpro.rowheight.md) | | number | |
54
55
  | [theme](./grid-pro.gridpro.theme.md) | | string | |
55
56
 
@@ -4,6 +4,8 @@
4
4
 
5
5
  ## GridPro.persistColumnStateKey property
6
6
 
7
+ The key to use for persisting the grid state in local/session storage.
8
+
7
9
  **Signature:**
8
10
 
9
11
  ```typescript
@@ -36,6 +36,7 @@ import { Logger } from '@genesislcap/foundation-utils';
36
36
  import { MetadataDetail } from '@genesislcap/foundation-comms';
37
37
  import { OverrideFoundationElementDefinition } from '@microsoft/fast-foundation';
38
38
  import { SocketObservable } from '@genesislcap/foundation-comms';
39
+ import { StorageType } from '@genesislcap/foundation-comms';
39
40
  import { Swatch } from '@microsoft/fast-components';
40
41
  import { SwatchRGB } from '@microsoft/fast-components';
41
42
  import { TextField } from '@genesislcap/foundation-ui';
@@ -550,6 +551,7 @@ export class GridPro extends GridPro_base {
550
551
  columnApi: ColumnApi;
551
552
  // (undocumented)
552
553
  columnComponentName: string;
554
+ columnStateStorageType: StorageType;
553
555
  // (undocumented)
554
556
  combineAllGridComponents(gridOptionsComponents: GridComponents): GridComponents;
555
557
  // (undocumented)
@@ -588,7 +590,6 @@ export class GridPro extends GridPro_base {
588
590
  get observedAttributes(): string[];
589
591
  // (undocumented)
590
592
  onlyTemplateColDefs: boolean;
591
- // (undocumented)
592
593
  persistColumnStateKey: string;
593
594
  // (undocumented)
594
595
  rowHeight: number;
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.77.2",
4
+ "version": "14.78.1-alpha-b86a5e4.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -28,14 +28,14 @@
28
28
  "test:debug": "genx test --debug"
29
29
  },
30
30
  "devDependencies": {
31
- "@genesislcap/foundation-testing": "14.77.2",
32
- "@genesislcap/genx": "14.77.2",
31
+ "@genesislcap/foundation-testing": "14.78.1-alpha-b86a5e4.0",
32
+ "@genesislcap/genx": "14.78.1-alpha-b86a5e4.0",
33
33
  "rimraf": "^3.0.2"
34
34
  },
35
35
  "dependencies": {
36
- "@genesislcap/foundation-comms": "14.77.2",
37
- "@genesislcap/foundation-ui": "14.77.2",
38
- "@genesislcap/foundation-utils": "14.77.2",
36
+ "@genesislcap/foundation-comms": "14.78.1-alpha-b86a5e4.0",
37
+ "@genesislcap/foundation-ui": "14.78.1-alpha-b86a5e4.0",
38
+ "@genesislcap/foundation-utils": "14.78.1-alpha-b86a5e4.0",
39
39
  "@microsoft/fast-colors": "^5.1.4",
40
40
  "@microsoft/fast-components": "^2.21.3",
41
41
  "@microsoft/fast-element": "^1.7.0",
@@ -58,5 +58,5 @@
58
58
  "access": "public"
59
59
  },
60
60
  "customElements": "dist/custom-elements.json",
61
- "gitHead": "b47f3a7923044c6a2075e35d8bb066bddb9f9bad"
61
+ "gitHead": "5ddc1035be29486a88c0c4e019ca5ace6b5d6224"
62
62
  }