@tapcart/mobile-components 0.10.1 → 0.10.3
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/hooks/use-infinite-scroll.d.ts +1 -0
- package/dist/components/hooks/use-infinite-scroll.d.ts.map +1 -1
- package/dist/components/hooks/use-infinite-scroll.js +10 -0
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +3 -1
- package/dist/components/ui/image.js +1 -1
- package/dist/components/ui/loading-dots.js +1 -1
- package/dist/components/ui/wishlist-select.d.ts +9 -0
- package/dist/components/ui/wishlist-select.d.ts.map +1 -1
- package/dist/components/ui/wishlist-select.js +20 -1
- package/dist/components/ui/wishlist.d.ts +11 -1
- package/dist/components/ui/wishlist.d.ts.map +1 -1
- package/dist/components/ui/wishlist.js +59 -12
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/utils.d.ts +33 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +86 -1
- package/dist/lib/utils.wishlist.test.d.ts +2 -0
- package/dist/lib/utils.wishlist.test.d.ts.map +1 -0
- package/dist/lib/utils.wishlist.test.js +108 -0
- package/dist/styles.css +6 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-infinite-scroll.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-infinite-scroll.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAmB,MAAM,iBAAiB,CAAA;AAE1E,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAE5D,UAAU,QAAQ;IAChB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,GAAG,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE;QAAE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O,CAAA;IAChB,aAAa,EAAE,OAAO,CAAA;IACtB,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAAA;IAChD,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,oBAAoB,EAAE,GAAG,EAAE,CAAA;IAC3B,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,OAAO,CAAA;CACtB;AAED,eAAO,MAAM,sCAAsC,iBACnC,uBAAuB,OAsBtC,CAAA;AAED,QAAA,MAAM,YAAY,WAAY,MAAM,WAGnC,CAAA;AAED,QAAA,MAAM,iBAAiB,kJAepB,sBAAsB,KAAG,uBAkO3B,CAAA;AAED,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -181,6 +181,14 @@ customFetcher, customGetKey, }) => {
|
|
|
181
181
|
? data === null || data === void 0 ? void 0 : data.flatMap((page) => page === null || page === void 0 ? void 0 : page.products).slice(0, productLimit)
|
|
182
182
|
: [];
|
|
183
183
|
}, [data, productLimit]);
|
|
184
|
+
// Collect all integration responses per page when using search client
|
|
185
|
+
const integrationResponses = useMemo(() => {
|
|
186
|
+
if (!usingSearchClient)
|
|
187
|
+
return [];
|
|
188
|
+
if (!data || data.length === 0)
|
|
189
|
+
return [];
|
|
190
|
+
return data.map((page) => { var _a; return (_a = page === null || page === void 0 ? void 0 : page.integrationResponse) !== null && _a !== void 0 ? _a : null; });
|
|
191
|
+
}, [data, usingSearchClient]);
|
|
184
192
|
// Elegant conditional overrides when skipping
|
|
185
193
|
const applySkip = (value, override) => shouldSkipSearchClientFetch ? override : value;
|
|
186
194
|
return useMemo(() => ({
|
|
@@ -192,6 +200,7 @@ customFetcher, customGetKey, }) => {
|
|
|
192
200
|
isReachingEnd: applySkip(isReachingEnd, true),
|
|
193
201
|
ref,
|
|
194
202
|
products: applySkip(products, []),
|
|
203
|
+
integrationResponses: applySkip(integrationResponses, []),
|
|
195
204
|
isLoading: applySkip(isLoading, false),
|
|
196
205
|
isValidating: applySkip(isValidating, false),
|
|
197
206
|
}), [
|
|
@@ -203,6 +212,7 @@ customFetcher, customGetKey, }) => {
|
|
|
203
212
|
isReachingEnd,
|
|
204
213
|
ref,
|
|
205
214
|
products,
|
|
215
|
+
integrationResponses,
|
|
206
216
|
isLoading,
|
|
207
217
|
isValidating,
|
|
208
218
|
shouldSkipSearchClientFetch,
|
|
@@ -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;AAItC,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAInD,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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GAAG,EAAE,WAAW,KAAK,IAAI,CAAA;IACnC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;CAC/C,CAAA;AA0BD,QAAA,MAAM,QAAQ,6HA+Ib,CAAA;AAGD,QAAA,MAAM,eAAe;;wCAsBnB,CAAA;AAGF,QAAA,MAAM,YAAY,6GAmBhB,CAAA;AAGF,QAAA,MAAM,gBAAgB;6CAKnB,MAAM,cAAc,CAAC,aAAa,CAAC;;CAsBrC,CAAA;AAGD,QAAA,MAAM,YAAY;6CAKf,MAAM,cAAc,CAAC,aAAa,CAAC;;CAsBrC,CAAA;AAGD,KAAK,iBAAiB,GAAG;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;CACzB,CAAA;AAED,QAAA,MAAM,YAAY,iIA+DjB,CAAA;AA8DD,QAAA,MAAM,WAAW,aACL,iBAAiB,GAAG,SAAS,KACtC,eA2CF,CAAA;AAED,OAAO,EACL,KAAK,WAAW,EAChB,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,IAAI,EACJ,WAAW,GACZ,CAAA"}
|
|
@@ -95,6 +95,8 @@ const Carousel = React.forwardRef((_a, ref) => {
|
|
|
95
95
|
// @ts-ignore
|
|
96
96
|
.on("slideFocus", tweenScale);
|
|
97
97
|
}, [api, tweenScale]);
|
|
98
|
+
const hasFade = plugins === null || plugins === void 0 ? void 0 : plugins.some((plugin) => plugin.name === "fade");
|
|
99
|
+
const carouselStyle = Object.assign({ transform: hasFade ? "translateZ(0)" : undefined }, (props.style || {}));
|
|
98
100
|
return (_jsx(CarouselContext.Provider, Object.assign({ value: {
|
|
99
101
|
carouselRef,
|
|
100
102
|
api: api,
|
|
@@ -104,7 +106,7 @@ const Carousel = React.forwardRef((_a, ref) => {
|
|
|
104
106
|
scrollNext,
|
|
105
107
|
canScrollPrev,
|
|
106
108
|
canScrollNext,
|
|
107
|
-
} }, { children: _jsx("div", Object.assign({ ref: ref, onKeyDownCapture: handleKeyDown, className: cn("relative", className), role: "region", "aria-roledescription": "carousel" }, props, { children: children })) })));
|
|
109
|
+
} }, { children: _jsx("div", Object.assign({ ref: ref, onKeyDownCapture: handleKeyDown, className: cn("relative", className), role: "region", "aria-roledescription": "carousel" }, props, { style: carouselStyle }, { children: children })) })));
|
|
108
110
|
});
|
|
109
111
|
Carousel.displayName = "Carousel";
|
|
110
112
|
const CarouselContent = React.forwardRef((_a, ref) => {
|
|
@@ -66,7 +66,7 @@ function ImagePreload({ imgAttributes }) {
|
|
|
66
66
|
*/
|
|
67
67
|
export const Image = React.forwardRef((_a, ref) => {
|
|
68
68
|
var _b, _c;
|
|
69
|
-
var { alt, aspectRatio, crop = "center", data, decoding = "async", height = "auto", loader = shopifyLoader, loading = "eager", sizes = "
|
|
69
|
+
var { alt, aspectRatio, crop = "center", data, decoding = "async", height = "auto", loader = shopifyLoader, loading = "eager", sizes = "(max-width: 50px) 390px, 100vw", src, imageWrapperStyles, imageRadius, srcSetOptions = {
|
|
70
70
|
intervals: 15,
|
|
71
71
|
startingWidth: 100,
|
|
72
72
|
incrementSize: 100,
|
|
@@ -19,7 +19,7 @@ export const LoadingDots = ({ iconColor, size = 4, spacing = 1, opacity = 0.8, s
|
|
|
19
19
|
}, [show]);
|
|
20
20
|
if (!showLoadingDots)
|
|
21
21
|
return null;
|
|
22
|
-
return (_jsx("div", Object.assign({ className: cn("absolute inset-0 flex items-center justify-center", isAnimatingOut ? "animate-fadeOut" : "animate-fadeIn", {
|
|
22
|
+
return (_jsx("div", Object.assign({ className: cn("absolute inset-0 flex items-center justify-center z-20", isAnimatingOut ? "animate-fadeOut" : "animate-fadeIn", {
|
|
23
23
|
"bg-white bg-opacity-70": showBackground,
|
|
24
24
|
}) }, { children: _jsxs("div", Object.assign({ className: `flex space-x-${spacing}` }, { children: [_jsx("div", { style: { backgroundColor: iconColor, opacity: opacity }, className: `h-${size} w-${size} bg-black rounded-full animate-bounce [animation-delay:-0.3s]` }), _jsx("div", { style: { backgroundColor: iconColor, opacity: opacity }, className: `h-${size} w-${size} bg-black rounded-full animate-bounce [animation-delay:-0.15s]` }), _jsx("div", { style: { backgroundColor: iconColor, opacity: opacity }, className: `h-${size} w-${size} bg-black rounded-full animate-bounce` })] })) })));
|
|
25
25
|
};
|
|
@@ -2,6 +2,15 @@ import * as React from "react";
|
|
|
2
2
|
import { Color } from "../../lib/utils";
|
|
3
3
|
import { Translations } from "app-studio-types";
|
|
4
4
|
interface WishlistSelectStyleConfig {
|
|
5
|
+
headerText?: string;
|
|
6
|
+
headerFont?: {
|
|
7
|
+
family: string;
|
|
8
|
+
weight: string;
|
|
9
|
+
};
|
|
10
|
+
headerSize?: number;
|
|
11
|
+
headerColor?: Color;
|
|
12
|
+
headerUppercase?: boolean;
|
|
13
|
+
placeholderText?: string;
|
|
5
14
|
triggerBackgroundColor?: Color;
|
|
6
15
|
triggerBorderColor?: Color;
|
|
7
16
|
triggerCornerRadius?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wishlist-select.d.ts","sourceRoot":"","sources":["../../../components/ui/wishlist-select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAgB,KAAK,EAA2B,MAAM,iBAAiB,CAAA;AAG9E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,UAAU,yBAAyB;IACjC,sBAAsB,CAAC,EAAE,KAAK,CAAA;IAC9B,kBAAkB,CAAC,EAAE,KAAK,CAAA;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,cAAc,CAAC,EAAE;QACf,GAAG,EAAE,MAAM,CAAA;QACX,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,MAA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B,CAAA;CACxC;AAED,QAAA,MAAM,cAAc,6FAoNnB,CAAA;AAID,UAAU,kBACR,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,yBAAyB,CAAA;CACxC;AAED,QAAA,MAAM,qBAAqB,8FAwCzB,CAAA;AAGF,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,yBAAyB,CAAA;CACxC;AAED,QAAA,MAAM,qBAAqB,2FAgCzB,CAAA;AAGF,UAAU,eACR,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC9D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,yBAAyB,CAAA;IACvC,QAAQ,EACJ,KAAK,CAAC,SAAS,GACf,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAA;CACjE;AAED,QAAA,MAAM,kBAAkB,wFA8CvB,CAAA;AAGD,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,GACnB,CAAA;AAED,YAAY,EAAE,yBAAyB,EAAE,CAAA"}
|
|
@@ -57,7 +57,26 @@ const WishlistSelect = React.forwardRef(({ children, defaultValue, onChange, onO
|
|
|
57
57
|
};
|
|
58
58
|
const selectedChild = React.Children.toArray(children).find((child) => React.isValidElement(child) &&
|
|
59
59
|
child.props.value === selectedValue);
|
|
60
|
-
|
|
60
|
+
// Create header style object that will be reused
|
|
61
|
+
const headerStyle = React.useMemo(() => {
|
|
62
|
+
var _a, _b, _c, _d;
|
|
63
|
+
return ({
|
|
64
|
+
color: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.headerColor)
|
|
65
|
+
? getColor(styleConfig.headerColor)
|
|
66
|
+
: undefined,
|
|
67
|
+
fontFamily: ((_a = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.headerFont) === null || _a === void 0 ? void 0 : _a.family) !== "unset"
|
|
68
|
+
? (_b = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.headerFont) === null || _b === void 0 ? void 0 : _b.family
|
|
69
|
+
: undefined,
|
|
70
|
+
fontWeight: ((_c = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.headerFont) === null || _c === void 0 ? void 0 : _c.weight) !== "unset"
|
|
71
|
+
? (_d = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.headerFont) === null || _d === void 0 ? void 0 : _d.weight
|
|
72
|
+
: "600",
|
|
73
|
+
fontSize: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.headerSize)
|
|
74
|
+
? `${styleConfig.headerSize}px`
|
|
75
|
+
: "18px",
|
|
76
|
+
textTransform: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.headerUppercase) ? "uppercase" : undefined,
|
|
77
|
+
});
|
|
78
|
+
}, [styleConfig]);
|
|
79
|
+
return (_jsxs("div", Object.assign({ className: "relative", ref: ref }, { children: [_jsxs(WishlistSelectTrigger, Object.assign({ ref: triggerRef, onClick: handleToggle, styleConfig: styleConfig }, { children: [_jsx(WishlistSelectItem, Object.assign({ isTrigger: true, styleConfig: styleConfig }, { children: selectedChild ? (selectedChild.props.children({ isTrigger: true, translations })) : (_jsx(Wishlist, { headerText: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.headerText) || "My Wishlists", headerStyle: headerStyle, name: translations["wishlist-multiple-create-text-field-placeholder"], isTrigger: true, translations: translations, nameStyle: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameTextColor)
|
|
61
80
|
? {
|
|
62
81
|
color: getColor(styleConfig.nameTextColor),
|
|
63
82
|
fontFamily: ((_a = styleConfig.nameFont) === null || _a === void 0 ? void 0 : _a.family) !== "unset"
|
|
@@ -23,8 +23,18 @@ interface WishlistStyleConfig {
|
|
|
23
23
|
defaultImageIconColor?: Color;
|
|
24
24
|
imageLeftBorderRadius?: number;
|
|
25
25
|
imageRightBorderRadius?: number;
|
|
26
|
+
headerText?: string;
|
|
27
|
+
headerFont?: {
|
|
28
|
+
family: string;
|
|
29
|
+
weight: string;
|
|
30
|
+
};
|
|
31
|
+
headerSize?: number;
|
|
32
|
+
headerColor?: Color;
|
|
33
|
+
headerUppercase?: boolean;
|
|
26
34
|
}
|
|
27
35
|
export interface WishlistProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
36
|
+
headerText?: string;
|
|
37
|
+
headerStyle?: React.CSSProperties;
|
|
28
38
|
name?: string;
|
|
29
39
|
amount?: number;
|
|
30
40
|
selected?: boolean;
|
|
@@ -46,7 +56,7 @@ declare const PlaceholderIcon: ({ rightBorderRadius, leftBorderRadius, styleConf
|
|
|
46
56
|
leftBorderRadius?: number | undefined;
|
|
47
57
|
styleConfig?: WishlistStyleConfig | undefined;
|
|
48
58
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
-
declare const Wishlist: React.ForwardRefExoticComponent<WishlistProps & React.RefAttributes<HTMLButtonElement>>;
|
|
59
|
+
declare const Wishlist: React.ForwardRefExoticComponent<WishlistProps & React.RefAttributes<HTMLDivElement | HTMLButtonElement>>;
|
|
50
60
|
export interface CreateNewProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
51
61
|
selected?: boolean;
|
|
52
62
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wishlist.d.ts","sourceRoot":"","sources":["../../../components/ui/wishlist.tsx"],"names":[],"mapp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EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,YAAY,CAAA;IACxE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,YAAY,CAAA;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IACjC,WAAW,CAAC,EAAE,mBAAmB,CAAA;CAClC;AAED,QAAA,MAAM,eAAe;;;;6CAsDpB,CAAA;AAED,QAAA,MAAM,QAAQ,0GAsPb,CAAA;AAID,MAAM,WAAW,cACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,YAAY,CAAA;IAC1B,WAAW,CAAC,EAAE,mBAAmB,CAAA;CAClC;AAED,QAAA,MAAM,SAAS,0FAuCd,CAAA;AAID,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAA;AAC/C,YAAY,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -37,8 +37,8 @@ const PlaceholderIcon = ({ rightBorderRadius, leftBorderRadius, styleConfig, })
|
|
|
37
37
|
"coreColors-secondaryIcon" })) })));
|
|
38
38
|
};
|
|
39
39
|
const Wishlist = React.forwardRef((_a, ref) => {
|
|
40
|
-
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
41
|
-
var { selected = false, onClick, className, name, amount, imgUrl, imgRightBorderRadius = 4, imgLeftBorderRadius = 0, aspectRatio, objectFit, isTrigger, translations, nameStyle, amountStyle, styleConfig } = _a, props = __rest(_a, ["selected", "onClick", "className", "name", "amount", "imgUrl", "imgRightBorderRadius", "imgLeftBorderRadius", "aspectRatio", "objectFit", "isTrigger", "translations", "nameStyle", "amountStyle", "styleConfig"]);
|
|
40
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
41
|
+
var { headerText = "Wishlists", headerStyle, selected = false, onClick, className, name, amount, imgUrl, imgRightBorderRadius = 4, imgLeftBorderRadius = 0, aspectRatio, objectFit, isTrigger, translations, nameStyle, amountStyle, styleConfig } = _a, props = __rest(_a, ["headerText", "headerStyle", "selected", "onClick", "className", "name", "amount", "imgUrl", "imgRightBorderRadius", "imgLeftBorderRadius", "aspectRatio", "objectFit", "isTrigger", "translations", "nameStyle", "amountStyle", "styleConfig"]);
|
|
42
42
|
// Calculate effective border radius values (manifest takes priority)
|
|
43
43
|
const effectiveRightBorderRadius = (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.imageRightBorderRadius) !== undefined
|
|
44
44
|
? styleConfig.imageRightBorderRadius
|
|
@@ -46,7 +46,54 @@ const Wishlist = React.forwardRef((_a, ref) => {
|
|
|
46
46
|
const effectiveLeftBorderRadius = (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.imageLeftBorderRadius) !== undefined
|
|
47
47
|
? styleConfig.imageLeftBorderRadius
|
|
48
48
|
: imgLeftBorderRadius !== null && imgLeftBorderRadius !== void 0 ? imgLeftBorderRadius : 0;
|
|
49
|
-
|
|
49
|
+
// Build header style from styleConfig if no headerStyle is provided
|
|
50
|
+
const effectiveHeaderStyle = React.useMemo(() => {
|
|
51
|
+
var _a, _b, _c, _d;
|
|
52
|
+
if (headerStyle)
|
|
53
|
+
return headerStyle;
|
|
54
|
+
if (!styleConfig)
|
|
55
|
+
return undefined;
|
|
56
|
+
return {
|
|
57
|
+
color: styleConfig.headerColor
|
|
58
|
+
? getColor(styleConfig.headerColor)
|
|
59
|
+
: undefined,
|
|
60
|
+
fontFamily: ((_a = styleConfig.headerFont) === null || _a === void 0 ? void 0 : _a.family) !== "unset"
|
|
61
|
+
? (_b = styleConfig.headerFont) === null || _b === void 0 ? void 0 : _b.family
|
|
62
|
+
: undefined,
|
|
63
|
+
fontWeight: ((_c = styleConfig.headerFont) === null || _c === void 0 ? void 0 : _c.weight) !== "unset"
|
|
64
|
+
? (_d = styleConfig.headerFont) === null || _d === void 0 ? void 0 : _d.weight
|
|
65
|
+
: undefined,
|
|
66
|
+
fontSize: styleConfig.headerSize
|
|
67
|
+
? `${styleConfig.headerSize}px`
|
|
68
|
+
: undefined,
|
|
69
|
+
textTransform: styleConfig.headerUppercase ? "uppercase" : undefined,
|
|
70
|
+
};
|
|
71
|
+
}, [headerStyle, styleConfig]);
|
|
72
|
+
// Use div instead of button when used as trigger to avoid nested button elements
|
|
73
|
+
if (isTrigger) {
|
|
74
|
+
return (_jsxs("div", Object.assign({ className: cn("flex flex-row items-center px-4 py-2 w-full ", selected ? "bg-stateColors-skeleton" : "", className) }, { children: [imgUrl ? (_jsx("div", Object.assign({ className: "h-10 w-10 border border-coreColors-dividingLines overflow-hidden", style: {
|
|
75
|
+
flex: "0 1 auto",
|
|
76
|
+
borderTopRightRadius: `${effectiveRightBorderRadius}px`,
|
|
77
|
+
borderBottomRightRadius: `${effectiveRightBorderRadius}px`,
|
|
78
|
+
borderTopLeftRadius: `${effectiveLeftBorderRadius}px`,
|
|
79
|
+
borderBottomLeftRadius: `${effectiveLeftBorderRadius}px`,
|
|
80
|
+
} }, { children: _jsx("img", { alt: "wishlist-image", src: `${imgUrl}?width=40`, width: 40, height: 40, className: cn("w-full h-full", objectFit === "contain" ? "object-contain" : "object-cover"), style: {
|
|
81
|
+
borderTopRightRadius: `${effectiveRightBorderRadius}px`,
|
|
82
|
+
borderBottomRightRadius: `${effectiveRightBorderRadius}px`,
|
|
83
|
+
borderTopLeftRadius: `${effectiveLeftBorderRadius}px`,
|
|
84
|
+
borderBottomLeftRadius: `${effectiveLeftBorderRadius}px`,
|
|
85
|
+
} }) }))) : (_jsx(PlaceholderIcon, { rightBorderRadius: imgRightBorderRadius, leftBorderRadius: imgLeftBorderRadius, styleConfig: styleConfig })), _jsxs("div", Object.assign({ className: "flex flex-col flex-1 items-start mx-2 overflow-hidden" }, { children: [_jsx("div", Object.assign({ style: Object.assign({
|
|
86
|
+
// Base styles to match body-secondary but allow overrides
|
|
87
|
+
fontSize: "12px", lineHeight: "120%", fontWeight: "400", color: "var(--textColors-secondaryColor)" }, effectiveHeaderStyle) }, { children: headerText })), _jsx(Text, Object.assign({ type: "body-secondary", className: "w-full overflow-hidden text-ellipsis whitespace-nowrap text-left", style: Object.assign(Object.assign({}, nameStyle), { color: (nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.color) || getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameTextColor), fontFamily: ((_b = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameFont) === null || _b === void 0 ? void 0 : _b.family) !== "unset"
|
|
88
|
+
? (_c = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameFont) === null || _c === void 0 ? void 0 : _c.family
|
|
89
|
+
: nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.fontFamily, fontWeight: ((_d = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameFont) === null || _d === void 0 ? void 0 : _d.weight) !== "unset"
|
|
90
|
+
? (_e = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameFont) === null || _e === void 0 ? void 0 : _e.weight
|
|
91
|
+
: nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.fontWeight, fontSize: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameSize)
|
|
92
|
+
? `${styleConfig.nameSize}px`
|
|
93
|
+
: nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.fontSize }) }, { children: name }))] }))] })));
|
|
94
|
+
}
|
|
95
|
+
// Use button when not used as trigger
|
|
96
|
+
return (_jsxs("button", Object.assign({ className: cn("flex flex-row items-center px-4 py-2 w-full", selected ? "bg-stateColors-skeleton" : "", className), ref: ref, onClick: onClick }, props, { children: [imgUrl ? (_jsx("div", Object.assign({ className: "h-10 w-10 border border-coreColors-dividingLines overflow-hidden", style: {
|
|
50
97
|
flex: "0 1 auto",
|
|
51
98
|
borderTopRightRadius: `${effectiveRightBorderRadius}px`,
|
|
52
99
|
borderBottomRightRadius: `${effectiveRightBorderRadius}px`,
|
|
@@ -57,21 +104,21 @@ const Wishlist = React.forwardRef((_a, ref) => {
|
|
|
57
104
|
borderBottomRightRadius: `${effectiveRightBorderRadius}px`,
|
|
58
105
|
borderTopLeftRadius: `${effectiveLeftBorderRadius}px`,
|
|
59
106
|
borderBottomLeftRadius: `${effectiveLeftBorderRadius}px`,
|
|
60
|
-
} }) }))) : (_jsx(PlaceholderIcon, { rightBorderRadius: imgRightBorderRadius, leftBorderRadius: imgLeftBorderRadius, styleConfig: styleConfig })), _jsxs("div", Object.assign({ className: "flex flex-col flex-1 items-start mx-2 overflow-hidden" }, { children: [
|
|
61
|
-
? (
|
|
62
|
-
: nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.fontFamily, fontWeight: ((
|
|
63
|
-
? (
|
|
107
|
+
} }) }))) : (_jsx(PlaceholderIcon, { rightBorderRadius: imgRightBorderRadius, leftBorderRadius: imgLeftBorderRadius, styleConfig: styleConfig })), _jsxs("div", Object.assign({ className: "flex flex-col flex-1 items-start mx-2 overflow-hidden" }, { children: [_jsx(Text, Object.assign({ type: "body-secondary", className: "w-full overflow-hidden text-ellipsis whitespace-nowrap text-left", style: Object.assign(Object.assign({}, nameStyle), { color: (nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.color) || getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameTextColor), fontFamily: ((_f = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameFont) === null || _f === void 0 ? void 0 : _f.family) !== "unset"
|
|
108
|
+
? (_g = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameFont) === null || _g === void 0 ? void 0 : _g.family
|
|
109
|
+
: nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.fontFamily, fontWeight: ((_h = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameFont) === null || _h === void 0 ? void 0 : _h.weight) !== "unset"
|
|
110
|
+
? (_j = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameFont) === null || _j === void 0 ? void 0 : _j.weight
|
|
64
111
|
: nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.fontWeight, fontSize: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.nameSize)
|
|
65
112
|
? `${styleConfig.nameSize}px`
|
|
66
|
-
: nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.fontSize }) }, { children: name })),
|
|
67
|
-
? (
|
|
68
|
-
: amountStyle === null || amountStyle === void 0 ? void 0 : amountStyle.fontFamily, fontWeight: ((
|
|
69
|
-
? (
|
|
113
|
+
: nameStyle === null || nameStyle === void 0 ? void 0 : nameStyle.fontSize }) }, { children: name })), _jsx(Text, Object.assign({ type: "label", className: "w-full overflow-hidden text-ellipsis whitespace-nowrap text-left", style: Object.assign(Object.assign({}, amountStyle), { color: (amountStyle === null || amountStyle === void 0 ? void 0 : amountStyle.color) || getColor(styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.countTextColor), fontFamily: ((_k = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.countFont) === null || _k === void 0 ? void 0 : _k.family) !== "unset"
|
|
114
|
+
? (_l = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.countFont) === null || _l === void 0 ? void 0 : _l.family
|
|
115
|
+
: amountStyle === null || amountStyle === void 0 ? void 0 : amountStyle.fontFamily, fontWeight: ((_m = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.countFont) === null || _m === void 0 ? void 0 : _m.weight) !== "unset"
|
|
116
|
+
? (_o = styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.countFont) === null || _o === void 0 ? void 0 : _o.weight
|
|
70
117
|
: amountStyle === null || amountStyle === void 0 ? void 0 : amountStyle.fontWeight, fontSize: (styleConfig === null || styleConfig === void 0 ? void 0 : styleConfig.countSize)
|
|
71
118
|
? `${styleConfig.countSize}px`
|
|
72
119
|
: amountStyle === null || amountStyle === void 0 ? void 0 : amountStyle.fontSize }) }, { children: `${amount} ${amount !== 1
|
|
73
120
|
? translations["checkout-summary-items"]
|
|
74
|
-
: translations["checkout-summary-item"]}` }))
|
|
121
|
+
: translations["checkout-summary-item"]}` }))] }))] })));
|
|
75
122
|
});
|
|
76
123
|
Wishlist.displayName = "Wishlist";
|
|
77
124
|
const CreateNew = React.forwardRef((_a, ref) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
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";
|
|
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, getEnabledWishlistIntegration, supportsMultipleWishlists, findWishlistEntry, getWishlistAddItemNavigation, getLoyaltyButtonProps, getSpaceBetween, getGridSpacing, pluralize, getInputPlaceholderTextProps, parsePhoneNumber, } from "./lib/utils";
|
|
2
|
+
export type { WishlistEntryMatch } from "./lib/utils";
|
|
2
3
|
export * from "./lib/cart.util";
|
|
3
4
|
export * from "./lib/variablesCart.util";
|
|
4
5
|
export * from "./lib/isTapcartVersion20.util";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,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,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,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,gCAAgC,CAAA;AAC9C,cA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cAAc,oCAAoC,CAAA;AAClD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;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,qCAAqC,CAAA;AACnD,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;AACtC,cAAc,2BAA2B,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, getVariantGidsFromIds, 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, getEnabledWishlistIntegration, supportsMultipleWishlists, findWishlistEntry, getWishlistAddItemNavigation, getLoyaltyButtonProps, getSpaceBetween, getGridSpacing, pluralize, getInputPlaceholderTextProps, parsePhoneNumber, } from "./lib/utils";
|
|
3
3
|
export * from "./lib/cart.util";
|
|
4
4
|
export * from "./lib/variablesCart.util";
|
|
5
5
|
export * from "./lib/isTapcartVersion20.util";
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Integrations, ConditionalSelectorMetafield, ConditionalSelectorValues, Collection, UserSelectedTag, Product, Customer, ShopifyMetafield } from "app-studio-types";
|
|
1
|
+
import { Integrations, Integration, ConditionalSelectorMetafield, ConditionalSelectorValues, Collection, UserSelectedTag, Product, Customer, ShopifyMetafield } from "app-studio-types";
|
|
2
2
|
import { ClassValue } from "clsx";
|
|
3
3
|
import { CSSProperties } from "react";
|
|
4
4
|
export declare const parsePhoneNumber: (input: string, country?: string) => import("phone").PhoneResult;
|
|
@@ -1117,6 +1117,38 @@ export declare const createCollectionImageMap: (collections: {
|
|
|
1117
1117
|
image?: string;
|
|
1118
1118
|
}[]) => Record<string, string>;
|
|
1119
1119
|
export declare const isFavoriteIntegrationEnabled: (integrations: Integrations) => boolean;
|
|
1120
|
+
export declare const getEnabledWishlistIntegration: (integrations: Integrations) => Integration | null;
|
|
1121
|
+
export declare const supportsMultipleWishlists: (integration: Integration | null | undefined) => boolean;
|
|
1122
|
+
export declare const getWishlistAddItemNavigation: (productId: string, isAuthenticated?: boolean) => {
|
|
1123
|
+
destination: {
|
|
1124
|
+
type: "internal";
|
|
1125
|
+
url: string;
|
|
1126
|
+
};
|
|
1127
|
+
presentation: {
|
|
1128
|
+
transition: "popover";
|
|
1129
|
+
style: string;
|
|
1130
|
+
snapPoints: number[];
|
|
1131
|
+
};
|
|
1132
|
+
header: {
|
|
1133
|
+
visible: boolean;
|
|
1134
|
+
};
|
|
1135
|
+
};
|
|
1136
|
+
type WishlistEntryItem = {
|
|
1137
|
+
id?: string;
|
|
1138
|
+
_id?: string;
|
|
1139
|
+
productId?: string | null;
|
|
1140
|
+
variantId?: string | null;
|
|
1141
|
+
};
|
|
1142
|
+
type WishlistSummary = {
|
|
1143
|
+
id?: string | null;
|
|
1144
|
+
_id?: string | null;
|
|
1145
|
+
items?: WishlistEntryItem[] | null;
|
|
1146
|
+
};
|
|
1147
|
+
export type WishlistEntryMatch = {
|
|
1148
|
+
wishlistId: string | null;
|
|
1149
|
+
item: WishlistEntryItem;
|
|
1150
|
+
};
|
|
1151
|
+
export declare const findWishlistEntry: (wishlists: WishlistSummary[] | null | undefined, productId?: string | null, variantId?: string | null) => WishlistEntryMatch | null;
|
|
1120
1152
|
export declare const pluralize: (word: string, count?: number, inclusive?: boolean) => string;
|
|
1121
1153
|
export declare const getInputPlaceholderTextProps: (placeholderText: TextStyle) => {
|
|
1122
1154
|
placeholderTextColor: Color;
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"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CACvC,CAAA;AAoDD,eAAO,MAAM,kBAAkB,UACtB,UAAU,WACR,GAAG,KACX,OAyBF,CAAA"}
|
package/dist/lib/utils.js
CHANGED
|
@@ -215,7 +215,7 @@ export function throttleFunction(fn, wait) {
|
|
|
215
215
|
if (!throttle) {
|
|
216
216
|
fn(...args);
|
|
217
217
|
throttle = true;
|
|
218
|
-
|
|
218
|
+
setTimeout(() => {
|
|
219
219
|
throttle = false;
|
|
220
220
|
}, wait);
|
|
221
221
|
}
|
|
@@ -309,6 +309,91 @@ export const isFavoriteIntegrationEnabled = (integrations) => {
|
|
|
309
309
|
integration.name === "swym") &&
|
|
310
310
|
integration.enabled);
|
|
311
311
|
};
|
|
312
|
+
const WISHLIST_INTEGRATION_NAMES = new Set([
|
|
313
|
+
"tapcart-wishlist",
|
|
314
|
+
"tapcart-wishlist-v2",
|
|
315
|
+
"tapcart-wishlist-api",
|
|
316
|
+
"grove-wishlist",
|
|
317
|
+
"swym",
|
|
318
|
+
]);
|
|
319
|
+
export const getEnabledWishlistIntegration = (integrations) => {
|
|
320
|
+
if (!Array.isArray(integrations))
|
|
321
|
+
return null;
|
|
322
|
+
return (integrations.find((integration) => WISHLIST_INTEGRATION_NAMES.has(integration.name) &&
|
|
323
|
+
integration.enabled === true) || null);
|
|
324
|
+
};
|
|
325
|
+
export const supportsMultipleWishlists = (integration) => {
|
|
326
|
+
if (!integration)
|
|
327
|
+
return false;
|
|
328
|
+
if (!WISHLIST_INTEGRATION_NAMES.has(integration.name))
|
|
329
|
+
return false;
|
|
330
|
+
if (typeof integration.multiwishlist === "boolean") {
|
|
331
|
+
return integration.multiwishlist;
|
|
332
|
+
}
|
|
333
|
+
switch (integration.name) {
|
|
334
|
+
case "tapcart-wishlist":
|
|
335
|
+
case "tapcart-wishlist-v2":
|
|
336
|
+
case "tapcart-wishlist-api":
|
|
337
|
+
case "grove-wishlist":
|
|
338
|
+
case "swym":
|
|
339
|
+
return true;
|
|
340
|
+
default:
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
export const getWishlistAddItemNavigation = (productId, isAuthenticated = false) => {
|
|
345
|
+
return {
|
|
346
|
+
destination: {
|
|
347
|
+
type: "internal",
|
|
348
|
+
url: `wishlist-add-item?productId=${productId}`,
|
|
349
|
+
},
|
|
350
|
+
presentation: {
|
|
351
|
+
transition: "popover",
|
|
352
|
+
style: "default",
|
|
353
|
+
snapPoints: isAuthenticated ? [0.5, 0.75] : [0.3, 0.5, 0.75],
|
|
354
|
+
},
|
|
355
|
+
header: {
|
|
356
|
+
visible: false,
|
|
357
|
+
},
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
const normalizeShopifyId = (id) => {
|
|
361
|
+
if (typeof id !== "string" || id.length === 0)
|
|
362
|
+
return null;
|
|
363
|
+
const normalized = getIdFromGid(id);
|
|
364
|
+
return normalized || id;
|
|
365
|
+
};
|
|
366
|
+
export const findWishlistEntry = (wishlists, productId, variantId) => {
|
|
367
|
+
if (!productId || !Array.isArray(wishlists) || wishlists.length === 0) {
|
|
368
|
+
return null;
|
|
369
|
+
}
|
|
370
|
+
const normalizedProductId = normalizeShopifyId(productId);
|
|
371
|
+
for (const wishlist of wishlists) {
|
|
372
|
+
const items = Array.isArray(wishlist === null || wishlist === void 0 ? void 0 : wishlist.items) ? wishlist.items : [];
|
|
373
|
+
for (const item of items) {
|
|
374
|
+
const normalizedItemProductId = normalizeShopifyId(item === null || item === void 0 ? void 0 : item.productId);
|
|
375
|
+
if (!normalizedItemProductId)
|
|
376
|
+
continue;
|
|
377
|
+
const productMatches = normalizedItemProductId === normalizedProductId ||
|
|
378
|
+
(item === null || item === void 0 ? void 0 : item.productId) === productId;
|
|
379
|
+
if (!productMatches)
|
|
380
|
+
continue;
|
|
381
|
+
if (variantId) {
|
|
382
|
+
const normalizedVariantId = normalizeShopifyId(variantId);
|
|
383
|
+
const normalizedItemVariantId = normalizeShopifyId(item === null || item === void 0 ? void 0 : item.variantId);
|
|
384
|
+
const variantMatches = normalizedItemVariantId === normalizedVariantId ||
|
|
385
|
+
(item === null || item === void 0 ? void 0 : item.variantId) === variantId;
|
|
386
|
+
if (!variantMatches)
|
|
387
|
+
continue;
|
|
388
|
+
}
|
|
389
|
+
return {
|
|
390
|
+
wishlistId: (wishlist === null || wishlist === void 0 ? void 0 : wishlist.id) || (wishlist === null || wishlist === void 0 ? void 0 : wishlist._id) || null,
|
|
391
|
+
item,
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
return null;
|
|
396
|
+
};
|
|
312
397
|
export const pluralize = (word, count, inclusive) => {
|
|
313
398
|
return Pluralize(word, count, inclusive);
|
|
314
399
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.wishlist.test.d.ts","sourceRoot":"","sources":["../../lib/utils.wishlist.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { findWishlistEntry, getEnabledWishlistIntegration, supportsMultipleWishlists, } from "./utils";
|
|
2
|
+
describe("getEnabledWishlistIntegration", () => {
|
|
3
|
+
it("returns the first enabled wishlist integration", () => {
|
|
4
|
+
const integrations = [
|
|
5
|
+
{ name: "tapcart-search", enabled: true },
|
|
6
|
+
{ name: "tapcart-wishlist", enabled: true, multiwishlist: true },
|
|
7
|
+
{ name: "swym", enabled: true },
|
|
8
|
+
];
|
|
9
|
+
const result = getEnabledWishlistIntegration(integrations);
|
|
10
|
+
expect(result).toEqual({
|
|
11
|
+
name: "tapcart-wishlist",
|
|
12
|
+
enabled: true,
|
|
13
|
+
multiwishlist: true,
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
it("returns null when no wishlist integration is enabled", () => {
|
|
17
|
+
const integrations = [
|
|
18
|
+
{ name: "tapcart-search", enabled: true },
|
|
19
|
+
{ name: "tapcart-wishlist", enabled: false },
|
|
20
|
+
];
|
|
21
|
+
expect(getEnabledWishlistIntegration(integrations)).toBeNull();
|
|
22
|
+
});
|
|
23
|
+
it("returns null when integrations is not an array", () => {
|
|
24
|
+
expect(getEnabledWishlistIntegration(undefined)).toBeNull();
|
|
25
|
+
expect(getEnabledWishlistIntegration(null)).toBeNull();
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
describe("supportsMultipleWishlists", () => {
|
|
29
|
+
it("respects explicit multiwishlist flag", () => {
|
|
30
|
+
expect(supportsMultipleWishlists({
|
|
31
|
+
name: "tapcart-wishlist",
|
|
32
|
+
enabled: true,
|
|
33
|
+
multiwishlist: false,
|
|
34
|
+
})).toBe(false);
|
|
35
|
+
expect(supportsMultipleWishlists({
|
|
36
|
+
name: "tapcart-wishlist",
|
|
37
|
+
enabled: true,
|
|
38
|
+
multiwishlist: true,
|
|
39
|
+
})).toBe(true);
|
|
40
|
+
});
|
|
41
|
+
it("defaults to true for known integrations when flag is omitted", () => {
|
|
42
|
+
expect(supportsMultipleWishlists({
|
|
43
|
+
name: "tapcart-wishlist-v2",
|
|
44
|
+
enabled: true,
|
|
45
|
+
})).toBe(true);
|
|
46
|
+
});
|
|
47
|
+
it("returns false for unknown integrations", () => {
|
|
48
|
+
expect(supportsMultipleWishlists({
|
|
49
|
+
name: "not-a-wishlist",
|
|
50
|
+
enabled: true,
|
|
51
|
+
})).toBe(false);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
describe("findWishlistEntry", () => {
|
|
55
|
+
const wishlists = [
|
|
56
|
+
{
|
|
57
|
+
id: "wl-1",
|
|
58
|
+
items: [
|
|
59
|
+
{
|
|
60
|
+
id: "item-1",
|
|
61
|
+
productId: "gid://shopify/Product/123",
|
|
62
|
+
variantId: "gid://shopify/ProductVariant/456",
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
_id: "wl-2",
|
|
68
|
+
items: [
|
|
69
|
+
{
|
|
70
|
+
id: "item-2",
|
|
71
|
+
productId: "789",
|
|
72
|
+
variantId: "654",
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
it("finds an entry when product and variant match across gid representations", () => {
|
|
78
|
+
const match = findWishlistEntry(wishlists, "123", "456");
|
|
79
|
+
expect(match).toEqual({
|
|
80
|
+
wishlistId: "wl-1",
|
|
81
|
+
item: {
|
|
82
|
+
id: "item-1",
|
|
83
|
+
productId: "gid://shopify/Product/123",
|
|
84
|
+
variantId: "gid://shopify/ProductVariant/456",
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
it("falls back to product-only lookup when variant is omitted", () => {
|
|
89
|
+
const match = findWishlistEntry(wishlists, "789");
|
|
90
|
+
expect(match).toEqual({
|
|
91
|
+
wishlistId: "wl-2",
|
|
92
|
+
item: {
|
|
93
|
+
id: "item-2",
|
|
94
|
+
productId: "789",
|
|
95
|
+
variantId: "654",
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
it("returns null when no matching entry is found", () => {
|
|
100
|
+
const match = findWishlistEntry(wishlists, "999", "888");
|
|
101
|
+
expect(match).toBeNull();
|
|
102
|
+
});
|
|
103
|
+
it("handles empty or invalid inputs gracefully", () => {
|
|
104
|
+
expect(findWishlistEntry(undefined, "123")).toBeNull();
|
|
105
|
+
expect(findWishlistEntry([], "123")).toBeNull();
|
|
106
|
+
expect(findWishlistEntry(wishlists, undefined)).toBeNull();
|
|
107
|
+
});
|
|
108
|
+
});
|
package/dist/styles.css
CHANGED
|
@@ -1097,6 +1097,9 @@ video {
|
|
|
1097
1097
|
.min-h-\[24px\] {
|
|
1098
1098
|
min-height: 24px;
|
|
1099
1099
|
}
|
|
1100
|
+
.min-h-screen {
|
|
1101
|
+
min-height: 100vh;
|
|
1102
|
+
}
|
|
1100
1103
|
.w-0 {
|
|
1101
1104
|
width: 0px;
|
|
1102
1105
|
}
|
|
@@ -1465,6 +1468,9 @@ video {
|
|
|
1465
1468
|
.justify-between {
|
|
1466
1469
|
justify-content: space-between;
|
|
1467
1470
|
}
|
|
1471
|
+
.justify-evenly {
|
|
1472
|
+
justify-content: space-evenly;
|
|
1473
|
+
}
|
|
1468
1474
|
.gap-0 {
|
|
1469
1475
|
gap: 0px;
|
|
1470
1476
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tapcart/mobile-components",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"style": "dist/styles.css",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@radix-ui/react-toggle-group": "^1.0.4",
|
|
73
73
|
"@tabler/icons-react": "^3.2.0",
|
|
74
74
|
"@tanstack/react-virtual": "^3.13.6",
|
|
75
|
-
"@tapcart/app-studio-sdk": "^2.
|
|
75
|
+
"@tapcart/app-studio-sdk": "^2.2.0",
|
|
76
76
|
"apple-pay-button": "^1.1.7",
|
|
77
77
|
"class-variance-authority": "^0.6.0",
|
|
78
78
|
"clsx": "^1.2.1",
|