@genesislcap/grid-tabulator 15.92.0-HT-305.1 → 15.92.0-HT-305.2
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 +521 -468
- package/dist/dts/datasource/client-side.datasource.d.ts +39 -7
- package/dist/dts/datasource/client-side.datasource.d.ts.map +1 -1
- package/dist/dts/react.d.ts +2 -1
- package/dist/esm/datasource/client-side.datasource.js +27 -1
- package/dist/grid-tabulator.api.json +160 -2
- package/dist/grid-tabulator.d.ts +41 -7
- package/dist/react.cjs +6 -1
- package/dist/react.mjs +6 -1
- package/package.json +11 -11
|
@@ -39,6 +39,21 @@ export interface GridTabulatorSizeChangedEventDetail {
|
|
|
39
39
|
value: number;
|
|
40
40
|
oldValue: number;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Detail payload for the `more-rows-changed` event.
|
|
44
|
+
* @alpha
|
|
45
|
+
*/
|
|
46
|
+
export interface GridTabulatorMoreRowsEventDetail {
|
|
47
|
+
/** Whether the server holds more rows than were sent (`MORE_ROWS`). */
|
|
48
|
+
moreRows: boolean | undefined;
|
|
49
|
+
/** Total rows the resource holds on the server, ignoring criteria (`ROWS_COUNT`). */
|
|
50
|
+
rowsCount: number | undefined;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Kind of change a row data mapper is called with for a stream transaction.
|
|
54
|
+
* @alpha
|
|
55
|
+
*/
|
|
56
|
+
export type GridTabulatorRowDataMapperOperation = 'add' | 'update' | 'remove';
|
|
42
57
|
declare const GridTabulatorClientSideDatasource_base: (new (...args: any[]) => {
|
|
43
58
|
#_container: import("@genesislcap/foundation-utils").FoundationLayoutContainer | import("@genesislcap/foundation-utils").LayoutCacheContainer | import("@genesislcap/foundation-utils").DOMContainer;
|
|
44
59
|
#_latestTokenCode: string;
|
|
@@ -86,12 +101,7 @@ declare const GridTabulatorClientSideDatasource_base: (new (...args: any[]) => {
|
|
|
86
101
|
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
87
102
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
88
103
|
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
89
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options
|
|
90
|
-
/**
|
|
91
|
-
* Returns whether the `row-id` attribute is the default one, depending on the resource type.
|
|
92
|
-
* @internal
|
|
93
|
-
*/
|
|
94
|
-
?: boolean | EventListenerOptions): void;
|
|
104
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
95
105
|
readonly attributes: NamedNodeMap;
|
|
96
106
|
get classList(): DOMTokenList;
|
|
97
107
|
set classList(value: string): any;
|
|
@@ -778,6 +788,7 @@ declare const GridTabulatorClientSideDatasource_base: (new (...args: any[]) => {
|
|
|
778
788
|
* @fires gridTabulator:error - Fired when a datasource error occurs. detail: `GridTabulatorErrorEventDetail`
|
|
779
789
|
* @fires dataInit - Fired when tabulator data is initialized
|
|
780
790
|
* @fires sizeChanged - Fired when layout size changes. detail: `GridTabulatorSizeChangedEventDetail`
|
|
791
|
+
* @fires more-rows-changed - Fired when the server-reported `MORE_ROWS` or `ROWS_COUNT` changes, including when they are reset. detail: `GridTabulatorMoreRowsEventDetail`
|
|
781
792
|
*/
|
|
782
793
|
export declare class GridTabulatorClientSideDatasource extends GridTabulatorClientSideDatasource_base {
|
|
783
794
|
auth: Auth;
|
|
@@ -814,9 +825,24 @@ export declare class GridTabulatorClientSideDatasource extends GridTabulatorClie
|
|
|
814
825
|
*/
|
|
815
826
|
keepColDefsOnClearRowData: boolean;
|
|
816
827
|
/**
|
|
817
|
-
* Allows grid data updates to be processed via and external function before applying in grid
|
|
828
|
+
* Allows grid data updates to be processed via and external function before applying in grid.
|
|
829
|
+
*
|
|
830
|
+
* @remarks
|
|
831
|
+
* The mapper is called with all rows (one argument) when the grid data is set. For stream transactions it is
|
|
832
|
+
* called with the changed rows, the datasource's current rows keyed by row id, and the operation
|
|
833
|
+
* (`'add'`, `'update'` or `'remove'`).
|
|
818
834
|
*/
|
|
819
835
|
rowDataMapper: Function;
|
|
836
|
+
/**
|
|
837
|
+
* Total rows the resource holds on the server (`ROWS_COUNT` of the first stream message), or `undefined` when
|
|
838
|
+
* unknown. It ignores criteria, and is not adjusted for live inserts and deletes.
|
|
839
|
+
*/
|
|
840
|
+
serverRowsCount: number | undefined;
|
|
841
|
+
/**
|
|
842
|
+
* Whether the server holds more rows than were sent (`MORE_ROWS` of the first stream message), or `undefined`
|
|
843
|
+
* when unknown. It is true when `max-rows` capped the initial load.
|
|
844
|
+
*/
|
|
845
|
+
moreRows: boolean | undefined;
|
|
820
846
|
private dataSub;
|
|
821
847
|
private updateSub;
|
|
822
848
|
private connectionSub;
|
|
@@ -905,6 +931,12 @@ export declare class GridTabulatorClientSideDatasource extends GridTabulatorClie
|
|
|
905
931
|
* @internal
|
|
906
932
|
*/
|
|
907
933
|
loadResourceData(withFullInit?: boolean): Promise<void>;
|
|
934
|
+
/**
|
|
935
|
+
* Keeps `ROWS_COUNT` and `MORE_ROWS` from a raw stream message. The result filter drops them, and only
|
|
936
|
+
* the first message after the logon carries them.
|
|
937
|
+
*/
|
|
938
|
+
private captureServerPaging;
|
|
939
|
+
private setServerPaging;
|
|
908
940
|
private handleSnapshot;
|
|
909
941
|
private datasourceOptions;
|
|
910
942
|
private handleStreamResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/client-side.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,OAAO,EAEP,UAAU,EAIV,gBAAgB,EAUjB,MAAM,+BAA+B,CAAC;AAMvC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAS3C;;;GAGG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;;;GAGG;AACH,eAAO,MAAM,YAAY,SAAS,CAAC;AAOnC;;;GAGG;AACH,MAAM,WAAW,kBAAkB,CAAC,KAAK,GAAG,GAAG;IAC7C,wBAAwB;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,kBAAkB;IAClB,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACrB,qBAAqB;IACrB,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACxB,qBAAqB;IACrB,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,mCAAmC;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;;;;;;;;
|
|
1
|
+
{"version":3,"file":"client-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/client-side.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,OAAO,EAEP,UAAU,EAIV,gBAAgB,EAUjB,MAAM,+BAA+B,CAAC;AAMvC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAS3C;;;GAGG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;;;GAGG;AACH,eAAO,MAAM,YAAY,SAAS,CAAC;AAOnC;;;GAGG;AACH,MAAM,WAAW,kBAAkB,CAAC,KAAK,GAAG,GAAG;IAC7C,wBAAwB;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,kBAAkB;IAClB,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACrB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AAK,eAAe,GAM1B;IAED;;;OAGG;IACH,OAAO,KAAK,0BAA0B,GAIrC;IAED;;;;OAIG;IACG,IAAI;IA4CV;;;OAGG;IACH,OAAO;IAsCP;;;OAGG;IACH,OAAO;IAKP;;OAEG;IACH,WAAW;IAIX;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAWpB;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,EAAE;IA4BnC;;;;OAIG;YACW,UAAU;IAiBxB;;;OAGG;YACW,aAAa;IAsC3B;;;;;OAKG;YACW,kBAAkB;IAUhC;;;;;;OAMG;IACG,gBAAgB,CAAC,YAAY,UAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAqE1D;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,sBAAsB;IAiE9B,OAAO,CAAC,mBAAmB;IAyB3B,OAAO,CAAC,gBAAgB;IA8BxB,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,mBAAmB;IAuB3B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,aAAa;IAMd,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM;IAKrC,uBAAuB,CAAC,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,gBAAgB;CAGvE"}
|
package/dist/dts/react.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { GridTabulatorCell as GridTabulatorCellWC } from './cell/cell';
|
|
|
8
8
|
import type { GridTabulatorColumn as GridTabulatorColumnWC } from './column/column';
|
|
9
9
|
import type { GridTabulatorClientSideDatasource as GridTabulatorClientSideDatasourceWC } from './datasource/client-side.datasource';
|
|
10
10
|
import type { GridTabulator as GridTabulatorWC } from './grid-tabulator';
|
|
11
|
-
import type { GridTabulatorErrorEventDetail, GridTabulatorSizeChangedEventDetail } from '@genesislcap/grid-tabulator';
|
|
11
|
+
import type { GridTabulatorErrorEventDetail, GridTabulatorMoreRowsEventDetail, GridTabulatorSizeChangedEventDetail } from '@genesislcap/grid-tabulator';
|
|
12
12
|
import type { Tabulator } from 'tabulator-tables';
|
|
13
13
|
|
|
14
14
|
/** @internal Maps a web component class to its public props only.
|
|
@@ -75,6 +75,7 @@ export declare const GridTabulatorClientSideDatasource: React.ForwardRefExoticCo
|
|
|
75
75
|
onGridTabulatorError?: (event: CustomEvent<GridTabulatorErrorEventDetail>) => void;
|
|
76
76
|
onDataInit?: (event: CustomEvent<unknown>) => void;
|
|
77
77
|
onSizeChanged?: (event: CustomEvent<GridTabulatorSizeChangedEventDetail>) => void;
|
|
78
|
+
onMoreRowsChanged?: (event: CustomEvent<GridTabulatorMoreRowsEventDetail>) => void;
|
|
78
79
|
}
|
|
79
80
|
> & React.RefAttributes<GridTabulatorClientSideDatasourceWC>
|
|
80
81
|
>;
|
|
@@ -27,6 +27,7 @@ const DEBOUNCE_INTERVAL_MS = 1000;
|
|
|
27
27
|
* @fires gridTabulator:error - Fired when a datasource error occurs. detail: `GridTabulatorErrorEventDetail`
|
|
28
28
|
* @fires dataInit - Fired when tabulator data is initialized
|
|
29
29
|
* @fires sizeChanged - Fired when layout size changes. detail: `GridTabulatorSizeChangedEventDetail`
|
|
30
|
+
* @fires more-rows-changed - Fired when the server-reported `MORE_ROWS` or `ROWS_COUNT` changes, including when they are reset. detail: `GridTabulatorMoreRowsEventDetail`
|
|
30
31
|
*/
|
|
31
32
|
let GridTabulatorClientSideDatasource = class GridTabulatorClientSideDatasource extends LifecycleMixin(DatasourceEventHandler(FoundationElement)) {
|
|
32
33
|
constructor() {
|
|
@@ -220,6 +221,7 @@ let GridTabulatorClientSideDatasource = class GridTabulatorClientSideDatasource
|
|
|
220
221
|
clearRowData(withColumnDefs = true) {
|
|
221
222
|
var _a, _b, _c, _d;
|
|
222
223
|
this.rows = new Map();
|
|
224
|
+
this.setServerPaging(undefined, undefined);
|
|
223
225
|
if (withColumnDefs && !this.keepColDefsOnClearRowData) {
|
|
224
226
|
(_b = (_a = this.gridTabulator) === null || _a === void 0 ? void 0 : _a.grid) === null || _b === void 0 ? void 0 : _b.setColumns([]);
|
|
225
227
|
}
|
|
@@ -368,6 +370,7 @@ let GridTabulatorClientSideDatasource = class GridTabulatorClientSideDatasource
|
|
|
368
370
|
return;
|
|
369
371
|
}
|
|
370
372
|
this.dataSubWasLoggedOff = false;
|
|
373
|
+
this.captureServerPaging(result);
|
|
371
374
|
if (result.ROW) {
|
|
372
375
|
const nextMessage = dataServerResultFilter(result);
|
|
373
376
|
this.handleStreamResult(nextMessage);
|
|
@@ -390,6 +393,23 @@ let GridTabulatorClientSideDatasource = class GridTabulatorClientSideDatasource
|
|
|
390
393
|
}
|
|
391
394
|
});
|
|
392
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* Keeps `ROWS_COUNT` and `MORE_ROWS` from a raw stream message. The result filter drops them, and only
|
|
398
|
+
* the first message after the logon carries them.
|
|
399
|
+
*/
|
|
400
|
+
captureServerPaging(result) {
|
|
401
|
+
if (!result || (!('ROWS_COUNT' in result) && !('MORE_ROWS' in result)))
|
|
402
|
+
return;
|
|
403
|
+
this.setServerPaging(typeof result.ROWS_COUNT === 'number' ? result.ROWS_COUNT : this.serverRowsCount, typeof result.MORE_ROWS === 'boolean' ? result.MORE_ROWS : this.moreRows);
|
|
404
|
+
}
|
|
405
|
+
setServerPaging(rowsCount, moreRows) {
|
|
406
|
+
if (rowsCount === this.serverRowsCount && moreRows === this.moreRows)
|
|
407
|
+
return;
|
|
408
|
+
this.serverRowsCount = rowsCount;
|
|
409
|
+
this.moreRows = moreRows;
|
|
410
|
+
const detail = { moreRows, rowsCount };
|
|
411
|
+
this.$emit('more-rows-changed', detail);
|
|
412
|
+
}
|
|
393
413
|
handleSnapshot(result) {
|
|
394
414
|
if (Array.isArray(result))
|
|
395
415
|
return result;
|
|
@@ -525,7 +545,7 @@ let GridTabulatorClientSideDatasource = class GridTabulatorClientSideDatasource
|
|
|
525
545
|
if (!this.rowDataMapper) {
|
|
526
546
|
return transaction;
|
|
527
547
|
}
|
|
528
|
-
return Object.assign(Object.assign({}, transaction), { add: this.rowDataMapper(transaction.add, this.rows), update: this.rowDataMapper(transaction.update, this.rows), remove: this.rowDataMapper(transaction.remove, this.rows) });
|
|
548
|
+
return Object.assign(Object.assign({}, transaction), { add: this.rowDataMapper(transaction.add, this.rows, 'add'), update: this.rowDataMapper(transaction.update, this.rows, 'update'), remove: this.rowDataMapper(transaction.remove, this.rows, 'remove') });
|
|
529
549
|
}
|
|
530
550
|
handleStreamInserts(insertedRows) {
|
|
531
551
|
insertedRows === null || insertedRows === void 0 ? void 0 : insertedRows.forEach((insertData) => {
|
|
@@ -659,6 +679,12 @@ __decorate([
|
|
|
659
679
|
__decorate([
|
|
660
680
|
observable
|
|
661
681
|
], GridTabulatorClientSideDatasource.prototype, "rowDataMapper", void 0);
|
|
682
|
+
__decorate([
|
|
683
|
+
observable
|
|
684
|
+
], GridTabulatorClientSideDatasource.prototype, "serverRowsCount", void 0);
|
|
685
|
+
__decorate([
|
|
686
|
+
observable
|
|
687
|
+
], GridTabulatorClientSideDatasource.prototype, "moreRows", void 0);
|
|
662
688
|
GridTabulatorClientSideDatasource = __decorate([
|
|
663
689
|
customElement({
|
|
664
690
|
name: 'grid-tabulator-client-side-datasource',
|
|
@@ -4766,7 +4766,7 @@
|
|
|
4766
4766
|
{
|
|
4767
4767
|
"kind": "Class",
|
|
4768
4768
|
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorClientSideDatasource:class",
|
|
4769
|
-
"docComment": "/**\n * The Genesis Datasource element, for client-side data fetching and used exclusively by the GridTabulator element.\n *\n * @fires\n *\n * gridTabulator:error - Fired when a datasource error occurs. detail: `GridTabulatorErrorEventDetail`\n *\n * @fires\n *\n * dataInit - Fired when tabulator data is initialized\n *\n * @fires\n *\n * sizeChanged - Fired when layout size changes. detail: `GridTabulatorSizeChangedEventDetail`\n *\n * @alpha\n */\n",
|
|
4769
|
+
"docComment": "/**\n * The Genesis Datasource element, for client-side data fetching and used exclusively by the GridTabulator element.\n *\n * @fires\n *\n * gridTabulator:error - Fired when a datasource error occurs. detail: `GridTabulatorErrorEventDetail`\n *\n * @fires\n *\n * dataInit - Fired when tabulator data is initialized\n *\n * @fires\n *\n * sizeChanged - Fired when layout size changes. detail: `GridTabulatorSizeChangedEventDetail`\n *\n * @fires\n *\n * more-rows-changed - Fired when the server-reported `MORE_ROWS` or `ROWS_COUNT` changes, including when they are reset. detail: `GridTabulatorMoreRowsEventDetail`\n *\n * @alpha\n */\n",
|
|
4770
4770
|
"excerptTokens": [
|
|
4771
4771
|
{
|
|
4772
4772
|
"kind": "Content",
|
|
@@ -5189,6 +5189,36 @@
|
|
|
5189
5189
|
"isProtected": false,
|
|
5190
5190
|
"isAbstract": false
|
|
5191
5191
|
},
|
|
5192
|
+
{
|
|
5193
|
+
"kind": "Property",
|
|
5194
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorClientSideDatasource#moreRows:member",
|
|
5195
|
+
"docComment": "/**\n * Whether the server holds more rows than were sent (`MORE_ROWS` of the first stream message), or `undefined` when unknown. It is true when `max-rows` capped the initial load.\n */\n",
|
|
5196
|
+
"excerptTokens": [
|
|
5197
|
+
{
|
|
5198
|
+
"kind": "Content",
|
|
5199
|
+
"text": "moreRows: "
|
|
5200
|
+
},
|
|
5201
|
+
{
|
|
5202
|
+
"kind": "Content",
|
|
5203
|
+
"text": "boolean | undefined"
|
|
5204
|
+
},
|
|
5205
|
+
{
|
|
5206
|
+
"kind": "Content",
|
|
5207
|
+
"text": ";"
|
|
5208
|
+
}
|
|
5209
|
+
],
|
|
5210
|
+
"isReadonly": false,
|
|
5211
|
+
"isOptional": false,
|
|
5212
|
+
"releaseTag": "Alpha",
|
|
5213
|
+
"name": "moreRows",
|
|
5214
|
+
"propertyTypeTokenRange": {
|
|
5215
|
+
"startIndex": 1,
|
|
5216
|
+
"endIndex": 2
|
|
5217
|
+
},
|
|
5218
|
+
"isStatic": false,
|
|
5219
|
+
"isProtected": false,
|
|
5220
|
+
"isAbstract": false
|
|
5221
|
+
},
|
|
5192
5222
|
{
|
|
5193
5223
|
"kind": "Property",
|
|
5194
5224
|
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorClientSideDatasource#movingView:member",
|
|
@@ -5433,7 +5463,7 @@
|
|
|
5433
5463
|
{
|
|
5434
5464
|
"kind": "Property",
|
|
5435
5465
|
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorClientSideDatasource#rowDataMapper:member",
|
|
5436
|
-
"docComment": "/**\n * Allows grid data updates to be processed via and external function before applying in grid\n */\n",
|
|
5466
|
+
"docComment": "/**\n * Allows grid data updates to be processed via and external function before applying in grid.\n *\n * @remarks\n *\n * The mapper is called with all rows (one argument) when the grid data is set. For stream transactions it is called with the changed rows, the datasource's current rows keyed by row id, and the operation (`'add'`, `'update'` or `'remove'`).\n */\n",
|
|
5437
5467
|
"excerptTokens": [
|
|
5438
5468
|
{
|
|
5439
5469
|
"kind": "Content",
|
|
@@ -5490,6 +5520,36 @@
|
|
|
5490
5520
|
"isStatic": false,
|
|
5491
5521
|
"isProtected": false,
|
|
5492
5522
|
"isAbstract": false
|
|
5523
|
+
},
|
|
5524
|
+
{
|
|
5525
|
+
"kind": "Property",
|
|
5526
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorClientSideDatasource#serverRowsCount:member",
|
|
5527
|
+
"docComment": "/**\n * Total rows the resource holds on the server (`ROWS_COUNT` of the first stream message), or `undefined` when unknown. It ignores criteria, and is not adjusted for live inserts and deletes.\n */\n",
|
|
5528
|
+
"excerptTokens": [
|
|
5529
|
+
{
|
|
5530
|
+
"kind": "Content",
|
|
5531
|
+
"text": "serverRowsCount: "
|
|
5532
|
+
},
|
|
5533
|
+
{
|
|
5534
|
+
"kind": "Content",
|
|
5535
|
+
"text": "number | undefined"
|
|
5536
|
+
},
|
|
5537
|
+
{
|
|
5538
|
+
"kind": "Content",
|
|
5539
|
+
"text": ";"
|
|
5540
|
+
}
|
|
5541
|
+
],
|
|
5542
|
+
"isReadonly": false,
|
|
5543
|
+
"isOptional": false,
|
|
5544
|
+
"releaseTag": "Alpha",
|
|
5545
|
+
"name": "serverRowsCount",
|
|
5546
|
+
"propertyTypeTokenRange": {
|
|
5547
|
+
"startIndex": 1,
|
|
5548
|
+
"endIndex": 2
|
|
5549
|
+
},
|
|
5550
|
+
"isStatic": false,
|
|
5551
|
+
"isProtected": false,
|
|
5552
|
+
"isAbstract": false
|
|
5493
5553
|
}
|
|
5494
5554
|
],
|
|
5495
5555
|
"extendsTokenRange": {
|
|
@@ -5763,6 +5823,104 @@
|
|
|
5763
5823
|
"endIndex": 2
|
|
5764
5824
|
}
|
|
5765
5825
|
},
|
|
5826
|
+
{
|
|
5827
|
+
"kind": "Interface",
|
|
5828
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorMoreRowsEventDetail:interface",
|
|
5829
|
+
"docComment": "/**\n * Detail payload for the `more-rows-changed` event.\n *\n * @alpha\n */\n",
|
|
5830
|
+
"excerptTokens": [
|
|
5831
|
+
{
|
|
5832
|
+
"kind": "Content",
|
|
5833
|
+
"text": "export interface GridTabulatorMoreRowsEventDetail "
|
|
5834
|
+
}
|
|
5835
|
+
],
|
|
5836
|
+
"fileUrlPath": "src/datasource/client-side.datasource.ts",
|
|
5837
|
+
"releaseTag": "Alpha",
|
|
5838
|
+
"name": "GridTabulatorMoreRowsEventDetail",
|
|
5839
|
+
"preserveMemberOrder": false,
|
|
5840
|
+
"members": [
|
|
5841
|
+
{
|
|
5842
|
+
"kind": "PropertySignature",
|
|
5843
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorMoreRowsEventDetail#moreRows:member",
|
|
5844
|
+
"docComment": "/**\n * Whether the server holds more rows than were sent (`MORE_ROWS`).\n */\n",
|
|
5845
|
+
"excerptTokens": [
|
|
5846
|
+
{
|
|
5847
|
+
"kind": "Content",
|
|
5848
|
+
"text": "moreRows: "
|
|
5849
|
+
},
|
|
5850
|
+
{
|
|
5851
|
+
"kind": "Content",
|
|
5852
|
+
"text": "boolean | undefined"
|
|
5853
|
+
},
|
|
5854
|
+
{
|
|
5855
|
+
"kind": "Content",
|
|
5856
|
+
"text": ";"
|
|
5857
|
+
}
|
|
5858
|
+
],
|
|
5859
|
+
"isReadonly": false,
|
|
5860
|
+
"isOptional": false,
|
|
5861
|
+
"releaseTag": "Alpha",
|
|
5862
|
+
"name": "moreRows",
|
|
5863
|
+
"propertyTypeTokenRange": {
|
|
5864
|
+
"startIndex": 1,
|
|
5865
|
+
"endIndex": 2
|
|
5866
|
+
}
|
|
5867
|
+
},
|
|
5868
|
+
{
|
|
5869
|
+
"kind": "PropertySignature",
|
|
5870
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorMoreRowsEventDetail#rowsCount:member",
|
|
5871
|
+
"docComment": "/**\n * Total rows the resource holds on the server, ignoring criteria (`ROWS_COUNT`).\n */\n",
|
|
5872
|
+
"excerptTokens": [
|
|
5873
|
+
{
|
|
5874
|
+
"kind": "Content",
|
|
5875
|
+
"text": "rowsCount: "
|
|
5876
|
+
},
|
|
5877
|
+
{
|
|
5878
|
+
"kind": "Content",
|
|
5879
|
+
"text": "number | undefined"
|
|
5880
|
+
},
|
|
5881
|
+
{
|
|
5882
|
+
"kind": "Content",
|
|
5883
|
+
"text": ";"
|
|
5884
|
+
}
|
|
5885
|
+
],
|
|
5886
|
+
"isReadonly": false,
|
|
5887
|
+
"isOptional": false,
|
|
5888
|
+
"releaseTag": "Alpha",
|
|
5889
|
+
"name": "rowsCount",
|
|
5890
|
+
"propertyTypeTokenRange": {
|
|
5891
|
+
"startIndex": 1,
|
|
5892
|
+
"endIndex": 2
|
|
5893
|
+
}
|
|
5894
|
+
}
|
|
5895
|
+
],
|
|
5896
|
+
"extendsTokenRanges": []
|
|
5897
|
+
},
|
|
5898
|
+
{
|
|
5899
|
+
"kind": "TypeAlias",
|
|
5900
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorRowDataMapperOperation:type",
|
|
5901
|
+
"docComment": "/**\n * Kind of change a row data mapper is called with for a stream transaction.\n *\n * @alpha\n */\n",
|
|
5902
|
+
"excerptTokens": [
|
|
5903
|
+
{
|
|
5904
|
+
"kind": "Content",
|
|
5905
|
+
"text": "export type GridTabulatorRowDataMapperOperation = "
|
|
5906
|
+
},
|
|
5907
|
+
{
|
|
5908
|
+
"kind": "Content",
|
|
5909
|
+
"text": "'add' | 'update' | 'remove'"
|
|
5910
|
+
},
|
|
5911
|
+
{
|
|
5912
|
+
"kind": "Content",
|
|
5913
|
+
"text": ";"
|
|
5914
|
+
}
|
|
5915
|
+
],
|
|
5916
|
+
"fileUrlPath": "src/datasource/client-side.datasource.ts",
|
|
5917
|
+
"releaseTag": "Alpha",
|
|
5918
|
+
"name": "GridTabulatorRowDataMapperOperation",
|
|
5919
|
+
"typeTokenRange": {
|
|
5920
|
+
"startIndex": 1,
|
|
5921
|
+
"endIndex": 2
|
|
5922
|
+
}
|
|
5923
|
+
},
|
|
5766
5924
|
{
|
|
5767
5925
|
"kind": "Variable",
|
|
5768
5926
|
"canonicalReference": "@genesislcap/grid-tabulator!gridTabulatorShadowOptions:var",
|
package/dist/grid-tabulator.d.ts
CHANGED
|
@@ -1128,6 +1128,7 @@ export declare enum GridTabulatorCellRendererTypes {
|
|
|
1128
1128
|
* @fires gridTabulator:error - Fired when a datasource error occurs. detail: `GridTabulatorErrorEventDetail`
|
|
1129
1129
|
* @fires dataInit - Fired when tabulator data is initialized
|
|
1130
1130
|
* @fires sizeChanged - Fired when layout size changes. detail: `GridTabulatorSizeChangedEventDetail`
|
|
1131
|
+
* @fires more-rows-changed - Fired when the server-reported `MORE_ROWS` or `ROWS_COUNT` changes, including when they are reset. detail: `GridTabulatorMoreRowsEventDetail`
|
|
1131
1132
|
*/
|
|
1132
1133
|
export declare class GridTabulatorClientSideDatasource extends GridTabulatorClientSideDatasource_base {
|
|
1133
1134
|
auth: Auth;
|
|
@@ -1164,9 +1165,24 @@ export declare class GridTabulatorClientSideDatasource extends GridTabulatorClie
|
|
|
1164
1165
|
*/
|
|
1165
1166
|
keepColDefsOnClearRowData: boolean;
|
|
1166
1167
|
/**
|
|
1167
|
-
* Allows grid data updates to be processed via and external function before applying in grid
|
|
1168
|
+
* Allows grid data updates to be processed via and external function before applying in grid.
|
|
1169
|
+
*
|
|
1170
|
+
* @remarks
|
|
1171
|
+
* The mapper is called with all rows (one argument) when the grid data is set. For stream transactions it is
|
|
1172
|
+
* called with the changed rows, the datasource's current rows keyed by row id, and the operation
|
|
1173
|
+
* (`'add'`, `'update'` or `'remove'`).
|
|
1168
1174
|
*/
|
|
1169
1175
|
rowDataMapper: Function;
|
|
1176
|
+
/**
|
|
1177
|
+
* Total rows the resource holds on the server (`ROWS_COUNT` of the first stream message), or `undefined` when
|
|
1178
|
+
* unknown. It ignores criteria, and is not adjusted for live inserts and deletes.
|
|
1179
|
+
*/
|
|
1180
|
+
serverRowsCount: number | undefined;
|
|
1181
|
+
/**
|
|
1182
|
+
* Whether the server holds more rows than were sent (`MORE_ROWS` of the first stream message), or `undefined`
|
|
1183
|
+
* when unknown. It is true when `max-rows` capped the initial load.
|
|
1184
|
+
*/
|
|
1185
|
+
moreRows: boolean | undefined;
|
|
1170
1186
|
private dataSub;
|
|
1171
1187
|
private updateSub;
|
|
1172
1188
|
private connectionSub;
|
|
@@ -1255,6 +1271,12 @@ export declare class GridTabulatorClientSideDatasource extends GridTabulatorClie
|
|
|
1255
1271
|
* @internal
|
|
1256
1272
|
*/
|
|
1257
1273
|
loadResourceData(withFullInit?: boolean): Promise<void>;
|
|
1274
|
+
/**
|
|
1275
|
+
* Keeps `ROWS_COUNT` and `MORE_ROWS` from a raw stream message. The result filter drops them, and only
|
|
1276
|
+
* the first message after the logon carries them.
|
|
1277
|
+
*/
|
|
1278
|
+
private captureServerPaging;
|
|
1279
|
+
private setServerPaging;
|
|
1258
1280
|
private handleSnapshot;
|
|
1259
1281
|
private datasourceOptions;
|
|
1260
1282
|
private handleStreamResult;
|
|
@@ -1322,12 +1344,7 @@ declare const GridTabulatorClientSideDatasource_base: (new (...args: any[]) => {
|
|
|
1322
1344
|
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1323
1345
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1324
1346
|
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1325
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options
|
|
1326
|
-
/**
|
|
1327
|
-
* Returns whether the `row-id` attribute is the default one, depending on the resource type.
|
|
1328
|
-
* @internal
|
|
1329
|
-
*/
|
|
1330
|
-
?: boolean | EventListenerOptions): void;
|
|
1347
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1331
1348
|
readonly attributes: NamedNodeMap;
|
|
1332
1349
|
get classList(): DOMTokenList;
|
|
1333
1350
|
set classList(value: string): any;
|
|
@@ -2413,6 +2430,23 @@ export declare const gridTabulatorEventNames: {
|
|
|
2413
2430
|
datasourceErrorClose: string;
|
|
2414
2431
|
};
|
|
2415
2432
|
|
|
2433
|
+
/**
|
|
2434
|
+
* Detail payload for the `more-rows-changed` event.
|
|
2435
|
+
* @alpha
|
|
2436
|
+
*/
|
|
2437
|
+
export declare interface GridTabulatorMoreRowsEventDetail {
|
|
2438
|
+
/** Whether the server holds more rows than were sent (`MORE_ROWS`). */
|
|
2439
|
+
moreRows: boolean | undefined;
|
|
2440
|
+
/** Total rows the resource holds on the server, ignoring criteria (`ROWS_COUNT`). */
|
|
2441
|
+
rowsCount: number | undefined;
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
/**
|
|
2445
|
+
* Kind of change a row data mapper is called with for a stream transaction.
|
|
2446
|
+
* @alpha
|
|
2447
|
+
*/
|
|
2448
|
+
export declare type GridTabulatorRowDataMapperOperation = 'add' | 'update' | 'remove';
|
|
2449
|
+
|
|
2416
2450
|
/**
|
|
2417
2451
|
* The grid-tabulator component registration.
|
|
2418
2452
|
* @public
|
package/dist/react.cjs
CHANGED
|
@@ -48,7 +48,7 @@ const GridTabulatorColumn = React.forwardRef(function GridTabulatorColumn(props,
|
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
const GridTabulatorClientSideDatasource = React.forwardRef(function GridTabulatorClientSideDatasource(props, ref) {
|
|
51
|
-
const { onGridTabulatorError, onDataInit, onSizeChanged, children, ...rest } = props;
|
|
51
|
+
const { onGridTabulatorError, onDataInit, onSizeChanged, onMoreRowsChanged, children, ...rest } = props;
|
|
52
52
|
const _innerRef = React.useRef(null);
|
|
53
53
|
const _onGridTabulatorErrorRef = React.useRef(onGridTabulatorError);
|
|
54
54
|
_onGridTabulatorErrorRef.current = onGridTabulatorError;
|
|
@@ -56,6 +56,8 @@ const GridTabulatorClientSideDatasource = React.forwardRef(function GridTabulato
|
|
|
56
56
|
_onDataInitRef.current = onDataInit;
|
|
57
57
|
const _onSizeChangedRef = React.useRef(onSizeChanged);
|
|
58
58
|
_onSizeChangedRef.current = onSizeChanged;
|
|
59
|
+
const _onMoreRowsChangedRef = React.useRef(onMoreRowsChanged);
|
|
60
|
+
_onMoreRowsChangedRef.current = onMoreRowsChanged;
|
|
59
61
|
React.useLayoutEffect(() => {
|
|
60
62
|
const el = _innerRef.current;
|
|
61
63
|
if (!el) return;
|
|
@@ -65,10 +67,13 @@ const GridTabulatorClientSideDatasource = React.forwardRef(function GridTabulato
|
|
|
65
67
|
el.addEventListener('dataInit', _onDataInitFn);
|
|
66
68
|
const _onSizeChangedFn = (e) => _onSizeChangedRef.current?.(e);
|
|
67
69
|
el.addEventListener('sizeChanged', _onSizeChangedFn);
|
|
70
|
+
const _onMoreRowsChangedFn = (e) => _onMoreRowsChangedRef.current?.(e);
|
|
71
|
+
el.addEventListener('more-rows-changed', _onMoreRowsChangedFn);
|
|
68
72
|
return () => {
|
|
69
73
|
el.removeEventListener('gridTabulator:error', _onGridTabulatorErrorFn);
|
|
70
74
|
el.removeEventListener('dataInit', _onDataInitFn);
|
|
71
75
|
el.removeEventListener('sizeChanged', _onSizeChangedFn);
|
|
76
|
+
el.removeEventListener('more-rows-changed', _onMoreRowsChangedFn);
|
|
72
77
|
};
|
|
73
78
|
}, []);
|
|
74
79
|
return React.createElement(customElements.getName(GridTabulatorClientSideDatasourceWC) ?? 'grid-tabulator-client-side-datasource', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
package/dist/react.mjs
CHANGED
|
@@ -46,7 +46,7 @@ export const GridTabulatorColumn = React.forwardRef(function GridTabulatorColumn
|
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
export const GridTabulatorClientSideDatasource = React.forwardRef(function GridTabulatorClientSideDatasource(props, ref) {
|
|
49
|
-
const { onGridTabulatorError, onDataInit, onSizeChanged, children, ...rest } = props;
|
|
49
|
+
const { onGridTabulatorError, onDataInit, onSizeChanged, onMoreRowsChanged, children, ...rest } = props;
|
|
50
50
|
const _innerRef = React.useRef(null);
|
|
51
51
|
const _onGridTabulatorErrorRef = React.useRef(onGridTabulatorError);
|
|
52
52
|
_onGridTabulatorErrorRef.current = onGridTabulatorError;
|
|
@@ -54,6 +54,8 @@ export const GridTabulatorClientSideDatasource = React.forwardRef(function GridT
|
|
|
54
54
|
_onDataInitRef.current = onDataInit;
|
|
55
55
|
const _onSizeChangedRef = React.useRef(onSizeChanged);
|
|
56
56
|
_onSizeChangedRef.current = onSizeChanged;
|
|
57
|
+
const _onMoreRowsChangedRef = React.useRef(onMoreRowsChanged);
|
|
58
|
+
_onMoreRowsChangedRef.current = onMoreRowsChanged;
|
|
57
59
|
React.useLayoutEffect(() => {
|
|
58
60
|
const el = _innerRef.current;
|
|
59
61
|
if (!el) return;
|
|
@@ -63,10 +65,13 @@ export const GridTabulatorClientSideDatasource = React.forwardRef(function GridT
|
|
|
63
65
|
el.addEventListener('dataInit', _onDataInitFn);
|
|
64
66
|
const _onSizeChangedFn = (e) => _onSizeChangedRef.current?.(e);
|
|
65
67
|
el.addEventListener('sizeChanged', _onSizeChangedFn);
|
|
68
|
+
const _onMoreRowsChangedFn = (e) => _onMoreRowsChangedRef.current?.(e);
|
|
69
|
+
el.addEventListener('more-rows-changed', _onMoreRowsChangedFn);
|
|
66
70
|
return () => {
|
|
67
71
|
el.removeEventListener('gridTabulator:error', _onGridTabulatorErrorFn);
|
|
68
72
|
el.removeEventListener('dataInit', _onDataInitFn);
|
|
69
73
|
el.removeEventListener('sizeChanged', _onSizeChangedFn);
|
|
74
|
+
el.removeEventListener('more-rows-changed', _onMoreRowsChangedFn);
|
|
70
75
|
};
|
|
71
76
|
}, []);
|
|
72
77
|
return React.createElement(customElements.getName(GridTabulatorClientSideDatasourceWC) ?? 'grid-tabulator-client-side-datasource', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/grid-tabulator",
|
|
3
3
|
"description": "Genesis Foundation Grid Tabulator",
|
|
4
|
-
"version": "15.92.0-HT-305.
|
|
4
|
+
"version": "15.92.0-HT-305.2",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@genesislcap/foundation-testing": "15.92.0-HT-305.
|
|
43
|
-
"@genesislcap/genx": "15.92.0-HT-305.
|
|
44
|
-
"@genesislcap/ts-builder": "15.92.0-HT-305.
|
|
45
|
-
"@genesislcap/uvu-playwright-builder": "15.92.0-HT-305.
|
|
46
|
-
"@genesislcap/vite-builder": "15.92.0-HT-305.
|
|
47
|
-
"@genesislcap/webpack-builder": "15.92.0-HT-305.
|
|
42
|
+
"@genesislcap/foundation-testing": "15.92.0-HT-305.2",
|
|
43
|
+
"@genesislcap/genx": "15.92.0-HT-305.2",
|
|
44
|
+
"@genesislcap/ts-builder": "15.92.0-HT-305.2",
|
|
45
|
+
"@genesislcap/uvu-playwright-builder": "15.92.0-HT-305.2",
|
|
46
|
+
"@genesislcap/vite-builder": "15.92.0-HT-305.2",
|
|
47
|
+
"@genesislcap/webpack-builder": "15.92.0-HT-305.2",
|
|
48
48
|
"@types/tabulator-tables": "6.2.6"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@genesislcap/foundation-comms": "15.92.0-HT-305.
|
|
52
|
-
"@genesislcap/foundation-logger": "15.92.0-HT-305.
|
|
53
|
-
"@genesislcap/foundation-ui": "15.92.0-HT-305.
|
|
54
|
-
"@genesislcap/foundation-utils": "15.92.0-HT-305.
|
|
51
|
+
"@genesislcap/foundation-comms": "15.92.0-HT-305.2",
|
|
52
|
+
"@genesislcap/foundation-logger": "15.92.0-HT-305.2",
|
|
53
|
+
"@genesislcap/foundation-ui": "15.92.0-HT-305.2",
|
|
54
|
+
"@genesislcap/foundation-utils": "15.92.0-HT-305.2",
|
|
55
55
|
"@microsoft/fast-colors": "5.3.1",
|
|
56
56
|
"@microsoft/fast-components": "2.30.6",
|
|
57
57
|
"@microsoft/fast-element": "1.14.0",
|