@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
|
-
import { d as isTab, f as isEnterKeyValue } from './edit.utils-
|
|
5
|
-
import { t as timeout } from './index-
|
|
4
|
+
import { d as isTab, f as isEnterKeyValue } from './edit.utils-3ZbhQCv_.js';
|
|
5
|
+
import { t as timeout } from './index-BvMNbQyq.js';
|
|
6
6
|
|
|
7
7
|
class TextEditor {
|
|
8
8
|
constructor(data, saveCallback) {
|
|
@@ -195,7 +195,7 @@ class LocalScrollTimer {
|
|
|
195
195
|
* Remember last mw event time
|
|
196
196
|
*/
|
|
197
197
|
latestScrollUpdate(dimension) {
|
|
198
|
-
this.mouseWheelScrollTimestamp[dimension] =
|
|
198
|
+
this.mouseWheelScrollTimestamp[dimension] = Date.now();
|
|
199
199
|
}
|
|
200
200
|
isReady(type, coordinate) {
|
|
201
201
|
// if there is a callback, clear it
|
|
@@ -206,7 +206,7 @@ class LocalScrollTimer {
|
|
|
206
206
|
return this.verifyChange(type, coordinate);
|
|
207
207
|
}
|
|
208
208
|
verifyChange(type, coordinate) {
|
|
209
|
-
const now =
|
|
209
|
+
const now = Date.now();
|
|
210
210
|
const change = now - this.mouseWheelScrollTimestamp[type];
|
|
211
211
|
return change > this.scrollThrottling &&
|
|
212
212
|
coordinate !== this.lastKnownScrollCoordinate[type];
|
|
@@ -224,7 +224,7 @@ class LocalScrollTimer {
|
|
|
224
224
|
// save lastScrollUpdate callback
|
|
225
225
|
const callback = this.lastScrollUpdateCallbacks[type] = {
|
|
226
226
|
callback: lastScrollUpdate,
|
|
227
|
-
timestamp:
|
|
227
|
+
timestamp: Date.now(),
|
|
228
228
|
coordinate,
|
|
229
229
|
timeout: 0,
|
|
230
230
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { k as getItemByPosition, L as createStore, m as setStore } from './dimension.helpers-Cln9sALu.js';
|
|
5
5
|
|
|
6
6
|
const LETTER_BLOCK_SIZE = 10;
|
|
7
7
|
const calculateRowHeaderSize = (itemsLength, rowHeaderColumn, minWidth = 50) => {
|
|
@@ -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 = [
|
package/dist/revo-grid/{header-cell-renderer-Cqtg1ETB.js → header-cell-renderer-Bqh1PrgH.js}
RENAMED
|
@@ -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.
|
|
@@ -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'],
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
4
|
import { h, r as registerInstance, a as createEvent, d as Host, g as getElement } from './index-CtimkLsB.js';
|
|
5
|
-
import { c as columnTypes, J as reduce, C as getColumnType, r as rowTypes, i as isRowType, D as getColumnSizes, a as cropCellToMax, n as nextCell, I as getColumnByProp, F as getColumns } from './column.service-
|
|
6
|
-
import { D as DataStore, b as getSourceItem, f as getSourceItemVirtualIndexByProp, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex,
|
|
5
|
+
import { c as columnTypes, J as reduce, C as getColumnType, r as rowTypes, i as isRowType, D as getColumnSizes, a as cropCellToMax, n as nextCell, I as getColumnByProp, F as getColumns } from './column.service-CM-wgGs8.js';
|
|
6
|
+
import { D as DataStore, b as getSourceItem, f as getSourceItemVirtualIndexByProp, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, h as gatherTrimmedItems, l as getItemByIndex, R as RESIZE_INTERVAL, a as getVisibleSourceItem } from './dimension.helpers-Cln9sALu.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, t as themeTokenCssVariables, S as SelectionStore, B as BasePlugin, G as GroupingRowPlugin, a as StretchColumn, i as isStretchPlugin, A as AutoSizeColumnPlugin, f as FilterPlugin, E as ExportFilePlugin,
|
|
10
|
-
import { V as ViewportStore } from './viewport.store-
|
|
11
|
-
import { t as timeout } from './index-
|
|
9
|
+
import { D as DimensionStore, t as themeTokenCssVariables, S as SelectionStore, B as BasePlugin, G as GroupingRowPlugin, a as StretchColumn, i as isStretchPlugin, A as AutoSizeColumnPlugin, f as FilterPlugin, E as ExportFilePlugin, P as SortingPlugin, I as RowResizePlugin, u as ColumnMovePlugin } from './row-resize.plugin-BRiaHlHA.js';
|
|
10
|
+
import { V as ViewportStore } from './viewport.store-DWMKRDSH.js';
|
|
11
|
+
import { t as timeout } from './index-BvMNbQyq.js';
|
|
12
12
|
import { g as getPropertyFromEvent } from './events-BvSmBueA.js';
|
|
13
13
|
import './filter.button-DMhpuAiw.js';
|
|
14
|
-
import './header-cell-renderer-
|
|
14
|
+
import './header-cell-renderer-Bqh1PrgH.js';
|
|
15
15
|
|
|
16
16
|
class ColumnDataProvider {
|
|
17
17
|
get stores() {
|
|
@@ -228,9 +228,15 @@ class DataProvider {
|
|
|
228
228
|
store.addTrimmed(trimmed);
|
|
229
229
|
this.dimensionProvider.setTrimmed(trimmed, type);
|
|
230
230
|
if (type === 'rgRow') {
|
|
231
|
-
this.dimensionProvider.setData(
|
|
231
|
+
this.dimensionProvider.setData(store.store.get('items').length, type);
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
+
/** Keep a row source empty until its current asynchronous update is ready. */
|
|
235
|
+
setItemsPending(pending, type = 'rgRow') {
|
|
236
|
+
const store = this.stores[type];
|
|
237
|
+
store.setItemsPending(pending);
|
|
238
|
+
this.dimensionProvider.setData(store.store.get('items').length, type, type !== 'rgRow');
|
|
239
|
+
}
|
|
234
240
|
}
|
|
235
241
|
|
|
236
242
|
const DEFAULT_VIRTUAL_X = ['rgCol'];
|
|
@@ -720,7 +726,7 @@ class ViewportService {
|
|
|
720
726
|
const changedItems = {};
|
|
721
727
|
for (const i of Object.keys(detail || {})) {
|
|
722
728
|
const size = detail[i];
|
|
723
|
-
const virtualIndex = parseInt(i, 10);
|
|
729
|
+
const virtualIndex = Number.parseInt(i, 10);
|
|
724
730
|
const item = getSourceItem(store, virtualIndex);
|
|
725
731
|
if (item) {
|
|
726
732
|
changedItems[virtualIndex] = Object.assign(Object.assign({}, item), { size });
|
|
@@ -849,29 +855,25 @@ class GridScrollingService {
|
|
|
849
855
|
this.elements = {};
|
|
850
856
|
}
|
|
851
857
|
async proxyScroll(e, key, skipEvent) {
|
|
852
|
-
var _a;
|
|
853
858
|
let newEventPromise;
|
|
854
859
|
let event = e;
|
|
855
|
-
for (
|
|
860
|
+
for (const elKey in (skipEvent ? {} : this.elements)) {
|
|
856
861
|
// skip
|
|
857
862
|
if (e.dimension === 'rgCol' && elKey === 'headerRow') {
|
|
858
863
|
continue;
|
|
859
864
|
// pinned column only
|
|
860
865
|
}
|
|
861
|
-
|
|
866
|
+
if (this.isPinnedColumn(key) && e.dimension === 'rgCol') {
|
|
862
867
|
if (elKey === key || !e.delta) {
|
|
863
868
|
continue;
|
|
864
869
|
}
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
}
|
|
870
|
+
const changedEvent = this.changeScroll(this.elements[elKey], e);
|
|
871
|
+
if (changedEvent) {
|
|
872
|
+
newEventPromise = changedEvent;
|
|
869
873
|
}
|
|
870
874
|
}
|
|
871
875
|
else {
|
|
872
|
-
|
|
873
|
-
await ((_a = el.setScroll) === null || _a === void 0 ? void 0 : _a.call(el, e));
|
|
874
|
-
}
|
|
876
|
+
await this.setScroll(this.elements[elKey], e);
|
|
875
877
|
}
|
|
876
878
|
}
|
|
877
879
|
const newEvent = await newEventPromise;
|
|
@@ -881,12 +883,27 @@ class GridScrollingService {
|
|
|
881
883
|
this.setViewport(skipEvent && this.isPinnedColumn(key)
|
|
882
884
|
? Object.assign(Object.assign({}, event), { dimension: key }) : event);
|
|
883
885
|
}
|
|
886
|
+
changeScroll(elements, e) {
|
|
887
|
+
let changedEvent;
|
|
888
|
+
for (const element of elements) {
|
|
889
|
+
if (element.changeScroll) {
|
|
890
|
+
changedEvent = element.changeScroll(e);
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
return changedEvent;
|
|
894
|
+
}
|
|
895
|
+
async setScroll(elements, e) {
|
|
896
|
+
var _a;
|
|
897
|
+
for (const element of elements) {
|
|
898
|
+
await ((_a = element.setScroll) === null || _a === void 0 ? void 0 : _a.call(element, e));
|
|
899
|
+
}
|
|
900
|
+
}
|
|
884
901
|
/**
|
|
885
902
|
* Silent scroll update for mobile devices when we have negative scroll top
|
|
886
903
|
*/
|
|
887
904
|
async scrollSilentService(e, key) {
|
|
888
905
|
var _a;
|
|
889
|
-
for (
|
|
906
|
+
for (const elKey in this.elements) {
|
|
890
907
|
// skip same element update
|
|
891
908
|
if (elKey === key) {
|
|
892
909
|
continue;
|
|
@@ -894,7 +911,7 @@ class GridScrollingService {
|
|
|
894
911
|
if (columnTypes.includes(key) &&
|
|
895
912
|
(elKey === 'headerRow' ||
|
|
896
913
|
columnTypes.includes(elKey))) {
|
|
897
|
-
for (
|
|
914
|
+
for (const el of this.elements[elKey]) {
|
|
898
915
|
await ((_a = el.changeScroll) === null || _a === void 0 ? void 0 : _a.call(el, e, true));
|
|
899
916
|
}
|
|
900
917
|
continue;
|
|
@@ -902,7 +919,7 @@ class GridScrollingService {
|
|
|
902
919
|
}
|
|
903
920
|
}
|
|
904
921
|
isPinnedColumn(key) {
|
|
905
|
-
return !!key && ['colPinStart', 'colPinEnd'].
|
|
922
|
+
return !!key && ['colPinStart', 'colPinEnd'].includes(key);
|
|
906
923
|
}
|
|
907
924
|
registerElements(els) {
|
|
908
925
|
this.elements = els;
|
|
@@ -1183,9 +1200,11 @@ class SelectionStoreConnector {
|
|
|
1183
1200
|
continue;
|
|
1184
1201
|
}
|
|
1185
1202
|
const lastCell = store.store.get('lastCell');
|
|
1186
|
-
if (lastCell) {
|
|
1187
|
-
store.
|
|
1203
|
+
if (!lastCell || lastCell.x <= 0 || lastCell.y <= 0) {
|
|
1204
|
+
store.setRangeArea(null);
|
|
1205
|
+
continue;
|
|
1188
1206
|
}
|
|
1207
|
+
store.setRange({ x: 0, y: 0 }, { x: lastCell.x - 1, y: lastCell.y - 1 });
|
|
1189
1208
|
}
|
|
1190
1209
|
}
|
|
1191
1210
|
}
|
|
@@ -1417,7 +1436,7 @@ class PluginService {
|
|
|
1417
1436
|
return;
|
|
1418
1437
|
}
|
|
1419
1438
|
// Step 1: Identify plugins to remove, compare new and old plugins
|
|
1420
|
-
const pluginsToRemove = (prevPlugins === null || prevPlugins === void 0 ? void 0 : prevPlugins.filter(prevPlugin => !plugins.
|
|
1439
|
+
const pluginsToRemove = (prevPlugins === null || prevPlugins === void 0 ? void 0 : prevPlugins.filter(prevPlugin => !plugins.includes(prevPlugin))) || [];
|
|
1421
1440
|
// Step 2: Remove old plugins
|
|
1422
1441
|
pluginsToRemove.forEach(plugin => {
|
|
1423
1442
|
var _a, _b;
|
|
@@ -1430,7 +1449,7 @@ class PluginService {
|
|
|
1430
1449
|
// Step 3: Register user plugins
|
|
1431
1450
|
plugins === null || plugins === void 0 ? void 0 : plugins.forEach(userPlugin => {
|
|
1432
1451
|
// check if plugin already exists, if so, skip
|
|
1433
|
-
const existingPlugin = this.internalPlugins.
|
|
1452
|
+
const existingPlugin = this.internalPlugins.some(createdPlugin => createdPlugin instanceof userPlugin);
|
|
1434
1453
|
if (existingPlugin) {
|
|
1435
1454
|
return;
|
|
1436
1455
|
}
|
|
@@ -1638,7 +1657,12 @@ const RevoGridComponent = class {
|
|
|
1638
1657
|
/** When true, grid in read only mode. */
|
|
1639
1658
|
this.readonly = false;
|
|
1640
1659
|
/** When true, columns are resizable. */
|
|
1641
|
-
this.resize =
|
|
1660
|
+
this.resize = true;
|
|
1661
|
+
/**
|
|
1662
|
+
* Enables row resizing. Pass a configuration object to customize the
|
|
1663
|
+
* height limits or enable resize edges across the full row.
|
|
1664
|
+
*/
|
|
1665
|
+
this.resizeRow = false;
|
|
1642
1666
|
/**
|
|
1643
1667
|
* Prevents horizontal scroll state from being mirrored across viewport sections.
|
|
1644
1668
|
*/
|
|
@@ -1709,15 +1733,15 @@ const RevoGridComponent = class {
|
|
|
1709
1733
|
*/
|
|
1710
1734
|
this.autoSizeColumn = false;
|
|
1711
1735
|
/**
|
|
1712
|
-
* Enables filter plugin.
|
|
1736
|
+
* Enables filter plugin. Enabled by default; set to `false` to opt out.
|
|
1713
1737
|
* Can be boolean.
|
|
1714
1738
|
* Or can be filter collection See `FilterCollection` for more info.
|
|
1715
1739
|
*/
|
|
1716
|
-
this.filter =
|
|
1740
|
+
this.filter = true;
|
|
1717
1741
|
/**
|
|
1718
1742
|
* Enable column move plugin.
|
|
1719
1743
|
*/
|
|
1720
|
-
this.canMoveColumns =
|
|
1744
|
+
this.canMoveColumns = true;
|
|
1721
1745
|
/**
|
|
1722
1746
|
* Trimmed rows.
|
|
1723
1747
|
* Functionality which allows to hide rows from main data set.
|
|
@@ -1727,7 +1751,7 @@ const RevoGridComponent = class {
|
|
|
1727
1751
|
/**
|
|
1728
1752
|
* Enable export plugin.
|
|
1729
1753
|
*/
|
|
1730
|
-
this.exporting =
|
|
1754
|
+
this.exporting = true;
|
|
1731
1755
|
/**
|
|
1732
1756
|
* Stretch strategy for columns by `StretchColumn` plugin.
|
|
1733
1757
|
* For example if there are more space on the right last column size would be increased.
|
|
@@ -1819,7 +1843,7 @@ const RevoGridComponent = class {
|
|
|
1819
1843
|
var _a;
|
|
1820
1844
|
if (this.dataProvider && this.columnProvider && !skipDataUpdate) {
|
|
1821
1845
|
const columnProp = (_a = this.columnProvider.getColumn(col, colType)) === null || _a === void 0 ? void 0 : _a.prop;
|
|
1822
|
-
if (
|
|
1846
|
+
if (columnProp !== undefined) {
|
|
1823
1847
|
this.dataProvider.setCellData({
|
|
1824
1848
|
type: rowType,
|
|
1825
1849
|
rowIndex: row,
|
|
@@ -2548,6 +2572,7 @@ const RevoGridComponent = class {
|
|
|
2548
2572
|
this.pluginService.add(new SortingPlugin(this.element, pluginData));
|
|
2549
2573
|
// register grouping plugin
|
|
2550
2574
|
this.pluginService.add(new GroupingRowPlugin(this.element, pluginData));
|
|
2575
|
+
this.pluginService.add(RowResizePlugin.fromGridProperty(this.element, pluginData));
|
|
2551
2576
|
if (this.canMoveColumns) {
|
|
2552
2577
|
this.pluginService.add(new ColumnMovePlugin(this.element, pluginData));
|
|
2553
2578
|
}
|
|
@@ -47,5 +47,5 @@ var patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
47
47
|
|
|
48
48
|
patchBrowser().then(async (options) => {
|
|
49
49
|
await globalScripts();
|
|
50
|
-
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);
|
|
50
|
+
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);
|
|
51
51
|
});
|