@gfed-medusa/sf-lib-common 3.9.0 → 3.10.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 +2 -2
- 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/error-message/index.d.ts.map +1 -1
- 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/interactive-link/index.d.ts.map +1 -1
- 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 +2 -2
- package/dist/components/localized-client-link/index.d.ts.map +1 -1
- package/dist/components/modal/index.d.ts +2 -2
- package/dist/components/personalized-content/components/featured-category-rail.d.ts +2 -2
- package/dist/components/personalized-content/components/featured-category-rail.d.ts.map +1 -1
- package/dist/components/personalized-content/components/hero-banner.d.ts +2 -2
- package/dist/components/personalized-content/components/hero-banner.d.ts.map +1 -1
- package/dist/components/product-card/index.d.ts +2 -2
- package/dist/components/product-preview/index.d.ts +2 -2
- package/dist/components/submit-button/index.d.ts +2 -2
- package/dist/lib/context/apollo-context.d.ts +2 -2
- package/dist/lib/context/modal-context.d.ts +2 -2
- package/dist/lib/data/context.d.ts +2 -2
- package/dist/lib/data/personalization.d.ts.map +1 -1
- package/dist/lib/data/personalization.js +0 -2
- package/dist/lib/data/personalization.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/mutations/cart.d.ts +6 -6
- package/dist/lib/gql/mutations/cart.d.ts.map +1 -1
- package/dist/lib/gql/queries/collections.d.ts +3 -3
- package/dist/lib/gql/queries/collections.d.ts.map +1 -1
- package/dist/lib/gql/queries/order.d.ts +4 -4
- package/dist/lib/gql/queries/product-personalization.d.ts +2 -2
- package/dist/lib/gql/queries/product.d.ts +2 -2
- package/dist/lib/gql/queries/regions.d.ts +3 -3
- package/dist/lib/gql/queries/shipping.d.ts +3 -3
- package/dist/lib/gql/queries/shipping.d.ts.map +1 -1
- package/dist/lib/hooks/use-apollo.d.ts +2 -2
- package/dist/lib/personalization/client-signal.js +1 -1
- package/dist/lib/personalization/device-id.d.ts.map +1 -1
- package/dist/lib/personalization/device-id.js +1 -13
- package/dist/lib/personalization/device-id.js.map +1 -1
- package/dist/lib/personalization/personalization-gql.d.ts +4 -4
- package/package.json +3 -3
- package/dist/components/device-id-setter/index.d.ts +0 -5
- package/dist/components/device-id-setter/index.d.ts.map +0 -1
- package/dist/components/device-id-setter/index.js +0 -16
- package/dist/components/device-id-setter/index.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/breadcrumbs/index.d.ts
|
|
4
4
|
declare const SEPARATOR_ICONS: Record<string, React.ComponentType<{
|
|
@@ -14,7 +14,7 @@ declare function Breadcrumbs({
|
|
|
14
14
|
iconClassName,
|
|
15
15
|
iconSize,
|
|
16
16
|
separatorIcon
|
|
17
|
-
}: BreadcrumbsProps):
|
|
17
|
+
}: BreadcrumbsProps): react_jsx_runtime5.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { Breadcrumbs };
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Cart, Customer } from "../../types/graphql.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/cart-mismatch-banner/index.d.ts
|
|
5
5
|
declare function CartMismatchBanner(props: {
|
|
6
6
|
customer: Customer;
|
|
7
7
|
cart: Cart;
|
|
8
|
-
}):
|
|
8
|
+
}): react_jsx_runtime3.JSX.Element | undefined;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { CartMismatchBanner };
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/delete-button/index.d.ts
|
|
4
4
|
declare const DeleteButton: ({
|
|
@@ -9,7 +9,7 @@ declare const DeleteButton: ({
|
|
|
9
9
|
id: string;
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
className?: string;
|
|
12
|
-
}) =>
|
|
12
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { DeleteButton };
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/delete-button/index.tsx"],"sourcesContent":[],"mappings":";;;cASM;;;;;;aAMO,KAAA,CAAM;EANb,SAAA,CAAA,EAAA,MAuCL;CAvCqB,EAAA,GAQrB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/delete-button/index.tsx"],"sourcesContent":[],"mappings":";;;cASM;;;;;;aAMO,KAAA,CAAM;EANb,SAAA,CAAA,EAAA,MAuCL;CAvCqB,EAAA,GAQrB,kBAAA,CAAA,GAAA,CAAA,OARqB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/error-message/index.d.ts
|
|
4
4
|
declare const ErrorMessage: ({
|
|
@@ -7,7 +7,7 @@ declare const ErrorMessage: ({
|
|
|
7
7
|
}: {
|
|
8
8
|
error?: string | null;
|
|
9
9
|
"data-testid"?: string;
|
|
10
|
-
}) =>
|
|
10
|
+
}) => react_jsx_runtime1.JSX.Element | null;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { ErrorMessage };
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/error-message/index.tsx"],"sourcesContent":[],"mappings":";;;cAAM;;iBAAgB;AAMrB;;;AAAA,CAAA,EAAA,GAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/error-message/index.tsx"],"sourcesContent":[],"mappings":";;;cAAM;;iBAAgB;AAMrB;;;AAAA,CAAA,EAAA,GAAA,kBAAA,CAAA,GAAA,CAAA,OAAA,GAaA,IAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cart, ShippingOption } from "../../types/graphql.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/free-shipping-price-nudge/index.d.ts
|
|
5
5
|
declare function ShippingPriceNudge({
|
|
@@ -10,7 +10,7 @@ declare function ShippingPriceNudge({
|
|
|
10
10
|
variant?: 'popup' | 'inline';
|
|
11
11
|
cart: Cart;
|
|
12
12
|
shippingOptions: ShippingOption[];
|
|
13
|
-
}):
|
|
13
|
+
}): react_jsx_runtime0.JSX.Element | undefined;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { ShippingPriceNudge };
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LocalizedClientLink } from "../localized-client-link/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/interactive-link/index.d.ts
|
|
5
5
|
type InteractiveLinkProps = React.ComponentPropsWithoutRef<typeof LocalizedClientLink> & {
|
|
@@ -14,7 +14,7 @@ declare const InteractiveLink: ({
|
|
|
14
14
|
textClassName,
|
|
15
15
|
iconClassName,
|
|
16
16
|
...props
|
|
17
|
-
}: InteractiveLinkProps) =>
|
|
17
|
+
}: InteractiveLinkProps) => react_jsx_runtime17.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { InteractiveLink };
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/interactive-link/index.tsx"],"sourcesContent":[],"mappings":";;;;KAKK,oBAAA,GAAuB,KAAA,CAAM,gCACzB;;;AAHsD,CAAA;AAEL,cAOpD,eA0BL,EAAA,CAAA;EAAA,IAAA;EAAA,QAAA;EAAA,OAAA;EAAA,SAAA;EAAA,aAAA;EAAA,aAAA;EAAA,GAAA;AAAA,CAAA,EAlBE,oBAkBF,EAAA,GAlBsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/interactive-link/index.tsx"],"sourcesContent":[],"mappings":";;;;KAKK,oBAAA,GAAuB,KAAA,CAAM,gCACzB;;;AAHsD,CAAA;AAEL,cAOpD,eA0BL,EAAA,CAAA;EAAA,IAAA;EAAA,QAAA;EAAA,OAAA;EAAA,SAAA;EAAA,aAAA;EAAA,aAAA;EAAA,GAAA;AAAA,CAAA,EAlBE,oBAkBF,EAAA,GAlBsB,mBAAA,CAAA,GAAA,CAAA,OAkBtB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Maybe, ProductVariant } from "../../types/graphql.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/line-item-options/index.d.ts
|
|
5
5
|
type LineItemOptionsProps = {
|
|
@@ -11,7 +11,7 @@ declare const LineItemOptions: ({
|
|
|
11
11
|
variant,
|
|
12
12
|
"data-testid": dataTestid,
|
|
13
13
|
"data-value": dataValue
|
|
14
|
-
}: LineItemOptionsProps) =>
|
|
14
|
+
}: LineItemOptionsProps) => react_jsx_runtime10.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { LineItemOptions };
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/line-item-options/index.tsx"],"sourcesContent":[],"mappings":";;;;KAIK,oBAAA;YACO,MAAM;;EADb,YAAA,CAAA,EAGY,KAHZ,CAGkB,cAHE,CAAA;CACP;cAKZ,eALM,EAAA,CAAA;EAAA,OAAA;EAAA,aAAA,EAKa,UALb;EAAA,YAAA,EAKa;AALb,CAAA,EAST,oBATS,EAAA,GASW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/line-item-options/index.tsx"],"sourcesContent":[],"mappings":";;;;KAIK,oBAAA;YACO,MAAM;;EADb,YAAA,CAAA,EAGY,KAHZ,CAGkB,cAHE,CAAA;CACP;cAKZ,eALM,EAAA,CAAA;EAAA,OAAA;EAAA,aAAA,EAKa,UALb;EAAA,YAAA,EAKa;AALb,CAAA,EAST,oBATS,EAAA,GASW,mBAAA,CAAA,GAAA,CAAA,OATX"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LineItem } from "../../types/graphql.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/line-item-price/index.d.ts
|
|
5
5
|
type LineItemPriceProps = {
|
|
@@ -11,7 +11,7 @@ declare const LineItemPrice: ({
|
|
|
11
11
|
item,
|
|
12
12
|
style,
|
|
13
13
|
currencyCode
|
|
14
|
-
}: LineItemPriceProps) =>
|
|
14
|
+
}: LineItemPriceProps) => react_jsx_runtime9.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { LineItemPrice };
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/line-item-price/index.tsx"],"sourcesContent":[],"mappings":";;;;KAMK,kBAAA;QACG;;EADH,YAAA,EAAA,MAAA;AACW,CAAA;cAKV,aAAiB,EAAA,CAAA;EAAA,IAAA;EAAA,KAAA;EAAA;AAAA,CAAA,EAIpB,kBAJoB,EAAA,GAIF,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/line-item-price/index.tsx"],"sourcesContent":[],"mappings":";;;;KAMK,kBAAA;QACG;;EADH,YAAA,EAAA,MAAA;AACW,CAAA;cAKV,aAAiB,EAAA,CAAA;EAAA,IAAA;EAAA,KAAA;EAAA;AAAA,CAAA,EAIpB,kBAJoB,EAAA,GAIF,kBAAA,CAAA,GAAA,CAAA,OAJE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes, DetailedHTMLProps } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/localized-client-link/index.d.ts
|
|
5
5
|
type LocalizedClientLinkProps = DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & {
|
|
@@ -10,7 +10,7 @@ declare const LocalizedClientLink: ({
|
|
|
10
10
|
href,
|
|
11
11
|
locale,
|
|
12
12
|
...props
|
|
13
|
-
}: LocalizedClientLinkProps) =>
|
|
13
|
+
}: LocalizedClientLinkProps) => react_jsx_runtime12.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { LocalizedClientLink };
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/localized-client-link/index.tsx"],"sourcesContent":[],"mappings":";;;;KAWK,wBAAA,GAA2B,kBAC9B,qBAAqB,oBACrB;;;AANa,cAWT,mBAPuB,EAAA,CAAA;EAAA,QAAA;EAAA,IAAA;EAAA,MAAA;EAAA,GAAA;AAAA,CAAA,EAY1B,wBAZ0B,EAAA,GAYF,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/localized-client-link/index.tsx"],"sourcesContent":[],"mappings":";;;;KAWK,wBAAA,GAA2B,kBAC9B,qBAAqB,oBACrB;;;AANa,cAWT,mBAPuB,EAAA,CAAA;EAAA,QAAA;EAAA,IAAA;EAAA,MAAA;EAAA,GAAA;AAAA,CAAA,EAY1B,wBAZ0B,EAAA,GAYF,mBAAA,CAAA,GAAA,CAAA,OAZE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/modal/index.d.ts
|
|
5
5
|
type ModalProps = {
|
|
@@ -20,7 +20,7 @@ declare const Modal: {
|
|
|
20
20
|
children,
|
|
21
21
|
"data-testid": dataTestId,
|
|
22
22
|
"aria-label": ariaLabel
|
|
23
|
-
}: ModalProps):
|
|
23
|
+
}: ModalProps): react_jsx_runtime2.JSX.Element;
|
|
24
24
|
Title: React.FC<{
|
|
25
25
|
children: React.ReactNode;
|
|
26
26
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/personalized-content/components/featured-category-rail.d.ts
|
|
4
4
|
interface ProductPreview {
|
|
@@ -16,7 +16,7 @@ declare function FeaturedCategoryRail({
|
|
|
16
16
|
title,
|
|
17
17
|
handle,
|
|
18
18
|
products
|
|
19
|
-
}: FeaturedCategoryRailProps):
|
|
19
|
+
}: FeaturedCategoryRailProps): react_jsx_runtime11.JSX.Element | null;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { FeaturedCategoryRail };
|
|
22
22
|
//# sourceMappingURL=featured-category-rail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featured-category-rail.d.ts","names":[],"sources":["../../../../src/components/personalized-content/components/featured-category-rail.tsx"],"sourcesContent":[],"mappings":";;;UAKU,cAAA;;;EAAA,MAAA,EAAA,MAAA;EAOA,SAAA,CAAA,EAAA,MAAA,GAAA,IAAA;AAMV;UANU,yBAAA,CAM6B;EAAO,KAAA,EAAA,MAAA;EAAQ,MAAA,EAAA,MAAA;EAAY,QAAA,EAHtD,cAGsD,EAAA;;AAAyB,iBAA3E,oBAAA,CAA2E;EAAA,KAAA;EAAA,MAAA;EAAA;AAAA,CAAA,EAAzB,yBAAyB,CAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"featured-category-rail.d.ts","names":[],"sources":["../../../../src/components/personalized-content/components/featured-category-rail.tsx"],"sourcesContent":[],"mappings":";;;UAKU,cAAA;;;EAAA,MAAA,EAAA,MAAA;EAOA,SAAA,CAAA,EAAA,MAAA,GAAA,IAAA;AAMV;UANU,yBAAA,CAM6B;EAAO,KAAA,EAAA,MAAA;EAAQ,MAAA,EAAA,MAAA;EAAY,QAAA,EAHtD,cAGsD,EAAA;;AAAyB,iBAA3E,oBAAA,CAA2E;EAAA,KAAA;EAAA,MAAA;EAAA;AAAA,CAAA,EAAzB,yBAAyB,CAAA,EAAA,mBAAA,CAAA,GAAA,CAAA,OAAA,GAAA,IAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/personalized-content/components/hero-banner.d.ts
|
|
4
4
|
interface HeroBannerProps {
|
|
@@ -25,7 +25,7 @@ declare function HeroBanner({
|
|
|
25
25
|
cta,
|
|
26
26
|
badge,
|
|
27
27
|
backgroundColor
|
|
28
|
-
}: HeroBannerProps):
|
|
28
|
+
}: HeroBannerProps): react_jsx_runtime8.JSX.Element | null;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { HeroBanner };
|
|
31
31
|
//# sourceMappingURL=hero-banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero-banner.d.ts","names":[],"sources":["../../../../src/components/personalized-content/components/hero-banner.tsx"],"sourcesContent":[],"mappings":";;;UAOU,eAAA;;;EAAA,KAAA,CAAA,EAAA;IAmCM,KAAA,CAAA,EAAA;MAAa,GAAA,CAAA,EAAA,MAAA;IAAU,CAAA;EAAa,CAAA,GAAA,MAAA;EAAO,QAAA,CAAA,EAAA,MAAA;EAAU,GAAA,CAAA,EAAA;IAAK,KAAA,CAAA,EAAA,MAAA;IAAO,IAAA,CAAA,EAAA,MAAA;EAAmB,CAAA;EAAe,KAAA,CAAA,EAAA,MAAA;EAAA,eAAA,CAAA,EAAA,MAAA;;iBAAnG,UAAA;;;;;;;;GAAoF,kBAAe,
|
|
1
|
+
{"version":3,"file":"hero-banner.d.ts","names":[],"sources":["../../../../src/components/personalized-content/components/hero-banner.tsx"],"sourcesContent":[],"mappings":";;;UAOU,eAAA;;;EAAA,KAAA,CAAA,EAAA;IAmCM,KAAA,CAAA,EAAA;MAAa,GAAA,CAAA,EAAA,MAAA;IAAU,CAAA;EAAa,CAAA,GAAA,MAAA;EAAO,QAAA,CAAA,EAAA,MAAA;EAAU,GAAA,CAAA,EAAA;IAAK,KAAA,CAAA,EAAA,MAAA;IAAO,IAAA,CAAA,EAAA,MAAA;EAAmB,CAAA;EAAe,KAAA,CAAA,EAAA,MAAA;EAAA,eAAA,CAAA,EAAA,MAAA;;iBAAnG,UAAA;;;;;;;;GAAoF,kBAAe,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
4
4
|
|
|
@@ -59,7 +59,7 @@ declare function ProductCard({
|
|
|
59
59
|
variant,
|
|
60
60
|
size,
|
|
61
61
|
className
|
|
62
|
-
}: ProductCardProps):
|
|
62
|
+
}: ProductCardProps): react_jsx_runtime13.JSX.Element;
|
|
63
63
|
//#endregion
|
|
64
64
|
export { ProductCard };
|
|
65
65
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Product } from "../../types/graphql.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/product-preview/index.d.ts
|
|
5
5
|
type ProductPreviewProduct = Pick<Product, 'id' | 'title' | 'handle' | 'thumbnail' | 'images' | 'variants'>;
|
|
@@ -12,7 +12,7 @@ declare function ProductPreview({
|
|
|
12
12
|
product,
|
|
13
13
|
isFeatured,
|
|
14
14
|
imageFetchPriority
|
|
15
|
-
}: ProductPreviewProps):
|
|
15
|
+
}: ProductPreviewProps): react_jsx_runtime15.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { ProductPreview, ProductPreviewProduct, ProductPreviewProps };
|
|
18
18
|
//# sourceMappingURL=index.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/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_runtime16.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { SubmitButton };
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PropsWithChildren } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime4 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_runtime4.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_runtime6 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_runtime6.JSX.Element;
|
|
17
17
|
declare const useModal: () => ModalContext;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { ModalProvider, useModal };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useStorefrontActions } from "./client-actions.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/data/context.d.ts
|
|
6
6
|
interface StorefrontContext {
|
|
@@ -15,7 +15,7 @@ interface StorefrontProviderProps {
|
|
|
15
15
|
declare const StorefrontProvider: ({
|
|
16
16
|
children,
|
|
17
17
|
value
|
|
18
|
-
}: StorefrontProviderProps) =>
|
|
18
|
+
}: StorefrontProviderProps) => react_jsx_runtime7.JSX.Element;
|
|
19
19
|
declare const useStorefrontContext: () => StorefrontContext;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { StorefrontContext, StorefrontProvider, useStorefrontActions, useStorefrontContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"personalization.d.ts","names":[],"sources":["../../../src/lib/data/personalization.ts"],"sourcesContent":[],"mappings":";;;iBAWgB,2BAAA;iBAMM,UAAA,oBAEf,6BACK,yDAGT;AAZa,
|
|
1
|
+
{"version":3,"file":"personalization.d.ts","names":[],"sources":["../../../src/lib/data/personalization.ts"],"sourcesContent":[],"mappings":";;;iBAWgB,2BAAA;iBAMM,UAAA,oBAEf,6BACK,yDAGT;AAZa,iBAyCA,kBAAA,CAzC2B,OAAA,EAAA,MAAA,EAAA,GAAA,EA2CpC,iBA3CoC,EAAA,OAAA,CAAA,EA4C/B,MA5C+B,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,MAAA,CAAA,EAAA,MAAA,CAAA,EA8CxC,OA9CwC,CAAA,OAAA,CAAA;AAMrB,UA4CL,qBAAA,CA5Ce;EAEzB,SAAA,EAAA,MAAA;EACK,SAAA,EAAA,MAAA,GAAA,IAAA;EAGT,cAAA,EAyCe,MAzCf,CAAA,MAAA,EAAA,OAAA,CAAA;EAAO,QAAA,EAAA,MAAA;EA6BM,SAAA,EAAA,MAAA;EAET,KAAA,EAAA,MAAA;;AAGJ,UAac,wBAAA,CAbd;EAAO,MAAA,EAAA,MAAA;EAIO,UAAA,EAAA,MAAA;EASA,OAAA,EAAA,MAAA,EAAA;EAOA,YAAA,EAAA,MAAA;AAwBjB;AAIO,UA5BU,qBAAA,CA4BV;EAQI,UAAA,EAnCG,qBAmCH,EAAA;EAAR,SAAA,EAlCU,wBAkCV;EAAO,QAAA,EAAA,MAAA;EA2BA,QAAA,EAAA,MAAA;AAUV;AACS,iBAlDa,kBAAA,CAkDb,OAAA,EAAA,MAAA,EAAA,IAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,GAAA,EA9CF,iBA8CE,EAAA,QAAA,EAAA;EACF,SAAA,CAAA,EAAA,MAAA;EACJ,SAAA,CAAA,EAAA,MAAA;EAAO,QAAA,CAAA,EAAA,MAAA;;qBAxCP,QAAQ;UA2BD,eAAA;;;;;;;UAOA;;;;;;;;iBAGY,gBAAA,QACb,sBACF,oBACJ"}
|
|
@@ -10,7 +10,6 @@ function getDeviceIdFromCookieHeader(cookieHeader) {
|
|
|
10
10
|
}
|
|
11
11
|
async function sendSignal(type, ctx, payload, url, userId) {
|
|
12
12
|
const deviceId = getDeviceIdFromCookieHeader(ctx.cookieHeader);
|
|
13
|
-
if (!deviceId) return false;
|
|
14
13
|
const apolloClient = createServerApolloClient(ctx.cookieHeader);
|
|
15
14
|
try {
|
|
16
15
|
await graphqlMutation({
|
|
@@ -37,7 +36,6 @@ function sendPageViewSignal(surface, ctx, payload, userId) {
|
|
|
37
36
|
}, void 0, userId);
|
|
38
37
|
}
|
|
39
38
|
async function getPersonalization(surface, page, deviceId, ctx, context, userId) {
|
|
40
|
-
if (!deviceId) return null;
|
|
41
39
|
const apolloClient = createServerApolloClient(ctx.cookieHeader);
|
|
42
40
|
try {
|
|
43
41
|
return (await graphqlFetch({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"personalization.js","names":[],"sources":["../../../src/lib/data/personalization.ts"],"sourcesContent":["import { createServerApolloClient, graphqlFetch, graphqlMutation } from '@/lib/gql/apollo-client';\n\nimport {\n PERSONALIZE_QUERY,\n SEND_SIGNAL_MUTATION,\n SUBMIT_CONVERSION_MUTATION,\n} from '@/lib/personalization/personalization-gql';\nimport type { StorefrontContext } from './context';\n\nconst DEVICE_ID_COOKIE = '_jg_device_id';\n\nexport function getDeviceIdFromCookieHeader(cookieHeader?: string): string {\n if (!cookieHeader) return '';\n const match = cookieHeader.match(new RegExp(`${DEVICE_ID_COOKIE}=([^;]+)`));\n return match ? decodeURIComponent(match[1] ?? '') : '';\n}\n\nexport async function sendSignal(\n type: string,\n ctx: StorefrontContext,\n payload?: Record<string, unknown>,\n url?: string,\n userId?: string\n): Promise<boolean> {\n const deviceId = getDeviceIdFromCookieHeader(ctx.cookieHeader);\n
|
|
1
|
+
{"version":3,"file":"personalization.js","names":[],"sources":["../../../src/lib/data/personalization.ts"],"sourcesContent":["import { createServerApolloClient, graphqlFetch, graphqlMutation } from '@/lib/gql/apollo-client';\n\nimport {\n PERSONALIZE_QUERY,\n SEND_SIGNAL_MUTATION,\n SUBMIT_CONVERSION_MUTATION,\n} from '@/lib/personalization/personalization-gql';\nimport type { StorefrontContext } from './context';\n\nconst DEVICE_ID_COOKIE = '_jg_device_id';\n\nexport function getDeviceIdFromCookieHeader(cookieHeader?: string): string {\n if (!cookieHeader) return '';\n const match = cookieHeader.match(new RegExp(`${DEVICE_ID_COOKIE}=([^;]+)`));\n return match ? decodeURIComponent(match[1] ?? '') : '';\n}\n\nexport async function sendSignal(\n type: string,\n ctx: StorefrontContext,\n payload?: Record<string, unknown>,\n url?: string,\n userId?: string\n): Promise<boolean> {\n const deviceId = getDeviceIdFromCookieHeader(ctx.cookieHeader);\n\n const apolloClient = createServerApolloClient(ctx.cookieHeader);\n\n try {\n await graphqlMutation<Record<string, unknown>, { input: Record<string, unknown> }>(\n {\n mutation: SEND_SIGNAL_MUTATION,\n variables: {\n input: {\n deviceId,\n ...(userId ? { userId } : {}),\n type,\n payload: payload ?? {},\n url: url ?? '',\n timestamp: Date.now(),\n },\n },\n },\n apolloClient\n );\n return true;\n } catch (error) {\n console.warn('[sendSignal] Failed to send signal:', type, error);\n return false;\n }\n}\n\nexport function sendPageViewSignal(\n surface: string,\n ctx: StorefrontContext,\n payload?: Record<string, unknown>,\n userId?: string\n): Promise<boolean> {\n return sendSignal('PAGE_VIEW', ctx, { ...payload, surface }, undefined, userId);\n}\n\nexport interface PersonalizedComponent {\n component: string;\n contentId: string | null;\n propsOverrides: Record<string, unknown>;\n priority: number;\n reasoning: string;\n score: number;\n}\n\nexport interface PersonalizationReasoning {\n intent: string;\n confidence: number;\n factors: string[];\n modelVersion: string;\n}\n\nexport interface PersonalizationResult {\n components: PersonalizedComponent[];\n reasoning: PersonalizationReasoning;\n cacheKey: string;\n servedAt: string;\n}\n\ntype PersonalizeQueryResult = {\n personalize: PersonalizationResult;\n};\n\ntype PersonalizeQueryVariables = {\n input: {\n surface: string;\n page: string;\n productId?: string;\n cartValue?: number;\n category?: string;\n searchQuery?: string;\n };\n deviceId: string;\n userId?: string;\n};\n\nexport async function getPersonalization(\n surface: string,\n page: string,\n deviceId: string,\n ctx: StorefrontContext,\n context?: {\n productId?: string;\n cartValue?: number;\n category?: string;\n searchQuery?: string;\n },\n userId?: string\n): Promise<PersonalizationResult | null> {\n const apolloClient = createServerApolloClient(ctx.cookieHeader);\n\n try {\n const data = await graphqlFetch<PersonalizeQueryResult, PersonalizeQueryVariables>(\n {\n query: PERSONALIZE_QUERY,\n variables: {\n input: {\n surface,\n page,\n ...context,\n },\n deviceId,\n ...(userId ? { userId } : {}),\n },\n },\n apolloClient\n );\n\n return data?.personalize ?? null;\n } catch (error) {\n console.error('[getPersonalization]', error);\n return null;\n }\n}\n\ninterface ConversionInput {\n deviceId: string;\n userId?: string;\n checkoutSignalId?: string;\n orderId: string;\n amount: number;\n currency: string;\n items?: Array<{ productId: string; variantId?: string; quantity: number; price: number; category?: string }>;\n}\n\nexport async function submitConversion(\n input: ConversionInput,\n ctx: StorefrontContext\n): Promise<boolean> {\n if (!input.deviceId) return false;\n\n const apolloClient = createServerApolloClient(ctx.cookieHeader);\n\n try {\n await graphqlMutation<Record<string, boolean>, { input: ConversionInput }>(\n {\n mutation: SUBMIT_CONVERSION_MUTATION,\n variables: { input },\n },\n apolloClient\n );\n return true;\n } catch (error) {\n console.error('[submitConversion] Failed:', error);\n return false;\n }\n}\n"],"mappings":";;;;AASA,MAAM,mBAAmB;AAEzB,SAAgB,4BAA4B,cAA+B;AACzE,KAAI,CAAC,aAAc,QAAO;CAC1B,MAAM,QAAQ,aAAa,sBAAM,IAAI,OAAO,GAAG,iBAAiB,UAAU,CAAC;AAC3E,QAAO,QAAQ,mBAAmB,MAAM,MAAM,GAAG,GAAG;;AAGtD,eAAsB,WACpB,MACA,KACA,SACA,KACA,QACkB;CAClB,MAAM,WAAW,4BAA4B,IAAI,aAAa;CAE9D,MAAM,eAAe,yBAAyB,IAAI,aAAa;AAE/D,KAAI;AACF,QAAM,gBACJ;GACE,UAAU;GACV,WAAW,EACT,OAAO;IACL;IACA,GAAI,SAAS,EAAE,QAAQ,GAAG,EAAE;IAC5B;IACA,SAAS,WAAW,EAAE;IACtB,KAAK,OAAO;IACZ,WAAW,KAAK,KAAK;IACtB,EACF;GACF,EACD,aACD;AACD,SAAO;UACA,OAAO;AACd,UAAQ,KAAK,uCAAuC,MAAM,MAAM;AAChE,SAAO;;;AAIX,SAAgB,mBACd,SACA,KACA,SACA,QACkB;AAClB,QAAO,WAAW,aAAa,KAAK;EAAE,GAAG;EAAS;EAAS,EAAE,QAAW,OAAO;;AA2CjF,eAAsB,mBACpB,SACA,MACA,UACA,KACA,SAMA,QACuC;CACvC,MAAM,eAAe,yBAAyB,IAAI,aAAa;AAE/D,KAAI;AAiBF,UAhBa,MAAM,aACjB;GACE,OAAO;GACP,WAAW;IACT,OAAO;KACL;KACA;KACA,GAAG;KACJ;IACD;IACA,GAAI,SAAS,EAAE,QAAQ,GAAG,EAAE;IAC7B;GACF,EACD,aACD,GAEY,eAAe;UACrB,OAAO;AACd,UAAQ,MAAM,wBAAwB,MAAM;AAC5C,SAAO;;;AAcX,eAAsB,iBACpB,OACA,KACkB;AAClB,KAAI,CAAC,MAAM,SAAU,QAAO;CAE5B,MAAM,eAAe,yBAAyB,IAAI,aAAa;AAE/D,KAAI;AACF,QAAM,gBACJ;GACE,UAAU;GACV,WAAW,EAAE,OAAO;GACrB,EACD,aACD;AACD,SAAO;UACA,OAAO;AACd,UAAQ,MAAM,8BAA8B,MAAM;AAClD,SAAO"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client7 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_client7.DocumentNode;
|
|
5
|
+
declare const COUNTRY_FRAGMENT: _apollo_client7.DocumentNode;
|
|
6
|
+
declare const REGION_FRAGMENT: _apollo_client7.DocumentNode;
|
|
7
|
+
declare const SHIPPING_METHODS_FRAGMENT: _apollo_client7.DocumentNode;
|
|
8
|
+
declare const PAYMENT_COLLECTION_FRAGMENT: _apollo_client7.DocumentNode;
|
|
9
|
+
declare const ADDRESS_FRAGMENT: _apollo_client7.DocumentNode;
|
|
10
|
+
declare const PROMOTION_FRAGMENT: _apollo_client7.DocumentNode;
|
|
11
|
+
declare const CART_FRAGMENT: _apollo_client7.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_client3 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_client3.DocumentNode;
|
|
5
|
+
declare const CUSTOMER_FRAGMENT: _apollo_client3.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_client15 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_CATEGORY_FRAGMENT:
|
|
7
|
-
declare const PRODUCT_COLLECTION_FRAGMENT:
|
|
8
|
-
declare const PRODUCT_IMAGE_FRAGMENT:
|
|
9
|
-
declare const COLLECTION_PRODUCTS_FRAGMENT:
|
|
10
|
-
declare const COLLECTION_PRODUCTS_HOME_FRAGMENT:
|
|
4
|
+
declare const PRICE_FRAGMENT: _apollo_client15.DocumentNode;
|
|
5
|
+
declare const PRODUCT_VARIANT_FRAGMENT: _apollo_client15.DocumentNode;
|
|
6
|
+
declare const PRODUCT_CATEGORY_FRAGMENT: _apollo_client15.DocumentNode;
|
|
7
|
+
declare const PRODUCT_COLLECTION_FRAGMENT: _apollo_client15.DocumentNode;
|
|
8
|
+
declare const PRODUCT_IMAGE_FRAGMENT: _apollo_client15.DocumentNode;
|
|
9
|
+
declare const COLLECTION_PRODUCTS_FRAGMENT: _apollo_client15.DocumentNode;
|
|
10
|
+
declare const COLLECTION_PRODUCTS_HOME_FRAGMENT: _apollo_client15.DocumentNode;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { COLLECTION_PRODUCTS_FRAGMENT, COLLECTION_PRODUCTS_HOME_FRAGMENT, PRICE_FRAGMENT, PRODUCT_CATEGORY_FRAGMENT, PRODUCT_COLLECTION_FRAGMENT, PRODUCT_IMAGE_FRAGMENT, PRODUCT_VARIANT_FRAGMENT };
|
|
13
13
|
//# sourceMappingURL=product.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client22 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/mutations/cart.d.ts
|
|
4
|
-
declare const CREATE_CART_MUTATION:
|
|
5
|
-
declare const CREATE_LINE_ITEM_MUTATION:
|
|
6
|
-
declare const UPDATE_CART_MUTATION:
|
|
7
|
-
declare const DELETE_LINE_ITEM_MUTATION:
|
|
8
|
-
declare const TRANSFER_CART_MUTATION:
|
|
4
|
+
declare const CREATE_CART_MUTATION: _apollo_client22.DocumentNode;
|
|
5
|
+
declare const CREATE_LINE_ITEM_MUTATION: _apollo_client22.DocumentNode;
|
|
6
|
+
declare const UPDATE_CART_MUTATION: _apollo_client22.DocumentNode;
|
|
7
|
+
declare const DELETE_LINE_ITEM_MUTATION: _apollo_client22.DocumentNode;
|
|
8
|
+
declare const TRANSFER_CART_MUTATION: _apollo_client22.DocumentNode;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { CREATE_CART_MUTATION, CREATE_LINE_ITEM_MUTATION, DELETE_LINE_ITEM_MUTATION, TRANSFER_CART_MUTATION, UPDATE_CART_MUTATION };
|
|
11
11
|
//# sourceMappingURL=cart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart.d.ts","names":[],"sources":["../../../../src/lib/gql/mutations/cart.ts"],"sourcesContent":[],"mappings":";;;cAQa,sBAOZ,
|
|
1
|
+
{"version":3,"file":"cart.d.ts","names":[],"sources":["../../../../src/lib/gql/mutations/cart.ts"],"sourcesContent":[],"mappings":";;;cAQa,sBAOZ,gBAAA,CAPgC;cASpB,2BAWZ,gBAAA,CAXqC;cAazB,sBAgBZ,gBAAA,CAhBgC;AAtBpB,cAwCA,yBAjCZ,EAyCA,gBAAA,CARqC,YAjCrC;AAEY,cAyCA,sBA9BZ,EAqCA,gBAAA,CAPkC,YA9BlC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client5 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/queries/collections.d.ts
|
|
4
|
-
declare const GET_COLLECTIONS_QUERY:
|
|
5
|
-
declare const GET_COLLECTIONS_HOME_QUERY:
|
|
4
|
+
declare const GET_COLLECTIONS_QUERY: _apollo_client5.DocumentNode;
|
|
5
|
+
declare const GET_COLLECTIONS_HOME_QUERY: _apollo_client5.DocumentNode;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { GET_COLLECTIONS_HOME_QUERY, GET_COLLECTIONS_QUERY };
|
|
8
8
|
//# sourceMappingURL=collections.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/collections.ts"],"sourcesContent":[],"mappings":";;;cAQa,uBAWZ,
|
|
1
|
+
{"version":3,"file":"collections.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/collections.ts"],"sourcesContent":[],"mappings":";;;cAQa,uBAWZ,eAAA,CAXiC;cAarB,4BAWZ,eAAA,CAXsC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client30 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/queries/order.d.ts
|
|
4
|
-
declare const ORDER_FRAGMENT:
|
|
5
|
-
declare const GET_ORDER_QUERY:
|
|
6
|
-
declare const GET_ORDERS_QUERY:
|
|
4
|
+
declare const ORDER_FRAGMENT: _apollo_client30.DocumentNode;
|
|
5
|
+
declare const GET_ORDER_QUERY: _apollo_client30.DocumentNode;
|
|
6
|
+
declare const GET_ORDERS_QUERY: _apollo_client30.DocumentNode;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { GET_ORDERS_QUERY, GET_ORDER_QUERY, ORDER_FRAGMENT };
|
|
9
9
|
//# sourceMappingURL=order.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client40 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/queries/product-personalization.d.ts
|
|
4
|
-
declare const GET_PRODUCT_BY_HANDLE_FOR_PERSONALIZATION:
|
|
4
|
+
declare const GET_PRODUCT_BY_HANDLE_FOR_PERSONALIZATION: _apollo_client40.DocumentNode;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { GET_PRODUCT_BY_HANDLE_FOR_PERSONALIZATION };
|
|
7
7
|
//# sourceMappingURL=product-personalization.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client41 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/queries/product.d.ts
|
|
4
|
-
declare const GET_PRODUCT_CATEGORIES_QUERY:
|
|
4
|
+
declare const GET_PRODUCT_CATEGORIES_QUERY: _apollo_client41.DocumentNode;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { GET_PRODUCT_CATEGORIES_QUERY };
|
|
7
7
|
//# sourceMappingURL=product.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client38 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/queries/regions.d.ts
|
|
4
|
-
declare const LIST_REGIONS_QUERY:
|
|
5
|
-
declare const GET_REGION_QUERY:
|
|
4
|
+
declare const LIST_REGIONS_QUERY: _apollo_client38.DocumentNode;
|
|
5
|
+
declare const GET_REGION_QUERY: _apollo_client38.DocumentNode;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { GET_REGION_QUERY, LIST_REGIONS_QUERY };
|
|
8
8
|
//# sourceMappingURL=regions.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client36 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/gql/queries/shipping.d.ts
|
|
4
|
-
declare const SHIPPING_OPTION_FRAGMENT:
|
|
5
|
-
declare const GET_SHIPPING_OPTIONS_QUERY:
|
|
4
|
+
declare const SHIPPING_OPTION_FRAGMENT: _apollo_client36.DocumentNode;
|
|
5
|
+
declare const GET_SHIPPING_OPTIONS_QUERY: _apollo_client36.DocumentNode;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { GET_SHIPPING_OPTIONS_QUERY, SHIPPING_OPTION_FRAGMENT };
|
|
8
8
|
//# sourceMappingURL=shipping.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shipping.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/shipping.ts"],"sourcesContent":[],"mappings":";;;cAEa,0BAgCZ,
|
|
1
|
+
{"version":3,"file":"shipping.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/shipping.ts"],"sourcesContent":[],"mappings":";;;cAEa,0BAgCZ,gBAAA,CAhCoC;cAkCxB,4BAOZ,gBAAA,CAPsC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client0 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/hooks/use-apollo.d.ts
|
|
4
|
-
declare function useApollo():
|
|
4
|
+
declare function useApollo(): _apollo_client0.ApolloClient;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { useApollo };
|
|
7
7
|
//# sourceMappingURL=use-apollo.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { graphqlMutation } from "../gql/apollo-client.js";
|
|
2
|
-
import { getDeviceId } from "./device-id.js";
|
|
3
2
|
import { SEND_SIGNAL_MUTATION } from "./personalization-gql.js";
|
|
3
|
+
import { getDeviceId } from "./device-id.js";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/personalization/client-signal.ts
|
|
6
6
|
const USER_ID_FETCH_TIMEOUT_MS = 3e3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-id.d.ts","names":[],"sources":["../../../src/lib/personalization/device-id.ts"],"sourcesContent":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"device-id.d.ts","names":[],"sources":["../../../src/lib/personalization/device-id.ts"],"sourcesContent":[],"mappings":";iBAEgB,WAAA,CAAA"}
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
//#region src/lib/personalization/device-id.ts
|
|
2
2
|
const DEVICE_ID_COOKIE = "_jg_device_id";
|
|
3
|
-
function buildCookieAttrs(maxAgeDays) {
|
|
4
|
-
return `path=/;max-age=${maxAgeDays * 24 * 60 * 60};SameSite=none;secure;domain=.justgood.win`;
|
|
5
|
-
}
|
|
6
|
-
function generateUUID() {
|
|
7
|
-
if (typeof crypto !== "undefined" && crypto.randomUUID) return crypto.randomUUID();
|
|
8
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
9
|
-
const r = Math.random() * 16 | 0;
|
|
10
|
-
return (c === "x" ? r : r & 3 | 8).toString(16);
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
3
|
function getDeviceId() {
|
|
14
4
|
if (typeof document === "undefined") return "";
|
|
15
5
|
const match = document.cookie.match(/* @__PURE__ */ new RegExp(`${DEVICE_ID_COOKIE}=([^;]+)`));
|
|
16
|
-
|
|
17
|
-
document.cookie = `${DEVICE_ID_COOKIE}=${encodeURIComponent(id)};${buildCookieAttrs(400)}`;
|
|
18
|
-
return id;
|
|
6
|
+
return match?.[1] ? decodeURIComponent(match[1]) : "";
|
|
19
7
|
}
|
|
20
8
|
|
|
21
9
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-id.js","names":[],"sources":["../../../src/lib/personalization/device-id.ts"],"sourcesContent":["const DEVICE_ID_COOKIE = '_jg_device_id';\n\
|
|
1
|
+
{"version":3,"file":"device-id.js","names":[],"sources":["../../../src/lib/personalization/device-id.ts"],"sourcesContent":["const DEVICE_ID_COOKIE = '_jg_device_id';\n\nexport function getDeviceId(): string {\n if (typeof document === 'undefined') return '';\n const match = document.cookie.match(new RegExp(`${DEVICE_ID_COOKIE}=([^;]+)`));\n return match?.[1] ? decodeURIComponent(match[1]) : '';\n}\n\n\n"],"mappings":";AAAA,MAAM,mBAAmB;AAEzB,SAAgB,cAAsB;AACpC,KAAI,OAAO,aAAa,YAAa,QAAO;CAC5C,MAAM,QAAQ,SAAS,OAAO,sBAAM,IAAI,OAAO,GAAG,iBAAiB,UAAU,CAAC;AAC9E,QAAO,QAAQ,KAAK,mBAAmB,MAAM,GAAG,GAAG"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _apollo_client0 from "@apollo/client";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/personalization/personalization-gql.d.ts
|
|
4
|
-
declare const SEND_SIGNAL_MUTATION:
|
|
5
|
-
declare const SUBMIT_CONVERSION_MUTATION:
|
|
6
|
-
declare const PERSONALIZE_QUERY:
|
|
4
|
+
declare const SEND_SIGNAL_MUTATION: _apollo_client0.DocumentNode;
|
|
5
|
+
declare const SUBMIT_CONVERSION_MUTATION: _apollo_client0.DocumentNode;
|
|
6
|
+
declare const PERSONALIZE_QUERY: _apollo_client0.DocumentNode;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { PERSONALIZE_QUERY, SEND_SIGNAL_MUTATION, SUBMIT_CONVERSION_MUTATION };
|
|
9
9
|
//# sourceMappingURL=personalization-gql.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gfed-medusa/sf-lib-common",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"typescript": "^5",
|
|
76
76
|
"@packages/eslint-config": "0.0.0",
|
|
77
77
|
"@packages/jest-config": "0.0.0",
|
|
78
|
-
"@packages/
|
|
79
|
-
"@packages/
|
|
78
|
+
"@packages/typescript-config": "0.0.0",
|
|
79
|
+
"@packages/prettier-config": "0.0.0"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"@medusajs/ui": "^4.0.29",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/device-id-setter/index.tsx"],"sourcesContent":[],"mappings":";iBAMgB,cAAA,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { getDeviceId } from "../../lib/personalization/device-id.js";
|
|
4
|
-
import { useEffect } from "react";
|
|
5
|
-
|
|
6
|
-
//#region src/components/device-id-setter/index.tsx
|
|
7
|
-
function DeviceIdSetter() {
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
getDeviceId();
|
|
10
|
-
}, []);
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
export { DeviceIdSetter };
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/device-id-setter/index.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect } from 'react';\n\nimport { getDeviceId } from '@/lib/personalization/device-id';\n\nexport function DeviceIdSetter() {\n useEffect(() => {\n getDeviceId();\n }, []);\n\n return null;\n}\n"],"mappings":";;;;;;AAMA,SAAgB,iBAAiB;AAC/B,iBAAgB;AACd,eAAa;IACZ,EAAE,CAAC;AAEN,QAAO"}
|