@revolist/revogrid 4.10.27 → 4.10.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/revo-grid.cjs.entry.js +1 -1
  4. package/dist/cjs/revo-grid.cjs.js +1 -1
  5. package/dist/cjs/revogr-filter-panel.cjs.entry.js +4 -1
  6. package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
  7. package/dist/cjs/{sorting.plugin-ce48aa99.js → sorting.plugin-ac1d9456.js} +2 -2
  8. package/dist/cjs/sorting.plugin-ac1d9456.js.map +1 -0
  9. package/dist/collection/plugins/filter/filter.panel.js +35 -1
  10. package/dist/collection/plugins/filter/filter.panel.js.map +1 -1
  11. package/dist/collection/plugins/filter/filter.plugin.js +1 -1
  12. package/dist/collection/plugins/filter/filter.plugin.js.map +1 -1
  13. package/dist/esm/index.js +2 -2
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/revo-grid.entry.js +1 -1
  16. package/dist/esm/revo-grid.js +1 -1
  17. package/dist/esm/revogr-filter-panel.entry.js +4 -1
  18. package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
  19. package/dist/esm/{sorting.plugin-63dfed09.js → sorting.plugin-b47a69a1.js} +2 -2
  20. package/dist/esm/sorting.plugin-b47a69a1.js.map +1 -0
  21. package/dist/revo-grid/index.esm.js +1 -1
  22. package/dist/revo-grid/revo-grid.entry.js +1 -1
  23. package/dist/revo-grid/revo-grid.esm.js +1 -1
  24. package/dist/revo-grid/revo-grid.esm.js.map +1 -1
  25. package/dist/revo-grid/revogr-filter-panel.entry.js +1 -1
  26. package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
  27. package/dist/revo-grid/sorting.plugin-b47a69a1.js +5 -0
  28. package/dist/revo-grid/sorting.plugin-b47a69a1.js.map +1 -0
  29. package/dist/types/components.d.ts +4 -2
  30. package/dist/types/plugins/filter/filter.panel.d.ts +2 -1
  31. package/dist/types/plugins/filter/filter.plugin.d.ts +4 -2
  32. package/hydrate/index.js +6 -2
  33. package/hydrate/index.mjs +6 -2
  34. package/package.json +1 -1
  35. package/standalone/revo-grid.js +1 -1
  36. package/standalone/revo-grid.js.map +1 -1
  37. package/standalone/revogr-filter-panel.js +5 -1
  38. package/standalone/revogr-filter-panel.js.map +1 -1
  39. package/dist/cjs/sorting.plugin-ce48aa99.js.map +0 -1
  40. package/dist/esm/sorting.plugin-63dfed09.js.map +0 -1
  41. package/dist/revo-grid/sorting.plugin-63dfed09.js +0 -5
  42. package/dist/revo-grid/sorting.plugin-63dfed09.js.map +0 -1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const sorting_plugin = require('./sorting.plugin-ce48aa99.js');
8
+ const sorting_plugin = require('./sorting.plugin-ac1d9456.js');
9
9
  const headerCellRenderer = require('./header-cell-renderer-96d3af22.js');
10
10
  const index = require('./index-10d10c55.js');
11
11
  const dimension_helpers = require('./dimension.helpers-d1fc1dac.js');
@@ -11,7 +11,7 @@ const appGlobals = require('./app-globals-c0b20747.js');
11
11
  const defineCustomElements = async (win, options) => {
12
12
  if (typeof window === 'undefined') return undefined;
13
13
  await appGlobals.globalScripts();
14
- return index.bootstrapLazy([["revo-grid.cjs",[[4,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"applyOnClose":[4,"apply-on-close"],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[8,"additional-data"],"disableVirtualX":[4,"disable-virtual-x"],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"refresh":[64],"setDataAt":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"setCellsFocus":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getContentSize":[64],"getSelectedRange":[64],"refreshExtraElements":[64]},[[5,"touchstart","mousedownHandle"],[5,"mousedown","mousedownHandle"],[5,"touchend","mouseupHandle"],[5,"mouseup","mouseupHandle"],[0,"rowdragstartinit","onRowDragStarted"],[0,"rowdragendinit","onRowDragEnd"],[0,"roworderchange","onRowOrderChange"],[0,"rowdragmoveinit","onRowDrag"],[0,"rowdragmousemove","onRowMouseMove"],[0,"celleditapply","onCellEdit"],[0,"rangeeditapply","onRangeEdit"],[0,"selectionchangeinit","onRangeChanged"],[0,"rowdropinit","onRowDropped"],[0,"beforeheaderclick","onHeaderClick"],[0,"beforecellfocusinit","onCellFocus"]],{"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"],"rowHeaders":["rowHeadersChange"],"registerVNode":["registerOutsideVNodes"],"additionalData":["additionalDataChanged"],"plugins":["pluginsChanged"]}]]],["revogr-filter-panel.cjs",[[4,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revogr-clipboard_3.cjs",[[0,"revogr-clipboard",{"readonly":[4],"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"],[4,"cut","cutStarted"]]],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16],"saveOnClose":[4,"save-on-close"],"additionalData":[8,"additional-data"],"cancelChanges":[64],"beforeDisconnect":[64]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"rowType":[1,"row-type"],"dragStart":[64],"endOrder":[64],"clearOrder":[64]}]]],["revogr-data_4.cjs",[[4,"revogr-data",{"readonly":[4],"range":[4],"rowClass":[1,"row-class"],"additionalData":[8,"additional-data"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16],"type":[513],"colType":[513,"col-type"],"jobsBeforeRender":[16],"providers":[32],"updateCell":[64]},null,{"dataStore":["onDataStoreChange"],"colData":["onColDataChange"]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"groups":[16],"groupingDepth":[2,"grouping-depth"],"readonly":[4],"canResize":[4,"can-resize"],"resizeHandler":[16],"colData":[16],"columnFilter":[4,"column-filter"],"type":[1],"additionalData":[8,"additional-data"]}],[4,"revogr-viewport-scroll",{"rowHeader":[4,"row-header"],"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"colType":[1,"col-type"],"setScroll":[64],"changeScroll":[64],"applyScroll":[64]},[[0,"mousewheel-vertical","mousewheelVertical"],[0,"mousewheel-horizontal","mousewheelHorizontal"],[0,"scroll-coordinate","scrollApply"]]],[0,"vnode-html",{"redraw":[16]}]]],["revogr-attribution_7.cjs",[[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"rowClass":[1,"row-class"],"resize":[4],"rowHeaderColumn":[16],"additionalData":[8,"additional-data"],"jobsBeforeRender":[16]}],[4,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16],"applyChangesOnClose":[4,"apply-changes-on-close"],"additionalData":[8,"additional-data"],"isMobileDevice":[4,"is-mobile-device"]},[[5,"touchmove","onMouseMove"],[5,"mousemove","onMouseMove"],[5,"touchend","onMouseUp"],[5,"mouseup","onMouseUp"],[5,"mouseleave","onMouseUp"],[0,"dragstartcell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]],{"selectionStore":["selectionServiceSet"],"dimensionRow":["createAutoFillService"],"dimensionCol":["createAutoFillService"],"dataStore":["columnServiceSet"],"colData":["columnServiceSet"]}],[0,"revogr-attribution"],[4,"revogr-focus",{"colType":[1,"col-type"],"rowType":[1,"row-type"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"focusTemplate":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"viewportStore":[16],"dimensionStore":[16],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-extra",{"nodes":[16],"update":[32],"refresh":[64]}]]]], options);
14
+ return index.bootstrapLazy([["revo-grid.cjs",[[4,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"applyOnClose":[4,"apply-on-close"],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[8,"additional-data"],"disableVirtualX":[4,"disable-virtual-x"],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"refresh":[64],"setDataAt":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"setCellsFocus":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getContentSize":[64],"getSelectedRange":[64],"refreshExtraElements":[64]},[[5,"touchstart","mousedownHandle"],[5,"mousedown","mousedownHandle"],[5,"touchend","mouseupHandle"],[5,"mouseup","mouseupHandle"],[0,"rowdragstartinit","onRowDragStarted"],[0,"rowdragendinit","onRowDragEnd"],[0,"roworderchange","onRowOrderChange"],[0,"rowdragmoveinit","onRowDrag"],[0,"rowdragmousemove","onRowMouseMove"],[0,"celleditapply","onCellEdit"],[0,"rangeeditapply","onRangeEdit"],[0,"selectionchangeinit","onRangeChanged"],[0,"rowdropinit","onRowDropped"],[0,"beforeheaderclick","onHeaderClick"],[0,"beforecellfocusinit","onCellFocus"]],{"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"],"rowHeaders":["rowHeadersChange"],"registerVNode":["registerOutsideVNodes"],"additionalData":["additionalDataChanged"],"plugins":["pluginsChanged"]}]]],["revogr-filter-panel.cjs",[[4,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"extraContent":[16],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revogr-clipboard_3.cjs",[[0,"revogr-clipboard",{"readonly":[4],"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"],[4,"cut","cutStarted"]]],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16],"saveOnClose":[4,"save-on-close"],"additionalData":[8,"additional-data"],"cancelChanges":[64],"beforeDisconnect":[64]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"rowType":[1,"row-type"],"dragStart":[64],"endOrder":[64],"clearOrder":[64]}]]],["revogr-data_4.cjs",[[4,"revogr-data",{"readonly":[4],"range":[4],"rowClass":[1,"row-class"],"additionalData":[8,"additional-data"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16],"type":[513],"colType":[513,"col-type"],"jobsBeforeRender":[16],"providers":[32],"updateCell":[64]},null,{"dataStore":["onDataStoreChange"],"colData":["onColDataChange"]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"groups":[16],"groupingDepth":[2,"grouping-depth"],"readonly":[4],"canResize":[4,"can-resize"],"resizeHandler":[16],"colData":[16],"columnFilter":[4,"column-filter"],"type":[1],"additionalData":[8,"additional-data"]}],[4,"revogr-viewport-scroll",{"rowHeader":[4,"row-header"],"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"colType":[1,"col-type"],"setScroll":[64],"changeScroll":[64],"applyScroll":[64]},[[0,"mousewheel-vertical","mousewheelVertical"],[0,"mousewheel-horizontal","mousewheelHorizontal"],[0,"scroll-coordinate","scrollApply"]]],[0,"vnode-html",{"redraw":[16]}]]],["revogr-attribution_7.cjs",[[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"rowClass":[1,"row-class"],"resize":[4],"rowHeaderColumn":[16],"additionalData":[8,"additional-data"],"jobsBeforeRender":[16]}],[4,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16],"applyChangesOnClose":[4,"apply-changes-on-close"],"additionalData":[8,"additional-data"],"isMobileDevice":[4,"is-mobile-device"]},[[5,"touchmove","onMouseMove"],[5,"mousemove","onMouseMove"],[5,"touchend","onMouseUp"],[5,"mouseup","onMouseUp"],[5,"mouseleave","onMouseUp"],[0,"dragstartcell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]],{"selectionStore":["selectionServiceSet"],"dimensionRow":["createAutoFillService"],"dimensionCol":["createAutoFillService"],"dataStore":["columnServiceSet"],"colData":["columnServiceSet"]}],[0,"revogr-attribution"],[4,"revogr-focus",{"colType":[1,"col-type"],"rowType":[1,"row-type"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"focusTemplate":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"viewportStore":[16],"dimensionStore":[16],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-extra",{"nodes":[16],"update":[32],"refresh":[64]}]]]], options);
15
15
  };
16
16
 
17
17
  exports.setNonce = index.setNonce;
@@ -7,7 +7,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-10d10c55.js');
9
9
  const column_service = require('./column.service-b0aead25.js');
10
- const sorting_plugin = require('./sorting.plugin-ce48aa99.js');
10
+ const sorting_plugin = require('./sorting.plugin-ac1d9456.js');
11
11
  const dimension_helpers = require('./dimension.helpers-d1fc1dac.js');
12
12
  const debounce = require('./debounce-ec7a04b4.js');
13
13
  const viewport_store = require('./viewport.store-3d351649.js');
@@ -22,7 +22,7 @@ var patchBrowser = () => {
22
22
 
23
23
  patchBrowser().then(async (options) => {
24
24
  await appGlobals.globalScripts();
25
- return index.bootstrapLazy([["revo-grid.cjs",[[4,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"applyOnClose":[4,"apply-on-close"],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[8,"additional-data"],"disableVirtualX":[4,"disable-virtual-x"],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"refresh":[64],"setDataAt":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"setCellsFocus":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getContentSize":[64],"getSelectedRange":[64],"refreshExtraElements":[64]},[[5,"touchstart","mousedownHandle"],[5,"mousedown","mousedownHandle"],[5,"touchend","mouseupHandle"],[5,"mouseup","mouseupHandle"],[0,"rowdragstartinit","onRowDragStarted"],[0,"rowdragendinit","onRowDragEnd"],[0,"roworderchange","onRowOrderChange"],[0,"rowdragmoveinit","onRowDrag"],[0,"rowdragmousemove","onRowMouseMove"],[0,"celleditapply","onCellEdit"],[0,"rangeeditapply","onRangeEdit"],[0,"selectionchangeinit","onRangeChanged"],[0,"rowdropinit","onRowDropped"],[0,"beforeheaderclick","onHeaderClick"],[0,"beforecellfocusinit","onCellFocus"]],{"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"],"rowHeaders":["rowHeadersChange"],"registerVNode":["registerOutsideVNodes"],"additionalData":["additionalDataChanged"],"plugins":["pluginsChanged"]}]]],["revogr-filter-panel.cjs",[[4,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revogr-clipboard_3.cjs",[[0,"revogr-clipboard",{"readonly":[4],"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"],[4,"cut","cutStarted"]]],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16],"saveOnClose":[4,"save-on-close"],"additionalData":[8,"additional-data"],"cancelChanges":[64],"beforeDisconnect":[64]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"rowType":[1,"row-type"],"dragStart":[64],"endOrder":[64],"clearOrder":[64]}]]],["revogr-data_4.cjs",[[4,"revogr-data",{"readonly":[4],"range":[4],"rowClass":[1,"row-class"],"additionalData":[8,"additional-data"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16],"type":[513],"colType":[513,"col-type"],"jobsBeforeRender":[16],"providers":[32],"updateCell":[64]},null,{"dataStore":["onDataStoreChange"],"colData":["onColDataChange"]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"groups":[16],"groupingDepth":[2,"grouping-depth"],"readonly":[4],"canResize":[4,"can-resize"],"resizeHandler":[16],"colData":[16],"columnFilter":[4,"column-filter"],"type":[1],"additionalData":[8,"additional-data"]}],[4,"revogr-viewport-scroll",{"rowHeader":[4,"row-header"],"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"colType":[1,"col-type"],"setScroll":[64],"changeScroll":[64],"applyScroll":[64]},[[0,"mousewheel-vertical","mousewheelVertical"],[0,"mousewheel-horizontal","mousewheelHorizontal"],[0,"scroll-coordinate","scrollApply"]]],[0,"vnode-html",{"redraw":[16]}]]],["revogr-attribution_7.cjs",[[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"rowClass":[1,"row-class"],"resize":[4],"rowHeaderColumn":[16],"additionalData":[8,"additional-data"],"jobsBeforeRender":[16]}],[4,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16],"applyChangesOnClose":[4,"apply-changes-on-close"],"additionalData":[8,"additional-data"],"isMobileDevice":[4,"is-mobile-device"]},[[5,"touchmove","onMouseMove"],[5,"mousemove","onMouseMove"],[5,"touchend","onMouseUp"],[5,"mouseup","onMouseUp"],[5,"mouseleave","onMouseUp"],[0,"dragstartcell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]],{"selectionStore":["selectionServiceSet"],"dimensionRow":["createAutoFillService"],"dimensionCol":["createAutoFillService"],"dataStore":["columnServiceSet"],"colData":["columnServiceSet"]}],[0,"revogr-attribution"],[4,"revogr-focus",{"colType":[1,"col-type"],"rowType":[1,"row-type"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"focusTemplate":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"viewportStore":[16],"dimensionStore":[16],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-extra",{"nodes":[16],"update":[32],"refresh":[64]}]]]], options);
25
+ return index.bootstrapLazy([["revo-grid.cjs",[[4,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"canFocus":[4,"can-focus"],"useClipboard":[4,"use-clipboard"],"columns":[16],"source":[16],"pinnedTopSource":[16],"pinnedBottomSource":[16],"rowDefinitions":[16],"editors":[16],"applyOnClose":[4,"apply-on-close"],"plugins":[16],"columnTypes":[16],"theme":[1537],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[8,"additional-data"],"disableVirtualX":[4,"disable-virtual-x"],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"refresh":[64],"setDataAt":[64],"scrollToRow":[64],"scrollToColumnIndex":[64],"scrollToColumnProp":[64],"updateColumns":[64],"addTrimmed":[64],"scrollToCoordinate":[64],"setCellEdit":[64],"setCellsFocus":[64],"getSource":[64],"getVisibleSource":[64],"getSourceStore":[64],"getColumnStore":[64],"updateColumnSorting":[64],"clearSorting":[64],"getColumns":[64],"clearFocus":[64],"getPlugins":[64],"getFocused":[64],"getContentSize":[64],"getSelectedRange":[64],"refreshExtraElements":[64]},[[5,"touchstart","mousedownHandle"],[5,"mousedown","mousedownHandle"],[5,"touchend","mouseupHandle"],[5,"mouseup","mouseupHandle"],[0,"rowdragstartinit","onRowDragStarted"],[0,"rowdragendinit","onRowDragEnd"],[0,"roworderchange","onRowOrderChange"],[0,"rowdragmoveinit","onRowDrag"],[0,"rowdragmousemove","onRowMouseMove"],[0,"celleditapply","onCellEdit"],[0,"rangeeditapply","onRangeEdit"],[0,"selectionchangeinit","onRangeChanged"],[0,"rowdropinit","onRowDropped"],[0,"beforeheaderclick","onHeaderClick"],[0,"beforecellfocusinit","onCellFocus"]],{"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"],"rowHeaders":["rowHeadersChange"],"registerVNode":["registerOutsideVNodes"],"additionalData":["additionalDataChanged"],"plugins":["pluginsChanged"]}]]],["revogr-filter-panel.cjs",[[4,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"extraContent":[16],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"show":[64],"getChanges":[64]},[[5,"mousedown","onMouseDown"]]]]],["revogr-clipboard_3.cjs",[[0,"revogr-clipboard",{"readonly":[4],"doCopy":[64]},[[4,"paste","onPaste"],[4,"copy","copyStarted"],[4,"cut","cutStarted"]]],[0,"revogr-edit",{"editCell":[16],"column":[16],"editor":[16],"saveOnClose":[4,"save-on-close"],"additionalData":[8,"additional-data"],"cancelChanges":[64],"beforeDisconnect":[64]}],[0,"revogr-order-editor",{"parent":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"rowType":[1,"row-type"],"dragStart":[64],"endOrder":[64],"clearOrder":[64]}]]],["revogr-data_4.cjs",[[4,"revogr-data",{"readonly":[4],"range":[4],"rowClass":[1,"row-class"],"additionalData":[8,"additional-data"],"rowSelectionStore":[16],"viewportRow":[16],"viewportCol":[16],"dimensionRow":[16],"colData":[16],"dataStore":[16],"type":[513],"colType":[513,"col-type"],"jobsBeforeRender":[16],"providers":[32],"updateCell":[64]},null,{"dataStore":["onDataStoreChange"],"colData":["onColDataChange"]}],[0,"revogr-header",{"viewportCol":[16],"dimensionCol":[16],"selectionStore":[16],"groups":[16],"groupingDepth":[2,"grouping-depth"],"readonly":[4],"canResize":[4,"can-resize"],"resizeHandler":[16],"colData":[16],"columnFilter":[4,"column-filter"],"type":[1],"additionalData":[8,"additional-data"]}],[4,"revogr-viewport-scroll",{"rowHeader":[4,"row-header"],"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"colType":[1,"col-type"],"setScroll":[64],"changeScroll":[64],"applyScroll":[64]},[[0,"mousewheel-vertical","mousewheelVertical"],[0,"mousewheel-horizontal","mousewheelHorizontal"],[0,"scroll-coordinate","scrollApply"]]],[0,"vnode-html",{"redraw":[16]}]]],["revogr-attribution_7.cjs",[[0,"revogr-row-headers",{"height":[2],"dataPorts":[16],"headerProp":[16],"rowClass":[1,"row-class"],"resize":[4],"rowHeaderColumn":[16],"additionalData":[8,"additional-data"],"jobsBeforeRender":[16]}],[4,"revogr-overlay-selection",{"readonly":[4],"range":[4],"canDrag":[4,"can-drag"],"useClipboard":[4,"use-clipboard"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"lastCell":[16],"editors":[16],"applyChangesOnClose":[4,"apply-changes-on-close"],"additionalData":[8,"additional-data"],"isMobileDevice":[4,"is-mobile-device"]},[[5,"touchmove","onMouseMove"],[5,"mousemove","onMouseMove"],[5,"touchend","onMouseUp"],[5,"mouseup","onMouseUp"],[5,"mouseleave","onMouseUp"],[0,"dragstartcell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]],{"selectionStore":["selectionServiceSet"],"dimensionRow":["createAutoFillService"],"dimensionCol":["createAutoFillService"],"dataStore":["columnServiceSet"],"colData":["columnServiceSet"]}],[0,"revogr-attribution"],[4,"revogr-focus",{"colType":[1,"col-type"],"rowType":[1,"row-type"],"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16],"dataStore":[16],"colData":[16],"focusTemplate":[16]}],[0,"revogr-scroll-virtual",{"dimension":[1],"viewportStore":[16],"dimensionStore":[16],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-extra",{"nodes":[16],"update":[32],"refresh":[64]}]]]], options);
26
26
  });
27
27
 
28
28
  exports.setNonce = index.setNonce;
@@ -65,6 +65,7 @@ const FilterPanel = class {
65
65
  this.filterEntities = {};
66
66
  this.filterCaptions = undefined;
67
67
  this.disableDynamicFiltering = false;
68
+ this.extraContent = undefined;
68
69
  }
69
70
  onMouseDown(e) {
70
71
  // click on anything then select drops values to default
@@ -300,6 +301,7 @@ const FilterPanel = class {
300
301
  return (index.h("input", { id: `filter-input-${currentFilter[index$1].id}`, placeholder: capts.placeholder, type: "text", value: currentFilter[index$1].value, onInput: this.onUserInput.bind(this, index$1, prop), onKeyDown: e => this.onKeyDown(e) }));
301
302
  }
302
303
  render() {
304
+ var _a;
303
305
  if (!this.changes) {
304
306
  return index.h(index.Host, { style: { display: 'none' } });
305
307
  }
@@ -312,7 +314,8 @@ const FilterPanel = class {
312
314
  return (index.h(index.Host, { style: style, ref: el => {
313
315
  var _a;
314
316
  ((_a = this.changes) === null || _a === void 0 ? void 0 : _a.autoCorrect) && this.autoCorrect(el);
315
- } }, index.h("slot", { slot: "header" }), index.h("label", null, capts.title), index.h("div", { class: "filter-holder" }, this.getFilterItemsList()), index.h("div", { class: "add-filter" }, index.h("select", { id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))), index.h("slot", null), index.h("div", { class: "filter-actions" }, this.disableDynamicFiltering && [
317
+ } }, index.h("slot", { slot: "header" }), (_a = this.extraContent) === null || _a === void 0 ? void 0 :
318
+ _a.call(this, index.h, this.changes), index.h("label", null, capts.title), index.h("div", { class: "filter-holder" }, this.getFilterItemsList()), index.h("div", { class: "add-filter" }, index.h("select", { id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))), index.h("slot", null), index.h("div", { class: "filter-actions" }, this.disableDynamicFiltering && [
316
319
  index.h("button", { id: "revo-button-save", "aria-label": "save", class: "revo-button green", onClick: () => this.onSave() }, capts.save),
317
320
  index.h("button", { id: "revo-button-ok", "aria-label": "ok", class: "revo-button green", onClick: () => this.onCancel() }, capts.cancel),
318
321
  ], !this.disableDynamicFiltering && [
@@ -1 +1 @@
1
- {"file":"revogr-filter-panel.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,CAAC,SAAS,OAAO;IACf,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE;QAC9B,OAAO,CAAC,SAAS,CAAC,OAAO;YACrB,OAAO,CAAC,SAA+E,CAAC,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;KAC1J;IAED,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE;QAC9B,OAAO,CAAC,SAAS,CAAC,OAAO,GAAG,UAAU,CAAS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,mBAAmB,EACzB,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,IAE7B,KAAK,CAAC,MAAM,CACN;SACV,EACA,CAAC,IAAI,CAAC,uBAAuB,IAAI;YAChCA,oBACE,EAAE,EAAC,gBAAgB,gBACR,IAAI,EACf,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,IAE7B,KAAK,CAAC,EAAE,CACF;YAETA,oBACE,EAAE,EAAC,mBAAmB,gBACX,OAAO,EAClB,KAAK,EAAC,qBAAqB,EAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,IAE5B,KAAK,CAAC,KAAK,CACL;SACV,CACG,EACNA,kBAAM,IAAI,EAAC,QAAQ,GAAG,CACjB,EACP;KACH;;;;;;;","names":["debounce","isFilterBtn","h","index","AndOrButton","TrashButton","Host"],"sources":["src/utils/closest.polifill.ts","src/plugins/filter/filter.style.scss?tag=revogr-filter-panel","src/plugins/filter/filter.panel.tsx"],"sourcesContent":["(function closest() {\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n ((Element.prototype as unknown) as { msMatchesSelector: (selectors: string) => boolean }).msMatchesSelector || Element.prototype.webkitMatchesSelector;\n }\n\n if (!Element.prototype.closest) {\n Element.prototype.closest = function (s: string) {\n let el: HTMLElement | Element | (Node & ParentNode) | null = this;\n\n do {\n if (Element.prototype.matches.call(el, s)) {\n return el;\n }\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n };\n }\n})();\n","revogr-filter-panel {\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n z-index: 100;\n max-height: calc(100% - 80px);\n min-width: 250px;\n overflow: auto;\n\n opacity: 1;\n transform: none;\n background-color: #fff;\n transform-origin: 62px 0px;\n box-shadow: 0 5px 18px -2px rgba(black, 20%);\n padding: 10px;\n border-radius: 4px;\n\n min-width: 220px;\n text-align: left;\n\n .filter-holder > div {\n display: flex;\n flex-direction: column;\n }\n\n label {\n font-size: 13px;\n display: block;\n padding: 8px 0;\n }\n\n select {\n width: 100%;\n }\n\n input[type='text'] {\n border: 0;\n min-height: 34px;\n margin: 5px 0;\n background: #f3f3f3;\n border-radius: 5px;\n padding: 0 10px;\n box-sizing: border-box;\n width: 100%;\n }\n\n button {\n margin-top: 10px;\n margin-right: 5px;\n }\n\n .filter-actions {\n text-align: right;\n margin-right: -5px;\n }\n}\n\n.rgHeaderCell {\n &:hover .rv-filter {\n transition:\n opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n &:hover .rv-filter,\n .rv-filter.active {\n opacity: 1;\n }\n\n .rv-filter {\n $btn-size: 24px;\n height: $btn-size;\n width: $btn-size;\n background: none;\n border: 0;\n opacity: 0;\n visibility: visible;\n cursor: pointer;\n border-radius: 4px;\n\n &.active {\n color: #10224a;\n }\n\n .filter-img {\n $img-size: 11px;\n color: gray;\n width: $img-size;\n }\n }\n}\n\n.select-css {\n $gradient: 'data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E';\n $linearGradient: linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n $borderColor: #f1f1f1;\n\n display: block;\n font-family: sans-serif;\n font-weight: 600;\n color: #444;\n line-height: 1.3;\n padding: 0.6em 1.4em 0.5em 0.8em;\n width: 100%;\n max-width: 100%; /* useful when width is set to anything other than 100% */\n box-sizing: border-box;\n margin: 0;\n border: 1px solid $borderColor;\n box-shadow: transparent;\n border-radius: 0.5em;\n appearance: none;\n background-color: #fff;\n background-image: url($gradient), $linearGradient;\n background-repeat: no-repeat, repeat;\n /* arrow icon position (1em from the right, 50% vertical) , then gradient position*/\n background-position:\n right 0.7em top 50%,\n 0 0;\n /* icon size, then gradient */\n background-size:\n 0.65em auto,\n 100%;\n\n /* Hide arrow icon in IE browsers */\n &::-ms-expand {\n display: none;\n }\n /* Hover style */\n &:hover {\n border-color: rgb(197, 197, 197);\n }\n /* Focus style */\n &:focus {\n border-color: $borderColor;\n box-shadow: 0 0 1px 3px rgba(59, 153, 252, 0.7);\n box-shadow: 0 0 0 3px -moz-mac-focusring;\n color: #222;\n outline: none;\n }\n\n /* Set options to normal weight */\n option {\n font-weight: normal;\n }\n\n /* Disabled styles */\n &:disabled,\n &[aria-disabled='true'] {\n color: gray;\n background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'),\n linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n }\n\n &:disabled:hover,\n &[aria-disabled='true'] {\n border-color: $borderColor;\n }\n}\n\n.multi-filter-list {\n margin-top: 5px;\n margin-bottom: 5px;\n\n div {\n white-space: nowrap;\n }\n\n .multi-filter-list-action {\n display: flex;\n\n justify-content: space-between;\n align-items: center;\n }\n\n .and-or-button {\n margin: 0 0 0 10px;\n min-width: 58px;\n cursor: pointer;\n }\n .trash-button {\n $btn-remove-size: 22px;\n margin: 0 0 -2px 6px;\n cursor: pointer;\n\n width: $btn-remove-size;\n height: 100%;\n font-size: 16px;\n\n .trash-img {\n width: 1em;\n }\n }\n}\n\n.add-filter-divider {\n display: block;\n margin: 0 -10px 10px -10px;\n\n border-bottom: 1px solid #d9d9d9;\n height: 10px;\n}\n\n.select-input {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\nrevo-grid[theme^='dark'] {\n revogr-filter-panel {\n background-color: $el-color-dark;\n\n .add-filter-divider {\n border-bottom-color: $el-color-dark;\n }\n\n input[type=text] {\n background-color: $font-color-dark;\n color: black;\n }\n }\n}","import {\n h,\n Component,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n type VNode,\n Element,\n} from '@stencil/core';\nimport debounce from 'lodash/debounce';\n\nimport { AndOrButton, isFilterBtn, TrashButton } from './filter.button';\nimport '../../utils/closest.polifill';\nimport {\n FilterCaptions,\n LogicFunction,\n MultiFilterItem,\n ShowData,\n} from './filter.types';\nimport { ColumnProp } from '@type';\nimport { FilterType } from './filter.indexed';\n\nconst defaultType: FilterType = 'none';\n\nconst FILTER_LIST_CLASS = 'multi-filter-list';\nconst FILTER_LIST_CLASS_ACTION = 'multi-filter-list-action';\nconst FILTER_ID = 'add-filter';\n\n/**\n * Filter panel for editing filters\n */\n/**\n * @internal\n */\n@Component({\n tag: 'revogr-filter-panel',\n styleUrl: 'filter.style.scss',\n})\nexport class FilterPanel {\n private filterCaptionsInternal: FilterCaptions = {\n title: 'Filter by',\n ok: 'Ok',\n save: 'Save',\n // drops the filter\n reset: 'Reset',\n cancel: 'Cancel',\n add: 'Add more condition...',\n placeholder: 'Enter value...',\n and: 'and',\n or: 'or',\n };\n\n @Element() element!: HTMLElement;\n @State() isFilterIdSet = false;\n @State() filterId = 0;\n @State() currentFilterId = -1;\n @State() currentFilterType: FilterType = defaultType;\n @State() changes: ShowData | undefined;\n @State() filterItems: MultiFilterItem = {};\n @Prop() filterNames: Record<string, string> = {};\n @Prop() filterEntities: Record<string, LogicFunction> = {};\n @Prop() filterCaptions: FilterCaptions | undefined;\n /**\n * Disables dynamic filtering. A way to apply filters on Save only\n */\n @Prop() disableDynamicFiltering = false;\n\n @Event() filterChange: EventEmitter<MultiFilterItem>;\n @Event() resetChange: EventEmitter<ColumnProp>;\n\n @Listen('mousedown', { target: 'document' }) onMouseDown(e: MouseEvent) {\n // click on anything then select drops values to default\n if (!this.changes || e.defaultPrevented) {\n return;\n }\n const path = e.composedPath();\n const select = document.getElementById(FILTER_ID);\n if (select instanceof HTMLSelectElement) {\n // click on select should be skipped\n if (path.includes(select)) {\n return;\n }\n select.value = defaultType;\n }\n this.currentFilterType = defaultType;\n if (this.changes) {\n this.changes.type = defaultType;\n }\n this.currentFilterId = -1;\n\n const isOutside = !path.includes(this.element);\n\n if (\n e.target instanceof HTMLElement &&\n isOutside &&\n !isFilterBtn(e.target)\n ) {\n this.changes = undefined;\n }\n }\n\n @Method() async show(newEntity?: ShowData) {\n this.changes = newEntity;\n this.filterItems = newEntity?.filterItems || {};\n if (this.changes) {\n this.changes.type = this.changes.type || defaultType;\n }\n }\n\n @Method() async getChanges() {\n return this.changes;\n }\n\n componentWillRender() {\n if (!this.isFilterIdSet) {\n this.isFilterIdSet = true;\n const filterItems = Object.keys(this.filterItems);\n for (const prop of filterItems) {\n // we set the proper filterId so there won't be any conflict when removing filters\n this.filterId += this.filterItems[prop].length;\n }\n }\n }\n\n getFilterItemsList() {\n const prop = this.changes?.prop;\n if (typeof prop === 'undefined') return '';\n\n const propFilters = this.filterItems[prop]?.filter(f => !f.hidden) || [];\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n return (\n <div key={this.filterId}>\n {propFilters.map((filter, index) => {\n let andOrButton;\n\n // hide toggle button if there is only one filter and the last one\n if (index !== this.filterItems[prop].length - 1) {\n andOrButton = (\n <div onClick={() => this.toggleFilterAndOr(filter.id)}>\n <AndOrButton\n text={filter.relation === 'and' ? capts.and : capts.or}\n />\n </div>\n );\n }\n\n return (\n <div key={filter.id} class={FILTER_LIST_CLASS}>\n <div class={{ 'select-input': true }}>\n <select\n class=\"select-css select-filter\"\n onChange={e => this.onFilterTypeChange(e, prop, index)}\n >\n {this.renderSelectOptions(\n this.filterItems[prop][index].type,\n true,\n )}\n </select>\n <div class={FILTER_LIST_CLASS_ACTION}>{andOrButton}</div>\n <div onClick={() => this.onRemoveFilter(filter.id)}>\n <TrashButton />\n </div>\n </div>\n <div>{this.renderExtra(prop, index)}</div>\n </div>\n );\n })}\n\n {propFilters.length > 0 ? <div class=\"add-filter-divider\" /> : ''}\n </div>\n );\n }\n\n private autoCorrect(el?: HTMLElement | null) {\n if (!el) {\n return;\n }\n const pos = el.getBoundingClientRect();\n const maxLeft = window.innerWidth - pos.width;\n\n if (pos.left > maxLeft && el.offsetLeft) {\n el.style.left = `${maxLeft - (el.parentElement?.getBoundingClientRect().left ?? 0)}px`;\n }\n }\n\n private onFilterTypeChange(e: Event, prop: ColumnProp, index: number) {\n if (!(e.target instanceof HTMLSelectElement)) {\n return;\n }\n this.filterItems[prop][index].type = e.target.value as FilterType;\n\n // this re-renders the input to know if we need extra input\n this.filterId++;\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById(\n 'filter-input-' + this.filterItems[prop][index].id,\n );\n if (input instanceof HTMLInputElement) {\n input.focus();\n }\n }, 0);\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private debouncedApplyFilter = debounce(() => {\n this.filterChange.emit(this.filterItems);\n }, 400);\n\n private onAddNewFilter(e: Event) {\n const el = e.target as HTMLSelectElement;\n this.currentFilterType = el.value as FilterType;\n this.addNewFilterToProp();\n\n // reset value after adding new filter\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n }\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private addNewFilterToProp() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return;\n\n if (!this.filterItems[prop]) {\n this.filterItems[prop] = [];\n }\n\n if (this.currentFilterType === 'none') return;\n\n this.filterId++;\n this.currentFilterId = this.filterId;\n\n this.filterItems[prop].push({\n id: this.currentFilterId,\n type: this.currentFilterType,\n value: '',\n relation: 'and',\n });\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById(\n 'filter-input-' + this.currentFilterId,\n ) as HTMLInputElement;\n if (input) input.focus();\n }, 0);\n }\n\n private onUserInput(index: number, prop: ColumnProp, event: Event) {\n // update the value of the filter item\n this.filterItems[prop][index].value = (\n event.target as HTMLInputElement\n ).value;\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private onKeyDown(e: KeyboardEvent) {\n if (e.key.toLowerCase() === 'enter') {\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n this.addNewFilterToProp();\n select.focus();\n }\n return;\n }\n // keep event local, don't escalate farther to dom\n e.stopPropagation();\n }\n\n private onSave() {\n this.filterChange.emit(this.filterItems);\n }\n\n private onCancel() {\n this.changes = undefined;\n }\n\n private onReset() {\n this.assertChanges();\n\n this.resetChange.emit(this.changes?.prop);\n\n // this updates the DOM which is used by getFilterItemsList() key\n this.filterId++;\n }\n\n private onRemoveFilter(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n items.splice(index, 1);\n\n // let's remove the prop if no more filters so the filter icon will be removed\n if (items.length === 0) delete this.filterItems[prop ?? ''];\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private toggleFilterAndOr(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n\n items[index].relation = items[index].relation === 'and' ? 'or' : 'and';\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private assertChanges() {\n if (!this.changes) {\n throw new Error('Changes required per edit');\n }\n }\n\n renderSelectOptions(type: FilterType, isDefaultTypeRemoved = false) {\n if (!this.changes) {\n return;\n }\n const options: VNode[] = [];\n const prop = this.changes.prop;\n\n if (!isDefaultTypeRemoved) {\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n options.push(\n <option\n selected={this.currentFilterType === defaultType}\n value={defaultType}\n >\n {prop && this.filterItems[prop] && this.filterItems[prop].length > 0\n ? capts.add\n : this.filterNames[defaultType]}\n </option>,\n );\n }\n\n for (let gIndex in this.changes.filterTypes) {\n options.push(\n ...this.changes.filterTypes[gIndex].map(k => (\n <option value={k} selected={type === k}>\n {this.filterNames[k]}\n </option>\n )),\n );\n options.push(<option disabled></option>);\n }\n return options;\n }\n\n renderExtra(prop: ColumnProp, index: number) {\n const currentFilter = this.filterItems[prop];\n\n if (!currentFilter) return '';\n\n if (this.filterEntities[currentFilter[index].type].extra !== 'input')\n return '';\n\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n return (\n <input\n id={`filter-input-${currentFilter[index].id}`}\n placeholder={capts.placeholder}\n type=\"text\"\n value={currentFilter[index].value}\n onInput={this.onUserInput.bind(this, index, prop)}\n onKeyDown={e => this.onKeyDown(e)}\n />\n );\n }\n\n render() {\n if (!this.changes) {\n return <Host style={{ display: 'none' }}></Host>;\n }\n const style = {\n display: 'block',\n left: `${this.changes.x}px`,\n top: `${this.changes.y}px`,\n };\n\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n return (\n <Host\n style={style}\n ref={el => {\n this.changes?.autoCorrect && this.autoCorrect(el);\n }}\n >\n <slot slot=\"header\" />\n <label>{capts.title}</label>\n <div class=\"filter-holder\">{this.getFilterItemsList()}</div>\n\n <div class=\"add-filter\">\n <select\n id={FILTER_ID}\n class=\"select-css\"\n onChange={e => this.onAddNewFilter(e)}\n >\n {this.renderSelectOptions(this.currentFilterType)}\n </select>\n </div>\n <slot />\n <div class=\"filter-actions\">\n {this.disableDynamicFiltering && [\n <button\n id=\"revo-button-save\"\n aria-label=\"save\"\n class=\"revo-button green\"\n onClick={() => this.onSave()}\n >\n {capts.save}\n </button>,\n <button\n id=\"revo-button-ok\"\n aria-label=\"ok\"\n class=\"revo-button green\"\n onClick={() => this.onCancel()}\n >\n {capts.cancel}\n </button>,\n ]}\n {!this.disableDynamicFiltering && [\n <button\n id=\"revo-button-ok\"\n aria-label=\"ok\"\n class=\"revo-button green\"\n onClick={() => this.onCancel()}\n >\n {capts.ok}\n </button>,\n\n <button\n id=\"revo-button-reset\"\n aria-label=\"reset\"\n class=\"revo-button outline\"\n onClick={() => this.onReset()}\n >\n {capts.reset}\n </button>,\n ]}\n </div>\n <slot slot=\"footer\" />\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"revogr-filter-panel.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,CAAC,SAAS,OAAO;IACf,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE;QAC9B,OAAO,CAAC,SAAS,CAAC,OAAO;YACrB,OAAO,CAAC,SAA+E,CAAC,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;KAC1J;IAED,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE;QAC9B,OAAO,CAAC,SAAS,CAAC,OAAO,GAAG,UAAU,CAAS;YAC7C,IAAI,EAAE,GAAuD,IAAI,CAAC;YA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BAAgB,gBACR,IAAI,EACf,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,IAE7B,KAAK,CAAC,MAAM,CACN;SACV,EACA,CAAC,IAAI,CAAC,uBAAuB,IAAI;YAChCA,oBACE,EAAE,EAAC,gBAAgB,gBACR,IAAI,EACf,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,IAE7B,KAAK,CAAC,EAAE,CACF;YAETA,oBACE,EAAE,EAAC,mBAAmB,gBACX,OAAO,EAClB,KAAK,EAAC,qBAAqB,EAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,IAE5B,KAAK,CAAC,KAAK,CACL;SACV,CACG,EACNA,kBAAM,IAAI,EAAC,QAAQ,GAAG,CACjB,EACP;KACH;;;;;;;","names":["debounce","isFilterBtn","h","index","AndOrButton","TrashButton","Host"],"sources":["src/utils/closest.polifill.ts","src/plugins/filter/filter.style.scss?tag=revogr-filter-panel","src/plugins/filter/filter.panel.tsx"],"sourcesContent":["(function closest() {\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n ((Element.prototype as unknown) as { msMatchesSelector: (selectors: string) => boolean }).msMatchesSelector || Element.prototype.webkitMatchesSelector;\n }\n\n if (!Element.prototype.closest) {\n Element.prototype.closest = function (s: string) {\n let el: HTMLElement | Element | (Node & ParentNode) | null = this;\n\n do {\n if (Element.prototype.matches.call(el, s)) {\n return el;\n }\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n };\n }\n})();\n","revogr-filter-panel {\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n z-index: 100;\n max-height: calc(100% - 80px);\n min-width: 250px;\n overflow: auto;\n\n opacity: 1;\n transform: none;\n background-color: #fff;\n transform-origin: 62px 0px;\n box-shadow: 0 5px 18px -2px rgba(black, 20%);\n padding: 10px;\n border-radius: 4px;\n\n min-width: 220px;\n text-align: left;\n\n .filter-holder > div {\n display: flex;\n flex-direction: column;\n }\n\n label {\n font-size: 13px;\n display: block;\n padding: 8px 0;\n }\n\n select {\n width: 100%;\n }\n\n input[type='text'] {\n border: 0;\n min-height: 34px;\n margin: 5px 0;\n background: #f3f3f3;\n border-radius: 5px;\n padding: 0 10px;\n box-sizing: border-box;\n width: 100%;\n }\n\n button {\n margin-top: 10px;\n margin-right: 5px;\n }\n\n .filter-actions {\n text-align: right;\n margin-right: -5px;\n }\n}\n\n.rgHeaderCell {\n &:hover .rv-filter {\n transition:\n opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n }\n &:hover .rv-filter,\n .rv-filter.active {\n opacity: 1;\n }\n\n .rv-filter {\n $btn-size: 24px;\n height: $btn-size;\n width: $btn-size;\n background: none;\n border: 0;\n opacity: 0;\n visibility: visible;\n cursor: pointer;\n border-radius: 4px;\n\n &.active {\n color: #10224a;\n }\n\n .filter-img {\n $img-size: 11px;\n color: gray;\n width: $img-size;\n }\n }\n}\n\n.select-css {\n $gradient: 'data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E';\n $linearGradient: linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n $borderColor: #f1f1f1;\n\n display: block;\n font-family: sans-serif;\n font-weight: 600;\n color: #444;\n line-height: 1.3;\n padding: 0.6em 1.4em 0.5em 0.8em;\n width: 100%;\n max-width: 100%; /* useful when width is set to anything other than 100% */\n box-sizing: border-box;\n margin: 0;\n border: 1px solid $borderColor;\n box-shadow: transparent;\n border-radius: 0.5em;\n appearance: none;\n background-color: #fff;\n background-image: url($gradient), $linearGradient;\n background-repeat: no-repeat, repeat;\n /* arrow icon position (1em from the right, 50% vertical) , then gradient position*/\n background-position:\n right 0.7em top 50%,\n 0 0;\n /* icon size, then gradient */\n background-size:\n 0.65em auto,\n 100%;\n\n /* Hide arrow icon in IE browsers */\n &::-ms-expand {\n display: none;\n }\n /* Hover style */\n &:hover {\n border-color: rgb(197, 197, 197);\n }\n /* Focus style */\n &:focus {\n border-color: $borderColor;\n box-shadow: 0 0 1px 3px rgba(59, 153, 252, 0.7);\n box-shadow: 0 0 0 3px -moz-mac-focusring;\n color: #222;\n outline: none;\n }\n\n /* Set options to normal weight */\n option {\n font-weight: normal;\n }\n\n /* Disabled styles */\n &:disabled,\n &[aria-disabled='true'] {\n color: gray;\n background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'),\n linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);\n }\n\n &:disabled:hover,\n &[aria-disabled='true'] {\n border-color: $borderColor;\n }\n}\n\n.multi-filter-list {\n margin-top: 5px;\n margin-bottom: 5px;\n\n div {\n white-space: nowrap;\n }\n\n .multi-filter-list-action {\n display: flex;\n\n justify-content: space-between;\n align-items: center;\n }\n\n .and-or-button {\n margin: 0 0 0 10px;\n min-width: 58px;\n cursor: pointer;\n }\n .trash-button {\n $btn-remove-size: 22px;\n margin: 0 0 -2px 6px;\n cursor: pointer;\n\n width: $btn-remove-size;\n height: 100%;\n font-size: 16px;\n\n .trash-img {\n width: 1em;\n }\n }\n}\n\n.add-filter-divider {\n display: block;\n margin: 0 -10px 10px -10px;\n\n border-bottom: 1px solid #d9d9d9;\n height: 10px;\n}\n\n.select-input {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\nrevo-grid[theme^='dark'] {\n revogr-filter-panel {\n background-color: $el-color-dark;\n\n .add-filter-divider {\n border-bottom-color: $el-color-dark;\n }\n\n input[type=text] {\n background-color: $font-color-dark;\n color: black;\n }\n }\n}","import {\n h,\n Component,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n type VNode,\n Element,\n} from '@stencil/core';\nimport debounce from 'lodash/debounce';\n\nimport { AndOrButton, isFilterBtn, TrashButton } from './filter.button';\nimport '../../utils/closest.polifill';\nimport {\n FilterCaptions,\n LogicFunction,\n MultiFilterItem,\n ShowData,\n} from './filter.types';\nimport { ColumnProp, HyperFunc } from '@type';\nimport { FilterType } from './filter.indexed';\n\nconst defaultType: FilterType = 'none';\n\nconst FILTER_LIST_CLASS = 'multi-filter-list';\nconst FILTER_LIST_CLASS_ACTION = 'multi-filter-list-action';\nconst FILTER_ID = 'add-filter';\n\n/**\n * Filter panel for editing filters\n */\n/**\n * @internal\n */\n@Component({\n tag: 'revogr-filter-panel',\n styleUrl: 'filter.style.scss',\n})\nexport class FilterPanel {\n private filterCaptionsInternal: FilterCaptions = {\n title: 'Filter by',\n ok: 'Ok',\n save: 'Save',\n // drops the filter\n reset: 'Reset',\n cancel: 'Cancel',\n add: 'Add more condition...',\n placeholder: 'Enter value...',\n and: 'and',\n or: 'or',\n };\n\n @Element() element!: HTMLElement;\n @State() isFilterIdSet = false;\n @State() filterId = 0;\n @State() currentFilterId = -1;\n @State() currentFilterType: FilterType = defaultType;\n @State() changes: ShowData | undefined;\n @State() filterItems: MultiFilterItem = {};\n @Prop() filterNames: Record<string, string> = {};\n @Prop() filterEntities: Record<string, LogicFunction> = {};\n @Prop() filterCaptions: FilterCaptions | undefined;\n /**\n * Disables dynamic filtering. A way to apply filters on Save only\n */\n @Prop() disableDynamicFiltering = false;\n\n @Prop() extraContent?: (h: HyperFunc<VNode>, data: ShowData) => VNode | VNode[];\n\n @Event() filterChange: EventEmitter<MultiFilterItem>;\n @Event() resetChange: EventEmitter<ColumnProp>;\n\n @Listen('mousedown', { target: 'document' }) onMouseDown(e: MouseEvent) {\n // click on anything then select drops values to default\n if (!this.changes || e.defaultPrevented) {\n return;\n }\n const path = e.composedPath();\n const select = document.getElementById(FILTER_ID);\n if (select instanceof HTMLSelectElement) {\n // click on select should be skipped\n if (path.includes(select)) {\n return;\n }\n select.value = defaultType;\n }\n this.currentFilterType = defaultType;\n if (this.changes) {\n this.changes.type = defaultType;\n }\n this.currentFilterId = -1;\n\n const isOutside = !path.includes(this.element);\n\n if (\n e.target instanceof HTMLElement &&\n isOutside &&\n !isFilterBtn(e.target)\n ) {\n this.changes = undefined;\n }\n }\n\n @Method() async show(newEntity?: ShowData) {\n this.changes = newEntity;\n this.filterItems = newEntity?.filterItems || {};\n if (this.changes) {\n this.changes.type = this.changes.type || defaultType;\n }\n }\n\n @Method() async getChanges() {\n return this.changes;\n }\n\n componentWillRender() {\n if (!this.isFilterIdSet) {\n this.isFilterIdSet = true;\n const filterItems = Object.keys(this.filterItems);\n for (const prop of filterItems) {\n // we set the proper filterId so there won't be any conflict when removing filters\n this.filterId += this.filterItems[prop].length;\n }\n }\n }\n\n getFilterItemsList() {\n const prop = this.changes?.prop;\n if (typeof prop === 'undefined') return '';\n\n const propFilters = this.filterItems[prop]?.filter(f => !f.hidden) || [];\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n return (\n <div key={this.filterId}>\n {propFilters.map((filter, index) => {\n let andOrButton;\n\n // hide toggle button if there is only one filter and the last one\n if (index !== this.filterItems[prop].length - 1) {\n andOrButton = (\n <div onClick={() => this.toggleFilterAndOr(filter.id)}>\n <AndOrButton\n text={filter.relation === 'and' ? capts.and : capts.or}\n />\n </div>\n );\n }\n\n return (\n <div key={filter.id} class={FILTER_LIST_CLASS}>\n <div class={{ 'select-input': true }}>\n <select\n class=\"select-css select-filter\"\n onChange={e => this.onFilterTypeChange(e, prop, index)}\n >\n {this.renderSelectOptions(\n this.filterItems[prop][index].type,\n true,\n )}\n </select>\n <div class={FILTER_LIST_CLASS_ACTION}>{andOrButton}</div>\n <div onClick={() => this.onRemoveFilter(filter.id)}>\n <TrashButton />\n </div>\n </div>\n <div>{this.renderExtra(prop, index)}</div>\n </div>\n );\n })}\n\n {propFilters.length > 0 ? <div class=\"add-filter-divider\" /> : ''}\n </div>\n );\n }\n\n private autoCorrect(el?: HTMLElement | null) {\n if (!el) {\n return;\n }\n const pos = el.getBoundingClientRect();\n const maxLeft = window.innerWidth - pos.width;\n\n if (pos.left > maxLeft && el.offsetLeft) {\n el.style.left = `${maxLeft - (el.parentElement?.getBoundingClientRect().left ?? 0)}px`;\n }\n }\n\n private onFilterTypeChange(e: Event, prop: ColumnProp, index: number) {\n if (!(e.target instanceof HTMLSelectElement)) {\n return;\n }\n this.filterItems[prop][index].type = e.target.value as FilterType;\n\n // this re-renders the input to know if we need extra input\n this.filterId++;\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById(\n 'filter-input-' + this.filterItems[prop][index].id,\n );\n if (input instanceof HTMLInputElement) {\n input.focus();\n }\n }, 0);\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private debouncedApplyFilter = debounce(() => {\n this.filterChange.emit(this.filterItems);\n }, 400);\n\n private onAddNewFilter(e: Event) {\n const el = e.target as HTMLSelectElement;\n this.currentFilterType = el.value as FilterType;\n this.addNewFilterToProp();\n\n // reset value after adding new filter\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n }\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private addNewFilterToProp() {\n const prop = this.changes?.prop;\n if (!(prop || prop === 0)) return;\n\n if (!this.filterItems[prop]) {\n this.filterItems[prop] = [];\n }\n\n if (this.currentFilterType === 'none') return;\n\n this.filterId++;\n this.currentFilterId = this.filterId;\n\n this.filterItems[prop].push({\n id: this.currentFilterId,\n type: this.currentFilterType,\n value: '',\n relation: 'and',\n });\n\n // adding setTimeout will wait for the next tick DOM update then focus on input\n setTimeout(() => {\n const input = document.getElementById(\n 'filter-input-' + this.currentFilterId,\n ) as HTMLInputElement;\n if (input) input.focus();\n }, 0);\n }\n\n private onUserInput(index: number, prop: ColumnProp, event: Event) {\n // update the value of the filter item\n this.filterItems[prop][index].value = (\n event.target as HTMLInputElement\n ).value;\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private onKeyDown(e: KeyboardEvent) {\n if (e.key.toLowerCase() === 'enter') {\n const select = document.getElementById('add-filter') as HTMLSelectElement;\n if (select) {\n select.value = defaultType;\n this.currentFilterType = defaultType;\n this.addNewFilterToProp();\n select.focus();\n }\n return;\n }\n // keep event local, don't escalate farther to dom\n e.stopPropagation();\n }\n\n private onSave() {\n this.filterChange.emit(this.filterItems);\n }\n\n private onCancel() {\n this.changes = undefined;\n }\n\n private onReset() {\n this.assertChanges();\n\n this.resetChange.emit(this.changes?.prop);\n\n // this updates the DOM which is used by getFilterItemsList() key\n this.filterId++;\n }\n\n private onRemoveFilter(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n items.splice(index, 1);\n\n // let's remove the prop if no more filters so the filter icon will be removed\n if (items.length === 0) delete this.filterItems[prop ?? ''];\n\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private toggleFilterAndOr(id: number) {\n this.assertChanges();\n\n // this is for reactivity issues for getFilterItemsList()\n this.filterId++;\n\n const prop = this.changes?.prop;\n\n const items = this.filterItems[prop ?? ''];\n if (!items) return;\n\n const index = items.findIndex(d => d.id === id);\n if (index === -1) return;\n\n items[index].relation = items[index].relation === 'and' ? 'or' : 'and';\n if (!this.disableDynamicFiltering) {\n this.debouncedApplyFilter();\n }\n }\n\n private assertChanges() {\n if (!this.changes) {\n throw new Error('Changes required per edit');\n }\n }\n\n renderSelectOptions(type: FilterType, isDefaultTypeRemoved = false) {\n if (!this.changes) {\n return;\n }\n const options: VNode[] = [];\n const prop = this.changes.prop;\n\n if (!isDefaultTypeRemoved) {\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n options.push(\n <option\n selected={this.currentFilterType === defaultType}\n value={defaultType}\n >\n {prop && this.filterItems[prop] && this.filterItems[prop].length > 0\n ? capts.add\n : this.filterNames[defaultType]}\n </option>,\n );\n }\n\n for (let gIndex in this.changes.filterTypes) {\n options.push(\n ...this.changes.filterTypes[gIndex].map(k => (\n <option value={k} selected={type === k}>\n {this.filterNames[k]}\n </option>\n )),\n );\n options.push(<option disabled></option>);\n }\n return options;\n }\n\n renderExtra(prop: ColumnProp, index: number) {\n const currentFilter = this.filterItems[prop];\n\n if (!currentFilter) return '';\n\n if (this.filterEntities[currentFilter[index].type].extra !== 'input')\n return '';\n\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n return (\n <input\n id={`filter-input-${currentFilter[index].id}`}\n placeholder={capts.placeholder}\n type=\"text\"\n value={currentFilter[index].value}\n onInput={this.onUserInput.bind(this, index, prop)}\n onKeyDown={e => this.onKeyDown(e)}\n />\n );\n }\n\n render() {\n if (!this.changes) {\n return <Host style={{ display: 'none' }}></Host>;\n }\n const style = {\n display: 'block',\n left: `${this.changes.x}px`,\n top: `${this.changes.y}px`,\n };\n\n const capts = Object.assign(\n this.filterCaptionsInternal,\n this.filterCaptions,\n );\n\n return (\n <Host\n style={style}\n ref={el => {\n this.changes?.autoCorrect && this.autoCorrect(el);\n }}\n >\n <slot slot=\"header\" />\n { this.extraContent?.(h, this.changes) }\n <label>{capts.title}</label>\n <div class=\"filter-holder\">{this.getFilterItemsList()}</div>\n\n <div class=\"add-filter\">\n <select\n id={FILTER_ID}\n class=\"select-css\"\n onChange={e => this.onAddNewFilter(e)}\n >\n {this.renderSelectOptions(this.currentFilterType)}\n </select>\n </div>\n <slot />\n <div class=\"filter-actions\">\n {this.disableDynamicFiltering && [\n <button\n id=\"revo-button-save\"\n aria-label=\"save\"\n class=\"revo-button green\"\n onClick={() => this.onSave()}\n >\n {capts.save}\n </button>,\n <button\n id=\"revo-button-ok\"\n aria-label=\"ok\"\n class=\"revo-button green\"\n onClick={() => this.onCancel()}\n >\n {capts.cancel}\n </button>,\n ]}\n {!this.disableDynamicFiltering && [\n <button\n id=\"revo-button-ok\"\n aria-label=\"ok\"\n class=\"revo-button green\"\n onClick={() => this.onCancel()}\n >\n {capts.ok}\n </button>,\n\n <button\n id=\"revo-button-reset\"\n aria-label=\"reset\"\n class=\"revo-button outline\"\n onClick={() => this.onReset()}\n >\n {capts.reset}\n </button>,\n ]}\n </div>\n <slot slot=\"footer\" />\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1194,7 +1194,7 @@ class FilterPlugin extends BasePlugin {
1194
1194
  const existingNodes = this.revogrid.registerVNode.filter(n => typeof n === 'object' && n.$tag$ !== FILTE_PANEL);
1195
1195
  this.revogrid.registerVNode = [
1196
1196
  ...existingNodes,
1197
- index.h("revogr-filter-panel", { filterNames: this.filterNameIndexByType, filterEntities: this.filterFunctionsIndexedByType, filterCaptions: (_a = config === null || config === void 0 ? void 0 : config.localization) === null || _a === void 0 ? void 0 : _a.captions, onFilterChange: e => this.onFilterChange(e.detail), onResetChange: e => this.onFilterReset(e.detail), disableDynamicFiltering: config === null || config === void 0 ? void 0 : config.disableDynamicFiltering, ref: e => (this.pop = e) },
1197
+ index.h("revogr-filter-panel", { filterNames: this.filterNameIndexByType, filterEntities: this.filterFunctionsIndexedByType, filterCaptions: (_a = config === null || config === void 0 ? void 0 : config.localization) === null || _a === void 0 ? void 0 : _a.captions, onFilterChange: e => this.onFilterChange(e.detail), onResetChange: e => this.onFilterReset(e.detail), disableDynamicFiltering: config === null || config === void 0 ? void 0 : config.disableDynamicFiltering, extraContent: this.extraHyperContent, ref: e => (this.pop = e) },
1198
1198
  " ",
1199
1199
  this.extraContent()),
1200
1200
  ];
@@ -2471,4 +2471,4 @@ exports.isRowType = isRowType;
2471
2471
  exports.isStretchPlugin = isStretchPlugin;
2472
2472
  exports.rowTypes = rowTypes;
2473
2473
 
2474
- //# sourceMappingURL=sorting.plugin-ce48aa99.js.map
2474
+ //# sourceMappingURL=sorting.plugin-ac1d9456.js.map