@transferwise/components 46.0.5 → 46.0.7
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/build/i18n/cs.json +2 -0
- package/build/i18n/de.json +2 -0
- package/build/i18n/es.json +2 -0
- package/build/i18n/fr.json +2 -0
- package/build/i18n/hu.json +2 -0
- package/build/i18n/id.json +2 -0
- package/build/i18n/it.json +2 -0
- package/build/i18n/ja.json +2 -0
- package/build/i18n/pl.json +2 -0
- package/build/i18n/pt.json +2 -0
- package/build/i18n/ro.json +2 -0
- package/build/i18n/ru.json +2 -0
- package/build/i18n/th.json +2 -0
- package/build/i18n/tr.json +2 -0
- package/build/i18n/uk.json +2 -0
- package/build/i18n/zh-CN.json +2 -0
- package/build/i18n/zh-HK.json +2 -0
- package/build/index.esm.js +46 -15
- package/build/index.esm.js.map +1 -1
- package/build/index.js +46 -15
- package/build/index.js.map +1 -1
- package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/i18n/cs.json +2 -0
- package/src/i18n/de.json +2 -0
- package/src/i18n/es.json +2 -0
- package/src/i18n/fr.json +2 -0
- package/src/i18n/hu.json +2 -0
- package/src/i18n/id.json +2 -0
- package/src/i18n/it.json +2 -0
- package/src/i18n/ja.json +2 -0
- package/src/i18n/pl.json +2 -0
- package/src/i18n/pt.json +2 -0
- package/src/i18n/ro.json +2 -0
- package/src/i18n/ru.json +2 -0
- package/src/i18n/th.json +2 -0
- package/src/i18n/tr.json +2 -0
- package/src/i18n/uk.json +2 -0
- package/src/i18n/zh-CN.json +2 -0
- package/src/i18n/zh-HK.json +2 -0
- package/src/moneyInput/MoneyInput.js +16 -21
- package/src/moneyInput/MoneyInput.spec.js +16 -3
- package/src/moneyInput/MoneyInput.story.tsx +1 -1
- package/src/tooltip/__snapshots__/Tooltip.spec.tsx.snap +1 -0
package/build/index.js
CHANGED
|
@@ -8033,26 +8033,23 @@ class MoneyInput extends React.Component {
|
|
|
8033
8033
|
maxLengthOverride
|
|
8034
8034
|
} = this.props;
|
|
8035
8035
|
const selectOptions = this.getSelectOptions();
|
|
8036
|
-
const
|
|
8036
|
+
const hasSingleCurrency = () => {
|
|
8037
8037
|
if (selectOptions.length !== 0) {
|
|
8038
8038
|
const firstItem = selectOptions[0];
|
|
8039
|
-
if (
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
return {
|
|
8047
|
-
hasOneCurrency: firstItem.options.length === 1,
|
|
8048
|
-
currency: firstItem.options[0].value.currency
|
|
8049
|
-
};
|
|
8039
|
+
if (selectOptions.length === 1) {
|
|
8040
|
+
if (firstItem.type === 'option') {
|
|
8041
|
+
return firstItem.value.currency === selectedCurrency.currency;
|
|
8042
|
+
}
|
|
8043
|
+
if (firstItem.type === 'group') {
|
|
8044
|
+
return firstItem.options.length === 1 && !(this.props.onCustomAction && this.props.customActionLabel);
|
|
8045
|
+
}
|
|
8050
8046
|
}
|
|
8047
|
+
} else if (selectedCurrency?.currency) {
|
|
8048
|
+
return true;
|
|
8051
8049
|
}
|
|
8052
|
-
return
|
|
8050
|
+
return false;
|
|
8053
8051
|
};
|
|
8054
|
-
const
|
|
8055
|
-
const isFixedCurrency = !this.state.searchQuery && (firstSelectItem?.hasOneCurrency && firstSelectItem?.currency === selectedCurrency.currency || !onCurrencyChange);
|
|
8052
|
+
const isFixedCurrency = !this.state.searchQuery && hasSingleCurrency() || !onCurrencyChange;
|
|
8056
8053
|
const disabled = !this.props.onAmountChange;
|
|
8057
8054
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8058
8055
|
className: classNames__default.default(this.style('tw-money-input'), this.style('input-group'), this.style(`input-group-${size}`)),
|
|
@@ -14680,8 +14677,10 @@ var cs = {
|
|
|
14680
14677
|
"neptune.ClearButton.ariaLabel": "Vyčistit",
|
|
14681
14678
|
"neptune.CloseButton.ariaLabel": "Zavřít",
|
|
14682
14679
|
"neptune.DateInput.day.label": "Den",
|
|
14680
|
+
"neptune.DateInput.day.placeholder": "DD",
|
|
14683
14681
|
"neptune.DateInput.month.label": "Měsíc",
|
|
14684
14682
|
"neptune.DateInput.year.label": "Rok",
|
|
14683
|
+
"neptune.DateInput.year.placeholder": "RRRR",
|
|
14685
14684
|
"neptune.DateLookup.day": "den",
|
|
14686
14685
|
"neptune.DateLookup.goTo20YearView": "Go to 20 year view",
|
|
14687
14686
|
"neptune.DateLookup.month": "měsíc",
|
|
@@ -14735,8 +14734,10 @@ var de = {
|
|
|
14735
14734
|
"neptune.ClearButton.ariaLabel": "Zurücksetzen",
|
|
14736
14735
|
"neptune.CloseButton.ariaLabel": "Schließen",
|
|
14737
14736
|
"neptune.DateInput.day.label": "Tag",
|
|
14737
|
+
"neptune.DateInput.day.placeholder": "TT",
|
|
14738
14738
|
"neptune.DateInput.month.label": "Monat",
|
|
14739
14739
|
"neptune.DateInput.year.label": "Jahr",
|
|
14740
|
+
"neptune.DateInput.year.placeholder": "JJJJ",
|
|
14740
14741
|
"neptune.DateLookup.day": "Tag",
|
|
14741
14742
|
"neptune.DateLookup.goTo20YearView": "Zur 20-Jahres-Ansicht",
|
|
14742
14743
|
"neptune.DateLookup.month": "Monat",
|
|
@@ -14790,8 +14791,10 @@ var es = {
|
|
|
14790
14791
|
"neptune.ClearButton.ariaLabel": "Borrar",
|
|
14791
14792
|
"neptune.CloseButton.ariaLabel": "Cerrar",
|
|
14792
14793
|
"neptune.DateInput.day.label": "Día",
|
|
14794
|
+
"neptune.DateInput.day.placeholder": "DD",
|
|
14793
14795
|
"neptune.DateInput.month.label": "Mes",
|
|
14794
14796
|
"neptune.DateInput.year.label": "Año",
|
|
14797
|
+
"neptune.DateInput.year.placeholder": "AAAA",
|
|
14795
14798
|
"neptune.DateLookup.day": "día",
|
|
14796
14799
|
"neptune.DateLookup.goTo20YearView": "Ir a vista de 20 años",
|
|
14797
14800
|
"neptune.DateLookup.month": "mes",
|
|
@@ -14845,8 +14848,10 @@ var fr = {
|
|
|
14845
14848
|
"neptune.ClearButton.ariaLabel": "Effacer",
|
|
14846
14849
|
"neptune.CloseButton.ariaLabel": "Fermer",
|
|
14847
14850
|
"neptune.DateInput.day.label": "Jour",
|
|
14851
|
+
"neptune.DateInput.day.placeholder": "JJ",
|
|
14848
14852
|
"neptune.DateInput.month.label": "Mois",
|
|
14849
14853
|
"neptune.DateInput.year.label": "Année",
|
|
14854
|
+
"neptune.DateInput.year.placeholder": "AAAA",
|
|
14850
14855
|
"neptune.DateLookup.day": "jour",
|
|
14851
14856
|
"neptune.DateLookup.goTo20YearView": "Accéder à la vue sur 20 ans",
|
|
14852
14857
|
"neptune.DateLookup.month": "mois",
|
|
@@ -14900,8 +14905,10 @@ var hu = {
|
|
|
14900
14905
|
"neptune.ClearButton.ariaLabel": "Törlés",
|
|
14901
14906
|
"neptune.CloseButton.ariaLabel": "Bezárás",
|
|
14902
14907
|
"neptune.DateInput.day.label": "Nap",
|
|
14908
|
+
"neptune.DateInput.day.placeholder": "NN",
|
|
14903
14909
|
"neptune.DateInput.month.label": "Hónap",
|
|
14904
14910
|
"neptune.DateInput.year.label": "Év",
|
|
14911
|
+
"neptune.DateInput.year.placeholder": "ÉÉÉÉ",
|
|
14905
14912
|
"neptune.DateLookup.day": "nap",
|
|
14906
14913
|
"neptune.DateLookup.goTo20YearView": "Ugrás a 20 éves nézetre",
|
|
14907
14914
|
"neptune.DateLookup.month": "hónap",
|
|
@@ -14955,8 +14962,10 @@ var id = {
|
|
|
14955
14962
|
"neptune.ClearButton.ariaLabel": "Hapus",
|
|
14956
14963
|
"neptune.CloseButton.ariaLabel": "Tutup",
|
|
14957
14964
|
"neptune.DateInput.day.label": "Hari",
|
|
14965
|
+
"neptune.DateInput.day.placeholder": "HH",
|
|
14958
14966
|
"neptune.DateInput.month.label": "Bulan",
|
|
14959
14967
|
"neptune.DateInput.year.label": "Tahun",
|
|
14968
|
+
"neptune.DateInput.year.placeholder": "TTTT",
|
|
14960
14969
|
"neptune.DateLookup.day": "hari",
|
|
14961
14970
|
"neptune.DateLookup.goTo20YearView": "Lihat tampilan 20 tahun",
|
|
14962
14971
|
"neptune.DateLookup.month": "bulan",
|
|
@@ -15010,8 +15019,10 @@ var it = {
|
|
|
15010
15019
|
"neptune.ClearButton.ariaLabel": "Elimina",
|
|
15011
15020
|
"neptune.CloseButton.ariaLabel": "Chiudi",
|
|
15012
15021
|
"neptune.DateInput.day.label": "Giorno",
|
|
15022
|
+
"neptune.DateInput.day.placeholder": "GG",
|
|
15013
15023
|
"neptune.DateInput.month.label": "Mese",
|
|
15014
15024
|
"neptune.DateInput.year.label": "Anno",
|
|
15025
|
+
"neptune.DateInput.year.placeholder": "AAAA",
|
|
15015
15026
|
"neptune.DateLookup.day": "giorno",
|
|
15016
15027
|
"neptune.DateLookup.goTo20YearView": "Vai alla vista su 20 anni",
|
|
15017
15028
|
"neptune.DateLookup.month": "mese",
|
|
@@ -15065,8 +15076,10 @@ var ja = {
|
|
|
15065
15076
|
"neptune.ClearButton.ariaLabel": "消去",
|
|
15066
15077
|
"neptune.CloseButton.ariaLabel": "閉じる",
|
|
15067
15078
|
"neptune.DateInput.day.label": "日",
|
|
15079
|
+
"neptune.DateInput.day.placeholder": "日",
|
|
15068
15080
|
"neptune.DateInput.month.label": "月",
|
|
15069
15081
|
"neptune.DateInput.year.label": "年",
|
|
15082
|
+
"neptune.DateInput.year.placeholder": "年(西暦)",
|
|
15070
15083
|
"neptune.DateLookup.day": "日",
|
|
15071
15084
|
"neptune.DateLookup.goTo20YearView": "20年表示に移動する",
|
|
15072
15085
|
"neptune.DateLookup.month": "月",
|
|
@@ -15120,8 +15133,10 @@ var pl = {
|
|
|
15120
15133
|
"neptune.ClearButton.ariaLabel": "Wyczyść",
|
|
15121
15134
|
"neptune.CloseButton.ariaLabel": "Zamknij",
|
|
15122
15135
|
"neptune.DateInput.day.label": "Dzień",
|
|
15136
|
+
"neptune.DateInput.day.placeholder": "DD",
|
|
15123
15137
|
"neptune.DateInput.month.label": "Miesiąc",
|
|
15124
15138
|
"neptune.DateInput.year.label": "Rok",
|
|
15139
|
+
"neptune.DateInput.year.placeholder": "RRRR",
|
|
15125
15140
|
"neptune.DateLookup.day": "dzień",
|
|
15126
15141
|
"neptune.DateLookup.goTo20YearView": "Przejdź do widoku 20-letniego",
|
|
15127
15142
|
"neptune.DateLookup.month": "miesiąc",
|
|
@@ -15175,8 +15190,10 @@ var pt = {
|
|
|
15175
15190
|
"neptune.ClearButton.ariaLabel": "Remover",
|
|
15176
15191
|
"neptune.CloseButton.ariaLabel": "Fechar",
|
|
15177
15192
|
"neptune.DateInput.day.label": "Dia",
|
|
15193
|
+
"neptune.DateInput.day.placeholder": "DD",
|
|
15178
15194
|
"neptune.DateInput.month.label": "Mês",
|
|
15179
15195
|
"neptune.DateInput.year.label": "Ano",
|
|
15196
|
+
"neptune.DateInput.year.placeholder": "AAAA",
|
|
15180
15197
|
"neptune.DateLookup.day": "dia",
|
|
15181
15198
|
"neptune.DateLookup.goTo20YearView": "Acessar a visualização de 20 anos",
|
|
15182
15199
|
"neptune.DateLookup.month": "mês",
|
|
@@ -15230,8 +15247,10 @@ var ro = {
|
|
|
15230
15247
|
"neptune.ClearButton.ariaLabel": "Elimină",
|
|
15231
15248
|
"neptune.CloseButton.ariaLabel": "Închide",
|
|
15232
15249
|
"neptune.DateInput.day.label": "Zi",
|
|
15250
|
+
"neptune.DateInput.day.placeholder": "ZZ",
|
|
15233
15251
|
"neptune.DateInput.month.label": "Lună",
|
|
15234
15252
|
"neptune.DateInput.year.label": "An",
|
|
15253
|
+
"neptune.DateInput.year.placeholder": "AAAA",
|
|
15235
15254
|
"neptune.DateLookup.day": "zi",
|
|
15236
15255
|
"neptune.DateLookup.goTo20YearView": "Accesează vizualizarea pe 20 de ani",
|
|
15237
15256
|
"neptune.DateLookup.month": "lună",
|
|
@@ -15285,8 +15304,10 @@ var ru = {
|
|
|
15285
15304
|
"neptune.ClearButton.ariaLabel": "Очистить",
|
|
15286
15305
|
"neptune.CloseButton.ariaLabel": "Закрыть",
|
|
15287
15306
|
"neptune.DateInput.day.label": "День",
|
|
15307
|
+
"neptune.DateInput.day.placeholder": "ДД",
|
|
15288
15308
|
"neptune.DateInput.month.label": "Месяц",
|
|
15289
15309
|
"neptune.DateInput.year.label": "Год",
|
|
15310
|
+
"neptune.DateInput.year.placeholder": "ГГГГ",
|
|
15290
15311
|
"neptune.DateLookup.day": "день",
|
|
15291
15312
|
"neptune.DateLookup.goTo20YearView": "Перейти к обзору 20 лет",
|
|
15292
15313
|
"neptune.DateLookup.month": "месяц",
|
|
@@ -15340,8 +15361,10 @@ var th = {
|
|
|
15340
15361
|
"neptune.ClearButton.ariaLabel": "ชัดเจน",
|
|
15341
15362
|
"neptune.CloseButton.ariaLabel": "ปิด",
|
|
15342
15363
|
"neptune.DateInput.day.label": "วัน",
|
|
15364
|
+
"neptune.DateInput.day.placeholder": "DD",
|
|
15343
15365
|
"neptune.DateInput.month.label": "เดือน",
|
|
15344
15366
|
"neptune.DateInput.year.label": "ปี",
|
|
15367
|
+
"neptune.DateInput.year.placeholder": "YYYY",
|
|
15345
15368
|
"neptune.DateLookup.day": "วัน",
|
|
15346
15369
|
"neptune.DateLookup.goTo20YearView": "Go to 20 year view",
|
|
15347
15370
|
"neptune.DateLookup.month": "เดือน",
|
|
@@ -15395,8 +15418,10 @@ var tr = {
|
|
|
15395
15418
|
"neptune.ClearButton.ariaLabel": "Sil",
|
|
15396
15419
|
"neptune.CloseButton.ariaLabel": "Kapat",
|
|
15397
15420
|
"neptune.DateInput.day.label": "Gün",
|
|
15421
|
+
"neptune.DateInput.day.placeholder": "GG",
|
|
15398
15422
|
"neptune.DateInput.month.label": "Ay",
|
|
15399
15423
|
"neptune.DateInput.year.label": "Yıl",
|
|
15424
|
+
"neptune.DateInput.year.placeholder": "YYYY",
|
|
15400
15425
|
"neptune.DateLookup.day": "gün",
|
|
15401
15426
|
"neptune.DateLookup.goTo20YearView": "20 yıl görünümüne git",
|
|
15402
15427
|
"neptune.DateLookup.month": "ay",
|
|
@@ -15450,8 +15475,10 @@ var uk = {
|
|
|
15450
15475
|
"neptune.ClearButton.ariaLabel": "Очистити",
|
|
15451
15476
|
"neptune.CloseButton.ariaLabel": "Закрити",
|
|
15452
15477
|
"neptune.DateInput.day.label": "День",
|
|
15478
|
+
"neptune.DateInput.day.placeholder": "ДД",
|
|
15453
15479
|
"neptune.DateInput.month.label": "Місяць",
|
|
15454
15480
|
"neptune.DateInput.year.label": "Рік",
|
|
15481
|
+
"neptune.DateInput.year.placeholder": "РРРР",
|
|
15455
15482
|
"neptune.DateLookup.day": "дня",
|
|
15456
15483
|
"neptune.DateLookup.goTo20YearView": "Go to 20 year view",
|
|
15457
15484
|
"neptune.DateLookup.month": "місяць",
|
|
@@ -15505,8 +15532,10 @@ var zhCN = {
|
|
|
15505
15532
|
"neptune.ClearButton.ariaLabel": "清除",
|
|
15506
15533
|
"neptune.CloseButton.ariaLabel": "关闭",
|
|
15507
15534
|
"neptune.DateInput.day.label": "日",
|
|
15535
|
+
"neptune.DateInput.day.placeholder": "DD",
|
|
15508
15536
|
"neptune.DateInput.month.label": "月",
|
|
15509
15537
|
"neptune.DateInput.year.label": "年",
|
|
15538
|
+
"neptune.DateInput.year.placeholder": "YYYY",
|
|
15510
15539
|
"neptune.DateLookup.day": "日",
|
|
15511
15540
|
"neptune.DateLookup.goTo20YearView": "转到 20 年视图",
|
|
15512
15541
|
"neptune.DateLookup.month": "月",
|
|
@@ -15560,8 +15589,10 @@ var zhHK = {
|
|
|
15560
15589
|
"neptune.ClearButton.ariaLabel": "清除",
|
|
15561
15590
|
"neptune.CloseButton.ariaLabel": "關閉",
|
|
15562
15591
|
"neptune.DateInput.day.label": "日",
|
|
15592
|
+
"neptune.DateInput.day.placeholder": "日",
|
|
15563
15593
|
"neptune.DateInput.month.label": "月",
|
|
15564
15594
|
"neptune.DateInput.year.label": "年",
|
|
15595
|
+
"neptune.DateInput.year.placeholder": "年",
|
|
15565
15596
|
"neptune.DateLookup.day": "日",
|
|
15566
15597
|
"neptune.DateLookup.goTo20YearView": "切換至20年視圖",
|
|
15567
15598
|
"neptune.DateLookup.month": "月",
|