@polygrid/core 1.0.486 → 1.0.488
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/api/show-column-animated.d.ts.map +1 -1
- package/dist/api/show-column-animated.js +64 -62
- package/dist/api/show-column-animated.js.map +1 -1
- package/dist/engine/const/pg-css-class.d.ts +6 -0
- package/dist/engine/const/pg-css-class.d.ts.map +1 -1
- package/dist/engine/const/pg-css-class.js +6 -0
- package/dist/engine/const/pg-css-class.js.map +1 -1
- package/dist/engine/const/pg-icons.d.ts +3 -0
- package/dist/engine/const/pg-icons.d.ts.map +1 -1
- package/dist/engine/const/pg-icons.js +3 -0
- package/dist/engine/const/pg-icons.js.map +1 -1
- package/dist/engine/core/grid-runtime.d.ts +8 -0
- package/dist/engine/core/grid-runtime.d.ts.map +1 -1
- package/dist/engine/core/grid-runtime.js +7 -0
- package/dist/engine/core/grid-runtime.js.map +1 -1
- package/dist/engine/core/interfaces/grid-event-map.d.ts +9 -0
- package/dist/engine/core/interfaces/grid-event-map.d.ts.map +1 -1
- package/dist/engine/services/data/methods/apply-sort-and-filter.d.ts.map +1 -1
- package/dist/engine/services/data/methods/apply-sort-and-filter.js +8 -1
- package/dist/engine/services/data/methods/apply-sort-and-filter.js.map +1 -1
- package/dist/engine/services/data/methods/set-view-rows.js +13 -9
- package/dist/engine/services/data/methods/set-view-rows.js.map +1 -1
- package/dist/engine/services/filter/filter.d.ts +20 -0
- package/dist/engine/services/filter/filter.d.ts.map +1 -1
- package/dist/engine/services/filter/filter.js +29 -0
- package/dist/engine/services/filter/filter.js.map +1 -1
- package/dist/engine/services/filter/interfaces/excel-filter.d.ts +1 -0
- package/dist/engine/services/filter/interfaces/excel-filter.d.ts.map +1 -1
- package/dist/engine/services/filter/interfaces/excel-popup-filter.d.ts +12 -0
- package/dist/engine/services/filter/interfaces/excel-popup-filter.d.ts.map +1 -0
- package/dist/engine/services/filter/interfaces/excel-popup-filter.js +2 -0
- package/dist/engine/services/filter/interfaces/excel-popup-filter.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-apply.d.ts +4 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-apply.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-apply.js +36 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-apply.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-checked-changed.d.ts +3 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-checked-changed.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-checked-changed.js +11 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-checked-changed.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-clear.d.ts +4 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-clear.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-clear.js +30 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-clear.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-data.d.ts +4 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-data.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-data.js +17 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-data.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-icon-click.d.ts +4 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-icon-click.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-icon-click.js +7 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-icon-click.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-operator-click.d.ts +5 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-operator-click.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-operator-click.js +8 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-operator-click.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-select-all.d.ts +4 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-select-all.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-select-all.js +15 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-select-all.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-show.d.ts +4 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-show.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-show.js +43 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-filter-show.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-search-input.d.ts +3 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-search-input.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-search-input.js +27 -0
- package/dist/engine/services/filter/methods/excel-filter/excel-search-input.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/filter-data-excel-excluding.d.ts +4 -0
- package/dist/engine/services/filter/methods/excel-filter/filter-data-excel-excluding.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/filter-data-excel-excluding.js +19 -0
- package/dist/engine/services/filter/methods/excel-filter/filter-data-excel-excluding.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/is-excel-filter-operator-selected.d.ts +5 -0
- package/dist/engine/services/filter/methods/excel-filter/is-excel-filter-operator-selected.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/is-excel-filter-operator-selected.js +7 -0
- package/dist/engine/services/filter/methods/excel-filter/is-excel-filter-operator-selected.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/operators-list-hover.d.ts +4 -0
- package/dist/engine/services/filter/methods/excel-filter/operators-list-hover.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/operators-list-hover.js +12 -0
- package/dist/engine/services/filter/methods/excel-filter/operators-list-hover.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/popup-filter-apply.d.ts +4 -0
- package/dist/engine/services/filter/methods/excel-filter/popup-filter-apply.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/popup-filter-apply.js +29 -0
- package/dist/engine/services/filter/methods/excel-filter/popup-filter-apply.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/popup-filter-show.d.ts +5 -0
- package/dist/engine/services/filter/methods/excel-filter/popup-filter-show.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/popup-filter-show.js +28 -0
- package/dist/engine/services/filter/methods/excel-filter/popup-filter-show.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/remove-excel-filter-elements.d.ts +3 -0
- package/dist/engine/services/filter/methods/excel-filter/remove-excel-filter-elements.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/remove-excel-filter-elements.js +10 -0
- package/dist/engine/services/filter/methods/excel-filter/remove-excel-filter-elements.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/show-operators.d.ts +4 -0
- package/dist/engine/services/filter/methods/excel-filter/show-operators.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/show-operators.js +15 -0
- package/dist/engine/services/filter/methods/excel-filter/show-operators.js.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/toggle-select-all-cbx.d.ts +3 -0
- package/dist/engine/services/filter/methods/excel-filter/toggle-select-all-cbx.d.ts.map +1 -0
- package/dist/engine/services/filter/methods/excel-filter/toggle-select-all-cbx.js +7 -0
- package/dist/engine/services/filter/methods/excel-filter/toggle-select-all-cbx.js.map +1 -0
- package/dist/engine/services/filter/methods/index.d.ts +17 -0
- package/dist/engine/services/filter/methods/index.d.ts.map +1 -1
- package/dist/engine/services/filter/methods/index.js +17 -0
- package/dist/engine/services/filter/methods/index.js.map +1 -1
- package/dist/engine/services/layout/layout.d.ts.map +1 -1
- package/dist/engine/services/layout/layout.js +9 -2
- package/dist/engine/services/layout/layout.js.map +1 -1
- package/dist/engine/services/renderer/parts/excel-filter/excel-filter-popup.d.ts +5 -0
- package/dist/engine/services/renderer/parts/excel-filter/excel-filter-popup.d.ts.map +1 -0
- package/dist/engine/services/renderer/parts/excel-filter/excel-filter-popup.js +204 -0
- package/dist/engine/services/renderer/parts/excel-filter/excel-filter-popup.js.map +1 -0
- package/dist/engine/services/renderer/parts/excel-filter/excel-filter.d.ts +4 -0
- package/dist/engine/services/renderer/parts/excel-filter/excel-filter.d.ts.map +1 -0
- package/dist/engine/services/renderer/parts/excel-filter/excel-filter.js +201 -0
- package/dist/engine/services/renderer/parts/excel-filter/excel-filter.js.map +1 -0
- package/dist/engine/services/renderer/parts/excel-filter/operators.d.ts +4 -0
- package/dist/engine/services/renderer/parts/excel-filter/operators.d.ts.map +1 -0
- package/dist/engine/services/renderer/parts/excel-filter/operators.js +60 -0
- package/dist/engine/services/renderer/parts/excel-filter/operators.js.map +1 -0
- package/dist/engine/services/renderer/parts/header/header-cells.d.ts.map +1 -1
- package/dist/engine/services/renderer/parts/header/header-cells.js +27 -6
- package/dist/engine/services/renderer/parts/header/header-cells.js.map +1 -1
- package/dist/engine/services/renderer/parts/overlay/overlay.d.ts +3 -0
- package/dist/engine/services/renderer/parts/overlay/overlay.d.ts.map +1 -0
- package/dist/engine/services/renderer/parts/overlay/overlay.js +8 -0
- package/dist/engine/services/renderer/parts/overlay/overlay.js.map +1 -0
- package/dist/engine/services/renderer/parts/root/root.d.ts.map +1 -1
- package/dist/engine/services/renderer/parts/root/root.js +21 -0
- package/dist/engine/services/renderer/parts/root/root.js.map +1 -1
- package/dist/engine/services/row/classes/row-pool.js +15 -17
- package/dist/engine/services/row/classes/row-pool.js.map +1 -1
- package/dist/engine/services/sort/methods/apply-init-sort.d.ts.map +1 -1
- package/dist/engine/services/sort/methods/apply-init-sort.js +83 -85
- package/dist/engine/services/sort/methods/apply-init-sort.js.map +1 -1
- package/dist/engine/services/sort/methods/sort-column.d.ts +2 -1
- package/dist/engine/services/sort/methods/sort-column.d.ts.map +1 -1
- package/dist/engine/services/sort/methods/sort-column.js +2 -2
- package/dist/engine/services/sort/methods/sort-column.js.map +1 -1
- package/dist/engine/services/sort/methods/sort.d.ts +2 -1
- package/dist/engine/services/sort/methods/sort.d.ts.map +1 -1
- package/dist/engine/services/sort/methods/sort.js +2 -2
- package/dist/engine/services/sort/methods/sort.js.map +1 -1
- package/dist/engine/services/sort/sort.d.ts +4 -1
- package/dist/engine/services/sort/sort.d.ts.map +1 -1
- package/dist/engine/services/sort/sort.js +7 -2
- package/dist/engine/services/sort/sort.js.map +1 -1
- package/dist/engine/store/interfaces/view-state.d.ts +8 -0
- package/dist/engine/store/interfaces/view-state.d.ts.map +1 -1
- package/dist/engine/store/methods/create-initial-state.d.ts.map +1 -1
- package/dist/engine/store/methods/create-initial-state.js +10 -0
- package/dist/engine/store/methods/create-initial-state.js.map +1 -1
- package/dist/engine/store/store.d.ts.map +1 -1
- package/dist/engine/store/store.js +5 -3
- package/dist/engine/store/store.js.map +1 -1
- package/dist/polygrid.css +187 -1
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createFilterGroups } from "../create-filter-groups";
|
|
2
|
+
import { removeExcelFilterElements } from "./remove-excel-filter-elements";
|
|
3
|
+
export function excelFilterApply(grid, column) {
|
|
4
|
+
const state = grid._store.getState();
|
|
5
|
+
// remove the existing excel filter for the column, since we will overwrite it with a new one
|
|
6
|
+
const excelFilters = state.view.excelFilters.filter((f) => f.columnId !== column.id);
|
|
7
|
+
const excelPopupFilters = state.view.excelPopupFilters.filter((filter) => filter.columnId !== column.id);
|
|
8
|
+
const filterGroup = createFilterGroups(excelPopupFilters);
|
|
9
|
+
const colsWithActiveExcelPopupFilters = state.view.columnsWithActiveExcelPopupFilters;
|
|
10
|
+
const newPopupFilterSet = new Set(colsWithActiveExcelPopupFilters);
|
|
11
|
+
newPopupFilterSet.delete(column.id);
|
|
12
|
+
delete state.view.currentExcelFilter.originalCheckBoxFilters;
|
|
13
|
+
const currentFilter = state.view.currentExcelFilter;
|
|
14
|
+
excelFilters.push(currentFilter);
|
|
15
|
+
// add column to the active filtered columns
|
|
16
|
+
const colsWithActiveExcelFilters = state.view.columnsWithActiveExcelFilters;
|
|
17
|
+
const newSet = new Set(colsWithActiveExcelFilters);
|
|
18
|
+
newSet.add(column.id);
|
|
19
|
+
// filter
|
|
20
|
+
grid._store.update((draft) => {
|
|
21
|
+
draft.view.excelFilters = excelFilters;
|
|
22
|
+
draft.view.excelPopupFilters = excelPopupFilters;
|
|
23
|
+
draft.view.columnsWithActiveExcelFilters = newSet;
|
|
24
|
+
draft.view.columnsWithActiveExcelPopupFilters = newPopupFilterSet;
|
|
25
|
+
draft.view.currentExcelFilter = {
|
|
26
|
+
columnId: "",
|
|
27
|
+
checkBoxFilters: [],
|
|
28
|
+
originalCheckBoxFilters: [],
|
|
29
|
+
};
|
|
30
|
+
draft.view.currentExcelPopupFilters = [];
|
|
31
|
+
draft.view.filterGroup = filterGroup;
|
|
32
|
+
});
|
|
33
|
+
grid._services.data.applySortAndFilter(grid);
|
|
34
|
+
removeExcelFilterElements(grid);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=excel-filter-apply.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-apply.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-apply.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,MAAM,UAAU,gBAAgB,CAAC,IAAc,EAAE,MAAsB;IACrE,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IACrC,6FAA6F;IAC7F,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CACjD,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AAG;YAC9B,QAAQ,EAAE,EAAE;YACZ,eAAe,EAAE,EAAE;YACnB,uBAAuB,EAAE,EAAE;SAC5B,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,wBAAwB,GAAG,EAAE,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAE7C,yBAAyB,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/engine/services/filter/methods/excel-filter/excel-filter-checked-changed.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-checked-changed.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-checked-changed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,wBAAgB,yBAAyB,CACvC,CAAC,EAAE,KAAK,EACR,IAAI,EAAE,QAAQ,EACd,cAAc,EAAE,gBAAgB,QAUjC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { toggleSelectAllCbx } from "./toggle-select-all-cbx";
|
|
2
|
+
export function excelFilterCheckedChanged(e, grid, selectAllChkBx) {
|
|
3
|
+
const input = e.target;
|
|
4
|
+
if (input.type !== "checkbox")
|
|
5
|
+
return;
|
|
6
|
+
const index = Number(input.dataset.index);
|
|
7
|
+
const filters = grid._store.getState().view.currentExcelFilter.checkBoxFilters;
|
|
8
|
+
filters[index].checked = input.checked;
|
|
9
|
+
toggleSelectAllCbx(selectAllChkBx, filters);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=excel-filter-checked-changed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-checked-changed.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-checked-changed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,UAAU,yBAAyB,CACvC,CAAQ,EACR,IAAc,EACd,cAAgC;IAEhC,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAC;IAC3C,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO;IACtC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,OAAO,GACX,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC;IACjE,OAAO,CAAC,KAAK,CAAE,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAExC,kBAAkB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-clear.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-clear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAI5E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,QAoCtE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createFilterGroups } from "../create-filter-groups";
|
|
2
|
+
import { removeExcelFilterElements } from "./remove-excel-filter-elements";
|
|
3
|
+
export function excelFilterClear(grid, column) {
|
|
4
|
+
const state = grid._store.getState();
|
|
5
|
+
const excelFilters = state.view.excelFilters.filter((f) => f.columnId !== column.id);
|
|
6
|
+
const excelPopupFilters = state.view.excelPopupFilters.filter((filter) => filter.columnId !== column.id);
|
|
7
|
+
const filterGroup = createFilterGroups(excelPopupFilters);
|
|
8
|
+
const colsWithActiveExcelFilters = state.view.columnsWithActiveExcelFilters;
|
|
9
|
+
const newExcelFilterSet = new Set(colsWithActiveExcelFilters);
|
|
10
|
+
newExcelFilterSet.delete(column.id);
|
|
11
|
+
const colsWithActiveExcelPopupFilters = state.view.columnsWithActiveExcelPopupFilters;
|
|
12
|
+
const newPopupFilterSet = new Set(colsWithActiveExcelPopupFilters);
|
|
13
|
+
newPopupFilterSet.delete(column.id);
|
|
14
|
+
grid._store.update((draft) => {
|
|
15
|
+
draft.view.excelFilters = excelFilters;
|
|
16
|
+
draft.view.excelPopupFilters = excelPopupFilters;
|
|
17
|
+
draft.view.columnsWithActiveExcelFilters = newExcelFilterSet;
|
|
18
|
+
draft.view.columnsWithActiveExcelPopupFilters = newPopupFilterSet;
|
|
19
|
+
draft.view.currentExcelFilter = {
|
|
20
|
+
columnId: "",
|
|
21
|
+
checkBoxFilters: [],
|
|
22
|
+
originalCheckBoxFilters: [],
|
|
23
|
+
};
|
|
24
|
+
draft.view.currentExcelPopupFilters = [];
|
|
25
|
+
draft.view.filterGroup = filterGroup;
|
|
26
|
+
});
|
|
27
|
+
grid._services.data.applySortAndFilter(grid);
|
|
28
|
+
removeExcelFilterElements(grid);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=excel-filter-clear.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-clear.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-clear.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,MAAM,UAAU,gBAAgB,CAAC,IAAc,EAAE,MAAsB;IACrE,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IACrC,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY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AAC,WAAW,GAAG,WAAW,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAE7C,yBAAyB,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-data.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,iBAclE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function excelFilterData(rows, grid) {
|
|
2
|
+
const filters = grid._store.getState().view.excelFilters;
|
|
3
|
+
const columns = grid._store.getState().view.internalColumns;
|
|
4
|
+
for (const filter of filters) {
|
|
5
|
+
const field = columns.filter((col) => col.id === filter.columnId)[0].field;
|
|
6
|
+
if (filter.dateFilters) {
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
const checkedValues = filter.checkBoxFilters
|
|
10
|
+
.filter((f) => f.checked)
|
|
11
|
+
.map((f) => f.value);
|
|
12
|
+
rows = rows.filter((row) => checkedValues.includes(row.data[field]));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return rows;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=excel-filter-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-data.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-data.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,eAAe,CAAC,IAAmB,EAAE,IAAc;IACjE,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;IACzD,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC;IAC5D,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAE,CAAC,KAAK,CAAC;QAC5E,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,MAAM,aAAa,GAAG,MAAM,CAAC,eAAe;iBACzC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;iBACxB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACvB,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PolyGrid } from "../../../../core/grid";
|
|
2
|
+
import { InternalColumn } from "../../../column/interfaces/internal-column";
|
|
3
|
+
export declare function excelFilterIconclick(grid: PolyGrid, column: InternalColumn): void;
|
|
4
|
+
//# sourceMappingURL=excel-filter-icon-click.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-icon-click.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-icon-click.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAG5E,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,QAG1E"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { removeExcelFilterElements } from "./remove-excel-filter-elements";
|
|
2
|
+
export function excelFilterIconclick(grid, column) {
|
|
3
|
+
if (grid._runtime.excelFilter)
|
|
4
|
+
removeExcelFilterElements(grid);
|
|
5
|
+
grid._store.emitEvent("excelFilterShow", { column });
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=excel-filter-icon-click.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-icon-click.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-icon-click.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,MAAM,UAAU,oBAAoB,CAAC,IAAc,EAAE,MAAsB;IACzE,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW;QAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAC/D,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PolyGrid } from "../../../../core/grid";
|
|
2
|
+
import { InternalColumn } from "../../../column/interfaces/internal-column";
|
|
3
|
+
import { FilterOperator } from "../../interfaces/filter-operator";
|
|
4
|
+
export declare function excelFilterOperatorClick(grid: PolyGrid, column: InternalColumn, operator: FilterOperator, operators: FilterOperator[]): void;
|
|
5
|
+
//# sourceMappingURL=excel-filter-operator-click.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-operator-click.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-operator-click.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,cAAc,EAAE,QAO5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-operator-click.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-operator-click.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,wBAAwB,CACtC,IAAc,EACd,MAAsB,EACtB,QAAwB,EACxB,SAA2B;IAE3B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,sBAAsB,EAAE;QAC5C,MAAM;QACN,QAAQ;QACR,SAAS;KACV,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-select-all.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-select-all.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,wBAAgB,oBAAoB,CAClC,CAAC,EAAE,KAAK,EACR,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,QAAQ,QAaf"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function excelFilterSelectAll(e, dataType, grid) {
|
|
2
|
+
const input = e.target;
|
|
3
|
+
if (dataType !== "date") {
|
|
4
|
+
grid._store.update((draft) => {
|
|
5
|
+
const old = draft.view.currentExcelFilter.checkBoxFilters;
|
|
6
|
+
draft.view.currentExcelFilter.checkBoxFilters = old.map((f) => ({
|
|
7
|
+
...f,
|
|
8
|
+
checked: input.checked,
|
|
9
|
+
}));
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=excel-filter-select-all.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-select-all.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-select-all.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,oBAAoB,CAClC,CAAQ,EACR,QAAkB,EAClB,IAAc;IAEd,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAC;IAC3C,IAAI,QAAQ,KAAK,MAAM,EAAE,CAAC;QACxB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;YAC3B,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC;YAC1D,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,eAAe,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC9D,GAAG,CAAC;gBACJ,OAAO,EAAE,KAAK,CAAC,OAAO;aACvB,CAAC,CAAC,CAAC;QACN,CAAC,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;IACR,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-show.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-show.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAI5E,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,QAqDrE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { renderExcelFilter } from "../../../renderer/parts/excel-filter/excel-filter";
|
|
2
|
+
import { toggleSelectAllCbx } from "./toggle-select-all-cbx";
|
|
3
|
+
export function excelFilterShow(grid, column) {
|
|
4
|
+
const state = grid._store.getState();
|
|
5
|
+
const filterService = grid._services.filter;
|
|
6
|
+
const dataType = state.view.columnFilterOperators.find((op) => op.columnId === column.id).operator.columnType;
|
|
7
|
+
const originalData = state.view.rows;
|
|
8
|
+
// if we already have another filters, then apply this filters, because we want to show the data for this column without this entries
|
|
9
|
+
const filteredData = filterService.filterDataExcelExcluding(originalData, grid, column.id);
|
|
10
|
+
const colData = filteredData.map((row) => row.data[column.field]);
|
|
11
|
+
const uniqueData = new Set(colData);
|
|
12
|
+
const checkBoxFilters = [
|
|
13
|
+
...Array.from(uniqueData).map((data) => ({
|
|
14
|
+
checked: true,
|
|
15
|
+
value: data,
|
|
16
|
+
})),
|
|
17
|
+
];
|
|
18
|
+
const existingFilter = state.view.excelFilters.find((filter) => filter.columnId === column.id);
|
|
19
|
+
if (dataType === "date") {
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
// if we have already an applied filter, set the checkbox values, select all and indeterminate
|
|
23
|
+
if (existingFilter) {
|
|
24
|
+
const checkedValues = new Set(existingFilter.checkBoxFilters
|
|
25
|
+
.filter((filter) => filter.checked)
|
|
26
|
+
.map((filter) => filter.value));
|
|
27
|
+
for (let i = 0; i < checkBoxFilters.length; i++) {
|
|
28
|
+
checkBoxFilters[i].checked = checkedValues.has(checkBoxFilters[i].value);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
grid._store.update((draft) => {
|
|
32
|
+
draft.view.currentExcelFilter.columnId = column.id;
|
|
33
|
+
draft.view.currentExcelFilter.checkBoxFilters = checkBoxFilters;
|
|
34
|
+
draft.view.currentExcelFilter.originalCheckBoxFilters =
|
|
35
|
+
structuredClone(checkBoxFilters);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
renderExcelFilter(grid, column);
|
|
39
|
+
if (existingFilter) {
|
|
40
|
+
toggleSelectAllCbx(grid._runtime.selectAll, checkBoxFilters);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=excel-filter-show.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-filter-show.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-filter-show.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,UAAU,eAAe,CAAC,IAAc,EAAE,MAAsB;IACpE,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IACrC,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;IAC5C,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,IAAI,CACpD,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,KAAK,MAAM,CAAC,EAAE,CACjC,CAAC,QAAQ,CAAC,UAAU,CAAC;IACvB,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;IACrC,qIAAqI;IACrI,MAAM,YAAY,GAAG,aAAa,CAAC,wBAAwB,CACzD,YAAY,EACZ,IAAI,EACJ,MAAM,CAAC,EAAE,CACV,CAAC;IACF,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IACpC,MAAM,eAAe,GAAG;QACtB,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GA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AE,MAAM,CAAC,CAAC;IAEhC,IAAI,cAAc,EAAE,CAAC;QACnB,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAU,EAAE,eAAe,CAAC,CAAC;IAChE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-search-input.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-search-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,QAgCxD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export function excelSearchInput(e, grid) {
|
|
2
|
+
const filterService = grid._services.filter;
|
|
3
|
+
const currentExcelFilter = grid._store.getState().view.currentExcelFilter;
|
|
4
|
+
const input = e.target;
|
|
5
|
+
const currentValue = input.value;
|
|
6
|
+
// restore the original checkboxes, if we delete everything from the input field
|
|
7
|
+
if (!currentValue) {
|
|
8
|
+
grid._store.update((draft) => (draft.view.currentExcelFilter.checkBoxFilters =
|
|
9
|
+
currentExcelFilter.originalCheckBoxFilters));
|
|
10
|
+
grid._runtime.selectAll.checked = true;
|
|
11
|
+
grid._runtime.selectAll.indeterminate = false;
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
// if we already had some filters
|
|
15
|
+
// if (!currentValue && currentExcelFilter.checkBoxFilters.length > 0) {
|
|
16
|
+
// return;
|
|
17
|
+
// }
|
|
18
|
+
// otherwise show the filtered checkboxes
|
|
19
|
+
const filtered = currentExcelFilter.originalCheckBoxFilters.filter((filter) => {
|
|
20
|
+
return filter.value
|
|
21
|
+
.toString()
|
|
22
|
+
.toLowerCase()
|
|
23
|
+
.includes(currentValue.toLowerCase());
|
|
24
|
+
});
|
|
25
|
+
grid._store.update((draft) => (draft.view.currentExcelFilter.checkBoxFilters = filtered));
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=excel-search-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-search-input.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/excel-search-input.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB,CAAC,CAAQ,EAAE,IAAc;IACvD,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;IAC5C,MAAM,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC;IAC1E,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAC;IAC3C,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC;IACjC,gFAAgF;IAChF,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,IAAI,CAAC,MAAM,CAAC,MAAM,CAChB,CAAC,KAAK,EAAE,EAAE,CACR,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,eAAe;YAC5C,kBAAkB,CAAC,uBAAwB,CAAC,CACjD,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAU,CAAC,OAAO,GAAG,IAAI,CAAC;QACxC,IAAI,CAAC,QAAQ,CAAC,SAAU,CAAC,aAAa,GAAG,KAAK,CAAC;QAC/C,OAAO;IACT,CAAC;IACD,iCAAiC;IACjC,wEAAwE;IACxE,YAAY;IACZ,IAAI;IACJ,yCAAyC;IACzC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,uBAAwB,CAAC,MAAM,CACjE,CAAC,MAAM,EAAE,EAAE;QACT,OAAO,MAAM,CAAC,KAAK;aAChB,QAAQ,EAAE;aACV,WAAW,EAAE;aACb,QAAQ,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,CAAC;IAC1C,CAAC,CACF,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,MAAM,CAChB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,eAAe,GAAG,QAAQ,CAAC,CACtE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PolyGrid } from "../../../../core/grid";
|
|
2
|
+
import { PolyGridRow } from "../../../row/interfaces/row";
|
|
3
|
+
export declare function filterDataExcelExcluding(rows: PolyGridRow[], grid: PolyGrid, columnId: string): PolyGridRow[];
|
|
4
|
+
//# sourceMappingURL=filter-data-excel-excluding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-data-excel-excluding.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/filter-data-excel-excluding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,WAAW,EAAE,EACnB,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,MAAM,GACf,WAAW,EAAE,CAef"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function filterDataExcelExcluding(rows, grid, columnId) {
|
|
2
|
+
const filters = grid._store.getState().view.excelFilters;
|
|
3
|
+
const columns = grid._store.getState().view.internalColumns;
|
|
4
|
+
for (const filter of filters) {
|
|
5
|
+
if (filter.columnId === columnId)
|
|
6
|
+
continue;
|
|
7
|
+
const field = columns.filter((col) => col.id === filter.columnId)[0].field;
|
|
8
|
+
if (filter.dateFilters) {
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
const checkedValues = filter.checkBoxFilters
|
|
12
|
+
.filter((f) => f.checked)
|
|
13
|
+
.map((f) => f.value);
|
|
14
|
+
rows = rows.filter((row) => checkedValues.includes(row.data[field]));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return rows;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=filter-data-excel-excluding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-data-excel-excluding.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/filter-data-excel-excluding.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,wBAAwB,CACtC,IAAmB,EACnB,IAAc,EACd,QAAgB;IAEhB,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;IACzD,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC;IAC5D,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ;YAAE,SAAS;QAC3C,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAE,CAAC,KAAK,CAAC;QAC5E,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,MAAM,aAAa,GAAG,MAAM,CAAC,eAAe;iBACzC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;iBACxB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACvB,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/engine/services/filter/methods/excel-filter/is-excel-filter-operator-selected.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PolyGrid } from "../../../../core/grid";
|
|
2
|
+
import { InternalColumn } from "../../../column/interfaces/internal-column";
|
|
3
|
+
import { FilterOperator } from "../../interfaces/filter-operator";
|
|
4
|
+
export declare function isExcelFilterOperatorSelected(operator: FilterOperator, column: InternalColumn, grid: PolyGrid): boolean;
|
|
5
|
+
//# sourceMappingURL=is-excel-filter-operator-selected.d.ts.map
|
package/dist/engine/services/filter/methods/excel-filter/is-excel-filter-operator-selected.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-excel-filter-operator-selected.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/is-excel-filter-operator-selected.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,QAAQ,WAUf"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function isExcelFilterOperatorSelected(operator, column, grid) {
|
|
2
|
+
const state = grid._store.getState();
|
|
3
|
+
const popupFilters = state.view.excelPopupFilters.filter((f) => f.columnId === column.id);
|
|
4
|
+
return (operator.code === popupFilters[0]?.operator.code &&
|
|
5
|
+
state.view.columnsWithActiveExcelPopupFilters.has(column.id ?? ""));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=is-excel-filter-operator-selected.js.map
|
package/dist/engine/services/filter/methods/excel-filter/is-excel-filter-operator-selected.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-excel-filter-operator-selected.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/is-excel-filter-operator-selected.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,6BAA6B,CAC3C,QAAwB,EACxB,MAAsB,EACtB,IAAc;IAEd,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IACrC,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CACtD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,EAAE,CAChC,CAAC;IACF,OAAO,CACL,QAAQ,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI;QAChD,KAAK,CAAC,IAAI,CAAC,kCAAkC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CACnE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PolyGrid } from "../../../../core/grid";
|
|
2
|
+
import { InternalColumn } from "../../../column/interfaces/internal-column";
|
|
3
|
+
export declare function operatorsListHover(isHovering: boolean, grid: PolyGrid, column: InternalColumn): void;
|
|
4
|
+
//# sourceMappingURL=operators-list-hover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operators-list-hover.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/operators-list-hover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAE5E,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,OAAO,EACnB,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,cAAc,QAUvB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function operatorsListHover(isHovering, grid, column) {
|
|
2
|
+
if (isHovering) {
|
|
3
|
+
clearTimeout(grid._runtime.excelOperatorsHideTimeout);
|
|
4
|
+
}
|
|
5
|
+
else {
|
|
6
|
+
grid._runtime.excelOperatorsHideTimeout = setTimeout(() => {
|
|
7
|
+
grid._runtime.excelOperators?.remove();
|
|
8
|
+
grid._runtime.excelOperators = null;
|
|
9
|
+
}, 150);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=operators-list-hover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operators-list-hover.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/operators-list-hover.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,kBAAkB,CAChC,UAAmB,EACnB,IAAc,EACd,MAAsB;IAEtB,IAAI,UAAU,EAAE,CAAC;QACf,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;IACxD,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,QAAQ,CAAC,yBAAyB,GAAG,UAAU,CAAC,GAAG,EAAE;YACxD,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;YACvC,IAAI,CAAC,QAAQ,CAAC,cAAc,GAAG,IAAI,CAAC;QACtC,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popup-filter-apply.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/popup-filter-apply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAG5E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,QAsCtE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createFilterGroups } from "../create-filter-groups";
|
|
2
|
+
export function popupFilterApply(grid, column) {
|
|
3
|
+
const state = grid._store.getState();
|
|
4
|
+
const excelFilters = state.view.excelFilters.filter((filter) => filter.columnId !== column.id);
|
|
5
|
+
const excelPopupFilters = state.view.excelPopupFilters.filter((filter) => filter.columnId !== column.id);
|
|
6
|
+
const currentExcelPopupFilters = state.view.currentExcelPopupFilters;
|
|
7
|
+
excelPopupFilters.push(...currentExcelPopupFilters);
|
|
8
|
+
const colsWithActiveExcelFilters = state.view.columnsWithActiveExcelFilters;
|
|
9
|
+
const excelFilterSet = new Set(colsWithActiveExcelFilters);
|
|
10
|
+
excelFilterSet.add(column.id);
|
|
11
|
+
const colsWithActiveExcelPopupFilters = state.view.columnsWithActiveExcelPopupFilters;
|
|
12
|
+
const popupFilterSet = new Set(colsWithActiveExcelPopupFilters);
|
|
13
|
+
popupFilterSet.add(column.id);
|
|
14
|
+
const filterGroup = createFilterGroups(excelPopupFilters);
|
|
15
|
+
grid._store.update((draft) => {
|
|
16
|
+
draft.view.excelFilters = excelFilters;
|
|
17
|
+
draft.view.excelPopupFilters = excelPopupFilters;
|
|
18
|
+
draft.view.columnsWithActiveExcelFilters = excelFilterSet;
|
|
19
|
+
draft.view.columnsWithActiveExcelPopupFilters = popupFilterSet;
|
|
20
|
+
draft.view.currentExcelPopupFilters = [];
|
|
21
|
+
draft.view.filterGroup = filterGroup;
|
|
22
|
+
});
|
|
23
|
+
grid._services.data.applySortAndFilter(grid);
|
|
24
|
+
grid._runtime.excelFilterPopup.remove();
|
|
25
|
+
grid._runtime.excelFilterPopup = null;
|
|
26
|
+
grid._runtime.overlay.remove();
|
|
27
|
+
grid._runtime.overlay = null;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=popup-filter-apply.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popup-filter-apply.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/popup-filter-apply.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,UAA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D,KAAK,CAAC,IAAI,CAAC,kCAAkC,GAAG,cAAc,CAAC;QAC/D,KAAK,CAAC,IAAI,CAAC,wBAAwB,GAAG,EAAE,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAE7C,IAAI,CAAC,QAAQ,CAAC,gBAAiB,CAAC,MAAM,EAAE,CAAC;IACzC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAEtC,IAAI,CAAC,QAAQ,CAAC,OAAQ,CAAC,MAAM,EAAE,CAAC;IAChC,IAAI,CAAC,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PolyGrid } from "../../../../core/grid";
|
|
2
|
+
import { InternalColumn } from "../../../column/interfaces/internal-column";
|
|
3
|
+
import { FilterOperator } from "../../interfaces/filter-operator";
|
|
4
|
+
export declare function popupFilterShow(grid: PolyGrid, column: InternalColumn, operator: FilterOperator, operators: FilterOperator[]): void;
|
|
5
|
+
//# sourceMappingURL=popup-filter-show.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popup-filter-show.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/popup-filter-show.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAK5E,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE,wBAAgB,eAAe,CAC7B,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,cAAc,EAAE,QA2B5B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { renderExcelFilterPopup } from "../../../renderer/parts/excel-filter/excel-filter-popup";
|
|
2
|
+
import { renderOverlay } from "../../../renderer/parts/overlay/overlay";
|
|
3
|
+
import { LOGICAL_COMBINATOR } from "../../const/logical-combinator";
|
|
4
|
+
export function popupFilterShow(grid, column, operator, operators) {
|
|
5
|
+
const state = grid._store.getState();
|
|
6
|
+
const existingFilters = state.view.excelPopupFilters.filter((f) => f.columnId === column.id);
|
|
7
|
+
if (existingFilters.length === 0) {
|
|
8
|
+
grid._store.update((draft) => {
|
|
9
|
+
const initialFilter = {
|
|
10
|
+
columnId: column.id,
|
|
11
|
+
value: "",
|
|
12
|
+
dataType: state.view.columnFilterOperators.find((op) => op.columnId === column.id).operator.columnType,
|
|
13
|
+
operator: operator,
|
|
14
|
+
isEditorDisabled: false,
|
|
15
|
+
combinator: LOGICAL_COMBINATOR.AND,
|
|
16
|
+
};
|
|
17
|
+
draft.view.currentExcelPopupFilters = [initialFilter];
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
grid._store.update((draft) => {
|
|
22
|
+
draft.view.currentExcelPopupFilters = [...existingFilters];
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
renderOverlay(grid);
|
|
26
|
+
renderExcelFilterPopup(grid, column, operators);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=popup-filter-show.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popup-filter-show.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/popup-filter-show.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yDAAyD,CAAC;AACjG,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIpE,MAAM,UAAU,eAAe,CAC7B,IAAc,EACd,MAAsB,EACtB,Q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+
{"version":3,"file":"remove-excel-filter-elements.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/remove-excel-filter-elements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,QAAQ,QAQvD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function removeExcelFilterElements(grid) {
|
|
2
|
+
grid._runtime.excelFilter.remove();
|
|
3
|
+
grid._runtime.excelFilter = null;
|
|
4
|
+
grid._runtime.excelOperators?.remove();
|
|
5
|
+
grid._runtime.excelOperators = null;
|
|
6
|
+
grid._runtime.excelFilterUnsub?.();
|
|
7
|
+
grid._runtime.excelFilterUnsub = undefined;
|
|
8
|
+
grid._runtime.excelOperatorsHideTimeout = null;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=remove-excel-filter-elements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-excel-filter-elements.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/remove-excel-filter-elements.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,yBAAyB,CAAC,IAAc;IACtD,IAAI,CAAC,QAAQ,CAAC,WAAY,CAAC,MAAM,EAAE,CAAC;IACpC,IAAI,CAAC,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;IACjC,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;IACvC,IAAI,CAAC,QAAQ,CAAC,cAAc,GAAG,IAAI,CAAC;IACpC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,EAAE,CAAC;IACnC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAC3C,IAAI,CAAC,QAAQ,CAAC,yBAAyB,GAAG,IAAI,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PolyGrid } from "../../../../core/grid";
|
|
2
|
+
import { InternalColumn } from "../../../column/interfaces/internal-column";
|
|
3
|
+
export declare function showOperators(e: MouseEvent, isHovering: boolean, grid: PolyGrid, column: InternalColumn): void;
|
|
4
|
+
//# sourceMappingURL=show-operators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show-operators.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/show-operators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAG5E,wBAAgB,aAAa,CAC3B,CAAC,EAAE,UAAU,EACb,UAAU,EAAE,OAAO,EACnB,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,cAAc,QAWvB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { renderOperators } from "../../../renderer/parts/excel-filter/operators";
|
|
2
|
+
export function showOperators(e, isHovering, grid, column) {
|
|
3
|
+
if (isHovering) {
|
|
4
|
+
clearTimeout(grid._runtime.excelOperatorsHideTimeout);
|
|
5
|
+
if (!grid._runtime.excelOperators)
|
|
6
|
+
renderOperators(grid, column);
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
grid._runtime.excelOperatorsHideTimeout = setTimeout(() => {
|
|
10
|
+
grid._runtime.excelOperators?.remove();
|
|
11
|
+
grid._runtime.excelOperators = null;
|
|
12
|
+
}, 150); // delay allows time to move into popup
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=show-operators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show-operators.js","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/show-operators.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAEjF,MAAM,UAAU,aAAa,CAC3B,CAAa,EACb,UAAmB,EACnB,IAAc,EACd,MAAsB;IAEtB,IAAI,UAAU,EAAE,CAAC;QACf,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;QACtD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc;YAAE,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACnE,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,QAAQ,CAAC,yBAAyB,GAAG,UAAU,CAAC,GAAG,EAAE;YACxD,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;YACvC,IAAI,CAAC,QAAQ,CAAC,cAAc,GAAG,IAAI,CAAC;QACtC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,uCAAuC;IAClD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-select-all-cbx.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/filter/methods/excel-filter/toggle-select-all-cbx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,gBAAgB,EAChC,OAAO,EAAE,cAAc,EAAE,QAM1B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function toggleSelectAllCbx(selectAllChkBx, filters) {
|
|
2
|
+
selectAllChkBx.checked = filters.every((filter) => filter.checked);
|
|
3
|
+
selectAllChkBx.indeterminate =
|
|
4
|
+
!filters.every((filter) => filter.checked) &&
|
|
5
|
+
filters.some((f) => f.checked);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=toggle-select-all-cbx.js.map
|