@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.mjs
CHANGED
|
@@ -2307,10 +2307,10 @@ class Clipboard {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
const clipboardData = this.getData(e);
|
|
2309
2309
|
const isHTML = ((clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.types.indexOf('text/html')) || -1) > -1;
|
|
2310
|
-
const data = isHTML
|
|
2310
|
+
const data = (isHTML
|
|
2311
2311
|
? clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text/html')
|
|
2312
|
-
: clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text');
|
|
2313
|
-
const dataText = clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text');
|
|
2312
|
+
: clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text')) || '';
|
|
2313
|
+
const dataText = (clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.getData('text')) || '';
|
|
2314
2314
|
const beforePaste = this.beforePaste.emit({
|
|
2315
2315
|
raw: data,
|
|
2316
2316
|
dataText,
|
|
@@ -6828,11 +6828,16 @@ function gatherTrimmedItems(trimmedItems) {
|
|
|
6828
6828
|
return trimmed;
|
|
6829
6829
|
}
|
|
6830
6830
|
|
|
6831
|
-
/**
|
|
6831
|
+
/**
|
|
6832
|
+
* Sets the given data on the specified store.
|
|
6833
|
+
*
|
|
6834
|
+
* @param store - The store to set data on.
|
|
6835
|
+
* @param data - The data to set on the store.
|
|
6836
|
+
*/
|
|
6832
6837
|
function setStore(store, data) {
|
|
6833
|
-
|
|
6834
|
-
store.set(key,
|
|
6835
|
-
}
|
|
6838
|
+
Object.entries(data).forEach(([key, value]) => {
|
|
6839
|
+
store.set(key, value);
|
|
6840
|
+
});
|
|
6836
6841
|
}
|
|
6837
6842
|
|
|
6838
6843
|
/**
|
|
@@ -7646,7 +7651,8 @@ class SelectionStore {
|
|
|
7646
7651
|
setStore(this.store, { range, edit: null, tempRange: null });
|
|
7647
7652
|
}
|
|
7648
7653
|
setRange(start, end) {
|
|
7649
|
-
|
|
7654
|
+
const range = getRange(start, end);
|
|
7655
|
+
this.setRangeArea(range);
|
|
7650
7656
|
}
|
|
7651
7657
|
setLastCell(lastCell) {
|
|
7652
7658
|
setStore(this.store, { lastCell });
|
|
@@ -7745,7 +7751,7 @@ class SelectionStoreConnector {
|
|
|
7745
7751
|
return this.columnStores[x];
|
|
7746
7752
|
}
|
|
7747
7753
|
this.columnStores[x] = new SelectionStore();
|
|
7748
|
-
// build cross
|
|
7754
|
+
// build cross-linking type to position
|
|
7749
7755
|
this.storesByType[type] = x;
|
|
7750
7756
|
this.storesXToType[x] = type;
|
|
7751
7757
|
return this.columnStores[x];
|
|
@@ -7796,13 +7802,13 @@ class SelectionStoreConnector {
|
|
|
7796
7802
|
(_b = this.rowStores[y]) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
7797
7803
|
delete this.rowStores[y];
|
|
7798
7804
|
delete this.columnStores[x];
|
|
7799
|
-
// clear x cross
|
|
7805
|
+
// clear x cross-link
|
|
7800
7806
|
if (this.storesXToType[x]) {
|
|
7801
7807
|
const type = this.storesXToType[x];
|
|
7802
7808
|
delete this.storesXToType[x];
|
|
7803
7809
|
delete this.storesByType[type];
|
|
7804
7810
|
}
|
|
7805
|
-
// clear y cross
|
|
7811
|
+
// clear y cross-link
|
|
7806
7812
|
if (this.storesYToType[y]) {
|
|
7807
7813
|
const type = this.storesYToType[y];
|
|
7808
7814
|
delete this.storesYToType[y];
|
|
@@ -7832,9 +7838,10 @@ class SelectionStoreConnector {
|
|
|
7832
7838
|
return;
|
|
7833
7839
|
}
|
|
7834
7840
|
// Get the next store based on the current focus and the last cell.
|
|
7835
|
-
const
|
|
7841
|
+
const lastCell = this.focusedStore.entity.store.get('lastCell');
|
|
7842
|
+
const next = lastCell && this.getNextStore(focus, this.focusedStore.position, lastCell);
|
|
7836
7843
|
// Set the next focus cell in the store.
|
|
7837
|
-
(_a = next.store) === null || _a === void 0 ? void 0 : _a.setNextFocus(Object.assign(Object.assign({}, focus), next.item));
|
|
7844
|
+
(_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));
|
|
7838
7845
|
}
|
|
7839
7846
|
focusByCell(storePos, start, end) {
|
|
7840
7847
|
const store = this.stores[storePos.y][storePos.x];
|
|
@@ -7847,15 +7854,17 @@ class SelectionStoreConnector {
|
|
|
7847
7854
|
}
|
|
7848
7855
|
// check for the focus in nearby store/viewport
|
|
7849
7856
|
const lastCell = store.store.get('lastCell');
|
|
7850
|
-
const next = this.getNextStore(focus, currentStorePointer, lastCell);
|
|
7857
|
+
const next = lastCell && this.getNextStore(focus, currentStorePointer, lastCell);
|
|
7851
7858
|
// if next store present - update
|
|
7852
7859
|
if (next === null || next === void 0 ? void 0 : next.store) {
|
|
7853
7860
|
const item = Object.assign(Object.assign({}, focus), next.item);
|
|
7854
7861
|
this.focus(next.store, { focus: item, end: item });
|
|
7855
7862
|
return null;
|
|
7856
7863
|
}
|
|
7857
|
-
|
|
7858
|
-
|
|
7864
|
+
if (lastCell) {
|
|
7865
|
+
focus = cropCellToMax(focus, lastCell);
|
|
7866
|
+
end = cropCellToMax(end, lastCell);
|
|
7867
|
+
}
|
|
7859
7868
|
store.setFocus(focus, end);
|
|
7860
7869
|
return focus;
|
|
7861
7870
|
}
|
|
@@ -7892,10 +7901,9 @@ class SelectionStoreConnector {
|
|
|
7892
7901
|
getNextStore(focus, currentStorePointer, lastCell) {
|
|
7893
7902
|
// item in new store
|
|
7894
7903
|
const nextItem = nextCell(focus, lastCell);
|
|
7895
|
-
let nextStore
|
|
7904
|
+
let nextStore;
|
|
7896
7905
|
if (nextItem) {
|
|
7897
|
-
|
|
7898
|
-
let type = i;
|
|
7906
|
+
Object.entries(nextItem).forEach(([type, nextItemCoord]) => {
|
|
7899
7907
|
let stores;
|
|
7900
7908
|
switch (type) {
|
|
7901
7909
|
case 'x':
|
|
@@ -7905,20 +7913,20 @@ class SelectionStoreConnector {
|
|
|
7905
7913
|
case 'y':
|
|
7906
7914
|
// Get the Y stores for the current X coordinate of the current store pointer
|
|
7907
7915
|
stores = this.getYStores(currentStorePointer.x);
|
|
7908
|
-
stores = this.getYStores(currentStorePointer.x);
|
|
7909
7916
|
break;
|
|
7910
7917
|
}
|
|
7911
|
-
|
|
7918
|
+
// Get the next store based on the item in the new store
|
|
7919
|
+
if (nextItemCoord >= 0) {
|
|
7912
7920
|
nextStore = stores[++currentStorePointer[type]];
|
|
7913
7921
|
}
|
|
7914
7922
|
else {
|
|
7915
7923
|
nextStore = stores[--currentStorePointer[type]];
|
|
7916
7924
|
const nextLastCell = nextStore === null || nextStore === void 0 ? void 0 : nextStore.store.get('lastCell');
|
|
7917
7925
|
if (nextLastCell) {
|
|
7918
|
-
nextItem[type] = nextLastCell[type] +
|
|
7926
|
+
nextItem[type] = nextLastCell[type] + nextItemCoord;
|
|
7919
7927
|
}
|
|
7920
7928
|
}
|
|
7921
|
-
}
|
|
7929
|
+
});
|
|
7922
7930
|
}
|
|
7923
7931
|
return {
|
|
7924
7932
|
store: nextStore,
|
|
@@ -7950,7 +7958,9 @@ class SelectionStoreConnector {
|
|
|
7950
7958
|
continue;
|
|
7951
7959
|
}
|
|
7952
7960
|
const lastCell = store.store.get('lastCell');
|
|
7953
|
-
|
|
7961
|
+
if (lastCell) {
|
|
7962
|
+
store.setRange({ x: 0, y: 0 }, { x: lastCell.x - 1, y: lastCell.y - 1 });
|
|
7963
|
+
}
|
|
7954
7964
|
}
|
|
7955
7965
|
}
|
|
7956
7966
|
}
|
|
@@ -7989,21 +7999,17 @@ function nextCell(cell, lastCell) {
|
|
|
7989
7999
|
return null;
|
|
7990
8000
|
}
|
|
7991
8001
|
function cropCellToMax(cell, lastCell) {
|
|
7992
|
-
const
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
newCell[t] = 0;
|
|
8002
|
+
const croppedCell = Object.assign({}, cell);
|
|
8003
|
+
const cellCoordinates = ['x', 'y'];
|
|
8004
|
+
for (const coordinate of cellCoordinates) {
|
|
8005
|
+
if (cell[coordinate] < 0) {
|
|
8006
|
+
croppedCell[coordinate] = 0;
|
|
7998
8007
|
}
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
for (let t of types) {
|
|
8002
|
-
if (cell[t] >= lastCell[t]) {
|
|
8003
|
-
newCell[t] = lastCell[t] - 1;
|
|
8008
|
+
else if (cell[coordinate] >= lastCell[coordinate]) {
|
|
8009
|
+
croppedCell[coordinate] = lastCell[coordinate] - 1;
|
|
8004
8010
|
}
|
|
8005
8011
|
}
|
|
8006
|
-
return
|
|
8012
|
+
return croppedCell;
|
|
8007
8013
|
}
|
|
8008
8014
|
function getRange(start, end) {
|
|
8009
8015
|
return start && end
|
|
@@ -8119,6 +8125,7 @@ function getItems(opt, currentSize = 0) {
|
|
|
8119
8125
|
return items;
|
|
8120
8126
|
}
|
|
8121
8127
|
function recombineByOffset(offset, data) {
|
|
8128
|
+
var _a, _b;
|
|
8122
8129
|
const newItems = [...data.items];
|
|
8123
8130
|
const itemsCount = newItems.length;
|
|
8124
8131
|
let newRange = {
|
|
@@ -8127,7 +8134,7 @@ function recombineByOffset(offset, data) {
|
|
|
8127
8134
|
};
|
|
8128
8135
|
// if offset out of revo-viewport, makes sense whole redraw
|
|
8129
8136
|
if (offset > itemsCount) {
|
|
8130
|
-
return
|
|
8137
|
+
return undefined;
|
|
8131
8138
|
}
|
|
8132
8139
|
// is direction of scroll positive
|
|
8133
8140
|
if (data.positiveDirection) {
|
|
@@ -8166,19 +8173,21 @@ function recombineByOffset(offset, data) {
|
|
|
8166
8173
|
let firstItem = getFirstItem(data);
|
|
8167
8174
|
const end = newRange.end;
|
|
8168
8175
|
for (let i = 0; i < offset; i++) {
|
|
8169
|
-
const newIndex = firstItem.itemIndex - 1;
|
|
8176
|
+
const newIndex = ((_a = firstItem === null || firstItem === void 0 ? void 0 : firstItem.itemIndex) !== null && _a !== void 0 ? _a : 0) - 1;
|
|
8170
8177
|
const size = getItemSize(newIndex, data.sizes, data.originItemSize);
|
|
8171
8178
|
// new item index to recombine
|
|
8172
8179
|
let newStart = end - i;
|
|
8173
8180
|
newStart = (newStart < 0 ? itemsCount + newStart : newStart) % itemsCount;
|
|
8174
8181
|
// item should always present, we do not create new item, we recombine them
|
|
8175
8182
|
if (!newItems[newStart]) {
|
|
8176
|
-
|
|
8183
|
+
console.error('incorrect index');
|
|
8184
|
+
break;
|
|
8177
8185
|
}
|
|
8178
8186
|
// do recombination
|
|
8187
|
+
const firstItemStart = (_b = firstItem === null || firstItem === void 0 ? void 0 : firstItem.start) !== null && _b !== void 0 ? _b : 0;
|
|
8179
8188
|
newItems[newStart] = firstItem = {
|
|
8180
|
-
start:
|
|
8181
|
-
end:
|
|
8189
|
+
start: firstItemStart - size,
|
|
8190
|
+
end: firstItemStart,
|
|
8182
8191
|
itemIndex: newIndex,
|
|
8183
8192
|
size: size,
|
|
8184
8193
|
};
|
|
@@ -8214,11 +8223,12 @@ function isActiveRange(pos, realSize, first, last) {
|
|
|
8214
8223
|
(pos > first.end && last.end === realSize));
|
|
8215
8224
|
}
|
|
8216
8225
|
function isActiveRangeOutsideLastItem(pos, virtualSize, firstItem, lastItem) {
|
|
8226
|
+
var _a;
|
|
8217
8227
|
// if no first item, means no items in viewport
|
|
8218
8228
|
if (!firstItem) {
|
|
8219
8229
|
return false;
|
|
8220
8230
|
}
|
|
8221
|
-
return virtualSize + pos > (lastItem === null || lastItem === void 0 ? void 0 : lastItem.end);
|
|
8231
|
+
return virtualSize + pos > ((_a = lastItem === null || lastItem === void 0 ? void 0 : lastItem.end) !== null && _a !== void 0 ? _a : 0);
|
|
8222
8232
|
}
|
|
8223
8233
|
function getFirstItem(s) {
|
|
8224
8234
|
return s.items[s.start];
|
|
@@ -8361,7 +8371,7 @@ class ViewportStore {
|
|
|
8361
8371
|
}
|
|
8362
8372
|
else if (isActiveRangeOutsideLastItem(pos, virtualSize, firstItem, lastItem)) {
|
|
8363
8373
|
const items = [...allItems.items];
|
|
8364
|
-
// check is any item missing for
|
|
8374
|
+
// check is any item missing for fulfill content
|
|
8365
8375
|
const missing = addMissingItems(firstItem, this.store.get('realCount'), virtualSize + pos - firstItem.start, allItems, {
|
|
8366
8376
|
sizes: dimension.sizes,
|
|
8367
8377
|
originItemSize: dimension.originItemSize,
|
|
@@ -8740,7 +8750,7 @@ function measureEqualDepth(groupA, groupB) {
|
|
|
8740
8750
|
}
|
|
8741
8751
|
function getParsedGroup(id) {
|
|
8742
8752
|
const parseGroup = JSON.parse(id);
|
|
8743
|
-
// extra precaution and type
|
|
8753
|
+
// extra precaution and type safeguard
|
|
8744
8754
|
if (!Array.isArray(parseGroup)) {
|
|
8745
8755
|
return null;
|
|
8746
8756
|
}
|
|
@@ -8856,7 +8866,7 @@ class ColumnService {
|
|
|
8856
8866
|
const data = this.rowDataModel(r, c);
|
|
8857
8867
|
return readOnly(data);
|
|
8858
8868
|
}
|
|
8859
|
-
return readOnly;
|
|
8869
|
+
return !!readOnly;
|
|
8860
8870
|
}
|
|
8861
8871
|
mergeProperties(r, c, defaultProps, model, extraPropsFunc) {
|
|
8862
8872
|
const cellClass = {
|
|
@@ -9297,18 +9307,18 @@ function getCurrentCell({ x, y }, { el, rows, cols }) {
|
|
|
9297
9307
|
return { x: rgCol.itemIndex, y: rgRow.itemIndex };
|
|
9298
9308
|
}
|
|
9299
9309
|
function getCoordinate(range, focus, changes, isMulti = false) {
|
|
9300
|
-
const updateCoordinate = (c) => {
|
|
9310
|
+
const updateCoordinate = (c, pos = 0) => {
|
|
9301
9311
|
const start = { x: range.x, y: range.y };
|
|
9302
9312
|
const end = isMulti ? { x: range.x1, y: range.y1 } : start;
|
|
9303
9313
|
const point = end[c] > focus[c] ? end : start;
|
|
9304
|
-
point[c] +=
|
|
9314
|
+
point[c] += pos;
|
|
9305
9315
|
return { start, end };
|
|
9306
9316
|
};
|
|
9307
9317
|
if (changes.x) {
|
|
9308
|
-
return updateCoordinate('x');
|
|
9318
|
+
return updateCoordinate('x', changes['x']);
|
|
9309
9319
|
}
|
|
9310
9320
|
if (changes.y) {
|
|
9311
|
-
return updateCoordinate('y');
|
|
9321
|
+
return updateCoordinate('y', changes['y']);
|
|
9312
9322
|
}
|
|
9313
9323
|
return null;
|
|
9314
9324
|
}
|
|
@@ -9712,8 +9722,9 @@ class AutoFillService {
|
|
|
9712
9722
|
this.sv.setTempRange(null);
|
|
9713
9723
|
}
|
|
9714
9724
|
else {
|
|
9725
|
+
const area = getRange(this.autoFillInitial, this.autoFillLast);
|
|
9715
9726
|
this.sv.setTempRange({
|
|
9716
|
-
area
|
|
9727
|
+
area,
|
|
9717
9728
|
type: this.autoFillType,
|
|
9718
9729
|
});
|
|
9719
9730
|
}
|
|
@@ -9748,7 +9759,7 @@ class AutoFillService {
|
|
|
9748
9759
|
range,
|
|
9749
9760
|
});
|
|
9750
9761
|
// If data apply was not prevented, apply new range
|
|
9751
|
-
if (!stopApply) {
|
|
9762
|
+
if (!stopApply && oldRange) {
|
|
9752
9763
|
this.applyRangeWithData(newRange, oldRange);
|
|
9753
9764
|
}
|
|
9754
9765
|
else {
|
|
@@ -9786,14 +9797,14 @@ class AutoFillService {
|
|
|
9786
9797
|
this.sv.setRange(range);
|
|
9787
9798
|
}
|
|
9788
9799
|
/** Apply range and copy data during range application */
|
|
9789
|
-
applyRangeWithData(newRange,
|
|
9800
|
+
applyRangeWithData(newRange, rangeToCopy) {
|
|
9790
9801
|
const rangeData = {
|
|
9791
9802
|
type: this.sv.dataStore.get('type'),
|
|
9792
9803
|
colType: this.sv.columnService.type,
|
|
9793
9804
|
newData: {},
|
|
9794
9805
|
mapping: {},
|
|
9795
9806
|
newRange,
|
|
9796
|
-
oldRange,
|
|
9807
|
+
oldRange: rangeToCopy,
|
|
9797
9808
|
};
|
|
9798
9809
|
const { mapping, changed } = this.sv.columnService.getRangeData(rangeData, this.sv.columnService.columns);
|
|
9799
9810
|
rangeData.newData = changed;
|
|
@@ -9860,7 +9871,6 @@ class OverlaySelection {
|
|
|
9860
9871
|
this.beforeCellSave = createEvent(this, "beforecellsave", 7);
|
|
9861
9872
|
this.keyboardService = null;
|
|
9862
9873
|
this.autoFillService = null;
|
|
9863
|
-
this.revogrEdit = null;
|
|
9864
9874
|
this.unsubscribeSelectionStore = [];
|
|
9865
9875
|
this.readonly = undefined;
|
|
9866
9876
|
this.range = undefined;
|
|
@@ -9880,19 +9890,21 @@ class OverlaySelection {
|
|
|
9880
9890
|
// #endregion
|
|
9881
9891
|
// #region Listeners
|
|
9882
9892
|
onMouseMove(e) {
|
|
9893
|
+
var _a;
|
|
9883
9894
|
if (this.selectionStore.get('focus')) {
|
|
9884
|
-
this.autoFillService.selectionMouseMove(e);
|
|
9895
|
+
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.selectionMouseMove(e);
|
|
9885
9896
|
}
|
|
9886
9897
|
}
|
|
9887
9898
|
/**
|
|
9888
|
-
* Action finished inside
|
|
9899
|
+
* Action finished inside the document.
|
|
9889
9900
|
* Pointer left document, clear any active operation.
|
|
9890
9901
|
*/
|
|
9891
9902
|
onMouseUp() {
|
|
9892
|
-
|
|
9903
|
+
var _a;
|
|
9904
|
+
// Clear autofill selection
|
|
9893
9905
|
// when pointer left document,
|
|
9894
9906
|
// clear any active operation.
|
|
9895
|
-
this.autoFillService.clearAutoFillSelection(this.selectionStore.get('focus'), this.selectionStore.get('range'));
|
|
9907
|
+
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.clearAutoFillSelection(this.selectionStore.get('focus'), this.selectionStore.get('range'));
|
|
9896
9908
|
}
|
|
9897
9909
|
/**
|
|
9898
9910
|
* Row drag started.
|
|
@@ -9936,10 +9948,10 @@ class OverlaySelection {
|
|
|
9936
9948
|
// clear subscriptions
|
|
9937
9949
|
this.unsubscribeSelectionStore.forEach(v => v());
|
|
9938
9950
|
this.unsubscribeSelectionStore.length = 0;
|
|
9939
|
-
this.unsubscribeSelectionStore.push(s.onChange('nextFocus', (v) => this.doFocus(v, v)));
|
|
9951
|
+
this.unsubscribeSelectionStore.push(s.onChange('nextFocus', (v) => v && this.doFocus(v, v)));
|
|
9940
9952
|
this.keyboardService = new KeyboardService({
|
|
9941
9953
|
selectionStore: s,
|
|
9942
|
-
range: r => this.triggerRangeEvent(r),
|
|
9954
|
+
range: r => !!r && this.triggerRangeEvent(r),
|
|
9943
9955
|
focus: (f, changes, focusNextViewport) => {
|
|
9944
9956
|
if (focusNextViewport) {
|
|
9945
9957
|
this.beforeNextViewportFocus.emit(f);
|
|
@@ -9956,7 +9968,8 @@ class OverlaySelection {
|
|
|
9956
9968
|
this.doEdit(val);
|
|
9957
9969
|
},
|
|
9958
9970
|
cancel: async () => {
|
|
9959
|
-
|
|
9971
|
+
var _a;
|
|
9972
|
+
await ((_a = this.revogrEdit) === null || _a === void 0 ? void 0 : _a.cancelChanges());
|
|
9960
9973
|
this.closeEdit();
|
|
9961
9974
|
},
|
|
9962
9975
|
clearCell: () => !this.readonly && this.clearCell(),
|
|
@@ -9978,7 +9991,7 @@ class OverlaySelection {
|
|
|
9978
9991
|
selectionChanged: e => this.selectionChange.emit(e),
|
|
9979
9992
|
rangeCopy: e => this.beforeRangeCopyApply.emit(e),
|
|
9980
9993
|
rangeDataApply: e => this.rangeEditApply.emit(e),
|
|
9981
|
-
setRange: e => this.triggerRangeEvent(e),
|
|
9994
|
+
setRange: e => !!e && this.triggerRangeEvent(e),
|
|
9982
9995
|
getData: () => this.getData(),
|
|
9983
9996
|
});
|
|
9984
9997
|
}
|
|
@@ -10040,6 +10053,7 @@ class OverlaySelection {
|
|
|
10040
10053
|
} }));
|
|
10041
10054
|
}
|
|
10042
10055
|
render() {
|
|
10056
|
+
var _a;
|
|
10043
10057
|
const nodes = [];
|
|
10044
10058
|
const editCell = this.renderEditor();
|
|
10045
10059
|
// Editor
|
|
@@ -10059,14 +10073,14 @@ class OverlaySelection {
|
|
|
10059
10073
|
}
|
|
10060
10074
|
// Autofill
|
|
10061
10075
|
if (focus && !this.readonly && this.range) {
|
|
10062
|
-
nodes.push(this.autoFillService.renderAutofill(range, focus));
|
|
10076
|
+
nodes.push((_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.renderAutofill(range, focus));
|
|
10063
10077
|
}
|
|
10064
10078
|
// Order
|
|
10065
10079
|
if (this.canDrag) {
|
|
10066
10080
|
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) }));
|
|
10067
10081
|
}
|
|
10068
10082
|
}
|
|
10069
|
-
return (hAsync(Host, { key: '
|
|
10083
|
+
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" })));
|
|
10070
10084
|
}
|
|
10071
10085
|
/**
|
|
10072
10086
|
* Executes the focus operation on the specified range of cells.
|
|
@@ -10121,6 +10135,7 @@ class OverlaySelection {
|
|
|
10121
10135
|
* Handle mouse down event on Host element
|
|
10122
10136
|
*/
|
|
10123
10137
|
onElementMouseDown(e, touch = false) {
|
|
10138
|
+
var _a;
|
|
10124
10139
|
// Get the target element from the event object
|
|
10125
10140
|
const targetElement = e.target;
|
|
10126
10141
|
// Ignore focus if clicked input
|
|
@@ -10137,7 +10152,7 @@ class OverlaySelection {
|
|
|
10137
10152
|
this.focus(focusCell, this.range && e.shiftKey);
|
|
10138
10153
|
// Initiate autofill selection
|
|
10139
10154
|
if (this.range) {
|
|
10140
|
-
this.autoFillService.selectionStart(targetElement, this.getData());
|
|
10155
|
+
targetElement && ((_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.selectionStart(targetElement, this.getData()));
|
|
10141
10156
|
// Prevent default behavior for mouse events,
|
|
10142
10157
|
// but only if target element is not a mobile input
|
|
10143
10158
|
if (!touch) {
|
|
@@ -10157,18 +10172,21 @@ class OverlaySelection {
|
|
|
10157
10172
|
var _a;
|
|
10158
10173
|
if (this.canEdit()) {
|
|
10159
10174
|
const focus = this.selectionStore.get('focus');
|
|
10175
|
+
if (!focus) {
|
|
10176
|
+
return;
|
|
10177
|
+
}
|
|
10160
10178
|
const data = this.columnService.getSaveData(focus.y, focus.x);
|
|
10161
10179
|
(_a = this.setEdit) === null || _a === void 0 ? void 0 : _a.emit(Object.assign(Object.assign({}, data), { val }));
|
|
10162
10180
|
}
|
|
10163
10181
|
}
|
|
10164
10182
|
/**
|
|
10165
10183
|
* Close editor event triggered
|
|
10166
|
-
* @param details - if requires focus next
|
|
10184
|
+
* @param details - if it requires focus next
|
|
10167
10185
|
*/
|
|
10168
|
-
closeEdit(e) {
|
|
10186
|
+
async closeEdit(e) {
|
|
10169
10187
|
this.cancelEdit.emit();
|
|
10170
10188
|
if (e === null || e === void 0 ? void 0 : e.detail) {
|
|
10171
|
-
this.focusNext();
|
|
10189
|
+
await this.focusNext();
|
|
10172
10190
|
}
|
|
10173
10191
|
}
|
|
10174
10192
|
/**
|
|
@@ -10188,6 +10206,7 @@ class OverlaySelection {
|
|
|
10188
10206
|
return range;
|
|
10189
10207
|
}
|
|
10190
10208
|
onCopy(e) {
|
|
10209
|
+
var _a;
|
|
10191
10210
|
const range = this.getRegion();
|
|
10192
10211
|
const canCopyEvent = this.beforeCopyRegion.emit(range);
|
|
10193
10212
|
if (canCopyEvent.defaultPrevented) {
|
|
@@ -10203,10 +10222,11 @@ class OverlaySelection {
|
|
|
10203
10222
|
rangeData = event.detail.data;
|
|
10204
10223
|
}
|
|
10205
10224
|
}
|
|
10206
|
-
this.clipboard.doCopy(e, rangeData);
|
|
10225
|
+
(_a = this.clipboard) === null || _a === void 0 ? void 0 : _a.doCopy(e, rangeData);
|
|
10207
10226
|
return true;
|
|
10208
10227
|
}
|
|
10209
10228
|
onPaste(data) {
|
|
10229
|
+
var _a;
|
|
10210
10230
|
const focus = this.selectionStore.get('focus');
|
|
10211
10231
|
const isEditing = this.selectionStore.get('edit') !== null;
|
|
10212
10232
|
if (!focus || isEditing) {
|
|
@@ -10217,24 +10237,30 @@ class OverlaySelection {
|
|
|
10217
10237
|
if (canPaste) {
|
|
10218
10238
|
return;
|
|
10219
10239
|
}
|
|
10220
|
-
this.autoFillService.onRangeApply(changed, range);
|
|
10240
|
+
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(changed, range);
|
|
10221
10241
|
}
|
|
10222
10242
|
async focusNext() {
|
|
10223
|
-
|
|
10243
|
+
var _a;
|
|
10244
|
+
const canFocus = await ((_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyChangeSelection(new KeyboardEvent('keydown', {
|
|
10224
10245
|
code: codesLetter.ARROW_DOWN,
|
|
10225
|
-
}), this.range);
|
|
10246
|
+
}), this.range));
|
|
10226
10247
|
if (!canFocus) {
|
|
10227
10248
|
this.closeEdit();
|
|
10228
10249
|
}
|
|
10229
10250
|
}
|
|
10230
10251
|
clearCell() {
|
|
10231
|
-
|
|
10232
|
-
|
|
10233
|
-
|
|
10234
|
-
|
|
10252
|
+
var _a;
|
|
10253
|
+
const range = this.selectionStore.get('range');
|
|
10254
|
+
if (range &&
|
|
10255
|
+
!isRangeSingleCell(range)) {
|
|
10256
|
+
const data = this.columnService.getRangeStaticData(range, '');
|
|
10257
|
+
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(data, range);
|
|
10235
10258
|
}
|
|
10236
10259
|
else if (this.canEdit()) {
|
|
10237
10260
|
const focused = this.selectionStore.get('focus');
|
|
10261
|
+
if (!focused) {
|
|
10262
|
+
return;
|
|
10263
|
+
}
|
|
10238
10264
|
const cell = this.columnService.getSaveData(focused.y, focused.x);
|
|
10239
10265
|
this.cellEdit({
|
|
10240
10266
|
rgRow: focused.y,
|
|
@@ -10271,7 +10297,10 @@ class OverlaySelection {
|
|
|
10271
10297
|
const end = cell;
|
|
10272
10298
|
const start = this.selectionStore.get('focus');
|
|
10273
10299
|
if (isRangeEdit && start) {
|
|
10274
|
-
|
|
10300
|
+
const range = getRange(start, end);
|
|
10301
|
+
if (range) {
|
|
10302
|
+
return this.triggerRangeEvent(range);
|
|
10303
|
+
}
|
|
10275
10304
|
}
|
|
10276
10305
|
return this.doFocus(cell, end);
|
|
10277
10306
|
}
|
|
@@ -10332,6 +10361,7 @@ class TextEditor {
|
|
|
10332
10361
|
constructor(column, saveCallback) {
|
|
10333
10362
|
this.column = column;
|
|
10334
10363
|
this.saveCallback = saveCallback;
|
|
10364
|
+
this.editInput = null;
|
|
10335
10365
|
this.element = null;
|
|
10336
10366
|
this.editCell = undefined;
|
|
10337
10367
|
}
|
|
@@ -10362,7 +10392,8 @@ class TextEditor {
|
|
|
10362
10392
|
* IMPORTANT: Prevent scroll glitches when editor is closed and focus is on current input element.
|
|
10363
10393
|
*/
|
|
10364
10394
|
beforeDisconnect() {
|
|
10365
|
-
|
|
10395
|
+
var _a;
|
|
10396
|
+
(_a = this.editInput) === null || _a === void 0 ? void 0 : _a.blur();
|
|
10366
10397
|
}
|
|
10367
10398
|
/**
|
|
10368
10399
|
* Get value from input
|
|
@@ -10465,8 +10496,8 @@ class RevoEdit {
|
|
|
10465
10496
|
}
|
|
10466
10497
|
}
|
|
10467
10498
|
componentWillRender() {
|
|
10468
|
-
// Active editor present
|
|
10469
|
-
if (this.currentEditor) {
|
|
10499
|
+
// Active editor present and not yet closed.
|
|
10500
|
+
if (this.currentEditor || !this.column) {
|
|
10470
10501
|
return;
|
|
10471
10502
|
}
|
|
10472
10503
|
this.preventSaveOnClose = false;
|
|
@@ -11147,8 +11178,9 @@ class DimensionProvider {
|
|
|
11147
11178
|
}
|
|
11148
11179
|
/**
|
|
11149
11180
|
* Sets dimension data and view port coordinate
|
|
11150
|
-
* @param
|
|
11181
|
+
* @param itemCount
|
|
11151
11182
|
* @param type - dimension type
|
|
11183
|
+
* @param noVirtual - disable virtual data
|
|
11152
11184
|
*/
|
|
11153
11185
|
setData(itemCount, type, noVirtual = false) {
|
|
11154
11186
|
this.setItemCount(itemCount, type);
|
|
@@ -11302,7 +11334,7 @@ class ThemeService {
|
|
|
11302
11334
|
}
|
|
11303
11335
|
}
|
|
11304
11336
|
static getTheme(theme) {
|
|
11305
|
-
if (allowedThemes.indexOf(theme) > -1) {
|
|
11337
|
+
if (theme && allowedThemes.indexOf(theme) > -1) {
|
|
11306
11338
|
return theme;
|
|
11307
11339
|
}
|
|
11308
11340
|
return DEFAULT_THEME;
|
|
@@ -12158,10 +12190,6 @@ class SortingPlugin extends BasePlugin {
|
|
|
12158
12190
|
constructor(revogrid, providers) {
|
|
12159
12191
|
super(revogrid, providers);
|
|
12160
12192
|
this.revogrid = revogrid;
|
|
12161
|
-
// sorting order per column
|
|
12162
|
-
this.sorting = null;
|
|
12163
|
-
// sorting function per column, multiple columns sorting supported
|
|
12164
|
-
this.sortingFunc = null;
|
|
12165
12193
|
this.sortingPromise = null;
|
|
12166
12194
|
this.postponeSort = debounce_1(async (order, comparison) => this.runSorting(order, comparison), 50);
|
|
12167
12195
|
const beforeanysource = async ({ detail: { type }, }) => {
|
|
@@ -12175,7 +12203,7 @@ class SortingPlugin extends BasePlugin {
|
|
|
12175
12203
|
}
|
|
12176
12204
|
};
|
|
12177
12205
|
const aftercolumnsset = async ({ detail: { order }, }) => {
|
|
12178
|
-
const columns = await this.revogrid.getColumns();
|
|
12206
|
+
const columns = (await this.revogrid.getColumns());
|
|
12179
12207
|
const sortingFunc = {};
|
|
12180
12208
|
for (let prop in order) {
|
|
12181
12209
|
const cmp = this.getComparer(ColumnDataProvider.getColumnByProp(columns, prop), order[prop]);
|
|
@@ -12221,6 +12249,7 @@ class SortingPlugin extends BasePlugin {
|
|
|
12221
12249
|
* If additive - add to existing sorting, multiple columns can be sorted
|
|
12222
12250
|
*/
|
|
12223
12251
|
async headerclick(column, index, additive) {
|
|
12252
|
+
var _a, _b;
|
|
12224
12253
|
let order = this.getNextOrder(column.order);
|
|
12225
12254
|
const beforeEvent = this.emit('beforesorting', { column, order, additive });
|
|
12226
12255
|
if (beforeEvent.defaultPrevented) {
|
|
@@ -12261,8 +12290,8 @@ class SortingPlugin extends BasePlugin {
|
|
|
12261
12290
|
this.sortingFunc = { [column.prop]: cmp };
|
|
12262
12291
|
}
|
|
12263
12292
|
else {
|
|
12264
|
-
|
|
12265
|
-
|
|
12293
|
+
(_a = this.sorting) === null || _a === void 0 ? true : delete _a[column.prop];
|
|
12294
|
+
(_b = this.sortingFunc) === null || _b === void 0 ? true : delete _b[column.prop];
|
|
12266
12295
|
}
|
|
12267
12296
|
}
|
|
12268
12297
|
this.startSorting(this.sorting, this.sortingFunc);
|
|
@@ -12278,8 +12307,8 @@ class SortingPlugin extends BasePlugin {
|
|
|
12278
12307
|
async sort(sorting, sortingFunc, types = ['rgRow', 'rowPinStart', 'rowPinEnd']) {
|
|
12279
12308
|
// if no sorting - reset
|
|
12280
12309
|
if (!size_1(sorting)) {
|
|
12281
|
-
this.sorting =
|
|
12282
|
-
this.sortingFunc =
|
|
12310
|
+
this.sorting = undefined;
|
|
12311
|
+
this.sortingFunc = undefined;
|
|
12283
12312
|
for (let type of types) {
|
|
12284
12313
|
const store = await this.revogrid.getSourceStore(type);
|
|
12285
12314
|
// row data
|
|
@@ -12324,10 +12353,10 @@ class SortingPlugin extends BasePlugin {
|
|
|
12324
12353
|
return -1 * cmp(prop, a, b);
|
|
12325
12354
|
};
|
|
12326
12355
|
}
|
|
12327
|
-
sortIndexByItems(indexes, source, sortingFunc) {
|
|
12356
|
+
sortIndexByItems(indexes, source, sortingFunc = {}) {
|
|
12328
12357
|
// if no sorting - return unsorted indexes
|
|
12329
12358
|
if (Object.entries(sortingFunc).length === 0) {
|
|
12330
|
-
//
|
|
12359
|
+
// Unsorted indexes
|
|
12331
12360
|
return [...Array(indexes.length).keys()];
|
|
12332
12361
|
}
|
|
12333
12362
|
//
|
|
@@ -12343,7 +12372,7 @@ class SortingPlugin extends BasePlugin {
|
|
|
12343
12372
|
* 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.
|
|
12344
12373
|
* 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.
|
|
12345
12374
|
*/
|
|
12346
|
-
const sorted = cmp(prop, itemA, itemB);
|
|
12375
|
+
const sorted = cmp === null || cmp === void 0 ? void 0 : cmp(prop, itemA, itemB);
|
|
12347
12376
|
if (sorted) {
|
|
12348
12377
|
return sorted;
|
|
12349
12378
|
}
|
|
@@ -12593,13 +12622,13 @@ class ExportFilePlugin extends BasePlugin {
|
|
|
12593
12622
|
/** Export file */
|
|
12594
12623
|
async exportFile(options = {}, t = ExportTypes.csv) {
|
|
12595
12624
|
const formatter = this.formatter(t, options);
|
|
12596
|
-
const blob = await this.getBlob(formatter);
|
|
12597
12625
|
// url
|
|
12598
12626
|
const URL = window.URL || window.webkitURL;
|
|
12599
12627
|
const a = document.createElement('a');
|
|
12600
12628
|
const { filename, fileKind } = formatter.options;
|
|
12601
12629
|
const name = `${filename}.${fileKind}`;
|
|
12602
|
-
const
|
|
12630
|
+
const blob = await this.getBlob(formatter);
|
|
12631
|
+
const url = blob ? URL.createObjectURL(blob) : '';
|
|
12603
12632
|
a.style.display = 'none';
|
|
12604
12633
|
a.setAttribute('href', url);
|
|
12605
12634
|
a.setAttribute('download', name);
|
|
@@ -13024,7 +13053,7 @@ class GroupingRowPlugin extends BasePlugin {
|
|
|
13024
13053
|
const { sourceWithGroups, depth, trimmed, oldNewIndexMap, childrenByGroup, } = gatherGrouping(source, ((_a = this.options) === null || _a === void 0 ? void 0 : _a.props) || [], Object.assign({ prevExpanded }, options));
|
|
13025
13054
|
// setup source
|
|
13026
13055
|
this.providers.data.setData(sourceWithGroups, GROUPING_ROW_TYPE, this.revogrid.disableVirtualY, { depth, customRenderer: options === null || options === void 0 ? void 0 : options.groupLabelTemplate }, true);
|
|
13027
|
-
this.updateTrimmed(trimmed, childrenByGroup, oldNewIndexes, oldNewIndexMap);
|
|
13056
|
+
this.updateTrimmed(trimmed, childrenByGroup, oldNewIndexes !== null && oldNewIndexes !== void 0 ? oldNewIndexes : {}, oldNewIndexMap);
|
|
13028
13057
|
}
|
|
13029
13058
|
/**
|
|
13030
13059
|
* Apply grouping on data set
|
|
@@ -13090,7 +13119,7 @@ class GroupingRowPlugin extends BasePlugin {
|
|
|
13090
13119
|
this.providers.data.setData(source, GROUPING_ROW_TYPE, this.revogrid.disableVirtualY, undefined, true);
|
|
13091
13120
|
this.updateTrimmed(undefined, undefined, oldNewIndexes);
|
|
13092
13121
|
}
|
|
13093
|
-
updateTrimmed(trimmedGroup = {}, _childrenByGroup = {}, firstLevelMap, secondLevelMap) {
|
|
13122
|
+
updateTrimmed(trimmedGroup = {}, _childrenByGroup = {}, firstLevelMap = {}, secondLevelMap) {
|
|
13094
13123
|
// map previously trimmed data
|
|
13095
13124
|
const trimemedOptionsToUpgrade = processDoubleConversionTrimmed(this.trimmed, firstLevelMap, secondLevelMap);
|
|
13096
13125
|
for (let type in trimemedOptionsToUpgrade) {
|
|
@@ -13128,6 +13157,25 @@ function getLastCell(data, rowType) {
|
|
|
13128
13157
|
y: lastVisibleRowCount,
|
|
13129
13158
|
};
|
|
13130
13159
|
}
|
|
13160
|
+
function viewportDataPartition(data, type, slot, fixed) {
|
|
13161
|
+
return {
|
|
13162
|
+
colData: data.colStore,
|
|
13163
|
+
viewportCol: data.viewports[data.colType].store,
|
|
13164
|
+
viewportRow: data.viewports[type].store,
|
|
13165
|
+
// lastCell is the last real coordinate + 1
|
|
13166
|
+
lastCell: getLastCell(data, type),
|
|
13167
|
+
slot,
|
|
13168
|
+
type,
|
|
13169
|
+
canDrag: !fixed,
|
|
13170
|
+
position: data.position,
|
|
13171
|
+
dataStore: data.rowStores[type].store,
|
|
13172
|
+
dimensionCol: data.dimensions[data.colType].store,
|
|
13173
|
+
dimensionRow: data.dimensions[type].store,
|
|
13174
|
+
style: fixed
|
|
13175
|
+
? { height: `${data.dimensions[type].store.get('realSize')}px` }
|
|
13176
|
+
: undefined,
|
|
13177
|
+
};
|
|
13178
|
+
}
|
|
13131
13179
|
|
|
13132
13180
|
/** Collect Column data */
|
|
13133
13181
|
function gatherColumnData(data) {
|
|
@@ -13210,11 +13258,9 @@ class ViewportService {
|
|
|
13210
13258
|
segmentSelection.setLastCell(rgRow.lastCell);
|
|
13211
13259
|
// register selection store for Row
|
|
13212
13260
|
const rowSelectionStore = this.registerRow(rgRow.position.y, rgRow.type);
|
|
13213
|
-
const rowDef = Object.assign(Object.assign({}, rgRow), { rowSelectionStore, segmentSelectionStore: segmentSelection.store, ref: (e) => config.selectionStoreConnector.registerSection(e), onSetrange: e => {
|
|
13261
|
+
const rowDef = Object.assign(Object.assign({ colType: val }, rgRow), { rowSelectionStore, segmentSelectionStore: segmentSelection.store, ref: (e) => config.selectionStoreConnector.registerSection(e), onSetrange: e => {
|
|
13214
13262
|
segmentSelection.setRangeArea(e.detail);
|
|
13215
|
-
}, onSettemprange: e => {
|
|
13216
|
-
segmentSelection.setTempArea(e.detail);
|
|
13217
|
-
}, onFocuscell: e => {
|
|
13263
|
+
}, onSettemprange: e => segmentSelection.setTempArea(e.detail), onFocuscell: e => {
|
|
13218
13264
|
// todo: multi focus
|
|
13219
13265
|
segmentSelection.clearFocus();
|
|
13220
13266
|
config.selectionStoreConnector.focus(segmentSelection, e.detail);
|
|
@@ -13264,43 +13310,27 @@ class ViewportService {
|
|
|
13264
13310
|
};
|
|
13265
13311
|
// y position for selection
|
|
13266
13312
|
let y = 0;
|
|
13267
|
-
return rowTypes.reduce((
|
|
13313
|
+
return rowTypes.reduce((result, type) => {
|
|
13268
13314
|
// filter out empty sources, we still need to return source to keep slot working
|
|
13269
13315
|
const isPresent = data.viewports[type].store.get('realCount') || type === 'rgRow';
|
|
13270
13316
|
const rgCol = Object.assign(Object.assign({}, data), { position: Object.assign(Object.assign({}, data.position), { y: isPresent ? y : EMPTY_INDEX }) });
|
|
13271
|
-
|
|
13317
|
+
const partition = viewportDataPartition(rgCol, type, slots[type], type !== 'rgRow');
|
|
13318
|
+
result.push(partition);
|
|
13272
13319
|
if (isPresent) {
|
|
13273
13320
|
y++;
|
|
13274
13321
|
}
|
|
13275
|
-
return
|
|
13322
|
+
return result;
|
|
13276
13323
|
}, []);
|
|
13277
13324
|
}
|
|
13278
|
-
dataPartition(data, type, slot, fixed) {
|
|
13279
|
-
return {
|
|
13280
|
-
colData: data.colStore,
|
|
13281
|
-
viewportCol: data.viewports[data.colType].store,
|
|
13282
|
-
viewportRow: data.viewports[type].store,
|
|
13283
|
-
// lastCell is the last real coordinate + 1
|
|
13284
|
-
lastCell: getLastCell(data, type),
|
|
13285
|
-
slot,
|
|
13286
|
-
type,
|
|
13287
|
-
canDrag: !fixed,
|
|
13288
|
-
position: data.position,
|
|
13289
|
-
dataStore: data.rowStores[type].store,
|
|
13290
|
-
dimensionCol: data.dimensions[data.colType].store,
|
|
13291
|
-
dimensionRow: data.dimensions[type].store,
|
|
13292
|
-
style: fixed
|
|
13293
|
-
? { height: `${data.dimensions[type].store.get('realSize')}px` }
|
|
13294
|
-
: undefined,
|
|
13295
|
-
};
|
|
13296
|
-
}
|
|
13297
13325
|
scrollToCell(cell) {
|
|
13298
13326
|
for (let key in cell) {
|
|
13299
13327
|
const coordinate = cell[key];
|
|
13300
|
-
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13328
|
+
if (typeof coordinate === 'number') {
|
|
13329
|
+
this.config.scrollingService.proxyScroll({
|
|
13330
|
+
dimension: key === 'x' ? 'rgCol' : 'rgRow',
|
|
13331
|
+
coordinate,
|
|
13332
|
+
});
|
|
13333
|
+
}
|
|
13304
13334
|
}
|
|
13305
13335
|
}
|
|
13306
13336
|
/**
|
|
@@ -13336,22 +13366,30 @@ class ViewportService {
|
|
|
13336
13366
|
}
|
|
13337
13367
|
getStoreCoordinateByType(colType, rowType) {
|
|
13338
13368
|
const stores = this.config.selectionStoreConnector.storesByType;
|
|
13339
|
-
|
|
13369
|
+
if (typeof stores[colType] === 'undefined' || typeof stores[rowType] === 'undefined') {
|
|
13370
|
+
return;
|
|
13371
|
+
}
|
|
13372
|
+
return {
|
|
13340
13373
|
x: stores[colType],
|
|
13341
13374
|
y: stores[rowType],
|
|
13342
13375
|
};
|
|
13343
|
-
return storeCoordinate;
|
|
13344
13376
|
}
|
|
13345
13377
|
setFocus(colType, rowType, start, end) {
|
|
13346
13378
|
var _a;
|
|
13347
|
-
|
|
13379
|
+
const coordinate = this.getStoreCoordinateByType(colType, rowType);
|
|
13380
|
+
if (coordinate) {
|
|
13381
|
+
(_a = this.config.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.focusByCell(coordinate, start, end);
|
|
13382
|
+
}
|
|
13348
13383
|
}
|
|
13349
13384
|
getSelectedRange() {
|
|
13350
13385
|
return this.config.selectionStoreConnector.selectedRange;
|
|
13351
13386
|
}
|
|
13352
13387
|
setEdit(rowIndex, colIndex, colType, rowType) {
|
|
13353
13388
|
var _a;
|
|
13354
|
-
|
|
13389
|
+
const coordinate = this.getStoreCoordinateByType(colType, rowType);
|
|
13390
|
+
if (coordinate) {
|
|
13391
|
+
(_a = this.config.selectionStoreConnector) === null || _a === void 0 ? void 0 : _a.setEditByCell(coordinate, { x: colIndex, y: rowIndex });
|
|
13392
|
+
}
|
|
13355
13393
|
}
|
|
13356
13394
|
}
|
|
13357
13395
|
|
|
@@ -13362,7 +13400,7 @@ class GridScrollingService {
|
|
|
13362
13400
|
}
|
|
13363
13401
|
async proxyScroll(e, key) {
|
|
13364
13402
|
var _a;
|
|
13365
|
-
let
|
|
13403
|
+
let newEventPromise;
|
|
13366
13404
|
let event = e;
|
|
13367
13405
|
for (let elKey in this.elements) {
|
|
13368
13406
|
// skip
|
|
@@ -13376,7 +13414,7 @@ class GridScrollingService {
|
|
|
13376
13414
|
}
|
|
13377
13415
|
for (let el of this.elements[elKey]) {
|
|
13378
13416
|
if (el.changeScroll) {
|
|
13379
|
-
|
|
13417
|
+
newEventPromise = el.changeScroll(e);
|
|
13380
13418
|
}
|
|
13381
13419
|
}
|
|
13382
13420
|
}
|
|
@@ -13386,8 +13424,9 @@ class GridScrollingService {
|
|
|
13386
13424
|
}
|
|
13387
13425
|
}
|
|
13388
13426
|
}
|
|
13427
|
+
const newEvent = await newEventPromise;
|
|
13389
13428
|
if (newEvent) {
|
|
13390
|
-
event =
|
|
13429
|
+
event = newEvent;
|
|
13391
13430
|
}
|
|
13392
13431
|
this.setViewport(event);
|
|
13393
13432
|
}
|
|
@@ -13587,14 +13626,15 @@ function isStretchPlugin(plugin) {
|
|
|
13587
13626
|
const rowDefinitionByType = (newVal = []) => {
|
|
13588
13627
|
const result = {};
|
|
13589
13628
|
for (const v of newVal) {
|
|
13590
|
-
|
|
13591
|
-
|
|
13629
|
+
let rowDefs = result[v.type];
|
|
13630
|
+
if (!rowDefs) {
|
|
13631
|
+
rowDefs = result[v.type] = {};
|
|
13592
13632
|
}
|
|
13593
13633
|
if (v.size) {
|
|
13594
|
-
if (!
|
|
13595
|
-
|
|
13634
|
+
if (!rowDefs.sizes) {
|
|
13635
|
+
rowDefs.sizes = {};
|
|
13596
13636
|
}
|
|
13597
|
-
|
|
13637
|
+
rowDefs.sizes[v.index] = v.size;
|
|
13598
13638
|
}
|
|
13599
13639
|
}
|
|
13600
13640
|
return result;
|
|
@@ -13602,11 +13642,12 @@ const rowDefinitionByType = (newVal = []) => {
|
|
|
13602
13642
|
const rowDefinitionRemoveByType = (oldVal = []) => {
|
|
13603
13643
|
const result = {};
|
|
13604
13644
|
for (const v of oldVal) {
|
|
13605
|
-
|
|
13606
|
-
|
|
13645
|
+
let rowDefs = result[v.type];
|
|
13646
|
+
if (!rowDefs) {
|
|
13647
|
+
rowDefs = result[v.type] = [];
|
|
13607
13648
|
}
|
|
13608
13649
|
if (v.size) {
|
|
13609
|
-
|
|
13650
|
+
rowDefs.push(v.index);
|
|
13610
13651
|
}
|
|
13611
13652
|
}
|
|
13612
13653
|
return result;
|
|
@@ -13726,6 +13767,7 @@ const defaultProps = (props) => {
|
|
|
13726
13767
|
};
|
|
13727
13768
|
class ResizeDirective {
|
|
13728
13769
|
constructor(initialProps, $event) {
|
|
13770
|
+
var _a, _b;
|
|
13729
13771
|
this.initialProps = initialProps;
|
|
13730
13772
|
this.$event = $event;
|
|
13731
13773
|
this.mouseX = 0;
|
|
@@ -13740,8 +13782,8 @@ class ResizeDirective {
|
|
|
13740
13782
|
this.mouseUpFunc = this.handleUp.bind(this);
|
|
13741
13783
|
this.minW = this.props.minWidth;
|
|
13742
13784
|
this.minH = this.props.minHeight;
|
|
13743
|
-
this.maxW = this.props.maxWidth;
|
|
13744
|
-
this.maxH = this.props.maxHeight;
|
|
13785
|
+
this.maxW = (_a = this.props.maxWidth) !== null && _a !== void 0 ? _a : 0;
|
|
13786
|
+
this.maxH = (_b = this.props.maxHeight) !== null && _b !== void 0 ? _b : 0;
|
|
13745
13787
|
this.parent = { width: 0, height: 0 };
|
|
13746
13788
|
this.resizeState = 0;
|
|
13747
13789
|
}
|
|
@@ -13876,13 +13918,14 @@ class ResizeDirective {
|
|
|
13876
13918
|
this.unbindMove();
|
|
13877
13919
|
}
|
|
13878
13920
|
setInitials({ clientX, clientY }, target) {
|
|
13921
|
+
var _a, _b, _c, _d;
|
|
13879
13922
|
const computedStyle = getComputedStyle(this.$el);
|
|
13880
13923
|
this.$el.classList.add('active');
|
|
13881
13924
|
this.activeResizer = target;
|
|
13882
13925
|
if (this.disableCalcMap & DISABLE_MASK.w) {
|
|
13883
13926
|
this.mouseX = clientX;
|
|
13884
13927
|
this.width = this.$el.clientWidth;
|
|
13885
|
-
this.parent.width = this.$el.parentElement.clientWidth;
|
|
13928
|
+
this.parent.width = (_b = (_a = this.$el.parentElement) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0;
|
|
13886
13929
|
// min width
|
|
13887
13930
|
const minPaddingX = parseFloat(computedStyle.paddingLeft) +
|
|
13888
13931
|
parseFloat(computedStyle.paddingRight);
|
|
@@ -13895,7 +13938,7 @@ class ResizeDirective {
|
|
|
13895
13938
|
if (this.disableCalcMap & DISABLE_MASK.h) {
|
|
13896
13939
|
this.mouseY = clientY;
|
|
13897
13940
|
this.height = this.$el.clientHeight;
|
|
13898
|
-
this.parent.height = this.$el.parentElement.clientHeight;
|
|
13941
|
+
this.parent.height = (_d = (_c = this.$el.parentElement) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0;
|
|
13899
13942
|
// min height
|
|
13900
13943
|
const minPaddingY = parseFloat(computedStyle.paddingTop) +
|
|
13901
13944
|
parseFloat(computedStyle.paddingBottom);
|
|
@@ -13913,7 +13956,7 @@ class ResizeDirective {
|
|
|
13913
13956
|
this.activeResizer.removeAttribute('style');
|
|
13914
13957
|
}
|
|
13915
13958
|
this.$el.classList.remove('active');
|
|
13916
|
-
this.activeResizer =
|
|
13959
|
+
this.activeResizer = undefined;
|
|
13917
13960
|
}
|
|
13918
13961
|
bindMove() {
|
|
13919
13962
|
document.documentElement.addEventListener('mouseup', this.mouseUpFunc, true);
|
|
@@ -13962,7 +14005,7 @@ const ResizableElement = (props, children) => {
|
|
|
13962
14005
|
}
|
|
13963
14006
|
}
|
|
13964
14007
|
}
|
|
13965
|
-
return (hAsync("div", Object.assign({}, props, { ref: (e) => directive === null || directive === void 0 ? void 0 : directive.set(e) }),
|
|
14008
|
+
return (hAsync("div", Object.assign({}, props, { ref: (e) => e && (directive === null || directive === void 0 ? void 0 : directive.set(e)) }),
|
|
13966
14009
|
children,
|
|
13967
14010
|
resizeEls));
|
|
13968
14011
|
};
|
|
@@ -14091,7 +14134,7 @@ class ColumnPlugin extends BasePlugin {
|
|
|
14091
14134
|
}
|
|
14092
14135
|
onMouseUp(e) {
|
|
14093
14136
|
// apply new positions
|
|
14094
|
-
if (this.dragData) {
|
|
14137
|
+
if (this.dragData && this.staticDragData) {
|
|
14095
14138
|
let relativePos = getLeftRelative(e.x, this.dragData.gridRect.left, this.dragData.scrollOffset);
|
|
14096
14139
|
if (relativePos < 0) {
|
|
14097
14140
|
relativePos = 0;
|
|
@@ -14208,9 +14251,6 @@ class RevoGridComponent {
|
|
|
14208
14251
|
this.aftergridinit = createEvent(this, "aftergridinit", 7);
|
|
14209
14252
|
this.additionaldatachanged = createEvent(this, "additionaldatachanged", 7);
|
|
14210
14253
|
this.afterthemechanged = createEvent(this, "afterthemechanged", 7);
|
|
14211
|
-
// #endregion
|
|
14212
|
-
// #region Listeners outside scope
|
|
14213
|
-
this.clickTrackForFocusClear = null;
|
|
14214
14254
|
this.extraElements = [];
|
|
14215
14255
|
this.viewport = null;
|
|
14216
14256
|
this.isInited = false;
|
|
@@ -14382,6 +14422,7 @@ class RevoGridComponent {
|
|
|
14382
14422
|
* @param column - full column details to update
|
|
14383
14423
|
* @param index - virtual column index
|
|
14384
14424
|
* @param order - order to apply
|
|
14425
|
+
* @param additive - if false will replace current order
|
|
14385
14426
|
*/
|
|
14386
14427
|
async updateColumnSorting(column, index, order, additive) {
|
|
14387
14428
|
return this.columnProvider.updateColumnSorting(column, index, order, additive);
|
|
@@ -14420,8 +14461,8 @@ class RevoGridComponent {
|
|
|
14420
14461
|
* Get the currently focused cell.
|
|
14421
14462
|
*/
|
|
14422
14463
|
async getFocused() {
|
|
14423
|
-
var _a;
|
|
14424
|
-
return (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getFocused();
|
|
14464
|
+
var _a, _b;
|
|
14465
|
+
return (_b = (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getFocused()) !== null && _b !== void 0 ? _b : null;
|
|
14425
14466
|
}
|
|
14426
14467
|
/**
|
|
14427
14468
|
* Get size of content
|
|
@@ -14435,8 +14476,8 @@ class RevoGridComponent {
|
|
|
14435
14476
|
* Get the currently selected Range.
|
|
14436
14477
|
*/
|
|
14437
14478
|
async getSelectedRange() {
|
|
14438
|
-
var _a;
|
|
14439
|
-
return (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getSelectedRange();
|
|
14479
|
+
var _a, _b;
|
|
14480
|
+
return (_b = (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getSelectedRange()) !== null && _b !== void 0 ? _b : null;
|
|
14440
14481
|
}
|
|
14441
14482
|
mousedownHandle(event) {
|
|
14442
14483
|
const screenX = getPropertyFromEvent(event, 'screenX');
|
|
@@ -14449,7 +14490,8 @@ class RevoGridComponent {
|
|
|
14449
14490
|
/**
|
|
14450
14491
|
* To keep your elements from losing focus use mouseup/touchend e.preventDefault();
|
|
14451
14492
|
*/
|
|
14452
|
-
mouseupHandle(event) {
|
|
14493
|
+
async mouseupHandle(event) {
|
|
14494
|
+
var _a;
|
|
14453
14495
|
const screenX = getPropertyFromEvent(event, 'screenX');
|
|
14454
14496
|
const screenY = getPropertyFromEvent(event, 'screenY');
|
|
14455
14497
|
if (screenX === null || screenY === null) {
|
|
@@ -14460,16 +14502,16 @@ class RevoGridComponent {
|
|
|
14460
14502
|
}
|
|
14461
14503
|
const pos = screenX + screenY;
|
|
14462
14504
|
// detect if mousemove then do nothing
|
|
14463
|
-
if (Math.abs(this.clickTrackForFocusClear - pos) > 10) {
|
|
14505
|
+
if (Math.abs(((_a = this.clickTrackForFocusClear) !== null && _a !== void 0 ? _a : 0) - pos) > 10) {
|
|
14464
14506
|
return;
|
|
14465
14507
|
}
|
|
14466
|
-
// Check if action finished inside
|
|
14467
|
-
// if event prevented or it is current table don't clear focus
|
|
14508
|
+
// Check if action finished inside the document
|
|
14509
|
+
// if event prevented, or it is current table don't clear focus
|
|
14468
14510
|
const path = event.composedPath();
|
|
14469
14511
|
if (!path.includes(this.element) &&
|
|
14470
|
-
!path.includes(this.element.shadowRoot)) {
|
|
14512
|
+
!(this.element.shadowRoot && path.includes(this.element.shadowRoot))) {
|
|
14471
14513
|
// Perform actions if the click is outside the component
|
|
14472
|
-
this.clearFocus();
|
|
14514
|
+
await this.clearFocus();
|
|
14473
14515
|
}
|
|
14474
14516
|
}
|
|
14475
14517
|
// #endregion
|
|
@@ -14679,15 +14721,12 @@ class RevoGridComponent {
|
|
|
14679
14721
|
let grPlugin;
|
|
14680
14722
|
for (let p of this.internalPlugins) {
|
|
14681
14723
|
const isGrouping = p;
|
|
14682
|
-
if (isGrouping.setGrouping) {
|
|
14724
|
+
if (!!isGrouping.setGrouping) {
|
|
14683
14725
|
grPlugin = isGrouping;
|
|
14684
14726
|
break;
|
|
14685
14727
|
}
|
|
14686
14728
|
}
|
|
14687
|
-
|
|
14688
|
-
return;
|
|
14689
|
-
}
|
|
14690
|
-
grPlugin.setGrouping(newVal || {});
|
|
14729
|
+
grPlugin === null || grPlugin === void 0 ? void 0 : grPlugin.setGrouping(newVal || {});
|
|
14691
14730
|
}
|
|
14692
14731
|
/**
|
|
14693
14732
|
* Stretch Plugin Apply
|
|
@@ -14771,7 +14810,7 @@ class RevoGridComponent {
|
|
|
14771
14810
|
(_a = this.plugins) === null || _a === void 0 ? void 0 : _a.forEach(p => this.internalPlugins.push(new p(this.element, pluginData)));
|
|
14772
14811
|
}
|
|
14773
14812
|
removePlugins() {
|
|
14774
|
-
this.internalPlugins.forEach(p => p.destroy());
|
|
14813
|
+
this.internalPlugins.forEach(p => { var _a; return (_a = p.destroy) === null || _a === void 0 ? void 0 : _a.call(p); });
|
|
14775
14814
|
this.internalPlugins = [];
|
|
14776
14815
|
}
|
|
14777
14816
|
// #endregion
|
|
@@ -14871,7 +14910,7 @@ class RevoGridComponent {
|
|
|
14871
14910
|
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 });
|
|
14872
14911
|
// Column headers
|
|
14873
14912
|
const dataViews = [
|
|
14874
|
-
hAsync("revogr-header", Object.assign({ key: '
|
|
14913
|
+
hAsync("revogr-header", Object.assign({ key: 'b08c837765cf20c88cb5b253a876f0f442c31628' }, headerProperties, { slot: HEADER_SLOT })),
|
|
14875
14914
|
];
|
|
14876
14915
|
// Render viewport data (vertical sections)
|
|
14877
14916
|
view.dataPorts.forEach(data => {
|
|
@@ -14893,11 +14932,12 @@ class RevoGridComponent {
|
|
|
14893
14932
|
const typeCol = 'rgCol';
|
|
14894
14933
|
const viewports = this.viewportProvider.stores;
|
|
14895
14934
|
const dimensions = this.dimensionProvider.stores;
|
|
14896
|
-
return (hAsync(Host, { key: '
|
|
14935
|
+
return (hAsync(Host, { key: '057a2cf1a64aaeec12d2aca17b09316fb3cbfde6' }, this.hideAttribution ? null : (hAsync("revogr-attribution", { class: "attribution" })), hAsync("div", { key: 'e89e3d136d756f80421f42f47e09583985edb1bc', class: "main-viewport", onClick: (e) => {
|
|
14936
|
+
var _a;
|
|
14897
14937
|
if (e.currentTarget === e.target) {
|
|
14898
|
-
this.viewport.clearEdit();
|
|
14938
|
+
(_a = this.viewport) === null || _a === void 0 ? void 0 : _a.clearEdit();
|
|
14899
14939
|
}
|
|
14900
|
-
} }, hAsync("div", { key: '
|
|
14940
|
+
} }, 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));
|
|
14901
14941
|
}
|
|
14902
14942
|
disconnectedCallback() {
|
|
14903
14943
|
// Remove all plugins, to avoid memory leaks and unexpected behaviour when the component is removed
|
|
@@ -15109,10 +15149,13 @@ function renderCell(v) {
|
|
|
15109
15149
|
// Row drag
|
|
15110
15150
|
if (v.model.column.rowDrag &&
|
|
15111
15151
|
isRowDragService(v.model.column.rowDrag, v.model)) {
|
|
15112
|
-
els.push(hAsync("span", { class: DRAGGABLE_CLASS, onMouseDown: originalEvent =>
|
|
15113
|
-
|
|
15114
|
-
|
|
15115
|
-
|
|
15152
|
+
els.push(hAsync("span", { class: DRAGGABLE_CLASS, onMouseDown: originalEvent => {
|
|
15153
|
+
var _a;
|
|
15154
|
+
return (_a = v.dragStartCell) === null || _a === void 0 ? void 0 : _a.emit({
|
|
15155
|
+
originalEvent,
|
|
15156
|
+
model: v.model,
|
|
15157
|
+
});
|
|
15158
|
+
} },
|
|
15116
15159
|
hAsync("span", { class: DRAG_ICON_CLASS })));
|
|
15117
15160
|
}
|
|
15118
15161
|
els.push(`${getCellData(v.model.model[v.model.prop])}`);
|
|
@@ -15746,7 +15789,8 @@ const HeaderRenderer = (p) => {
|
|
|
15746
15789
|
},
|
|
15747
15790
|
onResize: p.onResize,
|
|
15748
15791
|
onDoubleClick(originalEvent) {
|
|
15749
|
-
|
|
15792
|
+
var _a;
|
|
15793
|
+
(_a = p.onDoubleClick) === null || _a === void 0 ? void 0 : _a.call(p, {
|
|
15750
15794
|
column: p.data,
|
|
15751
15795
|
index: p.column.itemIndex,
|
|
15752
15796
|
originalEvent,
|
|
@@ -15811,7 +15855,7 @@ const ColumnGroupsRenderer = ({ additionalData, providers, depth, groups, visibl
|
|
|
15811
15855
|
// coordinates
|
|
15812
15856
|
const groupStart = getItemByIndex(dimensionCol, groupStartIndex).start;
|
|
15813
15857
|
const groupEnd = getItemByIndex(dimensionCol, groupEndIndex).end;
|
|
15814
|
-
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 }));
|
|
15858
|
+
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 }));
|
|
15815
15859
|
}
|
|
15816
15860
|
}
|
|
15817
15861
|
}
|
|
@@ -15978,7 +16022,7 @@ class RevogrRowHeaders {
|
|
|
15978
16022
|
const viewportHeader = Object.assign(Object.assign({}, this.headerProp), { colData: typeof this.rowHeaderColumn === 'object' ? [this.rowHeaderColumn] : [], viewportCol: viewport.store, canResize: false, type: ROW_HEADER_TYPE,
|
|
15979
16023
|
// parent,
|
|
15980
16024
|
slot: HEADER_SLOT });
|
|
15981
|
-
return (hAsync(Host, { class: { [ROW_HEADER_TYPE]: true }, key: ROW_HEADER_TYPE }, hAsync("revogr-viewport-scroll", Object.assign({ key: '
|
|
16025
|
+
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)));
|
|
15982
16026
|
}
|
|
15983
16027
|
static get cmpMeta() { return {
|
|
15984
16028
|
"$flags$": 0,
|
|
@@ -16092,7 +16136,7 @@ class LocalScrollService {
|
|
|
16092
16136
|
if (c < 0) {
|
|
16093
16137
|
return NO_COORDINATE;
|
|
16094
16138
|
}
|
|
16095
|
-
if (c > param.maxSize) {
|
|
16139
|
+
if (typeof param.maxSize === 'number' && c > param.maxSize) {
|
|
16096
16140
|
return param.maxSize;
|
|
16097
16141
|
}
|
|
16098
16142
|
return c;
|
|
@@ -16105,8 +16149,9 @@ class LocalScrollService {
|
|
|
16105
16149
|
}
|
|
16106
16150
|
/* convert virtual to real and back, scale range */
|
|
16107
16151
|
convert(pos, param, toReal = true) {
|
|
16152
|
+
var _a;
|
|
16108
16153
|
const minRange = param.clientSize;
|
|
16109
|
-
const from = [0, param.virtualContentSize - minRange];
|
|
16154
|
+
const from = [0, ((_a = param.virtualContentSize) !== null && _a !== void 0 ? _a : minRange) - minRange];
|
|
16110
16155
|
const to = [0, param.contentSize - param.virtualSize];
|
|
16111
16156
|
if (toReal) {
|
|
16112
16157
|
return scaleValue(pos, from, to);
|
|
@@ -16148,7 +16193,7 @@ class AutohideScrollPlugin {
|
|
|
16148
16193
|
show(element, timeout) {
|
|
16149
16194
|
clearTimeout(timeout);
|
|
16150
16195
|
return Number(setTimeout(() => {
|
|
16151
|
-
element.removeAttribute('visible');
|
|
16196
|
+
element === null || element === void 0 ? void 0 : element.removeAttribute('visible');
|
|
16152
16197
|
}, 1000));
|
|
16153
16198
|
}
|
|
16154
16199
|
clear() {
|
|
@@ -16388,8 +16433,9 @@ class RevogrViewportScroll {
|
|
|
16388
16433
|
* @param e
|
|
16389
16434
|
*/
|
|
16390
16435
|
async changeScroll(e, silent = false) {
|
|
16436
|
+
var _a, _b;
|
|
16391
16437
|
if (silent) {
|
|
16392
|
-
if (e.coordinate) {
|
|
16438
|
+
if (e.coordinate && this.verticalScroll) {
|
|
16393
16439
|
switch (e.dimension) {
|
|
16394
16440
|
// for mobile devices to skip negative scroll loop. only on vertical scroll
|
|
16395
16441
|
case 'rgRow':
|
|
@@ -16397,7 +16443,7 @@ class RevogrViewportScroll {
|
|
|
16397
16443
|
break;
|
|
16398
16444
|
}
|
|
16399
16445
|
}
|
|
16400
|
-
return
|
|
16446
|
+
return;
|
|
16401
16447
|
}
|
|
16402
16448
|
if (e.delta) {
|
|
16403
16449
|
switch (e.dimension) {
|
|
@@ -16405,7 +16451,7 @@ class RevogrViewportScroll {
|
|
|
16405
16451
|
e.coordinate = this.horizontalScroll.scrollLeft + e.delta;
|
|
16406
16452
|
break;
|
|
16407
16453
|
case 'rgRow':
|
|
16408
|
-
e.coordinate = this.verticalScroll.scrollTop + e.delta;
|
|
16454
|
+
e.coordinate = ((_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.scrollTop) !== null && _b !== void 0 ? _b : 0) + e.delta;
|
|
16409
16455
|
break;
|
|
16410
16456
|
}
|
|
16411
16457
|
this.setScroll(e);
|
|
@@ -16453,11 +16499,13 @@ class RevogrViewportScroll {
|
|
|
16453
16499
|
this.horizontalScroll.scrollLeft = e.coordinate;
|
|
16454
16500
|
break;
|
|
16455
16501
|
case 'rgRow':
|
|
16456
|
-
|
|
16457
|
-
|
|
16458
|
-
|
|
16459
|
-
|
|
16460
|
-
this.verticalScroll.style.transform
|
|
16502
|
+
if (this.verticalScroll) {
|
|
16503
|
+
// this will trigger on scroll event
|
|
16504
|
+
this.verticalScroll.scrollTop = e.coordinate;
|
|
16505
|
+
// for mobile devices to skip negative scroll loop. only on vertical scroll
|
|
16506
|
+
if (this.verticalScroll.style.transform) {
|
|
16507
|
+
this.verticalScroll.style.transform = '';
|
|
16508
|
+
}
|
|
16461
16509
|
}
|
|
16462
16510
|
break;
|
|
16463
16511
|
}
|
|
@@ -16468,23 +16516,23 @@ class RevogrViewportScroll {
|
|
|
16468
16516
|
// track horizontal viewport resize
|
|
16469
16517
|
this.resizeService = new GridResizeService(this.horizontalScroll, {
|
|
16470
16518
|
resize: entries => {
|
|
16471
|
-
var _a, _b, _c;
|
|
16519
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
16472
16520
|
let height = ((_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect.height) || 0;
|
|
16473
16521
|
if (height) {
|
|
16474
|
-
height -= this.header.clientHeight + this.footer.clientHeight;
|
|
16522
|
+
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);
|
|
16475
16523
|
}
|
|
16476
16524
|
const els = {
|
|
16477
16525
|
rgRow: {
|
|
16478
16526
|
size: height,
|
|
16479
16527
|
contentSize: this.contentHeight,
|
|
16480
|
-
scroll: this.verticalScroll.scrollTop,
|
|
16528
|
+
scroll: (_f = this.verticalScroll) === null || _f === void 0 ? void 0 : _f.scrollTop,
|
|
16481
16529
|
noScroll: false,
|
|
16482
16530
|
},
|
|
16483
16531
|
rgCol: {
|
|
16484
|
-
size: ((
|
|
16532
|
+
size: ((_g = entries[0]) === null || _g === void 0 ? void 0 : _g.contentRect.width) || 0,
|
|
16485
16533
|
contentSize: this.contentWidth,
|
|
16486
16534
|
scroll: this.horizontalScroll.scrollLeft,
|
|
16487
|
-
noScroll: this.colType !== 'rgCol'
|
|
16535
|
+
noScroll: this.colType !== 'rgCol',
|
|
16488
16536
|
},
|
|
16489
16537
|
};
|
|
16490
16538
|
for (const [dim, item] of Object.entries(els)) {
|
|
@@ -16493,7 +16541,7 @@ class RevogrViewportScroll {
|
|
|
16493
16541
|
if (item.noScroll) {
|
|
16494
16542
|
continue;
|
|
16495
16543
|
}
|
|
16496
|
-
(
|
|
16544
|
+
(_h = this.localScrollService) === null || _h === void 0 ? void 0 : _h.scroll((_j = item.scroll) !== null && _j !== void 0 ? _j : 0, dimension, true);
|
|
16497
16545
|
// track scroll visibility on outer element change
|
|
16498
16546
|
this.setScrollVisibility(dimension, item.size, item.contentSize);
|
|
16499
16547
|
}
|
|
@@ -16523,10 +16571,10 @@ class RevogrViewportScroll {
|
|
|
16523
16571
|
}
|
|
16524
16572
|
// based on scroll visibility assign or remove class and event
|
|
16525
16573
|
if (hasScroll) {
|
|
16526
|
-
el.classList.add(`scroll-${type}`);
|
|
16574
|
+
el === null || el === void 0 ? void 0 : el.classList.add(`scroll-${type}`);
|
|
16527
16575
|
}
|
|
16528
16576
|
else {
|
|
16529
|
-
el.classList.remove(`scroll-${type}`);
|
|
16577
|
+
el === null || el === void 0 ? void 0 : el.classList.remove(`scroll-${type}`);
|
|
16530
16578
|
}
|
|
16531
16579
|
this.scrollchange.emit({ type, hasScroll });
|
|
16532
16580
|
}
|
|
@@ -16534,6 +16582,7 @@ class RevogrViewportScroll {
|
|
|
16534
16582
|
this.resizeService.destroy();
|
|
16535
16583
|
}
|
|
16536
16584
|
async componentDidRender() {
|
|
16585
|
+
var _a, _b, _c, _d;
|
|
16537
16586
|
// scroll update if number of rows changed
|
|
16538
16587
|
if (this.contentHeight < this.oldValY && this.verticalScroll) {
|
|
16539
16588
|
this.verticalScroll.scrollTop += this.contentHeight - this.oldValY;
|
|
@@ -16546,7 +16595,7 @@ class RevogrViewportScroll {
|
|
|
16546
16595
|
this.oldValX = this.contentWidth;
|
|
16547
16596
|
this.localScrollService.setParams({
|
|
16548
16597
|
contentSize: this.contentHeight,
|
|
16549
|
-
clientSize: this.verticalScroll.clientHeight,
|
|
16598
|
+
clientSize: (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0,
|
|
16550
16599
|
virtualSize: 0,
|
|
16551
16600
|
}, 'rgRow');
|
|
16552
16601
|
this.localScrollService.setParams({
|
|
@@ -16554,11 +16603,11 @@ class RevogrViewportScroll {
|
|
|
16554
16603
|
clientSize: this.horizontalScroll.clientWidth,
|
|
16555
16604
|
virtualSize: 0,
|
|
16556
16605
|
}, 'rgCol');
|
|
16557
|
-
this.setScrollVisibility('rgRow', this.verticalScroll.clientHeight, this.contentHeight);
|
|
16606
|
+
this.setScrollVisibility('rgRow', (_d = (_c = this.verticalScroll) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0, this.contentHeight);
|
|
16558
16607
|
this.setScrollVisibility('rgCol', this.horizontalScroll.clientWidth, this.contentWidth);
|
|
16559
16608
|
}
|
|
16560
16609
|
render() {
|
|
16561
|
-
return (hAsync(Host, { key: '
|
|
16610
|
+
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 })))));
|
|
16562
16611
|
}
|
|
16563
16612
|
/**
|
|
16564
16613
|
* Extra layer for scroll event monitoring, where MouseWheel event is not passing
|
|
@@ -16601,10 +16650,11 @@ class RevogrViewportScroll {
|
|
|
16601
16650
|
* @param e
|
|
16602
16651
|
*/
|
|
16603
16652
|
onVerticalMouseWheel(type, delta, e) {
|
|
16604
|
-
var _a, _b;
|
|
16653
|
+
var _a, _b, _c, _d;
|
|
16605
16654
|
(_a = e.preventDefault) === null || _a === void 0 ? void 0 : _a.call(e);
|
|
16606
|
-
const
|
|
16607
|
-
|
|
16655
|
+
const scrollTop = (_c = (_b = this.verticalScroll) === null || _b === void 0 ? void 0 : _b.scrollTop) !== null && _c !== void 0 ? _c : 0;
|
|
16656
|
+
const pos = scrollTop + e[delta];
|
|
16657
|
+
(_d = this.localScrollService) === null || _d === void 0 ? void 0 : _d.scroll(pos, type, undefined, e[delta]);
|
|
16608
16658
|
this.localScrollTimer.latestScrollUpdate(type);
|
|
16609
16659
|
}
|
|
16610
16660
|
/**
|
|
@@ -16661,9 +16711,9 @@ class VNodeToHtml {
|
|
|
16661
16711
|
});
|
|
16662
16712
|
}
|
|
16663
16713
|
render() {
|
|
16664
|
-
var _a;
|
|
16665
|
-
this.vnodes = (_a = this.redraw) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
16666
|
-
return (hAsync(Host, { key: '
|
|
16714
|
+
var _a, _b;
|
|
16715
|
+
this.vnodes = (_b = (_a = this.redraw) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : null;
|
|
16716
|
+
return (hAsync(Host, { key: 'dcaa7c6bd2f1eef1dd9a7f95a723f8ec778681a0', style: { visibility: 'hidden', position: 'absolute' } }, this.vnodes));
|
|
16667
16717
|
}
|
|
16668
16718
|
get el() { return getElement(this); }
|
|
16669
16719
|
static get cmpMeta() { return {
|