@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/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 getFirstSelectItem = () => {
8036
+ const hasSingleCurrency = () => {
8037
8037
  if (selectOptions.length !== 0) {
8038
8038
  const firstItem = selectOptions[0];
8039
- if (firstItem.type === 'option') {
8040
- return {
8041
- hasOneCurrency: selectOptions.length === 1,
8042
- currency: firstItem.value.currency
8043
- };
8044
- }
8045
- if (firstItem.type === 'group') {
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 null;
8050
+ return false;
8053
8051
  };
8054
- const firstSelectItem = getFirstSelectItem();
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}`)),
@@ -14737,10 +14734,10 @@ var de = {
14737
14734
  "neptune.ClearButton.ariaLabel": "Zurücksetzen",
14738
14735
  "neptune.CloseButton.ariaLabel": "Schließen",
14739
14736
  "neptune.DateInput.day.label": "Tag",
14740
- "neptune.DateInput.day.placeholder": "DD",
14737
+ "neptune.DateInput.day.placeholder": "TT",
14741
14738
  "neptune.DateInput.month.label": "Monat",
14742
14739
  "neptune.DateInput.year.label": "Jahr",
14743
- "neptune.DateInput.year.placeholder": "YYYY",
14740
+ "neptune.DateInput.year.placeholder": "JJJJ",
14744
14741
  "neptune.DateLookup.day": "Tag",
14745
14742
  "neptune.DateLookup.goTo20YearView": "Zur 20-Jahres-Ansicht",
14746
14743
  "neptune.DateLookup.month": "Monat",
@@ -14908,10 +14905,10 @@ var hu = {
14908
14905
  "neptune.ClearButton.ariaLabel": "Törlés",
14909
14906
  "neptune.CloseButton.ariaLabel": "Bezárás",
14910
14907
  "neptune.DateInput.day.label": "Nap",
14911
- "neptune.DateInput.day.placeholder": "Nap",
14908
+ "neptune.DateInput.day.placeholder": "NN",
14912
14909
  "neptune.DateInput.month.label": "Hónap",
14913
14910
  "neptune.DateInput.year.label": "Év",
14914
- "neptune.DateInput.year.placeholder": "Év",
14911
+ "neptune.DateInput.year.placeholder": "ÉÉÉÉ",
14915
14912
  "neptune.DateLookup.day": "nap",
14916
14913
  "neptune.DateLookup.goTo20YearView": "Ugrás a 20 éves nézetre",
14917
14914
  "neptune.DateLookup.month": "hónap",