@transferwise/components 0.0.0-experimental-667a5fe → 0.0.0-experimental-5d9c3b6

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.
@@ -54,6 +54,7 @@
54
54
  "neptune.UploadButton.allFileTypes": "すべてのファイル種類",
55
55
  "neptune.UploadButton.dropFiles": "ファイルをドロップしてアップロードする",
56
56
  "neptune.UploadButton.instructions": "{fileTypes}、{size}MB以下",
57
+ "neptune.UploadButton.maximumFiles": "最大ファイル数:{maxFiles}個",
57
58
  "neptune.UploadButton.uploadFile": "ファイルをアップロードする",
58
59
  "neptune.UploadButton.uploadFiles": "ファイルをアップロードする",
59
60
  "neptune.UploadInput.deleteModalBody": "このファイルを削除すると、当社のシステムからも削除されます。",
@@ -56,6 +56,7 @@ var ja = {
56
56
  "neptune.UploadButton.allFileTypes": "すべてのファイル種類",
57
57
  "neptune.UploadButton.dropFiles": "ファイルをドロップしてアップロードする",
58
58
  "neptune.UploadButton.instructions": "{fileTypes}、{size}MB以下",
59
+ "neptune.UploadButton.maximumFiles": "最大ファイル数:{maxFiles}個",
59
60
  "neptune.UploadButton.uploadFile": "ファイルをアップロードする",
60
61
  "neptune.UploadButton.uploadFiles": "ファイルをアップロードする",
61
62
  "neptune.UploadInput.deleteModalBody": "このファイルを削除すると、当社のシステムからも削除されます。",
@@ -1 +1 @@
1
- {"version":3,"file":"ja.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ja.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -54,6 +54,7 @@ var ja = {
54
54
  "neptune.UploadButton.allFileTypes": "すべてのファイル種類",
55
55
  "neptune.UploadButton.dropFiles": "ファイルをドロップしてアップロードする",
56
56
  "neptune.UploadButton.instructions": "{fileTypes}、{size}MB以下",
57
+ "neptune.UploadButton.maximumFiles": "最大ファイル数:{maxFiles}個",
57
58
  "neptune.UploadButton.uploadFile": "ファイルをアップロードする",
58
59
  "neptune.UploadButton.uploadFiles": "ファイルをアップロードする",
59
60
  "neptune.UploadInput.deleteModalBody": "このファイルを削除すると、当社のシステムからも削除されます。",
@@ -1 +1 @@
1
- {"version":3,"file":"ja.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ja.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -54,6 +54,7 @@
54
54
  "neptune.UploadButton.allFileTypes": "Todos os tipos de arquivos",
55
55
  "neptune.UploadButton.dropFiles": "Arraste o arquivo para iniciar o envio",
56
56
  "neptune.UploadButton.instructions": "{fileTypes}, com menos de {size}MB",
57
+ "neptune.UploadButton.maximumFiles": "Máximo de {maxFiles} arquivos.",
57
58
  "neptune.UploadButton.uploadFile": "Enviar arquivo",
58
59
  "neptune.UploadButton.uploadFiles": "Enviar arquivos",
59
60
  "neptune.UploadInput.deleteModalBody": "Se você remover este arquivo, ele será permanentemente excluído do nosso sistema.",
@@ -56,6 +56,7 @@ var pt = {
56
56
  "neptune.UploadButton.allFileTypes": "Todos os tipos de arquivos",
57
57
  "neptune.UploadButton.dropFiles": "Arraste o arquivo para iniciar o envio",
58
58
  "neptune.UploadButton.instructions": "{fileTypes}, com menos de {size}MB",
59
+ "neptune.UploadButton.maximumFiles": "Máximo de {maxFiles} arquivos.",
59
60
  "neptune.UploadButton.uploadFile": "Enviar arquivo",
60
61
  "neptune.UploadButton.uploadFiles": "Enviar arquivos",
61
62
  "neptune.UploadInput.deleteModalBody": "Se você remover este arquivo, ele será permanentemente excluído do nosso sistema.",
@@ -1 +1 @@
1
- {"version":3,"file":"pt.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pt.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -54,6 +54,7 @@ var pt = {
54
54
  "neptune.UploadButton.allFileTypes": "Todos os tipos de arquivos",
55
55
  "neptune.UploadButton.dropFiles": "Arraste o arquivo para iniciar o envio",
56
56
  "neptune.UploadButton.instructions": "{fileTypes}, com menos de {size}MB",
57
+ "neptune.UploadButton.maximumFiles": "Máximo de {maxFiles} arquivos.",
57
58
  "neptune.UploadButton.uploadFile": "Enviar arquivo",
58
59
  "neptune.UploadButton.uploadFiles": "Enviar arquivos",
59
60
  "neptune.UploadInput.deleteModalBody": "Se você remover este arquivo, ele será permanentemente excluído do nosso sistema.",
@@ -1 +1 @@
1
- {"version":3,"file":"pt.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pt.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -54,6 +54,7 @@
54
54
  "neptune.UploadButton.allFileTypes": "Все типы файлов",
55
55
  "neptune.UploadButton.dropFiles": "Перетащите файл, чтобы начать загрузку",
56
56
  "neptune.UploadButton.instructions": "{fileTypes}, не превышающий {size} MB",
57
+ "neptune.UploadButton.maximumFiles": "Макс. количество файлов: {maxFiles}.",
57
58
  "neptune.UploadButton.uploadFile": "Загрузить файл",
58
59
  "neptune.UploadButton.uploadFiles": "Загрузить файлы",
59
60
  "neptune.UploadInput.deleteModalBody": "Удаление этого файла приведет к его удалению из нашей системы.",
@@ -56,6 +56,7 @@ var ru = {
56
56
  "neptune.UploadButton.allFileTypes": "Все типы файлов",
57
57
  "neptune.UploadButton.dropFiles": "Перетащите файл, чтобы начать загрузку",
58
58
  "neptune.UploadButton.instructions": "{fileTypes}, не превышающий {size} MB",
59
+ "neptune.UploadButton.maximumFiles": "Макс. количество файлов: {maxFiles}.",
59
60
  "neptune.UploadButton.uploadFile": "Загрузить файл",
60
61
  "neptune.UploadButton.uploadFiles": "Загрузить файлы",
61
62
  "neptune.UploadInput.deleteModalBody": "Удаление этого файла приведет к его удалению из нашей системы.",
@@ -1 +1 @@
1
- {"version":3,"file":"ru.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ru.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -54,6 +54,7 @@ var ru = {
54
54
  "neptune.UploadButton.allFileTypes": "Все типы файлов",
55
55
  "neptune.UploadButton.dropFiles": "Перетащите файл, чтобы начать загрузку",
56
56
  "neptune.UploadButton.instructions": "{fileTypes}, не превышающий {size} MB",
57
+ "neptune.UploadButton.maximumFiles": "Макс. количество файлов: {maxFiles}.",
57
58
  "neptune.UploadButton.uploadFile": "Загрузить файл",
58
59
  "neptune.UploadButton.uploadFiles": "Загрузить файлы",
59
60
  "neptune.UploadInput.deleteModalBody": "Удаление этого файла приведет к его удалению из нашей системы.",
@@ -1 +1 @@
1
- {"version":3,"file":"ru.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ru.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -54,6 +54,7 @@
54
54
  "neptune.UploadButton.allFileTypes": "所有檔案類型",
55
55
  "neptune.UploadButton.dropFiles": "拖放檔案以開始上載",
56
56
  "neptune.UploadButton.instructions": "{fileTypes},小於{size}MB",
57
+ "neptune.UploadButton.maximumFiles": "最多{maxFiles}個檔案。",
57
58
  "neptune.UploadButton.uploadFile": "上載檔案",
58
59
  "neptune.UploadButton.uploadFiles": "上載檔案",
59
60
  "neptune.UploadInput.deleteModalBody": "移除此檔案會把它從我們的系統中刪除。",
@@ -56,6 +56,7 @@ var zhHK = {
56
56
  "neptune.UploadButton.allFileTypes": "所有檔案類型",
57
57
  "neptune.UploadButton.dropFiles": "拖放檔案以開始上載",
58
58
  "neptune.UploadButton.instructions": "{fileTypes},小於{size}MB",
59
+ "neptune.UploadButton.maximumFiles": "最多{maxFiles}個檔案。",
59
60
  "neptune.UploadButton.uploadFile": "上載檔案",
60
61
  "neptune.UploadButton.uploadFiles": "上載檔案",
61
62
  "neptune.UploadInput.deleteModalBody": "移除此檔案會把它從我們的系統中刪除。",
@@ -1 +1 @@
1
- {"version":3,"file":"zh-HK.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"zh-HK.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -54,6 +54,7 @@ var zhHK = {
54
54
  "neptune.UploadButton.allFileTypes": "所有檔案類型",
55
55
  "neptune.UploadButton.dropFiles": "拖放檔案以開始上載",
56
56
  "neptune.UploadButton.instructions": "{fileTypes},小於{size}MB",
57
+ "neptune.UploadButton.maximumFiles": "最多{maxFiles}個檔案。",
57
58
  "neptune.UploadButton.uploadFile": "上載檔案",
58
59
  "neptune.UploadButton.uploadFiles": "上載檔案",
59
60
  "neptune.UploadInput.deleteModalBody": "移除此檔案會把它從我們的系統中刪除。",
@@ -1 +1 @@
1
- {"version":3,"file":"zh-HK.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"zh-HK.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-667a5fe",
3
+ "version": "0.0.0-experimental-5d9c3b6",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -11,7 +11,9 @@ describe('Date Input Component', () => {
11
11
  mockResizeObserver();
12
12
  });
13
13
 
14
- afterEach(jest.clearAllMocks);
14
+ afterEach(() => {
15
+ jest.resetAllMocks();
16
+ });
15
17
 
16
18
  describe('when initialised without a model', () => {
17
19
  it('sets day field to empty', () => {
@@ -97,25 +99,12 @@ describe('Date Input Component', () => {
97
99
  });
98
100
 
99
101
  it('calls the onChange callback with null when changing the month but nothing else is filled out', async () => {
100
- console.time("t1");
101
102
  render(<DateInput {...props} />);
102
103
  const monthSelect = screen.getByLabelText(/month/i);
103
- console.log(monthSelect ? '>>> monthSelect' : '>>> no monthSelect');
104
- console.log('--------------------');
105
104
  await userEvent.click(monthSelect);
106
-
107
- const january = screen.getByRole('option', { name: /January/ });
108
- console.log(january? '>>> january' : '>>> no january');
109
- console.log('--------------------');
110
- await userEvent.click(january);
111
-
112
- // @ts-expect-error test
113
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
114
- console.log(props.onChange?.mock?.calls);
105
+ await userEvent.click(screen.getByRole('option', { name: /January/ }));
115
106
  expect(props.onChange).toHaveBeenCalledWith(null);
116
-
117
- console.timeEnd("t1");
118
- }, 10_000);
107
+ });
119
108
 
120
109
  it('calls the onChange callback with null when changing the year but nothing else is filled out', async () => {
121
110
  render(<DateInput {...props} />);
@@ -132,24 +121,12 @@ describe('Date Input Component', () => {
132
121
  });
133
122
 
134
123
  it('calls the onChange callback with the correct value when changing the month', async () => {
135
- console.time("t2");
136
124
  render(<DateInput {...props} value="2022-12-1" />);
137
125
  const monthSelect = screen.getByRole('combobox', { name: /month/i });
138
- console.log(monthSelect ? '>>> monthSelect' : '>>> no monthSelect');
139
- console.log('--------------------');
140
126
  await userEvent.click(monthSelect);
141
-
142
- const january = screen.getByRole('option', { name: /January/ });
143
- console.log(january? '>>> january' : '>>> no january');
144
- console.log('--------------------');
145
- await userEvent.click(january);
146
-
147
- // @ts-expect-error test
148
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
149
- console.log(props.onChange.mock.calls);
127
+ await userEvent.click(screen.getByRole('option', { name: /January/ }));
150
128
  expect(props.onChange).toHaveBeenCalledWith('2022-01-01');
151
- console.timeEnd("t2");
152
- }, 10_000);
129
+ });
153
130
 
154
131
  it('calls the onChange callback with the correct value when changing the year', async () => {
155
132
  render(<DateInput {...props} value="0122-12-1" />);
package/src/i18n/ja.json CHANGED
@@ -54,6 +54,7 @@
54
54
  "neptune.UploadButton.allFileTypes": "すべてのファイル種類",
55
55
  "neptune.UploadButton.dropFiles": "ファイルをドロップしてアップロードする",
56
56
  "neptune.UploadButton.instructions": "{fileTypes}、{size}MB以下",
57
+ "neptune.UploadButton.maximumFiles": "最大ファイル数:{maxFiles}個",
57
58
  "neptune.UploadButton.uploadFile": "ファイルをアップロードする",
58
59
  "neptune.UploadButton.uploadFiles": "ファイルをアップロードする",
59
60
  "neptune.UploadInput.deleteModalBody": "このファイルを削除すると、当社のシステムからも削除されます。",
package/src/i18n/pt.json CHANGED
@@ -54,6 +54,7 @@
54
54
  "neptune.UploadButton.allFileTypes": "Todos os tipos de arquivos",
55
55
  "neptune.UploadButton.dropFiles": "Arraste o arquivo para iniciar o envio",
56
56
  "neptune.UploadButton.instructions": "{fileTypes}, com menos de {size}MB",
57
+ "neptune.UploadButton.maximumFiles": "Máximo de {maxFiles} arquivos.",
57
58
  "neptune.UploadButton.uploadFile": "Enviar arquivo",
58
59
  "neptune.UploadButton.uploadFiles": "Enviar arquivos",
59
60
  "neptune.UploadInput.deleteModalBody": "Se você remover este arquivo, ele será permanentemente excluído do nosso sistema.",
package/src/i18n/ru.json CHANGED
@@ -54,6 +54,7 @@
54
54
  "neptune.UploadButton.allFileTypes": "Все типы файлов",
55
55
  "neptune.UploadButton.dropFiles": "Перетащите файл, чтобы начать загрузку",
56
56
  "neptune.UploadButton.instructions": "{fileTypes}, не превышающий {size} MB",
57
+ "neptune.UploadButton.maximumFiles": "Макс. количество файлов: {maxFiles}.",
57
58
  "neptune.UploadButton.uploadFile": "Загрузить файл",
58
59
  "neptune.UploadButton.uploadFiles": "Загрузить файлы",
59
60
  "neptune.UploadInput.deleteModalBody": "Удаление этого файла приведет к его удалению из нашей системы.",
@@ -54,6 +54,7 @@
54
54
  "neptune.UploadButton.allFileTypes": "所有檔案類型",
55
55
  "neptune.UploadButton.dropFiles": "拖放檔案以開始上載",
56
56
  "neptune.UploadButton.instructions": "{fileTypes},小於{size}MB",
57
+ "neptune.UploadButton.maximumFiles": "最多{maxFiles}個檔案。",
57
58
  "neptune.UploadButton.uploadFile": "上載檔案",
58
59
  "neptune.UploadButton.uploadFiles": "上載檔案",
59
60
  "neptune.UploadInput.deleteModalBody": "移除此檔案會把它從我們的系統中刪除。",