@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
|
@@ -6,7 +6,7 @@ import { c as columnTypes, J as reduce, C as getColumnType, r as rowTypes, i as
|
|
|
6
6
|
import { D as DataStore, b as getSourceItem, f as getSourceItemVirtualIndexByProp, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, a as getVisibleSourceItem, h as gatherTrimmedItems, k as getItemByIndex, R as RESIZE_INTERVAL } from './dimension.helpers-CGKwSvw6.js';
|
|
7
7
|
import { d as debounce } from './debounce-PCRWZliA.js';
|
|
8
8
|
import { g as getScrollDimension, v as viewportDataPartition, F as FOOTER_SLOT, C as CONTENT_SLOT, H as HEADER_SLOT, D as DATA_SLOT } from './viewport.helpers-CoCAvmZs.js';
|
|
9
|
-
import { D as DimensionStore, S as SelectionStore, B as BasePlugin, G as GroupingRowPlugin, a as StretchColumn, i as isStretchPlugin, A as AutoSizeColumnPlugin, e as FilterPlugin, E as ExportFilePlugin, s as SortingPlugin, p as ColumnMovePlugin } from './column.drag.plugin-
|
|
9
|
+
import { D as DimensionStore, S as SelectionStore, B as BasePlugin, G as GroupingRowPlugin, a as StretchColumn, i as isStretchPlugin, A as AutoSizeColumnPlugin, e as FilterPlugin, E as ExportFilePlugin, s as SortingPlugin, p as ColumnMovePlugin } from './column.drag.plugin-DKkf7Zqb.js';
|
|
10
10
|
import { V as ViewportStore } from './viewport.store-_c579YyM.js';
|
|
11
11
|
import { T as ThemeService } from './theme.service-BmnDvr6P.js';
|
|
12
12
|
import { t as timeout } from './index-Db3qZoW5.js';
|
|
@@ -230,6 +230,10 @@ class DataProvider {
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
const DEFAULT_VIRTUAL_X = ['rgCol'];
|
|
234
|
+
function isVirtualXDimension(type, disableVirtualX = false, virtualX = DEFAULT_VIRTUAL_X) {
|
|
235
|
+
return !disableVirtualX && virtualX.includes(type);
|
|
236
|
+
}
|
|
233
237
|
/**
|
|
234
238
|
* Dimension provider
|
|
235
239
|
* Stores dimension information and custom sizes
|
|
@@ -240,7 +244,7 @@ class DimensionProvider {
|
|
|
240
244
|
constructor(viewports, config) {
|
|
241
245
|
this.viewports = viewports;
|
|
242
246
|
const sizeChanged = debounce((k) => config.realSizeChanged(k), RESIZE_INTERVAL);
|
|
243
|
-
this.stores =
|
|
247
|
+
this.stores = [...rowTypes, ...columnTypes].reduce((sources, t) => {
|
|
244
248
|
sources[t] = new DimensionStore(t);
|
|
245
249
|
sources[t].store.onChange('realSize', () => sizeChanged(t));
|
|
246
250
|
return sources;
|
|
@@ -316,8 +320,9 @@ class DimensionProvider {
|
|
|
316
320
|
* Applies new columns to the dimension provider
|
|
317
321
|
* @param columns - new columns data
|
|
318
322
|
* @param disableVirtualX - disable virtual data for X axis
|
|
323
|
+
* @param virtualX - column dimensions that should use virtual data
|
|
319
324
|
*/
|
|
320
|
-
applyNewColumns(columns, disableVirtualX, keepOld = false) {
|
|
325
|
+
applyNewColumns(columns, disableVirtualX, keepOld = false, virtualX = DEFAULT_VIRTUAL_X) {
|
|
321
326
|
// Apply new columns to dimension provider
|
|
322
327
|
for (let type of columnTypes) {
|
|
323
328
|
if (!keepOld) {
|
|
@@ -327,7 +332,7 @@ class DimensionProvider {
|
|
|
327
332
|
// Get the new columns for the current type
|
|
328
333
|
const items = columns[type];
|
|
329
334
|
// Determine if virtual data should be disabled for the current type
|
|
330
|
-
const noVirtual = type
|
|
335
|
+
const noVirtual = !isVirtualXDimension(type, disableVirtualX, virtualX);
|
|
331
336
|
// Set the items count in the dimension provider
|
|
332
337
|
this.stores[type].setStore({ count: items.length });
|
|
333
338
|
// Set the custom sizes for the columns
|
|
@@ -433,6 +438,9 @@ class ViewportProvider {
|
|
|
433
438
|
}
|
|
434
439
|
}
|
|
435
440
|
|
|
441
|
+
function getViewportResizeDimension(colType, dimension) {
|
|
442
|
+
return dimension === 'rgCol' ? colType : dimension;
|
|
443
|
+
}
|
|
436
444
|
/** Collect Column data */
|
|
437
445
|
function gatherColumnData(data) {
|
|
438
446
|
const colDimension = data.dimensions[data.colType].store;
|
|
@@ -492,20 +500,20 @@ class ViewportService {
|
|
|
492
500
|
colStore,
|
|
493
501
|
onHeaderresize: e => this.onColumnResize(val, e, colStore),
|
|
494
502
|
};
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
clientSize: e.detail.size,
|
|
500
|
-
};
|
|
501
|
-
// virtual size will be handled by dimension provider if disabled
|
|
502
|
-
if ((e.detail.dimension === 'rgRow' && !config.disableVirtualY)
|
|
503
|
-
|| (e.detail.dimension === 'rgCol' && !config.disableVirtualX)) {
|
|
504
|
-
vpState.virtualSize = e.detail.size;
|
|
505
|
-
}
|
|
506
|
-
(_a = config.viewportProvider) === null || _a === void 0 ? void 0 : _a.setViewport(e.detail.dimension, vpState);
|
|
503
|
+
column.onResizeviewport = (e) => {
|
|
504
|
+
var _a;
|
|
505
|
+
const vpState = {
|
|
506
|
+
clientSize: e.detail.size,
|
|
507
507
|
};
|
|
508
|
-
|
|
508
|
+
const dimension = getViewportResizeDimension(val, e.detail.dimension);
|
|
509
|
+
const isVirtualColumn = columnTypes.includes(dimension)
|
|
510
|
+
&& isVirtualXDimension(dimension, config.disableVirtualX, config.virtualX);
|
|
511
|
+
// Keep virtual dimensions in sync with their viewport size.
|
|
512
|
+
if ((dimension === 'rgRow' && !config.disableVirtualY) || isVirtualColumn) {
|
|
513
|
+
vpState.virtualSize = e.detail.size;
|
|
514
|
+
}
|
|
515
|
+
(_a = config.viewportProvider) === null || _a === void 0 ? void 0 : _a.setViewport(dimension, vpState);
|
|
516
|
+
};
|
|
509
517
|
const colData = gatherColumnData(column);
|
|
510
518
|
const columnSelectionStore = this.registerCol(colData.position.x, val);
|
|
511
519
|
// render per each column data collections vertically
|
|
@@ -1555,6 +1563,12 @@ const RevoGridComponent = class {
|
|
|
1555
1563
|
* Can be used for initial rendering performance improvement.
|
|
1556
1564
|
*/
|
|
1557
1565
|
this.disableVirtualX = false;
|
|
1566
|
+
/**
|
|
1567
|
+
* Column dimensions that use X axis virtual rendering.
|
|
1568
|
+
* Defaults to regular columns only to preserve pinned column behavior.
|
|
1569
|
+
* Set to `['rgCol', 'colPinStart', 'colPinEnd']` to virtualize all column areas.
|
|
1570
|
+
*/
|
|
1571
|
+
this.virtualX = ['rgCol'];
|
|
1558
1572
|
/**
|
|
1559
1573
|
* Disable lazy rendering mode for the `Y axis`.
|
|
1560
1574
|
* Use when not many rows present and you don't need rerenader cells during scroll.
|
|
@@ -2006,7 +2020,7 @@ const RevoGridComponent = class {
|
|
|
2006
2020
|
if (beforeSetEvent.defaultPrevented) {
|
|
2007
2021
|
return;
|
|
2008
2022
|
}
|
|
2009
|
-
this.dimensionProvider.applyNewColumns(beforeSetEvent.detail.columns, this.disableVirtualX, init);
|
|
2023
|
+
this.dimensionProvider.applyNewColumns(beforeSetEvent.detail.columns, this.disableVirtualX, init, this.virtualX);
|
|
2010
2024
|
const beforeApplyEvent = this.beforecolumnapplied.emit(columnGather);
|
|
2011
2025
|
if (beforeApplyEvent.defaultPrevented) {
|
|
2012
2026
|
return;
|
|
@@ -2082,12 +2096,18 @@ const RevoGridComponent = class {
|
|
|
2082
2096
|
};
|
|
2083
2097
|
this.viewport.setFocus(colType, pending.rowType, cell, cell);
|
|
2084
2098
|
}
|
|
2085
|
-
|
|
2099
|
+
refreshColumnsOnConfigChange(newVal, prevVal) {
|
|
2086
2100
|
if (newVal === prevVal) {
|
|
2087
2101
|
return;
|
|
2088
2102
|
}
|
|
2089
2103
|
this.columnChanged(this.columns);
|
|
2090
2104
|
}
|
|
2105
|
+
disableVirtualXChanged(newVal = false, prevVal = false) {
|
|
2106
|
+
this.refreshColumnsOnConfigChange(newVal, prevVal);
|
|
2107
|
+
}
|
|
2108
|
+
virtualXChanged(newVal = ['rgCol'], prevVal = ['rgCol']) {
|
|
2109
|
+
this.refreshColumnsOnConfigChange(newVal, prevVal);
|
|
2110
|
+
}
|
|
2091
2111
|
rowSizeChanged(s) {
|
|
2092
2112
|
if (!this.dimensionProvider) {
|
|
2093
2113
|
return;
|
|
@@ -2413,6 +2433,7 @@ const RevoGridComponent = class {
|
|
|
2413
2433
|
selectionStoreConnector: this.selectionStoreConnector,
|
|
2414
2434
|
noHorizontalScrollTransfer: this.noHorizontalScrollTransfer,
|
|
2415
2435
|
disableVirtualX: this.disableVirtualX,
|
|
2436
|
+
virtualX: this.virtualX,
|
|
2416
2437
|
disableVirtualY: this.disableVirtualY,
|
|
2417
2438
|
resize: c => this.aftercolumnresize.emit(c),
|
|
2418
2439
|
}, contentHeight);
|
|
@@ -2487,6 +2508,9 @@ const RevoGridComponent = class {
|
|
|
2487
2508
|
"disableVirtualX": [{
|
|
2488
2509
|
"disableVirtualXChanged": 0
|
|
2489
2510
|
}],
|
|
2511
|
+
"virtualX": [{
|
|
2512
|
+
"virtualXChanged": 0
|
|
2513
|
+
}],
|
|
2490
2514
|
"rowSize": [{
|
|
2491
2515
|
"rowSizeChanged": 0
|
|
2492
2516
|
}],
|
package/dist/esm/revo-grid.js
CHANGED
|
@@ -48,5 +48,5 @@ var patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
48
48
|
|
|
49
49
|
patchBrowser().then(async (options) => {
|
|
50
50
|
await globalScripts();
|
|
51
|
-
return bootstrapLazy([["revo-grid",[[260,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"applyOnClose":[4,"apply-on-close"],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"sorting":[16],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[16],"disableVirtualX":[4,"disable-virtual-x"],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"rtl":[4],"canDrag":[4,"can-drag"],"refresh":[64],"setDataAt":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"setCellsFocus":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getContentSize":[64],"getSelectedRange":[64],"refreshExtraElements":[64],"getProviders":[64]},[[5,"touchstart","mousedownHandle"],[5,"mousedown","mousedownHandle"],[5,"touchend","mouseupHandle"],[5,"mouseup","mouseupHandle"],[0,"rowdragstartinit","onRowDragStarted"],[0,"rowdragendinit","onRowDragEnd"],[0,"roworderchange","onRowOrderChange"],[0,"rowdragmoveinit","onRowDrag"],[0,"rowdragmousemove","onRowMouseMove"],[0,"celleditapply","onCellEdit"],[0,"rangeeditapply","onRangeEdit"],[0,"selectionchangeinit","onRangeChanged"],[0,"rowdropinit","onRowDropped"],[0,"beforeheaderclick","onHeaderClick"],[0,"beforecellfocusinit","onCellFocus"]],{"columnTypes":[{"columnTypesChanged":0}],"columns":[{"columnChanged":0}],"disableVirtualX":[{"disableVirtualXChanged":0}],"rowSize":[{"rowSizeChanged":0}],"theme":[{"themeChanged":0}],"source":[{"dataSourceChanged":0}],"pinnedBottomSource":[{"dataSourceChanged":0}],"pinnedTopSource":[{"dataSourceChanged":0}],"disableVirtualY":[{"disableVirtualYChanged":0}],"rowDefinitions":[{"rowDefChanged":0}],"trimmedRows":[{"trimmedRowsChanged":0}],"grouping":[{"groupingChanged":0}],"stretch":[{"applyStretch":0}],"filter":[{"applyFilter":0}],"sorting":[{"applySorting":0}],"rowHeaders":[{"rowHeadersChange":0}],"registerVNode":[{"registerOutsideVNodes":0}],"additionalData":[{"additionalDataChanged":0}],"rtl":[{"rtlChanged":0}],"plugins":[{"pluginsChanged":0}]}]]],["revogr-filter-panel",[[260,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"closeOnOutsideClick":[4,"close-on-outside-click"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"draggedFilterId":[32],"dragOverFilterId":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revogr-clipboard_3",[[0,"revogr-clipboard",{"readonly":[4],"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"],[4,"cut","cutStarted"]]],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16],"saveOnClose":[4,"save-on-close"],"additionalData":[8,"additional-data"],"cancelChanges":[64],"beforeDisconnect":[64]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"rowType":[1,"row-type"],"dragStart":[64],"endOrder":[64],"clearOrder":[64]}]]],["revogr-data_4",[[260,"revogr-data",{"readonly":[4],"range":[4],"rowClass":[1,"row-class"],"additionalData":[8,"additional-data"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16],"type":[513],"colType":[513,"col-type"],"jobsBeforeRender":[16],"providers":[32],"updateCell":[64]},null,{"dataStore":[{"onDataStoreChange":0}],"colData":[{"onColDataChange":0}]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"groups":[16],"groupingDepth":[2,"grouping-depth"],"readonly":[4],"canResize":[4,"can-resize"],"resizeHandler":[16],"colData":[16],"columnFilter":[4,"column-filter"],"type":[1],"additionalData":[8,"additional-data"]}],[260,"revogr-viewport-scroll",{"rowHeader":[4,"row-header"],"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"colType":[1,"col-type"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"setScroll":[64],"changeScroll":[64],"applyScroll":[64]},[[0,"mousewheel-vertical","mousewheelVertical"],[0,"mousewheel-horizontal","mousewheelHorizontal"],[0,"scroll-coordinate","scrollApply"]]],[0,"vnode-html",{"redraw":[16]}]]],["revogr-attribution_7",[[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"rowClass":[1,"row-class"],"resize":[4],"rowHeaderColumn":[16],"additionalData":[8,"additional-data"],"jobsBeforeRender":[16]}],[260,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16],"applyChangesOnClose":[4,"apply-changes-on-close"],"additionalData":[8,"additional-data"],"isMobileDevice":[4,"is-mobile-device"]},[[5,"touchmove","onMouseMove"],[5,"mousemove","onMouseMove"],[5,"touchend","onMouseUp"],[5,"mouseup","onMouseUp"],[5,"mouseleave","onMouseUp"],[0,"dragstartcell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]],{"selectionStore":[{"selectionServiceSet":0}],"dimensionRow":[{"createAutoFillService":0}],"dimensionCol":[{"createAutoFillService":0}],"dataStore":[{"columnServiceSet":0}],"colData":[{"columnServiceSet":0}]}],[0,"revogr-attribution"],[260,"revogr-focus",{"colType":[1,"col-type"],"rowType":[1,"row-type"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"focusTemplate":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"realSize":[2,"real-size"],"virtualSize":[2,"virtual-size"],"clientSize":[2,"client-size"],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-extra",{"nodes":[16],"update":[32],"refresh":[64]}]]]], options);
|
|
51
|
+
return bootstrapLazy([["revo-grid",[[260,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"applyOnClose":[4,"apply-on-close"],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"sorting":[16],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[16],"disableVirtualX":[4,"disable-virtual-x"],"virtualX":[16],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"rtl":[4],"canDrag":[4,"can-drag"],"refresh":[64],"setDataAt":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"setCellsFocus":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getContentSize":[64],"getSelectedRange":[64],"refreshExtraElements":[64],"getProviders":[64]},[[5,"touchstart","mousedownHandle"],[5,"mousedown","mousedownHandle"],[5,"touchend","mouseupHandle"],[5,"mouseup","mouseupHandle"],[0,"rowdragstartinit","onRowDragStarted"],[0,"rowdragendinit","onRowDragEnd"],[0,"roworderchange","onRowOrderChange"],[0,"rowdragmoveinit","onRowDrag"],[0,"rowdragmousemove","onRowMouseMove"],[0,"celleditapply","onCellEdit"],[0,"rangeeditapply","onRangeEdit"],[0,"selectionchangeinit","onRangeChanged"],[0,"rowdropinit","onRowDropped"],[0,"beforeheaderclick","onHeaderClick"],[0,"beforecellfocusinit","onCellFocus"]],{"columnTypes":[{"columnTypesChanged":0}],"columns":[{"columnChanged":0}],"disableVirtualX":[{"disableVirtualXChanged":0}],"virtualX":[{"virtualXChanged":0}],"rowSize":[{"rowSizeChanged":0}],"theme":[{"themeChanged":0}],"source":[{"dataSourceChanged":0}],"pinnedBottomSource":[{"dataSourceChanged":0}],"pinnedTopSource":[{"dataSourceChanged":0}],"disableVirtualY":[{"disableVirtualYChanged":0}],"rowDefinitions":[{"rowDefChanged":0}],"trimmedRows":[{"trimmedRowsChanged":0}],"grouping":[{"groupingChanged":0}],"stretch":[{"applyStretch":0}],"filter":[{"applyFilter":0}],"sorting":[{"applySorting":0}],"rowHeaders":[{"rowHeadersChange":0}],"registerVNode":[{"registerOutsideVNodes":0}],"additionalData":[{"additionalDataChanged":0}],"rtl":[{"rtlChanged":0}],"plugins":[{"pluginsChanged":0}]}]]],["revogr-filter-panel",[[260,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"closeOnOutsideClick":[4,"close-on-outside-click"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"draggedFilterId":[32],"dragOverFilterId":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revogr-clipboard_3",[[0,"revogr-clipboard",{"readonly":[4],"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"],[4,"cut","cutStarted"]]],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16],"saveOnClose":[4,"save-on-close"],"additionalData":[8,"additional-data"],"cancelChanges":[64],"beforeDisconnect":[64]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"rowType":[1,"row-type"],"dragStart":[64],"endOrder":[64],"clearOrder":[64]}]]],["revogr-data_4",[[260,"revogr-data",{"readonly":[4],"range":[4],"rowClass":[1,"row-class"],"additionalData":[8,"additional-data"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16],"type":[513],"colType":[513,"col-type"],"jobsBeforeRender":[16],"providers":[32],"updateCell":[64]},null,{"dataStore":[{"onDataStoreChange":0}],"colData":[{"onColDataChange":0}]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"groups":[16],"groupingDepth":[2,"grouping-depth"],"readonly":[4],"canResize":[4,"can-resize"],"resizeHandler":[16],"colData":[16],"columnFilter":[4,"column-filter"],"type":[1],"additionalData":[8,"additional-data"]}],[260,"revogr-viewport-scroll",{"rowHeader":[4,"row-header"],"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"colType":[1,"col-type"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"setScroll":[64],"changeScroll":[64],"applyScroll":[64]},[[0,"mousewheel-vertical","mousewheelVertical"],[0,"mousewheel-horizontal","mousewheelHorizontal"],[0,"scroll-coordinate","scrollApply"]]],[0,"vnode-html",{"redraw":[16]}]]],["revogr-attribution_7",[[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"rowClass":[1,"row-class"],"resize":[4],"rowHeaderColumn":[16],"additionalData":[8,"additional-data"],"jobsBeforeRender":[16]}],[260,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16],"applyChangesOnClose":[4,"apply-changes-on-close"],"additionalData":[8,"additional-data"],"isMobileDevice":[4,"is-mobile-device"]},[[5,"touchmove","onMouseMove"],[5,"mousemove","onMouseMove"],[5,"touchend","onMouseUp"],[5,"mouseup","onMouseUp"],[5,"mouseleave","onMouseUp"],[0,"dragstartcell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]],{"selectionStore":[{"selectionServiceSet":0}],"dimensionRow":[{"createAutoFillService":0}],"dimensionCol":[{"createAutoFillService":0}],"dataStore":[{"columnServiceSet":0}],"colData":[{"columnServiceSet":0}]}],[0,"revogr-attribution"],[260,"revogr-focus",{"colType":[1,"col-type"],"rowType":[1,"row-type"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"focusTemplate":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"realSize":[2,"real-size"],"virtualSize":[2,"virtual-size"],"clientSize":[2,"client-size"],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-extra",{"nodes":[16],"update":[32],"refresh":[64]}]]]], options);
|
|
52
52
|
});
|
|
@@ -350,7 +350,7 @@ class BasePlugin {
|
|
|
350
350
|
},
|
|
351
351
|
});
|
|
352
352
|
if (immediate) {
|
|
353
|
-
callback(nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
353
|
+
callback((nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.get) ? nativeValueDesc.get.call(this.revogrid) : nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
/**
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
4
|
export { o as GROUPING_ROW_TYPE, j as GROUP_COLUMN_PROP, G as GROUP_DEPTH, h as GROUP_EXPANDED, l as GROUP_EXPAND_BTN, m as GROUP_EXPAND_EVENT, k as GROUP_ORIGINAL_INDEX, f as PSEUDO_GROUP_COLUMN, P as PSEUDO_GROUP_ITEM, d as PSEUDO_GROUP_ITEM_ID, e as PSEUDO_GROUP_ITEM_VALUE, c as columnTypes, a as cropCellToMax, H as gatherGroup, s as gatherGrouping, z as getCellData, B as getCellDataParsed, A as getCellRaw, I as getColumnByProp, D as getColumnSizes, C as getColumnType, F as getColumns, q as getExpanded, t as getGroupingName, x as getParsedGroup, g as getRange, p as getSource, E as isColGrouping, u as isGrouping, v as isGroupingColumn, b as isRangeSingleCell, i as isRowType, y as isSameGroup, w as measureEqualDepth, n as nextCell, r as rowTypes } from './column.service-C6hByxPy.js';
|
|
5
|
-
import { B as BasePlugin } from './column.drag.plugin-
|
|
6
|
-
export { A as AutoSizeColumnPlugin, n as BEFORE_COLUMN_DRAG_END_EVENT, m as COLUMN_DRAG_END_EVENT, l as COLUMN_DRAG_MOVE_EVENT, o as COLUMN_DRAG_START_EVENT, C as ColumnAutoSizeMode, p as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, d as FILTE_PANEL, e as FilterPlugin, G as GroupingRowPlugin, S as SelectionStore, s as SortingPlugin, a as StretchColumn, w as defaultCellCompare, x as descCellCompare, j as doCollapse, k as doExpand, f as filterCoreFunctionsIndexedByType, h as filterNames, g as filterTypes, r as getColumnDragPosition, z as getComparer, q as getLeftRelative, y as getNextOrder, u as getSortingIndex, t as hasActiveSorting, i as isStretchPlugin, v as sortIndexByItems } from './column.drag.plugin-
|
|
5
|
+
import { B as BasePlugin } from './column.drag.plugin-DKkf7Zqb.js';
|
|
6
|
+
export { A as AutoSizeColumnPlugin, n as BEFORE_COLUMN_DRAG_END_EVENT, m as COLUMN_DRAG_END_EVENT, l as COLUMN_DRAG_MOVE_EVENT, o as COLUMN_DRAG_START_EVENT, C as ColumnAutoSizeMode, p as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, d as FILTE_PANEL, e as FilterPlugin, G as GroupingRowPlugin, S as SelectionStore, s as SortingPlugin, a as StretchColumn, w as defaultCellCompare, x as descCellCompare, j as doCollapse, k as doExpand, f as filterCoreFunctionsIndexedByType, h as filterNames, g as filterTypes, r as getColumnDragPosition, z as getComparer, q as getLeftRelative, y as getNextOrder, u as getSortingIndex, t as hasActiveSorting, i as isStretchPlugin, v as sortIndexByItems } from './column.drag.plugin-DKkf7Zqb.js';
|
|
7
7
|
export { d as dispatch, a as dispatchByEvent } from './header-cell-renderer-BMmXRsd_.js';
|
|
8
8
|
export { C as CellRenderer, G as GroupingRowRenderer, S as SortingSign, e as expandEvent, a as expandSvgIconVNode } from './cell-renderer-CLTRlCa5.js';
|
|
9
9
|
export { a as applyMixins, f as findPositionInArray, g as getScrollbarSize, m as mergeSortedArray, p as pushSorted, r as range, s as scaleValue, t as timeout } from './index-Db3qZoW5.js';
|
|
@@ -6,7 +6,7 @@ import { c as columnTypes, J as reduce, C as getColumnType, r as rowTypes, i as
|
|
|
6
6
|
import { D as DataStore, b as getSourceItem, f as getSourceItemVirtualIndexByProp, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, a as getVisibleSourceItem, h as gatherTrimmedItems, k as getItemByIndex, R as RESIZE_INTERVAL } from './dimension.helpers-CGKwSvw6.js';
|
|
7
7
|
import { d as debounce } from './debounce-PCRWZliA.js';
|
|
8
8
|
import { g as getScrollDimension, v as viewportDataPartition, F as FOOTER_SLOT, C as CONTENT_SLOT, H as HEADER_SLOT, D as DATA_SLOT } from './viewport.helpers-CoCAvmZs.js';
|
|
9
|
-
import { D as DimensionStore, S as SelectionStore, B as BasePlugin, G as GroupingRowPlugin, a as StretchColumn, i as isStretchPlugin, A as AutoSizeColumnPlugin, e as FilterPlugin, E as ExportFilePlugin, s as SortingPlugin, p as ColumnMovePlugin } from './column.drag.plugin-
|
|
9
|
+
import { D as DimensionStore, S as SelectionStore, B as BasePlugin, G as GroupingRowPlugin, a as StretchColumn, i as isStretchPlugin, A as AutoSizeColumnPlugin, e as FilterPlugin, E as ExportFilePlugin, s as SortingPlugin, p as ColumnMovePlugin } from './column.drag.plugin-DKkf7Zqb.js';
|
|
10
10
|
import { V as ViewportStore } from './viewport.store-_c579YyM.js';
|
|
11
11
|
import { T as ThemeService } from './theme.service-BmnDvr6P.js';
|
|
12
12
|
import { t as timeout } from './index-Db3qZoW5.js';
|
|
@@ -230,6 +230,10 @@ class DataProvider {
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
const DEFAULT_VIRTUAL_X = ['rgCol'];
|
|
234
|
+
function isVirtualXDimension(type, disableVirtualX = false, virtualX = DEFAULT_VIRTUAL_X) {
|
|
235
|
+
return !disableVirtualX && virtualX.includes(type);
|
|
236
|
+
}
|
|
233
237
|
/**
|
|
234
238
|
* Dimension provider
|
|
235
239
|
* Stores dimension information and custom sizes
|
|
@@ -240,7 +244,7 @@ class DimensionProvider {
|
|
|
240
244
|
constructor(viewports, config) {
|
|
241
245
|
this.viewports = viewports;
|
|
242
246
|
const sizeChanged = debounce((k) => config.realSizeChanged(k), RESIZE_INTERVAL);
|
|
243
|
-
this.stores =
|
|
247
|
+
this.stores = [...rowTypes, ...columnTypes].reduce((sources, t) => {
|
|
244
248
|
sources[t] = new DimensionStore(t);
|
|
245
249
|
sources[t].store.onChange('realSize', () => sizeChanged(t));
|
|
246
250
|
return sources;
|
|
@@ -316,8 +320,9 @@ class DimensionProvider {
|
|
|
316
320
|
* Applies new columns to the dimension provider
|
|
317
321
|
* @param columns - new columns data
|
|
318
322
|
* @param disableVirtualX - disable virtual data for X axis
|
|
323
|
+
* @param virtualX - column dimensions that should use virtual data
|
|
319
324
|
*/
|
|
320
|
-
applyNewColumns(columns, disableVirtualX, keepOld = false) {
|
|
325
|
+
applyNewColumns(columns, disableVirtualX, keepOld = false, virtualX = DEFAULT_VIRTUAL_X) {
|
|
321
326
|
// Apply new columns to dimension provider
|
|
322
327
|
for (let type of columnTypes) {
|
|
323
328
|
if (!keepOld) {
|
|
@@ -327,7 +332,7 @@ class DimensionProvider {
|
|
|
327
332
|
// Get the new columns for the current type
|
|
328
333
|
const items = columns[type];
|
|
329
334
|
// Determine if virtual data should be disabled for the current type
|
|
330
|
-
const noVirtual = type
|
|
335
|
+
const noVirtual = !isVirtualXDimension(type, disableVirtualX, virtualX);
|
|
331
336
|
// Set the items count in the dimension provider
|
|
332
337
|
this.stores[type].setStore({ count: items.length });
|
|
333
338
|
// Set the custom sizes for the columns
|
|
@@ -433,6 +438,9 @@ class ViewportProvider {
|
|
|
433
438
|
}
|
|
434
439
|
}
|
|
435
440
|
|
|
441
|
+
function getViewportResizeDimension(colType, dimension) {
|
|
442
|
+
return dimension === 'rgCol' ? colType : dimension;
|
|
443
|
+
}
|
|
436
444
|
/** Collect Column data */
|
|
437
445
|
function gatherColumnData(data) {
|
|
438
446
|
const colDimension = data.dimensions[data.colType].store;
|
|
@@ -492,20 +500,20 @@ class ViewportService {
|
|
|
492
500
|
colStore,
|
|
493
501
|
onHeaderresize: e => this.onColumnResize(val, e, colStore),
|
|
494
502
|
};
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
clientSize: e.detail.size,
|
|
500
|
-
};
|
|
501
|
-
// virtual size will be handled by dimension provider if disabled
|
|
502
|
-
if ((e.detail.dimension === 'rgRow' && !config.disableVirtualY)
|
|
503
|
-
|| (e.detail.dimension === 'rgCol' && !config.disableVirtualX)) {
|
|
504
|
-
vpState.virtualSize = e.detail.size;
|
|
505
|
-
}
|
|
506
|
-
(_a = config.viewportProvider) === null || _a === void 0 ? void 0 : _a.setViewport(e.detail.dimension, vpState);
|
|
503
|
+
column.onResizeviewport = (e) => {
|
|
504
|
+
var _a;
|
|
505
|
+
const vpState = {
|
|
506
|
+
clientSize: e.detail.size,
|
|
507
507
|
};
|
|
508
|
-
|
|
508
|
+
const dimension = getViewportResizeDimension(val, e.detail.dimension);
|
|
509
|
+
const isVirtualColumn = columnTypes.includes(dimension)
|
|
510
|
+
&& isVirtualXDimension(dimension, config.disableVirtualX, config.virtualX);
|
|
511
|
+
// Keep virtual dimensions in sync with their viewport size.
|
|
512
|
+
if ((dimension === 'rgRow' && !config.disableVirtualY) || isVirtualColumn) {
|
|
513
|
+
vpState.virtualSize = e.detail.size;
|
|
514
|
+
}
|
|
515
|
+
(_a = config.viewportProvider) === null || _a === void 0 ? void 0 : _a.setViewport(dimension, vpState);
|
|
516
|
+
};
|
|
509
517
|
const colData = gatherColumnData(column);
|
|
510
518
|
const columnSelectionStore = this.registerCol(colData.position.x, val);
|
|
511
519
|
// render per each column data collections vertically
|
|
@@ -1555,6 +1563,12 @@ const RevoGridComponent = class {
|
|
|
1555
1563
|
* Can be used for initial rendering performance improvement.
|
|
1556
1564
|
*/
|
|
1557
1565
|
this.disableVirtualX = false;
|
|
1566
|
+
/**
|
|
1567
|
+
* Column dimensions that use X axis virtual rendering.
|
|
1568
|
+
* Defaults to regular columns only to preserve pinned column behavior.
|
|
1569
|
+
* Set to `['rgCol', 'colPinStart', 'colPinEnd']` to virtualize all column areas.
|
|
1570
|
+
*/
|
|
1571
|
+
this.virtualX = ['rgCol'];
|
|
1558
1572
|
/**
|
|
1559
1573
|
* Disable lazy rendering mode for the `Y axis`.
|
|
1560
1574
|
* Use when not many rows present and you don't need rerenader cells during scroll.
|
|
@@ -2006,7 +2020,7 @@ const RevoGridComponent = class {
|
|
|
2006
2020
|
if (beforeSetEvent.defaultPrevented) {
|
|
2007
2021
|
return;
|
|
2008
2022
|
}
|
|
2009
|
-
this.dimensionProvider.applyNewColumns(beforeSetEvent.detail.columns, this.disableVirtualX, init);
|
|
2023
|
+
this.dimensionProvider.applyNewColumns(beforeSetEvent.detail.columns, this.disableVirtualX, init, this.virtualX);
|
|
2010
2024
|
const beforeApplyEvent = this.beforecolumnapplied.emit(columnGather);
|
|
2011
2025
|
if (beforeApplyEvent.defaultPrevented) {
|
|
2012
2026
|
return;
|
|
@@ -2082,12 +2096,18 @@ const RevoGridComponent = class {
|
|
|
2082
2096
|
};
|
|
2083
2097
|
this.viewport.setFocus(colType, pending.rowType, cell, cell);
|
|
2084
2098
|
}
|
|
2085
|
-
|
|
2099
|
+
refreshColumnsOnConfigChange(newVal, prevVal) {
|
|
2086
2100
|
if (newVal === prevVal) {
|
|
2087
2101
|
return;
|
|
2088
2102
|
}
|
|
2089
2103
|
this.columnChanged(this.columns);
|
|
2090
2104
|
}
|
|
2105
|
+
disableVirtualXChanged(newVal = false, prevVal = false) {
|
|
2106
|
+
this.refreshColumnsOnConfigChange(newVal, prevVal);
|
|
2107
|
+
}
|
|
2108
|
+
virtualXChanged(newVal = ['rgCol'], prevVal = ['rgCol']) {
|
|
2109
|
+
this.refreshColumnsOnConfigChange(newVal, prevVal);
|
|
2110
|
+
}
|
|
2091
2111
|
rowSizeChanged(s) {
|
|
2092
2112
|
if (!this.dimensionProvider) {
|
|
2093
2113
|
return;
|
|
@@ -2413,6 +2433,7 @@ const RevoGridComponent = class {
|
|
|
2413
2433
|
selectionStoreConnector: this.selectionStoreConnector,
|
|
2414
2434
|
noHorizontalScrollTransfer: this.noHorizontalScrollTransfer,
|
|
2415
2435
|
disableVirtualX: this.disableVirtualX,
|
|
2436
|
+
virtualX: this.virtualX,
|
|
2416
2437
|
disableVirtualY: this.disableVirtualY,
|
|
2417
2438
|
resize: c => this.aftercolumnresize.emit(c),
|
|
2418
2439
|
}, contentHeight);
|
|
@@ -2487,6 +2508,9 @@ const RevoGridComponent = class {
|
|
|
2487
2508
|
"disableVirtualX": [{
|
|
2488
2509
|
"disableVirtualXChanged": 0
|
|
2489
2510
|
}],
|
|
2511
|
+
"virtualX": [{
|
|
2512
|
+
"virtualXChanged": 0
|
|
2513
|
+
}],
|
|
2490
2514
|
"rowSize": [{
|
|
2491
2515
|
"rowSizeChanged": 0
|
|
2492
2516
|
}],
|
|
@@ -48,5 +48,5 @@ var patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
48
48
|
|
|
49
49
|
patchBrowser().then(async (options) => {
|
|
50
50
|
await globalScripts();
|
|
51
|
-
return bootstrapLazy([["revo-grid",[[260,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"applyOnClose":[4,"apply-on-close"],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"sorting":[16],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[16],"disableVirtualX":[4,"disable-virtual-x"],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"rtl":[4],"canDrag":[4,"can-drag"],"refresh":[64],"setDataAt":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"setCellsFocus":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getContentSize":[64],"getSelectedRange":[64],"refreshExtraElements":[64],"getProviders":[64]},[[5,"touchstart","mousedownHandle"],[5,"mousedown","mousedownHandle"],[5,"touchend","mouseupHandle"],[5,"mouseup","mouseupHandle"],[0,"rowdragstartinit","onRowDragStarted"],[0,"rowdragendinit","onRowDragEnd"],[0,"roworderchange","onRowOrderChange"],[0,"rowdragmoveinit","onRowDrag"],[0,"rowdragmousemove","onRowMouseMove"],[0,"celleditapply","onCellEdit"],[0,"rangeeditapply","onRangeEdit"],[0,"selectionchangeinit","onRangeChanged"],[0,"rowdropinit","onRowDropped"],[0,"beforeheaderclick","onHeaderClick"],[0,"beforecellfocusinit","onCellFocus"]],{"columnTypes":[{"columnTypesChanged":0}],"columns":[{"columnChanged":0}],"disableVirtualX":[{"disableVirtualXChanged":0}],"rowSize":[{"rowSizeChanged":0}],"theme":[{"themeChanged":0}],"source":[{"dataSourceChanged":0}],"pinnedBottomSource":[{"dataSourceChanged":0}],"pinnedTopSource":[{"dataSourceChanged":0}],"disableVirtualY":[{"disableVirtualYChanged":0}],"rowDefinitions":[{"rowDefChanged":0}],"trimmedRows":[{"trimmedRowsChanged":0}],"grouping":[{"groupingChanged":0}],"stretch":[{"applyStretch":0}],"filter":[{"applyFilter":0}],"sorting":[{"applySorting":0}],"rowHeaders":[{"rowHeadersChange":0}],"registerVNode":[{"registerOutsideVNodes":0}],"additionalData":[{"additionalDataChanged":0}],"rtl":[{"rtlChanged":0}],"plugins":[{"pluginsChanged":0}]}]]],["revogr-filter-panel",[[260,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"closeOnOutsideClick":[4,"close-on-outside-click"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"draggedFilterId":[32],"dragOverFilterId":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revogr-clipboard_3",[[0,"revogr-clipboard",{"readonly":[4],"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"],[4,"cut","cutStarted"]]],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16],"saveOnClose":[4,"save-on-close"],"additionalData":[8,"additional-data"],"cancelChanges":[64],"beforeDisconnect":[64]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"rowType":[1,"row-type"],"dragStart":[64],"endOrder":[64],"clearOrder":[64]}]]],["revogr-data_4",[[260,"revogr-data",{"readonly":[4],"range":[4],"rowClass":[1,"row-class"],"additionalData":[8,"additional-data"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16],"type":[513],"colType":[513,"col-type"],"jobsBeforeRender":[16],"providers":[32],"updateCell":[64]},null,{"dataStore":[{"onDataStoreChange":0}],"colData":[{"onColDataChange":0}]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"groups":[16],"groupingDepth":[2,"grouping-depth"],"readonly":[4],"canResize":[4,"can-resize"],"resizeHandler":[16],"colData":[16],"columnFilter":[4,"column-filter"],"type":[1],"additionalData":[8,"additional-data"]}],[260,"revogr-viewport-scroll",{"rowHeader":[4,"row-header"],"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"colType":[1,"col-type"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"setScroll":[64],"changeScroll":[64],"applyScroll":[64]},[[0,"mousewheel-vertical","mousewheelVertical"],[0,"mousewheel-horizontal","mousewheelHorizontal"],[0,"scroll-coordinate","scrollApply"]]],[0,"vnode-html",{"redraw":[16]}]]],["revogr-attribution_7",[[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"rowClass":[1,"row-class"],"resize":[4],"rowHeaderColumn":[16],"additionalData":[8,"additional-data"],"jobsBeforeRender":[16]}],[260,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16],"applyChangesOnClose":[4,"apply-changes-on-close"],"additionalData":[8,"additional-data"],"isMobileDevice":[4,"is-mobile-device"]},[[5,"touchmove","onMouseMove"],[5,"mousemove","onMouseMove"],[5,"touchend","onMouseUp"],[5,"mouseup","onMouseUp"],[5,"mouseleave","onMouseUp"],[0,"dragstartcell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]],{"selectionStore":[{"selectionServiceSet":0}],"dimensionRow":[{"createAutoFillService":0}],"dimensionCol":[{"createAutoFillService":0}],"dataStore":[{"columnServiceSet":0}],"colData":[{"columnServiceSet":0}]}],[0,"revogr-attribution"],[260,"revogr-focus",{"colType":[1,"col-type"],"rowType":[1,"row-type"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"focusTemplate":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"realSize":[2,"real-size"],"virtualSize":[2,"virtual-size"],"clientSize":[2,"client-size"],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-extra",{"nodes":[16],"update":[32],"refresh":[64]}]]]], options);
|
|
51
|
+
return bootstrapLazy([["revo-grid",[[260,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"applyOnClose":[4,"apply-on-close"],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"sorting":[16],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[16],"disableVirtualX":[4,"disable-virtual-x"],"virtualX":[16],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"rtl":[4],"canDrag":[4,"can-drag"],"refresh":[64],"setDataAt":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"setCellsFocus":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getContentSize":[64],"getSelectedRange":[64],"refreshExtraElements":[64],"getProviders":[64]},[[5,"touchstart","mousedownHandle"],[5,"mousedown","mousedownHandle"],[5,"touchend","mouseupHandle"],[5,"mouseup","mouseupHandle"],[0,"rowdragstartinit","onRowDragStarted"],[0,"rowdragendinit","onRowDragEnd"],[0,"roworderchange","onRowOrderChange"],[0,"rowdragmoveinit","onRowDrag"],[0,"rowdragmousemove","onRowMouseMove"],[0,"celleditapply","onCellEdit"],[0,"rangeeditapply","onRangeEdit"],[0,"selectionchangeinit","onRangeChanged"],[0,"rowdropinit","onRowDropped"],[0,"beforeheaderclick","onHeaderClick"],[0,"beforecellfocusinit","onCellFocus"]],{"columnTypes":[{"columnTypesChanged":0}],"columns":[{"columnChanged":0}],"disableVirtualX":[{"disableVirtualXChanged":0}],"virtualX":[{"virtualXChanged":0}],"rowSize":[{"rowSizeChanged":0}],"theme":[{"themeChanged":0}],"source":[{"dataSourceChanged":0}],"pinnedBottomSource":[{"dataSourceChanged":0}],"pinnedTopSource":[{"dataSourceChanged":0}],"disableVirtualY":[{"disableVirtualYChanged":0}],"rowDefinitions":[{"rowDefChanged":0}],"trimmedRows":[{"trimmedRowsChanged":0}],"grouping":[{"groupingChanged":0}],"stretch":[{"applyStretch":0}],"filter":[{"applyFilter":0}],"sorting":[{"applySorting":0}],"rowHeaders":[{"rowHeadersChange":0}],"registerVNode":[{"registerOutsideVNodes":0}],"additionalData":[{"additionalDataChanged":0}],"rtl":[{"rtlChanged":0}],"plugins":[{"pluginsChanged":0}]}]]],["revogr-filter-panel",[[260,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"closeOnOutsideClick":[4,"close-on-outside-click"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"draggedFilterId":[32],"dragOverFilterId":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revogr-clipboard_3",[[0,"revogr-clipboard",{"readonly":[4],"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"],[4,"cut","cutStarted"]]],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16],"saveOnClose":[4,"save-on-close"],"additionalData":[8,"additional-data"],"cancelChanges":[64],"beforeDisconnect":[64]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"rowType":[1,"row-type"],"dragStart":[64],"endOrder":[64],"clearOrder":[64]}]]],["revogr-data_4",[[260,"revogr-data",{"readonly":[4],"range":[4],"rowClass":[1,"row-class"],"additionalData":[8,"additional-data"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16],"type":[513],"colType":[513,"col-type"],"jobsBeforeRender":[16],"providers":[32],"updateCell":[64]},null,{"dataStore":[{"onDataStoreChange":0}],"colData":[{"onColDataChange":0}]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"groups":[16],"groupingDepth":[2,"grouping-depth"],"readonly":[4],"canResize":[4,"can-resize"],"resizeHandler":[16],"colData":[16],"columnFilter":[4,"column-filter"],"type":[1],"additionalData":[8,"additional-data"]}],[260,"revogr-viewport-scroll",{"rowHeader":[4,"row-header"],"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"colType":[1,"col-type"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"setScroll":[64],"changeScroll":[64],"applyScroll":[64]},[[0,"mousewheel-vertical","mousewheelVertical"],[0,"mousewheel-horizontal","mousewheelHorizontal"],[0,"scroll-coordinate","scrollApply"]]],[0,"vnode-html",{"redraw":[16]}]]],["revogr-attribution_7",[[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"rowClass":[1,"row-class"],"resize":[4],"rowHeaderColumn":[16],"additionalData":[8,"additional-data"],"jobsBeforeRender":[16]}],[260,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16],"applyChangesOnClose":[4,"apply-changes-on-close"],"additionalData":[8,"additional-data"],"isMobileDevice":[4,"is-mobile-device"]},[[5,"touchmove","onMouseMove"],[5,"mousemove","onMouseMove"],[5,"touchend","onMouseUp"],[5,"mouseup","onMouseUp"],[5,"mouseleave","onMouseUp"],[0,"dragstartcell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]],{"selectionStore":[{"selectionServiceSet":0}],"dimensionRow":[{"createAutoFillService":0}],"dimensionCol":[{"createAutoFillService":0}],"dataStore":[{"columnServiceSet":0}],"colData":[{"columnServiceSet":0}]}],[0,"revogr-attribution"],[260,"revogr-focus",{"colType":[1,"col-type"],"rowType":[1,"row-type"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"focusTemplate":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"realSize":[2,"real-size"],"virtualSize":[2,"virtual-size"],"clientSize":[2,"client-size"],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-extra",{"nodes":[16],"update":[32],"refresh":[64]}]]]], options);
|
|
52
52
|
});
|
|
@@ -184,6 +184,12 @@ export declare class RevoGridComponent {
|
|
|
184
184
|
* Can be used for initial rendering performance improvement.
|
|
185
185
|
*/
|
|
186
186
|
disableVirtualX: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Column dimensions that use X axis virtual rendering.
|
|
189
|
+
* Defaults to regular columns only to preserve pinned column behavior.
|
|
190
|
+
* Set to `['rgCol', 'colPinStart', 'colPinEnd']` to virtualize all column areas.
|
|
191
|
+
*/
|
|
192
|
+
virtualX: DimensionCols[];
|
|
187
193
|
/**
|
|
188
194
|
* Disable lazy rendering mode for the `Y axis`.
|
|
189
195
|
* Use when not many rows present and you don't need rerenader cells during scroll.
|
|
@@ -646,7 +652,9 @@ export declare class RevoGridComponent {
|
|
|
646
652
|
* column to its new viewport and virtual index.
|
|
647
653
|
*/
|
|
648
654
|
private restoreColumnFocusAfterRender;
|
|
655
|
+
private refreshColumnsOnConfigChange;
|
|
649
656
|
disableVirtualXChanged(newVal?: boolean, prevVal?: boolean): void;
|
|
657
|
+
virtualXChanged(newVal?: DimensionCols[], prevVal?: DimensionCols[]): void;
|
|
650
658
|
rowSizeChanged(s: number): void;
|
|
651
659
|
themeChanged(t: Theme, _?: Theme, __?: string, init?: boolean): void;
|
|
652
660
|
dataSourceChanged<T extends DataType>(newVal: T[] | undefined, _: T[] | undefined, watchName: string): void;
|
|
@@ -5,7 +5,7 @@ import { OrdererService } from '../order/order-renderer';
|
|
|
5
5
|
import GridScrollingService from './viewport.scrolling.service';
|
|
6
6
|
import ColumnDataProvider from '../../services/column.data.provider';
|
|
7
7
|
import { DataProvider } from '../../services/data.provider';
|
|
8
|
-
import type { AllDimensionType, Cell, ColumnRegular, DimensionCols, DimensionRows, RangeArea, ViewportProps } from "../../types/index";
|
|
8
|
+
import type { AllDimensionType, Cell, ColumnRegular, DimensionCols, DimensionRows, RangeArea, ViewportProps, ViewPortResizeEvent } from "../../types/index";
|
|
9
9
|
export type ResizeDetails = {
|
|
10
10
|
[index: number]: ColumnRegular;
|
|
11
11
|
};
|
|
@@ -19,6 +19,7 @@ type Config = {
|
|
|
19
19
|
selectionStoreConnector: SelectionStoreConnector;
|
|
20
20
|
noHorizontalScrollTransfer?: boolean;
|
|
21
21
|
disableVirtualX?: boolean;
|
|
22
|
+
virtualX?: DimensionCols[];
|
|
22
23
|
disableVirtualY?: boolean;
|
|
23
24
|
resize(r: ResizeDetails): void;
|
|
24
25
|
};
|
|
@@ -29,6 +30,7 @@ export type FocusedData = {
|
|
|
29
30
|
rowType: DimensionRows;
|
|
30
31
|
column?: ColumnRegular;
|
|
31
32
|
};
|
|
33
|
+
export declare function getViewportResizeDimension(colType: DimensionCols, dimension: ViewPortResizeEvent['dimension']): "rgRow" | DimensionCols;
|
|
32
34
|
export default class ViewportService {
|
|
33
35
|
private config;
|
|
34
36
|
readonly columns: ViewportProps[];
|
|
@@ -348,6 +348,11 @@ export namespace Components {
|
|
|
348
348
|
* @default true
|
|
349
349
|
*/
|
|
350
350
|
"useClipboard": boolean | ClipboardConfig;
|
|
351
|
+
/**
|
|
352
|
+
* Column dimensions that use X axis virtual rendering. Defaults to regular columns only to preserve pinned column behavior. Set to `['rgCol', 'colPinStart', 'colPinEnd']` to virtualize all column areas.
|
|
353
|
+
* @default ['rgCol']
|
|
354
|
+
*/
|
|
355
|
+
"virtualX": DimensionCols[];
|
|
351
356
|
}
|
|
352
357
|
interface RevogrAttribution {
|
|
353
358
|
}
|
|
@@ -1767,6 +1772,11 @@ declare namespace LocalJSX {
|
|
|
1767
1772
|
* @default true
|
|
1768
1773
|
*/
|
|
1769
1774
|
"useClipboard"?: boolean | ClipboardConfig;
|
|
1775
|
+
/**
|
|
1776
|
+
* Column dimensions that use X axis virtual rendering. Defaults to regular columns only to preserve pinned column behavior. Set to `['rgCol', 'colPinStart', 'colPinEnd']` to virtualize all column areas.
|
|
1777
|
+
* @default ['rgCol']
|
|
1778
|
+
*/
|
|
1779
|
+
"virtualX"?: DimensionCols[];
|
|
1770
1780
|
}
|
|
1771
1781
|
interface RevogrAttribution {
|
|
1772
1782
|
}
|
|
@@ -4,6 +4,8 @@ import type { DimensionCols, DimensionType, MultiDimensionType, ColumnRegular, D
|
|
|
4
4
|
export type DimensionConfig = {
|
|
5
5
|
realSizeChanged(k: MultiDimensionType): void;
|
|
6
6
|
};
|
|
7
|
+
export declare const DEFAULT_VIRTUAL_X: readonly DimensionCols[];
|
|
8
|
+
export declare function isVirtualXDimension(type: DimensionCols, disableVirtualX?: boolean, virtualX?: readonly DimensionCols[]): boolean;
|
|
7
9
|
/**
|
|
8
10
|
* Dimension provider
|
|
9
11
|
* Stores dimension information and custom sizes
|
|
@@ -45,8 +47,9 @@ export default class DimensionProvider {
|
|
|
45
47
|
* Applies new columns to the dimension provider
|
|
46
48
|
* @param columns - new columns data
|
|
47
49
|
* @param disableVirtualX - disable virtual data for X axis
|
|
50
|
+
* @param virtualX - column dimensions that should use virtual data
|
|
48
51
|
*/
|
|
49
|
-
applyNewColumns(columns: Record<DimensionCols, ColumnRegular[]>, disableVirtualX: boolean, keepOld?: boolean): void;
|
|
52
|
+
applyNewColumns(columns: Record<DimensionCols, ColumnRegular[]>, disableVirtualX: boolean, keepOld?: boolean, virtualX?: readonly DimensionCols[]): void;
|
|
50
53
|
/**
|
|
51
54
|
* Gets the full size of the grid by summing up the sizes of all dimensions
|
|
52
55
|
* Goes through all dimensions columnTypes (x) and rowTypes (y) and sums up their sizes
|