ordering-ui-external 10.9.6 → 10.10.0
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/_bundles/{7.ordering-ui.a3fd703d3312a3b71fa1.js → 7.ordering-ui.5066da7ae1ecd7adcd8c.js} +1 -1
- package/_bundles/ordering-ui.5066da7ae1ecd7adcd8c.js +2 -0
- package/_modules/components/AddressForm/index.js +8 -5
- package/_modules/components/BusinessProductsListing/index.js +8 -5
- package/_modules/components/Checkout/index.js +8 -5
- package/_modules/components/Footer/index.js +7 -5
- package/_modules/components/HelpStaticPage/index.js +7 -5
- package/_modules/components/LoginForm/index.js +8 -5
- package/_modules/components/OrdersOption/index.js +8 -5
- package/_modules/components/PagesList/index.js +7 -5
- package/_modules/components/StripeMethodForm/index.js +8 -5
- package/_modules/hooks/useIntersectionObserver.js +7 -5
- package/_modules/index.js +6 -0
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +4 -4
- package/_modules/themes/callcenterOriginal/src/components/Checkout/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/Footer/index.js +7 -5
- package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +3 -3
- package/_modules/themes/callcenterOriginal/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/callcenterOriginal/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/Orders/AddressForm/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/Orders/CreateCustomOrder/Checkout/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/Orders/CreateCustomOrder/StripeMethodForm/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +4 -4
- package/_modules/themes/callcenterOriginal/src/components/Shared/ImageCrop/index.js +7 -5
- package/_modules/themes/eight/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/eight/src/components/Checkout/index.js +8 -5
- package/_modules/themes/eight/src/components/Footer/index.js +7 -5
- package/_modules/themes/eight/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/five/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/five/src/components/AddressList/index.js +8 -5
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +15 -9
- package/_modules/themes/five/src/components/Checkout/index.js +8 -5
- package/_modules/themes/five/src/components/Footer/index.js +8 -5
- package/_modules/themes/five/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/five/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/five/src/components/LogoutPopup/index.js +15 -9
- package/_modules/themes/five/src/components/NotNetworkConnectivity/index.js +8 -5
- package/_modules/themes/five/src/components/OrderDetails/index.js +16 -10
- package/_modules/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +8 -5
- package/_modules/themes/five/src/components/ProductForm/index.js +3 -2
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +3 -2
- package/_modules/themes/five/src/components/SignUpForm/index.js +8 -5
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +8 -5
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +4 -3
- package/_modules/themes/five/src/components/UpsellingPage/index.js +9 -5
- package/_modules/themes/five/src/components/UserFormDetails/index.js +8 -7
- package/_modules/themes/four/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/four/src/components/BusinessProductsListing/index.js +8 -5
- package/_modules/themes/four/src/components/Checkout/index.js +8 -5
- package/_modules/themes/four/src/components/Footer/index.js +7 -5
- package/_modules/themes/four/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/four/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/four/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/franchise/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/franchise/src/components/Checkout/index.js +8 -5
- package/_modules/themes/franchise/src/components/Footer/index.js +7 -5
- package/_modules/themes/franchise/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/franchise/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/franchise/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/orderAndPay/src/components/Checkout/index.js +31 -20
- package/_modules/themes/orderAndPay/src/components/Footer/index.js +7 -5
- package/_modules/themes/orderAndPay/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/orderAndPay/src/components/OrderTypeSelectorContent/index.js +15 -9
- package/_modules/themes/orderAndPay/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/pwa/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/pwa/src/components/Checkout/index.js +8 -5
- package/_modules/themes/pwa/src/components/Footer/index.js +7 -5
- package/_modules/themes/pwa/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/pwa/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/pwa/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/seven/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/seven/src/components/Checkout/index.js +8 -5
- package/_modules/themes/seven/src/components/Footer/index.js +7 -5
- package/_modules/themes/seven/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/seven/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/seven/src/components/ProductForm/productForm.js +15 -9
- package/_modules/themes/six/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/six/src/components/Checkout/index.js +8 -5
- package/_modules/themes/six/src/components/Footer/index.js +7 -5
- package/_modules/themes/six/src/components/Header/index.js +1 -0
- package/_modules/themes/six/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/six/src/components/SidebarMenu/index.js +96 -11
- package/_modules/themes/three/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/three/src/components/Checkout/index.js +8 -5
- package/_modules/themes/three/src/components/Footer/index.js +7 -5
- package/_modules/themes/three/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/three/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/three/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/two/src/components/Checkout/index.js +8 -5
- package/_modules/themes/two/src/components/HelpStaticPage/index.js +7 -5
- package/_modules/themes/two/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/two/src/components/OrdersOption/index.js +8 -5
- package/_modules/themes/wow/src/components/AddressForm/index.js +8 -5
- package/_modules/themes/wow/src/components/Checkout/index.js +8 -5
- package/_modules/themes/wow/src/components/LoginForm/index.js +8 -5
- package/_modules/themes/wow/src/components/OrdersOption/index.js +8 -5
- package/package.json +2 -2
- package/src/index.js +4 -2
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +4 -4
- package/src/themes/callcenterOriginal/src/components/Header/styles.js +5 -5
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +4 -4
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +5 -5
- package/src/themes/five/src/components/ProductForm/index.js +29 -26
- package/src/themes/five/src/components/ProductItemAccordion/index.js +2 -1
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +2 -1
- package/src/themes/five/src/components/UpsellingPage/index.js +12 -4
- package/src/themes/five/src/components/UserFormDetails/index.js +6 -6
- package/src/themes/six/src/components/Header/index.js +1 -1
- package/src/themes/six/src/components/SidebarMenu/index.js +120 -5
- package/template/app.js +31 -26
- package/_bundles/ordering-ui.a3fd703d3312a3b71fa1.js +0 -2
- /package/_bundles/{0.ordering-ui.a3fd703d3312a3b71fa1.js → 0.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{1.ordering-ui.a3fd703d3312a3b71fa1.js → 1.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{2.ordering-ui.a3fd703d3312a3b71fa1.js → 2.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{4.ordering-ui.a3fd703d3312a3b71fa1.js → 4.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{5.ordering-ui.a3fd703d3312a3b71fa1.js → 5.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{6.ordering-ui.a3fd703d3312a3b71fa1.js → 6.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{7.ordering-ui.a3fd703d3312a3b71fa1.js.LICENSE.txt → 7.ordering-ui.5066da7ae1ecd7adcd8c.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.a3fd703d3312a3b71fa1.js → 8.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{9.ordering-ui.a3fd703d3312a3b71fa1.js → 9.ordering-ui.5066da7ae1ecd7adcd8c.js} +0 -0
- /package/_bundles/{ordering-ui.a3fd703d3312a3b71fa1.js.LICENSE.txt → ordering-ui.5066da7ae1ecd7adcd8c.js.LICENSE.txt} +0 -0
|
@@ -32,7 +32,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
32
32
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
33
33
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
34
34
|
var OrdersOptionUI = function OrdersOptionUI(props) {
|
|
35
|
-
var _theme$images, _theme$images2, _theme$images3,
|
|
35
|
+
var _theme$images, _theme$images2, _theme$images3, _props$beforeElements, _props$beforeComponen, _props$afterComponent, _props$afterElements;
|
|
36
36
|
var isProfile = props.isProfile,
|
|
37
37
|
activeOrders = props.activeOrders,
|
|
38
38
|
previousOrders = props.previousOrders,
|
|
@@ -119,8 +119,8 @@ var OrdersOptionUI = function OrdersOptionUI(props) {
|
|
|
119
119
|
});
|
|
120
120
|
return objectStatus && objectStatus;
|
|
121
121
|
};
|
|
122
|
-
var handleReorder = function
|
|
123
|
-
|
|
122
|
+
var handleReorder = /*#__PURE__*/function () {
|
|
123
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderId) {
|
|
124
124
|
var _yield$reorder, error, result;
|
|
125
125
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
126
126
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -152,8 +152,11 @@ var OrdersOptionUI = function OrdersOptionUI(props) {
|
|
|
152
152
|
return _context.stop();
|
|
153
153
|
}
|
|
154
154
|
}, _callee, null, [[1, 10]]);
|
|
155
|
-
}))
|
|
156
|
-
|
|
155
|
+
}));
|
|
156
|
+
return function handleReorder(_x) {
|
|
157
|
+
return _ref.apply(this, arguments);
|
|
158
|
+
};
|
|
159
|
+
}();
|
|
157
160
|
(0, _react.useEffect)(function () {
|
|
158
161
|
var ordersSorted = orders.sort(function (a, b) {
|
|
159
162
|
if (activeOrders) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.10.0",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"lodash": "^4.17.19",
|
|
89
89
|
"moment": "^2.29.4",
|
|
90
90
|
"nanoid": "^4.0.0",
|
|
91
|
-
"ordering-components-external": "9.
|
|
91
|
+
"ordering-components-external": "9.10.0",
|
|
92
92
|
"payment": "^2.4.6",
|
|
93
93
|
"polished": "^3.6.6",
|
|
94
94
|
"react-bootstrap-icons": "^1.7.2",
|
package/src/index.js
CHANGED
|
@@ -130,7 +130,8 @@ import {
|
|
|
130
130
|
getTraduction,
|
|
131
131
|
priceList,
|
|
132
132
|
reviewCommentList,
|
|
133
|
-
shape
|
|
133
|
+
shape,
|
|
134
|
+
orderTypeList
|
|
134
135
|
} from './utils'
|
|
135
136
|
|
|
136
137
|
export {
|
|
@@ -280,5 +281,6 @@ export {
|
|
|
280
281
|
getTraduction,
|
|
281
282
|
priceList,
|
|
282
283
|
reviewCommentList,
|
|
283
|
-
shape
|
|
284
|
+
shape,
|
|
285
|
+
orderTypeList
|
|
284
286
|
}
|
|
@@ -101,7 +101,7 @@ export const AddressItemActions = styled.div`
|
|
|
101
101
|
cursor: pointer;
|
|
102
102
|
margin: 0px 5px;
|
|
103
103
|
font-size: 20px;
|
|
104
|
-
|
|
104
|
+
|
|
105
105
|
svg {
|
|
106
106
|
color: #B1BCCC;
|
|
107
107
|
}
|
|
@@ -171,7 +171,7 @@ export const ContinueButton = styled.div`
|
|
|
171
171
|
width: 100%;
|
|
172
172
|
position: sticky;
|
|
173
173
|
bottom: 1px;
|
|
174
|
-
|
|
174
|
+
|
|
175
175
|
button {
|
|
176
176
|
width: 100%;
|
|
177
177
|
white-space: nowrap;
|
|
@@ -200,7 +200,7 @@ export const List = styled.div`
|
|
|
200
200
|
margin-top: 0px;
|
|
201
201
|
` : css`
|
|
202
202
|
margin-top: 222px;
|
|
203
|
-
`}
|
|
203
|
+
`}
|
|
204
204
|
button {
|
|
205
205
|
width: 100%;
|
|
206
206
|
}
|
|
@@ -228,7 +228,7 @@ export const CloseIcon = styled.div`
|
|
|
228
228
|
`
|
|
229
229
|
|
|
230
230
|
export const TitleFormContainer = styled.div`
|
|
231
|
-
display: flex;
|
|
231
|
+
display: flex;
|
|
232
232
|
align-items: center;
|
|
233
233
|
margin-top: 7px;
|
|
234
234
|
h1 {
|
|
@@ -123,7 +123,7 @@ export const Menu = styled.div`
|
|
|
123
123
|
margin-left: 35px;
|
|
124
124
|
margin-right: 10px;
|
|
125
125
|
}
|
|
126
|
-
|
|
126
|
+
|
|
127
127
|
@media (min-width: 1200px) {
|
|
128
128
|
padding: 0 30px;
|
|
129
129
|
margin-left: 50px;
|
|
@@ -157,7 +157,7 @@ export const Menu = styled.div`
|
|
|
157
157
|
@media (min-width: 1175px) {
|
|
158
158
|
width: 250px;
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
|
|
161
161
|
@media (min-width: 1400px) {
|
|
162
162
|
width: 400px;
|
|
163
163
|
}
|
|
@@ -262,8 +262,8 @@ export const CustomerInfo = styled.div`
|
|
|
262
262
|
color: #909BA9;
|
|
263
263
|
margin: 0;
|
|
264
264
|
}
|
|
265
|
-
svg {
|
|
266
|
-
color: #748194;
|
|
265
|
+
svg {
|
|
266
|
+
color: #748194;
|
|
267
267
|
margin: 0;
|
|
268
268
|
font-size: 20px;
|
|
269
269
|
}
|
|
@@ -326,7 +326,7 @@ export const MomentMenu = styled.div`
|
|
|
326
326
|
justify-content: center;
|
|
327
327
|
width: 200px;
|
|
328
328
|
display: none;
|
|
329
|
-
|
|
329
|
+
|
|
330
330
|
@media (min-width: 821px) {
|
|
331
331
|
display: flex;
|
|
332
332
|
}
|
|
@@ -201,7 +201,7 @@ export const WrapInput = styled.div`
|
|
|
201
201
|
width: calc(50% - 20px);
|
|
202
202
|
}
|
|
203
203
|
`}
|
|
204
|
-
|
|
204
|
+
|
|
205
205
|
div{
|
|
206
206
|
color: #FFF;
|
|
207
207
|
position: relative;
|
|
@@ -234,7 +234,7 @@ export const WrapInput = styled.div`
|
|
|
234
234
|
`
|
|
235
235
|
|
|
236
236
|
export const AutoComplete = styled.div`
|
|
237
|
-
width: 45%;
|
|
237
|
+
width: 45%;
|
|
238
238
|
button {
|
|
239
239
|
position: absolute;
|
|
240
240
|
left: 100%;
|
|
@@ -244,7 +244,7 @@ export const AutoComplete = styled.div`
|
|
|
244
244
|
|
|
245
245
|
export const UserEdit = styled.div`
|
|
246
246
|
> :first-child{
|
|
247
|
-
margin-bottom: 20px;
|
|
247
|
+
margin-bottom: 20px;
|
|
248
248
|
}
|
|
249
249
|
`
|
|
250
250
|
|
|
@@ -394,7 +394,7 @@ export const ContinueButton = styled.span`
|
|
|
394
394
|
position: absolute;
|
|
395
395
|
right: 35px;
|
|
396
396
|
bottom: 5px;
|
|
397
|
-
width:
|
|
397
|
+
width:
|
|
398
398
|
button {
|
|
399
399
|
cursor: pointer;
|
|
400
400
|
}
|
package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js
CHANGED
|
@@ -6,10 +6,10 @@ export const CategoriesWrap = styled.div`
|
|
|
6
6
|
width: 100%;
|
|
7
7
|
border: 1px solid #ccc;
|
|
8
8
|
border-radius: 7.6px;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
|
|
10
|
+
@media (min-width: 993px) {
|
|
11
|
+
overflow: auto;
|
|
12
|
+
max-height: calc(90vh - 10px);
|
|
13
13
|
}
|
|
14
14
|
`
|
|
15
15
|
|
|
@@ -30,7 +30,7 @@ export const CategoriesContainer = styled.div`
|
|
|
30
30
|
overflow: hidden;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
div.special{
|
|
33
|
+
div.special {
|
|
34
34
|
${props => !props.featured && css`
|
|
35
35
|
display: none;
|
|
36
36
|
`}
|
|
@@ -138,6 +138,7 @@ const ProductOptionsUI = (props) => {
|
|
|
138
138
|
const guestCheckoutEnabled = configs?.guest_checkout_enabled?.value === '1'
|
|
139
139
|
const orderTypeEnabled = !orderTypeList[orderState?.options?.type - 1] || configs?.allowed_order_types_guest_checkout?.value?.includes(orderTypeList[orderState?.options?.type - 1])
|
|
140
140
|
const hideProductDescription = theme?.business_view?.components?.products?.components?.product?.components?.description?.hidden
|
|
141
|
+
const hideProductDummyLogo = theme?.business_view?.components?.products?.components?.product?.components?.dummy?.hidden
|
|
141
142
|
|
|
142
143
|
const closeModal = () => {
|
|
143
144
|
setModalIsOpen(false)
|
|
@@ -409,32 +410,34 @@ const ProductOptionsUI = (props) => {
|
|
|
409
410
|
{product && (
|
|
410
411
|
<WrapperImage>
|
|
411
412
|
<SwiperWrapper isSoldOut={isSoldOut}>
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
<
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
<
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
413
|
+
{(product?.images || !hideProductDummyLogo) && (
|
|
414
|
+
<Swiper
|
|
415
|
+
spaceBetween={10}
|
|
416
|
+
navigation
|
|
417
|
+
watchOverflow
|
|
418
|
+
observer
|
|
419
|
+
observeParents
|
|
420
|
+
parallax
|
|
421
|
+
slidesPerView={1}
|
|
422
|
+
thumbs={{ swiper: thumbsSwiper }} className='mySwiper2'
|
|
423
|
+
onSlideChange={() => handleSlideChange()}
|
|
424
|
+
>
|
|
425
|
+
{gallery?.map((img, i) => (
|
|
426
|
+
<SwiperSlide key={i}>
|
|
427
|
+
<img src={img} alt='' className='active-img' />
|
|
428
|
+
</SwiperSlide>
|
|
429
|
+
))}
|
|
430
|
+
{videoGallery && videoGallery?.length > 0 && (
|
|
431
|
+
<>
|
|
432
|
+
{videoGallery?.map((video, j) => (
|
|
433
|
+
<SwiperSlide key={j}>
|
|
434
|
+
<iframe style={{ border: 'none', width: '100%', height: '100%' }} src={video} />
|
|
435
|
+
</SwiperSlide>
|
|
436
|
+
))}
|
|
437
|
+
</>
|
|
438
|
+
)}
|
|
439
|
+
</Swiper>
|
|
440
|
+
)}
|
|
438
441
|
{galleryLength > 2 && (
|
|
439
442
|
<Swiper
|
|
440
443
|
onSwiper={setThumbsSwiper}
|
|
@@ -63,6 +63,7 @@ export const ProductItemAccordion = (props) => {
|
|
|
63
63
|
|
|
64
64
|
const viewString = isConfirmationPage ? 'confirmation' : isStore ? 'business_view' : 'header'
|
|
65
65
|
const showProductImage = !theme?.[viewString]?.components?.cart?.components?.products?.components?.image?.hidden
|
|
66
|
+
const hideProductDummyLogo = theme?.business_view?.components?.products?.components?.product?.components?.dummy?.hidden
|
|
66
67
|
|
|
67
68
|
const productInfo = () => {
|
|
68
69
|
if (isCartProduct) {
|
|
@@ -131,7 +132,7 @@ export const ProductItemAccordion = (props) => {
|
|
|
131
132
|
onClick={(e) => toggleAccordion(e)}
|
|
132
133
|
>
|
|
133
134
|
<ProductInfo className='info' isValid={product?.valid ?? true}>
|
|
134
|
-
{(product?.images || theme?.images?.dummies?.product) && showProductImage && (
|
|
135
|
+
{(product?.images || (!hideProductDummyLogo && theme?.images?.dummies?.product)) && showProductImage && (
|
|
135
136
|
<WrapperProductImage>
|
|
136
137
|
<ProductImage bgimage={product?.images || theme?.images?.dummies?.product} />
|
|
137
138
|
</WrapperProductImage>
|
|
@@ -75,6 +75,7 @@ const SingleProductCardUI = (props) => {
|
|
|
75
75
|
|
|
76
76
|
const hideAddButton = theme?.business_view?.components?.products?.components?.add_to_cart_button?.hidden ?? true
|
|
77
77
|
const hideProductDescription = theme?.business_view?.components?.products?.components?.product?.components?.description?.hidden
|
|
78
|
+
const hideProductDummyLogo = theme?.business_view?.components?.products?.components?.product?.components?.dummy?.hidden
|
|
78
79
|
const hideProductLogo = viewString
|
|
79
80
|
? theme?.[viewString]?.components?.cart?.components?.products?.image?.hidden
|
|
80
81
|
: theme?.business_view?.components?.products?.components?.product?.components?.image?.hidden
|
|
@@ -216,7 +217,7 @@ const SingleProductCardUI = (props) => {
|
|
|
216
217
|
<CardLogo
|
|
217
218
|
className='image'
|
|
218
219
|
soldOut={isSoldOut || maxProductQuantity <= 0}
|
|
219
|
-
bgimage={optimizeImage(product?.images || theme?.images?.dummies?.product, 'h_86,c_limit')}
|
|
220
|
+
bgimage={optimizeImage(product?.images || !hideProductDummyLogo && theme?.images?.dummies?.product, 'h_86,c_limit')}
|
|
220
221
|
/>
|
|
221
222
|
</WrapLogo>
|
|
222
223
|
) : (
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import { UpsellingPage as UpsellingPageController, useLanguage, useUtils } from 'ordering-components-external'
|
|
3
|
+
import { useTheme } from 'styled-components'
|
|
3
4
|
import {
|
|
4
5
|
Container,
|
|
5
6
|
UpsellingContainer,
|
|
@@ -33,12 +34,17 @@ const UpsellingPageUI = (props) => {
|
|
|
33
34
|
business,
|
|
34
35
|
isCustomMode
|
|
35
36
|
} = props
|
|
37
|
+
|
|
36
38
|
const [, t] = useLanguage()
|
|
39
|
+
const [{ parsePrice }] = useUtils()
|
|
40
|
+
const theme = useTheme()
|
|
41
|
+
|
|
37
42
|
const [actualProduct, setActualProduct] = useState(null)
|
|
38
43
|
const [modalIsOpen, setModalIsOpen] = useState(false)
|
|
39
|
-
const [{ parsePrice }] = useUtils()
|
|
40
44
|
const [showUpselling, setShowUpSelling] = useState(true)
|
|
41
45
|
|
|
46
|
+
const hideProductDummyLogo = theme?.business_view?.components?.products?.components?.product?.components?.dummy?.hidden
|
|
47
|
+
|
|
42
48
|
useEffect(() => {
|
|
43
49
|
if (!isCustomMode) {
|
|
44
50
|
if (upsellingProducts?.products?.length && !upsellingProducts.loading) {
|
|
@@ -144,9 +150,11 @@ const UpsellingPageUI = (props) => {
|
|
|
144
150
|
</div>
|
|
145
151
|
<Button color='primary' onClick={() => handleFormProduct(product)}>{t('ADD', 'Add')}</Button>
|
|
146
152
|
</HorizontalDetails>
|
|
147
|
-
|
|
148
|
-
<
|
|
149
|
-
|
|
153
|
+
{(product?.images || (!hideProductDummyLogo && theme?.images?.dummies?.product)) && (
|
|
154
|
+
<HorizontalImage>
|
|
155
|
+
<img src={product.images} alt={`product-${i}`} loading='lazy' />
|
|
156
|
+
</HorizontalImage>
|
|
157
|
+
)}
|
|
150
158
|
</HorizontalItem>
|
|
151
159
|
)) : (
|
|
152
160
|
<div>
|
|
@@ -294,7 +294,7 @@ export const UserFormDetailsUI = (props) => {
|
|
|
294
294
|
}, [isValidPhoneNumber, userPhoneNumber, configs?.verification_phone_required?.value, isChanged])
|
|
295
295
|
|
|
296
296
|
useEffect(() => {
|
|
297
|
-
if (requiredFields && !requiredFields
|
|
297
|
+
if (requiredFields && !requiredFields?.includes?.('cellphone')) setIsValidPhoneNumber(true)
|
|
298
298
|
}, [requiredFields])
|
|
299
299
|
|
|
300
300
|
const handleEditNotifications = (key, value) => {
|
|
@@ -333,7 +333,7 @@ export const UserFormDetailsUI = (props) => {
|
|
|
333
333
|
((showField && showField(field.code) && showFieldWithTheme(field.code)) || user?.guest_id) && (
|
|
334
334
|
<React.Fragment key={field.id}>
|
|
335
335
|
{field.code === 'email' ? (
|
|
336
|
-
((requiredFields && requiredFields
|
|
336
|
+
((requiredFields && requiredFields?.includes?.(field.code)) || !requiredFields) && (
|
|
337
337
|
<InputGroup>
|
|
338
338
|
<p>{t(field.code.toUpperCase(), field?.name)}</p>
|
|
339
339
|
<Input
|
|
@@ -354,7 +354,7 @@ export const UserFormDetailsUI = (props) => {
|
|
|
354
354
|
</InputGroup>
|
|
355
355
|
)
|
|
356
356
|
) : (
|
|
357
|
-
((requiredFields && requiredFields
|
|
357
|
+
((requiredFields && requiredFields?.includes?.(field.code)) || !requiredFields) && (
|
|
358
358
|
<InputGroup>
|
|
359
359
|
<p>{t(field.code.toUpperCase(), field?.name)}</p>
|
|
360
360
|
<Input
|
|
@@ -380,7 +380,7 @@ export const UserFormDetailsUI = (props) => {
|
|
|
380
380
|
</React.Fragment>
|
|
381
381
|
)
|
|
382
382
|
)}
|
|
383
|
-
{((!user?.guest_id && showInputBirthday) || (user?.guest_id && requiredFields
|
|
383
|
+
{((!user?.guest_id && showInputBirthday) || (user?.guest_id && requiredFields?.includes?.('birthdate'))) && (
|
|
384
384
|
<InputPhoneNumberWrapper>
|
|
385
385
|
<p>{t('BIRTHDATE', 'Birthdate')}</p>
|
|
386
386
|
<Input
|
|
@@ -391,11 +391,11 @@ export const UserFormDetailsUI = (props) => {
|
|
|
391
391
|
onFocus={() => setOpenCalendar(true)}
|
|
392
392
|
/>
|
|
393
393
|
{openCalendar && (
|
|
394
|
-
<DatePickerUI value={birthdate} onChange={_handleChangeDate} name={'birthdate'}/>
|
|
394
|
+
<DatePickerUI value={birthdate} onChange={_handleChangeDate} name={'birthdate'} />
|
|
395
395
|
)}
|
|
396
396
|
</InputPhoneNumberWrapper>
|
|
397
397
|
)}
|
|
398
|
-
{((!user?.guest_id && !!showInputPhoneNumber) || (user?.guest_id && requiredFields
|
|
398
|
+
{((!user?.guest_id && !!showInputPhoneNumber) || (user?.guest_id && requiredFields?.includes?.('cellphone'))) && showCustomerCellphone && ((requiredFields && requiredFields?.includes?.('cellphone')) || !requiredFields) && (
|
|
399
399
|
<InputPhoneNumberWrapper>
|
|
400
400
|
<p>{t('PHONE', 'Phone')}</p>
|
|
401
401
|
<InputPhoneNumber
|
|
@@ -36,7 +36,6 @@ import { LoginForm } from '../../../../../themes/five/src/components/LoginForm'
|
|
|
36
36
|
import { SignUpForm } from '../../../../../themes/five/src/components/SignUpForm'
|
|
37
37
|
import { ForgotPasswordForm } from '../../../../../themes/five/src/components/ForgotPasswordForm'
|
|
38
38
|
|
|
39
|
-
|
|
40
39
|
export const Header = (props) => {
|
|
41
40
|
const {
|
|
42
41
|
isHome,
|
|
@@ -259,6 +258,7 @@ export const Header = (props) => {
|
|
|
259
258
|
<LanguageSelector />
|
|
260
259
|
</Menu>
|
|
261
260
|
<SidebarMenu
|
|
261
|
+
notificationState={notificationState}
|
|
262
262
|
auth={auth}
|
|
263
263
|
isHideSignup={isHideSignup}
|
|
264
264
|
userCustomer={userCustomer}
|
|
@@ -6,8 +6,9 @@ import FaRegAddressCard from '@meronex/icons/fa/FaRegAddressCard'
|
|
|
6
6
|
import FaRegListAlt from '@meronex/icons/fa/FaRegListAlt'
|
|
7
7
|
import AiOutlineHome from '@meronex/icons/ai/AiOutlineHome'
|
|
8
8
|
import BiStore from '@meronex/icons/bi/BiStore'
|
|
9
|
+
import BiHelpCircle from '@meronex/icons/bi/BiHelpCircle'
|
|
9
10
|
import FaUserCircle from '@meronex/icons/fa/FaUserCircle'
|
|
10
|
-
import { useEvent, useLanguage, useOrder, useConfig } from 'ordering-components-external'
|
|
11
|
+
import { useEvent, useLanguage, useOrder, useConfig, useSession } from 'ordering-components-external'
|
|
11
12
|
import { useWindowSize } from '../../../../../hooks/useWindowSize'
|
|
12
13
|
import { capitalize } from '../../../../../utils'
|
|
13
14
|
import { MomentContent } from '../../../../../components/MomentContent'
|
|
@@ -19,6 +20,9 @@ import { HeaderOption } from '../HeaderOption'
|
|
|
19
20
|
import { Modal } from '../Modal'
|
|
20
21
|
import { AddressForm } from '../AddressForm'
|
|
21
22
|
import { AddressList } from '../AddressList'
|
|
23
|
+
import { LoginForm } from '../../../../../themes/five/src/components/LoginForm'
|
|
24
|
+
import { SignUpForm } from '../../../../../themes/five/src/components/SignUpForm'
|
|
25
|
+
import { ForgotPasswordForm } from '../../../../../themes/five/src/components/ForgotPasswordForm'
|
|
22
26
|
|
|
23
27
|
import {
|
|
24
28
|
Container,
|
|
@@ -30,12 +34,14 @@ import {
|
|
|
30
34
|
MenuLinkText,
|
|
31
35
|
TextInfo,
|
|
32
36
|
Hr,
|
|
33
|
-
SideBarOver
|
|
37
|
+
SideBarOver,
|
|
38
|
+
MenuLinkSeparator
|
|
34
39
|
} from './styles'
|
|
35
40
|
export const SidebarMenu = (props) => {
|
|
36
|
-
const { auth, isHideSignup, userCustomer, isCustomerMode } = props
|
|
41
|
+
const { auth, isHideSignup, userCustomer, isCustomerMode, notificationState } = props
|
|
37
42
|
const [events] = useEvent()
|
|
38
43
|
const [, t] = useLanguage()
|
|
44
|
+
const [, { login }] = useSession()
|
|
39
45
|
const [{ options }] = useOrder()
|
|
40
46
|
const { width } = useWindowSize()
|
|
41
47
|
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
|
@@ -44,6 +50,7 @@ export const SidebarMenu = (props) => {
|
|
|
44
50
|
const [sideBackOver, setSideBackOver] = useState(false)
|
|
45
51
|
const [modalSelected, setModalSelected] = useState(null)
|
|
46
52
|
const theme = useTheme()
|
|
53
|
+
const hideHelp = theme?.bar_menu?.components?.help?.hidden
|
|
47
54
|
|
|
48
55
|
const configTypes = configState?.configs?.order_types_allowed?.value.split('|').map(value => Number(value)) || []
|
|
49
56
|
const handleGoToPage = (data) => {
|
|
@@ -70,6 +77,31 @@ export const SidebarMenu = (props) => {
|
|
|
70
77
|
setModalIsOpen(true)
|
|
71
78
|
}
|
|
72
79
|
|
|
80
|
+
const closeModal = () => {
|
|
81
|
+
setModalIsOpen(false)
|
|
82
|
+
setModalSelected(null)
|
|
83
|
+
actionSidebar(false)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const handleSuccessSignup = (user) => {
|
|
87
|
+
login({
|
|
88
|
+
user,
|
|
89
|
+
token: user?.session?.access_token
|
|
90
|
+
})
|
|
91
|
+
closeModal()
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const handleCustomModalClick = (e, { page }) => {
|
|
95
|
+
e.preventDefault()
|
|
96
|
+
setModalSelected(page)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const handleSuccessLogin = (user) => {
|
|
100
|
+
if (user) {
|
|
101
|
+
closeModal()
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
73
105
|
useEffect(() => {
|
|
74
106
|
if (isMenuOpen) {
|
|
75
107
|
if (width <= 489) {
|
|
@@ -175,6 +207,35 @@ export const SidebarMenu = (props) => {
|
|
|
175
207
|
</MenuLinkText>
|
|
176
208
|
</WrappContent>
|
|
177
209
|
</MenuLink>
|
|
210
|
+
{!hideHelp && (
|
|
211
|
+
<MenuLink
|
|
212
|
+
onClick={() => handleGoToPage({ page: 'help' })}
|
|
213
|
+
>
|
|
214
|
+
<WrappContent>
|
|
215
|
+
<MenuLinkIcon
|
|
216
|
+
active={
|
|
217
|
+
window.location.pathname === '/help'
|
|
218
|
+
}
|
|
219
|
+
>
|
|
220
|
+
<BiHelpCircle />
|
|
221
|
+
</MenuLinkIcon>
|
|
222
|
+
<MenuLinkText>
|
|
223
|
+
<TextInfo
|
|
224
|
+
active={
|
|
225
|
+
window.location.pathname === '/help'
|
|
226
|
+
}
|
|
227
|
+
>
|
|
228
|
+
{t('HELP', 'help')}
|
|
229
|
+
</TextInfo>
|
|
230
|
+
</MenuLinkText>
|
|
231
|
+
<MenuLinkSeparator>
|
|
232
|
+
<div>
|
|
233
|
+
<hr />
|
|
234
|
+
</div>
|
|
235
|
+
</MenuLinkSeparator>
|
|
236
|
+
</WrappContent>
|
|
237
|
+
</MenuLink>
|
|
238
|
+
)}
|
|
178
239
|
{
|
|
179
240
|
!isCustomerMode && (
|
|
180
241
|
<MenuLink
|
|
@@ -239,9 +300,9 @@ export const SidebarMenu = (props) => {
|
|
|
239
300
|
|
|
240
301
|
{!auth && (
|
|
241
302
|
<MenuLink style={{ marginTop: '25px' }}>
|
|
242
|
-
<Button outline color='secundary' onClick={() =>
|
|
303
|
+
<Button outline color='secundary' onClick={() => openModal('login')} name='login'>{t(theme?.defaultLanguages?.SIGN_IN || 'Sign in')}</Button>
|
|
243
304
|
{!isHideSignup && (
|
|
244
|
-
<Button color='secundary' onClick={() =>
|
|
305
|
+
<Button color='secundary' onClick={() => openModal('signup')} highlight={1} name='signup'>{t(theme?.defaultLanguages?.SIGN_UP || 'Join now')}</Button>
|
|
245
306
|
)}
|
|
246
307
|
</MenuLink>
|
|
247
308
|
)}
|
|
@@ -276,6 +337,60 @@ export const SidebarMenu = (props) => {
|
|
|
276
337
|
{modalSelected === 'moment' && (
|
|
277
338
|
<MomentContent />
|
|
278
339
|
)}
|
|
340
|
+
{modalSelected === 'login' && (
|
|
341
|
+
<LoginForm
|
|
342
|
+
handleSuccessLogin={handleSuccessLogin}
|
|
343
|
+
elementLinkToSignup={
|
|
344
|
+
<a
|
|
345
|
+
onClick={
|
|
346
|
+
(e) => handleCustomModalClick(e, { page: 'signup' })
|
|
347
|
+
} href='#'
|
|
348
|
+
>{t('CREATE_ACCOUNT', theme?.defaultLanguages?.CREATE_ACCOUNT || 'Create account')}
|
|
349
|
+
</a>
|
|
350
|
+
}
|
|
351
|
+
elementLinkToForgotPassword={
|
|
352
|
+
<a
|
|
353
|
+
onClick={
|
|
354
|
+
(e) => handleCustomModalClick(e, { page: 'forgotpassword' })
|
|
355
|
+
} href='#'
|
|
356
|
+
>{t('RESET_PASSWORD', theme?.defaultLanguages?.RESET_PASSWORD || 'Reset password')}
|
|
357
|
+
</a>
|
|
358
|
+
}
|
|
359
|
+
useLoginByCellphone
|
|
360
|
+
isPopup
|
|
361
|
+
/>
|
|
362
|
+
)}
|
|
363
|
+
{modalSelected === 'signup' && (
|
|
364
|
+
<SignUpForm
|
|
365
|
+
notificationState={notificationState}
|
|
366
|
+
elementLinkToLogin={
|
|
367
|
+
<a
|
|
368
|
+
onClick={
|
|
369
|
+
(e) => handleCustomModalClick(e, { page: 'login' })
|
|
370
|
+
} href='#'
|
|
371
|
+
>{t('LOGIN', theme?.defaultLanguages?.LOGIN || 'Login')}
|
|
372
|
+
</a>
|
|
373
|
+
}
|
|
374
|
+
useLoginByCellphone
|
|
375
|
+
useChekoutFileds
|
|
376
|
+
handleSuccessSignup={handleSuccessSignup}
|
|
377
|
+
isPopup
|
|
378
|
+
closeModal={() => closeModal()}
|
|
379
|
+
/>
|
|
380
|
+
)}
|
|
381
|
+
{modalSelected === 'forgotpassword' && (
|
|
382
|
+
<ForgotPasswordForm
|
|
383
|
+
elementLinkToLogin={
|
|
384
|
+
<a
|
|
385
|
+
onClick={
|
|
386
|
+
(e) => handleCustomModalClick(e, { page: 'login' })
|
|
387
|
+
} href='#'
|
|
388
|
+
>{t('LOGIN', theme?.defaultLanguages?.LOGIN || 'Login')}
|
|
389
|
+
</a>
|
|
390
|
+
}
|
|
391
|
+
isPopup
|
|
392
|
+
/>
|
|
393
|
+
)}
|
|
279
394
|
</Modal>
|
|
280
395
|
)}
|
|
281
396
|
</Container>
|