@gooddata/sdk-ui-dashboard 11.44.0-alpha.2 → 11.44.0
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/NOTICE +9 -9
- package/esm/__version.d.ts +1 -1
- package/esm/__version.d.ts.map +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/model/commandHandlers/drill/crossFilteringHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/drill/crossFilteringHandler.js +2 -3
- package/esm/model/commandHandlers/drill/drillToDashboardHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/drill/drillToDashboardHandler.js +1 -3
- package/esm/model/store/config/configSelectors.d.ts +0 -42
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +0 -56
- package/esm/model/store/tabs/layout/layoutSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/layout/layoutSelectors.js +2 -3
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +2 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.js +3 -2
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/DefaultAlertingDialog/hooks/useEditAlert.js +2 -2
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +49 -6
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.test.d.ts +2 -0
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.test.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/ScheduledEmailConnector.test.js +165 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +10 -5
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.js +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.js +2 -8
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailDialogContext.test.js +0 -1
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.d.ts +3 -0
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.js +38 -0
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.test.d.ts +2 -0
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.test.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/hooks/useBuildScheduledEmailManagementDialogContext.test.js +42 -0
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts +12 -1
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts +1 -6
- package/esm/presentation/automations/contexts/ScheduledEmailDialogContext.d.ts.map +1 -1
- package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.d.ts +54 -0
- package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.d.ts.map +1 -0
- package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.js +11 -0
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +2 -2
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useScheduleValidation.js +2 -2
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.js +5 -35
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContentBasic.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContentBasic.js +5 -15
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContentEnhanced.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialogContentEnhanced.js +7 -25
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/components/DeleteScheduleConfirmDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/components/DeleteScheduleConfirmDialog.js +3 -5
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailManagementDialog/components/ScheduledEmail.js +3 -6
- package/esm/presentation/automations/scheduledEmail/hooks/useScheduleEmailDialogAccessibility.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/hooks/useScheduleEmailDialogAccessibility.js +3 -4
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.js +2 -1
- package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.js +2 -4
- package/esm/presentation/dashboard/DashboardSidebar/FloatingToolbar.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/FloatingToolbar.js +2 -3
- package/esm/presentation/dragAndDrop/draggableFilterDropZone/DraggableFilterDropZone.d.ts.map +1 -1
- package/esm/presentation/dragAndDrop/draggableFilterDropZone/DraggableFilterDropZone.js +1 -3
- package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AddAttributeFilterPlaceholder.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AddAttributeFilterPlaceholder.js +1 -4
- package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AttributesDropdown.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AttributesDropdown.js +11 -6
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useAvailableDatasetsForItems.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useAvailableDatasetsForItems.js +1 -4
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/LimitValuesConfiguration.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/LimitValuesConfiguration.js +1 -3
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/ParentFiltersPage.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/ParentFiltersPage.js +1 -4
- package/esm/presentation/filterBar/filterBar/filterViews/AddFilterView.js +1 -1
- package/esm/presentation/filterBar/filterBar/filterViews/FilterViewsList.d.ts.map +1 -1
- package/esm/presentation/filterBar/filterBar/filterViews/FilterViewsList.js +18 -6
- package/esm/presentation/filterBar/parameterFilter/DashboardParameterFilter.d.ts.map +1 -1
- package/esm/presentation/filterBar/parameterFilter/DashboardParameterFilter.js +10 -3
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +8 -4
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +8 -4
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/DashboardInsightWithDrillDialog.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/DashboardInsightWithDrillDialog.js +2 -3
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js +2 -3
- package/esm/presentation/widget/insight/configuration/InsightCrossFiltering.d.ts +1 -1
- package/esm/presentation/widget/insight/configuration/InsightCrossFiltering.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightCrossFiltering.js +1 -6
- package/esm/sdk-ui-dashboard.d.ts +0 -49
- package/package.json +20 -20
- package/styles/css/main.css +12 -0
- package/styles/css/main.css.map +1 -1
|
@@ -6,14 +6,12 @@ import { useTheme } from "@gooddata/sdk-ui-theme-provider";
|
|
|
6
6
|
import { messages } from "../../../locales.js";
|
|
7
7
|
import { useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
8
8
|
import { selectSupportsMultipleDateFilters } from "../../../model/store/backendCapabilities/backendCapabilitiesSelectors.js";
|
|
9
|
-
import { selectEnableMultipleDateFilters } from "../../../model/store/config/configSelectors.js";
|
|
10
9
|
import { selectIsInEditMode } from "../../../model/store/renderMode/renderModeSelectors.js";
|
|
11
10
|
import { getDropZoneDebugStyle } from "../debug.js";
|
|
12
11
|
import { useDashboardDrop } from "../useDashboardDrop.js";
|
|
13
12
|
export function DraggableFilterDropZone({ targetIndex, onDrop }) {
|
|
14
13
|
const theme = useTheme();
|
|
15
14
|
const isEditMode = useDashboardSelector(selectIsInEditMode);
|
|
16
|
-
const enableMultipleDateFilters = useDashboardSelector(selectEnableMultipleDateFilters);
|
|
17
15
|
const supportsMultipleDateFilters = useDashboardSelector(selectSupportsMultipleDateFilters);
|
|
18
16
|
const [{ canDrop, isOver, itemType }, dropRef] = useDashboardDrop(["attributeFilter-placeholder"], {
|
|
19
17
|
drop: () => onDrop(targetIndex),
|
|
@@ -26,7 +24,7 @@ export function DraggableFilterDropZone({ targetIndex, onDrop }) {
|
|
|
26
24
|
const isActive = canDrop || isOver;
|
|
27
25
|
const dropzoneClassNames = cx("attr-filter-dropzone-box", "s-last-filter-drop-position", "s-attr-filter-dropzone-box", { "attr-filter-dropzone-box-active": isActive }, { "attr-filter-dropzone-box-over": isOver });
|
|
28
26
|
const debugStyle = getDropZoneDebugStyle({ isOver });
|
|
29
|
-
const tooltip =
|
|
27
|
+
const tooltip = supportsMultipleDateFilters
|
|
30
28
|
? messages.filterDropzoneTooltipGeneric
|
|
31
29
|
: messages.filterDropzoneTooltip;
|
|
32
30
|
return (_jsx("div", { className: "attr-filter-dropzone-box-outer", style: debugStyle, ref: dropRef, children: isActive ? (_jsx("div", { className: dropzoneClassNames, children: _jsx("div", { className: "attr-filter-dropzone-box-inner", children: _jsx(FormattedMessage, { id: "filterBar.filter.drop" }) }) })) : (_jsxs(BubbleHoverTrigger, { children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddAttributeFilterPlaceholder.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/filterBar/attributeFilter/addAttributeFilter/AddAttributeFilterPlaceholder.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddAttributeFilterPlaceholder.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/filterBar/attributeFilter/addAttributeFilter/AddAttributeFilterPlaceholder.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,EAAE,QAAQ,EAAE,EAAE,mCAAmC,2CAe9F"}
|
|
@@ -2,15 +2,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// (C) 2007-2026 GoodData Corporation
|
|
3
3
|
import cx from "classnames";
|
|
4
4
|
import { FormattedMessage } from "react-intl";
|
|
5
|
-
import { useDashboardSelector } from "../../../../model/react/DashboardStoreProvider.js";
|
|
6
|
-
import { selectEnableMultipleDateFilters } from "../../../../model/store/config/configSelectors.js";
|
|
7
5
|
/**
|
|
8
6
|
* @internal
|
|
9
7
|
*/
|
|
10
8
|
export function AddAttributeFilterPlaceholder({ disabled }) {
|
|
11
|
-
const enableMultipleDateFilters = useDashboardSelector(selectEnableMultipleDateFilters);
|
|
12
9
|
const className = cx("add-item-placeholder", "add-attribute-filter-placeholder", "s-add-attribute-filter", {
|
|
13
10
|
disabled,
|
|
14
11
|
});
|
|
15
|
-
return (_jsx("div", { className: className, children: _jsx(FormattedMessage, { id:
|
|
12
|
+
return (_jsx("div", { className: className, children: _jsx(FormattedMessage, { id: "addPanel.filter" }) }));
|
|
16
13
|
}
|
package/esm/presentation/filterBar/attributeFilter/addAttributeFilter/AttributesDropdown.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttributesDropdown.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/filterBar/attributeFilter/addAttributeFilter/AttributesDropdown.tsx"],"names":[],"mappings":"AAQA,OAAO,EAGH,KAAK,aAAa,EAGrB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"AttributesDropdown.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/filterBar/attributeFilter/addAttributeFilter/AttributesDropdown.tsx"],"names":[],"mappings":"AAQA,OAAO,EAGH,KAAK,aAAa,EAGrB,MAAM,qBAAqB,CAAC;AAgB7B,OAAO,EAAE,KAAK,yCAAyC,EAAE,MAAM,aAAa,CAAC;AA8D7E;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACjB;AAMD;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,yCAAyC;IACvF,0FAA0F;IAC1F,UAAU,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC1C,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;CACpD;AA6BD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EAC/B,EAAE,EACF,SAAS,EACT,aAAa,EACb,OAAO,EACP,MAAM,EACN,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,QAAa,EACb,UAAiB,EACjB,uBAAkD,EAClD,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,UAAe,EACf,iBAAiB,EACpB,EAAE,wBAAwB,2CA4U1B"}
|
|
@@ -8,7 +8,7 @@ import { isCatalogAttribute, isCatalogMeasure, } from "@gooddata/sdk-model";
|
|
|
8
8
|
import { Dropdown, DropdownList, SingleSelectListItem, UiIcon, isEscapeKey, useIdPrefixed, } from "@gooddata/sdk-ui-kit";
|
|
9
9
|
import { useDashboardSelector } from "../../../../model/react/DashboardStoreProvider.js";
|
|
10
10
|
import { selectSupportsMultipleDateFilters } from "../../../../model/store/backendCapabilities/backendCapabilitiesSelectors.js";
|
|
11
|
-
import { selectEnableMeasureValueFilterKD
|
|
11
|
+
import { selectEnableMeasureValueFilterKD } from "../../../../model/store/config/configSelectors.js";
|
|
12
12
|
import { selectInsightsMap } from "../../../../model/store/insights/insightsSelectors.js";
|
|
13
13
|
import { selectAllInsightWidgets } from "../../../../model/store/tabs/layout/layoutSelectors.js";
|
|
14
14
|
import { AddAttributeFilterButton } from "./AddAttributeFilterButton.js";
|
|
@@ -102,7 +102,6 @@ export function AttributesDropdown({ id, className, bodyClassName, onClose, onOp
|
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
}, []);
|
|
105
|
-
const enableMultipleDateFilters = useDashboardSelector(selectEnableMultipleDateFilters);
|
|
106
105
|
const supportsMultipleDateFilters = useDashboardSelector(selectSupportsMultipleDateFilters);
|
|
107
106
|
const enableMeasureValueFilterKD = useDashboardSelector(selectEnableMeasureValueFilterKD);
|
|
108
107
|
const insightsMap = useDashboardSelector(selectInsightsMap);
|
|
@@ -126,7 +125,6 @@ export function AttributesDropdown({ id, className, bodyClassName, onClose, onOp
|
|
|
126
125
|
? attributes.filter((a) => a.attribute.title.toLowerCase().includes(searchQuery.toLowerCase()))
|
|
127
126
|
: attributes;
|
|
128
127
|
}, [attributes, searchQuery]);
|
|
129
|
-
const offerDateFilters = enableMultipleDateFilters && supportsMultipleDateFilters;
|
|
130
128
|
const filteredDateDatasets = useMemo(() => {
|
|
131
129
|
return searchQuery
|
|
132
130
|
? dateDatasets.filter((ds) => ds.dataSet.title.toLowerCase().includes(searchQuery.toLowerCase()))
|
|
@@ -145,7 +143,7 @@ export function AttributesDropdown({ id, className, bodyClassName, onClose, onOp
|
|
|
145
143
|
: parameters;
|
|
146
144
|
}, [parameters, searchQuery]);
|
|
147
145
|
const hasAttributes = useMemo(() => attributes.length > 0, [attributes]);
|
|
148
|
-
const hasDateFilters = useMemo(() =>
|
|
146
|
+
const hasDateFilters = useMemo(() => supportsMultipleDateFilters && dateDatasets.length > 0, [dateDatasets, supportsMultipleDateFilters]);
|
|
149
147
|
const hasMeasures = useMemo(() => metricMeasures.length > 0, [metricMeasures]);
|
|
150
148
|
const hasParameters = useMemo(() => parameters.length > 0, [parameters]);
|
|
151
149
|
const defaultSelectedTabId = createDefaultSelectedTabId({
|
|
@@ -169,7 +167,7 @@ export function AttributesDropdown({ id, className, bodyClassName, onClose, onOp
|
|
|
169
167
|
if (enableMeasureValueFilterKD && metricMeasures.length) {
|
|
170
168
|
newTabs.push({ id: "metrics", iconOnly: true, icon: "gd-icon-metric" });
|
|
171
169
|
}
|
|
172
|
-
if (
|
|
170
|
+
if (supportsMultipleDateFilters && dateDatasets.length) {
|
|
173
171
|
newTabs.push({ id: "dateDatasets", iconOnly: true, icon: "gd-icon-date" });
|
|
174
172
|
}
|
|
175
173
|
if (parameters.length) {
|
|
@@ -180,7 +178,14 @@ export function AttributesDropdown({ id, className, bodyClassName, onClose, onOp
|
|
|
180
178
|
});
|
|
181
179
|
}
|
|
182
180
|
return newTabs;
|
|
183
|
-
}, [
|
|
181
|
+
}, [
|
|
182
|
+
attributes,
|
|
183
|
+
dateDatasets,
|
|
184
|
+
enableMeasureValueFilterKD,
|
|
185
|
+
metricMeasures,
|
|
186
|
+
supportsMultipleDateFilters,
|
|
187
|
+
parameters,
|
|
188
|
+
]);
|
|
184
189
|
const buttonTitle = intl.formatMessage({ id: "addPanel.filter" });
|
|
185
190
|
const items = useMemo(() => {
|
|
186
191
|
if (selectedTabId === "attributes") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAvailableDatasetsForItems.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useAvailableDatasetsForItems.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useAvailableDatasetsForItems.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useAvailableDatasetsForItems.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAUzF;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,mBAAmB,EAAE;;;;;;;;;;EA4CxE"}
|
|
@@ -4,15 +4,12 @@ import { queryAvailableDatasetsForItems, } from "../../../../../../model/queries
|
|
|
4
4
|
import { useDashboardSelector } from "../../../../../../model/react/DashboardStoreProvider.js";
|
|
5
5
|
import { useDashboardQueryProcessing } from "../../../../../../model/react/useDashboardQueryProcessing.js";
|
|
6
6
|
import { selectBackendCapabilities } from "../../../../../../model/store/backendCapabilities/backendCapabilitiesSelectors.js";
|
|
7
|
-
import { selectEnableKDAttributeFilterDatesValidation } from "../../../../../../model/store/config/configSelectors.js";
|
|
8
7
|
/**
|
|
9
8
|
* @internal
|
|
10
9
|
*/
|
|
11
10
|
export function useAvailableDatasetsForItems(items) {
|
|
12
|
-
const enableKDAttributeFilterDatesValidation = useDashboardSelector(selectEnableKDAttributeFilterDatesValidation);
|
|
13
11
|
const capabilities = useDashboardSelector(selectBackendCapabilities);
|
|
14
|
-
const shouldLoadAvailableDatasetsForItems =
|
|
15
|
-
capabilities.supportsAttributeFilterElementsLimitingByDependentDateFilters;
|
|
12
|
+
const shouldLoadAvailableDatasetsForItems = capabilities.supportsAttributeFilterElementsLimitingByDependentDateFilters;
|
|
16
13
|
const { run: getAvilableDatasetForItems, result: availableDatasetForItems, status: availableDatasetForItemsLoadingStatus, error: availableDatasetForItemsError, } = useDashboardQueryProcessing({
|
|
17
14
|
queryCreator: queryAvailableDatasetsForItems,
|
|
18
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LimitValuesConfiguration.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/LimitValuesConfiguration.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,qBAAqB,EAAW,MAAM,YAAY,CAAC;AAEnF,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,MAAM,EAId,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;
|
|
1
|
+
{"version":3,"file":"LimitValuesConfiguration.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/LimitValuesConfiguration.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,qBAAqB,EAAW,MAAM,YAAY,CAAC;AAEnF,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,MAAM,EAId,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AAI3F,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,uDAAuD,CAAC;AACjH,OAAO,EACH,KAAK,6BAA6B,EAErC,MAAM,kDAAkD,CAAC;AAW1D,UAAU,8BAA8B;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,mCAAmC,EAAE,CAAC;IACrD,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,eAAe,EAAE,gBAAgB,CAAC;IAClC,iBAAiB,EAAE,mBAAmB,EAAE,CAAC;IACzC,oBAAoB,EAAE,6BAA6B,EAAE,CAAC;IACtD,yBAAyB,EAAE,oBAAoB,CAAC;IAChD,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAChD,oBAAoB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAChG,2BAA2B,EAAE,CACzB,IAAI,EAAE,6BAA6B,EACnC,UAAU,EAAE,OAAO,EACnB,YAAY,EAAE,OAAO,KACpB,IAAI,CAAC;CACb;AA6GD,MAAM,MAAM,sCAAsC,GAAG,8BAA8B,GAAG,qBAAqB,CAAC;AAE5G,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,sCAAsC,kDAU9F"}
|
|
@@ -9,7 +9,6 @@ import { messages } from "../../../../../../locales.js";
|
|
|
9
9
|
import { useDashboardSelector } from "../../../../../../model/react/DashboardStoreProvider.js";
|
|
10
10
|
import { useDashboardUserInteraction } from "../../../../../../model/react/useDashboardUserInteraction.js";
|
|
11
11
|
import { selectBackendCapabilities } from "../../../../../../model/store/backendCapabilities/backendCapabilitiesSelectors.js";
|
|
12
|
-
import { selectEnableKDAttributeFilterDatesValidation } from "../../../../../../model/store/config/configSelectors.js";
|
|
13
12
|
import { isDashboardDependentDateFilter, } from "../../../../../../model/types/dateFilterTypes.js";
|
|
14
13
|
import { IntlWrapper } from "../../../../../localization/IntlWrapper.js";
|
|
15
14
|
import { AddLimitingItemDialog } from "./dialog/AddLimitingItemDialog.js";
|
|
@@ -18,10 +17,9 @@ import { useLimitingItems } from "./shared/limitingItemsHook.js";
|
|
|
18
17
|
const extractKey = (item) => isObjRef(item) ? serializeObjRef(item) : item.localIdentifier;
|
|
19
18
|
function LimitValuesConfiguration({ attributeTitle, parentFilters, validParentFilters, validateElementsBy, metricsAndFacts, availableDatasets, dependentDateFilters, dependentCommonDateFilter, onLimitingItemUpdate, onParentFilterUpdate, onDependentDateFilterUpdate, }) {
|
|
20
19
|
const intl = useIntl();
|
|
21
|
-
const isEnabledKDAttributeFilterDatesValidation = useDashboardSelector(selectEnableKDAttributeFilterDatesValidation);
|
|
22
20
|
const { attributeFilterInteraction } = useDashboardUserInteraction();
|
|
23
21
|
const [isDropdownOpened, setIsDropdownOpened] = useState(false);
|
|
24
|
-
const itemsWithTitles = useLimitingItems(parentFilters, validParentFilters, validateElementsBy, metricsAndFacts, dependentDateFilters, availableDatasets,
|
|
22
|
+
const itemsWithTitles = useLimitingItems(parentFilters, validParentFilters, validateElementsBy, metricsAndFacts, dependentDateFilters, availableDatasets, true, true, intl);
|
|
25
23
|
const commonDateFilterTitle = useCommonDateFilterTitle(intl);
|
|
26
24
|
const onOpenAddDialog = () => {
|
|
27
25
|
setIsDropdownOpened(true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParentFiltersPage.d.ts","sourceRoot":"","sources":["../../../../../../../../src/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/ParentFiltersPage.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,MAAM,EAEd,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ParentFiltersPage.d.ts","sourceRoot":"","sources":["../../../../../../../../src/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/limitValues/dialog/ParentFiltersPage.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,MAAM,EAEd,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,0DAA0D,CAAC;AACpH,OAAO,EACH,KAAK,6BAA6B,EAErC,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAO/D,MAAM,WAAW,uBAAuB;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,mCAAmC,EAAE,CAAC;IACrD,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,oBAAoB,EAAE,6BAA6B,EAAE,CAAC;IACtD,iBAAiB,EAAE,mBAAmB,EAAE,CAAC;IACzC,yBAAyB,EAAE,oBAAoB,CAAC;IAChD,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC7C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAClC;AAuGD,wBAAgB,iBAAiB,CAAC,EAC9B,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,kBAAkB,EACrB,EAAE,uBAAuB,2CA0CzB"}
|
|
@@ -5,9 +5,7 @@ import { serializeObjRef, } from "@gooddata/sdk-model";
|
|
|
5
5
|
import { DropdownList, NoData } from "@gooddata/sdk-ui-kit";
|
|
6
6
|
import { simplifyText } from "@gooddata/util";
|
|
7
7
|
import { messages } from "../../../../../../../locales.js";
|
|
8
|
-
import { useDashboardSelector } from "../../../../../../../model/react/DashboardStoreProvider.js";
|
|
9
8
|
import { useDashboardUserInteraction } from "../../../../../../../model/react/useDashboardUserInteraction.js";
|
|
10
|
-
import { selectEnableKDAttributeFilterDatesValidation } from "../../../../../../../model/store/config/configSelectors.js";
|
|
11
9
|
import { isDashboardDependentDateFilter, } from "../../../../../../../model/types/dateFilterTypes.js";
|
|
12
10
|
import { LimitingItemTitle, UnknownItemTitle } from "../shared/LimitingItem.js";
|
|
13
11
|
import { useFilterItems } from "../shared/limitingItemsHook.js";
|
|
@@ -58,8 +56,7 @@ function ParentFilter({ item: { title, item, type, isDisabled, isDisabledDateFil
|
|
|
58
56
|
}
|
|
59
57
|
export function ParentFiltersPage({ attributeTitle, parentFilters, validParentFilters, dependentDateFilters, dependentCommonDateFilter, availableDatasets, commonDateFilterTitle, onSelect, onGoBack, onClose, onCommonDateSelect, }) {
|
|
60
58
|
const intl = useIntl();
|
|
61
|
-
const
|
|
62
|
-
const items = useFilterItems(parentFilters, validParentFilters, dependentDateFilters, availableDatasets, dependentCommonDateFilter, isEnabledKDAttributeFilterDatesValidation, false, intl);
|
|
59
|
+
const items = useFilterItems(parentFilters, validParentFilters, dependentDateFilters, availableDatasets, dependentCommonDateFilter, true, false, intl);
|
|
63
60
|
return (_jsxs(_Fragment, { children: [
|
|
64
61
|
_jsx(PopupHeader, { title: intl.formatMessage(messages.filterAddFilterTitle), onGoBack: onGoBack, onClose: onClose }), _jsx("div", { className: "attribute-filter__limit__popup__list", children: _jsx(DropdownList, { width: 250, isMobile: false, showSearch: false, renderNoData: (props) => _jsx(NoParentFilterFound, { ...props }), items: items, renderItem: ({ item }) => (_jsx(ParentFilter, { attributeTitle: attributeTitle, commonDateFilterTitle: commonDateFilterTitle, item: item, onSelect: onSelect, onClose: onClose, onCommonDateSelect: onCommonDateSelect })) }) })
|
|
65
62
|
] }));
|
|
@@ -19,7 +19,7 @@ export function AddFilterView({ onClose, onSave, titleId }) {
|
|
|
19
19
|
}
|
|
20
20
|
}, [isSaveEnabled, isDefault, name, dispatch, onSave]);
|
|
21
21
|
return (_jsx(UiFocusManager, { enableFocusTrap: true, enableAutofocus: true, children: _jsxs("div", { className: "configuration-panel configuration-panel__filter-view__add", children: [
|
|
22
|
-
_jsx(UiSubmenuHeader, { title: intl.formatMessage({ id: "filters.filterViews.add.title" }), onBack: onClose, backAriaLabel: intl.formatMessage({ id: "
|
|
22
|
+
_jsx(UiSubmenuHeader, { title: intl.formatMessage({ id: "filters.filterViews.add.title" }), onBack: onClose, backAriaLabel: intl.formatMessage({ id: "filters.filterViews.add.backAriaLabel" }), useShortenedTitle: false, height: "medium", titleId: titleId }), _jsxs("div", { className: "configuration-category", children: [
|
|
23
23
|
_jsx(Input, { value: name, isSmall: true, onChange: onInputChange, label: intl.formatMessage({ id: "filters.filterViews.add.nameLabel" }), placeholder: intl.formatMessage({ id: "filters.filterViews.add.namePlaceholder" }), onEnterKeyPress: handleSave, autofocus: true }), _jsx("div", { className: "gd-filter-view-add-checkbox-row", children: _jsx(Checkbox, { value: isDefault, onChange: setDefault, text: intl.formatMessage({ id: "filters.filterViews.add.setAsDefaultLabel" }) }) }), _jsx("div", { className: "gd-message information gd-filter-view-add-hint", children: _jsx(FormattedMessage, { id: "filters.filterViews.add.hint" }) })
|
|
24
24
|
] }), _jsx("div", { className: "configuration-panel-footer", children: _jsxs("div", { className: "configuration-panel-footer__content", children: [
|
|
25
25
|
_jsx(Button, { size: "small", onClick: onClose, className: "gd-button gd-button-secondary", children: _jsx(FormattedMessage, { id: "filters.filterViews.add.cancelButton" }) }), _jsx(Button, { intent: "action", size: "small", onClick: handleSave, disabled: !isSaveEnabled, children: _jsx(FormattedMessage, { id: "filters.filterViews.add.saveButton" }) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterViewsList.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/filterBar/filterBar/filterViews/FilterViewsList.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,oBAAoB,EAAkB,MAAM,qBAAqB,CAAC;AAmMhF,MAAM,WAAW,6BAA6B;IAC1C,WAAW,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAC;IAChD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,EAC5B,WAAgB,EAChB,QAAQ,EACR,OAAO,EACP,OAAO,EAAE,WAAW,EACvB,EAAE,6BAA6B,
|
|
1
|
+
{"version":3,"file":"FilterViewsList.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/filterBar/filterBar/filterViews/FilterViewsList.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,oBAAoB,EAAkB,MAAM,qBAAqB,CAAC;AAmMhF,MAAM,WAAW,6BAA6B;IAC1C,WAAW,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAC;IAChD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,EAC5B,WAAgB,EAChB,QAAQ,EACR,OAAO,EACP,OAAO,EAAE,WAAW,EACvB,EAAE,6BAA6B,2CAwO/B"}
|
|
@@ -50,6 +50,7 @@ export function FilterViewsList({ filterViews = [], onAddNew, onClose, titleId:
|
|
|
50
50
|
const infoButtonId = `filter-view-info-${id}`;
|
|
51
51
|
const filterViewTooltipId = `filter-view-tooltip-${id}`;
|
|
52
52
|
const titleId = titleIdProp ?? `filter-views-title-${id}`;
|
|
53
|
+
const scopedIdStoreValue = useScopedIdStoreValue((item) => item ? objRefToString(item.ref) : "");
|
|
53
54
|
const getItemAdditionalActions = useCallback(() => {
|
|
54
55
|
if (!canCreateFilterView) {
|
|
55
56
|
return [];
|
|
@@ -100,7 +101,6 @@ export function FilterViewsList({ filterViews = [], onAddNew, onClose, titleId:
|
|
|
100
101
|
const contentTooltip = (_jsx("div", { className: "gd-filter-view__list__tooltip", children: _jsx(FormattedMessage, { id: "filters.filterViews.dropdown.tooltip", values: {
|
|
101
102
|
p: (chunks) => _jsx("p", { children: chunks }),
|
|
102
103
|
} }) }));
|
|
103
|
-
const scopedIdStoreValue = useScopedIdStoreValue((item) => item ? objRefToString(item.ref) : "");
|
|
104
104
|
const { containerRef } = useFocusWithinContainer(scopedIdStoreValue.makeId({ item: focusedItem, specifier: focusedAction }) ?? "");
|
|
105
105
|
const handleBlur = useCallback(
|
|
106
106
|
// Select the default action when the focus leaves the list
|
|
@@ -108,12 +108,18 @@ export function FilterViewsList({ filterViews = [], onAddNew, onClose, titleId:
|
|
|
108
108
|
if (containerRef.current?.contains(e.relatedTarget)) {
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
+
if (filterViewToDelete) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
111
114
|
setFocusedAction(SELECT_ITEM_ACTION);
|
|
112
|
-
}, [containerRef, setFocusedAction]);
|
|
115
|
+
}, [containerRef, filterViewToDelete, setFocusedAction]);
|
|
113
116
|
return (_jsxs(UiFocusManager, { enableFocusTrap: true, enableAutofocus: { refocusKey, initialFocus: infoButtonId }, children: [filterViewToDelete ? (_jsx(FilterViewDeleteConfirm, { filterView: filterViewToDelete, onConfirm: () => {
|
|
114
117
|
dispatch(deleteFilterView(filterViewToDelete.ref));
|
|
115
118
|
setFilterViewToDelete(undefined);
|
|
116
|
-
}, onCancel: () =>
|
|
119
|
+
}, onCancel: () => {
|
|
120
|
+
setFocusedAction("delete");
|
|
121
|
+
setFilterViewToDelete(undefined);
|
|
122
|
+
} })) : null, _jsxs("div", { className: "configuration-panel configuration-panel__filter-view__list", children: [
|
|
117
123
|
_jsx("div", { className: "configuration-panel-header", children: _jsxs("div", { className: "gd-title-with-icon", children: [
|
|
118
124
|
_jsx(Typography, { tagName: "h3", className: "configuration-panel-header-title", id: titleId, children: _jsx(FormattedMessage, { id: "filters.filterViews.dropdown.title" }) }), _jsx(UiTooltip, { id: filterViewTooltipId, arrowPlacement: "top-end", content: contentTooltip, anchor: _jsx(UiIconButton, { id: infoButtonId, icon: "question", variant: "tertiary", size: "small", accessibilityConfig: {
|
|
119
125
|
ariaDescribedBy: filterViewTooltipId,
|
|
@@ -121,9 +127,15 @@ export function FilterViewsList({ filterViews = [], onAddNew, onClose, titleId:
|
|
|
121
127
|
id: "filters.filterViews.tooltip.ariaLabel",
|
|
122
128
|
}),
|
|
123
129
|
} }), triggerBy: ["hover", "focus"] })
|
|
124
|
-
] }) }), _jsx(ScopedIdStore, { value: scopedIdStoreValue, children: _jsx("div", { className: "configuration-category gd-filter-view__list", role: "grid", ref: containerRef, onKeyDown: onKeyboardNavigation, onBlur: handleBlur, tabIndex: -1, id: scopedIdStoreValue.containerId, "aria-label":
|
|
125
|
-
?
|
|
126
|
-
|
|
130
|
+
] }) }), _jsx(ScopedIdStore, { value: scopedIdStoreValue, children: _jsx("div", { className: "configuration-category gd-filter-view__list", role: "grid", ref: containerRef, onKeyDown: onKeyboardNavigation, onBlur: handleBlur, tabIndex: -1, id: scopedIdStoreValue.containerId, "aria-label": filterViews.length > 0
|
|
131
|
+
? canCreateFilterView
|
|
132
|
+
? intl.formatMessage({
|
|
133
|
+
id: "filters.filterViews.list.ariaLabel.withActions",
|
|
134
|
+
})
|
|
135
|
+
: intl.formatMessage({
|
|
136
|
+
id: "filters.filterViews.list.ariaLabel.noActions",
|
|
137
|
+
})
|
|
138
|
+
: undefined, "aria-labelledby": filterViews.length === 0 ? titleId : undefined, "aria-rowcount": filterViews.length, children: isLoading ? (_jsx("div", { role: "row", children: _jsx("div", { role: "gridcell", children: _jsx("div", { className: "gd-filter-view__list__empty", children: _jsx(LoadingComponent, {}) }) }) })) : filterViews.length > 0 ? (filterViews.map((filterView, index) => (_jsx(FilterListItem, { item: filterView, index: index, focusedAction: filterView === focusedItem ? focusedAction : undefined, onApply: createSelectHandler(filterView), onSetAsDefault: createSetAsDefaultHandler(filterView), onDelete: createDeleteHandler(filterView) }, objRefToString(filterView.ref))))) : (_jsx("div", { role: "row", children: _jsx("div", { role: "gridcell", children: _jsx("div", { className: "gd-filter-view__list__empty", children: _jsx(FormattedMessage, { id: "filters.filterViews.dropdown.emptyList" }) }) }) })) }) }), _jsx("div", { className: "configuration-panel-footer", children: _jsx("div", { className: "configuration-panel-footer__content", children: _jsx(Button, { id: createViewId, className: "gd-button gd-button gd-button-link", iconLeft: "gd-icon-plus", size: "small", onClick: onAddNew, disabled: !canCreateFilterView, accessibilityConfig: {
|
|
127
139
|
ariaExpanded: false,
|
|
128
140
|
ariaHaspopup: "dialog",
|
|
129
141
|
}, children: _jsx(FormattedMessage, { id: "filters.filterViews.dropdown.newButton" }) }) }) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardParameterFilter.d.ts","sourceRoot":"","sources":["../../../../src/presentation/filterBar/parameterFilter/DashboardParameterFilter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardParameterFilter.d.ts","sourceRoot":"","sources":["../../../../src/presentation/filterBar/parameterFilter/DashboardParameterFilter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,EAEH,KAAK,mBAAmB,EAG3B,MAAM,qBAAqB,CAAC;AAkB7B;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,SAAS,EAAE,mBAAmB,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,EAAE,8BAA8B,GAAG,YAAY,GAAG,IAAI,CAmE3G"}
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { defineMessages, useIntl } from "react-intl";
|
|
2
3
|
import { DashboardParameterModeValues, isNumberParameterDefinition, objRefToString, } from "@gooddata/sdk-model";
|
|
3
4
|
import { Dropdown, ParameterControlButton, ParameterControlDropdown } from "@gooddata/sdk-ui-kit";
|
|
4
5
|
import { useDashboardDispatch, useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
5
6
|
import { selectCatalogParameterByRef } from "../../../model/store/catalog/catalogSelectors.js";
|
|
6
7
|
import { selectIsInEditMode } from "../../../model/store/renderMode/renderModeSelectors.js";
|
|
7
8
|
import { tabsActions } from "../../../model/store/tabs/index.js";
|
|
8
|
-
import { selectParameterResetValueByRef, selectParameterRuntimeOverrideByRef, } from "../../../model/store/tabs/parameters/parametersSelectors.js";
|
|
9
|
+
import { selectParameterReconciliationByRef, selectParameterResetValueByRef, selectParameterRuntimeOverrideByRef, } from "../../../model/store/tabs/parameters/parametersSelectors.js";
|
|
9
10
|
import { DraggableChipSource } from "../../dragAndDrop/DraggableChipSource.js";
|
|
11
|
+
const messages = defineMessages({
|
|
12
|
+
resetWarning: { id: "parameter_filter.button.resetWarning.tooltip" },
|
|
13
|
+
});
|
|
10
14
|
/**
|
|
11
15
|
* Renders a chip for a single dashboard parameter.
|
|
12
16
|
*
|
|
13
17
|
* @internal
|
|
14
18
|
*/
|
|
15
19
|
export function DashboardParameterFilter({ parameter }) {
|
|
20
|
+
const intl = useIntl();
|
|
16
21
|
const dispatch = useDashboardDispatch();
|
|
17
22
|
const workspaceParameter = useDashboardSelector(selectCatalogParameterByRef(parameter.ref));
|
|
18
23
|
const runtimeOverride = useDashboardSelector(selectParameterRuntimeOverrideByRef(parameter.ref));
|
|
19
24
|
const resetValue = useDashboardSelector(selectParameterResetValueByRef(parameter.ref));
|
|
25
|
+
const reconciliation = useDashboardSelector(selectParameterReconciliationByRef(parameter.ref));
|
|
20
26
|
const isInEditMode = useDashboardSelector(selectIsInEditMode);
|
|
21
27
|
if (parameter.mode === DashboardParameterModeValues.HIDDEN || runtimeOverride === undefined) {
|
|
22
28
|
return null;
|
|
@@ -27,10 +33,11 @@ export function DashboardParameterFilter({ parameter }) {
|
|
|
27
33
|
const name = parameter.label ?? workspaceParameter.title;
|
|
28
34
|
const { constraints } = workspaceParameter.definition;
|
|
29
35
|
const dragItem = { type: "parameter", ref: parameter.ref };
|
|
36
|
+
const warningTooltip = reconciliation === "reset" ? intl.formatMessage(messages.resetWarning) : undefined;
|
|
30
37
|
if (parameter.mode === DashboardParameterModeValues.READONLY) {
|
|
31
|
-
return (_jsx(DraggableChipSource, { dragItem: dragItem, canDrag: isInEditMode, children: _jsx(ParameterControlButton, { name: name, value: runtimeOverride, isActive: false, isDraggable: isInEditMode, "data-testid": `dashboard-parameter-${objRefToString(parameter.ref)}` }) }));
|
|
38
|
+
return (_jsx(DraggableChipSource, { dragItem: dragItem, canDrag: isInEditMode, children: _jsx(ParameterControlButton, { name: name, value: runtimeOverride, isActive: false, isDraggable: isInEditMode, warningTooltip: warningTooltip, "data-testid": `dashboard-parameter-${objRefToString(parameter.ref)}` }) }));
|
|
32
39
|
}
|
|
33
|
-
return (_jsx(DraggableChipSource, { dragItem: dragItem, canDrag: isInEditMode, children: _jsx(Dropdown, { renderButton: ({ isOpen, toggleDropdown }) => (_jsx(ParameterControlButton, { name: name, value: runtimeOverride, isActive: isOpen, isDraggable: isInEditMode, onClick: () => toggleDropdown(), "data-testid": `dashboard-parameter-${objRefToString(parameter.ref)}` })), renderBody: ({ closeDropdown }) => (_jsx(ParameterControlDropdown, { name: name, value: runtimeOverride, resetValue: resetValue, constraints: constraints, onApply: (value) => {
|
|
40
|
+
return (_jsx(DraggableChipSource, { dragItem: dragItem, canDrag: isInEditMode, children: _jsx(Dropdown, { renderButton: ({ isOpen, toggleDropdown }) => (_jsx(ParameterControlButton, { name: name, value: runtimeOverride, isActive: isOpen, isDraggable: isInEditMode, onClick: () => toggleDropdown(), warningTooltip: warningTooltip, "data-testid": `dashboard-parameter-${objRefToString(parameter.ref)}` })), renderBody: ({ closeDropdown }) => (_jsx(ParameterControlDropdown, { name: name, value: runtimeOverride, resetValue: resetValue, constraints: constraints, onApply: (value) => {
|
|
34
41
|
dispatch(tabsActions.setParameterRuntimeValue({ ref: parameter.ref, value }));
|
|
35
42
|
closeDropdown();
|
|
36
43
|
}, onCancel: closeDropdown })) }) }));
|
|
@@ -2683,6 +2683,10 @@ export declare const en_US: {
|
|
|
2683
2683
|
text: string;
|
|
2684
2684
|
crowdinContext: string;
|
|
2685
2685
|
};
|
|
2686
|
+
"parameter_filter.button.resetWarning.tooltip": {
|
|
2687
|
+
text: string;
|
|
2688
|
+
crowdinContext: string;
|
|
2689
|
+
};
|
|
2686
2690
|
"filters.filterViews.list.ariaLabel.withActions": {
|
|
2687
2691
|
text: string;
|
|
2688
2692
|
crowdinContext: string;
|
|
@@ -2727,6 +2731,10 @@ export declare const en_US: {
|
|
|
2727
2731
|
text: string;
|
|
2728
2732
|
crowdinContext: string;
|
|
2729
2733
|
};
|
|
2734
|
+
"filters.filterViews.add.backAriaLabel": {
|
|
2735
|
+
text: string;
|
|
2736
|
+
crowdinContext: string;
|
|
2737
|
+
};
|
|
2730
2738
|
"filters.filterViews.delete.title": {
|
|
2731
2739
|
text: string;
|
|
2732
2740
|
crowdinContext: string;
|
|
@@ -3423,10 +3431,6 @@ export declare const en_US: {
|
|
|
3423
3431
|
text: string;
|
|
3424
3432
|
crowdinContext: string;
|
|
3425
3433
|
};
|
|
3426
|
-
"menu.back": {
|
|
3427
|
-
text: string;
|
|
3428
|
-
crowdinContext: string;
|
|
3429
|
-
};
|
|
3430
3434
|
"drill.kda.from": {
|
|
3431
3435
|
text: string;
|
|
3432
3436
|
crowdinContext: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en-US.localization-bundle.d.ts","sourceRoot":"","sources":["../../../../src/presentation/localization/bundles/en-US.localization-bundle.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"en-US.localization-bundle.d.ts","sourceRoot":"","sources":["../../../../src/presentation/localization/bundles/en-US.localization-bundle.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA66GjB,CAAC"}
|
|
@@ -2685,6 +2685,10 @@ export const en_US = {
|
|
|
2685
2685
|
"text": "<b>Warning:</b> Parameter \"{name}\" is no longer compatible and has been ignored.",
|
|
2686
2686
|
"crowdinContext": "Warning toast shown on dashboard load when a referenced parameter changed to a non-numeric type and can no longer be applied. {name} is the parameter title; <b> renders the leading 'Warning:' label in bold."
|
|
2687
2687
|
},
|
|
2688
|
+
"parameter_filter.button.resetWarning.tooltip": {
|
|
2689
|
+
"text": "The original value is out of range, so the default is applied until you set a valid value.",
|
|
2690
|
+
"crowdinContext": "Tooltip on a dashboard parameter button whose saved value is outside the parameter's allowed range; the workspace default is executed until the user sets a valid value."
|
|
2691
|
+
},
|
|
2688
2692
|
"filters.filterViews.list.ariaLabel.withActions": {
|
|
2689
2693
|
"text": "List of saved views. Use the right arrow key to move to the ‘Set as default’ action, then to the ‘delete’ action.",
|
|
2690
2694
|
"crowdinContext": "Screen reader description for the list of saved views. Includes the possible keyboard actions."
|
|
@@ -2729,6 +2733,10 @@ export const en_US = {
|
|
|
2729
2733
|
"text": "Cancel",
|
|
2730
2734
|
"crowdinContext": "Label of the button that cancels the form changes."
|
|
2731
2735
|
},
|
|
2736
|
+
"filters.filterViews.add.backAriaLabel": {
|
|
2737
|
+
"text": "Back to list of saved views",
|
|
2738
|
+
"crowdinContext": "Aria label of the back button in the Create saved view form, navigating back to the list of saved views."
|
|
2739
|
+
},
|
|
2732
2740
|
"filters.filterViews.delete.title": {
|
|
2733
2741
|
"text": "Delete view?",
|
|
2734
2742
|
"crowdinContext": "Label of the dialog that confirms deletion of the filter view entity."
|
|
@@ -3425,10 +3433,6 @@ export const en_US = {
|
|
|
3425
3433
|
"text": "The raw error response shows back-end information about the error that has occurred. It is visible only to the administrators.",
|
|
3426
3434
|
"crowdinContext": "Key driver analysis error details title tooltip for showing raw error response json"
|
|
3427
3435
|
},
|
|
3428
|
-
"menu.back": {
|
|
3429
|
-
"text": "Back to the parent menu",
|
|
3430
|
-
"crowdinContext": "Button label for navigating back to the parent menu in a nested menu structure. Used in hierarchical navigation."
|
|
3431
|
-
},
|
|
3432
3436
|
"drill.kda.from": {
|
|
3433
3437
|
"text": "from",
|
|
3434
3438
|
"crowdinContext": "Key driver analysis drill from label, must be lowercase"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardInsightWithDrillDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/insight/ViewModeDashboardInsight/DashboardInsightWithDrillDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAkC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardInsightWithDrillDialog.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/insight/ViewModeDashboardInsight/DashboardInsightWithDrillDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAkC,MAAM,OAAO,CAAC;AAuB1E,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAS1D;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAwJ3F"}
|
package/esm/presentation/widget/insight/ViewModeDashboardInsight/DashboardInsightWithDrillDialog.js
CHANGED
|
@@ -6,7 +6,7 @@ import { createFocusHighchartsDatapointEvent } from "@gooddata/sdk-ui";
|
|
|
6
6
|
import { KdaDialogController } from "../../../../kdaDialog/dialog/KdaDialogController.js";
|
|
7
7
|
import { useDashboardSelector } from "../../../../model/react/DashboardStoreProvider.js";
|
|
8
8
|
import { selectCatalogAttributeDisplayFormsById } from "../../../../model/store/catalog/catalogSelectors.js";
|
|
9
|
-
import {
|
|
9
|
+
import { selectLocale, selectObjectAvailabilityConfig, selectSeparators, } from "../../../../model/store/config/configSelectors.js";
|
|
10
10
|
import { isDrillDownDefinition } from "../../../../types.js";
|
|
11
11
|
import { getDrillDownTitle } from "../../../drill/utils/drillDownUtils.js";
|
|
12
12
|
import { DashboardInsightWithDrillSelect } from "./Insight/DashboardInsightWithDrillSelect.js";
|
|
@@ -21,7 +21,6 @@ export function DashboardInsightWithDrillDialog(props) {
|
|
|
21
21
|
const widget = props.widget;
|
|
22
22
|
const separators = useDashboardSelector(selectSeparators);
|
|
23
23
|
const attributeDisplayForms = useDashboardSelector(selectCatalogAttributeDisplayFormsById);
|
|
24
|
-
const enableDrillDescription = useDashboardSelector(selectEnableDrilledTooltip);
|
|
25
24
|
const breadcrumbs = useMemo(() => drillSteps
|
|
26
25
|
.filter((s) => isDrillDownDefinition(s.drillDefinition))
|
|
27
26
|
.map((s) => getDrillDownTitle(s.drillDefinition, s.drillEvent, widget.drillDownIntersectionIgnoredAttributes, attributeDisplayForms[isIdentifierRef(s.drillDefinition.target)
|
|
@@ -84,6 +83,6 @@ export function DashboardInsightWithDrillDialog(props) {
|
|
|
84
83
|
setKeyDriveInfo((prev) => (prev ? { ...prev, keyDriveDefinition: definition } : prev));
|
|
85
84
|
}, []);
|
|
86
85
|
return (_jsxs(_Fragment, { children: [
|
|
87
|
-
_jsx(DashboardInsightWithDrillSelect, { ...props, onDrillDown: onDrillDown, onDrillToInsight: onDrillToInsight, onKeyDriverAnalysisSuccess: onKeyDriverAnalysisSuccess, drillStep: activeDrillStep, returnFocusToInsight: returnFocusToInsight, onDrillStart: onDrillStart }), activeDrillStep ? (_jsx(InsightDrillDialog, { locale: locale, breadcrumbs: breadcrumbs, widget: widget, insight: insight, onDrillDown: onDrillDown, onBackButtonClick: goBack, onClose: onClose, enableDrillDescription:
|
|
86
|
+
_jsx(DashboardInsightWithDrillSelect, { ...props, onDrillDown: onDrillDown, onDrillToInsight: onDrillToInsight, onKeyDriverAnalysisSuccess: onKeyDriverAnalysisSuccess, drillStep: activeDrillStep, returnFocusToInsight: returnFocusToInsight, onDrillStart: onDrillStart }), activeDrillStep ? (_jsx(InsightDrillDialog, { locale: locale, breadcrumbs: breadcrumbs, widget: widget, insight: insight, onDrillDown: onDrillDown, onBackButtonClick: goBack, onClose: onClose, enableDrillDescription: true, drillStep: activeDrillStep, returnFocusToInsight: returnFocusToInsight, onDrillStart: onDrillStart })) : null, _jsx(KdaDialogController, { requestedDefinition: keyDriveInfo?.keyDriveDefinition, separators: separators, showCloseButton: true, includeTags: objectAvailability?.includeObjectsWithTags, excludeTags: objectAvailability?.excludeObjectsWithTags, onRequestedDefinitionChange: onRequestedDefinitionChange, onClose: onCloseKeyDriverAnalysis })
|
|
88
87
|
] }));
|
|
89
88
|
}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditAlert.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,WAAW,EAInB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useEditAlert.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,WAAW,EAInB,MAAM,qBAAqB,CAAC;AAY7B,OAAO,EACH,KAAK,iBAAiB,EAEzB,MAAM,4EAA4E,CAAC;AAiBpF,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,yBAAyB,EACjC,MAAM,8CAA8C,CAAC;AAStD,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,KAAK,EAAE,yBAAyB,CAAC;IACjC,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,YAAY,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IACtF,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mCAAmC,KAAK,IAAI,CAAC;IAChE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;CACzD;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiRxB,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useEditAlert.js
CHANGED
|
@@ -4,7 +4,7 @@ import { isEqual } from "lodash-es";
|
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { isAutomationExternalUserRecipient, isAutomationUnknownUserRecipient, isAutomationUserRecipient, } from "@gooddata/sdk-model";
|
|
6
6
|
import { useDashboardSelector } from "../../../../../../model/react/DashboardStoreProvider.js";
|
|
7
|
-
import { selectEnableAnomalyDetectionAlert,
|
|
7
|
+
import { selectEnableAnomalyDetectionAlert, selectTimezone, selectWeekStart, } from "../../../../../../model/store/config/configSelectors.js";
|
|
8
8
|
import { selectEntitlementMinimumRecurrenceMinutes } from "../../../../../../model/store/entitlements/entitlementsSelectors.js";
|
|
9
9
|
import { selectCanUseAiAssistant } from "../../../../../../model/store/permissions/permissionsSelectors.js";
|
|
10
10
|
import { selectCurrentUser } from "../../../../../../model/store/user/userSelectors.js";
|
|
@@ -21,7 +21,6 @@ export const useEditAlert = ({ metrics, attributes, alert, onCreate, onUpdate, m
|
|
|
21
21
|
const [warningMessage, setWarningMessage] = useState(undefined);
|
|
22
22
|
const currentUser = useDashboardSelector(selectCurrentUser);
|
|
23
23
|
const users = useDashboardSelector(selectUsers);
|
|
24
|
-
const enabledExternalRecipients = useDashboardSelector(selectEnableExternalRecipients);
|
|
25
24
|
const enableAnomalyDetectionAlert = useDashboardSelector(selectEnableAnomalyDetectionAlert);
|
|
26
25
|
const enableAiAssistant = useDashboardSelector(selectCanUseAiAssistant);
|
|
27
26
|
const weekStart = useDashboardSelector(selectWeekStart);
|
|
@@ -31,7 +30,7 @@ export const useEditAlert = ({ metrics, attributes, alert, onCreate, onUpdate, m
|
|
|
31
30
|
const allowHourlyRecurrence = parseInt(minimumRecurrenceMinutesEntitlement?.value ?? DEFAULT_MIN_RECURRENCE_MINUTES, 10) === 60;
|
|
32
31
|
const selectedDestination = destinations.find((destination) => destination.id === updatedAlert.notificationChannel);
|
|
33
32
|
const defaultUser = convertCurrentUserToWorkspaceUser(users ?? [], currentUser);
|
|
34
|
-
const allowExternalRecipients = selectedDestination?.allowedRecipients === "external"
|
|
33
|
+
const allowExternalRecipients = selectedDestination?.allowedRecipients === "external";
|
|
35
34
|
const allowOnlyLoggedUserRecipients = selectedDestination?.allowedRecipients === "creator";
|
|
36
35
|
const changeMeasure = useCallback((measure) => {
|
|
37
36
|
setUpdatedAlert((alert) => transformAlertByMetric(metrics, alert, measure, measureFormatMap, weekStart, timezone));
|
|
@@ -2,6 +2,6 @@ import { type IInsightWidget } from "@gooddata/sdk-model";
|
|
|
2
2
|
interface IInsightCrossFiltering {
|
|
3
3
|
widget: IInsightWidget;
|
|
4
4
|
}
|
|
5
|
-
export declare function InsightCrossFiltering({ widget }: IInsightCrossFiltering): import("react/jsx-runtime").JSX.Element
|
|
5
|
+
export declare function InsightCrossFiltering({ widget }: IInsightCrossFiltering): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=InsightCrossFiltering.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightCrossFiltering.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/insight/configuration/InsightCrossFiltering.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"InsightCrossFiltering.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/insight/configuration/InsightCrossFiltering.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAc1D,UAAU,sBAAsB;IAC5B,MAAM,EAAE,cAAc,CAAC;CAC1B;AAED,wBAAgB,qBAAqB,CAAC,EAAE,MAAM,EAAE,EAAE,sBAAsB,2CAoCvE"}
|
|
@@ -5,8 +5,7 @@ import { Bubble, BubbleHoverTrigger, IconQuestionMark } from "@gooddata/sdk-ui-k
|
|
|
5
5
|
import { useTheme } from "@gooddata/sdk-ui-theme-provider";
|
|
6
6
|
import { messages } from "../../../../locales.js";
|
|
7
7
|
import { changeInsightWidgetIgnoreCrossFiltering } from "../../../../model/commands/insight.js";
|
|
8
|
-
import { useDashboardDispatch
|
|
9
|
-
import { selectEnableIgnoreCrossFiltering } from "../../../../model/store/config/configSelectors.js";
|
|
8
|
+
import { useDashboardDispatch } from "../../../../model/react/DashboardStoreProvider.js";
|
|
10
9
|
import { gdColorStateBlank } from "../../../constants/colors.js";
|
|
11
10
|
const TOOLTIP_ALIGN_POINTS = [
|
|
12
11
|
{ align: "cr cl", offset: { x: 0, y: 1 } },
|
|
@@ -15,10 +14,6 @@ const TOOLTIP_ALIGN_POINTS = [
|
|
|
15
14
|
export function InsightCrossFiltering({ widget }) {
|
|
16
15
|
const dispatch = useDashboardDispatch();
|
|
17
16
|
const theme = useTheme();
|
|
18
|
-
const isIgnoreCrossFilteringEnabled = useDashboardSelector(selectEnableIgnoreCrossFiltering);
|
|
19
|
-
if (!isIgnoreCrossFilteringEnabled) {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
17
|
return (_jsx("div", { className: "gd-cross-filtering-configuration", children: _jsxs("label", { className: "input-checkbox-label s-respect-cross-filtering", htmlFor: "respect-cross-filtering", children: [
|
|
23
18
|
_jsx("input", { id: "respect-cross-filtering", type: "checkbox", className: "input-checkbox", checked: !widget.ignoreCrossFiltering, onChange: (e) => {
|
|
24
19
|
dispatch(changeInsightWidgetIgnoreCrossFiltering(widget.ref, !e.target.checked));
|