@genesislcap/grid-tabulator 15.96.0 → 15.96.1
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 +493 -328
- package/dist/dts/datasource/client-side.datasource.d.ts +72 -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 +116 -6
- package/dist/grid-tabulator.api.json +220 -2
- package/dist/grid-tabulator.d.ts +74 -7
- package/dist/react.cjs +6 -1
- package/dist/react.mjs +6 -1
- package/package.json +11 -11
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,33 @@ 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
|
+
/**
|
|
1299
|
+
* Sends one MORE_ROWS request. The send is not awaited: the request has no reply of its own, the rows arrive
|
|
1300
|
+
* on the stream, so the returned promise only settles when sending fails.
|
|
1301
|
+
*/
|
|
1302
|
+
private requestPage;
|
|
1303
|
+
/** Whether a raw stream message answers a `loadMore()` request. Live updates never carry `MORE_ROWS`. */
|
|
1304
|
+
private isPageReply;
|
|
1305
|
+
/**
|
|
1306
|
+
* Keeps `ROWS_COUNT` and `MORE_ROWS` from a raw stream message. The result filter drops them; the first
|
|
1307
|
+
* message after the logon and every reply to `loadMore()` carry them.
|
|
1308
|
+
*/
|
|
1309
|
+
private captureServerPaging;
|
|
1310
|
+
/** Whether `loadMore()` can fetch another page now. */
|
|
1311
|
+
get canLoadMore(): boolean;
|
|
1312
|
+
private setServerPaging;
|
|
1258
1313
|
private handleSnapshot;
|
|
1259
1314
|
private datasourceOptions;
|
|
1260
1315
|
private handleStreamResult;
|
|
@@ -1322,12 +1377,7 @@ declare const GridTabulatorClientSideDatasource_base: (new (...args: any[]) => {
|
|
|
1322
1377
|
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1323
1378
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1324
1379
|
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;
|
|
1380
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1331
1381
|
readonly attributes: NamedNodeMap;
|
|
1332
1382
|
get classList(): DOMTokenList;
|
|
1333
1383
|
set classList(value: string): any;
|
|
@@ -2413,6 +2463,23 @@ export declare const gridTabulatorEventNames: {
|
|
|
2413
2463
|
datasourceErrorClose: string;
|
|
2414
2464
|
};
|
|
2415
2465
|
|
|
2466
|
+
/**
|
|
2467
|
+
* Detail payload for the `more-rows-changed` event.
|
|
2468
|
+
* @alpha
|
|
2469
|
+
*/
|
|
2470
|
+
export declare interface GridTabulatorMoreRowsEventDetail {
|
|
2471
|
+
/** Whether the server holds more rows than were sent (`MORE_ROWS`). */
|
|
2472
|
+
moreRows: boolean | undefined;
|
|
2473
|
+
/** Total rows the resource holds on the server, ignoring criteria (`ROWS_COUNT`). */
|
|
2474
|
+
rowsCount: number | undefined;
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
/**
|
|
2478
|
+
* Kind of change a row data mapper is called with for a stream transaction.
|
|
2479
|
+
* @alpha
|
|
2480
|
+
*/
|
|
2481
|
+
export declare type GridTabulatorRowDataMapperOperation = 'add' | 'update' | 'remove' | 'page';
|
|
2482
|
+
|
|
2416
2483
|
/**
|
|
2417
2484
|
* The grid-tabulator component registration.
|
|
2418
2485
|
* @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.96.
|
|
4
|
+
"version": "15.96.1",
|
|
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.96.
|
|
43
|
-
"@genesislcap/genx": "15.96.
|
|
44
|
-
"@genesislcap/ts-builder": "15.96.
|
|
45
|
-
"@genesislcap/uvu-playwright-builder": "15.96.
|
|
46
|
-
"@genesislcap/vite-builder": "15.96.
|
|
47
|
-
"@genesislcap/webpack-builder": "15.96.
|
|
42
|
+
"@genesislcap/foundation-testing": "15.96.1",
|
|
43
|
+
"@genesislcap/genx": "15.96.1",
|
|
44
|
+
"@genesislcap/ts-builder": "15.96.1",
|
|
45
|
+
"@genesislcap/uvu-playwright-builder": "15.96.1",
|
|
46
|
+
"@genesislcap/vite-builder": "15.96.1",
|
|
47
|
+
"@genesislcap/webpack-builder": "15.96.1",
|
|
48
48
|
"@types/tabulator-tables": "6.2.6"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@genesislcap/foundation-comms": "15.96.
|
|
52
|
-
"@genesislcap/foundation-logger": "15.96.
|
|
53
|
-
"@genesislcap/foundation-ui": "15.96.
|
|
54
|
-
"@genesislcap/foundation-utils": "15.96.
|
|
51
|
+
"@genesislcap/foundation-comms": "15.96.1",
|
|
52
|
+
"@genesislcap/foundation-logger": "15.96.1",
|
|
53
|
+
"@genesislcap/foundation-ui": "15.96.1",
|
|
54
|
+
"@genesislcap/foundation-utils": "15.96.1",
|
|
55
55
|
"@microsoft/fast-colors": "5.3.1",
|
|
56
56
|
"@microsoft/fast-components": "2.30.6",
|
|
57
57
|
"@microsoft/fast-element": "1.14.0",
|