@sonic-equipment/ui 185.0.0 → 186.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.
- package/dist/address-info-display/address-info-display.d.ts +2 -2
- package/dist/address-info-display/address-info-display.js +1 -1
- package/dist/algolia/algolia-multi-select-filter-section.js +1 -1
- package/dist/algolia/algolia-sort-by.js +1 -1
- package/dist/buttons/add-to-cart-button/add-to-cart-button.js +1 -1
- package/dist/country-select/country-select.js +1 -1
- package/dist/country-select/hooks/use-countries.js +1 -0
- package/dist/country-selector/country-selector-dialog/country-selector-dialog.js +1 -1
- package/dist/exports.d.ts +24 -22
- package/dist/filters/pagination/pagination.js +1 -1
- package/dist/forms/elements/checkbox/checkbox.module.css.js +3 -0
- package/dist/forms/{field-error → elements/field-error}/field-error.js +1 -1
- package/dist/forms/elements/field-error/field-error.module.css.js +3 -0
- package/dist/forms/elements/input/input.module.css.js +3 -0
- package/dist/forms/elements/label/label.module.css.js +3 -0
- package/dist/forms/{select → elements/select}/select.js +3 -3
- package/dist/forms/elements/select/select.module.css.js +3 -0
- package/dist/forms/elements/switch/switch.module.css.js +3 -0
- package/dist/forms/elements/textarea/textarea.module.css.js +3 -0
- package/dist/forms/{checkbox-field → fields/checkbox-field}/checkbox-field.d.ts +2 -2
- package/dist/forms/{checkbox-field → fields/checkbox-field}/checkbox-field.js +4 -4
- package/dist/forms/fields/checkbox-field/checkbox-field.module.css.js +3 -0
- package/dist/forms/{number-field → fields/number-field}/number-field.d.ts +1 -1
- package/dist/forms/{number-field → fields/number-field}/number-field.js +8 -8
- package/dist/forms/fields/number-field/number-field.module.css.js +3 -0
- package/dist/forms/{search-field → fields/search-field}/search-field.js +3 -3
- package/dist/forms/{select-field → fields/select-field}/select-field.d.ts +1 -1
- package/dist/forms/{select-field → fields/select-field}/select-field.js +7 -7
- package/dist/forms/fields/select-field/select-field.module.css.js +3 -0
- package/dist/forms/{switch-field → fields/switch-field}/switch-field.d.ts +2 -2
- package/dist/forms/{switch-field → fields/switch-field}/switch-field.js +4 -4
- package/dist/forms/fields/switch-field/switch-field.module.css.js +3 -0
- package/dist/forms/{text-field → fields/text-field}/password-reveal-toggle/password-reveal-toggle.js +3 -3
- package/dist/forms/{text-field → fields/text-field}/password-reveal-toggle/password-reveal-toggle.module.css.js +1 -1
- package/dist/forms/{text-field → fields/text-field}/text-field.d.ts +1 -1
- package/dist/forms/{text-field → fields/text-field}/text-field.js +6 -6
- package/dist/forms/fields/text-field/text-field.module.css.js +3 -0
- package/dist/forms/layout/form/form-field-layout.module.css.js +3 -0
- package/dist/forms/layout/form/form-segment-group.module.css.js +3 -0
- package/dist/forms/layout/form/form-segment.module.css.js +3 -0
- package/dist/forms/{form → layout/form}/form.js +3 -3
- package/dist/forms/layout/form/form.module.css.js +3 -0
- package/dist/forms/partials/edit-address-form/edit-address-form.d.ts +8 -0
- package/dist/forms/partials/edit-address-form/edit-address-form.js +35 -0
- package/dist/forms/partials/edit-address-form/edit-address-form.module.css.js +3 -0
- package/dist/forms/{password-validation → partials/password-validation}/password-validation.js +4 -4
- package/dist/index.js +24 -22
- package/dist/intl/formatted-message.js +5 -1
- package/dist/intl/types.d.ts +6 -1
- package/dist/modals/dialog/dialog.d.ts +1 -1
- package/dist/modals/dialog/dialog.js +1 -1
- package/dist/modals/favorite/add-to-favorite-dialog.js +2 -2
- package/dist/modals/recover-password/recover-password-dialog.js +1 -1
- package/dist/pages/account/components/create-account-form/create-account-form.js +7 -7
- package/dist/pages/account/components/sign-in-form/sign-in-form.js +6 -6
- package/dist/pages/checkout/components/billing-and-invoice-information.d.ts +3 -3
- package/dist/pages/checkout/components/billing-and-invoice-information.js +1 -1
- package/dist/pages/checkout/order-confirmation-page/order-confirmation-page-content.js +26 -20
- package/dist/pages/checkout/payment-page/components/payment.js +29 -23
- package/dist/pages/checkout/shipping-page/components/{edit-address-form.d.ts → edit-checkout-bill-to-address-form.d.ts} +3 -17
- package/dist/pages/checkout/shipping-page/components/edit-checkout-bill-to-address-form.js +49 -0
- package/dist/pages/checkout/shipping-page/components/edit-checkout-bill-to-address-form.module.css.js +3 -0
- package/dist/pages/checkout/shipping-page/components/readonly-address.js +7 -5
- package/dist/pages/checkout/shipping-page/shipping-page-content.js +2 -2
- package/dist/pages/checkout/shipping-page/shipping-page.js +2 -2
- package/dist/pages/my-sonic/actions/change-customer/change-customer.js +2 -2
- package/dist/pages/my-sonic/actions/change-password/change-password-dialog.js +1 -1
- package/dist/pages/my-sonic/actions/change-password/change-password.js +3 -3
- package/dist/pages/my-sonic/actions/edit-bill-to-address/edit-bill-to-address.d.ts +1 -0
- package/dist/pages/my-sonic/actions/edit-bill-to-address/edit-bill-to-address.js +8 -0
- package/dist/pages/my-sonic/actions/edit-user-info/edit-user-info-dialog.d.ts +1 -1
- package/dist/pages/my-sonic/actions/edit-user-info/edit-user-info.js +1 -1
- package/dist/pages/my-sonic/navigation/my-sonic-mobile-navigation.js +1 -1
- package/dist/shared/data/countries-languages.data.js +4 -0
- package/dist/shared/model/address.d.ts +27 -12
- package/dist/shared/model/countries-languages.d.ts +1 -0
- package/dist/shared/utils/price.d.ts +1 -1
- package/dist/styles.css +362 -349
- package/package.json +1 -1
- package/dist/forms/checkbox/checkbox.module.css.js +0 -3
- package/dist/forms/checkbox-field/checkbox-field.module.css.js +0 -3
- package/dist/forms/field-error/field-error.module.css.js +0 -3
- package/dist/forms/form/form-field-layout.module.css.js +0 -3
- package/dist/forms/form/form-segment-group.module.css.js +0 -3
- package/dist/forms/form/form-segment.module.css.js +0 -3
- package/dist/forms/form/form.module.css.js +0 -3
- package/dist/forms/input/input.module.css.js +0 -3
- package/dist/forms/label/label.module.css.js +0 -3
- package/dist/forms/number-field/number-field.module.css.js +0 -3
- package/dist/forms/select/select.module.css.js +0 -3
- package/dist/forms/select-field/select-field.module.css.js +0 -3
- package/dist/forms/switch/switch.module.css.js +0 -3
- package/dist/forms/switch-field/switch-field.module.css.js +0 -3
- package/dist/forms/text-field/text-field.module.css.js +0 -3
- package/dist/forms/textarea/textarea.module.css.js +0 -3
- package/dist/pages/checkout/shipping-page/components/edit-address-form.js +0 -68
- package/dist/pages/checkout/shipping-page/components/edit-address-form.module.css.js +0 -3
- /package/dist/forms/{checkbox → elements/checkbox}/checkbox.d.ts +0 -0
- /package/dist/forms/{checkbox → elements/checkbox}/checkbox.js +0 -0
- /package/dist/forms/{color-checkbox → elements/color-checkbox}/color-checkbox.d.ts +0 -0
- /package/dist/forms/{color-checkbox → elements/color-checkbox}/color-checkbox.js +0 -0
- /package/dist/forms/{field-error → elements/field-error}/field-error.d.ts +0 -0
- /package/dist/forms/{input → elements/input}/input.d.ts +0 -0
- /package/dist/forms/{input → elements/input}/input.js +0 -0
- /package/dist/forms/{label → elements/label}/label.d.ts +0 -0
- /package/dist/forms/{label → elements/label}/label.js +0 -0
- /package/dist/forms/{select → elements/select}/select.d.ts +0 -0
- /package/dist/forms/{switch → elements/switch}/switch.d.ts +0 -0
- /package/dist/forms/{switch → elements/switch}/switch.js +0 -0
- /package/dist/forms/{textarea → elements/textarea}/textarea.d.ts +0 -0
- /package/dist/forms/{textarea → elements/textarea}/textarea.js +0 -0
- /package/dist/forms/{password-field → fields/password-field}/password-field.d.ts +0 -0
- /package/dist/forms/{password-field → fields/password-field}/password-field.js +0 -0
- /package/dist/forms/{search-field → fields/search-field}/search-field.d.ts +0 -0
- /package/dist/forms/{text-field → fields/text-field}/password-reveal-toggle/password-reveal-toggle.d.ts +0 -0
- /package/dist/forms/{form → layout/form}/form-field-layout.d.ts +0 -0
- /package/dist/forms/{form → layout/form}/form-field-layout.js +0 -0
- /package/dist/forms/{form → layout/form}/form-segment-group.d.ts +0 -0
- /package/dist/forms/{form → layout/form}/form-segment-group.js +0 -0
- /package/dist/forms/{form → layout/form}/form-segment.d.ts +0 -0
- /package/dist/forms/{form → layout/form}/form-segment.js +0 -0
- /package/dist/forms/{form → layout/form}/form.d.ts +0 -0
- /package/dist/forms/{password-validation → partials/password-validation}/password-validation.d.ts +0 -0
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 {
|
|
97
|
-
export {
|
|
98
|
-
export {
|
|
99
|
-
export {
|
|
100
|
-
export {
|
|
101
|
-
export {
|
|
102
|
-
export {
|
|
103
|
-
export {
|
|
104
|
-
export {
|
|
105
|
-
export {
|
|
106
|
-
export {
|
|
107
|
-
export {
|
|
108
|
-
export {
|
|
109
|
-
export {
|
|
110
|
-
export {
|
|
111
|
-
export {
|
|
112
|
-
export {
|
|
113
|
-
export {
|
|
114
|
-
export {
|
|
115
|
-
export {
|
|
116
|
-
export {
|
|
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,
|
|
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, {
|
|
4
|
+
const FormattedMessage = ({ fallbackValue, id, optional, replacementValues, }) => useFormattedMessage()(id, {
|
|
5
|
+
fallbackValue,
|
|
6
|
+
optional,
|
|
7
|
+
replacementValues,
|
|
8
|
+
});
|
|
5
9
|
|
|
6
10
|
export { FormattedMessage };
|
package/dist/intl/types.d.ts
CHANGED
|
@@ -14,9 +14,14 @@ export interface FormattedMessageOptions {
|
|
|
14
14
|
optional?: boolean;
|
|
15
15
|
replacementValues?: Record<string, string>;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
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 {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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 {
|
|
1
|
+
import { Address } from '../../../shared/model/address';
|
|
2
2
|
interface BillingAndInvoiceInformationProps {
|
|
3
|
-
billToAddress:
|
|
4
|
-
shipToAddress:
|
|
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
|
|
61
|
-
address2: cart.billTo
|
|
62
|
-
address3: cart.billTo
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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: {
|
|
@@ -6,9 +6,9 @@ import { useAlgoliaInsights } from '../../../../algolia/use-algolia-insights.js'
|
|
|
6
6
|
import { Accordion } from '../../../../collapsables/accordion/accordion.js';
|
|
7
7
|
import { AccordionItem } from '../../../../collapsables/accordion/accordion-item.js';
|
|
8
8
|
import { InfoDisplay } from '../../../../display/info-display/info-display.js';
|
|
9
|
-
import { Checkbox } from '../../../../forms/checkbox/checkbox.js';
|
|
10
|
-
import { Select } from '../../../../forms/select/select.js';
|
|
11
|
-
import { TextField } from '../../../../forms/text-field/text-field.js';
|
|
9
|
+
import { Checkbox } from '../../../../forms/elements/checkbox/checkbox.js';
|
|
10
|
+
import { Select } from '../../../../forms/elements/select/select.js';
|
|
11
|
+
import { TextField } from '../../../../forms/fields/text-field/text-field.js';
|
|
12
12
|
import { InfoIconTooltip } from '../../../../info-icon-tooltip/info-icon-tooltip.js';
|
|
13
13
|
import { FormattedMessage } from '../../../../intl/formatted-message.js';
|
|
14
14
|
import { isCountryCode } from '../../../../intl/types.js';
|
|
@@ -321,26 +321,32 @@ function Payment({ atp, cart: _cart, form, isProcessing, onError: _onError, onPa
|
|
|
321
321
|
/* eslint-disable ssr-friendly/no-dom-globals-in-react-fc */
|
|
322
322
|
typeof window === 'undefined'
|
|
323
323
|
? ''
|
|
324
|
-
: `${window.location.pathname}${window.location.search}` })), Boolean(paymentError) && (jsx("div", { className: styles['error-message'], children: jsx(FormattedMessage, { id: "An error occurred while processing your payment. Please try again." }) })), jsx(InfoDisplay, { id: "shipping-and-invoice-information", label: t('Billing and shipping address'), value: jsx(Accordion, { variant: "select", children: jsx(AccordionItem, { "data-test-selector": "billingAndShippingInformation", id: "invoice-and-shipping", isDisabled: isDisabled, title: t('Billing and shipping information'), children: jsx(BillingAndInvoiceInformation, { billToAddress: {
|
|
325
|
-
address1: cart.billTo
|
|
326
|
-
address2: cart.billTo
|
|
327
|
-
address3: cart.billTo
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
324
|
+
: `${window.location.pathname}${window.location.search}` })), Boolean(paymentError) && (jsx("div", { className: styles['error-message'], children: jsx(FormattedMessage, { id: "An error occurred while processing your payment. Please try again." }) })), jsx(InfoDisplay, { id: "shipping-and-invoice-information", label: t('Billing and shipping address'), value: jsx(Accordion, { variant: "select", children: jsx(AccordionItem, { "data-test-selector": "billingAndShippingInformation", id: "invoice-and-shipping", isDisabled: isDisabled, title: t('Billing and shipping information'), children: jsx(BillingAndInvoiceInformation, { billToAddress: cart.billTo && {
|
|
325
|
+
address1: cart.billTo.address1,
|
|
326
|
+
address2: cart.billTo.address2,
|
|
327
|
+
address3: cart.billTo.address3,
|
|
328
|
+
attention: '',
|
|
329
|
+
city: cart.billTo.city,
|
|
330
|
+
companyName: cart.billTo.companyName,
|
|
331
|
+
country: cart.billTo.country,
|
|
332
|
+
email: cart.billTo.email,
|
|
333
|
+
firstName: '',
|
|
334
|
+
lastName: '',
|
|
335
|
+
phone: cart.billTo.phone,
|
|
336
|
+
postalCode: cart.billTo.postalCode,
|
|
337
|
+
}, shipToAddress: cart.shipTo && {
|
|
338
|
+
address1: cart.shipTo.address1,
|
|
339
|
+
address2: cart.shipTo.address2,
|
|
340
|
+
address3: cart.shipTo.address3,
|
|
341
|
+
attention: '',
|
|
342
|
+
city: cart.shipTo.city,
|
|
343
|
+
companyName: cart.shipTo.companyName,
|
|
344
|
+
country: cart.shipTo.country,
|
|
345
|
+
email: cart.shipTo.email,
|
|
346
|
+
firstName: '',
|
|
347
|
+
lastName: '',
|
|
348
|
+
phone: cart.shipTo.phone,
|
|
349
|
+
postalCode: cart.shipTo.postalCode,
|
|
344
350
|
} }) }) }) })] }));
|
|
345
351
|
}
|
|
346
352
|
|
|
@@ -1,28 +1,14 @@
|
|
|
1
1
|
import { BillToModel } from '../../../../shared/api/storefront/model/storefront.model';
|
|
2
|
+
import { ValidAddress } from '../../../../shared/model/address';
|
|
2
3
|
import { Country } from '../../../../shared/model/countries-languages';
|
|
3
4
|
export declare const EDIT_ADDRESS_FORM_ID = "billToForm";
|
|
4
|
-
export interface Address {
|
|
5
|
-
address1: string;
|
|
6
|
-
address2: string;
|
|
7
|
-
address3: string;
|
|
8
|
-
attention: string;
|
|
9
|
-
city: string;
|
|
10
|
-
companyName: string;
|
|
11
|
-
country: Country;
|
|
12
|
-
email: string;
|
|
13
|
-
firstName: string;
|
|
14
|
-
lastName: string;
|
|
15
|
-
phone: string;
|
|
16
|
-
postalCode: string;
|
|
17
|
-
}
|
|
18
5
|
export interface EditAddressesFormData {
|
|
19
|
-
address:
|
|
6
|
+
address: ValidAddress;
|
|
20
7
|
notes: string | undefined;
|
|
21
8
|
}
|
|
22
|
-
export declare function
|
|
9
|
+
export declare function EditCheckoutBillToAddressForm({ billTo, countries, isLoading, isPickup, onSubmit, }: {
|
|
23
10
|
billTo: BillToModel | undefined | null;
|
|
24
11
|
countries: Country[];
|
|
25
|
-
currentCountry: Country | undefined;
|
|
26
12
|
isLoading: boolean;
|
|
27
13
|
isPickup: boolean;
|
|
28
14
|
onSubmit: (event: EditAddressesFormData) => void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Form } from 'react-aria-components';
|
|
4
|
+
import { Checkbox } from '../../../../forms/elements/checkbox/checkbox.js';
|
|
5
|
+
import { TextField } from '../../../../forms/fields/text-field/text-field.js';
|
|
6
|
+
import { EditAddressForm } from '../../../../forms/partials/edit-address-form/edit-address-form.js';
|
|
7
|
+
import { InfoIconTooltip } from '../../../../info-icon-tooltip/info-icon-tooltip.js';
|
|
8
|
+
import { FormattedMessage } from '../../../../intl/formatted-message.js';
|
|
9
|
+
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
10
|
+
import { useFetchCurrentCart } from '../../../../shared/api/storefront/hooks/cart/use-fetch-current-cart.js';
|
|
11
|
+
import { CheckoutPageSection } from '../../layouts/checkout-page-layout/components/checkout-page-section.js';
|
|
12
|
+
import { CheckoutPageSectionContent } from '../../layouts/checkout-page-layout/components/checkout-page-section-content.js';
|
|
13
|
+
import { SonicAddress } from './sonic-address.js';
|
|
14
|
+
import styles from './edit-checkout-bill-to-address-form.module.css.js';
|
|
15
|
+
|
|
16
|
+
const EDIT_ADDRESS_FORM_ID = 'billToForm';
|
|
17
|
+
function EditCheckoutBillToAddressForm({ billTo, countries, isLoading, isPickup, onSubmit, }) {
|
|
18
|
+
const t = useFormattedMessage();
|
|
19
|
+
const { data: cart } = useFetchCurrentCart();
|
|
20
|
+
return (jsxs(Fragment, { children: [jsx(CheckoutPageSection, { title: jsx(FormattedMessage, { id: "Billing address" }), children: jsx(CheckoutPageSectionContent, { children: jsxs(Form, { className: styles.form, "data-test-selector": "billToAddressForm", id: EDIT_ADDRESS_FORM_ID, onSubmit: e => {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
const formData = new FormData(e.currentTarget);
|
|
23
|
+
const countryFormValue = formData.get('countrySelect')?.toString();
|
|
24
|
+
const country = countries.find(country => country.id === countryFormValue);
|
|
25
|
+
if (!country)
|
|
26
|
+
throw new Error(`Country not found ${formData.get('country')}`);
|
|
27
|
+
onSubmit({
|
|
28
|
+
address: {
|
|
29
|
+
address1: formData.get('address1')?.toString() || '',
|
|
30
|
+
address2: formData.get('address2')?.toString() || '',
|
|
31
|
+
address3: formData.get('address3')?.toString() || '',
|
|
32
|
+
attention: formData.get('attention')?.toString() || '',
|
|
33
|
+
city: formData.get('city')?.toString() || '',
|
|
34
|
+
companyName: formData.get('companyName')?.toString() || '',
|
|
35
|
+
country,
|
|
36
|
+
email: formData.get('email')?.toString() || '',
|
|
37
|
+
firstName: formData.get('firstName')?.toString() || '',
|
|
38
|
+
lastName: formData.get('lastName')?.toString() || '',
|
|
39
|
+
phone: formData.get('phone')?.toString() || '',
|
|
40
|
+
postalCode: formData.get('postalCode')?.toString() || '',
|
|
41
|
+
},
|
|
42
|
+
notes: cart?.notes === formData.get('notes')
|
|
43
|
+
? undefined
|
|
44
|
+
: formData.get('notes')?.toString() || '',
|
|
45
|
+
});
|
|
46
|
+
}, children: [jsx(EditAddressForm, { address: billTo, countries: countries, isLoading: isLoading }), jsx("div", { className: styles['span-2'], children: jsx(TextField, { defaultValue: cart?.notes, isDisabled: isLoading, isMultiline: true, label: t('Add order notes'), name: "notes", rows: 3, showLabel: true }) })] }) }) }), jsx(CheckoutPageSection, { title: jsx(FormattedMessage, { id: isPickup ? 'Pickup address' : 'Shipping address' }), children: jsx(CheckoutPageSectionContent, { children: jsx(Fragment, { children: isPickup ? (jsx(SonicAddress, {})) : (jsxs("div", { className: styles['use-invoice-checkbox'], children: [jsx(Checkbox, { "data-test-selector": "checkboxUseBillingAddress", isDisabled: true, isSelected: true, children: jsx(FormattedMessage, { id: "Use billing address" }) }), jsx(InfoIconTooltip, { variant: "stroke", children: t('Changing your address is currently not possible. Please contact customer support to change your address.') })] })) }) }) })] }));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { EDIT_ADDRESS_FORM_ID, EditCheckoutBillToAddressForm };
|
|
@@ -3,15 +3,15 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
3
3
|
import { Form } from 'react-aria-components';
|
|
4
4
|
import { AddressInfoDisplay } from '../../../../address-info-display/address-info-display.js';
|
|
5
5
|
import { Link } from '../../../../buttons/link/link.js';
|
|
6
|
-
import { Checkbox } from '../../../../forms/checkbox/checkbox.js';
|
|
7
|
-
import { TextField } from '../../../../forms/text-field/text-field.js';
|
|
6
|
+
import { Checkbox } from '../../../../forms/elements/checkbox/checkbox.js';
|
|
7
|
+
import { TextField } from '../../../../forms/fields/text-field/text-field.js';
|
|
8
8
|
import { FormattedMessage } from '../../../../intl/formatted-message.js';
|
|
9
9
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
10
10
|
import { PATHS } from '../../../paths.js';
|
|
11
11
|
import { CheckoutPageSection } from '../../layouts/checkout-page-layout/components/checkout-page-section.js';
|
|
12
12
|
import { CheckoutPageSectionContent } from '../../layouts/checkout-page-layout/components/checkout-page-section-content.js';
|
|
13
13
|
import { CheckoutPageSectionLink } from '../../layouts/checkout-page-layout/components/checkout-page-section-link.js';
|
|
14
|
-
import { EDIT_ADDRESS_FORM_ID } from './edit-address-form.js';
|
|
14
|
+
import { EDIT_ADDRESS_FORM_ID } from './edit-checkout-bill-to-address-form.js';
|
|
15
15
|
import { SonicAddress } from './sonic-address.js';
|
|
16
16
|
import styles from './readonly-address.module.css.js';
|
|
17
17
|
|
|
@@ -29,9 +29,10 @@ function ReadOnlyAddresses({ billTo, isLoading, isPickup, notes, onSubmit, shipT
|
|
|
29
29
|
address1: billTo.address1,
|
|
30
30
|
address2: billTo.address2,
|
|
31
31
|
address3: billTo.address3,
|
|
32
|
+
attention: billTo.attention,
|
|
32
33
|
city: billTo.city,
|
|
33
34
|
companyName: billTo.companyName,
|
|
34
|
-
country: billTo.country
|
|
35
|
+
country: billTo.country,
|
|
35
36
|
email: billTo.email,
|
|
36
37
|
firstName: billTo.firstName,
|
|
37
38
|
lastName: billTo.lastName,
|
|
@@ -41,9 +42,10 @@ function ReadOnlyAddresses({ billTo, isLoading, isPickup, notes, onSubmit, shipT
|
|
|
41
42
|
address1: shipTo.address1,
|
|
42
43
|
address2: shipTo.address2,
|
|
43
44
|
address3: shipTo.address3,
|
|
45
|
+
attention: shipTo.attention,
|
|
44
46
|
city: shipTo.city,
|
|
45
47
|
companyName: shipTo.companyName,
|
|
46
|
-
country: shipTo.country
|
|
48
|
+
country: shipTo.country,
|
|
47
49
|
email: shipTo.email,
|
|
48
50
|
firstName: shipTo.firstName,
|
|
49
51
|
lastName: shipTo.lastName,
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
3
3
|
import { Button } from '../../../buttons/button/button.js';
|
|
4
4
|
import { CartTotals } from '../../../cart-totals/cart-totals.js';
|
|
5
5
|
import { CartTotalsSummary } from '../../../cart-totals/cart-totals-summary.js';
|
|
6
|
-
import { Select } from '../../../forms/select/select.js';
|
|
6
|
+
import { Select } from '../../../forms/elements/select/select.js';
|
|
7
7
|
import { FormattedMessage } from '../../../intl/formatted-message.js';
|
|
8
8
|
import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
|
|
9
9
|
import { getCurrencyCodeBySymbol } from '../../../shared/model/currency.js';
|
|
@@ -12,7 +12,7 @@ import { PATHS } from '../../paths.js';
|
|
|
12
12
|
import { CheckoutPageLayout } from '../layouts/checkout-page-layout/checkout-page-layout.js';
|
|
13
13
|
import { CheckoutPageSection } from '../layouts/checkout-page-layout/components/checkout-page-section.js';
|
|
14
14
|
import { CheckoutPageSectionContent } from '../layouts/checkout-page-layout/components/checkout-page-section-content.js';
|
|
15
|
-
import { EDIT_ADDRESS_FORM_ID } from './components/edit-address-form.js';
|
|
15
|
+
import { EDIT_ADDRESS_FORM_ID } from './components/edit-checkout-bill-to-address-form.js';
|
|
16
16
|
import styles from './shipping-page.module.css.js';
|
|
17
17
|
|
|
18
18
|
function ShippingPageContent({ cart, editAddress, errorPatchBillingAddress, fulfillmentMethods, isGuest, isLoadingFulfillmentMethods, isPatching, isPatchingSession, onChangeFulfillmentMethod, readOnlyAddress, }) {
|
|
@@ -14,7 +14,7 @@ import { ErrorPage } from '../../error-page/error-page.js';
|
|
|
14
14
|
import { LoadingPage } from '../../loading-page/loading-page.js';
|
|
15
15
|
import { PATHS } from '../../paths.js';
|
|
16
16
|
import { CurrencyChangeDialog } from './components/currency-change-dialog.js';
|
|
17
|
-
import {
|
|
17
|
+
import { EditCheckoutBillToAddressForm } from './components/edit-checkout-bill-to-address-form.js';
|
|
18
18
|
import { ReadOnlyAddresses } from './components/readonly-address.js';
|
|
19
19
|
import { usePatchShippingDetails } from './hooks/use-patch-shipping-details.js';
|
|
20
20
|
import { ShippingPageContent } from './shipping-page-content.js';
|
|
@@ -123,7 +123,7 @@ function ShippingPage() {
|
|
|
123
123
|
return (jsx(ShippingPageContent, { cart: cart,
|
|
124
124
|
// TODO: Combine editAddress and readOnlyAddress into one section in order
|
|
125
125
|
// for typescript to correctly infer which properties are set in what case
|
|
126
|
-
editAddress: jsxs(Fragment, { children: [jsx(
|
|
126
|
+
editAddress: jsxs(Fragment, { children: [jsx(EditCheckoutBillToAddressForm, { billTo: cart.billTo, countries: countries || [], isLoading: isPatching, isPickup: isPickup, onSubmit: async ({ address, notes }) => {
|
|
127
127
|
if (!cart.billTo)
|
|
128
128
|
return;
|
|
129
129
|
formData.current = { address, notes };
|
|
@@ -3,8 +3,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useRef, useState, useCallback, useMemo } from 'react';
|
|
4
4
|
import { ListBox, ListBoxItem, Text } from 'react-aria-components';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import { Checkbox } from '../../../../forms/checkbox/checkbox.js';
|
|
7
|
-
import { SearchField } from '../../../../forms/search-field/search-field.js';
|
|
6
|
+
import { Checkbox } from '../../../../forms/elements/checkbox/checkbox.js';
|
|
7
|
+
import { SearchField } from '../../../../forms/fields/search-field/search-field.js';
|
|
8
8
|
import { SolidRatingIcon } from '../../../../icons/solid/solid-rating-icon.js';
|
|
9
9
|
import { FormattedMessage } from '../../../../intl/formatted-message.js';
|
|
10
10
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { FormSegmentGroup } from '../../../../forms/form/form-segment-group.js';
|
|
2
|
+
import { FormSegmentGroup } from '../../../../forms/layout/form/form-segment-group.js';
|
|
3
3
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
4
4
|
import { Dialog } from '../../../../modals/dialog/dialog.js';
|
|
5
5
|
import { UnauthorizedRequestError } from '../../../../shared/fetch/request.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { PasswordValidation } from '../../../../forms/password-validation/password-validation.js';
|
|
2
|
+
import { PasswordField } from '../../../../forms/fields/password-field/password-field.js';
|
|
3
|
+
import { FormSegment } from '../../../../forms/layout/form/form-segment.js';
|
|
4
|
+
import { PasswordValidation } from '../../../../forms/partials/password-validation/password-validation.js';
|
|
5
5
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
6
6
|
import { ProgressCircle } from '../../../../loading/progress-circle.js';
|
|
7
7
|
import { Message } from '../../../../message/message.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function EditBillToAddress(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { EditAddressForm } from '../../../../forms/partials/edit-address-form/edit-address-form.js';
|
|
3
|
+
|
|
4
|
+
function EditBillToAddress() {
|
|
5
|
+
return (jsx(EditAddressForm, { address: undefined, countries: [], isLoading: false }));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { EditBillToAddress };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnSubmitHandler, ValidationErrors } from '../../../../forms/form/form';
|
|
1
|
+
import { OnSubmitHandler, ValidationErrors } from '../../../../forms/layout/form/form';
|
|
2
2
|
import { EditUserInfoProps } from './edit-user-info';
|
|
3
3
|
export interface EditUserInfoDialogProps extends EditUserInfoProps {
|
|
4
4
|
isOpen: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import { TextField } from '../../../../forms/text-field/text-field.js';
|
|
3
|
+
import { TextField } from '../../../../forms/fields/text-field/text-field.js';
|
|
4
4
|
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
5
5
|
import { ProgressCircle } from '../../../../loading/progress-circle.js';
|
|
6
6
|
import { Message } from '../../../../message/message.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { Select } from '../../../forms/select/select.js';
|
|
3
|
+
import { Select } from '../../../forms/elements/select/select.js';
|
|
4
4
|
import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
|
|
5
5
|
import { useNavigate } from '../../../shared/routing/use-navigate.js';
|
|
6
6
|
import { mySonicNavigationItems } from './my-sonic-navigation-items.js';
|