diff --git a/scripts/__dropins__/storefront-pdp/__mocks__/product-mocks.d.ts b/scripts/__dropins__/storefront-pdp/__mocks__/product-mocks.d.ts deleted file mode 100644 index 0583bef6fb..0000000000 --- a/scripts/__dropins__/storefront-pdp/__mocks__/product-mocks.d.ts +++ /dev/null @@ -1,157 +0,0 @@ -export declare const MOCK_DATA_BUNDLE: { - __typename: string; - id: string; - sku: string; - name: string; - shortDescription: string; - metaDescription: string; - metaKeyword: string; - metaTitle: string; - description: string; - inStock: boolean; - addToCartAllowed: boolean; - url: string; - urlKey: string; - externalId: string; - images: { - url: string; - label: string; - roles: string[]; - }[]; - options: { - id: string; - title: string; - required: boolean; - multi: null; - values: { - id: string; - title: string; - inStock: boolean; - __typename: string; - quantity: number; - isDefault: boolean; - product: { - sku: string; - shortDescription: string; - metaDescription: string; - metaKeyword: string; - metaTitle: string; - name: string; - price: { - final: { - amount: { - value: number; - currency: string; - }; - }; - regular: { - amount: { - value: number; - currency: string; - }; - }; - roles: string[]; - }; - }; - }[]; - }[]; - priceRange: { - maximum: { - final: { - amount: { - value: number; - currency: string; - }; - }; - regular: { - amount: { - value: number; - currency: string; - }; - }; - roles: string[]; - }; - minimum: { - final: { - amount: { - value: number; - currency: string; - }; - }; - regular: { - amount: { - value: number; - currency: string; - }; - }; - roles: string[]; - }; - }; -}; -export declare const MOCK_DATA_BUNDLE_TRANSFORMED: { - name: string; - sku: string; - addToCartAllowed: boolean; - inStock: boolean; - shortDescription: string; - metaDescription: string; - metaKeyword: string; - metaTitle: string; - description: string; - images: { - url: string; - label: string; - width: number; - height: number; - }[]; - prices: { - final: { - amount: number; - currency: string; - }; - regular: { - amount: number; - currency: string; - }; - visible: boolean; - }; - options: { - id: string; - type: "text" | "image" | "color" | "dropdown"; - typename: "ProductViewOptionValueProduct" | "ProductViewOptionValueSwatch" | "ProductViewOptionValueConfiguration"; - label: string; - required: boolean; - multiple: boolean; - items: { - id: string; - inStock: boolean; - label: string; - selected: boolean; - value: string; - product: { - sku: string; - shortDescription: string; - metaDescription: string; - metaKeyword: string; - metaTitle: string; - name: string; - price: { - final: { - amount: { - value: number; - currency: string; - }; - }; - regular: { - amount: { - value: number; - currency: string; - }; - }; - roles: string[]; - }; - }; - }[]; - }[]; -}; -//# sourceMappingURL=product-mocks.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/api.d.ts b/scripts/__dropins__/storefront-pdp/api.d.ts deleted file mode 100644 index 30939a827b..0000000000 --- a/scripts/__dropins__/storefront-pdp/api.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './api/index' diff --git a/scripts/__dropins__/storefront-pdp/api.js b/scripts/__dropins__/storefront-pdp/api.js deleted file mode 100644 index beedc21372..0000000000 --- a/scripts/__dropins__/storefront-pdp/api.js +++ /dev/null @@ -1 +0,0 @@ -import{f as s,g as o,c as i,d as c,r as p,s as d,a as h,b as f}from"./chunks/getRefinedProduct.js";import{c as n,i as l}from"./chunks/initialize.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/lib.js";export{n as config,s as fetchGraphQl,o as getConfig,i as getProductData,c as getRefinedProduct,l as initialize,p as removeFetchGraphQlHeader,d as setEndpoint,h as setFetchGraphQlHeader,f as setFetchGraphQlHeaders}; diff --git a/scripts/__dropins__/storefront-pdp/api/fetch-graphql/fetch-graphql.d.ts b/scripts/__dropins__/storefront-pdp/api/fetch-graphql/fetch-graphql.d.ts deleted file mode 100644 index b20f64921e..0000000000 --- a/scripts/__dropins__/storefront-pdp/api/fetch-graphql/fetch-graphql.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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; -}>, getConfig: () => { - endpoint: string | undefined; - fetchGraphQlHeaders: import('@adobe/fetch-graphql').Header | undefined; -}; -//# sourceMappingURL=fetch-graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/api/fetch-graphql/index.d.ts b/scripts/__dropins__/storefront-pdp/api/fetch-graphql/index.d.ts deleted file mode 100644 index 89ebf4772f..0000000000 --- a/scripts/__dropins__/storefront-pdp/api/fetch-graphql/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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-pdp/api/getProductData/getProductData.d.ts b/scripts/__dropins__/storefront-pdp/api/getProductData/getProductData.d.ts deleted file mode 100644 index 00cc3fc96a..0000000000 --- a/scripts/__dropins__/storefront-pdp/api/getProductData/getProductData.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ProductModel } from '../../data/models'; - -export declare const getProductData: (sku: string) => Promise; -//# sourceMappingURL=getProductData.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/api/getProductData/graphql/getProductData.graphql.d.ts b/scripts/__dropins__/storefront-pdp/api/getProductData/graphql/getProductData.graphql.d.ts deleted file mode 100644 index 970065abc0..0000000000 --- a/scripts/__dropins__/storefront-pdp/api/getProductData/graphql/getProductData.graphql.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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_PRODUCT_DATA: string; -//# sourceMappingURL=getProductData.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/api/getProductData/index.d.ts b/scripts/__dropins__/storefront-pdp/api/getProductData/index.d.ts deleted file mode 100644 index 10b13f0efb..0000000000 --- a/scripts/__dropins__/storefront-pdp/api/getProductData/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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 './getProductData'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/api/getRefinedProduct/getRefinedProduct.d.ts b/scripts/__dropins__/storefront-pdp/api/getRefinedProduct/getRefinedProduct.d.ts deleted file mode 100644 index 5c7ec9a4d7..0000000000 --- a/scripts/__dropins__/storefront-pdp/api/getRefinedProduct/getRefinedProduct.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ProductModel } from '../../data/models'; - -export declare const getRefinedProduct: (sku: string, optionUIDs: string[], anchorOptions?: string[], isBundle?: boolean) => Promise; -//# sourceMappingURL=getRefinedProduct.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/api/getRefinedProduct/graphql/RefineProductQuery.graphql.d.ts b/scripts/__dropins__/storefront-pdp/api/getRefinedProduct/graphql/RefineProductQuery.graphql.d.ts deleted file mode 100644 index 7fd151f9af..0000000000 --- a/scripts/__dropins__/storefront-pdp/api/getRefinedProduct/graphql/RefineProductQuery.graphql.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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 REFINE_PRODUCT_QUERY: string; -//# sourceMappingURL=RefineProductQuery.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/api/getRefinedProduct/index.d.ts b/scripts/__dropins__/storefront-pdp/api/getRefinedProduct/index.d.ts deleted file mode 100644 index 1c85c49e19..0000000000 --- a/scripts/__dropins__/storefront-pdp/api/getRefinedProduct/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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 './getRefinedProduct'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/api/graphql/ProductFragment.graphql.d.ts b/scripts/__dropins__/storefront-pdp/api/graphql/ProductFragment.graphql.d.ts deleted file mode 100644 index d672860813..0000000000 --- a/scripts/__dropins__/storefront-pdp/api/graphql/ProductFragment.graphql.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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 ProductFragment: string; -//# sourceMappingURL=ProductFragment.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/api/graphql/ProductOptionFragment.graphql.d.ts b/scripts/__dropins__/storefront-pdp/api/graphql/ProductOptionFragment.graphql.d.ts deleted file mode 100644 index 5a73338093..0000000000 --- a/scripts/__dropins__/storefront-pdp/api/graphql/ProductOptionFragment.graphql.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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 ProductOptionFragment = "\nfragment ProductOptionFragment on ProductViewOption {\n id\n title\n required\n multi\n values {\n id\n title\n inStock\n __typename\n ... on ProductViewOptionValueProduct {\n title\n quantity\n isDefault\n __typename\n product {\n sku\n shortDescription\n metaDescription\n metaKeyword\n metaTitle\n name\n price {\n final {\n amount {\n value\n currency\n }\n }\n regular {\n amount {\n value\n currency\n }\n }\n roles\n }\n }\n }\n ... on ProductViewOptionValueSwatch {\n id\n title\n type\n value\n inStock\n }\n }\n }\n"; -//# sourceMappingURL=ProductOptionFragment.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/api/index.d.ts b/scripts/__dropins__/storefront-pdp/api/index.d.ts deleted file mode 100644 index f3e6257bbf..0000000000 --- a/scripts/__dropins__/storefront-pdp/api/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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 './getProductData'; -export * from './getRefinedProduct'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/api/initialize/index.d.ts b/scripts/__dropins__/storefront-pdp/api/initialize/index.d.ts deleted file mode 100644 index 1ab10aa2fb..0000000000 --- a/scripts/__dropins__/storefront-pdp/api/initialize/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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-pdp/api/initialize/initialize.d.ts b/scripts/__dropins__/storefront-pdp/api/initialize/initialize.d.ts deleted file mode 100644 index 07b5b62c7e..0000000000 --- a/scripts/__dropins__/storefront-pdp/api/initialize/initialize.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Initializer } from '@dropins/tools/types/elsie/src/lib'; -import { Lang } from '@dropins/tools/types/elsie/src/i18n'; -import { ProductModel } from '../../data/models'; - -type ConfigProps = { - langDefinitions?: Lang; - defaultLocale?: string; - models?: { - [name: string]: { - initialData: any; - transform: (data?: ProductModel) => ProductModel; - fallbackData?: (parentProduct: any, simpleProduct: ProductModel) => ProductModel; - }; - }; -}; -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-pdp/chunks/getRefinedProduct.js b/scripts/__dropins__/storefront-pdp/chunks/getRefinedProduct.js deleted file mode 100644 index fb71cf4b8e..0000000000 --- a/scripts/__dropins__/storefront-pdp/chunks/getRefinedProduct.js +++ /dev/null @@ -1,185 +0,0 @@ -import{c as B}from"./initialize.js";import{FetchGraphQL as et}from"@dropins/tools/fetch-graphql.js";const{setEndpoint:gt,setFetchGraphQlHeader:ht,removeFetchGraphQlHeader:wt,setFetchGraphQlHeaders:xt,fetchGraphQl:q,getConfig:_t}=new et().getMethods();function K(e,r){var i,u,o;const n=e?{name:e.name,sku:e.sku,addToCartAllowed:e.addToCartAllowed,inStock:e.inStock,shortDescription:e.shortDescription,metaDescription:e.metaDescription,metaKeyword:e.metaKeyword,metaTitle:e.metaTitle,description:e.description,images:rt(e),prices:mt(e,!!r),attributes:nt(e),options:ut(e),optionUIDs:at(e),url:e.url,urlKey:e.urlKey,externalId:e.externalId,externalParentId:e.externalParentId,variantSku:e.variantSku}:null,t=(o=(u=(i=B.getConfig())==null?void 0:i.models)==null?void 0:u.ProductDetails)==null?void 0:o.transform;return t&&n?t(n):n}function rt(e){var r;return(r=e.images)==null?void 0:r.map(n=>(n.url=n.url.replace(/^https?:/,""),n))}function nt(e){var r,n;return(n=(r=e.attributes)==null?void 0:r.filter(({roles:t})=>(t==null?void 0:t.indexOf("visible_in_pdp"))!==-1))==null?void 0:n.map(({label:t,value:i,name:u})=>({id:u,label:t,value:i.toString().split(",").join(", ")}))}function ut(e){const{options:r,optionUIDs:n}=e;return r==null?void 0:r.map(({id:t,title:i,required:u,multi:o,values:m})=>{var d,s;const a=(d=m==null?void 0:m[0])==null?void 0:d.__typename;let l=m==null?void 0:m[0].type;const c=((s=m==null?void 0:m[0])==null?void 0:s.__typename)==="ProductViewOptionValueProduct";return l?l=l.replace("COLOR_HEX","color").replace("TEXT","text").replace("IMAGE","image"):l="dropdown",{id:t,type:l,typename:a,label:i,required:u,multiple:o,items:c?it(m,n):ot(m,n,l)}})}function it(e,r){return e==null?void 0:e.map(({id:n,title:t,inStock:i,isDefault:u,product:o})=>({id:n,inStock:i,label:t,selected:(r==null?void 0:r.indexOf(n))>-1||u,value:n,product:o}))}function ot(e,r,n){return e==null?void 0:e.map(({id:t,title:i,inStock:u,value:o})=>({id:t,inStock:u,label:i,selected:(r==null?void 0:r.indexOf(t))>-1,value:(n==null?void 0:n.toLowerCase())==="dropdown"?t:o==null?void 0:o.replace(/^https?:/,"")}))}function mt(e,r){var E,x,H,I,L;const{price:n,priceRange:t,options:i,optionUIDs:u}=e;let{__typename:o}=e;function m(){var g;const P=n.regular.amount.value,f=((g=n.final)==null?void 0:g.amount.value)??n.regular.amount.value,y=n.regular.amount.currency==="NONE"?"USD":n==null?void 0:n.regular.amount.currency;return[P,f,f,y]}function a(){var _,b,S,V,T,C,D,A,F,$,G,M;const P=(_=t==null?void 0:t.minimum)==null?void 0:_.final.amount.value,f=(b=t==null?void 0:t.maximum)==null?void 0:b.final.amount.value;let y;((V=(S=t==null?void 0:t.minimum)==null?void 0:S.regular)==null?void 0:V.amount.value)===((C=(T=t==null?void 0:t.maximum)==null?void 0:T.regular)==null?void 0:C.amount.value)&&(y=(A=(D=t==null?void 0:t.minimum)==null?void 0:D.regular)==null?void 0:A.amount.value);const g=(($=(F=t==null?void 0:t.minimum)==null?void 0:F.final)==null?void 0:$.amount.currency)==="NONE"?"USD":(M=(G=t==null?void 0:t.minimum)==null?void 0:G.final)==null?void 0:M.amount.currency;return[y,P,f,g]}function l(){var S,V,T,C,D,A,F,$,G,M,X,Y;let P=0,f=0;i==null||i.forEach(k=>{var z;const j=k==null?void 0:k.values;if(j&&Array.isArray(j)){const h=j.map(p=>{var Q,N,J,W;return(W=(J=(N=(Q=p==null?void 0:p.product)==null?void 0:Q.price)==null?void 0:N.regular)==null?void 0:J.amount)==null?void 0:W.value}).filter(p=>p!==void 0),v=h.length>0?Math.max(...h):0;P+=v}else P+=0;(z=k==null?void 0:k.values)==null||z.forEach(h=>{var v,p,Q,N;u!=null&&u.includes(h.id)&&(f+=(N=(Q=(p=(v=h==null?void 0:h.product)==null?void 0:v.price)==null?void 0:p.final)==null?void 0:Q.amount)==null?void 0:N.value)})});const y=(S=t==null?void 0:t.minimum)==null?void 0:S.final.amount.value,g=(V=t==null?void 0:t.maximum)==null?void 0:V.final.amount.value;let _;((C=(T=t==null?void 0:t.minimum)==null?void 0:T.regular)==null?void 0:C.amount.value)===((A=(D=t==null?void 0:t.maximum)==null?void 0:D.regular)==null?void 0:A.amount.value)&&(_=($=(F=t==null?void 0:t.minimum)==null?void 0:F.regular)==null?void 0:$.amount.value);const b=((M=(G=t==null?void 0:t.minimum)==null?void 0:G.final)==null?void 0:M.amount.currency)==="NONE"?"USD":(Y=(X=t==null?void 0:t.minimum)==null?void 0:X.final)==null?void 0:Y.amount.currency;return r&&!u?[_,y,g,b]:P===(t==null?void 0:t.maximum.regular.amount.value)?[f,f,f,b]:[_,y,g,b]}const[c,d,s,w]=o==="SimpleProductView"?m():r?l():a(),O=o==="SimpleProductView"?(E=n==null?void 0:n.roles)==null?void 0:E.includes("visible"):((H=(x=t==null?void 0:t.maximum)==null?void 0:x.roles)==null?void 0:H.includes("visible"))&&((L=(I=t==null?void 0:t.minimum)==null?void 0:I.roles)==null?void 0:L.includes("visible"));return s&&d===s?{regular:{amount:c,currency:w,variant:c&&d!==c?"strikethrough":"default"},final:{amount:s,currency:w,variant:"default"},visible:O}:{final:{minimumAmount:d,maximumAmount:s,currency:w},visible:O}}function at(e){var n;let{optionUIDs:r}=e;return(n=e==null?void 0:e.options)==null||n.map(({values:t})=>{var u;((u=t==null?void 0:t[0])==null?void 0:u.__typename)==="ProductViewOptionValueProduct"&&!r&&(r=[],t==null||t.map(({id:o,isDefault:m})=>{m&&(r==null?void 0:r.indexOf(o))===-1&&r.push(o)}))}),r}const lt=` -fragment ProductOptionFragment on ProductViewOption { - id - title - required - multi - values { - id - title - inStock - __typename - ... on ProductViewOptionValueProduct { - title - quantity - isDefault - __typename - product { - sku - shortDescription - metaDescription - metaKeyword - metaTitle - name - price { - final { - amount { - value - currency - } - } - regular { - amount { - value - currency - } - } - roles - } - } - } - ... on ProductViewOptionValueSwatch { - id - title - type - value - inStock - } - } - } -`,R=` -fragment ProductFragment on ProductView { - __typename - id - sku - name - shortDescription - metaDescription - metaKeyword - metaTitle - description - inStock - addToCartAllowed - url - urlKey - externalId - - images(roles: []) { - url - label - roles - } - - attributes(roles: []) { - name - label - value - roles - } - -... on SimpleProductView { - price { - roles - - regular { - amount { - value - currency - } - } - - final { - amount { - value - currency - } - } - } -} - - - ... on ComplexProductView { - options { - ...ProductOptionFragment - } - - priceRange { - maximum { - final { - amount { - value - currency - } - } - regular { - amount { - value - currency - } - } - roles - } - minimum { - final { - amount { - value - currency - } - } - regular { - amount { - value - currency - } - } - roles - } - } - } -} - -${lt} -`,tt=` -query GET_PRODUCT_DATA($skus: [String]) { - products(skus: $skus) { - ...ProductFragment - } -} - -${R} -`;function Z(e){return e.some(r=>(r==null?void 0:r.__typename)==="ProductViewOptionValueProduct")}const bt=async e=>{var u,o,m,a,l,c,d;const r=(a=(m=(o=(u=B)==null?void 0:u.getConfig())==null?void 0:o.models)==null?void 0:m.ProductDetails)==null?void 0:a.initialData;let n=(l=r==null?void 0:r.options)==null?void 0:l.some(s=>Z(s.values));if(r)return K(r,!!n);const{data:t}=await q(tt,{method:"GET",variables:{skus:[e]}}),i=(c=t==null?void 0:t.products)==null?void 0:c[0];return n=(d=i==null?void 0:i.options)==null?void 0:d.some(s=>Z(s.values)),K(i,!!n)},ct=` -query REFINE_PRODUCT_QUERY( - $optionIds: [String!]! - $sku: String! -) { - # Refined Product - refineProduct( - optionIds: $optionIds - sku: $sku - ) { - ...ProductFragment - } - - # Parent Product - products(skus: [$sku]) { - ...ProductFragment - } - - # %extendedPlaceholder% -} - -${R} -`;async function U(e,r,n){var m;if(n)return{...(m=(await q(tt,{method:"GET",variables:{skus:[e]}})).data)==null?void 0:m.products[0],optionUIDs:r};const t=st(r),i=dt(t,e),u=ct.replace("# %extendedPlaceholder%",i),{data:o}=await q(u,{method:"GET",variables:{optionIds:r,sku:e}});return o}const kt=async(e,r,n,t)=>{var s,w,O,E;let i;if(i=await U(e,r,t),!i)return null;if(t)return K({...i,optionUIDs:r},!0);let{products:u,refineProduct:o,...m}=i;const a=u==null?void 0:u[0],l=ft(Object.values(m),a.options,n);if(n!=null&&n.length&&o===null){r=Pt(l,r,n);const x=await U(e,r);o=x==null?void 0:x.refineProduct}const c=K({...o||a,sku:a.sku,name:a.name,externalParentId:a==null?void 0:a.externalId,options:l,optionUIDs:r,variantSku:(o==null?void 0:o.__typename)==="SimpleProductView"?o==null?void 0:o.sku:void 0}),d=(E=(O=(w=(s=B)==null?void 0:s.getConfig())==null?void 0:w.models)==null?void 0:O.ProductDetails)==null?void 0:E.fallbackData;return d?d(a,c):c};function st(e){if(e.length<2)return[e];const r=[];return e.forEach(n=>{const t=[];e.forEach(i=>{n!==i&&t.push(i)}),r.push(t)}),r}function dt(e,r){return e.map((n,t)=>` - ProductOption${t}: refineProduct( - optionIds: [ - ${n.map(i=>`"${i}"`).join(", ")} - ] - sku: "${r}" - ) { - ... on ComplexProductView { - options { - ...ProductOptionFragment - } - } - } - `).join("")}function ft(e,r,n){const t=Object.values(e).filter(u=>!!u).reduce((u,o)=>o.options?[...u,...o.options]:[...u],[]),i=new Map(r.map(u=>[u.id,u]));return t.forEach(u=>{n!=null&&n.includes(u.id)||i.set(u.id,u)}),[...i.values()]}function Pt(e,r,n){const t=[];let i;return e.forEach(u=>{var o,m,a,l;n.includes(u.id)?i=((m=(o=u.values)==null?void 0:o.find(c=>r.includes(c==null?void 0:c.id)))==null?void 0:m.id)||((a=u.values[0])==null?void 0:a.id):i=(l=u.values[0])==null?void 0:l.id,t.push(i)}),t}export{ht as a,xt as b,bt as c,kt as d,q as f,_t as g,wt as r,gt as s}; diff --git a/scripts/__dropins__/storefront-pdp/chunks/initialize.js b/scripts/__dropins__/storefront-pdp/chunks/initialize.js deleted file mode 100644 index ee6ee5ce63..0000000000 --- a/scripts/__dropins__/storefront-pdp/chunks/initialize.js +++ /dev/null @@ -1 +0,0 @@ -import{Initializer as t}from"@dropins/tools/lib.js";const i=new t({init:async n=>{const o={defaultLocale:"en-US"};i.config.setConfig({...o,...n})},listeners:()=>[]}),c=i.config;export{c,i}; diff --git a/scripts/__dropins__/storefront-pdp/components/Carousel/Carousel.d.ts b/scripts/__dropins__/storefront-pdp/components/Carousel/Carousel.d.ts deleted file mode 100644 index ae0a01225b..0000000000 --- a/scripts/__dropins__/storefront-pdp/components/Carousel/Carousel.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { FunctionComponent, VNode } from 'preact'; -import { HTMLAttributes } from 'preact/compat'; - -type Show = number; -export interface CarouselProps extends Omit, 'controls'> { - children: VNode[] | VNode; - thumbnails?: VNode[] | VNode; - show?: Show | { - small: Show; - medium: Show; - large: Show; - }; - gap?: 'small' | 'medium' | 'large' | null; - scrollbar?: boolean; - peak?: boolean; - arrows?: boolean; - controls?: 'thumbnailsRow' | 'thumbnailsColumn' | 'dots' | null; - arrowsOnMainImage?: boolean; - loop?: boolean; - direction?: 'horizontal'; - style?: Record; - width?: string; - height?: string; - defaultIndex?: number; - infinite?: boolean; - isZoomed?: boolean; -} -export declare const Carousel: FunctionComponent; -export {}; -//# sourceMappingURL=Carousel.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/components/Carousel/index.d.ts b/scripts/__dropins__/storefront-pdp/components/Carousel/index.d.ts deleted file mode 100644 index b8caa98dfb..0000000000 --- a/scripts/__dropins__/storefront-pdp/components/Carousel/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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 './Carousel'; -export { Carousel as default } from './Carousel'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/components/GalleryGrid/GalleryGrid.d.ts b/scripts/__dropins__/storefront-pdp/components/GalleryGrid/GalleryGrid.d.ts deleted file mode 100644 index 735a343945..0000000000 --- a/scripts/__dropins__/storefront-pdp/components/GalleryGrid/GalleryGrid.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { FunctionComponent, VNode } from 'preact'; -import { HTMLAttributes } from 'preact/compat'; - -export interface GalleryGridProps extends HTMLAttributes { - children: VNode[] | VNode; - gap?: 'small' | 'medium' | 'large' | null; - style?: Record; -} -export declare const GalleryGrid: FunctionComponent; -//# sourceMappingURL=GalleryGrid.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/components/GalleryGrid/index.d.ts b/scripts/__dropins__/storefront-pdp/components/GalleryGrid/index.d.ts deleted file mode 100644 index 235f864347..0000000000 --- a/scripts/__dropins__/storefront-pdp/components/GalleryGrid/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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 './GalleryGrid'; -export { GalleryGrid as default } from './GalleryGrid'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/components/Overlay/Overlay.d.ts b/scripts/__dropins__/storefront-pdp/components/Overlay/Overlay.d.ts deleted file mode 100644 index 09f503caa1..0000000000 --- a/scripts/__dropins__/storefront-pdp/components/Overlay/Overlay.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { FunctionComponent } from 'preact'; -import { HTMLAttributes } from 'preact/compat'; - -export interface OverlayProps extends HTMLAttributes { - centered?: boolean; - onClose?: () => void; -} -export declare const Overlay: FunctionComponent; -//# sourceMappingURL=Overlay.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/components/Overlay/index.d.ts b/scripts/__dropins__/storefront-pdp/components/Overlay/index.d.ts deleted file mode 100644 index f315b9cca9..0000000000 --- a/scripts/__dropins__/storefront-pdp/components/Overlay/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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 './Overlay'; -export { Overlay as default } from './Overlay'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/components/PriceRange/PriceRange.d.ts b/scripts/__dropins__/storefront-pdp/components/PriceRange/PriceRange.d.ts deleted file mode 100644 index 3079ad7d41..0000000000 --- a/scripts/__dropins__/storefront-pdp/components/PriceRange/PriceRange.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { HTMLAttributes } from 'preact/compat'; -import { FunctionalComponent } from 'preact'; - -export interface PriceRangeProps extends HTMLAttributes { - locale?: string; - variant?: 'default' | 'strikethrough'; - currency?: string; - amount?: number; - sale?: boolean; - minimumAmount?: number; - maximumAmount?: number; -} -export declare const PriceRange: FunctionalComponent; -//# sourceMappingURL=PriceRange.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/components/PriceRange/index.d.ts b/scripts/__dropins__/storefront-pdp/components/PriceRange/index.d.ts deleted file mode 100644 index 58d6c774e7..0000000000 --- a/scripts/__dropins__/storefront-pdp/components/PriceRange/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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 './PriceRange'; -export { PriceRange as default } from './PriceRange'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/components/Product/Product.d.ts b/scripts/__dropins__/storefront-pdp/components/Product/Product.d.ts deleted file mode 100644 index d04e7ed0f6..0000000000 --- a/scripts/__dropins__/storefront-pdp/components/Product/Product.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { FunctionComponent, VNode } from 'preact'; -import { HTMLAttributes } from 'preact/compat'; -import { CarouselConfig } from '../../containers'; - -interface ProductCarouselConfig extends CarouselConfig { - thumbnails: VNode[]; -} -export interface ProductProps extends Omit, 'title'> { - title?: VNode; - breadcrumbs?: VNode; - galleryContent?: VNode; - infoContent?: VNode; - productContent?: VNode; - shortDescription?: VNode; - description?: VNode; - attributes?: VNode; - images: VNode[]; - options?: VNode; - sku?: VNode; - price?: VNode; - specialPrice?: VNode; - outOfStock: boolean; - actions?: VNode; - quantity?: VNode; - carouselConfig?: ProductCarouselConfig; - zoomType?: 'zoom' | 'overlay'; - closeButton?: boolean; -} -export declare const Product: FunctionComponent; -export {}; -//# sourceMappingURL=Product.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/components/Product/index.d.ts b/scripts/__dropins__/storefront-pdp/components/Product/index.d.ts deleted file mode 100644 index 1f8ee77a3b..0000000000 --- a/scripts/__dropins__/storefront-pdp/components/Product/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * ADOBE CONFIDENTIAL - * __________________ - * Copyright 2023 Adobe - * All Rights Reserved. - * __________________ - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret 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 './Product'; -export { Product as default } from './Product'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-pdp/components/Swatches/Swatches.d.ts b/scripts/__dropins__/storefront-pdp/components/Swatches/Swatches.d.ts deleted file mode 100644 index fb5fd5efef..0000000000 --- a/scripts/__dropins__/storefront-pdp/components/Swatches/Swatches.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { FunctionComponent } from 'preact'; -import { HTMLAttributes } from 'preact/compat'; - -declare const supportedTypes: string[]; -type OptionValue = { - id: string; - label: string; - inStock: boolean; - value: string; - selected?: boolean; -}; -export type Option = { - id: string; - type: (typeof supportedTypes)[number]; - label: string; - required?: boolean; - multiple?: boolean; - items: OptionValue[]; -}; -type Selection = { - [id: string]: { - label: string; - value: string; - }; -}; -export interface SwatchesProps extends HTMLAttributes { - options: Array