@transferwise/components 46.0.6 → 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/de.json +2 -2
- package/build/i18n/hu.json +2 -2
- package/build/index.esm.js +16 -19
- package/build/index.esm.js.map +1 -1
- package/build/index.js +16 -19
- package/build/index.js.map +1 -1
- package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/i18n/de.json +2 -2
- package/src/i18n/hu.json +2 -2
- package/src/moneyInput/MoneyInput.js +16 -21
- package/src/moneyInput/MoneyInput.spec.js +16 -3
- package/src/moneyInput/MoneyInput.story.tsx +1 -1
package/build/i18n/de.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"neptune.ClearButton.ariaLabel": "Zurücksetzen",
|
|
5
5
|
"neptune.CloseButton.ariaLabel": "Schließen",
|
|
6
6
|
"neptune.DateInput.day.label": "Tag",
|
|
7
|
-
"neptune.DateInput.day.placeholder": "
|
|
7
|
+
"neptune.DateInput.day.placeholder": "TT",
|
|
8
8
|
"neptune.DateInput.month.label": "Monat",
|
|
9
9
|
"neptune.DateInput.year.label": "Jahr",
|
|
10
|
-
"neptune.DateInput.year.placeholder": "
|
|
10
|
+
"neptune.DateInput.year.placeholder": "JJJJ",
|
|
11
11
|
"neptune.DateLookup.day": "Tag",
|
|
12
12
|
"neptune.DateLookup.goTo20YearView": "Zur 20-Jahres-Ansicht",
|
|
13
13
|
"neptune.DateLookup.month": "Monat",
|
package/build/i18n/hu.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"neptune.ClearButton.ariaLabel": "Törlés",
|
|
5
5
|
"neptune.CloseButton.ariaLabel": "Bezárás",
|
|
6
6
|
"neptune.DateInput.day.label": "Nap",
|
|
7
|
-
"neptune.DateInput.day.placeholder": "
|
|
7
|
+
"neptune.DateInput.day.placeholder": "NN",
|
|
8
8
|
"neptune.DateInput.month.label": "Hónap",
|
|
9
9
|
"neptune.DateInput.year.label": "Év",
|
|
10
|
-
"neptune.DateInput.year.placeholder": "
|
|
10
|
+
"neptune.DateInput.year.placeholder": "ÉÉÉÉ",
|
|
11
11
|
"neptune.DateLookup.day": "nap",
|
|
12
12
|
"neptune.DateLookup.goTo20YearView": "Ugrás a 20 éves nézetre",
|
|
13
13
|
"neptune.DateLookup.month": "hónap",
|
package/build/index.esm.js
CHANGED
|
@@ -7999,26 +7999,23 @@ class MoneyInput extends Component {
|
|
|
7999
7999
|
maxLengthOverride
|
|
8000
8000
|
} = this.props;
|
|
8001
8001
|
const selectOptions = this.getSelectOptions();
|
|
8002
|
-
const
|
|
8002
|
+
const hasSingleCurrency = () => {
|
|
8003
8003
|
if (selectOptions.length !== 0) {
|
|
8004
8004
|
const firstItem = selectOptions[0];
|
|
8005
|
-
if (
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
return {
|
|
8013
|
-
hasOneCurrency: firstItem.options.length === 1,
|
|
8014
|
-
currency: firstItem.options[0].value.currency
|
|
8015
|
-
};
|
|
8005
|
+
if (selectOptions.length === 1) {
|
|
8006
|
+
if (firstItem.type === 'option') {
|
|
8007
|
+
return firstItem.value.currency === selectedCurrency.currency;
|
|
8008
|
+
}
|
|
8009
|
+
if (firstItem.type === 'group') {
|
|
8010
|
+
return firstItem.options.length === 1 && !(this.props.onCustomAction && this.props.customActionLabel);
|
|
8011
|
+
}
|
|
8016
8012
|
}
|
|
8013
|
+
} else if (selectedCurrency?.currency) {
|
|
8014
|
+
return true;
|
|
8017
8015
|
}
|
|
8018
|
-
return
|
|
8016
|
+
return false;
|
|
8019
8017
|
};
|
|
8020
|
-
const
|
|
8021
|
-
const isFixedCurrency = !this.state.searchQuery && (firstSelectItem?.hasOneCurrency && firstSelectItem?.currency === selectedCurrency.currency || !onCurrencyChange);
|
|
8018
|
+
const isFixedCurrency = !this.state.searchQuery && hasSingleCurrency() || !onCurrencyChange;
|
|
8022
8019
|
const disabled = !this.props.onAmountChange;
|
|
8023
8020
|
return /*#__PURE__*/jsxs("div", {
|
|
8024
8021
|
className: classNames(this.style('tw-money-input'), this.style('input-group'), this.style(`input-group-${size}`)),
|
|
@@ -14703,10 +14700,10 @@ var de = {
|
|
|
14703
14700
|
"neptune.ClearButton.ariaLabel": "Zurücksetzen",
|
|
14704
14701
|
"neptune.CloseButton.ariaLabel": "Schließen",
|
|
14705
14702
|
"neptune.DateInput.day.label": "Tag",
|
|
14706
|
-
"neptune.DateInput.day.placeholder": "
|
|
14703
|
+
"neptune.DateInput.day.placeholder": "TT",
|
|
14707
14704
|
"neptune.DateInput.month.label": "Monat",
|
|
14708
14705
|
"neptune.DateInput.year.label": "Jahr",
|
|
14709
|
-
"neptune.DateInput.year.placeholder": "
|
|
14706
|
+
"neptune.DateInput.year.placeholder": "JJJJ",
|
|
14710
14707
|
"neptune.DateLookup.day": "Tag",
|
|
14711
14708
|
"neptune.DateLookup.goTo20YearView": "Zur 20-Jahres-Ansicht",
|
|
14712
14709
|
"neptune.DateLookup.month": "Monat",
|
|
@@ -14874,10 +14871,10 @@ var hu = {
|
|
|
14874
14871
|
"neptune.ClearButton.ariaLabel": "Törlés",
|
|
14875
14872
|
"neptune.CloseButton.ariaLabel": "Bezárás",
|
|
14876
14873
|
"neptune.DateInput.day.label": "Nap",
|
|
14877
|
-
"neptune.DateInput.day.placeholder": "
|
|
14874
|
+
"neptune.DateInput.day.placeholder": "NN",
|
|
14878
14875
|
"neptune.DateInput.month.label": "Hónap",
|
|
14879
14876
|
"neptune.DateInput.year.label": "Év",
|
|
14880
|
-
"neptune.DateInput.year.placeholder": "
|
|
14877
|
+
"neptune.DateInput.year.placeholder": "ÉÉÉÉ",
|
|
14881
14878
|
"neptune.DateLookup.day": "nap",
|
|
14882
14879
|
"neptune.DateLookup.goTo20YearView": "Ugrás a 20 éves nézetre",
|
|
14883
14880
|
"neptune.DateLookup.month": "hónap",
|