@revolist/revogrid 4.9.26 → 4.9.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{column.drag.plugin-f3019314.js → column.drag.plugin-34501a1e.js} +6 -2
- package/dist/cjs/column.drag.plugin-34501a1e.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/revo-grid.cjs.entry.js +1 -1
- package/dist/cjs/revogr-filter-panel.cjs.entry.js +3 -3
- package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
- package/dist/collection/plugins/filter/filter.panel.js +23 -3
- package/dist/collection/plugins/filter/filter.panel.js.map +1 -1
- package/dist/collection/plugins/filter/filter.plugin.js +5 -1
- package/dist/collection/plugins/filter/filter.plugin.js.map +1 -1
- package/dist/collection/plugins/filter/filter.types.js.map +1 -1
- package/dist/esm/{column.drag.plugin-41640959.js → column.drag.plugin-1474c3ae.js} +6 -2
- package/dist/esm/column.drag.plugin-1474c3ae.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/revo-grid.entry.js +1 -1
- package/dist/esm/revogr-filter-panel.entry.js +3 -3
- package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
- package/dist/revo-grid/{column.drag.plugin-41640959.js → column.drag.plugin-1474c3ae.js} +2 -2
- package/dist/revo-grid/column.drag.plugin-1474c3ae.js.map +1 -0
- package/dist/revo-grid/index.esm.js +1 -1
- package/dist/revo-grid/revo-grid.entry.js +1 -1
- package/dist/revo-grid/revogr-filter-panel.entry.js +1 -1
- package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
- package/dist/types/components.d.ts +2 -0
- package/dist/types/plugins/filter/filter.panel.d.ts +1 -0
- package/dist/types/plugins/filter/filter.plugin.d.ts +2 -1
- package/dist/types/plugins/filter/filter.types.d.ts +2 -2
- package/hydrate/index.js +8 -4
- package/hydrate/index.mjs +8 -4
- package/package.json +1 -1
- package/standalone/revo-grid.js +5 -1
- package/standalone/revo-grid.js.map +1 -1
- package/standalone/revogr-filter-panel.js +3 -3
- package/standalone/revogr-filter-panel.js.map +1 -1
- package/dist/cjs/column.drag.plugin-f3019314.js.map +0 -1
- package/dist/esm/column.drag.plugin-41640959.js.map +0 -1
- package/dist/revo-grid/column.drag.plugin-41640959.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ColumnRegular, DataType, PluginProviders } from "../../types/index";
|
|
1
|
+
import type { ColumnProp, ColumnRegular, DataType, PluginProviders } from "../../types/index";
|
|
2
2
|
import { BasePlugin } from '../base.plugin';
|
|
3
3
|
import type { ColumnFilterConfig, FilterCollection, LogicFunction, MultiFilterItem } from './filter.types';
|
|
4
4
|
export * from './filter.types';
|
|
@@ -39,6 +39,7 @@ export declare class FilterPlugin extends BasePlugin {
|
|
|
39
39
|
* Called on internal component change
|
|
40
40
|
*/
|
|
41
41
|
onFilterChange(filterItems: MultiFilterItem): Promise<void>;
|
|
42
|
+
onFilterReset(prop?: ColumnProp): void;
|
|
42
43
|
/**
|
|
43
44
|
* Triggers grid filtering
|
|
44
45
|
*/
|
|
@@ -4,8 +4,8 @@ export type DateEnum = 'today' | 'yesterday' | 'tomorrow' | 'thisweek' | 'lastwe
|
|
|
4
4
|
export type ExtraField = 'input' | 'select' | 'multi' | 'datepicker';
|
|
5
5
|
export type LogicFunctionParam = any;
|
|
6
6
|
export type LogicFunctionExtraParam = 'select' | 'input' | 'multi' | 'datepicker' | number | Date | DateEnum | null | undefined | string | string[] | number[];
|
|
7
|
-
export type LogicFunction = {
|
|
8
|
-
(value:
|
|
7
|
+
export type LogicFunction<T1 = LogicFunctionParam, T2 = LogicFunctionExtraParam> = {
|
|
8
|
+
(value: T1, extra?: T2): boolean;
|
|
9
9
|
extra?: ExtraField;
|
|
10
10
|
};
|
|
11
11
|
type CustomFilter = {
|
package/hydrate/index.js
CHANGED
|
@@ -2994,6 +2994,7 @@ class FilterPanel {
|
|
|
2994
2994
|
constructor(hostRef) {
|
|
2995
2995
|
registerInstance(this, hostRef);
|
|
2996
2996
|
this.filterChange = createEvent(this, "filterChange", 7);
|
|
2997
|
+
this.resetChange = createEvent(this, "resetChange", 7);
|
|
2997
2998
|
this.filterCaptionsInternal = {
|
|
2998
2999
|
title: 'Filter by',
|
|
2999
3000
|
save: 'Save',
|
|
@@ -3173,12 +3174,11 @@ class FilterPanel {
|
|
|
3173
3174
|
this.changes = undefined;
|
|
3174
3175
|
}
|
|
3175
3176
|
onReset() {
|
|
3176
|
-
var _a
|
|
3177
|
+
var _a;
|
|
3177
3178
|
this.assertChanges();
|
|
3178
|
-
|
|
3179
|
+
this.resetChange.emit((_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop);
|
|
3179
3180
|
// this updates the DOM which is used by getFilterItemsList() key
|
|
3180
3181
|
this.filterId++;
|
|
3181
|
-
this.filterChange.emit(this.filterItems);
|
|
3182
3182
|
}
|
|
3183
3183
|
onRemoveFilter(id) {
|
|
3184
3184
|
var _a;
|
|
@@ -11056,7 +11056,7 @@ class FilterPlugin extends BasePlugin {
|
|
|
11056
11056
|
const existingNodes = this.revogrid.registerVNode.filter(n => n.$tag$ !== 'revogr-filter-panel');
|
|
11057
11057
|
this.revogrid.registerVNode = [
|
|
11058
11058
|
...existingNodes,
|
|
11059
|
-
hAsync("revogr-filter-panel", { filterItems: this.multiFilterItems, filterNames: this.filterNameIndexByType, filterEntities: this.filterFunctionsIndexedByType, filterCaptions: (_a = config === null || config === void 0 ? void 0 : config.localization) === null || _a === void 0 ? void 0 : _a.captions, onFilterChange: e => this.onFilterChange(e.detail), disableDynamicFiltering: config === null || config === void 0 ? void 0 : config.disableDynamicFiltering, ref: e => (this.pop = e) },
|
|
11059
|
+
hAsync("revogr-filter-panel", { filterItems: this.multiFilterItems, filterNames: this.filterNameIndexByType, filterEntities: this.filterFunctionsIndexedByType, filterCaptions: (_a = config === null || config === void 0 ? void 0 : config.localization) === null || _a === void 0 ? void 0 : _a.captions, onFilterChange: e => this.onFilterChange(e.detail), onResetChange: e => this.onFilterReset(e.detail), disableDynamicFiltering: config === null || config === void 0 ? void 0 : config.disableDynamicFiltering, ref: e => (this.pop = e) },
|
|
11060
11060
|
" ",
|
|
11061
11061
|
this.extraContent()),
|
|
11062
11062
|
];
|
|
@@ -11178,6 +11178,10 @@ class FilterPlugin extends BasePlugin {
|
|
|
11178
11178
|
// run the filtering when the items change
|
|
11179
11179
|
this.runFiltering(this.multiFilterItems);
|
|
11180
11180
|
}
|
|
11181
|
+
onFilterReset(prop) {
|
|
11182
|
+
delete this.multiFilterItems[prop !== null && prop !== void 0 ? prop : ''];
|
|
11183
|
+
this.onFilterChange(this.multiFilterItems);
|
|
11184
|
+
}
|
|
11181
11185
|
/**
|
|
11182
11186
|
* Triggers grid filtering
|
|
11183
11187
|
*/
|
package/hydrate/index.mjs
CHANGED
|
@@ -2990,6 +2990,7 @@ class FilterPanel {
|
|
|
2990
2990
|
constructor(hostRef) {
|
|
2991
2991
|
registerInstance(this, hostRef);
|
|
2992
2992
|
this.filterChange = createEvent(this, "filterChange", 7);
|
|
2993
|
+
this.resetChange = createEvent(this, "resetChange", 7);
|
|
2993
2994
|
this.filterCaptionsInternal = {
|
|
2994
2995
|
title: 'Filter by',
|
|
2995
2996
|
save: 'Save',
|
|
@@ -3169,12 +3170,11 @@ class FilterPanel {
|
|
|
3169
3170
|
this.changes = undefined;
|
|
3170
3171
|
}
|
|
3171
3172
|
onReset() {
|
|
3172
|
-
var _a
|
|
3173
|
+
var _a;
|
|
3173
3174
|
this.assertChanges();
|
|
3174
|
-
|
|
3175
|
+
this.resetChange.emit((_a = this.changes) === null || _a === void 0 ? void 0 : _a.prop);
|
|
3175
3176
|
// this updates the DOM which is used by getFilterItemsList() key
|
|
3176
3177
|
this.filterId++;
|
|
3177
|
-
this.filterChange.emit(this.filterItems);
|
|
3178
3178
|
}
|
|
3179
3179
|
onRemoveFilter(id) {
|
|
3180
3180
|
var _a;
|
|
@@ -11052,7 +11052,7 @@ class FilterPlugin extends BasePlugin {
|
|
|
11052
11052
|
const existingNodes = this.revogrid.registerVNode.filter(n => n.$tag$ !== 'revogr-filter-panel');
|
|
11053
11053
|
this.revogrid.registerVNode = [
|
|
11054
11054
|
...existingNodes,
|
|
11055
|
-
hAsync("revogr-filter-panel", { filterItems: this.multiFilterItems, filterNames: this.filterNameIndexByType, filterEntities: this.filterFunctionsIndexedByType, filterCaptions: (_a = config === null || config === void 0 ? void 0 : config.localization) === null || _a === void 0 ? void 0 : _a.captions, onFilterChange: e => this.onFilterChange(e.detail), disableDynamicFiltering: config === null || config === void 0 ? void 0 : config.disableDynamicFiltering, ref: e => (this.pop = e) },
|
|
11055
|
+
hAsync("revogr-filter-panel", { filterItems: this.multiFilterItems, filterNames: this.filterNameIndexByType, filterEntities: this.filterFunctionsIndexedByType, filterCaptions: (_a = config === null || config === void 0 ? void 0 : config.localization) === null || _a === void 0 ? void 0 : _a.captions, onFilterChange: e => this.onFilterChange(e.detail), onResetChange: e => this.onFilterReset(e.detail), disableDynamicFiltering: config === null || config === void 0 ? void 0 : config.disableDynamicFiltering, ref: e => (this.pop = e) },
|
|
11056
11056
|
" ",
|
|
11057
11057
|
this.extraContent()),
|
|
11058
11058
|
];
|
|
@@ -11174,6 +11174,10 @@ class FilterPlugin extends BasePlugin {
|
|
|
11174
11174
|
// run the filtering when the items change
|
|
11175
11175
|
this.runFiltering(this.multiFilterItems);
|
|
11176
11176
|
}
|
|
11177
|
+
onFilterReset(prop) {
|
|
11178
|
+
delete this.multiFilterItems[prop !== null && prop !== void 0 ? prop : ''];
|
|
11179
|
+
this.onFilterChange(this.multiFilterItems);
|
|
11180
|
+
}
|
|
11177
11181
|
/**
|
|
11178
11182
|
* Triggers grid filtering
|
|
11179
11183
|
*/
|
package/package.json
CHANGED
package/standalone/revo-grid.js
CHANGED
|
@@ -1170,7 +1170,7 @@ class FilterPlugin extends BasePlugin {
|
|
|
1170
1170
|
const existingNodes = this.revogrid.registerVNode.filter(n => n.$tag$ !== 'revogr-filter-panel');
|
|
1171
1171
|
this.revogrid.registerVNode = [
|
|
1172
1172
|
...existingNodes,
|
|
1173
|
-
h("revogr-filter-panel", { filterItems: this.multiFilterItems, filterNames: this.filterNameIndexByType, filterEntities: this.filterFunctionsIndexedByType, filterCaptions: (_a = config === null || config === void 0 ? void 0 : config.localization) === null || _a === void 0 ? void 0 : _a.captions, onFilterChange: e => this.onFilterChange(e.detail), disableDynamicFiltering: config === null || config === void 0 ? void 0 : config.disableDynamicFiltering, ref: e => (this.pop = e) },
|
|
1173
|
+
h("revogr-filter-panel", { filterItems: this.multiFilterItems, filterNames: this.filterNameIndexByType, filterEntities: this.filterFunctionsIndexedByType, filterCaptions: (_a = config === null || config === void 0 ? void 0 : config.localization) === null || _a === void 0 ? void 0 : _a.captions, onFilterChange: e => this.onFilterChange(e.detail), onResetChange: e => this.onFilterReset(e.detail), disableDynamicFiltering: config === null || config === void 0 ? void 0 : config.disableDynamicFiltering, ref: e => (this.pop = e) },
|
|
1174
1174
|
" ",
|
|
1175
1175
|
this.extraContent()),
|
|
1176
1176
|
];
|
|
@@ -1292,6 +1292,10 @@ class FilterPlugin extends BasePlugin {
|
|
|
1292
1292
|
// run the filtering when the items change
|
|
1293
1293
|
this.runFiltering(this.multiFilterItems);
|
|
1294
1294
|
}
|
|
1295
|
+
onFilterReset(prop) {
|
|
1296
|
+
delete this.multiFilterItems[prop !== null && prop !== void 0 ? prop : ''];
|
|
1297
|
+
this.onFilterChange(this.multiFilterItems);
|
|
1298
|
+
}
|
|
1295
1299
|
/**
|
|
1296
1300
|
* Triggers grid filtering
|
|
1297
1301
|
*/
|