@revolist/revogrid 4.27.3 → 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 -139
- 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 -140
- 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 -139
- 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 -139
- 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 -192
- package/hydrate/index.mjs +35 -192
- 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,27 +145,10 @@ const FilterPanel = class {
|
|
|
146
145
|
}
|
|
147
146
|
}
|
|
148
147
|
async show(newEntity) {
|
|
149
|
-
this.hasChanges = false;
|
|
150
148
|
this.changes = newEntity;
|
|
151
|
-
this.filterItems =
|
|
152
|
-
this.draftFilter = undefined;
|
|
149
|
+
this.filterItems = (newEntity === null || newEntity === void 0 ? void 0 : newEntity.filterItems) || {};
|
|
153
150
|
if (this.changes) {
|
|
154
151
|
this.changes.type = this.changes.type || defaultType;
|
|
155
|
-
const prop = this.changes.prop;
|
|
156
|
-
const propFilters = prop === undefined ? undefined : this.filterItems[prop];
|
|
157
|
-
if (!(propFilters === null || propFilters === void 0 ? void 0 : propFilters.length) &&
|
|
158
|
-
this.changes.showDefaultFilter !== false &&
|
|
159
|
-
this.changes.hideDefaultFilters !== true) {
|
|
160
|
-
const type = this.resolveDraftFilterType(this.changes.defaultFilterType);
|
|
161
|
-
if (type) {
|
|
162
|
-
this.draftFilter = {
|
|
163
|
-
id: ++this.filterId,
|
|
164
|
-
type,
|
|
165
|
-
value: '',
|
|
166
|
-
relation: 'and',
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
152
|
}
|
|
171
153
|
}
|
|
172
154
|
async getChanges() {
|
|
@@ -187,42 +169,29 @@ const FilterPanel = class {
|
|
|
187
169
|
const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
|
|
188
170
|
if (prop === undefined)
|
|
189
171
|
return '';
|
|
190
|
-
const propFilters = (
|
|
191
|
-
|
|
192
|
-
index,
|
|
193
|
-
isDraft: false,
|
|
194
|
-
}));
|
|
195
|
-
if (this.draftFilter) {
|
|
196
|
-
propFilters.push({
|
|
197
|
-
filter: this.draftFilter,
|
|
198
|
-
index: propFilters.length,
|
|
199
|
-
isDraft: true,
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
const visibleFilters = propFilters.filter(({ filter }) => !filter.hidden);
|
|
203
|
-
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;
|
|
204
174
|
const capts = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
|
|
205
|
-
return (index.h("div", { key: this.filterId }, index.h("ul", { class: "multi-filter-list-container" }, propFilters.map((
|
|
206
|
-
var _a;
|
|
175
|
+
return (index.h("div", { key: this.filterId }, index.h("ul", { class: "multi-filter-list-container" }, propFilters.map((filter, index$1) => {
|
|
207
176
|
let andOrButton;
|
|
208
177
|
if (filter.hidden) {
|
|
209
178
|
return;
|
|
210
179
|
}
|
|
211
180
|
// hide toggle button if there is only one filter and the last one
|
|
212
|
-
if (
|
|
181
|
+
if (index$1 !== this.filterItems[prop].length - 1) {
|
|
213
182
|
andOrButton = (index.h(filter_button.AndOrButton, { text: filter.relation === 'and' ? capts.and : capts.or, onClick: () => this.toggleFilterAndOr(filter.id) }));
|
|
214
183
|
}
|
|
215
|
-
const extra = this.renderExtra(prop, index$1
|
|
184
|
+
const extra = this.renderExtra(prop, index$1);
|
|
216
185
|
const isDragging = this.draggedFilterId === filter.id;
|
|
217
186
|
const isDragOver = this.dragOverFilterId === filter.id && !isDragging;
|
|
218
|
-
const canReorder = visibleFilterCount > 1
|
|
187
|
+
const canReorder = visibleFilterCount > 1;
|
|
219
188
|
return (index.h("li", { key: filter.id, class: FILTER_LIST_CLASS, "aria-label": `${capts.filterCondition} ${index$1 + 1}` }, index.h("div", { class: {
|
|
220
189
|
'multi-filter-list-row': true,
|
|
221
190
|
'filter-row-drop-active': this.draggedFilterId !== undefined && !isDragging,
|
|
222
191
|
'filter-row-dragging': isDragging,
|
|
223
192
|
'filter-row-drag-over': isDragOver,
|
|
224
|
-
} }, 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
|
|
225
|
-
})),
|
|
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" }) : ''));
|
|
226
195
|
}
|
|
227
196
|
componentDidRender() {
|
|
228
197
|
this.syncDialog();
|
|
@@ -271,24 +240,16 @@ const FilterPanel = class {
|
|
|
271
240
|
el.style.left = `${left}px`;
|
|
272
241
|
el.style.top = `${top}px`;
|
|
273
242
|
}
|
|
274
|
-
onFilterTypeChange(e, prop, index
|
|
243
|
+
onFilterTypeChange(e, prop, index) {
|
|
275
244
|
if (!(e.target instanceof HTMLSelectElement)) {
|
|
276
245
|
return;
|
|
277
246
|
}
|
|
278
|
-
|
|
279
|
-
const filter = isDraft
|
|
280
|
-
? this.promoteDraft(prop, type)
|
|
281
|
-
: this.filterItems[prop][index];
|
|
282
|
-
if (!filter) {
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
filter.type = type;
|
|
286
|
-
this.hasChanges = true;
|
|
247
|
+
this.filterItems[prop][index].type = e.target.value;
|
|
287
248
|
// this re-renders the input to know if we need extra input
|
|
288
249
|
this.filterId++;
|
|
289
250
|
// adding setTimeout will wait for the next tick DOM update then focus on input
|
|
290
251
|
setTimeout(() => {
|
|
291
|
-
const input = document.getElementById('filter-input-' +
|
|
252
|
+
const input = document.getElementById('filter-input-' + this.filterItems[prop][index].id);
|
|
292
253
|
if (input instanceof HTMLInputElement) {
|
|
293
254
|
input.focus();
|
|
294
255
|
}
|
|
@@ -323,20 +284,12 @@ const FilterPanel = class {
|
|
|
323
284
|
return;
|
|
324
285
|
this.filterId++;
|
|
325
286
|
this.currentFilterId = this.filterId;
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
this.filterItems[prop].push({
|
|
333
|
-
id: this.currentFilterId,
|
|
334
|
-
type: this.currentFilterType,
|
|
335
|
-
value: '',
|
|
336
|
-
relation: 'and',
|
|
337
|
-
});
|
|
338
|
-
this.hasChanges = true;
|
|
339
|
-
}
|
|
287
|
+
this.filterItems[prop].push({
|
|
288
|
+
id: this.currentFilterId,
|
|
289
|
+
type: this.currentFilterType,
|
|
290
|
+
value: '',
|
|
291
|
+
relation: 'and',
|
|
292
|
+
});
|
|
340
293
|
// adding setTimeout will wait for the next tick DOM update then focus on input
|
|
341
294
|
setTimeout(() => {
|
|
342
295
|
const input = document.getElementById('filter-input-' + this.currentFilterId);
|
|
@@ -345,9 +298,7 @@ const FilterPanel = class {
|
|
|
345
298
|
}, 0);
|
|
346
299
|
}
|
|
347
300
|
onSave() {
|
|
348
|
-
|
|
349
|
-
this.emitFilterChange();
|
|
350
|
-
}
|
|
301
|
+
this.filterChange.emit(this.filterItems);
|
|
351
302
|
}
|
|
352
303
|
onCancel() {
|
|
353
304
|
this.changes = undefined;
|
|
@@ -355,25 +306,16 @@ const FilterPanel = class {
|
|
|
355
306
|
onReset() {
|
|
356
307
|
var _a;
|
|
357
308
|
this.assertChanges();
|
|
358
|
-
this.
|
|
359
|
-
const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
|
|
360
|
-
if (prop !== undefined) {
|
|
361
|
-
delete this.filterItems[prop];
|
|
362
|
-
}
|
|
363
|
-
this.resetChange.emit(prop);
|
|
309
|
+
this.resetChange.emit((_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop);
|
|
364
310
|
// this updates the DOM which is used by getFilterItemsList() key
|
|
365
311
|
this.filterId++;
|
|
366
312
|
}
|
|
367
313
|
onRemoveFilter(id) {
|
|
368
|
-
var _a
|
|
314
|
+
var _a;
|
|
369
315
|
this.assertChanges();
|
|
370
316
|
// this is for reactivity issues for getFilterItemsList()
|
|
371
317
|
this.filterId++;
|
|
372
318
|
const prop = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop;
|
|
373
|
-
if (((_b = this.draftFilter) === null || _b === void 0 ? void 0 : _b.id) === id) {
|
|
374
|
-
this.draftFilter = undefined;
|
|
375
|
-
return;
|
|
376
|
-
}
|
|
377
319
|
const items = this.filterItems[prop !== null && prop !== void 0 ? prop : ''];
|
|
378
320
|
if (!items)
|
|
379
321
|
return;
|
|
@@ -381,7 +323,6 @@ const FilterPanel = class {
|
|
|
381
323
|
if (index === -1)
|
|
382
324
|
return;
|
|
383
325
|
items.splice(index, 1);
|
|
384
|
-
this.hasChanges = true;
|
|
385
326
|
// let's remove the prop if no more filters so the filter icon will be removed
|
|
386
327
|
if (items.length === 0)
|
|
387
328
|
delete this.filterItems[prop !== null && prop !== void 0 ? prop : ''];
|
|
@@ -423,7 +364,6 @@ const FilterPanel = class {
|
|
|
423
364
|
if (!moveFilterItem(items, sourceId, targetId)) {
|
|
424
365
|
return;
|
|
425
366
|
}
|
|
426
|
-
this.hasChanges = true;
|
|
427
367
|
this.filterId++;
|
|
428
368
|
if (!this.disableDynamicFiltering) {
|
|
429
369
|
this.debouncedApplyFilter();
|
|
@@ -459,7 +399,6 @@ const FilterPanel = class {
|
|
|
459
399
|
if (!target || !moveFilterItem(items, sourceId, target.id)) {
|
|
460
400
|
return;
|
|
461
401
|
}
|
|
462
|
-
this.hasChanges = true;
|
|
463
402
|
this.filterId++;
|
|
464
403
|
if (!this.disableDynamicFiltering) {
|
|
465
404
|
this.debouncedApplyFilter();
|
|
@@ -478,7 +417,6 @@ const FilterPanel = class {
|
|
|
478
417
|
if (index === -1)
|
|
479
418
|
return;
|
|
480
419
|
items[index].relation = items[index].relation === 'and' ? 'or' : 'and';
|
|
481
|
-
this.hasChanges = true;
|
|
482
420
|
if (!this.disableDynamicFiltering) {
|
|
483
421
|
this.debouncedApplyFilter();
|
|
484
422
|
}
|
|
@@ -527,22 +465,12 @@ const FilterPanel = class {
|
|
|
527
465
|
}
|
|
528
466
|
return options;
|
|
529
467
|
}
|
|
530
|
-
renderExtra(prop, index$1
|
|
531
|
-
|
|
532
|
-
const currentFilter = isDraft
|
|
533
|
-
? this.draftFilter
|
|
534
|
-
: (_a = this.filterItems[prop]) === null || _a === void 0 ? void 0 : _a[index$1];
|
|
468
|
+
renderExtra(prop, index$1) {
|
|
469
|
+
const currentFilter = this.filterItems[prop];
|
|
535
470
|
if (!currentFilter)
|
|
536
471
|
return '';
|
|
537
472
|
const applyFilter = (value) => {
|
|
538
|
-
|
|
539
|
-
if (isDraft && !this.isMeaningfulDraftValue(value)) {
|
|
540
|
-
return;
|
|
541
|
-
}
|
|
542
|
-
if (isDraft && !this.promoteDraft(prop)) {
|
|
543
|
-
return;
|
|
544
|
-
}
|
|
545
|
-
this.hasChanges = true;
|
|
473
|
+
this.filterItems[prop][index$1].value = value;
|
|
546
474
|
if (!this.disableDynamicFiltering) {
|
|
547
475
|
this.debouncedApplyFilter();
|
|
548
476
|
}
|
|
@@ -557,11 +485,11 @@ const FilterPanel = class {
|
|
|
557
485
|
}
|
|
558
486
|
};
|
|
559
487
|
const capts = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
|
|
560
|
-
const extra =
|
|
488
|
+
const extra = this.filterEntities[currentFilter[index$1].type].extra;
|
|
561
489
|
if (typeof extra === 'function') {
|
|
562
490
|
return extra(index.h, {
|
|
563
|
-
value: currentFilter.value,
|
|
564
|
-
filter: currentFilter,
|
|
491
|
+
value: currentFilter[index$1].value,
|
|
492
|
+
filter: currentFilter[index$1],
|
|
565
493
|
prop,
|
|
566
494
|
index: index$1,
|
|
567
495
|
placeholder: capts.placeholder,
|
|
@@ -576,7 +504,7 @@ const FilterPanel = class {
|
|
|
576
504
|
if (extra !== 'input' && extra !== 'datepicker') {
|
|
577
505
|
return '';
|
|
578
506
|
}
|
|
579
|
-
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) => {
|
|
580
508
|
if (e.target instanceof HTMLInputElement) {
|
|
581
509
|
applyFilter(e.target.value);
|
|
582
510
|
}
|
|
@@ -592,42 +520,6 @@ const FilterPanel = class {
|
|
|
592
520
|
e.stopPropagation();
|
|
593
521
|
} }));
|
|
594
522
|
}
|
|
595
|
-
resolveDraftFilterType(preferred) {
|
|
596
|
-
var _a, _b;
|
|
597
|
-
const available = Object.values((_b = (_a = this.changes) === null || _a === void 0 ? void 0 : _a.filterTypes) !== null && _b !== void 0 ? _b : {}).flat();
|
|
598
|
-
const type = preferred && available.includes(preferred)
|
|
599
|
-
? preferred
|
|
600
|
-
: available[0];
|
|
601
|
-
return type;
|
|
602
|
-
}
|
|
603
|
-
promoteDraft(prop, type) {
|
|
604
|
-
if (!this.draftFilter) {
|
|
605
|
-
return;
|
|
606
|
-
}
|
|
607
|
-
if (!this.filterItems[prop]) {
|
|
608
|
-
this.filterItems[prop] = [];
|
|
609
|
-
}
|
|
610
|
-
if (type) {
|
|
611
|
-
this.draftFilter.type = type;
|
|
612
|
-
}
|
|
613
|
-
const filter = this.draftFilter;
|
|
614
|
-
this.filterItems[prop].push(filter);
|
|
615
|
-
this.draftFilter = undefined;
|
|
616
|
-
this.hasChanges = true;
|
|
617
|
-
return filter;
|
|
618
|
-
}
|
|
619
|
-
isMeaningfulDraftValue(value) {
|
|
620
|
-
return value !== '' && value !== undefined && value !== null;
|
|
621
|
-
}
|
|
622
|
-
emitFilterChange() {
|
|
623
|
-
this.filterChange.emit(this.cloneFilterItems(this.filterItems));
|
|
624
|
-
}
|
|
625
|
-
cloneFilterItems(filterItems) {
|
|
626
|
-
return Object.fromEntries(Object.entries(filterItems).map(([prop, filters]) => [
|
|
627
|
-
prop,
|
|
628
|
-
filters.map(filter => (Object.assign({}, filter))),
|
|
629
|
-
]));
|
|
630
|
-
}
|
|
631
523
|
getAddFilterSelect() {
|
|
632
524
|
return this.element.querySelector(`#${FILTER_ID}`);
|
|
633
525
|
}
|
|
@@ -660,7 +552,7 @@ const FilterPanel = class {
|
|
|
660
552
|
top: `${(_d = (_c = this.changes) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : 0}px`,
|
|
661
553
|
};
|
|
662
554
|
const capts = Object.assign(Object.assign({}, this.filterCaptionsInternal), this.filterCaptions);
|
|
663
|
-
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 => {
|
|
664
556
|
e.preventDefault();
|
|
665
557
|
this.onCancel();
|
|
666
558
|
} }, this.changes && [
|
|
@@ -669,7 +561,7 @@ const FilterPanel = class {
|
|
|
669
561
|
((_g = this.changes) === null || _g === void 0 ? void 0 : _g.hideDefaultFilters) !== true && [
|
|
670
562
|
index.h("label", { key: "filter-title" }, capts.title),
|
|
671
563
|
index.h("div", { key: "filter-holder", class: "filter-holder" }, this.getFilterItemsList()),
|
|
672
|
-
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))),
|
|
673
565
|
],
|
|
674
566
|
index.h("slot", { key: "default-slot" }),
|
|
675
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',
|