@commercetools-uikit/localized-utils 15.0.0 → 15.1.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.
|
@@ -185,7 +185,7 @@ var isTouched = function isTouched(touched) {
|
|
|
185
185
|
};
|
|
186
186
|
|
|
187
187
|
// NOTE: This string will be replaced on build time with the package version.
|
|
188
|
-
var version = "15.
|
|
188
|
+
var version = "15.1.2";
|
|
189
189
|
|
|
190
190
|
exports.createLocalizedDataAttributes = createLocalizedDataAttributes;
|
|
191
191
|
exports.createLocalizedString = createLocalizedString;
|
|
@@ -183,7 +183,7 @@ var isTouched = function isTouched(touched) {
|
|
|
183
183
|
};
|
|
184
184
|
|
|
185
185
|
// NOTE: This string will be replaced on build time with the package version.
|
|
186
|
-
var version = "15.
|
|
186
|
+
var version = "15.1.2";
|
|
187
187
|
|
|
188
188
|
exports.createLocalizedDataAttributes = createLocalizedDataAttributes;
|
|
189
189
|
exports.createLocalizedString = createLocalizedString;
|
|
@@ -161,6 +161,6 @@ var isTouched = function isTouched(touched) {
|
|
|
161
161
|
};
|
|
162
162
|
|
|
163
163
|
// NOTE: This string will be replaced on build time with the package version.
|
|
164
|
-
var version = "15.
|
|
164
|
+
var version = "15.1.2";
|
|
165
165
|
|
|
166
166
|
export { createLocalizedDataAttributes, createLocalizedString, getHasErrorOnRemainingLanguages, getHasWarningOnRemainingLanguages, getId, getName, getPrimaryLanguage, isEmpty, isTouched, omitEmptyTranslations, sortLanguages, splitLanguages, version };
|
|
@@ -10,16 +10,16 @@ declare type TSplittedLanguageGroups = {
|
|
|
10
10
|
related: string[];
|
|
11
11
|
unrelated: string[];
|
|
12
12
|
};
|
|
13
|
-
export declare const getId: (idPrefix?: string
|
|
14
|
-
export declare const getName: (namePrefix?: string
|
|
13
|
+
export declare const getId: (idPrefix?: string, language?: string) => string | undefined;
|
|
14
|
+
export declare const getName: (namePrefix?: string, language?: string) => string | undefined;
|
|
15
15
|
export declare const getPrimaryLanguage: (language: string) => string;
|
|
16
16
|
export declare const splitLanguages: (selectedLanguage: string, languages: string[]) => TSplittedLanguageGroups;
|
|
17
17
|
export declare const sortLanguages: (selectedLanguage: string, allLanguages: string[]) => string[];
|
|
18
18
|
export declare const createLocalizedDataAttributes: <TProps extends {}>(props: TProps, language: string) => TLocalizedDataAttributes;
|
|
19
|
-
export declare const getHasErrorOnRemainingLanguages: <TErrors extends {}>(errors?: TErrors | undefined, selectedLanguage?: string
|
|
20
|
-
export declare const getHasWarningOnRemainingLanguages: <TWarnings extends {}>(warnings?: TWarnings | undefined, selectedLanguage?: string
|
|
19
|
+
export declare const getHasErrorOnRemainingLanguages: <TErrors extends {}>(errors?: TErrors | undefined, selectedLanguage?: string) => boolean;
|
|
20
|
+
export declare const getHasWarningOnRemainingLanguages: <TWarnings extends {}>(warnings?: TWarnings | undefined, selectedLanguage?: string) => boolean;
|
|
21
21
|
export declare const createLocalizedString: (languages: string[], existingTranslations?: TLocalizedString) => TLocalizedString;
|
|
22
|
-
export declare const isEmpty: (localizedString?: TLocalizedString
|
|
22
|
+
export declare const isEmpty: (localizedString?: TLocalizedString) => boolean;
|
|
23
23
|
export declare const omitEmptyTranslations: <TTranslations extends TLocalizedString>(localizedString: TTranslations) => TLocalizedString;
|
|
24
|
-
export declare const isTouched: (touched?: TTouchedLocalizedString
|
|
24
|
+
export declare const isTouched: (touched?: TTouchedLocalizedString) => boolean;
|
|
25
25
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/localized-utils",
|
|
3
3
|
"description": "Utilities to work with localized data.",
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.1.2",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.17.2",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.17.2",
|
|
24
|
-
"@commercetools-uikit/utils": "15.
|
|
24
|
+
"@commercetools-uikit/utils": "15.1.2",
|
|
25
25
|
"lodash": "4.17.21"
|
|
26
26
|
}
|
|
27
27
|
}
|