@revolist/revogrid 4.23.12 → 4.23.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cell-renderer-DfUCisis.js → cell-renderer-Dcz022q7.js} +5 -23
- package/dist/cjs/{column.drag.plugin-BRraLvz3.js → column.drag.plugin-BGLbi1zS.js} +8 -37
- package/dist/cjs/{column.service-BNWNiJW3.js → column.service-C1Qvcf5l.js} +23 -62
- package/dist/cjs/{header-cell-renderer-DyjOxArm.js → header-cell-renderer-vVr4IWNV.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -5
- package/dist/cjs/revo-grid.cjs.entry.js +5 -5
- package/dist/cjs/revogr-attribution_7.cjs.entry.js +4 -40
- package/dist/cjs/revogr-data_4.cjs.entry.js +5 -13
- package/dist/cjs/revogr-filter-panel.cjs.entry.js +67 -32
- package/dist/collection/components/data/column.service.js +23 -62
- package/dist/collection/components/data/row-renderer.js +2 -15
- package/dist/collection/components/overlay/revogr-overlay-selection.js +7 -27
- package/dist/collection/components/revoGrid/revo-grid.js +7 -14
- package/dist/collection/components/scroll/revogr-viewport-scroll.js +2 -10
- package/dist/collection/plugins/filter/filter.panel.js +66 -31
- package/dist/collection/plugins/filter/filter.plugin.js +4 -4
- package/dist/collection/plugins/filter/filter.style.css +18 -34
- package/dist/collection/plugins/groupingRow/grouping.row.renderer.js +2 -7
- package/dist/collection/plugins/moveColumn/column.drag.plugin.js +2 -30
- package/dist/collection/serve/controller.js +0 -1
- package/dist/esm/{cell-renderer-CLTRlCa5.js → cell-renderer-BtN-NGCk.js} +5 -23
- package/dist/esm/{column.drag.plugin-V9DDE3mU.js → column.drag.plugin-4Ixr4ijU.js} +9 -37
- package/dist/esm/{column.service-C6hByxPy.js → column.service-CC_SD8W3.js} +23 -62
- package/dist/esm/{header-cell-renderer-BMmXRsd_.js → header-cell-renderer-B-LX2sgu.js} +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/revo-grid.entry.js +5 -5
- package/dist/esm/revogr-attribution_7.entry.js +4 -40
- package/dist/esm/revogr-data_4.entry.js +5 -13
- package/dist/esm/revogr-filter-panel.entry.js +67 -32
- package/dist/revo-grid/{cell-renderer-CLTRlCa5.js → cell-renderer-BtN-NGCk.js} +5 -23
- package/dist/revo-grid/{column.drag.plugin-V9DDE3mU.js → column.drag.plugin-4Ixr4ijU.js} +9 -37
- package/dist/revo-grid/{column.service-C6hByxPy.js → column.service-CC_SD8W3.js} +23 -62
- package/dist/revo-grid/{header-cell-renderer-BMmXRsd_.js → header-cell-renderer-B-LX2sgu.js} +1 -1
- package/dist/revo-grid/index.esm.js +5 -5
- package/dist/revo-grid/revo-grid.entry.js +5 -5
- package/dist/revo-grid/revogr-attribution_7.entry.js +4 -40
- package/dist/revo-grid/revogr-data_4.entry.js +5 -13
- package/dist/revo-grid/revogr-filter-panel.entry.js +67 -32
- package/dist/types/components/data/column.service.d.ts +1 -10
- package/dist/types/components/data/row-renderer.d.ts +1 -1
- package/dist/types/components/overlay/revogr-overlay-selection.d.ts +3 -4
- package/dist/types/components/revoGrid/revo-grid.d.ts +4 -4
- package/dist/types/components.d.ts +14 -14
- package/dist/types/plugins/filter/filter.panel.d.ts +4 -0
- package/dist/types/plugins/filter/filter.plugin.d.ts +0 -1
- package/dist/types/plugins/filter/filter.types.d.ts +0 -1
- package/dist/types/plugins/moveColumn/column.drag.plugin.d.ts +0 -4
- package/dist/types/types/interfaces.d.ts +0 -8
- package/hydrate/index.js +107 -201
- package/hydrate/index.mjs +107 -201
- package/package.json +1 -1
- package/readme.md +1 -20
- package/standalone/column.service.js +1 -1
- package/standalone/index.js +1 -1
- package/standalone/revo-grid.js +1 -1
- package/standalone/revogr-data2.js +1 -1
- package/standalone/revogr-filter-panel.js +1 -1
- package/standalone/revogr-overlay-selection2.js +1 -1
- package/standalone/revogr-viewport-scroll2.js +1 -1
- package/dist/collection/components/overlay/clipboard.utils.js +0 -26
- package/dist/types/components/overlay/clipboard.utils.d.ts +0 -3
package/hydrate/index.js
CHANGED
|
@@ -7397,7 +7397,7 @@ function isFilterBtn(e) {
|
|
|
7397
7397
|
}
|
|
7398
7398
|
})();
|
|
7399
7399
|
|
|
7400
|
-
const filterStyleCss = () => `.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-filter-panel{
|
|
7400
|
+
const filterStyleCss = () => `.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-filter-panel{display:block}revogr-filter-panel .filter-panel-dialog{position:fixed;top:0;left:0;z-index:100;max-height:calc(100vh - 16px);overflow:auto;opacity:1;transform:none;background-color:var(--revo-grid-filter-panel-bg, #fff);border:1px solid var(--revo-grid-filter-panel-border, #cecece);transform-origin:62px 0px;box-shadow:0 5px 18px -2px var(--revo-grid-filter-panel-shadow, rgba(0, 0, 0, 0.15));padding:10px;border-radius:8px;margin:0;min-width:220px;text-align:left;animation:revogr-filter-panel-open 140ms cubic-bezier(0.2, 0, 0, 1)}revogr-filter-panel .filter-panel-dialog::backdrop{background:transparent}revogr-filter-panel .filter-panel-dialog .filter-holder>div{display:flex;flex-direction:column}revogr-filter-panel .filter-panel-dialog label{font-size:13px;display:block;padding:8px 0}revogr-filter-panel .filter-panel-dialog select{width:100%}revogr-filter-panel .filter-panel-dialog input[type=text]{border:0;min-height:34px;margin:5px 0;background:var(--revo-grid-filter-panel-input-bg, #f3f3f3);border-radius:5px;padding:0 10px;box-sizing:border-box;width:100%}revogr-filter-panel .filter-panel-dialog .filter-actions{text-align:right;margin-right:-5px}revogr-filter-panel .filter-panel-dialog .filter-actions button{margin-top:10px;margin-right:5px}@keyframes revogr-filter-panel-open{from{opacity:0;transform:translateY(-4px) scale(0.98)}to{opacity:1;transform:none}}@media (prefers-reduced-motion: reduce){revogr-filter-panel .filter-panel-dialog{animation:none}}.rgHeaderCell:hover .rv-filter{transition:opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}.rgHeaderCell:hover .rv-filter,.rgHeaderCell .rv-filter.active{opacity:1}.rgHeaderCell .rv-filter{height:24px;width:24px;background:none;border:0;opacity:0;visibility:visible;cursor:pointer;border-radius:4px}.rgHeaderCell .rv-filter.active{color:#10224a}.rgHeaderCell .rv-filter .filter-img{color:gray;width:11px}.select-css{display:block;font-family:sans-serif;line-height:1.3;padding:0.6em 1.4em 0.5em 0.8em;width:100%;max-width:100%;box-sizing:border-box;margin:0;border:1px solid var(--revo-grid-filter-panel-select-border, #d9d9d9);box-shadow:transparent;border-radius:0.5em;appearance:none;background-color:var(--revo-grid-filter-panel-input-bg, #f3f3f3);background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat, repeat;background-position:right 0.7em top 50%, 0 0;background-size:0.65em auto, 100%;}.select-css::-ms-expand{display:none}.select-css:hover{border-color:var(--revo-grid-filter-panel-select-border, #d9d9d9)}.select-css:focus{border-color:var(--revo-grid-filter-panel-select-border-hover, #d9d9d9);box-shadow:0 0 1px 3px rgba(59, 153, 252, 0.7);box-shadow:0 0 0 3px -moz-mac-focusring;outline:none}.select-css option{font-weight:normal}.select-css:disabled,.select-css[aria-disabled=true]{color:gray;background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%)}.select-css:disabled:hover,.select-css[aria-disabled=true]{border-color:var(--revo-grid-filter-panel-select-border, #d9d9d9)}.multi-filter-list{margin-top:5px;margin-bottom:5px}.multi-filter-list div{white-space:nowrap}.multi-filter-list .multi-filter-list-action{display:flex;justify-content:space-between;align-items:center}.multi-filter-list .and-or-button{margin:0 0 0 10px;min-width:58px;cursor:pointer}.multi-filter-list .trash-button{margin:0 0 -2px 6px;cursor:pointer;width:22px;height:100%;font-size:16px}.multi-filter-list .trash-button .trash-img{width:1em}.add-filter-divider{display:block;margin:0 -10px 10px -10px;border-bottom:1px solid var(--revo-grid-filter-panel-divider, #d9d9d9);height:10px}.select-input{display:flex;justify-content:space-between;align-items:center}`;
|
|
7401
7401
|
|
|
7402
7402
|
const defaultType = 'none';
|
|
7403
7403
|
const FILTER_LIST_CLASS = 'multi-filter-list';
|
|
@@ -7508,24 +7508,56 @@ class FilterPanel {
|
|
|
7508
7508
|
if (index !== this.filterItems[prop].length - 1) {
|
|
7509
7509
|
andOrButton = (hAsync("div", { onClick: () => this.toggleFilterAndOr(filter.id) }, hAsync(AndOrButton, { text: filter.relation === 'and' ? capts.and : capts.or })));
|
|
7510
7510
|
}
|
|
7511
|
-
|
|
7512
|
-
return (hAsync("div", { key: filter.id, class: FILTER_LIST_CLASS }, hAsync("div", { class: "multi-filter-list-row" }, hAsync("div", { class: { 'select-input': true } }, hAsync("select", { class: "select-css select-filter", onChange: e => this.onFilterTypeChange(e, prop, index) }, this.renderSelectOptions(this.filterItems[prop][index].type, true)), extra ? hAsync("div", { class: "filter-extra" }, extra) : ''), hAsync("div", { class: FILTER_LIST_CLASS_ACTION }, andOrButton, hAsync("div", { onClick: () => this.onRemoveFilter(filter.id) }, hAsync(TrashButton, null))))));
|
|
7511
|
+
return (hAsync("div", { key: filter.id, class: FILTER_LIST_CLASS }, hAsync("div", { class: { 'select-input': true } }, hAsync("select", { class: "select-css select-filter", onChange: e => this.onFilterTypeChange(e, prop, index) }, this.renderSelectOptions(this.filterItems[prop][index].type, true)), hAsync("div", { class: FILTER_LIST_CLASS_ACTION }, andOrButton), hAsync("div", { onClick: () => this.onRemoveFilter(filter.id) }, hAsync(TrashButton, null))), hAsync("div", null, this.renderExtra(prop, index))));
|
|
7513
7512
|
}), propFilters.filter(f => !f.hidden).length > 0 ? hAsync("div", { class: "add-filter-divider" }) : ''));
|
|
7514
7513
|
}
|
|
7514
|
+
componentDidRender() {
|
|
7515
|
+
this.syncDialog();
|
|
7516
|
+
}
|
|
7517
|
+
syncDialog() {
|
|
7518
|
+
if (!this.dialog) {
|
|
7519
|
+
return;
|
|
7520
|
+
}
|
|
7521
|
+
if (!this.changes) {
|
|
7522
|
+
if (this.dialog.open) {
|
|
7523
|
+
this.dialog.close();
|
|
7524
|
+
}
|
|
7525
|
+
return;
|
|
7526
|
+
}
|
|
7527
|
+
if (!this.dialog.open) {
|
|
7528
|
+
this.dialog.show();
|
|
7529
|
+
}
|
|
7530
|
+
if (this.changes.autoCorrect !== false) {
|
|
7531
|
+
requestAnimationFrame(() => this.autoCorrect(this.dialog));
|
|
7532
|
+
}
|
|
7533
|
+
}
|
|
7515
7534
|
autoCorrect(el) {
|
|
7516
|
-
var _a, _b;
|
|
7517
7535
|
if (!el) {
|
|
7518
7536
|
return;
|
|
7519
7537
|
}
|
|
7520
|
-
const
|
|
7521
|
-
|
|
7538
|
+
const pos = el.getBoundingClientRect();
|
|
7539
|
+
const maxLeft = Math.max(0, window.innerWidth - pos.width);
|
|
7540
|
+
const maxTop = Math.max(0, window.innerHeight - pos.height);
|
|
7541
|
+
if (pos.left > maxLeft) {
|
|
7542
|
+
el.style.left = `${maxLeft}px`;
|
|
7543
|
+
}
|
|
7544
|
+
if (pos.top > maxTop) {
|
|
7545
|
+
el.style.top = `${maxTop}px`;
|
|
7546
|
+
}
|
|
7547
|
+
}
|
|
7548
|
+
onDialogMouseDown(e) {
|
|
7549
|
+
if (!this.closeOnOutsideClick ||
|
|
7550
|
+
e.target !== this.dialog ||
|
|
7551
|
+
!this.dialog) {
|
|
7522
7552
|
return;
|
|
7523
7553
|
}
|
|
7524
|
-
const
|
|
7525
|
-
const
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7554
|
+
const rect = this.dialog.getBoundingClientRect();
|
|
7555
|
+
const isInside = e.clientX >= rect.left &&
|
|
7556
|
+
e.clientX <= rect.right &&
|
|
7557
|
+
e.clientY >= rect.top &&
|
|
7558
|
+
e.clientY <= rect.bottom;
|
|
7559
|
+
if (!isInside) {
|
|
7560
|
+
this.onCancel();
|
|
7529
7561
|
}
|
|
7530
7562
|
}
|
|
7531
7563
|
onFilterTypeChange(e, prop, index) {
|
|
@@ -7726,30 +7758,33 @@ class FilterPanel {
|
|
|
7726
7758
|
} }));
|
|
7727
7759
|
}
|
|
7728
7760
|
render() {
|
|
7729
|
-
var _a, _b, _c, _d, _e;
|
|
7730
|
-
if (!this.changes) {
|
|
7731
|
-
return hAsync(Host, { style: { display: 'none' } });
|
|
7732
|
-
}
|
|
7761
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
7733
7762
|
const style = {
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
top: `${this.changes.y}px`,
|
|
7763
|
+
left: `${(_b = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : 0}px`,
|
|
7764
|
+
top: `${(_d = (_c = this.changes) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : 0}px`,
|
|
7737
7765
|
};
|
|
7738
7766
|
const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
|
|
7739
|
-
return (hAsync(Host, { style: style, ref: el => {
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
}
|
|
7743
|
-
hAsync("
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
hAsync("
|
|
7751
|
-
hAsync("
|
|
7752
|
-
|
|
7767
|
+
return (hAsync(Host, { key: '9fb424017d080876ff7796237917b4f41f617fe0' }, hAsync("dialog", { key: '37b9f870b95f6fe1bd7be359dd7b77ef196e896e', class: "filter-panel-dialog", style: style, ref: el => (this.dialog = el), onCancel: e => {
|
|
7768
|
+
e.preventDefault();
|
|
7769
|
+
this.onCancel();
|
|
7770
|
+
}, onMouseDown: e => this.onDialogMouseDown(e) }, this.changes && [
|
|
7771
|
+
hAsync("slot", { key: '76ec505a92d0a7c1ae0bbb5f4cac63555f3416be', slot: "header" }),
|
|
7772
|
+
((_f = (_e = this.changes).extraContent) === null || _f === void 0 ? void 0 : _f.call(_e, this.changes)) || '',
|
|
7773
|
+
((_g = this.changes) === null || _g === void 0 ? void 0 : _g.hideDefaultFilters) !== true && [
|
|
7774
|
+
hAsync("label", { key: 'c6fd82c95f6005f286c7bc90de34956128a83246' }, capts.title),
|
|
7775
|
+
hAsync("div", { key: '5e7dac36ad79ba1b6072a0053b30aa384ade0dde', class: "filter-holder" }, this.getFilterItemsList()),
|
|
7776
|
+
hAsync("div", { key: 'd9b6103edbd138d4db845745686ee4c847310a66', class: "add-filter" }, hAsync("select", { key: 'c1b321f2d19458f95ab3f9188d83d94bebdb688e', id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))),
|
|
7777
|
+
],
|
|
7778
|
+
hAsync("slot", { key: '1571dcbc5c57651deb42a4046272ff60fa74f5a7' }),
|
|
7779
|
+
hAsync("div", { key: '4aa7dee532336b084542df0209291b4c60378b49', class: "filter-actions" }, this.disableDynamicFiltering && [
|
|
7780
|
+
hAsync("button", { key: '4c1b3054cd1bb7f46877592f00f6634d0f7ecafa', id: "revo-button-save", "aria-label": "save", class: "revo-button green", onClick: () => this.onSave() }, capts.save),
|
|
7781
|
+
hAsync("button", { key: 'f31a568c89be18b1a854cdd7d4726e01db24e338', id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.cancel),
|
|
7782
|
+
], !this.disableDynamicFiltering && [
|
|
7783
|
+
hAsync("button", { key: '5d40e8b1f13f94cff4f5a2e2aefeee8861104a9d', id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.ok),
|
|
7784
|
+
hAsync("button", { key: '67eac3abd16f6f6e2ed7089dcfb0d05524ddb7df', id: "revo-button-reset", "aria-label": "reset", class: "revo-button outline", onClick: () => this.onReset() }, capts.reset),
|
|
7785
|
+
]),
|
|
7786
|
+
hAsync("slot", { key: 'b27a9bb3ef814e1e09dca14eda3e332ff34c654c', slot: "footer" }),
|
|
7787
|
+
])));
|
|
7753
7788
|
}
|
|
7754
7789
|
get element() { return getElement(this); }
|
|
7755
7790
|
static get style() { return filterStyleCss(); }
|
|
@@ -13049,82 +13084,43 @@ class ColumnService {
|
|
|
13049
13084
|
mapping,
|
|
13050
13085
|
};
|
|
13051
13086
|
}
|
|
13052
|
-
getTransformedDataToApply(
|
|
13087
|
+
getTransformedDataToApply(start, data) {
|
|
13053
13088
|
const changed = {};
|
|
13054
13089
|
const copyRowLength = data.length;
|
|
13055
|
-
if (!copyRowLength) {
|
|
13056
|
-
return {
|
|
13057
|
-
changed,
|
|
13058
|
-
range: null,
|
|
13059
|
-
};
|
|
13060
|
-
}
|
|
13061
13090
|
const colLength = this.columns.length;
|
|
13062
13091
|
const rowLength = this.dataStore.get('items').length;
|
|
13063
|
-
const bounds = this.getDataApplyBounds(start, targetRange, copyRowLength, rowLength, colLength);
|
|
13064
|
-
if (!bounds) {
|
|
13065
|
-
return {
|
|
13066
|
-
changed,
|
|
13067
|
-
range: null,
|
|
13068
|
-
};
|
|
13069
|
-
}
|
|
13070
|
-
const { startRow, startCol, endRow } = bounds;
|
|
13071
|
-
let maxCol = startCol - 1;
|
|
13072
|
-
let lastRow = startRow - 1;
|
|
13073
13092
|
// rows
|
|
13074
|
-
|
|
13093
|
+
let rowIndex = start.y;
|
|
13094
|
+
let maxCol = 0;
|
|
13095
|
+
for (let i = 0; rowIndex < rowLength && i < copyRowLength; rowIndex++, i++) {
|
|
13075
13096
|
// copy original data link
|
|
13076
13097
|
const copyRow = data[i % copyRowLength];
|
|
13077
13098
|
const copyColLength = (copyRow === null || copyRow === void 0 ? void 0 : copyRow.length) || 0;
|
|
13078
|
-
|
|
13079
|
-
|
|
13099
|
+
// columns
|
|
13100
|
+
let colIndex = start.x;
|
|
13101
|
+
for (let j = 0; colIndex < colLength && j < copyColLength; colIndex++, j++) {
|
|
13102
|
+
const p = this.columns[colIndex].prop;
|
|
13103
|
+
const currentCol = j % colLength;
|
|
13104
|
+
/** if can write */
|
|
13105
|
+
if (!this.isReadOnly(rowIndex, colIndex)) {
|
|
13106
|
+
/** to show before save */
|
|
13107
|
+
if (!changed[rowIndex]) {
|
|
13108
|
+
changed[rowIndex] = {};
|
|
13109
|
+
}
|
|
13110
|
+
changed[rowIndex][p] = copyRow[currentCol];
|
|
13111
|
+
}
|
|
13080
13112
|
}
|
|
13081
|
-
maxCol = Math.max(maxCol,
|
|
13082
|
-
bounds,
|
|
13083
|
-
copyColLength,
|
|
13084
|
-
copyRow,
|
|
13085
|
-
rowIndex,
|
|
13086
|
-
start,
|
|
13087
|
-
targetRange,
|
|
13088
|
-
}));
|
|
13089
|
-
lastRow = rowIndex;
|
|
13113
|
+
maxCol = Math.max(maxCol, colIndex - 1);
|
|
13090
13114
|
}
|
|
13115
|
+
const range = getRange(start, {
|
|
13116
|
+
y: rowIndex - 1,
|
|
13117
|
+
x: maxCol,
|
|
13118
|
+
});
|
|
13091
13119
|
return {
|
|
13092
13120
|
changed,
|
|
13093
|
-
range
|
|
13121
|
+
range,
|
|
13094
13122
|
};
|
|
13095
13123
|
}
|
|
13096
|
-
getDataApplyBounds(start, targetRange, copyRowLength, rowLength, colLength) {
|
|
13097
|
-
var _a, _b, _c;
|
|
13098
|
-
const startRow = (_a = targetRange === null || targetRange === void 0 ? void 0 : targetRange.y) !== null && _a !== void 0 ? _a : start.y;
|
|
13099
|
-
const startCol = (_b = targetRange === null || targetRange === void 0 ? void 0 : targetRange.x) !== null && _b !== void 0 ? _b : start.x;
|
|
13100
|
-
const endRow = Math.min(rowLength - 1, (_c = targetRange === null || targetRange === void 0 ? void 0 : targetRange.y1) !== null && _c !== void 0 ? _c : start.y + copyRowLength - 1);
|
|
13101
|
-
if (endRow < startRow || startCol >= colLength) {
|
|
13102
|
-
return null;
|
|
13103
|
-
}
|
|
13104
|
-
return { startRow, startCol, endRow, colLength };
|
|
13105
|
-
}
|
|
13106
|
-
applyClipboardRow(changed, { bounds, copyColLength, copyRow, rowIndex, start, targetRange, }) {
|
|
13107
|
-
var _a;
|
|
13108
|
-
const endCol = Math.min(bounds.colLength - 1, (_a = targetRange === null || targetRange === void 0 ? void 0 : targetRange.x1) !== null && _a !== void 0 ? _a : start.x + copyColLength - 1);
|
|
13109
|
-
for (let colIndex = bounds.startCol, j = 0; colIndex <= endCol; colIndex++, j++) {
|
|
13110
|
-
if (this.isReadOnly(rowIndex, colIndex)) {
|
|
13111
|
-
continue;
|
|
13112
|
-
}
|
|
13113
|
-
const prop = this.columns[colIndex].prop;
|
|
13114
|
-
changed[rowIndex] = changed[rowIndex] || {};
|
|
13115
|
-
changed[rowIndex][prop] = copyRow[j % copyColLength];
|
|
13116
|
-
}
|
|
13117
|
-
return endCol;
|
|
13118
|
-
}
|
|
13119
|
-
getAppliedRange({ startRow, startCol }, lastRow, maxCol) {
|
|
13120
|
-
if (lastRow < startRow || maxCol < startCol) {
|
|
13121
|
-
return null;
|
|
13122
|
-
}
|
|
13123
|
-
return getRange({ x: startCol, y: startRow }, {
|
|
13124
|
-
y: lastRow,
|
|
13125
|
-
x: maxCol,
|
|
13126
|
-
});
|
|
13127
|
-
}
|
|
13128
13124
|
getRangeStaticData(d, value) {
|
|
13129
13125
|
const changed = {};
|
|
13130
13126
|
// rows
|
|
@@ -13791,30 +13787,6 @@ class AutoFillService {
|
|
|
13791
13787
|
}
|
|
13792
13788
|
}
|
|
13793
13789
|
|
|
13794
|
-
function getRangeFillClipboardData(data, useClipboard) {
|
|
13795
|
-
var _a;
|
|
13796
|
-
if (!isClipboardRangeFillEnabled(useClipboard)) {
|
|
13797
|
-
return null;
|
|
13798
|
-
}
|
|
13799
|
-
const normalized = trimTrailingEmptyClipboardRows(data);
|
|
13800
|
-
return normalized.length === 1 && ((_a = normalized[0]) === null || _a === void 0 ? void 0 : _a.length) === 1
|
|
13801
|
-
? normalized
|
|
13802
|
-
: null;
|
|
13803
|
-
}
|
|
13804
|
-
function isClipboardRangeFillEnabled(useClipboard) {
|
|
13805
|
-
return (typeof useClipboard === 'object' && useClipboard.rangeFill === true);
|
|
13806
|
-
}
|
|
13807
|
-
function trimTrailingEmptyClipboardRows(data) {
|
|
13808
|
-
const rows = [...data];
|
|
13809
|
-
while (rows.length > 1 && isEmptyClipboardRow(rows[rows.length - 1])) {
|
|
13810
|
-
rows.pop();
|
|
13811
|
-
}
|
|
13812
|
-
return rows;
|
|
13813
|
-
}
|
|
13814
|
-
function isEmptyClipboardRow(row) {
|
|
13815
|
-
return !row || row.every(cell => cell === '');
|
|
13816
|
-
}
|
|
13817
|
-
|
|
13818
13790
|
const revogrOverlayStyleCss = () => `revogr-overlay-selection{display:block;position:relative;width:100%}revogr-overlay-selection .autofill-handle{position:absolute;width:14px;height:14px;margin-left:-13px;margin-top:-13px;z-index:10;cursor:crosshair}revogr-overlay-selection .autofill-handle::before{content:"";position:absolute;right:0;bottom:0;width:10px;height:10px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection.mobile .autofill-handle{position:absolute;width:30px;height:30px;margin-left:-29px;margin-top:-29px;z-index:10;cursor:crosshair}revogr-overlay-selection.mobile .autofill-handle::before{content:"";position:absolute;right:0;bottom:0;width:12px;height:12px;background:#0d63e8;border:1px solid white;box-sizing:border-box}revogr-overlay-selection .selection-border-range{position:absolute;pointer-events:none;z-index:9;box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset}revogr-overlay-selection .selection-border-range .range-handlers{height:100%;background-color:transparent;width:75%;max-width:50px;min-width:20px;left:50%;transform:translateX(-50%);position:absolute}revogr-overlay-selection .selection-border-range .range-handlers>span{pointer-events:auto;height:20px;width:20px;position:absolute;left:50%;transform:translateX(-50%)}revogr-overlay-selection .selection-border-range .range-handlers>span:before,revogr-overlay-selection .selection-border-range .range-handlers>span:after{position:absolute;border-radius:5px;width:15px;height:5px;left:50%;transform:translateX(-50%);background-color:rgba(0, 0, 0, 0.2)}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child{top:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:first-child:before{content:"";top:0}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child{bottom:-7px}revogr-overlay-selection .selection-border-range .range-handlers>span:last-child:after{content:"";bottom:0}revogr-overlay-selection revogr-edit{z-index:10}`;
|
|
13819
13791
|
|
|
13820
13792
|
/**
|
|
@@ -14065,9 +14037,9 @@ class OverlaySelection {
|
|
|
14065
14037
|
nodes.push(hAsync("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, rowType: this.types.rowType, onRowdragstartinit: e => this.rowDragStart(e) }));
|
|
14066
14038
|
}
|
|
14067
14039
|
}
|
|
14068
|
-
return (hAsync(Host, { key: '
|
|
14040
|
+
return (hAsync(Host, { key: 'd936e8452e84c7a25ecd6502e929f1a5af69467f', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true), onCloseedit: (e) => this.closeEdit(e),
|
|
14069
14041
|
// it's done to be able to throw events from different levels, not just from editor
|
|
14070
|
-
onCelledit: (e) => this.onEditCell(e) }, nodes, hAsync("slot", { key: '
|
|
14042
|
+
onCelledit: (e) => this.onEditCell(e) }, nodes, hAsync("slot", { key: 'cd3525d404aa44fd8d06e7fc459777acb8a9d585', name: "data" })));
|
|
14071
14043
|
}
|
|
14072
14044
|
/**
|
|
14073
14045
|
* Executes the focus operation on the specified range of cells.
|
|
@@ -14232,25 +14204,13 @@ class OverlaySelection {
|
|
|
14232
14204
|
if (!focus || isEditing) {
|
|
14233
14205
|
return;
|
|
14234
14206
|
}
|
|
14235
|
-
|
|
14236
|
-
const targetRange = rangeFillData
|
|
14237
|
-
? this.getClipboardPasteTargetRange()
|
|
14238
|
-
: null;
|
|
14239
|
-
let { changed, range } = this.columnService.getTransformedDataToApply({
|
|
14240
|
-
start: focus,
|
|
14241
|
-
data: rangeFillData || data,
|
|
14242
|
-
targetRange,
|
|
14243
|
-
});
|
|
14207
|
+
let { changed, range } = this.columnService.getTransformedDataToApply(focus, data);
|
|
14244
14208
|
const { defaultPrevented: canPaste } = this.rangeClipboardPaste.emit(Object.assign({ data: changed, models: collectModelsOfRange(changed, this.dataStore), range }, this.types));
|
|
14245
14209
|
if (canPaste) {
|
|
14246
14210
|
return;
|
|
14247
14211
|
}
|
|
14248
14212
|
(_a = this.autoFillService) === null || _a === void 0 ? void 0 : _a.onRangeApply(changed, range, range);
|
|
14249
14213
|
}
|
|
14250
|
-
getClipboardPasteTargetRange() {
|
|
14251
|
-
const range = this.selectionStore.get('range');
|
|
14252
|
-
return range && !isRangeSingleCell(range) ? range : null;
|
|
14253
|
-
}
|
|
14254
14214
|
async focusNext() {
|
|
14255
14215
|
var _a;
|
|
14256
14216
|
const canFocus = await ((_a = this.keyboardService) === null || _a === void 0 ? void 0 : _a.keyChangeSelection(new KeyboardEvent('keydown', {
|
|
@@ -15782,7 +15742,8 @@ class FilterPlugin extends BasePlugin {
|
|
|
15782
15742
|
async headerclick(e) {
|
|
15783
15743
|
var _a, _b;
|
|
15784
15744
|
const el = (_a = e.detail.originalEvent) === null || _a === void 0 ? void 0 : _a.target;
|
|
15785
|
-
|
|
15745
|
+
const filterButton = isFilterBtn(el);
|
|
15746
|
+
if (!filterButton) {
|
|
15786
15747
|
return;
|
|
15787
15748
|
}
|
|
15788
15749
|
e.preventDefault();
|
|
@@ -15796,9 +15757,8 @@ class FilterPlugin extends BasePlugin {
|
|
|
15796
15757
|
return;
|
|
15797
15758
|
}
|
|
15798
15759
|
// filter button clicked, open filter dialog
|
|
15799
|
-
const
|
|
15800
|
-
const
|
|
15801
|
-
const data = Object.assign(Object.assign(Object.assign({}, e.detail), this.filterCollection[prop]), { x: buttonPos.x - gridPos.x, y: buttonPos.y - gridPos.y + buttonPos.height, autoCorrect: true, filterTypes: this.getColumnFilter(e.detail.filter), filterItems: this.multiFilterItems, extraContent: this.extraHyperContent, extraBottomContent: this.extraBottomHyperContent });
|
|
15760
|
+
const buttonPos = (filterButton instanceof HTMLElement ? filterButton : el).getBoundingClientRect();
|
|
15761
|
+
const data = Object.assign(Object.assign(Object.assign({}, e.detail), this.filterCollection[prop]), { x: buttonPos.x, y: buttonPos.y + buttonPos.height, autoCorrect: true, filterTypes: this.getColumnFilter(e.detail.filter), filterItems: this.multiFilterItems, extraContent: this.extraHyperContent });
|
|
15802
15762
|
(_b = this.beforeshow) === null || _b === void 0 ? void 0 : _b.call(this, data);
|
|
15803
15763
|
this.pop.show(data);
|
|
15804
15764
|
}
|
|
@@ -17056,22 +17016,9 @@ function filterOutEmptyGroupRows(source, filterTrimmed) {
|
|
|
17056
17016
|
return trimmed;
|
|
17057
17017
|
}
|
|
17058
17018
|
|
|
17059
|
-
var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
|
|
17060
|
-
var t = {};
|
|
17061
|
-
for (var p in s)
|
|
17062
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
17063
|
-
t[p] = s[p];
|
|
17064
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17065
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17066
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17067
|
-
t[p[i]] = s[p[i]];
|
|
17068
|
-
}
|
|
17069
|
-
return t;
|
|
17070
|
-
};
|
|
17071
17019
|
const PADDING_DEPTH = 10;
|
|
17072
|
-
const RowRenderer = (
|
|
17073
|
-
|
|
17074
|
-
const props = Object.assign(Object.assign(Object.assign({}, attrs), { [DATA_ROW]: index }), (typeof groupingLevel === 'number'
|
|
17020
|
+
const RowRenderer = ({ rowClass, index, size, start, depth, groupingLevel }, cells) => {
|
|
17021
|
+
const props = Object.assign({ [DATA_ROW]: index }, (typeof groupingLevel === 'number'
|
|
17075
17022
|
? { 'data-level': groupingLevel }
|
|
17076
17023
|
: {}));
|
|
17077
17024
|
return (hAsync("div", Object.assign({}, props, { class: `rgRow ${rowClass || ''}`, style: {
|
|
@@ -17098,17 +17045,12 @@ const GroupingRowRenderer = (props) => {
|
|
|
17098
17045
|
const name = model[PSEUDO_GROUP_ITEM];
|
|
17099
17046
|
const expanded = model[GROUP_EXPANDED];
|
|
17100
17047
|
const depth = parseInt(model[GROUP_DEPTH], 10) || 0;
|
|
17101
|
-
const groupRowAttrs = {
|
|
17102
|
-
rowClass: 'groupingRow',
|
|
17103
|
-
depth,
|
|
17104
|
-
expanded,
|
|
17105
|
-
};
|
|
17106
17048
|
if (groupingCustomRenderer) {
|
|
17107
|
-
return (hAsync(RowRenderer, Object.assign({}, props,
|
|
17049
|
+
return (hAsync(RowRenderer, Object.assign({}, props, { rowClass: "groupingRow", depth: depth }), hAsync("div", { onClick: e => expandEvent(e, model, itemIndex) }, groupingCustomRenderer(hAsync, Object.assign(Object.assign({}, props), { colType: props.providers.colType, name,
|
|
17108
17050
|
expanded,
|
|
17109
17051
|
depth })))));
|
|
17110
17052
|
}
|
|
17111
|
-
return (hAsync(RowRenderer, Object.assign({}, props,
|
|
17053
|
+
return (hAsync(RowRenderer, Object.assign({}, props, { rowClass: "groupingRow", depth: depth }), hasExpand && [
|
|
17112
17054
|
hAsync("button", { class: { [GROUP_EXPAND_BTN]: true }, onClick: e => expandEvent(e, model, itemIndex) }, expandSvgIconVNode(expanded)),
|
|
17113
17055
|
name,
|
|
17114
17056
|
]));
|
|
@@ -18581,17 +18523,8 @@ class ColumnMovePlugin extends BasePlugin {
|
|
|
18581
18523
|
constructor(revogrid, providers) {
|
|
18582
18524
|
super(revogrid, providers);
|
|
18583
18525
|
this.moveFunc = debounce$1((e) => this.doMove(e), 5);
|
|
18584
|
-
this.preventHeaderClickAfterDrag = (event) => {
|
|
18585
|
-
if (!this.preventNextHeaderClick) {
|
|
18586
|
-
return;
|
|
18587
|
-
}
|
|
18588
|
-
this.preventNextHeaderClick = false;
|
|
18589
|
-
event.preventDefault();
|
|
18590
|
-
};
|
|
18591
18526
|
this.staticDragData = null;
|
|
18592
18527
|
this.dragData = null;
|
|
18593
|
-
this.columnDragMoved = false;
|
|
18594
|
-
this.preventNextHeaderClick = false;
|
|
18595
18528
|
this.localSubscriptions = {};
|
|
18596
18529
|
this.orderUi = new ColumnOrderHandler();
|
|
18597
18530
|
revogrid.appendChild(this.orderUi.render());
|
|
@@ -18610,13 +18543,11 @@ class ColumnMovePlugin extends BasePlugin {
|
|
|
18610
18543
|
callback: (e) => this.move(e),
|
|
18611
18544
|
};
|
|
18612
18545
|
this.addEventListener(COLUMN_CLICK, ({ detail }) => this.dragStart(detail));
|
|
18613
|
-
this.revogrid.addEventListener('beforeheaderclick', this.preventHeaderClickAfterDrag, { capture: true });
|
|
18614
18546
|
}
|
|
18615
18547
|
dragStart({ event, data }) {
|
|
18616
18548
|
if (event.defaultPrevented) {
|
|
18617
18549
|
return;
|
|
18618
18550
|
}
|
|
18619
|
-
this.preventNextHeaderClick = false;
|
|
18620
18551
|
const { defaultPrevented } = dispatch(this.revogrid, COLUMN_DRAG_START_EVENT, data);
|
|
18621
18552
|
// check if allowed to drag particulat column
|
|
18622
18553
|
if (defaultPrevented) {
|
|
@@ -18638,8 +18569,7 @@ class ColumnMovePlugin extends BasePlugin {
|
|
|
18638
18569
|
const cols = this.getDimension(data.pin || 'rgCol');
|
|
18639
18570
|
const gridRect = this.revogrid.getBoundingClientRect();
|
|
18640
18571
|
const elRect = dataEl.getBoundingClientRect();
|
|
18641
|
-
const startItem = getItemByPosition(cols, getLeftRelative(event.x, gridRect.left, elRect.left - gridRect.left) +
|
|
18642
|
-
(cols.renderOffset || 0));
|
|
18572
|
+
const startItem = getItemByPosition(cols, getLeftRelative(event.x, gridRect.left, elRect.left - gridRect.left) + (cols.renderOffset || 0));
|
|
18643
18573
|
this.staticDragData = {
|
|
18644
18574
|
startPos: event.x,
|
|
18645
18575
|
startItem,
|
|
@@ -18670,14 +18600,10 @@ class ColumnMovePlugin extends BasePlugin {
|
|
|
18670
18600
|
if (rgCol.itemIndex >= this.staticDragData.cols.count) {
|
|
18671
18601
|
return;
|
|
18672
18602
|
}
|
|
18673
|
-
this.orderUi.showHandler(
|
|
18603
|
+
this.orderUi.showHandler(rgCol.end - (this.staticDragData.cols.renderOffset || 0) + dragData.scrollOffset, dragData.gridRect.width);
|
|
18674
18604
|
}
|
|
18675
18605
|
}
|
|
18676
18606
|
move(e) {
|
|
18677
|
-
if (this.staticDragData &&
|
|
18678
|
-
Math.abs(this.staticDragData.startPos - e.x) > 10) {
|
|
18679
|
-
this.columnDragMoved = true;
|
|
18680
|
-
}
|
|
18681
18607
|
dispatch(this.revogrid, COLUMN_DRAG_MOVE_EVENT, e);
|
|
18682
18608
|
// then do move
|
|
18683
18609
|
this.moveFunc(e);
|
|
@@ -18686,7 +18612,6 @@ class ColumnMovePlugin extends BasePlugin {
|
|
|
18686
18612
|
this.clearOrder();
|
|
18687
18613
|
}
|
|
18688
18614
|
onMouseUp(e) {
|
|
18689
|
-
const suppressClick = this.columnDragMoved;
|
|
18690
18615
|
// apply new positions
|
|
18691
18616
|
if (this.dragData && this.staticDragData) {
|
|
18692
18617
|
let relativePos = getLeftRelative(e.x, this.dragData.gridRect.left, this.dragData.scrollOffset);
|
|
@@ -18709,9 +18634,6 @@ class ColumnMovePlugin extends BasePlugin {
|
|
|
18709
18634
|
}
|
|
18710
18635
|
dispatch(this.revogrid, COLUMN_DRAG_END_EVENT, this.getData(this.staticDragData, newItems, source));
|
|
18711
18636
|
}
|
|
18712
|
-
if (suppressClick) {
|
|
18713
|
-
this.preventNextHeaderClick = !!e.target.closest('revogr-header');
|
|
18714
|
-
}
|
|
18715
18637
|
this.clearOrder();
|
|
18716
18638
|
}
|
|
18717
18639
|
clearLocalSubscriptions() {
|
|
@@ -18720,7 +18642,6 @@ class ColumnMovePlugin extends BasePlugin {
|
|
|
18720
18642
|
clearOrder() {
|
|
18721
18643
|
this.staticDragData = null;
|
|
18722
18644
|
this.dragData = null;
|
|
18723
|
-
this.columnDragMoved = false;
|
|
18724
18645
|
this.clearLocalSubscriptions();
|
|
18725
18646
|
this.orderUi.stop(this.revogrid);
|
|
18726
18647
|
}
|
|
@@ -18730,7 +18651,6 @@ class ColumnMovePlugin extends BasePlugin {
|
|
|
18730
18651
|
clearSubscriptions() {
|
|
18731
18652
|
super.clearSubscriptions();
|
|
18732
18653
|
this.clearLocalSubscriptions();
|
|
18733
|
-
this.revogrid.removeEventListener('beforeheaderclick', this.preventHeaderClickAfterDrag, { capture: true });
|
|
18734
18654
|
}
|
|
18735
18655
|
getData({ gridEl, dataEl, pin }, order, source = []) {
|
|
18736
18656
|
const gridRect = gridEl.getBoundingClientRect();
|
|
@@ -18752,12 +18672,6 @@ class ColumnMovePlugin extends BasePlugin {
|
|
|
18752
18672
|
function getLeftRelative(absoluteX, gridPos, offset) {
|
|
18753
18673
|
return absoluteX - gridPos - offset;
|
|
18754
18674
|
}
|
|
18755
|
-
function getColumnDragPosition(targetItem, startItem, renderOffset, scrollOffset) {
|
|
18756
|
-
const insertionEdge = startItem.itemIndex > targetItem.itemIndex
|
|
18757
|
-
? targetItem.start
|
|
18758
|
-
: targetItem.end;
|
|
18759
|
-
return insertionEdge - renderOffset + scrollOffset;
|
|
18760
|
-
}
|
|
18761
18675
|
|
|
18762
18676
|
function isMobileDevice() {
|
|
18763
18677
|
return /Mobi/i.test(navigator.userAgent) || /Android/i.test(navigator.userAgent) || navigator.maxTouchPoints > 0;
|
|
@@ -19107,7 +19021,7 @@ class RevoGridComponent {
|
|
|
19107
19021
|
this.rowSize = 0;
|
|
19108
19022
|
/** Indicates default column size. */
|
|
19109
19023
|
this.colSize = 100;
|
|
19110
|
-
/** When true, user can
|
|
19024
|
+
/** When true, user can range selection. */
|
|
19111
19025
|
this.range = false;
|
|
19112
19026
|
/** When true, grid in read only mode. */
|
|
19113
19027
|
this.readonly = false;
|
|
@@ -19119,7 +19033,7 @@ class RevoGridComponent {
|
|
|
19119
19033
|
this.noHorizontalScrollTransfer = false;
|
|
19120
19034
|
/** When true cell focus appear. */
|
|
19121
19035
|
this.canFocus = true;
|
|
19122
|
-
/** When true enable clipboard.
|
|
19036
|
+
/** When true enable clipboard. */
|
|
19123
19037
|
this.useClipboard = true;
|
|
19124
19038
|
/**
|
|
19125
19039
|
* Columns - defines an array of grid columns.
|
|
@@ -21975,17 +21889,9 @@ class RevogrViewportScroll {
|
|
|
21975
21889
|
}
|
|
21976
21890
|
render() {
|
|
21977
21891
|
var _a, _b;
|
|
21978
|
-
const
|
|
21979
|
-
// When content fits in the viewport (no scroll needed), don't inflate content-wrapper
|
|
21980
|
-
// to clientHeight — that would prevent inner-content-table from shrinking and push
|
|
21981
|
-
// rowPinEnd (footer) to the bottom instead of letting it follow the data rows.
|
|
21982
|
-
// For large/compressed grids (content > clientHeight), physicalContentHeight handles
|
|
21983
|
-
// the browser scroll-size compression correctly.
|
|
21984
|
-
const physicalContentHeight = this.contentHeight < clientHeight
|
|
21985
|
-
? Math.max(this.contentHeight, 0)
|
|
21986
|
-
: getContentSize(this.contentHeight, clientHeight);
|
|
21892
|
+
const physicalContentHeight = getContentSize(this.contentHeight, (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0);
|
|
21987
21893
|
const physicalContentWidth = getContentSize(this.contentWidth, 0);
|
|
21988
|
-
return (hAsync(Host, { key: '
|
|
21894
|
+
return (hAsync(Host, { key: 'ec8d907976c1d50f7aab3c263be3f0249a274df6', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, hAsync("div", { key: 'e35696a7993ac94261426b45c28d488cdc42b7f0', class: "inner-content-table", style: { width: `${physicalContentWidth}px` } }, hAsync("div", { key: 'a6997451e01eacda1d27d4efa1d74e1748626218', class: "header-wrapper", ref: e => (this.header = e) }, hAsync("slot", { key: '1d401e87d32d5b1531c2211723b552bbc894f22c', name: HEADER_SLOT })), hAsync("div", { key: 'ceab6f9e812d6ca9a0aa376afcd2562a17f505e0', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, hAsync("div", { key: 'a9556578a23d6efddec2e982e863aec064042154', class: "content-wrapper", style: { height: `${physicalContentHeight}px` } }, hAsync("slot", { key: '0ae01f9736b9740612e75261f6e3abebda533377', name: CONTENT_SLOT }))), hAsync("div", { key: '09c2565d4ed449a43820f92d97b6558fca3758e7', class: "footer-wrapper", ref: e => (this.footer = e) }, hAsync("slot", { key: '1ffb08ff8138a560cc09d82e3fe22a53e502aafe', name: FOOTER_SLOT })))));
|
|
21989
21895
|
}
|
|
21990
21896
|
/**
|
|
21991
21897
|
* Extra layer for scroll event monitoring, where MouseWheel event is not passing
|