@revolist/revogrid 3.4.1 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-element/revogr-header2.js +7 -7
- package/custom-element/revogr-overlay-selection2.js +14 -22
- package/custom-element/revogr-row-headers2.js +32 -23
- package/custom-element/selection.utils.js +1 -25
- package/dist/cjs/revo-grid_11.cjs.entry.js +51 -73
- package/dist/collection/components/header/headerRenderer.js +1 -4
- package/dist/collection/components/header/revogr-header-style.css +3 -0
- package/dist/collection/components/header/revogr-header.js +4 -1
- package/dist/collection/components/overlay/autofill.service.js +14 -22
- package/dist/collection/store/viewPort/viewport.helpers.js +32 -23
- package/dist/esm/revo-grid_11.entry.js +51 -73
- package/dist/esm-es5/revo-grid_11.entry.js +1 -1
- package/dist/revo-grid/revo-grid_11.entry.js +1 -1
- package/dist/revo-grid/revo-grid_11.system.entry.js +1 -1
- package/dist/types/components/header/headerRenderer.d.ts +1 -0
- package/dist/types/store/viewPort/viewport.helpers.d.ts +12 -3
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/i
|
|
|
5
5
|
import { c as _getNative, _ as _baseIteratee } from './_baseIteratee.js';
|
|
6
6
|
import { _ as _baseEach } from './each.js';
|
|
7
7
|
import { a as isArray_1 } from './keys.js';
|
|
8
|
-
import {
|
|
8
|
+
import { H as HEADER_CLASS, d as HEADER_SORTABLE_CLASS, F as FOCUS_CLASS, b as DATA_COL, M as MIN_COL_SIZE, e as HEADER_ROW_CLASS, f as HEADER_ACTUAL_ROW_CLASS } from './consts.js';
|
|
9
9
|
import { a as FilterButton } from './filter.button.js';
|
|
10
10
|
import { C as ColumnService } from './columnService.js';
|
|
11
11
|
import { f as findIndex_1 } from './data.store.js';
|
|
@@ -435,10 +435,7 @@ const HeaderCellRenderer = ({ data, props }, children) => {
|
|
|
435
435
|
|
|
436
436
|
const HeaderRenderer = (p) => {
|
|
437
437
|
var _a, _b, _c, _d, _e, _f;
|
|
438
|
-
const cellClass = {
|
|
439
|
-
[HEADER_CLASS]: true,
|
|
440
|
-
[HEADER_SORTABLE_CLASS]: !!((_a = p.data) === null || _a === void 0 ? void 0 : _a.sortable),
|
|
441
|
-
};
|
|
438
|
+
const cellClass = Object.assign({ [HEADER_CLASS]: true, [HEADER_SORTABLE_CLASS]: !!((_a = p.data) === null || _a === void 0 ? void 0 : _a.sortable) }, p.cellClass);
|
|
442
439
|
if ((_b = p.data) === null || _b === void 0 ? void 0 : _b.order) {
|
|
443
440
|
cellClass[p.data.order] = true;
|
|
444
441
|
}
|
|
@@ -516,7 +513,7 @@ const ColumnGroupsRenderer = ({ depth, groups, visibleProps, dimensionCol, canRe
|
|
|
516
513
|
return groupRow;
|
|
517
514
|
};
|
|
518
515
|
|
|
519
|
-
const revogrHeaderStyleCss = "@charset \"UTF-8\";.revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-header{position:relative;z-index:5;display:block}revogr-header .rgHeaderCell{display:flex}revogr-header .rgHeaderCell.align-center{text-align:center}revogr-header .rgHeaderCell.align-left{text-align:left}revogr-header .rgHeaderCell.align-right{text-align:right}revogr-header .rgHeaderCell.sortable{cursor:pointer}revogr-header .rgHeaderCell i.asc:after,revogr-header .rgHeaderCell i.desc:after{font-size:13px}revogr-header .rgHeaderCell i.asc:after{content:\"↑\"}revogr-header .rgHeaderCell i.desc:after{content:\"↓\"}revogr-header .rgHeaderCell,revogr-header .grouped-cell{position:absolute;box-sizing:border-box;height:100%;z-index:1}revogr-header .header-rgRow{display:block;position:relative}revogr-header .header-rgRow.group{z-index:0}revogr-header .group-rgRow{position:relative}revogr-header .rgHeaderCell.active{z-index:10}revogr-header .rgHeaderCell.active .resizable{background-color:deepskyblue}revogr-header .rgHeaderCell .header-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}revogr-header .rgHeaderCell .resizable{display:block;position:absolute;z-index:90;touch-action:none;user-select:none}revogr-header .rgHeaderCell .resizable:hover{background-color:deepskyblue}revogr-header .rgHeaderCell>.resizable-r{cursor:ew-resize;width:6px;right:0;top:0;height:100%}revogr-header .rgHeaderCell>.resizable-rb{cursor:se-resize;width:6px;height:6px;right:0;bottom:0}revogr-header .rgHeaderCell>.resizable-b{cursor:s-resize;height:6px;bottom:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-lb{cursor:sw-resize;width:6px;height:6px;left:0;bottom:0}revogr-header .rgHeaderCell>.resizable-l{cursor:w-resize;width:6px;left:0;height:100%;top:0}revogr-header .rgHeaderCell>.resizable-lt{cursor:nw-resize;width:6px;height:6px;left:0;top:0}revogr-header .rgHeaderCell>.resizable-t{cursor:n-resize;height:6px;top:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-rt{cursor:ne-resize;width:6px;height:6px;right:0;top:0}revogr-header .rv-filter{visibility:hidden}";
|
|
516
|
+
const revogrHeaderStyleCss = "@charset \"UTF-8\";.revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-header{position:relative;z-index:5;display:block}revogr-header .rgHeaderCell{display:flex}revogr-header .rgHeaderCell.align-center{text-align:center}revogr-header .rgHeaderCell.align-left{text-align:left}revogr-header .rgHeaderCell.align-right{text-align:right}revogr-header .rgHeaderCell.sortable{cursor:pointer}revogr-header .rgHeaderCell i.asc:after,revogr-header .rgHeaderCell i.desc:after{font-size:13px}revogr-header .rgHeaderCell i.asc:after{content:\"↑\"}revogr-header .rgHeaderCell i.desc:after{content:\"↓\"}revogr-header .rgHeaderCell,revogr-header .grouped-cell{position:absolute;box-sizing:border-box;height:100%;z-index:1}revogr-header .header-rgRow{display:block;position:relative}revogr-header .header-rgRow.group{z-index:0}revogr-header .group-rgRow{position:relative}revogr-header .rgHeaderCell.active{z-index:10}revogr-header .rgHeaderCell.active .resizable{background-color:deepskyblue}revogr-header .rgHeaderCell.last .resizable{display:none}revogr-header .rgHeaderCell .header-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}revogr-header .rgHeaderCell .resizable{display:block;position:absolute;z-index:90;touch-action:none;user-select:none}revogr-header .rgHeaderCell .resizable:hover{background-color:deepskyblue}revogr-header .rgHeaderCell>.resizable-r{cursor:ew-resize;width:6px;right:0;top:0;height:100%}revogr-header .rgHeaderCell>.resizable-rb{cursor:se-resize;width:6px;height:6px;right:0;bottom:0}revogr-header .rgHeaderCell>.resizable-b{cursor:s-resize;height:6px;bottom:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-lb{cursor:sw-resize;width:6px;height:6px;left:0;bottom:0}revogr-header .rgHeaderCell>.resizable-l{cursor:w-resize;width:6px;left:0;height:100%;top:0}revogr-header .rgHeaderCell>.resizable-lt{cursor:nw-resize;width:6px;height:6px;left:0;top:0}revogr-header .rgHeaderCell>.resizable-t{cursor:n-resize;height:6px;top:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-rt{cursor:ne-resize;width:6px;height:6px;right:0;top:0}revogr-header .rv-filter{visibility:hidden}";
|
|
520
517
|
|
|
521
518
|
const RevogrHeaderComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
522
519
|
constructor() {
|
|
@@ -549,10 +546,13 @@ const RevogrHeaderComponent = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
549
546
|
const range = (_a = this.selectionStore) === null || _a === void 0 ? void 0 : _a.get('range');
|
|
550
547
|
const cells = [];
|
|
551
548
|
const visibleProps = {};
|
|
549
|
+
const lastIndex = this.colData.length - 1;
|
|
552
550
|
// render header columns
|
|
553
551
|
for (let rgCol of cols) {
|
|
554
552
|
const colData = this.colData[rgCol.itemIndex];
|
|
555
|
-
cells.push(h(HeaderRenderer, {
|
|
553
|
+
cells.push(h(HeaderRenderer, { cellClass: {
|
|
554
|
+
last: lastIndex === rgCol.itemIndex
|
|
555
|
+
}, range: range, column: rgCol, data: colData, canFilter: !!this.columnFilter, canResize: this.canResize, onResize: e => this.onResize(e, rgCol.itemIndex), onDoubleClick: e => this.headerdblClick.emit(e), onClick: e => this.initialHeaderClick.emit(e) }));
|
|
556
556
|
visibleProps[colData === null || colData === void 0 ? void 0 : colData.prop] = rgCol.itemIndex;
|
|
557
557
|
}
|
|
558
558
|
return [
|
|
@@ -5,10 +5,9 @@ import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/
|
|
|
5
5
|
import { n as getRange, C as ColumnService, o as isRangeSingleCell } from './columnService.js';
|
|
6
6
|
import { a as isCtrlKey, c as codesLetter, b as isClear, e as isEnterKey, f as isLetterKey, d as defineCustomElement$2 } from './revogr-edit2.js';
|
|
7
7
|
import { E as EDIT_INPUT_WR, C as CELL_HANDLER_CLASS, S as SELECTION_BORDER_CLASS } from './consts.js';
|
|
8
|
-
import { a as getCoordinate, i as isAfterLast, b as isBeforeFirst, c as getCell, d as getCurrentCell,
|
|
8
|
+
import { a as getCoordinate, i as isAfterLast, b as isBeforeFirst, c as getCell, d as getCurrentCell, g as getElStyle } from './selection.utils.js';
|
|
9
9
|
import { t as timeout } from './utils.js';
|
|
10
10
|
import { d as debounce_1 } from './debounce.js';
|
|
11
|
-
import { e as each } from './each.js';
|
|
12
11
|
import { _ as _isIterateeCall, g as getSourceItem } from './data.store.js';
|
|
13
12
|
import { t as toInteger_1 } from './toInteger.js';
|
|
14
13
|
import { d as defineCustomElement$1 } from './revogr-order-editor2.js';
|
|
@@ -304,35 +303,28 @@ class AutoFillService {
|
|
|
304
303
|
return;
|
|
305
304
|
}
|
|
306
305
|
let current = getCurrentCell({ x, y }, data);
|
|
307
|
-
let direction;
|
|
308
|
-
if (this.autoFillLast) {
|
|
309
|
-
direction = getDirectionCoordinate(this.autoFillStart, this.autoFillLast);
|
|
310
|
-
}
|
|
311
306
|
// first time or direction equal to start(same as first time)
|
|
312
|
-
if (!this.autoFillLast
|
|
313
|
-
direction = getLargestAxis(this.autoFillStart, current);
|
|
307
|
+
if (!this.autoFillLast) {
|
|
314
308
|
if (!this.autoFillLast) {
|
|
315
309
|
this.autoFillLast = this.autoFillStart;
|
|
316
310
|
}
|
|
317
311
|
}
|
|
318
|
-
// nothing
|
|
319
|
-
if (!direction) {
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
each(direction, (v, k) => {
|
|
323
|
-
if (v) {
|
|
324
|
-
current = Object.assign(Object.assign({}, this.autoFillLast), { [k]: current[k] });
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
// check if not the latest
|
|
312
|
+
// check if not the latest, if latest - do nothing
|
|
328
313
|
if (isAfterLast(current, data)) {
|
|
329
314
|
return;
|
|
330
315
|
}
|
|
331
316
|
this.autoFillLast = current;
|
|
332
|
-
this.
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
317
|
+
const isSame = current.x === this.autoFillInitial.x && current.y === this.autoFillInitial.y;
|
|
318
|
+
// if same as initial - clear
|
|
319
|
+
if (isSame) {
|
|
320
|
+
this.sv.setTempRange(null);
|
|
321
|
+
}
|
|
322
|
+
else {
|
|
323
|
+
this.sv.setTempRange({
|
|
324
|
+
area: getRange(this.autoFillInitial, this.autoFillLast),
|
|
325
|
+
type: this.autoFillType,
|
|
326
|
+
});
|
|
327
|
+
}
|
|
336
328
|
}
|
|
337
329
|
/**
|
|
338
330
|
* Range selection started
|
|
@@ -14,35 +14,37 @@ import { d as defineCustomElement$1 } from './revogr-viewport-scroll2.js';
|
|
|
14
14
|
* If viewport wasn't changed fully simple recombination of positions
|
|
15
15
|
* Otherwise rebuild viewport items
|
|
16
16
|
*/
|
|
17
|
-
function getUpdatedItemsByPosition(pos,
|
|
17
|
+
function getUpdatedItemsByPosition(pos, // coordinate
|
|
18
|
+
items, realCount, virtualSize, dimension) {
|
|
18
19
|
const activeItem = getItemByPosition(dimension, pos);
|
|
19
20
|
const firstItem = getFirstItem(items);
|
|
20
21
|
let toUpdate;
|
|
21
|
-
// do simple position
|
|
22
|
+
// do simple position recombination if items already present in viewport
|
|
22
23
|
if (firstItem) {
|
|
23
24
|
let changedOffsetStart = activeItem.itemIndex - (firstItem.itemIndex || 0);
|
|
25
|
+
// if item changed
|
|
24
26
|
if (changedOffsetStart) {
|
|
25
27
|
// simple recombination
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
updateMissingAndRange(toUpdate.items, extra, toUpdate);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
28
|
+
toUpdate = recombineByOffset(Math.abs(changedOffsetStart), Object.assign(Object.assign({ positiveDirection: changedOffsetStart > -1 }, dimension), items));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// if partial recombination add items if revo-viewport has some space left
|
|
32
|
+
if (toUpdate) {
|
|
33
|
+
const extra = addMissingItems(activeItem, realCount, virtualSize, toUpdate, dimension);
|
|
34
|
+
if (extra.length) {
|
|
35
|
+
updateMissingAndRange(toUpdate.items, extra, toUpdate);
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
// new collection if no items after replacement full replacement
|
|
40
39
|
if (!toUpdate) {
|
|
41
40
|
const items = getItems({
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
firstItemStart: activeItem.start,
|
|
42
|
+
firstItemIndex: activeItem.itemIndex,
|
|
44
43
|
origSize: dimension.originItemSize,
|
|
45
|
-
|
|
44
|
+
// virtual size can differ based on scroll position if some big items are present
|
|
45
|
+
// scroll can be in the middle of item and virtual size will be larger
|
|
46
|
+
// so we need to exclude this part from virtual size hence it's already passed
|
|
47
|
+
maxSize: Math.min(virtualSize + (activeItem.end - activeItem.start), dimension.realSize),
|
|
46
48
|
maxCount: realCount,
|
|
47
49
|
sizes: dimension.sizes,
|
|
48
50
|
});
|
|
@@ -63,29 +65,36 @@ function updateMissingAndRange(items, missing, range) {
|
|
|
63
65
|
}
|
|
64
66
|
range.end += missing.length;
|
|
65
67
|
}
|
|
66
|
-
|
|
68
|
+
/**
|
|
69
|
+
* If partial replacement
|
|
70
|
+
* this function adds items if viewport has some space left
|
|
71
|
+
*/
|
|
67
72
|
function addMissingItems(firstItem, realCount, virtualSize, existingCollection, dimension) {
|
|
68
73
|
const lastItem = getLastItem(existingCollection);
|
|
69
74
|
const items = getItems({
|
|
70
75
|
sizes: dimension.sizes,
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
firstItemStart: lastItem.end,
|
|
77
|
+
firstItemIndex: lastItem.itemIndex + 1,
|
|
73
78
|
origSize: dimension.originItemSize,
|
|
74
79
|
maxSize: virtualSize - (lastItem.end - firstItem.start),
|
|
75
80
|
maxCount: realCount,
|
|
76
81
|
});
|
|
77
82
|
return items;
|
|
78
83
|
}
|
|
79
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Get wiewport items parameters
|
|
86
|
+
* caching position and calculating items count in viewport
|
|
87
|
+
*/
|
|
80
88
|
function getItems(opt, currentSize = 0) {
|
|
81
89
|
const items = [];
|
|
82
|
-
let index = opt.
|
|
90
|
+
let index = opt.firstItemIndex;
|
|
83
91
|
let size = currentSize;
|
|
92
|
+
// max size or max count
|
|
84
93
|
while (size <= opt.maxSize && index < opt.maxCount) {
|
|
85
94
|
const newSize = getItemSize(index, opt.sizes, opt.origSize);
|
|
86
95
|
items.push({
|
|
87
|
-
start: opt.
|
|
88
|
-
end: opt.
|
|
96
|
+
start: opt.firstItemStart + size,
|
|
97
|
+
end: opt.firstItemStart + size + newSize,
|
|
89
98
|
itemIndex: index,
|
|
90
99
|
size: newSize,
|
|
91
100
|
});
|
|
@@ -52,30 +52,6 @@ function isAfterLast({ x, y }, { lastCell }) {
|
|
|
52
52
|
function isBeforeFirst({ x, y }) {
|
|
53
53
|
return x < 0 || y < 0;
|
|
54
54
|
}
|
|
55
|
-
/** Compare cells, only 1 coordinate difference is possible */
|
|
56
|
-
function getDirectionCoordinate(initial, last) {
|
|
57
|
-
const c = ['x', 'y'];
|
|
58
|
-
for (let k of c) {
|
|
59
|
-
if (initial[k] !== last[k]) {
|
|
60
|
-
return { [k]: 1 };
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
function getLargestAxis(initial, last) {
|
|
66
|
-
const cell = {};
|
|
67
|
-
const c = ['x', 'y'];
|
|
68
|
-
for (let k of c) {
|
|
69
|
-
cell[k] = Math.abs(initial[k] - last[k]);
|
|
70
|
-
}
|
|
71
|
-
if (cell.x > cell.y) {
|
|
72
|
-
return { x: 1 };
|
|
73
|
-
}
|
|
74
|
-
if (cell.y > cell.x) {
|
|
75
|
-
return { y: 1 };
|
|
76
|
-
}
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
55
|
function styleByCellProps(styles) {
|
|
80
56
|
return {
|
|
81
57
|
left: `${styles.left}px`,
|
|
@@ -103,4 +79,4 @@ function getElStyle(range, dimensionRow, dimensionCol) {
|
|
|
103
79
|
return styleByCellProps(styles);
|
|
104
80
|
}
|
|
105
81
|
|
|
106
|
-
export { getCoordinate as a, isBeforeFirst as b, getCell as c, getCurrentCell as d,
|
|
82
|
+
export { getCoordinate as a, isBeforeFirst as b, getCell as c, getCurrentCell as d, getElStyle as g, isAfterLast as i };
|
|
@@ -4510,35 +4510,37 @@ class DimensionProvider {
|
|
|
4510
4510
|
* If viewport wasn't changed fully simple recombination of positions
|
|
4511
4511
|
* Otherwise rebuild viewport items
|
|
4512
4512
|
*/
|
|
4513
|
-
function getUpdatedItemsByPosition(pos,
|
|
4513
|
+
function getUpdatedItemsByPosition(pos, // coordinate
|
|
4514
|
+
items, realCount, virtualSize, dimension) {
|
|
4514
4515
|
const activeItem = getItemByPosition(dimension, pos);
|
|
4515
4516
|
const firstItem = getFirstItem(items);
|
|
4516
4517
|
let toUpdate;
|
|
4517
|
-
// do simple position
|
|
4518
|
+
// do simple position recombination if items already present in viewport
|
|
4518
4519
|
if (firstItem) {
|
|
4519
4520
|
let changedOffsetStart = activeItem.itemIndex - (firstItem.itemIndex || 0);
|
|
4521
|
+
// if item changed
|
|
4520
4522
|
if (changedOffsetStart) {
|
|
4521
4523
|
// simple recombination
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
updateMissingAndRange(toUpdate.items, extra, toUpdate);
|
|
4531
|
-
}
|
|
4532
|
-
}
|
|
4524
|
+
toUpdate = recombineByOffset(Math.abs(changedOffsetStart), Object.assign(Object.assign({ positiveDirection: changedOffsetStart > -1 }, dimension), items));
|
|
4525
|
+
}
|
|
4526
|
+
}
|
|
4527
|
+
// if partial recombination add items if revo-viewport has some space left
|
|
4528
|
+
if (toUpdate) {
|
|
4529
|
+
const extra = addMissingItems(activeItem, realCount, virtualSize, toUpdate, dimension);
|
|
4530
|
+
if (extra.length) {
|
|
4531
|
+
updateMissingAndRange(toUpdate.items, extra, toUpdate);
|
|
4533
4532
|
}
|
|
4534
4533
|
}
|
|
4535
4534
|
// new collection if no items after replacement full replacement
|
|
4536
4535
|
if (!toUpdate) {
|
|
4537
4536
|
const items = getItems({
|
|
4538
|
-
|
|
4539
|
-
|
|
4537
|
+
firstItemStart: activeItem.start,
|
|
4538
|
+
firstItemIndex: activeItem.itemIndex,
|
|
4540
4539
|
origSize: dimension.originItemSize,
|
|
4541
|
-
|
|
4540
|
+
// virtual size can differ based on scroll position if some big items are present
|
|
4541
|
+
// scroll can be in the middle of item and virtual size will be larger
|
|
4542
|
+
// so we need to exclude this part from virtual size hence it's already passed
|
|
4543
|
+
maxSize: Math.min(virtualSize + (activeItem.end - activeItem.start), dimension.realSize),
|
|
4542
4544
|
maxCount: realCount,
|
|
4543
4545
|
sizes: dimension.sizes,
|
|
4544
4546
|
});
|
|
@@ -4559,29 +4561,36 @@ function updateMissingAndRange(items, missing, range) {
|
|
|
4559
4561
|
}
|
|
4560
4562
|
range.end += missing.length;
|
|
4561
4563
|
}
|
|
4562
|
-
|
|
4564
|
+
/**
|
|
4565
|
+
* If partial replacement
|
|
4566
|
+
* this function adds items if viewport has some space left
|
|
4567
|
+
*/
|
|
4563
4568
|
function addMissingItems(firstItem, realCount, virtualSize, existingCollection, dimension) {
|
|
4564
4569
|
const lastItem = getLastItem(existingCollection);
|
|
4565
4570
|
const items = getItems({
|
|
4566
4571
|
sizes: dimension.sizes,
|
|
4567
|
-
|
|
4568
|
-
|
|
4572
|
+
firstItemStart: lastItem.end,
|
|
4573
|
+
firstItemIndex: lastItem.itemIndex + 1,
|
|
4569
4574
|
origSize: dimension.originItemSize,
|
|
4570
4575
|
maxSize: virtualSize - (lastItem.end - firstItem.start),
|
|
4571
4576
|
maxCount: realCount,
|
|
4572
4577
|
});
|
|
4573
4578
|
return items;
|
|
4574
4579
|
}
|
|
4575
|
-
|
|
4580
|
+
/**
|
|
4581
|
+
* Get wiewport items parameters
|
|
4582
|
+
* caching position and calculating items count in viewport
|
|
4583
|
+
*/
|
|
4576
4584
|
function getItems(opt, currentSize = 0) {
|
|
4577
4585
|
const items = [];
|
|
4578
|
-
let index = opt.
|
|
4586
|
+
let index = opt.firstItemIndex;
|
|
4579
4587
|
let size = currentSize;
|
|
4588
|
+
// max size or max count
|
|
4580
4589
|
while (size <= opt.maxSize && index < opt.maxCount) {
|
|
4581
4590
|
const newSize = getItemSize(index, opt.sizes, opt.origSize);
|
|
4582
4591
|
items.push({
|
|
4583
|
-
start: opt.
|
|
4584
|
-
end: opt.
|
|
4592
|
+
start: opt.firstItemStart + size,
|
|
4593
|
+
end: opt.firstItemStart + size + newSize,
|
|
4585
4594
|
itemIndex: index,
|
|
4586
4595
|
size: newSize,
|
|
4587
4596
|
});
|
|
@@ -26249,30 +26258,6 @@ function isAfterLast({ x, y }, { lastCell }) {
|
|
|
26249
26258
|
function isBeforeFirst({ x, y }) {
|
|
26250
26259
|
return x < 0 || y < 0;
|
|
26251
26260
|
}
|
|
26252
|
-
/** Compare cells, only 1 coordinate difference is possible */
|
|
26253
|
-
function getDirectionCoordinate(initial, last) {
|
|
26254
|
-
const c = ['x', 'y'];
|
|
26255
|
-
for (let k of c) {
|
|
26256
|
-
if (initial[k] !== last[k]) {
|
|
26257
|
-
return { [k]: 1 };
|
|
26258
|
-
}
|
|
26259
|
-
}
|
|
26260
|
-
return null;
|
|
26261
|
-
}
|
|
26262
|
-
function getLargestAxis(initial, last) {
|
|
26263
|
-
const cell = {};
|
|
26264
|
-
const c = ['x', 'y'];
|
|
26265
|
-
for (let k of c) {
|
|
26266
|
-
cell[k] = Math.abs(initial[k] - last[k]);
|
|
26267
|
-
}
|
|
26268
|
-
if (cell.x > cell.y) {
|
|
26269
|
-
return { x: 1 };
|
|
26270
|
-
}
|
|
26271
|
-
if (cell.y > cell.x) {
|
|
26272
|
-
return { y: 1 };
|
|
26273
|
-
}
|
|
26274
|
-
return null;
|
|
26275
|
-
}
|
|
26276
26261
|
function styleByCellProps(styles) {
|
|
26277
26262
|
return {
|
|
26278
26263
|
left: `${styles.left}px`,
|
|
@@ -26745,10 +26730,7 @@ const HeaderCellRenderer = ({ data, props }, children) => {
|
|
|
26745
26730
|
|
|
26746
26731
|
const HeaderRenderer = (p) => {
|
|
26747
26732
|
var _a, _b, _c, _d, _e, _f;
|
|
26748
|
-
const cellClass = {
|
|
26749
|
-
[HEADER_CLASS]: true,
|
|
26750
|
-
[HEADER_SORTABLE_CLASS]: !!((_a = p.data) === null || _a === void 0 ? void 0 : _a.sortable),
|
|
26751
|
-
};
|
|
26733
|
+
const cellClass = Object.assign({ [HEADER_CLASS]: true, [HEADER_SORTABLE_CLASS]: !!((_a = p.data) === null || _a === void 0 ? void 0 : _a.sortable) }, p.cellClass);
|
|
26752
26734
|
if ((_b = p.data) === null || _b === void 0 ? void 0 : _b.order) {
|
|
26753
26735
|
cellClass[p.data.order] = true;
|
|
26754
26736
|
}
|
|
@@ -26826,7 +26808,7 @@ const ColumnGroupsRenderer = ({ depth, groups, visibleProps, dimensionCol, canRe
|
|
|
26826
26808
|
return groupRow;
|
|
26827
26809
|
};
|
|
26828
26810
|
|
|
26829
|
-
const revogrHeaderStyleCss = "@charset \"UTF-8\";.revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-header{position:relative;z-index:5;display:block}revogr-header .rgHeaderCell{display:flex}revogr-header .rgHeaderCell.align-center{text-align:center}revogr-header .rgHeaderCell.align-left{text-align:left}revogr-header .rgHeaderCell.align-right{text-align:right}revogr-header .rgHeaderCell.sortable{cursor:pointer}revogr-header .rgHeaderCell i.asc:after,revogr-header .rgHeaderCell i.desc:after{font-size:13px}revogr-header .rgHeaderCell i.asc:after{content:\"↑\"}revogr-header .rgHeaderCell i.desc:after{content:\"↓\"}revogr-header .rgHeaderCell,revogr-header .grouped-cell{position:absolute;box-sizing:border-box;height:100%;z-index:1}revogr-header .header-rgRow{display:block;position:relative}revogr-header .header-rgRow.group{z-index:0}revogr-header .group-rgRow{position:relative}revogr-header .rgHeaderCell.active{z-index:10}revogr-header .rgHeaderCell.active .resizable{background-color:deepskyblue}revogr-header .rgHeaderCell .header-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}revogr-header .rgHeaderCell .resizable{display:block;position:absolute;z-index:90;touch-action:none;user-select:none}revogr-header .rgHeaderCell .resizable:hover{background-color:deepskyblue}revogr-header .rgHeaderCell>.resizable-r{cursor:ew-resize;width:6px;right:0;top:0;height:100%}revogr-header .rgHeaderCell>.resizable-rb{cursor:se-resize;width:6px;height:6px;right:0;bottom:0}revogr-header .rgHeaderCell>.resizable-b{cursor:s-resize;height:6px;bottom:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-lb{cursor:sw-resize;width:6px;height:6px;left:0;bottom:0}revogr-header .rgHeaderCell>.resizable-l{cursor:w-resize;width:6px;left:0;height:100%;top:0}revogr-header .rgHeaderCell>.resizable-lt{cursor:nw-resize;width:6px;height:6px;left:0;top:0}revogr-header .rgHeaderCell>.resizable-t{cursor:n-resize;height:6px;top:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-rt{cursor:ne-resize;width:6px;height:6px;right:0;top:0}revogr-header .rv-filter{visibility:hidden}";
|
|
26811
|
+
const revogrHeaderStyleCss = "@charset \"UTF-8\";.revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-header{position:relative;z-index:5;display:block}revogr-header .rgHeaderCell{display:flex}revogr-header .rgHeaderCell.align-center{text-align:center}revogr-header .rgHeaderCell.align-left{text-align:left}revogr-header .rgHeaderCell.align-right{text-align:right}revogr-header .rgHeaderCell.sortable{cursor:pointer}revogr-header .rgHeaderCell i.asc:after,revogr-header .rgHeaderCell i.desc:after{font-size:13px}revogr-header .rgHeaderCell i.asc:after{content:\"↑\"}revogr-header .rgHeaderCell i.desc:after{content:\"↓\"}revogr-header .rgHeaderCell,revogr-header .grouped-cell{position:absolute;box-sizing:border-box;height:100%;z-index:1}revogr-header .header-rgRow{display:block;position:relative}revogr-header .header-rgRow.group{z-index:0}revogr-header .group-rgRow{position:relative}revogr-header .rgHeaderCell.active{z-index:10}revogr-header .rgHeaderCell.active .resizable{background-color:deepskyblue}revogr-header .rgHeaderCell.last .resizable{display:none}revogr-header .rgHeaderCell .header-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}revogr-header .rgHeaderCell .resizable{display:block;position:absolute;z-index:90;touch-action:none;user-select:none}revogr-header .rgHeaderCell .resizable:hover{background-color:deepskyblue}revogr-header .rgHeaderCell>.resizable-r{cursor:ew-resize;width:6px;right:0;top:0;height:100%}revogr-header .rgHeaderCell>.resizable-rb{cursor:se-resize;width:6px;height:6px;right:0;bottom:0}revogr-header .rgHeaderCell>.resizable-b{cursor:s-resize;height:6px;bottom:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-lb{cursor:sw-resize;width:6px;height:6px;left:0;bottom:0}revogr-header .rgHeaderCell>.resizable-l{cursor:w-resize;width:6px;left:0;height:100%;top:0}revogr-header .rgHeaderCell>.resizable-lt{cursor:nw-resize;width:6px;height:6px;left:0;top:0}revogr-header .rgHeaderCell>.resizable-t{cursor:n-resize;height:6px;top:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-rt{cursor:ne-resize;width:6px;height:6px;right:0;top:0}revogr-header .rv-filter{visibility:hidden}";
|
|
26830
26812
|
|
|
26831
26813
|
const RevogrHeaderComponent = class {
|
|
26832
26814
|
constructor(hostRef) {
|
|
@@ -26858,10 +26840,13 @@ const RevogrHeaderComponent = class {
|
|
|
26858
26840
|
const range = (_a = this.selectionStore) === null || _a === void 0 ? void 0 : _a.get('range');
|
|
26859
26841
|
const cells = [];
|
|
26860
26842
|
const visibleProps = {};
|
|
26843
|
+
const lastIndex = this.colData.length - 1;
|
|
26861
26844
|
// render header columns
|
|
26862
26845
|
for (let rgCol of cols) {
|
|
26863
26846
|
const colData = this.colData[rgCol.itemIndex];
|
|
26864
|
-
cells.push(index.h(HeaderRenderer, {
|
|
26847
|
+
cells.push(index.h(HeaderRenderer, { cellClass: {
|
|
26848
|
+
last: lastIndex === rgCol.itemIndex
|
|
26849
|
+
}, range: range, column: rgCol, data: colData, canFilter: !!this.columnFilter, canResize: this.canResize, onResize: e => this.onResize(e, rgCol.itemIndex), onDoubleClick: e => this.headerdblClick.emit(e), onClick: e => this.initialHeaderClick.emit(e) }));
|
|
26865
26850
|
visibleProps[colData === null || colData === void 0 ? void 0 : colData.prop] = rgCol.itemIndex;
|
|
26866
26851
|
}
|
|
26867
26852
|
return [
|
|
@@ -27321,35 +27306,28 @@ class AutoFillService {
|
|
|
27321
27306
|
return;
|
|
27322
27307
|
}
|
|
27323
27308
|
let current = getCurrentCell({ x, y }, data);
|
|
27324
|
-
let direction;
|
|
27325
|
-
if (this.autoFillLast) {
|
|
27326
|
-
direction = getDirectionCoordinate(this.autoFillStart, this.autoFillLast);
|
|
27327
|
-
}
|
|
27328
27309
|
// first time or direction equal to start(same as first time)
|
|
27329
|
-
if (!this.autoFillLast
|
|
27330
|
-
direction = getLargestAxis(this.autoFillStart, current);
|
|
27310
|
+
if (!this.autoFillLast) {
|
|
27331
27311
|
if (!this.autoFillLast) {
|
|
27332
27312
|
this.autoFillLast = this.autoFillStart;
|
|
27333
27313
|
}
|
|
27334
27314
|
}
|
|
27335
|
-
// nothing
|
|
27336
|
-
if (!direction) {
|
|
27337
|
-
return;
|
|
27338
|
-
}
|
|
27339
|
-
each(direction, (v, k) => {
|
|
27340
|
-
if (v) {
|
|
27341
|
-
current = Object.assign(Object.assign({}, this.autoFillLast), { [k]: current[k] });
|
|
27342
|
-
}
|
|
27343
|
-
});
|
|
27344
|
-
// check if not the latest
|
|
27315
|
+
// check if not the latest, if latest - do nothing
|
|
27345
27316
|
if (isAfterLast(current, data)) {
|
|
27346
27317
|
return;
|
|
27347
27318
|
}
|
|
27348
27319
|
this.autoFillLast = current;
|
|
27349
|
-
this.
|
|
27350
|
-
|
|
27351
|
-
|
|
27352
|
-
|
|
27320
|
+
const isSame = current.x === this.autoFillInitial.x && current.y === this.autoFillInitial.y;
|
|
27321
|
+
// if same as initial - clear
|
|
27322
|
+
if (isSame) {
|
|
27323
|
+
this.sv.setTempRange(null);
|
|
27324
|
+
}
|
|
27325
|
+
else {
|
|
27326
|
+
this.sv.setTempRange({
|
|
27327
|
+
area: getRange(this.autoFillInitial, this.autoFillLast),
|
|
27328
|
+
type: this.autoFillType,
|
|
27329
|
+
});
|
|
27330
|
+
}
|
|
27353
27331
|
}
|
|
27354
27332
|
/**
|
|
27355
27333
|
* Range selection started
|
|
@@ -8,10 +8,7 @@ import { DATA_COL, FOCUS_CLASS, HEADER_CLASS, HEADER_SORTABLE_CLASS, MIN_COL_SIZ
|
|
|
8
8
|
import { HeaderCellRenderer } from './headerCellRenderer';
|
|
9
9
|
const HeaderRenderer = (p) => {
|
|
10
10
|
var _a, _b, _c, _d, _e, _f;
|
|
11
|
-
const cellClass = {
|
|
12
|
-
[HEADER_CLASS]: true,
|
|
13
|
-
[HEADER_SORTABLE_CLASS]: !!((_a = p.data) === null || _a === void 0 ? void 0 : _a.sortable),
|
|
14
|
-
};
|
|
11
|
+
const cellClass = Object.assign({ [HEADER_CLASS]: true, [HEADER_SORTABLE_CLASS]: !!((_a = p.data) === null || _a === void 0 ? void 0 : _a.sortable) }, p.cellClass);
|
|
15
12
|
if ((_b = p.data) === null || _b === void 0 ? void 0 : _b.order) {
|
|
16
13
|
cellClass[p.data.order] = true;
|
|
17
14
|
}
|
|
@@ -121,6 +121,9 @@ revogr-header .rgHeaderCell.active {
|
|
|
121
121
|
revogr-header .rgHeaderCell.active .resizable {
|
|
122
122
|
background-color: deepskyblue;
|
|
123
123
|
}
|
|
124
|
+
revogr-header .rgHeaderCell.last .resizable {
|
|
125
|
+
display: none;
|
|
126
|
+
}
|
|
124
127
|
revogr-header .rgHeaderCell .header-content {
|
|
125
128
|
overflow: hidden;
|
|
126
129
|
text-overflow: ellipsis;
|
|
@@ -32,10 +32,13 @@ export class RevogrHeaderComponent {
|
|
|
32
32
|
const range = (_a = this.selectionStore) === null || _a === void 0 ? void 0 : _a.get('range');
|
|
33
33
|
const cells = [];
|
|
34
34
|
const visibleProps = {};
|
|
35
|
+
const lastIndex = this.colData.length - 1;
|
|
35
36
|
// render header columns
|
|
36
37
|
for (let rgCol of cols) {
|
|
37
38
|
const colData = this.colData[rgCol.itemIndex];
|
|
38
|
-
cells.push(h(HeaderRenderer, {
|
|
39
|
+
cells.push(h(HeaderRenderer, { cellClass: {
|
|
40
|
+
last: lastIndex === rgCol.itemIndex
|
|
41
|
+
}, range: range, column: rgCol, data: colData, canFilter: !!this.columnFilter, canResize: this.canResize, onResize: e => this.onResize(e, rgCol.itemIndex), onDoubleClick: e => this.headerdblClick.emit(e), onClick: e => this.initialHeaderClick.emit(e) }));
|
|
39
42
|
visibleProps[colData === null || colData === void 0 ? void 0 : colData.prop] = rgCol.itemIndex;
|
|
40
43
|
}
|
|
41
44
|
return [
|