@gooddata/sdk-ui-dashboard 11.68.0-alpha.7 → 11.68.0-alpha.8
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 +222 -160
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/_staging/dashboard/dashboardLayout.d.ts.map +1 -1
- package/esm/_staging/dashboard/dashboardLayout.js +3 -2
- package/esm/model/commandHandlers/dashboard/common/stateInitializers.js +3 -3
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadInaccessibleDashboards.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadInaccessibleDashboards.js +3 -3
- package/esm/model/commandHandlers/drill/drillToDashboardHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/drill/drillToDashboardHandler.js +2 -3
- package/esm/model/commandHandlers/filterContext/attributeFilter/validation/computedAttributesEnabledValidation.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/attributeFilter/validation/computedAttributesEnabledValidation.js +2 -2
- package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.js +4 -3
- package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.js +7 -6
- package/esm/model/queryServices/queryConnectingAttributes.js +2 -2
- package/esm/model/queryServices/queryInsightDateDatasets.d.ts.map +1 -1
- package/esm/model/queryServices/queryInsightDateDatasets.js +4 -3
- package/esm/model/store/_infra/queryProcessing.d.ts.map +1 -1
- package/esm/model/store/_infra/queryProcessing.js +3 -2
- package/esm/model/store/tabs/filterContext/filterContextSelectors.js +3 -3
- package/esm/model/store/widgetDrills/widgetDrillSelectors.d.ts.map +1 -1
- package/esm/model/store/widgetDrills/widgetDrillSelectors.js +6 -6
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.js +14 -14
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormValidity.d.ts +1 -0
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormValidity.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormValidity.js +10 -4
- package/esm/presentation/automations/scheduledEmail/state/useScheduledExportDialogValidity.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/state/useScheduledExportDialogValidity.js +2 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.js +3 -3
- package/esm/presentation/automations/shared/filters/conversions.d.ts.map +1 -1
- package/esm/presentation/automations/shared/filters/conversions.js +2 -2
- package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/CreationPanel.js +3 -2
- package/esm/presentation/dashboard/components/useDrillValidationMessages.d.ts.map +1 -1
- package/esm/presentation/dashboard/components/useDrillValidationMessages.js +5 -5
- package/esm/presentation/deleteDialog/DefaultDeleteDialog.js +2 -2
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.d.ts.map +1 -1
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js +3 -2
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.d.ts.map +1 -1
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.js +3 -2
- package/esm/presentation/drill/hooks/useDrillSelectDropdownMenuItems.d.ts.map +1 -1
- package/esm/presentation/drill/hooks/useDrillSelectDropdownMenuItems.js +2 -2
- package/esm/presentation/drill/utils/drillDownUtils.js +3 -3
- package/esm/presentation/insightEditor/filterContext/attributeFilters.d.ts.map +1 -1
- package/esm/presentation/insightEditor/filterContext/attributeFilters.js +2 -2
- package/esm/presentation/insightEditor/filterContext/insightFilterContext.d.ts.map +1 -1
- package/esm/presentation/insightEditor/filterContext/insightFilterContext.js +2 -2
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +4 -0
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +4 -0
- package/esm/presentation/saveAs/DefaultSaveAsDialog/SaveAsDialogRenderer.js +2 -2
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/getTitleWithBreadcrumbs.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/getTitleWithBreadcrumbs.js +3 -3
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightEditMenuItems.d.ts.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightEditMenuItems.js +2 -3
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightMenuItems.d.ts.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightMenuItems.js +4 -4
- package/esm/presentation/widget/richTextMenu/DefaultDashboardRichTextMenu/getDefaultRichTextEditMenuItems.d.ts.map +1 -1
- package/esm/presentation/widget/richTextMenu/DefaultDashboardRichTextMenu/getDefaultRichTextEditMenuItems.js +2 -2
- package/esm/presentation/widgetDeleteDialog/DefaultWidgetDeleteDialog.js +2 -2
- package/package.json +23 -23
package/esm/__version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "11.68.0-alpha.
|
|
1
|
+
export declare const LIB_VERSION = "11.68.0-alpha.8";
|
|
2
2
|
export declare const LIB_DESCRIPTION = "GoodData SDK - Dashboard Component";
|
|
3
3
|
export declare const LIB_NAME = "@gooddata/sdk-ui-dashboard";
|
|
4
4
|
//# sourceMappingURL=__version.d.ts.map
|
package/esm/__version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2021 GoodData Corporation
|
|
2
2
|
// DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD
|
|
3
|
-
export const LIB_VERSION = "11.68.0-alpha.
|
|
3
|
+
export const LIB_VERSION = "11.68.0-alpha.8";
|
|
4
4
|
export const LIB_DESCRIPTION = "GoodData SDK - Dashboard Component";
|
|
5
5
|
export const LIB_NAME = "@gooddata/sdk-ui-dashboard";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboardLayout.d.ts","sourceRoot":"","sources":["../../../src/_staging/dashboard/dashboardLayout.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,KAAK,gBAAgB,EAErB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,SAAS,EAMjB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"dashboardLayout.d.ts","sourceRoot":"","sources":["../../../src/_staging/dashboard/dashboardLayout.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,KAAK,gBAAgB,EAErB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,SAAS,EAMjB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AA+ErD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,GAAG,gBAAgB,EACxD,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC3B,QAAQ,EAAE,QAAQ,EAAE,EACpB,QAAQ,EAAE,SAAS,GACpB,gBAAgB,CAAC,CAAC,CAAC,CAmBrB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,QAAQ,EAAE,wBAAwB,CAAC;IACnC,OAAO,EAAE,wBAAwB,CAAC;CACrC,CAAC;AAkEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,gCAAgC,CAAC,CAAC,SAAS,gBAAgB,EACvE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC7B,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC7B,SAAS,CAAC,eAAe,CAAC,CAI5B;AAED,MAAM,MAAM,gCAAgC,GAAG,CAAC,QAAQ,EAAE,wBAAwB,KAAK,OAAO,CAAC;AAE/F;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,gBAAgB,EACpE,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC3B,iBAAiB,EAAE,gCAAgC,GACpD,gBAAgB,CAoDlB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { keyBy } from "lodash-es";
|
|
3
3
|
import { InvariantError, invariant } from "ts-invariant";
|
|
4
4
|
import { insightRef, isDashboardLayout, isInsightWidget, isKpiWidget, serializeObjRef, } from "@gooddata/sdk-model";
|
|
5
|
+
import { _compact } from "@gooddata/util";
|
|
5
6
|
import { validateDashboardLayoutWidgetSize } from "../../presentation/flexibleLayout/DefaultDashboardLayoutRenderer/utils/sizing.js";
|
|
6
7
|
import { ObjRefMap } from "../metadata/objRefMap.js";
|
|
7
8
|
function extractContentFromWidget(widget, insightsById) {
|
|
@@ -69,7 +70,7 @@ function dashboardLayoutItemSanitize(item, insightsById, settings) {
|
|
|
69
70
|
export function dashboardLayoutSanitize(layout, insights, settings) {
|
|
70
71
|
const insightsById = keyBy(insights, (insight) => serializeObjRef(insightRef(insight)));
|
|
71
72
|
const sanitizedSections = layout.sections.map((section) => {
|
|
72
|
-
const sanitizedItems =
|
|
73
|
+
const sanitizedItems = _compact(section.items.map((item) => dashboardLayoutItemSanitize(item, insightsById, settings)));
|
|
73
74
|
return {
|
|
74
75
|
...section,
|
|
75
76
|
items: sanitizedItems,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { update } from "lodash-es";
|
|
3
3
|
import { call, select } from "redux-saga/effects";
|
|
4
4
|
import { walkLayout, } from "@gooddata/sdk-backend-spi";
|
|
5
5
|
import { areObjRefsEqual, isDashboardAttributeFilter, isDashboardDateFilterWithDimension, isIdentifierRef, isInsightWidget, isObjRef, } from "@gooddata/sdk-model";
|
|
6
|
-
import { _cloneDeep, _isEmpty } from "@gooddata/util";
|
|
6
|
+
import { _cloneDeep, _compact, _isEmpty } from "@gooddata/util";
|
|
7
7
|
import { dashboardFilterContextDefinition, dashboardFilterContextIdentity, } from "../../../../_staging/dashboard/dashboardFilterContext.js";
|
|
8
8
|
import { dashboardLayoutSanitize } from "../../../../_staging/dashboard/dashboardLayout.js";
|
|
9
9
|
import { createDefaultFilterContext } from "../../../../_staging/dashboard/defaultFilterContext.js";
|
|
@@ -532,7 +532,7 @@ export function* actionsToInitializeExistingDashboard(ctx, dashboard, insights,
|
|
|
532
532
|
activeTabLocalIdentifier: tabIdentifier,
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
|
-
return
|
|
535
|
+
return _compact([
|
|
536
536
|
tabsAction,
|
|
537
537
|
metaActions.setMeta({
|
|
538
538
|
dashboard: persistedDashboard ?? dashboard,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadInaccessibleDashboards.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/loadInaccessibleDashboards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loadInaccessibleDashboards.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/loadInaccessibleDashboards.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAoD,MAAM,qBAAqB,CAAC;AAKrG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAG3F,wBAAiB,0BAA0B,CAAC,GAAG,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAE;;;qMAyBpF"}
|
package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadInaccessibleDashboards.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// (C) 2023-
|
|
2
|
-
import { compact } from "lodash-es";
|
|
1
|
+
// (C) 2023-2026 GoodData Corporation
|
|
3
2
|
import { call, put, select } from "redux-saga/effects";
|
|
4
3
|
import { isDrillToDashboard, isInsightWidget } from "@gooddata/sdk-model";
|
|
4
|
+
import { _compact } from "@gooddata/util";
|
|
5
5
|
import { selectAccessibleDashboardsMap } from "../../../store/accessibleDashboards/accessibleDashboardsSelectors.js";
|
|
6
6
|
import { inaccessibleDashboardsActions } from "../../../store/inaccessibleDashboards/index.js";
|
|
7
7
|
export function* loadInaccessibleDashboards(ctx, widgets) {
|
|
@@ -9,7 +9,7 @@ export function* loadInaccessibleDashboards(ctx, widgets) {
|
|
|
9
9
|
const dashboardDrillTargets = widgets
|
|
10
10
|
.filter(isInsightWidget)
|
|
11
11
|
.flatMap(({ drills }) => drills.filter(isDrillToDashboard));
|
|
12
|
-
const dashboardDrillTargetRefs =
|
|
12
|
+
const dashboardDrillTargetRefs = _compact(dashboardDrillTargets.map(({ target }) => target));
|
|
13
13
|
const unknownDashboardDrillTargetRefs = dashboardDrillTargetRefs.filter((ref) => !accessibleDashboardsMap.get(ref));
|
|
14
14
|
const existingDashboards = yield call(getExistingDashboards, ctx, unknownDashboardDrillTargetRefs);
|
|
15
15
|
const inaccessibleDashboards = existingDashboards.map((dashboard) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drillToDashboardHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/drill/drillToDashboardHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drillToDashboardHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/drill/drillToDashboardHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAkC/C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EACH,KAAK,kCAAkC,EAG1C,MAAM,uBAAuB,CAAC;AAmB/B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAWnE,wBAAiB,uBAAuB,CACpC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,iBAAiB,GACvB,YAAY,CAAC,kCAAkC,CAAC,CAoIlD"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
|
-
import { compact } from "lodash-es";
|
|
3
2
|
import { call, put, select } from "redux-saga/effects";
|
|
4
3
|
import { invariant } from "ts-invariant";
|
|
5
4
|
import { areObjRefsEqual, dashboardAttributeFilterItemToAttributeFilter, dashboardDateFilterToDateFilterByWidget, dashboardFilterLocalIdentifier, dashboardMeasureValueFilterToMeasureValueFilter, insightMeasures, isDashboardAttributeFilter, isDashboardMeasureValueFilter, isDateFilter, isSimpleMeasure, measureFilters, newAllTimeDashboardDateFilter, } from "@gooddata/sdk-model";
|
|
6
|
-
import { _isEmpty, _isEqual } from "@gooddata/util";
|
|
5
|
+
import { _compact, _isEmpty, _isEqual } from "@gooddata/util";
|
|
7
6
|
import { switchDashboardTab } from "../../commands/tabs.js";
|
|
8
7
|
import { drillToDashboardRequested, drillToDashboardResolved, } from "../../events/drill.js";
|
|
9
8
|
import { generateFilterLocalIdentifier } from "../../store/_infra/generators.js";
|
|
@@ -71,7 +70,7 @@ export function* drillToDashboardHandler(ctx, cmd) {
|
|
|
71
70
|
// Unmatched filters from either side pass through as-is.
|
|
72
71
|
const mergedFilters = mergeDashboardAndSourceFilters(dashboardFilters, includedSourceFilters);
|
|
73
72
|
// Order matters: intersection > common date > merged dashboard+source.
|
|
74
|
-
const resultingFilters =
|
|
73
|
+
const resultingFilters = _compact([...intersectionFilters, commonDateFilter, ...mergedFilters]);
|
|
75
74
|
// Read before the tab switch: overrides are tab-scoped, so reading after would pick up the target tab.
|
|
76
75
|
const parameters = yield select(selectActiveTabDrillParameters);
|
|
77
76
|
const targetTabLocalIdentifier = cmd.payload.drillDefinition.targetTabLocalIdentifier;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computedAttributesEnabledValidation.d.ts","sourceRoot":"","sources":["../../../../../../src/model/commandHandlers/filterContext/attributeFilter/validation/computedAttributesEnabledValidation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"computedAttributesEnabledValidation.d.ts","sourceRoot":"","sources":["../../../../../../src/model/commandHandlers/filterContext/attributeFilter/validation/computedAttributesEnabledValidation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,KAAK,MAAM,EAA0C,MAAM,qBAAqB,CAAC;AAK1F;;;;;;;;;;GAUG;AACH,wBAAiB,gCAAgC,CAC7C,IAAI,EAAE,aAAa,CAAC,MAAM,GAAG,SAAS,CAAC,GACxC,YAAY,CAAC,MAAM,GAAG,SAAS,CAAC,CAWlC;AAED,wBAAgB,iCAAiC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAErE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { compact } from "lodash-es";
|
|
3
2
|
import { select } from "redux-saga/effects";
|
|
4
3
|
import { isComputedAttributeRef, objRefToString } from "@gooddata/sdk-model";
|
|
4
|
+
import { _compact } from "@gooddata/util";
|
|
5
5
|
import { selectEnableComputedAttributes } from "../../../../store/config/configSelectors.js";
|
|
6
6
|
/**
|
|
7
7
|
* Finds a reference to a computed attribute that the command must not accept because computed attributes
|
|
@@ -15,7 +15,7 @@ import { selectEnableComputedAttributes } from "../../../../store/config/configS
|
|
|
15
15
|
* @returns the first offending reference, or undefined when the command may proceed
|
|
16
16
|
*/
|
|
17
17
|
export function* findDisabledComputedAttributeRef(refs) {
|
|
18
|
-
const computedAttributeRef =
|
|
18
|
+
const computedAttributeRef = _compact(refs).find(isComputedAttributeRef);
|
|
19
19
|
if (!computedAttributeRef) {
|
|
20
20
|
return undefined;
|
|
21
21
|
}
|
package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeFilterContextSelectionHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"changeFilterContextSelectionHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AA0C/C,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAuC9E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAiOnE,wBAAiB,mCAAmC,CAChD,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,4BAA4B,GAClC,YAAY,CAAC,IAAI,CAAC,CA6OpB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { partition, uniqBy } from "lodash-es";
|
|
3
3
|
import { all, call, put, select } from "redux-saga/effects";
|
|
4
4
|
import { NotSupported } from "@gooddata/sdk-backend-spi";
|
|
5
5
|
import { areObjRefsEqual, attributeElementsIsEmpty, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemFilterElementsByDate, dashboardAttributeFilterItemLocalIdentifier, dashboardAttributeFilterItemValidateElementsBy, dashboardFilterLocalIdentifier, dashboardFilterObjRef, dashboardMeasureValueFilterLocalIdentifier, getAttributeElementsItems, isAllTimeDashboardDateFilter, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilter, isDashboardDateFilter, isDashboardMeasureValueFilter, isDashboardTextAttributeFilter, isSingleSelectionFilter, isUriRef, objRefToString, serializeObjRef, updateAttributeElementsItems, } from "@gooddata/sdk-model";
|
|
6
|
+
import { _compact } from "@gooddata/util";
|
|
6
7
|
import { dashboardFilterToFilterContextItem } from "../../../_staging/dashboard/dashboardFilterContext.js";
|
|
7
8
|
import { invalidArgumentsProvided } from "../../events/general.js";
|
|
8
9
|
import { dispatchDashboardEvent } from "../../store/_infra/eventDispatcher.js";
|
|
@@ -161,7 +162,7 @@ export function* changeFilterContextSelectionHandler(ctx, cmd) {
|
|
|
161
162
|
}
|
|
162
163
|
return isDashboardMeasureValueFilter(entry) && isDashboardMeasureValueFilter(target);
|
|
163
164
|
};
|
|
164
|
-
const normalizedFilters =
|
|
165
|
+
const normalizedFilters = _compact(filters.map((filter) => {
|
|
165
166
|
if (isDashboardAttributeFilterItem(filter) ||
|
|
166
167
|
isDashboardDateFilter(filter) ||
|
|
167
168
|
isDashboardMeasureValueFilter(filter)) {
|
|
@@ -252,7 +253,7 @@ function* getDashboardFilterByAttributeMatching(filterRef, resolvedDisplayForms,
|
|
|
252
253
|
throw new NotSupported("Unsupported filter ObjRef! Please provide IdentifierRef instead of UriRef.");
|
|
253
254
|
}
|
|
254
255
|
const filterDF = resolvedDisplayForms.resolved.get(filterRef);
|
|
255
|
-
const resolvedAttribute = yield call(resolveAttributeMetadata, ctx,
|
|
256
|
+
const resolvedAttribute = yield call(resolveAttributeMetadata, ctx, _compact([filterDF?.attribute]));
|
|
256
257
|
const attribute = filterDF?.attribute && resolvedAttribute.resolved.get(filterDF?.attribute);
|
|
257
258
|
for (const displayForm of attribute?.displayForms ?? []) {
|
|
258
259
|
const dashboardFilter = yield call(selectFilterContextAttributeFilterByDisplayFormTabAware, displayForm.ref, tabLocalIdentifier);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initializeAutomationsHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"initializeAutomationsHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAkD/C,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AA8C/E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAWnE,wBAAiB,4BAA4B,CACzC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,sBAAsB,GAC7B,YAAY,CAkTd"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { omit } from "lodash-es";
|
|
3
3
|
import { batchActions } from "redux-batched-actions";
|
|
4
4
|
import { all, call, put, select } from "redux-saga/effects";
|
|
5
5
|
import { generateDateFilterLocalIdentifier } from "@gooddata/sdk-backend-base";
|
|
6
6
|
import { dashboardFilterLocalIdentifier, filterLocalIdentifier, filterObjRef, idRef, insightFilters, isAbsoluteDateFilter, isAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilter, isDashboardDateFilter, isDateFilter, isExportDefinitionDashboardRequestPayload, isExportDefinitionVisualizationObjectRequestPayload, isFilterContextItem, isInsightWidget, isMeasureValueFilter, isRankingFilter, isRelativeDateFilter, isSingleSelectionFilter, } from "@gooddata/sdk-model";
|
|
7
7
|
import { convertError } from "@gooddata/sdk-ui";
|
|
8
8
|
import { isAutomationRestricted } from "@gooddata/sdk-ui-ext";
|
|
9
|
+
import { _compact } from "@gooddata/util";
|
|
9
10
|
import { getAutomationAlertParameters, getAutomationExportParametersByTab, } from "../../../_staging/automation/index.js";
|
|
10
11
|
import { dashboardFilterToFilterContextItem } from "../../../_staging/dashboard/dashboardFilterContext.js";
|
|
11
12
|
import { isDashboardFilter } from "../../../types.js";
|
|
@@ -105,7 +106,7 @@ export function* initializeAutomationsHandler(ctx, _cmd) {
|
|
|
105
106
|
? getDashboardFiltersOnly(targetAlertFilters, commonDateFilterLocalId, insight, widget)
|
|
106
107
|
: targetAlertFilters;
|
|
107
108
|
const keepDateFilterDataSets = !!ctx.backend.capabilities.supportsMultipleDateFilters;
|
|
108
|
-
const filtersToSetAsFilterContextItems =
|
|
109
|
+
const filtersToSetAsFilterContextItems = _compact(filtersToSet.map((filter) => dashboardFilterToFilterContextItem(filter, keepDateFilterDataSets)));
|
|
109
110
|
const compatibleFiltersToSet = filtersToSetAsFilterContextItems.filter((filter) => isFilterContextItemCompatibleWithSelectionType(filter, effectiveActiveTabSelectionTypeMap, filterContextFilters));
|
|
110
111
|
// Empty alert execution filters = reset all filters (set them to all).
|
|
111
112
|
// Empty sanitized filters = keep filters as they are, do not reset them (all alert execution filters are insight specific / ignored).
|
|
@@ -129,7 +130,7 @@ export function* initializeAutomationsHandler(ctx, _cmd) {
|
|
|
129
130
|
const tabCommonDateFilterLocalId = tabCommonDateFilter?.dateFilter.localIdentifier ??
|
|
130
131
|
generateDateFilterLocalIdentifier(0);
|
|
131
132
|
const tabVisibleFilters = extractVisibleFiltersForTab(targetAutomation, tabId);
|
|
132
|
-
const compactedTabFilters =
|
|
133
|
+
const compactedTabFilters = _compact(tabFilters);
|
|
133
134
|
const filtersToSet = compactedTabFilters.filter((filter) => {
|
|
134
135
|
if (tabVisibleFilters) {
|
|
135
136
|
return tabVisibleFilters.some((f) => f.localIdentifier === dashboardFilterLocalIdentifier(filter));
|
|
@@ -277,16 +278,16 @@ function extractExportDefinitionFilters(content, activeTabLocalIdentifier) {
|
|
|
277
278
|
// Check if per-tab filters are provided and use the active tab's filters
|
|
278
279
|
if (content.content.filtersByTab && activeTabLocalIdentifier) {
|
|
279
280
|
const tabFilters = content.content.filtersByTab[activeTabLocalIdentifier];
|
|
280
|
-
return tabFilters ?
|
|
281
|
+
return tabFilters ? _compact(tabFilters) : undefined;
|
|
281
282
|
}
|
|
282
283
|
// The filters in dashboard case may be undefined or an array depending
|
|
283
284
|
// on whether they should override filter context or use live filter context.
|
|
284
|
-
return content.content.filters ?
|
|
285
|
+
return content.content.filters ? _compact(content.content.filters) : undefined;
|
|
285
286
|
}
|
|
286
287
|
if (isExportDefinitionVisualizationObjectRequestPayload(content)) {
|
|
287
288
|
// There can either be execution filters or filter context items,
|
|
288
289
|
// so we need to make sure we convert them to filter context items.
|
|
289
|
-
return
|
|
290
|
+
return _compact((content.content.filters ?? []).map((filter) => {
|
|
290
291
|
if (isFilterContextItem(filter)) {
|
|
291
292
|
return filter;
|
|
292
293
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2022-2026 GoodData Corporation
|
|
2
|
-
import { compact } from "lodash-es";
|
|
3
2
|
import { call, select } from "redux-saga/effects";
|
|
4
3
|
import { serializeObjRef } from "@gooddata/sdk-model";
|
|
4
|
+
import { _compact } from "@gooddata/util";
|
|
5
5
|
import { invalidQueryArguments } from "../events/general.js";
|
|
6
6
|
import { createCachedQueryService } from "../store/_infra/queryService.js";
|
|
7
7
|
import { selectAttributeFilterDisplayFormsMap } from "../store/tabs/filterContext/filterContextSelectors.js";
|
|
@@ -33,7 +33,7 @@ function* mapDisplayFormsToAttributes(refs) {
|
|
|
33
33
|
function* queryService(ctx, query) {
|
|
34
34
|
const { payload: { refs }, correlationId, } = query;
|
|
35
35
|
const attributeRefs = yield call(mapDisplayFormsToAttributes, refs);
|
|
36
|
-
const nonEmptyAttributesRef =
|
|
36
|
+
const nonEmptyAttributesRef = _compact(attributeRefs.map((refsEntry) => _compact(refsEntry)));
|
|
37
37
|
if (refs.length !== nonEmptyAttributesRef.length) {
|
|
38
38
|
throw invalidQueryArguments(ctx, `Cannot find attributes for given displayForms`, correlationId);
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryInsightDateDatasets.d.ts","sourceRoot":"","sources":["../../../src/model/queryServices/queryInsightDateDatasets.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"queryInsightDateDatasets.d.ts","sourceRoot":"","sources":["../../../src/model/queryServices/queryInsightDateDatasets.ts"],"names":[],"mappings":"AA8BA,OAAO,EAEH,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAEjC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,KAAK,qBAAqB,EAA4B,MAAM,iCAAiC,CAAC;AAOvG,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKxD,eAAO,MAAM,kCAAkC,6HAW9C,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAC3C,KAAK,EAAE,yBAAyB,KAC/B,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,KAAK,qBAAqB,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC;AAE1G;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,EAAE,gCACmB,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { uniqBy } from "lodash-es";
|
|
3
3
|
import { call, select } from "redux-saga/effects";
|
|
4
4
|
import { invariant } from "ts-invariant";
|
|
5
5
|
import { filterObjRef, insightFilters, insightRef, isCatalogDateDataset, isDateFilter, isObjRef, objRefToString, serializeObjRef, } from "@gooddata/sdk-model";
|
|
6
|
+
import { _compact } from "@gooddata/util";
|
|
6
7
|
import { sanitizeDateDatasetTitle, sortByRelevanceAndTitle, } from "../../_staging/catalog/dateDatasetOrdering.js";
|
|
7
8
|
import { newDisplayFormMap } from "../../_staging/metadata/objRefMap.js";
|
|
8
9
|
import { invalidQueryArguments } from "../events/general.js";
|
|
@@ -75,8 +76,8 @@ function* lookupDatasetsUsedInAttributesAndFilters(insight, attributeToDataset)
|
|
|
75
76
|
return attributeToDataset.get(attributeRef)?.dataset;
|
|
76
77
|
};
|
|
77
78
|
return {
|
|
78
|
-
usedInAttributes:
|
|
79
|
-
usedInAttributeFilters:
|
|
79
|
+
usedInAttributes: _compact(inAttributes.map(datasetLookup)),
|
|
80
|
+
usedInAttributeFilters: _compact(inFilters.map(datasetLookup)),
|
|
80
81
|
};
|
|
81
82
|
}
|
|
82
83
|
function* lookupDatasetsInInsight(insight) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryProcessing.d.ts","sourceRoot":"","sources":["../../../../src/model/store/_infra/queryProcessing.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,OAAO,EAAmB,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAE,KAAK,IAAI,EAAqB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"queryProcessing.d.ts","sourceRoot":"","sources":["../../../../src/model/store/_infra/queryProcessing.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,OAAO,EAAmB,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAE,KAAK,IAAI,EAAqB,MAAM,YAAY,CAAC;AAY1D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAK7D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC;;;;OAIG;IACH,i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AC,GAAG,EAAE,GAAG,CAAC,EAAE,GAClD,sBAAsB,CA4CxB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
2
|
import { combineReducers } from "@reduxjs/toolkit";
|
|
3
|
-
import {
|
|
3
|
+
import { keyBy } from "lodash-es";
|
|
4
4
|
import { actionChannel, call, spawn, take } from "redux-saga/effects";
|
|
5
|
+
import { _compact } from "@gooddata/util";
|
|
5
6
|
import { internalQueryErrorOccurred, isDashboardQueryFailed, queryCompleted, queryRejected, queryStarted, } from "../../events/general.js";
|
|
6
7
|
import { getDashboardContext } from "./contexts.js";
|
|
7
8
|
import { dispatchDashboardEvent } from "./eventDispatcher.js";
|
|
@@ -85,7 +86,7 @@ function ensureQueryWrappedInEnvelope(action) {
|
|
|
85
86
|
*/
|
|
86
87
|
export function createQueryProcessingModule(queryServices) {
|
|
87
88
|
const servicesByType = keyBy(queryServices, (service) => service.name);
|
|
88
|
-
const queryToReducers = Object.fromEntries(
|
|
89
|
+
const queryToReducers = Object.fromEntries(_compact(queryServices.map((service) => {
|
|
89
90
|
if (!service.cache) {
|
|
90
91
|
return null;
|
|
91
92
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
2
|
import { createSelector } from "@reduxjs/toolkit";
|
|
3
|
-
import {
|
|
3
|
+
import { keyBy, sortBy } from "lodash-es";
|
|
4
4
|
import { invariant } from "ts-invariant";
|
|
5
5
|
import { areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemFilterElementsByDate, dashboardAttributeFilterItemLocalIdentifier, dashboardAttributeFilterItemTitle, dashboardFilterLocalIdentifier, getAttributeElementsItems, idRef, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilter, isDashboardDateFilterWithDimension, isDashboardMeasureValueFilter, isDashboardTextAttributeFilter, isObjRef, uriRef, } from "@gooddata/sdk-model";
|
|
6
|
-
import { _isEmpty, _isEqual } from "@gooddata/util";
|
|
6
|
+
import { _compact, _isEmpty, _isEqual } from "@gooddata/util";
|
|
7
7
|
import { newDisplayFormMap } from "../../../../_staging/metadata/objRefMap.js";
|
|
8
8
|
import { createMemoizedSelector } from "../../_infra/selectors.js";
|
|
9
9
|
import { selectSupportsCircularDependencyInFilters } from "../../backendCapabilities/backendCapabilitiesSelectors.js";
|
|
@@ -691,7 +691,7 @@ export const selectFilterContextAttributeFilterItemIndexByLocalId = createMemoiz
|
|
|
691
691
|
*/
|
|
692
692
|
export const selectAttributeFilterDescendants = createMemoizedSelector((localId) => createSelector(selectFilterContextAttributeFilters, selectSupportsCircularDependencyInFilters, (attributeFilters, supportsCircularDependencies) => {
|
|
693
693
|
invariant(!supportsCircularDependencies, "Filter descendants cannot be computed as this backend supports circular dependencies in filters. Do not use this selector.");
|
|
694
|
-
const toCheck =
|
|
694
|
+
const toCheck = _compact([localId]);
|
|
695
695
|
const result = new Set();
|
|
696
696
|
while (toCheck.length) {
|
|
697
697
|
const current = toCheck.pop();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetDrillSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/widgetDrills/widgetDrillSelectors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"widgetDrillSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/widgetDrills/widgetDrillSelectors.ts"],"names":[],"mappings":"AAKA,OAAO,EAIH,KAAK,oBAAoB,EAEzB,KAAK,iBAAiB,EAEtB,KAAK,qBAAqB,EAE1B,KAAK,mBAAmB,EAExB,KAAK,QAAQ,EACb,KAAK,MAAM,EAcd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,KAAK,aAAa,EAGlB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACxB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM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AO,CAIxG"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// (C) 2020-2026 GoodData Corporation
|
|
2
2
|
import { createSelector } from "@reduxjs/toolkit";
|
|
3
|
-
import { compact } from "lodash-es";
|
|
4
3
|
import { UnexpectedError } from "@gooddata/sdk-backend-spi";
|
|
5
4
|
import { areObjRefsEqual, getHierarchyAttributes, getHierarchyRef, isAttributeHierarchyReference, isCatalogAttribute, isDrillFromAttribute, isDrillFromMeasure, isIdentifierRef, isLocalIdRef, isUriRef, localIdRef, objRefToString, } from "@gooddata/sdk-model";
|
|
6
5
|
import { HeaderPredicates, } from "@gooddata/sdk-ui";
|
|
7
6
|
import { isInsightKeyDriverAnalysisEnabled } from "@gooddata/sdk-ui-ext";
|
|
7
|
+
import { _compact } from "@gooddata/util";
|
|
8
8
|
import { existBlacklistHierarchyPredicate } from "../../utils/attributeHierarchyUtils.js";
|
|
9
9
|
import { createMemoizedSelector } from "../_infra/selectors.js";
|
|
10
10
|
import { selectAccessibleDashboardsLoaded, selectAccessibleDashboardsMap, } from "../accessibleDashboards/accessibleDashboardsSelectors.js";
|
|
@@ -31,7 +31,7 @@ function drillDefinitionToPredicates(drill) {
|
|
|
31
31
|
throw new UnexpectedError("Unknown drill origin!");
|
|
32
32
|
}
|
|
33
33
|
// add drillable items for all three types of objRefs that the origin measure can be
|
|
34
|
-
return
|
|
34
|
+
return _compact([
|
|
35
35
|
isLocalIdRef(origin) && HeaderPredicates.localIdentifierMatch(origin.localIdentifier),
|
|
36
36
|
isIdentifierRef(origin) && HeaderPredicates.identifierMatch(origin.identifier),
|
|
37
37
|
isUriRef(origin) && HeaderPredicates.uriMatch(origin.uri),
|
|
@@ -103,7 +103,7 @@ function findDescendantForAttribute(hierarchy, attributeRef, ignoredDrillDownHie
|
|
|
103
103
|
}
|
|
104
104
|
function getDescendantsForDrillAttribute(drill, allCatalogAttributeHierarchies, ignoredDrillDownHierarchies, allCatalogAttributesMap, supportsAttributeHierarchies) {
|
|
105
105
|
const attributeRef = drill.attribute.attributeHeader.formOf.ref;
|
|
106
|
-
return
|
|
106
|
+
return _compact(allCatalogAttributeHierarchies.map((hierarchy) => findDescendantForAttribute(hierarchy, attributeRef, ignoredDrillDownHierarchies, allCatalogAttributesMap, supportsAttributeHierarchies)));
|
|
107
107
|
}
|
|
108
108
|
function getDrillDownDefinitionsWithPredicates(availableDrillAttributes, attributesWithHierarchyDescendants, allCatalogAttributesMap, allCatalogAttributeHierarchies, ignoredDrillDownHierarchies, supportsAttributeHierarchies) {
|
|
109
109
|
// generate targets on the fly if ignored hierarchies are present
|
|
@@ -265,7 +265,7 @@ const selectCrossFilteringByWidgetRef = createMemoizedSelector((ref) => createSe
|
|
|
265
265
|
}
|
|
266
266
|
// construct predicates for all available attributes and measures
|
|
267
267
|
const attributePredicates = availableDrillAttributesWithoutDates.map((drillAttribute) => HeaderPredicates.localIdentifierMatch(drillAttribute.attribute.attributeHeader.localIdentifier));
|
|
268
|
-
const measurePredicates =
|
|
268
|
+
const measurePredicates = _compact(availableDrillTargets?.availableDrillTargets?.measures?.map((drillMeasure) => HeaderPredicates.localIdentifierMatch(drillMeasure.measure.measureHeaderItem.localIdentifier)));
|
|
269
269
|
return {
|
|
270
270
|
drillDefinition: {
|
|
271
271
|
type: "crossFiltering",
|
|
@@ -302,7 +302,7 @@ const selectKdaByWidgetRef = createMemoizedSelector((ref) => createSelector(sele
|
|
|
302
302
|
return undefined;
|
|
303
303
|
}
|
|
304
304
|
// construct predicates for all available attributes and measures
|
|
305
|
-
const measurePredicates =
|
|
305
|
+
const measurePredicates = _compact(availableDrillTargets?.availableDrillTargets?.measures?.map((drillMeasure) => {
|
|
306
306
|
const isMetricDisabled = getMetricDisabled(widgetInsight, drillMeasure.measure.measureHeaderItem.localIdentifier);
|
|
307
307
|
if (isMetricDisabled) {
|
|
308
308
|
return undefined;
|
|
@@ -471,7 +471,7 @@ export const selectConfiguredAndImplicitDrillsByWidgetRef = createMemoizedSelect
|
|
|
471
471
|
// disable drilling until all necessary items are loaded (catalog, dash list, ...)
|
|
472
472
|
const drillActive = catalogIsLoaded && accessibleDashboardsLoaded;
|
|
473
473
|
return drillActive
|
|
474
|
-
?
|
|
474
|
+
? _compact([
|
|
475
475
|
...configuredDrills,
|
|
476
476
|
...implicitDrillDownDrills,
|
|
477
477
|
...(isDrillToUrlDisabled ? [] : implicitDrillToUrlDrills),
|
package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScheduledEmailExportSettings.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAuB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useScheduledEmailExportSettings.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAuB,MAAM,OAAO,CAAC;AAEhF,OAAO,EAEH,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EAExC,KAAK,4CAA4C,EACjD,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,OAAO,EAIf,MAAM,qBAAqB,CAAC;AAc7B,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAEhE,MAAM,WAAW,qCAAqC;IAClD,gBAAgB,EAAE,mCAAmC,CAAC;IACtD,mBAAmB,EAAE,QAAQ,CAAC,cAAc,CAAC,mCAAmC,CAAC,CAAC,CAAC;IACnF,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yBAAyB,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;IAC3D,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,GAAG,SAAS,CAAC;IAChF,sBAAsB,EAAE,OAAO,EAAE,CAAC;IAClC,iCAAiC,EAAE,OAAO,EAAE,CAAC;IAC7C,kBAAkB,CAAC,EAAE,4CAA4C,CAAC,UAAU,CAAC,CAAC;IAC9E;;;OAGG;IACH,gBAAgB,CAAC,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;CAC1E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAAC,EAC5C,gBAAgB,EAChB,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,YAAY,EACZ,yBAAyB,EACzB,8BAA8B,EAC9B,sBAAsB,EACtB,iCAAiC,EACjC,kBAAkB,EAClB,gBAAgB,GACnB,EAAE,qCAAqC,GAAG,6BAA6B,CAySvE"}
|
package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailExportSettings.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
2
|
import { useCallback, useRef } from "react";
|
|
3
|
-
import { invariant } from "ts-invariant";
|
|
4
3
|
import { isExportDefinitionDashboardRequestPayload, isExportDefinitionVisualizationObjectRequestPayload, } from "@gooddata/sdk-model";
|
|
5
4
|
import { getAutomationExportParametersByTab, setExportParametersByTab, } from "../../../../_staging/automation/index.js";
|
|
6
5
|
import { useScheduledEmailDialogContext } from "../../contexts/ScheduledEmailDialogContext.js";
|
|
@@ -34,7 +33,7 @@ export function useScheduledEmailExportSettings({ editedAutomation, setEditedAut
|
|
|
34
33
|
latestParametersWireRef.current = wire;
|
|
35
34
|
setEditedAutomation((automation) => setExportParametersByTab(automation, wire));
|
|
36
35
|
}, [setEditedAutomation]);
|
|
37
|
-
// Re-derived locally (not passed as a prop) so that `
|
|
36
|
+
// Re-derived locally (not passed as a prop) so that the `isWidget` check below narrows
|
|
38
37
|
// `widget`/`insight` via TS's aliased-condition control-flow analysis — this requires the boolean
|
|
39
38
|
// to be declared from those exact variables in this same scope, same as in the parent.
|
|
40
39
|
const isWidget = !!widget && !!insight;
|
|
@@ -67,7 +66,6 @@ export function useScheduledEmailExportSettings({ editedAutomation, setEditedAut
|
|
|
67
66
|
exportTimezoneId,
|
|
68
67
|
]);
|
|
69
68
|
const onWidgetAttachmentsChange = useCallback((formats) => {
|
|
70
|
-
invariant(isWidget, "Widget or insight is missing in scheduling dialog context.");
|
|
71
69
|
setEditedAutomation((s) => {
|
|
72
70
|
const currentExportDefinitions = s.exportDefinitions || [];
|
|
73
71
|
const currentWidgetExportDefinitions = currentExportDefinitions.filter((exportDefinition) => isExportDefinitionVisualizationObjectRequestPayload(exportDefinition.requestPayload));
|
|
@@ -75,17 +73,19 @@ export function useScheduledEmailExportSettings({ editedAutomation, setEditedAut
|
|
|
75
73
|
const formatsToKeep = currentFormats.filter((format) => formats.includes(format));
|
|
76
74
|
const formatsToAdd = formats.filter((format) => !currentFormats.includes(format));
|
|
77
75
|
const keptExportDefinitions = currentWidgetExportDefinitions.filter((exportDefinition) => formatsToKeep.includes(exportDefinition.requestPayload.format));
|
|
78
|
-
const newExportDefinitions =
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
76
|
+
const newExportDefinitions = isWidget
|
|
77
|
+
? formatsToAdd.map((format) => newWidgetExportDefinitionMetadataObjectDefinition({
|
|
78
|
+
insight,
|
|
79
|
+
widget,
|
|
80
|
+
dashboardId: dashboardId,
|
|
81
|
+
format,
|
|
82
|
+
widgetFilters: effectiveWidgetFilters,
|
|
83
|
+
widgetFiltersWithInsight: effectiveWidgetFiltersWithInsight,
|
|
84
|
+
dashboardFilters: effectiveDashboardFilters,
|
|
85
|
+
defaultPdfPageSize,
|
|
86
|
+
timezoneId: exportTimezoneId,
|
|
87
|
+
}))
|
|
88
|
+
: [];
|
|
89
89
|
const updatedExportDefinitions = [...keptExportDefinitions, ...newExportDefinitions];
|
|
90
90
|
return withRebuiltExportDefinitions(s, updatedExportDefinitions, latestParametersWireRef.current);
|
|
91
91
|
});
|
package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormValidity.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export interface IUseScheduledEmailFormValidityProps {
|
|
|
11
11
|
isTitleValid: boolean;
|
|
12
12
|
isSubjectValid: boolean;
|
|
13
13
|
isOnMessageValid: boolean;
|
|
14
|
+
isWidgetInsightUnavailable: boolean;
|
|
14
15
|
}
|
|
15
16
|
export declare function useScheduledEmailFormValidity(props: IUseScheduledEmailFormValidityProps): IScheduledExportDialogValidity;
|
|
16
17
|
//# sourceMappingURL=useScheduledEmailFormValidity.d.ts.map
|
package/esm/presentation/automations/scheduledEmail/state/useScheduledEmailFormValidity.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScheduledEmailFormValidity.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledEmailFormValidity.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EAI1C,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"useScheduledEmailFormValidity.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledEmailFormValidity.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EAI1C,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAOjE,MAAM,WAAW,mCAAmC;IAChD,gBAAgB,EAAE,mCAAmC,CAAC;IACtD,kBAAkB,EAAE,mCAAmC,CAAC;IACxD,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAClD,oBAAoB,EAAE,8BAA8B,EAAE,GAAG,kCAAkC,EAAE,CAAC;IAC9F,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,wBAAwB,EAAE,MAAM,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,0BAA0B,EAAE,OAAO,CAAC;CACvC;AAED,wBAAgB,6BAA6B,CACzC,KAAK,EAAE,mCAAmC,GAC3C,8BAA8B,CAyEhC"}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { useIntl } from "react-intl";
|
|
2
|
+
import { defineMessages, useIntl } from "react-intl";
|
|
3
3
|
import { isAutomationExternalUserRecipient, isAutomationUnknownUserRecipient, isAutomationUserRecipient, } from "@gooddata/sdk-model";
|
|
4
4
|
import { areAutomationsEqual } from "../../shared/utils/automationUtils.js";
|
|
5
5
|
import { useScheduleValidation } from "../hooks/useScheduleValidation.js";
|
|
6
6
|
import { isEmail } from "../utils/validate.js";
|
|
7
|
+
const messages = defineMessages({
|
|
8
|
+
widgetError: { id: "dialogs.schedule.email.widgetError" },
|
|
9
|
+
visualizationUnavailable: { id: "dialogs.schedule.email.visualizationUnavailable" },
|
|
10
|
+
});
|
|
7
11
|
export function useScheduledEmailFormValidity(props) {
|
|
8
|
-
const { editedAutomation, originalAutomation, scheduledExportToEdit, notificationChannels, defaultRecipient, maxAutomationsRecipients, isCronValid, isTitleValid, isSubjectValid, isOnMessageValid, } = props;
|
|
12
|
+
const { editedAutomation, originalAutomation, scheduledExportToEdit, notificationChannels, defaultRecipient, maxAutomationsRecipients, isCronValid, isTitleValid, isSubjectValid, isOnMessageValid, isWidgetInsightUnavailable, } = props;
|
|
9
13
|
const intl = useIntl();
|
|
10
14
|
const selectedNotificationChannel = notificationChannels.find((channel) => channel.id === editedAutomation.notificationChannel);
|
|
11
15
|
const allowExternalRecipients = selectedNotificationChannel?.allowedRecipients === "external";
|
|
12
16
|
const allowOnlyLoggedUserRecipients = selectedNotificationChannel?.allowedRecipients === "creator";
|
|
13
17
|
const { isValid: isParentValid } = useScheduleValidation(originalAutomation);
|
|
14
18
|
const validationErrorMessage = isParentValid
|
|
15
|
-
?
|
|
16
|
-
|
|
19
|
+
? isWidgetInsightUnavailable
|
|
20
|
+
? intl.formatMessage(messages.visualizationUnavailable)
|
|
21
|
+
: undefined
|
|
22
|
+
: intl.formatMessage(messages.widgetError);
|
|
17
23
|
const hasAttachments = !!editedAutomation.exportDefinitions?.length;
|
|
18
24
|
const hasRecipients = (editedAutomation.recipients?.length ?? 0) > 0;
|
|
19
25
|
const hasValidExternalRecipients = allowExternalRecipients
|
package/esm/presentation/automations/scheduledEmail/state/useScheduledExportDialogValidity.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScheduledExportDialogValidity.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledExportDialogValidity.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAGjE;;;;;;;;;GASG;AACH,wBAAgB,gCAAgC,IAAI,8BAA8B,
|
|
1
|
+
{"version":3,"file":"useScheduledExportDialogValidity.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/scheduledEmail/state/useScheduledExportDialogValidity.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAGjE;;;;;;;;;GASG;AACH,wBAAgB,gCAAgC,IAAI,8BAA8B,CA0BjF"}
|
package/esm/presentation/automations/scheduledEmail/state/useScheduledExportDialogValidity.js
CHANGED
|
@@ -16,7 +16,7 @@ import { useScheduledEmailFormValidity } from "./useScheduledEmailFormValidity.j
|
|
|
16
16
|
*/
|
|
17
17
|
export function useScheduledExportDialogValidity() {
|
|
18
18
|
const { maxAutomationsRecipients } = useAutomationsContext();
|
|
19
|
-
const { scheduledExportToEdit, notificationChannels } = useScheduledEmailDialogContext();
|
|
19
|
+
const { scheduledExportToEdit, notificationChannels, widget, insight } = useScheduledEmailDialogContext();
|
|
20
20
|
const { editedAutomation, originalAutomation, isCronValid, isTitleValid, isSubjectValid, isOnMessageValid, } = useScheduledExportDraft();
|
|
21
21
|
const { defaultRecipient } = useScheduledExportData();
|
|
22
22
|
return useScheduledEmailFormValidity({
|
|
@@ -30,5 +30,6 @@ export function useScheduledExportDialogValidity() {
|
|
|
30
30
|
isTitleValid,
|
|
31
31
|
isSubjectValid,
|
|
32
32
|
isOnMessageValid,
|
|
33
|
+
isWidgetInsightUnavailable: !!widget && !insight,
|
|
33
34
|
});
|
|
34
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAutomationVisibleFilters.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAutomationVisibleFilters.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAW5F,eAAO,MAAM,2BAA2B,sBAClB,iBAAiB,EAAE,GAAG,SAAS,KAClD,wBAAwB,EAY1B,CAAC;AAEF,eAAO,MAAM,gCAAgC,sBACvB,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,GAAG,SAAS,KAClE,MAAM,CAAC,MAAM,EAAE,wBAAwB,EAAE,CAc3C,CAAC"}
|
package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2025-2026 GoodData Corporation
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { _compact } from "@gooddata/util";
|
|
4
4
|
import { useFiltersByTabNamings, useFiltersNamings } from "../../hooks/useFiltersNamings.js";
|
|
5
5
|
// Module-level, not inline `= []` / `= {}` defaults: a default parameter is evaluated per call, so an
|
|
6
6
|
// inline default hands a fresh reference to the namings memos on every render of a caller that passes
|
|
@@ -10,7 +10,7 @@ const EMPTY_FILTERS_BY_TAB = {};
|
|
|
10
10
|
export const useAutomationVisibleFilters = (availableFilters = EMPTY_FILTERS) => {
|
|
11
11
|
const filterNamings = useFiltersNamings(availableFilters);
|
|
12
12
|
return useMemo(() => {
|
|
13
|
-
return
|
|
13
|
+
return _compact(filterNamings).map((filter) => {
|
|
14
14
|
return {
|
|
15
15
|
title: filter.title,
|
|
16
16
|
localIdentifier: filter.id,
|
|
@@ -24,7 +24,7 @@ export const useAutomationVisibleFiltersByTab = (availableFilters = EMPTY_FILTER
|
|
|
24
24
|
return useMemo(() => {
|
|
25
25
|
const result = {};
|
|
26
26
|
return Object.entries(filterNamings).reduce((acc, [tabId, namings]) => {
|
|
27
|
-
acc[tabId] =
|
|
27
|
+
acc[tabId] = _compact(namings).map((naming) => ({
|
|
28
28
|
title: naming.title,
|
|
29
29
|
localIdentifier: naming.id,
|
|
30
30
|
isAllTimeDateFilter: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversions.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/filters/conversions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversions.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/filters/conversions.ts"],"names":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