@gfed-medusa/sf-lib-common 1.1.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/breadcrumbs/index.d.ts +4 -6
- package/dist/components/breadcrumbs/index.d.ts.map +1 -1
- package/dist/components/breadcrumbs/index.js.map +1 -1
- package/dist/components/cart-button/index.d.ts +2 -2
- package/dist/components/cart-dropdown/index.d.ts +2 -2
- package/dist/components/cart-dropdown/index.js +0 -1
- package/dist/components/cart-dropdown/index.js.map +1 -1
- package/dist/components/cart-mismatch-banner/index.d.ts +2 -2
- package/dist/components/delete-button/index.d.ts +2 -2
- package/dist/components/delete-button/index.d.ts.map +1 -1
- package/dist/components/error-message/index.d.ts +2 -2
- package/dist/components/footer/index.d.ts +2 -2
- package/dist/components/free-shipping-price-nudge/index.d.ts +2 -2
- package/dist/components/interactive-link/index.d.ts +2 -2
- package/dist/components/layout-country-select/index.d.ts +2 -2
- package/dist/components/line-item-options/index.d.ts +2 -2
- package/dist/components/line-item-options/index.d.ts.map +1 -1
- package/dist/components/line-item-price/index.d.ts +2 -2
- package/dist/components/line-item-price/index.d.ts.map +1 -1
- package/dist/components/localized-client-link/index.d.ts +5 -12
- package/dist/components/localized-client-link/index.d.ts.map +1 -1
- package/dist/components/localized-client-link/index.js +2 -4
- package/dist/components/localized-client-link/index.js.map +1 -1
- package/dist/components/modal/index.d.ts +2 -2
- package/dist/components/modal/index.d.ts.map +1 -1
- package/dist/components/nav/index.d.ts +2 -2
- package/dist/components/portable-text/index.d.ts +2 -2
- package/dist/components/preview-price/index.d.ts +2 -2
- package/dist/components/preview-price/index.d.ts.map +1 -1
- package/dist/components/product-card/index.d.ts +2 -2
- package/dist/components/product-card/index.d.ts.map +1 -1
- package/dist/components/product-card/index.js +3 -4
- package/dist/components/product-card/index.js.map +1 -1
- package/dist/components/product-preview/index.d.ts +2 -2
- package/dist/components/product-preview/index.d.ts.map +1 -1
- package/dist/components/search-modal/index.d.ts +2 -2
- package/dist/components/search-modal/index.d.ts.map +1 -1
- package/dist/components/search-modal/index.js +1 -2
- package/dist/components/search-modal/index.js.map +1 -1
- package/dist/components/side-menu/index.d.ts +2 -2
- package/dist/components/side-menu/index.d.ts.map +1 -1
- package/dist/components/submit-button/index.d.ts +2 -2
- package/dist/components/submit-button/index.d.ts.map +1 -1
- package/dist/lib/context/apollo-context.d.ts +2 -2
- package/dist/lib/context/modal-context.d.ts +2 -2
- package/dist/lib/data/cart.d.ts.map +1 -1
- package/dist/lib/data/cookies.d.ts +2 -1
- package/dist/lib/data/cookies.d.ts.map +1 -1
- package/dist/lib/data/cookies.js +9 -1
- package/dist/lib/data/cookies.js.map +1 -1
- package/dist/lib/gql/apollo-client.js +2 -1
- package/dist/lib/gql/apollo-client.js.map +1 -1
- package/dist/lib/gql/fragments/cart.d.ts +9 -9
- package/dist/lib/gql/fragments/cart.d.ts.map +1 -1
- package/dist/lib/gql/fragments/customer.d.ts +3 -3
- package/dist/lib/gql/fragments/customer.d.ts.map +1 -1
- package/dist/lib/gql/fragments/product.d.ts +8 -8
- package/dist/lib/gql/fragments/product.d.ts.map +1 -1
- package/dist/lib/gql/queries/cart.d.ts +2 -2
- package/dist/lib/gql/queries/collections.d.ts +2 -2
- package/dist/lib/gql/queries/collections.d.ts.map +1 -1
- package/dist/lib/gql/queries/customer.d.ts +2 -2
- package/dist/lib/gql/queries/footer.d.ts +2 -2
- package/dist/lib/gql/queries/footer.d.ts.map +1 -1
- package/dist/lib/gql/queries/footer.js +1 -55
- package/dist/lib/gql/queries/footer.js.map +1 -1
- package/dist/lib/gql/queries/product.d.ts +3 -3
- package/dist/lib/gql/queries/product.d.ts.map +1 -1
- package/dist/lib/utils/env.js +1 -1
- package/dist/lib/utils/env.js.map +1 -1
- package/dist/types/graphql.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/search-modal/index.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport Image from 'next/image';\nimport
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/search-modal/index.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport Image from 'next/image';\nimport { usePathname } from 'next/navigation';\n\nimport DOMPurify from 'isomorphic-dompurify';\n\nimport { PlaceholderImage } from '@gfed-medusa/sf-lib-ui/icons/placeholder-image';\nimport { cn } from '@gfed-medusa/sf-lib-ui/lib/utils';\nimport { Button } from '@medusajs/ui';\n\nimport { useSearch } from '@/lib/hooks/use-search';\nimport { ProductHit } from '@/types/graphql';\n\nimport { Modal } from '../modal';\n\ntype SearchModalProps = {\n buttonClassName?: string;\n};\n\nfunction SearchModal({ buttonClassName }: SearchModalProps) {\n const [isOpen, setIsOpen] = useState(false);\n const pathname = usePathname();\n\n const { query, setQuery, results, loading, error, isTyping } = useSearch();\n\n useEffect(() => {\n setIsOpen(false);\n }, [pathname]);\n\n useEffect(() => {\n if (!isOpen) {\n setQuery('');\n }\n }, [isOpen, setQuery]);\n\n return (\n <>\n <div\n className={cn(\n 'small:flex hidden h-full items-center gap-x-6',\n buttonClassName\n )}\n >\n <Button\n onClick={() => setIsOpen(true)}\n variant=\"transparent\"\n className=\"text-small-regular hover:text-ui-fg-base px-0 hover:bg-transparent focus:!bg-transparent\"\n data-testid=\"search-button\"\n >\n Search\n </Button>\n </div>\n <Modal\n isOpen={isOpen}\n close={() => setIsOpen(false)}\n aria-label=\"Search modal\"\n >\n <div className=\"flex h-full max-h-[75vh] min-h-0 flex-col\">\n <div className=\"shrink-0\">\n <SearchBox query={query} setQuery={setQuery} loading={loading} />\n </div>\n <div className=\"mt-4 min-h-0 flex-1 overflow-y-auto\">\n <SearchResults\n results={results}\n loading={loading}\n error={error}\n query={query}\n isTyping={isTyping}\n />\n </div>\n </div>\n </Modal>\n </>\n );\n}\n\nconst SearchBox = ({\n query,\n setQuery,\n loading,\n}: {\n query: string;\n setQuery: (query: string) => void;\n loading: boolean;\n}) => {\n const inputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n if (inputRef.current && document.activeElement !== inputRef.current) {\n inputRef.current.focus();\n }\n }, [loading]);\n\n return (\n <div className=\"relative w-full\">\n <input\n ref={inputRef}\n type=\"text\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n placeholder=\"Search products...\"\n className=\"w-full rounded-md border border-gray-300 px-4 py-2 focus:outline-none focus-visible:outline-2 focus-visible:outline-blue-500\"\n disabled={loading}\n autoFocus\n data-testid=\"search-input\"\n />\n </div>\n );\n};\n\nconst SearchResults = ({\n results,\n loading,\n error,\n query,\n isTyping,\n}: {\n results: { items: ProductHit[] } | null;\n loading: boolean;\n error: string | null;\n query: string;\n isTyping: boolean;\n}) => {\n if (loading) {\n return (\n <div className=\"flex min-h-full items-center justify-center\">\n <div className=\"text-center\">\n <div className=\"mx-auto h-8 w-8 animate-spin rounded-full border-b-2 border-blue-500\"></div>\n <p className=\"mt-2 text-sm text-gray-500\">Searching...</p>\n </div>\n </div>\n );\n }\n\n if (error) {\n return (\n <div className=\"flex min-h-full items-center justify-center text-rose-600\">\n <p>Error: {error}</p>\n </div>\n );\n }\n\n if (\n query.trim() &&\n !isTyping &&\n !loading &&\n (!results || !results.items || results.items.length === 0)\n ) {\n return (\n <div className=\"flex min-h-full items-center justify-center text-gray-500\">\n <p>No products found</p>\n </div>\n );\n }\n\n if (!query.trim()) {\n return null;\n }\n\n return (\n <div>\n {results?.items?.map((hit: ProductHit) => (\n <Hit key={hit.id} hit={hit} />\n ))}\n </div>\n );\n};\n\nconst Hit = ({ hit }: { hit: ProductHit }) => {\n return (\n <div\n className=\"relative mt-4 flex flex-row gap-x-2\"\n data-testid=\"search-hit\"\n >\n <div className=\"relative h-[100px] w-[100px] shrink-0 overflow-hidden border border-gray-200\">\n {hit.thumbnail ? (\n <Image\n src={hit.thumbnail}\n alt={hit.title ?? 'Product Image'}\n width={100}\n height={100}\n className=\"aspect-square object-cover\"\n />\n ) : (\n <div className=\"border-grey-400 flex h-[125px] w-[100px] items-center justify-center self-start border\">\n <PlaceholderImage size={40} />\n </div>\n )}\n </div>\n <div className=\"flex flex-col gap-y-1\">\n <h3>{hit.title}</h3>\n <p\n className=\"text-sm text-gray-500\"\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(hit.description ?? ''),\n }}\n />\n </div>\n <a\n href={`/products/${hit.handle}`}\n className=\"absolute top-0 right-0 h-full w-full\"\n aria-label={`View Product: ${hit.title}`}\n />\n </div>\n );\n};\n\nexport { SearchModal };\n"],"mappings":";;;;;;;;;;;;;;AAsBA,SAAS,YAAY,EAAE,mBAAqC;CAC1D,MAAM,CAAC,QAAQ,aAAa,SAAS,MAAM;CAC3C,MAAM,WAAW,aAAa;CAE9B,MAAM,EAAE,OAAO,UAAU,SAAS,SAAS,OAAO,aAAa,WAAW;AAE1E,iBAAgB;AACd,YAAU,MAAM;IACf,CAAC,SAAS,CAAC;AAEd,iBAAgB;AACd,MAAI,CAAC,OACH,UAAS,GAAG;IAEb,CAAC,QAAQ,SAAS,CAAC;AAEtB,QACE,8CACE,oBAAC;EACC,WAAW,GACT,iDACA,gBACD;YAED,oBAAC;GACC,eAAe,UAAU,KAAK;GAC9B,SAAQ;GACR,WAAU;GACV,eAAY;aACb;IAEQ;GACL,EACN,oBAAC;EACS;EACR,aAAa,UAAU,MAAM;EAC7B,cAAW;YAEX,qBAAC;GAAI,WAAU;cACb,oBAAC;IAAI,WAAU;cACb,oBAAC;KAAiB;KAAiB;KAAmB;MAAW;KAC7D,EACN,oBAAC;IAAI,WAAU;cACb,oBAAC;KACU;KACA;KACF;KACA;KACG;MACV;KACE;IACF;GACA,IACP;;AAIP,MAAM,aAAa,EACjB,OACA,UACA,cAKI;CACJ,MAAM,WAAW,OAAyB,KAAK;AAE/C,iBAAgB;AACd,MAAI,SAAS,WAAW,SAAS,kBAAkB,SAAS,QAC1D,UAAS,QAAQ,OAAO;IAEzB,CAAC,QAAQ,CAAC;AAEb,QACE,oBAAC;EAAI,WAAU;YACb,oBAAC;GACC,KAAK;GACL,MAAK;GACL,OAAO;GACP,WAAW,MAAM,SAAS,EAAE,OAAO,MAAM;GACzC,aAAY;GACZ,WAAU;GACV,UAAU;GACV;GACA,eAAY;IACZ;GACE;;AAIV,MAAM,iBAAiB,EACrB,SACA,SACA,OACA,OACA,eAOI;AACJ,KAAI,QACF,QACE,oBAAC;EAAI,WAAU;YACb,qBAAC;GAAI,WAAU;cACb,oBAAC,SAAI,WAAU,yEAA6E,EAC5F,oBAAC;IAAE,WAAU;cAA6B;KAAgB;IACtD;GACF;AAIV,KAAI,MACF,QACE,oBAAC;EAAI,WAAU;YACb,qBAAC,kBAAE,WAAQ,SAAU;GACjB;AAIV,KACE,MAAM,MAAM,IACZ,CAAC,YACD,CAAC,YACA,CAAC,WAAW,CAAC,QAAQ,SAAS,QAAQ,MAAM,WAAW,GAExD,QACE,oBAAC;EAAI,WAAU;YACb,oBAAC,iBAAE,sBAAqB;GACpB;AAIV,KAAI,CAAC,MAAM,MAAM,CACf,QAAO;AAGT,QACE,oBAAC,mBACE,SAAS,OAAO,KAAK,QACpB,oBAAC,OAAsB,OAAb,IAAI,GAAgB,CAC9B,GACE;;AAIV,MAAM,OAAO,EAAE,UAA+B;AAC5C,QACE,qBAAC;EACC,WAAU;EACV,eAAY;;GAEZ,oBAAC;IAAI,WAAU;cACZ,IAAI,YACH,oBAAC;KACC,KAAK,IAAI;KACT,KAAK,IAAI,SAAS;KAClB,OAAO;KACP,QAAQ;KACR,WAAU;MACV,GAEF,oBAAC;KAAI,WAAU;eACb,oBAAC,oBAAiB,MAAM,KAAM;MAC1B;KAEJ;GACN,qBAAC;IAAI,WAAU;eACb,oBAAC,kBAAI,IAAI,QAAW,EACpB,oBAAC;KACC,WAAU;KACV,yBAAyB,EACvB,QAAQ,UAAU,SAAS,IAAI,eAAe,GAAG,EAClD;MACD;KACE;GACN,oBAAC;IACC,MAAM,aAAa,IAAI;IACvB,WAAU;IACV,cAAY,iBAAiB,IAAI;KACjC;;GACE"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Region } from "../../types/graphql.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/side-menu/index.d.ts
|
|
5
5
|
declare const SideMenu: ({
|
|
6
6
|
regions
|
|
7
7
|
}: {
|
|
8
8
|
regions: Region[] | null;
|
|
9
|
-
}) =>
|
|
9
|
+
}) => react_jsx_runtime12.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { SideMenu };
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/side-menu/index.tsx"],"sourcesContent":[],"mappings":";;;;cAoBM;;;WAAoC;MAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/side-menu/index.tsx"],"sourcesContent":[],"mappings":";;;;cAoBM;;;WAAoC;MAAiB,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/submit-button/index.d.ts
|
|
5
5
|
declare function SubmitButton({
|
|
@@ -14,7 +14,7 @@ declare function SubmitButton({
|
|
|
14
14
|
className?: string;
|
|
15
15
|
'data-testid'?: string;
|
|
16
16
|
isLoading?: boolean;
|
|
17
|
-
}):
|
|
17
|
+
}): react_jsx_runtime13.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { SubmitButton };
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/submit-button/index.tsx"],"sourcesContent":[],"mappings":";;;;iBAQS,YAAA;;;;iBAIQ;;;YAGL,KAAA,CAAM;;EAPT,SAAA,CAAA,EAAA,MAAY;EACnB,aAAA,CAAA,EAAA,MAAA;EACA,SAAA,CAAA,EAAA,OAAA;CACA,CAAA,EASD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/submit-button/index.tsx"],"sourcesContent":[],"mappings":";;;;iBAQS,YAAA;;;;iBAIQ;;;YAGL,KAAA,CAAM;;EAPT,SAAA,CAAA,EAAA,MAAY;EACnB,aAAA,CAAA,EAAA,MAAA;EACA,SAAA,CAAA,EAAA,OAAA;CACA,CAAA,EASD,mBAAA,CAAA,GAAA,CAAA,OATC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PropsWithChildren } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/context/apollo-context.d.ts
|
|
5
5
|
declare function ApolloClientProvider({
|
|
6
6
|
children
|
|
7
|
-
}: PropsWithChildren):
|
|
7
|
+
}: PropsWithChildren): react_jsx_runtime14.JSX.Element;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { ApolloClientProvider };
|
|
10
10
|
//# sourceMappingURL=apollo-context.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/context/modal-context.d.ts
|
|
5
5
|
interface ModalContext {
|
|
@@ -13,7 +13,7 @@ interface ModalProviderProps {
|
|
|
13
13
|
declare const ModalProvider: ({
|
|
14
14
|
children,
|
|
15
15
|
close
|
|
16
|
-
}: ModalProviderProps) =>
|
|
16
|
+
}: ModalProviderProps) => react_jsx_runtime16.JSX.Element;
|
|
17
17
|
declare const useModal: () => ModalContext;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { ModalProvider, useModal };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart.d.ts","names":[],"sources":["../../../src/lib/data/cart.ts"],"sourcesContent":[],"mappings":";;;;;;;AAsCA;AA0DA;AA+CA;AAuBsB,cAhIT,
|
|
1
|
+
{"version":3,"file":"cart.d.ts","names":[],"sources":["../../../src/lib/data/cart.ts"],"sourcesContent":[],"mappings":";;;;;;;AAsCA;AA0DA;AA+CA;AAuBsB,cAhIT,YA0IS,EAAA,CAAA,MAAU,CAAA,EAAA,MAAA,EAAA,GA1IqB,OA0IrB,CA1I6B,IAgIxB,GAAA,IAAA,CAAA;cAtExB,oCAEV,QAAQ;;;;;;iBA6CW,YAAA,4CAAqD;iBAuBrD,eAAA,CAAA,GAAe;oBAUf,SAAA,CAAU"}
|
|
@@ -9,7 +9,8 @@ declare const getCacheOptions: (tag: string) => Promise<{
|
|
|
9
9
|
tags: string[];
|
|
10
10
|
} | {}>;
|
|
11
11
|
declare const getCartId: () => Promise<string | undefined>;
|
|
12
|
+
declare const setCartId: (cartId: string) => Promise<void>;
|
|
12
13
|
declare const removeCartId: () => Promise<void>;
|
|
13
14
|
//#endregion
|
|
14
|
-
export { getAuthHeaders, getCacheOptions, getCacheTag, getCartId, removeCartId };
|
|
15
|
+
export { getAuthHeaders, getCacheOptions, getCacheTag, getCartId, removeCartId, setCartId };
|
|
15
16
|
//# sourceMappingURL=cookies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookies.d.ts","names":[],"sources":["../../../src/lib/data/cookies.ts"],"sourcesContent":[],"mappings":";;;cAIa,sBAA2B;;AAAxC,CAAA,GAAa,CAAA,CAAA,CAAA;AAiBA,cAAA,WAAmC,EAAA,CAAA,GAAA,EAAO,MAAA,EAAA,GAAP,OAAO,CAAA,MAAA,CAAA;AAe1C,cAAA,eAEV,EAAA,CAAA,GAAA,EAAO,MAAA,EAAA,GAAP,OAAO,CAAA;EAcG,IAAA,EAAA,MAGZ,EAAA;AAED,CAAA,GAAa,CAAA,CAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"cookies.d.ts","names":[],"sources":["../../../src/lib/data/cookies.ts"],"sourcesContent":[],"mappings":";;;cAIa,sBAA2B;;AAAxC,CAAA,GAAa,CAAA,CAAA,CAAA;AAiBA,cAAA,WAAmC,EAAA,CAAA,GAAA,EAAO,MAAA,EAAA,GAAP,OAAO,CAAA,MAAA,CAAA;AAe1C,cAAA,eAEV,EAAA,CAAA,GAAA,EAAO,MAAA,EAAA,GAAP,OAAO,CAAA;EAcG,IAAA,EAAA,MAGZ,EAAA;AAED,CAAA,GAAa,CAAA,CAAA,CAAA;AAUA,cAfA,SAoBZ,EALwB,GAAA,GAfH,OAeG,CAAA,MAAA,GAAA,SAAA,CAAA;cAVZ,+BAAiC;cAUjC,oBAAY"}
|
package/dist/lib/data/cookies.js
CHANGED
|
@@ -29,10 +29,18 @@ const getCacheOptions = async (tag) => {
|
|
|
29
29
|
const getCartId = async () => {
|
|
30
30
|
return (await cookies()).get("_medusa_cart_id")?.value;
|
|
31
31
|
};
|
|
32
|
+
const setCartId = async (cartId) => {
|
|
33
|
+
(await cookies()).set("_medusa_cart_id", cartId, {
|
|
34
|
+
maxAge: 3600 * 24 * 7,
|
|
35
|
+
httpOnly: true,
|
|
36
|
+
sameSite: "strict",
|
|
37
|
+
secure: false
|
|
38
|
+
});
|
|
39
|
+
};
|
|
32
40
|
const removeCartId = async () => {
|
|
33
41
|
(await cookies()).set("_medusa_cart_id", "", { maxAge: -1 });
|
|
34
42
|
};
|
|
35
43
|
|
|
36
44
|
//#endregion
|
|
37
|
-
export { getAuthHeaders, getCacheOptions, getCacheTag, getCartId, removeCartId };
|
|
45
|
+
export { getAuthHeaders, getCacheOptions, getCacheTag, getCartId, removeCartId, setCartId };
|
|
38
46
|
//# sourceMappingURL=cookies.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookies.js","names":["nextCookies"],"sources":["../../../src/lib/data/cookies.ts"],"sourcesContent":["import { cookies as nextCookies } from 'next/headers';\n\nimport 'server-only';\n\nexport const getAuthHeaders = async (): Promise<\n { authorization: string } | {}\n> => {\n try {\n const cookies = await nextCookies();\n const token = cookies.get('_medusa_jwt')?.value;\n\n if (!token) {\n return {};\n }\n\n return { authorization: `Bearer ${token}` };\n } catch {\n return {};\n }\n};\n\nexport const getCacheTag = async (tag: string): Promise<string> => {\n try {\n const cookies = await nextCookies();\n const cacheId = cookies.get('_medusa_cache_id')?.value;\n\n if (!cacheId) {\n return '';\n }\n\n return `${tag}-${cacheId}`;\n } catch (error) {\n return '';\n }\n};\n\nexport const getCacheOptions = async (\n tag: string\n): Promise<{ tags: string[] } | {}> => {\n if (typeof window !== 'undefined') {\n return {};\n }\n\n const cacheTag = await getCacheTag(tag);\n\n if (!cacheTag) {\n return {};\n }\n\n return { tags: [`${cacheTag}`] };\n};\n\nexport const getCartId = async () => {\n const cookies = await nextCookies();\n return cookies.get('_medusa_cart_id')?.value;\n};\n\nexport const removeCartId = async () => {\n const cookies = await nextCookies();\n cookies.set('_medusa_cart_id', '', {\n maxAge: -1,\n });\n};\n"],"mappings":";;;;AAIA,MAAa,iBAAiB,YAEzB;AACH,KAAI;EAEF,MAAM,SADU,MAAMA,SAAa,EACb,IAAI,cAAc,EAAE;AAE1C,MAAI,CAAC,MACH,QAAO,EAAE;AAGX,SAAO,EAAE,eAAe,UAAU,SAAS;SACrC;AACN,SAAO,EAAE;;;AAIb,MAAa,cAAc,OAAO,QAAiC;AACjE,KAAI;EAEF,MAAM,WADU,MAAMA,SAAa,EACX,IAAI,mBAAmB,EAAE;AAEjD,MAAI,CAAC,QACH,QAAO;AAGT,SAAO,GAAG,IAAI,GAAG;UACV,OAAO;AACd,SAAO;;;AAIX,MAAa,kBAAkB,OAC7B,QACqC;AACrC,KAAI,OAAO,WAAW,YACpB,QAAO,EAAE;CAGX,MAAM,WAAW,MAAM,YAAY,IAAI;AAEvC,KAAI,CAAC,SACH,QAAO,EAAE;AAGX,QAAO,EAAE,MAAM,CAAC,GAAG,WAAW,EAAE;;AAGlC,MAAa,YAAY,YAAY;AAEnC,SADgB,MAAMA,SAAa,EACpB,IAAI,kBAAkB,EAAE;;AAGzC,MAAa,eAAe,YAAY;AAEtC,EADgB,MAAMA,SAAa,EAC3B,IAAI,mBAAmB,IAAI,EACjC,QAAQ,IACT,CAAC"}
|
|
1
|
+
{"version":3,"file":"cookies.js","names":["nextCookies"],"sources":["../../../src/lib/data/cookies.ts"],"sourcesContent":["import { cookies as nextCookies } from 'next/headers';\n\nimport 'server-only';\n\nexport const getAuthHeaders = async (): Promise<\n { authorization: string } | {}\n> => {\n try {\n const cookies = await nextCookies();\n const token = cookies.get('_medusa_jwt')?.value;\n\n if (!token) {\n return {};\n }\n\n return { authorization: `Bearer ${token}` };\n } catch {\n return {};\n }\n};\n\nexport const getCacheTag = async (tag: string): Promise<string> => {\n try {\n const cookies = await nextCookies();\n const cacheId = cookies.get('_medusa_cache_id')?.value;\n\n if (!cacheId) {\n return '';\n }\n\n return `${tag}-${cacheId}`;\n } catch (error) {\n return '';\n }\n};\n\nexport const getCacheOptions = async (\n tag: string\n): Promise<{ tags: string[] } | {}> => {\n if (typeof window !== 'undefined') {\n return {};\n }\n\n const cacheTag = await getCacheTag(tag);\n\n if (!cacheTag) {\n return {};\n }\n\n return { tags: [`${cacheTag}`] };\n};\n\nexport const getCartId = async () => {\n const cookies = await nextCookies();\n return cookies.get('_medusa_cart_id')?.value;\n};\n\nexport const setCartId = async (cartId: string) => {\n const cookies = await nextCookies();\n cookies.set('_medusa_cart_id', cartId, {\n maxAge: 60 * 60 * 24 * 7,\n httpOnly: true,\n sameSite: 'strict',\n secure: process.env.NODE_ENV === 'production',\n });\n};\n\nexport const removeCartId = async () => {\n const cookies = await nextCookies();\n cookies.set('_medusa_cart_id', '', {\n maxAge: -1,\n });\n};\n"],"mappings":";;;;AAIA,MAAa,iBAAiB,YAEzB;AACH,KAAI;EAEF,MAAM,SADU,MAAMA,SAAa,EACb,IAAI,cAAc,EAAE;AAE1C,MAAI,CAAC,MACH,QAAO,EAAE;AAGX,SAAO,EAAE,eAAe,UAAU,SAAS;SACrC;AACN,SAAO,EAAE;;;AAIb,MAAa,cAAc,OAAO,QAAiC;AACjE,KAAI;EAEF,MAAM,WADU,MAAMA,SAAa,EACX,IAAI,mBAAmB,EAAE;AAEjD,MAAI,CAAC,QACH,QAAO;AAGT,SAAO,GAAG,IAAI,GAAG;UACV,OAAO;AACd,SAAO;;;AAIX,MAAa,kBAAkB,OAC7B,QACqC;AACrC,KAAI,OAAO,WAAW,YACpB,QAAO,EAAE;CAGX,MAAM,WAAW,MAAM,YAAY,IAAI;AAEvC,KAAI,CAAC,SACH,QAAO,EAAE;AAGX,QAAO,EAAE,MAAM,CAAC,GAAG,WAAW,EAAE;;AAGlC,MAAa,YAAY,YAAY;AAEnC,SADgB,MAAMA,SAAa,EACpB,IAAI,kBAAkB,EAAE;;AAGzC,MAAa,YAAY,OAAO,WAAmB;AAEjD,EADgB,MAAMA,SAAa,EAC3B,IAAI,mBAAmB,QAAQ;EACrC,QAAQ,OAAU,KAAK;EACvB,UAAU;EACV,UAAU;EACV,QAAQ;EACT,CAAC;;AAGJ,MAAa,eAAe,YAAY;AAEtC,EADgB,MAAMA,SAAa,EAC3B,IAAI,mBAAmB,IAAI,EACjC,QAAQ,IACT,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { getBaseURL } from "../utils/env.js";
|
|
1
2
|
import { ApolloClient, ApolloLink, HttpLink, InMemoryCache } from "@apollo/client";
|
|
2
3
|
|
|
3
4
|
//#region src/lib/gql/apollo-client.ts
|
|
4
5
|
const isServer = () => typeof window === "undefined";
|
|
5
6
|
const httpLink = new HttpLink({
|
|
6
|
-
uri: isServer() ? `${
|
|
7
|
+
uri: isServer() ? `${getBaseURL()}/api/graphql` : "/api/graphql",
|
|
7
8
|
credentials: "include"
|
|
8
9
|
});
|
|
9
10
|
const apolloClient = new ApolloClient({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apollo-client.js","names":["error: any"],"sources":["../../../src/lib/gql/apollo-client.ts"],"sourcesContent":["import { IncomingMessage } from 'http';\n\nimport { ApolloLink } from '@apollo/client';\nimport {\n ApolloClient,\n HttpLink,\n InMemoryCache,\n OperationVariables,\n} from '@apollo/client';\n\nconst isServer = () => typeof window === 'undefined';\n\nconst httpLink = new HttpLink({\n uri: isServer()
|
|
1
|
+
{"version":3,"file":"apollo-client.js","names":["error: any"],"sources":["../../../src/lib/gql/apollo-client.ts"],"sourcesContent":["import { IncomingMessage } from 'http';\n\nimport { ApolloLink } from '@apollo/client';\nimport {\n ApolloClient,\n HttpLink,\n InMemoryCache,\n OperationVariables,\n} from '@apollo/client';\n\nimport { getBaseURL } from '../utils/env';\n\nconst isServer = () => typeof window === 'undefined';\n\nconst httpLink = new HttpLink({\n uri: isServer() ? `${getBaseURL()}/api/graphql` : '/api/graphql',\n credentials: 'include',\n});\n\nconst apolloClient = new ApolloClient({\n link: httpLink,\n cache: new InMemoryCache({}),\n defaultOptions: {\n watchQuery: {\n notifyOnNetworkStatusChange: true,\n },\n },\n});\n\n/**\n * When requests are sent from the server, cookies need to be manually attached.\n *\n * @param cookieHeader Cookies string to forward\n * @returns Server-side Apollo client\n */\nexport function createServerApolloClient(cookieHeader?: string) {\n const authLink = new ApolloLink((operation, forward) => {\n if (cookieHeader) {\n operation.setContext(({ headers = {} }) => ({\n headers: {\n ...headers,\n Cookie: cookieHeader,\n },\n }));\n }\n return forward(operation);\n });\n\n return new ApolloClient({\n link: authLink.concat(httpLink),\n cache: new InMemoryCache({}),\n defaultOptions: {\n watchQuery: {\n notifyOnNetworkStatusChange: true,\n },\n },\n });\n}\n\nexport function initializeApollo(req: IncomingMessage | null = null) {\n if (isServer()) {\n const cookieHeader = req?.headers.cookie;\n return createServerApolloClient(cookieHeader);\n }\n\n return apolloClient;\n}\n\nexport async function graphqlFetch<\n TResult,\n TVariables extends OperationVariables,\n>(\n options: ApolloClient.QueryOptions<TResult, TVariables>,\n apolloClientOverride?: ApolloClient\n): Promise<TResult | undefined> {\n try {\n const client = apolloClientOverride || apolloClient;\n\n const { data } = await client.query<TResult, TVariables>({\n ...options,\n fetchPolicy: 'network-only',\n });\n\n return data;\n } catch (error: any) {\n // TODO - Better error handling\n throw new Error(error.message || 'GraphQL error');\n }\n}\n\nexport async function graphqlMutation<\n TResult,\n TVariables extends OperationVariables,\n>(\n options: ApolloClient.MutateOptions<TResult, TVariables>,\n apolloClientOverride?: ApolloClient\n): Promise<TResult | undefined> {\n try {\n const client = apolloClientOverride || apolloClient;\n\n const { data } = await client.mutate<TResult, TVariables>({\n ...options,\n fetchPolicy: 'network-only',\n });\n\n return data;\n } catch (error: any) {\n // TODO - Better error handling\n throw new Error(error.message || 'GraphQL error');\n }\n}\nexport default apolloClient;\n"],"mappings":";;;;AAYA,MAAM,iBAAiB,OAAO,WAAW;AAEzC,MAAM,WAAW,IAAI,SAAS;CAC5B,KAAK,UAAU,GAAG,GAAG,YAAY,CAAC,gBAAgB;CAClD,aAAa;CACd,CAAC;AAEF,MAAM,eAAe,IAAI,aAAa;CACpC,MAAM;CACN,OAAO,IAAI,cAAc,EAAE,CAAC;CAC5B,gBAAgB,EACd,YAAY,EACV,6BAA6B,MAC9B,EACF;CACF,CAAC;;;;;;;AAQF,SAAgB,yBAAyB,cAAuB;AAa9D,QAAO,IAAI,aAAa;EACtB,MAbe,IAAI,YAAY,WAAW,YAAY;AACtD,OAAI,aACF,WAAU,YAAY,EAAE,UAAU,EAAE,QAAQ,EAC1C,SAAS;IACP,GAAG;IACH,QAAQ;IACT,EACF,EAAE;AAEL,UAAO,QAAQ,UAAU;IACzB,CAGe,OAAO,SAAS;EAC/B,OAAO,IAAI,cAAc,EAAE,CAAC;EAC5B,gBAAgB,EACd,YAAY,EACV,6BAA6B,MAC9B,EACF;EACF,CAAC;;AAGJ,SAAgB,iBAAiB,MAA8B,MAAM;AACnE,KAAI,UAAU,EAAE;EACd,MAAM,eAAe,KAAK,QAAQ;AAClC,SAAO,yBAAyB,aAAa;;AAG/C,QAAO;;AAGT,eAAsB,aAIpB,SACA,sBAC8B;AAC9B,KAAI;EAGF,MAAM,EAAE,SAAS,OAFF,wBAAwB,cAET,MAA2B;GACvD,GAAG;GACH,aAAa;GACd,CAAC;AAEF,SAAO;UACAA,OAAY;AAEnB,QAAM,IAAI,MAAM,MAAM,WAAW,gBAAgB;;;AAIrD,eAAsB,gBAIpB,SACA,sBAC8B;AAC9B,KAAI;EAGF,MAAM,EAAE,SAAS,OAFF,wBAAwB,cAET,OAA4B;GACxD,GAAG;GACH,aAAa;GACd,CAAC;AAEF,SAAO;UACAA,OAAY;AAEnB,QAAM,IAAI,MAAM,MAAM,WAAW,gBAAgB;;;AAGrD,4BAAe"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client2 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/fragments/cart.d.ts
|
|
4
|
-
declare const LINE_ITEM_FRAGMENT:
|
|
5
|
-
declare const COUNTRY_FRAGMENT:
|
|
6
|
-
declare const REGION_FRAGMENT:
|
|
7
|
-
declare const SHIPPING_METHODS_FRAGMENT:
|
|
8
|
-
declare const PAYMENT_COLLECTION_FRAGMENT:
|
|
9
|
-
declare const ADDRESS_FRAGMENT:
|
|
10
|
-
declare const PROMOTION_FRAGMENT:
|
|
11
|
-
declare const CART_FRAGMENT:
|
|
4
|
+
declare const LINE_ITEM_FRAGMENT: _apollo_client2.DocumentNode;
|
|
5
|
+
declare const COUNTRY_FRAGMENT: _apollo_client2.DocumentNode;
|
|
6
|
+
declare const REGION_FRAGMENT: _apollo_client2.DocumentNode;
|
|
7
|
+
declare const SHIPPING_METHODS_FRAGMENT: _apollo_client2.DocumentNode;
|
|
8
|
+
declare const PAYMENT_COLLECTION_FRAGMENT: _apollo_client2.DocumentNode;
|
|
9
|
+
declare const ADDRESS_FRAGMENT: _apollo_client2.DocumentNode;
|
|
10
|
+
declare const PROMOTION_FRAGMENT: _apollo_client2.DocumentNode;
|
|
11
|
+
declare const CART_FRAGMENT: _apollo_client2.DocumentNode;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { ADDRESS_FRAGMENT, CART_FRAGMENT, COUNTRY_FRAGMENT, LINE_ITEM_FRAGMENT, PAYMENT_COLLECTION_FRAGMENT, PROMOTION_FRAGMENT, REGION_FRAGMENT, SHIPPING_METHODS_FRAGMENT };
|
|
14
14
|
//# sourceMappingURL=cart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart.d.ts","names":[],"sources":["../../../../src/lib/gql/fragments/cart.ts"],"sourcesContent":[],"mappings":";;;cAIa,oBAiBZ,
|
|
1
|
+
{"version":3,"file":"cart.d.ts","names":[],"sources":["../../../../src/lib/gql/fragments/cart.ts"],"sourcesContent":[],"mappings":";;;cAIa,oBAiBZ,eAAA,CAjB8B;cAmBlB,kBAOZ,eAAA,CAP4B;cAShB,iBAWZ,eAAA,CAX2B;AA5Bf,cAyCA,yBAxBZ,EAkCA,eAAA,CAVqC,YAxBrC;AAEY,cAkCA,2BA3BZ,EA6CA,eAAA,CAlBuC,YA3BvC;AAEY,cA6CA,gBAlCZ,EA4CA,eAAA,CAV4B,YAlC5B;AAEY,cA4CA,kBAlCZ,EA4CA,eAAA,CAV8B,YAlC9B;AAEY,cA4CA,aA1BZ,EAqEA,eAAA,CA3CyB,YA5Cc"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client0 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/fragments/customer.d.ts
|
|
4
|
-
declare const CUSTOMER_ADDRESS_FRAGMENT:
|
|
5
|
-
declare const CUSTOMER_FRAGMENT:
|
|
4
|
+
declare const CUSTOMER_ADDRESS_FRAGMENT: _apollo_client0.DocumentNode;
|
|
5
|
+
declare const CUSTOMER_FRAGMENT: _apollo_client0.DocumentNode;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { CUSTOMER_ADDRESS_FRAGMENT, CUSTOMER_FRAGMENT };
|
|
8
8
|
//# sourceMappingURL=customer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.d.ts","names":[],"sources":["../../../../src/lib/gql/fragments/customer.ts"],"sourcesContent":[],"mappings":";;;cAEa,2BAkBZ,
|
|
1
|
+
{"version":3,"file":"customer.d.ts","names":[],"sources":["../../../../src/lib/gql/fragments/customer.ts"],"sourcesContent":[],"mappings":";;;cAEa,2BAkBZ,eAAA,CAlBqC;cAoBzB,mBAeZ,eAAA,CAf6B"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client13 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/fragments/product.d.ts
|
|
4
|
-
declare const PRICE_FRAGMENT:
|
|
5
|
-
declare const PRODUCT_VARIANT_FRAGMENT:
|
|
6
|
-
declare const PRODUCT_HIT_FRAGMENT:
|
|
7
|
-
declare const PRODUCT_CATEGORY_FRAGMENT:
|
|
8
|
-
declare const PRODUCT_COLLECTION_FRAGMENT:
|
|
9
|
-
declare const PRODUCT_IMAGE_FRAGMENT:
|
|
10
|
-
declare const COLLECTION_PRODUCTS_FRAGMENT:
|
|
4
|
+
declare const PRICE_FRAGMENT: _apollo_client13.DocumentNode;
|
|
5
|
+
declare const PRODUCT_VARIANT_FRAGMENT: _apollo_client13.DocumentNode;
|
|
6
|
+
declare const PRODUCT_HIT_FRAGMENT: _apollo_client13.DocumentNode;
|
|
7
|
+
declare const PRODUCT_CATEGORY_FRAGMENT: _apollo_client13.DocumentNode;
|
|
8
|
+
declare const PRODUCT_COLLECTION_FRAGMENT: _apollo_client13.DocumentNode;
|
|
9
|
+
declare const PRODUCT_IMAGE_FRAGMENT: _apollo_client13.DocumentNode;
|
|
10
|
+
declare const COLLECTION_PRODUCTS_FRAGMENT: _apollo_client13.DocumentNode;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { COLLECTION_PRODUCTS_FRAGMENT, PRICE_FRAGMENT, PRODUCT_CATEGORY_FRAGMENT, PRODUCT_COLLECTION_FRAGMENT, PRODUCT_HIT_FRAGMENT, PRODUCT_IMAGE_FRAGMENT, PRODUCT_VARIANT_FRAGMENT };
|
|
13
13
|
//# sourceMappingURL=product.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.d.ts","names":[],"sources":["../../../../src/lib/gql/fragments/product.ts"],"sourcesContent":[],"mappings":";;;cAEa,gBAMZ,
|
|
1
|
+
{"version":3,"file":"product.d.ts","names":[],"sources":["../../../../src/lib/gql/fragments/product.ts"],"sourcesContent":[],"mappings":";;;cAEa,gBAMZ,gBAAA,CAN0B;cAQd,0BAqBZ,gBAAA,CArBoC;cAuBxB,sBAQZ,gBAAA,CARgC;AA/BpB,cAyCA,yBAnCZ,EA0CA,gBAAA,CAPqC,YAnCrC;AAEY,cA0CA,2BArBZ,EA2BA,gBAAA,CANuC,YArBvC;AAEY,cA2BA,sBAnBZ,EAwBA,gBAAA,CALkC,YAnBlC;AAEY,cAwBA,4BAjBZ,EAwCA,gBAAA,CAvBwC,YAjBxC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client20 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/queries/cart.d.ts
|
|
4
|
-
declare const GET_CART_QUERY:
|
|
4
|
+
declare const GET_CART_QUERY: _apollo_client20.DocumentNode;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { GET_CART_QUERY };
|
|
7
7
|
//# sourceMappingURL=cart.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client22 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/queries/collections.d.ts
|
|
4
|
-
declare const GET_COLLECTIONS_QUERY:
|
|
4
|
+
declare const GET_COLLECTIONS_QUERY: _apollo_client22.DocumentNode;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { GET_COLLECTIONS_QUERY };
|
|
7
7
|
//# sourceMappingURL=collections.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/collections.ts"],"sourcesContent":[],"mappings":";;;cAOa,uBAWZ,
|
|
1
|
+
{"version":3,"file":"collections.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/collections.ts"],"sourcesContent":[],"mappings":";;;cAOa,uBAWZ,gBAAA,CAXiC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client21 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/queries/customer.d.ts
|
|
4
|
-
declare const GET_CUSTOMER_QUERY:
|
|
4
|
+
declare const GET_CUSTOMER_QUERY: _apollo_client21.DocumentNode;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { GET_CUSTOMER_QUERY };
|
|
7
7
|
//# sourceMappingURL=customer.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client23 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/queries/footer.d.ts
|
|
4
|
-
declare const GET_FOOTER_QUERY:
|
|
4
|
+
declare const GET_FOOTER_QUERY: _apollo_client23.DocumentNode;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { GET_FOOTER_QUERY };
|
|
7
7
|
//# sourceMappingURL=footer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/footer.ts"],"sourcesContent":[],"mappings":";;;cAEa,
|
|
1
|
+
{"version":3,"file":"footer.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/footer.ts"],"sourcesContent":[],"mappings":";;;cAEa,kBAcZ,gBAAA,CAd4B"}
|
|
@@ -11,61 +11,7 @@ const GET_FOOTER_QUERY = gql`
|
|
|
11
11
|
}
|
|
12
12
|
copyright
|
|
13
13
|
poweredByCta {
|
|
14
|
-
text
|
|
15
|
-
... on TextBlock {
|
|
16
|
-
_key
|
|
17
|
-
_type
|
|
18
|
-
style
|
|
19
|
-
children {
|
|
20
|
-
_key
|
|
21
|
-
text
|
|
22
|
-
marks
|
|
23
|
-
}
|
|
24
|
-
markDefs {
|
|
25
|
-
... on LinkMark {
|
|
26
|
-
_key
|
|
27
|
-
_type
|
|
28
|
-
href
|
|
29
|
-
target
|
|
30
|
-
}
|
|
31
|
-
... on IconLinkMark {
|
|
32
|
-
_key
|
|
33
|
-
_type
|
|
34
|
-
href
|
|
35
|
-
iconType
|
|
36
|
-
iconClass
|
|
37
|
-
iconFill
|
|
38
|
-
iconComponent
|
|
39
|
-
iconImage {
|
|
40
|
-
asset {
|
|
41
|
-
url
|
|
42
|
-
}
|
|
43
|
-
alt
|
|
44
|
-
}
|
|
45
|
-
iconUrl
|
|
46
|
-
target
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
... on ImageBlock {
|
|
51
|
-
_key
|
|
52
|
-
_type
|
|
53
|
-
asset {
|
|
54
|
-
url
|
|
55
|
-
}
|
|
56
|
-
alt
|
|
57
|
-
}
|
|
58
|
-
... on FileBlock {
|
|
59
|
-
_key
|
|
60
|
-
_type
|
|
61
|
-
asset {
|
|
62
|
-
url
|
|
63
|
-
originalFilename
|
|
64
|
-
size
|
|
65
|
-
mimeType
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
14
|
+
text
|
|
69
15
|
}
|
|
70
16
|
}
|
|
71
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.js","names":[],"sources":["../../../../src/lib/gql/queries/footer.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nexport const GET_FOOTER_QUERY = gql`\n query GetFooter {\n footer {\n storeName\n social {\n text\n url\n }\n copyright\n poweredByCta {\n text
|
|
1
|
+
{"version":3,"file":"footer.js","names":[],"sources":["../../../../src/lib/gql/queries/footer.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nexport const GET_FOOTER_QUERY = gql`\n query GetFooter {\n footer {\n storeName\n social {\n text\n url\n }\n copyright\n poweredByCta {\n text\n }\n }\n }\n`;\n"],"mappings":";;;AAEA,MAAa,mBAAmB,GAAG"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client24 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/queries/product.d.ts
|
|
4
|
-
declare const SEARCH_SUGGESTIONS_QUERY:
|
|
5
|
-
declare const GET_PRODUCT_CATEGORIES_QUERY:
|
|
4
|
+
declare const SEARCH_SUGGESTIONS_QUERY: _apollo_client24.DocumentNode;
|
|
5
|
+
declare const GET_PRODUCT_CATEGORIES_QUERY: _apollo_client24.DocumentNode;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { GET_PRODUCT_CATEGORIES_QUERY, SEARCH_SUGGESTIONS_QUERY };
|
|
8
8
|
//# sourceMappingURL=product.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/product.ts"],"sourcesContent":[],"mappings":";;;cAOa,0BASZ,
|
|
1
|
+
{"version":3,"file":"product.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/product.ts"],"sourcesContent":[],"mappings":";;;cAOa,0BASZ,gBAAA,CAToC;cAWxB,8BA4BZ,gBAAA,CA5BwC"}
|
package/dist/lib/utils/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","names":[],"sources":["../../../src/lib/utils/env.ts"],"sourcesContent":["export const getBaseURL = () => {\n return process.env.NEXT_PUBLIC_BASE_URL
|
|
1
|
+
{"version":3,"file":"env.js","names":[],"sources":["../../../src/lib/utils/env.ts"],"sourcesContent":["export const getBaseURL = () => {\n return (\n process.env.RENDER_EXTERNAL_URL ||\n process.env.NEXT_PUBLIC_BASE_URL ||\n 'https://localhost:8000'\n );\n};\n"],"mappings":";AAAA,MAAa,mBAAmB;AAC9B,QACE,QAAQ,IAAI,uBACZ,QAAQ,IAAI,wBACZ"}
|