@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
package/dist/dashboard.esm.js
CHANGED
|
@@ -40355,7 +40355,7 @@ var FiltersModal = function FiltersModal(_ref) {
|
|
|
40355
40355
|
show = _ref.show,
|
|
40356
40356
|
_onClose = _ref.onClose,
|
|
40357
40357
|
source = _ref.source,
|
|
40358
|
-
|
|
40358
|
+
_onDeleteItem = _ref.onDeleteItem,
|
|
40359
40359
|
onUpdate = _ref.onUpdate;
|
|
40360
40360
|
var dataSets = allDataSets.filter(function (dS) {
|
|
40361
40361
|
return !dS.preAggregated;
|
|
@@ -40419,7 +40419,8 @@ var FiltersModal = function FiltersModal(_ref) {
|
|
|
40419
40419
|
filterIndex: filterIndex
|
|
40420
40420
|
});
|
|
40421
40421
|
} : function () {},
|
|
40422
|
-
id: "filter_" + filterIndex
|
|
40422
|
+
id: "filter_" + filterIndex,
|
|
40423
|
+
context: _extends({}, filter)
|
|
40423
40424
|
});
|
|
40424
40425
|
}).filter(function (item) {
|
|
40425
40426
|
return !item.isHiddenFilter;
|
|
@@ -40438,7 +40439,18 @@ var FiltersModal = function FiltersModal(_ref) {
|
|
|
40438
40439
|
}), jsx(Modal.Content, {
|
|
40439
40440
|
children: jsx(ListView, {
|
|
40440
40441
|
mode: mode,
|
|
40441
|
-
onDeleteItem: onDeleteItem,
|
|
40442
|
+
onDeleteItem: function onDeleteItem(_index, filterToRemove) {
|
|
40443
|
+
var newFilters = [].concat(filters);
|
|
40444
|
+
var index = newFilters.findIndex(function (f) {
|
|
40445
|
+
return JSON.stringify(f) === JSON.stringify(filterToRemove);
|
|
40446
|
+
});
|
|
40447
|
+
if (index >= -1) {
|
|
40448
|
+
newFilters.splice(index, 1);
|
|
40449
|
+
_onDeleteItem(newFilters);
|
|
40450
|
+
} else {
|
|
40451
|
+
logDebug('Failed to find filter to remove', filters, filterToRemove);
|
|
40452
|
+
}
|
|
40453
|
+
},
|
|
40442
40454
|
newItemBtn: {
|
|
40443
40455
|
callToAction: source === 'global' ? textOverride('new_dashboard_filter', 'New dashboard filter') : textOverride('new_local_filter', 'New local filter'),
|
|
40444
40456
|
onClick: function onClick() {
|
|
@@ -40523,10 +40535,8 @@ var ManageGlobalFiltersButton = function ManageGlobalFiltersButton() {
|
|
|
40523
40535
|
var combineFilters = updateFilters(dashboard.globalFilters, payload);
|
|
40524
40536
|
setGlobalFilters(combineFilters);
|
|
40525
40537
|
};
|
|
40526
|
-
var
|
|
40527
|
-
|
|
40528
|
-
newGlobalFilters.splice(index, 1);
|
|
40529
|
-
setGlobalFilters(newGlobalFilters);
|
|
40538
|
+
var onFilterRemoved = function onFilterRemoved(remainingFilters) {
|
|
40539
|
+
setGlobalFilters(remainingFilters);
|
|
40530
40540
|
};
|
|
40531
40541
|
return jsxs(Fragment$1, {
|
|
40532
40542
|
children: [jsx(FilterButton, {
|
|
@@ -40541,7 +40551,7 @@ var ManageGlobalFiltersButton = function ManageGlobalFiltersButton() {
|
|
|
40541
40551
|
show: isManageGlobalFiltersOpen,
|
|
40542
40552
|
onUpdate: handleUpdateFilters,
|
|
40543
40553
|
source: "global",
|
|
40544
|
-
onDeleteItem:
|
|
40554
|
+
onDeleteItem: onFilterRemoved,
|
|
40545
40555
|
onClose: function onClose() {
|
|
40546
40556
|
trackEvent('manageGlobalFilters.close');
|
|
40547
40557
|
setManageGlobalFiltersOpen(false);
|
|
@@ -58438,10 +58448,8 @@ var LocalFiltersModal = function LocalFiltersModal(props) {
|
|
|
58438
58448
|
var combineFilters = updateFilters(localFilters, payload);
|
|
58439
58449
|
props == null || props.setLocalFilters(combineFilters);
|
|
58440
58450
|
};
|
|
58441
|
-
var
|
|
58442
|
-
|
|
58443
|
-
newFilters.splice(index, 1);
|
|
58444
|
-
props == null || props.setLocalFilters(newFilters);
|
|
58451
|
+
var onFilterRemoved = function onFilterRemoved(remainingFilters) {
|
|
58452
|
+
props.setLocalFilters(remainingFilters);
|
|
58445
58453
|
};
|
|
58446
58454
|
return jsx(FiltersModal, {
|
|
58447
58455
|
dataSets: [dataSet],
|
|
@@ -58449,7 +58457,7 @@ var LocalFiltersModal = function LocalFiltersModal(props) {
|
|
|
58449
58457
|
show: props == null ? void 0 : props.show,
|
|
58450
58458
|
onUpdate: handleUpdateFilters,
|
|
58451
58459
|
source: "local",
|
|
58452
|
-
onDeleteItem:
|
|
58460
|
+
onDeleteItem: onFilterRemoved,
|
|
58453
58461
|
onClose: function onClose() {
|
|
58454
58462
|
return props == null ? void 0 : props.onClose();
|
|
58455
58463
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { DataSet } from '../DataSet/types';
|
|
2
2
|
import { Query } from '../Query/types';
|
|
3
|
-
import { QueryAttributes } from '../QueryAttributes/types';
|
|
4
3
|
import { VariableList } from '../Variables/types';
|
|
5
4
|
import { AdditionalFilter, FilterConfig, TimeRangeOptions } from './types';
|
|
6
|
-
export declare const fromFilterConfig: (filterConfig: FilterConfig, dataSet: DataSet, timeRangeOptions: TimeRangeOptions) => QueryAttributes.Filter[][];
|
|
7
5
|
export declare const processAdditionalFilter: (filter: AdditionalFilter, dataSet: DataSet, timeRangeOptions: TimeRangeOptions, variables: VariableList) => Query['filter'];
|
|
8
6
|
/**
|
|
9
7
|
* Combines different types of filters (global, local, and view filters) into a single Query filter structure.
|
|
@@ -5,7 +5,6 @@ import { QueryAttributes } from '../QueryAttributes/types';
|
|
|
5
5
|
import { QueryEngineConfig } from '../QueryEngineConfig/types';
|
|
6
6
|
import { VariableList } from '../Variables/types';
|
|
7
7
|
export declare const addAndFilters: (filter: QueryAttributes['filter'], filterToAddToAll: QueryAttributes.Filter[][]) => QueryAttributes['filter'];
|
|
8
|
-
export declare const filterAttributeToQueryFilter: (filterAttrs: QueryAttributes.Filter[][], queryEngineConfig: QueryEngineConfig, dataSet: DataSet, params: Params) => Query['filter'];
|
|
9
8
|
export declare const convertArrayFilterStructureToQueryFilter: (arrayFilterStructure: QueryAttributes.Filter[][], variables: VariableList) => Query['filter'];
|
|
10
9
|
export declare const combineQueryFilters: (filter: Query['filter'], filterToAddToAll: Query['filter']) => Query['filter'];
|
|
11
10
|
/**
|
|
@@ -11,7 +11,7 @@ export declare const FiltersModal: FunctionComponent<{
|
|
|
11
11
|
show: boolean;
|
|
12
12
|
onClose: () => void;
|
|
13
13
|
source: 'local' | 'global';
|
|
14
|
-
onDeleteItem: (
|
|
14
|
+
onDeleteItem: (remainingFilters: AdditionalFilter[]) => void;
|
|
15
15
|
onUpdate: (payload: FilterInputPayload) => void;
|
|
16
16
|
}>;
|
|
17
17
|
export declare function updateFilters(filters: AdditionalFilter[], payload: FilterInputPayload): AdditionalFilter[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizzly/dashboard",
|
|
3
3
|
"author": "james@vizzly.co",
|
|
4
|
-
"version": "0.15.0-dev-
|
|
4
|
+
"version": "0.15.0-dev-fc9a212537551949051fa3edc71c9f0f8be72497",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "./dist/dashboard/src/index.d.ts",
|
|
7
7
|
"module": "./dist/dashboard.esm.js",
|