@revolist/revogrid 3.1.5 → 3.2.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/index.js +473 -225
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/revo-grid.cjs.js +1 -1
- package/dist/cjs/revo-grid_11.cjs.entry.js +243 -5
- package/dist/cjs/revogr-filter-panel.cjs.entry.js +16 -6
- package/dist/collection/components/header/headerCellRenderer.js +8 -1
- package/dist/collection/components/revo-grid/revo-grid-style.css +18 -1
- package/dist/collection/components/revo-grid/revo-grid.js +41 -3
- package/dist/collection/plugins/autoSizeColumn.js +1 -1
- package/dist/collection/plugins/dispatcher.js +19 -0
- package/dist/collection/plugins/filter/filter.plugin.js +1 -1
- package/dist/collection/plugins/filter/filter.pop.js +36 -7
- package/dist/collection/plugins/moveColumn/columnDragPlugin.js +145 -0
- package/dist/collection/plugins/moveColumn/columnOrderHandler.js +60 -0
- package/dist/esm/{debounce-8dadcda7.js → debounce-45985ae0.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/revo-grid.js +1 -1
- package/dist/esm/revo-grid_11.entry.js +244 -6
- package/dist/esm/revogr-filter-panel.entry.js +17 -7
- package/dist/esm-es5/{debounce-8dadcda7.js → debounce-45985ae0.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/revo-grid.js +1 -1
- package/dist/esm-es5/revo-grid_11.entry.js +1 -1
- package/dist/esm-es5/revogr-filter-panel.entry.js +1 -1
- package/dist/revo-grid/{debounce-d097578d.js → debounce-6c911037.js} +1 -1
- package/dist/revo-grid/{debounce-f40a88f6.system.js → debounce-a345f98e.system.js} +1 -1
- package/dist/revo-grid/revo-grid.esm.js +1 -1
- package/dist/revo-grid/revo-grid.system.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/revo-grid/revogr-filter-panel.entry.js +1 -1
- package/dist/revo-grid/revogr-filter-panel.system.entry.js +1 -1
- package/dist/types/components/revo-grid/revo-grid.d.ts +6 -0
- package/dist/types/components.d.ts +12 -2
- package/dist/types/plugins/dispatcher.d.ts +10 -0
- package/dist/types/plugins/filter/filter.plugin.d.ts +2 -0
- package/dist/types/plugins/filter/filter.pop.d.ts +2 -0
- package/dist/types/plugins/moveColumn/columnDragPlugin.d.ts +66 -0
- package/dist/types/plugins/moveColumn/columnOrderHandler.d.ts +12 -0
- package/dist/types/services/resizable.directive.d.ts +1 -1
- package/package.json +1 -1
package/custom-element/index.js
CHANGED
|
@@ -5208,7 +5208,7 @@ class AutoSizeColumn extends BasePlugin {
|
|
|
5208
5208
|
const sizes = {};
|
|
5209
5209
|
each(autoSize[type], rgCol => {
|
|
5210
5210
|
// calculate size
|
|
5211
|
-
rgCol.size = sizes[rgCol.index] = source.reduce((prev, rgRow) => Math.max(prev, this.getLength(rgRow[rgCol.prop])),
|
|
5211
|
+
rgCol.size = sizes[rgCol.index] = source.reduce((prev, rgRow) => Math.max(prev, this.getLength(rgRow[rgCol.prop])), this.getLength(rgCol.name || ''));
|
|
5212
5212
|
});
|
|
5213
5213
|
this.providers.dimensionProvider.setDimensionSize(type, sizes);
|
|
5214
5214
|
});
|
|
@@ -5535,7 +5535,7 @@ class FilterPlugin extends BasePlugin {
|
|
|
5535
5535
|
this.addEventListener('headerclick', headerclick);
|
|
5536
5536
|
this.addEventListener('aftersourceset', aftersourceset);
|
|
5537
5537
|
this.revogrid.registerVNode([
|
|
5538
|
-
h("revogr-filter-panel", { uuid: `filter-${uiid}`, filterItems: this.multiFilterItems, filterNames: this.possibleFilterNames, filterEntities: this.possibleFilterEntities, filterCaptions: (_a = config === null || config === void 0 ? void 0 : config.localization) === null || _a === void 0 ? void 0 : _a.captions, onFilterChange: e => this.onFilterChange(e.detail), ref: e => (this.pop = e) }),
|
|
5538
|
+
h("revogr-filter-panel", { uuid: `filter-${uiid}`, filterItems: this.multiFilterItems, filterNames: this.possibleFilterNames, filterEntities: this.possibleFilterEntities, filterCaptions: (_a = config === null || config === void 0 ? void 0 : config.localization) === null || _a === void 0 ? void 0 : _a.captions, onFilterChange: e => this.onFilterChange(e.detail), disableDynamicFiltering: config === null || config === void 0 ? void 0 : config.disableDynamicFiltering, ref: e => (this.pop = e) }),
|
|
5539
5539
|
]);
|
|
5540
5540
|
}
|
|
5541
5541
|
initConfig(config) {
|
|
@@ -24968,7 +24968,430 @@ function isStretchPlugin(plugin) {
|
|
|
24968
24968
|
return !!plugin.applyStretch;
|
|
24969
24969
|
}
|
|
24970
24970
|
|
|
24971
|
-
const revoGridStyleCss = ".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}revo-grid[theme=default]{font-size:12px}revo-grid[theme=default] revogr-header{text-align:center;line-height:30px;background-color:#f8f9fa}revo-grid[theme=default] revogr-header .group-rgRow{box-shadow:none}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid[theme=default] revogr-header .group-rgRow{text-transform:uppercase;font-size:12px;color:#61656a}revo-grid[theme=default] revogr-header .header-rgRow{height:30px;box-shadow:0 -1px 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-header .rgHeaderCell{box-shadow:-1px 0 0 0 #c0c0c0, -1px 0 0 0 #c0c0c0 inset, 0 -1px 0 0 #c0c0c0, 0 -1px 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] .rowHeaders{background-color:#f8f9fa}revo-grid[theme=default] .rowHeaders revogr-data .rgCell{color:#61656a;box-shadow:0 -1px 0 0 #c0c0c0 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] .rowHeaders revogr-header{box-shadow:0 -1px 0 0 #c0c0c0 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #c0c0c0 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-viewport-scroll.colPinEnd,revo-grid[theme=default] revogr-viewport-scroll.colPinEnd revogr-header{box-shadow:1px 0 0 #c0c0c0 inset}revo-grid[theme=default] .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset, 0 -1px 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data{text-align:center}revo-grid[theme=default] revogr-data .rgRow{line-height:27px;box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] revogr-data .rgCell{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgCell.disabled{background-color:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=material]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}revo-grid[theme=material] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=material] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=material] revogr-header .header-rgRow{height:50px}revo-grid[theme=material] revogr-data{text-align:left}revo-grid[theme=material] revogr-data .rgRow{line-height:42px}revo-grid[theme=material] revogr-data .rgCell{padding:0 15px}revo-grid[theme=material] .viewports{width:100%}revo-grid[theme=material] .rowHeaders{background-color:#f7faff}revo-grid[theme=material] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=material] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=material] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=material] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=material] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=material] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=material] revogr-data .revo-draggable>.revo-drag-icon{background-color:#d4d4d4}revo-grid[theme=material] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:black}revo-grid[theme=darkMaterial]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#d8d8d8}revo-grid[theme=darkMaterial] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkMaterial] revogr-header .header-rgRow{height:50px}revo-grid[theme=darkMaterial] revogr-data{text-align:left}revo-grid[theme=darkMaterial] revogr-data .rgRow{line-height:42px}revo-grid[theme=darkMaterial] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkMaterial] .viewports{width:100%}revo-grid[theme=darkMaterial] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkMaterial] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkMaterial] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkMaterial] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkMaterial] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] revogr-data .revo-draggable>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.5)}revo-grid[theme=darkMaterial] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.7)}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=darkCompact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#d8d8d8}revo-grid[theme=darkCompact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkCompact] revogr-header .header-rgRow{height:45px}revo-grid[theme=darkCompact] revogr-data{text-align:left}revo-grid[theme=darkCompact] revogr-data .rgRow{line-height:32px}revo-grid[theme=darkCompact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkCompact] .viewports{width:100%}revo-grid[theme=darkCompact] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkCompact] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkCompact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkCompact] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkCompact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] revogr-data .revo-draggable>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.5)}revo-grid[theme=darkCompact] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.7)}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=compact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}revo-grid[theme=compact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=compact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=compact] revogr-header .header-rgRow{height:45px}revo-grid[theme=compact] revogr-data{text-align:left}revo-grid[theme=compact] revogr-data .rgRow{line-height:32px}revo-grid[theme=compact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=compact] .viewports{width:100%}revo-grid[theme=compact] .rowHeaders{background-color:#f7faff}revo-grid[theme=compact] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=compact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=compact] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=compact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=compact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=compact] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=compact] revogr-data .revo-draggable>.revo-drag-icon{background-color:#d4d4d4}revo-grid[theme=compact] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:black}revo-grid[theme=compact] revo-dropdown .rv-dr-root{padding:0px 9px}revo-grid{display:block;height:100%;font-family:Helvetica, Arial, Sans-Serif, serif;font-size:14px;position:relative;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column;width:100%;height:100%}revo-grid .footer-wrapper,revo-grid .header-wrapper{width:100%}revo-grid .footer-wrapper revogr-data,revo-grid .header-wrapper revogr-data{z-index:3}revo-grid revo-dropdown{width:100%}revo-grid revo-dropdown .rv-dr-root{max-height:100%}revo-grid revo-dropdown.shrink label{opacity:0}revo-grid .viewports{max-height:100%;display:flex;flex-direction:row;align-items:flex-start;max-width:100%}revo-grid .main-viewport{flex-grow:1;height:0;display:flex;flex-direction:row}revo-grid .draggable{position:fixed;height:30px;line-height:30px;background:#fff;border-radius:3px;display:block;z-index:100;margin-top:5px;margin-right:-20px;box-shadow:0 4px 20px 0 rgba(0, 0, 0, 0.15);padding-left:20px;padding-right:5px}revo-grid .draggable.hidden{display:none}revo-grid .draggable .revo-alt-icon{background-color:black;position:absolute;left:5px;top:10px}revo-grid .draggable-wrapper.hidden{display:none}revo-grid .drag-position{position:absolute;left:0;right:0;height:1px;z-index:2;background:red}revo-grid .clipboard{position:absolute;left:0;top:0}revo-grid revogr-scroll-virtual{position:relative}revo-grid revogr-scroll-virtual.vertical,revo-grid revogr-scroll-virtual.horizontal{z-index:3}";
|
|
24971
|
+
/**
|
|
24972
|
+
* Gets the timestamp of the number of milliseconds that have elapsed since
|
|
24973
|
+
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
|
24974
|
+
*
|
|
24975
|
+
* @static
|
|
24976
|
+
* @memberOf _
|
|
24977
|
+
* @since 2.4.0
|
|
24978
|
+
* @category Date
|
|
24979
|
+
* @returns {number} Returns the timestamp.
|
|
24980
|
+
* @example
|
|
24981
|
+
*
|
|
24982
|
+
* _.defer(function(stamp) {
|
|
24983
|
+
* console.log(_.now() - stamp);
|
|
24984
|
+
* }, _.now());
|
|
24985
|
+
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
24986
|
+
*/
|
|
24987
|
+
var now = function() {
|
|
24988
|
+
return _root.Date.now();
|
|
24989
|
+
};
|
|
24990
|
+
|
|
24991
|
+
var now_1 = now;
|
|
24992
|
+
|
|
24993
|
+
/** Error message constants. */
|
|
24994
|
+
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
|
24995
|
+
|
|
24996
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
24997
|
+
var nativeMax$1 = Math.max,
|
|
24998
|
+
nativeMin = Math.min;
|
|
24999
|
+
|
|
25000
|
+
/**
|
|
25001
|
+
* Creates a debounced function that delays invoking `func` until after `wait`
|
|
25002
|
+
* milliseconds have elapsed since the last time the debounced function was
|
|
25003
|
+
* invoked. The debounced function comes with a `cancel` method to cancel
|
|
25004
|
+
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
|
25005
|
+
* Provide `options` to indicate whether `func` should be invoked on the
|
|
25006
|
+
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
|
25007
|
+
* with the last arguments provided to the debounced function. Subsequent
|
|
25008
|
+
* calls to the debounced function return the result of the last `func`
|
|
25009
|
+
* invocation.
|
|
25010
|
+
*
|
|
25011
|
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
25012
|
+
* invoked on the trailing edge of the timeout only if the debounced function
|
|
25013
|
+
* is invoked more than once during the `wait` timeout.
|
|
25014
|
+
*
|
|
25015
|
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
25016
|
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
25017
|
+
*
|
|
25018
|
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
25019
|
+
* for details over the differences between `_.debounce` and `_.throttle`.
|
|
25020
|
+
*
|
|
25021
|
+
* @static
|
|
25022
|
+
* @memberOf _
|
|
25023
|
+
* @since 0.1.0
|
|
25024
|
+
* @category Function
|
|
25025
|
+
* @param {Function} func The function to debounce.
|
|
25026
|
+
* @param {number} [wait=0] The number of milliseconds to delay.
|
|
25027
|
+
* @param {Object} [options={}] The options object.
|
|
25028
|
+
* @param {boolean} [options.leading=false]
|
|
25029
|
+
* Specify invoking on the leading edge of the timeout.
|
|
25030
|
+
* @param {number} [options.maxWait]
|
|
25031
|
+
* The maximum time `func` is allowed to be delayed before it's invoked.
|
|
25032
|
+
* @param {boolean} [options.trailing=true]
|
|
25033
|
+
* Specify invoking on the trailing edge of the timeout.
|
|
25034
|
+
* @returns {Function} Returns the new debounced function.
|
|
25035
|
+
* @example
|
|
25036
|
+
*
|
|
25037
|
+
* // Avoid costly calculations while the window size is in flux.
|
|
25038
|
+
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
|
25039
|
+
*
|
|
25040
|
+
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
|
25041
|
+
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
|
25042
|
+
* 'leading': true,
|
|
25043
|
+
* 'trailing': false
|
|
25044
|
+
* }));
|
|
25045
|
+
*
|
|
25046
|
+
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
|
25047
|
+
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
|
25048
|
+
* var source = new EventSource('/stream');
|
|
25049
|
+
* jQuery(source).on('message', debounced);
|
|
25050
|
+
*
|
|
25051
|
+
* // Cancel the trailing debounced invocation.
|
|
25052
|
+
* jQuery(window).on('popstate', debounced.cancel);
|
|
25053
|
+
*/
|
|
25054
|
+
function debounce(func, wait, options) {
|
|
25055
|
+
var lastArgs,
|
|
25056
|
+
lastThis,
|
|
25057
|
+
maxWait,
|
|
25058
|
+
result,
|
|
25059
|
+
timerId,
|
|
25060
|
+
lastCallTime,
|
|
25061
|
+
lastInvokeTime = 0,
|
|
25062
|
+
leading = false,
|
|
25063
|
+
maxing = false,
|
|
25064
|
+
trailing = true;
|
|
25065
|
+
|
|
25066
|
+
if (typeof func != 'function') {
|
|
25067
|
+
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
25068
|
+
}
|
|
25069
|
+
wait = toNumber_1(wait) || 0;
|
|
25070
|
+
if (isObject_1(options)) {
|
|
25071
|
+
leading = !!options.leading;
|
|
25072
|
+
maxing = 'maxWait' in options;
|
|
25073
|
+
maxWait = maxing ? nativeMax$1(toNumber_1(options.maxWait) || 0, wait) : maxWait;
|
|
25074
|
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
25075
|
+
}
|
|
25076
|
+
|
|
25077
|
+
function invokeFunc(time) {
|
|
25078
|
+
var args = lastArgs,
|
|
25079
|
+
thisArg = lastThis;
|
|
25080
|
+
|
|
25081
|
+
lastArgs = lastThis = undefined;
|
|
25082
|
+
lastInvokeTime = time;
|
|
25083
|
+
result = func.apply(thisArg, args);
|
|
25084
|
+
return result;
|
|
25085
|
+
}
|
|
25086
|
+
|
|
25087
|
+
function leadingEdge(time) {
|
|
25088
|
+
// Reset any `maxWait` timer.
|
|
25089
|
+
lastInvokeTime = time;
|
|
25090
|
+
// Start the timer for the trailing edge.
|
|
25091
|
+
timerId = setTimeout(timerExpired, wait);
|
|
25092
|
+
// Invoke the leading edge.
|
|
25093
|
+
return leading ? invokeFunc(time) : result;
|
|
25094
|
+
}
|
|
25095
|
+
|
|
25096
|
+
function remainingWait(time) {
|
|
25097
|
+
var timeSinceLastCall = time - lastCallTime,
|
|
25098
|
+
timeSinceLastInvoke = time - lastInvokeTime,
|
|
25099
|
+
timeWaiting = wait - timeSinceLastCall;
|
|
25100
|
+
|
|
25101
|
+
return maxing
|
|
25102
|
+
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
|
|
25103
|
+
: timeWaiting;
|
|
25104
|
+
}
|
|
25105
|
+
|
|
25106
|
+
function shouldInvoke(time) {
|
|
25107
|
+
var timeSinceLastCall = time - lastCallTime,
|
|
25108
|
+
timeSinceLastInvoke = time - lastInvokeTime;
|
|
25109
|
+
|
|
25110
|
+
// Either this is the first call, activity has stopped and we're at the
|
|
25111
|
+
// trailing edge, the system time has gone backwards and we're treating
|
|
25112
|
+
// it as the trailing edge, or we've hit the `maxWait` limit.
|
|
25113
|
+
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
|
25114
|
+
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
|
25115
|
+
}
|
|
25116
|
+
|
|
25117
|
+
function timerExpired() {
|
|
25118
|
+
var time = now_1();
|
|
25119
|
+
if (shouldInvoke(time)) {
|
|
25120
|
+
return trailingEdge(time);
|
|
25121
|
+
}
|
|
25122
|
+
// Restart the timer.
|
|
25123
|
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
25124
|
+
}
|
|
25125
|
+
|
|
25126
|
+
function trailingEdge(time) {
|
|
25127
|
+
timerId = undefined;
|
|
25128
|
+
|
|
25129
|
+
// Only invoke if we have `lastArgs` which means `func` has been
|
|
25130
|
+
// debounced at least once.
|
|
25131
|
+
if (trailing && lastArgs) {
|
|
25132
|
+
return invokeFunc(time);
|
|
25133
|
+
}
|
|
25134
|
+
lastArgs = lastThis = undefined;
|
|
25135
|
+
return result;
|
|
25136
|
+
}
|
|
25137
|
+
|
|
25138
|
+
function cancel() {
|
|
25139
|
+
if (timerId !== undefined) {
|
|
25140
|
+
clearTimeout(timerId);
|
|
25141
|
+
}
|
|
25142
|
+
lastInvokeTime = 0;
|
|
25143
|
+
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|
25144
|
+
}
|
|
25145
|
+
|
|
25146
|
+
function flush() {
|
|
25147
|
+
return timerId === undefined ? result : trailingEdge(now_1());
|
|
25148
|
+
}
|
|
25149
|
+
|
|
25150
|
+
function debounced() {
|
|
25151
|
+
var time = now_1(),
|
|
25152
|
+
isInvoking = shouldInvoke(time);
|
|
25153
|
+
|
|
25154
|
+
lastArgs = arguments;
|
|
25155
|
+
lastThis = this;
|
|
25156
|
+
lastCallTime = time;
|
|
25157
|
+
|
|
25158
|
+
if (isInvoking) {
|
|
25159
|
+
if (timerId === undefined) {
|
|
25160
|
+
return leadingEdge(lastCallTime);
|
|
25161
|
+
}
|
|
25162
|
+
if (maxing) {
|
|
25163
|
+
// Handle invocations in a tight loop.
|
|
25164
|
+
clearTimeout(timerId);
|
|
25165
|
+
timerId = setTimeout(timerExpired, wait);
|
|
25166
|
+
return invokeFunc(lastCallTime);
|
|
25167
|
+
}
|
|
25168
|
+
}
|
|
25169
|
+
if (timerId === undefined) {
|
|
25170
|
+
timerId = setTimeout(timerExpired, wait);
|
|
25171
|
+
}
|
|
25172
|
+
return result;
|
|
25173
|
+
}
|
|
25174
|
+
debounced.cancel = cancel;
|
|
25175
|
+
debounced.flush = flush;
|
|
25176
|
+
return debounced;
|
|
25177
|
+
}
|
|
25178
|
+
|
|
25179
|
+
var debounce_1 = debounce;
|
|
25180
|
+
|
|
25181
|
+
class ColumnOrderHandler {
|
|
25182
|
+
constructor() {
|
|
25183
|
+
this.offset = 0;
|
|
25184
|
+
}
|
|
25185
|
+
renderAutoscroll(_, parent) {
|
|
25186
|
+
if (!parent) {
|
|
25187
|
+
return;
|
|
25188
|
+
}
|
|
25189
|
+
this.autoscrollEl = document.createElement('div');
|
|
25190
|
+
this.autoscrollEl.classList.add('drag-auto-scroll-y');
|
|
25191
|
+
parent.appendChild(this.autoscrollEl);
|
|
25192
|
+
}
|
|
25193
|
+
autoscroll(pos, dataContainerSize, direction = 'translateX') {
|
|
25194
|
+
if (!this.autoscrollEl) {
|
|
25195
|
+
return;
|
|
25196
|
+
}
|
|
25197
|
+
const helperOffset = 10;
|
|
25198
|
+
// calculate current y position inside of the grid active holder
|
|
25199
|
+
// 3 - size of element + border
|
|
25200
|
+
const maxScroll = Math.min(pos + helperOffset, dataContainerSize - 3);
|
|
25201
|
+
this.autoscrollEl.style.transform = `${direction}(${maxScroll}px)`;
|
|
25202
|
+
this.autoscrollEl.scrollIntoView({
|
|
25203
|
+
block: 'nearest',
|
|
25204
|
+
inline: 'nearest',
|
|
25205
|
+
});
|
|
25206
|
+
}
|
|
25207
|
+
start(e, { el, gridRect, elScroll }, dir = 'left') {
|
|
25208
|
+
const scrollContainerRect = elScroll.getBoundingClientRect();
|
|
25209
|
+
if (scrollContainerRect) {
|
|
25210
|
+
this.offset = scrollContainerRect[dir] - gridRect[dir];
|
|
25211
|
+
}
|
|
25212
|
+
this.renderAutoscroll(e, el);
|
|
25213
|
+
}
|
|
25214
|
+
stop() {
|
|
25215
|
+
var _a;
|
|
25216
|
+
if (this.element) {
|
|
25217
|
+
this.element.hidden = true;
|
|
25218
|
+
}
|
|
25219
|
+
(_a = this.autoscrollEl) === null || _a === void 0 ? void 0 : _a.remove();
|
|
25220
|
+
this.autoscrollEl = undefined;
|
|
25221
|
+
this.offset = 0;
|
|
25222
|
+
}
|
|
25223
|
+
showHandler(pos, size, direction = 'translateX') {
|
|
25224
|
+
if (!this.element) {
|
|
25225
|
+
return;
|
|
25226
|
+
}
|
|
25227
|
+
// do not allow overcross top of the scrollable area, header excluded
|
|
25228
|
+
if (this.offset) {
|
|
25229
|
+
pos = Math.max(pos, this.offset);
|
|
25230
|
+
}
|
|
25231
|
+
// can not be bigger then grid end
|
|
25232
|
+
pos = Math.min(pos, size);
|
|
25233
|
+
this.element.style.transform = `${direction}(${pos}px)`;
|
|
25234
|
+
this.element.hidden = false;
|
|
25235
|
+
}
|
|
25236
|
+
render() {
|
|
25237
|
+
return h("div", { class: "drag-position-y", hidden: true, ref: (el) => (this.element = el) });
|
|
25238
|
+
}
|
|
25239
|
+
}
|
|
25240
|
+
|
|
25241
|
+
/**
|
|
25242
|
+
* Dispatch custom event to element
|
|
25243
|
+
*/
|
|
25244
|
+
function dispatch(target, eventName, detail) {
|
|
25245
|
+
const event = new CustomEvent(eventName, {
|
|
25246
|
+
detail,
|
|
25247
|
+
cancelable: true,
|
|
25248
|
+
bubbles: true,
|
|
25249
|
+
});
|
|
25250
|
+
target === null || target === void 0 ? void 0 : target.dispatchEvent(event);
|
|
25251
|
+
return event;
|
|
25252
|
+
}
|
|
25253
|
+
|
|
25254
|
+
/**
|
|
25255
|
+
* Plugin for column manual move
|
|
25256
|
+
*/
|
|
25257
|
+
const COLUMN_CLICK = 'column-click';
|
|
25258
|
+
const MOVE = 'column-mouse-move';
|
|
25259
|
+
const DRAG_END = 'column-drag-end';
|
|
25260
|
+
const BEFORE_DRAG_END = 'before-column-drag-end';
|
|
25261
|
+
// use this event subscription to drop D&D for particular columns
|
|
25262
|
+
const DRAG_START = 'column-drag-start';
|
|
25263
|
+
class ColumnPlugin extends BasePlugin {
|
|
25264
|
+
constructor(revogrid, providers) {
|
|
25265
|
+
super(revogrid);
|
|
25266
|
+
this.revogrid = revogrid;
|
|
25267
|
+
this.providers = providers;
|
|
25268
|
+
this.moveFunc = debounce_1((e) => this.doMove(e), 5);
|
|
25269
|
+
this.staticDragData = null;
|
|
25270
|
+
this.dragData = null;
|
|
25271
|
+
this.localSubscriptions = {};
|
|
25272
|
+
this.orderUi = new ColumnOrderHandler();
|
|
25273
|
+
revogrid.registerVNode([this.orderUi.render()]);
|
|
25274
|
+
/** Register events */
|
|
25275
|
+
this.localSubscriptions['mouseleave'] = {
|
|
25276
|
+
target: document,
|
|
25277
|
+
callback: (e) => this.onMouseOut(e),
|
|
25278
|
+
};
|
|
25279
|
+
this.localSubscriptions['mouseup'] = {
|
|
25280
|
+
target: document,
|
|
25281
|
+
callback: (e) => this.onMouseUp(e),
|
|
25282
|
+
};
|
|
25283
|
+
this.localSubscriptions['mousemove'] = {
|
|
25284
|
+
target: document,
|
|
25285
|
+
callback: (e) => this.move(e),
|
|
25286
|
+
};
|
|
25287
|
+
this.addEventListener(COLUMN_CLICK, ({ detail }) => this.dragStart(detail));
|
|
25288
|
+
}
|
|
25289
|
+
dragStart({ event, data }) {
|
|
25290
|
+
const { defaultPrevented } = dispatch(this.revogrid, DRAG_START, data);
|
|
25291
|
+
// check if allowed to drag particulat column
|
|
25292
|
+
if (defaultPrevented) {
|
|
25293
|
+
return;
|
|
25294
|
+
}
|
|
25295
|
+
this.clearOrder();
|
|
25296
|
+
const { mouseleave, mouseup, mousemove } = this.localSubscriptions;
|
|
25297
|
+
mouseleave.target.addEventListener('mouseleave', mouseleave.callback);
|
|
25298
|
+
mouseup.target.addEventListener('mouseup', mouseup.callback);
|
|
25299
|
+
const dataEl = event.target.closest('revogr-header');
|
|
25300
|
+
const scrollEl = event.target.closest('revogr-viewport-scroll');
|
|
25301
|
+
if (!dataEl || !scrollEl) {
|
|
25302
|
+
return;
|
|
25303
|
+
}
|
|
25304
|
+
this.staticDragData = {
|
|
25305
|
+
startPos: event.x,
|
|
25306
|
+
data,
|
|
25307
|
+
dataEl,
|
|
25308
|
+
scrollEl,
|
|
25309
|
+
gridEl: this.revogrid,
|
|
25310
|
+
};
|
|
25311
|
+
this.dragData = this.getData(this.staticDragData);
|
|
25312
|
+
mousemove.target.addEventListener('mousemove', mousemove.callback);
|
|
25313
|
+
this.orderUi.start(event, this.dragData);
|
|
25314
|
+
}
|
|
25315
|
+
doMove(e) {
|
|
25316
|
+
if (!this.staticDragData) {
|
|
25317
|
+
return;
|
|
25318
|
+
}
|
|
25319
|
+
const dragData = (this.dragData = this.getData(this.staticDragData));
|
|
25320
|
+
if (!dragData) {
|
|
25321
|
+
return;
|
|
25322
|
+
}
|
|
25323
|
+
const start = this.staticDragData.startPos;
|
|
25324
|
+
if (Math.abs(start - e.x) > 10) {
|
|
25325
|
+
const x = getLeftRelative(e.x, dragData);
|
|
25326
|
+
const rgCol = getItemByPosition(dragData.cols, x);
|
|
25327
|
+
this.orderUi.autoscroll(x, dragData.elRect.width);
|
|
25328
|
+
this.orderUi.showHandler(rgCol.end + dragData.xOffset, dragData.gridRect.width);
|
|
25329
|
+
}
|
|
25330
|
+
}
|
|
25331
|
+
move(e) {
|
|
25332
|
+
dispatch(this.revogrid, MOVE, Object.assign({}, e));
|
|
25333
|
+
// then do move
|
|
25334
|
+
this.moveFunc(e);
|
|
25335
|
+
}
|
|
25336
|
+
onMouseOut(_) {
|
|
25337
|
+
this.clearOrder();
|
|
25338
|
+
}
|
|
25339
|
+
onMouseUp(e) {
|
|
25340
|
+
// apply new positions
|
|
25341
|
+
if (this.dragData) {
|
|
25342
|
+
const newItem = getItemByPosition(this.dragData.cols, getLeftRelative(e.x, this.dragData));
|
|
25343
|
+
const startItem = getItemByPosition(this.dragData.cols, getLeftRelative(this.staticDragData.startPos, this.dragData));
|
|
25344
|
+
// prevent position change if needed
|
|
25345
|
+
const { defaultPrevented: stopDrag } = dispatch(this.revogrid, BEFORE_DRAG_END, Object.assign(Object.assign({}, this.staticDragData), { startPosition: startItem, newPosition: newItem }));
|
|
25346
|
+
if (!stopDrag) {
|
|
25347
|
+
const store = this.providers.column.stores[this.dragData.type].store;
|
|
25348
|
+
const items = [...store.get('items')];
|
|
25349
|
+
const toMove = items.splice(startItem.itemIndex, 1);
|
|
25350
|
+
items.splice(newItem.itemIndex, 0, ...toMove);
|
|
25351
|
+
store.set('items', items);
|
|
25352
|
+
}
|
|
25353
|
+
dispatch(this.revogrid, DRAG_END, this.dragData);
|
|
25354
|
+
}
|
|
25355
|
+
this.clearOrder();
|
|
25356
|
+
}
|
|
25357
|
+
clearLocalSubscriptions() {
|
|
25358
|
+
each(this.localSubscriptions, ({ target, callback }, key) => target.removeEventListener(key, callback));
|
|
25359
|
+
}
|
|
25360
|
+
clearOrder() {
|
|
25361
|
+
this.clearLocalSubscriptions();
|
|
25362
|
+
this.orderUi.stop();
|
|
25363
|
+
}
|
|
25364
|
+
/**
|
|
25365
|
+
* Clearing subscription
|
|
25366
|
+
*/
|
|
25367
|
+
clearSubscriptions() {
|
|
25368
|
+
super.clearSubscriptions();
|
|
25369
|
+
this.clearLocalSubscriptions();
|
|
25370
|
+
}
|
|
25371
|
+
getData({ gridEl, dataEl, scrollEl, data, }) {
|
|
25372
|
+
const gridRect = gridEl.getBoundingClientRect();
|
|
25373
|
+
const elRect = dataEl.getBoundingClientRect();
|
|
25374
|
+
return {
|
|
25375
|
+
el: dataEl,
|
|
25376
|
+
elScroll: scrollEl,
|
|
25377
|
+
elRect,
|
|
25378
|
+
gridRect,
|
|
25379
|
+
data,
|
|
25380
|
+
type: data.pin || 'rgCol',
|
|
25381
|
+
xOffset: elRect.left - gridRect.left,
|
|
25382
|
+
rows: this.getDimension('rgRow'),
|
|
25383
|
+
cols: this.getDimension('rgCol'),
|
|
25384
|
+
};
|
|
25385
|
+
}
|
|
25386
|
+
getDimension(type) {
|
|
25387
|
+
return this.providers.dimension.stores[type].getCurrentState();
|
|
25388
|
+
}
|
|
25389
|
+
}
|
|
25390
|
+
function getLeftRelative(absoluteX, { xOffset, gridRect }) {
|
|
25391
|
+
return absoluteX - gridRect.left - xOffset;
|
|
25392
|
+
}
|
|
25393
|
+
|
|
25394
|
+
const revoGridStyleCss = ".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}revo-grid[theme=default]{font-size:12px}revo-grid[theme=default] revogr-header{text-align:center;line-height:30px;background-color:#f8f9fa}revo-grid[theme=default] revogr-header .group-rgRow{box-shadow:none}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid[theme=default] revogr-header .group-rgRow{text-transform:uppercase;font-size:12px;color:#61656a}revo-grid[theme=default] revogr-header .header-rgRow{height:30px;box-shadow:0 -1px 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-header .rgHeaderCell{box-shadow:-1px 0 0 0 #c0c0c0, -1px 0 0 0 #c0c0c0 inset, 0 -1px 0 0 #c0c0c0, 0 -1px 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] .rowHeaders{background-color:#f8f9fa}revo-grid[theme=default] .rowHeaders revogr-data .rgCell{color:#61656a;box-shadow:0 -1px 0 0 #c0c0c0 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] .rowHeaders revogr-header{box-shadow:0 -1px 0 0 #c0c0c0 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #c0c0c0 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-viewport-scroll.colPinEnd,revo-grid[theme=default] revogr-viewport-scroll.colPinEnd revogr-header{box-shadow:1px 0 0 #c0c0c0 inset}revo-grid[theme=default] .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset, 0 -1px 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data{text-align:center}revo-grid[theme=default] revogr-data .rgRow{line-height:27px;box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] revogr-data .rgCell{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgCell.disabled{background-color:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=material]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}revo-grid[theme=material] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=material] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=material] revogr-header .header-rgRow{height:50px}revo-grid[theme=material] revogr-data{text-align:left}revo-grid[theme=material] revogr-data .rgRow{line-height:42px}revo-grid[theme=material] revogr-data .rgCell{padding:0 15px}revo-grid[theme=material] .viewports{width:100%}revo-grid[theme=material] .rowHeaders{background-color:#f7faff}revo-grid[theme=material] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=material] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=material] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=material] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=material] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=material] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=material] revogr-data .revo-draggable>.revo-drag-icon{background-color:#d4d4d4}revo-grid[theme=material] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:black}revo-grid[theme=darkMaterial]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#d8d8d8}revo-grid[theme=darkMaterial] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkMaterial] revogr-header .header-rgRow{height:50px}revo-grid[theme=darkMaterial] revogr-data{text-align:left}revo-grid[theme=darkMaterial] revogr-data .rgRow{line-height:42px}revo-grid[theme=darkMaterial] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkMaterial] .viewports{width:100%}revo-grid[theme=darkMaterial] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkMaterial] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkMaterial] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkMaterial] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkMaterial] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] revogr-data .revo-draggable>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.5)}revo-grid[theme=darkMaterial] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.7)}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=darkCompact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#d8d8d8}revo-grid[theme=darkCompact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkCompact] revogr-header .header-rgRow{height:45px}revo-grid[theme=darkCompact] revogr-data{text-align:left}revo-grid[theme=darkCompact] revogr-data .rgRow{line-height:32px}revo-grid[theme=darkCompact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkCompact] .viewports{width:100%}revo-grid[theme=darkCompact] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkCompact] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkCompact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkCompact] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkCompact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] revogr-data .revo-draggable>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.5)}revo-grid[theme=darkCompact] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.7)}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=compact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}revo-grid[theme=compact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=compact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=compact] revogr-header .header-rgRow{height:45px}revo-grid[theme=compact] revogr-data{text-align:left}revo-grid[theme=compact] revogr-data .rgRow{line-height:32px}revo-grid[theme=compact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=compact] .viewports{width:100%}revo-grid[theme=compact] .rowHeaders{background-color:#f7faff}revo-grid[theme=compact] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=compact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=compact] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=compact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=compact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=compact] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=compact] revogr-data .revo-draggable>.revo-drag-icon{background-color:#d4d4d4}revo-grid[theme=compact] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:black}revo-grid[theme=compact] revo-dropdown .rv-dr-root{padding:0px 9px}revo-grid{display:block;height:100%;font-family:Helvetica, Arial, Sans-Serif, serif;font-size:14px;position:relative;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column;width:100%;height:100%}revo-grid .footer-wrapper,revo-grid .header-wrapper{width:100%}revo-grid .footer-wrapper revogr-data,revo-grid .header-wrapper revogr-data{z-index:3}revo-grid revo-dropdown{width:100%}revo-grid revo-dropdown .rv-dr-root{max-height:100%}revo-grid revo-dropdown.shrink label{opacity:0}revo-grid .viewports{max-height:100%;display:flex;flex-direction:row;align-items:flex-start;max-width:100%}revo-grid .main-viewport{flex-grow:1;height:0;display:flex;flex-direction:row}revo-grid .draggable{position:fixed;height:30px;line-height:30px;background:#fff;border-radius:3px;display:block;z-index:100;margin-top:5px;margin-right:-20px;box-shadow:0 4px 20px 0 rgba(0, 0, 0, 0.15);padding-left:20px;padding-right:5px}revo-grid .draggable.hidden{display:none}revo-grid .draggable .revo-alt-icon{background-color:black;position:absolute;left:5px;top:10px}revo-grid .draggable-wrapper.hidden{display:none}revo-grid .drag-position{position:absolute;left:0;right:0;height:1px;z-index:2;background:gray}revo-grid .drag-position-y{position:absolute;top:0;left:0;bottom:0;width:1px;z-index:2;background:gray}revo-grid .drag-auto-scroll-y{pointer-events:none;position:absolute;left:0;top:0;height:50px;width:1px}revo-grid .clipboard{position:absolute;left:0;top:0}revo-grid revogr-scroll-virtual{position:relative}revo-grid revogr-scroll-virtual.vertical,revo-grid revogr-scroll-virtual.horizontal{z-index:3}";
|
|
24972
25395
|
|
|
24973
25396
|
const RevoGridComponent = class extends HTMLElement {
|
|
24974
25397
|
constructor() {
|
|
@@ -25066,6 +25489,12 @@ const RevoGridComponent = class extends HTMLElement {
|
|
|
25066
25489
|
* Can be filter collection
|
|
25067
25490
|
*/
|
|
25068
25491
|
this.filter = false;
|
|
25492
|
+
/**
|
|
25493
|
+
* Enables column move plugin
|
|
25494
|
+
* Can be boolean
|
|
25495
|
+
* Can be filter collection
|
|
25496
|
+
*/
|
|
25497
|
+
this.canMoveColumns = false;
|
|
25069
25498
|
/**
|
|
25070
25499
|
* Trimmed rows
|
|
25071
25500
|
* Functionality which allows to hide rows from main data set
|
|
@@ -25433,6 +25862,9 @@ const RevoGridComponent = class extends HTMLElement {
|
|
|
25433
25862
|
grPlugin.setGrouping(newVal || {});
|
|
25434
25863
|
}
|
|
25435
25864
|
applyStretch(isStretch) {
|
|
25865
|
+
if (isStretch === 'false') {
|
|
25866
|
+
isStretch = false;
|
|
25867
|
+
}
|
|
25436
25868
|
let stretch = this.internalPlugins.filter(p => isStretchPlugin(p))[0];
|
|
25437
25869
|
if (isStretch) {
|
|
25438
25870
|
if (!stretch) {
|
|
@@ -25456,6 +25888,13 @@ const RevoGridComponent = class extends HTMLElement {
|
|
|
25456
25888
|
this.columnProvider = new ColumnDataProvider();
|
|
25457
25889
|
this.dataProvider = new DataProvider(this.dimensionProvider);
|
|
25458
25890
|
this.uuid = `${new Date().getTime()}-rvgrid`;
|
|
25891
|
+
const pluginData = {
|
|
25892
|
+
data: this.dataProvider,
|
|
25893
|
+
column: this.columnProvider,
|
|
25894
|
+
dimension: this.dimensionProvider,
|
|
25895
|
+
viewport: this.viewportProvider,
|
|
25896
|
+
selection: this.selectionStoreConnector,
|
|
25897
|
+
};
|
|
25459
25898
|
if (this.autoSizeColumn) {
|
|
25460
25899
|
this.internalPlugins.push(new AutoSizeColumn(this.element, {
|
|
25461
25900
|
dataProvider: this.dataProvider,
|
|
@@ -25472,9 +25911,12 @@ const RevoGridComponent = class extends HTMLElement {
|
|
|
25472
25911
|
this.internalPlugins.push(new SortingPlugin(this.element));
|
|
25473
25912
|
if (this.plugins) {
|
|
25474
25913
|
this.plugins.forEach(p => {
|
|
25475
|
-
this.internalPlugins.push(new p(this.element));
|
|
25914
|
+
this.internalPlugins.push(new p(this.element, pluginData));
|
|
25476
25915
|
});
|
|
25477
25916
|
}
|
|
25917
|
+
if (this.canMoveColumns) {
|
|
25918
|
+
this.internalPlugins.push(new ColumnPlugin(this.element, pluginData));
|
|
25919
|
+
}
|
|
25478
25920
|
this.internalPlugins.push(new GroupingRowPlugin(this.element, {
|
|
25479
25921
|
dataProvider: this.dataProvider,
|
|
25480
25922
|
columnProvider: this.columnProvider,
|
|
@@ -26156,7 +26598,7 @@ function values(object) {
|
|
|
26156
26598
|
var values_1 = values;
|
|
26157
26599
|
|
|
26158
26600
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
26159
|
-
var nativeMax
|
|
26601
|
+
var nativeMax = Math.max;
|
|
26160
26602
|
|
|
26161
26603
|
/**
|
|
26162
26604
|
* Checks if `value` is in `collection`. If `collection` is a string, it's
|
|
@@ -26194,7 +26636,7 @@ function includes(collection, value, fromIndex, guard) {
|
|
|
26194
26636
|
|
|
26195
26637
|
var length = collection.length;
|
|
26196
26638
|
if (fromIndex < 0) {
|
|
26197
|
-
fromIndex = nativeMax
|
|
26639
|
+
fromIndex = nativeMax(length + fromIndex, 0);
|
|
26198
26640
|
}
|
|
26199
26641
|
return isString_1(collection)
|
|
26200
26642
|
? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
|
|
@@ -26344,216 +26786,6 @@ const RevoButton = (props, children) => {
|
|
|
26344
26786
|
}
|
|
26345
26787
|
})();
|
|
26346
26788
|
|
|
26347
|
-
/**
|
|
26348
|
-
* Gets the timestamp of the number of milliseconds that have elapsed since
|
|
26349
|
-
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
|
26350
|
-
*
|
|
26351
|
-
* @static
|
|
26352
|
-
* @memberOf _
|
|
26353
|
-
* @since 2.4.0
|
|
26354
|
-
* @category Date
|
|
26355
|
-
* @returns {number} Returns the timestamp.
|
|
26356
|
-
* @example
|
|
26357
|
-
*
|
|
26358
|
-
* _.defer(function(stamp) {
|
|
26359
|
-
* console.log(_.now() - stamp);
|
|
26360
|
-
* }, _.now());
|
|
26361
|
-
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
26362
|
-
*/
|
|
26363
|
-
var now = function() {
|
|
26364
|
-
return _root.Date.now();
|
|
26365
|
-
};
|
|
26366
|
-
|
|
26367
|
-
var now_1 = now;
|
|
26368
|
-
|
|
26369
|
-
/** Error message constants. */
|
|
26370
|
-
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
|
26371
|
-
|
|
26372
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
26373
|
-
var nativeMax = Math.max,
|
|
26374
|
-
nativeMin = Math.min;
|
|
26375
|
-
|
|
26376
|
-
/**
|
|
26377
|
-
* Creates a debounced function that delays invoking `func` until after `wait`
|
|
26378
|
-
* milliseconds have elapsed since the last time the debounced function was
|
|
26379
|
-
* invoked. The debounced function comes with a `cancel` method to cancel
|
|
26380
|
-
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
|
26381
|
-
* Provide `options` to indicate whether `func` should be invoked on the
|
|
26382
|
-
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
|
26383
|
-
* with the last arguments provided to the debounced function. Subsequent
|
|
26384
|
-
* calls to the debounced function return the result of the last `func`
|
|
26385
|
-
* invocation.
|
|
26386
|
-
*
|
|
26387
|
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
26388
|
-
* invoked on the trailing edge of the timeout only if the debounced function
|
|
26389
|
-
* is invoked more than once during the `wait` timeout.
|
|
26390
|
-
*
|
|
26391
|
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
26392
|
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
26393
|
-
*
|
|
26394
|
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
26395
|
-
* for details over the differences between `_.debounce` and `_.throttle`.
|
|
26396
|
-
*
|
|
26397
|
-
* @static
|
|
26398
|
-
* @memberOf _
|
|
26399
|
-
* @since 0.1.0
|
|
26400
|
-
* @category Function
|
|
26401
|
-
* @param {Function} func The function to debounce.
|
|
26402
|
-
* @param {number} [wait=0] The number of milliseconds to delay.
|
|
26403
|
-
* @param {Object} [options={}] The options object.
|
|
26404
|
-
* @param {boolean} [options.leading=false]
|
|
26405
|
-
* Specify invoking on the leading edge of the timeout.
|
|
26406
|
-
* @param {number} [options.maxWait]
|
|
26407
|
-
* The maximum time `func` is allowed to be delayed before it's invoked.
|
|
26408
|
-
* @param {boolean} [options.trailing=true]
|
|
26409
|
-
* Specify invoking on the trailing edge of the timeout.
|
|
26410
|
-
* @returns {Function} Returns the new debounced function.
|
|
26411
|
-
* @example
|
|
26412
|
-
*
|
|
26413
|
-
* // Avoid costly calculations while the window size is in flux.
|
|
26414
|
-
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
|
26415
|
-
*
|
|
26416
|
-
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
|
26417
|
-
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
|
26418
|
-
* 'leading': true,
|
|
26419
|
-
* 'trailing': false
|
|
26420
|
-
* }));
|
|
26421
|
-
*
|
|
26422
|
-
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
|
26423
|
-
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
|
26424
|
-
* var source = new EventSource('/stream');
|
|
26425
|
-
* jQuery(source).on('message', debounced);
|
|
26426
|
-
*
|
|
26427
|
-
* // Cancel the trailing debounced invocation.
|
|
26428
|
-
* jQuery(window).on('popstate', debounced.cancel);
|
|
26429
|
-
*/
|
|
26430
|
-
function debounce(func, wait, options) {
|
|
26431
|
-
var lastArgs,
|
|
26432
|
-
lastThis,
|
|
26433
|
-
maxWait,
|
|
26434
|
-
result,
|
|
26435
|
-
timerId,
|
|
26436
|
-
lastCallTime,
|
|
26437
|
-
lastInvokeTime = 0,
|
|
26438
|
-
leading = false,
|
|
26439
|
-
maxing = false,
|
|
26440
|
-
trailing = true;
|
|
26441
|
-
|
|
26442
|
-
if (typeof func != 'function') {
|
|
26443
|
-
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
26444
|
-
}
|
|
26445
|
-
wait = toNumber_1(wait) || 0;
|
|
26446
|
-
if (isObject_1(options)) {
|
|
26447
|
-
leading = !!options.leading;
|
|
26448
|
-
maxing = 'maxWait' in options;
|
|
26449
|
-
maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait;
|
|
26450
|
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
26451
|
-
}
|
|
26452
|
-
|
|
26453
|
-
function invokeFunc(time) {
|
|
26454
|
-
var args = lastArgs,
|
|
26455
|
-
thisArg = lastThis;
|
|
26456
|
-
|
|
26457
|
-
lastArgs = lastThis = undefined;
|
|
26458
|
-
lastInvokeTime = time;
|
|
26459
|
-
result = func.apply(thisArg, args);
|
|
26460
|
-
return result;
|
|
26461
|
-
}
|
|
26462
|
-
|
|
26463
|
-
function leadingEdge(time) {
|
|
26464
|
-
// Reset any `maxWait` timer.
|
|
26465
|
-
lastInvokeTime = time;
|
|
26466
|
-
// Start the timer for the trailing edge.
|
|
26467
|
-
timerId = setTimeout(timerExpired, wait);
|
|
26468
|
-
// Invoke the leading edge.
|
|
26469
|
-
return leading ? invokeFunc(time) : result;
|
|
26470
|
-
}
|
|
26471
|
-
|
|
26472
|
-
function remainingWait(time) {
|
|
26473
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
26474
|
-
timeSinceLastInvoke = time - lastInvokeTime,
|
|
26475
|
-
timeWaiting = wait - timeSinceLastCall;
|
|
26476
|
-
|
|
26477
|
-
return maxing
|
|
26478
|
-
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
|
|
26479
|
-
: timeWaiting;
|
|
26480
|
-
}
|
|
26481
|
-
|
|
26482
|
-
function shouldInvoke(time) {
|
|
26483
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
26484
|
-
timeSinceLastInvoke = time - lastInvokeTime;
|
|
26485
|
-
|
|
26486
|
-
// Either this is the first call, activity has stopped and we're at the
|
|
26487
|
-
// trailing edge, the system time has gone backwards and we're treating
|
|
26488
|
-
// it as the trailing edge, or we've hit the `maxWait` limit.
|
|
26489
|
-
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
|
26490
|
-
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
|
26491
|
-
}
|
|
26492
|
-
|
|
26493
|
-
function timerExpired() {
|
|
26494
|
-
var time = now_1();
|
|
26495
|
-
if (shouldInvoke(time)) {
|
|
26496
|
-
return trailingEdge(time);
|
|
26497
|
-
}
|
|
26498
|
-
// Restart the timer.
|
|
26499
|
-
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
26500
|
-
}
|
|
26501
|
-
|
|
26502
|
-
function trailingEdge(time) {
|
|
26503
|
-
timerId = undefined;
|
|
26504
|
-
|
|
26505
|
-
// Only invoke if we have `lastArgs` which means `func` has been
|
|
26506
|
-
// debounced at least once.
|
|
26507
|
-
if (trailing && lastArgs) {
|
|
26508
|
-
return invokeFunc(time);
|
|
26509
|
-
}
|
|
26510
|
-
lastArgs = lastThis = undefined;
|
|
26511
|
-
return result;
|
|
26512
|
-
}
|
|
26513
|
-
|
|
26514
|
-
function cancel() {
|
|
26515
|
-
if (timerId !== undefined) {
|
|
26516
|
-
clearTimeout(timerId);
|
|
26517
|
-
}
|
|
26518
|
-
lastInvokeTime = 0;
|
|
26519
|
-
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|
26520
|
-
}
|
|
26521
|
-
|
|
26522
|
-
function flush() {
|
|
26523
|
-
return timerId === undefined ? result : trailingEdge(now_1());
|
|
26524
|
-
}
|
|
26525
|
-
|
|
26526
|
-
function debounced() {
|
|
26527
|
-
var time = now_1(),
|
|
26528
|
-
isInvoking = shouldInvoke(time);
|
|
26529
|
-
|
|
26530
|
-
lastArgs = arguments;
|
|
26531
|
-
lastThis = this;
|
|
26532
|
-
lastCallTime = time;
|
|
26533
|
-
|
|
26534
|
-
if (isInvoking) {
|
|
26535
|
-
if (timerId === undefined) {
|
|
26536
|
-
return leadingEdge(lastCallTime);
|
|
26537
|
-
}
|
|
26538
|
-
if (maxing) {
|
|
26539
|
-
// Handle invocations in a tight loop.
|
|
26540
|
-
clearTimeout(timerId);
|
|
26541
|
-
timerId = setTimeout(timerExpired, wait);
|
|
26542
|
-
return invokeFunc(lastCallTime);
|
|
26543
|
-
}
|
|
26544
|
-
}
|
|
26545
|
-
if (timerId === undefined) {
|
|
26546
|
-
timerId = setTimeout(timerExpired, wait);
|
|
26547
|
-
}
|
|
26548
|
-
return result;
|
|
26549
|
-
}
|
|
26550
|
-
debounced.cancel = cancel;
|
|
26551
|
-
debounced.flush = flush;
|
|
26552
|
-
return debounced;
|
|
26553
|
-
}
|
|
26554
|
-
|
|
26555
|
-
var debounce_1 = debounce;
|
|
26556
|
-
|
|
26557
26789
|
const filterStyleCss = ".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-filter-panel{position:absolute;display:block;top:0;left:0;z-index:100;opacity:1;transform:none;background-color:#fff;transform-origin:62px 0px;box-shadow:0 5px 18px -2px rgba(0, 0, 0, 0.2);padding:10px;border-radius:4px;min-width:220px;text-align:left}revogr-filter-panel .filter-holder>div{display:flex;flex-direction:column}revogr-filter-panel label{color:gray;font-size:13px;font-weight:600;display:block;padding:8px 0}revogr-filter-panel select{width:100%}revogr-filter-panel input[type=text]{border:0;min-height:34px;margin:5px 0;background:#f3f3f3;border-radius:5px;padding:0 10px;box-sizing:border-box;width:100%}revogr-filter-panel button{margin-top:10px;margin-right:5px}revogr-filter-panel .filter-actions{text-align:right;margin-right:-5px}.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;font-weight:600;color:#444;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 #f1f1f1;box-shadow:transparent;border-radius:0.5em;appearance:none;background-color:#fff;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\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);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:#c5c5c5}.select-css:focus{border-color:#f1f1f1;box-shadow:0 0 1px 3px rgba(59, 153, 252, 0.7);box-shadow:0 0 0 3px -moz-mac-focusring;color:#222;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:#f1f1f1}.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:22px;color:gray;font-size:18px}.multi-filter-list .trash-button .trash-img{width:1em}.add-filter-divider{display:block;margin:0 -10px 10px -10px;border-bottom:1px solid #d9d9d9;height:10px;box-shadow:0 4px 5px rgba(0, 0, 0, 0.05)}.select-input{display:flex;justify-content:space-between;align-items:center}";
|
|
26558
26790
|
|
|
26559
26791
|
const defaultType = 'none';
|
|
@@ -26578,6 +26810,7 @@ const FilterPanel = class extends HTMLElement {
|
|
|
26578
26810
|
this.filterTypes = {};
|
|
26579
26811
|
this.filterNames = {};
|
|
26580
26812
|
this.filterEntities = {};
|
|
26813
|
+
this.disableDynamicFiltering = false;
|
|
26581
26814
|
this.debouncedApplyFilter = debounce_1(() => {
|
|
26582
26815
|
this.filterChange.emit(this.filterItems);
|
|
26583
26816
|
}, 400);
|
|
@@ -26655,7 +26888,8 @@ const FilterPanel = class extends HTMLElement {
|
|
|
26655
26888
|
top: `${this.changes.y}px`,
|
|
26656
26889
|
};
|
|
26657
26890
|
const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);
|
|
26658
|
-
return (h(Host, { style: style }, h("label", null, capts.title), h("div", { class: "filter-holder" }, this.getFilterItemsList()), h("div", { class: "add-filter" }, h("select", { id: "add-filter", class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))), h("div", { class: "filter-actions" },
|
|
26891
|
+
return (h(Host, { style: style }, h("label", null, capts.title), h("div", { class: "filter-holder" }, this.getFilterItemsList()), h("div", { class: "add-filter" }, h("select", { id: "add-filter", class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))), h("div", { class: "filter-actions" }, this.disableDynamicFiltering &&
|
|
26892
|
+
h(RevoButton, { class: { red: true, save: true }, onClick: () => this.onSave() }, capts.save), h(RevoButton, { class: { red: true, reset: true }, onClick: () => this.onReset() }, capts.reset), h(RevoButton, { class: { light: true, cancel: true }, onClick: () => this.onCancel() }, capts.cancel))));
|
|
26659
26893
|
}
|
|
26660
26894
|
onFilterTypeChange(e, prop, index) {
|
|
26661
26895
|
const el = e.target;
|
|
@@ -26669,7 +26903,8 @@ const FilterPanel = class extends HTMLElement {
|
|
|
26669
26903
|
if (input)
|
|
26670
26904
|
input.focus();
|
|
26671
26905
|
}, 0);
|
|
26672
|
-
this.
|
|
26906
|
+
if (!this.disableDynamicFiltering)
|
|
26907
|
+
this.debouncedApplyFilter();
|
|
26673
26908
|
}
|
|
26674
26909
|
onAddNewFilter(e) {
|
|
26675
26910
|
const el = e.target;
|
|
@@ -26682,7 +26917,8 @@ const FilterPanel = class extends HTMLElement {
|
|
|
26682
26917
|
select.value = defaultType;
|
|
26683
26918
|
this.currentFilterType = defaultType;
|
|
26684
26919
|
}
|
|
26685
|
-
this.
|
|
26920
|
+
if (!this.disableDynamicFiltering)
|
|
26921
|
+
this.debouncedApplyFilter();
|
|
26686
26922
|
}
|
|
26687
26923
|
addNewFilterToProp() {
|
|
26688
26924
|
var _a;
|
|
@@ -26712,7 +26948,8 @@ const FilterPanel = class extends HTMLElement {
|
|
|
26712
26948
|
onUserInput(index, prop, event) {
|
|
26713
26949
|
// update the value of the filter item
|
|
26714
26950
|
this.filterItems[prop][index].value = event.target.value;
|
|
26715
|
-
this.
|
|
26951
|
+
if (!this.disableDynamicFiltering)
|
|
26952
|
+
this.debouncedApplyFilter();
|
|
26716
26953
|
}
|
|
26717
26954
|
onKeyDown(e) {
|
|
26718
26955
|
if (e.key.toLowerCase() === 'enter') {
|
|
@@ -26728,6 +26965,9 @@ const FilterPanel = class extends HTMLElement {
|
|
|
26728
26965
|
// keep event local, don't escalate farther to dom
|
|
26729
26966
|
e.stopPropagation();
|
|
26730
26967
|
}
|
|
26968
|
+
onSave() {
|
|
26969
|
+
this.filterChange.emit(this.filterItems);
|
|
26970
|
+
}
|
|
26731
26971
|
onCancel() {
|
|
26732
26972
|
this.changes = undefined;
|
|
26733
26973
|
}
|
|
@@ -26753,7 +26993,8 @@ const FilterPanel = class extends HTMLElement {
|
|
|
26753
26993
|
// let's remove the prop if no more filters so the filter icon will be removed
|
|
26754
26994
|
if (items.length === 0)
|
|
26755
26995
|
delete this.filterItems[prop];
|
|
26756
|
-
this.
|
|
26996
|
+
if (!this.disableDynamicFiltering)
|
|
26997
|
+
this.debouncedApplyFilter();
|
|
26757
26998
|
}
|
|
26758
26999
|
toggleFilterAndOr(id) {
|
|
26759
27000
|
this.assertChanges();
|
|
@@ -26767,7 +27008,8 @@ const FilterPanel = class extends HTMLElement {
|
|
|
26767
27008
|
if (index === -1)
|
|
26768
27009
|
return;
|
|
26769
27010
|
items[index].relation = items[index].relation === 'and' ? 'or' : 'and';
|
|
26770
|
-
this.
|
|
27011
|
+
if (!this.disableDynamicFiltering)
|
|
27012
|
+
this.debouncedApplyFilter();
|
|
26771
27013
|
}
|
|
26772
27014
|
assertChanges() {
|
|
26773
27015
|
if (!this.changes) {
|
|
@@ -27300,6 +27542,7 @@ const ResizableElement = (props, children) => {
|
|
|
27300
27542
|
resizeEls));
|
|
27301
27543
|
};
|
|
27302
27544
|
|
|
27545
|
+
const ON_COLUMN_CLICK = 'column-click';
|
|
27303
27546
|
const HeaderCellRenderer = ({ data, props }, children) => {
|
|
27304
27547
|
let colTemplate = (data === null || data === void 0 ? void 0 : data.name) || '';
|
|
27305
27548
|
let cellProps = props;
|
|
@@ -27312,7 +27555,12 @@ const HeaderCellRenderer = ({ data, props }, children) => {
|
|
|
27312
27555
|
cellProps = ColumnService.doMerge(props, extra);
|
|
27313
27556
|
}
|
|
27314
27557
|
}
|
|
27315
|
-
return (h(ResizableElement, Object.assign({}, cellProps)
|
|
27558
|
+
return (h(ResizableElement, Object.assign({}, cellProps, { onMouseDown: (e) => {
|
|
27559
|
+
dispatch(e.currentTarget, ON_COLUMN_CLICK, {
|
|
27560
|
+
data,
|
|
27561
|
+
event: e,
|
|
27562
|
+
});
|
|
27563
|
+
} }),
|
|
27316
27564
|
h("div", { class: "header-content" }, colTemplate),
|
|
27317
27565
|
children));
|
|
27318
27566
|
};
|
|
@@ -28922,11 +29170,11 @@ const RevogrViewportScroll$1 = class extends HTMLElement {
|
|
|
28922
29170
|
static get style() { return revogrViewportScrollStyleCss; }
|
|
28923
29171
|
};
|
|
28924
29172
|
|
|
28925
|
-
const RevoGrid = /*@__PURE__*/proxyCustomElement(RevoGridComponent, [0,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"extraElements":[32]},[[0,"internalRowDragStart","onRowDragStarted"],[0,"internalRowDragEnd","onRowDragEnd"],[0,"internalRowDrag","onRowDrag"],[0,"internalRowMouseMove","onRowMouseMove"],[0,"internalCellEdit","onBeforeEdit"],[0,"internalRangeDataApply","onBeforeRangeEdit"],[0,"internalSelectionChanged","onRangeChanged"],[0,"initialRowDropped","onRowDropped"],[0,"initialHeaderClick","onHeaderClick"],[0,"internalFocusCell","onCellFocus"]]]);
|
|
29173
|
+
const RevoGrid = /*@__PURE__*/proxyCustomElement(RevoGridComponent, [0,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"extraElements":[32]},[[0,"internalRowDragStart","onRowDragStarted"],[0,"internalRowDragEnd","onRowDragEnd"],[0,"internalRowDrag","onRowDrag"],[0,"internalRowMouseMove","onRowMouseMove"],[0,"internalCellEdit","onBeforeEdit"],[0,"internalRangeDataApply","onBeforeRangeEdit"],[0,"internalSelectionChanged","onRangeChanged"],[0,"initialRowDropped","onRowDropped"],[0,"initialHeaderClick","onHeaderClick"],[0,"internalFocusCell","onCellFocus"]]]);
|
|
28926
29174
|
const RevogrClipboard = /*@__PURE__*/proxyCustomElement(Clipboard, [0,"revogr-clipboard",null,[[4,"paste","onPaste"],[4,"copy","copyStarted"]]]);
|
|
28927
29175
|
const RevogrData = /*@__PURE__*/proxyCustomElement(RevogrData$1, [0,"revogr-data",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"rowClass":[1,"row-class"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16]}]);
|
|
28928
29176
|
const RevogrEdit = /*@__PURE__*/proxyCustomElement(Edit, [0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16]}]);
|
|
28929
|
-
const RevogrFilterPanel = /*@__PURE__*/proxyCustomElement(FilterPanel, [0,"revogr-filter-panel",{"uuid":[1537],"filterItems":[16],"filterTypes":[16],"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32]},[[5,"mousedown","onMouseDown"]]]);
|
|
29177
|
+
const RevogrFilterPanel = /*@__PURE__*/proxyCustomElement(FilterPanel, [0,"revogr-filter-panel",{"uuid":[1537],"filterItems":[16],"filterTypes":[16],"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32]},[[5,"mousedown","onMouseDown"]]]);
|
|
28930
29178
|
const RevogrFocus = /*@__PURE__*/proxyCustomElement(RevogrFocus$2, [0,"revogr-focus",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}]);
|
|
28931
29179
|
const RevogrHeader = /*@__PURE__*/proxyCustomElement(RevogrHeaderComponent, [0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"parent":[1],"groups":[16],"groupingDepth":[2,"grouping-depth"],"canResize":[4,"can-resize"],"colData":[16],"columnFilter":[4,"column-filter"]}]);
|
|
28932
29180
|
const RevogrOrderEditor = /*@__PURE__*/proxyCustomElement(OrderEditor, [0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16]},[[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"]]]);
|