@gooddata/sdk-ui-ext 11.68.0-alpha.7 → 11.68.0-alpha.9
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 +161 -126
- package/esm/internal/components/BaseVisualization.d.ts.map +1 -1
- package/esm/internal/components/BaseVisualization.js +2 -3
- package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.d.ts.map +1 -1
- package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.js +2 -2
- package/esm/internal/components/configurationControls/CheckboxControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/CheckboxControl.js +2 -3
- package/esm/internal/components/configurationControls/ConfigSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/ConfigSection.js +2 -3
- package/esm/internal/components/configurationControls/ConfigSubsection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/ConfigSubsection.js +2 -3
- package/esm/internal/components/configurationControls/ContinuousLineControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/ContinuousLineControl.js +2 -3
- package/esm/internal/components/configurationControls/DistintcPointShapesControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/DistintcPointShapesControl.js +2 -3
- package/esm/internal/components/configurationControls/DropdownControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/DropdownControl.js +2 -3
- package/esm/internal/components/configurationControls/GeoViewportControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/GeoViewportControl.js +13 -14
- package/esm/internal/components/configurationControls/InputControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/InputControl.js +2 -3
- package/esm/internal/components/configurationControls/PagingSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/PagingSection.js +3 -4
- package/esm/internal/components/configurationControls/PushpinShapeControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/PushpinShapeControl.js +3 -4
- package/esm/internal/components/configurationControls/advanced/AdvancedSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/advanced/AdvancedSection.js +2 -3
- package/esm/internal/components/configurationControls/colors/ColorsSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/colors/ColorsSection.js +3 -4
- package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorCheckbox.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorCheckbox.js +2 -3
- package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorItem.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorItem.js +2 -3
- package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorResetButton.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorResetButton.js +4 -5
- package/esm/internal/components/configurationControls/comparison/values/numberFormat/NumberFormatControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/comparison/values/numberFormat/NumberFormatControl.js +2 -3
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingSection.js +2 -3
- package/esm/internal/components/configurationControls/customTooltip/CustomTooltipSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/customTooltip/CustomTooltipSection.js +2 -3
- package/esm/internal/components/configurationControls/interactions/InteractionsSection.d.ts +1 -2
- package/esm/internal/components/configurationControls/interactions/InteractionsSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/interactions/InteractionsSection.js +2 -2
- package/esm/internal/components/configurationControls/total/TotalSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/total/TotalSection.js +2 -3
- package/esm/internal/components/configurationPanels/ConfigurationPanelContent.d.ts.map +1 -1
- package/esm/internal/components/configurationPanels/ConfigurationPanelContent.js +1 -2
- package/esm/internal/components/configurationPanels/UnsupportedConfigurationPanel.js +2 -2
- package/esm/internal/components/insightList/useInsightPagedList.d.ts.map +1 -1
- package/esm/internal/components/insightList/useInsightPagedList.js +2 -3
- package/esm/internal/components/pluggableVisualizations/PluggableColumnBarCharts.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/PluggableColumnBarCharts.js +2 -3
- package/esm/internal/components/pluggableVisualizations/areaChart/PluggableAreaChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/areaChart/PluggableAreaChart.js +2 -3
- package/esm/internal/components/pluggableVisualizations/baseChart/PluggableBaseChart.js +4 -4
- package/esm/internal/components/pluggableVisualizations/bubbleChart/PluggableBubbleChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/bubbleChart/PluggableBubbleChart.js +2 -4
- package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChart.js +3 -4
- package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChartDeprecated.js +3 -3
- package/esm/internal/components/pluggableVisualizations/geoAreaChart/PluggableGeoAreaChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/geoAreaChart/PluggableGeoAreaChart.js +2 -4
- package/esm/internal/components/pluggableVisualizations/geoChart/PluggableGeoPushpinChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/geoChart/PluggableGeoPushpinChart.js +5 -7
- package/esm/internal/components/pluggableVisualizations/geoChartNext/PluggableGeoPushpinChartNext.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/geoChartNext/PluggableGeoPushpinChartNext.js +10 -12
- package/esm/internal/components/pluggableVisualizations/geoCommon/geoPropertySanitization.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/geoCommon/geoPropertySanitization.js +6 -7
- package/esm/internal/components/pluggableVisualizations/heatMap/PluggableHeatmap.js +3 -3
- package/esm/internal/components/pluggableVisualizations/lineChart/PluggableLineChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/lineChart/PluggableLineChart.js +4 -5
- package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.js +4 -5
- package/esm/internal/components/pluggableVisualizations/pieChart/PluggablePieChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/pieChart/PluggablePieChart.js +5 -6
- package/esm/internal/components/pluggableVisualizations/pivotTable/pivotTableAdditionalFactories.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/pivotTable/pivotTableAdditionalFactories.js +2 -2
- package/esm/internal/components/pluggableVisualizations/pivotTableNext/pivotTableNextAdditionalFactories.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/pivotTableNext/pivotTableNextAdditionalFactories.js +2 -2
- package/esm/internal/components/pluggableVisualizations/radarChart/PluggableRadarChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/radarChart/PluggableRadarChart.js +2 -3
- package/esm/internal/components/pluggableVisualizations/repeater/PluggableRepeater.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/repeater/PluggableRepeater.js +3 -5
- package/esm/internal/components/pluggableVisualizations/scatterPlot/PluggableScatterPlot.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/scatterPlot/PluggableScatterPlot.js +3 -5
- package/esm/internal/components/pluggableVisualizations/treeMap/PluggableTreemap.js +4 -4
- package/esm/internal/components/pluggableVisualizations/waterfallChart/PluggableWaterfallChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/waterfallChart/PluggableWaterfallChart.js +7 -8
- package/esm/internal/translations/en-US.localization-bundle.d.ts +28 -0
- package/esm/internal/translations/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/en-US.localization-bundle.js +29 -1
- package/esm/internal/utils/bucketConfig.d.ts.map +1 -1
- package/esm/internal/utils/bucketConfig.js +2 -3
- package/esm/internal/utils/bucketHelper.js +8 -8
- package/esm/internal/utils/colors.d.ts.map +1 -1
- package/esm/internal/utils/colors.js +6 -7
- package/esm/internal/utils/controlsHelper.d.ts.map +1 -1
- package/esm/internal/utils/controlsHelper.js +7 -7
- package/esm/internal/utils/dimensions.d.ts.map +1 -1
- package/esm/internal/utils/dimensions.js +4 -4
- package/esm/internal/utils/drillablePredicates.d.ts.map +1 -1
- package/esm/internal/utils/drillablePredicates.js +4 -4
- package/esm/internal/utils/embeddingCodeGenerator/getReactEmbeddingCodeGenerator.js +8 -8
- package/esm/internal/utils/propertiesHelper.js +8 -8
- package/esm/internal/utils/removeUseless.d.ts.map +1 -1
- package/esm/internal/utils/removeUseless.js +2 -3
- package/esm/internal/utils/translations.d.ts.map +1 -1
- package/esm/internal/utils/translations.js +2 -3
- package/esm/internal/utils/uiConfigHelpers/areaChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/areaChartUiConfigHelper.js +9 -10
- package/esm/internal/utils/uiConfigHelpers/baseChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/baseChartUiConfigHelper.js +16 -17
- package/esm/internal/utils/uiConfigHelpers/bubbleChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/bubbleChartUiConfigHelper.js +6 -7
- package/esm/internal/utils/uiConfigHelpers/columnBarChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/columnBarChartUiConfigHelper.js +4 -5
- package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelper.js +6 -7
- package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelperDeprecated.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelperDeprecated.js +8 -9
- package/esm/internal/utils/uiConfigHelpers/dependencyWheelChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/dependencyWheelChartUiConfigHelper.js +4 -5
- package/esm/internal/utils/uiConfigHelpers/donutChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/donutChartUiConfigHelper.js +3 -4
- package/esm/internal/utils/uiConfigHelpers/funnelChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/funnelChartUiConfigHelper.js +4 -5
- package/esm/internal/utils/uiConfigHelpers/geoAreaChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/geoAreaChartUiConfigHelper.js +3 -3
- package/esm/internal/utils/uiConfigHelpers/geoPushpinChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/geoPushpinChartUiConfigHelper.js +14 -15
- package/esm/internal/utils/uiConfigHelpers/headlineUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/headlineUiConfigHelper.js +9 -10
- package/esm/internal/utils/uiConfigHelpers/heatmapUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/heatmapUiConfigHelper.js +5 -6
- package/esm/internal/utils/uiConfigHelpers/lineChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/lineChartUiConfigHelper.js +11 -12
- package/esm/internal/utils/uiConfigHelpers/mekkoUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/mekkoUiConfigHelper.js +6 -7
- package/esm/internal/utils/uiConfigHelpers/pieChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/pieChartUiConfigHelper.js +9 -10
- package/esm/internal/utils/uiConfigHelpers/pivotTableNextUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/pivotTableNextUiConfigHelper.js +13 -14
- package/esm/internal/utils/uiConfigHelpers/pivotTableUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/pivotTableUiConfigHelper.js +13 -14
- package/esm/internal/utils/uiConfigHelpers/pyramidChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/pyramidChartUiConfigHelper.js +3 -4
- package/esm/internal/utils/uiConfigHelpers/radarChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/radarChartUiConfigHelper.js +11 -12
- package/esm/internal/utils/uiConfigHelpers/repeaterUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/repeaterUiConfigHelper.js +9 -10
- package/esm/internal/utils/uiConfigHelpers/sankeyChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/sankeyChartUiConfigHelper.js +6 -7
- package/esm/internal/utils/uiConfigHelpers/scatterPlotUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/scatterPlotUiConfigHelper.js +6 -7
- package/esm/internal/utils/uiConfigHelpers/treemapUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/treemapUiConfigHelper.js +10 -11
- package/esm/internal/utils/uiConfigHelpers/waterfallChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/waterfallChartUiConfigHelper.js +9 -10
- package/esm/internal/utils/uiConfigHelpers/xirrUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/xirrUiConfigHelper.js +3 -4
- package/esm/notificationsPanel/Notification/Notification.d.ts.map +1 -1
- package/esm/notificationsPanel/Notification/Notification.js +4 -4
- package/esm/sdk-ui-ext.d.ts +1 -1
- package/esm/share/ObjectShareDialog.d.ts +1 -1
- package/esm/share/ObjectShareDialog.js +3 -3
- package/esm/share/messages.d.ts +28 -0
- package/esm/share/messages.d.ts.map +1 -1
- package/esm/share/messages.js +14 -0
- package/esm/share/removeAccessConfirm.d.ts +21 -0
- package/esm/share/removeAccessConfirm.d.ts.map +1 -0
- package/esm/share/removeAccessConfirm.js +27 -0
- package/esm/share/useObjectShareDialog.d.ts +14 -11
- package/esm/share/useObjectShareDialog.d.ts.map +1 -1
- package/esm/share/useObjectShareDialog.js +54 -24
- package/package.json +21 -21
|
@@ -2519,7 +2519,7 @@ export const en_US = {
|
|
|
2519
2519
|
},
|
|
2520
2520
|
"objectShare.confirm.button": {
|
|
2521
2521
|
"text": "Confirm",
|
|
2522
|
-
"crowdinContext": "Primary action label in the general
|
|
2522
|
+
"crowdinContext": "Primary action label in the share dialog's confirm dialogs: changing general access, lowering your own permission, and removing access."
|
|
2523
2523
|
},
|
|
2524
2524
|
"objectShare.selfRestrict.title": {
|
|
2525
2525
|
"text": "Restrict your access?",
|
|
@@ -2529,6 +2529,34 @@ export const en_US = {
|
|
|
2529
2529
|
"text": "You can't set higher permissions for yourself.",
|
|
2530
2530
|
"crowdinContext": "Warning that lowering your own permission is one-way. Shown both as the body of the self-restrict confirm dialog and as the tooltip on permission options that are disabled because they are higher than the user's current level — the copy is identical in both places by design."
|
|
2531
2531
|
},
|
|
2532
|
+
"objectShare.removeAccess.title": {
|
|
2533
|
+
"text": "Remove access?",
|
|
2534
|
+
"crowdinContext": "Title of the confirm dialog shown when the user chooses Remove access on another user's or group's row in the share dialog."
|
|
2535
|
+
},
|
|
2536
|
+
"objectShare.removeAccess.self.title": {
|
|
2537
|
+
"text": "Remove your access?",
|
|
2538
|
+
"crowdinContext": "Title of the confirm dialog shown when the user chooses Remove access on their own row in the share dialog."
|
|
2539
|
+
},
|
|
2540
|
+
"objectShare.removeAccess.loseAccess": {
|
|
2541
|
+
"text": "{name} will lose access to this object.",
|
|
2542
|
+
"crowdinContext": "Body of the confirm dialog shown before removing a user's or group's access in the share dialog, when nothing else gives them access. {name} is the user's full name, or their email or user ID when the name is unknown, or the group's name."
|
|
2543
|
+
},
|
|
2544
|
+
"objectShare.removeAccess.inheritedStays": {
|
|
2545
|
+
"text": "This removes the individual grant. Access inherited from the parent workspace stays active.",
|
|
2546
|
+
"crowdinContext": "Body of the confirm dialog shown before removing a user's or group's access in the share dialog, when a parent workspace also gives them access. Only the permission granted in this workspace is removed."
|
|
2547
|
+
},
|
|
2548
|
+
"objectShare.removeAccess.workspaceStays": {
|
|
2549
|
+
"text": "This removes the individual grant. Access for all workspace members stays active.",
|
|
2550
|
+
"crowdinContext": "Body of the confirm dialog shown before removing a user's or group's access in the share dialog, when general access is set to all workspace members, so they keep access as workspace members. 'All workspace members' is the name of the general access option."
|
|
2551
|
+
},
|
|
2552
|
+
"objectShare.removeAccess.selfLoseAccess": {
|
|
2553
|
+
"text": "You will lose access to this object. You cannot find it again unless someone shares it with you.",
|
|
2554
|
+
"crowdinContext": "Body of the confirm dialog shown when the user removes their own access in the share dialog and nothing else gives them access to the object."
|
|
2555
|
+
},
|
|
2556
|
+
"objectShare.removeAccess.selfLoseEditAccess": {
|
|
2557
|
+
"text": "You will lose access to this object. You cannot find it again unless someone shares it with you. You cannot edit or delete this object.",
|
|
2558
|
+
"crowdinContext": "Body of the confirm dialog shown when the user removes their own edit access in the share dialog and nothing else gives them access to the object."
|
|
2559
|
+
},
|
|
2532
2560
|
"objectShare.workspaceLevel.inherited": {
|
|
2533
2561
|
"text": "This permission is granted from a parent workspace and cannot be lowered here.",
|
|
2534
2562
|
"crowdinContext": "Tooltip on permission options in the all-workspace-members permission menu that are disabled because a parent workspace already grants a higher workspace-wide level, so picking a lower level here could not take effect."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bucketConfig.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/bucketConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bucketConfig.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/bucketConfig.ts"],"names":[],"mappings":"AAMA,OAAO,EAGH,KAAK,uBAAuB,EAC/B,MAAM,gCAAgC,CAAC;AAsBxC,wBAAgB,2BAA2B,CACvC,sBAAsB,EAAE,uBAAuB,GAChD,uBAAuB,CAyCzB;AAMD,wBAAgB,gBAAgB,CAC5B,sBAAsB,EAAE,uBAAuB,EAC/C,eAAe,GAAE,OAAe,GACjC,uBAAuB,CA2BzB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
|
-
import { set } from "lodash-es";
|
|
3
2
|
import { OverTimeComparisonTypes } from "@gooddata/sdk-ui";
|
|
4
|
-
import { _cloneDeep, _isEmpty, _isEqual } from "@gooddata/util";
|
|
3
|
+
import { _cloneDeep, _isEmpty, _isEqual, _set } from "@gooddata/util";
|
|
5
4
|
import { METRIC, SHOW_IN_PERCENT } from "../constants/bucket.js";
|
|
6
5
|
import { filterOutArithmeticMeasuresFromDerived, filterOutDerivedMeasures, filterOutIncompatibleArithmeticMeasures, getComparisonTypeFromFilters, isComparisonAvailable, keepOnlyMasterAndDerivedMeasuresOfType, removeAllDerivedMeasures, } from "./bucketHelper.js";
|
|
7
6
|
import { isComparisonOverTimeAllowed, isShowInPercentAllowed } from "./bucketRules.js";
|
|
@@ -37,7 +36,7 @@ export function configureOverTimeComparison(extendedReferencePoint) {
|
|
|
37
36
|
return newExtendedReferencePoint;
|
|
38
37
|
}
|
|
39
38
|
function removeShowInPercent(measure) {
|
|
40
|
-
return
|
|
39
|
+
return _set(measure, SHOW_IN_PERCENT, null);
|
|
41
40
|
}
|
|
42
41
|
export function configurePercent(extendedReferencePoint, percentDisabled = false) {
|
|
43
42
|
extendedReferencePoint.buckets.forEach((bucket) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { negate, without } from "lodash-es";
|
|
3
3
|
import { areObjRefsEqual, bucketItems, bucketsFind, bucketsMeasures, idRef, insightBuckets, insightVisualizationType, isObjRef, isPoPMeasure, isPreviousPeriodMeasure, isSimpleMeasure, } from "@gooddata/sdk-model";
|
|
4
4
|
import { BucketNames, OverTimeComparisonTypes, VisualizationTypes, } from "@gooddata/sdk-ui";
|
|
5
5
|
import { isAreaChart, isBulletChart, isComboChart, isLineChart } from "@gooddata/sdk-ui-charts";
|
|
6
|
-
import { _cloneDeep, _isEmpty } from "@gooddata/util";
|
|
6
|
+
import { _cloneDeep, _compact, _isEmpty, _set, _uniqBy } from "@gooddata/util";
|
|
7
7
|
import { subtitles, titles } from "../../locales.js";
|
|
8
8
|
import { ATTRIBUTE, BUCKETS, DATE, METRIC, SHOW_ON_SECONDARY_AXIS } from "../constants/bucket.js";
|
|
9
9
|
import { DATE_DATASET_ATTRIBUTE, } from "../interfaces/Visualization.js";
|
|
@@ -308,7 +308,7 @@ export function getDateFilter(filtersBucket) {
|
|
|
308
308
|
const filters = filterItem.filters ?? [];
|
|
309
309
|
return filters.find(isDateFilter);
|
|
310
310
|
});
|
|
311
|
-
const dateFilters =
|
|
311
|
+
const dateFilters = _compact(dateFiltersInclEmpty);
|
|
312
312
|
return dateFilters.length ? dateFilters[0] : null;
|
|
313
313
|
}
|
|
314
314
|
export function getComparisonTypeFromFilters(filtersBucket) {
|
|
@@ -363,11 +363,11 @@ export function setBucketTitles(referencePoint, visualizationType, intl) {
|
|
|
363
363
|
if (bucketSupportsSubtitle(visualizationType, localIdentifier)) {
|
|
364
364
|
const subtitleId = generateBucketSubtitleId(localIdentifier, visualizationType);
|
|
365
365
|
const subtitle = getTranslation(subtitleId, intl);
|
|
366
|
-
|
|
366
|
+
_set(updatedUiConfig, [BUCKETS, localIdentifier, "subtitle"], subtitle);
|
|
367
367
|
}
|
|
368
368
|
const titleId = generateBucketTitleId(localIdentifier, visualizationType);
|
|
369
369
|
const title = getTranslation(titleId, intl);
|
|
370
|
-
|
|
370
|
+
_set(updatedUiConfig, [BUCKETS, localIdentifier, "title"], title);
|
|
371
371
|
});
|
|
372
372
|
return updatedUiConfig;
|
|
373
373
|
}
|
|
@@ -455,7 +455,7 @@ export function getTotalsFromBucket(buckets, bucketName) {
|
|
|
455
455
|
}
|
|
456
456
|
function getUniqueAttributes(buckets) {
|
|
457
457
|
const attributes = getAllItemsByType(buckets, [ATTRIBUTE, DATE]);
|
|
458
|
-
return
|
|
458
|
+
return _uniqBy(attributes, (attribute) => attribute?.attribute);
|
|
459
459
|
}
|
|
460
460
|
export function getMeasuresFromMdObject(insight) {
|
|
461
461
|
if (!insight) {
|
|
@@ -591,7 +591,7 @@ export function applyUiConfig(referencePoint) {
|
|
|
591
591
|
const buckets = referencePoint.buckets;
|
|
592
592
|
const uiConfig = referencePoint.uiConfig?.buckets;
|
|
593
593
|
const newBuckets = buckets.map((bucket) => applyUiConfigOnBucket(bucket, uiConfig?.[bucket.localIdentifier]));
|
|
594
|
-
|
|
594
|
+
_set(referencePoint, "buckets", newBuckets);
|
|
595
595
|
return referencePoint;
|
|
596
596
|
}
|
|
597
597
|
export function hasBucket(buckets, localIdentifier) {
|
|
@@ -734,7 +734,7 @@ function getMeasureDependencies(measure, allMeasures) {
|
|
|
734
734
|
const dependenciesOfDependency = getMeasureDependencies(directDependency, allMeasures);
|
|
735
735
|
indirectDependencies.push(...dependenciesOfDependency);
|
|
736
736
|
});
|
|
737
|
-
return
|
|
737
|
+
return _uniqBy([...directDependencies, ...indirectDependencies], (dependency) => dependency.localIdentifier);
|
|
738
738
|
}
|
|
739
739
|
function tryToSelectMeasures(measures, alreadySelectedMeasures, limit) {
|
|
740
740
|
const measuresToBePlaced = without(measures, ...alreadySelectedMeasures);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/colors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/colors.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,MAAM,EACX,KAAK,iBAAiB,EASzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAiC,MAAM,kBAAkB,CAAC;AAC7G,OAAO,EAAc,KAAK,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGjF,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAU/E,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,YAAY,EAAE,EAAE,YAAY,EAAE,MAAM,GAAG,YAAY,EAAE,CAQjG;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAa3E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAO1F;AAED,wBAAgB,oBAAoB,CAChC,MAAM,EAAE,mBAAmB,GAAG,SAAS,EACvC,gBAAgB,CAAC,EAAE,qBAAqB,EAAE,EAC1C,YAAY,CAAC,EAAE,iBAAiB,EAAE,GACnC,YAAY,EAAE,CA4ChB;AAuBD,wBAAgB,aAAa,CACzB,UAAU,EAAE,wBAAwB,EACpC,IAAI,EAAE,cAAc,EACpB,KAAK,EAAE,MAAM,GACd,wBAAwB,CAM1B;AAED,wBAAgB,gCAAgC,CAC5C,UAAU,EAAE,wBAAwB,EACpC,EAAE,EAAE,MAAM,GACX,wBAAwB,CAU1B;AAED,wBAAgB,sBAAsB,CAClC,UAAU,EAAE,wBAAwB,EACpC,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,qBAAqB,CAAC,WAAW,CAAC,EAC7C,SAAS,EAAE,qBAAqB,CAAC,WAAW,CAAC,GAC9C,wBAAwB,CAO1B;AAED,wBAAgB,4CAA4C,CACxD,UAAU,EAAE,wBAAwB,GAAG,SAAS,EAChD,eAAe,EAAE,MAAM,EAAE,GAC1B,wBAAwB,GAAG,SAAS,CAoBtC;AAED,wBAAgB,kBAAkB,CAC9B,UAAU,EAAE,wBAAwB,EACpC,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,SAAS,GACjD,wBAAwB,CAiE1B"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
|
-
import { compact, set, uniqBy } from "lodash-es";
|
|
3
2
|
import { isAttributeDescriptor, isColorDescriptor, isColorFromPalette, isMeasureDescriptor, isResultAttributeHeader, isRgbColor, isUriRef, } from "@gooddata/sdk-model";
|
|
4
3
|
import { getMappingHeaderFormattedName } from "@gooddata/sdk-ui";
|
|
5
4
|
import { ColorUtils } from "@gooddata/sdk-ui-charts";
|
|
6
|
-
import { _cloneDeep, _isEmpty, _isEqual } from "@gooddata/util";
|
|
5
|
+
import { _cloneDeep, _compact, _isEmpty, _isEqual, _set, _uniqBy } from "@gooddata/util";
|
|
7
6
|
/**
|
|
8
7
|
* Name of the colored item as the list displays it, so that searching matches what the user sees: the
|
|
9
8
|
* formatted element value for dates and number-formatted attributes, the raw name otherwise.
|
|
@@ -95,9 +94,9 @@ function mergeColorMappingToProperties(properties, id, color) {
|
|
|
95
94
|
},
|
|
96
95
|
];
|
|
97
96
|
const previousColorMapping = properties?.controls?.["colorMapping"] ?? [];
|
|
98
|
-
const mergedMapping =
|
|
97
|
+
const mergedMapping = _compact(_uniqBy([...colorMapping, ...previousColorMapping], "id"));
|
|
99
98
|
const newProperties = _cloneDeep(properties);
|
|
100
|
-
|
|
99
|
+
_set(newProperties, "controls.colorMapping", mergedMapping);
|
|
101
100
|
return newProperties;
|
|
102
101
|
}
|
|
103
102
|
export function getProperties(properties, item, color) {
|
|
@@ -113,15 +112,15 @@ export function removeColorMappingFromProperties(properties, id) {
|
|
|
113
112
|
// omitting the entry is not enough because hosts merge pushed properties additively
|
|
114
113
|
const updatedMapping = previousColorMapping.map((item) => item.id === id ? { id, color: null } : item);
|
|
115
114
|
const newProperties = _cloneDeep(properties);
|
|
116
|
-
|
|
115
|
+
_set(newProperties, "controls.colorMapping", updatedMapping);
|
|
117
116
|
return newProperties;
|
|
118
117
|
}
|
|
119
118
|
export function getLineStyleProperties(properties, id, lineStyle, lineWidth) {
|
|
120
119
|
const newEntry = { id, lineStyle, lineWidth };
|
|
121
120
|
const previousMapping = properties?.controls?.["lineStyleMapping"] ?? [];
|
|
122
|
-
const merged =
|
|
121
|
+
const merged = _compact(_uniqBy([newEntry, ...previousMapping], "id"));
|
|
123
122
|
const newProperties = _cloneDeep(properties);
|
|
124
|
-
|
|
123
|
+
_set(newProperties, "controls.lineStyleMapping", merged);
|
|
125
124
|
return newProperties;
|
|
126
125
|
}
|
|
127
126
|
export function getPropertiesWithLineStyleMappingForMeasures(properties, measureLocalIds) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controlsHelper.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/controlsHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"controlsHelper.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/controlsHelper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACH,KAAK,kBAAkB,EAK1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI/D,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAKpG,KAAK,qBAAqB,GAAG;IACzB,IAAI,EAAE,SAAS,CAAC;CACnB,CAAC;AAoBF,wBAAgB,2BAA2B,CACvC,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,mBAAmB,EAC1B,KAAK,EAAE,mBAAmB,GAAG,qBAAqB,EAClD,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,EACtD,YAAY,EAAE,mBAAmB,GAClC,IAAI,CAsDN;AAED,wBAAgB,2BAA2B,CACvC,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,mBAAmB,EAC1B,KAAK,EAAE,mBAAmB,GAAG,qBAAqB,EAClD,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,EACtD,YAAY,EAAE,mBAAmB,GAClC,IAAI,CAuDN;AAED,wBAAgB,uCAAuC,CAAC,OAAO,EAAE,kBAAkB,GAAG,SAAS,uBAa9F"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
|
-
import { set } from "lodash-es";
|
|
3
2
|
import { bucketItems, bucketsFind, insightBuckets, insightProperties, } from "@gooddata/sdk-model";
|
|
4
3
|
import { BucketNames } from "@gooddata/sdk-ui";
|
|
4
|
+
import { _set } from "@gooddata/util";
|
|
5
5
|
import { messages } from "../../locales.js";
|
|
6
6
|
import { getMeasureGroupDimensionFromProperties } from "./propertiesHelper.js";
|
|
7
7
|
import { getTranslation } from "./translations.js";
|
|
@@ -31,7 +31,7 @@ export function maxInputValidateAndPushData(data, state, props, setState, defaul
|
|
|
31
31
|
const maxNumberValue = fixEmptyMaxValue(maxValue);
|
|
32
32
|
const maxIsMinus = maxValue === "-";
|
|
33
33
|
const { propertiesMeta, pushData } = props;
|
|
34
|
-
|
|
34
|
+
_set(propertiesMeta, "undoApplied", false);
|
|
35
35
|
// dash, non-numeric or min/max mismatch: set error
|
|
36
36
|
if (isInvalidOrMinMaxError(maxValue, minNumberValue, maxNumberValue)) {
|
|
37
37
|
setState({
|
|
@@ -52,7 +52,7 @@ export function maxInputValidateAndPushData(data, state, props, setState, defaul
|
|
|
52
52
|
// valid, set new value
|
|
53
53
|
const { properties } = props;
|
|
54
54
|
if (properties) {
|
|
55
|
-
|
|
55
|
+
_set(properties, `controls.${basePath}.max`, maxValue);
|
|
56
56
|
}
|
|
57
57
|
// if incorrect value was set previously but now validation passed, set incorrect value as correct value
|
|
58
58
|
if (isNaN(parseFloat(incorrectMinValue))) {
|
|
@@ -62,7 +62,7 @@ export function maxInputValidateAndPushData(data, state, props, setState, defaul
|
|
|
62
62
|
}
|
|
63
63
|
else {
|
|
64
64
|
if (properties) {
|
|
65
|
-
|
|
65
|
+
_set(properties, `controls.${basePath}.min`, incorrectMinValue);
|
|
66
66
|
}
|
|
67
67
|
setState(defaultState);
|
|
68
68
|
}
|
|
@@ -80,7 +80,7 @@ export function minInputValidateAndPushData(data, state, props, setState, defaul
|
|
|
80
80
|
const minNumberValue = fixEmptyMinValue(minValue);
|
|
81
81
|
const minIsDash = minValue === "-";
|
|
82
82
|
const { propertiesMeta, pushData } = props;
|
|
83
|
-
|
|
83
|
+
_set(propertiesMeta, "undoApplied", false);
|
|
84
84
|
// dash, non-numeric or min/max mismatch: set error
|
|
85
85
|
if (isInvalidOrMinMaxError(minValue, minNumberValue, maxNumberValue)) {
|
|
86
86
|
setState({
|
|
@@ -101,7 +101,7 @@ export function minInputValidateAndPushData(data, state, props, setState, defaul
|
|
|
101
101
|
// valid, set new value
|
|
102
102
|
const { properties } = props;
|
|
103
103
|
if (properties) {
|
|
104
|
-
|
|
104
|
+
_set(properties, `controls.${basePath}.min`, minValue);
|
|
105
105
|
}
|
|
106
106
|
// if incorrect value was set previously but now validation passed, set incorrect value as correct value
|
|
107
107
|
if (isNaN(parseFloat(incorrectMaxValue))) {
|
|
@@ -111,7 +111,7 @@ export function minInputValidateAndPushData(data, state, props, setState, defaul
|
|
|
111
111
|
}
|
|
112
112
|
else {
|
|
113
113
|
if (properties) {
|
|
114
|
-
|
|
114
|
+
_set(properties, `controls.${basePath}.max`, incorrectMaxValue);
|
|
115
115
|
}
|
|
116
116
|
setState(defaultState);
|
|
117
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimensions.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/dimensions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dimensions.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/dimensions.ts"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,UAAU,EACf,KAAK,kBAAkB,EAS1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAe,KAAK,OAAO,EAAsB,MAAM,kBAAkB,CAAC;AA4BjF,wBAAgB,uBAAuB,CACnC,OAAO,EAAE,kBAAkB,EAC3B,yBAAyB,CAAC,EAAE,GAAG,GAChC,UAAU,EAAE,CAMd;AAwCD,wBAAgB,sBAAsB,IAAI,UAAU,EAAE,CAErD;AAmCD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAC9B,OAAO,EAAE,kBAAkB,EAC3B,IAAI,EAAE,OAAO,EACb,yBAAyB,CAAC,EAAE,GAAG,GAChC,UAAU,EAAE,CAiDd;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,kBAAkB,GAAG,UAAU,EAAE,CAKnF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// (C) 2007-2026 GoodData Corporation
|
|
2
|
-
import { compact } from "lodash-es";
|
|
3
2
|
import { MeasureGroupIdentifier, bucketAttributes, insightAttributes, insightBucket, insightBuckets, insightProperties, newDimension, newTwoDimensional, } from "@gooddata/sdk-model";
|
|
4
3
|
import { BucketNames, VisualizationTypes } from "@gooddata/sdk-ui";
|
|
5
4
|
import { getPivotTableDimensions as getPivotTableDimensionsShared, } from "@gooddata/sdk-ui-pivot";
|
|
5
|
+
import { _compact } from "@gooddata/util";
|
|
6
6
|
import { getMeasureGroupDimensionFromProperties } from "./propertiesHelper.js";
|
|
7
7
|
const COLUMNS = "columns";
|
|
8
8
|
const ROWS = "rows";
|
|
@@ -41,8 +41,8 @@ function getAreaDimensions(insight) {
|
|
|
41
41
|
const seriesAttribute = viewByAttributes[0];
|
|
42
42
|
const sliceAttribute = stackByAttributes[0] ?? viewByAttributes[1];
|
|
43
43
|
return sliceAttribute
|
|
44
|
-
? newTwoDimensional([sliceAttribute],
|
|
45
|
-
: newTwoDimensional([MeasureGroupIdentifier],
|
|
44
|
+
? newTwoDimensional([sliceAttribute], _compact([seriesAttribute, MeasureGroupIdentifier]))
|
|
45
|
+
: newTwoDimensional([MeasureGroupIdentifier], _compact([seriesAttribute]));
|
|
46
46
|
}
|
|
47
47
|
function getLineDimensions(insight) {
|
|
48
48
|
const trendAttributes = safeBucketAttributes(insight, BucketNames.TREND);
|
|
@@ -75,7 +75,7 @@ function getBubbleDimensions(insight) {
|
|
|
75
75
|
function getSankeyDimensions(insight) {
|
|
76
76
|
const fromAttributes = safeBucketAttributes(insight, BucketNames.ATTRIBUTE_FROM);
|
|
77
77
|
const toAttributes = safeBucketAttributes(insight, BucketNames.ATTRIBUTE_TO);
|
|
78
|
-
return newTwoDimensional([MeasureGroupIdentifier],
|
|
78
|
+
return newTwoDimensional([MeasureGroupIdentifier], _compact([...fromAttributes, ...toAttributes]));
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
81
|
* Generates dimensions based on buckets and visualization objects.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drillablePredicates.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/drillablePredicates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drillablePredicates.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/drillablePredicates.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,0BAA0B,EAGlC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAiB3E;;;;;;;;;;GAUG;AACH,wBAAgB,uCAAuC,CAAC,EACpD,IAAI,EACJ,WAAW,EACX,YAAY,GACf,EAAE,0BAA0B,GAAG,gBAAgB,EAAE,CAsBjD;AAED,eAAO,MAAM,wBAAwB;;CAEpC,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
|
-
import { uniq, uniqBy } from "lodash-es";
|
|
3
2
|
import { HeaderPredicates } from "@gooddata/sdk-ui";
|
|
3
|
+
import { _uniq, _uniqBy } from "@gooddata/util";
|
|
4
4
|
const toQualifier = (identifier) => typeof identifier === "string" ? { identifier } : identifier;
|
|
5
5
|
/**
|
|
6
6
|
* An untyped entry stays distinct from the same identifier typed, and two types of one identifier stay
|
|
7
7
|
* distinct from each other, because each activates drilling on a different object.
|
|
8
8
|
*/
|
|
9
9
|
const uniqueQualifiers = (identifiers) => Array.isArray(identifiers)
|
|
10
|
-
?
|
|
10
|
+
? _uniqBy(identifiers.map(toQualifier), ({ identifier, type }) => `${type ?? ""}.${identifier}`)
|
|
11
11
|
: [];
|
|
12
12
|
/**
|
|
13
13
|
* Converts post message with drilling specification into header predicates. Given the message with
|
|
@@ -21,9 +21,9 @@ const uniqueQualifiers = (identifiers) => Array.isArray(identifiers)
|
|
|
21
21
|
* @internal
|
|
22
22
|
*/
|
|
23
23
|
export function convertPostMessageToDrillablePredicates({ uris, identifiers, composedFrom, }) {
|
|
24
|
-
const simpleUris = Array.isArray(uris) ?
|
|
24
|
+
const simpleUris = Array.isArray(uris) ? _uniq(uris) : [];
|
|
25
25
|
const simpleIdentifiers = uniqueQualifiers(identifiers);
|
|
26
|
-
const composedFromUris = composedFrom?.uris && Array.isArray(composedFrom.uris) ?
|
|
26
|
+
const composedFromUris = composedFrom?.uris && Array.isArray(composedFrom.uris) ? _uniq(composedFrom.uris) : [];
|
|
27
27
|
const composedFromIdentifiers = uniqueQualifiers(composedFrom?.identifiers);
|
|
28
28
|
// note: not passing factory function to maps to make testing assertions simpler (passing factory fun-as-is
|
|
29
29
|
// will call the factory with 3 args (value, index and all values)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2022-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { sortBy } from "lodash-es";
|
|
3
3
|
import { factoryNotationFor } from "@gooddata/sdk-model";
|
|
4
|
-
import { _isEmpty } from "@gooddata/util";
|
|
4
|
+
import { _compact, _groupBy, _isEmpty, _partition, _uniqBy } from "@gooddata/util";
|
|
5
5
|
import { normalizeInsight } from "./normalizeInsight.js";
|
|
6
6
|
// these are in line with what `factoryNotationFor` supports
|
|
7
7
|
const defaultFactories = [
|
|
@@ -60,12 +60,12 @@ function indent(str, tabs) {
|
|
|
60
60
|
.map((chunk) => `${" ".repeat(tabs * TAB_SIZE)}${chunk}`)
|
|
61
61
|
.join("\n");
|
|
62
62
|
}
|
|
63
|
-
const renderImports = (imports) => Object.entries(
|
|
63
|
+
const renderImports = (imports) => Object.entries(_groupBy(imports, (i) => i.package))
|
|
64
64
|
.map(([pkg, imports]) => {
|
|
65
|
-
const [[defaultImport], namedImports] =
|
|
66
|
-
return
|
|
65
|
+
const [[defaultImport], namedImports] = _partition(imports, (i) => i.importType === "default");
|
|
66
|
+
return _compact([
|
|
67
67
|
"import",
|
|
68
|
-
|
|
68
|
+
_compact([
|
|
69
69
|
defaultImport?.name,
|
|
70
70
|
namedImports.length &&
|
|
71
71
|
`{ ${sortBy(namedImports.map((i) => i.name), (i) => i.toLowerCase()).join(", ")} }`,
|
|
@@ -113,7 +113,7 @@ function walkProps(props, additionalFactories, config) {
|
|
|
113
113
|
const detectedFactories = detectFactoryImports(propDeclarations, additionalFactories ?? []);
|
|
114
114
|
importsUsed.push(...detectedFactories);
|
|
115
115
|
return {
|
|
116
|
-
importsUsed:
|
|
116
|
+
importsUsed: _uniqBy(importsUsed, (i) => `${i.package}#${i.name}`),
|
|
117
117
|
propDeclarations,
|
|
118
118
|
propUsages,
|
|
119
119
|
};
|
|
@@ -133,7 +133,7 @@ export function getReactEmbeddingCodeGenerator({ component, insightToProps, addi
|
|
|
133
133
|
const normalizedInsight = normalizeInsight(insight);
|
|
134
134
|
const props = insightToProps(normalizedInsight, config?.context);
|
|
135
135
|
const { importsUsed, propDeclarations, propUsages } = walkProps(props, additionalFactories, config);
|
|
136
|
-
const imports =
|
|
136
|
+
const imports = _compact([REACT_IMPORT_INFO, ...importsUsed, component]);
|
|
137
137
|
const height = config?.height ?? DEFAULT_HEIGHT;
|
|
138
138
|
const stringifiedHeight = typeof height === "string" ? `"${height}"` : height.toString();
|
|
139
139
|
const componentBody = `<${component.name}\n${indent(propUsages.join("\n"), 1)}\n/>`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
2
|
// eslint-disable-next-line no-restricted-imports
|
|
3
|
-
import { get, has
|
|
3
|
+
import { get, has } from "lodash-es";
|
|
4
4
|
import { bucketsIsEmpty, insightBuckets, insightProperties, insightVisualizationUrl, } from "@gooddata/sdk-model";
|
|
5
5
|
import { BucketNames } from "@gooddata/sdk-ui";
|
|
6
|
-
import { _cloneDeep, _isEmpty } from "@gooddata/util";
|
|
6
|
+
import { _cloneDeep, _isEmpty, _set } from "@gooddata/util";
|
|
7
7
|
import { AXIS } from "../constants/axis.js";
|
|
8
8
|
import { PROPERTY_CONTROLS } from "../constants/properties.js";
|
|
9
9
|
import { OPTIONAL_STACKING_PROPERTIES } from "../constants/supportedProperties.js";
|
|
@@ -12,7 +12,7 @@ import { getAllMeasuresShowOnSecondaryAxis, getItemsCount, getItemsLocalIdentifi
|
|
|
12
12
|
export function getSupportedPropertiesControls(visualizationControlsProperties, supportedPropertiesList) {
|
|
13
13
|
const clonedControls = _cloneDeep(visualizationControlsProperties);
|
|
14
14
|
if (supportedPropertiesList) {
|
|
15
|
-
return supportedPropertiesList.reduce((props, current) => has(clonedControls, current) ?
|
|
15
|
+
return supportedPropertiesList.reduce((props, current) => has(clonedControls, current) ? _set(props, current, get(clonedControls, current)) : props, {});
|
|
16
16
|
}
|
|
17
17
|
return {};
|
|
18
18
|
}
|
|
@@ -40,8 +40,8 @@ export function setSecondaryMeasures(referencePoint, axisName) {
|
|
|
40
40
|
0: AXIS.PRIMARY,
|
|
41
41
|
[allMeasures.length]: AXIS.SECONDARY,
|
|
42
42
|
}[secondaryMeasures.length] || AXIS.DUAL;
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
_set(newReferencePoint, path, secondaryAxis);
|
|
44
|
+
_set(newReferencePoint, UICONFIG_AXIS, axis);
|
|
45
45
|
return newReferencePoint;
|
|
46
46
|
}
|
|
47
47
|
export function isEmptyObject(obj) {
|
|
@@ -255,13 +255,13 @@ export function getColumnHeadersPositionFromProperties(visualizationProperties)
|
|
|
255
255
|
}
|
|
256
256
|
export function getLegendConfiguration(controlProperties, insight) {
|
|
257
257
|
const legendPosition = getLegendPosition(controlProperties, insight);
|
|
258
|
-
|
|
258
|
+
_set(controlProperties, "legend.position", legendPosition);
|
|
259
259
|
return controlProperties;
|
|
260
260
|
}
|
|
261
261
|
export function getLegendConfigurationDashboardsEnv(controlProperties, options) {
|
|
262
262
|
const legendPosition = getLegendPositionDashboardsEnv(controlProperties, options);
|
|
263
|
-
|
|
264
|
-
|
|
263
|
+
_set(controlProperties, "legend.position", legendPosition);
|
|
264
|
+
_set(controlProperties, "legend.responsive", "autoPositionWithPopup");
|
|
265
265
|
return controlProperties;
|
|
266
266
|
}
|
|
267
267
|
export function getChartSupportedControls(controlProperties, insight) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeUseless.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/removeUseless.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"removeUseless.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/removeUseless.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAc3C"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// (C) 2022-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
3
|
-
import { _isEmpty } from "@gooddata/util";
|
|
2
|
+
import { _compact, _isEmpty } from "@gooddata/util";
|
|
4
3
|
function isUseless(obj) {
|
|
5
4
|
return obj === null || obj === undefined || (typeof obj === "object" && _isEmpty(obj));
|
|
6
5
|
}
|
|
@@ -14,7 +13,7 @@ function isUseless(obj) {
|
|
|
14
13
|
export function removeUseless(obj) {
|
|
15
14
|
let res = obj;
|
|
16
15
|
if (Array.isArray(obj)) {
|
|
17
|
-
res =
|
|
16
|
+
res = _compact(obj.map(removeUseless));
|
|
18
17
|
}
|
|
19
18
|
else if (obj !== null && typeof obj === "object") {
|
|
20
19
|
res = Object.fromEntries(Object.entries(obj)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/translations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAEH,KAAK,aAAa,EAErB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,wBAAgB,cAAc,CAC1B,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,IAAI,CAAC,EAAE,SAAS,EAChB,MAAM,GAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAO,GACvC,MAAM,CAKR;AAED,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,SAAS,GAAG,aAAa,EAAE,CAM3G;AAQD;;GAEG;AACH,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAyDxC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAqC,CAAC;AAE7G,eAAO,MAAM,gBAAgB;;;;CAK5B,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
|
-
import { memoize } from "lodash-es";
|
|
3
2
|
import { DEFAULT_MESSAGES as DEFAULT_MESSAGES_SDK_UI, resolveMessages as sdkUiresolveMessages, } from "@gooddata/sdk-ui";
|
|
4
|
-
import { removeMetadata } from "@gooddata/util";
|
|
3
|
+
import { _memoize, removeMetadata } from "@gooddata/util";
|
|
5
4
|
export function getTranslation(translationId, intl, values = {}) {
|
|
6
5
|
if (!translationId) {
|
|
7
6
|
return "";
|
|
@@ -80,7 +79,7 @@ const resolveMessagesInternal = async (locale) => {
|
|
|
80
79
|
*
|
|
81
80
|
* @internal
|
|
82
81
|
*/
|
|
83
|
-
export const resolveMessages =
|
|
82
|
+
export const resolveMessages = _memoize(resolveMessagesInternal);
|
|
84
83
|
export const DEFAULT_MESSAGES = {
|
|
85
84
|
[DEFAULT_LANGUAGE]: {
|
|
86
85
|
...DEFAULT_OWN_MESSAGES,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"areaChartUiConfigHelper.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/uiConfigHelpers/areaChartUiConfigHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"areaChartUiConfigHelper.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/uiConfigHelpers/areaChartUiConfigHelper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAQ5C,OAAO,EAGH,KAAK,uBAAuB,EAE/B,MAAM,mCAAmC,CAAC;AAiE3C,wBAAgB,oBAAoB,CAChC,cAAc,EAAE,uBAAuB,EACvC,IAAI,EAAE,SAAS,EACf,iBAAiB,EAAE,MAAM,GAC1B,uBAAuB,CAuCzB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
|
-
import { set } from "lodash-es";
|
|
3
2
|
import { BucketNames } from "@gooddata/sdk-ui";
|
|
4
|
-
import { _cloneDeep } from "@gooddata/util";
|
|
3
|
+
import { _cloneDeep, _set } from "@gooddata/util";
|
|
5
4
|
import { messages } from "../../../locales.js";
|
|
6
5
|
import { ATTRIBUTE, BUCKETS, DATE } from "../../constants/bucket.js";
|
|
7
6
|
import { UICONFIG } from "../../constants/uiConfig.js";
|
|
@@ -46,7 +45,7 @@ function setAreaChartBucketWarningMessages(referencePoint, messageConfig) {
|
|
|
46
45
|
if (!uiConfig) {
|
|
47
46
|
return uiConfig;
|
|
48
47
|
}
|
|
49
|
-
return
|
|
48
|
+
return _set(uiConfig, [BUCKETS, localIdentifier, "warningMessage"], warningMessage);
|
|
50
49
|
}, updatedUiConfig);
|
|
51
50
|
}
|
|
52
51
|
export function setAreaChartUiConfig(referencePoint, intl, visualizationType) {
|
|
@@ -65,13 +64,13 @@ export function setAreaChartUiConfig(referencePoint, intl, visualizationType) {
|
|
|
65
64
|
[BucketNames.VIEW]: getWarningMessageForViewByBucket(intl, measuresCount, stackItems),
|
|
66
65
|
[BucketNames.STACK]: getWarningMessageForStackByBucket(intl, categoriesCount),
|
|
67
66
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
_set(referencePointConfigured, UICONFIG, setBucketTitles(referencePoint, visualizationType, intl));
|
|
68
|
+
_set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.MEASURES, "canAddItems"], canAddMeasuresItems);
|
|
69
|
+
_set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.VIEW, "canAddItems"], canAddViewItems);
|
|
70
|
+
_set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.STACK, "canAddItems"], canAddStackItems);
|
|
72
71
|
setAreaChartBucketWarningMessages(referencePointConfigured, messageConfig);
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
_set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.MEASURES, "icon"], areaMeasuresIcon);
|
|
73
|
+
_set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.VIEW, "icon"], areaViewIcon);
|
|
74
|
+
_set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.STACK, "icon"], areaStackIcon);
|
|
76
75
|
return referencePointConfigured;
|
|
77
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseChartUiConfigHelper.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/uiConfigHelpers/baseChartUiConfigHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"baseChartUiConfigHelper.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/uiConfigHelpers/baseChartUiConfigHelper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAQ5C,OAAO,EACH,KAAK,WAAW,EAEhB,KAAK,uBAAuB,EAE/B,MAAM,mCAAmC,CAAC;AA8D3C,wBAAgB,oBAAoB,CAChC,cAAc,EAAE,uBAAuB,EACvC,IAAI,EAAE,SAAS,EACf,iBAAiB,EAAE,MAAM,GAC1B,uBAAuB,CAwDzB;AAED,wBAAgB,mCAAmC,CAC/C,cAAc,EAAE,uBAAuB,EACvC,iBAAiB,EAAE,MAAM,GAC1B,uBAAuB,CAoBzB;AAgBD,wBAAgB,4BAA4B,CACxC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,IAAI,EAAE,SAAS,EACf,WAAW,EAAE,WAAW,EAAE,GAC3B,MAAM,CAMR"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
|
-
import { set } from "lodash-es";
|
|
3
2
|
import { BucketNames, VisualizationTypes } from "@gooddata/sdk-ui";
|
|
4
|
-
import { _cloneDeep } from "@gooddata/util";
|
|
3
|
+
import { _cloneDeep, _set } from "@gooddata/util";
|
|
5
4
|
import { messages } from "../../../locales.js";
|
|
6
5
|
import { ATTRIBUTE, BUCKETS, DATE } from "../../constants/bucket.js";
|
|
7
6
|
import { OPEN_AS_REPORT, RECOMMENDATIONS, SUPPORTED, UICONFIG } from "../../constants/uiConfig.js";
|
|
@@ -41,7 +40,7 @@ function setBaseChartBucketWarningMessages(referencePoint, intl) {
|
|
|
41
40
|
warningMessage = getTranslation(messages["categoryStack"].id, intl);
|
|
42
41
|
}
|
|
43
42
|
if (warningMessage) {
|
|
44
|
-
|
|
43
|
+
_set(updatedUiConfig, [BUCKETS, localIdentifier, "warningMessage"], warningMessage);
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
});
|
|
@@ -52,11 +51,11 @@ export function setBaseChartUiConfig(referencePoint, intl, visualizationType) {
|
|
|
52
51
|
const buckets = referencePointConfigured?.buckets ?? [];
|
|
53
52
|
const measuresCanAddItems = hasNoMeasures(buckets) || hasNoStacksWithDate(buckets);
|
|
54
53
|
const stackCanAddItems = !hasMoreThanOneMasterMeasure(buckets, BucketNames.MEASURES);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
_set(referencePointConfigured, [UICONFIG], setBucketTitles(referencePoint, visualizationType, intl));
|
|
55
|
+
_set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.MEASURES, "canAddItems"], measuresCanAddItems);
|
|
56
|
+
_set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.VIEW, "canAddItems"], true);
|
|
57
|
+
_set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.STACK, "canAddItems"], stackCanAddItems);
|
|
58
|
+
_set(referencePointConfigured, [UICONFIG, OPEN_AS_REPORT, SUPPORTED], !hasColorMapping(referencePointConfigured.properties));
|
|
60
59
|
const iconsMap = {
|
|
61
60
|
column: {
|
|
62
61
|
[BucketNames.MEASURES]: columnMeasuresIcon,
|
|
@@ -69,10 +68,10 @@ export function setBaseChartUiConfig(referencePoint, intl, visualizationType) {
|
|
|
69
68
|
[BucketNames.STACK]: barStackIcon,
|
|
70
69
|
},
|
|
71
70
|
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
_set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.MEASURES, "icon"], iconsMap[visualizationType]?.[BucketNames.MEASURES]);
|
|
72
|
+
_set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.VIEW, "icon"], iconsMap[visualizationType]?.[BucketNames.VIEW]);
|
|
73
|
+
_set(referencePointConfigured, [UICONFIG, BUCKETS, BucketNames.STACK, "icon"], iconsMap[visualizationType]?.[BucketNames.STACK]);
|
|
74
|
+
_set(referencePointConfigured, UICONFIG, setBaseChartBucketWarningMessages(referencePointConfigured, intl));
|
|
76
75
|
return referencePointConfigured;
|
|
77
76
|
}
|
|
78
77
|
export function setBaseChartUiConfigRecommendations(referencePoint, visualizationType) {
|
|
@@ -84,11 +83,11 @@ export function setBaseChartUiConfigRecommendations(referencePoint, visualizatio
|
|
|
84
83
|
const comparisonAndTrending = comparisonAndTrendingRecommendationEnabled(buckets);
|
|
85
84
|
const overTimeComparison = overTimeComparisonRecommendationEnabled(newReferencePoint);
|
|
86
85
|
const previousPeriod = previousPeriodRecommendationEnabled(buckets);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
_set(newReferencePoint, [UICONFIG, RECOMMENDATIONS, "percent"], percentEnabled);
|
|
87
|
+
_set(newReferencePoint, [UICONFIG, RECOMMENDATIONS, "comparison"], comparisonAndTrending);
|
|
88
|
+
_set(newReferencePoint, [UICONFIG, RECOMMENDATIONS, "trending"], comparisonAndTrending);
|
|
89
|
+
_set(newReferencePoint, [UICONFIG, RECOMMENDATIONS, "overTimeComparison"], overTimeComparison);
|
|
90
|
+
_set(newReferencePoint, [UICONFIG, RECOMMENDATIONS, "previousPeriod"], previousPeriod);
|
|
92
91
|
return newReferencePoint;
|
|
93
92
|
}
|
|
94
93
|
return referencePoint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bubbleChartUiConfigHelper.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/uiConfigHelpers/bubbleChartUiConfigHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bubbleChartUiConfigHelper.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/uiConfigHelpers/bubbleChartUiConfigHelper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAO5C,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAWjF,wBAAgB,sBAAsB,CAClC,cAAc,EAAE,uBAAuB,EACvC,IAAI,EAAE,SAAS,EACf,iBAAiB,EAAE,MAAM,GAC1B,uBAAuB,CAmBzB"}
|