@dropins/storefront-account 1.0.0 → 1.0.1-beta2

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 (120) hide show
  1. package/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts +16 -0
  2. package/api/createCustomerAddress/index.d.ts +16 -0
  3. package/api/fetch-graphql/fetch-graphql.d.ts +16 -0
  4. package/api/fetch-graphql/index.d.ts +16 -0
  5. package/api/fragments.d.ts +16 -0
  6. package/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts +16 -0
  7. package/api/getAttributesForm/index.d.ts +16 -0
  8. package/api/getCountries/graphql/getCountries.graphql.d.ts +16 -0
  9. package/api/getCountries/index.d.ts +16 -0
  10. package/api/getCustomer/graphql/getCustomer.graphql.d.ts +16 -0
  11. package/api/getCustomer/index.d.ts +16 -0
  12. package/api/getCustomerAddress/graphql/getCustomerAddress.graphql.d.ts +16 -0
  13. package/api/getCustomerAddress/index.d.ts +16 -0
  14. package/api/getOrderHistoryList/graphql/getOrderHistoryList.graphql.d.ts +16 -0
  15. package/api/getOrderHistoryList/index.d.ts +16 -0
  16. package/api/getRegions/graphql/getRegions.graphql.d.ts +16 -0
  17. package/api/getRegions/index.d.ts +16 -0
  18. package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +16 -0
  19. package/api/getStoreConfig/index.d.ts +16 -0
  20. package/api/graphql/CustomerAddressFragment.graphql.d.ts +16 -0
  21. package/api/graphql/CustomerFragment.graphql.d.ts +16 -0
  22. package/api/graphql/OrderSummaryFragment.graphql.d.ts +17 -1
  23. package/api/index.d.ts +16 -0
  24. package/api/initialize/index.d.ts +16 -0
  25. package/api/removeCustomerAddress/graphql/removeCustomerAddress.graphql.d.ts +16 -0
  26. package/api/removeCustomerAddress/index.d.ts +16 -0
  27. package/api/removeCustomerAddress/removeCustomerAddress.d.ts +16 -0
  28. package/api/updateCustomer/graphql/updateCustomer.graphql.d.ts +16 -0
  29. package/api/updateCustomer/index.d.ts +16 -0
  30. package/api/updateCustomer/updateCustomer.d.ts +16 -0
  31. package/api/updateCustomerAddress/graphql/updateCustomerAddress.graphql.d.ts +16 -0
  32. package/api/updateCustomerAddress/index.d.ts +16 -0
  33. package/api/updateCustomerEmail/graphql/updateCustomerEmail.graphql.d.ts +16 -0
  34. package/api/updateCustomerEmail/index.d.ts +16 -0
  35. package/api/updateCustomerEmail/updateCustomerEmail.d.ts +16 -0
  36. package/api/updateCustomerPassword/graphql/updateCustomerPassword.graphql.d.ts +16 -0
  37. package/api/updateCustomerPassword/index.d.ts +16 -0
  38. package/api.js +1 -1
  39. package/chunks/CustomerInformationCard.js +2 -2
  40. package/chunks/getOrderHistoryList.js +5 -5
  41. package/chunks/getStoreConfig.js +3 -3
  42. package/chunks/removeCustomerAddress.js +10 -10
  43. package/chunks/updateCustomer.js +6 -6
  44. package/components/AccountLoaders/index.d.ts +16 -0
  45. package/components/AddressActions/index.d.ts +16 -0
  46. package/components/AddressCard/index.d.ts +16 -0
  47. package/components/AddressFormWrapper/index.d.ts +16 -0
  48. package/components/AddressModal/index.d.ts +16 -0
  49. package/components/AddressesWrapper/index.d.ts +16 -0
  50. package/components/ChangePassword/ChangePassword.d.ts +4 -1
  51. package/components/ChangePassword/index.d.ts +16 -0
  52. package/components/CustomerInformationCard/index.d.ts +16 -0
  53. package/components/EditCustomerInformation/index.d.ts +16 -0
  54. package/components/EmptyList/index.d.ts +16 -0
  55. package/components/Form/FormInputs/index.d.ts +16 -0
  56. package/components/Form/index.d.ts +16 -0
  57. package/components/OrdersListAction/index.d.ts +16 -0
  58. package/components/OrdersListCard/index.d.ts +16 -0
  59. package/components/OrdersListWrapper/index.d.ts +16 -0
  60. package/components/index.d.ts +16 -0
  61. package/configs/defaultAttributePreset.config.d.ts +16 -0
  62. package/configs/mockDefaultAddress.config.d.ts +16 -0
  63. package/configs/mockOrdersList.config.d.ts +16 -2
  64. package/containers/AddressForm/index.d.ts +16 -0
  65. package/containers/AddressForm.js +1 -1
  66. package/containers/Addresses/index.d.ts +16 -0
  67. package/containers/Addresses.js +2 -2
  68. package/containers/CustomerInformation/index.d.ts +16 -0
  69. package/containers/CustomerInformation.js +2 -2
  70. package/containers/OrdersList/index.d.ts +16 -0
  71. package/containers/OrdersList.js +2 -2
  72. package/containers/index.d.ts +16 -0
  73. package/data/models/attributes-form.d.ts +32 -16
  74. package/data/models/country.d.ts +16 -0
  75. package/data/models/customer-address.d.ts +16 -0
  76. package/data/models/customer.d.ts +16 -0
  77. package/data/models/index.d.ts +16 -0
  78. package/data/models/region.d.ts +16 -0
  79. package/data/models/store-config.d.ts +16 -0
  80. package/data/transforms/index.d.ts +16 -0
  81. package/fragments.js +10 -3
  82. package/hooks/containers/useCustomerInformation.d.ts +16 -16
  83. package/hooks/containers/useGetStoreConfigs.d.ts +16 -0
  84. package/hooks/containers/useOrderSelectList.d.ts +16 -0
  85. package/hooks/useDebounce.d.ts +16 -0
  86. package/hooks/useIsMobile.d.ts +16 -0
  87. package/i18n/en_US.json.d.ts +6 -3
  88. package/lib/areRequiredFieldsValid.d.ts +16 -0
  89. package/lib/checkIsFunction.d.ts +16 -0
  90. package/lib/convertCase.d.ts +16 -0
  91. package/lib/convertToBoolean.d.ts +16 -0
  92. package/lib/convertToInputDateFormat.d.ts +16 -0
  93. package/lib/fetch-error.d.ts +16 -0
  94. package/lib/formatDateToLocale.d.ts +16 -0
  95. package/lib/getDateRange.d.ts +16 -0
  96. package/lib/getFormValues.d.ts +16 -0
  97. package/lib/initializeFormDataAndErrors.d.ts +16 -0
  98. package/lib/network-error.d.ts +16 -0
  99. package/lib/normalizeAttributes.d.ts +16 -0
  100. package/lib/normalizeGetAddressData.d.ts +16 -0
  101. package/lib/transformDobCustomer.d.ts +6 -0
  102. package/lib/validationChangePassword.d.ts +16 -0
  103. package/lib/validationUniqueSymbolsPassword.d.ts +16 -0
  104. package/package.json +1 -1
  105. package/render/index.d.ts +16 -0
  106. package/render.js +2 -2
  107. package/types/addresses.types.d.ts +5 -3
  108. package/types/api/createCustomerAddress.types.d.ts +16 -0
  109. package/types/api/getAttributesForm.types.d.ts +20 -0
  110. package/types/api/getCountries.types.d.ts +16 -0
  111. package/types/api/getCustomer.types.d.ts +16 -0
  112. package/types/api/getCustomerAddress.type.d.ts +16 -0
  113. package/types/api/getOrderHistoryList.types.d.ts +7 -0
  114. package/types/api/getRegions.types.d.ts +16 -0
  115. package/types/api/removeCustomerAddress.types.d.ts +16 -0
  116. package/types/api/storeConfig.types.d.ts +16 -0
  117. package/types/api/updateCustomerAddress.types.d.ts +16 -0
  118. package/types/api/updateCustomerPassword.types.d.ts +16 -0
  119. package/types/form.types.d.ts +2 -2
  120. package/types/index.d.ts +16 -0
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './AddressActions';
2
18
  export { AddressActions as default } from './AddressActions';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './AddressCard';
2
18
  export { AddressCard as default } from './AddressCard';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './AddressFormWrapper';
2
18
  export { AddressFormWrapper as default } from './AddressFormWrapper';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './AddressModal';
2
18
  export { AddressModal as default } from './AddressModal';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './AddressesWrapper';
2
18
  export { AddressesWrapper as default } from './AddressesWrapper';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,8 @@
1
1
  import { FunctionComponent } from 'preact';
2
- import { ChangePasswordProps } from '../../types';
2
+ import { ChangePasswordProps, ValidateLengthConfigProps } from '../../types';
3
3
 
4
+ export declare const getErrorMessage: (isValidUniqueSymbols: string, defaultLengthMessage: ValidateLengthConfigProps | undefined, isSubmit: boolean, newPassword: string, passwordErrors: {
5
+ newPassword: string;
6
+ }) => string | undefined;
4
7
  export declare const ChangePassword: FunctionComponent<ChangePasswordProps>;
5
8
  //# sourceMappingURL=ChangePassword.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './ChangePassword';
2
18
  export { ChangePassword as default } from './ChangePassword';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './CustomerInformationCard';
2
18
  export { CustomerInformationCard as default } from './CustomerInformationCard';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './EditCustomerInformation';
2
18
  export { EditCustomerInformation as default } from './EditCustomerInformation';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './EmptyList';
2
18
  export { EmptyList as default } from './EmptyList';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './FormInputs';
2
18
  export { FormInputs as default } from './FormInputs';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './Form';
2
18
  export { Form as default } from './Form';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './OrdersListAction';
2
18
  export { OrdersListAction as default } from './OrdersListAction';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './OrdersListCard';
2
18
  export { OrdersListCard as default } from './OrdersListCard';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './OrdersListWrapper';
2
18
  export { OrdersListWrapper as default } from './OrdersListWrapper';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from '../containers/AddressForm';
2
18
  export * from './Form';
3
19
  export * from './Form/FormInputs';
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export declare const defaultAttributePreset: string[];
2
18
  export declare const defaultAccountAttributePreset: string[];
3
19
  //# sourceMappingURL=defaultAttributePreset.config.d.ts.map
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export declare const mockResponseInputFieldsList: ({
2
18
  default_value: null;
3
19
  entity_type: string;
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export declare const mockOrdersListResponse: {
2
18
  customer: {
3
19
  orders: {
@@ -23,7 +39,6 @@ export declare const mockOrdersListResponse: {
23
39
  region_code: string;
24
40
  region_id: string;
25
41
  };
26
- shipments: never[];
27
42
  telephone: string;
28
43
  id: string;
29
44
  vat_id: string;
@@ -124,7 +139,6 @@ export declare const mockOrdersListResponse: {
124
139
  default_shipping: boolean;
125
140
  default_billing: boolean;
126
141
  custom_attributesV2: never[];
127
- shipments?: undefined;
128
142
  };
129
143
  billing_address: {
130
144
  firstname: string;
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './AddressForm';
2
18
  export { AddressForm as default } from './AddressForm';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- /*! Copyright 2024 Adobe
1
+ /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
3
  import{A as l,A as u}from"../chunks/CustomerInformationCard.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/preact-hooks.js";import"../chunks/removeCustomerAddress.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/i18n.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/preact.js";export{l as AddressForm,u as default};
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './Addresses';
2
18
  export { Addresses as default } from './Addresses';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- /*! Copyright 2024 Adobe
1
+ /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{jsx as s}from"@dropins/tools/preact-jsx-runtime.js";import{classes as B}from"@dropins/tools/lib.js";import{a as C}from"../chunks/CustomerInformationCard.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/components.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import"../chunks/removeCustomerAddress.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/i18n.js";import"@dropins/tools/preact.js";const O=({hideActionFormButtons:t,formName:o,slots:e,title:i,addressFormTitle:d,defaultSelectAddressId:m,showFormLoader:p,forwardFormRef:a,showSaveCheckBox:c,saveCheckBoxValue:f,selectShipping:n,selectBilling:l,selectable:u,className:r,withHeader:x,minifiedView:A,withActionsInMinifiedView:h,withActionsInFullSizeView:j,inputsDefaultValueSet:v,showShippingCheckBox:W,showBillingCheckBox:b,shippingCheckBoxValue:g,billingCheckBoxValue:k,onAddressData:q,routeAddressesPage:w,onSuccess:y,onError:z})=>s("div",{className:B(["account-addresses",r]),"data-testid":"addressesid",children:s(C,{hideActionFormButtons:t,formName:o,slots:e,title:i,addressFormTitle:d,defaultSelectAddressId:m,showFormLoader:p,onAddressData:q,forwardFormRef:a,selectShipping:n,selectBilling:l,showSaveCheckBox:c,saveCheckBoxValue:f,selectable:u,className:r,withHeader:x,minifiedView:A,withActionsInMinifiedView:h,withActionsInFullSizeView:j,inputsDefaultValueSet:v,billingCheckBoxValue:k,shippingCheckBoxValue:g,showBillingCheckBox:b,showShippingCheckBox:W,routeAddressesPage:w,onSuccess:y,onError:z})});export{O as Addresses,O as default};
3
+ import{jsx as o}from"@dropins/tools/preact-jsx-runtime.js";import{classes as k}from"@dropins/tools/lib.js";import{a as q}from"../chunks/CustomerInformationCard.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/components.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import"../chunks/removeCustomerAddress.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/i18n.js";import"@dropins/tools/preact.js";const C=(e,r)=>e&&r?"selectedAddress":e?"selectedShippingAddress":r?"selectedBillingAddress":"default",S=({hideActionFormButtons:e,formName:r,slots:m,title:a,addressFormTitle:p,defaultSelectAddressId:f,showFormLoader:n,forwardFormRef:u,showSaveCheckBox:c,saveCheckBoxValue:l,selectShipping:s,selectBilling:t,selectable:A,className:d,withHeader:w,minifiedView:i,withActionsInMinifiedView:x,withActionsInFullSizeView:N,inputsDefaultValueSet:V,showShippingCheckBox:j,showBillingCheckBox:v,shippingCheckBoxValue:y,billingCheckBoxValue:z,onAddressData:D,routeAddressesPage:F,onSuccess:K,onError:W})=>{const b=i?"minifiedView":"fullSizeView",h=r??C(s,t);return o("div",{className:k(["account-addresses",d]),"data-testid":"addressesid",children:o(q,{inputName:h,minifiedViewKey:b,hideActionFormButtons:e,slots:m,title:a,addressFormTitle:p,defaultSelectAddressId:f,showFormLoader:n,onAddressData:D,forwardFormRef:u,selectShipping:s,selectBilling:t,showSaveCheckBox:c,saveCheckBoxValue:l,selectable:A,className:d,withHeader:w,minifiedView:i,withActionsInMinifiedView:x,withActionsInFullSizeView:N,inputsDefaultValueSet:V,billingCheckBoxValue:z,shippingCheckBoxValue:y,showBillingCheckBox:v,showShippingCheckBox:j,routeAddressesPage:F,onSuccess:K,onError:W})})};export{S as Addresses,S as default};
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './CustomerInformation';
2
18
  export { CustomerInformation as default } from './CustomerInformation';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- /*! Copyright 2024 Adobe
1
+ /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{jsxs as F,jsx as d,Fragment as ue}from"@dropins/tools/preact-jsx-runtime.js";import{classes as re,Slot as me}from"@dropins/tools/lib.js";import{F as fe,d as he,g as ge,n as D,C as we}from"../chunks/CustomerInformationCard.js";import*as E from"@dropins/tools/preact-compat.js";import{Card as Q,Header as X,InLineAlert as te,InputPassword as R,Button as H}from"@dropins/tools/components.js";import{useState as m,useEffect as B,useCallback as C,useMemo as G}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import{g as Ce}from"../chunks/getStoreConfig.js";import{u as Pe,g as pe,b as ee,a as be}from"../chunks/updateCustomer.js";import{useText as x}from"@dropins/tools/i18n.js";import{c as Ve}from"../chunks/removeCustomerAddress.js";import"@dropins/tools/preact.js";import"../fragments.js";import"@dropins/tools/fetch-graphql.js";const Ee=e=>E.createElement("svg",{id:"Icon_Warning_Base",width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},E.createElement("g",{clipPath:"url(#clip0_841_1324)"},E.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.9949 2.30237L0.802734 21.6977H23.1977L11.9949 2.30237Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M12.4336 10.5504L12.3373 14.4766H11.6632L11.5669 10.5504V9.51273H12.4336V10.5504ZM11.5883 18.2636V17.2687H12.4229V18.2636H11.5883Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),E.createElement("defs",null,E.createElement("clipPath",{id:"clip0_841_1324"},E.createElement("rect",{width:24,height:21,fill:"white",transform:"translate(0 1.5)"})))),ye=e=>E.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},E.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z",stroke:"currentColor"}),E.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.75 12.762L10.2385 15.75L17.25 9",stroke:"currentColor"})),Ie=e=>E.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},E.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z",stroke:"currentColor"}),E.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.75 5.88423V4.75H12.25V5.88423L12.0485 13.0713H11.9515L11.75 5.88423ZM11.7994 18.25V16.9868H12.2253V18.25H11.7994Z",stroke:"currentColor"})),Le=()=>{const[e,t]=m(null);return B(()=>{const a=sessionStorage.getItem("accountStoreConfig"),r=a?JSON.parse(a):null;if(r){const{minLength:n,requiredCharacterClasses:s}=r;t({minLength:n,requiredCharacterClasses:s})}else Ce().then(n=>{if(n){const{minLength:s,requiredCharacterClasses:P}=n;sessionStorage.setItem("accountStoreConfig",JSON.stringify(n)),t({minLength:s,requiredCharacterClasses:P})}})},[]),{passwordConfigs:e}},ve=({currentPassword:e,newPassword:t,confirmPassword:a,translations:r})=>{let n={...K};const s=!e.length&&!t.length&&!a.length,P=e.length&&t!==a;return s?(n={...n,currentPassword:r.requiredFieldError,newPassword:r.requiredFieldError,confirmPassword:r.requiredFieldError},{isValid:!1,errors:n}):e.length?t.length?a.length?P?(n={...n,currentPassword:"",newPassword:"",confirmPassword:r.passwordMismatch},{isValid:!1,errors:n}):{isValid:!0,errors:n}:(n={...n,confirmPassword:r.requiredFieldError},{isValid:!1,errors:n}):(n={...n,newPassword:r.requiredFieldError},{isValid:!1,errors:n}):(n={...n,currentPassword:r.requiredFieldError},{isValid:!1,errors:n})},ne=(e,t)=>{if(t<=1)return!0;const a=/[0-9]/.test(e)?1:0,r=/[a-z]/.test(e)?1:0,n=/[A-Z]/.test(e)?1:0,s=/[^a-zA-Z0-9\s]/.test(e)?1:0;return a+r+n+s>=t},K={currentPassword:"",newPassword:"",confirmPassword:""},Fe=({passwordConfigs:e,handleSetInLineAlert:t,handleHideChangePassword:a})=>{const r=x({requiredFieldError:"Account.FormText.requiredFieldError",passwordMismatch:"Account.minifiedView.CustomerInformation.changePassword.passwordValidationMessage.passwordMismatch",incorrectCurrentPassword:"Account.minifiedView.CustomerInformation.changePassword.passwordValidationMessage.incorrectCurrentPassword",passwordUpdateMessage:"Account.minifiedView.CustomerInformation.changePassword.passwordValidationMessage.passwordUpdateMessage"}),[n,s]=m(!1),[P,l]=m(!1),[c,p]=m(""),[h,u]=m(""),[A,y]=m(""),[I,b]=m({currentPassword:"",newPassword:"",confirmPassword:""}),i=C(()=>{a(()=>{t({}),b(K)})},[a,t]),_=C(f=>{p(f),b(V=>({...V,currentPassword:f?"":r.requiredFieldError}))},[r]),w=C(f=>{u(f),b(V=>({...V,newPassword:f?"":r.requiredFieldError}))},[r]),U=C(f=>{y(f),b(V=>({...V,confirmPassword:f?"":r.requiredFieldError}))},[r]),M=C(f=>{const{name:V,value:Z}=f==null?void 0:f.target;b(L=>({...L,[V]:Z?"":r.requiredFieldError}))},[r]),T=C(()=>{const{isValid:f,errors:V}=ve({currentPassword:c,newPassword:h,confirmPassword:A,translations:r});return b(V),f},[c,h,A,r]),O=C(f=>{f.preventDefault(),l(!0);const V=(e==null?void 0:e.requiredCharacterClasses)??0,Z=(e==null?void 0:e.minLength)??1;if(!T()){s(!0),l(!1);return}if(!ne(h,V)||Z>(h==null?void 0:h.length)){s(!0),l(!1);return}Pe({currentPassword:c,newPassword:h}).then(L=>{if(!(L!=null&&L.length)){l(!1);return}p(""),u(""),y(""),b(K),s(!1),t({type:"success",text:r.passwordUpdateMessage})}).catch(L=>{L.message==="Invalid login or password."&&t({type:"error",text:r.incorrectCurrentPassword}),L.message==="The account is locked."&&t({type:"error",text:L.message})}),l(!1)},[e,T,h,c,t,r]);return{hideChangePassword:i,handleOnBlurPassword:M,handleConfirmPasswordChange:U,handleNewPasswordChange:w,handleCurrentPasswordChange:_,mutationChangePassword:O,currentPassword:c,newPassword:h,confirmPassword:A,passwordErrors:I,submitLoading:P,isClickSubmit:n}},_e=({passwordConfigs:e,isClickSubmit:t,password:a})=>{const r=x({messageLengthPassword:"Account.minifiedView.CustomerInformation.changePassword.passwordValidationMessage.messageLengthPassword"}),[n,s]=m("pending");B(()=>{if(!e)return;const l=ne(a,e.requiredCharacterClasses);t&&a.length>0?s(l?"success":"error"):t&&a.length===0?s("pending"):s(l?"success":"pending")},[t,e,a]);const P=G(()=>{var c;if(!e)return;const l={status:"pending",icon:"pending",message:(c=r.messageLengthPassword)==null?void 0:c.replace("{minLength}",`${e.minLength}`)};return a.length&&a.length>=e.minLength?{...l,icon:"success",status:"success"}:a.length&&a.length<e.minLength?t?{...l,icon:"error",status:"error"}:{...l,icon:"pending",status:"pending"}:l},[e,r.messageLengthPassword,a==null?void 0:a.length,t]);return{isValidUniqueSymbols:n,defaultLengthMessage:P}},Ae=({handleHideChangePassword:e,handleSetInLineAlert:t,inLineAlertProps:a})=>{const{passwordConfigs:r}=Le(),{hideChangePassword:n,handleOnBlurPassword:s,handleConfirmPasswordChange:P,handleNewPasswordChange:l,handleCurrentPasswordChange:c,mutationChangePassword:p,currentPassword:h,newPassword:u,confirmPassword:A,passwordErrors:y,submitLoading:I,isClickSubmit:b}=Fe({passwordConfigs:r,handleSetInLineAlert:t,handleHideChangePassword:e}),{isValidUniqueSymbols:i,defaultLengthMessage:_}=_e({password:u,isClickSubmit:b,passwordConfigs:r}),w=x({containerTitle:"Account.minifiedView.CustomerInformation.changePassword.containerTitle",currentPasswordPlaceholder:"Account.minifiedView.CustomerInformation.changePassword.currentPassword.placeholder",currentPasswordFloatingLabel:"Account.minifiedView.CustomerInformation.changePassword.currentPassword.floatingLabel",newPasswordPlaceholder:"Account.minifiedView.CustomerInformation.changePassword.newPassword.placeholder",newPasswordFloatingLabel:"Account.minifiedView.CustomerInformation.changePassword.newPassword.floatingLabel",confirmPasswordPlaceholder:"Account.minifiedView.CustomerInformation.changePassword.confirmPassword.placeholder",confirmPasswordFloatingLabel:"Account.minifiedView.CustomerInformation.changePassword.confirmPassword.floatingLabel",buttonSecondary:"Account.minifiedView.CustomerInformation.changePassword.buttonSecondary",buttonPrimary:"Account.minifiedView.CustomerInformation.changePassword.buttonPrimary"});return F(Q,{className:"account-change-password",variant:"secondary",children:[d(X,{title:w.containerTitle,divider:!1,className:"account-change-password__title"}),a.text?d(te,{className:"account-change-password__notification",type:a.type,variant:"secondary",heading:a.text,icon:a.icon,"data-testid":"changePasswordInLineAlert"}):null,F("div",{className:"account-change-password__fields",children:[d(R,{className:"account-change-password__fields-item",autoComplete:"currentPassword",name:"currentPassword",placeholder:w.currentPasswordPlaceholder,floatingLabel:w.currentPasswordFloatingLabel,errorMessage:y.currentPassword,defaultValue:h,onValue:c,onBlur:s}),d(R,{className:"account-change-password__fields-item",autoComplete:"newPassword",name:"newPassword",placeholder:w.newPasswordPlaceholder,floatingLabel:w.newPasswordFloatingLabel,minLength:r==null?void 0:r.minLength,validateLengthConfig:_,uniqueSymbolsStatus:i,requiredCharacterClasses:r==null?void 0:r.requiredCharacterClasses,errorMessage:i==="error"||(_==null?void 0:_.status)==="error"||b&&u.length<=0?y.newPassword:void 0,defaultValue:u,onValue:l,onBlur:s}),d(R,{className:"account-change-password__fields-item",autoComplete:"confirmPassword",name:"confirmPassword",placeholder:w.confirmPasswordPlaceholder,floatingLabel:w.confirmPasswordFloatingLabel,errorMessage:y.confirmPassword,defaultValue:A,onValue:P,onBlur:s})]}),F("div",{className:"account-change-password__actions",children:[d(H,{type:"button",disabled:I,onClick:n,variant:"secondary",children:w.buttonSecondary}),d(H,{variant:"primary",type:"button",disabled:I,onClick:p,children:w.buttonPrimary})]})]})},Me=({inLineAlertProps:e,errorPasswordEmpty:t,passwordValue:a,showPasswordOnEmailChange:r,submitLoading:n,formFieldsList:s,handleHideEditForm:P,handleUpdateCustomerInformation:l,handleInputChange:c,handleSetPassword:p,handleOnBlurPassword:h})=>{const u=x({buttonSecondary:"Account.minifiedView.CustomerInformation.editCustomerInformation.buttonSecondary",buttonPrimary:"Account.minifiedView.CustomerInformation.editCustomerInformation.buttonPrimary",placeholder:"Account.minifiedView.CustomerInformation.editCustomerInformation.passwordField.placeholder",floatingLabel:"Account.minifiedView.CustomerInformation.editCustomerInformation.passwordField.floatingLabel",containerTitle:"Account.minifiedView.CustomerInformation.editCustomerInformation.containerTitle",requiredFieldError:"Account.FormText.requiredFieldError"});return F(Q,{variant:"secondary",className:"account-edit-customer-information",children:[d(X,{title:u.containerTitle,divider:!1,className:"account-edit-customer-information__title"}),e.text?d(te,{className:"account-edit-customer-information__notification",type:e.type,variant:"secondary",heading:e.text,icon:e.icon,"data-testid":"editCustomerInLineAlert"}):null,F(fe,{loading:n,fieldsConfig:s||[],name:"editCustomerInformation",className:"account-edit-customer-information-form",onSubmit:l,setInputChange:c,children:[r?d("div",{className:"account-edit-customer-information__password",children:d(R,{autoComplete:"password",name:"password",placeholder:u.placeholder,floatingLabel:u.floatingLabel,errorMessage:t?u.requiredFieldError:void 0,defaultValue:a,onValue:p,onBlur:h})}):null,F("div",{className:"account-edit-customer-information__actions",children:[d(H,{disabled:n,type:"button",variant:"secondary",onClick:()=>P(),children:u.buttonSecondary}),d(H,{disabled:n,type:"submit",variant:"primary",children:u.buttonPrimary})]})]})]})},Se=({createdAt:e,slots:t,orderedCustomerData:a,showEditForm:r,showChangePassword:n,handleShowChangePassword:s,handleShowEditForm:P})=>{const l=x({buttonSecondary:"Account.minifiedView.CustomerInformation.customerInformationCard.buttonSecondary",buttonPrimary:"Account.minifiedView.CustomerInformation.customerInformationCard.buttonPrimary",accountCreation:"Account.minifiedView.CustomerInformation.customerInformationCard.accountCreation"});return d(Q,{variant:"secondary",className:re(["account-customer-information-card",["account-customer-information-card-short",n||r]]),children:F("div",{className:"account-customer-information-card__wrapper",children:[d("div",{className:"account-customer-information-card__content",children:t!=null&&t.CustomerData?d(me,{name:"CustomerData",slot:t==null?void 0:t.CustomerData,context:{customerData:a}}):F(ue,{children:[a==null?void 0:a.map((c,p)=>{const h=c!=null&&c.label?`${c.label}: ${c==null?void 0:c.value}`:c==null?void 0:c.value;return d("p",{"data-testid":`${c.name}_${p}`,children:h},`${c.name}_${p}`)}),F("p",{children:[l.accountCreation,": ",e]})]})}),F("div",{className:"account-customer-information-card__actions",children:[d(H,{type:"button",variant:"tertiary",onClick:s,children:l.buttonSecondary}),d(H,{type:"button",variant:"tertiary",onClick:P,children:l.buttonPrimary})]})]})})},Ne=({handleSetInLineAlert:e})=>{const t=x({accountSuccess:"Account.minifiedView.CustomerInformation.editCustomerInformation.accountSuccess",accountError:"Account.minifiedView.CustomerInformation.editCustomerInformation.accountError",genderMale:"Account.minifiedView.CustomerInformation.genderMale",genderFemale:"Account.minifiedView.CustomerInformation.genderFemale"}),[a,r]=m(!0),[n,s]=m(!1),[P,l]=m(!1),[c,p]=m(!1),[h,u]=m(!1),[A,y]=m(!1),[I,b]=m([]),[i,_]=m(null),[w,U]=m([]),[M,T]=m({}),[O,f]=m(""),[V,Z]=m(""),L=C(o=>{const{value:g}=o==null?void 0:o.target;g.length&&u(!1),g.length||u(!0)},[]),S=C(o=>{f(o)},[]),oe=C(o=>{T(o)},[]),ae=C(()=>{l(!0),p(!1),e(),S("")},[e,S]),se=C(o=>{o==null||o(),l(!1)},[]),ie=C(()=>{p(!0),l(!1),e(),S("")},[e,S]),ce=C(o=>{o==null||o(),p(!1)},[]),N=C((o,g)=>{o==="success"?e({type:"success",text:g??t.accountSuccess}):o==="error"?e({type:"error",text:g??t.accountError}):e(),s(!1)},[e,t]),W=C(()=>{pe().then(o=>{var v;const g=(v=o==null?void 0:o.createdAt)==null?void 0:v.split(" ")[0],z={...o,gender:o.gender===1?t.genderMale:t.genderFemale};_(z),Z(g)})},[t.genderFemale,t.genderMale]);B(()=>{W()},[]),B(()=>{Ve("customer_account_edit").then(o=>{U(o);const g=o.map(({name:z,customUpperCode:v,orderNumber:q,label:j})=>({name:v,orderNumber:q,label:he.includes(z)?null:j}));b(g)})},[]),B(()=>{M.email&&M.email!==(i==null?void 0:i.email)?y(!0):M.email&&M.email===(i==null?void 0:i.email)&&y(!1)},[i==null?void 0:i.email,M]);const $=G(()=>!I||!i?[]:I.filter(({name:g})=>g!==void 0&&i[g]).map(g=>({name:g.name,orderNumber:g.orderNumber,value:i[g.name],label:g.label})),[i,I]);B(()=>{$!=null&&$.length&&r(!1)},[$]);const de=G(()=>w==null?void 0:w.map(o=>({...o,defaultValue:o!=null&&o.customUpperCode&&i?i[o==null?void 0:o.customUpperCode]??"":""})).map(o=>o.customUpperCode==="gender"?{...o,defaultValue:o.defaultValue==="Male"?1:2}:o),[w,i]),le=C(async(o,g)=>{const z=ge(o.target),{email:v,password:q,...j}=z,Y=v!==(i==null?void 0:i.email)&&q.length===0;if(!g){Y&&u(!0);return}if(u(!1),s(!0),v===(i==null?void 0:i.email)){S(""),ee(D(j,"account")).then(k=>{k&&(W(),N("success"))}).catch(k=>{N("error",k.message)});return}if(Y){u(!0),s(!1);return}v!=null&&v.length&&(q!=null&&q.length)&&be({email:v,password:q}).then(k=>{k&&ee(D(j,"account")).then(J=>{J&&(W(),N("success"))}).catch(J=>{N("error",J.message)})}).catch(k=>{N("error",k.message)})},[i==null?void 0:i.email,S,W,N]);return{createdAt:V,errorPasswordEmpty:h,passwordValue:O,showPasswordOnEmailChange:A,orderedCustomerData:$,loading:a,normalizeFieldsConfig:de,submitLoading:n,showEditForm:c,showChangePassword:P,handleShowChangePassword:ae,handleHideChangePassword:se,handleShowEditForm:ie,handleHideEditForm:ce,handleUpdateCustomerInformation:le,handleInputChange:oe,handleSetPassword:S,handleOnBlurPassword:L,renderAlertMessage:N}},qe={success:d(ye,{}),warning:d(Ee,{}),error:d(Ie,{})},ke=()=>{const[e,t]=m({}),a=C(r=>{if(!(r!=null&&r.type)){t({});return}const n=qe[r.type];t({...r,icon:n})},[]);return{inLineAlertProps:e,handleSetInLineAlert:a}},Ge=({className:e,withHeader:t=!0,slots:a})=>{const r=x({containerTitle:"Account.minifiedView.CustomerInformation.containerTitle"}),{inLineAlertProps:n,handleSetInLineAlert:s}=ke(),{createdAt:P,errorPasswordEmpty:l,passwordValue:c,showPasswordOnEmailChange:p,orderedCustomerData:h,loading:u,normalizeFieldsConfig:A,submitLoading:y,showEditForm:I,showChangePassword:b,handleShowChangePassword:i,handleHideChangePassword:_,handleShowEditForm:w,handleHideEditForm:U,handleUpdateCustomerInformation:M,handleInputChange:T,handleSetPassword:O,handleOnBlurPassword:f}=Ne({handleSetInLineAlert:s});return u?d("div",{"data-testid":"customerInformationLoader",children:d(we,{withCard:!0})}):F("div",{className:re(["account-customer-information",e]),children:[t?d(X,{title:r.containerTitle,divider:!1,className:"customer-information__title"}):null,d(Se,{createdAt:P,slots:a,orderedCustomerData:h,showEditForm:I,showChangePassword:b,handleShowChangePassword:i,handleShowEditForm:w}),b?d(Ae,{inLineAlertProps:n,handleSetInLineAlert:s,handleHideChangePassword:_}):null,I?d(Me,{inLineAlertProps:n,submitLoading:y,formFieldsList:A,errorPasswordEmpty:l,passwordValue:c,showPasswordOnEmailChange:p,handleSetPassword:O,handleOnBlurPassword:f,handleUpdateCustomerInformation:M,handleHideEditForm:U,handleInputChange:T}):null]})};export{Ge as CustomerInformation,Ge as default};
3
+ import{jsxs as L,jsx as d,Fragment as ue}from"@dropins/tools/preact-jsx-runtime.js";import{classes as re,Slot as me}from"@dropins/tools/lib.js";import{F as fe,d as he,g as ge,n as D,C as we}from"../chunks/CustomerInformationCard.js";import*as V from"@dropins/tools/preact-compat.js";import{Card as Q,Header as X,InLineAlert as te,InputPassword as R,Button as O}from"@dropins/tools/components.js";import{useState as m,useEffect as B,useCallback as C,useMemo as G}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import{g as Ce}from"../chunks/getStoreConfig.js";import{u as Pe,g as pe,b as ee,a as be}from"../chunks/updateCustomer.js";import{useText as x}from"@dropins/tools/i18n.js";import{c as Ee}from"../chunks/removeCustomerAddress.js";import"@dropins/tools/preact.js";import"../fragments.js";import"@dropins/tools/fetch-graphql.js";const Ve=e=>V.createElement("svg",{id:"Icon_Warning_Base",width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},V.createElement("g",{clipPath:"url(#clip0_841_1324)"},V.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.9949 2.30237L0.802734 21.6977H23.1977L11.9949 2.30237Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),V.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M12.4336 10.5504L12.3373 14.4766H11.6632L11.5669 10.5504V9.51273H12.4336V10.5504ZM11.5883 18.2636V17.2687H12.4229V18.2636H11.5883Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),V.createElement("defs",null,V.createElement("clipPath",{id:"clip0_841_1324"},V.createElement("rect",{width:24,height:21,fill:"white",transform:"translate(0 1.5)"})))),ye=e=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},V.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z",stroke:"currentColor"}),V.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.75 12.762L10.2385 15.75L17.25 9",stroke:"currentColor"})),Ie=e=>V.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},V.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z",stroke:"currentColor"}),V.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.75 5.88423V4.75H12.25V5.88423L12.0485 13.0713H11.9515L11.75 5.88423ZM11.7994 18.25V16.9868H12.2253V18.25H11.7994Z",stroke:"currentColor"})),ve=()=>{const[e,t]=m(null);return B(()=>{const n=sessionStorage.getItem("accountStoreConfig"),r=n?JSON.parse(n):null;if(r){const{minLength:o,requiredCharacterClasses:s}=r;t({minLength:o,requiredCharacterClasses:s})}else Ce().then(o=>{if(o){const{minLength:s,requiredCharacterClasses:P}=o;sessionStorage.setItem("accountStoreConfig",JSON.stringify(o)),t({minLength:s,requiredCharacterClasses:P})}})},[]),{passwordConfigs:e}},Fe=({currentPassword:e,newPassword:t,confirmPassword:n,translations:r})=>{let o={...K};const s=!e.length&&!t.length&&!n.length,P=e.length&&t!==n;return s?(o={...o,currentPassword:r.requiredFieldError,newPassword:r.requiredFieldError,confirmPassword:r.requiredFieldError},{isValid:!1,errors:o}):e.length?t.length?n.length?P?(o={...o,currentPassword:"",newPassword:"",confirmPassword:r.passwordMismatch},{isValid:!1,errors:o}):{isValid:!0,errors:o}:(o={...o,confirmPassword:r.requiredFieldError},{isValid:!1,errors:o}):(o={...o,newPassword:r.requiredFieldError},{isValid:!1,errors:o}):(o={...o,currentPassword:r.requiredFieldError},{isValid:!1,errors:o})},ne=(e,t)=>{if(t<=1)return!0;const n=/[0-9]/.test(e)?1:0,r=/[a-z]/.test(e)?1:0,o=/[A-Z]/.test(e)?1:0,s=/[^a-zA-Z0-9\s]/.test(e)?1:0;return n+r+o+s>=t},K={currentPassword:"",newPassword:"",confirmPassword:""},Le=({passwordConfigs:e,handleSetInLineAlert:t,handleHideChangePassword:n})=>{const r=x({requiredFieldError:"Account.FormText.requiredFieldError",passwordMismatch:"Account.minifiedView.CustomerInformation.changePassword.passwordValidationMessage.passwordMismatch",incorrectCurrentPassword:"Account.minifiedView.CustomerInformation.changePassword.passwordValidationMessage.incorrectCurrentPassword",passwordUpdateMessage:"Account.minifiedView.CustomerInformation.changePassword.passwordValidationMessage.passwordUpdateMessage"}),[o,s]=m(!1),[P,l]=m(!1),[c,p]=m(""),[h,u]=m(""),[_,y]=m(""),[I,b]=m({currentPassword:"",newPassword:"",confirmPassword:""}),i=C(()=>{n(()=>{t({}),b(K)})},[n,t]),M=C(f=>{p(f),b(E=>({...E,currentPassword:f?"":r.requiredFieldError}))},[r]),w=C(f=>{u(f),b(E=>({...E,newPassword:f?"":r.requiredFieldError}))},[r]),H=C(f=>{y(f),b(E=>({...E,confirmPassword:f?"":r.requiredFieldError}))},[r]),A=C(f=>{const{name:E,value:Z}=f==null?void 0:f.target;b(v=>({...v,[E]:Z?"":r.requiredFieldError}))},[r]),T=C(()=>{const{isValid:f,errors:E}=Fe({currentPassword:c,newPassword:h,confirmPassword:_,translations:r});return b(E),f},[c,h,_,r]),U=C(f=>{f.preventDefault(),l(!0);const E=(e==null?void 0:e.requiredCharacterClasses)??0,Z=(e==null?void 0:e.minLength)??1;if(!T()){s(!0),l(!1);return}if(!ne(h,E)||Z>(h==null?void 0:h.length)){s(!0),l(!1);return}Pe({currentPassword:c,newPassword:h}).then(v=>{if(!(v!=null&&v.length)){l(!1);return}p(""),u(""),y(""),b(K),s(!1),t({type:"success",text:r.passwordUpdateMessage})}).catch(v=>{v.message==="Invalid login or password."&&t({type:"error",text:r.incorrectCurrentPassword}),v.message==="The account is locked."&&t({type:"error",text:v.message})}),l(!1)},[e,T,h,c,t,r]);return{hideChangePassword:i,handleOnBlurPassword:A,handleConfirmPasswordChange:H,handleNewPasswordChange:w,handleCurrentPasswordChange:M,mutationChangePassword:U,currentPassword:c,newPassword:h,confirmPassword:_,passwordErrors:I,submitLoading:P,isClickSubmit:o}},_e=({passwordConfigs:e,isClickSubmit:t,password:n})=>{const r=x({messageLengthPassword:"Account.minifiedView.CustomerInformation.changePassword.passwordValidationMessage.messageLengthPassword"}),[o,s]=m("pending");B(()=>{if(!e)return;const l=ne(n,e.requiredCharacterClasses);t&&n.length>0?s(l?"success":"error"):t&&n.length===0?s("pending"):s(l?"success":"pending")},[t,e,n]);const P=G(()=>{var c;if(!e)return;const l={status:"pending",icon:"pending",message:(c=r.messageLengthPassword)==null?void 0:c.replace("{minLength}",`${e.minLength}`)};return n.length&&n.length>=e.minLength?{...l,icon:"success",status:"success"}:n.length&&n.length<e.minLength?t?{...l,icon:"error",status:"error"}:{...l,icon:"pending",status:"pending"}:l},[e,r.messageLengthPassword,n==null?void 0:n.length,t]);return{isValidUniqueSymbols:o,defaultLengthMessage:P}},Ae=(e,t,n,r,o)=>e==="error"||(t==null?void 0:t.status)==="error"||n&&r.trim().length===0?o.newPassword:void 0,Me=({handleHideChangePassword:e,handleSetInLineAlert:t,inLineAlertProps:n})=>{const{passwordConfigs:r}=ve(),{hideChangePassword:o,handleOnBlurPassword:s,handleConfirmPasswordChange:P,handleNewPasswordChange:l,handleCurrentPasswordChange:c,mutationChangePassword:p,currentPassword:h,newPassword:u,confirmPassword:_,passwordErrors:y,submitLoading:I,isClickSubmit:b}=Le({passwordConfigs:r,handleSetInLineAlert:t,handleHideChangePassword:e}),{isValidUniqueSymbols:i,defaultLengthMessage:M}=_e({password:u,isClickSubmit:b,passwordConfigs:r}),w=x({containerTitle:"Account.minifiedView.CustomerInformation.changePassword.containerTitle",currentPasswordPlaceholder:"Account.minifiedView.CustomerInformation.changePassword.currentPassword.placeholder",currentPasswordFloatingLabel:"Account.minifiedView.CustomerInformation.changePassword.currentPassword.floatingLabel",newPasswordPlaceholder:"Account.minifiedView.CustomerInformation.changePassword.newPassword.placeholder",newPasswordFloatingLabel:"Account.minifiedView.CustomerInformation.changePassword.newPassword.floatingLabel",confirmPasswordPlaceholder:"Account.minifiedView.CustomerInformation.changePassword.confirmPassword.placeholder",confirmPasswordFloatingLabel:"Account.minifiedView.CustomerInformation.changePassword.confirmPassword.floatingLabel",buttonSecondary:"Account.minifiedView.CustomerInformation.changePassword.buttonSecondary",buttonPrimary:"Account.minifiedView.CustomerInformation.changePassword.buttonPrimary"});return L(Q,{className:"account-change-password",variant:"secondary",children:[d(X,{title:w.containerTitle,divider:!1,className:"account-change-password__title"}),n.text?d(te,{className:"account-change-password__notification",type:n.type,variant:"secondary",heading:n.text,icon:n.icon,"data-testid":"changePasswordInLineAlert"}):null,L("div",{className:"account-change-password__fields",children:[d(R,{className:"account-change-password__fields-item",autoComplete:"currentPassword",name:"currentPassword",placeholder:w.currentPasswordPlaceholder,floatingLabel:w.currentPasswordFloatingLabel,errorMessage:y.currentPassword,defaultValue:h,onValue:c,onBlur:s}),d(R,{className:"account-change-password__fields-item",autoComplete:"newPassword",name:"newPassword",placeholder:w.newPasswordPlaceholder,floatingLabel:w.newPasswordFloatingLabel,minLength:r==null?void 0:r.minLength,validateLengthConfig:M,uniqueSymbolsStatus:i,requiredCharacterClasses:r==null?void 0:r.requiredCharacterClasses,errorMessage:Ae(i,M,b,u,y),defaultValue:u,onValue:l,onBlur:s}),d(R,{className:"account-change-password__fields-item",autoComplete:"confirmPassword",name:"confirmPassword",placeholder:w.confirmPasswordPlaceholder,floatingLabel:w.confirmPasswordFloatingLabel,errorMessage:y.confirmPassword,defaultValue:_,onValue:P,onBlur:s})]}),L("div",{className:"account-change-password__actions",children:[d(O,{type:"button",disabled:I,onClick:o,variant:"secondary",children:w.buttonSecondary}),d(O,{variant:"primary",type:"button",disabled:I,onClick:p,children:w.buttonPrimary})]})]})},Se=({inLineAlertProps:e,errorPasswordEmpty:t,passwordValue:n,showPasswordOnEmailChange:r,submitLoading:o,formFieldsList:s,handleHideEditForm:P,handleUpdateCustomerInformation:l,handleInputChange:c,handleSetPassword:p,handleOnBlurPassword:h})=>{const u=x({buttonSecondary:"Account.minifiedView.CustomerInformation.editCustomerInformation.buttonSecondary",buttonPrimary:"Account.minifiedView.CustomerInformation.editCustomerInformation.buttonPrimary",placeholder:"Account.minifiedView.CustomerInformation.editCustomerInformation.passwordField.placeholder",floatingLabel:"Account.minifiedView.CustomerInformation.editCustomerInformation.passwordField.floatingLabel",containerTitle:"Account.minifiedView.CustomerInformation.editCustomerInformation.containerTitle",requiredFieldError:"Account.FormText.requiredFieldError"});return L(Q,{variant:"secondary",className:"account-edit-customer-information",children:[d(X,{title:u.containerTitle,divider:!1,className:"account-edit-customer-information__title"}),e.text?d(te,{className:"account-edit-customer-information__notification",type:e.type,variant:"secondary",heading:e.text,icon:e.icon,"data-testid":"editCustomerInLineAlert"}):null,L(fe,{loading:o,fieldsConfig:s||[],name:"editCustomerInformation",className:"account-edit-customer-information-form",onSubmit:l,setInputChange:c,children:[r?d("div",{className:"account-edit-customer-information__password",children:d(R,{autoComplete:"password",name:"password",placeholder:u.placeholder,floatingLabel:u.floatingLabel,errorMessage:t?u.requiredFieldError:void 0,defaultValue:n,onValue:p,onBlur:h})}):null,L("div",{className:"account-edit-customer-information__actions",children:[d(O,{disabled:o,type:"button",variant:"secondary",onClick:()=>P(),children:u.buttonSecondary}),d(O,{disabled:o,type:"submit",variant:"primary",children:u.buttonPrimary})]})]})]})},Ne=({createdAt:e,slots:t,orderedCustomerData:n,showEditForm:r,showChangePassword:o,handleShowChangePassword:s,handleShowEditForm:P})=>{const l=x({buttonSecondary:"Account.minifiedView.CustomerInformation.customerInformationCard.buttonSecondary",buttonPrimary:"Account.minifiedView.CustomerInformation.customerInformationCard.buttonPrimary",accountCreation:"Account.minifiedView.CustomerInformation.customerInformationCard.accountCreation"});return d(Q,{variant:"secondary",className:re(["account-customer-information-card",["account-customer-information-card-short",o||r]]),children:L("div",{className:"account-customer-information-card__wrapper",children:[d("div",{className:"account-customer-information-card__content",children:t!=null&&t.CustomerData?d(me,{name:"CustomerData",slot:t==null?void 0:t.CustomerData,context:{customerData:n}}):L(ue,{children:[n==null?void 0:n.map((c,p)=>{const h=c!=null&&c.label?`${c.label}: ${c==null?void 0:c.value}`:c==null?void 0:c.value;return d("p",{"data-testid":`${c.name}_${p}`,children:h},`${c.name}_${p}`)}),L("p",{children:[l.accountCreation,": ",e]})]})}),L("div",{className:"account-customer-information-card__actions",children:[d(O,{type:"button",variant:"tertiary",onClick:s,children:l.buttonSecondary}),d(O,{type:"button",variant:"tertiary",onClick:P,children:l.buttonPrimary})]})]})})},qe=e=>{if(!(e!=null&&e.dateOfBirth))return e;const{dateOfBirth:t,...n}=e;return{...n,dob:t}},ke=({handleSetInLineAlert:e})=>{const t=x({accountSuccess:"Account.minifiedView.CustomerInformation.editCustomerInformation.accountSuccess",accountError:"Account.minifiedView.CustomerInformation.editCustomerInformation.accountError",genderMale:"Account.minifiedView.CustomerInformation.genderMale",genderFemale:"Account.minifiedView.CustomerInformation.genderFemale"}),[n,r]=m(!0),[o,s]=m(!1),[P,l]=m(!1),[c,p]=m(!1),[h,u]=m(!1),[_,y]=m(!1),[I,b]=m([]),[i,M]=m(null),[w,H]=m([]),[A,T]=m({}),[U,f]=m(""),[E,Z]=m(""),v=C(a=>{const{value:g}=a==null?void 0:a.target;g.length&&u(!1),g.length||u(!0)},[]),S=C(a=>{f(a)},[]),oe=C(a=>{T(a)},[]),ae=C(()=>{l(!0),p(!1),e(),S("")},[e,S]),se=C(a=>{a==null||a(),l(!1)},[]),ie=C(()=>{p(!0),l(!1),e(),S("")},[e,S]),ce=C(a=>{a==null||a(),p(!1)},[]),N=C((a,g)=>{a==="success"?e({type:"success",text:g??t.accountSuccess}):a==="error"?e({type:"error",text:g??t.accountError}):e(),s(!1)},[e,t]),W=C(()=>{pe().then(a=>{var F;const g=(F=a==null?void 0:a.createdAt)==null?void 0:F.split(" ")[0],z=qe({...a,gender:a.gender===1?t.genderMale:t.genderFemale});M(z),Z(g)})},[t.genderFemale,t.genderMale]);B(()=>{W()},[]),B(()=>{Ee("customer_account_edit").then(a=>{H(a);const g=a.map(({name:z,customUpperCode:F,orderNumber:q,label:j})=>({name:F,orderNumber:q,label:he.includes(z)?null:j}));b(g)})},[]),B(()=>{A.email&&A.email!==(i==null?void 0:i.email)?y(!0):A.email&&A.email===(i==null?void 0:i.email)&&y(!1)},[i==null?void 0:i.email,A]);const $=G(()=>!I||!i?[]:I.filter(({name:g})=>g!==void 0&&i[g]).map(g=>({name:g.name,orderNumber:g.orderNumber,value:i[g.name],label:g.label})),[i,I]);B(()=>{$!=null&&$.length&&r(!1)},[$]);const de=G(()=>w==null?void 0:w.map(a=>({...a,defaultValue:a!=null&&a.customUpperCode&&i?i[a.customUpperCode]??"":""})).map(a=>a.customUpperCode==="gender"?{...a,defaultValue:a.defaultValue==="Male"?1:2}:a),[w,i]),le=C(async(a,g)=>{const z=ge(a.target),{email:F,password:q,...j}=z,Y=F!==(i==null?void 0:i.email)&&q.length===0;if(!g){Y&&u(!0);return}if(u(!1),s(!0),F===(i==null?void 0:i.email)){S(""),ee(D(j,"account")).then(k=>{k&&(W(),N("success"))}).catch(k=>{N("error",k.message)});return}if(Y){u(!0),s(!1);return}F!=null&&F.length&&(q!=null&&q.length)&&be({email:F,password:q}).then(k=>{k&&ee(D(j,"account")).then(J=>{J&&(W(),N("success"))}).catch(J=>{N("error",J.message)})}).catch(k=>{N("error",k.message)})},[i==null?void 0:i.email,S,W,N]);return{createdAt:E,errorPasswordEmpty:h,passwordValue:U,showPasswordOnEmailChange:_,orderedCustomerData:$,loading:n,normalizeFieldsConfig:de,submitLoading:o,showEditForm:c,showChangePassword:P,handleShowChangePassword:ae,handleHideChangePassword:se,handleShowEditForm:ie,handleHideEditForm:ce,handleUpdateCustomerInformation:le,handleInputChange:oe,handleSetPassword:S,handleOnBlurPassword:v,renderAlertMessage:N}},xe={success:d(ye,{}),warning:d(Ve,{}),error:d(Ie,{})},Te=()=>{const[e,t]=m({}),n=C(r=>{if(!(r!=null&&r.type)){t({});return}const o=xe[r.type];t({...r,icon:o})},[]);return{inLineAlertProps:e,handleSetInLineAlert:n}},Qe=({className:e,withHeader:t=!0,slots:n})=>{const r=x({containerTitle:"Account.minifiedView.CustomerInformation.containerTitle"}),{inLineAlertProps:o,handleSetInLineAlert:s}=Te(),{createdAt:P,errorPasswordEmpty:l,passwordValue:c,showPasswordOnEmailChange:p,orderedCustomerData:h,loading:u,normalizeFieldsConfig:_,submitLoading:y,showEditForm:I,showChangePassword:b,handleShowChangePassword:i,handleHideChangePassword:M,handleShowEditForm:w,handleHideEditForm:H,handleUpdateCustomerInformation:A,handleInputChange:T,handleSetPassword:U,handleOnBlurPassword:f}=ke({handleSetInLineAlert:s});return u?d("div",{"data-testid":"customerInformationLoader",children:d(we,{withCard:!0})}):L("div",{className:re(["account-customer-information",e]),children:[t?d(X,{title:r.containerTitle,divider:!1,className:"customer-information__title"}):null,d(Ne,{createdAt:P,slots:n,orderedCustomerData:h,showEditForm:I,showChangePassword:b,handleShowChangePassword:i,handleShowEditForm:w}),b?d(Me,{inLineAlertProps:o,handleSetInLineAlert:s,handleHideChangePassword:M}):null,I?d(Se,{inLineAlertProps:o,submitLoading:y,formFieldsList:_,errorPasswordEmpty:l,passwordValue:c,showPasswordOnEmailChange:p,handleSetPassword:U,handleOnBlurPassword:f,handleUpdateCustomerInformation:A,handleHideEditForm:H,handleInputChange:T}):null]})};export{Qe as CustomerInformation,Qe as default};
@@ -1,3 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
1
17
  export * from './OrdersList';
2
18
  export { OrdersList as default } from './OrdersList';
3
19
  //# sourceMappingURL=index.d.ts.map