@transferwise/components 0.0.0-experimental-bb03a6a → 0.0.0-experimental-6d4124a
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 +1 -1
- package/build/i18n/{cs.json → cs-CZ.json} +10 -3
- package/build/i18n/{de.json → de-DE.json} +10 -3
- package/{src/i18n/es.json → build/i18n/es-ES.json} +10 -3
- package/{src/i18n/fr.json → build/i18n/fr-FR.json} +10 -3
- package/{src/i18n/hu.json → build/i18n/hu-HU.json} +10 -3
- package/{src/i18n/id.json → build/i18n/id-ID.json} +10 -3
- package/build/i18n/{it.json → it-IT.json} +10 -3
- package/build/i18n/{ja.json → ja-JP.json} +10 -3
- package/build/i18n/{pl.json → pl-PL.json} +10 -3
- package/build/i18n/{pt.json → pt-BR.json} +10 -3
- package/{src/i18n/ro.json → build/i18n/ro-RO.json} +10 -3
- package/build/i18n/{ru.json → ru-RU.json} +10 -3
- package/build/i18n/{th.json → th-TH.json} +10 -3
- package/{src/i18n/tr.json → build/i18n/tr-TR.json} +10 -3
- package/{src/i18n/uk.json → build/i18n/uk-UA.json} +10 -3
- package/build/i18n/zh-CN.json +10 -3
- package/{src/i18n/zh.json → build/i18n/zh-HK.json} +10 -3
- package/build/index.esm.js +441 -169
- package/build/index.esm.js.map +1 -1
- package/build/index.js +439 -167
- package/build/index.js.map +1 -1
- package/build/types/common/locale/index.d.ts +40 -31
- package/build/types/common/locale/index.d.ts.map +1 -1
- package/build/types/dateLookup/tableLink/TableLink.d.ts +2 -16
- package/build/types/dateLookup/tableLink/TableLink.d.ts.map +1 -1
- package/build/types/dateLookup/tableLink/index.d.ts +1 -1
- package/build/types/dateLookup/tableLink/index.d.ts.map +1 -1
- package/build/types/i18n/index.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/button/Button.spec.js +12 -0
- package/src/button/Button.tsx +1 -1
- package/src/common/bottomSheet/__snapshots__/BottomSheet.spec.tsx.snap +8 -8
- package/src/common/focusBoundary/FocusBoundary.tsx +4 -4
- package/src/common/locale/index.spec.js +27 -37
- package/src/common/locale/index.ts +192 -0
- package/src/dateLookup/dayCalendar/table/DayCalendarTable.js +0 -26
- package/src/dateLookup/tableLink/TableLink.js +70 -0
- package/src/i18n/{cs.json → cs-CZ.json} +10 -3
- package/src/i18n/{de.json → de-DE.json} +10 -3
- package/{build/i18n/es.json → src/i18n/es-ES.json} +10 -3
- package/{build/i18n/fr.json → src/i18n/fr-FR.json} +10 -3
- package/{build/i18n/hu.json → src/i18n/hu-HU.json} +10 -3
- package/{build/i18n/id.json → src/i18n/id-ID.json} +10 -3
- package/src/i18n/index.ts +36 -32
- package/src/i18n/{it.json → it-IT.json} +10 -3
- package/src/i18n/{ja.json → ja-JP.json} +10 -3
- package/src/i18n/{pl.json → pl-PL.json} +10 -3
- package/src/i18n/{pt.json → pt-BR.json} +10 -3
- package/{build/i18n/ro.json → src/i18n/ro-RO.json} +10 -3
- package/src/i18n/{ru.json → ru-RU.json} +10 -3
- package/src/i18n/{th.json → th-TH.json} +10 -3
- package/{build/i18n/tr.json → src/i18n/tr-TR.json} +10 -3
- package/{build/i18n/uk.json → src/i18n/uk-UA.json} +10 -3
- package/src/i18n/zh-CN.json +10 -3
- package/{build/i18n/zh.json → src/i18n/zh-HK.json} +10 -3
- package/src/index.ts +1 -1
- package/src/inputs/SelectInput.tsx +8 -3
- package/src/provider/Provider.js +1 -1
- package/src/provider/Provider.spec.tsx +3 -3
- package/src/ssr.spec.js +2 -2
- package/src/test-utils/index.js +1 -1
- package/build/i18n/zh_CN.json +0 -44
- package/src/common/locale/index.js +0 -130
- package/src/dateLookup/tableLink/TableLink.tsx +0 -74
- package/src/i18n/zh_CN.json +0 -44
- /package/build/i18n/{en.json → en-GB.json} +0 -0
- /package/src/dateLookup/tableLink/{index.ts → index.js} +0 -0
- /package/src/i18n/{en.json → en-GB.json} +0 -0
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
import { Direction } from '..';
|
|
2
|
+
/**
|
|
3
|
+
* Default language in xx-YY format compliant with IETF BCP 47.
|
|
4
|
+
*/
|
|
5
|
+
export declare const DEFAULT_LANG = "en-GB";
|
|
6
|
+
/**
|
|
7
|
+
* Default locale
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_LOCALE = "en-GB";
|
|
10
|
+
/**
|
|
11
|
+
* Array of languages that are written from the right to the left
|
|
12
|
+
*/
|
|
13
|
+
export declare const RTL_LANGUAGES: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Supported languages and variants organised by ISO639-1 primary language.
|
|
16
|
+
* Language variants are in xx-YY format compliant with IETF BCP 47
|
|
17
|
+
* (xx is the ISO 639-1 primary language subtag, and YY is the ISO 3166-1 alpha-2 region subtag).
|
|
18
|
+
* Keys: primary language (eg. en)
|
|
19
|
+
* Values: LanguageVariants object containing default and supported variants (eg. en-GB) of primary lang.
|
|
20
|
+
*/
|
|
21
|
+
export declare const SUPPORTED_LANGUAGES: {
|
|
22
|
+
[primaryLang: string]: LanguageVariants;
|
|
23
|
+
};
|
|
1
24
|
/**
|
|
2
25
|
* Verifies and adjusts locale (replace `_` with `-`)
|
|
3
26
|
* Returns null if locale is unrecognized by {Intl.Locale}
|
|
@@ -5,23 +28,24 @@
|
|
|
5
28
|
* @param {string} locale (`es`, `es_ES`, `en-GB`, `en`, `ja`, `ja-JP` etc)
|
|
6
29
|
* @returns {string|null}
|
|
7
30
|
*/
|
|
8
|
-
export function adjustLocale(locale: string): string | null;
|
|
31
|
+
export declare function adjustLocale(locale: string): string | null;
|
|
9
32
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
33
|
+
* Resolves supported language (including variant) for a locale.
|
|
34
|
+
* Returned language is in xx-YY format compliant with IETF BCP 47. xx is the ISO 639-1 primary
|
|
35
|
+
* language subtag, and YY is the ISO 3166-1 alpha-2 region subtag.
|
|
12
36
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
37
|
+
* If locale regional language variant is unsupported, returns the default variant for the language.
|
|
38
|
+
* If primary language unsupported or locale is invalid, returns null.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} locale in xx-YY or xx format (`es-ES`, 'es-MX' `en`, `zh-CN`, `zh-TW` etc)
|
|
41
|
+
* @returns {string|null} language in xx-YY format ('es-ES', 'es-ES', 'en-GB', 'zh-CN', 'zh-CN' etc)
|
|
15
42
|
*/
|
|
16
|
-
export function
|
|
43
|
+
export declare function getSupportedLangFromLocale(locale: string): string | null;
|
|
17
44
|
/**
|
|
18
45
|
* Provides corresponding country code (iso2) for locales code with explicit region value (`es-ES`, `en-GB`, `ja-JP` etc.)
|
|
19
46
|
* if the value is invalid or missing region it returns null
|
|
20
|
-
*
|
|
21
|
-
* @param {string} locale
|
|
22
|
-
* @returns {string|null}
|
|
23
47
|
*/
|
|
24
|
-
export function getCountryFromLocale(locale: string): string | null;
|
|
48
|
+
export declare function getCountryFromLocale(locale: string): string | null;
|
|
25
49
|
/**
|
|
26
50
|
* Provides the layout direction for a given locale.
|
|
27
51
|
* If locale is invalid or language is unsupported returns Direction.LTR
|
|
@@ -29,25 +53,10 @@ export function getCountryFromLocale(locale: string): string | null;
|
|
|
29
53
|
* @param {string} locale (`es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP` etc)
|
|
30
54
|
* @returns {Direction} The layout direction based on the locale
|
|
31
55
|
*/
|
|
32
|
-
export function getDirectionFromLocale(locale: string): Direction;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
export const DEFAULT_LANG: string;
|
|
39
|
-
/**
|
|
40
|
-
* Default locale
|
|
41
|
-
*
|
|
42
|
-
* @type {string}
|
|
43
|
-
*/
|
|
44
|
-
export const DEFAULT_LOCALE: string;
|
|
45
|
-
/**
|
|
46
|
-
* Array of languages that are written from the right to the left
|
|
47
|
-
*
|
|
48
|
-
* @type {string[]}
|
|
49
|
-
*/
|
|
50
|
-
export const RTL_LANGUAGES: string[];
|
|
51
|
-
export const SUPPORTED_LANGUAGES: string[];
|
|
52
|
-
import { Direction } from "../direction";
|
|
56
|
+
export declare function getDirectionFromLocale(locale: string): Direction;
|
|
57
|
+
type LanguageVariants = {
|
|
58
|
+
default: string;
|
|
59
|
+
supported: string[];
|
|
60
|
+
};
|
|
61
|
+
export {};
|
|
53
62
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/locale/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/locale/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAE/B;;GAEG;AACH,eAAO,MAAM,YAAY,UAAU,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,cAAc,UAAU,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,EAAiB,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE;IAAE,CAAC,WAAW,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAiE1E,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAY1D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAsBxE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAalE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAahE;AAED,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC"}
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
interface TableLinkProps {
|
|
4
|
-
item: number;
|
|
5
|
-
type: 'day' | 'month' | 'year';
|
|
6
|
-
title?: string;
|
|
7
|
-
longTitle?: string;
|
|
8
|
-
active: boolean;
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
today: boolean;
|
|
11
|
-
autofocus?: boolean;
|
|
12
|
-
onClick: (item: number) => void;
|
|
13
|
-
intl: IntlShape;
|
|
14
|
-
}
|
|
15
|
-
declare const _default: import("react").FC<import("react-intl").WithIntlProps<TableLinkProps>> & {
|
|
16
|
-
WrappedComponent: import("react").ComponentType<TableLinkProps>;
|
|
1
|
+
declare const _default: import("react").FC<import("react-intl").WithIntlProps<any>> & {
|
|
2
|
+
WrappedComponent: import("react").ComponentType<any>;
|
|
17
3
|
};
|
|
18
4
|
export default _default;
|
|
19
5
|
//# sourceMappingURL=TableLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableLink.d.ts","sourceRoot":"","sources":["../../../../src/dateLookup/tableLink/TableLink.
|
|
1
|
+
{"version":3,"file":"TableLink.d.ts","sourceRoot":"","sources":["../../../../src/dateLookup/tableLink/TableLink.js"],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./TableLink";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dateLookup/tableLink/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dateLookup/tableLink/index.js"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAmBA,QAAA,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmBxD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -115,7 +115,7 @@ export { FileType } from './common';
|
|
|
115
115
|
/**
|
|
116
116
|
* Utils
|
|
117
117
|
*/
|
|
118
|
-
export { adjustLocale, DEFAULT_LANG, DEFAULT_LOCALE, getCountryFromLocale, getDirectionFromLocale,
|
|
118
|
+
export { adjustLocale, DEFAULT_LANG, DEFAULT_LOCALE, getCountryFromLocale, getDirectionFromLocale, getSupportedLangFromLocale, isBrowser, isServerSide, RTL_LANGUAGES, SUPPORTED_LANGUAGES, } from './common';
|
|
119
119
|
/**
|
|
120
120
|
* Translations
|
|
121
121
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,6BAA6B,EAC7B,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrF,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EACV,eAAe,EACf,eAAe,EACf,UAAU,EACV,SAAS,EACT,SAAS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
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-6d4124a",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"build:css": "gulp compileLess --dest=src",
|
|
146
146
|
"build": "npm-run-all build:*",
|
|
147
147
|
"build:clean": "rm -rf lib build",
|
|
148
|
-
"build:crowdin-source-file": "formatjs extract 'src/**/*.messages.+(js|ts|tsx)' --out-file src/i18n/en.json --format simple && prettier --find-config-path --write src/i18n/*.json",
|
|
148
|
+
"build:crowdin-source-file": "formatjs extract 'src/**/*.messages.+(js|ts|tsx)' --out-file src/i18n/en-GB.json --format simple && prettier --find-config-path --write src/i18n/*.json",
|
|
149
149
|
"build:js": "rollup --config --sourcemap",
|
|
150
150
|
"build:generate-types": "node ./scripts/generate-type-declarations.js",
|
|
151
151
|
"build:copy-files": "cpx 'src/**/!(db)/*.{json,svg}' build",
|
|
@@ -85,6 +85,12 @@ describe('Button', () => {
|
|
|
85
85
|
render(<Button {...props} className="catsarethebest" />);
|
|
86
86
|
expect(screen.getByRole('button')).toHaveClass('catsarethebest');
|
|
87
87
|
});
|
|
88
|
+
|
|
89
|
+
it('passes through aria-label if set', () => {
|
|
90
|
+
render(<Button {...props} aria-label="unique label" />);
|
|
91
|
+
const loadingButton = screen.getByLabelText('unique label');
|
|
92
|
+
expect(loadingButton).toBeInTheDocument();
|
|
93
|
+
});
|
|
88
94
|
});
|
|
89
95
|
|
|
90
96
|
describe('onClick', () => {
|
|
@@ -170,6 +176,12 @@ describe('Button', () => {
|
|
|
170
176
|
expect(screen.getByRole('button', { name: 'loading' })).toBeInTheDocument();
|
|
171
177
|
});
|
|
172
178
|
|
|
179
|
+
it('loading button has aria-label of loading', () => {
|
|
180
|
+
render(<Button {...props} loading />);
|
|
181
|
+
const loadingButton = screen.getByLabelText('loading');
|
|
182
|
+
expect(loadingButton).toBeInTheDocument();
|
|
183
|
+
});
|
|
184
|
+
|
|
173
185
|
it('renders as block if block is true', () => {
|
|
174
186
|
expect(render(<Button {...props} block />).container).toMatchSnapshot();
|
|
175
187
|
});
|
package/src/button/Button.tsx
CHANGED
|
@@ -126,7 +126,7 @@ const Button = forwardRef<ButtonReferenceType, Props>(
|
|
|
126
126
|
className={classes}
|
|
127
127
|
{...props}
|
|
128
128
|
aria-live={loading ? 'polite' : 'off'}
|
|
129
|
-
aria-label={loading ? intl.formatMessage(messages.loadingAriaLabel) :
|
|
129
|
+
aria-label={loading ? intl.formatMessage(messages.loadingAriaLabel) : rest['aria-label']}
|
|
130
130
|
>
|
|
131
131
|
{children}
|
|
132
132
|
{loading && <ProcessIndicator size={processIndicatorSize()} className="btn-loader" />}
|
|
@@ -6,13 +6,13 @@ exports[`BottomSheet renders content when open 1`] = `
|
|
|
6
6
|
<div
|
|
7
7
|
class="np-theme-light"
|
|
8
8
|
>
|
|
9
|
+
<span
|
|
10
|
+
data-focus-scope-start="true"
|
|
11
|
+
hidden=""
|
|
12
|
+
/>
|
|
9
13
|
<div
|
|
10
14
|
tabindex="-1"
|
|
11
15
|
>
|
|
12
|
-
<span
|
|
13
|
-
data-focus-scope-start="true"
|
|
14
|
-
hidden=""
|
|
15
|
-
/>
|
|
16
16
|
<div
|
|
17
17
|
class="dimmer"
|
|
18
18
|
role="presentation"
|
|
@@ -66,11 +66,11 @@ exports[`BottomSheet renders content when open 1`] = `
|
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
68
68
|
</div>
|
|
69
|
-
<span
|
|
70
|
-
data-focus-scope-end="true"
|
|
71
|
-
hidden=""
|
|
72
|
-
/>
|
|
73
69
|
</div>
|
|
70
|
+
<span
|
|
71
|
+
data-focus-scope-end="true"
|
|
72
|
+
hidden=""
|
|
73
|
+
/>
|
|
74
74
|
</div>
|
|
75
75
|
</body>
|
|
76
76
|
`;
|
|
@@ -12,11 +12,11 @@ const FocusBoundary = ({ children }: FocusBoundaryProps) => {
|
|
|
12
12
|
}, []);
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
<
|
|
16
|
-
<
|
|
15
|
+
<FocusScope contain restoreFocus>
|
|
16
|
+
<div ref={wrapperReference} tabIndex={-1}>
|
|
17
17
|
{children}
|
|
18
|
-
</
|
|
19
|
-
</
|
|
18
|
+
</div>
|
|
19
|
+
</FocusScope>
|
|
20
20
|
);
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import translationFiles from '../../i18n';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
getSupportedLangFromLocale,
|
|
5
5
|
adjustLocale,
|
|
6
6
|
getCountryFromLocale,
|
|
7
7
|
SUPPORTED_LANGUAGES,
|
|
@@ -18,19 +18,20 @@ describe('locale utils', () => {
|
|
|
18
18
|
jest.restoreAllMocks();
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
describe('
|
|
21
|
+
describe('getSupportedLangFromLocale', () => {
|
|
22
22
|
it.each([
|
|
23
|
-
['en-GB', 'en'],
|
|
24
|
-
['en_GB', 'en'],
|
|
25
|
-
['EN-GB', 'en'],
|
|
26
|
-
['en-gb', 'en'],
|
|
27
|
-
['
|
|
28
|
-
['
|
|
29
|
-
['
|
|
30
|
-
['
|
|
31
|
-
['
|
|
32
|
-
['
|
|
33
|
-
['
|
|
23
|
+
['en-GB', 'en-GB'],
|
|
24
|
+
['en_GB', 'en-GB'],
|
|
25
|
+
['EN-GB', 'en-GB'],
|
|
26
|
+
['en-gb', 'en-GB'],
|
|
27
|
+
['en-US', 'en-GB'],
|
|
28
|
+
['ES', 'es-ES'],
|
|
29
|
+
['zh_HK', 'zh-HK'],
|
|
30
|
+
['zh_CN', 'zh-CN'],
|
|
31
|
+
['zh', 'zh-CN'],
|
|
32
|
+
['zh-SG', 'zh-CN'],
|
|
33
|
+
['zh-tw', 'zh-CN'],
|
|
34
|
+
['ja-JP', 'ja-JP'],
|
|
34
35
|
['zhHK', null],
|
|
35
36
|
[null, null],
|
|
36
37
|
[undefined, null],
|
|
@@ -38,10 +39,9 @@ describe('locale utils', () => {
|
|
|
38
39
|
[' ', null],
|
|
39
40
|
['ar-dz', null],
|
|
40
41
|
['ar-iq', null],
|
|
41
|
-
['zh-tw', 'zh'],
|
|
42
42
|
['nl-nl', null],
|
|
43
43
|
])('locale "%s" -> language "%s"', (locale, expectedValue) => {
|
|
44
|
-
expect(
|
|
44
|
+
expect(getSupportedLangFromLocale(locale)).toBe(expectedValue);
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
47
|
|
|
@@ -67,34 +67,24 @@ describe('locale utils', () => {
|
|
|
67
67
|
['ar-iq', 'ar-IQ'],
|
|
68
68
|
['zh-tw', 'zh-TW'],
|
|
69
69
|
['nl-nl', 'nl-NL'],
|
|
70
|
-
])('locale "%s" ->
|
|
70
|
+
])('locale "%s" -> adjustedLocale "%s"', (locale, expectedValue) => {
|
|
71
71
|
expect(adjustLocale(locale)).toBe(expectedValue);
|
|
72
72
|
});
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
-
describe('contract between SUPPORTED_LANGUAGES and
|
|
76
|
-
it('
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
expect(result).toBe(true);
|
|
75
|
+
describe('contract between SUPPORTED_LANGUAGES and Neptune translations', () => {
|
|
76
|
+
it('all supported languages should be in translations object', () => {
|
|
77
|
+
Object.values(SUPPORTED_LANGUAGES).forEach((langVariants) => {
|
|
78
|
+
Object.values(langVariants.supported).forEach((supportedVariant) => {
|
|
79
|
+
const result = supportedVariant in translationFiles;
|
|
80
|
+
if (!result) {
|
|
81
|
+
// eslint-disable-next-line no-console
|
|
82
|
+
console.log(`'${supportedVariant}' doesn't exist in ${[SUPPORTED_LANGUAGES]}`);
|
|
83
|
+
}
|
|
84
|
+
expect(result).toBe(true);
|
|
85
|
+
});
|
|
88
86
|
});
|
|
89
87
|
});
|
|
90
|
-
|
|
91
|
-
it('lang codes should match with names of translations files', async () => {
|
|
92
|
-
for (const locale of SUPPORTED_LANGUAGES) {
|
|
93
|
-
const file = await import(`../../i18n/${locale}.json`);
|
|
94
|
-
expect(file).not.toBeNull();
|
|
95
|
-
expect(file.default).toBe(translationFiles[locale]);
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
88
|
});
|
|
99
89
|
|
|
100
90
|
describe('getCountryFromLocale', () => {
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { Direction } from '..';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Default language in xx-YY format compliant with IETF BCP 47.
|
|
5
|
+
*/
|
|
6
|
+
export const DEFAULT_LANG = 'en-GB';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Default locale
|
|
10
|
+
*/
|
|
11
|
+
export const DEFAULT_LOCALE = 'en-GB';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Array of languages that are written from the right to the left
|
|
15
|
+
*/
|
|
16
|
+
export const RTL_LANGUAGES: string[] = ['ar', 'he'];
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Supported languages and variants organised by ISO639-1 primary language.
|
|
20
|
+
* Language variants are in xx-YY format compliant with IETF BCP 47
|
|
21
|
+
* (xx is the ISO 639-1 primary language subtag, and YY is the ISO 3166-1 alpha-2 region subtag).
|
|
22
|
+
* Keys: primary language (eg. en)
|
|
23
|
+
* Values: LanguageVariants object containing default and supported variants (eg. en-GB) of primary lang.
|
|
24
|
+
*/
|
|
25
|
+
export const SUPPORTED_LANGUAGES: { [primaryLang: string]: LanguageVariants } = {
|
|
26
|
+
en: {
|
|
27
|
+
default: 'en-GB',
|
|
28
|
+
supported: ['en-GB'],
|
|
29
|
+
},
|
|
30
|
+
de: {
|
|
31
|
+
default: 'de-DE',
|
|
32
|
+
supported: ['de-DE'],
|
|
33
|
+
},
|
|
34
|
+
es: {
|
|
35
|
+
default: 'es-ES',
|
|
36
|
+
supported: ['es-ES'],
|
|
37
|
+
},
|
|
38
|
+
fr: {
|
|
39
|
+
default: 'fr-FR',
|
|
40
|
+
supported: ['fr-FR'],
|
|
41
|
+
},
|
|
42
|
+
hu: {
|
|
43
|
+
default: 'hu-HU',
|
|
44
|
+
supported: ['hu-HU'],
|
|
45
|
+
},
|
|
46
|
+
id: {
|
|
47
|
+
default: 'id-ID',
|
|
48
|
+
supported: ['id-ID'],
|
|
49
|
+
},
|
|
50
|
+
it: {
|
|
51
|
+
default: 'it-IT',
|
|
52
|
+
supported: ['it-IT'],
|
|
53
|
+
},
|
|
54
|
+
ja: {
|
|
55
|
+
default: 'ja-JP',
|
|
56
|
+
supported: ['ja-JP'],
|
|
57
|
+
},
|
|
58
|
+
pl: {
|
|
59
|
+
default: 'pl-PL',
|
|
60
|
+
supported: ['pl-PL'],
|
|
61
|
+
},
|
|
62
|
+
pt: {
|
|
63
|
+
default: 'pt-BR',
|
|
64
|
+
supported: ['pt-BR'],
|
|
65
|
+
},
|
|
66
|
+
ro: {
|
|
67
|
+
default: 'ro-RO',
|
|
68
|
+
supported: ['ro-RO'],
|
|
69
|
+
},
|
|
70
|
+
ru: {
|
|
71
|
+
default: 'ru-RU',
|
|
72
|
+
supported: ['ru-RU'],
|
|
73
|
+
},
|
|
74
|
+
th: {
|
|
75
|
+
default: 'th-TH',
|
|
76
|
+
supported: ['th-TH'],
|
|
77
|
+
},
|
|
78
|
+
tr: {
|
|
79
|
+
default: 'tr-TR',
|
|
80
|
+
supported: ['tr-TR'],
|
|
81
|
+
},
|
|
82
|
+
uk: {
|
|
83
|
+
default: 'uk-UA',
|
|
84
|
+
supported: ['uk-UA'],
|
|
85
|
+
},
|
|
86
|
+
zh: {
|
|
87
|
+
default: 'zh-CN',
|
|
88
|
+
supported: ['zh-CN', 'zh-HK'],
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Verifies and adjusts locale (replace `_` with `-`)
|
|
94
|
+
* Returns null if locale is unrecognized by {Intl.Locale}
|
|
95
|
+
*
|
|
96
|
+
* @param {string} locale (`es`, `es_ES`, `en-GB`, `en`, `ja`, `ja-JP` etc)
|
|
97
|
+
* @returns {string|null}
|
|
98
|
+
*/
|
|
99
|
+
export function adjustLocale(locale: string): string | null {
|
|
100
|
+
if (!locale || locale.trim().length === 0) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
try {
|
|
104
|
+
const { baseName } = new Intl.Locale(locale.trim().replace('_', '-'));
|
|
105
|
+
return baseName;
|
|
106
|
+
} catch (error) {
|
|
107
|
+
// eslint-disable-next-line no-console
|
|
108
|
+
console.error(error);
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Resolves supported language (including variant) for a locale.
|
|
115
|
+
* Returned language is in xx-YY format compliant with IETF BCP 47. xx is the ISO 639-1 primary
|
|
116
|
+
* language subtag, and YY is the ISO 3166-1 alpha-2 region subtag.
|
|
117
|
+
*
|
|
118
|
+
* If locale regional language variant is unsupported, returns the default variant for the language.
|
|
119
|
+
* If primary language unsupported or locale is invalid, returns null.
|
|
120
|
+
*
|
|
121
|
+
* @param {string} locale in xx-YY or xx format (`es-ES`, 'es-MX' `en`, `zh-CN`, `zh-TW` etc)
|
|
122
|
+
* @returns {string|null} language in xx-YY format ('es-ES', 'es-ES', 'en-GB', 'zh-CN', 'zh-CN' etc)
|
|
123
|
+
*/
|
|
124
|
+
export function getSupportedLangFromLocale(locale: string): string | null {
|
|
125
|
+
const adjustedLocale = adjustLocale(locale);
|
|
126
|
+
if (adjustedLocale === null) {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
try {
|
|
130
|
+
const { language: primaryLang } = new Intl.Locale(adjustedLocale);
|
|
131
|
+
|
|
132
|
+
if (primaryLang in SUPPORTED_LANGUAGES) {
|
|
133
|
+
if (SUPPORTED_LANGUAGES[primaryLang].supported.includes(adjustedLocale)) {
|
|
134
|
+
return adjustedLocale;
|
|
135
|
+
} else {
|
|
136
|
+
return SUPPORTED_LANGUAGES[primaryLang].default;
|
|
137
|
+
}
|
|
138
|
+
} else {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
} catch (error) {
|
|
142
|
+
// eslint-disable-next-line no-console
|
|
143
|
+
console.error(error);
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Provides corresponding country code (iso2) for locales code with explicit region value (`es-ES`, `en-GB`, `ja-JP` etc.)
|
|
150
|
+
* if the value is invalid or missing region it returns null
|
|
151
|
+
*/
|
|
152
|
+
export function getCountryFromLocale(locale: string): string | null {
|
|
153
|
+
const adjustedLocale = adjustLocale(locale);
|
|
154
|
+
if (adjustedLocale === null) {
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
try {
|
|
158
|
+
const { region } = new Intl.Locale(adjustedLocale);
|
|
159
|
+
return region ?? null;
|
|
160
|
+
} catch (error) {
|
|
161
|
+
// eslint-disable-next-line no-console
|
|
162
|
+
console.error(error);
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Provides the layout direction for a given locale.
|
|
169
|
+
* If locale is invalid or language is unsupported returns Direction.LTR
|
|
170
|
+
*
|
|
171
|
+
* @param {string} locale (`es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP` etc)
|
|
172
|
+
* @returns {Direction} The layout direction based on the locale
|
|
173
|
+
*/
|
|
174
|
+
export function getDirectionFromLocale(locale: string): Direction {
|
|
175
|
+
const adjustedLocale = adjustLocale(locale);
|
|
176
|
+
if (adjustedLocale) {
|
|
177
|
+
try {
|
|
178
|
+
const { language } = new Intl.Locale(adjustedLocale);
|
|
179
|
+
|
|
180
|
+
return RTL_LANGUAGES.includes(language) ? Direction.RTL : Direction.LTR;
|
|
181
|
+
} catch (error) {
|
|
182
|
+
// eslint-disable-next-line no-console
|
|
183
|
+
console.error(error);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return Direction.LTR;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
type LanguageVariants = {
|
|
190
|
+
default: string;
|
|
191
|
+
supported: string[];
|
|
192
|
+
};
|
|
@@ -65,30 +65,6 @@ class DayCalendarTable extends PureComponent {
|
|
|
65
65
|
return !!(selectedDate && +new Date(viewYear, viewMonth, day) === +selectedDate);
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
getAutofocusDay = (weeks) => {
|
|
69
|
-
let activeDay = null;
|
|
70
|
-
let lowestNonDisabledDay = null;
|
|
71
|
-
|
|
72
|
-
for (const week of weeks) {
|
|
73
|
-
for (const day of week) {
|
|
74
|
-
if (this.isActive(day)) {
|
|
75
|
-
activeDay = day;
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (!this.isDisabled(day) && lowestNonDisabledDay === null) {
|
|
80
|
-
lowestNonDisabledDay = day;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (activeDay !== null) {
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return activeDay || lowestNonDisabledDay;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
68
|
render() {
|
|
93
69
|
const {
|
|
94
70
|
viewMonth,
|
|
@@ -96,7 +72,6 @@ class DayCalendarTable extends PureComponent {
|
|
|
96
72
|
intl: { locale },
|
|
97
73
|
} = this.props;
|
|
98
74
|
const weeks = this.getTableStructure();
|
|
99
|
-
let autoFocusDay = this.getAutofocusDay(weeks);
|
|
100
75
|
return (
|
|
101
76
|
<table className="table table-condensed table-bordered tw-date-lookup-calendar m-b-0">
|
|
102
77
|
<thead>
|
|
@@ -128,7 +103,6 @@ class DayCalendarTable extends PureComponent {
|
|
|
128
103
|
locale,
|
|
129
104
|
SHORT_DAY_FORMAT,
|
|
130
105
|
)}
|
|
131
|
-
autofocus={day === autoFocusDay}
|
|
132
106
|
longTitle={formatDate(new Date(viewYear, viewMonth, day), locale)}
|
|
133
107
|
active={this.isActive(day)}
|
|
134
108
|
disabled={this.isDisabled(day)}
|