@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.
@@ -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": "DD",
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": "YYYY",
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",
@@ -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": "Nap",
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": "Év",
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",
@@ -7999,26 +7999,23 @@ class MoneyInput extends Component {
7999
7999
  maxLengthOverride
8000
8000
  } = this.props;
8001
8001
  const selectOptions = this.getSelectOptions();
8002
- const getFirstSelectItem = () => {
8002
+ const hasSingleCurrency = () => {
8003
8003
  if (selectOptions.length !== 0) {
8004
8004
  const firstItem = selectOptions[0];
8005
- if (firstItem.type === 'option') {
8006
- return {
8007
- hasOneCurrency: selectOptions.length === 1,
8008
- currency: firstItem.value.currency
8009
- };
8010
- }
8011
- if (firstItem.type === 'group') {
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 null;
8016
+ return false;
8019
8017
  };
8020
- const firstSelectItem = getFirstSelectItem();
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": "DD",
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": "YYYY",
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": "Nap",
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": "Év",
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",