ordering-ui-external 1.7.2 → 1.8.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/{0.ordering-ui.f9c3deec77a8e21645ed.js → 0.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{1.ordering-ui.f9c3deec77a8e21645ed.js → 1.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/2.ordering-ui.a7de4e953ec3c5879d9b.js +1 -0
- package/_bundles/{4.ordering-ui.f9c3deec77a8e21645ed.js → 4.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{5.ordering-ui.f9c3deec77a8e21645ed.js → 5.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{6.ordering-ui.f9c3deec77a8e21645ed.js → 6.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js → 7.ordering-ui.a7de4e953ec3c5879d9b.js} +2 -2
- package/_bundles/{7.ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → 7.ordering-ui.a7de4e953ec3c5879d9b.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.f9c3deec77a8e21645ed.js → 8.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/{9.ordering-ui.f9c3deec77a8e21645ed.js → 9.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
- package/_bundles/ordering-ui.a7de4e953ec3c5879d9b.js +2 -0
- package/_bundles/{ordering-ui.f9c3deec77a8e21645ed.js.LICENSE.txt → ordering-ui.a7de4e953ec3c5879d9b.js.LICENSE.txt} +0 -0
- package/_modules/components/BusinessInformation/index.js +4 -8
- package/_modules/components/OrdersOption/styles.js +4 -2
- package/_modules/components/Pagination/index.js +100 -0
- package/_modules/components/Pagination/styles.js +56 -0
- package/_modules/components/SmartAppBanner/index.js +2 -1
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +92 -0
- package/_modules/components/VerticalOrdersLayout/index.js +115 -41
- package/_modules/components/VerticalOrdersLayout/styles.js +25 -11
- package/_modules/index.js +7 -0
- package/_modules/themes/five/src/components/AccordionDropdown/index.js +15 -4
- package/_modules/themes/five/src/components/AccordionDropdown/styles.js +14 -4
- package/_modules/themes/five/src/components/AddressList/styles.js +2 -2
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +17 -10
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +48 -42
- package/_modules/themes/five/src/components/BusinessListingSearch/index.js +5 -1
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +0 -3
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +22 -13
- package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +15 -7
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +3 -0
- package/_modules/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
- package/_modules/themes/five/src/components/BusinessesListing/index.js +6 -13
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +66 -40
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +13 -7
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +16 -7
- package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +21 -15
- package/_modules/themes/five/src/components/CardForm/index.js +17 -3
- package/_modules/themes/five/src/components/CardForm/styles.js +14 -6
- package/_modules/themes/five/src/components/CartPopover/index.js +6 -4
- package/_modules/themes/five/src/components/CartPopover/styles.js +4 -2
- package/_modules/themes/five/src/components/Footer/index.js +16 -6
- package/_modules/themes/five/src/components/Footer/styles.js +11 -9
- package/_modules/themes/five/src/components/Header/index.js +14 -9
- package/_modules/themes/five/src/components/Header/styles.js +64 -44
- package/_modules/themes/five/src/components/HeaderOption/index.js +9 -2
- package/_modules/themes/five/src/components/HeaderOption/styles.js +8 -2
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +9 -3
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +5 -3
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +9 -19
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +23 -19
- package/_modules/themes/five/src/components/InputPhoneNumber/index.js +1 -0
- package/_modules/themes/five/src/components/LoginForm/index.js +3 -2
- package/_modules/themes/five/src/components/MyOrders/index.js +24 -56
- package/_modules/themes/five/src/components/MyOrders/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderDetails/index.js +5 -2
- package/_modules/themes/five/src/components/OrderDetails/styles.js +24 -24
- package/_modules/themes/five/src/components/OrderItAgain/styles.js +6 -2
- package/_modules/themes/five/src/components/OrdersOption/index.js +18 -18
- package/_modules/themes/five/src/components/OrdersOption/styles.js +2 -2
- package/_modules/themes/five/src/components/PageBanner/index.js +50 -0
- package/_modules/themes/five/src/components/PageBanner/styles.js +18 -0
- package/_modules/themes/five/src/components/Pagination/index.js +99 -0
- package/_modules/themes/five/src/components/Pagination/styles.js +56 -0
- package/_modules/themes/five/src/components/ProductForm/index.js +39 -23
- package/_modules/themes/five/src/components/ProductForm/styles.js +74 -38
- package/_modules/themes/five/src/components/Promotions/index.js +7 -2
- package/_modules/themes/five/src/components/Promotions/styles.js +16 -14
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +31 -10
- package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +19 -11
- package/_modules/themes/five/src/components/SidebarMenu/styles.js +1 -1
- package/_modules/themes/five/src/components/SignUpForm/index.js +3 -2
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +7 -17
- package/_modules/themes/five/src/components/SingleProductCard/index.js +7 -298
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +310 -0
- package/_modules/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +36 -32
- package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +305 -0
- package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +143 -0
- package/_modules/themes/five/src/components/StripeElementsForm/index.js +1 -0
- package/_modules/themes/five/src/components/UserPopover/index.js +3 -1
- package/_modules/themes/five/src/components/UserPopover/styles.js +4 -3
- package/_modules/themes/five/src/components/UserProfileForm/styles.js +5 -8
- package/_modules/themes/six/src/components/BusinessController/index.js +81 -15
- package/_modules/themes/six/src/components/BusinessController/styles.js +58 -30
- package/_modules/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +5 -3
- package/_modules/themes/six/src/components/BusinessesMap/styles.js +1 -1
- package/_modules/themes/six/src/components/SearchBar/index.js +19 -10
- package/_modules/themes/six/src/components/SearchBar/styles.js +44 -16
- package/index-template.js +3 -1
- package/package.json +2 -2
- package/src/components/BusinessInformation/index.js +3 -8
- package/src/components/OrdersOption/styles.js +5 -5
- package/src/components/Pagination/index.js +107 -0
- package/src/components/Pagination/styles.js +106 -0
- package/src/components/SmartAppBanner/index.js +1 -0
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +89 -0
- package/src/components/VerticalOrdersLayout/index.js +86 -48
- package/src/components/VerticalOrdersLayout/styles.js +66 -22
- package/src/index.js +2 -0
- package/src/themes/five/src/components/AccordionDropdown/index.js +19 -6
- package/src/themes/five/src/components/AccordionDropdown/styles.js +25 -1
- package/src/themes/five/src/components/AddressList/styles.js +2 -0
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +21 -11
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +9 -3
- package/src/themes/five/src/components/BusinessListingSearch/index.js +1 -0
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +0 -2
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +23 -12
- package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +12 -4
- package/src/themes/five/src/components/BusinessProductsListing/index.js +3 -0
- package/src/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
- package/src/themes/five/src/components/BusinessesListing/index.js +5 -5
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +54 -25
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +40 -26
- package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +19 -6
- package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +38 -3
- package/src/themes/five/src/components/CardForm/index.js +49 -8
- package/src/themes/five/src/components/CardForm/styles.js +20 -2
- package/src/themes/five/src/components/CartPopover/index.js +2 -1
- package/src/themes/five/src/components/CartPopover/styles.js +3 -3
- package/src/themes/five/src/components/Footer/index.js +15 -6
- package/src/themes/five/src/components/Footer/styles.js +15 -14
- package/src/themes/five/src/components/Header/index.js +6 -4
- package/src/themes/five/src/components/Header/styles.js +14 -11
- package/src/themes/five/src/components/HeaderOption/index.js +13 -10
- package/src/themes/five/src/components/HeaderOption/styles.js +2 -2
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +22 -10
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +8 -0
- package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +24 -36
- package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +12 -1
- package/src/themes/five/src/components/InputPhoneNumber/index.js +1 -0
- package/src/themes/five/src/components/LoginForm/index.js +2 -1
- package/src/themes/five/src/components/MyOrders/index.js +20 -62
- package/src/themes/five/src/components/MyOrders/styles.js +1 -2
- package/src/themes/five/src/components/OrderDetails/index.js +9 -0
- package/src/themes/five/src/components/OrderDetails/styles.js +0 -55
- package/src/themes/five/src/components/OrderItAgain/styles.js +18 -0
- package/src/themes/five/src/components/OrdersOption/index.js +10 -16
- package/src/themes/five/src/components/OrdersOption/styles.js +1 -3
- package/src/themes/five/src/components/PageBanner/index.js +58 -0
- package/src/themes/five/src/components/PageBanner/styles.js +58 -0
- package/src/themes/five/src/components/Pagination/index.js +106 -0
- package/src/themes/five/src/components/Pagination/styles.js +106 -0
- package/src/themes/five/src/components/ProductForm/index.js +108 -84
- package/src/themes/five/src/components/ProductForm/styles.js +94 -12
- package/src/themes/five/src/components/Promotions/index.js +22 -16
- package/src/themes/five/src/components/Promotions/styles.js +10 -4
- package/src/themes/five/src/components/RenderProductsLayout/index.js +94 -66
- package/src/themes/five/src/components/RenderProductsLayout/styles.js +23 -22
- package/src/themes/five/src/components/SidebarMenu/styles.js +1 -1
- package/src/themes/five/src/components/SignUpForm/index.js +2 -1
- package/src/themes/five/src/components/SingleOrderCard/index.js +0 -21
- package/src/themes/five/src/components/SingleProductCard/index.js +7 -300
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +312 -0
- package/src/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +9 -5
- package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +313 -0
- package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +353 -0
- package/src/themes/five/src/components/StripeElementsForm/index.js +1 -0
- package/src/themes/five/src/components/UserPopover/index.js +2 -0
- package/src/themes/five/src/components/UserPopover/styles.js +2 -2
- package/src/themes/five/src/components/UserProfileForm/styles.js +3 -11
- package/src/themes/six/src/components/BusinessController/index.js +163 -62
- package/src/themes/six/src/components/BusinessController/styles.js +53 -14
- package/src/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +3 -1
- package/src/themes/six/src/components/BusinessesMap/styles.js +1 -1
- package/src/themes/six/src/components/SearchBar/index.js +27 -8
- package/src/themes/six/src/components/SearchBar/styles.js +33 -2
- package/template/app.js +364 -364
- package/template/assets/images/chew_logo.png +0 -0
- package/template/components/HelmetTags/index.js +5 -4
- package/_bundles/2.ordering-ui.f9c3deec77a8e21645ed.js +0 -1
- package/_bundles/ordering-ui.f9c3deec77a8e21645ed.js +0 -2
package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js
CHANGED
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
useSession,
|
|
11
11
|
useLanguage,
|
|
12
12
|
useConfig,
|
|
13
|
-
BusinessList as BusinessListController
|
|
13
|
+
BusinessList as BusinessListController,
|
|
14
|
+
useOrderingTheme
|
|
14
15
|
} from 'ordering-components-external'
|
|
15
16
|
|
|
16
17
|
import {
|
|
@@ -32,7 +33,9 @@ import {
|
|
|
32
33
|
BusinessFeatures,
|
|
33
34
|
AddressMenu,
|
|
34
35
|
FeatureItems,
|
|
35
|
-
ItemInline
|
|
36
|
+
ItemInline,
|
|
37
|
+
BusinessLogosWrapper,
|
|
38
|
+
ButtonWrapper
|
|
36
39
|
} from './styles'
|
|
37
40
|
import { useWindowSize } from '../../../../../../../hooks/useWindowSize'
|
|
38
41
|
import { Button } from '../../../../styles/Buttons'
|
|
@@ -52,10 +55,13 @@ import { BusinessesMap } from '../../../../../../../components/BusinessesMap'
|
|
|
52
55
|
import { HighestRated } from '../../../HighestRated'
|
|
53
56
|
import { BusinessPreorder } from '../../../BusinessPreorder'
|
|
54
57
|
import { OrderProgress } from '../../../OrderProgress'
|
|
58
|
+
import { PageBanner } from '../../../PageBanner'
|
|
55
59
|
|
|
56
60
|
import Skeleton from 'react-loading-skeleton'
|
|
57
61
|
import { MomentPopover } from '../../../../../../pwa/src/components/MomentPopover'
|
|
58
62
|
import { OrderTypeSelectorHeader } from '../../../../../../../components/OrderTypeSelectorHeader'
|
|
63
|
+
import BsArrowRight from '@meronex/icons/bs/BsArrowRight'
|
|
64
|
+
import { AutoScroll } from '../../../AutoScroll'
|
|
59
65
|
|
|
60
66
|
const PIXELS_TO_SCROLL = 300
|
|
61
67
|
|
|
@@ -85,12 +91,14 @@ const BusinessesListingUI = (props) => {
|
|
|
85
91
|
const [{ auth }] = useSession()
|
|
86
92
|
const [{ configs }] = useConfig()
|
|
87
93
|
const windowSize = useWindowSize()
|
|
94
|
+
const [{ theme: orderingTheme }] = useOrderingTheme()
|
|
88
95
|
const theme = useTheme()
|
|
89
96
|
const [modals, setModals] = useState({ listOpen: false, formOpen: false, citiesOpen: false })
|
|
90
97
|
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
91
98
|
const [activeMap, setActiveMap] = useState(false)
|
|
92
99
|
const [openPopover, setOpenPopover] = useState({})
|
|
93
100
|
const [mapErrors, setMapErrors] = useState('')
|
|
101
|
+
const [actualCity, setActualCity] = useState(orderState?.options?.city_id)
|
|
94
102
|
const [isPreorder, setIsPreorder] = useState(false)
|
|
95
103
|
const [preorderBusiness, setPreorderBusiness] = useState(null)
|
|
96
104
|
const [hasHighRatedBusiness, setHasHighRatedBusiness] = useState(true)
|
|
@@ -100,10 +108,12 @@ const BusinessesListingUI = (props) => {
|
|
|
100
108
|
const hideSearch = theme?.business_listing_view?.components?.search?.hidden
|
|
101
109
|
const hideFilter = theme?.business_listing_view?.components?.filter?.hidden
|
|
102
110
|
const hideSearchSection = hideCities && hideSearch && hideFilter
|
|
111
|
+
const isAllCategoriesHidden = theme?.business_listing_view?.components?.categories?.hidden
|
|
103
112
|
const businessesIds = isCustomLayout &&
|
|
104
113
|
businessesList.businesses &&
|
|
105
114
|
businessesList.businesses?.map(business => business.id)
|
|
106
115
|
const configTypes = configState?.configs?.order_types_allowed?.value.split('|').map(value => Number(value)) || []
|
|
116
|
+
const isChew = orderingTheme?.theme?.header?.components?.layout?.type === 'Chew'
|
|
107
117
|
|
|
108
118
|
const handleScroll = useCallback(() => {
|
|
109
119
|
const innerHeightScrolltop = window.innerHeight + document.documentElement?.scrollTop + PIXELS_TO_SCROLL
|
|
@@ -247,23 +257,27 @@ const BusinessesListingUI = (props) => {
|
|
|
247
257
|
|
|
248
258
|
if (logosLayout) {
|
|
249
259
|
return (
|
|
250
|
-
<
|
|
251
|
-
|
|
252
|
-
<
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
260
|
+
<BusinessLogosWrapper>
|
|
261
|
+
<BusinessLogosContainer>
|
|
262
|
+
<AutoScroll scrollId='businessLogos'>
|
|
263
|
+
{businessesList?.loading ? (
|
|
264
|
+
<Skeleton count={12} height={75} width={75} />
|
|
265
|
+
) : (
|
|
266
|
+
<>
|
|
267
|
+
{businessesList.businesses
|
|
268
|
+
?.filter(business => business?.slug !== actualSlug && business?.open)
|
|
269
|
+
?.map(business => (
|
|
270
|
+
<BusinessLogo
|
|
271
|
+
key={business?.id}
|
|
272
|
+
bgimage={business?.logo || theme.images?.dummies?.businessLogo}
|
|
273
|
+
onClick={() => onBusinessClick(business)}
|
|
274
|
+
/>
|
|
275
|
+
))}
|
|
276
|
+
</>
|
|
277
|
+
)}
|
|
278
|
+
</AutoScroll>
|
|
279
|
+
</BusinessLogosContainer>
|
|
280
|
+
</BusinessLogosWrapper>
|
|
267
281
|
)
|
|
268
282
|
}
|
|
269
283
|
|
|
@@ -300,7 +314,7 @@ const BusinessesListingUI = (props) => {
|
|
|
300
314
|
</FeatureItems>
|
|
301
315
|
</BusinessFeatures>
|
|
302
316
|
)}
|
|
303
|
-
{configs?.business_listing_hide_image?.value !== '1' && (
|
|
317
|
+
{(configs?.business_listing_hide_image?.value !== '1' && !isChew) && (
|
|
304
318
|
<BusinessHeroImg
|
|
305
319
|
bgimage={theme.images?.general?.businessHero}
|
|
306
320
|
height={theme?.business_listing_view?.components?.business_hero?.style?.height}
|
|
@@ -308,7 +322,7 @@ const BusinessesListingUI = (props) => {
|
|
|
308
322
|
)}
|
|
309
323
|
</BusinessBanner>
|
|
310
324
|
{!!Object.values(orderState?.carts)?.length && (
|
|
311
|
-
<OrderProgressWrapper>
|
|
325
|
+
<OrderProgressWrapper isChew={isChew}>
|
|
312
326
|
<OrderProgress
|
|
313
327
|
franchiseId={props.franchiseId}
|
|
314
328
|
userCustomerId={userCustomer?.id}
|
|
@@ -317,6 +331,12 @@ const BusinessesListingUI = (props) => {
|
|
|
317
331
|
/>
|
|
318
332
|
</OrderProgressWrapper>
|
|
319
333
|
)}
|
|
334
|
+
{(configs?.business_listing_hide_image?.value !== '1' && isChew) && (
|
|
335
|
+
<BusinessHeroImg
|
|
336
|
+
bgimage={theme.images?.general?.businessHero}
|
|
337
|
+
height={theme?.business_listing_view?.components?.business_hero?.style?.height}
|
|
338
|
+
/>
|
|
339
|
+
)}
|
|
320
340
|
{isCustomerMode && (
|
|
321
341
|
<OrdersSection titleContent={t('PREVIOUS_ORDERS', 'Previous orders')} />
|
|
322
342
|
)}
|
|
@@ -368,7 +388,10 @@ const BusinessesListingUI = (props) => {
|
|
|
368
388
|
<Divider />
|
|
369
389
|
</HightestRatedWrapper>
|
|
370
390
|
)}
|
|
371
|
-
|
|
391
|
+
|
|
392
|
+
<PageBanner position='web_business_listing' />
|
|
393
|
+
|
|
394
|
+
{(((configs && configs?.business_listing_categories !== false) || !isCustomLayout) && !isAllCategoriesHidden) && (
|
|
372
395
|
<BusinessTypeFilter
|
|
373
396
|
images={props.images}
|
|
374
397
|
businessTypes={props.businessTypes}
|
|
@@ -516,7 +539,7 @@ const BusinessesListingUI = (props) => {
|
|
|
516
539
|
/>
|
|
517
540
|
</Modal>
|
|
518
541
|
<Modal
|
|
519
|
-
title={t('
|
|
542
|
+
title={t('SELECT_A_STORE', 'Select a store')}
|
|
520
543
|
open={modals.citiesOpen}
|
|
521
544
|
width='70%'
|
|
522
545
|
onClose={() => setModals({ ...modals, citiesOpen: false })}
|
|
@@ -528,13 +551,19 @@ const BusinessesListingUI = (props) => {
|
|
|
528
551
|
) : (
|
|
529
552
|
<>
|
|
530
553
|
{citiesState?.cities?.map(city => (
|
|
531
|
-
<CityItem key={city?.id} onClick={() =>
|
|
554
|
+
<CityItem key={city?.id} onClick={() => setActualCity(city?.id)}>
|
|
532
555
|
<span className='radio'>
|
|
533
|
-
{city?.id ===
|
|
556
|
+
{city?.id === actualCity ? <RiRadioButtonFill className='city-checked' /> : <IosRadioButtonOff />}
|
|
534
557
|
</span>
|
|
535
558
|
{city?.name}
|
|
536
559
|
</CityItem>
|
|
537
560
|
))}
|
|
561
|
+
<ButtonWrapper>
|
|
562
|
+
<Button color='primary' disabled={actualCity === null} onClick={() => handleChangeCity(actualCity)}>
|
|
563
|
+
{t('CONTINUE', 'Continue')}
|
|
564
|
+
</Button>
|
|
565
|
+
<BsArrowRight />
|
|
566
|
+
</ButtonWrapper>
|
|
538
567
|
</>
|
|
539
568
|
)
|
|
540
569
|
}
|
package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js
CHANGED
|
@@ -222,7 +222,12 @@ export const Divider = styled.div`
|
|
|
222
222
|
`
|
|
223
223
|
|
|
224
224
|
export const OrderProgressWrapper = styled.div`
|
|
225
|
-
padding: 45px 20px;
|
|
225
|
+
padding: ${props => props.isChew ? '110px 20px 45px' : '45px 20px'};
|
|
226
|
+
margin: 0px;
|
|
227
|
+
@media (min-width: 768px) {
|
|
228
|
+
margin: 0 35px;
|
|
229
|
+
padding: 45px 20px;
|
|
230
|
+
}
|
|
226
231
|
`
|
|
227
232
|
|
|
228
233
|
export const SearchContainer = styled.div`
|
|
@@ -232,7 +237,22 @@ export const SearchContainer = styled.div`
|
|
|
232
237
|
`
|
|
233
238
|
|
|
234
239
|
export const BusinessCityList = styled.div`
|
|
235
|
-
|
|
240
|
+
|
|
241
|
+
`
|
|
242
|
+
|
|
243
|
+
export const ButtonWrapper = styled.div`
|
|
244
|
+
position: relative;
|
|
245
|
+
svg {
|
|
246
|
+
position: absolute;
|
|
247
|
+
right: 10px;
|
|
248
|
+
top: 8px;
|
|
249
|
+
font-size: 25px;
|
|
250
|
+
color: #ffffff;
|
|
251
|
+
}
|
|
252
|
+
button {
|
|
253
|
+
width: 100%;
|
|
254
|
+
padding: 5px;
|
|
255
|
+
}
|
|
236
256
|
`
|
|
237
257
|
|
|
238
258
|
export const CityItem = styled.div`
|
|
@@ -240,7 +260,6 @@ export const CityItem = styled.div`
|
|
|
240
260
|
justify-content: flex-start;
|
|
241
261
|
align-items: center;
|
|
242
262
|
padding: 15px 0px;
|
|
243
|
-
border-top: 1px solid #E9ECEF;
|
|
244
263
|
cursor: pointer;
|
|
245
264
|
span {
|
|
246
265
|
margin-right: 15px;
|
|
@@ -250,21 +269,25 @@ export const CityItem = styled.div`
|
|
|
250
269
|
}
|
|
251
270
|
`
|
|
252
271
|
|
|
272
|
+
export const BusinessLogosWrapper = styled.div`
|
|
273
|
+
overflow: scroll hidden;
|
|
274
|
+
width: 100%;
|
|
275
|
+
`
|
|
276
|
+
|
|
277
|
+
|
|
253
278
|
const BusinessLogoStyled = styled.div`
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
margin-right: 15px;
|
|
267
|
-
cursor: pointer;
|
|
279
|
+
min-width: 100px;
|
|
280
|
+
min-height: 100px;
|
|
281
|
+
height: 100px;
|
|
282
|
+
width: 100px;
|
|
283
|
+
box-sizing: border-box;
|
|
284
|
+
background-repeat: no-repeat, repeat;
|
|
285
|
+
background-size: cover;
|
|
286
|
+
object-fit: cover;
|
|
287
|
+
background-position: center;
|
|
288
|
+
border-radius: 7.6px;
|
|
289
|
+
margin-right: 15px;
|
|
290
|
+
cursor: pointer;
|
|
268
291
|
`
|
|
269
292
|
|
|
270
293
|
export const BusinessLogo = (props) => {
|
|
@@ -279,16 +302,7 @@ export const BusinessLogo = (props) => {
|
|
|
279
302
|
</BusinessLogoStyled>
|
|
280
303
|
)
|
|
281
304
|
}
|
|
282
|
-
|
|
283
305
|
export const BusinessLogosContainer = styled.div`
|
|
284
306
|
display: flex;
|
|
285
|
-
overflow: auto;
|
|
286
307
|
padding-bottom: 10px;
|
|
287
|
-
span {
|
|
288
|
-
margin-right: 15px;
|
|
289
|
-
}
|
|
290
|
-
::-webkit-scrollbar {
|
|
291
|
-
width: 6px;
|
|
292
|
-
height: 6px;
|
|
293
|
-
}
|
|
294
308
|
`
|
package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState, useCallback } from 'react'
|
|
2
2
|
import FiMap from '@meronex/icons/fi/FiMap'
|
|
3
|
+
import FiFilter from '@meronex/icons/fi/FiFilter'
|
|
3
4
|
import Skeleton from 'react-loading-skeleton'
|
|
4
5
|
import {
|
|
5
6
|
useOrder,
|
|
@@ -24,7 +25,7 @@ import { SearchBar } from '../../../../../../six/src/components/SearchBar'
|
|
|
24
25
|
import { AddressList } from '../../../../../../six/src/components/AddressList'
|
|
25
26
|
import { AddressForm } from '../../../../../../six/src/components/AddressForm'
|
|
26
27
|
import { BusinessInformation } from '../../../../../../six/src/components/BusinessInformation'
|
|
27
|
-
|
|
28
|
+
import EiLocation from '@meronex/icons/ei/EiLocation'
|
|
28
29
|
import {
|
|
29
30
|
BusinessContainer,
|
|
30
31
|
BusinessList,
|
|
@@ -33,7 +34,8 @@ import {
|
|
|
33
34
|
BusinessesTitle,
|
|
34
35
|
ListWrapper,
|
|
35
36
|
BusinessContent,
|
|
36
|
-
MapWrapper
|
|
37
|
+
MapWrapper,
|
|
38
|
+
AddressInput
|
|
37
39
|
} from './styles'
|
|
38
40
|
|
|
39
41
|
const PIXELS_TO_SCROLL = 500
|
|
@@ -168,7 +170,11 @@ const BusinessesListingUI = (props) => {
|
|
|
168
170
|
placeholder={t('SEARCH_BUSINESSES', 'Search Businesses')}
|
|
169
171
|
onSearch={handleChangeSearch}
|
|
170
172
|
handleCustomEnter={term => onRedirectPage({ page: configs?.advanced_business_search_enabled?.value === '1' && 'business_search', search: `?term=${term}` })}
|
|
173
|
+
isHome
|
|
171
174
|
/>
|
|
175
|
+
{configs?.advanced_business_search_enabled?.value === '1' && (
|
|
176
|
+
<FiFilter onClick={() => onRedirectPage({ page: 'business_search' })} />
|
|
177
|
+
)}
|
|
172
178
|
{isCustomLayout && (
|
|
173
179
|
<FiMap onClick={toggleMap} />
|
|
174
180
|
)}
|
|
@@ -222,6 +228,14 @@ const BusinessesListingUI = (props) => {
|
|
|
222
228
|
</>
|
|
223
229
|
</ListWrapper>
|
|
224
230
|
<MapWrapper className='map-wrapper'>
|
|
231
|
+
{windowSize.width < 576 && orderState.options?.address?.address && (
|
|
232
|
+
<AddressInput onClick={handleClickAddress}>
|
|
233
|
+
<EiLocation />
|
|
234
|
+
<p>
|
|
235
|
+
{orderState.options?.address?.address}
|
|
236
|
+
</p>
|
|
237
|
+
</AddressInput>
|
|
238
|
+
)}
|
|
225
239
|
{windowSize.width < 850 && (
|
|
226
240
|
<WrapperSearch isCustomLayout={isCustomLayout}>
|
|
227
241
|
<SearchBar
|
|
@@ -236,21 +250,19 @@ const BusinessesListingUI = (props) => {
|
|
|
236
250
|
)}
|
|
237
251
|
</WrapperSearch>
|
|
238
252
|
)}
|
|
239
|
-
{(configs?.google_maps_api_key?.value && businessesList?.businesses?.length > 0)
|
|
253
|
+
{(configs?.google_maps_api_key?.value && businessesList?.businesses?.length > 0) && (
|
|
240
254
|
<BusinessesMap
|
|
241
255
|
businessList={businessesList.businesses}
|
|
242
256
|
userLocation={orderState?.options?.address?.location}
|
|
243
257
|
setErrors={setMapErrors}
|
|
244
258
|
/>
|
|
245
|
-
) : (
|
|
246
|
-
<Skeleton width={70} />
|
|
247
259
|
)}
|
|
248
260
|
</MapWrapper>
|
|
249
261
|
</BusinessContent>
|
|
250
262
|
) : (
|
|
251
263
|
<>
|
|
252
264
|
{
|
|
253
|
-
businessInfoById &&
|
|
265
|
+
businessInfoById && (
|
|
254
266
|
<BusinessInformation
|
|
255
267
|
business={businessInfoById}
|
|
256
268
|
getBusinessType={getBusinessType}
|
|
@@ -258,6 +270,7 @@ const BusinessesListingUI = (props) => {
|
|
|
258
270
|
onClose={setShowBusinessInfo}
|
|
259
271
|
goBusiness={handleBusinessClick}
|
|
260
272
|
/>
|
|
273
|
+
)
|
|
261
274
|
}
|
|
262
275
|
</>
|
|
263
276
|
)}
|
|
@@ -3,8 +3,10 @@ export const BusinessContainer = styled.div`
|
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
width: 100%;
|
|
6
|
-
margin-top:
|
|
7
|
-
|
|
6
|
+
margin-top: 0;
|
|
7
|
+
@media (min-width: 577px){
|
|
8
|
+
margin-top: 35px
|
|
9
|
+
}
|
|
8
10
|
`
|
|
9
11
|
export const BusinessList = styled.div`
|
|
10
12
|
display: flex;
|
|
@@ -14,10 +16,24 @@ export const WrapperSearch = styled.div`
|
|
|
14
16
|
box-sizing: border-box;
|
|
15
17
|
display: flex;
|
|
16
18
|
justify-content: space-between;
|
|
17
|
-
|
|
19
|
+
position: relative;
|
|
20
|
+
padding: 15px 10px 15px 25px;
|
|
21
|
+
input {
|
|
22
|
+
border-bottom: 1px solid #ccc;
|
|
23
|
+
}
|
|
24
|
+
svg{
|
|
25
|
+
${({ theme }) => theme?.business_listing_view?.components?.layout?.type === 'mapview' && css`
|
|
26
|
+
position: absolute;
|
|
27
|
+
right: 5px;
|
|
28
|
+
transform: translateY(70%);
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
`}
|
|
31
|
+
}
|
|
18
32
|
@media (min-width: 850px) {
|
|
19
33
|
width: 100%;
|
|
34
|
+
box-shadow: 0px -2px 1px 4px lightgrey;
|
|
20
35
|
}
|
|
36
|
+
|
|
21
37
|
|
|
22
38
|
${({ isCustomLayout }) => isCustomLayout && css`
|
|
23
39
|
box-sizing: border-box;
|
|
@@ -95,3 +111,22 @@ export const BusinessFilter = styled.div`
|
|
|
95
111
|
padding-right: 20px;
|
|
96
112
|
`}
|
|
97
113
|
`
|
|
114
|
+
|
|
115
|
+
export const AddressInput = styled.div`
|
|
116
|
+
border: 1px solid #ccc;
|
|
117
|
+
padding: 10px 15px;
|
|
118
|
+
margin: 20px;
|
|
119
|
+
margin-bottom: 0;
|
|
120
|
+
border-radius: 7.6px;
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
p{
|
|
123
|
+
margin: 0;
|
|
124
|
+
margin-left: 35px
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
svg {
|
|
128
|
+
position: absolute;
|
|
129
|
+
width: 24px;
|
|
130
|
+
height: 24px;
|
|
131
|
+
}
|
|
132
|
+
`
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { CardElement } from '@stripe/react-stripe-js'
|
|
2
|
+
import { CardCvcElement, CardElement, CardExpiryElement, CardNumberElement } from '@stripe/react-stripe-js'
|
|
3
3
|
import { CardForm as CardFormController, useLanguage } from 'ordering-components-external'
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
FormStripe,
|
|
7
7
|
FormRow,
|
|
8
8
|
ErrorMessage,
|
|
9
|
-
FormActions
|
|
9
|
+
FormActions,
|
|
10
|
+
CardNumberField,
|
|
11
|
+
CardExpiryCvcField,
|
|
12
|
+
CardExpiryField,
|
|
13
|
+
CardCvcField
|
|
10
14
|
} from './styles'
|
|
11
15
|
|
|
12
16
|
import { Button } from '../../styles/Buttons'
|
|
@@ -31,9 +35,14 @@ const CARD_ELEMENT_OPTIONS = {
|
|
|
31
35
|
const CardFormUI = (props) => {
|
|
32
36
|
const {
|
|
33
37
|
error,
|
|
38
|
+
errorExpiry,
|
|
39
|
+
errorCvc,
|
|
34
40
|
loading,
|
|
35
41
|
handleSubmit,
|
|
36
|
-
handleChange
|
|
42
|
+
handleChange,
|
|
43
|
+
isSplitForm,
|
|
44
|
+
handleChangeExpiry,
|
|
45
|
+
handleChangeCvc
|
|
37
46
|
} = props
|
|
38
47
|
|
|
39
48
|
const [, t] = useLanguage()
|
|
@@ -48,11 +57,43 @@ const CardFormUI = (props) => {
|
|
|
48
57
|
<BeforeComponent key={i} {...props} />))}
|
|
49
58
|
<FormStripe onSubmit={handleSubmit}>
|
|
50
59
|
<FormRow>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
60
|
+
{!isSplitForm ?
|
|
61
|
+
<>
|
|
62
|
+
<CardElement
|
|
63
|
+
options={CARD_ELEMENT_OPTIONS}
|
|
64
|
+
onChange={handleChange}
|
|
65
|
+
/>
|
|
66
|
+
<ErrorMessage>{error}</ErrorMessage>
|
|
67
|
+
</> :
|
|
68
|
+
<>
|
|
69
|
+
<CardNumberField>
|
|
70
|
+
<label>{t('CARD_NUMBER', 'Card number')}</label>
|
|
71
|
+
<CardNumberElement
|
|
72
|
+
options={CARD_ELEMENT_OPTIONS}
|
|
73
|
+
onChange={handleChange}
|
|
74
|
+
/>
|
|
75
|
+
<ErrorMessage>{error}</ErrorMessage>
|
|
76
|
+
</CardNumberField>
|
|
77
|
+
<CardExpiryCvcField>
|
|
78
|
+
<CardExpiryField>
|
|
79
|
+
<label>{t('EXPIRE_DATE', 'Expire date')}</label>
|
|
80
|
+
<CardExpiryElement
|
|
81
|
+
options={CARD_ELEMENT_OPTIONS}
|
|
82
|
+
onChange={handleChangeExpiry}
|
|
83
|
+
/>
|
|
84
|
+
<ErrorMessage>{errorExpiry}</ErrorMessage>
|
|
85
|
+
</CardExpiryField>
|
|
86
|
+
<CardCvcField>
|
|
87
|
+
<label>{t('CVC', 'CVC')}</label>
|
|
88
|
+
<CardCvcElement
|
|
89
|
+
options={CARD_ELEMENT_OPTIONS}
|
|
90
|
+
onChange={handleChangeCvc}
|
|
91
|
+
/>
|
|
92
|
+
<ErrorMessage>{errorCvc}</ErrorMessage>
|
|
93
|
+
</CardCvcField>
|
|
94
|
+
</CardExpiryCvcField>
|
|
95
|
+
</>
|
|
96
|
+
}
|
|
56
97
|
</FormRow>
|
|
57
98
|
<FormActions>
|
|
58
99
|
<Button
|
|
@@ -32,6 +32,24 @@ export const FormStripe = styled.form`
|
|
|
32
32
|
}
|
|
33
33
|
`
|
|
34
34
|
|
|
35
|
+
export const CardExpiryField = styled.div`
|
|
36
|
+
color: #ADB2B9;
|
|
37
|
+
`
|
|
38
|
+
|
|
39
|
+
export const CardCvcField = styled.div`
|
|
40
|
+
color: #ADB2B9;
|
|
41
|
+
`
|
|
42
|
+
|
|
43
|
+
export const CardNumberField = styled.div`
|
|
44
|
+
width: 100%;
|
|
45
|
+
color: #ADB2B9;
|
|
46
|
+
`
|
|
47
|
+
export const CardExpiryCvcField = styled.div`
|
|
48
|
+
display: grid;
|
|
49
|
+
grid-template-columns: repeat(2, 1fr);
|
|
50
|
+
grid-gap: 10px;
|
|
51
|
+
`
|
|
52
|
+
|
|
35
53
|
export const FormRow = styled.div`
|
|
36
54
|
input {
|
|
37
55
|
display: block;
|
|
@@ -62,8 +80,8 @@ export const ErrorMessage = styled.div`
|
|
|
62
80
|
color: #D81212;
|
|
63
81
|
margin: 10px 0px 0px 10px;
|
|
64
82
|
${props => props.theme?.rtl && css`
|
|
65
|
-
margin: 10px 10px 0px 0px
|
|
66
|
-
`}
|
|
83
|
+
margin: 10px 10px 0px 0px
|
|
84
|
+
`}
|
|
67
85
|
`
|
|
68
86
|
|
|
69
87
|
export const FormActions = styled.div`
|
|
@@ -26,6 +26,7 @@ export const CartPopover = (props) => {
|
|
|
26
26
|
const referenceElement = useRef()
|
|
27
27
|
const popperElement = useRef()
|
|
28
28
|
const arrowElement = useRef()
|
|
29
|
+
const isChew = orderingTheme?.theme?.header?.components?.layout?.type === 'Chew'
|
|
29
30
|
const popper = usePopper(referenceElement.current, popperElement.current, {
|
|
30
31
|
placement: theme?.rtl ? 'bottom' : 'bottom-end',
|
|
31
32
|
modifiers: [
|
|
@@ -102,7 +103,7 @@ export const CartPopover = (props) => {
|
|
|
102
103
|
{props.beforeComponents?.map((BeforeComponent, i) => (
|
|
103
104
|
<BeforeComponent key={i} {...props} />))}
|
|
104
105
|
<div style={{ overflow: 'hidden' }}>
|
|
105
|
-
<HeaderItem ref={referenceElement} onClick={props.onClick} name='cart-popover'>
|
|
106
|
+
<HeaderItem ref={referenceElement} onClick={props.onClick} name='cart-popover' isChew={isChew}>
|
|
106
107
|
<span>
|
|
107
108
|
<Cart3 />
|
|
108
109
|
{props.carts?.length > 0 && <span>{props.carts?.length}</span>}
|
|
@@ -3,11 +3,11 @@ import styled, { css } from 'styled-components'
|
|
|
3
3
|
export const HeaderItem = styled.div`
|
|
4
4
|
cursor: pointer;
|
|
5
5
|
> span {
|
|
6
|
+
background: ${props => !props.isChew ? props.theme.colors.primary : props.theme.colors.backgroundPage};
|
|
7
|
+
color: ${props => !props.isChew ? props.theme.colors.backgroundPage : props.theme.colors.colorPage};
|
|
6
8
|
padding: 10px;
|
|
7
9
|
display: flex;
|
|
8
10
|
align-items: center;
|
|
9
|
-
background: ${props => props.theme.colors.primary};
|
|
10
|
-
color: #FFFFFF;
|
|
11
11
|
border-radius: 7.6px;
|
|
12
12
|
|
|
13
13
|
span {
|
|
@@ -17,7 +17,7 @@ export const HeaderItem = styled.div`
|
|
|
17
17
|
margin-right: 10px;
|
|
18
18
|
` : css`
|
|
19
19
|
margin-left: 10px;
|
|
20
|
-
`}
|
|
20
|
+
`}
|
|
21
21
|
}
|
|
22
22
|
svg {
|
|
23
23
|
font-size: 16px;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import { useApi, useOrderingTheme } from 'ordering-components-external'
|
|
2
|
+
import { useApi, useConfig, useLanguage, useOrderingTheme } from 'ordering-components-external'
|
|
3
3
|
|
|
4
|
-
import { Container } from './styles'
|
|
4
|
+
import { Container, PoweredByOrdering } from './styles'
|
|
5
5
|
|
|
6
|
-
export const Footer = () => {
|
|
6
|
+
export const Footer = ({ isFooterPage }) => {
|
|
7
7
|
const [footerState, setfooterState] = useState({ body: null, loading: false, error: null })
|
|
8
8
|
const [ordering] = useApi()
|
|
9
9
|
const [{ theme }] = useOrderingTheme()
|
|
10
10
|
const requestsState = {}
|
|
11
|
-
|
|
11
|
+
const [{ configs }] = useConfig()
|
|
12
|
+
const [, t] = useLanguage()
|
|
12
13
|
const footerContent = theme?.my_products?.components?.theme_settings?.components?.values?.footer_content
|
|
13
|
-
|
|
14
|
+
const enabledPoweredByOrdering = configs?.powered_by_ordering_module?.value
|
|
14
15
|
const getPage = async () => {
|
|
15
16
|
setfooterState({ ...footerState, loading: true })
|
|
16
17
|
try {
|
|
@@ -42,7 +43,7 @@ export const Footer = () => {
|
|
|
42
43
|
return (
|
|
43
44
|
<Container>
|
|
44
45
|
{
|
|
45
|
-
(footerContent || footerState.body) && (
|
|
46
|
+
((footerContent || footerState.body) && !isFooterPage) && (
|
|
46
47
|
<div
|
|
47
48
|
style={{ wordBreak: 'break-all', padding: '0px 10px' }}
|
|
48
49
|
dangerouslySetInnerHTML={{
|
|
@@ -51,6 +52,14 @@ export const Footer = () => {
|
|
|
51
52
|
/>
|
|
52
53
|
)
|
|
53
54
|
}
|
|
55
|
+
{enabledPoweredByOrdering && (
|
|
56
|
+
<PoweredByOrdering>
|
|
57
|
+
{t('POWERED_BY', 'Powered by')}
|
|
58
|
+
<a href='https://www.ordering.co'>
|
|
59
|
+
{' '}{t('ORDERING_CO', 'Ordering.co')}
|
|
60
|
+
</a>
|
|
61
|
+
</PoweredByOrdering>
|
|
62
|
+
)}
|
|
54
63
|
</Container>
|
|
55
64
|
)
|
|
56
65
|
}
|