@revolist/revogrid 4.9.2 → 4.9.3
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/{base.plugin-d48d867d.js → base.plugin-bf5f43a0.js} +2 -2
- package/dist/cjs/{base.plugin-d48d867d.js.map → base.plugin-bf5f43a0.js.map} +1 -1
- package/dist/cjs/{column.service-6f691f50.js → column.service-01f4a6c7.js} +25 -6
- package/dist/cjs/column.service-01f4a6c7.js.map +1 -0
- package/dist/cjs/{dimension.helpers-e9d22516.js → dimension.helpers-a6788214.js} +10 -5
- package/dist/cjs/dimension.helpers-a6788214.js.map +1 -0
- package/dist/cjs/{header-cell-renderer-81a22b00.js → header-cell-renderer-3bc70679.js} +10 -8
- package/dist/cjs/header-cell-renderer-3bc70679.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/revo-grid.cjs.entry.js +81 -93
- package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-attribution_6.cjs.entry.js +58 -39
- package/dist/cjs/revogr-attribution_6.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js +9 -7
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-data_4.cjs.entry.js +45 -36
- package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/{selection.helpers-8fa19c04.js → selection.helpers-1a8c8d49.js} +32 -31
- package/dist/cjs/selection.helpers-1a8c8d49.js.map +1 -0
- package/dist/cjs/{throttle-bcc4740d.js → throttle-52be9e67.js} +4 -3
- package/dist/cjs/throttle-52be9e67.js.map +1 -0
- package/dist/cjs/{viewport.store-9cf01c71.js → viewport.store-35a3e7ee.js} +13 -9
- package/dist/cjs/viewport.store-35a3e7ee.js.map +1 -0
- package/dist/collection/components/clipboard/revogr-clipboard.js +5 -5
- package/dist/collection/components/clipboard/revogr-clipboard.js.map +1 -1
- package/dist/collection/components/data/cell-renderer.js +7 -4
- package/dist/collection/components/data/cell-renderer.js.map +1 -1
- package/dist/collection/components/data/column.service.js +1 -1
- package/dist/collection/components/data/column.service.js.map +1 -1
- package/dist/collection/components/data/revogr-data.js +1 -1
- package/dist/collection/components/data/revogr-data.js.map +1 -1
- package/dist/collection/components/editors/revogr-edit.js +6 -6
- package/dist/collection/components/editors/revogr-edit.js.map +1 -1
- package/dist/collection/components/editors/text-editor.js +3 -1
- package/dist/collection/components/editors/text-editor.js.map +1 -1
- package/dist/collection/components/header/header-renderer.js +2 -1
- package/dist/collection/components/header/header-renderer.js.map +1 -1
- package/dist/collection/components/header/resizable.directive.js +7 -5
- package/dist/collection/components/header/resizable.directive.js.map +1 -1
- package/dist/collection/components/header/resizable.element.js +1 -1
- package/dist/collection/components/header/resizable.element.js.map +1 -1
- package/dist/collection/components/overlay/autofill.service.js +5 -4
- package/dist/collection/components/overlay/autofill.service.js.map +1 -1
- package/dist/collection/components/overlay/keyboard.service.js.map +1 -1
- package/dist/collection/components/overlay/revogr-overlay-selection.js +54 -31
- package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -1
- package/dist/collection/components/overlay/selection.utils.js +4 -4
- package/dist/collection/components/overlay/selection.utils.js.map +1 -1
- package/dist/collection/components/revoGrid/grid.helpers.js +10 -8
- package/dist/collection/components/revoGrid/grid.helpers.js.map +1 -1
- package/dist/collection/components/revoGrid/revo-grid.js +42 -42
- package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
- package/dist/collection/components/revoGrid/viewport.helpers.js +19 -0
- package/dist/collection/components/revoGrid/viewport.helpers.js.map +1 -1
- package/dist/collection/components/revoGrid/viewport.scrolling.service.js +4 -3
- package/dist/collection/components/revoGrid/viewport.scrolling.service.js.map +1 -1
- package/dist/collection/components/revoGrid/viewport.service.js +27 -37
- package/dist/collection/components/revoGrid/viewport.service.js.map +1 -1
- package/dist/collection/components/rowHeaders/revogr-row-headers.js +2 -2
- package/dist/collection/components/rowHeaders/revogr-row-headers.js.map +1 -1
- package/dist/collection/components/scroll/revogr-viewport-scroll.js +34 -29
- package/dist/collection/components/scroll/revogr-viewport-scroll.js.map +1 -1
- package/dist/collection/components/scrollable/autohide-scroll.plugin.js +1 -1
- package/dist/collection/components/scrollable/autohide-scroll.plugin.js.map +1 -1
- package/dist/collection/components/scrollable/revogr-scroll-virtual.js +3 -3
- package/dist/collection/components/selectionFocus/revogr-focus.js +1 -1
- package/dist/collection/components/selectionFocus/revogr-focus.js.map +1 -1
- package/dist/collection/components/selectionTempRange/revogr-temp-range.js.map +1 -1
- package/dist/collection/components/vnode/vnode-converter.js +6 -6
- package/dist/collection/components/vnode/vnode-converter.js.map +1 -1
- package/dist/collection/components/vnode/vnode.utils.js.map +1 -1
- package/dist/collection/global/global.js.map +1 -1
- package/dist/collection/plugins/export/export.plugin.js +2 -2
- package/dist/collection/plugins/export/export.plugin.js.map +1 -1
- package/dist/collection/plugins/filter/filter.panel.js +4 -4
- package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js +1 -1
- package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js.map +1 -1
- package/dist/collection/plugins/groupingRow/grouping.row.plugin.js +2 -2
- package/dist/collection/plugins/groupingRow/grouping.row.plugin.js.map +1 -1
- package/dist/collection/plugins/groupingRow/grouping.service.js +1 -1
- package/dist/collection/plugins/groupingRow/grouping.service.js.map +1 -1
- package/dist/collection/plugins/moveColumn/column.drag.plugin.js +1 -1
- package/dist/collection/plugins/moveColumn/column.drag.plugin.js.map +1 -1
- package/dist/collection/plugins/sorting/sorting.plugin.js +9 -12
- package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -1
- package/dist/collection/services/cell.helpers.js +3 -2
- package/dist/collection/services/cell.helpers.js.map +1 -1
- package/dist/collection/services/column.data.provider.js.map +1 -1
- package/dist/collection/services/data.provider.js.map +1 -1
- package/dist/collection/services/dimension.provider.js +2 -1
- package/dist/collection/services/dimension.provider.js.map +1 -1
- package/dist/collection/services/local.scroll.service.js +3 -2
- package/dist/collection/services/local.scroll.service.js.map +1 -1
- package/dist/collection/services/selection.store.connector.js +20 -16
- package/dist/collection/services/selection.store.connector.js.map +1 -1
- package/dist/collection/store/selection/selection.helpers.js +8 -12
- package/dist/collection/store/selection/selection.helpers.js.map +1 -1
- package/dist/collection/store/selection/selection.store.js +2 -1
- package/dist/collection/store/selection/selection.store.js.map +1 -1
- package/dist/collection/store/vp/viewport.helpers.js +10 -6
- package/dist/collection/store/vp/viewport.helpers.js.map +1 -1
- package/dist/collection/store/vp/viewport.store.js +1 -1
- package/dist/collection/store/vp/viewport.store.js.map +1 -1
- package/dist/collection/themeManager/theme.service.js +1 -1
- package/dist/collection/themeManager/theme.service.js.map +1 -1
- package/dist/collection/types/interfaces.js.map +1 -1
- package/dist/collection/types/selection.js.map +1 -1
- package/dist/collection/types/viewport.interfaces.js.map +1 -1
- package/dist/collection/utils/closest.polifill.js.map +1 -1
- package/dist/collection/utils/store.utils.js +9 -4
- package/dist/collection/utils/store.utils.js.map +1 -1
- package/dist/esm/{base.plugin-78393655.js → base.plugin-5e7a3c51.js} +2 -2
- package/dist/esm/{base.plugin-78393655.js.map → base.plugin-5e7a3c51.js.map} +1 -1
- package/dist/esm/{column.service-0e41057a.js → column.service-5d14e7e9.js} +25 -6
- package/dist/esm/column.service-5d14e7e9.js.map +1 -0
- package/dist/esm/{dimension.helpers-91398565.js → dimension.helpers-56298828.js} +10 -5
- package/dist/esm/dimension.helpers-56298828.js.map +1 -0
- package/dist/esm/{header-cell-renderer-6d8ac25d.js → header-cell-renderer-fc999784.js} +10 -8
- package/dist/esm/header-cell-renderer-fc999784.js.map +1 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/revo-grid.entry.js +81 -93
- package/dist/esm/revo-grid.entry.js.map +1 -1
- package/dist/esm/revogr-attribution_6.entry.js +58 -39
- package/dist/esm/revogr-attribution_6.entry.js.map +1 -1
- package/dist/esm/revogr-clipboard_3.entry.js +9 -7
- package/dist/esm/revogr-clipboard_3.entry.js.map +1 -1
- package/dist/esm/revogr-data_4.entry.js +45 -36
- package/dist/esm/revogr-data_4.entry.js.map +1 -1
- package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
- package/dist/esm/{selection.helpers-50e9f09d.js → selection.helpers-accaad4a.js} +32 -31
- package/dist/esm/selection.helpers-accaad4a.js.map +1 -0
- package/dist/esm/{throttle-1b1dd9d2.js → throttle-7283692c.js} +4 -3
- package/dist/esm/throttle-7283692c.js.map +1 -0
- package/dist/esm/{viewport.store-bfd0b036.js → viewport.store-d8e03528.js} +13 -9
- package/dist/esm/viewport.store-d8e03528.js.map +1 -0
- package/dist/revo-grid/{base.plugin-78393655.js → base.plugin-5e7a3c51.js} +2 -2
- package/dist/revo-grid/column.service-5d14e7e9.js +5 -0
- package/dist/revo-grid/column.service-5d14e7e9.js.map +1 -0
- package/dist/revo-grid/{dimension.helpers-91398565.js → dimension.helpers-56298828.js} +2 -2
- package/dist/revo-grid/{dimension.helpers-91398565.js.map → dimension.helpers-56298828.js.map} +1 -1
- package/dist/revo-grid/header-cell-renderer-fc999784.js +5 -0
- package/dist/revo-grid/header-cell-renderer-fc999784.js.map +1 -0
- package/dist/revo-grid/index.esm.js +1 -1
- package/dist/revo-grid/revo-grid.entry.js +1 -1
- package/dist/revo-grid/revo-grid.entry.js.map +1 -1
- package/dist/revo-grid/revogr-attribution_6.entry.js +1 -1
- package/dist/revo-grid/revogr-attribution_6.entry.js.map +1 -1
- package/dist/revo-grid/revogr-clipboard_3.entry.js +1 -1
- package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
- package/dist/revo-grid/revogr-data_4.entry.js +1 -1
- package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
- package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
- package/dist/revo-grid/selection.helpers-accaad4a.js +5 -0
- package/dist/revo-grid/selection.helpers-accaad4a.js.map +1 -0
- package/dist/revo-grid/{throttle-1b1dd9d2.js → throttle-7283692c.js} +2 -2
- package/dist/revo-grid/throttle-7283692c.js.map +1 -0
- package/dist/revo-grid/viewport.store-d8e03528.js +5 -0
- package/dist/revo-grid/viewport.store-d8e03528.js.map +1 -0
- package/dist/types/components/data/column.service.d.ts +1 -1
- package/dist/types/components/data/row-highlight.plugin.d.ts +1 -1
- package/dist/types/components/editors/revogr-edit.d.ts +1 -1
- package/dist/types/components/editors/text-editor.d.ts +3 -3
- package/dist/types/components/header/header-renderer.d.ts +2 -2
- package/dist/types/components/header/resizable.directive.d.ts +2 -2
- package/dist/types/components/overlay/autofill.service.d.ts +6 -6
- package/dist/types/components/overlay/keyboard.service.d.ts +4 -4
- package/dist/types/components/overlay/revogr-overlay-selection.d.ts +9 -9
- package/dist/types/components/overlay/selection.utils.d.ts +3 -3
- package/dist/types/components/revoGrid/revo-grid.d.ts +7 -6
- package/dist/types/components/revoGrid/viewport.helpers.d.ts +18 -3
- package/dist/types/components/revoGrid/viewport.scrolling.service.d.ts +1 -1
- package/dist/types/components/revoGrid/viewport.service.d.ts +2 -6
- package/dist/types/components/scroll/revogr-viewport-scroll.d.ts +6 -6
- package/dist/types/components/selectionTempRange/revogr-temp-range.d.ts +1 -1
- package/dist/types/components/vnode/vnode-converter.d.ts +1 -1
- package/dist/types/components/vnode/vnode.utils.d.ts +1 -1
- package/dist/types/components.d.ts +15 -14
- package/dist/types/plugins/column.auto-size.plugin.d.ts +2 -2
- package/dist/types/plugins/export/export.plugin.d.ts +3 -3
- package/dist/types/plugins/filter/filter.button.d.ts +1 -1
- package/dist/types/plugins/filter/filter.panel.d.ts +1 -1
- package/dist/types/plugins/groupingRow/grouping.row.plugin.d.ts +1 -1
- package/dist/types/plugins/groupingRow/grouping.service.d.ts +3 -3
- package/dist/types/plugins/sorting/sorting.plugin.d.ts +8 -8
- package/dist/types/services/column.data.provider.d.ts +1 -1
- package/dist/types/services/data.provider.d.ts +1 -1
- package/dist/types/services/dimension.provider.d.ts +3 -2
- package/dist/types/services/selection.store.connector.d.ts +9 -9
- package/dist/types/store/selection/selection.helpers.d.ts +1 -1
- package/dist/types/store/selection/selection.store.d.ts +4 -4
- package/dist/types/store/vp/viewport.helpers.d.ts +2 -2
- package/dist/types/themeManager/theme.service.d.ts +1 -1
- package/dist/types/types/interfaces.d.ts +4 -1
- package/dist/types/types/viewport.interfaces.d.ts +2 -2
- package/dist/types/utils/store.utils.d.ts +7 -4
- package/hydrate/index.js +258 -208
- package/hydrate/index.mjs +258 -208
- package/package.json +1 -1
- package/standalone/column.service.js +32 -31
- package/standalone/column.service.js.map +1 -1
- package/standalone/data.store.js +9 -4
- package/standalone/data.store.js.map +1 -1
- package/standalone/index.js.map +1 -1
- package/standalone/local.scroll.timer.js +3 -2
- package/standalone/local.scroll.timer.js.map +1 -1
- package/standalone/revo-grid.js +76 -88
- package/standalone/revo-grid.js.map +1 -1
- package/standalone/revogr-clipboard2.js +3 -3
- package/standalone/revogr-clipboard2.js.map +1 -1
- package/standalone/revogr-data2.js +7 -4
- package/standalone/revogr-data2.js.map +1 -1
- package/standalone/revogr-edit2.js +5 -3
- package/standalone/revogr-edit2.js.map +1 -1
- package/standalone/revogr-filter-panel.js.map +1 -1
- package/standalone/revogr-focus2.js.map +1 -1
- package/standalone/revogr-header2.js +11 -8
- package/standalone/revogr-header2.js.map +1 -1
- package/standalone/revogr-overlay-selection2.js +47 -28
- package/standalone/revogr-overlay-selection2.js.map +1 -1
- package/standalone/revogr-row-headers2.js +12 -8
- package/standalone/revogr-row-headers2.js.map +1 -1
- package/standalone/revogr-scroll-virtual2.js +1 -1
- package/standalone/revogr-scroll-virtual2.js.map +1 -1
- package/standalone/revogr-temp-range2.js.map +1 -1
- package/standalone/revogr-viewport-scroll2.js +47 -23
- package/standalone/revogr-viewport-scroll2.js.map +1 -1
- package/standalone/selection.utils.js +4 -4
- package/standalone/selection.utils.js.map +1 -1
- package/standalone/vnode-converter.js +3 -3
- package/standalone/vnode-converter.js.map +1 -1
- package/dist/cjs/column.service-6f691f50.js.map +0 -1
- package/dist/cjs/dimension.helpers-e9d22516.js.map +0 -1
- package/dist/cjs/header-cell-renderer-81a22b00.js.map +0 -1
- package/dist/cjs/selection.helpers-8fa19c04.js.map +0 -1
- package/dist/cjs/throttle-bcc4740d.js.map +0 -1
- package/dist/cjs/viewport.store-9cf01c71.js.map +0 -1
- package/dist/esm/column.service-0e41057a.js.map +0 -1
- package/dist/esm/dimension.helpers-91398565.js.map +0 -1
- package/dist/esm/header-cell-renderer-6d8ac25d.js.map +0 -1
- package/dist/esm/selection.helpers-50e9f09d.js.map +0 -1
- package/dist/esm/throttle-1b1dd9d2.js.map +0 -1
- package/dist/esm/viewport.store-bfd0b036.js.map +0 -1
- package/dist/revo-grid/column.service-0e41057a.js +0 -5
- package/dist/revo-grid/column.service-0e41057a.js.map +0 -1
- package/dist/revo-grid/header-cell-renderer-6d8ac25d.js +0 -5
- package/dist/revo-grid/header-cell-renderer-6d8ac25d.js.map +0 -1
- package/dist/revo-grid/selection.helpers-50e9f09d.js +0 -5
- package/dist/revo-grid/selection.helpers-50e9f09d.js.map +0 -1
- package/dist/revo-grid/throttle-1b1dd9d2.js.map +0 -1
- package/dist/revo-grid/viewport.store-bfd0b036.js +0 -5
- package/dist/revo-grid/viewport.store-bfd0b036.js.map +0 -1
- /package/dist/revo-grid/{base.plugin-78393655.js.map → base.plugin-5e7a3c51.js.map} +0 -0
package/hydrate/index.js
CHANGED
|
@@ -2311,10 +2311,10 @@ class Clipboard {
|
|
|
2311
2311
|
}
|
|
2312
2312
|
const clipboardData = this.getData(e);
|
|
2313
2313
|
const isHTML = ((clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.types.indexOf('text/html')) || -1) > -1;
|
|
2314
|
-
const data = isHTML
|
|
2314
|
+
const data = (isHTML
|
|
2315
2315
|
? clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text/html')
|
|
2316
|
-
: clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text');
|
|
2317
|
-
const dataText = clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text');
|
|
2316
|
+
: clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text')) || '';
|
|
2317
|
+
const dataText = (clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text')) || '';
|
|
2318
2318
|
const beforePaste = this.beforePaste.emit({
|
|
2319
2319
|
raw: data,
|
|
2320
2320
|
dataText,
|
|
@@ -6832,11 +6832,16 @@ function gatherTrimmedItems(trimmedItems) {
|
|
|
6832
6832
|
return trimmed;
|
|
6833
6833
|
}
|
|
6834
6834
|
|
|
6835
|
-
/**
|
|
6835
|
+
/**
|
|
6836
|
+
* Sets the given data on the specified store.
|
|
6837
|
+
*
|
|
6838
|
+
* @param store - The store to set data on.
|
|
6839
|
+
* @param data - The data to set on the store.
|
|
6840
|
+
*/
|
|
6836
6841
|
function setStore(store, data) {
|
|
6837
|
-
|
|
6838
|
-
store.set(key,
|
|
6839
|
-
}
|
|
6842
|
+
Object.entries(data).forEach(([key, value]) => {
|
|
6843
|
+
store.set(key, value);
|
|
6844
|
+
});
|
|
6840
6845
|
}
|
|
6841
6846
|
|
|
6842
6847
|
/**
|
|
@@ -7650,7 +7655,8 @@ class SelectionStore {
|
|
|
7650
7655
|
setStore(this.store, { range, edit: null, tempRange: null });
|
|
7651
7656
|
}
|
|
7652
7657
|
setRange(start, end) {
|
|
7653
|
-
|
|
7658
|
+
const range = getRange(start, end);
|
|
7659
|
+
this.setRangeArea(range);
|
|
7654
7660
|
}
|
|
7655
7661
|
setLastCell(lastCell) {
|
|
7656
7662
|
setStore(this.store, { lastCell });
|
|
@@ -7749,7 +7755,7 @@ class SelectionStoreConnector {
|
|
|
7749
7755
|
return this.columnStores[x];
|
|
7750
7756
|
}
|
|
7751
7757
|
this.columnStores[x] = new SelectionStore();
|
|
7752
|
-
// build cross
|
|
7758
|
+
// build cross-linking type to position
|
|
7753
7759
|
this.storesByType[type] = x;
|
|
7754
7760
|
this.storesXToType[x] = type;
|
|
7755
7761
|
return this.columnStores[x];
|
|
@@ -7800,13 +7806,13 @@ class SelectionStoreConnector {
|
|
|
7800
7806
|
(_b = this.rowStores[y]) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
7801
7807
|
delete this.rowStores[y];
|
|
7802
7808
|
delete this.columnStores[x];
|
|
7803
|
-
// clear x cross
|
|
7809
|
+
// clear x cross-link
|
|
7804
7810
|
if (this.storesXToType[x]) {
|
|
7805
7811
|
const type = this.storesXToType[x];
|
|
7806
7812
|
delete this.storesXToType[x];
|
|
7807
7813
|
delete this.storesByType[type];
|
|
7808
7814
|
}
|
|
7809
|
-
// clear y cross
|
|
7815
|
+
// clear y cross-link
|
|
7810
7816
|
if (this.storesYToType[y]) {
|
|
7811
7817
|
const type = this.storesYToType[y];
|
|
7812
7818
|
delete this.storesYToType[y];
|
|
@@ -7836,9 +7842,10 @@ class SelectionStoreConnector {
|
|
|
7836
7842
|
return;
|
|
7837
7843
|
}
|
|
7838
7844
|
// Get the next store based on the current focus and the last cell.
|
|
7839
|
-
const
|
|
7845
|
+
const lastCell = this.focusedStore.entity.store.get('lastCell');
|
|
7846
|
+
const next = lastCell && this.getNextStore(focus, this.focusedStore.position, lastCell);
|
|
7840
7847
|
// Set the next focus cell in the store.
|
|
7841
|
-
(_a = next.store) === null || _a === void 0 ? void 0 : _a.setNextFocus(Object.assign(Object.assign({}, focus), next.item));
|
|
7848
|
+
(_a = next === null || next === void 0 ? void 0 : next.store) === null || _a === void 0 ? void 0 : _a.setNextFocus(Object.assign(Object.assign({}, focus), next.item));
|
|
7842
7849
|
}
|
|
7843
7850
|
focusByCell(storePos, start, end) {
|
|
7844
7851
|
const store = this.stores[storePos.y][storePos.x];
|
|
@@ -7851,15 +7858,17 @@ class SelectionStoreConnector {
|
|
|
7851
7858
|
}
|
|
7852
7859
|
// check for the focus in nearby store/viewport
|
|
7853
7860
|
const lastCell = store.store.get('lastCell');
|
|
7854
|
-
const next = this.getNextStore(focus, currentStorePointer, lastCell);
|
|
7861
|
+
const next = lastCell && this.getNextStore(focus, currentStorePointer, lastCell);
|
|
7855
7862
|
// if next store present - update
|
|
7856
7863
|
if (next === null || next === void 0 ? void 0 : next.store) {
|
|
7857
7864
|
const item = Object.assign(Object.assign({}, focus), next.item);
|
|
7858
7865
|
this.focus(next.store, { focus: item, end: item });
|
|
7859
7866
|
return null;
|
|
7860
7867
|
}
|
|
7861
|
-
|
|
7862
|
-
|
|
7868
|
+
if (lastCell) {
|
|
7869
|
+
focus = cropCellToMax(focus, lastCell);
|
|
7870
|
+
end = cropCellToMax(end, lastCell);
|
|
7871
|
+
}
|
|
7863
7872
|
store.setFocus(focus, end);
|
|
7864
7873
|
return focus;
|
|
7865
7874
|
}
|
|
@@ -7896,10 +7905,9 @@ class SelectionStoreConnector {
|
|
|
7896
7905
|
getNextStore(focus, currentStorePointer, lastCell) {
|
|
7897
7906
|
// item in new store
|
|
7898
7907
|
const nextItem = nextCell(focus, lastCell);
|
|
7899
|
-
let nextStore
|
|
7908
|
+
let nextStore;
|
|
7900
7909
|
if (nextItem) {
|
|
7901
|
-
|
|
7902
|
-
let type = i;
|
|
7910
|
+
Object.entries(nextItem).forEach(([type, nextItemCoord]) => {
|
|
7903
7911
|
let stores;
|
|
7904
7912
|
switch (type) {
|
|
7905
7913
|
case 'x':
|
|
@@ -7909,20 +7917,20 @@ class SelectionStoreConnector {
|
|
|
7909
7917
|
case 'y':
|
|
7910
7918
|
// Get the Y stores for the current X coordinate of the current store pointer
|
|
7911
7919
|
stores = this.getYStores(currentStorePointer.x);
|
|
7912
|
-
stores = this.getYStores(currentStorePointer.x);
|
|
7913
7920
|
break;
|
|
7914
7921
|
}
|
|
7915
|
-
|
|
7922
|
+
// Get the next store based on the item in the new store
|
|
7923
|
+
if (nextItemCoord >= 0) {
|
|
7916
7924
|
nextStore = stores[++currentStorePointer[type]];
|
|
7917
7925
|
}
|
|
7918
7926
|
else {
|
|
7919
7927
|
nextStore = stores[--currentStorePointer[type]];
|
|
7920
7928
|
const nextLastCell = nextStore === null || nextStore === void 0 ? void 0 : nextStore.store.get('lastCell');
|
|
7921
7929
|
if (nextLastCell) {
|
|
7922
|
-
nextItem[type] = nextLastCell[type] +
|
|
7930
|
+
nextItem[type] = nextLastCell[type] + nextItemCoord;
|
|
7923
7931
|
}
|
|
7924
7932
|
}
|
|
7925
|
-
}
|
|
7933
|
+
});
|
|
7926
7934
|
}
|
|
7927
7935
|
return {
|
|
7928
7936
|
store: nextStore,
|
|
@@ -7954,7 +7962,9 @@ class SelectionStoreConnector {
|
|
|
7954
7962
|
continue;
|
|
7955
7963
|
}
|
|
7956
7964
|
const lastCell = store.store.get('lastCell');
|
|
7957
|
-
|
|
7965
|
+
if (lastCell) {
|
|
7966
|
+
store.setRange({ x: 0, y: 0 }, { x: lastCell.x - 1, y: lastCell.y - 1 });
|
|
7967
|
+
}
|
|
7958
7968
|
}
|
|
7959
7969
|
}
|
|
7960
7970
|
}
|
|
@@ -7993,21 +8003,17 @@ function nextCell(cell, lastCell) {
|
|
|
7993
8003
|
return null;
|
|
7994
8004
|
}
|
|
7995
8005
|
function cropCellToMax(cell, lastCell) {
|
|
7996
|
-
const
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
newCell[t] = 0;
|
|
8006
|
+
const croppedCell = Object.assign({}, cell);
|
|
8007
|
+
const cellCoordinates = ['x', 'y'];
|
|
8008
|
+
for (const coordinate of cellCoordinates) {
|
|
8009
|
+
if (cell[coordinate] < 0) {
|
|
8010
|
+
croppedCell[coordinate] = 0;
|
|
8002
8011
|
}
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
for (let t of types) {
|
|
8006
|
-
if (cell[t] >= lastCell[t]) {
|
|
8007
|
-
newCell[t] = lastCell[t] - 1;
|
|
8012
|
+
else if (cell[coordinate] >= lastCell[coordinate]) {
|
|
8013
|
+
croppedCell[coordinate] = lastCell[coordinate] - 1;
|
|
8008
8014
|
}
|
|
8009
8015
|
}
|
|
8010
|
-
return
|
|
8016
|
+
return croppedCell;
|
|
8011
8017
|
}
|
|
8012
8018
|
function getRange(start, end) {
|
|
8013
8019
|
return start && end
|
|
@@ -8123,6 +8129,7 @@ function getItems(opt, currentSize = 0) {
|
|
|
8123
8129
|
return items;
|
|
8124
8130
|
}
|
|
8125
8131
|
function recombineByOffset(offset, data) {
|
|
8132
|
+
var _a, _b;
|
|
8126
8133
|
const newItems = [...data.items];
|
|
8127
8134
|
const itemsCount = newItems.length;
|
|
8128
8135
|
let newRange = {
|
|
@@ -8131,7 +8138,7 @@ function recombineByOffset(offset, data) {
|
|
|
8131
8138
|
};
|
|
8132
8139
|
// if offset out of revo-viewport, makes sense whole redraw
|
|
8133
8140
|
if (offset > itemsCount) {
|
|
8134
|
-
return
|
|
8141
|
+
return undefined;
|
|
8135
8142
|
}
|
|
8136
8143
|
// is direction of scroll positive
|
|
8137
8144
|
if (data.positiveDirection) {
|
|
@@ -8170,19 +8177,21 @@ function recombineByOffset(offset, data) {
|
|
|
8170
8177
|
let firstItem = getFirstItem(data);
|
|
8171
8178
|
const end = newRange.end;
|
|
8172
8179
|
for (let i = 0; i < offset; i++) {
|
|
8173
|
-
const newIndex = firstItem.itemIndex - 1;
|
|
8180
|
+
const newIndex = ((_a = firstItem === null || firstItem === void 0 ? void 0 : firstItem.itemIndex) !== null && _a !== void 0 ? _a : 0) - 1;
|
|
8174
8181
|
const size = getItemSize(newIndex, data.sizes, data.originItemSize);
|
|
8175
8182
|
// new item index to recombine
|
|
8176
8183
|
let newStart = end - i;
|
|
8177
8184
|
newStart = (newStart < 0 ? itemsCount + newStart : newStart) % itemsCount;
|
|
8178
8185
|
// item should always present, we do not create new item, we recombine them
|
|
8179
8186
|
if (!newItems[newStart]) {
|
|
8180
|
-
|
|
8187
|
+
console.error('incorrect index');
|
|
8188
|
+
break;
|
|
8181
8189
|
}
|
|
8182
8190
|
// do recombination
|
|
8191
|
+
const firstItemStart = (_b = firstItem === null || firstItem === void 0 ? void 0 : firstItem.start) !== null && _b !== void 0 ? _b : 0;
|
|
8183
8192
|
newItems[newStart] = firstItem = {
|
|
8184
|
-
start:
|
|
8185
|
-
end:
|
|
8193
|
+
start: firstItemStart - size,
|
|
8194
|
+
end: firstItemStart,
|
|
8186
8195
|
itemIndex: newIndex,
|
|
8187
8196
|
size: size,
|
|
8188
8197
|
};
|
|
@@ -8218,11 +8227,12 @@ function isActiveRange(pos, realSize, first, last) {
|
|
|
8218
8227
|
(pos > first.end && last.end === realSize));
|
|
8219
8228
|
}
|
|
8220
8229
|
function isActiveRangeOutsideLastItem(pos, virtualSize, firstItem, lastItem) {
|
|
8230
|
+
var _a;
|
|
8221
8231
|
// if no first item, means no items in viewport
|
|
8222
8232
|
if (!firstItem) {
|
|
8223
8233
|
return false;
|
|
8224
8234
|
}
|
|
8225
|
-
return virtualSize + pos > (lastItem === null || lastItem === void 0 ? void 0 : lastItem.end);
|
|
8235
|
+
return virtualSize + pos > ((_a = lastItem === null || lastItem === void 0 ? void 0 : lastItem.end) !== null && _a !== void 0 ? _a : 0);
|
|
8226
8236
|
}
|
|
8227
8237
|
function getFirstItem(s) {
|
|
8228
8238
|
return s.items[s.start];
|
|
@@ -8365,7 +8375,7 @@ class ViewportStore {
|
|
|
8365
8375
|
}
|
|
8366
8376
|
else if (isActiveRangeOutsideLastItem(pos, virtualSize, firstItem, lastItem)) {
|
|
8367
8377
|
const items = [...allItems.items];
|
|
8368
|
-
// check is any item missing for
|
|
8378
|
+
// check is any item missing for fulfill content
|
|
8369
8379
|
const missing = addMissingItems(firstItem, this.store.get('realCount'), virtualSize + pos - firstItem.start, allItems, {
|
|
8370
8380
|
sizes: dimension.sizes,
|
|
8371
8381
|
originItemSize: dimension.originItemSize,
|
|
@@ -8744,7 +8754,7 @@ function measureEqualDepth(groupA, groupB) {
|
|
|
8744
8754
|
}
|
|
8745
8755
|
function getParsedGroup(id) {
|
|
8746
8756
|
const parseGroup = JSON.parse(id);
|
|
8747
|
-
// extra precaution and type
|
|
8757
|
+
// extra precaution and type safeguard
|
|
8748
8758
|
if (!Array.isArray(parseGroup)) {
|
|
8749
8759
|
return null;
|
|
8750
8760
|
}
|
|
@@ -8860,7 +8870,7 @@ class ColumnService {
|
|
|
8860
8870
|
const data = this.rowDataModel(r, c);
|
|
8861
8871
|
return readOnly(data);
|
|
8862
8872
|
}
|
|
8863
|
-
return readOnly;
|
|
8873
|
+
return !!readOnly;
|
|
8864
8874
|
}
|
|
8865
8875
|
mergeProperties(r, c, defaultProps, model, extraPropsFunc) {
|
|
8866
8876
|
const cellClass = {
|
|
@@ -9301,18 +9311,18 @@ function getCurrentCell({ x, y }, { el, rows, cols }) {
|
|
|
9301
9311
|
return { x: rgCol.itemIndex, y: rgRow.itemIndex };
|
|
9302
9312
|
}
|
|
9303
9313
|
function getCoordinate(range, focus, changes, isMulti = false) {
|
|
9304
|
-
const updateCoordinate = (c) => {
|
|
9314
|
+
const updateCoordinate = (c, pos = 0) => {
|
|
9305
9315
|
const start = { x: range.x, y: range.y };
|
|
9306
9316
|
const end = isMulti ? { x: range.x1, y: range.y1 } : start;
|
|
9307
9317
|
const point = end[c] > focus[c] ? end : start;
|
|
9308
|
-
point[c] +=
|
|
9318
|
+
point[c] += pos;
|
|
9309
9319
|
return { start, end };
|
|
9310
9320
|
};
|
|
9311
9321
|
if (changes.x) {
|
|
9312
|
-
return updateCoordinate('x');
|
|
9322
|
+
return updateCoordinate('x', changes['x']);
|
|
9313
9323
|
}
|
|
9314
9324
|
if (changes.y) {
|
|
9315
|
-
return updateCoordinate('y');
|
|
9325
|
+
return updateCoordinate('y', changes['y']);
|
|
9316
9326
|
}
|
|
9317
9327
|
return null;
|
|
9318
9328
|
}
|
|
@@ -9716,8 +9726,9 @@ class AutoFillService {
|
|
|
9716
9726
|
this.sv.setTempRange(null);
|
|
9717
9727
|
}
|
|
9718
9728
|
else {
|
|
9729
|
+
const area = getRange(this.autoFillInitial, this.autoFillLast);
|
|
9719
9730
|
this.sv.setTempRange({
|
|
9720
|
-
area
|
|
9731
|
+
area,
|
|
9721
9732
|
type: this.autoFillType,
|
|
9722
9733
|
});
|
|
9723
9734
|
}
|
|
@@ -9752,7 +9763,7 @@ class AutoFillService {
|
|
|
9752
9763
|
range,
|
|
9753
9764
|
});
|
|
9754
9765
|
// If data apply was not prevented, apply new range
|
|
9755
|
-
if (!stopApply) {
|
|
9766
|
+
if (!stopApply && oldRange) {
|
|
9756
9767
|
this.applyRangeWithData(newRange, oldRange);
|
|
9757
9768
|
}
|
|
9758
9769
|
else {
|
|
@@ -9790,14 +9801,14 @@ class AutoFillService {
|
|
|
9790
9801
|
this.sv.setRange(range);
|
|
9791
9802
|
}
|
|
9792
9803
|
/** Apply range and copy data during range application */
|
|
9793
|
-
applyRangeWithData(newRange,
|
|
9804
|
+
applyRangeWithData(newRange, rangeToCopy) {
|
|
9794
9805
|
const rangeData = {
|
|
9795
9806
|
type: this.sv.dataStore.get('type'),
|
|
9796
9807
|
colType: this.sv.columnService.type,
|
|
9797
9808
|
newData: {},
|
|
9798
9809
|
mapping: {},
|
|
9799
9810
|
newRange,
|
|
9800
|
-
oldRange,
|
|
9811
|
+
oldRange: rangeToCopy,
|
|
9801
9812
|
};
|
|
9802
9813
|
const { mapping, changed } = this.sv.columnService.getRangeData(rangeData, this.sv.columnService.columns);
|
|
9803
9814
|
rangeData.newData = changed;
|
|
@@ -9864,7 +9875,6 @@ class OverlaySelection {
|
|
|
9864
9875
|
this.beforeCellSave = createEvent(this, "beforecellsave", 7);
|
|
9865
9876
|
this.keyboardService = null;
|
|
9866
9877
|
this.autoFillService = null;
|
|
9867
|
-
this.revogrEdit = null;
|
|
9868
9878
|
this.unsubscribeSelectionStore = [];
|
|
9869
9879
|
this.readonly = undefined;
|
|
9870
9880
|
this.range = undefined;
|
|
@@ -9884,19 +9894,21 @@ class OverlaySelection {
|
|
|
9884
9894
|
// #endregion
|
|
9885
9895
|
// #region Listeners
|
|
9886
9896
|
onMouseMove(e) {
|
|
9897
|
+
var _a;
|
|
9887
9898
|
if (this.selectionStore.get('focus')) {
|
|
9888
|
-
this.autoFillService.selectionMouseMove(e);
|
|
9899
|
+
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.selectionMouseMove(e);
|
|
9889
9900
|
}
|
|
9890
9901
|
}
|
|
9891
9902
|
/**
|
|
9892
|
-
* Action finished inside
|
|
9903
|
+
* Action finished inside the document.
|
|
9893
9904
|
* Pointer left document, clear any active operation.
|
|
9894
9905
|
*/
|
|
9895
9906
|
onMouseUp() {
|
|
9896
|
-
|
|
9907
|
+
var _a;
|
|
9908
|
+
// Clear autofill selection
|
|
9897
9909
|
// when pointer left document,
|
|
9898
9910
|
// clear any active operation.
|
|
9899
|
-
this.autoFillService.clearAutoFillSelection(this.selectionStore.get('focus'), this.selectionStore.get('range'));
|
|
9911
|
+
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.clearAutoFillSelection(this.selectionStore.get('focus'), this.selectionStore.get('range'));
|
|
9900
9912
|
}
|
|
9901
9913
|
/**
|
|
9902
9914
|
* Row drag started.
|
|
@@ -9940,10 +9952,10 @@ class OverlaySelection {
|
|
|
9940
9952
|
// clear subscriptions
|
|
9941
9953
|
this.unsubscribeSelectionStore.forEach(v => v());
|
|
9942
9954
|
this.unsubscribeSelectionStore.length = 0;
|
|
9943
|
-
this.unsubscribeSelectionStore.push(s.onChange('nextFocus', (v) => this.doFocus(v, v)));
|
|
9955
|
+
this.unsubscribeSelectionStore.push(s.onChange('nextFocus', (v) => v && this.doFocus(v, v)));
|
|
9944
9956
|
this.keyboardService = new KeyboardService({
|
|
9945
9957
|
selectionStore: s,
|
|
9946
|
-
range: r => this.triggerRangeEvent(r),
|
|
9958
|
+
range: r => !!r && this.triggerRangeEvent(r),
|
|
9947
9959
|
focus: (f, changes, focusNextViewport) => {
|
|
9948
9960
|
if (focusNextViewport) {
|
|
9949
9961
|
this.beforeNextViewportFocus.emit(f);
|
|
@@ -9960,7 +9972,8 @@ class OverlaySelection {
|
|
|
9960
9972
|
this.doEdit(val);
|
|
9961
9973
|
},
|
|
9962
9974
|
cancel: async () => {
|
|
9963
|
-
|
|
9975
|
+
var _a;
|
|
9976
|
+
await ((_a = this.revogrEdit) === null || _a === void 0 ? void 0 : _a.cancelChanges());
|
|
9964
9977
|
this.closeEdit();
|
|
9965
9978
|
},
|
|
9966
9979
|
clearCell: () => !this.readonly && this.clearCell(),
|
|
@@ -9982,7 +9995,7 @@ class OverlaySelection {
|
|
|
9982
9995
|
selectionChanged: e => this.selectionChange.emit(e),
|
|
9983
9996
|
rangeCopy: e => this.beforeRangeCopyApply.emit(e),
|
|
9984
9997
|
rangeDataApply: e => this.rangeEditApply.emit(e),
|
|
9985
|
-
setRange: e => this.triggerRangeEvent(e),
|
|
9998
|
+
setRange: e => !!e && this.triggerRangeEvent(e),
|
|
9986
9999
|
getData: () => this.getData(),
|
|
9987
10000
|
});
|
|
9988
10001
|
}
|
|
@@ -10044,6 +10057,7 @@ class OverlaySelection {
|
|
|
10044
10057
|
} }));
|
|
10045
10058
|
}
|
|
10046
10059
|
render() {
|
|
10060
|
+
var _a;
|
|
10047
10061
|
const nodes = [];
|
|
10048
10062
|
const editCell = this.renderEditor();
|
|
10049
10063
|
// Editor
|
|
@@ -10063,14 +10077,14 @@ class OverlaySelection {
|
|
|
10063
10077
|
}
|
|
10064
10078
|
// Autofill
|
|
10065
10079
|
if (focus && !this.readonly && this.range) {
|
|
10066
|
-
nodes.push(this.autoFillService.renderAutofill(range, focus));
|
|
10080
|
+
nodes.push((_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.renderAutofill(range, focus));
|
|
10067
10081
|
}
|
|
10068
10082
|
// Order
|
|
10069
10083
|
if (this.canDrag) {
|
|
10070
10084
|
nodes.push(hAsync("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, onRowdragstartinit: e => this.rowDragStart(e) }));
|
|
10071
10085
|
}
|
|
10072
10086
|
}
|
|
10073
|
-
return (hAsync(Host, { key: '
|
|
10087
|
+
return (hAsync(Host, { key: '0767a5d015d0c8fe99444ef26b136a3a11792724', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true) }, nodes, hAsync("slot", { key: '8551244579316e0d4ab61defa1c1c9bc1011f446', name: "data" })));
|
|
10074
10088
|
}
|
|
10075
10089
|
/**
|
|
10076
10090
|
* Executes the focus operation on the specified range of cells.
|
|
@@ -10125,6 +10139,7 @@ class OverlaySelection {
|
|
|
10125
10139
|
* Handle mouse down event on Host element
|
|
10126
10140
|
*/
|
|
10127
10141
|
onElementMouseDown(e, touch = false) {
|
|
10142
|
+
var _a;
|
|
10128
10143
|
// Get the target element from the event object
|
|
10129
10144
|
const targetElement = e.target;
|
|
10130
10145
|
// Ignore focus if clicked input
|
|
@@ -10141,7 +10156,7 @@ class OverlaySelection {
|
|
|
10141
10156
|
this.focus(focusCell, this.range && e.shiftKey);
|
|
10142
10157
|
// Initiate autofill selection
|
|
10143
10158
|
if (this.range) {
|
|
10144
|
-
this.autoFillService.selectionStart(targetElement, this.getData());
|
|
10159
|
+
targetElement && ((_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.selectionStart(targetElement, this.getData()));
|
|
10145
10160
|
// Prevent default behavior for mouse events,
|
|
10146
10161
|
// but only if target element is not a mobile input
|
|
10147
10162
|
if (!touch) {
|
|
@@ -10161,18 +10176,21 @@ class OverlaySelection {
|
|
|
10161
10176
|
var _a;
|
|
10162
10177
|
if (this.canEdit()) {
|
|
10163
10178
|
const focus = this.selectionStore.get('focus');
|
|
10179
|
+
if (!focus) {
|
|
10180
|
+
return;
|
|
10181
|
+
}
|
|
10164
10182
|
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
10165
10183
|
(_a = this.setEdit) === null || _a === void 0 ? void 0 : _a.emit(Object.assign(Object.assign({}, data), { val }));
|
|
10166
10184
|
}
|
|
10167
10185
|
}
|
|
10168
10186
|
/**
|
|
10169
10187
|
* Close editor event triggered
|
|
10170
|
-
* @param details - if requires focus next
|
|
10188
|
+
* @param details - if it requires focus next
|
|
10171
10189
|
*/
|
|
10172
|
-
closeEdit(e) {
|
|
10190
|
+
async closeEdit(e) {
|
|
10173
10191
|
this.cancelEdit.emit();
|
|
10174
10192
|
if (e === null || e === void 0 ? void 0 : e.detail) {
|
|
10175
|
-
this.focusNext();
|
|
10193
|
+
await this.focusNext();
|
|
10176
10194
|
}
|
|
10177
10195
|
}
|
|
10178
10196
|
/**
|
|
@@ -10192,6 +10210,7 @@ class OverlaySelection {
|
|
|
10192
10210
|
return range;
|
|
10193
10211
|
}
|
|
10194
10212
|
onCopy(e) {
|
|
10213
|
+
var _a;
|
|
10195
10214
|
const range = this.getRegion();
|
|
10196
10215
|
const canCopyEvent = this.beforeCopyRegion.emit(range);
|
|
10197
10216
|
if (canCopyEvent.defaultPrevented) {
|
|
@@ -10207,10 +10226,11 @@ class OverlaySelection {
|
|
|
10207
10226
|
rangeData = event.detail.data;
|
|
10208
10227
|
}
|
|
10209
10228
|
}
|
|
10210
|
-
this.clipboard.doCopy(e, rangeData);
|
|
10229
|
+
(_a = this.clipboard) === null || _a === void 0 ? void 0 : _a.doCopy(e, rangeData);
|
|
10211
10230
|
return true;
|
|
10212
10231
|
}
|
|
10213
10232
|
onPaste(data) {
|
|
10233
|
+
var _a;
|
|
10214
10234
|
const focus = this.selectionStore.get('focus');
|
|
10215
10235
|
const isEditing = this.selectionStore.get('edit') !== null;
|
|
10216
10236
|
if (!focus || isEditing) {
|
|
@@ -10221,24 +10241,30 @@ class OverlaySelection {
|
|
|
10221
10241
|
if (canPaste) {
|
|
10222
10242
|
return;
|
|
10223
10243
|
}
|
|
10224
|
-
this.autoFillService.onRangeApply(changed, range);
|
|
10244
|
+
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(changed, range);
|
|
10225
10245
|
}
|
|
10226
10246
|
async focusNext() {
|
|
10227
|
-
|
|
10247
|
+
var _a;
|
|
10248
|
+
const canFocus = await ((_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyChangeSelection(new KeyboardEvent('keydown', {
|
|
10228
10249
|
code: codesLetter.ARROW_DOWN,
|
|
10229
|
-
}), this.range);
|
|
10250
|
+
}), this.range));
|
|
10230
10251
|
if (!canFocus) {
|
|
10231
10252
|
this.closeEdit();
|
|
10232
10253
|
}
|
|
10233
10254
|
}
|
|
10234
10255
|
clearCell() {
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10256
|
+
var _a;
|
|
10257
|
+
const range = this.selectionStore.get('range');
|
|
10258
|
+
if (range &&
|
|
10259
|
+
!isRangeSingleCell(range)) {
|
|
10260
|
+
const data = this.columnService.getRangeStaticData(range, '');
|
|
10261
|
+
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(data, range);
|
|
10239
10262
|
}
|
|
10240
10263
|
else if (this.canEdit()) {
|
|
10241
10264
|
const focused = this.selectionStore.get('focus');
|
|
10265
|
+
if (!focused) {
|
|
10266
|
+
return;
|
|
10267
|
+
}
|
|
10242
10268
|
const cell = this.columnService.getSaveData(focused.y, focused.x);
|
|
10243
10269
|
this.cellEdit({
|
|
10244
10270
|
rgRow: focused.y,
|
|
@@ -10275,7 +10301,10 @@ class OverlaySelection {
|
|
|
10275
10301
|
const end = cell;
|
|
10276
10302
|
const start = this.selectionStore.get('focus');
|
|
10277
10303
|
if (isRangeEdit && start) {
|
|
10278
|
-
|
|
10304
|
+
const range = getRange(start, end);
|
|
10305
|
+
if (range) {
|
|
10306
|
+
return this.triggerRangeEvent(range);
|
|
10307
|
+
}
|
|
10279
10308
|
}
|
|
10280
10309
|
return this.doFocus(cell, end);
|
|
10281
10310
|
}
|
|
@@ -10336,6 +10365,7 @@ class TextEditor {
|
|
|
10336
10365
|
constructor(column, saveCallback) {
|
|
10337
10366
|
this.column = column;
|
|
10338
10367
|
this.saveCallback = saveCallback;
|
|
10368
|
+
this.editInput = null;
|
|
10339
10369
|
this.element = null;
|
|
10340
10370
|
this.editCell = undefined;
|
|
10341
10371
|
}
|
|
@@ -10366,7 +10396,8 @@ class TextEditor {
|
|
|
10366
10396
|
* IMPORTANT: Prevent scroll glitches when editor is closed and focus is on current input element.
|
|
10367
10397
|
*/
|
|
10368
10398
|
beforeDisconnect() {
|
|
10369
|
-
|
|
10399
|
+
var _a;
|
|
10400
|
+
(_a = this.editInput) === null || _a === void 0 ? void 0 : _a.blur();
|
|
10370
10401
|
}
|
|
10371
10402
|
/**
|
|
10372
10403
|
* Get value from input
|
|
@@ -10469,8 +10500,8 @@ class RevoEdit {
|
|
|
10469
10500
|
}
|
|
10470
10501
|
}
|
|
10471
10502
|
componentWillRender() {
|
|
10472
|
-
// Active editor present
|
|
10473
|
-
if (this.currentEditor) {
|
|
10503
|
+
// Active editor present and not yet closed.
|
|
10504
|
+
if (this.currentEditor || !this.column) {
|
|
10474
10505
|
return;
|
|
10475
10506
|
}
|
|
10476
10507
|
this.preventSaveOnClose = false;
|
|
@@ -11151,8 +11182,9 @@ class DimensionProvider {
|
|
|
11151
11182
|
}
|
|
11152
11183
|
/**
|
|
11153
11184
|
* Sets dimension data and view port coordinate
|
|
11154
|
-
* @param
|
|
11185
|
+
* @param itemCount
|
|
11155
11186
|
* @param type - dimension type
|
|
11187
|
+
* @param noVirtual - disable virtual data
|
|
11156
11188
|
*/
|
|
11157
11189
|
setData(itemCount, type, noVirtual = false) {
|
|
11158
11190
|
this.setItemCount(itemCount, type);
|
|
@@ -11306,7 +11338,7 @@ class ThemeService {
|
|
|
11306
11338
|
}
|
|
11307
11339
|
}
|
|
11308
11340
|
static getTheme(theme) {
|
|
11309
|
-
if (allowedThemes.indexOf(theme) > -1) {
|
|
11341
|
+
if (theme && allowedThemes.indexOf(theme) > -1) {
|
|
11310
11342
|
return theme;
|
|
11311
11343
|
}
|
|
11312
11344
|
return DEFAULT_THEME;
|
|
@@ -12162,10 +12194,6 @@ class SortingPlugin extends BasePlugin {
|
|
|
12162
12194
|
constructor(revogrid, providers) {
|
|
12163
12195
|
super(revogrid, providers);
|
|
12164
12196
|
this.revogrid = revogrid;
|
|
12165
|
-
// sorting order per column
|
|
12166
|
-
this.sorting = null;
|
|
12167
|
-
// sorting function per column, multiple columns sorting supported
|
|
12168
|
-
this.sortingFunc = null;
|
|
12169
12197
|
this.sortingPromise = null;
|
|
12170
12198
|
this.postponeSort = debounce_1(async (order, comparison) => this.runSorting(order, comparison), 50);
|
|
12171
12199
|
const beforeanysource = async ({ detail: { type }, }) => {
|
|
@@ -12179,7 +12207,7 @@ class SortingPlugin extends BasePlugin {
|
|
|
12179
12207
|
}
|
|
12180
12208
|
};
|
|
12181
12209
|
const aftercolumnsset = async ({ detail: { order }, }) => {
|
|
12182
|
-
const columns = await this.revogrid.getColumns();
|
|
12210
|
+
const columns = (await this.revogrid.getColumns());
|
|
12183
12211
|
const sortingFunc = {};
|
|
12184
12212
|
for (let prop in order) {
|
|
12185
12213
|
const cmp = this.getComparer(ColumnDataProvider.getColumnByProp(columns, prop), order[prop]);
|
|
@@ -12225,6 +12253,7 @@ class SortingPlugin extends BasePlugin {
|
|
|
12225
12253
|
* If additive - add to existing sorting, multiple columns can be sorted
|
|
12226
12254
|
*/
|
|
12227
12255
|
async headerclick(column, index, additive) {
|
|
12256
|
+
var _a, _b;
|
|
12228
12257
|
let order = this.getNextOrder(column.order);
|
|
12229
12258
|
const beforeEvent = this.emit('beforesorting', { column, order, additive });
|
|
12230
12259
|
if (beforeEvent.defaultPrevented) {
|
|
@@ -12265,8 +12294,8 @@ class SortingPlugin extends BasePlugin {
|
|
|
12265
12294
|
this.sortingFunc = { [column.prop]: cmp };
|
|
12266
12295
|
}
|
|
12267
12296
|
else {
|
|
12268
|
-
|
|
12269
|
-
|
|
12297
|
+
(_a = this.sorting) === null || _a === void 0 ? true : delete _a[column.prop];
|
|
12298
|
+
(_b = this.sortingFunc) === null || _b === void 0 ? true : delete _b[column.prop];
|
|
12270
12299
|
}
|
|
12271
12300
|
}
|
|
12272
12301
|
this.startSorting(this.sorting, this.sortingFunc);
|
|
@@ -12282,8 +12311,8 @@ class SortingPlugin extends BasePlugin {
|
|
|
12282
12311
|
async sort(sorting, sortingFunc, types = ['rgRow', 'rowPinStart', 'rowPinEnd']) {
|
|
12283
12312
|
// if no sorting - reset
|
|
12284
12313
|
if (!size_1(sorting)) {
|
|
12285
|
-
this.sorting =
|
|
12286
|
-
this.sortingFunc =
|
|
12314
|
+
this.sorting = undefined;
|
|
12315
|
+
this.sortingFunc = undefined;
|
|
12287
12316
|
for (let type of types) {
|
|
12288
12317
|
const store = await this.revogrid.getSourceStore(type);
|
|
12289
12318
|
// row data
|
|
@@ -12328,10 +12357,10 @@ class SortingPlugin extends BasePlugin {
|
|
|
12328
12357
|
return -1 * cmp(prop, a, b);
|
|
12329
12358
|
};
|
|
12330
12359
|
}
|
|
12331
|
-
sortIndexByItems(indexes, source, sortingFunc) {
|
|
12360
|
+
sortIndexByItems(indexes, source, sortingFunc = {}) {
|
|
12332
12361
|
// if no sorting - return unsorted indexes
|
|
12333
12362
|
if (Object.entries(sortingFunc).length === 0) {
|
|
12334
|
-
//
|
|
12363
|
+
// Unsorted indexes
|
|
12335
12364
|
return [...Array(indexes.length).keys()];
|
|
12336
12365
|
}
|
|
12337
12366
|
//
|
|
@@ -12347,7 +12376,7 @@ class SortingPlugin extends BasePlugin {
|
|
|
12347
12376
|
* If the comparison function returns a non-zero value (sorted), it means that the items should be sorted based on the given property. In such a case, the function immediately returns the sorted value, indicating the order in which the items should be arranged.
|
|
12348
12377
|
* If none of the comparison functions result in a non-zero value, indicating that the items are equal or should remain in the same order, the function eventually returns 0.
|
|
12349
12378
|
*/
|
|
12350
|
-
const sorted = cmp(prop, itemA, itemB);
|
|
12379
|
+
const sorted = cmp === null || cmp === void 0 ? void 0 : cmp(prop, itemA, itemB);
|
|
12351
12380
|
if (sorted) {
|
|
12352
12381
|
return sorted;
|
|
12353
12382
|
}
|
|
@@ -12597,13 +12626,13 @@ class ExportFilePlugin extends BasePlugin {
|
|
|
12597
12626
|
/** Export file */
|
|
12598
12627
|
async exportFile(options = {}, t = ExportTypes.csv) {
|
|
12599
12628
|
const formatter = this.formatter(t, options);
|
|
12600
|
-
const blob = await this.getBlob(formatter);
|
|
12601
12629
|
// url
|
|
12602
12630
|
const URL = window.URL || window.webkitURL;
|
|
12603
12631
|
const a = document.createElement('a');
|
|
12604
12632
|
const { filename, fileKind } = formatter.options;
|
|
12605
12633
|
const name = `${filename}.${fileKind}`;
|
|
12606
|
-
const
|
|
12634
|
+
const blob = await this.getBlob(formatter);
|
|
12635
|
+
const url = blob ? URL.createObjectURL(blob) : '';
|
|
12607
12636
|
a.style.display = 'none';
|
|
12608
12637
|
a.setAttribute('href', url);
|
|
12609
12638
|
a.setAttribute('download', name);
|
|
@@ -13028,7 +13057,7 @@ class GroupingRowPlugin extends BasePlugin {
|
|
|
13028
13057
|
const { sourceWithGroups, depth, trimmed, oldNewIndexMap, childrenByGroup, } = gatherGrouping(source, ((_a = this.options) === null || _a === void 0 ? void 0 : _a.props) || [], Object.assign({ prevExpanded }, options));
|
|
13029
13058
|
// setup source
|
|
13030
13059
|
this.providers.data.setData(sourceWithGroups, GROUPING_ROW_TYPE, this.revogrid.disableVirtualY, { depth, customRenderer: options === null || options === void 0 ? void 0 : options.groupLabelTemplate }, true);
|
|
13031
|
-
this.updateTrimmed(trimmed, childrenByGroup, oldNewIndexes, oldNewIndexMap);
|
|
13060
|
+
this.updateTrimmed(trimmed, childrenByGroup, oldNewIndexes !== null && oldNewIndexes !== void 0 ? oldNewIndexes : {}, oldNewIndexMap);
|
|
13032
13061
|
}
|
|
13033
13062
|
/**
|
|
13034
13063
|
* Apply grouping on data set
|
|
@@ -13094,7 +13123,7 @@ class GroupingRowPlugin extends BasePlugin {
|
|
|
13094
13123
|
this.providers.data.setData(source, GROUPING_ROW_TYPE, this.revogrid.disableVirtualY, undefined, true);
|
|
13095
13124
|
this.updateTrimmed(undefined, undefined, oldNewIndexes);
|
|
13096
13125
|
}
|
|
13097
|
-
updateTrimmed(trimmedGroup = {}, _childrenByGroup = {}, firstLevelMap, secondLevelMap) {
|
|
13126
|
+
updateTrimmed(trimmedGroup = {}, _childrenByGroup = {}, firstLevelMap = {}, secondLevelMap) {
|
|
13098
13127
|
// map previously trimmed data
|
|
13099
13128
|
const trimemedOptionsToUpgrade = processDoubleConversionTrimmed(this.trimmed, firstLevelMap, secondLevelMap);
|
|
13100
13129
|
for (let type in trimemedOptionsToUpgrade) {
|
|
@@ -13132,6 +13161,25 @@ function getLastCell(data, rowType) {
|
|
|
13132
13161
|
y: lastVisibleRowCount,
|
|
13133
13162
|
};
|
|
13134
13163
|
}
|
|
13164
|
+
function viewportDataPartition(data, type, slot, fixed) {
|
|
13165
|
+
return {
|
|
13166
|
+
colData: data.colStore,
|
|
13167
|
+
viewportCol: data.viewports[data.colType].store,
|
|
13168
|
+
viewportRow: data.viewports[type].store,
|
|
13169
|
+
// lastCell is the last real coordinate + 1
|
|
13170
|
+
lastCell: getLastCell(data, type),
|
|
13171
|
+
slot,
|
|
13172
|
+
type,
|
|
13173
|
+
canDrag: !fixed,
|
|
13174
|
+
position: data.position,
|
|
13175
|
+
dataStore: data.rowStores[type].store,
|
|
13176
|
+
dimensionCol: data.dimensions[data.colType].store,
|
|
13177
|
+
dimensionRow: data.dimensions[type].store,
|
|
13178
|
+
style: fixed
|
|
13179
|
+
? { height: `${data.dimensions[type].store.get('realSize')}px` }
|
|
13180
|
+
: undefined,
|
|
13181
|
+
};
|
|
13182
|
+
}
|
|
13135
13183
|
|
|
13136
13184
|
/** Collect Column data */
|
|
13137
13185
|
function gatherColumnData(data) {
|
|
@@ -13214,11 +13262,9 @@ class ViewportService {
|
|
|
13214
13262
|
segmentSelection.setLastCell(rgRow.lastCell);
|
|
13215
13263
|
// register selection store for Row
|
|
13216
13264
|
const rowSelectionStore = this.registerRow(rgRow.position.y, rgRow.type);
|
|
13217
|
-
const rowDef = Object.assign(Object.assign({}, rgRow), { rowSelectionStore, segmentSelectionStore: segmentSelection.store, ref: (e) => config.selectionStoreConnector.registerSection(e), onSetrange: e => {
|
|
13265
|
+
const rowDef = Object.assign(Object.assign({ colType: val }, rgRow), { rowSelectionStore, segmentSelectionStore: segmentSelection.store, ref: (e) => config.selectionStoreConnector.registerSection(e), onSetrange: e => {
|
|
13218
13266
|
segmentSelection.setRangeArea(e.detail);
|
|
13219
|
-
}, onSettemprange: e => {
|
|
13220
|
-
segmentSelection.setTempArea(e.detail);
|
|
13221
|
-
}, onFocuscell: e => {
|
|
13267
|
+
}, onSettemprange: e => segmentSelection.setTempArea(e.detail), onFocuscell: e => {
|
|
13222
13268
|
// todo: multi focus
|
|
13223
13269
|
segmentSelection.clearFocus();
|
|
13224
13270
|
config.selectionStoreConnector.focus(segmentSelection, e.detail);
|
|
@@ -13268,43 +13314,27 @@ class ViewportService {
|
|
|
13268
13314
|
};
|
|
13269
13315
|
// y position for selection
|
|
13270
13316
|
let y = 0;
|
|
13271
|
-
return rowTypes.reduce((
|
|
13317
|
+
return rowTypes.reduce((result, type) => {
|
|
13272
13318
|
// filter out empty sources, we still need to return source to keep slot working
|
|
13273
13319
|
const isPresent = data.viewports[type].store.get('realCount') || type === 'rgRow';
|
|
13274
13320
|
const rgCol = Object.assign(Object.assign({}, data), { position: Object.assign(Object.assign({}, data.position), { y: isPresent ? y : EMPTY_INDEX }) });
|
|
13275
|
-
|
|
13321
|
+
const partition = viewportDataPartition(rgCol, type, slots[type], type !== 'rgRow');
|
|
13322
|
+
result.push(partition);
|
|
13276
13323
|
if (isPresent) {
|
|
13277
13324
|
y++;
|
|
13278
13325
|
}
|
|
13279
|
-
return
|
|
13326
|
+
return result;
|
|
13280
13327
|
}, []);
|
|
13281
13328
|
}
|
|
13282
|
-
dataPartition(data, type, slot, fixed) {
|
|
13283
|
-
return {
|
|
13284
|
-
colData: data.colStore,
|
|
13285
|
-
viewportCol: data.viewports[data.colType].store,
|
|
13286
|
-
viewportRow: data.viewports[type].store,
|
|
13287
|
-
// lastCell is the last real coordinate + 1
|
|
13288
|
-
lastCell: getLastCell(data, type),
|
|
13289
|
-
slot,
|
|
13290
|
-
type,
|
|
13291
|
-
canDrag: !fixed,
|
|
13292
|
-
position: data.position,
|
|
13293
|
-
dataStore: data.rowStores[type].store,
|
|
13294
|
-
dimensionCol: data.dimensions[data.colType].store,
|
|
13295
|
-
dimensionRow: data.dimensions[type].store,
|
|
13296
|
-
style: fixed
|
|
13297
|
-
? { height: `${data.dimensions[type].store.get('realSize')}px` }
|
|
13298
|
-
: undefined,
|
|
13299
|
-
};
|
|
13300
|
-
}
|
|
13301
13329
|
scrollToCell(cell) {
|
|
13302
13330
|
for (let key in cell) {
|
|
13303
13331
|
const coordinate = cell[key];
|
|
13304
|
-
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13332
|
+
if (typeof coordinate === 'number') {
|
|
13333
|
+
this.config.scrollingService.proxyScroll({
|
|
13334
|
+
dimension: key === 'x' ? 'rgCol' : 'rgRow',
|
|
13335
|
+
coordinate,
|
|
13336
|
+
});
|
|
13337
|
+
}
|
|
13308
13338
|
}
|
|
13309
13339
|
}
|
|
13310
13340
|
/**
|
|
@@ -13340,22 +13370,30 @@ class ViewportService {
|
|
|
13340
13370
|
}
|
|
13341
13371
|
getStoreCoordinateByType(colType, rowType) {
|
|
13342
13372
|
const stores = this.config.selectionStoreConnector.storesByType;
|
|
13343
|
-
|
|
13373
|
+
if (typeof stores[colType] === 'undefined' || typeof stores[rowType] === 'undefined') {
|
|
13374
|
+
return;
|
|
13375
|
+
}
|
|
13376
|
+
return {
|
|
13344
13377
|
x: stores[colType],
|
|
13345
13378
|
y: stores[rowType],
|
|
13346
13379
|
};
|
|
13347
|
-
return storeCoordinate;
|
|
13348
13380
|
}
|
|
13349
13381
|
setFocus(colType, rowType, start, end) {
|
|
13350
13382
|
var _a;
|
|
13351
|
-
|
|
13383
|
+
const coordinate = this.getStoreCoordinateByType(colType, rowType);
|
|
13384
|
+
if (coordinate) {
|
|
13385
|
+
(_a = this.config.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.focusByCell(coordinate, start, end);
|
|
13386
|
+
}
|
|
13352
13387
|
}
|
|
13353
13388
|
getSelectedRange() {
|
|
13354
13389
|
return this.config.selectionStoreConnector.selectedRange;
|
|
13355
13390
|
}
|
|
13356
13391
|
setEdit(rowIndex, colIndex, colType, rowType) {
|
|
13357
13392
|
var _a;
|
|
13358
|
-
|
|
13393
|
+
const coordinate = this.getStoreCoordinateByType(colType, rowType);
|
|
13394
|
+
if (coordinate) {
|
|
13395
|
+
(_a = this.config.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEditByCell(coordinate, { x: colIndex, y: rowIndex });
|
|
13396
|
+
}
|
|
13359
13397
|
}
|
|
13360
13398
|
}
|
|
13361
13399
|
|
|
@@ -13366,7 +13404,7 @@ class GridScrollingService {
|
|
|
13366
13404
|
}
|
|
13367
13405
|
async proxyScroll(e, key) {
|
|
13368
13406
|
var _a;
|
|
13369
|
-
let
|
|
13407
|
+
let newEventPromise;
|
|
13370
13408
|
let event = e;
|
|
13371
13409
|
for (let elKey in this.elements) {
|
|
13372
13410
|
// skip
|
|
@@ -13380,7 +13418,7 @@ class GridScrollingService {
|
|
|
13380
13418
|
}
|
|
13381
13419
|
for (let el of this.elements[elKey]) {
|
|
13382
13420
|
if (el.changeScroll) {
|
|
13383
|
-
|
|
13421
|
+
newEventPromise = el.changeScroll(e);
|
|
13384
13422
|
}
|
|
13385
13423
|
}
|
|
13386
13424
|
}
|
|
@@ -13390,8 +13428,9 @@ class GridScrollingService {
|
|
|
13390
13428
|
}
|
|
13391
13429
|
}
|
|
13392
13430
|
}
|
|
13431
|
+
const newEvent = await newEventPromise;
|
|
13393
13432
|
if (newEvent) {
|
|
13394
|
-
event =
|
|
13433
|
+
event = newEvent;
|
|
13395
13434
|
}
|
|
13396
13435
|
this.setViewport(event);
|
|
13397
13436
|
}
|
|
@@ -13591,14 +13630,15 @@ function isStretchPlugin(plugin) {
|
|
|
13591
13630
|
const rowDefinitionByType = (newVal = []) => {
|
|
13592
13631
|
const result = {};
|
|
13593
13632
|
for (const v of newVal) {
|
|
13594
|
-
|
|
13595
|
-
|
|
13633
|
+
let rowDefs = result[v.type];
|
|
13634
|
+
if (!rowDefs) {
|
|
13635
|
+
rowDefs = result[v.type] = {};
|
|
13596
13636
|
}
|
|
13597
13637
|
if (v.size) {
|
|
13598
|
-
if (!
|
|
13599
|
-
|
|
13638
|
+
if (!rowDefs.sizes) {
|
|
13639
|
+
rowDefs.sizes = {};
|
|
13600
13640
|
}
|
|
13601
|
-
|
|
13641
|
+
rowDefs.sizes[v.index] = v.size;
|
|
13602
13642
|
}
|
|
13603
13643
|
}
|
|
13604
13644
|
return result;
|
|
@@ -13606,11 +13646,12 @@ const rowDefinitionByType = (newVal = []) => {
|
|
|
13606
13646
|
const rowDefinitionRemoveByType = (oldVal = []) => {
|
|
13607
13647
|
const result = {};
|
|
13608
13648
|
for (const v of oldVal) {
|
|
13609
|
-
|
|
13610
|
-
|
|
13649
|
+
let rowDefs = result[v.type];
|
|
13650
|
+
if (!rowDefs) {
|
|
13651
|
+
rowDefs = result[v.type] = [];
|
|
13611
13652
|
}
|
|
13612
13653
|
if (v.size) {
|
|
13613
|
-
|
|
13654
|
+
rowDefs.push(v.index);
|
|
13614
13655
|
}
|
|
13615
13656
|
}
|
|
13616
13657
|
return result;
|
|
@@ -13730,6 +13771,7 @@ const defaultProps = (props) => {
|
|
|
13730
13771
|
};
|
|
13731
13772
|
class ResizeDirective {
|
|
13732
13773
|
constructor(initialProps, $event) {
|
|
13774
|
+
var _a, _b;
|
|
13733
13775
|
this.initialProps = initialProps;
|
|
13734
13776
|
this.$event = $event;
|
|
13735
13777
|
this.mouseX = 0;
|
|
@@ -13744,8 +13786,8 @@ class ResizeDirective {
|
|
|
13744
13786
|
this.mouseUpFunc = this.handleUp.bind(this);
|
|
13745
13787
|
this.minW = this.props.minWidth;
|
|
13746
13788
|
this.minH = this.props.minHeight;
|
|
13747
|
-
this.maxW = this.props.maxWidth;
|
|
13748
|
-
this.maxH = this.props.maxHeight;
|
|
13789
|
+
this.maxW = (_a = this.props.maxWidth) !== null && _a !== void 0 ? _a : 0;
|
|
13790
|
+
this.maxH = (_b = this.props.maxHeight) !== null && _b !== void 0 ? _b : 0;
|
|
13749
13791
|
this.parent = { width: 0, height: 0 };
|
|
13750
13792
|
this.resizeState = 0;
|
|
13751
13793
|
}
|
|
@@ -13880,13 +13922,14 @@ class ResizeDirective {
|
|
|
13880
13922
|
this.unbindMove();
|
|
13881
13923
|
}
|
|
13882
13924
|
setInitials({ clientX, clientY }, target) {
|
|
13925
|
+
var _a, _b, _c, _d;
|
|
13883
13926
|
const computedStyle = getComputedStyle(this.$el);
|
|
13884
13927
|
this.$el.classList.add('active');
|
|
13885
13928
|
this.activeResizer = target;
|
|
13886
13929
|
if (this.disableCalcMap & DISABLE_MASK.w) {
|
|
13887
13930
|
this.mouseX = clientX;
|
|
13888
13931
|
this.width = this.$el.clientWidth;
|
|
13889
|
-
this.parent.width = this.$el.parentElement.clientWidth;
|
|
13932
|
+
this.parent.width = (_b = (_a = this.$el.parentElement) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0;
|
|
13890
13933
|
// min width
|
|
13891
13934
|
const minPaddingX = parseFloat(computedStyle.paddingLeft) +
|
|
13892
13935
|
parseFloat(computedStyle.paddingRight);
|
|
@@ -13899,7 +13942,7 @@ class ResizeDirective {
|
|
|
13899
13942
|
if (this.disableCalcMap & DISABLE_MASK.h) {
|
|
13900
13943
|
this.mouseY = clientY;
|
|
13901
13944
|
this.height = this.$el.clientHeight;
|
|
13902
|
-
this.parent.height = this.$el.parentElement.clientHeight;
|
|
13945
|
+
this.parent.height = (_d = (_c = this.$el.parentElement) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0;
|
|
13903
13946
|
// min height
|
|
13904
13947
|
const minPaddingY = parseFloat(computedStyle.paddingTop) +
|
|
13905
13948
|
parseFloat(computedStyle.paddingBottom);
|
|
@@ -13917,7 +13960,7 @@ class ResizeDirective {
|
|
|
13917
13960
|
this.activeResizer.removeAttribute('style');
|
|
13918
13961
|
}
|
|
13919
13962
|
this.$el.classList.remove('active');
|
|
13920
|
-
this.activeResizer =
|
|
13963
|
+
this.activeResizer = undefined;
|
|
13921
13964
|
}
|
|
13922
13965
|
bindMove() {
|
|
13923
13966
|
document.documentElement.addEventListener('mouseup', this.mouseUpFunc, true);
|
|
@@ -13966,7 +14009,7 @@ const ResizableElement = (props, children) => {
|
|
|
13966
14009
|
}
|
|
13967
14010
|
}
|
|
13968
14011
|
}
|
|
13969
|
-
return (hAsync("div", Object.assign({}, props, { ref: (e) => directive === null || directive === void 0 ? void 0 : directive.set(e) }),
|
|
14012
|
+
return (hAsync("div", Object.assign({}, props, { ref: (e) => e && (directive === null || directive === void 0 ? void 0 : directive.set(e)) }),
|
|
13970
14013
|
children,
|
|
13971
14014
|
resizeEls));
|
|
13972
14015
|
};
|
|
@@ -14095,7 +14138,7 @@ class ColumnPlugin extends BasePlugin {
|
|
|
14095
14138
|
}
|
|
14096
14139
|
onMouseUp(e) {
|
|
14097
14140
|
// apply new positions
|
|
14098
|
-
if (this.dragData) {
|
|
14141
|
+
if (this.dragData && this.staticDragData) {
|
|
14099
14142
|
let relativePos = getLeftRelative(e.x, this.dragData.gridRect.left, this.dragData.scrollOffset);
|
|
14100
14143
|
if (relativePos < 0) {
|
|
14101
14144
|
relativePos = 0;
|
|
@@ -14212,9 +14255,6 @@ class RevoGridComponent {
|
|
|
14212
14255
|
this.aftergridinit = createEvent(this, "aftergridinit", 7);
|
|
14213
14256
|
this.additionaldatachanged = createEvent(this, "additionaldatachanged", 7);
|
|
14214
14257
|
this.afterthemechanged = createEvent(this, "afterthemechanged", 7);
|
|
14215
|
-
// #endregion
|
|
14216
|
-
// #region Listeners outside scope
|
|
14217
|
-
this.clickTrackForFocusClear = null;
|
|
14218
14258
|
this.extraElements = [];
|
|
14219
14259
|
this.viewport = null;
|
|
14220
14260
|
this.isInited = false;
|
|
@@ -14386,6 +14426,7 @@ class RevoGridComponent {
|
|
|
14386
14426
|
* @param column - full column details to update
|
|
14387
14427
|
* @param index - virtual column index
|
|
14388
14428
|
* @param order - order to apply
|
|
14429
|
+
* @param additive - if false will replace current order
|
|
14389
14430
|
*/
|
|
14390
14431
|
async updateColumnSorting(column, index, order, additive) {
|
|
14391
14432
|
return this.columnProvider.updateColumnSorting(column, index, order, additive);
|
|
@@ -14424,8 +14465,8 @@ class RevoGridComponent {
|
|
|
14424
14465
|
* Get the currently focused cell.
|
|
14425
14466
|
*/
|
|
14426
14467
|
async getFocused() {
|
|
14427
|
-
var _a;
|
|
14428
|
-
return (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getFocused();
|
|
14468
|
+
var _a, _b;
|
|
14469
|
+
return (_b = (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getFocused()) !== null && _b !== void 0 ? _b : null;
|
|
14429
14470
|
}
|
|
14430
14471
|
/**
|
|
14431
14472
|
* Get size of content
|
|
@@ -14439,8 +14480,8 @@ class RevoGridComponent {
|
|
|
14439
14480
|
* Get the currently selected Range.
|
|
14440
14481
|
*/
|
|
14441
14482
|
async getSelectedRange() {
|
|
14442
|
-
var _a;
|
|
14443
|
-
return (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getSelectedRange();
|
|
14483
|
+
var _a, _b;
|
|
14484
|
+
return (_b = (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getSelectedRange()) !== null && _b !== void 0 ? _b : null;
|
|
14444
14485
|
}
|
|
14445
14486
|
mousedownHandle(event) {
|
|
14446
14487
|
const screenX = getPropertyFromEvent(event, 'screenX');
|
|
@@ -14453,7 +14494,8 @@ class RevoGridComponent {
|
|
|
14453
14494
|
/**
|
|
14454
14495
|
* To keep your elements from losing focus use mouseup/touchend e.preventDefault();
|
|
14455
14496
|
*/
|
|
14456
|
-
mouseupHandle(event) {
|
|
14497
|
+
async mouseupHandle(event) {
|
|
14498
|
+
var _a;
|
|
14457
14499
|
const screenX = getPropertyFromEvent(event, 'screenX');
|
|
14458
14500
|
const screenY = getPropertyFromEvent(event, 'screenY');
|
|
14459
14501
|
if (screenX === null || screenY === null) {
|
|
@@ -14464,16 +14506,16 @@ class RevoGridComponent {
|
|
|
14464
14506
|
}
|
|
14465
14507
|
const pos = screenX + screenY;
|
|
14466
14508
|
// detect if mousemove then do nothing
|
|
14467
|
-
if (Math.abs(this.clickTrackForFocusClear - pos) > 10) {
|
|
14509
|
+
if (Math.abs(((_a = this.clickTrackForFocusClear) !== null && _a !== void 0 ? _a : 0) - pos) > 10) {
|
|
14468
14510
|
return;
|
|
14469
14511
|
}
|
|
14470
|
-
// Check if action finished inside
|
|
14471
|
-
// if event prevented or it is current table don't clear focus
|
|
14512
|
+
// Check if action finished inside the document
|
|
14513
|
+
// if event prevented, or it is current table don't clear focus
|
|
14472
14514
|
const path = event.composedPath();
|
|
14473
14515
|
if (!path.includes(this.element) &&
|
|
14474
|
-
!path.includes(this.element.shadowRoot)) {
|
|
14516
|
+
!(this.element.shadowRoot && path.includes(this.element.shadowRoot))) {
|
|
14475
14517
|
// Perform actions if the click is outside the component
|
|
14476
|
-
this.clearFocus();
|
|
14518
|
+
await this.clearFocus();
|
|
14477
14519
|
}
|
|
14478
14520
|
}
|
|
14479
14521
|
// #endregion
|
|
@@ -14683,15 +14725,12 @@ class RevoGridComponent {
|
|
|
14683
14725
|
let grPlugin;
|
|
14684
14726
|
for (let p of this.internalPlugins) {
|
|
14685
14727
|
const isGrouping = p;
|
|
14686
|
-
if (isGrouping.setGrouping) {
|
|
14728
|
+
if (!!isGrouping.setGrouping) {
|
|
14687
14729
|
grPlugin = isGrouping;
|
|
14688
14730
|
break;
|
|
14689
14731
|
}
|
|
14690
14732
|
}
|
|
14691
|
-
|
|
14692
|
-
return;
|
|
14693
|
-
}
|
|
14694
|
-
grPlugin.setGrouping(newVal || {});
|
|
14733
|
+
grPlugin === null || grPlugin === void 0 ? void 0 : grPlugin.setGrouping(newVal || {});
|
|
14695
14734
|
}
|
|
14696
14735
|
/**
|
|
14697
14736
|
* Stretch Plugin Apply
|
|
@@ -14775,7 +14814,7 @@ class RevoGridComponent {
|
|
|
14775
14814
|
(_a = this.plugins) === null || _a === void 0 ? void 0 : _a.forEach(p => this.internalPlugins.push(new p(this.element, pluginData)));
|
|
14776
14815
|
}
|
|
14777
14816
|
removePlugins() {
|
|
14778
|
-
this.internalPlugins.forEach(p => p.destroy());
|
|
14817
|
+
this.internalPlugins.forEach(p => { var _a; return (_a = p.destroy) === null || _a === void 0 ? void 0 : _a.call(p); });
|
|
14779
14818
|
this.internalPlugins = [];
|
|
14780
14819
|
}
|
|
14781
14820
|
// #endregion
|
|
@@ -14875,7 +14914,7 @@ class RevoGridComponent {
|
|
|
14875
14914
|
const headerProperties = Object.assign(Object.assign({}, view.headerProp), { type: view.type, additionalData: this.additionalData, viewportCol: view.viewportCol, selectionStore: view.columnSelectionStore, canResize: this.resize, readonly: this.readonly, columnFilter: !!this.filter });
|
|
14876
14915
|
// Column headers
|
|
14877
14916
|
const dataViews = [
|
|
14878
|
-
hAsync("revogr-header", Object.assign({ key: '
|
|
14917
|
+
hAsync("revogr-header", Object.assign({ key: 'b08c837765cf20c88cb5b253a876f0f442c31628' }, headerProperties, { slot: HEADER_SLOT })),
|
|
14879
14918
|
];
|
|
14880
14919
|
// Render viewport data (vertical sections)
|
|
14881
14920
|
view.dataPorts.forEach(data => {
|
|
@@ -14897,11 +14936,12 @@ class RevoGridComponent {
|
|
|
14897
14936
|
const typeCol = 'rgCol';
|
|
14898
14937
|
const viewports = this.viewportProvider.stores;
|
|
14899
14938
|
const dimensions = this.dimensionProvider.stores;
|
|
14900
|
-
return (hAsync(Host, { key: '
|
|
14939
|
+
return (hAsync(Host, { key: '057a2cf1a64aaeec12d2aca17b09316fb3cbfde6' }, this.hideAttribution ? null : (hAsync("revogr-attribution", { class: "attribution" })), hAsync("div", { key: 'e89e3d136d756f80421f42f47e09583985edb1bc', class: "main-viewport", onClick: (e) => {
|
|
14940
|
+
var _a;
|
|
14901
14941
|
if (e.currentTarget === e.target) {
|
|
14902
|
-
this.viewport.clearEdit();
|
|
14942
|
+
(_a = this.viewport) === null || _a === void 0 ? void 0 : _a.clearEdit();
|
|
14903
14943
|
}
|
|
14904
|
-
} }, hAsync("div", { key: '
|
|
14944
|
+
} }, hAsync("div", { key: '177db78970907d36b8d56549386a18a683573944', class: "viewports" }, hAsync("slot", { key: '481d830a232b1969fcaa2519a5306fafaff58fb4', name: "viewport" }), viewportSections, hAsync("revogr-scroll-virtual", { key: '6a123b2e84bec95d7a63a73322fe167248e8415e', class: "vertical", dimension: typeRow, viewportStore: viewports[typeRow].store, dimensionStore: dimensions[typeRow].store, ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), hAsync(OrderRenderer, { key: 'fea1be24668f2039746fff93d0ab5e76d932a166', ref: e => (this.orderService = e) }))), hAsync("revogr-scroll-virtual", { key: '74c6e05c81b2782320755c910b098edf8858d6db', class: "horizontal", dimension: typeCol, viewportStore: viewports[typeCol].store, dimensionStore: dimensions[typeCol].store, ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), this.extraElements));
|
|
14905
14945
|
}
|
|
14906
14946
|
disconnectedCallback() {
|
|
14907
14947
|
// Remove all plugins, to avoid memory leaks and unexpected behaviour when the component is removed
|
|
@@ -15113,10 +15153,13 @@ function renderCell(v) {
|
|
|
15113
15153
|
// Row drag
|
|
15114
15154
|
if (v.model.column.rowDrag &&
|
|
15115
15155
|
isRowDragService(v.model.column.rowDrag, v.model)) {
|
|
15116
|
-
els.push(hAsync("span", { class: DRAGGABLE_CLASS, onMouseDown: originalEvent =>
|
|
15117
|
-
|
|
15118
|
-
|
|
15119
|
-
|
|
15156
|
+
els.push(hAsync("span", { class: DRAGGABLE_CLASS, onMouseDown: originalEvent => {
|
|
15157
|
+
var _a;
|
|
15158
|
+
return (_a = v.dragStartCell) === null || _a === void 0 ? void 0 : _a.emit({
|
|
15159
|
+
originalEvent,
|
|
15160
|
+
model: v.model,
|
|
15161
|
+
});
|
|
15162
|
+
} },
|
|
15120
15163
|
hAsync("span", { class: DRAG_ICON_CLASS })));
|
|
15121
15164
|
}
|
|
15122
15165
|
els.push(`${getCellData(v.model.model[v.model.prop])}`);
|
|
@@ -15750,7 +15793,8 @@ const HeaderRenderer = (p) => {
|
|
|
15750
15793
|
},
|
|
15751
15794
|
onResize: p.onResize,
|
|
15752
15795
|
onDoubleClick(originalEvent) {
|
|
15753
|
-
|
|
15796
|
+
var _a;
|
|
15797
|
+
(_a = p.onDoubleClick) === null || _a === void 0 ? void 0 : _a.call(p, {
|
|
15754
15798
|
column: p.data,
|
|
15755
15799
|
index: p.column.itemIndex,
|
|
15756
15800
|
originalEvent,
|
|
@@ -15815,7 +15859,7 @@ const ColumnGroupsRenderer = ({ additionalData, providers, depth, groups, visibl
|
|
|
15815
15859
|
// coordinates
|
|
15816
15860
|
const groupStart = getItemByIndex(dimensionCol, groupStartIndex).start;
|
|
15817
15861
|
const groupEnd = getItemByIndex(dimensionCol, groupEndIndex).end;
|
|
15818
|
-
groupRow.push(hAsync(GroupHeaderRenderer, { providers: providers, start: groupStart, end: groupEnd, group: group, active: active, canResize: canResize, onResize: e => onResize(e.changedX, groupStartIndex, groupEndIndex), additionalData: additionalData }));
|
|
15862
|
+
groupRow.push(hAsync(GroupHeaderRenderer, { providers: providers, start: groupStart, end: groupEnd, group: group, active: active, canResize: canResize, onResize: e => { var _a; return onResize((_a = e.changedX) !== null && _a !== void 0 ? _a : 0, groupStartIndex, groupEndIndex); }, additionalData: additionalData }));
|
|
15819
15863
|
}
|
|
15820
15864
|
}
|
|
15821
15865
|
}
|
|
@@ -15982,7 +16026,7 @@ class RevogrRowHeaders {
|
|
|
15982
16026
|
const viewportHeader = Object.assign(Object.assign({}, this.headerProp), { colData: typeof this.rowHeaderColumn === 'object' ? [this.rowHeaderColumn] : [], viewportCol: viewport.store, canResize: false, type: ROW_HEADER_TYPE,
|
|
15983
16027
|
// parent,
|
|
15984
16028
|
slot: HEADER_SLOT });
|
|
15985
|
-
return (hAsync(Host, { class: { [ROW_HEADER_TYPE]: true }, key: ROW_HEADER_TYPE }, hAsync("revogr-viewport-scroll", Object.assign({ key: '
|
|
16029
|
+
return (hAsync(Host, { class: { [ROW_HEADER_TYPE]: true }, key: ROW_HEADER_TYPE }, hAsync("revogr-viewport-scroll", Object.assign({ key: '743c1dbaed3edf679c0616a2b79171a43d94806f' }, viewportScroll, { "row-header": true }), hAsync("revogr-header", Object.assign({ key: '53f1f64b1358d7828a5e45807915740ef198df21' }, viewportHeader)), dataViews)));
|
|
15986
16030
|
}
|
|
15987
16031
|
static get cmpMeta() { return {
|
|
15988
16032
|
"$flags$": 0,
|
|
@@ -16096,7 +16140,7 @@ class LocalScrollService {
|
|
|
16096
16140
|
if (c < 0) {
|
|
16097
16141
|
return NO_COORDINATE;
|
|
16098
16142
|
}
|
|
16099
|
-
if (c > param.maxSize) {
|
|
16143
|
+
if (typeof param.maxSize === 'number' && c > param.maxSize) {
|
|
16100
16144
|
return param.maxSize;
|
|
16101
16145
|
}
|
|
16102
16146
|
return c;
|
|
@@ -16109,8 +16153,9 @@ class LocalScrollService {
|
|
|
16109
16153
|
}
|
|
16110
16154
|
/* convert virtual to real and back, scale range */
|
|
16111
16155
|
convert(pos, param, toReal = true) {
|
|
16156
|
+
var _a;
|
|
16112
16157
|
const minRange = param.clientSize;
|
|
16113
|
-
const from = [0, param.virtualContentSize - minRange];
|
|
16158
|
+
const from = [0, ((_a = param.virtualContentSize) !== null && _a !== void 0 ? _a : minRange) - minRange];
|
|
16114
16159
|
const to = [0, param.contentSize - param.virtualSize];
|
|
16115
16160
|
if (toReal) {
|
|
16116
16161
|
return scaleValue(pos, from, to);
|
|
@@ -16152,7 +16197,7 @@ class AutohideScrollPlugin {
|
|
|
16152
16197
|
show(element, timeout) {
|
|
16153
16198
|
clearTimeout(timeout);
|
|
16154
16199
|
return Number(setTimeout(() => {
|
|
16155
|
-
element.removeAttribute('visible');
|
|
16200
|
+
element === null || element === void 0 ? void 0 : element.removeAttribute('visible');
|
|
16156
16201
|
}, 1000));
|
|
16157
16202
|
}
|
|
16158
16203
|
clear() {
|
|
@@ -16392,8 +16437,9 @@ class RevogrViewportScroll {
|
|
|
16392
16437
|
* @param e
|
|
16393
16438
|
*/
|
|
16394
16439
|
async changeScroll(e, silent = false) {
|
|
16440
|
+
var _a, _b;
|
|
16395
16441
|
if (silent) {
|
|
16396
|
-
if (e.coordinate) {
|
|
16442
|
+
if (e.coordinate && this.verticalScroll) {
|
|
16397
16443
|
switch (e.dimension) {
|
|
16398
16444
|
// for mobile devices to skip negative scroll loop. only on vertical scroll
|
|
16399
16445
|
case 'rgRow':
|
|
@@ -16401,7 +16447,7 @@ class RevogrViewportScroll {
|
|
|
16401
16447
|
break;
|
|
16402
16448
|
}
|
|
16403
16449
|
}
|
|
16404
|
-
return
|
|
16450
|
+
return;
|
|
16405
16451
|
}
|
|
16406
16452
|
if (e.delta) {
|
|
16407
16453
|
switch (e.dimension) {
|
|
@@ -16409,7 +16455,7 @@ class RevogrViewportScroll {
|
|
|
16409
16455
|
e.coordinate = this.horizontalScroll.scrollLeft + e.delta;
|
|
16410
16456
|
break;
|
|
16411
16457
|
case 'rgRow':
|
|
16412
|
-
e.coordinate = this.verticalScroll.scrollTop + e.delta;
|
|
16458
|
+
e.coordinate = ((_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.scrollTop) !== null && _b !== void 0 ? _b : 0) + e.delta;
|
|
16413
16459
|
break;
|
|
16414
16460
|
}
|
|
16415
16461
|
this.setScroll(e);
|
|
@@ -16457,11 +16503,13 @@ class RevogrViewportScroll {
|
|
|
16457
16503
|
this.horizontalScroll.scrollLeft = e.coordinate;
|
|
16458
16504
|
break;
|
|
16459
16505
|
case 'rgRow':
|
|
16460
|
-
|
|
16461
|
-
|
|
16462
|
-
|
|
16463
|
-
|
|
16464
|
-
this.verticalScroll.style.transform
|
|
16506
|
+
if (this.verticalScroll) {
|
|
16507
|
+
// this will trigger on scroll event
|
|
16508
|
+
this.verticalScroll.scrollTop = e.coordinate;
|
|
16509
|
+
// for mobile devices to skip negative scroll loop. only on vertical scroll
|
|
16510
|
+
if (this.verticalScroll.style.transform) {
|
|
16511
|
+
this.verticalScroll.style.transform = '';
|
|
16512
|
+
}
|
|
16465
16513
|
}
|
|
16466
16514
|
break;
|
|
16467
16515
|
}
|
|
@@ -16472,23 +16520,23 @@ class RevogrViewportScroll {
|
|
|
16472
16520
|
// track horizontal viewport resize
|
|
16473
16521
|
this.resizeService = new GridResizeService(this.horizontalScroll, {
|
|
16474
16522
|
resize: entries => {
|
|
16475
|
-
var _a, _b, _c;
|
|
16523
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
16476
16524
|
let height = ((_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect.height) || 0;
|
|
16477
16525
|
if (height) {
|
|
16478
|
-
height -= this.header.clientHeight + this.footer.clientHeight;
|
|
16526
|
+
height -= ((_c = (_b = this.header) === null || _b === void 0 ? void 0 : _b.clientHeight) !== null && _c !== void 0 ? _c : 0) + ((_e = (_d = this.footer) === null || _d === void 0 ? void 0 : _d.clientHeight) !== null && _e !== void 0 ? _e : 0);
|
|
16479
16527
|
}
|
|
16480
16528
|
const els = {
|
|
16481
16529
|
rgRow: {
|
|
16482
16530
|
size: height,
|
|
16483
16531
|
contentSize: this.contentHeight,
|
|
16484
|
-
scroll: this.verticalScroll.scrollTop,
|
|
16532
|
+
scroll: (_f = this.verticalScroll) === null || _f === void 0 ? void 0 : _f.scrollTop,
|
|
16485
16533
|
noScroll: false,
|
|
16486
16534
|
},
|
|
16487
16535
|
rgCol: {
|
|
16488
|
-
size: ((
|
|
16536
|
+
size: ((_g = entries[0]) === null || _g === void 0 ? void 0 : _g.contentRect.width) || 0,
|
|
16489
16537
|
contentSize: this.contentWidth,
|
|
16490
16538
|
scroll: this.horizontalScroll.scrollLeft,
|
|
16491
|
-
noScroll: this.colType !== 'rgCol'
|
|
16539
|
+
noScroll: this.colType !== 'rgCol',
|
|
16492
16540
|
},
|
|
16493
16541
|
};
|
|
16494
16542
|
for (const [dim, item] of Object.entries(els)) {
|
|
@@ -16497,7 +16545,7 @@ class RevogrViewportScroll {
|
|
|
16497
16545
|
if (item.noScroll) {
|
|
16498
16546
|
continue;
|
|
16499
16547
|
}
|
|
16500
|
-
(
|
|
16548
|
+
(_h = this.localScrollService) === null || _h === void 0 ? void 0 : _h.scroll((_j = item.scroll) !== null && _j !== void 0 ? _j : 0, dimension, true);
|
|
16501
16549
|
// track scroll visibility on outer element change
|
|
16502
16550
|
this.setScrollVisibility(dimension, item.size, item.contentSize);
|
|
16503
16551
|
}
|
|
@@ -16527,10 +16575,10 @@ class RevogrViewportScroll {
|
|
|
16527
16575
|
}
|
|
16528
16576
|
// based on scroll visibility assign or remove class and event
|
|
16529
16577
|
if (hasScroll) {
|
|
16530
|
-
el.classList.add(`scroll-${type}`);
|
|
16578
|
+
el === null || el === void 0 ? void 0 : el.classList.add(`scroll-${type}`);
|
|
16531
16579
|
}
|
|
16532
16580
|
else {
|
|
16533
|
-
el.classList.remove(`scroll-${type}`);
|
|
16581
|
+
el === null || el === void 0 ? void 0 : el.classList.remove(`scroll-${type}`);
|
|
16534
16582
|
}
|
|
16535
16583
|
this.scrollchange.emit({ type, hasScroll });
|
|
16536
16584
|
}
|
|
@@ -16538,6 +16586,7 @@ class RevogrViewportScroll {
|
|
|
16538
16586
|
this.resizeService.destroy();
|
|
16539
16587
|
}
|
|
16540
16588
|
async componentDidRender() {
|
|
16589
|
+
var _a, _b, _c, _d;
|
|
16541
16590
|
// scroll update if number of rows changed
|
|
16542
16591
|
if (this.contentHeight < this.oldValY && this.verticalScroll) {
|
|
16543
16592
|
this.verticalScroll.scrollTop += this.contentHeight - this.oldValY;
|
|
@@ -16550,7 +16599,7 @@ class RevogrViewportScroll {
|
|
|
16550
16599
|
this.oldValX = this.contentWidth;
|
|
16551
16600
|
this.localScrollService.setParams({
|
|
16552
16601
|
contentSize: this.contentHeight,
|
|
16553
|
-
clientSize: this.verticalScroll.clientHeight,
|
|
16602
|
+
clientSize: (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0,
|
|
16554
16603
|
virtualSize: 0,
|
|
16555
16604
|
}, 'rgRow');
|
|
16556
16605
|
this.localScrollService.setParams({
|
|
@@ -16558,11 +16607,11 @@ class RevogrViewportScroll {
|
|
|
16558
16607
|
clientSize: this.horizontalScroll.clientWidth,
|
|
16559
16608
|
virtualSize: 0,
|
|
16560
16609
|
}, 'rgCol');
|
|
16561
|
-
this.setScrollVisibility('rgRow', this.verticalScroll.clientHeight, this.contentHeight);
|
|
16610
|
+
this.setScrollVisibility('rgRow', (_d = (_c = this.verticalScroll) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0, this.contentHeight);
|
|
16562
16611
|
this.setScrollVisibility('rgCol', this.horizontalScroll.clientWidth, this.contentWidth);
|
|
16563
16612
|
}
|
|
16564
16613
|
render() {
|
|
16565
|
-
return (hAsync(Host, { key: '
|
|
16614
|
+
return (hAsync(Host, { key: '8395ce30127f30fff81dc67bfe2f4c3b087b2007', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, hAsync("div", { key: 'efd2db0f5b22b394e93923926f86f2ab9bffb8e0', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, hAsync("div", { key: '2794c7187ec23ac45dab5f6cb3f20ba59102b2a7', class: "header-wrapper", ref: e => (this.header = e) }, hAsync("slot", { key: '1a344d7e5cf58d77818390e8d541de88a75399d0', name: HEADER_SLOT })), hAsync("div", { key: '2aeb56f4bf3f3fc60eaeaffd8c18565beaa127ca', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, hAsync("div", { key: '59482ef73d3c4617c2511b8613056bbc200cd089', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, hAsync("slot", { key: 'f318ab365e5f6eddcd2812a314f55cac0959c3b4', name: CONTENT_SLOT }))), hAsync("div", { key: '265c036107a8ed3d47b767fec10ae0225cc927cf', class: "footer-wrapper", ref: e => (this.footer = e) }, hAsync("slot", { key: '2aa7e178375b462e666cf067e075856f592714b6', name: FOOTER_SLOT })))));
|
|
16566
16615
|
}
|
|
16567
16616
|
/**
|
|
16568
16617
|
* Extra layer for scroll event monitoring, where MouseWheel event is not passing
|
|
@@ -16605,10 +16654,11 @@ class RevogrViewportScroll {
|
|
|
16605
16654
|
* @param e
|
|
16606
16655
|
*/
|
|
16607
16656
|
onVerticalMouseWheel(type, delta, e) {
|
|
16608
|
-
var _a, _b;
|
|
16657
|
+
var _a, _b, _c, _d;
|
|
16609
16658
|
(_a = e.preventDefault) === null || _a === void 0 ? void 0 : _a.call(e);
|
|
16610
|
-
const
|
|
16611
|
-
|
|
16659
|
+
const scrollTop = (_c = (_b = this.verticalScroll) === null || _b === void 0 ? void 0 : _b.scrollTop) !== null && _c !== void 0 ? _c : 0;
|
|
16660
|
+
const pos = scrollTop + e[delta];
|
|
16661
|
+
(_d = this.localScrollService) === null || _d === void 0 ? void 0 : _d.scroll(pos, type, undefined, e[delta]);
|
|
16612
16662
|
this.localScrollTimer.latestScrollUpdate(type);
|
|
16613
16663
|
}
|
|
16614
16664
|
/**
|
|
@@ -16665,9 +16715,9 @@ class VNodeToHtml {
|
|
|
16665
16715
|
});
|
|
16666
16716
|
}
|
|
16667
16717
|
render() {
|
|
16668
|
-
var _a;
|
|
16669
|
-
this.vnodes = (_a = this.redraw) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
16670
|
-
return (hAsync(Host, { key: '
|
|
16718
|
+
var _a, _b;
|
|
16719
|
+
this.vnodes = (_b = (_a = this.redraw) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : null;
|
|
16720
|
+
return (hAsync(Host, { key: 'dcaa7c6bd2f1eef1dd9a7f95a723f8ec778681a0', style: { visibility: 'hidden', position: 'absolute' } }, this.vnodes));
|
|
16671
16721
|
}
|
|
16672
16722
|
get el() { return getElement(this); }
|
|
16673
16723
|
static get cmpMeta() { return {
|