@toolbox-web/grid 2.1.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all.js +2 -2
- package/all.js.map +1 -1
- package/custom-elements.json +21 -2
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/lib/core/adapter-conformance.d.ts +23 -0
- package/lib/core/constants.d.ts +18 -0
- package/lib/core/grid.d.ts +13 -15
- package/lib/core/internal/value-accessor.d.ts +33 -0
- package/lib/core/types.d.ts +186 -12
- package/lib/plugins/clipboard/index.js +1 -1
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/editing/index.js +1 -1
- package/lib/plugins/editing/index.js.map +1 -1
- package/lib/plugins/export/index.js +1 -1
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/FilteringPlugin.d.ts +19 -1
- package/lib/plugins/filtering/index.js +1 -1
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/index.js +2 -2
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/index.js +1 -1
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/index.js +1 -1
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +1 -1
- package/lib/plugins/pinned-columns/index.js +1 -1
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-columns/types.d.ts +7 -0
- package/lib/plugins/pinned-rows/index.js +1 -1
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/print/index.js +1 -1
- package/lib/plugins/print/index.js.map +1 -1
- package/lib/plugins/reorder-columns/ReorderPlugin.d.ts +13 -1
- package/lib/plugins/reorder-columns/column-drag.d.ts +7 -1
- package/lib/plugins/reorder-columns/index.js +1 -1
- package/lib/plugins/reorder-columns/index.js.map +1 -1
- package/lib/plugins/reorder-columns/types.d.ts +12 -0
- package/lib/plugins/reorder-rows/index.js +1 -1
- package/lib/plugins/reorder-rows/index.js.map +1 -1
- package/lib/plugins/responsive/index.js.map +1 -1
- package/lib/plugins/selection/index.js +1 -1
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/selection/types.d.ts +8 -0
- package/lib/plugins/server-side/ServerSidePlugin.d.ts +4 -0
- package/lib/plugins/server-side/index.js +1 -1
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/server-side/types.d.ts +48 -0
- package/lib/plugins/tooltip/index.js.map +1 -1
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/VisibilityPlugin.d.ts +11 -1
- package/lib/plugins/visibility/index.js +1 -1
- package/lib/plugins/visibility/index.js.map +1 -1
- package/package.json +1 -1
- package/public.d.ts +5 -1
- package/umd/grid.all.umd.js +1 -1
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +1 -1
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/clipboard.umd.js +1 -1
- package/umd/plugins/clipboard.umd.js.map +1 -1
- package/umd/plugins/editing.umd.js +1 -1
- package/umd/plugins/editing.umd.js.map +1 -1
- package/umd/plugins/export.umd.js +1 -1
- package/umd/plugins/export.umd.js.map +1 -1
- package/umd/plugins/filtering.umd.js +1 -1
- package/umd/plugins/filtering.umd.js.map +1 -1
- package/umd/plugins/multi-sort.umd.js +1 -1
- package/umd/plugins/multi-sort.umd.js.map +1 -1
- package/umd/plugins/pinned-columns.umd.js +1 -1
- package/umd/plugins/pinned-columns.umd.js.map +1 -1
- package/umd/plugins/pinned-rows.umd.js +1 -1
- package/umd/plugins/pinned-rows.umd.js.map +1 -1
- package/umd/plugins/print.umd.js +1 -1
- package/umd/plugins/print.umd.js.map +1 -1
- package/umd/plugins/reorder-columns.umd.js +1 -1
- package/umd/plugins/reorder-columns.umd.js.map +1 -1
- package/umd/plugins/reorder-rows.umd.js +1 -1
- package/umd/plugins/reorder-rows.umd.js.map +1 -1
- package/umd/plugins/selection.umd.js +1 -1
- package/umd/plugins/selection.umd.js.map +1 -1
- package/umd/plugins/server-side.umd.js +1 -1
- package/umd/plugins/server-side.umd.js.map +1 -1
- package/umd/plugins/visibility.umd.js +1 -1
- package/umd/plugins/visibility.umd.js.map +1 -1
|
@@ -38,6 +38,26 @@ export interface ServerSideConfig {
|
|
|
38
38
|
* @default 2
|
|
39
39
|
*/
|
|
40
40
|
maxConcurrentRequests?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Prefetch slack in **node count** (rows). When `> 0`, blocks are loaded as
|
|
43
|
+
* soon as the user is within `loadThreshold` rows of an unloaded block,
|
|
44
|
+
* rather than only when the visible window enters it. This reduces the
|
|
45
|
+
* number of placeholder rows the user sees during gentle scrolling at the
|
|
46
|
+
* cost of slightly more eager fetching.
|
|
47
|
+
*
|
|
48
|
+
* The threshold is applied symmetrically: the viewport is expanded by
|
|
49
|
+
* `loadThreshold` rows in both directions before block coverage is
|
|
50
|
+
* computed. The `maxConcurrentRequests` cap and per-block dedup still
|
|
51
|
+
* apply, so a large threshold during fast scrolling will not flood the
|
|
52
|
+
* server with requests.
|
|
53
|
+
*
|
|
54
|
+
* A reasonable starting point is `pageSize / 2`. Values larger than
|
|
55
|
+
* `cacheBlockSize` will eagerly request 2+ blocks ahead, which can hurt
|
|
56
|
+
* perceived performance with slow backends.
|
|
57
|
+
*
|
|
58
|
+
* @default 0 (fetch only when the visible window enters an unloaded block)
|
|
59
|
+
*/
|
|
60
|
+
loadThreshold?: number;
|
|
41
61
|
/**
|
|
42
62
|
* Data source for server-side loading.
|
|
43
63
|
* When provided, the plugin auto-initializes on attach — no need to call `setDataSource()`.
|
|
@@ -58,6 +78,34 @@ export interface ServerSideConfig {
|
|
|
58
78
|
* ```
|
|
59
79
|
*/
|
|
60
80
|
dataSource?: ServerSideDataSource;
|
|
81
|
+
/**
|
|
82
|
+
* How sort changes affect the cache.
|
|
83
|
+
* - `'server'` (default): purge cache and refetch via `getRows({ sortModel })`.
|
|
84
|
+
* Use when the backend supports the requested sort shape natively.
|
|
85
|
+
* - `'local'`: keep the loaded blocks; sort the loaded rows in-place via
|
|
86
|
+
* the active sort plugin (MultiSort or core sort). `sortModel` is **not**
|
|
87
|
+
* sent on subsequent block fetches. Placeholder rows (`__loading: true`)
|
|
88
|
+
* are pinned to the end regardless of direction.
|
|
89
|
+
*
|
|
90
|
+
* Use `'local'` when the server cannot sort by every column the user can sort
|
|
91
|
+
* (e.g. APIs that only support a single sort field, or no sort at all).
|
|
92
|
+
*
|
|
93
|
+
* @default 'server'
|
|
94
|
+
*/
|
|
95
|
+
sortMode?: 'server' | 'local';
|
|
96
|
+
/**
|
|
97
|
+
* How filter changes affect the cache.
|
|
98
|
+
* - `'server'` (default): purge cache and refetch via `getRows({ filterModel })`.
|
|
99
|
+
* - `'local'`: keep the loaded blocks; filter only the rows currently in cache
|
|
100
|
+
* via FilteringPlugin's normal pipeline. `filterModel` is **not** sent on
|
|
101
|
+
* subsequent block fetches.
|
|
102
|
+
*
|
|
103
|
+
* In `'local'` mode the user only filters the currently loaded subset —
|
|
104
|
+
* scrolling further loads more blocks which then re-enter the local filter.
|
|
105
|
+
*
|
|
106
|
+
* @default 'server'
|
|
107
|
+
*/
|
|
108
|
+
filterMode?: 'server' | 'local';
|
|
61
109
|
}
|
|
62
110
|
export interface ServerSideState {
|
|
63
111
|
dataSource: ServerSideDataSource | null;
|