@gooddata/sdk-backend-tiger 11.65.0-alpha.8 → 11.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,6 +17,6 @@ https://gooddata.atlassian.net/wiki/spaces/Quality/pages/1454276716/Play+with+sd
17
17
 
18
18
  ## License
19
19
 
20
- (C) 2017-2022 GoodData Corporation
20
+ (C) 2017-2026 GoodData Corporation
21
21
 
22
22
  This project is under MIT License. See [LICENSE](https://github.com/gooddata/gooddata-ui-sdk/blob/master/libs/sdk-backend-tiger/LICENSE).
@@ -1,4 +1,4 @@
1
- export declare const LIB_VERSION = "11.65.0-alpha.8";
1
+ export declare const LIB_VERSION = "11.65.0";
2
2
  export declare const LIB_DESCRIPTION = "GoodData Backend SPI implementation for GoodData Cloud and GoodData.CN";
3
3
  export declare const LIB_NAME = "@gooddata/sdk-backend-tiger";
4
4
  //# sourceMappingURL=__version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"__version.d.ts","sourceRoot":"","sources":["../src/__version.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAE7C,eAAO,MAAM,eAAe,2EAA2E,CAAC;AAExG,eAAO,MAAM,QAAQ,gCAAgC,CAAC"}
1
+ {"version":3,"file":"__version.d.ts","sourceRoot":"","sources":["../src/__version.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,YAAY,CAAC;AAErC,eAAO,MAAM,eAAe,2EAA2E,CAAC;AAExG,eAAO,MAAM,QAAQ,gCAAgC,CAAC"}
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.0-alpha.8";
3
+ export const LIB_VERSION = "11.65.0";
4
4
  export const LIB_DESCRIPTION = "GoodData Backend SPI implementation for GoodData Cloud and GoodData.CN";
5
5
  export const LIB_NAME = "@gooddata/sdk-backend-tiger";
@@ -1 +1 @@
1
- {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../src/backend/features/feature.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,kBAAkB,EAAsB,MAAM,kBAAkB,CAAC;AAInG,MAAM,MAAM,UAAU,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,OAAO,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/C,KAAK,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAErD,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA+5B9E"}
1
+ {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../src/backend/features/feature.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,kBAAkB,EAG1B,MAAM,kBAAkB,CAAC;AAI1B,MAAM,MAAM,UAAU,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,OAAO,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/C,KAAK,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAErD,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAU9E"}
@@ -1,151 +1,21 @@
1
1
  // (C) 2020-2026 GoodData Corporation
2
- import { FeatureFlagsValues, TigerFeaturesNames } from "../uiFeatures.js";
2
+ import { LocalFeatureFlagOverrides, TigerFeatureDefinitions, } from "../uiFeatures.js";
3
3
  import { convertState } from "./state.js";
4
4
  export function mapFeatures(features) {
5
- return {
6
- ...loadFeature(features, TigerFeaturesNames.EnableMetricSqlAndDataExplain, "enableMetricSqlAndDataExplain", "BOOLEAN", FeatureFlagsValues.enableMetricSqlAndDataExplain),
7
- ...loadFeature(features, TigerFeaturesNames.EnableMetricFormatOverrides, "enableMetricFormatOverrides", "BOOLEAN", FeatureFlagsValues.enableMetricFormatOverrides),
8
- ...loadFeature(features, TigerFeaturesNames.EnableColumnLevelPermissions, "enableColumnLevelPermissions", "BOOLEAN", FeatureFlagsValues.enableColumnLevelPermissions),
9
- ...loadFeature(features, TigerFeaturesNames.EnableMetricPermissions, "enableMetricPermissions", "BOOLEAN", FeatureFlagsValues.enableMetricPermissions),
10
- ...loadFeature(features, TigerFeaturesNames.EnableCreateVisualizationWorkspacePermission, "enableCreateVisualizationWorkspacePermission", "BOOLEAN", FeatureFlagsValues.enableCreateVisualizationWorkspacePermission),
11
- ...loadFeature(features, TigerFeaturesNames.EnableVisualizationPermissions, "enableVisualizationPermissions", "BOOLEAN", FeatureFlagsValues.enableVisualizationPermissions),
12
- ...loadFeature(features, TigerFeaturesNames.EnableRadarChart, "enableRadarChart", "BOOLEAN", FeatureFlagsValues.enableRadarChart),
13
- ...loadFeature(features, TigerFeaturesNames.EnableMekkoChart, "enableMekkoChart", "BOOLEAN", FeatureFlagsValues.enableMekkoChart),
14
- ...loadFeature(features, TigerFeaturesNames.EnableLineChartStyling, "enableLineChartStyling", "BOOLEAN", FeatureFlagsValues.enableLineChartStyling),
15
- ...loadFeature(features, TigerFeaturesNames.EnableDonutDataLabels, "enableDonutDataLabels", "BOOLEAN", FeatureFlagsValues.enableDonutDataLabels),
16
- ...loadFeature(features, TigerFeaturesNames.EnableSqlDatasets, "enableSqlDatasets", "BOOLEAN", FeatureFlagsValues.enableSqlDatasets),
17
- ...loadFeature(features, TigerFeaturesNames.EnableChangeAnalysis, "enableChangeAnalysis", "BOOLEAN", FeatureFlagsValues.enableChangeAnalysis),
18
- ...loadFeature(features, TigerFeaturesNames.EnableRankingWithMvf, "enableRankingWithMvf", "BOOLEAN", FeatureFlagsValues.enableRankingWithMvf),
19
- ...loadFeature(features, TigerFeaturesNames.EnableRankingStrictLimit, "enableRankingStrictLimit", "BOOLEAN", FeatureFlagsValues.enableRankingStrictLimit),
20
- ...loadFeature(features, TigerFeaturesNames.EnableImprovedRankingFilter, "enableImprovedRankingFilter", "BOOLEAN", FeatureFlagsValues.enableImprovedRankingFilter),
21
- ...loadFeature(features, TigerFeaturesNames.EnableMySqlDataSource, "enableMySqlDataSource", "BOOLEAN", FeatureFlagsValues.enableMySqlDataSource),
22
- ...loadFeature(features, TigerFeaturesNames.EnableMariaDbDataSource, "enableMariaDbDataSource", "BOOLEAN", FeatureFlagsValues.enableMariaDbDataSource),
23
- ...loadFeature(features, TigerFeaturesNames.EnableOracleDataSource, "enableOracleDataSource", "BOOLEAN", FeatureFlagsValues.enableOracleDataSource),
24
- ...loadFeature(features, TigerFeaturesNames.EnableAnalyticalCatalog, "enableAnalyticalCatalog", "BOOLEAN", FeatureFlagsValues.enableAnalyticalCatalog),
25
- ...loadFeature(features, TigerFeaturesNames.EnableParameters, "enableParameters", "BOOLEAN", FeatureFlagsValues.enableParameters),
26
- ...loadFeature(features, TigerFeaturesNames.EnableAnalyticalCatalogMetricEditor, "enableAnalyticalCatalogMetricEditor", "BOOLEAN", FeatureFlagsValues.enableAnalyticalCatalogMetricEditor),
27
- ...loadFeature(features, TigerFeaturesNames.EnableAnalyticalCatalogVisualizationEditor, "enableAnalyticalCatalogVisualizationEditor", "BOOLEAN", FeatureFlagsValues.enableAnalyticalCatalogVisualizationEditor),
28
- ...loadFeature(features, TigerFeaturesNames.EnableStringParameters, "enableStringParameters", "BOOLEAN", FeatureFlagsValues.enableStringParameters),
29
- ...loadFeature(features, TigerFeaturesNames.EnableLabsSmartFunctions, "enableLabsSmartFunctions", "BOOLEAN", FeatureFlagsValues.enableLabsSmartFunctions),
30
- ...loadFeature(features, TigerFeaturesNames.EnableCustomTooltip, "enableCustomTooltip", "BOOLEAN", FeatureFlagsValues.enableCustomTooltip),
31
- ...loadFeature(features, TigerFeaturesNames.EnableMotherDuckDataSource, "enableMotherDuckDataSource", "BOOLEAN", FeatureFlagsValues.enableMotherDuckDataSource),
32
- ...loadFeature(features, TigerFeaturesNames.EnableStarrocksDataSource, "enableStarrocksDataSource", "BOOLEAN", FeatureFlagsValues.enableStarrocksDataSource),
33
- ...loadFeature(features, TigerFeaturesNames.EnableDataProfiling, "enableDataProfiling", "BOOLEAN", FeatureFlagsValues.enableDataProfiling),
34
- ...loadFeature(features, TigerFeaturesNames.EnableExperimentalFeaturesUI, "enableExperimentalFeaturesUI", "BOOLEAN", FeatureFlagsValues.enableExperimentalFeaturesUI),
35
- ...loadFeature(features, TigerFeaturesNames.EnableSingleStoreDataSource, "enableSingleStoreDataSource", "BOOLEAN", FeatureFlagsValues.enableSingleStoreDataSource),
36
- ...loadFeature(features, TigerFeaturesNames.EnableCacheRetentionPolicy, "enableCacheRetentionPolicy", "BOOLEAN", FeatureFlagsValues.enableCacheRetentionPolicy),
37
- ...loadFeature(features, TigerFeaturesNames.EnableDenodoDataSource, "enableDenodoDataSource", "BOOLEAN", FeatureFlagsValues.enableDenodoDataSource),
38
- ...loadFeature(features, TigerFeaturesNames.EnableTrinoDataSource, "enableTrinoDataSource", "BOOLEAN", FeatureFlagsValues.enableTrinoDataSource),
39
- ...loadFeature(features, TigerFeaturesNames.EnableSavFileStorage, "enableSavFileStorage", "BOOLEAN", FeatureFlagsValues.enableSavFileStorage),
40
- ...loadFeature(features, TigerFeaturesNames.EnableOidcAuth, "enableOidcAuth", "BOOLEAN", FeatureFlagsValues.enableOidcAuth),
41
- ...loadFeature(features, TigerFeaturesNames.EnableSemanticSearch, "enableSemanticSearch", "BOOLEAN", FeatureFlagsValues.enableSemanticSearch),
42
- ...loadFeature(features, TigerFeaturesNames.EnableCatalogSmartSearchResults, "enableCatalogSmartSearchResults", "BOOLEAN", FeatureFlagsValues.enableCatalogSmartSearchResults),
43
- ...loadFeature(features, TigerFeaturesNames.EnableGenAICatalogQualityChecker, "enableGenAICatalogQualityChecker", "BOOLEAN", FeatureFlagsValues.enableGenAICatalogQualityChecker),
44
- ...loadFeature(features, TigerFeaturesNames.EnableCatalogTrendingObjects, "enableCatalogTrendingObjects", "BOOLEAN", FeatureFlagsValues.enableCatalogTrendingObjects),
45
- ...loadFeature(features, TigerFeaturesNames.EnableCatalogLineage, "enableCatalogLineage", "BOOLEAN", FeatureFlagsValues.enableCatalogLineage),
46
- ...loadFeature(features, TigerFeaturesNames.EnableCertification, "enableCertification", "BOOLEAN", FeatureFlagsValues.enableCertification),
47
- ...loadFeature(features, TigerFeaturesNames.EnableAIDataSetting, "enableAIDataSetting", "BOOLEAN", FeatureFlagsValues.enableAIDataSetting),
48
- ...loadFeature(features, TigerFeaturesNames.EnableSystemAccountFiltering, "enableSystemAccountFiltering", "BOOLEAN", FeatureFlagsValues.enableSystemAccountFiltering),
49
- ...loadFeature(features, TigerFeaturesNames.EnableNewInsightChangedPostMessageEvent, "enableNewInsightChangedPostMessageEvent", "BOOLEAN", FeatureFlagsValues.enableNewInsightChangedPostMessageEvent),
50
- ...loadFeature(features, TigerFeaturesNames.EarlyAccessFeatures, "earlyAccessFeatures", "JSON", FeatureFlagsValues.earlyAccessFeatures),
51
- ...loadFeature(features, TigerFeaturesNames.EnableDefaultSmtp, "enableDefaultSmtp", "BOOLEAN", FeatureFlagsValues.enableDefaultSmtp),
52
- ...loadFeature(features, TigerFeaturesNames.EnableVisualizationFilteringByTags, "enableVisualizationFilteringByTags", "BOOLEAN", FeatureFlagsValues.enableVisualizationFilteringByTags),
53
- ...loadFeature(features, TigerFeaturesNames.EnableVisualizationFineTuning, "enableVisualizationFineTuning", "BOOLEAN", FeatureFlagsValues.enableVisualizationFineTuning),
54
- ...loadFeature(features, TigerFeaturesNames.EnableDashboardTabularExport, "enableDashboardTabularExport", "BOOLEAN", FeatureFlagsValues.enableDashboardTabularExport),
55
- ...loadFeature(features, TigerFeaturesNames.EnableOrchestratedTabularExports, "enableOrchestratedTabularExports", "BOOLEAN", FeatureFlagsValues.enableOrchestratedTabularExports),
56
- ...loadFeature(features, TigerFeaturesNames.EnableDashboardDescriptionDynamicHeight, "enableDashboardDescriptionDynamicHeight", "BOOLEAN", FeatureFlagsValues.enableDashboardDescriptionDynamicHeight),
57
- ...loadFeature(features, TigerFeaturesNames.EnableExportTemplateSelection, "enableExportTemplateSelection", "BOOLEAN", FeatureFlagsValues.enableExportTemplateSelection),
58
- ...loadFeature(features, TigerFeaturesNames.EnableExportTemplatesSettingUi, "enableExportTemplatesSettingUi", "BOOLEAN", FeatureFlagsValues.enableExportTemplatesSettingUi),
59
- ...loadFeature(features, TigerFeaturesNames.EnableRawExports, "enableRawExports", "BOOLEAN", FeatureFlagsValues.enableRawExports),
60
- ...loadFeature(features, TigerFeaturesNames.EnableExecutionCancelling, "enableExecutionCancelling", "BOOLEAN", FeatureFlagsValues.enableExecutionCancelling),
61
- ...loadFeature(features, TigerFeaturesNames.EnableImmediateAttributeFilterDisplayAsLabelMigration, "enableImmediateAttributeFilterDisplayAsLabelMigration", "BOOLEAN", FeatureFlagsValues.enableImmediateAttributeFilterDisplayAsLabelMigration),
62
- ...loadFeature(features, TigerFeaturesNames.EnableAnalyticalDesignerCatalogSideload, "enableAnalyticalDesignerCatalogSideload", "BOOLEAN", FeatureFlagsValues.enableAnalyticalDesignerCatalogSideload),
63
- ...loadFeature(features, TigerFeaturesNames.EnableHighchartsAccessibility, "enableHighchartsAccessibility", "BOOLEAN", FeatureFlagsValues.enableHighchartsAccessibility),
64
- ...loadFeature(features, TigerFeaturesNames.EnableAccessibleChartTooltip, "enableAccessibleChartTooltip", "BOOLEAN", FeatureFlagsValues.enableAccessibleChartTooltip),
65
- ...loadFeature(features, TigerFeaturesNames.EnableWorkspaceSettingsAppHeaderMenuItem, "enableWorkspaceSettingsAppHeaderMenuItem", "BOOLEAN", FeatureFlagsValues.enableWorkspaceSettingsAppHeaderMenuItem),
66
- ...loadFeature(features, TigerFeaturesNames.EnableSnapshotExportAccessibility, "enableSnapshotExportAccessibility", "BOOLEAN", FeatureFlagsValues.enableSnapshotExportAccessibility),
67
- ...loadFeature(features, TigerFeaturesNames.EnableExportToDocumentStorage, "enableExportToDocumentStorage", "BOOLEAN", FeatureFlagsValues.enableExportToDocumentStorage),
68
- ...loadFeature(features, TigerFeaturesNames.EnableNotificationChannelIdentifiers, "enableNotificationChannelIdentifiers", "BOOLEAN", FeatureFlagsValues.enableNotificationChannelIdentifiers),
69
- ...loadFeature(features, TigerFeaturesNames.EnableDashboardShareDialogLink, "enableDashboardShareDialogLink", "BOOLEAN", FeatureFlagsValues.enableDashboardShareDialogLink),
70
- ...loadFeature(features, TigerFeaturesNames.EnableDashboardPartialRendering, "enableDashboardPartialRendering", "BOOLEAN", FeatureFlagsValues.enableDashboardPartialRendering),
71
- ...loadFeature(features, TigerFeaturesNames.ProductionFeatures, "productionFeatures", "JSON", FeatureFlagsValues.productionFeatures),
72
- ...loadFeature(features, TigerFeaturesNames.EnablePreAggregationDatasets, "enablePreAggregationDatasets", "BOOLEAN", FeatureFlagsValues.enablePreAggregationDatasets),
73
- ...loadFeature(features, TigerFeaturesNames.EnableNewPivotTable, "enableNewPivotTable", "BOOLEAN", FeatureFlagsValues.enableNewPivotTable),
74
- ...loadFeature(features, TigerFeaturesNames.EnableConditionalFormatting, "enableConditionalFormatting", "BOOLEAN", FeatureFlagsValues.enableConditionalFormatting),
75
- ...loadFeature(features, TigerFeaturesNames.EnableSemanticConditionalFormatting, "enableSemanticConditionalFormatting", "BOOLEAN", FeatureFlagsValues.enableSemanticConditionalFormatting),
76
- ...loadFeature(features, TigerFeaturesNames.EnableNewGeoPushpin, "enableNewGeoPushpin", "BOOLEAN", FeatureFlagsValues.enableNewGeoPushpin),
77
- ...loadFeature(features, TigerFeaturesNames.EnableGeoArea, "enableGeoArea", "BOOLEAN", FeatureFlagsValues.enableGeoArea),
78
- ...loadFeature(features, TigerFeaturesNames.EnableHLL, "enableHLL", "BOOLEAN", FeatureFlagsValues.enableHLL),
79
- ...loadFeature(features, TigerFeaturesNames.EnableGeoPushpinIcon, "enableGeoPushpinIcon", "BOOLEAN", FeatureFlagsValues.enableGeoPushpinIcon),
80
- ...loadFeature(features, TigerFeaturesNames.EnableGeoChartA11yImprovements, "enableGeoChartA11yImprovements", "BOOLEAN", FeatureFlagsValues.enableGeoChartA11yImprovements),
81
- ...loadFeature(features, TigerFeaturesNames.EnableGeoLayersExport, "enableGeoLayersExport", "BOOLEAN", FeatureFlagsValues.enableGeoLayersExport),
82
- ...loadFeature(features, TigerFeaturesNames.EnableGeoChartsViewportConfig, "enableGeoChartsViewportConfig", "BOOLEAN", FeatureFlagsValues.enableGeoChartsViewportConfig),
83
- ...loadFeature(features, TigerFeaturesNames.EnableGeoSegmentConflictRecommendation, "enableGeoSegmentConflictRecommendation", "BOOLEAN", FeatureFlagsValues.enableGeoSegmentConflictRecommendation),
84
- ...loadFeature(features, TigerFeaturesNames.EnableGeoBasemapConfig, "enableGeoBasemapConfig", "BOOLEAN", FeatureFlagsValues.enableGeoBasemapConfig),
85
- ...loadFeature(features, TigerFeaturesNames.EnableCustomGeoCollection, "enableCustomGeoCollection", "BOOLEAN", FeatureFlagsValues.enableCustomGeoCollection),
86
- ...loadFeature(features, TigerFeaturesNames.EnableGeoSatelliteBasemapOption, "enableGeoSatelliteBasemapOption", "BOOLEAN", FeatureFlagsValues.enableGeoSatelliteBasemapOption),
87
- ...loadFeature(features, TigerFeaturesNames.EnableGenAIMemory, "enableGenAIMemory", "BOOLEAN", FeatureFlagsValues.enableGenAIMemory),
88
- ...loadFeature(features, TigerFeaturesNames.EnableOrgLevelAIMemory, "enableOrgLevelAIMemory", "BOOLEAN", FeatureFlagsValues.enableOrgLevelAIMemory),
89
- ...loadFeature(features, TigerFeaturesNames.EnableAiAgenticSuggestions, "enableAiAgenticSuggestions", "BOOLEAN", FeatureFlagsValues.enableAiAgenticSuggestions),
90
- ...loadFeature(features, TigerFeaturesNames.EnableAiAssistantEmbedding, "enableAiAssistantEmbedding", "BOOLEAN", FeatureFlagsValues.enableAiAssistantEmbedding),
91
- ...loadFeature(features, TigerFeaturesNames.EnableAiAssistantChartsV2, "enableAiAssistantChartsV2", "BOOLEAN", FeatureFlagsValues.enableAiAssistantChartsV2),
92
- ...loadFeature(features, TigerFeaturesNames.EnableAiContextSetup, "enableAiContextSetup", "BOOLEAN", FeatureFlagsValues.enableAiContextSetup),
93
- ...loadFeature(features, TigerFeaturesNames.EnableGenAiDashboardBuilderSkill, "enableGenAiDashboardBuilderSkill", "BOOLEAN", FeatureFlagsValues.enableGenAiDashboardBuilderSkill),
94
- ...loadFeature(features, TigerFeaturesNames.EnableGenAiRightPanel, "enableGenAiRightPanel", "BOOLEAN", FeatureFlagsValues.enableGenAiRightPanel),
95
- ...loadFeature(features, TigerFeaturesNames.EnableAiAgenticMultiConversations, "enableAiAgenticMultiConversations", "BOOLEAN", FeatureFlagsValues.enableAiAgenticMultiConversations),
96
- ...loadFeature(features, TigerFeaturesNames.EnableGenAiReasoningEffort, "enableGenAiReasoningEffort", "BOOLEAN", FeatureFlagsValues.enableGenAiReasoningEffort),
97
- ...loadFeature(features, TigerFeaturesNames.EnableGenAiObservability, "enableGenAiObservability", "BOOLEAN", FeatureFlagsValues.enableGenAiObservability),
98
- ...loadFeature(features, TigerFeaturesNames.EnableGenAiInteractionIntelligence, "enableGenAiInteractionIntelligence", "BOOLEAN", FeatureFlagsValues.enableGenAiInteractionIntelligence),
99
- ...loadFeature(features, TigerFeaturesNames.EnableGenAiInteractionIntelligenceTimeline, "enableGenAiInteractionIntelligence_timeline", "BOOLEAN", FeatureFlagsValues.enableGenAiInteractionIntelligence_timeline),
100
- ...loadFeature(features, TigerFeaturesNames.EnableAiLlmAnthropicProvider, "enableAiLlmAnthropicProvider", "BOOLEAN", FeatureFlagsValues.enableAiLlmAnthropicProvider),
101
- ...loadFeature(features, TigerFeaturesNames.EnableGenAiAgenticDataShareOptOut, "enableGenAiAgenticDataShareOptOut", "BOOLEAN", FeatureFlagsValues.enableGenAiAgenticDataShareOptOut),
102
- ...loadFeature(features, TigerFeaturesNames.AIChatSearchLimit, "aiChatSearchLimit", "NUMBER", FeatureFlagsValues.aiChatSearchLimit),
103
- ...loadFeature(features, TigerFeaturesNames.EnableRichTextWidgetFilterConfiguration, "enableRichTextWidgetFilterConfiguration", "BOOLEAN", FeatureFlagsValues.enableRichTextWidgetFilterConfiguration),
104
- ...loadFeature(features, TigerFeaturesNames.EnableDashboardSectionHeadersDateDataSet, "enableDashboardSectionHeadersDateDataSet", "BOOLEAN", FeatureFlagsValues.enableDashboardSectionHeadersDateDataSet),
105
- ...loadFeature(features, TigerFeaturesNames.EnableAnalyticalDashboardVersion3, "enableAnalyticalDashboardVersion3", "BOOLEAN", FeatureFlagsValues.enableAnalyticalDashboardVersion3),
106
- ...loadFeature(features, TigerFeaturesNames.EnableAnomalyDetectionAlert, "enableAnomalyDetectionAlert", "BOOLEAN", FeatureFlagsValues.enableAnomalyDetectionAlert),
107
- ...loadFeature(features, TigerFeaturesNames.EnableAnomalyDetectionVisualization, "enableAnomalyDetectionVisualization", "BOOLEAN", FeatureFlagsValues.enableAnomalyDetectionVisualization),
108
- ...loadFeature(features, TigerFeaturesNames.EnableAlertOncePerInterval, "enableAlertOncePerInterval", "BOOLEAN", FeatureFlagsValues.enableAlertOncePerInterval),
109
- ...loadFeature(features, TigerFeaturesNames.EnableFiscalCalendars, "enableFiscalCalendars", "BOOLEAN", FeatureFlagsValues.enableFiscalCalendars),
110
- ...loadFeature(features, TigerFeaturesNames.EnableSecondGranularities, "enableSecondGranularities", "BOOLEAN", FeatureFlagsValues.enableSecondGranularities),
111
- ...loadFeature(features, TigerFeaturesNames.EnableImprovedMetricDateFilter, "enableImprovedMetricDateFilter", "BOOLEAN", FeatureFlagsValues.enableImprovedMetricDateFilter),
112
- ...loadFeature(features, TigerFeaturesNames.EnableDashboardFilterGroups, "enableDashboardFilterGroups", "BOOLEAN", FeatureFlagsValues.enableDashboardFilterGroups),
113
- ...loadFeature(features, TigerFeaturesNames.EnableDashboardTimezone, "enableDashboardTimezone", "BOOLEAN", FeatureFlagsValues.enableDashboardTimezone),
114
- ...loadFeature(features, TigerFeaturesNames.EnableMeasureValueFilterKD, "enableMeasureValueFilterKD", "BOOLEAN", FeatureFlagsValues.enableMeasureValueFilterKD),
115
- ...loadFeature(features, TigerFeaturesNames.EnableShellApplication, "enableShellApplication", "BOOLEAN", FeatureFlagsValues.enableShellApplication),
116
- ...loadFeature(features, TigerFeaturesNames.EnableShellApplicationDashboards, "enableShellApplication_dashboards", "BOOLEAN", FeatureFlagsValues.enableShellApplication_dashboards),
117
- ...loadFeature(features, TigerFeaturesNames.EnableLogicalModelExtensionsFromParentsCall, "enableLogicalModelExtensionsFromParentsCall", "BOOLEAN", FeatureFlagsValues.enableLogicalModelExtensionsFromParentsCall),
118
- ...loadFeature(features, TigerFeaturesNames.EnableDashboardDensitySetting, "enableDashboardDensitySetting", "BOOLEAN", FeatureFlagsValues.enableDashboardDensitySetting),
119
- ...loadFeature(features, TigerFeaturesNames.EnableDashboardsSearch, "enableDashboardsSearch", "BOOLEAN", FeatureFlagsValues.enableDashboardsSearch),
120
- ...loadFeature(features, TigerFeaturesNames.EnableAgentInstructions, "enableAgentInstructions", "BOOLEAN", FeatureFlagsValues.enableAgentInstructions),
121
- ...loadFeature(features, TigerFeaturesNames.EnableAutomationTrigger, "enableAutomationTrigger", "BOOLEAN", FeatureFlagsValues.enableAutomationTrigger),
122
- ...loadFeature(features, TigerFeaturesNames.EnableUserDataFiltersUi, "enableUserDataFiltersUi", "BOOLEAN", FeatureFlagsValues.enableUserDataFiltersUi),
123
- ...loadFeature(features, TigerFeaturesNames.EnableEnhancedInsightPicker, "enableEnhancedInsightPicker", "BOOLEAN", FeatureFlagsValues.enableEnhancedInsightPicker),
124
- ...loadFeature(features, TigerFeaturesNames.EnableDashboardVisualizationDelete, "enableDashboardVisualizationDelete", "BOOLEAN", FeatureFlagsValues.enableDashboardVisualizationDelete),
125
- ...loadFeature(features, TigerFeaturesNames.EnableDashboardSidebarResize, "enableDashboardSidebarResize", "BOOLEAN", FeatureFlagsValues.enableDashboardSidebarResize),
126
- ...loadFeature(features, TigerFeaturesNames.EnableCollapsibleLeftSidebar, "enableCollapsibleLeftSidebar", "BOOLEAN", FeatureFlagsValues.enableCollapsibleLeftSidebar),
127
- ...loadFeature(features, TigerFeaturesNames.EnableExportTimeoutFix, "enableExportTimeoutFix", "BOOLEAN", FeatureFlagsValues.enableExportTimeoutFix),
128
- ...loadFeature(features, TigerFeaturesNames.EnableDashboardPersistentFiltersAcrossTabs, "enableDashboardPersistentFiltersAcrossTabs", "BOOLEAN", FeatureFlagsValues.enableDashboardPersistentFiltersAcrossTabs),
129
- ...loadFeature(features, TigerFeaturesNames.EnableAbsoluteDateFilterGranularity, "enableAbsoluteDateFilterGranularity", "BOOLEAN", FeatureFlagsValues.enableAbsoluteDateFilterGranularity),
130
- ...loadFeature(features, TigerFeaturesNames.EnableComputedAttributes, "enableComputedAttributes", "BOOLEAN", FeatureFlagsValues.enableComputedAttributes),
131
- ...loadFeature(features, TigerFeaturesNames.EnableBusinessBriefingReportsApp, "enableBusinessBriefingReportsApp", "BOOLEAN", FeatureFlagsValues.enableBusinessBriefingReportsApp),
132
- ...loadFeature(features, TigerFeaturesNames.EnableReportsSubsections, "enableReportsSubsections", "BOOLEAN", FeatureFlagsValues.enableReportsSubsections),
133
- ...loadFeature(features, TigerFeaturesNames.EnablePublisherV2, "enablePublisherV2", "BOOLEAN", FeatureFlagsValues.enablePublisherV2),
134
- ...loadFeature(features, TigerFeaturesNames.EnableGenAiReportTakeaways, "enableGenAiReportTakeaways", "BOOLEAN", FeatureFlagsValues.enableGenAiReportTakeaways),
135
- ...loadFeature(features, TigerFeaturesNames.EnableEmbeddingWriteCommands, "enableEmbeddingWriteCommands", "BOOLEAN", FeatureFlagsValues.enableEmbeddingWriteCommands),
136
- ...loadFeature(features, TigerFeaturesNames.EnableLocalizationOverview, "enableLocalizationOverview", "BOOLEAN", FeatureFlagsValues.enableLocalizationOverview),
137
- ...loadFeature(features, TigerFeaturesNames.EnableUserLanguageChange, "enableUserLanguageChange", "BOOLEAN", FeatureFlagsValues.enableUserLanguageChange),
138
- };
139
- }
140
- function loadFeature(features, feature, name, outputType, possibleValues) {
141
- const item = features[feature];
142
- if (!item) {
143
- return {};
5
+ const result = { ...LocalFeatureFlagOverrides };
6
+ for (const [name, definition] of Object.entries(TigerFeatureDefinitions)) {
7
+ if (Object.hasOwn(LocalFeatureFlagOverrides, name))
8
+ continue;
9
+ const item = features[name];
10
+ if (!item)
11
+ continue;
12
+ const value = getValueByType(item.type, item.value, definition.type);
13
+ if (value !== undefined)
14
+ Object.assign(result, { [name]: value });
144
15
  }
145
- const val = getValueByType(item.type, item.value, outputType, possibleValues);
146
- return val === undefined ? {} : { [name]: val };
16
+ return result;
147
17
  }
148
- function getValueByType(inputType, value, outputType, possibleValues) {
18
+ function getValueByType(inputType, value, outputType) {
149
19
  switch (inputType) {
150
20
  case "BOOLEAN":
151
21
  if (value !== undefined) {
@@ -154,6 +24,7 @@ function getValueByType(inputType, value, outputType, possibleValues) {
154
24
  break;
155
25
  case "NUMBER":
156
26
  case "STRING": {
27
+ const possibleValues = outputType === "BOOLEAN" ? [true, false] : [];
157
28
  const state = convertState(outputType, possibleValues, value);
158
29
  if (state !== undefined) {
159
30
  return state;
@@ -1 +1 @@
1
- {"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../../../src/backend/features/hub.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAErF,OAAO,EAAuB,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,EAAE,KAAK,UAAU,EAAiC,MAAM,cAAc,CAAC;AAa9E,wBAAsB,qBAAqB,CACvC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,EAC/B,SAAS,GAAE,OAAO,CAAC,cAAc,CAAM,GACxC,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAWtC;AAgDD,MAAM,MAAM,kBAAkB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,UAAU,EAAE,CAAC;CAC1B,EAAE,CAAC"}
1
+ {"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../../../src/backend/features/hub.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAErF,OAAO,EAAuB,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,EAAE,KAAK,UAAU,EAAiC,MAAM,cAAc,CAAC;AAa9E,wBAAsB,qBAAqB,CACvC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,EAC/B,SAAS,GAAE,OAAO,CAAC,cAAc,CAAM,GACxC,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAWtC;AA+CD,MAAM,MAAM,kBAAkB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,UAAU,EAAE,CAAC;CAC1B,EAAE,CAAC"}
@@ -16,8 +16,6 @@ export async function getFeatureHubFeatures(features, wsContext = {}) {
16
16
  }
17
17
  return DefaultFeatureFlags;
18
18
  }
19
- //NOTE: Use FeatureHub SDK after we upgrade version of typescript
20
- // - more info in ticket RAIL-4279
21
19
  async function loadHubFeatures(configuration, context, state) {
22
20
  const { host, key } = configuration;
23
21
  return new Promise((resolve, reject) => {
@@ -26,7 +24,8 @@ async function loadHubFeatures(configuration, context, state) {
26
24
  reject(new Error(`FeatureHub is not ready, is not available or api key is wrong.`));
27
25
  }
28
26
  const promise = getFeatureHubData(host, key, context, state[key]);
29
- void promise.then(({ data, headers, status }) => {
27
+ void promise
28
+ .then(({ data, headers, status }) => {
30
29
  if (status === 304) {
31
30
  loadFeatures(state[key].data, resolve, callFailed);
32
31
  return;
@@ -36,8 +35,8 @@ async function loadHubFeatures(configuration, context, state) {
36
35
  data: data || [],
37
36
  };
38
37
  loadFeatures(data, resolve, callFailed);
39
- });
40
- promise.catch(callFailed);
38
+ })
39
+ .catch(callFailed);
41
40
  });
42
41
  }
43
42
  function loadFeatures(data, resolveFn, errFn) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backend/features/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EAGnB,KAAK,YAAY,EACpB,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAuB,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAiBhF,qBAAa,oBAAoB;IACjB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAArC,YAA6B,QAAQ,EAAE,2BAA2B,EAAI;IAEzD,WAAW,CACpB,OAAO,CAAC,EAAE,YAAY,EACtB,SAAS,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GACpC,OAAO,CAAC,kBAAkB,CAAC,CAoB7B;CACJ;AA0BD,wBAAgB,WAAW,CACvB,UAAU,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,SAAS,EACrD,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,YAAY,EAAE,cAAc,EAAE,EAC9B,YAAY,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,cAAc,CAAC,CAyBzB;AAED,eAAO,MAAM,mBAAmB,kBAAkB,cAAc,EAAE,uBAIjE,CAAC;AAEF,eAAO,MAAM,2BAA2B,kBAAkB,cAAc,EAAE,YAMzE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backend/features/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EAGnB,KAAK,YAAY,EACpB,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAuB,KAAK,kBAAkB,EAA6B,MAAM,kBAAkB,CAAC;AAiB3G,qBAAa,oBAAoB;IACjB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAArC,YAA6B,QAAQ,EAAE,2BAA2B,EAAI;IAEzD,WAAW,CACpB,OAAO,CAAC,EAAE,YAAY,EACtB,SAAS,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GACpC,OAAO,CAAC,kBAAkB,CAAC,CAoB7B;CACJ;AA0BD,wBAAgB,WAAW,CACvB,UAAU,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,SAAS,EACrD,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,YAAY,EAAE,cAAc,EAAE,EAC9B,YAAY,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,cAAc,CAAC,CAyBzB;AAED,eAAO,MAAM,mBAAmB,kBAAkB,cAAc,EAAE,uBAIjE,CAAC;AAEF,eAAO,MAAM,2BAA2B,kBAAkB,cAAc,EAAE,YAMzE,CAAC"}
@@ -2,7 +2,7 @@
2
2
  import { LRUCache } from "lru-cache";
3
3
  import { ProfileApi_GetCurrent } from "@gooddata/api-client-tiger/endpoints/profile";
4
4
  import { LIB_VERSION } from "../../__version.js";
5
- import { DefaultFeatureFlags } from "../uiFeatures.js";
5
+ import { DefaultFeatureFlags, LocalFeatureFlagOverrides } from "../uiFeatures.js";
6
6
  import { getFeatureHubFeatures } from "./hub.js";
7
7
  import { getStaticFeatures } from "./static.js";
8
8
  const getKeyFromContext = (wsContext) => {
@@ -21,20 +21,21 @@ export class TigerFeaturesService {
21
21
  ...wsContext,
22
22
  jsSdkVersion: LIB_VERSION,
23
23
  };
24
- const cachedResponse = responseMap.get(getKeyFromContext(contextWithVersion));
25
- if (cachedResponse) {
26
- return cachedResponse;
24
+ // A changed or removed local override must not reuse a previously forced value.
25
+ const key = JSON.stringify([
26
+ getKeyFromContext(contextWithVersion),
27
+ Object.entries(LocalFeatureFlagOverrides),
28
+ ]);
29
+ let response = responseMap.get(key);
30
+ if (!response) {
31
+ response = this.authCall(async (client) => {
32
+ const prof = profile || (await ProfileApi_GetCurrent(client.axios));
33
+ const results = await loadFeatures(prof, contextWithVersion);
34
+ return { ...DefaultFeatureFlags, ...results };
35
+ });
36
+ responseMap.set(key, response);
27
37
  }
28
- const response = this.authCall(async (client) => {
29
- const prof = profile || (await ProfileApi_GetCurrent(client.axios));
30
- const results = await loadFeatures(prof, contextWithVersion);
31
- return {
32
- ...DefaultFeatureFlags,
33
- ...results,
34
- };
35
- });
36
- responseMap.set(getKeyFromContext(contextWithVersion), response);
37
- return response;
38
+ return { ...(await response), ...LocalFeatureFlagOverrides };
38
39
  }
39
40
  }
40
41
  async function loadFeatures(profile, wsContext = {}) {
@@ -1 +1 @@
1
- {"version":3,"file":"aggregate.d.ts","sourceRoot":"","sources":["../../../src/backend/localization/aggregate.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EAErC,KAAK,6BAA6B,EAElC,KAAK,kBAAkB,EAEvB,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAEhC,KAAK,uBAAuB,EAC5B,KAAK,iCAAiC,EAEtC,KAAK,uBAAuB,EAC/B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAEH,KAAK,cAAc,EACnB,KAAK,iBAAiB,EAEzB,MAA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,CA4BnE;AAED,wBAAgB,UAAU,CACtB,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,2BAA2B,GACnC;IAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAqBzD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,gCAAgC,EAAE,GAAG,uBAAuB,CAYnG;AAED,wBAAgB,cAAc,CAC1B,IAAI,EAAE,gCAAgC,EAAE,EACxC,KAAK,EAAE,sBAAsB,GAC9B;IAAE,UAAU,EAAE,gCAAgC,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAExE;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,gBAAgB,CAIpE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,GAAG,gBAAgB,CAOxG"}
@@ -10,24 +10,53 @@ const SOURCE_STRENGTH = [
10
10
  ];
11
11
  const DEFAULT_PAGE_SIZE = 100;
12
12
  const TRANSLATED_SETTINGS = ["METADATA_LOCALE", "DATA_LOCALE"];
13
- const TRANSLATION_STATES = ["missing", "available"];
13
+ const TRANSLATION_USAGE_SETTINGS = ["LOCALE", ...TRANSLATED_SETTINGS];
14
+ function isEnglish(code) {
15
+ return code === "en" || code.startsWith("en-");
16
+ }
17
+ function languageOf(code) {
18
+ try {
19
+ return new Intl.Locale(code).language;
20
+ }
21
+ catch {
22
+ return undefined;
23
+ }
24
+ }
25
+ function hasSameLanguage(locales, code) {
26
+ const language = languageOf(code);
27
+ return !!language && [...locales].some((locale) => languageOf(locale) === language);
28
+ }
14
29
  // Workspaces outside the scope still count for the people who can open them.
15
30
  function translationState(scope, settings, workspaceIds, value, setting) {
16
- const translated = (workspaceId) => scope.translatedLocales?.(workspaceId, setting).has(value);
31
+ if (isEnglish(value)) {
32
+ return undefined;
33
+ }
34
+ const localesOf = (workspaceId, translated) => scope.translatedLocales?.(workspaceId, translated) ?? new Set();
35
+ if (setting === "LOCALE") {
36
+ return settings.LOCALE?.content.value === value &&
37
+ workspaceIds.some((workspaceId) => !localesOf(workspaceId, "METADATA_LOCALE").has(value))
38
+ ? "missing"
39
+ : undefined;
40
+ }
17
41
  if (settings[setting]?.content.value === value) {
18
- return workspaceIds.some((workspaceId) => !translated(workspaceId)) ? "missing" : undefined;
42
+ const untranslated = workspaceIds.filter((workspaceId) => !localesOf(workspaceId, setting).has(value));
43
+ if (untranslated.length === 0) {
44
+ return undefined;
45
+ }
46
+ return untranslated.every((workspaceId) => hasSameLanguage(localesOf(workspaceId, setting), value))
47
+ ? "variant"
48
+ : "missing";
19
49
  }
20
50
  if (settings.LOCALE?.content.value === value) {
21
- return workspaceIds.some(translated) ? "available" : undefined;
51
+ return workspaceIds.some((workspaceId) => localesOf(workspaceId, setting).has(value))
52
+ ? "available"
53
+ : undefined;
22
54
  }
23
55
  return undefined;
24
56
  }
25
- function isTranslationSetting(setting) {
26
- return setting === "METADATA_LOCALE" || setting === "DATA_LOCALE";
27
- }
28
57
  function matchesTranslation(scope, settings, workspaceIds, query) {
29
58
  const { value, setting } = query;
30
- if (value === undefined || !isTranslationSetting(setting)) {
59
+ if (value === undefined || setting === undefined) {
31
60
  return undefined;
32
61
  }
33
62
  return translationState(scope, settings, workspaceIds, value, setting) === query.translation
@@ -42,11 +71,8 @@ export function translationUsage(scope) {
42
71
  entry = { content: { value }, bySetting: {} };
43
72
  entries.set(value, entry);
44
73
  }
45
- const bySetting = (entry.bySetting[setting] ??= {
46
- missing: { workspaces: 0, users: 0 },
47
- available: { workspaces: 0, users: 0 },
48
- });
49
- return bySetting[state];
74
+ const bySetting = (entry.bySetting[setting] ??= {});
75
+ return (bySetting[state] ??= { workspaces: 0, users: 0 });
50
76
  };
51
77
  const subjects = [
52
78
  ...scope.workspaces.map((workspace) => ({
@@ -65,7 +91,7 @@ export function translationUsage(scope) {
65
91
  .map((setting) => setting?.content.value)
66
92
  .filter((value) => !!value));
67
93
  for (const value of values) {
68
- for (const setting of TRANSLATED_SETTINGS) {
94
+ for (const setting of TRANSLATION_USAGE_SETTINGS) {
69
95
  const state = translationState(scope, subject.settings, subject.workspaceIds, value, setting);
70
96
  if (state) {
71
97
  countOf(value, setting, state)[subject.kind] += 1;
@@ -73,15 +99,6 @@ export function translationUsage(scope) {
73
99
  }
74
100
  }
75
101
  }
76
- for (const entry of entries.values()) {
77
- for (const setting of TRANSLATED_SETTINGS) {
78
- const counts = entry.bySetting[setting];
79
- if (counts &&
80
- TRANSLATION_STATES.every((state) => counts[state].workspaces + counts[state].users === 0)) {
81
- delete entry.bySetting[setting];
82
- }
83
- }
84
- }
85
102
  return { values: [...entries.values()] };
86
103
  }
87
104
  export function translatedLocalesOf(workspaces, statistics) {