@revolist/revogrid 4.26.2 → 4.27.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/dist/cjs/{cell-renderer-Cf2Pu4S0.js → cell-renderer-C7rdgaov.js} +3 -3
- package/dist/cjs/{column.service-C7p5eC5V.js → column.service-Bbml5C2j.js} +3 -3
- package/dist/cjs/{dimension.helpers-CgHhnN1d.js → dimension.helpers-CptesQOZ.js} +52 -8
- package/dist/cjs/{edit.utils-rAcGublN.js → edit.utils-CBAbQhGP.js} +1 -1
- package/dist/cjs/{header-cell-renderer-DHClfIto.js → header-cell-renderer-BljFI6wj.js} +1 -1
- package/dist/cjs/{index--FdNLz1Z.js → index-BVESmpqW.js} +1 -1
- package/dist/cjs/index.cjs.js +71 -55
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/revo-grid.cjs.entry.js +74 -49
- package/dist/cjs/revo-grid.cjs.js +1 -1
- package/dist/cjs/revogr-attribution_7.cjs.entry.js +51 -19
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js +4 -4
- package/dist/cjs/revogr-data_4.cjs.entry.js +21 -15
- package/dist/cjs/revogr-filter-panel.cjs.entry.js +9 -9
- package/dist/cjs/{column.drag.plugin-CK5HADlW.js → row-resize.plugin-BRQy_qNn.js} +573 -19
- package/dist/cjs/{text-editor-F04kTx53.js → text-editor-CJyQaYei.js} +2 -2
- package/dist/cjs/{throttle-fV6BUmM7.js → throttle-BsaP4fgu.js} +3 -3
- package/dist/cjs/{viewport.store-B4Clk4m9.js → viewport.store-mhsdi61t.js} +1 -1
- package/dist/collection/components/data/revogr-data-style.css +11 -0
- package/dist/collection/components/data/revogr-data.js +14 -8
- package/dist/collection/components/header/revogr-header-style.css +1 -0
- package/dist/collection/components/overlay/keyboard.service.js +33 -3
- package/dist/collection/components/overlay/revogr-overlay-selection.js +12 -10
- package/dist/collection/components/revoGrid/plugin.service.js +2 -2
- package/dist/collection/components/revoGrid/revo-grid.js +44 -10
- package/dist/collection/components/revoGrid/viewport.scrolling.service.js +24 -13
- package/dist/collection/components/revoGrid/viewport.service.js +1 -1
- package/dist/collection/plugins/filter/filter.constants.js +9 -0
- package/dist/collection/plugins/filter/filter.panel.js +8 -8
- package/dist/collection/plugins/filter/filter.plugin.js +109 -10
- package/dist/collection/plugins/filter/filter.style.css +2 -0
- package/dist/collection/plugins/groupingRow/grouping.row.plugin.js +9 -2
- package/dist/collection/plugins/groupingRow/grouping.row.renderer.js +1 -1
- package/dist/collection/plugins/groupingRow/grouping.service.js +1 -1
- package/dist/collection/plugins/index.js +1 -0
- package/dist/collection/plugins/row-resize/index.js +6 -0
- package/dist/collection/plugins/row-resize/row-resize.plugin.js +385 -0
- package/dist/collection/plugins/row-resize/row-resize.types.js +1 -0
- package/dist/collection/plugins/row-resize/row-resize.utils.js +55 -0
- package/dist/collection/serve/controller.js +1 -1
- package/dist/collection/services/data.provider.js +8 -2
- package/dist/collection/services/local.scroll.timer.js +3 -3
- package/dist/collection/services/selection.store.connector.js +4 -2
- package/dist/collection/store/dataSource/data.pending.plugin.js +21 -0
- package/dist/collection/store/dataSource/data.store.js +25 -3
- package/dist/collection/store/dataSource/trimmed.plugin.js +9 -6
- package/dist/collection/store/dimension/dimension.trim.plugin.js +1 -3
- package/dist/collection/types/events.js +4 -1
- package/dist/collection/utils/column.utils.js +1 -1
- package/dist/esm/{cell-renderer-11cf-lu3.js → cell-renderer-BFpmdV8H.js} +3 -3
- package/dist/esm/{column.service-Cfw3L0PN.js → column.service-CM-wgGs8.js} +3 -3
- package/dist/{revo-grid/dimension.helpers-fl4HSSK9.js → esm/dimension.helpers-Cln9sALu.js} +52 -9
- package/dist/{revo-grid/edit.utils-4e9fsqOR.js → esm/edit.utils-3ZbhQCv_.js} +1 -1
- package/dist/esm/{header-cell-renderer-Cqtg1ETB.js → header-cell-renderer-Bqh1PrgH.js} +1 -1
- package/dist/esm/{index-D24ku9ej.js → index-BvMNbQyq.js} +1 -1
- package/dist/esm/index.js +14 -11
- package/dist/esm/loader.js +1 -1
- package/dist/esm/revo-grid.entry.js +56 -31
- package/dist/esm/revo-grid.js +1 -1
- package/dist/esm/revogr-attribution_7.entry.js +51 -19
- package/dist/esm/revogr-clipboard_3.entry.js +4 -4
- package/dist/esm/revogr-data_4.entry.js +21 -15
- package/dist/esm/revogr-filter-panel.entry.js +9 -9
- package/dist/esm/{column.drag.plugin-DDBKeTGI.js → row-resize.plugin-BRiaHlHA.js} +562 -20
- package/dist/{revo-grid/text-editor-DlMnLkRK.js → esm/text-editor-eHtrwvxH.js} +2 -2
- package/dist/{revo-grid/throttle-Cpk1LoGk.js → esm/throttle-3rhqdcLy.js} +3 -3
- package/dist/{revo-grid/viewport.store-BSXmsiZc.js → esm/viewport.store-DWMKRDSH.js} +1 -1
- package/dist/revo-grid/{cell-renderer-11cf-lu3.js → cell-renderer-BFpmdV8H.js} +3 -3
- package/dist/revo-grid/{column.service-Cfw3L0PN.js → column.service-CM-wgGs8.js} +3 -3
- package/dist/{esm/dimension.helpers-fl4HSSK9.js → revo-grid/dimension.helpers-Cln9sALu.js} +52 -9
- package/dist/{esm/edit.utils-4e9fsqOR.js → revo-grid/edit.utils-3ZbhQCv_.js} +1 -1
- package/dist/revo-grid/{header-cell-renderer-Cqtg1ETB.js → header-cell-renderer-Bqh1PrgH.js} +1 -1
- package/dist/revo-grid/{index-D24ku9ej.js → index-BvMNbQyq.js} +1 -1
- package/dist/revo-grid/index.esm.js +14 -11
- package/dist/revo-grid/revo-grid.entry.js +56 -31
- package/dist/revo-grid/revo-grid.esm.js +1 -1
- package/dist/revo-grid/revogr-attribution_7.entry.js +51 -19
- package/dist/revo-grid/revogr-clipboard_3.entry.js +4 -4
- package/dist/revo-grid/revogr-data_4.entry.js +21 -15
- package/dist/revo-grid/revogr-filter-panel.entry.js +9 -9
- package/dist/revo-grid/{column.drag.plugin-DDBKeTGI.js → row-resize.plugin-BRiaHlHA.js} +562 -20
- package/dist/{esm/text-editor-DlMnLkRK.js → revo-grid/text-editor-eHtrwvxH.js} +2 -2
- package/dist/{esm/throttle-Cpk1LoGk.js → revo-grid/throttle-3rhqdcLy.js} +3 -3
- package/dist/{esm/viewport.store-BSXmsiZc.js → revo-grid/viewport.store-DWMKRDSH.js} +1 -1
- package/dist/types/components/data/revogr-data.d.ts +1 -0
- package/dist/types/components/overlay/keyboard.service.d.ts +6 -0
- package/dist/types/components/overlay/revogr-overlay-selection.d.ts +3 -1
- package/dist/types/components/revoGrid/revo-grid.d.ts +7 -1
- package/dist/types/components/revoGrid/viewport.scrolling.service.d.ts +3 -1
- package/dist/types/components.d.ts +23 -10
- package/dist/types/plugins/filter/filter.constants.d.ts +6 -0
- package/dist/types/plugins/filter/filter.plugin.d.ts +15 -0
- package/dist/types/plugins/index.d.ts +1 -0
- package/dist/types/plugins/row-resize/index.d.ts +3 -0
- package/dist/types/plugins/row-resize/row-resize.plugin.d.ts +44 -0
- package/dist/types/plugins/row-resize/row-resize.types.d.ts +40 -0
- package/dist/types/plugins/row-resize/row-resize.utils.d.ts +14 -0
- package/dist/types/services/data.provider.d.ts +2 -0
- package/dist/types/store/dataSource/data.pending.plugin.d.ts +9 -0
- package/dist/types/store/dataSource/data.store.d.ts +10 -0
- package/dist/types/store/dataSource/trimmed.plugin.d.ts +5 -0
- package/dist/types/types/events.d.ts +1 -1
- package/dist/types/types/interfaces.d.ts +3 -1
- package/hydrate/index.js +734 -85
- package/hydrate/index.mjs +734 -85
- package/package.json +1 -1
- package/readme.md +4 -1
- package/standalone/column.service.js +1 -1
- package/standalone/data.store.js +1 -1
- package/standalone/dimension.helpers.js +1 -1
- package/standalone/index.js +1 -1
- package/standalone/local.scroll.timer.js +1 -1
- package/standalone/revo-grid.js +1 -1
- package/standalone/revogr-data2.js +1 -1
- package/standalone/revogr-filter-panel.js +1 -1
- package/standalone/revogr-header2.js +1 -1
- package/standalone/revogr-overlay-selection2.js +1 -1
- package/standalone/revogr-row-headers2.js +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
export const DEFAULT_MIN_ROW_HEIGHT = 20;
|
|
5
|
+
const finiteNumber = (value) => typeof value === 'number' && Number.isFinite(value);
|
|
6
|
+
export function resolveRowResizeConfig(config = {}) {
|
|
7
|
+
const minHeight = finiteNumber(config.minHeight)
|
|
8
|
+
? Math.max(1, Math.round(config.minHeight))
|
|
9
|
+
: DEFAULT_MIN_ROW_HEIGHT;
|
|
10
|
+
const maxHeight = finiteNumber(config.maxHeight)
|
|
11
|
+
? Math.max(minHeight, Math.round(config.maxHeight))
|
|
12
|
+
: undefined;
|
|
13
|
+
return { minHeight, maxHeight, fullRow: config.fullRow === true };
|
|
14
|
+
}
|
|
15
|
+
export function clampRowResizeHeight(height, config) {
|
|
16
|
+
var _a;
|
|
17
|
+
const rounded = Number.isFinite(height)
|
|
18
|
+
? Math.round(height)
|
|
19
|
+
: config.minHeight;
|
|
20
|
+
return Math.min(Math.max(rounded, config.minHeight), (_a = config.maxHeight) !== null && _a !== void 0 ? _a : Number.POSITIVE_INFINITY);
|
|
21
|
+
}
|
|
22
|
+
export function getRowResizeIndexes({ rowType, rowIndex, rowCount, selectedRange, selectedRowType, }) {
|
|
23
|
+
if (!selectedRange ||
|
|
24
|
+
selectedRowType !== rowType ||
|
|
25
|
+
rowIndex < Math.min(selectedRange.y, selectedRange.y1) ||
|
|
26
|
+
rowIndex > Math.max(selectedRange.y, selectedRange.y1)) {
|
|
27
|
+
return rowIndex >= 0 && rowIndex < rowCount ? [rowIndex] : [];
|
|
28
|
+
}
|
|
29
|
+
const start = Math.max(0, Math.min(selectedRange.y, selectedRange.y1));
|
|
30
|
+
const end = Math.min(rowCount - 1, Math.max(selectedRange.y, selectedRange.y1));
|
|
31
|
+
return Array.from({ length: Math.max(0, end - start + 1) }, (_, i) => start + i);
|
|
32
|
+
}
|
|
33
|
+
export function createRowResizePatch(indexes, size) {
|
|
34
|
+
return indexes.reduce((patch, index) => {
|
|
35
|
+
patch[index] = size;
|
|
36
|
+
return patch;
|
|
37
|
+
}, {});
|
|
38
|
+
}
|
|
39
|
+
export function mergeRowResizeDefinitions(definitions, rowType, physicalIndexes, size) {
|
|
40
|
+
const targetIndexes = new Set(physicalIndexes);
|
|
41
|
+
const existingIndexes = new Set();
|
|
42
|
+
const merged = definitions.map(definition => {
|
|
43
|
+
if (definition.type !== rowType || !targetIndexes.has(definition.index)) {
|
|
44
|
+
return definition;
|
|
45
|
+
}
|
|
46
|
+
existingIndexes.add(definition.index);
|
|
47
|
+
return Object.assign(Object.assign({}, definition), { size });
|
|
48
|
+
});
|
|
49
|
+
for (const index of targetIndexes) {
|
|
50
|
+
if (!existingIndexes.has(index)) {
|
|
51
|
+
merged.push({ type: rowType, index, size });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return merged;
|
|
55
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
4
|
import reduce from "lodash/reduce";
|
|
5
|
-
import { isRowType, rowTypes, DataStore, getSourceItem,
|
|
5
|
+
import { isRowType, rowTypes, DataStore, getSourceItem, } from "../store/index";
|
|
6
6
|
/**
|
|
7
7
|
* Data source provider
|
|
8
8
|
*
|
|
@@ -105,7 +105,13 @@ export class DataProvider {
|
|
|
105
105
|
store.addTrimmed(trimmed);
|
|
106
106
|
this.dimensionProvider.setTrimmed(trimmed, type);
|
|
107
107
|
if (type === 'rgRow') {
|
|
108
|
-
this.dimensionProvider.setData(
|
|
108
|
+
this.dimensionProvider.setData(store.store.get('items').length, type);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
+
/** Keep a row source empty until its current asynchronous update is ready. */
|
|
112
|
+
setItemsPending(pending, type = 'rgRow') {
|
|
113
|
+
const store = this.stores[type];
|
|
114
|
+
store.setItemsPending(pending);
|
|
115
|
+
this.dimensionProvider.setData(store.store.get('items').length, type, type !== 'rgRow');
|
|
116
|
+
}
|
|
111
117
|
}
|
|
@@ -37,7 +37,7 @@ export class LocalScrollTimer {
|
|
|
37
37
|
* Remember last mw event time
|
|
38
38
|
*/
|
|
39
39
|
latestScrollUpdate(dimension) {
|
|
40
|
-
this.mouseWheelScrollTimestamp[dimension] =
|
|
40
|
+
this.mouseWheelScrollTimestamp[dimension] = Date.now();
|
|
41
41
|
}
|
|
42
42
|
isReady(type, coordinate) {
|
|
43
43
|
// if there is a callback, clear it
|
|
@@ -48,7 +48,7 @@ export class LocalScrollTimer {
|
|
|
48
48
|
return this.verifyChange(type, coordinate);
|
|
49
49
|
}
|
|
50
50
|
verifyChange(type, coordinate) {
|
|
51
|
-
const now =
|
|
51
|
+
const now = Date.now();
|
|
52
52
|
const change = now - this.mouseWheelScrollTimestamp[type];
|
|
53
53
|
return change > this.scrollThrottling &&
|
|
54
54
|
coordinate !== this.lastKnownScrollCoordinate[type];
|
|
@@ -66,7 +66,7 @@ export class LocalScrollTimer {
|
|
|
66
66
|
// save lastScrollUpdate callback
|
|
67
67
|
const callback = this.lastScrollUpdateCallbacks[type] = {
|
|
68
68
|
callback: lastScrollUpdate,
|
|
69
|
-
timestamp:
|
|
69
|
+
timestamp: Date.now(),
|
|
70
70
|
coordinate,
|
|
71
71
|
timeout: 0,
|
|
72
72
|
};
|
|
@@ -255,9 +255,11 @@ export class SelectionStoreConnector {
|
|
|
255
255
|
continue;
|
|
256
256
|
}
|
|
257
257
|
const lastCell = store.store.get('lastCell');
|
|
258
|
-
if (lastCell) {
|
|
259
|
-
store.
|
|
258
|
+
if (!lastCell || lastCell.x <= 0 || lastCell.y <= 0) {
|
|
259
|
+
store.setRangeArea(null);
|
|
260
|
+
continue;
|
|
260
261
|
}
|
|
262
|
+
store.setRange({ x: 0, y: 0 }, { x: lastCell.x - 1, y: lastCell.y - 1 });
|
|
261
263
|
}
|
|
262
264
|
}
|
|
263
265
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Keeps the visible item collection empty while an asynchronous data operation
|
|
6
|
+
* is pending. Proxy, trim, and source updates may still calculate new items,
|
|
7
|
+
* but they must not expose those items until the owning operation releases the
|
|
8
|
+
* pending state.
|
|
9
|
+
*/
|
|
10
|
+
export const pendingItemsPlugin = (store, isPending) => ({
|
|
11
|
+
set(key, value) {
|
|
12
|
+
if (key === 'items' &&
|
|
13
|
+
isPending() &&
|
|
14
|
+
Array.isArray(value) &&
|
|
15
|
+
value.length) {
|
|
16
|
+
// Writing an empty collection does not re-enter this branch, so the
|
|
17
|
+
// guard safely replaces every attempted non-empty visibility update.
|
|
18
|
+
store.set('items', []);
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
});
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
import findIndex from "lodash/findIndex";
|
|
5
5
|
import range from "lodash/range";
|
|
6
6
|
import { createStore } from "@stencil/store";
|
|
7
|
-
import {
|
|
7
|
+
import { getVisibleItems, trimmedPlugin, } from "./trimmed.plugin";
|
|
8
8
|
import { setStore } from "../../utils";
|
|
9
9
|
import { proxyPlugin } from "./data.proxy";
|
|
10
|
+
import { pendingItemsPlugin } from "./data.pending.plugin";
|
|
10
11
|
/**
|
|
11
12
|
* Data store
|
|
12
13
|
* Manage the state of a data source and provide methods for updating, adding, and refreshing the data.
|
|
@@ -16,9 +17,15 @@ export class DataStore {
|
|
|
16
17
|
return this.dataStore;
|
|
17
18
|
}
|
|
18
19
|
constructor(type, storeData) {
|
|
20
|
+
/**
|
|
21
|
+
* The source, proxy order, and trims may continue changing,
|
|
22
|
+
* but visible items must remain empty until the operation finishes.
|
|
23
|
+
*/
|
|
24
|
+
this.itemsPending = false;
|
|
19
25
|
const store = (this.dataStore = createStore(Object.assign({ items: [], proxyItems: [], source: [], groupingDepth: 0, groups: {}, type, trimmed: {}, groupingCustomRenderer: undefined, groupingCellRenderer: undefined }, storeData)));
|
|
20
26
|
store.use(proxyPlugin(store));
|
|
21
27
|
store.use(trimmedPlugin(store));
|
|
28
|
+
store.use(pendingItemsPlugin(store, () => this.itemsPending));
|
|
22
29
|
}
|
|
23
30
|
/**
|
|
24
31
|
* full data source update
|
|
@@ -33,7 +40,7 @@ export class DataStore {
|
|
|
33
40
|
// if true, current trimmed indexes will be re-applied to the new source
|
|
34
41
|
preserveTrimmed = false) {
|
|
35
42
|
const trimmed = this.store.get('trimmed');
|
|
36
|
-
const
|
|
43
|
+
const preserveCurrentTrimmed = silent && preserveTrimmed;
|
|
37
44
|
// during full update we do drop trim
|
|
38
45
|
if (!silent) {
|
|
39
46
|
this.store.set('trimmed', {});
|
|
@@ -48,7 +55,7 @@ export class DataStore {
|
|
|
48
55
|
});
|
|
49
56
|
// Explicit trim preservation is opt-in because physical indexes may change
|
|
50
57
|
// across full data refreshes.
|
|
51
|
-
this.store.set('items',
|
|
58
|
+
this.store.set('items', preserveCurrentTrimmed ? getVisibleItems(items, trimmed) : items);
|
|
52
59
|
// apply grouping if present
|
|
53
60
|
if (grouping) {
|
|
54
61
|
setStore(this.store, {
|
|
@@ -65,6 +72,21 @@ export class DataStore {
|
|
|
65
72
|
trimmed = Object.assign(Object.assign({}, trimmed), some);
|
|
66
73
|
setStore(this.store, { trimmed });
|
|
67
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Keeps visible items empty while an asynchronous source operation is pending.
|
|
77
|
+
* Releasing the state restores the current proxy order with all trims applied.
|
|
78
|
+
*/
|
|
79
|
+
setItemsPending(pending) {
|
|
80
|
+
if (this.itemsPending === pending) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this.itemsPending = pending;
|
|
84
|
+
if (pending) {
|
|
85
|
+
this.store.set('items', []);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this.store.set('items', getVisibleItems(this.store.get('proxyItems'), this.store.get('trimmed')));
|
|
89
|
+
}
|
|
68
90
|
setSourceData(items, mutate = true) {
|
|
69
91
|
setSourceByVirtualIndex(this.store, items, mutate);
|
|
70
92
|
}
|
|
@@ -9,13 +9,8 @@ export const trimmedPlugin = (store) => ({
|
|
|
9
9
|
set(k, newVal) {
|
|
10
10
|
switch (k) {
|
|
11
11
|
case 'trimmed': {
|
|
12
|
-
// full sorted items list
|
|
13
|
-
const proxy = store.get('proxyItems');
|
|
14
|
-
const trimmed = gatherTrimmedItems(newVal);
|
|
15
|
-
// filter our physical indexes which are not trimmed
|
|
16
|
-
const newItems = proxy.filter(v => !trimmed[v]);
|
|
17
12
|
// set trimmed items in store
|
|
18
|
-
store.set('items',
|
|
13
|
+
store.set('items', getVisibleItems(store.get('proxyItems'), newVal));
|
|
19
14
|
break;
|
|
20
15
|
}
|
|
21
16
|
}
|
|
@@ -31,3 +26,11 @@ export function gatherTrimmedItems(trimmedItems) {
|
|
|
31
26
|
}
|
|
32
27
|
return trimmed;
|
|
33
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Preserve proxy order while removing physical indexes hidden by any trim
|
|
31
|
+
* layer.
|
|
32
|
+
*/
|
|
33
|
+
export function getVisibleItems(proxyItems, trimmedItems) {
|
|
34
|
+
const trimmed = gatherTrimmedItems(trimmedItems);
|
|
35
|
+
return proxyItems.filter(index => !trimmed[index]);
|
|
36
|
+
}
|
|
@@ -25,9 +25,7 @@ export const trimmedPlugin = (storeService) => {
|
|
|
25
25
|
}
|
|
26
26
|
case 'trimmed': {
|
|
27
27
|
const trim = val;
|
|
28
|
-
|
|
29
|
-
trimmedPreviousSizes = storeService.store.get('sizes');
|
|
30
|
-
}
|
|
28
|
+
trimmedPreviousSizes !== null && trimmedPreviousSizes !== void 0 ? trimmedPreviousSizes : (trimmedPreviousSizes = storeService.store.get('sizes'));
|
|
31
29
|
trimmingObject = removeMultipleAndShift(trimmedPreviousSizes, trim || {});
|
|
32
30
|
// save a reference to the trimmed object to prevent changes after trimming
|
|
33
31
|
storeService.setSizes(trimmingObject);
|
|
@@ -64,7 +64,6 @@ export const REVOGRID_EVENTS = new Map([
|
|
|
64
64
|
['resetChange', 'resetChange'],
|
|
65
65
|
['beforefocusrender', 'beforefocusrender'],
|
|
66
66
|
['beforescrollintoview', 'beforescrollintoview'],
|
|
67
|
-
['afterfocus', 'afterfocus'],
|
|
68
67
|
['beforeheaderclick', 'beforeheaderclick'],
|
|
69
68
|
['headerresize', 'headerresize'],
|
|
70
69
|
['beforeheaderresize', 'beforeheaderresize'],
|
|
@@ -76,6 +75,10 @@ export const REVOGRID_EVENTS = new Map([
|
|
|
76
75
|
['columndragmousemove', 'columndragmousemove'],
|
|
77
76
|
['beforecolumndragend', 'beforecolumndragend'],
|
|
78
77
|
['columndragend', 'columndragend'],
|
|
78
|
+
['beforerowresize', 'beforerowresize'],
|
|
79
|
+
['rowresize', 'rowresize'],
|
|
80
|
+
['afterrowresize', 'afterrowresize'],
|
|
81
|
+
['rowresizecancel', 'rowresizecancel'],
|
|
79
82
|
['rowdragstartinit', 'rowdragstartinit'],
|
|
80
83
|
['rowdragendinit', 'rowdragendinit'],
|
|
81
84
|
['rowdragmoveinit', 'rowdragmoveinit'],
|
|
@@ -118,7 +118,7 @@ export function gatherGroup(res, colData, collection, existingColumnsByType, lev
|
|
|
118
118
|
// fill columns
|
|
119
119
|
resultItem.push(...collectionItem);
|
|
120
120
|
// fill indexes per each viewport
|
|
121
|
-
res.columnGrouping[type].push(Object.assign(Object.assign({}, group), { indexes: Array(itemLength
|
|
121
|
+
res.columnGrouping[type].push(Object.assign(Object.assign({}, group), { indexes: Array.from({ length: itemLength }, (_, i) => columnLength + i) }));
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
});
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
4
|
import { h, e as Build } from './index-CtimkLsB.js';
|
|
5
|
-
import {
|
|
6
|
-
import { A as getCellRaw, v as isGroupingColumn, l as GROUP_EXPAND_BTN, m as GROUP_EXPAND_EVENT, j as GROUP_COLUMN_PROP, P as PSEUDO_GROUP_ITEM, h as GROUP_EXPANDED, G as GROUP_DEPTH, O as isRowDragService, B as getCellDataParsed } from './column.service-
|
|
5
|
+
import { o as DATA_ROW, b as getSourceItem, n as DATA_COL, C as CELL_CLASS, x as DRAG_ICON_CLASS, y as DRAGGABLE_CLASS } from './dimension.helpers-Cln9sALu.js';
|
|
6
|
+
import { A as getCellRaw, v as isGroupingColumn, l as GROUP_EXPAND_BTN, m as GROUP_EXPAND_EVENT, j as GROUP_COLUMN_PROP, P as PSEUDO_GROUP_ITEM, h as GROUP_EXPANDED, G as GROUP_DEPTH, O as isRowDragService, B as getCellDataParsed } from './column.service-CM-wgGs8.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders sorting direction and optional additive sorting rank.
|
|
@@ -122,7 +122,7 @@ const GroupingRowRenderer = (props) => {
|
|
|
122
122
|
depth })))));
|
|
123
123
|
}
|
|
124
124
|
return (h(RowRenderer, Object.assign({}, props, groupRowAttrs), hasExpand && [
|
|
125
|
-
h("button", { class: { [GROUP_EXPAND_BTN]: true }, onClick: e => expandEvent(e, model, itemIndex) }, expandSvgIconVNode(expanded)),
|
|
125
|
+
h("button", { type: "button", class: { [GROUP_EXPAND_BTN]: true }, onClick: e => expandEvent(e, model, itemIndex) }, expandSvgIconVNode(expanded)),
|
|
126
126
|
String(name),
|
|
127
127
|
]));
|
|
128
128
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { U as toFinite, V as keys, W as isArrayLike, X as baseIteratee, O as isArray, G as GRID_INTERNALS, Y as isIterateeCall, a as getVisibleSourceItem, q as DISABLED_CLASS, C as CELL_CLASS, b as getSourceItem } from './dimension.helpers-Cln9sALu.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Converts `value` to an integer.
|
|
@@ -329,7 +329,7 @@ function gatherGroup(res, colData, collection, existingColumnsByType, level = 0)
|
|
|
329
329
|
// fill columns
|
|
330
330
|
resultItem.push(...collectionItem);
|
|
331
331
|
// fill indexes per each viewport
|
|
332
|
-
res.columnGrouping[type].push(Object.assign(Object.assign({}, group), { indexes: Array(itemLength
|
|
332
|
+
res.columnGrouping[type].push(Object.assign(Object.assign({}, group), { indexes: Array.from({ length: itemLength }, (_, i) => columnLength + i) }));
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
});
|
|
@@ -590,7 +590,7 @@ function isGrouping(rgRow) {
|
|
|
590
590
|
return typeof (rgRow === null || rgRow === void 0 ? void 0 : rgRow[PSEUDO_GROUP_ITEM]) !== 'undefined';
|
|
591
591
|
}
|
|
592
592
|
function isGroupingColumn(column) {
|
|
593
|
-
return
|
|
593
|
+
return (column === null || column === void 0 ? void 0 : column[PSEUDO_GROUP_COLUMN]) !== undefined;
|
|
594
594
|
}
|
|
595
595
|
function measureEqualDepth(groupA, groupB) {
|
|
596
596
|
const ln = groupA.length;
|
|
@@ -2991,13 +2991,8 @@ const trimmedPlugin = (store) => ({
|
|
|
2991
2991
|
set(k, newVal) {
|
|
2992
2992
|
switch (k) {
|
|
2993
2993
|
case 'trimmed': {
|
|
2994
|
-
// full sorted items list
|
|
2995
|
-
const proxy = store.get('proxyItems');
|
|
2996
|
-
const trimmed = gatherTrimmedItems(newVal);
|
|
2997
|
-
// filter our physical indexes which are not trimmed
|
|
2998
|
-
const newItems = proxy.filter(v => !trimmed[v]);
|
|
2999
2994
|
// set trimmed items in store
|
|
3000
|
-
store.set('items',
|
|
2995
|
+
store.set('items', getVisibleItems(store.get('proxyItems'), newVal));
|
|
3001
2996
|
break;
|
|
3002
2997
|
}
|
|
3003
2998
|
}
|
|
@@ -3013,6 +3008,14 @@ function gatherTrimmedItems(trimmedItems) {
|
|
|
3013
3008
|
}
|
|
3014
3009
|
return trimmed;
|
|
3015
3010
|
}
|
|
3011
|
+
/**
|
|
3012
|
+
* Preserve proxy order while removing physical indexes hidden by any trim
|
|
3013
|
+
* layer.
|
|
3014
|
+
*/
|
|
3015
|
+
function getVisibleItems(proxyItems, trimmedItems) {
|
|
3016
|
+
const trimmed = gatherTrimmedItems(trimmedItems);
|
|
3017
|
+
return proxyItems.filter(index => !trimmed[index]);
|
|
3018
|
+
}
|
|
3016
3019
|
|
|
3017
3020
|
/**
|
|
3018
3021
|
* Sets the given data on the specified store.
|
|
@@ -3132,6 +3135,25 @@ var osPlatform;
|
|
|
3132
3135
|
})(osPlatform || (osPlatform = {}));
|
|
3133
3136
|
var OsPlatform = osPlatform;
|
|
3134
3137
|
|
|
3138
|
+
/**
|
|
3139
|
+
* Keeps the visible item collection empty while an asynchronous data operation
|
|
3140
|
+
* is pending. Proxy, trim, and source updates may still calculate new items,
|
|
3141
|
+
* but they must not expose those items until the owning operation releases the
|
|
3142
|
+
* pending state.
|
|
3143
|
+
*/
|
|
3144
|
+
const pendingItemsPlugin = (store, isPending) => ({
|
|
3145
|
+
set(key, value) {
|
|
3146
|
+
if (key === 'items' &&
|
|
3147
|
+
isPending() &&
|
|
3148
|
+
Array.isArray(value) &&
|
|
3149
|
+
value.length) {
|
|
3150
|
+
// Writing an empty collection does not re-enter this branch, so the
|
|
3151
|
+
// guard safely replaces every attempted non-empty visibility update.
|
|
3152
|
+
store.set('items', []);
|
|
3153
|
+
}
|
|
3154
|
+
},
|
|
3155
|
+
});
|
|
3156
|
+
|
|
3135
3157
|
/**
|
|
3136
3158
|
* Data store
|
|
3137
3159
|
* Manage the state of a data source and provide methods for updating, adding, and refreshing the data.
|
|
@@ -3141,9 +3163,15 @@ class DataStore {
|
|
|
3141
3163
|
return this.dataStore;
|
|
3142
3164
|
}
|
|
3143
3165
|
constructor(type, storeData) {
|
|
3166
|
+
/**
|
|
3167
|
+
* The source, proxy order, and trims may continue changing,
|
|
3168
|
+
* but visible items must remain empty until the operation finishes.
|
|
3169
|
+
*/
|
|
3170
|
+
this.itemsPending = false;
|
|
3144
3171
|
const store = (this.dataStore = createStore(Object.assign({ items: [], proxyItems: [], source: [], groupingDepth: 0, groups: {}, type, trimmed: {}, groupingCustomRenderer: undefined, groupingCellRenderer: undefined }, storeData)));
|
|
3145
3172
|
store.use(proxyPlugin(store));
|
|
3146
3173
|
store.use(trimmedPlugin(store));
|
|
3174
|
+
store.use(pendingItemsPlugin(store, () => this.itemsPending));
|
|
3147
3175
|
}
|
|
3148
3176
|
/**
|
|
3149
3177
|
* full data source update
|
|
@@ -3158,7 +3186,7 @@ class DataStore {
|
|
|
3158
3186
|
// if true, current trimmed indexes will be re-applied to the new source
|
|
3159
3187
|
preserveTrimmed = false) {
|
|
3160
3188
|
const trimmed = this.store.get('trimmed');
|
|
3161
|
-
const
|
|
3189
|
+
const preserveCurrentTrimmed = silent && preserveTrimmed;
|
|
3162
3190
|
// during full update we do drop trim
|
|
3163
3191
|
if (!silent) {
|
|
3164
3192
|
this.store.set('trimmed', {});
|
|
@@ -3173,7 +3201,7 @@ class DataStore {
|
|
|
3173
3201
|
});
|
|
3174
3202
|
// Explicit trim preservation is opt-in because physical indexes may change
|
|
3175
3203
|
// across full data refreshes.
|
|
3176
|
-
this.store.set('items',
|
|
3204
|
+
this.store.set('items', preserveCurrentTrimmed ? getVisibleItems(items, trimmed) : items);
|
|
3177
3205
|
// apply grouping if present
|
|
3178
3206
|
if (grouping) {
|
|
3179
3207
|
setStore(this.store, {
|
|
@@ -3190,6 +3218,21 @@ class DataStore {
|
|
|
3190
3218
|
trimmed = Object.assign(Object.assign({}, trimmed), some);
|
|
3191
3219
|
setStore(this.store, { trimmed });
|
|
3192
3220
|
}
|
|
3221
|
+
/**
|
|
3222
|
+
* Keeps visible items empty while an asynchronous source operation is pending.
|
|
3223
|
+
* Releasing the state restores the current proxy order with all trims applied.
|
|
3224
|
+
*/
|
|
3225
|
+
setItemsPending(pending) {
|
|
3226
|
+
if (this.itemsPending === pending) {
|
|
3227
|
+
return;
|
|
3228
|
+
}
|
|
3229
|
+
this.itemsPending = pending;
|
|
3230
|
+
if (pending) {
|
|
3231
|
+
this.store.set('items', []);
|
|
3232
|
+
return;
|
|
3233
|
+
}
|
|
3234
|
+
this.store.set('items', getVisibleItems(this.store.get('proxyItems'), this.store.get('trimmed')));
|
|
3235
|
+
}
|
|
3193
3236
|
setSourceData(items, mutate = true) {
|
|
3194
3237
|
setSourceByVirtualIndex(this.store, items, mutate);
|
|
3195
3238
|
}
|
|
@@ -3497,4 +3540,4 @@ function getItemByIndex(dimension, index) {
|
|
|
3497
3540
|
return item;
|
|
3498
3541
|
}
|
|
3499
3542
|
|
|
3500
|
-
export {
|
|
3543
|
+
export { CELL_HANDLER_CLASS as A, DRAGG_TEXT as B, CELL_CLASS as C, DataStore as D, EDIT_INPUT_WR as E, FOCUS_CLASS as F, GRID_INTERNALS as G, HEADER_CLASS as H, ROW_FOCUSED_CLASS as I, codesLetter as J, keyValues as K, createStore as L, MIN_COL_SIZE as M, identity as N, isArray as O, KeyCodesEnum as P, OsPlatform as Q, RESIZE_INTERVAL as R, SELECTION_BORDER_CLASS as S, TMP_SELECTION_BG_CLASS as T, toFinite as U, keys as V, isArrayLike as W, baseIteratee as X, isIterateeCall as Y, getVisibleSourceItem as a, getSourceItem as b, getSourcePhysicalIndex as c, setSourceByPhysicalIndex as d, setItems as e, getSourceItemVirtualIndexByProp as f, getPhysical as g, gatherTrimmedItems as h, getVisibleItems as i, calculateDimensionData as j, getItemByPosition as k, getItemByIndex as l, setStore as m, DATA_COL as n, DATA_ROW as o, proxyPlugin as p, DISABLED_CLASS as q, ROW_HEADER_TYPE as r, setSourceByVirtualIndex as s, trimmedPlugin as t, HEADER_SORTABLE_CLASS as u, HEADER_ROW_CLASS as v, HEADER_ACTUAL_ROW_CLASS as w, DRAG_ICON_CLASS as x, DRAGGABLE_CLASS as y, MOBILE_CLASS as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { P as KeyCodesEnum, Q as OsPlatform, J as codesLetter, K as keyValues, E as EDIT_INPUT_WR } from './dimension.helpers-Cln9sALu.js';
|
|
5
5
|
|
|
6
6
|
function isMetaKey(code) {
|
|
7
7
|
const keys = [
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
4
|
import { h } from './index-CtimkLsB.js';
|
|
5
|
-
import { Q as doPropMerge } from './column.service-
|
|
5
|
+
import { Q as doPropMerge } from './column.service-CM-wgGs8.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Dispatches a custom event to a specified target element.
|
package/dist/esm/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
|
-
import { d as defineTheme, B as BasePlugin } from './
|
|
5
|
-
export { A as AutoSizeColumnPlugin, q as BEFORE_COLUMN_DRAG_END_EVENT, p as COLUMN_DRAG_END_EVENT, o as COLUMN_DRAG_MOVE_EVENT, s as COLUMN_DRAG_START_EVENT, C as ColumnAutoSizeMode, u as ColumnMovePlugin, k as DEFAULT_BLANK_SEMANTICS, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, e as FILTE_PANEL, f as FilterPlugin, G as GroupingRowPlugin, S as SelectionStore,
|
|
6
|
-
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-
|
|
7
|
-
export { d as dispatch, a as dispatchByEvent } from './header-cell-renderer-
|
|
8
|
-
export { C as CellRenderer, G as GroupingRowRenderer, S as SortingSign, e as expandEvent, a as expandSvgIconVNode, r as renderGroupCells } from './cell-renderer-
|
|
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-
|
|
10
|
-
export { T as TextEditor } from './text-editor-
|
|
11
|
-
export { k as isAll, c as isClear, h as isCopy, a as isCtrlKey, b as isCtrlMetaKey, g as isCut, m as isEditInput, n as isEditorCtrConstructible, f as isEnterKeyValue, i as isMetaKey, j as isPaste, l as isShortcutModifier, d as isTab, e as isTabKeyValue } from './edit.utils-
|
|
4
|
+
import { d as defineTheme, B as BasePlugin } from './row-resize.plugin-BRiaHlHA.js';
|
|
5
|
+
export { z as AFTER_ROW_RESIZE_EVENT, A as AutoSizeColumnPlugin, q as BEFORE_COLUMN_DRAG_END_EVENT, x as BEFORE_ROW_RESIZE_EVENT, p as COLUMN_DRAG_END_EVENT, o as COLUMN_DRAG_MOVE_EVENT, s as COLUMN_DRAG_START_EVENT, C as ColumnAutoSizeMode, u as ColumnMovePlugin, k as DEFAULT_BLANK_SEMANTICS, J as DEFAULT_MIN_ROW_HEIGHT, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, e as FILTE_PANEL, f as FilterPlugin, G as GroupingRowPlugin, H as ROW_RESIZE_CANCEL_EVENT, y as ROW_RESIZE_EVENT, R as ROW_RESIZE_HANDLE_CLASS, I as RowResizePlugin, S as SelectionStore, P as SortingPlugin, a as StretchColumn, L as clampRowResizeHeight, N as createRowResizePatch, V as defaultCellCompare, W as descCellCompare, m as doCollapse, n as doExpand, g as filterCoreFunctionsIndexedByType, j as filterNames, h as filterTypes, w as getColumnDragPosition, Y as getComparer, v as getLeftRelative, X as getNextOrder, M as getRowResizeIndexes, T as getSortingIndex, Q as hasActiveSorting, l as isBlankValue, i as isStretchPlugin, O as mergeRowResizeDefinitions, r as resolveBlankSemantics, K as resolveRowResizeConfig, U as sortIndexByItems, t as themeTokenCssVariables } from './row-resize.plugin-BRiaHlHA.js';
|
|
6
|
+
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-CM-wgGs8.js';
|
|
7
|
+
export { d as dispatch, a as dispatchByEvent } from './header-cell-renderer-Bqh1PrgH.js';
|
|
8
|
+
export { C as CellRenderer, G as GroupingRowRenderer, S as SortingSign, e as expandEvent, a as expandSvgIconVNode, r as renderGroupCells } from './cell-renderer-BFpmdV8H.js';
|
|
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-BvMNbQyq.js';
|
|
10
|
+
export { T as TextEditor } from './text-editor-eHtrwvxH.js';
|
|
11
|
+
export { k as isAll, c as isClear, h as isCopy, a as isCtrlKey, b as isCtrlMetaKey, g as isCut, m as isEditInput, n as isEditorCtrConstructible, f as isEnterKeyValue, i as isMetaKey, j as isPaste, l as isShortcutModifier, d as isTab, e as isTabKeyValue } from './edit.utils-3ZbhQCv_.js';
|
|
12
12
|
export { h } from './index-CtimkLsB.js';
|
|
13
|
-
export { C as CELL_CLASS,
|
|
14
|
-
export { V as ViewportStore, b as addMissingItems, j as calculateRowHeaderSize, c as clampViewportCoordinate, f as getFirstItem, d as getItems, h as getLastItem, a as getUpdatedItemsByPosition, g as getViewportMaxCoordinate, i as isActiveRange, e as isActiveRangeOutsideLastItem, r as recombineByOffset, s as setItemSizes, u as updateMissingAndRange } from './viewport.store-
|
|
13
|
+
export { C as CELL_CLASS, A as CELL_HANDLER_CLASS, n as DATA_COL, o as DATA_ROW, q as DISABLED_CLASS, y as DRAGGABLE_CLASS, B as DRAGG_TEXT, x as DRAG_ICON_CLASS, D as DataStore, E as EDIT_INPUT_WR, F as FOCUS_CLASS, G as GRID_INTERNALS, w as HEADER_ACTUAL_ROW_CLASS, H as HEADER_CLASS, v as HEADER_ROW_CLASS, u as HEADER_SORTABLE_CLASS, M as MIN_COL_SIZE, z as MOBILE_CLASS, R as RESIZE_INTERVAL, I as ROW_FOCUSED_CLASS, r as ROW_HEADER_TYPE, S as SELECTION_BORDER_CLASS, T as TMP_SELECTION_BG_CLASS, j as calculateDimensionData, J as codesLetter, h as gatherTrimmedItems, l as getItemByIndex, k as getItemByPosition, g as getPhysical, b as getSourceItem, f as getSourceItemVirtualIndexByProp, c as getSourcePhysicalIndex, i as getVisibleItems, a as getVisibleSourceItem, K as keyValues, p as proxyPlugin, e as setItems, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, m as setStore, t as trimmedPlugin } from './dimension.helpers-Cln9sALu.js';
|
|
14
|
+
export { V as ViewportStore, b as addMissingItems, j as calculateRowHeaderSize, c as clampViewportCoordinate, f as getFirstItem, d as getItems, h as getLastItem, a as getUpdatedItemsByPosition, g as getViewportMaxCoordinate, i as isActiveRange, e as isActiveRangeOutsideLastItem, r as recombineByOffset, s as setItemSizes, u as updateMissingAndRange } from './viewport.store-DWMKRDSH.js';
|
|
15
15
|
export { A as AND_OR_BUTTON, e as AndOrButton, a as FILTER_BUTTON_ACTIVE, F as FILTER_BUTTON_CLASS, b as FILTER_PROP, c as FilterButton, R as REORDER_BUTTON, f as ReorderButton, T as TRASH_BUTTON, d as TrashButton, i as isFilterBtn } from './filter.button-DMhpuAiw.js';
|
|
16
16
|
import './debounce-PCRWZliA.js';
|
|
17
17
|
|
|
@@ -78,7 +78,6 @@ const REVOGRID_EVENTS = new Map([
|
|
|
78
78
|
['resetChange', 'resetChange'],
|
|
79
79
|
['beforefocusrender', 'beforefocusrender'],
|
|
80
80
|
['beforescrollintoview', 'beforescrollintoview'],
|
|
81
|
-
['afterfocus', 'afterfocus'],
|
|
82
81
|
['beforeheaderclick', 'beforeheaderclick'],
|
|
83
82
|
['headerresize', 'headerresize'],
|
|
84
83
|
['beforeheaderresize', 'beforeheaderresize'],
|
|
@@ -90,6 +89,10 @@ const REVOGRID_EVENTS = new Map([
|
|
|
90
89
|
['columndragmousemove', 'columndragmousemove'],
|
|
91
90
|
['beforecolumndragend', 'beforecolumndragend'],
|
|
92
91
|
['columndragend', 'columndragend'],
|
|
92
|
+
['beforerowresize', 'beforerowresize'],
|
|
93
|
+
['rowresize', 'rowresize'],
|
|
94
|
+
['afterrowresize', 'afterrowresize'],
|
|
95
|
+
['rowresizecancel', 'rowresizecancel'],
|
|
93
96
|
['rowdragstartinit', 'rowdragstartinit'],
|
|
94
97
|
['rowdragendinit', 'rowdragendinit'],
|
|
95
98
|
['rowdragmoveinit', 'rowdragmoveinit'],
|
package/dist/esm/loader.js
CHANGED
|
@@ -8,7 +8,7 @@ import { g as globalScripts } from './app-globals-CA4dvSNd.js';
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await globalScripts();
|
|
11
|
-
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],"themeDefinitions":[16],"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}],"colSize":[{"colSizeChanged":0}],"theme":[{"themeChanged":0}],"themeDefinitions":[{"themeDefinitionsChanged":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"],"allowDuplicateOperators":[4,"allow-duplicate-operators"],"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);
|
|
11
|
+
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],"resizeRow":[4,"resize-row"],"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],"themeDefinitions":[16],"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}],"colSize":[{"colSizeChanged":0}],"theme":[{"themeChanged":0}],"themeDefinitions":[{"themeDefinitionsChanged":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"],"allowDuplicateOperators":[4,"allow-duplicate-operators"],"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);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export { defineCustomElements };
|