@gooddata/sdk-ui-dashboard 11.65.2-alpha.0 → 11.65.2-alpha.1
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 +1 -1
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/model/commandHandlers/drill/keyDriverAnalysisHandler.js +1 -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/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/sdk-ui-dashboard.d.ts +1 -1
- package/package.json +23 -23
package/NOTICE
CHANGED
|
@@ -13,7 +13,7 @@ The following 3rd-party software packages may be used by or distributed with goo
|
|
|
13
13
|
|
|
14
14
|
Date generated: 2026-10-29
|
|
15
15
|
|
|
16
|
-
Revision ID:
|
|
16
|
+
Revision ID: ec821649e08c87cdb55177d84aa9693212ca6afd
|
|
17
17
|
|
|
18
18
|
================================================================================
|
|
19
19
|
================================================================================
|
package/esm/__version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "11.65.2-alpha.
|
|
1
|
+
export declare const LIB_VERSION = "11.65.2-alpha.1";
|
|
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.65.2-alpha.
|
|
3
|
+
export const LIB_VERSION = "11.65.2-alpha.1";
|
|
4
4
|
export const LIB_DESCRIPTION = "GoodData SDK - Dashboard Component";
|
|
5
5
|
export const LIB_NAME = "@gooddata/sdk-ui-dashboard";
|
|
@@ -20,7 +20,7 @@ export function* keyDriverAnalysisHandler(ctx, cmd) {
|
|
|
20
20
|
return localIdentifiers.includes(a.attribute.localIdentifier);
|
|
21
21
|
});
|
|
22
22
|
const metric = drillEvent.dataView.definition.measures.find((m) => {
|
|
23
|
-
return
|
|
23
|
+
return m.measure.localIdentifier === keyDriveItem.measure.measureHeaderItem.localIdentifier;
|
|
24
24
|
});
|
|
25
25
|
const metrics = drillEvent.dataView.definition.measures.filter((m) => m !== metric);
|
|
26
26
|
// Attributes that are used
|
|
@@ -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":"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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":"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,WAAW,EAAsB,MAAM,kBAAkB,CAAC;AAIxE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAazE,OAAO,EAAE,KAAK,wBAAwB,EAAyB,MAAM,mBAAmB,CAAC;AAazF,OAAO,EAEH,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EAExB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IAClE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACxE;AAED,wBAAgB,mBAAmB,CAAC,EAChC,MAAM,EACN,mBAAmB,EACnB,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,GACb,EAAE,yBAAyB,kDA+K3B;AAgGD,eAAO,MAAM,sBAAsB,kKAWhC;IACC,iBAAiB,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,OAAO,CAAC;IAChE,gBAAgB,EAAE,wBAAwB,EAAE,CAAC;IAC7C,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC9B,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,mCAAmC,CAAC,CAAC;IAC3E,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC,KAAG,gBAAgB,EA2JnB,CAAC"}
|
|
@@ -5,7 +5,7 @@ import stringify from "json-stable-stringify";
|
|
|
5
5
|
import { compact, groupBy, 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();
|
|
@@ -6341,7 +6341,7 @@ export declare function getFilterIdentifier(filter: FilterContextItem): string;
|
|
|
6341
6341
|
/**
|
|
6342
6342
|
* @internal
|
|
6343
6343
|
*/
|
|
6344
|
-
export declare function getKdaKeyDriverCombinations(drillDefinition: IKeyDriveAnalysis, drillEvent: IDrillEvent, enableSecondGranularities?: boolean): IDashboardKeyDriverCombinationItem[];
|
|
6344
|
+
export declare function getKdaKeyDriverCombinations(drillDefinition: IKeyDriveAnalysis, drillEvent: IDrillEvent, enableSecondGranularities?: boolean, isMeasureDisabled?: (localIdentifier: string) => boolean): IDashboardKeyDriverCombinationItem[];
|
|
6345
6345
|
|
|
6346
6346
|
/**
|
|
6347
6347
|
* Returns KDA-supported date granularities, including second when the feature flag is on.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-dashboard",
|
|
3
|
-
"version": "11.65.2-alpha.
|
|
3
|
+
"version": "11.65.2-alpha.1",
|
|
4
4
|
"description": "GoodData SDK - Dashboard Component",
|
|
5
5
|
"license": "LicenseRef-LICENSE",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -60,22 +60,22 @@
|
|
|
60
60
|
"ts-invariant": "0.10.3",
|
|
61
61
|
"tslib": "2.8.1",
|
|
62
62
|
"uuid": "11.1.1",
|
|
63
|
-
"@gooddata/sdk-backend-base": "11.65.2-alpha.
|
|
64
|
-
"@gooddata/sdk-backend-spi": "11.65.2-alpha.
|
|
65
|
-
"@gooddata/sdk-embedding": "11.65.2-alpha.
|
|
66
|
-
"@gooddata/sdk-model": "11.65.2-alpha.
|
|
67
|
-
"@gooddata/sdk-ui": "11.65.2-alpha.
|
|
68
|
-
"@gooddata/sdk-ui-analytical-designer": "11.65.2-alpha.
|
|
69
|
-
"@gooddata/sdk-ui-charts": "11.65.2-alpha.
|
|
70
|
-
"@gooddata/sdk-ui-ext": "11.65.2-alpha.
|
|
71
|
-
"@gooddata/sdk-ui-filters": "11.65.2-alpha.
|
|
72
|
-
"@gooddata/sdk-ui-geo": "11.65.2-alpha.
|
|
73
|
-
"@gooddata/sdk-ui-kit": "11.65.2-alpha.
|
|
74
|
-
"@gooddata/sdk-ui-
|
|
75
|
-
"@gooddata/sdk-ui-
|
|
76
|
-
"@gooddata/sdk-ui-
|
|
77
|
-
"@gooddata/
|
|
78
|
-
"@gooddata/
|
|
63
|
+
"@gooddata/sdk-backend-base": "11.65.2-alpha.1",
|
|
64
|
+
"@gooddata/sdk-backend-spi": "11.65.2-alpha.1",
|
|
65
|
+
"@gooddata/sdk-embedding": "11.65.2-alpha.1",
|
|
66
|
+
"@gooddata/sdk-model": "11.65.2-alpha.1",
|
|
67
|
+
"@gooddata/sdk-ui": "11.65.2-alpha.1",
|
|
68
|
+
"@gooddata/sdk-ui-analytical-designer": "11.65.2-alpha.1",
|
|
69
|
+
"@gooddata/sdk-ui-charts": "11.65.2-alpha.1",
|
|
70
|
+
"@gooddata/sdk-ui-ext": "11.65.2-alpha.1",
|
|
71
|
+
"@gooddata/sdk-ui-filters": "11.65.2-alpha.1",
|
|
72
|
+
"@gooddata/sdk-ui-geo": "11.65.2-alpha.1",
|
|
73
|
+
"@gooddata/sdk-ui-kit": "11.65.2-alpha.1",
|
|
74
|
+
"@gooddata/sdk-ui-semantic-search": "11.65.2-alpha.1",
|
|
75
|
+
"@gooddata/sdk-ui-pivot": "11.65.2-alpha.1",
|
|
76
|
+
"@gooddata/sdk-ui-theme-provider": "11.65.2-alpha.1",
|
|
77
|
+
"@gooddata/sdk-ui-vis-commons": "11.65.2-alpha.1",
|
|
78
|
+
"@gooddata/util": "11.65.2-alpha.1"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@microsoft/api-documenter": "7.30.16",
|
|
@@ -117,12 +117,12 @@
|
|
|
117
117
|
"svgo": "2.8.4",
|
|
118
118
|
"typescript": "7.0.2",
|
|
119
119
|
"vitest": "5.0.4",
|
|
120
|
-
"@gooddata/eslint-config": "11.65.2-alpha.
|
|
121
|
-
"@gooddata/
|
|
122
|
-
"@gooddata/
|
|
123
|
-
"@gooddata/
|
|
124
|
-
"@gooddata/
|
|
125
|
-
"@gooddata/
|
|
120
|
+
"@gooddata/eslint-config": "11.65.2-alpha.1",
|
|
121
|
+
"@gooddata/oxlint-config": "11.65.2-alpha.1",
|
|
122
|
+
"@gooddata/i18n-toolkit": "11.65.2-alpha.1",
|
|
123
|
+
"@gooddata/reference-workspace": "11.65.2-alpha.1",
|
|
124
|
+
"@gooddata/stylelint-config": "11.65.2-alpha.1",
|
|
125
|
+
"@gooddata/sdk-backend-mockingbird": "11.65.2-alpha.1"
|
|
126
126
|
},
|
|
127
127
|
"peerDependencies": {
|
|
128
128
|
"react": "^18.0.0 || ^19.0.0",
|