@shophost/react 2.0.36 → 2.0.38
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/admin-client.cjs +1 -1
- package/admin-client.js +1664 -1574
- package/package.json +3 -3
- package/react.css +1 -1
- package/storefront/components/pages/account-pages/account-home-page/index.d.ts +2 -0
- package/storefront/components/pages/account-pages/index.d.ts +2 -1
- package/storefront/components/pages/account-pages/orders-list-page/index.d.ts +1 -1
- package/storefront/components/pages/account-pages/reservations-list-page/index.d.ts +2 -0
- package/storefront/components/pages/account-pages/shared.d.ts +51 -0
- package/storefront/exports.d.ts +1 -1
- package/storefront/providers/organization-provider.d.ts +1 -0
- package/storefront/providers/shophost-provider.d.ts +5 -1
- package/storefront.cjs +1 -1
- package/storefront.mjs +70 -69
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const OrdersListPage: () => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
declare const OrdersListPage: () => import("react/jsx-runtime").JSX.Element | null;
|
|
2
2
|
export { OrdersListPage };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Order, Reservation } from '../../../../../../client/src/index.ts';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
type Tone = "danger" | "info" | "neutral" | "success" | "warning";
|
|
5
|
+
declare const formatAccountDate: (value: Date | string | null | undefined, fallback?: string, pattern?: string) => string;
|
|
6
|
+
declare const formatOrderStatus: (status?: Order["status"]) => "Accepted" | "Preparing" | "On the way" | "Completed" | "Cancelled" | "Pending";
|
|
7
|
+
declare const getOrderTone: (status?: Order["status"]) => Tone;
|
|
8
|
+
declare const getReservationStatus: (reservation: Reservation) => "Cancelled" | "Pending" | "Confirmed";
|
|
9
|
+
declare const getReservationTone: (reservation: Reservation) => Tone;
|
|
10
|
+
declare const getInitials: (name?: string | null) => string;
|
|
11
|
+
interface AccountPageShellProps {
|
|
12
|
+
actions?: React.ReactNode;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
description?: React.ReactNode;
|
|
15
|
+
eyebrow?: React.ReactNode;
|
|
16
|
+
title: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const AccountPageShell: ({ actions, children, description, eyebrow, title, }: AccountPageShellProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
interface AccountSectionCardProps {
|
|
20
|
+
action?: React.ReactNode;
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
description?: React.ReactNode;
|
|
24
|
+
title: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
declare const AccountSectionCard: ({ action, children, className, description, title, }: AccountSectionCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
interface AccountStatusPillProps {
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
className?: string;
|
|
30
|
+
tone?: Tone;
|
|
31
|
+
}
|
|
32
|
+
declare const AccountStatusPill: ({ children, className, tone, }: AccountStatusPillProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
interface AccountEmptyStateProps {
|
|
34
|
+
actionHref?: string;
|
|
35
|
+
actionLabel?: string;
|
|
36
|
+
description: string;
|
|
37
|
+
icon: LucideIcon;
|
|
38
|
+
title: string;
|
|
39
|
+
}
|
|
40
|
+
declare const AccountEmptyState: ({ actionHref, actionLabel, description, icon: Icon, title, }: AccountEmptyStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
interface AccountPageSkeletonProps {
|
|
42
|
+
description?: string;
|
|
43
|
+
title: string;
|
|
44
|
+
}
|
|
45
|
+
declare const AccountPageSkeleton: ({ description, title, }: AccountPageSkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
interface AccountInlineLinkProps {
|
|
47
|
+
href: string;
|
|
48
|
+
label: string;
|
|
49
|
+
}
|
|
50
|
+
declare const AccountInlineLink: ({ href, label }: AccountInlineLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export { AccountEmptyState, AccountInlineLink, AccountPageShell, AccountPageSkeleton, AccountSectionCard, AccountStatusPill, formatAccountDate, formatOrderStatus, getInitials, getOrderTone, getReservationStatus, getReservationTone, };
|
package/storefront/exports.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { CartDrawer } from './components/cart/cart-drawer';
|
|
|
6
6
|
export { CartDrawerItem } from './components/cart/cart-drawer-item';
|
|
7
7
|
export { CustomerDetailsPage } from './components/pages/checkout-pages/customer-details-page';
|
|
8
8
|
export { ShippingAndPaymentPage } from './components/pages/checkout-pages/shipping-and-payment-page';
|
|
9
|
-
export { AccountPages } from './components/pages/account-pages';
|
|
9
|
+
export { AccountHomePage, AccountPages, } from './components/pages/account-pages';
|
|
10
10
|
export { CheckoutPages } from './components/pages/checkout-pages';
|
|
11
11
|
export { ModifiersDialog } from './components/modifiers/modifiers-dialog';
|
|
12
12
|
export * from './components';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Locale } from '../../../../client/src/index.ts';
|
|
1
|
+
import { Locale, Organization } from '../../../../client/src/index.ts';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
export interface ShophostProviderProps {
|
|
4
4
|
/**
|
|
@@ -13,6 +13,10 @@ export interface ShophostProviderProps {
|
|
|
13
13
|
* Locale for translations
|
|
14
14
|
*/
|
|
15
15
|
locale?: Locale;
|
|
16
|
+
/**
|
|
17
|
+
* Organization data available during initial render
|
|
18
|
+
*/
|
|
19
|
+
initialOrganization?: Organization | null;
|
|
16
20
|
/**
|
|
17
21
|
* Custom modifiers modal component
|
|
18
22
|
*/
|
package/storefront.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./admin-client.cjs");exports.APIProvider=o.APIProvider,exports.AccountPages=o.AccountPages,exports.Badge=o.Badge,exports.Button=o.Button,exports.CartDrawer=o.CartDrawer,exports.CartDrawerItem=o.CartDrawerItem,exports.CartItems=o.CartItems,exports.CartPanel=o.CartPanel,exports.CartProvider=o.CartProvider,exports.CheckoutPages=o.CheckoutPages,exports.Command=o.Command,exports.CommandBar=o.CommandBar,exports.CommandBarBar=o.CommandBarBar,exports.CommandBarCommand=o.CommandBarCommand,exports.CommandBarSeperator=o.CommandBarSeperator,exports.CommandBarValue=o.CommandBarValue,exports.CommandDialog=o.CommandDialog,exports.CommandEmpty=o.CommandEmpty,exports.CommandGroup=o.CommandGroup,exports.CommandInput=o.CommandInput,exports.CommandItem=o.CommandItem,exports.CommandList=o.CommandList,exports.CommandSeparator=o.CommandSeparator,exports.CommandShortcut=o.CommandShortcut,exports.CountryInput=o.CountryInput,exports.CustomerDetailsPage=o.CustomerDetailsPage,exports.Dialog=o.Dialog,exports.DialogClose=o.DialogClose,exports.DialogContent=o.DialogContent,exports.DialogDescription=o.DialogDescription,exports.DialogFooter=o.DialogFooter,exports.DialogHeader=o.DialogHeader,exports.DialogTitle=o.DialogTitle,exports.DialogTrigger=o.DialogTrigger,exports.Divider=o.Divider,exports.EmailInput=o.EmailInput,exports.ImageUploadInput=o.ImageUploadInput,exports.Input=o.Input,exports.InputGroup=o.InputGroup,exports.Label=o.Label,exports.LocationInput=o.LocationInput,exports.ModifierContainer=o.ModifierContainer,exports.ModifiersDialog=o.ModifiersDialog,exports.ModifiersGroup=o.ModifiersGroup,exports.ModifiersModal=o.ModifiersModal,exports.ModifiersOption=o.ModifiersOption,exports.PhoneNumberInput=o.PhoneNumberInput,exports.Popover=o.Popover,exports.PopoverAnchor=o.PopoverAnchor,exports.PopoverClose=o.PopoverClose,exports.PopoverContent=o.PopoverContent,exports.PopoverTrigger=o.PopoverTrigger,exports.QuantityControl=o.QuantityControl,exports.RadioCardGroup=o.RadioCardGroup,exports.RadioCardGroupIndicator=o.RadioCardGroupIndicator,exports.RadioCardItem=o.RadioCardItem,exports.SelectInput=o.SelectInput,exports.ShippingAndPaymentPage=o.ShippingAndPaymentPage,exports.ShophostProvider=o.ShophostProvider,exports.SliderOver=o.SliderOver,exports.Switch=o.Switch,exports.TextInput=o.TextInput,exports.TimeInput=o.TimeInput,exports.badgeVariants=o.badgeVariants,exports.buttonVariants=o.buttonVariants,exports.calculateCartTotal=o.calculateCartTotal,exports.findCartItem=o.findCartItem,exports.formatPrice=o.formatPrice,exports.getFieldError=o.getFieldError,exports.getFormattedModifiers=o.getFormattedModifiers,exports.mockProducts=o.mockProducts,exports.productRequiresModifiers=o.productRequiresModifiers,exports.useAPI=o.useAPI,exports.useCart=o.useCart,exports.useCartContext=o.useCartContext,exports.useLocalization=o.useLocalization,exports.useModifierSelection=o.useModifierSelection,exports.useModifiers=o.useModifiers,exports.useMultipleProductDetails=o.useMultipleProductDetails,exports.useOrganization=o.useOrganization,exports.useProductDetails=o.useProductDetails;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./admin-client.cjs");exports.APIProvider=o.APIProvider,exports.AccountHomePage=o.AccountHomePage,exports.AccountPages=o.AccountPages,exports.Badge=o.Badge,exports.Button=o.Button,exports.CartDrawer=o.CartDrawer,exports.CartDrawerItem=o.CartDrawerItem,exports.CartItems=o.CartItems,exports.CartPanel=o.CartPanel,exports.CartProvider=o.CartProvider,exports.CheckoutPages=o.CheckoutPages,exports.Command=o.Command,exports.CommandBar=o.CommandBar,exports.CommandBarBar=o.CommandBarBar,exports.CommandBarCommand=o.CommandBarCommand,exports.CommandBarSeperator=o.CommandBarSeperator,exports.CommandBarValue=o.CommandBarValue,exports.CommandDialog=o.CommandDialog,exports.CommandEmpty=o.CommandEmpty,exports.CommandGroup=o.CommandGroup,exports.CommandInput=o.CommandInput,exports.CommandItem=o.CommandItem,exports.CommandList=o.CommandList,exports.CommandSeparator=o.CommandSeparator,exports.CommandShortcut=o.CommandShortcut,exports.CountryInput=o.CountryInput,exports.CustomerDetailsPage=o.CustomerDetailsPage,exports.Dialog=o.Dialog,exports.DialogClose=o.DialogClose,exports.DialogContent=o.DialogContent,exports.DialogDescription=o.DialogDescription,exports.DialogFooter=o.DialogFooter,exports.DialogHeader=o.DialogHeader,exports.DialogTitle=o.DialogTitle,exports.DialogTrigger=o.DialogTrigger,exports.Divider=o.Divider,exports.EmailInput=o.EmailInput,exports.ImageUploadInput=o.ImageUploadInput,exports.Input=o.Input,exports.InputGroup=o.InputGroup,exports.Label=o.Label,exports.LocationInput=o.LocationInput,exports.ModifierContainer=o.ModifierContainer,exports.ModifiersDialog=o.ModifiersDialog,exports.ModifiersGroup=o.ModifiersGroup,exports.ModifiersModal=o.ModifiersModal,exports.ModifiersOption=o.ModifiersOption,exports.PhoneNumberInput=o.PhoneNumberInput,exports.Popover=o.Popover,exports.PopoverAnchor=o.PopoverAnchor,exports.PopoverClose=o.PopoverClose,exports.PopoverContent=o.PopoverContent,exports.PopoverTrigger=o.PopoverTrigger,exports.QuantityControl=o.QuantityControl,exports.RadioCardGroup=o.RadioCardGroup,exports.RadioCardGroupIndicator=o.RadioCardGroupIndicator,exports.RadioCardItem=o.RadioCardItem,exports.SelectInput=o.SelectInput,exports.ShippingAndPaymentPage=o.ShippingAndPaymentPage,exports.ShophostProvider=o.ShophostProvider,exports.SliderOver=o.SliderOver,exports.Switch=o.Switch,exports.TextInput=o.TextInput,exports.TimeInput=o.TimeInput,exports.badgeVariants=o.badgeVariants,exports.buttonVariants=o.buttonVariants,exports.calculateCartTotal=o.calculateCartTotal,exports.findCartItem=o.findCartItem,exports.formatPrice=o.formatPrice,exports.getFieldError=o.getFieldError,exports.getFormattedModifiers=o.getFormattedModifiers,exports.mockProducts=o.mockProducts,exports.productRequiresModifiers=o.productRequiresModifiers,exports.useAPI=o.useAPI,exports.useCart=o.useCart,exports.useCartContext=o.useCartContext,exports.useLocalization=o.useLocalization,exports.useModifierSelection=o.useModifierSelection,exports.useModifiers=o.useModifiers,exports.useMultipleProductDetails=o.useMultipleProductDetails,exports.useOrganization=o.useOrganization,exports.useProductDetails=o.useProductDetails;
|
package/storefront.mjs
CHANGED
|
@@ -1,84 +1,85 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { H as o, l as e, m as r, av as t, K as i, i as n, j as d, f as m, h as u, C, n as l, a0 as p, an as g, ao as c, ap as P, aq as I, ar as D, a1 as f, a4 as v, a5 as M, a2 as h, a6 as S, a3 as B, a8 as T, a7 as A, T as G, k as b, a9 as w, aa as x, ab as y, ac as L, ad as R, ae as k, af as F, ag as O, ax as V, R as q, X as z, N as E, $ as H, Z as j, O as N, o as Q, M as U, p as J, r as K, q as W, P as X, ah as Y, ai as Z, aj as _, ak as $, al as aa, Q as sa, as as oa, at as ea, au as ra, U as ta, S as ia, G as na, am as da, V as ma, W as ua, Y as Ca, aw as la, L as pa, x as ga, B as ca, y as Pa, _ as Ia, z as Da, F as fa, D as va, I as Ma, d as ha, u as Sa, w as Ba, v as Ta, e as Aa, t as Ga, J as ba, s as wa } from "./admin-client.js";
|
|
3
3
|
export {
|
|
4
4
|
o as APIProvider,
|
|
5
|
-
e as
|
|
6
|
-
r as
|
|
7
|
-
t as
|
|
8
|
-
i as
|
|
9
|
-
n as
|
|
10
|
-
d as
|
|
11
|
-
m as
|
|
12
|
-
u as
|
|
13
|
-
C as
|
|
14
|
-
l as
|
|
15
|
-
p as
|
|
16
|
-
g as
|
|
5
|
+
e as AccountHomePage,
|
|
6
|
+
r as AccountPages,
|
|
7
|
+
t as Badge,
|
|
8
|
+
i as Button,
|
|
9
|
+
n as CartDrawer,
|
|
10
|
+
d as CartDrawerItem,
|
|
11
|
+
m as CartItems,
|
|
12
|
+
u as CartPanel,
|
|
13
|
+
C as CartProvider,
|
|
14
|
+
l as CheckoutPages,
|
|
15
|
+
p as Command,
|
|
16
|
+
g as CommandBar,
|
|
17
|
+
c as CommandBarBar,
|
|
17
18
|
P as CommandBarCommand,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
I as CommandBarSeperator,
|
|
20
|
+
D as CommandBarValue,
|
|
21
|
+
f as CommandDialog,
|
|
22
|
+
v as CommandEmpty,
|
|
23
|
+
M as CommandGroup,
|
|
24
|
+
h as CommandInput,
|
|
25
|
+
S as CommandItem,
|
|
26
|
+
B as CommandList,
|
|
27
|
+
T as CommandSeparator,
|
|
28
|
+
A as CommandShortcut,
|
|
28
29
|
G as CountryInput,
|
|
29
30
|
b as CustomerDetailsPage,
|
|
30
31
|
w as Dialog,
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
x as DialogClose,
|
|
33
|
+
y as DialogContent,
|
|
33
34
|
L as DialogDescription,
|
|
34
35
|
R as DialogFooter,
|
|
35
36
|
k as DialogHeader,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
F as DialogTitle,
|
|
38
|
+
O as DialogTrigger,
|
|
39
|
+
V as Divider,
|
|
40
|
+
q as EmailInput,
|
|
41
|
+
z as ImageUploadInput,
|
|
42
|
+
E as Input,
|
|
43
|
+
H as InputGroup,
|
|
43
44
|
j as Label,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
45
|
+
N as LocationInput,
|
|
46
|
+
Q as ModifierContainer,
|
|
47
|
+
U as ModifiersDialog,
|
|
48
|
+
J as ModifiersGroup,
|
|
49
|
+
K as ModifiersModal,
|
|
50
|
+
W as ModifiersOption,
|
|
51
|
+
X as PhoneNumberInput,
|
|
52
|
+
Y as Popover,
|
|
53
|
+
Z as PopoverAnchor,
|
|
54
|
+
_ as PopoverClose,
|
|
55
|
+
$ as PopoverContent,
|
|
56
|
+
aa as PopoverTrigger,
|
|
57
|
+
sa as QuantityControl,
|
|
58
|
+
oa as RadioCardGroup,
|
|
59
|
+
ea as RadioCardGroupIndicator,
|
|
60
|
+
ra as RadioCardItem,
|
|
61
|
+
ta as SelectInput,
|
|
62
|
+
ia as ShippingAndPaymentPage,
|
|
63
|
+
na as ShophostProvider,
|
|
64
|
+
da as SliderOver,
|
|
65
|
+
ma as Switch,
|
|
66
|
+
ua as TextInput,
|
|
67
|
+
Ca as TimeInput,
|
|
68
|
+
la as badgeVariants,
|
|
69
|
+
pa as buttonVariants,
|
|
70
|
+
ga as calculateCartTotal,
|
|
71
|
+
ca as findCartItem,
|
|
71
72
|
Pa as formatPrice,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
73
|
+
Ia as getFieldError,
|
|
74
|
+
Da as getFormattedModifiers,
|
|
75
|
+
fa as mockProducts,
|
|
76
|
+
va as productRequiresModifiers,
|
|
77
|
+
Ma as useAPI,
|
|
78
|
+
ha as useCart,
|
|
79
|
+
Sa as useCartContext,
|
|
80
|
+
Ba as useLocalization,
|
|
81
|
+
Ta as useModifierSelection,
|
|
82
|
+
Aa as useModifiers,
|
|
82
83
|
Ga as useMultipleProductDetails,
|
|
83
84
|
ba as useOrganization,
|
|
84
85
|
wa as useProductDetails
|