ordering-ui-external 1.9.2 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_bundles/0.ordering-ui.ea0875b41af5b7f1d809.js +1 -0
- package/_bundles/{1.ordering-ui.8e20ae6af39ad738a29e.js → 1.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{2.ordering-ui.8e20ae6af39ad738a29e.js → 2.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{4.ordering-ui.8e20ae6af39ad738a29e.js → 4.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{5.ordering-ui.8e20ae6af39ad738a29e.js → 5.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{6.ordering-ui.8e20ae6af39ad738a29e.js → 6.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{7.ordering-ui.8e20ae6af39ad738a29e.js → 7.ordering-ui.ea0875b41af5b7f1d809.js} +2 -2
- package/_bundles/{7.ordering-ui.8e20ae6af39ad738a29e.js.LICENSE.txt → 7.ordering-ui.ea0875b41af5b7f1d809.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.8e20ae6af39ad738a29e.js → 8.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{9.ordering-ui.8e20ae6af39ad738a29e.js → 9.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
- package/_bundles/{ordering-ui.8e20ae6af39ad738a29e.js → ordering-ui.ea0875b41af5b7f1d809.js} +2 -2
- package/_bundles/{ordering-ui.8e20ae6af39ad738a29e.js.LICENSE.txt → ordering-ui.ea0875b41af5b7f1d809.js.LICENSE.txt} +0 -0
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +9 -10
- package/_modules/themes/five/index.js +7 -0
- package/_modules/themes/five/src/components/AddressList/index.js +3 -2
- package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +3 -2
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
- package/_modules/themes/five/src/components/BusinessProductsList/index.js +50 -14
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +9 -2
- package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +10 -6
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +34 -129
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +29 -40
- package/_modules/themes/five/src/components/Cart/index.js +6 -3
- package/_modules/themes/five/src/components/CartContent/index.js +97 -2
- package/_modules/themes/five/src/components/CartContent/styles.js +6 -4
- package/_modules/themes/five/src/components/Checkout/index.js +8 -2
- package/_modules/themes/five/src/components/Checkout/styles.js +10 -4
- package/_modules/themes/five/src/components/Header/index.js +26 -34
- package/_modules/themes/five/src/components/Header/styles.js +46 -35
- package/_modules/themes/five/src/components/HeaderOption/index.js +3 -2
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +3 -2
- package/_modules/themes/five/src/components/MultiCheckout/index.js +20 -10
- package/_modules/themes/five/src/components/MultiCheckout/styles.js +11 -8
- package/_modules/themes/five/src/components/MultiOrdersDetails/index.js +2 -0
- package/_modules/themes/five/src/components/OrderContextUI/index.js +192 -0
- package/_modules/themes/five/src/components/OrderContextUI/styles.js +41 -0
- package/_modules/themes/five/src/components/OrderDetails/index.js +3 -0
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +8 -2
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +8 -2
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +17 -8
- package/_modules/themes/five/src/components/ProductItemAccordion/styles.js +27 -27
- package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +7 -2
- package/_modules/themes/five/src/components/ProductOptionSubOption/styles.js +17 -14
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +16 -16
- package/_modules/themes/five/src/components/SingleOrderCard/styles.js +49 -41
- package/package.json +2 -1
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +12 -12
- package/src/themes/five/index.js +2 -0
- package/src/themes/five/src/components/AddressList/index.js +3 -2
- package/src/themes/five/src/components/BusinessItemAccordion/index.js +2 -1
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
- package/src/themes/five/src/components/BusinessProductsList/index.js +54 -18
- package/src/themes/five/src/components/BusinessProductsListing/index.js +14 -2
- package/src/themes/five/src/components/BusinessProductsListing/styles.js +18 -6
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -85
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +2 -77
- package/src/themes/five/src/components/Cart/index.js +6 -3
- package/src/themes/five/src/components/CartContent/index.js +61 -3
- package/src/themes/five/src/components/CartContent/styles.js +6 -0
- package/src/themes/five/src/components/Checkout/index.js +16 -2
- package/src/themes/five/src/components/Checkout/styles.js +19 -6
- package/src/themes/five/src/components/Header/index.js +281 -277
- package/src/themes/five/src/components/Header/styles.js +20 -51
- package/src/themes/five/src/components/HeaderOption/index.js +3 -2
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +2 -1
- package/src/themes/five/src/components/MultiCheckout/index.js +26 -6
- package/src/themes/five/src/components/MultiCheckout/styles.js +8 -13
- package/src/themes/five/src/components/MultiOrdersDetails/index.js +2 -0
- package/src/themes/five/src/components/OrderContextUI/index.js +133 -0
- package/src/themes/five/src/components/OrderContextUI/styles.js +86 -0
- package/src/themes/five/src/components/OrderDetails/index.js +4 -0
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +5 -2
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +4 -0
- package/src/themes/five/src/components/ProductItemAccordion/index.js +58 -40
- package/src/themes/five/src/components/ProductItemAccordion/styles.js +4 -3
- package/src/themes/five/src/components/ProductOptionSubOption/index.js +8 -1
- package/src/themes/five/src/components/ProductOptionSubOption/styles.js +6 -0
- package/src/themes/five/src/components/SingleOrderCard/index.js +12 -13
- package/src/themes/five/src/components/SingleOrderCard/styles.js +26 -7
- package/template/app.js +1 -1
- package/template/components/ListenPageChanges/index.js +3 -2
- package/template/components/OrderingThemeUpdated/index.js +41 -0
- package/template/helmetdata.json +7 -0
- package/template/pages/MessagesList/index.js +2 -0
- package/template/pages/MultiCart/index.js +24 -0
- package/template/pages/MultiCheckout/index.js +86 -10
- package/template/pages/MultiOrdersDetails/index.js +9 -4
- package/_bundles/0.ordering-ui.8e20ae6af39ad738a29e.js +0 -1
|
@@ -5,7 +5,7 @@ export const Header = styled.div`
|
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
width: 100%;
|
|
8
|
-
background-color: ${props => props.isChew && props.theme.colors.primary};
|
|
8
|
+
background-color: ${props => (props.isChew && props.theme.colors.primary) || props.theme?.header?.components?.style?.backgroundColor};
|
|
9
9
|
border-bottom: ${props => !props.isChew && css`1px solid #E9ECEF`};
|
|
10
10
|
`
|
|
11
11
|
|
|
@@ -16,31 +16,32 @@ export const InnerHeader = styled.div`
|
|
|
16
16
|
justify-content: space-between;
|
|
17
17
|
margin: 15px 0;
|
|
18
18
|
align-items: center;
|
|
19
|
-
|
|
20
19
|
#left-side {
|
|
21
20
|
width: ${({ theme }) => theme?.header?.components?.layout?.type === 'starbucks' ? '30%' : '25%'};
|
|
22
21
|
justify-content: flex-start;
|
|
23
22
|
}
|
|
24
23
|
#right-side {
|
|
25
|
-
width: ${({ theme }) => theme?.header?.components?.layout?.type === 'starbucks' ? '30%' : '
|
|
24
|
+
width: ${({ theme }) => theme?.header?.components?.layout?.type === 'starbucks' ? '30%' : '40%'};
|
|
26
25
|
justify-content: flex-end;
|
|
27
26
|
}
|
|
28
27
|
#center-side {
|
|
29
28
|
width: ${({ theme }) => theme?.header?.components?.layout?.type === 'starbucks' ? 'calc(60% - 140px)' : 'calc(60% - 30px)'};
|
|
30
29
|
}
|
|
31
|
-
|
|
30
|
+
@media (min-width: 768px) {
|
|
31
|
+
#left-side {
|
|
32
|
+
width: ${({ theme }) => theme?.header?.components?.layout?.type === 'starbucks' ? '30%' : 'initial'};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
32
35
|
@media (min-width: 1024px) {
|
|
33
36
|
#center-side {
|
|
34
37
|
width: calc(60% - 140px);
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
|
-
|
|
38
40
|
@media (min-width: 1200px) {
|
|
39
41
|
#center-side {
|
|
40
42
|
width: calc(60% - 200px);
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
|
-
|
|
44
45
|
@media (min-width: 1500px) {
|
|
45
46
|
#center-side {
|
|
46
47
|
width: calc(60% - 260px);
|
|
@@ -50,32 +51,27 @@ export const InnerHeader = styled.div`
|
|
|
50
51
|
|
|
51
52
|
export const LogoHeader = styled.div`
|
|
52
53
|
cursor: pointer;
|
|
53
|
-
|
|
54
54
|
img {
|
|
55
55
|
width: ${props => props.isChew ? '70px' : props.imgW ?? '35px'};
|
|
56
56
|
height: ${props => props.isChew ? '20px' : props.imgH ?? '45px'};
|
|
57
57
|
margin: 0;
|
|
58
58
|
vertical-align: middle;
|
|
59
59
|
margin-left: 10px;
|
|
60
|
-
|
|
61
60
|
${props => props.theme?.rtl && css`
|
|
62
61
|
margin-right: 10px;
|
|
63
62
|
margin-left: 0;
|
|
64
63
|
`}
|
|
65
|
-
|
|
66
|
-
@media (min-width: 768px) {
|
|
64
|
+
@media (min-width: 769px) {
|
|
67
65
|
width: ${props => props.imgW ?? '150px'};
|
|
68
66
|
height: ${props => props.isChew && '35px'};
|
|
69
67
|
}
|
|
70
68
|
}
|
|
71
|
-
|
|
72
69
|
${props => !props.disabledResponsive && css`
|
|
73
70
|
img:nth-child(1) {
|
|
74
71
|
display: none;
|
|
75
72
|
}
|
|
76
73
|
`}
|
|
77
|
-
|
|
78
|
-
@media (min-width: 768px) {
|
|
74
|
+
@media (min-width: 769px) {
|
|
79
75
|
img:nth-child(1) {
|
|
80
76
|
display: block;
|
|
81
77
|
}
|
|
@@ -94,7 +90,6 @@ export const LeftHeader = styled.div`
|
|
|
94
90
|
export const RightHeader = styled.div`
|
|
95
91
|
align-self: center;
|
|
96
92
|
display: flex;
|
|
97
|
-
|
|
98
93
|
#select-input {
|
|
99
94
|
div {
|
|
100
95
|
color: ${props => props.theme.colors.darkTextColor};
|
|
@@ -105,27 +100,21 @@ export const RightHeader = styled.div`
|
|
|
105
100
|
export const Menu = styled.div`
|
|
106
101
|
display: flex;
|
|
107
102
|
align-items: center;
|
|
108
|
-
|
|
109
103
|
#select-input {
|
|
110
104
|
border-radius: 7.6px;
|
|
111
|
-
|
|
112
105
|
#list {
|
|
113
106
|
border-radius: 7.6px;
|
|
114
107
|
}
|
|
115
|
-
|
|
116
108
|
${({ isCustomerMode }) => !isCustomerMode && css`
|
|
117
109
|
margin: 0px 5px;
|
|
118
110
|
height: 40px;
|
|
119
|
-
|
|
120
111
|
svg {
|
|
121
112
|
font-size: 16px;
|
|
122
113
|
}
|
|
123
|
-
|
|
124
114
|
> div:first-child {
|
|
125
115
|
height: 100%;
|
|
126
116
|
padding-left: 10px;
|
|
127
117
|
padding-right: 10px;
|
|
128
|
-
|
|
129
118
|
@media (min-width: 993px) {
|
|
130
119
|
padding-left: 13px;
|
|
131
120
|
padding-right: 13px;
|
|
@@ -133,13 +122,12 @@ export const Menu = styled.div`
|
|
|
133
122
|
}
|
|
134
123
|
`}
|
|
135
124
|
}
|
|
136
|
-
|
|
137
125
|
&.left-header {
|
|
138
126
|
background: #F8F9FA;
|
|
139
127
|
border: none;
|
|
140
128
|
box-sizing: border-box;
|
|
141
129
|
border-radius: ${props => props.isChew ? '8px' : '50px'};
|
|
142
|
-
margin: 0
|
|
130
|
+
margin: 0 20px;
|
|
143
131
|
flex-grow: 1;
|
|
144
132
|
padding: 0 10px;
|
|
145
133
|
display: flex;
|
|
@@ -147,38 +135,31 @@ export const Menu = styled.div`
|
|
|
147
135
|
justify-content: center;
|
|
148
136
|
position: relative;
|
|
149
137
|
height: 44px;
|
|
150
|
-
|
|
151
138
|
@media (min-width: 821px) {
|
|
152
139
|
border: 1px solid #DEE2E6;
|
|
153
140
|
justify-content: space-between;
|
|
154
141
|
}
|
|
155
|
-
|
|
156
142
|
@media (min-width: 1024px) {
|
|
157
143
|
padding: 0 20px;
|
|
158
144
|
margin-left: 45px;
|
|
159
145
|
}
|
|
160
|
-
|
|
161
146
|
@media (min-width: 1200px) {
|
|
162
147
|
padding: 0 30px;
|
|
163
148
|
margin-left: 50px;
|
|
164
149
|
}
|
|
165
|
-
|
|
166
150
|
@media (min-width: 1500px) {
|
|
167
151
|
padding: 0 30px;
|
|
168
152
|
margin: 0 75px;
|
|
169
153
|
}
|
|
170
154
|
}
|
|
171
|
-
|
|
172
155
|
> *:not(:last-child) {
|
|
173
156
|
margin: 0 5px;
|
|
174
157
|
}
|
|
175
|
-
|
|
176
158
|
> span {
|
|
177
159
|
#select-input {
|
|
178
160
|
background: transparent !important;
|
|
179
161
|
}
|
|
180
162
|
}
|
|
181
|
-
|
|
182
163
|
.moment-popover {
|
|
183
164
|
border-left: 1px solid #DEE2E6;
|
|
184
165
|
border-right: 1px solid #DEE2E6;
|
|
@@ -186,7 +167,6 @@ export const Menu = styled.div`
|
|
|
186
167
|
justify-content: center;
|
|
187
168
|
width: 200px;
|
|
188
169
|
display: none;
|
|
189
|
-
|
|
190
170
|
@media (min-width: 1175px) {
|
|
191
171
|
width: 250px;
|
|
192
172
|
}
|
|
@@ -194,14 +174,12 @@ export const Menu = styled.div`
|
|
|
194
174
|
@media (min-width: 1400px) {
|
|
195
175
|
width: 400px;
|
|
196
176
|
}
|
|
197
|
-
|
|
198
177
|
> div:first-child {
|
|
199
178
|
width: 100%;
|
|
200
179
|
display: flex;
|
|
201
180
|
justify-content: center;
|
|
202
181
|
}
|
|
203
182
|
}
|
|
204
|
-
|
|
205
183
|
.address-popover {
|
|
206
184
|
flex-grow: 1;
|
|
207
185
|
display: none;
|
|
@@ -209,16 +187,12 @@ export const Menu = styled.div`
|
|
|
209
187
|
width: 100%;
|
|
210
188
|
}
|
|
211
189
|
}
|
|
212
|
-
|
|
213
190
|
.order-type {
|
|
214
191
|
padding: 0 10px;
|
|
215
|
-
|
|
216
192
|
@media (min-width: 1200px) {
|
|
217
193
|
padding: 0 20px;
|
|
218
194
|
}
|
|
219
195
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
196
|
@media (min-width: 821px) {
|
|
223
197
|
.moment-popover,
|
|
224
198
|
.address-popover {
|
|
@@ -237,13 +211,11 @@ export const MenuLink = styled.a`
|
|
|
237
211
|
padding: 10px;
|
|
238
212
|
color: #333;
|
|
239
213
|
cursor: pointer;
|
|
240
|
-
|
|
241
214
|
${({ highlight }) => highlight && css`
|
|
242
215
|
background-color: ${props => props.theme.colors.primary};
|
|
243
216
|
color: ${props => props.theme.colors.primaryContrast};
|
|
244
217
|
border-radius: 7.6px;
|
|
245
218
|
padding: 11px 15px;
|
|
246
|
-
|
|
247
219
|
&:hover {
|
|
248
220
|
background: ${props => darken(0.07, props.theme.colors.primary)};
|
|
249
221
|
color: #FFF;
|
|
@@ -259,7 +231,6 @@ export const SubMenu = styled(InnerHeader)`
|
|
|
259
231
|
box-sizing: border-box;
|
|
260
232
|
margin: 0px;
|
|
261
233
|
position: relative;
|
|
262
|
-
|
|
263
234
|
@media (min-width: 821px) {
|
|
264
235
|
display: none;
|
|
265
236
|
}
|
|
@@ -274,7 +245,6 @@ export const CustomerInfo = styled.div`
|
|
|
274
245
|
display: flex;
|
|
275
246
|
justify-content: center;
|
|
276
247
|
align-items: center;
|
|
277
|
-
|
|
278
248
|
span {
|
|
279
249
|
display: flex;
|
|
280
250
|
align-items: center;
|
|
@@ -310,7 +280,6 @@ export const AddressMenu = styled.div`
|
|
|
310
280
|
display: flex;
|
|
311
281
|
align-items: center;
|
|
312
282
|
position: relative;
|
|
313
|
-
|
|
314
283
|
span {
|
|
315
284
|
width: 85%;
|
|
316
285
|
p {
|
|
@@ -321,13 +290,11 @@ export const AddressMenu = styled.div`
|
|
|
321
290
|
overflow: hidden;
|
|
322
291
|
}
|
|
323
292
|
}
|
|
324
|
-
|
|
325
293
|
${({ isCustomerMode }) => isCustomerMode ? css`
|
|
326
294
|
flex: 0.8;
|
|
327
295
|
` : css`
|
|
328
296
|
width: 50%;
|
|
329
297
|
`}
|
|
330
|
-
|
|
331
298
|
svg {
|
|
332
299
|
color: ${props => props.theme.colors?.lightGray};
|
|
333
300
|
font-size: 16px;
|
|
@@ -360,15 +327,12 @@ export const MomentMenu = styled.div`
|
|
|
360
327
|
@media (min-width: 821px) {
|
|
361
328
|
display: flex;
|
|
362
329
|
}
|
|
363
|
-
|
|
364
330
|
@media (min-width: 1175px) {
|
|
365
331
|
width: 250px;
|
|
366
332
|
}
|
|
367
|
-
|
|
368
333
|
@media (min-width: 1400px) {
|
|
369
334
|
width: 400px;
|
|
370
335
|
}
|
|
371
|
-
|
|
372
336
|
> div {
|
|
373
337
|
cursor: pointer;
|
|
374
338
|
font-size: 14px;
|
|
@@ -395,13 +359,11 @@ export const FarAwayMessage = styled.div`
|
|
|
395
359
|
padding: 6px 15px;
|
|
396
360
|
box-sizing: border-box;
|
|
397
361
|
margin: 10px 0px 0px 0px !important;
|
|
398
|
-
|
|
399
362
|
left: 5px;
|
|
400
363
|
${props => props.theme?.rtl && css`
|
|
401
364
|
right: 5px;
|
|
402
365
|
left: initial;
|
|
403
366
|
`}
|
|
404
|
-
|
|
405
367
|
svg {
|
|
406
368
|
font-size: 20px;
|
|
407
369
|
color: ${props => props.theme.colors.warning500};
|
|
@@ -416,7 +378,6 @@ export const FarAwayMessage = styled.div`
|
|
|
416
378
|
line-height: 18px;
|
|
417
379
|
color: ${props => props.theme.colors.headingColor};
|
|
418
380
|
}
|
|
419
|
-
|
|
420
381
|
@media (min-width: 400px) {
|
|
421
382
|
padding: 8px 20px;
|
|
422
383
|
font-size: 14px;
|
|
@@ -457,11 +418,9 @@ export const LanguageSelectorWrapper = styled(InputGroup)`
|
|
|
457
418
|
border-color: #F8F9FA;
|
|
458
419
|
background-color: #F8F9FA !important;
|
|
459
420
|
height: 44px;
|
|
460
|
-
|
|
461
421
|
> div:first-child {
|
|
462
422
|
height: 44px;
|
|
463
423
|
}
|
|
464
|
-
|
|
465
424
|
#list {
|
|
466
425
|
border-radius: 7.6px;
|
|
467
426
|
background: #F8F9FA !important;
|
|
@@ -488,3 +447,13 @@ export const HeaderSearchMode = styled.div`
|
|
|
488
447
|
width: 250px;
|
|
489
448
|
}
|
|
490
449
|
`
|
|
450
|
+
|
|
451
|
+
export const LeftSide = styled.div`
|
|
452
|
+
display: flex;
|
|
453
|
+
width: 100%;
|
|
454
|
+
@media (min-width: 769px){
|
|
455
|
+
flex-direction: ${({ theme }) =>
|
|
456
|
+
theme?.header?.components?.logo?.components?.layout?.position === 'center' ? 'row-reverse' : 'row'};
|
|
457
|
+
width: 60%;
|
|
458
|
+
}
|
|
459
|
+
`
|
|
@@ -39,6 +39,7 @@ export const HeaderOption = (props) => {
|
|
|
39
39
|
isChew={isChew}
|
|
40
40
|
onClick={() => props.onClick(variant)}
|
|
41
41
|
isHome={props.isHome}
|
|
42
|
+
style={props.containerStyle}
|
|
42
43
|
>
|
|
43
44
|
{variant === 'cart' && (
|
|
44
45
|
<span>
|
|
@@ -47,10 +48,10 @@ export const HeaderOption = (props) => {
|
|
|
47
48
|
</span>
|
|
48
49
|
)}
|
|
49
50
|
{variant === 'address' && (
|
|
50
|
-
|
|
51
|
+
<span>
|
|
51
52
|
<FaMapMarkerAlt id='icon' />
|
|
52
53
|
{addressState || t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')}
|
|
53
|
-
|
|
54
|
+
</span>
|
|
54
55
|
)}
|
|
55
56
|
{variant === 'moment' && (
|
|
56
57
|
<>
|
|
@@ -45,6 +45,7 @@ export const OriginalHomeHero = (props) => {
|
|
|
45
45
|
const logo = orderingTheme?.theme?.my_products?.components?.images?.components?.logo?.components?.image
|
|
46
46
|
const mobileBgImg = orderingTheme?.theme?.my_products?.components?.images?.components?.homepage_mobile_background?.components?.image
|
|
47
47
|
const isFullScreen = orderingTheme?.theme?.my_products?.components?.images?.components?.homepage_image_fullscreen
|
|
48
|
+
const isChew = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
48
49
|
const enabledPoweredByOrdering = configs?.powered_by_ordering_module?.value
|
|
49
50
|
const handleFindBusinesses = () => {
|
|
50
51
|
if (!orderState?.options?.address?.location) {
|
|
@@ -112,7 +113,7 @@ export const OriginalHomeHero = (props) => {
|
|
|
112
113
|
isFullScreen={isFullScreen}
|
|
113
114
|
>
|
|
114
115
|
<ContentWrapper>
|
|
115
|
-
{windowSize.width < 576 && (
|
|
116
|
+
{windowSize.width < 576 && !isChew && (
|
|
116
117
|
<LogoWrapper>
|
|
117
118
|
<img alt='Logotype' src={logo || theme?.images?.logos?.logotypeInvert} loading='lazy' />
|
|
118
119
|
</LogoWrapper>
|
|
@@ -61,7 +61,8 @@ const MultiCheckoutUI = (props) => {
|
|
|
61
61
|
handlePaymethodDataChange,
|
|
62
62
|
onRedirectPage,
|
|
63
63
|
cartGroup,
|
|
64
|
-
cartUuid
|
|
64
|
+
cartUuid,
|
|
65
|
+
totalCartsFee
|
|
65
66
|
} = props
|
|
66
67
|
|
|
67
68
|
const [, t] = useLanguage()
|
|
@@ -82,6 +83,7 @@ const MultiCheckoutUI = (props) => {
|
|
|
82
83
|
const walletCarts = (Object.values(orderState?.carts)?.filter(cart => cart?.products && cart?.products?.length && cart?.status !== 2 && cart?.valid_schedule && cart?.valid_products && cart?.valid_address && cart?.valid_maximum && cart?.valid_minimum && cart?.wallets) || null) || []
|
|
83
84
|
const isMultiDriverTips = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
84
85
|
const driverTipsOptions = typeof configs?.driver_tip_options?.value === 'string'
|
|
86
|
+
const totalFeeEnabled = configs?.multi_business_checkout_show_combined_delivery_fee?.value === '1'
|
|
85
87
|
? JSON.parse(configs?.driver_tip_options?.value) || []
|
|
86
88
|
: configs?.driver_tip_options?.value || []
|
|
87
89
|
|
|
@@ -152,13 +154,13 @@ const MultiCheckoutUI = (props) => {
|
|
|
152
154
|
}, [validationFields, user, customerState])
|
|
153
155
|
|
|
154
156
|
useEffect(() => {
|
|
155
|
-
if (openCarts.length) return
|
|
157
|
+
if (openCarts.length || cartGroup.loading) return
|
|
156
158
|
onRedirectPage && onRedirectPage({ page: 'search' })
|
|
157
|
-
}, [openCarts])
|
|
159
|
+
}, [openCarts, cartGroup])
|
|
158
160
|
|
|
159
161
|
return (
|
|
160
162
|
<>
|
|
161
|
-
{openCarts.length === 0 ? (
|
|
163
|
+
{!cartGroup?.loading && openCarts.length === 0 ? (
|
|
162
164
|
<NotFoundSource
|
|
163
165
|
content={t('CARTS_NOT_FOUND', 'You don’t have carts available')}
|
|
164
166
|
/>
|
|
@@ -241,8 +243,10 @@ const MultiCheckoutUI = (props) => {
|
|
|
241
243
|
<Cart
|
|
242
244
|
isCartPending={cart?.status === 2}
|
|
243
245
|
cart={cart}
|
|
244
|
-
isMultiCheckout={
|
|
246
|
+
isMultiCheckout={isMultiDriverTips}
|
|
245
247
|
isProducts={cart?.products?.length || 0}
|
|
248
|
+
hideDeliveryFee={configs?.multi_business_checkout_show_combined_delivery_fee?.value === '1'}
|
|
249
|
+
hideDriverTip={configs?.multi_business_checkout_show_combined_driver_tip?.value === '1'}
|
|
246
250
|
/>
|
|
247
251
|
<DriverTipDivider />
|
|
248
252
|
</React.Fragment>
|
|
@@ -253,7 +257,23 @@ const MultiCheckoutUI = (props) => {
|
|
|
253
257
|
</WarningText>
|
|
254
258
|
)}
|
|
255
259
|
{openCarts.length > 0 && (
|
|
256
|
-
<MultiCartPriceContainer>
|
|
260
|
+
<MultiCartPriceContainer totalFeeEnabled={totalFeeEnabled}>
|
|
261
|
+
{totalCartsFee &&
|
|
262
|
+
configs?.multi_business_checkout_show_combined_delivery_fee?.value === '1' &&
|
|
263
|
+
(
|
|
264
|
+
<span>
|
|
265
|
+
<p>{t('TOTAL_DELIVERY_FEE', 'Total delivery fee')}</p>
|
|
266
|
+
<p>{parsePrice(totalCartsFee)}</p>
|
|
267
|
+
</span>
|
|
268
|
+
)}
|
|
269
|
+
{openCarts.reduce((sum, cart) => sum + cart?.driver_tip, 0) > 0 &&
|
|
270
|
+
configs?.multi_business_checkout_show_combined_driver_tip?.value === '1' &&
|
|
271
|
+
(
|
|
272
|
+
<span>
|
|
273
|
+
<p>{t('DRIVER_TIP', 'Driver tip')}</p>
|
|
274
|
+
<p>{parsePrice(openCarts.reduce((sum, cart) => sum + cart?.driver_tip, 0))}</p>
|
|
275
|
+
</span>
|
|
276
|
+
)}
|
|
257
277
|
<div>
|
|
258
278
|
<h4>{t('TOTAL_FOR_ALL_CARTS', 'Total for all Carts')}</h4>
|
|
259
279
|
<h4>{parsePrice(totalCartsPrice)}</h4>
|
|
@@ -5,11 +5,9 @@ export const Container = styled.div`
|
|
|
5
5
|
width: 100%;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
min-height: auto;
|
|
8
|
-
|
|
9
8
|
@media (min-width: 769px) {
|
|
10
9
|
flex-direction: row;
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
@media (min-width: 993px) {
|
|
14
12
|
min-height: calc(100vh - 337px);
|
|
15
13
|
box-sizing: border-box;
|
|
@@ -19,7 +17,6 @@ export const WrapperLeftContainer = styled.div`
|
|
|
19
17
|
width: 100%;
|
|
20
18
|
box-sizing: border-box;
|
|
21
19
|
padding: 30px 20px;
|
|
22
|
-
|
|
23
20
|
@media (min-width: 769px) {
|
|
24
21
|
width: 55%;
|
|
25
22
|
padding: 30px 60px 55px 40px;
|
|
@@ -27,14 +24,12 @@ export const WrapperLeftContainer = styled.div`
|
|
|
27
24
|
`
|
|
28
25
|
export const WrapperLeftContent = styled.div`
|
|
29
26
|
width: 100%;
|
|
30
|
-
|
|
31
27
|
.checkout-title {
|
|
32
28
|
margin: 0;
|
|
33
29
|
font-weight: 600;
|
|
34
30
|
font-size: 32px;
|
|
35
31
|
color: ${props => props.theme?.colors.darkTextColor};
|
|
36
32
|
}
|
|
37
|
-
|
|
38
33
|
.back-arrow {
|
|
39
34
|
font-size: 24px;
|
|
40
35
|
cursor: pointer;
|
|
@@ -46,7 +41,6 @@ export const WrapperRightContainer = styled.div`
|
|
|
46
41
|
background: #F8F9FA;
|
|
47
42
|
box-sizing: border-box;
|
|
48
43
|
padding: 40px 20px;
|
|
49
|
-
|
|
50
44
|
@media (min-width: 769px) {
|
|
51
45
|
width: 45%;
|
|
52
46
|
padding: 55px 40px;
|
|
@@ -90,17 +84,14 @@ export const CartHeader = styled.div`
|
|
|
90
84
|
align-items: flex-start;
|
|
91
85
|
justify-content: space-between;
|
|
92
86
|
flex-direction: column;
|
|
93
|
-
|
|
94
87
|
h1 {
|
|
95
88
|
font-weight: 600;
|
|
96
89
|
font-size: 20px;
|
|
97
90
|
line-height: 30px;
|
|
98
91
|
}
|
|
99
|
-
|
|
100
92
|
h1 {
|
|
101
93
|
margin: 5px 0px;
|
|
102
94
|
}
|
|
103
|
-
|
|
104
95
|
@media (min-width: 300px) {
|
|
105
96
|
flex-direction: row;
|
|
106
97
|
align-items: center;
|
|
@@ -111,24 +102,30 @@ export const DriverTipDivider = styled.div`
|
|
|
111
102
|
width: calc(100% + 40px);
|
|
112
103
|
margin-left: -20px;
|
|
113
104
|
background: #E9ECEF;
|
|
114
|
-
|
|
115
105
|
@media(min-width: 769px) {
|
|
116
106
|
width: calc(100% + 80px);
|
|
117
107
|
margin-left: -40px;
|
|
118
108
|
}
|
|
119
109
|
`
|
|
120
110
|
export const MultiCartPriceContainer = styled.div`
|
|
111
|
+
margin-top: 38px;
|
|
121
112
|
> div {
|
|
122
113
|
display: flex;
|
|
123
114
|
align-items: center;
|
|
124
115
|
justify-content: space-between;
|
|
125
|
-
margin-top: 38px;
|
|
116
|
+
margin-top: ${({ totalFeeEnabled }) => totalFeeEnabled ? '5px' : '38px'};
|
|
126
117
|
margin-bottom: 5px;
|
|
127
118
|
> h4 {
|
|
128
119
|
font-size: 18px;
|
|
129
120
|
margin: 0;
|
|
130
121
|
}
|
|
131
122
|
}
|
|
123
|
+
> span {
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: center;
|
|
126
|
+
justify-content: space-between;
|
|
127
|
+
margin-bottom: 5px;
|
|
128
|
+
}
|
|
132
129
|
p {
|
|
133
130
|
font-size: 14px;
|
|
134
131
|
color: ${props => props.theme.colors.darkGray};
|
|
@@ -151,12 +148,10 @@ export const WrapperPlaceOrderButton = styled.div`
|
|
|
151
148
|
width: 100%;
|
|
152
149
|
display: flex;
|
|
153
150
|
justify-content: center;
|
|
154
|
-
|
|
155
151
|
button {
|
|
156
152
|
width: 100%;
|
|
157
153
|
padding: 5px 20px;
|
|
158
154
|
cursor: pointer;
|
|
159
|
-
|
|
160
155
|
&:disabled {
|
|
161
156
|
opacity: 0.5;
|
|
162
157
|
cursor: not-allowed;
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
} from './styles'
|
|
20
20
|
import { NotFoundSource } from '../NotFoundSource'
|
|
21
21
|
import { useTheme } from 'styled-components'
|
|
22
|
+
import { getOrderStatus } from '../../../../../utils'
|
|
22
23
|
|
|
23
24
|
const MultiOrdersDetailsUI = (props) => {
|
|
24
25
|
const {
|
|
@@ -161,6 +162,7 @@ const MultiOrdersDetailsUI = (props) => {
|
|
|
161
162
|
{orders.map(order => (
|
|
162
163
|
<SingleOrderCard
|
|
163
164
|
key={order.id}
|
|
165
|
+
getOrderStatus={getOrderStatus}
|
|
164
166
|
order={order}
|
|
165
167
|
/>
|
|
166
168
|
))}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { useLanguage, useOrder, useConfig, useSession } from 'ordering-components-external'
|
|
3
|
+
import { MomentPopover } from '../../../../pwa/src/components/MomentPopover'
|
|
4
|
+
import { OrderTypeSelectorHeader } from '../../../../../components/OrderTypeSelectorHeader'
|
|
5
|
+
import FaMapMarkerAlt from '@meronex/icons/fa/FaMapMarkerAlt'
|
|
6
|
+
import { Modal } from '../Modal'
|
|
7
|
+
import { AddressForm } from '../AddressForm'
|
|
8
|
+
import { AddressList } from '../AddressList'
|
|
9
|
+
import { Alert } from '../Confirm'
|
|
10
|
+
import {
|
|
11
|
+
Container,
|
|
12
|
+
AddressMenu,
|
|
13
|
+
FeatureItems,
|
|
14
|
+
ItemInline
|
|
15
|
+
} from './styles'
|
|
16
|
+
|
|
17
|
+
export const OrderContextUI = (props) => {
|
|
18
|
+
const { isCheckOut, setMapErrors, isCustomerMode, isBusinessList } = props
|
|
19
|
+
|
|
20
|
+
const [, t] = useLanguage()
|
|
21
|
+
const [orderState] = useOrder()
|
|
22
|
+
const [configState] = useConfig()
|
|
23
|
+
const [{ auth }] = useSession()
|
|
24
|
+
|
|
25
|
+
const [openPopover, setOpenPopover] = useState({})
|
|
26
|
+
const [modals, setModals] = useState({ listOpen: false, formOpen: false, citiesOpen: false })
|
|
27
|
+
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
28
|
+
|
|
29
|
+
const userCustomer = JSON.parse(window.localStorage.getItem('user-customer'))
|
|
30
|
+
|
|
31
|
+
const configTypes = configState?.configs?.order_types_allowed?.value.split('|').map(value => Number(value)) || []
|
|
32
|
+
|
|
33
|
+
const handleTogglePopover = (type) => {
|
|
34
|
+
setOpenPopover({
|
|
35
|
+
...openPopover,
|
|
36
|
+
[type]: !openPopover[type]
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const handleClosePopover = (type) => {
|
|
41
|
+
setOpenPopover({
|
|
42
|
+
...openPopover,
|
|
43
|
+
[type]: false
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const handleFindBusinesses = () => {
|
|
48
|
+
if (!orderState?.options?.address?.location) {
|
|
49
|
+
setAlertState({ open: true, content: [t('SELECT_AN_ADDRESS_TO_SEARCH', 'Select or add an address to search')] })
|
|
50
|
+
return
|
|
51
|
+
}
|
|
52
|
+
setModals({ listOpen: false, formOpen: false })
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const handleCloseAlerts = () => {
|
|
56
|
+
setAlertState({ open: false, content: [] })
|
|
57
|
+
setMapErrors && setMapErrors('')
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const handleClickAddress = (e) => {
|
|
61
|
+
if (auth) {
|
|
62
|
+
setModals({ ...modals, listOpen: true })
|
|
63
|
+
} else {
|
|
64
|
+
setModals({ ...modals, formOpen: true })
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<>
|
|
70
|
+
<Container isBusinessList={isBusinessList}>
|
|
71
|
+
<AddressMenu
|
|
72
|
+
onClick={() => handleClickAddress()}
|
|
73
|
+
isCheckOut={isCheckOut}
|
|
74
|
+
>
|
|
75
|
+
<FaMapMarkerAlt />
|
|
76
|
+
<span>{orderState.options?.address?.address || t('WHERE_DO_WE_DELIVERY', 'Where do we delivery?')}</span>
|
|
77
|
+
</AddressMenu>
|
|
78
|
+
<FeatureItems>
|
|
79
|
+
<ItemInline>
|
|
80
|
+
<OrderTypeSelectorHeader configTypes={configTypes} />
|
|
81
|
+
</ItemInline>
|
|
82
|
+
<ItemInline>
|
|
83
|
+
<MomentPopover
|
|
84
|
+
open={openPopover.moment}
|
|
85
|
+
onClick={() => handleTogglePopover('moment')}
|
|
86
|
+
onClose={() => handleClosePopover('moment')}
|
|
87
|
+
isBanner
|
|
88
|
+
/>
|
|
89
|
+
</ItemInline>
|
|
90
|
+
</FeatureItems>
|
|
91
|
+
</Container>
|
|
92
|
+
<Modal
|
|
93
|
+
title={t('ADDRESS_FORM', 'Address Form')}
|
|
94
|
+
open={modals.formOpen}
|
|
95
|
+
onClose={() => setModals({ ...modals, formOpen: false })}
|
|
96
|
+
>
|
|
97
|
+
<AddressForm
|
|
98
|
+
useValidationFileds
|
|
99
|
+
address={orderState?.options?.address || {}}
|
|
100
|
+
onClose={() => setModals({ ...modals, formOpen: false })}
|
|
101
|
+
onCancel={() => setModals({ ...modals, formOpen: false })}
|
|
102
|
+
onSaveAddress={() => setModals({ ...modals, formOpen: false })}
|
|
103
|
+
/>
|
|
104
|
+
</Modal>
|
|
105
|
+
|
|
106
|
+
<Modal
|
|
107
|
+
title={t('ADDRESSES', 'Address List')}
|
|
108
|
+
open={modals.listOpen}
|
|
109
|
+
width='70%'
|
|
110
|
+
onClose={() => setModals({ ...modals, listOpen: false })}
|
|
111
|
+
>
|
|
112
|
+
<AddressList
|
|
113
|
+
isModal
|
|
114
|
+
changeOrderAddressWithDefault
|
|
115
|
+
userId={isNaN(userCustomer?.id) ? null : userCustomer?.id}
|
|
116
|
+
onCancel={() => setModals({ ...modals, listOpen: false })}
|
|
117
|
+
onAccept={() => handleFindBusinesses()}
|
|
118
|
+
isCustomerMode={isCustomerMode}
|
|
119
|
+
isMobile
|
|
120
|
+
/>
|
|
121
|
+
</Modal>
|
|
122
|
+
<Alert
|
|
123
|
+
title={t('ORDERING', 'Ordering')}
|
|
124
|
+
content={alertState.content}
|
|
125
|
+
acceptText={t('ACCEPT', 'Accept')}
|
|
126
|
+
open={alertState.open}
|
|
127
|
+
onClose={() => handleCloseAlerts()}
|
|
128
|
+
onAccept={() => handleCloseAlerts()}
|
|
129
|
+
closeOnBackdrop={false}
|
|
130
|
+
/>
|
|
131
|
+
</>
|
|
132
|
+
)
|
|
133
|
+
}
|