@sonic-equipment/ui 185.0.0 → 187.0.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 (138) hide show
  1. package/dist/address-info-display/address-info-display.d.ts +2 -2
  2. package/dist/address-info-display/address-info-display.js +1 -1
  3. package/dist/algolia/algolia-multi-select-filter-section.js +1 -1
  4. package/dist/algolia/algolia-sort-by.js +1 -1
  5. package/dist/buttons/add-to-cart-button/add-to-cart-button.js +1 -1
  6. package/dist/collapsables/accordion/accordion-item.js +2 -1
  7. package/dist/collapsables/accordion/accordion.module.css.js +1 -1
  8. package/dist/country-select/country-select.js +1 -1
  9. package/dist/country-select/hooks/use-countries.js +1 -0
  10. package/dist/country-selector/country-selector-dialog/country-selector-dialog.js +1 -1
  11. package/dist/exports.d.ts +24 -22
  12. package/dist/filters/pagination/pagination.js +1 -1
  13. package/dist/footer/connected-footer.d.ts +2 -1
  14. package/dist/footer/connected-footer.js +2 -2
  15. package/dist/footer/footer.d.ts +2 -1
  16. package/dist/footer/footer.js +6 -5
  17. package/dist/footer/footer.module.css.js +1 -1
  18. package/dist/forms/elements/checkbox/checkbox.module.css.js +3 -0
  19. package/dist/forms/{field-error → elements/field-error}/field-error.js +1 -1
  20. package/dist/forms/elements/field-error/field-error.module.css.js +3 -0
  21. package/dist/forms/elements/input/input.module.css.js +3 -0
  22. package/dist/forms/elements/label/label.module.css.js +3 -0
  23. package/dist/forms/{select → elements/select}/select.js +3 -3
  24. package/dist/forms/elements/select/select.module.css.js +3 -0
  25. package/dist/forms/elements/switch/switch.module.css.js +3 -0
  26. package/dist/forms/elements/textarea/textarea.module.css.js +3 -0
  27. package/dist/forms/{checkbox-field → fields/checkbox-field}/checkbox-field.d.ts +2 -2
  28. package/dist/forms/{checkbox-field → fields/checkbox-field}/checkbox-field.js +4 -4
  29. package/dist/forms/fields/checkbox-field/checkbox-field.module.css.js +3 -0
  30. package/dist/forms/{number-field → fields/number-field}/number-field.d.ts +1 -1
  31. package/dist/forms/{number-field → fields/number-field}/number-field.js +8 -8
  32. package/dist/forms/fields/number-field/number-field.module.css.js +3 -0
  33. package/dist/forms/{search-field → fields/search-field}/search-field.js +3 -3
  34. package/dist/forms/{select-field → fields/select-field}/select-field.d.ts +1 -1
  35. package/dist/forms/{select-field → fields/select-field}/select-field.js +7 -7
  36. package/dist/forms/fields/select-field/select-field.module.css.js +3 -0
  37. package/dist/forms/{switch-field → fields/switch-field}/switch-field.d.ts +2 -2
  38. package/dist/forms/{switch-field → fields/switch-field}/switch-field.js +4 -4
  39. package/dist/forms/fields/switch-field/switch-field.module.css.js +3 -0
  40. package/dist/forms/{text-field → fields/text-field}/password-reveal-toggle/password-reveal-toggle.js +3 -3
  41. package/dist/forms/{text-field → fields/text-field}/password-reveal-toggle/password-reveal-toggle.module.css.js +1 -1
  42. package/dist/forms/{text-field → fields/text-field}/text-field.d.ts +1 -1
  43. package/dist/forms/{text-field → fields/text-field}/text-field.js +6 -6
  44. package/dist/forms/fields/text-field/text-field.module.css.js +3 -0
  45. package/dist/forms/layout/form/form-field-layout.module.css.js +3 -0
  46. package/dist/forms/layout/form/form-segment-group.module.css.js +3 -0
  47. package/dist/forms/layout/form/form-segment.module.css.js +3 -0
  48. package/dist/forms/{form → layout/form}/form.js +3 -3
  49. package/dist/forms/layout/form/form.module.css.js +3 -0
  50. package/dist/forms/partials/edit-address-form/edit-address-form.d.ts +8 -0
  51. package/dist/forms/partials/edit-address-form/edit-address-form.js +35 -0
  52. package/dist/forms/partials/edit-address-form/edit-address-form.module.css.js +3 -0
  53. package/dist/forms/{password-validation → partials/password-validation}/password-validation.js +4 -4
  54. package/dist/index.js +24 -22
  55. package/dist/intl/formatted-message.js +5 -1
  56. package/dist/intl/translation-id.d.ts +1 -1
  57. package/dist/intl/types.d.ts +6 -1
  58. package/dist/modals/dialog/dialog.d.ts +1 -1
  59. package/dist/modals/dialog/dialog.js +1 -1
  60. package/dist/modals/favorite/add-to-favorite-dialog.js +2 -2
  61. package/dist/modals/recover-password/recover-password-dialog.js +1 -1
  62. package/dist/pages/account/components/create-account-form/create-account-form.js +7 -7
  63. package/dist/pages/account/components/sign-in-form/sign-in-form.js +6 -6
  64. package/dist/pages/checkout/components/billing-and-invoice-information.d.ts +3 -3
  65. package/dist/pages/checkout/components/billing-and-invoice-information.js +1 -1
  66. package/dist/pages/checkout/order-confirmation-page/order-confirmation-page-content.js +26 -20
  67. package/dist/pages/checkout/payment-page/components/adyen-payment.js +8 -2
  68. package/dist/pages/checkout/payment-page/components/payment.d.ts +1 -2
  69. package/dist/pages/checkout/payment-page/components/payment.js +31 -98
  70. package/dist/pages/checkout/payment-page/payment-page-content.d.ts +1 -3
  71. package/dist/pages/checkout/payment-page/payment-page-content.js +3 -3
  72. package/dist/pages/checkout/payment-page/payment-page.js +1 -2
  73. package/dist/pages/checkout/shipping-page/components/{edit-address-form.d.ts → edit-checkout-bill-to-address-form.d.ts} +3 -17
  74. package/dist/pages/checkout/shipping-page/components/edit-checkout-bill-to-address-form.js +49 -0
  75. package/dist/pages/checkout/shipping-page/components/edit-checkout-bill-to-address-form.module.css.js +3 -0
  76. package/dist/pages/checkout/shipping-page/components/readonly-address.js +7 -5
  77. package/dist/pages/checkout/shipping-page/shipping-page-content.js +2 -2
  78. package/dist/pages/checkout/shipping-page/shipping-page.js +2 -2
  79. package/dist/pages/my-sonic/actions/change-customer/change-customer.js +2 -2
  80. package/dist/pages/my-sonic/actions/change-password/change-password-dialog.js +1 -1
  81. package/dist/pages/my-sonic/actions/change-password/change-password.js +3 -3
  82. package/dist/pages/my-sonic/actions/edit-bill-to-address/edit-bill-to-address.d.ts +1 -0
  83. package/dist/pages/my-sonic/actions/edit-bill-to-address/edit-bill-to-address.js +8 -0
  84. package/dist/pages/my-sonic/actions/edit-user-info/edit-user-info-dialog.d.ts +1 -1
  85. package/dist/pages/my-sonic/actions/edit-user-info/edit-user-info.js +1 -1
  86. package/dist/pages/my-sonic/navigation/my-sonic-mobile-navigation.js +1 -1
  87. package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.js +1 -1
  88. package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.module.css.js +1 -1
  89. package/dist/shared/data/countries-languages.data.js +4 -0
  90. package/dist/shared/model/address.d.ts +27 -12
  91. package/dist/shared/model/countries-languages.d.ts +1 -0
  92. package/dist/shared/utils/price.d.ts +1 -1
  93. package/dist/styles.css +1409 -1330
  94. package/package.json +1 -1
  95. package/dist/forms/checkbox/checkbox.module.css.js +0 -3
  96. package/dist/forms/checkbox-field/checkbox-field.module.css.js +0 -3
  97. package/dist/forms/field-error/field-error.module.css.js +0 -3
  98. package/dist/forms/form/form-field-layout.module.css.js +0 -3
  99. package/dist/forms/form/form-segment-group.module.css.js +0 -3
  100. package/dist/forms/form/form-segment.module.css.js +0 -3
  101. package/dist/forms/form/form.module.css.js +0 -3
  102. package/dist/forms/input/input.module.css.js +0 -3
  103. package/dist/forms/label/label.module.css.js +0 -3
  104. package/dist/forms/number-field/number-field.module.css.js +0 -3
  105. package/dist/forms/select/select.module.css.js +0 -3
  106. package/dist/forms/select-field/select-field.module.css.js +0 -3
  107. package/dist/forms/switch/switch.module.css.js +0 -3
  108. package/dist/forms/switch-field/switch-field.module.css.js +0 -3
  109. package/dist/forms/text-field/text-field.module.css.js +0 -3
  110. package/dist/forms/textarea/textarea.module.css.js +0 -3
  111. package/dist/pages/checkout/shipping-page/components/edit-address-form.js +0 -68
  112. package/dist/pages/checkout/shipping-page/components/edit-address-form.module.css.js +0 -3
  113. /package/dist/forms/{checkbox → elements/checkbox}/checkbox.d.ts +0 -0
  114. /package/dist/forms/{checkbox → elements/checkbox}/checkbox.js +0 -0
  115. /package/dist/forms/{color-checkbox → elements/color-checkbox}/color-checkbox.d.ts +0 -0
  116. /package/dist/forms/{color-checkbox → elements/color-checkbox}/color-checkbox.js +0 -0
  117. /package/dist/forms/{field-error → elements/field-error}/field-error.d.ts +0 -0
  118. /package/dist/forms/{input → elements/input}/input.d.ts +0 -0
  119. /package/dist/forms/{input → elements/input}/input.js +0 -0
  120. /package/dist/forms/{label → elements/label}/label.d.ts +0 -0
  121. /package/dist/forms/{label → elements/label}/label.js +0 -0
  122. /package/dist/forms/{select → elements/select}/select.d.ts +0 -0
  123. /package/dist/forms/{switch → elements/switch}/switch.d.ts +0 -0
  124. /package/dist/forms/{switch → elements/switch}/switch.js +0 -0
  125. /package/dist/forms/{textarea → elements/textarea}/textarea.d.ts +0 -0
  126. /package/dist/forms/{textarea → elements/textarea}/textarea.js +0 -0
  127. /package/dist/forms/{password-field → fields/password-field}/password-field.d.ts +0 -0
  128. /package/dist/forms/{password-field → fields/password-field}/password-field.js +0 -0
  129. /package/dist/forms/{search-field → fields/search-field}/search-field.d.ts +0 -0
  130. /package/dist/forms/{text-field → fields/text-field}/password-reveal-toggle/password-reveal-toggle.d.ts +0 -0
  131. /package/dist/forms/{form → layout/form}/form-field-layout.d.ts +0 -0
  132. /package/dist/forms/{form → layout/form}/form-field-layout.js +0 -0
  133. /package/dist/forms/{form → layout/form}/form-segment-group.d.ts +0 -0
  134. /package/dist/forms/{form → layout/form}/form-segment-group.js +0 -0
  135. /package/dist/forms/{form → layout/form}/form-segment.d.ts +0 -0
  136. /package/dist/forms/{form → layout/form}/form-segment.js +0 -0
  137. /package/dist/forms/{form → layout/form}/form.d.ts +0 -0
  138. /package/dist/forms/{password-validation → partials/password-validation}/password-validation.d.ts +0 -0
@@ -0,0 +1,3 @@
1
+ var styles = {"form":"form-module-j-sK-","error-messages":"form-module-FJZtR","form-header":"form-module-KjHjn","form-footer":"form-module-2IhUq"};
2
+
3
+ export { styles as default };
@@ -0,0 +1,8 @@
1
+ import { Address } from '../../../shared/model/address';
2
+ import { Country } from '../../../shared/model/countries-languages';
3
+ export interface EditAddressFormProps {
4
+ address: Address | null | undefined;
5
+ countries: Country[];
6
+ isLoading: boolean;
7
+ }
8
+ export declare function EditAddressForm({ address, countries, isLoading, }: EditAddressFormProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
+ import { useState } from 'react';
4
+ import { CountrySelect } from '../../../country-select/country-select.js';
5
+ import { TextField } from '../../fields/text-field/text-field.js';
6
+ import { FormattedMessage } from '../../../intl/formatted-message.js';
7
+ import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
8
+ import { Message } from '../../../message/message.js';
9
+ import { validatePhone, validateEmail } from '../../../shared/model/address.js';
10
+ import styles from './edit-address-form.module.css.js';
11
+
12
+ function EditAddressForm({ address, countries, isLoading, }) {
13
+ const t = useFormattedMessage();
14
+ const [companyName, setCompanyName] = useState(address?.companyName || '');
15
+ const [lastName, setLastName] = useState(address?.lastName || '');
16
+ const currentCountry = countries.find(country => country.id === address?.country?.id);
17
+ const [selectedCountry, setSelectedCountry] = useState(currentCountry);
18
+ const currencyHasChanged = selectedCountry?.currencyCode !== currentCountry?.currencyCode;
19
+ if (countries.length === 0) {
20
+ return (jsx(Message, { type: "danger", children: jsx(FormattedMessage, { force: true, id: "No countries available. Unable to change address." }) }));
21
+ }
22
+ return (jsxs(Fragment, { children: [jsx(TextField, { defaultValue: address?.firstName, isDisabled: isLoading, label: t('First name'), name: "firstName", showLabel: true }), jsx(TextField, { isDisabled: isLoading, isRequired: !address?.companyName, label: t('Last name'), minLength: 3, name: "lastName", onChange: setLastName, showLabel: true, value: lastName }, `lastname-${Boolean(address?.companyName)}`), jsx(TextField, { defaultValue: address?.companyName, isDisabled: isLoading, label: t('Company name'), name: "companyName", onChange: setCompanyName, showLabel: true, value: companyName }), jsx(TextField, { defaultValue: address?.attention, isDisabled: isLoading, label: t('Attention'), name: "attention", showLabel: true }), jsx("div", { className: styles['span-2'], children: jsx(TextField, { isRequired: true, defaultValue: address?.address1, isDisabled: isLoading, label: `${t('Address')} 1`, maxLength: 30, minLength: 3, name: "address1", showLabel: true }) }), jsx("div", { className: styles['span-2'], children: jsx(TextField, { defaultValue: address?.address2, isDisabled: isLoading, label: `${t('Address')} 2`, maxLength: 30, minLength: 3, name: "address2", showLabel: true }) }), jsx("div", { className: styles['span-2'], children: jsx(TextField, { defaultValue: address?.address3, isDisabled: isLoading, label: `${t('Address')} 3`, maxLength: 30, minLength: 3, name: "address3", showLabel: true }) }), jsx(TextField, { isRequired: true, defaultValue: address?.postalCode, isDisabled: isLoading, label: t('Postal Code'), maxLength: 10, minLength: 4, name: "postalCode", showLabel: true }), jsx(TextField, { isRequired: true, defaultValue: address?.city, isDisabled: isLoading, label: t('City'), maxLength: 30, minLength: 3, name: "city", showLabel: true }), jsxs("div", { className: styles['span-2'], children: [jsx(CountrySelect, { isRequired: true, countries: countries, "data-test-selector": "countrySelect", isDisabled: isLoading, name: "countrySelect", onCountryChange: setSelectedCountry, selectedCountry: selectedCountry }), currencyHasChanged && (jsx(Message, { className: styles['currency-warning'], type: "warning", children: jsx(FormattedMessage, { id: "Selecting this country will result in your cart to be converted to the currency {0}", replacementValues: {
23
+ '0': selectedCountry?.currencyCode || t('Unknown'),
24
+ } }) }))] }), jsx("div", { className: styles['span-2'], children: jsx(TextField, { isRequired: true, defaultValue: address?.phone, isDisabled: isLoading, label: t('Phone'), name: "phone", showLabel: true, validate: value => {
25
+ if (!value)
26
+ return value;
27
+ return (validatePhone(value) || t('Please enter a valid phone number'));
28
+ } }) }), jsx("div", { className: styles['span-2'], children: jsx(TextField, { isRequired: true, defaultValue: address?.email || '', isDisabled: isLoading, label: t('Email'), name: "email", showLabel: true, type: "email", validate: value => {
29
+ if (!value)
30
+ return value;
31
+ return (validateEmail(value) || t('Please enter a valid email address'));
32
+ } }) })] }));
33
+ }
34
+
35
+ export { EditAddressForm };
@@ -0,0 +1,3 @@
1
+ var styles = {"span-2":"edit-address-form-module-HF64G","currency-warning":"edit-address-form-module-V-LOB"};
2
+
3
+ export { styles as default };
@@ -1,9 +1,9 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { useState, useCallback, useEffect } from 'react';
3
- import { useFormattedMessage } from '../../intl/use-formatted-message.js';
4
- import { validatePassword } from '../../shared/model/account.js';
5
- import { FormSegment } from '../form/form-segment.js';
6
- import { PasswordField } from '../password-field/password-field.js';
3
+ import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
4
+ import { validatePassword } from '../../../shared/model/account.js';
5
+ import { PasswordField } from '../../fields/password-field/password-field.js';
6
+ import { FormSegment } from '../../layout/form/form-segment.js';
7
7
 
8
8
  function PasswordValidation({ isDisabled = false, onPasswordChanged, }) {
9
9
  const t = useFormattedMessage();
package/dist/index.js CHANGED
@@ -93,27 +93,28 @@ export { MultiSelect } from './filters/multi-select/multi-select.js';
93
93
  export { Pagination } from './filters/pagination/pagination.js';
94
94
  export { ConnectedFooter } from './footer/connected-footer.js';
95
95
  export { Footer } from './footer/footer.js';
96
- export { CheckboxField } from './forms/checkbox-field/checkbox-field.js';
97
- export { Checkbox } from './forms/checkbox/checkbox.js';
98
- export { ColorCheckbox } from './forms/color-checkbox/color-checkbox.js';
99
- export { FieldError } from './forms/field-error/field-error.js';
100
- export { Form } from './forms/form/form.js';
101
- export { FormFieldLayout } from './forms/form/form-field-layout.js';
102
- export { FormSegment } from './forms/form/form-segment.js';
103
- export { FormSegmentGroup } from './forms/form/form-segment-group.js';
104
- export { Input } from './forms/input/input.js';
105
- export { Label } from './forms/label/label.js';
106
- export { NumberField } from './forms/number-field/number-field.js';
107
- export { PasswordField } from './forms/password-field/password-field.js';
108
- export { PasswordValidation } from './forms/password-validation/password-validation.js';
109
- export { SearchField } from './forms/search-field/search-field.js';
110
- export { SelectField } from './forms/select-field/select-field.js';
111
- export { Select } from './forms/select/select.js';
112
- export { SwitchField } from './forms/switch-field/switch-field.js';
113
- export { Switch } from './forms/switch/switch.js';
114
- export { PasswordRevealToggle } from './forms/text-field/password-reveal-toggle/password-reveal-toggle.js';
115
- export { TextField } from './forms/text-field/text-field.js';
116
- export { TextArea } from './forms/textarea/textarea.js';
96
+ export { Checkbox } from './forms/elements/checkbox/checkbox.js';
97
+ export { ColorCheckbox } from './forms/elements/color-checkbox/color-checkbox.js';
98
+ export { FieldError } from './forms/elements/field-error/field-error.js';
99
+ export { Input } from './forms/elements/input/input.js';
100
+ export { Label } from './forms/elements/label/label.js';
101
+ export { Select } from './forms/elements/select/select.js';
102
+ export { Switch } from './forms/elements/switch/switch.js';
103
+ export { TextArea } from './forms/elements/textarea/textarea.js';
104
+ export { CheckboxField } from './forms/fields/checkbox-field/checkbox-field.js';
105
+ export { NumberField } from './forms/fields/number-field/number-field.js';
106
+ export { PasswordField } from './forms/fields/password-field/password-field.js';
107
+ export { SearchField } from './forms/fields/search-field/search-field.js';
108
+ export { SelectField } from './forms/fields/select-field/select-field.js';
109
+ export { SwitchField } from './forms/fields/switch-field/switch-field.js';
110
+ export { PasswordRevealToggle } from './forms/fields/text-field/password-reveal-toggle/password-reveal-toggle.js';
111
+ export { TextField } from './forms/fields/text-field/text-field.js';
112
+ export { Form } from './forms/layout/form/form.js';
113
+ export { FormFieldLayout } from './forms/layout/form/form-field-layout.js';
114
+ export { FormSegment } from './forms/layout/form/form-segment.js';
115
+ export { FormSegmentGroup } from './forms/layout/form/form-segment-group.js';
116
+ export { EditAddressForm } from './forms/partials/edit-address-form/edit-address-form.js';
117
+ export { PasswordValidation } from './forms/partials/password-validation/password-validation.js';
117
118
  export { CategoriesGrid } from './global-search/categories-grid/categories-grid.js';
118
119
  export { GlobalSearch, SearchRoot } from './global-search/global-search.js';
119
120
  export { GlobalSearchProvider } from './global-search/global-search-provider/global-search-provider.js';
@@ -225,7 +226,7 @@ export { PaymentPage } from './pages/checkout/payment-page/payment-page.js';
225
226
  export { PaymentPageContent } from './pages/checkout/payment-page/payment-page-content.js';
226
227
  export { parseAmount } from './pages/checkout/payment-page/utils/parse-amount.js';
227
228
  export { CurrencyChangeDialog } from './pages/checkout/shipping-page/components/currency-change-dialog.js';
228
- export { EDIT_ADDRESS_FORM_ID, EditAddressesForm } from './pages/checkout/shipping-page/components/edit-address-form.js';
229
+ export { EDIT_ADDRESS_FORM_ID, EditCheckoutBillToAddressForm } from './pages/checkout/shipping-page/components/edit-checkout-bill-to-address-form.js';
229
230
  export { ReadOnlyAddresses } from './pages/checkout/shipping-page/components/readonly-address.js';
230
231
  export { SonicAddress } from './pages/checkout/shipping-page/components/sonic-address.js';
231
232
  export { usePatchShippingDetails } from './pages/checkout/shipping-page/hooks/use-patch-shipping-details.js';
@@ -242,6 +243,7 @@ export { ConnectedChangeCustomerDialog } from './pages/my-sonic/actions/change-c
242
243
  export { ChangePassword } from './pages/my-sonic/actions/change-password/change-password.js';
243
244
  export { ChangePasswordDialog } from './pages/my-sonic/actions/change-password/change-password-dialog.js';
244
245
  export { ConnectedChangePasswordDialog } from './pages/my-sonic/actions/change-password/connected-change-password-dialog.js';
246
+ export { EditBillToAddress } from './pages/my-sonic/actions/edit-bill-to-address/edit-bill-to-address.js';
245
247
  export { ConnectedEditUserInfoDialog } from './pages/my-sonic/actions/edit-user-info/connected-edit-user-info-dialog.js';
246
248
  export { EditUserInfo } from './pages/my-sonic/actions/edit-user-info/edit-user-info.js';
247
249
  export { EditUserInfoDialog } from './pages/my-sonic/actions/edit-user-info/edit-user-info-dialog.js';
@@ -1,6 +1,10 @@
1
1
  "use client";
2
2
  import { useFormattedMessage } from './use-formatted-message.js';
3
3
 
4
- const FormattedMessage = ({ fallbackValue, id, optional, replacementValues, }) => useFormattedMessage()(id, { fallbackValue, optional, replacementValues });
4
+ const FormattedMessage = ({ fallbackValue, id, optional, replacementValues, }) => useFormattedMessage()(id, {
5
+ fallbackValue,
6
+ optional,
7
+ replacementValues,
8
+ });
5
9
 
6
10
  export { FormattedMessage };
@@ -1 +1 @@
1
- export type TranslationId = "'{0}' in all products" | "Try 'Search' and try to find the product you're looking for" | "Unfortnately, We found no articles for your search '{0}'" | ' to your account to manage your lists.' | 'Access denied.' | 'Account' | 'active' | 'Add order notes' | 'Add to list' | 'Address 1' | 'Address 2' | 'Address 3' | 'Address 4' | 'Address' | 'Amount: {0}' | 'An error occurred while changing the customer.' | 'An error occurred while fetching customers. Please try again later.' | 'An error occurred while processing your payment. Please try again.' | 'An unexpected error occured' | 'An unexpected error occured. Please try again.' | 'Are you looking for information about our service? Please visit our customer support page' | 'Are you sure you want to remove all items from your cart?' | 'Are you sure you want to remove this item from your cart?' | 'article' | 'articles' | 'As soon as possible' | 'ascending' | 'Attention' | 'Availability unknown, please contact customer support for lead time or alternatives.' | 'Billing address' | 'Billing and shipping address' | 'Billing and shipping information' | 'Billing' | 'Cancel' | 'Cart' | 'Change customer' | 'Change password' | 'Changing your address is currently not possible. Please contact customer support to change your address.' | 'Checkout order' | 'Chosen filters' | 'City' | 'Clear filters' | 'Clear' | 'Click the button below to continue shopping.' | 'Client cases' | 'Close' | 'CoC number' | 'Company name' | 'Conceal value' | 'Confirm password' | 'Continue shopping' | 'Continue to sign in' | 'Continue' | 'Cost overview' | 'Country' | 'create account' | 'Create new list' | 'Currency Change' | 'Current page' | 'Current Password is invalid' | 'Delivery date' | 'Delivery expected on {0}' | 'descending' | 'Double check your spelling' | 'Downloads' | 'Easily add your favorite products' | 'Edit billing address' | 'Edit shipping address' | 'Edit Sonic account' | 'Edit' | 'Email' | 'Enter your email address and we will send you an email that will allow you to recover your password.' | 'Excl. VAT' | 'Explore by categories' | 'Exploring our products by category' | 'facet.categories' | 'facet.height' | 'facet.weight' | 'Favorites' | 'Features' | 'Finalize order' | 'Finalize payment' | 'First name' | 'Forgot password?' | 'Fulfillment method' | 'General' | 'Hide filters' | 'Home' | 'If an account matches the email address you entered, instructions on how to recover the password will be sent to that email address shortly. If you do not receive this email, please contact Customer Support.' | 'If you want to proceed, click the continue button. If you want to change your country, close this message and select a different country.' | 'Incl. VAT' | 'Includes' | 'Industry' | 'industry.AG' | 'industry.AU' | 'industry.AV' | 'industry.BC' | 'industry.MA' | 'industry.MC' | 'industry.OT' | 'industry.PP' | 'industry.TR' | 'Information' | 'Language' | 'Last name' | 'List name already exists' | 'Log out' | 'Main menu' | 'Make this the default customer' | 'More than {0} articles' | 'My Sonic' | 'Name' | 'Navigate to...' | 'Navigation' | 'New list name' | 'New Password is required and must be different than Current Password' | 'New password' | 'New user?' | 'No results found. Please refine your search.' | 'Number of favorites' | 'Number of products' | 'of' | 'Or continue as guest' | 'Order confirmation' | 'Order date' | 'Order number' | 'Order' | 'Orders' | 'Our products' | 'Overview' | 'Password changed. Please sign in again.' | 'Password does not meet requirements' | 'Password' | 'Passwords do not match' | 'Pay by invoice' | 'Payment method' | 'Payment' | 'pc' | 'Phone' | 'Pick up' | 'Pickup address' | 'Please enter a valid email address' | 'Please enter a valid phone number' | 'please go back to your cart.' | 'Please Sign In' | 'PO Number' | 'Popular searches' | 'Postal Code' | 'Print' | 'Private account' | 'Processing' | 'Product Features' | 'Product' | 'Products' | 'Quantity' | 'Quick access' | 'Recent searches' | 'Recently viewed' | 'Recover your password' | 'Remember me' | 'Remove all' | 'Requested delivery date' | 'Reveal value' | 'Review and payment' | 'Save order' | 'Save' | 'Saved cart for later.' | 'Search for a customer' | 'Search' | 'Searching again using more general terms' | 'See all results' | 'Select a country' | 'Select a desired delivery date' | 'Select a language' | 'Select a list' | 'Select an industry' | 'Select other customer' | 'Selected customer' | 'Selecting As Soon As Possible will enable us to send the products to you as they become available.' | 'Selecting this country will result in your cart to be converted to the currency {0}' | 'Share your favorite list with others' | 'Ship' | 'Shipping address' | 'Shipping and handling' | 'Shipping details' | 'Shop more efficiently and quicker with a favorites list' | 'Shopping cart' | 'Show all' | 'Show filters' | 'Show less' | 'Show' | 'Sign in or create account' | 'sign in' | 'Sign me up for newsletters and product updates' | 'Signed in' | 'Signed out' | 'Signing in…' | 'Sonic account' | 'Sonic address' | 'Sonic Equipment' | 'Sorry, there are no products found' | 'Sorry, we could not find matches for' | 'Sort by' | 'sort.newest' | 'sort.price_asc' | 'sort.price_desc' | 'sort.relevance' | 'Specifications' | 'Start checkout' | 'Submenu' | 'Submit email address' | 'Submit' | 'Submitting…' | 'Subtotal' | 'Suggestions' | 'Support' | 'tag.limited' | 'tag.new' | 'The email address you entered is already associated with an existing account. Please sign in to this account or contact Customer Support.' | 'The expected delivery is an indication based on the product availability and the shipping location.' | 'The product has been added to your cart.' | 'The product has been removed from your cart.' | 'The product has been updated in your cart.' | 'There are more customers, please refine your search if needed.' | 'There are no products in your shopping cart.' | 'There is no information to display' | 'This email is already in use' | 'Toggle navigation menu' | 'Total amount is' | 'Total' | 'Try another search' | 'Unable to add the product to your cart.' | 'Unable to empty your cart.' | 'Unable to remove the product from your cart.' | 'Unable to save cart for later.' | 'Unable to update the product in your cart.' | 'Unknown' | 'Updating address' | 'Use billing address' | 'Use fewer keywords' | 'Username' | 'Validating' | 'validation.badInput' | 'validation.customError' | 'validation.invalid' | 'validation.patternMismatch' | 'validation.rangeOverflow' | 'validation.rangeUnderflow' | 'validation.stepMismatch' | 'validation.tooLong' | 'validation.tooShort' | 'validation.typeMismatch' | 'validation.valid' | 'validation.valueMissing' | 'VAT Number' | 'VAT' | 'Welcome to Sonic Equipment. Please choose your country and language below.' | 'What are you searching for?' | 'You are not authorized to access this information.' | 'You are not authorized to perform this action' | 'You are not authorized to view customers. Please log in or contact support.' | 'You could try checking the spelling of your search query' | 'You could try exploring our products by category' | 'You could try' | 'You have reached the end of the results, but there may be more articles available. Adjust your filters or search to discover more!' | 'You must ' | 'You selected a country where we invoice in a different currency. This will result in your cart being converted to the new currency. If you would like to review your order, ' | 'Your cart has been emptied.' | 'Your email and password were not recognized.' | 'Your favorites are available on multiple devices' | 'Your new Sonic Equipment account was succesfully created. You should receive an email soon with further instructions on how to activate this account. If you do not receive this email, please contact Customer Support.' | 'Your shopping cart is still empty';
1
+ export type TranslationId = "'{0}' in all products" | "Try 'Search' and try to find the product you're looking for" | "Unfortnately, We found no articles for your search '{0}'" | ' to your account to manage your lists.' | 'Access denied.' | 'Account' | 'active' | 'Add order notes' | 'Add to list' | 'Address 1' | 'Address 2' | 'Address 3' | 'Address 4' | 'Address' | 'All payment methods are unavailable at this time. Please contact customer support.' | 'Amount: {0}' | 'An error occurred while changing the customer.' | 'An error occurred while fetching customers. Please try again later.' | 'An error occurred while processing your payment. Please try again.' | 'An unexpected error occured' | 'An unexpected error occured. Please try again.' | 'Are you looking for information about our service? Please visit our customer support page' | 'Are you sure you want to remove all items from your cart?' | 'Are you sure you want to remove this item from your cart?' | 'article' | 'articles' | 'As soon as possible' | 'ascending' | 'Attention' | 'Availability unknown, please contact customer support for lead time or alternatives.' | 'Billing address' | 'Billing and shipping address' | 'Billing and shipping information' | 'Billing' | 'Cancel' | 'Cart' | 'Change customer' | 'Change password' | 'Changing your address is currently not possible. Please contact customer support to change your address.' | 'Checkout order' | 'Chosen filters' | 'City' | 'Clear filters' | 'Clear' | 'Click the button below to continue shopping.' | 'Client cases' | 'Close' | 'CoC number' | 'Company name' | 'Conceal value' | 'Confirm password' | 'Continue shopping' | 'Continue to sign in' | 'Continue' | 'Cost overview' | 'Country' | 'create account' | 'Create new list' | 'Currency Change' | 'Current page' | 'Current Password is invalid' | 'Delivery date' | 'Delivery expected on {0}' | 'descending' | 'Double check your spelling' | 'Downloads' | 'Easily add your favorite products' | 'Edit billing address' | 'Edit shipping address' | 'Edit Sonic account' | 'Edit' | 'Email' | 'Enter your email address and we will send you an email that will allow you to recover your password.' | 'Excl. VAT' | 'Explore by categories' | 'Exploring our products by category' | 'facet.categories' | 'facet.height' | 'facet.weight' | 'Favorites' | 'Features' | 'Finalize order' | 'Finalize payment' | 'First name' | 'Forgot password?' | 'Fulfillment method' | 'General' | 'Hide filters' | 'Home' | 'If an account matches the email address you entered, instructions on how to recover the password will be sent to that email address shortly. If you do not receive this email, please contact Customer Support.' | 'If you want to proceed, click the continue button. If you want to change your country, close this message and select a different country.' | 'Incl. VAT' | 'Includes' | 'Industry' | 'industry.AG' | 'industry.AU' | 'industry.AV' | 'industry.BC' | 'industry.MA' | 'industry.MC' | 'industry.OT' | 'industry.PP' | 'industry.TR' | 'Information' | 'Language' | 'Last name' | 'List name already exists' | 'Log out' | 'Main menu' | 'Make this the default customer' | 'More than {0} articles' | 'My Sonic' | 'Name' | 'Navigate to...' | 'Navigation' | 'New list name' | 'New Password is required and must be different than Current Password' | 'New password' | 'New user?' | 'No results found. Please refine your search.' | 'Number of favorites' | 'Number of products' | 'of' | 'Or continue as guest' | 'Order confirmation' | 'Order date' | 'Order number' | 'Order' | 'Orders' | 'Our products' | 'Overview' | 'Password changed. Please sign in again.' | 'Password does not meet requirements' | 'Password' | 'Passwords do not match' | 'Pay by invoice' | 'Payment method' | 'Payment' | 'pc' | 'Phone' | 'Pick up' | 'Pickup address' | 'Please enter a valid email address' | 'Please enter a valid phone number' | 'please go back to your cart.' | 'Please Sign In' | 'PO Number' | 'Popular searches' | 'Postal Code' | 'Print' | 'Private account' | 'Processing' | 'Product Features' | 'Product' | 'Products' | 'Quantity' | 'Quick access' | 'Recent searches' | 'Recently viewed' | 'Recover your password' | 'Remember me' | 'Remove all' | 'Requested delivery date' | 'Reveal value' | 'Review and payment' | 'Save order' | 'Save' | 'Saved cart for later.' | 'Search for a customer' | 'Search' | 'Searching again using more general terms' | 'See all results' | 'Select a country' | 'Select a desired delivery date' | 'Select a language' | 'Select a list' | 'Select an industry' | 'Select other customer' | 'Selected customer' | 'Selecting As Soon As Possible will enable us to send the products to you as they become available.' | 'Selecting this country will result in your cart to be converted to the currency {0}' | 'Share your favorite list with others' | 'Ship' | 'Shipping address' | 'Shipping and handling' | 'Shipping details' | 'Shop more efficiently and quicker with a favorites list' | 'Shopping cart' | 'Show all' | 'Show filters' | 'Show less' | 'Show' | 'Sign in or create account' | 'sign in' | 'Sign me up for newsletters and product updates' | 'Signed in' | 'Signed out' | 'Signing in…' | 'Sonic account' | 'Sonic address' | 'Sonic Equipment' | 'Sorry, there are no products found' | 'Sorry, we could not find matches for' | 'Sort by' | 'sort.newest' | 'sort.price_asc' | 'sort.price_desc' | 'sort.relevance' | 'Specifications' | 'Start checkout' | 'Submenu' | 'Submit email address' | 'Submit' | 'Submitting…' | 'Subtotal' | 'Suggestions' | 'Support' | 'tag.limited' | 'tag.new' | 'The email address you entered is already associated with an existing account. Please sign in to this account or contact Customer Support.' | 'The expected delivery is an indication based on the product availability and the shipping location.' | 'The product has been added to your cart.' | 'The product has been removed from your cart.' | 'The product has been updated in your cart.' | 'There are more customers, please refine your search if needed.' | 'There are no products in your shopping cart.' | 'There is no information to display' | 'This email is already in use' | 'Toggle navigation menu' | 'Total amount is' | 'Total' | 'Try another search' | 'Unable to add the product to your cart.' | 'Unable to empty your cart.' | 'Unable to remove the product from your cart.' | 'Unable to save cart for later.' | 'Unable to update the product in your cart.' | 'Unknown' | 'Updating address' | 'Use billing address' | 'Use fewer keywords' | 'Username' | 'Validating' | 'validation.badInput' | 'validation.customError' | 'validation.invalid' | 'validation.patternMismatch' | 'validation.rangeOverflow' | 'validation.rangeUnderflow' | 'validation.stepMismatch' | 'validation.tooLong' | 'validation.tooShort' | 'validation.typeMismatch' | 'validation.valid' | 'validation.valueMissing' | 'VAT Number' | 'VAT' | 'Welcome to Sonic Equipment. Please choose your country and language below.' | 'What are you searching for?' | 'You are not authorized to access this information.' | 'You are not authorized to perform this action' | 'You are not authorized to view customers. Please log in or contact support.' | 'You could try checking the spelling of your search query' | 'You could try exploring our products by category' | 'You could try' | 'You have reached the end of the results, but there may be more articles available. Adjust your filters or search to discover more!' | 'You must ' | 'You selected a country where we invoice in a different currency. This will result in your cart being converted to the new currency. If you would like to review your order, ' | 'Your cart has been emptied.' | 'Your email and password were not recognized.' | 'Your favorites are available on multiple devices' | 'Your new Sonic Equipment account was succesfully created. You should receive an email soon with further instructions on how to activate this account. If you do not receive this email, please contact Customer Support.' | 'Your shopping cart is still empty';
@@ -14,9 +14,14 @@ export interface FormattedMessageOptions {
14
14
  optional?: boolean;
15
15
  replacementValues?: Record<string, string>;
16
16
  }
17
- export interface FormattedMessageProps extends FormattedMessageOptions {
17
+ export interface FormattedMessageWithKnownTranslationIdProps extends FormattedMessageOptions {
18
18
  id: TranslationId;
19
19
  }
20
+ export interface FormattedMessageWithUnknownTranslationIdProps extends FormattedMessageOptions {
21
+ force: true;
22
+ id: string;
23
+ }
24
+ export type FormattedMessageProps = FormattedMessageWithKnownTranslationIdProps | FormattedMessageWithUnknownTranslationIdProps;
20
25
  export interface FormattedMessageFunction {
21
26
  (id: TranslationId, options?: {
22
27
  fallbackValue?: string;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { OnSubmitHandler, ValidationErrors } from '../../forms/form/form';
2
+ import { OnSubmitHandler, ValidationErrors } from '../../forms/layout/form/form';
3
3
  import { ModalProps } from '../modal/modal';
4
4
  interface DialogProps extends Omit<ModalProps, 'children' | 'className'> {
5
5
  allowClose?: boolean;
@@ -4,7 +4,7 @@ import { Dialog as Dialog$1 } from 'react-aria-components';
4
4
  import clsx from 'clsx';
5
5
  import { Button } from '../../buttons/button/button.js';
6
6
  import { IconButton } from '../../buttons/icon-button/icon-button.js';
7
- import { Form } from '../../forms/form/form.js';
7
+ import { Form } from '../../forms/layout/form/form.js';
8
8
  import { StrokeCloseboxIcon } from '../../icons/stroke/stroke-closebox-icon.js';
9
9
  import { FormattedMessage } from '../../intl/formatted-message.js';
10
10
  import { useFormattedMessage } from '../../intl/use-formatted-message.js';
@@ -2,8 +2,8 @@
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { useState, useEffect } from 'react';
4
4
  import { Button } from '../../buttons/button/button.js';
5
- import { Select } from '../../forms/select/select.js';
6
- import { TextField } from '../../forms/text-field/text-field.js';
5
+ import { Select } from '../../forms/elements/select/select.js';
6
+ import { TextField } from '../../forms/fields/text-field/text-field.js';
7
7
  import { useFormattedMessage } from '../../intl/use-formatted-message.js';
8
8
  import { ProgressCircle } from '../../loading/progress-circle.js';
9
9
  import { useCreateWishList } from '../../shared/api/storefront/hooks/wishlist/use-create-wishlist.js';
@@ -2,7 +2,7 @@
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import { useEffect } from 'react';
4
4
  import { Button } from '../../buttons/button/button.js';
5
- import { TextField } from '../../forms/text-field/text-field.js';
5
+ import { TextField } from '../../forms/fields/text-field/text-field.js';
6
6
  import { useFormattedMessage } from '../../intl/use-formatted-message.js';
7
7
  import { Message } from '../../message/message.js';
8
8
  import { useRecoverPassword } from '../../shared/api/storefront/hooks/authentication/use-recover-password.js';
@@ -4,12 +4,12 @@ import { useState } from 'react';
4
4
  import { Button } from '../../../../buttons/button/button.js';
5
5
  import { CountrySelect } from '../../../../country-select/country-select.js';
6
6
  import { useCountries } from '../../../../country-select/hooks/use-countries.js';
7
- import { Form } from '../../../../forms/form/form.js';
8
- import { FormSegment } from '../../../../forms/form/form-segment.js';
9
- import { FormSegmentGroup } from '../../../../forms/form/form-segment-group.js';
10
- import { PasswordValidation } from '../../../../forms/password-validation/password-validation.js';
11
- import { SwitchField } from '../../../../forms/switch-field/switch-field.js';
12
- import { TextField } from '../../../../forms/text-field/text-field.js';
7
+ import { SwitchField } from '../../../../forms/fields/switch-field/switch-field.js';
8
+ import { TextField } from '../../../../forms/fields/text-field/text-field.js';
9
+ import { Form } from '../../../../forms/layout/form/form.js';
10
+ import { FormSegment } from '../../../../forms/layout/form/form-segment.js';
11
+ import { FormSegmentGroup } from '../../../../forms/layout/form/form-segment-group.js';
12
+ import { PasswordValidation } from '../../../../forms/partials/password-validation/password-validation.js';
13
13
  import { isCountryCode } from '../../../../intl/types.js';
14
14
  import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
15
15
  import { validateEmail } from '../../../../shared/model/address.js';
@@ -33,7 +33,7 @@ function CreateAccountForm({ errorType, isDisabled: _isDisabled = false, isPendi
33
33
  const firstName = formData.get('firstName')?.toString();
34
34
  const lastName = formData.get('lastName')?.toString() || '';
35
35
  const email = formData.get('email')?.toString();
36
- const password = formData.get('password')?.toString();
36
+ const password = formData.get('new-password')?.toString();
37
37
  const isSubscribed = Boolean(formData.get('isSubscribed'));
38
38
  const isPrivateAccount = Boolean(formData.get('isPrivateAccount'));
39
39
  const countryId = formData.get('countrySelect')?.toString();
@@ -2,12 +2,12 @@
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { Button } from '../../../../buttons/button/button.js';
4
4
  import { Link } from '../../../../buttons/link/link.js';
5
- import { Form } from '../../../../forms/form/form.js';
6
- import { FormSegment } from '../../../../forms/form/form-segment.js';
7
- import { FormSegmentGroup } from '../../../../forms/form/form-segment-group.js';
8
- import { PasswordField } from '../../../../forms/password-field/password-field.js';
9
- import { SwitchField } from '../../../../forms/switch-field/switch-field.js';
10
- import { TextField } from '../../../../forms/text-field/text-field.js';
5
+ import { PasswordField } from '../../../../forms/fields/password-field/password-field.js';
6
+ import { SwitchField } from '../../../../forms/fields/switch-field/switch-field.js';
7
+ import { TextField } from '../../../../forms/fields/text-field/text-field.js';
8
+ import { Form } from '../../../../forms/layout/form/form.js';
9
+ import { FormSegment } from '../../../../forms/layout/form/form-segment.js';
10
+ import { FormSegmentGroup } from '../../../../forms/layout/form/form-segment-group.js';
11
11
  import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
12
12
  import { validateEmail } from '../../../../shared/model/address.js';
13
13
  import { voidFunction } from '../../../../shared/model/defaults.js';
@@ -1,7 +1,7 @@
1
- import { AddressType } from '../../../shared/model/address';
1
+ import { Address } from '../../../shared/model/address';
2
2
  interface BillingAndInvoiceInformationProps {
3
- billToAddress: AddressType;
4
- shipToAddress: AddressType;
3
+ billToAddress: Address | undefined | null;
4
+ shipToAddress: Address | undefined | null;
5
5
  }
6
6
  export declare function BillingAndInvoiceInformation({ billToAddress, shipToAddress, }: BillingAndInvoiceInformationProps): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -7,7 +7,7 @@ import styles from './billing-and-invoice-information.module.css.js';
7
7
 
8
8
  function BillingAndInvoiceInformation({ billToAddress, shipToAddress, }) {
9
9
  const t = useFormattedMessage();
10
- return (jsxs("div", { className: styles['billing-and-invoice-information'], children: [jsx("section", { className: styles.section, children: jsx(InfoDisplay, { id: "billing-address", label: t('Billing address'), value: jsx(AddressInfoDisplay, { address: billToAddress, "data-test-selector": "orderConfirmationBillingInformation" }) }) }), jsx("section", { className: styles.section, children: jsx(InfoDisplay, { id: "shipping-address", label: t('Shipping address'), value: jsx(AddressInfoDisplay, { address: shipToAddress, "data-test-selector": "orderConfirmationShippingInformation" }) }) })] }));
10
+ return (jsxs("div", { className: styles['billing-and-invoice-information'], children: [billToAddress && (jsx("section", { className: styles.section, children: jsx(InfoDisplay, { id: "billing-address", label: t('Billing address'), value: jsx(AddressInfoDisplay, { address: billToAddress, "data-test-selector": "orderConfirmationBillingInformation" }) }) })), shipToAddress && (jsx("section", { className: styles.section, children: jsx(InfoDisplay, { id: "shipping-address", label: t('Shipping address'), value: jsx(AddressInfoDisplay, { address: shipToAddress, "data-test-selector": "orderConfirmationShippingInformation" }) }) }))] }));
11
11
  }
12
12
 
13
13
  export { BillingAndInvoiceInformation };
@@ -56,26 +56,32 @@ function OrderConfirmationPageContent({ cart, }) {
56
56
  secondary: (jsxs(Fragment, { children: [cart.canSaveOrder && (jsx(Button, { color: "secondary", onClick: () => {
57
57
  saveCartForLater.mutate({ cart });
58
58
  }, variant: "outline", children: jsx(FormattedMessage, { id: "Save order" }) })), jsx(PrintButton, {})] })),
59
- }, overview: jsx(CartTotals, { currencyCode: currencyCode, fulfillmentMethod: cart.fulfillmentMethod, orderNumber: cart.orderNumber, shippingCost: cart.shippingAndHandling, subtotal: cart.orderSubTotal, tax: cart.totalTax, total: cart.orderGrandTotal, vatPercentage: cart.cartLines?.[0]?.pricing?.vatRate }), children: jsxs("div", { children: [jsx(CheckoutPageSection, { hasBorder: false, title: t('General'), children: jsx(CheckoutPageSectionContent, { children: jsxs("div", { className: styles['general-order-info'], children: [cart.orderDate && (jsx(InfoDisplay, { id: "order-date", label: t('Order date'), value: formatDateToLocaleString(new Date(cart.orderDate), cultureCode) })), cart.requestedDeliveryDateDisplay && (jsx(InfoDisplay, { id: "requested-delivery-date", label: t('Requested delivery date'), value: formatDateToLocaleString(new Date(cart.requestedDeliveryDateDisplay.toString()), cultureCode) })), cart.poNumber && (jsx(InfoDisplay, { id: "po-number", label: t('PO Number'), value: cart.poNumber }))] }) }) }), jsx(CheckoutPageSection, { hasBorder: false, title: t('Billing and shipping information'), children: jsx(CheckoutPageSectionContent, { children: jsx(BillingAndInvoiceInformation, { billToAddress: {
60
- address1: cart.billTo?.address1,
61
- address2: cart.billTo?.address2,
62
- address3: cart.billTo?.address3,
63
- city: cart.billTo?.city,
64
- companyName: cart.billTo?.companyName,
65
- country: cart.billTo?.country?.name,
66
- email: cart.billTo?.email,
67
- phone: cart.billTo?.phone,
68
- postalCode: cart.billTo?.postalCode,
69
- }, shipToAddress: {
70
- address1: cart.shipTo?.address1,
71
- address2: cart.shipTo?.address2,
72
- address3: cart.shipTo?.address3,
73
- city: cart.shipTo?.city,
74
- companyName: cart.shipTo?.companyName,
75
- country: cart.shipTo?.country?.name,
76
- email: cart.shipTo?.email,
77
- phone: cart.shipTo?.phone,
78
- postalCode: cart.shipTo?.postalCode,
59
+ }, overview: jsx(CartTotals, { currencyCode: currencyCode, fulfillmentMethod: cart.fulfillmentMethod, orderNumber: cart.orderNumber, shippingCost: cart.shippingAndHandling, subtotal: cart.orderSubTotal, tax: cart.totalTax, total: cart.orderGrandTotal, vatPercentage: cart.cartLines?.[0]?.pricing?.vatRate }), children: jsxs("div", { children: [jsx(CheckoutPageSection, { hasBorder: false, title: t('General'), children: jsx(CheckoutPageSectionContent, { children: jsxs("div", { className: styles['general-order-info'], children: [cart.orderDate && (jsx(InfoDisplay, { id: "order-date", label: t('Order date'), value: formatDateToLocaleString(new Date(cart.orderDate), cultureCode) })), cart.requestedDeliveryDateDisplay && (jsx(InfoDisplay, { id: "requested-delivery-date", label: t('Requested delivery date'), value: formatDateToLocaleString(new Date(cart.requestedDeliveryDateDisplay.toString()), cultureCode) })), cart.poNumber && (jsx(InfoDisplay, { id: "po-number", label: t('PO Number'), value: cart.poNumber }))] }) }) }), jsx(CheckoutPageSection, { hasBorder: false, title: t('Billing and shipping information'), children: jsx(CheckoutPageSectionContent, { children: jsx(BillingAndInvoiceInformation, { billToAddress: cart.billTo && {
60
+ address1: cart.billTo.address1,
61
+ address2: cart.billTo.address2,
62
+ address3: cart.billTo.address3,
63
+ attention: '',
64
+ city: cart.billTo.city,
65
+ companyName: cart.billTo.companyName,
66
+ country: cart.billTo.country,
67
+ email: cart.billTo.email,
68
+ firstName: '',
69
+ lastName: '',
70
+ phone: cart.billTo.phone,
71
+ postalCode: cart.billTo.postalCode,
72
+ }, shipToAddress: cart.shipTo && {
73
+ address1: cart.shipTo.address1,
74
+ address2: cart.shipTo.address2,
75
+ address3: cart.shipTo.address3,
76
+ attention: '',
77
+ city: cart.shipTo.city,
78
+ companyName: cart.shipTo.companyName,
79
+ country: cart.shipTo.country,
80
+ email: cart.shipTo.email,
81
+ firstName: '',
82
+ lastName: '',
83
+ phone: cart.shipTo.phone,
84
+ postalCode: cart.shipTo.postalCode,
79
85
  } }) }) }), jsx(CheckoutPageSection, { hasBorder: false, title: t('Order'), children: jsx(CheckoutPageSectionContent, { stretch: true, children: jsx(OrderLineList, { children: cart.cartLines?.map(cartLine => (jsx(OrderLineCard, { deliveryDate: undefined, href: cartLine.productUri, image: {
80
86
  fit: 'contain',
81
87
  image: {
@@ -5,6 +5,9 @@ import AdyenCheckout from '@adyen/adyen-web';
5
5
  import clsx from 'clsx';
6
6
  import qs from 'query-string';
7
7
  import { useCultureCode } from '../../../../intl/use-culture-code.js';
8
+ import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
9
+ import { logger } from '../../../../logging/logger.js';
10
+ import { Message } from '../../../../message/message.js';
8
11
  import { useCreateAdyenSession } from '../../../../shared/api/storefront/hooks/payment/use-create-adyen-session.js';
9
12
  import { useFetchAdyenConfig } from '../../../../shared/api/storefront/hooks/payment/use-fetch-adyen-config.js';
10
13
  import { postAdyenPayment, getAdyenPaymentDetails } from '../../../../shared/api/storefront/services/cart-service.js';
@@ -12,6 +15,7 @@ import { parseAmount } from '../utils/parse-amount.js';
12
15
  import styles from './adyen-payment.module.css.js';
13
16
 
14
17
  function AdyenPayment({ amount, cartId, countryCode, currencyCode, customerId, dropinRef, environment, isDisabled, onComplete, onError, orderAmount, returnUrl, }) {
18
+ const t = useFormattedMessage();
15
19
  const cultureCode = useCultureCode();
16
20
  // Get and remove Adyen query string params and keep them in a ref
17
21
  const queryStringParams = useRef(getAndRemoveAdyenQueryParams());
@@ -125,8 +129,10 @@ function AdyenPayment({ amount, cartId, countryCode, currencyCode, customerId, d
125
129
  adyenAmount,
126
130
  adyenCustomerId,
127
131
  ]);
128
- if (error)
129
- return jsx("div", { children: String(error) });
132
+ if (error) {
133
+ logger.error('Adyen Payment Error:', error);
134
+ return (jsx(Message, { type: "danger", children: t('All payment methods are unavailable at this time. Please contact customer support.') }));
135
+ }
130
136
  return (jsx("div", { ref: dropinDivRef, className: clsx(Boolean(redirectResult) && styles.loading, isDisabled && styles.loading), id: "dropin" }));
131
137
  }
132
138
  function getAndRemoveAdyenQueryParams() {
@@ -9,7 +9,6 @@ interface PaymentProps {
9
9
  cartId: string;
10
10
  }) => void;
11
11
  onProcessing: (processing: boolean) => void;
12
- onValidatingVAT: (validating: boolean) => void;
13
12
  }
14
- export declare function Payment({ atp, cart: _cart, form, isProcessing, onError: _onError, onPaymentComplete, onProcessing, onValidatingVAT, }: PaymentProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function Payment({ atp, cart: _cart, form, isProcessing, onError: _onError, onPaymentComplete, onProcessing, }: PaymentProps): import("react/jsx-runtime").JSX.Element;
15
14
  export {};