@gooddata/sdk-ui-ext 11.36.0-alpha.3 → 11.36.0-alpha.7
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 +74 -162
- package/esm/internal/assets/radar/bucket-title-measures.svg +1 -0
- package/esm/internal/assets/radar/bucket-title-segment.svg +1 -0
- package/esm/internal/assets/radar/bucket-title-trend.svg +1 -0
- package/esm/internal/components/VisualizationCatalog.js +2 -0
- package/esm/internal/components/configurationControls/RadarGridLineShapeControl.d.ts +8 -0
- package/esm/internal/components/configurationControls/RadarGridLineShapeControl.js +13 -0
- package/esm/internal/components/configurationControls/RadarRenderAsControl.d.ts +8 -0
- package/esm/internal/components/configurationControls/RadarRenderAsControl.js +13 -0
- package/esm/internal/components/configurationControls/colors/ColorsSection.d.ts +4 -1
- package/esm/internal/components/configurationControls/colors/ColorsSection.js +2 -3
- package/esm/internal/components/configurationPanels/ConfigurationPanelContent.js +1 -1
- package/esm/internal/components/configurationPanels/PivotTableConfigurationPanel.js +1 -2
- package/esm/internal/components/configurationPanels/RadarChartConfigurationPanel.d.ts +11 -0
- package/esm/internal/components/configurationPanels/RadarChartConfigurationPanel.js +58 -0
- package/esm/internal/components/pluggableVisualizations/PluggableColumnBarCharts.js +1 -3
- package/esm/internal/components/pluggableVisualizations/alerts.js +2 -1
- package/esm/internal/components/pluggableVisualizations/areaChart/PluggableAreaChart.js +2 -4
- package/esm/internal/components/pluggableVisualizations/baseChart/PluggableBaseChart.d.ts +0 -8
- package/esm/internal/components/pluggableVisualizations/baseChart/PluggableBaseChart.js +3 -17
- package/esm/internal/components/pluggableVisualizations/bubbleChart/PluggableBubbleChart.js +1 -2
- package/esm/internal/components/pluggableVisualizations/bulletChart/PluggableBulletChart.js +2 -4
- package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChart.js +1 -2
- package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChartDeprecated.js +1 -1
- package/esm/internal/components/pluggableVisualizations/drillDownUtil.js +1 -0
- package/esm/internal/components/pluggableVisualizations/geoAreaChart/PluggableGeoAreaChart.js +1 -2
- package/esm/internal/components/pluggableVisualizations/geoChart/PluggableGeoPushpinChart.js +1 -3
- package/esm/internal/components/pluggableVisualizations/geoChartNext/PluggableGeoPushpinChartNext.js +1 -3
- package/esm/internal/components/pluggableVisualizations/headline/PluggableHeadline.js +3 -3
- package/esm/internal/components/pluggableVisualizations/heatMap/PluggableHeatmap.js +1 -2
- package/esm/internal/components/pluggableVisualizations/lineChart/PluggableLineChart.js +2 -4
- package/esm/internal/components/pluggableVisualizations/pieChart/PluggablePieChart.js +1 -2
- package/esm/internal/components/pluggableVisualizations/pivotTable/PluggablePivotTable.js +2 -2
- package/esm/internal/components/pluggableVisualizations/pivotTableNext/PluggablePivotTableNext.js +2 -2
- package/esm/internal/components/pluggableVisualizations/radarChart/PluggableRadarChart.d.ts +49 -0
- package/esm/internal/components/pluggableVisualizations/radarChart/PluggableRadarChart.js +180 -0
- package/esm/internal/components/pluggableVisualizations/radarChart/RadarChartDescriptor.d.ts +11 -0
- package/esm/internal/components/pluggableVisualizations/radarChart/RadarChartDescriptor.js +47 -0
- package/esm/internal/components/pluggableVisualizations/repeater/PluggableRepeater.js +1 -5
- package/esm/internal/components/pluggableVisualizations/sankeyChart/PluggableSankeyChart.js +1 -2
- package/esm/internal/components/pluggableVisualizations/scatterPlot/PluggableScatterPlot.js +1 -2
- package/esm/internal/components/pluggableVisualizations/treeMap/PluggableTreemap.js +2 -4
- package/esm/internal/components/pluggableVisualizations/waterfallChart/PluggableWaterfallChart.js +2 -4
- package/esm/internal/components/pluggableVisualizations/xirr/PluggableXirr.js +1 -1
- package/esm/internal/constants/dropdowns.d.ts +2 -0
- package/esm/internal/constants/dropdowns.js +8 -0
- package/esm/internal/constants/supportedProperties.d.ts +1 -0
- package/esm/internal/constants/supportedProperties.js +14 -0
- package/esm/internal/constants/uiConfig.d.ts +1 -12
- package/esm/internal/constants/uiConfig.js +25 -12
- package/esm/internal/translations/de-DE.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/de-DE.localization-bundle.js +13 -0
- package/esm/internal/translations/en-AU.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/en-AU.localization-bundle.js +13 -0
- package/esm/internal/translations/en-GB.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/en-GB.localization-bundle.js +13 -0
- package/esm/internal/translations/en-US.localization-bundle.d.ts +52 -0
- package/esm/internal/translations/en-US.localization-bundle.js +52 -0
- package/esm/internal/translations/es-419.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/es-419.localization-bundle.js +13 -0
- package/esm/internal/translations/es-ES.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/es-ES.localization-bundle.js +13 -0
- package/esm/internal/translations/fi-FI.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/fi-FI.localization-bundle.js +13 -0
- package/esm/internal/translations/fr-CA.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/fr-CA.localization-bundle.js +13 -0
- package/esm/internal/translations/fr-FR.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/fr-FR.localization-bundle.js +13 -0
- package/esm/internal/translations/id-ID.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/id-ID.localization-bundle.js +13 -0
- package/esm/internal/translations/it-IT.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/it-IT.localization-bundle.js +13 -0
- package/esm/internal/translations/ja-JP.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/ja-JP.localization-bundle.js +13 -0
- package/esm/internal/translations/ko-KR.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/ko-KR.localization-bundle.js +13 -0
- package/esm/internal/translations/nl-NL.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/nl-NL.localization-bundle.js +13 -0
- package/esm/internal/translations/pl-PL.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/pl-PL.localization-bundle.js +13 -0
- package/esm/internal/translations/pt-BR.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/pt-BR.localization-bundle.js +13 -0
- package/esm/internal/translations/pt-PT.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/pt-PT.localization-bundle.js +13 -0
- package/esm/internal/translations/ru-RU.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/ru-RU.localization-bundle.js +13 -0
- package/esm/internal/translations/sl-SI.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/sl-SI.localization-bundle.js +13 -0
- package/esm/internal/translations/th-TH.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/th-TH.localization-bundle.js +13 -0
- package/esm/internal/translations/tr-TR.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/tr-TR.localization-bundle.js +13 -0
- package/esm/internal/translations/uk-UA.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/uk-UA.localization-bundle.js +13 -0
- package/esm/internal/translations/vi-VN.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/vi-VN.localization-bundle.js +13 -0
- package/esm/internal/translations/zh-HK.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/zh-HK.localization-bundle.js +13 -0
- package/esm/internal/translations/zh-Hans.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/zh-Hans.localization-bundle.js +13 -0
- package/esm/internal/translations/zh-Hant.localization-bundle.d.ts +13 -0
- package/esm/internal/translations/zh-Hant.localization-bundle.js +13 -0
- package/esm/internal/utils/bucketHelper.d.ts +1 -1
- package/esm/internal/utils/bucketHelper.js +8 -11
- package/esm/internal/utils/dimensions.js +2 -1
- package/esm/internal/utils/filters/sanitizeGeoReferencePointFilters.d.ts +1 -1
- package/esm/internal/utils/filters/sanitizeGeoReferencePointFilters.js +7 -19
- package/esm/internal/utils/uiConfigHelpers/headlineUiConfigHelper.d.ts +2 -2
- package/esm/internal/utils/uiConfigHelpers/headlineUiConfigHelper.js +4 -7
- package/esm/internal/utils/uiConfigHelpers/pivotTableNextUiConfigHelper.d.ts +1 -1
- package/esm/internal/utils/uiConfigHelpers/pivotTableNextUiConfigHelper.js +4 -4
- package/esm/internal/utils/uiConfigHelpers/pivotTableUiConfigHelper.d.ts +1 -1
- package/esm/internal/utils/uiConfigHelpers/pivotTableUiConfigHelper.js +4 -4
- package/esm/internal/utils/uiConfigHelpers/radarChartUiConfigHelper.d.ts +3 -0
- package/esm/internal/utils/uiConfigHelpers/radarChartUiConfigHelper.js +58 -0
- package/esm/internal/utils/visualizationsHelper.js +1 -1
- package/esm/locales.d.ts +30 -0
- package/esm/locales.js +13 -0
- package/package.json +21 -21
|
@@ -119,16 +119,13 @@ function getMeasureValueFilterDimensionalityLocalIdsToTransform(filter, attribut
|
|
|
119
119
|
}
|
|
120
120
|
return localIdsToTransform;
|
|
121
121
|
}
|
|
122
|
-
function sanitizeMeasureValueFilter(filter, attributeBucketItems, measureBucketItems
|
|
123
|
-
if (attributeBucketItems.length === 0 && !enableImprovedAdFilters) {
|
|
124
|
-
return false;
|
|
125
|
-
}
|
|
122
|
+
function sanitizeMeasureValueFilter(filter, attributeBucketItems, measureBucketItems) {
|
|
126
123
|
// Validate dimensionality - each item based on its type
|
|
127
124
|
const hasValidDimensionality = !filter.dimensionality ||
|
|
128
125
|
filter.dimensionality.every((item) => {
|
|
129
126
|
if (isObjRef(item)) {
|
|
130
|
-
// ObjRef (catalog attribute)
|
|
131
|
-
return
|
|
127
|
+
// ObjRef (catalog attribute)
|
|
128
|
+
return true;
|
|
132
129
|
}
|
|
133
130
|
else {
|
|
134
131
|
// Local identifier - must exist in attribute bucket items
|
|
@@ -138,13 +135,13 @@ function sanitizeMeasureValueFilter(filter, attributeBucketItems, measureBucketI
|
|
|
138
135
|
if (!hasValidDimensionality) {
|
|
139
136
|
return false;
|
|
140
137
|
}
|
|
141
|
-
//
|
|
142
|
-
if (
|
|
138
|
+
// Allow measure filters even if measure is not in buckets
|
|
139
|
+
if (filter.measureRef !== undefined) {
|
|
143
140
|
return true;
|
|
144
141
|
}
|
|
145
142
|
return measureBucketItems.some((measureBucketItem) => measureBucketItem.localIdentifier === filter.measureLocalIdentifier);
|
|
146
143
|
}
|
|
147
|
-
export function sanitizeFilters(newReferencePoint,
|
|
144
|
+
export function sanitizeFilters(newReferencePoint, oldReferencePoint) {
|
|
148
145
|
const attributeBucketItems = getAllAttributeItems(newReferencePoint.buckets);
|
|
149
146
|
const oldAttributeBucketItems = getAllAttributeItems(oldReferencePoint.buckets);
|
|
150
147
|
const measureBucketItems = getAllMeasureItems(newReferencePoint.buckets);
|
|
@@ -156,7 +153,7 @@ export function sanitizeFilters(newReferencePoint, enableImprovedAdFilters = tru
|
|
|
156
153
|
// transformation
|
|
157
154
|
const transformedFilterItems = newReferencePoint.filters.items.map((filterBucketItem) => {
|
|
158
155
|
const filter = filterBucketItem.filters?.[0];
|
|
159
|
-
if (isMeasureValueFilter(filter)
|
|
156
|
+
if (isMeasureValueFilter(filter)) {
|
|
160
157
|
// Transform measure ref: migrate from localId to ref when measure is removed from buckets
|
|
161
158
|
const filterWithTransformedMeasure = transformMeasureValueFilterMeasureToRef(filter, measureBucketItems, oldMeasureBucketItems);
|
|
162
159
|
// Transform dimensionality
|
|
@@ -184,7 +181,7 @@ export function sanitizeFilters(newReferencePoint, enableImprovedAdFilters = tru
|
|
|
184
181
|
return attributeBucketItems.some((attributeBucketItem) => attributeBucketItem.attribute === filter.attribute);
|
|
185
182
|
}
|
|
186
183
|
else if (isMeasureValueFilter(filter)) {
|
|
187
|
-
return sanitizeMeasureValueFilter(filter, attributeBucketItems, measureBucketItems
|
|
184
|
+
return sanitizeMeasureValueFilter(filter, attributeBucketItems, measureBucketItems);
|
|
188
185
|
}
|
|
189
186
|
else if (isRankingFilter(filter)) {
|
|
190
187
|
if (attributeBucketItems.length === 0) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// (C) 2007-
|
|
1
|
+
// (C) 2007-2026 GoodData Corporation
|
|
2
2
|
import { compact } from "lodash-es";
|
|
3
3
|
import { MeasureGroupIdentifier, bucketAttributes, insightAttributes, insightBucket, insightBuckets, insightProperties, newDimension, newTwoDimensional, } from "@gooddata/sdk-model";
|
|
4
4
|
import { BucketNames, VisualizationTypes } from "@gooddata/sdk-ui";
|
|
@@ -97,6 +97,7 @@ export function generateDimensions(insight, type, customVisualizationConfig) {
|
|
|
97
97
|
case VisualizationTypes.TREEMAP:
|
|
98
98
|
return getTreemapDimensions(insight);
|
|
99
99
|
case VisualizationTypes.LINE:
|
|
100
|
+
case VisualizationTypes.RADAR:
|
|
100
101
|
return getLineDimensions(insight);
|
|
101
102
|
case VisualizationTypes.AREA:
|
|
102
103
|
return getAreaDimensions(insight);
|
|
@@ -11,4 +11,4 @@ import { type IBucketOfFun, type IFilters } from "../../interfaces/Visualization
|
|
|
11
11
|
* - converts dimensionality local ids to ObjRefs when possible (when improved filters are enabled)
|
|
12
12
|
* - drops MVFs that would stay invalid/dangling after the bucket change
|
|
13
13
|
*/
|
|
14
|
-
export declare function sanitizeGeoReferencePointFilters(filters: IFilters | undefined, oldBuckets: IBucketOfFun[], newBuckets: IBucketOfFun[]
|
|
14
|
+
export declare function sanitizeGeoReferencePointFilters(filters: IFilters | undefined, oldBuckets: IBucketOfFun[], newBuckets: IBucketOfFun[]): IFilters;
|
|
@@ -38,10 +38,7 @@ function transformMeasureValueFilterMeasureToRefIfPossible(filter, oldMeasureBuc
|
|
|
38
38
|
measureRef: idRef(previousMeasure.attribute, "measure"),
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function transformMeasureValueFilterDimensionalityToRefs(filter, oldRootAttributes, oldRootAttributeLocalIds, newRootAttributeLocalIds
|
|
42
|
-
if (!enableImprovedAdFilters) {
|
|
43
|
-
return filter;
|
|
44
|
-
}
|
|
41
|
+
function transformMeasureValueFilterDimensionalityToRefs(filter, oldRootAttributes, oldRootAttributeLocalIds, newRootAttributeLocalIds) {
|
|
45
42
|
if (!filter.dimensionality?.length) {
|
|
46
43
|
return filter;
|
|
47
44
|
}
|
|
@@ -80,7 +77,7 @@ function transformMeasureValueFilterDimensionalityToRefs(filter, oldRootAttribut
|
|
|
80
77
|
* - converts dimensionality local ids to ObjRefs when possible (when improved filters are enabled)
|
|
81
78
|
* - drops MVFs that would stay invalid/dangling after the bucket change
|
|
82
79
|
*/
|
|
83
|
-
export function sanitizeGeoReferencePointFilters(filters, oldBuckets, newBuckets
|
|
80
|
+
export function sanitizeGeoReferencePointFilters(filters, oldBuckets, newBuckets) {
|
|
84
81
|
const safeFilters = ensureFiltersBucket(filters);
|
|
85
82
|
const oldRootMeasures = getAllMeasures(oldBuckets);
|
|
86
83
|
const oldRootMeasureLocalIds = new Set(oldRootMeasures.map((m) => m.localIdentifier));
|
|
@@ -98,22 +95,13 @@ export function sanitizeGeoReferencePointFilters(filters, oldBuckets, newBuckets
|
|
|
98
95
|
if (!measureLocalId || !oldRootMeasureLocalIds.has(measureLocalId)) {
|
|
99
96
|
return item;
|
|
100
97
|
}
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const withMeasureRef = wasRemovedFromNewRoot && enableImprovedAdFilters
|
|
106
|
-
? transformMeasureValueFilterMeasureToRefIfPossible(filter, oldRootMeasures)
|
|
107
|
-
: filter;
|
|
108
|
-
const withDimensionalityRefs = transformMeasureValueFilterDimensionalityToRefs(withMeasureRef, oldRootAttributes, oldRootAttributeLocalIds, newRootAttributeLocalIds, enableImprovedAdFilters);
|
|
98
|
+
const withMeasureRef = newRootMeasureLocalIds.has(measureLocalId)
|
|
99
|
+
? filter
|
|
100
|
+
: transformMeasureValueFilterMeasureToRefIfPossible(filter, oldRootMeasures);
|
|
101
|
+
const withDimensionalityRefs = transformMeasureValueFilterDimensionalityToRefs(withMeasureRef, oldRootAttributes, oldRootAttributeLocalIds, newRootAttributeLocalIds);
|
|
109
102
|
const measureLocalIdAfter = withDimensionalityRefs.measureLocalIdentifier;
|
|
110
103
|
const isMeasureLocalIdValid = !measureLocalIdAfter || newRootMeasureLocalIds.has(measureLocalIdAfter);
|
|
111
|
-
|
|
112
|
-
const usesObjRefDimensionality = Boolean(withDimensionalityRefs.dimensionality?.some(isObjRef));
|
|
113
|
-
const usesAnyObjRefs = usesObjRefMeasure || usesObjRefDimensionality;
|
|
114
|
-
const areObjRefsAllowed = enableImprovedAdFilters || !usesAnyObjRefs;
|
|
115
|
-
const isValid = isMeasureLocalIdValid && areObjRefsAllowed;
|
|
116
|
-
if (!isValid) {
|
|
104
|
+
if (!isMeasureLocalIdValid) {
|
|
117
105
|
return undefined;
|
|
118
106
|
}
|
|
119
107
|
return { ...item, filters: [withDimensionalityRefs] };
|
|
@@ -3,8 +3,8 @@ import { type IColorPalette, type IInsightDefinition, type ISettings, type IThem
|
|
|
3
3
|
import { type IChartConfig } from "@gooddata/sdk-ui-charts";
|
|
4
4
|
import { type HeadlineControlProperties } from "../../interfaces/ControlProperties.js";
|
|
5
5
|
import { type IReferencePoint, type IUiConfig, type IVisProps, type IVisualizationProperties } from "../../interfaces/Visualization.js";
|
|
6
|
-
export declare function getDefaultHeadlineUiConfig(
|
|
7
|
-
export declare function getHeadlineUiConfig(referencePoint: IReferencePoint,
|
|
6
|
+
export declare function getDefaultHeadlineUiConfig(): IUiConfig;
|
|
7
|
+
export declare function getHeadlineUiConfig(referencePoint: IReferencePoint, intl: IntlShape): IUiConfig;
|
|
8
8
|
export declare function buildHeadlineVisualizationConfig(visualizationProperties: IVisualizationProperties, settings: ISettings | undefined, options: IVisProps): IChartConfig;
|
|
9
9
|
export declare function getHeadlineSupportedProperties(visualizationProperties: IVisualizationProperties): IVisualizationProperties<HeadlineControlProperties>;
|
|
10
10
|
export declare function isComparisonEnabled(insight: IInsightDefinition | undefined): boolean;
|
|
@@ -7,7 +7,7 @@ import { parseRGBString } from "@gooddata/sdk-ui-vis-commons";
|
|
|
7
7
|
import { messages } from "../../../locales.js";
|
|
8
8
|
import { BUCKETS } from "../../constants/bucket.js";
|
|
9
9
|
import { HEADLINE_DEFAULT_CONTROL_PROPERTIES } from "../../constants/supportedProperties.js";
|
|
10
|
-
import { DEFAULT_HEADLINE_UICONFIG
|
|
10
|
+
import { DEFAULT_HEADLINE_UICONFIG } from "../../constants/uiConfig.js";
|
|
11
11
|
import { getItemsCount, setBucketTitles } from "../bucketHelper.js";
|
|
12
12
|
import { hasNoMeasures, hasNoSecondaryMeasures, noDerivedMeasurePresent } from "../bucketRules.js";
|
|
13
13
|
import { getTranslation } from "../translations.js";
|
|
@@ -16,16 +16,13 @@ import { getTranslation } from "../translations.js";
|
|
|
16
16
|
// https://github.com/gooddata/gdc-analytical-designer/blob/develop/app/components/buckets/BucketIcon.tsx
|
|
17
17
|
const headlineMeasuresIcon = "local:headline/bucket-title-measures.svg";
|
|
18
18
|
const headlineSecondaryMeasuresIcon = "local:headline/bucket-title-secondary-measures.svg";
|
|
19
|
-
export function getDefaultHeadlineUiConfig(
|
|
19
|
+
export function getDefaultHeadlineUiConfig() {
|
|
20
20
|
const uiConfig = cloneDeep(DEFAULT_HEADLINE_UICONFIG);
|
|
21
21
|
set(uiConfig, [BUCKETS, BucketNames.SECONDARY_MEASURES, "itemsLimit"], 2);
|
|
22
|
-
if (featureFlags?.enableImprovedAdFilters && uiConfig.buckets?.["filters"]) {
|
|
23
|
-
uiConfig.buckets["filters"] = defaultImprovedFilters.filters;
|
|
24
|
-
}
|
|
25
22
|
return uiConfig;
|
|
26
23
|
}
|
|
27
|
-
export function getHeadlineUiConfig(referencePoint,
|
|
28
|
-
let uiConfig = getDefaultHeadlineUiConfig(
|
|
24
|
+
export function getHeadlineUiConfig(referencePoint, intl) {
|
|
25
|
+
let uiConfig = getDefaultHeadlineUiConfig();
|
|
29
26
|
const buckets = referencePoint?.buckets ?? [];
|
|
30
27
|
const viewCanAddPrimaryItems = hasNoMeasures(buckets);
|
|
31
28
|
const viewCanAddSecondaryItems = hasNoSecondaryMeasures(buckets);
|
|
@@ -3,4 +3,4 @@ import { type ISettings } from "@gooddata/sdk-model";
|
|
|
3
3
|
import { type IBucketOfFun, type IExtendedReferencePoint, type IUiConfig } from "../../interfaces/Visualization.js";
|
|
4
4
|
export declare function getPivotTableNextMeasuresLimit(settings: ISettings, buckets: IBucketOfFun[]): 40 | 100;
|
|
5
5
|
export declare function setPivotTableNextUiConfig(referencePoint: IExtendedReferencePoint, intl: IntlShape, visualizationType: string, settings: ISettings): void;
|
|
6
|
-
export declare function getPivotTableNextDefaultUiConfig(
|
|
6
|
+
export declare function getPivotTableNextDefaultUiConfig(): IUiConfig;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// (C) 2025 GoodData Corporation
|
|
1
|
+
// (C) 2025-2026 GoodData Corporation
|
|
2
2
|
import { cloneDeep, set } from "lodash-es";
|
|
3
3
|
import { BucketNames, OverTimeComparisonTypes } from "@gooddata/sdk-ui";
|
|
4
4
|
import { messages } from "../../../locales.js";
|
|
5
5
|
import { BUCKETS } from "../../constants/bucket.js";
|
|
6
|
-
import { INCREASE_MAX_TABLE_ATTRIBUTES_ITEMS_LIMIT, INCREASE_MAX_TABLE_MEASURE_ITEMS_LIMIT, MAX_METRICS_COUNT, MAX_TABLE_CATEGORIES_COUNT, UICONFIG, defaultFilters,
|
|
6
|
+
import { INCREASE_MAX_TABLE_ATTRIBUTES_ITEMS_LIMIT, INCREASE_MAX_TABLE_MEASURE_ITEMS_LIMIT, MAX_METRICS_COUNT, MAX_TABLE_CATEGORIES_COUNT, UICONFIG, defaultFilters, defaultRootUiConfigProperties, disabledOpenAsReportConfig, measuresBase, viewBase, } from "../../constants/uiConfig.js";
|
|
7
7
|
import { setBucketTitles } from "../bucketHelper.js";
|
|
8
8
|
import { canIncreasedTableAttributesAddMoreItems, canIncreasedTableMeasuresAddMoreItems, hasMeasuresOrRowsUnderLowerLimit, hasNoColumns, } from "../bucketRules.js";
|
|
9
9
|
import { getTranslation } from "../translations.js";
|
|
@@ -90,7 +90,7 @@ export function setPivotTableNextUiConfig(referencePoint, intl, visualizationTyp
|
|
|
90
90
|
set(referencePoint, [UICONFIG, BUCKETS, BucketNames.ATTRIBUTE, "icon"], tableRowsIcon);
|
|
91
91
|
set(referencePoint, [UICONFIG, BUCKETS, BucketNames.COLUMNS, "icon"], tableColumnsIcon);
|
|
92
92
|
}
|
|
93
|
-
export function getPivotTableNextDefaultUiConfig(
|
|
93
|
+
export function getPivotTableNextDefaultUiConfig() {
|
|
94
94
|
return {
|
|
95
95
|
buckets: {
|
|
96
96
|
measures: {
|
|
@@ -116,7 +116,7 @@ export function getPivotTableNextDefaultUiConfig(settings) {
|
|
|
116
116
|
date: MAX_TABLE_CATEGORIES_COUNT,
|
|
117
117
|
},
|
|
118
118
|
},
|
|
119
|
-
...
|
|
119
|
+
...defaultFilters,
|
|
120
120
|
},
|
|
121
121
|
...defaultRootUiConfigProperties,
|
|
122
122
|
...disabledOpenAsReportConfig,
|
|
@@ -3,4 +3,4 @@ import { type ISettings } from "@gooddata/sdk-model";
|
|
|
3
3
|
import { type IBucketOfFun, type IExtendedReferencePoint, type IUiConfig } from "../../interfaces/Visualization.js";
|
|
4
4
|
export declare function getPivotTableMeasuresLimit(settings: ISettings, buckets: IBucketOfFun[]): 40 | 100;
|
|
5
5
|
export declare function setPivotTableUiConfig(referencePoint: IExtendedReferencePoint, intl: IntlShape, visualizationType: string, settings: ISettings): void;
|
|
6
|
-
export declare function getPivotTableDefaultUiConfig(
|
|
6
|
+
export declare function getPivotTableDefaultUiConfig(): IUiConfig;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// (C) 2019-
|
|
1
|
+
// (C) 2019-2026 GoodData Corporation
|
|
2
2
|
import { cloneDeep, set } from "lodash-es";
|
|
3
3
|
import { BucketNames, OverTimeComparisonTypes } from "@gooddata/sdk-ui";
|
|
4
4
|
import { messages } from "../../../locales.js";
|
|
5
5
|
import { BUCKETS } from "../../constants/bucket.js";
|
|
6
|
-
import { INCREASE_MAX_TABLE_ATTRIBUTES_ITEMS_LIMIT, INCREASE_MAX_TABLE_MEASURE_ITEMS_LIMIT, MAX_METRICS_COUNT, MAX_TABLE_CATEGORIES_COUNT, UICONFIG, defaultFilters,
|
|
6
|
+
import { INCREASE_MAX_TABLE_ATTRIBUTES_ITEMS_LIMIT, INCREASE_MAX_TABLE_MEASURE_ITEMS_LIMIT, MAX_METRICS_COUNT, MAX_TABLE_CATEGORIES_COUNT, UICONFIG, defaultFilters, defaultRootUiConfigProperties, disabledOpenAsReportConfig, measuresBase, viewBase, } from "../../constants/uiConfig.js";
|
|
7
7
|
import { setBucketTitles } from "../bucketHelper.js";
|
|
8
8
|
import { canIncreasedTableAttributesAddMoreItems, canIncreasedTableMeasuresAddMoreItems, hasMeasuresOrRowsUnderLowerLimit, hasNoColumns, } from "../bucketRules.js";
|
|
9
9
|
import { getTranslation } from "../translations.js";
|
|
@@ -90,7 +90,7 @@ export function setPivotTableUiConfig(referencePoint, intl, visualizationType, s
|
|
|
90
90
|
set(referencePoint, [UICONFIG, BUCKETS, BucketNames.ATTRIBUTE, "icon"], tableRowsIcon);
|
|
91
91
|
set(referencePoint, [UICONFIG, BUCKETS, BucketNames.COLUMNS, "icon"], tableColumnsIcon);
|
|
92
92
|
}
|
|
93
|
-
export function getPivotTableDefaultUiConfig(
|
|
93
|
+
export function getPivotTableDefaultUiConfig() {
|
|
94
94
|
return {
|
|
95
95
|
buckets: {
|
|
96
96
|
measures: {
|
|
@@ -116,7 +116,7 @@ export function getPivotTableDefaultUiConfig(settings) {
|
|
|
116
116
|
date: MAX_TABLE_CATEGORIES_COUNT,
|
|
117
117
|
},
|
|
118
118
|
},
|
|
119
|
-
...
|
|
119
|
+
...defaultFilters,
|
|
120
120
|
},
|
|
121
121
|
...defaultRootUiConfigProperties,
|
|
122
122
|
...disabledOpenAsReportConfig,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type IntlShape } from "react-intl";
|
|
2
|
+
import { type IExtendedReferencePoint } from "../../interfaces/Visualization.js";
|
|
3
|
+
export declare function setRadarChartUiConfig(referencePoint: IExtendedReferencePoint, intl: IntlShape, visualizationType: string): IExtendedReferencePoint;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { cloneDeep, set } from "lodash-es";
|
|
3
|
+
import { BucketNames } from "@gooddata/sdk-ui";
|
|
4
|
+
import { messages } from "../../../locales.js";
|
|
5
|
+
import { ATTRIBUTE, BUCKETS, DATE } from "../../constants/bucket.js";
|
|
6
|
+
import { OPEN_AS_REPORT, SUPPORTED, UICONFIG } from "../../constants/uiConfig.js";
|
|
7
|
+
import { getStackItems, setBucketTitles } from "../bucketHelper.js";
|
|
8
|
+
import { hasNoMeasures, hasNoStacksWithDate, hasOneMeasure, hasSomeSegmentByItems } from "../bucketRules.js";
|
|
9
|
+
import { getTranslation } from "../translations.js";
|
|
10
|
+
import { getBucketItemsWarningMessage } from "./baseChartUiConfigHelper.js";
|
|
11
|
+
const radarMeasuresIcon = "local:radar/bucket-title-measures.svg";
|
|
12
|
+
const radarTrendIcon = "local:radar/bucket-title-trend.svg";
|
|
13
|
+
const radarSegmentIcon = "local:radar/bucket-title-segment.svg";
|
|
14
|
+
function setRadarChartBucketWarningMessages(referencePoint, intl) {
|
|
15
|
+
const buckets = referencePoint?.buckets || [];
|
|
16
|
+
const updatedUiConfig = cloneDeep(referencePoint?.uiConfig);
|
|
17
|
+
const stackItems = getStackItems(buckets, [ATTRIBUTE, DATE]);
|
|
18
|
+
if (!updatedUiConfig) {
|
|
19
|
+
return updatedUiConfig;
|
|
20
|
+
}
|
|
21
|
+
buckets.forEach((bucket) => {
|
|
22
|
+
const localIdentifier = bucket?.localIdentifier ?? "";
|
|
23
|
+
const bucketUiConfig = updatedUiConfig?.buckets?.[localIdentifier];
|
|
24
|
+
// skip disabled buckets
|
|
25
|
+
if (!bucketUiConfig?.enabled) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (!bucketUiConfig?.canAddItems) {
|
|
29
|
+
let warningMessage;
|
|
30
|
+
if (bucket.localIdentifier === BucketNames.MEASURES && intl) {
|
|
31
|
+
warningMessage = getBucketItemsWarningMessage(messages["metricSegment"].id, intl, stackItems);
|
|
32
|
+
}
|
|
33
|
+
else if (bucket.localIdentifier === BucketNames.SEGMENT && intl) {
|
|
34
|
+
warningMessage = getTranslation(messages["categorySegment"].id, intl);
|
|
35
|
+
}
|
|
36
|
+
if (warningMessage) {
|
|
37
|
+
set(updatedUiConfig, [BUCKETS, localIdentifier, "warningMessage"], warningMessage);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return updatedUiConfig;
|
|
42
|
+
}
|
|
43
|
+
export function setRadarChartUiConfig(referencePoint, intl, visualizationType) {
|
|
44
|
+
const referencePointConfigured = cloneDeep(referencePoint);
|
|
45
|
+
const buckets = referencePointConfigured?.buckets ?? [];
|
|
46
|
+
const measuresCanAddItems = hasNoMeasures(buckets) || hasNoStacksWithDate(buckets);
|
|
47
|
+
const segmentCanAddItems = hasSomeSegmentByItems(buckets) || hasNoMeasures(buckets) || hasOneMeasure(buckets);
|
|
48
|
+
set(referencePointConfigured, UICONFIG, setBucketTitles(referencePoint, visualizationType, intl));
|
|
49
|
+
set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.MEASURES, "canAddItems"], measuresCanAddItems);
|
|
50
|
+
set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.TREND, "canAddItems"], true);
|
|
51
|
+
set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.SEGMENT, "canAddItems"], segmentCanAddItems);
|
|
52
|
+
set(referencePointConfigured, UICONFIG, setRadarChartBucketWarningMessages(referencePointConfigured, intl));
|
|
53
|
+
set(referencePointConfigured, [UICONFIG, OPEN_AS_REPORT, SUPPORTED], false);
|
|
54
|
+
set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.MEASURES, "icon"], radarMeasuresIcon);
|
|
55
|
+
set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.TREND, "icon"], radarTrendIcon);
|
|
56
|
+
set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.SEGMENT, "icon"], radarSegmentIcon);
|
|
57
|
+
return referencePointConfigured;
|
|
58
|
+
}
|
package/esm/locales.d.ts
CHANGED
|
@@ -164,6 +164,36 @@ export declare const messages: {
|
|
|
164
164
|
vertical: {
|
|
165
165
|
id: string;
|
|
166
166
|
};
|
|
167
|
+
radarGridSectionTitle: {
|
|
168
|
+
id: string;
|
|
169
|
+
};
|
|
170
|
+
radarGridLineShapeLabel: {
|
|
171
|
+
id: string;
|
|
172
|
+
};
|
|
173
|
+
radarGridLineShapePolygon: {
|
|
174
|
+
id: string;
|
|
175
|
+
};
|
|
176
|
+
radarGridLineShapeCircle: {
|
|
177
|
+
id: string;
|
|
178
|
+
};
|
|
179
|
+
radarRenderAsLabel: {
|
|
180
|
+
id: string;
|
|
181
|
+
};
|
|
182
|
+
radarRenderAsFilled: {
|
|
183
|
+
id: string;
|
|
184
|
+
};
|
|
185
|
+
radarRenderAsOutline: {
|
|
186
|
+
id: string;
|
|
187
|
+
};
|
|
188
|
+
radarLabelsSubsection: {
|
|
189
|
+
id: string;
|
|
190
|
+
};
|
|
191
|
+
radarSpokeLabels: {
|
|
192
|
+
id: string;
|
|
193
|
+
};
|
|
194
|
+
radarRadialLabels: {
|
|
195
|
+
id: string;
|
|
196
|
+
};
|
|
167
197
|
dataLabelsAuto: {
|
|
168
198
|
id: string;
|
|
169
199
|
};
|
package/esm/locales.js
CHANGED
|
@@ -62,6 +62,9 @@ export const titles = defineMessages({
|
|
|
62
62
|
segment_treemap: { id: "dashboard.bucket.segment_title.treemap" },
|
|
63
63
|
segment_pushpin: { id: "dashboard.bucket.segment_title.pushpin" },
|
|
64
64
|
trend_line: { id: "dashboard.bucket.trend_title.line" },
|
|
65
|
+
measures_radar: { id: "dashboard.bucket.measures_title.radar" },
|
|
66
|
+
trend_radar: { id: "dashboard.bucket.trend_title.radar" },
|
|
67
|
+
segment_radar: { id: "dashboard.bucket.segment_title.radar" },
|
|
65
68
|
columns_table: { id: "dashboard.bucket.columns_title.table" },
|
|
66
69
|
attribute_repeater: { id: "dashboard.bucket.attribute_title.repeater" },
|
|
67
70
|
columns_repeater: { id: "dashboard.bucket.columns_title.repeater" },
|
|
@@ -146,6 +149,16 @@ export const messages = defineMessages({
|
|
|
146
149
|
orientationTitle: { id: "properties.orientation.title" },
|
|
147
150
|
horizontal: { id: "properties.orientation.horizontal" },
|
|
148
151
|
vertical: { id: "properties.orientation.vertical" },
|
|
152
|
+
radarGridSectionTitle: { id: "properties.radar.grid.title" },
|
|
153
|
+
radarGridLineShapeLabel: { id: "properties.radar.gridLineShape.label" },
|
|
154
|
+
radarGridLineShapePolygon: { id: "properties.radar.gridLineShape.polygon" },
|
|
155
|
+
radarGridLineShapeCircle: { id: "properties.radar.gridLineShape.circle" },
|
|
156
|
+
radarRenderAsLabel: { id: "properties.radar.renderAs.label" },
|
|
157
|
+
radarRenderAsFilled: { id: "properties.radar.renderAs.filled" },
|
|
158
|
+
radarRenderAsOutline: { id: "properties.radar.renderAs.outline" },
|
|
159
|
+
radarLabelsSubsection: { id: "properties.radar.labels.title" },
|
|
160
|
+
radarSpokeLabels: { id: "properties.radar.spokeLabels" },
|
|
161
|
+
radarRadialLabels: { id: "properties.radar.radialLabels" },
|
|
149
162
|
dataLabelsAuto: { id: "properties.canvas.dataLabels.auto" },
|
|
150
163
|
dataLabelsShow: { id: "properties.canvas.dataLabels.show" },
|
|
151
164
|
dataLabelsHide: { id: "properties.canvas.dataLabels.hide" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-ext",
|
|
3
|
-
"version": "11.36.0-alpha.
|
|
3
|
+
"version": "11.36.0-alpha.7",
|
|
4
4
|
"description": "GoodData.UI SDK - Extensions",
|
|
5
5
|
"license": "LicenseRef-LICENSE",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -64,20 +64,20 @@
|
|
|
64
64
|
"ts-invariant": "0.10.3",
|
|
65
65
|
"tslib": "2.8.1",
|
|
66
66
|
"uuid": "11.1.0",
|
|
67
|
-
"@gooddata/sdk-backend-base": "11.36.0-alpha.
|
|
68
|
-
"@gooddata/sdk-backend-spi": "11.36.0-alpha.
|
|
69
|
-
"@gooddata/sdk-embedding": "11.36.0-alpha.
|
|
70
|
-
"@gooddata/sdk-
|
|
71
|
-
"@gooddata/sdk-
|
|
72
|
-
"@gooddata/sdk-ui-charts": "11.36.0-alpha.
|
|
73
|
-
"@gooddata/sdk-ui-filters": "11.36.0-alpha.
|
|
74
|
-
"@gooddata/sdk-ui-
|
|
75
|
-
"@gooddata/sdk-ui-
|
|
76
|
-
"@gooddata/sdk-ui-pivot": "11.36.0-alpha.
|
|
77
|
-
"@gooddata/sdk-ui-semantic-search": "11.36.0-alpha.
|
|
78
|
-
"@gooddata/sdk-ui-
|
|
79
|
-
"@gooddata/
|
|
80
|
-
"@gooddata/
|
|
67
|
+
"@gooddata/sdk-backend-base": "11.36.0-alpha.7",
|
|
68
|
+
"@gooddata/sdk-backend-spi": "11.36.0-alpha.7",
|
|
69
|
+
"@gooddata/sdk-embedding": "11.36.0-alpha.7",
|
|
70
|
+
"@gooddata/sdk-model": "11.36.0-alpha.7",
|
|
71
|
+
"@gooddata/sdk-ui": "11.36.0-alpha.7",
|
|
72
|
+
"@gooddata/sdk-ui-charts": "11.36.0-alpha.7",
|
|
73
|
+
"@gooddata/sdk-ui-filters": "11.36.0-alpha.7",
|
|
74
|
+
"@gooddata/sdk-ui-geo": "11.36.0-alpha.7",
|
|
75
|
+
"@gooddata/sdk-ui-kit": "11.36.0-alpha.7",
|
|
76
|
+
"@gooddata/sdk-ui-pivot": "11.36.0-alpha.7",
|
|
77
|
+
"@gooddata/sdk-ui-semantic-search": "11.36.0-alpha.7",
|
|
78
|
+
"@gooddata/sdk-ui-theme-provider": "11.36.0-alpha.7",
|
|
79
|
+
"@gooddata/util": "11.36.0-alpha.7",
|
|
80
|
+
"@gooddata/sdk-ui-vis-commons": "11.36.0-alpha.7"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@microsoft/api-documenter": "^7.17.0",
|
|
@@ -125,12 +125,12 @@
|
|
|
125
125
|
"typescript": "5.9.3",
|
|
126
126
|
"vitest": "4.1.0",
|
|
127
127
|
"vitest-dom": "0.1.1",
|
|
128
|
-
"@gooddata/eslint-config": "11.36.0-alpha.
|
|
129
|
-
"@gooddata/i18n-toolkit": "11.36.0-alpha.
|
|
130
|
-
"@gooddata/oxlint-config": "11.36.0-alpha.
|
|
131
|
-
"@gooddata/reference-workspace": "11.36.0-alpha.
|
|
132
|
-
"@gooddata/stylelint-config": "11.36.0-alpha.
|
|
133
|
-
"@gooddata/sdk-backend-mockingbird": "11.36.0-alpha.
|
|
128
|
+
"@gooddata/eslint-config": "11.36.0-alpha.7",
|
|
129
|
+
"@gooddata/i18n-toolkit": "11.36.0-alpha.7",
|
|
130
|
+
"@gooddata/oxlint-config": "11.36.0-alpha.7",
|
|
131
|
+
"@gooddata/reference-workspace": "11.36.0-alpha.7",
|
|
132
|
+
"@gooddata/stylelint-config": "11.36.0-alpha.7",
|
|
133
|
+
"@gooddata/sdk-backend-mockingbird": "11.36.0-alpha.7"
|
|
134
134
|
},
|
|
135
135
|
"peerDependencies": {
|
|
136
136
|
"react": "^18.0.0 || ^19.0.0",
|