@genesislcap/grid-pro 14.160.1 → 14.162.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 CHANGED
@@ -1,8 +1,29 @@
1
1
  # Genesis Foundation Grids
2
2
 
3
+
4
+ ## Installation
5
+
6
+ To enable this module in your application, follow the steps below.
7
+
8
+ 1. Add `@genesislcap/grid-pro` as a dependency in your `package.json` file. Whenever you change the dependencies of your project, ensure you run the `$ npm run bootstrap` command again. You can find more information in the [package.json basics](https://learn.genesis.global/secure/web/basics/package-json-basics/) page.
9
+
10
+ ```json
11
+ {
12
+ ...
13
+ "dependencies": {
14
+ ...
15
+ "@genesislcap/grid-pro": "latest"
16
+ ...
17
+ },
18
+ ...
19
+ }
20
+ ```
21
+
22
+ ## [API Docs](./docs/api/index.md)
23
+
3
24
  ## License
4
25
 
5
- Note: this project provides front end dependencies and uses licensed components listed in the next section, thus licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
26
+ Note: this project provides front-end dependencies and uses licensed components listed in the next section; thus, licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
6
27
 
7
28
  ### Licensed components
8
29
  Genesis low-code platform
@@ -6768,6 +6768,18 @@
6768
6768
  "module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
6769
6769
  }
6770
6770
  },
6771
+ {
6772
+ "kind": "field",
6773
+ "name": "keepColDefsOnClearRowData",
6774
+ "type": {
6775
+ "text": "boolean"
6776
+ },
6777
+ "default": "false",
6778
+ "inheritedFrom": {
6779
+ "name": "GridProGenesisDatasource",
6780
+ "module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
6781
+ }
6782
+ },
6771
6783
  {
6772
6784
  "kind": "field",
6773
6785
  "name": "dataSub",
@@ -6858,6 +6870,16 @@
6858
6870
  {
6859
6871
  "kind": "method",
6860
6872
  "name": "init",
6873
+ "parameters": [
6874
+ {
6875
+ "name": "columnDefinitions",
6876
+ "optional": true,
6877
+ "type": {
6878
+ "text": "ColDef[]"
6879
+ },
6880
+ "description": "Optionally set the `gridOptions` up with column definitions"
6881
+ }
6882
+ ],
6861
6883
  "description": "Initializes the datasource.",
6862
6884
  "privacy": "public",
6863
6885
  "inheritedFrom": {
@@ -7676,6 +7698,18 @@
7676
7698
  "module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
7677
7699
  }
7678
7700
  },
7701
+ {
7702
+ "name": "keep-col-defs-on-clear-row-data",
7703
+ "type": {
7704
+ "text": "boolean"
7705
+ },
7706
+ "default": "false",
7707
+ "fieldName": "keepColDefsOnClearRowData",
7708
+ "inheritedFrom": {
7709
+ "name": "GridProGenesisDatasource",
7710
+ "module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
7711
+ }
7712
+ },
7679
7713
  {
7680
7714
  "name": "criteria",
7681
7715
  "type": {
@@ -9581,6 +9615,14 @@
9581
9615
  },
9582
9616
  "default": "false"
9583
9617
  },
9618
+ {
9619
+ "kind": "field",
9620
+ "name": "keepColDefsOnClearRowData",
9621
+ "type": {
9622
+ "text": "boolean"
9623
+ },
9624
+ "default": "false"
9625
+ },
9584
9626
  {
9585
9627
  "kind": "field",
9586
9628
  "name": "dataSub",
@@ -9656,6 +9698,16 @@
9656
9698
  {
9657
9699
  "kind": "method",
9658
9700
  "name": "init",
9701
+ "parameters": [
9702
+ {
9703
+ "name": "columnDefinitions",
9704
+ "optional": true,
9705
+ "type": {
9706
+ "text": "ColDef[]"
9707
+ },
9708
+ "description": "Optionally set the `gridOptions` up with column definitions"
9709
+ }
9710
+ ],
9659
9711
  "description": "Initializes the datasource.",
9660
9712
  "privacy": "public"
9661
9713
  },
@@ -10473,6 +10525,14 @@
10473
10525
  "default": "false",
10474
10526
  "fieldName": "restartOnReconnection"
10475
10527
  },
10528
+ {
10529
+ "name": "keep-col-defs-on-clear-row-data",
10530
+ "type": {
10531
+ "text": "boolean"
10532
+ },
10533
+ "default": "false",
10534
+ "fieldName": "keepColDefsOnClearRowData"
10535
+ },
10476
10536
  {
10477
10537
  "name": "criteria",
10478
10538
  "type": {
@@ -1,4 +1,4 @@
1
- import type { RowDataTransaction, RowNodeTransaction } from '@ag-grid-community/core';
1
+ import type { ColDef, RowDataTransaction, RowNodeTransaction } from '@ag-grid-community/core';
2
2
  import { Auth, Datasource } from '@genesislcap/foundation-comms';
3
3
  import { GridProBaseDatasource } from '../datasource/base.datasource';
4
4
  declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
@@ -46,10 +46,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
46
46
  readonly classList: DOMTokenList;
47
47
  className: string;
48
48
  readonly clientHeight: number;
49
- readonly clientLeft: number; /**
50
- * Restarts the datasource, uses `deinit` and `init` in sequence.
51
- * @public
52
- */
49
+ readonly clientLeft: number;
53
50
  readonly clientTop: number;
54
51
  readonly clientWidth: number;
55
52
  id: string;
@@ -68,12 +65,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
68
65
  readonly shadowRoot: ShadowRoot;
69
66
  slot: string;
70
67
  readonly tagName: string;
71
- attachShadow(init: ShadowRootInit): ShadowRoot; /**
72
- * Clears the rowData and columnDefs for the grid.
73
- * @remarks This is called when `reloadResourceData` happens, on criteria and filters change or full `reset`.
74
- * @param withColumnDefs - Whether to clear the columnDefs as well. Defaults to true.
75
- * @internal
76
- */
68
+ attachShadow(init: ShadowRootInit): ShadowRoot;
77
69
  closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2];
78
70
  closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3];
79
71
  closest<E extends Element = Element>(selectors: string): E;
@@ -99,12 +91,6 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
99
91
  insertAdjacentHTML(position: InsertPosition, text: string): void;
100
92
  insertAdjacentText(where: InsertPosition, data: string): void;
101
93
  matches(selectors: string): boolean;
102
- /**
103
- * Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
104
- * Proxies to {@link @genesislcap/grid-pro#GridProGenesisDatasource.loadResourceData} but without the full init (no metadata fetch).
105
- * @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
106
- * @internal
107
- */
108
94
  releasePointerCapture(pointerId: number): void;
109
95
  removeAttribute(qualifiedName: string): void;
110
96
  removeAttributeNS(namespace: string, localName: string): void;
@@ -118,13 +104,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
118
104
  scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
119
105
  scrollTo(options?: ScrollToOptions): void;
120
106
  scrollTo(x: number, y: number): void;
121
- setAttribute(qualifiedName: string, value: string): void; /**
122
- * Initializes the datasource and loads the data for the grid.
123
- * Handles both snapshot and stream data (for both REQUEST_SERVER and DATASERVER resource types).
124
- *
125
- * @param withFullInit - if true, will call datasource.init() with requiresMetadataFetch = true, fetching fresh metadata
126
- * @internal
127
- */
107
+ setAttribute(qualifiedName: string, value: string): void;
128
108
  setAttributeNS(namespace: string, qualifiedName: string, value: string): void;
129
109
  setAttributeNode(attr: Attr): Attr;
130
110
  setAttributeNodeNS(attr: Attr): Attr;
@@ -362,6 +342,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
362
342
  request: any;
363
343
  resourceNameChanged(oldValue: string, newValue: string): void;
364
344
  restartOnReconnection: boolean;
345
+ keepColDefsOnClearRowData: boolean;
365
346
  private dataSub;
366
347
  private updateSub;
367
348
  private connectionSub;
@@ -375,9 +356,10 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
375
356
  /**
376
357
  * Initializes the datasource.
377
358
  * @public
359
+ * @param columnDefinitions - Optionally set the `gridOptions` up with column definitions
378
360
  * @remarks This method is called automatically when the element is connected to the DOM.
379
361
  */
380
- init(): Promise<void>;
362
+ init(columnDefinitions?: ColDef[]): Promise<void>;
381
363
  /**
382
364
  * Deinitialises the datasource, resetting it to its initial state.
383
365
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"grid-pro-genesis-datasource.d.ts","sourceRoot":"","sources":["../../../src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EACL,IAAI,EACJ,UAAU,EAYX,MAAM,+BAA+B,CAAC;AAKvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA4MpE;;;OAGG;;;;;;;;;;;;;;;;;;;oDA4BH;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;IAoDH;;;;;OAKG;;;;;;;;;;;;;;8DAaH;;;;;;OAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAjTL;;;;GAIG;AACH,qBAGa,wBAAyB,SAAQ,6BAAqC;IAC3E,IAAI,EAAG,IAAI,CAAC;IACN,UAAU,EAAG,UAAU,CAAC;IAEpC,aAAa,SAAsB;IACnC,kBAAkB,SAA2B;IAG7C,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IASf,eAAe,EAAE,MAAM,CACf;IACQ,cAAc,EAAE,OAAO,CAAS;IAC7E,OAAO,EAAE,GAAG,CAAC;IAEzB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAKW,qBAAqB,UAAS;IAE/F,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,SAAS,CAAe;IAChC,OAAO,CAAC,aAAa,CAAe;IAEpC,OAAO,CAAC,6BAA6B,CAAQ;IAE7C,OAAO,CAAC,SAAS,CAAS;IAE1B,OAAO,CAAC,mBAAmB,CAAkC;IAC7D,OAAO,CAAC,MAAM,CAAwE;IAEtF,iBAAiB;IAuBjB,oBAAoB;IAWX,SAAS,IAAI,IAAI;IAU1B;;;;OAIG;IACG,IAAI;IAqDV;;;OAGG;IACH,MAAM;IAIN;;;;OAIG;IACH,KAAK;IA8BL;;;OAGG;IACH,OAAO;IAKP;;OAEG;IACH,WAAW;IAIX;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAUlB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAWpB;;;;OAIG;YACW,UAAU;IAmCxB;;;;;OAKG;YACW,kBAAkB;IAYhC;;;;;;OAMG;YACW,gBAAgB;IA0D9B,OAAO,CAAC,cAAc;IActB,YAAY,CAAC,MAAM,KAAA;IAOnB,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,sBAAsB;IA2C9B,OAAO,CAAC,mBAAmB;YAsBb,eAAe;IAc7B,OAAO,CAAC,aAAa;IAMd,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM;IAK5B,gBAAgB,CACvB,aAAa,EAAE,kBAAkB,GAChC,kBAAkB,GAAG,IAAI,GAAG,SAAS;IAI/B,qBAAqB,CAC5B,aAAa,EAAE,kBAAkB,EACjC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,IAAI,GAC3C,IAAI;CAGR"}
1
+ {"version":3,"file":"grid-pro-genesis-datasource.d.ts","sourceRoot":"","sources":["../../../src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EACL,IAAI,EACJ,UAAU,EAYX,MAAM,+BAA+B,CAAC;AAKvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWtE;;;;GAIG;AACH,qBAGa,wBAAyB,SAAQ,6BAAqC;IAC3E,IAAI,EAAG,IAAI,CAAC;IACN,UAAU,EAAG,UAAU,CAAC;IAEpC,aAAa,SAAsB;IACnC,kBAAkB,SAA2B;IAG7C,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IASf,eAAe,EAAE,MAAM,CACf;IACQ,cAAc,EAAE,OAAO,CAAS;IAC7E,OAAO,EAAE,GAAG,CAAC;IAEzB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAKW,qBAAqB,UAAS;IAG/F,yBAAyB,UAAS;IAElC,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,SAAS,CAAe;IAChC,OAAO,CAAC,aAAa,CAAe;IAEpC,OAAO,CAAC,6BAA6B,CAAQ;IAE7C,OAAO,CAAC,SAAS,CAAS;IAE1B,OAAO,CAAC,mBAAmB,CAAkC;IAC7D,OAAO,CAAC,MAAM,CAAwE;IAEtF,iBAAiB;IAuBjB,oBAAoB;IAWX,SAAS,IAAI,IAAI;IAU1B;;;;;OAKG;IACG,IAAI,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE;IAsDvC;;;OAGG;IACH,MAAM;IAIN;;;;OAIG;IACH,KAAK;IA8BL;;;OAGG;IACH,OAAO;IAUP;;OAEG;IACH,WAAW;IAIX;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAUlB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAWpB;;;;OAIG;YACW,UAAU;IAmCxB;;;;;OAKG;YACW,kBAAkB;IAYhC;;;;;;OAMG;YACW,gBAAgB;IA0D9B,OAAO,CAAC,cAAc;IActB,YAAY,CAAC,MAAM,KAAA;IAOnB,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,sBAAsB;IA2C9B,OAAO,CAAC,mBAAmB;YAsBb,eAAe;IAc7B,OAAO,CAAC,aAAa;IAMd,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM;IAK5B,gBAAgB,CACvB,aAAa,EAAE,kBAAkB,GAChC,kBAAkB,GAAG,IAAI,GAAG,SAAS;IAI/B,qBAAqB,CAC5B,aAAa,EAAE,kBAAkB,EACjC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,IAAI,GAC3C,IAAI;CAGR"}
@@ -24,6 +24,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
24
24
  this.pollingInterval = DatasourceDefaults.REQ_REP_POLLING_INTERVAL_MS;
25
25
  this.disablePolling = false;
26
26
  this.restartOnReconnection = false;
27
+ this.keepColDefsOnClearRowData = false;
27
28
  this.requiresFullRowDataAndColDefs = true;
28
29
  this.criteriaFromFilters = new Map();
29
30
  this.update = new BehaviorSubject(new Map());
@@ -81,9 +82,10 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
81
82
  /**
82
83
  * Initializes the datasource.
83
84
  * @public
85
+ * @param columnDefinitions - Optionally set the `gridOptions` up with column definitions
84
86
  * @remarks This method is called automatically when the element is connected to the DOM.
85
87
  */
86
- init() {
88
+ init(columnDefinitions) {
87
89
  return __awaiter(this, void 0, void 0, function* () {
88
90
  if (this.agGrid &&
89
91
  this.datasource.validResourceName(this.resourceName) &&
@@ -97,7 +99,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
97
99
  return;
98
100
  }
99
101
  this.isRequestServer = meta.TYPE === ResourceType.REQUEST_SERVER;
100
- const gridOptions = Object.assign({ getRowId: (params) => params.data[this.rowId] }, this.deferredGridOptions);
102
+ const gridOptions = Object.assign(Object.assign({ getRowId: (params) => params.data[this.rowId] }, (columnDefinitions && { columnDefs: columnDefinitions })), this.deferredGridOptions);
101
103
  this.agGrid.gridOptions = Object.assign({}, gridOptions);
102
104
  this.agGrid.addEventListener('onGridReady', () => __awaiter(this, void 0, void 0, function* () {
103
105
  yield this.loadResourceData();
@@ -153,8 +155,12 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
153
155
  * @public
154
156
  */
155
157
  restart() {
158
+ let columnDefinitions;
159
+ if (this.keepColDefsOnClearRowData) {
160
+ columnDefinitions = this.agGrid.gridApi.getColumnDefs();
161
+ }
156
162
  this.deinit();
157
- this.init();
163
+ this.init(columnDefinitions);
158
164
  }
159
165
  /**
160
166
  * Force the grid to redispatch the current rows
@@ -184,7 +190,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
184
190
  var _a, _b, _c, _d;
185
191
  this.rowData = new Map();
186
192
  this.agTransaction = undefined;
187
- if (withColumnDefs) {
193
+ if (withColumnDefs && !this.keepColDefsOnClearRowData) {
188
194
  (_b = (_a = this.agGrid) === null || _a === void 0 ? void 0 : _a.gridApi) === null || _b === void 0 ? void 0 : _b.setColumnDefs([]);
189
195
  }
190
196
  (_d = (_c = this.agGrid) === null || _c === void 0 ? void 0 : _c.gridApi) === null || _d === void 0 ? void 0 : _d.setRowData([]);
@@ -436,6 +442,9 @@ __decorate([
436
442
  __decorate([
437
443
  attr({ mode: 'boolean', attribute: 'restart-on-reconnection' })
438
444
  ], GridProGenesisDatasource.prototype, "restartOnReconnection", void 0);
445
+ __decorate([
446
+ attr({ mode: 'boolean', attribute: 'keep-col-defs-on-clear-row-data' })
447
+ ], GridProGenesisDatasource.prototype, "keepColDefsOnClearRowData", void 0);
439
448
  GridProGenesisDatasource = __decorate([
440
449
  customElement({
441
450
  name: 'grid-pro-genesis-datasource',
@@ -10658,11 +10658,24 @@
10658
10658
  {
10659
10659
  "kind": "Method",
10660
10660
  "canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#init:member(1)",
10661
- "docComment": "/**\n * Initializes the datasource.\n *\n * @remarks\n *\n * This method is called automatically when the element is connected to the DOM.\n *\n * @public\n */\n",
10661
+ "docComment": "/**\n * Initializes the datasource.\n *\n * @remarks\n *\n * This method is called automatically when the element is connected to the DOM.\n *\n * @param columnDefinitions - Optionally set the `gridOptions` up with column definitions\n *\n * @public\n */\n",
10662
10662
  "excerptTokens": [
10663
10663
  {
10664
10664
  "kind": "Content",
10665
- "text": "init(): "
10665
+ "text": "init(columnDefinitions?: "
10666
+ },
10667
+ {
10668
+ "kind": "Reference",
10669
+ "text": "ColDef",
10670
+ "canonicalReference": "@ag-grid-community/core!ColDef:interface"
10671
+ },
10672
+ {
10673
+ "kind": "Content",
10674
+ "text": "[]"
10675
+ },
10676
+ {
10677
+ "kind": "Content",
10678
+ "text": "): "
10666
10679
  },
10667
10680
  {
10668
10681
  "kind": "Reference",
@@ -10680,17 +10693,56 @@
10680
10693
  ],
10681
10694
  "isStatic": false,
10682
10695
  "returnTypeTokenRange": {
10683
- "startIndex": 1,
10684
- "endIndex": 3
10696
+ "startIndex": 4,
10697
+ "endIndex": 6
10685
10698
  },
10686
10699
  "releaseTag": "Public",
10687
10700
  "isProtected": false,
10688
10701
  "overloadIndex": 1,
10689
- "parameters": [],
10702
+ "parameters": [
10703
+ {
10704
+ "parameterName": "columnDefinitions",
10705
+ "parameterTypeTokenRange": {
10706
+ "startIndex": 1,
10707
+ "endIndex": 3
10708
+ },
10709
+ "isOptional": true
10710
+ }
10711
+ ],
10690
10712
  "isOptional": false,
10691
10713
  "isAbstract": false,
10692
10714
  "name": "init"
10693
10715
  },
10716
+ {
10717
+ "kind": "Property",
10718
+ "canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#keepColDefsOnClearRowData:member",
10719
+ "docComment": "",
10720
+ "excerptTokens": [
10721
+ {
10722
+ "kind": "Content",
10723
+ "text": "keepColDefsOnClearRowData: "
10724
+ },
10725
+ {
10726
+ "kind": "Content",
10727
+ "text": "boolean"
10728
+ },
10729
+ {
10730
+ "kind": "Content",
10731
+ "text": ";"
10732
+ }
10733
+ ],
10734
+ "isReadonly": false,
10735
+ "isOptional": false,
10736
+ "releaseTag": "Public",
10737
+ "name": "keepColDefsOnClearRowData",
10738
+ "propertyTypeTokenRange": {
10739
+ "startIndex": 1,
10740
+ "endIndex": 2
10741
+ },
10742
+ "isStatic": false,
10743
+ "isProtected": false,
10744
+ "isAbstract": false
10745
+ },
10694
10746
  {
10695
10747
  "kind": "Property",
10696
10748
  "canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#pollingInterval:member",
@@ -1765,6 +1765,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
1765
1765
  request: any;
1766
1766
  resourceNameChanged(oldValue: string, newValue: string): void;
1767
1767
  restartOnReconnection: boolean;
1768
+ keepColDefsOnClearRowData: boolean;
1768
1769
  private dataSub;
1769
1770
  private updateSub;
1770
1771
  private connectionSub;
@@ -1778,9 +1779,10 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
1778
1779
  /**
1779
1780
  * Initializes the datasource.
1780
1781
  * @public
1782
+ * @param columnDefinitions - Optionally set the `gridOptions` up with column definitions
1781
1783
  * @remarks This method is called automatically when the element is connected to the DOM.
1782
1784
  */
1783
- init(): Promise<void>;
1785
+ init(columnDefinitions?: ColDef[]): Promise<void>;
1784
1786
  /**
1785
1787
  * Deinitialises the datasource, resetting it to its initial state.
1786
1788
  * @public
@@ -1894,10 +1896,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
1894
1896
  readonly classList: DOMTokenList;
1895
1897
  className: string;
1896
1898
  readonly clientHeight: number;
1897
- readonly clientLeft: number; /**
1898
- * Restarts the datasource, uses `deinit` and `init` in sequence.
1899
- * @public
1900
- */
1899
+ readonly clientLeft: number;
1901
1900
  readonly clientTop: number;
1902
1901
  readonly clientWidth: number;
1903
1902
  id: string;
@@ -1916,12 +1915,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
1916
1915
  readonly shadowRoot: ShadowRoot;
1917
1916
  slot: string;
1918
1917
  readonly tagName: string;
1919
- attachShadow(init: ShadowRootInit): ShadowRoot; /**
1920
- * Clears the rowData and columnDefs for the grid.
1921
- * @remarks This is called when `reloadResourceData` happens, on criteria and filters change or full `reset`.
1922
- * @param withColumnDefs - Whether to clear the columnDefs as well. Defaults to true.
1923
- * @internal
1924
- */
1918
+ attachShadow(init: ShadowRootInit): ShadowRoot;
1925
1919
  closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2];
1926
1920
  closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3];
1927
1921
  closest<E extends Element = Element>(selectors: string): E;
@@ -1947,12 +1941,6 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
1947
1941
  insertAdjacentHTML(position: InsertPosition, text: string): void;
1948
1942
  insertAdjacentText(where: InsertPosition, data: string): void;
1949
1943
  matches(selectors: string): boolean;
1950
- /**
1951
- * Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
1952
- * Proxies to {@link @genesislcap/grid-pro#GridProGenesisDatasource.loadResourceData} but without the full init (no metadata fetch).
1953
- * @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
1954
- * @internal
1955
- */
1956
1944
  releasePointerCapture(pointerId: number): void;
1957
1945
  removeAttribute(qualifiedName: string): void;
1958
1946
  removeAttributeNS(namespace: string, localName: string): void;
@@ -1966,13 +1954,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
1966
1954
  scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
1967
1955
  scrollTo(options?: ScrollToOptions): void;
1968
1956
  scrollTo(x: number, y: number): void;
1969
- setAttribute(qualifiedName: string, value: string): void; /**
1970
- * Initializes the datasource and loads the data for the grid.
1971
- * Handles both snapshot and stream data (for both REQUEST_SERVER and DATASERVER resource types).
1972
- *
1973
- * @param withFullInit - if true, will call datasource.init() with requiresMetadataFetch = true, fetching fresh metadata
1974
- * @internal
1975
- */
1957
+ setAttribute(qualifiedName: string, value: string): void;
1976
1958
  setAttributeNS(namespace: string, qualifiedName: string, value: string): void;
1977
1959
  setAttributeNode(attr: Attr): Attr;
1978
1960
  setAttributeNodeNS(attr: Attr): Attr;
@@ -9,8 +9,15 @@ Initializes the datasource.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- init(): Promise<void>;
12
+ init(columnDefinitions?: ColDef[]): Promise<void>;
13
13
  ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | columnDefinitions | ColDef\[\] | _(Optional)_ Optionally set the <code>gridOptions</code> up with column definitions |
20
+
14
21
  **Returns:**
15
22
 
16
23
  Promise&lt;void&gt;
@@ -0,0 +1,11 @@
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; [GridProGenesisDatasource](./grid-pro.gridprogenesisdatasource.md) &gt; [keepColDefsOnClearRowData](./grid-pro.gridprogenesisdatasource.keepcoldefsonclearrowdata.md)
4
+
5
+ ## GridProGenesisDatasource.keepColDefsOnClearRowData property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ keepColDefsOnClearRowData: boolean;
11
+ ```
@@ -26,6 +26,7 @@ Only supports Client-Side Row Model.
26
26
  | [auth](./grid-pro.gridprogenesisdatasource.auth.md) | | Auth | |
27
27
  | [datasource](./grid-pro.gridprogenesisdatasource.datasource.md) | | Datasource | |
28
28
  | [disablePolling](./grid-pro.gridprogenesisdatasource.disablepolling.md) | | boolean | |
29
+ | [keepColDefsOnClearRowData](./grid-pro.gridprogenesisdatasource.keepcoldefsonclearrowdata.md) | | boolean | |
29
30
  | [pollingInterval](./grid-pro.gridprogenesisdatasource.pollinginterval.md) | | number | |
30
31
  | [request](./grid-pro.gridprogenesisdatasource.request.md) | | any | |
31
32
  | [restartOnReconnection](./grid-pro.gridprogenesisdatasource.restartonreconnection.md) | | boolean | |
@@ -42,7 +43,7 @@ Only supports Client-Side Row Model.
42
43
  | [deinit()](./grid-pro.gridprogenesisdatasource.deinit.md) | | Deinitialises the datasource, resetting it to its initial state. |
43
44
  | [disconnectedCallback()](./grid-pro.gridprogenesisdatasource.disconnectedcallback.md) | | |
44
45
  | [handleErrors(result)](./grid-pro.gridprogenesisdatasource.handleerrors.md) | | |
45
- | [init()](./grid-pro.gridprogenesisdatasource.init.md) | | Initializes the datasource. |
46
+ | [init(columnDefinitions)](./grid-pro.gridprogenesisdatasource.init.md) | | Initializes the datasource. |
46
47
  | [refreshRows()](./grid-pro.gridprogenesisdatasource.refreshrows.md) | | Force the grid to redispatch the current rows |
47
48
  | [removeFilter(fieldName)](./grid-pro.gridprogenesisdatasource.removefilter.md) | | |
48
49
  | [reset()](./grid-pro.gridprogenesisdatasource.reset.md) | | Resets the datasource to its initial state. |
@@ -970,7 +970,9 @@ export class GridProGenesisDatasource extends GridProGenesisDatasource_base {
970
970
  disconnectedCallback(): void;
971
971
  // (undocumented)
972
972
  handleErrors(result: any): void;
973
- init(): Promise<void>;
973
+ init(columnDefinitions?: ColDef[]): Promise<void>;
974
+ // (undocumented)
975
+ keepColDefsOnClearRowData: boolean;
974
976
  // (undocumented)
975
977
  pollingInterval: number;
976
978
  refreshRows(): 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.160.1",
4
+ "version": "14.162.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.160.1",
34
- "@genesislcap/genx": "14.160.1",
35
- "@genesislcap/rollup-builder": "14.160.1",
36
- "@genesislcap/ts-builder": "14.160.1",
37
- "@genesislcap/uvu-playwright-builder": "14.160.1",
38
- "@genesislcap/vite-builder": "14.160.1",
39
- "@genesislcap/webpack-builder": "14.160.1",
33
+ "@genesislcap/foundation-testing": "14.162.0",
34
+ "@genesislcap/genx": "14.162.0",
35
+ "@genesislcap/rollup-builder": "14.162.0",
36
+ "@genesislcap/ts-builder": "14.162.0",
37
+ "@genesislcap/uvu-playwright-builder": "14.162.0",
38
+ "@genesislcap/vite-builder": "14.162.0",
39
+ "@genesislcap/webpack-builder": "14.162.0",
40
40
  "rimraf": "^3.0.2"
41
41
  },
42
42
  "dependencies": {
43
- "@genesislcap/foundation-comms": "14.160.1",
44
- "@genesislcap/foundation-logger": "14.160.1",
45
- "@genesislcap/foundation-ui": "14.160.1",
46
- "@genesislcap/foundation-utils": "14.160.1",
43
+ "@genesislcap/foundation-comms": "14.162.0",
44
+ "@genesislcap/foundation-logger": "14.162.0",
45
+ "@genesislcap/foundation-ui": "14.162.0",
46
+ "@genesislcap/foundation-utils": "14.162.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": "598e3599570a21709dfdc8e47adf5c77e5feff80"
72
+ "gitHead": "874e7ee403e4cfab01c6fb2542ae3264c7202831"
73
73
  }