@gooddata/sdk-ui 11.2.0-alpha.1 → 11.2.0-alpha.2
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/esm/base/localization/IntlWrapper.d.ts.map +1 -1
- package/esm/base/localization/IntlWrapper.js +1 -7
- package/esm/base/localization/IntlWrapper.js.map +1 -1
- package/esm/base/localization/TranslationsCustomizationProvider/utils.d.ts +3 -4
- package/esm/base/localization/TranslationsCustomizationProvider/utils.d.ts.map +1 -1
- package/esm/base/localization/TranslationsCustomizationProvider/utils.js +5 -6
- package/esm/base/localization/TranslationsCustomizationProvider/utils.js.map +1 -1
- package/esm/sdk-ui.d.ts +3 -3
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlWrapper.d.ts","sourceRoot":"","sources":["../../../src/base/localization/IntlWrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"IntlWrapper.d.ts","sourceRoot":"","sources":["../../../src/base/localization/IntlWrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAS3C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,MAAsB,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAWlF"}
|
|
@@ -10,13 +10,7 @@ import { pickCorrectWording } from "./TranslationsCustomizationProvider/utils.js
|
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
12
|
export function IntlWrapper({ locale = DefaultLocale, children }) {
|
|
13
|
-
|
|
14
|
-
* Because of issues described in the ticket FET-855, we decided to use this workaround.
|
|
15
|
-
* After the issues that are described in the ticket are solved or at least reduced,
|
|
16
|
-
* this workaround can be removed.
|
|
17
|
-
*/
|
|
18
|
-
const settings = window.gdSettings;
|
|
19
|
-
const messages = useMemo(() => pickCorrectWording(resolveLocaleDefaultMessages(locale, messagesMap), settings), [locale, settings]);
|
|
13
|
+
const messages = useMemo(() => pickCorrectWording(resolveLocaleDefaultMessages(locale, messagesMap)), [locale]);
|
|
20
14
|
return (_jsx(IntlProvider, { locale: locale, messages: messages, children: children }));
|
|
21
15
|
}
|
|
22
16
|
//# sourceMappingURL=IntlWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlWrapper.js","sourceRoot":"","sources":["../../../src/base/localization/IntlWrapper.tsx"],"names":[],"mappings":";AAAA,qCAAqC;AAErC,OAAO,EAAa,OAAO,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"IntlWrapper.js","sourceRoot":"","sources":["../../../src/base/localization/IntlWrapper.tsx"],"names":[],"mappings":";AAAA,qCAAqC;AAErC,OAAO,EAAa,OAAO,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAUlF;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,MAAM,GAAG,aAAa,EAAE,QAAQ,EAAqB;IAC/E,MAAM,QAAQ,GAAG,OAAO,CACpB,GAAG,EAAE,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,EAC3E,CAAC,MAAM,CAAC,CACX,CAAC;IAEF,OAAO,CACH,KAAC,YAAY,IAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,YAC3C,QAAQ,GACE,CAClB,CAAC;AACN,CAAC"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { IWorkspaceSettings } from "@gooddata/sdk-backend-spi";
|
|
2
1
|
/**
|
|
3
2
|
* @internal
|
|
4
3
|
*/
|
|
5
|
-
export declare const pickCorrectMetricWordingInner: (translations: Record<string, string
|
|
4
|
+
export declare const pickCorrectMetricWordingInner: (translations: Record<string, string>) => Record<string, string>;
|
|
6
5
|
/**
|
|
7
6
|
* The function to pick correct wording 'measure' or 'metric'
|
|
8
7
|
* @beta
|
|
9
8
|
*/
|
|
10
|
-
export declare const pickCorrectMetricWording: (translations: Record<string, string
|
|
9
|
+
export declare const pickCorrectMetricWording: (translations: Record<string, string>) => Record<string, string>;
|
|
11
10
|
/**
|
|
12
11
|
* @beta
|
|
13
12
|
*/
|
|
14
|
-
export declare const pickCorrectWording: (translations: Record<string, string
|
|
13
|
+
export declare const pickCorrectWording: (translations: Record<string, string>) => Record<string, string>;
|
|
15
14
|
/**
|
|
16
15
|
* The function to remove all translation keys that contain special suffixes "._measure" or "._metric"
|
|
17
16
|
* @beta
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/base/localization/TranslationsCustomizationProvider/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/base/localization/TranslationsCustomizationProvider/utils.ts"],"names":[],"mappings":"AAYA;;GAEG;AACH,eAAO,MAAM,6BAA6B,GACtC,cAAc,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACrC,MAAM,CAAC,MAAM,EAAE,MAAM,CAYvB,CAAC;AAQF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,cAAc,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAEpG,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,cAAc,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CACrD,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,6CAA6C,GACtD,cAAc,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACrC,MAAM,CAAC,MAAM,EAAE,MAAM,CAKnB,CAAC"}
|
|
@@ -9,11 +9,11 @@ const getNewKey = (key, stringToRemove) => key.replace(stringToRemove, "");
|
|
|
9
9
|
/**
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
|
-
export const pickCorrectMetricWordingInner = (translations
|
|
12
|
+
export const pickCorrectMetricWordingInner = (translations) => {
|
|
13
13
|
const modifiedTranslations = {};
|
|
14
14
|
Object.keys(translations).forEach((key) => {
|
|
15
15
|
if (key.includes("._metric") || key.includes("._measure")) {
|
|
16
|
-
const newKey = getNewKey(key,
|
|
16
|
+
const newKey = getNewKey(key, "._metric");
|
|
17
17
|
modifiedTranslations[newKey] = translations[key];
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -31,14 +31,13 @@ const memoizedPickCorrectMetricWordingInner = memoizeOne(pickCorrectMetricWordin
|
|
|
31
31
|
* The function to pick correct wording 'measure' or 'metric'
|
|
32
32
|
* @beta
|
|
33
33
|
*/
|
|
34
|
-
export const pickCorrectMetricWording = (translations
|
|
35
|
-
|
|
36
|
-
return memoizedPickCorrectMetricWordingInner(translations, isEnabledRenamingMeasureToMetric);
|
|
34
|
+
export const pickCorrectMetricWording = (translations) => {
|
|
35
|
+
return memoizedPickCorrectMetricWordingInner(translations);
|
|
37
36
|
};
|
|
38
37
|
/**
|
|
39
38
|
* @beta
|
|
40
39
|
*/
|
|
41
|
-
export const pickCorrectWording = (translations
|
|
40
|
+
export const pickCorrectWording = (translations) => pickCorrectMetricWording(translations);
|
|
42
41
|
/**
|
|
43
42
|
* The function to remove all translation keys that contain special suffixes "._measure" or "._metric"
|
|
44
43
|
* @beta
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/base/localization/TranslationsCustomizationProvider/utils.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,OAAO,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/base/localization/TranslationsCustomizationProvider/utils.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,OAAO,MAAM,aAAa,CAAC;AAElC,4FAA4F;AAC5F,8GAA8G;AAC9G,+EAA+E;AAC/E,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;AAE1C,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,cAAsB,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;AAE3F;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CACzC,YAAoC,EACd,EAAE;IACxB,MAAM,oBAAoB,GAA2B,EAAE,CAAC;IACxD,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACtC,IAAI,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YACxD,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;YAC1C,oBAAoB,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QACrD,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO;QACH,GAAG,YAAY;QACf,GAAG,oBAAoB;KAC1B,CAAC;AACN,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,qCAAqC,GAAG,UAAU,CAAC,6BAA6B,CAAC,CAAC;AAExF;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,YAAoC,EAA0B,EAAE;IACrG,OAAO,qCAAqC,CAAC,YAAY,CAAC,CAAC;AAC/D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,YAAoC,EAA0B,EAAE,CAC/F,wBAAwB,CAAC,YAAY,CAAC,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,6CAA6C,GAAG,CACzD,YAAoC,EACd,EAAE,CACxB,MAAM,CAAC,WAAW,CACd,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,MAAM,CAC/B,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CACrE,CACJ,CAAC"}
|
package/esm/sdk-ui.d.ts
CHANGED
|
@@ -5217,17 +5217,17 @@ export declare const OverTimeComparisonTypes: {
|
|
|
5217
5217
|
* The function to pick correct wording 'measure' or 'metric'
|
|
5218
5218
|
* @beta
|
|
5219
5219
|
*/
|
|
5220
|
-
export declare const pickCorrectMetricWording: (translations: Record<string, string
|
|
5220
|
+
export declare const pickCorrectMetricWording: (translations: Record<string, string>) => Record<string, string>;
|
|
5221
5221
|
|
|
5222
5222
|
/**
|
|
5223
5223
|
* @internal
|
|
5224
5224
|
*/
|
|
5225
|
-
export declare const pickCorrectMetricWordingInner: (translations: Record<string, string
|
|
5225
|
+
export declare const pickCorrectMetricWordingInner: (translations: Record<string, string>) => Record<string, string>;
|
|
5226
5226
|
|
|
5227
5227
|
/**
|
|
5228
5228
|
* @beta
|
|
5229
5229
|
*/
|
|
5230
|
-
export declare const pickCorrectWording: (translations: Record<string, string
|
|
5230
|
+
export declare const pickCorrectWording: (translations: Record<string, string>) => Record<string, string>;
|
|
5231
5231
|
|
|
5232
5232
|
/**
|
|
5233
5233
|
* Wrap each member of the union type in AnyPlaceholder.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui",
|
|
3
|
-
"version": "11.2.0-alpha.
|
|
3
|
+
"version": "11.2.0-alpha.2",
|
|
4
4
|
"description": "GoodData.UI SDK - Core",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"ts-invariant": "^0.7.5",
|
|
45
45
|
"tslib": "2.8.1",
|
|
46
46
|
"uuid": "^11.1.0",
|
|
47
|
-
"@gooddata/sdk-backend-spi": "11.2.0-alpha.
|
|
48
|
-
"@gooddata/sdk-model": "11.2.0-alpha.
|
|
49
|
-
"@gooddata/util": "11.2.0-alpha.
|
|
47
|
+
"@gooddata/sdk-backend-spi": "11.2.0-alpha.2",
|
|
48
|
+
"@gooddata/sdk-model": "11.2.0-alpha.2",
|
|
49
|
+
"@gooddata/util": "11.2.0-alpha.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@gooddata/eslint-config": "^4.1.1",
|
|
@@ -92,10 +92,10 @@
|
|
|
92
92
|
"typescript": "5.8.3",
|
|
93
93
|
"vitest": "3.2.4",
|
|
94
94
|
"vitest-dom": "0.1.1",
|
|
95
|
-
"@gooddata/i18n-toolkit": "11.2.0-alpha.
|
|
96
|
-
"@gooddata/reference-workspace": "11.2.0-alpha.
|
|
97
|
-
"@gooddata/sdk-backend-base": "11.2.0-alpha.
|
|
98
|
-
"@gooddata/sdk-backend-mockingbird": "11.2.0-alpha.
|
|
95
|
+
"@gooddata/i18n-toolkit": "11.2.0-alpha.2",
|
|
96
|
+
"@gooddata/reference-workspace": "11.2.0-alpha.2",
|
|
97
|
+
"@gooddata/sdk-backend-base": "11.2.0-alpha.2",
|
|
98
|
+
"@gooddata/sdk-backend-mockingbird": "11.2.0-alpha.2"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"react": "^18.0.0 || ^19.0.0",
|