@revolist/revogrid 4.27.4 → 4.27.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +1 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/revo-grid.cjs.entry.js +1 -1
- package/dist/cjs/revo-grid.cjs.js +1 -1
- package/dist/cjs/revogr-filter-panel.cjs.entry.js +31 -140
- package/dist/cjs/{row-resize.plugin-C4YOF1lN.js → row-resize.plugin-jaZje3kL.js} +4 -53
- package/dist/collection/plugins/filter/filter.indexed.js +0 -5
- package/dist/collection/plugins/filter/filter.panel.js +31 -141
- package/dist/collection/plugins/filter/filter.plugin.js +5 -48
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/revo-grid.entry.js +1 -1
- package/dist/esm/revo-grid.js +1 -1
- package/dist/esm/revogr-filter-panel.entry.js +31 -140
- package/dist/esm/{row-resize.plugin-Beu0pMds.js → row-resize.plugin-Dzn9bTOr.js} +5 -53
- package/dist/revo-grid/index.esm.js +2 -2
- package/dist/revo-grid/revo-grid.entry.js +1 -1
- package/dist/revo-grid/revo-grid.esm.js +1 -1
- package/dist/revo-grid/revogr-filter-panel.entry.js +31 -140
- package/dist/revo-grid/{row-resize.plugin-Beu0pMds.js → row-resize.plugin-Dzn9bTOr.js} +5 -53
- package/dist/types/plugins/filter/filter.indexed.d.ts +0 -2
- package/dist/types/plugins/filter/filter.panel.d.ts +2 -9
- package/dist/types/plugins/filter/filter.plugin.d.ts +1 -8
- package/dist/types/plugins/filter/filter.types.d.ts +0 -8
- package/dist/types/types/interfaces.d.ts +1 -13
- package/hydrate/index.js +35 -193
- package/hydrate/index.mjs +35 -193
- package/package.json +1 -1
- package/standalone/index.js +1 -1
- package/standalone/revo-grid.js +1 -1
- package/standalone/revogr-filter-panel.js +1 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var rowResize_plugin = require('./row-resize.plugin-
|
|
6
|
+
var rowResize_plugin = require('./row-resize.plugin-jaZje3kL.js');
|
|
7
7
|
var column_service = require('./column.service-D-ENzqyb.js');
|
|
8
8
|
var headerCellRenderer = require('./header-cell-renderer-B5Y4fdZC.js');
|
|
9
9
|
var cellRenderer = require('./cell-renderer-BDIx0xys.js');
|
|
@@ -706,7 +706,6 @@ exports.doCollapse = rowResize_plugin.doCollapse;
|
|
|
706
706
|
exports.doExpand = rowResize_plugin.doExpand;
|
|
707
707
|
exports.filterCoreFunctionsIndexedByType = rowResize_plugin.filterCoreFunctionsIndexedByType;
|
|
708
708
|
exports.filterNames = rowResize_plugin.filterNames;
|
|
709
|
-
exports.filterTypeDefaults = rowResize_plugin.filterTypeDefaults;
|
|
710
709
|
exports.filterTypes = rowResize_plugin.filterTypes;
|
|
711
710
|
exports.getColumnDragPosition = rowResize_plugin.getColumnDragPosition;
|
|
712
711
|
exports.getComparer = rowResize_plugin.getComparer;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -9,7 +9,7 @@ var appGlobals = require('./app-globals-Dmf-wvGw.js');
|
|
|
9
9
|
const defineCustomElements = async (win, options) => {
|
|
10
10
|
if (typeof window === 'undefined') return undefined;
|
|
11
11
|
await appGlobals.globalScripts();
|
|
12
|
-
return index.bootstrapLazy([["revo-grid.cjs",[[260,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"resizeRow":[4,"resize-row"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"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],"themeDefinitions":[16],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"sorting":[16],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[16],"disableVirtualX":[4,"disable-virtual-x"],"virtualX":[16],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"rtl":[4],"canDrag":[4,"can-drag"],"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],"getProviders":[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":0}],"columns":[{"columnChanged":0}],"disableVirtualX":[{"disableVirtualXChanged":0}],"virtualX":[{"virtualXChanged":0}],"rowSize":[{"rowSizeChanged":0}],"colSize":[{"colSizeChanged":0}],"theme":[{"themeChanged":0}],"themeDefinitions":[{"themeDefinitionsChanged":0}],"source":[{"dataSourceChanged":0}],"pinnedBottomSource":[{"dataSourceChanged":0}],"pinnedTopSource":[{"dataSourceChanged":0}],"disableVirtualY":[{"disableVirtualYChanged":0}],"rowDefinitions":[{"rowDefChanged":0}],"trimmedRows":[{"trimmedRowsChanged":0}],"grouping":[{"groupingChanged":0}],"stretch":[{"applyStretch":0}],"filter":[{"applyFilter":0}],"sorting":[{"applySorting":0}],"rowHeaders":[{"rowHeadersChange":0}],"resizeRow":[{"resizeRowChanged":0}],"registerVNode":[{"registerOutsideVNodes":0}],"additionalData":[{"additionalDataChanged":0}],"rtl":[{"rtlChanged":0}],"plugins":[{"pluginsChanged":0}]}]]],["revogr-filter-panel.cjs",[[260,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"closeOnOutsideClick":[4,"close-on-outside-click"],"allowDuplicateOperators":[4,"allow-duplicate-operators"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"
|
|
12
|
+
return index.bootstrapLazy([["revo-grid.cjs",[[260,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"resizeRow":[4,"resize-row"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"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],"themeDefinitions":[16],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"sorting":[16],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[16],"disableVirtualX":[4,"disable-virtual-x"],"virtualX":[16],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"rtl":[4],"canDrag":[4,"can-drag"],"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],"getProviders":[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":0}],"columns":[{"columnChanged":0}],"disableVirtualX":[{"disableVirtualXChanged":0}],"virtualX":[{"virtualXChanged":0}],"rowSize":[{"rowSizeChanged":0}],"colSize":[{"colSizeChanged":0}],"theme":[{"themeChanged":0}],"themeDefinitions":[{"themeDefinitionsChanged":0}],"source":[{"dataSourceChanged":0}],"pinnedBottomSource":[{"dataSourceChanged":0}],"pinnedTopSource":[{"dataSourceChanged":0}],"disableVirtualY":[{"disableVirtualYChanged":0}],"rowDefinitions":[{"rowDefChanged":0}],"trimmedRows":[{"trimmedRowsChanged":0}],"grouping":[{"groupingChanged":0}],"stretch":[{"applyStretch":0}],"filter":[{"applyFilter":0}],"sorting":[{"applySorting":0}],"rowHeaders":[{"rowHeadersChange":0}],"resizeRow":[{"resizeRowChanged":0}],"registerVNode":[{"registerOutsideVNodes":0}],"additionalData":[{"additionalDataChanged":0}],"rtl":[{"rtlChanged":0}],"plugins":[{"pluginsChanged":0}]}]]],["revogr-filter-panel.cjs",[[260,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"closeOnOutsideClick":[4,"close-on-outside-click"],"allowDuplicateOperators":[4,"allow-duplicate-operators"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"draggedFilterId":[32],"dragOverFilterId":[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",[[260,"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":0}],"colData":[{"onColDataChange":0}]}],[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"]}],[260,"revogr-viewport-scroll",{"rowHeader":[4,"row-header"],"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"colType":[1,"col-type"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"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]}],[260,"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":0}],"dimensionRow":[{"createAutoFillService":0}],"dimensionCol":[{"createAutoFillService":0}],"dataStore":[{"columnServiceSet":0}],"colData":[{"columnServiceSet":0}]}],[0,"revogr-attribution"],[260,"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],"realSize":[2,"real-size"],"virtualSize":[2,"virtual-size"],"clientSize":[2,"client-size"],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-extra",{"nodes":[16],"update":[32],"refresh":[64]}]]]], options);
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
exports.setNonce = index.setNonce;
|
|
@@ -8,7 +8,7 @@ var column_service = require('./column.service-D-ENzqyb.js');
|
|
|
8
8
|
var dimension_helpers = require('./dimension.helpers-CptesQOZ.js');
|
|
9
9
|
var debounce = require('./debounce-CcpHiH2p.js');
|
|
10
10
|
var viewport_helpers = require('./viewport.helpers-BND76K2j.js');
|
|
11
|
-
var rowResize_plugin = require('./row-resize.plugin-
|
|
11
|
+
var rowResize_plugin = require('./row-resize.plugin-jaZje3kL.js');
|
|
12
12
|
var viewport_store = require('./viewport.store-mhsdi61t.js');
|
|
13
13
|
var index$1 = require('./index-BVESmpqW.js');
|
|
14
14
|
var events = require('./events-DeLDyZlb.js');
|
|
@@ -49,7 +49,7 @@ var patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
49
49
|
|
|
50
50
|
patchBrowser().then(async (options) => {
|
|
51
51
|
await appGlobals.globalScripts();
|
|
52
|
-
return index.bootstrapLazy([["revo-grid.cjs",[[260,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"resizeRow":[4,"resize-row"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"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],"themeDefinitions":[16],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"sorting":[16],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[16],"disableVirtualX":[4,"disable-virtual-x"],"virtualX":[16],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"rtl":[4],"canDrag":[4,"can-drag"],"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],"getProviders":[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":0}],"columns":[{"columnChanged":0}],"disableVirtualX":[{"disableVirtualXChanged":0}],"virtualX":[{"virtualXChanged":0}],"rowSize":[{"rowSizeChanged":0}],"colSize":[{"colSizeChanged":0}],"theme":[{"themeChanged":0}],"themeDefinitions":[{"themeDefinitionsChanged":0}],"source":[{"dataSourceChanged":0}],"pinnedBottomSource":[{"dataSourceChanged":0}],"pinnedTopSource":[{"dataSourceChanged":0}],"disableVirtualY":[{"disableVirtualYChanged":0}],"rowDefinitions":[{"rowDefChanged":0}],"trimmedRows":[{"trimmedRowsChanged":0}],"grouping":[{"groupingChanged":0}],"stretch":[{"applyStretch":0}],"filter":[{"applyFilter":0}],"sorting":[{"applySorting":0}],"rowHeaders":[{"rowHeadersChange":0}],"resizeRow":[{"resizeRowChanged":0}],"registerVNode":[{"registerOutsideVNodes":0}],"additionalData":[{"additionalDataChanged":0}],"rtl":[{"rtlChanged":0}],"plugins":[{"pluginsChanged":0}]}]]],["revogr-filter-panel.cjs",[[260,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"closeOnOutsideClick":[4,"close-on-outside-click"],"allowDuplicateOperators":[4,"allow-duplicate-operators"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"
|
|
52
|
+
return index.bootstrapLazy([["revo-grid.cjs",[[260,"revo-grid",{"rowHeaders":[4,"row-headers"],"frameSize":[2,"frame-size"],"rowSize":[2,"row-size"],"colSize":[2,"col-size"],"range":[4],"readonly":[4],"resize":[4],"resizeRow":[4,"resize-row"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"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],"themeDefinitions":[16],"rowClass":[513,"row-class"],"autoSizeColumn":[4,"auto-size-column"],"filter":[4],"sorting":[16],"focusTemplate":[16],"canMoveColumns":[4,"can-move-columns"],"trimmedRows":[16],"exporting":[4],"grouping":[16],"stretch":[8],"additionalData":[16],"disableVirtualX":[4,"disable-virtual-x"],"virtualX":[16],"disableVirtualY":[4,"disable-virtual-y"],"hideAttribution":[4,"hide-attribution"],"jobsBeforeRender":[16],"registerVNode":[16],"accessible":[4],"rtl":[4],"canDrag":[4,"can-drag"],"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],"getProviders":[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":0}],"columns":[{"columnChanged":0}],"disableVirtualX":[{"disableVirtualXChanged":0}],"virtualX":[{"virtualXChanged":0}],"rowSize":[{"rowSizeChanged":0}],"colSize":[{"colSizeChanged":0}],"theme":[{"themeChanged":0}],"themeDefinitions":[{"themeDefinitionsChanged":0}],"source":[{"dataSourceChanged":0}],"pinnedBottomSource":[{"dataSourceChanged":0}],"pinnedTopSource":[{"dataSourceChanged":0}],"disableVirtualY":[{"disableVirtualYChanged":0}],"rowDefinitions":[{"rowDefChanged":0}],"trimmedRows":[{"trimmedRowsChanged":0}],"grouping":[{"groupingChanged":0}],"stretch":[{"applyStretch":0}],"filter":[{"applyFilter":0}],"sorting":[{"applySorting":0}],"rowHeaders":[{"rowHeadersChange":0}],"resizeRow":[{"resizeRowChanged":0}],"registerVNode":[{"registerOutsideVNodes":0}],"additionalData":[{"additionalDataChanged":0}],"rtl":[{"rtlChanged":0}],"plugins":[{"pluginsChanged":0}]}]]],["revogr-filter-panel.cjs",[[260,"revogr-filter-panel",{"filterNames":[16],"filterEntities":[16],"filterCaptions":[16],"disableDynamicFiltering":[4,"disable-dynamic-filtering"],"closeOnOutsideClick":[4,"close-on-outside-click"],"allowDuplicateOperators":[4,"allow-duplicate-operators"],"isFilterIdSet":[32],"filterId":[32],"currentFilterId":[32],"currentFilterType":[32],"changes":[32],"filterItems":[32],"draggedFilterId":[32],"dragOverFilterId":[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",[[260,"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":0}],"colData":[{"onColDataChange":0}]}],[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"]}],[260,"revogr-viewport-scroll",{"rowHeader":[4,"row-header"],"contentWidth":[2,"content-width"],"contentHeight":[2,"content-height"],"colType":[1,"col-type"],"noHorizontalScrollTransfer":[4,"no-horizontal-scroll-transfer"],"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]}],[260,"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":0}],"dimensionRow":[{"createAutoFillService":0}],"dimensionCol":[{"createAutoFillService":0}],"dataStore":[{"columnServiceSet":0}],"colData":[{"columnServiceSet":0}]}],[0,"revogr-attribution"],[260,"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],"realSize":[2,"real-size"],"virtualSize":[2,"virtual-size"],"clientSize":[2,"client-size"],"setScroll":[64],"changeScroll":[64]}],[0,"revogr-temp-range",{"selectionStore":[16],"dimensionRow":[16],"dimensionCol":[16]}],[0,"revogr-extra",{"nodes":[16],"update":[32],"refresh":[64]}]]]], options);
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
exports.setNonce = index.setNonce;
|
|
@@ -80,7 +80,6 @@ const FilterPanel = class {
|
|
|
80
80
|
index.registerInstance(this, hostRef);
|
|
81
81
|
this.filterChange = index.createEvent(this, "filterChange", 7);
|
|
82
82
|
this.resetChange = index.createEvent(this, "resetChange", 7);
|
|
83
|
-
this.hasChanges = false;
|
|
84
83
|
this.filterCaptionsInternal = {
|
|
85
84
|
title: 'Filter by',
|
|
86
85
|
ok: 'Close',
|
|
@@ -116,7 +115,7 @@ const FilterPanel = class {
|
|
|
116
115
|
*/
|
|
117
116
|
this.allowDuplicateOperators = true;
|
|
118
117
|
this.debouncedApplyFilter = debounce.debounce(() => {
|
|
119
|
-
this.
|
|
118
|
+
this.filterChange.emit(this.filterItems);
|
|
120
119
|
}, 400);
|
|
121
120
|
}
|
|
122
121
|
onMouseDown(e) {
|
|
@@ -146,28 +145,10 @@ const FilterPanel = class {
|
|
|
146
145
|
}
|
|
147
146
|
}
|
|
148
147
|
async show(newEntity) {
|
|
149
|
-
this.debouncedApplyFilter.flush();
|
|
150
|
-
this.hasChanges = false;
|
|
151
148
|
this.changes = newEntity;
|
|
152
|
-
this.filterItems =
|
|
153
|
-
this.draftFilter = undefined;
|
|
149
|
+
this.filterItems = (newEntity === null || newEntity === void 0 ? void 0 : newEntity.filterItems) || {};
|
|
154
150
|
if (this.changes) {
|
|
155
151
|
this.changes.type = this.changes.type || defaultType;
|
|
156
|
-
const prop = this.changes.prop;
|
|
157
|
-
const propFilters = prop === undefined ? undefined : this.filterItems[prop];
|
|
158
|
-
if (!(propFilters === null || propFilters === void 0 ? void 0 : propFilters.length) &&
|
|
159
|
-
this.changes.showDefaultFilter !== false &&
|
|
160
|
-
this.changes.hideDefaultFilters !== true) {
|
|
161
|
-
const type = this.resolveDraftFilterType(this.changes.defaultFilterType);
|
|
162
|
-
if (type) {
|
|
163
|
-
this.draftFilter = {
|
|
164
|
-
id: ++this.filterId,
|
|
165
|
-
type,
|
|
166
|
-
value: '',
|
|
167
|
-
relation: 'and',
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
152
|
}
|
|
172
153
|
}
|
|
173
154
|
async getChanges() {
|
|
@@ -188,42 +169,29 @@ const FilterPanel = class {
|
|
|
188
169
|
const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
|
|
189
170
|
if (prop === undefined)
|
|
190
171
|
return '';
|
|
191
|
-
const propFilters = (
|
|
192
|
-
|
|
193
|
-
index,
|
|
194
|
-
isDraft: false,
|
|
195
|
-
}));
|
|
196
|
-
if (this.draftFilter) {
|
|
197
|
-
propFilters.push({
|
|
198
|
-
filter: this.draftFilter,
|
|
199
|
-
index: propFilters.length,
|
|
200
|
-
isDraft: true,
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
const visibleFilters = propFilters.filter(({ filter }) => !filter.hidden);
|
|
204
|
-
const visibleFilterCount = visibleFilters.length;
|
|
172
|
+
const propFilters = (_b = this.filterItems[prop]) !== null && _b !== void 0 ? _b : [];
|
|
173
|
+
const visibleFilterCount = propFilters.filter(filter => !filter.hidden).length;
|
|
205
174
|
const capts = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
|
|
206
|
-
return (index.h("div", { key: this.filterId }, index.h("ul", { class: "multi-filter-list-container" }, propFilters.map((
|
|
207
|
-
var _a;
|
|
175
|
+
return (index.h("div", { key: this.filterId }, index.h("ul", { class: "multi-filter-list-container" }, propFilters.map((filter, index$1) => {
|
|
208
176
|
let andOrButton;
|
|
209
177
|
if (filter.hidden) {
|
|
210
178
|
return;
|
|
211
179
|
}
|
|
212
180
|
// hide toggle button if there is only one filter and the last one
|
|
213
|
-
if (
|
|
181
|
+
if (index$1 !== this.filterItems[prop].length - 1) {
|
|
214
182
|
andOrButton = (index.h(filter_button.AndOrButton, { text: filter.relation === 'and' ? capts.and : capts.or, onClick: () => this.toggleFilterAndOr(filter.id) }));
|
|
215
183
|
}
|
|
216
|
-
const extra = this.renderExtra(prop, index$1
|
|
184
|
+
const extra = this.renderExtra(prop, index$1);
|
|
217
185
|
const isDragging = this.draggedFilterId === filter.id;
|
|
218
186
|
const isDragOver = this.dragOverFilterId === filter.id && !isDragging;
|
|
219
|
-
const canReorder = visibleFilterCount > 1
|
|
187
|
+
const canReorder = visibleFilterCount > 1;
|
|
220
188
|
return (index.h("li", { key: filter.id, class: FILTER_LIST_CLASS, "aria-label": `${capts.filterCondition} ${index$1 + 1}` }, index.h("div", { class: {
|
|
221
189
|
'multi-filter-list-row': true,
|
|
222
190
|
'filter-row-drop-active': this.draggedFilterId !== undefined && !isDragging,
|
|
223
191
|
'filter-row-dragging': isDragging,
|
|
224
192
|
'filter-row-drag-over': isDragOver,
|
|
225
|
-
} }, canReorder ? (index.h("button", { type: "button", class: "filter-row-drop-target", tabIndex: -1, "aria-label": `${capts.filterCondition} ${index$1 + 1}`, onDragOver: e => this.onFilterDragOver(e, filter.id), onDragLeave: () => this.onFilterDragLeave(filter.id), onDrop: e => this.onFilterDrop(e, prop, filter.id) })) : '', canReorder ? (index.h(filter_button.ReorderButton, { ariaLabel: capts.reorderFilter, dragging: isDragging, dragOver: isDragOver, onDragStart: e => this.onFilterDragStart(e, filter.id), onDragEnd: () => this.onFilterDragEnd(), onKeyDown: e => this.onFilterReorderKeyDown(e, prop, filter.id) })) : '', index.h("div", { class: { 'select-input': true } }, index.h("select", { class: "select-css select-filter", onChange: e => this.onFilterTypeChange(e, prop, index$1
|
|
226
|
-
})),
|
|
193
|
+
} }, canReorder ? (index.h("button", { type: "button", class: "filter-row-drop-target", tabIndex: -1, "aria-label": `${capts.filterCondition} ${index$1 + 1}`, onDragOver: e => this.onFilterDragOver(e, filter.id), onDragLeave: () => this.onFilterDragLeave(filter.id), onDrop: e => this.onFilterDrop(e, prop, filter.id) })) : '', canReorder ? (index.h(filter_button.ReorderButton, { ariaLabel: capts.reorderFilter, dragging: isDragging, dragOver: isDragOver, onDragStart: e => this.onFilterDragStart(e, filter.id), onDragEnd: () => this.onFilterDragEnd(), onKeyDown: e => this.onFilterReorderKeyDown(e, prop, filter.id) })) : '', index.h("div", { class: { 'select-input': true } }, index.h("select", { class: "select-css select-filter", onChange: e => this.onFilterTypeChange(e, prop, index$1) }, this.renderSelectOptions(this.filterItems[prop][index$1].type, true)), extra ? index.h("div", { class: "filter-extra" }, extra) : ''), index.h("div", { class: FILTER_LIST_CLASS_ACTION }, andOrButton, index.h(filter_button.TrashButton, { ariaLabel: capts.removeFilter, onClick: () => this.onRemoveFilter(filter.id) })))));
|
|
194
|
+
})), propFilters.some(f => !f.hidden) ? index.h("div", { class: "add-filter-divider" }) : ''));
|
|
227
195
|
}
|
|
228
196
|
componentDidRender() {
|
|
229
197
|
this.syncDialog();
|
|
@@ -272,24 +240,16 @@ const FilterPanel = class {
|
|
|
272
240
|
el.style.left = `${left}px`;
|
|
273
241
|
el.style.top = `${top}px`;
|
|
274
242
|
}
|
|
275
|
-
onFilterTypeChange(e, prop, index
|
|
243
|
+
onFilterTypeChange(e, prop, index) {
|
|
276
244
|
if (!(e.target instanceof HTMLSelectElement)) {
|
|
277
245
|
return;
|
|
278
246
|
}
|
|
279
|
-
|
|
280
|
-
const filter = isDraft
|
|
281
|
-
? this.promoteDraft(prop, type)
|
|
282
|
-
: this.filterItems[prop][index];
|
|
283
|
-
if (!filter) {
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
filter.type = type;
|
|
287
|
-
this.hasChanges = true;
|
|
247
|
+
this.filterItems[prop][index].type = e.target.value;
|
|
288
248
|
// this re-renders the input to know if we need extra input
|
|
289
249
|
this.filterId++;
|
|
290
250
|
// adding setTimeout will wait for the next tick DOM update then focus on input
|
|
291
251
|
setTimeout(() => {
|
|
292
|
-
const input = document.getElementById('filter-input-' +
|
|
252
|
+
const input = document.getElementById('filter-input-' + this.filterItems[prop][index].id);
|
|
293
253
|
if (input instanceof HTMLInputElement) {
|
|
294
254
|
input.focus();
|
|
295
255
|
}
|
|
@@ -324,20 +284,12 @@ const FilterPanel = class {
|
|
|
324
284
|
return;
|
|
325
285
|
this.filterId++;
|
|
326
286
|
this.currentFilterId = this.filterId;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
this.filterItems[prop].push({
|
|
334
|
-
id: this.currentFilterId,
|
|
335
|
-
type: this.currentFilterType,
|
|
336
|
-
value: '',
|
|
337
|
-
relation: 'and',
|
|
338
|
-
});
|
|
339
|
-
this.hasChanges = true;
|
|
340
|
-
}
|
|
287
|
+
this.filterItems[prop].push({
|
|
288
|
+
id: this.currentFilterId,
|
|
289
|
+
type: this.currentFilterType,
|
|
290
|
+
value: '',
|
|
291
|
+
relation: 'and',
|
|
292
|
+
});
|
|
341
293
|
// adding setTimeout will wait for the next tick DOM update then focus on input
|
|
342
294
|
setTimeout(() => {
|
|
343
295
|
const input = document.getElementById('filter-input-' + this.currentFilterId);
|
|
@@ -346,9 +298,7 @@ const FilterPanel = class {
|
|
|
346
298
|
}, 0);
|
|
347
299
|
}
|
|
348
300
|
onSave() {
|
|
349
|
-
|
|
350
|
-
this.emitFilterChange();
|
|
351
|
-
}
|
|
301
|
+
this.filterChange.emit(this.filterItems);
|
|
352
302
|
}
|
|
353
303
|
onCancel() {
|
|
354
304
|
this.changes = undefined;
|
|
@@ -356,25 +306,16 @@ const FilterPanel = class {
|
|
|
356
306
|
onReset() {
|
|
357
307
|
var _a;
|
|
358
308
|
this.assertChanges();
|
|
359
|
-
this.
|
|
360
|
-
const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
|
|
361
|
-
if (prop !== undefined) {
|
|
362
|
-
delete this.filterItems[prop];
|
|
363
|
-
}
|
|
364
|
-
this.resetChange.emit(prop);
|
|
309
|
+
this.resetChange.emit((_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop);
|
|
365
310
|
// this updates the DOM which is used by getFilterItemsList() key
|
|
366
311
|
this.filterId++;
|
|
367
312
|
}
|
|
368
313
|
onRemoveFilter(id) {
|
|
369
|
-
var _a
|
|
314
|
+
var _a;
|
|
370
315
|
this.assertChanges();
|
|
371
316
|
// this is for reactivity issues for getFilterItemsList()
|
|
372
317
|
this.filterId++;
|
|
373
318
|
const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
|
|
374
|
-
if (((_b = this.draftFilter) === null || _b === void 0 ? void 0 : _b.id) === id) {
|
|
375
|
-
this.draftFilter = undefined;
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
319
|
const items = this.filterItems[prop !== null && prop !== void 0 ? prop : ''];
|
|
379
320
|
if (!items)
|
|
380
321
|
return;
|
|
@@ -382,7 +323,6 @@ const FilterPanel = class {
|
|
|
382
323
|
if (index === -1)
|
|
383
324
|
return;
|
|
384
325
|
items.splice(index, 1);
|
|
385
|
-
this.hasChanges = true;
|
|
386
326
|
// let's remove the prop if no more filters so the filter icon will be removed
|
|
387
327
|
if (items.length === 0)
|
|
388
328
|
delete this.filterItems[prop !== null && prop !== void 0 ? prop : ''];
|
|
@@ -424,7 +364,6 @@ const FilterPanel = class {
|
|
|
424
364
|
if (!moveFilterItem(items, sourceId, targetId)) {
|
|
425
365
|
return;
|
|
426
366
|
}
|
|
427
|
-
this.hasChanges = true;
|
|
428
367
|
this.filterId++;
|
|
429
368
|
if (!this.disableDynamicFiltering) {
|
|
430
369
|
this.debouncedApplyFilter();
|
|
@@ -460,7 +399,6 @@ const FilterPanel = class {
|
|
|
460
399
|
if (!target || !moveFilterItem(items, sourceId, target.id)) {
|
|
461
400
|
return;
|
|
462
401
|
}
|
|
463
|
-
this.hasChanges = true;
|
|
464
402
|
this.filterId++;
|
|
465
403
|
if (!this.disableDynamicFiltering) {
|
|
466
404
|
this.debouncedApplyFilter();
|
|
@@ -479,7 +417,6 @@ const FilterPanel = class {
|
|
|
479
417
|
if (index === -1)
|
|
480
418
|
return;
|
|
481
419
|
items[index].relation = items[index].relation === 'and' ? 'or' : 'and';
|
|
482
|
-
this.hasChanges = true;
|
|
483
420
|
if (!this.disableDynamicFiltering) {
|
|
484
421
|
this.debouncedApplyFilter();
|
|
485
422
|
}
|
|
@@ -528,22 +465,12 @@ const FilterPanel = class {
|
|
|
528
465
|
}
|
|
529
466
|
return options;
|
|
530
467
|
}
|
|
531
|
-
renderExtra(prop, index$1
|
|
532
|
-
|
|
533
|
-
const currentFilter = isDraft
|
|
534
|
-
? this.draftFilter
|
|
535
|
-
: (_a = this.filterItems[prop]) === null || _a === void 0 ? void 0 : _a[index$1];
|
|
468
|
+
renderExtra(prop, index$1) {
|
|
469
|
+
const currentFilter = this.filterItems[prop];
|
|
536
470
|
if (!currentFilter)
|
|
537
471
|
return '';
|
|
538
472
|
const applyFilter = (value) => {
|
|
539
|
-
|
|
540
|
-
if (isDraft && !this.isMeaningfulDraftValue(value)) {
|
|
541
|
-
return;
|
|
542
|
-
}
|
|
543
|
-
if (isDraft && !this.promoteDraft(prop)) {
|
|
544
|
-
return;
|
|
545
|
-
}
|
|
546
|
-
this.hasChanges = true;
|
|
473
|
+
this.filterItems[prop][index$1].value = value;
|
|
547
474
|
if (!this.disableDynamicFiltering) {
|
|
548
475
|
this.debouncedApplyFilter();
|
|
549
476
|
}
|
|
@@ -558,11 +485,11 @@ const FilterPanel = class {
|
|
|
558
485
|
}
|
|
559
486
|
};
|
|
560
487
|
const capts = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
|
|
561
|
-
const extra =
|
|
488
|
+
const extra = this.filterEntities[currentFilter[index$1].type].extra;
|
|
562
489
|
if (typeof extra === 'function') {
|
|
563
490
|
return extra(index.h, {
|
|
564
|
-
value: currentFilter.value,
|
|
565
|
-
filter: currentFilter,
|
|
491
|
+
value: currentFilter[index$1].value,
|
|
492
|
+
filter: currentFilter[index$1],
|
|
566
493
|
prop,
|
|
567
494
|
index: index$1,
|
|
568
495
|
placeholder: capts.placeholder,
|
|
@@ -577,7 +504,7 @@ const FilterPanel = class {
|
|
|
577
504
|
if (extra !== 'input' && extra !== 'datepicker') {
|
|
578
505
|
return '';
|
|
579
506
|
}
|
|
580
|
-
return (index.h("input", { id: `filter-input-${currentFilter.id}`, placeholder: capts.placeholder, type: extra === 'datepicker' ? 'date' : 'text', value: currentFilter.value, onInput: (e) => {
|
|
507
|
+
return (index.h("input", { id: `filter-input-${currentFilter[index$1].id}`, placeholder: capts.placeholder, type: extra === 'datepicker' ? 'date' : 'text', value: currentFilter[index$1].value, onInput: (e) => {
|
|
581
508
|
if (e.target instanceof HTMLInputElement) {
|
|
582
509
|
applyFilter(e.target.value);
|
|
583
510
|
}
|
|
@@ -593,42 +520,6 @@ const FilterPanel = class {
|
|
|
593
520
|
e.stopPropagation();
|
|
594
521
|
} }));
|
|
595
522
|
}
|
|
596
|
-
resolveDraftFilterType(preferred) {
|
|
597
|
-
var _a, _b;
|
|
598
|
-
const available = Object.values((_b = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.filterTypes) !== null && _b !== void 0 ? _b : {}).flat();
|
|
599
|
-
const type = preferred && available.includes(preferred)
|
|
600
|
-
? preferred
|
|
601
|
-
: available[0];
|
|
602
|
-
return type;
|
|
603
|
-
}
|
|
604
|
-
promoteDraft(prop, type) {
|
|
605
|
-
if (!this.draftFilter) {
|
|
606
|
-
return;
|
|
607
|
-
}
|
|
608
|
-
if (!this.filterItems[prop]) {
|
|
609
|
-
this.filterItems[prop] = [];
|
|
610
|
-
}
|
|
611
|
-
if (type) {
|
|
612
|
-
this.draftFilter.type = type;
|
|
613
|
-
}
|
|
614
|
-
const filter = this.draftFilter;
|
|
615
|
-
this.filterItems[prop].push(filter);
|
|
616
|
-
this.draftFilter = undefined;
|
|
617
|
-
this.hasChanges = true;
|
|
618
|
-
return filter;
|
|
619
|
-
}
|
|
620
|
-
isMeaningfulDraftValue(value) {
|
|
621
|
-
return value !== '' && value !== undefined && value !== null;
|
|
622
|
-
}
|
|
623
|
-
emitFilterChange() {
|
|
624
|
-
this.filterChange.emit(this.cloneFilterItems(this.filterItems));
|
|
625
|
-
}
|
|
626
|
-
cloneFilterItems(filterItems) {
|
|
627
|
-
return Object.fromEntries(Object.entries(filterItems).map(([prop, filters]) => [
|
|
628
|
-
prop,
|
|
629
|
-
filters.map(filter => (Object.assign({}, filter))),
|
|
630
|
-
]));
|
|
631
|
-
}
|
|
632
523
|
getAddFilterSelect() {
|
|
633
524
|
return this.element.querySelector(`#${FILTER_ID}`);
|
|
634
525
|
}
|
|
@@ -661,7 +552,7 @@ const FilterPanel = class {
|
|
|
661
552
|
top: `${(_d = (_c = this.changes) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : 0}px`,
|
|
662
553
|
};
|
|
663
554
|
const capts = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
|
|
664
|
-
return (index.h(index.Host, { key: '
|
|
555
|
+
return (index.h(index.Host, { key: 'd0e4ebb408750b11b3965da6a25e581733c968e3' }, index.h("dialog", { key: '3df36777c931ec1063e8574169ca880a99dbfe41', class: "filter-panel-dialog", style: style, ref: el => (this.dialog = el), onCancel: e => {
|
|
665
556
|
e.preventDefault();
|
|
666
557
|
this.onCancel();
|
|
667
558
|
} }, this.changes && [
|
|
@@ -670,7 +561,7 @@ const FilterPanel = class {
|
|
|
670
561
|
((_g = this.changes) === null || _g === void 0 ? void 0 : _g.hideDefaultFilters) !== true && [
|
|
671
562
|
index.h("label", { key: "filter-title" }, capts.title),
|
|
672
563
|
index.h("div", { key: "filter-holder", class: "filter-holder" }, this.getFilterItemsList()),
|
|
673
|
-
index.h("div", { key: "add-filter", class: "add-filter" }, index.h("select", { key: '
|
|
564
|
+
index.h("div", { key: "add-filter", class: "add-filter" }, index.h("select", { key: 'e2a8bd29f2090d3e6c933795427b71ca190b82aa', id: FILTER_ID, class: "select-css", onChange: e => this.onAddNewFilter(e) }, this.renderSelectOptions(this.currentFilterType))),
|
|
674
565
|
],
|
|
675
566
|
index.h("slot", { key: "default-slot" }),
|
|
676
567
|
((_j = (_h = this.changes).extraBottomContent) === null || _j === void 0 ? void 0 : _j.call(_h, this.changes)) || '',
|
|
@@ -1363,11 +1363,6 @@ const filterTypes = {
|
|
|
1363
1363
|
boolean: ['notEmpty', 'empty'],
|
|
1364
1364
|
array: ['notEmpty', 'empty'],
|
|
1365
1365
|
};
|
|
1366
|
-
/** Preferred initial operator for built-in filter families. */
|
|
1367
|
-
const filterTypeDefaults = {
|
|
1368
|
-
string: 'contains',
|
|
1369
|
-
number: 'eqN',
|
|
1370
|
-
};
|
|
1371
1366
|
const filterNames = {
|
|
1372
1367
|
none: 'None',
|
|
1373
1368
|
empty: 'Is blank',
|
|
@@ -1410,8 +1405,6 @@ const FILTE_PANEL = 'revogr-filter-panel';
|
|
|
1410
1405
|
*
|
|
1411
1406
|
* @property {FilterLocalization|undefined} localization - translation for filter popup captions.
|
|
1412
1407
|
*
|
|
1413
|
-
* @property {boolean|undefined} defaultFilter - creates a draft condition when an empty filter panel opens. Defaults to true.
|
|
1414
|
-
*
|
|
1415
1408
|
* @property {boolean|undefined} disableDynamicFiltering - disables dynamic filtering. A way to apply filters on Save only.
|
|
1416
1409
|
*/
|
|
1417
1410
|
/**
|
|
@@ -1433,7 +1426,7 @@ class FilterPlugin extends BasePlugin {
|
|
|
1433
1426
|
* number: ['eqN', 'neqN', 'gt']
|
|
1434
1427
|
* }
|
|
1435
1428
|
*/
|
|
1436
|
-
this.filterByType = Object.
|
|
1429
|
+
this.filterByType = Object.assign({}, filterTypes);
|
|
1437
1430
|
this.filterNameIndexByType = Object.assign({}, filterNames);
|
|
1438
1431
|
this.filterFunctionsIndexedByType = Object.assign({}, filterCoreFunctionsIndexedByType);
|
|
1439
1432
|
this.filterProp = filter_button.FILTER_PROP;
|
|
@@ -1517,16 +1510,11 @@ class FilterPlugin extends BasePlugin {
|
|
|
1517
1510
|
return null;
|
|
1518
1511
|
}
|
|
1519
1512
|
initConfig(config) {
|
|
1520
|
-
var _a
|
|
1513
|
+
var _a;
|
|
1521
1514
|
this.config = config;
|
|
1522
1515
|
this.allowDuplicateOperators = (_a = config.allowDuplicateOperators) !== null && _a !== void 0 ? _a : true;
|
|
1523
1516
|
if (this.pop) {
|
|
1524
1517
|
this.pop.allowDuplicateOperators = this.allowDuplicateOperators;
|
|
1525
|
-
this.pop.disableDynamicFiltering =
|
|
1526
|
-
(_b = config.disableDynamicFiltering) !== null && _b !== void 0 ? _b : false;
|
|
1527
|
-
this.pop.closeOnOutsideClick =
|
|
1528
|
-
(_c = config.closeFilterPanelOnOutsideClick) !== null && _c !== void 0 ? _c : true;
|
|
1529
|
-
this.pop.filterCaptions = (_d = config.localization) === null || _d === void 0 ? void 0 : _d.captions;
|
|
1530
1518
|
}
|
|
1531
1519
|
if (config.multiFilterItems) {
|
|
1532
1520
|
this.multiFilterItems = Object.assign({}, config.multiFilterItems);
|
|
@@ -1615,12 +1603,11 @@ class FilterPlugin extends BasePlugin {
|
|
|
1615
1603
|
}
|
|
1616
1604
|
// filter button clicked, open filter dialog
|
|
1617
1605
|
const buttonPos = (filterButton instanceof HTMLElement ? filterButton : el).getBoundingClientRect();
|
|
1618
|
-
const data = Object.assign(Object.assign(Object.assign({}, e.detail), this.filterCollection[prop]), { x: buttonPos.x, y: buttonPos.y + buttonPos.height, anchorY: buttonPos.y, autoCorrect: true, filterTypes: this.getColumnFilter(e.detail.filter),
|
|
1606
|
+
const data = Object.assign(Object.assign(Object.assign({}, e.detail), this.filterCollection[prop]), { x: buttonPos.x, y: buttonPos.y + buttonPos.height, anchorY: buttonPos.y, autoCorrect: true, filterTypes: this.getColumnFilter(e.detail.filter), filterItems: this.multiFilterItems, extraContent: this.extraHyperContent, extraBottomContent: this.extraBottomHyperContent });
|
|
1619
1607
|
(_b = this.beforeshow) === null || _b === void 0 ? void 0 : _b.call(this, data);
|
|
1620
1608
|
this.pop.show(data);
|
|
1621
1609
|
}
|
|
1622
|
-
getColumnFilter(
|
|
1623
|
-
const type = this.isColumnFilterOption(config) ? config.type : config;
|
|
1610
|
+
getColumnFilter(type) {
|
|
1624
1611
|
let filterType = 'string';
|
|
1625
1612
|
if (!type) {
|
|
1626
1613
|
return { [filterType]: this.filterByType[filterType] };
|
|
@@ -1640,41 +1627,6 @@ class FilterPlugin extends BasePlugin {
|
|
|
1640
1627
|
}
|
|
1641
1628
|
return { [filterType]: this.filterByType[filterType] };
|
|
1642
1629
|
}
|
|
1643
|
-
/** Resolve the preferred operator against the column's available filters. */
|
|
1644
|
-
getDefaultFilter(config) {
|
|
1645
|
-
var _a;
|
|
1646
|
-
const filters = this.getColumnFilter(config);
|
|
1647
|
-
const availableFilters = Object.values(filters).flat();
|
|
1648
|
-
const columnDefault = this.isColumnFilterOption(config)
|
|
1649
|
-
? config.default
|
|
1650
|
-
: undefined;
|
|
1651
|
-
if (typeof columnDefault === 'string' &&
|
|
1652
|
-
availableFilters.includes(columnDefault)) {
|
|
1653
|
-
return columnDefault;
|
|
1654
|
-
}
|
|
1655
|
-
const firstFamily = Object.keys(filters)[0];
|
|
1656
|
-
const familyDefault = filterTypeDefaults[firstFamily];
|
|
1657
|
-
if (familyDefault && ((_a = filters[firstFamily]) === null || _a === void 0 ? void 0 : _a.includes(familyDefault))) {
|
|
1658
|
-
return familyDefault;
|
|
1659
|
-
}
|
|
1660
|
-
return availableFilters[0];
|
|
1661
|
-
}
|
|
1662
|
-
/** Resolve grid and column-level draft opt-outs. */
|
|
1663
|
-
shouldShowDefaultFilter(config) {
|
|
1664
|
-
var _a;
|
|
1665
|
-
if (this.isColumnFilterOption(config)) {
|
|
1666
|
-
if (config.default === false) {
|
|
1667
|
-
return false;
|
|
1668
|
-
}
|
|
1669
|
-
if (typeof config.default === 'string') {
|
|
1670
|
-
return true;
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
return ((_a = this.config) === null || _a === void 0 ? void 0 : _a.defaultFilter) !== false;
|
|
1674
|
-
}
|
|
1675
|
-
isColumnFilterOption(value) {
|
|
1676
|
-
return !!value && typeof value === 'object' && !Array.isArray(value);
|
|
1677
|
-
}
|
|
1678
1630
|
isValidType(type) {
|
|
1679
1631
|
return !!(typeof type === 'string' && this.filterByType[type]);
|
|
1680
1632
|
}
|
|
@@ -3794,7 +3746,6 @@ exports.doCollapse = doCollapse;
|
|
|
3794
3746
|
exports.doExpand = doExpand;
|
|
3795
3747
|
exports.filterCoreFunctionsIndexedByType = filterCoreFunctionsIndexedByType;
|
|
3796
3748
|
exports.filterNames = filterNames;
|
|
3797
|
-
exports.filterTypeDefaults = filterTypeDefaults;
|
|
3798
3749
|
exports.filterTypes = filterTypes;
|
|
3799
3750
|
exports.getColumnDragPosition = getColumnDragPosition;
|
|
3800
3751
|
exports.getComparer = getComparer;
|
|
@@ -32,11 +32,6 @@ export const filterTypes = {
|
|
|
32
32
|
boolean: ['notEmpty', 'empty'],
|
|
33
33
|
array: ['notEmpty', 'empty'],
|
|
34
34
|
};
|
|
35
|
-
/** Preferred initial operator for built-in filter families. */
|
|
36
|
-
export const filterTypeDefaults = {
|
|
37
|
-
string: 'contains',
|
|
38
|
-
number: 'eqN',
|
|
39
|
-
};
|
|
40
35
|
export const filterNames = {
|
|
41
36
|
none: 'None',
|
|
42
37
|
empty: 'Is blank',
|