@vizzly/dashboard 0.15.0-dev-7c9658e993e6c1d321c4d69f2e166bbb37cca3aa → 0.15.0-dev-fc9a212537551949051fa3edc71c9f0f8be72497
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/dashboard.cjs.development.js +21 -13
- package/dist/dashboard.cjs.production.min.js +1 -1
- package/dist/dashboard.esm.js +21 -13
- package/dist/shared-logic/src/AdditionalFilter/FilterConfig.d.ts +0 -2
- package/dist/shared-logic/src/Filter/Filter.d.ts +0 -1
- package/dist/shared-ui/src/components/AdditionalFilter/FiltersModal.d.ts +1 -1
- package/package.json +1 -1
|
@@ -40318,7 +40318,7 @@ var FiltersModal = function FiltersModal(_ref) {
|
|
|
40318
40318
|
show = _ref.show,
|
|
40319
40319
|
_onClose = _ref.onClose,
|
|
40320
40320
|
source = _ref.source,
|
|
40321
|
-
|
|
40321
|
+
_onDeleteItem = _ref.onDeleteItem,
|
|
40322
40322
|
onUpdate = _ref.onUpdate;
|
|
40323
40323
|
var dataSets = allDataSets.filter(function (dS) {
|
|
40324
40324
|
return !dS.preAggregated;
|
|
@@ -40382,7 +40382,8 @@ var FiltersModal = function FiltersModal(_ref) {
|
|
|
40382
40382
|
filterIndex: filterIndex
|
|
40383
40383
|
});
|
|
40384
40384
|
} : function () {},
|
|
40385
|
-
id: "filter_" + filterIndex
|
|
40385
|
+
id: "filter_" + filterIndex,
|
|
40386
|
+
context: _extends({}, filter)
|
|
40386
40387
|
});
|
|
40387
40388
|
}).filter(function (item) {
|
|
40388
40389
|
return !item.isHiddenFilter;
|
|
@@ -40401,7 +40402,18 @@ var FiltersModal = function FiltersModal(_ref) {
|
|
|
40401
40402
|
}), jsxRuntime.jsx(Modal.Content, {
|
|
40402
40403
|
children: jsxRuntime.jsx(ListView, {
|
|
40403
40404
|
mode: mode,
|
|
40404
|
-
onDeleteItem: onDeleteItem,
|
|
40405
|
+
onDeleteItem: function onDeleteItem(_index, filterToRemove) {
|
|
40406
|
+
var newFilters = [].concat(filters);
|
|
40407
|
+
var index = newFilters.findIndex(function (f) {
|
|
40408
|
+
return JSON.stringify(f) === JSON.stringify(filterToRemove);
|
|
40409
|
+
});
|
|
40410
|
+
if (index >= -1) {
|
|
40411
|
+
newFilters.splice(index, 1);
|
|
40412
|
+
_onDeleteItem(newFilters);
|
|
40413
|
+
} else {
|
|
40414
|
+
logDebug('Failed to find filter to remove', filters, filterToRemove);
|
|
40415
|
+
}
|
|
40416
|
+
},
|
|
40405
40417
|
newItemBtn: {
|
|
40406
40418
|
callToAction: source === 'global' ? textOverride('new_dashboard_filter', 'New dashboard filter') : textOverride('new_local_filter', 'New local filter'),
|
|
40407
40419
|
onClick: function onClick() {
|
|
@@ -40486,10 +40498,8 @@ var ManageGlobalFiltersButton = function ManageGlobalFiltersButton() {
|
|
|
40486
40498
|
var combineFilters = updateFilters(dashboard.globalFilters, payload);
|
|
40487
40499
|
setGlobalFilters(combineFilters);
|
|
40488
40500
|
};
|
|
40489
|
-
var
|
|
40490
|
-
|
|
40491
|
-
newGlobalFilters.splice(index, 1);
|
|
40492
|
-
setGlobalFilters(newGlobalFilters);
|
|
40501
|
+
var onFilterRemoved = function onFilterRemoved(remainingFilters) {
|
|
40502
|
+
setGlobalFilters(remainingFilters);
|
|
40493
40503
|
};
|
|
40494
40504
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
40495
40505
|
children: [jsxRuntime.jsx(FilterButton, {
|
|
@@ -40504,7 +40514,7 @@ var ManageGlobalFiltersButton = function ManageGlobalFiltersButton() {
|
|
|
40504
40514
|
show: isManageGlobalFiltersOpen,
|
|
40505
40515
|
onUpdate: handleUpdateFilters,
|
|
40506
40516
|
source: "global",
|
|
40507
|
-
onDeleteItem:
|
|
40517
|
+
onDeleteItem: onFilterRemoved,
|
|
40508
40518
|
onClose: function onClose() {
|
|
40509
40519
|
trackEvent('manageGlobalFilters.close');
|
|
40510
40520
|
setManageGlobalFiltersOpen(false);
|
|
@@ -58374,10 +58384,8 @@ var LocalFiltersModal = function LocalFiltersModal(props) {
|
|
|
58374
58384
|
var combineFilters = updateFilters(localFilters, payload);
|
|
58375
58385
|
props == null || props.setLocalFilters(combineFilters);
|
|
58376
58386
|
};
|
|
58377
|
-
var
|
|
58378
|
-
|
|
58379
|
-
newFilters.splice(index, 1);
|
|
58380
|
-
props == null || props.setLocalFilters(newFilters);
|
|
58387
|
+
var onFilterRemoved = function onFilterRemoved(remainingFilters) {
|
|
58388
|
+
props.setLocalFilters(remainingFilters);
|
|
58381
58389
|
};
|
|
58382
58390
|
return jsxRuntime.jsx(FiltersModal, {
|
|
58383
58391
|
dataSets: [dataSet],
|
|
@@ -58385,7 +58393,7 @@ var LocalFiltersModal = function LocalFiltersModal(props) {
|
|
|
58385
58393
|
show: props == null ? void 0 : props.show,
|
|
58386
58394
|
onUpdate: handleUpdateFilters,
|
|
58387
58395
|
source: "local",
|
|
58388
|
-
onDeleteItem:
|
|
58396
|
+
onDeleteItem: onFilterRemoved,
|
|
58389
58397
|
onClose: function onClose() {
|
|
58390
58398
|
return props == null ? void 0 : props.onClose();
|
|
58391
58399
|
}
|