@tapcart/mobile-components 0.8.37 → 0.8.39

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.
@@ -1 +1 @@
1
- {"version":3,"file":"use-block-conditional-rendering.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-block-conditional-rendering.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,YAAY,EAGb,MAAM,kBAAkB,CAAA;AAczB,eAAO,MAAM,4BAA4B,WAC/B;IACN,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,GAAG,CAAA;IACpB,iBAAiB,EAAE,GAAG,CAAA;CACvB,UACO,YAAY;;;CA2NrB,CAAA"}
1
+ {"version":3,"file":"use-block-conditional-rendering.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-block-conditional-rendering.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,YAAY,EAGb,MAAM,kBAAkB,CAAA;AAczB,eAAO,MAAM,4BAA4B,WAC/B;IACN,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,GAAG,CAAA;IACpB,iBAAiB,EAAE,GAAG,CAAA;CACvB,UACO,YAAY;;;CA6NrB,CAAA"}
@@ -26,11 +26,13 @@ export const useBlockConditionalRendering = (_props, _block) => {
26
26
  const { appId = "", apiUrl = "", deviceVariables, customerVariables } = _props;
27
27
  const searchParams = useSearchParams();
28
28
  // locale is provided in this form en_US
29
- const [language, country] = ((_b = deviceVariables === null || deviceVariables === void 0 ? void 0 : deviceVariables.locale) === null || _b === void 0 ? void 0 : _b.split("_")) || [];
29
+ const [language = "en", country = "US"] = ((_b = deviceVariables === null || deviceVariables === void 0 ? void 0 : deviceVariables.locale) === null || _b === void 0 ? void 0 : _b.split("_")) || [];
30
+ const { id: deviceId = "" } = deviceVariables || {};
30
31
  const productId = (_c = searchParams === null || searchParams === void 0 ? void 0 : searchParams.get("productId")) !== null && _c !== void 0 ? _c : undefined;
31
32
  const location = {
32
- country: country || "US",
33
- language: language || "en",
33
+ country,
34
+ language,
35
+ deviceId,
34
36
  };
35
37
  const productMetafieldsQuery = useMemo(() => {
36
38
  var _a;
@@ -6,6 +6,7 @@ type MetafieldInput = {
6
6
  };
7
7
  type UseProductsProps = {
8
8
  productIds: string[];
9
+ variantIds?: string[] | undefined;
9
10
  productHandles: string[];
10
11
  baseURL: URL;
11
12
  collection?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"use-products.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-products.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAM1C,KAAK,GAAG,GAAG,MAAM,CAAA;AACjB,KAAK,cAAc,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AACxD,KAAK,gBAAgB,GAAG;IACtB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,OAAO,EAAE,GAAG,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC1E,UAAU,CAAC,EAAE,cAAc,EAAE,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAA;AACD,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,KAAK,EAAE,GAAG,CAAA;IACV,SAAS,EAAE,OAA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AS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAC3B;QACE,EAAE,EAAE,MAAM,CAAA;QACV,MAAM,EAAE,MAAM,CAAA;KACf,GACD,SAAS,CAAA;CACd,CAAA;AAgCD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAG,iBAAiB,CA4I7E"}
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  import useSWR from "swr";
12
- import { getProductGidsFromIds } from "../../lib/utils";
12
+ import { getProductGidsFromIds, getVariantGidsFromIds } from "../../lib/utils";
13
13
  import { useCollection } from "./use-collection";
14
14
  import React from "react";
15
15
  import ProductsLocalStorage from "../libs/cache/ProductsLocalStorage";
@@ -48,7 +48,7 @@ export function useProducts(props) {
48
48
  productHandles: props === null || props === void 0 ? void 0 : props.productHandles,
49
49
  }));
50
50
  if (isUseProductsProps(props)) {
51
- let { baseURL, productIds, productHandles, metafields, collection, queryVariables, } = props;
51
+ let { baseURL, productIds, variantIds, productHandles, metafields, collection, queryVariables, } = props;
52
52
  if (shouldMockProducts) {
53
53
  const collectionToFetchID = (_c = collections[0]) === null || _c === void 0 ? void 0 : _c.id;
54
54
  queryVariables = Object.assign(Object.assign({}, queryVariables), { collectionId: collectionToFetchID });
@@ -58,6 +58,9 @@ export function useProducts(props) {
58
58
  if ((productIds === null || productIds === void 0 ? void 0 : productIds.length) > 0) {
59
59
  queryParams.set("ids", getProductGidsFromIds(productIds).join(","));
60
60
  }
61
+ if (variantIds && (variantIds === null || variantIds === void 0 ? void 0 : variantIds.length) > 0) {
62
+ queryParams.set("ids", getVariantGidsFromIds(variantIds).join(","));
63
+ }
61
64
  if ((productHandles === null || productHandles === void 0 ? void 0 : productHandles.length) > 0) {
62
65
  queryParams.set("handles", productHandles.join(","));
63
66
  }
@@ -69,7 +72,7 @@ export function useProducts(props) {
69
72
  url = `${baseURL}/products/by-page?${queryParams.toString()}`;
70
73
  body = queryVariables || {};
71
74
  }
72
- if ((productIds === null || productIds === void 0 ? void 0 : productIds.length) || (productHandles === null || productHandles === void 0 ? void 0 : productHandles.length)) {
75
+ if ((productIds === null || productIds === void 0 ? void 0 : productIds.length) || (productHandles === null || productHandles === void 0 ? void 0 : productHandles.length) || (variantIds === null || variantIds === void 0 ? void 0 : variantIds.length)) {
73
76
  if (queryVariables === null || queryVariables === void 0 ? void 0 : queryVariables.country) {
74
77
  queryParams.set("country", queryVariables.country);
75
78
  }
@@ -13,7 +13,6 @@ type UseReviewsProps = {
13
13
  perPage: number;
14
14
  page: number;
15
15
  limit: number;
16
- pictured?: boolean;
17
16
  };
18
17
  type UseReviewsReturn = {
19
18
  data: ReviewSummaryData | ReviewMetaData | ReviewSearchData | null;
@@ -1 +1 @@
1
- {"version":3,"file":"use-reviews.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-reviews.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EACjB,MAAM,kBAAkB,CAAA;AAGzB,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACvC,QAAQ,EAAE,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAA;IAC3C,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,CAAC,MAAM,CAAC,CAAA;IACjB,MAAM,EAAE,CAAC,MAAM,CAAC,CAAA;IAChB,MAAM,EACF,MAAM,GACN,UAAU,GACV,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,eAAe,CAAA;IACnB,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,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AAM,EAAE,CAAC,MAAM,CAAC,CAAA;IAChB,MAAM,EACF,MAAM,GACN,UAAU,GACV,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,eAAe,CAAA;IACnB,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,iBAAiB,GAAG,cAAc,GAAG,gBAAgB,GAAG,IAAI,CAAA;IAClE,KAAK,EAAE,GAAG,CAAA;IACV,SAAS,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,GAAG,CAAA;IACrB,oBAAoB,CAAC,EAAE,GAAG,CAAA;IAC1B,eAAe,CAAC,EAAE;QAChB,YAAY,EAAE,MAAM,CAAA;QACpB,gBAAgB,EAAE,MAAM,CAAA;KACzB,CAAA;CACF,CAAA;AAqED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,GAAG,gBAAgB,CAyE1E;AAED,KAAK,wBAAwB,GAAG,gBAAgB,GAAG;IACjD,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;CACrC,CAAA;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,eAAe,GAAG,IAAI,GAC5B,wBAAwB,CAmK1B"}
@@ -58,7 +58,7 @@ const mockSummaryData = {
58
58
  export function useReviews(props) {
59
59
  let url = null;
60
60
  if (props) {
61
- const { baseURL, productId, provider, dataType, searchText, ratings, topics, sortBy, ascending, perPage, page, limit, pictured, } = props;
61
+ const { baseURL, productId, provider, dataType, searchText, ratings, topics, sortBy, ascending, perPage, page, limit, } = props;
62
62
  let queryParams = new URLSearchParams();
63
63
  if (productId.length > 0) {
64
64
  queryParams.set("id", productId);
@@ -91,9 +91,6 @@ export function useReviews(props) {
91
91
  if (limit) {
92
92
  queryParams.set("limit", String(limit));
93
93
  }
94
- if (pictured) {
95
- queryParams.set("pictured", String(pictured));
96
- }
97
94
  if (dataType === null || productId === null || productId.length === 0) {
98
95
  url = null;
99
96
  }
@@ -119,7 +116,7 @@ export function useReviewsInfinite(props) {
119
116
  let baseURL = "";
120
117
  let queryParams = new URLSearchParams();
121
118
  if (props) {
122
- const { productId, provider, dataType, searchText, ratings, topics, sortBy, ascending, perPage, limit, pictured, } = props;
119
+ const { productId, provider, dataType, searchText, ratings, topics, sortBy, ascending, perPage, limit, } = props;
123
120
  baseURL = props.baseURL;
124
121
  if (productId.length > 0) {
125
122
  queryParams.set("id", productId);
@@ -149,9 +146,6 @@ export function useReviewsInfinite(props) {
149
146
  if (limit) {
150
147
  queryParams.set("limit", String(limit));
151
148
  }
152
- if (pictured) {
153
- queryParams.set("pictured", String(pictured));
154
- }
155
149
  if (dataType === null || productId === null || productId.length === 0) {
156
150
  url = null;
157
151
  }
@@ -21,13 +21,16 @@ type CarouselProps = {
21
21
  slidesInView?: (slides: Array<number>) => void;
22
22
  };
23
23
  declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
24
- declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
24
+ declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
25
+ showOverflow?: boolean | undefined;
26
+ } & React.RefAttributes<HTMLDivElement>>;
25
27
  declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
26
28
  declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import("../../components/ui/button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
27
29
  declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import("../../components/ui/button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
28
30
  type CarouselDotsProps = {
29
31
  maxDots?: number;
30
32
  dotColor?: string;
33
+ shape?: "circle" | "bar";
31
34
  };
32
35
  declare const CarouselDots: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselDotsProps & React.RefAttributes<HTMLDivElement>>;
33
36
  declare const useAutoplay: (emblaApi: EmblaCarouselType | undefined) => UseAutoplayType;
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../../components/ui/carousel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,gBAAgB,EAAE,EACvB,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,iBAAiB,EAAkB,MAAM,gBAAgB,CAAA;AAClE,KAAK,eAAe,GAAG;IACrB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,cAAc,EAAE,MAAM,IAAI,CAAA;IAC1B,qBAAqB,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;CACtD,CAAA;AAED,OAAO,QAAQ,MAAM,yBAAyB,CAAA;AAC9C,OAAO,IAAI,MAAM,qBAAqB,CAAA;AAQtC,KAAK,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAA;AAC1C,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAChE,KAAK,eAAe,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAC/C,KAAK,cAAc,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAE9C,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CA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forwardRef((_a, ref) => {
108
108
  });
109
109
  Carousel.displayName = "Carousel";
110
110
  const CarouselContent = React.forwardRef((_a, ref) => {
111
- var { className } = _a, props = __rest(_a, ["className"]);
111
+ var { className, showOverflow = false } = _a, props = __rest(_a, ["className", "showOverflow"]);
112
112
  const { carouselRef, orientation } = useCarousel();
113
- return (_jsx("div", Object.assign({ ref: carouselRef, className: "overflow-hidden" }, { children: _jsx("div", Object.assign({ ref: ref, className: cn("flex", orientation === "horizontal" ? "" : "-mt-4 flex-col", className) }, props)) })));
113
+ return (_jsx("div", Object.assign({ ref: carouselRef, className: `${showOverflow ? "overflow-visible" : "overflow-hidden"}` }, { children: _jsx("div", Object.assign({ ref: ref, className: cn("flex", orientation === "horizontal" ? "" : "-mt-4 flex-col", className) }, props)) })));
114
114
  });
115
115
  CarouselContent.displayName = "CarouselContent";
116
116
  const CarouselItem = React.forwardRef((_a, ref) => {
@@ -137,7 +137,7 @@ const CarouselNext = React.forwardRef((_a, ref) => {
137
137
  CarouselNext.displayName = "CarouselNext";
138
138
  const CarouselDots = React.forwardRef((_a, ref) => {
139
139
  var _b;
140
- var { maxDots = 5, dotColor = "var(--coreColors-brandColorPrimary)" } = _a, props = __rest(_a, ["maxDots", "dotColor"]);
140
+ var { maxDots = 5, dotColor = "var(--coreColors-brandColorPrimary)", shape = "circle" } = _a, props = __rest(_a, ["maxDots", "dotColor", "shape"]);
141
141
  const { api } = useCarousel();
142
142
  const [_, setUpdateState] = React.useState(false);
143
143
  const toggleUpdateState = React.useCallback(() => setUpdateState((prevState) => !prevState), []);
@@ -151,10 +151,11 @@ const CarouselDots = React.forwardRef((_a, ref) => {
151
151
  };
152
152
  }
153
153
  }, [api, toggleUpdateState]);
154
+ const dotClass = shape === "circle" ? "h-1.5 w-1.5 rounded-full" : "h-1 rounded-full flex";
154
155
  const numberOfSlides = Math.min((api === null || api === void 0 ? void 0 : api.scrollSnapList().length) || 0, maxDots);
155
156
  const currentSlide = Math.min((api === null || api === void 0 ? void 0 : api.selectedScrollSnap()) || 0, maxDots - 1);
156
157
  if (numberOfSlides > 1) {
157
- return (_jsx("div", Object.assign({ ref: ref, className: `flex ${props.className} ${!((_b = props.className) === null || _b === void 0 ? void 0 : _b.includes("justify-")) ? "justify-center" : ""}`, style: props.style }, { children: Array.from({ length: numberOfSlides }, (_, i) => (_jsx(Button, { className: "mx-1 h-1.5 w-1.5 rounded-full p-0 border-none", style: {
158
+ return (_jsx("div", Object.assign({ ref: ref, className: `flex ${props.className} ${!((_b = props.className) === null || _b === void 0 ? void 0 : _b.includes("justify-")) ? "justify-center" : ""}`, style: props.style }, { children: Array.from({ length: numberOfSlides }, (_, i) => (_jsx(Button, { className: `mx-1 p-0 border-none ${dotClass}`, style: {
158
159
  backgroundColor: dotColor,
159
160
  opacity: i === currentSlide ? 1 : 0.5,
160
161
  }, "aria-label": `Go to slide ${i + 1}`, onClick: () => api === null || api === void 0 ? void 0 : api.scrollTo(i) }, i))) })));
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { cn, cva, getColor, getBackgroundAndPaddingStyle, getBorderStyle, getBorderSidesStyle, getTextStyle, getVerticalAlignmentStyle, getBackgroundAndSpacingStyle, getIdFromGid, productGidFromId, variantGidFromId, getPaddingStyle, getMarginStyle, getVerticalAlignment, mapFlexToAlignment, formatRelativeTime, stringRatioToInt, getOverlayStyle, throttleFunction, getDestinationHandler, getProductGidsFromIds, getBadgesForProductFn, createCollectionImageMap, isFavoriteIntegrationEnabled, getLoyaltyButtonProps, getSpaceBetween, getGridSpacing, pluralize, getInputPlaceholderTextProps, parsePhoneNumber, } from "./lib/utils";
1
+ export { cn, cva, getColor, getBackgroundAndPaddingStyle, getBorderStyle, getBorderSidesStyle, getTextStyle, getVerticalAlignmentStyle, getBackgroundAndSpacingStyle, getIdFromGid, productGidFromId, variantGidFromId, getPaddingStyle, getMarginStyle, getVerticalAlignment, mapFlexToAlignment, formatRelativeTime, stringRatioToInt, getOverlayStyle, throttleFunction, getDestinationHandler, getProductGidsFromIds, getVariantGidsFromIds, getBadgesForProductFn, createCollectionImageMap, isFavoriteIntegrationEnabled, getLoyaltyButtonProps, getSpaceBetween, getGridSpacing, pluralize, getInputPlaceholderTextProps, parsePhoneNumber, } from "./lib/utils";
2
2
  export * from "./lib/cart.util";
3
3
  export * from "./components/contexts/translation-context";
4
4
  export * from "./components/hooks/use-collection";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,EAAE,EACF,GAAG,EACH,QAAQ,EACR,4BAA4B,EAC5B,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,yBAAyB,EACzB,4BAA4B,EAC5B,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,4BAA4B,EAC5B,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,SAAS,EACT,4BAA4B,EAC5B,gBAAgB,GACjB,MAAM,aAAa,CAAA;AACpB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,2CAA2C,CAAA;AACzD,cAAc,mCAAmC,CAAA;AACjD,cAAc,wCAAwC,CAAA;AACtD,cAAc,0CAA0C,CAAA;AACxD,cAAc,wCAAwC,CAAA;AACtD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,sCAAsC,CAAA;AACpD,cAAc,yCAAyC,CAAA;AACvD,cAAc,oCAAoC,CAAA;AAClD,cAAc,wCAAwC,CAAA;AACtD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sCAAsC,CAAA;AACpD,cAAc,oDAAoD,CAAA;AAClE,cAAc,kCAAkC,CAAA;AAChD,cAAc,2BAA2B,CAAA;AACzC,cAAc,mCAAmC,CAAA;AACjD,cAAc,gCAAg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AAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,sBAAsB,CAAA;AACpC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kDAAkD,CAAA;AAChE,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,aAAa,CAAA;AAC3B,cAAc,6CAA6C,CAAA;AAC3D,cAAc,kDAAkD,CAAA;AAChE,cAAc,qBAAqB,CAAA;AACnC,cAAc,mCAAmC,CAAA;AACjD,cAAc,qCAAqC,CAAA;AACnD,cAAc,wBAAwB,CAAA"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // component exports
2
- export { cn, cva, getColor, getBackgroundAndPaddingStyle, getBorderStyle, getBorderSidesStyle, getTextStyle, getVerticalAlignmentStyle, getBackgroundAndSpacingStyle, getIdFromGid, productGidFromId, variantGidFromId, getPaddingStyle, getMarginStyle, getVerticalAlignment, mapFlexToAlignment, formatRelativeTime, stringRatioToInt, getOverlayStyle, throttleFunction, getDestinationHandler, getProductGidsFromIds, getBadgesForProductFn, createCollectionImageMap, isFavoriteIntegrationEnabled, getLoyaltyButtonProps, getSpaceBetween, getGridSpacing, pluralize, getInputPlaceholderTextProps, parsePhoneNumber, } from "./lib/utils";
2
+ export { cn, cva, getColor, getBackgroundAndPaddingStyle, getBorderStyle, getBorderSidesStyle, getTextStyle, getVerticalAlignmentStyle, getBackgroundAndSpacingStyle, getIdFromGid, productGidFromId, variantGidFromId, getPaddingStyle, getMarginStyle, getVerticalAlignment, mapFlexToAlignment, formatRelativeTime, stringRatioToInt, getOverlayStyle, throttleFunction, getDestinationHandler, getProductGidsFromIds, getVariantGidsFromIds, getBadgesForProductFn, createCollectionImageMap, isFavoriteIntegrationEnabled, getLoyaltyButtonProps, getSpaceBetween, getGridSpacing, pluralize, getInputPlaceholderTextProps, parsePhoneNumber, } from "./lib/utils";
3
3
  export * from "./lib/cart.util";
4
4
  export * from "./components/contexts/translation-context";
5
5
  export * from "./components/hooks/use-collection";
@@ -167,6 +167,95 @@ export declare const getVerticalAlignment: (alignment: string, padding?: {
167
167
  top?: undefined;
168
168
  transform?: undefined;
169
169
  };
170
+ type LoyaltyState = "add" | "added" | "locked";
171
+ export declare const getLoyaltyButtonProps: (buttonConfig: TextStyle & BackgroundAndPadding & {
172
+ addBackgroundColor: Color;
173
+ addBorderColor: Color;
174
+ addColor: Color;
175
+ addedBackgroundColor: Color;
176
+ addedBorderColor: Color;
177
+ addedColor: Color;
178
+ lockedBackgroundColor: Color;
179
+ lockedBorderColor: Color;
180
+ lockedColor: Color;
181
+ } & {
182
+ addBorderSides: BorderSides;
183
+ addedBorderSides: BorderSides;
184
+ lockedBorderSides: BorderSides;
185
+ } & {
186
+ addIcon: any;
187
+ addedIcon: any;
188
+ lockedIcon: any;
189
+ } & {
190
+ backgroundShadow?: boolean | undefined;
191
+ cornerRadius?: number | undefined;
192
+ }, state: LoyaltyState) => {
193
+ labelStyle: {
194
+ color: string | undefined;
195
+ fontStyle?: string | undefined;
196
+ fontFamily: string | undefined;
197
+ fontWeight: string | number | undefined;
198
+ fontSize: string | number;
199
+ textTransform: string;
200
+ textAlign: "left" | "right" | "center" | "justify";
201
+ textWrap: string;
202
+ };
203
+ iconUrl: any;
204
+ iconColor: string | undefined;
205
+ style: {
206
+ backgroundColor: string | undefined;
207
+ borderColor: string | undefined;
208
+ borderRadius: string | undefined;
209
+ borderWidth: string;
210
+ borderTopWidth?: undefined;
211
+ borderBottomWidth?: undefined;
212
+ borderLeftWidth?: undefined;
213
+ borderRightWidth?: undefined;
214
+ paddingTop?: undefined;
215
+ paddingBottom?: undefined;
216
+ paddingLeft?: undefined;
217
+ paddingRight?: undefined;
218
+ } | {
219
+ backgroundColor: string | undefined;
220
+ borderColor: string | undefined;
221
+ borderRadius: string | undefined;
222
+ borderTopWidth: string | number;
223
+ borderBottomWidth: string | number;
224
+ borderLeftWidth: string | number;
225
+ borderRightWidth: string | number;
226
+ borderWidth?: undefined;
227
+ paddingTop?: undefined;
228
+ paddingBottom?: undefined;
229
+ paddingLeft?: undefined;
230
+ paddingRight?: undefined;
231
+ } | {
232
+ backgroundColor: string | undefined;
233
+ borderColor: string | undefined;
234
+ borderRadius: string | undefined;
235
+ borderWidth: string;
236
+ borderTopWidth?: undefined;
237
+ borderBottomWidth?: undefined;
238
+ borderLeftWidth?: undefined;
239
+ borderRightWidth?: undefined;
240
+ paddingTop: string | undefined;
241
+ paddingBottom: string | undefined;
242
+ paddingLeft: string | undefined;
243
+ paddingRight: string | undefined;
244
+ } | {
245
+ backgroundColor: string | undefined;
246
+ borderColor: string | undefined;
247
+ borderRadius: string | undefined;
248
+ borderTopWidth: string | number;
249
+ borderBottomWidth: string | number;
250
+ borderLeftWidth: string | number;
251
+ borderRightWidth: string | number;
252
+ borderWidth?: undefined;
253
+ paddingTop: string | undefined;
254
+ paddingBottom: string | undefined;
255
+ paddingLeft: string | undefined;
256
+ paddingRight: string | undefined;
257
+ };
258
+ };
170
259
  export declare const mapFlexToAlignment: (flexClass: string) => string;
171
260
  export declare function getIdFromGid(gid: string | undefined): string;
172
261
  export declare function productGidFromId(id: string | null | undefined): string | null;
@@ -198,6 +287,7 @@ type DestinationActions = {
198
287
  };
199
288
  export declare const getDestinationHandler: (type: "app-screen" | "url" | "product" | "collection" | "none") => ((location: string, actions: DestinationActions) => void) | ((location: string, actions: DestinationActions) => void) | ((location: string, actions: DestinationActions) => void) | ((location: string, actions: DestinationActions) => void) | (() => void);
200
289
  export declare function getProductGidsFromIds(ids: string[]): string[];
290
+ export declare function getVariantGidsFromIds(ids: string[]): string[];
201
291
  export declare const createCollectionImageMap: (collections: {
202
292
  id: string;
203
293
  customImage: boolean;
@@ -235,6 +325,7 @@ export declare const countNumberOfTagsInState: (state: ConditionalSelectorValues
235
325
  type Location = {
236
326
  country: string;
237
327
  language: string;
328
+ deviceId?: string;
238
329
  };
239
330
  export declare const getEnvState: ({ location, product, collection, customer, }: {
240
331
  location: Location;
@@ -260,6 +351,9 @@ export declare const getEnvState: ({ location, product, collection, customer, }:
260
351
  }[];
261
352
  customerTag: UserSelectedTag[];
262
353
  customerMetafield: ShopifyMetafield[];
354
+ deviceId: {
355
+ value: string | undefined;
356
+ }[];
263
357
  };
264
358
  export declare const isUserSelectedTag: (obj: any) => obj is UserSelectedTag;
265
359
  export declare const isMetafield: (obj: any) => obj is ConditionalSelectorMetafield;
@@ -276,99 +370,4 @@ type LogicGroup = {
276
370
  conditions: (Condition | LogicGroup)[];
277
371
  };
278
372
  export declare const evaluateConditions: (group: LogicGroup, context: any) => boolean;
279
- type LoyaltyState = "apply" | "applied" | "locked" | "redeem";
280
- export declare const getLoyaltyButtonProps: (buttonConfig: TextStyle & BackgroundAndPadding & {
281
- applyBackgroundColor: Color;
282
- applyBorderColor: Color;
283
- applyTextColor: Color;
284
- appliedBackgroundColor: Color;
285
- appliedBorderColor: Color;
286
- appliedTextColor: Color;
287
- lockedBackgroundColor: Color;
288
- lockedBorderColor: Color;
289
- lockedTextColor: Color;
290
- redeemBackgroundColor: Color;
291
- redeemBorderColor: Color;
292
- redeemTextColor: Color;
293
- } & {
294
- applyBorderSides: BorderSides;
295
- appliedBorderSides: BorderSides;
296
- lockedBorderSides: BorderSides;
297
- redeemBorderSides: BorderSides;
298
- } & {
299
- backgroundShadow?: boolean | undefined;
300
- cornerRadius?: number | undefined;
301
- }, state: LoyaltyState) => {
302
- labelStyle: {
303
- color: string | undefined;
304
- fontStyle?: string | undefined;
305
- fontFamily: string | undefined;
306
- fontWeight: string | number | undefined;
307
- fontSize: string | number;
308
- textTransform: string;
309
- textAlign: "left" | "right" | "center" | "justify";
310
- textWrap: string;
311
- };
312
- style: {
313
- backgroundColor: string | undefined;
314
- borderColor: string | undefined;
315
- boxShadow: string;
316
- borderRadius: string | undefined;
317
- width: string;
318
- borderWidth: string;
319
- borderTopWidth?: undefined;
320
- borderBottomWidth?: undefined;
321
- borderLeftWidth?: undefined;
322
- borderRightWidth?: undefined;
323
- paddingTop?: undefined;
324
- paddingBottom?: undefined;
325
- paddingLeft?: undefined;
326
- paddingRight?: undefined;
327
- } | {
328
- backgroundColor: string | undefined;
329
- borderColor: string | undefined;
330
- boxShadow: string;
331
- borderRadius: string | undefined;
332
- width: string;
333
- borderTopWidth: string | number;
334
- borderBottomWidth: string | number;
335
- borderLeftWidth: string | number;
336
- borderRightWidth: string | number;
337
- borderWidth?: undefined;
338
- paddingTop?: undefined;
339
- paddingBottom?: undefined;
340
- paddingLeft?: undefined;
341
- paddingRight?: undefined;
342
- } | {
343
- backgroundColor: string | undefined;
344
- borderColor: string | undefined;
345
- boxShadow: string;
346
- borderRadius: string | undefined;
347
- width: string;
348
- borderWidth: string;
349
- borderTopWidth?: undefined;
350
- borderBottomWidth?: undefined;
351
- borderLeftWidth?: undefined;
352
- borderRightWidth?: undefined;
353
- paddingTop: string | undefined;
354
- paddingBottom: string | undefined;
355
- paddingLeft: string | undefined;
356
- paddingRight: string | undefined;
357
- } | {
358
- backgroundColor: string | undefined;
359
- borderColor: string | undefined;
360
- boxShadow: string;
361
- borderRadius: string | undefined;
362
- width: string;
363
- borderTopWidth: string | number;
364
- borderBottomWidth: string | number;
365
- borderLeftWidth: string | number;
366
- borderRightWidth: string | number;
367
- borderWidth?: undefined;
368
- paddingTop: string | undefined;
369
- paddingBottom: string | undefined;
370
- paddingLeft: string | undefined;
371
- paddingRight: string | undefined;
372
- };
373
- };
374
373
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,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KACX,OAyBF,CAAA"}
package/dist/lib/utils.js CHANGED
@@ -156,6 +156,21 @@ export const getVerticalAlignment = (alignment, padding = { top: 0, bottom: 0 })
156
156
  return {};
157
157
  }
158
158
  };
159
+ export const getLoyaltyButtonProps = (buttonConfig, state) => {
160
+ const color = buttonConfig[`${state}Color`];
161
+ const backgroundColor = buttonConfig[`${state}BackgroundColor`];
162
+ const borderColor = buttonConfig[`${state}BorderColor`];
163
+ const borderSides = buttonConfig[`${state}BorderSides`];
164
+ const icon = buttonConfig[`${state}Icon`];
165
+ return {
166
+ labelStyle: Object.assign(Object.assign({}, getTextStyle(buttonConfig)), { color: getColor(color) }),
167
+ iconUrl: icon.url,
168
+ iconColor: getColor(color),
169
+ style: Object.assign(Object.assign(Object.assign({}, getPaddingStyle(buttonConfig.padding)), getBorderSidesStyle(borderSides)), { backgroundColor: getColor(backgroundColor), borderColor: getColor(borderColor), borderRadius: buttonConfig.cornerRadius !== undefined
170
+ ? `${buttonConfig.cornerRadius}px`
171
+ : undefined }),
172
+ };
173
+ };
159
174
  const alignmentClasses = {
160
175
  left: "justify-start",
161
176
  middle: "justify-center",
@@ -250,6 +265,14 @@ export function getProductGidsFromIds(ids) {
250
265
  return `gid://shopify/Product/${id}`;
251
266
  });
252
267
  }
268
+ export function getVariantGidsFromIds(ids) {
269
+ return ids.map((id) => {
270
+ if (id.startsWith("gid://shopify/ProductVariant/")) {
271
+ return id;
272
+ }
273
+ return `gid://shopify/ProductVariant/${id}`;
274
+ });
275
+ }
253
276
  export const createCollectionImageMap = (collections) => {
254
277
  return collections.reduce((imageMap, collection) => {
255
278
  if (collection.customImage && collection.image) {
@@ -260,6 +283,8 @@ export const createCollectionImageMap = (collections) => {
260
283
  };
261
284
  export const isFavoriteIntegrationEnabled = (integrations) => {
262
285
  return integrations.some((integration) => (integration.name === "tapcart-wishlist" ||
286
+ integration.name === "grove-wishlist" ||
287
+ integration.name === "tapcart-wishlist-api" ||
263
288
  integration.name === "swym") &&
264
289
  integration.enabled);
265
290
  };
@@ -425,6 +450,9 @@ export const getEnvState = ({ location, product, collection, customer, }) => {
425
450
  const deviceCountryTags = {
426
451
  value: getRegion(location === null || location === void 0 ? void 0 : location.country),
427
452
  };
453
+ const deviceIdTags = {
454
+ value: location === null || location === void 0 ? void 0 : location.deviceId,
455
+ };
428
456
  const { productTag, productName } = getProductEnvTags(product);
429
457
  const unCleanedProductMetafields = product && !!product.metafields ? product.metafields : [];
430
458
  // shopify sometimes returns [null]
@@ -451,6 +479,7 @@ export const getEnvState = ({ location, product, collection, customer, }) => {
451
479
  customerAuthenticated: [customerAuthenticated],
452
480
  customerTag,
453
481
  customerMetafield,
482
+ deviceId: [deviceIdTags],
454
483
  };
455
484
  };
456
485
  export const isUserSelectedTag = (obj) => "value" in obj && typeof obj.value === "string" && obj.id === undefined;
@@ -569,18 +598,4 @@ export const evaluateConditions = (group, context) => {
569
598
  return true;
570
599
  }
571
600
  };
572
- export const getLoyaltyButtonProps = (buttonConfig, state) => {
573
- const textColor = buttonConfig[`${state}TextColor`];
574
- const backgroundColor = buttonConfig[`${state}BackgroundColor`];
575
- const borderColor = buttonConfig[`${state}BorderColor`];
576
- const borderSides = buttonConfig[`${state}BorderSides`];
577
- return {
578
- labelStyle: Object.assign(Object.assign({}, getTextStyle(buttonConfig)), { color: getColor(textColor) }),
579
- style: Object.assign(Object.assign(Object.assign({}, getPaddingStyle(buttonConfig.padding)), getBorderSidesStyle(borderSides)), { backgroundColor: getColor(backgroundColor), borderColor: getColor(borderColor), boxShadow: buttonConfig.backgroundShadow
580
- ? "0px 4px 6px rgba(0,0,0,0.1)"
581
- : "none", borderRadius: buttonConfig.cornerRadius !== undefined
582
- ? `${buttonConfig.cornerRadius}px`
583
- : undefined, width: "fit-content" }),
584
- };
585
- };
586
601
  // --- End (Block conditional rendering util functions) ----
package/dist/styles.css CHANGED
@@ -851,6 +851,9 @@ video {
851
851
  .-mt-4 {
852
852
  margin-top: -1rem;
853
853
  }
854
+ .mb-0 {
855
+ margin-bottom: 0px;
856
+ }
854
857
  .mb-1 {
855
858
  margin-bottom: 0.25rem;
856
859
  }
@@ -878,6 +881,9 @@ video {
878
881
  .ml-auto {
879
882
  margin-left: auto;
880
883
  }
884
+ .mr-1 {
885
+ margin-right: 0.25rem;
886
+ }
881
887
  .mr-2 {
882
888
  margin-right: 0.5rem;
883
889
  }
@@ -1143,9 +1149,6 @@ video {
1143
1149
  .w-\[22px\] {
1144
1150
  width: 22px;
1145
1151
  }
1146
- .w-\[280px\] {
1147
- width: 280px;
1148
- }
1149
1152
  .w-\[40px\] {
1150
1153
  width: 40px;
1151
1154
  }
@@ -1169,8 +1172,8 @@ video {
1169
1172
  .min-w-0 {
1170
1173
  min-width: 0px;
1171
1174
  }
1172
- .min-w-\[60px\] {
1173
- min-width: 60px;
1175
+ .min-w-16 {
1176
+ min-width: 4rem;
1174
1177
  }
1175
1178
  .min-w-\[8rem\] {
1176
1179
  min-width: 8rem;
@@ -1451,6 +1454,9 @@ video {
1451
1454
  -moz-column-gap: 7px;
1452
1455
  column-gap: 7px;
1453
1456
  }
1457
+ .gap-y-0 {
1458
+ row-gap: 0px;
1459
+ }
1454
1460
  .gap-y-2 {
1455
1461
  row-gap: 0.5rem;
1456
1462
  }
@@ -1504,6 +1510,9 @@ video {
1504
1510
  .overflow-hidden {
1505
1511
  overflow: hidden;
1506
1512
  }
1513
+ .overflow-visible {
1514
+ overflow: visible;
1515
+ }
1507
1516
  .overflow-scroll {
1508
1517
  overflow: scroll;
1509
1518
  }
@@ -2302,6 +2311,9 @@ video {
2302
2311
  .duration-500 {
2303
2312
  transition-duration: 500ms;
2304
2313
  }
2314
+ .ease-in {
2315
+ transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
2316
+ }
2305
2317
  .ease-in-out {
2306
2318
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2307
2319
  }
@@ -2334,6 +2346,9 @@ video {
2334
2346
  .duration-500 {
2335
2347
  animation-duration: 500ms;
2336
2348
  }
2349
+ .ease-in {
2350
+ animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
2351
+ }
2337
2352
  .ease-in-out {
2338
2353
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2339
2354
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapcart/mobile-components",
3
- "version": "0.8.37",
3
+ "version": "0.8.39",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "style": "dist/styles.css",