@revolist/revogrid 4.8.19 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/cjs/{column.service-ad5ffa3c.js → column.service-6f691f50.js} +2 -2
  2. package/dist/cjs/{column.service-ad5ffa3c.js.map → column.service-6f691f50.js.map} +1 -1
  3. package/dist/cjs/{header-cell-renderer-d92249e4.js → header-cell-renderer-81a22b00.js} +2 -2
  4. package/dist/cjs/{header-cell-renderer-d92249e4.js.map → header-cell-renderer-81a22b00.js.map} +1 -1
  5. package/dist/cjs/{index-a9f1b728.js → index-2410bbd9.js} +1 -3
  6. package/dist/cjs/index-2410bbd9.js.map +1 -0
  7. package/dist/cjs/{key.utils-e6c8a895.js → key.utils-1e48ab8f.js} +2 -2
  8. package/dist/cjs/{key.utils-e6c8a895.js.map → key.utils-1e48ab8f.js.map} +1 -1
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/revo-grid.cjs.entry.js +15 -19
  11. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
  12. package/dist/cjs/revo-grid.cjs.js +1 -1
  13. package/dist/cjs/revogr-attribution_6.cjs.entry.js +4 -4
  14. package/dist/cjs/revogr-clipboard_3.cjs.entry.js +2 -2
  15. package/dist/cjs/revogr-data_4.cjs.entry.js +4 -4
  16. package/dist/cjs/revogr-filter-panel.cjs.entry.js +14 -17
  17. package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
  18. package/dist/cjs/{throttle-46478b04.js → throttle-bcc4740d.js} +2 -2
  19. package/dist/cjs/{throttle-46478b04.js.map → throttle-bcc4740d.js.map} +1 -1
  20. package/dist/collection/collection-manifest.json +1 -1
  21. package/dist/collection/components/revoGrid/revo-grid.js +10 -15
  22. package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
  23. package/dist/collection/plugins/filter/{filter.pop.js → filter.panel.js} +23 -43
  24. package/dist/collection/plugins/filter/filter.panel.js.map +1 -0
  25. package/dist/collection/plugins/filter/filter.plugin.js +2 -2
  26. package/dist/collection/plugins/filter/filter.plugin.js.map +1 -1
  27. package/dist/collection/types/viewport.interfaces.js.map +1 -1
  28. package/dist/collection/utils/consts.js +0 -1
  29. package/dist/collection/utils/consts.js.map +1 -1
  30. package/dist/esm/{column.service-dce8aabc.js → column.service-0e41057a.js} +2 -2
  31. package/dist/esm/{column.service-dce8aabc.js.map → column.service-0e41057a.js.map} +1 -1
  32. package/dist/esm/{header-cell-renderer-171a011c.js → header-cell-renderer-6d8ac25d.js} +2 -2
  33. package/dist/esm/{header-cell-renderer-171a011c.js.map → header-cell-renderer-6d8ac25d.js.map} +1 -1
  34. package/dist/esm/{index-5a722722.js → index-4e881436.js} +2 -3
  35. package/dist/esm/index-4e881436.js.map +1 -0
  36. package/dist/esm/{key.utils-f82409ff.js → key.utils-425c987d.js} +2 -2
  37. package/dist/esm/{key.utils-f82409ff.js.map → key.utils-425c987d.js.map} +1 -1
  38. package/dist/esm/loader.js +1 -1
  39. package/dist/esm/revo-grid.entry.js +15 -19
  40. package/dist/esm/revo-grid.entry.js.map +1 -1
  41. package/dist/esm/revo-grid.js +1 -1
  42. package/dist/esm/revogr-attribution_6.entry.js +4 -4
  43. package/dist/esm/revogr-clipboard_3.entry.js +2 -2
  44. package/dist/esm/revogr-data_4.entry.js +4 -4
  45. package/dist/esm/revogr-filter-panel.entry.js +15 -18
  46. package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
  47. package/dist/esm/{throttle-eeca0062.js → throttle-1b1dd9d2.js} +2 -2
  48. package/dist/esm/{throttle-eeca0062.js.map → throttle-1b1dd9d2.js.map} +1 -1
  49. package/dist/revo-grid/{column.service-dce8aabc.js → column.service-0e41057a.js} +2 -2
  50. package/dist/revo-grid/{header-cell-renderer-171a011c.js → header-cell-renderer-6d8ac25d.js} +2 -2
  51. package/dist/revo-grid/index-4e881436.js +5 -0
  52. package/dist/revo-grid/index-4e881436.js.map +1 -0
  53. package/dist/revo-grid/{key.utils-f82409ff.js → key.utils-425c987d.js} +2 -2
  54. package/dist/revo-grid/revo-grid.entry.js +1 -1
  55. package/dist/revo-grid/revo-grid.entry.js.map +1 -1
  56. package/dist/revo-grid/revo-grid.esm.js +1 -1
  57. package/dist/revo-grid/revo-grid.esm.js.map +1 -1
  58. package/dist/revo-grid/revogr-attribution_6.entry.js +1 -1
  59. package/dist/revo-grid/revogr-clipboard_3.entry.js +1 -1
  60. package/dist/revo-grid/revogr-data_4.entry.js +1 -1
  61. package/dist/revo-grid/revogr-filter-panel.entry.js +1 -1
  62. package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
  63. package/dist/revo-grid/{throttle-eeca0062.js → throttle-1b1dd9d2.js} +2 -2
  64. package/dist/types/components/revoGrid/revo-grid.d.ts +0 -1
  65. package/dist/types/components.d.ts +2 -4
  66. package/dist/types/plugins/filter/{filter.pop.d.ts → filter.panel.d.ts} +1 -2
  67. package/dist/types/plugins/filter/filter.plugin.d.ts +2 -2
  68. package/dist/types/types/viewport.interfaces.d.ts +0 -2
  69. package/dist/types/utils/consts.d.ts +0 -1
  70. package/hydrate/index.js +27 -36
  71. package/hydrate/index.mjs +27 -36
  72. package/package.json +1 -1
  73. package/standalone/consts.js +1 -2
  74. package/standalone/consts.js.map +1 -1
  75. package/standalone/index.d.ts +1 -1
  76. package/standalone/revo-grid.js +13 -17
  77. package/standalone/revo-grid.js.map +1 -1
  78. package/standalone/revogr-filter-panel.js +14 -18
  79. package/standalone/revogr-filter-panel.js.map +1 -1
  80. package/dist/cjs/index-a9f1b728.js.map +0 -1
  81. package/dist/collection/plugins/filter/filter.pop.js.map +0 -1
  82. package/dist/esm/index-5a722722.js.map +0 -1
  83. package/dist/revo-grid/index-5a722722.js +0 -5
  84. package/dist/revo-grid/index-5a722722.js.map +0 -1
  85. /package/dist/revo-grid/{column.service-dce8aabc.js.map → column.service-0e41057a.js.map} +0 -0
  86. /package/dist/revo-grid/{header-cell-renderer-171a011c.js.map → header-cell-renderer-6d8ac25d.js.map} +0 -0
  87. /package/dist/revo-grid/{key.utils-f82409ff.js.map → key.utils-425c987d.js.map} +0 -0
  88. /package/dist/revo-grid/{throttle-eeca0062.js.map → throttle-1b1dd9d2.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import{h as e,r as t,c as i,H as r,a as o}from"./index-a61f225b.js";import{o as s,h as n,p as a,G as l,c as d,q as h,r as c,n as g,i as v,H as p,C as u,F as C}from"./column.service-dce8aabc.js";import{d as f,e as w,f as b,h as L,i as x,F as m,H as k,j as z,k as y,l as E,m as R}from"./index-5a722722.js";import{b as H,E as j,q as S,_ as F,v as $,o as O,j as D}from"./dimension.helpers-91398565.js";import"./toNumber-8de324a7.js";import{a as M}from"./filter.button-37373672.js";import{H as T}from"./header-cell-renderer-171a011c.js";import{t as P,L as _,a as W}from"./throttle-eeca0062.js";import"./selection.helpers-50e9f09d.js";import"./dispatcher-ea08404f.js";import"./debounce-7781346d.js";const B=10;const U=({rowClass:t,index:i,size:r,start:o,depth:s},n)=>{const a=Object.assign({[f]:i});return e("div",Object.assign({},a,{class:`rgRow ${t||""}`,style:{height:`${r}px`,transform:`translateY(${o}px)`,paddingLeft:s?`${B*s}px`:undefined}}),n)};function Z(e,t,i){var r;const o=new CustomEvent(n,{detail:{model:t,virtualIndex:i},cancelable:true,bubbles:true});(r=e.target)===null||r===void 0?void 0:r.dispatchEvent(o)}const I=t=>{const{model:i,itemIndex:r,hasExpand:o,groupingCustomRenderer:n}=t;const h=i[a];const c=i[l];const g=parseInt(i[d],10)||0;if(!o){return e(U,Object.assign({},t,{rowClass:"groupingRow",depth:g}))}if(n){return e(U,Object.assign({},t,{rowClass:"groupingRow",depth:g}),e("div",{onClick:e=>Z(e,i,r)},n(e,{name:h,itemIndex:r,expanded:c,depth:g})))}return e(U,Object.assign({},t,{rowClass:"groupingRow",depth:g}),e("button",{class:{[s]:true},onClick:e=>Z(e,i,r)},e("svg",{"aria-hidden":"true",style:{transform:`rotate(${!c?-90:0}deg)`},focusable:"false",viewBox:"0 0 448 512"},e("path",{fill:"currentColor",d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"}))),h)};class X{constructor(){this.currentRange=null}selectionChange(e,t){if(this.currentRange){t.forEach(((t,i)=>{var r;if(e&&i>=e.y&&i<=e.y1){return}if(t&&t.t instanceof HTMLElement&&t.t.classList.contains(w)){t.t.classList.remove(w);if((r=t.i)===null||r===void 0?void 0:r.class.includes(w)){t.i.class=t.i.class.replace(w,"")}}}))}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(w)){const t=e.i=e.i||{};t.class=(t.class||"")+" "+w;e.t.classList.add(w)}}}this.currentRange=e}isRowFocused(e){return this.currentRange&&e>=this.currentRange.y&&e<=this.currentRange.y1}}function V(e,t){return new Promise((i=>{const r=document.createElement("vnode-html");e.appendChild(r);r.redraw=t;r.addEventListener("html",(e=>{r.remove();i(e.detail)}))}))}function Y(t){const i=[];if(t.template){i.push(t.template(e,Object.assign(Object.assign({},t.model),{providers:t.providers}),t.additionalData))}else{if(!t.model.column){return""}if(t.model.column.rowDrag&&h(t.model.column.rowDrag,t.model)){i.push(e("span",{class:L,onMouseDown:e=>t.dragStartCell.emit({originalEvent:e,model:t.model})},e("span",{class:b})))}i.push(`${c(t.model.model[t.model.prop])}`)}return i}const q=({renderProps:t,cellProps:i})=>{const r=Y.bind(null,t);return e("div",Object.assign({},i,{redraw:r}),r())};const G=".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:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}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}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}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 A=G;const N=class{constructor(e){t(this,e);this.beforerowrender=i(this,"beforerowrender",7);this.afterrender=i(this,"afterrender",7);this.beforeCellRender=i(this,"beforecellrender",7);this.dragStartCell=i(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,r;const o=(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((r=o===null||o===void 0?void 0:o.i)===null||r===void 0?void 0:r.redraw){const e=await V(this.element,o.i.redraw);o.t.innerHTML=e.html;o.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 g(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 X;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(){return Promise.all(this.jobsBeforeRender)}componentDidRender(){this.afterrender.emit({type:this.type})}render(){var t,i;this.renderedRows=new Map;const o=this.columnService.columns;if(!o.length){return}const s=this.viewportRow.get("items");if(!s.length){return}const n=this.viewportCol.get("items");if(!n.length){return}const a=[];const l=this.dataStore.get("groupingDepth");const d=this.dataStore.get("groupingCustomRenderer");const h=this.columnService.hasGrouping?l:0;for(let r of s){const s=H(this.dataStore,r.itemIndex);if(v(s)){a.push(e(I,Object.assign({},r,{index:r.itemIndex,model:s,groupingCustomRenderer:d,hasExpand:this.columnService.hasGrouping})));continue}const l=[];for(let s of n){const n=this.columnService.rowDataModel(r.itemIndex,s.itemIndex);const a=this.triggerBeforeCellRender(n,r,s);if(a.defaultPrevented){continue}const{detail:{column:d,row:c}}=a;const g={[x]:d.itemIndex,[f]:c.itemIndex,style:{width:`${d.size}px`,transform:`translateX(${d.start}px)`,height:c.size?`${c.size}px`:undefined}};if(h&&!d.itemIndex&&g.style){g.style.paddingLeft=`${B*h}px`}const v=this.columnService.mergeProperties(c.itemIndex,d.itemIndex,g,n,(t=o[d.itemIndex])===null||t===void 0?void 0:t.cellProperties);l.push(e(q,{renderProps:{model:n,providers:this.providers,template:(i=o[d.itemIndex])===null||i===void 0?void 0:i.cellTemplate,additionalData:this.additionalData,dragStartCell:this.dragStartCell},cellProps:v}))}let c=this.rowClass?this.columnService.getRowClass(r.itemIndex,this.rowClass):"";if(this.rowHighlightPlugin.isRowFocused(r.itemIndex)){c+=` ${w}`}const g=e(U,{index:r.itemIndex,rowClass:c,size:r.size,start:r.start},l);this.beforerowrender.emit({node:g,item:r,model:s,colType:this.columnService.type,rowType:this.type});a.push(g);this.renderedRows.set(r.itemIndex,g)}return e(r,null,e("slot",null),a)}triggerBeforeCellRender(e,t,i){return this.beforeCellRender.emit({column:Object.assign({},i),row:Object.assign({},t),model:e,rowType:e.type,colType:e.colType})}get element(){return o(this)}static get watchers(){return{dataStore:["onDataStoreChange"],colData:["onColDataChange"]}}};N.style=A;var J=j;var K=function(){try{var e=J(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var Q=K;var ee=Q;function te(e,t,i){if(t=="__proto__"&&ee){ee(e,t,{configurable:true,enumerable:true,value:i,writable:true})}else{e[t]=i}}var ie=te;function re(e,t,i,r){var o=-1,s=e==null?0:e.length;while(++o<s){var n=e[o];t(r,n,i(n),e)}return r}var oe=re;var se=S;function ne(e,t,i,r){se(e,(function(e,o,s){t(r,e,i(e),s)}));return r}var ae=ne;var le=oe,de=ae,he=F,ce=$;function ge(e,t){return function(i,r){var o=ce(i)?le:de,s=t?t():{};return o(i,e,he(r),s)}}var ve=ge;var pe=ie,ue=ve;var Ce=ue((function(e,t,i){pe(e,i,t)}));var fe=Ce;const we=({column:t})=>{var i;return e("i",{class:(i=t===null||t===void 0?void 0:t.order)!==null&&i!==void 0?i:"sort-off"})};const be=t=>{var i,r,o,s,n;const a={[k]:true,[z]:!!((i=t.data)===null||i===void 0?void 0:i.sortable)};if((r=t.data)===null||r===void 0?void 0:r.order){a[t.data.order]=true}const l={[x]:t.column.itemIndex,canResize:t.canResize,minWidth:((o=t.data)===null||o===void 0?void 0:o.minSize)||y,maxWidth:(s=t.data)===null||s===void 0?void 0:s.maxSize,active:t.active||["r"],class:a,style:{width:`${t.column.size}px`,transform:`translateX(${t.column.start}px)`},onResize:t.onResize,onDoubleClick(e){t.onDoubleClick({column:t.data,index:t.column.itemIndex,originalEvent:e})},onClick(e){if(e.defaultPrevented||!t.onClick){return}t.onClick({column:t.data,index:t.column.itemIndex,originalEvent:e})}};if(t.range){if(t.column.itemIndex>=t.range.x&&t.column.itemIndex<=t.range.x1){if(typeof l.class==="object"){l.class[m]=true}}}return e(T,{data:t.data,props:l,additionalData:t.additionalData},e(we,{column:t.data}),t.canFilter&&((n=t.data)===null||n===void 0?void 0:n.filter)!==false?e(M,{column:t.data}):"")};const Le=t=>{const i={canResize:t.canResize,minWidth:t.group.ids.length*y,maxWidth:0,active:t.active||["r"],class:{[k]:true},style:{transform:`translateX(${t.start}px)`,width:`${t.end-t.start}px`},onResize:t.onResize};return e(T,{data:Object.assign(Object.assign({},t.group),{prop:"",providers:t.providers,index:t.start}),props:i,additionalData:t.additionalData})};const xe=({additionalData:t,providers:i,depth:r,groups:o,visibleProps:s,dimensionCol:n,canResize:a,active:l,onResize:d})=>{const h=[];for(let c=0;c<r;c++){if(o[c]){for(let r of o[c]){const o=O(r.ids,(e=>typeof s[e]==="number"));if(o>-1){const c=s[r.ids[o]];const g=c-o;const v=g+r.ids.length-1;const p=D(n,g).start;const u=D(n,v).end;h.push(e(Le,{providers:i,start:p,end:u,group:r,active:l,canResize:a,onResize:e=>d(e.changedX,g,v),additionalData:t}))}}}h.push(e("div",{class:`${E} group`}))}return h};const me="@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:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}revogr-header{position:relative;z-index:5;display:block}revogr-header .rgHeaderCell{display:flex}revogr-header .rgHeaderCell.align-center{text-align:center}revogr-header .rgHeaderCell.align-left{text-align:left}revogr-header .rgHeaderCell.align-right{text-align:right}revogr-header .rgHeaderCell.sortable{cursor:pointer}revogr-header .rgHeaderCell i.asc:after,revogr-header .rgHeaderCell i.desc:after{font-size:13px}revogr-header .rgHeaderCell i.asc:after{content:\"↑\"}revogr-header .rgHeaderCell i.desc:after{content:\"↓\"}revogr-header .rgHeaderCell,revogr-header .grouped-cell{position:absolute;box-sizing:border-box;height:100%;z-index:1}revogr-header .header-rgRow{display:block;position:relative}revogr-header .header-rgRow.group{z-index:0}revogr-header .group-rgRow{position:relative}revogr-header .rgHeaderCell.active{z-index:10}revogr-header .rgHeaderCell.active .resizable{background-color:deepskyblue}revogr-header .rgHeaderCell .header-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}revogr-header .rgHeaderCell .resizable{display:block;position:absolute;z-index:90;touch-action:none;user-select:none}revogr-header .rgHeaderCell .resizable:hover{background-color:deepskyblue}revogr-header .rgHeaderCell>.resizable-r{cursor:ew-resize;width:6px;right:0;top:0;height:100%}revogr-header .rgHeaderCell>.resizable-rb{cursor:se-resize;width:6px;height:6px;right:0;bottom:0}revogr-header .rgHeaderCell>.resizable-b{cursor:s-resize;height:6px;bottom:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-lb{cursor:sw-resize;width:6px;height:6px;left:0;bottom:0}revogr-header .rgHeaderCell>.resizable-l{cursor:w-resize;width:6px;left:0;height:100%;top:0}revogr-header .rgHeaderCell>.resizable-lt{cursor:nw-resize;width:6px;height:6px;left:0;top:0}revogr-header .rgHeaderCell>.resizable-t{cursor:n-resize;height:6px;top:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-rt{cursor:ne-resize;width:6px;height:6px;right:0;top:0}revogr-header .rv-filter{visibility:hidden}";const ke=me;const ze=class{constructor(e){t(this,e);this.initialHeaderClick=i(this,"beforeheaderclick",7);this.headerresize=i(this,"headerresize",7);this.beforeResize=i(this,"beforeheaderresize",7);this.headerdblClick=i(this,"headerdblclick",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 r=this.beforeResize.emit([Object.assign(Object.assign({},i),{size:e||undefined})]);if(r.defaultPrevented){return}this.headerresize.emit({[t]:e||0})}onResizeGroup(e,t,i){const r={};const o=fe(this.viewportCol.get("items"),"itemIndex");const s=e/(i-t+1);for(let e=t;e<=i;e++){const t=o[e];if(t){r[e]=t.size+s}}this.headerresize.emit(r)}render(){var t;const i=this.viewportCol.get("items");const r=(t=this.selectionStore)===null||t===void 0?void 0:t.get("range");const o=[];const s={};for(let t of i){const i=this.colData[t.itemIndex];o.push(e(be,{range:r,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),onDoubleClick:e=>this.headerdblClick.emit(e),onClick:e=>this.initialHeaderClick.emit(e),additionalData:this.additionalData}));s[i===null||i===void 0?void 0:i.prop]=t.itemIndex}return[e("div",{key:"37efb5ee52fc8b9d0f01b20500fd3833a203a5ea",class:"group-rgRow"},e(xe,{key:"40dec7ff9834df9df36d48ef636628abf843b042",canResize:this.canResize,active:this.resizeHandler,visibleProps:s,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:"5b34d0eb754cdb57c152c6a01b6b7e1ccf10aff5",class:`${E} ${R}`},o)]}get providers(){return{type:this.type,readonly:this.readonly,data:this.colData,viewport:this.viewportCol,dimension:this.dimensionCol,selection:this.selectionStore}}get element(){return o(this)}};ze.style=ke;async function ye(){if(!("ResizeObserver"in window)){const e=await import("./resize-observer-83c9e167.js");window.ResizeObserver=e.ResizeObserver}}class Ee{constructor(e,t){this.events=t;this.resizeObserver=null;this.resize=P(((e,t)=>{var i;return(i=this.events)===null||i===void 0?void 0:i.resize(e,t)}),10);this.init(e)}async init(e){var t;await ye();this.resizeObserver=new ResizeObserver(this.resize);(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 Re=".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:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}.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;-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=Re;const je=class{constructor(e){t(this,e);this.scrollViewport=i(this,"scrollviewport",7);this.resizeViewport=i(this,"resizeviewport",7);this.scrollchange=i(this,"scrollchange",7);this.silentScroll=i(this,"scrollviewportsilent",7);this.oldValY=this.contentHeight;this.oldValX=this.contentWidth;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){if(t){if(e.coordinate){switch(e.dimension){case"rgRow":this.verticalScroll.style.transform=`translateY(${-1*e.coordinate}px)`;break}}return null}if(e.delta){switch(e.dimension){case"rgCol":e.coordinate=this.horizontalScroll.scrollLeft+e.delta;break;case"rgRow":e.coordinate=this.verticalScroll.scrollTop+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 W({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":this.verticalScroll.scrollTop=e.coordinate;if(this.verticalScroll.style.transform){this.verticalScroll.style.transform=""}break}}})}componentDidLoad(){this.resizeService=new Ee(this.horizontalScroll,{resize:e=>{var t,i,r;let o=((t=e[0])===null||t===void 0?void 0:t.contentRect.height)||0;if(o){o-=this.header.clientHeight+this.footer.clientHeight}const s={rgRow:{size:o,contentSize:this.contentHeight,scroll:this.verticalScroll.scrollTop,noScroll:false},rgCol:{size:((i=e[0])===null||i===void 0?void 0:i.contentRect.width)||0,contentSize:this.contentWidth,scroll:this.horizontalScroll.scrollLeft,noScroll:this.colType!=="rgCol"?true:false}};for(const[e,t]of Object.entries(s)){const i=e;this.resizeViewport.emit({dimension:i,size:t.size,rowHeader:this.rowHeader});if(t.noScroll){continue}(r=this.localScrollService)===null||r===void 0?void 0:r.scroll(t.scroll,i,true);this.setScrollVisibility(i,t.size,t.contentSize)}}})}setScrollVisibility(e,t,i){const r=t<i;let o;switch(e){case"rgCol":o=this.horizontalScroll;break;case"rgRow":o=this.verticalScroll;break}if(r){o.classList.add(`scroll-${e}`)}else{o.classList.remove(`scroll-${e}`)}this.scrollchange.emit({type:e,hasScroll:r})}disconnectedCallback(){this.resizeService.destroy()}async componentDidRender(){if(this.contentHeight<this.oldValY&&this.verticalScroll){this.verticalScroll.scrollTop+=this.contentHeight-this.oldValY}this.oldValY=this.contentHeight;if(this.contentWidth<this.oldValX){this.horizontalScroll.scrollLeft+=this.contentWidth-this.oldValX}this.oldValX=this.contentWidth;this.localScrollService.setParams({contentSize:this.contentHeight,clientSize:this.verticalScroll.clientHeight,virtualSize:0},"rgRow");this.localScrollService.setParams({contentSize:this.contentWidth,clientSize:this.horizontalScroll.clientWidth,virtualSize:0},"rgCol");this.setScrollVisibility("rgRow",this.verticalScroll.clientHeight,this.contentHeight);this.setScrollVisibility("rgCol",this.horizontalScroll.clientWidth,this.contentWidth)}render(){return e(r,{key:"485d211d22fd720192de2206afef46545339902e",onWheel:this.horizontalMouseWheel,onScroll:e=>this.applyScroll("rgCol",e)},e("div",{key:"e3d17c747ec3f525c2947a6fa2e4652ed0f498d9",class:"inner-content-table",style:{width:`${this.contentWidth}px`}},e("div",{key:"f8fb5652593c76f676d57762911af866f46ce31d",class:"header-wrapper",ref:e=>this.header=e},e("slot",{key:"6d96653adf4d23208a6091dab42000235d696b48",name:p})),e("div",{key:"afcfcdaeacfe01fa3d8fabc30db36f5aecb24ad3",class:"vertical-inner",ref:e=>this.verticalScroll=e,onWheel:this.verticalMouseWheel,onScroll:e=>this.applyScroll("rgRow",e)},e("div",{key:"f6ba7b1d8621fcb2ea8565cdea6a75e6abca9d35",class:"content-wrapper",style:{height:`${this.contentHeight}px`}},e("slot",{key:"e5377e124212312859b05431053bcd81543d8193",name:u}))),e("div",{key:"3e990a197388391d393c607c18441b363d60ab53",class:"footer-wrapper",ref:e=>this.footer=e},e("slot",{key:"ae7eb7bde5e8798247b4d2a67ae622ba496c44f9",name:C}))))}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 r;if(this.localScrollTimer.isReady(e,t)){(r=this.localScrollService)===null||r===void 0?void 0:r.scroll(t,e,undefined,undefined,i)}}onVerticalMouseWheel(e,t,i){var r,o;(r=i.preventDefault)===null||r===void 0?void 0:r.call(i);const s=this.verticalScroll.scrollTop+i[t];(o=this.localScrollService)===null||o===void 0?void 0:o.scroll(s,e,undefined,i[t]);this.localScrollTimer.latestScrollUpdate(e)}onHorizontalMouseWheel(e,t,i){var r,o;(r=i.preventDefault)===null||r===void 0?void 0:r.call(i);const s=this.horizontalScroll.scrollLeft+i[t];(o=this.localScrollService)===null||o===void 0?void 0:o.scroll(s,e,undefined,i[t]);this.localScrollTimer.latestScrollUpdate(e)}get horizontalScroll(){return o(this)}};je.style=He;const Se=class{constructor(e){t(this,e);this.html=i(this,"html",7);this.vnodes=[];this.redraw=null}componentDidRender(){this.html.emit({html:this.el.innerHTML,vnodes:this.vnodes})}render(){var t;this.vnodes=(t=this.redraw)===null||t===void 0?void 0:t.call(this);return e(r,{key:"12ecb44c9ee03f85060c4dac3a090e2a0338c148",style:{visibility:"hidden",position:"absolute"}},this.vnodes)}get el(){return o(this)}};export{N as revogr_data,ze as revogr_header,je as revogr_viewport_scroll,Se as vnode_html};
4
+ import{h as e,r as t,c as i,H as r,a as o}from"./index-a61f225b.js";import{o as s,h as n,p as a,G as l,c as d,q as h,r as c,n as g,i as v,H as p,C as u,F as C}from"./column.service-0e41057a.js";import{d as f,e as w,f as b,h as L,i as x,F as m,H as k,j as z,k as y,l as E,m as R}from"./index-4e881436.js";import{b as H,E as j,q as S,_ as F,v as $,o as O,j as D}from"./dimension.helpers-91398565.js";import"./toNumber-8de324a7.js";import{a as M}from"./filter.button-37373672.js";import{H as T}from"./header-cell-renderer-6d8ac25d.js";import{t as P,L as _,a as W}from"./throttle-1b1dd9d2.js";import"./selection.helpers-50e9f09d.js";import"./dispatcher-ea08404f.js";import"./debounce-7781346d.js";const B=10;const U=({rowClass:t,index:i,size:r,start:o,depth:s},n)=>{const a=Object.assign({[f]:i});return e("div",Object.assign({},a,{class:`rgRow ${t||""}`,style:{height:`${r}px`,transform:`translateY(${o}px)`,paddingLeft:s?`${B*s}px`:undefined}}),n)};function Z(e,t,i){var r;const o=new CustomEvent(n,{detail:{model:t,virtualIndex:i},cancelable:true,bubbles:true});(r=e.target)===null||r===void 0?void 0:r.dispatchEvent(o)}const I=t=>{const{model:i,itemIndex:r,hasExpand:o,groupingCustomRenderer:n}=t;const h=i[a];const c=i[l];const g=parseInt(i[d],10)||0;if(!o){return e(U,Object.assign({},t,{rowClass:"groupingRow",depth:g}))}if(n){return e(U,Object.assign({},t,{rowClass:"groupingRow",depth:g}),e("div",{onClick:e=>Z(e,i,r)},n(e,{name:h,itemIndex:r,expanded:c,depth:g})))}return e(U,Object.assign({},t,{rowClass:"groupingRow",depth:g}),e("button",{class:{[s]:true},onClick:e=>Z(e,i,r)},e("svg",{"aria-hidden":"true",style:{transform:`rotate(${!c?-90:0}deg)`},focusable:"false",viewBox:"0 0 448 512"},e("path",{fill:"currentColor",d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"}))),h)};class X{constructor(){this.currentRange=null}selectionChange(e,t){if(this.currentRange){t.forEach(((t,i)=>{var r;if(e&&i>=e.y&&i<=e.y1){return}if(t&&t.t instanceof HTMLElement&&t.t.classList.contains(w)){t.t.classList.remove(w);if((r=t.i)===null||r===void 0?void 0:r.class.includes(w)){t.i.class=t.i.class.replace(w,"")}}}))}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(w)){const t=e.i=e.i||{};t.class=(t.class||"")+" "+w;e.t.classList.add(w)}}}this.currentRange=e}isRowFocused(e){return this.currentRange&&e>=this.currentRange.y&&e<=this.currentRange.y1}}function V(e,t){return new Promise((i=>{const r=document.createElement("vnode-html");e.appendChild(r);r.redraw=t;r.addEventListener("html",(e=>{r.remove();i(e.detail)}))}))}function Y(t){const i=[];if(t.template){i.push(t.template(e,Object.assign(Object.assign({},t.model),{providers:t.providers}),t.additionalData))}else{if(!t.model.column){return""}if(t.model.column.rowDrag&&h(t.model.column.rowDrag,t.model)){i.push(e("span",{class:L,onMouseDown:e=>t.dragStartCell.emit({originalEvent:e,model:t.model})},e("span",{class:b})))}i.push(`${c(t.model.model[t.model.prop])}`)}return i}const q=({renderProps:t,cellProps:i})=>{const r=Y.bind(null,t);return e("div",Object.assign({},i,{redraw:r}),r())};const G=".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:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}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}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}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 A=G;const N=class{constructor(e){t(this,e);this.beforerowrender=i(this,"beforerowrender",7);this.afterrender=i(this,"afterrender",7);this.beforeCellRender=i(this,"beforecellrender",7);this.dragStartCell=i(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,r;const o=(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((r=o===null||o===void 0?void 0:o.i)===null||r===void 0?void 0:r.redraw){const e=await V(this.element,o.i.redraw);o.t.innerHTML=e.html;o.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 g(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 X;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(){return Promise.all(this.jobsBeforeRender)}componentDidRender(){this.afterrender.emit({type:this.type})}render(){var t,i;this.renderedRows=new Map;const o=this.columnService.columns;if(!o.length){return}const s=this.viewportRow.get("items");if(!s.length){return}const n=this.viewportCol.get("items");if(!n.length){return}const a=[];const l=this.dataStore.get("groupingDepth");const d=this.dataStore.get("groupingCustomRenderer");const h=this.columnService.hasGrouping?l:0;for(let r of s){const s=H(this.dataStore,r.itemIndex);if(v(s)){a.push(e(I,Object.assign({},r,{index:r.itemIndex,model:s,groupingCustomRenderer:d,hasExpand:this.columnService.hasGrouping})));continue}const l=[];for(let s of n){const n=this.columnService.rowDataModel(r.itemIndex,s.itemIndex);const a=this.triggerBeforeCellRender(n,r,s);if(a.defaultPrevented){continue}const{detail:{column:d,row:c}}=a;const g={[x]:d.itemIndex,[f]:c.itemIndex,style:{width:`${d.size}px`,transform:`translateX(${d.start}px)`,height:c.size?`${c.size}px`:undefined}};if(h&&!d.itemIndex&&g.style){g.style.paddingLeft=`${B*h}px`}const v=this.columnService.mergeProperties(c.itemIndex,d.itemIndex,g,n,(t=o[d.itemIndex])===null||t===void 0?void 0:t.cellProperties);l.push(e(q,{renderProps:{model:n,providers:this.providers,template:(i=o[d.itemIndex])===null||i===void 0?void 0:i.cellTemplate,additionalData:this.additionalData,dragStartCell:this.dragStartCell},cellProps:v}))}let c=this.rowClass?this.columnService.getRowClass(r.itemIndex,this.rowClass):"";if(this.rowHighlightPlugin.isRowFocused(r.itemIndex)){c+=` ${w}`}const g=e(U,{index:r.itemIndex,rowClass:c,size:r.size,start:r.start},l);this.beforerowrender.emit({node:g,item:r,model:s,colType:this.columnService.type,rowType:this.type});a.push(g);this.renderedRows.set(r.itemIndex,g)}return e(r,null,e("slot",null),a)}triggerBeforeCellRender(e,t,i){return this.beforeCellRender.emit({column:Object.assign({},i),row:Object.assign({},t),model:e,rowType:e.type,colType:e.colType})}get element(){return o(this)}static get watchers(){return{dataStore:["onDataStoreChange"],colData:["onColDataChange"]}}};N.style=A;var J=j;var K=function(){try{var e=J(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var Q=K;var ee=Q;function te(e,t,i){if(t=="__proto__"&&ee){ee(e,t,{configurable:true,enumerable:true,value:i,writable:true})}else{e[t]=i}}var ie=te;function re(e,t,i,r){var o=-1,s=e==null?0:e.length;while(++o<s){var n=e[o];t(r,n,i(n),e)}return r}var oe=re;var se=S;function ne(e,t,i,r){se(e,(function(e,o,s){t(r,e,i(e),s)}));return r}var ae=ne;var le=oe,de=ae,he=F,ce=$;function ge(e,t){return function(i,r){var o=ce(i)?le:de,s=t?t():{};return o(i,e,he(r),s)}}var ve=ge;var pe=ie,ue=ve;var Ce=ue((function(e,t,i){pe(e,i,t)}));var fe=Ce;const we=({column:t})=>{var i;return e("i",{class:(i=t===null||t===void 0?void 0:t.order)!==null&&i!==void 0?i:"sort-off"})};const be=t=>{var i,r,o,s,n;const a={[k]:true,[z]:!!((i=t.data)===null||i===void 0?void 0:i.sortable)};if((r=t.data)===null||r===void 0?void 0:r.order){a[t.data.order]=true}const l={[x]:t.column.itemIndex,canResize:t.canResize,minWidth:((o=t.data)===null||o===void 0?void 0:o.minSize)||y,maxWidth:(s=t.data)===null||s===void 0?void 0:s.maxSize,active:t.active||["r"],class:a,style:{width:`${t.column.size}px`,transform:`translateX(${t.column.start}px)`},onResize:t.onResize,onDoubleClick(e){t.onDoubleClick({column:t.data,index:t.column.itemIndex,originalEvent:e})},onClick(e){if(e.defaultPrevented||!t.onClick){return}t.onClick({column:t.data,index:t.column.itemIndex,originalEvent:e})}};if(t.range){if(t.column.itemIndex>=t.range.x&&t.column.itemIndex<=t.range.x1){if(typeof l.class==="object"){l.class[m]=true}}}return e(T,{data:t.data,props:l,additionalData:t.additionalData},e(we,{column:t.data}),t.canFilter&&((n=t.data)===null||n===void 0?void 0:n.filter)!==false?e(M,{column:t.data}):"")};const Le=t=>{const i={canResize:t.canResize,minWidth:t.group.ids.length*y,maxWidth:0,active:t.active||["r"],class:{[k]:true},style:{transform:`translateX(${t.start}px)`,width:`${t.end-t.start}px`},onResize:t.onResize};return e(T,{data:Object.assign(Object.assign({},t.group),{prop:"",providers:t.providers,index:t.start}),props:i,additionalData:t.additionalData})};const xe=({additionalData:t,providers:i,depth:r,groups:o,visibleProps:s,dimensionCol:n,canResize:a,active:l,onResize:d})=>{const h=[];for(let c=0;c<r;c++){if(o[c]){for(let r of o[c]){const o=O(r.ids,(e=>typeof s[e]==="number"));if(o>-1){const c=s[r.ids[o]];const g=c-o;const v=g+r.ids.length-1;const p=D(n,g).start;const u=D(n,v).end;h.push(e(Le,{providers:i,start:p,end:u,group:r,active:l,canResize:a,onResize:e=>d(e.changedX,g,v),additionalData:t}))}}}h.push(e("div",{class:`${E} group`}))}return h};const me="@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:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}revogr-header{position:relative;z-index:5;display:block}revogr-header .rgHeaderCell{display:flex}revogr-header .rgHeaderCell.align-center{text-align:center}revogr-header .rgHeaderCell.align-left{text-align:left}revogr-header .rgHeaderCell.align-right{text-align:right}revogr-header .rgHeaderCell.sortable{cursor:pointer}revogr-header .rgHeaderCell i.asc:after,revogr-header .rgHeaderCell i.desc:after{font-size:13px}revogr-header .rgHeaderCell i.asc:after{content:\"↑\"}revogr-header .rgHeaderCell i.desc:after{content:\"↓\"}revogr-header .rgHeaderCell,revogr-header .grouped-cell{position:absolute;box-sizing:border-box;height:100%;z-index:1}revogr-header .header-rgRow{display:block;position:relative}revogr-header .header-rgRow.group{z-index:0}revogr-header .group-rgRow{position:relative}revogr-header .rgHeaderCell.active{z-index:10}revogr-header .rgHeaderCell.active .resizable{background-color:deepskyblue}revogr-header .rgHeaderCell .header-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}revogr-header .rgHeaderCell .resizable{display:block;position:absolute;z-index:90;touch-action:none;user-select:none}revogr-header .rgHeaderCell .resizable:hover{background-color:deepskyblue}revogr-header .rgHeaderCell>.resizable-r{cursor:ew-resize;width:6px;right:0;top:0;height:100%}revogr-header .rgHeaderCell>.resizable-rb{cursor:se-resize;width:6px;height:6px;right:0;bottom:0}revogr-header .rgHeaderCell>.resizable-b{cursor:s-resize;height:6px;bottom:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-lb{cursor:sw-resize;width:6px;height:6px;left:0;bottom:0}revogr-header .rgHeaderCell>.resizable-l{cursor:w-resize;width:6px;left:0;height:100%;top:0}revogr-header .rgHeaderCell>.resizable-lt{cursor:nw-resize;width:6px;height:6px;left:0;top:0}revogr-header .rgHeaderCell>.resizable-t{cursor:n-resize;height:6px;top:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-rt{cursor:ne-resize;width:6px;height:6px;right:0;top:0}revogr-header .rv-filter{visibility:hidden}";const ke=me;const ze=class{constructor(e){t(this,e);this.initialHeaderClick=i(this,"beforeheaderclick",7);this.headerresize=i(this,"headerresize",7);this.beforeResize=i(this,"beforeheaderresize",7);this.headerdblClick=i(this,"headerdblclick",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 r=this.beforeResize.emit([Object.assign(Object.assign({},i),{size:e||undefined})]);if(r.defaultPrevented){return}this.headerresize.emit({[t]:e||0})}onResizeGroup(e,t,i){const r={};const o=fe(this.viewportCol.get("items"),"itemIndex");const s=e/(i-t+1);for(let e=t;e<=i;e++){const t=o[e];if(t){r[e]=t.size+s}}this.headerresize.emit(r)}render(){var t;const i=this.viewportCol.get("items");const r=(t=this.selectionStore)===null||t===void 0?void 0:t.get("range");const o=[];const s={};for(let t of i){const i=this.colData[t.itemIndex];o.push(e(be,{range:r,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),onDoubleClick:e=>this.headerdblClick.emit(e),onClick:e=>this.initialHeaderClick.emit(e),additionalData:this.additionalData}));s[i===null||i===void 0?void 0:i.prop]=t.itemIndex}return[e("div",{key:"37efb5ee52fc8b9d0f01b20500fd3833a203a5ea",class:"group-rgRow"},e(xe,{key:"40dec7ff9834df9df36d48ef636628abf843b042",canResize:this.canResize,active:this.resizeHandler,visibleProps:s,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:"5b34d0eb754cdb57c152c6a01b6b7e1ccf10aff5",class:`${E} ${R}`},o)]}get providers(){return{type:this.type,readonly:this.readonly,data:this.colData,viewport:this.viewportCol,dimension:this.dimensionCol,selection:this.selectionStore}}get element(){return o(this)}};ze.style=ke;async function ye(){if(!("ResizeObserver"in window)){const e=await import("./resize-observer-83c9e167.js");window.ResizeObserver=e.ResizeObserver}}class Ee{constructor(e,t){this.events=t;this.resizeObserver=null;this.resize=P(((e,t)=>{var i;return(i=this.events)===null||i===void 0?void 0:i.resize(e,t)}),10);this.init(e)}async init(e){var t;await ye();this.resizeObserver=new ResizeObserver(this.resize);(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 Re=".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:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}.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;-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=Re;const je=class{constructor(e){t(this,e);this.scrollViewport=i(this,"scrollviewport",7);this.resizeViewport=i(this,"resizeviewport",7);this.scrollchange=i(this,"scrollchange",7);this.silentScroll=i(this,"scrollviewportsilent",7);this.oldValY=this.contentHeight;this.oldValX=this.contentWidth;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){if(t){if(e.coordinate){switch(e.dimension){case"rgRow":this.verticalScroll.style.transform=`translateY(${-1*e.coordinate}px)`;break}}return null}if(e.delta){switch(e.dimension){case"rgCol":e.coordinate=this.horizontalScroll.scrollLeft+e.delta;break;case"rgRow":e.coordinate=this.verticalScroll.scrollTop+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 W({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":this.verticalScroll.scrollTop=e.coordinate;if(this.verticalScroll.style.transform){this.verticalScroll.style.transform=""}break}}})}componentDidLoad(){this.resizeService=new Ee(this.horizontalScroll,{resize:e=>{var t,i,r;let o=((t=e[0])===null||t===void 0?void 0:t.contentRect.height)||0;if(o){o-=this.header.clientHeight+this.footer.clientHeight}const s={rgRow:{size:o,contentSize:this.contentHeight,scroll:this.verticalScroll.scrollTop,noScroll:false},rgCol:{size:((i=e[0])===null||i===void 0?void 0:i.contentRect.width)||0,contentSize:this.contentWidth,scroll:this.horizontalScroll.scrollLeft,noScroll:this.colType!=="rgCol"?true:false}};for(const[e,t]of Object.entries(s)){const i=e;this.resizeViewport.emit({dimension:i,size:t.size,rowHeader:this.rowHeader});if(t.noScroll){continue}(r=this.localScrollService)===null||r===void 0?void 0:r.scroll(t.scroll,i,true);this.setScrollVisibility(i,t.size,t.contentSize)}}})}setScrollVisibility(e,t,i){const r=t<i;let o;switch(e){case"rgCol":o=this.horizontalScroll;break;case"rgRow":o=this.verticalScroll;break}if(r){o.classList.add(`scroll-${e}`)}else{o.classList.remove(`scroll-${e}`)}this.scrollchange.emit({type:e,hasScroll:r})}disconnectedCallback(){this.resizeService.destroy()}async componentDidRender(){if(this.contentHeight<this.oldValY&&this.verticalScroll){this.verticalScroll.scrollTop+=this.contentHeight-this.oldValY}this.oldValY=this.contentHeight;if(this.contentWidth<this.oldValX){this.horizontalScroll.scrollLeft+=this.contentWidth-this.oldValX}this.oldValX=this.contentWidth;this.localScrollService.setParams({contentSize:this.contentHeight,clientSize:this.verticalScroll.clientHeight,virtualSize:0},"rgRow");this.localScrollService.setParams({contentSize:this.contentWidth,clientSize:this.horizontalScroll.clientWidth,virtualSize:0},"rgCol");this.setScrollVisibility("rgRow",this.verticalScroll.clientHeight,this.contentHeight);this.setScrollVisibility("rgCol",this.horizontalScroll.clientWidth,this.contentWidth)}render(){return e(r,{key:"485d211d22fd720192de2206afef46545339902e",onWheel:this.horizontalMouseWheel,onScroll:e=>this.applyScroll("rgCol",e)},e("div",{key:"e3d17c747ec3f525c2947a6fa2e4652ed0f498d9",class:"inner-content-table",style:{width:`${this.contentWidth}px`}},e("div",{key:"f8fb5652593c76f676d57762911af866f46ce31d",class:"header-wrapper",ref:e=>this.header=e},e("slot",{key:"6d96653adf4d23208a6091dab42000235d696b48",name:p})),e("div",{key:"afcfcdaeacfe01fa3d8fabc30db36f5aecb24ad3",class:"vertical-inner",ref:e=>this.verticalScroll=e,onWheel:this.verticalMouseWheel,onScroll:e=>this.applyScroll("rgRow",e)},e("div",{key:"f6ba7b1d8621fcb2ea8565cdea6a75e6abca9d35",class:"content-wrapper",style:{height:`${this.contentHeight}px`}},e("slot",{key:"e5377e124212312859b05431053bcd81543d8193",name:u}))),e("div",{key:"3e990a197388391d393c607c18441b363d60ab53",class:"footer-wrapper",ref:e=>this.footer=e},e("slot",{key:"ae7eb7bde5e8798247b4d2a67ae622ba496c44f9",name:C}))))}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 r;if(this.localScrollTimer.isReady(e,t)){(r=this.localScrollService)===null||r===void 0?void 0:r.scroll(t,e,undefined,undefined,i)}}onVerticalMouseWheel(e,t,i){var r,o;(r=i.preventDefault)===null||r===void 0?void 0:r.call(i);const s=this.verticalScroll.scrollTop+i[t];(o=this.localScrollService)===null||o===void 0?void 0:o.scroll(s,e,undefined,i[t]);this.localScrollTimer.latestScrollUpdate(e)}onHorizontalMouseWheel(e,t,i){var r,o;(r=i.preventDefault)===null||r===void 0?void 0:r.call(i);const s=this.horizontalScroll.scrollLeft+i[t];(o=this.localScrollService)===null||o===void 0?void 0:o.scroll(s,e,undefined,i[t]);this.localScrollTimer.latestScrollUpdate(e)}get horizontalScroll(){return o(this)}};je.style=He;const Se=class{constructor(e){t(this,e);this.html=i(this,"html",7);this.vnodes=[];this.redraw=null}componentDidRender(){this.html.emit({html:this.el.innerHTML,vnodes:this.vnodes})}render(){var t;this.vnodes=(t=this.redraw)===null||t===void 0?void 0:t.call(this);return e(r,{key:"12ecb44c9ee03f85060c4dac3a090e2a0338c148",style:{visibility:"hidden",position:"absolute"}},this.vnodes)}get el(){return o(this)}};export{N as revogr_data,ze as revogr_header,je as revogr_viewport_scroll,Se as vnode_html};
5
5
  //# sourceMappingURL=revogr-data_4.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import{r as t,c as i,h as e,H as s}from"./index-a61f225b.js";import{i as r,A as o,T as n}from"./filter.button-37373672.js";import{d as l}from"./debounce-7781346d.js";import"./toNumber-8de324a7.js";(function t(){if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector}if(!Element.prototype.closest){Element.prototype.closest=function(t){let i=this;do{if(Element.prototype.matches.call(i,t)){return i}i=i.parentElement||i.parentNode}while(i!==null&&i.nodeType===1);return null}}})();const a=".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:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}revogr-filter-panel{position:absolute;display:block;top:0;left:0;z-index:100;opacity:1;transform:none;background-color:#fff;transform-origin:62px 0px;box-shadow:0 5px 18px -2px rgba(0, 0, 0, 0.2);padding:10px;border-radius:4px;min-width:220px;text-align:left}revogr-filter-panel .filter-holder>div{display:flex;flex-direction:column}revogr-filter-panel label{font-size:13px;display:block;padding:8px 0}revogr-filter-panel select{width:100%}revogr-filter-panel input[type=text]{border:0;min-height:34px;margin:5px 0;background:#f3f3f3;border-radius:5px;padding:0 10px;box-sizing:border-box;width:100%}revogr-filter-panel button{margin-top:10px;margin-right:5px}revogr-filter-panel .filter-actions{text-align:right;margin-right:-5px}.rgHeaderCell:hover .rv-filter{transition:opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}.rgHeaderCell:hover .rv-filter,.rgHeaderCell .rv-filter.active{opacity:1}.rgHeaderCell .rv-filter{height:24px;width:24px;background:none;border:0;opacity:0;visibility:visible;cursor:pointer;border-radius:4px}.rgHeaderCell .rv-filter.active{color:#10224a}.rgHeaderCell .rv-filter .filter-img{color:gray;width:11px}.select-css{display:block;font-family:sans-serif;font-weight:600;color:#444;line-height:1.3;padding:0.6em 1.4em 0.5em 0.8em;width:100%;max-width:100%;box-sizing:border-box;margin:0;border:1px solid #f1f1f1;box-shadow:transparent;border-radius:0.5em;appearance:none;background-color:#fff;background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);background-repeat:no-repeat, repeat;background-position:right 0.7em top 50%, 0 0;background-size:0.65em auto, 100%;}.select-css::-ms-expand{display:none}.select-css:hover{border-color:rgb(197, 197, 197)}.select-css:focus{border-color:#f1f1f1;box-shadow:0 0 1px 3px rgba(59, 153, 252, 0.7);box-shadow:0 0 0 3px -moz-mac-focusring;color:#222;outline:none}.select-css option{font-weight:normal}.select-css:disabled,.select-css[aria-disabled=true]{color:gray;background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%)}.select-css:disabled:hover,.select-css[aria-disabled=true]{border-color:#f1f1f1}.multi-filter-list{margin-top:5px;margin-bottom:5px}.multi-filter-list div{white-space:nowrap}.multi-filter-list .multi-filter-list-action{display:flex;justify-content:space-between;align-items:center}.multi-filter-list .and-or-button{margin:0 0 0 10px;min-width:58px;cursor:pointer}.multi-filter-list .trash-button{margin:0 0 -2px 6px;cursor:pointer;width:22px;height:100%;font-size:16px}.multi-filter-list .trash-button .trash-img{width:1em}.add-filter-divider{display:block;margin:0 -10px 10px -10px;border-bottom:1px solid #d9d9d9;height:10px}.select-input{display:flex;justify-content:space-between;align-items:center}";const d=a;const h="none";const c="multi-filter-list";const f="multi-filter-list-action";const p=class{constructor(e){t(this,e);this.filterChange=i(this,"filterChange",7);this.filterCaptionsInternal={title:"Filter by",save:"Save",reset:"Cancel",cancel:"Close",add:"Add more condition...",placeholder:"Enter value...",and:"and",or:"or"};this.debouncedApplyFilter=l((()=>{this.filterChange.emit(this.filterItems)}),400);this.isFilterIdSet=false;this.filterId=0;this.currentFilterId=-1;this.currentFilterType=h;this.changes=undefined;this.uuid=undefined;this.filterItems={};this.filterTypes={};this.filterNames={};this.filterEntities={};this.filterCaptions=undefined;this.disableDynamicFiltering=false}onMouseDown(t){if(this.changes&&!t.defaultPrevented){const i=t.target;if(this.isOutside(i)&&!r(i)){this.changes=undefined}}}async show(t){this.changes=t;if(this.changes){this.changes.type=this.changes.type||h}}async getChanges(){return this.changes}componentWillRender(){if(!this.isFilterIdSet){this.isFilterIdSet=true;const t=Object.keys(this.filterItems);for(const i of t){this.filterId+=this.filterItems[i].length}}}renderSelectOptions(t,i=false){var s;const r=[];const o=(s=this.changes)===null||s===void 0?void 0:s.prop;if(!i){const t=Object.assign(this.filterCaptionsInternal,this.filterCaptions);r.push(e("option",{selected:this.currentFilterType===h,value:h},o&&this.filterItems[o]&&this.filterItems[o].length>0?t.add:this.filterNames[h]))}for(let i in this.filterTypes){r.push(...this.filterTypes[i].map((i=>e("option",{value:i,selected:t===i},this.filterNames[i]))));r.push(e("option",{disabled:true}))}return r}renderExtra(t,i){const s=this.filterItems[t];if(!s)return"";if(this.filterEntities[s[i].type].extra!=="input")return"";const r=Object.assign(this.filterCaptionsInternal,this.filterCaptions);return e("input",{id:`filter-input-${s[i].id}`,placeholder:r.placeholder,type:"text",value:s[i].value,onInput:this.onUserInput.bind(this,i,t),onKeyDown:t=>this.onKeyDown(t)})}getFilterItemsList(){var t;const i=(t=this.changes)===null||t===void 0?void 0:t.prop;if(!(i||i===0))return"";const s=this.filterItems[i]||[];const r=Object.assign(this.filterCaptionsInternal,this.filterCaptions);return e("div",{key:this.filterId},s.map(((t,s)=>{let l;if(s!==this.filterItems[i].length-1){l=e("div",{onClick:()=>this.toggleFilterAndOr(t.id)},e(o,{text:t.relation==="and"?r.and:r.or}))}return e("div",{key:t.id,class:c},e("div",{class:{"select-input":true}},e("select",{class:"select-css select-filter",onChange:t=>this.onFilterTypeChange(t,i,s)},this.renderSelectOptions(this.filterItems[i][s].type,true)),e("div",{class:f},l),e("div",{onClick:()=>this.onRemoveFilter(t.id)},e(n,null))),e("div",null,this.renderExtra(i,s)))})),s.length>0?e("div",{class:"add-filter-divider"}):"")}autoCorrect(t){var i,e;if(!t){return}const s=t.getBoundingClientRect();const r=window.innerWidth-s.width;if(s.left>r&&t.offsetLeft){t.style.left=`${r-((e=(i=t.parentElement)===null||i===void 0?void 0:i.getBoundingClientRect().left)!==null&&e!==void 0?e:0)}px`}}render(){if(!this.changes){return e(s,{style:{display:"none"}})}const t={display:"block",left:`${this.changes.x}px`,top:`${this.changes.y}px`};const i=Object.assign(this.filterCaptionsInternal,this.filterCaptions);return e(s,{style:t,ref:t=>{var i;((i=this.changes)===null||i===void 0?void 0:i.autoCorrect)&&this.autoCorrect(t)}},e("label",null,i.title),e("div",{class:"filter-holder"},this.getFilterItemsList()),e("div",{class:"add-filter"},e("select",{id:"add-filter",class:"select-css",onChange:t=>this.onAddNewFilter(t)},this.renderSelectOptions(this.currentFilterType))),e("div",{class:"filter-actions"},this.disableDynamicFiltering&&e("button",{id:"revo-button-save","aria-label":"save",class:"revo-button green",onClick:()=>this.onSave()},i.save),e("button",{id:"revo-button-reset","aria-label":"reset",class:"revo-button light",onClick:()=>this.onReset()},i.reset),e("button",{id:"revo-button-cancel","aria-label":"cancel",class:"revo-button light",onClick:()=>this.onCancel()},i.cancel)))}onFilterTypeChange(t,i,e){const s=t.target;this.filterItems[i][e].type=s.value;this.filterId++;setTimeout((()=>{const t=document.getElementById("filter-input-"+this.filterItems[i][e].id);if(t)t.focus()}),0);if(!this.disableDynamicFiltering)this.debouncedApplyFilter()}onAddNewFilter(t){const i=t.target;this.currentFilterType=i.value;this.addNewFilterToProp();const e=document.getElementById("add-filter");if(e){e.value=h;this.currentFilterType=h}if(!this.disableDynamicFiltering)this.debouncedApplyFilter()}addNewFilterToProp(){var t;const i=(t=this.changes)===null||t===void 0?void 0:t.prop;if(!(i||i===0))return;if(!this.filterItems[i]){this.filterItems[i]=[]}if(this.currentFilterType==="none")return;this.filterId++;this.currentFilterId=this.filterId;this.filterItems[i].push({id:this.currentFilterId,type:this.currentFilterType,value:"",relation:"and"});setTimeout((()=>{const t=document.getElementById("filter-input-"+this.currentFilterId);if(t)t.focus()}),0)}onUserInput(t,i,e){this.filterItems[i][t].value=e.target.value;if(!this.disableDynamicFiltering)this.debouncedApplyFilter()}onKeyDown(t){if(t.key.toLowerCase()==="enter"){const t=document.getElementById("add-filter");if(t){t.value=h;this.currentFilterType=h;this.addNewFilterToProp();t.focus()}return}t.stopPropagation()}onSave(){this.filterChange.emit(this.filterItems)}onCancel(){this.changes=undefined}onReset(){var t,i;this.assertChanges();delete this.filterItems[(i=(t=this.changes)===null||t===void 0?void 0:t.prop)!==null&&i!==void 0?i:""];this.filterId++;this.filterChange.emit(this.filterItems)}onRemoveFilter(t){var i;this.assertChanges();this.filterId++;const e=(i=this.changes)===null||i===void 0?void 0:i.prop;const s=this.filterItems[e!==null&&e!==void 0?e:""];if(!s)return;const r=s.findIndex((i=>i.id===t));if(r===-1)return;s.splice(r,1);if(s.length===0)delete this.filterItems[e!==null&&e!==void 0?e:""];if(!this.disableDynamicFiltering)this.debouncedApplyFilter()}toggleFilterAndOr(t){var i;this.assertChanges();this.filterId++;const e=(i=this.changes)===null||i===void 0?void 0:i.prop;const s=this.filterItems[e!==null&&e!==void 0?e:""];if(!s)return;const r=s.findIndex((i=>i.id===t));if(r===-1)return;s[r].relation=s[r].relation==="and"?"or":"and";if(!this.disableDynamicFiltering)this.debouncedApplyFilter()}assertChanges(){if(!this.changes){throw new Error("Changes required per edit")}}isOutside(t){const i=document.getElementById("add-filter");if(i)i.value=h;this.currentFilterType=h;if(this.changes){this.changes.type=h}this.currentFilterId=-1;if(t===null||t===void 0?void 0:t.classList.contains(`[uuid="${this.uuid}"]`)){return false}return!(t===null||t===void 0?void 0:t.closest(`[uuid="${this.uuid}"]`))}};p.style=d;export{p as revogr_filter_panel};
4
+ import{r as t,c as i,h as e,H as s,a as r}from"./index-a61f225b.js";import{i as o,A as n,T as l}from"./filter.button-37373672.js";import{d as a}from"./debounce-7781346d.js";import"./toNumber-8de324a7.js";(function t(){if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector}if(!Element.prototype.closest){Element.prototype.closest=function(t){let i=this;do{if(Element.prototype.matches.call(i,t)){return i}i=i.parentElement||i.parentNode}while(i!==null&&i.nodeType===1);return null}}})();const d=".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:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037;border:1px solid #00772d}.revo-button.red{background-color:#E0662E;border:1px solid #d55920}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.light{border:1px solid #cedefa;line-height:32px;background:none;color:#000;box-shadow:none}revogr-filter-panel{position:absolute;display:block;top:0;left:0;z-index:100;opacity:1;transform:none;background-color:#fff;transform-origin:62px 0px;box-shadow:0 5px 18px -2px rgba(0, 0, 0, 0.2);padding:10px;border-radius:4px;min-width:220px;text-align:left}revogr-filter-panel .filter-holder>div{display:flex;flex-direction:column}revogr-filter-panel label{font-size:13px;display:block;padding:8px 0}revogr-filter-panel select{width:100%}revogr-filter-panel input[type=text]{border:0;min-height:34px;margin:5px 0;background:#f3f3f3;border-radius:5px;padding:0 10px;box-sizing:border-box;width:100%}revogr-filter-panel button{margin-top:10px;margin-right:5px}revogr-filter-panel .filter-actions{text-align:right;margin-right:-5px}.rgHeaderCell:hover .rv-filter{transition:opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}.rgHeaderCell:hover .rv-filter,.rgHeaderCell .rv-filter.active{opacity:1}.rgHeaderCell .rv-filter{height:24px;width:24px;background:none;border:0;opacity:0;visibility:visible;cursor:pointer;border-radius:4px}.rgHeaderCell .rv-filter.active{color:#10224a}.rgHeaderCell .rv-filter .filter-img{color:gray;width:11px}.select-css{display:block;font-family:sans-serif;font-weight:600;color:#444;line-height:1.3;padding:0.6em 1.4em 0.5em 0.8em;width:100%;max-width:100%;box-sizing:border-box;margin:0;border:1px solid #f1f1f1;box-shadow:transparent;border-radius:0.5em;appearance:none;background-color:#fff;background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);background-repeat:no-repeat, repeat;background-position:right 0.7em top 50%, 0 0;background-size:0.65em auto, 100%;}.select-css::-ms-expand{display:none}.select-css:hover{border-color:rgb(197, 197, 197)}.select-css:focus{border-color:#f1f1f1;box-shadow:0 0 1px 3px rgba(59, 153, 252, 0.7);box-shadow:0 0 0 3px -moz-mac-focusring;color:#222;outline:none}.select-css option{font-weight:normal}.select-css:disabled,.select-css[aria-disabled=true]{color:gray;background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%)}.select-css:disabled:hover,.select-css[aria-disabled=true]{border-color:#f1f1f1}.multi-filter-list{margin-top:5px;margin-bottom:5px}.multi-filter-list div{white-space:nowrap}.multi-filter-list .multi-filter-list-action{display:flex;justify-content:space-between;align-items:center}.multi-filter-list .and-or-button{margin:0 0 0 10px;min-width:58px;cursor:pointer}.multi-filter-list .trash-button{margin:0 0 -2px 6px;cursor:pointer;width:22px;height:100%;font-size:16px}.multi-filter-list .trash-button .trash-img{width:1em}.add-filter-divider{display:block;margin:0 -10px 10px -10px;border-bottom:1px solid #d9d9d9;height:10px}.select-input{display:flex;justify-content:space-between;align-items:center}";const h=d;const c="none";const f="multi-filter-list";const p="multi-filter-list-action";const u=class{constructor(e){t(this,e);this.filterChange=i(this,"filterChange",7);this.filterCaptionsInternal={title:"Filter by",save:"Save",reset:"Clear changes",cancel:"Close",add:"Add more condition...",placeholder:"Enter value...",and:"and",or:"or"};this.debouncedApplyFilter=a((()=>{this.filterChange.emit(this.filterItems)}),400);this.isFilterIdSet=false;this.filterId=0;this.currentFilterId=-1;this.currentFilterType=c;this.changes=undefined;this.filterItems={};this.filterTypes={};this.filterNames={};this.filterEntities={};this.filterCaptions=undefined;this.disableDynamicFiltering=false}onMouseDown(t){if(this.changes&&!t.defaultPrevented){const i=t.target;const e=document.getElementById("add-filter");if(e){e.value=c}this.currentFilterType=c;if(this.changes){this.changes.type=c}this.currentFilterId=-1;const s=t.composedPath();const r=!s.includes(this.element);if(r&&!o(i)){this.changes=undefined}}}async show(t){this.changes=t;if(this.changes){this.changes.type=this.changes.type||c}}async getChanges(){return this.changes}componentWillRender(){if(!this.isFilterIdSet){this.isFilterIdSet=true;const t=Object.keys(this.filterItems);for(const i of t){this.filterId+=this.filterItems[i].length}}}renderSelectOptions(t,i=false){var s;const r=[];const o=(s=this.changes)===null||s===void 0?void 0:s.prop;if(!i){const t=Object.assign(this.filterCaptionsInternal,this.filterCaptions);r.push(e("option",{selected:this.currentFilterType===c,value:c},o&&this.filterItems[o]&&this.filterItems[o].length>0?t.add:this.filterNames[c]))}for(let i in this.filterTypes){r.push(...this.filterTypes[i].map((i=>e("option",{value:i,selected:t===i},this.filterNames[i]))));r.push(e("option",{disabled:true}))}return r}renderExtra(t,i){const s=this.filterItems[t];if(!s)return"";if(this.filterEntities[s[i].type].extra!=="input")return"";const r=Object.assign(this.filterCaptionsInternal,this.filterCaptions);return e("input",{id:`filter-input-${s[i].id}`,placeholder:r.placeholder,type:"text",value:s[i].value,onInput:this.onUserInput.bind(this,i,t),onKeyDown:t=>this.onKeyDown(t)})}getFilterItemsList(){var t;const i=(t=this.changes)===null||t===void 0?void 0:t.prop;if(!(i||i===0))return"";const s=this.filterItems[i]||[];const r=Object.assign(this.filterCaptionsInternal,this.filterCaptions);return e("div",{key:this.filterId},s.map(((t,s)=>{let o;if(s!==this.filterItems[i].length-1){o=e("div",{onClick:()=>this.toggleFilterAndOr(t.id)},e(n,{text:t.relation==="and"?r.and:r.or}))}return e("div",{key:t.id,class:f},e("div",{class:{"select-input":true}},e("select",{class:"select-css select-filter",onChange:t=>this.onFilterTypeChange(t,i,s)},this.renderSelectOptions(this.filterItems[i][s].type,true)),e("div",{class:p},o),e("div",{onClick:()=>this.onRemoveFilter(t.id)},e(l,null))),e("div",null,this.renderExtra(i,s)))})),s.length>0?e("div",{class:"add-filter-divider"}):"")}autoCorrect(t){var i,e;if(!t){return}const s=t.getBoundingClientRect();const r=window.innerWidth-s.width;if(s.left>r&&t.offsetLeft){t.style.left=`${r-((e=(i=t.parentElement)===null||i===void 0?void 0:i.getBoundingClientRect().left)!==null&&e!==void 0?e:0)}px`}}render(){if(!this.changes){return e(s,{style:{display:"none"}})}const t={display:"block",left:`${this.changes.x}px`,top:`${this.changes.y}px`};const i=Object.assign(this.filterCaptionsInternal,this.filterCaptions);return e(s,{style:t,ref:t=>{var i;((i=this.changes)===null||i===void 0?void 0:i.autoCorrect)&&this.autoCorrect(t)}},e("label",null,i.title),e("div",{class:"filter-holder"},this.getFilterItemsList()),e("div",{class:"add-filter"},e("select",{id:"add-filter",class:"select-css",onChange:t=>this.onAddNewFilter(t)},this.renderSelectOptions(this.currentFilterType))),e("div",{class:"filter-actions"},this.disableDynamicFiltering&&e("button",{id:"revo-button-save","aria-label":"save",class:"revo-button green",onClick:()=>this.onSave()},i.save),e("button",{id:"revo-button-reset","aria-label":"reset",class:"revo-button light",onClick:()=>this.onReset()},i.reset),e("button",{id:"revo-button-cancel","aria-label":"cancel",class:"revo-button light",onClick:()=>this.onCancel()},i.cancel)))}onFilterTypeChange(t,i,e){const s=t.target;this.filterItems[i][e].type=s.value;this.filterId++;setTimeout((()=>{const t=document.getElementById("filter-input-"+this.filterItems[i][e].id);if(t)t.focus()}),0);if(!this.disableDynamicFiltering)this.debouncedApplyFilter()}onAddNewFilter(t){const i=t.target;this.currentFilterType=i.value;this.addNewFilterToProp();const e=document.getElementById("add-filter");if(e){e.value=c;this.currentFilterType=c}if(!this.disableDynamicFiltering)this.debouncedApplyFilter()}addNewFilterToProp(){var t;const i=(t=this.changes)===null||t===void 0?void 0:t.prop;if(!(i||i===0))return;if(!this.filterItems[i]){this.filterItems[i]=[]}if(this.currentFilterType==="none")return;this.filterId++;this.currentFilterId=this.filterId;this.filterItems[i].push({id:this.currentFilterId,type:this.currentFilterType,value:"",relation:"and"});setTimeout((()=>{const t=document.getElementById("filter-input-"+this.currentFilterId);if(t)t.focus()}),0)}onUserInput(t,i,e){this.filterItems[i][t].value=e.target.value;if(!this.disableDynamicFiltering)this.debouncedApplyFilter()}onKeyDown(t){if(t.key.toLowerCase()==="enter"){const t=document.getElementById("add-filter");if(t){t.value=c;this.currentFilterType=c;this.addNewFilterToProp();t.focus()}return}t.stopPropagation()}onSave(){this.filterChange.emit(this.filterItems)}onCancel(){this.changes=undefined}onReset(){var t,i;this.assertChanges();delete this.filterItems[(i=(t=this.changes)===null||t===void 0?void 0:t.prop)!==null&&i!==void 0?i:""];this.filterId++;this.filterChange.emit(this.filterItems)}onRemoveFilter(t){var i;this.assertChanges();this.filterId++;const e=(i=this.changes)===null||i===void 0?void 0:i.prop;const s=this.filterItems[e!==null&&e!==void 0?e:""];if(!s)return;const r=s.findIndex((i=>i.id===t));if(r===-1)return;s.splice(r,1);if(s.length===0)delete this.filterItems[e!==null&&e!==void 0?e:""];if(!this.disableDynamicFiltering)this.debouncedApplyFilter()}toggleFilterAndOr(t){var i;this.assertChanges();this.filterId++;const e=(i=this.changes)===null||i===void 0?void 0:i.prop;const s=this.filterItems[e!==null&&e!==void 0?e:""];if(!s)return;const r=s.findIndex((i=>i.id===t));if(r===-1)return;s[r].relation=s[r].relation==="and"?"or":"and";if(!this.disableDynamicFiltering)this.debouncedApplyFilter()}assertChanges(){if(!this.changes){throw new Error("Changes required per edit")}}get element(){return r(this)}};u.style=h;export{u as revogr_filter_panel};
5
5
  //# sourceMappingURL=revogr-filter-panel.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["closest","Element","prototype","matches","msMatchesSelector","webkitMatchesSelector","s","el","this","call","parentElement","parentNode","nodeType","filterStyleCss","RevogrFilterPanelStyle0","defaultType","FILTER_LIST_CLASS","FILTER_LIST_CLASS_ACTION","FilterPanel","filterCaptionsInternal","title","save","reset","cancel","add","placeholder","and","or","debouncedApplyFilter","debounce","filterChange","emit","filterItems","onMouseDown","e","changes","defaultPrevented","target","isOutside","isFilterBtn","undefined","show","newEntity","type","getChanges","componentWillRender","isFilterIdSet","Object","keys","prop","filterId","length","renderSelectOptions","isDefaultTypeRemoved","options","_a","capts","assign","filterCaptions","push","h","selected","currentFilterType","value","filterNames","gIndex","filterTypes","map","k","disabled","renderExtra","index","currentFilter","filterEntities","extra","id","onInput","onUserInput","bind","onKeyDown","getFilterItemsList","propFilters","key","d","andOrButton","onClick","toggleFilterAndOr","AndOrButton","text","relation","class","onChange","onFilterTypeChange","onRemoveFilter","TrashButton","autoCorrect","pos","getBoundingClientRect","maxLeft","window","innerWidth","width","left","offsetLeft","style","_b","render","Host","display","x","top","y","ref","onAddNewFilter","disableDynamicFiltering","onSave","onReset","onCancel","setTimeout","input","document","getElementById","focus","addNewFilterToProp","select","currentFilterId","event","toLowerCase","stopPropagation","assertChanges","items","findIndex","splice","Error","classList","contains","uuid"],"sources":["src/utils/closest.polifill.ts","src/plugins/filter/filter.style.scss?tag=revogr-filter-panel","src/plugins/filter/filter.pop.tsx"],"sourcesContent":["(function closest() {\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n ((Element.prototype as unknown) as { msMatchesSelector: (selectors: string) => boolean }).msMatchesSelector || Element.prototype.webkitMatchesSelector;\n }\n\n if (!Element.prototype.closest) {\n Element.prototype.closest = function (s: string) {\n let el: HTMLElement | Element | (Node & ParentNode) = this;\n\n do {\n if (Element.prototype.matches.call(el, s)) {\n return el;\n }\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n };\n }\n})();\n","revogr-filter-panel {\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n z-index: 100;\n\n opacity: 1;\n transform: none;\n background-color: #fff;\n transform-origin: 62px 0px;\n box-shadow: 0 5px 18px -2px rgba(black, 20%);\n padding: 10px;\n border-radius: 4px;\n\n min-width: 220px;\n text-align: left;\n\n .filter-holder > div {\n display: flex;\n flex-direction: column;\n }\n\n label {\n font-size: 13px;\n display: block;\n padding: 8px 0;\n }\n\n select {\n width: 100%;\n }\n\n input[type='text'] {\n border: 0;\n min-height: 34px;\n margin: 5px 0;\n background: #f3f3f3;\n border-radius: 5px;\n padding: 0 10px;\n box-sizing: border-box;\n width: 100%;\n }\n\n button {\n margin-top: 10px;\n margin-right: 5px;\n }\n\n .filter-actions {\n text-align: right;\n margin-right: -5px;\n }\n}\n\n.rgHeaderCell {\n &:hover .rv-filter {\n transition:\n opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n &:hover .rv-filter,\n .rv-filter.active {\n opacity: 1;\n }\n\n .rv-filter {\n $btn-size: 24px;\n height: $btn-size;\n width: $btn-size;\n background: none;\n border: 0;\n opacity: 0;\n visibility: visible;\n cursor: pointer;\n border-radius: 4px;\n\n &.active {\n color: #10224a;\n }\n\n .filter-img {\n $img-size: 11px;\n color: gray;\n width: $img-size;\n }\n }\n}\n\n.select-css {\n $gradient: 'data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E';\n $linearGradient: linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n $borderColor: #f1f1f1;\n\n display: block;\n font-family: sans-serif;\n font-weight: 600;\n color: #444;\n line-height: 1.3;\n padding: 0.6em 1.4em 0.5em 0.8em;\n width: 100%;\n max-width: 100%; /* useful when width is set to anything other than 100% */\n box-sizing: border-box;\n margin: 0;\n border: 1px solid $borderColor;\n box-shadow: transparent;\n border-radius: 0.5em;\n appearance: none;\n background-color: #fff;\n background-image: url($gradient), $linearGradient;\n background-repeat: no-repeat, repeat;\n /* arrow icon position (1em from the right, 50% vertical) , then gradient position*/\n background-position:\n right 0.7em top 50%,\n 0 0;\n /* icon size, then gradient */\n background-size:\n 0.65em auto,\n 100%;\n\n /* Hide arrow icon in IE browsers */\n &::-ms-expand {\n display: none;\n }\n /* Hover style */\n &:hover {\n border-color: rgb(197, 197, 197);\n }\n /* Focus style */\n &:focus {\n border-color: $borderColor;\n box-shadow: 0 0 1px 3px rgba(59, 153, 252, 0.7);\n box-shadow: 0 0 0 3px -moz-mac-focusring;\n color: #222;\n outline: none;\n }\n\n /* Set options to normal weight */\n option {\n font-weight: normal;\n }\n\n /* Disabled styles */\n &:disabled,\n &[aria-disabled='true'] {\n color: gray;\n background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'),\n linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n }\n\n &:disabled:hover,\n &[aria-disabled='true'] {\n border-color: $borderColor;\n }\n}\n\n.multi-filter-list {\n margin-top: 5px;\n margin-bottom: 5px;\n\n div {\n white-space: nowrap;\n }\n\n .multi-filter-list-action {\n display: flex;\n\n justify-content: space-between;\n align-items: center;\n }\n\n .and-or-button {\n margin: 0 0 0 10px;\n min-width: 58px;\n cursor: pointer;\n }\n .trash-button {\n $btn-remove-size: 22px;\n margin: 0 0 -2px 6px;\n cursor: pointer;\n\n width: $btn-remove-size;\n height: 100%;\n font-size: 16px;\n\n .trash-img {\n width: 1em;\n }\n }\n}\n\n.add-filter-divider {\n display: block;\n margin: 0 -10px 10px -10px;\n\n border-bottom: 1px solid #d9d9d9;\n height: 10px;\n}\n\n.select-input {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n","import { Component, Event, EventEmitter, h, Host, Listen, Method, Prop, State, VNode } from '@stencil/core';\nimport { FilterType } from './filter.service';\nimport { AndOrButton, isFilterBtn, TrashButton } from './filter.button';\nimport '../../utils/closest.polifill';\nimport { LogicFunction } from './filter.types';\nimport { FilterCaptions } from './filter.plugin';\nimport debounce from 'lodash/debounce';\nimport { ColumnProp } from '@type';\n\nexport type FilterItem = {\n // column id\n prop?: ColumnProp;\n // filter type definition\n type?: FilterType;\n // value for additional filtering, text value or some id\n value?: any;\n};\n\nexport type FilterData = {\n id: number;\n type: FilterType;\n value?: any;\n relation: 'and' | 'or';\n};\n\nexport type MultiFilterItem = {\n [prop: string]: FilterData[];\n};\n\nexport type ShowData = {\n x: number;\n y: number;\n /**\n * Auto correct position if it is out of document bounds\n */\n autoCorrect?: boolean;\n} & FilterItem;\n\nconst defaultType: FilterType = 'none';\n\nconst FILTER_LIST_CLASS = 'multi-filter-list';\nconst FILTER_LIST_CLASS_ACTION = 'multi-filter-list-action';\n\n/**\n * Filter panel for editing filters\n */\n/**\n * @internal\n */\n@Component({\n tag: 'revogr-filter-panel',\n styleUrl: 'filter.style.scss',\n})\nexport class FilterPanel {\n private filterCaptionsInternal: FilterCaptions = {\n title: 'Filter by',\n save: 'Save',\n // drops the filter\n reset: 'Cancel',\n cancel: 'Close',\n add: 'Add more condition...',\n placeholder: 'Enter value...',\n and: 'and',\n or: 'or',\n };\n @State() isFilterIdSet = false;\n @State() filterId = 0;\n @State() currentFilterId = -1;\n @State() currentFilterType: FilterType = defaultType;\n @State() changes: ShowData | undefined;\n @Prop({ mutable: true, reflect: true }) uuid: string;\n @Prop() filterItems: MultiFilterItem = {};\n @Prop() filterTypes: Record<string, string[]> = {};\n @Prop() filterNames: Record<string, string> = {};\n @Prop() filterEntities: Record<string, LogicFunction> = {};\n @Prop() filterCaptions: FilterCaptions | undefined;\n @Prop() disableDynamicFiltering = false;\n @Event() filterChange: EventEmitter<MultiFilterItem>;\n @Listen('mousedown', { target: 'document' }) onMouseDown(e: MouseEvent) {\n if (this.changes && !e.defaultPrevented) {\n const el = e.target as HTMLElement;\n if (this.isOutside(el) && !isFilterBtn(el)) {\n this.changes = undefined;\n }\n }\n }\n @Method() async show(newEntity?: ShowData) {\n this.changes = newEntity;\n if (this.changes) {\n this.changes.type = this.changes.type || defaultType;\n }\n }\n\n @Method() async getChanges() {\n return this.changes;\n }\n\n componentWillRender() {\n if (!this.isFilterIdSet) {\n this.isFilterIdSet = true;\n const filterItems = Object.keys(this.filterItems);\n for (const prop of filterItems) {\n // we set the proper filterId so there won't be any conflict when removing filters\n this.filterId += this.filterItems[prop].length;\n }\n }\n }\n\n renderSelectOptions(type: FilterType, isDefaultTypeRemoved = false) {\n const options: VNode[] = [];\n const prop = this.changes?.prop;\n\n if (!isDefaultTypeRemoved) {\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n\n options.push(\n <option selected={this.currentFilterType === defaultType} value={defaultType}>\n {prop && this.filterItems[prop] && this.filterItems[prop].length > 0 ? capts.add : this.filterNames[defaultType]}\n </option>,\n );\n }\n\n for (let gIndex in this.filterTypes) {\n options.push(\n ...this.filterTypes[gIndex].map(k => (\n <option value={k} selected={type === k}>\n {this.filterNames[k]}\n </option>\n )),\n );\n options.push(<option disabled></option>);\n }\n return options;\n }\n\n renderExtra(prop: ColumnProp, index: number) {\n const currentFilter = this.filterItems[prop];\n\n if (!currentFilter) return '';\n\n if (this.filterEntities[currentFilter[index].type].extra !== 'input') return '';\n\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n\n return (\n <input\n id={`filter-input-${currentFilter[index].id}`}\n placeholder={capts.placeholder}\n type=\"text\"\n value={currentFilter[index].value}\n onInput={this.onUserInput.bind(this, index, prop)}\n onKeyDown={e => this.onKeyDown(e)}\n />\n );\n }\n\n getFilterItemsList() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return '';\n\n const propFilters = this.filterItems[prop] || [];\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n return (\n <div key={this.filterId}>\n {propFilters.map((d, index) => {\n let andOrButton;\n\n // hide toggle button if there is only one filter and the last one\n if (index !== this.filterItems[prop].length - 1) {\n andOrButton = (\n <div onClick={() => this.toggleFilterAndOr(d.id)}>\n <AndOrButton text={d.relation === 'and' ? capts.and : capts.or} />\n </div>\n );\n }\n\n return (\n <div key={d.id} class={FILTER_LIST_CLASS}>\n <div class={{ 'select-input': true }}>\n <select class=\"select-css select-filter\" onChange={e => this.onFilterTypeChange(e, prop, index)}>\n {this.renderSelectOptions(this.filterItems[prop][index].type, true)}\n </select>\n <div class={FILTER_LIST_CLASS_ACTION}>{andOrButton}</div>\n <div onClick={() => this.onRemoveFilter(d.id)}>\n <TrashButton />\n </div>\n </div>\n <div>{this.renderExtra(prop, index)}</div>\n </div>\n );\n })}\n\n {propFilters.length > 0 ? <div class=\"add-filter-divider\"/> : ''}\n </div>\n );\n }\n\n private autoCorrect(el?: HTMLElement | null) {\n if (!el) {\n return;\n }\n const pos = el.getBoundingClientRect();\n const maxLeft = window.innerWidth - pos.width;\n\n if (pos.left > maxLeft && el.offsetLeft) {\n el.style.left = `${maxLeft - (el.parentElement?.getBoundingClientRect().left ?? 0)}px`;\n }\n }\n \n render() {\n if (!this.changes) {\n return <Host style={{ display: 'none' }}></Host>;\n }\n const style = {\n display: 'block',\n left: `${this.changes.x}px`,\n top: `${this.changes.y}px`,\n };\n\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n\n return (\n <Host style={style} ref={(el) => { this.changes?.autoCorrect && this.autoCorrect(el) }}>\n <label>{capts.title}</label>\n <div class=\"filter-holder\">{this.getFilterItemsList()}</div>\n\n <div class=\"add-filter\">\n <select id=\"add-filter\" class=\"select-css\" onChange={e => this.onAddNewFilter(e)}>\n {this.renderSelectOptions(this.currentFilterType)}\n </select>\n </div>\n <div class=\"filter-actions\">\n {this.disableDynamicFiltering &&\n <button id=\"revo-button-save\" aria-label=\"save\" class=\"revo-button green\" onClick={() => this.onSave()}>\n {capts.save}\n </button>\n }\n <button id=\"revo-button-reset\" aria-label=\"reset\" class=\"revo-button light\" onClick={() => this.onReset()}>\n {capts.reset}\n </button>\n <button id=\"revo-button-cancel\" aria-label=\"cancel\" class=\"revo-button light\" onClick={() => this.onCancel()}>\n {capts.cancel}\n </button>\n </div>\n </Host>\n );\n }\n\n private onFilterTypeChange(e: Event, prop: ColumnProp, index: number) {\n const el = e.target as HTMLSelectElement;\n this.filterItems[prop][index].type = el.value as FilterType;\n\n // this re-renders the input to know if we need extra input\n this.filterId++;\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById('filter-input-' + this.filterItems[prop][index].id) as HTMLInputElement;\n if (input) input.focus();\n }, 0);\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private debouncedApplyFilter = debounce(() => {\n this.filterChange.emit(this.filterItems);\n }, 400);\n\n private onAddNewFilter(e: Event) {\n const el = e.target as HTMLSelectElement;\n this.currentFilterType = el.value as FilterType;\n this.addNewFilterToProp();\n\n // reset value after adding new filter\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n }\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private addNewFilterToProp() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return;\n\n if (!this.filterItems[prop]) {\n this.filterItems[prop] = [];\n }\n\n if (this.currentFilterType === 'none') return;\n\n this.filterId++;\n this.currentFilterId = this.filterId;\n\n this.filterItems[prop].push({\n id: this.currentFilterId,\n type: this.currentFilterType,\n value: '',\n relation: 'and',\n });\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById('filter-input-' + this.currentFilterId) as HTMLInputElement;\n if (input) input.focus();\n }, 0);\n }\n\n private onUserInput(index: number, prop: ColumnProp, event: Event) {\n // update the value of the filter item\n this.filterItems[prop][index].value = (event.target as HTMLInputElement).value;\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private onKeyDown(e: KeyboardEvent) {\n if (e.key.toLowerCase() === 'enter') {\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n this.addNewFilterToProp();\n select.focus();\n }\n return;\n }\n // keep event local, don't escalate farther to dom\n e.stopPropagation();\n }\n\n private onSave() {\n this.filterChange.emit(this.filterItems);\n }\n\n private onCancel() {\n this.changes = undefined;\n }\n\n private onReset() {\n this.assertChanges();\n\n delete this.filterItems[this.changes?.prop ?? ''];\n\n // this updates the DOM which is used by getFilterItemsList() key\n this.filterId++;\n\n this.filterChange.emit(this.filterItems);\n }\n\n private onRemoveFilter(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n items.splice(index, 1);\n\n // let's remove the prop if no more filters so the filter icon will be removed\n if (items.length === 0) delete this.filterItems[prop ?? ''];\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private toggleFilterAndOr(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n\n items[index].relation = items[index].relation === 'and' ? 'or' : 'and';\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private assertChanges() {\n if (!this.changes) {\n throw new Error('Changes required per edit');\n }\n }\n\n private isOutside(e: HTMLElement | null) {\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) select.value = defaultType;\n\n this.currentFilterType = defaultType;\n if (this.changes) {\n this.changes.type = defaultType;\n }\n this.currentFilterId = -1;\n if (e?.classList.contains(`[uuid=\"${this.uuid}\"]`)) {\n return false;\n }\n return !e?.closest(`[uuid=\"${this.uuid}\"]`);\n }\n}\n"],"mappings":";;;sMAAA,SAAUA,IACR,IAAKC,QAAQC,UAAUC,QAAS,CAC9BF,QAAQC,UAAUC,QACdF,QAAQC,UAAgFE,mBAAqBH,QAAQC,UAAUG,qB,CAGrI,IAAKJ,QAAQC,UAAUF,QAAS,CAC9BC,QAAQC,UAAUF,QAAU,SAAUM,GACpC,IAAIC,EAAkDC,KAEtD,EAAG,CACD,GAAIP,QAAQC,UAAUC,QAAQM,KAAKF,EAAID,GAAI,CACzC,OAAOC,C,CAETA,EAAKA,EAAGG,eAAiBH,EAAGI,U,OACrBJ,IAAO,MAAQA,EAAGK,WAAa,GACxC,OAAO,I,EAGZ,EAnBD,GCAA,MAAMC,EAAiB,glTACvB,MAAAC,EAAeD,ECqCf,MAAME,EAA0B,OAEhC,MAAMC,EAAoB,oBAC1B,MAAMC,EAA2B,2B,MAYpBC,EAAW,M,oEACdV,KAAAW,uBAAyC,CAC/CC,MAAO,YACPC,KAAM,OAENC,MAAO,SACPC,OAAQ,QACRC,IAAK,wBACLC,YAAa,iBACbC,IAAK,MACLC,GAAI,MAyMEnB,KAAAoB,qBAAuBC,GAAS,KACtCrB,KAAKsB,aAAaC,KAAKvB,KAAKwB,YAAY,GACvC,K,mBAzMsB,M,cACL,E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,MAAM3D,EAAQ2D,EAAMC,WAAUhD,GAAKA,EAAER,KAAOA,IAC5C,GAAIJ,KAAW,EAAG,OAClB2D,EAAME,OAAO7D,EAAO,GAGpB,GAAI2D,EAAM/E,SAAW,SAAU3C,KAAKwB,YAAYiB,IAAI,MAAJA,SAAI,EAAJA,EAAQ,IAExD,IAAKzC,KAAK0G,wBAAyB1G,KAAKoB,sB,CAGlC,iBAAA0D,CAAkBX,G,MACxBnE,KAAKyH,gBAGLzH,KAAK0C,WAEL,MAAMD,GAAOM,EAAA/C,KAAK2B,WAAO,MAAAoB,SAAA,SAAAA,EAAEN,KAE3B,MAAMiF,EAAQ1H,KAAKwB,YAAYiB,IAAI,MAAJA,SAAI,EAAJA,EAAQ,IACvC,IAAKiF,EAAO,OAEZ,MAAM3D,EAAQ2D,EAAMC,WAAUhD,GAAKA,EAAER,KAAOA,IAC5C,GAAIJ,KAAW,EAAG,OAElB2D,EAAM3D,GAAOkB,SAAWyC,EAAM3D,GAAOkB,WAAa,MAAQ,KAAO,MACjE,IAAKjF,KAAK0G,wBAAyB1G,KAAKoB,sB,CAGlC,aAAAqG,GACN,IAAKzH,KAAK2B,QAAS,CACjB,MAAM,IAAIkG,MAAM,4B,EAIZ,SAAA/F,CAAUJ,GAChB,MAAM0F,EAASJ,SAASC,eAAe,cACvC,GAAIG,EAAQA,EAAO7D,MAAQhD,EAE3BP,KAAKsD,kBAAoB/C,EACzB,GAAIP,KAAK2B,QAAS,CAChB3B,KAAK2B,QAAQQ,KAAO5B,C,CAEtBP,KAAKqH,iBAAmB,EACxB,GAAI3F,IAAC,MAADA,SAAC,SAADA,EAAGoG,UAAUC,SAAS,UAAU/H,KAAKgI,UAAW,CAClD,OAAO,K,CAET,QAAQtG,IAAC,MAADA,SAAC,SAADA,EAAGlC,QAAQ,UAAUQ,KAAKgI,U","ignoreList":[]}
1
+ {"version":3,"names":["closest","Element","prototype","matches","msMatchesSelector","webkitMatchesSelector","s","el","this","call","parentElement","parentNode","nodeType","filterStyleCss","RevogrFilterPanelStyle0","defaultType","FILTER_LIST_CLASS","FILTER_LIST_CLASS_ACTION","FilterPanel","filterCaptionsInternal","title","save","reset","cancel","add","placeholder","and","or","debouncedApplyFilter","debounce","filterChange","emit","filterItems","onMouseDown","e","changes","defaultPrevented","target","select","document","getElementById","value","currentFilterType","type","currentFilterId","path","composedPath","isOutside","includes","element","isFilterBtn","undefined","show","newEntity","getChanges","componentWillRender","isFilterIdSet","Object","keys","prop","filterId","length","renderSelectOptions","isDefaultTypeRemoved","options","_a","capts","assign","filterCaptions","push","h","selected","filterNames","gIndex","filterTypes","map","k","disabled","renderExtra","index","currentFilter","filterEntities","extra","id","onInput","onUserInput","bind","onKeyDown","getFilterItemsList","propFilters","key","d","andOrButton","onClick","toggleFilterAndOr","AndOrButton","text","relation","class","onChange","onFilterTypeChange","onRemoveFilter","TrashButton","autoCorrect","pos","getBoundingClientRect","maxLeft","window","innerWidth","width","left","offsetLeft","style","_b","render","Host","display","x","top","y","ref","onAddNewFilter","disableDynamicFiltering","onSave","onReset","onCancel","setTimeout","input","focus","addNewFilterToProp","event","toLowerCase","stopPropagation","assertChanges","items","findIndex","splice","Error"],"sources":["src/utils/closest.polifill.ts","src/plugins/filter/filter.style.scss?tag=revogr-filter-panel","src/plugins/filter/filter.panel.tsx"],"sourcesContent":["(function closest() {\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n ((Element.prototype as unknown) as { msMatchesSelector: (selectors: string) => boolean }).msMatchesSelector || Element.prototype.webkitMatchesSelector;\n }\n\n if (!Element.prototype.closest) {\n Element.prototype.closest = function (s: string) {\n let el: HTMLElement | Element | (Node & ParentNode) = this;\n\n do {\n if (Element.prototype.matches.call(el, s)) {\n return el;\n }\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n };\n }\n})();\n","revogr-filter-panel {\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n z-index: 100;\n\n opacity: 1;\n transform: none;\n background-color: #fff;\n transform-origin: 62px 0px;\n box-shadow: 0 5px 18px -2px rgba(black, 20%);\n padding: 10px;\n border-radius: 4px;\n\n min-width: 220px;\n text-align: left;\n\n .filter-holder > div {\n display: flex;\n flex-direction: column;\n }\n\n label {\n font-size: 13px;\n display: block;\n padding: 8px 0;\n }\n\n select {\n width: 100%;\n }\n\n input[type='text'] {\n border: 0;\n min-height: 34px;\n margin: 5px 0;\n background: #f3f3f3;\n border-radius: 5px;\n padding: 0 10px;\n box-sizing: border-box;\n width: 100%;\n }\n\n button {\n margin-top: 10px;\n margin-right: 5px;\n }\n\n .filter-actions {\n text-align: right;\n margin-right: -5px;\n }\n}\n\n.rgHeaderCell {\n &:hover .rv-filter {\n transition:\n opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n &:hover .rv-filter,\n .rv-filter.active {\n opacity: 1;\n }\n\n .rv-filter {\n $btn-size: 24px;\n height: $btn-size;\n width: $btn-size;\n background: none;\n border: 0;\n opacity: 0;\n visibility: visible;\n cursor: pointer;\n border-radius: 4px;\n\n &.active {\n color: #10224a;\n }\n\n .filter-img {\n $img-size: 11px;\n color: gray;\n width: $img-size;\n }\n }\n}\n\n.select-css {\n $gradient: 'data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E';\n $linearGradient: linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n $borderColor: #f1f1f1;\n\n display: block;\n font-family: sans-serif;\n font-weight: 600;\n color: #444;\n line-height: 1.3;\n padding: 0.6em 1.4em 0.5em 0.8em;\n width: 100%;\n max-width: 100%; /* useful when width is set to anything other than 100% */\n box-sizing: border-box;\n margin: 0;\n border: 1px solid $borderColor;\n box-shadow: transparent;\n border-radius: 0.5em;\n appearance: none;\n background-color: #fff;\n background-image: url($gradient), $linearGradient;\n background-repeat: no-repeat, repeat;\n /* arrow icon position (1em from the right, 50% vertical) , then gradient position*/\n background-position:\n right 0.7em top 50%,\n 0 0;\n /* icon size, then gradient */\n background-size:\n 0.65em auto,\n 100%;\n\n /* Hide arrow icon in IE browsers */\n &::-ms-expand {\n display: none;\n }\n /* Hover style */\n &:hover {\n border-color: rgb(197, 197, 197);\n }\n /* Focus style */\n &:focus {\n border-color: $borderColor;\n box-shadow: 0 0 1px 3px rgba(59, 153, 252, 0.7);\n box-shadow: 0 0 0 3px -moz-mac-focusring;\n color: #222;\n outline: none;\n }\n\n /* Set options to normal weight */\n option {\n font-weight: normal;\n }\n\n /* Disabled styles */\n &:disabled,\n &[aria-disabled='true'] {\n color: gray;\n background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'),\n linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n }\n\n &:disabled:hover,\n &[aria-disabled='true'] {\n border-color: $borderColor;\n }\n}\n\n.multi-filter-list {\n margin-top: 5px;\n margin-bottom: 5px;\n\n div {\n white-space: nowrap;\n }\n\n .multi-filter-list-action {\n display: flex;\n\n justify-content: space-between;\n align-items: center;\n }\n\n .and-or-button {\n margin: 0 0 0 10px;\n min-width: 58px;\n cursor: pointer;\n }\n .trash-button {\n $btn-remove-size: 22px;\n margin: 0 0 -2px 6px;\n cursor: pointer;\n\n width: $btn-remove-size;\n height: 100%;\n font-size: 16px;\n\n .trash-img {\n width: 1em;\n }\n }\n}\n\n.add-filter-divider {\n display: block;\n margin: 0 -10px 10px -10px;\n\n border-bottom: 1px solid #d9d9d9;\n height: 10px;\n}\n\n.select-input {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n","import { Component, Event, EventEmitter, h, Host, Listen, Method, Prop, State, VNode, Element } from '@stencil/core';\nimport { FilterType } from './filter.service';\nimport { AndOrButton, isFilterBtn, TrashButton } from './filter.button';\nimport '../../utils/closest.polifill';\nimport { LogicFunction } from './filter.types';\nimport { FilterCaptions } from './filter.plugin';\nimport debounce from 'lodash/debounce';\nimport { ColumnProp } from '@type';\n\nexport type FilterItem = {\n // column id\n prop?: ColumnProp;\n // filter type definition\n type?: FilterType;\n // value for additional filtering, text value or some id\n value?: any;\n};\n\nexport type FilterData = {\n id: number;\n type: FilterType;\n value?: any;\n relation: 'and' | 'or';\n};\n\nexport type MultiFilterItem = {\n [prop: string]: FilterData[];\n};\n\nexport type ShowData = {\n x: number;\n y: number;\n /**\n * Auto correct position if it is out of document bounds\n */\n autoCorrect?: boolean;\n} & FilterItem;\n\nconst defaultType: FilterType = 'none';\n\nconst FILTER_LIST_CLASS = 'multi-filter-list';\nconst FILTER_LIST_CLASS_ACTION = 'multi-filter-list-action';\n\n/**\n * Filter panel for editing filters\n */\n/**\n * @internal\n */\n@Component({\n tag: 'revogr-filter-panel',\n styleUrl: 'filter.style.scss',\n})\nexport class FilterPanel {\n private filterCaptionsInternal: FilterCaptions = {\n title: 'Filter by',\n save: 'Save',\n // drops the filter\n reset: 'Clear changes',\n cancel: 'Close',\n add: 'Add more condition...',\n placeholder: 'Enter value...',\n and: 'and',\n or: 'or',\n };\n\n @Element() element!: HTMLElement;\n @State() isFilterIdSet = false;\n @State() filterId = 0;\n @State() currentFilterId = -1;\n @State() currentFilterType: FilterType = defaultType;\n @State() changes: ShowData | undefined;\n @Prop() filterItems: MultiFilterItem = {};\n @Prop() filterTypes: Record<string, string[]> = {};\n @Prop() filterNames: Record<string, string> = {};\n @Prop() filterEntities: Record<string, LogicFunction> = {};\n @Prop() filterCaptions: FilterCaptions | undefined;\n @Prop() disableDynamicFiltering = false;\n @Event() filterChange: EventEmitter<MultiFilterItem>;\n @Listen('mousedown', { target: 'document' }) onMouseDown(e: MouseEvent) {\n if (this.changes && !e.defaultPrevented) {\n const el = e.target as HTMLElement;\n\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n }\n this.currentFilterType = defaultType;\n if (this.changes) {\n this.changes.type = defaultType;\n }\n this.currentFilterId = -1;\n\n const path = e.composedPath();\n const isOutside = !path.includes(this.element);\n\n if (isOutside && !isFilterBtn(el)) {\n this.changes = undefined;\n }\n }\n }\n\n @Method() async show(newEntity?: ShowData) {\n this.changes = newEntity;\n if (this.changes) {\n this.changes.type = this.changes.type || defaultType;\n }\n }\n\n @Method() async getChanges() {\n return this.changes;\n }\n\n componentWillRender() {\n if (!this.isFilterIdSet) {\n this.isFilterIdSet = true;\n const filterItems = Object.keys(this.filterItems);\n for (const prop of filterItems) {\n // we set the proper filterId so there won't be any conflict when removing filters\n this.filterId += this.filterItems[prop].length;\n }\n }\n }\n\n renderSelectOptions(type: FilterType, isDefaultTypeRemoved = false) {\n const options: VNode[] = [];\n const prop = this.changes?.prop;\n\n if (!isDefaultTypeRemoved) {\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n\n options.push(\n <option selected={this.currentFilterType === defaultType} value={defaultType}>\n {prop && this.filterItems[prop] && this.filterItems[prop].length > 0 ? capts.add : this.filterNames[defaultType]}\n </option>,\n );\n }\n\n for (let gIndex in this.filterTypes) {\n options.push(\n ...this.filterTypes[gIndex].map(k => (\n <option value={k} selected={type === k}>\n {this.filterNames[k]}\n </option>\n )),\n );\n options.push(<option disabled></option>);\n }\n return options;\n }\n\n renderExtra(prop: ColumnProp, index: number) {\n const currentFilter = this.filterItems[prop];\n\n if (!currentFilter) return '';\n\n if (this.filterEntities[currentFilter[index].type].extra !== 'input') return '';\n\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n\n return (\n <input\n id={`filter-input-${currentFilter[index].id}`}\n placeholder={capts.placeholder}\n type=\"text\"\n value={currentFilter[index].value}\n onInput={this.onUserInput.bind(this, index, prop)}\n onKeyDown={e => this.onKeyDown(e)}\n />\n );\n }\n\n getFilterItemsList() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return '';\n\n const propFilters = this.filterItems[prop] || [];\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n return (\n <div key={this.filterId}>\n {propFilters.map((d, index) => {\n let andOrButton;\n\n // hide toggle button if there is only one filter and the last one\n if (index !== this.filterItems[prop].length - 1) {\n andOrButton = (\n <div onClick={() => this.toggleFilterAndOr(d.id)}>\n <AndOrButton text={d.relation === 'and' ? capts.and : capts.or} />\n </div>\n );\n }\n\n return (\n <div key={d.id} class={FILTER_LIST_CLASS}>\n <div class={{ 'select-input': true }}>\n <select class=\"select-css select-filter\" onChange={e => this.onFilterTypeChange(e, prop, index)}>\n {this.renderSelectOptions(this.filterItems[prop][index].type, true)}\n </select>\n <div class={FILTER_LIST_CLASS_ACTION}>{andOrButton}</div>\n <div onClick={() => this.onRemoveFilter(d.id)}>\n <TrashButton />\n </div>\n </div>\n <div>{this.renderExtra(prop, index)}</div>\n </div>\n );\n })}\n\n {propFilters.length > 0 ? <div class=\"add-filter-divider\"/> : ''}\n </div>\n );\n }\n\n private autoCorrect(el?: HTMLElement | null) {\n if (!el) {\n return;\n }\n const pos = el.getBoundingClientRect();\n const maxLeft = window.innerWidth - pos.width;\n\n if (pos.left > maxLeft && el.offsetLeft) {\n el.style.left = `${maxLeft - (el.parentElement?.getBoundingClientRect().left ?? 0)}px`;\n }\n }\n \n render() {\n if (!this.changes) {\n return <Host style={{ display: 'none' }}></Host>;\n }\n const style = {\n display: 'block',\n left: `${this.changes.x}px`,\n top: `${this.changes.y}px`,\n };\n\n const capts = Object.assign(this.filterCaptionsInternal, this.filterCaptions);\n\n return (\n <Host style={style} ref={(el) => { this.changes?.autoCorrect && this.autoCorrect(el) }}>\n <label>{capts.title}</label>\n <div class=\"filter-holder\">{this.getFilterItemsList()}</div>\n\n <div class=\"add-filter\">\n <select id=\"add-filter\" class=\"select-css\" onChange={e => this.onAddNewFilter(e)}>\n {this.renderSelectOptions(this.currentFilterType)}\n </select>\n </div>\n <div class=\"filter-actions\">\n {this.disableDynamicFiltering &&\n <button id=\"revo-button-save\" aria-label=\"save\" class=\"revo-button green\" onClick={() => this.onSave()}>\n {capts.save}\n </button>\n }\n <button id=\"revo-button-reset\" aria-label=\"reset\" class=\"revo-button light\" onClick={() => this.onReset()}>\n {capts.reset}\n </button>\n <button id=\"revo-button-cancel\" aria-label=\"cancel\" class=\"revo-button light\" onClick={() => this.onCancel()}>\n {capts.cancel}\n </button>\n </div>\n </Host>\n );\n }\n\n private onFilterTypeChange(e: Event, prop: ColumnProp, index: number) {\n const el = e.target as HTMLSelectElement;\n this.filterItems[prop][index].type = el.value as FilterType;\n\n // this re-renders the input to know if we need extra input\n this.filterId++;\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById('filter-input-' + this.filterItems[prop][index].id) as HTMLInputElement;\n if (input) input.focus();\n }, 0);\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private debouncedApplyFilter = debounce(() => {\n this.filterChange.emit(this.filterItems);\n }, 400);\n\n private onAddNewFilter(e: Event) {\n const el = e.target as HTMLSelectElement;\n this.currentFilterType = el.value as FilterType;\n this.addNewFilterToProp();\n\n // reset value after adding new filter\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n }\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private addNewFilterToProp() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return;\n\n if (!this.filterItems[prop]) {\n this.filterItems[prop] = [];\n }\n\n if (this.currentFilterType === 'none') return;\n\n this.filterId++;\n this.currentFilterId = this.filterId;\n\n this.filterItems[prop].push({\n id: this.currentFilterId,\n type: this.currentFilterType,\n value: '',\n relation: 'and',\n });\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById('filter-input-' + this.currentFilterId) as HTMLInputElement;\n if (input) input.focus();\n }, 0);\n }\n\n private onUserInput(index: number, prop: ColumnProp, event: Event) {\n // update the value of the filter item\n this.filterItems[prop][index].value = (event.target as HTMLInputElement).value;\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private onKeyDown(e: KeyboardEvent) {\n if (e.key.toLowerCase() === 'enter') {\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n this.addNewFilterToProp();\n select.focus();\n }\n return;\n }\n // keep event local, don't escalate farther to dom\n e.stopPropagation();\n }\n\n private onSave() {\n this.filterChange.emit(this.filterItems);\n }\n\n private onCancel() {\n this.changes = undefined;\n }\n\n private onReset() {\n this.assertChanges();\n\n delete this.filterItems[this.changes?.prop ?? ''];\n\n // this updates the DOM which is used by getFilterItemsList() key\n this.filterId++;\n\n this.filterChange.emit(this.filterItems);\n }\n\n private onRemoveFilter(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n items.splice(index, 1);\n\n // let's remove the prop if no more filters so the filter icon will be removed\n if (items.length === 0) delete this.filterItems[prop ?? ''];\n\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private toggleFilterAndOr(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n\n items[index].relation = items[index].relation === 'and' ? 'or' : 'and';\n if (!this.disableDynamicFiltering) this.debouncedApplyFilter();\n }\n\n private assertChanges() {\n if (!this.changes) {\n throw new Error('Changes required per edit');\n }\n }\n}\n"],"mappings":";;;6MAAA,SAAUA,IACR,IAAKC,QAAQC,UAAUC,QAAS,CAC9BF,QAAQC,UAAUC,QACdF,QAAQC,UAAgFE,mBAAqBH,QAAQC,UAAUG,qB,CAGrI,IAAKJ,QAAQC,UAAUF,QAAS,CAC9BC,QAAQC,UAAUF,QAAU,SAAUM,GACpC,IAAIC,EAAkDC,KAEtD,EAAG,CACD,GAAIP,QAAQC,UAAUC,QAAQM,KAAKF,EAAID,GAAI,CACzC,OAAOC,C,CAETA,EAAKA,EAAGG,eAAiBH,EAAGI,U,OACrBJ,IAAO,MAAQA,EAAGK,WAAa,GACxC,OAAO,I,EAGZ,EAnBD,GCAA,MAAMC,EAAiB,glTACvB,MAAAC,EAAeD,ECqCf,MAAME,EAA0B,OAEhC,MAAMC,EAAoB,oBAC1B,MAAMC,EAA2B,2B,MAYpBC,EAAW,M,oEACdV,KAAAW,uBAAyC,CAC/CC,MAAO,YACPC,KAAM,OAENC,MAAO,gBACPC,OAAQ,QACRC,IAAK,wBACLC,YAAa,iBACbC,IAAK,MACLC,GAAI,MAyNEnB,KAAAoB,qBAAuBC,GAAS,KACtCrB,KAAKsB,aAAaC,KAAKvB,KAAKwB,YAAY,GACvC,K,mBAvNsB,M,cACL,E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sB,aAAaC,KAAKvB,KAAKwB,Y,CAGtB,cAAAqE,CAAelB,G,MACrB3E,KAAK6H,gBAGL7H,KAAKoD,WAEL,MAAMD,GAAOM,EAAAzD,KAAK2B,WAAO,MAAA8B,SAAA,SAAAA,EAAEN,KAE3B,MAAM2E,EAAQ9H,KAAKwB,YAAY2B,IAAI,MAAJA,SAAI,EAAJA,EAAQ,IACvC,IAAK2E,EAAO,OAEZ,MAAMvD,EAAQuD,EAAMC,WAAU5C,GAAKA,EAAER,KAAOA,IAC5C,GAAIJ,KAAW,EAAG,OAClBuD,EAAME,OAAOzD,EAAO,GAGpB,GAAIuD,EAAMzE,SAAW,SAAUrD,KAAKwB,YAAY2B,IAAI,MAAJA,SAAI,EAAJA,EAAQ,IAExD,IAAKnD,KAAKkH,wBAAyBlH,KAAKoB,sB,CAGlC,iBAAAkE,CAAkBX,G,MACxB3E,KAAK6H,gBAGL7H,KAAKoD,WAEL,MAAMD,GAAOM,EAAAzD,KAAK2B,WAAO,MAAA8B,SAAA,SAAAA,EAAEN,KAE3B,MAAM2E,EAAQ9H,KAAKwB,YAAY2B,IAAI,MAAJA,SAAI,EAAJA,EAAQ,IACvC,IAAK2E,EAAO,OAEZ,MAAMvD,EAAQuD,EAAMC,WAAU5C,GAAKA,EAAER,KAAOA,IAC5C,GAAIJ,KAAW,EAAG,OAElBuD,EAAMvD,GAAOkB,SAAWqC,EAAMvD,GAAOkB,WAAa,MAAQ,KAAO,MACjE,IAAKzF,KAAKkH,wBAAyBlH,KAAKoB,sB,CAGlC,aAAAyG,GACN,IAAK7H,KAAK2B,QAAS,CACjB,MAAM,IAAIsG,MAAM,4B","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import{s as t}from"./index-5a722722.js";import{d as i}from"./debounce-7781346d.js";import{i as r}from"./toNumber-8de324a7.js";const s={contentSize:0,clientSize:0,virtualSize:0,maxSize:0};const e=-1;function n(t,i,r=0){return t+(r?i-r:0)}class o{constructor(t){this.cfg=t;this.preventArtificialScroll={rgRow:null,rgCol:null};this.previousScroll={rgRow:e,rgCol:e};this.params={rgRow:Object.assign({},s),rgCol:Object.assign({},s)}}setParams(t,i){const r=n(t.contentSize,t.clientSize,t.virtualSize);this.params[i]=Object.assign(Object.assign({},t),{maxSize:r-t.clientSize,virtualContentSize:r})}async setScroll(t){this.cancelScroll(t.dimension);const i=new Promise(((i,r)=>{if(this.cfg.skipAnimationFrame){return i()}const s=window.requestAnimationFrame((()=>{i()}));this.preventArtificialScroll[t.dimension]=r.bind(null,s)}));try{await i;const r=this.getParams(t.dimension);t.coordinate=Math.ceil(t.coordinate);this.previousScroll[t.dimension]=this.wrapCoordinate(t.coordinate,r);this.preventArtificialScroll[t.dimension]=null;this.cfg.applyScroll(Object.assign(Object.assign({},t),{coordinate:r.virtualSize?this.convert(t.coordinate,r,false):t.coordinate}))}catch(t){window.cancelAnimationFrame(t)}}scroll(t,i,r=false,s,n=false){this.cancelScroll(i);if(!r&&this.previousScroll[i]===t){this.previousScroll[i]=e;return}const o=this.getParams(i);this.cfg.runScroll({dimension:i,coordinate:o.virtualSize?this.convert(t,o):t,delta:s,outside:n})}getParams(t){return this.params[t]}wrapCoordinate(t,i){if(t<0){return e}if(t>i.maxSize){return i.maxSize}return t}cancelScroll(t){var i,r;(r=(i=this.preventArtificialScroll)[t])===null||r===void 0?void 0:r.call(i);this.preventArtificialScroll[t]=null}convert(i,r,s=true){const e=r.clientSize;const n=[0,r.virtualContentSize-e];const o=[0,r.contentSize-r.virtualSize];if(s){return t(i,n,o)}return t(i,o,n)}}class a{constructor(t=10){this.scrollThrottling=t;this.mouseWheelScrollTimestamp={rgCol:0,rgRow:0};this.lastKnownScrollCoordinate={rgCol:0,rgRow:0}}setCoordinate(t){this.lastKnownScrollCoordinate[t.dimension]=t.coordinate}latestScrollUpdate(t){this.mouseWheelScrollTimestamp[t]=(new Date).getTime()}isReady(t,i){const r=(new Date).getTime()-this.mouseWheelScrollTimestamp[t];return r>this.scrollThrottling&&i!==this.lastKnownScrollCoordinate[t]}}var c=i,l=r;var h="Expected a function";function u(t,i,r){var s=true,e=true;if(typeof t!="function"){throw new TypeError(h)}if(l(r)){s="leading"in r?!!r.leading:s;e="trailing"in r?!!r.trailing:e}return c(t,i,{leading:s,maxWait:i,trailing:e})}var d=u;export{a as L,o as a,n as g,d as t};
5
- //# sourceMappingURL=throttle-eeca0062.js.map
4
+ import{s as t}from"./index-4e881436.js";import{d as i}from"./debounce-7781346d.js";import{i as r}from"./toNumber-8de324a7.js";const s={contentSize:0,clientSize:0,virtualSize:0,maxSize:0};const e=-1;function n(t,i,r=0){return t+(r?i-r:0)}class o{constructor(t){this.cfg=t;this.preventArtificialScroll={rgRow:null,rgCol:null};this.previousScroll={rgRow:e,rgCol:e};this.params={rgRow:Object.assign({},s),rgCol:Object.assign({},s)}}setParams(t,i){const r=n(t.contentSize,t.clientSize,t.virtualSize);this.params[i]=Object.assign(Object.assign({},t),{maxSize:r-t.clientSize,virtualContentSize:r})}async setScroll(t){this.cancelScroll(t.dimension);const i=new Promise(((i,r)=>{if(this.cfg.skipAnimationFrame){return i()}const s=window.requestAnimationFrame((()=>{i()}));this.preventArtificialScroll[t.dimension]=r.bind(null,s)}));try{await i;const r=this.getParams(t.dimension);t.coordinate=Math.ceil(t.coordinate);this.previousScroll[t.dimension]=this.wrapCoordinate(t.coordinate,r);this.preventArtificialScroll[t.dimension]=null;this.cfg.applyScroll(Object.assign(Object.assign({},t),{coordinate:r.virtualSize?this.convert(t.coordinate,r,false):t.coordinate}))}catch(t){window.cancelAnimationFrame(t)}}scroll(t,i,r=false,s,n=false){this.cancelScroll(i);if(!r&&this.previousScroll[i]===t){this.previousScroll[i]=e;return}const o=this.getParams(i);this.cfg.runScroll({dimension:i,coordinate:o.virtualSize?this.convert(t,o):t,delta:s,outside:n})}getParams(t){return this.params[t]}wrapCoordinate(t,i){if(t<0){return e}if(t>i.maxSize){return i.maxSize}return t}cancelScroll(t){var i,r;(r=(i=this.preventArtificialScroll)[t])===null||r===void 0?void 0:r.call(i);this.preventArtificialScroll[t]=null}convert(i,r,s=true){const e=r.clientSize;const n=[0,r.virtualContentSize-e];const o=[0,r.contentSize-r.virtualSize];if(s){return t(i,n,o)}return t(i,o,n)}}class a{constructor(t=10){this.scrollThrottling=t;this.mouseWheelScrollTimestamp={rgCol:0,rgRow:0};this.lastKnownScrollCoordinate={rgCol:0,rgRow:0}}setCoordinate(t){this.lastKnownScrollCoordinate[t.dimension]=t.coordinate}latestScrollUpdate(t){this.mouseWheelScrollTimestamp[t]=(new Date).getTime()}isReady(t,i){const r=(new Date).getTime()-this.mouseWheelScrollTimestamp[t];return r>this.scrollThrottling&&i!==this.lastKnownScrollCoordinate[t]}}var c=i,l=r;var h="Expected a function";function u(t,i,r){var s=true,e=true;if(typeof t!="function"){throw new TypeError(h)}if(l(r)){s="leading"in r?!!r.leading:s;e="trailing"in r?!!r.trailing:e}return c(t,i,{leading:s,maxWait:i,trailing:e})}var d=u;export{a as L,o as a,n as g,d as t};
5
+ //# sourceMappingURL=throttle-1b1dd9d2.js.map
@@ -530,7 +530,6 @@ export declare class RevoGridComponent {
530
530
  onCellFocus(e: CustomEvent<BeforeSaveDataDetails>): void;
531
531
  element: HTMLRevoGridElement;
532
532
  private extraElements;
533
- uuid: string | null;
534
533
  columnProvider: ColumnDataProvider;
535
534
  dataProvider: DataProvider;
536
535
  dimensionProvider: DimensionProvider;
@@ -16,7 +16,7 @@ import { ColumnCollection } from "./services/column.data.provider";
16
16
  import { DataInput } from "./plugins/export/types";
17
17
  import { Observable } from "./utils/store.utils";
18
18
  import { DSourceState, Groups } from "./store/index";
19
- import { MultiFilterItem, ShowData } from "./plugins/filter/filter.pop";
19
+ import { MultiFilterItem, ShowData } from "./plugins/filter/filter.panel";
20
20
  import { LogicFunction } from "./plugins/filter/filter.types";
21
21
  import { ResizeProps } from "./components/header/resizable.directive";
22
22
  import { Cell as Cell1, ColumnRegular as ColumnRegular1, DataType as DataType1, DimensionCols as DimensionCols1, DimensionRows as DimensionRows1, DimensionSettingsState as DimensionSettingsState1, Observable as Observable1, SelectionStoreState as SelectionStoreState1 } from "./components";
@@ -31,7 +31,7 @@ export { ColumnCollection } from "./services/column.data.provider";
31
31
  export { DataInput } from "./plugins/export/types";
32
32
  export { Observable } from "./utils/store.utils";
33
33
  export { DSourceState, Groups } from "./store/index";
34
- export { MultiFilterItem, ShowData } from "./plugins/filter/filter.pop";
34
+ export { MultiFilterItem, ShowData } from "./plugins/filter/filter.panel";
35
35
  export { LogicFunction } from "./plugins/filter/filter.types";
36
36
  export { ResizeProps } from "./components/header/resizable.directive";
37
37
  export { Cell as Cell1, ColumnRegular as ColumnRegular1, DataType as DataType1, DimensionCols as DimensionCols1, DimensionRows as DimensionRows1, DimensionSettingsState as DimensionSettingsState1, Observable as Observable1, SelectionStoreState as SelectionStoreState1 } from "./components";
@@ -399,7 +399,6 @@ export namespace Components {
399
399
  "filterTypes": Record<string, string[]>;
400
400
  "getChanges": () => Promise<ShowData>;
401
401
  "show": (newEntity?: ShowData) => Promise<void>;
402
- "uuid": string;
403
402
  }
404
403
  /**
405
404
  * Focus component. Shows focus layer around the cell that is currently in focus.
@@ -1689,7 +1688,6 @@ declare namespace LocalJSX {
1689
1688
  "filterNames"?: Record<string, string>;
1690
1689
  "filterTypes"?: Record<string, string[]>;
1691
1690
  "onFilterChange"?: (event: RevogrFilterPanelCustomEvent<MultiFilterItem>) => void;
1692
- "uuid"?: string;
1693
1691
  }
1694
1692
  /**
1695
1693
  * Focus component. Shows focus layer around the cell that is currently in focus.
@@ -34,12 +34,12 @@ export type ShowData = {
34
34
  */
35
35
  export declare class FilterPanel {
36
36
  private filterCaptionsInternal;
37
+ element: HTMLElement;
37
38
  isFilterIdSet: boolean;
38
39
  filterId: number;
39
40
  currentFilterId: number;
40
41
  currentFilterType: FilterType;
41
42
  changes: ShowData | undefined;
42
- uuid: string;
43
43
  filterItems: MultiFilterItem;
44
44
  filterTypes: Record<string, string[]>;
45
45
  filterNames: Record<string, string>;
@@ -68,5 +68,4 @@ export declare class FilterPanel {
68
68
  private onRemoveFilter;
69
69
  private toggleFilterAndOr;
70
70
  private assertChanges;
71
- private isOutside;
72
71
  }
@@ -1,5 +1,5 @@
1
1
  import { BasePlugin } from '../base.plugin';
2
- import { MultiFilterItem } from './filter.pop';
2
+ import { MultiFilterItem } from './filter.panel';
3
3
  import { FilterType } from './filter.service';
4
4
  import { LogicFunction } from './filter.types';
5
5
  import { ColumnProp, ColumnRegular, DataType } from "../../types/index";
@@ -64,7 +64,7 @@ export declare class FilterPlugin extends BasePlugin {
64
64
  possibleFilterNames: Record<string, string>;
65
65
  possibleFilterEntities: Record<string, LogicFunction>;
66
66
  filterProp: string;
67
- constructor(revogrid: HTMLRevoGridElement, providers: PluginProviders, uiid: string, config?: ColumnFilterConfig);
67
+ constructor(revogrid: HTMLRevoGridElement, providers: PluginProviders, config?: ColumnFilterConfig);
68
68
  initConfig(config: ColumnFilterConfig): void;
69
69
  headerclick(e: HeaderEvent): Promise<void>;
70
70
  getColumnFilter(type?: boolean | string | string[]): Record<string, string[]>;
@@ -28,8 +28,6 @@ export type ViewportData = {
28
28
  segmentSelectionStore: Observable<SelectionStoreState>;
29
29
  /** Slot to put data */
30
30
  slot: SlotType;
31
- /** Current grid uniq Id */
32
- uuid: string;
33
31
  style?: {
34
32
  [key: string]: string;
35
33
  };
@@ -2,7 +2,6 @@ export declare const MIN_COL_SIZE = 30;
2
2
  export declare const RESIZE_INTERVAL = 40;
3
3
  export declare const DATA_COL = "data-rgCol";
4
4
  export declare const DATA_ROW = "data-rgRow";
5
- export declare const UUID = "grid-uuid";
6
5
  export declare const DISABLED_CLASS = "disabled";
7
6
  export declare const CELL_CLASS = "rgCell";
8
7
  export declare const ROW_HEADER_TYPE = "rowHeaders";