@tabres/react 1.0.19 → 1.0.22
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/PublicMenu/OrderDrawer/OrderDrawerDetails.d.ts +2 -2
- package/dist/components/PublicMenu/ProductVariants/ProductVariants.d.ts +1 -1
- package/dist/constants/constants/env.d.ts +1 -1
- package/dist/constants/env.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/models/constants/env.d.ts +1 -1
- package/dist/models/index.esm.js.map +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/models/modules/addon/models.d.ts +7 -0
- package/dist/models/modules/customer/services.d.ts +3 -1
- package/dist/models/modules/order/constants.d.ts +2 -5
- package/dist/models/modules/order/hooks.d.ts +3 -7
- package/dist/models/modules/order/models.d.ts +55 -18
- package/dist/models/modules/order/services.d.ts +2 -1
- package/dist/models/modules/order/utils/item-price.d.ts +3 -0
- package/dist/models/modules/order/utils.d.ts +3 -19
- package/dist/models/modules/product/models.d.ts +13 -1
- package/dist/models/modules/product/utils/listing-price.d.ts +9 -0
- package/dist/models/modules/product/utils/order-price.d.ts +11 -0
- package/dist/models/modules/product/utils.d.ts +2 -42
- package/dist/models/services/api/client.d.ts +3 -0
- package/dist/modules/addon/models.d.ts +7 -0
- package/dist/modules/addon/utils.d.ts +0 -9
- package/dist/modules/customer/services.d.ts +3 -1
- package/dist/modules/order/constants.d.ts +2 -5
- package/dist/modules/order/hooks.d.ts +3 -7
- package/dist/modules/order/hooks.price.test.d.ts +1 -0
- package/dist/modules/order/models.d.ts +55 -18
- package/dist/modules/order/preview.d.ts +8 -0
- package/dist/modules/order/preview.test.d.ts +1 -0
- package/dist/modules/order/services.d.ts +2 -1
- package/dist/modules/order/utils/item-price.d.ts +3 -0
- package/dist/modules/order/utils/item-price.test.d.ts +1 -0
- package/dist/modules/order/utils.d.ts +3 -19
- package/dist/modules/product/models.d.ts +13 -1
- package/dist/modules/product/utils/listing-price.d.ts +9 -0
- package/dist/modules/product/utils/listing-price.test.d.ts +1 -0
- package/dist/modules/product/utils/order-price.d.ts +11 -0
- package/dist/modules/product/utils/order-price.test.d.ts +1 -0
- package/dist/modules/product/utils.d.ts +2 -42
- package/dist/services/api/client.d.ts +3 -0
- package/dist/styles/ui.css +1 -1
- package/dist/styles/ui.css.map +1 -1
- package/dist/utils/components/PublicMenu/OrderMethods/OrderMethods.types.d.ts +9 -0
- package/dist/utils/components/PublicMenu/ProductsGridItem/ProductsGridItem.types.d.ts +13 -0
- package/dist/utils/constants/env.d.ts +1 -0
- package/dist/utils/hooks/translation.d.ts +5 -0
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/models/index.d.ts +16 -0
- package/dist/utils/modules/addon/models.d.ts +7 -0
- package/dist/utils/modules/addon/utils.d.ts +0 -9
- package/dist/utils/modules/branch/hooks.d.ts +16 -0
- package/dist/utils/modules/branch/utils.d.ts +7 -0
- package/dist/utils/modules/business/constants.d.ts +2 -0
- package/dist/utils/modules/business/hooks.d.ts +15 -0
- package/dist/utils/modules/common/services.d.ts +1 -0
- package/dist/utils/modules/customer/hooks.d.ts +5 -0
- package/dist/utils/modules/customer/services.d.ts +11 -0
- package/dist/utils/modules/menu/hooks.d.ts +1 -0
- package/dist/utils/modules/menu/index.d.ts +3 -0
- package/dist/utils/modules/order/constants.d.ts +2 -5
- package/dist/utils/modules/order/hooks.d.ts +14 -0
- package/dist/utils/modules/order/index.d.ts +5 -0
- package/dist/utils/modules/order/models.d.ts +55 -18
- package/dist/utils/modules/order/services.d.ts +5 -0
- package/dist/utils/modules/order/utils/item-price.d.ts +3 -0
- package/dist/utils/modules/order/utils.d.ts +3 -19
- package/dist/utils/modules/product/hooks.d.ts +9 -0
- package/dist/utils/modules/product/index.d.ts +3 -0
- package/dist/utils/modules/product/models.d.ts +13 -1
- package/dist/utils/modules/product/utils/listing-price.d.ts +9 -0
- package/dist/utils/modules/product/utils/order-price.d.ts +11 -0
- package/dist/utils/modules/product/utils.d.ts +3 -43
- package/dist/utils/modules/store/hooks.d.ts +6 -0
- package/dist/utils/modules/table/hooks.d.ts +4 -0
- package/dist/utils/modules/view/hooks.d.ts +2 -0
- package/dist/utils/modules/view/index.d.ts +4 -0
- package/dist/utils/modules/view/models.d.ts +7 -0
- package/dist/utils/modules/view/services.d.ts +2 -0
- package/dist/utils/services/api/client.d.ts +3 -0
- package/dist/utils/services/translation/index.d.ts +3 -0
- package/dist/utils/services/translation/locales/az/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/az/branch.d.ts +14 -0
- package/dist/utils/services/translation/locales/az/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/az/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/az/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/az/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/az/index.d.ts +149 -0
- package/dist/utils/services/translation/locales/az/order.d.ts +47 -0
- package/dist/utils/services/translation/locales/az/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/en/auth.d.ts +2 -0
- package/dist/utils/services/translation/locales/en/branch.d.ts +10 -0
- package/dist/utils/services/translation/locales/en/common.d.ts +2 -0
- package/dist/utils/services/translation/locales/en/customer.d.ts +2 -0
- package/dist/utils/services/translation/locales/en/error.d.ts +17 -0
- package/dist/utils/services/translation/locales/en/events.d.ts +2 -0
- package/dist/utils/services/translation/locales/en/index.d.ts +34 -0
- package/dist/utils/services/translation/locales/en/order.d.ts +2 -0
- package/dist/utils/services/translation/locales/en/pricing.d.ts +2 -0
- package/dist/utils/services/translation/locales/et/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/et/branch.d.ts +13 -0
- package/dist/utils/services/translation/locales/et/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/et/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/et/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/et/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/et/index.d.ts +147 -0
- package/dist/utils/services/translation/locales/et/order.d.ts +46 -0
- package/dist/utils/services/translation/locales/et/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/hr/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/hr/branch.d.ts +14 -0
- package/dist/utils/services/translation/locales/hr/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/hr/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/hr/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/hr/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/hr/index.d.ts +149 -0
- package/dist/utils/services/translation/locales/hr/order.d.ts +47 -0
- package/dist/utils/services/translation/locales/hr/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/index.d.ts +1212 -0
- package/dist/utils/services/translation/locales/nl/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/nl/branch.d.ts +13 -0
- package/dist/utils/services/translation/locales/nl/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/nl/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/nl/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/nl/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/nl/index.d.ts +147 -0
- package/dist/utils/services/translation/locales/nl/order.d.ts +46 -0
- package/dist/utils/services/translation/locales/nl/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/pl/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/pl/branch.d.ts +14 -0
- package/dist/utils/services/translation/locales/pl/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/pl/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/pl/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/pl/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/pl/index.d.ts +149 -0
- package/dist/utils/services/translation/locales/pl/order.d.ts +47 -0
- package/dist/utils/services/translation/locales/pl/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/pt/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/pt/branch.d.ts +14 -0
- package/dist/utils/services/translation/locales/pt/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/pt/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/pt/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/pt/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/pt/index.d.ts +149 -0
- package/dist/utils/services/translation/locales/pt/order.d.ts +47 -0
- package/dist/utils/services/translation/locales/pt/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/ru/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/ru/branch.d.ts +13 -0
- package/dist/utils/services/translation/locales/ru/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/ru/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/ru/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/ru/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/ru/index.d.ts +147 -0
- package/dist/utils/services/translation/locales/ru/order.d.ts +46 -0
- package/dist/utils/services/translation/locales/ru/pricing.d.ts +35 -0
- package/dist/utils/services/translation/locales/tr/auth.d.ts +7 -0
- package/dist/utils/services/translation/locales/tr/branch.d.ts +13 -0
- package/dist/utils/services/translation/locales/tr/common.d.ts +6 -0
- package/dist/utils/services/translation/locales/tr/customer.d.ts +17 -0
- package/dist/utils/services/translation/locales/tr/error.d.ts +20 -0
- package/dist/utils/services/translation/locales/tr/events.d.ts +8 -0
- package/dist/utils/services/translation/locales/tr/index.d.ts +147 -0
- package/dist/utils/services/translation/locales/tr/order.d.ts +46 -0
- package/dist/utils/services/translation/locales/tr/pricing.d.ts +35 -0
- package/dist/utils/store/index.d.ts +7 -0
- package/dist/utils/store/order.d.ts +42 -0
- package/package.json +1 -1
- package/dist/components/Pricing/Pricing.d.ts +0 -11
- package/dist/components/Pricing/PricingPlanAmount.d.ts +0 -9
- package/dist/components/Pricing/index.d.ts +0 -1
- package/dist/models/modules/addon/utils.d.ts +0 -14
- package/dist/models/services/api/index.d.ts +0 -5
- package/dist/services/api/index.d.ts +0 -5
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
error: {
|
|
3
|
+
SOMETHING_WRONG: string;
|
|
4
|
+
FIELD_REQUIRED: string;
|
|
5
|
+
"Unsupported country code": string;
|
|
6
|
+
"Invalid OTP": string;
|
|
7
|
+
INVALID_OTP: string;
|
|
8
|
+
OTP_RATE_LIMIT_EXCEEDED: string;
|
|
9
|
+
"Invalid Email Address": string;
|
|
10
|
+
FEATURE_NOT_AVAILABLE_FOR_SEGMENT: string;
|
|
11
|
+
ORDER_TYPE_DISABLED_FOR_BUSINESS: string;
|
|
12
|
+
ORDER_TYPE_DISABLED_AT_THIS_TIME: string;
|
|
13
|
+
COUNTRY_REQUIRED: string;
|
|
14
|
+
CITY_REQUIRED: string;
|
|
15
|
+
STREET_REQUIRED: string;
|
|
16
|
+
STREET_NUMBER_REQUIRED: string;
|
|
17
|
+
OUT_OF_DELIVERY_RANGE: string;
|
|
18
|
+
NO_ORDER_TYPE: string;
|
|
19
|
+
INVALID_ADDRESS: string;
|
|
20
|
+
};
|
|
21
|
+
common: {
|
|
22
|
+
Save: string;
|
|
23
|
+
Cancel: string;
|
|
24
|
+
Continue: string;
|
|
25
|
+
};
|
|
26
|
+
order: {
|
|
27
|
+
"View order": string;
|
|
28
|
+
"Remove from order": string;
|
|
29
|
+
"Update order": string;
|
|
30
|
+
"Add to order": string;
|
|
31
|
+
Add: string;
|
|
32
|
+
"Your order": string;
|
|
33
|
+
"Empty order": string;
|
|
34
|
+
"You don't have any items in your order": string;
|
|
35
|
+
"Add items": string;
|
|
36
|
+
Subtotal: string;
|
|
37
|
+
Events: string;
|
|
38
|
+
"Product choices": string;
|
|
39
|
+
"In order": string;
|
|
40
|
+
"Not available": string;
|
|
41
|
+
"Specify any allergies, special requests, or ingredients you want to add or remove": string;
|
|
42
|
+
"Thank you! We've received your order and it will be delivered shortly.": string;
|
|
43
|
+
"Go to checkout": string;
|
|
44
|
+
"Add an order note": string;
|
|
45
|
+
"Your Order is Completed!": string;
|
|
46
|
+
Delivery: string;
|
|
47
|
+
"Dine in": string;
|
|
48
|
+
Pickup: string;
|
|
49
|
+
Cash: string;
|
|
50
|
+
"POS Terminal": string;
|
|
51
|
+
"Order summary": string;
|
|
52
|
+
Items: string;
|
|
53
|
+
Tax: string;
|
|
54
|
+
Total: string;
|
|
55
|
+
"Special instructions, allergies, etc.": string;
|
|
56
|
+
"Place order": string;
|
|
57
|
+
Continue: string;
|
|
58
|
+
"Track order": string;
|
|
59
|
+
"Minimum order amount for delivery is {{amount}}": string;
|
|
60
|
+
"This field is required": string;
|
|
61
|
+
"Please select a table": string;
|
|
62
|
+
"Please enter an address": string;
|
|
63
|
+
"Please choose product": string;
|
|
64
|
+
Table: string;
|
|
65
|
+
"Select Table": string;
|
|
66
|
+
Card: string;
|
|
67
|
+
"Closed Now": string;
|
|
68
|
+
"Delivery Fee": string;
|
|
69
|
+
"Play video": string;
|
|
70
|
+
};
|
|
71
|
+
customer: {
|
|
72
|
+
"Unknown address": string;
|
|
73
|
+
"No address available": string;
|
|
74
|
+
"Update Delivery Address": string;
|
|
75
|
+
Country: string;
|
|
76
|
+
City: string;
|
|
77
|
+
"Baker Street": string;
|
|
78
|
+
Address: string;
|
|
79
|
+
"House number": string;
|
|
80
|
+
"Additional number": string;
|
|
81
|
+
"Example: Door code is 555": string;
|
|
82
|
+
"Delivery Instructions": string;
|
|
83
|
+
Floor: string;
|
|
84
|
+
"Enter address": string;
|
|
85
|
+
"House No.": string;
|
|
86
|
+
};
|
|
87
|
+
auth: {
|
|
88
|
+
"Create an account or log in": string;
|
|
89
|
+
"Phone number": string;
|
|
90
|
+
"I don't have an email": string;
|
|
91
|
+
"We sent a confirmation code to {{address}}": string;
|
|
92
|
+
};
|
|
93
|
+
events: {
|
|
94
|
+
Events: string;
|
|
95
|
+
"Scrolled to Category": string;
|
|
96
|
+
"Category Selected": string;
|
|
97
|
+
"Product Details": string;
|
|
98
|
+
"Product Added to Order": string;
|
|
99
|
+
};
|
|
100
|
+
pricing: {
|
|
101
|
+
"Get Started": string;
|
|
102
|
+
"Choose Plan": string;
|
|
103
|
+
"Smart QR Menu": string;
|
|
104
|
+
"Link-in-bio": string;
|
|
105
|
+
"Menu Analytics": string;
|
|
106
|
+
"Unlimited Users": string;
|
|
107
|
+
"Unlimited Products": string;
|
|
108
|
+
"Unlimited Categories": string;
|
|
109
|
+
"Product variants": string;
|
|
110
|
+
"Product options": string;
|
|
111
|
+
"Sales reports": string;
|
|
112
|
+
"24/7 Support": string;
|
|
113
|
+
"Multiple Branches": string;
|
|
114
|
+
"Table Management": string;
|
|
115
|
+
"Order Management": string;
|
|
116
|
+
"Mobile App for Owners & Staff": string;
|
|
117
|
+
"Point of Sale (POS)": string;
|
|
118
|
+
"Delivery Management": string;
|
|
119
|
+
"Third-Party Delivery Integrations": string;
|
|
120
|
+
"TabresPay with Mobile": string;
|
|
121
|
+
"Event management": string;
|
|
122
|
+
"/ month": string;
|
|
123
|
+
monthly: string;
|
|
124
|
+
annually: string;
|
|
125
|
+
"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!": string;
|
|
126
|
+
"Flexible Plans for Every Business - Simple Pricing, More Value!": string;
|
|
127
|
+
"Unlimited Languages": string;
|
|
128
|
+
"30-day money-back guarantee": string;
|
|
129
|
+
"Limited Time Only": string;
|
|
130
|
+
"/ lifetime": string;
|
|
131
|
+
"Try for free": string;
|
|
132
|
+
"No credit card needed": string;
|
|
133
|
+
};
|
|
134
|
+
branch: {
|
|
135
|
+
"WEEKDAY-0": string;
|
|
136
|
+
"WEEKDAY-1": string;
|
|
137
|
+
"WEEKDAY-2": string;
|
|
138
|
+
"WEEKDAY-3": string;
|
|
139
|
+
"WEEKDAY-4": string;
|
|
140
|
+
"WEEKDAY-5": string;
|
|
141
|
+
"WEEKDAY-6": string;
|
|
142
|
+
Closed: string;
|
|
143
|
+
"Opening Hours": string;
|
|
144
|
+
"Delivery Hours": string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"View order": string;
|
|
3
|
+
"Remove from order": string;
|
|
4
|
+
"Update order": string;
|
|
5
|
+
"Add to order": string;
|
|
6
|
+
Add: string;
|
|
7
|
+
"Your order": string;
|
|
8
|
+
"Empty order": string;
|
|
9
|
+
"You don't have any items in your order": string;
|
|
10
|
+
"Add items": string;
|
|
11
|
+
Subtotal: string;
|
|
12
|
+
Events: string;
|
|
13
|
+
"Product choices": string;
|
|
14
|
+
"In order": string;
|
|
15
|
+
"Not available": string;
|
|
16
|
+
"Specify any allergies, special requests, or ingredients you want to add or remove": string;
|
|
17
|
+
"Thank you! We've received your order and it will be delivered shortly.": string;
|
|
18
|
+
"Go to checkout": string;
|
|
19
|
+
"Add an order note": string;
|
|
20
|
+
"Your Order is Completed!": string;
|
|
21
|
+
Delivery: string;
|
|
22
|
+
"Dine in": string;
|
|
23
|
+
Pickup: string;
|
|
24
|
+
Cash: string;
|
|
25
|
+
"POS Terminal": string;
|
|
26
|
+
"Order summary": string;
|
|
27
|
+
Items: string;
|
|
28
|
+
Tax: string;
|
|
29
|
+
Total: string;
|
|
30
|
+
"Special instructions, allergies, etc.": string;
|
|
31
|
+
"Place order": string;
|
|
32
|
+
Continue: string;
|
|
33
|
+
"Track order": string;
|
|
34
|
+
"Minimum order amount for delivery is {{amount}}": string;
|
|
35
|
+
"This field is required": string;
|
|
36
|
+
"Please select a table": string;
|
|
37
|
+
"Please enter an address": string;
|
|
38
|
+
"Please choose product": string;
|
|
39
|
+
Table: string;
|
|
40
|
+
"Select Table": string;
|
|
41
|
+
Card: string;
|
|
42
|
+
"Closed Now": string;
|
|
43
|
+
"Delivery Fee": string;
|
|
44
|
+
"Play video": string;
|
|
45
|
+
};
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"Get Started": string;
|
|
3
|
+
"Choose Plan": string;
|
|
4
|
+
"Smart QR Menu": string;
|
|
5
|
+
"Link-in-bio": string;
|
|
6
|
+
"Menu Analytics": string;
|
|
7
|
+
"Unlimited Users": string;
|
|
8
|
+
"Unlimited Products": string;
|
|
9
|
+
"Unlimited Categories": string;
|
|
10
|
+
"Product variants": string;
|
|
11
|
+
"Product options": string;
|
|
12
|
+
"Sales reports": string;
|
|
13
|
+
"24/7 Support": string;
|
|
14
|
+
"Multiple Branches": string;
|
|
15
|
+
"Table Management": string;
|
|
16
|
+
"Order Management": string;
|
|
17
|
+
"Mobile App for Owners & Staff": string;
|
|
18
|
+
"Point of Sale (POS)": string;
|
|
19
|
+
"Delivery Management": string;
|
|
20
|
+
"Third-Party Delivery Integrations": string;
|
|
21
|
+
"TabresPay with Mobile": string;
|
|
22
|
+
"Event management": string;
|
|
23
|
+
"/ month": string;
|
|
24
|
+
monthly: string;
|
|
25
|
+
annually: string;
|
|
26
|
+
"Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!": string;
|
|
27
|
+
"Flexible Plans for Every Business - Simple Pricing, More Value!": string;
|
|
28
|
+
"Unlimited Languages": string;
|
|
29
|
+
"30-day money-back guarantee": string;
|
|
30
|
+
"Limited Time Only": string;
|
|
31
|
+
"/ lifetime": string;
|
|
32
|
+
"Try for free": string;
|
|
33
|
+
"No credit card needed": string;
|
|
34
|
+
};
|
|
35
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { models as menuModels } from "src/modules/menu";
|
|
3
|
+
export declare const StoreProvider: ({ children, value, }: {
|
|
4
|
+
children: ReactElement;
|
|
5
|
+
value: menuModels.PublicMenuData;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const useStoreContext: () => menuModels.PublicMenuData;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Dispatch, ReactNode, SetStateAction } from "react";
|
|
2
|
+
import { FormErrors } from "@sorocraft/ui";
|
|
3
|
+
import * as productModels from "src/modules/product/models";
|
|
4
|
+
import * as orderModels from "src/modules/order/models";
|
|
5
|
+
import * as customerModels from "src/modules/customer/models";
|
|
6
|
+
type UpdateOrderItemsParams = {
|
|
7
|
+
product: productModels.Product;
|
|
8
|
+
quantity?: number;
|
|
9
|
+
variantId?: number | null;
|
|
10
|
+
selectedAddons?: orderModels.SelectedAddons;
|
|
11
|
+
note?: string;
|
|
12
|
+
};
|
|
13
|
+
type OrderContent = {
|
|
14
|
+
order: Partial<orderModels.Order>;
|
|
15
|
+
orderStep: orderModels.OrderStep;
|
|
16
|
+
orderItems: orderModels.OrderItems;
|
|
17
|
+
isOrderOpen: boolean;
|
|
18
|
+
customer: customerModels.Customer;
|
|
19
|
+
trackingId: string;
|
|
20
|
+
errors?: FormErrors;
|
|
21
|
+
setOrderStep: Dispatch<SetStateAction<orderModels.OrderStep>>;
|
|
22
|
+
updateOrder: (updatedFields: Partial<orderModels.Order>) => void;
|
|
23
|
+
addProduct: (params: UpdateOrderItemsParams) => void;
|
|
24
|
+
updateProduct: (params: UpdateOrderItemsParams) => void;
|
|
25
|
+
removeAllProductVariants: (productId: number) => void;
|
|
26
|
+
setIsOrderOpen: Dispatch<SetStateAction<boolean>>;
|
|
27
|
+
getCustomer: () => void;
|
|
28
|
+
resetOrder: (force?: boolean, shouldClose?: boolean) => void;
|
|
29
|
+
setTrackingId: Dispatch<SetStateAction<string>>;
|
|
30
|
+
updateOrderErrors: (field: keyof orderModels.Order) => void;
|
|
31
|
+
resetErrors: () => void;
|
|
32
|
+
};
|
|
33
|
+
type OrderProviderProps = {
|
|
34
|
+
children: ReactNode;
|
|
35
|
+
defaultOrderType?: orderModels.OrderType;
|
|
36
|
+
defaultPaymentMethod?: orderModels.PaymentMethod;
|
|
37
|
+
defaultBranchId?: number;
|
|
38
|
+
isOrderDefaultOpen?: boolean;
|
|
39
|
+
};
|
|
40
|
+
export declare const OrderProvider: ({ children, defaultOrderType, defaultPaymentMethod, defaultBranchId, isOrderDefaultOpen, }: OrderProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare const useOrderContext: () => OrderContent;
|
|
42
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { models as subscriptionModels } from "src/modules/subscription";
|
|
2
|
-
interface Props {
|
|
3
|
-
currency: string;
|
|
4
|
-
language: string;
|
|
5
|
-
isLoading?: boolean;
|
|
6
|
-
promoCode?: string | null;
|
|
7
|
-
onPlanSelect?: (plan: subscriptionModels.PlanType) => void;
|
|
8
|
-
onIntervalSelect?: (interval: subscriptionModels.PricingInterval) => void;
|
|
9
|
-
}
|
|
10
|
-
declare const Pricing: ({ currency, language, isLoading, onPlanSelect, onIntervalSelect, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default Pricing;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { models as subscriptionModels } from "src/modules/subscription";
|
|
2
|
-
interface Props {
|
|
3
|
-
plan: subscriptionModels.PlanType;
|
|
4
|
-
language: string;
|
|
5
|
-
interval: subscriptionModels.PricingInterval;
|
|
6
|
-
currency: string;
|
|
7
|
-
}
|
|
8
|
-
declare const PricingPlanAmount: ({ plan, language, interval, currency }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default PricingPlanAmount;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./Pricing";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { MenuAddon, MenuAddonOption } from "./models";
|
|
2
|
-
export declare const getAddonTranslation: (addon: MenuAddon, language: string) => string;
|
|
3
|
-
export declare const getAddonOptionTranslation: (option: MenuAddonOption, language: string) => string;
|
|
4
|
-
export declare const getOptionPrice: ({ option, currency, language, }: {
|
|
5
|
-
option: MenuAddonOption;
|
|
6
|
-
currency?: string;
|
|
7
|
-
language?: string;
|
|
8
|
-
}) => {
|
|
9
|
-
totalPrice: number;
|
|
10
|
-
formattedTotalPrice: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const getAddonOptionRawPrice: (addon: MenuAddon, optionId: number) => number;
|
|
13
|
-
export declare const getOptionTitles: (options: MenuAddonOption[], optionIds: number | number[], language: string) => string;
|
|
14
|
-
export declare const getAddonTitle: (addon: MenuAddon, language: string) => string;
|