diff --git a/cypress/src/tests/e2eTests/events/auth.spec.js b/cypress/src/tests/e2eTests/events/auth.spec.js index ae3143665e..46d4f3f23c 100644 --- a/cypress/src/tests/e2eTests/events/auth.spec.js +++ b/cypress/src/tests/e2eTests/events/auth.spec.js @@ -37,6 +37,7 @@ it('has shopperId as logged-in when authenticated, and guest when not', () => { }); // 4. Logs out / deletes customer and checks that shopperContext is set to guest + cy.reload(); cy.get('.nav-dropdown-button').contains('Hi, John').click(); cy.get('#nav > div.section.nav-tools > div.dropdown-wrapper.nav-tools-wrapper > div > ul > li:nth-child(2) > button').click(); cy.get('.auth-sign-in-form__button--submit'); diff --git a/package-lock.json b/package-lock.json index 3b68f0c7a2..552a0bb7a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,11 +12,11 @@ "dependencies": { "@adobe/magento-storefront-event-collector": "^1.8.0", "@adobe/magento-storefront-events-sdk": "^1.8.0", - "@dropins/storefront-account": "~1.0.0", - "@dropins/storefront-auth": "~1.0.0", + "@dropins/storefront-account": "~1.0.2", + "@dropins/storefront-auth": "~1.0.2", "@dropins/storefront-cart": "~1.0.2", "@dropins/storefront-checkout": "~1.0.0", - "@dropins/storefront-order": "~1.0.0", + "@dropins/storefront-order": "~1.0.2", "@dropins/storefront-pdp": "~1.0.0", "@dropins/tools": "^0.39.0" }, @@ -1798,14 +1798,14 @@ } }, "node_modules/@dropins/storefront-account": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@dropins/storefront-account/-/storefront-account-1.0.0.tgz", - "integrity": "sha512-QQ1DZm4HTUUZ/qydThTCcsVdbM7LpVGqAfhifgSgnAgm9uSd2OKiT8EmHb4Ab729a1/bme/SsbJ5u20s4W3EGA==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@dropins/storefront-account/-/storefront-account-1.0.2.tgz", + "integrity": "sha512-NiDvGzDPOtlUo5pXZuxvR+vjiajZCcqEFpG+lL1AYVgCj75CyQqWJoDwhpbiojhQL8wZErufT3Byg8P5H87jzg==" }, "node_modules/@dropins/storefront-auth": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@dropins/storefront-auth/-/storefront-auth-1.0.0.tgz", - "integrity": "sha512-dhLXNLUXi8G6FINtjL8DZNrFR8BXKzabzrK0NgKwmCu2YAv2uAOL1JQOJHgD5iCIZ2l1uDwtZcxNqwdN0MUvog==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@dropins/storefront-auth/-/storefront-auth-1.0.2.tgz", + "integrity": "sha512-yit76KU3nR97UdmBvP9o3/Z4HtDF7BzKgm/4Gf7Hkm+eFmofnss1Co0YCb/uOTHWuSsBrKNfK0Dd6V57ies0qg==" }, "node_modules/@dropins/storefront-cart": { "version": "1.0.2", @@ -1818,9 +1818,9 @@ "integrity": "sha512-tNCmgVEWEW2OzyNll69jTUTsT3wNG8yJ4HRZ/MrBJF+5/B/o3O+dfYTs4RUpIohXC8sGPkAjXCn5k6BQyo7QUA==" }, "node_modules/@dropins/storefront-order": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@dropins/storefront-order/-/storefront-order-1.0.0.tgz", - "integrity": "sha512-3bhRUqiFkOLvJ5ovZpVplPBs5DcbSfSnlEX7pkl1fyJ3upFDM1CPBFjQEv3+iQF2OarzlOaYCeFdzke3LNxVcg==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@dropins/storefront-order/-/storefront-order-1.0.2.tgz", + "integrity": "sha512-IXX+cMDucyHHhIm9jPOf6iXP7oEzkDjPOWbul11e8vnOCkxkl60J3Y01GuXMW+6Fdt6CTxI+sNDfPLhPF2mEkQ==" }, "node_modules/@dropins/storefront-pdp": { "version": "1.0.0", diff --git a/package.json b/package.json index a22ee7a9bc..a143de8ba6 100644 --- a/package.json +++ b/package.json @@ -35,11 +35,11 @@ "dependencies": { "@adobe/magento-storefront-event-collector": "^1.8.0", "@adobe/magento-storefront-events-sdk": "^1.8.0", - "@dropins/storefront-account": "~1.0.0", - "@dropins/storefront-auth": "~1.0.0", + "@dropins/storefront-account": "~1.0.2", + "@dropins/storefront-auth": "~1.0.2", "@dropins/storefront-cart": "~1.0.2", "@dropins/storefront-checkout": "~1.0.0", - "@dropins/storefront-order": "~1.0.0", + "@dropins/storefront-order": "~1.0.2", "@dropins/storefront-pdp": "~1.0.0", "@dropins/tools": "^0.39.0" } diff --git a/scripts/__dropins__/storefront-account/api.js b/scripts/__dropins__/storefront-account/api.js index d7caabd4ee..28dfbacf2a 100644 --- a/scripts/__dropins__/storefront-account/api.js +++ b/scripts/__dropins__/storefront-account/api.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{c as i,g as m,i as d}from"./chunks/getStoreConfig.js";import{d as g,f as u,c as C,g as f,h,e as c,i as n,j as l,r as A,s as x,a as F,b as G,u as H}from"./chunks/removeCustomerAddress.js";import{g as b,b as v,a as E,u as j}from"./chunks/updateCustomer.js";import{g as y}from"./chunks/getOrderHistoryList.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/fetch-graphql.js";import"./fragments.js";export{i as config,g as createCustomerAddress,u as fetchGraphQl,C as getAttributesForm,f as getConfig,h as getCountries,b as getCustomer,c as getCustomerAddress,y as getOrderHistoryList,n as getRegions,m as getStoreConfig,d as initialize,l as removeCustomerAddress,A as removeFetchGraphQlHeader,x as setEndpoint,F as setFetchGraphQlHeader,G as setFetchGraphQlHeaders,v as updateCustomer,H as updateCustomerAddress,E as updateCustomerEmail,j as updateCustomerPassword}; diff --git a/scripts/__dropins__/storefront-account/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts b/scripts/__dropins__/storefront-account/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts index ce704ced84..7896e7d3ea 100644 --- a/scripts/__dropins__/storefront-account/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const CREATE_CUSTOMER_ADDRESS = "\n mutation CREATE_CUSTOMER_ADDRESS($input: CustomerAddressInput!) {\n createCustomerAddress(input: $input) {\n firstname\n }\n }\n"; //# sourceMappingURL=createCustomerAddress.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/createCustomerAddress/index.d.ts b/scripts/__dropins__/storefront-account/api/createCustomerAddress/index.d.ts index 592a669c93..acc23c4a7c 100644 --- a/scripts/__dropins__/storefront-account/api/createCustomerAddress/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/createCustomerAddress/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './createCustomerAddress'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/fetch-graphql/fetch-graphql.d.ts b/scripts/__dropins__/storefront-account/api/fetch-graphql/fetch-graphql.d.ts index c1cc3ef7c6..66c42cc693 100644 --- a/scripts/__dropins__/storefront-account/api/fetch-graphql/fetch-graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/fetch-graphql/fetch-graphql.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const setEndpoint: (endpoint: string) => void, setFetchGraphQlHeader: (key: string, value: string | null) => void, removeFetchGraphQlHeader: (key: string) => void, setFetchGraphQlHeaders: (header: import('@adobe/fetch-graphql').Header) => void, fetchGraphQl: (query: string, options?: import('@adobe/fetch-graphql').FetchOptions | undefined) => Promise<{ errors?: import('@adobe/fetch-graphql').FetchQueryError | undefined; data: T; diff --git a/scripts/__dropins__/storefront-account/api/fetch-graphql/index.d.ts b/scripts/__dropins__/storefront-account/api/fetch-graphql/index.d.ts index ea5ac123d4..535709abf8 100644 --- a/scripts/__dropins__/storefront-account/api/fetch-graphql/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/fetch-graphql/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './fetch-graphql'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/fragments.d.ts b/scripts/__dropins__/storefront-account/api/fragments.d.ts index c81868b7a4..0668321b6f 100644 --- a/scripts/__dropins__/storefront-account/api/fragments.d.ts +++ b/scripts/__dropins__/storefront-account/api/fragments.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export { BASIC_CUSTOMER_INFO_FRAGMENT } from './graphql/CustomerFragment.graphql'; export { ADDRESS_FRAGMENT } from './graphql/CustomerAddressFragment.graphql'; export { ORDER_SUMMARY_FRAGMENT } from './graphql/OrderSummaryFragment.graphql'; diff --git a/scripts/__dropins__/storefront-account/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts b/scripts/__dropins__/storefront-account/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts index de5037a870..bd88c4b55f 100644 --- a/scripts/__dropins__/storefront-account/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_ATTRIBUTES_FORM = "\n query GET_ATTRIBUTES_FORM($formCode: String!) {\n attributesForm(formCode: $formCode) {\n items {\n code\n default_value\n entity_type\n frontend_class\n frontend_input\n is_required\n is_unique\n label\n options {\n is_default\n label\n value\n }\n ... on CustomerAttributeMetadata {\n multiline_count\n sort_order\n validate_rules {\n name\n value\n }\n }\n }\n errors {\n type\n message\n }\n }\n }\n"; export declare const GET_ATTRIBUTES_FORM_SHORT = "\n query GET_ATTRIBUTES_FORM_SHORT {\n attributesForm(formCode: \"customer_register_address\") {\n items {\n frontend_input\n label\n code\n ... on CustomerAttributeMetadata {\n multiline_count\n sort_order\n }\n }\n }\n }\n"; //# sourceMappingURL=getAttributesForm.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/getAttributesForm/index.d.ts b/scripts/__dropins__/storefront-account/api/getAttributesForm/index.d.ts index 8eefd8da6b..a08b096a5b 100644 --- a/scripts/__dropins__/storefront-account/api/getAttributesForm/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/getAttributesForm/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getAttributesForm'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/getCountries/graphql/getCountries.graphql.d.ts b/scripts/__dropins__/storefront-account/api/getCountries/graphql/getCountries.graphql.d.ts index e638f750eb..c0dc632f0a 100644 --- a/scripts/__dropins__/storefront-account/api/getCountries/graphql/getCountries.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/getCountries/graphql/getCountries.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_COUNTRIES_QUERY = "\n query GET_COUNTRIES_QUERY {\n countries {\n two_letter_abbreviation\n full_name_locale\n }\n storeConfig {\n countries_with_required_region\n optional_zip_countries\n }\n }\n"; //# sourceMappingURL=getCountries.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/getCountries/index.d.ts b/scripts/__dropins__/storefront-account/api/getCountries/index.d.ts index 4859bc273d..9987f3caa5 100644 --- a/scripts/__dropins__/storefront-account/api/getCountries/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/getCountries/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getCountries'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/getCustomer/graphql/getCustomer.graphql.d.ts b/scripts/__dropins__/storefront-account/api/getCustomer/graphql/getCustomer.graphql.d.ts index 234f26dab3..3114379100 100644 --- a/scripts/__dropins__/storefront-account/api/getCustomer/graphql/getCustomer.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/getCustomer/graphql/getCustomer.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_CUSTOMER: string; //# sourceMappingURL=getCustomer.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/getCustomer/index.d.ts b/scripts/__dropins__/storefront-account/api/getCustomer/index.d.ts index 125c344455..ab573a3b75 100644 --- a/scripts/__dropins__/storefront-account/api/getCustomer/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/getCustomer/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getCustomer'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/getCustomerAddress/graphql/getCustomerAddress.graphql.d.ts b/scripts/__dropins__/storefront-account/api/getCustomerAddress/graphql/getCustomerAddress.graphql.d.ts index 1a32153512..e824399ff6 100644 --- a/scripts/__dropins__/storefront-account/api/getCustomerAddress/graphql/getCustomerAddress.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/getCustomerAddress/graphql/getCustomerAddress.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_CUSTOMER_ADDRESS = "\n query GET_CUSTOMER_ADDRESS {\n customer {\n addresses {\n firstname\n lastname\n middlename\n fax\n prefix\n suffix\n city\n company\n country_code\n region {\n region\n region_code\n region_id\n }\n custom_attributesV2 {\n ... on AttributeValue {\n code\n value\n }\n }\n telephone\n id\n vat_id\n postcode\n street\n default_shipping\n default_billing\n }\n }\n }\n"; //# sourceMappingURL=getCustomerAddress.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/getCustomerAddress/index.d.ts b/scripts/__dropins__/storefront-account/api/getCustomerAddress/index.d.ts index 0266185972..8fe33973e0 100644 --- a/scripts/__dropins__/storefront-account/api/getCustomerAddress/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/getCustomerAddress/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getCustomerAddress'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/getOrderHistoryList/graphql/getOrderHistoryList.graphql.d.ts b/scripts/__dropins__/storefront-account/api/getOrderHistoryList/graphql/getOrderHistoryList.graphql.d.ts index 9786b5e48a..f9e0de5ec7 100644 --- a/scripts/__dropins__/storefront-account/api/getOrderHistoryList/graphql/getOrderHistoryList.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/getOrderHistoryList/graphql/getOrderHistoryList.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_CUSTOMER_ORDERS_LIST: string; //# sourceMappingURL=getOrderHistoryList.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/getOrderHistoryList/index.d.ts b/scripts/__dropins__/storefront-account/api/getOrderHistoryList/index.d.ts index e1ba69b822..c6881e3fac 100644 --- a/scripts/__dropins__/storefront-account/api/getOrderHistoryList/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/getOrderHistoryList/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getOrderHistoryList'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/getRegions/graphql/getRegions.graphql.d.ts b/scripts/__dropins__/storefront-account/api/getRegions/graphql/getRegions.graphql.d.ts index 873c8f8e54..2368bb8d98 100644 --- a/scripts/__dropins__/storefront-account/api/getRegions/graphql/getRegions.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/getRegions/graphql/getRegions.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_REGIONS = "\n query GET_REGIONS($countryCode: String!) {\n country(id: $countryCode) {\n id\n available_regions {\n id\n code\n name\n }\n }\n }\n"; //# sourceMappingURL=getRegions.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/getRegions/index.d.ts b/scripts/__dropins__/storefront-account/api/getRegions/index.d.ts index 52de035a26..941b85baba 100644 --- a/scripts/__dropins__/storefront-account/api/getRegions/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/getRegions/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getRegions'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts b/scripts/__dropins__/storefront-account/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts index 129d8e7a5e..86d4f1ff2c 100644 --- a/scripts/__dropins__/storefront-account/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts @@ -1,2 +1,18 @@ -export declare const GET_STORE_CONFIG = "\n query GET_STORE_CONFIG {\n storeConfig {\n base_media_url\n autocomplete_on_storefront\n minimum_password_length\n required_character_classes_number\n }\n }\n"; +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ +export declare const GET_STORE_CONFIG = "\n query GET_STORE_CONFIG {\n storeConfig {\n base_media_url\n autocomplete_on_storefront\n minimum_password_length\n required_character_classes_number\n store_code\n }\n }\n"; //# sourceMappingURL=getStoreConfig.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/getStoreConfig/index.d.ts b/scripts/__dropins__/storefront-account/api/getStoreConfig/index.d.ts index 572f234893..3fc5545458 100644 --- a/scripts/__dropins__/storefront-account/api/getStoreConfig/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/getStoreConfig/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getStoreConfig'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/graphql/CustomerAddressFragment.graphql.d.ts b/scripts/__dropins__/storefront-account/api/graphql/CustomerAddressFragment.graphql.d.ts index 33dd3d63a5..14e9565832 100644 --- a/scripts/__dropins__/storefront-account/api/graphql/CustomerAddressFragment.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/graphql/CustomerAddressFragment.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const ADDRESS_FRAGMENT = "\n fragment ADDRESS_FRAGMENT on OrderAddress {\n city\n company\n country_code\n fax\n firstname\n lastname\n middlename\n postcode\n prefix\n region\n region_id\n street\n suffix\n telephone\n vat_id\n }\n"; //# sourceMappingURL=CustomerAddressFragment.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/graphql/CustomerFragment.graphql.d.ts b/scripts/__dropins__/storefront-account/api/graphql/CustomerFragment.graphql.d.ts index 6cdd32d89c..4f1228f562 100644 --- a/scripts/__dropins__/storefront-account/api/graphql/CustomerFragment.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/graphql/CustomerFragment.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const BASIC_CUSTOMER_INFO_FRAGMENT = "\n fragment BASIC_CUSTOMER_INFO_FRAGMENT on Customer {\n date_of_birth\n email\n firstname\n gender\n lastname\n middlename\n prefix\n suffix\n created_at\n }\n"; //# sourceMappingURL=CustomerFragment.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/graphql/OrderSummaryFragment.graphql.d.ts b/scripts/__dropins__/storefront-account/api/graphql/OrderSummaryFragment.graphql.d.ts index c1d3684423..daee43c400 100644 --- a/scripts/__dropins__/storefront-account/api/graphql/OrderSummaryFragment.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/graphql/OrderSummaryFragment.graphql.d.ts @@ -1,2 +1,18 @@ -export declare const ORDER_SUMMARY_FRAGMENT = "\n fragment ORDER_SUMMARY_FRAGMENT on OrderTotal {\n __typename\n grand_total {\n value\n currency\n }\n subtotal {\n currency\n value\n }\n taxes {\n amount {\n currency\n value\n }\n rate\n title\n }\n total_tax {\n currency\n value\n }\n total_shipping {\n currency\n value\n }\n discounts {\n amount {\n currency\n value\n }\n label\n }\n }\n"; +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ +export declare const ORDER_SUMMARY_FRAGMENT = "\n fragment ORDER_SUMMARY_FRAGMENT on OrderTotal {\n grand_total {\n value\n currency\n }\n total_giftcard {\n currency\n value\n }\n subtotal_excl_tax {\n currency\n value\n }\n subtotal_incl_tax {\n currency\n value\n }\n taxes {\n amount {\n currency\n value\n }\n rate\n title\n }\n total_tax {\n currency\n value\n }\n total_shipping {\n currency\n value\n }\n discounts {\n amount {\n currency\n value\n }\n label\n }\n }\n"; //# sourceMappingURL=OrderSummaryFragment.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/index.d.ts b/scripts/__dropins__/storefront-account/api/index.d.ts index 1ccaa1b395..263365f36e 100644 --- a/scripts/__dropins__/storefront-account/api/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './initialize'; export * from './fetch-graphql'; export * from './getAttributesForm'; diff --git a/scripts/__dropins__/storefront-account/api/initialize/index.d.ts b/scripts/__dropins__/storefront-account/api/initialize/index.d.ts index 66c241dc2d..6684846dc9 100644 --- a/scripts/__dropins__/storefront-account/api/initialize/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/initialize/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './initialize'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/removeCustomerAddress/graphql/removeCustomerAddress.graphql.d.ts b/scripts/__dropins__/storefront-account/api/removeCustomerAddress/graphql/removeCustomerAddress.graphql.d.ts index f5e4c0a126..86f7937d38 100644 --- a/scripts/__dropins__/storefront-account/api/removeCustomerAddress/graphql/removeCustomerAddress.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/removeCustomerAddress/graphql/removeCustomerAddress.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const REMOVE_CUSTOMER_ADDRESS = "\n mutation REMOVE_CUSTOMER_ADDRESS($id: Int!) {\n deleteCustomerAddress(id: $id)\n }\n"; //# sourceMappingURL=removeCustomerAddress.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/removeCustomerAddress/index.d.ts b/scripts/__dropins__/storefront-account/api/removeCustomerAddress/index.d.ts index ecc58262aa..cfcd0cc0f6 100644 --- a/scripts/__dropins__/storefront-account/api/removeCustomerAddress/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/removeCustomerAddress/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './removeCustomerAddress'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/removeCustomerAddress/removeCustomerAddress.d.ts b/scripts/__dropins__/storefront-account/api/removeCustomerAddress/removeCustomerAddress.d.ts index 878043a7f4..a892d4aff6 100644 --- a/scripts/__dropins__/storefront-account/api/removeCustomerAddress/removeCustomerAddress.d.ts +++ b/scripts/__dropins__/storefront-account/api/removeCustomerAddress/removeCustomerAddress.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const removeCustomerAddress: (addressId: number) => Promise; //# sourceMappingURL=removeCustomerAddress.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/updateCustomer/graphql/updateCustomer.graphql.d.ts b/scripts/__dropins__/storefront-account/api/updateCustomer/graphql/updateCustomer.graphql.d.ts index 972e3fe550..f770941b64 100644 --- a/scripts/__dropins__/storefront-account/api/updateCustomer/graphql/updateCustomer.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/updateCustomer/graphql/updateCustomer.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const UPDATE_CUSTOMER_V2 = "\n mutation UPDATE_CUSTOMER_V2($input: CustomerUpdateInput!) {\n updateCustomerV2(input: $input) {\n customer {\n email\n }\n }\n }\n"; //# sourceMappingURL=updateCustomer.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/updateCustomer/index.d.ts b/scripts/__dropins__/storefront-account/api/updateCustomer/index.d.ts index 97ce7df967..93faf92c0e 100644 --- a/scripts/__dropins__/storefront-account/api/updateCustomer/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/updateCustomer/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './updateCustomer'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/updateCustomer/updateCustomer.d.ts b/scripts/__dropins__/storefront-account/api/updateCustomer/updateCustomer.d.ts index e15cf216af..16547a05df 100644 --- a/scripts/__dropins__/storefront-account/api/updateCustomer/updateCustomer.d.ts +++ b/scripts/__dropins__/storefront-account/api/updateCustomer/updateCustomer.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const updateCustomer: (form: Record) => Promise; //# sourceMappingURL=updateCustomer.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/updateCustomerAddress/graphql/updateCustomerAddress.graphql.d.ts b/scripts/__dropins__/storefront-account/api/updateCustomerAddress/graphql/updateCustomerAddress.graphql.d.ts index 25a6d864de..7578d7f86b 100644 --- a/scripts/__dropins__/storefront-account/api/updateCustomerAddress/graphql/updateCustomerAddress.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/updateCustomerAddress/graphql/updateCustomerAddress.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const UPDATE_CUSTOMER_ADDRESS = "\n mutation UPDATE_CUSTOMER_ADDRESS($id: Int!, $input: CustomerAddressInput) {\n updateCustomerAddress(id: $id, input: $input) {\n firstname\n }\n }\n"; //# sourceMappingURL=updateCustomerAddress.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/updateCustomerAddress/index.d.ts b/scripts/__dropins__/storefront-account/api/updateCustomerAddress/index.d.ts index 82d496ebde..56322afbc7 100644 --- a/scripts/__dropins__/storefront-account/api/updateCustomerAddress/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/updateCustomerAddress/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './updateCustomerAddress'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/updateCustomerEmail/graphql/updateCustomerEmail.graphql.d.ts b/scripts/__dropins__/storefront-account/api/updateCustomerEmail/graphql/updateCustomerEmail.graphql.d.ts index d1614aa6e0..1d7518f37f 100644 --- a/scripts/__dropins__/storefront-account/api/updateCustomerEmail/graphql/updateCustomerEmail.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/updateCustomerEmail/graphql/updateCustomerEmail.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const UPDATE_CUSTOMER_EMAIL = "\n mutation UPDATE_CUSTOMER_EMAIL($email: String!, $password: String!) {\n updateCustomerEmail(email: $email, password: $password) {\n customer {\n email\n }\n }\n }\n"; //# sourceMappingURL=updateCustomerEmail.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/updateCustomerEmail/index.d.ts b/scripts/__dropins__/storefront-account/api/updateCustomerEmail/index.d.ts index a82a653b98..af76e64387 100644 --- a/scripts/__dropins__/storefront-account/api/updateCustomerEmail/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/updateCustomerEmail/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './updateCustomerEmail'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/updateCustomerEmail/updateCustomerEmail.d.ts b/scripts/__dropins__/storefront-account/api/updateCustomerEmail/updateCustomerEmail.d.ts index 3f20a0d45d..484c6d0fd5 100644 --- a/scripts/__dropins__/storefront-account/api/updateCustomerEmail/updateCustomerEmail.d.ts +++ b/scripts/__dropins__/storefront-account/api/updateCustomerEmail/updateCustomerEmail.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const updateCustomerEmail: ({ email, password, }: { email: string; password: string; diff --git a/scripts/__dropins__/storefront-account/api/updateCustomerPassword/graphql/updateCustomerPassword.graphql.d.ts b/scripts/__dropins__/storefront-account/api/updateCustomerPassword/graphql/updateCustomerPassword.graphql.d.ts index b7bbf9c2a4..3e6720ef7c 100644 --- a/scripts/__dropins__/storefront-account/api/updateCustomerPassword/graphql/updateCustomerPassword.graphql.d.ts +++ b/scripts/__dropins__/storefront-account/api/updateCustomerPassword/graphql/updateCustomerPassword.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const CHANGE_CUSTOMER_PASSWORD = "\n mutation CHANGE_CUSTOMER_PASSWORD(\n $currentPassword: String!\n $newPassword: String!\n ) {\n changeCustomerPassword(\n currentPassword: $currentPassword\n newPassword: $newPassword\n ) {\n email\n }\n }\n"; //# sourceMappingURL=updateCustomerPassword.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/api/updateCustomerPassword/index.d.ts b/scripts/__dropins__/storefront-account/api/updateCustomerPassword/index.d.ts index a526c14f61..5c5dcfad4c 100644 --- a/scripts/__dropins__/storefront-account/api/updateCustomerPassword/index.d.ts +++ b/scripts/__dropins__/storefront-account/api/updateCustomerPassword/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './updateCustomerPassword'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/chunks/CustomerInformationCard.js b/scripts/__dropins__/storefront-account/chunks/CustomerInformationCard.js index fc4d77cd84..b54dad3656 100644 --- a/scripts/__dropins__/storefront-account/chunks/CustomerInformationCard.js +++ b/scripts/__dropins__/storefront-account/chunks/CustomerInformationCard.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as a,Fragment as Q,jsxs as j}from"@dropins/tools/preact-jsx-runtime.js";import{classes as X,Slot as Ae}from"@dropins/tools/lib.js";import{Field as le,Picker as Pe,Input as je,InputDate as We,Checkbox as xe,TextArea as De,Card as he,Skeleton as we,SkeletonRow as D,Button as de,Tag as pe,Icon as Se,Modal as Ge,ProgressSpinner as Ke,IllustratedMessage as Je,Header as Xe,InLineAlert as Ye}from"@dropins/tools/components.js";import{useRef as Qe,useState as _,useEffect as ee,useCallback as k,useMemo as et}from"@dropins/tools/preact-hooks.js";import{k as Re,o as Ve,u as Ce,c as He,e as tt,n as rt,j as st,h as nt,i as at,d as dt}from"./removeCustomerAddress.js";import{useText as ne}from"@dropins/tools/i18n.js";import*as G from"@dropins/tools/preact-compat.js";import{memo as Ee,forwardRef as ot,useImperativeHandle as lt,useMemo as be,useCallback as Ne}from"@dropins/tools/preact-compat.js";import{Fragment as _e}from"@dropins/tools/preact.js";import"@dropins/tools/event-bus.js";const fe=({hideActionFormButtons:e,formName:s,showFormLoader:n,showSaveCheckBox:r,saveCheckBoxValue:d,forwardFormRef:o,slots:i,addressesFormTitle:l,className:c,addressFormId:u,inputsDefaultValueSet:p,billingCheckBoxValue:y,shippingCheckBoxValue:g,showBillingCheckBox:O,showShippingCheckBox:L,isOpen:x,onSubmit:t,onCloseBtnClick:A,onSuccess:f,onError:N,onChange:T})=>a("div",{className:X(["account-address-form"]),children:a(Wt,{hideActionFormButtons:e,formName:s,showFormLoader:n,slots:i,addressesFormTitle:l,className:c,addressFormId:u,inputsDefaultValueSet:p,shippingCheckBoxValue:g,billingCheckBoxValue:y,showShippingCheckBox:L,showBillingCheckBox:O,isOpen:x,onSubmit:t,onCloseBtnClick:A,onSuccess:f,onError:N,onChange:T,forwardFormRef:o,showSaveCheckBox:r,saveCheckBoxValue:d})}),it=e=>e.reduce((s,n)=>({...s,[n.name]:n.value}),{}),ct=e=>/^\d+$/.test(e),ut=e=>/^[a-zA-Z0-9\s]+$/.test(e),pt=e=>/^[a-zA-Z0-9]+$/.test(e),ft=e=>/^[a-zA-Z]+$/.test(e),mt=e=>/^[a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]+(\.[a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]+)*@([a-z0-9-]+\.)+[a-z]{2,}$/i.test(e),ht=e=>/^\d{4}-\d{2}-\d{2}$/.test(e)&&!isNaN(Date.parse(e)),At=(e,s,n)=>{const r=new Date(e).getTime()/1e3;return isNaN(r)||r<0?!1:r>=s&&r<=n},Te=e=>new Date(parseInt(e,10)*1e3).toISOString().split("T")[0],Lt=e=>/^(https?|ftp):\/\/(([A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))(\.[A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))*)(:(\d+))?(\/[A-Z0-9~](([A-Z0-9_~-]|\.)*[A-Z0-9~]|))*\/?(.*)?$/i.test(e),gt=(e,s,n)=>{const r=e.length;return r>=s&&r<=n},ye=(e,s,n,r)=>{var S,H;const{requiredFieldError:d,lengthTextError:o,numericError:i,alphaNumWithSpacesError:l,alphaNumericError:c,alphaError:u,emailError:p,dateError:y,urlError:g,dateLengthError:O}=n,L=s==null?void 0:s.customUpperCode,x={[L]:""};if(r[L]&&delete r[L],s!=null&&s.required&&!e)return{[L]:d};if(!(s!=null&&s.required)&&!e||!((S=s==null?void 0:s.validateRules)!=null&&S.length))return x;const t=it(s==null?void 0:s.validateRules),A=t.MIN_TEXT_LENGTH??1,f=t.MAX_TEXT_LENGTH??255,N=t.DATE_RANGE_MIN,T=t.DATE_RANGE_MAX;if(!gt(e,+A,+f)&&!(N||T))return{[L]:o.replace("{min}",A).replace("{max}",f)};if(!At(e,+N,+T)&&(N||T))return{[L]:O.replace("{min}",Te(N)).replace("{max}",Te(T))};const z={numeric:{validate:ct,error:i},"alphanum-with-spaces":{validate:ut,error:l},alphanumeric:{validate:pt,error:c},alpha:{validate:ft,error:u},email:{validate:mt,error:p},date:{validate:ht,error:y},url:{validate:Lt,error:g}}[t.INPUT_VALIDATION];return z&&!z.validate(e)&&!((H=r[L])!=null&&H.length)?{[L]:z.error}:x},Be=e=>{switch(e){case"on":case"true":case 1:case"1":return!0;case"0":case"off":case"false":case 0:return!1;default:return!1}},yt=["true","false","yes","on","off"],Ct={firstName:"",lastName:"",city:"",company:"",countryCode:"",region:"",regionCode:"",regionId:"",id:"",telephone:"",vatId:"",postcode:"",defaultShipping:"",defaultBilling:"",street:"",saveAddressBook:"",prefix:"",middleName:"",fax:"",suffix:""},bt=e=>{const s={},n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const d=e[r],o=r.match(/^(.*)Multiline_(\d+)$/);if(o){const i=o[1],l=parseInt(o[2],10);n[i]||(n[i]=[]),n[i].push({index:l,value:d})}else Object.keys(e).filter(l=>l.startsWith(`${r}Multiline_`)).length>0?n[r]=[{index:1,value:d}]:s[r]=d}for(const r in n)if(Object.prototype.hasOwnProperty.call(n,r)){const d=n[r];d.sort((o,i)=>o.index-i.index),s[r]=d.map(o=>o.value)}return s},Mt=e=>{const s={},n=[];for(const r in e){const d=yt.includes(e[r])?Be(e[r]):e[r];Object.prototype.hasOwnProperty.call(e,r)&&(Object.prototype.hasOwnProperty.call(Ct,r)?s[r]=d:n.push({code:Ve(r),value:d}))}return{...s,customAttributes:n}},ae=(e,s=!1)=>{const n=Re(e,"camelCase",{firstname:"firstName",lastname:"lastName",middlename:"middleName"}),r=Mt(bt(n));if(!s)return r;const[d,o]=r.region?r.region.split(","):[];return{...r,region:{regionCode:d,...o&&{regionId:+o}}}},me=e=>{if(!e.current)return{};const s=e.current.elements;return Array.from(s).reduce((r,d)=>(d.name&&(r[d.name]=d.type==="checkbox"?d.checked:d.value),r),{})},Ze=(e,s)=>Object.keys(e).length?Object.keys(e).every(r=>r in s&&s[r]!==""):!1,ze=e=>typeof e=="function",vt=e=>e.reduce((s,{customUpperCode:n,required:r,defaultValue:d})=>(r&&n&&(s.initialData[n]=d||"",s.errorList[n]=""),s),{initialData:{},errorList:{}}),$e=e=>Object.keys(e).length>0,Et=({fieldsConfig:e,onSubmit:s,onChange:n,setInputChange:r,formName:d,isWaitingForResponse:o})=>{const i=ne({requiredFieldError:"Account.FormText.requiredFieldError",lengthTextError:"Account.FormText.lengthTextError",numericError:"Account.FormText.numericError",alphaNumWithSpacesError:"Account.FormText.alphaNumWithSpacesError",alphaNumericError:"Account.FormText.alphaNumericError",alphaError:"Account.FormText.alphaError",emailError:"Account.FormText.emailError",dateError:"Account.FormText.dateError",dateLengthError:"Account.FormText.dateLengthError",urlError:"Account.FormText.urlError"}),l=Qe(null),[c,u]=_({}),[p,y]=_({}),[g,O]=_({}),[L,x]=_(!0),[t,A]=_(!1),[f,N]=_(!1),[T,Z]=_(!0),[z,S]=_(!1);ee(()=>{const h=()=>{if(l.current){const b=window.getComputedStyle(l.current).getPropertyValue("grid-template-rows").split(" ").length,M=l.current.querySelector(".account-address-form--saveAddressBook");M&&(M.style.gridRow=String(b-1))}};return h(),window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}},[e==null?void 0:e.length]);const H=k((h=!1)=>{let v=!0;const b={...p};let M=null;for(const[I,m]of Object.entries(c)){const $=e==null?void 0:e.find(w=>w.customUpperCode.includes(I)),U=ye(m.toString(),$,i,b);U[I]&&(Object.assign(b,U),v=!1),M||(M=Object.keys(b).find(w=>b[w])||null)}if(h||y(b),M&&l.current&&!h){const I=l.current.elements.namedItem(M);I==null||I.focus()}return v},[p,e,c,i]),C=k((h,v,b,M)=>{const I={...me(l),[v]:h,...v.includes("countryCode")?{region:""}:{}},m={data:ae(I,!0),isDataValid:Ze(b,I)};S(m.isDataValid),H(!0),["selectedShippingAddress","selectedBillingAddress"].includes(d)&&sessionStorage.setItem(`${d}_addressData`,JSON.stringify(m)),n==null||n(m,{},M)},[H,d,n]);ee(()=>{if(e!=null&&e.length){const{initialData:h,errorList:v}=vt(e);u(b=>({...h,...b})),y(v),O(v)}},[JSON.stringify(e)]),ee(()=>{if(f)return;const h=me(l),v=sessionStorage.getItem(`${d}_addressData`);if($e(c)&&$e(g)){let b={};const M=Ze(g,c);v?b=JSON.parse(v).data:b=ae(h,!0)??{},n==null||n({data:b,isDataValid:M},{},null),S(M),N(!0)}},[c,g]),ee(()=>{var I;if(!T)return;const h=me(l),v=!!(h!=null&&h.countryCode),b=!!((I=h==null?void 0:h.region)!=null&&I.length);h&&v&&!b&&ze(n)&&!o&&C(h==null?void 0:h.region,"region",g,null)},[T,L,e,l,n,C,g,t,o]);const B=k((h,v)=>{const{name:b,value:M,type:I,checked:m}=h==null?void 0:h.target,$=I==="checkbox"?m:M;u(R=>{const te={...R,[b]:$};return b==="countryCode"&&(te.region="",x(!0),A(!1)),te}),r==null||r({[b]:$}),N(!0);const U=e==null?void 0:e.find(R=>R.customUpperCode.includes(b));let w=v?{...v}:{...p};if(U){const R=ye($.toString(),U,i,w);R&&Object.assign(w,R),y(w)}C($,b,g,h)},[r,e,p,i,C,g,L]),q=k(h=>{const{name:v}=h==null?void 0:h.target,b=e==null?void 0:e.find(M=>M.customUpperCode===v);v==="region"&&(b!=null&&b.options.length)&&Z(!1),Z(v==="countryCode")},[]),P=k((h,v)=>{const{name:b,value:M,type:I,checked:m}=h==null?void 0:h.target,$=I==="checkbox"?m:M,U=e==null?void 0:e.find(w=>w.customUpperCode===b);if(U){const w=v?{...v}:{...p},R=ye($.toString(),U,i,w);R&&Object.assign(w,R),y(w)}},[p,e,i]),K=k(h=>{h.preventDefault();const v=H();s==null||s(h,v)},[H,s]);return{isDataValid:z,formData:c,errors:p,formRef:l,handleInputChange:B,onFocus:q,handleBlur:P,handleSubmit:K,handleValidationSubmit:H}};var se=(e=>(e.BOOLEAN="BOOLEAN",e.DATE="DATE",e.DATETIME="DATETIME",e.DROPDOWN="DROPDOWN",e.FILE="FILE",e.GALLERY="GALLERY",e.HIDDEN="HIDDEN",e.IMAGE="IMAGE",e.MEDIA_IMAGE="MEDIA_IMAGE",e.MULTILINE="MULTILINE",e.MULTISELECT="MULTISELECT",e.PRICE="PRICE",e.SELECT="SELECT",e.TEXT="TEXT",e.TEXTAREA="TEXTAREA",e.UNDEFINED="UNDEFINED",e.VISUAL="VISUAL",e.WEIGHT="WEIGHT",e.EMPTY="",e))(se||{});const Nt=Ee(({loading:e,values:s,fields:n=[],errors:r,className:d="",onChange:o,onBlur:i,onFocus:l,slots:c})=>{const u=`${d}__field`,p=(t,A)=>{if(!(c!=null&&c[`AddressFormInput_${t.code}`]))return;const f={inputName:t.customUpperCode,handleOnChange:o,handleOnBlur:i,handleOnFocus:l,errorMessage:A,errors:r,config:t};return a(Ae,{"data-testid":`addressFormInput_${t.code}`,name:`AddressFormInput_${t.code}`,slot:c[`AddressFormInput_${t.code}`],context:f},t.id)},y=(t,A,f)=>{var T;const N=((T=t.options.find(Z=>Z.isDefault))==null?void 0:T.value)??A??t.defaultValue;return a(Q,{children:p(t,f)??a(le,{error:f,className:X([u,`${u}--${t.id}`,[`${u}--${t.id}-hidden`,t.isHidden],t.className]),"data-testid":`${d}--${t.id}`,disabled:e||t.disabled,children:a(Pe,{id:t.code,required:t.required,name:t.customUpperCode,floatingLabel:`${t.label} ${t.required?"*":""}`,placeholder:t.label,"aria-label":t.label,options:t.options,onBlur:i,onFocus:l,handleSelect:o,defaultValue:N,value:N})},t.id)})},g=(t,A,f)=>a(Q,{children:p(t,f)??a(le,{error:f,className:X([u,`${u}--${t.id}`,[`${u}--${t.id}-hidden`,t.isHidden],t.className]),"data-testid":`${d}--${t.id}`,disabled:e,children:a(je,{id:t.code,type:"text",name:t.customUpperCode,value:A??t.defaultValue,placeholder:t.label,floatingLabel:`${t.label} ${t.required?"*":""}`,onBlur:i,onFocus:l,onChange:o})},t.id)}),O=(t,A,f)=>a(Q,{children:p(t,f)??a(le,{error:f,className:X([u,`${u}--${t.id}`,[`${u}--${t.id}-hidden`,t.isHidden],t.className]),"data-testid":`${d}--${t.id}`,disabled:e||t.disabled,children:a(We,{id:t.code,type:"text",name:t.customUpperCode,value:A||t.defaultValue,placeholder:t.label,floatingLabel:`${t.label} ${t.required?"*":""}`,onBlur:i,onChange:o,disabled:e||t.disabled})},t.id)}),L=(t,A,f)=>a(Q,{children:p(t,f)??a(le,{error:f,className:X([u,`${u}--${t.id}`,[`${u}--${t.id}-hidden`,t.isHidden],t.className]),"data-testid":`${d}--${t.id}`,disabled:(t==null?void 0:t.isHidden)??e,children:a(xe,{"aria-hidden":t.isHidden,tabindex:t!=null&&t.isHidden?-1:0,id:t.code,name:t.customUpperCode,checked:A||t.defaultValue,placeholder:t.label,label:`${t.label} ${t.required?"*":""}`,onBlur:i,onChange:o})},t.id)}),x=(t,A,f)=>a(Q,{children:p(t,f)??a(le,{error:f,className:X([u,`${u}--${t.id}`,[`${u}--${t.id}-hidden`,t.isHidden],t.className]),"data-testid":`${d}--${t.id}`,disabled:e,children:a(De,{id:t.code,type:"text",name:t.customUpperCode,value:A??t.defaultValue,label:`${t.label} ${t.required?"*":""}`,onBlur:i,onChange:o})},t.id)});return n.length?a(Q,{children:n.map(t=>{const A=r==null?void 0:r[t.customUpperCode],f=s==null?void 0:s[t.customUpperCode];switch(t.fieldType){case se.TEXT:return t.options.length?y(t,f,A):g(t,f,A);case se.MULTILINE:return g(t,f,A);case se.SELECT:return y(t,f,A);case se.DATE:return O(t,f,A);case se.BOOLEAN:return L(t,f,A);case se.TEXTAREA:return x(t,f,A);default:return null}})}):null}),Ue=({testId:e,withCard:s=!0})=>{const n=j(we,{"data-testid":e||"skeletonLoader",children:[a(D,{variant:"heading",size:"xlarge",fullWidth:!1,lines:1}),a(D,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1}),a(D,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1})]});return s?n:a(he,{variant:"secondary",className:X(["account-account-loaders","account-account-loaders--card-loader"]),children:n})},_t=()=>j(we,{"data-testid":"addressFormLoader",children:[a(D,{variant:"heading",size:"medium"}),a(D,{variant:"empty",size:"medium"}),a(D,{size:"large"}),a(D,{size:"large"}),a(D,{size:"large",fullWidth:!0}),a(D,{size:"large",fullWidth:!0,lines:3}),a(D,{size:"large"}),a(D,{size:"large"}),a(D,{size:"large"}),a(D,{size:"large"}),a(D,{size:"large"}),a(D,{size:"large"}),a(D,{size:"large",fullWidth:!0})]}),Tt=Ee(ot(({isWaitingForResponse:e,setInputChange:s,showFormLoader:n,slots:r,name:d,loading:o,children:i,className:l="defaultForm",fieldsConfig:c,onSubmit:u,onChange:p,forwardFormRef:y,regionOptions:g,showSaveCheckBox:O,handleSaveCheckBoxAddress:L,saveCheckBoxAddress:x})=>{const t=ne({saveAddressBook:"Account.AddressForm.formText.saveAddressBook"}),{isDataValid:A,formData:f,errors:N,formRef:T,handleInputChange:Z,handleBlur:z,handleSubmit:S,handleValidationSubmit:H,onFocus:C}=Et({fieldsConfig:c,onSubmit:u,onChange:p,setInputChange:s,regionOptions:g,formName:d,isWaitingForResponse:e});return lt(y,()=>{const B=me(T);return{handleValidationSubmit:H,formData:ae(B,!0),isDataValid:A}}),n||!(c!=null&&c.length)?a(_t,{}):j("form",{className:X(["account-form",l]),onSubmit:S,name:d,ref:T,children:[a(Nt,{className:l,loading:o,fields:c,onChange:Z,onBlur:z,errors:N,values:f,onFocus:C,slots:r}),r!=null&&r.AddressFormInputs?a(Ae,{"data-testid":"addressFormInputs",name:"AddressFormInputs",slot:r.AddressFormInputs,context:{formActions:{handleChange:Z}}}):null,O?a("div",{className:"account-address-form--saveAddressBook",children:a(xe,{"data-testid":"testSaveAddressBook",name:"saveAddressBook",label:t.saveAddressBook,checked:x,onChange:B=>{Z(B),L==null||L(B)}})}):null,i]})})),Me=({slots:e,selectable:s,selectShipping:n,selectBilling:r,variant:d="secondary",minifiedView:o,keysSortOrder:i,addressData:l,loading:c,setAddressId:u,handleRenderModal:p,handleRenderForm:y})=>{const g=o?"minifiedView":"fullSizeView",O=ne({actionRemove:`Account.${g}.Addresses.addressCard.actionRemove`,actionEdit:`Account.${g}.Addresses.addressCard.actionEdit`,cardLabelShipping:`Account.${g}.Addresses.addressCard.cardLabelShipping`,cardLabelBilling:`Account.${g}.Addresses.addressCard.cardLabelBilling`,defaultLabelText:`Account.${g}.Addresses.addressCard.defaultLabelText`}),L=O.cardLabelBilling.toLocaleUpperCase(),x=O.cardLabelShipping.toLocaleUpperCase(),t=O.defaultLabelText.toLocaleUpperCase(),A=be(()=>{const C={shippingLabel:x,billingLabel:L,hideShipping:!1,hideBilling:!1};return s?n&&!r?{shippingLabel:t,billingLabel:t,hideShipping:!1,hideBilling:!0}:r&&!n?{shippingLabel:t,billingLabel:t,hideShipping:!0,hideBilling:!1}:C:C},[L,t,x,r,n,s]),f=Ne(()=>{u==null||u(l==null?void 0:l.id),p==null||p()},[p,l==null?void 0:l.id,u]),N=Ne(()=>{u==null||u(l==null?void 0:l.id),y==null||y()},[y,l==null?void 0:l.id,u]),T=be(()=>{if(!i)return[];const{region:C,...B}=l,q={...B,...C};return i.filter(({name:P})=>q[P]).map(P=>({name:P.name,orderNumber:P.orderNumber,value:q[P.name],label:P.label}))},[l,i]),{shippingLabel:Z,billingLabel:z,hideShipping:S,hideBilling:H}=A;return a(he,{variant:d,className:"account-address-card","data-testid":"addressCard",children:c?a(Ue,{}):j(Q,{children:[j("div",{className:"account-address-card__action",children:[p?a(de,{type:"button",variant:"tertiary",onClick:f,"data-testid":"removeButton",children:O.actionRemove}):null,y?a(de,{type:"button",variant:"tertiary",onClick:N,className:"account-address-card__action--editbutton","data-testid":"editButton",children:O.actionEdit}):null]}),a("div",{className:"account-address-card__description",children:e!=null&&e.AddressCard?a(Ae,{name:"AddressCard",slot:e==null?void 0:e.AddressCard,context:{addressData:T}}):a(Q,{children:T.map((C,B)=>{const q=C.label?`${C.label}: ${C==null?void 0:C.value}`:C==null?void 0:C.value;return a("p",{"data-testid":`${C.name}_${B}`,children:q},B)})})}),(l!=null&&l.defaultShipping||l!=null&&l.defaultBilling)&&!s?j("div",{className:"account-address-card__labels",children:[l!=null&&l.defaultShipping?a(pe,{label:x}):null,l!=null&&l.defaultBilling?a(pe,{label:L}):null]}):null,s?j("div",{className:"account-address-card__labels",children:[!S&&(l!=null&&l.defaultShipping)?a(pe,{label:Z}):null,!H&&(l!=null&&l.defaultBilling)?a(pe,{label:z}):null]}):null]})})},Zt=e=>G.createElement("svg",{id:"Icon_Add_Base","data-name":"Icon \\u2013 Add \\u2013 Base",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},G.createElement("g",{id:"Large"},G.createElement("rect",{id:"Placement_area","data-name":"Placement area",width:24,height:24,fill:"#fff",opacity:0}),G.createElement("g",{id:"Add_icon","data-name":"Add icon",transform:"translate(9.734 9.737)"},G.createElement("line",{vectorEffect:"non-scaling-stroke",id:"Line_579","data-name":"Line 579",y2:12.7,transform:"translate(2.216 -4.087)",fill:"none",stroke:"currentColor"}),G.createElement("line",{vectorEffect:"non-scaling-stroke",id:"Line_580","data-name":"Line 580",x2:12.7,transform:"translate(-4.079 2.263)",fill:"none",stroke:"currentColor"})))),$t=e=>G.createElement("svg",{id:"Icon_Chevron_right_Base","data-name":"Icon \\u2013 Chevron right \\u2013 Base",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},G.createElement("g",{id:"Large"},G.createElement("rect",{id:"Placement_area","data-name":"Placement area",width:24,height:24,fill:"#fff",opacity:0}),G.createElement("g",{id:"Chevron_right_icon","data-name":"Chevron right icon"},G.createElement("path",{vectorEffect:"non-scaling-stroke",id:"chevron",d:"M199.75,367.5l4.255,-4.255-4.255,-4.255",transform:"translate(-189.25 -351.0)",fill:"none",stroke:"currentColor"})))),Ft=e=>G.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},G.createElement("path",{d:"M3.375 7.38672C3.09886 7.38672 2.875 7.61058 2.875 7.88672C2.875 8.16286 3.09886 8.38672 3.375 8.38672V7.38672ZM5.88409 8.38672C6.16023 8.38672 6.38409 8.16286 6.38409 7.88672C6.38409 7.61058 6.16023 7.38672 5.88409 7.38672V8.38672ZM3.375 11.1836C3.09886 11.1836 2.875 11.4075 2.875 11.6836C2.875 11.9597 3.09886 12.1836 3.375 12.1836V11.1836ZM5.88409 12.1836C6.16023 12.1836 6.38409 11.9597 6.38409 11.6836C6.38409 11.4075 6.16023 11.1836 5.88409 11.1836V12.1836ZM3.375 15.6133C3.09886 15.6133 2.875 15.8371 2.875 16.1133C2.875 16.3894 3.09886 16.6133 3.375 16.6133V15.6133ZM5.88409 16.6133C6.16023 16.6133 6.38409 16.3894 6.38409 16.1133C6.38409 15.8371 6.16023 15.6133 5.88409 15.6133V16.6133ZM8.52059 16.4182C8.51422 16.6942 8.73286 16.9232 9.00893 16.9296C9.285 16.9359 9.51396 16.7173 9.52032 16.4412L8.52059 16.4182ZM9.19302 14.8261L8.70612 14.7124C8.70434 14.72 8.70274 14.7277 8.70132 14.7354L9.19302 14.8261ZM11.2762 13.3887L11.4404 13.8611L11.4499 13.8576L11.2762 13.3887ZM12.3195 13.1013C12.4035 12.8382 12.2583 12.5569 11.9953 12.4729C11.7322 12.3889 11.4509 12.5341 11.3669 12.7971L12.3195 13.1013ZM15.7342 16.4412C15.7406 16.7173 15.9695 16.9359 16.2456 16.9296C16.5217 16.9232 16.7403 16.6942 16.734 16.4182L15.7342 16.4412ZM16.0615 14.8261L16.5532 14.7354C16.5518 14.7277 16.5502 14.72 16.5484 14.7124L16.0615 14.8261ZM13.9784 13.3887L13.8046 13.8577L13.8142 13.861L13.9784 13.3887ZM13.8877 12.7971C13.8037 12.5341 13.5223 12.3889 13.2593 12.4729C12.9962 12.5569 12.8511 12.8382 12.9351 13.1013L13.8877 12.7971ZM10.9023 10.418L11.4023 10.418V10.418H10.9023ZM11.2309 8.60993L11.6861 8.81678L11.6861 8.81678L11.2309 8.60993ZM12.0518 12.7684L11.7218 13.1441L11.7682 13.1848L11.823 13.213L12.0518 12.7684ZM13.202 12.7684L13.4308 13.213L13.4787 13.1884L13.5203 13.1541L13.202 12.7684ZM3.375 8.38672H5.88409V7.38672H3.375V8.38672ZM3.375 12.1836H5.88409V11.1836H3.375V12.1836ZM3.375 16.6133H5.88409V15.6133H3.375V16.6133ZM6.41058 2.375H18.844V1.375H6.41058V2.375ZM18.844 2.375C19.4866 2.375 20.125 2.99614 20.125 3.9225H21.125C21.125 2.57636 20.1627 1.375 18.844 1.375V2.375ZM20.125 3.9225V20.0775H21.125V3.9225H20.125ZM20.125 20.0775C20.125 20.9945 19.485 21.625 18.844 21.625V22.625C20.1643 22.625 21.125 21.4105 21.125 20.0775H20.125ZM18.844 21.625H6.41058V22.625H18.844V21.625ZM6.41058 21.625C5.76792 21.625 5.12955 21.0039 5.12955 20.0775H4.12955C4.12955 21.4236 5.09185 22.625 6.41058 22.625V21.625ZM5.12955 20.0775V3.9225H4.12955V20.0775H5.12955ZM5.12955 3.9225C5.12955 3.0055 5.76956 2.375 6.41058 2.375V1.375C5.0902 1.375 4.12955 2.5895 4.12955 3.9225H5.12955ZM9.52032 16.4412C9.53194 15.9373 9.59014 15.4295 9.68473 14.9168L8.70132 14.7354C8.59869 15.2917 8.53362 15.853 8.52059 16.4182L9.52032 16.4412ZM9.67993 14.9397C9.69157 14.8899 9.78099 14.7261 10.1128 14.496C10.4223 14.2813 10.8711 14.0589 11.4404 13.861L11.112 12.9165C10.4856 13.1343 9.94827 13.3931 9.54284 13.6743C9.15974 13.94 8.80542 14.2871 8.70612 14.7124L9.67993 14.9397ZM11.4499 13.8576C11.5852 13.8074 11.7547 13.7102 11.8933 13.6105C11.9656 13.5584 12.0441 13.4954 12.1133 13.4247C12.1723 13.3646 12.2709 13.2534 12.3195 13.1013L11.3669 12.7971C11.3809 12.7532 11.3985 12.7277 11.4022 12.7225C11.407 12.7157 11.4073 12.7164 11.3993 12.7246C11.3827 12.7416 11.3525 12.7676 11.3092 12.7988C11.2674 12.8288 11.222 12.8575 11.1805 12.8808C11.1363 12.9057 11.1089 12.9175 11.1024 12.9199L11.4499 13.8576ZM16.734 16.4182C16.7209 15.853 16.6559 15.2917 16.5532 14.7354L15.5698 14.9168C15.6644 15.4295 15.7226 15.9373 15.7342 16.4412L16.734 16.4182ZM16.5484 14.7124C16.4491 14.2871 16.0948 13.94 15.7117 13.6743C15.3063 13.3931 14.769 13.1343 14.1426 12.9165L13.8142 13.861C14.3834 14.0589 14.8322 14.2813 15.1417 14.496C15.4736 14.7261 15.563 14.8899 15.5746 14.9397L16.5484 14.7124ZM14.1521 12.9199C14.1456 12.9175 14.1183 12.9057 14.074 12.8808C14.0325 12.8575 13.9871 12.8288 13.9453 12.7988C13.9021 12.7676 13.8719 12.7416 13.8552 12.7246C13.8472 12.7164 13.8476 12.7157 13.8524 12.7225C13.856 12.7277 13.8736 12.7532 13.8877 12.7971L12.9351 13.1013C12.9836 13.2534 13.0823 13.3646 13.1412 13.4247C13.2105 13.4954 13.2889 13.5584 13.3612 13.6105C13.4999 13.7102 13.6694 13.8074 13.8046 13.8576L14.1521 12.9199ZM11.4023 10.418C11.4023 9.83385 11.4811 9.26803 11.6861 8.81678L10.7757 8.40309C10.4878 9.03666 10.4023 9.76284 10.4023 10.418H11.4023ZM11.6861 8.81678C11.8053 8.55448 12.0796 8.38672 12.5813 8.38672V7.38672C11.8704 7.38672 11.1213 7.6426 10.7757 8.40309L11.6861 8.81678ZM12.5813 8.38672C13.087 8.38672 13.4614 8.60522 13.5777 8.83539L14.4703 8.38448C14.1169 7.685 13.2884 7.38672 12.5813 7.38672V8.38672ZM13.5777 8.83539C13.7606 9.19738 13.8523 9.72518 13.8523 10.418H14.8523C14.8523 9.66433 14.757 8.95213 14.4703 8.38448L13.5777 8.83539ZM12.5813 12.4492C12.5364 12.4492 12.5158 12.4464 12.5087 12.4451C12.5046 12.4444 12.5042 12.4442 12.5008 12.4428C12.4922 12.4391 12.4782 12.4321 12.438 12.4096C12.4018 12.3893 12.3471 12.358 12.2805 12.3238L11.823 13.213C11.8698 13.2371 11.9055 13.2576 11.9494 13.2821C11.9893 13.3045 12.0449 13.3354 12.1079 13.3623C12.2569 13.426 12.403 13.4492 12.5813 13.4492V12.4492ZM12.3817 12.3927C11.8273 11.9058 11.4022 11.3083 11.4023 10.418L10.4023 10.4179C10.4022 11.6973 11.0412 12.5462 11.7218 13.1441L12.3817 12.3927ZM13.8523 10.418C13.8523 11.3319 13.4575 11.9093 12.8838 12.3828L13.5203 13.1541C14.2611 12.5427 14.8523 11.7035 14.8523 10.418H13.8523ZM12.9733 12.3238C12.7638 12.4316 12.717 12.4492 12.5813 12.4492V13.4492C12.9639 13.4492 13.1869 13.3385 13.4308 13.213L12.9733 12.3238Z",fill:"#3D3D3D"})),Ot=e=>G.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},G.createElement("path",{d:"M12.002 21L11.8275 21.4686C11.981 21.5257 12.1528 21.5041 12.2873 21.4106C12.4218 21.3172 12.502 21.1638 12.502 21H12.002ZM3.89502 17.9823H3.39502C3.39502 18.1912 3.52485 18.378 3.72059 18.4509L3.89502 17.9823ZM3.89502 8.06421L4.07193 7.59655C3.91831 7.53844 3.74595 7.55948 3.61082 7.65284C3.47568 7.74619 3.39502 7.89997 3.39502 8.06421H3.89502ZM12.0007 21H11.5007C11.5007 21.1638 11.5809 21.3172 11.7154 21.4106C11.8499 21.5041 12.0216 21.5257 12.1751 21.4686L12.0007 21ZM20.1076 17.9823L20.282 18.4509C20.4778 18.378 20.6076 18.1912 20.6076 17.9823H20.1076ZM20.1076 8.06421H20.6076C20.6076 7.89997 20.527 7.74619 20.3918 7.65284C20.2567 7.55948 20.0843 7.53844 19.9307 7.59655L20.1076 8.06421ZM12.0007 11.1311L11.8238 10.6634C11.6293 10.737 11.5007 10.9232 11.5007 11.1311H12.0007ZM20.2858 8.53191C20.5441 8.43421 20.6743 8.14562 20.5766 7.88734C20.4789 7.62906 20.1903 7.49889 19.932 7.5966L20.2858 8.53191ZM12.002 4.94826L12.1775 4.48008C12.0605 4.43623 11.9314 4.43775 11.8154 4.48436L12.002 4.94826ZM5.87955 6.87106C5.62334 6.97407 5.49915 7.26528 5.60217 7.52149C5.70518 7.77769 5.99639 7.90188 6.2526 7.79887L5.87955 6.87106ZM18.1932 7.80315C18.4518 7.90008 18.74 7.76904 18.8369 7.51047C18.9338 7.2519 18.8028 6.96371 18.5442 6.86678L18.1932 7.80315ZM12 4.94827L11.5879 5.23148C11.6812 5.36719 11.8353 5.44827 12 5.44827C12.1647 5.44827 12.3188 5.36719 12.4121 5.23148L12 4.94827ZM14.0263 2L14.2028 1.53218C13.9875 1.45097 13.7446 1.52717 13.6143 1.71679L14.0263 2ZM21.8421 4.94827L22.2673 5.2113C22.3459 5.08422 22.3636 4.92863 22.3154 4.78717C22.2673 4.64571 22.1584 4.53319 22.0186 4.48045L21.8421 4.94827ZM9.97368 2L10.3857 1.71679C10.2554 1.52717 10.0125 1.45097 9.79721 1.53218L9.97368 2ZM2.15789 4.94827L1.98142 4.48045C1.84161 4.53319 1.73271 4.64571 1.68456 4.78717C1.63641 4.92863 1.65406 5.08422 1.73267 5.2113L2.15789 4.94827ZM12 11.1256L11.6702 11.5014C11.8589 11.667 12.1411 11.667 12.3298 11.5014L12 11.1256ZM15.0395 8.45812L14.8732 7.98659C14.8131 8.00779 14.7576 8.04028 14.7097 8.08232L15.0395 8.45812ZM23 5.65024L23.3288 6.0269C23.5095 5.86916 23.5527 5.60532 23.4318 5.39817C23.3109 5.19102 23.0599 5.09893 22.8337 5.17871L23 5.65024ZM8.96053 8.45812L9.29034 8.08232C9.24244 8.04028 9.18695 8.00779 9.12685 7.98659L8.96053 8.45812ZM1 5.65024L1.16632 5.17871C0.940115 5.09893 0.689119 5.19102 0.568192 5.39817C0.447264 5.60532 0.49048 5.86916 0.671176 6.0269L1 5.65024ZM12.1764 20.5314L4.06945 17.5137L3.72059 18.4509L11.8275 21.4686L12.1764 20.5314ZM4.39502 17.9823V8.06421H3.39502V17.9823H4.39502ZM3.71811 8.53187L11.8251 11.5987L12.1789 10.6634L4.07193 7.59655L3.71811 8.53187ZM11.502 11.1311V21H12.502V11.1311H11.502ZM12.1751 21.4686L20.282 18.4509L19.9332 17.5137L11.8262 20.5314L12.1751 21.4686ZM20.6076 17.9823V8.06421H19.6076V17.9823H20.6076ZM19.9307 7.59655L11.8238 10.6634L12.1776 11.5987L20.2845 8.53187L19.9307 7.59655ZM11.5007 11.1311V21H12.5007V11.1311H11.5007ZM19.932 7.5966L11.8251 10.6634L12.1789 11.5987L20.2858 8.53191L19.932 7.5966ZM11.8154 4.48436L5.87955 6.87106L6.2526 7.79887L12.1885 5.41217L11.8154 4.48436ZM11.8265 5.41645L18.1932 7.80315L18.5442 6.86678L12.1775 4.48008L11.8265 5.41645ZM11.502 4.94826V11.1311H12.502V4.94826H11.502ZM12.4121 5.23148L14.4384 2.28321L13.6143 1.71679L11.5879 4.66507L12.4121 5.23148ZM13.8498 2.46782L21.6656 5.4161L22.0186 4.48045L14.2028 1.53218L13.8498 2.46782ZM21.4169 4.68525L20.5485 6.08919L21.3989 6.61524L22.2673 5.2113L21.4169 4.68525ZM12.4121 4.66507L10.3857 1.71679L9.56162 2.28321L11.5879 5.23148L12.4121 4.66507ZM9.79721 1.53218L1.98142 4.48045L2.33437 5.4161L10.1502 2.46782L9.79721 1.53218ZM1.73267 5.2113L2.60109 6.61524L3.45154 6.08919L2.58312 4.68525L1.73267 5.2113ZM12.3298 11.5014L15.3693 8.83392L14.7097 8.08232L11.6702 10.7498L12.3298 11.5014ZM15.2058 8.92965L23.1663 6.12177L22.8337 5.17871L14.8732 7.98659L15.2058 8.92965ZM22.6712 5.27358L19.7764 7.80067L20.4341 8.554L23.3288 6.0269L22.6712 5.27358ZM12.3298 10.7498L9.29034 8.08232L8.63072 8.83392L11.6702 11.5014L12.3298 10.7498ZM9.12685 7.98659L1.16632 5.17871L0.83368 6.12177L8.79421 8.92965L9.12685 7.98659ZM0.671176 6.0269L3.56591 8.554L4.22356 7.80067L1.32882 5.27358L0.671176 6.0269Z",fill:"#D6D6D6"})),Fe=({selectable:e,className:s,addNewAddress:n,minifiedView:r,routeAddressesPage:d})=>{const o=r?"minifiedView":"fullSizeView",i=ne({viewAllAddressesButton:`Account.${o}.Addresses.viewAllAddressesButton`,addNewAddressButton:`Account.${o}.Addresses.addNewAddressButton`,differentAddressButton:`Account.${o}.Addresses.differentAddressButton`}),l=e?"span":"button",c=e?{}:{AriaRole:"button",type:"button"},u=r&&!n?i.viewAllAddressesButton:i.addNewAddressButton,p=e?i.differentAddressButton:u;return j(l,{...c,className:X(["account-actions-address",["account-actions-address--viewall",r],["account-actions-address--address",!r],["account-actions-address--selectable",e],s]),"data-testid":"showRouteFullAddress",onClick:d,children:[a("span",{className:"account-actions-address__title","data-testid":"addressActionsText",children:p}),a(Se,{source:r&&!n?$t:Zt,size:"32"})]})},It=({minifiedView:e,keysSortOrder:s,addressData:n,open:r,submitLoading:d,onRemoveAddress:o,closeModal:i})=>{const l=e?"minifiedView":"fullSizeView",c=ne({title:`Account.${l}.Addresses.removeAddressModal.title`,description:`Account.${l}.Addresses.removeAddressModal.description`,actionCancel:`Account.${l}.Addresses.removeAddressModal.actionCancel`,actionConfirm:`Account.${l}.Addresses.removeAddressModal.actionConfirm`});return r?a("div",{className:"account-address-modal",children:j(Ge,{className:"account-address-modal--overlay",title:a("h3",{children:c.title}),size:"full","data-testid":"addressModal",showCloseButton:!0,onClose:i,children:[d?a("div",{className:"account-address-modal__spinner","data-testid":"progressSpinner",children:a(Ke,{stroke:"4",size:"large"})}):null,a("p",{children:c.description}),a(Me,{minifiedView:e,addressData:n,keysSortOrder:s}),j("div",{className:"account-address-modal__buttons",children:[a(de,{type:"button",onClick:i,variant:"secondary",disabled:d,children:c.actionCancel}),a(de,{disabled:d,onClick:o,children:c.actionConfirm})]})]})}):null},xt=({typeList:e,isEmpty:s,minifiedView:n,className:r})=>{const d=n?"minifiedView":"fullSizeView",o=ne({addressesMessage:`Account.${d}.EmptyList.Addresses.message`,ordersListMessage:`Account.${d}.EmptyList.OrdersList.message`}),i=be(()=>{switch(e){case"address":return{icon:Ft,text:a("p",{children:o.addressesMessage})};case"orders":return{icon:Ot,text:a("p",{children:o.ordersListMessage})};default:return{icon:"",text:""}}},[e,o]);return!s||!e||!i.text?null:a(Je,{className:X(["account-empty-list",n?"account-empty-list--minified":"",r]),message:i.text,icon:a(Se,{source:i.icon}),"data-testid":"emptyList"})},wt=async(e,s)=>{if(s.length===1){const i=s[0],c=Object.values(i.region).every(p=>!!p)?{}:{region:{...i.region,regionId:0}};return!!await Ce({addressId:Number(i==null?void 0:i.id),defaultShipping:!1,defaultBilling:!1,...c})}const n=s.filter(i=>i.id!==e&&(i.defaultBilling||i.defaultShipping)||i.id!==e),r=s[s.length-1],d=n[0]||((r==null?void 0:r.id)!==e?r:null);return!d||!d.id?!1:!!await Ce({addressId:+d.id,defaultShipping:!0,defaultBilling:!0})},St=["firstname","lastname","city","company","country_code","region","region_code","region_id","telephone","id","vat_id","postcode","street","street_multiline_2","default_shipping","default_billing","fax","prefix","suffix","middlename"],r1=["email","firstname","lastname","middlename","gender","date_of_birth","prefix","suffix","fax"],ke=(e,s,n)=>{if(s&&n||!s&&!n)return e;const r=e.slice();return s?r.sort((d,o)=>Number(o.defaultShipping)-Number(d.defaultShipping)):n?r.sort((d,o)=>Number(o.defaultBilling)-Number(d.defaultBilling)):e},ve=e=>e==null?!0:typeof e!="object"?!1:Object.keys(e).length===0||Object.values(e).every(ve),Rt=({selectShipping:e,selectBilling:s,defaultSelectAddressId:n,onAddressData:r,minifiedView:d,routeAddressesPage:o,onSuccess:i})=>{const[l,c]=_(""),[u,p]=_(!1),[y,g]=_(!1),[O,L]=_(!1),[x,t]=_(!1),[A,f]=_(!1),[N,T]=_(""),[Z,z]=_([]),[S,H]=_([]),C=k(async()=>{L(!0),Promise.all([He("shortRequest"),tt()]).then(m=>{const[$,U]=m;if($){const w=$.map(({name:R,orderNumber:te,label:re})=>({name:rt(R),orderNumber:te,label:St.includes(R)?null:re}));H(w)}if(U)if(d){const w=U.filter(R=>!!R.defaultShipping||!!R.defaultBilling);z(w)}else z(U)}).finally(()=>{L(!1)})},[d]);ee(()=>{C()},[C]),ee(()=>{var m;if(Z.length)if(n===0)f(!0),c("0");else{const $=Z.find(w=>+w.id===n)||ke(Z,e,s)[0],U={data:ae($),isDataValid:!ve($)};c(n.toString()||((m=$==null?void 0:$.id)==null?void 0:m.toString())),r==null||r(U)}},[Z,n,r,s,e]);const B=k(m=>{T(m),f(!1)},[]),q=k((m,$)=>{const U=(m==null?void 0:m.target).value,w=(m==null?void 0:m.target).nextSibling;c(U);const R={data:ae($),isDataValid:!ve(ae($))};r==null||r(R),f(U==="0"),w&&(w.focus(),window.scrollBy(0,100))},[r]),P=k(()=>{g(!0)},[]),K=k(()=>{T(""),g(!1),p(!1)},[]),h=k(()=>{p(!0)},[]),v=k(async()=>{t(!0),await wt(N,Z),st(+N).then(()=>{C(),K()}).finally(()=>{t(!1)})},[Z,N,K,C]),b=k(()=>{f(!1)},[]),M=k(()=>{ze(o)&&d&&!A?window.location.href=o():(f(!0),T(""))},[A,o,d]),I=k(async()=>{await C(),await(i==null?void 0:i())},[C,i]);return{keysSortOrder:S,submitLoading:x,isModalRendered:u,isFormRendered:y,loading:O,addNewAddress:A,addressesList:Z,addressId:N,handleRenderForm:P,handleRenderModal:h,removeAddress:v,onCloseBtnClick:K,setEditingAddressId:B,closeNewAddressForm:b,redirectToAddressesRoute:M,handleOnSuccess:I,handleSelectAddressOption:q,selectedAddressOption:l}},s1=Ee(({hideActionFormButtons:e=!1,formName:s,slots:n,title:r="",addressFormTitle:d="",defaultSelectAddressId:o="",showFormLoader:i=!1,onAddressData:l,forwardFormRef:c,className:u,showSaveCheckBox:p=!1,saveCheckBoxValue:y=!1,selectShipping:g=!1,selectBilling:O=!1,selectable:L=!1,withHeader:x=!0,minifiedView:t=!1,withActionsInMinifiedView:A=!1,withActionsInFullSizeView:f=!0,inputsDefaultValueSet:N,showShippingCheckBox:T=!0,showBillingCheckBox:Z=!0,shippingCheckBoxValue:z=!0,billingCheckBoxValue:S=!0,routeAddressesPage:H,onSuccess:C,onError:B})=>{var J;const q=t?"minifiedView":"fullSizeView",P=ne({containerTitle:`Account.${q}.Addresses.containerTitle`,differentAddressFormTitle:`Account.${q}.Addresses.differentAddressFormTitle`,editAddressFormTitle:`Account.${q}.Addresses.editAddressFormTitle`,viewAllAddressesButton:`Account.${q}.Addresses.viewAllAddressesButton`,newAddressFormTitle:`Account.${q}.Addresses.newAddressFormTitle`}),{keysSortOrder:K,submitLoading:h,isModalRendered:v,isFormRendered:b,loading:M,addNewAddress:I,addressesList:m,addressId:$,handleRenderForm:U,handleRenderModal:w,removeAddress:R,onCloseBtnClick:te,handleOnSuccess:re,setEditingAddressId:Le,closeNewAddressForm:oe,redirectToAddressesRoute:ie,handleSelectAddressOption:ce,selectedAddressOption:ue}=Rt({defaultSelectAddressId:o,minifiedView:t,routeAddressesPage:H,onSuccess:C,onAddressData:l,selectShipping:g,selectBilling:O}),V=s??(g&&O?"selectedAddress":g?"selectedShippingAddress":O?"selectedBillingAddress":"default"),W=L?j("div",{className:"account-addresses-wrapper--select-view",children:[(J=ke(m,g,O))==null?void 0:J.map((E,Y)=>j(_e,{children:[a("input",{"data-testid":`radio-${Y+1}`,type:"radio",name:V,id:`${V}_${E.id}`,value:E.id,checked:ue===(E==null?void 0:E.id.toString()),onChange:ge=>ce(ge,E)}),a("label",{htmlFor:`${V}_${E.id}`,className:"account-addresses-wrapper__label",children:a(Me,{slots:n,selectable:L,selectShipping:g,selectBilling:O,minifiedView:t,addressData:E,keysSortOrder:K,loading:M})})]},E.id)),a("input",{"data-testid":"radio-0",type:"radio",name:V,id:`${V}_addressActions`,value:"0",checked:ue==="0",onChange:E=>ce(E,{})}),a("label",{htmlFor:`${V}_addressActions`,className:"account-addresses-wrapper__label",children:I?a("div",{className:X(["account-addresses-form__footer__wrapper",["account-addresses-form__footer__wrapper-show",I]]),children:a(fe,{slots:n,hideActionFormButtons:e,formName:V,showFormLoader:i,isOpen:I,forwardFormRef:c,showSaveCheckBox:p,saveCheckBoxValue:y,shippingCheckBoxValue:z,billingCheckBoxValue:S,addressesFormTitle:d||P.differentAddressFormTitle,inputsDefaultValueSet:N,showShippingCheckBox:T,showBillingCheckBox:Z,onCloseBtnClick:oe,onSuccess:re,onError:B,onChange:l})}):m!=null&&m.length?a(Fe,{selectable:L,minifiedView:t,addNewAddress:I,routeAddressesPage:ie}):null})]}):j(Q,{children:[m.map(E=>a(_e,{children:$===E.id&&b?a(he,{variant:"secondary",style:{marginBottom:20},children:a(fe,{slots:n,isOpen:$===E.id&&b,addressFormId:$,inputsDefaultValueSet:E,addressesFormTitle:P.editAddressFormTitle,showShippingCheckBox:T,showBillingCheckBox:Z,shippingCheckBoxValue:z,billingCheckBoxValue:S,onCloseBtnClick:te,onSuccess:re,onError:B})}):a(Me,{slots:n,minifiedView:t,addressData:E,keysSortOrder:K,loading:M,setAddressId:Le,handleRenderModal:t&&A||!t&&f?w:void 0,handleRenderForm:t&&A||!t&&f?U:void 0},E.id)},E.id)),a("div",{className:"account-addresses__footer",children:I?a(he,{variant:"secondary",children:a(fe,{slots:n,isOpen:I,addressesFormTitle:P.newAddressFormTitle,inputsDefaultValueSet:N,showShippingCheckBox:!!(m!=null&&m.length),showBillingCheckBox:!!(m!=null&&m.length),shippingCheckBoxValue:z,billingCheckBoxValue:S,onCloseBtnClick:oe,onSuccess:re,onError:B})}):a(Fe,{minifiedView:t,addNewAddress:I,routeAddressesPage:ie})})]});return j("div",{children:[a("div",{children:x?a(Xe,{title:r||P.containerTitle,divider:!t,className:t?"account-addresses-header":""}):null}),j("div",{className:X(["account-addresses-wrapper",u]),"data-testid":"addressesIdWrapper",children:[a(It,{minifiedView:t,addressData:m==null?void 0:m.find(E=>E.id===$),keysSortOrder:K,submitLoading:h,open:v,closeModal:te,onRemoveAddress:R}),M?a(Ue,{testId:"addressSkeletonLoader",withCard:!1}):L?a(fe,{slots:n,hideActionFormButtons:e,formName:V,isOpen:!(m!=null&&m.length),forwardFormRef:c,showSaveCheckBox:p,saveCheckBoxValue:y,shippingCheckBoxValue:z,billingCheckBoxValue:S,inputsDefaultValueSet:N,showShippingCheckBox:T,showBillingCheckBox:Z,onCloseBtnClick:oe,onSuccess:re,onError:B,onChange:l}):a(xt,{isEmpty:!(m!=null&&m.length),typeList:"address",minifiedView:t}),W]})]})}),qe={entityType:"CUSTOMER_ADDRESS",isUnique:!1,options:[],multilineCount:0,validateRules:[],defaultValue:!1,fieldType:se.BOOLEAN,className:"",required:!1,orderNumber:90,isHidden:!1},Vt={...qe,label:"Set as default shipping address",name:"default_shipping",id:"default_shipping",code:"default_shipping",customUpperCode:"defaultShipping"},Ht={...qe,label:"Set as default billing address",name:"default_billing",id:"default_billing",code:"default_billing",customUpperCode:"defaultBilling"},Bt=(e,s)=>s==null?void 0:s.map(n=>{const r={...e,firstName:e.firstname??e.firstName,lastName:e.lastname??e.lastName,middleName:e.middlename??e.middleName},d=JSON.parse(JSON.stringify(n));if(Object.hasOwn(r,n.customUpperCode)){const o=r[n.customUpperCode];n.customUpperCode==="region"&&typeof o=="object"?d.defaultValue=o.regionCode&&o.regionId?`${o.regionCode},${o.regionId}`:o.region??o.regionCode:d.defaultValue=o}return d}),Oe=e=>{if(!e)return null;const s=new FormData(e);if(e.querySelectorAll('input[type="checkbox"]').forEach(r=>{s.has(r.name)||s.set(r.name,"false"),r.checked&&s.set(r.name,"true")}),s&&typeof s.entries=="function"){const r=s.entries();if(r&&typeof r[Symbol.iterator]=="function")return JSON.parse(JSON.stringify(Object.fromEntries(r)))||{}}return{}},zt=({fields:e,addressId:s,countryOptions:n,disableField:r,regionOptions:d,isRequiredRegion:o,isRequiredPostCode:i})=>e.filter(c=>!(s&&(c.customUpperCode==="defaultShipping"||c.customUpperCode==="defaultBilling")&&c.defaultValue)).map(c=>c.customUpperCode==="countryCode"?{...c,options:n,disabled:r}:c.customUpperCode==="postcode"?{...c,required:i}:c.customUpperCode==="region"?{...c,options:d,required:o,disabled:r}:c),Ut=(e,s="address")=>{const n=s==="address"?["region","city","company","countryCode","countryId","defaultBilling","defaultShipping","fax","firstName","lastName","middleName","postcode","prefix","street","suffix","telephone","vatId","addressId"]:["email","firstName","lastName","middleName","gender","dateOfBirth","prefix","suffix"],r={},d=[];return Object.keys(e).forEach(o=>{n.includes(o)?r[o]=e[o]:d.push({attribute_code:Ve(o),value:e[o]})}),d.length>0&&(r.custom_attributesV2=d),r},Ie=e=>{const s=["street","streetMultiline_1","streetMultiline_2"],n=["on","off","true","false"],r=[],d={};for(const L in e){const x=e[L];n.includes(x)&&(d[L]=Be(x)),s.includes(L)&&r.push(x)}const{street:o,streetMultiline_2:i,streetMultiline_1:l,region:c,...u}=e,[p,y]=c?c.split(","):[void 0,void 0],g=y&&p?{regionId:+y,regionCode:p}:{region:p};return Ut({...u,...d,region:{...g},street:r})},kt=(e,s)=>{const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const d=e[r];if(r==="region"&&d.regionId){const o=s.find(i=>(i==null?void 0:i.id)===d.regionId);o?n[r]={...d,text:o.text}:n[r]=d}else Array.isArray(d)?(n[r]=d[0]||"",d.slice(1).forEach((o,i)=>{n[`${r}Multiline_${i+2}`]=o})):n[r]=d}return n},qt=(e,s)=>e&&Object.keys(e).length>0?e:s&&Object.keys(s).length>0?s:{},Pt=({showFormLoader:e,showSaveCheckBox:s,saveCheckBoxValue:n,addressFormId:r,billingCheckBoxValue:d,shippingCheckBoxValue:o,showShippingCheckBox:i,showBillingCheckBox:l,inputsDefaultValueSet:c,onCloseBtnClick:u,onSuccess:p,onError:y,formName:g})=>{const[O,L]=_({text:"",type:"success"}),[x,t]=_(e??!1),[A,f]=_(r||""),[N,T]=_([]),[Z,z]=_([]),[S,H]=_([]),[C,B]=_([]),[q,P]=_([]),[K,h]=_(!1),[v,b]=_(!1),[M,I]=_(()=>{var V,W;const F=sessionStorage.getItem(`${g}_addressData`);return F?{countryCode:(W=(V=JSON.parse(F))==null?void 0:V.data)==null?void 0:W.countryCode}:c}),[m,$]=_(!1),[U,w]=_(!1),[R,te]=_(()=>{var W,J;const F=sessionStorage.getItem(`${g}_addressData`);return F?(J=(W=JSON.parse(F))==null?void 0:W.data)==null?void 0:J.saveAddressBook:n}),re=k(F=>{te(F.target.checked)},[]);ee(()=>{typeof e>"u"||t(e)},[e]),ee(()=>{He(A?"customer_address_edit":"customer_register_address").then(F=>{T(F)})},[A]),ee(()=>{$(!0),nt().then(({availableCountries:F,countriesWithRequiredRegion:V,optionalZipCountries:W})=>{z(F),B(V),P(W),$(!1)})},[]),ee(()=>{if(M!=null&&M.countryCode){$(!0),w(!0);const F=M==null?void 0:M.countryCode;at(F).then(V=>{H(V);const W=C.find(E=>E===F),J=q.find(E=>E===F);h(!!W),b(!J),$(!1),w(!1)})}},[M==null?void 0:M.countryCode,C,q]);const Le=k(()=>{L({text:"",type:"success"}),u==null||u()},[u]),oe=k(async(F,V)=>{if(!V)return null;t(!0);const W=Oe(F.target),J=Ie(W);await Ce(J).then(()=>{var E;p==null||p(),u==null||u(),(E=F==null?void 0:F.target)==null||E.reset()}).catch(E=>{L(Y=>({...Y,text:E.message,type:"error"})),y==null||y(E)}).finally(()=>{f(""),t(!1)})},[u,y,p]),ie=k(async(F,V)=>{if(!V)return;t(!0);const{saveAddressBook:W,...J}=Oe(F.target),E=Ie(J);await dt(E).then(()=>{var Y;p==null||p(),u==null||u(),(Y=F==null?void 0:F.target)==null||Y.reset()}).catch(Y=>{L(ge=>({...ge,text:Y.message,type:"error"})),y==null||y(Y)}).finally(()=>{f(""),t(!1)})},[u,y,p]),ce=et(()=>{if(!N.length)return[];const F={...Vt,defaultValue:o,isHidden:s&&!R?!0:!i},V={...Ht,defaultValue:d,isHidden:s&&!R?!0:!l},W=[...N,F,V],J=sessionStorage.getItem(`${g}_addressData`),E=J?kt(JSON.parse(J).data,S):{},Y=Bt(qt(E,c),W);return zt({fields:Y,addressId:A,countryOptions:Z,disableField:m,regionOptions:S,isRequiredRegion:K,isRequiredPostCode:v})},[N,o,s,R,i,d,l,g,S,c,A,Z,m,K,v]),ue=k(F=>{I(V=>({...V,...F}))},[]);return{isWaitingForResponse:U,regionOptions:S,saveCheckBoxAddress:R,inLineAlert:O,addressId:A,submitLoading:x,normalizeFieldsConfig:ce,handleSaveCheckBoxAddress:re,handleUpdateAddress:oe,handleCreateAddress:ie,handleOnCloseForm:Le,handleInputChange:ue}},jt=e=>{var d;if(!e||!Array.isArray(e.customAttributes))return e??{};const s={};(d=e==null?void 0:e.customAttributes)==null||d.forEach(o=>{o.code&&Object.hasOwn(o,"value")&&(s[o.code]=o.value)});const{customAttributes:n,...r}=e;return{...r,...Re(s,"camelCase",{})}},Wt=({hideActionFormButtons:e,formName:s="",showFormLoader:n=!1,showSaveCheckBox:r=!1,saveCheckBoxValue:d=!1,forwardFormRef:o,slots:i,addressesFormTitle:l,className:c,addressFormId:u,inputsDefaultValueSet:p,showShippingCheckBox:y=!0,showBillingCheckBox:g=!0,shippingCheckBoxValue:O=!0,billingCheckBoxValue:L=!0,isOpen:x,onSubmit:t,onCloseBtnClick:A,onSuccess:f,onError:N,onChange:T})=>{const Z=ne({secondaryButton:"Account.AddressForm.formText.secondaryButton",primaryButton:"Account.AddressForm.formText.primaryButton",saveAddressBook:"Account.AddressForm.formText.saveAddressBook"}),{isWaitingForResponse:z,inLineAlert:S,addressId:H,submitLoading:C,normalizeFieldsConfig:B,handleUpdateAddress:q,handleCreateAddress:P,handleOnCloseForm:K,handleSaveCheckBoxAddress:h,saveCheckBoxAddress:v,handleInputChange:b,regionOptions:M}=Pt({showFormLoader:n,addressFormId:u,inputsDefaultValueSet:jt(p),shippingCheckBoxValue:O,billingCheckBoxValue:L,showShippingCheckBox:y,showBillingCheckBox:g,saveCheckBoxValue:d,showSaveCheckBox:r,onSuccess:f,onError:N,onCloseBtnClick:A,formName:s});return x?j("div",{className:X(["account-address-form-wrapper",c]),children:[l?a("div",{className:"account-address-form-wrapper__title","data-testid":"addressesFormTitle",children:l}):null,S.text?a(Ye,{"data-testid":"inLineAlert",className:"account-address-form-wrapper__notification",type:S.type,variant:"secondary",heading:S.text,icon:S.icon}):null,j(Tt,{regionOptions:M,forwardFormRef:o,slots:i,className:"account-address-form",name:s||"addressesForm",fieldsConfig:B,onSubmit:t||(H?q:P),setInputChange:b,loading:C,showFormLoader:n,showSaveCheckBox:r,handleSaveCheckBoxAddress:h,saveCheckBoxAddress:v,onChange:T,isWaitingForResponse:z,children:[H?a("input",{type:"hidden",name:"addressId",value:H,"data-testid":"hidden_test_id"}):null,e?null:a("div",{className:X(["dropin-field account-address-form-wrapper__buttons",["account-address-form-wrapper__buttons--empty",r]]),children:i!=null&&i.AddressFormActions?a(Ae,{"data-testid":"addressFormActions",name:"AddressFormActions",slot:i.AddressFormActions,context:{handleUpdateAddress:q,handleCreateAddress:P,addressId:H}}):a(Q,{children:r?null:j(Q,{children:[a(de,{type:"button",onClick:K,variant:"secondary",disabled:C,children:Z.secondaryButton}),a(de,{disabled:C,children:Z.primaryButton})]})})})]})]}):null};export{fe as A,Ue as C,xt as E,Tt as F,$t as S,s1 as a,ze as c,r1 as d,Oe as g,Ut as n}; +import{jsx as n,Fragment as Q,jsxs as W}from"@dropins/tools/preact-jsx-runtime.js";import{classes as Y,Slot as Ae}from"@dropins/tools/lib.js";import{Field as le,Picker as Ge,Input as Je,InputDate as Xe,Checkbox as Re,TextArea as De,Card as he,Skeleton as we,SkeletonRow as X,Button as de,Tag as pe,Icon as He,Modal as Ke,ProgressSpinner as Ye,IllustratedMessage as Qe,Header as et,InLineAlert as tt}from"@dropins/tools/components.js";import{useRef as rt,useState as _,useEffect as ee,useCallback as z,useMemo as st}from"@dropins/tools/preact-hooks.js";import{n as Ve,o as Be,u as Ce,c as ze,e as at,m as nt,j as dt,h as ot,i as lt,d as ct}from"./removeCustomerAddress.js";import{useText as ae}from"@dropins/tools/i18n.js";import*as D from"@dropins/tools/preact-compat.js";import{memo as _e,forwardRef as it,useImperativeHandle as ut,useMemo as Me,useCallback as Te}from"@dropins/tools/preact-compat.js";import{Fragment as $e}from"@dropins/tools/preact.js";import"@dropins/tools/event-bus.js";const fe=({hideActionFormButtons:e,formName:s,showFormLoader:a,showSaveCheckBox:r,saveCheckBoxValue:d,forwardFormRef:o,slots:c,addressesFormTitle:l,className:i,addressFormId:u,inputsDefaultValueSet:f,billingCheckBoxValue:g,shippingCheckBoxValue:C,showBillingCheckBox:O,showShippingCheckBox:L,isOpen:N,onSubmit:t,onCloseBtnClick:p,onSuccess:m,onError:T,onChange:$})=>n("div",{className:Y(["account-address-form"]),children:n(Xt,{hideActionFormButtons:e,formName:s,showFormLoader:a,slots:c,addressesFormTitle:l,className:i,addressFormId:u,inputsDefaultValueSet:f,shippingCheckBoxValue:C,billingCheckBoxValue:g,showShippingCheckBox:L,showBillingCheckBox:O,isOpen:N,onSubmit:t,onCloseBtnClick:p,onSuccess:m,onError:T,onChange:$,forwardFormRef:o,showSaveCheckBox:r,saveCheckBoxValue:d})}),pt=e=>e.reduce((s,a)=>({...s,[a.name]:a.value}),{}),ft=e=>/^\d+$/.test(e),mt=e=>/^[a-zA-Z0-9\s]+$/.test(e),ht=e=>/^[a-zA-Z0-9]+$/.test(e),At=e=>/^[a-zA-Z]+$/.test(e),Lt=e=>/^[a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]+(\.[a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]+)*@([a-z0-9-]+\.)+[a-z]{2,}$/i.test(e),gt=e=>/^\d{4}-\d{2}-\d{2}$/.test(e)&&!isNaN(Date.parse(e)),bt=(e,s,a)=>{const r=new Date(e).getTime()/1e3;return isNaN(r)||r<0?!1:r>=s&&r<=a},Ze=e=>new Date(parseInt(e,10)*1e3).toISOString().split("T")[0],yt=e=>/^(https?|ftp):\/\/(([A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))(\.[A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))*)(:(\d+))?(\/[A-Z0-9~](([A-Z0-9_~-]|\.)*[A-Z0-9~]|))*\/?(.*)?$/i.test(e),Ct=(e,s,a)=>{const r=e.length;return r>=s&&r<=a},ye=(e,s,a,r)=>{var S,R;const{requiredFieldError:d,lengthTextError:o,numericError:c,alphaNumWithSpacesError:l,alphaNumericError:i,alphaError:u,emailError:f,dateError:g,urlError:C,dateLengthError:O}=a,L=s==null?void 0:s.customUpperCode,N={[L]:""};if(r[L]&&delete r[L],s!=null&&s.required&&(!e||e==="false"))return{[L]:d};if(!(s!=null&&s.required)&&!e||!((S=s==null?void 0:s.validateRules)!=null&&S.length))return N;const t=pt(s==null?void 0:s.validateRules),p=t.MIN_TEXT_LENGTH??1,m=t.MAX_TEXT_LENGTH??255,T=t.DATE_RANGE_MIN,$=t.DATE_RANGE_MAX;if(!Ct(e,+p,+m)&&!(T||$))return{[L]:o.replace("{min}",p).replace("{max}",m)};if(!bt(e,+T,+$)&&(T||$))return{[L]:O.replace("{min}",Ze(T)).replace("{max}",Ze($))};const k={numeric:{validate:ft,error:c},"alphanum-with-spaces":{validate:mt,error:l},alphanumeric:{validate:ht,error:i},alpha:{validate:At,error:u},email:{validate:Lt,error:f},date:{validate:gt,error:g},url:{validate:yt,error:C}}[t.INPUT_VALIDATION];return k&&!k.validate(e)&&!((R=r[L])!=null&&R.length)?{[L]:k.error}:N},ke=e=>{switch(e){case"on":case"true":case 1:case"1":return!0;case"0":case"off":case"false":case 0:return!1;default:return!1}},Mt=["true","false","yes","on","off"],vt={firstName:"",lastName:"",city:"",company:"",countryCode:"",region:"",regionCode:"",regionId:"",id:"",telephone:"",vatId:"",postcode:"",defaultShipping:"",defaultBilling:"",street:"",saveAddressBook:"",prefix:"",middleName:"",fax:"",suffix:""},Et=e=>{const s={},a={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const d=e[r],o=r.match(/^(.*)Multiline_(\d+)$/);if(o){const c=o[1],l=parseInt(o[2],10);a[c]||(a[c]=[]),a[c].push({index:l,value:d})}else Object.keys(e).filter(l=>l.startsWith(`${r}Multiline_`)).length>0?a[r]=[{index:1,value:d}]:s[r]=d}for(const r in a)if(Object.prototype.hasOwnProperty.call(a,r)){const d=a[r];d.sort((o,c)=>o.index-c.index),s[r]=d.map(o=>o.value)}return s},_t=e=>{const s={},a=[];for(const r in e){const d=Mt.includes(e[r])?ke(e[r]):e[r];Object.prototype.hasOwnProperty.call(e,r)&&(Object.prototype.hasOwnProperty.call(vt,r)?s[r]=d:a.push({code:Be(r),value:d}))}return{...s,customAttributes:a}},ne=(e,s=!1)=>{const a=Ve(e,"camelCase",{firstname:"firstName",lastname:"lastName",middlename:"middleName"}),r=_t(Et(a));if(!s)return r;const[d,o]=r.region?r.region.split(","):[];return{...r,region:{regionCode:d,...o&&{regionId:+o}}}},me=e=>{if(!e.current)return{};const s=e.current.elements;return Array.from(s).reduce((r,d)=>(d.name&&(r[d.name]=d.type==="checkbox"?d.checked:d.value),r),{})},Ie=(e,s)=>Object.keys(e).length?Object.keys(e).every(r=>r in s&&s[r]!==""):!1,qe=e=>typeof e=="function",Nt=e=>e.reduce((s,{customUpperCode:a,required:r,defaultValue:d})=>(r&&a&&(s.initialData[a]=d||"",s.errorList[a]=""),s),{initialData:{},errorList:{}}),xe=e=>Object.keys(e).length>0,Tt=({fieldsConfig:e,onSubmit:s,onChange:a,setInputChange:r,formName:d,isWaitingForResponse:o})=>{const c=ae({requiredFieldError:"Account.FormText.requiredFieldError",lengthTextError:"Account.FormText.lengthTextError",numericError:"Account.FormText.numericError",alphaNumWithSpacesError:"Account.FormText.alphaNumWithSpacesError",alphaNumericError:"Account.FormText.alphaNumericError",alphaError:"Account.FormText.alphaError",emailError:"Account.FormText.emailError",dateError:"Account.FormText.dateError",dateLengthError:"Account.FormText.dateLengthError",urlError:"Account.FormText.urlError"}),l=rt(null),[i,u]=_({}),[f,g]=_({}),[C,O]=_({}),[L,N]=_(!0),[t,p]=_(!1),[m,T]=_(!1),[$,Z]=_(!0),[k,S]=_(!1);ee(()=>{const h=()=>{if(l.current){const y=window.getComputedStyle(l.current).getPropertyValue("grid-template-rows").split(" ").length,M=l.current.querySelector(".account-address-form--saveAddressBook");M&&(M.style.gridRow=String(y-1))}};return h(),window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}},[e==null?void 0:e.length]);const R=z((h=!1)=>{let v=!0;const y={...f};let M=null;for(const[x,A]of Object.entries(i)){const I=e==null?void 0:e.find(F=>F.customUpperCode.includes(x)),B=ye(A.toString(),I,c,y);B[x]&&(Object.assign(y,B),v=!1),M||(M=Object.keys(y).find(F=>y[F])||null)}if(h||g(y),M&&l.current&&!h){const x=l.current.elements.namedItem(M);x==null||x.focus()}return v},[f,e,i,c]),b=z((h,v,y,M)=>{const x={...me(l),[v]:h,...v.includes("countryCode")?{region:""}:{}},A={data:ne(x,!0),isDataValid:Ie(y,x)};S(A.isDataValid),R(!0),["selectedShippingAddress","selectedBillingAddress"].includes(d)&&sessionStorage.setItem(`${d}_addressData`,JSON.stringify(A)),a==null||a(A,{},M)},[R,d,a]);ee(()=>{if(e!=null&&e.length){const{initialData:h,errorList:v}=Nt(e);u(y=>({...h,...y})),g(v),O(v)}},[JSON.stringify(e)]),ee(()=>{if(m)return;const h=me(l),v=sessionStorage.getItem(`${d}_addressData`);if(xe(i)&&xe(C)){let y={};const M=Ie(C,i);v?y=JSON.parse(v).data:y=ne(h,!0)??{},a==null||a({data:y,isDataValid:M},{},null),S(M),T(!0)}},[i,C]),ee(()=>{var x;if(!$)return;const h=me(l),v=!!(h!=null&&h.countryCode),y=!!((x=h==null?void 0:h.region)!=null&&x.length);h&&v&&!y&&qe(a)&&!o&&b(h==null?void 0:h.region,"region",C,null)},[$,L,e,l,a,b,C,t,o]);const U=z((h,v)=>{const{name:y,value:M,type:x,checked:A}=h==null?void 0:h.target,I=x==="checkbox"?A:M;u(H=>{const te={...H,[y]:I};return y==="countryCode"&&(te.region="",N(!0),p(!1)),te}),r==null||r({[y]:I}),T(!0);const B=e==null?void 0:e.find(H=>H.customUpperCode.includes(y));let F=v?{...v}:{...f};if(B){const H=ye(I.toString(),B,c,F);H&&Object.assign(F,H),g(F)}b(I,y,C,h)},[r,e,f,c,b,C,L]),P=z(h=>{const{name:v}=h==null?void 0:h.target,y=e==null?void 0:e.find(M=>M.customUpperCode===v);v==="region"&&(y!=null&&y.options.length)&&Z(!1),Z(v==="countryCode")},[]),V=z((h,v)=>{const{name:y,value:M,type:x,checked:A}=h==null?void 0:h.target,I=x==="checkbox"?A:M,B=e==null?void 0:e.find(F=>F.customUpperCode===y);if(B){const F=v?{...v}:{...f},H=ye(I.toString(),B,c,F);H&&Object.assign(F,H),g(F)}},[f,e,c]),K=z(h=>{h.preventDefault();const v=R();s==null||s(h,v)},[R,s]);return{isDataValid:k,formData:i,errors:f,formRef:l,handleInputChange:U,onFocus:P,handleBlur:V,handleSubmit:K,handleValidationSubmit:R}};var se=(e=>(e.BOOLEAN="BOOLEAN",e.DATE="DATE",e.DATETIME="DATETIME",e.DROPDOWN="DROPDOWN",e.FILE="FILE",e.GALLERY="GALLERY",e.HIDDEN="HIDDEN",e.IMAGE="IMAGE",e.MEDIA_IMAGE="MEDIA_IMAGE",e.MULTILINE="MULTILINE",e.MULTISELECT="MULTISELECT",e.PRICE="PRICE",e.SELECT="SELECT",e.TEXT="TEXT",e.TEXTAREA="TEXTAREA",e.UNDEFINED="UNDEFINED",e.VISUAL="VISUAL",e.WEIGHT="WEIGHT",e.EMPTY="",e))(se||{});const $t=_e(({loading:e,values:s,fields:a=[],errors:r,className:d="",onChange:o,onBlur:c,onFocus:l,slots:i})=>{const u=`${d}__field`,f=(t,p)=>{if(!(i!=null&&i[`AddressFormInput_${t.code}`]))return;const m={inputName:t.customUpperCode,handleOnChange:o,handleOnBlur:c,handleOnFocus:l,errorMessage:p,errors:r,config:t};return n(Ae,{"data-testid":`addressFormInput_${t.code}`,name:`AddressFormInput_${t.code}`,slot:i[`AddressFormInput_${t.code}`],context:m},t.id)},g=(t,p,m)=>{var $;const T=(($=t.options.find(Z=>Z.isDefault))==null?void 0:$.value)??p??t.defaultValue;return n(Q,{children:f(t,m)??n(le,{error:m,className:Y([u,`${u}--${t.id}`,[`${u}--${t.id}-hidden`,t.isHidden],t.className]),"data-testid":`${d}--${t.id}`,disabled:e||t.disabled,children:n(Ge,{"aria-label":t.label,"aria-required":t.required?"true":"false",id:t.code,required:t==null?void 0:t.required,name:t.customUpperCode,floatingLabel:`${t.label} ${t.required?"*":""}`,placeholder:t.label,options:t.options,onBlur:c,onFocus:l,handleSelect:o,defaultValue:T,value:T})},t.id)})},C=(t,p,m)=>n(Q,{children:f(t,m)??n(le,{error:m,className:Y([u,`${u}--${t.id}`,[`${u}--${t.id}-hidden`,t.isHidden],t.className]),"data-testid":`${d}--${t.id}`,disabled:e,children:n(Je,{"aria-label":t.label,"aria-required":t.required?"true":"false",id:t.code,type:"text",name:t.customUpperCode,value:p??t.defaultValue,placeholder:t.label,floatingLabel:`${t.label} ${t.required?"*":""}`,onBlur:c,onFocus:l,onChange:o})},t.id)}),O=(t,p,m)=>n(Q,{children:f(t,m)??n(le,{error:m,className:Y([u,`${u}--${t.id}`,[`${u}--${t.id}-hidden`,t.isHidden],t.className]),"data-testid":`${d}--${t.id}`,disabled:e||t.disabled,children:n(Xe,{"aria-label":t.label,"aria-required":t.required?"true":"false",id:t.code,type:"text",name:t.customUpperCode,value:p||t.defaultValue,placeholder:t.label,floatingLabel:`${t.label} ${t.required?"*":""}`,onBlur:c,onChange:o,disabled:e||t.disabled})},t.id)}),L=(t,p,m)=>n(Q,{children:f(t,m)??n(le,{error:m,className:Y([u,`${u}--${t.id}`,[`${u}--${t.id}-hidden`,t.isHidden],t.className]),"data-testid":`${d}--${t.id}`,disabled:(t==null?void 0:t.isHidden)??e,children:n(Re,{"aria-label":t.label,"aria-required":t.required?"true":"false","aria-hidden":t.isHidden,tabindex:t!=null&&t.isHidden?-1:0,id:t.code,name:t.customUpperCode,checked:p||t.defaultValue,placeholder:t.label,label:`${t.label} ${t.required?"*":""}`,onBlur:c,onChange:o})},t.id)}),N=(t,p,m)=>n(Q,{children:f(t,m)??n(le,{error:m,className:Y([u,`${u}--${t.id}`,[`${u}--${t.id}-hidden`,t.isHidden],t.className]),"data-testid":`${d}--${t.id}`,disabled:e,children:n(De,{"aria-label":t.label,"aria-required":t.required?"true":"false",id:t.code,type:"text",name:t.customUpperCode,value:p??t.defaultValue,label:`${t.label} ${t.required?"*":""}`,onBlur:c,onChange:o})},t.id)});return a.length?n(Q,{children:a.map(t=>{const p=r==null?void 0:r[t.customUpperCode],m=s==null?void 0:s[t.customUpperCode];switch(t.fieldType){case se.TEXT:return t.options.length?g(t,m,p):C(t,m,p);case se.MULTILINE:return C(t,m,p);case se.SELECT:return g(t,m,p);case se.DATE:return O(t,m,p);case se.BOOLEAN:return L(t,m,p);case se.TEXTAREA:return N(t,m,p);default:return null}})}):null}),Ue=({testId:e,withCard:s=!0})=>{const a=W(we,{"data-testid":e||"skeletonLoader",children:[n(X,{variant:"heading",size:"xlarge",fullWidth:!1,lines:1}),n(X,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1}),n(X,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1})]});return s?a:n(he,{variant:"secondary",className:Y(["account-account-loaders","account-account-loaders--card-loader"]),children:a})},Zt=()=>W(we,{"data-testid":"addressFormLoader",children:[n(X,{variant:"heading",size:"medium"}),n(X,{variant:"empty",size:"medium"}),n(X,{size:"large"}),n(X,{size:"large"}),n(X,{size:"large",fullWidth:!0}),n(X,{size:"large",fullWidth:!0,lines:3}),n(X,{size:"large"}),n(X,{size:"large"}),n(X,{size:"large"}),n(X,{size:"large"}),n(X,{size:"large"}),n(X,{size:"large"}),n(X,{size:"large",fullWidth:!0})]}),It=_e(it(({isWaitingForResponse:e,setInputChange:s,showFormLoader:a,slots:r,name:d,loading:o,children:c,className:l="defaultForm",fieldsConfig:i,onSubmit:u,onChange:f,forwardFormRef:g,regionOptions:C,showSaveCheckBox:O,handleSaveCheckBoxAddress:L,saveCheckBoxAddress:N})=>{const t=ae({saveAddressBook:"Account.AddressForm.formText.saveAddressBook"}),{isDataValid:p,formData:m,errors:T,formRef:$,handleInputChange:Z,handleBlur:k,handleSubmit:S,handleValidationSubmit:R,onFocus:b}=Tt({fieldsConfig:i,onSubmit:u,onChange:f,setInputChange:s,regionOptions:C,formName:d,isWaitingForResponse:e});return ut(g,()=>{const U=me($);return{handleValidationSubmit:R,formData:ne(U,!0),isDataValid:p}}),a||!(i!=null&&i.length)?n(Zt,{}):W("form",{className:Y(["account-form",l]),onSubmit:S,name:d,ref:$,children:[n($t,{className:l,loading:o,fields:i,onChange:Z,onBlur:k,errors:T,values:m,onFocus:b,slots:r}),r!=null&&r.AddressFormInputs?n(Ae,{"data-testid":"addressFormInputs",name:"AddressFormInputs",slot:r.AddressFormInputs,context:{formActions:{handleChange:Z}}}):null,O?n("div",{className:"account-address-form--saveAddressBook",children:n(Re,{"data-testid":"testSaveAddressBook",name:"saveAddressBook",label:t.saveAddressBook,checked:N,onChange:U=>{Z(U),L==null||L(U)}})}):null,c]})})),ve=({slots:e,selectable:s,selectShipping:a,selectBilling:r,variant:d="secondary",minifiedView:o,keysSortOrder:c,addressData:l,loading:i,setAddressId:u,handleRenderModal:f,handleRenderForm:g})=>{const C=o?"minifiedView":"fullSizeView",O=ae({actionRemove:`Account.${C}.Addresses.addressCard.actionRemove`,actionEdit:`Account.${C}.Addresses.addressCard.actionEdit`,cardLabelShipping:`Account.${C}.Addresses.addressCard.cardLabelShipping`,cardLabelBilling:`Account.${C}.Addresses.addressCard.cardLabelBilling`,defaultLabelText:`Account.${C}.Addresses.addressCard.defaultLabelText`}),L=O.cardLabelBilling.toLocaleUpperCase(),N=O.cardLabelShipping.toLocaleUpperCase(),t=O.defaultLabelText.toLocaleUpperCase(),p=Me(()=>{const b={shippingLabel:N,billingLabel:L,hideShipping:!1,hideBilling:!1};return s?a&&!r?{shippingLabel:t,billingLabel:t,hideShipping:!1,hideBilling:!0}:r&&!a?{shippingLabel:t,billingLabel:t,hideShipping:!0,hideBilling:!1}:b:b},[L,t,N,r,a,s]),m=Te(()=>{u==null||u(l==null?void 0:l.id),f==null||f()},[f,l==null?void 0:l.id,u]),T=Te(()=>{u==null||u(l==null?void 0:l.id),g==null||g()},[g,l==null?void 0:l.id,u]),$=Me(()=>{if(!c)return[];const{region:b,...U}=l,P={...U,...b};return c.filter(({name:V})=>P[V]).map(V=>({name:V.name,orderNumber:V.orderNumber,value:P[V.name],label:V.label}))},[l,c]),{shippingLabel:Z,billingLabel:k,hideShipping:S,hideBilling:R}=p;return n(he,{variant:d,className:"account-address-card","data-testid":"addressCard",children:i?n(Ue,{}):W(Q,{children:[W("div",{className:"account-address-card__action",children:[f?n(de,{type:"button",variant:"tertiary",onClick:m,"data-testid":"removeButton",children:O.actionRemove}):null,g?n(de,{type:"button",variant:"tertiary",onClick:T,className:"account-address-card__action--editbutton","data-testid":"editButton",children:O.actionEdit}):null]}),n("div",{className:"account-address-card__description",children:e!=null&&e.AddressCard?n(Ae,{name:"AddressCard",slot:e==null?void 0:e.AddressCard,context:{addressData:$}}):n(Q,{children:$.map((b,U)=>{const P=b.label?`${b.label}: ${b==null?void 0:b.value}`:b==null?void 0:b.value;return n("p",{"data-testid":`${b.name}_${U}`,children:P},U)})})}),(l!=null&&l.defaultShipping||l!=null&&l.defaultBilling)&&!s?W("div",{className:"account-address-card__labels",children:[l!=null&&l.defaultShipping?n(pe,{label:N}):null,l!=null&&l.defaultBilling?n(pe,{label:L}):null]}):null,s?W("div",{className:"account-address-card__labels",children:[!S&&(l!=null&&l.defaultShipping)?n(pe,{label:Z}):null,!R&&(l!=null&&l.defaultBilling)?n(pe,{label:k}):null]}):null]})})},xt=e=>D.createElement("svg",{id:"Icon_Add_Base","data-name":"Icon \\u2013 Add \\u2013 Base",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},D.createElement("g",{id:"Large"},D.createElement("rect",{id:"Placement_area","data-name":"Placement area",width:24,height:24,fill:"#fff",opacity:0}),D.createElement("g",{id:"Add_icon","data-name":"Add icon",transform:"translate(9.734 9.737)"},D.createElement("line",{vectorEffect:"non-scaling-stroke",id:"Line_579","data-name":"Line 579",y2:12.7,transform:"translate(2.216 -4.087)",fill:"none",stroke:"currentColor"}),D.createElement("line",{vectorEffect:"non-scaling-stroke",id:"Line_580","data-name":"Line 580",x2:12.7,transform:"translate(-4.079 2.263)",fill:"none",stroke:"currentColor"})))),Ft=e=>D.createElement("svg",{id:"Icon_Chevron_right_Base","data-name":"Icon \\u2013 Chevron right \\u2013 Base",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},D.createElement("g",{id:"Large"},D.createElement("rect",{id:"Placement_area","data-name":"Placement area",width:24,height:24,fill:"#fff",opacity:0}),D.createElement("g",{id:"Chevron_right_icon","data-name":"Chevron right icon"},D.createElement("path",{vectorEffect:"non-scaling-stroke",id:"chevron",d:"M199.75,367.5l4.255,-4.255-4.255,-4.255",transform:"translate(-189.25 -351.0)",fill:"none",stroke:"currentColor"})))),Ot=e=>D.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},D.createElement("path",{d:"M3.375 7.38672C3.09886 7.38672 2.875 7.61058 2.875 7.88672C2.875 8.16286 3.09886 8.38672 3.375 8.38672V7.38672ZM5.88409 8.38672C6.16023 8.38672 6.38409 8.16286 6.38409 7.88672C6.38409 7.61058 6.16023 7.38672 5.88409 7.38672V8.38672ZM3.375 11.1836C3.09886 11.1836 2.875 11.4075 2.875 11.6836C2.875 11.9597 3.09886 12.1836 3.375 12.1836V11.1836ZM5.88409 12.1836C6.16023 12.1836 6.38409 11.9597 6.38409 11.6836C6.38409 11.4075 6.16023 11.1836 5.88409 11.1836V12.1836ZM3.375 15.6133C3.09886 15.6133 2.875 15.8371 2.875 16.1133C2.875 16.3894 3.09886 16.6133 3.375 16.6133V15.6133ZM5.88409 16.6133C6.16023 16.6133 6.38409 16.3894 6.38409 16.1133C6.38409 15.8371 6.16023 15.6133 5.88409 15.6133V16.6133ZM8.52059 16.4182C8.51422 16.6942 8.73286 16.9232 9.00893 16.9296C9.285 16.9359 9.51396 16.7173 9.52032 16.4412L8.52059 16.4182ZM9.19302 14.8261L8.70612 14.7124C8.70434 14.72 8.70274 14.7277 8.70132 14.7354L9.19302 14.8261ZM11.2762 13.3887L11.4404 13.8611L11.4499 13.8576L11.2762 13.3887ZM12.3195 13.1013C12.4035 12.8382 12.2583 12.5569 11.9953 12.4729C11.7322 12.3889 11.4509 12.5341 11.3669 12.7971L12.3195 13.1013ZM15.7342 16.4412C15.7406 16.7173 15.9695 16.9359 16.2456 16.9296C16.5217 16.9232 16.7403 16.6942 16.734 16.4182L15.7342 16.4412ZM16.0615 14.8261L16.5532 14.7354C16.5518 14.7277 16.5502 14.72 16.5484 14.7124L16.0615 14.8261ZM13.9784 13.3887L13.8046 13.8577L13.8142 13.861L13.9784 13.3887ZM13.8877 12.7971C13.8037 12.5341 13.5223 12.3889 13.2593 12.4729C12.9962 12.5569 12.8511 12.8382 12.9351 13.1013L13.8877 12.7971ZM10.9023 10.418L11.4023 10.418V10.418H10.9023ZM11.2309 8.60993L11.6861 8.81678L11.6861 8.81678L11.2309 8.60993ZM12.0518 12.7684L11.7218 13.1441L11.7682 13.1848L11.823 13.213L12.0518 12.7684ZM13.202 12.7684L13.4308 13.213L13.4787 13.1884L13.5203 13.1541L13.202 12.7684ZM3.375 8.38672H5.88409V7.38672H3.375V8.38672ZM3.375 12.1836H5.88409V11.1836H3.375V12.1836ZM3.375 16.6133H5.88409V15.6133H3.375V16.6133ZM6.41058 2.375H18.844V1.375H6.41058V2.375ZM18.844 2.375C19.4866 2.375 20.125 2.99614 20.125 3.9225H21.125C21.125 2.57636 20.1627 1.375 18.844 1.375V2.375ZM20.125 3.9225V20.0775H21.125V3.9225H20.125ZM20.125 20.0775C20.125 20.9945 19.485 21.625 18.844 21.625V22.625C20.1643 22.625 21.125 21.4105 21.125 20.0775H20.125ZM18.844 21.625H6.41058V22.625H18.844V21.625ZM6.41058 21.625C5.76792 21.625 5.12955 21.0039 5.12955 20.0775H4.12955C4.12955 21.4236 5.09185 22.625 6.41058 22.625V21.625ZM5.12955 20.0775V3.9225H4.12955V20.0775H5.12955ZM5.12955 3.9225C5.12955 3.0055 5.76956 2.375 6.41058 2.375V1.375C5.0902 1.375 4.12955 2.5895 4.12955 3.9225H5.12955ZM9.52032 16.4412C9.53194 15.9373 9.59014 15.4295 9.68473 14.9168L8.70132 14.7354C8.59869 15.2917 8.53362 15.853 8.52059 16.4182L9.52032 16.4412ZM9.67993 14.9397C9.69157 14.8899 9.78099 14.7261 10.1128 14.496C10.4223 14.2813 10.8711 14.0589 11.4404 13.861L11.112 12.9165C10.4856 13.1343 9.94827 13.3931 9.54284 13.6743C9.15974 13.94 8.80542 14.2871 8.70612 14.7124L9.67993 14.9397ZM11.4499 13.8576C11.5852 13.8074 11.7547 13.7102 11.8933 13.6105C11.9656 13.5584 12.0441 13.4954 12.1133 13.4247C12.1723 13.3646 12.2709 13.2534 12.3195 13.1013L11.3669 12.7971C11.3809 12.7532 11.3985 12.7277 11.4022 12.7225C11.407 12.7157 11.4073 12.7164 11.3993 12.7246C11.3827 12.7416 11.3525 12.7676 11.3092 12.7988C11.2674 12.8288 11.222 12.8575 11.1805 12.8808C11.1363 12.9057 11.1089 12.9175 11.1024 12.9199L11.4499 13.8576ZM16.734 16.4182C16.7209 15.853 16.6559 15.2917 16.5532 14.7354L15.5698 14.9168C15.6644 15.4295 15.7226 15.9373 15.7342 16.4412L16.734 16.4182ZM16.5484 14.7124C16.4491 14.2871 16.0948 13.94 15.7117 13.6743C15.3063 13.3931 14.769 13.1343 14.1426 12.9165L13.8142 13.861C14.3834 14.0589 14.8322 14.2813 15.1417 14.496C15.4736 14.7261 15.563 14.8899 15.5746 14.9397L16.5484 14.7124ZM14.1521 12.9199C14.1456 12.9175 14.1183 12.9057 14.074 12.8808C14.0325 12.8575 13.9871 12.8288 13.9453 12.7988C13.9021 12.7676 13.8719 12.7416 13.8552 12.7246C13.8472 12.7164 13.8476 12.7157 13.8524 12.7225C13.856 12.7277 13.8736 12.7532 13.8877 12.7971L12.9351 13.1013C12.9836 13.2534 13.0823 13.3646 13.1412 13.4247C13.2105 13.4954 13.2889 13.5584 13.3612 13.6105C13.4999 13.7102 13.6694 13.8074 13.8046 13.8576L14.1521 12.9199ZM11.4023 10.418C11.4023 9.83385 11.4811 9.26803 11.6861 8.81678L10.7757 8.40309C10.4878 9.03666 10.4023 9.76284 10.4023 10.418H11.4023ZM11.6861 8.81678C11.8053 8.55448 12.0796 8.38672 12.5813 8.38672V7.38672C11.8704 7.38672 11.1213 7.6426 10.7757 8.40309L11.6861 8.81678ZM12.5813 8.38672C13.087 8.38672 13.4614 8.60522 13.5777 8.83539L14.4703 8.38448C14.1169 7.685 13.2884 7.38672 12.5813 7.38672V8.38672ZM13.5777 8.83539C13.7606 9.19738 13.8523 9.72518 13.8523 10.418H14.8523C14.8523 9.66433 14.757 8.95213 14.4703 8.38448L13.5777 8.83539ZM12.5813 12.4492C12.5364 12.4492 12.5158 12.4464 12.5087 12.4451C12.5046 12.4444 12.5042 12.4442 12.5008 12.4428C12.4922 12.4391 12.4782 12.4321 12.438 12.4096C12.4018 12.3893 12.3471 12.358 12.2805 12.3238L11.823 13.213C11.8698 13.2371 11.9055 13.2576 11.9494 13.2821C11.9893 13.3045 12.0449 13.3354 12.1079 13.3623C12.2569 13.426 12.403 13.4492 12.5813 13.4492V12.4492ZM12.3817 12.3927C11.8273 11.9058 11.4022 11.3083 11.4023 10.418L10.4023 10.4179C10.4022 11.6973 11.0412 12.5462 11.7218 13.1441L12.3817 12.3927ZM13.8523 10.418C13.8523 11.3319 13.4575 11.9093 12.8838 12.3828L13.5203 13.1541C14.2611 12.5427 14.8523 11.7035 14.8523 10.418H13.8523ZM12.9733 12.3238C12.7638 12.4316 12.717 12.4492 12.5813 12.4492V13.4492C12.9639 13.4492 13.1869 13.3385 13.4308 13.213L12.9733 12.3238Z",fill:"currentColor"})),St=e=>D.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},D.createElement("path",{d:"M12.002 21L11.8275 21.4686C11.981 21.5257 12.1528 21.5041 12.2873 21.4106C12.4218 21.3172 12.502 21.1638 12.502 21H12.002ZM3.89502 17.9823H3.39502C3.39502 18.1912 3.52485 18.378 3.72059 18.4509L3.89502 17.9823ZM3.89502 8.06421L4.07193 7.59655C3.91831 7.53844 3.74595 7.55948 3.61082 7.65284C3.47568 7.74619 3.39502 7.89997 3.39502 8.06421H3.89502ZM12.0007 21H11.5007C11.5007 21.1638 11.5809 21.3172 11.7154 21.4106C11.8499 21.5041 12.0216 21.5257 12.1751 21.4686L12.0007 21ZM20.1076 17.9823L20.282 18.4509C20.4778 18.378 20.6076 18.1912 20.6076 17.9823H20.1076ZM20.1076 8.06421H20.6076C20.6076 7.89997 20.527 7.74619 20.3918 7.65284C20.2567 7.55948 20.0843 7.53844 19.9307 7.59655L20.1076 8.06421ZM12.0007 11.1311L11.8238 10.6634C11.6293 10.737 11.5007 10.9232 11.5007 11.1311H12.0007ZM20.2858 8.53191C20.5441 8.43421 20.6743 8.14562 20.5766 7.88734C20.4789 7.62906 20.1903 7.49889 19.932 7.5966L20.2858 8.53191ZM12.002 4.94826L12.1775 4.48008C12.0605 4.43623 11.9314 4.43775 11.8154 4.48436L12.002 4.94826ZM5.87955 6.87106C5.62334 6.97407 5.49915 7.26528 5.60217 7.52149C5.70518 7.77769 5.99639 7.90188 6.2526 7.79887L5.87955 6.87106ZM18.1932 7.80315C18.4518 7.90008 18.74 7.76904 18.8369 7.51047C18.9338 7.2519 18.8028 6.96371 18.5442 6.86678L18.1932 7.80315ZM12 4.94827L11.5879 5.23148C11.6812 5.36719 11.8353 5.44827 12 5.44827C12.1647 5.44827 12.3188 5.36719 12.4121 5.23148L12 4.94827ZM14.0263 2L14.2028 1.53218C13.9875 1.45097 13.7446 1.52717 13.6143 1.71679L14.0263 2ZM21.8421 4.94827L22.2673 5.2113C22.3459 5.08422 22.3636 4.92863 22.3154 4.78717C22.2673 4.64571 22.1584 4.53319 22.0186 4.48045L21.8421 4.94827ZM9.97368 2L10.3857 1.71679C10.2554 1.52717 10.0125 1.45097 9.79721 1.53218L9.97368 2ZM2.15789 4.94827L1.98142 4.48045C1.84161 4.53319 1.73271 4.64571 1.68456 4.78717C1.63641 4.92863 1.65406 5.08422 1.73267 5.2113L2.15789 4.94827ZM12 11.1256L11.6702 11.5014C11.8589 11.667 12.1411 11.667 12.3298 11.5014L12 11.1256ZM15.0395 8.45812L14.8732 7.98659C14.8131 8.00779 14.7576 8.04028 14.7097 8.08232L15.0395 8.45812ZM23 5.65024L23.3288 6.0269C23.5095 5.86916 23.5527 5.60532 23.4318 5.39817C23.3109 5.19102 23.0599 5.09893 22.8337 5.17871L23 5.65024ZM8.96053 8.45812L9.29034 8.08232C9.24244 8.04028 9.18695 8.00779 9.12685 7.98659L8.96053 8.45812ZM1 5.65024L1.16632 5.17871C0.940115 5.09893 0.689119 5.19102 0.568192 5.39817C0.447264 5.60532 0.49048 5.86916 0.671176 6.0269L1 5.65024ZM12.1764 20.5314L4.06945 17.5137L3.72059 18.4509L11.8275 21.4686L12.1764 20.5314ZM4.39502 17.9823V8.06421H3.39502V17.9823H4.39502ZM3.71811 8.53187L11.8251 11.5987L12.1789 10.6634L4.07193 7.59655L3.71811 8.53187ZM11.502 11.1311V21H12.502V11.1311H11.502ZM12.1751 21.4686L20.282 18.4509L19.9332 17.5137L11.8262 20.5314L12.1751 21.4686ZM20.6076 17.9823V8.06421H19.6076V17.9823H20.6076ZM19.9307 7.59655L11.8238 10.6634L12.1776 11.5987L20.2845 8.53187L19.9307 7.59655ZM11.5007 11.1311V21H12.5007V11.1311H11.5007ZM19.932 7.5966L11.8251 10.6634L12.1789 11.5987L20.2858 8.53191L19.932 7.5966ZM11.8154 4.48436L5.87955 6.87106L6.2526 7.79887L12.1885 5.41217L11.8154 4.48436ZM11.8265 5.41645L18.1932 7.80315L18.5442 6.86678L12.1775 4.48008L11.8265 5.41645ZM11.502 4.94826V11.1311H12.502V4.94826H11.502ZM12.4121 5.23148L14.4384 2.28321L13.6143 1.71679L11.5879 4.66507L12.4121 5.23148ZM13.8498 2.46782L21.6656 5.4161L22.0186 4.48045L14.2028 1.53218L13.8498 2.46782ZM21.4169 4.68525L20.5485 6.08919L21.3989 6.61524L22.2673 5.2113L21.4169 4.68525ZM12.4121 4.66507L10.3857 1.71679L9.56162 2.28321L11.5879 5.23148L12.4121 4.66507ZM9.79721 1.53218L1.98142 4.48045L2.33437 5.4161L10.1502 2.46782L9.79721 1.53218ZM1.73267 5.2113L2.60109 6.61524L3.45154 6.08919L2.58312 4.68525L1.73267 5.2113ZM12.3298 11.5014L15.3693 8.83392L14.7097 8.08232L11.6702 10.7498L12.3298 11.5014ZM15.2058 8.92965L23.1663 6.12177L22.8337 5.17871L14.8732 7.98659L15.2058 8.92965ZM22.6712 5.27358L19.7764 7.80067L20.4341 8.554L23.3288 6.0269L22.6712 5.27358ZM12.3298 10.7498L9.29034 8.08232L8.63072 8.83392L11.6702 11.5014L12.3298 10.7498ZM9.12685 7.98659L1.16632 5.17871L0.83368 6.12177L8.79421 8.92965L9.12685 7.98659ZM0.671176 6.0269L3.56591 8.554L4.22356 7.80067L1.32882 5.27358L0.671176 6.0269Z",fill:"currentColor"})),Fe=({selectable:e,className:s,addNewAddress:a,minifiedView:r,routeAddressesPage:d})=>{const o=r?"minifiedView":"fullSizeView",c=ae({viewAllAddressesButton:`Account.${o}.Addresses.viewAllAddressesButton`,addNewAddressButton:`Account.${o}.Addresses.addNewAddressButton`,differentAddressButton:`Account.${o}.Addresses.differentAddressButton`}),l=e?"span":"button",i=e?{}:{AriaRole:"button",type:"button"},u=r&&!a?c.viewAllAddressesButton:c.addNewAddressButton,f=e?c.differentAddressButton:u;return W(l,{...i,className:Y(["account-actions-address",["account-actions-address--viewall",r],["account-actions-address--address",!r],["account-actions-address--selectable",e],s]),"data-testid":"showRouteFullAddress",onClick:d,children:[n("span",{className:"account-actions-address__title","data-testid":"addressActionsText",children:f}),n(He,{source:r&&!a?Ft:xt,size:"32"})]})},Rt=({minifiedView:e,keysSortOrder:s,addressData:a,open:r,submitLoading:d,onRemoveAddress:o,closeModal:c})=>{const l=e?"minifiedView":"fullSizeView",i=ae({title:`Account.${l}.Addresses.removeAddressModal.title`,description:`Account.${l}.Addresses.removeAddressModal.description`,actionCancel:`Account.${l}.Addresses.removeAddressModal.actionCancel`,actionConfirm:`Account.${l}.Addresses.removeAddressModal.actionConfirm`});return r?n("div",{className:"account-address-modal",children:W(Ke,{className:"account-address-modal--overlay",title:n("h3",{children:i.title}),size:"full","data-testid":"addressModal",showCloseButton:!0,onClose:c,children:[d?n("div",{className:"account-address-modal__spinner","data-testid":"progressSpinner",children:n(Ye,{stroke:"4",size:"large"})}):null,n("p",{children:i.description}),n(ve,{minifiedView:e,addressData:a,keysSortOrder:s}),W("div",{className:"account-address-modal__buttons",children:[n(de,{type:"button",onClick:c,variant:"secondary",disabled:d,children:i.actionCancel}),n(de,{disabled:d,onClick:o,children:i.actionConfirm})]})]})}):null},wt=({typeList:e,isEmpty:s,minifiedView:a,className:r})=>{const d=a?"minifiedView":"fullSizeView",o=ae({addressesMessage:`Account.${d}.EmptyList.Addresses.message`,ordersListMessage:`Account.${d}.EmptyList.OrdersList.message`}),c=Me(()=>{switch(e){case"address":return{icon:Ot,text:n("p",{children:o.addressesMessage})};case"orders":return{icon:St,text:n("p",{children:o.ordersListMessage})};default:return{icon:"",text:""}}},[e,o]);return!s||!e||!c.text?null:n(Qe,{className:Y(["account-empty-list",a?"account-empty-list--minified":"",r]),message:c.text,icon:n(He,{source:c.icon}),"data-testid":"emptyList"})},Ht=async(e,s)=>{if(s.length===1){const c=s[0],i=Object.values(c.region).every(f=>!!f)?{}:{region:{...c.region,regionId:0}};return!!await Ce({addressId:Number(c==null?void 0:c.id),defaultShipping:!1,defaultBilling:!1,...i})}const a=s.filter(c=>c.id!==e&&(c.defaultBilling||c.defaultShipping)||c.id!==e),r=s[s.length-1],d=a[0]||((r==null?void 0:r.id)!==e?r:null);return!d||!d.id?!1:!!await Ce({addressId:+d.id,defaultShipping:!0,defaultBilling:!0})},Vt=["firstname","lastname","city","company","country_code","region","region_code","region_id","telephone","id","vat_id","postcode","street","street_multiline_2","default_shipping","default_billing","fax","prefix","suffix","middlename"],n1=["email","firstname","lastname","middlename","gender","dob","prefix","suffix","fax"],Pe=(e,s,a)=>{if(s&&a||!s&&!a)return e;const r=e.slice();return s?r.sort((d,o)=>Number(o.defaultShipping)-Number(d.defaultShipping)):a?r.sort((d,o)=>Number(o.defaultBilling)-Number(d.defaultBilling)):e},Ee=e=>e==null?!0:typeof e!="object"?!1:Object.keys(e).length===0||Object.values(e).every(Ee),Bt=({selectShipping:e,selectBilling:s,defaultSelectAddressId:a,onAddressData:r,minifiedView:d,routeAddressesPage:o,onSuccess:c})=>{const[l,i]=_(""),[u,f]=_(!1),[g,C]=_(!1),[O,L]=_(!1),[N,t]=_(!1),[p,m]=_(!1),[T,$]=_(""),[Z,k]=_([]),[S,R]=_([]),b=z(async()=>{L(!0),Promise.all([ze("shortRequest"),at()]).then(A=>{const[I,B]=A;if(I){const F=I.map(({name:H,orderNumber:te,label:re})=>({name:nt(H),orderNumber:te,label:Vt.includes(H)?null:re}));R(F)}if(B)if(d){const F=B.filter(H=>!!H.defaultShipping||!!H.defaultBilling);k(F)}else k(B)}).finally(()=>{L(!1)})},[d]);ee(()=>{b()},[b]),ee(()=>{var A;if(Z.length)if(a===0)m(!0),i("0");else{const I=Z.find(F=>+F.id===a)||Pe(Z,e,s)[0],B={data:ne(I),isDataValid:!Ee(I)};i(a.toString()||((A=I==null?void 0:I.id)==null?void 0:A.toString())),r==null||r(B)}},[Z,a,r,s,e]);const U=z(A=>{$(A),m(!1)},[]),P=z((A,I)=>{const B=(A==null?void 0:A.target).value,F=(A==null?void 0:A.target).nextSibling;i(B);const H={data:ne(I),isDataValid:!Ee(ne(I))};r==null||r(H),m(B==="0"),F&&(F.focus(),window.scrollBy(0,100))},[r]),V=z(()=>{C(!0)},[]),K=z(()=>{$(""),C(!1),f(!1)},[]),h=z(()=>{f(!0)},[]),v=z(async()=>{t(!0),await Ht(T,Z),dt(+T).then(()=>{b(),K()}).finally(()=>{t(!1)})},[Z,T,K,b]),y=z(()=>{m(!1)},[]),M=z(()=>{qe(o)&&d&&!p?window.location.href=o():(m(!0),$(""))},[p,o,d]),x=z(async()=>{await b(),await(c==null?void 0:c())},[b,c]);return{keysSortOrder:S,submitLoading:N,isModalRendered:u,isFormRendered:g,loading:O,addNewAddress:p,addressesList:Z,addressId:T,handleRenderForm:V,handleRenderModal:h,removeAddress:v,onCloseBtnClick:K,setEditingAddressId:U,closeNewAddressForm:y,redirectToAddressesRoute:M,handleOnSuccess:x,handleSelectAddressOption:P,selectedAddressOption:l}},d1=_e(({minifiedViewKey:e,hideActionFormButtons:s=!1,inputName:a,slots:r,title:d="",addressFormTitle:o="",defaultSelectAddressId:c="",showFormLoader:l=!1,onAddressData:i,forwardFormRef:u,className:f,showSaveCheckBox:g=!1,saveCheckBoxValue:C=!1,selectShipping:O=!1,selectBilling:L=!1,selectable:N=!1,withHeader:t=!0,minifiedView:p=!1,withActionsInMinifiedView:m=!1,withActionsInFullSizeView:T=!0,inputsDefaultValueSet:$,showShippingCheckBox:Z=!0,showBillingCheckBox:k=!0,shippingCheckBoxValue:S=!0,billingCheckBoxValue:R=!0,routeAddressesPage:b,onSuccess:U,onError:P})=>{const V=ae({containerTitle:`Account.${e}.Addresses.containerTitle`,differentAddressFormTitle:`Account.${e}.Addresses.differentAddressFormTitle`,editAddressFormTitle:`Account.${e}.Addresses.editAddressFormTitle`,viewAllAddressesButton:`Account.${e}.Addresses.viewAllAddressesButton`,newAddressFormTitle:`Account.${e}.Addresses.newAddressFormTitle`,ariaLabelAddressPicker:`Account.${e}.Addresses.ariaLabelAddressPicker`}),{keysSortOrder:K,submitLoading:h,isModalRendered:v,isFormRendered:y,loading:M,addNewAddress:x,addressesList:A,addressId:I,handleRenderForm:B,handleRenderModal:F,removeAddress:H,onCloseBtnClick:te,handleOnSuccess:re,setEditingAddressId:Le,closeNewAddressForm:oe,redirectToAddressesRoute:ce,handleSelectAddressOption:ie,selectedAddressOption:ue}=Bt({defaultSelectAddressId:c,minifiedView:p,routeAddressesPage:b,onSuccess:U,onAddressData:i,selectShipping:O,selectBilling:L}),E=d||V.containerTitle;let j=null;if(N){const w=Pe(A,O,L)||[];let G;x?G=n("div",{className:Y(["account-addresses-form__footer__wrapper",["account-addresses-form__footer__wrapper-show",x]]),children:n(fe,{slots:r,hideActionFormButtons:s,formName:a,showFormLoader:l,isOpen:x,forwardFormRef:u,showSaveCheckBox:g,saveCheckBoxValue:C,shippingCheckBoxValue:S,billingCheckBoxValue:R,addressesFormTitle:o||V.differentAddressFormTitle,inputsDefaultValueSet:$,showShippingCheckBox:Z,showBillingCheckBox:k,onCloseBtnClick:oe,onSuccess:re,onError:P,onChange:i})}):w.length?G=n(Fe,{selectable:N,minifiedView:p,addNewAddress:x,routeAddressesPage:ce}):G=null;const J=`generalLabel_${E.replace(/\s+/g,"")}`;j=W("div",{className:"account-addresses-wrapper--select-view",children:[n("span",{id:J,style:"display: none;",children:E}),w.map((q,ge)=>{const be=`${a}_${q.id}`,Ne=`${be}_label`;return W($e,{children:[n("input",{"data-testid":`radio-${ge+1}`,type:"radio",name:a,id:be,value:q.id,checked:ue===(q==null?void 0:q.id.toString()),onChange:We=>ie(We,q),"aria-labelledby":`${J} ${Ne}`}),n("label",{id:Ne,htmlFor:be,className:"account-addresses-wrapper__label",children:n(ve,{slots:r,selectable:N,selectShipping:O,selectBilling:L,minifiedView:p,addressData:q,keysSortOrder:K,loading:M})})]},q.id)}),n("input",{"aria-label":`${E} ${V.ariaLabelAddressPicker}`,"data-testid":"radio-0",type:"radio",name:a,id:`${a}_addressActions`,value:"0",checked:ue==="0",onChange:q=>ie(q,{}),tabindex:G?0:-1}),n("label",{htmlFor:`${a}_addressActions`,className:"account-addresses-wrapper__label",children:G})]})}else j=W(Q,{children:[A.map(w=>n($e,{children:I===w.id&&y?n(he,{variant:"secondary",style:{marginBottom:20},children:n(fe,{slots:r,isOpen:I===w.id&&y,addressFormId:I,inputsDefaultValueSet:w,addressesFormTitle:V.editAddressFormTitle,showShippingCheckBox:Z,showBillingCheckBox:k,shippingCheckBoxValue:S,billingCheckBoxValue:R,onCloseBtnClick:te,onSuccess:re,onError:P})}):n(ve,{slots:r,minifiedView:p,addressData:w,keysSortOrder:K,loading:M,setAddressId:Le,handleRenderModal:p&&m||!p&&T?F:void 0,handleRenderForm:p&&m||!p&&T?B:void 0},w.id)},w.id)),n("div",{className:"account-addresses__footer",children:x?n(he,{variant:"secondary",children:n(fe,{slots:r,isOpen:x,addressesFormTitle:V.newAddressFormTitle,inputsDefaultValueSet:$,showShippingCheckBox:!!(A!=null&&A.length),showBillingCheckBox:!!(A!=null&&A.length),shippingCheckBoxValue:S,billingCheckBoxValue:R,onCloseBtnClick:oe,onSuccess:re,onError:P})}):n(Fe,{minifiedView:p,addNewAddress:x,routeAddressesPage:ce})})]});return W("div",{children:[t?n(et,{title:E,divider:!p,className:p?"account-addresses-header":""}):null,W("div",{className:Y(["account-addresses-wrapper",f]),"data-testid":"addressesIdWrapper",children:[n(Rt,{minifiedView:p,addressData:A==null?void 0:A.find(w=>w.id===I),keysSortOrder:K,submitLoading:h,open:v,closeModal:te,onRemoveAddress:H}),M?n(Ue,{testId:"addressSkeletonLoader",withCard:!1}):N?n(fe,{slots:r,hideActionFormButtons:s,formName:a,isOpen:!(A!=null&&A.length),forwardFormRef:u,showSaveCheckBox:g,saveCheckBoxValue:C,shippingCheckBoxValue:S,billingCheckBoxValue:R,inputsDefaultValueSet:$,showShippingCheckBox:Z,showBillingCheckBox:k,onCloseBtnClick:oe,onSuccess:re,onError:P,onChange:i}):n(wt,{isEmpty:!(A!=null&&A.length),typeList:"address",minifiedView:p}),j]})]})}),je={entityType:"CUSTOMER_ADDRESS",isUnique:!1,options:[],multilineCount:0,validateRules:[],defaultValue:!1,fieldType:se.BOOLEAN,className:"",required:!1,orderNumber:90,isHidden:!1},zt={...je,label:"Set as default shipping address",name:"default_shipping",id:"default_shipping",code:"default_shipping",customUpperCode:"defaultShipping"},kt={...je,label:"Set as default billing address",name:"default_billing",id:"default_billing",code:"default_billing",customUpperCode:"defaultBilling"},qt=(e,s)=>s==null?void 0:s.map(a=>{const r={...e,firstName:e.firstname??e.firstName,lastName:e.lastname??e.lastName,middleName:e.middlename??e.middleName},d=JSON.parse(JSON.stringify(a));if(Object.hasOwn(r,a.customUpperCode)){const o=r[a.customUpperCode];a.customUpperCode==="region"&&typeof o=="object"?d.defaultValue=o.regionCode&&o.regionId?`${o.regionCode},${o.regionId}`:o.region??o.regionCode:d.defaultValue=o}return d}),Oe=e=>{if(!e)return null;const s=new FormData(e);if(e.querySelectorAll('input[type="checkbox"]').forEach(r=>{s.has(r.name)||s.set(r.name,"false"),r.checked&&s.set(r.name,"true")}),s&&typeof s.entries=="function"){const r=s.entries();if(r&&typeof r[Symbol.iterator]=="function")return JSON.parse(JSON.stringify(Object.fromEntries(r)))||{}}return{}},Ut=({fields:e,addressId:s,countryOptions:a,disableField:r,regionOptions:d,isRequiredRegion:o,isRequiredPostCode:c})=>e.filter(i=>!(s&&(i.customUpperCode==="defaultShipping"||i.customUpperCode==="defaultBilling")&&i.defaultValue)).map(i=>i.customUpperCode==="countryCode"?{...i,options:a,disabled:r}:i.customUpperCode==="postcode"?{...i,required:c}:i.customUpperCode==="region"?{...i,options:d,required:o,disabled:r}:i),Pt=(e,s="address")=>{const a=s==="address"?["region","city","company","countryCode","countryId","defaultBilling","defaultShipping","fax","firstName","lastName","middleName","postcode","prefix","street","suffix","telephone","vatId","addressId"]:["email","firstName","lastName","middleName","gender","dob","prefix","suffix","fax"],r={},d=[];return Object.keys(e).forEach(o=>{a.includes(o)?r[o]=e[o]:d.push({attribute_code:Be(o),value:e[o]})}),d.length>0&&(r.custom_attributesV2=d),r},Se=e=>{const s=["street","streetMultiline_1","streetMultiline_2"],a=["on","off","true","false"],r=[],d={};for(const L in e){const N=e[L];a.includes(N)&&(d[L]=ke(N)),s.includes(L)&&r.push(N)}const{street:o,streetMultiline_2:c,streetMultiline_1:l,region:i,...u}=e,[f,g]=i?i.split(","):[void 0,void 0],C=g&&f?{regionId:+g,regionCode:f}:{region:f};return Pt({...u,...d,region:{...C},street:r})},jt=(e,s)=>{const a={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const d=e[r];if(r==="region"&&d.regionId){const o=s.find(c=>(c==null?void 0:c.id)===d.regionId);o?a[r]={...d,text:o.text}:a[r]=d}else Array.isArray(d)?(a[r]=d[0]||"",d.slice(1).forEach((o,c)=>{a[`${r}Multiline_${c+2}`]=o})):a[r]=d}return a},Wt=(e,s)=>e&&Object.keys(e).length>0?e:s&&Object.keys(s).length>0?s:{},Gt=({showFormLoader:e,showSaveCheckBox:s,saveCheckBoxValue:a,addressFormId:r,billingCheckBoxValue:d,shippingCheckBoxValue:o,showShippingCheckBox:c,showBillingCheckBox:l,inputsDefaultValueSet:i,onCloseBtnClick:u,onSuccess:f,onError:g,formName:C})=>{const[O,L]=_({text:"",type:"success"}),[N,t]=_(e??!1),[p,m]=_(r||""),[T,$]=_([]),[Z,k]=_([]),[S,R]=_([]),[b,U]=_([]),[P,V]=_([]),[K,h]=_(!1),[v,y]=_(!1),[M,x]=_(()=>{var j,w;const E=sessionStorage.getItem(`${C}_addressData`);return E?{countryCode:(w=(j=JSON.parse(E))==null?void 0:j.data)==null?void 0:w.countryCode}:i}),[A,I]=_(!1),[B,F]=_(!1),[H,te]=_(()=>{var w,G;const E=sessionStorage.getItem(`${C}_addressData`);return E?(G=(w=JSON.parse(E))==null?void 0:w.data)==null?void 0:G.saveAddressBook:a}),re=z(E=>{te(E.target.checked)},[]);ee(()=>{typeof e>"u"||t(e)},[e]),ee(()=>{ze(p?"customer_address_edit":"customer_register_address").then(E=>{$(E)})},[p]),ee(()=>{I(!0),ot().then(({availableCountries:E,countriesWithRequiredRegion:j,optionalZipCountries:w})=>{k(E),U(j),V(w),I(!1)})},[]),ee(()=>{if(M!=null&&M.countryCode){I(!0),F(!0);const E=M==null?void 0:M.countryCode;lt(E).then(j=>{R(j);const w=b.find(J=>J===E),G=P.find(J=>J===E);h(!!w),y(!G),I(!1),F(!1)})}},[M==null?void 0:M.countryCode,b,P]);const Le=z(()=>{L({text:"",type:"success"}),u==null||u()},[u]),oe=z(async(E,j)=>{if(!j)return null;t(!0);const w=Oe(E.target),G=Se(w);await Ce(G).then(()=>{var J;f==null||f(),u==null||u(),(J=E==null?void 0:E.target)==null||J.reset()}).catch(J=>{L(q=>({...q,text:J.message,type:"error"})),g==null||g(J)}).finally(()=>{m(""),t(!1)})},[u,g,f]),ce=z(async(E,j)=>{if(!j)return;t(!0);const{saveAddressBook:w,...G}=Oe(E.target),J=Se(G);await ct(J).then(()=>{var q;f==null||f(),u==null||u(),(q=E==null?void 0:E.target)==null||q.reset()}).catch(q=>{L(ge=>({...ge,text:q.message,type:"error"})),g==null||g(q)}).finally(()=>{m(""),t(!1)})},[u,g,f]),ie=st(()=>{if(!T.length)return[];const E={...zt,defaultValue:o,isHidden:s&&!H?!0:!c},j={...kt,defaultValue:d,isHidden:s&&!H?!0:!l},w=[...T,E,j],G=sessionStorage.getItem(`${C}_addressData`),J=G?jt(JSON.parse(G).data,S):{},q=qt(Wt(J,i),w);return Ut({fields:q,addressId:p,countryOptions:Z,disableField:A,regionOptions:S,isRequiredRegion:K,isRequiredPostCode:v})},[T,o,s,H,c,d,l,C,S,i,p,Z,A,K,v]),ue=z(E=>{x(j=>({...j,...E}))},[]);return{isWaitingForResponse:B,regionOptions:S,saveCheckBoxAddress:H,inLineAlert:O,addressId:p,submitLoading:N,normalizeFieldsConfig:ie,handleSaveCheckBoxAddress:re,handleUpdateAddress:oe,handleCreateAddress:ce,handleOnCloseForm:Le,handleInputChange:ue}},Jt=e=>{var d;if(!e||!Array.isArray(e.customAttributes))return e??{};const s={};(d=e==null?void 0:e.customAttributes)==null||d.forEach(o=>{o.code&&Object.hasOwn(o,"value")&&(s[o.code]=o.value)});const{customAttributes:a,...r}=e;return{...r,...Ve(s,"camelCase",{})}},Xt=({hideActionFormButtons:e,formName:s="",showFormLoader:a=!1,showSaveCheckBox:r=!1,saveCheckBoxValue:d=!1,forwardFormRef:o,slots:c,addressesFormTitle:l,className:i,addressFormId:u,inputsDefaultValueSet:f,showShippingCheckBox:g=!0,showBillingCheckBox:C=!0,shippingCheckBoxValue:O=!0,billingCheckBoxValue:L=!0,isOpen:N,onSubmit:t,onCloseBtnClick:p,onSuccess:m,onError:T,onChange:$})=>{const Z=ae({secondaryButton:"Account.AddressForm.formText.secondaryButton",primaryButton:"Account.AddressForm.formText.primaryButton",saveAddressBook:"Account.AddressForm.formText.saveAddressBook"}),{isWaitingForResponse:k,inLineAlert:S,addressId:R,submitLoading:b,normalizeFieldsConfig:U,handleUpdateAddress:P,handleCreateAddress:V,handleOnCloseForm:K,handleSaveCheckBoxAddress:h,saveCheckBoxAddress:v,handleInputChange:y,regionOptions:M}=Gt({showFormLoader:a,addressFormId:u,inputsDefaultValueSet:Jt(f),shippingCheckBoxValue:O,billingCheckBoxValue:L,showShippingCheckBox:g,showBillingCheckBox:C,saveCheckBoxValue:d,showSaveCheckBox:r,onSuccess:m,onError:T,onCloseBtnClick:p,formName:s});return N?W("div",{className:Y(["account-address-form-wrapper",i]),children:[l?n("div",{className:"account-address-form-wrapper__title","data-testid":"addressesFormTitle",children:l}):null,S.text?n(tt,{"data-testid":"inLineAlert",className:"account-address-form-wrapper__notification",type:S.type,variant:"secondary",heading:S.text,icon:S.icon}):null,W(It,{regionOptions:M,forwardFormRef:o,slots:c,className:"account-address-form",name:s||"addressesForm",fieldsConfig:U,onSubmit:t||(R?P:V),setInputChange:y,loading:b,showFormLoader:a,showSaveCheckBox:r,handleSaveCheckBoxAddress:h,saveCheckBoxAddress:v,onChange:$,isWaitingForResponse:k,children:[R?n("input",{type:"hidden",name:"addressId",value:R,"data-testid":"hidden_test_id"}):null,e?null:n("div",{className:Y(["dropin-field account-address-form-wrapper__buttons",["account-address-form-wrapper__buttons--empty",r]]),children:c!=null&&c.AddressFormActions?n(Ae,{"data-testid":"addressFormActions",name:"AddressFormActions",slot:c.AddressFormActions,context:{handleUpdateAddress:P,handleCreateAddress:V,addressId:R}}):n(Q,{children:r?null:W(Q,{children:[n(de,{type:"button",onClick:K,variant:"secondary",disabled:b,children:Z.secondaryButton}),n(de,{disabled:b,children:Z.primaryButton})]})})})]})]}):null};export{fe as A,Ue as C,wt as E,It as F,Ft as S,d1 as a,qe as c,n1 as d,Oe as g,Pt as n}; diff --git a/scripts/__dropins__/storefront-account/chunks/getOrderHistoryList.js b/scripts/__dropins__/storefront-account/chunks/getOrderHistoryList.js index bb5909ad2a..03cf3ffe70 100644 --- a/scripts/__dropins__/storefront-account/chunks/getOrderHistoryList.js +++ b/scripts/__dropins__/storefront-account/chunks/getOrderHistoryList.js @@ -1,6 +1,6 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{t as h,k as d,f as A,l as C}from"./removeCustomerAddress.js";import{c as I}from"./getStoreConfig.js";import"@dropins/tools/event-bus.js";import{merge as M}from"@dropins/tools/lib.js";import{ADDRESS_FRAGMENT as N,ORDER_SUMMARY_FRAGMENT as $}from"../fragments.js";const b=(t,e="en-US",a={})=>{const r={...{day:"2-digit",month:"2-digit",year:"numeric"},...a},n=new Date(t);return isNaN(n.getTime())?"Invalid Date":new Intl.DateTimeFormat(e,r).format(n)},G=t=>{var c,_,l,u,f,g,p,R,S,E,s,O;if(!((_=(c=t.data)==null?void 0:c.customer)!=null&&_.orders))return null;const{page_info:e,total_count:a,date_of_first_order:i}=t.data.customer.orders,r=((u=(l=t==null?void 0:t.data)==null?void 0:l.customer)==null?void 0:u.returns)??[],m={items:(((p=(g=(f=t==null?void 0:t.data)==null?void 0:f.customer)==null?void 0:g.orders)==null?void 0:p.items)??[]).map(o=>{var T;const D={...o,returns:(T=r==null?void 0:r.items)==null?void 0:T.filter(y=>y.order.id===o.id),order_date:b(o.order_date),shipping_address:h(o.shipping_address),billing_address:h(o.billing_address)};return d(D,"camelCase",{})}),pageInfo:d(e,"camelCase",{}),totalCount:d(a,"camelCase",{}),dateOfFirstOrder:d(i,"camelCase",{})};return M(m,(O=(s=(E=(S=(R=I)==null?void 0:R.getConfig())==null?void 0:S.models)==null?void 0:E.OrderHistoryModel)==null?void 0:s.transformer)==null?void 0:O.call(s,t.data))},F=` +import{t as H,f as Y,k as j}from"./removeCustomerAddress.js";import{c as J}from"./getStoreConfig.js";import"@dropins/tools/event-bus.js";import{merge as K}from"@dropins/tools/lib.js";import{ADDRESS_FRAGMENT as Q,ORDER_SUMMARY_FRAGMENT as B}from"../fragments.js";const V=(a,o="en-US",s={})=>{const d={...{day:"2-digit",month:"2-digit",year:"numeric"},...s},u=new Date(a);return isNaN(u.getTime())?"Invalid Date":new Intl.DateTimeFormat(o,d).format(u)},_={value:0,currency:"USD"},W=a=>{var o,s,c,d,u,g,f,n,l;return{subtotal:((o=a==null?void 0:a.total)==null?void 0:o.subtotal)??_,grandTotal:((s=a==null?void 0:a.total)==null?void 0:s.grand_total)??_,totalGiftcard:((c=a==null?void 0:a.total)==null?void 0:c.total_giftcard)??_,subtotalExclTax:((d=a==null?void 0:a.total)==null?void 0:d.subtotal_excl_tax)??_,subtotalInclTax:((u=a==null?void 0:a.total)==null?void 0:u.subtotal_incl_tax)??_,taxes:((g=a==null?void 0:a.total)==null?void 0:g.taxes)??[],totalTax:((f=a==null?void 0:a.total)==null?void 0:f.total_tax)??_,totalShipping:((n=a==null?void 0:a.total)==null?void 0:n.total_shipping)??_,discounts:((l=a==null?void 0:a.total)==null?void 0:l.discounts)??[]}},X=a=>{var d,u,g,f,n,l,p,h,S,y,T,E,R,O,D,b,A,I,M,k,x,N,q,G,$,C,F,v,i,z;if(!((u=(d=a.data)==null?void 0:d.customer)!=null&&u.orders))return null;const o=((f=(g=a==null?void 0:a.data)==null?void 0:g.customer)==null?void 0:f.returns)??[],c={items:(((p=(l=(n=a==null?void 0:a.data)==null?void 0:n.customer)==null?void 0:l.orders)==null?void 0:p.items)??[]).map(r=>{var P;return{items:r==null?void 0:r.items.map(t=>{var U,w,L;return{status:(t==null?void 0:t.status)??"",productName:(t==null?void 0:t.product_name)??"",id:t==null?void 0:t.id,quantityOrdered:(t==null?void 0:t.quantity_ordered)??0,quantityShipped:(t==null?void 0:t.quantity_shipped)??0,quantityInvoiced:(t==null?void 0:t.quantity_invoiced)??0,product:{sku:((U=t==null?void 0:t.product)==null?void 0:U.sku)??"",urlKey:(t==null?void 0:t.product.url_key)??"",smallImage:{url:((L=(w=t==null?void 0:t.product)==null?void 0:w.small_image)==null?void 0:L.url)??""}}}}),token:r==null?void 0:r.token,email:r==null?void 0:r.email,shippingMethod:r==null?void 0:r.shipping_method,paymentMethods:(r==null?void 0:r.payment_methods)??[],shipments:(r==null?void 0:r.shipments)??[],id:r==null?void 0:r.id,carrier:r==null?void 0:r.carrier,status:r==null?void 0:r.status,number:r==null?void 0:r.number,returns:(P=o==null?void 0:o.items)==null?void 0:P.filter(t=>t.order.id===r.id),orderDate:V(r.order_date),shippingAddress:H(r.shipping_address),billingAddress:H(r.billing_address),total:W(r)}}),pageInfo:{pageSize:((T=(y=(S=(h=a==null?void 0:a.data)==null?void 0:h.customer)==null?void 0:S.orders)==null?void 0:y.page_info)==null?void 0:T.page_size)??10,totalPages:((D=(O=(R=(E=a==null?void 0:a.data)==null?void 0:E.customer)==null?void 0:R.orders)==null?void 0:O.page_info)==null?void 0:D.total_pages)??1,currentPage:((M=(I=(A=(b=a==null?void 0:a.data)==null?void 0:b.customer)==null?void 0:A.orders)==null?void 0:I.page_info)==null?void 0:M.current_page)??1},totalCount:((N=(x=(k=a==null?void 0:a.data)==null?void 0:k.customer)==null?void 0:x.orders)==null?void 0:N.total_count)??0,dateOfFirstOrder:(($=(G=(q=a==null?void 0:a.data)==null?void 0:q.customer)==null?void 0:G.orders)==null?void 0:$.date_of_first_order)??""};return K(c,(z=(i=(v=(F=(C=J)==null?void 0:C.getConfig())==null?void 0:F.models)==null?void 0:v.OrderHistoryModel)==null?void 0:i.transformer)==null?void 0:z.call(i,a.data))},Z=` query GET_CUSTOMER_ORDERS_LIST( $currentPage: Int $pageSize: Int @@ -80,6 +80,6 @@ import{t as h,k as d,f as A,l as C}from"./removeCustomerAddress.js";import{c as } } } - ${N} - ${$} -`,k={sort_direction:"DESC",sort_field:"CREATED_AT"},z=async(t,e,a)=>{const i=e.includes("viewAll")?{}:{order_date:JSON.parse(e)};return await A(F,{method:"GET",cache:"no-cache",variables:{pageSize:t,currentPage:a,filter:i,sort:k}}).then(r=>G(r)).catch(C)};export{z as g}; + ${Q} + ${B} +`,m={sort_direction:"DESC",sort_field:"CREATED_AT"},ua=async(a,o,s)=>{const c=o.includes("viewAll")?{}:{order_date:JSON.parse(o)};return await Y(Z,{method:"GET",cache:"no-cache",variables:{pageSize:a,currentPage:s,filter:c,sort:m}}).then(d=>X(d)).catch(j)};export{ua as g}; diff --git a/scripts/__dropins__/storefront-account/chunks/getStoreConfig.js b/scripts/__dropins__/storefront-account/chunks/getStoreConfig.js index de40cc9465..8ad4b72dca 100644 --- a/scripts/__dropins__/storefront-account/chunks/getStoreConfig.js +++ b/scripts/__dropins__/storefront-account/chunks/getStoreConfig.js @@ -1,12 +1,13 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{Initializer as f}from"@dropins/tools/lib.js";import{f as h,m as _,l as m}from"./removeCustomerAddress.js";const c=new f({init:async t=>{const r={authHeaderConfig:{header:"Authorization",tokenPrefix:"Bearer"}};c.config.setConfig({...r,...t})},listeners:()=>[]}),C=c.config,g=t=>{var r,a,i,e,o,n;return{baseMediaUrl:(a=(r=t==null?void 0:t.data)==null?void 0:r.storeConfig)==null?void 0:a.base_media_url,minLength:+((e=(i=t==null?void 0:t.data)==null?void 0:i.storeConfig)==null?void 0:e.minimum_password_length)||3,requiredCharacterClasses:+((n=(o=t==null?void 0:t.data)==null?void 0:o.storeConfig)==null?void 0:n.required_character_classes_number)||0}},l=` +import{Initializer as d}from"@dropins/tools/lib.js";import{f as h,l as g,k as l}from"./removeCustomerAddress.js";const _=new d({init:async t=>{const a={authHeaderConfig:{header:"Authorization",tokenPrefix:"Bearer"}};_.config.setConfig({...a,...t})},listeners:()=>[]}),G=_.config,m=t=>{var a,r,i,o,e,c,n,f;return{baseMediaUrl:(r=(a=t==null?void 0:t.data)==null?void 0:a.storeConfig)==null?void 0:r.base_media_url,minLength:+((o=(i=t==null?void 0:t.data)==null?void 0:i.storeConfig)==null?void 0:o.minimum_password_length)||3,requiredCharacterClasses:+((c=(e=t==null?void 0:t.data)==null?void 0:e.storeConfig)==null?void 0:c.required_character_classes_number)||0,storeCode:((f=(n=t==null?void 0:t.data)==null?void 0:n.storeConfig)==null?void 0:f.store_code)??""}},u=` query GET_STORE_CONFIG { storeConfig { base_media_url autocomplete_on_storefront minimum_password_length required_character_classes_number + store_code } } -`,s=async()=>await h(l,{method:"GET",cache:"force-cache"}).then(t=>{var r;return(r=t.errors)!=null&&r.length?_(t.errors):g(t)}).catch(m);export{C as c,s as g,c as i}; +`,b=async()=>await h(u,{method:"GET",cache:"force-cache"}).then(t=>{var a;return(a=t.errors)!=null&&a.length?g(t.errors):m(t)}).catch(l);export{G as c,b as g,_ as i}; diff --git a/scripts/__dropins__/storefront-account/chunks/removeCustomerAddress.js b/scripts/__dropins__/storefront-account/chunks/removeCustomerAddress.js index acb1d2cdb3..de9db772ec 100644 --- a/scripts/__dropins__/storefront-account/chunks/removeCustomerAddress.js +++ b/scripts/__dropins__/storefront-account/chunks/removeCustomerAddress.js @@ -1,6 +1,6 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{events as b}from"@dropins/tools/event-bus.js";import{FetchGraphQL as C}from"@dropins/tools/fetch-graphql.js";const S=t=>t.replace(/_([a-z])/g,(n,e)=>e.toUpperCase()),p=t=>t.replace(/([A-Z])/g,n=>`_${n.toLowerCase()}`),g=(t,n,e)=>{const r=["string","boolean","number"],o=n==="camelCase"?S:p;return Array.isArray(t)?t.map(i=>r.includes(typeof i)||i===null?i:typeof i=="object"?g(i,n,e):i):t!==null&&typeof t=="object"?Object.entries(t).reduce((i,[c,a])=>{const u=e&&e[c]?e[c]:o(c);return i[u]=r.includes(typeof a)||a===null?a:g(a,n,e),i},{}):t},{setEndpoint:k,setFetchGraphQlHeader:H,removeFetchGraphQlHeader:J,setFetchGraphQlHeaders:K,fetchGraphQl:s,getConfig:L}=new C().getMethods(),T=` +import{events as b}from"@dropins/tools/event-bus.js";import{FetchGraphQL as E}from"@dropins/tools/fetch-graphql.js";const m=t=>t.replace(/_([a-z])/g,(r,n)=>n.toUpperCase()),S=t=>t.replace(/([A-Z])/g,r=>`_${r.toLowerCase()}`),h=(t,r,n)=>{const o=["string","boolean","number"],u=r==="camelCase"?m:S;return Array.isArray(t)?t.map(i=>o.includes(typeof i)||i===null?i:typeof i=="object"?h(i,r,n):i):t!==null&&typeof t=="object"?Object.entries(t).reduce((i,[c,a])=>{const e=n&&n[c]?n[c]:u(c);return i[e]=o.includes(typeof a)||a===null?a:h(a,r,n),i},{}):t},{setEndpoint:Q,setFetchGraphQlHeader:j,removeFetchGraphQlHeader:k,setFetchGraphQlHeaders:J,fetchGraphQl:s,getConfig:K}=new E().getMethods(),p=` query GET_ATTRIBUTES_FORM($formCode: String!) { attributesForm(formCode: $formCode) { items { @@ -32,7 +32,7 @@ import{events as b}from"@dropins/tools/event-bus.js";import{FetchGraphQL as C}fr } } } -`,A=` +`,C=` query GET_ATTRIBUTES_FORM_SHORT { attributesForm(formCode: "customer_register_address") { items { @@ -46,13 +46,13 @@ import{events as b}from"@dropins/tools/event-bus.js";import{FetchGraphQL as C}fr } } } -`,_=t=>{throw t instanceof DOMException&&t.name==="AbortError"||b.emit("error",{source:"auth",type:"network",error:t}),t},f=t=>{const n=t.map(e=>e.message).join(" ");throw Error(n)},y=t=>{let n=[];for(const e of t)if(!(e.frontend_input!=="MULTILINE"||e.multiline_count<2))for(let r=2;r<=e.multiline_count;r++){const o={...e,is_required:!1,name:`${e.code}_multiline_${r}`,code:`${e.code}_multiline_${r}`,id:`${e.code}_multiline_${r}`};n.push(o)}return n},R=t=>{var i,c,a;const n=((c=(i=t==null?void 0:t.data)==null?void 0:i.attributesForm)==null?void 0:c.items)||[];if(!n.length)return[];const e=(a=n.filter(u=>{var l;return!((l=u.frontend_input)!=null&&l.includes("HIDDEN"))}))==null?void 0:a.map(({code:u,...l})=>{const m=u!=="country_id"?u:"country_code";return{...l,name:m,id:m,code:m}}),r=y(e);return e.concat(r).map(u=>{var E;const l=u.code==="middlename"?"middleName":u.code==="firstname"?"firstName":u.code==="lastname"?"lastName":S(u.code),m=(E=u.options)==null?void 0:E.map(h=>({isDefault:h.is_default,text:h.label,value:h.value}));return g({...u,options:m,customUpperCode:l},"camelCase",{frontend_input:"fieldType",frontend_class:"className",is_required:"required",sort_order:"orderNumber"})}).sort((u,l)=>u.orderNumber-l.orderNumber)},v=t=>{const n={};for(const e in t){const r=t[e];!Array.isArray(r)||r.length===0||(e==="custom_attributesV2"?r.forEach(o=>{typeof o=="object"&&"value"in o&&(n[o==null?void 0:o.code]=o==null?void 0:o.value)}):r.length>1?r.forEach((o,i)=>{i===0?n[e]=o:n[`${e}_multiline_${i+1}`]=o}):n[e]=r[0])}return n},N=t=>({prefix:(t==null?void 0:t.prefix)??"",suffix:(t==null?void 0:t.suffix)??"",firstname:(t==null?void 0:t.firstname)??"",lastname:(t==null?void 0:t.lastname)??"",middlename:(t==null?void 0:t.middlename)??""}),O=t=>({id:(t==null?void 0:t.id)??"",vat_id:(t==null?void 0:t.vat_id)??"",postcode:(t==null?void 0:t.postcode)??"",country_code:(t==null?void 0:t.country_code)??""}),I=t=>({company:(t==null?void 0:t.company)??"",telephone:(t==null?void 0:t.telephone)??"",fax:(t==null?void 0:t.fax)??""}),$=t=>{var e,r,o;return g({...N(t),...O(t),...I(t),city:(t==null?void 0:t.city)??"",region:{region:((e=t==null?void 0:t.region)==null?void 0:e.region)??"",region_code:((r=t==null?void 0:t.region)==null?void 0:r.region_code)??"",region_id:((o=t==null?void 0:t.region)==null?void 0:o.region_id)??""},default_shipping:(t==null?void 0:t.default_shipping)||!1,default_billing:(t==null?void 0:t.default_billing)||!1,...v(t)},"camelCase",{})},G=t=>{var r,o;const n=((o=(r=t==null?void 0:t.data)==null?void 0:r.customer)==null?void 0:o.addresses)||[];return n.length?n.map($).sort((i,c)=>(Number(c.defaultBilling)||Number(c.defaultShipping))-(Number(i.defaultBilling)||Number(i.defaultShipping))):[]},M=t=>{var c,a;if(!((a=(c=t==null?void 0:t.data)==null?void 0:c.countries)!=null&&a.length))return{availableCountries:[],countriesWithRequiredRegion:[],optionalZipCountries:[]};const{countries:n,storeConfig:e}=t.data,r=e==null?void 0:e.countries_with_required_region.split(","),o=e==null?void 0:e.optional_zip_countries.split(",");return{availableCountries:n.filter(({two_letter_abbreviation:u,full_name_locale:l})=>!!(u&&l)).map(u=>{const{two_letter_abbreviation:l,full_name_locale:m}=u;return{value:l,text:m}}).sort((u,l)=>u.text.localeCompare(l.text)),countriesWithRequiredRegion:r,optionalZipCountries:o}},U=t=>{var e,r;return(r=(e=t==null?void 0:t.data)==null?void 0:e.country)!=null&&r.available_regions?t.data.country.available_regions.filter(o=>{if(!o)return!1;const{id:i,code:c,name:a}=o;return!!(i&&c&&a)}).map(o=>{const{id:i}=o;return{id:i,text:o.name,value:`${o.code},${o.id}`}}):[]},P=async t=>{const n=`_account_attributesForm_${t}`,e=sessionStorage.getItem(n);return e?JSON.parse(e):await s(t!=="shortRequest"?T:A,{method:"GET",cache:"force-cache",variables:{formCode:t}}).then(r=>{var i;if((i=r.errors)!=null&&i.length)return f(r.errors);const o=R(r);return sessionStorage.setItem(n,JSON.stringify(o)),o}).catch(_)},w=` +`,f=t=>{throw t instanceof DOMException&&t.name==="AbortError"||b.emit("error",{source:"auth",type:"network",error:t}),t},_=t=>{const r=t.map(n=>n.message).join(" ");throw Error(r)},T=t=>{let r=[];for(const n of t)if(!(n.frontend_input!=="MULTILINE"||n.multiline_count<2))for(let o=2;o<=n.multiline_count;o++){const u={...n,is_required:!1,name:`${n.code}_multiline_${o}`,code:`${n.code}_multiline_${o}`,id:`${n.code}_multiline_${o}`};r.push(u)}return r},y=t=>{switch(t){case"middlename":return"middleName";case"firstname":return"firstName";case"lastname":return"lastName";default:return m(t)}},A=t=>{var r;return t!=null&&t.options?(r=t==null?void 0:t.options)==null?void 0:r.map(n=>({isDefault:(n==null?void 0:n.is_default)??!1,text:(n==null?void 0:n.label)??"",value:(n==null?void 0:n.value)??""})):[]},R=t=>{var i,c,a;const r=((c=(i=t==null?void 0:t.data)==null?void 0:i.attributesForm)==null?void 0:c.items)||[];if(!r.length)return[];const n=(a=r.filter(e=>{var l;return!((l=e.frontend_input)!=null&&l.includes("HIDDEN"))}))==null?void 0:a.map(({code:e,...l})=>{const g=e!=="country_id"?e:"country_code";return{...l,name:g,id:g,code:g}}),o=T(n);return n.concat(o).map(e=>({code:e==null?void 0:e.code,name:e==null?void 0:e.name,id:e==null?void 0:e.id,label:(e==null?void 0:e.label)??"",entityType:e==null?void 0:e.entity_type,className:(e==null?void 0:e.frontend_class)??"",defaultValue:(e==null?void 0:e.default_value)??"",fieldType:e==null?void 0:e.frontend_input,multilineCount:(e==null?void 0:e.multiline_count)??0,orderNumber:Number(e==null?void 0:e.sort_order)||0,isHidden:!1,isUnique:(e==null?void 0:e.is_unique)??!1,required:(e==null?void 0:e.is_required)??!1,validateRules:(e==null?void 0:e.validate_rules)??[],options:A(e),customUpperCode:y(e==null?void 0:e.code)})).sort((e,l)=>Number(e.orderNumber)-Number(l.orderNumber))},v=t=>{const r={};for(const n in t){const o=t[n];!Array.isArray(o)||o.length===0||(n==="custom_attributesV2"?o.forEach(u=>{typeof u=="object"&&"value"in u&&(r[u==null?void 0:u.code]=u==null?void 0:u.value)}):o.length>1?o.forEach((u,i)=>{i===0?r[n]=u:r[`${n}_multiline_${i+1}`]=u}):r[n]=o[0])}return r},N=t=>({prefix:(t==null?void 0:t.prefix)??"",suffix:(t==null?void 0:t.suffix)??"",firstname:(t==null?void 0:t.firstname)??"",lastname:(t==null?void 0:t.lastname)??"",middlename:(t==null?void 0:t.middlename)??""}),O=t=>({id:(t==null?void 0:t.id)??"",vat_id:(t==null?void 0:t.vat_id)??"",postcode:(t==null?void 0:t.postcode)??"",country_code:(t==null?void 0:t.country_code)??""}),I=t=>({company:(t==null?void 0:t.company)??"",telephone:(t==null?void 0:t.telephone)??"",fax:(t==null?void 0:t.fax)??""}),$=t=>{var n,o,u;return h({...N(t),...O(t),...I(t),city:(t==null?void 0:t.city)??"",region:{region:((n=t==null?void 0:t.region)==null?void 0:n.region)??"",region_code:((o=t==null?void 0:t.region)==null?void 0:o.region_code)??"",region_id:((u=t==null?void 0:t.region)==null?void 0:u.region_id)??""},default_shipping:(t==null?void 0:t.default_shipping)||!1,default_billing:(t==null?void 0:t.default_billing)||!1,...v(t)},"camelCase",{})},U=t=>{var o,u;const r=((u=(o=t==null?void 0:t.data)==null?void 0:o.customer)==null?void 0:u.addresses)||[];return r.length?r.map($).sort((i,c)=>(Number(c.defaultBilling)||Number(c.defaultShipping))-(Number(i.defaultBilling)||Number(i.defaultShipping))):[]},G=t=>{var c,a;if(!((a=(c=t==null?void 0:t.data)==null?void 0:c.countries)!=null&&a.length))return{availableCountries:[],countriesWithRequiredRegion:[],optionalZipCountries:[]};const{countries:r,storeConfig:n}=t.data,o=n==null?void 0:n.countries_with_required_region.split(","),u=n==null?void 0:n.optional_zip_countries.split(",");return{availableCountries:r.filter(({two_letter_abbreviation:e,full_name_locale:l})=>!!(e&&l)).map(e=>{const{two_letter_abbreviation:l,full_name_locale:g}=e;return{value:l,text:g}}).sort((e,l)=>e.text.localeCompare(l.text)),countriesWithRequiredRegion:o,optionalZipCountries:u}},M=t=>{var n,o;return(o=(n=t==null?void 0:t.data)==null?void 0:n.country)!=null&&o.available_regions?t.data.country.available_regions.filter(u=>{if(!u)return!1;const{id:i,code:c,name:a}=u;return!!(i&&c&&a)}).map(u=>{const{id:i}=u;return{id:i,text:u.name,value:`${u.code},${u.id}`}}):[]},L=async t=>{const r=`_account_attributesForm_${t}`,n=sessionStorage.getItem(r);return n?JSON.parse(n):await s(t!=="shortRequest"?p:C,{method:"GET",cache:"force-cache",variables:{formCode:t}}).then(o=>{var i;if((i=o.errors)!=null&&i.length)return _(o.errors);const u=R(o);return sessionStorage.setItem(r,JSON.stringify(u)),u}).catch(f)},w=` mutation CREATE_CUSTOMER_ADDRESS($input: CustomerAddressInput!) { createCustomerAddress(input: $input) { firstname } } -`,d=async t=>await s(w,{method:"POST",variables:{input:g(t,"snakeCase",{custom_attributesV2:"custom_attributesV2",firstName:"firstname",lastName:"lastname",middleName:"middlename"})}}).then(n=>{var e,r,o;return(e=n.errors)!=null&&e.length?f(n.errors):((o=(r=n==null?void 0:n.data)==null?void 0:r.createCustomerAddress)==null?void 0:o.firstname)||""}).catch(_),x=` +`,P=async t=>await s(w,{method:"POST",variables:{input:h(t,"snakeCase",{custom_attributesV2:"custom_attributesV2",firstName:"firstname",lastName:"lastname",middleName:"middlename"})}}).then(r=>{var n,o,u;return(n=r.errors)!=null&&n.length?_(r.errors):((u=(o=r==null?void 0:r.data)==null?void 0:o.createCustomerAddress)==null?void 0:u.firstname)||""}).catch(f),q=` query GET_CUSTOMER_ADDRESS { customer { addresses { @@ -86,7 +86,7 @@ import{events as b}from"@dropins/tools/event-bus.js";import{FetchGraphQL as C}fr } } } -`,z=async()=>await s(x,{method:"GET",cache:"no-cache"}).then(t=>{var n;return(n=t.errors)!=null&&n.length?f(t.errors):G(t)}).catch(_),F=` +`,z=async()=>await s(q,{method:"GET",cache:"no-cache"}).then(t=>{var r;return(r=t.errors)!=null&&r.length?_(t.errors):U(t)}).catch(f),x=` query GET_COUNTRIES_QUERY { countries { two_letter_abbreviation @@ -97,7 +97,7 @@ import{events as b}from"@dropins/tools/event-bus.js";import{FetchGraphQL as C}fr optional_zip_countries } } -`,Z=async()=>{const t="_account_countries",n=sessionStorage.getItem(t);return n?JSON.parse(n):await s(F,{method:"GET",cache:"no-cache"}).then(e=>{var o;if((o=e.errors)!=null&&o.length)return f(e.errors);const r=M(e);return sessionStorage.setItem(t,JSON.stringify(r)),r}).catch(_)},q=` +`,Z=async()=>{const t="_account_countries",r=sessionStorage.getItem(t);return r?JSON.parse(r):await s(x,{method:"GET",cache:"no-cache"}).then(n=>{var u;if((u=n.errors)!=null&&u.length)return _(n.errors);const o=G(n);return sessionStorage.setItem(t,JSON.stringify(o)),o}).catch(f)},F=` query GET_REGIONS($countryCode: String!) { country(id: $countryCode) { id @@ -108,14 +108,14 @@ import{events as b}from"@dropins/tools/event-bus.js";import{FetchGraphQL as C}fr } } } -`,W=async t=>{const n=`_account_regions_${t}`,e=sessionStorage.getItem(n);return e?JSON.parse(e):await s(q,{method:"GET",cache:"no-cache",variables:{countryCode:t}}).then(r=>{var i;if((i=r.errors)!=null&&i.length)return f(r.errors);const o=U(r);return sessionStorage.setItem(n,JSON.stringify(o)),o}).catch(_)},V=` +`,W=async t=>{const r=`_account_regions_${t}`,n=sessionStorage.getItem(r);return n?JSON.parse(n):await s(F,{method:"GET",cache:"no-cache",variables:{countryCode:t}}).then(o=>{var i;if((i=o.errors)!=null&&i.length)return _(o.errors);const u=M(o);return sessionStorage.setItem(r,JSON.stringify(u)),u}).catch(f)},d=` mutation UPDATE_CUSTOMER_ADDRESS($id: Int!, $input: CustomerAddressInput) { updateCustomerAddress(id: $id, input: $input) { firstname } } -`,Y=async t=>{const{addressId:n,...e}=t;return n?await s(V,{method:"POST",variables:{id:n,input:g(e,"snakeCase",{custom_attributesV2:"custom_attributesV2",firstName:"firstname",lastName:"lastname",middleName:"middlename"})}}).then(r=>{var o,i,c;return(o=r.errors)!=null&&o.length?f(r.errors):((c=(i=r==null?void 0:r.data)==null?void 0:i.updateCustomerAddress)==null?void 0:c.firstname)||""}).catch(_):""},B=` +`,Y=async t=>{const{addressId:r,...n}=t;return r?await s(d,{method:"POST",variables:{id:r,input:h(n,"snakeCase",{custom_attributesV2:"custom_attributesV2",firstName:"firstname",lastName:"lastname",middleName:"middlename"})}}).then(o=>{var u,i,c;return(u=o.errors)!=null&&u.length?_(o.errors):((c=(i=o==null?void 0:o.data)==null?void 0:i.updateCustomerAddress)==null?void 0:c.firstname)||""}).catch(f):""},V=` mutation REMOVE_CUSTOMER_ADDRESS($id: Int!) { deleteCustomerAddress(id: $id) } -`,X=async t=>await s(B,{method:"POST",variables:{id:t}}).then(n=>{var e;return(e=n.errors)!=null&&e.length?f(n.errors):n.data.deleteCustomerAddress}).catch(_);export{H as a,K as b,P as c,d,z as e,s as f,L as g,Z as h,W as i,X as j,g as k,_ as l,f as m,S as n,p as o,J as r,k as s,$ as t,Y as u}; +`,X=async t=>await s(V,{method:"POST",variables:{id:t}}).then(r=>{var n;return(n=r.errors)!=null&&n.length?_(r.errors):r.data.deleteCustomerAddress}).catch(f);export{j as a,J as b,L as c,P as d,z as e,s as f,K as g,Z as h,W as i,X as j,f as k,_ as l,m,h as n,S as o,k as r,Q as s,$ as t,Y as u}; diff --git a/scripts/__dropins__/storefront-account/chunks/updateCustomer.js b/scripts/__dropins__/storefront-account/chunks/updateCustomer.js index d8a07a8c88..40311cc701 100644 --- a/scripts/__dropins__/storefront-account/chunks/updateCustomer.js +++ b/scripts/__dropins__/storefront-account/chunks/updateCustomer.js @@ -1,6 +1,6 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{n as y,f as l,m as C,l as o,k as x}from"./removeCustomerAddress.js";import{BASIC_CUSTOMER_INFO_FRAGMENT as F}from"../fragments.js";import{c as V}from"./getStoreConfig.js";import"@dropins/tools/event-bus.js";import{merge as k}from"@dropins/tools/lib.js";const B=t=>{var r,u,i,d,h,E,_,f,S,T,w,g,O,P,e,A,M,U,R,N,b,$,G,v,c,D;const m=(i=(u=(r=t==null?void 0:t.data)==null?void 0:r.customer)==null?void 0:u.custom_attributes)==null?void 0:i.reduce((I,n)=>(I[y(n.code)]=n.value??"",I),{}),a={email:((h=(d=t==null?void 0:t.data)==null?void 0:d.customer)==null?void 0:h.email)||"",firstName:((_=(E=t==null?void 0:t.data)==null?void 0:E.customer)==null?void 0:_.firstname)||"",lastName:((S=(f=t==null?void 0:t.data)==null?void 0:f.customer)==null?void 0:S.lastname)||"",middleName:((w=(T=t==null?void 0:t.data)==null?void 0:T.customer)==null?void 0:w.middlename)||"",gender:((O=(g=t==null?void 0:t.data)==null?void 0:g.customer)==null?void 0:O.gender)||"1",dateOfBirth:((e=(P=t==null?void 0:t.data)==null?void 0:P.customer)==null?void 0:e.date_of_birth)||"",prefix:((M=(A=t==null?void 0:t.data)==null?void 0:A.customer)==null?void 0:M.prefix)||"",suffix:((R=(U=t==null?void 0:t.data)==null?void 0:U.customer)==null?void 0:R.suffix)||"",createdAt:((b=(N=t==null?void 0:t.data)==null?void 0:N.customer)==null?void 0:b.created_at)||"",...m};return k(a,(D=(c=(v=(G=($=V)==null?void 0:$.getConfig())==null?void 0:G.models)==null?void 0:v.CustomerDataModelShort)==null?void 0:c.transformer)==null?void 0:D.call(c,t.data))},L=` +import{m as y,f as C,l as o,k as h,n as x}from"./removeCustomerAddress.js";import{BASIC_CUSTOMER_INFO_FRAGMENT as F}from"../fragments.js";import{c as V}from"./getStoreConfig.js";import"@dropins/tools/event-bus.js";import{merge as k}from"@dropins/tools/lib.js";const B=t=>{var r,u,i,d,_,f,E,S,T,w,e,g,O,P,A,M,U,R,b,N,$,G,v,D,c,I;const m=(i=(u=(r=t==null?void 0:t.data)==null?void 0:r.customer)==null?void 0:u.custom_attributes)==null?void 0:i.filter(l=>l).reduce((l,n)=>(l[y(n.code)]=n.value??"",l),{}),a={email:((_=(d=t==null?void 0:t.data)==null?void 0:d.customer)==null?void 0:_.email)||"",firstName:((E=(f=t==null?void 0:t.data)==null?void 0:f.customer)==null?void 0:E.firstname)||"",lastName:((T=(S=t==null?void 0:t.data)==null?void 0:S.customer)==null?void 0:T.lastname)||"",middleName:((e=(w=t==null?void 0:t.data)==null?void 0:w.customer)==null?void 0:e.middlename)||"",gender:((O=(g=t==null?void 0:t.data)==null?void 0:g.customer)==null?void 0:O.gender)||"1",dateOfBirth:((A=(P=t==null?void 0:t.data)==null?void 0:P.customer)==null?void 0:A.date_of_birth)||"",prefix:((U=(M=t==null?void 0:t.data)==null?void 0:M.customer)==null?void 0:U.prefix)||"",suffix:((b=(R=t==null?void 0:t.data)==null?void 0:R.customer)==null?void 0:b.suffix)||"",createdAt:(($=(N=t==null?void 0:t.data)==null?void 0:N.customer)==null?void 0:$.created_at)||"",...m};return k(a,(I=(c=(D=(v=(G=V)==null?void 0:G.getConfig())==null?void 0:v.models)==null?void 0:D.CustomerDataModelShort)==null?void 0:c.transformer)==null?void 0:I.call(c,t.data))},L=` query GET_CUSTOMER { customer { ...BASIC_CUSTOMER_INFO_FRAGMENT @@ -14,7 +14,7 @@ import{n as y,f as l,m as C,l as o,k as x}from"./removeCustomerAddress.js";impor } } ${F} -`,X=async()=>await l(L,{method:"GET",cache:"no-cache"}).then(t=>{var m;return(m=t.errors)!=null&&m.length?C(t.errors):B(t)}).catch(o),H=` +`,X=async()=>await C(L,{method:"GET",cache:"no-cache"}).then(t=>{var m;return(m=t.errors)!=null&&m.length?o(t.errors):B(t)}).catch(h),H=` mutation CHANGE_CUSTOMER_PASSWORD( $currentPassword: String! $newPassword: String! @@ -26,7 +26,7 @@ import{n as y,f as l,m as C,l as o,k as x}from"./removeCustomerAddress.js";impor email } } -`,Y=async({currentPassword:t,newPassword:m})=>await l(H,{method:"POST",variables:{currentPassword:t,newPassword:m}}).then(a=>{var r,u,i;return(r=a.errors)!=null&&r.length?C(a.errors):((i=(u=a==null?void 0:a.data)==null?void 0:u.changeCustomerPassword)==null?void 0:i.email)||""}).catch(o),W=` +`,Y=async({currentPassword:t,newPassword:m})=>await C(H,{method:"POST",variables:{currentPassword:t,newPassword:m}}).then(a=>{var r,u,i;return(r=a.errors)!=null&&r.length?o(a.errors):((i=(u=a==null?void 0:a.data)==null?void 0:u.changeCustomerPassword)==null?void 0:i.email)||""}).catch(h),W=` mutation UPDATE_CUSTOMER_EMAIL($email: String!, $password: String!) { updateCustomerEmail(email: $email, password: $password) { customer { @@ -34,7 +34,7 @@ import{n as y,f as l,m as C,l as o,k as x}from"./removeCustomerAddress.js";impor } } } -`,Z=async({email:t,password:m})=>await l(W,{method:"POST",variables:{email:t,password:m}}).then(a=>{var r,u,i,d;return(r=a.errors)!=null&&r.length?C(a.errors):((d=(i=(u=a==null?void 0:a.data)==null?void 0:u.updateCustomerEmail)==null?void 0:i.customer)==null?void 0:d.email)||""}).catch(o),q=` +`,Z=async({email:t,password:m})=>await C(W,{method:"POST",variables:{email:t,password:m}}).then(a=>{var r,u,i,d;return(r=a.errors)!=null&&r.length?o(a.errors):((d=(i=(u=a==null?void 0:a.data)==null?void 0:u.updateCustomerEmail)==null?void 0:i.customer)==null?void 0:d.email)||""}).catch(h),q=` mutation UPDATE_CUSTOMER_V2($input: CustomerUpdateInput!) { updateCustomerV2(input: $input) { customer { @@ -42,4 +42,4 @@ import{n as y,f as l,m as C,l as o,k as x}from"./removeCustomerAddress.js";impor } } } -`,s=async t=>await l(q,{method:"POST",variables:{input:x(t,"snakeCase",{firstName:"firstname",lastName:"lastname",middleName:"middlename",custom_attributesV2:"custom_attributes"})}}).then(m=>{var a,r,u,i;return(a=m.errors)!=null&&a.length?C(m.errors):((i=(u=(r=m==null?void 0:m.data)==null?void 0:r.updateCustomerV2)==null?void 0:u.customer)==null?void 0:i.email)||""}).catch(o);export{Z as a,s as b,X as g,Y as u}; +`,s=async t=>await C(q,{method:"POST",variables:{input:x(t,"snakeCase",{firstName:"firstname",lastName:"lastname",middleName:"middlename",dob:"date_of_birth",custom_attributesV2:"custom_attributes"})}}).then(m=>{var a,r,u,i;return(a=m.errors)!=null&&a.length?o(m.errors):((i=(u=(r=m==null?void 0:m.data)==null?void 0:r.updateCustomerV2)==null?void 0:u.customer)==null?void 0:i.email)||""}).catch(h);export{Z as a,s as b,X as g,Y as u}; diff --git a/scripts/__dropins__/storefront-account/components/AccountLoaders/index.d.ts b/scripts/__dropins__/storefront-account/components/AccountLoaders/index.d.ts index 61d90f7838..a7f89c2f0a 100644 --- a/scripts/__dropins__/storefront-account/components/AccountLoaders/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/AccountLoaders/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './AccountLoaders'; export { CardLoader as default } from './AccountLoaders'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/AddressActions/index.d.ts b/scripts/__dropins__/storefront-account/components/AddressActions/index.d.ts index 5cb0b6873d..5b029d8d28 100644 --- a/scripts/__dropins__/storefront-account/components/AddressActions/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/AddressActions/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './AddressActions'; export { AddressActions as default } from './AddressActions'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/AddressCard/index.d.ts b/scripts/__dropins__/storefront-account/components/AddressCard/index.d.ts index ffd76356c9..5136ea8562 100644 --- a/scripts/__dropins__/storefront-account/components/AddressCard/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/AddressCard/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './AddressCard'; export { AddressCard as default } from './AddressCard'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/AddressFormWrapper/index.d.ts b/scripts/__dropins__/storefront-account/components/AddressFormWrapper/index.d.ts index db1b4b9120..3a88e645c4 100644 --- a/scripts/__dropins__/storefront-account/components/AddressFormWrapper/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/AddressFormWrapper/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './AddressFormWrapper'; export { AddressFormWrapper as default } from './AddressFormWrapper'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/AddressModal/index.d.ts b/scripts/__dropins__/storefront-account/components/AddressModal/index.d.ts index e779c49609..c59a42a705 100644 --- a/scripts/__dropins__/storefront-account/components/AddressModal/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/AddressModal/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './AddressModal'; export { AddressModal as default } from './AddressModal'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/AddressesWrapper/index.d.ts b/scripts/__dropins__/storefront-account/components/AddressesWrapper/index.d.ts index f93b3ecf6e..2413feb561 100644 --- a/scripts/__dropins__/storefront-account/components/AddressesWrapper/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/AddressesWrapper/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './AddressesWrapper'; export { AddressesWrapper as default } from './AddressesWrapper'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/ChangePassword/ChangePassword.d.ts b/scripts/__dropins__/storefront-account/components/ChangePassword/ChangePassword.d.ts index 9ef25dd3a0..8c5f1771c1 100644 --- a/scripts/__dropins__/storefront-account/components/ChangePassword/ChangePassword.d.ts +++ b/scripts/__dropins__/storefront-account/components/ChangePassword/ChangePassword.d.ts @@ -1,5 +1,8 @@ import { FunctionComponent } from 'preact'; -import { ChangePasswordProps } from '../../types'; +import { ChangePasswordProps, ValidateLengthConfigProps } from '../../types'; +export declare const getErrorMessage: (isValidUniqueSymbols: string, defaultLengthMessage: ValidateLengthConfigProps | undefined, isSubmit: boolean, newPassword: string, passwordErrors: { + newPassword: string; +}) => string | undefined; export declare const ChangePassword: FunctionComponent; //# sourceMappingURL=ChangePassword.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/ChangePassword/index.d.ts b/scripts/__dropins__/storefront-account/components/ChangePassword/index.d.ts index 3a99538223..629d6a2a21 100644 --- a/scripts/__dropins__/storefront-account/components/ChangePassword/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/ChangePassword/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './ChangePassword'; export { ChangePassword as default } from './ChangePassword'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/CustomerInformationCard/index.d.ts b/scripts/__dropins__/storefront-account/components/CustomerInformationCard/index.d.ts index 76e5ae48fa..7ba5197c87 100644 --- a/scripts/__dropins__/storefront-account/components/CustomerInformationCard/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/CustomerInformationCard/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './CustomerInformationCard'; export { CustomerInformationCard as default } from './CustomerInformationCard'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/EditCustomerInformation/index.d.ts b/scripts/__dropins__/storefront-account/components/EditCustomerInformation/index.d.ts index 083691b625..df0735bb86 100644 --- a/scripts/__dropins__/storefront-account/components/EditCustomerInformation/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/EditCustomerInformation/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './EditCustomerInformation'; export { EditCustomerInformation as default } from './EditCustomerInformation'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/EmptyList/index.d.ts b/scripts/__dropins__/storefront-account/components/EmptyList/index.d.ts index fe530e4f6b..4195a350c8 100644 --- a/scripts/__dropins__/storefront-account/components/EmptyList/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/EmptyList/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './EmptyList'; export { EmptyList as default } from './EmptyList'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/Form/FormInputs/index.d.ts b/scripts/__dropins__/storefront-account/components/Form/FormInputs/index.d.ts index 4bb7b35a49..54b79b72a3 100644 --- a/scripts/__dropins__/storefront-account/components/Form/FormInputs/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/Form/FormInputs/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './FormInputs'; export { FormInputs as default } from './FormInputs'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/Form/index.d.ts b/scripts/__dropins__/storefront-account/components/Form/index.d.ts index 4ba0696ed0..bd2037d0c8 100644 --- a/scripts/__dropins__/storefront-account/components/Form/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/Form/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './Form'; export { Form as default } from './Form'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/OrdersListAction/index.d.ts b/scripts/__dropins__/storefront-account/components/OrdersListAction/index.d.ts index a22f5b33bb..9be9f07757 100644 --- a/scripts/__dropins__/storefront-account/components/OrdersListAction/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/OrdersListAction/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrdersListAction'; export { OrdersListAction as default } from './OrdersListAction'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/OrdersListCard/index.d.ts b/scripts/__dropins__/storefront-account/components/OrdersListCard/index.d.ts index f55059aaa7..7d05198651 100644 --- a/scripts/__dropins__/storefront-account/components/OrdersListCard/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/OrdersListCard/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrdersListCard'; export { OrdersListCard as default } from './OrdersListCard'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/OrdersListWrapper/index.d.ts b/scripts/__dropins__/storefront-account/components/OrdersListWrapper/index.d.ts index bf64a0f6e7..e9f5ebc42f 100644 --- a/scripts/__dropins__/storefront-account/components/OrdersListWrapper/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/OrdersListWrapper/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrdersListWrapper'; export { OrdersListWrapper as default } from './OrdersListWrapper'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/components/index.d.ts b/scripts/__dropins__/storefront-account/components/index.d.ts index 20afdd32d1..881f335ea6 100644 --- a/scripts/__dropins__/storefront-account/components/index.d.ts +++ b/scripts/__dropins__/storefront-account/components/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from '../containers/AddressForm'; export * from './Form'; export * from './Form/FormInputs'; diff --git a/scripts/__dropins__/storefront-account/configs/defaultAttributePreset.config.d.ts b/scripts/__dropins__/storefront-account/configs/defaultAttributePreset.config.d.ts index 7ea53390e1..7ed78ae4d7 100644 --- a/scripts/__dropins__/storefront-account/configs/defaultAttributePreset.config.d.ts +++ b/scripts/__dropins__/storefront-account/configs/defaultAttributePreset.config.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const defaultAttributePreset: string[]; export declare const defaultAccountAttributePreset: string[]; //# sourceMappingURL=defaultAttributePreset.config.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/configs/mockDefaultAddress.config.d.ts b/scripts/__dropins__/storefront-account/configs/mockDefaultAddress.config.d.ts index e1e41541a6..d435257b5e 100644 --- a/scripts/__dropins__/storefront-account/configs/mockDefaultAddress.config.d.ts +++ b/scripts/__dropins__/storefront-account/configs/mockDefaultAddress.config.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const mockResponseInputFieldsList: ({ default_value: null; entity_type: string; diff --git a/scripts/__dropins__/storefront-account/configs/mockOrdersList.config.d.ts b/scripts/__dropins__/storefront-account/configs/mockOrdersList.config.d.ts index 188b0ae57d..ba46cd05ee 100644 --- a/scripts/__dropins__/storefront-account/configs/mockOrdersList.config.d.ts +++ b/scripts/__dropins__/storefront-account/configs/mockOrdersList.config.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const mockOrdersListResponse: { customer: { orders: { @@ -23,7 +39,6 @@ export declare const mockOrdersListResponse: { region_code: string; region_id: string; }; - shipments: never[]; telephone: string; id: string; vat_id: string; @@ -124,7 +139,6 @@ export declare const mockOrdersListResponse: { default_shipping: boolean; default_billing: boolean; custom_attributesV2: never[]; - shipments?: undefined; }; billing_address: { firstname: string; diff --git a/scripts/__dropins__/storefront-account/containers/AddressForm.js b/scripts/__dropins__/storefront-account/containers/AddressForm.js index 9284ac8a3d..142654d804 100644 --- a/scripts/__dropins__/storefront-account/containers/AddressForm.js +++ b/scripts/__dropins__/storefront-account/containers/AddressForm.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ 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}; diff --git a/scripts/__dropins__/storefront-account/containers/AddressForm/index.d.ts b/scripts/__dropins__/storefront-account/containers/AddressForm/index.d.ts index b11bcf9e75..bdc92b5aa9 100644 --- a/scripts/__dropins__/storefront-account/containers/AddressForm/index.d.ts +++ b/scripts/__dropins__/storefront-account/containers/AddressForm/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './AddressForm'; export { AddressForm as default } from './AddressForm'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/containers/Addresses.js b/scripts/__dropins__/storefront-account/containers/Addresses.js index 836ce978cc..4cd11b8950 100644 --- a/scripts/__dropins__/storefront-account/containers/Addresses.js +++ b/scripts/__dropins__/storefront-account/containers/Addresses.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -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}; +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}; diff --git a/scripts/__dropins__/storefront-account/containers/Addresses/index.d.ts b/scripts/__dropins__/storefront-account/containers/Addresses/index.d.ts index 9bd7cef2fe..e0e2a075a5 100644 --- a/scripts/__dropins__/storefront-account/containers/Addresses/index.d.ts +++ b/scripts/__dropins__/storefront-account/containers/Addresses/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './Addresses'; export { Addresses as default } from './Addresses'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/containers/CustomerInformation.js b/scripts/__dropins__/storefront-account/containers/CustomerInformation.js index db9bbfacd8..03ed904d0a 100644 --- a/scripts/__dropins__/storefront-account/containers/CustomerInformation.js +++ b/scripts/__dropins__/storefront-account/containers/CustomerInformation.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -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{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}; +import{jsxs as L,jsx as d,Fragment as he}from"@dropins/tools/preact-jsx-runtime.js";import{classes as ne,Slot as ge}from"@dropins/tools/lib.js";import{F as we,d as Ce,g as Pe,n as ee,C as pe}from"../chunks/CustomerInformationCard.js";import*as V from"@dropins/tools/preact-compat.js";import{Card as X,Header as Q,InLineAlert as oe,InputPassword as R,Button as B}from"@dropins/tools/components.js";import{useState as m,useEffect as U,useCallback as C,useMemo as G}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import{g as Ee}from"../chunks/getStoreConfig.js";import{u as be,g as Ve,b as re,a as ye}from"../chunks/updateCustomer.js";import{useText as x}from"@dropins/tools/i18n.js";import{c as Ie}from"../chunks/removeCustomerAddress.js";import"@dropins/tools/preact.js";import"../fragments.js";import"@dropins/tools/fetch-graphql.js";const _e=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)"})))),ve=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"})),Le=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"})),Fe=e=>({firstName:e.firstName,lastName:e.lastName,emailAddress:(e==null?void 0:e.email)||"",accountId:(e==null?void 0:e.email)||""}),Ne=()=>{const[e,r]=m(null);return U(()=>{const n=sessionStorage.getItem("accountStoreConfig"),t=n?JSON.parse(n):null;if(t){const{minLength:o,requiredCharacterClasses:s}=t;r({minLength:o,requiredCharacterClasses:s})}else Ee().then(o=>{if(o){const{minLength:s,requiredCharacterClasses:P}=o;sessionStorage.setItem("accountStoreConfig",JSON.stringify(o)),r({minLength:s,requiredCharacterClasses:P})}})},[]),{passwordConfigs:e}},Ae=({currentPassword:e,newPassword:r,confirmPassword:n,translations:t})=>{let o={...K};const s=!e.length&&!r.length&&!n.length,P=e.length&&r!==n;return s?(o={...o,currentPassword:t.requiredFieldError,newPassword:t.requiredFieldError,confirmPassword:t.requiredFieldError},{isValid:!1,errors:o}):e.length?r.length?n.length?P?(o={...o,currentPassword:"",newPassword:"",confirmPassword:t.passwordMismatch},{isValid:!1,errors:o}):{isValid:!0,errors:o}:(o={...o,confirmPassword:t.requiredFieldError},{isValid:!1,errors:o}):(o={...o,newPassword:t.requiredFieldError},{isValid:!1,errors:o}):(o={...o,currentPassword:t.requiredFieldError},{isValid:!1,errors:o})},ae=(e,r)=>{if(r<=1)return!0;const n=/[0-9]/.test(e)?1:0,t=/[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+t+o+s>=r},K={currentPassword:"",newPassword:"",confirmPassword:""},Se=({passwordConfigs:e,handleSetInLineAlert:r,handleHideChangePassword:n})=>{const t=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,u]=m(!1),[c,p]=m(""),[h,l]=m(""),[F,y]=m(""),[I,E]=m({currentPassword:"",newPassword:"",confirmPassword:""}),i=C(()=>{n(()=>{r({}),E(K)})},[n,r]),A=C(f=>{p(f),E(b=>({...b,currentPassword:f?"":t.requiredFieldError}))},[t]),w=C(f=>{l(f),E(b=>({...b,newPassword:f?"":t.requiredFieldError}))},[t]),H=C(f=>{y(f),E(b=>({...b,confirmPassword:f?"":t.requiredFieldError}))},[t]),N=C(f=>{const{name:b,value:$}=f==null?void 0:f.target;E(_=>({..._,[b]:$?"":t.requiredFieldError}))},[t]),O=C(()=>{const{isValid:f,errors:b}=Ae({currentPassword:c,newPassword:h,confirmPassword:F,translations:t});return E(b),f},[c,h,F,t]),Z=C(f=>{f.preventDefault(),u(!0);const b=(e==null?void 0:e.requiredCharacterClasses)??0,$=(e==null?void 0:e.minLength)??1;if(!O()){s(!0),u(!1);return}if(!ae(h,b)||$>(h==null?void 0:h.length)){s(!0),u(!1);return}be({currentPassword:c,newPassword:h}).then(_=>{if(!(_!=null&&_.length)){u(!1);return}p(""),l(""),y(""),E(K),s(!1),r({type:"success",text:t.passwordUpdateMessage})}).catch(_=>{_.message==="Invalid login or password."&&r({type:"error",text:t.incorrectCurrentPassword}),_.message==="The account is locked."&&r({type:"error",text:_.message})}),u(!1)},[e,O,h,c,r,t]);return{hideChangePassword:i,handleOnBlurPassword:N,handleConfirmPasswordChange:H,handleNewPasswordChange:w,handleCurrentPasswordChange:A,mutationChangePassword:Z,currentPassword:c,newPassword:h,confirmPassword:F,passwordErrors:I,submitLoading:P,isClickSubmit:o}},Te=({passwordConfigs:e,isClickSubmit:r,password:n})=>{const t=x({messageLengthPassword:"Account.minifiedView.CustomerInformation.changePassword.passwordValidationMessage.messageLengthPassword"}),[o,s]=m("pending");U(()=>{if(!e)return;const u=ae(n,e.requiredCharacterClasses);r&&n.length>0?s(u?"success":"error"):r&&n.length===0?s("pending"):s(u?"success":"pending")},[r,e,n]);const P=G(()=>{var c;if(!e)return;const u={status:"pending",icon:"pending",message:(c=t.messageLengthPassword)==null?void 0:c.replace("{minLength}",`${e.minLength}`)};return n.length&&n.length>=e.minLength?{...u,icon:"success",status:"success"}:n.length&&n.lengthe==="error"||(r==null?void 0:r.status)==="error"||n&&t.trim().length===0?o.newPassword:void 0,qe=({handleHideChangePassword:e,handleSetInLineAlert:r,inLineAlertProps:n})=>{const{passwordConfigs:t}=Ne(),{hideChangePassword:o,handleOnBlurPassword:s,handleConfirmPasswordChange:P,handleNewPasswordChange:u,handleCurrentPasswordChange:c,mutationChangePassword:p,currentPassword:h,newPassword:l,confirmPassword:F,passwordErrors:y,submitLoading:I,isClickSubmit:E}=Se({passwordConfigs:t,handleSetInLineAlert:r,handleHideChangePassword:e}),{isValidUniqueSymbols:i,defaultLengthMessage:A}=Te({password:l,isClickSubmit:E,passwordConfigs:t}),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(X,{className:"account-change-password",variant:"secondary",children:[d(Q,{title:w.containerTitle,divider:!1,className:"account-change-password__title"}),n.text?d(oe,{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:t==null?void 0:t.minLength,validateLengthConfig:A,uniqueSymbolsStatus:i,requiredCharacterClasses:t==null?void 0:t.requiredCharacterClasses,errorMessage:Me(i,A,E,l,y),defaultValue:l,onValue:u,onBlur:s}),d(R,{className:"account-change-password__fields-item",autoComplete:"confirmPassword",name:"confirmPassword",placeholder:w.confirmPasswordPlaceholder,floatingLabel:w.confirmPasswordFloatingLabel,errorMessage:y.confirmPassword,defaultValue:F,onValue:P,onBlur:s})]}),L("div",{className:"account-change-password__actions",children:[d(B,{type:"button",disabled:I,onClick:o,variant:"secondary",children:w.buttonSecondary}),d(B,{variant:"primary",type:"button",disabled:I,onClick:p,children:w.buttonPrimary})]})]})},ke=({inLineAlertProps:e,errorPasswordEmpty:r,passwordValue:n,showPasswordOnEmailChange:t,submitLoading:o,formFieldsList:s,handleHideEditForm:P,handleUpdateCustomerInformation:u,handleInputChange:c,handleSetPassword:p,handleOnBlurPassword:h})=>{const l=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(X,{variant:"secondary",className:"account-edit-customer-information",children:[d(Q,{title:l.containerTitle,divider:!1,className:"account-edit-customer-information__title"}),e.text?d(oe,{className:"account-edit-customer-information__notification",type:e.type,variant:"secondary",heading:e.text,icon:e.icon,"data-testid":"editCustomerInLineAlert"}):null,L(we,{loading:o,fieldsConfig:s||[],name:"editCustomerInformation",className:"account-edit-customer-information-form",onSubmit:u,setInputChange:c,children:[t?d("div",{className:"account-edit-customer-information__password",children:d(R,{autoComplete:"password",name:"password",placeholder:l.placeholder,floatingLabel:l.floatingLabel,errorMessage:r?l.requiredFieldError:void 0,defaultValue:n,onValue:p,onBlur:h})}):null,L("div",{className:"account-edit-customer-information__actions",children:[d(B,{disabled:o,type:"button",variant:"secondary",onClick:()=>P(),children:l.buttonSecondary}),d(B,{disabled:o,type:"submit",variant:"primary",children:l.buttonPrimary})]})]})]})},xe=({createdAt:e,slots:r,orderedCustomerData:n,showEditForm:t,showChangePassword:o,handleShowChangePassword:s,handleShowEditForm:P})=>{const u=x({buttonSecondary:"Account.minifiedView.CustomerInformation.customerInformationCard.buttonSecondary",buttonPrimary:"Account.minifiedView.CustomerInformation.customerInformationCard.buttonPrimary",accountCreation:"Account.minifiedView.CustomerInformation.customerInformationCard.accountCreation"});return d(X,{variant:"secondary",className:ne(["account-customer-information-card",["account-customer-information-card-short",o||t]]),children:L("div",{className:"account-customer-information-card__wrapper",children:[L("div",{className:"account-customer-information-card__actions",children:[d(B,{type:"button",variant:"tertiary",onClick:s,children:u.buttonSecondary}),d(B,{type:"button",variant:"tertiary",onClick:P,children:u.buttonPrimary})]}),d("div",{className:"account-customer-information-card__content",children:r!=null&&r.CustomerData?d(ge,{name:"CustomerData",slot:r==null?void 0:r.CustomerData,context:{customerData:n}}):L(he,{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:[u.accountCreation,": ",e]})]})})]})})},Oe=e=>{if(!(e!=null&&e.dateOfBirth))return e;const{dateOfBirth:r,...n}=e;return{...n,dob:r}},Ue="accountContext";var k=(e=>(e.EDIT_ACCOUNT_EVENT="edit-account",e))(k||{});const Be={EDIT_ACCOUNT_EVENT:"edit-account"};function se(){return window.adobeDataLayer=window.adobeDataLayer||[],window.adobeDataLayer}function He(e,r){const n=se();n.push({[e]:null}),n.push({[e]:r})}function Ze(e,r){se().push(t=>{const o=t.getState?t.getState():{};t.push({event:e,eventInfo:{...o,...r}})})}function $e(e){const r=Fe(e);He(Ue,r),Ze(Be.EDIT_ACCOUNT_EVENT)}const te=(e,r)=>{const n=sessionStorage.getItem("accountStoreConfig"),o={...n?JSON.parse(n):{},...r};switch(e){case"edit-account":$e(o);break;default:return null}},ze=({handleSetInLineAlert:e})=>{const r=x({accountSuccess:"Account.minifiedView.CustomerInformation.editCustomerInformation.accountSuccess",accountError:"Account.minifiedView.CustomerInformation.editCustomerInformation.accountError",genderMale:"Account.minifiedView.CustomerInformation.genderMale",genderFemale:"Account.minifiedView.CustomerInformation.genderFemale"}),[n,t]=m(!0),[o,s]=m(!1),[P,u]=m(!1),[c,p]=m(!1),[h,l]=m(!1),[F,y]=m(!1),[I,E]=m([]),[i,A]=m(null),[w,H]=m([]),[N,O]=m({}),[Z,f]=m(""),[b,$]=m(""),_=C(a=>{const{value:g}=a==null?void 0:a.target;g.length&&l(!1),g.length||l(!0)},[]),S=C(a=>{f(a)},[]),ie=C(a=>{O(a)},[]),ce=C(()=>{u(!0),p(!1),e(),S("")},[e,S]),de=C(a=>{a==null||a(),u(!1)},[]),ue=C(()=>{p(!0),u(!1),e(),S("")},[e,S]),le=C(a=>{a==null||a(),p(!1)},[]),T=C((a,g)=>{a==="success"?e({type:"success",text:g??r.accountSuccess}):a==="error"?e({type:"error",text:g??r.accountError}):e(),s(!1)},[e,r]),j=C(()=>{Ve().then(a=>{var v;const g=(v=a==null?void 0:a.createdAt)==null?void 0:v.split(" ")[0],W=Oe({...a,gender:a.gender===1?r.genderMale:r.genderFemale});A(W),$(g)})},[r.genderFemale,r.genderMale]);U(()=>{j()},[]),U(()=>{Ie("customer_account_edit").then(a=>{H(a);const g=a.map(({name:W,customUpperCode:v,orderNumber:M,label:D})=>({name:v,orderNumber:M,label:Ce.includes(W)?null:D}));E(g)})},[]),U(()=>{N.email&&N.email!==(i==null?void 0:i.email)?y(!0):N.email&&N.email===(i==null?void 0:i.email)&&y(!1)},[i==null?void 0:i.email,N]);const z=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]);U(()=>{z!=null&&z.length&&t(!1)},[z]);const me=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]),fe=C(async(a,g)=>{const W=Pe(a.target),{email:v,password:M,...D}=W,Y=v!==(i==null?void 0:i.email)&&M.length===0;if(!g){Y&&l(!0);return}if(l(!1),s(!0),v===(i==null?void 0:i.email)){S(""),re(ee(D,"account")).then(q=>{q&&(j(),T("success"),te(k==null?void 0:k.EDIT_ACCOUNT_EVENT,{...i}))}).catch(q=>{T("error",q.message)});return}if(Y){l(!0),s(!1);return}v!=null&&v.length&&(M!=null&&M.length)&&ye({email:v,password:M}).then(q=>{q&&re(ee(D,"account")).then(J=>{J&&(j(),T("success"),te(k==null?void 0:k.EDIT_ACCOUNT_EVENT,{...i}))}).catch(J=>{T("error",J.message)})}).catch(q=>{T("error",q.message)})},[i,S,j,T]);return{createdAt:b,errorPasswordEmpty:h,passwordValue:Z,showPasswordOnEmailChange:F,orderedCustomerData:z,loading:n,normalizeFieldsConfig:me,submitLoading:o,showEditForm:c,showChangePassword:P,handleShowChangePassword:ce,handleHideChangePassword:de,handleShowEditForm:ue,handleHideEditForm:le,handleUpdateCustomerInformation:fe,handleInputChange:ie,handleSetPassword:S,handleOnBlurPassword:_,renderAlertMessage:T}},We={success:d(ve,{}),warning:d(_e,{}),error:d(Le,{})},je=()=>{const[e,r]=m({}),n=C(t=>{if(!(t!=null&&t.type)){r({});return}const o=We[t.type];r({...t,icon:o})},[]);return{inLineAlertProps:e,handleSetInLineAlert:n}},ar=({className:e,withHeader:r=!0,slots:n})=>{const t=x({containerTitle:"Account.minifiedView.CustomerInformation.containerTitle"}),{inLineAlertProps:o,handleSetInLineAlert:s}=je(),{createdAt:P,errorPasswordEmpty:u,passwordValue:c,showPasswordOnEmailChange:p,orderedCustomerData:h,loading:l,normalizeFieldsConfig:F,submitLoading:y,showEditForm:I,showChangePassword:E,handleShowChangePassword:i,handleHideChangePassword:A,handleShowEditForm:w,handleHideEditForm:H,handleUpdateCustomerInformation:N,handleInputChange:O,handleSetPassword:Z,handleOnBlurPassword:f}=ze({handleSetInLineAlert:s});return l?d("div",{"data-testid":"customerInformationLoader",children:d(pe,{withCard:!0})}):L("div",{className:ne(["account-customer-information",e]),children:[r?d(Q,{title:t.containerTitle,divider:!1,className:"customer-information__title"}):null,d(xe,{createdAt:P,slots:n,orderedCustomerData:h,showEditForm:I,showChangePassword:E,handleShowChangePassword:i,handleShowEditForm:w}),E?d(qe,{inLineAlertProps:o,handleSetInLineAlert:s,handleHideChangePassword:A}):null,I?d(ke,{inLineAlertProps:o,submitLoading:y,formFieldsList:F,errorPasswordEmpty:u,passwordValue:c,showPasswordOnEmailChange:p,handleSetPassword:Z,handleOnBlurPassword:f,handleUpdateCustomerInformation:N,handleHideEditForm:H,handleInputChange:O}):null]})};export{ar as CustomerInformation,ar as default}; diff --git a/scripts/__dropins__/storefront-account/containers/CustomerInformation/index.d.ts b/scripts/__dropins__/storefront-account/containers/CustomerInformation/index.d.ts index 2909b12625..bae4d805a7 100644 --- a/scripts/__dropins__/storefront-account/containers/CustomerInformation/index.d.ts +++ b/scripts/__dropins__/storefront-account/containers/CustomerInformation/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './CustomerInformation'; export { CustomerInformation as default } from './CustomerInformation'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/containers/OrdersList.js b/scripts/__dropins__/storefront-account/containers/OrdersList.js index f60dfd8242..700c2c1843 100644 --- a/scripts/__dropins__/storefront-account/containers/OrdersList.js +++ b/scripts/__dropins__/storefront-account/containers/OrdersList.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as s,jsxs as u,Fragment as N}from"@dropins/tools/preact-jsx-runtime.js";import{classes as C,Slot as W}from"@dropins/tools/lib.js";import{S as B,c as j,E as U,C as Q}from"../chunks/CustomerInformationCard.js";import"@dropins/tools/preact-compat.js";import{Card as G,Icon as F,ContentGrid as R,Image as m,Header as X,Picker as Z,Pagination as rr}from"@dropins/tools/components.js";import{useText as z}from"@dropins/tools/i18n.js";import{useState as S,useEffect as P,useMemo as tr,useCallback as J}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import{g as sr}from"../chunks/getOrderHistoryList.js";import{g as er}from"../chunks/getStoreConfig.js";import"../chunks/removeCustomerAddress.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/preact.js";import"../fragments.js";const K={size:"32",stroke:"2"},V=({minifiedView:a,orderNumber:c,orderToken:r,routeOrdersList:e,routeOrderDetails:L})=>{const n=a?"minifiedView":"fullSizeView",h=z({viewAllOrdersButton:`Account.${n}.OrdersList.viewAllOrdersButton`,ariaLabelLink:`Account.${n}.OrdersList.ariaLabelLink`});return e?s("a",{className:C(["account-orders-list-action",["account-orders-list-action--minifiedView",a]]),"data-testid":"ordersListActionButtonMinifiedView",href:e(),children:s(G,{"data-testid":"ordersListActionMinifiedView",variant:"secondary",children:u("div",{className:"account-orders-list-action__card-wrapper",children:[s("p",{children:h.viewAllOrdersButton}),s(F,{source:B,...K})]})})}):s("a",{"aria-label":`${h.ariaLabelLink} ${c??r}`,href:j(L)?L(c,r):"#",className:"account-orders-list-action","data-testid":"ordersListActionButton",children:s(F,{source:B,...K})})},ar=()=>{const[a,c]=S(window.innerWidth<768);return P(()=>{const r=()=>{c(window.innerWidth<768)};return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),a},cr=({placeholderImage:a,minifiedView:c,item:r,withThumbnails:e,children:L,slots:n,routeTracking:h,routeOrderProduct:O,routeReturnDetails:A,...b})=>{var g,$,_,k,w,I,x,f,M;const o=c?"minifiedView":"fullSizeView",p=z({orderNumber:`Account.${o}.OrdersList.OrdersListCard.orderNumber`,itemsAmount:`Account.${o}.OrdersList.OrdersListCard.itemsAmount`,carrier:`Account.${o}.OrdersList.OrdersListCard.carrier`,returnsText:`Account.${o}.OrdersList.OrdersListCard.returns`,deliveryDateText:`Account.${o}.OrdersList.OrdersListCard.orderDate`}),d=ar(),y=j(O);return u(G,{variant:"secondary",...b,className:C(["account-orders-list-card",["account-orders-list-card--full",((g=r==null?void 0:r.items)==null?void 0:g.length)>6]]),children:[s("div",{className:"account-orders-list-card__content",children:n!=null&&n.OrdersListCard?s(W,{"data-testid":`ordersListCard${r.id}`,name:"OrdersListCard",slot:n==null?void 0:n.OrdersListCard,context:{orderHistoryListItem:r}}):u(N,{children:[s("div",{children:r==null?void 0:r.status}),u("p",{children:[p.deliveryDateText," ",r==null?void 0:r.orderDate]}),u("p",{children:[p.orderNumber," ",r.number]}),($=r==null?void 0:r.shipments)==null?void 0:$.map(t=>{var l;return(l=t==null?void 0:t.tracking)==null?void 0:l.map(i=>{const v=h==null?void 0:h(i);return u("p",{"data-testid":i.number,children:[s("span",{children:`${p.carrier} ${i.carrier.toLocaleUpperCase()} `}),v?s("a",{href:v,target:"_blank",className:"account-orders-list-card__content--track_number",rel:"noreferrer",children:i.number}):s("span",{className:"account-orders-list-card__content--track_number",children:i.number})]},t.id)})}),r!=null&&r.returns&&((_=r.returns)!=null&&_.length)?u("p",{"data-testid":r.number,children:[u("span",{children:[p.returnsText," "]}),(k=r==null?void 0:r.returns)==null?void 0:k.map(t=>s("span",{"data-testid":t.number,children:u("a",{href:(A==null?void 0:A({orderNumber:r.number,orderToken:r.token,returnNumber:t.number}))??"#",className:"account-orders-list-card__content--return_number",children:[t.number," "]})},t.uid))]},r.id):null,u("p",{children:["$",(w=r==null?void 0:r.total)==null?void 0:w.grandTotal.value]}),u("p",{"data-testid":"itemsAmount",children:[(I=r==null?void 0:r.items)!=null&&I.length?(x=r==null?void 0:r.items)==null?void 0:x.reduce((t,l)=>{const i=(l==null?void 0:l.quantityOrdered)||0;return t+i},0):0," ",p.itemsAmount]}),(f=r==null?void 0:r.items)==null?void 0:f.map((t,l)=>{if(l>=0&&l<10)return u("p",{className:"account-orders-list-card__content--product-name",children:[u("span",{className:"account-orders-list-card__content--quantity",children:[(t==null?void 0:t.quantityOrdered)>1?t==null?void 0:t.quantityOrdered:null," "]}),t==null?void 0:t.productName.replaceAll("-"," ")]},`${l}_${t.id}`);if(l===11)return s("p",{children:"..."},"ellipsis")})]})}),e&&((M=r==null?void 0:r.items)!=null&&M.length)?s(R,{maxColumns:d?3:9,emptyGridContent:s(N,{}),className:C(["account-orders-list-card__images",["account-orders-list-card__images-3",d]]),"data-testid":"ordersListCardImages",children:r.items.map((t,l)=>{var Y,D,E,H,q;const i=(E=(D=(Y=t==null?void 0:t.product)==null?void 0:Y.smallImage)==null?void 0:D.url)!=null&&E.length?(q=(H=t==null?void 0:t.product)==null?void 0:H.smallImage)==null?void 0:q.url:a,v=(t==null?void 0:t.productName)??"";return y?s("a",{href:(O==null?void 0:O(t))??"",target:"_blank",rel:"noreferrer",children:s(m,{src:i,width:65,height:65,alt:v})},t.id+l):s(m,{src:i,width:65,height:65,alt:v},t.id+l)})}):null,s("div",{className:"account-orders-list-card__actions",children:L})]})},nr=({ordersInMinifiedView:a,minifiedView:c,pageSize:r,selectedDate:e,selectedPage:L,handleSetFirstOrderDate:n})=>{const[h,O]=S([]),[A,b]=S({totalPages:1,currentPage:1,pageSize:1}),[o,p]=S(!1),[d,y]=S("");return P(()=>{er().then(g=>{y(g.baseMediaUrl)})},[]),P(()=>{p(!0),sr(c?a:r,e,L).then(g=>{!g||!g.items||(b(g.pageInfo),O(g.items),n==null||n(g.dateOfFirstOrder))}).finally(()=>{p(!1)})},[n,c,a,r,e,L]),{loading:o,orderHistoryListItems:h,pageInfo:A,placeholderImage:d}},T=(a,c=1)=>{const r=new Date,e=new Date(r);switch(a){case"sixMonthsAgo":{e.setMonth(e.getMonth()-c);break}case"oneYearAgo":{e.setFullYear(e.getFullYear()-c);break}default:return""}return{from:e==null?void 0:e.toISOString().split("T")[0],to:`${r==null?void 0:r.toISOString().split("T")[0]} 23:59:59`}},or=a=>{const c=[],r=new Date().getFullYear();for(let e=a;e<=r-1;e++)c.push({value:`{"from":"${e}-01-01","to":"${e+1}-01-01 23:59:59"}`,text:e.toString()});return c},dr=()=>{const a=z({pastSixMonths:"Account.fullSizeView.OrdersList.OrdersListSelectDate.pastSixMonths",currentYear:"Account.fullSizeView.OrdersList.OrdersListSelectDate.currentYear",viewAll:"Account.fullSizeView.OrdersList.OrdersListSelectDate.viewAll"}),[c,r]=S(),[e,L]=S(JSON.stringify(T("sixMonthsAgo",6))),[n,h]=S(1);P(()=>{window==null||window.scrollTo({top:100,behavior:"smooth"})},[n]);const O=tr(()=>{const o=[{value:JSON.stringify(T("sixMonthsAgo",6)),text:a.pastSixMonths},{value:JSON.stringify(T("oneYearAgo",1)),text:a.currentYear},{value:"viewAll",text:a.viewAll}];if(c){const d=new Date(c).getFullYear();o==null||o.splice(2,0,...or(d))}return o},[a,c]),A=J(o=>{r(o)},[]),b=J(o=>{const d=o.target.value;L(d),h(1)},[]);return{selectableDateList:O,selectedDate:e,selectedPage:n,handleSelectDate:b,setSelectedPage:h,handleSetFirstOrderDate:A}},ir=({className:a,withHeader:c=!0,minifiedView:r=!1,withThumbnails:e=!0,withFilter:L=!0,ordersInMinifiedView:n=1,pageSize:h=10,routeOrdersList:O,routeOrderDetails:A,routeReturnDetails:b,routeTracking:o,routeOrderProduct:p,slots:d})=>{const y=r?"minifiedView":"fullSizeView",g=z({containerTitle:`Account.${y}.OrdersList.containerTitle`,dateOrderPlaced:`Account.${y}.OrdersList.dateOrderPlaced`}),{selectableDateList:$,selectedDate:_,handleSelectDate:k,selectedPage:w,setSelectedPage:I,handleSetFirstOrderDate:x}=dr(),{pageInfo:f,loading:M,orderHistoryListItems:t,placeholderImage:l}=nr({minifiedView:r,pageSize:h,ordersInMinifiedView:n,selectedDate:_,selectedPage:w,handleSetFirstOrderDate:x});return u("div",{children:[c?s(X,{"aria-label":g.containerTitle,role:"region",title:g.containerTitle,divider:!r,className:r?"account-orders-list-header":""}):null,u("div",{className:C(["account-orders-list",a]),children:[!r&&L?u("div",{className:"account-orders-list__date-select",children:[s("span",{children:g.dateOrderPlaced}),s(Z,{value:_,name:"orderDatePicker",options:$,handleSelect:k})]}):null,M?s(N,{children:Array.from(Array(f==null?void 0:f.pageSize).keys()).map(i=>s(Q,{testId:"orderSkeletonLoader",withCard:!1},i))}):s(N,{children:t.length?s(N,{children:t.map((i,v)=>s(cr,{placeholderImage:l,routeTracking:o,routeOrderProduct:p,routeReturnDetails:b,minifiedView:r,item:i,withThumbnails:e,slots:d,children:d!=null&&d.OrdersListAction?s(W,{"data-testid":`ordersListActionSlot_${v}`,name:"OrdersListAction",slot:d==null?void 0:d.OrdersListAction,context:{orderHistoryListItem:i}}):s(V,{minifiedView:r,orderNumber:i.number,orderToken:i.token,routeOrderDetails:A})},v))}):s(U,{isEmpty:!t.length,typeList:"orders",minifiedView:r})}),!r&&(f==null?void 0:f.totalPages)>1?s(rr,{totalPages:f==null?void 0:f.totalPages,currentPage:w,onChange:I}):null,r?s(V,{minifiedView:r,routeOrdersList:O}):null]})]})},wr=({className:a,withHeader:c,minifiedView:r,withThumbnails:e,withFilter:L,ordersInMinifiedView:n,pageSize:h,routeOrdersList:O,routeOrderDetails:A,routeReturnDetails:b,routeTracking:o,routeOrderProduct:p,slots:d})=>s("div",{className:C(["account-orders-list",a]),"data-testid":"ordersListId",children:s(ir,{className:a,withHeader:c,minifiedView:r,withThumbnails:e,withFilter:L,ordersInMinifiedView:n,pageSize:h,routeOrdersList:O,routeOrderDetails:A,routeReturnDetails:b,routeTracking:o,routeOrderProduct:p,slots:d})});export{wr as OrdersList,wr as default}; +import{jsx as s,jsxs as l,Fragment as $}from"@dropins/tools/preact-jsx-runtime.js";import{classes as k,Slot as U}from"@dropins/tools/lib.js";import{S as K,c as Q,E as X,C as Z}from"../chunks/CustomerInformationCard.js";import"@dropins/tools/preact-compat.js";import{Card as R,Icon as V,Price as rr,ContentGrid as tr,Image as W,Header as sr,Picker as er,Pagination as ar}from"@dropins/tools/components.js";import{useText as D}from"@dropins/tools/i18n.js";import{useState as y,useEffect as Y,useMemo as cr,useCallback as j}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import{g as nr}from"../chunks/getOrderHistoryList.js";import{g as or}from"../chunks/getStoreConfig.js";import"../chunks/removeCustomerAddress.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/preact.js";import"../fragments.js";const m={size:"32",stroke:"2"},G=({minifiedView:a,orderNumber:c,orderToken:r,routeOrdersList:e,routeOrderDetails:u})=>{const n=a?"minifiedView":"fullSizeView",i=D({viewAllOrdersButton:`Account.${n}.OrdersList.viewAllOrdersButton`,ariaLabelLink:`Account.${n}.OrdersList.ariaLabelLink`});return e?s("a",{className:k(["account-orders-list-action",["account-orders-list-action--minifiedView",a]]),"data-testid":"ordersListActionButtonMinifiedView",href:e(),children:s(R,{"data-testid":"ordersListActionMinifiedView",variant:"secondary",children:l("div",{className:"account-orders-list-action__card-wrapper",children:[s("p",{children:i.viewAllOrdersButton}),s(V,{source:K,...m})]})})}):s("a",{"aria-label":`${i.ariaLabelLink} ${c??r}`,href:Q(u)?u(c,r):"#",className:"account-orders-list-action","data-testid":"ordersListActionButton",children:s(V,{source:K,...m})})},dr=()=>{const[a,c]=y(window.innerWidth<768);return Y(()=>{const r=()=>{c(window.innerWidth<768)};return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),a},ir=({placeholderImage:a,minifiedView:c,item:r,withThumbnails:e,children:u,slots:n,routeTracking:i,routeOrderProduct:p,routeReturnDetails:f,...b})=>{var g,I,_,x,N,M,P,O,z,w,T,v;const o=c?"minifiedView":"fullSizeView",h=D({orderNumber:`Account.${o}.OrdersList.OrdersListCard.orderNumber`,itemsAmount:`Account.${o}.OrdersList.OrdersListCard.itemsAmount`,carrier:`Account.${o}.OrdersList.OrdersListCard.carrier`,returnsText:`Account.${o}.OrdersList.OrdersListCard.returns`,deliveryDateText:`Account.${o}.OrdersList.OrdersListCard.orderDate`}),d=dr(),S=Q(p);return l(R,{variant:"secondary",...b,className:k(["account-orders-list-card",["account-orders-list-card--full",((g=r==null?void 0:r.items)==null?void 0:g.length)>6]]),children:[s("div",{className:"account-orders-list-card__content",children:n!=null&&n.OrdersListCard?s(U,{"data-testid":`ordersListCard${r.id}`,name:"OrdersListCard",slot:n==null?void 0:n.OrdersListCard,context:{orderHistoryListItem:r}}):l($,{children:[s("div",{children:r==null?void 0:r.status}),l("p",{children:[h.deliveryDateText," ",r==null?void 0:r.orderDate]}),l("p",{children:[h.orderNumber," ",r.number]}),(I=r==null?void 0:r.shipments)==null?void 0:I.map(t=>{var L;return(L=t==null?void 0:t.tracking)==null?void 0:L.map(A=>{const C=i==null?void 0:i(A);return l("p",{"data-testid":A.number,children:[s("span",{children:`${h.carrier} ${A.carrier.toLocaleUpperCase()} `}),C?s("a",{href:C,target:"_blank",className:"account-orders-list-card__content--track_number",rel:"noreferrer",children:A.number}):s("span",{className:"account-orders-list-card__content--track_number",children:A.number})]},t.id)})}),r!=null&&r.returns&&((_=r.returns)!=null&&_.length)?l("p",{"data-testid":r.number,children:[l("span",{children:[h.returnsText," "]}),(x=r==null?void 0:r.returns)==null?void 0:x.map(t=>s("span",{"data-testid":t.number,children:l("a",{href:(f==null?void 0:f({orderNumber:r.number,orderToken:r.token,returnNumber:t.number}))??"#",className:"account-orders-list-card__content--return_number",children:[t.number," "]})},t.uid))]},r.id):null,s("p",{children:s(rr,{amount:((M=(N=r==null?void 0:r.total)==null?void 0:N.grandTotal)==null?void 0:M.value)??0,currency:(O=(P=r==null?void 0:r.total)==null?void 0:P.grandTotal)==null?void 0:O.currency,weight:"normal",size:"medium"})}),l("p",{"data-testid":"itemsAmount",children:[(z=r==null?void 0:r.items)!=null&&z.length?(w=r==null?void 0:r.items)==null?void 0:w.reduce((t,L)=>{const A=(L==null?void 0:L.quantityOrdered)||0;return t+A},0):0," ",h.itemsAmount]}),(T=r==null?void 0:r.items)==null?void 0:T.map((t,L)=>{if(L>=0&&L<10)return l("p",{className:"account-orders-list-card__content--product-name",children:[l("span",{className:"account-orders-list-card__content--quantity",children:[(t==null?void 0:t.quantityOrdered)>1?t==null?void 0:t.quantityOrdered:null," "]}),t==null?void 0:t.productName.replaceAll("-"," ")]},`${L}_${t.id}`);if(L===11)return s("p",{children:"..."},"ellipsis")})]})}),e&&((v=r==null?void 0:r.items)!=null&&v.length)?s(tr,{maxColumns:d?3:9,emptyGridContent:s($,{}),className:k(["account-orders-list-card__images",["account-orders-list-card__images-3",d]]),"data-testid":"ordersListCardImages",children:r.items.map((t,L)=>{var H,q,B,F,J;const A=(B=(q=(H=t==null?void 0:t.product)==null?void 0:H.smallImage)==null?void 0:q.url)!=null&&B.length?(J=(F=t==null?void 0:t.product)==null?void 0:F.smallImage)==null?void 0:J.url:a,C=(t==null?void 0:t.productName)??"";return S?s("a",{href:(p==null?void 0:p(t))??"",target:"_blank",rel:"noreferrer",children:s(W,{src:A,width:65,height:65,alt:C})},t.id+L):s(W,{src:A,width:65,height:65,alt:C},t.id+L)})}):null,s("div",{className:"account-orders-list-card__actions",children:u})]})},lr=({ordersInMinifiedView:a,minifiedView:c,pageSize:r,selectedDate:e,selectedPage:u,handleSetFirstOrderDate:n})=>{const[i,p]=y([]),[f,b]=y({totalPages:1,currentPage:1,pageSize:1}),[o,h]=y(!1),[d,S]=y("");return Y(()=>{or().then(g=>{S(g.baseMediaUrl)})},[]),Y(()=>{h(!0),nr(c?a:r,e,u).then(g=>{!g||!g.items||(b(g.pageInfo),p(g.items),n==null||n(g.dateOfFirstOrder))}).finally(()=>{h(!1)})},[n,c,a,r,e,u]),{loading:o,orderHistoryListItems:i,pageInfo:f,placeholderImage:d}},E=(a,c=1)=>{const r=new Date,e=new Date(r);switch(a){case"sixMonthsAgo":{e.setMonth(e.getMonth()-c);break}case"oneYearAgo":{e.setFullYear(e.getFullYear()-c);break}default:return""}return{from:e==null?void 0:e.toISOString().split("T")[0],to:`${r==null?void 0:r.toISOString().split("T")[0]} 23:59:59`}},ur=a=>{const c=[],r=new Date().getFullYear();for(let e=a;e<=r-1;e++)c.push({value:`{"from":"${e}-01-01","to":"${e+1}-01-01 23:59:59"}`,text:e.toString()});return c},hr=()=>{const a=D({pastSixMonths:"Account.fullSizeView.OrdersList.OrdersListSelectDate.pastSixMonths",currentYear:"Account.fullSizeView.OrdersList.OrdersListSelectDate.currentYear",viewAll:"Account.fullSizeView.OrdersList.OrdersListSelectDate.viewAll"}),[c,r]=y(),[e,u]=y(JSON.stringify(E("sixMonthsAgo",6))),[n,i]=y(1);Y(()=>{window==null||window.scrollTo({top:100,behavior:"smooth"})},[n]);const p=cr(()=>{const o=[{value:JSON.stringify(E("sixMonthsAgo",6)),text:a.pastSixMonths},{value:JSON.stringify(E("oneYearAgo",1)),text:a.currentYear},{value:"viewAll",text:a.viewAll}];if(c){const d=new Date(c).getFullYear();o==null||o.splice(2,0,...ur(d))}return o},[a,c]),f=j(o=>{r(o)},[]),b=j(o=>{const d=o.target.value;u(d),i(1)},[]);return{selectableDateList:p,selectedDate:e,selectedPage:n,handleSelectDate:b,setSelectedPage:i,handleSetFirstOrderDate:f}},gr=({className:a,withHeader:c=!0,minifiedView:r=!1,withThumbnails:e=!0,withFilter:u=!0,ordersInMinifiedView:n=1,pageSize:i=10,routeOrdersList:p,routeOrderDetails:f,routeReturnDetails:b,routeTracking:o,routeOrderProduct:h,slots:d})=>{const S=r?"minifiedView":"fullSizeView",g=D({containerTitle:`Account.${S}.OrdersList.containerTitle`,dateOrderPlaced:`Account.${S}.OrdersList.dateOrderPlaced`}),{selectableDateList:I,selectedDate:_,handleSelectDate:x,selectedPage:N,setSelectedPage:M,handleSetFirstOrderDate:P}=hr(),{pageInfo:O,loading:z,orderHistoryListItems:w,placeholderImage:T}=lr({minifiedView:r,pageSize:i,ordersInMinifiedView:n,selectedDate:_,selectedPage:N,handleSetFirstOrderDate:P});return l("div",{children:[c?s(sr,{"aria-label":g.containerTitle,role:"region",title:g.containerTitle,divider:!r,className:r?"account-orders-list-header":""}):null,l("div",{className:k(["account-orders-list",a]),children:[!r&&u?l("div",{className:"account-orders-list__date-select",children:[s("span",{children:g.dateOrderPlaced}),s(er,{value:_,name:"orderDatePicker",options:I,handleSelect:x})]}):null,z?s($,{children:Array.from(Array(O==null?void 0:O.pageSize).keys()).map(v=>s(Z,{testId:"orderSkeletonLoader",withCard:!1},v))}):s($,{children:w.length?s($,{children:w.map((v,t)=>s(ir,{placeholderImage:T,routeTracking:o,routeOrderProduct:h,routeReturnDetails:b,minifiedView:r,item:v,withThumbnails:e,slots:d,children:d!=null&&d.OrdersListAction?s(U,{"data-testid":`ordersListActionSlot_${t}`,name:"OrdersListAction",slot:d==null?void 0:d.OrdersListAction,context:{orderHistoryListItem:v}}):s(G,{minifiedView:r,orderNumber:v.number,orderToken:v.token,routeOrderDetails:f})},t))}):s(X,{isEmpty:!w.length,typeList:"orders",minifiedView:r})}),!r&&(O==null?void 0:O.totalPages)>1?s(ar,{totalPages:O==null?void 0:O.totalPages,currentPage:N,onChange:M}):null,r?s(G,{minifiedView:r,routeOrdersList:p}):null]})]})},kr=({className:a,withHeader:c,minifiedView:r,withThumbnails:e,withFilter:u,ordersInMinifiedView:n,pageSize:i,routeOrdersList:p,routeOrderDetails:f,routeReturnDetails:b,routeTracking:o,routeOrderProduct:h,slots:d})=>s("div",{className:k(["account-orders-list",a]),"data-testid":"ordersListId",children:s(gr,{className:a,withHeader:c,minifiedView:r,withThumbnails:e,withFilter:u,ordersInMinifiedView:n,pageSize:i,routeOrdersList:p,routeOrderDetails:f,routeReturnDetails:b,routeTracking:o,routeOrderProduct:h,slots:d})});export{kr as OrdersList,kr as default}; diff --git a/scripts/__dropins__/storefront-account/containers/OrdersList/index.d.ts b/scripts/__dropins__/storefront-account/containers/OrdersList/index.d.ts index 19887be36c..5c23c100ac 100644 --- a/scripts/__dropins__/storefront-account/containers/OrdersList/index.d.ts +++ b/scripts/__dropins__/storefront-account/containers/OrdersList/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrdersList'; export { OrdersList as default } from './OrdersList'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/containers/index.d.ts b/scripts/__dropins__/storefront-account/containers/index.d.ts index 0855e2fa12..d3913690db 100644 --- a/scripts/__dropins__/storefront-account/containers/index.d.ts +++ b/scripts/__dropins__/storefront-account/containers/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './AddressForm'; export * from './Addresses'; export * from './OrdersList'; diff --git a/scripts/__dropins__/storefront-account/data/models/attributes-form.d.ts b/scripts/__dropins__/storefront-account/data/models/attributes-form.d.ts index dd7e8ab04b..6368452da2 100644 --- a/scripts/__dropins__/storefront-account/data/models/attributes-form.d.ts +++ b/scripts/__dropins__/storefront-account/data/models/attributes-form.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare enum FieldEnumList { BOOLEAN = "BOOLEAN", DATE = "DATE", @@ -20,26 +36,26 @@ export declare enum FieldEnumList { EMPTY = "" } export interface AttributesFormItemsProps { - code?: string; - name?: string; - id?: string; - required?: boolean; - label?: string; - options?: { - is_default: boolean; - label: string; + code: string; + name: string; + id: string; + required: boolean; + label: string; + options: { + isDefault: boolean; + text: string; value: string; }[]; - entityType?: string; - className?: string; - defaultValue?: string | boolean | number; - fieldType?: FieldEnumList; - multilineCount?: number; - isUnique?: boolean; + entityType: string; + className: string; + defaultValue: string | boolean | number; + fieldType: FieldEnumList; + multilineCount: number; + isUnique: boolean; orderNumber: number; - isHidden?: boolean; + isHidden: boolean; customUpperCode: string; - validateRules: Record[]; + validateRules: Record[]; } export interface AttributesFormModel extends AttributesFormItemsProps { } diff --git a/scripts/__dropins__/storefront-account/data/models/country.d.ts b/scripts/__dropins__/storefront-account/data/models/country.d.ts index a35aba28cc..71a23772af 100644 --- a/scripts/__dropins__/storefront-account/data/models/country.d.ts +++ b/scripts/__dropins__/storefront-account/data/models/country.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export type Country = { value: string; text: string; diff --git a/scripts/__dropins__/storefront-account/data/models/customer-address.d.ts b/scripts/__dropins__/storefront-account/data/models/customer-address.d.ts index 5b775f7f7d..3530b1df00 100644 --- a/scripts/__dropins__/storefront-account/data/models/customer-address.d.ts +++ b/scripts/__dropins__/storefront-account/data/models/customer-address.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface CustomerAddressesModel { firstName?: string; lastName?: string; diff --git a/scripts/__dropins__/storefront-account/data/models/customer.d.ts b/scripts/__dropins__/storefront-account/data/models/customer.d.ts index c39c90e098..5b336ca2e7 100644 --- a/scripts/__dropins__/storefront-account/data/models/customer.d.ts +++ b/scripts/__dropins__/storefront-account/data/models/customer.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface CustomerDataModelShort { firstName: string; lastName: string; @@ -10,4 +26,15 @@ export interface CustomerDataModelShort { createdAt: string; [key: string]: string | boolean | number; } +export interface AccountModel { + firstName?: string; + lastName?: string; + emailAddress?: string; + phoneNumber?: string; + countryCode?: string; + accountId?: string; + accountType?: string; + company?: string; + customerGroup?: string; +} //# sourceMappingURL=customer.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/data/models/index.d.ts b/scripts/__dropins__/storefront-account/data/models/index.d.ts index a97f699131..e588bbe248 100644 --- a/scripts/__dropins__/storefront-account/data/models/index.d.ts +++ b/scripts/__dropins__/storefront-account/data/models/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './customer-address'; export * from './attributes-form'; export * from './country'; diff --git a/scripts/__dropins__/storefront-account/data/models/region.d.ts b/scripts/__dropins__/storefront-account/data/models/region.d.ts index b53eeef7d2..d3d1f7376f 100644 --- a/scripts/__dropins__/storefront-account/data/models/region.d.ts +++ b/scripts/__dropins__/storefront-account/data/models/region.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export type Region = { code: string; id?: number; diff --git a/scripts/__dropins__/storefront-account/data/models/store-config.d.ts b/scripts/__dropins__/storefront-account/data/models/store-config.d.ts index d1252c83b8..f89d0970f3 100644 --- a/scripts/__dropins__/storefront-account/data/models/store-config.d.ts +++ b/scripts/__dropins__/storefront-account/data/models/store-config.d.ts @@ -1,6 +1,23 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface StoreConfigModel { baseMediaUrl: string; minLength: number; requiredCharacterClasses: number; + storeCode: string; } //# sourceMappingURL=store-config.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/data/transforms/index.d.ts b/scripts/__dropins__/storefront-account/data/transforms/index.d.ts index b8eab57d73..9a7e176ccb 100644 --- a/scripts/__dropins__/storefront-account/data/transforms/index.d.ts +++ b/scripts/__dropins__/storefront-account/data/transforms/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './transform-attributes-form'; export * from './transform-customer-address'; export * from './transform-customer'; @@ -5,4 +21,5 @@ export * from './transform-countries'; export * from './transform-regions'; export * from './transform-order-history-list'; export * from './transform-store-config'; +export * from './transform-account'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/data/transforms/transform-account.d.ts b/scripts/__dropins__/storefront-account/data/transforms/transform-account.d.ts new file mode 100644 index 0000000000..730c3ea523 --- /dev/null +++ b/scripts/__dropins__/storefront-account/data/transforms/transform-account.d.ts @@ -0,0 +1,8 @@ +import { AccountModel, CustomerDataModelShort } from '../models/customer'; + +/** + * Reference: + * https://github.com/adobe/commerce-events/blob/main/packages/storefront-events-collector/src/handlers/account/editAccountAEP.ts + */ +export declare const transformAccount: (data: CustomerDataModelShort) => AccountModel; +//# sourceMappingURL=transform-account.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/fragments.js b/scripts/__dropins__/storefront-account/fragments.js index d5bb645651..5e55065b87 100644 --- a/scripts/__dropins__/storefront-account/fragments.js +++ b/scripts/__dropins__/storefront-account/fragments.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ const e=` fragment BASIC_CUSTOMER_INFO_FRAGMENT on Customer { @@ -32,12 +32,19 @@ const e=` } `,a=` fragment ORDER_SUMMARY_FRAGMENT on OrderTotal { - __typename grand_total { value currency } - subtotal { + total_giftcard { + currency + value + } + subtotal_excl_tax { + currency + value + } + subtotal_incl_tax { currency value } diff --git a/scripts/__dropins__/storefront-account/hooks/containers/useCustomerInformation.d.ts b/scripts/__dropins__/storefront-account/hooks/containers/useCustomerInformation.d.ts index d774cc129e..1110fe8c88 100644 --- a/scripts/__dropins__/storefront-account/hooks/containers/useCustomerInformation.d.ts +++ b/scripts/__dropins__/storefront-account/hooks/containers/useCustomerInformation.d.ts @@ -14,25 +14,25 @@ export declare const useCustomerInformation: ({ handleSetInLineAlert, }: UseCust loading: boolean; normalizeFieldsConfig: { defaultValue: any; - code?: string | undefined; - name?: string | undefined; - id?: string | undefined; - required?: boolean | undefined; - label?: string | undefined; - options?: { - is_default: boolean; - label: string; + code: string; + name: string; + id: string; + required: boolean; + label: string; + options: { + isDefault: boolean; + text: string; value: string; - }[] | undefined; - entityType?: string | undefined; - className?: string | undefined; - fieldType?: import('../../data/models').FieldEnumList | undefined; - multilineCount?: number | undefined; - isUnique?: boolean | undefined; + }[]; + entityType: string; + className: string; + fieldType: import('../../data/models').FieldEnumList; + multilineCount: number; + isUnique: boolean; orderNumber: number; - isHidden?: boolean | undefined; + isHidden: boolean; customUpperCode: string; - validateRules: Record[]; + validateRules: Record[]; }[]; submitLoading: boolean; showEditForm: boolean; diff --git a/scripts/__dropins__/storefront-account/hooks/containers/useGetStoreConfigs.d.ts b/scripts/__dropins__/storefront-account/hooks/containers/useGetStoreConfigs.d.ts index 5c38bf76fe..17aa77a0a7 100644 --- a/scripts/__dropins__/storefront-account/hooks/containers/useGetStoreConfigs.d.ts +++ b/scripts/__dropins__/storefront-account/hooks/containers/useGetStoreConfigs.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const useGetStoreConfigs: () => { passwordConfigs: { minLength: number; diff --git a/scripts/__dropins__/storefront-account/hooks/containers/useOrderSelectList.d.ts b/scripts/__dropins__/storefront-account/hooks/containers/useOrderSelectList.d.ts index 680b8f5c90..6ed4286279 100644 --- a/scripts/__dropins__/storefront-account/hooks/containers/useOrderSelectList.d.ts +++ b/scripts/__dropins__/storefront-account/hooks/containers/useOrderSelectList.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const useOrderSelectList: () => { selectableDateList: { value: string; diff --git a/scripts/__dropins__/storefront-account/hooks/useDebounce.d.ts b/scripts/__dropins__/storefront-account/hooks/useDebounce.d.ts index b3fa0fbd59..8f5e4020fd 100644 --- a/scripts/__dropins__/storefront-account/hooks/useDebounce.d.ts +++ b/scripts/__dropins__/storefront-account/hooks/useDebounce.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ declare const useDebounce: (value: string, delay: number) => string; export default useDebounce; //# sourceMappingURL=useDebounce.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/hooks/useIsMobile.d.ts b/scripts/__dropins__/storefront-account/hooks/useIsMobile.d.ts index ca0c2d8088..b51e16debe 100644 --- a/scripts/__dropins__/storefront-account/hooks/useIsMobile.d.ts +++ b/scripts/__dropins__/storefront-account/hooks/useIsMobile.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const useIsMobile: () => boolean; //# sourceMappingURL=useIsMobile.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/i18n/en_US.json.d.ts b/scripts/__dropins__/storefront-account/i18n/en_US.json.d.ts index 0610e0c648..f7294923ae 100644 --- a/scripts/__dropins__/storefront-account/i18n/en_US.json.d.ts +++ b/scripts/__dropins__/storefront-account/i18n/en_US.json.d.ts @@ -3,8 +3,8 @@ declare const _default: { "minifiedView": { "CustomerInformation": { "containerTitle": "Account settings", - "genderMale":"Male", - "genderFemale":"Female", + "genderMale": "Male", + "genderFemale": "Female", "changePassword": { "passwordValidationMessage": { "chartTwoSymbols": "Use characters and numbers or symbols", @@ -54,6 +54,7 @@ declare const _default: { "differentAddressFormTitle": "Deliver to new address", "viewAllAddressesButton": "View address list", "differentAddressButton": "Use a different address", + "ariaLabelAddressPicker": "form", "addressCard": { "actionRemove": "Remove", "actionEdit": "Edit", @@ -103,6 +104,7 @@ declare const _default: { "newAddressFormTitle": "Add address", "addNewAddressButton": "Create new", "differentAddressButton": "Use a different address", + "ariaLabelAddressPicker": "form", "addressCard": { "actionRemove": "Remove", "actionEdit": "Edit", @@ -165,6 +167,7 @@ declare const _default: { "lengthTextError": "Text length must be between {min} and {max} characters." } } -}; +} +; export default _default; diff --git a/scripts/__dropins__/storefront-account/lib/acdl.d.ts b/scripts/__dropins__/storefront-account/lib/acdl.d.ts new file mode 100644 index 0000000000..dffe41d9de --- /dev/null +++ b/scripts/__dropins__/storefront-account/lib/acdl.d.ts @@ -0,0 +1,28 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ +declare enum EventsList { + EDIT_ACCOUNT_EVENT = "edit-account" +} +export declare function getAdobeDataLayer(): any; +/** + * Pushes an event to the Adobe Client Data Layer (ACDL) + * Logic based on: https://github.com/adobe/commerce-events/blob/1973d0ce28471ef190fa06dad6359ffa0ab51db6/packages/storefront-events-sdk/src/Base.ts#L34 + */ +declare function pushEvent(event: string, additionalContext?: any): void; +declare const publishEvents: (eventType: string, eventParams: any) => null | undefined; +export { EventsList, publishEvents, pushEvent }; +//# sourceMappingURL=acdl.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/lib/areRequiredFieldsValid.d.ts b/scripts/__dropins__/storefront-account/lib/areRequiredFieldsValid.d.ts index c343b249e5..dd5e3cdbd5 100644 --- a/scripts/__dropins__/storefront-account/lib/areRequiredFieldsValid.d.ts +++ b/scripts/__dropins__/storefront-account/lib/areRequiredFieldsValid.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ type ErrorsList = { [key: string]: string; }; diff --git a/scripts/__dropins__/storefront-account/lib/checkIsFunction.d.ts b/scripts/__dropins__/storefront-account/lib/checkIsFunction.d.ts index 49cefb714e..492dfe7cc4 100644 --- a/scripts/__dropins__/storefront-account/lib/checkIsFunction.d.ts +++ b/scripts/__dropins__/storefront-account/lib/checkIsFunction.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const checkIsFunction: (value: any) => value is Function; //# sourceMappingURL=checkIsFunction.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/lib/convertCase.d.ts b/scripts/__dropins__/storefront-account/lib/convertCase.d.ts index 44782068b7..404ebbe6af 100644 --- a/scripts/__dropins__/storefront-account/lib/convertCase.d.ts +++ b/scripts/__dropins__/storefront-account/lib/convertCase.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const convertToCamelCase: (key: string) => string; export declare const convertToSnakeCase: (key: string) => string; export declare const convertKeysCase: (data: any, type: 'snakeCase' | 'camelCase', dictionary?: Record) => any; diff --git a/scripts/__dropins__/storefront-account/lib/convertToBoolean.d.ts b/scripts/__dropins__/storefront-account/lib/convertToBoolean.d.ts index bbc057b5cd..e869519ade 100644 --- a/scripts/__dropins__/storefront-account/lib/convertToBoolean.d.ts +++ b/scripts/__dropins__/storefront-account/lib/convertToBoolean.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const convertToBoolean: (element: string | number) => boolean; //# sourceMappingURL=convertToBoolean.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/lib/convertToInputDateFormat.d.ts b/scripts/__dropins__/storefront-account/lib/convertToInputDateFormat.d.ts index 13e6a09008..70643efa62 100644 --- a/scripts/__dropins__/storefront-account/lib/convertToInputDateFormat.d.ts +++ b/scripts/__dropins__/storefront-account/lib/convertToInputDateFormat.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const convertToInputDateFormat: (dateTimeString: string) => string; //# sourceMappingURL=convertToInputDateFormat.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/lib/fetch-error.d.ts b/scripts/__dropins__/storefront-account/lib/fetch-error.d.ts index 0a9e09a300..c86984e32c 100644 --- a/scripts/__dropins__/storefront-account/lib/fetch-error.d.ts +++ b/scripts/__dropins__/storefront-account/lib/fetch-error.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ /** Actions */ export declare const handleFetchError: (errors: Array<{ message: string; diff --git a/scripts/__dropins__/storefront-account/lib/formatDateToLocale.d.ts b/scripts/__dropins__/storefront-account/lib/formatDateToLocale.d.ts index c32256ba3c..7e3a6ebaef 100644 --- a/scripts/__dropins__/storefront-account/lib/formatDateToLocale.d.ts +++ b/scripts/__dropins__/storefront-account/lib/formatDateToLocale.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ /** * Formats a date string according to a specified locale and options. * Returns "Invalid Date" if the input date string is invalid. diff --git a/scripts/__dropins__/storefront-account/lib/getDateRange.d.ts b/scripts/__dropins__/storefront-account/lib/getDateRange.d.ts index 8d9ced633b..8a64bffc54 100644 --- a/scripts/__dropins__/storefront-account/lib/getDateRange.d.ts +++ b/scripts/__dropins__/storefront-account/lib/getDateRange.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface FilterDateProps { from: string; to: string; diff --git a/scripts/__dropins__/storefront-account/lib/getFormValues.d.ts b/scripts/__dropins__/storefront-account/lib/getFormValues.d.ts index 748a077634..297f0e16f7 100644 --- a/scripts/__dropins__/storefront-account/lib/getFormValues.d.ts +++ b/scripts/__dropins__/storefront-account/lib/getFormValues.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const getFormValues: (form: HTMLFormElement) => any; //# sourceMappingURL=getFormValues.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/lib/initializeFormDataAndErrors.d.ts b/scripts/__dropins__/storefront-account/lib/initializeFormDataAndErrors.d.ts index f07093b5a9..6bd213d39d 100644 --- a/scripts/__dropins__/storefront-account/lib/initializeFormDataAndErrors.d.ts +++ b/scripts/__dropins__/storefront-account/lib/initializeFormDataAndErrors.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ declare const _default: (fieldsConfig: Array<{ customUpperCode?: string; required?: boolean; diff --git a/scripts/__dropins__/storefront-account/lib/network-error.d.ts b/scripts/__dropins__/storefront-account/lib/network-error.d.ts index 772ab565ae..3d5461c70b 100644 --- a/scripts/__dropins__/storefront-account/lib/network-error.d.ts +++ b/scripts/__dropins__/storefront-account/lib/network-error.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ /** * A function which can be attached to fetchGraphQL to handle thrown errors in * a generic way. diff --git a/scripts/__dropins__/storefront-account/lib/normalizeAttributes.d.ts b/scripts/__dropins__/storefront-account/lib/normalizeAttributes.d.ts index c29ca7c257..0e47bdcabb 100644 --- a/scripts/__dropins__/storefront-account/lib/normalizeAttributes.d.ts +++ b/scripts/__dropins__/storefront-account/lib/normalizeAttributes.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const normalizeAttributes: (input: Record, type?: string) => Record; //# sourceMappingURL=normalizeAttributes.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/lib/normalizeGetAddressData.d.ts b/scripts/__dropins__/storefront-account/lib/normalizeGetAddressData.d.ts index bfd0a0f971..2e962c1c06 100644 --- a/scripts/__dropins__/storefront-account/lib/normalizeGetAddressData.d.ts +++ b/scripts/__dropins__/storefront-account/lib/normalizeGetAddressData.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ declare const dictionary: Record; export declare const groupMultilineFields: (inputObj: Record) => Record; export declare const separateKeys: (inputData: Record) => Record; diff --git a/scripts/__dropins__/storefront-account/lib/transformDobCustomer.d.ts b/scripts/__dropins__/storefront-account/lib/transformDobCustomer.d.ts new file mode 100644 index 0000000000..7de2e4fda6 --- /dev/null +++ b/scripts/__dropins__/storefront-account/lib/transformDobCustomer.d.ts @@ -0,0 +1,6 @@ +import { CustomerDataModelShort } from '../data/models/customer'; + +export declare const transformDobCustomer: (customerData: CustomerDataModelShort) => CustomerDataModelShort | (CustomerDataModelShort & { + dob: string; +}); +//# sourceMappingURL=transformDobCustomer.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/lib/validationChangePassword.d.ts b/scripts/__dropins__/storefront-account/lib/validationChangePassword.d.ts index e19b51dd33..038c80f8b6 100644 --- a/scripts/__dropins__/storefront-account/lib/validationChangePassword.d.ts +++ b/scripts/__dropins__/storefront-account/lib/validationChangePassword.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ interface PasswordValidationParams { currentPassword: string; newPassword: string; diff --git a/scripts/__dropins__/storefront-account/lib/validationUniqueSymbolsPassword.d.ts b/scripts/__dropins__/storefront-account/lib/validationUniqueSymbolsPassword.d.ts index 4d33927030..5aaca4d541 100644 --- a/scripts/__dropins__/storefront-account/lib/validationUniqueSymbolsPassword.d.ts +++ b/scripts/__dropins__/storefront-account/lib/validationUniqueSymbolsPassword.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const validationUniqueSymbolsPassword: (password: string, uniqueSymbolsCount: number) => boolean; //# sourceMappingURL=validationUniqueSymbolsPassword.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/render.js b/scripts/__dropins__/storefront-account/render.js index 0445451910..e87370fe61 100644 --- a/scripts/__dropins__/storefront-account/render.js +++ b/scripts/__dropins__/storefront-account/render.js @@ -1,5 +1,5 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ (function(e,r){try{if(typeof document<"u"){const a=document.createElement("style"),o=r.styleId;for(const t in r.attributes)a.setAttribute(t,r.attributes[t]);a.setAttribute("data-dropin",o),a.appendChild(document.createTextNode(e));const c=document.querySelector('style[data-dropin="sdk"]');if(c)c.after(a);else{const t=document.querySelector('link[rel="stylesheet"], style');t?t.before(a):document.head.append(a)}}}catch(a){console.error("dropin-styles (injectCodeFunction)",a)}})(`.account-orders-list-header{margin-bottom:var(--spacing-medium)}.account-orders-list ul{list-style:none;margin:0;padding:0}.account-orders-list__date-select{margin-bottom:var(--spacing-xbig)}.account-orders-list__date-select span{display:inline-block;font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);margin-bottom:var(--spacing-xsmall)}.account-orders-list__date-select .dropin-picker{max-width:224px} -.account-form{display:grid;flex-direction:column;gap:var(--spacing-medium)}@media (min-width: 768px){.account-form{display:grid;grid-template-columns:repeat(2,1fr)}.account-form>.dropin-field:nth-child(1),.account-form>.dropin-field:nth-child(2){grid-column:span 1}.account-form>.dropin-field:nth-child(3),.account-form>.dropin-field:nth-child(4),.account-form>.dropin-field:nth-child(5){grid-column:span 2}.account-form>.dropin-field:nth-child(6),.account-form>.dropin-field:nth-child(7){grid-column:span 1}.account-form>.dropin-field:nth-child(8),.account-form>.dropin-field:nth-child(9){grid-column:span 1}.account-form>.dropin-field:nth-child(n+10){grid-column:span 2}}.account-form [class$=-hidden]{position:absolute;opacity:0;height:0;width:0;overflow:hidden;clip:rect(0,0,0,0)}.account-account-loaders--card-loader{margin-bottom:var(--spacing-small)}.account-account-loaders--picker-loader div:first-child{max-width:200px}.account-account-loaders--picker-loader div:nth-child(3){max-width:400px}.account-address-card{margin-bottom:var(--spacing-small)}.account-address-card .dropin-card__content{display:grid;grid-template-columns:1fr auto;gap:var(--spacing-small) 0px;grid-template-areas:"description action" "labels action"}.account-address-card .account-address-card__action{display:flex;justify-content:flex-end;align-items:baseline;cursor:pointer;grid-area:action}.account-address-card .account-address-card__action--editbutton{margin-left:var(--spacing-small)}.account-address-card .account-address-card__action button{padding:0}.account-address-card .account-address-card__action button:hover{text-decoration:underline}.account-address-card .account-address-card__description{grid-area:description;margin:0;padding:0}.account-address-card .account-address-card__labels{display:flex;gap:0 var(--spacing-xsmall);grid-area:labels}.account-address-card .account-address-card__description p{font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);line-height:var(--spacing-xbig);color:var(--color-neutral-800);padding:0;margin:0 var(--spacing-xsmall) 0 0}.account-address-card .account-address-card__description p:nth-child(1),.account-address-card .account-address-card__description p:nth-child(2){margin:0 var(--spacing-xsmall) var(--spacing-xsmall) 0;color:var(--color-neutral-800);font:var(--type-button-2-font);font-weight:500;cursor:default}.account-address-card .account-address-card__description p:nth-child(1),.account-address-card .account-address-card__description p:nth-child(3),.account-address-card .account-address-card__description p:nth-child(4),.account-address-card .account-address-card__description p:nth-child(6){float:left}.account-actions-address{cursor:pointer;padding:var(--spacing-xsmall) var(--spacing-medium);border-radius:var(--shape-border-radius-2);border:var(--shape-border-width-2) solid var(--color-neutral-400);background-color:var(--color-neutral-50);width:100%;height:88px;display:flex;align-items:center;justify-content:space-between}.account-actions-address--selectable{max-width:100%;width:auto}.account-actions-address__title{font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing);-moz-appearance:none;appearance:none;-webkit-appearance:none;color:var(--color-neutral-800)}.account-actions-address svg{stroke:var(--shape-icon-stroke-4);color:var(--color-neutral-800)}@supports (height: 100dvh){.account-address-modal .dropin-modal{height:100dvh}}.account-address-modal--overlay{position:relative;padding:var(--spacing-small) var(--spacing-small) var(--spacing-small) var(--spacing-small);width:100%;margin:auto;max-width:340px}@media (min-width: 768px){.account-address-modal--overlay{position:relative;padding:var(--spacing-xbig) var(--spacing-xxbig) var(--spacing-xxbig) var(--spacing-xxbig);width:100%;margin:auto;max-width:721px}.account-address-card .dropin-card__content{padding:var(--spacing-small)}}.dropin-modal__body--medium>.dropin-modal__header-title,.dropin-modal__body--full>.dropin-modal__header-title,.account-address-modal .dropin-modal__content{margin:0;align-items:center}.account-address-modal .dropin-modal__header-title-content h3{font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);margin:0;padding:0}.account-address-modal .account-address-modal__spinner{position:absolute;top:0;left:0;background-color:var(--color-neutral-200);opacity:.8;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:1}.account-address-modal p{margin:var(--spacing-small) 0}@media (min-width: 768px){.account-address-modal p{color:var(--color-neutral-800);font:var(--type-body-2-strong-font);letter-spacing:var(--type-body-2-strong-letter-spacing);margin-bottom:var(--spacing-medium)}}.account-address-modal .account-address-modal__buttons{display:flex;align-items:center;justify-content:right;gap:0 var(--spacing-small)}.account-empty-list{margin-bottom:var(--spacing-small)}.account-empty-list.account-empty-list--minified,.account-empty-list .dropin-card{border:none}.account-empty-list .dropin-card__content{gap:0;padding:var(--spacing-xxbig)}.account-empty-list.account-empty-list--minified .dropin-card__content{flex-direction:row;align-items:center;padding:var(--spacing-big) var(--spacing-small)}.account-empty-list .dropin-card__content svg{width:64px;height:64px;margin-bottom:var(--spacing-medium)}.account-empty-list.account-empty-list--minified .dropin-card__content svg{margin:0 var(--spacing-small) 0 0;width:32px;height:32px}.account-empty-list .dropin-card__content svg path{fill:var(--color-neutral-800)}.account-empty-list.account-empty-list--minified .dropin-card__content svg path{fill:var(--color-neutral-500)}.account-empty-list .dropin-card__content p{font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);color:var(--color-neutral-800)}.account-empty-list.account-empty-list--minified .dropin-card__content p{font:var(--type-body-1-strong-font);color:var(--color-neutral-800)}.account-orders-list-action{margin:0;padding:0;border:none;background-color:transparent;cursor:pointer;text-decoration:none}a.account-orders-list-action:focus-visible{display:inline-block}.account-orders-list-action--minifiedView{width:100%;text-align:left;font:var(--type-body-1-default-font)}.account-orders-list-action.account-orders-list-action--minifiedView:hover{text-decoration:none}.account-orders-list-action--minifiedView .account-orders-list-action__card-wrapper{display:flex;justify-content:space-between;align-items:center;color:var(--color-neutral-800);height:calc(88px - var(--spacing-small) * 2)}.account-orders-list-action__card-wrapper>p{font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing)}.account-orders-list-action__card-wrapper svg,.account-orders-list-action svg{color:var(--color-neutral-800)}.account-orders-list-action--minifiedView .dropin-card__content{padding:var(--spacing-small) var(--spacing-medium)}.account-orders-list-action--minifiedView p{font:var(--type-body-1-strong-font)}.account-orders-list-card{height:100%;margin-bottom:var(--spacing-small)}.account-orders-list-card .dropin-card__content{padding:var(--spacing-medium);display:grid;grid-template-areas:"content actions" "imageList actions";gap:0;max-height:100%}.account-orders-list-card .account-orders-list-card__content{grid-area:content;margin-bottom:var(--spacing-small)}.account-orders-list-card__content--quantity{font-weight:500;color:var(--color-neutral-800)}.account-orders-list-card__content--track_number,.account-orders-list-card__content--return_number{font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-strong-letter-spacing)}.account-orders-list-card .account-orders-list-card__content>div:first-child{font-weight:500}.account-orders-list-card .account-orders-list-card__content p,.account-orders-list-card .account-orders-list-card__content div{padding:0;text-align:left;font:var(--type-body-1-default-font);margin:0 0 var(--spacing-small) 0;color:var(--color-neutral-800)}.account-orders-list-card p.account-orders-list-card__content--product-name{margin:0}.account-orders-list-card .account-orders-list-card__content p:last-child{margin:0}.account-orders-list-card .account-orders-list-card__content div{font:var(--type-button-2-font);margin-bottom:var(--spacing-small)}.account-orders-list-card .account-orders-list-card__actions{grid-area:actions}.account-orders-list-card .account-orders-list-card__images{overflow:auto}.account-orders-list-card .account-orders-list-card__images .dropin-content-grid__content{grid-template-columns:repeat(6,max-content)!important}.account-orders-list-card .account-orders-list-card__images-3 .dropin-content-grid__content{grid-template-columns:repeat(3,max-content)!important}.account-orders-list-card .account-orders-list-card__images img{object-fit:contain;width:65px;height:65px}.account-orders-list-card .account-orders-list-card__actions{position:relative;align-self:center;margin-left:auto}@media (min-width: 768px){.account-orders-list-card.account-orders-list-card--full .dropin-card__content{max-height:100%}}.account-addresses-header{margin-bottom:var(--spacing-medium)}.account-addresses-wrapper{box-sizing:border-box;position:relative}.account-addresses-wrapper--select-view{position:relative;margin:0;padding:0;border:none}.account-addresses-wrapper--select-view input[type=radio]{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;padding:0;margin:-1px;border:0;overflow:hidden}.account-addresses-wrapper--select-view .account-addresses-wrapper__label{cursor:pointer;display:block;border-radius:0}.account-addresses-wrapper--select-view .account-addresses-wrapper__label .account-address-card{border-radius:0}.account-addresses-wrapper--select-view .account-addresses-wrapper__label:nth-child(2){border-radius:var(--shape-border-radius-1) var(--shape-border-radius-1) 0 0}.account-addresses-wrapper--select-view>.account-addresses-wrapper__label:nth-child(2)>.account-address-card{border-radius:var(--shape-border-radius-1) var(--shape-border-radius-1) 0 0}.account-addresses-wrapper--select-view>.account-addresses-wrapper__label:last-child,.account-addresses-wrapper--select-view>.account-addresses-wrapper__label:last-child>.account-actions-address.account-actions-address--address{border-radius:0 0 var(--shape-border-radius-1) var(--shape-border-radius-1)}.account-addresses-wrapper--select-view .account-addresses-wrapper__label .account-address-card,.account-addresses-wrapper--select-view .account-addresses-wrapper__label .account-actions-address.account-actions-address--address{background-color:var(--color-neutral-200)}.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label>.account-address-card{border:var(--shape-border-width-1) solid var(--color-neutral-900);position:relative}.account-addresses-wrapper--select-view input[type=radio]:focus+.account-addresses-wrapper__label>.account-address-card{border:var(--shape-border-width-1) solid var(--color-neutral-900);outline:var(--spacing-xxsmall) solid var(--color-button-focus);position:relative}.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label>.account-addresses-form__footer__wrapper{border:var(--shape-border-width-1) solid var(--color-neutral-900);position:relative}.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label .account-address-card,.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label .account-actions-address.account-actions-address--address{background-color:var(--color-neutral-50)}.account-addresses-wrapper--select-view .account-address-card{margin:0}.account-addresses-wrapper--select-view .account-addresses-form__footer__wrapper{padding:var(--spacing-medium)}.account-address-form-wrapper{box-sizing:border-box;background-color:var(--color-neutral-50)}.account-address-form-wrapper__notification{margin-bottom:var(--spacing-medium)}.account-address-form-wrapper__title{color:var(--color-neutral-800);font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing);margin-bottom:var(--spacing-medium)}.account-address-form-wrapper__buttons{display:flex;align-items:center;justify-content:end;gap:0 var(--spacing-medium);margin-top:var(--spacing-medium)}.account-address-form-wrapper__buttons--empty{gap:0;margin:0;padding:0;display:inline-block}.account-address-form-wrapper__buttons button{min-width:142px}.account-change-password .dropin-card__content{gap:0}.account-change-password__title,.account-change-password .account-change-password__notification,.account-change-password .account-change-password__fields .account-change-password__fields-item{margin-bottom:var(--spacing-medium)}.account-change-password .account-change-password__fields .account-change-password__fields-item:last-child{margin-bottom:0}.account-change-password .account-change-password__actions{display:flex;justify-content:right;align-items:center;gap:0 var(--grid-3-gutters);margin-top:var(--spacing-xlarge)}.account-change-password .account-change-password__actions button{min-width:144px}.account-edit-customer-information__title{margin-bottom:var(--spacing-medium)}.account-edit-customer-information .dropin-card__content{gap:0}.account-edit-customer-information .account-edit-customer-information__notification{margin-bottom:var(--spacing-medium)}.account-edit-customer-information .account-edit-customer-information-form__field:nth-child(n+3),.account-edit-customer-information .account-edit-customer-information__password{grid-column:span 2}.account-edit-customer-information .account-edit-customer-information__actions{display:flex;justify-content:end;align-items:center;gap:0 var(--grid-2-gutters);grid-column:span 2}.account-edit-customer-information .account-edit-customer-information__actions button{min-width:144px}.customer-information__title{margin-bottom:var(--spacing-medium)}.account-customer-information-card-short{margin-bottom:var(--spacing-small)}.account-customer-information-card .dropin-card__content{gap:0}.account-customer-information-card__wrapper{display:grid;grid-template-columns:1fr auto;align-items:start}.account-customer-information-card .account-customer-information-card__actions{display:flex;justify-content:space-between;align-items:center;gap:0 var(--grid-2-gutters)}.account-customer-information-card .account-customer-information-card__actions button{cursor:pointer;margin:0;padding:0}.account-customer-information-card__content p{font:var(--type-body-1-default-font);margin:0 var(--spacing-xsmall) 0 0;line-height:var(--spacing-xbig);padding:0}.account-customer-information-card__content p:nth-child(1),.account-customer-information-card__content p:nth-child(2){font:var(--type-body-1-strong-font);font-weight:500;margin:0 var(--spacing-xsmall) var(--spacing-xsmall) 0}.account-customer-information-card__content p:nth-child(1){float:left}`,{styleId:"account"}); -import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import{Render as o}from"@dropins/tools/lib.js";import{useState as n,useEffect as i}from"@dropins/tools/preact-hooks.js";import{UIProvider as l}from"@dropins/tools/components.js";import{events as c}from"@dropins/tools/event-bus.js";const m={minifiedView:{CustomerInformation:{containerTitle:"Account settings",genderMale:"Male",genderFemale:"Female",changePassword:{passwordValidationMessage:{chartTwoSymbols:"Use characters and numbers or symbols",chartThreeSymbols:"Use characters, numbers and symbols",chartFourSymbols:"Use uppercase characters, lowercase characters, numbers and symbols",messageLengthPassword:"At least {minLength} characters long",passwordMismatch:"Passwords do not match. Please make sure both password fields are identical",incorrectCurrentPassword:"The current password you entered is incorrect. Please check and try again.",passwordUpdateMessage:"Your password has been updated"},containerTitle:"Change password",currentPassword:{placeholder:"Password",floatingLabel:"Password"},newPassword:{placeholder:"New Password",floatingLabel:"New Password"},confirmPassword:{placeholder:"Confirm new password",floatingLabel:"Confirm new password"},buttonSecondary:"Cancel",buttonPrimary:"Save"},customerInformationCard:{buttonSecondary:"Change password",buttonPrimary:"Edit",accountCreation:"Account creation date"},editCustomerInformation:{containerTitle:"Edit details",buttonSecondary:"Cancel",buttonPrimary:"Save",accountSuccess:"Your account information has been updated.",accountError:"Your account information has not been updated.",passwordField:{placeholder:"Password",floatingLabel:"Password"}}},Addresses:{containerTitle:"Addresses",editAddressFormTitle:"Edit address",differentAddressFormTitle:"Deliver to new address",viewAllAddressesButton:"View address list",differentAddressButton:"Use a different address",addressCard:{actionRemove:"Remove",actionEdit:"Edit",cardLabelShipping:"Shipping",cardLabelBilling:"Billing",defaultLabelText:"DEFAULT"},removeAddressModal:{title:"Remove address",description:"Are you sure you would like to remove this address?",actionCancel:"Cancel",actionConfirm:"Remove"}},OrdersList:{containerTitle:"Recent orders",viewAllOrdersButton:"View all orders",ariaLabelLink:"Redirect to full order information",dateOrderPlaced:"Date order placed",OrdersListCard:{orderNumber:"Order number:",itemsAmount:"items",carrier:"Carrier:",returns:"Return(s):",orderDate:"Placed on"},OrdersListSelectDate:{pastSixMonths:"Past 6 months",currentYear:"Current year",viewAll:"View all"}},EmptyList:{Addresses:{message:"No saved addresses"},OrdersList:{message:"No orders"}}},fullSizeView:{Addresses:{containerTitle:"Addresses",editAddressFormTitle:"Edit address",differentAddressFormTitle:"Deliver to new address",newAddressFormTitle:"Add address",addNewAddressButton:"Create new",differentAddressButton:"Use a different address",addressCard:{actionRemove:"Remove",actionEdit:"Edit",cardLabelShipping:"Shipping",cardLabelBilling:"Billing",defaultLabelText:"DEFAULT"},removeAddressModal:{title:"Remove address",description:"Are you sure you would like to remove this address?",actionCancel:"Cancel",actionConfirm:"Remove"}},OrdersList:{containerTitle:"Your orders",ariaLabelLink:"Redirect to full order information",dateOrderPlaced:"Date order placed",OrdersListCard:{orderNumber:"Order number:",itemsAmount:"items",carrier:"Carrier:",returns:"Return(s):",orderDate:"Placed on"},OrdersListSelectDate:{pastSixMonths:"Past 6 months",currentYear:"Current year",viewAll:"View all"}},EmptyList:{Addresses:{message:"No saved addresses"},OrdersList:{message:"No orders"}}},AddressForm:{formText:{secondaryButton:"Cancel",primaryButton:"Save",defaultShippingLabel:"Set as default shipping address",defaultBillingLabel:"Set as default billing address",saveAddressBook:"Save in address book"}},FormText:{requiredFieldError:"This is a required field.",numericError:"Only numeric values are allowed.",alphaNumWithSpacesError:"Only alphanumeric characters and spaces are allowed.",alphaNumericError:"Only alphanumeric characters are allowed.",alphaError:"Only alphabetic characters are allowed.",emailError:"Please enter a valid email address.",dateError:"Please enter a valid date.",dateLengthError:"Date must be between {min} and {max}.",urlError:"Please enter a valid URL, e.g., http://www.adobe.com.",lengthTextError:"Text length must be between {min} and {max} characters."}},u={Account:m},w={default:u},p=({children:a})=>{const[s,t]=n("en_US");return i(()=>{const e=c.on("locale",d=>{t(d)},{eager:!0});return()=>{e==null||e.off()}},[]),r(l,{lang:s,langDefinitions:w,children:a})},L=new o(r(p,{}));export{L as render}; +.account-form{display:grid;flex-direction:column;gap:var(--spacing-medium)}@media (min-width: 768px){.account-form{display:grid;grid-template-columns:repeat(2,1fr)}.account-form>.dropin-field:nth-child(1),.account-form>.dropin-field:nth-child(2){grid-column:span 1}.account-form>.dropin-field:nth-child(3),.account-form>.dropin-field:nth-child(4),.account-form>.dropin-field:nth-child(5){grid-column:span 2}.account-form>.dropin-field:nth-child(6),.account-form>.dropin-field:nth-child(7){grid-column:span 1}.account-form>.dropin-field:nth-child(8),.account-form>.dropin-field:nth-child(9){grid-column:span 1}.account-form>.dropin-field:nth-child(n+10){grid-column:span 2}}.account-form [class$=-hidden]{position:absolute;opacity:0;height:0;width:0;overflow:hidden;clip:rect(0,0,0,0)}.account-account-loaders--card-loader{margin-bottom:var(--spacing-small)}.account-account-loaders--picker-loader div:first-child{max-width:200px}.account-account-loaders--picker-loader div:nth-child(3){max-width:400px}.account-address-card{margin-bottom:var(--spacing-small)}.account-address-card .dropin-card__content{display:grid;grid-template-columns:1fr auto;gap:var(--spacing-small) 0px;grid-template-areas:"description action" "labels action"}.account-address-card .account-address-card__action{display:flex;justify-content:flex-end;align-items:baseline;cursor:pointer;grid-area:action}.account-address-card .account-address-card__action--editbutton{margin-left:var(--spacing-small)}.account-address-card .account-address-card__action button{padding:0}.account-address-card .account-address-card__action button:hover{text-decoration:underline}.account-address-card .account-address-card__description{grid-area:description;margin:0;padding:0}.account-address-card .account-address-card__labels{display:flex;gap:0 var(--spacing-xsmall);grid-area:labels}.account-address-card .account-address-card__description p{font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);line-height:var(--spacing-xbig);color:var(--color-neutral-800);padding:0;margin:0 var(--spacing-xsmall) 0 0}.account-address-card .account-address-card__description p:nth-child(1),.account-address-card .account-address-card__description p:nth-child(2){margin:0 var(--spacing-xsmall) var(--spacing-xsmall) 0;color:var(--color-neutral-800);font:var(--type-button-2-font);font-weight:500;cursor:default}.account-address-card .account-address-card__description p:nth-child(1),.account-address-card .account-address-card__description p:nth-child(3),.account-address-card .account-address-card__description p:nth-child(4),.account-address-card .account-address-card__description p:nth-child(6){float:left}.account-actions-address{cursor:pointer;padding:var(--spacing-xsmall) var(--spacing-medium);border-radius:var(--shape-border-radius-2);border:var(--shape-border-width-2) solid var(--color-neutral-400);background-color:var(--color-neutral-50);width:100%;height:88px;display:flex;align-items:center;justify-content:space-between}.account-actions-address--selectable{max-width:100%;width:auto}.account-actions-address__title{font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing);-moz-appearance:none;appearance:none;-webkit-appearance:none;color:var(--color-neutral-800)}.account-actions-address svg{stroke:var(--shape-icon-stroke-4);color:var(--color-neutral-800)}@supports (height: 100dvh){.account-address-modal .dropin-modal{height:100dvh}}.account-address-modal--overlay{position:relative;padding:var(--spacing-small) var(--spacing-small) var(--spacing-small) var(--spacing-small);width:100%;margin:auto;max-width:340px}@media (min-width: 768px){.account-address-modal--overlay{position:relative;padding:var(--spacing-xbig) var(--spacing-xxbig) var(--spacing-xxbig) var(--spacing-xxbig);width:100%;margin:auto;max-width:721px}.account-address-card .dropin-card__content{padding:var(--spacing-small)}}.dropin-modal__body--medium>.dropin-modal__header-title,.dropin-modal__body--full>.dropin-modal__header-title,.account-address-modal .dropin-modal__content{margin:0;align-items:center}.account-address-modal .dropin-modal__header-title-content h3{font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);margin:0;padding:0}.account-address-modal .account-address-modal__spinner{position:absolute;top:0;left:0;background-color:var(--color-neutral-200);opacity:.8;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:1}.account-address-modal p{margin:var(--spacing-small) 0}@media (min-width: 768px){.account-address-modal p{color:var(--color-neutral-800);font:var(--type-body-2-strong-font);letter-spacing:var(--type-body-2-strong-letter-spacing);margin-bottom:var(--spacing-medium)}}.account-address-modal .account-address-modal__buttons{display:flex;align-items:center;justify-content:right;gap:0 var(--spacing-small)}.account-empty-list{margin-bottom:var(--spacing-small)}.account-empty-list.account-empty-list--minified,.account-empty-list .dropin-card{border:none}.account-empty-list .dropin-card__content{gap:0;padding:var(--spacing-xxbig)}.account-empty-list.account-empty-list--minified .dropin-card__content{flex-direction:row;align-items:center;padding:var(--spacing-big) var(--spacing-small)}.account-empty-list .dropin-card__content svg{width:64px;height:64px;margin-bottom:var(--spacing-medium)}.account-empty-list.account-empty-list--minified .dropin-card__content svg{margin:0 var(--spacing-small) 0 0;width:32px;height:32px}.account-empty-list .dropin-card__content svg path{fill:var(--color-neutral-800)}.account-empty-list.account-empty-list--minified .dropin-card__content svg path{fill:var(--color-neutral-500)}.account-empty-list .dropin-card__content p{font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);color:var(--color-neutral-800)}.account-empty-list.account-empty-list--minified .dropin-card__content p{font:var(--type-body-1-strong-font);color:var(--color-neutral-800)}.account-orders-list-action{margin:0;padding:0;border:none;background-color:transparent;cursor:pointer;text-decoration:none}a.account-orders-list-action:focus-visible{display:inline-block}.account-orders-list-action--minifiedView{width:100%;text-align:left;font:var(--type-body-1-default-font)}.account-orders-list-action.account-orders-list-action--minifiedView:hover{text-decoration:none}.account-orders-list-action--minifiedView .account-orders-list-action__card-wrapper{display:flex;justify-content:space-between;align-items:center;color:var(--color-neutral-800);height:calc(88px - var(--spacing-small) * 2)}.account-orders-list-action__card-wrapper>p{font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing)}.account-orders-list-action__card-wrapper svg,.account-orders-list-action svg{color:var(--color-neutral-800)}.account-orders-list-action--minifiedView .dropin-card__content{padding:var(--spacing-small) var(--spacing-medium)}.account-orders-list-action--minifiedView p{font:var(--type-body-1-strong-font)}.account-orders-list-card{height:100%;margin-bottom:var(--spacing-small)}.account-orders-list-card .dropin-card__content{padding:var(--spacing-medium);display:grid;grid-template-areas:"content actions" "imageList actions";gap:0;max-height:100%}.account-orders-list-card .account-orders-list-card__content{grid-area:content;margin-bottom:var(--spacing-small)}.account-orders-list-card__content--quantity{font-weight:500;color:var(--color-neutral-800)}.account-orders-list-card__content--track_number,.account-orders-list-card__content--return_number{font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-strong-letter-spacing)}.account-orders-list-card .account-orders-list-card__content>div:first-child{font-weight:500}.account-orders-list-card .account-orders-list-card__content p,.account-orders-list-card .account-orders-list-card__content div{padding:0;text-align:left;font:var(--type-body-1-default-font);margin:0 0 var(--spacing-small) 0;color:var(--color-neutral-800)}.account-orders-list-card p.account-orders-list-card__content--product-name{margin:0}.account-orders-list-card .account-orders-list-card__content p:last-child{margin:0}.account-orders-list-card .account-orders-list-card__content div{font:var(--type-button-2-font);margin-bottom:var(--spacing-small)}.account-orders-list-card .account-orders-list-card__actions{grid-area:actions}.account-orders-list-card .account-orders-list-card__images{overflow:auto}.account-orders-list-card .account-orders-list-card__images .dropin-content-grid__content{grid-template-columns:repeat(6,max-content)!important}.account-orders-list-card .account-orders-list-card__images-3 .dropin-content-grid__content{grid-template-columns:repeat(3,max-content)!important}.account-orders-list-card .account-orders-list-card__images img{object-fit:contain;width:65px;height:65px}.account-orders-list-card .account-orders-list-card__actions{position:relative;align-self:center;margin-left:auto}@media (min-width: 768px){.account-orders-list-card.account-orders-list-card--full .dropin-card__content{max-height:100%}}.account-addresses-header{margin-bottom:var(--spacing-medium)}.account-addresses-wrapper{box-sizing:border-box;position:relative}.account-addresses-wrapper--select-view{position:relative;margin:0;padding:0;border:none}.account-addresses-wrapper--select-view input[type=radio]{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;padding:0;margin:-1px;border:0;overflow:hidden}.account-addresses-wrapper--select-view .account-addresses-wrapper__label{cursor:pointer;display:block;border-radius:0}.account-addresses-wrapper--select-view .account-addresses-wrapper__label .account-address-card{border-radius:0}.account-addresses-wrapper--select-view .account-addresses-wrapper__label:nth-child(2){border-radius:var(--shape-border-radius-1) var(--shape-border-radius-1) 0 0}.account-addresses-wrapper--select-view>.account-addresses-wrapper__label:nth-child(2)>.account-address-card{border-radius:var(--shape-border-radius-1) var(--shape-border-radius-1) 0 0}.account-addresses-wrapper--select-view>.account-addresses-wrapper__label:last-child,.account-addresses-wrapper--select-view>.account-addresses-wrapper__label:last-child>.account-actions-address.account-actions-address--address{border-radius:0 0 var(--shape-border-radius-1) var(--shape-border-radius-1)}.account-addresses-wrapper--select-view .account-addresses-wrapper__label .account-address-card,.account-addresses-wrapper--select-view .account-addresses-wrapper__label .account-actions-address.account-actions-address--address{background-color:var(--color-neutral-200)}.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label>.account-address-card{border:var(--shape-border-width-1) solid var(--color-neutral-900);position:relative}.account-addresses-wrapper--select-view input[type=radio]:focus+.account-addresses-wrapper__label>.account-address-card{border:var(--shape-border-width-1) solid var(--color-neutral-900);outline:var(--spacing-xxsmall) solid var(--color-button-focus);position:relative}.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label>.account-addresses-form__footer__wrapper{border:var(--shape-border-width-1) solid var(--color-neutral-900);position:relative}.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label .account-address-card,.account-addresses-wrapper--select-view input[type=radio]:checked+.account-addresses-wrapper__label .account-actions-address.account-actions-address--address{background-color:var(--color-neutral-50)}.account-addresses-wrapper--select-view .account-address-card{margin:0}.account-addresses-wrapper--select-view .account-addresses-form__footer__wrapper{padding:var(--spacing-medium)}.account-address-form-wrapper{box-sizing:border-box;background-color:var(--color-neutral-50)}.account-address-form-wrapper__notification{margin-bottom:var(--spacing-medium)}.account-address-form-wrapper__title{color:var(--color-neutral-800);font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing);margin-bottom:var(--spacing-medium)}.account-address-form-wrapper__buttons{display:flex;align-items:center;justify-content:end;gap:0 var(--spacing-medium);margin-top:var(--spacing-medium)}.account-address-form-wrapper__buttons--empty{gap:0;margin:0;padding:0;display:inline-block}.account-address-form-wrapper__buttons button{min-width:142px}.account-change-password .dropin-card__content{gap:0}.account-change-password__title,.account-change-password .account-change-password__notification,.account-change-password .account-change-password__fields .account-change-password__fields-item{margin-bottom:var(--spacing-medium)}.account-change-password .account-change-password__fields .account-change-password__fields-item:last-child{margin-bottom:0}.account-change-password .account-change-password__actions{display:flex;justify-content:right;align-items:center;gap:0 var(--grid-3-gutters)}.account-change-password .account-change-password__actions button{min-width:144px}.account-edit-customer-information__title{margin-bottom:var(--spacing-medium)}.account-edit-customer-information .dropin-card__content{gap:0}.account-edit-customer-information .account-edit-customer-information__notification{margin-bottom:var(--spacing-medium)}.account-edit-customer-information .account-edit-customer-information-form__field:nth-child(n+3),.account-edit-customer-information .account-edit-customer-information__password{grid-column:span 2}.account-edit-customer-information .account-edit-customer-information__actions{display:flex;justify-content:end;align-items:center;gap:0 var(--grid-2-gutters);grid-column:span 2}.account-edit-customer-information .account-edit-customer-information__actions button{min-width:144px}.customer-information__title{margin-bottom:var(--spacing-medium)}.account-customer-information-card-short{margin-bottom:var(--spacing-small)}.account-customer-information-card .dropin-card__content{gap:0}.account-customer-information-card__wrapper{display:grid;grid-template-columns:1fr;align-items:start;gap:var(--grid-1-gutters) 0}.account-customer-information-card .account-customer-information-card__actions{margin-left:auto;display:flex;justify-content:space-between;align-items:center;gap:0 var(--grid-2-gutters)}@media (max-width: 300px){.account-customer-information-card .account-customer-information-card__actions{align-items:self-end;flex-direction:column-reverse}}.account-customer-information-card .account-customer-information-card__actions button{cursor:pointer;margin:0;padding:0}.account-customer-information-card__content p{font:var(--type-body-1-default-font);margin:0 var(--spacing-xsmall) 0 0;line-height:var(--spacing-xbig);padding:0}.account-customer-information-card__content p:nth-child(1),.account-customer-information-card__content p:nth-child(2){font:var(--type-body-1-strong-font);font-weight:500;margin:0 var(--spacing-xsmall) var(--spacing-xsmall) 0}.account-customer-information-card__content p:nth-child(1){float:left}`,{styleId:"account"}); +import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import{Render as o}from"@dropins/tools/lib.js";import{useState as n,useEffect as i}from"@dropins/tools/preact-hooks.js";import{UIProvider as l}from"@dropins/tools/components.js";import{events as c}from"@dropins/tools/event-bus.js";const m={minifiedView:{CustomerInformation:{containerTitle:"Account settings",genderMale:"Male",genderFemale:"Female",changePassword:{passwordValidationMessage:{chartTwoSymbols:"Use characters and numbers or symbols",chartThreeSymbols:"Use characters, numbers and symbols",chartFourSymbols:"Use uppercase characters, lowercase characters, numbers and symbols",messageLengthPassword:"At least {minLength} characters long",passwordMismatch:"Passwords do not match. Please make sure both password fields are identical",incorrectCurrentPassword:"The current password you entered is incorrect. Please check and try again.",passwordUpdateMessage:"Your password has been updated"},containerTitle:"Change password",currentPassword:{placeholder:"Password",floatingLabel:"Password"},newPassword:{placeholder:"New Password",floatingLabel:"New Password"},confirmPassword:{placeholder:"Confirm new password",floatingLabel:"Confirm new password"},buttonSecondary:"Cancel",buttonPrimary:"Save"},customerInformationCard:{buttonSecondary:"Change password",buttonPrimary:"Edit",accountCreation:"Account creation date"},editCustomerInformation:{containerTitle:"Edit details",buttonSecondary:"Cancel",buttonPrimary:"Save",accountSuccess:"Your account information has been updated.",accountError:"Your account information has not been updated.",passwordField:{placeholder:"Password",floatingLabel:"Password"}}},Addresses:{containerTitle:"Addresses",editAddressFormTitle:"Edit address",differentAddressFormTitle:"Deliver to new address",viewAllAddressesButton:"View address list",differentAddressButton:"Use a different address",ariaLabelAddressPicker:"form",addressCard:{actionRemove:"Remove",actionEdit:"Edit",cardLabelShipping:"Shipping",cardLabelBilling:"Billing",defaultLabelText:"DEFAULT"},removeAddressModal:{title:"Remove address",description:"Are you sure you would like to remove this address?",actionCancel:"Cancel",actionConfirm:"Remove"}},OrdersList:{containerTitle:"Recent orders",viewAllOrdersButton:"View all orders",ariaLabelLink:"Redirect to full order information",dateOrderPlaced:"Date order placed",OrdersListCard:{orderNumber:"Order number:",itemsAmount:"items",carrier:"Carrier:",returns:"Return(s):",orderDate:"Placed on"},OrdersListSelectDate:{pastSixMonths:"Past 6 months",currentYear:"Current year",viewAll:"View all"}},EmptyList:{Addresses:{message:"No saved addresses"},OrdersList:{message:"No orders"}}},fullSizeView:{Addresses:{containerTitle:"Addresses",editAddressFormTitle:"Edit address",differentAddressFormTitle:"Deliver to new address",newAddressFormTitle:"Add address",addNewAddressButton:"Create new",differentAddressButton:"Use a different address",ariaLabelAddressPicker:"form",addressCard:{actionRemove:"Remove",actionEdit:"Edit",cardLabelShipping:"Shipping",cardLabelBilling:"Billing",defaultLabelText:"DEFAULT"},removeAddressModal:{title:"Remove address",description:"Are you sure you would like to remove this address?",actionCancel:"Cancel",actionConfirm:"Remove"}},OrdersList:{containerTitle:"Your orders",ariaLabelLink:"Redirect to full order information",dateOrderPlaced:"Date order placed",OrdersListCard:{orderNumber:"Order number:",itemsAmount:"items",carrier:"Carrier:",returns:"Return(s):",orderDate:"Placed on"},OrdersListSelectDate:{pastSixMonths:"Past 6 months",currentYear:"Current year",viewAll:"View all"}},EmptyList:{Addresses:{message:"No saved addresses"},OrdersList:{message:"No orders"}}},AddressForm:{formText:{secondaryButton:"Cancel",primaryButton:"Save",defaultShippingLabel:"Set as default shipping address",defaultBillingLabel:"Set as default billing address",saveAddressBook:"Save in address book"}},FormText:{requiredFieldError:"This is a required field.",numericError:"Only numeric values are allowed.",alphaNumWithSpacesError:"Only alphanumeric characters and spaces are allowed.",alphaNumericError:"Only alphanumeric characters are allowed.",alphaError:"Only alphabetic characters are allowed.",emailError:"Please enter a valid email address.",dateError:"Please enter a valid date.",dateLengthError:"Date must be between {min} and {max}.",urlError:"Please enter a valid URL, e.g., http://www.adobe.com.",lengthTextError:"Text length must be between {min} and {max} characters."}},u={Account:m},w={default:u},p=({children:a})=>{const[s,t]=n("en_US");return i(()=>{const e=c.on("locale",d=>{t(d)},{eager:!0});return()=>{e==null||e.off()}},[]),r(l,{lang:s,langDefinitions:w,children:a})},L=new o(r(p,{}));export{L as render}; diff --git a/scripts/__dropins__/storefront-account/render/index.d.ts b/scripts/__dropins__/storefront-account/render/index.d.ts index b758d268a3..bb8c6e6977 100644 --- a/scripts/__dropins__/storefront-account/render/index.d.ts +++ b/scripts/__dropins__/storefront-account/render/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './render'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-account/types/addresses.types.d.ts b/scripts/__dropins__/storefront-account/types/addresses.types.d.ts index e61393761b..dad05dd71f 100644 --- a/scripts/__dropins__/storefront-account/types/addresses.types.d.ts +++ b/scripts/__dropins__/storefront-account/types/addresses.types.d.ts @@ -1,4 +1,3 @@ -import { HTMLAttributes } from 'preact/compat'; import { CustomerAddressesModel } from '../data/models'; import { FieldsProps } from './form.types'; import { SlotProps } from '@dropins/tools/types/elsie/src/src/lib'; @@ -46,7 +45,9 @@ export interface AddressesProps { onSubmit?: () => Promise; onAddressData?: (values: {} | CustomerAddressesModel | undefined) => void; } -export interface AddressesWrapperProps extends AddressesProps { +export interface AddressesWrapperProps extends Omit { + inputName: string; + minifiedViewKey: 'minifiedView' | 'fullSizeView'; } export interface useAddressesProps extends Omit { } @@ -71,7 +72,8 @@ export interface AddressCardProps { handleRenderModal?: () => void | undefined; handleRenderForm?: () => void | undefined; } -export interface AddressActionsProps extends HTMLAttributes { +export interface AddressActionsProps { + className?: string; selectable?: boolean; minifiedView?: boolean; addNewAddress?: boolean; diff --git a/scripts/__dropins__/storefront-account/types/api/createCustomerAddress.types.d.ts b/scripts/__dropins__/storefront-account/types/api/createCustomerAddress.types.d.ts index ce059f78c2..22711107e4 100644 --- a/scripts/__dropins__/storefront-account/types/api/createCustomerAddress.types.d.ts +++ b/scripts/__dropins__/storefront-account/types/api/createCustomerAddress.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface CreateCustomerAddressResponse { data: { createCustomerAddress: { diff --git a/scripts/__dropins__/storefront-account/types/api/getAttributesForm.types.d.ts b/scripts/__dropins__/storefront-account/types/api/getAttributesForm.types.d.ts index 5d973409a6..0683ece75d 100644 --- a/scripts/__dropins__/storefront-account/types/api/getAttributesForm.types.d.ts +++ b/scripts/__dropins__/storefront-account/types/api/getAttributesForm.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface ResponseAttributesFormItemsProps { code: string; sort_order: string; @@ -14,6 +30,10 @@ export interface ResponseAttributesFormItemsProps { label: string; value: string; }[]; + validate_rules: { + name: string; + value: string | number | boolean; + }[]; } export interface GetAttributesFormResponse { data: { diff --git a/scripts/__dropins__/storefront-account/types/api/getCountries.types.d.ts b/scripts/__dropins__/storefront-account/types/api/getCountries.types.d.ts index 8eec3a4a76..69dbf7da15 100644 --- a/scripts/__dropins__/storefront-account/types/api/getCountries.types.d.ts +++ b/scripts/__dropins__/storefront-account/types/api/getCountries.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface CountriesFormResponse { data: { storeConfig: { diff --git a/scripts/__dropins__/storefront-account/types/api/getCustomer.types.d.ts b/scripts/__dropins__/storefront-account/types/api/getCustomer.types.d.ts index 501fb4f10a..758916c83f 100644 --- a/scripts/__dropins__/storefront-account/types/api/getCustomer.types.d.ts +++ b/scripts/__dropins__/storefront-account/types/api/getCustomer.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface getCustomerShortResponse { data: { customer: { diff --git a/scripts/__dropins__/storefront-account/types/api/getCustomerAddress.type.d.ts b/scripts/__dropins__/storefront-account/types/api/getCustomerAddress.type.d.ts index cc57850f6e..f95ba119ce 100644 --- a/scripts/__dropins__/storefront-account/types/api/getCustomerAddress.type.d.ts +++ b/scripts/__dropins__/storefront-account/types/api/getCustomerAddress.type.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export type RegionProps = { region: string; region_code: string; diff --git a/scripts/__dropins__/storefront-account/types/api/getOrderHistoryList.types.d.ts b/scripts/__dropins__/storefront-account/types/api/getOrderHistoryList.types.d.ts index c8c9a468a3..540a0650fc 100644 --- a/scripts/__dropins__/storefront-account/types/api/getOrderHistoryList.types.d.ts +++ b/scripts/__dropins__/storefront-account/types/api/getOrderHistoryList.types.d.ts @@ -4,6 +4,8 @@ export interface PaymentMethodProps { name: string; } export interface ProductProps { + sku: string; + url_key: string; small_image: { url: string; }; @@ -39,6 +41,9 @@ export interface TotalProps { total_tax: AmountProps; total_shipping: AmountProps; discounts: DiscountProps[]; + total_giftcard: AmountProps; + subtotal_excl_tax: AmountProps; + subtotal_incl_tax: AmountProps; } export interface OrderProps { token: string; @@ -55,6 +60,8 @@ export interface OrderProps { total: TotalProps; status: string; id: string; + payment_method?: PaymentMethodProps[]; + shipments?: []; } export interface PageInfoProps { page_size: number; diff --git a/scripts/__dropins__/storefront-account/types/api/getRegions.types.d.ts b/scripts/__dropins__/storefront-account/types/api/getRegions.types.d.ts index 7d4e843805..f9a237f021 100644 --- a/scripts/__dropins__/storefront-account/types/api/getRegions.types.d.ts +++ b/scripts/__dropins__/storefront-account/types/api/getRegions.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface RegionsFormResponse { data: { country: { diff --git a/scripts/__dropins__/storefront-account/types/api/removeCustomerAddress.types.d.ts b/scripts/__dropins__/storefront-account/types/api/removeCustomerAddress.types.d.ts index 691a5be02b..18ef547135 100644 --- a/scripts/__dropins__/storefront-account/types/api/removeCustomerAddress.types.d.ts +++ b/scripts/__dropins__/storefront-account/types/api/removeCustomerAddress.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface RemoveCustomerAddressResponse { data: { deleteCustomerAddress: boolean; diff --git a/scripts/__dropins__/storefront-account/types/api/storeConfig.types.d.ts b/scripts/__dropins__/storefront-account/types/api/storeConfig.types.d.ts index 56dd9f4dec..afffe35dc7 100644 --- a/scripts/__dropins__/storefront-account/types/api/storeConfig.types.d.ts +++ b/scripts/__dropins__/storefront-account/types/api/storeConfig.types.d.ts @@ -1,7 +1,24 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface StoreConfigProps { base_media_url: string; minimum_password_length: number; required_character_classes_number: string; + store_code: string; } export interface GetStoreConfigResponse { data: { diff --git a/scripts/__dropins__/storefront-account/types/api/updateCustomerAddress.types.d.ts b/scripts/__dropins__/storefront-account/types/api/updateCustomerAddress.types.d.ts index 1bb5b59a05..adf995f11f 100644 --- a/scripts/__dropins__/storefront-account/types/api/updateCustomerAddress.types.d.ts +++ b/scripts/__dropins__/storefront-account/types/api/updateCustomerAddress.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface UpdateCustomerAddressResponse { data: { updateCustomerAddress: { diff --git a/scripts/__dropins__/storefront-account/types/api/updateCustomerPassword.types.d.ts b/scripts/__dropins__/storefront-account/types/api/updateCustomerPassword.types.d.ts index 8ce51b4031..d5d91b6478 100644 --- a/scripts/__dropins__/storefront-account/types/api/updateCustomerPassword.types.d.ts +++ b/scripts/__dropins__/storefront-account/types/api/updateCustomerPassword.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface ChangeCustomerPasswordProps { currentPassword: string; newPassword: string; diff --git a/scripts/__dropins__/storefront-account/types/form.types.d.ts b/scripts/__dropins__/storefront-account/types/form.types.d.ts index ef57abf445..f79fc2bd93 100644 --- a/scripts/__dropins__/storefront-account/types/form.types.d.ts +++ b/scripts/__dropins__/storefront-account/types/form.types.d.ts @@ -1,7 +1,7 @@ import { SlotProps } from '@dropins/tools/types/elsie/src/src/lib'; import { AttributesFormModel, Country, FieldEnumList, RegionTransform } from '../data/models'; -export interface FieldsProps extends Omit { +export interface FieldsProps extends Omit { className?: string; fieldType: FieldEnumList; id: string; @@ -33,7 +33,7 @@ export interface FormProps { loading?: boolean; showFormLoader?: boolean; onSubmit?: (event: SubmitEvent, isValid: boolean) => Promise; - onChange?: (values: Record, inputValue: Record, event: Event) => void; + onChange?: (values: Record, inputValue: Record, event: Event) => void; setInputChange?: (values: Record) => void; } export interface useFormProps extends Omit { diff --git a/scripts/__dropins__/storefront-account/types/index.d.ts b/scripts/__dropins__/storefront-account/types/index.d.ts index ecfb5c1ab8..02863fbda3 100644 --- a/scripts/__dropins__/storefront-account/types/index.d.ts +++ b/scripts/__dropins__/storefront-account/types/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './addresses.types'; export * from './addressForm.types'; export * from './form.types'; diff --git a/scripts/__dropins__/storefront-auth/api.js b/scripts/__dropins__/storefront-auth/api.js index 960a560c6b..7c52919bac 100644 --- a/scripts/__dropins__/storefront-auth/api.js +++ b/scripts/__dropins__/storefront-auth/api.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{c as f,a as g,g as n}from"./chunks/createCustomerAddress.js";import{g as x,a as d}from"./chunks/getCustomerToken.js";import{g as l}from"./chunks/getStoreConfig.js";import{r as u}from"./chunks/requestPasswordResetEmail.js";import{r as F}from"./chunks/resetPassword.js";import{r as Q}from"./chunks/revokeCustomerToken.js";import{c as H}from"./chunks/confirmEmail.js";import{r as v}from"./chunks/resendConfirmationEmail.js";import{c as A,i as P}from"./chunks/initialize.js";import{f as q,g as z,r as D,s as R,a as S,b as j}from"./chunks/network-error.js";import"./fragments.js";import"./chunks/setReCaptchaToken.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/lib.js";import"./chunks/transform-attributes-form.js";import"@dropins/tools/fetch-graphql.js";export{A as config,H as confirmEmail,f as createCustomer,g as createCustomerAddress,q as fetchGraphQl,n as getAttributesForm,z as getConfig,x as getCustomerData,d as getCustomerToken,l as getStoreConfig,P as initialize,D as removeFetchGraphQlHeader,u as requestPasswordResetEmail,v as resendConfirmationEmail,F as resetPassword,Q as revokeCustomerToken,R as setEndpoint,S as setFetchGraphQlHeader,j as setFetchGraphQlHeaders}; diff --git a/scripts/__dropins__/storefront-auth/api/confirmEmail/graphql/confirmEmail.graphql.d.ts b/scripts/__dropins__/storefront-auth/api/confirmEmail/graphql/confirmEmail.graphql.d.ts index cd22d3a02c..acdc1fc07b 100644 --- a/scripts/__dropins__/storefront-auth/api/confirmEmail/graphql/confirmEmail.graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/confirmEmail/graphql/confirmEmail.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const CONFIRM_EMAIL = "\n mutation CONFIRM_EMAIL($email: String!, $confirmation_key: String!) {\n confirmEmail(\n input: { email: $email, confirmation_key: $confirmation_key }\n ) {\n customer {\n email\n }\n }\n }\n"; //# sourceMappingURL=confirmEmail.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/confirmEmail/index.d.ts b/scripts/__dropins__/storefront-auth/api/confirmEmail/index.d.ts index 9b5a04d1b3..34f3ed16aa 100644 --- a/scripts/__dropins__/storefront-auth/api/confirmEmail/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/confirmEmail/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './confirmEmail'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/createCustomer/graphql/createCustomer.graphql.d.ts b/scripts/__dropins__/storefront-auth/api/createCustomer/graphql/createCustomer.graphql.d.ts index 38b05c9335..438792cf82 100644 --- a/scripts/__dropins__/storefront-auth/api/createCustomer/graphql/createCustomer.graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/createCustomer/graphql/createCustomer.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const CREATE_CUSTOMER: string; //# sourceMappingURL=createCustomer.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/createCustomer/graphql/createCustomerV2.graphql.d.ts b/scripts/__dropins__/storefront-auth/api/createCustomer/graphql/createCustomerV2.graphql.d.ts index 4495aeef1e..0bd5158552 100644 --- a/scripts/__dropins__/storefront-auth/api/createCustomer/graphql/createCustomerV2.graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/createCustomer/graphql/createCustomerV2.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const CREATE_CUSTOMER_V2: string; //# sourceMappingURL=createCustomerV2.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/createCustomer/index.d.ts b/scripts/__dropins__/storefront-auth/api/createCustomer/index.d.ts index 0a0f5c4d1f..d0a62e6697 100644 --- a/scripts/__dropins__/storefront-auth/api/createCustomer/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/createCustomer/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './createCustomer'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts b/scripts/__dropins__/storefront-auth/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts index ce704ced84..7896e7d3ea 100644 --- a/scripts/__dropins__/storefront-auth/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const CREATE_CUSTOMER_ADDRESS = "\n mutation CREATE_CUSTOMER_ADDRESS($input: CustomerAddressInput!) {\n createCustomerAddress(input: $input) {\n firstname\n }\n }\n"; //# sourceMappingURL=createCustomerAddress.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/createCustomerAddress/index.d.ts b/scripts/__dropins__/storefront-auth/api/createCustomerAddress/index.d.ts index 592a669c93..acc23c4a7c 100644 --- a/scripts/__dropins__/storefront-auth/api/createCustomerAddress/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/createCustomerAddress/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './createCustomerAddress'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/fetch-graphql/fetch-graphql.d.ts b/scripts/__dropins__/storefront-auth/api/fetch-graphql/fetch-graphql.d.ts index c1cc3ef7c6..66c42cc693 100644 --- a/scripts/__dropins__/storefront-auth/api/fetch-graphql/fetch-graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/fetch-graphql/fetch-graphql.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const setEndpoint: (endpoint: string) => void, setFetchGraphQlHeader: (key: string, value: string | null) => void, removeFetchGraphQlHeader: (key: string) => void, setFetchGraphQlHeaders: (header: import('@adobe/fetch-graphql').Header) => void, fetchGraphQl: (query: string, options?: import('@adobe/fetch-graphql').FetchOptions | undefined) => Promise<{ errors?: import('@adobe/fetch-graphql').FetchQueryError | undefined; data: T; diff --git a/scripts/__dropins__/storefront-auth/api/fetch-graphql/index.d.ts b/scripts/__dropins__/storefront-auth/api/fetch-graphql/index.d.ts index ea5ac123d4..535709abf8 100644 --- a/scripts/__dropins__/storefront-auth/api/fetch-graphql/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/fetch-graphql/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './fetch-graphql'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/fragments.d.ts b/scripts/__dropins__/storefront-auth/api/fragments.d.ts index 7f396f1d5a..093baff975 100644 --- a/scripts/__dropins__/storefront-auth/api/fragments.d.ts +++ b/scripts/__dropins__/storefront-auth/api/fragments.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export { CUSTOMER_INFORMATION_FRAGMENT } from './graphql/CustomerFragment.graphql'; //# sourceMappingURL=fragments.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts b/scripts/__dropins__/storefront-auth/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts index 27426bd8cd..3ba8f406fa 100644 --- a/scripts/__dropins__/storefront-auth/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_ATTRIBUTES_FORM = "\n query GET_ATTRIBUTES_FORM($formCode: String!) {\n attributesForm(formCode: $formCode) {\n items {\n code\n default_value\n entity_type\n frontend_class\n frontend_input\n is_required\n is_unique\n label\n options {\n is_default\n label\n value\n }\n ... on CustomerAttributeMetadata {\n multiline_count\n sort_order\n validate_rules {\n name\n value\n }\n }\n }\n errors {\n type\n message\n }\n }\n }\n"; //# sourceMappingURL=getAttributesForm.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/getAttributesForm/index.d.ts b/scripts/__dropins__/storefront-auth/api/getAttributesForm/index.d.ts index 8eefd8da6b..a08b096a5b 100644 --- a/scripts/__dropins__/storefront-auth/api/getAttributesForm/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/getAttributesForm/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getAttributesForm'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/getCustomerData/graphql/getCustomerData.graphql.d.ts b/scripts/__dropins__/storefront-auth/api/getCustomerData/graphql/getCustomerData.graphql.d.ts index 2628990282..7692a64c4b 100644 --- a/scripts/__dropins__/storefront-auth/api/getCustomerData/graphql/getCustomerData.graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/getCustomerData/graphql/getCustomerData.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_CUSTOMER_DATA: string; //# sourceMappingURL=getCustomerData.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/getCustomerData/index.d.ts b/scripts/__dropins__/storefront-auth/api/getCustomerData/index.d.ts index 9ee760806d..1a2276eedb 100644 --- a/scripts/__dropins__/storefront-auth/api/getCustomerData/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/getCustomerData/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getCustomerData'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/getCustomerToken/graphql/getCustomerToken.graphql.d.ts b/scripts/__dropins__/storefront-auth/api/getCustomerToken/graphql/getCustomerToken.graphql.d.ts index 81458478e1..3ee3275080 100644 --- a/scripts/__dropins__/storefront-auth/api/getCustomerToken/graphql/getCustomerToken.graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/getCustomerToken/graphql/getCustomerToken.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_CUSTOMER_TOKEN = "\n mutation GET_CUSTOMER_TOKEN($email: String!, $password: String!) {\n generateCustomerToken(email: $email, password: $password) {\n token\n }\n }\n"; //# sourceMappingURL=getCustomerToken.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/getCustomerToken/index.d.ts b/scripts/__dropins__/storefront-auth/api/getCustomerToken/index.d.ts index b74e2935a7..8f8aec2cb7 100644 --- a/scripts/__dropins__/storefront-auth/api/getCustomerToken/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/getCustomerToken/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getCustomerToken'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts b/scripts/__dropins__/storefront-auth/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts index 619b0f6c46..949b84b091 100644 --- a/scripts/__dropins__/storefront-auth/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_STORE_CONFIG = "\n query GET_STORE_CONFIG {\n storeConfig {\n autocomplete_on_storefront\n minimum_password_length\n required_character_classes_number\n store_code\n store_name\n store_group_code\n locale\n create_account_confirmation\n customer_access_token_lifetime\n }\n }\n"; //# sourceMappingURL=getStoreConfig.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/getStoreConfig/index.d.ts b/scripts/__dropins__/storefront-auth/api/getStoreConfig/index.d.ts index 572f234893..3fc5545458 100644 --- a/scripts/__dropins__/storefront-auth/api/getStoreConfig/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/getStoreConfig/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getStoreConfig'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/graphql/CustomerFragment.graphql.d.ts b/scripts/__dropins__/storefront-auth/api/graphql/CustomerFragment.graphql.d.ts index 4070778a61..d83d3d4a12 100644 --- a/scripts/__dropins__/storefront-auth/api/graphql/CustomerFragment.graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/graphql/CustomerFragment.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const CUSTOMER_INFORMATION_FRAGMENT = "\n fragment CUSTOMER_INFORMATION_FRAGMENT on Customer {\n __typename\n firstname\n lastname\n email\n is_subscribed\n }\n"; //# sourceMappingURL=CustomerFragment.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/index.d.ts b/scripts/__dropins__/storefront-auth/api/index.d.ts index f2930d4631..aea119e6f6 100644 --- a/scripts/__dropins__/storefront-auth/api/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './initialize'; export * from './fetch-graphql'; export * from './createCustomer'; diff --git a/scripts/__dropins__/storefront-auth/api/initialize/index.d.ts b/scripts/__dropins__/storefront-auth/api/initialize/index.d.ts index 66c241dc2d..6684846dc9 100644 --- a/scripts/__dropins__/storefront-auth/api/initialize/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/initialize/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './initialize'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/requestPasswordResetEmail/graphql/requestPasswordResetEmail.graphql.d.ts b/scripts/__dropins__/storefront-auth/api/requestPasswordResetEmail/graphql/requestPasswordResetEmail.graphql.d.ts index aaecdd6740..5e8847292e 100644 --- a/scripts/__dropins__/storefront-auth/api/requestPasswordResetEmail/graphql/requestPasswordResetEmail.graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/requestPasswordResetEmail/graphql/requestPasswordResetEmail.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const REQUEST_PASSWORD_RESET_EMAIL = "\n mutation REQUEST_PASSWORD_RESET_EMAIL($email: String!) {\n requestPasswordResetEmail(email: $email)\n }\n"; //# sourceMappingURL=requestPasswordResetEmail.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/requestPasswordResetEmail/index.d.ts b/scripts/__dropins__/storefront-auth/api/requestPasswordResetEmail/index.d.ts index b35667a68a..40d8e8bfe3 100644 --- a/scripts/__dropins__/storefront-auth/api/requestPasswordResetEmail/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/requestPasswordResetEmail/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './requestPasswordResetEmail'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/resendConfirmationEmail/graphql/resendConfirmationEmail.graphql.d.ts b/scripts/__dropins__/storefront-auth/api/resendConfirmationEmail/graphql/resendConfirmationEmail.graphql.d.ts index 819d68bae2..bfa933dfc5 100644 --- a/scripts/__dropins__/storefront-auth/api/resendConfirmationEmail/graphql/resendConfirmationEmail.graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/resendConfirmationEmail/graphql/resendConfirmationEmail.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const RESEND_CONFIRMATION_EMAIL = "\n mutation RESEND_CONFIRMATION_EMAIL($email: String!) {\n resendConfirmationEmail(email: $email)\n }\n"; //# sourceMappingURL=resendConfirmationEmail.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/resendConfirmationEmail/index.d.ts b/scripts/__dropins__/storefront-auth/api/resendConfirmationEmail/index.d.ts index f700042690..334c9869bb 100644 --- a/scripts/__dropins__/storefront-auth/api/resendConfirmationEmail/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/resendConfirmationEmail/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './resendConfirmationEmail'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/resetPassword/graphql/resetPassword.graphql.d.ts b/scripts/__dropins__/storefront-auth/api/resetPassword/graphql/resetPassword.graphql.d.ts index 3603770846..e602e5f870 100644 --- a/scripts/__dropins__/storefront-auth/api/resetPassword/graphql/resetPassword.graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/resetPassword/graphql/resetPassword.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const RESET_PASSWORD = "\n mutation RESET_PASSWORD(\n $email: String!\n $resetPasswordToken: String!\n $newPassword: String!\n ) {\n resetPassword(\n email: $email\n resetPasswordToken: $resetPasswordToken\n newPassword: $newPassword\n )\n }\n"; //# sourceMappingURL=resetPassword.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/resetPassword/index.d.ts b/scripts/__dropins__/storefront-auth/api/resetPassword/index.d.ts index f5a6ab3928..b7e2918eda 100644 --- a/scripts/__dropins__/storefront-auth/api/resetPassword/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/resetPassword/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './resetPassword'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/revokeCustomerToken/graphql/revokeCustomerToken.graphql.d.ts b/scripts/__dropins__/storefront-auth/api/revokeCustomerToken/graphql/revokeCustomerToken.graphql.d.ts index 615b7448ca..8ade577101 100644 --- a/scripts/__dropins__/storefront-auth/api/revokeCustomerToken/graphql/revokeCustomerToken.graphql.d.ts +++ b/scripts/__dropins__/storefront-auth/api/revokeCustomerToken/graphql/revokeCustomerToken.graphql.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const REVOKE_CUSTOMER_TOKEN = "\n mutation REVOKE_CUSTOMER_TOKEN {\n revokeCustomerToken {\n result\n }\n }\n"; //# sourceMappingURL=revokeCustomerToken.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/api/revokeCustomerToken/index.d.ts b/scripts/__dropins__/storefront-auth/api/revokeCustomerToken/index.d.ts index 45cd6096b8..e25918ccf2 100644 --- a/scripts/__dropins__/storefront-auth/api/revokeCustomerToken/index.d.ts +++ b/scripts/__dropins__/storefront-auth/api/revokeCustomerToken/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './revokeCustomerToken'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/chunks/Button.js b/scripts/__dropins__/storefront-auth/chunks/Button.js new file mode 100644 index 0000000000..a7bd0ef3f9 --- /dev/null +++ b/scripts/__dropins__/storefront-auth/chunks/Button.js @@ -0,0 +1,3 @@ +/*! Copyright 2025 Adobe +All Rights Reserved. */ +import{jsx as A,jsxs as q}from"@dropins/tools/preact-jsx-runtime.js";import{useRef as g,useState as B,useCallback as S,useEffect as k}from"@dropins/tools/preact-hooks.js";import{initReCaptcha as j}from"@dropins/tools/recaptcha.js";import{useText as v}from"@dropins/tools/i18n.js";import{memo as m}from"@dropins/tools/preact-compat.js";import{Field as y,Input as z,Picker as w,InputDate as K,Checkbox as V,TextArea as Y}from"@dropins/tools/components.js";import{classes as Q,Slot as J}from"@dropins/tools/lib.js";var f=(r=>(r.REQUIRED_FIELD_ERROR="requiredFieldError",r.NUMERIC_ERROR="numericError",r.ALPHA_NUM_WITH_SPACES_ERROR="alphaNumWithSpacesError",r.ALPHA_NUMERIC_ERROR="alphaNumericError",r.ALPHA_ERROR="alphaError",r.EMAIL_ERROR="emailError",r.DATE_ERROR="dateError",r.DATE_RANGE_ERROR="dateRangeError",r.DATE_MAX_ERROR="dateMaxError",r.DATE_MIN_ERROR="dateMinError",r.URL_ERROR="urlError",r.LENGTH_TEXT_ERROR="lengthTextError",r))(f||{});const M="/",rr=r=>{const e=v(r),t=Object.entries(e).filter(([u,l])=>l===null&&Object.values(f).includes(u)).map(([u])=>u),a=t.reduce((u,l)=>(u[l]=`Auth.FormText.${l}`,u),{}),o=v(a);return{...e,...t.reduce((u,l)=>(u[l]=o[l],u),{})}},er=r=>r.reduce((e,{customUpperCode:t,required:a,defaultValue:o})=>(a&&t&&(e.initialData[t]=o||"",e.errorList[t]=""),e),{initialData:{},errorList:{}}),tr=r=>r.reduce((e,t)=>({...e,[t.name]:t.value}),{}),ar=r=>/^\d+$/.test(r),nr=r=>/^[a-zA-Z0-9\s]+$/.test(r),or=r=>/^[a-zA-Z0-9]+$/.test(r),ur=r=>/^[a-zA-Z]+$/.test(r),lr=r=>/^[a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]+(\.[a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]+)*@([a-z0-9-]+\.)+[a-z]{2,}$/i.test(r),sr=r=>/^\d{4}-\d{2}-\d{2}$/.test(r)&&!isNaN(Date.parse(r)),cr=(r,e,t)=>{const a=new Date(r).getTime()/1e3;return!(isNaN(a)||a<0||typeof e<"u"&&at)},L=r=>{if(!r||r.trim()==="")return"";const e=parseInt(r,10);if(!isNaN(e)){const o=new Date(e*1e3);return isNaN(o.getTime())?"":o.toISOString().split("T")[0]}const t=new Date(r);if(isNaN(t.getTime()))return"";const a=parseInt(r.split("-")[1],10);return a>12||a<1?"":t.toISOString().split("T")[0]},dr=r=>/^(https?|ftp):\/\/(([A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))(\.[A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))*)(:(\d+))?(\/[A-Z0-9~](([A-Z0-9_~-]|\.)*[A-Z0-9~]|))*\/?(.*)?$/i.test(r),Er=(r,e,t)=>{const a=r.length;return a>=e&&a<=t},P=(r,e,t,a)=>{var G,H;const{requiredFieldError:o,lengthTextError:u,numericError:l,alphaNumWithSpacesError:s,alphaNumericError:p,alphaError:_,emailError:O,dateError:I,urlError:D,dateRangeError:b,dateMaxError:d,dateMinError:c}=t,n=e==null?void 0:e.customUpperCode,E={[n]:""};if(a[n]&&delete a[n],e!=null&&e.required&&(!r||r==="false"))return{[n]:`${f.REQUIRED_FIELD_ERROR}${M}${o}`};if(!(e!=null&&e.required)&&!r||!((G=e==null?void 0:e.validateRules)!=null&&G.length))return E;const T=tr(e==null?void 0:e.validateRules),i=T.MIN_TEXT_LENGTH??1,$=T.MAX_TEXT_LENGTH??255,R=T.DATE_RANGE_MIN,h=T.DATE_RANGE_MAX;if(!Er(r,+i,+$)&&!(R||h)){const N=u.replace("{min}",i).replace("{max}",$);return{[n]:`${f.LENGTH_TEXT_ERROR}${M}${N}`}}if(!cr(r,+R,+h)&&(R||h)){if(R&&R){const N=b.replace("{min}",L(R)).replace("{max}",L(h));return{[n]:`${f.DATE_RANGE_ERROR}${M}${N}`}}if(typeof R>"u"&&typeof h<"u"){const N=d.replace("{max}",L(h));return{[n]:`${f.DATE_MAX_ERROR}${M}${N}`}}if(typeof h>"u"&&typeof R<"u"){const N=c.replace("{min}",L(R));return{[n]:`${f.DATE_MIN_ERROR}${M}${N}`}}}const C={numeric:{validate:ar,error:`${f.NUMERIC_ERROR}${M}${l}`},"alphanum-with-spaces":{validate:nr,error:`${f.ALPHA_NUM_WITH_SPACES_ERROR}${M}${s}`},alphanumeric:{validate:or,error:`${f.ALPHA_NUMERIC_ERROR}${M}${p}`},alpha:{validate:ur,error:`${f.ALPHA_ERROR}${M}${_}`},email:{validate:lr,error:`${f.EMAIL_ERROR}${M}${O}`},date:{validate:sr,error:`${f.DATE_ERROR}${M}${I}`},url:{validate:dr,error:`${f.URL_ERROR}${M}${D}`}}[T.INPUT_VALIDATION];return C&&!C.validate(r)&&!((H=a[n])!=null&&H.length)?{[n]:C.error}:E},Rr=["auth-reset-password-form__buttons--signin","auth-sign-up-form-buttons--signin","auth-sign-in-form__button--forgot","auth-sign-in-form__button--signup"],hr=({fieldsConfig:r,onSubmit:e})=>{const t=rr({requiredFieldError:"Auth.FormText.requiredFieldError.default",lengthTextError:"Auth.FormText.lengthTextError.default",numericError:"Auth.FormText.numericError.default",alphaNumWithSpacesError:"Account.FormText.alphaNumWithSpacesError.default",alphaNumericError:"Auth.FormText.alphaNumericError.default",alphaError:"Auth.FormText.alphaError.default",emailError:"Auth.FormText.emailError.default",dateError:"Auth.FormText.dateError.default",dateRangeError:"Auth.FormText.dateRangeError.default",dateMaxError:"Auth.FormText.dateMaxError.default",dateMinError:"Auth.FormText.dateMinError.default",urlError:"Auth.FormText.urlError.default"}),a=g(null),o=g(!1),[u,l]=B({}),[s,p]=B({}),_=S(()=>{let d=!0;const c={...s};let n=null;for(const[E,T]of Object.entries(u)){const i=r==null?void 0:r.find(R=>{var h;return(h=R==null?void 0:R.customUpperCode)==null?void 0:h.includes(E)}),$=P(T.toString(),i,t,c);$[E]&&(Object.assign(c,$),d=!1),n||(n=Object.keys(c).find(R=>c[R])??null)}if(p(c),n&&a.current){const E=a.current.elements.namedItem(n);E==null||E.focus()}return d},[s,r,u,t]);k(()=>{if(r!=null&&r.length){const{initialData:d,errorList:c}=er(r);l(n=>({...d,...n})),p(c)}},[JSON.stringify(r)]);const O=S(async d=>{const c=d.target,n=!Rr.some(E=>c.classList.contains(E));!o.current&&n&&(await j(0),o.current=!0)},[]),I=S(d=>{const{name:c,value:n,type:E,checked:T}=d==null?void 0:d.target,i=E==="checkbox"?T:n;l(h=>({...h,[c]:i}));const $=r==null?void 0:r.find(h=>{var F;return(F=h==null?void 0:h.customUpperCode)==null?void 0:F.includes(c)});let R={...s};if($){const h=P(i.toString(),$,t,R);h&&Object.assign(R,h),p(R)}},[r,s,t]),D=S(d=>{const{name:c,value:n,type:E,checked:T}=d==null?void 0:d.target,i=E==="checkbox"?T:n,$=r==null?void 0:r.find(R=>R.customUpperCode===c);if($){const R={...s},h=P(i.toString(),$,t,R);h&&Object.assign(R,h),p(R)}},[s,r,t]),b=S(d=>{d.preventDefault();const c=_();e==null||e(d,c)},[_,e]);return{formData:u,errors:s,formRef:a,handleChange:I,handleBlur:D,handleSubmit:b,handleFocus:O}};var x=(r=>(r.BOOLEAN="BOOLEAN",r.DATE="DATE",r.DATETIME="DATETIME",r.DROPDOWN="DROPDOWN",r.FILE="FILE",r.GALLERY="GALLERY",r.HIDDEN="HIDDEN",r.IMAGE="IMAGE",r.MEDIA_IMAGE="MEDIA_IMAGE",r.MULTILINE="MULTILINE",r.MULTISELECT="MULTISELECT",r.PRICE="PRICE",r.SELECT="SELECT",r.TEXT="TEXT",r.TEXTAREA="TEXTAREA",r.UNDEFINED="UNDEFINED",r.VISUAL="VISUAL",r.WEIGHT="WEIGHT",r.EMPTY="",r))(x||{});const Z=r=>{const e={errorKey:"",defaultErrorMessage:""};if(!r)return e;const t=r.indexOf(M);return t===-1?e:{errorKey:r.substring(0,t).trim(),defaultErrorMessage:r.substring(t+M.length).trim()}},U=m(({item:r,errorConfig:e,className:t,itemClassName:a,loading:o,children:u})=>{const{errorKey:l,defaultErrorMessage:s}=Z(e),p=v(`Auth.FormText.${l}.${r.code}`)[r.code];let _="";return s.length&&(_=p||s),A(y,{error:_,className:Q([a,`${a}--${r.id}`,[`${a}--${r.id}-hidden`,r.isHidden],r.className]),"data-testid":`${t}--${r.id}`,disabled:o||r.disabled,children:u},r.id)}),X=m(({item:r,valueMessage:e,errorConfig:t,onBlur:a,onChange:o,onFocus:u,className:l,itemClassName:s,loading:p})=>A(U,{item:r,errorConfig:t,className:l,itemClassName:s,loading:p,children:A(z,{type:"text",name:r.customUpperCode,value:e??r.defaultValue,placeholder:r.label,floatingLabel:`${r.label} ${r.required?"*":""}`,autocomplete:r.autocomplete,onBlur:a,onChange:o,onFocus:u})})),W=m(({item:r,valueMessage:e,errorConfig:t,onBlur:a,onChange:o,className:u,itemClassName:l,loading:s})=>{var _;const p=(_=r.options.find(O=>O.isDefault))==null?void 0:_.value;return A(U,{item:r,errorConfig:t,className:u,itemClassName:l,loading:s,children:A(w,{name:r.customUpperCode,floatingLabel:`${r.label} ${r.required?"*":""}`,placeholder:r.label,"aria-label":r.label,options:r.options,onBlur:a,handleSelect:o,defaultValue:p??e??r.defaultValue,value:p??e??r.defaultValue})})}),pr=m(({item:r,valueMessage:e,errorConfig:t,onBlur:a,onChange:o,className:u,itemClassName:l,loading:s})=>A(U,{item:r,errorConfig:t,className:u,itemClassName:l,loading:s,children:A(K,{type:"text",name:r.customUpperCode,value:e||r.defaultValue,placeholder:r.label,floatingLabel:`${r.label} ${r.required?"*":""}`,onBlur:a,onChange:o,disabled:s||r.disabled})})),Ar=m(({item:r,valueMessage:e,errorConfig:t,onBlur:a,onChange:o,className:u,itemClassName:l,loading:s})=>A(U,{item:r,errorConfig:t,className:u,itemClassName:l,loading:s,children:A(V,{name:r.customUpperCode,checked:e||r.defaultValue,placeholder:r.label,label:`${r.label} ${r.required?"*":""}`,onBlur:a,onChange:o})})),Tr=m(({item:r,valueMessage:e,errorConfig:t,onBlur:a,onChange:o,className:u,itemClassName:l,loading:s})=>A(U,{item:r,errorConfig:t,className:u,itemClassName:l,loading:s,children:A(Y,{name:r.customUpperCode,value:e??r.defaultValue,label:`${r.label} ${r.required?"*":""}`,onBlur:a,onChange:o})})),$r=({slots:r,item:e,handleOnChange:t,handleOnBlur:a,handleOnFocus:o,errorConfig:u,errors:l})=>{const{errorKey:s,defaultErrorMessage:p}=Z(u),_=v(`Auth.FormText.${s}.${e.code}`)[e.code];let O="";p.length&&(O=_||p);const I={inputName:e.customUpperCode,handleOnChange:t,handleOnBlur:a,handleOnFocus:o,errorMessage:O,errors:l,config:e};return A(J,{"data-testid":`signUpFormInput_${e.code}`,name:`SignUpFormInput_${e.code}`,slot:r==null?void 0:r[`SignUpFormInput_${e.code}`],context:I},e.id)},Nr=m(({slots:r,name:e,loading:t,children:a,className:o="defaultForm",fieldsConfig:u=[],onSubmit:l,...s})=>{const{formData:p,errors:_,formRef:O,handleChange:I,handleBlur:D,handleSubmit:b,handleFocus:d}=hr({onSubmit:l,fieldsConfig:u}),c=`${o}__field`;return q("form",{className:o,onSubmit:b,name:e,ref:O,onFocus:d,...s,children:[u.map(n=>{const E=_==null?void 0:_[n.customUpperCode],T=p==null?void 0:p[n.customUpperCode],i=!!(r!=null&&r[`SignUpFormInput_${n.code}`]),$=A($r,{slots:r,item:n,handleOnChange:I,handleOnBlur:D,handleOnFocus:d,errorConfig:E,errors:_});switch(n.fieldType){case x.TEXT:return i?$:n.options.length?A(W,{item:n,valueMessage:T,errorConfig:E,onBlur:D,onChange:I,onFocus:d,itemClassName:c,className:o,loading:t}):A(X,{item:n,valueMessage:T,errorConfig:E,onBlur:D,onChange:I,onFocus:d,itemClassName:c,className:o,loading:t});case x.MULTILINE:return i?$:A(X,{item:n,valueMessage:T,errorConfig:E,onBlur:D,onChange:I,onFocus:d,itemClassName:c,className:o,loading:t});case x.SELECT:return i?$:A(W,{item:n,valueMessage:T,errorConfig:E,onBlur:D,onChange:I,itemClassName:c,className:o,loading:t});case x.DATE:return i?$:A(pr,{item:n,valueMessage:T,errorConfig:E,onBlur:D,onChange:I,itemClassName:c,className:o,loading:t});case x.BOOLEAN:return i?$:A(Ar,{item:n,valueMessage:T,errorConfig:E,onBlur:D,onChange:I,itemClassName:c,className:o,loading:t});case x.TEXTAREA:return i?$:A(Tr,{item:n,valueMessage:T,errorConfig:E,onBlur:D,onChange:I,itemClassName:c,className:o,loading:t});default:return null}}),a]})});export{Nr as F,rr as u}; diff --git a/scripts/__dropins__/storefront-auth/chunks/Button2.js b/scripts/__dropins__/storefront-auth/chunks/Button2.js index 3588745db9..fa5edf0dc1 100644 --- a/scripts/__dropins__/storefront-auth/chunks/Button2.js +++ b/scripts/__dropins__/storefront-auth/chunks/Button2.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as E,Fragment as Z,jsxs as U}from"@dropins/tools/preact-jsx-runtime.js";import{useState as R,useCallback as L,useRef as H,useEffect as P}from"@dropins/tools/preact-hooks.js";import*as f from"@dropins/tools/preact-compat.js";import{memo as W,useCallback as _}from"@dropins/tools/preact-compat.js";import{initReCaptcha as G}from"@dropins/tools/recaptcha.js";import{useText as j}from"@dropins/tools/i18n.js";import{classes as M}from"@dropins/tools/lib.js";import{Field as w,Picker as q,Input as C,InputDate as X,Checkbox as z,TextArea as B,Button as g}from"@dropins/tools/components.js";/* empty css */const Ir=r=>{if(!r)return null;const t=new FormData(r);if(t&&typeof t.entries=="function"){const o=t.entries();if(o&&typeof o[Symbol.iterator]=="function")return JSON.parse(JSON.stringify(Object.fromEntries(o)))||{}}return{}},Dr=r=>typeof r=="function",J=r=>f.createElement("svg",{id:"Icon_Warning_Base",width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},f.createElement("g",{clipPath:"url(#clip0_841_1324)"},f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.9949 2.30237L0.802734 21.6977H23.1977L11.9949 2.30237Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.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"})),f.createElement("defs",null,f.createElement("clipPath",{id:"clip0_841_1324"},f.createElement("rect",{width:24,height:21,fill:"white",transform:"translate(0 1.5)"})))),Y=r=>f.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},f.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"}),f.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.75 12.762L10.2385 15.75L17.25 9",stroke:"currentColor"})),K=r=>f.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},f.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"}),f.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"})),Q={success:E(Y,{}),warning:E(J,{}),error:E(K,{})},xr=()=>{const[r,t]=R({}),o=L(s=>{if(!s||!s.type){t({});return}const c=Q[s.type];t({...s,icon:c})},[]);return{inLineAlertProps:r,handleSetInLineAlertProps:o}};var v=(r=>(r.BOOLEAN="BOOLEAN",r.DATE="DATE",r.DATETIME="DATETIME",r.DROPDOWN="DROPDOWN",r.FILE="FILE",r.GALLERY="GALLERY",r.HIDDEN="HIDDEN",r.IMAGE="IMAGE",r.MEDIA_IMAGE="MEDIA_IMAGE",r.MULTILINE="MULTILINE",r.MULTISELECT="MULTISELECT",r.PRICE="PRICE",r.SELECT="SELECT",r.TEXT="TEXT",r.TEXTAREA="TEXTAREA",r.UNDEFINED="UNDEFINED",r.VISUAL="VISUAL",r.WEIGHT="WEIGHT",r.EMPTY="",r))(v||{});const rr=W(({loading:r,values:t,fields:o=[],errors:s,className:c="",onChange:d,onBlur:p,onFocus:A})=>{const l=`${c}__field`,$=_((e,n,a)=>{var T;const h=(T=e.options.find(N=>N.isDefault))==null?void 0:T.value;return E(w,{error:a,className:M([l,`${l}--${e.id}`,[`${l}--${e.id}-hidden`,e.isHidden],e.className]),"data-testid":`${c}--${e.id}`,disabled:r||e.disabled,children:E(q,{name:e.customUpperCode,floatingLabel:`${e.label} ${e.required?"*":""}`,placeholder:e.label,"aria-label":e.label,options:e.options,onBlur:p,handleSelect:d,defaultValue:h??n??e.defaultValue,value:h??n??e.defaultValue})},e.id)},[c,r,l,p,d]),m=_((e,n,a)=>E(w,{error:a,className:M([l,`${l}--${e.id}`,[`${l}--${e.id}-hidden`,e.isHidden],e.className]),"data-testid":`${c}--${e.id}`,disabled:r,children:E(C,{type:"text",name:e.customUpperCode,value:n??e.defaultValue,placeholder:e.label,floatingLabel:`${e.label} ${e.required?"*":""}`,onBlur:p,onChange:d,onFocus:A})},e.id),[c,r,l,p,d,A]),I=_((e,n,a)=>E(w,{error:a,className:M([l,`${l}--${e.id}`,[`${l}--${e.id}-hidden`,e.isHidden],e.className]),"data-testid":`${c}--${e.id}`,disabled:r||e.disabled,children:E(X,{type:"text",name:e.customUpperCode,value:n||e.defaultValue,placeholder:e.label,floatingLabel:`${e.label} ${e.required?"*":""}`,onBlur:p,onChange:d,disabled:r||e.disabled})},e.id),[c,r,l,p,d]),x=_((e,n,a)=>E(w,{error:a,className:M([l,`${l}--${e.id}`,[`${l}--${e.id}-hidden`,e.isHidden],e.className]),"data-testid":`${c}--${e.id}`,disabled:r,children:E(z,{name:e.customUpperCode,checked:n||e.defaultValue,placeholder:e.label,label:`${e.label} ${e.required?"*":""}`,onBlur:p,onChange:d})},e.id),[c,r,l,p,d]),D=_((e,n,a)=>E(w,{error:a,className:M([l,`${l}--${e.id}`,[`${l}--${e.id}-hidden`,e.isHidden],e.className]),"data-testid":`${c}--${e.id}`,disabled:r,children:E(B,{type:"text",name:e.customUpperCode,value:n??e.defaultValue,label:`${e.label} ${e.required?"*":""}`,onBlur:p,onChange:d})},e.id),[c,r,l,p,d]);return o.length?E(Z,{children:o.map(e=>{const n=s==null?void 0:s[e.customUpperCode],a=t==null?void 0:t[e.customUpperCode];switch(e.fieldType){case v.TEXT:return e.options.length?$(e,a,n):m(e,a,n);case v.MULTILINE:return m(e,a,n);case v.SELECT:return $(e,a,n);case v.DATE:return I(e,a,n);case v.BOOLEAN:return x(e,a,n);case v.TEXTAREA:return D(e,a,n);default:return null}})}):null}),er=r=>r.reduce((t,{customUpperCode:o,required:s,defaultValue:c})=>(s&&o&&(t.initialData[o]=c||"",t.errorList[o]=""),t),{initialData:{},errorList:{}}),tr=r=>r.reduce((t,o)=>({...t,[o.name]:o.value}),{}),ar=r=>/^\d+$/.test(r),nr=r=>/^[a-zA-Z0-9\s]+$/.test(r),or=r=>/^[a-zA-Z0-9]+$/.test(r),sr=r=>/^[a-zA-Z]+$/.test(r),lr=r=>/^[a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]+(\.[a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]+)*@([a-z0-9-]+\.)+[a-z]{2,}$/i.test(r),cr=r=>/^\d{4}-\d{2}-\d{2}$/.test(r)&&!isNaN(Date.parse(r)),ur=(r,t,o)=>{const s=new Date(r).getTime()/1e3;return!(isNaN(s)||s<0||typeof t<"u"&&so)},k=r=>{if(!r||r.trim()==="")return"";const t=parseInt(r,10);if(!isNaN(t)){const c=new Date(t*1e3);return isNaN(c.getTime())?"":c.toISOString().split("T")[0]}const o=new Date(r);if(isNaN(o.getTime()))return"";const s=parseInt(r.split("-")[1],10);return s>12||s<1?"":o.toISOString().split("T")[0]},dr=r=>/^(https?|ftp):\/\/(([A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))(\.[A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))*)(:(\d+))?(\/[A-Z0-9~](([A-Z0-9_~-]|\.)*[A-Z0-9~]|))*\/?(.*)?$/i.test(r),ir=(r,t,o)=>{const s=r.length;return s>=t&&s<=o},O=(r,t,o,s)=>{var F,y;const{requiredFieldError:c,lengthTextError:d,numericError:p,alphaNumWithSpacesError:A,alphaNumericError:l,alphaError:$,emailError:m,dateError:I,urlError:x,dateLengthError:D,dateMaxError:e,dateMinError:n}=o,a=t==null?void 0:t.customUpperCode,h={[a]:""};if(s[a]&&delete s[a],t!=null&&t.required&&!r)return{[a]:c};if(!(t!=null&&t.required)&&!r||!((F=t==null?void 0:t.validateRules)!=null&&F.length))return h;const T=tr(t==null?void 0:t.validateRules),N=T.MIN_TEXT_LENGTH??1,b=T.MAX_TEXT_LENGTH??255,u=T.DATE_RANGE_MIN,i=T.DATE_RANGE_MAX;if(!ir(r,+N,+b)&&!(u||i))return{[a]:d.replace("{min}",N).replace("{max}",b)};if(!ur(r,+u,+i)&&(u||i)){if(u&&u)return{[a]:D.replace("{min}",k(u)).replace("{max}",k(i))};if(typeof u>"u"||typeof i>"u")return{[a]:i?e.replace("{max}",k(i)):n.replace("{min}",k(u))}}const V={numeric:{validate:ar,error:p},"alphanum-with-spaces":{validate:nr,error:A},alphanumeric:{validate:or,error:l},alpha:{validate:sr,error:$},email:{validate:lr,error:m},date:{validate:cr,error:I},url:{validate:dr,error:x}}[T.INPUT_VALIDATION];return V&&!V.validate(r)&&!((y=s[a])!=null&&y.length)?{[a]:V.error}:h},pr=["auth-reset-password-form__buttons--signin","auth-sign-up-form-buttons--signin","auth-sign-in-form__button--forgot","auth-sign-in-form__button--signup"],hr=({fieldsConfig:r,onSubmit:t})=>{const o=j({requiredFieldError:"Auth.FormText.requiredFieldError",lengthTextError:"Auth.FormText.lengthTextError",numericError:"Auth.FormText.numericError",alphaNumWithSpacesError:"Account.FormText.alphaNumWithSpacesError",alphaNumericError:"Auth.FormText.alphaNumericError",alphaError:"Auth.FormText.alphaError",emailError:"Auth.FormText.emailError",dateError:"Auth.FormText.dateError",dateLengthError:"Auth.FormText.dateLengthError",dateMaxError:"Auth.FormText.dateMaxError",dateMinError:"Auth.FormText.dateMinError",urlError:"Auth.FormText.urlError"}),s=H(null),c=H(!1),[d,p]=R({}),[A,l]=R({}),$=L(()=>{let e=!0;const n={...A};let a=null;for(const[h,T]of Object.entries(d)){const N=r==null?void 0:r.find(u=>{var i;return(i=u==null?void 0:u.customUpperCode)==null?void 0:i.includes(h)}),b=O(T.toString(),N,o,n);b[h]&&(Object.assign(n,b),e=!1),a||(a=Object.keys(n).find(u=>n[u])??null)}if(l(n),a&&s.current){const h=s.current.elements.namedItem(a);h==null||h.focus()}return e},[A,r,d,o]);P(()=>{if(r!=null&&r.length){const{initialData:e,errorList:n}=er(r);p(a=>({...e,...a})),l(n)}},[JSON.stringify(r)]);const m=L(async e=>{const n=e.target,a=!pr.some(h=>n.classList.contains(h));!c.current&&a&&(await G(0),c.current=!0)},[]),I=L(e=>{const{name:n,value:a,type:h,checked:T}=e==null?void 0:e.target,N=h==="checkbox"?T:a;p(i=>({...i,[n]:N}));const b=r==null?void 0:r.find(i=>{var S;return(S=i==null?void 0:i.customUpperCode)==null?void 0:S.includes(n)});let u={...A};if(b){const i=O(N.toString(),b,o,u);i&&Object.assign(u,i),l(u)}},[r,A,o]),x=L(e=>{const{name:n,value:a,type:h,checked:T}=e==null?void 0:e.target,N=h==="checkbox"?T:a,b=r==null?void 0:r.find(u=>u.customUpperCode===n);if(b){const u={...A},i=O(N.toString(),b,o,u);i&&Object.assign(u,i),l(u)}},[A,r,o]),D=L(e=>{e.preventDefault();const n=$();t==null||t(e,n)},[$,t]);return{formData:d,errors:A,formRef:s,handleChange:I,handleBlur:x,handleSubmit:D,handleFocus:m}},vr=({name:r,loading:t,children:o,className:s="defaultForm",fieldsConfig:c=[],onSubmit:d,...p})=>{const{formData:A,errors:l,formRef:$,handleChange:m,handleBlur:I,handleSubmit:x,handleFocus:D}=hr({onSubmit:d,fieldsConfig:c});return U("form",{className:s,onSubmit:x,name:r,ref:$,onFocus:D,...p,children:[E(rr,{className:s,onFocus:D,fields:c,onChange:m,onBlur:I,errors:l,values:A,loading:t}),o]})},Lr=({type:r,buttonText:t,variant:o,className:s="",enableLoader:c=!1,onClick:d,style:p,icon:A,...l})=>{const $=L(I=>{d==null||d(I)},[d]);return U(g,{icon:A,style:p,type:r,variant:o,className:M(["auth-button",s,c?"enableLoader":""]),onClick:$,...l,children:[E("span",{className:"auth-button__text",children:t}),c?E("div",{className:"auth-button__wrapper",children:E("span",{className:"auth-button__loader"})}):null]})};export{Lr as B,vr as F,Dr as c,Ir as g,xr as u}; +import{jsx as s,jsxs as f}from"@dropins/tools/preact-jsx-runtime.js";import{useState as g,useCallback as l}from"@dropins/tools/preact-hooks.js";import*as t from"@dropins/tools/preact-compat.js";import{classes as d}from"@dropins/tools/lib.js";import{Button as w}from"@dropins/tools/components.js";import"./Button.js";const M=e=>{if(!e)return null;const r=new FormData(e);if(r&&typeof r.entries=="function"){const n=r.entries();if(n&&typeof n[Symbol.iterator]=="function")return JSON.parse(JSON.stringify(Object.fromEntries(n)))||{}}return{}},S=e=>typeof e=="function",E=e=>t.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},t.createElement("g",{clipPath:"url(#clip0_841_1324)"},t.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.9949 2.30237L0.802734 21.6977H23.1977L11.9949 2.30237Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),t.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"})),t.createElement("defs",null,t.createElement("clipPath",{id:"clip0_841_1324"},t.createElement("rect",{width:24,height:21,fill:"white",transform:"translate(0 1.5)"})))),v=e=>t.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.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"}),t.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.75 12.762L10.2385 15.75L17.25 9",stroke:"currentColor"})),L=e=>t.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.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"}),t.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"})),k={success:s(v,{}),warning:s(E,{}),error:s(L,{})},b=()=>{const[e,r]=g({}),n=l(o=>{if(!o||!o.type){r({});return}const c=k[o.type];r({...o,icon:c})},[]);return{inLineAlertProps:e,handleSetInLineAlertProps:n}},y=({type:e,buttonText:r,variant:n,className:o="",enableLoader:c=!1,onClick:a,style:i,icon:u,...h})=>{const m=l(p=>{a==null||a(p)},[a]);return f(w,{icon:u,style:i,type:e,variant:n,className:d(["auth-button",o,c?"enableLoader":""]),onClick:m,...h,children:[s("span",{className:"auth-button__text",children:r}),c?s("div",{className:"auth-button__wrapper",children:s("span",{className:"auth-button__loader"})}):null]})};export{y as B,S as c,M as g,b as u}; diff --git a/scripts/__dropins__/storefront-auth/chunks/ResetPasswordForm.js b/scripts/__dropins__/storefront-auth/chunks/ResetPasswordForm.js index 7a41f8862b..a63bbc496e 100644 --- a/scripts/__dropins__/storefront-auth/chunks/ResetPasswordForm.js +++ b/scripts/__dropins__/storefront-auth/chunks/ResetPasswordForm.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsxs as l,jsx as o}from"@dropins/tools/preact-jsx-runtime.js";import{classes as b}from"@dropins/tools/lib.js";/* empty css */import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{r as h}from"./requestPasswordResetEmail.js";import{g as _,c as w,u as F,F as P,B as p}from"./Button2.js";import{useState as x,useCallback as g}from"@dropins/tools/preact-hooks.js";import{useText as R}from"@dropins/tools/i18n.js";import{Header as N,InLineAlert as v}from"@dropins/tools/components.js";import{s as E,D as L}from"./simplifyTransformAttributesForm.js";import*as y from"@dropins/tools/preact-compat.js";const T=t=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},y.createElement("path",{d:"M7.74512 9.87701L12.0001 14.132L16.2551 9.87701",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square",strokeLinejoin:"round"})),D=({routeSignIn:t,onErrorCallback:a,setActiveComponent:m,handleSetInLineAlertProps:s})=>{const n=R({successPasswordResetEmailNotification:"Auth.Notification.successPasswordResetEmailNotification"}),[r,e]=x(!1),d=g(async u=>{u.preventDefault(),e(!0);const i=_(u.target);if(i&&i.email){const f=await h(i.email);f.success?s==null||s({type:"success",text:n.successPasswordResetEmailNotification.replace("{email}",i.email)}):(a==null||a(f),s==null||s({type:"error",text:f.message}))}e(!1)},[s,a,n.successPasswordResetEmailNotification]),c=g(()=>{if(w(m)){m("signInForm");return}w(t)&&(window.location.href=t())},[m,t]);return{isLoading:r,submitResetPassword:d,redirectToSignInPage:c}},$=({formSize:t="default",routeSignIn:a,setActiveComponent:m,onErrorCallback:s,...n})=>{const r=R({title:"Auth.ResetPasswordForm.title",buttonPrimary:"Auth.ResetPasswordForm.buttonPrimary",buttonSecondary:"Auth.ResetPasswordForm.buttonSecondary",formAriaLabel:"Auth.ResetPasswordForm.formAriaLabel"}),{inLineAlertProps:e,handleSetInLineAlertProps:d}=F(),{isLoading:c,submitResetPassword:u,redirectToSignInPage:i}=D({routeSignIn:a,setActiveComponent:m,onErrorCallback:s,handleSetInLineAlertProps:d});return l("div",{...n,className:b(["auth-reset-password-form",`auth-reset-password-form--${t}`]),"data-testid":"resetPasswordForm",children:[o(N,{title:r.title,divider:!1,className:"auth-reset-password-form__title"}),e.text?o(v,{className:"auth-reset-password-form__notification",type:e.type,variant:"secondary",heading:e.text,icon:e.icon}):null,o(P,{"aria-labelledby":r.formAriaLabel,name:"resetPassword_form",className:"auth-reset-password-form__form",onSubmit:u,loading:c,fieldsConfig:E(L),children:l("div",{className:"auth-reset-password-form__buttons",children:[o(p,{className:"auth-reset-password-form__buttons--signin",type:"button",variant:"tertiary",style:{padding:"0"},icon:o(T,{style:{transform:"rotate(90deg)"}}),buttonText:r.buttonSecondary,enableLoader:!1,onClick:i}),o(p,{type:"submit",buttonText:r.buttonPrimary,variant:"primary",enableLoader:c})]})}),o("div",{id:"requestPasswordResetEmail"})]})};export{$ as R}; +import{jsxs as l,jsx as o}from"@dropins/tools/preact-jsx-runtime.js";import{classes as b}from"@dropins/tools/lib.js";import{F as h}from"./Button.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{r as _}from"./requestPasswordResetEmail.js";import{g as F,c as w,u as P,B as p}from"./Button2.js";import{useState as x,useCallback as g}from"@dropins/tools/preact-hooks.js";import{useText as R}from"@dropins/tools/i18n.js";import{Header as N,InLineAlert as v}from"@dropins/tools/components.js";import{s as E,D as L}from"./simplifyTransformAttributesForm.js";import*as y from"@dropins/tools/preact-compat.js";const T=t=>y.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},y.createElement("path",{d:"M7.74512 9.87701L12.0001 14.132L16.2551 9.87701",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square",strokeLinejoin:"round"})),D=({routeSignIn:t,onErrorCallback:a,setActiveComponent:m,handleSetInLineAlertProps:s})=>{const n=R({successPasswordResetEmailNotification:"Auth.Notification.successPasswordResetEmailNotification"}),[r,e]=x(!1),d=g(async u=>{u.preventDefault(),e(!0);const i=F(u.target);if(i&&i.email){const f=await _(i.email);f.success?s==null||s({type:"success",text:n.successPasswordResetEmailNotification.replace("{email}",i.email)}):(a==null||a(f),s==null||s({type:"error",text:f.message}))}e(!1)},[s,a,n.successPasswordResetEmailNotification]),c=g(()=>{if(w(m)){m("signInForm");return}w(t)&&(window.location.href=t())},[m,t]);return{isLoading:r,submitResetPassword:d,redirectToSignInPage:c}},$=({formSize:t="default",routeSignIn:a,setActiveComponent:m,onErrorCallback:s,...n})=>{const r=R({title:"Auth.ResetPasswordForm.title",buttonPrimary:"Auth.ResetPasswordForm.buttonPrimary",buttonSecondary:"Auth.ResetPasswordForm.buttonSecondary",formAriaLabel:"Auth.ResetPasswordForm.formAriaLabel"}),{inLineAlertProps:e,handleSetInLineAlertProps:d}=P(),{isLoading:c,submitResetPassword:u,redirectToSignInPage:i}=D({routeSignIn:a,setActiveComponent:m,onErrorCallback:s,handleSetInLineAlertProps:d});return l("div",{...n,className:b(["auth-reset-password-form",`auth-reset-password-form--${t}`]),"data-testid":"resetPasswordForm",children:[o(N,{title:r.title,divider:!1,className:"auth-reset-password-form__title"}),e.text?o(v,{className:"auth-reset-password-form__notification",type:e.type,variant:"secondary",heading:e.text,icon:e.icon}):null,o(h,{"aria-labelledby":r.formAriaLabel,name:"resetPassword_form",className:"auth-reset-password-form__form",onSubmit:u,loading:c,fieldsConfig:E(L),children:l("div",{className:"auth-reset-password-form__buttons",children:[o(p,{className:"auth-reset-password-form__buttons--signin",type:"button",variant:"tertiary",style:{padding:"0"},icon:o(T,{style:{transform:"rotate(90deg)"}}),buttonText:r.buttonSecondary,enableLoader:!1,onClick:i}),o(p,{type:"submit",buttonText:r.buttonPrimary,variant:"primary",enableLoader:c})]})}),o("div",{id:"requestPasswordResetEmail"})]})};export{$ as R}; diff --git a/scripts/__dropins__/storefront-auth/chunks/SignInForm.js b/scripts/__dropins__/storefront-auth/chunks/SignInForm.js index bdcc184eae..0b33fb2b6a 100644 --- a/scripts/__dropins__/storefront-auth/chunks/SignInForm.js +++ b/scripts/__dropins__/storefront-auth/chunks/SignInForm.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as c,jsxs as M}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as z,classes as R}from"@dropins/tools/lib.js";import{c as E,g as tt,u as rt,F as at,B as K}from"./Button2.js";import{useState as y,useCallback as m,useEffect as J,useMemo as et}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{a as ot}from"./getCustomerToken.js";import{r as it}from"./resendConfirmationEmail.js";import{s as st,a as nt}from"./simplifyTransformAttributesForm.js";import{f as ut,E as ct}from"./focusOnEmptyPasswordField.js";import{c as mt}from"./confirmEmail.js";import{useText as O}from"@dropins/tools/i18n.js";import{Header as ft,InLineAlert as dt,InputPassword as lt}from"@dropins/tools/components.js";/* empty css */const ht=({emailConfirmationStatusMessage:t,translations:e,initialEmailValue:s,routeSignUp:l,routeForgotPassword:u,routeRedirectOnSignIn:F,onErrorCallback:_,setActiveComponent:a,onSuccessCallback:f,onSignUpLinkClick:h,handleSetInLineAlertProps:i,routeRedirectOnEmailConfirmationClose:x})=>{const[S,L]=y(""),[v,n]=y(!1),[g,d]=y(""),[A,w]=y(!1),[U,j]=y({userName:"",status:!1}),[q,T]=y(!1),[P,N]=y([]),k=m(async r=>{i(),n(!0),w(!1),N([]),await it(r)},[i]),V=m(r=>{r.length?w(!1):w(!0),d(r)},[]);J(()=>{t!=null&&t.text&&i({text:t.text,type:t.status?t.status:void 0})},[t,i]);const D=m(()=>{g.length||w(!0)},[g]),p=m((r,o)=>g.length?!1:(w(!0),o&&ut(r,g,""),!0),[g]),B=m((r,o)=>{o!=null&&o.userName&&(r.target.reset(),E(F)?window.location.href=F():(f==null||f({userName:o==null?void 0:o.userName,status:!0}),j({userName:o==null?void 0:o.userName,status:!0})))},[f,F]),C=m((r,o)=>{var I;if((I=r==null?void 0:r.errorMessage)!=null&&I.length){L(o);const H=r.errorMessage.includes("This account isn't confirmed. Verify and try again."),b=H?e.resendEmailInformationText:r.errorMessage;N(H?[{label:e.resendEmailButtonText,onClick:()=>{k(o)}}]:[]),i({text:b,type:"error"}),d("")}},[k,i,e.resendEmailButtonText,e.resendEmailInformationText]),G=m(async(r,o)=>{if(i(),p(r,o))return;T(!0);const I=tt(r.target);if(Object.values(I).every(b=>b)){const{email:b,password:Z}=I,$=await ot({email:b,password:Z,handleSetInLineAlertProps:i,onErrorCallback:_,translations:e});C($,b),B(r,$),w(!1)}T(!1)},[e,_,p,C,B,i]),Q=m(()=>{if(E(a)){a("resetPasswordForm");return}E(u)&&(window.location.href=u())},[u,a]),W=m(()=>{if(E(h)&&h(),E(a)){a("signUpForm");return}E(l)&&(window.location.href=l())},[h,l,a]),X=et(()=>{const r=st(nt);return s!=null&&s.length?r==null?void 0:r.map(o=>({...o,defaultValue:s})):r},[s]),Y=m(()=>{i(),E(x)?window.location.href=x():n(!1)},[i,x]);return{additionalActionsAlert:P,userEmail:S,defaultEnhancedEmailFields:X,passwordError:A,isSuccessful:U,isLoading:q,signInPasswordValue:g,showEmailConfirmationForm:v,setShowEmailConfirmationForm:n,setSignInPasswordValue:d,submitLogInUser:G,forgotPasswordCallback:Q,onSignUpLinkClickCallback:W,handledOnPrimaryButtonClick:Y,handleSetPassword:V,onBlurPassword:D}},gt=()=>{let t=new URL(window.location.href),e=t.searchParams.get("email"),s=t.searchParams.get("key");e&&s&&(t.searchParams.delete("email"),t.searchParams.delete("key"),window.history.replaceState({},document.title,t.toString()))},wt=({enableEmailConfirmation:t})=>{const e=O({accountConfirmMessage:"Auth.EmailConfirmationForm.accountConfirmMessage",accountConfirmationEmailSuccessMessage:"Auth.EmailConfirmationForm.accountConfirmationEmailSuccessMessage"}),[s,l]=y({text:"",status:""});return J(()=>{if(t){const{search:u}=window.location;u.includes("email=")&&u.includes("key=")&&(async()=>{var f,h,i;const _=new URLSearchParams(u),a=await mt({customerEmail:_.get("email"),customerConfirmationKey:_.get("key")});if(!a)return null;(f=a==null?void 0:a.errors)!=null&&f.length?l({text:a==null?void 0:a.errors[0].message,status:"error"}):(l({text:a.data.confirmEmail.customer.email?e.accountConfirmationEmailSuccessMessage.replace("{email}",(i=(h=a==null?void 0:a.data)==null?void 0:h.confirmEmail.customer)==null?void 0:i.email):e.accountConfirmMessage,status:"success"}),gt())})()}},[t,e]),{emailConfirmationStatusMessage:s}},Ct=({slots:t,labels:e,formSize:s="default",initialEmailValue:l="",renderSignUpLink:u=!1,enableEmailConfirmation:F=!1,hideCloseBtnOnEmailConfirmation:_=!1,routeRedirectOnEmailConfirmationClose:a,routeRedirectOnSignIn:f,routeForgotPassword:h,routeSignUp:i,onSuccessCallback:x,setActiveComponent:S,onErrorCallback:L,onSignUpLinkClick:v})=>{const n=O({title:"Auth.SignInForm.title",buttonPrimary:"Auth.SignInForm.buttonPrimary",buttonSecondary:"Auth.SignInForm.buttonSecondary",buttonTertiary:"Auth.SignInForm.buttonTertiary",resendEmailInformationText:"Auth.Notification.resendEmailNotification.informationText",resendEmailButtonText:"Auth.Notification.resendEmailNotification.buttonText",customerTokenErrorMessage:"Auth.Api.customerTokenErrorMessage",placeholder:"Auth.InputPassword.placeholder",floatingLabel:"Auth.InputPassword.floatingLabel",requiredFieldError:"Auth.FormText.requiredFieldError"}),{emailConfirmationStatusMessage:g}=wt({enableEmailConfirmation:F}),{inLineAlertProps:d,handleSetInLineAlertProps:A}=rt(),{userEmail:w,additionalActionsAlert:U,defaultEnhancedEmailFields:j,passwordError:q,isSuccessful:T,isLoading:P,signInPasswordValue:N,showEmailConfirmationForm:k,submitLogInUser:V,forgotPasswordCallback:D,onSignUpLinkClickCallback:p,handledOnPrimaryButtonClick:B,handleSetPassword:C,onBlurPassword:G}=ht({translations:n,emailConfirmationStatusMessage:g,initialEmailValue:l,routeSignUp:i,routeForgotPassword:h,routeRedirectOnSignIn:f,setActiveComponent:S,onErrorCallback:L,onSuccessCallback:x,onSignUpLinkClick:v,handleSetInLineAlertProps:A,routeRedirectOnEmailConfirmationClose:a});return T.status&&(t!=null&&t.SuccessNotification)?c(z,{"data-testid":"successNotificationTestId",name:"SuccessNotification",slot:t==null?void 0:t.SuccessNotification,context:{isSuccessful:T}}):k?c(ct,{formSize:s,userEmail:w,inLineAlertProps:d,hideCloseBtnOnEmailConfirmation:_,handleSetInLineAlertProps:A,onPrimaryButtonClick:B}):M("div",{className:R(["auth-sign-in-form",`auth-sign-in-form--${s}`]),"data-testid":"signInForm",children:[c(ft,{title:(e==null?void 0:e.formTitleText)??n.title,divider:!1,className:"auth-sign-in-form__title"}),d.text?c(dt,{"data-testid":"authInLineAlert",className:"auth-sign-in-form__notification",type:d.type,variant:"secondary",heading:d.text,icon:d.icon,additionalActions:U}):null,M(at,{name:"signIn_form",className:"auth-sign-in-form__form",onSubmit:V,loading:P,fieldsConfig:j,children:[c(lt,{hideStatusIndicator:!0,className:"auth-sign-in-form__form__password",autoComplete:"current-password",errorMessage:q?n.requiredFieldError:void 0,defaultValue:N,onValue:C,onBlur:G,placeholder:n.placeholder,floatingLabel:n.floatingLabel}),M("div",{className:"auth-sign-in-form__form__buttons",children:[M("div",{className:"auth-sign-in-form__form__buttons__combine",children:[c(K,{type:"button",variant:"tertiary",style:{padding:0},buttonText:n.buttonTertiary,className:"auth-sign-in-form__button auth-sign-in-form__button--forgot",enableLoader:!1,onClick:D,"data-testid":"switchToSignUp"}),u?c("span",{}):null,u?c(K,{type:"button",variant:"tertiary",style:{padding:0},buttonText:n.buttonSecondary,className:"auth-sign-in-form__button auth-sign-in-form__button--signup",enableLoader:!1,onClick:p}):null]}),c(K,{type:"submit",buttonText:(e==null?void 0:e.primaryButtonText)??n.buttonPrimary,variant:"primary",className:"auth-sign-in-form__button auth-sign-in-form__button--submit",enableLoader:P})]})]}),c("div",{id:"generateCustomerToken"})]})};export{Ct as S}; +import{jsx as m,jsxs as M}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as Z,classes as z}from"@dropins/tools/lib.js";import{c as E,g as R,u as tt,B as K}from"./Button2.js";import{useState as y,useCallback as c,useEffect as J,useMemo as rt}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{a as at}from"./getCustomerToken.js";import{r as et}from"./resendConfirmationEmail.js";import{s as ot,a as it}from"./simplifyTransformAttributesForm.js";import{f as st,E as nt}from"./focusOnEmptyPasswordField.js";import{c as ut}from"./confirmEmail.js";import{useText as mt}from"@dropins/tools/i18n.js";import{Header as ct,InLineAlert as ft,InputPassword as dt}from"@dropins/tools/components.js";import{u as lt,F as ht}from"./Button.js";const gt=({emailConfirmationStatusMessage:t,translations:e,initialEmailValue:s,routeSignUp:l,routeForgotPassword:u,routeRedirectOnSignIn:F,onErrorCallback:_,setActiveComponent:a,onSuccessCallback:f,onSignUpLinkClick:h,handleSetInLineAlertProps:i,routeRedirectOnEmailConfirmationClose:b})=>{const[S,L]=y(""),[v,n]=y(!1),[g,d]=y(""),[A,w]=y(!1),[U,j]=y({userName:"",status:!1}),[q,x]=y(!1),[P,N]=y([]),k=c(async r=>{i(),n(!0),w(!1),N([]),await et(r)},[i]),V=c(r=>{r.length?w(!1):w(!0),d(r)},[]);J(()=>{t!=null&&t.text&&i({text:t.text,type:t.status?t.status:void 0})},[t,i]);const D=c(()=>{g.length||w(!0)},[g]),p=c((r,o)=>g.length?!1:(w(!0),o&&st(r,g,""),!0),[g]),B=c((r,o)=>{o!=null&&o.userName&&(r.target.reset(),E(F)?window.location.href=F():(f==null||f({userName:o==null?void 0:o.userName,status:!0}),j({userName:o==null?void 0:o.userName,status:!0})))},[f,F]),C=c((r,o)=>{var I;if((I=r==null?void 0:r.errorMessage)!=null&&I.length){L(o);const H=r.errorMessage.includes("This account isn't confirmed. Verify and try again."),T=H?e.resendEmailInformationText:r.errorMessage;N(H?[{label:e.resendEmailButtonText,onClick:()=>{k(o)}}]:[]),i({text:T,type:"error"}),d("")}},[k,i,e.resendEmailButtonText,e.resendEmailInformationText]),G=c(async(r,o)=>{if(i(),p(r,o))return;x(!0);const I=R(r.target);if(Object.values(I).every(T=>T)){const{email:T,password:Y}=I,$=await at({email:T,password:Y,handleSetInLineAlertProps:i,onErrorCallback:_,translations:e});C($,T),B(r,$),w(!1)}x(!1)},[e,_,p,C,B,i]),O=c(()=>{if(E(a)){a("resetPasswordForm");return}E(u)&&(window.location.href=u())},[u,a]),Q=c(()=>{if(E(h)&&h(),E(a)){a("signUpForm");return}E(l)&&(window.location.href=l())},[h,l,a]),W=rt(()=>{const r=ot(it);return s!=null&&s.length?r==null?void 0:r.map(o=>({...o,defaultValue:s})):r},[s]),X=c(()=>{i(),E(b)?window.location.href=b():n(!1)},[i,b]);return{additionalActionsAlert:P,userEmail:S,defaultEnhancedEmailFields:W,passwordError:A,isSuccessful:U,isLoading:q,signInPasswordValue:g,showEmailConfirmationForm:v,setShowEmailConfirmationForm:n,setSignInPasswordValue:d,submitLogInUser:G,forgotPasswordCallback:O,onSignUpLinkClickCallback:Q,handledOnPrimaryButtonClick:X,handleSetPassword:V,onBlurPassword:D}},wt=()=>{let t=new URL(window.location.href),e=t.searchParams.get("email"),s=t.searchParams.get("key");e&&s&&(t.searchParams.delete("email"),t.searchParams.delete("key"),window.history.replaceState({},document.title,t.toString()))},yt=({enableEmailConfirmation:t})=>{const e=mt({accountConfirmMessage:"Auth.EmailConfirmationForm.accountConfirmMessage",accountConfirmationEmailSuccessMessage:"Auth.EmailConfirmationForm.accountConfirmationEmailSuccessMessage"}),[s,l]=y({text:"",status:""});return J(()=>{if(t){const{search:u}=window.location;u.includes("email=")&&u.includes("key=")&&(async()=>{var f,h,i;const _=new URLSearchParams(u),a=await ut({customerEmail:_.get("email"),customerConfirmationKey:_.get("key")});if(!a)return null;(f=a==null?void 0:a.errors)!=null&&f.length?l({text:a==null?void 0:a.errors[0].message,status:"error"}):(l({text:a.data.confirmEmail.customer.email?e.accountConfirmationEmailSuccessMessage.replace("{email}",(i=(h=a==null?void 0:a.data)==null?void 0:h.confirmEmail.customer)==null?void 0:i.email):e.accountConfirmMessage,status:"success"}),wt())})()}},[t,e]),{emailConfirmationStatusMessage:s}},Mt=({slots:t,labels:e,formSize:s="default",initialEmailValue:l="",renderSignUpLink:u=!1,enableEmailConfirmation:F=!1,hideCloseBtnOnEmailConfirmation:_=!1,routeRedirectOnEmailConfirmationClose:a,routeRedirectOnSignIn:f,routeForgotPassword:h,routeSignUp:i,onSuccessCallback:b,setActiveComponent:S,onErrorCallback:L,onSignUpLinkClick:v})=>{const n=lt({title:"Auth.SignInForm.title",buttonPrimary:"Auth.SignInForm.buttonPrimary",buttonSecondary:"Auth.SignInForm.buttonSecondary",buttonTertiary:"Auth.SignInForm.buttonTertiary",resendEmailInformationText:"Auth.Notification.resendEmailNotification.informationText",resendEmailButtonText:"Auth.Notification.resendEmailNotification.buttonText",customerTokenErrorMessage:"Auth.Api.customerTokenErrorMessage",placeholder:"Auth.InputPassword.placeholder",floatingLabel:"Auth.InputPassword.floatingLabel",requiredFieldError:"Auth.FormText.requiredFieldError.default"}),{emailConfirmationStatusMessage:g}=yt({enableEmailConfirmation:F}),{inLineAlertProps:d,handleSetInLineAlertProps:A}=tt(),{userEmail:w,additionalActionsAlert:U,defaultEnhancedEmailFields:j,passwordError:q,isSuccessful:x,isLoading:P,signInPasswordValue:N,showEmailConfirmationForm:k,submitLogInUser:V,forgotPasswordCallback:D,onSignUpLinkClickCallback:p,handledOnPrimaryButtonClick:B,handleSetPassword:C,onBlurPassword:G}=gt({translations:n,emailConfirmationStatusMessage:g,initialEmailValue:l,routeSignUp:i,routeForgotPassword:h,routeRedirectOnSignIn:f,setActiveComponent:S,onErrorCallback:L,onSuccessCallback:b,onSignUpLinkClick:v,handleSetInLineAlertProps:A,routeRedirectOnEmailConfirmationClose:a});return x.status&&(t!=null&&t.SuccessNotification)?m(Z,{"data-testid":"successNotificationTestId",name:"SuccessNotification",slot:t==null?void 0:t.SuccessNotification,context:{isSuccessful:x}}):k?m(nt,{formSize:s,userEmail:w,inLineAlertProps:d,hideCloseBtnOnEmailConfirmation:_,handleSetInLineAlertProps:A,onPrimaryButtonClick:B}):M("div",{className:z(["auth-sign-in-form",`auth-sign-in-form--${s}`]),"data-testid":"signInForm",children:[m(ct,{title:(e==null?void 0:e.formTitleText)??n.title,divider:!1,className:"auth-sign-in-form__title"}),d.text?m(ft,{"data-testid":"authInLineAlert",className:"auth-sign-in-form__notification",type:d.type,variant:"secondary",heading:d.text,icon:d.icon,additionalActions:U}):null,M(ht,{name:"signIn_form",className:"auth-sign-in-form__form",onSubmit:V,loading:P,fieldsConfig:j,children:[m(dt,{hideStatusIndicator:!0,className:"auth-sign-in-form__form__password",autoComplete:"current-password",errorMessage:q?n.requiredFieldError:void 0,defaultValue:N,onValue:C,onBlur:G,placeholder:n.placeholder,floatingLabel:n.floatingLabel}),M("div",{className:"auth-sign-in-form__form__buttons",children:[M("div",{className:"auth-sign-in-form__form__buttons__combine",children:[m(K,{type:"button",variant:"tertiary",style:{padding:0},buttonText:n.buttonTertiary,className:"auth-sign-in-form__button auth-sign-in-form__button--forgot",enableLoader:!1,onClick:D,"data-testid":"switchToSignUp"}),u?m("span",{}):null,u?m(K,{type:"button",variant:"tertiary",style:{padding:0},buttonText:n.buttonSecondary,className:"auth-sign-in-form__button auth-sign-in-form__button--signup",enableLoader:!1,onClick:p}):null]}),m(K,{type:"submit",buttonText:(e==null?void 0:e.primaryButtonText)??n.buttonPrimary,variant:"primary",className:"auth-sign-in-form__button auth-sign-in-form__button--submit",enableLoader:P})]})]}),m("div",{id:"generateCustomerToken"})]})};export{Mt as S}; diff --git a/scripts/__dropins__/storefront-auth/chunks/SignUpForm.js b/scripts/__dropins__/storefront-auth/chunks/SignUpForm.js index 9241dddd23..a45ec6dde0 100644 --- a/scripts/__dropins__/storefront-auth/chunks/SignUpForm.js +++ b/scripts/__dropins__/storefront-auth/chunks/SignUpForm.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as n,jsxs as I}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as Ee,classes as Ne}from"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{g as ye,c as Ue,a as Le}from"./createCustomerAddress.js";import{useState as p,useEffect as Me,useCallback as x,useMemo as Te}from"@dropins/tools/preact-hooks.js";import{s as de,b as xe}from"./simplifyTransformAttributesForm.js";import{v as Se,u as ve,a as qe}from"./usePasswordValidationMessage.js";import{a as Ce}from"./getCustomerToken.js";import{p as le,E as ce}from"./getStoreConfig.js";import{c as $,g as Ae,u as Be,F as Ke,B as fe}from"./Button2.js";import{c as je}from"./transform-attributes-form.js";import{f as he,E as Ie}from"./focusOnEmptyPasswordField.js";import{Header as Ge,InLineAlert as He,InputPassword as ge,Field as te,Checkbox as se}from"@dropins/tools/components.js";/* empty css */import{S as Ve}from"./SkeletonLoader.js";import{useText as We}from"@dropins/tools/i18n.js";const pe=(u,t)=>t!=null&&t.length?u.map(e=>{var d;const s=(d=t.find(({code:m})=>m===e.code))==null?void 0:d.defaultValue;return s?{...e,defaultValue:s}:e}):u,$e=({inputsDefaultValueSet:u,fieldsConfigForApiVersion1:t,apiVersion2:e})=>{const[s,d]=p([]);return Me(()=>{(async()=>{if(e){const i=await ye("customer_account_create");if(i!=null&&i.length)if(u!=null&&u.length){const w=pe(i,u);d(w)}else d(i)}else{const i=de(xe),w=de(t),N=pe(i,u);d(t&&t.length?w:N)}})()},[e,t,u]),{fieldsListConfigs:s}},Oe=(u,t)=>{const e=["date_of_birth","email","firstname","gender","is_subscribed","lastname","middlename","password","prefix","suffix","taxvat"],s=je(u,"snakeCase",{firstName:"firstname",lastName:"lastname"});if(!t)return{...s,...s!=null&&s.gender?{gender:Number(s==null?void 0:s.gender)}:{}};const d={},m=[];return Object.keys(s).forEach(i=>{e.includes(i)?d[i]=i.includes("gender")?Number(s[i]):s[i]:m.push({attribute_code:i,value:s[i]})}),m.length>0&&(d.custom_attributes=m),d},Je=({requireRetypePassword:u,addressesData:t,translations:e,isEmailConfirmationRequired:s,apiVersion2:d=!0,passwordConfigs:m,isAutoSignInEnabled:i,routeRedirectOnSignIn:w,routeSignIn:N,onErrorCallback:S,onSuccessCallback:h,setActiveComponent:b,handleSetInLineAlertProps:P,routeRedirectOnEmailConfirmationClose:q})=>{const[O,C]=p(!1),[o,a]=p(""),[g,l]=p(""),[G,y]=p(""),[H,A]=p(!1),[J,B]=p({userName:"",status:!1}),[c,K]=p(""),[Q,V]=p(!1),[X,U]=p(!1),[W,Y]=p(!0),Z=x(r=>{const f=r.target.value;C(!f.length),f.length&&o.length&&f!==o&&l(e.passwordMismatch)},[o,e.passwordMismatch]),k=x(r=>{const f=r.target.value;l(f.length?"":e.requiredFieldError),f.length&&c.length&&f!==c&&l(e.passwordMismatch)},[c,e.passwordMismatch,e.requiredFieldError]),z=x(r=>{a(r),l(r?c===r?"":e.passwordMismatch:e.requiredFieldError)},[e,c]),D=x(({target:r})=>{Y(r.checked)},[]),R=x(()=>{if($(b)){b("signInForm");return}$(N)&&(window.location.href=N())},[b,N]),ee=x(r=>{K(r),C(!r.length),r===o&&l("")},[o]),re=x(()=>{P(),K(""),$(q)?window.location.href=q():(A(!1),b==null||b("signInForm"))},[P,q,b]),L=()=>{V(!0),U(!1)},_=(r,f)=>{const oe=c.length&&o.length,j=c!==o,v=()=>{C(!c.length),o||l(e.requiredFieldError),oe&&j&&l(e.passwordMismatch)},M=()=>{l(o.length?e.passwordMismatch:e.requiredFieldError),he(r,c,o)};return f?u&&(g.length||j)?(L(),M(),!0):(he(r,c,""),v(),!1):(L(),v(),!0)};return{showPasswordErrorMessage:O,confirmPassword:o,confirmPasswordMessage:g,isKeepMeLogged:W,userEmail:G,showEmailConfirmationForm:H,isSuccessful:J,isClickSubmit:Q,signUpPasswordValue:c,isLoading:X,onSubmitSignUp:async(r,f)=>{var ae,ne,me;if(P(),l(""),U(!0),_(r,f))return;const{confirmPasswordField:oe,...j}=Ae(r.target),{email:v,password:M,is_subscribed:Fe}=j,we=(m==null?void 0:m.requiredCharacterClasses)||0,be=(m==null?void 0:m.minLength)||1;if(!Se(M,we)||be>(M==null?void 0:M.length)){L();return}const Pe=Oe({...j,is_subscribed:!!Fe||!1},d),F=await Ue(Pe,d);if((ae=F==null?void 0:F.errors)!=null&&ae.length){const{errors:T}=F;P==null||P({type:"error",text:(ne=T[0])==null?void 0:ne.message}),S==null||S(T),le(ce.CREATE_ACCOUNT_EVENT,{updateProfile:!1}),y(v)}else{const T=F==null?void 0:F.firstName;if(le(ce.CREATE_ACCOUNT_EVENT,{email:F==null?void 0:F.email,updateProfile:!0}),s||!i){if(h==null||h({userName:T,status:!0}),s){(me=r.target)==null||me.reset(),K(""),A(!0),y(v),U(!1);return}if(!i){U(!1),B({userName:T,status:!0});return}}const E=await Ce({email:v,password:M,translations:e,handleSetInLineAlertProps:P,onErrorCallback:S});if(E!=null&&E.userName){if(t!=null&&t.length)for(const ue of t)try{await Le(ue)}catch(_e){console.error(e.failedCreateCustomerAddress,ue,_e)}$(w)?window.location.href=w():(h==null||h({userName:E==null?void 0:E.userName,status:!0}),B({userName:E==null?void 0:E.userName,status:!0}))}else h==null||h({userName:T,status:!0}),B({userName:T,status:!0})}U(!1)},signInButton:R,handleSetSignUpPasswordValue:ee,onKeepMeLoggedChange:D,handleHideEmailConfirmationForm:re,handleConfirmPasswordChange:z,onBlurPassword:Z,onBlurConfirmPassword:k}},ur=({requireRetypePassword:u=!1,addressesData:t,formSize:e="default",inputsDefaultValueSet:s,fieldsConfigForApiVersion1:d,apiVersion2:m=!0,isAutoSignInEnabled:i=!0,displayTermsOfUseCheckbox:w=!1,displayNewsletterCheckbox:N=!1,hideCloseBtnOnEmailConfirmation:S=!1,routeRedirectOnEmailConfirmationClose:h,routeRedirectOnSignIn:b,routeSignIn:P,onErrorCallback:q,onSuccessCallback:O,setActiveComponent:C,slots:o})=>{const a=We({title:"Auth.SignUpForm.title",buttonPrimary:"Auth.SignUpForm.buttonPrimary",buttonSecondary:"Auth.SignUpForm.buttonSecondary",privacyPolicyDefaultText:"Auth.SignUpForm.privacyPolicyDefaultText",subscribedDefaultText:"Auth.SignUpForm.subscribedDefaultText",keepMeLoggedText:"Auth.SignUpForm.keepMeLoggedText",customerTokenErrorMessage:"Auth.Api.customerTokenErrorMessage",failedCreateCustomerAddress:"Auth.SignUpForm.failedCreateCustomerAddress",placeholder:"Auth.InputPassword.placeholder",floatingLabel:"Auth.InputPassword.floatingLabel",requiredFieldError:"Auth.FormText.requiredFieldError",confirmPasswordPlaceholder:"Auth.SignUpForm.confirmPassword.placeholder",confirmPasswordFloatingLabel:"Auth.SignUpForm.confirmPassword.floatingLabel",passwordMismatch:"Auth.SignUpForm.confirmPassword.passwordMismatch"}),{passwordConfigs:g,isEmailConfirmationRequired:l}=ve(),{fieldsListConfigs:G}=$e({fieldsConfigForApiVersion1:d,apiVersion2:m,inputsDefaultValueSet:s}),{inLineAlertProps:y,handleSetInLineAlertProps:H}=Be(),{showPasswordErrorMessage:A,confirmPassword:J,confirmPasswordMessage:B,isKeepMeLogged:c,userEmail:K,showEmailConfirmationForm:Q,isSuccessful:V,isClickSubmit:X,signUpPasswordValue:U,isLoading:W,onSubmitSignUp:Y,signInButton:Z,handleSetSignUpPasswordValue:k,onKeepMeLoggedChange:z,handleHideEmailConfirmationForm:D,handleConfirmPasswordChange:R,onBlurPassword:ee,onBlurConfirmPassword:re}=Je({requireRetypePassword:u,addressesData:t,translations:a,isEmailConfirmationRequired:l,apiVersion2:m,passwordConfigs:g,isAutoSignInEnabled:i,routeRedirectOnSignIn:b,routeSignIn:P,onErrorCallback:q,onSuccessCallback:O,setActiveComponent:C,handleSetInLineAlertProps:H,routeRedirectOnEmailConfirmationClose:h}),{isValidUniqueSymbols:L,defaultLengthMessage:_}=qe({password:U,isClickSubmit:X,passwordConfigs:g}),ie=Te(()=>A?a.requiredFieldError:L==="error"||(_==null?void 0:_.status)==="error"?" ":"",[_==null?void 0:_.status,L,A,a.requiredFieldError]),r=!l&&(t==null?void 0:t.length);return!G.length&&m?n("div",{className:`auth-sign-up-form auth-sign-up-form--${e} skeleton-loader`,"data-testid":"SignUpForm",children:n(Ve,{activeSkeleton:"signUpForm"})}):V.status&&(o!=null&&o.SuccessNotification)?n(Ee,{"data-testid":"successNotificationTestId",name:"SuccessNotification",slot:o==null?void 0:o.SuccessNotification,context:{isSuccessful:V}}):Q?n(Ie,{formSize:e,userEmail:K,inLineAlertProps:y,hideCloseBtnOnEmailConfirmation:S,handleSetInLineAlertProps:H,onPrimaryButtonClick:D}):I("div",{className:Ne(["auth-sign-up-form",`auth-sign-up-form--${e}`]),"data-testid":"SignUpForm",children:[n(Ge,{title:a.title,divider:!1,className:"auth-sign-up-form__title"}),y.text?n(He,{className:"auth-sign-up-form__notification",type:y.type,variant:"secondary",heading:y.text,icon:y.icon}):null,I(Ke,{onSubmit:Y,className:"auth-sign-up-form__form",loading:W,name:"signUp_form",fieldsConfig:G,children:[I(ge,{validateLengthConfig:_,className:"auth-sign-up-form__form__field",autoComplete:"current-password",name:"password",minLength:g==null?void 0:g.minLength,errorMessage:ie,defaultValue:U,uniqueSymbolsStatus:L,requiredCharacterClasses:g==null?void 0:g.requiredCharacterClasses,onValue:k,placeholder:a.placeholder,floatingLabel:a.floatingLabel,onBlur:ee,children:[u?n("div",{className:"auth-sign-up-form__form__confirm-wrapper",children:n(ge,{className:"auth-sign-up-form__form__field auth-sign-up-form__form__field--confirm-password",autoComplete:"confirmPassword",name:"confirmPasswordField",placeholder:a.confirmPasswordPlaceholder,floatingLabel:a.confirmPasswordFloatingLabel,errorMessage:B,defaultValue:J,onValue:R,onBlur:re})}):null,r?n("div",{className:"auth-sign-up-form__automatic-login","data-testid":"automaticLogin",children:n(te,{children:n(se,{name:"",placeholder:a.keepMeLoggedText,label:a.keepMeLoggedText,checked:c,onChange:z})})}):null]}),N||w?I("div",{className:"auth-sign-up-form__item auth-sign-up-form__checkbox",children:[N?n(te,{children:n(se,{"data-testid":"isSubscribed",name:"is_subscribed",placeholder:a.subscribedDefaultText,label:a.subscribedDefaultText})}):null,w?n(te,{children:n(se,{"data-testid":"privacyPolicy",name:"privacyPolicy",placeholder:a.privacyPolicyDefaultText,label:a.privacyPolicyDefaultText})}):null]}):null,I("div",{className:"auth-sign-up-form-buttons",children:[n(fe,{className:"auth-sign-up-form-buttons--signin",type:"button",variant:"tertiary",style:{padding:0},buttonText:a.buttonSecondary,enableLoader:!1,onClick:Z}),n(fe,{type:"submit",buttonText:a.buttonPrimary,variant:"primary",enableLoader:W})]})]}),n("div",{id:"createCustomerV2"})]})};export{ur as S}; +import{jsx as u,jsxs as I}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as Pe,classes as _e}from"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{g as Ne,c as ye,a as Ee}from"./createCustomerAddress.js";import{useState as p,useEffect as Le,useCallback as T,useMemo as Ue}from"@dropins/tools/preact-hooks.js";import{s as de,b as Me}from"./simplifyTransformAttributesForm.js";import{v as xe,u as Te,a as Se}from"./usePasswordValidationMessage.js";import{a as ve}from"./getCustomerToken.js";import{p as qe,E as Ce}from"./getStoreConfig.js";import{c as $,g as Ae,u as Be,B as ce}from"./Button2.js";import{c as Ke}from"./transform-attributes-form.js";import{f as le,E as je}from"./focusOnEmptyPasswordField.js";import{Header as Ie,InLineAlert as Ge,InputPassword as fe,Field as te,Checkbox as se}from"@dropins/tools/components.js";import{u as He,F as Ve}from"./Button.js";import{S as We}from"./SkeletonLoader.js";const he=(m,t)=>t!=null&&t.length?m.map(e=>{var d;const s=(d=t.find(({code:o})=>o===e.code))==null?void 0:d.defaultValue;return s?{...e,defaultValue:s}:e}):m,$e=({inputsDefaultValueSet:m,fieldsConfigForApiVersion1:t,apiVersion2:e})=>{const[s,d]=p([]);return Le(()=>{(async()=>{if(e){const i=await Ne("customer_account_create");if(i!=null&&i.length)if(m!=null&&m.length){const F=he(i,m);d(F)}else d(i)}else{const i=de(Me),F=de(t),N=he(i,m);d(t&&t.length?F:N)}})()},[e,t,m]),{fieldsListConfigs:s.map(o=>({...o,...o.code==="email"?{autocomplete:"username"}:{}}))}},Je=(m,t)=>{const e=["dob","email","firstname","gender","is_subscribed","lastname","middlename","password","prefix","suffix","taxvat"],s=Ke(m,"snakeCase",{firstName:"firstname",lastName:"lastname"});if(!t)return{...s,...s!=null&&s.gender?{gender:Number(s==null?void 0:s.gender)}:{}};const d={},o=[];return Object.keys(s).forEach(i=>{e.includes(i)?d[i]=i.includes("gender")?Number(s[i]):s[i]:o.push({attribute_code:i,value:s[i]})}),o.length>0&&(d.custom_attributes=o),d},Oe=({requireRetypePassword:m,addressesData:t,translations:e,isEmailConfirmationRequired:s,apiVersion2:d=!0,passwordConfigs:o,isAutoSignInEnabled:i,routeRedirectOnSignIn:F,routeSignIn:N,onErrorCallback:S,onSuccessCallback:h,setActiveComponent:w,handleSetInLineAlertProps:b,routeRedirectOnEmailConfirmationClose:q})=>{const[J,C]=p(!1),[a,n]=p(""),[g,c]=p(""),[G,y]=p(""),[H,A]=p(!1),[O,B]=p({userName:"",status:!1}),[l,K]=p(""),[Q,V]=p(!1),[X,E]=p(!1),[W,Y]=p(!0),Z=T(r=>{const f=r.target.value;C(!f.length),f.length&&a.length&&f!==a&&c(e.passwordMismatch)},[a,e.passwordMismatch]),k=T(r=>{const f=r.target.value;c(f.length?"":e.requiredFieldError),f.length&&l.length&&f!==l&&c(e.passwordMismatch)},[l,e.passwordMismatch,e.requiredFieldError]),z=T(r=>{n(r),c(r?l===r?"":e.passwordMismatch:e.requiredFieldError)},[e,l]),D=T(({target:r})=>{Y(r.checked)},[]),R=T(()=>{if($(w)){w("signInForm");return}$(N)&&(window.location.href=N())},[w,N]),ee=T(r=>{K(r),C(!r.length),r===a&&c("")},[a]),re=T(()=>{b(),K(""),$(q)?window.location.href=q():(A(!1),w==null||w("signInForm"))},[b,q,w]),U=()=>{V(!0),E(!1)},P=(r,f)=>{const ie=l.length&&a.length,j=l!==a,v=()=>{C(!l.length),a||c(e.requiredFieldError),ie&&j&&c(e.passwordMismatch)},M=()=>{c(a.length?e.passwordMismatch:e.requiredFieldError),le(r,l,a)};return f?m&&(g.length||j)?(U(),M(),!0):(le(r,l,""),v(),!1):(U(),v(),!0)};return{showPasswordErrorMessage:J,confirmPassword:a,confirmPasswordMessage:g,isKeepMeLogged:W,userEmail:G,showEmailConfirmationForm:H,isSuccessful:O,isClickSubmit:Q,signUpPasswordValue:l,isLoading:X,onSubmitSignUp:async(r,f)=>{var ae,ne,ue;if(b(),c(""),E(!0),P(r,f))return;const{confirmPasswordField:ie,...j}=Ae(r.target),{email:v,password:M,is_subscribed:ge}=j,pe=(o==null?void 0:o.requiredCharacterClasses)||0,Fe=(o==null?void 0:o.minLength)||1;if(!xe(M,pe)||Fe>(M==null?void 0:M.length)){U();return}const we=Je({...j,is_subscribed:!!ge||!1},d),L=await ye(we,d);if((ae=L==null?void 0:L.errors)!=null&&ae.length){const{errors:x}=L;b==null||b({type:"error",text:(ne=x[0])==null?void 0:ne.message}),S==null||S(x),y(v)}else{const x=L==null?void 0:L.firstName;if(qe(Ce.CREATE_ACCOUNT_EVENT,{...L}),s||!i){if(h==null||h({userName:x,status:!0}),s){(ue=r.target)==null||ue.reset(),K(""),A(!0),y(v),E(!1);return}if(!i){E(!1),B({userName:x,status:!0});return}}const _=await ve({email:v,password:M,translations:e,handleSetInLineAlertProps:b,onErrorCallback:S});if(_!=null&&_.userName){if(t!=null&&t.length)for(const me of t)try{await Ee(me)}catch(be){console.error(e.failedCreateCustomerAddress,me,be)}$(F)?window.location.href=F():(h==null||h({userName:_==null?void 0:_.userName,status:!0}),B({userName:_==null?void 0:_.userName,status:!0}))}else h==null||h({userName:x,status:!0}),B({userName:x,status:!0})}E(!1)},signInButton:R,handleSetSignUpPasswordValue:ee,onKeepMeLoggedChange:D,handleHideEmailConfirmationForm:re,handleConfirmPasswordChange:z,onBlurPassword:Z,onBlurConfirmPassword:k}},ur=({requireRetypePassword:m=!1,addressesData:t,formSize:e="default",inputsDefaultValueSet:s,fieldsConfigForApiVersion1:d,apiVersion2:o=!0,isAutoSignInEnabled:i=!0,displayTermsOfUseCheckbox:F=!1,displayNewsletterCheckbox:N=!1,hideCloseBtnOnEmailConfirmation:S=!1,routeRedirectOnEmailConfirmationClose:h,routeRedirectOnSignIn:w,routeSignIn:b,onErrorCallback:q,onSuccessCallback:J,setActiveComponent:C,slots:a})=>{const n=He({title:"Auth.SignUpForm.title",buttonPrimary:"Auth.SignUpForm.buttonPrimary",buttonSecondary:"Auth.SignUpForm.buttonSecondary",privacyPolicyDefaultText:"Auth.SignUpForm.privacyPolicyDefaultText",subscribedDefaultText:"Auth.SignUpForm.subscribedDefaultText",keepMeLoggedText:"Auth.SignUpForm.keepMeLoggedText",customerTokenErrorMessage:"Auth.Api.customerTokenErrorMessage",failedCreateCustomerAddress:"Auth.SignUpForm.failedCreateCustomerAddress",placeholder:"Auth.InputPassword.placeholder",floatingLabel:"Auth.InputPassword.floatingLabel",requiredFieldError:"Auth.FormText.requiredFieldError.default",confirmPasswordPlaceholder:"Auth.SignUpForm.confirmPassword.placeholder",confirmPasswordFloatingLabel:"Auth.SignUpForm.confirmPassword.floatingLabel",passwordMismatch:"Auth.SignUpForm.confirmPassword.passwordMismatch"}),{passwordConfigs:g,isEmailConfirmationRequired:c}=Te(),{fieldsListConfigs:G}=$e({fieldsConfigForApiVersion1:d,apiVersion2:o,inputsDefaultValueSet:s}),{inLineAlertProps:y,handleSetInLineAlertProps:H}=Be(),{showPasswordErrorMessage:A,confirmPassword:O,confirmPasswordMessage:B,isKeepMeLogged:l,userEmail:K,showEmailConfirmationForm:Q,isSuccessful:V,isClickSubmit:X,signUpPasswordValue:E,isLoading:W,onSubmitSignUp:Y,signInButton:Z,handleSetSignUpPasswordValue:k,onKeepMeLoggedChange:z,handleHideEmailConfirmationForm:D,handleConfirmPasswordChange:R,onBlurPassword:ee,onBlurConfirmPassword:re}=Oe({requireRetypePassword:m,addressesData:t,translations:n,isEmailConfirmationRequired:c,apiVersion2:o,passwordConfigs:g,isAutoSignInEnabled:i,routeRedirectOnSignIn:w,routeSignIn:b,onErrorCallback:q,onSuccessCallback:J,setActiveComponent:C,handleSetInLineAlertProps:H,routeRedirectOnEmailConfirmationClose:h}),{isValidUniqueSymbols:U,defaultLengthMessage:P}=Se({password:E,isClickSubmit:X,passwordConfigs:g}),oe=Ue(()=>A?n.requiredFieldError:U==="error"||(P==null?void 0:P.status)==="error"?" ":"",[P==null?void 0:P.status,U,A,n.requiredFieldError]),r=!c&&(t==null?void 0:t.length);return!G.length&&o?u("div",{className:`auth-sign-up-form auth-sign-up-form--${e} skeleton-loader`,"data-testid":"SignUpForm",children:u(We,{activeSkeleton:"signUpForm"})}):V.status&&(a!=null&&a.SuccessNotification)?u(Pe,{"data-testid":"successNotificationTestId",name:"SuccessNotification",slot:a==null?void 0:a.SuccessNotification,context:{isSuccessful:V}}):Q?u(je,{formSize:e,userEmail:K,inLineAlertProps:y,hideCloseBtnOnEmailConfirmation:S,handleSetInLineAlertProps:H,onPrimaryButtonClick:D}):I("div",{className:_e(["auth-sign-up-form",`auth-sign-up-form--${e}`]),"data-testid":"SignUpForm",children:[u(Ie,{title:n.title,divider:!1,className:"auth-sign-up-form__title"}),y.text?u(Ge,{className:"auth-sign-up-form__notification",type:y.type,variant:"secondary",heading:y.text,icon:y.icon}):null,I(Ve,{onSubmit:Y,className:"auth-sign-up-form__form",loading:W,name:"signUp_form",fieldsConfig:G,slots:a,children:[I(fe,{validateLengthConfig:P,className:"auth-sign-up-form__form__field",autoComplete:"current-password",name:"password",minLength:g==null?void 0:g.minLength,errorMessage:oe,defaultValue:E,uniqueSymbolsStatus:U,requiredCharacterClasses:g==null?void 0:g.requiredCharacterClasses,onValue:k,placeholder:n.placeholder,floatingLabel:n.floatingLabel,onBlur:ee,children:[m?u("div",{className:"auth-sign-up-form__form__confirm-wrapper",children:u(fe,{className:"auth-sign-up-form__form__field auth-sign-up-form__form__field--confirm-password",autoComplete:"confirmPassword",name:"confirmPasswordField",placeholder:n.confirmPasswordPlaceholder,floatingLabel:n.confirmPasswordFloatingLabel,errorMessage:B,defaultValue:O,onValue:R,onBlur:re})}):null,r?u("div",{className:"auth-sign-up-form__automatic-login","data-testid":"automaticLogin",children:u(te,{children:u(se,{name:"",placeholder:n.keepMeLoggedText,label:n.keepMeLoggedText,checked:l,onChange:z})})}):null]}),N||F?I("div",{className:"auth-sign-up-form__item auth-sign-up-form__checkbox",children:[N?u(te,{children:u(se,{"data-testid":"isSubscribed",name:"is_subscribed",placeholder:n.subscribedDefaultText,label:n.subscribedDefaultText})}):null,F?u(te,{children:u(se,{"data-testid":"privacyPolicy",name:"privacyPolicy",placeholder:n.privacyPolicyDefaultText,label:n.privacyPolicyDefaultText})}):null]}):null,I("div",{className:"auth-sign-up-form-buttons",children:[u(ce,{className:"auth-sign-up-form-buttons--signin",type:"button",variant:"tertiary",style:{padding:0},buttonText:n.buttonSecondary,enableLoader:!1,onClick:Z}),u(ce,{type:"submit",buttonText:n.buttonPrimary,variant:"primary",enableLoader:W})]})]}),u("div",{id:"createCustomerV2"})]})};export{ur as S}; diff --git a/scripts/__dropins__/storefront-auth/chunks/SkeletonLoader.js b/scripts/__dropins__/storefront-auth/chunks/SkeletonLoader.js index 6bdfef8665..bc569b6709 100644 --- a/scripts/__dropins__/storefront-auth/chunks/SkeletonLoader.js +++ b/scripts/__dropins__/storefront-auth/chunks/SkeletonLoader.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{jsxs as l,jsx as e,Fragment as r}from"@dropins/tools/preact-jsx-runtime.js";import{useMemo as s}from"@dropins/tools/preact-hooks.js";import{Skeleton as a,SkeletonRow as i}from"@dropins/tools/components.js";const d=()=>l(a,{children:[e(i,{variant:"heading",size:"xlarge",fullWidth:!1,lines:1}),e(i,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1}),e(i,{variant:"heading",size:"medium",fullWidth:!1,lines:1}),e(i,{variant:"heading",size:"medium",fullWidth:!1,lines:1})," ",e(i,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1}),e(i,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1}),e(i,{variant:"heading",size:"medium",fullWidth:!0,lines:1}),e(i,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1}),e(i,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1}),e(i,{variant:"heading",size:"medium",fullWidth:!1,lines:1}),e(i,{variant:"heading",size:"medium",fullWidth:!1,lines:1})]}),h=()=>l(a,{children:[e(i,{variant:"heading",size:"xlarge",fullWidth:!1,lines:1}),e(i,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1}),e(i,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1}),e(i,{variant:"heading",size:"medium",fullWidth:!1,lines:1})," ",e(i,{variant:"heading",size:"medium",fullWidth:!1,lines:1})]}),u=()=>l(a,{children:[e(i,{variant:"heading",size:"xlarge",fullWidth:!1,lines:1}),e(i,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1}),e(i,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1}),e(i,{variant:"heading",size:"medium",fullWidth:!1,lines:1})," ",e(i,{variant:"heading",size:"medium",fullWidth:!1,lines:1})]}),o=({activeSkeleton:n})=>{const t=s(()=>({signInForm:e(h,{}),signUpForm:e(d,{}),resetPasswordForm:e(u,{})}),[]);return e(r,{children:t[n]})};export{o as S}; diff --git a/scripts/__dropins__/storefront-auth/chunks/confirmEmail.js b/scripts/__dropins__/storefront-auth/chunks/confirmEmail.js index c422fff4b9..0995e841bd 100644 --- a/scripts/__dropins__/storefront-auth/chunks/confirmEmail.js +++ b/scripts/__dropins__/storefront-auth/chunks/confirmEmail.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{f as o,h as r}from"./network-error.js";const t=` mutation CONFIRM_EMAIL($email: String!, $confirmation_key: String!) { diff --git a/scripts/__dropins__/storefront-auth/chunks/createCustomerAddress.js b/scripts/__dropins__/storefront-auth/chunks/createCustomerAddress.js index dcbc8606a1..61b4b451b8 100644 --- a/scripts/__dropins__/storefront-auth/chunks/createCustomerAddress.js +++ b/scripts/__dropins__/storefront-auth/chunks/createCustomerAddress.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{CUSTOMER_INFORMATION_FRAGMENT as N}from"../fragments.js";import{f as m,h as u}from"./network-error.js";import{s as I}from"./setReCaptchaToken.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{merge as U}from"@dropins/tools/lib.js";import{c as g}from"./initialize.js";import{t as $}from"./transform-attributes-form.js";import{h as F}from"./getStoreConfig.js";const v=` mutation CREATE_CUSTOMER($input: CustomerInput!) { @@ -18,7 +18,7 @@ import{CUSTOMER_INFORMATION_FRAGMENT as N}from"../fragments.js";import{f as m,h } } ${N} -`,G=(r,e)=>{var i,a,c,n,C,l,f,E,T,_,R,A,h,S,b,M,O,d,s,p;let o;if(e){const{data:t}=r;o={firstName:((a=(i=t==null?void 0:t.createCustomerV2)==null?void 0:i.customer)==null?void 0:a.firstname)??"",lastName:((n=(c=t==null?void 0:t.createCustomerV2)==null?void 0:c.customer)==null?void 0:n.lastname)??"",email:((l=(C=t==null?void 0:t.createCustomerV2)==null?void 0:C.customer)==null?void 0:l.email)??"",isSubscribed:((E=(f=t==null?void 0:t.createCustomerV2)==null?void 0:f.customer)==null?void 0:E.is_subscribed)??!1,customAttributes:((T=t==null?void 0:t.createCustomerV2)==null?void 0:T.custom_attributes)??[],errors:(r==null?void 0:r.errors)??[]}}else{const{data:t}=r;o={firstName:((R=(_=t==null?void 0:t.createCustomer)==null?void 0:_.customer)==null?void 0:R.firstname)??"",lastName:((h=(A=t==null?void 0:t.createCustomer)==null?void 0:A.customer)==null?void 0:h.lastname)??"",email:((b=(S=t==null?void 0:t.createCustomer)==null?void 0:S.customer)==null?void 0:b.email)??"",isSubscribed:((O=(M=t==null?void 0:t.createCustomer)==null?void 0:M.customer)==null?void 0:O.is_subscribed)??!1,errors:(r==null?void 0:r.errors)??[]}}return U(o,(p=(s=(d=g.getConfig().models)==null?void 0:d.CustomerModel)==null?void 0:s.transformer)==null?void 0:p.call(s,r))},H=async(r,e)=>{await I();const o=await m(e?y:v,{method:"POST",variables:{input:{...r}}}).catch(u);return G(o,e)},V=` +`,G=(r,e)=>{var i,a,c,n,C,l,_,f,E,T,R,A,b,h,d,S,M,O,s,p;let o;if(e){const{data:t}=r;o={firstName:((a=(i=t==null?void 0:t.createCustomerV2)==null?void 0:i.customer)==null?void 0:a.firstname)??"",lastName:((n=(c=t==null?void 0:t.createCustomerV2)==null?void 0:c.customer)==null?void 0:n.lastname)??"",email:((l=(C=t==null?void 0:t.createCustomerV2)==null?void 0:C.customer)==null?void 0:l.email)??"",isSubscribed:((f=(_=t==null?void 0:t.createCustomerV2)==null?void 0:_.customer)==null?void 0:f.is_subscribed)??!1,customAttributes:((E=t==null?void 0:t.createCustomerV2)==null?void 0:E.custom_attributes)??[],errors:(r==null?void 0:r.errors)??[]}}else{const{data:t}=r;o={firstName:((R=(T=t==null?void 0:t.createCustomer)==null?void 0:T.customer)==null?void 0:R.firstname)??"",lastName:((b=(A=t==null?void 0:t.createCustomer)==null?void 0:A.customer)==null?void 0:b.lastname)??"",email:((d=(h=t==null?void 0:t.createCustomer)==null?void 0:h.customer)==null?void 0:d.email)??"",isSubscribed:((M=(S=t==null?void 0:t.createCustomer)==null?void 0:S.customer)==null?void 0:M.is_subscribed)??!1,errors:(r==null?void 0:r.errors)??[]}}return U(o,(p=(s=(O=g.getConfig().models)==null?void 0:O.CustomerModel)==null?void 0:s.transformer)==null?void 0:p.call(s,r))},V=r=>{if(!r.dob)return r;const{dob:e,...o}=r;return{...o,date_of_birth:e}},J=async(r,e)=>{await I();const o=await m(e?y:v,{method:"POST",variables:{input:{...V(r)}}}).catch(u);return G(o,e)},w=` query GET_ATTRIBUTES_FORM($formCode: String!) { attributesForm(formCode: $formCode) { items { @@ -50,10 +50,10 @@ import{CUSTOMER_INFORMATION_FRAGMENT as N}from"../fragments.js";import{f as m,h } } } -`,J=async r=>await m(V,{method:"GET",cache:"force-cache",variables:{formCode:r}}).then(e=>{var o;return(o=e.errors)!=null&&o.length?F(e.errors):$(e)}).catch(u),w=` +`,K=async r=>await m(w,{method:"GET",cache:"force-cache",variables:{formCode:r}}).then(e=>{var o;return(o=e.errors)!=null&&o.length?F(e.errors):$(e)}).catch(u),D=` mutation CREATE_CUSTOMER_ADDRESS($input: CustomerAddressInput!) { createCustomerAddress(input: $input) { firstname } } -`,K=async r=>await m(w,{method:"POST",variables:{input:r}}).then(e=>{var o;return(o=e.errors)!=null&&o.length?F(e.errors):e.data.createCustomerAddress.firstname||""}).catch(u);export{K as a,H as c,J as g}; +`,L=async r=>await m(D,{method:"POST",variables:{input:r}}).then(e=>{var o;return(o=e.errors)!=null&&o.length?F(e.errors):e.data.createCustomerAddress.firstname||""}).catch(u);export{L as a,J as c,K as g}; diff --git a/scripts/__dropins__/storefront-auth/chunks/focusOnEmptyPasswordField.js b/scripts/__dropins__/storefront-auth/chunks/focusOnEmptyPasswordField.js index ac90985b60..e047c9150c 100644 --- a/scripts/__dropins__/storefront-auth/chunks/focusOnEmptyPasswordField.js +++ b/scripts/__dropins__/storefront-auth/chunks/focusOnEmptyPasswordField.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsxs as c,jsx as m}from"@dropins/tools/preact-jsx-runtime.js";import{classes as b}from"@dropins/tools/lib.js";import{InLineAlert as y,Header as p}from"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{r as C}from"./resendConfirmationEmail.js";import{useState as x,useCallback as E}from"@dropins/tools/preact-hooks.js";import{useText as u}from"@dropins/tools/i18n.js";/* empty css */import{B as f}from"./Button2.js";const g=({userEmail:o,handleSetInLineAlertProps:t})=>{const a=u({emailConfirmationMessage:"Auth.Notification.emailConfirmationMessage",technicalErrorSendEmail:"Auth.Notification.technicalErrors.technicalErrorSendEmail"}),[r,e]=x(!1);return{handleEmailConfirmation:E(async()=>{var n,s;if(e(!0),o){const i=await C(o);if(i){const d=(n=i==null?void 0:i.errors)==null?void 0:n.length,h=(s=i==null?void 0:i.data)==null?void 0:s.resendConfirmationEmail;t(d?{type:"error",text:a.technicalErrorSendEmail}:{type:h?"success":"error",text:a.emailConfirmationMessage})}}e(!1)},[t,a,o]),disabledButton:r}},I=({formSize:o,userEmail:t,inLineAlertProps:a,hideCloseBtnOnEmailConfirmation:r,handleSetInLineAlertProps:e,onPrimaryButtonClick:l})=>{const n=u({title:"Auth.EmailConfirmationForm.title",subtitle:"Auth.EmailConfirmationForm.subtitle",mainText:"Auth.EmailConfirmationForm.mainText",buttonPrimary:"Auth.EmailConfirmationForm.buttonPrimary",buttonSecondary:"Auth.EmailConfirmationForm.buttonSecondary"}),{handleEmailConfirmation:s,disabledButton:i}=g({userEmail:t,handleSetInLineAlertProps:e});return c("div",{className:b(["auth-email-confirmation-form",`auth-email-confirmation-form--${o}`]),children:[a.text?m(y,{className:"auth-signInForm__notification",type:a.type,variant:"secondary",heading:a.text,icon:a.icon,"data-testid":"authInLineAlert"}):null,m(p,{title:n.title,divider:!1,className:"auth-email-confirmation-form__title"}),t!=null&&t.length?m("span",{className:"auth-email-confirmation-form__subtitle",children:`${n.subtitle} ${t}`}):null,m("span",{className:"auth-email-confirmation-form__text",children:n.mainText}),c("div",{className:"auth-email-confirmation-form__buttons",children:[m(f,{type:"button",variant:"tertiary",style:{padding:0},buttonText:n.buttonSecondary,enableLoader:!1,onClick:s,disabled:i}),r?null:m(f,{type:"submit",buttonText:n.buttonPrimary,variant:"primary",enableLoader:!1,disabled:i,onClick:l})]})]})},M=(o,t,a)=>{const r=o.target.querySelector('input[name="password"]'),e=o.target.querySelector('input[name="confirmPasswordField"]');r&&!t.length?r.focus():e&&!a.length&&e.focus()};export{I as E,M as f}; +import{jsxs as c,jsx as m}from"@dropins/tools/preact-jsx-runtime.js";import{classes as b}from"@dropins/tools/lib.js";import{InLineAlert as y,Header as p}from"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{r as C}from"./resendConfirmationEmail.js";import{useState as x,useCallback as E}from"@dropins/tools/preact-hooks.js";import{useText as u}from"@dropins/tools/i18n.js";import"./Button.js";import{B as f}from"./Button2.js";const g=({userEmail:o,handleSetInLineAlertProps:t})=>{const a=u({emailConfirmationMessage:"Auth.Notification.emailConfirmationMessage",technicalErrorSendEmail:"Auth.Notification.technicalErrors.technicalErrorSendEmail"}),[r,e]=x(!1);return{handleEmailConfirmation:E(async()=>{var n,s;if(e(!0),o){const i=await C(o);if(i){const d=(n=i==null?void 0:i.errors)==null?void 0:n.length,h=(s=i==null?void 0:i.data)==null?void 0:s.resendConfirmationEmail;t(d?{type:"error",text:a.technicalErrorSendEmail}:{type:h?"success":"error",text:a.emailConfirmationMessage})}}e(!1)},[t,a,o]),disabledButton:r}},I=({formSize:o,userEmail:t,inLineAlertProps:a,hideCloseBtnOnEmailConfirmation:r,handleSetInLineAlertProps:e,onPrimaryButtonClick:l})=>{const n=u({title:"Auth.EmailConfirmationForm.title",subtitle:"Auth.EmailConfirmationForm.subtitle",mainText:"Auth.EmailConfirmationForm.mainText",buttonPrimary:"Auth.EmailConfirmationForm.buttonPrimary",buttonSecondary:"Auth.EmailConfirmationForm.buttonSecondary"}),{handleEmailConfirmation:s,disabledButton:i}=g({userEmail:t,handleSetInLineAlertProps:e});return c("div",{className:b(["auth-email-confirmation-form",`auth-email-confirmation-form--${o}`]),children:[a.text?m(y,{className:"auth-signInForm__notification",type:a.type,variant:"secondary",heading:a.text,icon:a.icon,"data-testid":"authInLineAlert"}):null,m(p,{title:n.title,divider:!1,className:"auth-email-confirmation-form__title"}),t!=null&&t.length?m("span",{className:"auth-email-confirmation-form__subtitle",children:`${n.subtitle} ${t}`}):null,m("span",{className:"auth-email-confirmation-form__text",children:n.mainText}),c("div",{className:"auth-email-confirmation-form__buttons",children:[m(f,{type:"button",variant:"tertiary",style:{padding:0},buttonText:n.buttonSecondary,enableLoader:!1,onClick:s,disabled:i}),r?null:m(f,{type:"submit",buttonText:n.buttonPrimary,variant:"primary",enableLoader:!1,disabled:i,onClick:l})]})]})},M=(o,t,a)=>{const r=o.target.querySelector('input[name="password"]'),e=o.target.querySelector('input[name="confirmPasswordField"]');r&&!t.length?r.focus():e&&!a.length&&e.focus()};export{I as E,M as f}; diff --git a/scripts/__dropins__/storefront-auth/chunks/getCustomerToken.js b/scripts/__dropins__/storefront-auth/chunks/getCustomerToken.js index 1a249bbf30..7822742048 100644 --- a/scripts/__dropins__/storefront-auth/chunks/getCustomerToken.js +++ b/scripts/__dropins__/storefront-auth/chunks/getCustomerToken.js @@ -1,16 +1,16 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{a as U,f as w,h as k}from"./network-error.js";import"@dropins/tools/recaptcha.js";import{events as x}from"@dropins/tools/event-bus.js";import{merge as y}from"@dropins/tools/lib.js";import{c as C}from"./initialize.js";import{CUSTOMER_INFORMATION_FRAGMENT as F}from"../fragments.js";import{p as E,E as O,a as S,C as R}from"./getStoreConfig.js";import{s as v}from"./setReCaptchaToken.js";const D=t=>{var f,e,i,a,r,o,u,T,s,g,N,c,_;const m={email:((e=(f=t==null?void 0:t.data)==null?void 0:f.customer)==null?void 0:e.email)??"",firstName:((a=(i=t==null?void 0:t.data)==null?void 0:i.customer)==null?void 0:a.firstname)??"",lastName:((o=(r=t==null?void 0:t.data)==null?void 0:r.customer)==null?void 0:o.lastname)??"",isSubscribed:((T=(u=t==null?void 0:t.data)==null?void 0:u.customer)==null?void 0:T.is_subscribed)??!1};return y(m,(_=(c=(N=(g=(s=C)==null?void 0:s.getConfig())==null?void 0:g.models)==null?void 0:N.CustomerModel)==null?void 0:c.transformer)==null?void 0:_.call(c,t.data))},K=` +import{a as G,f as h,h as $}from"./network-error.js";import"@dropins/tools/recaptcha.js";import{events as w}from"@dropins/tools/event-bus.js";import{merge as k}from"@dropins/tools/lib.js";import{c as R}from"./initialize.js";import{CUSTOMER_INFORMATION_FRAGMENT as C}from"../fragments.js";import{a as U,C as O,p as x,E as y}from"./getStoreConfig.js";import{s as F}from"./setReCaptchaToken.js";const v=t=>{var f,i,o,a,r,m,u,N,T,s,g,c,d;const e={email:((i=(f=t==null?void 0:t.data)==null?void 0:f.customer)==null?void 0:i.email)??"",firstName:((a=(o=t==null?void 0:t.data)==null?void 0:o.customer)==null?void 0:a.firstname)??"",lastName:((m=(r=t==null?void 0:t.data)==null?void 0:r.customer)==null?void 0:m.lastname)??"",isSubscribed:((N=(u=t==null?void 0:t.data)==null?void 0:u.customer)==null?void 0:N.is_subscribed)??!1};return k(e,(d=(c=(g=(s=(T=R)==null?void 0:T.getConfig())==null?void 0:s.models)==null?void 0:g.CustomerModel)==null?void 0:c.transformer)==null?void 0:d.call(c,t.data))},D=` query GET_CUSTOMER_DATA { customer { ...CUSTOMER_INFORMATION_FRAGMENT } } - ${F} -`,H=async t=>{if(t){const{authHeaderConfig:m}=C.getConfig();U(m.header,m.tokenPrefix?`${m.tokenPrefix} ${t}`:t)}return await w(K,{method:"GET",cache:"force-cache"}).then(m=>D(m)).catch(k)},I=` + ${C} +`,K=async t=>{if(t){const{authHeaderConfig:e}=R.getConfig();G(e.header,e.tokenPrefix?`${e.tokenPrefix} ${t}`:t)}return await h(D,{method:"GET",cache:"force-cache"}).then(e=>v(e)).catch($)},S=` mutation GET_CUSTOMER_TOKEN($email: String!, $password: String!) { generateCustomerToken(email: $email, password: $password) { token } } -`,W=async({email:t,password:m,translations:f,onErrorCallback:e,handleSetInLineAlertProps:i})=>{var g,N,c,_,h,$,G;await v();const a=await w(I,{method:"POST",variables:{email:t,password:m}}).catch(k);if(!((N=(g=a==null?void 0:a.data)==null?void 0:g.generateCustomerToken)!=null&&N.token)){const d=f.customerTokenErrorMessage,M=a!=null&&a.errors?a.errors[0].message:d;return e==null||e(M),i==null||i({type:"error",text:M}),E((c=O)==null?void 0:c.SIGN_IN,{}),{errorMessage:M,userName:""}}const r=(h=(_=a==null?void 0:a.data)==null?void 0:_.generateCustomerToken)==null?void 0:h.token,o=await H(r),u=o==null?void 0:o.firstName,T=o==null?void 0:o.email;if(!u||!T){const d=f.customerTokenErrorMessage;return e==null||e(d),i==null||i({type:"error",text:d}),E(($=O)==null?void 0:$.SIGN_IN,{}),{errorMessage:d,userName:""}}const s=await S();return document.cookie=`${R.auth_dropin_firstname}=${u}; path=/; ${s}; `,document.cookie=`${R.auth_dropin_user_token}=${r}; path=/; ${s}; `,x.emit("authenticated",!!r),E((G=O)==null?void 0:G.SIGN_IN,{email:T}),{errorMessage:"",userName:u}};export{W as a,H as g}; +`,V=async({email:t,password:e,translations:f,onErrorCallback:i,handleSetInLineAlertProps:o})=>{var s,g,c,d,E;await F();const a=await h(S,{method:"POST",variables:{email:t,password:e}}).catch($);if(!((g=(s=a==null?void 0:a.data)==null?void 0:s.generateCustomerToken)!=null&&g.token)){const M=f.customerTokenErrorMessage,_=a!=null&&a.errors?a.errors[0].message:M;return i==null||i(_),o==null||o({type:"error",text:_}),{errorMessage:_,userName:""}}const r=(d=(c=a==null?void 0:a.data)==null?void 0:c.generateCustomerToken)==null?void 0:d.token,m=await K(r),u=m==null?void 0:m.firstName,N=m==null?void 0:m.email;if(!u||!N){const M=f.customerTokenErrorMessage;return i==null||i(M),o==null||o({type:"error",text:M}),{errorMessage:M,userName:""}}const T=await U();return document.cookie=`${O.auth_dropin_firstname}=${u}; path=/; ${T}; `,document.cookie=`${O.auth_dropin_user_token}=${r}; path=/; ${T}; `,w.emit("authenticated",!!r),x((E=y)==null?void 0:E.SIGN_IN,{...m}),{errorMessage:"",userName:u}};export{V as a,K as g}; diff --git a/scripts/__dropins__/storefront-auth/chunks/getStoreConfig.js b/scripts/__dropins__/storefront-auth/chunks/getStoreConfig.js index 4023c8da2a..7e135e96f8 100644 --- a/scripts/__dropins__/storefront-auth/chunks/getStoreConfig.js +++ b/scripts/__dropins__/storefront-auth/chunks/getStoreConfig.js @@ -1,6 +1,6 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{f as l,h as E}from"./network-error.js";const T=e=>({personalEmail:{address:(e==null?void 0:e.email)||""},userAccount:{login:!0},commerce:{commerceScope:{storeCode:(e==null?void 0:e.store_code)||""}}}),S=e=>({userAccount:{logout:!0},commerce:{commerceScope:{storeCode:(e==null?void 0:e.store_code)||""}}}),N=e=>({personalEmail:{address:(e==null?void 0:e.email)||""},userAccount:{updateProfile:e==null?void 0:e.updateProfile},commerce:{commerceScope:{storeCode:(e==null?void 0:e.store_code)||""}}}),D={auth_dropin_user_token:"auth_dropin_user_token",auth_dropin_firstname:"auth_dropin_firstname"},c=3600,I=e=>{var t,o,r,a,m,_,f,g,d,C;return{autocompleteOnStorefront:((o=(t=e==null?void 0:e.data)==null?void 0:t.storeConfig)==null?void 0:o.autocomplete_on_storefront)||!1,minLength:((a=(r=e==null?void 0:e.data)==null?void 0:r.storeConfig)==null?void 0:a.minimum_password_length)||3,requiredCharacterClasses:+((_=(m=e==null?void 0:e.data)==null?void 0:m.storeConfig)==null?void 0:_.required_character_classes_number)||0,createAccountConfirmation:((g=(f=e==null?void 0:e.data)==null?void 0:f.storeConfig)==null?void 0:g.create_account_confirmation)||!1,customerAccessTokenLifetime:((C=(d=e==null?void 0:e.data)==null?void 0:d.storeConfig)==null?void 0:C.customer_access_token_lifetime)*c||c}},O=e=>{const t=e.map(o=>o.message).join(" ");throw Error(t)},U=e=>{document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`},R=async()=>{try{const e=sessionStorage.getItem("storeConfig");let o=(e?JSON.parse(e):{}).customerAccessTokenLifetime;if(!o){const r=await b();sessionStorage.setItem("storeConfig",JSON.stringify(r)),o=(r==null?void 0:r.customerAccessTokenLifetime)||c}return`Max-Age=${o}`}catch(e){return console.error("getCookiesLifetime() Error:",e),`Max-Age=${c}`}};var A=(e=>(e.CREATE_ACCOUNT_EVENT="create-account",e.SIGN_IN="sign-in",e.SIGN_OUT="sign-out",e))(A||{});const s="authContext",h="shopperContext",i={CREATE_ACCOUNT:"create-account",SIGN_IN:"sign-in",SIGN_OUT:"sign-out"};function n(e,t){const o=window.adobeDataLayer||[];o.push({[e]:null}),o.push({[e]:t})}function u(e){(window.adobeDataLayer||[]).push(o=>{const r=o.getState?o.getState():{};o.push({event:e,eventInfo:{...r}})})}function k(e){const t=N(e);n(s,t),u(i.CREATE_ACCOUNT)}function p(e){const t=T(e);n(s,t),n(h,{shopperId:"logged-in"}),u(i.SIGN_IN)}function w(e){const t=S(e);n(s,t),n(h,{shopperId:"guest"}),u(i.SIGN_OUT)}const M=(e,t)=>{const o=sessionStorage.getItem("storeConfig"),a={...o?JSON.parse(o):{},...t};switch(e){case"create-account":k(a);break;case"sign-in":p(a);break;case"sign-out":w(a);break;default:return null}},G=` +import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{f as N,h as T}from"./network-error.js";const C=t=>({firstName:t.firstName,lastName:t.lastName,emailAddress:(t==null?void 0:t.email)||"",accountId:(t==null?void 0:t.email)||""}),D={auth_dropin_user_token:"auth_dropin_user_token",auth_dropin_firstname:"auth_dropin_firstname"},r=3600,d=t=>{var e,o,a,n,s,u,_,f,m,g;return{autocompleteOnStorefront:((o=(e=t==null?void 0:t.data)==null?void 0:e.storeConfig)==null?void 0:o.autocomplete_on_storefront)||!1,minLength:((n=(a=t==null?void 0:t.data)==null?void 0:a.storeConfig)==null?void 0:n.minimum_password_length)||3,requiredCharacterClasses:+((u=(s=t==null?void 0:t.data)==null?void 0:s.storeConfig)==null?void 0:u.required_character_classes_number)||0,createAccountConfirmation:((f=(_=t==null?void 0:t.data)==null?void 0:_.storeConfig)==null?void 0:f.create_account_confirmation)||!1,customerAccessTokenLifetime:((g=(m=t==null?void 0:t.data)==null?void 0:m.storeConfig)==null?void 0:g.customer_access_token_lifetime)*r||r}},S=t=>{const e=t.map(o=>o.message).join(" ");throw Error(e)},U=t=>{document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`},v=async()=>{try{const t=sessionStorage.getItem("storeConfig");let o=(t?JSON.parse(t):{}).customerAccessTokenLifetime;if(!o){const a=await b();sessionStorage.setItem("storeConfig",JSON.stringify(a)),o=(a==null?void 0:a.customerAccessTokenLifetime)||r}return`Max-Age=${o}`}catch(t){return console.error("getCookiesLifetime() Error:",t),`Max-Age=${r}`}},h="accountContext";var I=(t=>(t.CREATE_ACCOUNT_EVENT="create-account",t.SIGN_IN="sign-in",t.SIGN_OUT="sign-out",t))(I||{});const c={CREATE_ACCOUNT:"create-account",SIGN_IN:"sign-in",SIGN_OUT:"sign-out"};function l(){return window.adobeDataLayer=window.adobeDataLayer||[],window.adobeDataLayer}function E(t,e){const o=l();o.push({[t]:null}),o.push({[t]:e})}function i(t,e){l().push(a=>{const n=a.getState?a.getState():{};a.push({event:t,eventInfo:{...n,...e}})})}function O(t){const e=C(t);E(h,e),i(c.CREATE_ACCOUNT)}function A(t){const e=C(t);E(h,e),i(c.SIGN_IN)}function k(){i(c.SIGN_OUT)}const x=(t,e)=>{const o=sessionStorage.getItem("storeConfig"),n={...o?JSON.parse(o):{},...e};switch(t){case"create-account":O(n);break;case"sign-in":A(n);break;case"sign-out":k();break;default:return null}},w=` query GET_STORE_CONFIG { storeConfig { autocomplete_on_storefront @@ -14,4 +14,4 @@ import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{f customer_access_token_lifetime } } -`,b=async()=>await l(G,{method:"GET",cache:"force-cache"}).then(e=>{var t;return(t=e.errors)!=null&&t.length?O(e.errors):I(e)}).catch(E);export{D as C,A as E,R as a,U as d,b as g,O as h,M as p}; +`,b=async()=>await N(w,{method:"GET",cache:"force-cache"}).then(t=>{var e;return(e=t.errors)!=null&&e.length?S(t.errors):d(t)}).catch(T);export{D as C,I as E,v as a,U as d,b as g,S as h,x as p}; diff --git a/scripts/__dropins__/storefront-auth/chunks/index.js b/scripts/__dropins__/storefront-auth/chunks/index.js index a3a388aecd..78bb860e99 100644 --- a/scripts/__dropins__/storefront-auth/chunks/index.js +++ b/scripts/__dropins__/storefront-auth/chunks/index.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{R as b,R as c}from"./ResetPasswordForm.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";/* empty css */import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"./requestPasswordResetEmail.js";import"./network-error.js";import"@dropins/tools/fetch-graphql.js";import"./setReCaptchaToken.js";import"./Button2.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/i18n.js";import"@dropins/tools/components.js";import"./simplifyTransformAttributesForm.js";import"./transform-attributes-form.js";export{b as ResetPasswordForm,c as default}; +import{R as b,R as c}from"./ResetPasswordForm.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"./Button.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/i18n.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"./requestPasswordResetEmail.js";import"./network-error.js";import"@dropins/tools/fetch-graphql.js";import"./setReCaptchaToken.js";import"./Button2.js";import"./simplifyTransformAttributesForm.js";import"./transform-attributes-form.js";export{b as ResetPasswordForm,c as default}; diff --git a/scripts/__dropins__/storefront-auth/chunks/index2.js b/scripts/__dropins__/storefront-auth/chunks/index2.js index f2a9e92fd8..747f2f6599 100644 --- a/scripts/__dropins__/storefront-auth/chunks/index2.js +++ b/scripts/__dropins__/storefront-auth/chunks/index2.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{S as q,S as v}from"./SignInForm.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"./Button2.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/i18n.js";import"@dropins/tools/components.js";/* empty css */import"@dropins/tools/event-bus.js";import"./getCustomerToken.js";import"./network-error.js";import"@dropins/tools/fetch-graphql.js";import"./initialize.js";import"../fragments.js";import"./getStoreConfig.js";import"./setReCaptchaToken.js";import"./resendConfirmationEmail.js";import"./simplifyTransformAttributesForm.js";import"./transform-attributes-form.js";import"./focusOnEmptyPasswordField.js";import"./confirmEmail.js";export{q as SignInForm,v as default}; +import{S as q,S as v}from"./SignInForm.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"./Button2.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/components.js";import"./Button.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/i18n.js";import"@dropins/tools/event-bus.js";import"./getCustomerToken.js";import"./network-error.js";import"@dropins/tools/fetch-graphql.js";import"./initialize.js";import"../fragments.js";import"./getStoreConfig.js";import"./setReCaptchaToken.js";import"./resendConfirmationEmail.js";import"./simplifyTransformAttributesForm.js";import"./transform-attributes-form.js";import"./focusOnEmptyPasswordField.js";import"./confirmEmail.js";export{q as SignInForm,v as default}; diff --git a/scripts/__dropins__/storefront-auth/chunks/index3.js b/scripts/__dropins__/storefront-auth/chunks/index3.js index 765ff19c9d..3c3c49290e 100644 --- a/scripts/__dropins__/storefront-auth/chunks/index3.js +++ b/scripts/__dropins__/storefront-auth/chunks/index3.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{S as w,S as y}from"./SignUpForm.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"./createCustomerAddress.js";import"../fragments.js";import"./network-error.js";import"@dropins/tools/fetch-graphql.js";import"./setReCaptchaToken.js";import"./initialize.js";import"./transform-attributes-form.js";import"./getStoreConfig.js";import"@dropins/tools/preact-hooks.js";import"./simplifyTransformAttributesForm.js";import"./usePasswordValidationMessage.js";import"@dropins/tools/i18n.js";import"./getCustomerToken.js";import"./Button2.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/components.js";/* empty css */import"./focusOnEmptyPasswordField.js";import"./resendConfirmationEmail.js";import"./SkeletonLoader.js";export{w as SignUpForm,y as default}; +import{S as w,S as y}from"./SignUpForm.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"./createCustomerAddress.js";import"../fragments.js";import"./network-error.js";import"@dropins/tools/fetch-graphql.js";import"./setReCaptchaToken.js";import"./initialize.js";import"./transform-attributes-form.js";import"./getStoreConfig.js";import"@dropins/tools/preact-hooks.js";import"./simplifyTransformAttributesForm.js";import"./usePasswordValidationMessage.js";import"@dropins/tools/i18n.js";import"./getCustomerToken.js";import"./Button2.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/components.js";import"./Button.js";import"./focusOnEmptyPasswordField.js";import"./resendConfirmationEmail.js";import"./SkeletonLoader.js";export{w as SignUpForm,y as default}; diff --git a/scripts/__dropins__/storefront-auth/chunks/initialize.js b/scripts/__dropins__/storefront-auth/chunks/initialize.js index 48b5b4b6df..8b7fc75944 100644 --- a/scripts/__dropins__/storefront-auth/chunks/initialize.js +++ b/scripts/__dropins__/storefront-auth/chunks/initialize.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{Initializer as o}from"@dropins/tools/lib.js";const i=new o({init:async n=>{const e={authHeaderConfig:{header:"Authorization",tokenPrefix:"Bearer"}};i.config.setConfig({...e,...n})},listeners:()=>[]}),a=i.config;export{a as c,i}; diff --git a/scripts/__dropins__/storefront-auth/chunks/network-error.js b/scripts/__dropins__/storefront-auth/chunks/network-error.js index b42c878118..dd167fcd68 100644 --- a/scripts/__dropins__/storefront-auth/chunks/network-error.js +++ b/scripts/__dropins__/storefront-auth/chunks/network-error.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{FetchGraphQL as e}from"@dropins/tools/fetch-graphql.js";import{events as r}from"@dropins/tools/event-bus.js";const{setEndpoint:h,setFetchGraphQlHeader:n,removeFetchGraphQlHeader:c,setFetchGraphQlHeaders:p,fetchGraphQl:i,getConfig:f}=new e().getMethods(),m=t=>{throw t instanceof DOMException&&t.name==="AbortError"||r.emit("auth/error",{source:"auth",type:"network",error:t}),t};export{n as a,p as b,i as f,f as g,m as h,c as r,h as s}; diff --git a/scripts/__dropins__/storefront-auth/chunks/requestPasswordResetEmail.js b/scripts/__dropins__/storefront-auth/chunks/requestPasswordResetEmail.js index bc522e0e36..88e7714e03 100644 --- a/scripts/__dropins__/storefront-auth/chunks/requestPasswordResetEmail.js +++ b/scripts/__dropins__/storefront-auth/chunks/requestPasswordResetEmail.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{f as E,h as l}from"./network-error.js";import{s as e}from"./setReCaptchaToken.js";const R=a=>{var r,m,i;let t="";return(r=a==null?void 0:a.errors)!=null&&r.length&&(t=(m=a==null?void 0:a.errors[0])==null?void 0:m.message),{message:t,success:!!((i=a==null?void 0:a.data)!=null&&i.requestPasswordResetEmail)}},c=` mutation REQUEST_PASSWORD_RESET_EMAIL($email: String!) { diff --git a/scripts/__dropins__/storefront-auth/chunks/resendConfirmationEmail.js b/scripts/__dropins__/storefront-auth/chunks/resendConfirmationEmail.js index bee8145f76..b6f09c8302 100644 --- a/scripts/__dropins__/storefront-auth/chunks/resendConfirmationEmail.js +++ b/scripts/__dropins__/storefront-auth/chunks/resendConfirmationEmail.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{f as r,h as e}from"./network-error.js";const i=` mutation RESEND_CONFIRMATION_EMAIL($email: String!) { diff --git a/scripts/__dropins__/storefront-auth/chunks/resetPassword.js b/scripts/__dropins__/storefront-auth/chunks/resetPassword.js index 1584ee7812..4bd8e7a2dc 100644 --- a/scripts/__dropins__/storefront-auth/chunks/resetPassword.js +++ b/scripts/__dropins__/storefront-auth/chunks/resetPassword.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{f as o,h as w}from"./network-error.js";import{s as d}from"./setReCaptchaToken.js";const i=` mutation RESET_PASSWORD( diff --git a/scripts/__dropins__/storefront-auth/chunks/revokeCustomerToken.js b/scripts/__dropins__/storefront-auth/chunks/revokeCustomerToken.js index 4b64ef7150..d7bbd668a7 100644 --- a/scripts/__dropins__/storefront-auth/chunks/revokeCustomerToken.js +++ b/scripts/__dropins__/storefront-auth/chunks/revokeCustomerToken.js @@ -1,10 +1,10 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{f as u,h as n}from"./network-error.js";import{C as m,d as s,p as c,E}from"./getStoreConfig.js";import{events as i}from"@dropins/tools/event-bus.js";const k=t=>{var r,o,a;let e="";return(r=t==null?void 0:t.errors)!=null&&r.length&&(e=((o=t==null?void 0:t.errors[0])==null?void 0:o.message)||"Unknown error"),{message:e,success:!!((a=t==null?void 0:t.data)!=null&&a.revokeCustomerToken)}},h=` +import{f as n,h as s}from"./network-error.js";import{C as m,d as u,p as c,E}from"./getStoreConfig.js";import{events as i}from"@dropins/tools/event-bus.js";const k=t=>{var r,o,a;let e="";return(r=t==null?void 0:t.errors)!=null&&r.length&&(e=((o=t==null?void 0:t.errors[0])==null?void 0:o.message)||"Unknown error"),{message:e,success:!!((a=t==null?void 0:t.data)!=null&&a.revokeCustomerToken)}},h=` mutation REVOKE_CUSTOMER_TOKEN { revokeCustomerToken { result } } -`,_=async()=>await u(h,{method:"POST"}).then(t=>{const e=k(t);if(e!=null&&e.success)[m.auth_dropin_user_token,m.auth_dropin_firstname].forEach(r=>{s(r)}),i.emit("authenticated",!1),c(E.SIGN_OUT,{logoutAttempt:!0});else{const r=` - ERROR revokeCustomerToken: ${e.message}`;console.error(r)}return e}).catch(n);export{_ as r}; +`,_=async()=>await n(h,{method:"POST"}).then(t=>{const e=k(t);if(e!=null&&e.success)[m.auth_dropin_user_token,m.auth_dropin_firstname].forEach(r=>{u(r)}),i.emit("authenticated",!1),c(E.SIGN_OUT,{});else{const r=` + ERROR revokeCustomerToken: ${e.message}`;console.error(r)}return e}).catch(s);export{_ as r}; diff --git a/scripts/__dropins__/storefront-auth/chunks/setReCaptchaToken.js b/scripts/__dropins__/storefront-auth/chunks/setReCaptchaToken.js index 7c2f91394c..3f7c50eb86 100644 --- a/scripts/__dropins__/storefront-auth/chunks/setReCaptchaToken.js +++ b/scripts/__dropins__/storefront-auth/chunks/setReCaptchaToken.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{verifyReCaptcha as t}from"@dropins/tools/recaptcha.js";import"@dropins/tools/event-bus.js";import{a as e}from"./network-error.js";const s=async()=>{const a=await t();a&&e("X-ReCaptcha",a)};export{s}; diff --git a/scripts/__dropins__/storefront-auth/chunks/simplifyTransformAttributesForm.js b/scripts/__dropins__/storefront-auth/chunks/simplifyTransformAttributesForm.js index aaefa753f9..816e0324fe 100644 --- a/scripts/__dropins__/storefront-auth/chunks/simplifyTransformAttributesForm.js +++ b/scripts/__dropins__/storefront-auth/chunks/simplifyTransformAttributesForm.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{t}from"./transform-attributes-form.js";const s=[{customUpperCode:"email",code:"email",default_value:"",entity_type:"CUSTOMER",frontend_class:"auth-sign-in-form__form__email",frontend_input:"TEXT",is_required:!0,multiline_count:1,sort_order:1,is_unique:!1,label:"Email",options:[],validateRules:[{name:"INPUT_VALIDATION",value:"email"}]}],o=[{customUpperCode:"email",code:"email",default_value:"",entity_type:"CUSTOMER",frontend_class:"auth-reset-password-form__form__item",frontend_input:"TEXT",is_required:!0,is_unique:!1,label:"Email",options:[],validateRules:[{name:"INPUT_VALIDATION",value:"email"}]}],n=[{customUpperCode:"email",code:"email",default_value:"",entity_type:"CUSTOMER",frontend_class:"",frontend_input:"TEXT",is_required:!0,is_unique:!1,label:"Email",multiline_count:1,sort_order:1,options:[],validateRules:[{name:"INPUT_VALIDATION",value:"email"}]},{customUpperCode:"firstname",code:"firstname",default_value:"",entity_type:"CUSTOMER",frontend_class:"",frontend_input:"TEXT",is_required:!0,is_unique:!1,label:"First name",multiline_count:1,sort_order:2,options:[]},{customUpperCode:"lastname",code:"lastname",default_value:"",entity_type:"CUSTOMER",frontend_class:"",frontend_input:"TEXT",is_required:!1,is_unique:!1,label:"Last name",multiline_count:1,sort_order:3,options:[]}],i=e=>e!=null&&e.length?t({data:{attributesForm:{items:e}}}):[];export{o as D,s as a,n as b,i as s}; +import{t}from"./transform-attributes-form.js";const o=[{customUpperCode:"email",code:"email",default_value:"",entity_type:"CUSTOMER",frontend_class:"auth-sign-in-form__form__email",frontend_input:"TEXT",is_required:!0,multiline_count:1,sort_order:1,is_unique:!1,label:"Email",options:[],validateRules:[{name:"INPUT_VALIDATION",value:"email"}],autocomplete:"username"}],s=[{customUpperCode:"email",code:"email",default_value:"",entity_type:"CUSTOMER",frontend_class:"auth-reset-password-form__form__item",frontend_input:"TEXT",is_required:!0,is_unique:!1,label:"Email",options:[],validateRules:[{name:"INPUT_VALIDATION",value:"email"}],autocomplete:"username"}],n=[{customUpperCode:"email",code:"email",default_value:"",entity_type:"CUSTOMER",frontend_class:"",frontend_input:"TEXT",is_required:!0,is_unique:!1,label:"Email",multiline_count:1,sort_order:1,options:[],validateRules:[{name:"INPUT_VALIDATION",value:"email"}],autocomplete:"username"},{customUpperCode:"firstname",code:"firstname",default_value:"",entity_type:"CUSTOMER",frontend_class:"",frontend_input:"TEXT",is_required:!0,is_unique:!1,label:"First name",multiline_count:1,sort_order:2,options:[]},{customUpperCode:"lastname",code:"lastname",default_value:"",entity_type:"CUSTOMER",frontend_class:"",frontend_input:"TEXT",is_required:!1,is_unique:!1,label:"Last name",multiline_count:1,sort_order:3,options:[]}],i=e=>e!=null&&e.length?t({data:{attributesForm:{items:e}}}):[];export{s as D,o as a,n as b,i as s}; diff --git a/scripts/__dropins__/storefront-auth/chunks/transform-attributes-form.js b/scripts/__dropins__/storefront-auth/chunks/transform-attributes-form.js index 1e6a358e67..717eb1b9ad 100644 --- a/scripts/__dropins__/storefront-auth/chunks/transform-attributes-form.js +++ b/scripts/__dropins__/storefront-auth/chunks/transform-attributes-form.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ const _=t=>t.replace(/_([a-z])/g,(n,e)=>e.toUpperCase()),p=t=>t.replace(/([A-Z])/g,n=>`_${n.toLowerCase()}`),m=(t,n,e)=>{const s=["string","boolean","number"],a=n==="camelCase"?_:p;return Array.isArray(t)?t.map(o=>s.includes(typeof o)||o===null?o:typeof o=="object"?m(o,n,e):o):t!==null&&typeof t=="object"?Object.entries(t).reduce((o,[i,c])=>{const r=e&&e[i]?e[i]:a(i);return o[r]=s.includes(typeof c)||c===null?c:m(c,n,e),o},{}):t},b=t=>{let n=[];for(const e of t)if(!(e.frontend_input!=="MULTILINE"||e.multiline_count<2))for(let s=2;s<=e.multiline_count;s++){const a={...e,is_required:!1,name:`${e.code}_multiline_${s}`,code:`${e.code}_multiline_${s}`,id:`${e.code}_multiline_${s}`};n.push(a)}return n},C=t=>{var o,i,c;const n=((i=(o=t==null?void 0:t.data)==null?void 0:o.attributesForm)==null?void 0:i.items)||[];if(!n.length)return[];const e=(c=n.filter(r=>{var u;return!((u=r.frontend_input)!=null&&u.includes("HIDDEN"))}))==null?void 0:c.map(({code:r,...u})=>{const l=r!=="country_id"?r:"country_code";return{...u,name:l,id:l,code:l}}),s=b(e);return e.concat(s).map(r=>{var d;const u=r.code==="firstname"?"firstName":r.code==="lastname"?"lastName":_(r.code),l=(d=r.options)==null?void 0:d.map(f=>({isDefault:f.is_default,text:f.label,value:f.value}));return m({...r,options:l,customUpperCode:u},"camelCase",{frontend_input:"fieldType",frontend_class:"className",is_required:"required",sort_order:"orderNumber"})}).sort((r,u)=>r.orderNumber-u.orderNumber)};export{m as c,C as t}; diff --git a/scripts/__dropins__/storefront-auth/chunks/usePasswordValidationMessage.js b/scripts/__dropins__/storefront-auth/chunks/usePasswordValidationMessage.js index ef6ef183ab..9b2f74879f 100644 --- a/scripts/__dropins__/storefront-auth/chunks/usePasswordValidationMessage.js +++ b/scripts/__dropins__/storefront-auth/chunks/usePasswordValidationMessage.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{g as m}from"./getStoreConfig.js";import{useState as c,useEffect as u,useMemo as h}from"@dropins/tools/preact-hooks.js";import{useText as f}from"@dropins/tools/i18n.js";const A=()=>{const[e,n]=c(!1),[t,i]=c(null);return u(()=>{const a=sessionStorage.getItem("storeConfig"),r=a?JSON.parse(a):null;if(r){const{minLength:o,requiredCharacterClasses:s,createAccountConfirmation:g}=r;i({minLength:o,requiredCharacterClasses:s}),n(g)}else m().then(o=>{if(o){const{minLength:s,requiredCharacterClasses:g,createAccountConfirmation:l}=o;sessionStorage.setItem("storeConfig",JSON.stringify(o)),i({minLength:s,requiredCharacterClasses:g}),n(l)}})},[]),{passwordConfigs:t,isEmailConfirmationRequired:e}},L=(e,n)=>{if(n<=1)return!0;const t=/[0-9]/.test(e)?1:0,i=/[a-z]/.test(e)?1:0,a=/[A-Z]/.test(e)?1:0,r=/[^a-zA-Z0-9\s]/.test(e)?1:0;return t+i+a+r>=n},M=({passwordConfigs:e,isClickSubmit:n,password:t})=>{const i=f({messageLengthPassword:"Auth.PasswordValidationMessage.messageLengthPassword"}),[a,r]=c("pending");u(()=>{if(!e)return;const s=L(t,e.requiredCharacterClasses);n&&t.length>0?r(s?"success":"error"):n&&t.length===0?r("pending"):r(s?"success":"pending")},[n,e,t]);const o=h(()=>{var g;if(!e)return;const s={status:"pending",icon:"pending",message:(g=i.messageLengthPassword)==null?void 0:g.replace("{minLength}",`${e.minLength}`)};return t.length&&t.length>=e.minLength?{...s,icon:"success",status:"success"}:t.length&&t.length import("preact").JSX.Element; +//# sourceMappingURL=FieldElement.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/Form/Elements/FormSlot.d.ts b/scripts/__dropins__/storefront-auth/components/Form/Elements/FormSlot.d.ts new file mode 100644 index 0000000000..3fe246f56f --- /dev/null +++ b/scripts/__dropins__/storefront-auth/components/Form/Elements/FormSlot.d.ts @@ -0,0 +1,4 @@ +import { FormSlotProps } from '../../../types'; + +export declare const FormSlot: ({ slots, item, handleOnChange, handleOnBlur, handleOnFocus, errorConfig, errors, }: FormSlotProps) => import("preact").JSX.Element; +//# sourceMappingURL=FormSlot.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/Form/Elements/InputCheckBoxElement.d.ts b/scripts/__dropins__/storefront-auth/components/Form/Elements/InputCheckBoxElement.d.ts new file mode 100644 index 0000000000..0e6b833056 --- /dev/null +++ b/scripts/__dropins__/storefront-auth/components/Form/Elements/InputCheckBoxElement.d.ts @@ -0,0 +1,4 @@ +import { FormElementProps } from '../../../types'; + +export declare const InputCheckBoxElement: ({ item, valueMessage, errorConfig, onBlur, onChange, className, itemClassName, loading, }: FormElementProps) => import("preact/compat").JSX.Element; +//# sourceMappingURL=InputCheckBoxElement.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/Form/Elements/InputDateElement.d.ts b/scripts/__dropins__/storefront-auth/components/Form/Elements/InputDateElement.d.ts new file mode 100644 index 0000000000..65d9ae0322 --- /dev/null +++ b/scripts/__dropins__/storefront-auth/components/Form/Elements/InputDateElement.d.ts @@ -0,0 +1,4 @@ +import { FormElementProps } from '../../../types'; + +export declare const InputDateElement: ({ item, valueMessage, errorConfig, onBlur, onChange, className, itemClassName, loading, }: FormElementProps) => import("preact/compat").JSX.Element; +//# sourceMappingURL=InputDateElement.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/Form/Elements/InputElement.d.ts b/scripts/__dropins__/storefront-auth/components/Form/Elements/InputElement.d.ts new file mode 100644 index 0000000000..e3d42c9ebe --- /dev/null +++ b/scripts/__dropins__/storefront-auth/components/Form/Elements/InputElement.d.ts @@ -0,0 +1,4 @@ +import { FormElementProps } from '../../../types'; + +export declare const InputElement: ({ item, valueMessage, errorConfig, onBlur, onChange, onFocus, className, itemClassName, loading, }: FormElementProps) => import("preact/compat").JSX.Element; +//# sourceMappingURL=InputElement.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/Form/Elements/SelectElement.d.ts b/scripts/__dropins__/storefront-auth/components/Form/Elements/SelectElement.d.ts new file mode 100644 index 0000000000..d923aac634 --- /dev/null +++ b/scripts/__dropins__/storefront-auth/components/Form/Elements/SelectElement.d.ts @@ -0,0 +1,4 @@ +import { FormElementProps } from '../../../types'; + +export declare const SelectElement: ({ item, valueMessage, errorConfig, onBlur, onChange, className, itemClassName, loading, }: FormElementProps) => import("preact/compat").JSX.Element; +//# sourceMappingURL=SelectElement.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/Form/Elements/TextAreaElement.d.ts b/scripts/__dropins__/storefront-auth/components/Form/Elements/TextAreaElement.d.ts new file mode 100644 index 0000000000..6cc4faef20 --- /dev/null +++ b/scripts/__dropins__/storefront-auth/components/Form/Elements/TextAreaElement.d.ts @@ -0,0 +1,4 @@ +import { FormElementProps } from '../../../types'; + +export declare const TextAreaElement: ({ item, valueMessage, errorConfig, onBlur, onChange, className, itemClassName, loading, }: FormElementProps) => import("preact/compat").JSX.Element; +//# sourceMappingURL=TextAreaElement.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/Form/Elements/index.d.ts b/scripts/__dropins__/storefront-auth/components/Form/Elements/index.d.ts new file mode 100644 index 0000000000..fb933596a2 --- /dev/null +++ b/scripts/__dropins__/storefront-auth/components/Form/Elements/index.d.ts @@ -0,0 +1,23 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ +export { InputElement } from './InputElement'; +export { SelectElement } from './SelectElement'; +export { InputDateElement } from './InputDateElement'; +export { InputCheckBoxElement } from './InputCheckBoxElement'; +export { TextAreaElement } from './TextAreaElement'; +export { FormSlot } from './FormSlot'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/Form/Form.d.ts b/scripts/__dropins__/storefront-auth/components/Form/Form.d.ts index e6a9717103..71fb3e3c0b 100644 --- a/scripts/__dropins__/storefront-auth/components/Form/Form.d.ts +++ b/scripts/__dropins__/storefront-auth/components/Form/Form.d.ts @@ -1,4 +1,4 @@ import { FormProps } from '../../types'; -export declare const Form: ({ name, loading, children, className, fieldsConfig, onSubmit, ...props }: FormProps) => import("preact").JSX.Element; +export declare const Form: ({ slots, name, loading, children, className, fieldsConfig, onSubmit, ...props }: FormProps) => import("preact/compat").JSX.Element; //# sourceMappingURL=Form.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/Form/FormInputs/FormInputs.d.ts b/scripts/__dropins__/storefront-auth/components/Form/FormInputs/FormInputs.d.ts deleted file mode 100644 index b4bf4fd0b5..0000000000 --- a/scripts/__dropins__/storefront-auth/components/Form/FormInputs/FormInputs.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { FunctionComponent } from 'preact'; -import { FormInputsProps } from '../../../types'; - -export declare const FormInputs: FunctionComponent; -//# sourceMappingURL=FormInputs.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/Form/FormInputs/index.d.ts b/scripts/__dropins__/storefront-auth/components/Form/FormInputs/index.d.ts deleted file mode 100644 index 4bb7b35a49..0000000000 --- a/scripts/__dropins__/storefront-auth/components/Form/FormInputs/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './FormInputs'; -export { FormInputs as default } from './FormInputs'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/Form/index.d.ts b/scripts/__dropins__/storefront-auth/components/Form/index.d.ts index 4ba0696ed0..bd2037d0c8 100644 --- a/scripts/__dropins__/storefront-auth/components/Form/index.d.ts +++ b/scripts/__dropins__/storefront-auth/components/Form/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './Form'; export { Form as default } from './Form'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/ResetPasswordForm/index.d.ts b/scripts/__dropins__/storefront-auth/components/ResetPasswordForm/index.d.ts index 107d11729b..a6f6fc0c09 100644 --- a/scripts/__dropins__/storefront-auth/components/ResetPasswordForm/index.d.ts +++ b/scripts/__dropins__/storefront-auth/components/ResetPasswordForm/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './ResetPasswordForm'; export { ResetPasswordForm as default } from './ResetPasswordForm'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/SignInForm/index.d.ts b/scripts/__dropins__/storefront-auth/components/SignInForm/index.d.ts index 9a82debff1..6431f076e2 100644 --- a/scripts/__dropins__/storefront-auth/components/SignInForm/index.d.ts +++ b/scripts/__dropins__/storefront-auth/components/SignInForm/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './SignInForm'; export { SignInForm as default } from './SignInForm'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/SignUpForm/index.d.ts b/scripts/__dropins__/storefront-auth/components/SignUpForm/index.d.ts index 232b12fc78..bb122f80f7 100644 --- a/scripts/__dropins__/storefront-auth/components/SignUpForm/index.d.ts +++ b/scripts/__dropins__/storefront-auth/components/SignUpForm/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './SignUpForm'; export { SignUpForm as default } from './SignUpForm'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/ResetPasswordSkeleton.d.ts b/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/ResetPasswordSkeleton.d.ts index 8f696af4cb..6c58ccbcdc 100644 --- a/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/ResetPasswordSkeleton.d.ts +++ b/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/ResetPasswordSkeleton.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const ResetPasswordSkeleton: () => import("preact").JSX.Element; //# sourceMappingURL=ResetPasswordSkeleton.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/SignInSkeleton.d.ts b/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/SignInSkeleton.d.ts index 34483b1ac0..8fc6365512 100644 --- a/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/SignInSkeleton.d.ts +++ b/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/SignInSkeleton.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const SignInSkeleton: () => import("preact").JSX.Element; //# sourceMappingURL=SignInSkeleton.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/SignUpSkeleton.d.ts b/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/SignUpSkeleton.d.ts index bcc46808e7..d8b61aadc0 100644 --- a/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/SignUpSkeleton.d.ts +++ b/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/SignUpSkeleton.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const SignUpSkeleton: () => import("preact").JSX.Element; //# sourceMappingURL=SignUpSkeleton.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/index.d.ts b/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/index.d.ts index cca99d96f9..b63e52d552 100644 --- a/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/index.d.ts +++ b/scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export { SignUpSkeleton } from './SignUpSkeleton'; export { SignInSkeleton } from './SignInSkeleton'; export { ResetPasswordSkeleton } from './ResetPasswordSkeleton'; diff --git a/scripts/__dropins__/storefront-auth/components/SkeletonLoader/index.d.ts b/scripts/__dropins__/storefront-auth/components/SkeletonLoader/index.d.ts index 9efe4f6270..448ce85aa2 100644 --- a/scripts/__dropins__/storefront-auth/components/SkeletonLoader/index.d.ts +++ b/scripts/__dropins__/storefront-auth/components/SkeletonLoader/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './SkeletonLoader'; export { SkeletonLoader as default } from './SkeletonLoader'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/SuccessNotificationForm/index.d.ts b/scripts/__dropins__/storefront-auth/components/SuccessNotificationForm/index.d.ts index 805865772a..644b5a8657 100644 --- a/scripts/__dropins__/storefront-auth/components/SuccessNotificationForm/index.d.ts +++ b/scripts/__dropins__/storefront-auth/components/SuccessNotificationForm/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './SuccessNotificationForm'; export { SuccessNotificationForm as default } from './SuccessNotificationForm'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/UpdatePasswordForm/index.d.ts b/scripts/__dropins__/storefront-auth/components/UpdatePasswordForm/index.d.ts index c7c417c597..a889099a11 100644 --- a/scripts/__dropins__/storefront-auth/components/UpdatePasswordForm/index.d.ts +++ b/scripts/__dropins__/storefront-auth/components/UpdatePasswordForm/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './UpdatePasswordForm'; export { UpdatePasswordForm as default } from './UpdatePasswordForm'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/components/index.d.ts b/scripts/__dropins__/storefront-auth/components/index.d.ts index e2f27b1c16..2bcd1a9a22 100644 --- a/scripts/__dropins__/storefront-auth/components/index.d.ts +++ b/scripts/__dropins__/storefront-auth/components/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './EmailConfirmationForm'; export * from './UpdatePasswordForm'; export * from './SuccessNotificationForm'; diff --git a/scripts/__dropins__/storefront-auth/configs/cookieConfigs.d.ts b/scripts/__dropins__/storefront-auth/configs/cookieConfigs.d.ts index c73d6a62a4..08eb459970 100644 --- a/scripts/__dropins__/storefront-auth/configs/cookieConfigs.d.ts +++ b/scripts/__dropins__/storefront-auth/configs/cookieConfigs.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ declare const COOKIE_NAMES: { auth_dropin_user_token: string; auth_dropin_firstname: string; diff --git a/scripts/__dropins__/storefront-auth/configs/defaultCreateUserConfigs.d.ts b/scripts/__dropins__/storefront-auth/configs/defaultCreateUserConfigs.d.ts index 71a9983674..64b07cd7dd 100644 --- a/scripts/__dropins__/storefront-auth/configs/defaultCreateUserConfigs.d.ts +++ b/scripts/__dropins__/storefront-auth/configs/defaultCreateUserConfigs.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const DEFAULT__SIGN_IN_EMAIL_FIELD: { customUpperCode: string; code: string; @@ -15,6 +31,7 @@ export declare const DEFAULT__SIGN_IN_EMAIL_FIELD: { name: string; value: string; }[]; + autocomplete: string; }[]; export declare const DEFAULT__RESET_PASSWORD_EMAIL_FIELD: Record[]; export declare const DEFAULT_SIGN_UP_FIELDS: ({ @@ -34,6 +51,7 @@ export declare const DEFAULT_SIGN_UP_FIELDS: ({ name: string; value: string; }[]; + autocomplete: string; } | { customUpperCode: string; code: string; @@ -48,6 +66,7 @@ export declare const DEFAULT_SIGN_UP_FIELDS: ({ sort_order: number; options: never[]; validateRules?: undefined; + autocomplete?: undefined; })[]; export declare const DEFAULT_INPUTS_PROPS: Record; //# sourceMappingURL=defaultCreateUserConfigs.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/configs/excludedFocusClasses.d.ts b/scripts/__dropins__/storefront-auth/configs/excludedFocusClasses.d.ts index 871b8d46bc..1a38772681 100644 --- a/scripts/__dropins__/storefront-auth/configs/excludedFocusClasses.d.ts +++ b/scripts/__dropins__/storefront-auth/configs/excludedFocusClasses.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ /** * This file defines an array of class names that should be excluded * from specific init Recaptcha logic. diff --git a/scripts/__dropins__/storefront-auth/configs/patternConfigs.d.ts b/scripts/__dropins__/storefront-auth/configs/patternConfigs.d.ts index 5bccfbc62e..3221bb16f0 100644 --- a/scripts/__dropins__/storefront-auth/configs/patternConfigs.d.ts +++ b/scripts/__dropins__/storefront-auth/configs/patternConfigs.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ declare const EMAIL_PATTERN: RegExp; export { EMAIL_PATTERN }; //# sourceMappingURL=patternConfigs.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/containers/AuthCombine.js b/scripts/__dropins__/storefront-auth/containers/AuthCombine.js index 14123d4b51..a547df1ec3 100644 --- a/scripts/__dropins__/storefront-auth/containers/AuthCombine.js +++ b/scripts/__dropins__/storefront-auth/containers/AuthCombine.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{jsx as i}from"@dropins/tools/preact-jsx-runtime.js";import{lazy as d,Suspense as E}from"@dropins/tools/preact-compat.js";import{useState as S,useMemo as P}from"@dropins/tools/preact-hooks.js";import{S as y}from"../chunks/SkeletonLoader.js";import"@dropins/tools/components.js";const L=function(){const r=typeof document<"u"&&document.createElement("link").relList;return r&&r.supports&&r.supports("modulepreload")?"modulepreload":"preload"}(),k=function(l){return"/"+l},f={},p=function(r,c,u){let a=Promise.resolve();if(c&&c.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),t=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));a=Promise.allSettled(c.map(o=>{if(o=k(o),o in f)return;f[o]=!0;const m=o.endsWith(".css"),h=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${h}`))return;const n=document.createElement("link");if(n.rel=m?"stylesheet":L,m||(n.as="script"),n.crossOrigin="",n.href=o,t&&n.setAttribute("nonce",t),document.head.appendChild(n),m)return new Promise((_,v)=>{n.addEventListener("load",_),n.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${o}`)))})}))}function s(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return a.then(e=>{for(const t of e||[])t.status==="rejected"&&s(t.reason);return r().catch(s)})},b=d(()=>p(()=>import("../chunks/index.js"),[])),w=d(()=>p(()=>import("../chunks/index2.js"),[])),A=d(()=>p(()=>import("../chunks/index3.js"),[])),O=({defaultView:l="signInForm",signInFormConfig:r,signUpFormConfig:c,resetPasswordFormConfig:u})=>{const[a,s]=S(l),e=P(()=>({signInForm:i(w,{setActiveComponent:s,...r}),signUpForm:i(A,{setActiveComponent:s,...c}),resetPasswordForm:i(b,{setActiveComponent:s,...u})}),[u,r,c,s]);return i("div",{children:i(E,{fallback:i(y,{activeSkeleton:a}),children:i("div",{className:"auth-combine",children:e[a]})})})};export{O as AuthCombine,O as default}; diff --git a/scripts/__dropins__/storefront-auth/containers/AuthCombine/index.d.ts b/scripts/__dropins__/storefront-auth/containers/AuthCombine/index.d.ts index fe00621bd8..6f3b756cbc 100644 --- a/scripts/__dropins__/storefront-auth/containers/AuthCombine/index.d.ts +++ b/scripts/__dropins__/storefront-auth/containers/AuthCombine/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './AuthCombine'; export { AuthCombine as default } from './AuthCombine'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/containers/ResetPassword.js b/scripts/__dropins__/storefront-auth/containers/ResetPassword.js index db511ae674..8028c7c506 100644 --- a/scripts/__dropins__/storefront-auth/containers/ResetPassword.js +++ b/scripts/__dropins__/storefront-auth/containers/ResetPassword.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";/* empty css */import{R as i}from"../chunks/ResetPasswordForm.js";import"../chunks/requestPasswordResetEmail.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/setReCaptchaToken.js";import"../chunks/Button2.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/i18n.js";import"../chunks/simplifyTransformAttributesForm.js";import"../chunks/transform-attributes-form.js";const F=({formSize:o,routeSignIn:t,onErrorCallback:m})=>r("div",{className:"auth-reset-password",children:r(i,{formSize:o,routeSignIn:t,onErrorCallback:m})});export{F as ResetPassword,F as default}; +import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";import"../chunks/Button.js";import"@dropins/tools/i18n.js";import{R as i}from"../chunks/ResetPasswordForm.js";import"@dropins/tools/preact-compat.js";import"../chunks/requestPasswordResetEmail.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/setReCaptchaToken.js";import"../chunks/Button2.js";import"../chunks/simplifyTransformAttributesForm.js";import"../chunks/transform-attributes-form.js";const F=({formSize:o,routeSignIn:t,onErrorCallback:m})=>r("div",{className:"auth-reset-password",children:r(i,{formSize:o,routeSignIn:t,onErrorCallback:m})});export{F as ResetPassword,F as default}; diff --git a/scripts/__dropins__/storefront-auth/containers/ResetPassword/index.d.ts b/scripts/__dropins__/storefront-auth/containers/ResetPassword/index.d.ts index ed10ed3e08..fb5f615cf4 100644 --- a/scripts/__dropins__/storefront-auth/containers/ResetPassword/index.d.ts +++ b/scripts/__dropins__/storefront-auth/containers/ResetPassword/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './ResetPassword'; export { ResetPassword as default } from './ResetPassword'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/containers/SignIn.js b/scripts/__dropins__/storefront-auth/containers/SignIn.js index 439560d0ec..786b501b3a 100644 --- a/scripts/__dropins__/storefront-auth/containers/SignIn.js +++ b/scripts/__dropins__/storefront-auth/containers/SignIn.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";/* empty css */import{S as u}from"../chunks/SignInForm.js";import"../chunks/Button2.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/i18n.js";import"../chunks/getCustomerToken.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/initialize.js";import"../fragments.js";import"../chunks/getStoreConfig.js";import"../chunks/setReCaptchaToken.js";import"../chunks/resendConfirmationEmail.js";import"../chunks/simplifyTransformAttributesForm.js";import"../chunks/transform-attributes-form.js";import"../chunks/focusOnEmptyPasswordField.js";import"../chunks/confirmEmail.js";const L=({slots:i,labels:o,enableEmailConfirmation:t,initialEmailValue:m,formSize:p,renderSignUpLink:n,hideCloseBtnOnEmailConfirmation:s,routeRedirectOnEmailConfirmationClose:a,routeRedirectOnSignIn:e,routeForgotPassword:c,routeSignUp:d,onSuccessCallback:f,onErrorCallback:g,onSignUpLinkClick:l})=>r("div",{className:"auth-sign-in",children:r(u,{slots:i,labels:o,formSize:p,renderSignUpLink:n,initialEmailValue:m,enableEmailConfirmation:t,hideCloseBtnOnEmailConfirmation:s,routeRedirectOnEmailConfirmationClose:a,routeSignUp:d,onErrorCallback:g,onSuccessCallback:f,onSignUpLinkClick:l,routeForgotPassword:c,routeRedirectOnSignIn:e})});export{L as SignIn,L as default}; +import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";import"../chunks/Button.js";import"@dropins/tools/i18n.js";import{S as u}from"../chunks/SignInForm.js";import"@dropins/tools/preact-compat.js";import"../chunks/Button2.js";import"../chunks/getCustomerToken.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/initialize.js";import"../fragments.js";import"../chunks/getStoreConfig.js";import"../chunks/setReCaptchaToken.js";import"../chunks/resendConfirmationEmail.js";import"../chunks/simplifyTransformAttributesForm.js";import"../chunks/transform-attributes-form.js";import"../chunks/focusOnEmptyPasswordField.js";import"../chunks/confirmEmail.js";const L=({slots:i,labels:o,enableEmailConfirmation:t,initialEmailValue:m,formSize:p,renderSignUpLink:n,hideCloseBtnOnEmailConfirmation:s,routeRedirectOnEmailConfirmationClose:a,routeRedirectOnSignIn:e,routeForgotPassword:c,routeSignUp:d,onSuccessCallback:f,onErrorCallback:g,onSignUpLinkClick:l})=>r("div",{className:"auth-sign-in",children:r(u,{slots:i,labels:o,formSize:p,renderSignUpLink:n,initialEmailValue:m,enableEmailConfirmation:t,hideCloseBtnOnEmailConfirmation:s,routeRedirectOnEmailConfirmationClose:a,routeSignUp:d,onErrorCallback:g,onSuccessCallback:f,onSignUpLinkClick:l,routeForgotPassword:c,routeRedirectOnSignIn:e})});export{L as SignIn,L as default}; diff --git a/scripts/__dropins__/storefront-auth/containers/SignIn/index.d.ts b/scripts/__dropins__/storefront-auth/containers/SignIn/index.d.ts index 403140c6e3..a3036a929d 100644 --- a/scripts/__dropins__/storefront-auth/containers/SignIn/index.d.ts +++ b/scripts/__dropins__/storefront-auth/containers/SignIn/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './SignIn'; export { SignIn as default } from './SignIn'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/containers/SignUp.js b/scripts/__dropins__/storefront-auth/containers/SignUp.js index 37ee48fd3f..6ea1727acb 100644 --- a/scripts/__dropins__/storefront-auth/containers/SignUp.js +++ b/scripts/__dropins__/storefront-auth/containers/SignUp.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";/* empty css */import{S as h}from"../chunks/SignUpForm.js";import"../chunks/createCustomerAddress.js";import"../fragments.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/setReCaptchaToken.js";import"../chunks/initialize.js";import"../chunks/transform-attributes-form.js";import"../chunks/getStoreConfig.js";import"../chunks/simplifyTransformAttributesForm.js";import"../chunks/usePasswordValidationMessage.js";import"@dropins/tools/i18n.js";import"../chunks/getCustomerToken.js";import"../chunks/Button2.js";import"@dropins/tools/preact-compat.js";import"../chunks/focusOnEmptyPasswordField.js";import"../chunks/resendConfirmationEmail.js";import"../chunks/SkeletonLoader.js";const P=({slots:i,formSize:o,apiVersion2:t,addressesData:m,isAutoSignInEnabled:p,requireRetypePassword:s,inputsDefaultValueSet:a,displayNewsletterCheckbox:n,displayTermsOfUseCheckbox:e,fieldsConfigForApiVersion1:u,hideCloseBtnOnEmailConfirmation:c,routeRedirectOnEmailConfirmationClose:d,routeRedirectOnSignIn:f,onSuccessCallback:g,onErrorCallback:l,routeSignIn:S})=>r("div",{className:"auth-sign-up",children:r(h,{requireRetypePassword:s,formSize:o,apiVersion2:t,addressesData:m,isAutoSignInEnabled:p,inputsDefaultValueSet:a,fieldsConfigForApiVersion1:u,displayNewsletterCheckbox:n,displayTermsOfUseCheckbox:e,hideCloseBtnOnEmailConfirmation:c,routeRedirectOnEmailConfirmationClose:d,routeRedirectOnSignIn:f,routeSignIn:S,slots:i,onErrorCallback:l,onSuccessCallback:g})});export{P as SignUp,P as default}; +import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";import"../chunks/Button.js";import"@dropins/tools/i18n.js";import{S as h}from"../chunks/SignUpForm.js";import"@dropins/tools/preact-compat.js";import"../chunks/createCustomerAddress.js";import"../fragments.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/setReCaptchaToken.js";import"../chunks/initialize.js";import"../chunks/transform-attributes-form.js";import"../chunks/getStoreConfig.js";import"../chunks/simplifyTransformAttributesForm.js";import"../chunks/usePasswordValidationMessage.js";import"../chunks/getCustomerToken.js";import"../chunks/Button2.js";import"../chunks/focusOnEmptyPasswordField.js";import"../chunks/resendConfirmationEmail.js";import"../chunks/SkeletonLoader.js";const P=({slots:i,formSize:o,apiVersion2:t,addressesData:m,isAutoSignInEnabled:p,requireRetypePassword:s,inputsDefaultValueSet:a,displayNewsletterCheckbox:n,displayTermsOfUseCheckbox:e,fieldsConfigForApiVersion1:u,hideCloseBtnOnEmailConfirmation:c,routeRedirectOnEmailConfirmationClose:d,routeRedirectOnSignIn:f,onSuccessCallback:g,onErrorCallback:l,routeSignIn:S})=>r("div",{className:"auth-sign-up",children:r(h,{requireRetypePassword:s,formSize:o,apiVersion2:t,addressesData:m,isAutoSignInEnabled:p,inputsDefaultValueSet:a,fieldsConfigForApiVersion1:u,displayNewsletterCheckbox:n,displayTermsOfUseCheckbox:e,hideCloseBtnOnEmailConfirmation:c,routeRedirectOnEmailConfirmationClose:d,routeRedirectOnSignIn:f,routeSignIn:S,slots:i,onErrorCallback:l,onSuccessCallback:g})});export{P as SignUp,P as default}; diff --git a/scripts/__dropins__/storefront-auth/containers/SignUp/index.d.ts b/scripts/__dropins__/storefront-auth/containers/SignUp/index.d.ts index ed4aaab157..9d13aa8f1b 100644 --- a/scripts/__dropins__/storefront-auth/containers/SignUp/index.d.ts +++ b/scripts/__dropins__/storefront-auth/containers/SignUp/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './SignUp'; export { SignUp as default } from './SignUp'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/containers/SuccessNotification.js b/scripts/__dropins__/storefront-auth/containers/SuccessNotification.js index 7d09fd07ac..a84055e972 100644 --- a/scripts/__dropins__/storefront-auth/containers/SuccessNotification.js +++ b/scripts/__dropins__/storefront-auth/containers/SuccessNotification.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsxs as a,jsx as e,Fragment as s}from"@dropins/tools/preact-jsx-runtime.js";import{classes as u,Slot as m}from"@dropins/tools/lib.js";import{Button as r}from"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";/* empty css */import{r as d}from"../chunks/revokeCustomerToken.js";import{useText as f}from"@dropins/tools/i18n.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getStoreConfig.js";const h=({formSize:c="default",className:n="",slots:i,labels:t})=>{const o=f({headingText:"Auth.SuccessNotification.headingText",messageText:"Auth.SuccessNotification.messageText",primaryButtonText:"Auth.SuccessNotification.primaryButtonText",secondaryButtonText:"Auth.SuccessNotification.secondaryButtonText"});return a("div",{className:u(["auth-success-notification-form",`auth-success-notification-form--${c}`,n]),id:"welcome-message",role:"alert","aria-live":"assertive","aria-labelledby":(t==null?void 0:t.headingText)??o.headingText,"aria-describedby":(t==null?void 0:t.messageText)??o.messageText,"tab-index":"-1",children:[e("p",{id:"welcome-heading",className:"auth-success-notification-form__title","data-testid":"notification-title",children:(t==null?void 0:t.headingText)??o.headingText}),e("p",{id:"welcome-details",className:"auth-success-notification-form__content-text","data-testid":"notification-content",children:(t==null?void 0:t.messageText)??o.messageText}),i!=null&&i.SuccessNotificationActions?e(m,{"data-testid":"successNotificationActions",name:"SuccessNotificationActions",slot:i==null?void 0:i.SuccessNotificationActions,context:{}}):a(s,{children:[e(r,{"data-testid":"primaryButton",type:"button",className:"auth-success-notification-form__button auth-success-notification-form__button--top",onClick:()=>window.location.href="/",children:o.primaryButtonText}),e(r,{"data-testid":"secondaryButton",type:"button",variant:"tertiary",onClick:async()=>{await d(),window.location.href="/"},children:o.secondaryButtonText})]})]})},k=({formSize:c="default",slots:n,className:i,labels:t})=>e("div",{className:"auth-success-notification",children:e(h,{formSize:c,className:i,slots:n,labels:t})});export{k as SuccessNotification,k as default}; +import{jsxs as a,jsx as e,Fragment as s}from"@dropins/tools/preact-jsx-runtime.js";import{classes as u,Slot as m}from"@dropins/tools/lib.js";import{Button as r}from"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import"@dropins/tools/preact-hooks.js";import"../chunks/Button.js";import{useText as d}from"@dropins/tools/i18n.js";import{r as f}from"../chunks/revokeCustomerToken.js";import"@dropins/tools/preact-compat.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getStoreConfig.js";const h=({formSize:c="default",className:n="",slots:i,labels:t})=>{const o=d({headingText:"Auth.SuccessNotification.headingText",messageText:"Auth.SuccessNotification.messageText",primaryButtonText:"Auth.SuccessNotification.primaryButtonText",secondaryButtonText:"Auth.SuccessNotification.secondaryButtonText"});return a("div",{className:u(["auth-success-notification-form",`auth-success-notification-form--${c}`,n]),id:"welcome-message",role:"alert","aria-live":"assertive","aria-labelledby":(t==null?void 0:t.headingText)??o.headingText,"aria-describedby":(t==null?void 0:t.messageText)??o.messageText,"tab-index":"-1",children:[e("p",{id:"welcome-heading",className:"auth-success-notification-form__title","data-testid":"notification-title",children:(t==null?void 0:t.headingText)??o.headingText}),e("p",{id:"welcome-details",className:"auth-success-notification-form__content-text","data-testid":"notification-content",children:(t==null?void 0:t.messageText)??o.messageText}),i!=null&&i.SuccessNotificationActions?e(m,{"data-testid":"successNotificationActions",name:"SuccessNotificationActions",slot:i==null?void 0:i.SuccessNotificationActions,context:{}}):a(s,{children:[e(r,{"data-testid":"primaryButton",type:"button",className:"auth-success-notification-form__button auth-success-notification-form__button--top",onClick:()=>window.location.href="/",children:o.primaryButtonText}),e(r,{"data-testid":"secondaryButton",type:"button",variant:"tertiary",onClick:async()=>{await f(),window.location.href="/"},children:o.secondaryButtonText})]})]})},C=({formSize:c="default",slots:n,className:i,labels:t})=>e("div",{className:"auth-success-notification",children:e(h,{formSize:c,className:i,slots:n,labels:t})});export{C as SuccessNotification,C as default}; diff --git a/scripts/__dropins__/storefront-auth/containers/SuccessNotification/index.d.ts b/scripts/__dropins__/storefront-auth/containers/SuccessNotification/index.d.ts index cb8dc19b2b..ea41a7d8c2 100644 --- a/scripts/__dropins__/storefront-auth/containers/SuccessNotification/index.d.ts +++ b/scripts/__dropins__/storefront-auth/containers/SuccessNotification/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './SuccessNotification'; export { SuccessNotification as default } from './SuccessNotification'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/containers/UpdatePassword.js b/scripts/__dropins__/storefront-auth/containers/UpdatePassword.js index 812f95a9bf..e7e4af6def 100644 --- a/scripts/__dropins__/storefront-auth/containers/UpdatePassword.js +++ b/scripts/__dropins__/storefront-auth/containers/UpdatePassword.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as u,jsxs as H}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as Z,classes as $}from"@dropins/tools/lib.js";import{Header as k,InLineAlert as S,InputPassword as W}from"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{useState as h,useEffect as z,useCallback as I}from"@dropins/tools/preact-hooks.js";/* empty css */import{v as O,u as g,a as R}from"../chunks/usePasswordValidationMessage.js";import{a as C}from"../chunks/getCustomerToken.js";import{r as tt}from"../chunks/resetPassword.js";import{c as j,g as et,u as at,F as st,B as rt}from"../chunks/Button2.js";import{useText as K}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/initialize.js";import"../fragments.js";import"../chunks/setReCaptchaToken.js";import"@dropins/tools/preact-compat.js";const J=(d,p)=>d.split("&").filter(r=>r.includes(p)).map(r=>r.split("=")[1])[0],it=({isEmailConfirmationRequired:d,signInOnSuccess:p,passwordConfigs:t,routeRedirectOnSignIn:r,routeWrongUrlRedirect:w,onErrorCallback:a,onSuccessCallback:i,handleSetInLineAlertProps:m,routeRedirectOnPasswordUpdate:N,routeSignInPage:o})=>{const s=K({errorNotification:"Auth.Notification.errorNotification",updatePasswordMessage:"Auth.Notification.updatePasswordMessage",updatePasswordActionMessage:"Auth.Notification.updatePasswordActionMessage",customerTokenErrorMessage:"Auth.Api.customerTokenErrorMessage"}),[U,n]=h({userName:"",status:!1}),[x,F]=h(""),[v,A]=h(!1),[P,L]=h(""),[y,M]=h(""),[T,c]=h(!1),[_,q]=h(!1),[b,B]=h([]);z(()=>{v&&!b.length&&(x.length?q(!1):q(!0))},[v,x,b]),z(()=>{const{search:f}=window.location;!f.includes("token=")&&!f.includes("email=")&&j(w)&&(window.location.href=w());const e=decodeURIComponent(f),V=J(e,"token"),E=J(e,"email");L(E),M(V)},[w]);const Q=I(async f=>{f.preventDefault(),c(!0),B([]);const e=et(f.target),V=(e==null?void 0:e.password)&&P&&y;e!=null&&e.password||(q(!0),c(!1));const E=(t==null?void 0:t.requiredCharacterClasses)??0,Y=(t==null?void 0:t.minLength)??0;if(!O(e==null?void 0:e.password,E)||e.password.length<+Y){A(!0),c(!1);return}if(!V){m({type:"error",text:s.errorNotification}),c(!1);return}const{message:D,success:G}=await tt(P,y,e.password);if(G){if(d||!d&&!p){i==null||i(),j(N)&&(window.location.href=N()),A(!0),c(!1),q(!1),F(""),B([{label:s.updatePasswordActionMessage,onClick:()=>{window.location.href=o==null?void 0:o()}}]),m({type:"success",text:s.updatePasswordMessage});return}const l=await C({email:P,password:e.password,handleSetInLineAlertProps:m,onErrorCallback:a,translations:s});l!=null&&l.userName&&(i==null||i(l==null?void 0:l.userName),j(r)?window.location.href=r():n({userName:l==null?void 0:l.userName,status:!0}))}else m({type:"error",text:D}),a==null||a({message:D,success:G});c(!1)},[P,y,t==null?void 0:t.requiredCharacterClasses,t==null?void 0:t.minLength,s,d,p,o,a,i,r,m,N]),X=I(f=>{F(f)},[]);return{additionalActionsAlert:b,passwordError:_,isSuccessful:U,updatePasswordValue:x,isClickSubmit:v,isLoading:T,submitUpdatePassword:Q,handleSetUpdatePasswordValue:X,setIsClickSubmit:A}},ot=({signInOnSuccess:d=!0,formSize:p="default",routeRedirectOnSignIn:t,routeWrongUrlRedirect:r,routeSignInPage:w,slots:a,onErrorCallback:i,onSuccessCallback:m,routeRedirectOnPasswordUpdate:N})=>{const o=K({title:"Auth.UpdatePasswordForm.title",buttonPrimary:"Auth.UpdatePasswordForm.buttonPrimary",placeholder:"Auth.InputPassword.placeholder",floatingLabel:"Auth.InputPassword.floatingLabel",requiredFieldError:"Auth.FormText.requiredFieldError"}),{passwordConfigs:s,isEmailConfirmationRequired:U}=g(),{inLineAlertProps:n,handleSetInLineAlertProps:x}=at(),{additionalActionsAlert:F,passwordError:v,isSuccessful:A,updatePasswordValue:P,isClickSubmit:L,isLoading:y,submitUpdatePassword:M,handleSetUpdatePasswordValue:T}=it({isEmailConfirmationRequired:U,signInOnSuccess:d,passwordConfigs:s,routeRedirectOnSignIn:t,routeWrongUrlRedirect:r,onErrorCallback:i,onSuccessCallback:m,handleSetInLineAlertProps:x,routeRedirectOnPasswordUpdate:N,routeSignInPage:w}),{isValidUniqueSymbols:c,defaultLengthMessage:_}=R({password:P,isClickSubmit:L,passwordConfigs:s});return A.status&&(a!=null&&a.SuccessNotification)?u(Z,{"data-testid":"successNotificationTestId",name:"SuccessNotification",slot:a==null?void 0:a.SuccessNotification,context:{isSuccessful:A}}):H("div",{className:$(["auth-update-password-form",`auth-update-password-form--${p}`]),children:[u(k,{title:o.title,divider:!1,className:"auth-update-password-form__title"}),u(S,{className:$(["auth-update-password-form__notification",["auth-update-password-form__notification--show",!!(n!=null&&n.text)]]),variant:"secondary",heading:n==null?void 0:n.text,icon:n.icon,additionalActions:F}),H(st,{name:"updatePassword_form",className:"auth-update-password-form__form",onSubmit:M,loading:y,fieldsConfig:[],children:[u("div",{style:"display: none;",children:u("input",{type:"text",id:"username",name:"username",autoComplete:"username"})}),u(W,{defaultValue:P,onValue:T,className:"auth-update-password-form__form__item",autoComplete:"new-password",name:"password",errorMessage:v||c==="error"||(_==null?void 0:_.status)==="error"?o.requiredFieldError:void 0,minLength:s==null?void 0:s.minLength,uniqueSymbolsStatus:c,validateLengthConfig:_,requiredCharacterClasses:s==null?void 0:s.requiredCharacterClasses,placeholder:o.placeholder,floatingLabel:o.floatingLabel}),u("div",{className:"auth-update-password-form__button",children:u(rt,{type:"submit",buttonText:o.buttonPrimary,variant:"primary",enableLoader:y})})]})]})},Ut=({slots:d,formSize:p,signInOnSuccess:t,routeRedirectOnPasswordUpdate:r,routeRedirectOnSignIn:w,routeSignInPage:a,routeWrongUrlRedirect:i,onErrorCallback:m,onSuccessCallback:N})=>u("div",{className:"auth-update-password",children:u(ot,{formSize:p,signInOnSuccess:t,routeSignInPage:a,routeRedirectOnSignIn:w,routeWrongUrlRedirect:i,onErrorCallback:m,onSuccessCallback:N,slots:d,routeRedirectOnPasswordUpdate:r})});export{Ut as UpdatePassword,Ut as default}; +import{jsx as u,jsxs as H}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as Y,classes as $}from"@dropins/tools/lib.js";import{Header as Z,InLineAlert as k,InputPassword as S}from"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{useState as h,useEffect as z,useCallback as I}from"@dropins/tools/preact-hooks.js";import{u as W,F as O}from"../chunks/Button.js";import{v as g,u as R,a as C}from"../chunks/usePasswordValidationMessage.js";import{a as tt}from"../chunks/getCustomerToken.js";import{r as et}from"../chunks/resetPassword.js";import{c as j,g as at,u as st,B as rt}from"../chunks/Button2.js";import{useText as it}from"@dropins/tools/i18n.js";import"@dropins/tools/preact-compat.js";import"../chunks/getStoreConfig.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/initialize.js";import"../fragments.js";import"../chunks/setReCaptchaToken.js";const J=(d,p)=>d.split("&").filter(r=>r.includes(p)).map(r=>r.split("=")[1])[0],ot=({isEmailConfirmationRequired:d,signInOnSuccess:p,passwordConfigs:t,routeRedirectOnSignIn:r,routeWrongUrlRedirect:w,onErrorCallback:a,onSuccessCallback:i,handleSetInLineAlertProps:m,routeRedirectOnPasswordUpdate:N,routeSignInPage:o})=>{const s=it({errorNotification:"Auth.Notification.errorNotification",updatePasswordMessage:"Auth.Notification.updatePasswordMessage",updatePasswordActionMessage:"Auth.Notification.updatePasswordActionMessage",customerTokenErrorMessage:"Auth.Api.customerTokenErrorMessage"}),[U,n]=h({userName:"",status:!1}),[x,F]=h(""),[v,A]=h(!1),[P,L]=h(""),[y,M]=h(""),[T,c]=h(!1),[_,q]=h(!1),[b,B]=h([]);z(()=>{v&&!b.length&&(x.length?q(!1):q(!0))},[v,x,b]),z(()=>{const{search:f}=window.location;!f.includes("token=")&&!f.includes("email=")&&j(w)&&(window.location.href=w());const e=decodeURIComponent(f),V=J(e,"token"),E=J(e,"email");L(E),M(V)},[w]);const K=I(async f=>{f.preventDefault(),c(!0),B([]);const e=at(f.target),V=(e==null?void 0:e.password)&&P&&y;e!=null&&e.password||(q(!0),c(!1));const E=(t==null?void 0:t.requiredCharacterClasses)??0,X=(t==null?void 0:t.minLength)??0;if(!g(e==null?void 0:e.password,E)||e.password.length<+X){A(!0),c(!1);return}if(!V){m({type:"error",text:s.errorNotification}),c(!1);return}const{message:D,success:G}=await et(P,y,e.password);if(G){if(d||!d&&!p){i==null||i(),j(N)&&(window.location.href=N()),A(!0),c(!1),q(!1),F(""),B([{label:s.updatePasswordActionMessage,onClick:()=>{window.location.href=o==null?void 0:o()}}]),m({type:"success",text:s.updatePasswordMessage});return}const l=await tt({email:P,password:e.password,handleSetInLineAlertProps:m,onErrorCallback:a,translations:s});l!=null&&l.userName&&(i==null||i(l==null?void 0:l.userName),j(r)?window.location.href=r():n({userName:l==null?void 0:l.userName,status:!0}))}else m({type:"error",text:D}),a==null||a({message:D,success:G});c(!1)},[P,y,t==null?void 0:t.requiredCharacterClasses,t==null?void 0:t.minLength,s,d,p,o,a,i,r,m,N]),Q=I(f=>{F(f)},[]);return{additionalActionsAlert:b,passwordError:_,isSuccessful:U,updatePasswordValue:x,isClickSubmit:v,isLoading:T,submitUpdatePassword:K,handleSetUpdatePasswordValue:Q,setIsClickSubmit:A}},ut=({signInOnSuccess:d=!0,formSize:p="default",routeRedirectOnSignIn:t,routeWrongUrlRedirect:r,routeSignInPage:w,slots:a,onErrorCallback:i,onSuccessCallback:m,routeRedirectOnPasswordUpdate:N})=>{const o=W({title:"Auth.UpdatePasswordForm.title",buttonPrimary:"Auth.UpdatePasswordForm.buttonPrimary",placeholder:"Auth.InputPassword.placeholder",floatingLabel:"Auth.InputPassword.floatingLabel",requiredFieldError:"Auth.FormText.requiredFieldError.default"}),{passwordConfigs:s,isEmailConfirmationRequired:U}=R(),{inLineAlertProps:n,handleSetInLineAlertProps:x}=st(),{additionalActionsAlert:F,passwordError:v,isSuccessful:A,updatePasswordValue:P,isClickSubmit:L,isLoading:y,submitUpdatePassword:M,handleSetUpdatePasswordValue:T}=ot({isEmailConfirmationRequired:U,signInOnSuccess:d,passwordConfigs:s,routeRedirectOnSignIn:t,routeWrongUrlRedirect:r,onErrorCallback:i,onSuccessCallback:m,handleSetInLineAlertProps:x,routeRedirectOnPasswordUpdate:N,routeSignInPage:w}),{isValidUniqueSymbols:c,defaultLengthMessage:_}=C({password:P,isClickSubmit:L,passwordConfigs:s});return A.status&&(a!=null&&a.SuccessNotification)?u(Y,{"data-testid":"successNotificationTestId",name:"SuccessNotification",slot:a==null?void 0:a.SuccessNotification,context:{isSuccessful:A}}):H("div",{className:$(["auth-update-password-form",`auth-update-password-form--${p}`]),children:[u(Z,{title:o.title,divider:!1,className:"auth-update-password-form__title"}),u(k,{className:$(["auth-update-password-form__notification",["auth-update-password-form__notification--show",!!(n!=null&&n.text)]]),variant:"secondary",heading:n==null?void 0:n.text,icon:n.icon,additionalActions:F}),H(O,{name:"updatePassword_form",className:"auth-update-password-form__form",onSubmit:M,loading:y,fieldsConfig:[],children:[u("div",{style:"display: none;",children:u("input",{type:"text",id:"username",name:"username",autoComplete:"username"})}),u(S,{defaultValue:P,onValue:T,className:"auth-update-password-form__form__item",autoComplete:"new-password",name:"password",errorMessage:v||c==="error"||(_==null?void 0:_.status)==="error"?o.requiredFieldError:void 0,minLength:s==null?void 0:s.minLength,uniqueSymbolsStatus:c,validateLengthConfig:_,requiredCharacterClasses:s==null?void 0:s.requiredCharacterClasses,placeholder:o.placeholder,floatingLabel:o.floatingLabel}),u("div",{className:"auth-update-password-form__button",children:u(rt,{type:"submit",buttonText:o.buttonPrimary,variant:"primary",enableLoader:y})})]})]})},Lt=({slots:d,formSize:p,signInOnSuccess:t,routeRedirectOnPasswordUpdate:r,routeRedirectOnSignIn:w,routeSignInPage:a,routeWrongUrlRedirect:i,onErrorCallback:m,onSuccessCallback:N})=>u("div",{className:"auth-update-password",children:u(ut,{formSize:p,signInOnSuccess:t,routeSignInPage:a,routeRedirectOnSignIn:w,routeWrongUrlRedirect:i,onErrorCallback:m,onSuccessCallback:N,slots:d,routeRedirectOnPasswordUpdate:r})});export{Lt as UpdatePassword,Lt as default}; diff --git a/scripts/__dropins__/storefront-auth/containers/UpdatePassword/index.d.ts b/scripts/__dropins__/storefront-auth/containers/UpdatePassword/index.d.ts index eb13ef9ca9..32e383b768 100644 --- a/scripts/__dropins__/storefront-auth/containers/UpdatePassword/index.d.ts +++ b/scripts/__dropins__/storefront-auth/containers/UpdatePassword/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './UpdatePassword'; export { UpdatePassword as default } from './UpdatePassword'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/containers/index.d.ts b/scripts/__dropins__/storefront-auth/containers/index.d.ts index b51a7efdad..1198e058ea 100644 --- a/scripts/__dropins__/storefront-auth/containers/index.d.ts +++ b/scripts/__dropins__/storefront-auth/containers/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './UpdatePassword'; export * from './SuccessNotification'; export * from './SignUp'; diff --git a/scripts/__dropins__/storefront-auth/data/models/attributes-form.d.ts b/scripts/__dropins__/storefront-auth/data/models/attributes-form.d.ts index 7b1b35072d..fcd8f45803 100644 --- a/scripts/__dropins__/storefront-auth/data/models/attributes-form.d.ts +++ b/scripts/__dropins__/storefront-auth/data/models/attributes-form.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare enum FieldEnumList { BOOLEAN = "BOOLEAN", DATE = "DATE", diff --git a/scripts/__dropins__/storefront-auth/data/models/customer-data.d.ts b/scripts/__dropins__/storefront-auth/data/models/customer-data.d.ts index 6afa4e7dca..cdbed74f3c 100644 --- a/scripts/__dropins__/storefront-auth/data/models/customer-data.d.ts +++ b/scripts/__dropins__/storefront-auth/data/models/customer-data.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface CustomerModel { firstName: string; lastName: string; @@ -8,4 +24,15 @@ export interface CustomerModel { message: string; }[]; } +export interface AccountModel { + firstName?: string; + lastName?: string; + emailAddress?: string; + phoneNumber?: string; + countryCode?: string; + accountId?: string; + accountType?: string; + company?: string; + customerGroup?: string; +} //# sourceMappingURL=customer-data.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/data/models/index.d.ts b/scripts/__dropins__/storefront-auth/data/models/index.d.ts index 5d968b28e6..5bf9d9475a 100644 --- a/scripts/__dropins__/storefront-auth/data/models/index.d.ts +++ b/scripts/__dropins__/storefront-auth/data/models/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './store-config'; export * from './reset-password'; export * from './password-reset-email'; diff --git a/scripts/__dropins__/storefront-auth/data/models/password-reset-email.d.ts b/scripts/__dropins__/storefront-auth/data/models/password-reset-email.d.ts index b2c9e9a519..89f4be9149 100644 --- a/scripts/__dropins__/storefront-auth/data/models/password-reset-email.d.ts +++ b/scripts/__dropins__/storefront-auth/data/models/password-reset-email.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface PasswordResetEmailModel { message: string | ''; success: boolean; diff --git a/scripts/__dropins__/storefront-auth/data/models/reset-password.d.ts b/scripts/__dropins__/storefront-auth/data/models/reset-password.d.ts index c5a3f5cb6c..b24affe16e 100644 --- a/scripts/__dropins__/storefront-auth/data/models/reset-password.d.ts +++ b/scripts/__dropins__/storefront-auth/data/models/reset-password.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface ResetPasswordModel { message: string | ''; success: boolean; diff --git a/scripts/__dropins__/storefront-auth/data/models/revoke-customer-token.d.ts b/scripts/__dropins__/storefront-auth/data/models/revoke-customer-token.d.ts index b6c324f34b..ad0c8a53b3 100644 --- a/scripts/__dropins__/storefront-auth/data/models/revoke-customer-token.d.ts +++ b/scripts/__dropins__/storefront-auth/data/models/revoke-customer-token.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface RevokeCustomerTokenModel { message: string | ''; success: boolean; diff --git a/scripts/__dropins__/storefront-auth/data/models/store-config.d.ts b/scripts/__dropins__/storefront-auth/data/models/store-config.d.ts index 77f46da058..e8803bb4d9 100644 --- a/scripts/__dropins__/storefront-auth/data/models/store-config.d.ts +++ b/scripts/__dropins__/storefront-auth/data/models/store-config.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface StoreConfigModel { autocompleteOnStorefront: boolean; minLength: number; diff --git a/scripts/__dropins__/storefront-auth/data/transforms/index.d.ts b/scripts/__dropins__/storefront-auth/data/transforms/index.d.ts index 9c77cdfb90..690a0ad1fc 100644 --- a/scripts/__dropins__/storefront-auth/data/transforms/index.d.ts +++ b/scripts/__dropins__/storefront-auth/data/transforms/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './transform-auth'; export * from './transform-store-config'; export * from './transform-password-reset-email'; diff --git a/scripts/__dropins__/storefront-auth/data/transforms/transform-auth.d.ts b/scripts/__dropins__/storefront-auth/data/transforms/transform-auth.d.ts index ae5784cced..b1849342c0 100644 --- a/scripts/__dropins__/storefront-auth/data/transforms/transform-auth.d.ts +++ b/scripts/__dropins__/storefront-auth/data/transforms/transform-auth.d.ts @@ -1,37 +1,9 @@ -export declare const loginContext: (ctx: any) => { - personalEmail: { - address: any; - }; - userAccount: { - login: boolean; - }; - commerce: { - commerceScope: { - storeCode: any; - }; - }; -}; -export declare const logoutContext: (ctx: any) => { - userAccount: { - logout: boolean; - }; - commerce: { - commerceScope: { - storeCode: any; - }; - }; -}; -export declare const createAccountContext: (ctx: any) => { - personalEmail: { - address: any; - }; - userAccount: { - updateProfile: any; - }; - commerce: { - commerceScope: { - storeCode: any; - }; - }; -}; +import { AccountModel, CustomerModel } from '../models'; + +/** + * References: + * https://github.com/adobe/commerce-events/blob/main/packages/storefront-events-collector/src/handlers/account/signInAEP.ts + * https://github.com/adobe/commerce-events/blob/main/packages/storefront-events-collector/src/handlers/account/createAccountAEP.ts + */ +export declare const transformAccount: (data: CustomerModel) => AccountModel; //# sourceMappingURL=transform-auth.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/fragments.js b/scripts/__dropins__/storefront-auth/fragments.js index 4bcbe599f7..d9aec75221 100644 --- a/scripts/__dropins__/storefront-auth/fragments.js +++ b/scripts/__dropins__/storefront-auth/fragments.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ const e=` fragment CUSTOMER_INFORMATION_FRAGMENT on Customer { diff --git a/scripts/__dropins__/storefront-auth/hooks/api/useGetAttributesForm.d.ts b/scripts/__dropins__/storefront-auth/hooks/api/useGetAttributesForm.d.ts index c5a62acfd9..e12e5c3820 100644 --- a/scripts/__dropins__/storefront-auth/hooks/api/useGetAttributesForm.d.ts +++ b/scripts/__dropins__/storefront-auth/hooks/api/useGetAttributesForm.d.ts @@ -1,5 +1,4 @@ import { inputsDefaultValueSetProps } from '../../types'; -import { AttributesFormItemsProps } from '../../data/models'; interface UseGetAttributesFormProps { fieldsConfigForApiVersion1: {}[]; @@ -7,7 +6,28 @@ interface UseGetAttributesFormProps { inputsDefaultValueSet?: inputsDefaultValueSetProps[]; } export declare const useGetAttributesForm: ({ inputsDefaultValueSet, fieldsConfigForApiVersion1, apiVersion2, }: UseGetAttributesFormProps) => { - fieldsListConfigs: AttributesFormItemsProps[]; + fieldsListConfigs: { + autocomplete?: string | undefined; + code?: string | undefined; + name?: string | undefined; + id?: string | undefined; + defaultValue?: string | number | boolean | undefined; + entityType?: string | undefined; + className?: string | undefined; + fieldType?: import('../../data/models').FieldEnumList | undefined; + multilineCount: number; + required?: boolean | undefined; + unique?: boolean | undefined; + label?: string | undefined; + orderNumber: number; + options?: { + is_default: boolean; + label: string; + value: string; + }[] | undefined; + hidden?: boolean | undefined; + customUpperCode: string; + }[]; }; export {}; //# sourceMappingURL=useGetAttributesForm.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/hooks/api/useGetStoreConfigs.d.ts b/scripts/__dropins__/storefront-auth/hooks/api/useGetStoreConfigs.d.ts index a854f124a2..16e8578a24 100644 --- a/scripts/__dropins__/storefront-auth/hooks/api/useGetStoreConfigs.d.ts +++ b/scripts/__dropins__/storefront-auth/hooks/api/useGetStoreConfigs.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const useGetStoreConfigs: () => { passwordConfigs: { minLength: number; diff --git a/scripts/__dropins__/storefront-auth/hooks/useCustomTranslations.d.ts b/scripts/__dropins__/storefront-auth/hooks/useCustomTranslations.d.ts new file mode 100644 index 0000000000..5df88938cc --- /dev/null +++ b/scripts/__dropins__/storefront-auth/hooks/useCustomTranslations.d.ts @@ -0,0 +1,24 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ +/** + * A custom hook for handling translations with support for extensible error messages. + * + * @param defaultKeys - A mapping of keys to their translation paths. + * @returns A complete set of translations, including dynamically updated values for null error keys. + */ +export declare const useCustomTranslations: (defaultKeys: Record) => Record; +//# sourceMappingURL=useCustomTranslations.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/hooks/useEmailConfirmation.d.ts b/scripts/__dropins__/storefront-auth/hooks/useEmailConfirmation.d.ts index b55859e767..992b980b22 100644 --- a/scripts/__dropins__/storefront-auth/hooks/useEmailConfirmation.d.ts +++ b/scripts/__dropins__/storefront-auth/hooks/useEmailConfirmation.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ interface useEmailConfirmationProps { enableEmailConfirmation: boolean; } diff --git a/scripts/__dropins__/storefront-auth/lib/acdl.d.ts b/scripts/__dropins__/storefront-auth/lib/acdl.d.ts index 2f36ae4e70..7afec0603b 100644 --- a/scripts/__dropins__/storefront-auth/lib/acdl.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/acdl.d.ts @@ -1,9 +1,30 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ declare enum EventsList { CREATE_ACCOUNT_EVENT = "create-account", SIGN_IN = "sign-in", SIGN_OUT = "sign-out" } -declare function pushEvent(event: string): void; +export declare function getAdobeDataLayer(): any; +/** + * Pushes an event to the Adobe Client Data Layer (ACDL) + * Logic based on: https://github.com/adobe/commerce-events/blob/1973d0ce28471ef190fa06dad6359ffa0ab51db6/packages/storefront-events-sdk/src/Base.ts#L34 + */ +declare function pushEvent(event: string, additionalContext?: any): void; declare const publishEvents: (eventType: string, eventParams: any) => null | undefined; export { EventsList, publishEvents, pushEvent }; //# sourceMappingURL=acdl.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/checkIsFunction.d.ts b/scripts/__dropins__/storefront-auth/lib/checkIsFunction.d.ts index 49cefb714e..492dfe7cc4 100644 --- a/scripts/__dropins__/storefront-auth/lib/checkIsFunction.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/checkIsFunction.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const checkIsFunction: (value: any) => value is Function; //# sourceMappingURL=checkIsFunction.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/clearUrlAndReplace.d.ts b/scripts/__dropins__/storefront-auth/lib/clearUrlAndReplace.d.ts index b0df763d11..aa60c2c0f9 100644 --- a/scripts/__dropins__/storefront-auth/lib/clearUrlAndReplace.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/clearUrlAndReplace.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const clearUrlAndReplace: () => void; //# sourceMappingURL=clearUrlAndReplace.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/convertCase.d.ts b/scripts/__dropins__/storefront-auth/lib/convertCase.d.ts index 44782068b7..404ebbe6af 100644 --- a/scripts/__dropins__/storefront-auth/lib/convertCase.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/convertCase.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const convertToCamelCase: (key: string) => string; export declare const convertToSnakeCase: (key: string) => string; export declare const convertKeysCase: (data: any, type: 'snakeCase' | 'camelCase', dictionary?: Record) => any; diff --git a/scripts/__dropins__/storefront-auth/lib/convertToInputDateFormat.d.ts b/scripts/__dropins__/storefront-auth/lib/convertToInputDateFormat.d.ts index 13e6a09008..70643efa62 100644 --- a/scripts/__dropins__/storefront-auth/lib/convertToInputDateFormat.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/convertToInputDateFormat.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const convertToInputDateFormat: (dateTimeString: string) => string; //# sourceMappingURL=convertToInputDateFormat.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/cookieUtils.d.ts b/scripts/__dropins__/storefront-auth/lib/cookieUtils.d.ts index ecf14beceb..fd6c39f1c7 100644 --- a/scripts/__dropins__/storefront-auth/lib/cookieUtils.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/cookieUtils.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const deleteCookie: (cookieName: string) => void; export declare const getCookiesLifetime: () => Promise; //# sourceMappingURL=cookieUtils.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/extractErrorKeyAndMessage.d.ts b/scripts/__dropins__/storefront-auth/lib/extractErrorKeyAndMessage.d.ts new file mode 100644 index 0000000000..57e24fd1e6 --- /dev/null +++ b/scripts/__dropins__/storefront-auth/lib/extractErrorKeyAndMessage.d.ts @@ -0,0 +1,7 @@ +type ExtractErrorKeyAndMessage = { + errorKey: string; + defaultErrorMessage: string; +}; +export declare const extractErrorKeyAndMessage: (errorConfig: string) => ExtractErrorKeyAndMessage; +export {}; +//# sourceMappingURL=extractErrorKeyAndMessage.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/fetch-error.d.ts b/scripts/__dropins__/storefront-auth/lib/fetch-error.d.ts index 0a9e09a300..c86984e32c 100644 --- a/scripts/__dropins__/storefront-auth/lib/fetch-error.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/fetch-error.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ /** Actions */ export declare const handleFetchError: (errors: Array<{ message: string; diff --git a/scripts/__dropins__/storefront-auth/lib/focusOnEmptyPasswordField.d.ts b/scripts/__dropins__/storefront-auth/lib/focusOnEmptyPasswordField.d.ts index bd748730ac..8c297ac832 100644 --- a/scripts/__dropins__/storefront-auth/lib/focusOnEmptyPasswordField.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/focusOnEmptyPasswordField.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const focusOnEmptyPasswordField: (event: Event, signUpPasswordValue: string, confirmPassword: string) => void; //# sourceMappingURL=focusOnEmptyPasswordField.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/generateRandomDigits.d.ts b/scripts/__dropins__/storefront-auth/lib/generateRandomDigits.d.ts index 9003061533..9ad75005d0 100644 --- a/scripts/__dropins__/storefront-auth/lib/generateRandomDigits.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/generateRandomDigits.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const generateRandomDigits: () => string; //# sourceMappingURL=generateRandomDigits.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/getFormValues.d.ts b/scripts/__dropins__/storefront-auth/lib/getFormValues.d.ts index d5c917e92a..5e0031df77 100644 --- a/scripts/__dropins__/storefront-auth/lib/getFormValues.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/getFormValues.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const getFormValues: (form: any) => any; //# sourceMappingURL=getFormValues.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/getUrlParam.d.ts b/scripts/__dropins__/storefront-auth/lib/getUrlParam.d.ts index 1c9baa7b04..feafc2b0a0 100644 --- a/scripts/__dropins__/storefront-auth/lib/getUrlParam.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/getUrlParam.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const getUrlParam: (url: string, param: string) => string; //# sourceMappingURL=getUrlParam.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/initializeFormDataAndErrors.d.ts b/scripts/__dropins__/storefront-auth/lib/initializeFormDataAndErrors.d.ts index f07093b5a9..6bd213d39d 100644 --- a/scripts/__dropins__/storefront-auth/lib/initializeFormDataAndErrors.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/initializeFormDataAndErrors.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ declare const _default: (fieldsConfig: Array<{ customUpperCode?: string; required?: boolean; diff --git a/scripts/__dropins__/storefront-auth/lib/mergeFormObjects.d.ts b/scripts/__dropins__/storefront-auth/lib/mergeFormObjects.d.ts index 18a6e5d04b..e0b6c77c39 100644 --- a/scripts/__dropins__/storefront-auth/lib/mergeFormObjects.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/mergeFormObjects.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const mergeFormObjects: (input: Record, apiVersion2: boolean) => any; //# sourceMappingURL=mergeFormObjects.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/network-error.d.ts b/scripts/__dropins__/storefront-auth/lib/network-error.d.ts index 772ab565ae..3d5461c70b 100644 --- a/scripts/__dropins__/storefront-auth/lib/network-error.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/network-error.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ /** * A function which can be attached to fetchGraphQL to handle thrown errors in * a generic way. diff --git a/scripts/__dropins__/storefront-auth/lib/setReCaptchaToken.d.ts b/scripts/__dropins__/storefront-auth/lib/setReCaptchaToken.d.ts index 547730ca02..72c63f89d5 100644 --- a/scripts/__dropins__/storefront-auth/lib/setReCaptchaToken.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/setReCaptchaToken.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const setReCaptchaToken: () => Promise; //# sourceMappingURL=setReCaptchaToken.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/simplifyTransformAttributesForm.d.ts b/scripts/__dropins__/storefront-auth/lib/simplifyTransformAttributesForm.d.ts index 162110056f..9ba1ab8201 100644 --- a/scripts/__dropins__/storefront-auth/lib/simplifyTransformAttributesForm.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/simplifyTransformAttributesForm.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const simplifyTransformAttributesForm: (defaultSignUpFields: any) => import('../data/models').AttributesFormModel[]; //# sourceMappingURL=simplifyTransformAttributesForm.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/transformDobForm.d.ts b/scripts/__dropins__/storefront-auth/lib/transformDobForm.d.ts new file mode 100644 index 0000000000..6ed76909bd --- /dev/null +++ b/scripts/__dropins__/storefront-auth/lib/transformDobForm.d.ts @@ -0,0 +1,2 @@ +export declare const transformDobForm: (form: Record) => Record; +//# sourceMappingURL=transformDobForm.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/lib/validationFields.d.ts b/scripts/__dropins__/storefront-auth/lib/validationFields.d.ts index 7757a664c5..059851cc17 100644 --- a/scripts/__dropins__/storefront-auth/lib/validationFields.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/validationFields.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ type TranslationList = Record; type ErrorsList = Record; export type ValidationFieldsConfig = { diff --git a/scripts/__dropins__/storefront-auth/lib/validationUniqueSymbolsPassword.d.ts b/scripts/__dropins__/storefront-auth/lib/validationUniqueSymbolsPassword.d.ts index 4d33927030..5aaca4d541 100644 --- a/scripts/__dropins__/storefront-auth/lib/validationUniqueSymbolsPassword.d.ts +++ b/scripts/__dropins__/storefront-auth/lib/validationUniqueSymbolsPassword.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const validationUniqueSymbolsPassword: (password: string, uniqueSymbolsCount: number) => boolean; //# sourceMappingURL=validationUniqueSymbolsPassword.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/render.js b/scripts/__dropins__/storefront-auth/render.js index 4b973ea874..a0eec6c6c4 100644 --- a/scripts/__dropins__/storefront-auth/render.js +++ b/scripts/__dropins__/storefront-auth/render.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ (function(o,t){try{if(typeof document<"u"){const a=document.createElement("style"),n=t.styleId;for(const i in t.attributes)a.setAttribute(i,t.attributes[i]);a.setAttribute("data-dropin",n),a.appendChild(document.createTextNode(o));const r=document.querySelector('style[data-dropin="sdk"]');if(r)r.after(a);else{const i=document.querySelector('link[rel="stylesheet"], style');i?i.before(a):document.head.append(a)}}}catch(a){console.error("dropin-styles (injectCodeFunction)",a)}})('.auth-email-confirmation-form{border-radius:8px;background-color:var(--color-neutral-50, #fff);padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium) var(--spacing-small);text-align:start}@media (min-width: 768px){.auth-email-confirmation-form{padding:var(--spacing-big) var(--spacing-xbig) var(--spacing-xxbig) var(--spacing-xbig)}}.auth-email-confirmation-form__title{font:var(--type-headline-2-default-font);letter-spacing:var(--type-display-1-letter-spacing);color:var(--color-neutral-800, #3d3d3d)}.auth-email-confirmation-form__subtitle{display:block;font:var(--type-details-caption-2-font);letter-spacing:var(--type-button-2-letter-spacing);color:var(--color-neutral-700, #666666)}.auth-email-confirmation-form__notification{margin-bottom:var(--spacing-medium)}.auth-email-confirmation-form.auth-email-confirmation-form--small{padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium) var(--spacing-small)}.auth-email-confirmation-form.auth-email-confirmation-form--small .auth-email-confirmation-form__buttons{grid-template-columns:1fr;gap:20px 0}.auth-email-confirmation-form__buttons{display:grid;grid-template-columns:auto auto;justify-content:space-between}@media (max-width: 768px){.auth-email-confirmation-form__buttons{gap:20px 0;grid-template-columns:1fr}}.auth-email-confirmation-form__text{display:block;font-family:var(--type-body-1-default-font);letter-spacing:var(--type-display-1-letter-spacing);color:var(--neutrals-neutral-800);padding:var(--spacing-big) 0}.auth-email-confirmation-form.auth-email-confirmation-form--small .auth-email-confirmation-form__buttons{justify-content:center;flex-wrap:wrap}.auth-email-confirmation-form.auth-email-confirmation-form--small .auth-email-confirmation-form__buttons{flex-basis:100%;margin-top:var(--spacing-medium)}.auth-email-confirmation-form.auth-email-confirmation-form--small .auth-email-confirmation-form__buttons>span{display:none}.auth-email-confirmation-form__buttons>span{border:1px solid var(--color-brand-500);margin:var(--spacing-small) var(--spacing-xsmall);font:var(--type-button-2-font)}@media (max-width: 768px){.auth-email-confirmation-form__buttons{justify-content:center;flex-wrap:wrap}.auth-email-confirmation-form__buttons{flex-basis:100%;margin-top:var(--spacing-medium)}.auth-email-confirmation-form__buttons>span{display:none}}.auth-update-password-form{border-radius:var(--shape-border-radius-2);background-color:var(--color-neutral-50, #fff);padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium) var(--spacing-small)}@media (min-width: 768px){.auth-update-password-form{padding:var(--spacing-big) var(--spacing-xxbig) var(--spacing-xxbig) var(--spacing-xxbig)}}.auth-update-password-form.auth-update-password-form--small{padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium) var(--spacing-small)}.auth-update-password-form.auth-update-password-form--small .auth-update-password-form__form__item{margin-bottom:var(--spacing-big)}.auth-update-password-form.auth-update-password-form--small .auth-update-password-form__title{margin-bottom:var(--spacing-small)}.auth-update-password-form__title{margin-bottom:var(--spacing-big)}@media (min-width: 768px){.auth-update-password-form__title{margin-bottom:var(--spacing-xxbig)}}.auth-update-password-form__form .auth-update-password-form__form__item{margin-bottom:var(--spacing-big)}@media (min-width: 768px){.auth-update-password-form__form .auth-update-password-form__form__item{margin-bottom:var(--spacing-xxbig)}}.auth-update-password-form__notification{display:none}.auth-update-password-form__notification--show{display:grid;margin-bottom:var(--spacing-medium)}.auth-success-notification-form{display:flex;justify-content:center;align-items:center;flex-direction:column;border-radius:var(--shape-border-radius-2);background:var(--color-neutral-50, #fff);padding:var(--spacing-xbig) var(--spacing-small) var(--spacing-medium) var(--spacing-small)}@media (min-width: 768px){.auth-success-notification-form{padding:var(--spacing-big) var(--spacing-xbig) var(--spacing-xxbig) var(--spacing-xbig)}}.auth-success-notification-form.auth-success-notification-form--small{padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium) var(--spacing-small)}.auth-success-notification-form__title{color:var(--color-neutral-800, #2b2b2b);font:var(--type-headline-2-strong-font);letter-spacing:var(--type-details-caption-1-letter-spacing);margin-bottom:var(--spacing-medium)}.auth-success-notification-form__content-text{color:var(--color-neutral-800, #2b2b2b);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);text-align:center;margin-bottom:var(--spacing-xxbig)}.auth-success-notification-form__button--top{margin-bottom:var(--spacing-xsmall)}.auth-sign-up-form{border-radius:var(--shape-border-radius-2);background-color:var(--color-neutral-50, #fff);padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium) var(--spacing-small)}@media (min-width: 768px){.auth-sign-up-form{padding:var(--spacing-big) var(--spacing-xxbig) var(--spacing-xxbig) var(--spacing-xxbig)}}.auth-sign-up-form.auth-sign-up-form--small{padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium) var(--spacing-small)}.auth-sign-up-form.auth-sign-up-form--small .auth-sign-up-form__title{margin-bottom:var(--spacing-small)}.auth-sign-up-form.auth-sign-up-form--small .auth-sign-up-form__form__field .auth-sign-up-form__form__field:nth-child(2),.auth-sign-up-form.auth-sign-up-form--small .auth-sign-up-form__form__field .auth-sign-up-form__form__field:nth-child(3){flex-basis:100%}.auth-sign-up-form.auth-sign-up-form--small .auth-sign-up-form__form{grid-template-columns:1fr}.auth-sign-up-form__form__confirm-wrapper>.auth-sign-up-form__form__field--confirm-password{margin:var(--spacing-medium) 0}.auth-sign-up-form__title{margin-bottom:var(--spacing-big)}@media (min-width: 768px){.auth-sign-up-form__title{margin-bottom:var(--spacing-xxbig)}}.auth-sign-up-form__notification{margin-bottom:var(--spacing-medium)}.auth-sign-up-form__form{display:flex;flex-wrap:wrap;flex-direction:row;gap:0 13px}.auth-sign-up-form__form__field{margin-bottom:var(--spacing-medium);flex-basis:100%;flex-grow:1;flex-shrink:0}.auth-sign-up-form__checkbox{margin-bottom:12px}.auth-sign-up-form__automatic-login{margin-top:12px}.auth-sign-up-form__form__field:nth-child(2),.auth-sign-up-form__form__field:nth-child(3){flex-shrink:1;flex-grow:1;flex-basis:100%}.auth-sign-up-form-buttons{flex-basis:100%;display:grid;grid-template-columns:1fr;gap:var(--spacing-medium) 0;justify-content:center;grid-area:buttons}@media (min-width: 768px){.auth-sign-up-form-buttons{display:grid;grid-template-columns:auto auto;justify-content:space-between}.auth-sign-up-form__form__field:nth-child(2),.auth-sign-up-form__form__field:nth-child(3){flex-shrink:1;flex-grow:.5;flex-basis:48%}}.auth-sign-in-form{border-radius:var(--shape-border-radius-2);background-color:var(--color-neutral-50, #fff);padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium) var(--spacing-small)}@media (min-width: 768px){.auth-sign-in-form{padding:var(--spacing-big) var(--spacing-xxbig) var(--spacing-xxbig) var(--spacing-xxbig)}}.auth-sign-in-form__notification{margin-bottom:var(--spacing-medium)}.auth-sign-in-form.auth-sign-in-form--small{padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium) var(--spacing-small)}.auth-sign-in-form.auth-sign-in-form--small .auth-sign-in-form__form__email,.auth-sign-in-form.auth-sign-in-form--small .auth-sign-in-form__form__password,.auth-sign-in-form.auth-sign-in-form--small .auth-sign-in-form__title{margin-bottom:var(--spacing-medium)}.auth-sign-in-form.auth-sign-in-form--small .auth-sign-in-form__form__buttons{grid-template-columns:1fr;gap:20px 0}.auth-sign-in-form__title{margin-bottom:var(--spacing-big)}@media (min-width: 768px){.auth-sign-in-form__title{margin-bottom:var(--spacing-xxbig)}}.auth-sign-in-form__form{display:grid;grid-template-columns:1fr}.auth-sign-in-form__form__email{margin-bottom:var(--spacing-medium)}.auth-sign-in-form__form__password{margin-bottom:var(--spacing-big)}.auth-sign-in-form__form__buttons{display:grid;grid-template-columns:auto auto;justify-content:space-between}@media (max-width: 768px){.auth-sign-in-form__form__buttons{gap:20px 0;grid-template-columns:1fr}}.auth-sign-in-form.auth-sign-in-form--small .auth-sign-in-form__form__buttons .auth-sign-in-form__form__buttons__combine{justify-content:center;flex-wrap:wrap}.auth-sign-in-form.auth-sign-in-form--small .auth-sign-in-form__form__buttons .auth-sign-in-form__form__buttons__combine .auth-sign-in-form__button--signup{flex-basis:100%;margin-top:20px}.auth-sign-in-form.auth-sign-in-form--small .auth-sign-in-form__form__buttons .auth-sign-in-form__form__buttons__combine>span{display:none}.auth-sign-in-form__form__buttons .auth-sign-in-form__form__buttons__combine{display:flex}.auth-sign-in-form__form__buttons .auth-sign-in-form__form__buttons__combine>span{border:var(--shape-border-width-1) solid var(--color-brand-500);margin:13px 10px;font:var(--type-button-2-font)}.auth-sign-in-form__resend-email-notification button{font:var(--type-button-3-font);color:var(--textColor);display:inline;background-color:transparent;border:none;cursor:pointer;padding:0;margin:0}.auth-sign-in-form__resend-email-notification button:hover{color:var(--color-brand-700);text-decoration:solid underline var(--color-brand-700);text-underline-offset:6px;color:var(--color-informational-500)}@media (max-width: 768px){.auth-sign-in-form__form__buttons .auth-sign-in-form__form__buttons__combine{justify-content:center;flex-wrap:wrap}.auth-sign-in-form__form__buttons .auth-sign-in-form__form__buttons__combine .auth-sign-in-form__button--signup{flex-basis:100%;margin-top:20px}.auth-sign-in-form__form__buttons .auth-sign-in-form__form__buttons__combine>span{display:none}}.auth-reset-password-form{border-radius:var(--shape-border-radius-2);background-color:var(--color-neutral-50, #fff);padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium) var(--spacing-small)}@media (min-width: 768px){.auth-reset-password-form{padding:var(--spacing-big) var(--spacing-xxbig) var(--spacing-xxbig) var(--spacing-xxbig)}}.auth-reset-password-form.auth-reset-password-form--small{padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium) var(--spacing-small)}.auth-reset-password-form.auth-reset-password-form--small .auth-reset-password-form__form__item,.auth-reset-password-form.auth-reset-password-form--small .auth-reset-password-form__title{margin-bottom:var(--spacing-medium)}.auth-reset-password-form__form{display:grid;grid-template-columns:1fr}.auth-reset-password-form__form__item{margin-bottom:var(--spacing-medium)}.auth-reset-password-form__buttons{display:grid;grid-template-columns:1fr;gap:20px 0}.auth-reset-password-form.auth-reset-password-form--small{grid-template-columns:1fr;gap:20px 0}.auth-reset-password-form__notification{margin-bottom:var(--spacing-medium)}.auth-reset-password-form__title{margin-bottom:var(--spacing-big)}@media (min-width: 768px){.auth-reset-password-form__title{margin-bottom:var(--spacing-xxbig)}}@media (min-width: 600px){.auth-reset-password-form__buttons{grid-template-columns:auto auto;justify-content:space-between}}.auth-button{position:relative}.auth-button__wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);opacity:0;display:none}.auth-custom-button__loader{width:20px;height:20px;border:5px solid #fff;border-radius:50%;display:inline-block;box-sizing:border-box;position:relative;animation:pulse 1s linear infinite}.auth-button__loader:after{content:"";position:absolute;width:20px;height:20px;border:5px solid #fff;border-radius:50%;display:inline-block;box-sizing:border-box;left:50%;top:50%;transform:translate(-50%,-50%);animation:scaleUp 1s linear infinite}@keyframes scaleUp{0%{transform:translate(-50%,-50%) scale(0)}60%,to{transform:translate(-50%,-50%) scale(1)}}@keyframes pulse{0%,60%,to{transform:scale(1)}80%{transform:scale(1.2)}}.auth-button.enableLoader .auth-button__text{opacity:0}.auth-button.enableLoader .auth-button__wrapper{opacity:1;display:inline-flex}',{styleId:"Auth"}); import{jsx as s}from"@dropins/tools/preact-jsx-runtime.js";import{deepmerge as d,Render as m}from"@dropins/tools/lib.js";import{useState as u,useEffect as f}from"@dropins/tools/preact-hooks.js";import{UIProvider as h}from"@dropins/tools/components.js";import{events as p}from"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{c as g}from"./chunks/initialize.js";const w={PasswordValidationMessage:{chartTwoSymbols:"Use characters and numbers or symbols",chartThreeSymbols:"Use characters, numbers and symbols",chartFourSymbols:"Use uppercase characters, lowercase characters, numbers and symbols",messageLengthPassword:"At least {minLength} characters long"},ResetPasswordForm:{title:"Reset your password",buttonPrimary:"Reset password",buttonSecondary:"Back to sign in",formAriaLabel:"Reset your password form"},SignInForm:{title:"Sign in",buttonPrimary:"Sign in",buttonSecondary:"Sign up",buttonTertiary:"Forgot password?"},SignUpForm:{title:"Sign up",buttonPrimary:"Create account",buttonSecondary:"Already a member? Sign in",privacyPolicyDefaultText:"I’ve read and accept the Terms of Use and Privacy Policy.",subscribedDefaultText:"Subscribe to our newsletter and be the first to know about new arrivals, sales and exclusive offers.",keepMeLoggedText:"Keep me logged in after account creation",failedCreateCustomerAddress:"Failed to create customer addresses:",confirmPassword:{placeholder:"Confirm password",floatingLabel:"Confirm password *",passwordMismatch:"Passwords do not match. Please make sure both password fields are identical."}},UpdatePasswordForm:{title:"Update password",buttonPrimary:"Update password"},FormText:{requiredFieldError:"This is a required field.",numericError:"Only numeric values are allowed.",alphaNumWithSpacesError:"Only alphanumeric characters and spaces are allowed.",alphaNumericError:"Only alphanumeric characters are allowed.",alphaError:"Only alphabetic characters are allowed.",emailError:"Please enter a valid email address.",dateError:"Please enter a valid date.",dateLengthError:"Date must be between {min} and {max}.",dateMaxError:"Date must be less than or equal to {max}.",dateMinError:"Date must be greater than or equal to {min}.",urlError:"Please enter a valid URL, e.g., https://www.website.com.",lengthTextError:"Text length must be between {min} and {max} characters."},EmailConfirmationForm:{title:"Verify your email address",subtitle:"We`ve sent an email to",mainText:"Check your inbox and click on the link we just send you to confirm your email address and activate your account.",buttonSecondary:"Resend email",buttonPrimary:"Close",accountConfirmMessage:"Account confirmed",accountConfirmationEmailSuccessMessage:"Congratulations! Your account at {email} email has been successfully confirmed."},Notification:{errorNotification:"Your password update failed due to validation errors. Please check your information and try again.",updatePasswordMessage:"The password has been updated.",updatePasswordActionMessage:"Sign in",successPasswordResetEmailNotification:"If there is an account associated with {email} you will receive an email with a link to reset your password.",resendEmailNotification:{informationText:"This account is not confirmed.",buttonText:"Resend confirmation email"},emailConfirmationMessage:"Please check your email for confirmation link.",technicalErrors:{technicalErrorSendEmail:"A technical error occurred while trying to send the email. Please try again later."}},SuccessNotification:{headingText:"Welcome!",messageText:"We are glad to see you!",primaryButtonText:"Continue shopping",secondaryButtonText:"Logout"},Api:{customerTokenErrorMessage:"Unable to log in. Please try again later or contact support if the issue persists."},InputPassword:{placeholder:"Password",floatingLabel:"Password *"}},b={Auth:w},y={default:b},P=({children:n})=>{var r,t;const[e,i]=u("en_US"),c=(t=(r=g)==null?void 0:r.getConfig())==null?void 0:t.langDefinitions;f(()=>{const a=p.on("locale",o=>{o!==e&&i(o)},{eager:!0});return()=>{a==null||a.off()}},[e]);const l=d(y,c??{});return s(h,{lang:e,langDefinitions:l,children:n})},k=new m(s(P,{}));export{k as render}; diff --git a/scripts/__dropins__/storefront-auth/render/index.d.ts b/scripts/__dropins__/storefront-auth/render/index.d.ts index b758d268a3..bb8c6e6977 100644 --- a/scripts/__dropins__/storefront-auth/render/index.d.ts +++ b/scripts/__dropins__/storefront-auth/render/index.d.ts @@ -1,2 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './render'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/types/api/confirmEmail.types.d.ts b/scripts/__dropins__/storefront-auth/types/api/confirmEmail.types.d.ts index b5368a0f98..afc2f487f8 100644 --- a/scripts/__dropins__/storefront-auth/types/api/confirmEmail.types.d.ts +++ b/scripts/__dropins__/storefront-auth/types/api/confirmEmail.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface confirmEmailResponse { data: { confirmEmail: { diff --git a/scripts/__dropins__/storefront-auth/types/api/createCustomer.types.d.ts b/scripts/__dropins__/storefront-auth/types/api/createCustomer.types.d.ts index 975c4122b3..546c51c62c 100644 --- a/scripts/__dropins__/storefront-auth/types/api/createCustomer.types.d.ts +++ b/scripts/__dropins__/storefront-auth/types/api/createCustomer.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ type customAttributesProps = { custom_attributes: Record[]; }; diff --git a/scripts/__dropins__/storefront-auth/types/api/createCustomerAddress.types.d.ts b/scripts/__dropins__/storefront-auth/types/api/createCustomerAddress.types.d.ts index 2deb723024..0b3749a49c 100644 --- a/scripts/__dropins__/storefront-auth/types/api/createCustomerAddress.types.d.ts +++ b/scripts/__dropins__/storefront-auth/types/api/createCustomerAddress.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface CreateCustomerAddressResponse { data: { createCustomerAddress: { diff --git a/scripts/__dropins__/storefront-auth/types/api/getAttributesForm.types.d.ts b/scripts/__dropins__/storefront-auth/types/api/getAttributesForm.types.d.ts index 5d973409a6..b95291c5b5 100644 --- a/scripts/__dropins__/storefront-auth/types/api/getAttributesForm.types.d.ts +++ b/scripts/__dropins__/storefront-auth/types/api/getAttributesForm.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface ResponseAttributesFormItemsProps { code: string; sort_order: string; diff --git a/scripts/__dropins__/storefront-auth/types/api/getCustomerData.types.d.ts b/scripts/__dropins__/storefront-auth/types/api/getCustomerData.types.d.ts index 25122c40b1..159eeae6d3 100644 --- a/scripts/__dropins__/storefront-auth/types/api/getCustomerData.types.d.ts +++ b/scripts/__dropins__/storefront-auth/types/api/getCustomerData.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface getCustomerDataResponse { data: { customer: { diff --git a/scripts/__dropins__/storefront-auth/types/api/getCustomerToken.types.d.ts b/scripts/__dropins__/storefront-auth/types/api/getCustomerToken.types.d.ts index c475ad8ad0..eed8ac6239 100644 --- a/scripts/__dropins__/storefront-auth/types/api/getCustomerToken.types.d.ts +++ b/scripts/__dropins__/storefront-auth/types/api/getCustomerToken.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface getCustomerTokenResponse { data: { generateCustomerToken: { diff --git a/scripts/__dropins__/storefront-auth/types/api/passwordResetEmail.types.d.ts b/scripts/__dropins__/storefront-auth/types/api/passwordResetEmail.types.d.ts index 02c11b7b04..5ae2881ed8 100644 --- a/scripts/__dropins__/storefront-auth/types/api/passwordResetEmail.types.d.ts +++ b/scripts/__dropins__/storefront-auth/types/api/passwordResetEmail.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface PasswordResetEmailResponse { data?: { requestPasswordResetEmail: boolean; diff --git a/scripts/__dropins__/storefront-auth/types/api/resendConfirmationEmail.types.d.ts b/scripts/__dropins__/storefront-auth/types/api/resendConfirmationEmail.types.d.ts index 04b9b93399..de1a407f68 100644 --- a/scripts/__dropins__/storefront-auth/types/api/resendConfirmationEmail.types.d.ts +++ b/scripts/__dropins__/storefront-auth/types/api/resendConfirmationEmail.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface resendConfirmationEmailResponse { data: { resendConfirmationEmail: boolean; diff --git a/scripts/__dropins__/storefront-auth/types/api/resetPassword.types.d.ts b/scripts/__dropins__/storefront-auth/types/api/resetPassword.types.d.ts index 9fefe3cf7e..78b79e3ae8 100644 --- a/scripts/__dropins__/storefront-auth/types/api/resetPassword.types.d.ts +++ b/scripts/__dropins__/storefront-auth/types/api/resetPassword.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface ResetPasswordResponse { data?: { resetPassword: boolean; diff --git a/scripts/__dropins__/storefront-auth/types/api/revokeCustomerToken.types.d.ts b/scripts/__dropins__/storefront-auth/types/api/revokeCustomerToken.types.d.ts index 62d0ba71ee..a523c711a8 100644 --- a/scripts/__dropins__/storefront-auth/types/api/revokeCustomerToken.types.d.ts +++ b/scripts/__dropins__/storefront-auth/types/api/revokeCustomerToken.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface RevokeCustomerTokenResponse { data?: { revokeCustomerToken: boolean; diff --git a/scripts/__dropins__/storefront-auth/types/api/storeConfig.types.d.ts b/scripts/__dropins__/storefront-auth/types/api/storeConfig.types.d.ts index fa06e9e671..8b329ee73b 100644 --- a/scripts/__dropins__/storefront-auth/types/api/storeConfig.types.d.ts +++ b/scripts/__dropins__/storefront-auth/types/api/storeConfig.types.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface storeConfigProps { autocomplete_on_storefront: boolean; minimum_password_length: number; diff --git a/scripts/__dropins__/storefront-auth/types/form.types.d.ts b/scripts/__dropins__/storefront-auth/types/form.types.d.ts index 25f8646630..1130f75801 100644 --- a/scripts/__dropins__/storefront-auth/types/form.types.d.ts +++ b/scripts/__dropins__/storefront-auth/types/form.types.d.ts @@ -1,6 +1,11 @@ +import { SlotProps } from '@dropins/tools/types/elsie/src/lib'; import { AttributesFormItemsProps, FieldEnumList } from '../data/models'; +import { ComponentChildren } from 'preact'; export interface FormProps { + slots?: { + [key: string]: SlotProps; + }; fieldsConfig?: any; name?: string; className?: string; @@ -11,6 +16,9 @@ export interface FormProps { export interface useFormProps extends Omit { } export interface FormInputsProps { + slots?: { + [key: string]: SlotProps; + }; className?: string; errors?: Record; values?: Record; @@ -29,4 +37,34 @@ export interface FieldsProps extends Omit { text: string; }[]; } +export type FormElementProps = { + item: any; + valueMessage: string; + errorConfig: string; + className: string; + itemClassName: string; + loading?: boolean; + onBlur?: (e: any) => void; + onChange?: (e: any) => void; + onFocus?: (e: any) => void; +}; +export type FieldElementProps = { + item: any; + errorConfig: string; + className: string; + itemClassName: string; + loading?: boolean; + children: ComponentChildren; +}; +export type FormSlotProps = { + slots?: { + [key: string]: SlotProps; + }; + item: any; + handleOnChange?: (e: any) => void; + handleOnBlur?: (e: any) => void; + handleOnFocus?: (e: any) => void; + errorConfig: string; + errors: Record; +}; //# sourceMappingURL=form.types.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/types/index.d.ts b/scripts/__dropins__/storefront-auth/types/index.d.ts index 3f480e360a..90be84d767 100644 --- a/scripts/__dropins__/storefront-auth/types/index.d.ts +++ b/scripts/__dropins__/storefront-auth/types/index.d.ts @@ -1,3 +1,19 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * __________________ + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './form.types'; export * from './api/storeConfig.types'; export * from './api/createCustomer.types'; @@ -19,4 +35,5 @@ export * from './api/confirmEmail.types'; export * from './api/resendConfirmationEmail.types'; export * from './emailConfirmationForm.types'; export * from './api/createCustomerAddress.types'; +export * from './validationErrors.types'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-auth/types/validationErrors.types.d.ts b/scripts/__dropins__/storefront-auth/types/validationErrors.types.d.ts new file mode 100644 index 0000000000..e57917870b --- /dev/null +++ b/scripts/__dropins__/storefront-auth/types/validationErrors.types.d.ts @@ -0,0 +1,26 @@ +/** + * Error types in this enum are used to provide custom i18n translations for specific validation errors. + * Each key corresponds to an error type that maps to the `Auth.FormText` i18n values in `src/i18n/en_US.json`. + */ +export declare enum ValidationErrorTypes { + REQUIRED_FIELD_ERROR = "requiredFieldError", + NUMERIC_ERROR = "numericError", + ALPHA_NUM_WITH_SPACES_ERROR = "alphaNumWithSpacesError", + ALPHA_NUMERIC_ERROR = "alphaNumericError", + ALPHA_ERROR = "alphaError", + EMAIL_ERROR = "emailError", + DATE_ERROR = "dateError", + DATE_RANGE_ERROR = "dateRangeError", + DATE_MAX_ERROR = "dateMaxError", + DATE_MIN_ERROR = "dateMinError", + URL_ERROR = "urlError", + LENGTH_TEXT_ERROR = "lengthTextError" +} +/** + * `ERROR_CONFIG_SEPARATOR` uses the ASCII 31 (Unit Separator) character, + * a rarely used control character, to avoid conflicts with custom i18n error messages. + * + * Learn more: https://theasciicode.com.ar/ascii-control-characters/unit-separator-ascii-code-31.html + */ +export declare const ERROR_CONFIG_SEPARATOR: string; +//# sourceMappingURL=validationErrors.types.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api.js b/scripts/__dropins__/storefront-order/api.js index 2b73984f58..d166efed64 100644 --- a/scripts/__dropins__/storefront-order/api.js +++ b/scripts/__dropins__/storefront-order/api.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{c as j,r as z}from"./chunks/requestGuestOrderCancel.js";import{f as R,h as g}from"./chunks/fetch-graphql.js";import{g as K,r as W,s as Z,a as ee,b as re}from"./chunks/fetch-graphql.js";import{g as oe}from"./chunks/getAttributesForm.js";import{g as ne,a as se,r as ue}from"./chunks/requestGuestReturn.js";import{g as ie,a as le}from"./chunks/getGuestOrder.js";import{g as de}from"./chunks/getCustomerOrdersReturn.js";import{a as A}from"./chunks/initialize.js";import{d as Te,g as me,c as _e,i as Re}from"./chunks/initialize.js";import{g as Ae}from"./chunks/getStoreConfig.js";import{h as D}from"./chunks/network-error.js";import{events as d}from"@dropins/tools/event-bus.js";import{PRODUCT_DETAILS_FRAGMENT as O,PRICE_DETAILS_FRAGMENT as h,GIFT_CARD_DETAILS_FRAGMENT as f,ORDER_ITEM_DETAILS_FRAGMENT as x,BUNDLE_ORDER_ITEM_DETAILS_FRAGMENT as C,ORDER_SUMMARY_FRAGMENT as b,ADDRESS_FRAGMENT as M}from"./fragments.js";import{a as Oe,c as he,r as fe}from"./chunks/confirmCancelOrder.js";import"@dropins/tools/fetch-graphql.js";import"./chunks/transform-attributes-form.js";import"@dropins/tools/lib.js";const m=(r,t)=>r+t.amount.value,G=(r,t)=>({id:r,totalQuantity:t.totalQuantity,possibleOnepageCheckout:!0,items:t.items.map(e=>{var o,a,n,s,u,c,i,l;return{canApplyMsrp:!0,formattedPrice:"",id:e.id,quantity:e.totalQuantity,product:{canonicalUrl:(o=e.product)==null?void 0:o.canonicalUrl,mainImageUrl:((a=e.product)==null?void 0:a.image)??"",name:((n=e.product)==null?void 0:n.name)??"",productId:0,productType:(s=e.product)==null?void 0:s.productType,sku:((u=e.product)==null?void 0:u.sku)??"",topLevelSku:(c=e.product)==null?void 0:c.sku},prices:{price:{value:e.price.value,currency:e.price.currency,regularPrice:((i=e.regularPrice)==null?void 0:i.value)??e.price.value}},configurableOptions:((l=e.selectedOptions)==null?void 0:l.map(p=>({optionLabel:p.label,valueLabel:p.value})))||[]}}),prices:{subtotalExcludingTax:{value:t.subtotalExclTax.value,currency:t.subtotalExclTax.currency},subtotalIncludingTax:{value:t.subtotalInclTax.value,currency:t.subtotalInclTax.currency}},discountAmount:t.discounts.reduce(m,0)}),I=r=>{var o,a,n;const t=r.coupons[0],e=(o=r.payments)==null?void 0:o[0];return{appliedCouponCode:(t==null?void 0:t.code)??"",email:r.email,grandTotal:r.grandTotal.value,orderId:r.number,orderType:"checkout",otherTax:0,salesTax:r.totalTax.value,shipping:{shippingMethod:((a=r.shipping)==null?void 0:a.code)??"",shippingAmount:((n=r.shipping)==null?void 0:n.amount)??0},subtotalExcludingTax:r.subtotalExclTax.value,subtotalIncludingTax:r.subtotalInclTax.value,payments:e?[{paymentMethodCode:(e==null?void 0:e.code)||"",paymentMethodName:(e==null?void 0:e.name)||"",total:r.grandTotal.value,orderId:r.number}]:[],discountAmount:r.discounts.reduce(m,0),taxAmount:r.totalTax.value}},N=r=>{var e,o;const t=(o=(e=r==null?void 0:r.data)==null?void 0:e.placeOrder)==null?void 0:o.orderV2;return t?A(t):null},E={SHOPPING_CART_CONTEXT:"shoppingCartContext",ORDER_CONTEXT:"orderContext"},v={PLACE_ORDER:"place-order"};function _(){return window.adobeDataLayer=window.adobeDataLayer||[],window.adobeDataLayer}function T(r,t){const e=_();e.push({[r]:null}),e.push({[r]:t})}function L(r){_().push(e=>{const o=e.getState?e.getState():{};e.push({event:r,eventInfo:{...o}})})}function y(r,t){const e=I(t),o=G(r,t);T(E.ORDER_CONTEXT,{...e}),T(E.SHOPPING_CART_CONTEXT,{...o}),L(v.PLACE_ORDER)}class S extends Error{constructor(t){super(t),this.name="PlaceOrderError"}}const F=r=>{const t=r.map(e=>e.message).join(" ");throw new S(t)},P=` mutation PLACE_ORDER_MUTATION($cartId: String!) { diff --git a/scripts/__dropins__/storefront-order/api/cancelOrder/graphql/cancelOrderMutation.d.ts b/scripts/__dropins__/storefront-order/api/cancelOrder/graphql/cancelOrderMutation.d.ts index d6b19727f3..821182bb40 100644 --- a/scripts/__dropins__/storefront-order/api/cancelOrder/graphql/cancelOrderMutation.d.ts +++ b/scripts/__dropins__/storefront-order/api/cancelOrder/graphql/cancelOrderMutation.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const CANCEL_ORDER_MUTATION: string; //# sourceMappingURL=cancelOrderMutation.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/confirmCancelOrder/confirmCancelOrder.d.ts b/scripts/__dropins__/storefront-order/api/confirmCancelOrder/confirmCancelOrder.d.ts index d9e243dd3c..0228b612dd 100644 --- a/scripts/__dropins__/storefront-order/api/confirmCancelOrder/confirmCancelOrder.d.ts +++ b/scripts/__dropins__/storefront-order/api/confirmCancelOrder/confirmCancelOrder.d.ts @@ -1,16 +1,4 @@ -/******************************************************************** - * - * Copyright 2024 Adobe - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret and copyright laws. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Adobe. - *******************************************************************/ -export declare const confirmCancelOrder: (orderId: string, confirmationKey: string) => Promise; +import { OrderDataModel } from '../../data/models'; + +export declare const confirmCancelOrder: (orderId: string, confirmationKey: string) => Promise; //# sourceMappingURL=confirmCancelOrder.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/confirmGuestReturn/confirmGuestReturn.d.ts b/scripts/__dropins__/storefront-order/api/confirmGuestReturn/confirmGuestReturn.d.ts index 2711506a10..7a02106015 100644 --- a/scripts/__dropins__/storefront-order/api/confirmGuestReturn/confirmGuestReturn.d.ts +++ b/scripts/__dropins__/storefront-order/api/confirmGuestReturn/confirmGuestReturn.d.ts @@ -1,2 +1,4 @@ -export declare const confirmGuestReturn: (orderId: string, confirmationKey: string) => Promise; +import { OrderDataModel } from '../../data/models'; + +export declare const confirmGuestReturn: (orderId: string, confirmationKey: string) => Promise; //# sourceMappingURL=confirmGuestReturn.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/confirmGuestReturn/graphql/confirmGuestReturn.graphql.d.ts b/scripts/__dropins__/storefront-order/api/confirmGuestReturn/graphql/confirmGuestReturn.graphql.d.ts index 95af93e910..436f45d49d 100644 --- a/scripts/__dropins__/storefront-order/api/confirmGuestReturn/graphql/confirmGuestReturn.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/confirmGuestReturn/graphql/confirmGuestReturn.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const CONFIRM_RETURN_GUEST_ORDER: string; //# sourceMappingURL=confirmGuestReturn.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/confirmGuestReturn/index.d.ts b/scripts/__dropins__/storefront-order/api/confirmGuestReturn/index.d.ts index 03db300d09..697a26881c 100644 --- a/scripts/__dropins__/storefront-order/api/confirmGuestReturn/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/confirmGuestReturn/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './confirmGuestReturn'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/fetch-graphql/fetch-graphql.d.ts b/scripts/__dropins__/storefront-order/api/fetch-graphql/fetch-graphql.d.ts index c1cc3ef7c6..b7460ae089 100644 --- a/scripts/__dropins__/storefront-order/api/fetch-graphql/fetch-graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/fetch-graphql/fetch-graphql.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const setEndpoint: (endpoint: string) => void, setFetchGraphQlHeader: (key: string, value: string | null) => void, removeFetchGraphQlHeader: (key: string) => void, setFetchGraphQlHeaders: (header: import('@adobe/fetch-graphql').Header) => void, fetchGraphQl: (query: string, options?: import('@adobe/fetch-graphql').FetchOptions | undefined) => Promise<{ errors?: import('@adobe/fetch-graphql').FetchQueryError | undefined; data: T; diff --git a/scripts/__dropins__/storefront-order/api/fetch-graphql/index.d.ts b/scripts/__dropins__/storefront-order/api/fetch-graphql/index.d.ts index ea5ac123d4..d7de36c37d 100644 --- a/scripts/__dropins__/storefront-order/api/fetch-graphql/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/fetch-graphql/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './fetch-graphql'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/fragments.d.ts b/scripts/__dropins__/storefront-order/api/fragments.d.ts index 3901508e5b..b6db02a890 100644 --- a/scripts/__dropins__/storefront-order/api/fragments.d.ts +++ b/scripts/__dropins__/storefront-order/api/fragments.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export { REQUEST_RETURN_ORDER_FRAGMENT } from './graphql/RequestReturnOrderFragment.graphql'; export { ADDRESS_FRAGMENT } from './graphql/CustomerAddressFragment.graphql'; export { PRODUCT_DETAILS_FRAGMENT, PRICE_DETAILS_FRAGMENT, GIFT_CARD_DETAILS_FRAGMENT, ORDER_ITEM_DETAILS_FRAGMENT, BUNDLE_ORDER_ITEM_DETAILS_FRAGMENT, } from './graphql/OrderItemsFragment.graphql'; diff --git a/scripts/__dropins__/storefront-order/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts b/scripts/__dropins__/storefront-order/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts index de5037a870..a7a73fce4a 100644 --- a/scripts/__dropins__/storefront-order/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_ATTRIBUTES_FORM = "\n query GET_ATTRIBUTES_FORM($formCode: String!) {\n attributesForm(formCode: $formCode) {\n items {\n code\n default_value\n entity_type\n frontend_class\n frontend_input\n is_required\n is_unique\n label\n options {\n is_default\n label\n value\n }\n ... on CustomerAttributeMetadata {\n multiline_count\n sort_order\n validate_rules {\n name\n value\n }\n }\n }\n errors {\n type\n message\n }\n }\n }\n"; export declare const GET_ATTRIBUTES_FORM_SHORT = "\n query GET_ATTRIBUTES_FORM_SHORT {\n attributesForm(formCode: \"customer_register_address\") {\n items {\n frontend_input\n label\n code\n ... on CustomerAttributeMetadata {\n multiline_count\n sort_order\n }\n }\n }\n }\n"; //# sourceMappingURL=getAttributesForm.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getAttributesForm/index.d.ts b/scripts/__dropins__/storefront-order/api/getAttributesForm/index.d.ts index 8eefd8da6b..1ef750dc9a 100644 --- a/scripts/__dropins__/storefront-order/api/getAttributesForm/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/getAttributesForm/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getAttributesForm'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getAttributesList/graphql/getAttributesList.graphql.d.ts b/scripts/__dropins__/storefront-order/api/getAttributesList/graphql/getAttributesList.graphql.d.ts index cc05caa302..f46e77c9f1 100644 --- a/scripts/__dropins__/storefront-order/api/getAttributesList/graphql/getAttributesList.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/getAttributesList/graphql/getAttributesList.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_ATTRIBUTES_LIST = "\n query GET_ATTRIBUTES_LIST($entityType: AttributeEntityTypeEnum!) {\n attributesList(entityType: $entityType) {\n items {\n ... on CustomerAttributeMetadata {\n multiline_count\n sort_order\n validate_rules {\n name\n value\n }\n }\n ... on ReturnItemAttributeMetadata {\n sort_order\n }\n code\n label\n default_value\n frontend_input\n is_unique\n is_required\n options {\n is_default\n label\n value\n }\n }\n errors {\n type\n message\n }\n }\n }\n"; //# sourceMappingURL=getAttributesList.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getAttributesList/index.d.ts b/scripts/__dropins__/storefront-order/api/getAttributesList/index.d.ts index c226df6d13..9b67ab44df 100644 --- a/scripts/__dropins__/storefront-order/api/getAttributesList/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/getAttributesList/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getAttributesList'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getCustomer/graphql/getCustomer.graphql.d.ts b/scripts/__dropins__/storefront-order/api/getCustomer/graphql/getCustomer.graphql.d.ts index c7eb0fa664..2d5c4c85cd 100644 --- a/scripts/__dropins__/storefront-order/api/getCustomer/graphql/getCustomer.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/getCustomer/graphql/getCustomer.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_CUSTOMER = "\n query GET_CUSTOMER {\n customer {\n firstname\n lastname\n email\n }\n }\n"; //# sourceMappingURL=getCustomer.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getCustomer/index.d.ts b/scripts/__dropins__/storefront-order/api/getCustomer/index.d.ts index 125c344455..f07cd41b30 100644 --- a/scripts/__dropins__/storefront-order/api/getCustomer/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/getCustomer/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getCustomer'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getCustomerOrdersReturn/graphql/getCustomerOrdersReturn.graphql.d.ts b/scripts/__dropins__/storefront-order/api/getCustomerOrdersReturn/graphql/getCustomerOrdersReturn.graphql.d.ts index a46527f5fe..5b28cb0aa5 100644 --- a/scripts/__dropins__/storefront-order/api/getCustomerOrdersReturn/graphql/getCustomerOrdersReturn.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/getCustomerOrdersReturn/graphql/getCustomerOrdersReturn.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_CUSTOMER_ORDERS_RETURN: string; //# sourceMappingURL=getCustomerOrdersReturn.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getCustomerOrdersReturn/index.d.ts b/scripts/__dropins__/storefront-order/api/getCustomerOrdersReturn/index.d.ts index d6a7f2ee55..4d7f9a3305 100644 --- a/scripts/__dropins__/storefront-order/api/getCustomerOrdersReturn/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/getCustomerOrdersReturn/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getCustomerOrdersReturn'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getGuestOrder/graphql/getGuestOrder.graphql.d.ts b/scripts/__dropins__/storefront-order/api/getGuestOrder/graphql/getGuestOrder.graphql.d.ts index 0970dc5aff..d03b3bcd11 100644 --- a/scripts/__dropins__/storefront-order/api/getGuestOrder/graphql/getGuestOrder.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/getGuestOrder/graphql/getGuestOrder.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GET_GUEST_ORDER: string; //# sourceMappingURL=getGuestOrder.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getGuestOrder/graphql/index.d.ts b/scripts/__dropins__/storefront-order/api/getGuestOrder/graphql/index.d.ts index 6b3fe62e0d..b6910bc4c7 100644 --- a/scripts/__dropins__/storefront-order/api/getGuestOrder/graphql/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/getGuestOrder/graphql/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getGuestOrder.graphql'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getGuestOrder/index.d.ts b/scripts/__dropins__/storefront-order/api/getGuestOrder/index.d.ts index 76881e3322..3b00a1ca68 100644 --- a/scripts/__dropins__/storefront-order/api/getGuestOrder/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/getGuestOrder/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getGuestOrder'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getOrderDetailsById/graphql/orderByNumber.graphql.d.ts b/scripts/__dropins__/storefront-order/api/getOrderDetailsById/graphql/orderByNumber.graphql.d.ts index 6717e64099..7af3f632a0 100644 --- a/scripts/__dropins__/storefront-order/api/getOrderDetailsById/graphql/orderByNumber.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/getOrderDetailsById/graphql/orderByNumber.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const ORDER_BY_NUMBER: string; //# sourceMappingURL=orderByNumber.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getOrderDetailsById/index.d.ts b/scripts/__dropins__/storefront-order/api/getOrderDetailsById/index.d.ts index 2bf647ae7f..03f27ea426 100644 --- a/scripts/__dropins__/storefront-order/api/getOrderDetailsById/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/getOrderDetailsById/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getOrderDetailsById'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getStoreConfig/graphql/StoreConfigQuery.d.ts b/scripts/__dropins__/storefront-order/api/getStoreConfig/graphql/StoreConfigQuery.d.ts index 4ffb839df6..0fc47013ac 100644 --- a/scripts/__dropins__/storefront-order/api/getStoreConfig/graphql/StoreConfigQuery.d.ts +++ b/scripts/__dropins__/storefront-order/api/getStoreConfig/graphql/StoreConfigQuery.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const STORE_CONFIG_QUERY = "\n query STORE_CONFIG_QUERY {\n storeConfig {\n order_cancellation_enabled\n order_cancellation_reasons {\n description\n }\n base_media_url\n orders_invoices_credit_memos_display_price\n orders_invoices_credit_memos_display_shipping_amount\n orders_invoices_credit_memos_display_subtotal\n orders_invoices_credit_memos_display_grandtotal\n orders_invoices_credit_memos_display_full_summary\n orders_invoices_credit_memos_display_zero_tax\n }\n }\n"; //# sourceMappingURL=StoreConfigQuery.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/getStoreConfig/index.d.ts b/scripts/__dropins__/storefront-order/api/getStoreConfig/index.d.ts index 572f234893..78a11dd5c0 100644 --- a/scripts/__dropins__/storefront-order/api/getStoreConfig/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/getStoreConfig/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './getStoreConfig'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/graphql/CustomerAddressFragment.graphql.d.ts b/scripts/__dropins__/storefront-order/api/graphql/CustomerAddressFragment.graphql.d.ts index 33dd3d63a5..1f79dc512e 100644 --- a/scripts/__dropins__/storefront-order/api/graphql/CustomerAddressFragment.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/graphql/CustomerAddressFragment.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const ADDRESS_FRAGMENT = "\n fragment ADDRESS_FRAGMENT on OrderAddress {\n city\n company\n country_code\n fax\n firstname\n lastname\n middlename\n postcode\n prefix\n region\n region_id\n street\n suffix\n telephone\n vat_id\n }\n"; //# sourceMappingURL=CustomerAddressFragment.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/graphql/GurestOrderFragment.graphql.d.ts b/scripts/__dropins__/storefront-order/api/graphql/GurestOrderFragment.graphql.d.ts index 6e9b547df1..2d36c9f39f 100644 --- a/scripts/__dropins__/storefront-order/api/graphql/GurestOrderFragment.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/graphql/GurestOrderFragment.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const GUEST_ORDER_FRAGMENT: string; //# sourceMappingURL=GurestOrderFragment.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/graphql/OrderItemsFragment.graphql.d.ts b/scripts/__dropins__/storefront-order/api/graphql/OrderItemsFragment.graphql.d.ts index 46518c21b1..032c0a4cf8 100644 --- a/scripts/__dropins__/storefront-order/api/graphql/OrderItemsFragment.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/graphql/OrderItemsFragment.graphql.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const PRODUCT_DETAILS_FRAGMENT = "\n fragment PRODUCT_DETAILS_FRAGMENT on ProductInterface {\n __typename\n canonical_url\n url_key\n uid\n name\n sku\n only_x_left_in_stock\n stock_status\n thumbnail {\n label\n url\n }\n price_range {\n maximum_price {\n regular_price {\n currency\n value\n }\n }\n }\n }\n"; export declare const PRICE_DETAILS_FRAGMENT = "\n fragment PRICE_DETAILS_FRAGMENT on OrderItemInterface {\n prices {\n price_including_tax {\n value\n currency\n }\n original_price {\n value\n currency\n }\n original_price_including_tax {\n value\n currency\n }\n price {\n value\n currency\n }\n }\n }\n"; export declare const GIFT_CARD_DETAILS_FRAGMENT = "\n fragment GIFT_CARD_DETAILS_FRAGMENT on GiftCardOrderItem {\n ...PRICE_DETAILS_FRAGMENT\n gift_message {\n message\n }\n gift_card {\n recipient_name\n recipient_email\n sender_name\n sender_email\n message\n }\n }\n"; diff --git a/scripts/__dropins__/storefront-order/api/graphql/OrderSummaryFragment.graphql.d.ts b/scripts/__dropins__/storefront-order/api/graphql/OrderSummaryFragment.graphql.d.ts index 716d4ebe38..b7650ed67b 100644 --- a/scripts/__dropins__/storefront-order/api/graphql/OrderSummaryFragment.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/graphql/OrderSummaryFragment.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const ORDER_SUMMARY_FRAGMENT = "\n fragment ORDER_SUMMARY_FRAGMENT on OrderTotal {\n grand_total {\n value\n currency\n }\n total_giftcard {\n currency\n value\n }\n subtotal_excl_tax {\n currency\n value\n }\n subtotal_incl_tax {\n currency\n value\n }\n taxes {\n amount {\n currency\n value\n }\n rate\n title\n }\n total_tax {\n currency\n value\n }\n total_shipping {\n currency\n value\n }\n discounts {\n amount {\n currency\n value\n }\n label\n }\n }\n"; //# sourceMappingURL=OrderSummaryFragment.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/graphql/RequestReturnOrderFragment.graphql.d.ts b/scripts/__dropins__/storefront-order/api/graphql/RequestReturnOrderFragment.graphql.d.ts index 3266d431f6..24313bc1e2 100644 --- a/scripts/__dropins__/storefront-order/api/graphql/RequestReturnOrderFragment.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/graphql/RequestReturnOrderFragment.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const REQUEST_RETURN_ORDER_FRAGMENT = "\n fragment REQUEST_RETURN_ORDER_FRAGMENT on Return {\n __typename\n uid\n status\n number\n created_at\n }\n"; //# sourceMappingURL=RequestReturnOrderFragment.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/graphql/ReturnsFragment.graphql.d.ts b/scripts/__dropins__/storefront-order/api/graphql/ReturnsFragment.graphql.d.ts index 02bf061131..52ff90080d 100644 --- a/scripts/__dropins__/storefront-order/api/graphql/ReturnsFragment.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/graphql/ReturnsFragment.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const RETURNS_FRAGMENT = "\n fragment RETURNS_FRAGMENT on Returns {\n __typename\n items {\n number\n status\n created_at\n shipping {\n tracking {\n status {\n text\n type\n }\n carrier {\n uid\n label\n }\n tracking_number\n }\n }\n order {\n number\n token\n }\n items {\n uid\n quantity\n status\n request_quantity\n order_item {\n ...ORDER_ITEM_DETAILS_FRAGMENT\n ... on GiftCardOrderItem {\n ...GIFT_CARD_DETAILS_FRAGMENT\n product {\n ...PRODUCT_DETAILS_FRAGMENT\n }\n }\n }\n }\n }\n }\n"; //# sourceMappingURL=ReturnsFragment.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/guestOrderByToken/graphql/guestOrderByToken.graphql.d.ts b/scripts/__dropins__/storefront-order/api/guestOrderByToken/graphql/guestOrderByToken.graphql.d.ts index e137bb29ed..67a906662b 100644 --- a/scripts/__dropins__/storefront-order/api/guestOrderByToken/graphql/guestOrderByToken.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/guestOrderByToken/graphql/guestOrderByToken.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const ORDER_BY_TOKEN: string; //# sourceMappingURL=guestOrderByToken.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/guestOrderByToken/index.d.ts b/scripts/__dropins__/storefront-order/api/guestOrderByToken/index.d.ts index 332fea0b85..cb32cb26c2 100644 --- a/scripts/__dropins__/storefront-order/api/guestOrderByToken/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/guestOrderByToken/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './guestOrderByToken'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/helpers/initializeOrderDetails.d.ts b/scripts/__dropins__/storefront-order/api/helpers/initializeOrderDetails.d.ts index 46bd510494..332b8b3fab 100644 --- a/scripts/__dropins__/storefront-order/api/helpers/initializeOrderDetails.d.ts +++ b/scripts/__dropins__/storefront-order/api/helpers/initializeOrderDetails.d.ts @@ -1,4 +1,4 @@ -import { OrderDataModel } from '../../data/models'; +import { ConfigProps } from '../initialize'; -export declare const initializeOrderDetails: (config: Record | undefined) => Promise; +export declare const initializeOrderDetails: (config: ConfigProps) => Promise; //# sourceMappingURL=initializeOrderDetails.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/index.d.ts b/scripts/__dropins__/storefront-order/api/index.d.ts index 3a572a4507..95e09cb9a8 100644 --- a/scripts/__dropins__/storefront-order/api/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './cancelOrder'; export * from './fetch-graphql'; export * from './getAttributesForm'; diff --git a/scripts/__dropins__/storefront-order/api/initialize/index.d.ts b/scripts/__dropins__/storefront-order/api/initialize/index.d.ts index 66c241dc2d..e68130e499 100644 --- a/scripts/__dropins__/storefront-order/api/initialize/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/initialize/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './initialize'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/initialize/initialize.d.ts b/scripts/__dropins__/storefront-order/api/initialize/initialize.d.ts index c5ac724da0..79486207c5 100644 --- a/scripts/__dropins__/storefront-order/api/initialize/initialize.d.ts +++ b/scripts/__dropins__/storefront-order/api/initialize/initialize.d.ts @@ -2,15 +2,17 @@ import { Initializer, Model } from '@dropins/tools/types/elsie/src/lib'; import { Lang } from '@dropins/tools/types/elsie/src/i18n'; import { CustomerOrdersReturnModel, OrderDataModel, RequestReturnModel } from '../../data/models'; -type ConfigProps = { +export type ConfigProps = { langDefinitions?: Lang; models?: { OrderDataModel?: Model; CustomerOrdersReturnModel?: Model; RequestReturnModel?: Model; }; + orderRef?: string; + returnRef?: string; + orderData?: OrderDataModel | null; }; export declare const initialize: Initializer; export declare const config: import('@dropins/tools/types/elsie/src/lib').Config; -export {}; //# sourceMappingURL=initialize.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/placeOrder/graphql/placeOrderMutation.d.ts b/scripts/__dropins__/storefront-order/api/placeOrder/graphql/placeOrderMutation.d.ts index b4b1eddb62..37eb5f8e41 100644 --- a/scripts/__dropins__/storefront-order/api/placeOrder/graphql/placeOrderMutation.d.ts +++ b/scripts/__dropins__/storefront-order/api/placeOrder/graphql/placeOrderMutation.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const PLACE_ORDER_MUTATION: string; //# sourceMappingURL=placeOrderMutation.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/placeOrder/index.d.ts b/scripts/__dropins__/storefront-order/api/placeOrder/index.d.ts index 65c2281404..16c973907b 100644 --- a/scripts/__dropins__/storefront-order/api/placeOrder/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/placeOrder/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './placeOrder'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/reorderItems/graphql/reorderItems.graphql.d.ts b/scripts/__dropins__/storefront-order/api/reorderItems/graphql/reorderItems.graphql.d.ts index b99af32348..5070204d30 100644 --- a/scripts/__dropins__/storefront-order/api/reorderItems/graphql/reorderItems.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/reorderItems/graphql/reorderItems.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const REORDER_ITEMS_MUTATION = "\n mutation REORDER_ITEMS_MUTATION($orderNumber: String!) {\n reorderItems(orderNumber: $orderNumber) {\n cart {\n itemsV2 {\n items {\n uid\n }\n }\n }\n userInputErrors {\n code\n message\n path\n }\n }\n }\n"; //# sourceMappingURL=reorderItems.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/reorderItems/index.d.ts b/scripts/__dropins__/storefront-order/api/reorderItems/index.d.ts index 7b7db498bd..71140b701d 100644 --- a/scripts/__dropins__/storefront-order/api/reorderItems/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/reorderItems/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './reorderItems'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/requestGuestOrderCancel/graphql/requestGuestOrderCancelMutation.d.ts b/scripts/__dropins__/storefront-order/api/requestGuestOrderCancel/graphql/requestGuestOrderCancelMutation.d.ts index 974b2ce4b8..9c761a6e32 100644 --- a/scripts/__dropins__/storefront-order/api/requestGuestOrderCancel/graphql/requestGuestOrderCancelMutation.d.ts +++ b/scripts/__dropins__/storefront-order/api/requestGuestOrderCancel/graphql/requestGuestOrderCancelMutation.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const REQUEST_GUEST_ORDER_CANCEL_MUTATION: string; //# sourceMappingURL=requestGuestOrderCancelMutation.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/requestGuestOrderCancel/index.d.ts b/scripts/__dropins__/storefront-order/api/requestGuestOrderCancel/index.d.ts index 16cc78d955..0880736f84 100644 --- a/scripts/__dropins__/storefront-order/api/requestGuestOrderCancel/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/requestGuestOrderCancel/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './requestGuestOrderCancel'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/requestGuestOrderCancel/requestGuestOrderCancel.d.ts b/scripts/__dropins__/storefront-order/api/requestGuestOrderCancel/requestGuestOrderCancel.d.ts index a26d9cba59..ca6cff4a82 100644 --- a/scripts/__dropins__/storefront-order/api/requestGuestOrderCancel/requestGuestOrderCancel.d.ts +++ b/scripts/__dropins__/storefront-order/api/requestGuestOrderCancel/requestGuestOrderCancel.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const requestGuestOrderCancel: (token: string, reason: string, onSuccess: Function, onError: Function) => Promise; //# sourceMappingURL=requestGuestOrderCancel.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/requestGuestReturn/graphql/requestGuestReturn.graphql.d.ts b/scripts/__dropins__/storefront-order/api/requestGuestReturn/graphql/requestGuestReturn.graphql.d.ts index b9a8c0f202..91e7aa52cc 100644 --- a/scripts/__dropins__/storefront-order/api/requestGuestReturn/graphql/requestGuestReturn.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/requestGuestReturn/graphql/requestGuestReturn.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const REQUEST_RETURN_GUEST_ORDER: string; //# sourceMappingURL=requestGuestReturn.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/requestGuestReturn/index.d.ts b/scripts/__dropins__/storefront-order/api/requestGuestReturn/index.d.ts index bcca4ec752..7ee3a18959 100644 --- a/scripts/__dropins__/storefront-order/api/requestGuestReturn/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/requestGuestReturn/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './requestGuestReturn'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/requestReturn/graphql/requestReturn.graphql.d.ts b/scripts/__dropins__/storefront-order/api/requestReturn/graphql/requestReturn.graphql.d.ts index 2053c33748..a7e99a3149 100644 --- a/scripts/__dropins__/storefront-order/api/requestReturn/graphql/requestReturn.graphql.d.ts +++ b/scripts/__dropins__/storefront-order/api/requestReturn/graphql/requestReturn.graphql.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const REQUEST_RETURN_ORDER: string; //# sourceMappingURL=requestReturn.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/api/requestReturn/index.d.ts b/scripts/__dropins__/storefront-order/api/requestReturn/index.d.ts index 46e713fe3f..ce02c31895 100644 --- a/scripts/__dropins__/storefront-order/api/requestReturn/index.d.ts +++ b/scripts/__dropins__/storefront-order/api/requestReturn/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './requestReturn'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/chunks/CartSummaryItem.js b/scripts/__dropins__/storefront-order/chunks/CartSummaryItem.js index 97f5fb2f5a..d3dd6df9ab 100644 --- a/scripts/__dropins__/storefront-order/chunks/CartSummaryItem.js +++ b/scripts/__dropins__/storefront-order/chunks/CartSummaryItem.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as v,jsxs as S,Fragment as _}from"@dropins/tools/preact-jsx-runtime.js";import{Price as P,Image as T,CartItem as g,Icon as u,Incrementer as o}from"@dropins/tools/components.js";import{useCallback as G}from"@dropins/tools/preact-hooks.js";import{classes as J}from"@dropins/tools/lib.js";import{O as r}from"./OrderLoaders.js";import*as M from"@dropins/tools/preact-compat.js";const c=k=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...k},M.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"}),M.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"})),se=({placeholderImage:k="",loading:X,product:e,itemType:Y,taxConfig:D,translations:h,disabledIncrementer:i,onQuantity:E,showConfigurableOptions:V,routeProductDetails:w})=>{var q,x,O,W,$,z,B,F,K,R,U;const{taxExcluded:f,taxIncluded:L}=D,t=G((m,H,b)=>v(P,{amount:m,currency:H,weight:"normal",...b}),[]),Z=G(m=>{var b,A;const H=(b=m==null?void 0:m.product)!=null&&b.thumbnail.url.length?(A=m==null?void 0:m.product)==null?void 0:A.thumbnail.url:k;return v(T,{src:H,alt:m==null?void 0:m.productName,loading:"lazy",width:"90",height:"120"})},[k]);if(!e)return v(r,{});let N={};const Q=Y==="cancelled",C=(x=(q=e==null?void 0:e.product)==null?void 0:q.stockStatus)==null?void 0:x.includes("IN_STOCK"),l=e==null?void 0:e.giftCard,a=(O=e==null?void 0:e.itemPrices)==null?void 0:O.priceIncludingTax,s=(W=e==null?void 0:e.itemPrices)==null?void 0:W.originalPrice,n=($=e==null?void 0:e.itemPrices)==null?void 0:$.price,I=e.totalQuantity>1?{quantity:e.totalQuantity}:{},y=e.discounted&&((z=e.price)==null?void 0:z.value)!==(s==null?void 0:s.value)*(e==null?void 0:e.totalQuantity),j={...(e==null?void 0:e.configurableOptions)||{},...(e==null?void 0:e.bundleOptions)||{},...l!=null&&l.senderName?{[h.sender]:l==null?void 0:l.senderName}:{},...l!=null&&l.senderEmail?{[h.sender]:l==null?void 0:l.senderEmail}:{},...l!=null&&l.senderName?{[h.sender]:l==null?void 0:l.senderName}:{},...l!=null&&l.recipientEmail?{[h.recipient]:l==null?void 0:l.recipientEmail}:{},...l!=null&&l.message?{[h.message]:l==null?void 0:l.message}:{},...e!=null&&e.downloadableLinks?{[`${(B=e==null?void 0:e.downloadableLinks)==null?void 0:B.count} ${h.downloadableCount}`]:(F=e==null?void 0:e.downloadableLinks)==null?void 0:F.result}:{}};if(L&&f){const m=y?s==null?void 0:s.value:(a==null?void 0:a.value)*(e==null?void 0:e.totalQuantity);N={taxExcluded:!0,taxIncluded:void 0,price:t(s==null?void 0:s.value,s==null?void 0:s.currency),total:S(_,{children:[t(m,s==null?void 0:s.currency,{variant:e.discounted&&(a==null?void 0:a.value)!==m?"strikethrough":"default"}),e.discounted&&(a==null?void 0:a.value)!==m?t(a==null?void 0:a.value,a==null?void 0:a.currency,{sale:!0,weight:"bold"}):null]}),totalExcludingTax:t((n==null?void 0:n.value)*e.totalQuantity,n==null?void 0:n.currency)}}else if(!L&&f)N={taxExcluded:void 0,taxIncluded:void 0,price:t(s==null?void 0:s.value,s==null?void 0:s.currency),total:S(_,{children:[t((s==null?void 0:s.value)*(e==null?void 0:e.totalQuantity),a==null?void 0:a.currency,{variant:y?"strikethrough":"default"}),y?t((K=e.price)==null?void 0:K.value,(R=e.price)==null?void 0:R.currency,{sale:!0,weight:"bold"}):null]}),totalExcludingTax:t((n==null?void 0:n.value)*(e==null?void 0:e.totalQuantity),n==null?void 0:n.currency)};else if(L&&!f){const m=y?s.value:a.value*e.totalQuantity;N={taxExcluded:void 0,taxIncluded:!0,price:t(a==null?void 0:a.value,a==null?void 0:a.currency),total:S(_,{children:[t(m,a==null?void 0:a.currency,{variant:y?"strikethrough":"default",weight:"bold"}),y?t(a==null?void 0:a.value,a==null?void 0:a.currency,{sale:!0,weight:"bold"}):null]})}}return v(g,{loading:X,alert:Q&&C?S("span",{children:[v(u,{source:c}),h.outOfStock]}):v(_,{}),configurations:(V==null?void 0:V(j))??j,title:w?v("a",{"data-testid":"product-name",className:J(["cart-summary-item__title",["cart-summary-item__title--strikethrough",Q]]),href:w(e),children:e==null?void 0:e.productName}):v("div",{"data-testid":"product-name",className:J(["cart-summary-item__title",["cart-summary-item__title--strikethrough",Q]]),children:e==null?void 0:e.productName}),sku:v("div",{children:(U=e==null?void 0:e.product)==null?void 0:U.sku}),...I,image:w?v("a",{href:w(e),children:Z(e)}):Z(e),...N,footer:E&&!i?v(o,{value:1,min:1,max:e==null?void 0:e.totalQuantity,onValue:m=>E==null?void 0:E(Number(m)),name:"quantity","data-testid":"returnIncrementer",readonly:!0}):void 0})};export{se as C,c as S}; +import{jsx as l,jsxs as y,Fragment as E}from"@dropins/tools/preact-jsx-runtime.js";import{Price as z,Image as A,CartItem as B,Icon as F,Incrementer as K}from"@dropins/tools/components.js";import{useCallback as V}from"@dropins/tools/preact-hooks.js";import{classes as H}from"@dropins/tools/lib.js";import{O as Q}from"./OrderLoaders.js";import*as O from"@dropins/tools/preact-compat.js";const R=o=>O.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o},O.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"}),O.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"})),C=({placeholderImage:o="",loading:M,product:e,itemType:Z,taxConfig:j,translations:g,disabledIncrementer:q,onQuantity:b,showConfigurableOptions:k,routeProductDetails:v})=>{var S,_,D,f,L;const{taxExcluded:w,taxIncluded:I}=j,a=V((i,t,s)=>l(z,{amount:i,currency:t,weight:"normal",...s}),[]),T=V(i=>{var s,x;const t=(s=i==null?void 0:i.product)!=null&&s.thumbnail.url.length?(x=i==null?void 0:i.product)==null?void 0:x.thumbnail.url:o;return l(A,{src:t,alt:i==null?void 0:i.productName,loading:"lazy",width:"90",height:"120"})},[o]);if(!e)return l(Q,{});let P={};const N=Z==="cancelled",W=(_=(S=e==null?void 0:e.product)==null?void 0:S.stockStatus)==null?void 0:_.includes("IN_STOCK"),n=e==null?void 0:e.giftCard,$=e.totalQuantity>1?{quantity:e.totalQuantity}:{},u=e.discounted,{includeAndExcludeTax:c,includeTax:h,excludeTax:r}=e.taxCalculations,m=e==null?void 0:e.totalQuantity,d={...(e==null?void 0:e.configurableOptions)||{},...(e==null?void 0:e.bundleOptions)||{},...n!=null&&n.senderName?{[g.sender]:n==null?void 0:n.senderName}:{},...n!=null&&n.senderEmail?{[g.sender]:n==null?void 0:n.senderEmail}:{},...n!=null&&n.senderName?{[g.sender]:n==null?void 0:n.senderName}:{},...n!=null&&n.recipientEmail?{[g.recipient]:n==null?void 0:n.recipientEmail}:{},...n!=null&&n.message?{[g.message]:n==null?void 0:n.message}:{},...e!=null&&e.downloadableLinks?{[`${(D=e==null?void 0:e.downloadableLinks)==null?void 0:D.count} ${g.downloadableCount}`]:(f=e==null?void 0:e.downloadableLinks)==null?void 0:f.result}:{}};if(I&&w){const i=a(c.originalPrice.value,c.originalPrice.currency),t=a(c.baseOriginalPrice.value*m,c.baseOriginalPrice.currency,{variant:e.discounted?"strikethrough":"default",weight:"bold"}),s=a(c.baseDiscountedPrice.value*m,c.baseDiscountedPrice.currency,{sale:!0,weight:"bold"}),x=a(c.baseExcludingTax.value*m,c.baseExcludingTax.currency,{weight:"bold"});P={taxExcluded:!0,taxIncluded:void 0,price:i,total:y(E,{children:[t,e.discounted?s:null]}),totalExcludingTax:x}}else if(!I&&w){const i=a(r.originalPrice.value,r.originalPrice.currency),t=a(r.baseOriginalPrice.value*m,r.baseOriginalPrice.currency,{variant:u?"strikethrough":"default",weight:"bold"}),s=a(r.baseDiscountedPrice.value*m,r.baseDiscountedPrice.currency,{sale:!0,weight:"bold"}),x=a(r.baseExcludingTax.value*m,r.baseExcludingTax.currency,{weight:"bold"});P={taxExcluded:void 0,taxIncluded:void 0,price:i,total:y(E,{children:[t,u?s:null]}),totalExcludingTax:x}}else if(I&&!w){const i=a(h.singleItemPrice.value,h.singleItemPrice.currency),t=a(h.baseOriginalPrice.value*m,h.baseOriginalPrice.currency,{variant:u?"strikethrough":"default",weight:"bold"}),s=a(h.baseDiscountedPrice.value*m,h.baseDiscountedPrice.currency,{sale:!0,weight:"bold"});P={taxExcluded:void 0,taxIncluded:!0,price:i,total:y(E,{children:[t,u?s:null]})}}return l(B,{loading:M,alert:N&&W?y("span",{children:[l(F,{source:R}),g.outOfStock]}):l(E,{}),configurations:(k==null?void 0:k(d))??d,title:v?l("a",{"data-testid":"product-name",className:H(["cart-summary-item__title",["cart-summary-item__title--strikethrough",N]]),href:v(e),children:e==null?void 0:e.productName}):l("div",{"data-testid":"product-name",className:H(["cart-summary-item__title",["cart-summary-item__title--strikethrough",N]]),children:e==null?void 0:e.productName}),sku:l("div",{children:(L=e==null?void 0:e.product)==null?void 0:L.sku}),...$,image:v?l("a",{href:v(e),children:T(e)}):T(e),...P,footer:b&&!q?l(K,{value:1,min:1,max:e==null?void 0:e.totalQuantity,onValue:i=>b==null?void 0:b(Number(i)),name:"quantity","data-testid":"returnIncrementer",readonly:!0}):void 0})};export{C,R as S}; diff --git a/scripts/__dropins__/storefront-order/chunks/OrderCancelForm.js b/scripts/__dropins__/storefront-order/chunks/OrderCancelForm.js index 10df655718..c7383661f4 100644 --- a/scripts/__dropins__/storefront-order/chunks/OrderCancelForm.js +++ b/scripts/__dropins__/storefront-order/chunks/OrderCancelForm.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{jsxs as g,jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import{InLineAlert as v,Picker as x,Button as F}from"@dropins/tools/components.js";import{F as S}from"./ShippingStatusCard.js";import"@dropins/tools/lib.js";import{useState as n}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/preact.js";import{events as d}from"@dropins/tools/event-bus.js";import{r as E,c as _}from"./requestGuestOrderCancel.js";import{useText as D,Text as l}from"@dropins/tools/i18n.js";const k=({orderRef:a,pickerProps:m,submitButtonProps:u,cancelReasons:t})=>{const o=D({ErrorHeading:"Order.OrderCancelForm.errorHeading",ErrorDescription:"Order.OrderCancelForm.errorDescription",orderCancellationLabel:"Order.OrderCancelForm.label"}),[i,p]=n(0),[f,O]=n(!1),[b,h]=n(!1);d.on("authenticated",e=>{e&&h(!0)},{eager:!0});const C=e=>{e.preventDefault();const s=Number(e.target.value);p(s)};return g(S,{onSubmit:async e=>(e.preventDefault(),(a.length>20?E:_)(a,t[i].text,c=>{b||(c.status="guest order cancellation requested"),d.emit("order/data",c)},()=>{O(!0)})),"data-testid":"order-order-cancel-reasons-form__text",children:[f&&r(v,{heading:o.ErrorHeading,description:o.ErrorDescription}),r("div",{className:"order-order-cancel-reasons-form__text",children:r(l,{id:"Order.OrderCancelForm.description"})}),r(x,{name:"cancellationReasons",floatingLabel:o.orderCancellationLabel,defaultOption:t[0],variant:"primary",options:t,value:String(i),handleSelect:C,required:!0,"data-testid":"order-cancellation-reasons-selector",...m}),r("div",{className:"order-order-cancel-reasons-form__button-container",children:r(F,{variant:"primary","data-testid":"order-cancel-submit-button",...u,children:r(l,{id:"Order.OrderCancelForm.button"})})})]})};export{k as O}; diff --git a/scripts/__dropins__/storefront-order/chunks/OrderLoaders.js b/scripts/__dropins__/storefront-order/chunks/OrderLoaders.js index cf9eb06f10..6ee0839e52 100644 --- a/scripts/__dropins__/storefront-order/chunks/OrderLoaders.js +++ b/scripts/__dropins__/storefront-order/chunks/OrderLoaders.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{jsx as e,jsxs as a}from"@dropins/tools/preact-jsx-runtime.js";import"./ShippingStatusCard.js";import{Card as d,Skeleton as i,SkeletonRow as r,CartItemSkeleton as t}from"@dropins/tools/components.js";import{classes as m}from"@dropins/tools/lib.js";const z=({testId:s,withCard:n=!0})=>{const l=a(i,{"data-testid":s??"skeletonLoader",children:[e(r,{variant:"heading",size:"xlarge",fullWidth:!1,lines:1}),e(r,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1}),e(r,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1})]});return n?l:e(d,{variant:"secondary",className:m(["order-order-loaders","order-order-loaders--card-loader"]),children:l})},v=s=>e(d,{variant:"secondary",...s,children:a(i,{"data-testid":"order-details-skeleton",children:[e(r,{variant:"heading",size:"medium",fullWidth:!0}),e(r,{size:"medium"}),e(r,{variant:"empty",size:"medium"}),e(r,{size:"xlarge"}),e(r,{size:"xlarge"}),e(r,{size:"xlarge"}),e(r,{size:"xlarge"})]})}),g=()=>a(i,{"data-testid":"order-product-list-skeleton",style:{gridTemplateColumns:"1fr"},children:[e(r,{variant:"heading",fullWidth:!0,size:"medium"}),e(t,{}),e(t,{}),e(t,{}),e(t,{}),e(t,{})]}),p=()=>a(i,{"data-testid":"order-cost-summary-content-skeleton",className:"order-cost-summary-content",children:[e(r,{variant:"heading",size:"small"}),e(r,{variant:"empty",size:"small"}),e(r,{variant:"empty",size:"small"}),e(r,{variant:"empty",size:"small"}),e(r,{variant:"heading",size:"small",fullWidth:!0,lines:3})]}),f=()=>a(i,{"data-testid":"order-header-skeleton",className:"order-header",children:[e(r,{variant:"empty",size:"xlarge",fullWidth:!0}),e(r,{variant:"empty",size:"medium"}),e(r,{variant:"empty",size:"medium"}),e(r,{variant:"empty",size:"medium"}),e(r,{variant:"empty",size:"medium"}),e(r,{variant:"empty",size:"medium"}),e(r,{size:"small",fullWidth:!0}),e(r,{variant:"heading",size:"xsmall",fullWidth:!0})]});export{z as C,v as D,p as O,g as a,f as b}; diff --git a/scripts/__dropins__/storefront-order/chunks/ReturnsListContent.js b/scripts/__dropins__/storefront-order/chunks/ReturnsListContent.js index dd9c2eeb08..d95499e7a5 100644 --- a/scripts/__dropins__/storefront-order/chunks/ReturnsListContent.js +++ b/scripts/__dropins__/storefront-order/chunks/ReturnsListContent.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as r,jsxs as c,Fragment as N}from"@dropins/tools/preact-jsx-runtime.js";import{useMemo as V}from"@dropins/tools/preact-hooks.js";import{classes as R,Slot as Q}from"@dropins/tools/lib.js";import{IllustratedMessage as n1,Icon as S,Card as U,ContentGrid as a1,Image as c1,Header as J,Pagination as L1}from"@dropins/tools/components.js";import*as l from"@dropins/tools/preact-compat.js";import{useMemo as i1}from"@dropins/tools/preact-compat.js";import"./ShippingStatusCard.js";import{f as T}from"./returnOrdersHelper.js";import"@dropins/tools/preact.js";import"@dropins/tools/event-bus.js";import{C as W}from"./OrderLoaders.js";import{c as s1}from"./capitalizeFirst.js";import{Text as X}from"@dropins/tools/i18n.js";const Y=L=>l.createElement("svg",{id:"Icon_Chevron_right_Base","data-name":"Icon \\u2013 Chevron right \\u2013 Base",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...L},l.createElement("g",{id:"Large"},l.createElement("rect",{id:"Placement_area","data-name":"Placement area",width:24,height:24,fill:"#fff",opacity:0}),l.createElement("g",{id:"Chevron_right_icon","data-name":"Chevron right icon"},l.createElement("path",{vectorEffect:"non-scaling-stroke",id:"chevron",d:"M199.75,367.5l4.255,-4.255-4.255,-4.255",transform:"translate(-189.25 -351.0)",fill:"none",stroke:"currentColor"})))),d1=L=>l.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...L},l.createElement("path",{d:"M12.002 21L11.8275 21.4686C11.981 21.5257 12.1528 21.5041 12.2873 21.4106C12.4218 21.3172 12.502 21.1638 12.502 21H12.002ZM3.89502 17.9823H3.39502C3.39502 18.1912 3.52485 18.378 3.72059 18.4509L3.89502 17.9823ZM3.89502 8.06421L4.07193 7.59655C3.91831 7.53844 3.74595 7.55948 3.61082 7.65284C3.47568 7.74619 3.39502 7.89997 3.39502 8.06421H3.89502ZM12.0007 21H11.5007C11.5007 21.1638 11.5809 21.3172 11.7154 21.4106C11.8499 21.5041 12.0216 21.5257 12.1751 21.4686L12.0007 21ZM20.1076 17.9823L20.282 18.4509C20.4778 18.378 20.6076 18.1912 20.6076 17.9823H20.1076ZM20.1076 8.06421H20.6076C20.6076 7.89997 20.527 7.74619 20.3918 7.65284C20.2567 7.55948 20.0843 7.53844 19.9307 7.59655L20.1076 8.06421ZM12.0007 11.1311L11.8238 10.6634C11.6293 10.737 11.5007 10.9232 11.5007 11.1311H12.0007ZM20.2858 8.53191C20.5441 8.43421 20.6743 8.14562 20.5766 7.88734C20.4789 7.62906 20.1903 7.49889 19.932 7.5966L20.2858 8.53191ZM12.002 4.94826L12.1775 4.48008C12.0605 4.43623 11.9314 4.43775 11.8154 4.48436L12.002 4.94826ZM5.87955 6.87106C5.62334 6.97407 5.49915 7.26528 5.60217 7.52149C5.70518 7.77769 5.99639 7.90188 6.2526 7.79887L5.87955 6.87106ZM18.1932 7.80315C18.4518 7.90008 18.74 7.76904 18.8369 7.51047C18.9338 7.2519 18.8028 6.96371 18.5442 6.86678L18.1932 7.80315ZM12 4.94827L11.5879 5.23148C11.6812 5.36719 11.8353 5.44827 12 5.44827C12.1647 5.44827 12.3188 5.36719 12.4121 5.23148L12 4.94827ZM14.0263 2L14.2028 1.53218C13.9875 1.45097 13.7446 1.52717 13.6143 1.71679L14.0263 2ZM21.8421 4.94827L22.2673 5.2113C22.3459 5.08422 22.3636 4.92863 22.3154 4.78717C22.2673 4.64571 22.1584 4.53319 22.0186 4.48045L21.8421 4.94827ZM9.97368 2L10.3857 1.71679C10.2554 1.52717 10.0125 1.45097 9.79721 1.53218L9.97368 2ZM2.15789 4.94827L1.98142 4.48045C1.84161 4.53319 1.73271 4.64571 1.68456 4.78717C1.63641 4.92863 1.65406 5.08422 1.73267 5.2113L2.15789 4.94827ZM12 11.1256L11.6702 11.5014C11.8589 11.667 12.1411 11.667 12.3298 11.5014L12 11.1256ZM15.0395 8.45812L14.8732 7.98659C14.8131 8.00779 14.7576 8.04028 14.7097 8.08232L15.0395 8.45812ZM23 5.65024L23.3288 6.0269C23.5095 5.86916 23.5527 5.60532 23.4318 5.39817C23.3109 5.19102 23.0599 5.09893 22.8337 5.17871L23 5.65024ZM8.96053 8.45812L9.29034 8.08232C9.24244 8.04028 9.18695 8.00779 9.12685 7.98659L8.96053 8.45812ZM1 5.65024L1.16632 5.17871C0.940115 5.09893 0.689119 5.19102 0.568192 5.39817C0.447264 5.60532 0.49048 5.86916 0.671176 6.0269L1 5.65024ZM12.1764 20.5314L4.06945 17.5137L3.72059 18.4509L11.8275 21.4686L12.1764 20.5314ZM4.39502 17.9823V8.06421H3.39502V17.9823H4.39502ZM3.71811 8.53187L11.8251 11.5987L12.1789 10.6634L4.07193 7.59655L3.71811 8.53187ZM11.502 11.1311V21H12.502V11.1311H11.502ZM12.1751 21.4686L20.282 18.4509L19.9332 17.5137L11.8262 20.5314L12.1751 21.4686ZM20.6076 17.9823V8.06421H19.6076V17.9823H20.6076ZM19.9307 7.59655L11.8238 10.6634L12.1776 11.5987L20.2845 8.53187L19.9307 7.59655ZM11.5007 11.1311V21H12.5007V11.1311H11.5007ZM19.932 7.5966L11.8251 10.6634L12.1789 11.5987L20.2858 8.53191L19.932 7.5966ZM11.8154 4.48436L5.87955 6.87106L6.2526 7.79887L12.1885 5.41217L11.8154 4.48436ZM11.8265 5.41645L18.1932 7.80315L18.5442 6.86678L12.1775 4.48008L11.8265 5.41645ZM11.502 4.94826V11.1311H12.502V4.94826H11.502ZM12.4121 5.23148L14.4384 2.28321L13.6143 1.71679L11.5879 4.66507L12.4121 5.23148ZM13.8498 2.46782L21.6656 5.4161L22.0186 4.48045L14.2028 1.53218L13.8498 2.46782ZM21.4169 4.68525L20.5485 6.08919L21.3989 6.61524L22.2673 5.2113L21.4169 4.68525ZM12.4121 4.66507L10.3857 1.71679L9.56162 2.28321L11.5879 5.23148L12.4121 4.66507ZM9.79721 1.53218L1.98142 4.48045L2.33437 5.4161L10.1502 2.46782L9.79721 1.53218ZM1.73267 5.2113L2.60109 6.61524L3.45154 6.08919L2.58312 4.68525L1.73267 5.2113ZM12.3298 11.5014L15.3693 8.83392L14.7097 8.08232L11.6702 10.7498L12.3298 11.5014ZM15.2058 8.92965L23.1663 6.12177L22.8337 5.17871L14.8732 7.98659L15.2058 8.92965ZM22.6712 5.27358L19.7764 7.80067L20.4341 8.554L23.3288 6.0269L22.6712 5.27358ZM12.3298 10.7498L9.29034 8.08232L8.63072 8.83392L11.6702 11.5014L12.3298 10.7498ZM9.12685 7.98659L1.16632 5.17871L0.83368 6.12177L8.79421 8.92965L9.12685 7.98659ZM0.671176 6.0269L3.56591 8.554L4.22356 7.80067L1.32882 5.27358L0.671176 6.0269Z",fill:"#D6D6D6"})),K=({typeList:L,isEmpty:C,minifiedView:g,message:M})=>{const t=i1(()=>{switch(L){case"orders":return{icon:d1,text:r("p",{children:M}),className:"order-empty-list--empty-box"};default:return{icon:"",text:"",className:""}}},[L,M]);return!C||!L||!t.text?null:r(n1,{className:R(["order-empty-list",t.className,g?"order-empty-list--minified":""]),message:t.text,icon:r(S,{source:t.icon}),"data-testid":"emptyList"})},I={size:"32",stroke:"2"},v1=({placeholderImage:L,minifiedViewKey:C,withReturnNumber:g=!1,withOrderNumber:M=!1,slots:t,pageInfo:i,withReturnsListButton:A=!0,isMobile:$=!1,returnsInMinifiedView:D=1,translations:a={},orderReturns:s=[],minifiedView:h=!1,withHeader:f=!0,withThumbnails:B=!0,selectedPage:k=1,handleSetSelectPage:z,routeReturnDetails:d,routeOrderDetails:v,routeTracking:b,routeReturnsList:x,routeProductDetails:m,loading:y})=>{const F=h?D:s.length,j=m!=null&&m()?"a":"span",H=V(()=>s.slice(0,F).map((e,t1)=>{var G,q;const w=((e==null?void 0:e.items)??[]).reduce((n,u)=>(u.requestQuantity??0)+n,0);return r(U,{variant:"secondary",className:"order-returns-list-content__cards-list",children:c("div",{className:"order-returns-list-content__cards-grid",children:[c("div",{className:"order-returns-list-content__descriptions",children:[r("p",{className:"order-returns-list-content__return-status",children:T(e.returnStatus)?r(X,{id:`Order.Returns.${C}.returnsList.returnStatus.${T(e.returnStatus)}`}):r("span",{children:s1(e.returnStatus)})}),g?c("p",{children:[a.returnNumber," ",r("a",{href:(d==null?void 0:d({returnNumber:e.returnNumber,orderNumber:e.orderNumber,token:e.token}))??"#",rel:"noreferrer",children:e.returnNumber})]}):null,M?c("p",{children:[a.orderNumber," ",r("a",{href:(v==null?void 0:v({orderNumber:e.orderNumber,token:e.token}))??"#",rel:"noreferrer",children:e.orderNumber})]}):null,(G=e==null?void 0:e.tracking)==null?void 0:G.map((n,u)=>{var _,p;const Z={title:"",number:(n==null?void 0:n.trackingNumber)??"",carrier:((_=n==null?void 0:n.carrier)==null?void 0:_.label)??""},E=b==null?void 0:b(Z),o=`${Z.number}_${u}`;return c("p",{children:[`${a.carrier} `,`${(p=Z.carrier)==null?void 0:p.toLocaleUpperCase()} | `,E?r("a",{href:E,target:"_blank",rel:"noreferrer","data-testid":`${o}_link`,children:n.trackingNumber}):r("span",{"data-testid":`${o}_span`,children:n.trackingNumber})]},o)}),t!=null&&t.ReturnItemsDetails?r(Q,{"data-testid":"returnItemsDetails",name:"ReturnItemsDetails",slot:t==null?void 0:t.ReturnItemsDetails,context:{items:e.items}}):null,!(t!=null&&t.ReturnItemsDetails)&&e.items.length?c("p",{children:[w," ",r(X,{id:`Order.Returns.${C}.returnsList.itemText`,plural:w,fields:{count:w}})]}):null]}),B?r(a1,{maxColumns:$?3:9,emptyGridContent:r(N,{}),className:R(["order-returns-list-content__images",["order-returns-list-content__images-3",$]]),children:(q=e==null?void 0:e.items)==null?void 0:q.map((n,u)=>{var _,p,O,P;const Z=(_=n.thumbnail)==null?void 0:_.label,E=(O=(p=n.thumbnail)==null?void 0:p.url)!=null&&O.length?(P=n.thumbnail)==null?void 0:P.url:L,o=`key_${u}_${n.uid}`;return r(j,{"data-testid":o,href:(m==null?void 0:m(n))??"#",children:r(c1,{alt:Z,src:E,width:85,height:114})},o)})}):null,t!=null&&t.DetailsActionParams?r(Q,{className:"order-returns-list-content__actions","data-testid":"detailsActionParams",name:"DetailsActionParams",slot:t==null?void 0:t.DetailsActionParams,context:{returnOrderItem:e}}):r("a",{href:(d==null?void 0:d({returnNumber:e.returnNumber,token:e.token,orderNumber:e.orderNumber}))??"#",className:"order-returns-list-content__actions",children:r(S,{source:Y,...I})})]})},t1)}),[s,F,C,g,a,M,t,B,$,L,j,b,m,d,v]),r1=V(()=>c(N,{children:[f?r(J,{title:a.minifiedViewTitle,divider:!1,className:"order-returns__header--minified"}):null,y?r(W,{withCard:!1}):c(N,{children:[H,r(K,{minifiedView:h,typeList:"orders",isEmpty:!s.length,message:a.emptyOrdersListMessage}),A?r("a",{className:"order-returns-list-content__actions",href:(x==null?void 0:x())??"#",children:r(U,{variant:"secondary",className:"order-returns-list-content__card",children:c("div",{className:"order-returns-list-content__card-wrapper",children:[r("p",{children:a.viewAllOrdersButton}),r(S,{source:Y,...I})]})})}):null]})]}),[x,A,f,a,H,h,s.length,y]),e1=V(()=>c(N,{children:[f?r(J,{title:a.minifiedViewTitle,divider:!0,className:"order-returns__header--full-size"}):null,y?r(W,{withCard:!1}):c(N,{children:[r(K,{minifiedView:h,typeList:"orders",isEmpty:!s.length,message:a.emptyOrdersListMessage}),H,(i==null?void 0:i.totalPages)>1?r(L1,{totalPages:i==null?void 0:i.totalPages,currentPage:k,onChange:z}):null]})]}),[H,h,s,a,i==null?void 0:i.totalPages,k,z,y,f]);return r("div",{className:"order-returns-list-content",children:h?r1:e1})};export{v1 as R}; +import{jsx as r,jsxs as c,Fragment as N}from"@dropins/tools/preact-jsx-runtime.js";import{useMemo as V}from"@dropins/tools/preact-hooks.js";import{classes as R,Slot as Q}from"@dropins/tools/lib.js";import{IllustratedMessage as n1,Icon as S,Card as U,ContentGrid as a1,Image as c1,Header as J,Pagination as L1}from"@dropins/tools/components.js";import*as l from"@dropins/tools/preact-compat.js";import{useMemo as i1}from"@dropins/tools/preact-compat.js";import"./ShippingStatusCard.js";import{f as T}from"./returnOrdersHelper.js";import"@dropins/tools/preact.js";import"@dropins/tools/event-bus.js";import{C as W}from"./OrderLoaders.js";import{c as s1}from"./capitalizeFirst.js";import{Text as X}from"@dropins/tools/i18n.js";const Y=L=>l.createElement("svg",{id:"Icon_Chevron_right_Base","data-name":"Icon \\u2013 Chevron right \\u2013 Base",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...L},l.createElement("g",{id:"Large"},l.createElement("rect",{id:"Placement_area","data-name":"Placement area",width:24,height:24,fill:"#fff",opacity:0}),l.createElement("g",{id:"Chevron_right_icon","data-name":"Chevron right icon"},l.createElement("path",{vectorEffect:"non-scaling-stroke",id:"chevron",d:"M199.75,367.5l4.255,-4.255-4.255,-4.255",transform:"translate(-189.25 -351.0)",fill:"none",stroke:"currentColor"})))),d1=L=>l.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...L},l.createElement("path",{d:"M12.002 21L11.8275 21.4686C11.981 21.5257 12.1528 21.5041 12.2873 21.4106C12.4218 21.3172 12.502 21.1638 12.502 21H12.002ZM3.89502 17.9823H3.39502C3.39502 18.1912 3.52485 18.378 3.72059 18.4509L3.89502 17.9823ZM3.89502 8.06421L4.07193 7.59655C3.91831 7.53844 3.74595 7.55948 3.61082 7.65284C3.47568 7.74619 3.39502 7.89997 3.39502 8.06421H3.89502ZM12.0007 21H11.5007C11.5007 21.1638 11.5809 21.3172 11.7154 21.4106C11.8499 21.5041 12.0216 21.5257 12.1751 21.4686L12.0007 21ZM20.1076 17.9823L20.282 18.4509C20.4778 18.378 20.6076 18.1912 20.6076 17.9823H20.1076ZM20.1076 8.06421H20.6076C20.6076 7.89997 20.527 7.74619 20.3918 7.65284C20.2567 7.55948 20.0843 7.53844 19.9307 7.59655L20.1076 8.06421ZM12.0007 11.1311L11.8238 10.6634C11.6293 10.737 11.5007 10.9232 11.5007 11.1311H12.0007ZM20.2858 8.53191C20.5441 8.43421 20.6743 8.14562 20.5766 7.88734C20.4789 7.62906 20.1903 7.49889 19.932 7.5966L20.2858 8.53191ZM12.002 4.94826L12.1775 4.48008C12.0605 4.43623 11.9314 4.43775 11.8154 4.48436L12.002 4.94826ZM5.87955 6.87106C5.62334 6.97407 5.49915 7.26528 5.60217 7.52149C5.70518 7.77769 5.99639 7.90188 6.2526 7.79887L5.87955 6.87106ZM18.1932 7.80315C18.4518 7.90008 18.74 7.76904 18.8369 7.51047C18.9338 7.2519 18.8028 6.96371 18.5442 6.86678L18.1932 7.80315ZM12 4.94827L11.5879 5.23148C11.6812 5.36719 11.8353 5.44827 12 5.44827C12.1647 5.44827 12.3188 5.36719 12.4121 5.23148L12 4.94827ZM14.0263 2L14.2028 1.53218C13.9875 1.45097 13.7446 1.52717 13.6143 1.71679L14.0263 2ZM21.8421 4.94827L22.2673 5.2113C22.3459 5.08422 22.3636 4.92863 22.3154 4.78717C22.2673 4.64571 22.1584 4.53319 22.0186 4.48045L21.8421 4.94827ZM9.97368 2L10.3857 1.71679C10.2554 1.52717 10.0125 1.45097 9.79721 1.53218L9.97368 2ZM2.15789 4.94827L1.98142 4.48045C1.84161 4.53319 1.73271 4.64571 1.68456 4.78717C1.63641 4.92863 1.65406 5.08422 1.73267 5.2113L2.15789 4.94827ZM12 11.1256L11.6702 11.5014C11.8589 11.667 12.1411 11.667 12.3298 11.5014L12 11.1256ZM15.0395 8.45812L14.8732 7.98659C14.8131 8.00779 14.7576 8.04028 14.7097 8.08232L15.0395 8.45812ZM23 5.65024L23.3288 6.0269C23.5095 5.86916 23.5527 5.60532 23.4318 5.39817C23.3109 5.19102 23.0599 5.09893 22.8337 5.17871L23 5.65024ZM8.96053 8.45812L9.29034 8.08232C9.24244 8.04028 9.18695 8.00779 9.12685 7.98659L8.96053 8.45812ZM1 5.65024L1.16632 5.17871C0.940115 5.09893 0.689119 5.19102 0.568192 5.39817C0.447264 5.60532 0.49048 5.86916 0.671176 6.0269L1 5.65024ZM12.1764 20.5314L4.06945 17.5137L3.72059 18.4509L11.8275 21.4686L12.1764 20.5314ZM4.39502 17.9823V8.06421H3.39502V17.9823H4.39502ZM3.71811 8.53187L11.8251 11.5987L12.1789 10.6634L4.07193 7.59655L3.71811 8.53187ZM11.502 11.1311V21H12.502V11.1311H11.502ZM12.1751 21.4686L20.282 18.4509L19.9332 17.5137L11.8262 20.5314L12.1751 21.4686ZM20.6076 17.9823V8.06421H19.6076V17.9823H20.6076ZM19.9307 7.59655L11.8238 10.6634L12.1776 11.5987L20.2845 8.53187L19.9307 7.59655ZM11.5007 11.1311V21H12.5007V11.1311H11.5007ZM19.932 7.5966L11.8251 10.6634L12.1789 11.5987L20.2858 8.53191L19.932 7.5966ZM11.8154 4.48436L5.87955 6.87106L6.2526 7.79887L12.1885 5.41217L11.8154 4.48436ZM11.8265 5.41645L18.1932 7.80315L18.5442 6.86678L12.1775 4.48008L11.8265 5.41645ZM11.502 4.94826V11.1311H12.502V4.94826H11.502ZM12.4121 5.23148L14.4384 2.28321L13.6143 1.71679L11.5879 4.66507L12.4121 5.23148ZM13.8498 2.46782L21.6656 5.4161L22.0186 4.48045L14.2028 1.53218L13.8498 2.46782ZM21.4169 4.68525L20.5485 6.08919L21.3989 6.61524L22.2673 5.2113L21.4169 4.68525ZM12.4121 4.66507L10.3857 1.71679L9.56162 2.28321L11.5879 5.23148L12.4121 4.66507ZM9.79721 1.53218L1.98142 4.48045L2.33437 5.4161L10.1502 2.46782L9.79721 1.53218ZM1.73267 5.2113L2.60109 6.61524L3.45154 6.08919L2.58312 4.68525L1.73267 5.2113ZM12.3298 11.5014L15.3693 8.83392L14.7097 8.08232L11.6702 10.7498L12.3298 11.5014ZM15.2058 8.92965L23.1663 6.12177L22.8337 5.17871L14.8732 7.98659L15.2058 8.92965ZM22.6712 5.27358L19.7764 7.80067L20.4341 8.554L23.3288 6.0269L22.6712 5.27358ZM12.3298 10.7498L9.29034 8.08232L8.63072 8.83392L11.6702 11.5014L12.3298 10.7498ZM9.12685 7.98659L1.16632 5.17871L0.83368 6.12177L8.79421 8.92965L9.12685 7.98659ZM0.671176 6.0269L3.56591 8.554L4.22356 7.80067L1.32882 5.27358L0.671176 6.0269Z",fill:"currentColor"})),K=({typeList:L,isEmpty:C,minifiedView:g,message:M})=>{const t=i1(()=>{switch(L){case"orders":return{icon:d1,text:r("p",{children:M}),className:"order-empty-list--empty-box"};default:return{icon:"",text:"",className:""}}},[L,M]);return!C||!L||!t.text?null:r(n1,{className:R(["order-empty-list",t.className,g?"order-empty-list--minified":""]),message:t.text,icon:r(S,{source:t.icon}),"data-testid":"emptyList"})},I={size:"32",stroke:"2"},v1=({placeholderImage:L,minifiedViewKey:C,withReturnNumber:g=!1,withOrderNumber:M=!1,slots:t,pageInfo:i,withReturnsListButton:A=!0,isMobile:$=!1,returnsInMinifiedView:D=1,translations:a={},orderReturns:s=[],minifiedView:h=!1,withHeader:f=!0,withThumbnails:B=!0,selectedPage:k=1,handleSetSelectPage:z,routeReturnDetails:d,routeOrderDetails:v,routeTracking:b,routeReturnsList:x,routeProductDetails:m,loading:y})=>{const F=h?D:s.length,j=m!=null&&m()?"a":"span",H=V(()=>s.slice(0,F).map((e,t1)=>{var G,q;const w=((e==null?void 0:e.items)??[]).reduce((n,u)=>(u.requestQuantity??0)+n,0);return r(U,{variant:"secondary",className:"order-returns-list-content__cards-list",children:c("div",{className:"order-returns-list-content__cards-grid",children:[c("div",{className:"order-returns-list-content__descriptions",children:[r("p",{className:"order-returns-list-content__return-status",children:T(e.returnStatus)?r(X,{id:`Order.Returns.${C}.returnsList.returnStatus.${T(e.returnStatus)}`}):r("span",{children:s1(e.returnStatus)})}),g?c("p",{children:[a.returnNumber," ",r("a",{href:(d==null?void 0:d({returnNumber:e.returnNumber,orderNumber:e.orderNumber,token:e.token}))??"#",rel:"noreferrer",children:e.returnNumber})]}):null,M?c("p",{children:[a.orderNumber," ",r("a",{href:(v==null?void 0:v({orderNumber:e.orderNumber,token:e.token}))??"#",rel:"noreferrer",children:e.orderNumber})]}):null,(G=e==null?void 0:e.tracking)==null?void 0:G.map((n,u)=>{var _,p;const Z={title:"",number:(n==null?void 0:n.trackingNumber)??"",carrier:((_=n==null?void 0:n.carrier)==null?void 0:_.label)??""},E=b==null?void 0:b(Z),o=`${Z.number}_${u}`;return c("p",{children:[`${a.carrier} `,`${(p=Z.carrier)==null?void 0:p.toLocaleUpperCase()} | `,E?r("a",{href:E,target:"_blank",rel:"noreferrer","data-testid":`${o}_link`,children:n.trackingNumber}):r("span",{"data-testid":`${o}_span`,children:n.trackingNumber})]},o)}),t!=null&&t.ReturnItemsDetails?r(Q,{"data-testid":"returnItemsDetails",name:"ReturnItemsDetails",slot:t==null?void 0:t.ReturnItemsDetails,context:{items:e.items}}):null,!(t!=null&&t.ReturnItemsDetails)&&e.items.length?c("p",{children:[w," ",r(X,{id:`Order.Returns.${C}.returnsList.itemText`,plural:w,fields:{count:w}})]}):null]}),B?r(a1,{maxColumns:$?3:9,emptyGridContent:r(N,{}),className:R(["order-returns-list-content__images",["order-returns-list-content__images-3",$]]),children:(q=e==null?void 0:e.items)==null?void 0:q.map((n,u)=>{var _,p,O,P;const Z=(_=n.thumbnail)==null?void 0:_.label,E=(O=(p=n.thumbnail)==null?void 0:p.url)!=null&&O.length?(P=n.thumbnail)==null?void 0:P.url:L,o=`key_${u}_${n.uid}`;return r(j,{"data-testid":o,href:(m==null?void 0:m(n))??"#",children:r(c1,{alt:Z,src:E??"",width:85,height:114})},o)})}):null,t!=null&&t.DetailsActionParams?r(Q,{className:"order-returns-list-content__actions","data-testid":"detailsActionParams",name:"DetailsActionParams",slot:t==null?void 0:t.DetailsActionParams,context:{returnOrderItem:e}}):r("a",{href:(d==null?void 0:d({returnNumber:e.returnNumber,token:e.token,orderNumber:e.orderNumber}))??"#",className:"order-returns-list-content__actions",children:r(S,{source:Y,...I})})]})},t1)}),[s,F,C,g,a,M,t,B,$,L,j,b,m,d,v]),r1=V(()=>c(N,{children:[f?r(J,{title:a.minifiedViewTitle,divider:!1,className:"order-returns__header--minified"}):null,y?r(W,{withCard:!1}):c(N,{children:[H,r(K,{minifiedView:h,typeList:"orders",isEmpty:!s.length,message:a.emptyOrdersListMessage}),A?r("a",{className:"order-returns-list-content__actions",href:(x==null?void 0:x())??"#",children:r(U,{variant:"secondary",className:"order-returns-list-content__card",children:c("div",{className:"order-returns-list-content__card-wrapper",children:[r("p",{children:a.viewAllOrdersButton}),r(S,{source:Y,...I})]})})}):null]})]}),[x,A,f,a,H,h,s.length,y]),e1=V(()=>c(N,{children:[f?r(J,{title:a.minifiedViewTitle,divider:!0,className:"order-returns__header--full-size"}):null,y?r(W,{withCard:!1}):c(N,{children:[r(K,{minifiedView:h,typeList:"orders",isEmpty:!s.length,message:a.emptyOrdersListMessage}),H,(i==null?void 0:i.totalPages)>1?r(L1,{totalPages:i==null?void 0:i.totalPages,currentPage:k,onChange:z}):null]})]}),[H,h,s,a,i==null?void 0:i.totalPages,k,z,y,f]);return r("div",{className:"order-returns-list-content",children:h?r1:e1})};export{v1 as R}; diff --git a/scripts/__dropins__/storefront-order/chunks/ShippingStatusCard.js b/scripts/__dropins__/storefront-order/chunks/ShippingStatusCard.js index 3d86843b29..7e20294005 100644 --- a/scripts/__dropins__/storefront-order/chunks/ShippingStatusCard.js +++ b/scripts/__dropins__/storefront-order/chunks/ShippingStatusCard.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{jsx as h,Fragment as v,jsxs as M}from"@dropins/tools/preact-jsx-runtime.js";import{useRef as _,useState as D,useEffect as w,useCallback as T}from"@dropins/tools/preact-hooks.js";import{useText as y}from"@dropins/tools/i18n.js";import*as C from"@dropins/tools/preact-compat.js";import{memo as V,useCallback as L}from"@dropins/tools/preact-compat.js";import{classes as k}from"@dropins/tools/lib.js";import{Field as q,Picker as A,Input as I,InputDate as R,Checkbox as O,TextArea as N}from"@dropins/tools/components.js";const j=l=>C.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l},C.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.8052 14.4968C10.8552 14.4968 9.9752 14.0268 9.4452 13.2368L9.4152 13.1868L9.3852 13.1268C8.1352 11.2268 7.5352 8.96681 7.6852 6.68681C7.7552 4.42681 9.6052 2.61681 11.8652 2.60681H12.0052C14.2752 2.47681 16.2152 4.21681 16.3452 6.47681C16.3452 6.55681 16.3452 6.62681 16.3452 6.70681C16.4852 8.94681 15.9052 11.1768 14.6852 13.0568L14.6052 13.1768C14.0552 13.9868 13.1352 14.4668 12.1652 14.4768H12.0052C11.9352 14.4768 11.8652 14.4868 11.7952 14.4868L11.8052 14.4968Z",stroke:"currentColor"}),C.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M4.3252 21.5469C4.3552 20.4169 4.4752 19.2869 4.6752 18.1769C4.8952 17.1669 6.4752 16.0269 8.9052 15.1569C9.2352 15.0369 9.4852 14.7869 9.5952 14.4569L9.8052 14.0269",stroke:"currentColor"}),C.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M14.425 14.4069L14.165 14.1569C14.375 14.5969 14.725 14.9569 15.155 15.1869C16.945 15.7969 19.125 16.9569 19.375 18.2069C19.585 19.3069 19.685 20.4269 19.675 21.5369",stroke:"currentColor"})),H=l=>l.reduce((u,{code:i,required:$,defaultValue:s})=>($&&(u[i]=s),u),{}),S=({fieldsConfig:l,onSubmit:u})=>{const{requiredFieldError:i}=y({requiredFieldError:"Order.Form.notifications.requiredFieldError"}),$=_(null),[s,n]=D({}),[o,t]=D({});w(()=>{if(n({}),!l||!l.length)return;const c=H(l);n(c)},[l==null?void 0:l.length]),w(()=>()=>{var c;n({}),(c=$.current)==null||c.reset()},[]);const p=T((c,e)=>{const r=l.find(d=>d.code===c);return r!=null&&r.required&&!e?i:""},[l,i]),b=T(c=>{const{name:e,value:r,type:a,checked:d}=c==null?void 0:c.target,f=a==="checkbox"?d:r;n(E=>({...E,[e]:f}))},[]),x=T(c=>{const{name:e,value:r,type:a,checked:d}=c==null?void 0:c.target,f=a==="checkbox"?d:r;t(E=>({...E,[e]:p(e,f)}))},[p]),F=T(c=>{c.preventDefault();let e=!0,r={},a=null;for(const[d,f]of Object.entries(s)){const E=p(d,f);E&&(r[d]=E,e=!1,a||(a=d))}if(t(r),a&&$.current){const d=$.current.elements.namedItem(a);d==null||d.focus()}u==null||u(c,e)},[s,p,u]);return{formData:s,errors:o,formRef:$,handleChange:b,handleBlur:x,handleSubmit:F}},U=V(({loading:l,values:u,fields:i=[],errors:$,className:s="",onChange:n,onBlur:o})=>{const t=`${s}__item`,p=L((e,r,a)=>{const d=e.options.map(f=>({text:f.label,value:f.value}));return h(q,{error:a,className:k([t,`${t}--${e.id}`,[`${t}--${e.id}-hidden`,e.is_hidden],e.className]),"data-testid":`${s}--${e.id}`,disabled:l,children:h(A,{name:e.id,floatingLabel:`${e.label} ${e.required?"*":""}`,placeholder:e.label,"aria-label":e.label,options:d,onBlur:o,handleSelect:n,value:r||e.defaultValue})},e.id)},[s,l,t,o,n]),b=L((e,r,a)=>{const d=e.id==="email",f=d?h(j,{}):void 0,E=d?"username":"";return h(q,{error:a,className:k([t,`${t}--${e.id}`,[`${t}--${e.id}-hidden`,e==null?void 0:e.is_hidden],e.className]),"data-testid":`${s}--${e.id}`,disabled:l,children:h(I,{"aria-label":e.label,"aria-required":e.required,autoComplete:E,icon:f,type:"text",name:e.id,value:r||e.defaultValue,placeholder:e.label,floatingLabel:`${e.label} ${e.required?"*":""}`,onBlur:o,onChange:n})},e.id)},[s,l,t,o,n]),x=L((e,r,a)=>h(q,{error:a,className:k([t,`${t}--${e.id}`,[`${t}--${e.id}-hidden`,e.is_hidden],e.className]),"data-testid":`${s}--${e.id}`,disabled:l,children:h(R,{type:"text",name:e.id,value:r||e.defaultValue,placeholder:e.label,floatingLabel:`${e.label} ${e.required?"*":""}`,onBlur:o,onChange:n})},e.id),[s,l,t,o,n]),F=L((e,r,a)=>h(q,{error:a,className:k([t,`${t}--${e.id}`,[`${t}--${e.id}-hidden`,e.is_hidden],e.className]),"data-testid":`${s}--${e.id}`,disabled:l,children:h(O,{name:e.id,checked:r||e.defaultValue,placeholder:e.label,label:`${e.label} ${e.required?"*":""}`,onBlur:o,onChange:n})},e.id),[s,l,t,o,n]),c=L((e,r,a)=>h(q,{error:a,className:k([t,`${t}--${e.id}`,[`${t}--${e.id}-hidden`,e.is_hidden],e.className]),"data-testid":`${s}--${e.id}`,disabled:l,children:h(N,{type:"text",name:e.id,value:r===void 0?e.defaultValue:r,label:`${e.label} ${e.required?"*":""}`,onBlur:o,onChange:n})},e.id),[s,l,t,o,n]);return i.length?h(v,{children:i.map(e=>{var d;const r=($==null?void 0:$[e.id])??"",a=(u==null?void 0:u[e.id])??"";switch(e.fieldType){case"TEXT":return(d=e==null?void 0:e.options)!=null&&d.length?p(e,a,r):b(e,a,r);case"MULTILINE":return b(e,a,r);case"SELECT":return p(e,a,r);case"DATE":return x(e,a,r);case"BOOLEAN":return F(e,a,r);case"TEXTAREA":return c(e,a,r);default:return null}})}):null}),K=V(({name:l,loading:u,children:i,className:$="defaultForm",fieldsConfig:s,onSubmit:n})=>{const{formData:o,errors:t,formRef:p,handleChange:b,handleBlur:x,handleSubmit:F}=S({fieldsConfig:s,onSubmit:n});return M("form",{className:k(["order-form",$]),onSubmit:F,name:l,ref:p,children:[h(U,{className:$,loading:u,fields:s,onChange:b,onBlur:x,errors:t,values:o}),i]})});export{K as F,U as a,S as u}; diff --git a/scripts/__dropins__/storefront-order/chunks/capitalizeFirst.js b/scripts/__dropins__/storefront-order/chunks/capitalizeFirst.js index a8297f4927..8b4054f020 100644 --- a/scripts/__dropins__/storefront-order/chunks/capitalizeFirst.js +++ b/scripts/__dropins__/storefront-order/chunks/capitalizeFirst.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ const a=e=>e&&e.charAt(0).toLocaleUpperCase()+e.slice(1).toLocaleLowerCase();export{a as c}; diff --git a/scripts/__dropins__/storefront-order/chunks/confirmCancelOrder.js b/scripts/__dropins__/storefront-order/chunks/confirmCancelOrder.js index dce1a5dfeb..8384a7e04f 100644 --- a/scripts/__dropins__/storefront-order/chunks/confirmCancelOrder.js +++ b/scripts/__dropins__/storefront-order/chunks/confirmCancelOrder.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{h as f}from"./network-error.js";import{f as u,h as _}from"./fetch-graphql.js";import{REQUEST_RETURN_ORDER_FRAGMENT as I,GUEST_ORDER_FRAGMENT as O}from"../fragments.js";import{a}from"./initialize.js";import{events as T}from"@dropins/tools/event-bus.js";const N=` mutation REORDER_ITEMS_MUTATION($orderNumber: String!) { diff --git a/scripts/__dropins__/storefront-order/chunks/fetch-graphql.js b/scripts/__dropins__/storefront-order/chunks/fetch-graphql.js index 75489de79e..034be55074 100644 --- a/scripts/__dropins__/storefront-order/chunks/fetch-graphql.js +++ b/scripts/__dropins__/storefront-order/chunks/fetch-graphql.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{FetchGraphQL as s}from"@dropins/tools/fetch-graphql.js";const h=e=>{const r=e.map(a=>a.message).join(" ");throw Error(r)},{setEndpoint:o,setFetchGraphQlHeader:c,removeFetchGraphQlHeader:n,setFetchGraphQlHeaders:p,fetchGraphQl:d,getConfig:g}=new s().getMethods();export{c as a,p as b,d as f,g,h,n as r,o as s}; diff --git a/scripts/__dropins__/storefront-order/chunks/formatDateToLocale.js b/scripts/__dropins__/storefront-order/chunks/formatDateToLocale.js index a6dca51049..10ee06c599 100644 --- a/scripts/__dropins__/storefront-order/chunks/formatDateToLocale.js +++ b/scripts/__dropins__/storefront-order/chunks/formatDateToLocale.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ const m=(e,a="en-US",o={})=>{const n={...{day:"2-digit",month:"2-digit",year:"numeric"},...o},t=new Date(e);return isNaN(t.getTime())?"Invalid Date":new Intl.DateTimeFormat(a,n).format(t)};export{m as f}; diff --git a/scripts/__dropins__/storefront-order/chunks/getAttributesForm.js b/scripts/__dropins__/storefront-order/chunks/getAttributesForm.js index 0600701db6..731a0a31b8 100644 --- a/scripts/__dropins__/storefront-order/chunks/getAttributesForm.js +++ b/scripts/__dropins__/storefront-order/chunks/getAttributesForm.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{h as i}from"./network-error.js";import{f as u,h as s}from"./fetch-graphql.js";import{t as m}from"./transform-attributes-form.js";const n=` query GET_ATTRIBUTES_FORM($formCode: String!) { diff --git a/scripts/__dropins__/storefront-order/chunks/getCustomerOrdersReturn.js b/scripts/__dropins__/storefront-order/chunks/getCustomerOrdersReturn.js index 6117fe0a7b..2925ae22a0 100644 --- a/scripts/__dropins__/storefront-order/chunks/getCustomerOrdersReturn.js +++ b/scripts/__dropins__/storefront-order/chunks/getCustomerOrdersReturn.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{h as R}from"./network-error.js";import{RETURNS_FRAGMENT as E,PRODUCT_DETAILS_FRAGMENT as T,PRICE_DETAILS_FRAGMENT as _,GIFT_CARD_DETAILS_FRAGMENT as o,ORDER_ITEM_DETAILS_FRAGMENT as c}from"../fragments.js";import{t as n}from"./initialize.js";import{f as u}from"./fetch-graphql.js";const m=` query GET_CUSTOMER_ORDERS_RETURN($currentPage: Int, $pageSize: Int) { diff --git a/scripts/__dropins__/storefront-order/chunks/getFormValues.js b/scripts/__dropins__/storefront-order/chunks/getFormValues.js index 7c6404646c..b8009fb976 100644 --- a/scripts/__dropins__/storefront-order/chunks/getFormValues.js +++ b/scripts/__dropins__/storefront-order/chunks/getFormValues.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ var r=(E=>(E.BOOLEAN="BOOLEAN",E.DATE="DATE",E.DATETIME="DATETIME",E.DROPDOWN="DROPDOWN",E.FILE="FILE",E.GALLERY="GALLERY",E.HIDDEN="HIDDEN",E.IMAGE="IMAGE",E.MEDIA_IMAGE="MEDIA_IMAGE",E.MULTILINE="MULTILINE",E.MULTISELECT="MULTISELECT",E.PRICE="PRICE",E.SELECT="SELECT",E.TEXT="TEXT",E.TEXTAREA="TEXTAREA",E.UNDEFINED="UNDEFINED",E.VISUAL="VISUAL",E.WEIGHT="WEIGHT",E.EMPTY="",E))(r||{});const D=E=>{if(!E)return null;const T=new FormData(E);if(E.querySelectorAll('input[type="checkbox"]').forEach(I=>{T.has(I.name)||T.set(I.name,"false"),I.checked&&T.set(I.name,"true")}),T&&typeof T.entries=="function"){const I=T.entries();if(I&&typeof I[Symbol.iterator]=="function")return JSON.parse(JSON.stringify(Object.fromEntries(I)))||{}}return{}};export{r as F,D as g}; diff --git a/scripts/__dropins__/storefront-order/chunks/getGuestOrder.js b/scripts/__dropins__/storefront-order/chunks/getGuestOrder.js index 242cdc1892..bbe0a84b49 100644 --- a/scripts/__dropins__/storefront-order/chunks/getGuestOrder.js +++ b/scripts/__dropins__/storefront-order/chunks/getGuestOrder.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{h as i}from"./network-error.js";import{f as h,h as o}from"./fetch-graphql.js";import{GUEST_ORDER_FRAGMENT as E}from"../fragments.js";import{b as n}from"./initialize.js";const G=t=>{var r,a,m,c,e,u;return{email:((a=(r=t==null?void 0:t.data)==null?void 0:r.customer)==null?void 0:a.email)||"",firstname:((c=(m=t==null?void 0:t.data)==null?void 0:m.customer)==null?void 0:c.firstname)||"",lastname:((u=(e=t==null?void 0:t.data)==null?void 0:e.customer)==null?void 0:u.lastname)||""}},f=` query GET_CUSTOMER { diff --git a/scripts/__dropins__/storefront-order/chunks/getQueryParam.js b/scripts/__dropins__/storefront-order/chunks/getQueryParam.js index 29459cba0e..e7e567dfa4 100644 --- a/scripts/__dropins__/storefront-order/chunks/getQueryParam.js +++ b/scripts/__dropins__/storefront-order/chunks/getQueryParam.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ const t=r=>{try{return new URL(window.location.href).searchParams.get(r)??""}catch{return""}};export{t as g}; diff --git a/scripts/__dropins__/storefront-order/chunks/getStoreConfig.js b/scripts/__dropins__/storefront-order/chunks/getStoreConfig.js index a164a243a7..4337058dc4 100644 --- a/scripts/__dropins__/storefront-order/chunks/getStoreConfig.js +++ b/scripts/__dropins__/storefront-order/chunks/getStoreConfig.js @@ -1,6 +1,6 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{f as s,h as i}from"./fetch-graphql.js";function o(e){return e?{baseMediaUrl:e.base_media_url,orderCancellationEnabled:e.order_cancellation_enabled,orderCancellationReasons:e.order_cancellation_reasons,shoppingCartDisplayPrice:e.orders_invoices_credit_memos_display_price,shoppingOrdersDisplaySubtotal:e.orders_invoices_credit_memos_display_subtotal,shoppingOrdersDisplayShipping:e.orders_invoices_credit_memos_display_shipping_amount,shoppingOrdersDisplayGrandTotal:e.orders_invoices_credit_memos_display_grandtotal,shoppingOrdersDisplayFullSummary:e.orders_invoices_credit_memos_display_full_summary,shoppingOrdersDisplayZeroTax:e.orders_invoices_credit_memos_display_zero_tax}:null}const _=` +import{f as s,h as i}from"./fetch-graphql.js";function o(e){return e?{baseMediaUrl:e.base_media_url,orderCancellationEnabled:e.order_cancellation_enabled,orderCancellationReasons:e.order_cancellation_reasons,shoppingOrderDisplayPrice:e.orders_invoices_credit_memos_display_price,shoppingOrdersDisplaySubtotal:e.orders_invoices_credit_memos_display_subtotal,shoppingOrdersDisplayShipping:e.orders_invoices_credit_memos_display_shipping_amount,shoppingOrdersDisplayGrandTotal:e.orders_invoices_credit_memos_display_grandtotal,shoppingOrdersDisplayFullSummary:e.orders_invoices_credit_memos_display_full_summary,shoppingOrdersDisplayZeroTax:e.orders_invoices_credit_memos_display_zero_tax}:null}const _=` query STORE_CONFIG_QUERY { storeConfig { order_cancellation_enabled diff --git a/scripts/__dropins__/storefront-order/chunks/initialize.js b/scripts/__dropins__/storefront-order/chunks/initialize.js index c0cf6c4ba5..c1be8eca93 100644 --- a/scripts/__dropins__/storefront-order/chunks/initialize.js +++ b/scripts/__dropins__/storefront-order/chunks/initialize.js @@ -1,6 +1,6 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{merge as Q,Initializer as na}from"@dropins/tools/lib.js";import{events as v}from"@dropins/tools/event-bus.js";import{a as ta,h as x}from"./network-error.js";import{PRODUCT_DETAILS_FRAGMENT as K,PRICE_DETAILS_FRAGMENT as j,GIFT_CARD_DETAILS_FRAGMENT as H,ORDER_ITEM_DETAILS_FRAGMENT as J,BUNDLE_ORDER_ITEM_DETAILS_FRAGMENT as V,ORDER_SUMMARY_FRAGMENT as W,ADDRESS_FRAGMENT as X,RETURNS_FRAGMENT as Z}from"../fragments.js";import{f as m,h as _a}from"./fetch-graphql.js";const ua=a=>a||0,ia=a=>{var n,t,_;return{...a,canonicalUrl:(a==null?void 0:a.canonical_url)||"",urlKey:(a==null?void 0:a.url_key)||"",id:(a==null?void 0:a.uid)||"",name:(a==null?void 0:a.name)||"",sku:(a==null?void 0:a.sku)||"",image:((n=a==null?void 0:a.image)==null?void 0:n.url)||"",productType:(a==null?void 0:a.__typename)||"",thumbnail:{label:((t=a==null?void 0:a.thumbnail)==null?void 0:t.label)||"",url:((_=a==null?void 0:a.thumbnail)==null?void 0:_.url)||""}}},sa=a=>{if(!a||!("selected_options"in a))return;const n={};for(const t of a.selected_options)n[t.label]=t.value;return n},la=a=>{const n=a==null?void 0:a.map(_=>({uid:_.uid,label:_.label,values:_.values.map(i=>i.product_name).join(", ")})),t={};return n==null||n.forEach(_=>{t[_.label]=_.values}),Object.keys(t).length>0?t:null},ea=a=>(a==null?void 0:a.length)>0?{count:a.length,result:a.map(n=>n.title).join(", ")}:null,ca=a=>({quantityCanceled:(a==null?void 0:a.quantity_canceled)??0,quantityInvoiced:(a==null?void 0:a.quantity_invoiced)??0,quantityOrdered:(a==null?void 0:a.quantity_ordered)??0,quantityRefunded:(a==null?void 0:a.quantity_refunded)??0,quantityReturned:(a==null?void 0:a.quantity_returned)??0,quantityShipped:(a==null?void 0:a.quantity_shipped)??0,quantityReturnRequested:(a==null?void 0:a.quantity_return_requested)??0}),I=a=>a==null?void 0:a.filter(n=>n.__typename).map(n=>{var T,c,R,O,N,b,h,g,r,D,u,A,y,p,G,f,F,S,C,q,d,k,B,$,U,w,o,P,z,Y;const{quantityCanceled:t,quantityInvoiced:_,quantityOrdered:i,quantityRefunded:s,quantityReturned:l,quantityShipped:e,quantityReturnRequested:E}=ca(n);return{type:n==null?void 0:n.__typename,eligibleForReturn:n==null?void 0:n.eligible_for_return,productSku:n==null?void 0:n.product_sku,productName:n.product_name,productUrlKey:n.product_url_key,quantityCanceled:t,quantityInvoiced:_,quantityOrdered:i,quantityRefunded:s,quantityReturned:l,quantityShipped:e,quantityReturnRequested:E,id:n==null?void 0:n.id,discounted:((O=(R=(c=(T=n==null?void 0:n.product)==null?void 0:T.price_range)==null?void 0:c.maximum_price)==null?void 0:R.regular_price)==null?void 0:O.value)*(n==null?void 0:n.quantity_ordered)!==((N=n==null?void 0:n.product_sale_price)==null?void 0:N.value)*(n==null?void 0:n.quantity_ordered),total:{value:((b=n==null?void 0:n.product_sale_price)==null?void 0:b.value)*(n==null?void 0:n.quantity_ordered)||0,currency:((h=n==null?void 0:n.product_sale_price)==null?void 0:h.currency)||""},totalInclTax:{value:((g=n==null?void 0:n.product_sale_price)==null?void 0:g.value)*(n==null?void 0:n.quantity_ordered)||0,currency:(r=n==null?void 0:n.product_sale_price)==null?void 0:r.currency},price:{value:((D=n==null?void 0:n.product_sale_price)==null?void 0:D.value)||0,currency:(u=n==null?void 0:n.product_sale_price)==null?void 0:u.currency},priceInclTax:{value:((A=n==null?void 0:n.product_sale_price)==null?void 0:A.value)||0,currency:(y=n==null?void 0:n.product_sale_price)==null?void 0:y.currency},totalQuantity:ua(n==null?void 0:n.quantity_ordered),regularPrice:{value:(F=(f=(G=(p=n==null?void 0:n.product)==null?void 0:p.price_range)==null?void 0:G.maximum_price)==null?void 0:f.regular_price)==null?void 0:F.value,currency:(d=(q=(C=(S=n==null?void 0:n.product)==null?void 0:S.price_range)==null?void 0:C.maximum_price)==null?void 0:q.regular_price)==null?void 0:d.currency},product:ia(n==null?void 0:n.product),thumbnail:{label:((B=(k=n==null?void 0:n.product)==null?void 0:k.thumbnail)==null?void 0:B.label)||"",url:((U=($=n==null?void 0:n.product)==null?void 0:$.thumbnail)==null?void 0:U.url)||""},giftCard:(n==null?void 0:n.__typename)==="GiftCardOrderItem"?{senderName:((w=n.gift_card)==null?void 0:w.sender_name)||"",senderEmail:((o=n.gift_card)==null?void 0:o.sender_email)||"",recipientEmail:((P=n.gift_card)==null?void 0:P.recipient_email)||"",recipientName:((z=n.gift_card)==null?void 0:z.recipient_name)||"",message:((Y=n.gift_card)==null?void 0:Y.message)||""}:void 0,configurableOptions:sa(n),bundleOptions:n.__typename==="BundleOrderItem"?la(n.bundle_options):null,itemPrices:n.prices,downloadableLinks:n.__typename==="DownloadableOrderItem"?ea(n==null?void 0:n.downloadable_links):null}}),L=(a,n)=>{var O,N,b,h,g,r,D,u,A;const t=I(a.items),_=((O=Ea(a==null?void 0:a.returns))==null?void 0:O.ordersReturn)??[],i=n?_.filter(y=>y.returnNumber===n):_,{total:s,...l}=ta({...a,items:t,returns:i},"camelCase",{applied_coupons:"coupons",__typename:"__typename",firstname:"firstName",middlename:"middleName",lastname:"lastName",postcode:"postCode",payment_methods:"payments"}),e=(N=a==null?void 0:a.payment_methods)==null?void 0:N[0],E=(e==null?void 0:e.type)||"",T=(e==null?void 0:e.name)||"",c=(b=l==null?void 0:l.items)==null?void 0:b.reduce((y,p)=>y+(p==null?void 0:p.totalQuantity),0),R={...s,...l,totalQuantity:c,shipping:{amount:((h=s==null?void 0:s.totalShipping)==null?void 0:h.value)??0,currency:((g=s==null?void 0:s.totalShipping)==null?void 0:g.currency)||"",code:l.shippingMethod??""},payments:[{code:E,name:T}]};return Q(R,(A=(u=(D=(r=M==null?void 0:M.getConfig())==null?void 0:r.models)==null?void 0:D.OrderDataModel)==null?void 0:u.transformer)==null?void 0:A.call(u,a))},Ra=(a,n,t)=>{var _,i,s,l,e,E,T;if((l=(s=(i=(_=n==null?void 0:n.data)==null?void 0:_.customer)==null?void 0:i.orders)==null?void 0:s.items)!=null&&l.length&&a==="orderData"){const c=(T=(E=(e=n==null?void 0:n.data)==null?void 0:e.customer)==null?void 0:E.orders)==null?void 0:T.items[0];return L(c,t)}return null},Ea=a=>{var s,l,e,E,T;if(!((s=a==null?void 0:a.items)!=null&&s.length))return null;const n=a==null?void 0:a.items,t=a==null?void 0:a.page_info,i={ordersReturn:[...n].sort((c,R)=>+R.number-+c.number).map(c=>{var r,D;const{order:R,status:O,number:N,created_at:b}=c,h=((D=(r=c==null?void 0:c.shipping)==null?void 0:r.tracking)==null?void 0:D.map(u=>{const{status:A,carrier:y,tracking_number:p}=u;return{status:A,carrier:y,trackingNumber:p}}))??[],g=c.items.map(u=>{var S;const A=u==null?void 0:u.quantity,y=u==null?void 0:u.status,p=u==null?void 0:u.request_quantity,G=u==null?void 0:u.uid,f=u==null?void 0:u.order_item,F=((S=I([f]))==null?void 0:S.reduce((C,q)=>q,{}))??{};return{uid:G,quantity:A,status:y,requestQuantity:p,...F}});return{createdReturnAt:b,returnStatus:O,token:R==null?void 0:R.token,orderNumber:R==null?void 0:R.number,returnNumber:N,items:g,tracking:h}}),...t?{pageInfo:{pageSize:t.page_size,totalPages:t.total_pages,currentPage:t.current_page}}:{}};return Q(i,(T=(E=(e=(l=M==null?void 0:M.getConfig())==null?void 0:l.models)==null?void 0:e.CustomerOrdersReturnModel)==null?void 0:E.transformer)==null?void 0:T.call(E,{...n,...t}))},Sa=(a,n)=>{var _,i;if(!((_=a==null?void 0:a.data)!=null&&_.guestOrder))return null;const t=(i=a==null?void 0:a.data)==null?void 0:i.guestOrder;return L(t,n)},Ta=(a,n)=>{var _,i;if(!((_=a==null?void 0:a.data)!=null&&_.guestOrderByToken))return null;const t=(i=a==null?void 0:a.data)==null?void 0:i.guestOrderByToken;return L(t,n)},ya=` +import{merge as z,Initializer as m}from"@dropins/tools/lib.js";import{events as L}from"@dropins/tools/event-bus.js";import{h as Y}from"./network-error.js";import{PRODUCT_DETAILS_FRAGMENT as Q,PRICE_DETAILS_FRAGMENT as K,GIFT_CARD_DETAILS_FRAGMENT as j,ORDER_ITEM_DETAILS_FRAGMENT as P,BUNDLE_ORDER_ITEM_DETAILS_FRAGMENT as D,ORDER_SUMMARY_FRAGMENT as V,ADDRESS_FRAGMENT as X,RETURNS_FRAGMENT as H}from"../fragments.js";import{f as J,h as o}from"./fetch-graphql.js";const r=n=>n||0,I=n=>{var i,u,_,l,c,s,E,y,T;return{__typename:(n==null?void 0:n.__typename)||"",uid:(n==null?void 0:n.uid)||"",onlyXLeftInStock:(n==null?void 0:n.only_x_left_in_stock)??0,stockStatus:(n==null?void 0:n.stock_status)??"",priceRange:{maximumPrice:{regularPrice:{currency:((_=(u=(i=n==null?void 0:n.price_range)==null?void 0:i.maximum_price)==null?void 0:u.regular_price)==null?void 0:_.currency)??"",value:((s=(c=(l=n==null?void 0:n.price_range)==null?void 0:l.maximum_price)==null?void 0:c.regular_price)==null?void 0:s.value)??0}}},canonicalUrl:(n==null?void 0:n.canonical_url)??"",urlKey:(n==null?void 0:n.url_key)||"",id:(n==null?void 0:n.uid)??"",name:(n==null?void 0:n.name)||"",sku:(n==null?void 0:n.sku)||"",image:((E=n==null?void 0:n.image)==null?void 0:E.url)||"",productType:(n==null?void 0:n.__typename)||"",thumbnail:{label:((y=n==null?void 0:n.thumbnail)==null?void 0:y.label)||"",url:((T=n==null?void 0:n.thumbnail)==null?void 0:T.url)||""}}},d=n=>{if(!n||!("selected_options"in n))return;const i={};for(const u of n.selected_options)i[u.label]=u.value;return i},nn=n=>{const i=n==null?void 0:n.map(_=>({uid:_.uid,label:_.label,values:_.values.map(l=>l.product_name).join(", ")})),u={};return i==null||i.forEach(_=>{u[_.label]=_.values}),Object.keys(u).length>0?u:null},un=n=>(n==null?void 0:n.length)>0?{count:n.length,result:n.map(i=>i.title).join(", ")}:null,_n=n=>({quantityCanceled:(n==null?void 0:n.quantity_canceled)??0,quantityInvoiced:(n==null?void 0:n.quantity_invoiced)??0,quantityOrdered:(n==null?void 0:n.quantity_ordered)??0,quantityRefunded:(n==null?void 0:n.quantity_refunded)??0,quantityReturned:(n==null?void 0:n.quantity_returned)??0,quantityShipped:(n==null?void 0:n.quantity_shipped)??0,quantityReturnRequested:(n==null?void 0:n.quantity_return_requested)??0}),ln=n=>({firstName:(n==null?void 0:n.firstname)??"",lastName:(n==null?void 0:n.lastname)??"",middleName:(n==null?void 0:n.middlename)??""}),$=n=>{const{firstName:i,lastName:u,middleName:_}=ln(n);return{firstName:i,lastName:u,middleName:_,city:(n==null?void 0:n.city)??"",company:(n==null?void 0:n.company)??"",country:(n==null?void 0:n.country)??"",countryCode:(n==null?void 0:n.country_code)??"",fax:(n==null?void 0:n.fax)??"",postCode:(n==null?void 0:n.postcode)??"",prefix:(n==null?void 0:n.prefix)??"",region:(n==null?void 0:n.region)??"",regionId:(n==null?void 0:n.region_id)??"",street:(n==null?void 0:n.street)??[],suffix:(n==null?void 0:n.suffix)??"",telephone:(n==null?void 0:n.telephone)??"",vatId:(n==null?void 0:n.vat_id)??"",customAttributes:(n==null?void 0:n.custom_attributes)??[]}},cn=n=>{const i={value:0,currency:"USD"};return{grandTotal:(n==null?void 0:n.grand_total)??i,totalGiftcard:(n==null?void 0:n.total_giftcard)??i,subtotalExclTax:(n==null?void 0:n.subtotal_excl_tax)??i,subtotalInclTax:(n==null?void 0:n.subtotal_incl_tax)??i,taxes:(n==null?void 0:n.taxes)??[],totalTax:(n==null?void 0:n.total_tax)??i,totalShipping:(n==null?void 0:n.total_shipping)??i,discounts:(n==null?void 0:n.discounts)??[]}},w=n=>{const i={value:0,currency:"USD"},u=(n==null?void 0:n.prices)??{};return{price:(u==null?void 0:u.price)??i,priceIncludingTax:(u==null?void 0:u.price_including_tax)??i,originalPrice:(u==null?void 0:u.original_price)??i,originalPriceIncludingTax:(u==null?void 0:u.original_price_including_tax)??i,discounts:(u==null?void 0:u.discounts)??[]}},an=(n,i,u)=>{const _=n==null?void 0:n.price,l=n==null?void 0:n.priceIncludingTax,c=n==null?void 0:n.originalPrice,s=u?c==null?void 0:c.value:l==null?void 0:l.value,E={originalPrice:c,baseOriginalPrice:{value:s,currency:c==null?void 0:c.currency},baseDiscountedPrice:{value:l==null?void 0:l.value,currency:l==null?void 0:l.currency},baseExcludingTax:{value:_==null?void 0:_.value,currency:_==null?void 0:_.currency}},y={originalPrice:c,baseOriginalPrice:{value:c==null?void 0:c.value,currency:l==null?void 0:l.currency},baseDiscountedPrice:{value:i==null?void 0:i.value,currency:_==null?void 0:_.currency},baseExcludingTax:{value:_==null?void 0:_.value,currency:_==null?void 0:_.currency}},T={singleItemPrice:{value:u?c.value:l.value,currency:l.currency},baseOriginalPrice:{value:s,currency:l.currency},baseDiscountedPrice:{value:l.value,currency:l.currency}};return{includeAndExcludeTax:E,excludeTax:y,includeTax:T}},tn=n=>{var i,u,_,l,c;return{senderName:((i=n.gift_card)==null?void 0:i.sender_name)||"",senderEmail:((u=n.gift_card)==null?void 0:u.sender_email)||"",recipientEmail:((_=n.gift_card)==null?void 0:_.recipient_email)||"",recipientName:((l=n.gift_card)==null?void 0:l.recipient_name)||"",message:((c=n.gift_card)==null?void 0:c.message)||""}},sn=n=>{var i,u,_,l;return{label:((u=(i=n==null?void 0:n.product)==null?void 0:i.thumbnail)==null?void 0:u.label)||"",url:((l=(_=n==null?void 0:n.product)==null?void 0:_.thumbnail)==null?void 0:l.url)||""}},W=n=>{var G,e,F,q,x,f,N,t,A,h,O,S,v,M,p,k,g,b;const{quantityCanceled:i,quantityInvoiced:u,quantityOrdered:_,quantityRefunded:l,quantityReturned:c,quantityShipped:s,quantityReturnRequested:E}=_n(n),y=w(n),T=((G=n==null?void 0:n.prices)==null?void 0:G.original_price.value)*(n==null?void 0:n.quantity_ordered)>((e=n==null?void 0:n.prices)==null?void 0:e.price.value)*(n==null?void 0:n.quantity_ordered),a=r(n==null?void 0:n.quantity_ordered),R={value:((F=n==null?void 0:n.product_sale_price)==null?void 0:F.value)||0,currency:(q=n==null?void 0:n.product_sale_price)==null?void 0:q.currency};return{selectedOptions:(n==null?void 0:n.selected_options)??[],productSalePrice:n==null?void 0:n.product_sale_price,status:(n==null?void 0:n.status)??"",type:n==null?void 0:n.__typename,eligibleForReturn:(n==null?void 0:n.eligible_for_return)??!1,productSku:(n==null?void 0:n.product_sku)??"",productName:(n==null?void 0:n.product_name)??"",productUrlKey:(n==null?void 0:n.product_url_key)??"",quantityCanceled:i,quantityInvoiced:u,quantityOrdered:_,quantityRefunded:l,quantityReturned:c,quantityShipped:s,quantityReturnRequested:E,id:n==null?void 0:n.id,discounted:T,total:{value:((x=n==null?void 0:n.product_sale_price)==null?void 0:x.value)*(n==null?void 0:n.quantity_ordered)||0,currency:((f=n==null?void 0:n.product_sale_price)==null?void 0:f.currency)||""},totalInclTax:{value:((N=n==null?void 0:n.product_sale_price)==null?void 0:N.value)*(n==null?void 0:n.quantity_ordered)||0,currency:(t=n==null?void 0:n.product_sale_price)==null?void 0:t.currency},price:R,prices:w(n),itemPrices:y,taxCalculations:an(y,R,T),priceInclTax:{value:((A=n==null?void 0:n.product_sale_price)==null?void 0:A.value)??0,currency:(h=n==null?void 0:n.product_sale_price)==null?void 0:h.currency},totalQuantity:a,regularPrice:{value:(M=(v=(S=(O=n==null?void 0:n.product)==null?void 0:O.price_range)==null?void 0:S.maximum_price)==null?void 0:v.regular_price)==null?void 0:M.value,currency:(b=(g=(k=(p=n==null?void 0:n.product)==null?void 0:p.price_range)==null?void 0:k.maximum_price)==null?void 0:g.regular_price)==null?void 0:b.currency},product:I(n==null?void 0:n.product),thumbnail:sn(n),giftCard:(n==null?void 0:n.__typename)==="GiftCardOrderItem"?tn(n):void 0,configurableOptions:d(n),bundleOptions:n.__typename==="BundleOrderItem"?nn(n.bundle_options):null,downloadableLinks:n.__typename==="DownloadableOrderItem"?un(n==null?void 0:n.downloadable_links):null}},U=n=>n==null?void 0:n.filter(i=>i.__typename).map(i=>W(i)),Rn=n=>({token:(n==null?void 0:n.token)??"",email:(n==null?void 0:n.email)??"",status:(n==null?void 0:n.status)??"",number:(n==null?void 0:n.number)??"",id:(n==null?void 0:n.id)??"",carrier:n.carrier??"",coupons:(n==null?void 0:n.applied_coupons)??[],orderDate:(n==null?void 0:n.order_date)??"",isVirtual:(n==null?void 0:n.is_virtual)??!1,availableActions:(n==null?void 0:n.available_actions)??[],orderStatusChangeDate:(n==null?void 0:n.order_status_change_date)??"",shippingMethod:(n==null?void 0:n.shipping_method)??""}),B=(n,i)=>{var t,A,h,O,S,v,M,p,k;const u=Rn(n),_=$(n==null?void 0:n.billing_address),l=$(n==null?void 0:n.shipping_address),c=(t=n.shipments)==null?void 0:t.map(g=>({...g,items:g.items.map(b=>({id:b.id,productName:b.product_name,productSku:b.product_sku,quantityShipped:b.quantity_shipped,orderItem:W(b.order_item)}))})),s=U(n.items),E=((A=En(n==null?void 0:n.returns))==null?void 0:A.ordersReturn)??[],y=i?E.filter(g=>g.returnNumber===i):E,T=U(n.items_eligible_for_return),a=cn(n==null?void 0:n.total),R=(h=n==null?void 0:n.payment_methods)==null?void 0:h[0],G=n==null?void 0:n.shipping_method,e=s==null?void 0:s.reduce((g,b)=>g+(b==null?void 0:b.totalQuantity),0),F={amount:((O=a==null?void 0:a.totalShipping)==null?void 0:O.value)??0,currency:((S=a==null?void 0:a.totalShipping)==null?void 0:S.currency)||"",code:(u==null?void 0:u.shippingMethod)??""},q=[{code:(R==null?void 0:R.type)??"",name:(R==null?void 0:R.name)??""}],x=a==null?void 0:a.subtotalExclTax,f=a==null?void 0:a.subtotalInclTax,N={...u,...a,subtotalExclTax:x,subtotalInclTax:f,billingAddress:_,shippingAddress:l,shipments:c,items:s,returns:y,itemsEligibleForReturn:T,totalQuantity:e,shippingMethod:G,shipping:F,payments:q};return z(N,(k=(p=(M=(v=C==null?void 0:C.getConfig())==null?void 0:v.models)==null?void 0:M.OrderDataModel)==null?void 0:p.transformer)==null?void 0:k.call(p,n))},yn=(n,i,u)=>{var _,l,c,s,E,y,T;if((s=(c=(l=(_=i==null?void 0:i.data)==null?void 0:_.customer)==null?void 0:l.orders)==null?void 0:c.items)!=null&&s.length&&n==="orderData"){const a=(T=(y=(E=i==null?void 0:i.data)==null?void 0:E.customer)==null?void 0:y.orders)==null?void 0:T.items[0];return B(a,u)}return null},En=n=>{var c,s,E,y,T;if(!((c=n==null?void 0:n.items)!=null&&c.length))return null;const i=n==null?void 0:n.items,u=n==null?void 0:n.page_info,l={ordersReturn:[...i].sort((a,R)=>+R.number-+a.number).map(a=>{var f,N;const{order:R,status:G,number:e,created_at:F}=a,q=((N=(f=a==null?void 0:a.shipping)==null?void 0:f.tracking)==null?void 0:N.map(t=>{const{status:A,carrier:h,tracking_number:O}=t;return{status:A,carrier:h,trackingNumber:O}}))??[],x=a.items.map(t=>{var p;const A=t==null?void 0:t.quantity,h=t==null?void 0:t.status,O=t==null?void 0:t.request_quantity,S=t==null?void 0:t.uid,v=t==null?void 0:t.order_item,M=((p=U([v]))==null?void 0:p.reduce((k,g)=>g,{}))??{};return{uid:S,quantity:A,status:h,requestQuantity:O,...M}});return{createdReturnAt:F,returnStatus:G,token:R==null?void 0:R.token,orderNumber:R==null?void 0:R.number,returnNumber:e,items:x,tracking:q}}),...u?{pageInfo:{pageSize:u.page_size,totalPages:u.total_pages,currentPage:u.current_page}}:{}};return z(l,(T=(y=(E=(s=C==null?void 0:C.getConfig())==null?void 0:s.models)==null?void 0:E.CustomerOrdersReturnModel)==null?void 0:y.transformer)==null?void 0:T.call(y,{...i,...u}))},Gn=(n,i)=>{var _,l;if(!((_=n==null?void 0:n.data)!=null&&_.guestOrder))return null;const u=(l=n==null?void 0:n.data)==null?void 0:l.guestOrder;return B(u,i)},Tn=(n,i)=>{var _,l;if(!((_=n==null?void 0:n.data)!=null&&_.guestOrderByToken))return null;const u=(l=n==null?void 0:n.data)==null?void 0:l.guestOrderByToken;return B(u,i)},bn=` query ORDER_BY_NUMBER($orderNumber: String!, $pageSize: Int) { customer { orders(filter: { number: { eq: $orderNumber } }) { @@ -104,15 +104,15 @@ import{merge as Q,Initializer as na}from"@dropins/tools/lib.js";import{events as } } } + ${Q} ${K} ${j} - ${H} - ${J} + ${P} + ${D} ${V} - ${W} ${X} - ${Z} -`,pa=async({orderId:a,returnRef:n,queryType:t,returnsPageSize:_=50})=>await m(ya,{method:"GET",cache:"force-cache",variables:{orderNumber:a,pageSize:_}}).then(i=>Ra(t??"orderData",i,n)).catch(x),Aa=` + ${H} +`,gn=async({orderId:n,returnRef:i,queryType:u,returnsPageSize:_=50})=>await J(bn,{method:"GET",cache:"force-cache",variables:{orderNumber:n,pageSize:_}}).then(l=>yn(u??"orderData",l,i)).catch(Y),pn=` query ORDER_BY_TOKEN($token: String!) { guestOrderByToken(input: { token: $token }) { email @@ -201,12 +201,12 @@ import{merge as Q,Initializer as na}from"@dropins/tools/lib.js";import{events as } } } + ${Q} ${K} ${j} - ${H} - ${J} + ${P} + ${D} ${V} - ${W} ${X} - ${Z} -`,ra=async(a,n)=>await m(Aa,{method:"GET",cache:"no-cache",variables:{token:a}}).then(t=>{var _;return(_=t.errors)!=null&&_.length&&t.errors[0].message==="Please login to view the order."?_a(t.errors):Ta(t,n)}).catch(x),Da="orderData",Oa=async a=>{var l;const n=typeof(a==null?void 0:a.orderRef)=="string"?a==null?void 0:a.orderRef:"",t=typeof(a==null?void 0:a.returnRef)=="string"?a==null?void 0:a.returnRef:"",_=n&&typeof(a==null?void 0:a.orderRef)=="string"&&((l=a==null?void 0:a.orderRef)==null?void 0:l.length)>20,i=(a==null?void 0:a.orderData)??null;if(i){v.emit("order/data",{...i,returnNumber:t});return}if(!n)return;const s=_?await ra(n,t):await pa({orderId:n,returnRef:t,queryType:Da});s?v.emit("order/data",{...s,returnNumber:t}):v.emit("order/error",{source:"order",type:"network",error:"The data was not received."})},aa=new na({init:async a=>{const n={};aa.config.setConfig({...n,...a}),Oa(a).catch(console.error)},listeners:()=>[]}),M=aa.config;export{L as a,Sa as b,ra as c,M as d,pa as g,aa as i,Ea as t}; + ${H} +`,An=async(n,i)=>await J(pn,{method:"GET",cache:"no-cache",variables:{token:n}}).then(u=>{var _;return(_=u.errors)!=null&&_.length&&u.errors[0].message==="Please login to view the order."?o(u.errors):Tn(u,i)}).catch(Y),hn="orderData",On=async n=>{var s;const i=typeof(n==null?void 0:n.orderRef)=="string"?n==null?void 0:n.orderRef:"",u=typeof(n==null?void 0:n.returnRef)=="string"?n==null?void 0:n.returnRef:"",_=i&&typeof(n==null?void 0:n.orderRef)=="string"&&((s=n==null?void 0:n.orderRef)==null?void 0:s.length)>20,l=(n==null?void 0:n.orderData)??null;if(l){L.emit("order/data",{...l,returnNumber:u});return}if(!i)return;const c=_?await An(i,u):await gn({orderId:i,returnRef:u,queryType:hn});c?L.emit("order/data",{...c,returnNumber:u}):L.emit("order/error",{source:"order",type:"network",error:"The data was not received."})},Z=new m({init:async n=>{const i={};Z.config.setConfig({...i,...n}),On(n??{}).catch(console.error)},listeners:()=>[]}),C=Z.config;export{B as a,Gn as b,An as c,C as d,gn as g,Z as i,En as t}; diff --git a/scripts/__dropins__/storefront-order/chunks/network-error.js b/scripts/__dropins__/storefront-order/chunks/network-error.js index ba4dbbfadd..4f339a093e 100644 --- a/scripts/__dropins__/storefront-order/chunks/network-error.js +++ b/scripts/__dropins__/storefront-order/chunks/network-error.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{events as f}from"@dropins/tools/event-bus.js";const l=r=>r.replace(/_([a-z])/g,(s,e)=>e.toUpperCase()),i=r=>r.replace(/([A-Z])/g,s=>`_${s.toLowerCase()}`),u=(r,s,e)=>{const c=["string","boolean","number"],a=s==="camelCase"?l:i;return Array.isArray(r)?r.map(o=>c.includes(typeof o)||o===null?o:typeof o=="object"?u(o,s,e):o):r!==null&&typeof r=="object"?Object.entries(r).reduce((o,[t,n])=>{const p=e&&e[t]?e[t]:a(t);return o[p]=c.includes(typeof n)||n===null?n:u(n,s,e),o},{}):r},C=r=>{const s=r instanceof DOMException&&r.name==="AbortError",e=r.name==="PlaceOrderError";throw!s&&!e&&f.emit("order/error",{source:"auth",type:"network",error:r.message}),r};export{u as a,l as c,C as h}; +import{events as t}from"@dropins/tools/event-bus.js";const s=r=>{const e=r instanceof DOMException&&r.name==="AbortError",o=r.name==="PlaceOrderError";throw!e&&!o&&t.emit("order/error",{source:"auth",type:"network",error:r.message}),r};export{s as h}; diff --git a/scripts/__dropins__/storefront-order/chunks/redirectTo.js b/scripts/__dropins__/storefront-order/chunks/redirectTo.js index 70554833ed..c8260a2e9d 100644 --- a/scripts/__dropins__/storefront-order/chunks/redirectTo.js +++ b/scripts/__dropins__/storefront-order/chunks/redirectTo.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ const a=(e,n,r)=>{if(typeof e!="function")return;const t=e(r);if(!n||Object.keys(n).length===0){window.location.href=t;return}const o=new URLSearchParams;Object.entries(n).forEach(([i,s])=>{o.append(i,String(s))});const c=t.includes("?")?"&":"?";window.location.href=`${t}${c}${o.toString()}`};export{a as r}; diff --git a/scripts/__dropins__/storefront-order/chunks/requestGuestOrderCancel.js b/scripts/__dropins__/storefront-order/chunks/requestGuestOrderCancel.js index 93660ac157..b439488820 100644 --- a/scripts/__dropins__/storefront-order/chunks/requestGuestOrderCancel.js +++ b/scripts/__dropins__/storefront-order/chunks/requestGuestOrderCancel.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{PRODUCT_DETAILS_FRAGMENT as d,PRICE_DETAILS_FRAGMENT as s,GIFT_CARD_DETAILS_FRAGMENT as i,ORDER_ITEM_DETAILS_FRAGMENT as A,BUNDLE_ORDER_ITEM_DETAILS_FRAGMENT as D,ORDER_SUMMARY_FRAGMENT as c,ADDRESS_FRAGMENT as u,GUEST_ORDER_FRAGMENT as G}from"../fragments.js";import{f as a,h as R}from"./fetch-graphql.js";import{a as T}from"./initialize.js";const N=` mutation CANCEL_ORDER_MUTATION($orderId: ID!, $reason: String!) { diff --git a/scripts/__dropins__/storefront-order/chunks/requestGuestReturn.js b/scripts/__dropins__/storefront-order/chunks/requestGuestReturn.js index 4ace23884e..d12b56f0a3 100644 --- a/scripts/__dropins__/storefront-order/chunks/requestGuestReturn.js +++ b/scripts/__dropins__/storefront-order/chunks/requestGuestReturn.js @@ -1,6 +1,6 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{h as i,a as _}from"./network-error.js";import{f as o,h as s}from"./fetch-graphql.js";import{t as d}from"./transform-attributes-form.js";import{REQUEST_RETURN_ORDER_FRAGMENT as m}from"../fragments.js";import{merge as l}from"@dropins/tools/lib.js";import{d as f}from"./initialize.js";const h=r=>{var a,n,E,c,R,T;if(!((n=(a=r==null?void 0:r.data)==null?void 0:a.requestReturn)!=null&&n.return))return{};const{created_at:e,...t}=r.data.requestReturn.return,u={...t,createdAt:e};return l(u,(T=(R=(c=(E=f.getConfig())==null?void 0:E.models)==null?void 0:c.RequestReturnModel)==null?void 0:R.transformer)==null?void 0:T.call(R,r.data.requestReturn.return))},U=` +import{h as i}from"./network-error.js";import{f as o,h as s}from"./fetch-graphql.js";import{t as d,a as _}from"./transform-attributes-form.js";import{REQUEST_RETURN_ORDER_FRAGMENT as m}from"../fragments.js";import{merge as l}from"@dropins/tools/lib.js";import{d as f}from"./initialize.js";const h=r=>{var a,n,E,c,R,T;if(!((n=(a=r==null?void 0:r.data)==null?void 0:a.requestReturn)!=null&&n.return))return{};const{created_at:e,...t}=r.data.requestReturn.return,u={...t,createdAt:e};return l(u,(T=(R=(c=(E=f.getConfig())==null?void 0:E.models)==null?void 0:c.RequestReturnModel)==null?void 0:R.transformer)==null?void 0:T.call(R,r.data.requestReturn.return))},U=` query GET_ATTRIBUTES_LIST($entityType: AttributeEntityTypeEnum!) { attributesList(entityType: $entityType) { items { diff --git a/scripts/__dropins__/storefront-order/chunks/returnOrdersHelper.js b/scripts/__dropins__/storefront-order/chunks/returnOrdersHelper.js index 07dcb6203f..22c6285527 100644 --- a/scripts/__dropins__/storefront-order/chunks/returnOrdersHelper.js +++ b/scripts/__dropins__/storefront-order/chunks/returnOrdersHelper.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{g as p,F as c}from"./getFormValues.js";const d={PENDING:"pending",AUTHORIZED:"authorized",PARTIALLY_AUTHORIZED:"partiallyAuthorized",RECEIVED:"received",PARTIALLY_RECEIVED:"partiallyReceived",APPROVED:"approved",PARTIALLY_APPROVED:"partiallyApproved",REJECTED:"rejected",PARTIALLY_REJECTED:"partiallyRejected",DENIED:"denied",PROCESSED_AND_CLOSED:"processedAndClosed",CLOSED:"closed"},u=(t,n)=>({id:`${t.id}_${t.fieldType}_${n+1}`,name:`${t.name}_${t.fieldType}_${n+1}`,code:`${t.code}_${t.fieldType}_${n+1}`,customUpperCode:`${t.customUpperCode}_${t.fieldType}_${n+1}`}),l=t=>{const n={};return!t||typeof t!="object"||Object.keys(t).length===0||Object.keys(t).forEach(e=>{if(/_(\d+)$/.exec(e)){const s=e==null?void 0:e.replace(/_\d+$/,"");n[s]=t[e]}else n[e]=t[e]}),n},f=(t,n)=>t.map(e=>({...e,...u(e,n)})),A=(t,n)=>t==null?void 0:t.flatMap(e=>Array.from({length:n},(i,s)=>({...e,...u(e,s)}))),E=t=>{const n=[],e=[];return Object.entries(t).forEach(([i,s])=>{const r=i.lastIndexOf("_"),o=i.slice(0,r),a=i.slice(r+1);a===c.MULTISELECT||a===c.SELECT?n.push({attributeCode:o,value:s}):e.push({attributeCode:o,value:s})}),{selectedCustomAttributes:n,enteredCustomAttributes:e}},C=t=>typeof t!="string"?"":d[t]??"",R=t=>{var e;const n=[];if(t!=null&&t.current.length)for(const{current:i}of t.current){if(!i)continue;const s=i.name.replace(/_\d+$/,""),r=((e=i==null?void 0:i.dataset)==null?void 0:e.quantity)??1,o=p(i),a=l(o);n.push({orderItemUid:s,quantityToReturn:+r,...E(a)})}return n},_=t=>{var n;return(n=t==null?void 0:t.items)!=null&&n.length?[...(t==null?void 0:t.items)??[]].sort((e,i)=>{const s=e.quantityShipped-e.quantityReturnRequested===0,r=i.quantityShipped-i.quantityReturnRequested===0;return e.eligibleForReturn&&!i.eligibleForReturn?-1:!e.eligibleForReturn&&i.eligibleForReturn||s&&!r?1:!s&&r?-1:0}):[]};export{C as f,f as m,R as p,A as r,_ as s}; diff --git a/scripts/__dropins__/storefront-order/chunks/setTaxStatus.js b/scripts/__dropins__/storefront-order/chunks/setTaxStatus.js index afa80511a9..72e0fe153b 100644 --- a/scripts/__dropins__/storefront-order/chunks/setTaxStatus.js +++ b/scripts/__dropins__/storefront-order/chunks/setTaxStatus.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ const s=t=>{let e=!1,a=!1;switch(t){case 1:a=!0;break;case 2:e=!0;break;case 3:e=!0,a=!0;break;default:e=!1,a=!1}return{taxIncluded:e,taxExcluded:a}};export{s}; diff --git a/scripts/__dropins__/storefront-order/chunks/transform-attributes-form.js b/scripts/__dropins__/storefront-order/chunks/transform-attributes-form.js index 19aed95cc1..0d750b2e22 100644 --- a/scripts/__dropins__/storefront-order/chunks/transform-attributes-form.js +++ b/scripts/__dropins__/storefront-order/chunks/transform-attributes-form.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{c as i,a as d}from"./network-error.js";const l=n=>{let s=[];for(const e of n)if(!(e.frontend_input!=="MULTILINE"||e.multiline_count<2))for(let o=2;o<=e.multiline_count;o++){const c={...e,name:`${e.code}_${o}`,code:`${e.code}_${o}`,id:`${e.code}_${o}`};s.push(c)}return s},f=(n=[])=>{var c;if(!(n!=null&&n.length))return[];const s=(c=n.filter(t=>{var r;return!((r=t.frontend_input)!=null&&r.includes("HIDDEN"))}))==null?void 0:c.map(({code:t,...r})=>{const u=t!=="country_id"?t:"country_code";return{...r,name:u,id:u,code:u}}),e=l(s);return[...s,...e].map(t=>{const r=i(t.code);return d({...t,customUpperCode:r},"camelCase",{frontend_input:"fieldType",frontend_class:"className",is_required:"required",sort_order:"orderNumber"})}).sort((t,r)=>t.orderNumber-r.orderNumber)};export{f as t}; +const l=r=>r.replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),a=r=>r.replace(/([A-Z])/g,t=>`_${t.toLowerCase()}`),i=(r,t,n)=>{const s=["string","boolean","number"],c=t==="camelCase"?l:a;return Array.isArray(r)?r.map(e=>s.includes(typeof e)||e===null?e:typeof e=="object"?i(e,t,n):e):r!==null&&typeof r=="object"?Object.entries(r).reduce((e,[o,u])=>{const f=n&&n[o]?n[o]:c(o);return e[f]=s.includes(typeof u)||u===null?u:i(u,t,n),e},{}):r},d=r=>{let t=[];for(const n of r)if(!(n.frontend_input!=="MULTILINE"||n.multiline_count<2))for(let s=2;s<=n.multiline_count;s++){const c={...n,name:`${n.code}_${s}`,code:`${n.code}_${s}`,id:`${n.code}_${s}`};t.push(c)}return t},p=(r=[])=>{var c;if(!(r!=null&&r.length))return[];const t=(c=r.filter(e=>{var o;return!((o=e.frontend_input)!=null&&o.includes("HIDDEN"))}))==null?void 0:c.map(({code:e,...o})=>{const u=e!=="country_id"?e:"country_code";return{...o,name:u,id:u,code:u}}),n=d(t);return[...t,...n].map(e=>{const o=l(e.code);return i({...e,customUpperCode:o},"camelCase",{frontend_input:"fieldType",frontend_class:"className",is_required:"required",sort_order:"orderNumber"})}).sort((e,o)=>e.orderNumber-o.orderNumber)};export{i as a,l as c,p as t}; diff --git a/scripts/__dropins__/storefront-order/chunks/useGetStoreConfig.js b/scripts/__dropins__/storefront-order/chunks/useGetStoreConfig.js index 4398ad0c43..e08ada004a 100644 --- a/scripts/__dropins__/storefront-order/chunks/useGetStoreConfig.js +++ b/scripts/__dropins__/storefront-order/chunks/useGetStoreConfig.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{useState as i,useEffect as s}from"@dropins/tools/preact-hooks.js";import{g as f}from"./getStoreConfig.js";const c=()=>{const[n,e]=i(null);return s(()=>{const o=sessionStorage.getItem("orderStoreConfig"),r=o?JSON.parse(o):null;r?e(r):f().then(t=>{t&&(sessionStorage.setItem("orderStoreConfig",JSON.stringify(t)),e(t))})},[]),n};export{c as u}; +import{useState as f,useEffect as g}from"@dropins/tools/preact-hooks.js";import{g as S}from"./getStoreConfig.js";const C=()=>{const[s,r]=f(null);return g(()=>{var n;const e="orderStoreConfigPromise",i=sessionStorage.getItem("orderStoreConfig");if(i){const t=JSON.parse(i);r(t)}else{const t=window;t[e]||(t[e]=S().then(o=>(o&&sessionStorage.setItem("orderStoreConfig",JSON.stringify(o)),o))),(n=t[e])==null||n.then(o=>{o&&r(o)})}},[]),s};export{C as u}; diff --git a/scripts/__dropins__/storefront-order/chunks/useIsMobile.js b/scripts/__dropins__/storefront-order/chunks/useIsMobile.js index 9f24ca2937..7f9df141b4 100644 --- a/scripts/__dropins__/storefront-order/chunks/useIsMobile.js +++ b/scripts/__dropins__/storefront-order/chunks/useIsMobile.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{debounce as t}from"@dropins/tools/lib.js";import{useState as o,useCallback as s,useEffect as r}from"@dropins/tools/preact-hooks.js";const w=()=>{const[i,n]=o(window.innerWidth<768),e=s(t(()=>{n(window.innerWidth<768)},1e3),[]);return r(()=>(window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}),[e]),i};export{w as u}; diff --git a/scripts/__dropins__/storefront-order/components/CustomerDetailsContent/index.d.ts b/scripts/__dropins__/storefront-order/components/CustomerDetailsContent/index.d.ts index 5df4dafac1..c84d12bbaa 100644 --- a/scripts/__dropins__/storefront-order/components/CustomerDetailsContent/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/CustomerDetailsContent/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './CustomerDetailsContent'; export { CustomerDetailsContent as default } from './CustomerDetailsContent'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/EmptyList/index.d.ts b/scripts/__dropins__/storefront-order/components/EmptyList/index.d.ts index fe530e4f6b..5649b9fcbb 100644 --- a/scripts/__dropins__/storefront-order/components/EmptyList/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/EmptyList/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './EmptyList'; export { EmptyList as default } from './EmptyList'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/Form/FormInputs/index.d.ts b/scripts/__dropins__/storefront-order/components/Form/FormInputs/index.d.ts index 4bb7b35a49..cb508c9142 100644 --- a/scripts/__dropins__/storefront-order/components/Form/FormInputs/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/Form/FormInputs/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './FormInputs'; export { FormInputs as default } from './FormInputs'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/Form/index.d.ts b/scripts/__dropins__/storefront-order/components/Form/index.d.ts index 4ba0696ed0..f583e85b54 100644 --- a/scripts/__dropins__/storefront-order/components/Form/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/Form/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './Form'; export { Form as default } from './Form'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/OrderActions/index.d.ts b/scripts/__dropins__/storefront-order/components/OrderActions/index.d.ts index 8937366625..8eb1f6a31b 100644 --- a/scripts/__dropins__/storefront-order/components/OrderActions/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/OrderActions/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderActions'; export { OrderActions as default } from './OrderActions'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/OrderCancel/index.d.ts b/scripts/__dropins__/storefront-order/components/OrderCancel/index.d.ts index 78ba444dd6..c7043bdbe9 100644 --- a/scripts/__dropins__/storefront-order/components/OrderCancel/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/OrderCancel/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderCancel'; export { OrderCancel as default } from './OrderCancel'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/index.d.ts b/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/index.d.ts index 939894f3d3..d6b6d474fe 100644 --- a/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderCostSummaryContent'; export { OrderCostSummaryContent as default } from './OrderCostSummaryContent'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/OrderHeader/index.d.ts b/scripts/__dropins__/storefront-order/components/OrderHeader/index.d.ts index 17a315206a..dc03fc6c66 100644 --- a/scripts/__dropins__/storefront-order/components/OrderHeader/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/OrderHeader/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderHeader'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/OrderLoaders/index.d.ts b/scripts/__dropins__/storefront-order/components/OrderLoaders/index.d.ts index 56173faaae..34b7c5d12e 100644 --- a/scripts/__dropins__/storefront-order/components/OrderLoaders/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/OrderLoaders/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderLoaders'; export { CardLoader as default } from './OrderLoaders'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/OrderProductListContent/index.d.ts b/scripts/__dropins__/storefront-order/components/OrderProductListContent/index.d.ts index c9aadb59ce..ba54c61306 100644 --- a/scripts/__dropins__/storefront-order/components/OrderProductListContent/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/OrderProductListContent/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderProductListContent'; export * from './CartSummaryItem'; export { OrderProductListContent as default } from './OrderProductListContent'; diff --git a/scripts/__dropins__/storefront-order/components/OrderSearchForm/index.d.ts b/scripts/__dropins__/storefront-order/components/OrderSearchForm/index.d.ts index 16ea0175c5..aafb07bc94 100644 --- a/scripts/__dropins__/storefront-order/components/OrderSearchForm/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/OrderSearchForm/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderSearchForm'; export { OrderSearchForm as default } from './OrderSearchForm'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/OrderStatusContent/index.d.ts b/scripts/__dropins__/storefront-order/components/OrderStatusContent/index.d.ts index b7a3ca88b3..9902308b2c 100644 --- a/scripts/__dropins__/storefront-order/components/OrderStatusContent/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/OrderStatusContent/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderStatusContent'; export { OrderStatusContent as default } from './OrderStatusContent'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/Reorder/index.d.ts b/scripts/__dropins__/storefront-order/components/Reorder/index.d.ts index 0ce496a22b..7a14864189 100644 --- a/scripts/__dropins__/storefront-order/components/Reorder/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/Reorder/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './Reorder'; export { Reorder as default } from '.'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/ReturnOrderMessage/index.d.ts b/scripts/__dropins__/storefront-order/components/ReturnOrderMessage/index.d.ts index 3f22f19673..acece1bd36 100644 --- a/scripts/__dropins__/storefront-order/components/ReturnOrderMessage/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/ReturnOrderMessage/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './ReturnOrderMessage'; export { ReturnOrderMessage as default } from './ReturnOrderMessage'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/ReturnOrderProductList/index.d.ts b/scripts/__dropins__/storefront-order/components/ReturnOrderProductList/index.d.ts index c876e7fe1d..6312e03861 100644 --- a/scripts/__dropins__/storefront-order/components/ReturnOrderProductList/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/ReturnOrderProductList/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './ReturnOrderProductList'; export { ReturnOrderProductList as default } from './ReturnOrderProductList'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/ReturnReasonForm/index.d.ts b/scripts/__dropins__/storefront-order/components/ReturnReasonForm/index.d.ts index fcad1c79c9..0e17eff0a5 100644 --- a/scripts/__dropins__/storefront-order/components/ReturnReasonForm/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/ReturnReasonForm/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './ReturnReasonForm'; export { ReturnReasonForm as default } from './ReturnReasonForm'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/ReturnsListContent/index.d.ts b/scripts/__dropins__/storefront-order/components/ReturnsListContent/index.d.ts index 4bcac4ef3f..038f6b7f11 100644 --- a/scripts/__dropins__/storefront-order/components/ReturnsListContent/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/ReturnsListContent/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './ReturnsListContent'; export { ReturnsListContent as default } from './ReturnsListContent'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/ShippingStatusCard/index.d.ts b/scripts/__dropins__/storefront-order/components/ShippingStatusCard/index.d.ts index b6675dd7c0..0fb33948c2 100644 --- a/scripts/__dropins__/storefront-order/components/ShippingStatusCard/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/ShippingStatusCard/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './ShippingStatusCard'; export * from './ShippingStatusReturnCard'; export { ShippingStatusCard as default } from './ShippingStatusCard'; diff --git a/scripts/__dropins__/storefront-order/components/index.d.ts b/scripts/__dropins__/storefront-order/components/index.d.ts index b27b68b1a2..508aa37dd5 100644 --- a/scripts/__dropins__/storefront-order/components/index.d.ts +++ b/scripts/__dropins__/storefront-order/components/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './CustomerDetailsContent'; export * from './EmptyList'; export * from './Form'; diff --git a/scripts/__dropins__/storefront-order/configs/defaultAttributePreset.config.d.ts b/scripts/__dropins__/storefront-order/configs/defaultAttributePreset.config.d.ts index a32ced3bba..a813eba735 100644 --- a/scripts/__dropins__/storefront-order/configs/defaultAttributePreset.config.d.ts +++ b/scripts/__dropins__/storefront-order/configs/defaultAttributePreset.config.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const defaultAttributePreset: string[]; //# sourceMappingURL=defaultAttributePreset.config.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/configs/mock.config.d.ts b/scripts/__dropins__/storefront-order/configs/mock.config.d.ts index 866bcf6d7e..0b5533f63e 100644 --- a/scripts/__dropins__/storefront-order/configs/mock.config.d.ts +++ b/scripts/__dropins__/storefront-order/configs/mock.config.d.ts @@ -1,3 +1,122 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ +export declare const taxCalculations: { + includeAndExcludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + excludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + includeTax: { + singleItemPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + }; +}; +export declare const taxCalculationsEmpty: { + includeAndExcludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + excludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + includeTax: { + singleItemPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + }; +}; export declare const mockOrder: { data: { guestOrder: { @@ -163,6 +282,7 @@ export declare const transformMockOrderInput: { customer: { orders: { items: { + uid: string; available_actions: string[]; status: string; number: string; @@ -412,7 +532,107 @@ export declare const transformMockOrderOutput: { carrier: string; shippingMethod: null; coupons: never[]; - shipments: { + shipments: ({ + id: string; + tracking: { + title: string; + number: string; + }[]; + comments: never[]; + items: { + taxCalculations: { + includeAndExcludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + excludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + includeTax: { + singleItemPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + }; + }; + id: string; + productSku: string; + productName: string; + orderItem: { + __typename: string; + status: string; + productName: string; + id: string; + quantityOrdered: number; + quantityShipped: number; + quantityCanceled: number; + quantityInvoiced: number; + quantityRefunded: number; + quantityReturned: number; + productSalePrice: { + value: number; + currency: string; + }; + selectedOptions: never[]; + product: { + __typename: string; + canonicalUrl: null; + uid: string; + name: string; + sku: string; + thumbnail: { + label: string; + url: string; + }; + priceRange: { + maximumPrice: { + regularPrice: { + currency: string; + value: number; + }; + }; + }; + }; + }; + }[]; + } | { id: string; tracking: { title: string; @@ -463,7 +683,7 @@ export declare const transformMockOrderOutput: { }; }; }[]; - }[]; + })[]; shippingAddress: { city: string; company: null; @@ -1807,13 +2027,65 @@ export declare const createReturnOrderMock: { carrier: string; shippingMethod: string; isVirtual: boolean; - returns: { + returns: ({ createdReturnAt: string; returnStatus: string; token: string; orderNumber: string; returnNumber: string; items: ({ + taxCalculations: { + includeAndExcludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + excludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + includeTax: { + singleItemPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + }; + }; uid: string; quantity: number; status: string; @@ -1882,8 +2154,8 @@ export declare const createReturnOrderMock: { url: string; }; configurableOptions: { - Size?: undefined; - Color?: undefined; + Size: string; + Color: string; }; bundleOptions: null; itemPrices: { @@ -1997,215 +2269,430 @@ export declare const createReturnOrderMock: { }; }; downloadableLinks: null; + taxCalculations?: undefined; })[]; tracking: never[]; - }[]; - itemsEligibleForReturn: ({ - type: string; - eligibleForReturn: boolean; - productSku: string; - productName: string; - productUrlKey: string; - quantityCanceled: number; - quantityInvoiced: number; - quantityOrdered: number; - quantityRefunded: number; - quantityReturned: number; - quantityShipped: number; - id: string; - discounted: boolean; - total: { - value: number; - currency: string; - }; - totalInclTax: { - value: number; - currency: string; - }; - price: { - value: number; - currency: string; - }; - priceInclTax: { - value: number; - currency: string; - }; - totalQuantity: number; - regularPrice: { - value: number; - currency: string; - }; - product: { - __typename: string; - canonicalUrl: string; - urlKey: string; - uid: string; - name: string; - sku: string; - onlyXLeftInStock: null; - stockStatus: string; - thumbnail: { - label: string; - url: string; - }; - priceRange: { - maximumPrice: { - regularPrice: { + } | { + createdReturnAt: string; + returnStatus: string; + token: string; + orderNumber: string; + returnNumber: string; + items: ({ + taxCalculations: { + includeAndExcludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + excludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + includeTax: { + singleItemPrice: { + value: number; currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { value: number; + currency: string; }; }; }; + uid: string; + quantity: number; + status: string; + requestQuantity: number; + type: string; + eligibleForReturn: boolean; + productSku: string; + productName: string; + productUrlKey: string; + quantityCanceled: number; + quantityInvoiced: number; + quantityOrdered: number; + quantityRefunded: number; + quantityReturned: number; + quantityShipped: number; id: string; - image: string; - productType: string; - }; - thumbnail: { - label: string; - url: string; - }; - configurableOptions: { - Color?: undefined; - Size?: undefined; - }; - bundleOptions: null; - itemPrices: { - priceIncludingTax: { + discounted: boolean; + total: { value: number; currency: string; }; - originalPrice: { + totalInclTax: { value: number; currency: string; }; - originalPriceIncludingTax: { + price: { value: number; currency: string; }; - price: { + priceInclTax: { value: number; currency: string; }; - }; - downloadableLinks: null; - } | { - type: string; - eligibleForReturn: boolean; - productSku: string; - productName: string; - productUrlKey: string; - quantityCanceled: number; - quantityInvoiced: number; - quantityOrdered: number; - quantityRefunded: number; - quantityReturned: number; - quantityShipped: number; - id: string; - discounted: boolean; - total: { - value: number; - currency: string; - }; - totalInclTax: { - value: number; - currency: string; - }; - price: { - value: number; - currency: string; - }; - priceInclTax: { - value: number; - currency: string; - }; - totalQuantity: number; - regularPrice: { - value: number; - currency: string; - }; - product: { - __typename: string; - canonicalUrl: string; - urlKey: string; - uid: string; - name: string; - sku: string; - onlyXLeftInStock: null; - stockStatus: string; + totalQuantity: number; + regularPrice: { + value: number; + currency: string; + }; + product: { + __typename: string; + canonicalUrl: string; + urlKey: string; + uid: string; + name: string; + sku: string; + onlyXLeftInStock: null; + stockStatus: string; + thumbnail: { + label: string; + url: string; + }; + priceRange: { + maximumPrice: { + regularPrice: { + currency: string; + value: number; + }; + }; + }; + id: string; + image: string; + productType: string; + }; thumbnail: { label: string; url: string; }; - priceRange: { - maximumPrice: { - regularPrice: { - currency: string; - value: number; - }; + configurableOptions: { + Color?: undefined; + Size?: undefined; + }; + bundleOptions: null; + itemPrices: { + priceIncludingTax: { + value: number; + currency: string; + }; + originalPrice: { + value: number; + currency: string; + }; + originalPriceIncludingTax: { + value: number; + currency: string; + }; + price: { + value: number; + currency: string; }; }; + downloadableLinks: null; + } | { + uid: string; + quantity: number; + status: string; + requestQuantity: number; + type: string; + eligibleForReturn: boolean; + productSku: string; + productName: string; + productUrlKey: string; + quantityCanceled: number; + quantityInvoiced: number; + quantityOrdered: number; + quantityRefunded: number; + quantityReturned: number; + quantityShipped: number; id: string; - image: string; - productType: string; - }; - thumbnail: { - label: string; - url: string; - }; - configurableOptions: { - Color: string; - Size: string; - }; - bundleOptions: null; - itemPrices: { - priceIncludingTax: { + discounted: boolean; + total: { value: number; currency: string; }; - originalPrice: { + totalInclTax: { value: number; currency: string; }; - originalPriceIncludingTax: { + price: { value: number; currency: string; }; - price: { + priceInclTax: { value: number; currency: string; }; - }; - downloadableLinks: null; - } | { - type: string; - eligibleForReturn: boolean; - productSku: string; - productName: string; - productUrlKey: string; - quantityCanceled: number; - quantityInvoiced: number; - quantityOrdered: number; - quantityRefunded: number; - quantityReturned: number; - quantityShipped: number; - id: string; - discounted: boolean; - total: { - value: number; - currency: string; - }; - totalInclTax: { - value: number; - currency: string; - }; - price: { - value: number; - currency: string; - }; - priceInclTax: { - value: number; - currency: string; - }; + totalQuantity: number; + regularPrice: { + value: number; + currency: string; + }; + product: { + __typename: string; + canonicalUrl: string; + urlKey: string; + uid: string; + name: string; + sku: string; + onlyXLeftInStock: null; + stockStatus: string; + thumbnail: { + label: string; + url: string; + }; + priceRange: { + maximumPrice: { + regularPrice: { + currency: string; + value: number; + }; + }; + }; + id: string; + image: string; + productType: string; + }; + thumbnail: { + label: string; + url: string; + }; + configurableOptions: { + Color: string; + Size: string; + }; + bundleOptions: null; + itemPrices: { + priceIncludingTax: { + value: number; + currency: string; + }; + originalPrice: { + value: number; + currency: string; + }; + originalPriceIncludingTax: { + value: number; + currency: string; + }; + price: { + value: number; + currency: string; + }; + }; + downloadableLinks: null; + taxCalculations?: undefined; + } | { + uid: string; + quantity: number; + status: string; + requestQuantity: number; + type: string; + eligibleForReturn: boolean; + productSku: string; + productName: string; + productUrlKey: string; + quantityCanceled: number; + quantityInvoiced: number; + quantityOrdered: number; + quantityRefunded: number; + quantityReturned: number; + quantityShipped: number; + id: string; + discounted: boolean; + total: { + value: number; + currency: string; + }; + totalInclTax: { + value: number; + currency: string; + }; + price: { + value: number; + currency: string; + }; + priceInclTax: { + value: number; + currency: string; + }; + totalQuantity: number; + regularPrice: { + value: number; + currency: string; + }; + product: { + __typename: string; + canonicalUrl: string; + urlKey: string; + uid: string; + name: string; + sku: string; + onlyXLeftInStock: null; + stockStatus: string; + thumbnail: { + label: string; + url: string; + }; + priceRange: { + maximumPrice: { + regularPrice: { + currency: string; + value: number; + }; + }; + }; + id: string; + image: string; + productType: string; + }; + thumbnail: { + label: string; + url: string; + }; + configurableOptions: { + Color?: undefined; + Size?: undefined; + }; + bundleOptions: null; + itemPrices: { + priceIncludingTax: { + value: number; + currency: string; + }; + originalPrice: { + value: number; + currency: string; + }; + originalPriceIncludingTax: { + value: number; + currency: string; + }; + price: { + value: number; + currency: string; + }; + }; + downloadableLinks: null; + taxCalculations?: undefined; + })[]; + tracking: never[]; + })[]; + itemsEligibleForReturn: ({ + taxCalculations: { + includeAndExcludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + excludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + includeTax: { + singleItemPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + }; + }; + type: string; + eligibleForReturn: boolean; + productSku: string; + productName: string; + productUrlKey: string; + quantityCanceled: number; + quantityInvoiced: number; + quantityOrdered: number; + quantityRefunded: number; + quantityReturned: number; + quantityShipped: number; + id: string; + discounted: boolean; + total: { + value: number; + currency: string; + }; + totalInclTax: { + value: number; + currency: string; + }; + price: { + value: number; + currency: string; + }; + priceInclTax: { + value: number; + currency: string; + }; totalQuantity: number; regularPrice: { value: number; @@ -2244,12 +2731,7 @@ export declare const createReturnOrderMock: { Color?: undefined; Size?: undefined; }; - bundleOptions: { - 'Sprite Stasis Ball': string; - 'Sprite Foam Yoga Brick': string; - 'Sprite Yoga Strap': string; - 'Sprite Foam Roller': string; - }; + bundleOptions: null; itemPrices: { priceIncludingTax: { value: number; @@ -2269,208 +2751,59 @@ export declare const createReturnOrderMock: { }; }; downloadableLinks: null; - })[]; - coupons: never[]; - shipments: { - id: string; - number: string; - tracking: never[]; - comments: never[]; - items: { - id: string; - productSku: string; - productName: string; - orderItem: { - __typename: string; - status: string; - productSku: string; - eligibleForReturn: boolean; - productName: string; - productUrlKey: string; - id: string; - quantityOrdered: number; - quantityShipped: number; - quantityCanceled: number; - quantityInvoiced: number; - quantityRefunded: number; - productSalePrice: { + } | { + taxCalculations: { + includeAndExcludeTax: { + originalPrice: { value: number; currency: string; }; - selectedOptions: { - label: string; - value: string; - }[]; - product: { - __typename: string; - canonicalUrl: null; - urlKey: string; - uid: string; - name: string; - sku: string; - onlyXLeftInStock: null; - stockStatus: string; - thumbnail: { - label: string; - url: string; - }; - priceRange: { - maximumPrice: { - regularPrice: { - currency: string; - value: number; - }; - }; - }; + baseOriginalPrice: { + value: number; + currency: string; }; - prices: { - priceIncludingTax: { - value: number; - currency: string; - }; - originalPrice: { - value: number; - currency: string; - }; - originalPriceIncludingTax: { - value: number; - currency: string; - }; - price: { - value: number; - currency: string; - }; + baseDiscountedPrice: { + value: number; + currency: string; }; - }; - }[]; - }[]; - payments: { - code: string; - name: string; - }[]; - shippingAddress: { - city: string; - company: null; - countryCode: string; - fax: null; - firstName: string; - lastName: string; - middleName: null; - postCode: string; - prefix: null; - region: string; - regionId: string; - street: string[]; - suffix: null; - telephone: string; - vatId: string; - }; - billingAddress: { - city: string; - company: null; - countryCode: string; - fax: null; - firstName: string; - lastName: string; - middleName: null; - postCode: string; - prefix: null; - region: string; - regionId: string; - street: string[]; - suffix: null; - telephone: string; - vatId: string; - }; - items: ({ - type: string; - eligibleForReturn: boolean; - productSku: string; - productName: string; - productUrlKey: string; - quantityCanceled: number; - quantityInvoiced: number; - quantityOrdered: number; - quantityRefunded: number; - quantityReturned: number; - quantityShipped: number; - id: string; - discounted: boolean; - total: { - value: number; - currency: string; - }; - totalInclTax: { - value: number; - currency: string; - }; - price: { - value: number; - currency: string; - }; - priceInclTax: { - value: number; - currency: string; - }; - totalQuantity: number; - regularPrice: { - value: number; - currency: string; - }; - product: { - __typename: string; - canonicalUrl: string; - urlKey: string; - uid: string; - name: string; - sku: string; - onlyXLeftInStock: null; - stockStatus: string; - thumbnail: { - label: string; - url: string; - }; - priceRange: { - maximumPrice: { - regularPrice: { - currency: string; - value: number; - }; + baseExcludingTax: { + value: number; + currency: string; }; }; - id: string; - image: string; - productType: string; - }; - thumbnail: { - label: string; - url: string; - }; - configurableOptions: { - Color?: undefined; - Size?: undefined; - }; - bundleOptions: null; - itemPrices: { - priceIncludingTax: { - value: number; - currency: string; - }; - originalPrice: { - value: number; - currency: string; - }; - originalPriceIncludingTax: { - value: number; - currency: string; + excludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; }; - price: { - value: number; - currency: string; + includeTax: { + singleItemPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; }; }; - downloadableLinks: null; - } | { type: string; eligibleForReturn: boolean; productSku: string; @@ -2559,6 +2892,58 @@ export declare const createReturnOrderMock: { }; downloadableLinks: null; } | { + taxCalculations: { + includeAndExcludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + excludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + includeTax: { + singleItemPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + }; + }; type: string; eligibleForReturn: boolean; productSku: string; @@ -2652,27 +3037,191 @@ export declare const createReturnOrderMock: { }; downloadableLinks: null; })[]; - itemsEligibleForReturn2: ({ - type: string; - eligibleForReturn: boolean; - productSku: string; - productName: string; - productUrlKey: string; - quantityCanceled: number; - quantityInvoiced: number; - quantityOrdered: number; - quantityRefunded: number; - quantityReturned: number; - quantityShipped: number; + coupons: never[]; + shipments: { id: string; - discounted: boolean; - total: { - value: number; - currency: string; - }; - totalInclTax: { - value: number; - currency: string; + number: string; + tracking: never[]; + comments: never[]; + items: { + id: string; + productSku: string; + productName: string; + orderItem: { + taxCalculations: { + includeAndExcludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + excludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + includeTax: { + singleItemPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + }; + }; + __typename: string; + status: string; + productSku: string; + eligibleForReturn: boolean; + productName: string; + productUrlKey: string; + id: string; + quantityOrdered: number; + quantityShipped: number; + quantityCanceled: number; + quantityInvoiced: number; + quantityRefunded: number; + productSalePrice: { + value: number; + currency: string; + }; + selectedOptions: { + label: string; + value: string; + }[]; + product: { + __typename: string; + canonicalUrl: null; + urlKey: string; + uid: string; + name: string; + sku: string; + onlyXLeftInStock: null; + stockStatus: string; + thumbnail: { + label: string; + url: string; + }; + priceRange: { + maximumPrice: { + regularPrice: { + currency: string; + value: number; + }; + }; + }; + }; + prices: { + priceIncludingTax: { + value: number; + currency: string; + }; + originalPrice: { + value: number; + currency: string; + }; + originalPriceIncludingTax: { + value: number; + currency: string; + }; + price: { + value: number; + currency: string; + }; + }; + }; + }[]; + }[]; + payments: { + code: string; + name: string; + }[]; + shippingAddress: { + city: string; + company: null; + countryCode: string; + fax: null; + firstName: string; + lastName: string; + middleName: null; + postCode: string; + prefix: null; + region: string; + regionId: string; + street: string[]; + suffix: null; + telephone: string; + vatId: string; + }; + billingAddress: { + city: string; + company: null; + countryCode: string; + fax: null; + firstName: string; + lastName: string; + middleName: null; + postCode: string; + prefix: null; + region: string; + regionId: string; + street: string[]; + suffix: null; + telephone: string; + vatId: string; + }; + items: ({ + type: string; + eligibleForReturn: boolean; + productSku: string; + productName: string; + productUrlKey: string; + quantityCanceled: number; + quantityInvoiced: number; + quantityOrdered: number; + quantityRefunded: number; + quantityReturned: number; + quantityShipped: number; + id: string; + discounted: boolean; + total: { + value: number; + currency: string; + }; + totalInclTax: { + value: number; + currency: string; }; price: { value: number; @@ -2922,40 +3471,310 @@ export declare const createReturnOrderMock: { }; downloadableLinks: null; })[]; - totalQuantity: number; - shipping: { - amount: number; - currency: string; - code: string; - }; - returnNumber: string; -}; -export declare const shippingStatusCardDataMock: { - email: string; - availableActions: string[]; - status: string; - number: string; - id: string; - returns: never[]; - itemsEligibleForReturn: never[]; - coupons: never[]; - shipments: { + itemsEligibleForReturn2: ({ + type: string; + eligibleForReturn: boolean; + productSku: string; + productName: string; + productUrlKey: string; + quantityCanceled: number; + quantityInvoiced: number; + quantityOrdered: number; + quantityRefunded: number; + quantityReturned: number; + quantityShipped: number; id: string; - tracking: { - number: number; - carrier: string; - title: string; - }[]; - comments: never[]; - items: { + discounted: boolean; + total: { + value: number; + currency: string; + }; + totalInclTax: { + value: number; + currency: string; + }; + price: { + value: number; + currency: string; + }; + priceInclTax: { + value: number; + currency: string; + }; + totalQuantity: number; + regularPrice: { + value: number; + currency: string; + }; + product: { + __typename: string; + canonicalUrl: string; + urlKey: string; + uid: string; + name: string; + sku: string; + onlyXLeftInStock: null; + stockStatus: string; + thumbnail: { + label: string; + url: string; + }; + priceRange: { + maximumPrice: { + regularPrice: { + currency: string; + value: number; + }; + }; + }; id: string; - productSku: string; - productName: string; - orderItem: { - __typename: string; - status: string; - productSku: string; - eligibleForReturn: boolean; + image: string; + productType: string; + }; + thumbnail: { + label: string; + url: string; + }; + configurableOptions: { + Color?: undefined; + Size?: undefined; + }; + bundleOptions: null; + itemPrices: { + priceIncludingTax: { + value: number; + currency: string; + }; + originalPrice: { + value: number; + currency: string; + }; + originalPriceIncludingTax: { + value: number; + currency: string; + }; + price: { + value: number; + currency: string; + }; + }; + downloadableLinks: null; + } | { + type: string; + eligibleForReturn: boolean; + productSku: string; + productName: string; + productUrlKey: string; + quantityCanceled: number; + quantityInvoiced: number; + quantityOrdered: number; + quantityRefunded: number; + quantityReturned: number; + quantityShipped: number; + id: string; + discounted: boolean; + total: { + value: number; + currency: string; + }; + totalInclTax: { + value: number; + currency: string; + }; + price: { + value: number; + currency: string; + }; + priceInclTax: { + value: number; + currency: string; + }; + totalQuantity: number; + regularPrice: { + value: number; + currency: string; + }; + product: { + __typename: string; + canonicalUrl: string; + urlKey: string; + uid: string; + name: string; + sku: string; + onlyXLeftInStock: null; + stockStatus: string; + thumbnail: { + label: string; + url: string; + }; + priceRange: { + maximumPrice: { + regularPrice: { + currency: string; + value: number; + }; + }; + }; + id: string; + image: string; + productType: string; + }; + thumbnail: { + label: string; + url: string; + }; + configurableOptions: { + Color: string; + Size: string; + }; + bundleOptions: null; + itemPrices: { + priceIncludingTax: { + value: number; + currency: string; + }; + originalPrice: { + value: number; + currency: string; + }; + originalPriceIncludingTax: { + value: number; + currency: string; + }; + price: { + value: number; + currency: string; + }; + }; + downloadableLinks: null; + } | { + type: string; + eligibleForReturn: boolean; + productSku: string; + productName: string; + productUrlKey: string; + quantityCanceled: number; + quantityInvoiced: number; + quantityOrdered: number; + quantityRefunded: number; + quantityReturned: number; + quantityShipped: number; + id: string; + discounted: boolean; + total: { + value: number; + currency: string; + }; + totalInclTax: { + value: number; + currency: string; + }; + price: { + value: number; + currency: string; + }; + priceInclTax: { + value: number; + currency: string; + }; + totalQuantity: number; + regularPrice: { + value: number; + currency: string; + }; + product: { + __typename: string; + canonicalUrl: string; + urlKey: string; + uid: string; + name: string; + sku: string; + onlyXLeftInStock: null; + stockStatus: string; + thumbnail: { + label: string; + url: string; + }; + priceRange: { + maximumPrice: { + regularPrice: { + currency: string; + value: number; + }; + }; + }; + id: string; + image: string; + productType: string; + }; + thumbnail: { + label: string; + url: string; + }; + configurableOptions: { + Color?: undefined; + Size?: undefined; + }; + bundleOptions: { + 'Sprite Stasis Ball': string; + 'Sprite Foam Yoga Brick': string; + 'Sprite Yoga Strap': string; + 'Sprite Foam Roller': string; + }; + itemPrices: { + priceIncludingTax: { + value: number; + currency: string; + }; + originalPrice: { + value: number; + currency: string; + }; + originalPriceIncludingTax: { + value: number; + currency: string; + }; + price: { + value: number; + currency: string; + }; + }; + downloadableLinks: null; + })[]; + totalQuantity: number; + shipping: { + amount: number; + currency: string; + code: string; + }; + returnNumber: string; +}; +export declare const shippingStatusCardDataMock: { + email: string; + availableActions: string[]; + status: string; + number: string; + id: string; + returns: never[]; + itemsEligibleForReturn: never[]; + coupons: never[]; + shipments: { + id: string; + tracking: { + number: number; + carrier: string; + title: string; + }[]; + comments: never[]; + items: { + id: string; + productSku: string; + productName: string; + orderItem: { + __typename: string; + status: string; + productSku: string; + eligibleForReturn: boolean; productName: string; productUrlKey: string; id: string; @@ -3719,11 +4538,641 @@ export declare const storeConfigMock: { orderCancellationReasons: { description: string; }[]; - shoppingCartDisplayPrice: number; + shoppingOrderDisplayPrice: number; shoppingOrdersDisplaySubtotal: number; shoppingOrdersDisplayShipping: number; shoppingOrdersDisplayGrandTotal: boolean; shoppingOrdersDisplayFullSummary: boolean; shoppingOrdersDisplayZeroTax: boolean; }; +export declare const placeOrderMockData: { + availableActions: string[]; + billingAddress: { + city: string; + company: string; + countryCode: string; + fax: string; + firstName: string; + lastName: string; + middleName: string; + postCode: string; + prefix: string; + region: string; + regionId: string; + street: string[]; + suffix: string; + telephone: string; + vatId: string; + country: string; + customAttributes: never[]; + }; + carrier: string; + coupons: never[]; + discounts: { + amount: { + currency: string; + value: number; + }; + label: string; + }[]; + email: string; + grandTotal: { + currency: string; + value: number; + }; + id: string; + isVirtual: boolean; + items: { + taxCalculations: { + includeAndExcludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + excludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + includeTax: { + singleItemPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + }; + }; + bundleOptions: null; + configurableOptions: undefined; + discounted: boolean; + downloadableLinks: null; + eligibleForReturn: boolean; + giftCard: { + message: string; + recipientEmail: string; + recipientName: string; + senderEmail: string; + senderName: string; + }; + id: undefined; + price: { + currency: undefined; + value: number; + }; + priceInclTax: { + currency: undefined; + value: number; + }; + prices: { + discounts: never[]; + originalPrice: { + currency: string; + value: number; + }; + originalPriceIncludingTax: { + currency: string; + value: number; + }; + price: { + currency: string; + value: number; + }; + priceIncludingTax: { + currency: string; + value: number; + }; + }; + itemPrices: { + discounts: never[]; + originalPrice: { + currency: string; + value: number; + }; + originalPriceIncludingTax: { + currency: string; + value: number; + }; + price: { + currency: string; + value: number; + }; + priceIncludingTax: { + currency: string; + value: number; + }; + }; + product: { + __typename: string; + uid: string; + canonicalUrl: string; + id: string; + image: string; + name: string; + onlyXLeftInStock: number; + priceRange: { + maximumPrice: { + regularPrice: { + currency: string; + value: number; + }; + }; + }; + productType: string; + sku: string; + stockStatus: string; + thumbnail: { + label: string; + url: string; + }; + urlKey: string; + }; + productName: string; + productSalePrice: undefined; + productSku: string; + productUrlKey: string; + quantityCanceled: number; + quantityInvoiced: number; + quantityOrdered: number; + quantityRefunded: number; + quantityReturnRequested: number; + quantityReturned: number; + quantityShipped: number; + regularPrice: { + currency: undefined; + value: undefined; + }; + selectedOptions: never[]; + status: string; + thumbnail: { + label: string; + url: string; + }; + total: { + currency: string; + value: number; + }; + totalInclTax: { + currency: undefined; + value: number; + }; + totalQuantity: number; + type: string; + }[]; + itemsEligibleForReturn: undefined; + number: string; + orderDate: string; + orderStatusChangeDate: string; + payments: { + code: string; + name: string; + }[]; + returns: never[]; + shipments: ({ + comments: never[]; + id: string; + items: { + id: string; + orderItem: { + taxCalculations: { + includeAndExcludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + excludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + includeTax: { + singleItemPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + }; + }; + bundleOptions: null; + configurableOptions: {}; + discounted: boolean; + downloadableLinks: null; + eligibleForReturn: boolean; + giftCard: undefined; + id: string; + price: { + currency: string; + value: number; + }; + priceInclTax: { + currency: string; + value: number; + }; + prices: { + discounts: never[]; + originalPrice: { + currency: string; + value: number; + }; + originalPriceIncludingTax: { + currency: string; + value: number; + }; + price: { + currency: string; + value: number; + }; + priceIncludingTax: { + currency: string; + value: number; + }; + }; + itemPrices: { + discounts: never[]; + originalPrice: { + currency: string; + value: number; + }; + originalPriceIncludingTax: { + currency: string; + value: number; + }; + price: { + currency: string; + value: number; + }; + priceIncludingTax: { + currency: string; + value: number; + }; + }; + product: { + __typename: string; + canonicalUrl: string; + id: string; + image: string; + name: string; + onlyXLeftInStock: number; + priceRange: { + maximumPrice: { + regularPrice: { + currency: string; + value: number; + }; + }; + }; + productType: string; + sku: string; + stockStatus: string; + thumbnail: { + label: string; + url: string; + }; + uid: string; + urlKey: string; + }; + productName: string; + productSalePrice: { + currency: string; + value: number; + }; + productSku: string; + productUrlKey: string; + quantityCanceled: number; + quantityInvoiced: number; + quantityOrdered: number; + quantityRefunded: number; + quantityReturnRequested: number; + quantityReturned: number; + quantityShipped: number; + regularPrice: { + currency: string; + value: number; + }; + selectedOptions: never[]; + status: string; + thumbnail: { + label: string; + url: string; + }; + total: { + currency: string; + value: number; + }; + totalInclTax: { + currency: string; + value: number; + }; + totalQuantity: number; + type: string; + }; + productName: string; + productSku: string; + quantityShipped: undefined; + }[]; + tracking: { + number: string; + title: string; + }[]; + } | { + comments: never[]; + id: string; + items: { + id: string; + orderItem: { + taxCalculations: { + includeAndExcludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + excludeTax: { + originalPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + baseExcludingTax: { + value: number; + currency: string; + }; + }; + includeTax: { + singleItemPrice: { + value: number; + currency: string; + }; + baseOriginalPrice: { + value: number; + currency: string; + }; + baseDiscountedPrice: { + value: number; + currency: string; + }; + }; + }; + bundleOptions: null; + configurableOptions: { + Color: string; + Size: string; + }; + discounted: boolean; + downloadableLinks: null; + eligibleForReturn: boolean; + giftCard: undefined; + id: string; + price: { + currency: string; + value: number; + }; + priceInclTax: { + currency: string; + value: number; + }; + prices: { + discounts: never[]; + originalPrice: { + currency: string; + value: number; + }; + originalPriceIncludingTax: { + currency: string; + value: number; + }; + price: { + currency: string; + value: number; + }; + priceIncludingTax: { + currency: string; + value: number; + }; + }; + itemPrices: { + discounts: never[]; + originalPrice: { + currency: string; + value: number; + }; + originalPriceIncludingTax: { + currency: string; + value: number; + }; + price: { + currency: string; + value: number; + }; + priceIncludingTax: { + currency: string; + value: number; + }; + }; + product: { + __typename: string; + canonicalUrl: string; + id: string; + image: string; + name: string; + onlyXLeftInStock: number; + priceRange: { + maximumPrice: { + regularPrice: { + currency: string; + value: number; + }; + }; + }; + productType: string; + sku: string; + stockStatus: string; + thumbnail: { + label: string; + url: string; + }; + uid: string; + urlKey: string; + }; + productName: string; + productSalePrice: { + currency: string; + value: number; + }; + productSku: string; + productUrlKey: string; + quantityCanceled: number; + quantityInvoiced: number; + quantityOrdered: number; + quantityRefunded: number; + quantityReturnRequested: number; + quantityReturned: number; + quantityShipped: number; + regularPrice: { + currency: string; + value: number; + }; + selectedOptions: { + label: string; + value: string; + }[]; + status: string; + thumbnail: { + label: string; + url: string; + }; + total: { + currency: string; + value: number; + }; + totalInclTax: { + currency: string; + value: number; + }; + totalQuantity: number; + type: string; + }; + productName: string; + productSku: string; + quantityShipped: undefined; + }[]; + tracking: { + number: string; + title: string; + }[]; + })[]; + shipping: { + amount: number; + code: string; + currency: string; + }; + shippingAddress: { + city: string; + company: string; + countryCode: string; + fax: string; + firstName: string; + lastName: string; + middleName: string; + postCode: string; + prefix: string; + region: string; + regionId: string; + street: string[]; + suffix: string; + telephone: string; + vatId: string; + country: string; + customAttributes: never[]; + }; + shippingMethod: null; + status: string; + subtotalExclTax: { + currency: string; + value: number; + }; + subtotalInclTax: { + currency: string; + value: number; + }; + taxes: never[]; + token: string; + totalGiftcard: { + currency: string; + value: number; + }; + totalQuantity: number; + totalShipping: { + currency: string; + value: number; + }; + totalTax: { + currency: string; + value: number; + }; +}; //# sourceMappingURL=mock.config.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/containers/CreateReturn.js b/scripts/__dropins__/storefront-order/containers/CreateReturn.js index df04cdc644..20c0c7f40b 100644 --- a/scripts/__dropins__/storefront-order/containers/CreateReturn.js +++ b/scripts/__dropins__/storefront-order/containers/CreateReturn.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as r,jsxs as N}from"@dropins/tools/preact-jsx-runtime.js";import{classes as B,Slot as H}from"@dropins/tools/lib.js";import{Icon as $,Header as W,InLineAlert as j,Button as M,Checkbox as G,CartItem as V,Image as Z}from"@dropins/tools/components.js";import{useState as w,useRef as D,useEffect as P,useCallback as F}from"@dropins/tools/preact-hooks.js";import{u as U,a as z}from"../chunks/ShippingStatusCard.js";import*as _ from"@dropins/tools/preact-compat.js";import{u as J}from"../chunks/useGetStoreConfig.js";import{createRef as K,Fragment as X}from"@dropins/tools/preact.js";import{s as Y,p as I,r as ee,m as te}from"../chunks/returnOrdersHelper.js";import{events as ne}from"@dropins/tools/event-bus.js";import{g as A}from"../chunks/getQueryParam.js";import{g as re,r as se,a as ae}from"../chunks/requestGuestReturn.js";import{s as ie}from"../chunks/setTaxStatus.js";import{S as ce,C as ue}from"../chunks/CartSummaryItem.js";import{a as oe}from"../chunks/OrderLoaders.js";import{useText as le}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getFormValues.js";import"../chunks/network-error.js";import"../chunks/transform-attributes-form.js";import"../fragments.js";import"../chunks/initialize.js";const de=a=>_.createElement("svg",{id:"Icon_Warning_Base",width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},_.createElement("g",{clipPath:"url(#clip0_841_1324)"},_.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.9949 2.30237L0.802734 21.6977H23.1977L11.9949 2.30237Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),_.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"})),_.createElement("defs",null,_.createElement("clipPath",{id:"clip0_841_1324"},_.createElement("rect",{width:24,height:21,fill:"white",transform:"translate(0 1.5)"})))),pe=a=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},_.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"}),_.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.75 12.762L10.2385 15.75L17.25 9",stroke:"currentColor"})),me=({onSuccess:a,onError:s,handleSetInLineAlert:i,orderData:l})=>{const[k,L]=w(!1),[o,R]=w({id:"",email:"",...l}),[v,x]=w("products"),[h,d]=w(!0),[g,f]=w([]),[C,t]=w([]),[m,e]=w([]),c=D([]);c.current.length!==g.length&&(c.current=g.map((n,p)=>c.current[p]||K())),P(()=>{const n=ne.on("order/data",p=>{var u;R(p);const O=Y(p);e(O),L(((u=A("orderRef"))==null?void 0:u.length)>20),d(!1)},{eager:!0});return()=>{n==null||n.off()}},[]),P(()=>{re("RMA_ITEM").then(n=>{n!=null&&n.length&&(t(n),d(!1))})},[]);const y=F(n=>{f(p=>p.findIndex(u=>(u==null?void 0:u.productSku)===(n==null?void 0:n.productSku))>-1?p.filter(u=>(u==null?void 0:u.productSku)!==(n==null?void 0:n.productSku)):[...p,n])},[]),S=F(n=>{x(n),i(),n==="products"&&f([])},[i]),E=F((n,p)=>{const O=g.map(u=>u.productSku===p?{...u,currentReturnOrderQuantity:n}:u);f(O)},[g]),Q=F(async(n,p)=>{if(!p)return;d(!0);const O={orderUid:o.id,contactEmail:o.email},u=I(c);k?ae({token:A("orderRef"),contactEmail:O.contactEmail,items:u,commentText:"."}).then(b=>{a==null||a(b),S("success"),i()}).catch(b=>{s==null||s(b.message),i({type:"error",heading:b.message})}):se({...O,items:u}).then(b=>{a==null||a(b),S("success"),i()}).catch(b=>{s==null||s(b.message),i({type:"error",heading:b.message})}),d(!1)},[S,s,a,i,o,k]);return{order:o,steps:v,loading:h,formsRef:c,attributesList:C,selectedProductList:g,itemsEligibleForReturn:m,handleSelectedProductList:y,handleSetQuantity:E,handleChangeStep:S,onSubmit:Q}},he={success:pe,warning:de,error:ce},ge=()=>{const[a,s]=w({type:"success",heading:""}),i=F(l=>{if(!(l!=null&&l.type)){s({type:"success",heading:""});return}const k=r($,{source:he[l.type]});s({...l,icon:k})},[]);return{inLineAlertProps:a,handleSetInLineAlert:i}},je=({className:a,orderData:s,slots:i,onSuccess:l,onError:k,routeReturnSuccess:L,showConfigurableOptions:o})=>{const R=le({headerText:"Order.CreateReturn.headerText",successTitle:"Order.CreateReturn.success.title",successMessage:"Order.CreateReturn.success.message",sender:"Order.CreateReturn.giftCard.sender",recipient:"Order.CreateReturn.giftCard.recipient",message:"Order.CreateReturn.giftCard.message",outOfStock:"Order.CreateReturn.stockStatus.outOfStock",nextStep:"Order.CreateReturn.buttons.nextStep",backStep:"Order.CreateReturn.buttons.backStep",submit:"Order.CreateReturn.buttons.submit",backStore:"Order.CreateReturn.buttons.backStore",downloadableCount:"Order.CreateReturn.downloadableCount",returnedItems:"Order.CreateReturn.returnedItems",configurationsListQuantity:"Order.CreateReturn.configurationsList.quantity"}),{inLineAlertProps:v,handleSetInLineAlert:x}=ge(),h=J(),{order:d,itemsEligibleForReturn:g,formsRef:f,attributesList:C,steps:t,loading:m,selectedProductList:e,handleSelectedProductList:c,handleSetQuantity:y,handleChangeStep:S,onSubmit:E}=me({orderData:s,onSuccess:l,onError:k,handleSetInLineAlert:x});if(m)return r("div",{children:r(oe,{})});if(!m&&!C.length)return r("div",{});const Q=(h==null?void 0:h.baseMediaUrl)??"",n={products:r(be,{itemsEligibleForReturn:g,placeholderImage:Q,taxConfig:ie((h==null?void 0:h.shoppingCartDisplayPrice)??0),slots:i,translations:R,loading:m,selectedProductList:e,handleSelectedProductList:c,showConfigurableOptions:o,handleSetQuantity:y,handleChangeStep:S}),attributes:r(ke,{placeholderImage:Q,slots:i,formsRef:f,loading:m,fieldsConfig:C,selectedProductList:e,handleChangeStep:S,translations:R,onSubmit:E}),success:r(fe,{translations:R,routeReturnSuccess:L,orderData:d}),error:null};return N("div",{className:B(["order-create-return",a]),children:[r(W,{title:R.headerText}),v.heading?r(j,{className:"order-create-return_notification",variant:"secondary","data-testid":"orderCreateReturnNotification",...v}):null,n[t]]})},fe=({routeReturnSuccess:a,translations:s,orderData:i})=>N("div",{className:"order-return-order-message",children:[r("p",{className:"order-return-order-message__title",children:s.successTitle}),r("p",{className:"order-return-order-message__subtitle",children:s.successMessage}),r(M,{href:(a==null?void 0:a(i))??"#",children:s.backStore})]}),be=({placeholderImage:a,itemsEligibleForReturn:s,slots:i,loading:l,taxConfig:k,translations:L,selectedProductList:o,handleSelectedProductList:R,showConfigurableOptions:v,handleSetQuantity:x,handleChangeStep:h})=>N("ul",{className:"order-return-order-product-list",children:[s==null?void 0:s.map((d,g)=>{const{quantityReturnRequested:f,quantityShipped:C,eligibleForReturn:t}=d,m=o.some(y=>(y==null?void 0:y.productSku)===d.productSku&&d.eligibleForReturn),e=C===f&&t||!t,c=C-f===0?f:C-f;return N("li",{className:B(["order-return-order-product-list__item",["order-return-order-product-list__item--blur",e]]),children:[r(G,{"data-testid":`key_${g}`,name:`key_${g}`,checked:m,disabled:e,onChange:()=>{R({...d,currentReturnOrderQuantity:1})}}),r(ue,{placeholderImage:a,loading:l,product:{...d,totalQuantity:c||1},itemType:"",taxConfig:k,translations:L,showConfigurableOptions:v,disabledIncrementer:!m,onQuantity:c>1?y=>{x(y,d.productSku)}:void 0}),r(H,{"data-testid":"returnOrderItem",name:"ReturnOrderItem",slot:i==null?void 0:i.ReturnOrderItem})]},d.id)}),r("li",{className:"order-return-order-product-list__item",children:r(M,{type:"button",onClick:()=>h("attributes"),disabled:!o.length,children:L.nextStep})})]}),ke=({placeholderImage:a,slots:s,formsRef:i,selectedProductList:l,loading:k,fieldsConfig:L,translations:o,handleChangeStep:R,onSubmit:v})=>{const{formData:x,errors:h,formRef:d,handleChange:g,handleBlur:f,handleSubmit:C}=U({fieldsConfig:ee(L,l==null?void 0:l.length),onSubmit:v});return N("form",{className:"order-return-reason-form",ref:d,onSubmit:C,name:"returnReasonForm",children:[l.map((t,m)=>{var p,O,u,b,T,q;const e=t==null?void 0:t.giftCard,c=t==null?void 0:t.product,y=te(L,m),S=`${t==null?void 0:t.id}_${m}`,E=(t==null?void 0:t.currentReturnOrderQuantity)??1,Q={...t!=null&&t.currentReturnOrderQuantity?{[o.configurationsListQuantity]:E}:{},...t.configurableOptions||{},...t.bundleOptions||{},...e!=null&&e.senderName?{[o.sender]:e==null?void 0:e.senderName}:{},...e!=null&&e.senderEmail?{[o.sender]:e==null?void 0:e.senderEmail}:{},...e!=null&&e.recipientName?{[o.recipient]:e==null?void 0:e.recipientName}:{},...e!=null&&e.recipientEmail?{[o.recipient]:e==null?void 0:e.recipientEmail}:{},...e!=null&&e.message?{[o.message]:e==null?void 0:e.message}:{},...t!=null&&t.downloadableLinks?{[`${(p=t==null?void 0:t.downloadableLinks)==null?void 0:p.count} ${o.downloadableCount}`]:(O=t==null?void 0:t.downloadableLinks)==null?void 0:O.result}:{}},n=(b=(u=c==null?void 0:c.thumbnail)==null?void 0:u.url)!=null&&b.length?c.thumbnail.url:a;return N(X,{children:[r(V,{loading:k,title:r("div",{"data-testid":"product-name",children:(T=t==null?void 0:t.product)==null?void 0:T.name}),sku:r("div",{children:c==null?void 0:c.sku}),image:r(Z,{src:n,alt:((q=c==null?void 0:c.thumbnail)==null?void 0:q.label)??"",loading:"lazy",width:"90",height:"120"}),configurations:Q}),r("form",{name:S,ref:i==null?void 0:i.current[m],"data-quantity":E,children:r(z,{className:"className",loading:k,fields:y,onChange:g,onBlur:f,errors:h,values:x})})]},t.id)}),r(H,{"data-testid":"returnFormActions",name:"ReturnFormActions",slot:s==null?void 0:s.ReturnFormActions,context:{handleChangeStep:R},children:N("div",{className:"order-return-reason-form__actions",children:[r(M,{variant:"secondary",type:"button",onClick:()=>{R("products")},children:o.backStep}),r(M,{children:o.submit})]})})]})};export{je as CreateReturn,je as default}; +import{jsx as n,jsxs as N}from"@dropins/tools/preact-jsx-runtime.js";import{classes as B,Slot as H}from"@dropins/tools/lib.js";import{Icon as $,Header as W,InLineAlert as j,Button as M,Checkbox as G,CartItem as V,Image as Z}from"@dropins/tools/components.js";import{useState as w,useRef as D,useEffect as P,useCallback as F}from"@dropins/tools/preact-hooks.js";import{u as U,a as z}from"../chunks/ShippingStatusCard.js";import*as _ from"@dropins/tools/preact-compat.js";import{u as J}from"../chunks/useGetStoreConfig.js";import{createRef as K,Fragment as X}from"@dropins/tools/preact.js";import{s as Y,p as I,r as ee,m as te}from"../chunks/returnOrdersHelper.js";import{events as re}from"@dropins/tools/event-bus.js";import{g as A}from"../chunks/getQueryParam.js";import{g as ne,r as se,a as ae}from"../chunks/requestGuestReturn.js";import{s as ie}from"../chunks/setTaxStatus.js";import{S as ce,C as ue}from"../chunks/CartSummaryItem.js";import{a as oe}from"../chunks/OrderLoaders.js";import{useText as le}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getFormValues.js";import"../chunks/network-error.js";import"../chunks/transform-attributes-form.js";import"../fragments.js";import"../chunks/initialize.js";const de=a=>_.createElement("svg",{id:"Icon_Warning_Base",width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},_.createElement("g",{clipPath:"url(#clip0_841_1324)"},_.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.9949 2.30237L0.802734 21.6977H23.1977L11.9949 2.30237Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),_.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"})),_.createElement("defs",null,_.createElement("clipPath",{id:"clip0_841_1324"},_.createElement("rect",{width:24,height:21,fill:"white",transform:"translate(0 1.5)"})))),pe=a=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},_.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"}),_.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.75 12.762L10.2385 15.75L17.25 9",stroke:"currentColor"})),me=({onSuccess:a,onError:s,handleSetInLineAlert:i,orderData:l})=>{const[k,L]=w(!1),[o,R]=w({id:"",email:"",...l}),[v,x]=w("products"),[h,d]=w(!0),[g,f]=w([]),[C,t]=w([]),[m,e]=w([]),c=D([]);c.current.length!==g.length&&(c.current=g.map((r,p)=>c.current[p]||K())),P(()=>{const r=re.on("order/data",p=>{var u;R(p);const O=Y(p);e(O),L(((u=A("orderRef"))==null?void 0:u.length)>20),d(!1)},{eager:!0});return()=>{r==null||r.off()}},[]),P(()=>{ne("RMA_ITEM").then(r=>{r!=null&&r.length&&(t(r),d(!1))})},[]);const y=F(r=>{f(p=>p.findIndex(u=>(u==null?void 0:u.productSku)===(r==null?void 0:r.productSku))>-1?p.filter(u=>(u==null?void 0:u.productSku)!==(r==null?void 0:r.productSku)):[...p,r])},[]),S=F(r=>{x(r),i(),r==="products"&&f([])},[i]),E=F((r,p)=>{const O=g.map(u=>u.productSku===p?{...u,currentReturnOrderQuantity:r}:u);f(O)},[g]),Q=F(async(r,p)=>{if(!p)return;d(!0);const O={orderUid:o.id,contactEmail:o.email},u=I(c);k?ae({token:A("orderRef"),contactEmail:O.contactEmail,items:u,commentText:"."}).then(b=>{a==null||a(b),S("success"),i()}).catch(b=>{s==null||s(b.message),i({type:"error",heading:b.message})}):se({...O,items:u}).then(b=>{a==null||a(b),S("success"),i()}).catch(b=>{s==null||s(b.message),i({type:"error",heading:b.message})}),d(!1)},[S,s,a,i,o,k]);return{order:o,steps:v,loading:h,formsRef:c,attributesList:C,selectedProductList:g,itemsEligibleForReturn:m,handleSelectedProductList:y,handleSetQuantity:E,handleChangeStep:S,onSubmit:Q}},he={success:pe,warning:de,error:ce},ge=()=>{const[a,s]=w({type:"success",heading:""}),i=F(l=>{if(!(l!=null&&l.type)){s({type:"success",heading:""});return}const k=n($,{source:he[l.type]});s({...l,icon:k})},[]);return{inLineAlertProps:a,handleSetInLineAlert:i}},je=({className:a,orderData:s,slots:i,onSuccess:l,onError:k,routeReturnSuccess:L,showConfigurableOptions:o})=>{const R=le({headerText:"Order.CreateReturn.headerText",successTitle:"Order.CreateReturn.success.title",successMessage:"Order.CreateReturn.success.message",sender:"Order.CreateReturn.giftCard.sender",recipient:"Order.CreateReturn.giftCard.recipient",message:"Order.CreateReturn.giftCard.message",outOfStock:"Order.CreateReturn.stockStatus.outOfStock",nextStep:"Order.CreateReturn.buttons.nextStep",backStep:"Order.CreateReturn.buttons.backStep",submit:"Order.CreateReturn.buttons.submit",backStore:"Order.CreateReturn.buttons.backStore",downloadableCount:"Order.CreateReturn.downloadableCount",returnedItems:"Order.CreateReturn.returnedItems",configurationsListQuantity:"Order.CreateReturn.configurationsList.quantity"}),{inLineAlertProps:v,handleSetInLineAlert:x}=ge(),h=J(),{order:d,itemsEligibleForReturn:g,formsRef:f,attributesList:C,steps:t,loading:m,selectedProductList:e,handleSelectedProductList:c,handleSetQuantity:y,handleChangeStep:S,onSubmit:E}=me({orderData:s,onSuccess:l,onError:k,handleSetInLineAlert:x});if(m)return n("div",{children:n(oe,{})});if(!m&&!C.length)return n("div",{});const Q=(h==null?void 0:h.baseMediaUrl)??"",r={products:n(be,{itemsEligibleForReturn:g,placeholderImage:Q,taxConfig:ie((h==null?void 0:h.shoppingOrderDisplayPrice)??0),slots:i,translations:R,loading:m,selectedProductList:e,handleSelectedProductList:c,showConfigurableOptions:o,handleSetQuantity:y,handleChangeStep:S}),attributes:n(ke,{placeholderImage:Q,slots:i,formsRef:f,loading:m,fieldsConfig:C,selectedProductList:e,handleChangeStep:S,translations:R,onSubmit:E}),success:n(fe,{translations:R,routeReturnSuccess:L,orderData:d}),error:null};return N("div",{className:B(["order-create-return",a]),children:[n(W,{title:R.headerText}),v.heading?n(j,{className:"order-create-return_notification",variant:"secondary","data-testid":"orderCreateReturnNotification",...v}):null,r[t]]})},fe=({routeReturnSuccess:a,translations:s,orderData:i})=>N("div",{className:"order-return-order-message",children:[n("p",{className:"order-return-order-message__title",children:s.successTitle}),n("p",{className:"order-return-order-message__subtitle",children:s.successMessage}),n(M,{href:(a==null?void 0:a(i))??"#",children:s.backStore})]}),be=({placeholderImage:a,itemsEligibleForReturn:s,slots:i,loading:l,taxConfig:k,translations:L,selectedProductList:o,handleSelectedProductList:R,showConfigurableOptions:v,handleSetQuantity:x,handleChangeStep:h})=>N("ul",{className:"order-return-order-product-list",children:[s==null?void 0:s.map((d,g)=>{const{quantityReturnRequested:f,quantityShipped:C,eligibleForReturn:t}=d,m=o.some(y=>(y==null?void 0:y.productSku)===d.productSku&&d.eligibleForReturn),e=C===f&&t||!t,c=C-f===0?f:C-f;return N("li",{className:B(["order-return-order-product-list__item",["order-return-order-product-list__item--blur",e]]),children:[n(G,{"data-testid":`key_${g}`,name:`key_${g}`,checked:m,disabled:e,onChange:()=>{R({...d,currentReturnOrderQuantity:1})}}),n(ue,{placeholderImage:a,loading:l,product:{...d,totalQuantity:c||1},itemType:"",taxConfig:k,translations:L,showConfigurableOptions:v,disabledIncrementer:!m,onQuantity:c>1?y=>{x(y,d.productSku)}:void 0}),n(H,{"data-testid":"returnOrderItem",name:"ReturnOrderItem",slot:i==null?void 0:i.ReturnOrderItem})]},d.id)}),n("li",{className:"order-return-order-product-list__item",children:n(M,{type:"button",onClick:()=>h("attributes"),disabled:!o.length,children:L.nextStep})})]}),ke=({placeholderImage:a,slots:s,formsRef:i,selectedProductList:l,loading:k,fieldsConfig:L,translations:o,handleChangeStep:R,onSubmit:v})=>{const{formData:x,errors:h,formRef:d,handleChange:g,handleBlur:f,handleSubmit:C}=U({fieldsConfig:ee(L,l==null?void 0:l.length),onSubmit:v});return N("form",{className:"order-return-reason-form",ref:d,onSubmit:C,name:"returnReasonForm",children:[l.map((t,m)=>{var p,O,u,b,T,q;const e=t==null?void 0:t.giftCard,c=t==null?void 0:t.product,y=te(L,m),S=`${t==null?void 0:t.id}_${m}`,E=(t==null?void 0:t.currentReturnOrderQuantity)??1,Q={...t!=null&&t.currentReturnOrderQuantity?{[o.configurationsListQuantity]:E}:{},...t.configurableOptions||{},...t.bundleOptions||{},...e!=null&&e.senderName?{[o.sender]:e==null?void 0:e.senderName}:{},...e!=null&&e.senderEmail?{[o.sender]:e==null?void 0:e.senderEmail}:{},...e!=null&&e.recipientName?{[o.recipient]:e==null?void 0:e.recipientName}:{},...e!=null&&e.recipientEmail?{[o.recipient]:e==null?void 0:e.recipientEmail}:{},...e!=null&&e.message?{[o.message]:e==null?void 0:e.message}:{},...t!=null&&t.downloadableLinks?{[`${(p=t==null?void 0:t.downloadableLinks)==null?void 0:p.count} ${o.downloadableCount}`]:(O=t==null?void 0:t.downloadableLinks)==null?void 0:O.result}:{}},r=(b=(u=c==null?void 0:c.thumbnail)==null?void 0:u.url)!=null&&b.length?c.thumbnail.url:a;return N(X,{children:[n(V,{loading:k,title:n("div",{"data-testid":"product-name",children:(T=t==null?void 0:t.product)==null?void 0:T.name}),sku:n("div",{children:c==null?void 0:c.sku}),image:n(Z,{src:r,alt:((q=c==null?void 0:c.thumbnail)==null?void 0:q.label)??"",loading:"lazy",width:"90",height:"120"}),configurations:Q}),n("form",{name:S,ref:i==null?void 0:i.current[m],"data-quantity":E,children:n(z,{className:"className",loading:k,fields:y,onChange:g,onBlur:f,errors:h,values:x})})]},t.id)}),n(H,{"data-testid":"returnFormActions",name:"ReturnFormActions",slot:s==null?void 0:s.ReturnFormActions,context:{handleChangeStep:R},children:N("div",{className:"order-return-reason-form__actions",children:[n(M,{variant:"secondary",type:"button",onClick:()=>{R("products")},children:o.backStep}),n(M,{children:o.submit})]})})]})};export{je as CreateReturn,je as default}; diff --git a/scripts/__dropins__/storefront-order/containers/CreateReturn/index.d.ts b/scripts/__dropins__/storefront-order/containers/CreateReturn/index.d.ts index 54f99d5c03..2fe07099cd 100644 --- a/scripts/__dropins__/storefront-order/containers/CreateReturn/index.d.ts +++ b/scripts/__dropins__/storefront-order/containers/CreateReturn/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './CreateReturn'; export { CreateReturn as default } from './CreateReturn'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/containers/CustomerDetails.js b/scripts/__dropins__/storefront-order/containers/CustomerDetails.js index 75f96d413f..ef53e099d7 100644 --- a/scripts/__dropins__/storefront-order/containers/CustomerDetails.js +++ b/scripts/__dropins__/storefront-order/containers/CustomerDetails.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as r,jsxs as c,Fragment as L}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as T,classes as _}from"@dropins/tools/lib.js";import{useMemo as S,useState as k,useEffect as E,useCallback as B}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact.js";import{events as z}from"@dropins/tools/event-bus.js";import{c as F}from"../chunks/network-error.js";import{g as q}from"../chunks/getAttributesForm.js";import{Icon as K,Price as G,Card as J,Header as Q}from"@dropins/tools/components.js";import{f as U}from"../chunks/returnOrdersHelper.js";import{f as X}from"../chunks/formatDateToLocale.js";import"../chunks/ShippingStatusCard.js";import*as u from"@dropins/tools/preact-compat.js";import{D as Y}from"../chunks/OrderLoaders.js";import{Text as ee,useText as te}from"@dropins/tools/i18n.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/transform-attributes-form.js";import"../chunks/getFormValues.js";const re=i=>u.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i},u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M17.93 14.8V18.75H5.97C4.75 18.75 3.75 17.97 3.75 17V6.5M3.75 6.5C3.75 5.53 4.74 4.75 5.97 4.75H15.94V8.25H5.97C4.75 8.25 3.75 7.47 3.75 6.5Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M19.35 11.64H14.04V14.81H19.35V11.64Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M17.9304 11.64V8.25H15.1504",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})),ne=i=>u.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i},u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M2.00718 5H22.1507C22.7047 5 23.1579 5.45323 23.1579 6.00718V7.51794C23.1579 7.51794 1.01007 7.58844 1 7.55823V6.00718C1 5.45323 1.45323 5 2.00718 5Z",stroke:"currentColor",strokeWidth:1}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M23.1579 9.78409V18.3451C23.1579 18.899 22.7047 19.3523 22.1507 19.3523H2.00718C1.45323 19.3523 1 18.899 1 18.3451V9.78409H23.1579Z",stroke:"currentColor",strokeWidth:1}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M3.01465 15.9682H8.40305",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round"}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M17.6192 17.5897C18.4535 17.5897 19.1299 16.9133 19.1299 16.0789C19.1299 15.2446 18.4535 14.5682 17.6192 14.5682C16.7848 14.5682 16.1084 15.2446 16.1084 16.0789C16.1084 16.9133 16.7848 17.5897 17.6192 17.5897Z",stroke:"currentColor",strokeWidth:1}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M19.8848 17.5897C20.7192 17.5897 21.3956 16.9133 21.3956 16.0789C21.3956 15.2446 20.7192 14.5682 19.8848 14.5682C19.0504 14.5682 18.374 15.2446 18.374 16.0789C18.374 16.9133 19.0504 17.5897 19.8848 17.5897Z",stroke:"currentColor",strokeWidth:1})),O=(i,e)=>{var d;const m=o=>{const s=Array.isArray(o.value)?o.value.join(" "):o==null?void 0:o.value;return o.label?`${o.label}: ${s}`:s};return(d=i[e])==null?void 0:d.map((o,s)=>r("p",{children:m(o)},`${o.value}${s}`))},oe=i=>{var s,t;const e=i&&i.length>0,m=e?(s=i[0])==null?void 0:s.name:"",d=e?(t=i[0])==null?void 0:t.code:"";return{selectedPaymentMethod:m,selectedPaymentMethodCode:d,hasToDisplayPaymentMethod:e&&m!==""}},ie=({loading:i,order:e,withHeader:m=!0,title:d,paymentIconsMap:o={},normalizeAddress:s,translations:t,slots:l})=>{var D,M,A,N;const g=!!(e!=null&&e.returnNumber),n=(D=e==null?void 0:e.returns)==null?void 0:D[0],h=S(()=>({checkmo:re,card:ne,...o}),[o]);if(!e||i)return r(Y,{});const a=(e==null?void 0:e.email)??"",p=(M=e==null?void 0:e.shipping)==null?void 0:M.code,f=(A=e==null?void 0:e.shipping)==null?void 0:A.amount,w=(N=e==null?void 0:e.shipping)==null?void 0:N.currency,x=e==null?void 0:e.payments,{selectedPaymentMethod:P,selectedPaymentMethodCode:y,hasToDisplayPaymentMethod:H}=oe(x),v=h[y],C=O(s,"shippingAddress")??[],b=O(s,"billingAddress")??[],I=c("div",{className:"order-customer-details-content__container-email",children:[r("div",{className:"order-customer-details-content__container-title",children:t==null?void 0:t.emailTitle}),r("p",{children:a})]}),V=g?c("div",{className:"order-customer-details-content__container-return-information","data-testid":"returnDetailsBlock",children:[r("div",{className:"order-customer-details-content__container-title",children:t==null?void 0:t.returnInformationTitle}),r("div",{className:"order-customer-details-content__container-description",children:r(T,{"data-testid":"OrderReturnInformation",name:"OrderReturnInformation",slot:l==null?void 0:l.OrderReturnInformation,context:n,children:c(L,{children:[c("p",{children:[t.createdReturnAt,r("span",{children:X(n==null?void 0:n.createdReturnAt)})]}),c("p",{children:[t.returnStatusLabel,r(ee,{id:`Order.CustomerDetails.returnStatus.${U(n==null?void 0:n.returnStatus)}`})]}),c("p",{children:[t.orderNumberLabel,r("span",{children:n==null?void 0:n.orderNumber})]})]})})})]}):null,W=C.length?c("div",{className:"order-customer-details-content__container-shipping_address",children:[r("div",{className:"order-customer-details-content__container-title",children:t.shippingAddressTitle}),r("div",{className:"order-customer-details-content__container-description",children:C})]}):null,j=b.length?c("div",{className:_(["order-customer-details-content__container-billing_address",["order-customer-details-content__container-billing_address--fullwidth",!C.length]]),children:[r("div",{className:"order-customer-details-content__container-title",children:t.billingAddressTitle}),r("div",{className:"order-customer-details-content__container-description",children:b})]}):null,R=H?c("div",{className:_(["order-customer-details-content__container-payment_methods",["order-customer-details-content__container-payment_methods--fullwidth",!p]]),children:[r("div",{className:"order-customer-details-content__container-title",children:t==null?void 0:t.paymentMethodsTitle}),c("p",{"data-testid":"payment_methods_description",className:_([["order-customer-details-content__container-payment_methods--icon",!!v]]),children:[r(T,{"data-testid":"PaymentMethodIcon",name:"PaymentMethodIcon",slot:l==null?void 0:l.PaymentMethodIcon,context:{selectedPaymentMethodCode:y},children:v?r(K,{source:v}):null}),P]})]}):null,Z=p?c("div",{className:"order-customer-details-content__container-shipping_methods",children:[r("div",{className:"order-customer-details-content__container-title",children:t==null?void 0:t.shippingMethodsTitle}),f?c("p",{"data-testid":"shipping_methods_price",children:[r(G,{amount:f,currency:w})," ",p]}):r("p",{"data-testid":"shipping_methods_placeholder",children:t==null?void 0:t.freeShipping})]}):null,$=g?V:c(L,{children:[j,Z,R]});return c(J,{"data-testid":"order-details",variant:"secondary",className:_(["order-customer-details-content"]),children:[m?r(Q,{title:d??(t==null?void 0:t.headerText)}):null,c("div",{className:_(["order-customer-details-content__container",["order-customer-details-content__container--no-margin",C.length||b.length]]),children:[I,W,$]})]})},se=["firstname","lastname","city","company","country_code","region","region_code","region_id","telephone","id","vat_id","postcode","street","street_2","default_shipping","default_billing"],ce=({orderData:i})=>{const[e,m]=k(!0),[d,o]=k(i),[s,t]=k([]);E(()=>{const n=z.on("order/data",h=>{o(h)},{eager:!0});return()=>{n==null||n.off()}},[]),E(()=>{q("shortRequest").then(n=>{if(n){const h=n.map(({name:a,orderNumber:p,label:f})=>({name:F(a),orderNumber:p,label:se.includes(a)?null:f}));t(h)}}).finally(()=>{m(!1)})},[]);const l=B(n=>{if(!s.length||!d||!d[n])return[];const h=Object.fromEntries(Object.entries(d[n]).map(([a,p])=>[a.toLowerCase(),p]));return s.filter(({name:a})=>h[a.toLowerCase()]).map(a=>({name:a.name,orderNumber:a.orderNumber,value:h[a.name.toLowerCase()],label:a.label}))},[s,d]),g=S(()=>({billingAddress:l("billingAddress"),shippingAddress:l("shippingAddress")}),[l]);return{order:d,normalizeAddress:g,loading:e}},Ae=({paymentIconsMap:i,orderData:e,title:m,className:d,slots:o})=>{const s=te({emailTitle:"Order.CustomerDetails.email.title",shippingAddressTitle:"Order.CustomerDetails.shippingAddress.title",shippingMethodsTitle:"Order.CustomerDetails.shippingMethods.title",billingAddressTitle:"Order.CustomerDetails.billingAddress.title",paymentMethodsTitle:"Order.CustomerDetails.paymentMethods.title",returnInformationTitle:"Order.CustomerDetails.returnInformation.title",headerText:"Order.CustomerDetails.headerText",freeShipping:"Order.CustomerDetails.freeShipping",createdReturnAt:"Order.CustomerDetails.orderReturnLabels.createdReturnAt",orderNumberLabel:"Order.CustomerDetails.orderReturnLabels.orderNumberLabel",returnStatusLabel:"Order.CustomerDetails.orderReturnLabels.returnStatusLabel"}),{order:t,normalizeAddress:l,loading:g}=ce({orderData:e});return r("div",{className:_(["order-customer-details",d]),children:r(ie,{slots:o,loading:g,order:t,title:m,paymentIconsMap:i,normalizeAddress:l,translations:s})})};export{Ae as CustomerDetails,Ae as default}; +import{jsx as r,jsxs as a,Fragment as T}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as E,classes as g}from"@dropins/tools/lib.js";import{useMemo as w,useState as k,useEffect as O,useCallback as z}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact.js";import{events as F}from"@dropins/tools/event-bus.js";import{c as q}from"../chunks/transform-attributes-form.js";import{g as K}from"../chunks/getAttributesForm.js";import{Icon as G,Price as J,Card as Q,Header as U}from"@dropins/tools/components.js";import{f as X}from"../chunks/returnOrdersHelper.js";import{f as Y}from"../chunks/formatDateToLocale.js";import"../chunks/ShippingStatusCard.js";import*as h from"@dropins/tools/preact-compat.js";import{D as ee}from"../chunks/OrderLoaders.js";import{Text as te,useText as re}from"@dropins/tools/i18n.js";import"../chunks/network-error.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getFormValues.js";const ne=s=>h.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M17.93 14.8V18.75H5.97C4.75 18.75 3.75 17.97 3.75 17V6.5M3.75 6.5C3.75 5.53 4.74 4.75 5.97 4.75H15.94V8.25H5.97C4.75 8.25 3.75 7.47 3.75 6.5Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M19.35 11.64H14.04V14.81H19.35V11.64Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M17.9304 11.64V8.25H15.1504",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})),ie=s=>h.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M2.00718 5H22.1507C22.7047 5 23.1579 5.45323 23.1579 6.00718V7.51794C23.1579 7.51794 1.01007 7.58844 1 7.55823V6.00718C1 5.45323 1.45323 5 2.00718 5Z",stroke:"currentColor",strokeWidth:1}),h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M23.1579 9.78409V18.3451C23.1579 18.899 22.7047 19.3523 22.1507 19.3523H2.00718C1.45323 19.3523 1 18.899 1 18.3451V9.78409H23.1579Z",stroke:"currentColor",strokeWidth:1}),h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M3.01465 15.9682H8.40305",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round"}),h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M17.6192 17.5897C18.4535 17.5897 19.1299 16.9133 19.1299 16.0789C19.1299 15.2446 18.4535 14.5682 17.6192 14.5682C16.7848 14.5682 16.1084 15.2446 16.1084 16.0789C16.1084 16.9133 16.7848 17.5897 17.6192 17.5897Z",stroke:"currentColor",strokeWidth:1}),h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M19.8848 17.5897C20.7192 17.5897 21.3956 16.9133 21.3956 16.0789C21.3956 15.2446 20.7192 14.5682 19.8848 14.5682C19.0504 14.5682 18.374 15.2446 18.374 16.0789C18.374 16.9133 19.0504 17.5897 19.8848 17.5897Z",stroke:"currentColor",strokeWidth:1})),S=(s,e)=>{var c;const u=n=>{const o=Array.isArray(n.value)?n.value.join(" "):n==null?void 0:n.value;return n.label?`${n.label}: ${o}`:o};return(c=s[e])==null?void 0:c.map((n,o)=>r("p",{children:u(n)},`${n.value}${o}`))},se=s=>{var o,t;const e=s&&s.length>0,u=e?(o=s[0])==null?void 0:o.name:"",c=e?(t=s[0])==null?void 0:t.code:"";return{selectedPaymentMethod:u,selectedPaymentMethodCode:c,hasToDisplayPaymentMethod:e&&u!==""}},oe=({loading:s,order:e,withHeader:u=!0,title:c,paymentIconsMap:n={},normalizeAddress:o,translations:t,slots:m})=>{var M,A,N,L;const p=!!(e!=null&&e.returnNumber),d=!!(e!=null&&e.isVirtual),i=(M=e==null?void 0:e.returns)==null?void 0:M[0],l=w(()=>({checkmo:ne,card:ie,...n}),[n]);if(!e||s)return r(ee,{});const _=(e==null?void 0:e.email)??"",f=(A=e==null?void 0:e.shipping)==null?void 0:A.code,y=(N=e==null?void 0:e.shipping)==null?void 0:N.amount,x=(L=e==null?void 0:e.shipping)==null?void 0:L.currency,P=e==null?void 0:e.payments,{selectedPaymentMethod:V,selectedPaymentMethodCode:D,hasToDisplayPaymentMethod:H}=se(P),v=l[D],C=S(o,"shippingAddress")??[],b=S(o,"billingAddress")??[],I=a("div",{className:"order-customer-details-content__container-email",children:[r("div",{className:"order-customer-details-content__container-title",children:t==null?void 0:t.emailTitle}),r("p",{children:_})]}),W=p?a("div",{className:"order-customer-details-content__container-return-information","data-testid":"returnDetailsBlock",children:[r("div",{className:"order-customer-details-content__container-title",children:t==null?void 0:t.returnInformationTitle}),r("div",{className:"order-customer-details-content__container-description",children:r(E,{"data-testid":"OrderReturnInformation",name:"OrderReturnInformation",slot:m==null?void 0:m.OrderReturnInformation,context:i,children:a(T,{children:[a("p",{children:[t.createdReturnAt,r("span",{children:Y(i==null?void 0:i.createdReturnAt)})]}),a("p",{children:[t.returnStatusLabel,r(te,{id:`Order.CustomerDetails.returnStatus.${X(i==null?void 0:i.returnStatus)}`})]}),a("p",{children:[t.orderNumberLabel,r("span",{children:i==null?void 0:i.orderNumber})]})]})})})]}):null,j=!d&&C.length?a("div",{className:"order-customer-details-content__container-shipping_address",children:[r("div",{className:"order-customer-details-content__container-title",children:t.shippingAddressTitle}),r("div",{className:"order-customer-details-content__container-description",children:C})]}):null,R=b.length?a("div",{className:g(["order-customer-details-content__container-billing_address",["order-customer-details-content__container-billing_address--fullwidth",!C.length||d]]),children:[r("div",{className:"order-customer-details-content__container-title",children:t.billingAddressTitle}),r("div",{className:"order-customer-details-content__container-description",children:b})]}):null,Z=H?a("div",{className:g(["order-customer-details-content__container-payment_methods",["order-customer-details-content__container-payment_methods--fullwidth",!f]]),children:[r("div",{className:"order-customer-details-content__container-title",children:t==null?void 0:t.paymentMethodsTitle}),a("p",{"data-testid":"payment_methods_description",className:g([["order-customer-details-content__container-payment_methods--icon",!!v]]),children:[r(E,{"data-testid":"PaymentMethodIcon",name:"PaymentMethodIcon",slot:m==null?void 0:m.PaymentMethodIcon,context:{selectedPaymentMethodCode:D},children:v?r(G,{source:v}):null}),V]})]}):null,$=f?a("div",{className:"order-customer-details-content__container-shipping_methods",children:[r("div",{className:"order-customer-details-content__container-title",children:t==null?void 0:t.shippingMethodsTitle}),y?a("p",{"data-testid":"shipping_methods_price",children:[r(J,{amount:y,currency:x})," ",f]}):r("p",{"data-testid":"shipping_methods_placeholder",children:t==null?void 0:t.freeShipping})]}):null,B=p?W:a(T,{children:[R,$,Z]});return a(Q,{"data-testid":"order-details",variant:"secondary",className:g(["order-customer-details-content"]),children:[u?r(U,{title:c??(t==null?void 0:t.headerText)}):null,a("div",{className:g(["order-customer-details-content__container",["order-customer-details-content__container--no-margin",C.length||b.length]]),children:[I,j,B]})]})},ce=["firstname","lastname","city","company","country_code","region","region_code","region_id","telephone","id","vat_id","postcode","street","street_2","default_shipping","default_billing"],ae=({orderData:s})=>{const[e,u]=k(!0),[c,n]=k(s),[o,t]=k([]);O(()=>{const d=F.on("order/data",i=>{n(i)},{eager:!0});return()=>{d==null||d.off()}},[]),O(()=>{K("shortRequest").then(d=>{if(d){const i=d.map(({name:l,orderNumber:_,label:f})=>({name:q(l),orderNumber:_,label:ce.includes(l)?null:f}));t(i)}}).finally(()=>{u(!1)})},[]);const m=z(d=>{if(!o.length||!c||!c[d])return[];const i=c[d]?Object.fromEntries(Object.entries(c[d]).map(([l,_])=>[l.toLowerCase(),_])):{};return o.filter(({name:l})=>i[l.toLowerCase()]).map(l=>({name:l.name,orderNumber:l.orderNumber,value:i[l.name.toLowerCase()],label:l.label}))},[o,c]),p=w(()=>({billingAddress:m("billingAddress"),shippingAddress:m("shippingAddress")}),[m]);return{order:c,normalizeAddress:p,loading:e}},Ne=({paymentIconsMap:s,orderData:e,title:u,className:c,slots:n})=>{const o=re({emailTitle:"Order.CustomerDetails.email.title",shippingAddressTitle:"Order.CustomerDetails.shippingAddress.title",shippingMethodsTitle:"Order.CustomerDetails.shippingMethods.title",billingAddressTitle:"Order.CustomerDetails.billingAddress.title",paymentMethodsTitle:"Order.CustomerDetails.paymentMethods.title",returnInformationTitle:"Order.CustomerDetails.returnInformation.title",headerText:"Order.CustomerDetails.headerText",freeShipping:"Order.CustomerDetails.freeShipping",createdReturnAt:"Order.CustomerDetails.orderReturnLabels.createdReturnAt",orderNumberLabel:"Order.CustomerDetails.orderReturnLabels.orderNumberLabel",returnStatusLabel:"Order.CustomerDetails.orderReturnLabels.returnStatusLabel"}),{order:t,normalizeAddress:m,loading:p}=ae({orderData:e});return r("div",{className:g(["order-customer-details",c]),children:r(oe,{slots:n,loading:p,order:t,title:u,paymentIconsMap:s,normalizeAddress:m,translations:o})})};export{Ne as CustomerDetails,Ne as default}; diff --git a/scripts/__dropins__/storefront-order/containers/CustomerDetails/index.d.ts b/scripts/__dropins__/storefront-order/containers/CustomerDetails/index.d.ts index 2a8a156d7a..471c18b904 100644 --- a/scripts/__dropins__/storefront-order/containers/CustomerDetails/index.d.ts +++ b/scripts/__dropins__/storefront-order/containers/CustomerDetails/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './CustomerDetails'; export { CustomerDetails as default } from './CustomerDetails'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/containers/OrderCancelForm.js b/scripts/__dropins__/storefront-order/containers/OrderCancelForm.js index 0933505eac..01a1c79ea2 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderCancelForm.js +++ b/scripts/__dropins__/storefront-order/containers/OrderCancelForm.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{O as C,O as F}from"../chunks/OrderCancelForm.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/components.js";import"../chunks/ShippingStatusCard.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/i18n.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/lib.js";import"@dropins/tools/preact.js";import"@dropins/tools/event-bus.js";import"../chunks/requestGuestOrderCancel.js";import"../fragments.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/initialize.js";import"../chunks/network-error.js";export{C as OrderCancelForm,F as default}; diff --git a/scripts/__dropins__/storefront-order/containers/OrderCancelForm/index.d.ts b/scripts/__dropins__/storefront-order/containers/OrderCancelForm/index.d.ts index b5fb104867..131c79a775 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderCancelForm/index.d.ts +++ b/scripts/__dropins__/storefront-order/containers/OrderCancelForm/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderCancelForm'; export { OrderCancelForm as default } from './OrderCancelForm'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/containers/OrderCostSummary.js b/scripts/__dropins__/storefront-order/containers/OrderCostSummary.js index 18e66d9b0a..2626e839c5 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderCostSummary.js +++ b/scripts/__dropins__/storefront-order/containers/OrderCostSummary.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as c,jsxs as i,Fragment as v}from"@dropins/tools/preact-jsx-runtime.js";import{classes as Z}from"@dropins/tools/lib.js";import{useState as g,useEffect as V}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact.js";import{events as b}from"@dropins/tools/event-bus.js";import{s as S}from"../chunks/setTaxStatus.js";import{Price as d,Icon as E,Accordion as f,AccordionSection as D,Card as I,Header as k}from"@dropins/tools/components.js";import{u as z}from"../chunks/useGetStoreConfig.js";import"../chunks/ShippingStatusCard.js";import*as _ from"@dropins/tools/preact-compat.js";import{O as A}from"../chunks/OrderLoaders.js";import{useText as B}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";const $=s=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},_.createElement("path",{d:"M7.74512 9.87701L12.0001 14.132L16.2551 9.87701",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square",strokeLinejoin:"round"})),j=s=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},_.createElement("path",{d:"M7.74512 14.132L12.0001 9.87701L16.2551 14.132",stroke:"#2B2B2B",strokeWidth:1.5,strokeLinecap:"square",strokeLinejoin:"round"})),P=s=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},_.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M22 6.25H22.75C22.75 5.83579 22.4142 5.5 22 5.5V6.25ZM22 9.27L22.2514 9.97663C22.5503 9.87029 22.75 9.58731 22.75 9.27H22ZM20.26 12.92L19.5534 13.1714L19.5539 13.1728L20.26 12.92ZM22 14.66H22.75C22.75 14.3433 22.551 14.0607 22.2528 13.9539L22 14.66ZM22 17.68V18.43C22.4142 18.43 22.75 18.0942 22.75 17.68H22ZM2 17.68H1.25C1.25 18.0942 1.58579 18.43 2 18.43V17.68ZM2 14.66L1.74865 13.9534C1.44969 14.0597 1.25 14.3427 1.25 14.66H2ZM3.74 11.01L4.44663 10.7586L4.44611 10.7572L3.74 11.01ZM2 9.27H1.25C1.25 9.58675 1.44899 9.86934 1.7472 9.97611L2 9.27ZM2 6.25V5.5C1.58579 5.5 1.25 5.83579 1.25 6.25H2ZM21.25 6.25V9.27H22.75V6.25H21.25ZM21.7486 8.56337C19.8706 9.23141 18.8838 11.2889 19.5534 13.1714L20.9666 12.6686C20.5762 11.5711 21.1494 10.3686 22.2514 9.97663L21.7486 8.56337ZM19.5539 13.1728C19.9195 14.1941 20.7259 15.0005 21.7472 15.3661L22.2528 13.9539C21.6541 13.7395 21.1805 13.2659 20.9661 12.6672L19.5539 13.1728ZM21.25 14.66V17.68H22.75V14.66H21.25ZM22 16.93H2V18.43H22V16.93ZM2.75 17.68V14.66H1.25V17.68H2.75ZM2.25135 15.3666C4.12941 14.6986 5.11623 12.6411 4.44663 10.7586L3.03337 11.2614C3.42377 12.3589 2.85059 13.5614 1.74865 13.9534L2.25135 15.3666ZM4.44611 10.7572C4.08045 9.73588 3.27412 8.92955 2.2528 8.56389L1.7472 9.97611C2.34588 10.1905 2.81955 10.6641 3.03389 11.2628L4.44611 10.7572ZM2.75 9.27V6.25H1.25V9.27H2.75ZM2 7H22V5.5H2V7ZM7.31 6.74V18.17H8.81V6.74H7.31ZM17.0997 8.39967L11.0397 14.4597L12.1003 15.5203L18.1603 9.46033L17.0997 8.39967ZM12.57 9.67C12.57 9.87231 12.4159 10 12.27 10V11.5C13.2839 11.5 14.07 10.6606 14.07 9.67H12.57ZM12.27 10C12.1241 10 11.97 9.87231 11.97 9.67H10.47C10.47 10.6606 11.2561 11.5 12.27 11.5V10ZM11.97 9.67C11.97 9.46769 12.1241 9.34 12.27 9.34V7.84C11.2561 7.84 10.47 8.67938 10.47 9.67H11.97ZM12.27 9.34C12.4159 9.34 12.57 9.46769 12.57 9.67H14.07C14.07 8.67938 13.2839 7.84 12.27 7.84V9.34ZM17.22 14.32C17.22 14.5223 17.0659 14.65 16.92 14.65V16.15C17.9339 16.15 18.72 15.3106 18.72 14.32H17.22ZM16.92 14.65C16.7741 14.65 16.62 14.5223 16.62 14.32H15.12C15.12 15.3106 15.9061 16.15 16.92 16.15V14.65ZM16.62 14.32C16.62 14.1177 16.7741 13.99 16.92 13.99V12.49C15.9061 12.49 15.12 13.3294 15.12 14.32H16.62ZM16.92 13.99C17.0659 13.99 17.22 14.1177 17.22 14.32H18.72C18.72 13.3294 17.9339 12.49 16.92 12.49V13.99Z",fill:"#3D3D3D"})),W=({orderData:s,config:e})=>{const[t,n]=g(!0),[u,r]=g(s),[l,m]=g(null);return V(()=>{if(e){const{shoppingCartDisplayPrice:o,shoppingOrdersDisplayShipping:a,shoppingOrdersDisplaySubtotal:h,...y}=e;m(p=>({...p,...y,shoppingCartDisplayPrice:S(o),shoppingOrdersDisplayShipping:S(a),shoppingOrdersDisplaySubtotal:S(h)})),n(!1)}},[e]),V(()=>{const o=b.on("order/data",a=>{r(a)},{eager:!0});return()=>{o==null||o.off()}},[]),{loading:t,storeConfig:l,order:u}},mt=({withHeader:s,orderData:e,children:t,className:n,...u})=>{const r=z(),{loading:l,storeConfig:m,order:o}=W({orderData:e,config:r}),a=B({subtotal:"Order.OrderCostSummary.subtotal.title",shipping:"Order.OrderCostSummary.shipping.title",freeShipping:"Order.OrderCostSummary.shipping.freeShipping",tax:"Order.OrderCostSummary.tax.title",incl:"Order.OrderCostSummary.tax.incl",excl:"Order.OrderCostSummary.tax.excl",discount:"Order.OrderCostSummary.discount.title",discountSubtitle:"Order.OrderCostSummary.discount.subtitle",total:"Order.OrderCostSummary.total.title",accordionTitle:"Order.OrderCostSummary.tax.accordionTitle",accordionTotalTax:"Order.OrderCostSummary.tax.accordionTotalTax",totalExcludingTaxes:"Order.OrderCostSummary.tax.totalExcludingTaxes",headerText:"Order.OrderCostSummary.headerText"});return c("div",{...u,className:Z(["order-cost-summary",n]),children:c(K,{order:o,withHeader:s,loading:l,storeConfig:m,translations:a})})},q=({translations:s,order:e,subtotalInclTax:t,subtotalExclTax:n,shoppingOrdersDisplaySubtotal:u})=>{var h,y,p,x;const r=u.taxIncluded,l=u.taxExcluded,m=r&&!l?i(v,{children:[i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.subtotal}),c(d,{className:"order-cost-summary-content__description--normal-price",weight:"normal",currency:(h=e==null?void 0:e.subtotalInclTax)==null?void 0:h.currency,amount:t})]}),c("div",{className:"order-cost-summary-content__description--subheader",children:c("span",{children:s.incl})})]}):null,o=l&&!r?i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.subtotal}),c(d,{className:"order-cost-summary-content__description--normal-price",weight:"normal",currency:(y=e==null?void 0:e.subtotalExclTax)==null?void 0:y.currency,amount:n})]}):null,a=l&&r?i(v,{children:[i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.subtotal}),c(d,{className:"order-cost-summary-content__description--normal-price",weight:"normal",currency:(p=e==null?void 0:e.subtotalInclTax)==null?void 0:p.currency,amount:t})]}),i("div",{className:"order-cost-summary-content__description--subheader",children:[c(d,{currency:(x=e==null?void 0:e.subtotalExclTax)==null?void 0:x.currency,amount:n,size:"small",weight:"bold"})," ",c("span",{children:s.excl})]})]}):null;return i("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--subtotal",children:[m,o,a]})},F=({translations:s,shoppingOrdersDisplayShipping:e,order:t,totalShipping:n})=>{var u,r,l,m;return t!=null&&t.isVirtual?null:i("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--shipping",children:[i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.shipping}),(u=t==null?void 0:t.totalShipping)!=null&&u.value?c(d,{weight:"normal",currency:(r=t==null?void 0:t.totalShipping)==null?void 0:r.currency,amount:n}):c("span",{children:s.freeShipping})]}),i("div",{className:"order-cost-summary-content__description--subheader",children:[e.taxIncluded&&e.taxExcluded?i(v,{children:[c(d,{weight:"normal",currency:(l=t==null?void 0:t.totalShipping)==null?void 0:l.currency,amount:(m=t==null?void 0:t.totalShipping)==null?void 0:m.value,size:"small"}),i("span",{children:[" ",s.excl]})]}):null,e.taxIncluded&&!e.taxExcluded?c("span",{children:s.incl}):null]})]})},U=({translations:s,order:e,totalGiftcardValue:t,totalGiftcardCurrency:n})=>{var r,l,m,o;const u=(r=e==null?void 0:e.discounts)==null?void 0:r.every(a=>a.amount.value===0);return!((l=e==null?void 0:e.discounts)!=null&&l.length)&&(u||!t||t<1)||(m=e==null?void 0:e.discounts)!=null&&m.length&&u?null:i("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--discount",children:[i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.discount}),c("span",{children:(o=e==null?void 0:e.discounts)==null?void 0:o.map(({amount:a},h)=>{const p=((a==null?void 0:a.value)??0)+t;return p===0?null:c(d,{weight:"normal",sale:!0,currency:a==null?void 0:a.currency,amount:-p},`${a==null?void 0:a.value}${h}`)})})]}),t>0?i("div",{className:"order-cost-summary-content__description--subheader",children:[i("span",{children:[c(E,{source:P,size:"16"}),c("span",{children:s.discountSubtitle.toLocaleUpperCase()})]}),c(d,{weight:"normal",sale:!0,currency:n,amount:-t})]}):null]})},G=({order:s})=>{var e;return c("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--coupon",children:(e=s==null?void 0:s.coupons)==null?void 0:e.map((t,n)=>c("div",{className:"order-cost-summary-content__description--header",children:c("span",{children:t.code})},`${t==null?void 0:t.code}${n}`))})},R=({translations:s,renderTaxAccordion:e,totalAccordionTaxValue:t,order:n})=>{var l,m,o;const[u,r]=g(!1);return e?c(f,{"data-testid":"tax-accordionTaxes",className:"order-cost-summary-content__accordion",iconOpen:$,iconClose:j,children:i(D,{onStateChange:r,title:s.accordionTitle,secondaryText:c(v,{children:u?null:c(d,{weight:"normal",amount:t,currency:(m=n==null?void 0:n.totalTax)==null?void 0:m.currency})}),renderContentWhenClosed:!1,children:[(o=n==null?void 0:n.taxes)==null?void 0:o.map((a,h)=>{var y,p,x;return i("div",{className:"order-cost-summary-content__accordion-row",children:[c("p",{children:a==null?void 0:a.title}),c("p",{children:c(d,{weight:"normal",amount:(y=a==null?void 0:a.amount)==null?void 0:y.value,currency:(p=a==null?void 0:a.amount)==null?void 0:p.currency})})]},`${(x=a==null?void 0:a.amount)==null?void 0:x.value}${h}`)}),i("div",{className:"order-cost-summary-content__accordion-row order-cost-summary-content__accordion-total",children:[c("p",{children:s.accordionTotalTax}),c("p",{children:c(d,{weight:"normal",amount:t,currency:n.totalTax.currency,size:"medium"})})]})]})}):c("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--tax",children:i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.tax}),c(d,{currency:(l=n==null?void 0:n.totalTax)==null?void 0:l.currency,amount:n==null?void 0:n.totalTax.value,weight:"normal",size:"small"})]})})},J=({translations:s,shoppingOrdersDisplaySubtotal:e,order:t})=>{var n,u,r,l;return i("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--total",children:[i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.total}),c(d,{currency:(n=t==null?void 0:t.grandTotal)==null?void 0:n.currency,amount:(u=t==null?void 0:t.grandTotal)==null?void 0:u.value,weight:"bold",size:"medium"})]}),e.taxExcluded&&e.taxIncluded?i("div",{className:"order-cost-summary-content__description--subheader",children:[c("span",{children:s.totalExcludingTaxes}),c(d,{currency:(r=t==null?void 0:t.grandTotal)==null?void 0:r.currency,amount:((l=t==null?void 0:t.grandTotal)==null?void 0:l.value)-(t==null?void 0:t.totalTax.value),weight:"normal",size:"small"})]}):null]})},K=({translations:s,loading:e,storeConfig:t,order:n,withHeader:u=!0})=>{var p,x,w,O,T,L,M;if(e||!n)return c(A,{});const r=((p=n==null?void 0:n.totalGiftcard)==null?void 0:p.value)??0,l=((x=n.totalGiftcard)==null?void 0:x.currency)??"",m=((w=n.subtotalInclTax)==null?void 0:w.value)??0,o=((O=n.subtotalExclTax)==null?void 0:O.value)??0,a=((T=n.totalShipping)==null?void 0:T.value)??0,h=!!((L=n==null?void 0:n.taxes)!=null&&L.length)&&(t==null?void 0:t.shoppingOrdersDisplayFullSummary),y=h?(M=n==null?void 0:n.taxes)==null?void 0:M.reduce((N,C)=>{var H;return+((H=C==null?void 0:C.amount)==null?void 0:H.value)+N},0):0;return i(I,{variant:"secondary",className:Z(["order-cost-summary-content"]),children:[u?c(k,{title:s.headerText}):null,i("div",{className:"order-cost-summary-content__wrapper",children:[c(q,{translations:s,order:n,subtotalInclTax:m,subtotalExclTax:o,shoppingOrdersDisplaySubtotal:t==null?void 0:t.shoppingOrdersDisplaySubtotal}),c(F,{translations:s,order:n,totalShipping:a,shoppingOrdersDisplayShipping:t==null?void 0:t.shoppingOrdersDisplayShipping}),c(U,{translations:s,order:n,totalGiftcardValue:r,totalGiftcardCurrency:l}),c(G,{order:n}),c(R,{order:n,translations:s,renderTaxAccordion:h,totalAccordionTaxValue:y}),c(J,{translations:s,shoppingOrdersDisplaySubtotal:t==null?void 0:t.shoppingOrdersDisplaySubtotal,order:n})]})]})};export{mt as OrderCostSummary,mt as default}; +import{jsx as c,jsxs as i,Fragment as v}from"@dropins/tools/preact-jsx-runtime.js";import{classes as Z}from"@dropins/tools/lib.js";import{useState as g,useEffect as V}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact.js";import{events as b}from"@dropins/tools/event-bus.js";import{s as S}from"../chunks/setTaxStatus.js";import{Price as d,Icon as E,Accordion as f,AccordionSection as I,Card as k,Header as D}from"@dropins/tools/components.js";import{u as z}from"../chunks/useGetStoreConfig.js";import"../chunks/ShippingStatusCard.js";import*as _ from"@dropins/tools/preact-compat.js";import{O as A}from"../chunks/OrderLoaders.js";import{useText as $}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";const j=s=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},_.createElement("path",{d:"M7.74512 9.87701L12.0001 14.132L16.2551 9.87701",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square",strokeLinejoin:"round"})),B=s=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},_.createElement("path",{d:"M7.74512 14.132L12.0001 9.87701L16.2551 14.132",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square",strokeLinejoin:"round"})),P=s=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},_.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M22 6.25H22.75C22.75 5.83579 22.4142 5.5 22 5.5V6.25ZM22 9.27L22.2514 9.97663C22.5503 9.87029 22.75 9.58731 22.75 9.27H22ZM20.26 12.92L19.5534 13.1714L19.5539 13.1728L20.26 12.92ZM22 14.66H22.75C22.75 14.3433 22.551 14.0607 22.2528 13.9539L22 14.66ZM22 17.68V18.43C22.4142 18.43 22.75 18.0942 22.75 17.68H22ZM2 17.68H1.25C1.25 18.0942 1.58579 18.43 2 18.43V17.68ZM2 14.66L1.74865 13.9534C1.44969 14.0597 1.25 14.3427 1.25 14.66H2ZM3.74 11.01L4.44663 10.7586L4.44611 10.7572L3.74 11.01ZM2 9.27H1.25C1.25 9.58675 1.44899 9.86934 1.7472 9.97611L2 9.27ZM2 6.25V5.5C1.58579 5.5 1.25 5.83579 1.25 6.25H2ZM21.25 6.25V9.27H22.75V6.25H21.25ZM21.7486 8.56337C19.8706 9.23141 18.8838 11.2889 19.5534 13.1714L20.9666 12.6686C20.5762 11.5711 21.1494 10.3686 22.2514 9.97663L21.7486 8.56337ZM19.5539 13.1728C19.9195 14.1941 20.7259 15.0005 21.7472 15.3661L22.2528 13.9539C21.6541 13.7395 21.1805 13.2659 20.9661 12.6672L19.5539 13.1728ZM21.25 14.66V17.68H22.75V14.66H21.25ZM22 16.93H2V18.43H22V16.93ZM2.75 17.68V14.66H1.25V17.68H2.75ZM2.25135 15.3666C4.12941 14.6986 5.11623 12.6411 4.44663 10.7586L3.03337 11.2614C3.42377 12.3589 2.85059 13.5614 1.74865 13.9534L2.25135 15.3666ZM4.44611 10.7572C4.08045 9.73588 3.27412 8.92955 2.2528 8.56389L1.7472 9.97611C2.34588 10.1905 2.81955 10.6641 3.03389 11.2628L4.44611 10.7572ZM2.75 9.27V6.25H1.25V9.27H2.75ZM2 7H22V5.5H2V7ZM7.31 6.74V18.17H8.81V6.74H7.31ZM17.0997 8.39967L11.0397 14.4597L12.1003 15.5203L18.1603 9.46033L17.0997 8.39967ZM12.57 9.67C12.57 9.87231 12.4159 10 12.27 10V11.5C13.2839 11.5 14.07 10.6606 14.07 9.67H12.57ZM12.27 10C12.1241 10 11.97 9.87231 11.97 9.67H10.47C10.47 10.6606 11.2561 11.5 12.27 11.5V10ZM11.97 9.67C11.97 9.46769 12.1241 9.34 12.27 9.34V7.84C11.2561 7.84 10.47 8.67938 10.47 9.67H11.97ZM12.27 9.34C12.4159 9.34 12.57 9.46769 12.57 9.67H14.07C14.07 8.67938 13.2839 7.84 12.27 7.84V9.34ZM17.22 14.32C17.22 14.5223 17.0659 14.65 16.92 14.65V16.15C17.9339 16.15 18.72 15.3106 18.72 14.32H17.22ZM16.92 14.65C16.7741 14.65 16.62 14.5223 16.62 14.32H15.12C15.12 15.3106 15.9061 16.15 16.92 16.15V14.65ZM16.62 14.32C16.62 14.1177 16.7741 13.99 16.92 13.99V12.49C15.9061 12.49 15.12 13.3294 15.12 14.32H16.62ZM16.92 13.99C17.0659 13.99 17.22 14.1177 17.22 14.32H18.72C18.72 13.3294 17.9339 12.49 16.92 12.49V13.99Z",fill:"currentColor"})),W=({orderData:s,config:e})=>{const[t,n]=g(!0),[u,r]=g(s),[l,m]=g(null);return V(()=>{if(e){const{shoppingOrderDisplayPrice:o,shoppingOrdersDisplayShipping:a,shoppingOrdersDisplaySubtotal:h,...y}=e;m(p=>({...p,...y,shoppingOrderDisplayPrice:S(o),shoppingOrdersDisplayShipping:S(a),shoppingOrdersDisplaySubtotal:S(h)})),n(!1)}},[e]),V(()=>{const o=b.on("order/data",a=>{r(a)},{eager:!0});return()=>{o==null||o.off()}},[]),{loading:t,storeConfig:l,order:u}},mt=({withHeader:s,orderData:e,children:t,className:n,...u})=>{const r=z(),{loading:l,storeConfig:m,order:o}=W({orderData:e,config:r}),a=$({subtotal:"Order.OrderCostSummary.subtotal.title",shipping:"Order.OrderCostSummary.shipping.title",freeShipping:"Order.OrderCostSummary.shipping.freeShipping",tax:"Order.OrderCostSummary.tax.title",incl:"Order.OrderCostSummary.tax.incl",excl:"Order.OrderCostSummary.tax.excl",discount:"Order.OrderCostSummary.discount.title",discountSubtitle:"Order.OrderCostSummary.discount.subtitle",total:"Order.OrderCostSummary.total.title",accordionTitle:"Order.OrderCostSummary.tax.accordionTitle",accordionTotalTax:"Order.OrderCostSummary.tax.accordionTotalTax",totalExcludingTaxes:"Order.OrderCostSummary.tax.totalExcludingTaxes",headerText:"Order.OrderCostSummary.headerText"});return c("div",{...u,className:Z(["order-cost-summary",n]),children:c(K,{order:o,withHeader:s,loading:l,storeConfig:m,translations:a})})},q=({translations:s,order:e,subtotalInclTax:t,subtotalExclTax:n,shoppingOrdersDisplaySubtotal:u})=>{var h,y,p,x;const r=u.taxIncluded,l=u.taxExcluded,m=r&&!l?i(v,{children:[i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.subtotal}),c(d,{className:"order-cost-summary-content__description--normal-price",weight:"normal",currency:(h=e==null?void 0:e.subtotalInclTax)==null?void 0:h.currency,amount:t})]}),c("div",{className:"order-cost-summary-content__description--subheader",children:c("span",{children:s.incl})})]}):null,o=l&&!r?i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.subtotal}),c(d,{className:"order-cost-summary-content__description--normal-price",weight:"normal",currency:(y=e==null?void 0:e.subtotalExclTax)==null?void 0:y.currency,amount:n})]}):null,a=l&&r?i(v,{children:[i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.subtotal}),c(d,{className:"order-cost-summary-content__description--normal-price",weight:"normal",currency:(p=e==null?void 0:e.subtotalInclTax)==null?void 0:p.currency,amount:t})]}),i("div",{className:"order-cost-summary-content__description--subheader",children:[c(d,{currency:(x=e==null?void 0:e.subtotalExclTax)==null?void 0:x.currency,amount:n,size:"small",weight:"bold"})," ",c("span",{children:s.excl})]})]}):null;return i("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--subtotal",children:[m,o,a]})},F=({translations:s,shoppingOrdersDisplayShipping:e,order:t,totalShipping:n})=>{var u,r,l,m;return t!=null&&t.isVirtual?null:i("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--shipping",children:[i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.shipping}),(u=t==null?void 0:t.totalShipping)!=null&&u.value?c(d,{weight:"normal",currency:(r=t==null?void 0:t.totalShipping)==null?void 0:r.currency,amount:n}):c("span",{children:s.freeShipping})]}),i("div",{className:"order-cost-summary-content__description--subheader",children:[e.taxIncluded&&e.taxExcluded?i(v,{children:[c(d,{weight:"normal",currency:(l=t==null?void 0:t.totalShipping)==null?void 0:l.currency,amount:(m=t==null?void 0:t.totalShipping)==null?void 0:m.value,size:"small"}),i("span",{children:[" ",s.excl]})]}):null,e.taxIncluded&&!e.taxExcluded?c("span",{children:s.incl}):null]})]})},U=({translations:s,order:e,totalGiftcardValue:t,totalGiftcardCurrency:n})=>{var r,l,m,o;const u=(r=e==null?void 0:e.discounts)==null?void 0:r.every(a=>a.amount.value===0);return!((l=e==null?void 0:e.discounts)!=null&&l.length)&&(u||!t||t<1)||(m=e==null?void 0:e.discounts)!=null&&m.length&&u?null:i("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--discount",children:[i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.discount}),c("span",{children:(o=e==null?void 0:e.discounts)==null?void 0:o.map(({amount:a},h)=>{const p=((a==null?void 0:a.value)??0)+t;return p===0?null:c(d,{weight:"normal",sale:!0,currency:a==null?void 0:a.currency,amount:-p},`${a==null?void 0:a.value}${h}`)})})]}),t>0?i("div",{className:"order-cost-summary-content__description--subheader",children:[i("span",{children:[c(E,{source:P,size:"16"}),c("span",{children:s.discountSubtitle.toLocaleUpperCase()})]}),c(d,{weight:"normal",sale:!0,currency:n,amount:-t})]}):null]})},G=({order:s})=>{var e;return c("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--coupon",children:(e=s==null?void 0:s.coupons)==null?void 0:e.map((t,n)=>c("div",{className:"order-cost-summary-content__description--header",children:c("span",{children:t.code})},`${t==null?void 0:t.code}${n}`))})},R=({translations:s,renderTaxAccordion:e,totalAccordionTaxValue:t,order:n})=>{var l,m,o;const[u,r]=g(!1);return e?c(f,{"data-testid":"tax-accordionTaxes",className:"order-cost-summary-content__accordion",iconOpen:j,iconClose:B,children:i(I,{onStateChange:r,title:s.accordionTitle,secondaryText:c(v,{children:u?null:c(d,{weight:"normal",amount:t,currency:(m=n==null?void 0:n.totalTax)==null?void 0:m.currency})}),renderContentWhenClosed:!1,children:[(o=n==null?void 0:n.taxes)==null?void 0:o.map((a,h)=>{var y,p,x;return i("div",{className:"order-cost-summary-content__accordion-row",children:[c("p",{children:a==null?void 0:a.title}),c("p",{children:c(d,{weight:"normal",amount:(y=a==null?void 0:a.amount)==null?void 0:y.value,currency:(p=a==null?void 0:a.amount)==null?void 0:p.currency})})]},`${(x=a==null?void 0:a.amount)==null?void 0:x.value}${h}`)}),i("div",{className:"order-cost-summary-content__accordion-row order-cost-summary-content__accordion-total",children:[c("p",{children:s.accordionTotalTax}),c("p",{children:c(d,{weight:"normal",amount:t,currency:n.totalTax.currency,size:"medium"})})]})]})}):c("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--tax",children:i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.tax}),c(d,{currency:(l=n==null?void 0:n.totalTax)==null?void 0:l.currency,amount:n==null?void 0:n.totalTax.value,weight:"normal",size:"small"})]})})},J=({translations:s,shoppingOrdersDisplaySubtotal:e,order:t})=>{var n,u,r,l;return i("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--total",children:[i("div",{className:"order-cost-summary-content__description--header",children:[c("span",{children:s.total}),c(d,{currency:(n=t==null?void 0:t.grandTotal)==null?void 0:n.currency,amount:(u=t==null?void 0:t.grandTotal)==null?void 0:u.value,weight:"bold",size:"medium"})]}),e.taxExcluded&&e.taxIncluded?i("div",{className:"order-cost-summary-content__description--subheader",children:[c("span",{children:s.totalExcludingTaxes}),c(d,{currency:(r=t==null?void 0:t.grandTotal)==null?void 0:r.currency,amount:((l=t==null?void 0:t.grandTotal)==null?void 0:l.value)-(t==null?void 0:t.totalTax.value),weight:"normal",size:"small"})]}):null]})},K=({translations:s,loading:e,storeConfig:t,order:n,withHeader:u=!0})=>{var p,x,O,w,T,L,M;if(e||!n)return c(A,{});const r=((p=n==null?void 0:n.totalGiftcard)==null?void 0:p.value)??0,l=((x=n.totalGiftcard)==null?void 0:x.currency)??"",m=((O=n.subtotalInclTax)==null?void 0:O.value)??0,o=((w=n.subtotalExclTax)==null?void 0:w.value)??0,a=((T=n.totalShipping)==null?void 0:T.value)??0,h=!!((L=n==null?void 0:n.taxes)!=null&&L.length)&&(t==null?void 0:t.shoppingOrdersDisplayFullSummary),y=h?(M=n==null?void 0:n.taxes)==null?void 0:M.reduce((N,C)=>{var H;return+((H=C==null?void 0:C.amount)==null?void 0:H.value)+N},0):0;return i(k,{variant:"secondary",className:Z(["order-cost-summary-content"]),children:[u?c(D,{title:s.headerText}):null,i("div",{className:"order-cost-summary-content__wrapper",children:[c(q,{translations:s,order:n,subtotalInclTax:m,subtotalExclTax:o,shoppingOrdersDisplaySubtotal:t==null?void 0:t.shoppingOrdersDisplaySubtotal}),c(F,{translations:s,order:n,totalShipping:a,shoppingOrdersDisplayShipping:t==null?void 0:t.shoppingOrdersDisplayShipping}),c(U,{translations:s,order:n,totalGiftcardValue:r,totalGiftcardCurrency:l}),c(G,{order:n}),c(R,{order:n,translations:s,renderTaxAccordion:h,totalAccordionTaxValue:y}),c(J,{translations:s,shoppingOrdersDisplaySubtotal:t==null?void 0:t.shoppingOrdersDisplaySubtotal,order:n})]})]})};export{mt as OrderCostSummary,mt as default}; diff --git a/scripts/__dropins__/storefront-order/containers/OrderCostSummary/index.d.ts b/scripts/__dropins__/storefront-order/containers/OrderCostSummary/index.d.ts index c93765846d..52da0e08cf 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderCostSummary/index.d.ts +++ b/scripts/__dropins__/storefront-order/containers/OrderCostSummary/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderCostSummary'; export { OrderCostSummary as default } from './OrderCostSummary'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/containers/OrderHeader.js b/scripts/__dropins__/storefront-order/containers/OrderHeader.js index ea4ab4300c..09e053c519 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderHeader.js +++ b/scripts/__dropins__/storefront-order/containers/OrderHeader.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as u,jsxs as k}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import{Icon as O,Header as H,Button as d}from"@dropins/tools/components.js";import{useState as f,useEffect as p}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import*as c from"@dropins/tools/preact-compat.js";import"@dropins/tools/preact.js";import{events as _}from"@dropins/tools/event-bus.js";import{b}from"../chunks/OrderLoaders.js";import{useText as w,Text as L}from"@dropins/tools/i18n.js";const V=e=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("g",{clipPath:"url(#clip0_4797_15077)"},c.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M10.15 20.85L1.5 17.53V6.63L10.15 10V20.85Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M1.5 6.63001L10.15 3.20001L18.8 6.63001L10.15 10L1.5 6.63001Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.17969 4.77002L14.8297 8.15002V11.47",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M18.7896 12.64V6.63L10.1396 10V20.85L14.8296 19.05",stroke:"currentColor",strokeLinejoin:"round"}),c.createElement("path",{className:"success-icon",vectorEffect:"non-scaling-stroke",d:"M15.71 17.26C15.71 15.38 17.23 13.86 19.11 13.86C20.99 13.86 22.51 15.38 22.51 17.26C22.51 19.14 20.99 20.66 19.11 20.66C17.23 20.66 15.71 19.14 15.71 17.26Z",stroke:"currentColor"}),c.createElement("path",{className:"success-icon",vectorEffect:"non-scaling-stroke",d:"M17.4805 17.49L18.5605 18.41L20.7205 16.33",stroke:"currentColor",strokeLinecap:"square",strokeLinejoin:"round"})),c.createElement("defs",null,c.createElement("clipPath",{id:"clip0_4797_15077"},c.createElement("rect",{width:22,height:18.65,fill:"white",transform:"translate(1 2.70001)"}))));function s(e){var r;return{region:{region_id:e!=null&&e.regionId?Number(e==null?void 0:e.regionId):null,region:e==null?void 0:e.region},city:e==null?void 0:e.city,company:e==null?void 0:e.company,country_code:e==null?void 0:e.country,firstname:e==null?void 0:e.firstName,lastname:e==null?void 0:e.lastName,middlename:e==null?void 0:e.middleName,postcode:e==null?void 0:e.postCode,street:e==null?void 0:e.street,telephone:e==null?void 0:e.telephone,custom_attributesV2:((r=e==null?void 0:e.customAttributes)==null?void 0:r.map(i=>({attribute_code:i.code,value:i.value})))||[]}}const M=({orderData:e,handleEmailAvailability:r,handleSignUpClick:i})=>{const[t,N]=f(e),[l,v]=f(),[C,h]=f(r?void 0:!0),a=t==null?void 0:t.email,E=i&&t!==void 0&&l===!1&&C===!0?()=>{const o=t.shippingAddress,n=t.billingAddress,A=[{code:"email",defaultValue:t.email},{code:"firstname",defaultValue:(n==null?void 0:n.firstName)??""},{code:"lastname",defaultValue:(n==null?void 0:n.lastName)??""}];let m=[];if(o){const g={...s(o),default_shipping:!0};m=[{...s(n),default_billing:!0},g]}else m=[{...s(n),default_billing:!0,default_shipping:!0}];i({inputsDefaultValueSet:A,addressesData:m})}:void 0;return p(()=>{const o=_.on("authenticated",n=>{v(n)},{eager:!0});return()=>{o==null||o.off()}},[]),p(()=>{const o=_.on("order/data",n=>{N(n)},{eager:!0});return()=>{o==null||o.off()}},[]),p(()=>{r&&l!==void 0&&(l||!a||r(a).then(o=>h(o)).catch(()=>h(!0)))},[l,r,a]),{order:t,onSignUpClickHandler:E}},R=e=>{var t;const{order:r,onSignUpClickHandler:i}=M(e);return r?u(j,{customerName:(t=r.billingAddress)==null?void 0:t.firstName,onSignUpClick:i,orderNumber:r.number}):u(b,{})},j=({customerName:e,orderNumber:r,onSignUpClick:i})=>{const t=w({title:u(L,{id:"Order.OrderHeader.title",fields:{name:e}}),defaultTitle:"Order.OrderHeader.defaultTitle",order:u(L,{id:"Order.OrderHeader.order",fields:{order:r}}),createAccountMessage:"Order.OrderHeader.CreateAccount.message",createAccountButton:"Order.OrderHeader.CreateAccount.button"});return k("div",{"data-testid":"order-header",className:"order-header order-header__card",children:[u(O,{source:V,size:"64",className:"order-header__icon"}),u(H,{className:"order-header__title",title:t.title,size:"large",divider:!1,children:e?t.title:t.defaultTitle}),u("p",{className:"order-header__order",children:t.order}),i&&k("div",{className:"order-header-create-account",children:[u("p",{className:"order-header-create-account__message",children:t.createAccountMessage}),u(d,{"data-testid":"create-account-button",className:"order-header-create-account__button",size:"medium",variant:"secondary",type:"submit",onClick:i,children:t.createAccountButton})]})]})};export{R as OrderHeader,R as default}; +import{jsx as l,jsxs as k}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import{Icon as O,Header as d,Button as H}from"@dropins/tools/components.js";import{useState as f,useEffect as p}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import*as c from"@dropins/tools/preact-compat.js";import"@dropins/tools/preact.js";import{events as _}from"@dropins/tools/event-bus.js";import{b}from"../chunks/OrderLoaders.js";import{useText as w,Text as L}from"@dropins/tools/i18n.js";const V=e=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("g",{clipPath:"url(#clip0_4797_15077)"},c.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M10.15 20.85L1.5 17.53V6.63L10.15 10V20.85Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M1.5 6.63001L10.15 3.20001L18.8 6.63001L10.15 10L1.5 6.63001Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.17969 4.77002L14.8297 8.15002V11.47",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M18.7896 12.64V6.63L10.1396 10V20.85L14.8296 19.05",stroke:"currentColor",strokeLinejoin:"round"}),c.createElement("path",{className:"success-icon",vectorEffect:"non-scaling-stroke",d:"M15.71 17.26C15.71 15.38 17.23 13.86 19.11 13.86C20.99 13.86 22.51 15.38 22.51 17.26C22.51 19.14 20.99 20.66 19.11 20.66C17.23 20.66 15.71 19.14 15.71 17.26Z",stroke:"currentColor"}),c.createElement("path",{className:"success-icon",vectorEffect:"non-scaling-stroke",d:"M17.4805 17.49L18.5605 18.41L20.7205 16.33",stroke:"currentColor",strokeLinecap:"square",strokeLinejoin:"round"})),c.createElement("defs",null,c.createElement("clipPath",{id:"clip0_4797_15077"},c.createElement("rect",{width:22,height:18.65,fill:"white",transform:"translate(1 2.70001)"}))));function s(e){var r;return{region:{region_id:e!=null&&e.regionId?Number(e==null?void 0:e.regionId):null,region:e==null?void 0:e.region},city:e==null?void 0:e.city,company:e==null?void 0:e.company,country_code:e==null?void 0:e.country,firstname:e==null?void 0:e.firstName,lastname:e==null?void 0:e.lastName,middlename:e==null?void 0:e.middleName,postcode:e==null?void 0:e.postCode,street:e==null?void 0:e.street,telephone:e==null?void 0:e.telephone,custom_attributesV2:((r=e==null?void 0:e.customAttributes)==null?void 0:r.map(i=>({attribute_code:i.code,value:i.value})))||[]}}const M=({orderData:e,handleEmailAvailability:r,handleSignUpClick:i})=>{const[t,v]=f(e),[u,N]=f(),[C,h]=f(r?void 0:!0),a=t==null?void 0:t.email,E=i&&t!==void 0&&u===!1&&C===!0?()=>{const o=t.shippingAddress,n=t.billingAddress,A=[{code:"email",defaultValue:t.email},{code:"firstname",defaultValue:(n==null?void 0:n.firstName)??""},{code:"lastname",defaultValue:(n==null?void 0:n.lastName)??""}];let m=[];if(o){const g={...s(o),default_shipping:!0};m=[{...s(n),default_billing:!0},g]}else m=[{...s(n),default_billing:!0,default_shipping:!0}];i({inputsDefaultValueSet:A,addressesData:m})}:void 0;return p(()=>{const o=_.on("authenticated",n=>{N(n)},{eager:!0});return()=>{o==null||o.off()}},[]),p(()=>{const o=_.on("order/data",n=>{v(n)},{eager:!0});return()=>{o==null||o.off()}},[]),p(()=>{r&&u!==void 0&&(u||!a||r(a).then(o=>h(o)).catch(()=>h(!0)))},[u,r,a]),{order:t,onSignUpClickHandler:E}},R=e=>{var t;const{order:r,onSignUpClickHandler:i}=M(e);return l("div",{children:r?l(j,{customerName:(t=r.billingAddress)==null?void 0:t.firstName,onSignUpClick:i,orderNumber:r.number}):l(b,{})})},j=({customerName:e,orderNumber:r,onSignUpClick:i})=>{const t=w({title:l(L,{id:"Order.OrderHeader.title",fields:{name:e}}),defaultTitle:"Order.OrderHeader.defaultTitle",order:l(L,{id:"Order.OrderHeader.order",fields:{order:r}}),createAccountMessage:"Order.OrderHeader.CreateAccount.message",createAccountButton:"Order.OrderHeader.CreateAccount.button"});return k("div",{"data-testid":"order-header",className:"order-header order-header__card",children:[l(O,{source:V,size:"64",className:"order-header__icon"}),l(d,{className:"order-header__title",title:t.title,size:"large",divider:!1,children:e?t.title:t.defaultTitle}),l("p",{className:"order-header__order",children:t.order}),i&&k("div",{className:"order-header-create-account",children:[l("p",{className:"order-header-create-account__message",children:t.createAccountMessage}),l(H,{"data-testid":"create-account-button",className:"order-header-create-account__button",size:"medium",variant:"secondary",type:"submit",onClick:i,children:t.createAccountButton})]})]})};export{R as OrderHeader,R as default}; diff --git a/scripts/__dropins__/storefront-order/containers/OrderHeader/index.d.ts b/scripts/__dropins__/storefront-order/containers/OrderHeader/index.d.ts index 829eff409c..8c5ca7e842 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderHeader/index.d.ts +++ b/scripts/__dropins__/storefront-order/containers/OrderHeader/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderHeader'; export { OrderHeader as default } from './OrderHeader'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/containers/OrderProductList.js b/scripts/__dropins__/storefront-order/containers/OrderProductList.js index 2c8ad403ba..15e12060fb 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderProductList.js +++ b/scripts/__dropins__/storefront-order/containers/OrderProductList.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as a,jsxs as g}from"@dropins/tools/preact-jsx-runtime.js";import{classes as h}from"@dropins/tools/lib.js";import{Card as q,Header as R}from"@dropins/tools/components.js";import{useState as P,useEffect as S,useMemo as T}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import"@dropins/tools/preact-compat.js";import{u as b}from"../chunks/useGetStoreConfig.js";import{Fragment as x}from"@dropins/tools/preact.js";import{events as N}from"@dropins/tools/event-bus.js";import{s as Q}from"../chunks/setTaxStatus.js";import{a as k}from"../chunks/OrderLoaders.js";import{C as G}from"../chunks/CartSummaryItem.js";import{useText as M}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";const v=({orderData:n})=>{const[u,i]=P(!0),[e,r]=P(n);return S(()=>{const t=N.on("order/data",o=>{r(o),i(!1)},{eager:!0});return()=>{t==null||t.off()}},[]),{loading:u,order:e}},Y=({className:n,orderData:u,withHeader:i,showConfigurableOptions:e,routeProductDetails:r})=>{const t=b(),{loading:o,order:d}=v({orderData:u});return a("div",{className:h(["order-order-product-list",n]),children:a(I,{loading:o,placeholderImage:(t==null?void 0:t.baseMediaUrl)??"",taxConfig:Q((t==null?void 0:t.shoppingCartDisplayPrice)??0),order:d,withHeader:i,showConfigurableOptions:e,routeProductDetails:r})})},w=n=>{const u=(n==null?void 0:n.items)??[],i=u.filter(t=>(t==null?void 0:t.eligibleForReturn)&&(t==null?void 0:t.quantityReturnRequested)).map(t=>({...t,totalQuantity:t.quantityReturnRequested})),e=new Map(i.map(t=>[t.id,t])),r=u.map(t=>{const o=e.get(t==null?void 0:t.id);if(o){const d=t.totalQuantity-o.quantityReturnRequested;return d===0?null:{...t,totalQuantity:d}}return t}).filter(t=>t!==null);return{returnedList:i,canceledItems:r==null?void 0:r.filter(t=>t.quantityCanceled),nonCanceledItems:r==null?void 0:r.filter(t=>!t.quantityCanceled)}},I=({placeholderImage:n,loading:u,taxConfig:i,order:e=null,withHeader:r=!0,showConfigurableOptions:t,routeProductDetails:o})=>{const d=!!(e!=null&&e.returnNumber),c=M({cancelled:"Order.OrderProductListContent.cancelledTitle",allOrders:"Order.OrderProductListContent.allOrdersTitle",returned:"Order.OrderProductListContent.returnedTitle",refunded:"Order.OrderProductListContent.refundedTitle",sender:"Order.OrderProductListContent.GiftCard.sender",recipient:"Order.OrderProductListContent.GiftCard.recipient",message:"Order.OrderProductListContent.GiftCard.message",outOfStock:"Order.OrderProductListContent.stockStatus.outOfStock",downloadableCount:"Order.OrderProductListContent.downloadableCount"}),L=T(()=>{var p,f;if(!e)return[];if(!d){const{returnedList:s,canceledItems:m,nonCanceledItems:O}=w(e);return[{type:"returned",list:s,title:c.returned},{type:"cancelled",list:m,title:c.cancelled},{type:"allItems",list:O,title:c.allOrders}].filter(C=>{var y;return((y=C==null?void 0:C.list)==null?void 0:y.length)>0})}return[{type:"returned",list:((f=(p=e.returns.find(s=>s.returnNumber===(e==null?void 0:e.returnNumber)))==null?void 0:p.items)==null?void 0:f.map(s=>({...s,totalQuantity:s.requestQuantity})))??[],title:c.returned}]},[e,d,c]);return e?L.every(l=>l.list.length===0)?null:a(q,{variant:"secondary",className:"order-order-product-list-content",children:L.map((l,p)=>{var s;const f=l.list.reduce((m,{totalQuantity:O})=>O+m,0);return g(x,{children:[r?a(R,{title:`${l.title} (${f})`}):null,a("ul",{className:"order-order-product-list-content__items",children:(s=l.list)==null?void 0:s.map(m=>a("li",{"data-testid":"order-product-list-content-item",children:a(G,{placeholderImage:n,loading:u,product:m,itemType:l.type,taxConfig:i,translations:c,showConfigurableOptions:t,routeProductDetails:o})},m.id))})]},p)})}):a(k,{})};export{Y as OrderProductList,Y as default}; +import{jsx as d,jsxs as g}from"@dropins/tools/preact-jsx-runtime.js";import{classes as h}from"@dropins/tools/lib.js";import{Card as q,Header as R}from"@dropins/tools/components.js";import{useState as P,useEffect as S,useMemo as T}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import"@dropins/tools/preact-compat.js";import{u as b}from"../chunks/useGetStoreConfig.js";import{Fragment as x}from"@dropins/tools/preact.js";import{events as N}from"@dropins/tools/event-bus.js";import{s as Q}from"../chunks/setTaxStatus.js";import{a as k}from"../chunks/OrderLoaders.js";import{C as G}from"../chunks/CartSummaryItem.js";import{useText as M}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";const v=({orderData:s})=>{const[i,o]=P(!0),[e,r]=P(s);return S(()=>{const t=N.on("order/data",l=>{r(l),o(!1)},{eager:!0});return()=>{t==null||t.off()}},[]),{loading:i,order:e}},Y=({className:s,orderData:i,withHeader:o,showConfigurableOptions:e,routeProductDetails:r})=>{const t=b(),{loading:l,order:a}=v({orderData:i});return d("div",{className:h(["order-order-product-list",s]),children:d(I,{loading:l,placeholderImage:(t==null?void 0:t.baseMediaUrl)??"",taxConfig:Q((t==null?void 0:t.shoppingOrderDisplayPrice)??0),order:a,withHeader:o,showConfigurableOptions:e,routeProductDetails:r})})},w=s=>{const i=(s==null?void 0:s.items)??[],o=i.filter(t=>(t==null?void 0:t.eligibleForReturn)&&(t==null?void 0:t.quantityReturnRequested)).map(t=>({...t,totalQuantity:t.quantityReturnRequested})),e=new Map(o.map(t=>[t.id,t])),r=i.map(t=>{const l=e.get(t==null?void 0:t.id);if(l){const a=t.totalQuantity-l.quantityReturnRequested;return a===0?null:{...t,totalQuantity:a}}return t}).filter(t=>t!==null);return{returnedList:o,canceledItems:r==null?void 0:r.filter(t=>t.quantityCanceled),nonCanceledItems:r==null?void 0:r.filter(t=>!t.quantityCanceled)}},I=({placeholderImage:s,loading:i,taxConfig:o,order:e=null,withHeader:r=!0,showConfigurableOptions:t,routeProductDetails:l})=>{const a=!!(e!=null&&e.returnNumber),m=M({cancelled:"Order.OrderProductListContent.cancelledTitle",allOrders:"Order.OrderProductListContent.allOrdersTitle",returned:"Order.OrderProductListContent.returnedTitle",refunded:"Order.OrderProductListContent.refundedTitle",sender:"Order.OrderProductListContent.GiftCard.sender",recipient:"Order.OrderProductListContent.GiftCard.recipient",message:"Order.OrderProductListContent.GiftCard.message",outOfStock:"Order.OrderProductListContent.stockStatus.outOfStock",downloadableCount:"Order.OrderProductListContent.downloadableCount"}),L=T(()=>{var p,f;if(!e)return[];if(!a){const{returnedList:u,canceledItems:n,nonCanceledItems:O}=w(e);return[{type:"returned",list:u,title:m.returned},{type:"cancelled",list:n,title:m.cancelled},{type:"allItems",list:O,title:m.allOrders}].filter(C=>{var y;return((y=C==null?void 0:C.list)==null?void 0:y.length)>0})}return[{type:"returned",list:((f=(p=e.returns.find(u=>u.returnNumber===(e==null?void 0:e.returnNumber)))==null?void 0:p.items)==null?void 0:f.map(u=>({...u,totalQuantity:u.requestQuantity})))??[],title:m.returned}]},[e,a,m]);return e?L.every(c=>c.list.length===0)?null:d(q,{variant:"secondary",className:"order-order-product-list-content",children:L.map((c,p)=>{var u;const f=c.list.filter(n=>n!==null).reduce((n,{totalQuantity:O})=>O+n,0);return g(x,{children:[r?d(R,{title:`${c.title} (${f})`}):null,d("ul",{className:"order-order-product-list-content__items",children:(u=c.list)==null?void 0:u.filter(n=>n!==null).map(n=>d("li",{"data-testid":"order-product-list-content-item",children:d(G,{placeholderImage:s,loading:i,product:n,itemType:c.type,taxConfig:o,translations:m,showConfigurableOptions:t,routeProductDetails:l})},n.id))})]},p)})}):d(k,{})};export{Y as OrderProductList,Y as default}; diff --git a/scripts/__dropins__/storefront-order/containers/OrderProductList/index.d.ts b/scripts/__dropins__/storefront-order/containers/OrderProductList/index.d.ts index 2731d80415..22f25c5c4d 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderProductList/index.d.ts +++ b/scripts/__dropins__/storefront-order/containers/OrderProductList/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderProductList'; export { OrderProductList as default } from './OrderProductList'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/containers/OrderReturns.js b/scripts/__dropins__/storefront-order/containers/OrderReturns.js index c4d2b9a826..1a10e50549 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderReturns.js +++ b/scripts/__dropins__/storefront-order/containers/OrderReturns.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{jsx as d}from"@dropins/tools/preact-jsx-runtime.js";import{classes as L}from"@dropins/tools/lib.js";import"@dropins/tools/components.js";import{useState as p,useEffect as O}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import"@dropins/tools/preact-compat.js";import{u as b}from"../chunks/useGetStoreConfig.js";import"@dropins/tools/preact.js";import{events as g}from"@dropins/tools/event-bus.js";import{u as w}from"../chunks/useIsMobile.js";import{R as N}from"../chunks/ReturnsListContent.js";import{useText as $}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/returnOrdersHelper.js";import"../chunks/getFormValues.js";import"../chunks/OrderLoaders.js";import"../chunks/capitalizeFirst.js";const h=({orderData:s})=>{const[i,n]=p(s),[o,u]=p([]);return O(()=>{const t=g.on("order/data",e=>{n(e),u(e==null?void 0:e.returns)},{eager:!0});return()=>{t==null||t.off()}},[]),{order:i,orderReturns:o}},B=({slots:s,className:i,orderData:n,withHeader:o,withThumbnails:u,routeReturnDetails:t,routeProductDetails:e,routeTracking:l})=>{const m=b(),{orderReturns:a}=h({orderData:n}),f=w(),r="fullSizeView",c=(m==null?void 0:m.baseMediaUrl)??"",R=$({minifiedViewTitle:`Order.Returns.${r}.returnsList.minifiedViewTitle`,ariaLabelLink:`Order.Returns.${r}.returnsList.ariaLabelLink`,emptyOrdersListMessage:`Order.Returns.${r}.returnsList.emptyOrdersListMessage`,orderNumber:`Order.Returns.${r}.returnsList.orderNumber`,returnNumber:`Order.Returns.${r}.returnsList.returnNumber`,carrier:`Order.Returns.${r}.returnsList.carrier`});return d("div",{className:L(["order-order-returns",i]),children:a.length?d(N,{placeholderImage:c,pageInfo:{pageSize:1,totalPages:1,currentPage:1},minifiedViewKey:r,slots:s,isMobile:f,withOrderNumber:!1,withReturnNumber:!0,orderReturns:a,translations:R,withHeader:o,withThumbnails:u,minifiedView:!1,routeReturnDetails:t,routeProductDetails:e,routeTracking:l,loading:!1}):null})};export{B as OrderReturns,B as default}; diff --git a/scripts/__dropins__/storefront-order/containers/OrderReturns/index.d.ts b/scripts/__dropins__/storefront-order/containers/OrderReturns/index.d.ts index f7aebae2c8..3b6c51b94e 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderReturns/index.d.ts +++ b/scripts/__dropins__/storefront-order/containers/OrderReturns/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderReturns'; export { OrderReturns as default } from './OrderReturns'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/containers/OrderSearch.js b/scripts/__dropins__/storefront-order/containers/OrderSearch.js index e391860b18..6eaf75b62f 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderSearch.js +++ b/scripts/__dropins__/storefront-order/containers/OrderSearch.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as t,jsxs as L}from"@dropins/tools/preact-jsx-runtime.js";import{classes as M}from"@dropins/tools/lib.js";import{Card as V,InLineAlert as k,Icon as C,Button as q}from"@dropins/tools/components.js";import{useState as v,useCallback as F,useEffect as _,useMemo as D}from"@dropins/tools/preact-hooks.js";import{F as H}from"../chunks/ShippingStatusCard.js";import*as w from"@dropins/tools/preact-compat.js";import"@dropins/tools/preact.js";import{events as N}from"@dropins/tools/event-bus.js";import{F as g,g as B}from"../chunks/getFormValues.js";import{r as f}from"../chunks/redirectTo.js";import{g as E}from"../chunks/getQueryParam.js";import{g as x,a as z}from"../chunks/getGuestOrder.js";import{useText as U,Text as T}from"@dropins/tools/i18n.js";import"../chunks/network-error.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../fragments.js";import"../chunks/initialize.js";const X=s=>w.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},w.createElement("path",{vectorEffect:"non-scaling-stroke",fillRule:"evenodd",clipRule:"evenodd",d:"M1 20.8953L12.1922 1.5L23.395 20.8953H1ZM13.0278 13.9638L13.25 10.0377V9H11.25V10.0377L11.4722 13.9638H13.0278ZM11.2994 16V17.7509H13.2253V16H11.2994Z",fill:"currentColor"})),Z=({onError:s,isAuth:r,renderSignIn:a,routeCustomerOrder:i,routeGuestOrder:c})=>{const[b,u]=v({text:"",type:"success"}),[y,p]=v(!1),n=U({invalidSearch:"Order.Errors.invalidSearch",email:"Order.OrderSearchForm.email",lastname:"Order.OrderSearchForm.lastname",number:"Order.OrderSearchForm.orderNumber"}),R=F(async e=>{const l=E("orderRef"),o=l&&l.length>20;if(!e&&!l||!(e!=null&&e.number)&&!(e!=null&&e.token)&&!l)return null;if(r){const d=await x();(d==null?void 0:d.email)===e.email?f(i,{orderRef:e==null?void 0:e.number}):o||f(c,{orderRef:e.token})}else o||f(c,{orderRef:e==null?void 0:e.token})},[r,i,c]);_(()=>{const e=N.on("order/data",l=>{R(l)},{eager:!0});return()=>{e==null||e.off()}},[R]),_(()=>{const e=E("orderRef"),l=e&&e.length>20?e:null;e&&(l?f(c,{orderRef:e}):r?f(i,{orderRef:e}):a==null||a({render:!0,formValues:{number:e}}))},[r,i,c,a]);const O=D(()=>[{entityType:"CUSTOMER_ADDRESS",is_unique:!1,label:n.email,options:[],defaultValue:"",fieldType:g.TEXT,className:"",required:!0,orderNumber:1,name:"email",id:"email",code:"email"},{entityType:"CUSTOMER_ADDRESS",is_unique:!1,label:n.lastname,options:[],defaultValue:"",fieldType:g.TEXT,className:"",required:!0,orderNumber:2,name:"lastname",id:"lastname",code:"lastname"},{entityType:"CUSTOMER_ADDRESS",is_unique:!1,label:n.number,options:[],defaultValue:"",fieldType:g.TEXT,className:"",required:!0,orderNumber:3,name:"number",id:"number",code:"number"}],[n]);return{onSubmit:F(async(e,l)=>{if(!l)return null;p(!0);const o=B(e.target);await z(o).then(m=>{m||u({text:n.invalidSearch,type:"warning"}),N.emit("order/data",m)}).catch(async m=>{var S;let d=!0;s==null||s({error:m.message});const h=r?await x():{email:""};(h==null?void 0:h.email)===(o==null?void 0:o.email)?f(i,{orderRef:o.number}):d=a==null?void 0:a({render:h===null||((S=m==null?void 0:m.message)==null?void 0:S.includes("Please login to view the order.")),formValues:o}),d&&u({text:m.message,type:"warning"})}).finally(()=>{p(!1)})},[r,s,a,i,n.invalidSearch]),inLineAlert:b,loading:y,normalizeFieldsConfig:O}},ne=({className:s,isAuth:r,renderSignIn:a,routeCustomerOrder:i,routeGuestOrder:c,onError:b})=>{const{onSubmit:u,loading:y,inLineAlert:p,normalizeFieldsConfig:n}=Z({onError:b,isAuth:r,renderSignIn:a,routeCustomerOrder:i,routeGuestOrder:c});return t("div",{className:M(["order-order-search",s]),children:t(j,{onSubmit:u,loading:y,inLineAlert:p,fieldsConfig:n})})},j=({onSubmit:s,loading:r,inLineAlert:a,fieldsConfig:i})=>L(V,{variant:"secondary",className:"order-order-search-form",children:[t("h2",{className:"order-order-search-form__title",children:t(T,{id:"Order.OrderSearchForm.title"})}),t("p",{children:t(T,{id:"Order.OrderSearchForm.description"})}),a.text?t(k,{"data-testid":"orderAlert",className:"order-order-search-form__alert",type:a.type,variant:"secondary",heading:a.text,icon:t(C,{source:X})}):null,t(H,{className:"order-order-search-form__wrapper",name:"orderSearchForm",loading:r,fieldsConfig:i,onSubmit:s,children:t("div",{className:"order-order-search-form__button-container",children:t(q,{className:"order-order-search-form__button",size:"medium",variant:"primary",type:"submit",disabled:r,children:t(T,{id:"Order.OrderSearchForm.button"})},"logIn")})})]});export{ne as OrderSearch,ne as default}; +import{jsx as t,jsxs as q}from"@dropins/tools/preact-jsx-runtime.js";import{classes as L}from"@dropins/tools/lib.js";import{Card as M,InLineAlert as V,Icon as k,Button as C}from"@dropins/tools/components.js";import{useState as v,useCallback as F,useEffect as _,useMemo as D}from"@dropins/tools/preact-hooks.js";import{F as U}from"../chunks/ShippingStatusCard.js";import*as w from"@dropins/tools/preact-compat.js";import"@dropins/tools/preact.js";import{events as N}from"@dropins/tools/event-bus.js";import{F as g,g as H}from"../chunks/getFormValues.js";import{r as f}from"../chunks/redirectTo.js";import{g as E}from"../chunks/getQueryParam.js";import{g as x,a as B}from"../chunks/getGuestOrder.js";import{useText as z,Text as T}from"@dropins/tools/i18n.js";import"../chunks/network-error.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../fragments.js";import"../chunks/initialize.js";const X=s=>w.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},w.createElement("path",{vectorEffect:"non-scaling-stroke",fillRule:"evenodd",clipRule:"evenodd",d:"M1 20.8953L12.1922 1.5L23.395 20.8953H1ZM13.0278 13.9638L13.25 10.0377V9H11.25V10.0377L11.4722 13.9638H13.0278ZM11.2994 16V17.7509H13.2253V16H11.2994Z",fill:"currentColor"})),Z=({onError:s,isAuth:r,renderSignIn:a,routeCustomerOrder:i,routeGuestOrder:c})=>{const[b,u]=v({text:"",type:"success"}),[y,p]=v(!1),n=z({invalidSearch:"Order.Errors.invalidSearch",email:"Order.OrderSearchForm.email",lastname:"Order.OrderSearchForm.lastname",number:"Order.OrderSearchForm.orderNumber"}),R=F(async e=>{const l=E("orderRef"),o=l&&l.length>20;if(!e&&!l||!(e!=null&&e.number)&&!(e!=null&&e.token)&&!l)return null;if(r){const d=await x();(d==null?void 0:d.email)===e.email?f(i,{orderRef:e==null?void 0:e.number}):o||f(c,{orderRef:e.token})}else o||f(c,{orderRef:e==null?void 0:e.token})},[r,i,c]);_(()=>{const e=N.on("order/data",l=>{R(l)},{eager:!0});return()=>{e==null||e.off()}},[R]),_(()=>{const e=E("orderRef"),l=e&&e.length>20?e:null;e&&(l?f(c,{orderRef:e}):r?f(i,{orderRef:e}):a==null||a({render:!0,formValues:{number:e}}))},[r,i,c,a]);const O=D(()=>[{entityType:"CUSTOMER_ADDRESS",is_unique:!1,label:n.email,options:[],defaultValue:"",fieldType:g.TEXT,className:"",required:!0,orderNumber:1,name:"email",id:"email",code:"email",isUnique:!1},{entityType:"CUSTOMER_ADDRESS",is_unique:!1,label:n.lastname,options:[],defaultValue:"",fieldType:g.TEXT,className:"",required:!0,orderNumber:2,name:"lastname",id:"lastname",code:"lastname",isUnique:!1},{entityType:"CUSTOMER_ADDRESS",is_unique:!1,label:n.number,options:[],defaultValue:"",fieldType:g.TEXT,className:"",required:!0,orderNumber:3,name:"number",id:"number",code:"number",isUnique:!1}],[n]);return{onSubmit:F(async(e,l)=>{if(!l)return null;p(!0);const o=H(e.target);await B(o).then(m=>{m||u({text:n.invalidSearch,type:"warning"}),N.emit("order/data",m)}).catch(async m=>{var S;let d=!0;s==null||s({error:m.message});const h=r?await x():{email:""};(h==null?void 0:h.email)===(o==null?void 0:o.email)?f(i,{orderRef:o.number}):d=a==null?void 0:a({render:h===null||((S=m==null?void 0:m.message)==null?void 0:S.includes("Please login to view the order.")),formValues:o}),d&&u({text:m.message,type:"warning"})}).finally(()=>{p(!1)})},[r,s,a,i,n.invalidSearch]),inLineAlert:b,loading:y,normalizeFieldsConfig:O}},ne=({className:s,isAuth:r,renderSignIn:a,routeCustomerOrder:i,routeGuestOrder:c,onError:b})=>{const{onSubmit:u,loading:y,inLineAlert:p,normalizeFieldsConfig:n}=Z({onError:b,isAuth:r,renderSignIn:a,routeCustomerOrder:i,routeGuestOrder:c});return t("div",{className:L(["order-order-search",s]),children:t(j,{onSubmit:u,loading:y,inLineAlert:p,fieldsConfig:n})})},j=({onSubmit:s,loading:r,inLineAlert:a,fieldsConfig:i})=>q(M,{variant:"secondary",className:"order-order-search-form",children:[t("h2",{className:"order-order-search-form__title",children:t(T,{id:"Order.OrderSearchForm.title"})}),t("p",{children:t(T,{id:"Order.OrderSearchForm.description"})}),a.text?t(V,{"data-testid":"orderAlert",className:"order-order-search-form__alert",type:a.type,variant:"secondary",heading:a.text,icon:t(k,{source:X})}):null,t(U,{className:"order-order-search-form__wrapper",name:"orderSearchForm",loading:r,fieldsConfig:i,onSubmit:s,children:t("div",{className:"order-order-search-form__button-container",children:t(C,{className:"order-order-search-form__button",size:"medium",variant:"primary",type:"submit",disabled:r,children:t(T,{id:"Order.OrderSearchForm.button"})},"logIn")})})]});export{ne as OrderSearch,ne as default}; diff --git a/scripts/__dropins__/storefront-order/containers/OrderSearch/index.d.ts b/scripts/__dropins__/storefront-order/containers/OrderSearch/index.d.ts index aee00663ff..c18df2f836 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderSearch/index.d.ts +++ b/scripts/__dropins__/storefront-order/containers/OrderSearch/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderSearch'; export { OrderSearch as default } from './OrderSearch'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/containers/OrderStatus.js b/scripts/__dropins__/storefront-order/containers/OrderStatus.js index 1e1d15df87..4eac665aaf 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderStatus.js +++ b/scripts/__dropins__/storefront-order/containers/OrderStatus.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as s,Fragment as S,jsxs as A}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as $,classes as _}from"@dropins/tools/lib.js";import{Button as P,InLineAlert as B,Modal as V,Card as K,Header as Q}from"@dropins/tools/components.js";import{useState as C,useEffect as k,useCallback as T}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import{useMemo as J}from"@dropins/tools/preact-compat.js";import{u as G}from"../chunks/useGetStoreConfig.js";import"@dropins/tools/preact.js";import{events as I}from"@dropins/tools/event-bus.js";import{a as X,c as Y,r as Z}from"../chunks/confirmCancelOrder.js";import{useText as O,Text as M}from"@dropins/tools/i18n.js";import{C as D}from"../chunks/OrderLoaders.js";import{f as ee}from"../chunks/returnOrdersHelper.js";import{f as w}from"../chunks/formatDateToLocale.js";import{c as b}from"../chunks/capitalizeFirst.js";import{r as U}from"../chunks/redirectTo.js";import{O as te}from"../chunks/OrderCancelForm.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/network-error.js";import"../fragments.js";import"../chunks/initialize.js";import"../chunks/getFormValues.js";import"../chunks/requestGuestOrderCancel.js";var y=(t=>(t.CANCEL="CANCEL",t.RETURN="RETURN",t.REORDER="REORDER",t))(y||{});const re=({className:t,orderData:e,slots:n,routeCreateReturn:r,routeOnSuccess:u,onError:i})=>{const d=O({cancel:"Order.OrderStatusContent.actions.cancel",createReturn:"Order.OrderStatusContent.actions.createReturn",createAnotherReturn:"Order.OrderStatusContent.actions.createAnotherReturn",reorder:"Order.OrderStatusContent.actions.reorder"}),l=J(()=>{const c=e==null?void 0:e.availableActions,o=!!(c!=null&&c.length),a=!!(e!=null&&e.returnNumber),m=()=>{U(r,{},e)};return s(S,{children:n!=null&&n.OrderActions?s($,{"data-testid":"OrderActionsSlot",name:"OrderCanceledActions",slot:n==null?void 0:n.OrderActions,context:e}):s("div",{"data-testid":"availableActionsList",className:_(["order-order-actions__wrapper",["order-order-actions__wrapper--empty",!o]]),children:c==null?void 0:c.map(p=>{switch(p){case y.CANCEL:return s(S,{children:a?null:s(ce,{orderRef:(e==null?void 0:e.token)??(e==null?void 0:e.id)})});case y.RETURN:return s(P,{variant:"secondary",onClick:m,children:a?d.createAnotherReturn:d.createReturn});case y.REORDER:return s(S,{children:a?null:s(ie,{orderData:e,onError:i,routeOnSuccess:u,children:d.reorder})})}})})})},[i,e,u,r,n,d]);return s("div",{className:_(["order-order-actions",t]),children:l})},ne=({orderData:t})=>{const[e,n]=C(t),[r,u]=C(t==null?void 0:t.status);return k(()=>{const i=I.on("order/data",d=>{n(d),u(d.status)},{eager:!0});return()=>{i==null||i.off()}},[]),{orderStatus:r,order:e}},H=t=>{const e=new URL(window.location.href);t.forEach(n=>{e.searchParams.has(n)&&e.searchParams.delete(n)}),window.history.replaceState({},document.title,e.toString())},se=({enableOrderCancellation:t})=>{const e=O({cancelOrderHeading:"Order.OrderStatusContent.actions.cancel",confirmGuestReturnHeading:"Order.OrderStatusContent.actions.confirmGuestReturn",orderCancelled:"Order.OrderStatusContent.orderCanceled.message",guestRequestReturnMessage:"Order.OrderStatusContent.actions.confirmGuestReturnMessage"}),[n,r]=C(!1),[u,i]=C(!1),[d,l]=C({heading:"",text:"",status:void 0}),c=T(()=>{r(!0),H(["order_id","confirmation_key","action"])},[]),o=T((a,m,p)=>{l({heading:a,text:m,status:p}),H(["action"])},[]);return k(()=>{const a=new URLSearchParams(window.location.search),m=a.get("order_id")??"",p=a.get("confirmation_key")??"",g=a.get("action")??"";u||!m||!p||!g||(t&&g==="cancel"&&(i(!0),X(m,p).then(()=>{l({heading:e.cancelOrderHeading,text:e.orderCancelled,status:"success"})}).catch(h=>{l({heading:e.cancelOrderHeading,text:h.message,status:"warning"})})),g==="return"&&(i(!0),Y(m,p).then(()=>{l({heading:e.confirmGuestReturnHeading,text:e.guestRequestReturnMessage,status:"success"})}).catch(h=>{l({heading:e.confirmGuestReturnHeading,text:h.message,status:"warning"})})))},[t,e,o,u]),{orderActionStatus:d,isDismissed:n,onDismiss:c}},be=({slots:t,orderData:e,className:n,statusTitle:r,status:u,routeCreateReturn:i,onError:d,routeOnSuccess:l})=>{const{orderStatus:c,order:o}=ne({orderData:e}),a=G(),{orderActionStatus:m,isDismissed:p,onDismiss:g}=se({enableOrderCancellation:a==null?void 0:a.orderCancellationEnabled});return A("div",{className:_(["order-order-status",n]),children:[!p&&(m==null?void 0:m.status)!==void 0?s(B,{style:{marginBottom:"1rem"},heading:m.heading,onDismiss:g,description:m.text,type:m.status}):null,o?s(oe,{title:r,status:u||c,slots:t,orderData:o,routeCreateReturn:i,onError:d,routeOnSuccess:l}):s(D,{withCard:!1})]})},ce=({orderRef:t})=>{const[e,n]=C(!1),r=()=>{n(!0)},u=()=>{n(!1)},i=G(),d=(i==null?void 0:i.orderCancellationReasons)??[],l=c=>c.map((o,a)=>({text:o==null?void 0:o.description,value:a.toString()}));return I.on("order/data",c=>{const o=String(c.status).toLocaleLowerCase();(o==="guest order cancellation requested"||o==="canceled")&&u()}),A(S,{children:[s(P,{variant:"secondary",onClick:r,"data-testid":"cancel-button",children:s(M,{id:"Order.OrderStatusContent.actions.cancel"})}),e&&s(V,{centered:!0,size:"medium",onClose:u,className:"order-order-cancel__modal",title:s("h2",{className:"order-order-cancel__title",children:s(M,{id:"Order.OrderCancelForm.title"})}),"data-testid":"order-cancellation-reasons-modal",children:s(te,{orderRef:t,cancelReasons:l(d)})})]})},N={pending:"orderPending",shiping:"orderShipped",complete:"orderComplete",processing:"orderProcessing","on hold":"orderOnHold",canceled:"orderCanceled","suspected fraud":"orderSuspectedFraud","payment Review":"orderPaymentReview","order received":"orderReceived","guest order cancellation requested":"guestOrderCancellationRequested","pending payment":"orderPendingPayment",rejected:"orderRejected",authorized:"orderAuthorized","paypal canceled reversal":"orderPaypalCanceledReversal","pending paypal":"orderPendingPaypal","paypal reversed":"orderPaypalReversed",closed:"orderClosed"},oe=({slots:t,title:e,status:n,orderData:r,routeCreateReturn:u,onError:i,routeOnSuccess:d})=>{var x,E,L;const l=!!(r!=null&&r.returnNumber),c=String(n).toLocaleLowerCase(),o=(x=r==null?void 0:r.returns)==null?void 0:x[0],a=(o==null?void 0:o.returnStatus)??"",m=(o==null?void 0:o.createdReturnAt)??"",p=O({message:"Order.OrderStatusContent.orderPlaceholder.message",messageWithoutDate:"Order.OrderStatusContent.orderPlaceholder.messageWithoutDate"}),g=O(`Order.OrderStatusContent.${N[c]}.title`),h=O(`Order.OrderStatusContent.${N[c]}.message`),R=O(`Order.OrderStatusContent.${N[c]}.messageWithoutDate`),f=O({title:`Order.OrderStatusContent.returnStatus.${ee(a)}`,returnMessage:"Order.OrderStatusContent.returnMessage"});if(!n)return s("div",{});const q=g!=null&&g.title?g:{title:b(c)},v=h!=null&&h.message?h:p,F=R!=null&&R.messageWithoutDate?R:p,W=r!=null&&r.orderStatusChangeDate?v==null?void 0:v.message.replace("{DATE}",w(r==null?void 0:r.orderStatusChangeDate)):F.messageWithoutDate,j=((L=(E=f==null?void 0:f.returnMessage)==null?void 0:E.replace("{ORDER_CREATE_DATE}",w(r==null?void 0:r.orderDate)))==null?void 0:L.replace("{RETURN_CREATE_DATE}",w(m)))??"",z=l?e??(f.title||b(a)):e??q.title;return A(K,{className:"order-order-status-content",variant:"secondary",children:[s(Q,{title:z}),A("div",{className:"order-order-status-content__wrapper",children:[s("div",{className:_(["order-order-status-content__wrapper-description",["order-order-status-content__wrapper-description--actions-slot",!!(t!=null&&t.OrderActions)]]),children:s("p",{children:l?j:W})}),s(re,{orderData:r,slots:t,routeCreateReturn:u,routeOnSuccess:d,onError:i})]})]})},ie=({onError:t,routeOnSuccess:e,orderData:n,children:r})=>{const[u,i]=C(!1),d=T(()=>{i(!0);const l=n==null?void 0:n.number;Z(l).then(({success:c,userInputErrors:o})=>{c&&U(e,{}),o.length&&(t==null||t(o))}).catch(c=>{t==null||t(c.message)}).finally(()=>{i(!1)})},[n,e,t]);return s(P,{type:"button",disabled:u,variant:"secondary",className:"order-reorder",onClick:d,children:r})};export{be as OrderStatus,be as default}; +import{jsx as s,Fragment as S,jsxs as A}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as $,classes as _}from"@dropins/tools/lib.js";import{Button as P,InLineAlert as B,Modal as V,Card as K,Header as Q}from"@dropins/tools/components.js";import{useState as C,useEffect as k,useCallback as T}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import{useMemo as J}from"@dropins/tools/preact-compat.js";import{u as G}from"../chunks/useGetStoreConfig.js";import"@dropins/tools/preact.js";import{events as I}from"@dropins/tools/event-bus.js";import{a as X,c as Y,r as Z}from"../chunks/confirmCancelOrder.js";import{useText as O,Text as M}from"@dropins/tools/i18n.js";import{C as D}from"../chunks/OrderLoaders.js";import{f as ee}from"../chunks/returnOrdersHelper.js";import{f as w}from"../chunks/formatDateToLocale.js";import{c as b}from"../chunks/capitalizeFirst.js";import{r as U}from"../chunks/redirectTo.js";import{O as te}from"../chunks/OrderCancelForm.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/network-error.js";import"../fragments.js";import"../chunks/initialize.js";import"../chunks/getFormValues.js";import"../chunks/requestGuestOrderCancel.js";var y=(t=>(t.CANCEL="CANCEL",t.RETURN="RETURN",t.REORDER="REORDER",t))(y||{});const re=({className:t,orderData:e,slots:n,routeCreateReturn:r,routeOnSuccess:u,onError:i})=>{const d=O({cancel:"Order.OrderStatusContent.actions.cancel",createReturn:"Order.OrderStatusContent.actions.createReturn",createAnotherReturn:"Order.OrderStatusContent.actions.createAnotherReturn",reorder:"Order.OrderStatusContent.actions.reorder"}),l=J(()=>{const c=e==null?void 0:e.availableActions,o=!!(c!=null&&c.length),a=!!(e!=null&&e.returnNumber),m=()=>{U(r,{},e)};return s(S,{children:n!=null&&n.OrderActions?s($,{"data-testid":"OrderActionsSlot",name:"OrderCanceledActions",slot:n==null?void 0:n.OrderActions,context:e}):s("div",{"data-testid":"availableActionsList",className:_(["order-order-actions__wrapper",["order-order-actions__wrapper--empty",!o]]),children:c==null?void 0:c.map(p=>{switch(p){case y.CANCEL:return s(S,{children:a?null:s(ce,{orderRef:(e==null?void 0:e.token)||(e==null?void 0:e.id)})});case y.RETURN:return s(P,{variant:"secondary",onClick:m,children:a?d.createAnotherReturn:d.createReturn});case y.REORDER:return s(S,{children:a?null:s(ie,{orderData:e,onError:i,routeOnSuccess:u,children:d.reorder})})}})})})},[i,e,u,r,n,d]);return s("div",{className:_(["order-order-actions",t]),children:l})},ne=({orderData:t})=>{const[e,n]=C(t),[r,u]=C(t==null?void 0:t.status);return k(()=>{const i=I.on("order/data",d=>{n(d),u(d.status)},{eager:!0});return()=>{i==null||i.off()}},[]),{orderStatus:r,order:e}},H=t=>{const e=new URL(window.location.href);t.forEach(n=>{e.searchParams.has(n)&&e.searchParams.delete(n)}),window.history.replaceState({},document.title,e.toString())},se=({enableOrderCancellation:t})=>{const e=O({cancelOrderHeading:"Order.OrderStatusContent.actions.cancel",confirmGuestReturnHeading:"Order.OrderStatusContent.actions.confirmGuestReturn",orderCancelled:"Order.OrderStatusContent.orderCanceled.message",guestRequestReturnMessage:"Order.OrderStatusContent.actions.confirmGuestReturnMessage"}),[n,r]=C(!1),[u,i]=C(!1),[d,l]=C({heading:"",text:"",status:void 0}),c=T(()=>{r(!0),H(["order_id","confirmation_key","action"])},[]),o=T((a,m,p)=>{l({heading:a,text:m,status:p}),H(["action"])},[]);return k(()=>{const a=new URLSearchParams(window.location.search),m=a.get("order_id")??"",p=a.get("confirmation_key")??"",g=a.get("action")??"";u||!m||!p||!g||(t&&g==="cancel"&&(i(!0),X(m,p).then(()=>{l({heading:e.cancelOrderHeading,text:e.orderCancelled,status:"success"})}).catch(h=>{l({heading:e.cancelOrderHeading,text:h.message,status:"warning"})})),g==="return"&&(i(!0),Y(m,p).then(()=>{l({heading:e.confirmGuestReturnHeading,text:e.guestRequestReturnMessage,status:"success"})}).catch(h=>{l({heading:e.confirmGuestReturnHeading,text:h.message,status:"warning"})})))},[t,e,o,u]),{orderActionStatus:d,isDismissed:n,onDismiss:c}},be=({slots:t,orderData:e,className:n,statusTitle:r,status:u,routeCreateReturn:i,onError:d,routeOnSuccess:l})=>{const{orderStatus:c,order:o}=ne({orderData:e}),a=G(),{orderActionStatus:m,isDismissed:p,onDismiss:g}=se({enableOrderCancellation:a==null?void 0:a.orderCancellationEnabled});return A("div",{className:_(["order-order-status",n]),children:[!p&&(m==null?void 0:m.status)!==void 0?s(B,{style:{marginBottom:"1rem"},heading:m.heading,onDismiss:g,description:m.text,type:m.status}):null,o?s(oe,{title:r,status:u||c,slots:t,orderData:o,routeCreateReturn:i,onError:d,routeOnSuccess:l}):s(D,{withCard:!1})]})},ce=({orderRef:t})=>{const[e,n]=C(!1),r=()=>{n(!0)},u=()=>{n(!1)},i=G(),d=(i==null?void 0:i.orderCancellationReasons)??[],l=c=>c.map((o,a)=>({text:o==null?void 0:o.description,value:a.toString()}));return I.on("order/data",c=>{const o=String(c.status).toLocaleLowerCase();(o==="guest order cancellation requested"||o==="canceled")&&u()}),A(S,{children:[s(P,{variant:"secondary",onClick:r,"data-testid":"cancel-button",children:s(M,{id:"Order.OrderStatusContent.actions.cancel"})}),e&&s(V,{centered:!0,size:"medium",onClose:u,className:"order-order-cancel__modal",title:s("h2",{className:"order-order-cancel__title",children:s(M,{id:"Order.OrderCancelForm.title"})}),"data-testid":"order-cancellation-reasons-modal",children:s(te,{orderRef:t,cancelReasons:l(d)})})]})},N={pending:"orderPending",shiping:"orderShipped",complete:"orderComplete",processing:"orderProcessing","on hold":"orderOnHold",canceled:"orderCanceled","suspected fraud":"orderSuspectedFraud","payment Review":"orderPaymentReview","order received":"orderReceived","guest order cancellation requested":"guestOrderCancellationRequested","pending payment":"orderPendingPayment",rejected:"orderRejected",authorized:"orderAuthorized","paypal canceled reversal":"orderPaypalCanceledReversal","pending paypal":"orderPendingPaypal","paypal reversed":"orderPaypalReversed",closed:"orderClosed"},oe=({slots:t,title:e,status:n,orderData:r,routeCreateReturn:u,onError:i,routeOnSuccess:d})=>{var x,E,L;const l=!!(r!=null&&r.returnNumber),c=String(n).toLocaleLowerCase(),o=(x=r==null?void 0:r.returns)==null?void 0:x[0],a=(o==null?void 0:o.returnStatus)??"",m=(o==null?void 0:o.createdReturnAt)??"",p=O({message:"Order.OrderStatusContent.orderPlaceholder.message",messageWithoutDate:"Order.OrderStatusContent.orderPlaceholder.messageWithoutDate"}),g=O(`Order.OrderStatusContent.${N[c]}.title`),h=O(`Order.OrderStatusContent.${N[c]}.message`),R=O(`Order.OrderStatusContent.${N[c]}.messageWithoutDate`),f=O({title:`Order.OrderStatusContent.returnStatus.${ee(a)}`,returnMessage:"Order.OrderStatusContent.returnMessage"});if(!n)return s("div",{});const q=g!=null&&g.title?g:{title:b(c)},v=h!=null&&h.message?h:p,F=R!=null&&R.messageWithoutDate?R:p,W=r!=null&&r.orderStatusChangeDate?v==null?void 0:v.message.replace("{DATE}",w(r==null?void 0:r.orderStatusChangeDate)):F.messageWithoutDate,j=((L=(E=f==null?void 0:f.returnMessage)==null?void 0:E.replace("{ORDER_CREATE_DATE}",w(r==null?void 0:r.orderDate)))==null?void 0:L.replace("{RETURN_CREATE_DATE}",w(m)))??"",z=l?e??(f.title||b(a)):e??q.title;return A(K,{className:"order-order-status-content",variant:"secondary",children:[s(Q,{title:z}),A("div",{className:"order-order-status-content__wrapper",children:[s("div",{className:_(["order-order-status-content__wrapper-description",["order-order-status-content__wrapper-description--actions-slot",!!(t!=null&&t.OrderActions)]]),children:s("p",{children:l?j:W})}),s(re,{orderData:r,slots:t,routeCreateReturn:u,routeOnSuccess:d,onError:i})]})]})},ie=({onError:t,routeOnSuccess:e,orderData:n,children:r})=>{const[u,i]=C(!1),d=T(()=>{i(!0);const l=n==null?void 0:n.number;Z(l).then(({success:c,userInputErrors:o})=>{c&&U(e,{}),o.length&&(t==null||t(o))}).catch(c=>{t==null||t(c.message)}).finally(()=>{i(!1)})},[n,e,t]);return s(P,{type:"button",disabled:u,variant:"secondary",className:"order-reorder",onClick:d,children:r})};export{be as OrderStatus,be as default}; diff --git a/scripts/__dropins__/storefront-order/containers/OrderStatus/index.d.ts b/scripts/__dropins__/storefront-order/containers/OrderStatus/index.d.ts index 03c6d4ea05..f76c917996 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderStatus/index.d.ts +++ b/scripts/__dropins__/storefront-order/containers/OrderStatus/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './OrderStatus'; export { OrderStatus as default } from './OrderStatus'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/containers/ReturnsList.js b/scripts/__dropins__/storefront-order/containers/ReturnsList.js index f185864eb6..c865f4b1e6 100644 --- a/scripts/__dropins__/storefront-order/containers/ReturnsList.js +++ b/scripts/__dropins__/storefront-order/containers/ReturnsList.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{jsx as f}from"@dropins/tools/preact-jsx-runtime.js";import{classes as $}from"@dropins/tools/lib.js";import"@dropins/tools/components.js";import{useState as o,useEffect as g,useCallback as M}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import"@dropins/tools/preact-compat.js";import{u as T}from"../chunks/useGetStoreConfig.js";import"@dropins/tools/preact.js";import"@dropins/tools/event-bus.js";import{g as v}from"../chunks/getCustomerOrdersReturn.js";import{u as y}from"../chunks/useIsMobile.js";import{R as A}from"../chunks/ReturnsListContent.js";import{useText as V}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/network-error.js";import"../fragments.js";import"../chunks/initialize.js";import"../chunks/returnOrdersHelper.js";import"../chunks/getFormValues.js";import"../chunks/OrderLoaders.js";import"../chunks/capitalizeFirst.js";const L={totalPages:1,currentPage:1,pageSize:1},k=({returnPageSize:i})=>{const[n,u]=o(!0),[s,a]=o([]),[m,l]=o(L),[t,d]=o(1);g(()=>{v(i,t).then(r=>{a((r==null?void 0:r.ordersReturn)??[]),l((r==null?void 0:r.pageInfo)??L)}).finally(()=>{u(!1)})},[i,t]),g(()=>{window==null||window.scrollTo({top:100,behavior:"smooth"})},[t]);const c=M(r=>{d(r)},[]);return{pageInfo:m,selectedPage:t,loading:n,orderReturns:s,handleSetSelectPage:c}},ir=({slots:i,withReturnsListButton:n,className:u,minifiedView:s,withHeader:a,withThumbnails:m,returnPageSize:l,returnsInMinifiedView:t,routeReturnDetails:d,routeOrderDetails:c,routeTracking:r,routeReturnsList:R,routeProductDetails:O})=>{const p=T(),{pageInfo:b,selectedPage:w,handleSetSelectPage:h,loading:N,orderReturns:P}=k({returnPageSize:l}),S=y(),e=s?"minifiedView":"fullSizeView",I=V({viewAllOrdersButton:`Order.Returns.${e}.returnsList.viewAllOrdersButton`,ariaLabelLink:`Order.Returns.${e}.returnsList.ariaLabelLink`,emptyOrdersListMessage:`Order.Returns.${e}.returnsList.emptyOrdersListMessage`,minifiedViewTitle:`Order.Returns.${e}.returnsList.minifiedViewTitle`,orderNumber:`Order.Returns.${e}.returnsList.orderNumber`,returnNumber:`Order.Returns.${e}.returnsList.returnNumber`,carrier:`Order.Returns.${e}.returnsList.carrier`});return f("div",{className:$(["order-returns-list",u]),children:f(A,{placeholderImage:(p==null?void 0:p.baseMediaUrl)??"",minifiedViewKey:e,withOrderNumber:!0,withReturnNumber:!0,slots:i,selectedPage:w,handleSetSelectPage:h,pageInfo:b,withReturnsListButton:n,isMobile:S,orderReturns:P,translations:I,withHeader:a,returnsInMinifiedView:t,withThumbnails:m,minifiedView:s,routeReturnDetails:d,routeOrderDetails:c,routeTracking:r,routeReturnsList:R,routeProductDetails:O,loading:N})})};export{ir as default}; diff --git a/scripts/__dropins__/storefront-order/containers/ReturnsList/index.d.ts b/scripts/__dropins__/storefront-order/containers/ReturnsList/index.d.ts index bd7d43fff2..32df58d4c6 100644 --- a/scripts/__dropins__/storefront-order/containers/ReturnsList/index.d.ts +++ b/scripts/__dropins__/storefront-order/containers/ReturnsList/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from '.'; export { ReturnsList as default } from './ReturnsList'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/containers/ShippingStatus.js b/scripts/__dropins__/storefront-order/containers/ShippingStatus.js index e1daad6036..4c4e53e9db 100644 --- a/scripts/__dropins__/storefront-order/containers/ShippingStatus.js +++ b/scripts/__dropins__/storefront-order/containers/ShippingStatus.js @@ -1,3 +1,3 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ import{jsx as i,jsxs as S,Fragment as w}from"@dropins/tools/preact-jsx-runtime.js";import{classes as $,VComponent as E,Slot as q}from"@dropins/tools/lib.js";import{Card as A,Header as x,Accordion as G,AccordionSection as V,ContentGrid as B,Image as M}from"@dropins/tools/components.js";import{useState as R,useEffect as tn}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import"@dropins/tools/preact-compat.js";import{u as sn}from"../chunks/useGetStoreConfig.js";import"@dropins/tools/preact.js";import{events as rn}from"@dropins/tools/event-bus.js";import{C as ln}from"../chunks/OrderLoaders.js";import{u as hn}from"../chunks/useIsMobile.js";import{Text as U,useText as un}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";var H=(s=>(s.PENDING="pending",s.SHIPPING="shipping",s.COMPLETE="complete",s.PROCESSING="processing",s.HOLD="on hold",s.CANCELED="Canceled",s.SUSPECTED_FRAUD="suspected fraud",s.PAYMENT_REVIEW="payment review",s))(H||{});const dn=({orderData:s})=>{const[l,h]=R(!0),[n,c]=R(s),[r,m]=R(!1);return tn(()=>{const u=rn.on("order/data",o=>{c(o),m(o==null?void 0:o.isVirtual),h(!1)},{eager:!0});return s!=null&&s.id&&h(!1),()=>{u==null||u.off()}},[s]),{loading:l,order:n,isVirtualProduct:r}},en=({value:s,variant:l="primary",size:h="medium",icon:n,className:c,children:r,disabled:m=!1,active:u=!1,activeChildren:o,activeIcon:b,href:e,...C})=>{let d="dropin-button";(n&&!r||n&&u&&!o||!n&&u&&b)&&(d="dropin-iconButton"),u&&o&&(d="dropin-button"),c=$([d,`${d}--${h}`,`${d}--${l}`,[`${d}--${l}--disabled`,m],r&&n&&`${d}--with-icon`,!r&&o&&n&&`${d}--with-icon`,u&&b&&`${d}--with-icon`,c]);const I=$(["dropin-button-icon",`dropin-button-icon--${l}`,[`dropin-button-icon--${l}--disabled`,m],n==null?void 0:n.props.className]),g=e?{node:i("a",{}),role:"link",href:e,...C,disabled:m,active:u,onKeyDown:y=>{m&&y.preventDefault()},tabIndex:m?-1:0}:{node:i("button",{}),role:"button",...C,value:s,disabled:m,active:u};return S(E,{...g,className:c,children:[n&&!u&&i(E,{node:n,className:I}),b&&u&&i(E,{node:b,className:I}),r&&!u&&(typeof r=="string"?i("span",{children:r}):r),u&&o&&(typeof o=="string"?i("span",{children:o}):o)]})},cn=({placeholderImage:s,slots:l,collapseThreshold:h,translations:n,returnData:c,routeTracking:r,routeProductDetails:m})=>{var b;const u=hn(),o=m?"a":"span";return S(A,{variant:"secondary",className:$(["order-shipping-status-card","order-shipping-status-card--return-order"]),children:[i(x,{title:n.returnOrderCardTitle}),S("div",{children:[(b=c==null?void 0:c.tracking)==null?void 0:b.map((e,C)=>{var y,N;const d={title:"",number:(e==null?void 0:e.trackingNumber)??"",carrier:((y=e==null?void 0:e.carrier)==null?void 0:y.label)??""},I=r==null?void 0:r(d),g=I?()=>{window.open(I,"_blank","noreferrer")}:null;return S("div",{className:"order-shipping-status-card__header",children:[S("div",{children:[`${n.carrier} `,`${(N=d.carrier)==null?void 0:N.toLocaleUpperCase()} | `,d.number]}),g?i(en,{onClick:g,children:n.trackButton}):null]},`${d.number}_${C}`)}),l!=null&&l.ReturnItemsDetails?i(q,{"data-testid":"returnItemsDetails",name:"ReturnItemsDetails",slot:l==null?void 0:l.ReturnItemsDetails,context:{items:c.items}}):null,i(G,{actionIconPosition:"right","data-testid":"dropinAccordion",children:i(V,{defaultOpen:h>=c.items.length,title:i(U,{id:"Order.ShippingStatusCard.itemText",plural:c.items.reduce((e,C)=>e+C.requestQuantity,0),fields:{count:c.items.reduce((e,C)=>e+C.requestQuantity,0)}}),children:i(B,{maxColumns:u?3:9,emptyGridContent:i(w,{}),className:$(["order-shipping-status-card__images",["order-shipping-status-card__images-3",u]]),children:c.items.map((e,C)=>{var g,y,N,_;const d=(g=e.thumbnail)==null?void 0:g.label,I=(N=(y=e.thumbnail)==null?void 0:y.url)!=null&&N.length?(_=e.thumbnail)==null?void 0:_.url:s;return i(o,{href:(m==null?void 0:m(e))??"#","data-testid":`${C}${e.uid}`,children:i(M,{alt:d,src:I,width:85,height:114})},`${C}${e.uid}`)})})})})]})]})},mn=({placeholderImage:s,translations:l,slots:h,orderData:n,collapseThreshold:c=10,routeProductDetails:r,routeTracking:m})=>{var N,_,j,F,Q,K,W;const u=!!(n!=null&&n.returnNumber),o=n==null?void 0:n.returnNumber,b=r?"a":"span",e=(N=n==null?void 0:n.status)==null?void 0:N.toLocaleLowerCase(),d=((_=n==null?void 0:n.shipments)==null?void 0:_.length)===1&&(e==null?void 0:e.includes(H.COMPLETE)),I=(j=n==null?void 0:n.shipments)==null?void 0:j.every(p=>p.tracking.length===0),g=(F=n==null?void 0:n.items)==null?void 0:F.filter(p=>(p==null?void 0:p.quantityShipped)===0||(p==null?void 0:p.quantityShipped)<(p==null?void 0:p.quantityOrdered)),y=(Q=n==null?void 0:n.items)==null?void 0:Q.reduce((p,f)=>{const T=f.quantityOrdered-f.quantityShipped;return p+(T>0?T:0)},0);if(u&&(n!=null&&n.returns.length)){const p=n.returns.find(f=>f.returnNumber===o);return!p||p.tracking.length===0?null:i(cn,{placeholderImage:s,slots:h,collapseThreshold:c,translations:l,returnData:p,routeTracking:m,routeProductDetails:r})}return!n||e!=null&&e.includes(H.CANCELED)?null:(K=n==null?void 0:n.shipments)!=null&&K.length?I&&!(g!=null&&g.length)&&d?null:S(w,{children:[(W=n==null?void 0:n.shipments)==null?void 0:W.map(({tracking:p,items:f,id:T},pn)=>{const Y=f.reduce((t,O)=>t+((O==null?void 0:O.quantityShipped)??O.orderItem.quantityShipped??0),0);return S(A,{variant:"secondary",className:"order-shipping-status-card",children:[i(x,{title:l.shippingCardTitle}),p==null?void 0:p.map(t=>{var a;const O=m==null?void 0:m(t),L=O?()=>{window.open(O,"_blank","noreferrer")}:null;return S("div",{className:"order-shipping-status-card__header",role:"status",children:[S("div",{className:"order-shipping-status-card__header--content",children:[S("p",{children:[l.carrier," ",(a=t==null?void 0:t.carrier)==null?void 0:a.toLocaleUpperCase()," | ",t==null?void 0:t.number]}),i("p",{children:t==null?void 0:t.title})]}),h!=null&&h.DeliveryTrackActions?i(q,{"data-testid":"deliverySlotActions",name:"DeliveryTrackActions",slot:h==null?void 0:h.DeliveryTrackActions,context:{trackInformation:t}}):L?i(en,{onClick:L,children:l.trackButton}):null]},t.number)}),d?null:i(G,{actionIconPosition:"right","data-testid":"dropinAccordion",children:i(V,{"data-position":pn+1,defaultOpen:c>=(f==null?void 0:f.length),title:i(U,{id:"Order.ShippingStatusCard.notYetShippedImagesTitle",plural:Y,fields:{count:Y}}),children:i(B,{maxColumns:6,emptyGridContent:i(w,{}),className:"order-shipping-status-card__images",children:f==null?void 0:f.map(t=>{var a,z,J,X,Z,v,P,k,D,nn;const O=(J=(z=(a=t==null?void 0:t.orderItem)==null?void 0:a.product)==null?void 0:z.thumbnail)==null?void 0:J.label,L=(P=(v=(Z=(X=t==null?void 0:t.orderItem)==null?void 0:X.product)==null?void 0:Z.thumbnail)==null?void 0:v.url)!=null&&P.length?(nn=(D=(k=t==null?void 0:t.orderItem)==null?void 0:k.product)==null?void 0:D.thumbnail)==null?void 0:nn.url:s;return i(b,{href:(r==null?void 0:r(t))??"#",children:i(M,{alt:O,src:L,width:85,height:114})},t.id)})})})}),h!=null&&h.DeliveryTimeLine?i(q,{"data-testid":"deliverySlotTimeLine",name:"DeliveryTimeLine",slot:h==null?void 0:h.DeliveryTimeLine,context:{}}):null]},T)}),g!=null&&g.length?S(A,{variant:"secondary",className:"order-shipping-status-card","data-testid":"dropinAccordionNotYetShipped2",children:[i(x,{title:l.notYetShippedTitle}),i(G,{actionIconPosition:"right",children:i(V,{defaultOpen:c>=(g==null?void 0:g.length),title:i(U,{id:"Order.ShippingStatusCard.notYetShippedImagesTitle",plural:y,fields:{count:y}}),children:i(B,{maxColumns:6,emptyGridContent:i(w,{}),className:"order-shipping-status-card__images",children:g==null?void 0:g.map(p=>{var f,T;return i(b,{href:(r==null?void 0:r(p))??"#",children:i(M,{alt:(f=p.thumbnail)==null?void 0:f.label,src:((T=p.thumbnail)==null?void 0:T.url)||"",width:85,height:114})},p.id)})})})})]}):null]}):S(A,{variant:"secondary",className:"order-shipping-status-card",children:[i(x,{title:l.shippingInfoTitle}),i("div",{className:"order-shipping-status-card__header",children:S("div",{className:"order-shipping-status-card__header--content",children:[n!=null&&n.carrier?i("p",{children:n==null?void 0:n.carrier}):null,i("p",{children:l.noInfoTitle})]})})]})},wn=({slots:s,className:l,collapseThreshold:h,orderData:n,routeOrderDetails:c,routeTracking:r,routeProductDetails:m})=>{const{loading:u,order:o,isVirtualProduct:b}=dn({orderData:n}),e=sn(),C=un({carrier:"Order.ShippingStatusCard.carrier",prepositionOf:"Order.ShippingStatusCard.prepositionOf",returnOrderCardTitle:"Order.ShippingStatusCard.returnOrderCardTitle",shippingCardTitle:"Order.ShippingStatusCard.shippingCardTitle",shippingInfoTitle:"Order.ShippingStatusCard.shippingInfoTitle",notYetShippedTitle:"Order.ShippingStatusCard.notYetShippedTitle",noInfoTitle:"Order.ShippingStatusCard.noInfoTitle",returnNumber:"Order.ShippingStatusCard.returnNumber",orderNumber:"Order.ShippingStatusCard.orderNumber",trackButton:"Order.ShippingStatusCard.trackButton"});if(!u&&b)return null;const d=(e==null?void 0:e.baseMediaUrl)??"";return i("div",{className:$(["order-shipping-status",l]),children:!u&&o?i(mn,{placeholderImage:d,translations:C,routeOrderDetails:c,routeTracking:r,slots:s,orderData:o,collapseThreshold:h,routeProductDetails:m}):i(ln,{withCard:!1})})};export{wn as ShippingStatus,wn as default}; diff --git a/scripts/__dropins__/storefront-order/containers/ShippingStatus/index.d.ts b/scripts/__dropins__/storefront-order/containers/ShippingStatus/index.d.ts index e516692942..ee96a8b4a2 100644 --- a/scripts/__dropins__/storefront-order/containers/ShippingStatus/index.d.ts +++ b/scripts/__dropins__/storefront-order/containers/ShippingStatus/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './ShippingStatus'; export { ShippingStatus as default } from './ShippingStatus'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/containers/index.d.ts b/scripts/__dropins__/storefront-order/containers/index.d.ts index 33f75b0a3d..1b49edee73 100644 --- a/scripts/__dropins__/storefront-order/containers/index.d.ts +++ b/scripts/__dropins__/storefront-order/containers/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './CreateReturn'; export * from './CustomerDetails'; export * from './OrderCancelForm'; diff --git a/scripts/__dropins__/storefront-order/data/models/acdl.d.ts b/scripts/__dropins__/storefront-order/data/models/acdl.d.ts index ac95ccd8ce..67fa0bc476 100644 --- a/scripts/__dropins__/storefront-order/data/models/acdl.d.ts +++ b/scripts/__dropins__/storefront-order/data/models/acdl.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ /** * This module contains the schema type definitions to build the ShoppingCart * and Order contexts, which are required to trigger the "place-order" event. diff --git a/scripts/__dropins__/storefront-order/data/models/customer.d.ts b/scripts/__dropins__/storefront-order/data/models/customer.d.ts index 5e1f1813dc..9f87d38aa7 100644 --- a/scripts/__dropins__/storefront-order/data/models/customer.d.ts +++ b/scripts/__dropins__/storefront-order/data/models/customer.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface CustomerDataModelShort { firstname: string; lastname: string; diff --git a/scripts/__dropins__/storefront-order/data/models/index.d.ts b/scripts/__dropins__/storefront-order/data/models/index.d.ts index 33d6b55695..b33eddcea8 100644 --- a/scripts/__dropins__/storefront-order/data/models/index.d.ts +++ b/scripts/__dropins__/storefront-order/data/models/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './acdl'; export * from './attributes-form'; export * from './customer'; diff --git a/scripts/__dropins__/storefront-order/data/models/order-details.d.ts b/scripts/__dropins__/storefront-order/data/models/order-details.d.ts index d3805af02c..3495783f8f 100644 --- a/scripts/__dropins__/storefront-order/data/models/order-details.d.ts +++ b/scripts/__dropins__/storefront-order/data/models/order-details.d.ts @@ -19,6 +19,12 @@ export type OrderAddressModel = { }[]; } | null; export type OrderItemProductModel = { + onlyXLeftInStock?: number; + priceRange?: { + maximumPrice?: { + regularPrice?: MoneyProps; + }; + }; uid: string; __typename: string; stockStatus?: string; @@ -36,6 +42,27 @@ export type OrderItemProductModel = { }; }; export type OrderItemModel = { + taxCalculations: { + includeAndExcludeTax: { + originalPrice: MoneyProps; + baseOriginalPrice: MoneyProps; + baseDiscountedPrice: MoneyProps; + baseExcludingTax: MoneyProps; + }; + excludeTax: { + originalPrice: MoneyProps; + baseOriginalPrice: MoneyProps; + baseDiscountedPrice: MoneyProps; + baseExcludingTax: MoneyProps; + }; + includeTax: { + singleItemPrice: MoneyProps; + baseOriginalPrice: MoneyProps; + baseDiscountedPrice: MoneyProps; + }; + }; + productSalePrice: MoneyProps; + status?: string; currentReturnOrderQuantity?: number; eligibleForReturn: boolean; productSku?: string; @@ -59,6 +86,20 @@ export type OrderItemModel = { count: number; result: string; } | null; + prices: { + priceIncludingTax: MoneyProps; + originalPrice: MoneyProps; + originalPriceIncludingTax: MoneyProps; + price: MoneyProps; + discounts: [ + { + label: string; + amount: { + value: number; + }; + } + ]; + }; itemPrices: { priceIncludingTax: MoneyProps; originalPrice: MoneyProps; @@ -91,7 +132,7 @@ export type OrderItemModel = { quantityRefunded: number; quantityReturned: number; quantityShipped: number; - requestQuantity: number; + requestQuantity?: number; totalQuantity: number; returnableQuantity?: number; quantityReturnRequested: number; @@ -120,7 +161,7 @@ export type ShipmentsModel = { }; export type OrderDataModel = { placeholderImage?: string; - returnNumber: string; + returnNumber?: string; id: string; orderStatusChangeDate?: string; number: string; diff --git a/scripts/__dropins__/storefront-order/data/models/request-return.d.ts b/scripts/__dropins__/storefront-order/data/models/request-return.d.ts index b1b956b633..59da58d2bc 100644 --- a/scripts/__dropins__/storefront-order/data/models/request-return.d.ts +++ b/scripts/__dropins__/storefront-order/data/models/request-return.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface RequestReturnModel { uid: string; number: string; diff --git a/scripts/__dropins__/storefront-order/data/models/store-config.d.ts b/scripts/__dropins__/storefront-order/data/models/store-config.d.ts index 1770b4f2ec..91917cd120 100644 --- a/scripts/__dropins__/storefront-order/data/models/store-config.d.ts +++ b/scripts/__dropins__/storefront-order/data/models/store-config.d.ts @@ -1,10 +1,26 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ +type OrderDisplayPriceProps = 1 | 2 | 3; export interface StoreConfigModel { baseMediaUrl: string; orderCancellationEnabled: boolean; orderCancellationReasons: OrderCancellationReason[]; - shoppingCartDisplayPrice: 1 | 2 | 3; - shoppingOrdersDisplayShipping: 1 | 2 | 3; - shoppingOrdersDisplaySubtotal: 1 | 2 | 3; + shoppingOrderDisplayPrice: OrderDisplayPriceProps; + shoppingOrdersDisplayShipping: OrderDisplayPriceProps; + shoppingOrdersDisplaySubtotal: OrderDisplayPriceProps; shoppingOrdersDisplayFullSummary: boolean; shoppingOrdersDisplayGrandTotal: boolean; shoppingOrdersDisplayZeroTax: boolean; @@ -12,4 +28,5 @@ export interface StoreConfigModel { export interface OrderCancellationReason { description: string; } +export {}; //# sourceMappingURL=store-config.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/data/transforms/index.d.ts b/scripts/__dropins__/storefront-order/data/transforms/index.d.ts index a10f2a7e82..26ffd7872c 100644 --- a/scripts/__dropins__/storefront-order/data/transforms/index.d.ts +++ b/scripts/__dropins__/storefront-order/data/transforms/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './transform-acdl'; export * from './transform-attributes-form'; export * from './transform-customer'; diff --git a/scripts/__dropins__/storefront-order/data/transforms/transform-order-details.d.ts b/scripts/__dropins__/storefront-order/data/transforms/transform-order-details.d.ts index 5421b44993..643f5ddade 100644 --- a/scripts/__dropins__/storefront-order/data/transforms/transform-order-details.d.ts +++ b/scripts/__dropins__/storefront-order/data/transforms/transform-order-details.d.ts @@ -1,5 +1,5 @@ import { QueryType, ResponseData, OrderProps, OrderItemProps } from '../../types'; -import { OrderItemModel, TransformedData } from '../models'; +import { OrderDataModel, OrderItemModel, TransformedData } from '../models'; export declare const transformConfigurableOptions: (item: OrderItemProps) => Record | undefined; export declare const transformBundleOptions: (data: any) => { @@ -12,6 +12,6 @@ export declare const transformLinks: (links: { result: string; } | null; export declare const transformOrderItems: (items: OrderItemProps[]) => OrderItemModel[]; -export declare const transformOrderData: (orderData: OrderProps, returnRef?: string) => any; +export declare const transformOrderData: (orderData: OrderProps, returnRef?: string) => OrderDataModel; export declare const transformOrderDetails: (queryType: QueryType, response: ResponseData, returnRef?: string) => TransformedData; //# sourceMappingURL=transform-order-details.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/fragments.js b/scripts/__dropins__/storefront-order/fragments.js index 5908a7657e..a4a01367ae 100644 --- a/scripts/__dropins__/storefront-order/fragments.js +++ b/scripts/__dropins__/storefront-order/fragments.js @@ -1,4 +1,4 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ const R=` fragment REQUEST_RETURN_ORDER_FRAGMENT on Return { diff --git a/scripts/__dropins__/storefront-order/hooks/containers/useOrderSearch.d.ts b/scripts/__dropins__/storefront-order/hooks/containers/useOrderSearch.d.ts index e1e6f8b152..e3f7be4ca3 100644 --- a/scripts/__dropins__/storefront-order/hooks/containers/useOrderSearch.d.ts +++ b/scripts/__dropins__/storefront-order/hooks/containers/useOrderSearch.d.ts @@ -17,6 +17,7 @@ export declare const useOrderSearch: ({ onError, isAuth, renderSignIn, routeCust name: string; id: string; code: string; + isUnique: boolean; }[]; }; //# sourceMappingURL=useOrderSearch.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/hooks/index.d.ts b/scripts/__dropins__/storefront-order/hooks/index.d.ts index a67ffe6df1..c51fe0060c 100644 --- a/scripts/__dropins__/storefront-order/hooks/index.d.ts +++ b/scripts/__dropins__/storefront-order/hooks/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './containers/useCreateReturn'; export * from './containers/useCustomerDetails'; export * from './containers/useOrderCostSummary'; diff --git a/scripts/__dropins__/storefront-order/hooks/useIsMobile.d.ts b/scripts/__dropins__/storefront-order/hooks/useIsMobile.d.ts index ca0c2d8088..d929f2e819 100644 --- a/scripts/__dropins__/storefront-order/hooks/useIsMobile.d.ts +++ b/scripts/__dropins__/storefront-order/hooks/useIsMobile.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const useIsMobile: () => boolean; //# sourceMappingURL=useIsMobile.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/lib/capitalizeFirst.d.ts b/scripts/__dropins__/storefront-order/lib/capitalizeFirst.d.ts index 18269aab6f..3e8358eb92 100644 --- a/scripts/__dropins__/storefront-order/lib/capitalizeFirst.d.ts +++ b/scripts/__dropins__/storefront-order/lib/capitalizeFirst.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const capitalizeFirst: (str: string) => string; //# sourceMappingURL=capitalizeFirst.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/lib/categorizeProducts.d.ts b/scripts/__dropins__/storefront-order/lib/categorizeProducts.d.ts index b6953c0bed..7a11a1baff 100644 --- a/scripts/__dropins__/storefront-order/lib/categorizeProducts.d.ts +++ b/scripts/__dropins__/storefront-order/lib/categorizeProducts.d.ts @@ -1,8 +1,29 @@ -import { OrderDataModel } from '../data/models'; +import { OrderDataModel, OrderItemModel } from '../data/models'; export declare const categorizeProducts: (order: OrderDataModel) => { returnedList: { totalQuantity: number; + taxCalculations: { + includeAndExcludeTax: { + originalPrice: import('../types/index').MoneyProps; + baseOriginalPrice: import('../types/index').MoneyProps; + baseDiscountedPrice: import('../types/index').MoneyProps; + baseExcludingTax: import('../types/index').MoneyProps; + }; + excludeTax: { + originalPrice: import('../types/index').MoneyProps; + baseOriginalPrice: import('../types/index').MoneyProps; + baseDiscountedPrice: import('../types/index').MoneyProps; + baseExcludingTax: import('../types/index').MoneyProps; + }; + includeTax: { + singleItemPrice: import('../types/index').MoneyProps; + baseOriginalPrice: import('../types/index').MoneyProps; + baseDiscountedPrice: import('../types/index').MoneyProps; + }; + }; + productSalePrice: import('../types/index').MoneyProps; + status?: string | undefined; currentReturnOrderQuantity?: number | undefined; eligibleForReturn: boolean; productSku?: string | undefined; @@ -26,6 +47,18 @@ export declare const categorizeProducts: (order: OrderDataModel) => { count: number; result: string; } | null; + prices: { + priceIncludingTax: import('../types/index').MoneyProps; + originalPrice: import('../types/index').MoneyProps; + originalPriceIncludingTax: import('../types/index').MoneyProps; + price: import('../types/index').MoneyProps; + discounts: [{ + label: string; + amount: { + value: number; + }; + }]; + }; itemPrices: { priceIncludingTax: import('../types/index').MoneyProps; originalPrice: import('../types/index').MoneyProps; @@ -56,11 +89,11 @@ export declare const categorizeProducts: (order: OrderDataModel) => { quantityRefunded: number; quantityReturned: number; quantityShipped: number; - requestQuantity: number; + requestQuantity?: number | undefined; returnableQuantity?: number | undefined; quantityReturnRequested: number; }[]; - canceledItems: (import('../data/models').OrderItemModel | null)[]; - nonCanceledItems: (import('../data/models').OrderItemModel | null)[]; + canceledItems: OrderItemModel[]; + nonCanceledItems: OrderItemModel[]; }; //# sourceMappingURL=categorizeProducts.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/lib/checkIsFunction.d.ts b/scripts/__dropins__/storefront-order/lib/checkIsFunction.d.ts index 49cefb714e..5c317df0c9 100644 --- a/scripts/__dropins__/storefront-order/lib/checkIsFunction.d.ts +++ b/scripts/__dropins__/storefront-order/lib/checkIsFunction.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const checkIsFunction: (value: any) => value is Function; //# sourceMappingURL=checkIsFunction.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/lib/convertCase.d.ts b/scripts/__dropins__/storefront-order/lib/convertCase.d.ts index 44782068b7..716098d1fa 100644 --- a/scripts/__dropins__/storefront-order/lib/convertCase.d.ts +++ b/scripts/__dropins__/storefront-order/lib/convertCase.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const convertToCamelCase: (key: string) => string; export declare const convertToSnakeCase: (key: string) => string; export declare const convertKeysCase: (data: any, type: 'snakeCase' | 'camelCase', dictionary?: Record) => any; diff --git a/scripts/__dropins__/storefront-order/lib/fetch-error.d.ts b/scripts/__dropins__/storefront-order/lib/fetch-error.d.ts index 0a9e09a300..e5a896fea2 100644 --- a/scripts/__dropins__/storefront-order/lib/fetch-error.d.ts +++ b/scripts/__dropins__/storefront-order/lib/fetch-error.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ /** Actions */ export declare const handleFetchError: (errors: Array<{ message: string; diff --git a/scripts/__dropins__/storefront-order/lib/formatDateToLocale.d.ts b/scripts/__dropins__/storefront-order/lib/formatDateToLocale.d.ts index c32256ba3c..98243c58b4 100644 --- a/scripts/__dropins__/storefront-order/lib/formatDateToLocale.d.ts +++ b/scripts/__dropins__/storefront-order/lib/formatDateToLocale.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ /** * Formats a date string according to a specified locale and options. * Returns "Invalid Date" if the input date string is invalid. diff --git a/scripts/__dropins__/storefront-order/lib/getFormValues.d.ts b/scripts/__dropins__/storefront-order/lib/getFormValues.d.ts index 748a077634..2b79098355 100644 --- a/scripts/__dropins__/storefront-order/lib/getFormValues.d.ts +++ b/scripts/__dropins__/storefront-order/lib/getFormValues.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const getFormValues: (form: HTMLFormElement) => any; //# sourceMappingURL=getFormValues.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/lib/getQueryParam.d.ts b/scripts/__dropins__/storefront-order/lib/getQueryParam.d.ts index 8089cdd4f0..4fd3236201 100644 --- a/scripts/__dropins__/storefront-order/lib/getQueryParam.d.ts +++ b/scripts/__dropins__/storefront-order/lib/getQueryParam.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const getQueryParam: (param: string) => string; //# sourceMappingURL=getQueryParam.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/lib/network-error.d.ts b/scripts/__dropins__/storefront-order/lib/network-error.d.ts index 772ab565ae..1b04b8c0e3 100644 --- a/scripts/__dropins__/storefront-order/lib/network-error.d.ts +++ b/scripts/__dropins__/storefront-order/lib/network-error.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ /** * A function which can be attached to fetchGraphQL to handle thrown errors in * a generic way. diff --git a/scripts/__dropins__/storefront-order/lib/redirectTo.d.ts b/scripts/__dropins__/storefront-order/lib/redirectTo.d.ts index 16b9507c5e..0f7a63fc87 100644 --- a/scripts/__dropins__/storefront-order/lib/redirectTo.d.ts +++ b/scripts/__dropins__/storefront-order/lib/redirectTo.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export type QueryParams = Record; export declare const redirectTo: (getUrl?: ((params?: any) => string) | undefined, queryParams?: QueryParams, functionParams?: any) => void; //# sourceMappingURL=redirectTo.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/lib/removeQueryParams.d.ts b/scripts/__dropins__/storefront-order/lib/removeQueryParams.d.ts index 5f56141e93..20062fc2f8 100644 --- a/scripts/__dropins__/storefront-order/lib/removeQueryParams.d.ts +++ b/scripts/__dropins__/storefront-order/lib/removeQueryParams.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare const removeQueryParams: (params: string[]) => void; //# sourceMappingURL=removeQueryParams.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/lib/returnOrdersHelper.d.ts b/scripts/__dropins__/storefront-order/lib/returnOrdersHelper.d.ts index db99e66969..0419d64d6a 100644 --- a/scripts/__dropins__/storefront-order/lib/returnOrdersHelper.d.ts +++ b/scripts/__dropins__/storefront-order/lib/returnOrdersHelper.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ declare const returnStatus: { readonly PENDING: "pending"; readonly AUTHORIZED: "authorized"; diff --git a/scripts/__dropins__/storefront-order/render.js b/scripts/__dropins__/storefront-order/render.js index 1365495e93..1e426fe67d 100644 --- a/scripts/__dropins__/storefront-order/render.js +++ b/scripts/__dropins__/storefront-order/render.js @@ -1,5 +1,5 @@ -/*! Copyright 2024 Adobe +/*! Copyright 2025 Adobe All Rights Reserved. */ (function(n,e){try{if(typeof document<"u"){const r=document.createElement("style"),a=e.styleId;for(const t in e.attributes)r.setAttribute(t,e.attributes[t]);r.setAttribute("data-dropin",a),r.appendChild(document.createTextNode(n));const o=document.querySelector('style[data-dropin="sdk"]');if(o)o.after(r);else{const t=document.querySelector('link[rel="stylesheet"], style');t?t.before(r):document.head.append(r)}}}catch(r){console.error("dropin-styles (injectCodeFunction)",r)}})(`.dropin-button,.dropin-iconButton{border:0 none;cursor:pointer;white-space:normal}.dropin-button{border-radius:var(--shape-border-radius-3);font-size:var(--type-button-1-font);font-weight:var(--type-button-1-font);padding:var(--spacing-xsmall) var(--spacing-medium);display:flex;justify-content:center;align-items:center;text-align:left;word-wrap:break-word}.dropin-iconButton{height:var(--spacing-xbig);width:var(--spacing-xbig);padding:var(--spacing-xsmall)}.dropin-button:disabled,.dropin-iconButton:disabled{pointer-events:none;-webkit-user-select:none;user-select:none}.dropin-button:not(:disabled),.dropin-iconButton:not(:disabled){cursor:pointer}.dropin-button:focus,.dropin-iconButton:focus{outline:none}.dropin-button:focus-visible,.dropin-iconButton:focus-visible{outline:var(--spacing-xxsmall) solid var(--color-button-focus)}.dropin-button--primary,a.dropin-button--primary,.dropin-iconButton--primary{border:none;background:var(--color-brand-500) 0 0% no-repeat padding-box;color:var(--color-neutral-50);text-align:left;margin-right:0}.dropin-iconButton--primary{border-radius:var(--spacing-xbig);min-height:var(--spacing-xbig);min-width:var(--spacing-xbig);padding:var(--spacing-xsmall)}.dropin-button--primary--disabled,a.dropin-button--primary--disabled,.dropin-iconButton--primary--disabled{background:var(--color-neutral-300) 0 0% no-repeat padding-box;color:var(--color-neutral-500);fill:var(--color-neutral-300);pointer-events:none;-webkit-user-select:none;user-select:none}.dropin-button--primary:hover,a.dropin-button--primary:hover,.dropin-iconButton--primary:hover,.dropin-button--primary:focus:hover,.dropin-iconButton--primary:focus:hover{background-color:var(--color-button-hover);text-decoration:none}.dropin-button--primary:focus,.dropin-iconButton--primary:focus{background-color:var(--color-brand-500)}.dropin-button--primary:hover:active,.dropin-iconButton--primary:hover:active{background-color:var(--color-button-active)}.dropin-button--secondary,a.dropin-button--secondary,.dropin-iconButton--secondary{border:var(--shape-border-width-2) solid var(--color-brand-500);background:none 0 0% no-repeat padding-box;color:var(--color-brand-500);padding-top:calc(var(--spacing-xsmall) - var(--shape-border-width-2));padding-left:calc(var(--spacing-medium) - var(--shape-border-width-2))}.dropin-iconButton--secondary{border-radius:var(--spacing-xbig);min-height:var(--spacing-xbig);min-width:var(--spacing-xbig);padding:var(--spacing-xsmall);padding-top:calc(var(--spacing-xsmall) - var(--shape-border-width-2));padding-left:calc(var(--spacing-xsmall) - var(--shape-border-width-2))}.dropin-button--secondary--disabled,a.dropin-button--secondary--disabled,.dropin-iconButton--secondary--disabled{border:var(--shape-border-width-2) solid var(--color-neutral-300);background:none 0 0% no-repeat padding-box;color:var(--color-neutral-500);fill:var(--color-neutral-300);pointer-events:none;-webkit-user-select:none;user-select:none}.dropin-button--secondary:hover,a.dropin-button--secondary:hover,.dropin-iconButton--secondary:hover{border:var(--shape-border-width-2) solid var(--color-button-hover);color:var(--color-button-hover);text-decoration:none}.dropin-button--secondary:active,.dropin-iconButton--secondary:active{border:var(--shape-border-width-2) solid var(--color-button-active);color:var(--color-button-active)}.dropin-button--tertiary,a.dropin-button--tertiary,.dropin-iconButton--tertiary{border:none;background:none 0 0% no-repeat padding-box;color:var(--color-brand-500)}.dropin-iconButton--tertiary{border:none;border-radius:var(--spacing-xbig);min-height:var(--spacing-xbig);min-width:var(--spacing-xbig);padding:var(--spacing-xsmall)}.dropin-button--tertiary--disabled,a.dropin-button--tertiary--disabled,.dropin-iconButton--tertiary--disabled{border:none;color:var(--color-neutral-500);pointer-events:none;-webkit-user-select:none;user-select:none}.dropin-button--tertiary:hover,a.dropin-button--tertiary:hover,.dropin-iconButton--tertiary:hover{color:var(--color-button-hover);text-decoration:none}.dropin-button--tertiary:active,.dropin-iconButton--tertiary:active{color:var(--color-button-active)}.dropin-button--tertiary:focus-visible,.dropin-iconButton--tertiary:focus-visible{-webkit-box-shadow:inset 0 0 0 2px var(--color-neutral-800);-moz-box-shadow:inset 0 0 0 2px var(--color-neutral-800);box-shadow:inset 0 0 0 2px var(--color-neutral-800)}.dropin-button--large{font:var(--type-button-1-font);letter-spacing:var(--type-button-1-letter-spacing)}.dropin-button--medium{font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing)}.dropin-button-icon{height:24px}.dropin-button--with-icon{column-gap:var(--spacing-xsmall);row-gap:var(--spacing-xsmall)} -.order-customer-details-content .dropin-card__content{gap:0}.order-customer-details-content__container{display:block;flex-direction:column}.order-customer-details-content__container-shipping_address,.order-customer-details-content__container-billing_address{margin:var(--spacing-medium) 0}@media (min-width: 768px){.order-customer-details-content__container{display:grid;grid-template-columns:auto;grid-template-rows:auto auto auto;grid-auto-flow:row}.order-customer-details-content__container-email{grid-area:1 / 1 / 2 / 2}.order-customer-details-content__container--no-margin p{margin-bottom:0}.order-customer-details-content__container-shipping_address{grid-area:2 / 1 / 3 / 2;margin:var(--spacing-medium) 0}.order-customer-details-content__container-billing_address,.order-customer-details-content__container-return-information{grid-area:2 / 2 / 3 / 3;margin:var(--spacing-medium) 0}.order-customer-details-content__container-billing_address--fullwidth{grid-area:2 / 1 / 3 / 3}.order-customer-details-content__container-shipping_methods{grid-area:3 / 1 / 4 / 2}.order-customer-details-content__container-payment_methods{grid-area:3 / 2 / 4 / 3}.order-customer-details-content__container-payment_methods--fullwidth{grid-area:3 / 1 / 4 / 3}}.order-customer-details-content__container-title{font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-strong-letter-spacing);margin:0 0 var(--spacing-xsmall) 0}.order-customer-details-content__container p{color:var(--color-neutral-800);font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);margin-top:0}.order-customer-details-content__container-payment_methods p{display:grid;gap:0;grid-template-columns:auto 1fr}.order-customer-details-content__container-payment_methods p.order-customer-details-content__container-payment_methods--icon{gap:0 var(--spacing-xsmall)}.order-customer-details-content__container-description p{margin:0 var(--spacing-xsmall) 0 0;line-height:var(--spacing-big);padding:0}.order-customer-details-content__container-description p:nth-child(1),.order-customer-details-content__container-description p:nth-child(3),.order-customer-details-content__container-description p:nth-child(4),.order-customer-details-content__container-description p:nth-child(6){float:left}.order-customer-details-content__container-return-information .order-customer-details-content__container-description p{float:none;display:block}.order-empty-list{margin-bottom:var(--spacing-small)}.order-empty-list.order-empty-list--minified,.order-empty-list .dropin-card{border:none}.order-empty-list .dropin-card__content{gap:0;padding:var(--spacing-xxbig)}.order-empty-list.order-empty-list--minified .dropin-card__content{flex-direction:row;align-items:center;padding:var(--spacing-big) var(--spacing-small)}.order-empty-list .dropin-card__content svg{width:64px;height:64px;margin-bottom:var(--spacing-medium)}.order-empty-list.order-empty-list--minified .dropin-card__content svg{margin:0 var(--spacing-small) 0 0;width:32px;height:32px}.order-empty-list .dropin-card__content svg path{fill:var(--color-neutral-800)}.order-empty-list.order-empty-list--minified .dropin-card__content svg path{fill:var(--color-neutral-500)}.order-empty-list--empty-box .dropin-card__content svg path{fill:var(--color-neutral-500)}.order-empty-list .dropin-card__content p{font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);color:var(--color-neutral-800)}.order-empty-list.order-empty-list--minified .dropin-card__content p{font:var(--type-body-1-strong-font);color:var(--color-neutral-800)}.order-order-actions__wrapper{display:flex;justify-content:space-between;gap:0 var(--spacing-small);margin-bottom:var(--spacing-small);margin-top:var(--spacing-medium)}.order-order-actions__wrapper button{width:100%;font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-default-letter-spacing);cursor:pointer}.order-order-actions__wrapper--empty{display:none}.order-order-cancel-reasons-form__text{text-align:left;color:var(--color-neutral-800);font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);padding-bottom:var(--spacing-xsmall)}.order-order-cancel-reasons-form__button-container{display:grid;margin-top:var(--spacing-xbig);justify-content:end}.order-order-cancel__modal{margin:auto}.order-order-cancel__modal .dropin-modal__header{display:grid;grid-template-columns:1fr auto}.order-order-cancel__title{color:var(--color-neutral-900);font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing)}.order-order-cancel__text{color:var(--color-neutral-800);font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);padding-bottom:var(--spacing-xsmall)}.order-order-cancel__modal .dropin-modal__header-close-button{align-self:center}.order-order-cancel__button-container{display:grid;margin-top:var(--spacing-xbig);justify-content:end}@media only screen and (min-width: 768px){.dropin-modal__body--medium.order-order-cancel__modal>.dropin-modal__header-title{margin:0 var(--spacing-xxbig) var(--spacing-medium)}}.order-order-loaders--card-loader{margin-bottom:var(--spacing-small)}.order-cost-summary-content .dropin-card__content{gap:0}.order-cost-summary-content__description{margin-bottom:var(--spacing-xsmall)}.order-cost-summary-content__description .order-cost-summary-content__description--header,.order-cost-summary-content__description .order-cost-summary-content__description--subheader{display:flex;justify-content:space-between;align-items:center}.order-cost-summary-content__description .order-cost-summary-content__description--header span{color:var(--color-neutral-800);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.order-cost-summary-content__description--subheader{margin-top:var(--spacing-xxsmall)}.order-cost-summary-content__description--subheader span{font:var(--type-details-caption-2-font);letter-spacing:var(--type-details-caption-2-letter-spacing);color:var(--color-brand-700)}.order-cost-summary-content__description--subtotal .order-cost-summary-content__description--subheader,.order-cost-summary-content__description--shipping .order-cost-summary-content__description--subheader{display:flex;justify-content:flex-start;align-items:center;gap:0 var(--spacing-xxsmall)}.order-cost-summary-content__description--subtotal .order-cost-summary-content__description--subheader .dropin-price,.order-cost-summary-content__description--shipping .order-cost-summary-content__description--subheader .dropin-price{font:var(--type-details-overline-font);font-weight:700}.order-cost-summary-content__description--discount .order-cost-summary-content__description--header span:last-child{color:var(--color-alert-800)}.order-cost-summary-content__description--discount .order-cost-summary-content__description--subheader span:first-child{display:flex;justify-content:flex-start;align-items:flex-end;gap:0 var(--spacing-xsmall)}.order-cost-summary-content__description--discount .order-cost-summary-content__description--subheader span:first-child span{font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);color:var(--color-neutral-700)}.order-cost-summary-content__description--discount .order-cost-summary-content__description--subheader .dropin-price{font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);color:var(--color-alert-800)}.order-cost-summary-content__description--total{margin-top:var(--spacing-medium)}.order-cost-summary-content__description--total .order-cost-summary-content__description--header span{font:var(--type-body-1-emphasized-font);letter-spacing:var(--type-body-1-emphasized-letter-spacing)}.order-cost-summary-content__accordion .dropin-accordion-section .dropin-accordion-section__content-container{gap:var(--spacing-small);margin:var(--spacing-small) 0}.order-cost-summary-content__accordion-row{display:flex;justify-content:space-between;align-items:center}.order-cost-summary-content__accordion-row p{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing)}.order-cost-summary-content__accordion-row p:first-child{color:var(--color-neutral-700)}.order-cost-summary-content__accordion .order-cost-summary-content__accordion-row.order-cost-summary-content__accordion-total p:first-child{font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.order-header{text-align:center;padding:var(--spacing-xxbig)}.order-header__icon{margin-bottom:var(--spacing-small)}.order-header__title{color:var(--color-neutral-800);font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);justify-content:center;margin:0}.order-header__title:first-letter{text-transform:uppercase}.order-header__order{color:var(--color-neutral-700);font:var(--type-details-overline-font);letter-spacing:var(--type-details-overline-letter-spacing);margin:var(--spacing-xxsmall) 0 0 0}.order-header .success-icon{color:var(--color-positive-500)}.order-header-create-account{display:grid;gap:var(--spacing-small);margin-top:var(--spacing-large)}.order-header-create-account__message{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);margin:0}.order-header-create-account__button{display:flex;margin:0 auto;text-align:center}.order-order-product-list-content__items{display:grid;gap:var(--spacing-medium);list-style:none;margin:0 0 var(--spacing-medium) 0;padding:0}.order-order-product-list-content .dropin-card__content{gap:0}.order-order-product-list-content__items .dropin-card__content{gap:var(--spacing-xsmall)}.order-order-product-list-content .dropin-cart-item__alert{margin-top:var(--spacing-xsmall)}.order-order-product-list-content .cart-summary-item__title--strikethrough{text-decoration:line-through;color:var(--color-neutral-500);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}@media only screen and (min-width: 320px) and (max-width: 768px){.order-confirmation-cart-summary-item{margin-bottom:var(--spacing-medium)}}.order-order-search-form{gap:var(--spacing-small);border-color:transparent}.order-order-search-form .dropin-card__content{padding:var(--spacing-big) var(--spacing-xxbig) var(--spacing-xxbig) var(--spacing-xxbig)}.order-order-search-form p{color:var(--color-neutral-700);font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);margin:0}.order-order-search-form__title{color:var(--color-neutral-800);font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing);margin:0}.order-order-search-form__wrapper{display:grid;grid-template-columns:1fr;grid-template-rows:auto;grid-template-areas:"email" "lastname" "number" "button";gap:var(--spacing-medium)}.order-order-search-form__wrapper__item--email{grid-area:email}.order-order-search-form__wrapper__item--lastname{grid-area:lastname}.order-order-search-form__wrapper__item--number{grid-area:number}.order-order-search-form__button-container{display:flex;justify-content:flex-end;grid-area:button}.order-order-search-form form button{align-self:flex-end;justify-self:flex-end;margin-top:var(--spacing-small)}@media (min-width: 768px){.order-order-search-form__wrapper{grid-template-columns:1fr 1fr;grid-template-rows:auto auto auto;grid-template-areas:"email lastname" "number number" "button button"}}.order-order-status-content .dropin-card__content{gap:0}.order-order-status-content__wrapper .order-order-status-content__wrapper-description p{padding:0;margin:0;box-sizing:border-box;font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.order-order-status-content__wrapper-description{margin-bottom:var(--spacing-medium)}.order-order-status-content__wrapper-description--actions-slot{margin-bottom:0}.order-return-order-message p{margin:0;padding:0}.order-return-order-message a{max-width:162px;padding:var(--spacing-xsmall)}.order-return-order-message .order-return-order-message__title{font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);color:var(--color-neutral-800);margin-bottom:var(--spacing-small)}.order-return-order-message .order-return-order-message__subtitle{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);margin-bottom:var(--spacing-xlarge)}.order-create-return .order-create-return_notification{margin-bottom:var(--spacing-medium)}.order-return-order-product-list{list-style:none;margin:0;padding:0}.order-return-order-product-list .order-return-order-product-list__item{display:grid;grid-template-columns:auto 1fr;align-items:start;margin-bottom:var(--spacing-medium);position:relative}.order-return-order-product-list__item--blur:before{content:"";position:absolute;width:100%;height:100%;background-color:var(--color-opacity-24);z-index:1}.order-return-order-product-list>.order-return-order-product-list__item:last-child{display:flex;justify-content:flex-end}.order-return-order-product-list>.order-return-order-product-list__item .dropin-cart-item__alert{margin-top:var(--spacing-xsmall)}.order-return-order-product-list>.order-return-order-product-list__item .cart-summary-item__title--strikethrough{text-decoration:line-through;color:var(--color-neutral-500);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.order-create-return .dropin-cart-item__footer .dropin-incrementer.dropin-incrementer--medium{max-width:160px}.order-return-order-product-list .dropin-incrementer__button-container{margin:0}@media only screen and (min-width: 320px) and (max-width: 768px){.order-return-order-product-list>.order-return-order-product-list__item{margin-bottom:var(--spacing-medium)}}.order-return-reason-form .dropin-cart-item,.order-return-reason-form form .dropin-field{margin-bottom:var(--spacing-medium)}.order-return-reason-form .order-return-reason-form__actions{display:flex;gap:0 var(--spacing-medium);justify-content:flex-end;margin-bottom:0}.order-returns-list-content .order-returns__header--minified{margin-bottom:var(--spacing-small)}.order-returns-list-content .order-returns__header--full-size{margin-bottom:0}.order-returns-list-content__cards-list{margin-bottom:var(--spacing-small)}.order-returns-list-content__cards-list .dropin-card__content{gap:0}.order-returns-list-content__cards-grid{display:grid;grid-template-columns:1fr 1fr auto;gap:0px 0px;grid-template-areas:"descriptions descriptions actions" "images images actions"}.order-returns-list-content__descriptions{grid-area:descriptions}.order-returns-list-content__descriptions p{margin:0 0 var(--spacing-small) 0;padding:0;box-sizing:border-box;font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);color:var(--color-neutral-800)}.order-returns-list-content__descriptions p a{display:inline-block;font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing);color:var(--color-brand-800)}.order-returns-list-content__descriptions p a:hover{color:var(--color-brand-800)}.order-returns-list-content__descriptions .order-returns-list-content__return-status{font:var(--type-button-2-font);font-weight:500;color:var(--color-neutral-800)}.order-returns-list-content .order-returns-list-content__actions{margin:0;padding:0;border:none;background-color:transparent;cursor:pointer;text-decoration:none}.order-returns-list-content a.order-returns-list-content__actions{display:inline-block;width:100%}.order-returns-list-content .order-returns-list-content__actions:hover{text-decoration:none;color:var(--color-brand-500)}.order-returns-list-content__card .dropin-card__content{padding:var(--spacing-small) var(--spacing-medium)}.order-returns-list-content__card .order-returns-list-content__card-wrapper{display:flex;justify-content:space-between;align-items:center;color:var(--color-neutral-800);height:calc(88px - var(--spacing-small) * 2)}.order-returns-list-content__card-wrapper>p{font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing)}.order-returns-list-content__card-wrapper svg{color:var(--color-neutral-800)}.order-returns-list-content__images{margin-top:var(--spacing-small);grid-area:images}.order-returns-list-content__actions{grid-area:actions;align-self:center}.order-returns-list-content .order-returns-list-content__images{overflow:auto}.order-returns-list-content .order-returns-list-content__images .dropin-content-grid__content{grid-template-columns:repeat(6,max-content)!important}.order-returns-list-content .order-returns-list-content__images-3 .dropin-content-grid__content{grid-template-columns:repeat(3,max-content)!important}.order-returns-list-content .order-returns-list-content__images img{object-fit:contain;width:85px;height:114px}.order-shipping-status-card .dropin-card__content{gap:0}.order-shipping-status-card--count-steper{font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing)}.order-shipping-status-card__header{display:grid;grid-template-columns:1fr auto;justify-items:self-start;align-items:center;margin-bottom:var(--spacing-xsmall)}.order-shipping-status-card__header button{max-height:40px}.order-shipping-status-card__header--content p,.order-shipping-status-card--return-order p{padding:0;margin:0;box-sizing:border-box;font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);margin-bottom:var(--spacing-xsmall)}.order-shipping-status-card--return-order p a{display:inline-block;font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing);color:var(--color-brand-800)}.order-shipping-status-card--return-order p a:hover{text-decoration:none;color:var(--color-brand-800)}.order-shipping-status-card .order-shipping-status-card__images .dropin-content-grid__content{grid-template-columns:repeat(6,max-content)!important}.order-shipping-status-card.order-shipping-status-card--return-order .dropin-content-grid.order-shipping-status-card__images{overflow:auto!important}.order-shipping-status-card .order-shipping-status-card__images img{object-fit:contain;width:85px;height:114px}`,{styleId:"order"}); +.order-customer-details-content .dropin-card__content{gap:0}.order-customer-details-content__container{display:block;flex-direction:column}.order-customer-details-content__container-shipping_address,.order-customer-details-content__container-billing_address{margin:var(--spacing-medium) 0}@media (min-width: 768px){.order-customer-details-content__container{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto auto;grid-auto-flow:row}.order-customer-details-content__container-email{grid-area:1 / 1 / 2 / 2}.order-customer-details-content__container--no-margin p{margin-bottom:0}.order-customer-details-content__container-shipping_address{grid-area:2 / 1 / 3 / 2;margin:var(--spacing-medium) 0}.order-customer-details-content__container-billing_address,.order-customer-details-content__container-return-information{grid-area:2 / 2 / 3 / 3;margin:var(--spacing-medium) 0}.order-customer-details-content__container-billing_address--fullwidth{grid-area:2 / 1 / 3 / 3}.order-customer-details-content__container-shipping_methods{grid-area:3 / 1 / 4 / 2}.order-customer-details-content__container-payment_methods{grid-area:3 / 2 / 4 / 3}.order-customer-details-content__container-payment_methods--fullwidth{grid-area:3 / 1 / 4 / 3}}.order-customer-details-content__container-title{font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-strong-letter-spacing);margin:0 0 var(--spacing-xsmall) 0}.order-customer-details-content__container p{color:var(--color-neutral-800);font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);margin-top:0}.order-customer-details-content__container-payment_methods p{display:grid;gap:0;grid-template-columns:auto 1fr}.order-customer-details-content__container-payment_methods p.order-customer-details-content__container-payment_methods--icon{gap:0 var(--spacing-xsmall)}.order-customer-details-content__container-description p{margin:0 var(--spacing-xsmall) 0 0;line-height:var(--spacing-big);padding:0}.order-customer-details-content__container-description p:nth-child(1),.order-customer-details-content__container-description p:nth-child(3),.order-customer-details-content__container-description p:nth-child(4),.order-customer-details-content__container-description p:nth-child(6){float:left}.order-customer-details-content__container-return-information .order-customer-details-content__container-description p{float:none;display:block}.order-empty-list{margin-bottom:var(--spacing-small)}.order-empty-list.order-empty-list--minified,.order-empty-list .dropin-card{border:none}.order-empty-list .dropin-card__content{gap:0;padding:var(--spacing-xxbig)}.order-empty-list.order-empty-list--minified .dropin-card__content{flex-direction:row;align-items:center;padding:var(--spacing-big) var(--spacing-small)}.order-empty-list .dropin-card__content svg{width:64px;height:64px;margin-bottom:var(--spacing-medium)}.order-empty-list.order-empty-list--minified .dropin-card__content svg{margin:0 var(--spacing-small) 0 0;width:32px;height:32px}.order-empty-list .dropin-card__content svg path{fill:var(--color-neutral-800)}.order-empty-list.order-empty-list--minified .dropin-card__content svg path{fill:var(--color-neutral-500)}.order-empty-list--empty-box .dropin-card__content svg path{fill:var(--color-neutral-500)}.order-empty-list .dropin-card__content p{font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);color:var(--color-neutral-800)}.order-empty-list.order-empty-list--minified .dropin-card__content p{font:var(--type-body-1-strong-font);color:var(--color-neutral-800)}.order-order-actions__wrapper{display:flex;justify-content:space-between;gap:0 var(--spacing-small);margin-bottom:var(--spacing-small);margin-top:var(--spacing-medium)}.order-order-actions__wrapper button{width:100%;font:var(--type-body-1-strong-font);letter-spacing:var(--type-body-1-default-letter-spacing);cursor:pointer}.order-order-actions__wrapper--empty{display:none}.order-order-cancel-reasons-form__text{text-align:left;color:var(--color-neutral-800);font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);padding-bottom:var(--spacing-xsmall)}.order-order-cancel-reasons-form__button-container{display:grid;margin-top:var(--spacing-xbig);justify-content:end}.order-order-cancel__modal{margin:auto}.order-order-cancel__modal .dropin-modal__header{display:grid;grid-template-columns:1fr auto}.order-order-cancel__title{color:var(--color-neutral-900);font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing)}.order-order-cancel__text{color:var(--color-neutral-800);font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);padding-bottom:var(--spacing-xsmall)}.order-order-cancel__modal .dropin-modal__header-close-button{align-self:center}.order-order-cancel__button-container{display:grid;margin-top:var(--spacing-xbig);justify-content:end}@media only screen and (min-width: 768px){.dropin-modal__body--medium.order-order-cancel__modal>.dropin-modal__header-title{margin:0 var(--spacing-xxbig) var(--spacing-medium)}}.order-order-loaders--card-loader{margin-bottom:var(--spacing-small)}.order-cost-summary-content .dropin-card__content{gap:0}.order-cost-summary-content__description{margin-bottom:var(--spacing-xsmall)}.order-cost-summary-content__description .order-cost-summary-content__description--header,.order-cost-summary-content__description .order-cost-summary-content__description--subheader{display:flex;justify-content:space-between;align-items:center}.order-cost-summary-content__description .order-cost-summary-content__description--header span{color:var(--color-neutral-800);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.order-cost-summary-content__description--subheader{margin-top:var(--spacing-xxsmall)}.order-cost-summary-content__description--subheader span{font:var(--type-details-caption-2-font);letter-spacing:var(--type-details-caption-2-letter-spacing);color:var(--color-brand-700)}.order-cost-summary-content__description--subtotal .order-cost-summary-content__description--subheader,.order-cost-summary-content__description--shipping .order-cost-summary-content__description--subheader{display:flex;justify-content:flex-start;align-items:center;gap:0 var(--spacing-xxsmall)}.order-cost-summary-content__description--subtotal .order-cost-summary-content__description--subheader .dropin-price,.order-cost-summary-content__description--shipping .order-cost-summary-content__description--subheader .dropin-price{font:var(--type-details-overline-font);font-weight:700}.order-cost-summary-content__description--discount .order-cost-summary-content__description--header span:last-child{color:var(--color-alert-800)}.order-cost-summary-content__description--discount .order-cost-summary-content__description--subheader span:first-child{display:flex;justify-content:flex-start;align-items:flex-end;gap:0 var(--spacing-xsmall)}.order-cost-summary-content__description--discount .order-cost-summary-content__description--subheader span:first-child span{font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);color:var(--color-neutral-700)}.order-cost-summary-content__description--discount .order-cost-summary-content__description--subheader .dropin-price{font:var(--type-details-caption-1-font);letter-spacing:var(--type-details-caption-1-letter-spacing);color:var(--color-alert-800)}.order-cost-summary-content__description--total{margin-top:var(--spacing-medium)}.order-cost-summary-content__description--total .order-cost-summary-content__description--header span{font:var(--type-body-1-emphasized-font);letter-spacing:var(--type-body-1-emphasized-letter-spacing)}.order-cost-summary-content__accordion .dropin-accordion-section .dropin-accordion-section__content-container{gap:var(--spacing-small);margin:var(--spacing-small) 0}.order-cost-summary-content__accordion-row{display:flex;justify-content:space-between;align-items:center}.order-cost-summary-content__accordion-row p{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing)}.order-cost-summary-content__accordion-row p:first-child{color:var(--color-neutral-700)}.order-cost-summary-content__accordion .order-cost-summary-content__accordion-row.order-cost-summary-content__accordion-total p:first-child{font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.order-header{text-align:center;padding:var(--spacing-xxbig)}.order-header__icon{margin-bottom:var(--spacing-small)}.order-header__title{color:var(--color-neutral-800);font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);justify-content:center;margin:0}.order-header__title:first-letter{text-transform:uppercase}.order-header__order{color:var(--color-neutral-700);font:var(--type-details-overline-font);letter-spacing:var(--type-details-overline-letter-spacing);margin:var(--spacing-xxsmall) 0 0 0}.order-header .success-icon{color:var(--color-positive-500)}.order-header-create-account{display:grid;gap:var(--spacing-small);margin-top:var(--spacing-large)}.order-header-create-account__message{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);margin:0}.order-header-create-account__button{display:flex;margin:0 auto;text-align:center}.order-order-product-list-content__items{display:grid;gap:var(--spacing-medium);list-style:none;margin:0 0 var(--spacing-medium) 0;padding:0}.order-order-product-list-content .dropin-card__content{gap:0}.order-order-product-list-content__items .dropin-card__content{gap:var(--spacing-xsmall)}.order-order-product-list-content .dropin-cart-item__alert{margin-top:var(--spacing-xsmall)}.order-order-product-list-content .cart-summary-item__title--strikethrough{text-decoration:line-through;color:var(--color-neutral-500);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}@media only screen and (min-width: 320px) and (max-width: 768px){.order-confirmation-cart-summary-item{margin-bottom:var(--spacing-medium)}}.order-order-search-form{gap:var(--spacing-small);border-color:transparent}.order-order-search-form .dropin-card__content{padding:var(--spacing-big) var(--spacing-xxbig) var(--spacing-xxbig) var(--spacing-xxbig)}.order-order-search-form p{color:var(--color-neutral-700);font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);margin:0}.order-order-search-form__title{color:var(--color-neutral-800);font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing);margin:0}.order-order-search-form__wrapper{display:grid;grid-template-columns:1fr;grid-template-rows:auto;grid-template-areas:"email" "lastname" "number" "button";gap:var(--spacing-medium)}.order-order-search-form__wrapper__item--email{grid-area:email}.order-order-search-form__wrapper__item--lastname{grid-area:lastname}.order-order-search-form__wrapper__item--number{grid-area:number}.order-order-search-form__button-container{display:flex;justify-content:flex-end;grid-area:button}.order-order-search-form form button{align-self:flex-end;justify-self:flex-end;margin-top:var(--spacing-small)}@media (min-width: 768px){.order-order-search-form__wrapper{grid-template-columns:1fr 1fr;grid-template-rows:auto auto auto;grid-template-areas:"email lastname" "number number" "button button"}}.order-order-status-content .dropin-card__content{gap:0}.order-order-status-content__wrapper .order-order-status-content__wrapper-description p{padding:0;margin:0;box-sizing:border-box;font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.order-order-status-content__wrapper-description{margin-bottom:var(--spacing-medium)}.order-order-status-content__wrapper-description--actions-slot{margin-bottom:0}.order-return-order-message p{margin:0;padding:0}.order-return-order-message a{max-width:162px;padding:var(--spacing-xsmall)}.order-return-order-message .order-return-order-message__title{font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);color:var(--color-neutral-800);margin-bottom:var(--spacing-small)}.order-return-order-message .order-return-order-message__subtitle{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);margin-bottom:var(--spacing-xlarge)}.order-create-return .order-create-return_notification{margin-bottom:var(--spacing-medium)}.order-return-order-product-list{list-style:none;margin:0;padding:0}.order-return-order-product-list .order-return-order-product-list__item{display:grid;grid-template-columns:auto 1fr;align-items:start;margin-bottom:var(--spacing-medium);position:relative}.order-return-order-product-list__item--blur:before{content:"";position:absolute;width:100%;height:100%;background-color:var(--color-opacity-24);z-index:1}.order-return-order-product-list>.order-return-order-product-list__item:last-child{display:flex;justify-content:flex-end}.order-return-order-product-list>.order-return-order-product-list__item .dropin-cart-item__alert{margin-top:var(--spacing-xsmall)}.order-return-order-product-list>.order-return-order-product-list__item .cart-summary-item__title--strikethrough{text-decoration:line-through;color:var(--color-neutral-500);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.order-create-return .dropin-cart-item__footer .dropin-incrementer.dropin-incrementer--medium{max-width:160px}.order-return-order-product-list .dropin-incrementer__button-container{margin:0}@media only screen and (min-width: 320px) and (max-width: 768px){.order-return-order-product-list>.order-return-order-product-list__item{margin-bottom:var(--spacing-medium)}}.order-return-reason-form .dropin-cart-item,.order-return-reason-form form .dropin-field{margin-bottom:var(--spacing-medium)}.order-return-reason-form .order-return-reason-form__actions{display:flex;gap:0 var(--spacing-medium);justify-content:flex-end;margin-bottom:0}.order-returns-list-content .order-returns__header--minified{margin-bottom:var(--spacing-small)}.order-returns-list-content .order-returns__header--full-size{margin-bottom:0}.order-returns-list-content__cards-list{margin-bottom:var(--spacing-small)}.order-returns-list-content__cards-list .dropin-card__content{gap:0}.order-returns-list-content__cards-grid{display:grid;grid-template-columns:1fr 1fr auto;gap:0px 0px;grid-template-areas:"descriptions descriptions actions" "images images actions"}.order-returns-list-content__descriptions{grid-area:descriptions}.order-returns-list-content__descriptions p{margin:0 0 var(--spacing-small) 0;padding:0;box-sizing:border-box;font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);color:var(--color-neutral-800)}.order-returns-list-content__descriptions p a{display:inline-block;font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing);color:var(--color-brand-800)}.order-returns-list-content__descriptions p a:hover{color:var(--color-brand-800)}.order-returns-list-content__descriptions .order-returns-list-content__return-status{font:var(--type-button-2-font);font-weight:500;color:var(--color-neutral-800)}.order-returns-list-content .order-returns-list-content__actions{margin:0;padding:0;border:none;background-color:transparent;cursor:pointer;text-decoration:none}.order-returns-list-content a.order-returns-list-content__actions{display:inline-block;width:100%}.order-returns-list-content .order-returns-list-content__actions:hover{text-decoration:none;color:var(--color-brand-500)}.order-returns-list-content__card .dropin-card__content{padding:var(--spacing-small) var(--spacing-medium)}.order-returns-list-content__card .order-returns-list-content__card-wrapper{display:flex;justify-content:space-between;align-items:center;color:var(--color-neutral-800);height:calc(88px - var(--spacing-small) * 2)}.order-returns-list-content__card-wrapper>p{font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing)}.order-returns-list-content__card-wrapper svg{color:var(--color-neutral-800)}.order-returns-list-content__images{margin-top:var(--spacing-small);grid-area:images}.order-returns-list-content__actions{grid-area:actions;align-self:center}.order-returns-list-content .order-returns-list-content__images,.order-returns-list-content .dropin-content-grid{overflow:auto}.order-returns-list-content hr.dropin-divider.dropin-divider--secondary:last-child{display:none}.order-returns-list-content .dropin-accordion-section__content-container{margin-bottom:var(--spacing-small)}.order-returns-list-content .order-returns-list-content__images .dropin-content-grid__content{grid-template-columns:repeat(6,max-content)!important}.order-returns-list-content .order-returns-list-content__images-3 .dropin-content-grid__content{grid-template-columns:repeat(3,max-content)!important}.order-returns-list-content .order-returns-list-content__images img{object-fit:contain;width:85px;height:114px}.order-shipping-status-card .dropin-card__content{gap:0}.order-shipping-status-card .dropin-content-grid{overflow:auto}.order-shipping-status-card hr.dropin-divider.dropin-divider--secondary:last-child{display:none}.order-shipping-status-card .dropin-accordion-section__content-container{margin-bottom:var(--spacing-small)}.order-shipping-status-card--count-steper{font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing)}.order-shipping-status-card__header{display:grid;grid-template-columns:1fr auto;justify-items:self-start;align-items:center;margin-bottom:var(--spacing-xsmall)}.order-shipping-status-card__header button{max-height:40px}.order-shipping-status-card__header--content p,.order-shipping-status-card--return-order p{padding:0;margin:0;box-sizing:border-box;font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);margin-bottom:var(--spacing-xsmall)}.order-shipping-status-card--return-order p a{display:inline-block;font:var(--type-button-2-font);letter-spacing:var(--type-button-2-letter-spacing);color:var(--color-brand-800)}.order-shipping-status-card--return-order p a:hover{text-decoration:none;color:var(--color-brand-800)}.order-shipping-status-card .order-shipping-status-card__images .dropin-content-grid__content{grid-template-columns:repeat(6,max-content)!important}.order-shipping-status-card.order-shipping-status-card--return-order .dropin-content-grid.order-shipping-status-card__images{overflow:auto!important}.order-shipping-status-card .order-shipping-status-card__images img{object-fit:contain;width:85px;height:114px}`,{styleId:"order"}); import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import{Render as i}from"@dropins/tools/lib.js";import{useState as n,useEffect as d}from"@dropins/tools/preact-hooks.js";import{UIProvider as l}from"@dropins/tools/components.js";import{events as c}from"@dropins/tools/event-bus.js";const u={CreateReturn:{headerText:"Return items",downloadableCount:"Files",returnedItems:"Returned items:",configurationsList:{quantity:"Quantity"},stockStatus:{inStock:"In stock",outOfStock:"Out of stock"},giftCard:{sender:"Sender",recipient:"Recipient",message:"Note"},success:{title:"Return submitted",message:"Your return request has been successfully submitted."},buttons:{nextStep:"Continue",backStep:"Back",submit:"Submit return",backStore:"Back to order"}},OrderCostSummary:{headerText:"Order summary",headerReturnText:"Return summary",subtotal:{title:"Subtotal"},shipping:{title:"Shipping",freeShipping:"Free shipping"},tax:{accordionTitle:"Taxes",accordionTotalTax:"Tax Total",totalExcludingTaxes:"Total excluding taxes",title:"Tax",incl:"Including taxes",excl:"Excluding taxes"},discount:{title:"Discount",subtitle:"discounted"},total:{title:"Total"}},Returns:{minifiedView:{returnsList:{viewAllOrdersButton:"View all returns",ariaLabelLink:"Redirect to full order information",emptyOrdersListMessage:"No returns",minifiedViewTitle:"Recent returns",orderNumber:"Order number:",returnNumber:"Return number:",carrier:"Carrier:",itemText:{none:"",one:"item",many:"items"},returnStatus:{pending:"Pending",authorized:"Authorized",partiallyAuthorized:"Partially authorized",received:"Received",partiallyReceived:"Partially received",approved:"Approved",partiallyApproved:"Partially approved",rejected:"Rejected",partiallyRejected:"Partially rejected",denied:"Denied",processedAndClosed:"Processed and closed",closed:"Closed"}}},fullSizeView:{returnsList:{viewAllOrdersButton:"View all orders",ariaLabelLink:"Redirect to full order information",emptyOrdersListMessage:"No returns",minifiedViewTitle:"Returns",orderNumber:"Order number:",returnNumber:"Return number:",carrier:"Carrier:",itemText:{none:"",one:"item",many:"items"},returnStatus:{pending:"Pending",authorized:"Authorized",partiallyAuthorized:"Partially authorized",received:"Received",partiallyReceived:"Partially received",approved:"Approved",partiallyApproved:"Partially approved",rejected:"Rejected",partiallyRejected:"Partially rejected",denied:"Denied",processedAndClosed:"Processed and closed",closed:"Closed"}}}},OrderProductListContent:{cancelledTitle:"Cancelled",allOrdersTitle:"Your order",returnedTitle:"Returned",refundedTitle:"Your refunded",downloadableCount:"Files",stockStatus:{inStock:"In stock",outOfStock:"Out of stock"},GiftCard:{sender:"Sender",recipient:"Recipient",message:"Note"}},OrderSearchForm:{title:"Enter your information to view order details",description:"You can find your order number in the receipt you received via email.",button:"View Order",email:"Email",lastname:"Last Name",orderNumber:"Order Number"},Form:{notifications:{requiredFieldError:"This is a required field."}},ShippingStatusCard:{orderNumber:"Order number:",returnNumber:"Return number:",itemText:{none:"",one:"Package contents ({{count}} item)",many:"Package contents ({{count}} items)"},trackButton:"Track package",carrier:"Carrier:",prepositionOf:"of",returnOrderCardTitle:"Package details",shippingCardTitle:"Package details",shippingInfoTitle:"Shipping information",notYetShippedTitle:"Not yet shipped",notYetShippedImagesTitle:{singular:"Package contents ({{count}} item)",plural:"Package contents ({{count}} items)"}},OrderStatusContent:{noInfoTitle:"Check back later for more details.",returnMessage:"The order was placed on {ORDER_CREATE_DATE} and your return process started on {RETURN_CREATE_DATE}",returnStatus:{pending:"Pending",authorized:"Authorized",partiallyAuthorized:"Partially authorized",received:"Received",partiallyReceived:"Partially received",approved:"Approved",partiallyApproved:"Partially approved",rejected:"Rejected",partiallyRejected:"Partially rejected",denied:"Denied",processedAndClosed:"Processed and closed",closed:"Closed"},actions:{cancel:"Cancel order",confirmGuestReturn:"Return request confirmed",confirmGuestReturnMessage:"Your return request has been successfully confirmed.",createReturn:"Return or replace",createAnotherReturn:"Start another return",reorder:"Reorder"},orderPlaceholder:{title:"",message:"Your order has been in its current status since {DATE}.",messageWithoutDate:"Your order has been in its current status for some time."},orderPending:{title:"Pending",message:"The order was successfully placed on {DATE} and your order is processing. Check back for more details when your order ships.",messageWithoutDate:"Your order is processing. Check back for more details when your order ships."},orderProcessing:{title:"Processing",message:"The order was successfully placed on {DATE} and your order is processing. Check back for more details when your order ships.",messageWithoutDate:"Your order is processing. Check back for more details when your order ships."},orderOnHold:{title:"On hold",message:"We’ve run into an issue while processing your order on {DATE}. Please check back later or contact us at support@adobe.com for more information.",messageWithoutDate:"We’ve run into an issue while processing your order. Please check back later or contact us at support@adobe.com for more information."},orderReceived:{title:"Order received",message:"The order was successfully placed on {DATE} and your order is processing. Check back for more details when your order ships.",messageWithoutDate:"Your order is processing. Check back for more details when your order ships."},orderComplete:{title:"Complete",message:"Your order is complete. Need help with your order? Contact us at support@adobe.com"},orderCanceled:{title:"Canceled",message:"This order was cancelled by you. You should see a refund to your original payment method with 5-7 business days.",messageWithoutDate:"This order was cancelled by you. You should see a refund to your original payment method with 5-7 business days."},orderSuspectedFraud:{title:"Suspected fraud",message:"We’ve run into an issue while processing your order on {DATE}. Please check back later or contact us at support@adobe.com for more information.",messageWithoutDate:"We’ve run into an issue while processing your order. Please check back later or contact us at support@adobe.com for more information."},orderPaymentReview:{title:"Payment Review",message:"The order was successfully placed on {DATE} and your order is processing. Check back for more details when your order ships.",messageWithoutDate:"Your order is processing. Check back for more details when your order ships."},guestOrderCancellationRequested:{title:"Cancellation requested",message:"The cancellation has been requested on {DATE}. Check your email for further instructions.",messageWithoutDate:"The cancellation has been requested. Check your email for further instructions."},orderPendingPayment:{title:"Pending Payment",message:"The order was successfully placed on {DATE}, but it is awaiting payment. Please complete the payment so we can start processing your order.",messageWithoutDate:"Your order is awaiting payment. Please complete the payment so we can start processing your order."},orderRejected:{title:"Rejected",message:"Your order was rejected on {DATE}. Please contact us for more information.",messageWithoutDate:"Your order was rejected. Please contact us for more information."},orderAuthorized:{title:"Authorized",message:"Your order was successfully authorized on {DATE}. We will begin processing your order shortly.",messageWithoutDate:"Your order was successfully authorized. We will begin processing your order shortly."},orderPaypalCanceledReversal:{title:"PayPal Canceled Reversal",message:"The PayPal transaction reversal was canceled on {DATE}. Please check your order details for more information.",messageWithoutDate:"The PayPal transaction reversal was canceled. Please check your order details for more information."},orderPendingPaypal:{title:"Pending PayPal",message:"Your order is awaiting PayPal payment confirmation since {DATE}. Please check your PayPal account for the payment status.",messageWithoutDate:"Your order is awaiting PayPal payment confirmation. Please check your PayPal account for the payment status."},orderPaypalReversed:{title:"PayPal Reversed",message:"The PayPal payment was reversed on {DATE}. Please contact us for further details.",messageWithoutDate:"The PayPal payment was reversed. Please contact us for further details."},orderClosed:{title:"Closed",message:"The order placed on {DATE} has been closed. For any further assistance, please contact support.",messageWithoutDate:"Your order has been closed. For any further assistance, please contact support."}},CustomerDetails:{headerText:"Customer information",freeShipping:"Free shipping",orderReturnLabels:{createdReturnAt:"Return requested on: ",returnStatusLabel:"Return status: ",orderNumberLabel:"Order number: "},returnStatus:{pending:"Pending",authorized:"Authorized",partiallyAuthorized:"Partially authorized",received:"Received",partiallyReceived:"Partially received",approved:"Approved",partiallyApproved:"Partially approved",rejected:"Rejected",partiallyRejected:"Partially rejected",denied:"Denied",processedAndClosed:"Processed and closed",closed:"Closed"},email:{title:"Contact details"},shippingAddress:{title:"Shipping address"},shippingMethods:{title:"Shipping method"},billingAddress:{title:"Billing address"},paymentMethods:{title:"Payment method"},returnInformation:{title:"Return details"}},Errors:{invalidOrder:"Invalid order. Please try again.",invalidSearch:"No order found with these order details."},OrderCancel:{buttonText:"Cancel Order"},OrderCancelForm:{title:"Cancel order",description:"Select a reason for canceling the order",label:"Reason for cancel",button:"Submit Cancellation",errorHeading:"Error",errorDescription:"There was an error processing your order cancellation."},OrderHeader:{title:"{{name}}, thank you for your order!",defaultTitle:"Thank you for your order!",order:"ORDER #{{order}}",CreateAccount:{message:"Save your information for faster checkout next time.",button:"Create an account"}}},p={Order:u},m={default:p},h=({children:t})=>{const[o,a]=n("en_US");return d(()=>{const e=c.on("locale",s=>{a(s)},{eager:!0});return()=>{e==null||e.off()}},[]),r(l,{lang:o,langDefinitions:m,children:t})},T=new i(r(h,{}));export{T as render}; diff --git a/scripts/__dropins__/storefront-order/render/index.d.ts b/scripts/__dropins__/storefront-order/render/index.d.ts index b758d268a3..407ec63b4a 100644 --- a/scripts/__dropins__/storefront-order/render/index.d.ts +++ b/scripts/__dropins__/storefront-order/render/index.d.ts @@ -1,2 +1,17 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './render'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/types/api/getAttributesForm.types.d.ts b/scripts/__dropins__/storefront-order/types/api/getAttributesForm.types.d.ts index 5d973409a6..68486a1b7f 100644 --- a/scripts/__dropins__/storefront-order/types/api/getAttributesForm.types.d.ts +++ b/scripts/__dropins__/storefront-order/types/api/getAttributesForm.types.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface ResponseAttributesFormItemsProps { code: string; sort_order: string; diff --git a/scripts/__dropins__/storefront-order/types/api/getAttributesList.types.d.ts b/scripts/__dropins__/storefront-order/types/api/getAttributesList.types.d.ts index b9285c104e..2b9bef72a7 100644 --- a/scripts/__dropins__/storefront-order/types/api/getAttributesList.types.d.ts +++ b/scripts/__dropins__/storefront-order/types/api/getAttributesList.types.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export type AttributesListItems = { code: string; sort_order: string; diff --git a/scripts/__dropins__/storefront-order/types/api/getCustomer.types.d.ts b/scripts/__dropins__/storefront-order/types/api/getCustomer.types.d.ts index 88baa26ea3..99fa7ab6e3 100644 --- a/scripts/__dropins__/storefront-order/types/api/getCustomer.types.d.ts +++ b/scripts/__dropins__/storefront-order/types/api/getCustomer.types.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface getCustomerShortResponse { data: { customer: { diff --git a/scripts/__dropins__/storefront-order/types/api/getOrderDetails.types.d.ts b/scripts/__dropins__/storefront-order/types/api/getOrderDetails.types.d.ts index e53a8b3893..e921da8cae 100644 --- a/scripts/__dropins__/storefront-order/types/api/getOrderDetails.types.d.ts +++ b/scripts/__dropins__/storefront-order/types/api/getOrderDetails.types.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export type QueryType = 'orderData'; export interface UserAddressesProps { city?: string; @@ -21,6 +36,8 @@ interface ThumbnailImageProps { label?: string; } export interface ProductProps { + only_x_left_in_stock?: number; + stock_status?: string; thumbnail?: ThumbnailImageProps; image: ThumbnailImageProps; canonical_url: string; @@ -176,7 +193,9 @@ export interface ShipmentsProps { id: string; product_sku: string; product_name: string; - }; + quantity_shipped: number; + order_item: OrderItemProps; + }[]; } export declare enum AvailableActionsProps { CANCEL = "CANCEL", @@ -213,6 +232,8 @@ export interface ReturnsItemsProps { }[]; } export interface OrderProps { + is_virtual?: boolean; + order_status_change_date?: string; available_actions: AvailableActionsProps[]; shipping_method: string; status: string; diff --git a/scripts/__dropins__/storefront-order/types/api/reorderItems.types.d.ts b/scripts/__dropins__/storefront-order/types/api/reorderItems.types.d.ts index 0e6aea61fd..5163ec5b45 100644 --- a/scripts/__dropins__/storefront-order/types/api/reorderItems.types.d.ts +++ b/scripts/__dropins__/storefront-order/types/api/reorderItems.types.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface UserInputErrorProps { code: string; message: string; diff --git a/scripts/__dropins__/storefront-order/types/api/requestReturn.types.d.ts b/scripts/__dropins__/storefront-order/types/api/requestReturn.types.d.ts index b9227060f0..fb284515ce 100644 --- a/scripts/__dropins__/storefront-order/types/api/requestReturn.types.d.ts +++ b/scripts/__dropins__/storefront-order/types/api/requestReturn.types.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface RequestReturnProps { orderUid?: string; contactEmail: string; diff --git a/scripts/__dropins__/storefront-order/types/createReturn.types.d.ts b/scripts/__dropins__/storefront-order/types/createReturn.types.d.ts index 17aafb587b..7ffa0735c0 100644 --- a/scripts/__dropins__/storefront-order/types/createReturn.types.d.ts +++ b/scripts/__dropins__/storefront-order/types/createReturn.types.d.ts @@ -21,7 +21,7 @@ export interface CreateReturnProps { }>; }; className: string; - onSuccess?: (response: onSuccessTypes) => void; + onSuccess?: (response: onSuccessTypes | {}) => void; onError?: (message: string) => void; routeReturnSuccess?: () => string; showConfigurableOptions?: (options: options | {}) => options; @@ -63,7 +63,7 @@ export interface ReturnOrderMessageProps { } export interface UseCreateReturn { orderData?: OrderDataModel; - onSuccess?: (response: onSuccessTypes) => void; + onSuccess?: (response: onSuccessTypes | {}) => void; onError?: (message: string) => void; handleSetInLineAlert: (value?: InLineAlertProps) => void; } diff --git a/scripts/__dropins__/storefront-order/types/emptyList.types.d.ts b/scripts/__dropins__/storefront-order/types/emptyList.types.d.ts index 7438083876..e077ed1934 100644 --- a/scripts/__dropins__/storefront-order/types/emptyList.types.d.ts +++ b/scripts/__dropins__/storefront-order/types/emptyList.types.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface EmptyListProps { isEmpty: boolean; typeList: 'orders'; diff --git a/scripts/__dropins__/storefront-order/types/form.types.d.ts b/scripts/__dropins__/storefront-order/types/form.types.d.ts index 273ea23b2f..225dd202bc 100644 --- a/scripts/__dropins__/storefront-order/types/form.types.d.ts +++ b/scripts/__dropins__/storefront-order/types/form.types.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export declare enum FieldEnumList { BOOLEAN = "BOOLEAN", DATE = "DATE", diff --git a/scripts/__dropins__/storefront-order/types/index.d.ts b/scripts/__dropins__/storefront-order/types/index.d.ts index b1b829585e..89d78a6780 100644 --- a/scripts/__dropins__/storefront-order/types/index.d.ts +++ b/scripts/__dropins__/storefront-order/types/index.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export * from './api/getAttributesForm.types'; export * from './api/getAttributesList.types'; export * from './api/getCustomer.types'; diff --git a/scripts/__dropins__/storefront-order/types/orderCostSummary.types.d.ts b/scripts/__dropins__/storefront-order/types/orderCostSummary.types.d.ts index 1578f9a786..24adb6b759 100644 --- a/scripts/__dropins__/storefront-order/types/orderCostSummary.types.d.ts +++ b/scripts/__dropins__/storefront-order/types/orderCostSummary.types.d.ts @@ -5,8 +5,8 @@ type TaxTypes = { taxIncluded: boolean; taxExcluded: boolean; }; -export interface StoreConfigProps extends Omit { - shoppingCartDisplayPrice: TaxTypes; +export interface StoreConfigProps extends Omit { + shoppingOrderDisplayPrice: TaxTypes; shoppingOrdersDisplayShipping: TaxTypes; shoppingOrdersDisplaySubtotal: TaxTypes; } diff --git a/scripts/__dropins__/storefront-order/types/orderEmailActionHandler.types.d.ts b/scripts/__dropins__/storefront-order/types/orderEmailActionHandler.types.d.ts index 3210948ee1..a0c91a925c 100644 --- a/scripts/__dropins__/storefront-order/types/orderEmailActionHandler.types.d.ts +++ b/scripts/__dropins__/storefront-order/types/orderEmailActionHandler.types.d.ts @@ -1,3 +1,18 @@ +/******************************************************************** + * ADOBE CONFIDENTIAL + * + * Copyright 2024 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + *******************************************************************/ export interface OrderEmailActionHandlerProps { routeRedirect: (orderToken: string, orderNumber: string, orderData: any) => string; }