@revolist/revogrid 4.12.12 → 4.13.2

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.
Files changed (95) hide show
  1. package/dist/cjs/{column.drag.plugin-0ce0b39a.js → column.drag.plugin-0f367fe1.js} +2 -1
  2. package/dist/cjs/column.drag.plugin-0f367fe1.js.map +1 -0
  3. package/dist/cjs/column.service-b59380a3.js.map +1 -1
  4. package/dist/cjs/{sorting.sign-a1e9d97a.js → grouping.row.renderer-d6119ced.js} +6 -6
  5. package/dist/cjs/grouping.row.renderer-d6119ced.js.map +1 -0
  6. package/dist/cjs/index.cjs.js +7 -6
  7. package/dist/cjs/index.cjs.js.map +1 -1
  8. package/dist/cjs/revo-grid.cjs.entry.js +2 -2
  9. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
  10. package/dist/cjs/revogr-data_4.cjs.entry.js +5 -5
  11. package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
  12. package/dist/cjs/revogr-filter-panel.cjs.entry.js +1 -1
  13. package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
  14. package/dist/collection/components/revoGrid/revo-grid-style.css +109 -197
  15. package/dist/collection/plugins/filter/filter.style.css +12 -25
  16. package/dist/collection/plugins/sorting/sorting.plugin.js +2 -0
  17. package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -1
  18. package/dist/collection/store/selection/selection.store.js.map +1 -1
  19. package/dist/esm/{column.drag.plugin-017c4fb3.js → column.drag.plugin-d201beb7.js} +2 -2
  20. package/dist/esm/{column.drag.plugin-017c4fb3.js.map → column.drag.plugin-d201beb7.js.map} +1 -1
  21. package/dist/esm/column.service-f39c0a1d.js.map +1 -1
  22. package/dist/esm/{sorting.sign-c02e3b12.js → grouping.row.renderer-95f32c6b.js} +6 -6
  23. package/dist/esm/grouping.row.renderer-95f32c6b.js.map +1 -0
  24. package/dist/esm/index.js +3 -3
  25. package/dist/esm/revo-grid.entry.js +2 -2
  26. package/dist/esm/revo-grid.entry.js.map +1 -1
  27. package/dist/esm/revogr-data_4.entry.js +1 -1
  28. package/dist/esm/revogr-filter-panel.entry.js +1 -1
  29. package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
  30. package/dist/revo-grid/app-globals-6b929fd8.js +8 -1
  31. package/dist/revo-grid/app-globals-6b929fd8.js.map +1 -1
  32. package/dist/revo-grid/column.drag.plugin-d201beb7.js +2522 -0
  33. package/dist/revo-grid/column.drag.plugin-d201beb7.js.map +1 -0
  34. package/dist/revo-grid/column.service-f39c0a1d.js +1293 -1
  35. package/dist/revo-grid/column.service-f39c0a1d.js.map +1 -1
  36. package/dist/revo-grid/debounce-b3166f78.js +491 -1
  37. package/dist/revo-grid/debounce-b3166f78.js.map +1 -1
  38. package/dist/revo-grid/dimension.helpers-5567e424.js +3608 -1
  39. package/dist/revo-grid/dimension.helpers-5567e424.js.map +1 -1
  40. package/dist/revo-grid/edit.utils-b59306be.js +13 -1
  41. package/dist/revo-grid/edit.utils-b59306be.js.map +1 -1
  42. package/dist/revo-grid/events-cf0893a3.js +38 -1
  43. package/dist/revo-grid/events-cf0893a3.js.map +1 -1
  44. package/dist/revo-grid/filter.button-84396156.js +34 -1
  45. package/dist/revo-grid/filter.button-84396156.js.map +1 -1
  46. package/dist/revo-grid/grouping.row.renderer-95f32c6b.js +65 -0
  47. package/dist/revo-grid/grouping.row.renderer-95f32c6b.js.map +1 -0
  48. package/dist/revo-grid/header-cell-renderer-31f53644.js +335 -1
  49. package/dist/revo-grid/header-cell-renderer-31f53644.js.map +1 -1
  50. package/dist/revo-grid/index-f6fae858.js +2090 -2
  51. package/dist/revo-grid/index-f6fae858.js.map +1 -1
  52. package/dist/revo-grid/index.esm.js +160 -1
  53. package/dist/revo-grid/index.esm.js.map +1 -1
  54. package/dist/revo-grid/key.utils-3632161b.js +85 -1
  55. package/dist/revo-grid/key.utils-3632161b.js.map +1 -1
  56. package/dist/revo-grid/resize-observer-83c9e167.js +501 -1
  57. package/dist/revo-grid/resize-observer-83c9e167.js.map +1 -1
  58. package/dist/revo-grid/revo-grid.entry.js +1943 -1
  59. package/dist/revo-grid/revo-grid.entry.js.map +1 -1
  60. package/dist/revo-grid/revo-grid.esm.js +21 -1
  61. package/dist/revo-grid/revo-grid.esm.js.map +1 -1
  62. package/dist/revo-grid/revogr-attribution_7.entry.js +1446 -1
  63. package/dist/revo-grid/revogr-attribution_7.entry.js.map +1 -1
  64. package/dist/revo-grid/revogr-clipboard_3.entry.js +455 -1
  65. package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
  66. package/dist/revo-grid/revogr-data_4.entry.js +960 -1
  67. package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
  68. package/dist/revo-grid/revogr-filter-panel.entry.js +340 -1
  69. package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
  70. package/dist/revo-grid/text-editor-e47e56c3.js +74 -1
  71. package/dist/revo-grid/text-editor-e47e56c3.js.map +1 -1
  72. package/dist/revo-grid/throttle-dec28f5b.js +229 -1
  73. package/dist/revo-grid/throttle-dec28f5b.js.map +1 -1
  74. package/dist/revo-grid/viewport.helpers-7e7f9dad.js +48 -1
  75. package/dist/revo-grid/viewport.helpers-7e7f9dad.js.map +1 -1
  76. package/dist/revo-grid/viewport.store-c18a25a6.js +402 -1
  77. package/dist/revo-grid/viewport.store-c18a25a6.js.map +1 -1
  78. package/dist/types/plugins/sorting/sorting.plugin.d.ts +2 -0
  79. package/dist/types/store/selection/selection.store.d.ts +1 -1
  80. package/hydrate/index.js +7 -7
  81. package/hydrate/index.mjs +7 -7
  82. package/package.json +1 -1
  83. package/standalone/column.service.js.map +1 -1
  84. package/standalone/index.js +1 -1
  85. package/standalone/revo-grid.js +2 -2
  86. package/standalone/revo-grid.js.map +1 -1
  87. package/standalone/revogr-filter-panel.js +1 -1
  88. package/standalone/revogr-filter-panel.js.map +1 -1
  89. package/dist/cjs/column.drag.plugin-0ce0b39a.js.map +0 -1
  90. package/dist/cjs/sorting.sign-a1e9d97a.js.map +0 -1
  91. package/dist/esm/sorting.sign-c02e3b12.js.map +0 -1
  92. package/dist/revo-grid/column.drag.plugin-017c4fb3.js +0 -5
  93. package/dist/revo-grid/column.drag.plugin-017c4fb3.js.map +0 -1
  94. package/dist/revo-grid/sorting.sign-c02e3b12.js +0 -5
  95. package/dist/revo-grid/sorting.sign-c02e3b12.js.map +0 -1
@@ -1,5 +1,964 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import{h as e,B as t,r as i,c as o,H as r,a as n}from"./index-f6fae858.js";import{O as s,z as l,M as a,s as d,I as h}from"./column.service-f39c0a1d.js";import{M as c,H as v,a7 as g,k as p,E as u,Q as f,G as C,I as b,b as w,x as L,y as x,a8 as m,Y as k,a4 as y,J as z,B as E,F as R}from"./dimension.helpers-5567e424.js";import{G as H,R as S,P as j,S as F}from"./sorting.sign-c02e3b12.js";import{c as D}from"./filter.button-84396156.js";import{H as O}from"./header-cell-renderer-31f53644.js";import{t as M,L as $,a as T}from"./throttle-dec28f5b.js";import{H as P,C as W,F as B}from"./viewport.helpers-7e7f9dad.js";import"./debounce-b3166f78.js";const _=t=>{const i={canResize:t.canResize,minWidth:t.group.ids.length*c,maxWidth:0,active:t.active||["r"],class:{[v]:true},style:{transform:`translateX(${t.start}px)`,width:`${t.end-t.start}px`},onResize:t.onResize};return e(O,{data:Object.assign(Object.assign({},t.group),{prop:"",providers:t.providers,index:t.start}),props:i,additionalData:t.additionalData})};const U=({additionalData:t,providers:i,depth:o,groups:r,visibleProps:n,dimensionCol:s,canResize:l,active:a,onResize:d})=>{const h=[];for(let c=0;c<o;c++){if(r[c]){for(let o of r[c]){const r=g(o.ids,(e=>typeof n[e]==="number"));if(r>-1){const c=n[o.ids[r]];const v=c-r;const g=v+o.ids.length-1;const u=p(s,v).start;const f=p(s,g).end;h.push(e(_,{providers:i,start:u,end:f,group:o,active:a,canResize:l,onResize:e=>{var t;return d((t=e.changedX)!==null&&t!==void 0?t:0,v,g)},additionalData:t}))}}}h.push(e("div",{class:`${u} group`}))}return h};class Z{constructor(){this.currentRange=null}selectionChange(e,t){if(this.currentRange){t.forEach(((t,i)=>{var o;if(e&&i>=e.y&&i<=e.y1){return}if(t&&t.t instanceof HTMLElement&&t.t.classList.contains(f)){t.t.classList.remove(f);if((o=t.i)===null||o===void 0?void 0:o.class.includes(f)){t.i.class=t.i.class.replace(f,"")}}}))}if(e){for(let i=e.y;i<=e.y1;i++){const e=t.get(i);if(e&&e.t instanceof HTMLElement&&!e.t.classList.contains(f)){const t=e.i=e.i||{};t.class=(t.class||"")+" "+f;e.t.classList.add(f)}}}this.currentRange=e}isRowFocused(e){return this.currentRange&&e>=this.currentRange.y&&e<=this.currentRange.y1}}function I(e,t){return new Promise((i=>{const o=document.createElement("vnode-html");e.appendChild(o);o.redraw=t;o.addEventListener("html",(e=>{o.remove();i(e.detail)}))}))}function X(i){var o;const r=[];const n=(o=i.schemaModel.column)===null||o===void 0?void 0:o.cellTemplate;if(n){r.push(n(e,i.schemaModel,i.additionalData))}else{if(!i.schemaModel.column){if(t===null||t===void 0?void 0:t.isDev){console.error("Investigate column problem.",i.schemaModel)}return""}if(i.schemaModel.column.rowDrag&&s(i.schemaModel.column.rowDrag,i.schemaModel)){r.push(e("span",{class:b,onMouseDown:e=>{var t;return(t=i.dragStartCell)===null||t===void 0?void 0:t.emit({originalEvent:e,model:i.schemaModel})}},e("span",{class:C})))}r.push(`${l(i.schemaModel.model,i.schemaModel.column)}`)}return r}const G=({renderProps:t,cellProps:i})=>{const o=X.bind(null,t);return e("div",Object.assign({},i,{redraw:o}),o())};const V=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-data{display:block;width:100%;position:relative}revogr-data .rgRow{position:absolute;width:100%;left:0}revogr-data .rgRow.groupingRow{font-weight:600;text-align:left}revogr-data .rgRow.groupingRow .group-expand{width:25px;height:100%;max-height:25px;margin-right:2px;background-color:transparent;border-color:transparent;vertical-align:middle;padding-left:5px}revogr-data .rgRow.groupingRow .group-expand svg{width:7px}revogr-data .revo-draggable{border:none;height:32px;display:inline-flex;outline:0;padding:0;font-size:0.8125rem;box-sizing:border-box;align-items:center;white-space:nowrap;vertical-align:middle;justify-content:center;text-decoration:none;width:24px;height:100%;cursor:pointer;display:inline-flex}revogr-data .revo-draggable:hover>.revo-drag-icon{opacity:1;zoom:1.2;font-weight:600}revogr-data .revo-draggable>.revo-drag-icon{pointer-events:none;transition:opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, zoom 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}revogr-data .rgCell{top:0;left:0;position:absolute;box-sizing:border-box;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;outline:none}revogr-data .rgCell.align-center{text-align:center}revogr-data .rgCell.align-left{text-align:left}revogr-data .rgCell.align-right{text-align:right}";const Y=V;const A=class{constructor(e){i(this,e);this.beforerowrender=o(this,"beforerowrender",7);this.afterrender=o(this,"afterrender",7);this.beforeCellRender=o(this,"beforecellrender",7);this.beforeDataRender=o(this,"beforedatarender",7);this.dragStartCell=o(this,"dragstartcell",7);this.renderedRows=new Map;this.readonly=undefined;this.range=undefined;this.rowClass=undefined;this.additionalData=undefined;this.rowSelectionStore=undefined;this.viewportRow=undefined;this.viewportCol=undefined;this.dimensionRow=undefined;this.colData=undefined;this.dataStore=undefined;this.type=undefined;this.colType=undefined;this.jobsBeforeRender=[];this.providers=undefined}async updateCell(e){var t,i,o;const r=(i=(t=this.renderedRows.get(e.row))===null||t===void 0?void 0:t.o)===null||i===void 0?void 0:i[e.col];if((o=r===null||r===void 0?void 0:r.i)===null||o===void 0?void 0:o.redraw){const e=await I(this.element,r.i.redraw);r.t.innerHTML=e.html;r.l=Math.random()}}onDataStoreChange(){this.onStoreChange()}onColDataChange(){this.onStoreChange()}onStoreChange(){var e,t;(e=this.columnService)===null||e===void 0?void 0:e.destroy();this.columnService=new a(this.dataStore,this.colData);this.providers={type:this.type,readonly:this.readonly,data:this.dataStore,viewport:this.viewportCol,dimension:this.dimensionRow,selection:this.rowSelectionStore};(t=this.rangeUnsubscribe)===null||t===void 0?void 0:t.call(this);this.rangeUnsubscribe=this.rowSelectionStore.onChange("range",(e=>this.rowHighlightPlugin.selectionChange(e,this.renderedRows)))}connectedCallback(){this.rowHighlightPlugin=new Z;this.onStoreChange()}disconnectedCallback(){var e,t;(e=this.columnService)===null||e===void 0?void 0:e.destroy();(t=this.rangeUnsubscribe)===null||t===void 0?void 0:t.call(this)}async componentWillRender(){this.beforeDataRender.emit({rowType:this.type,colType:this.colType});return Promise.all(this.jobsBeforeRender.map((e=>typeof e==="function"?e():e)))}componentDidRender(){this.afterrender.emit({type:this.type})}render(){this.renderedRows=new Map;const t=this.columnService.columns;if(!t.length){return}const i=this.viewportRow.get("items");if(!i.length){return}const o=this.viewportCol.get("items");if(!o.length){return}const n=[];const s=this.dataStore.get("groupingDepth");const l=this.dataStore.get("groupingCustomRenderer");const a=this.columnService.hasGrouping?s:0;for(let t of i){const i=w(this.dataStore,t.itemIndex);if(d(i)){const o=Object.assign(Object.assign({},t),{index:t.itemIndex,model:i,groupingCustomRenderer:l,hasExpand:this.columnService.hasGrouping,providers:this.providers});n.push(e(H,Object.assign({},o)));continue}const r=[];for(let i of o){const o=Object.assign(Object.assign({},this.columnService.rowDataModel(t.itemIndex,i.itemIndex)),{providers:this.providers});const n=this.triggerBeforeCellRender(o,t,i);if(n.defaultPrevented){continue}const{detail:{column:s,row:l,model:d}}=n;const h={[L]:s.itemIndex,[x]:l.itemIndex,style:{width:`${s.size}px`,transform:`translateX(${s.start}px)`,height:l.size?`${l.size}px`:undefined}};if(a&&!s.itemIndex&&h.style){h.style.paddingLeft=`${j*a}px`}const c=this.columnService.mergeProperties(l.itemIndex,s.itemIndex,h,d);const v=e(G,{renderProps:{schemaModel:d,additionalData:this.additionalData,dragStartCell:this.dragStartCell},cellProps:c});r.push(v)}let s=this.rowClass?this.columnService.getRowClass(t.itemIndex,this.rowClass):"";if(this.rowHighlightPlugin.isRowFocused(t.itemIndex)){s+=` ${f}`}const h=e(S,{index:t.itemIndex,rowClass:s,size:t.size,start:t.start},r);this.beforerowrender.emit({node:h,item:t,model:i,colType:this.columnService.type,rowType:this.type});n.push(h);this.renderedRows.set(t.itemIndex,h)}return e(r,null,e("slot",null),n)}triggerBeforeCellRender(e,t,i){const o={column:i,row:t,model:e,rowType:e.type,colType:e.colType};return this.beforeCellRender.emit(o)}get element(){return n(this)}static get watchers(){return{dataStore:["onDataStoreChange"],colData:["onColDataChange"]}}};A.style=Y;var J=function(){try{var e=m(Object,"defineProperty");e({},"",{});return e}catch(e){}}();const Q=J;function q(e,t,i){if(t=="__proto__"&&Q){Q(e,t,{configurable:true,enumerable:true,value:i,writable:true})}else{e[t]=i}}function K(e,t,i,o){var r=-1,n=e==null?0:e.length;while(++r<n){var s=e[r];t(o,s,i(s),e)}return o}function N(e,t,i,o){h(e,(function(e,r,n){t(o,e,i(e),n)}));return o}function ee(e,t){return function(i,o){var r=k(i)?K:N,n=t?t():{};return r(i,e,y(o),n)}}var te=ee((function(e,t,i){q(e,i,t)}));const ie=te;const oe=t=>{var i,o,r,n,s;const l={[v]:true,[E]:!!((i=t.data)===null||i===void 0?void 0:i.sortable)};if((o=t.data)===null||o===void 0?void 0:o.order){l[t.data.order]=true}const a={[L]:t.column.itemIndex,canResize:t.canResize,minWidth:((r=t.data)===null||r===void 0?void 0:r.minSize)||c,maxWidth:(n=t.data)===null||n===void 0?void 0:n.maxSize,active:t.active||["r"],class:l,style:{width:`${t.column.size}px`,transform:`translateX(${t.column.start}px)`},onResize:t.onResize,onDblClick(e){var i;(i=t.onDblClick)===null||i===void 0?void 0:i.call(t,{column:t.data,index:t.column.itemIndex,originalEvent:e,providers:t.data.providers})},onClick(e){if(e.defaultPrevented||!t.onClick){return}t.onClick({column:t.data,index:t.column.itemIndex,originalEvent:e,providers:t.data.providers})}};if(t.range){if(t.column.itemIndex>=t.range.x&&t.column.itemIndex<=t.range.x1){if(typeof a.class==="object"){a.class[z]=true}}}return e(O,{data:t.data,props:a,additionalData:t.additionalData},e(F,{column:t.data}),t.canFilter&&((s=t.data)===null||s===void 0?void 0:s.filter)!==false?e(D,{column:t.data}):"")};const re="@charset \"UTF-8\";.revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-header{position:relative;z-index:5;display:block}revogr-header .rgHeaderCell{display:flex}revogr-header .rgHeaderCell.align-center{text-align:center}revogr-header .rgHeaderCell.align-left{text-align:left}revogr-header .rgHeaderCell.align-right{text-align:right}revogr-header .rgHeaderCell.sortable{cursor:pointer}revogr-header .rgHeaderCell i.asc:after,revogr-header .rgHeaderCell i.desc:after{font-size:13px}revogr-header .rgHeaderCell i.asc:after{content:\"↑\"}revogr-header .rgHeaderCell i.desc:after{content:\"↓\"}revogr-header .rgHeaderCell,revogr-header .grouped-cell{position:absolute;box-sizing:border-box;height:100%;z-index:1}revogr-header .header-rgRow{display:block;position:relative}revogr-header .header-rgRow.group{z-index:0}revogr-header .group-rgRow{position:relative}revogr-header .rgHeaderCell.active{z-index:10}revogr-header .rgHeaderCell.active .resizable{background-color:deepskyblue}revogr-header .rgHeaderCell .header-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}revogr-header .rgHeaderCell .resizable{display:block;position:absolute;z-index:90;touch-action:none;user-select:none}revogr-header .rgHeaderCell .resizable:hover{background-color:deepskyblue}revogr-header .rgHeaderCell>.resizable-r{cursor:ew-resize;width:6px;right:0;top:0;height:100%}revogr-header .rgHeaderCell>.resizable-rb{cursor:se-resize;width:6px;height:6px;right:0;bottom:0}revogr-header .rgHeaderCell>.resizable-b{cursor:s-resize;height:6px;bottom:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-lb{cursor:sw-resize;width:6px;height:6px;left:0;bottom:0}revogr-header .rgHeaderCell>.resizable-l{cursor:w-resize;width:6px;left:0;height:100%;top:0}revogr-header .rgHeaderCell>.resizable-lt{cursor:nw-resize;width:6px;height:6px;left:0;top:0}revogr-header .rgHeaderCell>.resizable-t{cursor:n-resize;height:6px;top:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-rt{cursor:ne-resize;width:6px;height:6px;right:0;top:0}revogr-header .rv-filter{visibility:hidden}";const ne=re;const se=class{constructor(e){i(this,e);this.initialHeaderClick=o(this,"beforeheaderclick",7);this.headerresize=o(this,"headerresize",7);this.beforeResize=o(this,"beforeheaderresize",7);this.headerdblClick=o(this,"headerdblclick",7);this.beforeHeaderRender=o(this,"beforeheaderrender",7);this.afterHeaderRender=o(this,"afterheaderrender",7);this.viewportCol=undefined;this.dimensionCol=undefined;this.selectionStore=undefined;this.groups=undefined;this.groupingDepth=0;this.readonly=undefined;this.canResize=undefined;this.resizeHandler=undefined;this.colData=undefined;this.columnFilter=undefined;this.type=undefined;this.additionalData={}}onResize({width:e},t){const i=this.colData[t];const o=this.beforeResize.emit([Object.assign(Object.assign({},i),{size:e||undefined})]);if(o.defaultPrevented){return}this.headerresize.emit({[t]:e||0})}onResizeGroup(e,t,i){const o={};const r=ie(this.viewportCol.get("items"),"itemIndex");const n=e/(i-t+1);for(let e=t;e<=i;e++){const t=r[e];if(t){o[e]=t.size+n}}this.headerresize.emit(o)}componentDidRender(){this.afterHeaderRender.emit(this.providers)}render(){var t;const i=this.viewportCol.get("items");const o=(t=this.selectionStore)===null||t===void 0?void 0:t.get("range");const r=[];const n={};for(let t of i){const i=this.colData[t.itemIndex];const s={range:o,column:t,data:Object.assign(Object.assign({},i),{index:t.itemIndex,providers:this.providers}),canFilter:!!this.columnFilter,canResize:this.canResize,active:this.resizeHandler,onResize:e=>this.onResize(e,t.itemIndex),onDblClick:e=>this.headerdblClick.emit(e),onClick:e=>this.initialHeaderClick.emit(e),additionalData:this.additionalData};const l=this.beforeHeaderRender.emit(s);if(l.defaultPrevented){continue}r.push(e(oe,Object.assign({},l.detail)));n[i===null||i===void 0?void 0:i.prop]=t.itemIndex}return[e("div",{key:"f01cf39610e7e66f7bf4fa09f52455875a940ced",class:"group-rgRow"},e(U,{key:"fa60d0aa9bb63d86f7e07ed7c1372207147a13c4",canResize:this.canResize,active:this.resizeHandler,visibleProps:n,providers:this.providers,groups:this.groups,dimensionCol:this.dimensionCol.state,depth:this.groupingDepth,onResize:(e,t,i)=>this.onResizeGroup(e,t,i),additionalData:this.additionalData})),e("div",{key:"65ab0e1d0ea5a548c7dc4abfda116beb29316b3d",class:`${u} ${R}`},r)]}get providers(){return{type:this.type,readonly:this.readonly,data:this.colData,viewport:this.viewportCol,dimension:this.dimensionCol,selection:this.selectionStore}}get element(){return n(this)}};se.style=ne;async function le(){if(!("ResizeObserver"in window)){const e=await import("./resize-observer-83c9e167.js");window.ResizeObserver=e.ResizeObserver}}class ae{constructor(e,t){this.resize=t;this.resizeObserver=null;this.previousSize={width:0,height:0};this.apply=M((e=>{var t;if(!e.length){return}const i={width:e[0].contentRect.width,height:e[0].contentRect.height};(t=this.resize)===null||t===void 0?void 0:t.call(this,i,this.previousSize);this.previousSize=i}),10);this.init(e)}async init(e){var t;await le();this.resizeObserver=new ResizeObserver(this.apply);(t=this.resizeObserver)===null||t===void 0?void 0:t.observe(e)}destroy(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.resizeObserver=null}}const de=".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}.rowHeaders{z-index:2;font-size:10px;display:flex;height:100%}.rowHeaders revogr-data .rgCell{text-align:center}.rowHeaders .rgCell{padding:0 1em !important;min-width:100%}revogr-viewport-scroll{-ms-overflow-style:none;scrollbar-width:none;overflow-x:auto;overflow-y:hidden;position:relative;z-index:1;height:100%}revogr-viewport-scroll::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll.colPinStart,revogr-viewport-scroll.colPinEnd{z-index:2}revogr-viewport-scroll.colPinEnd:has(.active){overflow:visible}revogr-viewport-scroll.rgCol{flex-grow:1}revogr-viewport-scroll .content-wrapper{overflow:hidden}revogr-viewport-scroll .inner-content-table{display:flex;flex-direction:column;max-height:100%;width:100%;min-width:100%;position:relative;z-index:0}revogr-viewport-scroll .vertical-inner{overflow-y:auto;position:relative;width:100%;flex-grow:1;outline:none;-ms-overflow-style:none;scrollbar-width:none;}revogr-viewport-scroll .vertical-inner::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll .vertical-inner revogr-data,revogr-viewport-scroll .vertical-inner revogr-overlay-selection{height:100%}";const he=de;const ce=class{constructor(e){i(this,e);this.scrollViewport=o(this,"scrollviewport",7);this.resizeViewport=o(this,"resizeviewport",7);this.scrollchange=o(this,"scrollchange",7);this.silentScroll=o(this,"scrollviewportsilent",7);this.rowHeader=undefined;this.contentWidth=0;this.contentHeight=0;this.colType=undefined}async setScroll(e){var t;this.localScrollTimer.latestScrollUpdate(e.dimension);(t=this.localScrollService)===null||t===void 0?void 0:t.setScroll(e)}async changeScroll(e,t=false){var i,o;if(t){if(e.coordinate&&this.verticalScroll){switch(e.dimension){case"rgRow":this.verticalScroll.style.transform=`translateY(${-1*e.coordinate}px)`;break}}return}if(e.delta){switch(e.dimension){case"rgCol":e.coordinate=this.horizontalScroll.scrollLeft+e.delta;break;case"rgRow":e.coordinate=((o=(i=this.verticalScroll)===null||i===void 0?void 0:i.scrollTop)!==null&&o!==void 0?o:0)+e.delta;break}this.setScroll(e)}return e}mousewheelVertical({detail:e}){this.verticalMouseWheel(e)}mousewheelHorizontal({detail:e}){this.horizontalMouseWheel(e)}scrollApply({detail:{type:e,coordinate:t}}){this.applyOnScroll(e,t,true)}connectedCallback(){this.verticalMouseWheel=this.onVerticalMouseWheel.bind(this,"rgRow","deltaY");this.horizontalMouseWheel=this.onHorizontalMouseWheel.bind(this,"rgCol","deltaX");this.localScrollTimer=new $("ontouchstart"in document.documentElement?0:10);this.localScrollService=new T({runScroll:e=>this.scrollViewport.emit(e),applyScroll:e=>{this.localScrollTimer.setCoordinate(e);switch(e.dimension){case"rgCol":this.horizontalScroll.scrollLeft=e.coordinate;break;case"rgRow":if(this.verticalScroll){this.verticalScroll.scrollTop=e.coordinate;if(this.verticalScroll.style.transform){this.verticalScroll.style.transform=""}}break}}})}componentDidLoad(){this.resizeService=new ae(this.horizontalScroll,((e,t)=>{var i,o,r,n,s,l,a,d;const h={};if(e.height!==t.height){let t=e.height||0;if(t){t-=((o=(i=this.header)===null||i===void 0?void 0:i.clientHeight)!==null&&o!==void 0?o:0)+((n=(r=this.footer)===null||r===void 0?void 0:r.clientHeight)!==null&&n!==void 0?n:0)}h.rgRow={size:t,contentSize:this.contentHeight,scroll:(l=(s=this.verticalScroll)===null||s===void 0?void 0:s.scrollTop)!==null&&l!==void 0?l:0,noScroll:false}}if(e.width!==t.width){h.rgCol={size:e.width||0,contentSize:this.contentWidth,scroll:this.horizontalScroll.scrollLeft,noScroll:this.colType!=="rgCol"}}for(const[e,t]of Object.entries(h)){const i=e;this.resizeViewport.emit({dimension:i,size:t.size,rowHeader:this.rowHeader});if(t.noScroll){continue}(a=this.localScrollService)===null||a===void 0?void 0:a.scroll((d=t.scroll)!==null&&d!==void 0?d:0,i,true);this.setScrollVisibility(i,t.size,t.contentSize)}}))}setScrollVisibility(e,t,i){const o=t<i;let r;switch(e){case"rgCol":r=this.horizontalScroll;break;case"rgRow":r=this.verticalScroll;break}if(o){r===null||r===void 0?void 0:r.classList.add(`scroll-${e}`)}else{r===null||r===void 0?void 0:r.classList.remove(`scroll-${e}`)}this.scrollchange.emit({type:e,hasScroll:o})}disconnectedCallback(){var e;(e=this.resizeService)===null||e===void 0?void 0:e.destroy()}async componentDidRender(){var e,t,i,o;this.localScrollService.setParams({contentSize:this.contentHeight,clientSize:(t=(e=this.verticalScroll)===null||e===void 0?void 0:e.clientHeight)!==null&&t!==void 0?t:0,virtualSize:0},"rgRow");this.localScrollService.setParams({contentSize:this.contentWidth,clientSize:this.horizontalScroll.clientWidth,virtualSize:0},"rgCol");this.setScrollVisibility("rgRow",(o=(i=this.verticalScroll)===null||i===void 0?void 0:i.clientHeight)!==null&&o!==void 0?o:0,this.contentHeight);this.setScrollVisibility("rgCol",this.horizontalScroll.clientWidth,this.contentWidth)}render(){return e(r,{key:"970ac2365588d1c894d9684113eb9beaf64e1a1d",onWheel:this.horizontalMouseWheel,onScroll:e=>this.applyScroll("rgCol",e)},e("div",{key:"dc57aab1bde4496e83131d80a7e189db25b93312",class:"inner-content-table",style:{width:`${this.contentWidth}px`}},e("div",{key:"bd014cf0a67bb913016f00f7838344611a1b26df",class:"header-wrapper",ref:e=>this.header=e},e("slot",{key:"772eb408b6ea670624cc338550215565ec36ef89",name:P})),e("div",{key:"5dcf061c78864b0dc4e4ffbcc28c0ebb3536ce8b",class:"vertical-inner",ref:e=>this.verticalScroll=e,onWheel:this.verticalMouseWheel,onScroll:e=>this.applyScroll("rgRow",e)},e("div",{key:"b45f46aedefe82843b086cdca822e05339a77fda",class:"content-wrapper",style:{height:`${this.contentHeight}px`}},e("slot",{key:"8d07196c79741ace0f4c734138d69abdf96fee4f",name:W}))),e("div",{key:"f6313f9394e99a3ad07895ed06e965540268b35a",class:"footer-wrapper",ref:e=>this.footer=e},e("slot",{key:"b1bcdb75bb5e4dcc1e43493d7b4f01b2578352e4",name:B}))))}async applyScroll(e,t){if(!(t.target instanceof HTMLElement)){return}let i=0;switch(e){case"rgCol":i=t.target.scrollLeft;break;case"rgRow":i=t.target.scrollTop;break}if(i<0){this.silentScroll.emit({dimension:e,coordinate:i});return}this.applyOnScroll(e,i)}applyOnScroll(e,t,i=false){var o;if(this.localScrollTimer.isReady(e,t)){(o=this.localScrollService)===null||o===void 0?void 0:o.scroll(t,e,undefined,undefined,i)}}onVerticalMouseWheel(e,t,i){var o,r,n,s,l,a,d,h;const c=(r=(o=this.verticalScroll)===null||o===void 0?void 0:o.scrollTop)!==null&&r!==void 0?r:0;const v=(s=(n=this.verticalScroll)===null||n===void 0?void 0:n.clientHeight)!==null&&s!==void 0?s:0;const g=(a=(l=this.verticalScroll)===null||l===void 0?void 0:l.scrollHeight)!==null&&a!==void 0?a:0;const p=c+v>=g&&i.deltaY>0;const u=c===0&&i.deltaY<0;if(!p&&!u){(d=i.preventDefault)===null||d===void 0?void 0:d.call(i)}const f=c+i[t];(h=this.localScrollService)===null||h===void 0?void 0:h.scroll(f,e,undefined,i[t]);this.localScrollTimer.latestScrollUpdate(e)}onHorizontalMouseWheel(e,t,i){var o,r;if(!i.deltaX){return}const{scrollLeft:n,scrollWidth:s,clientWidth:l}=this.horizontalScroll;const a=n+l>=s&&i.deltaX>0;const d=n===0&&i.deltaX<0;if(!a&&!d){(o=i.preventDefault)===null||o===void 0?void 0:o.call(i)}const h=n+i[t];(r=this.localScrollService)===null||r===void 0?void 0:r.scroll(h,e,undefined,i[t]);this.localScrollTimer.latestScrollUpdate(e)}get horizontalScroll(){return n(this)}};ce.style=he;const ve=class{constructor(e){i(this,e);this.html=o(this,"html",7);this.vnodes=[];this.redraw=null}componentDidRender(){this.html.emit({html:this.el.innerHTML,vnodes:this.vnodes})}render(){var t,i;this.vnodes=(i=(t=this.redraw)===null||t===void 0?void 0:t.call(this))!==null&&i!==void 0?i:null;return e(r,{key:"73a019dbc046a9d4504bc84a80868e8023d1f502",style:{visibility:"hidden",position:"absolute"}},this.vnodes)}get el(){return n(this)}};export{A as revogr_data,se as revogr_header,ce as revogr_viewport_scroll,ve as vnode_html};
4
+ import { h, B as Build, r as registerInstance, c as createEvent, H as Host, a as getElement } from './index-f6fae858.js';
5
+ import { O as isRowDragService, z as getCellDataParsed, M as ColumnService, s as isGrouping, I as baseEach } from './column.service-f39c0a1d.js';
6
+ import { M as MIN_COL_SIZE, H as HEADER_CLASS, a7 as findIndex, k as getItemByIndex, E as HEADER_ROW_CLASS, Q as ROW_FOCUSED_CLASS, G as DRAG_ICON_CLASS, I as DRAGGABLE_CLASS, b as getSourceItem, x as DATA_COL, y as DATA_ROW, a8 as getNative, Y as isArray, a4 as baseIteratee, J as FOCUS_CLASS, B as HEADER_SORTABLE_CLASS, F as HEADER_ACTUAL_ROW_CLASS } from './dimension.helpers-5567e424.js';
7
+ import { G as GroupingRowRenderer, R as RowRenderer, P as PADDING_DEPTH, S as SortingSign } from './grouping.row.renderer-95f32c6b.js';
8
+ import { c as FilterButton } from './filter.button-84396156.js';
9
+ import { H as HeaderCellRenderer } from './header-cell-renderer-31f53644.js';
10
+ import { t as throttle, L as LocalScrollTimer, a as LocalScrollService } from './throttle-dec28f5b.js';
11
+ import { H as HEADER_SLOT, C as CONTENT_SLOT, F as FOOTER_SLOT } from './viewport.helpers-7e7f9dad.js';
12
+ import './debounce-b3166f78.js';
13
+
14
+ const GroupHeaderRenderer = (p) => {
15
+ const groupProps = {
16
+ canResize: p.canResize,
17
+ minWidth: p.group.ids.length * MIN_COL_SIZE,
18
+ maxWidth: 0,
19
+ active: p.active || ['r'],
20
+ class: {
21
+ [HEADER_CLASS]: true,
22
+ },
23
+ style: {
24
+ transform: `translateX(${p.start}px)`,
25
+ width: `${p.end - p.start}px`,
26
+ },
27
+ onResize: p.onResize,
28
+ };
29
+ return (h(HeaderCellRenderer, { data: Object.assign(Object.assign({}, p.group), { prop: '', providers: p.providers, index: p.start }), props: groupProps, additionalData: p.additionalData }));
30
+ };
31
+
32
+ const ColumnGroupsRenderer = ({ additionalData, providers, depth, groups, visibleProps, dimensionCol, canResize, active, onResize }) => {
33
+ // render group columns
34
+ const groupRow = [];
35
+ for (let i = 0; i < depth; i++) {
36
+ if (groups[i]) {
37
+ for (let group of groups[i]) {
38
+ // if group in visible range
39
+ // find first visible group prop in visible columns range
40
+ const indexFirstVisibleCol = findIndex(group.ids, id => typeof visibleProps[id] === 'number');
41
+ if (indexFirstVisibleCol > -1) {
42
+ const colVisibleIndex = visibleProps[group.ids[indexFirstVisibleCol]]; // get column index
43
+ const groupStartIndex = colVisibleIndex - indexFirstVisibleCol; // first column index in group
44
+ const groupEndIndex = groupStartIndex + group.ids.length - 1; // last column index in group
45
+ // coordinates
46
+ const groupStart = getItemByIndex(dimensionCol, groupStartIndex).start;
47
+ const groupEnd = getItemByIndex(dimensionCol, groupEndIndex).end;
48
+ groupRow.push(h(GroupHeaderRenderer, { providers: providers, start: groupStart, end: groupEnd, group: group, active: active, canResize: canResize, onResize: e => { var _a; return onResize((_a = e.changedX) !== null && _a !== void 0 ? _a : 0, groupStartIndex, groupEndIndex); }, additionalData: additionalData }));
49
+ }
50
+ }
51
+ }
52
+ groupRow.push(h("div", { class: `${HEADER_ROW_CLASS} group` }));
53
+ }
54
+ return groupRow;
55
+ };
56
+
57
+ /**
58
+ * Class is responsible for highlighting rows in a table.
59
+ */
60
+ class RowHighlightPlugin {
61
+ constructor() {
62
+ this.currentRange = null;
63
+ }
64
+ selectionChange(e, renderedRows) {
65
+ // clear previous range
66
+ if (this.currentRange) {
67
+ renderedRows.forEach((row, y) => {
68
+ var _a;
69
+ // skip current range
70
+ if (e && y >= e.y && y <= e.y1) {
71
+ return;
72
+ }
73
+ // clear previous range
74
+ if (row &&
75
+ row.$elm$ instanceof HTMLElement &&
76
+ row.$elm$.classList.contains(ROW_FOCUSED_CLASS)) {
77
+ row.$elm$.classList.remove(ROW_FOCUSED_CLASS);
78
+ if ((_a = row.$attrs$) === null || _a === void 0 ? void 0 : _a.class.includes(ROW_FOCUSED_CLASS)) {
79
+ row.$attrs$.class = row.$attrs$.class.replace(ROW_FOCUSED_CLASS, '');
80
+ }
81
+ }
82
+ });
83
+ }
84
+ // apply new range
85
+ if (e) {
86
+ for (let y = e.y; y <= e.y1; y++) {
87
+ const row = renderedRows.get(y);
88
+ if (row &&
89
+ row.$elm$ instanceof HTMLElement &&
90
+ !row.$elm$.classList.contains(ROW_FOCUSED_CLASS)) {
91
+ const attrs = (row.$attrs$ = row.$attrs$ || {});
92
+ attrs.class = (attrs.class || '') + ' ' + ROW_FOCUSED_CLASS;
93
+ row.$elm$.classList.add(ROW_FOCUSED_CLASS);
94
+ }
95
+ }
96
+ }
97
+ this.currentRange = e;
98
+ }
99
+ isRowFocused(y) {
100
+ return (this.currentRange && y >= this.currentRange.y && y <= this.currentRange.y1);
101
+ }
102
+ }
103
+
104
+ /**
105
+ * Converts a VNode element into an HTML element and appends it to the specified parentHolder.
106
+ */
107
+ function convertVNodeToHTML(parentHolder, redraw) {
108
+ return new Promise(resolve => {
109
+ const vnode = document.createElement('vnode-html');
110
+ parentHolder.appendChild(vnode);
111
+ vnode.redraw = redraw;
112
+ vnode.addEventListener('html', e => {
113
+ vnode.remove();
114
+ resolve(e.detail);
115
+ });
116
+ });
117
+ }
118
+
119
+ function renderCell(v) {
120
+ var _a;
121
+ const els = [];
122
+ // #region Custom cell
123
+ const template = (_a = v.schemaModel.column) === null || _a === void 0 ? void 0 : _a.cellTemplate;
124
+ if (template) {
125
+ els.push(template(h, v.schemaModel, v.additionalData));
126
+ }
127
+ // #endregion
128
+ // #region Regular cell
129
+ else {
130
+ if (!v.schemaModel.column) {
131
+ // something is wrong with data
132
+ if (Build === null || Build === void 0 ? void 0 : Build.isDev) {
133
+ console.error('Investigate column problem.', v.schemaModel);
134
+ }
135
+ return '';
136
+ }
137
+ // Row drag
138
+ if (v.schemaModel.column.rowDrag &&
139
+ isRowDragService(v.schemaModel.column.rowDrag, v.schemaModel)) {
140
+ els.push(h("span", { class: DRAGGABLE_CLASS, onMouseDown: originalEvent => {
141
+ var _a;
142
+ return (_a = v.dragStartCell) === null || _a === void 0 ? void 0 : _a.emit({
143
+ originalEvent,
144
+ model: v.schemaModel,
145
+ });
146
+ } },
147
+ h("span", { class: DRAG_ICON_CLASS })));
148
+ }
149
+ els.push(`${getCellDataParsed(v.schemaModel.model, v.schemaModel.column)}`);
150
+ }
151
+ return els;
152
+ }
153
+ const CellRenderer = ({ renderProps, cellProps, }) => {
154
+ const render = renderCell.bind(null, renderProps);
155
+ return (h("div", Object.assign({}, cellProps, { redraw: render }), render()));
156
+ };
157
+
158
+ const revogrDataStyleCss = ".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-data{display:block;width:100%;position:relative}revogr-data .rgRow{position:absolute;width:100%;left:0}revogr-data .rgRow.groupingRow{font-weight:600;text-align:left}revogr-data .rgRow.groupingRow .group-expand{width:25px;height:100%;max-height:25px;margin-right:2px;background-color:transparent;border-color:transparent;vertical-align:middle;padding-left:5px}revogr-data .rgRow.groupingRow .group-expand svg{width:7px}revogr-data .revo-draggable{border:none;height:32px;display:inline-flex;outline:0;padding:0;font-size:0.8125rem;box-sizing:border-box;align-items:center;white-space:nowrap;vertical-align:middle;justify-content:center;text-decoration:none;width:24px;height:100%;cursor:pointer;display:inline-flex}revogr-data .revo-draggable:hover>.revo-drag-icon{opacity:1;zoom:1.2;font-weight:600}revogr-data .revo-draggable>.revo-drag-icon{pointer-events:none;transition:opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, zoom 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}revogr-data .rgCell{top:0;left:0;position:absolute;box-sizing:border-box;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;outline:none}revogr-data .rgCell.align-center{text-align:center}revogr-data .rgCell.align-left{text-align:left}revogr-data .rgCell.align-right{text-align:right}";
159
+ const RevogrDataStyle0 = revogrDataStyleCss;
160
+
161
+ const RevogrData = class {
162
+ constructor(hostRef) {
163
+ registerInstance(this, hostRef);
164
+ this.beforerowrender = createEvent(this, "beforerowrender", 7);
165
+ this.afterrender = createEvent(this, "afterrender", 7);
166
+ this.beforeCellRender = createEvent(this, "beforecellrender", 7);
167
+ this.beforeDataRender = createEvent(this, "beforedatarender", 7);
168
+ this.dragStartCell = createEvent(this, "dragstartcell", 7);
169
+ /**
170
+ * Rendered rows - virtual index vs vnode
171
+ */
172
+ this.renderedRows = new Map();
173
+ this.readonly = undefined;
174
+ this.range = undefined;
175
+ this.rowClass = undefined;
176
+ this.additionalData = undefined;
177
+ this.rowSelectionStore = undefined;
178
+ this.viewportRow = undefined;
179
+ this.viewportCol = undefined;
180
+ this.dimensionRow = undefined;
181
+ this.colData = undefined;
182
+ this.dataStore = undefined;
183
+ this.type = undefined;
184
+ this.colType = undefined;
185
+ this.jobsBeforeRender = [];
186
+ this.providers = undefined;
187
+ }
188
+ /**
189
+ * Pointed cell update.
190
+ */
191
+ async updateCell(e) {
192
+ var _a, _b, _c;
193
+ // Stencil tweak to update cell content
194
+ const cell = (_b = (_a = this.renderedRows.get(e.row)) === null || _a === void 0 ? void 0 : _a.$children$) === null || _b === void 0 ? void 0 : _b[e.col];
195
+ if ((_c = cell === null || cell === void 0 ? void 0 : cell.$attrs$) === null || _c === void 0 ? void 0 : _c.redraw) {
196
+ const children = await convertVNodeToHTML(this.element, cell.$attrs$.redraw);
197
+ cell.$elm$.innerHTML = children.html;
198
+ cell.$key$ = Math.random();
199
+ }
200
+ }
201
+ onDataStoreChange() {
202
+ this.onStoreChange();
203
+ }
204
+ onColDataChange() {
205
+ this.onStoreChange();
206
+ }
207
+ onStoreChange() {
208
+ var _a, _b;
209
+ (_a = this.columnService) === null || _a === void 0 ? void 0 : _a.destroy();
210
+ this.columnService = new ColumnService(this.dataStore, this.colData);
211
+ // make sure we have correct data, before render
212
+ this.providers = {
213
+ type: this.type,
214
+ readonly: this.readonly,
215
+ data: this.dataStore,
216
+ viewport: this.viewportCol,
217
+ dimension: this.dimensionRow,
218
+ selection: this.rowSelectionStore,
219
+ };
220
+ (_b = this.rangeUnsubscribe) === null || _b === void 0 ? void 0 : _b.call(this);
221
+ this.rangeUnsubscribe = this.rowSelectionStore.onChange('range', (e) => this.rowHighlightPlugin.selectionChange(e, this.renderedRows));
222
+ }
223
+ connectedCallback() {
224
+ this.rowHighlightPlugin = new RowHighlightPlugin();
225
+ this.onStoreChange();
226
+ }
227
+ disconnectedCallback() {
228
+ var _a, _b;
229
+ (_a = this.columnService) === null || _a === void 0 ? void 0 : _a.destroy();
230
+ (_b = this.rangeUnsubscribe) === null || _b === void 0 ? void 0 : _b.call(this);
231
+ }
232
+ async componentWillRender() {
233
+ this.beforeDataRender.emit({
234
+ rowType: this.type,
235
+ colType: this.colType,
236
+ });
237
+ return Promise.all(this.jobsBeforeRender.map(p => typeof p === 'function' ? p() : p));
238
+ }
239
+ componentDidRender() {
240
+ this.afterrender.emit({ type: this.type });
241
+ }
242
+ render() {
243
+ this.renderedRows = new Map();
244
+ const columnsData = this.columnService.columns;
245
+ if (!columnsData.length) {
246
+ return;
247
+ }
248
+ const rows = this.viewportRow.get('items');
249
+ if (!rows.length) {
250
+ return;
251
+ }
252
+ const cols = this.viewportCol.get('items');
253
+ if (!cols.length) {
254
+ return;
255
+ }
256
+ const rowsEls = [];
257
+ const depth = this.dataStore.get('groupingDepth');
258
+ const groupingCustomRenderer = this.dataStore.get('groupingCustomRenderer');
259
+ const groupDepth = this.columnService.hasGrouping ? depth : 0;
260
+ for (let rgRow of rows) {
261
+ const dataItem = getSourceItem(this.dataStore, rgRow.itemIndex);
262
+ // #region Grouping
263
+ if (isGrouping(dataItem)) {
264
+ const gmodel = Object.assign(Object.assign({}, rgRow), { index: rgRow.itemIndex, model: dataItem, groupingCustomRenderer, hasExpand: this.columnService.hasGrouping, providers: this.providers });
265
+ rowsEls.push(h(GroupingRowRenderer, Object.assign({}, gmodel)));
266
+ continue;
267
+ }
268
+ // #endregion
269
+ const cells = [];
270
+ // #region Cells
271
+ for (let rgCol of cols) {
272
+ const smodel = Object.assign(Object.assign({}, this.columnService.rowDataModel(rgRow.itemIndex, rgCol.itemIndex)), { providers: this.providers });
273
+ // call before cell render
274
+ const cellEvent = this.triggerBeforeCellRender(smodel, rgRow, rgCol);
275
+ // if event was prevented
276
+ if (cellEvent.defaultPrevented) {
277
+ continue;
278
+ }
279
+ const { detail: { column: columnProps, row: rowProps, model: schemaModel }, } = cellEvent;
280
+ const defaultProps = {
281
+ [DATA_COL]: columnProps.itemIndex,
282
+ [DATA_ROW]: rowProps.itemIndex,
283
+ style: {
284
+ width: `${columnProps.size}px`,
285
+ transform: `translateX(${columnProps.start}px)`,
286
+ height: rowProps.size ? `${rowProps.size}px` : undefined,
287
+ },
288
+ };
289
+ /**
290
+ * For grouping, can be removed in the future and replaced with event
291
+ */
292
+ if (groupDepth && !columnProps.itemIndex && defaultProps.style) {
293
+ defaultProps.style.paddingLeft = `${PADDING_DEPTH * groupDepth}px`;
294
+ }
295
+ const props = this.columnService.mergeProperties(rowProps.itemIndex, columnProps.itemIndex, defaultProps, schemaModel);
296
+ // Never use webcomponent for cell render
297
+ // It's very slow because of webcomponent initialization takes time
298
+ const cellNode = h(CellRenderer, { renderProps: {
299
+ schemaModel,
300
+ additionalData: this.additionalData,
301
+ dragStartCell: this.dragStartCell,
302
+ }, cellProps: props });
303
+ cells.push(cellNode);
304
+ }
305
+ // #endregion
306
+ // #region Rows
307
+ let rowClass = this.rowClass
308
+ ? this.columnService.getRowClass(rgRow.itemIndex, this.rowClass)
309
+ : '';
310
+ if (this.rowHighlightPlugin.isRowFocused(rgRow.itemIndex)) {
311
+ rowClass += ` ${ROW_FOCUSED_CLASS}`;
312
+ }
313
+ const row = (h(RowRenderer, { index: rgRow.itemIndex, rowClass: rowClass, size: rgRow.size, start: rgRow.start }, cells));
314
+ this.beforerowrender.emit({
315
+ node: row,
316
+ item: rgRow,
317
+ model: dataItem,
318
+ colType: this.columnService.type,
319
+ rowType: this.type,
320
+ });
321
+ rowsEls.push(row);
322
+ this.renderedRows.set(rgRow.itemIndex, row);
323
+ // #endregion
324
+ }
325
+ return (h(Host, null, h("slot", null), rowsEls));
326
+ }
327
+ triggerBeforeCellRender(model, row, column) {
328
+ const detail = {
329
+ column,
330
+ row,
331
+ model,
332
+ rowType: model.type,
333
+ colType: model.colType,
334
+ };
335
+ return this.beforeCellRender.emit(detail);
336
+ }
337
+ get element() { return getElement(this); }
338
+ static get watchers() { return {
339
+ "dataStore": ["onDataStoreChange"],
340
+ "colData": ["onColDataChange"]
341
+ }; }
342
+ };
343
+ RevogrData.style = RevogrDataStyle0;
344
+
345
+ var defineProperty = (function() {
346
+ try {
347
+ var func = getNative(Object, 'defineProperty');
348
+ func({}, '', {});
349
+ return func;
350
+ } catch (e) {}
351
+ }());
352
+
353
+ const defineProperty$1 = defineProperty;
354
+
355
+ /**
356
+ * The base implementation of `assignValue` and `assignMergeValue` without
357
+ * value checks.
358
+ *
359
+ * @private
360
+ * @param {Object} object The object to modify.
361
+ * @param {string} key The key of the property to assign.
362
+ * @param {*} value The value to assign.
363
+ */
364
+ function baseAssignValue(object, key, value) {
365
+ if (key == '__proto__' && defineProperty$1) {
366
+ defineProperty$1(object, key, {
367
+ 'configurable': true,
368
+ 'enumerable': true,
369
+ 'value': value,
370
+ 'writable': true
371
+ });
372
+ } else {
373
+ object[key] = value;
374
+ }
375
+ }
376
+
377
+ /**
378
+ * A specialized version of `baseAggregator` for arrays.
379
+ *
380
+ * @private
381
+ * @param {Array} [array] The array to iterate over.
382
+ * @param {Function} setter The function to set `accumulator` values.
383
+ * @param {Function} iteratee The iteratee to transform keys.
384
+ * @param {Object} accumulator The initial aggregated object.
385
+ * @returns {Function} Returns `accumulator`.
386
+ */
387
+ function arrayAggregator(array, setter, iteratee, accumulator) {
388
+ var index = -1,
389
+ length = array == null ? 0 : array.length;
390
+
391
+ while (++index < length) {
392
+ var value = array[index];
393
+ setter(accumulator, value, iteratee(value), array);
394
+ }
395
+ return accumulator;
396
+ }
397
+
398
+ /**
399
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
400
+ * by `iteratee` and values set by `setter`.
401
+ *
402
+ * @private
403
+ * @param {Array|Object} collection The collection to iterate over.
404
+ * @param {Function} setter The function to set `accumulator` values.
405
+ * @param {Function} iteratee The iteratee to transform keys.
406
+ * @param {Object} accumulator The initial aggregated object.
407
+ * @returns {Function} Returns `accumulator`.
408
+ */
409
+ function baseAggregator(collection, setter, iteratee, accumulator) {
410
+ baseEach(collection, function(value, key, collection) {
411
+ setter(accumulator, value, iteratee(value), collection);
412
+ });
413
+ return accumulator;
414
+ }
415
+
416
+ /**
417
+ * Creates a function like `_.groupBy`.
418
+ *
419
+ * @private
420
+ * @param {Function} setter The function to set accumulator values.
421
+ * @param {Function} [initializer] The accumulator object initializer.
422
+ * @returns {Function} Returns the new aggregator function.
423
+ */
424
+ function createAggregator(setter, initializer) {
425
+ return function(collection, iteratee) {
426
+ var func = isArray(collection) ? arrayAggregator : baseAggregator,
427
+ accumulator = initializer ? initializer() : {};
428
+
429
+ return func(collection, setter, baseIteratee(iteratee), accumulator);
430
+ };
431
+ }
432
+
433
+ /**
434
+ * Creates an object composed of keys generated from the results of running
435
+ * each element of `collection` thru `iteratee`. The corresponding value of
436
+ * each key is the last element responsible for generating the key. The
437
+ * iteratee is invoked with one argument: (value).
438
+ *
439
+ * @static
440
+ * @memberOf _
441
+ * @since 4.0.0
442
+ * @category Collection
443
+ * @param {Array|Object} collection The collection to iterate over.
444
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
445
+ * @returns {Object} Returns the composed aggregate object.
446
+ * @example
447
+ *
448
+ * var array = [
449
+ * { 'dir': 'left', 'code': 97 },
450
+ * { 'dir': 'right', 'code': 100 }
451
+ * ];
452
+ *
453
+ * _.keyBy(array, function(o) {
454
+ * return String.fromCharCode(o.code);
455
+ * });
456
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
457
+ *
458
+ * _.keyBy(array, 'dir');
459
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
460
+ */
461
+ var keyBy = createAggregator(function(result, value, key) {
462
+ baseAssignValue(result, key, value);
463
+ });
464
+
465
+ const keyBy$1 = keyBy;
466
+
467
+ const HeaderRenderer = (p) => {
468
+ var _a, _b, _c, _d, _e;
469
+ const cellClass = {
470
+ [HEADER_CLASS]: true,
471
+ [HEADER_SORTABLE_CLASS]: !!((_a = p.data) === null || _a === void 0 ? void 0 : _a.sortable),
472
+ };
473
+ if ((_b = p.data) === null || _b === void 0 ? void 0 : _b.order) {
474
+ cellClass[p.data.order] = true;
475
+ }
476
+ const dataProps = {
477
+ [DATA_COL]: p.column.itemIndex,
478
+ canResize: p.canResize,
479
+ minWidth: ((_c = p.data) === null || _c === void 0 ? void 0 : _c.minSize) || MIN_COL_SIZE,
480
+ maxWidth: (_d = p.data) === null || _d === void 0 ? void 0 : _d.maxSize,
481
+ active: p.active || ['r'],
482
+ class: cellClass,
483
+ style: {
484
+ width: `${p.column.size}px`,
485
+ transform: `translateX(${p.column.start}px)`,
486
+ },
487
+ onResize: p.onResize,
488
+ onDblClick(originalEvent) {
489
+ var _a;
490
+ (_a = p.onDblClick) === null || _a === void 0 ? void 0 : _a.call(p, {
491
+ column: p.data,
492
+ index: p.column.itemIndex,
493
+ originalEvent,
494
+ providers: p.data.providers,
495
+ });
496
+ },
497
+ onClick(originalEvent) {
498
+ if (originalEvent.defaultPrevented || !p.onClick) {
499
+ return;
500
+ }
501
+ p.onClick({
502
+ column: p.data,
503
+ index: p.column.itemIndex,
504
+ originalEvent,
505
+ providers: p.data.providers,
506
+ });
507
+ },
508
+ };
509
+ if (p.range) {
510
+ if (p.column.itemIndex >= p.range.x && p.column.itemIndex <= p.range.x1) {
511
+ if (typeof dataProps.class === 'object') {
512
+ dataProps.class[FOCUS_CLASS] = true;
513
+ }
514
+ }
515
+ }
516
+ return (h(HeaderCellRenderer, { data: p.data, props: dataProps, additionalData: p.additionalData },
517
+ h(SortingSign, { column: p.data }),
518
+ p.canFilter && ((_e = p.data) === null || _e === void 0 ? void 0 : _e.filter) !== false ? (h(FilterButton, { column: p.data })) : ('')));
519
+ };
520
+
521
+ const revogrHeaderStyleCss = "@charset \"UTF-8\";.revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revogr-header{position:relative;z-index:5;display:block}revogr-header .rgHeaderCell{display:flex}revogr-header .rgHeaderCell.align-center{text-align:center}revogr-header .rgHeaderCell.align-left{text-align:left}revogr-header .rgHeaderCell.align-right{text-align:right}revogr-header .rgHeaderCell.sortable{cursor:pointer}revogr-header .rgHeaderCell i.asc:after,revogr-header .rgHeaderCell i.desc:after{font-size:13px}revogr-header .rgHeaderCell i.asc:after{content:\"↑\"}revogr-header .rgHeaderCell i.desc:after{content:\"↓\"}revogr-header .rgHeaderCell,revogr-header .grouped-cell{position:absolute;box-sizing:border-box;height:100%;z-index:1}revogr-header .header-rgRow{display:block;position:relative}revogr-header .header-rgRow.group{z-index:0}revogr-header .group-rgRow{position:relative}revogr-header .rgHeaderCell.active{z-index:10}revogr-header .rgHeaderCell.active .resizable{background-color:deepskyblue}revogr-header .rgHeaderCell .header-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}revogr-header .rgHeaderCell .resizable{display:block;position:absolute;z-index:90;touch-action:none;user-select:none}revogr-header .rgHeaderCell .resizable:hover{background-color:deepskyblue}revogr-header .rgHeaderCell>.resizable-r{cursor:ew-resize;width:6px;right:0;top:0;height:100%}revogr-header .rgHeaderCell>.resizable-rb{cursor:se-resize;width:6px;height:6px;right:0;bottom:0}revogr-header .rgHeaderCell>.resizable-b{cursor:s-resize;height:6px;bottom:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-lb{cursor:sw-resize;width:6px;height:6px;left:0;bottom:0}revogr-header .rgHeaderCell>.resizable-l{cursor:w-resize;width:6px;left:0;height:100%;top:0}revogr-header .rgHeaderCell>.resizable-lt{cursor:nw-resize;width:6px;height:6px;left:0;top:0}revogr-header .rgHeaderCell>.resizable-t{cursor:n-resize;height:6px;top:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-rt{cursor:ne-resize;width:6px;height:6px;right:0;top:0}revogr-header .rv-filter{visibility:hidden}";
522
+ const RevogrHeaderStyle0 = revogrHeaderStyleCss;
523
+
524
+ const RevogrHeaderComponent = class {
525
+ constructor(hostRef) {
526
+ registerInstance(this, hostRef);
527
+ this.initialHeaderClick = createEvent(this, "beforeheaderclick", 7);
528
+ this.headerresize = createEvent(this, "headerresize", 7);
529
+ this.beforeResize = createEvent(this, "beforeheaderresize", 7);
530
+ this.headerdblClick = createEvent(this, "headerdblclick", 7);
531
+ this.beforeHeaderRender = createEvent(this, "beforeheaderrender", 7);
532
+ this.afterHeaderRender = createEvent(this, "afterheaderrender", 7);
533
+ this.viewportCol = undefined;
534
+ this.dimensionCol = undefined;
535
+ this.selectionStore = undefined;
536
+ this.groups = undefined;
537
+ this.groupingDepth = 0;
538
+ this.readonly = undefined;
539
+ this.canResize = undefined;
540
+ this.resizeHandler = undefined;
541
+ this.colData = undefined;
542
+ this.columnFilter = undefined;
543
+ this.type = undefined;
544
+ this.additionalData = {};
545
+ }
546
+ onResize({ width }, index) {
547
+ const col = this.colData[index];
548
+ const event = this.beforeResize.emit([
549
+ Object.assign(Object.assign({}, col), { size: width || undefined }),
550
+ ]);
551
+ if (event.defaultPrevented) {
552
+ return;
553
+ }
554
+ this.headerresize.emit({ [index]: width || 0 });
555
+ }
556
+ onResizeGroup(changedX, startIndex, endIndex) {
557
+ const sizes = {};
558
+ const cols = keyBy$1(this.viewportCol.get('items'), 'itemIndex');
559
+ const change = changedX / (endIndex - startIndex + 1);
560
+ for (let i = startIndex; i <= endIndex; i++) {
561
+ const item = cols[i];
562
+ if (item) {
563
+ sizes[i] = item.size + change;
564
+ }
565
+ }
566
+ this.headerresize.emit(sizes);
567
+ }
568
+ componentDidRender() {
569
+ this.afterHeaderRender.emit(this.providers);
570
+ }
571
+ render() {
572
+ var _a;
573
+ const cols = this.viewportCol.get('items');
574
+ const range = (_a = this.selectionStore) === null || _a === void 0 ? void 0 : _a.get('range');
575
+ const cells = [];
576
+ const visibleProps = {};
577
+ // render header columns
578
+ for (let rgCol of cols) {
579
+ const colData = this.colData[rgCol.itemIndex];
580
+ const props = {
581
+ range: range,
582
+ column: rgCol,
583
+ data: Object.assign(Object.assign({}, colData), { index: rgCol.itemIndex, providers: this.providers }),
584
+ canFilter: !!this.columnFilter,
585
+ canResize: this.canResize,
586
+ active: this.resizeHandler,
587
+ onResize: e => this.onResize(e, rgCol.itemIndex),
588
+ onDblClick: e => this.headerdblClick.emit(e),
589
+ onClick: e => this.initialHeaderClick.emit(e),
590
+ additionalData: this.additionalData,
591
+ };
592
+ const event = this.beforeHeaderRender.emit(props);
593
+ if (event.defaultPrevented) {
594
+ continue;
595
+ }
596
+ cells.push(h(HeaderRenderer, Object.assign({}, event.detail)));
597
+ visibleProps[colData === null || colData === void 0 ? void 0 : colData.prop] = rgCol.itemIndex;
598
+ }
599
+ return [
600
+ h("div", { key: 'f01cf39610e7e66f7bf4fa09f52455875a940ced', class: "group-rgRow" }, h(ColumnGroupsRenderer, { key: 'fa60d0aa9bb63d86f7e07ed7c1372207147a13c4', canResize: this.canResize, active: this.resizeHandler, visibleProps: visibleProps, providers: this.providers, groups: this.groups, dimensionCol: this.dimensionCol.state, depth: this.groupingDepth, onResize: (changedX, startIndex, endIndex) => this.onResizeGroup(changedX, startIndex, endIndex), additionalData: this.additionalData })),
601
+ h("div", { key: '65ab0e1d0ea5a548c7dc4abfda116beb29316b3d', class: `${HEADER_ROW_CLASS} ${HEADER_ACTUAL_ROW_CLASS}` }, cells),
602
+ ];
603
+ }
604
+ get providers() {
605
+ return {
606
+ type: this.type,
607
+ readonly: this.readonly,
608
+ data: this.colData,
609
+ viewport: this.viewportCol,
610
+ dimension: this.dimensionCol,
611
+ selection: this.selectionStore,
612
+ };
613
+ }
614
+ get element() { return getElement(this); }
615
+ };
616
+ RevogrHeaderComponent.style = RevogrHeaderStyle0;
617
+
618
+ async function resizeObserver() {
619
+ if (!('ResizeObserver' in window)) {
620
+ const module = await import('./resize-observer-83c9e167.js');
621
+ window.ResizeObserver = module.ResizeObserver;
622
+ }
623
+ }
624
+
625
+ class GridResizeService {
626
+ constructor(el, resize) {
627
+ this.resize = resize;
628
+ this.resizeObserver = null;
629
+ this.previousSize = {
630
+ width: 0,
631
+ height: 0,
632
+ };
633
+ this.apply = throttle((e) => {
634
+ var _a;
635
+ if (!e.length) {
636
+ return;
637
+ }
638
+ const entry = {
639
+ width: e[0].contentRect.width,
640
+ height: e[0].contentRect.height,
641
+ };
642
+ (_a = this.resize) === null || _a === void 0 ? void 0 : _a.call(this, entry, this.previousSize);
643
+ this.previousSize = entry;
644
+ }, 10);
645
+ this.init(el);
646
+ }
647
+ async init(el) {
648
+ var _a;
649
+ await resizeObserver();
650
+ this.resizeObserver = new ResizeObserver(this.apply);
651
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(el);
652
+ }
653
+ destroy() {
654
+ var _a;
655
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
656
+ this.resizeObserver = null;
657
+ }
658
+ }
659
+
660
+ const revogrViewportScrollStyleCss = ".revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:\"::\"}.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:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}.rowHeaders{z-index:2;font-size:10px;display:flex;height:100%}.rowHeaders revogr-data .rgCell{text-align:center}.rowHeaders .rgCell{padding:0 1em !important;min-width:100%}revogr-viewport-scroll{-ms-overflow-style:none;scrollbar-width:none;overflow-x:auto;overflow-y:hidden;position:relative;z-index:1;height:100%}revogr-viewport-scroll::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll.colPinStart,revogr-viewport-scroll.colPinEnd{z-index:2}revogr-viewport-scroll.colPinEnd:has(.active){overflow:visible}revogr-viewport-scroll.rgCol{flex-grow:1}revogr-viewport-scroll .content-wrapper{overflow:hidden}revogr-viewport-scroll .inner-content-table{display:flex;flex-direction:column;max-height:100%;width:100%;min-width:100%;position:relative;z-index:0}revogr-viewport-scroll .vertical-inner{overflow-y:auto;position:relative;width:100%;flex-grow:1;outline:none;-ms-overflow-style:none;scrollbar-width:none;}revogr-viewport-scroll .vertical-inner::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll .vertical-inner revogr-data,revogr-viewport-scroll .vertical-inner revogr-overlay-selection{height:100%}";
661
+ const RevogrViewportScrollStyle0 = revogrViewportScrollStyleCss;
662
+
663
+ const RevogrViewportScroll = class {
664
+ constructor(hostRef) {
665
+ registerInstance(this, hostRef);
666
+ this.scrollViewport = createEvent(this, "scrollviewport", 7);
667
+ this.resizeViewport = createEvent(this, "resizeviewport", 7);
668
+ this.scrollchange = createEvent(this, "scrollchange", 7);
669
+ this.silentScroll = createEvent(this, "scrollviewportsilent", 7);
670
+ this.rowHeader = undefined;
671
+ this.contentWidth = 0;
672
+ this.contentHeight = 0;
673
+ this.colType = undefined;
674
+ }
675
+ async setScroll(e) {
676
+ var _a;
677
+ this.localScrollTimer.latestScrollUpdate(e.dimension);
678
+ (_a = this.localScrollService) === null || _a === void 0 ? void 0 : _a.setScroll(e);
679
+ }
680
+ /**
681
+ * update on delta in case we don't know existing position or external change
682
+ * @param e
683
+ */
684
+ async changeScroll(e, silent = false) {
685
+ var _a, _b;
686
+ if (silent) {
687
+ if (e.coordinate && this.verticalScroll) {
688
+ switch (e.dimension) {
689
+ // for mobile devices to skip negative scroll loop. only on vertical scroll
690
+ case 'rgRow':
691
+ this.verticalScroll.style.transform = `translateY(${-1 * e.coordinate}px)`;
692
+ break;
693
+ }
694
+ }
695
+ return;
696
+ }
697
+ if (e.delta) {
698
+ switch (e.dimension) {
699
+ case 'rgCol':
700
+ e.coordinate = this.horizontalScroll.scrollLeft + e.delta;
701
+ break;
702
+ case 'rgRow':
703
+ e.coordinate = ((_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.scrollTop) !== null && _b !== void 0 ? _b : 0) + e.delta;
704
+ break;
705
+ }
706
+ this.setScroll(e);
707
+ }
708
+ return e;
709
+ }
710
+ /**
711
+ * Dispatch this event to trigger vertical mouse wheel from plugins
712
+ */
713
+ mousewheelVertical({ detail: e, }) {
714
+ this.verticalMouseWheel(e);
715
+ }
716
+ /**
717
+ * Dispatch this event to trigger horizontal mouse wheel from plugins
718
+ */
719
+ mousewheelHorizontal({ detail: e, }) {
720
+ this.horizontalMouseWheel(e);
721
+ }
722
+ /**
723
+ * Allows to use outside listener
724
+ */
725
+ scrollApply({ detail: { type, coordinate }, }) {
726
+ this.applyOnScroll(type, coordinate, true);
727
+ }
728
+ connectedCallback() {
729
+ /**
730
+ * Bind scroll functions for farther usage
731
+ */
732
+ // allow mousewheel for all devices including mobile
733
+ this.verticalMouseWheel = this.onVerticalMouseWheel.bind(this, 'rgRow', 'deltaY');
734
+ this.horizontalMouseWheel = this.onHorizontalMouseWheel.bind(this, 'rgCol', 'deltaX');
735
+ this.localScrollTimer = new LocalScrollTimer('ontouchstart' in document.documentElement ? 0 : 10);
736
+ /**
737
+ * Create local scroll service
738
+ */
739
+ this.localScrollService = new LocalScrollService({
740
+ // to improve safari smoothnes on scroll
741
+ // skipAnimationFrame: isSafariDesktop(),
742
+ runScroll: e => this.scrollViewport.emit(e),
743
+ applyScroll: e => {
744
+ this.localScrollTimer.setCoordinate(e);
745
+ switch (e.dimension) {
746
+ case 'rgCol':
747
+ // this will trigger on scroll event
748
+ this.horizontalScroll.scrollLeft = e.coordinate;
749
+ break;
750
+ case 'rgRow':
751
+ if (this.verticalScroll) {
752
+ // this will trigger on scroll event
753
+ this.verticalScroll.scrollTop = e.coordinate;
754
+ // for mobile devices to skip negative scroll loop. only on vertical scroll
755
+ if (this.verticalScroll.style.transform) {
756
+ this.verticalScroll.style.transform = '';
757
+ }
758
+ }
759
+ break;
760
+ }
761
+ },
762
+ });
763
+ }
764
+ componentDidLoad() {
765
+ // track horizontal viewport resize
766
+ this.resizeService = new GridResizeService(this.horizontalScroll, (entry, previousSize) => {
767
+ var _a, _b, _c, _d, _e, _f, _g, _h;
768
+ const els = {};
769
+ if (entry.height !== previousSize.height) {
770
+ let height = entry.height || 0;
771
+ if (height) {
772
+ height -=
773
+ ((_b = (_a = this.header) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0) +
774
+ ((_d = (_c = this.footer) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0);
775
+ }
776
+ els.rgRow = {
777
+ size: height,
778
+ contentSize: this.contentHeight,
779
+ scroll: (_f = (_e = this.verticalScroll) === null || _e === void 0 ? void 0 : _e.scrollTop) !== null && _f !== void 0 ? _f : 0,
780
+ noScroll: false,
781
+ };
782
+ }
783
+ if (entry.width !== previousSize.width) {
784
+ els.rgCol = {
785
+ size: entry.width || 0,
786
+ contentSize: this.contentWidth,
787
+ scroll: this.horizontalScroll.scrollLeft,
788
+ noScroll: this.colType !== 'rgCol',
789
+ };
790
+ }
791
+ for (const [dim, item] of Object.entries(els)) {
792
+ const dimension = dim;
793
+ this.resizeViewport.emit({
794
+ dimension,
795
+ size: item.size,
796
+ rowHeader: this.rowHeader,
797
+ });
798
+ if (item.noScroll) {
799
+ continue;
800
+ }
801
+ (_g = this.localScrollService) === null || _g === void 0 ? void 0 : _g.scroll((_h = item.scroll) !== null && _h !== void 0 ? _h : 0, dimension, true);
802
+ // track scroll visibility on outer element change
803
+ this.setScrollVisibility(dimension, item.size, item.contentSize);
804
+ }
805
+ });
806
+ }
807
+ /**
808
+ * Check if scroll present or not per type
809
+ * Trigger this method on inner content size change or on outer element size change
810
+ * If inner content bigger then outer size then scroll is present and mousewheel binding required
811
+ * @param type - dimension type 'rgRow/y' or 'rgCol/x'
812
+ * @param size - outer content size
813
+ * @param innerContentSize - inner content size
814
+ */
815
+ setScrollVisibility(type, size, innerContentSize) {
816
+ // test if scroll present
817
+ const hasScroll = size < innerContentSize;
818
+ let el;
819
+ // event reference for binding
820
+ switch (type) {
821
+ case 'rgCol':
822
+ el = this.horizontalScroll;
823
+ break;
824
+ case 'rgRow':
825
+ el = this.verticalScroll;
826
+ break;
827
+ }
828
+ // based on scroll visibility assign or remove class and event
829
+ if (hasScroll) {
830
+ el === null || el === void 0 ? void 0 : el.classList.add(`scroll-${type}`);
831
+ }
832
+ else {
833
+ el === null || el === void 0 ? void 0 : el.classList.remove(`scroll-${type}`);
834
+ }
835
+ this.scrollchange.emit({ type, hasScroll });
836
+ }
837
+ disconnectedCallback() {
838
+ var _a;
839
+ (_a = this.resizeService) === null || _a === void 0 ? void 0 : _a.destroy();
840
+ }
841
+ async componentDidRender() {
842
+ var _a, _b, _c, _d;
843
+ this.localScrollService.setParams({
844
+ contentSize: this.contentHeight,
845
+ clientSize: (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0,
846
+ virtualSize: 0,
847
+ }, 'rgRow');
848
+ this.localScrollService.setParams({
849
+ contentSize: this.contentWidth,
850
+ clientSize: this.horizontalScroll.clientWidth,
851
+ virtualSize: 0,
852
+ }, 'rgCol');
853
+ this.setScrollVisibility('rgRow', (_d = (_c = this.verticalScroll) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0, this.contentHeight);
854
+ this.setScrollVisibility('rgCol', this.horizontalScroll.clientWidth, this.contentWidth);
855
+ }
856
+ render() {
857
+ return (h(Host, { key: '970ac2365588d1c894d9684113eb9beaf64e1a1d', onWheel: this.horizontalMouseWheel, onScroll: (e) => this.applyScroll('rgCol', e) }, h("div", { key: 'dc57aab1bde4496e83131d80a7e189db25b93312', class: "inner-content-table", style: { width: `${this.contentWidth}px` } }, h("div", { key: 'bd014cf0a67bb913016f00f7838344611a1b26df', class: "header-wrapper", ref: e => (this.header = e) }, h("slot", { key: '772eb408b6ea670624cc338550215565ec36ef89', name: HEADER_SLOT })), h("div", { key: '5dcf061c78864b0dc4e4ffbcc28c0ebb3536ce8b', class: "vertical-inner", ref: el => (this.verticalScroll = el), onWheel: this.verticalMouseWheel, onScroll: (e) => this.applyScroll('rgRow', e) }, h("div", { key: 'b45f46aedefe82843b086cdca822e05339a77fda', class: "content-wrapper", style: { height: `${this.contentHeight}px` } }, h("slot", { key: '8d07196c79741ace0f4c734138d69abdf96fee4f', name: CONTENT_SLOT }))), h("div", { key: 'f6313f9394e99a3ad07895ed06e965540268b35a', class: "footer-wrapper", ref: e => (this.footer = e) }, h("slot", { key: 'b1bcdb75bb5e4dcc1e43493d7b4f01b2578352e4', name: FOOTER_SLOT })))));
858
+ }
859
+ /**
860
+ * Extra layer for scroll event monitoring, where MouseWheel event is not passing
861
+ * We need to trigger scroll event in case there is no mousewheel event
862
+ */
863
+ async applyScroll(type, e) {
864
+ if (!(e.target instanceof HTMLElement)) {
865
+ return;
866
+ }
867
+ let scroll = 0;
868
+ switch (type) {
869
+ case 'rgCol':
870
+ scroll = e.target.scrollLeft;
871
+ break;
872
+ case 'rgRow':
873
+ scroll = e.target.scrollTop;
874
+ break;
875
+ }
876
+ // for mobile devices to skip negative scroll loop
877
+ if (scroll < 0) {
878
+ this.silentScroll.emit({ dimension: type, coordinate: scroll });
879
+ return;
880
+ }
881
+ this.applyOnScroll(type, scroll);
882
+ }
883
+ /**
884
+ * Applies change on scroll event only if mousewheel event happened some time ago
885
+ */
886
+ applyOnScroll(type, coordinate, outside = false) {
887
+ var _a;
888
+ // apply after throttling
889
+ if (this.localScrollTimer.isReady(type, coordinate)) {
890
+ (_a = this.localScrollService) === null || _a === void 0 ? void 0 : _a.scroll(coordinate, type, undefined, undefined, outside);
891
+ }
892
+ }
893
+ /**
894
+ * On vertical mousewheel event
895
+ * @param type
896
+ * @param delta
897
+ * @param e
898
+ */
899
+ onVerticalMouseWheel(type, delta, e) {
900
+ var _a, _b, _c, _d, _e, _f, _g, _h;
901
+ const scrollTop = (_b = (_a = this.verticalScroll) === null || _a === void 0 ? void 0 : _a.scrollTop) !== null && _b !== void 0 ? _b : 0;
902
+ const clientHeight = (_d = (_c = this.verticalScroll) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0;
903
+ const scrollHeight = (_f = (_e = this.verticalScroll) === null || _e === void 0 ? void 0 : _e.scrollHeight) !== null && _f !== void 0 ? _f : 0;
904
+ // Detect if the user has reached the bottom
905
+ const atBottom = scrollTop + clientHeight >= scrollHeight && e.deltaY > 0;
906
+ const atTop = scrollTop === 0 && e.deltaY < 0;
907
+ if (!atBottom && !atTop) {
908
+ (_g = e.preventDefault) === null || _g === void 0 ? void 0 : _g.call(e);
909
+ }
910
+ const pos = scrollTop + e[delta];
911
+ (_h = this.localScrollService) === null || _h === void 0 ? void 0 : _h.scroll(pos, type, undefined, e[delta]);
912
+ this.localScrollTimer.latestScrollUpdate(type);
913
+ }
914
+ /**
915
+ * On horizontal mousewheel event
916
+ * @param type
917
+ * @param delta
918
+ * @param e
919
+ */
920
+ onHorizontalMouseWheel(type, delta, e) {
921
+ var _a, _b;
922
+ if (!e.deltaX) {
923
+ return;
924
+ }
925
+ const { scrollLeft, scrollWidth, clientWidth } = this.horizontalScroll;
926
+ // Detect if the user has reached the right end
927
+ const atRight = scrollLeft + clientWidth >= scrollWidth && e.deltaX > 0;
928
+ // Detect if the user has reached the left end
929
+ const atLeft = scrollLeft === 0 && e.deltaX < 0;
930
+ if (!atRight && !atLeft) {
931
+ (_a = e.preventDefault) === null || _a === void 0 ? void 0 : _a.call(e);
932
+ }
933
+ const pos = scrollLeft + e[delta];
934
+ (_b = this.localScrollService) === null || _b === void 0 ? void 0 : _b.scroll(pos, type, undefined, e[delta]);
935
+ this.localScrollTimer.latestScrollUpdate(type);
936
+ }
937
+ get horizontalScroll() { return getElement(this); }
938
+ };
939
+ RevogrViewportScroll.style = RevogrViewportScrollStyle0;
940
+
941
+ const VNodeToHtml = class {
942
+ constructor(hostRef) {
943
+ registerInstance(this, hostRef);
944
+ this.html = createEvent(this, "html", 7);
945
+ this.vnodes = [];
946
+ this.redraw = null;
947
+ }
948
+ componentDidRender() {
949
+ this.html.emit({
950
+ html: this.el.innerHTML,
951
+ vnodes: this.vnodes,
952
+ });
953
+ }
954
+ render() {
955
+ var _a, _b;
956
+ this.vnodes = (_b = (_a = this.redraw) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : null;
957
+ return (h(Host, { key: '73a019dbc046a9d4504bc84a80868e8023d1f502', style: { visibility: 'hidden', position: 'absolute' } }, this.vnodes));
958
+ }
959
+ get el() { return getElement(this); }
960
+ };
961
+
962
+ export { RevogrData as revogr_data, RevogrHeaderComponent as revogr_header, RevogrViewportScroll as revogr_viewport_scroll, VNodeToHtml as vnode_html };
963
+
5
964
  //# sourceMappingURL=revogr-data_4.entry.js.map