ordering-ui-external 10.1.0 → 10.2.1
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.e9827c5566d8cce0eaa4.js → 0.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +1 -1
- package/_bundles/{1.ordering-ui.e9827c5566d8cce0eaa4.js → 1.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +1 -1
- package/_bundles/{2.ordering-ui.e9827c5566d8cce0eaa4.js → 2.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +1 -1
- package/_bundles/{4.ordering-ui.e9827c5566d8cce0eaa4.js → 4.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +1 -1
- package/_bundles/{5.ordering-ui.e9827c5566d8cce0eaa4.js → 5.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +1 -1
- package/_bundles/{6.ordering-ui.e9827c5566d8cce0eaa4.js → 6.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +1 -1
- package/_bundles/{7.ordering-ui.e9827c5566d8cce0eaa4.js → 7.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +2 -2
- package/_bundles/{8.ordering-ui.e9827c5566d8cce0eaa4.js → 8.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +1 -1
- package/_bundles/{9.ordering-ui.e9827c5566d8cce0eaa4.js → 9.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +1 -1
- package/_bundles/ordering-ui.d1a8d1fbf5b112d5d9a9.js +2 -0
- package/_modules/components/BusinessBasicInformation/index.js +7 -10
- package/_modules/components/OrderDetails/index.js +14 -17
- package/_modules/components/ProductItemAccordion/index.js +4 -5
- package/_modules/components/RenderProductsLayout/SearchProducts/index.js +2 -5
- package/_modules/components/UserFormDetails/index.js +7 -8
- package/_modules/components/UserProfileForm/ProfileOptions/index.js +4 -5
- package/_modules/components/UserProfileForm/index.js +10 -11
- package/_modules/contexts/ThemeContext/index.js +1 -1
- package/_modules/themes/five/src/components/AddressList/index.js +0 -3
- package/_modules/themes/five/src/components/BusinessController/index.js +14 -17
- package/_modules/themes/five/src/components/BusinessController/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessInformation/styles.js +19 -14
- package/_modules/themes/five/src/components/BusinessPreorder/index.js +51 -10
- package/_modules/themes/five/src/components/BusinessPreorder/styles.js +32 -25
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +2 -5
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +11 -4
- package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +11 -12
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +22 -3
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +5 -10
- package/_modules/themes/five/src/components/Cart/index.js +17 -9
- package/_modules/themes/five/src/components/CartPopover/index.js +4 -7
- package/_modules/themes/five/src/components/CartPopover/styles.js +4 -1
- package/_modules/themes/five/src/components/Checkout/index.js +8 -8
- package/_modules/themes/five/src/components/Confirm/styles.js +16 -13
- package/_modules/themes/five/src/components/DatePicker/index.js +2 -1
- package/_modules/themes/five/src/components/Favorite/index.js +4 -5
- package/_modules/themes/five/src/components/Footer/index.js +2 -3
- package/_modules/themes/five/src/components/Header/index.js +5 -8
- package/_modules/themes/five/src/components/HeaderOption/index.js +4 -5
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +7 -10
- package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +1 -1
- package/_modules/themes/five/src/components/Modal/styles.js +4 -2
- package/_modules/themes/five/src/components/MomentContent/index.js +16 -6
- package/_modules/themes/five/src/components/MomentControl/index.js +44 -34
- package/_modules/themes/five/src/components/MomentControl/styles.js +49 -27
- package/_modules/themes/five/src/components/OrderDetails/index.js +31 -24
- package/_modules/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +4 -7
- package/_modules/themes/five/src/components/OrderProgress/index.js +5 -1
- package/_modules/themes/five/src/components/OrderTypeSelectorContent/index.js +11 -1
- package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +4 -5
- package/_modules/themes/five/src/components/OrdersOption/index.js +7 -22
- package/_modules/themes/five/src/components/OrdersOption/styles.js +38 -35
- package/_modules/themes/five/src/components/PageBanner/index.js +79 -58
- package/_modules/themes/five/src/components/PhoneAutocomplete/index.js +2 -1
- package/_modules/themes/five/src/components/ProductForm/styles.js +12 -9
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +0 -3
- package/_modules/themes/five/src/components/ProductOption/styles.js +4 -1
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +8 -9
- package/_modules/themes/five/src/components/SignUpForm/index.js +5 -5
- package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +0 -3
- package/_modules/themes/five/src/components/UserDetails/index.js +1 -1
- package/_modules/themes/five/src/components/UserDetails/styles.js +1 -1
- package/_modules/themes/five/src/components/UserFormDetails/index.js +3 -6
- package/_modules/themes/five/src/components/UserPopover/index.js +3 -6
- package/_modules/themes/five/src/components/UserPopover/styles.js +8 -5
- package/_modules/themes/five/src/components/UserProfileForm/ProfileOptions/index.js +4 -5
- package/_modules/themes/five/src/components/UserProfileForm/index.js +2 -5
- package/_modules/themes/six/src/components/BusinessBasicInformation/index.js +8 -9
- package/_modules/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +3 -6
- package/package.json +2 -2
- package/src/components/BusinessBasicInformation/index.js +7 -8
- package/src/components/OrderDetails/index.js +14 -16
- package/src/components/ProductItemAccordion/index.js +4 -3
- package/src/components/RenderProductsLayout/SearchProducts/index.js +2 -3
- package/src/components/UserFormDetails/index.js +6 -5
- package/src/components/UserProfileForm/ProfileOptions/index.js +4 -4
- package/src/components/UserProfileForm/index.js +10 -10
- package/src/contexts/ThemeContext/index.js +1 -1
- package/src/themes/five/src/components/AddressForm/index.js +1 -2
- package/src/themes/five/src/components/AddressList/index.js +1 -3
- package/src/themes/five/src/components/BusinessController/index.js +5 -7
- package/src/themes/five/src/components/BusinessController/styles.js +1 -1
- package/src/themes/five/src/components/BusinessInformation/index.js +1 -2
- package/src/themes/five/src/components/BusinessInformation/styles.js +2 -2
- package/src/themes/five/src/components/BusinessPreorder/index.js +61 -10
- package/src/themes/five/src/components/BusinessPreorder/styles.js +93 -43
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +2 -3
- package/src/themes/five/src/components/BusinessProductsList/index.js +1 -2
- package/src/themes/five/src/components/BusinessProductsListing/index.js +10 -3
- package/src/themes/five/src/components/BusinessProductsListing/styles.js +1 -1
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +17 -0
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +6 -7
- package/src/themes/five/src/components/Cart/index.js +11 -4
- package/src/themes/five/src/components/CartPopover/index.js +2 -3
- package/src/themes/five/src/components/CartPopover/styles.js +1 -1
- package/src/themes/five/src/components/Checkout/index.js +5 -6
- package/src/themes/five/src/components/Confirm/styles.js +1 -1
- package/src/themes/five/src/components/DatePicker/index.js +1 -0
- package/src/themes/five/src/components/Favorite/index.js +4 -3
- package/src/themes/five/src/components/Footer/index.js +3 -2
- package/src/themes/five/src/components/Header/index.js +4 -5
- package/src/themes/five/src/components/HeaderOption/index.js +4 -3
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +7 -8
- package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +1 -0
- package/src/themes/five/src/components/Modal/styles.js +1 -1
- package/src/themes/five/src/components/MomentContent/index.js +17 -8
- package/src/themes/five/src/components/MomentControl/index.js +83 -45
- package/src/themes/five/src/components/MomentControl/styles.js +137 -34
- package/src/themes/five/src/components/MyOrders/index.js +1 -1
- package/src/themes/five/src/components/OrderDetails/index.js +50 -21
- package/src/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +4 -6
- package/src/themes/five/src/components/OrderProgress/index.js +5 -1
- package/src/themes/five/src/components/OrderTypeSelectorContent/index.js +13 -1
- package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +4 -3
- package/src/themes/five/src/components/OrdersOption/index.js +3 -17
- package/src/themes/five/src/components/OrdersOption/styles.js +3 -4
- package/src/themes/five/src/components/PageBanner/index.js +65 -51
- package/src/themes/five/src/components/PhoneAutocomplete/index.js +1 -0
- package/src/themes/five/src/components/ProductForm/styles.js +1 -1
- package/src/themes/five/src/components/ProductItemAccordion/index.js +1 -2
- package/src/themes/five/src/components/ProductOption/styles.js +1 -1
- package/src/themes/five/src/components/RenderProductsLayout/index.js +9 -6
- package/src/themes/five/src/components/SignUpForm/index.js +6 -6
- package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +1 -2
- package/src/themes/five/src/components/UserDetails/index.js +1 -1
- package/src/themes/five/src/components/UserDetails/styles.js +3 -0
- package/src/themes/five/src/components/UserFormDetails/index.js +3 -4
- package/src/themes/five/src/components/UserPopover/index.js +3 -4
- package/src/themes/five/src/components/UserPopover/styles.js +1 -1
- package/src/themes/five/src/components/UserProfileForm/ProfileOptions/index.js +4 -3
- package/src/themes/five/src/components/UserProfileForm/index.js +2 -4
- package/src/themes/six/src/components/BusinessBasicInformation/index.js +8 -7
- package/src/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +2 -3
- package/template/app.js +15 -10
- package/template/components/HelmetTags/index.js +3 -2
- package/template/pages/AddressList/index.js +4 -3
- package/template/pages/BusinessProductsList/index.js +5 -4
- package/template/pages/BusinessesList/index.js +6 -6
- package/template/pages/Checkout/index.js +6 -4
- package/template/pages/Home/index.js +4 -2
- package/template/pages/MessagesList/index.js +5 -4
- package/template/pages/MyOrders/index.js +6 -5
- package/template/pages/OrderDetails/index.js +4 -3
- package/_bundles/ordering-ui.e9827c5566d8cce0eaa4.js +0 -2
- package/template/components/OrderingThemeUpdated/index.js +0 -41
- /package/_bundles/{7.ordering-ui.e9827c5566d8cce0eaa4.js.LICENSE.txt → 7.ordering-ui.d1a8d1fbf5b112d5d9a9.js.LICENSE.txt} +0 -0
- /package/_bundles/{ordering-ui.e9827c5566d8cce0eaa4.js.LICENSE.txt → ordering-ui.d1a8d1fbf5b112d5d9a9.js.LICENSE.txt} +0 -0
package/template/app.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
2
|
import PWAPrompt from 'react-ios-pwa-prompt'
|
|
3
|
-
import { useTheme
|
|
3
|
+
import { useTheme } from 'styled-components'
|
|
4
|
+
import { ThemeProvider } from '../src/contexts/ThemeContext'
|
|
4
5
|
import loadable from '@loadable/component'
|
|
5
6
|
import {
|
|
6
7
|
Switch,
|
|
@@ -28,7 +29,6 @@ import { useOnlineStatus } from '../src/hooks/useOnlineStatus'
|
|
|
28
29
|
import { useWindowSize } from '../src/hooks/useWindowSize'
|
|
29
30
|
|
|
30
31
|
import settings from './config'
|
|
31
|
-
import { orderingThemeUpdated } from './components/OrderingThemeUpdated'
|
|
32
32
|
|
|
33
33
|
import { SpinnerLoader } from '../src/components/SpinnerLoader'
|
|
34
34
|
import { Input } from '../src/themes/five/src/styles/Inputs'
|
|
@@ -134,7 +134,8 @@ export const App = () => {
|
|
|
134
134
|
colors: {
|
|
135
135
|
...theme.colors,
|
|
136
136
|
...(orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_btn_color && { primary: orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_btn_color }),
|
|
137
|
-
...(orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_link_color && { links: orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_link_color })
|
|
137
|
+
...(orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_link_color && { links: orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_link_color }),
|
|
138
|
+
...(orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.background_page && { backgroundPage: orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.background_page })
|
|
138
139
|
},
|
|
139
140
|
images: {
|
|
140
141
|
...theme.images,
|
|
@@ -170,6 +171,10 @@ export const App = () => {
|
|
|
170
171
|
}
|
|
171
172
|
}
|
|
172
173
|
|
|
174
|
+
const websiteThemeType = themeUpdated?.theme?.my_products?.components?.website_theme?.components?.type
|
|
175
|
+
const websiteThemeBusinessSlug = themeUpdated?.theme?.my_products?.components?.website_theme?.components?.business_slug
|
|
176
|
+
const updatedBusinessSlug = (websiteThemeType === 'single_store' && websiteThemeBusinessSlug) || settings?.businessSlug
|
|
177
|
+
|
|
173
178
|
const businessesSlug = {
|
|
174
179
|
marketplace: 'marketplace',
|
|
175
180
|
kiosk: settings?.businessSlug
|
|
@@ -180,21 +185,21 @@ export const App = () => {
|
|
|
180
185
|
businessSlug: businessesSlug[isKioskApp ? 'kiosk' : 'marketplace']
|
|
181
186
|
}
|
|
182
187
|
|
|
183
|
-
const signUpBusinesslayout =
|
|
188
|
+
const signUpBusinesslayout = themeUpdated?.theme?.business_signup?.components?.layout?.type === 'old'
|
|
184
189
|
? 'old'
|
|
185
190
|
: 'new'
|
|
186
191
|
|
|
187
|
-
const signUpDriverlayout =
|
|
192
|
+
const signUpDriverlayout = themeUpdated?.theme?.driver_signup?.components?.layout?.type === 'old'
|
|
188
193
|
? 'old'
|
|
189
194
|
: 'new'
|
|
190
195
|
|
|
191
196
|
const HeaderComponent =
|
|
192
197
|
isKioskApp ? HeaderKiosk
|
|
193
|
-
:
|
|
198
|
+
: themeUpdated?.theme?.header?.components?.layout?.type === 'old'
|
|
194
199
|
? HeaderOld
|
|
195
|
-
:
|
|
200
|
+
: themeUpdated?.theme?.header?.components?.layout?.type === 'red'
|
|
196
201
|
? HeaderRed
|
|
197
|
-
:
|
|
202
|
+
: themeUpdated?.theme?.header?.components?.layout?.type === 'starbucks'
|
|
198
203
|
? HeaderStarbucks
|
|
199
204
|
: Header
|
|
200
205
|
|
|
@@ -205,7 +210,7 @@ export const App = () => {
|
|
|
205
210
|
const isEmailVerifyRequired = auth && configs?.verification_email_required?.value === '1' && !user?.email_verified
|
|
206
211
|
const isPhoneVerifyRequired = auth && configs?.verification_phone_required?.value === '1' && !user?.phone_verified
|
|
207
212
|
const isUserVerifyRequired = (isEmailVerifyRequired || isPhoneVerifyRequired) && !isKioskApp
|
|
208
|
-
const isHideFooter =
|
|
213
|
+
const isHideFooter = themeUpdated?.theme?.footer?.hidden
|
|
209
214
|
|
|
210
215
|
const isHome = location.pathname === '/' || location.pathname === '/home'
|
|
211
216
|
const isFooterPage = location.pathname === '/pages/footer' || isKioskApp || isHideFooter
|
|
@@ -524,7 +529,7 @@ export const App = () => {
|
|
|
524
529
|
{
|
|
525
530
|
loaded && (
|
|
526
531
|
<ThemeProvider
|
|
527
|
-
theme={
|
|
532
|
+
theme={themeUpdated}
|
|
528
533
|
>
|
|
529
534
|
<ListenPageChanges />
|
|
530
535
|
{!(isKioskApp && isHome) && (
|
|
@@ -2,13 +2,14 @@ import React from 'react'
|
|
|
2
2
|
import { Helmet } from 'react-helmet'
|
|
3
3
|
import helmetData from '../../helmetdata.json'
|
|
4
4
|
import settings from '../../config'
|
|
5
|
-
import { useConfig
|
|
5
|
+
import { useConfig } from 'ordering-components-external'
|
|
6
|
+
import { useTheme } from 'styled-components'
|
|
6
7
|
|
|
7
8
|
export const HelmetTags = (props) => {
|
|
8
9
|
const {
|
|
9
10
|
page
|
|
10
11
|
} = props
|
|
11
|
-
const
|
|
12
|
+
const theme = useTheme()
|
|
12
13
|
const [configs] = useConfig()
|
|
13
14
|
const enabledPoweredByOrdering = configs?.powered_by_ordering_module?.value
|
|
14
15
|
const metaTag = page ? helmetData[page] : helmetData.app
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { AddressList as AddressListController } from '../../../src/themes/five/src/components/AddressList'
|
|
3
3
|
import { ProfileOptions } from '../../../src/themes/five/src/components/UserProfileForm/ProfileOptions'
|
|
4
|
-
import { useLanguage, useSession
|
|
4
|
+
import { useLanguage, useSession } from 'ordering-components-external'
|
|
5
5
|
import { HelmetTags } from '../../components/HelmetTags'
|
|
6
6
|
import { SavedPlaces } from './styles'
|
|
7
|
+
import { useTheme } from 'styled-components'
|
|
7
8
|
|
|
8
9
|
export const AddressList = (props) => {
|
|
9
10
|
const [{ user }] = useSession()
|
|
10
11
|
const [, t] = useLanguage()
|
|
11
|
-
const
|
|
12
|
+
const theme = useTheme()
|
|
12
13
|
const addressListParams = {
|
|
13
14
|
...props,
|
|
14
15
|
addressList: user?.addresses,
|
|
15
16
|
isProfile: true,
|
|
16
17
|
isModal: true
|
|
17
18
|
}
|
|
18
|
-
const showProfileOptions =
|
|
19
|
+
const showProfileOptions = theme?.profile?.components?.address_list?.components?.layout?.position === 'new_page'
|
|
19
20
|
|
|
20
21
|
return (
|
|
21
22
|
<>
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import { useParams, useLocation } from 'react-router-dom'
|
|
3
|
-
import { useApi, useEvent, useSite
|
|
3
|
+
import { useApi, useEvent, useSite } from 'ordering-components-external'
|
|
4
4
|
import { BusinessProductsListing } from '../../../src/themes/five/src/components/BusinessProductsListing'
|
|
5
5
|
import { HelmetTags } from '../../components/HelmetTags'
|
|
6
6
|
import { capitalize } from '../../../src/utils'
|
|
7
7
|
import settings from '../../config'
|
|
8
8
|
import { checkSiteUrl } from '../../Utils'
|
|
9
|
+
import { useTheme } from 'styled-components'
|
|
9
10
|
|
|
10
11
|
export const BusinessProductsList = (props) => {
|
|
11
12
|
const [{ site }] = useSite()
|
|
12
13
|
const { search } = useLocation()
|
|
13
|
-
const
|
|
14
|
+
const theme = useTheme()
|
|
14
15
|
|
|
15
|
-
const websiteThemeType =
|
|
16
|
-
const websiteThemeBusinessSlug =
|
|
16
|
+
const websiteThemeType = theme?.my_products?.components?.website_theme?.components?.type
|
|
17
|
+
const websiteThemeBusinessSlug = theme?.my_products?.components?.website_theme?.components?.business_slug
|
|
17
18
|
const updatedBusinessSlug = (websiteThemeType === 'single_store' && websiteThemeBusinessSlug) || settings?.businessSlug
|
|
18
19
|
|
|
19
20
|
const [helmetMetaTags, setHelmetMetaTags] = useState({
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { BusinessesListing } from '../../../src/themes/five/src/components/BusinessesListing'
|
|
3
|
-
import { useEvent, useSite
|
|
3
|
+
import { useEvent, useSite } from 'ordering-components-external'
|
|
4
4
|
import { HelmetTags } from '../../components/HelmetTags'
|
|
5
5
|
import settings from '../../config'
|
|
6
6
|
import { checkSiteUrl } from '../../Utils'
|
|
7
|
+
import { useTheme } from 'styled-components'
|
|
7
8
|
|
|
8
9
|
export const BusinessesList = (props) => {
|
|
9
10
|
const [events] = useEvent()
|
|
10
11
|
const [{ site }] = useSite()
|
|
11
|
-
const
|
|
12
|
-
|
|
12
|
+
const theme = useTheme()
|
|
13
13
|
const businessUrlTemplate = checkSiteUrl(site?.business_url_template, '/store/:business_slug')
|
|
14
14
|
|
|
15
|
-
const websiteThemeType =
|
|
16
|
-
const websiteThemeBusinessSlug =
|
|
15
|
+
const websiteThemeType = theme?.my_products?.components?.website_theme?.components?.type
|
|
16
|
+
const websiteThemeBusinessSlug = theme?.my_products?.components?.website_theme?.components?.business_slug
|
|
17
17
|
const updatedBusinessSlug = (websiteThemeType === 'single_store' && websiteThemeBusinessSlug) || settings?.businessSlug
|
|
18
|
-
const websiteThemeFranchiseSlug =
|
|
18
|
+
const websiteThemeFranchiseSlug = theme?.my_products?.components?.website_theme?.components?.franchise_slug
|
|
19
19
|
const updatedFranchiseSlug = (websiteThemeType === 'franchise' && websiteThemeFranchiseSlug) || settings?.franchiseSlug
|
|
20
20
|
|
|
21
21
|
const businessListingProps = {
|
|
@@ -4,9 +4,10 @@ import { useParams, useLocation } from 'react-router-dom'
|
|
|
4
4
|
import { HelmetTags } from '../../components/HelmetTags'
|
|
5
5
|
|
|
6
6
|
import { Checkout } from '../../../src/themes/five/src/components/Checkout'
|
|
7
|
-
import { useEvent, useOrder, useLanguage, useSite
|
|
7
|
+
import { useEvent, useOrder, useLanguage, useSite } from 'ordering-components-external'
|
|
8
8
|
import settings from '../../config'
|
|
9
9
|
import { checkSiteUrl } from '../../Utils'
|
|
10
|
+
import { useTheme } from 'styled-components'
|
|
10
11
|
|
|
11
12
|
export const CheckoutPage = (props) => {
|
|
12
13
|
const { cartUuid } = useParams()
|
|
@@ -15,9 +16,10 @@ export const CheckoutPage = (props) => {
|
|
|
15
16
|
const [orderState, { confirmCart, changeMoment }] = useOrder()
|
|
16
17
|
const [, t] = useLanguage()
|
|
17
18
|
const [{ site }] = useSite()
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const
|
|
19
|
+
const theme = useTheme()
|
|
20
|
+
|
|
21
|
+
const websiteThemeType = theme?.my_products?.components?.website_theme?.components?.type
|
|
22
|
+
const websiteThemeBusinessSlug = theme?.my_products?.components?.website_theme?.components?.business_slug
|
|
21
23
|
const updatedBusinessSlug = (websiteThemeType === 'single_store' && websiteThemeBusinessSlug) || settings?.businessSlug
|
|
22
24
|
|
|
23
25
|
const stripePayments = ['stripe', 'stripe_connect', 'stripe_direct', 'google_pay', 'apple_pay']
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import { useApi, useEvent, useSite
|
|
2
|
+
import { useApi, useEvent, useSite } from 'ordering-components-external'
|
|
3
3
|
import { HomeHero } from '../../../src/themes/five/src/components/HomeHero'
|
|
4
4
|
import { KioskHomeHero } from '../../../src/themes/five/src/components/HomeHero/layouts/KioskHomeHero'
|
|
5
5
|
import { useHistory } from 'react-router-dom'
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
SkeletonSide
|
|
19
19
|
} from './styles'
|
|
20
20
|
import { checkSiteUrl } from '../../Utils'
|
|
21
|
+
import { useTheme } from 'styled-components'
|
|
21
22
|
|
|
22
23
|
export const HomePage = (props) => {
|
|
23
24
|
const history = useHistory()
|
|
@@ -25,7 +26,8 @@ export const HomePage = (props) => {
|
|
|
25
26
|
const [ordering] = useApi()
|
|
26
27
|
const [events] = useEvent()
|
|
27
28
|
const [{ site }] = useSite()
|
|
28
|
-
const
|
|
29
|
+
const theme = useTheme()
|
|
30
|
+
|
|
29
31
|
const websiteThemeType = theme?.my_products?.components?.website_theme?.components?.type
|
|
30
32
|
const websiteThemeBusinessSlug = theme?.my_products?.components?.website_theme?.components?.business_slug
|
|
31
33
|
const updatedBusinessSlug = (websiteThemeType === 'single_store' && websiteThemeBusinessSlug) || settings?.businessSlug
|
|
@@ -2,14 +2,15 @@ import React from 'react'
|
|
|
2
2
|
import { MessagesListing } from '../../../src/themes/five/src/components/MessagesListing'
|
|
3
3
|
|
|
4
4
|
import { HelmetTags } from '../../components/HelmetTags'
|
|
5
|
-
import { useEvent
|
|
5
|
+
import { useEvent } from 'ordering-components-external'
|
|
6
6
|
import settings from '../../config'
|
|
7
|
+
import { useTheme } from 'styled-components'
|
|
7
8
|
|
|
8
9
|
export const MessagesList = (props) => {
|
|
9
10
|
const [events] = useEvent()
|
|
10
|
-
const
|
|
11
|
-
const websiteThemeType =
|
|
12
|
-
const websiteThemeFranchiseSlug =
|
|
11
|
+
const theme = useTheme()
|
|
12
|
+
const websiteThemeType = theme?.my_products?.components?.website_theme?.components?.type
|
|
13
|
+
const websiteThemeFranchiseSlug = theme?.my_products?.components?.website_theme?.components?.franchise_slug
|
|
13
14
|
const updatedFranchiseSlug = (websiteThemeType === 'franchise' && websiteThemeFranchiseSlug) || settings?.franchiseSlug
|
|
14
15
|
|
|
15
16
|
const messageprops = {
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { useSite, useEvent
|
|
2
|
+
import { useSite, useEvent } from 'ordering-components-external'
|
|
3
3
|
import { MyOrders as MyOrdersController } from '../../../src/themes/five/src/components/MyOrders'
|
|
4
4
|
import { HelmetTags } from '../../components/HelmetTags'
|
|
5
5
|
import settings from '../../config'
|
|
6
6
|
import { checkSiteUrl } from '../../Utils'
|
|
7
7
|
import { useWindowSize } from '../../../src/hooks/useWindowSize'
|
|
8
|
+
import { useTheme } from 'styled-components'
|
|
8
9
|
|
|
9
10
|
export const MyOrders = (props) => {
|
|
10
11
|
const [events] = useEvent()
|
|
11
12
|
const [{ site }] = useSite()
|
|
12
|
-
const
|
|
13
|
-
const websiteThemeType =
|
|
14
|
-
const websiteThemeBusinessSlug =
|
|
13
|
+
const theme = useTheme()
|
|
14
|
+
const websiteThemeType = theme?.my_products?.components?.website_theme?.components?.type
|
|
15
|
+
const websiteThemeBusinessSlug = theme?.my_products?.components?.website_theme?.components?.business_slug
|
|
15
16
|
const updatedBusinessSlug = (websiteThemeType === 'single_store' && websiteThemeBusinessSlug) || settings?.businessSlug
|
|
16
|
-
const websiteThemeFranchiseSlug =
|
|
17
|
+
const websiteThemeFranchiseSlug = theme?.my_products?.components?.website_theme?.components?.franchise_slug
|
|
17
18
|
const updatedFranchiseSlug = (websiteThemeType === 'franchise' && websiteThemeFranchiseSlug) || settings?.franchiseSlug
|
|
18
19
|
|
|
19
20
|
const windowSize = useWindowSize()
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { useHistory, useParams, useLocation } from 'react-router-dom'
|
|
3
3
|
import { HelmetTags } from '../../components/HelmetTags'
|
|
4
|
-
import {
|
|
4
|
+
import { useSite, useEvent } from 'ordering-components-external'
|
|
5
5
|
import { OrderDetails } from '../../../src/themes/five/src/components/OrderDetails'
|
|
6
6
|
import { OrderDetails as OrderDetailsKiosk } from '../../../src/themes/five/src/components/OrderDetails/layouts/Kiosk'
|
|
7
7
|
import { OrderDetails as OrderDetailsOld } from '../../../src/components/OrderDetails'
|
|
8
8
|
import settings from '../../config'
|
|
9
9
|
import { checkSiteUrl } from '../../Utils'
|
|
10
|
+
import { useTheme } from 'styled-components'
|
|
10
11
|
|
|
11
12
|
export const OrderDetailsPage = (props) => {
|
|
12
13
|
const history = useHistory()
|
|
13
14
|
const { orderId } = useParams()
|
|
14
15
|
const hashKey = new URLSearchParams(useLocation()?.search)?.get('hash') || null
|
|
15
|
-
const [orderingTheme] = useOrderingTheme()
|
|
16
16
|
const [events] = useEvent()
|
|
17
17
|
const [{ site }] = useSite()
|
|
18
|
+
const theme = useTheme()
|
|
18
19
|
const businessUrlTemplate = checkSiteUrl(site?.business_url_template, '/store/:business_slug')
|
|
19
20
|
|
|
20
21
|
const useKioskApp = settings?.use_kiosk
|
|
21
22
|
const OrderDetailsComponent = useKioskApp ? OrderDetailsKiosk
|
|
22
|
-
:
|
|
23
|
+
: theme?.confirmation?.components?.layout?.type === 'old'
|
|
23
24
|
? OrderDetailsOld
|
|
24
25
|
: OrderDetails
|
|
25
26
|
|