@gooddata/sdk-ui-dashboard 11.66.0-alpha.0 → 11.66.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 +262 -343
- package/esm/__version.d.ts +1 -1
- package/esm/__version.d.ts.map +1 -1
- package/esm/__version.js +1 -1
- package/esm/_staging/dashboard/dashboardTitle.d.ts +7 -0
- package/esm/_staging/dashboard/dashboardTitle.d.ts.map +1 -0
- package/esm/_staging/dashboard/dashboardTitle.js +21 -0
- package/esm/internal.d.ts +1 -1
- package/esm/internal.d.ts.map +1 -1
- package/esm/internal.js +1 -1
- package/esm/model/commandHandlers/dashboard/common/filterViews.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/common/filterViews.js +9 -3
- package/esm/model/commandHandlers/dashboard/saveAsDashboardHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/saveAsDashboardHandler.js +3 -1
- package/esm/model/commandHandlers/drill/keyDriverAnalysisHandler.js +1 -1
- package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.js +3 -3
- package/esm/model/commandHandlers/filterContext/filterViewHandler.js +3 -3
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.js +53 -4
- package/esm/model/commandHandlers/parameters/changeParameterValuesHandler.js +2 -2
- package/esm/model/commands/dashboard.d.ts +3 -1
- package/esm/model/commands/dashboard.d.ts.map +1 -1
- package/esm/model/commands/dashboard.js +2 -1
- package/esm/model/commands/filters.d.ts +18 -4
- package/esm/model/commands/filters.d.ts.map +1 -1
- package/esm/model/commands/filters.js +3 -2
- package/esm/model/commands/parameters.d.ts +4 -4
- package/esm/model/commands/parameters.d.ts.map +1 -1
- package/esm/model/commands/parameters.js +2 -2
- package/esm/model/store/tabs/filterContext/filterSync.d.ts +16 -4
- package/esm/model/store/tabs/filterContext/filterSync.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterSync.js +27 -10
- package/esm/model/store/tabs/layout/layoutSelectors.d.ts +7 -0
- package/esm/model/store/tabs/layout/layoutSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/layout/layoutSelectors.js +7 -0
- package/esm/model/store/topBar/topBarSelectors.d.ts +7 -0
- package/esm/model/store/topBar/topBarSelectors.d.ts.map +1 -1
- package/esm/model/store/topBar/topBarSelectors.js +10 -1
- package/esm/model/store/widgetDrills/widgetDrillSelectors.d.ts +2 -1
- package/esm/model/store/widgetDrills/widgetDrillSelectors.d.ts.map +1 -1
- package/esm/model/store/widgetDrills/widgetDrillSelectors.js +1 -1
- package/esm/presentation/automations/alerting/utils/transformation.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/utils/transformation.js +5 -3
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/SubjectForm/SubjectForm.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/SubjectForm/SubjectForm.js +2 -4
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.d.ts.map +1 -1
- package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.js +4 -2
- package/esm/presentation/drill/utils/kdaUtils.d.ts +1 -1
- package/esm/presentation/drill/utils/kdaUtils.d.ts.map +1 -1
- package/esm/presentation/drill/utils/kdaUtils.js +25 -26
- package/esm/presentation/saveAs/DefaultSaveAsDialog/SaveAsDialogRenderer.d.ts.map +1 -1
- package/esm/presentation/saveAs/DefaultSaveAsDialog/SaveAsDialogRenderer.js +7 -4
- package/esm/presentation/saveAs/DefaultSaveAsDialog/useSaveAs.d.ts.map +1 -1
- package/esm/presentation/saveAs/DefaultSaveAsDialog/useSaveAs.js +3 -1
- package/esm/presentation/topBar/buttonBar/button/saveAsButton/DefaultSaveAsNewButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/saveAsButton/DefaultSaveAsNewButton.js +3 -2
- package/esm/presentation/topBar/menuButton/useDefaultMenuItems.d.ts.map +1 -1
- package/esm/presentation/topBar/menuButton/useDefaultMenuItems.js +2 -4
- package/esm/presentation/topBar/title/EditableTitle.js +1 -1
- package/esm/sdk-ui-dashboard.d.ts +26 -10
- package/package.json +24 -24
- package/styles/css/main.css +1 -1
- package/esm/presentation/constants/dashboard.d.ts +0 -2
- package/esm/presentation/constants/dashboard.d.ts.map +0 -1
- package/esm/presentation/constants/dashboard.js +0 -2
|
@@ -26,9 +26,9 @@ export type ChangeParameterValuesParams = {
|
|
|
26
26
|
*/
|
|
27
27
|
restorePerTabOriginals?: boolean;
|
|
28
28
|
/**
|
|
29
|
-
* See {@link IChangeParameterValuesPayload.
|
|
29
|
+
* See {@link IChangeParameterValuesPayload.setAsOriginalToo}.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
setAsOriginalToo?: boolean;
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
34
|
* Payload of the {@link IChangeParameterValues} command.
|
|
@@ -48,7 +48,7 @@ export interface IChangeParameterValuesPayload {
|
|
|
48
48
|
* When true, the values this command writes become the values a reset restores, on this tab and
|
|
49
49
|
* on every tab they are synced to. Used when a default filter view initializes the shared state.
|
|
50
50
|
*/
|
|
51
|
-
readonly
|
|
51
|
+
readonly setAsOriginalToo?: boolean;
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* Command for setting runtime parameter overrides.
|
|
@@ -77,5 +77,5 @@ export interface IChangeParameterValues extends IDashboardCommand {
|
|
|
77
77
|
* @param params - params for the command creator
|
|
78
78
|
* @internal
|
|
79
79
|
*/
|
|
80
|
-
export declare function changeParameterValues({ parameters, tabLocalIdentifier, correlationId, restorePerTabOriginals,
|
|
80
|
+
export declare function changeParameterValues({ parameters, tabLocalIdentifier, correlationId, restorePerTabOriginals, setAsOriginalToo, }: ChangeParameterValuesParams): IChangeParameterValues;
|
|
81
81
|
//# sourceMappingURL=parameters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../src/model/commands/parameters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IAClC,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,cAAc,GAAG,SAAS,CAAC;CACrC;AAED;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACtC,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../src/model/commands/parameters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IAClC,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,cAAc,GAAG,SAAS,CAAC;CACrC;AAED;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACtC,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC1C,QAAQ,CAAC,UAAU,EAAE,qBAAqB,EAAE,CAAC;IAC7C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAC1C;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACvC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC7D,QAAQ,CAAC,IAAI,EAAE,uCAAuC,CAAC;IACvD,QAAQ,CAAC,OAAO,EAAE,6BAA6B,CAAC;CACnD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,EAClC,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,sBAAsB,EACtB,gBAAgB,GACnB,EAAE,2BAA2B,GAAG,sBAAsB,CAWtD"}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* @param params - params for the command creator
|
|
15
15
|
* @internal
|
|
16
16
|
*/
|
|
17
|
-
export function changeParameterValues({ parameters, tabLocalIdentifier, correlationId, restorePerTabOriginals,
|
|
17
|
+
export function changeParameterValues({ parameters, tabLocalIdentifier, correlationId, restorePerTabOriginals, setAsOriginalToo, }) {
|
|
18
18
|
return {
|
|
19
19
|
type: "GDC.DASH/CMD.PARAMETERS.CHANGE_VALUES",
|
|
20
20
|
correlationId,
|
|
@@ -22,7 +22,7 @@ export function changeParameterValues({ parameters, tabLocalIdentifier, correlat
|
|
|
22
22
|
parameters,
|
|
23
23
|
tabLocalIdentifier,
|
|
24
24
|
...(restorePerTabOriginals ? { restorePerTabOriginals } : {}),
|
|
25
|
-
...(
|
|
25
|
+
...(setAsOriginalToo ? { setAsOriginalToo } : {}),
|
|
26
26
|
},
|
|
27
27
|
};
|
|
28
28
|
}
|
|
@@ -28,10 +28,11 @@ export type CrossFilteringLocalIdsByTab = Readonly<Record<string, readonly strin
|
|
|
28
28
|
export declare function isCrossFilteringVirtualFilter(tab: ITabState, localIdentifier: string | undefined, crossFilteringLocalIdsByTab: CrossFilteringLocalIdsByTab | undefined): boolean;
|
|
29
29
|
/**
|
|
30
30
|
* Finds the filter on `targetTab` that is the same logical filter as `sourceFilter`.
|
|
31
|
-
* An attribute filter is a counterpart
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
31
|
+
* An attribute filter is a counterpart when it is of the same type (list or text), shows the same
|
|
32
|
+
* label, and selects either a single value or multiple values. Selection type is not part of that
|
|
33
|
+
* identity: it only limits how a value can be entered on a tab. Whether the value itself can be
|
|
34
|
+
* stored on the counterpart is decided by {@link targetAcceptsAttributeFilterValue}.
|
|
35
|
+
* A missing counterpart is a no-op for the caller.
|
|
35
36
|
*
|
|
36
37
|
* Assumes at most one filter per display form, date data set, and measure with a given
|
|
37
38
|
* dimensionality on a tab.
|
|
@@ -119,5 +120,16 @@ export interface ISyncedTabSeed {
|
|
|
119
120
|
* @internal
|
|
120
121
|
*/
|
|
121
122
|
export declare function seedSyncedTabFilters(sourceTab: ITabState, base: IFilterContextDefinition, crossFilteringLocalIdsByTab?: CrossFilteringLocalIdsByTab): ISyncedTabSeed;
|
|
123
|
+
/**
|
|
124
|
+
* Whether `value` can be stored on `targetFilter`.
|
|
125
|
+
*
|
|
126
|
+
* A list selection is valid on a list filter and on a list-or-text filter, so it syncs in both
|
|
127
|
+
* directions. A text value, such as a "contains" match, is valid on a text filter and on a
|
|
128
|
+
* list-or-text filter, and cannot be applied to a list-only filter. An omitted selection type
|
|
129
|
+
* means list-or-text, except a single-value list filter, which means list.
|
|
130
|
+
*
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
133
|
+
export declare function targetAcceptsAttributeFilterValue(targetTab: ITabState, targetFilter: DashboardAttributeFilterItem, value: DashboardAttributeFilterItem): boolean;
|
|
122
134
|
export {};
|
|
123
135
|
//# sourceMappingURL=filterSync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterSync.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/filterContext/filterSync.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EACH,KAAK,4BAA4B,
|
|
1
|
+
{"version":3,"file":"filterSync.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/filterContext/filterSync.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EACH,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,+BAA+B,EAEpC,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EAEjC,KAAK,kCAAkC,EACvC,KAAK,wBAAwB,EAC7B,KAAK,MAAM,EACX,KAAK,cAAc,EAgBtB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAExE,KAAK,YAAY,GAAG,iBAAiB,GAAG,wBAAwB,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC;;OAEG;IACH,QAAQ,CAAC,2BAA2B,CAAC,EAAE,2BAA2B,CAAC;CACtE;AAED;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;AAEtF;;;;;GAKG;AACH,wBAAgB,6BAA6B,CACzC,GAAG,EAAE,SAAS,EACd,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,2BAA2B,EAAE,2BAA2B,GAAG,SAAS,GACrE,OAAO,CAKT;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAq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AQ,CAAC,uBAAuB,EAAE,wBAAwB,CAAC;IAC3D,QAAQ,CAAC,2BAA2B,EAAE,mCAAmC,EAAE,CAAC;IAC5E,QAAQ,CAAC,sBAAsB,EAAE,+BAA+B,EAAE,CAAC;IACnE,QAAQ,CAAC,iBAAiB,EAAE,8BAA8B,EAAE,CAAC;IAC7D,QAAQ,CAAC,yBAAyB,EAAE,kCAAkC,EAAE,CAAC;IACzE,QAAQ,CAAC,kBAAkB,EAAE,4BAA4B,GAAG,SAAS,CAAC;CACzE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAChC,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,wBAAwB,EAC9B,2BAA2B,CAAC,EAAE,2BAA2B,GAC1D,cAAc,CAsChB;AA4GD;;;;;;;;;GASG;AACH,wBAAgB,iCAAiC,CAC7C,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,4BAA4B,EAC1C,KAAK,EAAE,4BAA4B,GACpC,OAAO,CAST"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
import { areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemFilterElementsBy, dashboardAttributeFilterItemFilterElementsByDate, dashboardAttributeFilterItemLocalIdentifier, dashboardAttributeFilterItemValidateElementsBy, dashboardFilterLocalIdentifier, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilter, isDashboardDateFilter, isDashboardMatchAttributeFilter, isDashboardMeasureValueFilter, isSingleSelectionFilter, } from "@gooddata/sdk-model";
|
|
3
3
|
import { displayFormsEquivalent, findAttributeFilterCounterpart, } from "../../../utils/attributeFilterMatching.js";
|
|
4
|
-
import {
|
|
4
|
+
import { canApplyFilterTypeToTarget } from "../../../utils/attributeFilterSelectionTypeCompatibility.js";
|
|
5
5
|
/**
|
|
6
6
|
* True when `localIdentifier` belongs to a cross-filtering virtual filter on `tab`.
|
|
7
7
|
* Those filters are applied on their own tab only and are not mirrored to or from other tabs.
|
|
@@ -16,10 +16,11 @@ export function isCrossFilteringVirtualFilter(tab, localIdentifier, crossFilteri
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Finds the filter on `targetTab` that is the same logical filter as `sourceFilter`.
|
|
19
|
-
* An attribute filter is a counterpart
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
19
|
+
* An attribute filter is a counterpart when it is of the same type (list or text), shows the same
|
|
20
|
+
* label, and selects either a single value or multiple values. Selection type is not part of that
|
|
21
|
+
* identity: it only limits how a value can be entered on a tab. Whether the value itself can be
|
|
22
|
+
* stored on the counterpart is decided by {@link targetAcceptsAttributeFilterValue}.
|
|
23
|
+
* A missing counterpart is a no-op for the caller.
|
|
23
24
|
*
|
|
24
25
|
* Assumes at most one filter per display form, date data set, and measure with a given
|
|
25
26
|
* dimensionality on a tab.
|
|
@@ -339,17 +340,33 @@ function attributeFilterPresentation(tab, filter) {
|
|
|
339
340
|
: undefined;
|
|
340
341
|
return {
|
|
341
342
|
displayAsLabel: config?.displayAsLabel ?? dashboardAttributeFilterItemDisplayForm(filter),
|
|
342
|
-
selectionType: effectiveSelectionTypeOf(config?.selectionType, filter),
|
|
343
343
|
isSingleSelection: isDashboardAttributeFilter(filter) && isSingleSelectionFilter(filter),
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
346
|
/**
|
|
347
|
-
*
|
|
348
|
-
*
|
|
347
|
+
* Whether `value` can be stored on `targetFilter`.
|
|
348
|
+
*
|
|
349
|
+
* A list selection is valid on a list filter and on a list-or-text filter, so it syncs in both
|
|
350
|
+
* directions. A text value, such as a "contains" match, is valid on a text filter and on a
|
|
351
|
+
* list-or-text filter, and cannot be applied to a list-only filter. An omitted selection type
|
|
352
|
+
* means list-or-text, except a single-value list filter, which means list.
|
|
353
|
+
*
|
|
354
|
+
* @internal
|
|
355
|
+
*/
|
|
356
|
+
export function targetAcceptsAttributeFilterValue(targetTab, targetFilter, value) {
|
|
357
|
+
const localIdentifier = dashboardAttributeFilterItemLocalIdentifier(targetFilter);
|
|
358
|
+
const selectionType = localIdentifier
|
|
359
|
+
? targetTab.attributeFilterConfigs?.attributeFilterConfigs?.find((config) => config.localIdentifier === localIdentifier)?.selectionType
|
|
360
|
+
: undefined;
|
|
361
|
+
const valueType = isDashboardAttributeFilter(value) ? "list" : "text";
|
|
362
|
+
return canApplyFilterTypeToTarget(valueType, selectionType, targetFilter);
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Attribute filters are the same filter when they show the same label and both select either a
|
|
366
|
+
* single value or multiple values.
|
|
349
367
|
*/
|
|
350
368
|
function samePresentation(left, right, displayForms) {
|
|
351
|
-
return (left.
|
|
352
|
-
left.isSingleSelection === right.isSingleSelection &&
|
|
369
|
+
return (left.isSingleSelection === right.isSingleSelection &&
|
|
353
370
|
displayFormsEquivalent(left.displayAsLabel, right.displayAsLabel, displayForms));
|
|
354
371
|
}
|
|
355
372
|
function findDateCounterpart(sourceFilter, targets) {
|
|
@@ -315,6 +315,13 @@ export declare const selectAllTabsInsightWidgetContexts: DashboardSelector<IInsi
|
|
|
315
315
|
* @internal
|
|
316
316
|
*/
|
|
317
317
|
export declare function isInsightWidgetTabContext(context: IWidgetTabContext): context is IInsightWidgetTabContext;
|
|
318
|
+
/**
|
|
319
|
+
* Selects whether any tab of the dashboard contains at least one analytical widget. Nested layouts
|
|
320
|
+
* count only through the widgets they contain.
|
|
321
|
+
*
|
|
322
|
+
* @internal
|
|
323
|
+
*/
|
|
324
|
+
export declare const selectLayoutHasAnalyticalWidgetsAcrossTabs: DashboardSelector<boolean>;
|
|
318
325
|
/**
|
|
319
326
|
* Selects the local identifier of the tab that contains the specified widget.
|
|
320
327
|
* Returns undefined if the widget is not found in any tab.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layoutSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/model/store/tabs/layout/layoutSel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H,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IAC/D,MAAM,EAAE,cAAc,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,EAAE,iBAAiB,CAAC,iBAAiB,EAAE,CAkB9E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC,EAAE,iBAAiB,CAAC,wBAAwB,EAAE,CACY,CAAC;AAE1G;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,IAAI,wBAAwB,CAEzG;AAED;;;;;GAKG;AACH,eAAO,MAAM,0CAA0C,EAAE,iBAAiB,CAAC,OAAO,CAIjF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,mCAAmC,EAAE,CAC9C,GAAG,EAAE,MAAM,GAAG,SAAS,KACtB,iBAAiB,CAAC,MAAM,GAAG,SAAS,CAkBxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,EAAE,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAsBnF,CAAC"}
|
|
@@ -547,6 +547,13 @@ export const selectAllTabsInsightWidgetContexts = createSelector(selectAllTabsWi
|
|
|
547
547
|
export function isInsightWidgetTabContext(context) {
|
|
548
548
|
return isInsightWidget(context.widget);
|
|
549
549
|
}
|
|
550
|
+
/**
|
|
551
|
+
* Selects whether any tab of the dashboard contains at least one analytical widget. Nested layouts
|
|
552
|
+
* count only through the widgets they contain.
|
|
553
|
+
*
|
|
554
|
+
* @internal
|
|
555
|
+
*/
|
|
556
|
+
export const selectLayoutHasAnalyticalWidgetsAcrossTabs = createSelector(selectAllTabsWidgetContexts, (contexts) => contexts.some(({ widget }) => !isCustomWidget(widget) && !isExtendedDashboardLayoutWidget(widget)));
|
|
550
557
|
/**
|
|
551
558
|
* Selects the local identifier of the tab that contains the specified widget.
|
|
552
559
|
* Returns undefined if the widget is not found in any tab.
|
|
@@ -42,6 +42,13 @@ export declare const selectIsShareButtonVisible: DashboardSelector<boolean>;
|
|
|
42
42
|
* @internal
|
|
43
43
|
*/
|
|
44
44
|
export declare const selectIsSaveAsNewButtonVisible: DashboardSelector<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* Selects whether Save as new is enabled. Visibility and permissions are checked by
|
|
47
|
+
* {@link selectIsSaveAsNewButtonVisible} and {@link selectSaveAsVisible}.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export declare const selectIsSaveAsNewEnabled: DashboardSelector<boolean>;
|
|
45
52
|
/**
|
|
46
53
|
* Selects whether the common export is available.
|
|
47
54
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topBarSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/topBar/topBarSelectors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"topBarSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/topBar/topBarSelectors.ts"],"names":[],"mappings":"AAuCA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAI1E;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,OAAO,CAO7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iCAAiC,EAAE,iBAAiB,CAAC,OAAO,CAIxE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,OAAO,CAI/D,CAAC;AAEF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,cAAc,WAE3D;AAED;;GAEG;AACH,eAAO,MAAM,qCAAqC,EAAE,iBAAiB,CAAC,OAAO,CAK5E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uCAAuC,EAAE,iBAAiB,CAAC,OAAO,CAM9E,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,OAAO,CAMhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,OAAO,CAOhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iCAAiC,EAAE,iBAAiB,CAAC,OAAO,CAIxE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,iBAAiB,CAAC,OAAO,CAuBjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,iBAAiB,CAAC,OAAO,CA8BrE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,OAAO,CAO/D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAE,iBAAiB,CAAC,OAAO,CAMlE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,iBAAiB,CAAC,OAAO,CAMrE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,iBAAiB,CAAC,OAAO,CAYnE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,OAAO,CAM7D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,CAAC,OAAO,CAqB1D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,CAAC,OAAO,CAM5D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,CAAC,OAAO,CAM1D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,OAAO,CAK/D,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { selectIsDashboardLoading } from "../loading/loadingSelectors.js";
|
|
|
8
8
|
import { selectDashboardLockStatus, selectDashboardRef, selectDisableFilterViews, selectIsDashboardDirty, selectIsDashboardPrivate, selectIsNewDashboard, } from "../meta/metaSelectors.js";
|
|
9
9
|
import { selectCanCreateAnalyticalDashboard, selectCanExportPdf, } from "../permissions/permissionsSelectors.js";
|
|
10
10
|
import { selectIsInEditMode, selectIsInViewMode } from "../renderMode/renderModeSelectors.js";
|
|
11
|
-
import { selectIsLayoutEmpty } from "../tabs/layout/layoutSelectors.js";
|
|
11
|
+
import { selectIsLayoutEmpty, selectLayoutHasAnalyticalWidgetsAcrossTabs, } from "../tabs/layout/layoutSelectors.js";
|
|
12
12
|
import { selectMenuButtonItemsVisibility } from "../ui/uiSelectors.js";
|
|
13
13
|
import { selectHasCopyBlockingReferences } from "../unavailableObjects/copyBlockingReferences.js";
|
|
14
14
|
/**
|
|
@@ -87,6 +87,15 @@ export const selectIsSaveAsNewButtonVisible = createSelector(selectIsSaveAsNewBu
|
|
|
87
87
|
!isReadOnly &&
|
|
88
88
|
!isCopyBlocked);
|
|
89
89
|
});
|
|
90
|
+
/**
|
|
91
|
+
* Selects whether Save as new is enabled. Visibility and permissions are checked by
|
|
92
|
+
* {@link selectIsSaveAsNewButtonVisible} and {@link selectSaveAsVisible}.
|
|
93
|
+
*
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
export const selectIsSaveAsNewEnabled = createSelector(selectLayoutHasAnalyticalWidgetsAcrossTabs, selectIsNewDashboard, selectIsReadOnly,
|
|
97
|
+
// save as copies every tab
|
|
98
|
+
(hasAnalyticalWidgets, isNewDashboard, isReadOnly) => hasAnalyticalWidgets && !isNewDashboard && !isReadOnly);
|
|
90
99
|
/**
|
|
91
100
|
* Selects whether the common export is available.
|
|
92
101
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type IAttributeDescriptor, type ICatalogAttribute, type ICatalogDateAttribute, type IDrillDownReference, type ObjRef } from "@gooddata/sdk-model";
|
|
1
|
+
import { type IAttributeDescriptor, type ICatalogAttribute, type ICatalogDateAttribute, type IDrillDownReference, type IInsight, type ObjRef } from "@gooddata/sdk-model";
|
|
2
2
|
import { type ExplicitDrill, type IAvailableDrillTargets, type IHeaderPredicate } from "@gooddata/sdk-ui";
|
|
3
3
|
import { type ObjRefMap } from "../../../_staging/metadata/objRefMap.js";
|
|
4
4
|
import { type DashboardDrillDefinition, type IDrillToUrlAttributeDefinition, type IGlobalDrillDownAttributeHierarchyDefinition } from "../../../types.js";
|
|
@@ -83,4 +83,5 @@ export declare const selectImplicitDrillsByAvailableDrillTargets: (availableDril
|
|
|
83
83
|
* @internal
|
|
84
84
|
*/
|
|
85
85
|
export declare const selectDrillableItemsByAvailableDrillTargets: (availableDrillTargets: IAvailableDrillTargets | undefined, ignoredDrillDownHierarchies: IDrillDownReference[] | undefined, disableDrillIntoURL: boolean | undefined, disableDrillDown?: boolean) => DashboardSelector<IHeaderPredicate[]>;
|
|
86
|
+
export declare function getMetricDisabled(insight: IInsight | undefined | null, localIdentifier: string): boolean;
|
|
86
87
|
//# sourceMappingURL=widgetDrillSelectors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetDrillSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/widgetDrills/widgetDrillSelectors.ts"],"names":[],"mappings":"AAMA,OAAO,EAIH,KAAK,oBAAoB,EAEzB,KAAK,iBAAiB,EAEtB,KAAK,qBAAqB,EAE1B,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"widgetDrillSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/widgetDrills/widgetDrillSelectors.ts"],"names":[],"mappings":"AAMA,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;AAG1B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC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
|
@@ -515,6 +515,6 @@ export const selectDrillableItemsByAvailableDrillTargets = createMemoizedSelecto
|
|
|
515
515
|
...restrictedDrillDownPredicates(restrictedDrillDowns),
|
|
516
516
|
];
|
|
517
517
|
}));
|
|
518
|
-
function getMetricDisabled(insight, localIdentifier) {
|
|
518
|
+
export function getMetricDisabled(insight, localIdentifier) {
|
|
519
519
|
return (insight?.insight.properties?.["controls"]?.["disableKeyDriveAnalysisOn"]?.[localIdentifier] ?? false);
|
|
520
520
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformation.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/utils/transformation.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAG3B,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EAGxC,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EAKzB,KAAK,SAAS,EAOjB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,yBAAyB,EAC5B,MAAM,aAAa,CAAC;AAGrB,OAAO,EACH,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"transformation.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/utils/transformation.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAG3B,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EAGxC,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EAKzB,KAAK,SAAS,EAOjB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACH,KA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ERATORS, RELATIVE_OPERATORS } from "@gooddata/sdk-ui-ext";
|
|
6
6
|
import { AlertMetricComparatorType, } from "../types.js";
|
|
7
7
|
import { createCronFromGranularity } from "./cron.js";
|
|
8
|
-
import { getAttributeRelatedFilterInfo, getMeasureFormat, getMeasureTitle, } from "./getters.js";
|
|
8
|
+
import { getAlertComparison, getAttributeRelatedFilterInfo, getMeasureFormat, getMeasureTitle, } from "./getters.js";
|
|
9
9
|
//alerts transformations
|
|
10
10
|
/**
|
|
11
11
|
* This function transforms alert by metric. It changes title, condition and execution based on selected metric.
|
|
@@ -17,8 +17,10 @@ import { getAttributeRelatedFilterInfo, getMeasureFormat, getMeasureTitle, } fro
|
|
|
17
17
|
* @param timezone - timezone for relative date filter
|
|
18
18
|
*/
|
|
19
19
|
export function transformAlertByMetric(metrics, alert, measure, measureFormatMap, weekStart, timezone) {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
// filter changes call this with the same metric, so keep the alert's comparison
|
|
21
|
+
const periodMeasure = getAlertComparison(measure, alert.alert) ??
|
|
22
|
+
measure.comparators.find((c) => c.comparator === AlertMetricComparatorType.PreviousPeriod ||
|
|
23
|
+
c.comparator === AlertMetricComparatorType.SamePeriodPreviousYear);
|
|
22
24
|
if (alert.alert?.condition.type === "anomalyDetection" && periodMeasure?.dataset) {
|
|
23
25
|
const cond = transformToAnomalyDetectionCondition(alert.alert.condition, periodMeasure);
|
|
24
26
|
const condition = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubjectForm.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/SubjectForm/SubjectForm.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AAK3E,wBAAgB,WAAW,CAAC,EACxB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,eAAe,GAClB,EAAE,iCAAiC,
|
|
1
|
+
{"version":3,"file":"SubjectForm.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/SubjectForm/SubjectForm.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AAK3E,wBAAgB,WAAW,CAAC,EACxB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,eAAe,GAClB,EAAE,iCAAiC,2CA0FnC"}
|
|
@@ -4,7 +4,7 @@ import { useCallback } from "react";
|
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { ValidationContextStore, createInvalidDatapoint, createInvalidNode, useValidationContextValue, } from "@gooddata/sdk-ui";
|
|
6
6
|
import { Input, useIdPrefixed } from "@gooddata/sdk-ui-kit";
|
|
7
|
-
import {
|
|
7
|
+
import { truncateDashboardTitle } from "../../../../../../_staging/dashboard/dashboardTitle.js";
|
|
8
8
|
import { ErrorWrapper } from "../ErrorWrapper/ErrorWrapper.js";
|
|
9
9
|
const MAX_SUBJECT_LENGTH = 255;
|
|
10
10
|
export function SubjectForm({ dashboardTitle, editedAutomation, isSubmitDisabled, onChange, onKeyDownSubmit, }) {
|
|
@@ -39,9 +39,7 @@ export function SubjectForm({ dashboardTitle, editedAutomation, isSubmitDisabled
|
|
|
39
39
|
const handleOnBlur = useCallback((e) => {
|
|
40
40
|
setHasError(!isValueValid(e.target.value));
|
|
41
41
|
}, [isValueValid, setHasError]);
|
|
42
|
-
return (_jsx(ValidationContextStore, { value: validationContextValue, children: _jsx(ErrorWrapper, { errorId: errorId, errorMessage: invalidDatapoint?.message ?? null, label: formatMessage({ id: "dialogs.schedule.email.subject.label" }), labelId: labelId, className: "gd-input-component gd-notifications-channels-dialog-subject s-gd-notifications-channels-dialog-subject", labelWrapperClassName: "gd-notifications-channels-dialog-subject-wrapper", errorClassName: "gd-notifications-channels-dialog-subject-error", children: _jsx(Input, { id: labelId, hasError: !isValid, maxlength: 300, type: "text", placeholder: dashboardTitle.
|
|
43
|
-
? dashboardTitle.substring(0, DASHBOARD_TITLE_MAX_LENGTH)
|
|
44
|
-
: dashboardTitle, value: editedAutomation.details?.subject ?? "", onChange:
|
|
42
|
+
return (_jsx(ValidationContextStore, { value: validationContextValue, children: _jsx(ErrorWrapper, { errorId: errorId, errorMessage: invalidDatapoint?.message ?? null, label: formatMessage({ id: "dialogs.schedule.email.subject.label" }), labelId: labelId, className: "gd-input-component gd-notifications-channels-dialog-subject s-gd-notifications-channels-dialog-subject", labelWrapperClassName: "gd-notifications-channels-dialog-subject-wrapper", errorClassName: "gd-notifications-channels-dialog-subject-error", children: _jsx(Input, { id: labelId, hasError: !isValid, maxlength: 300, type: "text", placeholder: truncateDashboardTitle(dashboardTitle), value: editedAutomation.details?.subject ?? "", onChange:
|
|
45
43
|
// as any, the value will indeed always be string
|
|
46
44
|
// TODO improve typings of Input in ui-kit to have properly typed the onChange related to the input type
|
|
47
45
|
handleOnChange, onEnterKeyPress: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrillSelectDropdown.d.ts","sourceRoot":"","sources":["../../../../src/presentation/drill/DrillSelect/DrillSelectDropdown.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,YAAY,CAAC;AAGrD,OAAO,EACH,KAAK,mCAAmC,EACxC,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,OAAO,
|
|
1
|
+
{"version":3,"file":"DrillSelectDropdown.d.ts","sourceRoot":"","sources":["../../../../src/presentation/drill/DrillSelect/DrillSelectDropdown.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,YAAY,CAAC;AAGrD,OAAO,EACH,KAAK,mCAAmC,EACxC,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,OAAO,EAgBf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,W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y, uniqBy } from "lodash-es";
|
|
6
6
|
import { useIntl } from "react-intl";
|
|
7
7
|
import { invariant } from "ts-invariant";
|
|
8
|
-
import { areObjRefsEqual, insightTitle, isAttributeDescriptor, isCrossFiltering, isDrillFromAttribute, isDrillToAttributeUrl, isDrillToCustomUrl, isDrillToDashboard, isDrillToInsight, isDrillToLegacyDashboard, isIdentifierRef, isKeyDriveAnalysis, objRefToString, } from "@gooddata/sdk-model";
|
|
8
|
+
import { areObjRefsEqual, insightTitle, isAttributeDescriptor, isCrossFiltering, isDrillFromAttribute, isDrillToAttributeUrl, isDrillToCustomUrl, isDrillToDashboard, isDrillToInsight, isDrillToLegacyDashboard, isIdentifierRef, isInsightWidget, isKeyDriveAnalysis, objRefToString, } from "@gooddata/sdk-model";
|
|
9
9
|
import { UnexpectedSdkError } from "@gooddata/sdk-ui";
|
|
10
10
|
import { Overlay, UiFocusManager, UiMenu } from "@gooddata/sdk-ui-kit";
|
|
11
11
|
import { getDrillOriginLocalIdentifier } from "../../../_staging/drills/drillingUtils.js";
|
|
@@ -17,6 +17,7 @@ import { selectInsightsMap } from "../../../model/store/insights/insightsSelecto
|
|
|
17
17
|
import { selectDashboardTitle } from "../../../model/store/meta/metaSelectors.js";
|
|
18
18
|
import { selectWidgetByRef } from "../../../model/store/tabs/layout/layoutSelectors.js";
|
|
19
19
|
import { selectIsDrillRestricted } from "../../../model/store/widgetDrills/drillRestrictionSelectors.js";
|
|
20
|
+
import { getMetricDisabled, } from "../../../model/store/widgetDrills/widgetDrillSelectors.js";
|
|
20
21
|
import { isDrillDownDefinition } from "../../../types.js";
|
|
21
22
|
import { useDrillSelectDropdownMenuItems } from "../hooks/useDrillSelectDropdownMenuItems.js";
|
|
22
23
|
import { isDrillToUrl } from "../types.js";
|
|
@@ -325,7 +326,8 @@ export const createDrillSelectItems = ({ drillDefinitions, drillEvent, insights,
|
|
|
325
326
|
};
|
|
326
327
|
}
|
|
327
328
|
if (isKeyDriveAnalysis(drillDefinition)) {
|
|
328
|
-
const
|
|
329
|
+
const widgetInsight = isInsightWidget(widget) ? insights.get(widget.insight) : undefined;
|
|
330
|
+
const items = getKdaKeyDriverCombinations(drillDefinition, drillEvent, enableSecondGranularities, (localIdentifier) => getMetricDisabled(widgetInsight, localIdentifier));
|
|
329
331
|
return items.map((item) => {
|
|
330
332
|
return {
|
|
331
333
|
name: getKeyDriverCombinationItemTitle(intl, item),
|
|
@@ -5,7 +5,7 @@ import type { IDashboardKeyDriverCombinationItem } from "../../../model/events/d
|
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
|
-
export declare function getKdaKeyDriverCombinations(drillDefinition: IKeyDriveAnalysis, drillEvent: IDrillEvent, enableSecondGranularities?: boolean): IDashboardKeyDriverCombinationItem[];
|
|
8
|
+
export declare function getKdaKeyDriverCombinations(drillDefinition: IKeyDriveAnalysis, drillEvent: IDrillEvent, enableSecondGranularities?: boolean, isMeasureDisabled?: (localIdentifier: string) => boolean): IDashboardKeyDriverCombinationItem[];
|
|
9
9
|
/**
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kdaUtils.d.ts","sourceRoot":"","sources":["../../../../src/presentation/drill/utils/kdaUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAEH,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"kdaUtils.d.ts","sourceRoot":"","sources":["../../../../src/presentation/drill/utils/kdaUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAEH,KAAK,iBAAiB,EASzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGH,KAAK,WAAW,EAgBnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,gCAAgC,CAAC;AAGzF;;GAEG;AACH,wBAAgB,2BAA2B,CACvC,eAAe,EAAE,iBAAiB,EAClC,UAAU,EAAE,WAAW,EACvB,yBAAyB,UAAQ,EACjC,iBAAiB,GAAE,CAAC,eAAe,EAAE,MAAM,KAAK,OAAqB,GACtE,kCAAkC,EAAE,CAkEtC;AA2UD;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,kCAAkC,UAsCzG"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// (C) 2025-2026 GoodData Corporation
|
|
2
|
-
import { isAttributeDescriptor, isMeasureDescriptor, isMeasureGroupDescriptor, isYearGranularity, } from "@gooddata/sdk-model";
|
|
3
|
-
import { DataViewFacade, isAttributeScope, isDrillIntersectionAttributeItem, isDrillIntersectionDateAttributeItem, isMeasureScope, isTableMeasureValue, isValueColumnDefinition, isValueRowDefinition, } from "@gooddata/sdk-ui";
|
|
2
|
+
import { bucketMeasures, bucketsFind, isAttributeDescriptor, isMeasureDescriptor, isMeasureGroupDescriptor, isYearGranularity, measureLocalId, } from "@gooddata/sdk-model";
|
|
3
|
+
import { BucketNames, DataViewFacade, isAttributeScope, isDrillIntersectionAttributeItem, isDrillIntersectionDateAttributeItem, isMeasureScope, isTableMeasureValue, isValueColumnDefinition, isValueRowDefinition, } from "@gooddata/sdk-ui";
|
|
4
4
|
import { getKeyDriverAnalysisSupportedStringGranularities } from "../../../model/store/keyDriverAnalysis/const.js";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
|
-
export function getKdaKeyDriverCombinations(drillDefinition, drillEvent, enableSecondGranularities = false) {
|
|
8
|
+
export function getKdaKeyDriverCombinations(drillDefinition, drillEvent, enableSecondGranularities = false, isMeasureDisabled = () => false) {
|
|
9
9
|
//TODO: Special implementation for headline
|
|
10
10
|
const dv = DataViewFacade.for(drillEvent.dataView);
|
|
11
|
-
const combinations = findHeadersCombinations(dv, drillDefinition, drillEvent);
|
|
11
|
+
const combinations = findHeadersCombinations(dv, drillDefinition, drillEvent, isMeasureDisabled);
|
|
12
12
|
// No relevant headers
|
|
13
13
|
if (!combinations.dateHeader || !combinations.metricHeader) {
|
|
14
14
|
return [];
|
|
@@ -26,13 +26,10 @@ export function getKdaKeyDriverCombinations(drillDefinition, drillEvent, enableS
|
|
|
26
26
|
const filteredRows = filterRows(table.rowDefinitions, dimScopedValues[0], dateId);
|
|
27
27
|
const exactColumn = filterExactColumn(filteredColumns, dimScopedValues[1]);
|
|
28
28
|
const exactRow = filterExactRow(filteredRows, dimScopedValues[0]);
|
|
29
|
-
const isFirstColumn = exactColumn === filteredColumns[0];
|
|
30
|
-
const isFirstRow = exactRow === filteredRows[0];
|
|
31
|
-
const isLastColumn = exactColumn === filteredColumns[filteredColumns.length - 1];
|
|
32
|
-
const isLastRow = exactRow === filteredRows[filteredRows.length - 1];
|
|
33
29
|
const current = getCurrentValue(table.data, dateId, exactRow, exactColumn);
|
|
34
|
-
const
|
|
35
|
-
const
|
|
30
|
+
const getNeighbourValue = (direction) => getDirectionValue(table.data, dateId, current, direction, filteredRows, filteredColumns, exactRow, exactColumn);
|
|
31
|
+
const previous = getNeighbourValue(-1);
|
|
32
|
+
const next = getNeighbourValue(1);
|
|
36
33
|
const res = [];
|
|
37
34
|
// There is a previous value in graph
|
|
38
35
|
const before = createBefore(combinations, current, previous);
|
|
@@ -174,23 +171,15 @@ function getCurrentValue(data, dateId, row, column) {
|
|
|
174
171
|
const res = data[row.rowIndex]?.[column.columnIndex];
|
|
175
172
|
return mapToCurrentValue(res, dateId, row.rowIndex, column.columnIndex);
|
|
176
173
|
}
|
|
177
|
-
function getDirectionValue(data, dateId, current, direction,
|
|
178
|
-
if (!current) {
|
|
174
|
+
function getDirectionValue(data, dateId, current, direction, rows, columns, row, column) {
|
|
175
|
+
if (!current || !row || !column) {
|
|
179
176
|
return null;
|
|
180
177
|
}
|
|
181
178
|
if (current.direction === "row") {
|
|
182
|
-
|
|
183
|
-
return null;
|
|
184
|
-
}
|
|
185
|
-
const res = data[current.row + direction]?.[current.column];
|
|
186
|
-
return mapToCurrentValue(res, dateId, current.row + direction, current.column);
|
|
179
|
+
return getCurrentValue(data, dateId, rows[rows.indexOf(row) + direction], column);
|
|
187
180
|
}
|
|
188
181
|
if (current.direction === "column") {
|
|
189
|
-
|
|
190
|
-
return null;
|
|
191
|
-
}
|
|
192
|
-
const res = data[current.row]?.[current.column + direction];
|
|
193
|
-
return mapToCurrentValue(res, dateId, current.row, current.column + direction);
|
|
182
|
+
return getCurrentValue(data, dateId, row, columns[columns.indexOf(column) + direction]);
|
|
194
183
|
}
|
|
195
184
|
return null;
|
|
196
185
|
}
|
|
@@ -331,7 +320,7 @@ export function getKeyDriverCombinationItemTitle(intl, item) {
|
|
|
331
320
|
return intl.formatMessage({ id: "drill.kda.year_to_year" });
|
|
332
321
|
}
|
|
333
322
|
}
|
|
334
|
-
function findHeadersCombinations(dv, drillDefinition, drillEvent) {
|
|
323
|
+
function findHeadersCombinations(dv, drillDefinition, drillEvent, isMeasureDisabled) {
|
|
335
324
|
if (drillDefinition.transition !== "in-place") {
|
|
336
325
|
return {
|
|
337
326
|
dateHeader: undefined,
|
|
@@ -344,9 +333,12 @@ function findHeadersCombinations(dv, drillDefinition, drillEvent) {
|
|
|
344
333
|
const dateHeader = intersections
|
|
345
334
|
.map((intersectionElement) => intersectionElement.header)
|
|
346
335
|
.filter(isDrillIntersectionDateAttributeItem)[0];
|
|
347
|
-
const
|
|
336
|
+
const measureHeaders = intersections
|
|
348
337
|
.map((intersectionElement) => intersectionElement.header)
|
|
349
|
-
.filter(isMeasureDescriptor)
|
|
338
|
+
.filter(isMeasureDescriptor)
|
|
339
|
+
.filter((header) => !isMeasureDisabled(header.measureHeaderItem.localIdentifier));
|
|
340
|
+
const preferredMeasureIds = getPreferredMeasureIds(drillEvent);
|
|
341
|
+
const metricHeader = measureHeaders.find((header) => preferredMeasureIds.includes(header.measureHeaderItem.localIdentifier)) ?? measureHeaders[0];
|
|
350
342
|
const attributeHeaders = intersections
|
|
351
343
|
.map((intersectionElement) => intersectionElement.header)
|
|
352
344
|
.filter(isDrillIntersectionAttributeItem)
|
|
@@ -366,7 +358,7 @@ function findHeadersCombinations(dv, drillDefinition, drillEvent) {
|
|
|
366
358
|
});
|
|
367
359
|
}
|
|
368
360
|
if (isMeasureGroupDescriptor(h)) {
|
|
369
|
-
return intersections.find((i) =>
|
|
361
|
+
return intersections.find((i) => i.header === metricHeader);
|
|
370
362
|
}
|
|
371
363
|
return undefined;
|
|
372
364
|
})
|
|
@@ -378,6 +370,13 @@ function findHeadersCombinations(dv, drillDefinition, drillEvent) {
|
|
|
378
370
|
attributeHeaders,
|
|
379
371
|
};
|
|
380
372
|
}
|
|
373
|
+
function getPreferredMeasureIds(drillEvent) {
|
|
374
|
+
if (drillEvent.drillContext.type !== "mekko") {
|
|
375
|
+
return [];
|
|
376
|
+
}
|
|
377
|
+
const heightBucket = bucketsFind(drillEvent.dataView.definition.buckets, BucketNames.SECONDARY_MEASURES);
|
|
378
|
+
return heightBucket ? bucketMeasures(heightBucket).map(measureLocalId) : [];
|
|
379
|
+
}
|
|
381
380
|
function getPreviousYear(currentYear) {
|
|
382
381
|
const split = currentYear.uri.split("-");
|
|
383
382
|
split[0] = (parseInt(split[0]) - 1).toString();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SaveAsDialogRenderer.d.ts","sourceRoot":"","sources":["../../../../src/presentation/saveAs/DefaultSaveAsDialog/SaveAsDialogRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SaveAsDialogRenderer.d.ts","sourceRoot":"","sources":["../../../../src/presentation/saveAs/DefaultSaveAsDialog/SaveAsDialogRenderer.tsx"],"names":[],"mappings":"AAkBA,MAAM,WAAW,6BAA6B;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,EAAE,wBAAwB,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9F,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,4KAQlC,6BAA6B,6CAkF9B,CAAC;AAEH,eAAO,MAAM,wBAAwB,4KApFlC,6BAA6B,6CAoFgC,CAAC;AAEjE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,6BAA6B,2CAMxE"}
|
|
@@ -2,19 +2,22 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
// (C) 2020-2026 GoodData Corporation
|
|
3
3
|
import { memo, useCallback, useState } from "react";
|
|
4
4
|
import { compact } from "lodash-es";
|
|
5
|
-
import { useIntl } from "react-intl";
|
|
5
|
+
import { defineMessage, useIntl } from "react-intl";
|
|
6
6
|
import { ConfirmDialog, Input, Message, Typography } from "@gooddata/sdk-ui-kit";
|
|
7
|
+
import { DASHBOARD_TITLE_MAX_LENGTH, truncateDashboardTitle, } from "../../../_staging/dashboard/dashboardTitle.js";
|
|
7
8
|
import { messages } from "../../../locales.js";
|
|
8
|
-
import { DASHBOARD_TITLE_MAX_LENGTH } from "../../constants/dashboard.js";
|
|
9
9
|
import { IntlWrapper } from "../../localization/IntlWrapper.js";
|
|
10
|
+
const defaultTitleMessage = defineMessage({ id: "dialogs.save.as.new.default.title" });
|
|
10
11
|
/**
|
|
11
12
|
* @internal
|
|
12
13
|
*/
|
|
13
14
|
export const SaveAsNewDashboardDialog = memo(function SaveAsNewDashboardDialog({ onCancel = () => { }, isDashboardLoaded, isDashboardSaving, dashboardTitle: dashboardTitleProp, onSubmit, isInEditMode, isKpiWidgetEnabled, }) {
|
|
14
15
|
const intl = useIntl();
|
|
15
16
|
const getDefaultDashboardTitle = useCallback(() => {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
// shorten only the original title so the localized "Copy of" text stays whole
|
|
18
|
+
const affixLength = intl.formatMessage(defaultTitleMessage, { title: "" }).length;
|
|
19
|
+
return intl.formatMessage(defaultTitleMessage, {
|
|
20
|
+
title: truncateDashboardTitle(dashboardTitleProp, DASHBOARD_TITLE_MAX_LENGTH - affixLength),
|
|
18
21
|
});
|
|
19
22
|
}, [dashboardTitleProp, intl]);
|
|
20
23
|
const [dashboardTitle, setDashboardTitle] = useState(getDefaultDashboardTitle());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSaveAs.d.ts","sourceRoot":"","sources":["../../../../src/presentation/saveAs/DefaultSaveAsDialog/useSaveAs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"useSaveAs.d.ts","sourceRoot":"","sources":["../../../../src/presentation/saveAs/DefaultSaveAsDialog/useSaveAs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAKhD,OAAO,EACH,KAAK,uBAAuB,EAE/B,MAAM,uDAAuD,CAAC;AAO/D,UAAU,gBAAgB;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,YAAY,EAAE,OAAO,CAAC;IAEtB;;;;;;OAMG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAE9D;;OAEG;IACH,YAAY,CAAC,EAAE,uBAAuB,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAE3D;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,UAAU,KAAK,IAAI,CAAC;IAElD;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACxC;AAED,eAAO,MAAM,SAAS,UAAW,eAAe,KAAG,gBA8ClD,CAAC"}
|