@shopify/shop-minis-react 0.0.19 → 0.0.21
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/MinisContainer.js +13 -11
- package/dist/components/MinisContainer.js.map +1 -1
- package/dist/components/atoms/list.js +52 -0
- package/dist/components/atoms/list.js.map +1 -0
- package/dist/components/atoms/pagination.js +10 -0
- package/dist/components/atoms/pagination.js.map +1 -0
- package/dist/components/atoms/tracking-pixel.js +32 -0
- package/dist/components/atoms/tracking-pixel.js.map +1 -0
- package/dist/hooks/storage/useImageUpload.js.map +1 -1
- package/dist/hooks/util/useErrorScreen.js.map +1 -1
- package/dist/hooks/util/useErrorToast.js.map +1 -1
- package/dist/index.js +194 -189
- package/dist/index.js.map +1 -1
- package/dist/internal/useShopActions.js.map +1 -1
- package/dist/internal/useShopActionsDataFetching.js +26 -26
- package/dist/internal/useShopActionsDataFetching.js.map +1 -1
- package/dist/internal/useShopActionsPaginatedDataFetching.js.map +1 -1
- package/dist/mocks.js +267 -0
- package/dist/mocks.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +8 -0
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/extends.js +13 -0
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +8 -0
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +9 -0
- package/dist/shop-minis-react/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/memoize-one@5.2.1/node_modules/memoize-one/dist/memoize-one.esm.js +28 -0
- package/dist/shop-minis-react/node_modules/.pnpm/memoize-one@5.2.1/node_modules/memoize-one/dist/memoize-one.esm.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/react-intersection-observer@9.16.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-intersection-observer/dist/index.js +135 -0
- package/dist/shop-minis-react/node_modules/.pnpm/react-intersection-observer@9.16.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-intersection-observer/dist/index.js.map +1 -0
- package/dist/shop-minis-react/node_modules/.pnpm/react-window@1.8.11_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-window/dist/index.esm.js +375 -0
- package/dist/shop-minis-react/node_modules/.pnpm/react-window@1.8.11_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-window/dist/index.esm.js.map +1 -0
- package/dist/shop-minis-react.css +1 -0
- package/package.json +9 -4
- package/src/components/MinisContainer.tsx +4 -1
- package/src/components/atoms/list.tsx +101 -0
- package/src/components/atoms/pagination.tsx +19 -0
- package/src/components/atoms/tracking-pixel.tsx +40 -0
- package/src/components/index.ts +2 -0
- package/src/hooks/navigation/useCloseMini.example.tsx +1 -1
- package/src/hooks/navigation/useShopNavigation.example.tsx +12 -9
- package/src/hooks/product/useProductListActions.example.tsx +19 -16
- package/src/hooks/shop/useShopCartActions.example.tsx +2 -2
- package/src/hooks/storage/useImageUpload.example.tsx +1 -1
- package/src/hooks/storage/useImageUpload.ts +3 -2
- package/src/hooks/user/useFollowedShopsActions.example.tsx +6 -8
- package/src/hooks/user/useSavedProductsActions.example.tsx +8 -6
- package/src/hooks/util/useErrorScreen.example.tsx +1 -2
- package/src/hooks/util/useErrorScreen.ts +2 -1
- package/src/hooks/util/useErrorToast.example.tsx +1 -1
- package/src/hooks/util/useErrorToast.ts +2 -1
- package/src/hooks/util/useImagePicker.example.tsx +4 -12
- package/src/index.css +1 -0
- package/src/internal/useShopActions.ts +1 -1
- package/src/internal/useShopActionsDataFetching.ts +6 -7
- package/src/internal/useShopActionsPaginatedDataFetching.ts +3 -6
- package/src/mocks.ts +20 -8
- package/src/stories/List.stories.tsx +68 -0
- package/src/styles/utilities.css +22 -0
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DATA_NAVIGATION_TYPE_ATTRIBUTE as o, NAVIGATION_TYPES as t } from "./types/index.js";
|
|
2
|
-
import { MinisContainer as
|
|
2
|
+
import { MinisContainer as i } from "./components/MinisContainer.js";
|
|
3
3
|
import { ProductCard as p } from "./components/commerce/product-card.js";
|
|
4
4
|
import { ProductLink as m } from "./components/commerce/product-link.js";
|
|
5
5
|
import { MerchantCard as u, MerchantCardPrimitive as x } from "./components/commerce/merchant-card.js";
|
|
6
6
|
import { ProductCardSkeleton as c } from "./components/commerce/product-card-skeleton.js";
|
|
7
|
-
import { MerchantCardSkeleton as
|
|
7
|
+
import { MerchantCardSkeleton as g } from "./components/commerce/merchant-card-skeleton.js";
|
|
8
8
|
import { TransitionContainer as D } from "./components/navigation/transition-container.js";
|
|
9
9
|
import { TransitionLink as C } from "./components/navigation/transition-link.js";
|
|
10
10
|
import { Button as T } from "./components/atoms/button.js";
|
|
@@ -12,207 +12,212 @@ import { FavoriteButton as I } from "./components/atoms/favorite-button.js";
|
|
|
12
12
|
import { IconButton as v } from "./components/atoms/icon-button.js";
|
|
13
13
|
import { ThumbhashImage as k } from "./components/atoms/thumbhash-image.js";
|
|
14
14
|
import { Touchable as F } from "./components/atoms/touchable.js";
|
|
15
|
-
import { AlertDialogAtom as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
15
|
+
import { AlertDialogAtom as B } from "./components/atoms/alert-dialog.js";
|
|
16
|
+
import { List as N } from "./components/atoms/list.js";
|
|
17
|
+
import { Accordion as y, AccordionContent as G, AccordionItem as H, AccordionTrigger as O } from "./components/ui/accordion.js";
|
|
18
|
+
import { Alert as V, AlertDescription as _, AlertTitle as z } from "./components/ui/alert.js";
|
|
19
|
+
import { AlertDialog as W, AlertDialogAction as j, AlertDialogCancel as q, AlertDialogContent as J, AlertDialogDescription as K, AlertDialogFooter as Q, AlertDialogHeader as X, AlertDialogOverlay as Z, AlertDialogPortal as $, AlertDialogTitle as rr, AlertDialogTrigger as er } from "./components/ui/alert-dialog.js";
|
|
20
|
+
import { Avatar as tr, AvatarFallback as ar, AvatarImage as ir } from "./components/ui/avatar.js";
|
|
21
|
+
import { Badge as pr, badgeVariants as sr } from "./components/ui/badge.js";
|
|
22
|
+
import { Card as nr, CardAction as ur, CardContent as xr, CardDescription as fr, CardFooter as cr, CardHeader as dr, CardTitle as gr } from "./components/ui/card.js";
|
|
23
|
+
import { Carousel as Dr, CarouselContent as Ar, CarouselItem as Cr, CarouselNext as Pr, CarouselPrevious as Tr } from "./components/ui/carousel.js";
|
|
24
|
+
import { Checkbox as Ir } from "./components/ui/checkbox.js";
|
|
25
|
+
import { Dialog as vr, DialogClose as br, DialogContent as kr, DialogDescription as Er, DialogFooter as Fr, DialogHeader as Rr, DialogOverlay as Br, DialogPortal as Mr, DialogTitle as Nr, DialogTrigger as Lr } from "./components/ui/dialog.js";
|
|
26
|
+
import { Drawer as Gr, DrawerClose as Hr, DrawerContent as Or, DrawerDescription as Ur, DrawerFooter as Vr, DrawerHeader as _r, DrawerOverlay as zr, DrawerPortal as Yr, DrawerTitle as Wr, DrawerTrigger as jr } from "./components/ui/drawer.js";
|
|
27
|
+
import { Input as Jr } from "./components/ui/input.js";
|
|
28
|
+
import { Label as Qr } from "./components/ui/label.js";
|
|
29
|
+
import { Progress as Zr } from "./components/ui/progress.js";
|
|
30
|
+
import { RadioGroup as re, RadioGroupItem as ee } from "./components/ui/radio-group.js";
|
|
31
|
+
import { ResizableHandle as te, ResizablePanel as ae, ResizablePanelGroup as ie } from "./components/ui/resizable.js";
|
|
32
|
+
import { ScrollArea as pe, ScrollBar as se } from "./components/ui/scroll-area.js";
|
|
33
|
+
import { Select as ne, SelectContent as ue, SelectGroup as xe, SelectItem as fe, SelectLabel as ce, SelectScrollDownButton as de, SelectScrollUpButton as ge, SelectSeparator as Se, SelectTrigger as De, SelectValue as Ae } from "./components/ui/select.js";
|
|
34
|
+
import { Separator as Pe } from "./components/ui/separator.js";
|
|
35
|
+
import { Sheet as he, SheetClose as Ie, SheetContent as we, SheetDescription as ve, SheetFooter as be, SheetHeader as ke, SheetTitle as Ee, SheetTrigger as Fe } from "./components/ui/sheet.js";
|
|
36
|
+
import { Toaster as Be } from "./components/ui/sonner.js";
|
|
37
|
+
import { Skeleton as Ne } from "./components/ui/skeleton.js";
|
|
38
|
+
import { useRecentProducts as ye } from "./hooks/user/useRecentProducts.js";
|
|
39
|
+
import { useRecentShops as He } from "./hooks/user/useRecentShops.js";
|
|
40
|
+
import { useSavedProducts as Ue } from "./hooks/user/useSavedProducts.js";
|
|
41
|
+
import { useSavedProductsActions as _e } from "./hooks/user/useSavedProductsActions.js";
|
|
42
|
+
import { useFollowedShops as Ye } from "./hooks/user/useFollowedShops.js";
|
|
43
|
+
import { useFollowedShopsActions as je } from "./hooks/user/useFollowedShopsActions.js";
|
|
44
|
+
import { useCurrentUser as Je } from "./hooks/user/useCurrentUser.js";
|
|
45
|
+
import { useOrders as Qe } from "./hooks/user/useOrders.js";
|
|
46
|
+
import { useBuyerAttributes as Ze } from "./hooks/user/useBuyerAttributes.js";
|
|
47
|
+
import { useProductListActions as ro } from "./hooks/product/useProductListActions.js";
|
|
48
|
+
import { useProductLists as oo } from "./hooks/product/useProductLists.js";
|
|
49
|
+
import { useProductList as ao } from "./hooks/product/useProductList.js";
|
|
50
|
+
import { useProduct as lo } from "./hooks/product/useProduct.js";
|
|
51
|
+
import { useProducts as so } from "./hooks/product/useProducts.js";
|
|
52
|
+
import { useProductVariants as no } from "./hooks/product/useProductVariants.js";
|
|
53
|
+
import { useProductMedia as xo } from "./hooks/product/useProductMedia.js";
|
|
54
|
+
import { useProductSearch as co } from "./hooks/product/useProductSearch.js";
|
|
55
|
+
import { useRecommendedProducts as So } from "./hooks/product/useRecommendedProducts.js";
|
|
56
|
+
import { usePopularProducts as Ao } from "./hooks/product/usePopularProducts.js";
|
|
57
|
+
import { useCuratedProducts as Po } from "./hooks/product/useCuratedProducts.js";
|
|
58
|
+
import { useAsyncStorage as ho } from "./hooks/storage/useAsyncStorage.js";
|
|
59
|
+
import { useSecureStorage as wo } from "./hooks/storage/useSecureStorage.js";
|
|
60
|
+
import { useImageUpload as bo } from "./hooks/storage/useImageUpload.js";
|
|
61
|
+
import { useShopNavigation as Eo } from "./hooks/navigation/useShopNavigation.js";
|
|
62
|
+
import { useCloseMini as Ro } from "./hooks/navigation/useCloseMini.js";
|
|
63
|
+
import { useDeeplink as Mo } from "./hooks/navigation/useDeeplink.js";
|
|
64
|
+
import { useNavigateWithTransition as Lo } from "./hooks/navigation/useNavigateWithTransition.js";
|
|
65
|
+
import { useShop as Go } from "./hooks/shop/useShop.js";
|
|
66
|
+
import { useShopCartActions as Oo } from "./hooks/shop/useShopCartActions.js";
|
|
67
|
+
import { useRecommendedShops as Vo } from "./hooks/shop/useRecommendedShops.js";
|
|
68
|
+
import { useErrorToast as zo } from "./hooks/util/useErrorToast.js";
|
|
69
|
+
import { useErrorScreen as Wo } from "./hooks/util/useErrorScreen.js";
|
|
70
|
+
import { useShare as qo } from "./hooks/util/useShare.js";
|
|
71
|
+
import { useImagePicker as Ko } from "./hooks/util/useImagePicker.js";
|
|
72
|
+
import { MiniEntityNotFoundError as Xo, MiniError as Zo, MiniNetworkError as $o, formatError as rt } from "./utils/errors.js";
|
|
73
|
+
import { parseUrl as ot } from "./utils/parseUrl.js";
|
|
74
|
+
import { Consent as at, ConsentStatus as it } from "./shop-minis-platform/src/types/permissions.js";
|
|
73
75
|
export {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
76
|
+
y as Accordion,
|
|
77
|
+
G as AccordionContent,
|
|
78
|
+
H as AccordionItem,
|
|
79
|
+
O as AccordionTrigger,
|
|
80
|
+
V as Alert,
|
|
81
|
+
_ as AlertDescription,
|
|
82
|
+
W as AlertDialog,
|
|
83
|
+
j as AlertDialogAction,
|
|
84
|
+
B as AlertDialogAtom,
|
|
85
|
+
q as AlertDialogCancel,
|
|
86
|
+
J as AlertDialogContent,
|
|
87
|
+
K as AlertDialogDescription,
|
|
88
|
+
Q as AlertDialogFooter,
|
|
89
|
+
X as AlertDialogHeader,
|
|
90
|
+
Z as AlertDialogOverlay,
|
|
91
|
+
$ as AlertDialogPortal,
|
|
92
|
+
rr as AlertDialogTitle,
|
|
93
|
+
er as AlertDialogTrigger,
|
|
94
|
+
z as AlertTitle,
|
|
95
|
+
tr as Avatar,
|
|
96
|
+
ar as AvatarFallback,
|
|
97
|
+
ir as AvatarImage,
|
|
98
|
+
pr as Badge,
|
|
96
99
|
T as Button,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
100
|
+
nr as Card,
|
|
101
|
+
ur as CardAction,
|
|
102
|
+
xr as CardContent,
|
|
103
|
+
fr as CardDescription,
|
|
104
|
+
cr as CardFooter,
|
|
105
|
+
dr as CardHeader,
|
|
106
|
+
gr as CardTitle,
|
|
107
|
+
Dr as Carousel,
|
|
108
|
+
Ar as CarouselContent,
|
|
109
|
+
Cr as CarouselItem,
|
|
110
|
+
Pr as CarouselNext,
|
|
111
|
+
Tr as CarouselPrevious,
|
|
112
|
+
Ir as Checkbox,
|
|
113
|
+
at as Consent,
|
|
114
|
+
it as ConsentStatus,
|
|
112
115
|
o as DATA_NAVIGATION_TYPE_ATTRIBUTE,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
116
|
+
vr as Dialog,
|
|
117
|
+
br as DialogClose,
|
|
118
|
+
kr as DialogContent,
|
|
119
|
+
Er as DialogDescription,
|
|
120
|
+
Fr as DialogFooter,
|
|
121
|
+
Rr as DialogHeader,
|
|
122
|
+
Br as DialogOverlay,
|
|
123
|
+
Mr as DialogPortal,
|
|
124
|
+
Nr as DialogTitle,
|
|
125
|
+
Lr as DialogTrigger,
|
|
126
|
+
Gr as Drawer,
|
|
127
|
+
Hr as DrawerClose,
|
|
128
|
+
Or as DrawerContent,
|
|
129
|
+
Ur as DrawerDescription,
|
|
130
|
+
Vr as DrawerFooter,
|
|
131
|
+
_r as DrawerHeader,
|
|
132
|
+
zr as DrawerOverlay,
|
|
133
|
+
Yr as DrawerPortal,
|
|
134
|
+
Wr as DrawerTitle,
|
|
135
|
+
jr as DrawerTrigger,
|
|
133
136
|
I as FavoriteButton,
|
|
134
137
|
v as IconButton,
|
|
135
|
-
|
|
136
|
-
|
|
138
|
+
Jr as Input,
|
|
139
|
+
Qr as Label,
|
|
140
|
+
N as List,
|
|
137
141
|
u as MerchantCard,
|
|
138
142
|
x as MerchantCardPrimitive,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
g as MerchantCardSkeleton,
|
|
144
|
+
Xo as MiniEntityNotFoundError,
|
|
145
|
+
Zo as MiniError,
|
|
146
|
+
$o as MiniNetworkError,
|
|
147
|
+
i as MinisContainer,
|
|
144
148
|
t as NAVIGATION_TYPES,
|
|
145
149
|
p as ProductCard,
|
|
146
150
|
c as ProductCardSkeleton,
|
|
147
151
|
m as ProductLink,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
152
|
+
Zr as Progress,
|
|
153
|
+
re as RadioGroup,
|
|
154
|
+
ee as RadioGroupItem,
|
|
155
|
+
te as ResizableHandle,
|
|
156
|
+
ae as ResizablePanel,
|
|
157
|
+
ie as ResizablePanelGroup,
|
|
158
|
+
pe as ScrollArea,
|
|
159
|
+
se as ScrollBar,
|
|
160
|
+
ne as Select,
|
|
161
|
+
ue as SelectContent,
|
|
162
|
+
xe as SelectGroup,
|
|
163
|
+
fe as SelectItem,
|
|
164
|
+
ce as SelectLabel,
|
|
165
|
+
de as SelectScrollDownButton,
|
|
166
|
+
ge as SelectScrollUpButton,
|
|
167
|
+
Se as SelectSeparator,
|
|
168
|
+
De as SelectTrigger,
|
|
169
|
+
Ae as SelectValue,
|
|
170
|
+
Pe as Separator,
|
|
171
|
+
he as Sheet,
|
|
172
|
+
Ie as SheetClose,
|
|
173
|
+
we as SheetContent,
|
|
174
|
+
ve as SheetDescription,
|
|
175
|
+
be as SheetFooter,
|
|
176
|
+
ke as SheetHeader,
|
|
177
|
+
Ee as SheetTitle,
|
|
178
|
+
Fe as SheetTrigger,
|
|
179
|
+
Ne as Skeleton,
|
|
176
180
|
k as ThumbhashImage,
|
|
177
|
-
|
|
181
|
+
Be as Toaster,
|
|
178
182
|
F as Touchable,
|
|
179
183
|
D as TransitionContainer,
|
|
180
184
|
C as TransitionLink,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
185
|
+
sr as badgeVariants,
|
|
186
|
+
rt as formatError,
|
|
187
|
+
ot as parseUrl,
|
|
188
|
+
ho as useAsyncStorage,
|
|
189
|
+
Ze as useBuyerAttributes,
|
|
190
|
+
Ro as useCloseMini,
|
|
191
|
+
Po as useCuratedProducts,
|
|
192
|
+
Je as useCurrentUser,
|
|
193
|
+
Mo as useDeeplink,
|
|
194
|
+
Wo as useErrorScreen,
|
|
195
|
+
zo as useErrorToast,
|
|
196
|
+
Ye as useFollowedShops,
|
|
197
|
+
je as useFollowedShopsActions,
|
|
198
|
+
Ko as useImagePicker,
|
|
199
|
+
bo as useImageUpload,
|
|
200
|
+
Lo as useNavigateWithTransition,
|
|
201
|
+
Qe as useOrders,
|
|
202
|
+
Ao as usePopularProducts,
|
|
203
|
+
lo as useProduct,
|
|
204
|
+
ao as useProductList,
|
|
205
|
+
ro as useProductListActions,
|
|
206
|
+
oo as useProductLists,
|
|
207
|
+
xo as useProductMedia,
|
|
208
|
+
co as useProductSearch,
|
|
209
|
+
no as useProductVariants,
|
|
210
|
+
so as useProducts,
|
|
211
|
+
ye as useRecentProducts,
|
|
212
|
+
He as useRecentShops,
|
|
213
|
+
So as useRecommendedProducts,
|
|
214
|
+
Vo as useRecommendedShops,
|
|
215
|
+
Ue as useSavedProducts,
|
|
216
|
+
_e as useSavedProductsActions,
|
|
217
|
+
wo as useSecureStorage,
|
|
218
|
+
qo as useShare,
|
|
219
|
+
Go as useShop,
|
|
220
|
+
Oo as useShopCartActions,
|
|
221
|
+
Eo as useShopNavigation
|
|
217
222
|
};
|
|
218
223
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useShopActions.js","sources":["../../src/internal/useShopActions.ts"],"sourcesContent":["import {ShopActions} from '
|
|
1
|
+
{"version":3,"file":"useShopActions.js","sources":["../../src/internal/useShopActions.ts"],"sourcesContent":["import {ShopActions} from '@shopify/shop-minis-platform/actions'\n\nexport function useShopActions(): ShopActions {\n return window.minisSDK\n}\n"],"names":["useShopActions"],"mappings":"AAEO,SAASA,IAA8B;AAC5C,SAAO,OAAO;AAChB;"}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { useState as b, useCallback as u, useMemo as v, useEffect as M } from "react";
|
|
2
2
|
import { MiniError as P, formatError as V } from "../utils/errors.js";
|
|
3
|
-
const A = (
|
|
4
|
-
const [
|
|
3
|
+
const A = (c, d, f) => {
|
|
4
|
+
const [n, l] = b({
|
|
5
5
|
data: null,
|
|
6
6
|
loading: !0,
|
|
7
7
|
error: null
|
|
8
8
|
}), h = f?.skip === !0, { validator: g, hook: t } = f, w = u(
|
|
9
|
-
(
|
|
9
|
+
(s) => {
|
|
10
10
|
try {
|
|
11
|
-
return g?.(
|
|
12
|
-
} catch (
|
|
13
|
-
return
|
|
11
|
+
return g?.(s), null;
|
|
12
|
+
} catch (e) {
|
|
13
|
+
return e instanceof Error ? e : new P({
|
|
14
14
|
hook: t,
|
|
15
15
|
message: "Validation failed"
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
[g, t]
|
|
20
|
-
), y = v(() =>
|
|
21
|
-
async (
|
|
22
|
-
setLoading:
|
|
20
|
+
), y = v(() => d, [JSON.stringify(d)]), a = u(
|
|
21
|
+
async (s, {
|
|
22
|
+
setLoading: e = !0,
|
|
23
23
|
setError: p = !0,
|
|
24
|
-
resetOnError:
|
|
24
|
+
resetOnError: E = !0,
|
|
25
25
|
throwOnError: O = !0
|
|
26
26
|
} = {}) => {
|
|
27
|
-
let
|
|
28
|
-
|
|
27
|
+
let m = null, i = null;
|
|
28
|
+
l((r) => ({
|
|
29
29
|
...r,
|
|
30
|
-
loading:
|
|
30
|
+
loading: e ? !0 : r.loading
|
|
31
31
|
}));
|
|
32
32
|
try {
|
|
33
|
-
const r = await
|
|
33
|
+
const r = await c({ ...y, ...s });
|
|
34
34
|
if (r.ok)
|
|
35
|
-
i = w(r.data.data),
|
|
35
|
+
i = w(r.data.data), l((S) => ({
|
|
36
36
|
...S,
|
|
37
37
|
data: r.data.data,
|
|
38
38
|
loading: !1,
|
|
@@ -41,17 +41,17 @@ const A = (d, c, f) => {
|
|
|
41
41
|
else
|
|
42
42
|
throw r.error;
|
|
43
43
|
} catch (r) {
|
|
44
|
-
|
|
44
|
+
m = V({ hook: t }, r);
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
data:
|
|
46
|
+
const o = i || m;
|
|
47
|
+
if (o && (p || E) && l((r) => ({
|
|
48
|
+
data: E ? null : r.data,
|
|
49
49
|
loading: !1,
|
|
50
|
-
error:
|
|
51
|
-
})),
|
|
52
|
-
throw
|
|
50
|
+
error: o
|
|
51
|
+
})), o && O)
|
|
52
|
+
throw o;
|
|
53
53
|
},
|
|
54
|
-
[
|
|
54
|
+
[c, y, t, w]
|
|
55
55
|
), k = u(async () => {
|
|
56
56
|
await a({ fetchPolicy: "network-only" }, {
|
|
57
57
|
setLoading: !1,
|
|
@@ -67,9 +67,9 @@ const A = (d, c, f) => {
|
|
|
67
67
|
}
|
|
68
68
|
);
|
|
69
69
|
}, [a, h]), {
|
|
70
|
-
data:
|
|
71
|
-
loading:
|
|
72
|
-
error:
|
|
70
|
+
data: n.data,
|
|
71
|
+
loading: n.loading,
|
|
72
|
+
error: n.error,
|
|
73
73
|
refetch: k
|
|
74
74
|
};
|
|
75
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useShopActionsDataFetching.js","sources":["../../src/internal/useShopActionsDataFetching.ts"],"sourcesContent":["import {useCallback, useEffect, useMemo, useState} from 'react'\n\nimport {ShopActionResult} from '@shopify/shop-minis-platform/actions'\n\nimport {DataHookFetchPolicy, DataHookReturnsBase} from '../types'\nimport {formatError, MiniError} from '../utils/errors'\n\nexport interface ShopActionsDataFetchingResult<R> extends DataHookReturnsBase {\n data: R | null\n}\n\nexport const useShopActionsDataFetching = <\n S = unknown,\n P extends {fetchPolicy?: DataHookFetchPolicy} = {\n fetchPolicy?: DataHookFetchPolicy\n },\n>(\n action: (params: P) => Promise<ShopActionResult<{data: S}>>,\n params: P,\n options: {\n skip?: boolean\n hook?: string\n validator?: (data: S) => void\n }\n): ShopActionsDataFetchingResult<S> => {\n const [state, setState] = useState<{\n data: S | null\n loading: boolean\n error: Error | null\n }>({\n data: null,\n loading: true,\n error: null,\n })\n\n const skip = options?.skip === true\n const {validator, hook} = options\n const runValidator = useCallback(\n (dataToValidate: S) => {\n try {\n validator?.(dataToValidate)\n return null\n } catch (err) {\n return
|
|
1
|
+
{"version":3,"file":"useShopActionsDataFetching.js","sources":["../../src/internal/useShopActionsDataFetching.ts"],"sourcesContent":["import {useCallback, useEffect, useMemo, useState} from 'react'\n\nimport {ShopActionResult} from '@shopify/shop-minis-platform/actions'\n\nimport {DataHookFetchPolicy, DataHookReturnsBase} from '../types'\nimport {formatError, MiniError} from '../utils/errors'\n\nexport interface ShopActionsDataFetchingResult<R> extends DataHookReturnsBase {\n data: R | null\n}\n\nexport const useShopActionsDataFetching = <\n S = unknown,\n P extends {fetchPolicy?: DataHookFetchPolicy} = {\n fetchPolicy?: DataHookFetchPolicy\n },\n>(\n action: (params: P) => Promise<ShopActionResult<{data: S}>>,\n params: P,\n options: {\n skip?: boolean\n hook?: string\n validator?: (data: S) => void\n }\n): ShopActionsDataFetchingResult<S> => {\n const [state, setState] = useState<{\n data: S | null\n loading: boolean\n error: Error | null\n }>({\n data: null,\n loading: true,\n error: null,\n })\n\n const skip = options?.skip === true\n const {validator, hook} = options\n const runValidator = useCallback(\n (dataToValidate: S) => {\n try {\n validator?.(dataToValidate)\n return null\n } catch (err) {\n if (err instanceof Error) return err\n\n return new MiniError({\n hook,\n message: 'Validation failed',\n })\n }\n },\n [validator, hook]\n )\n\n // Params object is recreated on every render, so we need to memoize it.\n // We don't know what's inside the params object, but we can stringify it.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const stableParams = useMemo(() => params, [JSON.stringify(params)])\n\n // There's a lot of complexity here because each type of fetch has different side effects if we are trying to\n // stay close to how Apollo client works. eg:\n // - Initial fetch: set loading, set error, set data, reset on error (don't throw)\n // - change params fetch: set loading, set error, set data, reset on error (don't throw)\n // - refetch fetch: don't set loading, set error, update data, leave data as is was on error (also throw)\n // - fetchMore fetch: don't set loading, don't set error, update data, leave data as is was on error (also throw)\n const fetch = useCallback(\n async (\n extraParams?: Partial<P>,\n {\n setLoading = true,\n setError = true,\n resetOnError = true,\n throwOnError = true,\n }: {\n setLoading?: boolean\n setError?: boolean\n resetOnError?: boolean\n throwOnError?: boolean\n } = {}\n ) => {\n let queryError: Error | null = null\n let validationError: Error | null = null\n\n setState(curState => ({\n ...curState,\n loading: setLoading ? true : curState.loading,\n }))\n\n try {\n const result = await action({...stableParams, ...extraParams})\n\n if (result.ok) {\n validationError = runValidator(result.data.data)\n\n setState(curState => ({\n ...curState,\n data: result.data.data,\n loading: false,\n error: validationError ?? null,\n }))\n } else {\n throw result.error\n }\n } catch (err) {\n queryError = formatError({hook}, err)\n }\n\n const error = validationError || queryError\n\n if (error && (setError || resetOnError)) {\n setState(curState => ({\n data: resetOnError ? null : curState.data,\n loading: false,\n error,\n }))\n }\n\n if (error && throwOnError) {\n throw error\n }\n },\n [action, stableParams, hook, runValidator]\n )\n\n const refetch = useCallback(async () => {\n await fetch({fetchPolicy: 'network-only'} as Partial<P>, {\n setLoading: false,\n resetOnError: false,\n throwOnError: true,\n })\n }, [fetch])\n\n useEffect(() => {\n if (skip) return\n\n fetch(\n {},\n {\n throwOnError: false,\n }\n )\n }, [fetch, skip])\n\n return {\n data: state.data,\n loading: state.loading,\n error: state.error,\n refetch,\n }\n}\n"],"names":["useShopActionsDataFetching","action","params","options","state","setState","useState","skip","validator","hook","runValidator","useCallback","dataToValidate","err","MiniError","stableParams","useMemo","fetch","extraParams","setLoading","setError","resetOnError","throwOnError","queryError","validationError","curState","result","formatError","error","refetch","useEffect"],"mappings":";;AAWO,MAAMA,IAA6B,CAMxCC,GACAC,GACAC,MAKqC;AACrC,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAIvB;AAAA,IACD,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,EAAA,CACR,GAEKC,IAAOJ,GAAS,SAAS,IACzB,EAAC,WAAAK,GAAW,MAAAC,EAAA,IAAQN,GACpBO,IAAeC;AAAA,IACnB,CAACC,MAAsB;AACjB,UAAA;AACF,eAAAJ,IAAYI,CAAc,GACnB;AAAA,eACAC,GAAK;AACR,eAAAA,aAAe,QAAcA,IAE1B,IAAIC,EAAU;AAAA,UACnB,MAAAL;AAAA,UACA,SAAS;AAAA,QAAA,CACV;AAAA,MAAA;AAAA,IAEL;AAAA,IACA,CAACD,GAAWC,CAAI;AAAA,EAClB,GAKMM,IAAeC,EAAQ,MAAMd,GAAQ,CAAC,KAAK,UAAUA,CAAM,CAAC,CAAC,GAQ7De,IAAQN;AAAA,IACZ,OACEO,GACA;AAAA,MACE,YAAAC,IAAa;AAAA,MACb,UAAAC,IAAW;AA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IACL,MAAMH,EAAM;AAAA,IACZ,SAASA,EAAM;AAAA,IACf,OAAOA,EAAM;AAAA,IACb,SAAAyB;AAAA,EACF;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useShopActionsPaginatedDataFetching.js","sources":["../../src/internal/useShopActionsPaginatedDataFetching.ts"],"sourcesContent":["import {useCallback, useEffect, useMemo, useState} from 'react'\n\nimport {\n
|
|
1
|
+
{"version":3,"file":"useShopActionsPaginatedDataFetching.js","sources":["../../src/internal/useShopActionsPaginatedDataFetching.ts"],"sourcesContent":["import {useCallback, useEffect, useMemo, useState} from 'react'\n\nimport {ShopAction, PaginationInfo} from '@shopify/shop-minis-platform/actions'\n\nimport {DataHookFetchPolicy, PaginatedDataHookReturnsBase} from '../types'\nimport {formatError, MiniError} from '../utils/errors'\n\nexport interface ShopActionsDataFetchingResult<S>\n extends PaginatedDataHookReturnsBase {\n data: S | null\n}\n\nexport const useShopActionsPaginatedDataFetching = <\n S = unknown,\n P extends {after?: string; fetchPolicy?: DataHookFetchPolicy} = {\n after?: undefined\n fetchPolicy?: DataHookFetchPolicy\n },\n>(\n action: ShopAction<P, {data: S; pageInfo: PaginationInfo}>,\n params: P,\n options: {\n skip?: boolean\n hook?: string\n validator?: (data: S) => void\n }\n): ShopActionsDataFetchingResult<S> => {\n const [state, setState] = useState<{\n data: S | null\n pageInfo: PaginationInfo\n loading: boolean\n error: Error | null\n }>({\n data: null,\n pageInfo: {hasNextPage: false, endCursor: null},\n loading: false,\n error: null,\n })\n\n const skip = options?.skip === true\n const {validator, hook} = options\n const runValidator = useCallback(\n (dataToValidate: S): Error | null => {\n try {\n validator?.(dataToValidate)\n return null\n } catch (err) {\n if (err instanceof Error) return err\n\n return new MiniError({\n hook,\n message: 'Validation failed',\n })\n }\n },\n [validator, hook]\n )\n\n // Params object is recreated on every render, so we need to memoize it.\n // We don't know what's inside the params object, but we can stringify it.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const stableParams = useMemo(() => params, [JSON.stringify(params)])\n\n // There's a lot of complexity here because each type of fetch has different side effects if we are trying to\n // stay close to how Apollo client works. eg:\n // - Initial fetch: set loading, set error, set data, reset on error (don't throw)\n // - change params fetch: set loading, set error, set data, reset on error (don't throw)\n // - refetch fetch: don't set loading, set error, update data, leave data as is was on error (also throw)\n // - fetchMore fetch: don't set loading, don't set error, update data, leave data as is was on error (also throw)\n const fetch = useCallback(\n async (\n extraParams?: Partial<P>,\n {\n setLoading = true,\n setError = true,\n resetOnError = true,\n throwOnError = true,\n appendData = false,\n }: {\n setLoading?: boolean\n setError?: boolean\n resetOnError?: boolean\n throwOnError?: boolean\n appendData?: boolean\n } = {}\n ) => {\n let queryError: Error | null = null\n let validationError: Error | null = null\n\n setState(curState => ({\n ...curState,\n loading: setLoading ? true : curState.loading,\n }))\n\n try {\n const result = await action({...stableParams, ...extraParams})\n\n if (result.ok) {\n validationError = runValidator(result.data.data)\n\n setState(curState => {\n let newData = result.data.data\n\n if (\n appendData &&\n curState.data &&\n Array.isArray(curState.data) &&\n Array.isArray(result.data.data)\n ) {\n newData = [...curState.data, ...result.data.data] as S\n }\n\n return {\n ...curState,\n data: newData,\n pageInfo: result.data.pageInfo,\n loading: false,\n error: validationError ?? null,\n }\n })\n } else {\n throw result.error\n }\n } catch (err) {\n console.log('caught 1', err)\n queryError = formatError({hook}, err)\n }\n\n const error = validationError || queryError\n\n if (error && (setError || resetOnError)) {\n setState(curState => ({\n data: resetOnError ? null : curState.data,\n pageInfo: resetOnError\n ? {hasNextPage: false, endCursor: null}\n : curState.pageInfo,\n loading: false,\n error,\n }))\n }\n\n if (error && throwOnError) {\n throw error\n }\n },\n [action, stableParams, hook, runValidator]\n )\n\n const refetch = useCallback(async () => {\n await fetch({fetchPolicy: 'network-only'} as Partial<P>, {\n setLoading: false,\n resetOnError: false,\n throwOnError: true,\n })\n }, [fetch])\n\n const fetchMore = useCallback(async () => {\n if (!state.pageInfo.hasNextPage || !state.pageInfo.endCursor) return\n\n await fetch({after: state.pageInfo.endCursor} as Partial<P>, {\n setLoading: false,\n setError: false,\n resetOnError: false,\n throwOnError: true,\n appendData: true,\n })\n }, [state.pageInfo.hasNextPage, state.pageInfo.endCursor, fetch])\n\n useEffect(() => {\n if (skip) return\n\n fetch(\n {},\n {\n throwOnError: false,\n }\n )\n }, [fetch, skip])\n\n return {\n data: state.data,\n loading: state.loading,\n error: state.error,\n hasNextPage: state.pageInfo.hasNextPage,\n refetch,\n fetchMore,\n }\n}\n"],"names":["useShopActionsPaginatedDataFetching","action","params","options","state","setState","useState","skip","validator","hook","runValidator","useCallback","dataToValidate","err","MiniError","stableParams","useMemo","fetch","extraParams","setLoading","setError","resetOnError","throwOnError","appendData","queryError","validationError","curState","result","newData","formatError","error","refetch","fetchMore","useEffect"],"mappings":";;AAYO,MAAMA,IAAsC,CAOjDC,GACAC,GACAC,MAKqC;AACrC,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAKvB;AAAA,IACD,MAAM;AAAA,IACN,UAAU,EAAC,aAAa,IAAO,WAAW,KAAI;AAAA,IAC9C,SAAS;AAAA,IACT,OAAO;AAAA,EAAA,CACR,GAEKC,IAAOJ,GAAS,SAAS,IACzB,EAAC,WAAAK,GAAW,MAAAC,EAAA,IAAQN,GACpBO,IAAeC;AAAA,IACnB,CAACC,MAAoC;AAC/B,UAAA;AACF,eAAAJ,IAAYI,CAAc,GACnB;AAAA,eACAC,GAAK;AACR,eAAAA,aAAe,QAAcA,IAE1B,IAAIC,EAAU;AAAA,UACnB,MAAAL;AAAA,UACA,SAAS;AAAA,QAAA,CACV;AAAA,MAAA;AAAA,IAEL;AAAA,IACA,CAACD,GAAWC,CAAI;AAAA,EAClB,GAKMM,IAAeC,EAAQ,MAAMd,GAAQ,CAAC,KAAK,UAAUA,CAAM,CAAC,CAAC,GAQ7De,IAAQN;AAAA,IACZ,OACEO,GACA;AAAA,MACE,YAAAC,IAAa;AAAA,MACb,UAAAC,IAAW;AAAA,MACX,cAAAC,I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