@transferwise/components 37.9.2 → 37.10.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/build/es/no-polyfill/i18n/es.json +3 -2
  3. package/build/es/no-polyfill/i18n/fr.json +26 -1
  4. package/build/es/no-polyfill/i18n/hu.json +1 -1
  5. package/build/es/no-polyfill/i18n/it.json +26 -1
  6. package/build/es/no-polyfill/i18n/ja.json +3 -2
  7. package/build/es/no-polyfill/i18n/pl.json +26 -1
  8. package/build/es/no-polyfill/i18n/ru.json +5 -5
  9. package/build/es/no-polyfill/modal/Modal.js +1 -1
  10. package/build/es/no-polyfill/moneyInput/MoneyInput.js +1 -1
  11. package/build/es/no-polyfill/upload/Upload.js +1 -1
  12. package/build/es/polyfill/i18n/es.json +3 -2
  13. package/build/es/polyfill/i18n/fr.json +26 -1
  14. package/build/es/polyfill/i18n/hu.json +1 -1
  15. package/build/es/polyfill/i18n/it.json +26 -1
  16. package/build/es/polyfill/i18n/ja.json +3 -2
  17. package/build/es/polyfill/i18n/pl.json +26 -1
  18. package/build/es/polyfill/i18n/ru.json +5 -5
  19. package/build/es/polyfill/modal/Modal.js +1 -1
  20. package/build/es/polyfill/moneyInput/MoneyInput.js +1 -1
  21. package/build/es/polyfill/upload/Upload.js +1 -1
  22. package/build/i18n/es.json +3 -2
  23. package/build/i18n/fr.json +26 -1
  24. package/build/i18n/hu.json +1 -1
  25. package/build/i18n/it.json +26 -1
  26. package/build/i18n/ja.json +3 -2
  27. package/build/i18n/pl.json +26 -1
  28. package/build/i18n/ru.json +5 -5
  29. package/build/main.css +1 -1
  30. package/build/styles/main.css +1 -1
  31. package/build/styles/modal/Modal.css +1 -1
  32. package/build/styles/moneyInput/MoneyInput.css +1 -1
  33. package/build/umd/no-polyfill/main.js +1 -1
  34. package/build/umd/polyfill/main.js +1 -1
  35. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,50 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [37.10.0](https://github.com/transferwise/neptune-web/compare/@transferwise/components@37.9.5...@transferwise/components@37.10.0) (2021-11-02)
7
+
8
+
9
+ ### Features
10
+
11
+ * **MoneyInput:** display currency flag on md size when currency change is disabled ([#1204](https://github.com/transferwise/neptune-web/issues/1204)) ([5f1c3ef](https://github.com/transferwise/neptune-web/commit/5f1c3efe68659089a44b34783e91e3311abbf2c7))
12
+
13
+
14
+
15
+
16
+
17
+ ## [37.9.5](https://github.com/transferwise/neptune-web/compare/@transferwise/components@37.9.4...@transferwise/components@37.9.5) (2021-10-27)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * adding new Crowdin updates ([#1190](https://github.com/transferwise/neptune-web/issues/1190)) ([190831c](https://github.com/transferwise/neptune-web/commit/190831ca46047a3e83b3747ccf9e25bd0e6e2c42))
23
+
24
+
25
+
26
+
27
+
28
+ ## [37.9.4](https://github.com/transferwise/neptune-web/compare/@transferwise/components@37.9.3...@transferwise/components@37.9.4) (2021-10-27)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * **components:** disable drag & drop in Upload component while upload is in progress ([#1194](https://github.com/transferwise/neptune-web/issues/1194)) ([52acdf0](https://github.com/transferwise/neptune-web/commit/52acdf05b0b2c997b169ed8faa3e15191412fad2))
34
+
35
+
36
+
37
+
38
+
39
+ ## [37.9.3](https://github.com/transferwise/neptune-web/compare/@transferwise/components@37.9.2...@transferwise/components@37.9.3) (2021-10-27)
40
+
41
+
42
+ ### Bug Fixes
43
+
44
+ * **components:** set max-height on Modal when scroll is set to viewport ([#1198](https://github.com/transferwise/neptune-web/issues/1198)) ([fa9f130](https://github.com/transferwise/neptune-web/commit/fa9f1309e40ffbb20ada3c3e6aaf0ffa81f780f7))
45
+
46
+
47
+
48
+
49
+
6
50
  ## [37.9.2](https://github.com/transferwise/neptune-web/compare/@transferwise/components@37.9.1...@transferwise/components@37.9.2) (2021-10-26)
7
51
 
8
52
 
@@ -1,4 +1,5 @@
1
1
  {
2
+ "neptune.Chips.ariaLabel": "Descartar {choice}",
2
3
  "neptune.ClearButton.ariaLabel": "Borrar",
3
4
  "neptune.CloseButton.ariaLabel": "Cerrar",
4
5
  "neptune.DateInput.day.label": "Día",
@@ -24,8 +25,8 @@
24
25
  "neptune.UploadButton.allFileTypes": "Todos los tipos de archivos",
25
26
  "neptune.UploadButton.dropFiles": "Arrastra un archivo para subirlo",
26
27
  "neptune.UploadButton.instructions": "{fileTypes}, menor que {size}MB",
27
- "neptune.UploadButton.uploadFile": "Subir archivo",
28
- "neptune.UploadButton.uploadFiles": "Subir archivos",
28
+ "neptune.UploadButton.uploadFile": "Cargar archivo",
29
+ "neptune.UploadButton.uploadFiles": "Cargar archivos",
29
30
  "neptune.UploadInput.deleteModalBody": "La eliminación de este archivo lo borrará de nuestro sistema.",
30
31
  "neptune.UploadInput.deleteModalCancelButtonText": "Cancelar",
31
32
  "neptune.UploadInput.deleteModalConfirmButtonText": "Eliminar",
@@ -1,9 +1,17 @@
1
1
  {
2
+ "neptune.Chips.ariaLabel": "Effacer {choice}",
3
+ "neptune.ClearButton.ariaLabel": "Effacer",
2
4
  "neptune.CloseButton.ariaLabel": "Fermer",
5
+ "neptune.DateInput.day.label": "Jour",
6
+ "neptune.DateInput.month.label": "Mois",
7
+ "neptune.DateInput.year.label": "Année",
3
8
  "neptune.MoneyInput.Select.placeholder": "Sélectionner une option...",
4
9
  "neptune.Pagination.ariaLabel": "Navigation par pagination",
5
10
  "neptune.PaginationLink.ariaLabel.active": "Aller à la page {pageNumber}",
6
11
  "neptune.PaginationLink.ariaLabel.inactive": "Page actuelle, page {pageNumber}",
12
+ "neptune.Summary.statusDone": "Validé",
13
+ "neptune.Summary.statusNotDone": "À compléter",
14
+ "neptune.Summary.statusPending": "En attente",
7
15
  "neptune.Upload.csButtonText": "Envoyer un autre fichier ?",
8
16
  "neptune.Upload.csFailureText": "Échec du téléchargement. Veuillez réessayer",
9
17
  "neptune.Upload.csSuccessText": "Téléchargement terminé !",
@@ -13,5 +21,22 @@
13
21
  "neptune.Upload.psProcessingText": "Téléchargement...",
14
22
  "neptune.Upload.usButtonText": "Ou sélectionnez un fichier",
15
23
  "neptune.Upload.usDropMessage": "Déposer un fichier pour démarrer le téléchargement",
16
- "neptune.Upload.usPlaceholder": "Glissez et déposez un fichier inférieur à 5 Mo"
24
+ "neptune.Upload.usPlaceholder": "Glissez et déposez un fichier inférieur à 5 Mo",
25
+ "neptune.UploadButton.allFileTypes": "Tous types de fichiers",
26
+ "neptune.UploadButton.dropFiles": "Déposer un fichier pour démarrer le téléchargement",
27
+ "neptune.UploadButton.instructions": "{fileTypes}, inférieur à {size} Mo",
28
+ "neptune.UploadButton.uploadFile": "Envoyer le fichier",
29
+ "neptune.UploadButton.uploadFiles": "Transférer des documents",
30
+ "neptune.UploadInput.deleteModalBody": "La suppression de ce fichier sera définitive sur notre système.",
31
+ "neptune.UploadInput.deleteModalCancelButtonText": "Annuler",
32
+ "neptune.UploadInput.deleteModalConfirmButtonText": "Supprimer",
33
+ "neptune.UploadInput.deleteModalTitle": "Voulez-vous vraiment supprimer ce fichier ?",
34
+ "neptune.UploadInput.fileIsTooLarge": "Fichier trop lourd",
35
+ "neptune.UploadInput.fileTypeNotSupported": "Type de fichier non pris en charge",
36
+ "neptune.UploadItem.deleting": "Suppression...",
37
+ "neptune.UploadItem.removeFile": "Supprimer le fichier {filename}",
38
+ "neptune.UploadItem.uploaded": "Téléchargé",
39
+ "neptune.UploadItem.uploadedFile": "Fichier téléchargé",
40
+ "neptune.UploadItem.uploading": "Téléchargement...",
41
+ "neptune.UploadItem.uploadingFailed": "Échec du téléchargement"
17
42
  }
@@ -10,7 +10,7 @@
10
10
  "neptune.PaginationLink.ariaLabel.active": "Ugrás a(z) {pageNumber}. oldalra",
11
11
  "neptune.PaginationLink.ariaLabel.inactive": "Jelenlegi oldal, {pageNumber}. oldal",
12
12
  "neptune.Summary.statusDone": "Kész",
13
- "neptune.Summary.statusNotDone": "Hátralévő feladat",
13
+ "neptune.Summary.statusNotDone": "Hátravan",
14
14
  "neptune.Summary.statusPending": "Függőben",
15
15
  "neptune.Upload.csButtonText": "Másik fájl feltöltése?",
16
16
  "neptune.Upload.csFailureText": "Feltöltés sikertelen. Kérünk, próbáld újra",
@@ -1,9 +1,17 @@
1
1
  {
2
+ "neptune.Chips.ariaLabel": "Rimuovi {choice}",
3
+ "neptune.ClearButton.ariaLabel": "Elimina",
2
4
  "neptune.CloseButton.ariaLabel": "Chiudi",
5
+ "neptune.DateInput.day.label": "Giorno",
6
+ "neptune.DateInput.month.label": "Mese",
7
+ "neptune.DateInput.year.label": "Anno",
3
8
  "neptune.MoneyInput.Select.placeholder": "Seleziona un'opzione...",
4
9
  "neptune.Pagination.ariaLabel": "Navigazione",
5
10
  "neptune.PaginationLink.ariaLabel.active": "Via a pagina {pageNumber}",
6
11
  "neptune.PaginationLink.ariaLabel.inactive": "Pagina corrente, pagina {pageNumber}",
12
+ "neptune.Summary.statusDone": "Completato",
13
+ "neptune.Summary.statusNotDone": "Da completare",
14
+ "neptune.Summary.statusPending": "In corso",
7
15
  "neptune.Upload.csButtonText": "Carica un altro documento?",
8
16
  "neptune.Upload.csFailureText": "Caricamento fallito. Per favore riprova",
9
17
  "neptune.Upload.csSuccessText": "Caricamento completato!",
@@ -13,5 +21,22 @@
13
21
  "neptune.Upload.psProcessingText": "Caricamento...",
14
22
  "neptune.Upload.usButtonText": "O seleziona un documento",
15
23
  "neptune.Upload.usDropMessage": "Rilascia il documento per iniziare il caricamento",
16
- "neptune.Upload.usPlaceholder": "Trascina e rilascia un file inferiore a 5MB"
24
+ "neptune.Upload.usPlaceholder": "Trascina e rilascia un file inferiore a 5MB",
25
+ "neptune.UploadButton.allFileTypes": "Tutti i tipi di file",
26
+ "neptune.UploadButton.dropFiles": "Rilascia file per iniziare a caricare",
27
+ "neptune.UploadButton.instructions": "{fileTypes}, minore di {size}MB",
28
+ "neptune.UploadButton.uploadFile": "Carica un file",
29
+ "neptune.UploadButton.uploadFiles": "Carica i file",
30
+ "neptune.UploadInput.deleteModalBody": "Rimuovere questo file lo cancellerà dal nostro sistema.",
31
+ "neptune.UploadInput.deleteModalCancelButtonText": "Annulla",
32
+ "neptune.UploadInput.deleteModalConfirmButtonText": "Rimuovi",
33
+ "neptune.UploadInput.deleteModalTitle": "Vuoi davvero cancellare questo file?",
34
+ "neptune.UploadInput.fileIsTooLarge": "File troppo grande",
35
+ "neptune.UploadInput.fileTypeNotSupported": "Tipo di file non supportato",
36
+ "neptune.UploadItem.deleting": "Eliminando...",
37
+ "neptune.UploadItem.removeFile": "Rimuovi file {filename}",
38
+ "neptune.UploadItem.uploaded": "Caricato",
39
+ "neptune.UploadItem.uploadedFile": "File caricato",
40
+ "neptune.UploadItem.uploading": "Caricamento...",
41
+ "neptune.UploadItem.uploadingFailed": "Caricamento fallito"
17
42
  }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "neptune.Chips.ariaLabel": "{choice} をクリア",
2
3
  "neptune.ClearButton.ariaLabel": "消去",
3
4
  "neptune.CloseButton.ariaLabel": "閉じる",
4
5
  "neptune.DateInput.day.label": "日",
@@ -9,8 +10,8 @@
9
10
  "neptune.PaginationLink.ariaLabel.active": "{pageNumber}のページへ移動します",
10
11
  "neptune.PaginationLink.ariaLabel.inactive": "現在のページ、{pageNumber}ページ",
11
12
  "neptune.Summary.statusDone": "完了",
12
- "neptune.Summary.statusNotDone": "対応すべきこと",
13
- "neptune.Summary.statusPending": "保留中のもの",
13
+ "neptune.Summary.statusNotDone": "未対応",
14
+ "neptune.Summary.statusPending": "保留中",
14
15
  "neptune.Upload.csButtonText": "別のファイルをアップロードしますか?",
15
16
  "neptune.Upload.csFailureText": "アップロードに失敗しました。もう一度やり直してください。",
16
17
  "neptune.Upload.csSuccessText": "アップロードが完了しました。",
@@ -1,9 +1,17 @@
1
1
  {
2
+ "neptune.Chips.ariaLabel": "Wyczyść {choice}",
3
+ "neptune.ClearButton.ariaLabel": "Wyczyść",
2
4
  "neptune.CloseButton.ariaLabel": "Zamknij",
5
+ "neptune.DateInput.day.label": "Dzień",
6
+ "neptune.DateInput.month.label": "Miesiąc",
7
+ "neptune.DateInput.year.label": "Rok",
3
8
  "neptune.MoneyInput.Select.placeholder": "Wybierz opcję...",
4
9
  "neptune.Pagination.ariaLabel": "Nawigacja w paginacji",
5
10
  "neptune.PaginationLink.ariaLabel.active": "Przejdź do strony {pageNumber}",
6
11
  "neptune.PaginationLink.ariaLabel.inactive": "Obecna strona, strona {pageNumber}",
12
+ "neptune.Summary.statusDone": "Czynność wykonana",
13
+ "neptune.Summary.statusNotDone": "Czynność do wykonania",
14
+ "neptune.Summary.statusPending": "Czynność oczekująca",
7
15
  "neptune.Upload.csButtonText": "Prześlij kolejny plik?",
8
16
  "neptune.Upload.csFailureText": "Przesyłanie nie powiodło się. Proszę spróbować ponownie",
9
17
  "neptune.Upload.csSuccessText": "Przesyłanie zakończone!",
@@ -13,5 +21,22 @@
13
21
  "neptune.Upload.psProcessingText": "Przesyłanie...",
14
22
  "neptune.Upload.usButtonText": "Lub wybierz plik",
15
23
  "neptune.Upload.usDropMessage": "Upuść plik, aby rozpocząć przesyłanie",
16
- "neptune.Upload.usPlaceholder": "Przeciągnij i upuść plik mniejszy niż 5MB"
24
+ "neptune.Upload.usPlaceholder": "Przeciągnij i upuść plik mniejszy niż 5MB",
25
+ "neptune.UploadButton.allFileTypes": "Wszystkie typy plików",
26
+ "neptune.UploadButton.dropFiles": "Upuść plik, żeby rozpocząć przesyłanie",
27
+ "neptune.UploadButton.instructions": "{fileTypes}, mniejsze niż {size}MB",
28
+ "neptune.UploadButton.uploadFile": "Prześlij plik",
29
+ "neptune.UploadButton.uploadFiles": "Prześlij pliki",
30
+ "neptune.UploadInput.deleteModalBody": "Usunięcie tego pliku oznacza usunięcie go z naszego systemu.",
31
+ "neptune.UploadInput.deleteModalCancelButtonText": "Anuluj",
32
+ "neptune.UploadInput.deleteModalConfirmButtonText": "Usuń",
33
+ "neptune.UploadInput.deleteModalTitle": "Czy na pewno chcesz usunąć ten plik?",
34
+ "neptune.UploadInput.fileIsTooLarge": "Plik jest za duży",
35
+ "neptune.UploadInput.fileTypeNotSupported": "Nieobsługiwany typ pliku",
36
+ "neptune.UploadItem.deleting": "Usuwanie...",
37
+ "neptune.UploadItem.removeFile": "Usuń plik {filename}",
38
+ "neptune.UploadItem.uploaded": "Przesłano",
39
+ "neptune.UploadItem.uploadedFile": "Przesłany plik",
40
+ "neptune.UploadItem.uploading": "Przesyłanie...",
41
+ "neptune.UploadItem.uploadingFailed": "Przesyłanie nie powiodło się"
17
42
  }
@@ -9,9 +9,9 @@
9
9
  "neptune.Pagination.ariaLabel": "Постраничная навигация",
10
10
  "neptune.PaginationLink.ariaLabel.active": "Перейти на страницу {pageNumber}",
11
11
  "neptune.PaginationLink.ariaLabel.inactive": "Текущая страница, страница {pageNumber}",
12
- "neptune.Summary.statusDone": "Это готово",
13
- "neptune.Summary.statusNotDone": "Это нужно сделать",
14
- "neptune.Summary.statusPending": "Находится на рассмотрении",
12
+ "neptune.Summary.statusDone": "Этап завершен",
13
+ "neptune.Summary.statusNotDone": "Этап к выполнению",
14
+ "neptune.Summary.statusPending": "Этап в процессе",
15
15
  "neptune.Upload.csButtonText": "Загрузить другой файл?",
16
16
  "neptune.Upload.csFailureText": "Загрузка не удалась. Пожалуйста, попробуйте снова",
17
17
  "neptune.Upload.csSuccessText": "Загрузка завершена!",
@@ -24,7 +24,7 @@
24
24
  "neptune.Upload.usPlaceholder": "Перетащите файл не больше 5MB",
25
25
  "neptune.UploadButton.allFileTypes": "Все типы файлов",
26
26
  "neptune.UploadButton.dropFiles": "Перетащите файл, чтобы начать загрузку",
27
- "neptune.UploadButton.instructions": "{fileTypes}, менее чем {size}MB",
27
+ "neptune.UploadButton.instructions": "{fileTypes}, не превышающий {size} MB",
28
28
  "neptune.UploadButton.uploadFile": "Загрузить файл",
29
29
  "neptune.UploadButton.uploadFiles": "Загрузить файлы",
30
30
  "neptune.UploadInput.deleteModalBody": "Удаление этого файла приведет к его удалению из нашей системы.",
@@ -38,5 +38,5 @@
38
38
  "neptune.UploadItem.uploaded": "Завершено",
39
39
  "neptune.UploadItem.uploadedFile": "Загруженный файл",
40
40
  "neptune.UploadItem.uploading": "Загрузка...",
41
- "neptune.UploadItem.uploadingFailed": "Не удалось загрузить"
41
+ "neptune.UploadItem.uploadingFailed": "Загрузка не удалась"
42
42
  }
@@ -1 +1 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["title","body","footer","onClose","className","open","size","scroll","position"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classNames from"classnames";import PropTypes from"prop-types";import CSSTransition from"react-transition-group/CSSTransition";import{Size,Position,Scroll}from"../common";import CloseButton from"../common/closeButton";import Dimmer from"../dimmer";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var TRANSITION_DURATION_IN_MILLISECONDS=150,Modal=function(a){var b=a.title,c=a.body,d=a.footer,e=a.onClose,f=a.className,g=a.open,h=a.size,i=a.scroll,j=a.position,k=_objectWithoutProperties(a,_excluded),l=function(a){return f.split(" ").includes(a)},m=l("compact"),n=l("no-divider");return/*#__PURE__*/_jsx(Dimmer,{open:g,scrollable:i===Scroll.CONTENT,className:classNames("d-flex","justify-content-center"),onClose:e,children:/*#__PURE__*/_jsx(CSSTransition,{appear:!0,in:g,classNames:{enterDone:"in"},timeout:TRANSITION_DURATION_IN_MILLISECONDS,unmountOnExit:!0,children:/*#__PURE__*/_jsx("div",_objectSpread(_objectSpread({className:classNames("tw-modal",{"align-self-center":j===Position.CENTER,"tw-modal--viewport":i===Scroll.VIEWPORT},"fade","outline-none",f)},k),{},{children:/*#__PURE__*/_jsx("div",{className:classNames("tw-modal-dialog","d-flex",_defineProperty({},"tw-modal-".concat(h),h)),"aria-modal":!0,role:"dialog",children:/*#__PURE__*/_jsxs("div",{className:classNames("tw-modal-content","d-flex","flex-column","justify-content-between",{"tw-modal-compact":m,"tw-modal-no-title":!b}),children:[/*#__PURE__*/_jsxs("div",{className:classNames("tw-modal-header","d-flex","align-items-center","justify-content-between","flex-wrap",{"modal--withoutborder":!b||n}),children:[/*#__PURE__*/_jsx("h4",{className:"tw-modal-title",children:b}),/*#__PURE__*/_jsx(CloseButton,{onClick:e})]}),/*#__PURE__*/_jsx("div",{className:"tw-modal-body",children:c}),d&&/*#__PURE__*/_jsx("div",{className:classNames("tw-modal-footer","d-flex","align-items-center","flex-wrap",{"modal--withoutborder":n}),children:d})]})})}))})})};Modal.propTypes={title:PropTypes.node,body:PropTypes.node.isRequired,footer:PropTypes.node,size:PropTypes.oneOf(["sm","md","lg","xl"]),onClose:PropTypes.func.isRequired,className:PropTypes.string,open:PropTypes.bool.isRequired,scroll:PropTypes.oneOf(["content","viewport"]),position:PropTypes.oneOf(["top","center"])},Modal.defaultProps={title:null,footer:null,size:Size.MEDIUM,className:"",scroll:Scroll.VIEWPORT,position:Position.CENTER};export default Modal;
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["title","body","footer","onClose","className","open","size","scroll","position"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classNames from"classnames";import PropTypes from"prop-types";import CSSTransition from"react-transition-group/CSSTransition";import{Size,Position,Scroll}from"../common";import CloseButton from"../common/closeButton";import Dimmer from"../dimmer";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var TRANSITION_DURATION_IN_MILLISECONDS=150,Modal=function(a){var b=a.title,c=a.body,d=a.footer,e=a.onClose,f=a.className,g=a.open,h=a.size,i=a.scroll,j=a.position,k=_objectWithoutProperties(a,_excluded),l=function(a){return f.split(" ").includes(a)},m=l("compact"),n=l("no-divider");return/*#__PURE__*/_jsx(Dimmer,{open:g,scrollable:i===Scroll.CONTENT,className:classNames("d-flex","justify-content-center"),onClose:e,children:/*#__PURE__*/_jsx(CSSTransition,{appear:!0,in:g,classNames:{enterDone:"in"},timeout:TRANSITION_DURATION_IN_MILLISECONDS,unmountOnExit:!0,children:/*#__PURE__*/_jsx("div",_objectSpread(_objectSpread({className:classNames("tw-modal","d-flex",{"align-self-center":j===Position.CENTER,"tw-modal--viewport":i===Scroll.VIEWPORT},"fade","outline-none",f)},k),{},{children:/*#__PURE__*/_jsx("div",{className:classNames("tw-modal-dialog","d-flex",_defineProperty({},"tw-modal-".concat(h),h)),"aria-modal":!0,role:"dialog",children:/*#__PURE__*/_jsxs("div",{className:classNames("tw-modal-content","d-flex","flex-column","justify-content-between",{"tw-modal-compact":m,"tw-modal-no-title":!b}),children:[/*#__PURE__*/_jsxs("div",{className:classNames("tw-modal-header","d-flex","align-items-center","justify-content-between","flex-wrap",{"modal--withoutborder":!b||n}),children:[/*#__PURE__*/_jsx("h4",{className:"tw-modal-title",children:b}),/*#__PURE__*/_jsx(CloseButton,{onClick:e})]}),/*#__PURE__*/_jsx("div",{className:"tw-modal-body",children:c}),d&&/*#__PURE__*/_jsx("div",{className:classNames("tw-modal-footer","d-flex","align-items-center","flex-wrap",{"modal--withoutborder":n}),children:d})]})})}))})})};Modal.propTypes={title:PropTypes.node,body:PropTypes.node.isRequired,footer:PropTypes.node,size:PropTypes.oneOf(["sm","md","lg","xl"]),onClose:PropTypes.func.isRequired,className:PropTypes.string,open:PropTypes.bool.isRequired,scroll:PropTypes.oneOf(["content","viewport"]),position:PropTypes.oneOf(["top","center"])},Modal.defaultProps={title:null,footer:null,size:Size.MEDIUM,className:"",scroll:Scroll.VIEWPORT,position:Position.CENTER};export default Modal;
@@ -1,4 +1,4 @@
1
- import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _createSuper(a){var b=_isNativeReflectConstruct();return function(){var c,d=_getPrototypeOf(a);if(b){var e=_getPrototypeOf(this).constructor;c=Reflect.construct(d,arguments,e)}else c=d.apply(this,arguments);return _possibleConstructorReturn(this,c)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}import{isEmpty,isNumber,isNull}from"@transferwise/neptune-validation";import classNames from"classnames";import PropTypes from"prop-types";import{Component}from"react";import{injectIntl}from"react-intl";import{Key as keyValues}from"../common/key";import keyCodes from"../common/keyCodes";import{Size}from"../common/propsValues/size";import Select from"../select";import messages from"./MoneyInput.messages";import{formatAmount,parseAmount}from"./currencyFormatting";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Currency=PropTypes.shape({header:PropTypes.string,value:PropTypes.string,label:PropTypes.string,currency:PropTypes.string,note:PropTypes.string,searchable:PropTypes.string}),CUSTOM_ACTION="CUSTOM_ACTION",isNumberOrNull=function(a){return isNumber(a)||isNull(a)},formatAmountIfSet=function(a,b,c){return"number"==typeof a?formatAmount(a,b,c):""},inputKeyCodeAllowlist=new Set([keyCodes.BACKSPACE,keyCodes.DELETE,keyCodes.COMMA,keyCodes.PERIOD,keyCodes.DOWN,keyCodes.UP,keyCodes.LEFT,keyCodes.RIGHT,keyCodes.ENTER,keyCodes.ESCAPE,keyCodes.TAB]),inputKeyAllowlist=new Set([keyValues.PERIOD,keyValues.COMMA]),MoneyInput=/*#__PURE__*/function(a){function b(a){var d;_classCallCheck(this,b),d=c.call(this,a),_defineProperty(_assertThisInitialized(d),"isInputAllowedForKeyEvent",function(a){var b=a.keyCode,c=a.metaKey,d=a.key,e=a.ctrlKey,f=isNumber(parseInt(d,10));return f||c||e||inputKeyCodeAllowlist.has(b)||inputKeyAllowlist.has(d)}),_defineProperty(_assertThisInitialized(d),"handleKeyDown",function(a){d.isInputAllowedForKeyEvent(a)||a.preventDefault()}),_defineProperty(_assertThisInitialized(d),"handlePaste",function(a){var b=(a.clipboardData||window.clipboardData).getData("text"),c=d.state.locale,e=isEmpty(b)?null:parseAmount(b,d.props.selectedCurrency.currency,c);isNumberOrNull(e)&&(d.setState({formattedAmount:formatAmountIfSet(e,d.props.selectedCurrency.currency,c)}),d.props.onAmountChange(e)),a.preventDefault()}),_defineProperty(_assertThisInitialized(d),"onAmountChange",function(a){var b=a.target.value;d.setState({formattedAmount:b});var c=isEmpty(b)?null:parseAmount(b,d.props.selectedCurrency.currency,d.state.locale);isNumberOrNull(c)&&d.props.onAmountChange(c)}),_defineProperty(_assertThisInitialized(d),"onAmountBlur",function(){d.amountFocused=!1,d.setAmount()}),_defineProperty(_assertThisInitialized(d),"onAmountFocus",function(){d.amountFocused=!0}),_defineProperty(_assertThisInitialized(d),"handleSelectChange",function(a){d.handleSearchChange(""),d.props.onCustomAction&&a.value===CUSTOM_ACTION?d.props.onCustomAction():d.props.onCurrencyChange(a)}),_defineProperty(_assertThisInitialized(d),"handleSearchChange",function(a){d.setState({searchQuery:a}),d.props.onSearchChange&&d.props.onSearchChange({searchQuery:a,filteredOptions:filterOptionsForQuery(d.props.currencies,a)})}),_defineProperty(_assertThisInitialized(d),"style",function(a){return d.props.classNames[a]||a});var e=d.props.intl.locale;return d.formatMessage=d.props.intl.formatMessage,d.state={searchQuery:"",formattedAmount:formatAmountIfSet(a.amount,a.selectedCurrency.currency,e),locale:e},d}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"UNSAFE_componentWillReceiveProps",value:function UNSAFE_componentWillReceiveProps(a){var b;if(this.setState({locale:null===a||void 0===a||null===(b=a.intl)||void 0===b?void 0:b.locale}),!this.amountFocused){var c;this.setState({formattedAmount:formatAmountIfSet(a.amount,a.selectedCurrency.currency,null===a||void 0===a||null===(c=a.intl)||void 0===c?void 0:c.locale)})}}},{key:"getSelectOptions",value:function getSelectOptions(){var a=_toConsumableArray(filterOptionsForQuery(this.props.currencies,this.state.searchQuery));return this.props.onCustomAction&&a.push({value:CUSTOM_ACTION,label:this.props.customActionLabel}),a}},{key:"setAmount",value:function setAmount(){var a=this;this.setState(function(b){var c=parseAmount(b.formattedAmount,a.props.selectedCurrency.currency,a.state.locale);return isNumberOrNull(c)?{formattedAmount:formatAmountIfSet(c,a.props.selectedCurrency.currency,b.locale)}:{formattedAmount:b.formattedAmount}})}},{key:"render",value:function render(){var a=this.props,b=a.selectedCurrency,c=a.onCurrencyChange,d=a.size,e=a.addon,f=this.getSelectOptions(),g=!this.state.searchQuery&&(1===f.length&&f[0].currency===b.currency||!c),h=!this.props.onAmountChange;return/*#__PURE__*/_jsxs("div",{className:classNames(this.style("tw-money-input"),this.style("input-group"),this.style("input-group-".concat(d))),children:[/*#__PURE__*/_jsx("input",{id:this.props.id,value:this.state.formattedAmount,type:"text",inputMode:"decimal",className:classNames(this.style("form-control")),disabled:h,placeholder:formatAmountIfSet(this.props.placeholder,this.props.selectedCurrency.currency,this.state.locale),autoComplete:"off",onKeyDown:this.handleKeyDown,onChange:this.onAmountChange,onFocus:this.onAmountFocus,onBlur:this.onAmountBlur,onPaste:this.handlePaste}),e&&/*#__PURE__*/_jsx("span",{className:classNames(this.style("input-group-addon"),this.style("input-".concat(d)),h?this.style("tw-money-input--disabled"):""),children:e}),g?/*#__PURE__*/_jsxs("div",{className:classNames(this.style("input-group-addon"),this.style("input-".concat(d)),this.style("tw-money-input__fixed-currency"),h?this.style("tw-money-input--disabled"):""),children:["lg"===d&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("i",{className:classNames(this.style("tw-money-input__keyline"))}),/*#__PURE__*/_jsx("i",{className:classNames(this.style("currency-flag"),this.style("currency-flag-".concat(b.currency.toLowerCase())),this.style("hidden-xs"),this.style("m-r-2"))})]}),/*#__PURE__*/_jsx("span",{className:"lg"===d?this.style("m-r-1"):"",children:b.currency.toUpperCase()})]}):/*#__PURE__*/_jsx("div",{className:classNames(this.style("input-group-btn"),this.style("amount-currency-select-btn")),children:/*#__PURE__*/_jsx(Select,{classNames:this.props.classNames,options:f,selected:_objectSpread(_objectSpread({},b),{},{note:null}),placeholder:this.formatMessage(messages.selectPlaceholder),searchPlaceholder:this.props.searchPlaceholder,searchValue:this.state.searchQuery,size:d,required:!0,dropdownRight:"xs",dropdownWidth:"lg",inverse:!0,onChange:this.handleSelectChange,onSearchChange:this.handleSearchChange})})]})}}]),b}(Component);function filterOptionsForQuery(a,b){if(!b)return a;var c=removeDuplicateValueOptions(a).filter(function(a){return isCurrencyOptionAndFitsQuery(a,b)});return sortOptionsLabelsToFirst(c,b)}function removeDuplicateValueOptions(a){var b=[],c=[];return a.forEach(function(a){a.value&&!c.includes(a.value)&&(b.push(a),c.push(a.value))}),b}function isCurrencyOptionAndFitsQuery(a,b){return!!a.value&&(contains(a.label,b)||contains(a.searchable,b)||contains(a.note,b))}function contains(a,b){return a&&a.toLowerCase().includes(b.toLowerCase())}function sortOptionsLabelsToFirst(a,b){return a.sort(function(a,c){var d=contains(a.label,b),e=contains(c.label,b);return d&&e?0:d?-1:e?1:0})}MoneyInput.propTypes={id:PropTypes.string,currencies:PropTypes.arrayOf(Currency).isRequired,selectedCurrency:Currency.isRequired,onCurrencyChange:PropTypes.func,placeholder:PropTypes.number,amount:PropTypes.number,size:PropTypes.oneOf(["sm","md","lg"]),onAmountChange:PropTypes.func,addon:PropTypes.node,searchPlaceholder:PropTypes.string,/**
1
+ import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _createSuper(a){var b=_isNativeReflectConstruct();return function(){var c,d=_getPrototypeOf(a);if(b){var e=_getPrototypeOf(this).constructor;c=Reflect.construct(d,arguments,e)}else c=d.apply(this,arguments);return _possibleConstructorReturn(this,c)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}import{isEmpty,isNumber,isNull}from"@transferwise/neptune-validation";import classNames from"classnames";import PropTypes from"prop-types";import{Component}from"react";import{injectIntl}from"react-intl";import{Key as keyValues}from"../common/key";import keyCodes from"../common/keyCodes";import{Size}from"../common/propsValues/size";import Select from"../select";import messages from"./MoneyInput.messages";import{formatAmount,parseAmount}from"./currencyFormatting";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Currency=PropTypes.shape({header:PropTypes.string,value:PropTypes.string,label:PropTypes.string,currency:PropTypes.string,note:PropTypes.string,searchable:PropTypes.string}),CUSTOM_ACTION="CUSTOM_ACTION",isNumberOrNull=function(a){return isNumber(a)||isNull(a)},formatAmountIfSet=function(a,b,c){return"number"==typeof a?formatAmount(a,b,c):""},inputKeyCodeAllowlist=new Set([keyCodes.BACKSPACE,keyCodes.DELETE,keyCodes.COMMA,keyCodes.PERIOD,keyCodes.DOWN,keyCodes.UP,keyCodes.LEFT,keyCodes.RIGHT,keyCodes.ENTER,keyCodes.ESCAPE,keyCodes.TAB]),inputKeyAllowlist=new Set([keyValues.PERIOD,keyValues.COMMA]),MoneyInput=/*#__PURE__*/function(a){function b(a){var d;_classCallCheck(this,b),d=c.call(this,a),_defineProperty(_assertThisInitialized(d),"isInputAllowedForKeyEvent",function(a){var b=a.keyCode,c=a.metaKey,d=a.key,e=a.ctrlKey,f=isNumber(parseInt(d,10));return f||c||e||inputKeyCodeAllowlist.has(b)||inputKeyAllowlist.has(d)}),_defineProperty(_assertThisInitialized(d),"handleKeyDown",function(a){d.isInputAllowedForKeyEvent(a)||a.preventDefault()}),_defineProperty(_assertThisInitialized(d),"handlePaste",function(a){var b=(a.clipboardData||window.clipboardData).getData("text"),c=d.state.locale,e=isEmpty(b)?null:parseAmount(b,d.props.selectedCurrency.currency,c);isNumberOrNull(e)&&(d.setState({formattedAmount:formatAmountIfSet(e,d.props.selectedCurrency.currency,c)}),d.props.onAmountChange(e)),a.preventDefault()}),_defineProperty(_assertThisInitialized(d),"onAmountChange",function(a){var b=a.target.value;d.setState({formattedAmount:b});var c=isEmpty(b)?null:parseAmount(b,d.props.selectedCurrency.currency,d.state.locale);isNumberOrNull(c)&&d.props.onAmountChange(c)}),_defineProperty(_assertThisInitialized(d),"onAmountBlur",function(){d.amountFocused=!1,d.setAmount()}),_defineProperty(_assertThisInitialized(d),"onAmountFocus",function(){d.amountFocused=!0}),_defineProperty(_assertThisInitialized(d),"handleSelectChange",function(a){d.handleSearchChange(""),d.props.onCustomAction&&a.value===CUSTOM_ACTION?d.props.onCustomAction():d.props.onCurrencyChange(a)}),_defineProperty(_assertThisInitialized(d),"handleSearchChange",function(a){d.setState({searchQuery:a}),d.props.onSearchChange&&d.props.onSearchChange({searchQuery:a,filteredOptions:filterOptionsForQuery(d.props.currencies,a)})}),_defineProperty(_assertThisInitialized(d),"style",function(a){return d.props.classNames[a]||a});var e=d.props.intl.locale;return d.formatMessage=d.props.intl.formatMessage,d.state={searchQuery:"",formattedAmount:formatAmountIfSet(a.amount,a.selectedCurrency.currency,e),locale:e},d}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"UNSAFE_componentWillReceiveProps",value:function UNSAFE_componentWillReceiveProps(a){var b;if(this.setState({locale:null===a||void 0===a||null===(b=a.intl)||void 0===b?void 0:b.locale}),!this.amountFocused){var c;this.setState({formattedAmount:formatAmountIfSet(a.amount,a.selectedCurrency.currency,null===a||void 0===a||null===(c=a.intl)||void 0===c?void 0:c.locale)})}}},{key:"getSelectOptions",value:function getSelectOptions(){var a=_toConsumableArray(filterOptionsForQuery(this.props.currencies,this.state.searchQuery));return this.props.onCustomAction&&a.push({value:CUSTOM_ACTION,label:this.props.customActionLabel}),a}},{key:"setAmount",value:function setAmount(){var a=this;this.setState(function(b){var c=parseAmount(b.formattedAmount,a.props.selectedCurrency.currency,a.state.locale);return isNumberOrNull(c)?{formattedAmount:formatAmountIfSet(c,a.props.selectedCurrency.currency,b.locale)}:{formattedAmount:b.formattedAmount}})}},{key:"render",value:function render(){var a=this.props,b=a.selectedCurrency,c=a.onCurrencyChange,d=a.size,e=a.addon,f=this.getSelectOptions(),g=!this.state.searchQuery&&(1===f.length&&f[0].currency===b.currency||!c),h=!this.props.onAmountChange;return/*#__PURE__*/_jsxs("div",{className:classNames(this.style("tw-money-input"),this.style("input-group"),this.style("input-group-".concat(d))),children:[/*#__PURE__*/_jsx("input",{id:this.props.id,value:this.state.formattedAmount,type:"text",inputMode:"decimal",className:classNames(this.style("form-control")),disabled:h,placeholder:formatAmountIfSet(this.props.placeholder,this.props.selectedCurrency.currency,this.state.locale),autoComplete:"off",onKeyDown:this.handleKeyDown,onChange:this.onAmountChange,onFocus:this.onAmountFocus,onBlur:this.onAmountBlur,onPaste:this.handlePaste}),e&&/*#__PURE__*/_jsx("span",{className:classNames(this.style("input-group-addon"),this.style("input-".concat(d)),h?this.style("tw-money-input--disabled"):""),children:e}),g?/*#__PURE__*/_jsxs("div",{className:classNames(this.style("input-group-addon"),this.style("input-".concat(d)),this.style("tw-money-input__fixed-currency"),h?this.style("tw-money-input--disabled"):""),children:[("lg"===d||"md"===d)&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("i",{className:classNames(this.style("tw-money-input__keyline"))}),/*#__PURE__*/_jsx("i",{className:classNames(this.style("currency-flag"),this.style("currency-flag-".concat(b.currency.toLowerCase())),this.style("hidden-xs"),this.style("m-r-2"))})]}),/*#__PURE__*/_jsx("span",{className:"lg"===d?this.style("m-r-1"):"",children:b.currency.toUpperCase()})]}):/*#__PURE__*/_jsx("div",{className:classNames(this.style("input-group-btn"),this.style("amount-currency-select-btn")),children:/*#__PURE__*/_jsx(Select,{classNames:this.props.classNames,options:f,selected:_objectSpread(_objectSpread({},b),{},{note:null}),placeholder:this.formatMessage(messages.selectPlaceholder),searchPlaceholder:this.props.searchPlaceholder,searchValue:this.state.searchQuery,size:d,required:!0,dropdownRight:"xs",dropdownWidth:"lg",inverse:!0,onChange:this.handleSelectChange,onSearchChange:this.handleSearchChange})})]})}}]),b}(Component);function filterOptionsForQuery(a,b){if(!b)return a;var c=removeDuplicateValueOptions(a).filter(function(a){return isCurrencyOptionAndFitsQuery(a,b)});return sortOptionsLabelsToFirst(c,b)}function removeDuplicateValueOptions(a){var b=[],c=[];return a.forEach(function(a){a.value&&!c.includes(a.value)&&(b.push(a),c.push(a.value))}),b}function isCurrencyOptionAndFitsQuery(a,b){return!!a.value&&(contains(a.label,b)||contains(a.searchable,b)||contains(a.note,b))}function contains(a,b){return a&&a.toLowerCase().includes(b.toLowerCase())}function sortOptionsLabelsToFirst(a,b){return a.sort(function(a,c){var d=contains(a.label,b),e=contains(c.label,b);return d&&e?0:d?-1:e?1:0})}MoneyInput.propTypes={id:PropTypes.string,currencies:PropTypes.arrayOf(Currency).isRequired,selectedCurrency:Currency.isRequired,onCurrencyChange:PropTypes.func,placeholder:PropTypes.number,amount:PropTypes.number,size:PropTypes.oneOf(["sm","md","lg"]),onAmountChange:PropTypes.func,addon:PropTypes.node,searchPlaceholder:PropTypes.string,/**
2
2
  * Allows the consumer to react to searching, while the search itself is handled internally. Called with `{ searchQuery: string, filteredOptions: Currency[] }`
3
3
  */onSearchChange:PropTypes.func,customActionLabel:PropTypes.node,onCustomAction:PropTypes.func,classNames:PropTypes.objectOf(PropTypes.string)},MoneyInput.defaultProps={id:null,size:Size.LARGE,addon:null,searchPlaceholder:"",onSearchChange:void 0,onCurrencyChange:null,placeholder:null,amount:null,onAmountChange:null,customActionLabel:"",onCustomAction:null,classNames:{}};// this export is necessary for react-to-typescript-definitions
4
4
  // to be able to properly generate TS types, this is due to us wrapping this component in `injectIntl` before exporting
@@ -1,4 +1,4 @@
1
- import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _defineProperty from"@babel/runtime/helpers/defineProperty";var _UPLOAD_STEP_COMPONEN;import _regeneratorRuntime from"@babel/runtime/regenerator";function _createSuper(a){var b=_isNativeReflectConstruct();return function(){var c,d=_getPrototypeOf(a);if(b){var e=_getPrototypeOf(this).constructor;c=Reflect.construct(d,arguments,e)}else c=d.apply(this,arguments);return _possibleConstructorReturn(this,c)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}import{Plus as PlusIcon}from"@transferwise/icons";import classNames from"classnames";import PropTypes from"prop-types";import{Component}from"react";import{injectIntl}from"react-intl";import{Status}from"../common";import messages from"./Upload.messages";import{UploadImageStep,MediaUploadStep,ProcessingStep,CompleteStep}from"./steps";import{UploadStep}from"./uploadSteps";import{postData,asyncFileRead,isSizeValid,isTypeValid,getFileType}from"./utils";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var PROCESS_STATE=["error","success"],ANIMATION_FIX=10,MAX_SIZE_DEFAULT=5e6,UPLOAD_STEP_COMPONENTS=(_UPLOAD_STEP_COMPONEN={},_defineProperty(_UPLOAD_STEP_COMPONEN,UploadStep.UPLOAD_IMAGE_STEP,UploadImageStep),_defineProperty(_UPLOAD_STEP_COMPONEN,UploadStep.MEDIA_UPLOAD_STEP,MediaUploadStep),_UPLOAD_STEP_COMPONEN),Upload=/*#__PURE__*/function(a){function b(a){var d;return _classCallCheck(this,b),d=c.call(this,a),_defineProperty(_assertThisInitialized(d),"onAnimationCompleted",/*#__PURE__*/function(){var a=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function a(b){var c,e,f,g,h,i,j;return _regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:c=d.state,e=c.response,f=c.isProcessing,g=c.fileName,h=d.props.animationDelay,f&&b===Status.SUCCEEDED&&(i=d.props.onSuccess,d.timeouts=setTimeout(function(){d.setState({isProcessing:!1,isComplete:!0},function(){return i?i(e,g):{}})},h)),f&&b===Status.FAILED&&(j=d.props.onFailure,d.timeouts=setTimeout(function(){d.setState({isProcessing:!1,isComplete:!0},function(){return j?j(e):{}})},h));case 4:case"end":return a.stop();}},a)}));return function(){return a.apply(this,arguments)}}()),_defineProperty(_assertThisInitialized(d),"asyncPost",function(a){var b=d.props.httpOptions,c=b||{},e=c.fileInputName,f=void 0===e?a.name:e,g=c.data,h=void 0===g?{}:g,i=new FormData;return i.append(f,a),Object.keys(h).forEach(function(a){return i.append(a,h[a])}),postData(d.prepareHttpOptions(b),i)}),_defineProperty(_assertThisInitialized(d),"asyncResponse",function(a,b){d.timeouts=setTimeout(function(){d.setState({response:a,isError:b===PROCESS_STATE[0],isSuccess:b===PROCESS_STATE[1]})},ANIMATION_FIX)}),_defineProperty(_assertThisInitialized(d),"prepareHttpOptions",function(a){if(!a.url)throw new Error("You must supply a URL to post image data asynchronously");return a}),_defineProperty(_assertThisInitialized(d),"handleOnClear",function(a){a.preventDefault();var b=d.props.onCancel;b&&b(),d.reset()}),_defineProperty(_assertThisInitialized(d),"reset",function(){d.dragCounter=0,clearTimeout(d.timeouts),d.setState({isComplete:!1,isError:!1,isProcessing:!1,isSuccess:!1})}),_defineProperty(_assertThisInitialized(d),"showDataImage",function(a){var b=d.state.isImage;b&&d.setState({uploadedImage:a})}),_defineProperty(_assertThisInitialized(d),"fileDropped",/*#__PURE__*/function(){var a=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function a(b){var c,e,f,g,h,i,j,k,l;return _regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(c=d.props,e=c.httpOptions,f=c.maxSize,g=c.onStart,h=c.usDisabled,i=c.usAccept,!h){a.next=3;break}return a.abrupt("return",!1);case 3:if(b){a.next=5;break}throw new Error("Could not retrieve file");case 5:return d.setState({fileName:b.name,isDroppable:!1,isProcessing:!0}),g&&g(b),j=null,a.prev=8,a.next=11,asyncFileRead(b);case 11:j=a.sent,a.next=17;break;case 14:a.prev=14,a.t0=a["catch"](8),d.asyncResponse(a.t0,PROCESS_STATE[0]);case 17:if(j){a.next=19;break}return a.abrupt("return",!1);case 19:if(d.setState({isImage:getFileType(b,j).includes("image")}),isTypeValid(b,i,j)){a.next=24;break}return k={status:415,statusText:"Unsupported Media Type"},d.asyncResponse(k,PROCESS_STATE[0]),a.abrupt("return",!1);case 24:if(isSizeValid(b,f)){a.next=28;break}return l={status:413,statusText:"Request Entity Too Large"},d.asyncResponse(l,PROCESS_STATE[0]),a.abrupt("return",!1);case 28:if(!e){a.next=32;break}return a.next=31,d.asyncPost(b).then(function(a){return d.asyncResponse(a,"success")}).then(function(){return d.showDataImage(j),!0}).catch(function(a){return d.asyncResponse(a,PROCESS_STATE[0]),!1});case 31:return a.abrupt("return",a.sent);case 32:return d.showDataImage(j),d.asyncResponse(j,"success"),a.abrupt("return",!0);case 35:case"end":return a.stop();}},a,null,[[8,14]])}));return function(){return a.apply(this,arguments)}}()),d.dragCounter=0,d.timeouts=null,d.state={fileName:"",isComplete:!1,isError:!1,isImage:!1,isProcessing:!1,isSuccess:!1,response:null,uploadedImage:null},d}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"getErrorMessage",value:function getErrorMessage(a){return 413===a?this.props.csTooLargeMessage||this.props.intl.formatMessage(messages.csTooLargeMessage):415===a?this.props.csWrongTypeMessage||this.props.intl.formatMessage(messages.csWrongTypeMessage):this.props.csFailureText||this.props.intl.formatMessage(messages.csFailureText)}},{key:"onDragLeave",value:function onDragLeave(a){a.preventDefault(),this.dragCounter-=1,0===this.dragCounter&&this.setState({isDroppable:!1})}},{key:"onDragEnter",value:function onDragEnter(a){a.preventDefault(),this.dragCounter+=1;var b=this.props.usDisabled;1!==this.dragCounter||b||this.setState({isDroppable:!0})}},{key:"onDrop",value:function onDrop(a){a.preventDefault(),this.reset(),a.dataTransfer&&a.dataTransfer.files&&a.dataTransfer.files[0]&&this.fileDropped(a.dataTransfer.files[0])}},{key:"render",value:function render(){var a=this,b=this.props,c=b.usDropMessage,d=b.usAccept,e=b.usButtonText,f=b.usDisabled,g=b.usHelpImage,h=b.usLabel,i=b.usPlaceholder,j=b.psButtonText,k=b.psProcessingText,l=b.csButtonText,m=b.csSuccessText,n=b.size,o=b.uploadStep,p=b.intl,q=this.state,r=q.response,s=q.fileName,t=q.isComplete,u=q.isDroppable,v=q.isError,w=q.isImage,x=q.isProcessing,y=q.isSuccess,z=q.uploadedImage,A=UPLOAD_STEP_COMPONENTS[o]||UploadImageStep;return/*#__PURE__*/_jsxs("div",{className:classNames({droppable:!0,"tw-droppable-sm droppable-sm":"sm"===n,"tw-droppable-md droppable-md":"md"===n||!n,"tw-droppable-lg droppable-lg":"lg"===n,"droppable-dropping":u,"droppable-processing":x,"droppable-complete":t}),onDragEnter:function onDragEnter(b){return a.onDragEnter(b)},onDragLeave:function onDragLeave(b){return a.onDragLeave(b)},onDrop:function onDrop(b){return a.onDrop(b)},onDragOver:function onDragOver(a){return a.preventDefault()},children:[!x&&!t&&/*#__PURE__*/_jsx(A,{fileDropped:function fileDropped(b){return a.fileDropped(b)},isComplete:t,usAccept:d,usButtonText:e||p.formatMessage(messages.usButtonText),usDisabled:f,usHelpImage:g,usLabel:h,usPlaceholder:i||p.formatMessage(messages.usPlaceholder)}),x&&/*#__PURE__*/_jsx(ProcessingStep,{isComplete:t,isError:v,isSuccess:y,psButtonText:j||p.formatMessage(messages.psButtonText),psProcessingText:k||p.formatMessage(messages.psProcessingText),onAnimationCompleted:function onAnimationCompleted(b){return a.onAnimationCompleted(b)},onClear:function onClear(b){return a.handleOnClear(b)}}),(y||v||t)&&/*#__PURE__*/_jsx(CompleteStep,{fileName:s,isComplete:t,isError:v,isImage:w,csButtonText:l||p.formatMessage(messages.csButtonText),csFailureText:this.getErrorMessage(null===r||void 0===r?void 0:r.status),csSuccessText:m||p.formatMessage(messages.csSuccessText),uploadedImage:z,onClear:function onClear(b){return a.handleOnClear(b)}}),!x&&/*#__PURE__*/_jsx("div",{className:"droppable-dropping-card droppable-card",children:/*#__PURE__*/_jsxs("div",{className:"droppable-card-content",children:[/*#__PURE__*/_jsx("div",{className:"circle circle-sm p-t-1 text-info",children:/*#__PURE__*/_jsx(PlusIcon,{})}),/*#__PURE__*/_jsx("h4",{className:"m-t-3",children:c||p.formatMessage(messages.usDropMessage)})]})})]})}}]),b}(Component);/*
1
+ import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _defineProperty from"@babel/runtime/helpers/defineProperty";var _UPLOAD_STEP_COMPONEN;import _regeneratorRuntime from"@babel/runtime/regenerator";function _createSuper(a){var b=_isNativeReflectConstruct();return function(){var c,d=_getPrototypeOf(a);if(b){var e=_getPrototypeOf(this).constructor;c=Reflect.construct(d,arguments,e)}else c=d.apply(this,arguments);return _possibleConstructorReturn(this,c)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}import{Plus as PlusIcon}from"@transferwise/icons";import classNames from"classnames";import PropTypes from"prop-types";import{Component}from"react";import{injectIntl}from"react-intl";import{Status}from"../common";import messages from"./Upload.messages";import{UploadImageStep,MediaUploadStep,ProcessingStep,CompleteStep}from"./steps";import{UploadStep}from"./uploadSteps";import{postData,asyncFileRead,isSizeValid,isTypeValid,getFileType}from"./utils";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var PROCESS_STATE=["error","success"],ANIMATION_FIX=10,MAX_SIZE_DEFAULT=5e6,UPLOAD_STEP_COMPONENTS=(_UPLOAD_STEP_COMPONEN={},_defineProperty(_UPLOAD_STEP_COMPONEN,UploadStep.UPLOAD_IMAGE_STEP,UploadImageStep),_defineProperty(_UPLOAD_STEP_COMPONEN,UploadStep.MEDIA_UPLOAD_STEP,MediaUploadStep),_UPLOAD_STEP_COMPONEN),Upload=/*#__PURE__*/function(a){function b(a){var d;return _classCallCheck(this,b),d=c.call(this,a),_defineProperty(_assertThisInitialized(d),"onAnimationCompleted",/*#__PURE__*/function(){var a=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function a(b){var c,e,f,g,h,i,j;return _regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:c=d.state,e=c.response,f=c.isProcessing,g=c.fileName,h=d.props.animationDelay,f&&b===Status.SUCCEEDED&&(i=d.props.onSuccess,d.timeouts=setTimeout(function(){d.setState({isProcessing:!1,isComplete:!0},function(){return i?i(e,g):{}})},h)),f&&b===Status.FAILED&&(j=d.props.onFailure,d.timeouts=setTimeout(function(){d.setState({isProcessing:!1,isComplete:!0},function(){return j?j(e):{}})},h));case 4:case"end":return a.stop();}},a)}));return function(){return a.apply(this,arguments)}}()),_defineProperty(_assertThisInitialized(d),"asyncPost",function(a){var b=d.props.httpOptions,c=b||{},e=c.fileInputName,f=void 0===e?a.name:e,g=c.data,h=void 0===g?{}:g,i=new FormData;return i.append(f,a),Object.keys(h).forEach(function(a){return i.append(a,h[a])}),postData(d.prepareHttpOptions(b),i)}),_defineProperty(_assertThisInitialized(d),"asyncResponse",function(a,b){d.timeouts=setTimeout(function(){d.setState({response:a,isError:b===PROCESS_STATE[0],isSuccess:b===PROCESS_STATE[1]})},ANIMATION_FIX)}),_defineProperty(_assertThisInitialized(d),"prepareHttpOptions",function(a){if(!a.url)throw new Error("You must supply a URL to post image data asynchronously");return a}),_defineProperty(_assertThisInitialized(d),"handleOnClear",function(a){a.preventDefault();var b=d.props.onCancel;b&&b(),d.reset()}),_defineProperty(_assertThisInitialized(d),"reset",function(){d.dragCounter=0,clearTimeout(d.timeouts),d.setState({isComplete:!1,isError:!1,isProcessing:!1,isSuccess:!1})}),_defineProperty(_assertThisInitialized(d),"showDataImage",function(a){var b=d.state.isImage;b&&d.setState({uploadedImage:a})}),_defineProperty(_assertThisInitialized(d),"fileDropped",/*#__PURE__*/function(){var a=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function a(b){var c,e,f,g,h,i,j,k,l,m;return _regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(c=d.props,e=c.httpOptions,f=c.maxSize,g=c.onStart,h=c.usDisabled,i=c.usAccept,j=d.state.isProcessing,!(h||j)){a.next=4;break}return a.abrupt("return",!1);case 4:if(b){a.next=6;break}throw new Error("Could not retrieve file");case 6:return d.setState({fileName:b.name,isDroppable:!1,isProcessing:!0}),g&&g(b),k=null,a.prev=9,a.next=12,asyncFileRead(b);case 12:k=a.sent,a.next=18;break;case 15:a.prev=15,a.t0=a["catch"](9),d.asyncResponse(a.t0,PROCESS_STATE[0]);case 18:if(k){a.next=20;break}return a.abrupt("return",!1);case 20:if(d.setState({isImage:getFileType(b,k).includes("image")}),isTypeValid(b,i,k)){a.next=25;break}return l={status:415,statusText:"Unsupported Media Type"},d.asyncResponse(l,PROCESS_STATE[0]),a.abrupt("return",!1);case 25:if(isSizeValid(b,f)){a.next=29;break}return m={status:413,statusText:"Request Entity Too Large"},d.asyncResponse(m,PROCESS_STATE[0]),a.abrupt("return",!1);case 29:if(!e){a.next=33;break}return a.next=32,d.asyncPost(b).then(function(a){return d.asyncResponse(a,"success")}).then(function(){return d.showDataImage(k),!0}).catch(function(a){return d.asyncResponse(a,PROCESS_STATE[0]),!1});case 32:return a.abrupt("return",a.sent);case 33:return d.showDataImage(k),d.asyncResponse(k,"success"),a.abrupt("return",!0);case 36:case"end":return a.stop();}},a,null,[[9,15]])}));return function(){return a.apply(this,arguments)}}()),d.dragCounter=0,d.timeouts=null,d.state={fileName:"",isComplete:!1,isError:!1,isImage:!1,isProcessing:!1,isSuccess:!1,response:null,uploadedImage:null},d}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"getErrorMessage",value:function getErrorMessage(a){return 413===a?this.props.csTooLargeMessage||this.props.intl.formatMessage(messages.csTooLargeMessage):415===a?this.props.csWrongTypeMessage||this.props.intl.formatMessage(messages.csWrongTypeMessage):this.props.csFailureText||this.props.intl.formatMessage(messages.csFailureText)}},{key:"onDragLeave",value:function onDragLeave(a){a.preventDefault(),this.dragCounter-=1,0===this.dragCounter&&this.setState({isDroppable:!1})}},{key:"onDragEnter",value:function onDragEnter(a){a.preventDefault(),this.dragCounter+=1;var b=this.props.usDisabled,c=this.state.isProcessing;1!==this.dragCounter||b||c||this.setState({isDroppable:!0})}},{key:"onDrop",value:function onDrop(a){var b=this.state.isProcessing;a.preventDefault(),b||this.reset(),a.dataTransfer&&a.dataTransfer.files&&a.dataTransfer.files[0]&&this.fileDropped(a.dataTransfer.files[0])}},{key:"render",value:function render(){var a=this,b=this.props,c=b.usDropMessage,d=b.usAccept,e=b.usButtonText,f=b.usDisabled,g=b.usHelpImage,h=b.usLabel,i=b.usPlaceholder,j=b.psButtonText,k=b.psProcessingText,l=b.csButtonText,m=b.csSuccessText,n=b.size,o=b.uploadStep,p=b.intl,q=this.state,r=q.response,s=q.fileName,t=q.isComplete,u=q.isDroppable,v=q.isError,w=q.isImage,x=q.isProcessing,y=q.isSuccess,z=q.uploadedImage,A=UPLOAD_STEP_COMPONENTS[o]||UploadImageStep;return/*#__PURE__*/_jsxs("div",{className:classNames({droppable:!0,"tw-droppable-sm droppable-sm":"sm"===n,"tw-droppable-md droppable-md":"md"===n||!n,"tw-droppable-lg droppable-lg":"lg"===n,"droppable-dropping":u,"droppable-processing":x,"droppable-complete":t}),onDragEnter:function onDragEnter(b){return a.onDragEnter(b)},onDragLeave:function onDragLeave(b){return a.onDragLeave(b)},onDrop:function onDrop(b){return a.onDrop(b)},onDragOver:function onDragOver(a){return a.preventDefault()},children:[!x&&!t&&/*#__PURE__*/_jsx(A,{fileDropped:function fileDropped(b){return a.fileDropped(b)},isComplete:t,usAccept:d,usButtonText:e||p.formatMessage(messages.usButtonText),usDisabled:f,usHelpImage:g,usLabel:h,usPlaceholder:i||p.formatMessage(messages.usPlaceholder)}),x&&/*#__PURE__*/_jsx(ProcessingStep,{isComplete:t,isError:v,isSuccess:y,psButtonText:j||p.formatMessage(messages.psButtonText),psProcessingText:k||p.formatMessage(messages.psProcessingText),onAnimationCompleted:function onAnimationCompleted(b){return a.onAnimationCompleted(b)},onClear:function onClear(b){return a.handleOnClear(b)}}),(y||v||t)&&/*#__PURE__*/_jsx(CompleteStep,{fileName:s,isComplete:t,isError:v,isImage:w,csButtonText:l||p.formatMessage(messages.csButtonText),csFailureText:this.getErrorMessage(null===r||void 0===r?void 0:r.status),csSuccessText:m||p.formatMessage(messages.csSuccessText),uploadedImage:z,onClear:function onClear(b){return a.handleOnClear(b)}}),!x&&/*#__PURE__*/_jsx("div",{className:"droppable-dropping-card droppable-card",children:/*#__PURE__*/_jsxs("div",{className:"droppable-card-content",children:[/*#__PURE__*/_jsx("div",{className:"circle circle-sm p-t-1 text-info",children:/*#__PURE__*/_jsx(PlusIcon,{})}),/*#__PURE__*/_jsx("h4",{className:"m-t-3",children:c||p.formatMessage(messages.usDropMessage)})]})})]})}}]),b}(Component);/*
2
2
  * This delay is required for the isError/isSuccess to be fired after isProcessing so the processIndicator, will be
3
3
  * rendered first and then updated with the right status.
4
4
  */Upload.propTypes={animationDelay:PropTypes.number,csButtonText:PropTypes.string,csFailureText:PropTypes.string,csSuccessText:PropTypes.string,csTooLargeMessage:PropTypes.string,csWrongTypeMessage:PropTypes.string,httpOptions:PropTypes.shape({url:PropTypes.string.isRequired,method:PropTypes.oneOf(["POST","PUT","PATCH"]),fileInputName:PropTypes.string,data:PropTypes.object,headers:PropTypes.object}),maxSize:PropTypes.number,onCancel:PropTypes.func,onFailure:PropTypes.func,onStart:PropTypes.func,onSuccess:PropTypes.func,psButtonText:PropTypes.string,psProcessingText:PropTypes.string,size:PropTypes.oneOf(["sm","md","lg"]),/**
@@ -1,4 +1,5 @@
1
1
  {
2
+ "neptune.Chips.ariaLabel": "Descartar {choice}",
2
3
  "neptune.ClearButton.ariaLabel": "Borrar",
3
4
  "neptune.CloseButton.ariaLabel": "Cerrar",
4
5
  "neptune.DateInput.day.label": "Día",
@@ -24,8 +25,8 @@
24
25
  "neptune.UploadButton.allFileTypes": "Todos los tipos de archivos",
25
26
  "neptune.UploadButton.dropFiles": "Arrastra un archivo para subirlo",
26
27
  "neptune.UploadButton.instructions": "{fileTypes}, menor que {size}MB",
27
- "neptune.UploadButton.uploadFile": "Subir archivo",
28
- "neptune.UploadButton.uploadFiles": "Subir archivos",
28
+ "neptune.UploadButton.uploadFile": "Cargar archivo",
29
+ "neptune.UploadButton.uploadFiles": "Cargar archivos",
29
30
  "neptune.UploadInput.deleteModalBody": "La eliminación de este archivo lo borrará de nuestro sistema.",
30
31
  "neptune.UploadInput.deleteModalCancelButtonText": "Cancelar",
31
32
  "neptune.UploadInput.deleteModalConfirmButtonText": "Eliminar",
@@ -1,9 +1,17 @@
1
1
  {
2
+ "neptune.Chips.ariaLabel": "Effacer {choice}",
3
+ "neptune.ClearButton.ariaLabel": "Effacer",
2
4
  "neptune.CloseButton.ariaLabel": "Fermer",
5
+ "neptune.DateInput.day.label": "Jour",
6
+ "neptune.DateInput.month.label": "Mois",
7
+ "neptune.DateInput.year.label": "Année",
3
8
  "neptune.MoneyInput.Select.placeholder": "Sélectionner une option...",
4
9
  "neptune.Pagination.ariaLabel": "Navigation par pagination",
5
10
  "neptune.PaginationLink.ariaLabel.active": "Aller à la page {pageNumber}",
6
11
  "neptune.PaginationLink.ariaLabel.inactive": "Page actuelle, page {pageNumber}",
12
+ "neptune.Summary.statusDone": "Validé",
13
+ "neptune.Summary.statusNotDone": "À compléter",
14
+ "neptune.Summary.statusPending": "En attente",
7
15
  "neptune.Upload.csButtonText": "Envoyer un autre fichier ?",
8
16
  "neptune.Upload.csFailureText": "Échec du téléchargement. Veuillez réessayer",
9
17
  "neptune.Upload.csSuccessText": "Téléchargement terminé !",
@@ -13,5 +21,22 @@
13
21
  "neptune.Upload.psProcessingText": "Téléchargement...",
14
22
  "neptune.Upload.usButtonText": "Ou sélectionnez un fichier",
15
23
  "neptune.Upload.usDropMessage": "Déposer un fichier pour démarrer le téléchargement",
16
- "neptune.Upload.usPlaceholder": "Glissez et déposez un fichier inférieur à 5 Mo"
24
+ "neptune.Upload.usPlaceholder": "Glissez et déposez un fichier inférieur à 5 Mo",
25
+ "neptune.UploadButton.allFileTypes": "Tous types de fichiers",
26
+ "neptune.UploadButton.dropFiles": "Déposer un fichier pour démarrer le téléchargement",
27
+ "neptune.UploadButton.instructions": "{fileTypes}, inférieur à {size} Mo",
28
+ "neptune.UploadButton.uploadFile": "Envoyer le fichier",
29
+ "neptune.UploadButton.uploadFiles": "Transférer des documents",
30
+ "neptune.UploadInput.deleteModalBody": "La suppression de ce fichier sera définitive sur notre système.",
31
+ "neptune.UploadInput.deleteModalCancelButtonText": "Annuler",
32
+ "neptune.UploadInput.deleteModalConfirmButtonText": "Supprimer",
33
+ "neptune.UploadInput.deleteModalTitle": "Voulez-vous vraiment supprimer ce fichier ?",
34
+ "neptune.UploadInput.fileIsTooLarge": "Fichier trop lourd",
35
+ "neptune.UploadInput.fileTypeNotSupported": "Type de fichier non pris en charge",
36
+ "neptune.UploadItem.deleting": "Suppression...",
37
+ "neptune.UploadItem.removeFile": "Supprimer le fichier {filename}",
38
+ "neptune.UploadItem.uploaded": "Téléchargé",
39
+ "neptune.UploadItem.uploadedFile": "Fichier téléchargé",
40
+ "neptune.UploadItem.uploading": "Téléchargement...",
41
+ "neptune.UploadItem.uploadingFailed": "Échec du téléchargement"
17
42
  }
@@ -10,7 +10,7 @@
10
10
  "neptune.PaginationLink.ariaLabel.active": "Ugrás a(z) {pageNumber}. oldalra",
11
11
  "neptune.PaginationLink.ariaLabel.inactive": "Jelenlegi oldal, {pageNumber}. oldal",
12
12
  "neptune.Summary.statusDone": "Kész",
13
- "neptune.Summary.statusNotDone": "Hátralévő feladat",
13
+ "neptune.Summary.statusNotDone": "Hátravan",
14
14
  "neptune.Summary.statusPending": "Függőben",
15
15
  "neptune.Upload.csButtonText": "Másik fájl feltöltése?",
16
16
  "neptune.Upload.csFailureText": "Feltöltés sikertelen. Kérünk, próbáld újra",
@@ -1,9 +1,17 @@
1
1
  {
2
+ "neptune.Chips.ariaLabel": "Rimuovi {choice}",
3
+ "neptune.ClearButton.ariaLabel": "Elimina",
2
4
  "neptune.CloseButton.ariaLabel": "Chiudi",
5
+ "neptune.DateInput.day.label": "Giorno",
6
+ "neptune.DateInput.month.label": "Mese",
7
+ "neptune.DateInput.year.label": "Anno",
3
8
  "neptune.MoneyInput.Select.placeholder": "Seleziona un'opzione...",
4
9
  "neptune.Pagination.ariaLabel": "Navigazione",
5
10
  "neptune.PaginationLink.ariaLabel.active": "Via a pagina {pageNumber}",
6
11
  "neptune.PaginationLink.ariaLabel.inactive": "Pagina corrente, pagina {pageNumber}",
12
+ "neptune.Summary.statusDone": "Completato",
13
+ "neptune.Summary.statusNotDone": "Da completare",
14
+ "neptune.Summary.statusPending": "In corso",
7
15
  "neptune.Upload.csButtonText": "Carica un altro documento?",
8
16
  "neptune.Upload.csFailureText": "Caricamento fallito. Per favore riprova",
9
17
  "neptune.Upload.csSuccessText": "Caricamento completato!",
@@ -13,5 +21,22 @@
13
21
  "neptune.Upload.psProcessingText": "Caricamento...",
14
22
  "neptune.Upload.usButtonText": "O seleziona un documento",
15
23
  "neptune.Upload.usDropMessage": "Rilascia il documento per iniziare il caricamento",
16
- "neptune.Upload.usPlaceholder": "Trascina e rilascia un file inferiore a 5MB"
24
+ "neptune.Upload.usPlaceholder": "Trascina e rilascia un file inferiore a 5MB",
25
+ "neptune.UploadButton.allFileTypes": "Tutti i tipi di file",
26
+ "neptune.UploadButton.dropFiles": "Rilascia file per iniziare a caricare",
27
+ "neptune.UploadButton.instructions": "{fileTypes}, minore di {size}MB",
28
+ "neptune.UploadButton.uploadFile": "Carica un file",
29
+ "neptune.UploadButton.uploadFiles": "Carica i file",
30
+ "neptune.UploadInput.deleteModalBody": "Rimuovere questo file lo cancellerà dal nostro sistema.",
31
+ "neptune.UploadInput.deleteModalCancelButtonText": "Annulla",
32
+ "neptune.UploadInput.deleteModalConfirmButtonText": "Rimuovi",
33
+ "neptune.UploadInput.deleteModalTitle": "Vuoi davvero cancellare questo file?",
34
+ "neptune.UploadInput.fileIsTooLarge": "File troppo grande",
35
+ "neptune.UploadInput.fileTypeNotSupported": "Tipo di file non supportato",
36
+ "neptune.UploadItem.deleting": "Eliminando...",
37
+ "neptune.UploadItem.removeFile": "Rimuovi file {filename}",
38
+ "neptune.UploadItem.uploaded": "Caricato",
39
+ "neptune.UploadItem.uploadedFile": "File caricato",
40
+ "neptune.UploadItem.uploading": "Caricamento...",
41
+ "neptune.UploadItem.uploadingFailed": "Caricamento fallito"
17
42
  }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "neptune.Chips.ariaLabel": "{choice} をクリア",
2
3
  "neptune.ClearButton.ariaLabel": "消去",
3
4
  "neptune.CloseButton.ariaLabel": "閉じる",
4
5
  "neptune.DateInput.day.label": "日",
@@ -9,8 +10,8 @@
9
10
  "neptune.PaginationLink.ariaLabel.active": "{pageNumber}のページへ移動します",
10
11
  "neptune.PaginationLink.ariaLabel.inactive": "現在のページ、{pageNumber}ページ",
11
12
  "neptune.Summary.statusDone": "完了",
12
- "neptune.Summary.statusNotDone": "対応すべきこと",
13
- "neptune.Summary.statusPending": "保留中のもの",
13
+ "neptune.Summary.statusNotDone": "未対応",
14
+ "neptune.Summary.statusPending": "保留中",
14
15
  "neptune.Upload.csButtonText": "別のファイルをアップロードしますか?",
15
16
  "neptune.Upload.csFailureText": "アップロードに失敗しました。もう一度やり直してください。",
16
17
  "neptune.Upload.csSuccessText": "アップロードが完了しました。",
@@ -1,9 +1,17 @@
1
1
  {
2
+ "neptune.Chips.ariaLabel": "Wyczyść {choice}",
3
+ "neptune.ClearButton.ariaLabel": "Wyczyść",
2
4
  "neptune.CloseButton.ariaLabel": "Zamknij",
5
+ "neptune.DateInput.day.label": "Dzień",
6
+ "neptune.DateInput.month.label": "Miesiąc",
7
+ "neptune.DateInput.year.label": "Rok",
3
8
  "neptune.MoneyInput.Select.placeholder": "Wybierz opcję...",
4
9
  "neptune.Pagination.ariaLabel": "Nawigacja w paginacji",
5
10
  "neptune.PaginationLink.ariaLabel.active": "Przejdź do strony {pageNumber}",
6
11
  "neptune.PaginationLink.ariaLabel.inactive": "Obecna strona, strona {pageNumber}",
12
+ "neptune.Summary.statusDone": "Czynność wykonana",
13
+ "neptune.Summary.statusNotDone": "Czynność do wykonania",
14
+ "neptune.Summary.statusPending": "Czynność oczekująca",
7
15
  "neptune.Upload.csButtonText": "Prześlij kolejny plik?",
8
16
  "neptune.Upload.csFailureText": "Przesyłanie nie powiodło się. Proszę spróbować ponownie",
9
17
  "neptune.Upload.csSuccessText": "Przesyłanie zakończone!",
@@ -13,5 +21,22 @@
13
21
  "neptune.Upload.psProcessingText": "Przesyłanie...",
14
22
  "neptune.Upload.usButtonText": "Lub wybierz plik",
15
23
  "neptune.Upload.usDropMessage": "Upuść plik, aby rozpocząć przesyłanie",
16
- "neptune.Upload.usPlaceholder": "Przeciągnij i upuść plik mniejszy niż 5MB"
24
+ "neptune.Upload.usPlaceholder": "Przeciągnij i upuść plik mniejszy niż 5MB",
25
+ "neptune.UploadButton.allFileTypes": "Wszystkie typy plików",
26
+ "neptune.UploadButton.dropFiles": "Upuść plik, żeby rozpocząć przesyłanie",
27
+ "neptune.UploadButton.instructions": "{fileTypes}, mniejsze niż {size}MB",
28
+ "neptune.UploadButton.uploadFile": "Prześlij plik",
29
+ "neptune.UploadButton.uploadFiles": "Prześlij pliki",
30
+ "neptune.UploadInput.deleteModalBody": "Usunięcie tego pliku oznacza usunięcie go z naszego systemu.",
31
+ "neptune.UploadInput.deleteModalCancelButtonText": "Anuluj",
32
+ "neptune.UploadInput.deleteModalConfirmButtonText": "Usuń",
33
+ "neptune.UploadInput.deleteModalTitle": "Czy na pewno chcesz usunąć ten plik?",
34
+ "neptune.UploadInput.fileIsTooLarge": "Plik jest za duży",
35
+ "neptune.UploadInput.fileTypeNotSupported": "Nieobsługiwany typ pliku",
36
+ "neptune.UploadItem.deleting": "Usuwanie...",
37
+ "neptune.UploadItem.removeFile": "Usuń plik {filename}",
38
+ "neptune.UploadItem.uploaded": "Przesłano",
39
+ "neptune.UploadItem.uploadedFile": "Przesłany plik",
40
+ "neptune.UploadItem.uploading": "Przesyłanie...",
41
+ "neptune.UploadItem.uploadingFailed": "Przesyłanie nie powiodło się"
17
42
  }
@@ -9,9 +9,9 @@
9
9
  "neptune.Pagination.ariaLabel": "Постраничная навигация",
10
10
  "neptune.PaginationLink.ariaLabel.active": "Перейти на страницу {pageNumber}",
11
11
  "neptune.PaginationLink.ariaLabel.inactive": "Текущая страница, страница {pageNumber}",
12
- "neptune.Summary.statusDone": "Это готово",
13
- "neptune.Summary.statusNotDone": "Это нужно сделать",
14
- "neptune.Summary.statusPending": "Находится на рассмотрении",
12
+ "neptune.Summary.statusDone": "Этап завершен",
13
+ "neptune.Summary.statusNotDone": "Этап к выполнению",
14
+ "neptune.Summary.statusPending": "Этап в процессе",
15
15
  "neptune.Upload.csButtonText": "Загрузить другой файл?",
16
16
  "neptune.Upload.csFailureText": "Загрузка не удалась. Пожалуйста, попробуйте снова",
17
17
  "neptune.Upload.csSuccessText": "Загрузка завершена!",
@@ -24,7 +24,7 @@
24
24
  "neptune.Upload.usPlaceholder": "Перетащите файл не больше 5MB",
25
25
  "neptune.UploadButton.allFileTypes": "Все типы файлов",
26
26
  "neptune.UploadButton.dropFiles": "Перетащите файл, чтобы начать загрузку",
27
- "neptune.UploadButton.instructions": "{fileTypes}, менее чем {size}MB",
27
+ "neptune.UploadButton.instructions": "{fileTypes}, не превышающий {size} MB",
28
28
  "neptune.UploadButton.uploadFile": "Загрузить файл",
29
29
  "neptune.UploadButton.uploadFiles": "Загрузить файлы",
30
30
  "neptune.UploadInput.deleteModalBody": "Удаление этого файла приведет к его удалению из нашей системы.",
@@ -38,5 +38,5 @@
38
38
  "neptune.UploadItem.uploaded": "Завершено",
39
39
  "neptune.UploadItem.uploadedFile": "Загруженный файл",
40
40
  "neptune.UploadItem.uploading": "Загрузка...",
41
- "neptune.UploadItem.uploadingFailed": "Не удалось загрузить"
41
+ "neptune.UploadItem.uploadingFailed": "Загрузка не удалась"
42
42
  }