@genesislcap/grid-tabulator 15.92.0-HT-305.1 → 15.92.0-HT-305.3
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 +165 -1
- package/dist/dts/datasource/client-side.datasource.d.ts +68 -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 +118 -6
- package/dist/grid-tabulator.api.json +220 -2
- package/dist/grid-tabulator.d.ts +70 -7
- package/dist/react.cjs +6 -1
- package/dist/react.mjs +6 -1
- package/package.json +11 -11
|
@@ -3822,7 +3822,63 @@
|
|
|
3822
3822
|
"type": {
|
|
3823
3823
|
"text": "Function"
|
|
3824
3824
|
},
|
|
3825
|
-
"description": "Allows grid data updates to be processed via and external function before applying in grid"
|
|
3825
|
+
"description": "Allows grid data updates to be processed via and external function before applying in grid."
|
|
3826
|
+
},
|
|
3827
|
+
{
|
|
3828
|
+
"kind": "field",
|
|
3829
|
+
"name": "serverRowsCount",
|
|
3830
|
+
"type": {
|
|
3831
|
+
"text": "number | undefined"
|
|
3832
|
+
},
|
|
3833
|
+
"description": "Total rows the resource holds on the server (`ROWS_COUNT` of the first stream message), or `undefined` when\nunknown. It ignores criteria, and is not adjusted for live inserts and deletes."
|
|
3834
|
+
},
|
|
3835
|
+
{
|
|
3836
|
+
"kind": "field",
|
|
3837
|
+
"name": "moreRows",
|
|
3838
|
+
"type": {
|
|
3839
|
+
"text": "boolean | undefined"
|
|
3840
|
+
},
|
|
3841
|
+
"description": "Whether the server holds more rows than were sent (`MORE_ROWS` of the first stream message), or `undefined`\nwhen unknown. It is true when `max-rows` capped the initial load."
|
|
3842
|
+
},
|
|
3843
|
+
{
|
|
3844
|
+
"kind": "field",
|
|
3845
|
+
"name": "pendingPages",
|
|
3846
|
+
"type": {
|
|
3847
|
+
"text": "number"
|
|
3848
|
+
},
|
|
3849
|
+
"privacy": "private",
|
|
3850
|
+
"default": "0",
|
|
3851
|
+
"description": "MORE_ROWS requests sent by `loadMore()` that have not been answered yet."
|
|
3852
|
+
},
|
|
3853
|
+
{
|
|
3854
|
+
"kind": "field",
|
|
3855
|
+
"name": "remainingPages",
|
|
3856
|
+
"type": {
|
|
3857
|
+
"text": "number"
|
|
3858
|
+
},
|
|
3859
|
+
"privacy": "private",
|
|
3860
|
+
"default": "0",
|
|
3861
|
+
"description": "Further pages a `loadMore()` call still has to request, one after each reply."
|
|
3862
|
+
},
|
|
3863
|
+
{
|
|
3864
|
+
"kind": "field",
|
|
3865
|
+
"name": "applyingPage",
|
|
3866
|
+
"type": {
|
|
3867
|
+
"text": "boolean"
|
|
3868
|
+
},
|
|
3869
|
+
"privacy": "private",
|
|
3870
|
+
"default": "false",
|
|
3871
|
+
"description": "Set while the rows of a `loadMore()` reply are being applied."
|
|
3872
|
+
},
|
|
3873
|
+
{
|
|
3874
|
+
"kind": "field",
|
|
3875
|
+
"name": "pagingStalled",
|
|
3876
|
+
"type": {
|
|
3877
|
+
"text": "boolean"
|
|
3878
|
+
},
|
|
3879
|
+
"privacy": "private",
|
|
3880
|
+
"default": "false",
|
|
3881
|
+
"description": "Set when a `loadMore()` reply had no rows while the server still reported more. Some GSF versions answer\nevery later request the same way, so paging stops."
|
|
3826
3882
|
},
|
|
3827
3883
|
{
|
|
3828
3884
|
"kind": "field",
|
|
@@ -3991,6 +4047,110 @@
|
|
|
3991
4047
|
],
|
|
3992
4048
|
"description": "Generate column definitions from the field metadata"
|
|
3993
4049
|
},
|
|
4050
|
+
{
|
|
4051
|
+
"kind": "method",
|
|
4052
|
+
"name": "loadMore",
|
|
4053
|
+
"return": {
|
|
4054
|
+
"type": {
|
|
4055
|
+
"text": ""
|
|
4056
|
+
}
|
|
4057
|
+
},
|
|
4058
|
+
"parameters": [
|
|
4059
|
+
{
|
|
4060
|
+
"name": "pages",
|
|
4061
|
+
"default": "1"
|
|
4062
|
+
}
|
|
4063
|
+
],
|
|
4064
|
+
"description": "Requests the next `pages` pages of rows from a data server subscription (`MORE_ROWS`), one after another.\nEach page holds up to `max-rows` rows; the server fixes that size when the subscription opens. The rows\narrive on the stream and reach the row mapper as a `'page'` operation, and `more-rows-changed` is emitted\nafter each reply. Requesting stops early when the server reports no more rows."
|
|
4065
|
+
},
|
|
4066
|
+
{
|
|
4067
|
+
"kind": "field",
|
|
4068
|
+
"name": "isLoadingMore",
|
|
4069
|
+
"type": {
|
|
4070
|
+
"text": "boolean"
|
|
4071
|
+
},
|
|
4072
|
+
"description": "Whether a `loadMore()` call is still waiting for pages.",
|
|
4073
|
+
"readonly": true
|
|
4074
|
+
},
|
|
4075
|
+
{
|
|
4076
|
+
"kind": "method",
|
|
4077
|
+
"name": "requestPage",
|
|
4078
|
+
"privacy": "private",
|
|
4079
|
+
"return": {
|
|
4080
|
+
"type": {
|
|
4081
|
+
"text": "Promise<boolean>"
|
|
4082
|
+
}
|
|
4083
|
+
}
|
|
4084
|
+
},
|
|
4085
|
+
{
|
|
4086
|
+
"kind": "method",
|
|
4087
|
+
"name": "isPageReply",
|
|
4088
|
+
"privacy": "private",
|
|
4089
|
+
"return": {
|
|
4090
|
+
"type": {
|
|
4091
|
+
"text": "boolean"
|
|
4092
|
+
}
|
|
4093
|
+
},
|
|
4094
|
+
"parameters": [
|
|
4095
|
+
{
|
|
4096
|
+
"name": "result",
|
|
4097
|
+
"type": {
|
|
4098
|
+
"text": "any"
|
|
4099
|
+
}
|
|
4100
|
+
}
|
|
4101
|
+
],
|
|
4102
|
+
"description": "Whether a raw stream message answers a `loadMore()` request. Live updates never carry `MORE_ROWS`."
|
|
4103
|
+
},
|
|
4104
|
+
{
|
|
4105
|
+
"kind": "method",
|
|
4106
|
+
"name": "captureServerPaging",
|
|
4107
|
+
"privacy": "private",
|
|
4108
|
+
"parameters": [
|
|
4109
|
+
{
|
|
4110
|
+
"name": "result",
|
|
4111
|
+
"type": {
|
|
4112
|
+
"text": "any"
|
|
4113
|
+
}
|
|
4114
|
+
},
|
|
4115
|
+
{
|
|
4116
|
+
"name": "isPageReply",
|
|
4117
|
+
"default": "false"
|
|
4118
|
+
}
|
|
4119
|
+
],
|
|
4120
|
+
"description": "Keeps `ROWS_COUNT` and `MORE_ROWS` from a raw stream message. The result filter drops them; the first\nmessage after the logon and every reply to `loadMore()` carry them."
|
|
4121
|
+
},
|
|
4122
|
+
{
|
|
4123
|
+
"kind": "field",
|
|
4124
|
+
"name": "canLoadMore",
|
|
4125
|
+
"type": {
|
|
4126
|
+
"text": "boolean"
|
|
4127
|
+
},
|
|
4128
|
+
"description": "Whether `loadMore()` can fetch another page now.",
|
|
4129
|
+
"readonly": true
|
|
4130
|
+
},
|
|
4131
|
+
{
|
|
4132
|
+
"kind": "method",
|
|
4133
|
+
"name": "setServerPaging",
|
|
4134
|
+
"privacy": "private",
|
|
4135
|
+
"parameters": [
|
|
4136
|
+
{
|
|
4137
|
+
"name": "rowsCount",
|
|
4138
|
+
"type": {
|
|
4139
|
+
"text": "number | undefined"
|
|
4140
|
+
}
|
|
4141
|
+
},
|
|
4142
|
+
{
|
|
4143
|
+
"name": "moreRows",
|
|
4144
|
+
"type": {
|
|
4145
|
+
"text": "boolean | undefined"
|
|
4146
|
+
}
|
|
4147
|
+
},
|
|
4148
|
+
{
|
|
4149
|
+
"name": "force",
|
|
4150
|
+
"default": "false"
|
|
4151
|
+
}
|
|
4152
|
+
]
|
|
4153
|
+
},
|
|
3994
4154
|
{
|
|
3995
4155
|
"kind": "method",
|
|
3996
4156
|
"name": "handleSnapshot",
|
|
@@ -4382,6 +4542,10 @@
|
|
|
4382
4542
|
{
|
|
4383
4543
|
"description": "Fired when layout size changes. detail: `GridTabulatorSizeChangedEventDetail`",
|
|
4384
4544
|
"name": "sizeChanged"
|
|
4545
|
+
},
|
|
4546
|
+
{
|
|
4547
|
+
"description": "Fired when the server-reported `MORE_ROWS` or `ROWS_COUNT` changes, including when they are reset, and after every reply to `loadMore()`. detail: `GridTabulatorMoreRowsEventDetail`",
|
|
4548
|
+
"name": "more-rows-changed"
|
|
4385
4549
|
}
|
|
4386
4550
|
],
|
|
4387
4551
|
"attributes": [
|
|
@@ -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' | 'page';
|
|
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, and after every reply to `loadMore()`. detail: `GridTabulatorMoreRowsEventDetail`
|
|
781
792
|
*/
|
|
782
793
|
export declare class GridTabulatorClientSideDatasource extends GridTabulatorClientSideDatasource_base {
|
|
783
794
|
auth: Auth;
|
|
@@ -814,9 +825,36 @@ 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'`). Rows that arrive in reply to `loadMore()` are passed as `'page'`
|
|
834
|
+
* instead of `'add'`, as they are existing rows rather than new ones.
|
|
818
835
|
*/
|
|
819
836
|
rowDataMapper: Function;
|
|
837
|
+
/**
|
|
838
|
+
* Total rows the resource holds on the server (`ROWS_COUNT` of the first stream message), or `undefined` when
|
|
839
|
+
* unknown. It ignores criteria, and is not adjusted for live inserts and deletes.
|
|
840
|
+
*/
|
|
841
|
+
serverRowsCount: number | undefined;
|
|
842
|
+
/**
|
|
843
|
+
* Whether the server holds more rows than were sent (`MORE_ROWS` of the first stream message), or `undefined`
|
|
844
|
+
* when unknown. It is true when `max-rows` capped the initial load.
|
|
845
|
+
*/
|
|
846
|
+
moreRows: boolean | undefined;
|
|
847
|
+
/** MORE_ROWS requests sent by `loadMore()` that have not been answered yet. */
|
|
848
|
+
private pendingPages;
|
|
849
|
+
/** Further pages a `loadMore()` call still has to request, one after each reply. */
|
|
850
|
+
private remainingPages;
|
|
851
|
+
/** Set while the rows of a `loadMore()` reply are being applied. */
|
|
852
|
+
private applyingPage;
|
|
853
|
+
/**
|
|
854
|
+
* Set when a `loadMore()` reply had no rows while the server still reported more. Some GSF versions answer
|
|
855
|
+
* every later request the same way, so paging stops.
|
|
856
|
+
*/
|
|
857
|
+
private pagingStalled;
|
|
820
858
|
private dataSub;
|
|
821
859
|
private updateSub;
|
|
822
860
|
private connectionSub;
|
|
@@ -905,6 +943,29 @@ export declare class GridTabulatorClientSideDatasource extends GridTabulatorClie
|
|
|
905
943
|
* @internal
|
|
906
944
|
*/
|
|
907
945
|
loadResourceData(withFullInit?: boolean): Promise<void>;
|
|
946
|
+
/**
|
|
947
|
+
* Requests the next `pages` pages of rows from a data server subscription (`MORE_ROWS`), one after another.
|
|
948
|
+
* Each page holds up to `max-rows` rows; the server fixes that size when the subscription opens. The rows
|
|
949
|
+
* arrive on the stream and reach the row mapper as a `'page'` operation, and `more-rows-changed` is emitted
|
|
950
|
+
* after each reply. Requesting stops early when the server reports no more rows.
|
|
951
|
+
*
|
|
952
|
+
* @returns Whether a request was sent. Nothing is sent for a request server, while a load is in progress,
|
|
953
|
+
* when the server reported no more rows, or after paging stalled.
|
|
954
|
+
*/
|
|
955
|
+
loadMore(pages?: number): Promise<boolean>;
|
|
956
|
+
/** Whether a `loadMore()` call is still waiting for pages. */
|
|
957
|
+
get isLoadingMore(): boolean;
|
|
958
|
+
private requestPage;
|
|
959
|
+
/** Whether a raw stream message answers a `loadMore()` request. Live updates never carry `MORE_ROWS`. */
|
|
960
|
+
private isPageReply;
|
|
961
|
+
/**
|
|
962
|
+
* Keeps `ROWS_COUNT` and `MORE_ROWS` from a raw stream message. The result filter drops them; the first
|
|
963
|
+
* message after the logon and every reply to `loadMore()` carry them.
|
|
964
|
+
*/
|
|
965
|
+
private captureServerPaging;
|
|
966
|
+
/** Whether `loadMore()` can fetch another page now. */
|
|
967
|
+
get canLoadMore(): boolean;
|
|
968
|
+
private setServerPaging;
|
|
908
969
|
private handleSnapshot;
|
|
909
970
|
private datasourceOptions;
|
|
910
971
|
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":"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"}
|
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, and after every reply to `loadMore()`. detail: `GridTabulatorMoreRowsEventDetail`
|
|
30
31
|
*/
|
|
31
32
|
let GridTabulatorClientSideDatasource = class GridTabulatorClientSideDatasource extends LifecycleMixin(DatasourceEventHandler(FoundationElement)) {
|
|
32
33
|
constructor() {
|
|
@@ -46,6 +47,17 @@ let GridTabulatorClientSideDatasource = class GridTabulatorClientSideDatasource
|
|
|
46
47
|
* Whether to keep column definitions when clearing row data
|
|
47
48
|
*/
|
|
48
49
|
this.keepColDefsOnClearRowData = false;
|
|
50
|
+
/** MORE_ROWS requests sent by `loadMore()` that have not been answered yet. */
|
|
51
|
+
this.pendingPages = 0;
|
|
52
|
+
/** Further pages a `loadMore()` call still has to request, one after each reply. */
|
|
53
|
+
this.remainingPages = 0;
|
|
54
|
+
/** Set while the rows of a `loadMore()` reply are being applied. */
|
|
55
|
+
this.applyingPage = false;
|
|
56
|
+
/**
|
|
57
|
+
* Set when a `loadMore()` reply had no rows while the server still reported more. Some GSF versions answer
|
|
58
|
+
* every later request the same way, so paging stops.
|
|
59
|
+
*/
|
|
60
|
+
this.pagingStalled = false;
|
|
49
61
|
this.isRequestServer = false;
|
|
50
62
|
this.requiresFullRowDataAndColDefs = true;
|
|
51
63
|
this.dataSubWasLoggedOff = false;
|
|
@@ -220,6 +232,10 @@ let GridTabulatorClientSideDatasource = class GridTabulatorClientSideDatasource
|
|
|
220
232
|
clearRowData(withColumnDefs = true) {
|
|
221
233
|
var _a, _b, _c, _d;
|
|
222
234
|
this.rows = new Map();
|
|
235
|
+
this.pendingPages = 0;
|
|
236
|
+
this.remainingPages = 0;
|
|
237
|
+
this.pagingStalled = false;
|
|
238
|
+
this.setServerPaging(undefined, undefined);
|
|
223
239
|
if (withColumnDefs && !this.keepColDefsOnClearRowData) {
|
|
224
240
|
(_b = (_a = this.gridTabulator) === null || _a === void 0 ? void 0 : _a.grid) === null || _b === void 0 ? void 0 : _b.setColumns([]);
|
|
225
241
|
}
|
|
@@ -325,6 +341,8 @@ let GridTabulatorClientSideDatasource = class GridTabulatorClientSideDatasource
|
|
|
325
341
|
this.dataSub = undefined;
|
|
326
342
|
}
|
|
327
343
|
this.clearRowData(withoutColumnDefs);
|
|
344
|
+
// The new subscription's first message is a full load, not live inserts into the old rows.
|
|
345
|
+
this.requiresFullRowDataAndColDefs = true;
|
|
328
346
|
yield this.loadResourceData(withoutFullInit);
|
|
329
347
|
});
|
|
330
348
|
}
|
|
@@ -368,12 +386,20 @@ let GridTabulatorClientSideDatasource = class GridTabulatorClientSideDatasource
|
|
|
368
386
|
return;
|
|
369
387
|
}
|
|
370
388
|
this.dataSubWasLoggedOff = false;
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
389
|
+
const isPageReply = this.isPageReply(result);
|
|
390
|
+
this.captureServerPaging(result, isPageReply);
|
|
391
|
+
this.applyingPage = isPageReply;
|
|
392
|
+
try {
|
|
393
|
+
if (result.ROW) {
|
|
394
|
+
const nextMessage = dataServerResultFilter(result);
|
|
395
|
+
this.handleStreamResult(nextMessage);
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
this.handleStreamResult(result);
|
|
399
|
+
}
|
|
374
400
|
}
|
|
375
|
-
|
|
376
|
-
this.
|
|
401
|
+
finally {
|
|
402
|
+
this.applyingPage = false;
|
|
377
403
|
}
|
|
378
404
|
}, (error) => {
|
|
379
405
|
logger.error('Stream error:', error);
|
|
@@ -390,6 +416,86 @@ let GridTabulatorClientSideDatasource = class GridTabulatorClientSideDatasource
|
|
|
390
416
|
}
|
|
391
417
|
});
|
|
392
418
|
}
|
|
419
|
+
/**
|
|
420
|
+
* Requests the next `pages` pages of rows from a data server subscription (`MORE_ROWS`), one after another.
|
|
421
|
+
* Each page holds up to `max-rows` rows; the server fixes that size when the subscription opens. The rows
|
|
422
|
+
* arrive on the stream and reach the row mapper as a `'page'` operation, and `more-rows-changed` is emitted
|
|
423
|
+
* after each reply. Requesting stops early when the server reports no more rows.
|
|
424
|
+
*
|
|
425
|
+
* @returns Whether a request was sent. Nothing is sent for a request server, while a load is in progress,
|
|
426
|
+
* when the server reported no more rows, or after paging stalled.
|
|
427
|
+
*/
|
|
428
|
+
loadMore() {
|
|
429
|
+
return __awaiter(this, arguments, void 0, function* (pages = 1) {
|
|
430
|
+
if (!this.canLoadMore || !this.sourceRef || pages < 1)
|
|
431
|
+
return false;
|
|
432
|
+
this.remainingPages = pages - 1;
|
|
433
|
+
return this.requestPage();
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
/** Whether a `loadMore()` call is still waiting for pages. */
|
|
437
|
+
get isLoadingMore() {
|
|
438
|
+
return this.pendingPages > 0 || this.remainingPages > 0;
|
|
439
|
+
}
|
|
440
|
+
requestPage() {
|
|
441
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
442
|
+
this.pendingPages += 1;
|
|
443
|
+
try {
|
|
444
|
+
yield this.connect.getMoreRows(this.sourceRef);
|
|
445
|
+
return true;
|
|
446
|
+
}
|
|
447
|
+
catch (error) {
|
|
448
|
+
this.pendingPages = Math.max(0, this.pendingPages - 1);
|
|
449
|
+
this.remainingPages = 0;
|
|
450
|
+
logger.error(`Failed to load more rows for ${this.resourceName}`, error);
|
|
451
|
+
this.setServerPaging(this.serverRowsCount, this.moreRows, true);
|
|
452
|
+
return false;
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
/** Whether a raw stream message answers a `loadMore()` request. Live updates never carry `MORE_ROWS`. */
|
|
457
|
+
isPageReply(result) {
|
|
458
|
+
return (this.pendingPages > 0 &&
|
|
459
|
+
!this.requiresFullRowDataAndColDefs &&
|
|
460
|
+
!!result &&
|
|
461
|
+
'MORE_ROWS' in result);
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Keeps `ROWS_COUNT` and `MORE_ROWS` from a raw stream message. The result filter drops them; the first
|
|
465
|
+
* message after the logon and every reply to `loadMore()` carry them.
|
|
466
|
+
*/
|
|
467
|
+
captureServerPaging(result, isPageReply = false) {
|
|
468
|
+
var _a;
|
|
469
|
+
if (isPageReply) {
|
|
470
|
+
this.pendingPages = Math.max(0, this.pendingPages - 1);
|
|
471
|
+
if (!((_a = result.ROW) === null || _a === void 0 ? void 0 : _a.length) && result.MORE_ROWS === true) {
|
|
472
|
+
this.pagingStalled = true;
|
|
473
|
+
logger.warn(`${this.resourceName}: a MORE_ROWS reply had no rows although more were reported, so paging stops`);
|
|
474
|
+
}
|
|
475
|
+
if (this.remainingPages > 0 && result.MORE_ROWS === true && !this.pagingStalled) {
|
|
476
|
+
this.remainingPages -= 1;
|
|
477
|
+
this.requestPage();
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
this.remainingPages = 0;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
if (!result || (!('ROWS_COUNT' in result) && !('MORE_ROWS' in result)))
|
|
484
|
+
return;
|
|
485
|
+
this.setServerPaging(typeof result.ROWS_COUNT === 'number' ? result.ROWS_COUNT : this.serverRowsCount, typeof result.MORE_ROWS === 'boolean' ? result.MORE_ROWS : this.moreRows, isPageReply);
|
|
486
|
+
}
|
|
487
|
+
/** Whether `loadMore()` can fetch another page now. */
|
|
488
|
+
get canLoadMore() {
|
|
489
|
+
return (!this.isRequestServer && this.moreRows === true && !this.pagingStalled && !this.isLoadingMore);
|
|
490
|
+
}
|
|
491
|
+
setServerPaging(rowsCount, moreRows, force = false) {
|
|
492
|
+
if (!force && rowsCount === this.serverRowsCount && moreRows === this.moreRows)
|
|
493
|
+
return;
|
|
494
|
+
this.serverRowsCount = rowsCount;
|
|
495
|
+
this.moreRows = moreRows;
|
|
496
|
+
const detail = { moreRows, rowsCount };
|
|
497
|
+
this.$emit('more-rows-changed', detail);
|
|
498
|
+
}
|
|
393
499
|
handleSnapshot(result) {
|
|
394
500
|
if (Array.isArray(result))
|
|
395
501
|
return result;
|
|
@@ -525,7 +631,7 @@ let GridTabulatorClientSideDatasource = class GridTabulatorClientSideDatasource
|
|
|
525
631
|
if (!this.rowDataMapper) {
|
|
526
632
|
return transaction;
|
|
527
633
|
}
|
|
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) });
|
|
634
|
+
return Object.assign(Object.assign({}, transaction), { add: this.rowDataMapper(transaction.add, this.rows, this.applyingPage ? 'page' : 'add'), update: this.rowDataMapper(transaction.update, this.rows, 'update'), remove: this.rowDataMapper(transaction.remove, this.rows, 'remove') });
|
|
529
635
|
}
|
|
530
636
|
handleStreamInserts(insertedRows) {
|
|
531
637
|
insertedRows === null || insertedRows === void 0 ? void 0 : insertedRows.forEach((insertData) => {
|
|
@@ -659,6 +765,12 @@ __decorate([
|
|
|
659
765
|
__decorate([
|
|
660
766
|
observable
|
|
661
767
|
], GridTabulatorClientSideDatasource.prototype, "rowDataMapper", void 0);
|
|
768
|
+
__decorate([
|
|
769
|
+
observable
|
|
770
|
+
], GridTabulatorClientSideDatasource.prototype, "serverRowsCount", void 0);
|
|
771
|
+
__decorate([
|
|
772
|
+
observable
|
|
773
|
+
], GridTabulatorClientSideDatasource.prototype, "moreRows", void 0);
|
|
662
774
|
GridTabulatorClientSideDatasource = __decorate([
|
|
663
775
|
customElement({
|
|
664
776
|
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, and after every reply to `loadMore()`. detail: `GridTabulatorMoreRowsEventDetail`\n *\n * @alpha\n */\n",
|
|
4770
4770
|
"excerptTokens": [
|
|
4771
4771
|
{
|
|
4772
4772
|
"kind": "Content",
|
|
@@ -4819,6 +4819,36 @@
|
|
|
4819
4819
|
"isProtected": false,
|
|
4820
4820
|
"isAbstract": false
|
|
4821
4821
|
},
|
|
4822
|
+
{
|
|
4823
|
+
"kind": "Property",
|
|
4824
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorClientSideDatasource#canLoadMore:member",
|
|
4825
|
+
"docComment": "/**\n * Whether `loadMore()` can fetch another page now.\n */\n",
|
|
4826
|
+
"excerptTokens": [
|
|
4827
|
+
{
|
|
4828
|
+
"kind": "Content",
|
|
4829
|
+
"text": "get canLoadMore(): "
|
|
4830
|
+
},
|
|
4831
|
+
{
|
|
4832
|
+
"kind": "Content",
|
|
4833
|
+
"text": "boolean"
|
|
4834
|
+
},
|
|
4835
|
+
{
|
|
4836
|
+
"kind": "Content",
|
|
4837
|
+
"text": ";"
|
|
4838
|
+
}
|
|
4839
|
+
],
|
|
4840
|
+
"isReadonly": true,
|
|
4841
|
+
"isOptional": false,
|
|
4842
|
+
"releaseTag": "Alpha",
|
|
4843
|
+
"name": "canLoadMore",
|
|
4844
|
+
"propertyTypeTokenRange": {
|
|
4845
|
+
"startIndex": 1,
|
|
4846
|
+
"endIndex": 2
|
|
4847
|
+
},
|
|
4848
|
+
"isStatic": false,
|
|
4849
|
+
"isProtected": false,
|
|
4850
|
+
"isAbstract": false
|
|
4851
|
+
},
|
|
4822
4852
|
{
|
|
4823
4853
|
"kind": "Property",
|
|
4824
4854
|
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorClientSideDatasource#connect:member",
|
|
@@ -5069,6 +5099,36 @@
|
|
|
5069
5099
|
"isAbstract": false,
|
|
5070
5100
|
"name": "init"
|
|
5071
5101
|
},
|
|
5102
|
+
{
|
|
5103
|
+
"kind": "Property",
|
|
5104
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorClientSideDatasource#isLoadingMore:member",
|
|
5105
|
+
"docComment": "/**\n * Whether a `loadMore()` call is still waiting for pages.\n */\n",
|
|
5106
|
+
"excerptTokens": [
|
|
5107
|
+
{
|
|
5108
|
+
"kind": "Content",
|
|
5109
|
+
"text": "get isLoadingMore(): "
|
|
5110
|
+
},
|
|
5111
|
+
{
|
|
5112
|
+
"kind": "Content",
|
|
5113
|
+
"text": "boolean"
|
|
5114
|
+
},
|
|
5115
|
+
{
|
|
5116
|
+
"kind": "Content",
|
|
5117
|
+
"text": ";"
|
|
5118
|
+
}
|
|
5119
|
+
],
|
|
5120
|
+
"isReadonly": true,
|
|
5121
|
+
"isOptional": false,
|
|
5122
|
+
"releaseTag": "Alpha",
|
|
5123
|
+
"name": "isLoadingMore",
|
|
5124
|
+
"propertyTypeTokenRange": {
|
|
5125
|
+
"startIndex": 1,
|
|
5126
|
+
"endIndex": 2
|
|
5127
|
+
},
|
|
5128
|
+
"isStatic": false,
|
|
5129
|
+
"isProtected": false,
|
|
5130
|
+
"isAbstract": false
|
|
5131
|
+
},
|
|
5072
5132
|
{
|
|
5073
5133
|
"kind": "Property",
|
|
5074
5134
|
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorClientSideDatasource#isSnapshot:member",
|
|
@@ -5189,6 +5249,36 @@
|
|
|
5189
5249
|
"isProtected": false,
|
|
5190
5250
|
"isAbstract": false
|
|
5191
5251
|
},
|
|
5252
|
+
{
|
|
5253
|
+
"kind": "Property",
|
|
5254
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorClientSideDatasource#moreRows:member",
|
|
5255
|
+
"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",
|
|
5256
|
+
"excerptTokens": [
|
|
5257
|
+
{
|
|
5258
|
+
"kind": "Content",
|
|
5259
|
+
"text": "moreRows: "
|
|
5260
|
+
},
|
|
5261
|
+
{
|
|
5262
|
+
"kind": "Content",
|
|
5263
|
+
"text": "boolean | undefined"
|
|
5264
|
+
},
|
|
5265
|
+
{
|
|
5266
|
+
"kind": "Content",
|
|
5267
|
+
"text": ";"
|
|
5268
|
+
}
|
|
5269
|
+
],
|
|
5270
|
+
"isReadonly": false,
|
|
5271
|
+
"isOptional": false,
|
|
5272
|
+
"releaseTag": "Alpha",
|
|
5273
|
+
"name": "moreRows",
|
|
5274
|
+
"propertyTypeTokenRange": {
|
|
5275
|
+
"startIndex": 1,
|
|
5276
|
+
"endIndex": 2
|
|
5277
|
+
},
|
|
5278
|
+
"isStatic": false,
|
|
5279
|
+
"isProtected": false,
|
|
5280
|
+
"isAbstract": false
|
|
5281
|
+
},
|
|
5192
5282
|
{
|
|
5193
5283
|
"kind": "Property",
|
|
5194
5284
|
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorClientSideDatasource#movingView:member",
|
|
@@ -5433,7 +5523,7 @@
|
|
|
5433
5523
|
{
|
|
5434
5524
|
"kind": "Property",
|
|
5435
5525
|
"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",
|
|
5526
|
+
"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'`). Rows that arrive in reply to `loadMore()` are passed as `'page'` instead of `'add'`, as they are existing rows rather than new ones.\n */\n",
|
|
5437
5527
|
"excerptTokens": [
|
|
5438
5528
|
{
|
|
5439
5529
|
"kind": "Content",
|
|
@@ -5490,6 +5580,36 @@
|
|
|
5490
5580
|
"isStatic": false,
|
|
5491
5581
|
"isProtected": false,
|
|
5492
5582
|
"isAbstract": false
|
|
5583
|
+
},
|
|
5584
|
+
{
|
|
5585
|
+
"kind": "Property",
|
|
5586
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorClientSideDatasource#serverRowsCount:member",
|
|
5587
|
+
"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",
|
|
5588
|
+
"excerptTokens": [
|
|
5589
|
+
{
|
|
5590
|
+
"kind": "Content",
|
|
5591
|
+
"text": "serverRowsCount: "
|
|
5592
|
+
},
|
|
5593
|
+
{
|
|
5594
|
+
"kind": "Content",
|
|
5595
|
+
"text": "number | undefined"
|
|
5596
|
+
},
|
|
5597
|
+
{
|
|
5598
|
+
"kind": "Content",
|
|
5599
|
+
"text": ";"
|
|
5600
|
+
}
|
|
5601
|
+
],
|
|
5602
|
+
"isReadonly": false,
|
|
5603
|
+
"isOptional": false,
|
|
5604
|
+
"releaseTag": "Alpha",
|
|
5605
|
+
"name": "serverRowsCount",
|
|
5606
|
+
"propertyTypeTokenRange": {
|
|
5607
|
+
"startIndex": 1,
|
|
5608
|
+
"endIndex": 2
|
|
5609
|
+
},
|
|
5610
|
+
"isStatic": false,
|
|
5611
|
+
"isProtected": false,
|
|
5612
|
+
"isAbstract": false
|
|
5493
5613
|
}
|
|
5494
5614
|
],
|
|
5495
5615
|
"extendsTokenRange": {
|
|
@@ -5763,6 +5883,104 @@
|
|
|
5763
5883
|
"endIndex": 2
|
|
5764
5884
|
}
|
|
5765
5885
|
},
|
|
5886
|
+
{
|
|
5887
|
+
"kind": "Interface",
|
|
5888
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorMoreRowsEventDetail:interface",
|
|
5889
|
+
"docComment": "/**\n * Detail payload for the `more-rows-changed` event.\n *\n * @alpha\n */\n",
|
|
5890
|
+
"excerptTokens": [
|
|
5891
|
+
{
|
|
5892
|
+
"kind": "Content",
|
|
5893
|
+
"text": "export interface GridTabulatorMoreRowsEventDetail "
|
|
5894
|
+
}
|
|
5895
|
+
],
|
|
5896
|
+
"fileUrlPath": "src/datasource/client-side.datasource.ts",
|
|
5897
|
+
"releaseTag": "Alpha",
|
|
5898
|
+
"name": "GridTabulatorMoreRowsEventDetail",
|
|
5899
|
+
"preserveMemberOrder": false,
|
|
5900
|
+
"members": [
|
|
5901
|
+
{
|
|
5902
|
+
"kind": "PropertySignature",
|
|
5903
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorMoreRowsEventDetail#moreRows:member",
|
|
5904
|
+
"docComment": "/**\n * Whether the server holds more rows than were sent (`MORE_ROWS`).\n */\n",
|
|
5905
|
+
"excerptTokens": [
|
|
5906
|
+
{
|
|
5907
|
+
"kind": "Content",
|
|
5908
|
+
"text": "moreRows: "
|
|
5909
|
+
},
|
|
5910
|
+
{
|
|
5911
|
+
"kind": "Content",
|
|
5912
|
+
"text": "boolean | undefined"
|
|
5913
|
+
},
|
|
5914
|
+
{
|
|
5915
|
+
"kind": "Content",
|
|
5916
|
+
"text": ";"
|
|
5917
|
+
}
|
|
5918
|
+
],
|
|
5919
|
+
"isReadonly": false,
|
|
5920
|
+
"isOptional": false,
|
|
5921
|
+
"releaseTag": "Alpha",
|
|
5922
|
+
"name": "moreRows",
|
|
5923
|
+
"propertyTypeTokenRange": {
|
|
5924
|
+
"startIndex": 1,
|
|
5925
|
+
"endIndex": 2
|
|
5926
|
+
}
|
|
5927
|
+
},
|
|
5928
|
+
{
|
|
5929
|
+
"kind": "PropertySignature",
|
|
5930
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorMoreRowsEventDetail#rowsCount:member",
|
|
5931
|
+
"docComment": "/**\n * Total rows the resource holds on the server, ignoring criteria (`ROWS_COUNT`).\n */\n",
|
|
5932
|
+
"excerptTokens": [
|
|
5933
|
+
{
|
|
5934
|
+
"kind": "Content",
|
|
5935
|
+
"text": "rowsCount: "
|
|
5936
|
+
},
|
|
5937
|
+
{
|
|
5938
|
+
"kind": "Content",
|
|
5939
|
+
"text": "number | undefined"
|
|
5940
|
+
},
|
|
5941
|
+
{
|
|
5942
|
+
"kind": "Content",
|
|
5943
|
+
"text": ";"
|
|
5944
|
+
}
|
|
5945
|
+
],
|
|
5946
|
+
"isReadonly": false,
|
|
5947
|
+
"isOptional": false,
|
|
5948
|
+
"releaseTag": "Alpha",
|
|
5949
|
+
"name": "rowsCount",
|
|
5950
|
+
"propertyTypeTokenRange": {
|
|
5951
|
+
"startIndex": 1,
|
|
5952
|
+
"endIndex": 2
|
|
5953
|
+
}
|
|
5954
|
+
}
|
|
5955
|
+
],
|
|
5956
|
+
"extendsTokenRanges": []
|
|
5957
|
+
},
|
|
5958
|
+
{
|
|
5959
|
+
"kind": "TypeAlias",
|
|
5960
|
+
"canonicalReference": "@genesislcap/grid-tabulator!GridTabulatorRowDataMapperOperation:type",
|
|
5961
|
+
"docComment": "/**\n * Kind of change a row data mapper is called with for a stream transaction.\n *\n * @alpha\n */\n",
|
|
5962
|
+
"excerptTokens": [
|
|
5963
|
+
{
|
|
5964
|
+
"kind": "Content",
|
|
5965
|
+
"text": "export type GridTabulatorRowDataMapperOperation = "
|
|
5966
|
+
},
|
|
5967
|
+
{
|
|
5968
|
+
"kind": "Content",
|
|
5969
|
+
"text": "'add' | 'update' | 'remove' | 'page'"
|
|
5970
|
+
},
|
|
5971
|
+
{
|
|
5972
|
+
"kind": "Content",
|
|
5973
|
+
"text": ";"
|
|
5974
|
+
}
|
|
5975
|
+
],
|
|
5976
|
+
"fileUrlPath": "src/datasource/client-side.datasource.ts",
|
|
5977
|
+
"releaseTag": "Alpha",
|
|
5978
|
+
"name": "GridTabulatorRowDataMapperOperation",
|
|
5979
|
+
"typeTokenRange": {
|
|
5980
|
+
"startIndex": 1,
|
|
5981
|
+
"endIndex": 2
|
|
5982
|
+
}
|
|
5983
|
+
},
|
|
5766
5984
|
{
|
|
5767
5985
|
"kind": "Variable",
|
|
5768
5986
|
"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, and after every reply to `loadMore()`. detail: `GridTabulatorMoreRowsEventDetail`
|
|
1131
1132
|
*/
|
|
1132
1133
|
export declare class GridTabulatorClientSideDatasource extends GridTabulatorClientSideDatasource_base {
|
|
1133
1134
|
auth: Auth;
|
|
@@ -1164,9 +1165,36 @@ 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'`). Rows that arrive in reply to `loadMore()` are passed as `'page'`
|
|
1174
|
+
* instead of `'add'`, as they are existing rows rather than new ones.
|
|
1168
1175
|
*/
|
|
1169
1176
|
rowDataMapper: Function;
|
|
1177
|
+
/**
|
|
1178
|
+
* Total rows the resource holds on the server (`ROWS_COUNT` of the first stream message), or `undefined` when
|
|
1179
|
+
* unknown. It ignores criteria, and is not adjusted for live inserts and deletes.
|
|
1180
|
+
*/
|
|
1181
|
+
serverRowsCount: number | undefined;
|
|
1182
|
+
/**
|
|
1183
|
+
* Whether the server holds more rows than were sent (`MORE_ROWS` of the first stream message), or `undefined`
|
|
1184
|
+
* when unknown. It is true when `max-rows` capped the initial load.
|
|
1185
|
+
*/
|
|
1186
|
+
moreRows: boolean | undefined;
|
|
1187
|
+
/** MORE_ROWS requests sent by `loadMore()` that have not been answered yet. */
|
|
1188
|
+
private pendingPages;
|
|
1189
|
+
/** Further pages a `loadMore()` call still has to request, one after each reply. */
|
|
1190
|
+
private remainingPages;
|
|
1191
|
+
/** Set while the rows of a `loadMore()` reply are being applied. */
|
|
1192
|
+
private applyingPage;
|
|
1193
|
+
/**
|
|
1194
|
+
* Set when a `loadMore()` reply had no rows while the server still reported more. Some GSF versions answer
|
|
1195
|
+
* every later request the same way, so paging stops.
|
|
1196
|
+
*/
|
|
1197
|
+
private pagingStalled;
|
|
1170
1198
|
private dataSub;
|
|
1171
1199
|
private updateSub;
|
|
1172
1200
|
private connectionSub;
|
|
@@ -1255,6 +1283,29 @@ export declare class GridTabulatorClientSideDatasource extends GridTabulatorClie
|
|
|
1255
1283
|
* @internal
|
|
1256
1284
|
*/
|
|
1257
1285
|
loadResourceData(withFullInit?: boolean): Promise<void>;
|
|
1286
|
+
/**
|
|
1287
|
+
* Requests the next `pages` pages of rows from a data server subscription (`MORE_ROWS`), one after another.
|
|
1288
|
+
* Each page holds up to `max-rows` rows; the server fixes that size when the subscription opens. The rows
|
|
1289
|
+
* arrive on the stream and reach the row mapper as a `'page'` operation, and `more-rows-changed` is emitted
|
|
1290
|
+
* after each reply. Requesting stops early when the server reports no more rows.
|
|
1291
|
+
*
|
|
1292
|
+
* @returns Whether a request was sent. Nothing is sent for a request server, while a load is in progress,
|
|
1293
|
+
* when the server reported no more rows, or after paging stalled.
|
|
1294
|
+
*/
|
|
1295
|
+
loadMore(pages?: number): Promise<boolean>;
|
|
1296
|
+
/** Whether a `loadMore()` call is still waiting for pages. */
|
|
1297
|
+
get isLoadingMore(): boolean;
|
|
1298
|
+
private requestPage;
|
|
1299
|
+
/** Whether a raw stream message answers a `loadMore()` request. Live updates never carry `MORE_ROWS`. */
|
|
1300
|
+
private isPageReply;
|
|
1301
|
+
/**
|
|
1302
|
+
* Keeps `ROWS_COUNT` and `MORE_ROWS` from a raw stream message. The result filter drops them; the first
|
|
1303
|
+
* message after the logon and every reply to `loadMore()` carry them.
|
|
1304
|
+
*/
|
|
1305
|
+
private captureServerPaging;
|
|
1306
|
+
/** Whether `loadMore()` can fetch another page now. */
|
|
1307
|
+
get canLoadMore(): boolean;
|
|
1308
|
+
private setServerPaging;
|
|
1258
1309
|
private handleSnapshot;
|
|
1259
1310
|
private datasourceOptions;
|
|
1260
1311
|
private handleStreamResult;
|
|
@@ -1322,12 +1373,7 @@ declare const GridTabulatorClientSideDatasource_base: (new (...args: any[]) => {
|
|
|
1322
1373
|
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1323
1374
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1324
1375
|
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;
|
|
1376
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1331
1377
|
readonly attributes: NamedNodeMap;
|
|
1332
1378
|
get classList(): DOMTokenList;
|
|
1333
1379
|
set classList(value: string): any;
|
|
@@ -2413,6 +2459,23 @@ export declare const gridTabulatorEventNames: {
|
|
|
2413
2459
|
datasourceErrorClose: string;
|
|
2414
2460
|
};
|
|
2415
2461
|
|
|
2462
|
+
/**
|
|
2463
|
+
* Detail payload for the `more-rows-changed` event.
|
|
2464
|
+
* @alpha
|
|
2465
|
+
*/
|
|
2466
|
+
export declare interface GridTabulatorMoreRowsEventDetail {
|
|
2467
|
+
/** Whether the server holds more rows than were sent (`MORE_ROWS`). */
|
|
2468
|
+
moreRows: boolean | undefined;
|
|
2469
|
+
/** Total rows the resource holds on the server, ignoring criteria (`ROWS_COUNT`). */
|
|
2470
|
+
rowsCount: number | undefined;
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
/**
|
|
2474
|
+
* Kind of change a row data mapper is called with for a stream transaction.
|
|
2475
|
+
* @alpha
|
|
2476
|
+
*/
|
|
2477
|
+
export declare type GridTabulatorRowDataMapperOperation = 'add' | 'update' | 'remove' | 'page';
|
|
2478
|
+
|
|
2416
2479
|
/**
|
|
2417
2480
|
* The grid-tabulator component registration.
|
|
2418
2481
|
* @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.3",
|
|
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.3",
|
|
43
|
+
"@genesislcap/genx": "15.92.0-HT-305.3",
|
|
44
|
+
"@genesislcap/ts-builder": "15.92.0-HT-305.3",
|
|
45
|
+
"@genesislcap/uvu-playwright-builder": "15.92.0-HT-305.3",
|
|
46
|
+
"@genesislcap/vite-builder": "15.92.0-HT-305.3",
|
|
47
|
+
"@genesislcap/webpack-builder": "15.92.0-HT-305.3",
|
|
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.3",
|
|
52
|
+
"@genesislcap/foundation-logger": "15.92.0-HT-305.3",
|
|
53
|
+
"@genesislcap/foundation-ui": "15.92.0-HT-305.3",
|
|
54
|
+
"@genesislcap/foundation-utils": "15.92.0-HT-305.3",
|
|
55
55
|
"@microsoft/fast-colors": "5.3.1",
|
|
56
56
|
"@microsoft/fast-components": "2.30.6",
|
|
57
57
|
"@microsoft/fast-element": "1.14.0",
|