Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@revolist/revogrid

Package Overview
Dependencies
Maintainers
0
Versions
531
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@revolist/revogrid - npm Package Compare versions

Comparing version 4.11.5 to 4.11.6

dist/cjs/column.drag.plugin-cd0e4607.js

5

dist/cjs/index.cjs.js

@@ -8,3 +8,3 @@ /*!

const column_drag_plugin = require('./column.drag.plugin-57f2d604.js');
const column_drag_plugin = require('./column.drag.plugin-cd0e4607.js');
const headerCellRenderer = require('./header-cell-renderer-53ecdcdb.js');

@@ -30,4 +30,5 @@ const index = require('./index-10d10c55.js');

['roworderchanged', 'roworderchanged'],
['beforesorting', 'beforesorting'],
['beforesourcesortingapply', 'beforesourcesortingapply'],
['beforesortingapply', 'beforesortingapply'],
['beforesorting', 'beforesorting'],
['rowdragstart', 'rowdragstart'],

@@ -34,0 +35,0 @@ ['headerclick', 'headerclick'],

6

dist/collection/plugins/sorting/sorting.plugin.js

@@ -10,5 +10,7 @@ /*!

import { sortIndexByItems } from "./sorting.func";
export * from './sorting.types';
/**
* Lifecycle
* 1. @event `beforesorting` - Triggered when sorting just starts. Nothing has happened yet. This can be triggered from a column or from the source. If the type is from rows, the column will be undefined.
* 1.1. @event `beforesourcesortingapply` - Triggered before the sorting data is applied to the data source. You can prevent this event, and the data will not be sorted.
* 2. @method `updateColumnSorting` - Updates the column sorting icon on the grid and the column itself, but the data remains untouched.

@@ -55,4 +57,4 @@ * 3. @event `beforesortingapply` - Triggered before the sorting data is applied to the data source. You can prevent this event, and the data will not be sorted. This event is only called from a column sorting click.

if (!!this.sorting && this.sortingFunc) {
const beforeEvent = this.emit('beforesorting', { type });
if (beforeEvent.defaultPrevented) {
const event = this.emit('beforesourcesortingapply', { type, sorting: this.sorting });
if (event.defaultPrevented) {
return;

@@ -59,0 +61,0 @@ }

@@ -13,4 +13,5 @@ /*!

['roworderchanged', 'roworderchanged'],
['beforesorting', 'beforesorting'],
['beforesourcesortingapply', 'beforesourcesortingapply'],
['beforesortingapply', 'beforesortingapply'],
['beforesorting', 'beforesorting'],
['rowdragstart', 'rowdragstart'],

@@ -17,0 +18,0 @@ ['headerclick', 'headerclick'],

/*!
* Built by Revolist OU ❤️
*/
import { B as BasePlugin } from './column.drag.plugin-8fdea9fa.js';
export { A as AutoSizeColumnPlugin, B as BasePlugin, C as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, d as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, e as FILTE_PANEL, f as FilterPlugin, G as GroupingRowPlugin, l as SortingPlugin, S as StretchColumn, c as columnTypes, g as filterCoreFunctionsIndexedByType, j as filterNames, h as filterTypes, k as getLeftRelative, i as isRowType, a as isStretchPlugin, r as rowTypes } from './column.drag.plugin-8fdea9fa.js';
import { B as BasePlugin } from './column.drag.plugin-bc7ec071.js';
export { A as AutoSizeColumnPlugin, B as BasePlugin, C as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, d as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, e as FILTE_PANEL, f as FilterPlugin, G as GroupingRowPlugin, l as SortingPlugin, S as StretchColumn, c as columnTypes, g as filterCoreFunctionsIndexedByType, j as filterNames, h as filterTypes, k as getLeftRelative, i as isRowType, a as isStretchPlugin, r as rowTypes } from './column.drag.plugin-bc7ec071.js';
export { d as dispatch, a as dispatchByEvent } from './header-cell-renderer-36ecbdef.js';

@@ -26,4 +26,5 @@ export { h } from './index-a61f225b.js';

['roworderchanged', 'roworderchanged'],
['beforesorting', 'beforesorting'],
['beforesourcesortingapply', 'beforesourcesortingapply'],
['beforesortingapply', 'beforesortingapply'],
['beforesorting', 'beforesorting'],
['rowdragstart', 'rowdragstart'],

@@ -30,0 +31,0 @@ ['headerclick', 'headerclick'],

/*!
* Built by Revolist OU ❤️
*/
import{B as _}from"./column.drag.plugin-8fdea9fa.js";export{A as AutoSizeColumnPlugin,B as BasePlugin,C as ColumnMovePlugin,D as DimensionStore,b as ExportCsv,E as ExportFilePlugin,d as FILTER_CONFIG_CHANGED_EVENT,F as FILTER_TRIMMED_TYPE,e as FILTE_PANEL,f as FilterPlugin,G as GroupingRowPlugin,l as SortingPlugin,S as StretchColumn,c as columnTypes,g as filterCoreFunctionsIndexedByType,j as filterNames,h as filterTypes,k as getLeftRelative,i as isRowType,a as isStretchPlugin,r as rowTypes}from"./column.drag.plugin-8fdea9fa.js";export{d as dispatch,a as dispatchByEvent}from"./header-cell-renderer-36ecbdef.js";export{h}from"./index-a61f225b.js";export{C as CELL_CLASS,L as CELL_HANDLER_CLASS,x as DATA_COL,y as DATA_ROW,z as DISABLED_CLASS,I as DRAGGABLE_CLASS,O as DRAGG_TEXT,G as DRAG_ICON_CLASS,D as DataStore,N as EDIT_INPUT_WR,J as FOCUS_CLASS,P as GRID_INTERNALS,F as HEADER_ACTUAL_ROW_CLASS,H as HEADER_CLASS,E as HEADER_ROW_CLASS,B as HEADER_SORTABLE_CLASS,M as MIN_COL_SIZE,K as MOBILE_CLASS,R as RESIZE_INTERVAL,Q as ROW_FOCUSED_CLASS,A as ROW_HEADER_TYPE,S as SELECTION_BORDER_CLASS,T as TMP_SELECTION_BG_CLASS,v as applyMixins,i as calculateDimensionData,U as codesLetter,l as findPositionInArray,h as gatherTrimmedItems,k as getItemByIndex,j as getItemByPosition,g as getPhysical,o as getScrollbarSize,b as getSourceItem,f as getSourceItemVirtualIndexByProp,c as getSourcePhysicalIndex,a as getVisibleSourceItem,V as keyValues,n as mergeSortedArray,p as proxyPlugin,m as pushSorted,r as range,q as scaleValue,e as setItems,d as setSourceByPhysicalIndex,s as setSourceByVirtualIndex,w as setStore,u as timeout,t as trimmedPlugin}from"./dimension.helpers-d0d709c4.js";export{S as SelectionStore,c as cropCellToMax,v as gatherGroup,e as gatherGrouping,o as getCellData,q as getCellDataParsed,p as getCellRaw,w as getColumnByProp,s as getColumnSizes,r as getColumnType,u as getColumns,d as getExpanded,f as getGroupingName,k as getParsedGroup,g as getRange,b as getSource,t as isColGrouping,h as isGrouping,j as isGroupingColumn,i as isHiddenStore,a as isRangeSingleCell,l as isSameGroup,m as measureEqualDepth,n as nextCell}from"./column.service-a6a7c415.js";export{S as SortingSign}from"./sorting.sign-1a675bf7.js";export{T as TextEditor}from"./text-editor-148a17c1.js";export{V as ViewportStore,a as addMissingItems,f as calculateRowHeaderSize,d as getFirstItem,b as getItems,e as getLastItem,g as getUpdatedItemsByPosition,i as isActiveRange,c as isActiveRangeOutsideLastItem,r as recombineByOffset,s as setItemSizes,u as updateMissingAndRange}from"./viewport.store-afa8c4fe.js";export{A as AND_OR_BUTTON,e as AndOrButton,a as FILTER_BUTTON_ACTIVE,F as FILTER_BUTTON_CLASS,b as FILTER_PROP,c as FilterButton,T as TRASH_BUTTON,d as TrashButton,i as isFilterBtn}from"./filter.button-d40ab17b.js";export{k as isAll,c as isClear,h as isCopy,a as isCtrlKey,b as isCtrlMetaKey,g as isCut,f as isEnterKeyValue,i as isMetaKey,j as isPaste,d as isTab,e as isTabKeyValue}from"./key.utils-7c3218d4.js";import"./debounce-b3166f78.js";const W=new Map([["contentsizechanged","contentsizechanged"],["beforeedit","beforeedit"],["beforerangeedit","beforerangeedit"],["afteredit","afteredit"],["beforeautofill","beforeautofill"],["beforerange","beforerange"],["afterfocus","afterfocus"],["roworderchanged","roworderchanged"],["beforesortingapply","beforesortingapply"],["beforesorting","beforesorting"],["rowdragstart","rowdragstart"],["headerclick","headerclick"],["beforecellfocus","beforecellfocus"],["beforefocuslost","beforefocuslost"],["beforesourceset","beforesourceset"],["beforeanysource","beforeanysource"],["aftersourceset","aftersourceset"],["afteranysource","afteranysource"],["beforecolumnsset","beforecolumnsset"],["beforecolumnapplied","beforecolumnapplied"],["aftercolumnsset","aftercolumnsset"],["beforefilterapply","beforefilterapply"],["beforefiltertrimmed","beforefiltertrimmed"],["beforetrimmed","beforetrimmed"],["aftertrimmed","aftertrimmed"],["viewportscroll","viewportscroll"],["beforeexport","beforeexport"],["beforeeditstart","beforeeditstart"],["aftercolumnresize","aftercolumnresize"],["beforerowdefinition","beforerowdefinition"],["filterconfigchanged","filterconfigchanged"],["sortingconfigchanged","sortingconfigchanged"],["rowheaderschanged","rowheaderschanged"],["beforegridrender","beforegridrender"],["aftergridrender","aftergridrender"],["aftergridinit","aftergridinit"],["additionaldatachanged","additionaldatachanged"],["afterthemechanged","afterthemechanged"],["created","created"],["beforepaste","beforepaste"],["beforepasteapply","beforepasteapply"],["pasteregion","pasteregion"],["afterpasteapply","afterpasteapply"],["beforecut","beforecut"],["clearregion","clearregion"],["beforecopy","beforecopy"],["beforecopyapply","beforecopyapply"],["copyregion","copyregion"],["beforerowrender","beforerowrender"],["afterrender","afterrender"],["beforecellrender","beforecellrender"],["beforedatarender","beforedatarender"],["dragstartcell","dragstartcell"],["celledit","celledit"],["closeedit","closeedit"],["filterChange","filterChange"],["resetChange","resetChange"],["beforefocusrender","beforefocusrender"],["beforescrollintoview","beforescrollintoview"],["afterfocus","afterfocus"],["beforeheaderclick","beforeheaderclick"],["headerresize","headerresize"],["beforeheaderresize","beforeheaderresize"],["headerdblclick","headerdblclick"],["beforeheaderrender","beforeheaderrender"],["afterheaderrender","afterheaderrender"],["rowdragstartinit","rowdragstartinit"],["rowdragendinit","rowdragendinit"],["rowdragmoveinit","rowdragmoveinit"],["rowdragmousemove","rowdragmousemove"],["rowdropinit","rowdropinit"],["roworderchange","roworderchange"],["beforecopyregion","beforecopyregion"],["beforepasteregion","beforepasteregion"],["celleditapply","celleditapply"],["beforecellfocusinit","beforecellfocusinit"],["beforenextvpfocus","beforenextvpfocus"],["setedit","setedit"],["beforeapplyrange","beforeapplyrange"],["beforesetrange","beforesetrange"],["setrange","setrange"],["beforeeditrender","beforeeditrender"],["selectall","selectall"],["canceledit","canceledit"],["settemprange","settemprange"],["beforesettemprange","beforesettemprange"],["applyfocus","applyfocus"],["focuscell","focuscell"],["beforerangedataapply","beforerangedataapply"],["selectionchangeinit","selectionchangeinit"],["beforerangecopyapply","beforerangecopyapply"],["rangeeditapply","rangeeditapply"],["clipboardrangecopy","clipboardrangecopy"],["clipboardrangepaste","clipboardrangepaste"],["beforekeydown","beforekeydown"],["beforekeyup","beforekeyup"],["beforecellsave","beforecellsave"],["scrollview","scrollview"],["ref","ref"],["scrollvirtual","scrollvirtual"],["scrollviewport","scrollviewport"],["resizeviewport","resizeviewport"],["scrollchange","scrollchange"],["scrollviewportsilent","scrollviewportsilent"],["html","html"]]);class Y extends _{constructor(e,r){super(e,r);this.addEventListener("beforepasteapply",(e=>this.handleBeforePasteApply(e)))}handleBeforePasteApply(e){const r=this.providers.selection.focused;const a=this.providers.selection.edit!=null;if(!r||a){return}const s=this.providers.data.stores.rgRow.store.get("items").length;const o=r.y+e.detail.parsed.length;if(s<o){const e=o-s;const r=Array.from({length:e},((e,r)=>({index:s+r,data:{}})));const a=this.emit("newRows",{newRows:r});if(a.defaultPrevented){return}const t=[...this.providers.data.stores.rgRow.store.get("source"),...a.detail.newRows.map((e=>e.data))];this.providers.data.setData(t)}}}export{Y as AutoAddRowsPlugin,W as REVOGRID_EVENTS};
import{B as _}from"./column.drag.plugin-bc7ec071.js";export{A as AutoSizeColumnPlugin,B as BasePlugin,C as ColumnMovePlugin,D as DimensionStore,b as ExportCsv,E as ExportFilePlugin,d as FILTER_CONFIG_CHANGED_EVENT,F as FILTER_TRIMMED_TYPE,e as FILTE_PANEL,f as FilterPlugin,G as GroupingRowPlugin,l as SortingPlugin,S as StretchColumn,c as columnTypes,g as filterCoreFunctionsIndexedByType,j as filterNames,h as filterTypes,k as getLeftRelative,i as isRowType,a as isStretchPlugin,r as rowTypes}from"./column.drag.plugin-bc7ec071.js";export{d as dispatch,a as dispatchByEvent}from"./header-cell-renderer-36ecbdef.js";export{h}from"./index-a61f225b.js";export{C as CELL_CLASS,L as CELL_HANDLER_CLASS,x as DATA_COL,y as DATA_ROW,z as DISABLED_CLASS,I as DRAGGABLE_CLASS,O as DRAGG_TEXT,G as DRAG_ICON_CLASS,D as DataStore,N as EDIT_INPUT_WR,J as FOCUS_CLASS,P as GRID_INTERNALS,F as HEADER_ACTUAL_ROW_CLASS,H as HEADER_CLASS,E as HEADER_ROW_CLASS,B as HEADER_SORTABLE_CLASS,M as MIN_COL_SIZE,K as MOBILE_CLASS,R as RESIZE_INTERVAL,Q as ROW_FOCUSED_CLASS,A as ROW_HEADER_TYPE,S as SELECTION_BORDER_CLASS,T as TMP_SELECTION_BG_CLASS,v as applyMixins,i as calculateDimensionData,U as codesLetter,l as findPositionInArray,h as gatherTrimmedItems,k as getItemByIndex,j as getItemByPosition,g as getPhysical,o as getScrollbarSize,b as getSourceItem,f as getSourceItemVirtualIndexByProp,c as getSourcePhysicalIndex,a as getVisibleSourceItem,V as keyValues,n as mergeSortedArray,p as proxyPlugin,m as pushSorted,r as range,q as scaleValue,e as setItems,d as setSourceByPhysicalIndex,s as setSourceByVirtualIndex,w as setStore,u as timeout,t as trimmedPlugin}from"./dimension.helpers-d0d709c4.js";export{S as SelectionStore,c as cropCellToMax,v as gatherGroup,e as gatherGrouping,o as getCellData,q as getCellDataParsed,p as getCellRaw,w as getColumnByProp,s as getColumnSizes,r as getColumnType,u as getColumns,d as getExpanded,f as getGroupingName,k as getParsedGroup,g as getRange,b as getSource,t as isColGrouping,h as isGrouping,j as isGroupingColumn,i as isHiddenStore,a as isRangeSingleCell,l as isSameGroup,m as measureEqualDepth,n as nextCell}from"./column.service-a6a7c415.js";export{S as SortingSign}from"./sorting.sign-1a675bf7.js";export{T as TextEditor}from"./text-editor-148a17c1.js";export{V as ViewportStore,a as addMissingItems,f as calculateRowHeaderSize,d as getFirstItem,b as getItems,e as getLastItem,g as getUpdatedItemsByPosition,i as isActiveRange,c as isActiveRangeOutsideLastItem,r as recombineByOffset,s as setItemSizes,u as updateMissingAndRange}from"./viewport.store-afa8c4fe.js";export{A as AND_OR_BUTTON,e as AndOrButton,a as FILTER_BUTTON_ACTIVE,F as FILTER_BUTTON_CLASS,b as FILTER_PROP,c as FilterButton,T as TRASH_BUTTON,d as TrashButton,i as isFilterBtn}from"./filter.button-d40ab17b.js";export{k as isAll,c as isClear,h as isCopy,a as isCtrlKey,b as isCtrlMetaKey,g as isCut,f as isEnterKeyValue,i as isMetaKey,j as isPaste,d as isTab,e as isTabKeyValue}from"./key.utils-7c3218d4.js";import"./debounce-b3166f78.js";const W=new Map([["contentsizechanged","contentsizechanged"],["beforeedit","beforeedit"],["beforerangeedit","beforerangeedit"],["afteredit","afteredit"],["beforeautofill","beforeautofill"],["beforerange","beforerange"],["afterfocus","afterfocus"],["roworderchanged","roworderchanged"],["beforesorting","beforesorting"],["beforesourcesortingapply","beforesourcesortingapply"],["beforesortingapply","beforesortingapply"],["rowdragstart","rowdragstart"],["headerclick","headerclick"],["beforecellfocus","beforecellfocus"],["beforefocuslost","beforefocuslost"],["beforesourceset","beforesourceset"],["beforeanysource","beforeanysource"],["aftersourceset","aftersourceset"],["afteranysource","afteranysource"],["beforecolumnsset","beforecolumnsset"],["beforecolumnapplied","beforecolumnapplied"],["aftercolumnsset","aftercolumnsset"],["beforefilterapply","beforefilterapply"],["beforefiltertrimmed","beforefiltertrimmed"],["beforetrimmed","beforetrimmed"],["aftertrimmed","aftertrimmed"],["viewportscroll","viewportscroll"],["beforeexport","beforeexport"],["beforeeditstart","beforeeditstart"],["aftercolumnresize","aftercolumnresize"],["beforerowdefinition","beforerowdefinition"],["filterconfigchanged","filterconfigchanged"],["sortingconfigchanged","sortingconfigchanged"],["rowheaderschanged","rowheaderschanged"],["beforegridrender","beforegridrender"],["aftergridrender","aftergridrender"],["aftergridinit","aftergridinit"],["additionaldatachanged","additionaldatachanged"],["afterthemechanged","afterthemechanged"],["created","created"],["beforepaste","beforepaste"],["beforepasteapply","beforepasteapply"],["pasteregion","pasteregion"],["afterpasteapply","afterpasteapply"],["beforecut","beforecut"],["clearregion","clearregion"],["beforecopy","beforecopy"],["beforecopyapply","beforecopyapply"],["copyregion","copyregion"],["beforerowrender","beforerowrender"],["afterrender","afterrender"],["beforecellrender","beforecellrender"],["beforedatarender","beforedatarender"],["dragstartcell","dragstartcell"],["celledit","celledit"],["closeedit","closeedit"],["filterChange","filterChange"],["resetChange","resetChange"],["beforefocusrender","beforefocusrender"],["beforescrollintoview","beforescrollintoview"],["afterfocus","afterfocus"],["beforeheaderclick","beforeheaderclick"],["headerresize","headerresize"],["beforeheaderresize","beforeheaderresize"],["headerdblclick","headerdblclick"],["beforeheaderrender","beforeheaderrender"],["afterheaderrender","afterheaderrender"],["rowdragstartinit","rowdragstartinit"],["rowdragendinit","rowdragendinit"],["rowdragmoveinit","rowdragmoveinit"],["rowdragmousemove","rowdragmousemove"],["rowdropinit","rowdropinit"],["roworderchange","roworderchange"],["beforecopyregion","beforecopyregion"],["beforepasteregion","beforepasteregion"],["celleditapply","celleditapply"],["beforecellfocusinit","beforecellfocusinit"],["beforenextvpfocus","beforenextvpfocus"],["setedit","setedit"],["beforeapplyrange","beforeapplyrange"],["beforesetrange","beforesetrange"],["setrange","setrange"],["beforeeditrender","beforeeditrender"],["selectall","selectall"],["canceledit","canceledit"],["settemprange","settemprange"],["beforesettemprange","beforesettemprange"],["applyfocus","applyfocus"],["focuscell","focuscell"],["beforerangedataapply","beforerangedataapply"],["selectionchangeinit","selectionchangeinit"],["beforerangecopyapply","beforerangecopyapply"],["rangeeditapply","rangeeditapply"],["clipboardrangecopy","clipboardrangecopy"],["clipboardrangepaste","clipboardrangepaste"],["beforekeydown","beforekeydown"],["beforekeyup","beforekeyup"],["beforecellsave","beforecellsave"],["scrollview","scrollview"],["ref","ref"],["scrollvirtual","scrollvirtual"],["scrollviewport","scrollviewport"],["resizeviewport","resizeviewport"],["scrollchange","scrollchange"],["scrollviewportsilent","scrollviewportsilent"],["html","html"]]);class Y extends _{constructor(e,r){super(e,r);this.addEventListener("beforepasteapply",(e=>this.handleBeforePasteApply(e)))}handleBeforePasteApply(e){const r=this.providers.selection.focused;const a=this.providers.selection.edit!=null;if(!r||a){return}const s=this.providers.data.stores.rgRow.store.get("items").length;const o=r.y+e.detail.parsed.length;if(s<o){const e=o-s;const r=Array.from({length:e},((e,r)=>({index:s+r,data:{}})));const a=this.emit("newRows",{newRows:r});if(a.defaultPrevented){return}const t=[...this.providers.data.stores.rgRow.store.get("source"),...a.detail.newRows.map((e=>e.data))];this.providers.data.setData(t)}}}export{Y as AutoAddRowsPlugin,W as REVOGRID_EVENTS};
//# sourceMappingURL=index.esm.js.map
/*!
* Built by Revolist OU ❤️
*/
import{h as e,r as t,c as r,H as o,a as i}from"./index-a61f225b.js";import{x as s,r as a,s as n,E as d,w as l,u as h,F as c}from"./column.service-a6a7c415.js";import{c as g,m as v,r as u,i as f,D as p,B as m,G as w,S as b,a as x,A as C,f as y,E as S,l as k,C as R}from"./column.drag.plugin-8fdea9fa.js";import{D as L,b as E,f as H,d as P,s as j,a as z,h as M,k as O,R as T,u as D}from"./dimension.helpers-d0d709c4.js";import{d as I}from"./debounce-b3166f78.js";import{V as N}from"./viewport.store-afa8c4fe.js";import{v as F,H as $,C as B,F as V,D as U}from"./viewport.helpers-7e7f9dad.js";import{g as A}from"./events-cf0893a3.js";import"./filter.button-d40ab17b.js";import"./header-cell-renderer-36ecbdef.js";class Y{constructor(){this.defaultRowSize=32}}class X{constructor(){this.defaultRowSize=27}}class W{constructor(){this.defaultRowSize=42}}const G="default";const Z=[G,"material","compact","darkMaterial","darkCompact"];class _{get theme(){return this.currentTheme}get rowSize(){return this.customRowSize||this.currentTheme.defaultRowSize}set rowSize(e){this.customRowSize=e}constructor(e){this.customRowSize=0;this.customRowSize=e.rowSize;this.register("default")}register(e){const t=q(e);switch(t){case"material":case"darkMaterial":this.currentTheme=new W;break;case"compact":case"darkCompact":this.currentTheme=new Y;break;default:this.currentTheme=new X;break}}}function q(e){if(e&&Z.indexOf(e)>-1){return e}return G}class J{get order(){const e={};const t=this.sorting;if(t){Object.keys(t).forEach((r=>{e[r]=t[r].order}))}return e}get stores(){return this.dataSources}constructor(){this.sorting=null;this.collection=null;this.dataSources=g.reduce(((e,t)=>{e[t]=new L(t);return e}),{})}column(e,t="rgCol"){return this.getColumn(e,t)}getColumn(e,t){return E(this.dataSources[t].store,e)}getRawColumns(){return s(this.dataSources,((e,t,r)=>{e[r]=t.store.get("source");return e}),{rgCol:[],colPinStart:[],colPinEnd:[]})}getColumns(e="all"){const t=this.getRawColumns();if(e!=="all"){return t[e]}return g.reduce(((e,r)=>[...e,...t[r]]),[])}getColumnIndexByProp(e,t){return H(this.dataSources[t].store,e)}getColumnByProp(e){var t;return(t=this.collection)===null||t===void 0?void 0:t.columnByProp[e]}refreshByType(e){this.dataSources[e].refresh()}setColumns(e){g.forEach((t=>{this.dataSources[t].updateData(e.columns[t],{depth:e.maxLevel,groups:e.columnGrouping[t].reduce(((e,t)=>{if(!e[t.level]){e[t.level]=[]}e[t.level].push(t);return e}),{})})}));this.sorting=e.sort;this.collection=e;return e}updateColumns(e){const t=e.reduce(((e,t)=>{const r=a(t);if(!e[r]){e[r]={}}e[r][t.prop]=t;return e}),{});const r={};for(const e in t){if(!t.hasOwnProperty(e)){continue}const o=e;const i=t[o];const s=this.dataSources[o].store.get("source");r[o]={};for(let e=0;e<s.length;e++){const t=s[e];const a=i===null||i===void 0?void 0:i[t.prop];if(a){r[o][e]=a}}}for(const e in r){if(!r.hasOwnProperty(e)){continue}const t=e;P(this.dataSources[t].store,r[t]||{})}}updateColumn(e,t){const r=a(e);j(this.dataSources[r].store,{[t]:e})}updateColumnSorting(e,t,r,o){if(!o){this.clearSorting()}e.order=r;if(!this.sorting){this.sorting={}}this.sorting[e.prop]=e;this.updateColumn(e,t);return e}clearSorting(){const e=s(this.sorting,((e,t)=>{const r=a(t);e[r]=true;return e}),{});v(e,((e,t)=>{const r=this.dataSources[t].store.get("source");v(r,(e=>e.order=undefined));this.dataSources[t].setData({source:[...r]})}));this.sorting={}}}class K{constructor(e){this.dimensionProvider=e;this.stores=s(u,((e,t)=>{e[t]=new L(t);return e}),{})}setData(e,t="rgRow",r=false,o,i=false){this.stores[t].updateData([...e],o,i);const s=t!=="rgRow"||r;this.dimensionProvider.setData(e.length,t,s);return e}getModel(e,t="rgRow"){const r=this.stores[t].store;return E(r,e)}changeOrder({rowType:e="rgRow",from:t,to:r}){const o=this.stores[e];const i=[...o.store.get("proxyItems")];const s=o.store.get("items");const a=i.splice(i.indexOf(s[t]),1);i.splice(i.indexOf(s[r]),0,...a);o.setData({proxyItems:i});const n=o.store.get("items");this.dimensionProvider.updateSizesPositionByNewDataIndexes(e,n,s)}setCellData({type:e,rowIndex:t,prop:r,val:o},i=true){const s=this.getModel(t,e);s[r]=o;this.stores[e].setSourceData({[t]:s},i)}setRangeData(e,t){const r={};for(let o in e){const i=r[o]=E(this.stores[t].store,parseInt(o,10));if(!i){continue}for(let t in e[o]){i[t]=e[o][t]}}this.stores[t].setSourceData(r)}refresh(e="all"){if(f(e)){this.refreshItems(e)}u.forEach((e=>this.refreshItems(e)))}refreshItems(e="rgRow"){const t=this.stores[e].store.get("items");this.stores[e].setData({items:[...t]})}setGrouping({depth:e},t="rgRow"){this.stores[t].setData({groupingDepth:e})}setTrimmed(e,t="rgRow"){const r=this.stores[t];r.addTrimmed(e);this.dimensionProvider.setTrimmed(e,t);if(t==="rgRow"){this.dimensionProvider.setData(z(r.store).length,t)}}}class Q{constructor(e,t){this.viewports=e;const r=I((e=>t.realSizeChanged(e)),T);this.stores=s([...u,...g],((e,t)=>{e[t]=new p(t);e[t].store.onChange("realSize",(()=>r(t)));return e}),{})}clearSize(e,t){this.stores[e].drop();this.viewports.stores[e].setOriginalSizes(this.stores[e].store.get("originItemSize"));this.setItemCount(t,e)}setCustomSizes(e,t,r=false){let o=t;if(r){const r=this.stores[e].store.get("sizes");o=Object.assign(Object.assign({},r),t)}this.stores[e].setDimensionSize(o);this.setViewPortCoordinate({coordinate:this.viewports.stores[e].lastCoordinate,type:e,force:true})}setItemCount(e,t){this.viewports.stores[t].setViewport({realCount:e});this.stores[t].setStore({count:e})}setTrimmed(e,t){const r=M(e);const o=this.stores[t];o.setStore({trimmed:r});this.setViewPortCoordinate({coordinate:this.viewports.stores[t].lastCoordinate,type:t,force:true})}setData(e,t,r=false){this.setItemCount(e,t);if(r){const e=this.stores[t].getCurrentState();this.viewports.stores[t].setViewport({virtualSize:e.realSize})}this.setViewPortCoordinate({coordinate:this.viewports.stores[t].lastCoordinate,type:t})}applyNewColumns(e,t,r=false){for(let o of g){if(!r){this.stores[o].drop()}const i=e[o];const s=o!=="rgCol"||t;this.stores[o].setStore({count:i.length});const a=n(i);this.stores[o].setDimensionSize(a);const d={realCount:i.length};if(s){d.virtualSize=this.stores[o].getCurrentState().realSize}this.viewports.stores[o].setViewport(d);this.setViewPortCoordinate({coordinate:this.viewports.stores[o].lastCoordinate,type:o})}}getFullSize(){var e,t;let r=0;let o=0;for(let t of g){r+=((e=this.stores[t])===null||e===void 0?void 0:e.store.get("realSize"))||0}for(let e of u){o+=((t=this.stores[e])===null||t===void 0?void 0:t.store.get("realSize"))||0}return{y:o,x:r}}setViewPortCoordinate({coordinate:e,type:t,force:r=false}){const o=this.stores[t].getCurrentState();this.viewports.stores[t].setViewPortCoordinate(e,o,r)}getViewPortPos(e){const t=this.stores[e.dimension].getCurrentState();const r=O(t,e.coordinate);return r.start}setSettings(e,t){let r=[];switch(t){case"rgCol":r=g;break;case"rgRow":r=u;break}for(let t of r){this.stores[t].setStore(e)}}updateSizesPositionByNewDataIndexes(e,t,r=[]){this.stores[e].updateSizesPositionByIndexes(t,r);this.setViewPortCoordinate({coordinate:this.viewports.stores[e].lastCoordinate,type:e,force:true})}}class ee{constructor(){this.stores=s([...u,...g],((e,t)=>{e[t]=new N(t);return e}),{})}setViewport(e,t){this.stores[e].setViewport(t)}}function te(e){const t=e.dimensions[e.colType].store;const r=t.get("realSize");const o={contentWidth:r,class:e.colType,contentHeight:e.contentHeight,key:e.colType,colType:e.colType,onResizeviewport:e.onResizeviewport,style:e.fixWidth?{minWidth:`${r}px`}:undefined};const i={colData:z(e.colStore),dimensionCol:t,type:e.colType,groups:e.colStore.get("groups"),groupingDepth:e.colStore.get("groupingDepth"),resizeHandler:e.colType==="colPinEnd"?["l"]:undefined,onHeaderresize:e.onHeaderresize};return{prop:o,type:e.colType,position:e.position,headerProp:i,viewportCol:e.viewports[e.colType].store}}class re{constructor(e,t){var r,o;this.config=e;(r=this.config.selectionStoreConnector)===null||r===void 0?void 0:r.beforeUpdate();const i=[];let s=0;g.forEach((r=>{const o=e.columnProvider.stores[r].store;if(!o.get("items").length){return}const a={colType:r,position:{x:s,y:1},contentHeight:t,fixWidth:r!=="rgCol",viewports:e.viewportProvider.stores,dimensions:e.dimensionProvider.stores,rowStores:e.dataProvider.stores,colStore:o,onHeaderresize:e=>this.onColumnResize(r,e,o)};if(r==="rgCol"){a.onResizeviewport=t=>{var r;const o={clientSize:t.detail.size};if(t.detail.dimension==="rgRow"&&!e.disableVirtualY||t.detail.dimension==="rgCol"&&!e.disableVirtualX){o.virtualSize=t.detail.size}(r=e.viewportProvider)===null||r===void 0?void 0:r.setViewport(t.detail.dimension,o)}}const n=te(a);const d=this.registerCol(n.position.x,r);const l=this.dataViewPort(a).reduce(((t,o)=>{const i=this.registerSegment(o.position);i.setLastCell(o.lastCell);const s=this.registerRow(o.position.y,o.type);const a=Object.assign(Object.assign({colType:r},o),{rowSelectionStore:s,selectionStore:i.store,ref:t=>e.selectionStoreConnector.registerSection(t),onSetrange:e=>{i.setRangeArea(e.detail)},onSettemprange:e=>i.setTempArea(e.detail),onFocuscell:t=>{i.clearFocus();e.selectionStoreConnector.focus(i,t.detail)}});t.push(a);return t}),[]);i.push(Object.assign(Object.assign({},n),{columnSelectionStore:d,dataPorts:l}));s++}));this.columns=i;(o=this.config.scrollingService)===null||o===void 0?void 0:o.unregister()}onColumnResize(e,{detail:t},r){var o;(o=this.config.dimensionProvider)===null||o===void 0?void 0:o.setCustomSizes(e,t,true);const i={};for(const[e,o]of Object.entries(t||{})){const t=parseInt(e,10);const s=E(r,t);if(s){i[t]=Object.assign(Object.assign({},s),{size:o})}}this.config.resize(i)}registerSegment(e){return this.config.selectionStoreConnector.register(e)}registerRow(e,t){return this.config.selectionStoreConnector.registerRow(e,t).store}registerCol(e,t){return this.config.selectionStoreConnector.registerColumn(e,t).store}dataViewPort(e){const t={rowPinStart:$,rgRow:B,rowPinEnd:V};let r=0;return u.reduce(((o,i)=>{const s=e.viewports[i].store.get("realCount")||i==="rgRow";const a=Object.assign(Object.assign({},e),{position:Object.assign(Object.assign({},e.position),{y:s?r:d})});const n=F(a,i,t[i],i!=="rgRow");o.push(n);if(s){r++}return o}),[])}scrollToCell(e){for(let t in e){const r=e[t];if(typeof r==="number"){this.config.scrollingService.proxyScroll({dimension:t==="x"?"rgCol":"rgRow",coordinate:r})}}}clearFocused(){this.config.selectionStoreConnector.clearAll()}clearEdit(){this.config.selectionStoreConnector.setEdit(false)}getFocused(){const e=this.config.selectionStoreConnector.focusedStore;if(!e){return null}const t=this.config.selectionStoreConnector.storesXToType[e.position.x];const r=this.config.columnProvider.getColumn(e.cell.x,t);const o=this.config.selectionStoreConnector.storesYToType[e.position.y];const i=this.config.dataProvider.getModel(e.cell.y,o);return{column:r,model:i,cell:e.cell,colType:t,rowType:o}}getStoreCoordinateByType(e,t){const r=this.config.selectionStoreConnector.storesByType;if(typeof r[e]==="undefined"||typeof r[t]==="undefined"){return}return{x:r[e],y:r[t]}}setFocus(e,t,r,o){var i;const s=this.getStoreCoordinateByType(e,t);if(s){(i=this.config.selectionStoreConnector)===null||i===void 0?void 0:i.focusByCell(s,r,o)}}getSelectedRange(){return this.config.selectionStoreConnector.selectedRange}setEdit(e,t,r,o){var i;const s=this.getStoreCoordinateByType(r,o);if(s){(i=this.config.selectionStoreConnector)===null||i===void 0?void 0:i.setEditByCell(s,{x:t,y:e})}}}class oe{constructor(e){this.setViewport=e;this.elements={}}async proxyScroll(e,t){var r;let o;let i=e;for(let i in this.elements){if(e.dimension==="rgCol"&&i==="headerRow"){continue}else if(this.isPinnedColumn(t)&&e.dimension==="rgCol"){if(i===t||!e.delta){continue}for(let t of this.elements[i]){if(t.changeScroll){o=t.changeScroll(e)}}}else{for(let t of this.elements[i]){await((r=t.setScroll)===null||r===void 0?void 0:r.call(t,e))}}}const s=await o;if(s){i=s}this.setViewport(i)}async scrollSilentService(e,t){var r;for(let o in this.elements){if(o===t){continue}if(g.includes(t)&&(o==="headerRow"||g.includes(o))){for(let t of this.elements[o]){await((r=t.changeScroll)===null||r===void 0?void 0:r.call(t,e,true))}continue}}}isPinnedColumn(e){return!!e&&["colPinStart","colPinEnd"].indexOf(e)>-1}registerElements(e){this.elements=e}registerElement(e,t){if(!this.elements[t]){this.elements[t]=[]}if(e){this.elements[t].push(e)}else if(this.elements[t]){delete this.elements[t]}}unregister(){this.elements={}}}class ie{constructor(){this.parentY=0}start(e,{pos:t,text:r,event:o}){var i;const{top:s}=e.getBoundingClientRect();this.parentY=s;if(this.text){this.text.innerText=r}this.move(t);this.moveTip({x:o.x,y:o.y});(i=this.el)===null||i===void 0?void 0:i.classList.remove("hidden")}end(){var e;(e=this.el)===null||e===void 0?void 0:e.classList.add("hidden")}move(e){this.moveElement(e.end-this.parentY)}moveTip({x:e,y:t}){if(!this.draggable){return}this.draggable.style.left=`${e}px`;this.draggable.style.top=`${t}px`}moveElement(e){if(!this.rgRow){return}this.rgRow.style.transform=`translateY(${e}px)`}}const se=({ref:t})=>{const r=new ie;t(r);return e("div",{class:"draggable-wrapper hidden",ref:e=>r.el=e},e("div",{class:"draggable",ref:e=>r.draggable=e},e("span",{class:"revo-alt-icon"}),e("span",{ref:e=>r.text=e})),e("div",{class:"drag-position",ref:e=>r.rgRow=e}))};const ae=(e=[])=>{const t={};for(const r of e){let e=t[r.type];if(!e){e=t[r.type]={}}if(r.size){if(!e.sizes){e.sizes={}}e.sizes[r.index]=r.size}}return t};const ne=(e=[])=>{const t={};for(const r of e){let e=t[r.type];if(!e){e=t[r.type]=[]}if(r.size){e.push(r.index)}}return t};function de(){return/Mobi/i.test(navigator.userAgent)||/Android/i.test(navigator.userAgent)||navigator.maxTouchPoints>0}class le extends m{constructor(e,t){super(e,t);e.setAttribute("dir","ltr");e.setAttribute("role","treegrid");e.setAttribute("aria-keyshortcuts","Enter");e.setAttribute("aria-multiselectable","true");e.setAttribute("tabindex","0");this.addEventListener("beforecolumnsset",(({detail:t})=>{const r=[...t.columns.colPinStart,...t.columns.rgCol,...t.columns.colPinEnd];e.setAttribute("aria-colcount",`${r.length}`);r.forEach(((e,t)=>{const{columnProperties:r,cellProperties:o}=e;e.columnProperties=(...e)=>{const o=(r===null||r===void 0?void 0:r(...e))||{};o.role="columnheader";o["aria-colindex"]=t;return o};e.cellProperties=(...e)=>{const r={["role"]:"gridcell",["aria-colindex"]:t,["aria-rowindex"]:e[0].rowIndex,["tabindex"]:-1};const i=(o===null||o===void 0?void 0:o(...e))||{};return Object.assign(Object.assign({},r),i)}}))}));this.addEventListener("beforesourceset",(({detail:t})=>{e.setAttribute("aria-rowcount",`${t.source.length}`)}));this.addEventListener("beforerowrender",(({detail:e})=>{e.node.t=Object.assign(Object.assign({},e.node.t),{role:"row",["aria-rowindex"]:e.item.itemIndex})}));this.addEventListener("afterfocus",(async e=>{if(e.defaultPrevented){return}const t=this.revogrid.querySelector(`revogr-data[type="${e.detail.rowType}"][col-type="${e.detail.colType}"] [data-rgrow="${e.detail.rowIndex}"][data-rgcol="${e.detail.colIndex}"]`);if(t instanceof HTMLElement){t.focus()}}))}}class he{constructor(){this.internalPlugins=[]}get(){return[...this.internalPlugins]}add(e){this.internalPlugins.push(e)}addUserPluginsAndCreate(e,t=[],r,o){if(!o){return}const i=(r===null||r===void 0?void 0:r.filter((e=>!t.some((t=>t===e)))))||[];i.forEach((e=>{var t,r;const o=this.internalPlugins.findIndex((t=>t instanceof e));if(o!==-1){(r=(t=this.internalPlugins[o]).destroy)===null||r===void 0?void 0:r.call(t);this.internalPlugins.splice(o,1)}}));t===null||t===void 0?void 0:t.forEach((t=>{const r=this.internalPlugins.find((e=>e instanceof t));if(r){return}this.add(new t(e,o))}))}getByClass(e){return this.internalPlugins.find((t=>t instanceof e))}remove(e){var t,r;const o=this.internalPlugins.indexOf(e);if(o>-1){(r=(t=this.internalPlugins[o]).destroy)===null||r===void 0?void 0:r.call(t);this.internalPlugins.splice(o,1)}}destroy(){this.internalPlugins.forEach((e=>{var t;return(t=e.destroy)===null||t===void 0?void 0:t.call(e)}));this.internalPlugins=[]}}const ce='.revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:"::"}.revo-alt-icon{-webkit-mask-image:url("data:image/svg+xml,%3C%3Fxml version=\'1.0\' encoding=\'UTF-8\'%3F%3E%3Csvg viewBox=\'0 0 384 383\' xmlns=\'http://www.w3.org/2000/svg\' xmlns:xlink=\'http://www.w3.org/1999/xlink\'%3E%3Cg%3E%3Cpath d=\'M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z\'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3C%3Fxml version=\'1.0\' encoding=\'UTF-8\'%3F%3E%3Csvg viewBox=\'0 0 384 383\' xmlns=\'http://www.w3.org/2000/svg\' xmlns:xlink=\'http://www.w3.org/1999/xlink\'%3E%3Cg%3E%3Cpath d=\'M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z\'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revo-grid[theme=default],revo-grid:not([theme]){border:1px solid #cecece;font-size:12px}revo-grid[theme=default] .rowHeaders revogr-header,revo-grid:not([theme]) .rowHeaders revogr-header{box-shadow:-1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-header,revo-grid:not([theme]) revogr-header{text-align:center;line-height:30px;background-color:#f8f9fa}revo-grid[theme=default] revogr-header .group-rgRow,revo-grid:not([theme]) revogr-header .group-rgRow{box-shadow:none}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid[theme=default] revogr-header .group-rgRow,revo-grid:not([theme]) revogr-header .header-rgRow,revo-grid:not([theme]) revogr-header .group-rgRow{text-transform:uppercase;font-size:12px;color:#000}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid:not([theme]) revogr-header .header-rgRow{height:30px;box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-header .rgHeaderCell,revo-grid:not([theme]) revogr-header .rgHeaderCell{box-shadow:-1px 0 0 0 #cecece inset, 0 -1px 0 0 #cecece, 0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-header .rgHeaderCell.focused-cell,revo-grid:not([theme]) revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] .rowHeaders,revo-grid:not([theme]) .rowHeaders{background-color:#f8f9fa}revo-grid[theme=default] .rowHeaders revogr-data .rgCell,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell{color:#000}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:first-child,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:first-child{box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:not(:first-child),revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:not(:first-child){box-shadow:0 -1px 0 0 #cecece inset, 1px 0 0 0 #cecece inset}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:last-child,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:last-child{border-right:1px solid #cecece}revo-grid[theme=default] .rowHeaders revogr-data revogr-header,revo-grid:not([theme]) .rowHeaders revogr-data revogr-header{box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child,revo-grid:not([theme]) revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell,revo-grid:not([theme]) revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #cecece inset, -1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinEnd,revo-grid[theme=default] revogr-viewport-scroll.colPinEnd revogr-header,revo-grid:not([theme]) revogr-viewport-scroll.colPinEnd,revo-grid:not([theme]) revogr-viewport-scroll.colPinEnd revogr-header{box-shadow:1px 0 0 #cecece inset}revo-grid[theme=default] .footer-wrapper revogr-data .rgRow:first-child .rgCell,revo-grid:not([theme]) .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset, 0 -1px 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data,revo-grid:not([theme]) revogr-data{text-align:center}revo-grid[theme=default] revogr-data .revo-draggable,revo-grid:not([theme]) revogr-data .revo-draggable{float:left}revo-grid[theme=default] revogr-data .rgRow,revo-grid:not([theme]) revogr-data .rgRow{line-height:27px}revo-grid[theme=default] revogr-data .rgRow.focused-rgRow,revo-grid:not([theme]) revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] revogr-data .rgCell,revo-grid:not([theme]) revogr-data .rgCell{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgCell.disabled,revo-grid:not([theme]) revogr-data .rgCell.disabled{background-color:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=material]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}revo-grid[theme=material] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=material] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=material] revogr-header .header-rgRow{height:50px}revo-grid[theme=material] revogr-data{text-align:left}revo-grid[theme=material] revogr-data .rgRow{line-height:42px}revo-grid[theme=material] revogr-data .rgCell{padding:0 15px}revo-grid[theme=material] .rowHeaders{background-color:#f7faff}revo-grid[theme=material] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=material] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=material] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=material] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=material] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=material] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=darkMaterial]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#d8d8d8}revo-grid[theme=darkMaterial] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkMaterial] revogr-header .header-rgRow{height:50px}revo-grid[theme=darkMaterial] revogr-data{text-align:left}revo-grid[theme=darkMaterial] revogr-data .rgRow{line-height:42px}revo-grid[theme=darkMaterial] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkMaterial] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkMaterial] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkMaterial] revogr-edit{background-color:#28272b}revo-grid[theme=darkMaterial] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkMaterial] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkMaterial] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=darkCompact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#d8d8d8}revo-grid[theme=darkCompact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkCompact] revogr-header .header-rgRow{height:45px}revo-grid[theme=darkCompact] revogr-data{text-align:left}revo-grid[theme=darkCompact] revogr-data .rgRow{line-height:32px}revo-grid[theme=darkCompact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkCompact] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkCompact] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkCompact] revogr-edit{background-color:#28272b}revo-grid[theme=darkCompact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkCompact] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkCompact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=compact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}revo-grid[theme=compact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=compact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=compact] revogr-header .header-rgRow{height:45px}revo-grid[theme=compact] revogr-data{text-align:left}revo-grid[theme=compact] revogr-data .rgRow{line-height:32px}revo-grid[theme=compact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=compact] .rowHeaders{background-color:#f7faff}revo-grid[theme=compact] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=compact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=compact] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=compact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=compact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=compact] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=compact] revo-dropdown .rv-dr-root{padding:0px 9px}revo-grid{display:block;height:100%;min-height:300px;font-family:Helvetica, Arial, Sans-Serif, serif;font-size:14px;position:relative;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column;width:100%;height:100%}revo-grid .attribution{position:absolute;bottom:0;left:0;right:0;z-index:1000;width:0;height:0;border-left:4px solid rgba(38, 106, 232, 0.9);border-bottom:4px solid rgba(38, 106, 232, 0.9);border-top:4px solid transparent;border-right:4px solid transparent;cursor:pointer}revo-grid .attribution .value{position:absolute;bottom:0;left:0;background-color:rgba(255, 255, 255, 0.9);padding:4px;border-radius:4px;box-shadow:0 1px 10px rgba(0, 0, 0, 0.2);white-space:nowrap;text-decoration:none;color:black;letter-spacing:0.3px;font-size:11px;opacity:0;width:4px;overflow:hidden;transition:opacity 0.5s ease-in-out, width 0.3s ease-in-out}revo-grid .attribution:hover .value{width:63px;opacity:1}revo-grid.column-draggable.column-drag-start:hover,revo-grid.column-draggable.column-drag-start *:hover{cursor:grabbing}revo-grid .footer-wrapper,revo-grid .header-wrapper{width:100%}revo-grid .footer-wrapper revogr-data,revo-grid .header-wrapper revogr-data{z-index:3}revo-grid revo-dropdown{width:100%}revo-grid revo-dropdown .rv-dr-root{max-height:100%}revo-grid revo-dropdown.shrink label{opacity:0}revo-grid .viewports{max-width:100%;display:flex;flex-direction:row;align-items:flex-start;flex-grow:1}revo-grid .main-viewport{flex-grow:1;height:0;display:flex;justify-content:space-between;flex-direction:row}revo-grid .draggable{position:fixed;height:30px;line-height:30px;background:#fff;border-radius:3px;display:block;z-index:100;margin-top:5px;margin-right:-20px;box-shadow:0 4px 20px 0 rgba(0, 0, 0, 0.15);padding-left:20px;padding-right:5px}revo-grid .draggable.hidden{display:none}revo-grid .draggable .revo-alt-icon{background-color:black;position:absolute;left:5px;top:10px}revo-grid .draggable-wrapper.hidden{display:none}revo-grid .drag-position{position:absolute;left:0;right:0;height:1px;z-index:2;background:gray;pointer-events:none}revo-grid .drag-position-y{position:absolute;top:0;left:0;bottom:0;width:1px;z-index:2;background:gray;pointer-events:none}revo-grid .drag-auto-scroll-y{pointer-events:none;position:absolute;left:0;top:0;height:50px;width:1px}revo-grid .clipboard{position:absolute;left:0;top:0}revo-grid revogr-scroll-virtual{position:relative}revo-grid revogr-scroll-virtual.vertical,revo-grid revogr-scroll-virtual.horizontal{z-index:3}';const ge=ce;const ve=class{constructor(e){t(this,e);this.contentsizechanged=r(this,"contentsizechanged",7);this.beforeedit=r(this,"beforeedit",7);this.beforerangeedit=r(this,"beforerangeedit",7);this.afteredit=r(this,"afteredit",7);this.beforeautofill=r(this,"beforeautofill",7);this.beforerange=r(this,"beforerange",7);this.afterfocus=r(this,"afterfocus",7);this.roworderchanged=r(this,"roworderchanged",7);this.beforesortingapply=r(this,"beforesortingapply",7);this.beforesorting=r(this,"beforesorting",7);this.rowdragstart=r(this,"rowdragstart",7);this.headerclick=r(this,"headerclick",7);this.beforecellfocus=r(this,"beforecellfocus",7);this.beforefocuslost=r(this,"beforefocuslost",7);this.beforesourceset=r(this,"beforesourceset",7);this.beforeanysource=r(this,"beforeanysource",7);this.aftersourceset=r(this,"aftersourceset",7);this.afteranysource=r(this,"afteranysource",7);this.beforecolumnsset=r(this,"beforecolumnsset",7);this.beforecolumnapplied=r(this,"beforecolumnapplied",7);this.aftercolumnsset=r(this,"aftercolumnsset",7);this.beforefilterapply=r(this,"beforefilterapply",7);this.beforefiltertrimmed=r(this,"beforefiltertrimmed",7);this.beforetrimmed=r(this,"beforetrimmed",7);this.aftertrimmed=r(this,"aftertrimmed",7);this.viewportscroll=r(this,"viewportscroll",7);this.beforeexport=r(this,"beforeexport",7);this.beforeeditstart=r(this,"beforeeditstart",7);this.aftercolumnresize=r(this,"aftercolumnresize",7);this.beforerowdefinition=r(this,"beforerowdefinition",7);this.filterconfigchanged=r(this,"filterconfigchanged",7);this.sortingconfigchanged=r(this,"sortingconfigchanged",7);this.rowheaderschanged=r(this,"rowheaderschanged",7);this.beforegridrender=r(this,"beforegridrender",7);this.aftergridrender=r(this,"aftergridrender",7);this.aftergridinit=r(this,"aftergridinit",7);this.additionaldatachanged=r(this,"additionaldatachanged",7);this.afterthemechanged=r(this,"afterthemechanged",7);this.created=r(this,"created",7);this.extraElements=[];this.pluginService=new he;this.viewport=null;this.isInited=false;this.rowHeaders=undefined;this.frameSize=1;this.rowSize=0;this.colSize=100;this.range=false;this.readonly=false;this.resize=false;this.canFocus=true;this.useClipboard=true;this.columns=[];this.source=[];this.pinnedTopSource=[];this.pinnedBottomSource=[];this.rowDefinitions=[];this.editors={};this.applyOnClose=false;this.plugins=[];this.columnTypes={};this.theme="default";this.rowClass="";this.autoSizeColumn=false;this.filter=false;this.sorting=undefined;this.focusTemplate=undefined;this.canMoveColumns=false;this.trimmedRows={};this.exporting=false;this.grouping=undefined;this.stretch=false;this.additionalData={};this.disableVirtualX=false;this.disableVirtualY=false;this.hideAttribution=false;this.jobsBeforeRender=[];this.registerVNode=[];this.accessible=true}async refresh(e="all"){if(!this.dataProvider){throw new Error("Not connected")}this.dataProvider.refresh(e)}async setDataAt({row:e,col:t,colType:r="rgCol",rowType:o="rgRow",val:i,skipDataUpdate:s=false}){var a;if(this.dataProvider&&this.columnProvider&&!s){const s=(a=this.columnProvider.getColumn(t,r))===null||a===void 0?void 0:a.prop;if(typeof s!=="undefined"){this.dataProvider.setCellData({type:o,rowIndex:e,prop:s,val:i},false)}}const n=this.element.querySelector(`revogr-data[type="${o}"][col-type="${r}"]`);return n===null||n===void 0?void 0:n.updateCell({row:e,col:t})}async scrollToRow(e=0){if(!this.dimensionProvider){throw new Error("Not connected")}const t=this.dimensionProvider.getViewPortPos({coordinate:e,dimension:"rgRow"});await this.scrollToCoordinate({y:t})}async scrollToColumnIndex(e=0){if(!this.dimensionProvider){throw new Error("Not connected")}const t=this.dimensionProvider.getViewPortPos({coordinate:e,dimension:"rgCol"});await this.scrollToCoordinate({x:t})}async scrollToColumnProp(e,t="rgCol"){if(!this.dimensionProvider||!this.columnProvider){throw new Error("Not connected")}const r=this.columnProvider.getColumnIndexByProp(e,t);if(r<0){return}const o=this.dimensionProvider.getViewPortPos({coordinate:r,dimension:t});await this.scrollToCoordinate({x:o})}async updateColumns(e){var t;(t=this.columnProvider)===null||t===void 0?void 0:t.updateColumns(e)}async addTrimmed(e,t="external",r="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}const o=this.beforetrimmed.emit({trimmed:e,trimmedType:t,type:r});if(o.defaultPrevented){return o}this.dataProvider.setTrimmed({[t]:o.detail.trimmed},r);this.aftertrimmed.emit();return o}async scrollToCoordinate(e){var t;(t=this.viewport)===null||t===void 0?void 0:t.scrollToCell(e)}async setCellEdit(e,t,r="rgRow"){var o;const i=l(this.columns,t);if(!i){return}await D();const s=i.pin||"rgCol";if(!this.columnProvider){throw new Error("Not connected")}(o=this.viewport)===null||o===void 0?void 0:o.setEdit(e,this.columnProvider.getColumnIndexByProp(t,s),s,r)}async setCellsFocus(e={x:0,y:0},t={x:0,y:0},r="rgCol",o="rgRow"){var i;(i=this.viewport)===null||i===void 0?void 0:i.setFocus(r,o,e,t)}async getSource(e="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}return this.dataProvider.stores[e].store.get("source")}async getVisibleSource(e="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}return z(this.dataProvider.stores[e].store)}async getSourceStore(e="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}return this.dataProvider.stores[e].store}async getColumnStore(e="rgCol"){if(!this.columnProvider){throw new Error("Not connected")}return this.columnProvider.stores[e].store}async updateColumnSorting(e,t,r,o){if(!this.columnProvider){throw new Error("Not connected")}return this.columnProvider.updateColumnSorting(e,t,r,o)}async clearSorting(){if(!this.columnProvider){throw new Error("Not connected")}this.columnProvider.clearSorting()}async getColumns(){if(!this.columnProvider){throw new Error("Not connected")}return this.columnProvider.getColumns()}async clearFocus(){var e,t;const r=(e=this.viewport)===null||e===void 0?void 0:e.getFocused();const o=this.beforefocuslost.emit(r);if(o.defaultPrevented){return}(t=this.selectionStoreConnector)===null||t===void 0?void 0:t.clearAll()}async getPlugins(){return this.pluginService.get()}async getFocused(){var e,t;return(t=(e=this.viewport)===null||e===void 0?void 0:e.getFocused())!==null&&t!==void 0?t:null}async getContentSize(){var e;if(!this.dimensionProvider){throw new Error("Not connected")}return(e=this.dimensionProvider)===null||e===void 0?void 0:e.getFullSize()}async getSelectedRange(){var e,t;return(t=(e=this.viewport)===null||e===void 0?void 0:e.getSelectedRange())!==null&&t!==void 0?t:null}async refreshExtraElements(){var e;(e=this.extraService)===null||e===void 0?void 0:e.refresh()}mousedownHandle(e){const t=A(e,"screenX");const r=A(e,"screenY");if(t===null||r===null){return}this.clickTrackForFocusClear=t+r}async mouseupHandle(e){var t;const r=A(e,"screenX");const o=A(e,"screenY");if(r===null||o===null){return}if(e.defaultPrevented){return}const i=r+o;if(Math.abs(((t=this.clickTrackForFocusClear)!==null&&t!==void 0?t:0)-i)>10){return}const s=e.composedPath();if(!s.includes(this.element)&&!(this.element.shadowRoot&&s.includes(this.element.shadowRoot))){await this.clearFocus()}}onRowDragStarted(e){var t;const r=this.rowdragstart.emit(e.detail);if(r.defaultPrevented){e.preventDefault();return}(t=this.orderService)===null||t===void 0?void 0:t.start(this.element,Object.assign(Object.assign({},e.detail),r.detail))}onRowDragEnd(){var e;(e=this.orderService)===null||e===void 0?void 0:e.end()}onRowOrderChange(e){var t;(t=this.dataProvider)===null||t===void 0?void 0:t.changeOrder(e.detail)}onRowDrag({detail:e}){var t;(t=this.orderService)===null||t===void 0?void 0:t.move(e)}onRowMouseMove(e){var t;(t=this.orderService)===null||t===void 0?void 0:t.moveTip(e.detail)}async onCellEdit(e){var t;const{defaultPrevented:r,detail:o}=this.beforeedit.emit(e.detail);await D();if(!r){(t=this.dataProvider)===null||t===void 0?void 0:t.setCellData(o);this.afteredit.emit(o)}}onRangeEdit(e){if(!this.dataProvider){throw new Error("Not connected")}const{defaultPrevented:t,detail:r}=this.beforerangeedit.emit(e.detail);if(t){e.preventDefault();return}this.dataProvider.setRangeData(r.data,r.type);this.afteredit.emit(r)}onRangeChanged(e){const t=this.beforerange.emit(e.detail);if(t.defaultPrevented){e.preventDefault()}const r=this.beforeautofill.emit(t.detail);if(r.defaultPrevented){e.preventDefault()}}onRowDropped(e){const{defaultPrevented:t}=this.roworderchanged.emit(e.detail);if(t){e.preventDefault()}}onHeaderClick(e){const{defaultPrevented:t}=this.headerclick.emit(Object.assign(Object.assign({},e.detail.column),{originalEvent:e.detail.originalEvent}));if(t){e.preventDefault()}}onCellFocus(e){const{defaultPrevented:t}=this.beforecellfocus.emit(e.detail);if(!this.canFocus||t){e.preventDefault()}}columnTypesChanged(){this.columnChanged(this.columns)}columnChanged(e=[],t=undefined,r="columns",o=false){if(!this.dimensionProvider||!this.columnProvider){return}const i=h(e,0,this.columnTypes);const s=this.beforecolumnsset.emit(i);if(s.defaultPrevented){return}this.dimensionProvider.applyNewColumns(s.detail.columns,this.disableVirtualX,o);const a=this.beforecolumnapplied.emit(i);if(a.defaultPrevented){return}const n=this.columnProvider.setColumns(a.detail);this.aftercolumnsset.emit({columns:n,order:this.columnProvider.order})}disableVirtualXChanged(e=false,t=false){if(e===t){return}this.columnChanged(this.columns)}rowSizeChanged(e){if(!this.dimensionProvider){return}this.dimensionProvider.setSettings({originItemSize:e},"rgRow");this.rowDefChanged(this.rowDefinitions,this.rowDefinitions,"rowSize",true)}themeChanged(e,t,r="theme",o=false){if(!this.dimensionProvider){return}this.themeService.register(e);this.dimensionProvider.setSettings({originItemSize:this.themeService.rowSize},"rgRow");this.dimensionProvider.setSettings({originItemSize:this.colSize},"rgCol");if(!o){this.dimensionProvider.setSettings({originItemSize:this.themeService.rowSize},"rgRow");this.rowDefChanged(this.rowDefinitions,this.rowDefinitions,"theme",true)}this.afterthemechanged.emit(e)}dataSourceChanged(e=[],t,r){if(!this.dataProvider){return}let o="rgRow";switch(r){case"pinnedBottomSource":o="rowPinEnd";break;case"pinnedTopSource":o="rowPinStart";break;case"source":o="rgRow";const t=this.beforesourceset.emit({type:o,source:e});e=t.detail.source;break}const i=this.beforeanysource.emit({type:o,source:e});const s=[...i.detail.source];this.dataProvider.setData(s,o,this.disableVirtualY);if(r==="source"){this.aftersourceset.emit({type:o,source:e})}this.afteranysource.emit({type:o,source:e})}disableVirtualYChanged(e=false,t=false){if(e===t){return}this.dataSourceChanged(this.source,this.source,"source")}rowDefChanged(e,t,r,o=true){if(!this.dimensionProvider||!this.dataProvider){return}const{detail:{vals:i,oldVals:s}}=this.beforerowdefinition.emit({vals:e,oldVals:t});const a=ae(i);if(s){const e=ne(s);for(const t in e){if(e.hasOwnProperty(t)){const e=t;const r=this.dataProvider.stores[e];const o=r.store.get("source").length;this.dimensionProvider.clearSize(e,o)}}}u.forEach((e=>{var t;const r=a[e];if(r||o){(t=this.dimensionProvider)===null||t===void 0?void 0:t.setCustomSizes(e,(r===null||r===void 0?void 0:r.sizes)||{})}}))}trimmedRowsChanged(e={}){this.addTrimmed(e)}groupingChanged(e={}){var t;(t=this.pluginService.getByClass(w))===null||t===void 0?void 0:t.setGrouping(e||{})}applyStretch(e){if(!this.dimensionProvider||!this.dataProvider||!this.columnProvider||!this.viewportProvider){return}if(e==="false"){e=false}const t=this.getPluginData();if(!t){return}const r=this.pluginService.getByClass(b);if(typeof e==="boolean"&&e||e==="true"){if(!r){this.pluginService.add(new b(this.element,t))}else if(x(r)){r.applyStretch(this.columnProvider.getRawColumns())}}else if(r){this.pluginService.remove(r)}}applyFilter(e){this.filterconfigchanged.emit(e)}applySorting(e){this.sortingconfigchanged.emit(e)}rowHeadersChange(e){this.rowheaderschanged.emit(e)}registerOutsideVNodes(e=[]){this.extraElements=e}additionalDataChanged(e){this.additionaldatachanged.emit(e)}pluginsChanged(e=[],t){this.pluginService.addUserPluginsAndCreate(this.element,e,t,this.getPluginData())}setPlugins(){this.removePlugins();const e=this.getPluginData();if(!e){return}this.setCorePlugins(e);this.pluginsChanged(this.plugins)}setCorePlugins(e){if(this.accessible){this.pluginService.add(new le(this.element,e))}if(this.autoSizeColumn){this.pluginService.add(new C(this.element,e,typeof this.autoSizeColumn==="object"?this.autoSizeColumn:undefined))}if(this.filter){this.pluginService.add(new y(this.element,e,typeof this.filter==="object"?this.filter:undefined))}if(this.exporting){this.pluginService.add(new S(this.element,e))}this.pluginService.add(new k(this.element,e));this.pluginService.add(new w(this.element,e));if(this.canMoveColumns){this.pluginService.add(new R(this.element,e))}}getPluginData(){if(!this.dimensionProvider||!this.dataProvider||!this.columnProvider||!this.viewportProvider||!this.selectionStoreConnector){return}const e={data:this.dataProvider,column:this.columnProvider,dimension:this.dimensionProvider,viewport:this.viewportProvider,selection:this.selectionStoreConnector,plugins:this.pluginService};return e}removePlugins(){this.pluginService.destroy()}connectedCallback(){if(this.isInited){this.setPlugins()}this.created.emit()}componentWillLoad(){var e;this.viewportProvider=new ee;this.themeService=new _({rowSize:this.rowSize});this.dimensionProvider=new Q(this.viewportProvider,{realSizeChanged:e=>this.contentsizechanged.emit(e)});this.columnProvider=new J;this.selectionStoreConnector=new c;this.dataProvider=new K(this.dimensionProvider);this.registerOutsideVNodes(this.registerVNode);this.setPlugins();this.applyStretch(this.stretch);this.themeChanged(this.theme,undefined,undefined,true);this.columnChanged(this.columns,undefined,undefined,true);this.dataSourceChanged(this.source,undefined,"source");this.dataSourceChanged(this.pinnedTopSource,undefined,"pinnedTopSource");this.dataSourceChanged(this.pinnedBottomSource,undefined,"pinnedBottomSource");if(Object.keys((e=this.trimmedRows)!==null&&e!==void 0?e:{}).length>0){this.trimmedRowsChanged(this.trimmedRows)}this.rowDefChanged(this.rowDefinitions);if(this.grouping&&Object.keys(this.grouping).length>0){this.groupingChanged(this.grouping)}this.scrollingService=new oe((e=>{var t;(t=this.dimensionProvider)===null||t===void 0?void 0:t.setViewPortCoordinate({coordinate:e.coordinate,type:e.dimension});this.viewportscroll.emit(e)}));this.aftergridinit.emit();this.isInited=true}componentWillRender(){const e=this.beforegridrender.emit();if(e.defaultPrevented){return false}return Promise.all(this.jobsBeforeRender)}componentDidRender(){this.aftergridrender.emit()}render(){if(!this.dimensionProvider||!this.dataProvider||!this.columnProvider||!this.viewportProvider||!this.selectionStoreConnector){return}const t=this.dimensionProvider.stores["rgRow"].store.get("realSize");this.viewport=new re({columnProvider:this.columnProvider,dataProvider:this.dataProvider,dimensionProvider:this.dimensionProvider,viewportProvider:this.viewportProvider,scrollingService:this.scrollingService,orderService:this.orderService,selectionStoreConnector:this.selectionStoreConnector,disableVirtualX:this.disableVirtualX,disableVirtualY:this.disableVirtualY,resize:e=>this.aftercolumnresize.emit(e)},t);const r=[];if(this.rowHeaders&&this.viewport.columns.length){const o=this.viewport.columns[0];r.push(e("revogr-row-headers",{additionalData:this.additionalData,height:t,rowClass:this.rowClass,resize:this.resize,dataPorts:o.dataPorts,headerProp:o.headerProp,jobsBeforeRender:this.jobsBeforeRender,rowHeaderColumn:typeof this.rowHeaders==="object"?this.rowHeaders:undefined,onScrollview:({detail:e})=>this.scrollingService.proxyScroll(e,"headerRow"),onRef:({detail:e})=>this.scrollingService.registerElement(e,"headerRow")}))}const i=de();const s=[];for(let t of this.viewport.columns){const r=Object.assign(Object.assign({},t.headerProp),{type:t.type,additionalData:this.additionalData,viewportCol:t.viewportCol,selectionStore:t.columnSelectionStore,canResize:this.resize,readonly:this.readonly,columnFilter:!!this.filter});const o=[e("revogr-header",Object.assign({},r,{slot:$}))];t.dataPorts.forEach((r=>{const s=`${r.type}_${t.type}`;const a=e("revogr-overlay-selection",Object.assign({},r,{isMobileDevice:i,onSelectall:()=>{var e;return(e=this.selectionStoreConnector)===null||e===void 0?void 0:e.selectAll()},editors:this.editors,readonly:this.readonly,range:this.range,useClipboard:this.useClipboard,applyChangesOnClose:this.applyOnClose,additionalData:this.additionalData,slot:r.slot,onBeforenextvpfocus:e=>{var t;return(t=this.selectionStoreConnector)===null||t===void 0?void 0:t.beforeNextFocusCell(e.detail)},onCanceledit:()=>{var e;return(e=this.selectionStoreConnector)===null||e===void 0?void 0:e.setEdit(false)},onSetedit:({detail:e})=>{var t;const r=this.beforeeditstart.emit(e);if(!r.defaultPrevented){(t=this.selectionStoreConnector)===null||t===void 0?void 0:t.setEdit(e.val)}}}),e("revogr-data",Object.assign({},r,{colType:t.type,key:s,readonly:this.readonly,range:this.range,rowClass:this.rowClass,rowSelectionStore:r.rowSelectionStore,additionalData:this.additionalData,jobsBeforeRender:this.jobsBeforeRender,slot:U}),e("slot",{name:`data-${t.type}-${r.type}`})),e("revogr-temp-range",{selectionStore:r.selectionStore,dimensionRow:r.dimensionRow,dimensionCol:r.dimensionCol}),e("revogr-focus",{colData:r.colData,dataStore:r.dataStore,focusTemplate:this.focusTemplate,rowType:r.type,colType:t.type,selectionStore:r.selectionStore,dimensionRow:r.dimensionRow,dimensionCol:r.dimensionCol},e("slot",{name:`focus-${t.type}-${r.type}`})));o.push(a)}));s.push(e("revogr-viewport-scroll",Object.assign({},t.prop,{ref:e=>this.scrollingService.registerElement(e,`${t.prop.key}`),onScrollviewport:e=>this.scrollingService.proxyScroll(e.detail,`${t.prop.key}`),onScrollviewportsilent:e=>this.scrollingService.scrollSilentService(e.detail,`${t.prop.key}`)}),o))}r.push(s);const a="rgRow";const n="rgCol";const d=this.viewportProvider.stores;const l=this.dimensionProvider.stores;return e(o,null,this.hideAttribution?null:e("revogr-attribution",{class:"attribution"}),e("slot",{name:"header"}),e("div",{class:"main-viewport",onClick:e=>{var t;if(e.currentTarget===e.target){(t=this.viewport)===null||t===void 0?void 0:t.clearEdit()}}},e("div",{class:"viewports"},e("slot",{name:"viewport"}),r,e("revogr-scroll-virtual",{class:"vertical",dimension:a,viewportStore:d[a].store,dimensionStore:l[a].store,ref:e=>this.scrollingService.registerElement(e,"rowScroll"),onScrollvirtual:e=>this.scrollingService.proxyScroll(e.detail)}),e(se,{ref:e=>this.orderService=e}))),e("revogr-scroll-virtual",{class:"horizontal",dimension:n,viewportStore:d[n].store,dimensionStore:l[n].store,ref:e=>this.scrollingService.registerElement(e,"colScroll"),onScrollvirtual:e=>this.scrollingService.proxyScroll(e.detail)}),e("revogr-extra",{ref:e=>this.extraService=e,nodes:this.extraElements}),e("slot",{name:"footer"}))}disconnectedCallback(){this.removePlugins()}get element(){return i(this)}static get watchers(){return{columnTypes:["columnTypesChanged"],columns:["columnChanged"],disableVirtualX:["disableVirtualXChanged"],rowSize:["rowSizeChanged"],theme:["themeChanged"],source:["dataSourceChanged"],pinnedBottomSource:["dataSourceChanged"],pinnedTopSource:["dataSourceChanged"],disableVirtualY:["disableVirtualYChanged"],rowDefinitions:["rowDefChanged"],trimmedRows:["trimmedRowsChanged"],grouping:["groupingChanged"],stretch:["applyStretch"],filter:["applyFilter"],sorting:["applySorting"],rowHeaders:["rowHeadersChange"],registerVNode:["registerOutsideVNodes"],additionalData:["additionalDataChanged"],plugins:["pluginsChanged"]}}};ve.style=ge;export{ve as revo_grid};
import{h as e,r as t,c as r,H as o,a as i}from"./index-a61f225b.js";import{x as s,r as a,s as n,E as d,w as h,u as l,F as c}from"./column.service-a6a7c415.js";import{c as g,m as v,r as u,i as f,D as p,B as m,G as w,S as b,a as x,A as C,f as y,E as S,l as k,C as R}from"./column.drag.plugin-bc7ec071.js";import{D as L,b as E,f as H,d as P,s as j,a as z,h as M,k as O,R as T,u as D}from"./dimension.helpers-d0d709c4.js";import{d as I}from"./debounce-b3166f78.js";import{V as N}from"./viewport.store-afa8c4fe.js";import{v as F,H as $,C as B,F as V,D as U}from"./viewport.helpers-7e7f9dad.js";import{g as A}from"./events-cf0893a3.js";import"./filter.button-d40ab17b.js";import"./header-cell-renderer-36ecbdef.js";class Y{constructor(){this.defaultRowSize=32}}class X{constructor(){this.defaultRowSize=27}}class W{constructor(){this.defaultRowSize=42}}const G="default";const Z=[G,"material","compact","darkMaterial","darkCompact"];class _{get theme(){return this.currentTheme}get rowSize(){return this.customRowSize||this.currentTheme.defaultRowSize}set rowSize(e){this.customRowSize=e}constructor(e){this.customRowSize=0;this.customRowSize=e.rowSize;this.register("default")}register(e){const t=q(e);switch(t){case"material":case"darkMaterial":this.currentTheme=new W;break;case"compact":case"darkCompact":this.currentTheme=new Y;break;default:this.currentTheme=new X;break}}}function q(e){if(e&&Z.indexOf(e)>-1){return e}return G}class J{get order(){const e={};const t=this.sorting;if(t){Object.keys(t).forEach((r=>{e[r]=t[r].order}))}return e}get stores(){return this.dataSources}constructor(){this.sorting=null;this.collection=null;this.dataSources=g.reduce(((e,t)=>{e[t]=new L(t);return e}),{})}column(e,t="rgCol"){return this.getColumn(e,t)}getColumn(e,t){return E(this.dataSources[t].store,e)}getRawColumns(){return s(this.dataSources,((e,t,r)=>{e[r]=t.store.get("source");return e}),{rgCol:[],colPinStart:[],colPinEnd:[]})}getColumns(e="all"){const t=this.getRawColumns();if(e!=="all"){return t[e]}return g.reduce(((e,r)=>[...e,...t[r]]),[])}getColumnIndexByProp(e,t){return H(this.dataSources[t].store,e)}getColumnByProp(e){var t;return(t=this.collection)===null||t===void 0?void 0:t.columnByProp[e]}refreshByType(e){this.dataSources[e].refresh()}setColumns(e){g.forEach((t=>{this.dataSources[t].updateData(e.columns[t],{depth:e.maxLevel,groups:e.columnGrouping[t].reduce(((e,t)=>{if(!e[t.level]){e[t.level]=[]}e[t.level].push(t);return e}),{})})}));this.sorting=e.sort;this.collection=e;return e}updateColumns(e){const t=e.reduce(((e,t)=>{const r=a(t);if(!e[r]){e[r]={}}e[r][t.prop]=t;return e}),{});const r={};for(const e in t){if(!t.hasOwnProperty(e)){continue}const o=e;const i=t[o];const s=this.dataSources[o].store.get("source");r[o]={};for(let e=0;e<s.length;e++){const t=s[e];const a=i===null||i===void 0?void 0:i[t.prop];if(a){r[o][e]=a}}}for(const e in r){if(!r.hasOwnProperty(e)){continue}const t=e;P(this.dataSources[t].store,r[t]||{})}}updateColumn(e,t){const r=a(e);j(this.dataSources[r].store,{[t]:e})}updateColumnSorting(e,t,r,o){if(!o){this.clearSorting()}e.order=r;if(!this.sorting){this.sorting={}}this.sorting[e.prop]=e;this.updateColumn(e,t);return e}clearSorting(){const e=s(this.sorting,((e,t)=>{const r=a(t);e[r]=true;return e}),{});v(e,((e,t)=>{const r=this.dataSources[t].store.get("source");v(r,(e=>e.order=undefined));this.dataSources[t].setData({source:[...r]})}));this.sorting={}}}class K{constructor(e){this.dimensionProvider=e;this.stores=s(u,((e,t)=>{e[t]=new L(t);return e}),{})}setData(e,t="rgRow",r=false,o,i=false){this.stores[t].updateData([...e],o,i);const s=t!=="rgRow"||r;this.dimensionProvider.setData(e.length,t,s);return e}getModel(e,t="rgRow"){const r=this.stores[t].store;return E(r,e)}changeOrder({rowType:e="rgRow",from:t,to:r}){const o=this.stores[e];const i=[...o.store.get("proxyItems")];const s=o.store.get("items");const a=i.splice(i.indexOf(s[t]),1);i.splice(i.indexOf(s[r]),0,...a);o.setData({proxyItems:i});const n=o.store.get("items");this.dimensionProvider.updateSizesPositionByNewDataIndexes(e,n,s)}setCellData({type:e,rowIndex:t,prop:r,val:o},i=true){const s=this.getModel(t,e);s[r]=o;this.stores[e].setSourceData({[t]:s},i)}setRangeData(e,t){const r={};for(let o in e){const i=r[o]=E(this.stores[t].store,parseInt(o,10));if(!i){continue}for(let t in e[o]){i[t]=e[o][t]}}this.stores[t].setSourceData(r)}refresh(e="all"){if(f(e)){this.refreshItems(e)}u.forEach((e=>this.refreshItems(e)))}refreshItems(e="rgRow"){const t=this.stores[e].store.get("items");this.stores[e].setData({items:[...t]})}setGrouping({depth:e},t="rgRow"){this.stores[t].setData({groupingDepth:e})}setTrimmed(e,t="rgRow"){const r=this.stores[t];r.addTrimmed(e);this.dimensionProvider.setTrimmed(e,t);if(t==="rgRow"){this.dimensionProvider.setData(z(r.store).length,t)}}}class Q{constructor(e,t){this.viewports=e;const r=I((e=>t.realSizeChanged(e)),T);this.stores=s([...u,...g],((e,t)=>{e[t]=new p(t);e[t].store.onChange("realSize",(()=>r(t)));return e}),{})}clearSize(e,t){this.stores[e].drop();this.viewports.stores[e].setOriginalSizes(this.stores[e].store.get("originItemSize"));this.setItemCount(t,e)}setCustomSizes(e,t,r=false){let o=t;if(r){const r=this.stores[e].store.get("sizes");o=Object.assign(Object.assign({},r),t)}this.stores[e].setDimensionSize(o);this.setViewPortCoordinate({coordinate:this.viewports.stores[e].lastCoordinate,type:e,force:true})}setItemCount(e,t){this.viewports.stores[t].setViewport({realCount:e});this.stores[t].setStore({count:e})}setTrimmed(e,t){const r=M(e);const o=this.stores[t];o.setStore({trimmed:r});this.setViewPortCoordinate({coordinate:this.viewports.stores[t].lastCoordinate,type:t,force:true})}setData(e,t,r=false){this.setItemCount(e,t);if(r){const e=this.stores[t].getCurrentState();this.viewports.stores[t].setViewport({virtualSize:e.realSize})}this.setViewPortCoordinate({coordinate:this.viewports.stores[t].lastCoordinate,type:t})}applyNewColumns(e,t,r=false){for(let o of g){if(!r){this.stores[o].drop()}const i=e[o];const s=o!=="rgCol"||t;this.stores[o].setStore({count:i.length});const a=n(i);this.stores[o].setDimensionSize(a);const d={realCount:i.length};if(s){d.virtualSize=this.stores[o].getCurrentState().realSize}this.viewports.stores[o].setViewport(d);this.setViewPortCoordinate({coordinate:this.viewports.stores[o].lastCoordinate,type:o})}}getFullSize(){var e,t;let r=0;let o=0;for(let t of g){r+=((e=this.stores[t])===null||e===void 0?void 0:e.store.get("realSize"))||0}for(let e of u){o+=((t=this.stores[e])===null||t===void 0?void 0:t.store.get("realSize"))||0}return{y:o,x:r}}setViewPortCoordinate({coordinate:e,type:t,force:r=false}){const o=this.stores[t].getCurrentState();this.viewports.stores[t].setViewPortCoordinate(e,o,r)}getViewPortPos(e){const t=this.stores[e.dimension].getCurrentState();const r=O(t,e.coordinate);return r.start}setSettings(e,t){let r=[];switch(t){case"rgCol":r=g;break;case"rgRow":r=u;break}for(let t of r){this.stores[t].setStore(e)}}updateSizesPositionByNewDataIndexes(e,t,r=[]){this.stores[e].updateSizesPositionByIndexes(t,r);this.setViewPortCoordinate({coordinate:this.viewports.stores[e].lastCoordinate,type:e,force:true})}}class ee{constructor(){this.stores=s([...u,...g],((e,t)=>{e[t]=new N(t);return e}),{})}setViewport(e,t){this.stores[e].setViewport(t)}}function te(e){const t=e.dimensions[e.colType].store;const r=t.get("realSize");const o={contentWidth:r,class:e.colType,contentHeight:e.contentHeight,key:e.colType,colType:e.colType,onResizeviewport:e.onResizeviewport,style:e.fixWidth?{minWidth:`${r}px`}:undefined};const i={colData:z(e.colStore),dimensionCol:t,type:e.colType,groups:e.colStore.get("groups"),groupingDepth:e.colStore.get("groupingDepth"),resizeHandler:e.colType==="colPinEnd"?["l"]:undefined,onHeaderresize:e.onHeaderresize};return{prop:o,type:e.colType,position:e.position,headerProp:i,viewportCol:e.viewports[e.colType].store}}class re{constructor(e,t){var r,o;this.config=e;(r=this.config.selectionStoreConnector)===null||r===void 0?void 0:r.beforeUpdate();const i=[];let s=0;g.forEach((r=>{const o=e.columnProvider.stores[r].store;if(!o.get("items").length){return}const a={colType:r,position:{x:s,y:1},contentHeight:t,fixWidth:r!=="rgCol",viewports:e.viewportProvider.stores,dimensions:e.dimensionProvider.stores,rowStores:e.dataProvider.stores,colStore:o,onHeaderresize:e=>this.onColumnResize(r,e,o)};if(r==="rgCol"){a.onResizeviewport=t=>{var r;const o={clientSize:t.detail.size};if(t.detail.dimension==="rgRow"&&!e.disableVirtualY||t.detail.dimension==="rgCol"&&!e.disableVirtualX){o.virtualSize=t.detail.size}(r=e.viewportProvider)===null||r===void 0?void 0:r.setViewport(t.detail.dimension,o)}}const n=te(a);const d=this.registerCol(n.position.x,r);const h=this.dataViewPort(a).reduce(((t,o)=>{const i=this.registerSegment(o.position);i.setLastCell(o.lastCell);const s=this.registerRow(o.position.y,o.type);const a=Object.assign(Object.assign({colType:r},o),{rowSelectionStore:s,selectionStore:i.store,ref:t=>e.selectionStoreConnector.registerSection(t),onSetrange:e=>{i.setRangeArea(e.detail)},onSettemprange:e=>i.setTempArea(e.detail),onFocuscell:t=>{i.clearFocus();e.selectionStoreConnector.focus(i,t.detail)}});t.push(a);return t}),[]);i.push(Object.assign(Object.assign({},n),{columnSelectionStore:d,dataPorts:h}));s++}));this.columns=i;(o=this.config.scrollingService)===null||o===void 0?void 0:o.unregister()}onColumnResize(e,{detail:t},r){var o;(o=this.config.dimensionProvider)===null||o===void 0?void 0:o.setCustomSizes(e,t,true);const i={};for(const[e,o]of Object.entries(t||{})){const t=parseInt(e,10);const s=E(r,t);if(s){i[t]=Object.assign(Object.assign({},s),{size:o})}}this.config.resize(i)}registerSegment(e){return this.config.selectionStoreConnector.register(e)}registerRow(e,t){return this.config.selectionStoreConnector.registerRow(e,t).store}registerCol(e,t){return this.config.selectionStoreConnector.registerColumn(e,t).store}dataViewPort(e){const t={rowPinStart:$,rgRow:B,rowPinEnd:V};let r=0;return u.reduce(((o,i)=>{const s=e.viewports[i].store.get("realCount")||i==="rgRow";const a=Object.assign(Object.assign({},e),{position:Object.assign(Object.assign({},e.position),{y:s?r:d})});const n=F(a,i,t[i],i!=="rgRow");o.push(n);if(s){r++}return o}),[])}scrollToCell(e){for(let t in e){const r=e[t];if(typeof r==="number"){this.config.scrollingService.proxyScroll({dimension:t==="x"?"rgCol":"rgRow",coordinate:r})}}}clearFocused(){this.config.selectionStoreConnector.clearAll()}clearEdit(){this.config.selectionStoreConnector.setEdit(false)}getFocused(){const e=this.config.selectionStoreConnector.focusedStore;if(!e){return null}const t=this.config.selectionStoreConnector.storesXToType[e.position.x];const r=this.config.columnProvider.getColumn(e.cell.x,t);const o=this.config.selectionStoreConnector.storesYToType[e.position.y];const i=this.config.dataProvider.getModel(e.cell.y,o);return{column:r,model:i,cell:e.cell,colType:t,rowType:o}}getStoreCoordinateByType(e,t){const r=this.config.selectionStoreConnector.storesByType;if(typeof r[e]==="undefined"||typeof r[t]==="undefined"){return}return{x:r[e],y:r[t]}}setFocus(e,t,r,o){var i;const s=this.getStoreCoordinateByType(e,t);if(s){(i=this.config.selectionStoreConnector)===null||i===void 0?void 0:i.focusByCell(s,r,o)}}getSelectedRange(){return this.config.selectionStoreConnector.selectedRange}setEdit(e,t,r,o){var i;const s=this.getStoreCoordinateByType(r,o);if(s){(i=this.config.selectionStoreConnector)===null||i===void 0?void 0:i.setEditByCell(s,{x:t,y:e})}}}class oe{constructor(e){this.setViewport=e;this.elements={}}async proxyScroll(e,t){var r;let o;let i=e;for(let i in this.elements){if(e.dimension==="rgCol"&&i==="headerRow"){continue}else if(this.isPinnedColumn(t)&&e.dimension==="rgCol"){if(i===t||!e.delta){continue}for(let t of this.elements[i]){if(t.changeScroll){o=t.changeScroll(e)}}}else{for(let t of this.elements[i]){await((r=t.setScroll)===null||r===void 0?void 0:r.call(t,e))}}}const s=await o;if(s){i=s}this.setViewport(i)}async scrollSilentService(e,t){var r;for(let o in this.elements){if(o===t){continue}if(g.includes(t)&&(o==="headerRow"||g.includes(o))){for(let t of this.elements[o]){await((r=t.changeScroll)===null||r===void 0?void 0:r.call(t,e,true))}continue}}}isPinnedColumn(e){return!!e&&["colPinStart","colPinEnd"].indexOf(e)>-1}registerElements(e){this.elements=e}registerElement(e,t){if(!this.elements[t]){this.elements[t]=[]}if(e){this.elements[t].push(e)}else if(this.elements[t]){delete this.elements[t]}}unregister(){this.elements={}}}class ie{constructor(){this.parentY=0}start(e,{pos:t,text:r,event:o}){var i;const{top:s}=e.getBoundingClientRect();this.parentY=s;if(this.text){this.text.innerText=r}this.move(t);this.moveTip({x:o.x,y:o.y});(i=this.el)===null||i===void 0?void 0:i.classList.remove("hidden")}end(){var e;(e=this.el)===null||e===void 0?void 0:e.classList.add("hidden")}move(e){this.moveElement(e.end-this.parentY)}moveTip({x:e,y:t}){if(!this.draggable){return}this.draggable.style.left=`${e}px`;this.draggable.style.top=`${t}px`}moveElement(e){if(!this.rgRow){return}this.rgRow.style.transform=`translateY(${e}px)`}}const se=({ref:t})=>{const r=new ie;t(r);return e("div",{class:"draggable-wrapper hidden",ref:e=>r.el=e},e("div",{class:"draggable",ref:e=>r.draggable=e},e("span",{class:"revo-alt-icon"}),e("span",{ref:e=>r.text=e})),e("div",{class:"drag-position",ref:e=>r.rgRow=e}))};const ae=(e=[])=>{const t={};for(const r of e){let e=t[r.type];if(!e){e=t[r.type]={}}if(r.size){if(!e.sizes){e.sizes={}}e.sizes[r.index]=r.size}}return t};const ne=(e=[])=>{const t={};for(const r of e){let e=t[r.type];if(!e){e=t[r.type]=[]}if(r.size){e.push(r.index)}}return t};function de(){return/Mobi/i.test(navigator.userAgent)||/Android/i.test(navigator.userAgent)||navigator.maxTouchPoints>0}class he extends m{constructor(e,t){super(e,t);e.setAttribute("dir","ltr");e.setAttribute("role","treegrid");e.setAttribute("aria-keyshortcuts","Enter");e.setAttribute("aria-multiselectable","true");e.setAttribute("tabindex","0");this.addEventListener("beforecolumnsset",(({detail:t})=>{const r=[...t.columns.colPinStart,...t.columns.rgCol,...t.columns.colPinEnd];e.setAttribute("aria-colcount",`${r.length}`);r.forEach(((e,t)=>{const{columnProperties:r,cellProperties:o}=e;e.columnProperties=(...e)=>{const o=(r===null||r===void 0?void 0:r(...e))||{};o.role="columnheader";o["aria-colindex"]=t;return o};e.cellProperties=(...e)=>{const r={["role"]:"gridcell",["aria-colindex"]:t,["aria-rowindex"]:e[0].rowIndex,["tabindex"]:-1};const i=(o===null||o===void 0?void 0:o(...e))||{};return Object.assign(Object.assign({},r),i)}}))}));this.addEventListener("beforesourceset",(({detail:t})=>{e.setAttribute("aria-rowcount",`${t.source.length}`)}));this.addEventListener("beforerowrender",(({detail:e})=>{e.node.t=Object.assign(Object.assign({},e.node.t),{role:"row",["aria-rowindex"]:e.item.itemIndex})}));this.addEventListener("afterfocus",(async e=>{if(e.defaultPrevented){return}const t=this.revogrid.querySelector(`revogr-data[type="${e.detail.rowType}"][col-type="${e.detail.colType}"] [data-rgrow="${e.detail.rowIndex}"][data-rgcol="${e.detail.colIndex}"]`);if(t instanceof HTMLElement){t.focus()}}))}}class le{constructor(){this.internalPlugins=[]}get(){return[...this.internalPlugins]}add(e){this.internalPlugins.push(e)}addUserPluginsAndCreate(e,t=[],r,o){if(!o){return}const i=(r===null||r===void 0?void 0:r.filter((e=>!t.some((t=>t===e)))))||[];i.forEach((e=>{var t,r;const o=this.internalPlugins.findIndex((t=>t instanceof e));if(o!==-1){(r=(t=this.internalPlugins[o]).destroy)===null||r===void 0?void 0:r.call(t);this.internalPlugins.splice(o,1)}}));t===null||t===void 0?void 0:t.forEach((t=>{const r=this.internalPlugins.find((e=>e instanceof t));if(r){return}this.add(new t(e,o))}))}getByClass(e){return this.internalPlugins.find((t=>t instanceof e))}remove(e){var t,r;const o=this.internalPlugins.indexOf(e);if(o>-1){(r=(t=this.internalPlugins[o]).destroy)===null||r===void 0?void 0:r.call(t);this.internalPlugins.splice(o,1)}}destroy(){this.internalPlugins.forEach((e=>{var t;return(t=e.destroy)===null||t===void 0?void 0:t.call(e)}));this.internalPlugins=[]}}const ce='.revo-drag-icon{width:11px;opacity:0.8}.revo-drag-icon::before{content:"::"}.revo-alt-icon{-webkit-mask-image:url("data:image/svg+xml,%3C%3Fxml version=\'1.0\' encoding=\'UTF-8\'%3F%3E%3Csvg viewBox=\'0 0 384 383\' xmlns=\'http://www.w3.org/2000/svg\' xmlns:xlink=\'http://www.w3.org/1999/xlink\'%3E%3Cg%3E%3Cpath d=\'M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z\'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3C%3Fxml version=\'1.0\' encoding=\'UTF-8\'%3F%3E%3Csvg viewBox=\'0 0 384 383\' xmlns=\'http://www.w3.org/2000/svg\' xmlns:xlink=\'http://www.w3.org/1999/xlink\'%3E%3Cg%3E%3Cpath d=\'M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z\'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#4545ff;height:32px;line-height:32px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#009037}.revo-button.red{background-color:#E0662E}.revo-button:disabled,.revo-button[disabled]{cursor:not-allowed !important;filter:opacity(0.35) !important}.revo-button.outline{border:1px solid #dbdbdb;line-height:30px;background:none;color:#000;box-shadow:none}revo-grid[theme^=dark] .revo-button.outline{border:1px solid #404040;color:#d8d8d8}revo-grid[theme=default],revo-grid:not([theme]){border:1px solid #cecece;font-size:12px}revo-grid[theme=default] .rowHeaders revogr-header,revo-grid:not([theme]) .rowHeaders revogr-header{box-shadow:-1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-header,revo-grid:not([theme]) revogr-header{text-align:center;line-height:30px;background-color:#f8f9fa}revo-grid[theme=default] revogr-header .group-rgRow,revo-grid:not([theme]) revogr-header .group-rgRow{box-shadow:none}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid[theme=default] revogr-header .group-rgRow,revo-grid:not([theme]) revogr-header .header-rgRow,revo-grid:not([theme]) revogr-header .group-rgRow{text-transform:uppercase;font-size:12px;color:#000}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid:not([theme]) revogr-header .header-rgRow{height:30px;box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-header .rgHeaderCell,revo-grid:not([theme]) revogr-header .rgHeaderCell{box-shadow:-1px 0 0 0 #cecece inset, 0 -1px 0 0 #cecece, 0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-header .rgHeaderCell.focused-cell,revo-grid:not([theme]) revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] .rowHeaders,revo-grid:not([theme]) .rowHeaders{background-color:#f8f9fa}revo-grid[theme=default] .rowHeaders revogr-data .rgCell,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell{color:#000}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:first-child,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:first-child{box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:not(:first-child),revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:not(:first-child){box-shadow:0 -1px 0 0 #cecece inset, 1px 0 0 0 #cecece inset}revo-grid[theme=default] .rowHeaders revogr-data .rgCell:last-child,revo-grid:not([theme]) .rowHeaders revogr-data .rgCell:last-child{border-right:1px solid #cecece}revo-grid[theme=default] .rowHeaders revogr-data revogr-header,revo-grid:not([theme]) .rowHeaders revogr-data revogr-header{box-shadow:0 -1px 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child,revo-grid:not([theme]) revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell,revo-grid:not([theme]) revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #cecece inset, -1px 0 0 0 #cecece inset}revo-grid[theme=default] revogr-viewport-scroll.colPinEnd,revo-grid[theme=default] revogr-viewport-scroll.colPinEnd revogr-header,revo-grid:not([theme]) revogr-viewport-scroll.colPinEnd,revo-grid:not([theme]) revogr-viewport-scroll.colPinEnd revogr-header{box-shadow:1px 0 0 #cecece inset}revo-grid[theme=default] .footer-wrapper revogr-data .rgRow:first-child .rgCell,revo-grid:not([theme]) .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset, 0 -1px 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data,revo-grid:not([theme]) revogr-data{text-align:center}revo-grid[theme=default] revogr-data .revo-draggable,revo-grid:not([theme]) revogr-data .revo-draggable{float:left}revo-grid[theme=default] revogr-data .rgRow,revo-grid:not([theme]) revogr-data .rgRow{line-height:27px}revo-grid[theme=default] revogr-data .rgRow.focused-rgRow,revo-grid:not([theme]) revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] revogr-data .rgCell,revo-grid:not([theme]) revogr-data .rgCell{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgCell.disabled,revo-grid:not([theme]) revogr-data .rgCell.disabled{background-color:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=material]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}revo-grid[theme=material] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=material] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=material] revogr-header .header-rgRow{height:50px}revo-grid[theme=material] revogr-data{text-align:left}revo-grid[theme=material] revogr-data .rgRow{line-height:42px}revo-grid[theme=material] revogr-data .rgCell{padding:0 15px}revo-grid[theme=material] .rowHeaders{background-color:#f7faff}revo-grid[theme=material] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=material] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=material] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=material] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=material] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=material] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=darkMaterial]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#d8d8d8}revo-grid[theme=darkMaterial] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkMaterial] revogr-header .header-rgRow{height:50px}revo-grid[theme=darkMaterial] revogr-data{text-align:left}revo-grid[theme=darkMaterial] revogr-data .rgRow{line-height:42px}revo-grid[theme=darkMaterial] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkMaterial] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkMaterial] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkMaterial] revogr-edit{background-color:#28272b}revo-grid[theme=darkMaterial] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkMaterial] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkMaterial] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=darkCompact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#d8d8d8}revo-grid[theme=darkCompact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkCompact] revogr-header .header-rgRow{height:45px}revo-grid[theme=darkCompact] revogr-data{text-align:left}revo-grid[theme=darkCompact] revogr-data .rgRow{line-height:32px}revo-grid[theme=darkCompact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkCompact] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkCompact] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkCompact] revogr-edit{background-color:#28272b}revo-grid[theme=darkCompact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkCompact] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkCompact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=compact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}revo-grid[theme=compact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=compact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=compact] revogr-header .header-rgRow{height:45px}revo-grid[theme=compact] revogr-data{text-align:left}revo-grid[theme=compact] revogr-data .rgRow{line-height:32px}revo-grid[theme=compact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=compact] .rowHeaders{background-color:#f7faff}revo-grid[theme=compact] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=compact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=compact] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=compact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=compact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=compact] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=compact] revo-dropdown .rv-dr-root{padding:0px 9px}revo-grid{display:block;height:100%;min-height:300px;font-family:Helvetica, Arial, Sans-Serif, serif;font-size:14px;position:relative;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column;width:100%;height:100%}revo-grid .attribution{position:absolute;bottom:0;left:0;right:0;z-index:1000;width:0;height:0;border-left:4px solid rgba(38, 106, 232, 0.9);border-bottom:4px solid rgba(38, 106, 232, 0.9);border-top:4px solid transparent;border-right:4px solid transparent;cursor:pointer}revo-grid .attribution .value{position:absolute;bottom:0;left:0;background-color:rgba(255, 255, 255, 0.9);padding:4px;border-radius:4px;box-shadow:0 1px 10px rgba(0, 0, 0, 0.2);white-space:nowrap;text-decoration:none;color:black;letter-spacing:0.3px;font-size:11px;opacity:0;width:4px;overflow:hidden;transition:opacity 0.5s ease-in-out, width 0.3s ease-in-out}revo-grid .attribution:hover .value{width:63px;opacity:1}revo-grid.column-draggable.column-drag-start:hover,revo-grid.column-draggable.column-drag-start *:hover{cursor:grabbing}revo-grid .footer-wrapper,revo-grid .header-wrapper{width:100%}revo-grid .footer-wrapper revogr-data,revo-grid .header-wrapper revogr-data{z-index:3}revo-grid revo-dropdown{width:100%}revo-grid revo-dropdown .rv-dr-root{max-height:100%}revo-grid revo-dropdown.shrink label{opacity:0}revo-grid .viewports{max-width:100%;display:flex;flex-direction:row;align-items:flex-start;flex-grow:1}revo-grid .main-viewport{flex-grow:1;height:0;display:flex;justify-content:space-between;flex-direction:row}revo-grid .draggable{position:fixed;height:30px;line-height:30px;background:#fff;border-radius:3px;display:block;z-index:100;margin-top:5px;margin-right:-20px;box-shadow:0 4px 20px 0 rgba(0, 0, 0, 0.15);padding-left:20px;padding-right:5px}revo-grid .draggable.hidden{display:none}revo-grid .draggable .revo-alt-icon{background-color:black;position:absolute;left:5px;top:10px}revo-grid .draggable-wrapper.hidden{display:none}revo-grid .drag-position{position:absolute;left:0;right:0;height:1px;z-index:2;background:gray;pointer-events:none}revo-grid .drag-position-y{position:absolute;top:0;left:0;bottom:0;width:1px;z-index:2;background:gray;pointer-events:none}revo-grid .drag-auto-scroll-y{pointer-events:none;position:absolute;left:0;top:0;height:50px;width:1px}revo-grid .clipboard{position:absolute;left:0;top:0}revo-grid revogr-scroll-virtual{position:relative}revo-grid revogr-scroll-virtual.vertical,revo-grid revogr-scroll-virtual.horizontal{z-index:3}';const ge=ce;const ve=class{constructor(e){t(this,e);this.contentsizechanged=r(this,"contentsizechanged",7);this.beforeedit=r(this,"beforeedit",7);this.beforerangeedit=r(this,"beforerangeedit",7);this.afteredit=r(this,"afteredit",7);this.beforeautofill=r(this,"beforeautofill",7);this.beforerange=r(this,"beforerange",7);this.afterfocus=r(this,"afterfocus",7);this.roworderchanged=r(this,"roworderchanged",7);this.beforesorting=r(this,"beforesorting",7);this.beforesourcesortingapply=r(this,"beforesourcesortingapply",7);this.beforesortingapply=r(this,"beforesortingapply",7);this.rowdragstart=r(this,"rowdragstart",7);this.headerclick=r(this,"headerclick",7);this.beforecellfocus=r(this,"beforecellfocus",7);this.beforefocuslost=r(this,"beforefocuslost",7);this.beforesourceset=r(this,"beforesourceset",7);this.beforeanysource=r(this,"beforeanysource",7);this.aftersourceset=r(this,"aftersourceset",7);this.afteranysource=r(this,"afteranysource",7);this.beforecolumnsset=r(this,"beforecolumnsset",7);this.beforecolumnapplied=r(this,"beforecolumnapplied",7);this.aftercolumnsset=r(this,"aftercolumnsset",7);this.beforefilterapply=r(this,"beforefilterapply",7);this.beforefiltertrimmed=r(this,"beforefiltertrimmed",7);this.beforetrimmed=r(this,"beforetrimmed",7);this.aftertrimmed=r(this,"aftertrimmed",7);this.viewportscroll=r(this,"viewportscroll",7);this.beforeexport=r(this,"beforeexport",7);this.beforeeditstart=r(this,"beforeeditstart",7);this.aftercolumnresize=r(this,"aftercolumnresize",7);this.beforerowdefinition=r(this,"beforerowdefinition",7);this.filterconfigchanged=r(this,"filterconfigchanged",7);this.sortingconfigchanged=r(this,"sortingconfigchanged",7);this.rowheaderschanged=r(this,"rowheaderschanged",7);this.beforegridrender=r(this,"beforegridrender",7);this.aftergridrender=r(this,"aftergridrender",7);this.aftergridinit=r(this,"aftergridinit",7);this.additionaldatachanged=r(this,"additionaldatachanged",7);this.afterthemechanged=r(this,"afterthemechanged",7);this.created=r(this,"created",7);this.extraElements=[];this.pluginService=new le;this.viewport=null;this.isInited=false;this.rowHeaders=undefined;this.frameSize=1;this.rowSize=0;this.colSize=100;this.range=false;this.readonly=false;this.resize=false;this.canFocus=true;this.useClipboard=true;this.columns=[];this.source=[];this.pinnedTopSource=[];this.pinnedBottomSource=[];this.rowDefinitions=[];this.editors={};this.applyOnClose=false;this.plugins=[];this.columnTypes={};this.theme="default";this.rowClass="";this.autoSizeColumn=false;this.filter=false;this.sorting=undefined;this.focusTemplate=undefined;this.canMoveColumns=false;this.trimmedRows={};this.exporting=false;this.grouping=undefined;this.stretch=false;this.additionalData={};this.disableVirtualX=false;this.disableVirtualY=false;this.hideAttribution=false;this.jobsBeforeRender=[];this.registerVNode=[];this.accessible=true}async refresh(e="all"){if(!this.dataProvider){throw new Error("Not connected")}this.dataProvider.refresh(e)}async setDataAt({row:e,col:t,colType:r="rgCol",rowType:o="rgRow",val:i,skipDataUpdate:s=false}){var a;if(this.dataProvider&&this.columnProvider&&!s){const s=(a=this.columnProvider.getColumn(t,r))===null||a===void 0?void 0:a.prop;if(typeof s!=="undefined"){this.dataProvider.setCellData({type:o,rowIndex:e,prop:s,val:i},false)}}const n=this.element.querySelector(`revogr-data[type="${o}"][col-type="${r}"]`);return n===null||n===void 0?void 0:n.updateCell({row:e,col:t})}async scrollToRow(e=0){if(!this.dimensionProvider){throw new Error("Not connected")}const t=this.dimensionProvider.getViewPortPos({coordinate:e,dimension:"rgRow"});await this.scrollToCoordinate({y:t})}async scrollToColumnIndex(e=0){if(!this.dimensionProvider){throw new Error("Not connected")}const t=this.dimensionProvider.getViewPortPos({coordinate:e,dimension:"rgCol"});await this.scrollToCoordinate({x:t})}async scrollToColumnProp(e,t="rgCol"){if(!this.dimensionProvider||!this.columnProvider){throw new Error("Not connected")}const r=this.columnProvider.getColumnIndexByProp(e,t);if(r<0){return}const o=this.dimensionProvider.getViewPortPos({coordinate:r,dimension:t});await this.scrollToCoordinate({x:o})}async updateColumns(e){var t;(t=this.columnProvider)===null||t===void 0?void 0:t.updateColumns(e)}async addTrimmed(e,t="external",r="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}const o=this.beforetrimmed.emit({trimmed:e,trimmedType:t,type:r});if(o.defaultPrevented){return o}this.dataProvider.setTrimmed({[t]:o.detail.trimmed},r);this.aftertrimmed.emit();return o}async scrollToCoordinate(e){var t;(t=this.viewport)===null||t===void 0?void 0:t.scrollToCell(e)}async setCellEdit(e,t,r="rgRow"){var o;const i=h(this.columns,t);if(!i){return}await D();const s=i.pin||"rgCol";if(!this.columnProvider){throw new Error("Not connected")}(o=this.viewport)===null||o===void 0?void 0:o.setEdit(e,this.columnProvider.getColumnIndexByProp(t,s),s,r)}async setCellsFocus(e={x:0,y:0},t={x:0,y:0},r="rgCol",o="rgRow"){var i;(i=this.viewport)===null||i===void 0?void 0:i.setFocus(r,o,e,t)}async getSource(e="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}return this.dataProvider.stores[e].store.get("source")}async getVisibleSource(e="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}return z(this.dataProvider.stores[e].store)}async getSourceStore(e="rgRow"){if(!this.dataProvider){throw new Error("Not connected")}return this.dataProvider.stores[e].store}async getColumnStore(e="rgCol"){if(!this.columnProvider){throw new Error("Not connected")}return this.columnProvider.stores[e].store}async updateColumnSorting(e,t,r,o){if(!this.columnProvider){throw new Error("Not connected")}return this.columnProvider.updateColumnSorting(e,t,r,o)}async clearSorting(){if(!this.columnProvider){throw new Error("Not connected")}this.columnProvider.clearSorting()}async getColumns(){if(!this.columnProvider){throw new Error("Not connected")}return this.columnProvider.getColumns()}async clearFocus(){var e,t;const r=(e=this.viewport)===null||e===void 0?void 0:e.getFocused();const o=this.beforefocuslost.emit(r);if(o.defaultPrevented){return}(t=this.selectionStoreConnector)===null||t===void 0?void 0:t.clearAll()}async getPlugins(){return this.pluginService.get()}async getFocused(){var e,t;return(t=(e=this.viewport)===null||e===void 0?void 0:e.getFocused())!==null&&t!==void 0?t:null}async getContentSize(){var e;if(!this.dimensionProvider){throw new Error("Not connected")}return(e=this.dimensionProvider)===null||e===void 0?void 0:e.getFullSize()}async getSelectedRange(){var e,t;return(t=(e=this.viewport)===null||e===void 0?void 0:e.getSelectedRange())!==null&&t!==void 0?t:null}async refreshExtraElements(){var e;(e=this.extraService)===null||e===void 0?void 0:e.refresh()}mousedownHandle(e){const t=A(e,"screenX");const r=A(e,"screenY");if(t===null||r===null){return}this.clickTrackForFocusClear=t+r}async mouseupHandle(e){var t;const r=A(e,"screenX");const o=A(e,"screenY");if(r===null||o===null){return}if(e.defaultPrevented){return}const i=r+o;if(Math.abs(((t=this.clickTrackForFocusClear)!==null&&t!==void 0?t:0)-i)>10){return}const s=e.composedPath();if(!s.includes(this.element)&&!(this.element.shadowRoot&&s.includes(this.element.shadowRoot))){await this.clearFocus()}}onRowDragStarted(e){var t;const r=this.rowdragstart.emit(e.detail);if(r.defaultPrevented){e.preventDefault();return}(t=this.orderService)===null||t===void 0?void 0:t.start(this.element,Object.assign(Object.assign({},e.detail),r.detail))}onRowDragEnd(){var e;(e=this.orderService)===null||e===void 0?void 0:e.end()}onRowOrderChange(e){var t;(t=this.dataProvider)===null||t===void 0?void 0:t.changeOrder(e.detail)}onRowDrag({detail:e}){var t;(t=this.orderService)===null||t===void 0?void 0:t.move(e)}onRowMouseMove(e){var t;(t=this.orderService)===null||t===void 0?void 0:t.moveTip(e.detail)}async onCellEdit(e){var t;const{defaultPrevented:r,detail:o}=this.beforeedit.emit(e.detail);await D();if(!r){(t=this.dataProvider)===null||t===void 0?void 0:t.setCellData(o);this.afteredit.emit(o)}}onRangeEdit(e){if(!this.dataProvider){throw new Error("Not connected")}const{defaultPrevented:t,detail:r}=this.beforerangeedit.emit(e.detail);if(t){e.preventDefault();return}this.dataProvider.setRangeData(r.data,r.type);this.afteredit.emit(r)}onRangeChanged(e){const t=this.beforerange.emit(e.detail);if(t.defaultPrevented){e.preventDefault()}const r=this.beforeautofill.emit(t.detail);if(r.defaultPrevented){e.preventDefault()}}onRowDropped(e){const{defaultPrevented:t}=this.roworderchanged.emit(e.detail);if(t){e.preventDefault()}}onHeaderClick(e){const{defaultPrevented:t}=this.headerclick.emit(Object.assign(Object.assign({},e.detail.column),{originalEvent:e.detail.originalEvent}));if(t){e.preventDefault()}}onCellFocus(e){const{defaultPrevented:t}=this.beforecellfocus.emit(e.detail);if(!this.canFocus||t){e.preventDefault()}}columnTypesChanged(){this.columnChanged(this.columns)}columnChanged(e=[],t=undefined,r="columns",o=false){if(!this.dimensionProvider||!this.columnProvider){return}const i=l(e,0,this.columnTypes);const s=this.beforecolumnsset.emit(i);if(s.defaultPrevented){return}this.dimensionProvider.applyNewColumns(s.detail.columns,this.disableVirtualX,o);const a=this.beforecolumnapplied.emit(i);if(a.defaultPrevented){return}const n=this.columnProvider.setColumns(a.detail);this.aftercolumnsset.emit({columns:n,order:this.columnProvider.order})}disableVirtualXChanged(e=false,t=false){if(e===t){return}this.columnChanged(this.columns)}rowSizeChanged(e){if(!this.dimensionProvider){return}this.dimensionProvider.setSettings({originItemSize:e},"rgRow");this.rowDefChanged(this.rowDefinitions,this.rowDefinitions,"rowSize",true)}themeChanged(e,t,r="theme",o=false){if(!this.dimensionProvider){return}this.themeService.register(e);this.dimensionProvider.setSettings({originItemSize:this.themeService.rowSize},"rgRow");this.dimensionProvider.setSettings({originItemSize:this.colSize},"rgCol");if(!o){this.dimensionProvider.setSettings({originItemSize:this.themeService.rowSize},"rgRow");this.rowDefChanged(this.rowDefinitions,this.rowDefinitions,"theme",true)}this.afterthemechanged.emit(e)}dataSourceChanged(e=[],t,r){if(!this.dataProvider){return}let o="rgRow";switch(r){case"pinnedBottomSource":o="rowPinEnd";break;case"pinnedTopSource":o="rowPinStart";break;case"source":o="rgRow";const t=this.beforesourceset.emit({type:o,source:e});e=t.detail.source;break}const i=this.beforeanysource.emit({type:o,source:e});const s=[...i.detail.source];this.dataProvider.setData(s,o,this.disableVirtualY);if(r==="source"){this.aftersourceset.emit({type:o,source:e})}this.afteranysource.emit({type:o,source:e})}disableVirtualYChanged(e=false,t=false){if(e===t){return}this.dataSourceChanged(this.source,this.source,"source")}rowDefChanged(e,t,r,o=true){if(!this.dimensionProvider||!this.dataProvider){return}const{detail:{vals:i,oldVals:s}}=this.beforerowdefinition.emit({vals:e,oldVals:t});const a=ae(i);if(s){const e=ne(s);for(const t in e){if(e.hasOwnProperty(t)){const e=t;const r=this.dataProvider.stores[e];const o=r.store.get("source").length;this.dimensionProvider.clearSize(e,o)}}}u.forEach((e=>{var t;const r=a[e];if(r||o){(t=this.dimensionProvider)===null||t===void 0?void 0:t.setCustomSizes(e,(r===null||r===void 0?void 0:r.sizes)||{})}}))}trimmedRowsChanged(e={}){this.addTrimmed(e)}groupingChanged(e={}){var t;(t=this.pluginService.getByClass(w))===null||t===void 0?void 0:t.setGrouping(e||{})}applyStretch(e){if(!this.dimensionProvider||!this.dataProvider||!this.columnProvider||!this.viewportProvider){return}if(e==="false"){e=false}const t=this.getPluginData();if(!t){return}const r=this.pluginService.getByClass(b);if(typeof e==="boolean"&&e||e==="true"){if(!r){this.pluginService.add(new b(this.element,t))}else if(x(r)){r.applyStretch(this.columnProvider.getRawColumns())}}else if(r){this.pluginService.remove(r)}}applyFilter(e){this.filterconfigchanged.emit(e)}applySorting(e){this.sortingconfigchanged.emit(e)}rowHeadersChange(e){this.rowheaderschanged.emit(e)}registerOutsideVNodes(e=[]){this.extraElements=e}additionalDataChanged(e){this.additionaldatachanged.emit(e)}pluginsChanged(e=[],t){this.pluginService.addUserPluginsAndCreate(this.element,e,t,this.getPluginData())}setPlugins(){this.removePlugins();const e=this.getPluginData();if(!e){return}this.setCorePlugins(e);this.pluginsChanged(this.plugins)}setCorePlugins(e){if(this.accessible){this.pluginService.add(new he(this.element,e))}if(this.autoSizeColumn){this.pluginService.add(new C(this.element,e,typeof this.autoSizeColumn==="object"?this.autoSizeColumn:undefined))}if(this.filter){this.pluginService.add(new y(this.element,e,typeof this.filter==="object"?this.filter:undefined))}if(this.exporting){this.pluginService.add(new S(this.element,e))}this.pluginService.add(new k(this.element,e));this.pluginService.add(new w(this.element,e));if(this.canMoveColumns){this.pluginService.add(new R(this.element,e))}}getPluginData(){if(!this.dimensionProvider||!this.dataProvider||!this.columnProvider||!this.viewportProvider||!this.selectionStoreConnector){return}const e={data:this.dataProvider,column:this.columnProvider,dimension:this.dimensionProvider,viewport:this.viewportProvider,selection:this.selectionStoreConnector,plugins:this.pluginService};return e}removePlugins(){this.pluginService.destroy()}connectedCallback(){if(this.isInited){this.setPlugins()}this.created.emit()}componentWillLoad(){var e;this.viewportProvider=new ee;this.themeService=new _({rowSize:this.rowSize});this.dimensionProvider=new Q(this.viewportProvider,{realSizeChanged:e=>this.contentsizechanged.emit(e)});this.columnProvider=new J;this.selectionStoreConnector=new c;this.dataProvider=new K(this.dimensionProvider);this.registerOutsideVNodes(this.registerVNode);this.setPlugins();this.applyStretch(this.stretch);this.themeChanged(this.theme,undefined,undefined,true);this.columnChanged(this.columns,undefined,undefined,true);this.dataSourceChanged(this.source,undefined,"source");this.dataSourceChanged(this.pinnedTopSource,undefined,"pinnedTopSource");this.dataSourceChanged(this.pinnedBottomSource,undefined,"pinnedBottomSource");if(Object.keys((e=this.trimmedRows)!==null&&e!==void 0?e:{}).length>0){this.trimmedRowsChanged(this.trimmedRows)}this.rowDefChanged(this.rowDefinitions);if(this.grouping&&Object.keys(this.grouping).length>0){this.groupingChanged(this.grouping)}this.scrollingService=new oe((e=>{var t;(t=this.dimensionProvider)===null||t===void 0?void 0:t.setViewPortCoordinate({coordinate:e.coordinate,type:e.dimension});this.viewportscroll.emit(e)}));this.aftergridinit.emit();this.isInited=true}componentWillRender(){const e=this.beforegridrender.emit();if(e.defaultPrevented){return false}return Promise.all(this.jobsBeforeRender)}componentDidRender(){this.aftergridrender.emit()}render(){if(!this.dimensionProvider||!this.dataProvider||!this.columnProvider||!this.viewportProvider||!this.selectionStoreConnector){return}const t=this.dimensionProvider.stores["rgRow"].store.get("realSize");this.viewport=new re({columnProvider:this.columnProvider,dataProvider:this.dataProvider,dimensionProvider:this.dimensionProvider,viewportProvider:this.viewportProvider,scrollingService:this.scrollingService,orderService:this.orderService,selectionStoreConnector:this.selectionStoreConnector,disableVirtualX:this.disableVirtualX,disableVirtualY:this.disableVirtualY,resize:e=>this.aftercolumnresize.emit(e)},t);const r=[];if(this.rowHeaders&&this.viewport.columns.length){const o=this.viewport.columns[0];r.push(e("revogr-row-headers",{additionalData:this.additionalData,height:t,rowClass:this.rowClass,resize:this.resize,dataPorts:o.dataPorts,headerProp:o.headerProp,jobsBeforeRender:this.jobsBeforeRender,rowHeaderColumn:typeof this.rowHeaders==="object"?this.rowHeaders:undefined,onScrollview:({detail:e})=>this.scrollingService.proxyScroll(e,"headerRow"),onRef:({detail:e})=>this.scrollingService.registerElement(e,"headerRow")}))}const i=de();const s=[];for(let t of this.viewport.columns){const r=Object.assign(Object.assign({},t.headerProp),{type:t.type,additionalData:this.additionalData,viewportCol:t.viewportCol,selectionStore:t.columnSelectionStore,canResize:this.resize,readonly:this.readonly,columnFilter:!!this.filter});const o=[e("revogr-header",Object.assign({},r,{slot:$}))];t.dataPorts.forEach((r=>{const s=`${r.type}_${t.type}`;const a=e("revogr-overlay-selection",Object.assign({},r,{isMobileDevice:i,onSelectall:()=>{var e;return(e=this.selectionStoreConnector)===null||e===void 0?void 0:e.selectAll()},editors:this.editors,readonly:this.readonly,range:this.range,useClipboard:this.useClipboard,applyChangesOnClose:this.applyOnClose,additionalData:this.additionalData,slot:r.slot,onBeforenextvpfocus:e=>{var t;return(t=this.selectionStoreConnector)===null||t===void 0?void 0:t.beforeNextFocusCell(e.detail)},onCanceledit:()=>{var e;return(e=this.selectionStoreConnector)===null||e===void 0?void 0:e.setEdit(false)},onSetedit:({detail:e})=>{var t;const r=this.beforeeditstart.emit(e);if(!r.defaultPrevented){(t=this.selectionStoreConnector)===null||t===void 0?void 0:t.setEdit(e.val)}}}),e("revogr-data",Object.assign({},r,{colType:t.type,key:s,readonly:this.readonly,range:this.range,rowClass:this.rowClass,rowSelectionStore:r.rowSelectionStore,additionalData:this.additionalData,jobsBeforeRender:this.jobsBeforeRender,slot:U}),e("slot",{name:`data-${t.type}-${r.type}`})),e("revogr-temp-range",{selectionStore:r.selectionStore,dimensionRow:r.dimensionRow,dimensionCol:r.dimensionCol}),e("revogr-focus",{colData:r.colData,dataStore:r.dataStore,focusTemplate:this.focusTemplate,rowType:r.type,colType:t.type,selectionStore:r.selectionStore,dimensionRow:r.dimensionRow,dimensionCol:r.dimensionCol},e("slot",{name:`focus-${t.type}-${r.type}`})));o.push(a)}));s.push(e("revogr-viewport-scroll",Object.assign({},t.prop,{ref:e=>this.scrollingService.registerElement(e,`${t.prop.key}`),onScrollviewport:e=>this.scrollingService.proxyScroll(e.detail,`${t.prop.key}`),onScrollviewportsilent:e=>this.scrollingService.scrollSilentService(e.detail,`${t.prop.key}`)}),o))}r.push(s);const a="rgRow";const n="rgCol";const d=this.viewportProvider.stores;const h=this.dimensionProvider.stores;return e(o,null,this.hideAttribution?null:e("revogr-attribution",{class:"attribution"}),e("slot",{name:"header"}),e("div",{class:"main-viewport",onClick:e=>{var t;if(e.currentTarget===e.target){(t=this.viewport)===null||t===void 0?void 0:t.clearEdit()}}},e("div",{class:"viewports"},e("slot",{name:"viewport"}),r,e("revogr-scroll-virtual",{class:"vertical",dimension:a,viewportStore:d[a].store,dimensionStore:h[a].store,ref:e=>this.scrollingService.registerElement(e,"rowScroll"),onScrollvirtual:e=>this.scrollingService.proxyScroll(e.detail)}),e(se,{ref:e=>this.orderService=e}))),e("revogr-scroll-virtual",{class:"horizontal",dimension:n,viewportStore:d[n].store,dimensionStore:h[n].store,ref:e=>this.scrollingService.registerElement(e,"colScroll"),onScrollvirtual:e=>this.scrollingService.proxyScroll(e.detail)}),e("revogr-extra",{ref:e=>this.extraService=e,nodes:this.extraElements}),e("slot",{name:"footer"}))}disconnectedCallback(){this.removePlugins()}get element(){return i(this)}static get watchers(){return{columnTypes:["columnTypesChanged"],columns:["columnChanged"],disableVirtualX:["disableVirtualXChanged"],rowSize:["rowSizeChanged"],theme:["themeChanged"],source:["dataSourceChanged"],pinnedBottomSource:["dataSourceChanged"],pinnedTopSource:["dataSourceChanged"],disableVirtualY:["disableVirtualYChanged"],rowDefinitions:["rowDefChanged"],trimmedRows:["trimmedRowsChanged"],grouping:["groupingChanged"],stretch:["applyStretch"],filter:["applyFilter"],sorting:["applySorting"],rowHeaders:["rowHeadersChange"],registerVNode:["registerOutsideVNodes"],additionalData:["additionalDataChanged"],plugins:["pluginsChanged"]}}};ve.style=ge;export{ve as revo_grid};
//# sourceMappingURL=revo-grid.entry.js.map

@@ -21,3 +21,3 @@ import { type VNode, EventEmitter } from '../../stencil-public-runtime';

import { PluginService } from './plugin.service';
import { SortingConfig } from "../../plugins/sorting/sorting.types";
import { SortingConfig, SortingOrder } from '../../plugins';
/**

@@ -256,7 +256,8 @@ * Revogrid - High-performance, customizable grid library for managing large datasets.

/**
* By sorting.plugin.ts
* Before sorting apply.
* Use e.preventDefault() to prevent sorting data change.
* By `sorting.plugin.ts`
* <br>Triggered immediately after header click.
* <br>First in sorting event sequence. Ff this event stops no other event called.
* <br>Use `e.preventDefault()` to prevent sorting.
*/
beforesortingapply: EventEmitter<{
beforesorting: EventEmitter<{
column: ColumnRegular;

@@ -267,8 +268,17 @@ order: 'desc' | 'asc';

/**
* By sorting.plugin.ts
* Before sorting event.
* Initial sorting triggered, if this event stops no other event called.
* Use e.preventDefault() to prevent sorting.
* By `sorting.plugin.ts`
* <br>Same as `beforesorting` but triggered after `beforeanysource` (when source is changed).
* <br>Use `e.preventDefault()` to prevent sorting data change.
*/
beforesorting: EventEmitter<{
beforesourcesortingapply: EventEmitter<{
type: DimensionRows;
sorting?: SortingOrder;
}>;
/**
* By `sorting.plugin.ts`
* <br> After `beforesorting`
* <br>Triggered after column data updated with new sorting order.
* <br>Use `e.preventDefault()` to prevent sorting data change.
*/
beforesortingapply: EventEmitter<{
column: ColumnRegular;

@@ -275,0 +285,0 @@ order: 'desc' | 'asc';

import { BasePlugin } from '../base.plugin';
import type { ColumnProp, Order, CellCompareFunc, ColumnRegular, DataType, DimensionRows, PluginProviders } from "../../types/index";
import type { SortingConfig, SortingOrder, SortingOrderFunction } from './sorting.types';
export * from './sorting.types';
/**
* Lifecycle
* 1. @event `beforesorting` - Triggered when sorting just starts. Nothing has happened yet. This can be triggered from a column or from the source. If the type is from rows, the column will be undefined.
* 1.1. @event `beforesourcesortingapply` - Triggered before the sorting data is applied to the data source. You can prevent this event, and the data will not be sorted.
* 2. @method `updateColumnSorting` - Updates the column sorting icon on the grid and the column itself, but the data remains untouched.

@@ -8,0 +10,0 @@ * 3. @event `beforesortingapply` - Triggered before the sorting data is applied to the data source. You can prevent this event, and the data will not be sorted. This event is only called from a column sorting click.

@@ -1,2 +0,2 @@

export type RevogridEvents = 'contentsizechanged' | 'beforeedit' | 'beforerangeedit' | 'afteredit' | 'beforeautofill' | 'beforerange' | 'afterfocus' | 'roworderchanged' | 'beforesortingapply' | 'beforesorting' | 'rowdragstart' | 'headerclick' | 'beforecellfocus' | 'beforefocuslost' | 'beforesourceset' | 'beforeanysource' | 'aftersourceset' | 'afteranysource' | 'beforecolumnsset' | 'beforecolumnapplied' | 'aftercolumnsset' | 'beforefilterapply' | 'beforefiltertrimmed' | 'beforetrimmed' | 'aftertrimmed' | 'viewportscroll' | 'beforeexport' | 'beforeeditstart' | 'aftercolumnresize' | 'beforerowdefinition' | 'filterconfigchanged' | 'sortingconfigchanged' | 'rowheaderschanged' | 'beforegridrender' | 'aftergridrender' | 'aftergridinit' | 'additionaldatachanged' | 'afterthemechanged' | 'created' | 'beforepaste' | 'beforepasteapply' | 'pasteregion' | 'afterpasteapply' | 'beforecut' | 'clearregion' | 'beforecopy' | 'beforecopyapply' | 'copyregion' | 'beforerowrender' | 'afterrender' | 'beforecellrender' | 'beforedatarender' | 'dragstartcell' | 'celledit' | 'closeedit' | 'filterChange' | 'resetChange' | 'beforefocusrender' | 'beforescrollintoview' | 'afterfocus' | 'beforeheaderclick' | 'headerresize' | 'beforeheaderresize' | 'headerdblclick' | 'beforeheaderrender' | 'afterheaderrender' | 'rowdragstartinit' | 'rowdragendinit' | 'rowdragmoveinit' | 'rowdragmousemove' | 'rowdropinit' | 'roworderchange' | 'beforecopyregion' | 'beforepasteregion' | 'celleditapply' | 'beforecellfocusinit' | 'beforenextvpfocus' | 'setedit' | 'beforeapplyrange' | 'beforesetrange' | 'setrange' | 'beforeeditrender' | 'selectall' | 'canceledit' | 'settemprange' | 'beforesettemprange' | 'applyfocus' | 'focuscell' | 'beforerangedataapply' | 'selectionchangeinit' | 'beforerangecopyapply' | 'rangeeditapply' | 'clipboardrangecopy' | 'clipboardrangepaste' | 'beforekeydown' | 'beforekeyup' | 'beforecellsave' | 'scrollview' | 'ref' | 'scrollvirtual' | 'scrollviewport' | 'resizeviewport' | 'scrollchange' | 'scrollviewportsilent' | 'html';
export type RevogridEvents = 'contentsizechanged' | 'beforeedit' | 'beforerangeedit' | 'afteredit' | 'beforeautofill' | 'beforerange' | 'afterfocus' | 'roworderchanged' | 'beforesorting' | 'beforesourcesortingapply' | 'beforesortingapply' | 'rowdragstart' | 'headerclick' | 'beforecellfocus' | 'beforefocuslost' | 'beforesourceset' | 'beforeanysource' | 'aftersourceset' | 'afteranysource' | 'beforecolumnsset' | 'beforecolumnapplied' | 'aftercolumnsset' | 'beforefilterapply' | 'beforefiltertrimmed' | 'beforetrimmed' | 'aftertrimmed' | 'viewportscroll' | 'beforeexport' | 'beforeeditstart' | 'aftercolumnresize' | 'beforerowdefinition' | 'filterconfigchanged' | 'sortingconfigchanged' | 'rowheaderschanged' | 'beforegridrender' | 'aftergridrender' | 'aftergridinit' | 'additionaldatachanged' | 'afterthemechanged' | 'created' | 'beforepaste' | 'beforepasteapply' | 'pasteregion' | 'afterpasteapply' | 'beforecut' | 'clearregion' | 'beforecopy' | 'beforecopyapply' | 'copyregion' | 'beforerowrender' | 'afterrender' | 'beforecellrender' | 'beforedatarender' | 'dragstartcell' | 'celledit' | 'closeedit' | 'filterChange' | 'resetChange' | 'beforefocusrender' | 'beforescrollintoview' | 'afterfocus' | 'beforeheaderclick' | 'headerresize' | 'beforeheaderresize' | 'headerdblclick' | 'beforeheaderrender' | 'afterheaderrender' | 'rowdragstartinit' | 'rowdragendinit' | 'rowdragmoveinit' | 'rowdragmousemove' | 'rowdropinit' | 'roworderchange' | 'beforecopyregion' | 'beforepasteregion' | 'celleditapply' | 'beforecellfocusinit' | 'beforenextvpfocus' | 'setedit' | 'beforeapplyrange' | 'beforesetrange' | 'setrange' | 'beforeeditrender' | 'selectall' | 'canceledit' | 'settemprange' | 'beforesettemprange' | 'applyfocus' | 'focuscell' | 'beforerangedataapply' | 'selectionchangeinit' | 'beforerangecopyapply' | 'rangeeditapply' | 'clipboardrangecopy' | 'clipboardrangepaste' | 'beforekeydown' | 'beforekeyup' | 'beforecellsave' | 'scrollview' | 'ref' | 'scrollvirtual' | 'scrollviewport' | 'resizeviewport' | 'scrollchange' | 'scrollviewportsilent' | 'html';
export declare const REVOGRID_EVENTS: Map<RevogridEvents, RevogridEvents>;
{
"name": "@revolist/revogrid",
"version": "4.11.5",
"version": "4.11.6",
"type": "module",

@@ -5,0 +5,0 @@ "description": "Virtual reactive data grid spreadsheet component - RevoGrid.",

@@ -55,4 +55,5 @@ /*!

['roworderchanged', 'roworderchanged'],
['beforesorting', 'beforesorting'],
['beforesourcesortingapply', 'beforesourcesortingapply'],
['beforesortingapply', 'beforesortingapply'],
['beforesorting', 'beforesorting'],
['rowdragstart', 'rowdragstart'],

@@ -59,0 +60,0 @@ ['headerclick', 'headerclick'],

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc