@revolist/revogrid 4.23.21 → 4.23.22
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/cjs/{column.drag.plugin-Bjnv6C0x.js → column.drag.plugin-Cz-T4y3M.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/revo-grid.cjs.entry.js +43 -19
- package/dist/cjs/revo-grid.cjs.js +1 -1
- package/dist/collection/components/revoGrid/revo-grid.js +43 -2
- package/dist/collection/components/revoGrid/viewport.service.js +17 -13
- package/dist/collection/plugins/base.plugin.js +1 -1
- package/dist/collection/services/dimension.provider.js +8 -4
- package/dist/esm/{column.drag.plugin-Bzb8TAwZ.js → column.drag.plugin-DKkf7Zqb.js} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/revo-grid.entry.js +43 -19
- package/dist/esm/revo-grid.js +1 -1
- package/dist/revo-grid/{column.drag.plugin-Bzb8TAwZ.js → column.drag.plugin-DKkf7Zqb.js} +1 -1
- package/dist/revo-grid/index.esm.js +2 -2
- package/dist/revo-grid/revo-grid.entry.js +43 -19
- package/dist/revo-grid/revo-grid.esm.js +1 -1
- package/dist/types/components/revoGrid/revo-grid.d.ts +8 -0
- package/dist/types/components/revoGrid/viewport.service.d.ts +3 -1
- package/dist/types/components.d.ts +10 -0
- package/dist/types/services/dimension.provider.d.ts +4 -1
- package/hydrate/index.js +44 -19
- package/hydrate/index.mjs +44 -19
- package/package.json +1 -1
- package/standalone/revo-grid.js +1 -1
package/hydrate/index.js
CHANGED
|
@@ -15101,6 +15101,10 @@ function getScrollDimension({ contentSize, clientSize, virtualSize = 0, maxScrol
|
|
|
15101
15101
|
};
|
|
15102
15102
|
}
|
|
15103
15103
|
|
|
15104
|
+
const DEFAULT_VIRTUAL_X = ['rgCol'];
|
|
15105
|
+
function isVirtualXDimension(type, disableVirtualX = false, virtualX = DEFAULT_VIRTUAL_X) {
|
|
15106
|
+
return !disableVirtualX && virtualX.includes(type);
|
|
15107
|
+
}
|
|
15104
15108
|
/**
|
|
15105
15109
|
* Dimension provider
|
|
15106
15110
|
* Stores dimension information and custom sizes
|
|
@@ -15111,7 +15115,7 @@ class DimensionProvider {
|
|
|
15111
15115
|
constructor(viewports, config) {
|
|
15112
15116
|
this.viewports = viewports;
|
|
15113
15117
|
const sizeChanged = debounce$1((k) => config.realSizeChanged(k), RESIZE_INTERVAL);
|
|
15114
|
-
this.stores =
|
|
15118
|
+
this.stores = [...rowTypes, ...columnTypes].reduce((sources, t) => {
|
|
15115
15119
|
sources[t] = new DimensionStore(t);
|
|
15116
15120
|
sources[t].store.onChange('realSize', () => sizeChanged(t));
|
|
15117
15121
|
return sources;
|
|
@@ -15187,8 +15191,9 @@ class DimensionProvider {
|
|
|
15187
15191
|
* Applies new columns to the dimension provider
|
|
15188
15192
|
* @param columns - new columns data
|
|
15189
15193
|
* @param disableVirtualX - disable virtual data for X axis
|
|
15194
|
+
* @param virtualX - column dimensions that should use virtual data
|
|
15190
15195
|
*/
|
|
15191
|
-
applyNewColumns(columns, disableVirtualX, keepOld = false) {
|
|
15196
|
+
applyNewColumns(columns, disableVirtualX, keepOld = false, virtualX = DEFAULT_VIRTUAL_X) {
|
|
15192
15197
|
// Apply new columns to dimension provider
|
|
15193
15198
|
for (let type of columnTypes) {
|
|
15194
15199
|
if (!keepOld) {
|
|
@@ -15198,7 +15203,7 @@ class DimensionProvider {
|
|
|
15198
15203
|
// Get the new columns for the current type
|
|
15199
15204
|
const items = columns[type];
|
|
15200
15205
|
// Determine if virtual data should be disabled for the current type
|
|
15201
|
-
const noVirtual = type
|
|
15206
|
+
const noVirtual = !isVirtualXDimension(type, disableVirtualX, virtualX);
|
|
15202
15207
|
// Set the items count in the dimension provider
|
|
15203
15208
|
this.stores[type].setStore({ count: items.length });
|
|
15204
15209
|
// Set the custom sizes for the columns
|
|
@@ -15424,7 +15429,7 @@ class BasePlugin {
|
|
|
15424
15429
|
},
|
|
15425
15430
|
});
|
|
15426
15431
|
if (immediate) {
|
|
15427
|
-
callback(nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
15432
|
+
callback((nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.get) ? nativeValueDesc.get.call(this.revogrid) : nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
15428
15433
|
}
|
|
15429
15434
|
}
|
|
15430
15435
|
/**
|
|
@@ -17641,6 +17646,9 @@ function viewportDataPartition(data, type, slot, fixed) {
|
|
|
17641
17646
|
};
|
|
17642
17647
|
}
|
|
17643
17648
|
|
|
17649
|
+
function getViewportResizeDimension(colType, dimension) {
|
|
17650
|
+
return dimension === 'rgCol' ? colType : dimension;
|
|
17651
|
+
}
|
|
17644
17652
|
/** Collect Column data */
|
|
17645
17653
|
function gatherColumnData(data) {
|
|
17646
17654
|
const colDimension = data.dimensions[data.colType].store;
|
|
@@ -17700,20 +17708,20 @@ class ViewportService {
|
|
|
17700
17708
|
colStore,
|
|
17701
17709
|
onHeaderresize: e => this.onColumnResize(val, e, colStore),
|
|
17702
17710
|
};
|
|
17703
|
-
|
|
17704
|
-
|
|
17705
|
-
|
|
17706
|
-
|
|
17707
|
-
clientSize: e.detail.size,
|
|
17708
|
-
};
|
|
17709
|
-
// virtual size will be handled by dimension provider if disabled
|
|
17710
|
-
if ((e.detail.dimension === 'rgRow' && !config.disableVirtualY)
|
|
17711
|
-
|| (e.detail.dimension === 'rgCol' && !config.disableVirtualX)) {
|
|
17712
|
-
vpState.virtualSize = e.detail.size;
|
|
17713
|
-
}
|
|
17714
|
-
(_a = config.viewportProvider) === null || _a === void 0 ? void 0 : _a.setViewport(e.detail.dimension, vpState);
|
|
17711
|
+
column.onResizeviewport = (e) => {
|
|
17712
|
+
var _a;
|
|
17713
|
+
const vpState = {
|
|
17714
|
+
clientSize: e.detail.size,
|
|
17715
17715
|
};
|
|
17716
|
-
|
|
17716
|
+
const dimension = getViewportResizeDimension(val, e.detail.dimension);
|
|
17717
|
+
const isVirtualColumn = columnTypes.includes(dimension)
|
|
17718
|
+
&& isVirtualXDimension(dimension, config.disableVirtualX, config.virtualX);
|
|
17719
|
+
// Keep virtual dimensions in sync with their viewport size.
|
|
17720
|
+
if ((dimension === 'rgRow' && !config.disableVirtualY) || isVirtualColumn) {
|
|
17721
|
+
vpState.virtualSize = e.detail.size;
|
|
17722
|
+
}
|
|
17723
|
+
(_a = config.viewportProvider) === null || _a === void 0 ? void 0 : _a.setViewport(dimension, vpState);
|
|
17724
|
+
};
|
|
17717
17725
|
const colData = gatherColumnData(column);
|
|
17718
17726
|
const columnSelectionStore = this.registerCol(colData.position.x, val);
|
|
17719
17727
|
// render per each column data collections vertically
|
|
@@ -19427,6 +19435,12 @@ class RevoGridComponent {
|
|
|
19427
19435
|
* Can be used for initial rendering performance improvement.
|
|
19428
19436
|
*/
|
|
19429
19437
|
this.disableVirtualX = false;
|
|
19438
|
+
/**
|
|
19439
|
+
* Column dimensions that use X axis virtual rendering.
|
|
19440
|
+
* Defaults to regular columns only to preserve pinned column behavior.
|
|
19441
|
+
* Set to `['rgCol', 'colPinStart', 'colPinEnd']` to virtualize all column areas.
|
|
19442
|
+
*/
|
|
19443
|
+
this.virtualX = ['rgCol'];
|
|
19430
19444
|
/**
|
|
19431
19445
|
* Disable lazy rendering mode for the `Y axis`.
|
|
19432
19446
|
* Use when not many rows present and you don't need rerenader cells during scroll.
|
|
@@ -19878,7 +19892,7 @@ class RevoGridComponent {
|
|
|
19878
19892
|
if (beforeSetEvent.defaultPrevented) {
|
|
19879
19893
|
return;
|
|
19880
19894
|
}
|
|
19881
|
-
this.dimensionProvider.applyNewColumns(beforeSetEvent.detail.columns, this.disableVirtualX, init);
|
|
19895
|
+
this.dimensionProvider.applyNewColumns(beforeSetEvent.detail.columns, this.disableVirtualX, init, this.virtualX);
|
|
19882
19896
|
const beforeApplyEvent = this.beforecolumnapplied.emit(columnGather);
|
|
19883
19897
|
if (beforeApplyEvent.defaultPrevented) {
|
|
19884
19898
|
return;
|
|
@@ -19954,12 +19968,18 @@ class RevoGridComponent {
|
|
|
19954
19968
|
};
|
|
19955
19969
|
this.viewport.setFocus(colType, pending.rowType, cell, cell);
|
|
19956
19970
|
}
|
|
19957
|
-
|
|
19971
|
+
refreshColumnsOnConfigChange(newVal, prevVal) {
|
|
19958
19972
|
if (newVal === prevVal) {
|
|
19959
19973
|
return;
|
|
19960
19974
|
}
|
|
19961
19975
|
this.columnChanged(this.columns);
|
|
19962
19976
|
}
|
|
19977
|
+
disableVirtualXChanged(newVal = false, prevVal = false) {
|
|
19978
|
+
this.refreshColumnsOnConfigChange(newVal, prevVal);
|
|
19979
|
+
}
|
|
19980
|
+
virtualXChanged(newVal = ['rgCol'], prevVal = ['rgCol']) {
|
|
19981
|
+
this.refreshColumnsOnConfigChange(newVal, prevVal);
|
|
19982
|
+
}
|
|
19963
19983
|
rowSizeChanged(s) {
|
|
19964
19984
|
if (!this.dimensionProvider) {
|
|
19965
19985
|
return;
|
|
@@ -20285,6 +20305,7 @@ class RevoGridComponent {
|
|
|
20285
20305
|
selectionStoreConnector: this.selectionStoreConnector,
|
|
20286
20306
|
noHorizontalScrollTransfer: this.noHorizontalScrollTransfer,
|
|
20287
20307
|
disableVirtualX: this.disableVirtualX,
|
|
20308
|
+
virtualX: this.virtualX,
|
|
20288
20309
|
disableVirtualY: this.disableVirtualY,
|
|
20289
20310
|
resize: c => this.aftercolumnresize.emit(c),
|
|
20290
20311
|
}, contentHeight);
|
|
@@ -20359,6 +20380,9 @@ class RevoGridComponent {
|
|
|
20359
20380
|
"disableVirtualX": [{
|
|
20360
20381
|
"disableVirtualXChanged": 0
|
|
20361
20382
|
}],
|
|
20383
|
+
"virtualX": [{
|
|
20384
|
+
"virtualXChanged": 0
|
|
20385
|
+
}],
|
|
20362
20386
|
"rowSize": [{
|
|
20363
20387
|
"rowSizeChanged": 0
|
|
20364
20388
|
}],
|
|
@@ -20448,6 +20472,7 @@ class RevoGridComponent {
|
|
|
20448
20472
|
"stretch": [8],
|
|
20449
20473
|
"additionalData": [16],
|
|
20450
20474
|
"disableVirtualX": [4, "disable-virtual-x"],
|
|
20475
|
+
"virtualX": [16],
|
|
20451
20476
|
"disableVirtualY": [4, "disable-virtual-y"],
|
|
20452
20477
|
"hideAttribution": [4, "hide-attribution"],
|
|
20453
20478
|
"jobsBeforeRender": [16],
|
package/hydrate/index.mjs
CHANGED
|
@@ -15099,6 +15099,10 @@ function getScrollDimension({ contentSize, clientSize, virtualSize = 0, maxScrol
|
|
|
15099
15099
|
};
|
|
15100
15100
|
}
|
|
15101
15101
|
|
|
15102
|
+
const DEFAULT_VIRTUAL_X = ['rgCol'];
|
|
15103
|
+
function isVirtualXDimension(type, disableVirtualX = false, virtualX = DEFAULT_VIRTUAL_X) {
|
|
15104
|
+
return !disableVirtualX && virtualX.includes(type);
|
|
15105
|
+
}
|
|
15102
15106
|
/**
|
|
15103
15107
|
* Dimension provider
|
|
15104
15108
|
* Stores dimension information and custom sizes
|
|
@@ -15109,7 +15113,7 @@ class DimensionProvider {
|
|
|
15109
15113
|
constructor(viewports, config) {
|
|
15110
15114
|
this.viewports = viewports;
|
|
15111
15115
|
const sizeChanged = debounce$1((k) => config.realSizeChanged(k), RESIZE_INTERVAL);
|
|
15112
|
-
this.stores =
|
|
15116
|
+
this.stores = [...rowTypes, ...columnTypes].reduce((sources, t) => {
|
|
15113
15117
|
sources[t] = new DimensionStore(t);
|
|
15114
15118
|
sources[t].store.onChange('realSize', () => sizeChanged(t));
|
|
15115
15119
|
return sources;
|
|
@@ -15185,8 +15189,9 @@ class DimensionProvider {
|
|
|
15185
15189
|
* Applies new columns to the dimension provider
|
|
15186
15190
|
* @param columns - new columns data
|
|
15187
15191
|
* @param disableVirtualX - disable virtual data for X axis
|
|
15192
|
+
* @param virtualX - column dimensions that should use virtual data
|
|
15188
15193
|
*/
|
|
15189
|
-
applyNewColumns(columns, disableVirtualX, keepOld = false) {
|
|
15194
|
+
applyNewColumns(columns, disableVirtualX, keepOld = false, virtualX = DEFAULT_VIRTUAL_X) {
|
|
15190
15195
|
// Apply new columns to dimension provider
|
|
15191
15196
|
for (let type of columnTypes) {
|
|
15192
15197
|
if (!keepOld) {
|
|
@@ -15196,7 +15201,7 @@ class DimensionProvider {
|
|
|
15196
15201
|
// Get the new columns for the current type
|
|
15197
15202
|
const items = columns[type];
|
|
15198
15203
|
// Determine if virtual data should be disabled for the current type
|
|
15199
|
-
const noVirtual = type
|
|
15204
|
+
const noVirtual = !isVirtualXDimension(type, disableVirtualX, virtualX);
|
|
15200
15205
|
// Set the items count in the dimension provider
|
|
15201
15206
|
this.stores[type].setStore({ count: items.length });
|
|
15202
15207
|
// Set the custom sizes for the columns
|
|
@@ -15422,7 +15427,7 @@ class BasePlugin {
|
|
|
15422
15427
|
},
|
|
15423
15428
|
});
|
|
15424
15429
|
if (immediate) {
|
|
15425
|
-
callback(nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
15430
|
+
callback((nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.get) ? nativeValueDesc.get.call(this.revogrid) : nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
15426
15431
|
}
|
|
15427
15432
|
}
|
|
15428
15433
|
/**
|
|
@@ -17639,6 +17644,9 @@ function viewportDataPartition(data, type, slot, fixed) {
|
|
|
17639
17644
|
};
|
|
17640
17645
|
}
|
|
17641
17646
|
|
|
17647
|
+
function getViewportResizeDimension(colType, dimension) {
|
|
17648
|
+
return dimension === 'rgCol' ? colType : dimension;
|
|
17649
|
+
}
|
|
17642
17650
|
/** Collect Column data */
|
|
17643
17651
|
function gatherColumnData(data) {
|
|
17644
17652
|
const colDimension = data.dimensions[data.colType].store;
|
|
@@ -17698,20 +17706,20 @@ class ViewportService {
|
|
|
17698
17706
|
colStore,
|
|
17699
17707
|
onHeaderresize: e => this.onColumnResize(val, e, colStore),
|
|
17700
17708
|
};
|
|
17701
|
-
|
|
17702
|
-
|
|
17703
|
-
|
|
17704
|
-
|
|
17705
|
-
clientSize: e.detail.size,
|
|
17706
|
-
};
|
|
17707
|
-
// virtual size will be handled by dimension provider if disabled
|
|
17708
|
-
if ((e.detail.dimension === 'rgRow' && !config.disableVirtualY)
|
|
17709
|
-
|| (e.detail.dimension === 'rgCol' && !config.disableVirtualX)) {
|
|
17710
|
-
vpState.virtualSize = e.detail.size;
|
|
17711
|
-
}
|
|
17712
|
-
(_a = config.viewportProvider) === null || _a === void 0 ? void 0 : _a.setViewport(e.detail.dimension, vpState);
|
|
17709
|
+
column.onResizeviewport = (e) => {
|
|
17710
|
+
var _a;
|
|
17711
|
+
const vpState = {
|
|
17712
|
+
clientSize: e.detail.size,
|
|
17713
17713
|
};
|
|
17714
|
-
|
|
17714
|
+
const dimension = getViewportResizeDimension(val, e.detail.dimension);
|
|
17715
|
+
const isVirtualColumn = columnTypes.includes(dimension)
|
|
17716
|
+
&& isVirtualXDimension(dimension, config.disableVirtualX, config.virtualX);
|
|
17717
|
+
// Keep virtual dimensions in sync with their viewport size.
|
|
17718
|
+
if ((dimension === 'rgRow' && !config.disableVirtualY) || isVirtualColumn) {
|
|
17719
|
+
vpState.virtualSize = e.detail.size;
|
|
17720
|
+
}
|
|
17721
|
+
(_a = config.viewportProvider) === null || _a === void 0 ? void 0 : _a.setViewport(dimension, vpState);
|
|
17722
|
+
};
|
|
17715
17723
|
const colData = gatherColumnData(column);
|
|
17716
17724
|
const columnSelectionStore = this.registerCol(colData.position.x, val);
|
|
17717
17725
|
// render per each column data collections vertically
|
|
@@ -19425,6 +19433,12 @@ class RevoGridComponent {
|
|
|
19425
19433
|
* Can be used for initial rendering performance improvement.
|
|
19426
19434
|
*/
|
|
19427
19435
|
this.disableVirtualX = false;
|
|
19436
|
+
/**
|
|
19437
|
+
* Column dimensions that use X axis virtual rendering.
|
|
19438
|
+
* Defaults to regular columns only to preserve pinned column behavior.
|
|
19439
|
+
* Set to `['rgCol', 'colPinStart', 'colPinEnd']` to virtualize all column areas.
|
|
19440
|
+
*/
|
|
19441
|
+
this.virtualX = ['rgCol'];
|
|
19428
19442
|
/**
|
|
19429
19443
|
* Disable lazy rendering mode for the `Y axis`.
|
|
19430
19444
|
* Use when not many rows present and you don't need rerenader cells during scroll.
|
|
@@ -19876,7 +19890,7 @@ class RevoGridComponent {
|
|
|
19876
19890
|
if (beforeSetEvent.defaultPrevented) {
|
|
19877
19891
|
return;
|
|
19878
19892
|
}
|
|
19879
|
-
this.dimensionProvider.applyNewColumns(beforeSetEvent.detail.columns, this.disableVirtualX, init);
|
|
19893
|
+
this.dimensionProvider.applyNewColumns(beforeSetEvent.detail.columns, this.disableVirtualX, init, this.virtualX);
|
|
19880
19894
|
const beforeApplyEvent = this.beforecolumnapplied.emit(columnGather);
|
|
19881
19895
|
if (beforeApplyEvent.defaultPrevented) {
|
|
19882
19896
|
return;
|
|
@@ -19952,12 +19966,18 @@ class RevoGridComponent {
|
|
|
19952
19966
|
};
|
|
19953
19967
|
this.viewport.setFocus(colType, pending.rowType, cell, cell);
|
|
19954
19968
|
}
|
|
19955
|
-
|
|
19969
|
+
refreshColumnsOnConfigChange(newVal, prevVal) {
|
|
19956
19970
|
if (newVal === prevVal) {
|
|
19957
19971
|
return;
|
|
19958
19972
|
}
|
|
19959
19973
|
this.columnChanged(this.columns);
|
|
19960
19974
|
}
|
|
19975
|
+
disableVirtualXChanged(newVal = false, prevVal = false) {
|
|
19976
|
+
this.refreshColumnsOnConfigChange(newVal, prevVal);
|
|
19977
|
+
}
|
|
19978
|
+
virtualXChanged(newVal = ['rgCol'], prevVal = ['rgCol']) {
|
|
19979
|
+
this.refreshColumnsOnConfigChange(newVal, prevVal);
|
|
19980
|
+
}
|
|
19961
19981
|
rowSizeChanged(s) {
|
|
19962
19982
|
if (!this.dimensionProvider) {
|
|
19963
19983
|
return;
|
|
@@ -20283,6 +20303,7 @@ class RevoGridComponent {
|
|
|
20283
20303
|
selectionStoreConnector: this.selectionStoreConnector,
|
|
20284
20304
|
noHorizontalScrollTransfer: this.noHorizontalScrollTransfer,
|
|
20285
20305
|
disableVirtualX: this.disableVirtualX,
|
|
20306
|
+
virtualX: this.virtualX,
|
|
20286
20307
|
disableVirtualY: this.disableVirtualY,
|
|
20287
20308
|
resize: c => this.aftercolumnresize.emit(c),
|
|
20288
20309
|
}, contentHeight);
|
|
@@ -20357,6 +20378,9 @@ class RevoGridComponent {
|
|
|
20357
20378
|
"disableVirtualX": [{
|
|
20358
20379
|
"disableVirtualXChanged": 0
|
|
20359
20380
|
}],
|
|
20381
|
+
"virtualX": [{
|
|
20382
|
+
"virtualXChanged": 0
|
|
20383
|
+
}],
|
|
20360
20384
|
"rowSize": [{
|
|
20361
20385
|
"rowSizeChanged": 0
|
|
20362
20386
|
}],
|
|
@@ -20446,6 +20470,7 @@ class RevoGridComponent {
|
|
|
20446
20470
|
"stretch": [8],
|
|
20447
20471
|
"additionalData": [16],
|
|
20448
20472
|
"disableVirtualX": [4, "disable-virtual-x"],
|
|
20473
|
+
"virtualX": [16],
|
|
20449
20474
|
"disableVirtualY": [4, "disable-virtual-y"],
|
|
20450
20475
|
"hideAttribution": [4, "hide-attribution"],
|
|
20451
20476
|
"jobsBeforeRender": [16],
|