@gooddata/sdk-ui-dashboard 11.18.0-alpha.5 → 11.18.0-alpha.6
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/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +5 -3
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/esm/kdaDialog/dialog/KdaDialog.d.ts.map +1 -1
- package/esm/kdaDialog/dialog/KdaDialog.js +4 -2
- package/esm/kdaDialog/dialog/KdaDialog.js.map +1 -1
- package/esm/plugins/customizationApis/customizationBuilder.d.ts.map +1 -1
- package/esm/plugins/customizationApis/customizationBuilder.js +3 -0
- package/esm/plugins/customizationApis/customizationBuilder.js.map +1 -1
- package/esm/plugins/customizationApis/filterGroupsCustomizer.d.ts +23 -0
- package/esm/plugins/customizationApis/filterGroupsCustomizer.d.ts.map +1 -0
- package/esm/plugins/customizationApis/filterGroupsCustomizer.js +110 -0
- package/esm/plugins/customizationApis/filterGroupsCustomizer.js.map +1 -0
- package/esm/plugins/customizationApis/filtersCustomizer.d.ts +3 -0
- package/esm/plugins/customizationApis/filtersCustomizer.d.ts.map +1 -1
- package/esm/plugins/customizationApis/filtersCustomizer.js +8 -1
- package/esm/plugins/customizationApis/filtersCustomizer.js.map +1 -1
- package/esm/plugins/customizer.d.ts +16 -1
- package/esm/plugins/customizer.d.ts.map +1 -1
- package/esm/presentation/dashboard/components/DashboardRenderer.d.ts.map +1 -1
- package/esm/presentation/dashboard/components/DashboardRenderer.js +2 -2
- package/esm/presentation/dashboard/components/DashboardRenderer.js.map +1 -1
- package/esm/presentation/dashboard/hooks/useDashboard.d.ts +2 -1
- package/esm/presentation/dashboard/hooks/useDashboard.d.ts.map +1 -1
- package/esm/presentation/dashboard/hooks/useDashboard.js +7 -1
- package/esm/presentation/dashboard/hooks/useDashboard.js.map +1 -1
- package/esm/presentation/dashboard/types.d.ts +16 -1
- package/esm/presentation/dashboard/types.d.ts.map +1 -1
- package/esm/presentation/dashboard/types.js.map +1 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts +2 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts.map +1 -1
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.js +1 -0
- package/esm/presentation/dashboardContexts/DashboardComponentsContext.js.map +1 -1
- package/esm/presentation/dashboardContexts/types.d.ts +10 -2
- package/esm/presentation/dashboardContexts/types.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.js +2 -2
- package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.js.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/types.d.ts +27 -0
- package/esm/presentation/filterBar/attributeFilter/types.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/DefaultDashboardFilterGroup.d.ts +7 -0
- package/esm/presentation/filterBar/filterBar/DefaultDashboardFilterGroup.d.ts.map +1 -0
- package/esm/presentation/filterBar/filterBar/DefaultDashboardFilterGroup.js +85 -0
- package/esm/presentation/filterBar/filterBar/DefaultDashboardFilterGroup.js.map +1 -0
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.js +4 -3
- package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.js.map +1 -1
- package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.d.ts +6 -0
- package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.js.map +1 -1
- package/esm/sdk-ui-dashboard.d.ts +116 -0
- package/package.json +18 -18
- package/styles/css/main.css +12 -0
- package/styles/css/main.css.map +1 -1
- package/esm/presentation/filterBar/filterBar/DashboardFilterGroup.d.ts +0 -15
- package/esm/presentation/filterBar/filterBar/DashboardFilterGroup.d.ts.map +0 -1
- package/esm/presentation/filterBar/filterBar/DashboardFilterGroup.js +0 -44
- package/esm/presentation/filterBar/filterBar/DashboardFilterGroup.js.map +0 -1
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2021-2026 GoodData Corporation
|
|
3
|
-
import { useCallback } from "react";
|
|
4
|
-
import { dashboardFilterLocalIdentifier, getSelectedElementsCount, } from "@gooddata/sdk-model";
|
|
5
|
-
import { FilterGroup } from "@gooddata/sdk-ui-filters";
|
|
6
|
-
import { isFilterBarAttributeFilter, } from "./useFiltersWithAddedPlaceholder.js";
|
|
7
|
-
import { convertDashboardAttributeFilterElementsUrisToValues } from "../../../_staging/dashboard/legacyFilterConvertors.js";
|
|
8
|
-
import { useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
9
|
-
import { selectSupportsElementUris } from "../../../model/store/backendCapabilities/backendCapabilitiesSelectors.js";
|
|
10
|
-
import { selectIsApplyFiltersAllAtOnceEnabledAndSet } from "../../../model/store/config/configSelectors.js";
|
|
11
|
-
import { selectAttributeFilterConfigsDisplayAsLabelMap } from "../../../model/store/tabs/attributeFilterConfigs/attributeFilterConfigsSelectors.js";
|
|
12
|
-
import { DefaultDashboardAttributeFilter } from "../attributeFilter/DefaultDashboardAttributeFilter.js";
|
|
13
|
-
/**
|
|
14
|
-
* @alpha
|
|
15
|
-
*/
|
|
16
|
-
export function DashboardFilterGroup(props) {
|
|
17
|
-
const { item, onAttributeFilterChanged } = props;
|
|
18
|
-
const supportElementUris = useDashboardSelector(selectSupportsElementUris);
|
|
19
|
-
const isApplyAllAtOnceEnabledAndSet = useDashboardSelector(selectIsApplyFiltersAllAtOnceEnabledAndSet);
|
|
20
|
-
const attributeFiltersDisplayAsLabelMap = useDashboardSelector(selectAttributeFilterConfigsDisplayAsLabelMap);
|
|
21
|
-
const getFilterIdentifier = useCallback((filter) => {
|
|
22
|
-
return dashboardFilterLocalIdentifier(filter.filter);
|
|
23
|
-
}, []);
|
|
24
|
-
const hasSelectedElements = useCallback((filter) => {
|
|
25
|
-
return getSelectedElementsCount(filter.filter) > 0;
|
|
26
|
-
}, []);
|
|
27
|
-
const renderFilter = useCallback((filter, AttributeFilterComponent) => {
|
|
28
|
-
const displayAsLabel = attributeFiltersDisplayAsLabelMap.get(filter.filter.attributeFilter.localIdentifier);
|
|
29
|
-
return (_jsx(DefaultDashboardAttributeFilter, { filter: filter.filter, AttributeFilterComponent: AttributeFilterComponent, onFilterChanged: onAttributeFilterChanged, workingFilter: isApplyAllAtOnceEnabledAndSet ? filter.workingFilter : undefined, displayAsLabel: displayAsLabel }));
|
|
30
|
-
}, [onAttributeFilterChanged, isApplyAllAtOnceEnabledAndSet, attributeFiltersDisplayAsLabelMap]);
|
|
31
|
-
const itemFilters = item.filters
|
|
32
|
-
.map((filter) => {
|
|
33
|
-
if (!isFilterBarAttributeFilter(filter)) {
|
|
34
|
-
return undefined;
|
|
35
|
-
}
|
|
36
|
-
if (supportElementUris) {
|
|
37
|
-
return filter;
|
|
38
|
-
}
|
|
39
|
-
return { ...filter, filter: convertDashboardAttributeFilterElementsUrisToValues(filter.filter) };
|
|
40
|
-
})
|
|
41
|
-
.filter((filter) => filter !== undefined);
|
|
42
|
-
return (_jsx(FilterGroup, { title: item.groupConfig.title, filters: itemFilters, getFilterIdentifier: getFilterIdentifier, hasSelectedElements: hasSelectedElements, renderFilter: renderFilter }));
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=DashboardFilterGroup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardFilterGroup.js","sourceRoot":"","sources":["../../../../src/presentation/filterBar/filterBar/DashboardFilterGroup.tsx"],"names":[],"mappings":";AAAA,qCAAqC;AAErC,OAAO,EAAsC,WAAW,EAAE,MAAM,OAAO,CAAC;AAExE,OAAO,EAEH,8BAA8B,EAC9B,wBAAwB,GAC3B,MAAM,qBAAqB,C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