ordering-ui-external 14.1.49 → 14.1.52
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.697d19ddfcc29dfbeb52.js → 7.ordering-ui.746cebc54de638e8e528.js} +1 -1
- package/_bundles/ordering-ui.746cebc54de638e8e528.js +2 -0
- package/_modules/components/GoogleGpsButton/index.js +11 -3
- package/_modules/components/VerticalOrdersLayout/styles.js +1 -1
- package/_modules/themes/callcenterOriginal/index.js +7 -0
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +22 -5
- package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +10 -7
- package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +59 -19
- package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +10 -4
- package/_modules/themes/callcenterOriginal/src/components/ConfirmAddressForm/index.js +638 -0
- package/_modules/themes/callcenterOriginal/src/components/ConfirmAddressForm/styles.js +50 -0
- package/_modules/themes/callcenterOriginal/src/components/Header/index.js +33 -4
- package/_modules/themes/callcenterOriginal/src/components/InputPhoneNumber/index.js +17 -10
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +58 -106
- package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +6 -29
- package/_modules/themes/callcenterOriginal/src/components/SearchBar/index.js +2 -2
- package/_modules/themes/callcenterOriginal/src/components/SignUpForm/index.js +21 -1
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/index.js +49 -8
- package/_modules/themes/callcenterOriginal/src/components/UserDetails/styles.js +12 -9
- package/_modules/themes/callcenterOriginal/src/components/UserFormDetails/index.js +30 -12
- package/_modules/themes/callcenterOriginal/src/components/UserFormDetails/styles.js +11 -5
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessController/franchises/OloBusinessController/index.js +192 -0
- package/_modules/themes/five/src/components/BusinessController/franchises/OloBusinessController/styles.js +114 -0
- package/_modules/themes/five/src/components/BusinessesListing/franchises/OloBusinessesListing/index.js +572 -0
- package/_modules/themes/five/src/components/BusinessesListing/franchises/OloBusinessesListing/styles.js +89 -0
- package/_modules/themes/five/src/components/BusinessesListing/index.js +6 -2
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +31 -118
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +1 -1
- package/_modules/themes/five/src/components/Checkout/OrderDetail.js +1 -3
- package/_modules/themes/five/src/components/Checkout/index.js +22 -4
- package/_modules/themes/five/src/components/DriverTips/styles.js +1 -1
- package/_modules/themes/five/src/components/Header/index.js +8 -7
- package/_modules/themes/five/src/components/Header/styles.js +28 -25
- package/_modules/themes/five/src/components/HighestRated/franchises/OloHighestRated/index.js +116 -0
- package/_modules/themes/five/src/components/HighestRated/franchises/OloHighestRated/styles.js +22 -0
- package/_modules/themes/five/src/components/HomeHero/franchises/OloHomeHero/index.js +136 -0
- package/_modules/themes/five/src/components/HomeHero/franchises/OloHomeHero/styles.js +46 -0
- package/_modules/themes/five/src/components/HomeHero/index.js +5 -2
- package/_modules/themes/five/src/components/InputPhoneNumber/index.js +19 -12
- package/_modules/themes/five/src/components/LogoutPopup/index.js +2 -1
- package/_modules/themes/five/src/components/Modal/index.js +6 -3
- package/_modules/themes/five/src/components/MultiOrdersDetails/styles.js +2 -2
- package/_modules/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +2 -1
- package/_modules/themes/five/src/components/OrderItAgain/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderTypesSquares/index.js +160 -0
- package/_modules/themes/five/src/components/OrderTypesSquares/styles.js +39 -0
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +4 -4
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +1 -1
- package/_modules/themes/five/src/components/SearchBar/index.js +2 -2
- package/_modules/themes/five/src/components/SignUpForm/index.js +11 -8
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/styles.js +1 -1
- package/_modules/themes/five/src/components/UserDetails/index.js +5 -2
- package/_modules/themes/five/src/styles/Buttons/index.js +1 -1
- package/index-template.js +9 -1
- package/package.json +2 -2
- package/src/components/GoogleGpsButton/index.js +10 -2
- package/src/components/VerticalOrdersLayout/styles.js +2 -2
- package/src/themes/callcenterOriginal/index.js +2 -0
- package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +44 -23
- package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +8 -0
- package/src/themes/callcenterOriginal/src/components/AddressList/index.js +67 -22
- package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +16 -1
- package/src/themes/callcenterOriginal/src/components/ConfirmAddressForm/index.js +579 -0
- package/src/themes/callcenterOriginal/src/components/ConfirmAddressForm/styles.js +275 -0
- package/src/themes/callcenterOriginal/src/components/Header/index.js +22 -0
- package/src/themes/callcenterOriginal/src/components/InputPhoneNumber/index.js +13 -8
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +34 -100
- package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +0 -52
- package/src/themes/callcenterOriginal/src/components/SearchBar/index.js +2 -2
- package/src/themes/callcenterOriginal/src/components/SignUpForm/index.js +19 -1
- package/src/themes/callcenterOriginal/src/components/UserDetails/index.js +45 -11
- package/src/themes/callcenterOriginal/src/components/UserDetails/styles.js +3 -1
- package/src/themes/callcenterOriginal/src/components/UserFormDetails/index.js +40 -14
- package/src/themes/callcenterOriginal/src/components/UserFormDetails/styles.js +19 -1
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +1 -1
- package/src/themes/five/src/components/BusinessController/franchises/OloBusinessController/index.js +237 -0
- package/src/themes/five/src/components/BusinessController/franchises/OloBusinessController/styles.js +367 -0
- package/src/themes/five/src/components/BusinessesListing/franchises/OloBusinessesListing/index.js +582 -0
- package/src/themes/five/src/components/BusinessesListing/franchises/OloBusinessesListing/styles.js +307 -0
- package/src/themes/five/src/components/BusinessesListing/index.js +19 -4
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +7 -104
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +2 -2
- package/src/themes/five/src/components/Checkout/OrderDetail.js +1 -5
- package/src/themes/five/src/components/Checkout/index.js +20 -2
- package/src/themes/five/src/components/DriverTips/styles.js +1 -0
- package/src/themes/five/src/components/Header/index.js +17 -12
- package/src/themes/five/src/components/Header/styles.js +51 -4
- package/src/themes/five/src/components/HighestRated/franchises/OloHighestRated/index.js +114 -0
- package/src/themes/five/src/components/HighestRated/franchises/OloHighestRated/styles.js +57 -0
- package/src/themes/five/src/components/HomeHero/franchises/OloHomeHero/index.js +122 -0
- package/src/themes/five/src/components/HomeHero/franchises/OloHomeHero/styles.js +125 -0
- package/src/themes/five/src/components/HomeHero/index.js +16 -3
- package/src/themes/five/src/components/InputPhoneNumber/index.js +14 -9
- package/src/themes/five/src/components/LogoutPopup/index.js +3 -1
- package/src/themes/five/src/components/Modal/index.js +6 -3
- package/src/themes/five/src/components/MultiOrdersDetails/styles.js +3 -3
- package/src/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +3 -1
- package/src/themes/five/src/components/OrderItAgain/styles.js +2 -0
- package/src/themes/five/src/components/OrderTypesSquares/index.js +157 -0
- package/src/themes/five/src/components/OrderTypesSquares/styles.js +62 -0
- package/src/themes/five/src/components/ProductItemAccordion/index.js +2 -2
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +2 -0
- package/src/themes/five/src/components/SearchBar/index.js +2 -2
- package/src/themes/five/src/components/SignUpForm/index.js +5 -3
- package/src/themes/five/src/components/SingleProductCard/layouts/original/styles.js +1 -1
- package/src/themes/five/src/components/UserDetails/index.js +3 -1
- package/src/themes/five/src/styles/Buttons/index.js +2 -2
- package/template/app.js +14 -11
- package/template/assets/images/catering.svg +13 -0
- package/template/assets/images/curbside.svg +19 -0
- package/template/assets/images/drivethru.svg +19 -0
- package/template/assets/images/eatin.svg +17 -0
- package/template/components/SubdomainComponent/index.js +4 -8
- package/template/pages/BusinessesList/index.js +1 -1
- package/_bundles/ordering-ui.697d19ddfcc29dfbeb52.js +0 -2
- /package/_bundles/{0.ordering-ui.697d19ddfcc29dfbeb52.js → 0.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{1.ordering-ui.697d19ddfcc29dfbeb52.js → 1.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{2.ordering-ui.697d19ddfcc29dfbeb52.js → 2.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{4.ordering-ui.697d19ddfcc29dfbeb52.js → 4.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{5.ordering-ui.697d19ddfcc29dfbeb52.js → 5.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{6.ordering-ui.697d19ddfcc29dfbeb52.js → 6.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{7.ordering-ui.697d19ddfcc29dfbeb52.js.LICENSE.txt → 7.ordering-ui.746cebc54de638e8e528.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.697d19ddfcc29dfbeb52.js → 8.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{9.ordering-ui.697d19ddfcc29dfbeb52.js → 9.ordering-ui.746cebc54de638e8e528.js} +0 -0
- /package/_bundles/{ordering-ui.697d19ddfcc29dfbeb52.js.LICENSE.txt → ordering-ui.746cebc54de638e8e528.js.LICENSE.txt} +0 -0
|
@@ -16,6 +16,7 @@ export const InnerHeader = styled.div`
|
|
|
16
16
|
justify-content: space-between;
|
|
17
17
|
margin: 15px 0;
|
|
18
18
|
align-items: center;
|
|
19
|
+
|
|
19
20
|
#left-side {
|
|
20
21
|
width: ${({ theme }) => theme?.header?.components?.layout?.type === 'starbucks' ? '30%' : '25%'};
|
|
21
22
|
justify-content: flex-start;
|
|
@@ -27,6 +28,7 @@ export const InnerHeader = styled.div`
|
|
|
27
28
|
#center-side {
|
|
28
29
|
width: ${({ theme }) => theme?.header?.components?.layout?.type === 'starbucks' ? 'calc(60% - 140px)' : 'calc(60% - 30px)'};
|
|
29
30
|
}
|
|
31
|
+
|
|
30
32
|
@media (min-width: 768px) {
|
|
31
33
|
#left-side {
|
|
32
34
|
width: ${({ theme }) => theme?.header?.components?.layout?.type === 'starbucks' ? '30%' : 'initial'};
|
|
@@ -35,16 +37,19 @@ export const InnerHeader = styled.div`
|
|
|
35
37
|
width: calc(100% - 60px);
|
|
36
38
|
}
|
|
37
39
|
}
|
|
40
|
+
|
|
38
41
|
@media (min-width: 1024px) {
|
|
39
42
|
#center-side {
|
|
40
43
|
width: calc(100% - 140px);
|
|
41
44
|
}
|
|
42
45
|
}
|
|
46
|
+
|
|
43
47
|
@media (min-width: 1200px) {
|
|
44
48
|
#center-side {
|
|
45
49
|
width: calc(70% - 200px);
|
|
46
50
|
}
|
|
47
51
|
}
|
|
52
|
+
|
|
48
53
|
@media (min-width: 1500px) {
|
|
49
54
|
#center-side {
|
|
50
55
|
width: calc(60% - 260px);
|
|
@@ -54,30 +59,35 @@ export const InnerHeader = styled.div`
|
|
|
54
59
|
|
|
55
60
|
export const LogoHeader = styled.div`
|
|
56
61
|
cursor: pointer;
|
|
62
|
+
|
|
57
63
|
img {
|
|
58
64
|
width: ${props => props.isChew ? '70px' : props.imgW ?? '35px'};
|
|
59
65
|
height: ${props => props.isChew ? '20px' : props.imgH ?? '45px'};
|
|
60
66
|
margin: 0;
|
|
61
67
|
vertical-align: middle;
|
|
62
68
|
margin-left: 10px;
|
|
69
|
+
|
|
63
70
|
${props => props.theme?.rtl && css`
|
|
64
71
|
margin-right: 10px;
|
|
65
72
|
margin-left: 0;
|
|
66
73
|
`}
|
|
74
|
+
|
|
67
75
|
@media (min-width: 769px) {
|
|
68
76
|
${({ theme }) =>
|
|
69
|
-
|
|
77
|
+
['center', 'right']?.includes(theme?.header?.components?.logo?.components?.layout?.position) && css`
|
|
70
78
|
margin-right: 30px;
|
|
71
79
|
`};
|
|
72
80
|
width: ${props => props.imgW ?? '150px'};
|
|
73
81
|
height: ${props => props.isChew && '35px'};
|
|
74
82
|
}
|
|
75
83
|
}
|
|
84
|
+
|
|
76
85
|
${props => !props.disabledResponsive && css`
|
|
77
86
|
img:nth-child(1) {
|
|
78
87
|
display: none;
|
|
79
88
|
}
|
|
80
89
|
`}
|
|
90
|
+
|
|
81
91
|
@media (min-width: 769px) {
|
|
82
92
|
img:nth-child(1) {
|
|
83
93
|
display: block;
|
|
@@ -97,6 +107,7 @@ export const LeftHeader = styled.div`
|
|
|
97
107
|
export const RightHeader = styled.div`
|
|
98
108
|
align-self: center;
|
|
99
109
|
display: flex;
|
|
110
|
+
|
|
100
111
|
#select-input {
|
|
101
112
|
div {
|
|
102
113
|
color: ${props => props.theme.colors.darkTextColor};
|
|
@@ -108,21 +119,27 @@ export const Menu = styled.div`
|
|
|
108
119
|
display: flex;
|
|
109
120
|
align-items: center;
|
|
110
121
|
margin-right: 10px;
|
|
122
|
+
|
|
111
123
|
#select-input {
|
|
112
124
|
border-radius: 7.6px;
|
|
125
|
+
|
|
113
126
|
#list {
|
|
114
127
|
border-radius: 7.6px;
|
|
115
128
|
}
|
|
129
|
+
|
|
116
130
|
${({ isCustomerMode }) => !isCustomerMode && css`
|
|
117
131
|
margin: 0px 5px;
|
|
118
132
|
height: 40px;
|
|
133
|
+
|
|
119
134
|
svg {
|
|
120
135
|
font-size: 16px;
|
|
121
136
|
}
|
|
137
|
+
|
|
122
138
|
> div:first-child {
|
|
123
139
|
height: 100%;
|
|
124
140
|
padding-left: 10px;
|
|
125
141
|
padding-right: 10px;
|
|
142
|
+
|
|
126
143
|
@media (min-width: 993px) {
|
|
127
144
|
padding-left: 13px;
|
|
128
145
|
padding-right: 13px;
|
|
@@ -130,6 +147,7 @@ export const Menu = styled.div`
|
|
|
130
147
|
}
|
|
131
148
|
`}
|
|
132
149
|
}
|
|
150
|
+
|
|
133
151
|
&.left-header {
|
|
134
152
|
background: #F8F9FA;
|
|
135
153
|
border: none;
|
|
@@ -143,29 +161,35 @@ export const Menu = styled.div`
|
|
|
143
161
|
justify-content: center;
|
|
144
162
|
position: relative;
|
|
145
163
|
height: 44px;
|
|
164
|
+
|
|
146
165
|
@media (min-width: 850px) {
|
|
147
166
|
border: 1px solid #DEE2E6;
|
|
148
167
|
justify-content: space-between;
|
|
149
168
|
}
|
|
169
|
+
|
|
150
170
|
@media (min-width: 1024px) {
|
|
151
171
|
margin: 0 20px;
|
|
152
172
|
padding: 0 20px;
|
|
153
173
|
margin-left: 45px;
|
|
154
174
|
}
|
|
175
|
+
|
|
155
176
|
@media (min-width: 1200px) {
|
|
156
177
|
padding: 0 30px;
|
|
157
178
|
margin-left: 50px;
|
|
158
179
|
}
|
|
180
|
+
|
|
159
181
|
@media (min-width: 1500px) {
|
|
160
182
|
padding: 0 30px;
|
|
161
183
|
margin: 0 75px;
|
|
162
184
|
}
|
|
163
185
|
}
|
|
186
|
+
|
|
164
187
|
> span {
|
|
165
188
|
#select-input {
|
|
166
189
|
background: transparent !important;
|
|
167
190
|
}
|
|
168
191
|
}
|
|
192
|
+
|
|
169
193
|
.moment-popover {
|
|
170
194
|
border-left: 1px solid #DEE2E6;
|
|
171
195
|
border-right: 1px solid #DEE2E6;
|
|
@@ -173,19 +197,22 @@ export const Menu = styled.div`
|
|
|
173
197
|
justify-content: center;
|
|
174
198
|
width: 200px;
|
|
175
199
|
display: none;
|
|
200
|
+
|
|
176
201
|
@media (min-width: 1175px) {
|
|
177
202
|
width: 250px;
|
|
178
203
|
}
|
|
179
|
-
|
|
204
|
+
|
|
180
205
|
@media (min-width: 1400px) {
|
|
181
206
|
width: 400px;
|
|
182
207
|
}
|
|
208
|
+
|
|
183
209
|
> div:first-child {
|
|
184
210
|
width: 100%;
|
|
185
211
|
display: flex;
|
|
186
212
|
justify-content: center;
|
|
187
213
|
}
|
|
188
214
|
}
|
|
215
|
+
|
|
189
216
|
.address-popover {
|
|
190
217
|
flex-grow: 1;
|
|
191
218
|
display: none;
|
|
@@ -193,6 +220,7 @@ export const Menu = styled.div`
|
|
|
193
220
|
width: 100%;
|
|
194
221
|
}
|
|
195
222
|
}
|
|
223
|
+
|
|
196
224
|
.order-type {
|
|
197
225
|
padding: 0 5px;
|
|
198
226
|
|
|
@@ -200,6 +228,8 @@ export const Menu = styled.div`
|
|
|
200
228
|
padding: 0 20px;
|
|
201
229
|
}
|
|
202
230
|
}
|
|
231
|
+
|
|
232
|
+
|
|
203
233
|
@media (min-width: 850px) {
|
|
204
234
|
.moment-popover,
|
|
205
235
|
.address-popover {
|
|
@@ -218,11 +248,13 @@ export const MenuLink = styled.a`
|
|
|
218
248
|
padding: 10px;
|
|
219
249
|
color: #333;
|
|
220
250
|
cursor: pointer;
|
|
251
|
+
|
|
221
252
|
${({ highlight }) => highlight && css`
|
|
222
253
|
background-color: ${props => props.theme.colors.primary};
|
|
223
254
|
color: ${props => props.theme.colors.primaryContrast};
|
|
224
255
|
border-radius: 7.6px;
|
|
225
256
|
padding: 11px 15px;
|
|
257
|
+
|
|
226
258
|
&:hover {
|
|
227
259
|
background: ${props => darken(0.07, props.theme.colors.primary)};
|
|
228
260
|
color: #FFF;
|
|
@@ -238,6 +270,7 @@ export const SubMenu = styled(InnerHeader)`
|
|
|
238
270
|
box-sizing: border-box;
|
|
239
271
|
margin: 0px;
|
|
240
272
|
position: relative;
|
|
273
|
+
|
|
241
274
|
@media (min-width: 850px) {
|
|
242
275
|
display: none;
|
|
243
276
|
}
|
|
@@ -252,6 +285,7 @@ export const CustomerInfo = styled.div`
|
|
|
252
285
|
display: flex;
|
|
253
286
|
justify-content: center;
|
|
254
287
|
align-items: center;
|
|
288
|
+
|
|
255
289
|
span {
|
|
256
290
|
display: flex;
|
|
257
291
|
align-items: center;
|
|
@@ -287,6 +321,7 @@ export const AddressMenu = styled.div`
|
|
|
287
321
|
display: flex;
|
|
288
322
|
align-items: center;
|
|
289
323
|
position: relative;
|
|
324
|
+
|
|
290
325
|
span {
|
|
291
326
|
width: 85%;
|
|
292
327
|
p {
|
|
@@ -297,11 +332,13 @@ export const AddressMenu = styled.div`
|
|
|
297
332
|
overflow: hidden;
|
|
298
333
|
}
|
|
299
334
|
}
|
|
335
|
+
|
|
300
336
|
${({ isCustomerMode }) => isCustomerMode ? css`
|
|
301
337
|
flex: 0.8;
|
|
302
338
|
` : css`
|
|
303
339
|
width: 50%;
|
|
304
340
|
`}
|
|
341
|
+
|
|
305
342
|
svg {
|
|
306
343
|
color: ${props => props.theme.colors?.lightGray};
|
|
307
344
|
font-size: 16px;
|
|
@@ -325,21 +362,26 @@ export const AddressMenu = styled.div`
|
|
|
325
362
|
|
|
326
363
|
export const MomentMenu = styled.div`
|
|
327
364
|
border-left: 1px solid #DEE2E6;
|
|
328
|
-
|
|
365
|
+
${({ isFranchiseSlugOne }) => !isFranchiseSlugOne && css`
|
|
366
|
+
border-right: 1px solid #DEE2E6;
|
|
367
|
+
`}
|
|
329
368
|
height: 100%;
|
|
330
369
|
justify-content: center;
|
|
331
370
|
width: 175px;
|
|
332
371
|
display: none;
|
|
333
|
-
|
|
372
|
+
|
|
334
373
|
@media (min-width: 850px) {
|
|
335
374
|
display: flex;
|
|
336
375
|
}
|
|
376
|
+
|
|
337
377
|
@media (min-width: 1175px) {
|
|
338
378
|
width: 250px;
|
|
339
379
|
}
|
|
380
|
+
|
|
340
381
|
@media (min-width: 1400px) {
|
|
341
382
|
width: 400px;
|
|
342
383
|
}
|
|
384
|
+
|
|
343
385
|
> div {
|
|
344
386
|
cursor: pointer;
|
|
345
387
|
font-size: 14px;
|
|
@@ -366,11 +408,13 @@ export const FarAwayMessage = styled.div`
|
|
|
366
408
|
padding: 6px 15px;
|
|
367
409
|
box-sizing: border-box;
|
|
368
410
|
margin: 10px 0px 0px 0px !important;
|
|
411
|
+
|
|
369
412
|
left: 5px;
|
|
370
413
|
${props => props.theme?.rtl && css`
|
|
371
414
|
right: 5px;
|
|
372
415
|
left: initial;
|
|
373
416
|
`}
|
|
417
|
+
|
|
374
418
|
svg {
|
|
375
419
|
font-size: 20px;
|
|
376
420
|
color: ${props => props.theme.colors.warning500};
|
|
@@ -385,6 +429,7 @@ export const FarAwayMessage = styled.div`
|
|
|
385
429
|
line-height: 18px;
|
|
386
430
|
color: ${props => props.theme.colors.headingColor};
|
|
387
431
|
}
|
|
432
|
+
|
|
388
433
|
@media (min-width: 400px) {
|
|
389
434
|
padding: 8px 20px;
|
|
390
435
|
font-size: 14px;
|
|
@@ -425,9 +470,11 @@ export const LanguageSelectorWrapper = styled(InputGroup)`
|
|
|
425
470
|
border-color: #F8F9FA;
|
|
426
471
|
background-color: #F8F9FA !important;
|
|
427
472
|
height: 44px;
|
|
473
|
+
|
|
428
474
|
> div:first-child {
|
|
429
475
|
height: 44px;
|
|
430
476
|
}
|
|
477
|
+
|
|
431
478
|
#list {
|
|
432
479
|
border-radius: 7.6px;
|
|
433
480
|
background: #F8F9FA !important;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React, { useEffect } from 'react'
|
|
2
|
+
import { useLanguage, useOrder, BusinessList as BusinessListController } from 'ordering-components-external'
|
|
3
|
+
import { BusinessController } from '../../../BusinessController/franchises/OloBusinessController'
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
HighestRatedContainer,
|
|
7
|
+
ErrorMessage,
|
|
8
|
+
BusinessList,
|
|
9
|
+
Title,
|
|
10
|
+
Description,
|
|
11
|
+
BusinessListWrapper
|
|
12
|
+
} from './styles'
|
|
13
|
+
|
|
14
|
+
const HighestRatedUI = (props) => {
|
|
15
|
+
const {
|
|
16
|
+
businessesList,
|
|
17
|
+
handleBusinessClick,
|
|
18
|
+
isCustomLayout,
|
|
19
|
+
setHasHighRatedBusiness,
|
|
20
|
+
isCustomerMode,
|
|
21
|
+
favoriteIds,
|
|
22
|
+
setFavoriteIds
|
|
23
|
+
} = props
|
|
24
|
+
|
|
25
|
+
const [, t] = useLanguage()
|
|
26
|
+
const [orderState] = useOrder()
|
|
27
|
+
|
|
28
|
+
const isBusinessWithReviews = businessesList?.businesses?.every((business) => business?.reviews?.total === 0)
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (!businessesList.loading) {
|
|
32
|
+
setHasHighRatedBusiness(!isBusinessWithReviews)
|
|
33
|
+
}
|
|
34
|
+
}, [businessesList?.businesses])
|
|
35
|
+
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (!businessesList?.businesses?.length) return
|
|
38
|
+
const ids = [...(favoriteIds ?? [])]
|
|
39
|
+
businessesList.businesses.forEach(business => {
|
|
40
|
+
if (business?.favorite) {
|
|
41
|
+
ids.push(business.id)
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
setFavoriteIds && setFavoriteIds([...new Set(ids)])
|
|
45
|
+
}, [businessesList?.businesses?.length])
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<>
|
|
49
|
+
{props.beforeElements?.map((BeforeElement, i) => (
|
|
50
|
+
<React.Fragment key={i}>
|
|
51
|
+
{BeforeElement}
|
|
52
|
+
</React.Fragment>))}
|
|
53
|
+
{props.beforeComponents?.map((BeforeComponent, i) => (
|
|
54
|
+
<BeforeComponent key={i} {...props} />))}
|
|
55
|
+
<HighestRatedContainer>
|
|
56
|
+
<Title>{t('HIGHEST_RATED', 'Highest rated')}</Title>
|
|
57
|
+
<Description>{t('TOP_RATINGS_AND_GREAT_SERVICE', 'Top ratings and great service')}</Description>
|
|
58
|
+
<BusinessListWrapper>
|
|
59
|
+
<BusinessList>
|
|
60
|
+
{
|
|
61
|
+
!businessesList?.loading && businessesList?.businesses?.map((business) => (
|
|
62
|
+
business?.reviews?.total > 0 && (
|
|
63
|
+
<BusinessController
|
|
64
|
+
key={business.id}
|
|
65
|
+
className='card'
|
|
66
|
+
business={business}
|
|
67
|
+
isBusinessOpen={business.open}
|
|
68
|
+
handleCustomClick={handleBusinessClick}
|
|
69
|
+
orderType={orderState?.options?.type}
|
|
70
|
+
isCustomLayout={isCustomLayout}
|
|
71
|
+
isCustomerMode={isCustomerMode}
|
|
72
|
+
favoriteIds={favoriteIds}
|
|
73
|
+
setFavoriteIds={setFavoriteIds}
|
|
74
|
+
/>
|
|
75
|
+
)
|
|
76
|
+
))
|
|
77
|
+
}
|
|
78
|
+
{businessesList.loading && (
|
|
79
|
+
[...Array(8).keys()].map(i => (
|
|
80
|
+
<BusinessController
|
|
81
|
+
key={i}
|
|
82
|
+
className='card'
|
|
83
|
+
business={{}}
|
|
84
|
+
isSkeleton
|
|
85
|
+
orderType={orderState?.options?.type}
|
|
86
|
+
/>
|
|
87
|
+
))
|
|
88
|
+
)}
|
|
89
|
+
{businessesList.error && businessesList.error.length > 0 && businessesList.businesses.length === 0 && (
|
|
90
|
+
businessesList.error.map((e, i) => (
|
|
91
|
+
<ErrorMessage key={i}>{t('ERROR', 'ERROR')}: [{e?.message || e}]</ErrorMessage>
|
|
92
|
+
))
|
|
93
|
+
)}
|
|
94
|
+
</BusinessList>
|
|
95
|
+
</BusinessListWrapper>
|
|
96
|
+
</HighestRatedContainer>
|
|
97
|
+
{props.afterComponents?.map((AfterComponent, i) => (
|
|
98
|
+
<AfterComponent key={i} {...props} />))}
|
|
99
|
+
{props.afterElements?.map((AfterElement, i) => (
|
|
100
|
+
<React.Fragment key={i}>
|
|
101
|
+
{AfterElement}
|
|
102
|
+
</React.Fragment>))}
|
|
103
|
+
</>
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export const HighestRated = (props) => {
|
|
108
|
+
const highestRatedProps = {
|
|
109
|
+
...props,
|
|
110
|
+
UIComponent: HighestRatedUI,
|
|
111
|
+
initialOrderByValue: 'rating'
|
|
112
|
+
}
|
|
113
|
+
return <BusinessListController {...highestRatedProps} />
|
|
114
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import styled from 'styled-components'
|
|
2
|
+
|
|
3
|
+
export const HighestRatedContainer = styled.div`
|
|
4
|
+
padding-bottom: 30px;
|
|
5
|
+
`
|
|
6
|
+
|
|
7
|
+
export const ErrorMessage = styled.span`
|
|
8
|
+
padding: 20px;
|
|
9
|
+
width: 100%;
|
|
10
|
+
background-color: #CCCCCC;
|
|
11
|
+
margin: 0px 15px;
|
|
12
|
+
color: #D81313;
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
`
|
|
15
|
+
|
|
16
|
+
export const BusinessList = styled.div`
|
|
17
|
+
display: flex;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
#highestRated {
|
|
21
|
+
> div {
|
|
22
|
+
width: calc(100vw - 40px);
|
|
23
|
+
min-width: calc(100vw - 40px);
|
|
24
|
+
|
|
25
|
+
@media (min-width: 681px) {
|
|
26
|
+
width: calc(50vw - 40px);
|
|
27
|
+
min-width: calc(50vw - 40px);
|
|
28
|
+
}
|
|
29
|
+
@media (min-width: 993px) {
|
|
30
|
+
width: calc(33vw - 40px);
|
|
31
|
+
min-width: calc(33vw - 40px);
|
|
32
|
+
}
|
|
33
|
+
@media (min-width: 1200px) {
|
|
34
|
+
width: calc(25vw - 40px);
|
|
35
|
+
min-width: calc(25vw - 40px);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`
|
|
40
|
+
|
|
41
|
+
export const Title = styled.h2`
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
font-size: 24px;
|
|
44
|
+
color: ${props => props.theme?.colors.headingColor};
|
|
45
|
+
margin: 42px 20px 5px 20px;
|
|
46
|
+
`
|
|
47
|
+
|
|
48
|
+
export const Description = styled.p`
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
color: ${props => props.theme?.colors.headingColor};
|
|
51
|
+
margin: 0 20px 15px 20px;
|
|
52
|
+
`
|
|
53
|
+
|
|
54
|
+
export const BusinessListWrapper = styled.div`
|
|
55
|
+
overflow: scroll hidden;
|
|
56
|
+
width: 100%;
|
|
57
|
+
`
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import { useTheme } from 'styled-components'
|
|
3
|
+
import { useSession, useOrder, useLanguage, useConfig, useEvent } from 'ordering-components-external'
|
|
4
|
+
import {
|
|
5
|
+
HeroContainer,
|
|
6
|
+
ContentWrapper,
|
|
7
|
+
Title,
|
|
8
|
+
Slogan,
|
|
9
|
+
HeroContent,
|
|
10
|
+
HomeImage,
|
|
11
|
+
OrderTypeListItemContainer,
|
|
12
|
+
OrderTypeTitle,
|
|
13
|
+
IconTypeButton
|
|
14
|
+
} from './styles'
|
|
15
|
+
|
|
16
|
+
export const OloHomeHero = (props) => {
|
|
17
|
+
const [{ auth }] = useSession()
|
|
18
|
+
const [orderState, { changeType }] = useOrder()
|
|
19
|
+
const [, t] = useLanguage()
|
|
20
|
+
const [{ configs }] = useConfig()
|
|
21
|
+
const [modals, setModals] = useState({ listOpen: false, formOpen: false })
|
|
22
|
+
const [events] = useEvent()
|
|
23
|
+
const theme = useTheme()
|
|
24
|
+
const configTypes = configs?.order_types_allowed?.value.split('|').map(value => Number(value)) || []
|
|
25
|
+
|
|
26
|
+
const [newAddressModalOpened, setNewAddressModalOpened] = useState(false)
|
|
27
|
+
|
|
28
|
+
const bgImg = theme?.my_products?.components?.images?.components?.homepage_background?.components?.image
|
|
29
|
+
const orderTypeTitle = (type) => theme?.order_types?.components?.[type]?.components?.title
|
|
30
|
+
const orderTypeIcon = (typeValue) => typeValue === 1
|
|
31
|
+
? theme?.images?.general?.deliveryIco
|
|
32
|
+
: typeValue === 2
|
|
33
|
+
? theme?.images?.general?.pickupIco
|
|
34
|
+
: typeValue === 3
|
|
35
|
+
? theme?.images?.general?.eatinIco
|
|
36
|
+
: typeValue === 4
|
|
37
|
+
? theme?.images?.general?.curbsideIco
|
|
38
|
+
: typeValue === 5
|
|
39
|
+
? theme?.images?.general?.drivethruIco
|
|
40
|
+
: theme?.images?.general?.deliveryIco
|
|
41
|
+
|
|
42
|
+
const handleClickOrderType = (value) => {
|
|
43
|
+
if (!orderState?.loading) {
|
|
44
|
+
changeType(value)
|
|
45
|
+
events.emit('go_to_page', { page: 'search' })
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
return () => setModals({ listOpen: false, formOpen: false })
|
|
51
|
+
}, [])
|
|
52
|
+
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (newAddressModalOpened) return
|
|
55
|
+
if (auth && !orderState.loading && !orderState?.options?.address?.location) {
|
|
56
|
+
setModals({ ...modals, listOpen: true })
|
|
57
|
+
setNewAddressModalOpened(true)
|
|
58
|
+
}
|
|
59
|
+
}, [auth, orderState, newAddressModalOpened])
|
|
60
|
+
|
|
61
|
+
const orderTypes = [
|
|
62
|
+
{
|
|
63
|
+
value: 1,
|
|
64
|
+
text: t('DELIVERY', 'Delivery'),
|
|
65
|
+
description: t('ORDERTYPE_DESCRIPTION_DELIVERY', 'Delivery description'),
|
|
66
|
+
image: theme.images?.deliveryTypes?.delivery
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
value: 2,
|
|
70
|
+
text: t('PICKUP', 'Pickup'),
|
|
71
|
+
description: t('ORDERTYPE_DESCRIPTION_PICKUP', 'Pickup description'),
|
|
72
|
+
image: theme.images?.deliveryTypes?.pickUp
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
value: 3,
|
|
76
|
+
text: t('EAT_IN', 'Eat in'),
|
|
77
|
+
description: t('ORDERTYPE_DESCRIPTION_EATIN', 'Eat in description'),
|
|
78
|
+
image: theme.images?.deliveryTypes?.eatIn
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
value: 4,
|
|
82
|
+
text: t('CURBSIDE', 'Curbside'),
|
|
83
|
+
description: t('ORDERTYPE_DESCRIPTION_CURBSIDE', 'Curbside description'),
|
|
84
|
+
image: theme.images?.deliveryTypes?.curbside
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
value: 5,
|
|
88
|
+
text: t('DRIVE_THRU', 'Drive thru'),
|
|
89
|
+
description: t('ORDERTYPE_DESCRIPTION_DRIVETHRU', 'Drive Thru description'),
|
|
90
|
+
image: theme.images?.deliveryTypes?.driveThru
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<HeroContainer>
|
|
96
|
+
<ContentWrapper>
|
|
97
|
+
<HeroContent>
|
|
98
|
+
<Title>{t('TITLE_HOME', theme?.defaultLanguages?.TITLE_HOME || 'All We need is Food.')}</Title>
|
|
99
|
+
<Slogan>{t('SUBTITLE_HOME', theme?.defaultLanguages?.SUBTITLE_HOME || 'Let\'s start to order food now')}</Slogan>
|
|
100
|
+
{
|
|
101
|
+
orderTypes && (configTypes ? orderTypes.filter(type => configTypes?.includes(type.value)) : orderTypes).map((item, i) => (
|
|
102
|
+
<OrderTypeListItemContainer
|
|
103
|
+
key={i}
|
|
104
|
+
onClick={() => handleClickOrderType(item.value)}
|
|
105
|
+
>
|
|
106
|
+
<IconTypeButton>
|
|
107
|
+
<img
|
|
108
|
+
src={orderTypeIcon(item.value)}
|
|
109
|
+
width={24}
|
|
110
|
+
height={24}
|
|
111
|
+
/>
|
|
112
|
+
</IconTypeButton>
|
|
113
|
+
<OrderTypeTitle>{orderTypeTitle(item?.text?.replace(' ', '_')?.toLowerCase()) || item.text}</OrderTypeTitle>
|
|
114
|
+
</OrderTypeListItemContainer>
|
|
115
|
+
))
|
|
116
|
+
}
|
|
117
|
+
</HeroContent>
|
|
118
|
+
<HomeImage bgimage={(bgImg || theme.images?.general?.homeHero)} />
|
|
119
|
+
</ContentWrapper>
|
|
120
|
+
</HeroContainer>
|
|
121
|
+
)
|
|
122
|
+
}
|