ordering-ui-admin-external 1.14.2 → 1.15.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/{ordering-ui-admin.ffcf30d2b952270f0af3.js → ordering-ui-admin.e2a58dcc95d6a983dfc0.js} +2 -2
- package/_modules/components/Settings/IntegrationListing/index.js +0 -8
- package/package.json +2 -2
- package/src/components/BusinessIntelligence/BusinessReviewDetails/index.js +4 -4
- package/src/components/BusinessIntelligence/BusinessReviewList/index.js +29 -6
- package/src/components/BusinessIntelligence/InvoiceBusinessManager/index.js +17 -1
- package/src/components/BusinessIntelligence/InvoiceDriverManager/index.js +17 -1
- package/src/components/BusinessIntelligence/InvoiceManager/index.js +16 -2
- package/src/components/BusinessIntelligence/InvoiceOrdertype/styles.js +1 -0
- package/src/components/BusinessIntelligence/ProductReviewDetails/index.js +4 -4
- package/src/components/BusinessIntelligence/Reports/index.js +16 -2
- package/src/components/BusinessIntelligence/ReviewProductsListing/index.js +34 -6
- package/src/components/BusinessIntelligence/ReviewsListing/index.js +31 -5
- package/src/components/BusinessIntelligence/UserReviewDetails/index.js +4 -4
- package/src/components/BusinessIntelligence/UsersReviewList/index.js +32 -11
- package/src/components/CartRecovery/RecoveryActionDetail/index.js +19 -1
- package/src/components/CartRecovery/RecoveryActionListing/index.js +21 -3
- package/src/components/Delivery/DeliveryUsersListing/index.js +3 -1
- package/src/components/Delivery/DriversCompaniesListing/index.js +27 -9
- package/src/components/Delivery/DriversCompanyDetailsForm/index.js +37 -8
- package/src/components/Delivery/DriversGroupDetails/index.js +36 -4
- package/src/components/Delivery/DriversGroupLogistics/index.js +18 -2
- package/src/components/Delivery/DriversGroupsListing/index.js +20 -6
- package/src/components/Delivery/UserDetails/index.js +26 -1
- package/src/components/Loyalty/GiftCardDetail/styles.js +192 -0
- package/src/components/Loyalty/GiftCards/index.js +22 -2
- package/src/components/Loyalty/PointsWalletBusinessList/index.js +24 -1
- package/src/components/Loyalty/PointsWalletLevels/index.js +21 -1
- package/src/components/Loyalty/RewardsPrograms/index.js +30 -3
- package/src/components/Loyalty/Wallet/index.js +22 -1
- package/src/components/Marketing/AdBannersListing/index.js +25 -8
- package/src/components/Marketing/BannerImageDetails/index.js +2 -1
- package/src/components/Marketing/CampaignDetail/index.js +22 -1
- package/src/components/Marketing/CampaignEmail/styles.js +3 -0
- package/src/components/Marketing/CampaignListing/index.js +18 -1
- package/src/components/Marketing/CampaignNotification/styles.js +3 -0
- package/src/components/Marketing/CampaignSMS/styles.js +3 -0
- package/src/components/Marketing/EnterprisePromotionGeneralDetails/index.js +2 -1
- package/src/components/Marketing/EnterprisePromotionListing/index.js +19 -1
- package/src/components/Marketing/PageBanner/index.js +26 -3
- package/src/components/Messages/MessagesListing/index.js +17 -0
- package/src/components/MyProducts/AdvancedSettings/FontStyleGroup.js +64 -0
- package/src/components/MyProducts/AdvancedSettings/OrderType.js +40 -0
- package/src/components/MyProducts/AdvancedSettings/SettingComponent.js +104 -0
- package/src/components/MyProducts/AdvancedSettings/index.js +541 -0
- package/src/components/MyProducts/AdvancedSettings/styles.js +388 -0
- package/src/components/MyProducts/AppLayout/index.js +19 -2
- package/src/components/MyProducts/AppLayout/styles.js +65 -0
- package/src/components/MyProducts/CallCenterApp/index.js +1 -1
- package/src/components/MyProducts/CustomerApp/index.js +2 -2
- package/src/components/MyProducts/DriverApp/index.js +2 -2
- package/src/components/MyProducts/KioskApp/index.js +1 -1
- package/src/components/MyProducts/OrderingWebsite/index.js +309 -255
- package/src/components/MyProducts/OrderingWebsite/styles.js +99 -2
- package/src/components/MyProducts/PosApp/index.js +1 -1
- package/src/components/MyProducts/StoreApp/index.js +2 -2
- package/src/components/OrderingProducts/OrderingProductDetails/index.js +24 -2
- package/src/components/OrderingProducts/OrderingProductsListing/index.js +17 -1
- package/src/components/Orders/DeliveriesManager/index.js +0 -1
- package/src/components/Orders/Messages/index.js +31 -11
- package/src/components/Orders/OrderDetails/index.js +34 -20
- package/src/components/Orders/OrderDetailsHeader/index.js +2 -3
- package/src/components/Orders/OrdersContentHeader/index.js +1 -1
- package/src/components/Orders/OrdersFilterGroup/index.js +111 -13
- package/src/components/Orders/OrdersFilterGroup/styles.js +26 -0
- package/src/components/Orders/OrdersManager/index.js +0 -1
- package/src/components/Settings/CountriesList/index.js +26 -6
- package/src/components/Settings/Deliverect/index.js +26 -2
- package/src/components/Settings/DoordashConnect/index.js +26 -2
- package/src/components/Settings/DropdownOptionList/index.js +27 -6
- package/src/components/Settings/IntegrationListing/index.js +5 -5
- package/src/components/Settings/ItsaCheckmate/index.js +26 -2
- package/src/components/Settings/LalamoveConnect/index.js +26 -2
- package/src/components/Settings/PickerExpress/index.js +26 -2
- package/src/components/Settings/PlaceListing/index.js +38 -6
- package/src/components/Settings/Settings/index.js +79 -37
- package/src/components/Settings/SettingsDetail/index.js +15 -1
- package/src/components/Settings/SitesAuthSettings/index.js +18 -1
- package/src/components/SidebarMenu/index.js +0 -2
- package/src/components/Stores/BusinessAdd/BusinessDetails/index.js +1 -10
- package/src/components/Stores/BusinessAdd/BusinessDetails/styles.js +4 -0
- package/src/components/Stores/BusinessAdd/DeliveryZone/index.js +120 -109
- package/src/components/Stores/BusinessAdd/DeliveryZone/styles.js +22 -1
- package/src/components/Stores/BusinessAdd/PaymentMethods/index.js +8 -2
- package/src/components/Stores/BusinessAdd/PaymentMethods/styles.js +4 -0
- package/src/components/Stores/BusinessAdd/ReceiveOrders/index.js +11 -6
- package/src/components/Stores/BusinessAdd/ReceiveOrders/styles.js +4 -0
- package/src/components/Stores/BusinessAdd/index.js +47 -16
- package/src/components/Stores/BusinessAdd/styles.js +27 -1
- package/src/components/Stores/BusinessAddStore/index.js +1 -1
- package/src/components/Stores/BusinessBrandListing/index.js +37 -4
- package/src/components/Stores/BusinessDeliveryPickupMore/index.js +22 -1
- package/src/components/Stores/BusinessDeliveryZoneDetails/index.js +25 -2
- package/src/components/Stores/BusinessDeliveryZoneList/index.js +30 -3
- package/src/components/Stores/BusinessDetail/index.js +20 -1
- package/src/components/Stores/BusinessDetails/index.js +18 -1
- package/src/components/Stores/BusinessFrontLayout/index.js +13 -1
- package/src/components/Stores/BusinessFrontLayout/styles.js +11 -0
- package/src/components/Stores/BusinessMenu/index.js +56 -11
- package/src/components/Stores/BusinessMenuOptions/index.js +28 -3
- package/src/components/Stores/BusinessOrderingChannels/index.js +19 -2
- package/src/components/Stores/BusinessPaymentMethods/index.js +24 -2
- package/src/components/Stores/BusinessPlaceGroupList/index.js +193 -0
- package/src/components/Stores/BusinessPlaceGroupList/styles.js +143 -0
- package/src/components/Stores/BusinessProductsCategoyDetails/index.js +21 -1
- package/src/components/Stores/BusinessProductsListing/index.js +49 -8
- package/src/components/Stores/BusinessPromotionGeneralForm/index.js +2 -2
- package/src/components/Stores/BusinessSharedMenuProducts/index.js +29 -3
- package/src/components/Stores/BusinessSync/index.js +18 -2
- package/src/components/Stores/BusinessTypes/index.js +26 -4
- package/src/components/Stores/BusinessWalletsList/index.js +23 -1
- package/src/components/Stores/BusinessesListing/index.js +11 -2
- package/src/components/Stores/ImportersButton/index.js +24 -3
- package/src/components/Stores/PaymentOption/index.js +29 -8
- package/src/components/Stores/PaymentOptionMethods/index.js +25 -3
- package/src/components/Stores/PaymentOptionPaypal/index.js +25 -3
- package/src/components/Stores/PaymentOptionSquare/index.js +25 -3
- package/src/components/Stores/PaymentOptionStripeDirect/index.js +25 -3
- package/src/components/Stores/PaymethodOptionPaypalExpress/index.js +25 -3
- package/src/components/Stores/PaymethodOptionStripeConnect/index.js +25 -3
- package/src/components/Stores/PaymethodOptionStripeRedirect/index.js +25 -3
- package/src/components/Stores/ProductDetails/index.js +19 -1
- package/src/components/Stores/ProductExtras/index.js +23 -2
- package/src/components/Stores/ProductIngredient/index.js +23 -2
- package/src/components/Stores/ProductMainDetails/index.js +20 -2
- package/src/components/Stores/ProductTagsList/index.js +28 -3
- package/src/components/Users/CustomerCashWallet/index.js +25 -3
- package/src/components/Users/CustomerDetails/index.js +20 -1
- package/src/components/Users/CustomerPointsWallet/index.js +25 -3
- package/src/components/Users/CustomersListing/index.js +9 -4
- package/src/components/Users/ProfessionalDetail/index.js +27 -1
- package/src/components/Users/ProfessionalListing/index.js +9 -4
- package/src/components/Users/UserActiveStateFilter/index.js +16 -3
- package/src/components/Users/UserDetails/index.js +27 -1
- package/src/components/Users/UsersListing/index.js +9 -4
- package/template/pages/BusinessProductsList/index.js +1 -1
- /package/_bundles/{ordering-ui-admin.ffcf30d2b952270f0af3.js.LICENSE.txt → ordering-ui-admin.e2a58dcc95d6a983dfc0.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
import React, { useState, useMemo, useEffect } from 'react'
|
|
2
|
+
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
|
+
import { SettingComponent } from './SettingComponent'
|
|
4
|
+
import { Button, Input } from '../../../styles'
|
|
5
|
+
import { ImageBox } from './ImageBox'
|
|
6
|
+
import { Alert } from '../../Shared'
|
|
7
|
+
import { OrderType } from './OrderType'
|
|
8
|
+
import { CheckSquareFill as CheckedIcon, Square as UnCheckedIcon } from 'react-bootstrap-icons'
|
|
9
|
+
import { FontStyleGroup } from './FontStyleGroup'
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
Container,
|
|
13
|
+
BoxLayout,
|
|
14
|
+
HomePageWrapper,
|
|
15
|
+
HideCheckWrapper,
|
|
16
|
+
ShadowWrapper,
|
|
17
|
+
ShadowInfoWrapper,
|
|
18
|
+
ShadowInputGroup,
|
|
19
|
+
ShadowInputControl,
|
|
20
|
+
DropShadow,
|
|
21
|
+
DropShadowWrapper,
|
|
22
|
+
HeadingWrapper,
|
|
23
|
+
HomeImageFullScreenWrapper,
|
|
24
|
+
ImageGroup,
|
|
25
|
+
FormControl,
|
|
26
|
+
ButtonWrapper
|
|
27
|
+
} from './styles'
|
|
28
|
+
|
|
29
|
+
export const AdvancedSettings = (props) => {
|
|
30
|
+
const { themesList, advancedValues, setAdvancedValues, handleUpdateSiteTheme } = props
|
|
31
|
+
|
|
32
|
+
const [, t] = useLanguage()
|
|
33
|
+
|
|
34
|
+
const [themeStructure, setThemeStructure] = useState({})
|
|
35
|
+
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
36
|
+
|
|
37
|
+
const homepageViewList = [
|
|
38
|
+
{ key: 'homepage_header', name: t('HOMEPAGE_HEADER', 'Homepage Header'), type: 'hidden', path: 'homepage_view.components.homepage_header.hidden' }
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
const headerList = [
|
|
42
|
+
{ name: t('BACKGROUND_COLOR', 'Background color'), type: 'color', path: 'header.components.style.backgroundColor' },
|
|
43
|
+
{ name: t('LOGO_POSITION', 'Logo Position'), type: 'position', path: 'header.components.logo.components.layout.position' },
|
|
44
|
+
{ name: t('LANGUAGE_SELECTOR', 'Language selector'), type: 'hidden', path: 'header.components.language_selector.hidden' }
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
const businessListing = [
|
|
48
|
+
{ name: t('BUSINESS_LISTING_IMAGE', 'Business listing image'), type: 'image', path: 'business_listing_view.components.business_hero.components.image' },
|
|
49
|
+
{ name: t('PREVIOUS_ORDERS_BLOCK', 'Previous orders block'), type: 'hidden', path: 'business_listing_view.components.previous_orders_block.hidden' },
|
|
50
|
+
{ name: t('Highest_rated_business_block', 'Highest rated business block'), type: 'hidden', path: 'business_listing_view.components.highest_rated_business_block.hidden' },
|
|
51
|
+
{ name: t('CATEGORIES_BLOCK', 'Categories block'), type: 'hidden', path: 'business_listing_view.components.categories.hidden' },
|
|
52
|
+
{ name: t('AMOUNT_OF_BUSINESSES_TO_DISPLAY_PER_ROW', 'Amount of businesses to display per row:'), type: 'position', path: 'business_listing_view.components.layout.rows' },
|
|
53
|
+
{ name: t('SEARCH_BOX', 'Search box'), type: 'hidden', path: 'business_listing_view.components.search.hidden' },
|
|
54
|
+
{ name: t('FILTER_ICON', 'Filter icon'), type: 'hidden', path: 'business_listing_view.components.filter.hidden' },
|
|
55
|
+
{ name: t('CITIES_DROPDOWN', 'Cities dropdown'), type: 'hidden', path: 'business_listing_view.components.cities.hidden' }
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
const businessBlockList = [
|
|
59
|
+
{ name: t('LOGO', 'Logo'), type: 'hidden', path: 'business_listing_view.components.business.components.logo.hidden' },
|
|
60
|
+
{ name: t('HEADER', 'Header'), type: 'hidden', path: 'business_listing_view.components.business.components.header.hidden' },
|
|
61
|
+
{ name: t('DELIVERY_FEE', 'Delivery Fee'), type: 'hidden', path: 'business_listing_view.components.business.components.fee.hidden' },
|
|
62
|
+
{ name: t('TIME', 'Time'), type: 'hidden', path: 'business_listing_view.components.business.components.time.hidden' },
|
|
63
|
+
{ name: t('DISTANCE', 'Distance'), type: 'hidden', path: 'business_listing_view.components.business.components.distance.hidden' },
|
|
64
|
+
{ name: t('REVIEWS', 'Reviews'), type: 'hidden', path: 'business_listing_view.components.business.components.reviews.hidden' },
|
|
65
|
+
{ name: t('FAVORITE_BUTTON', 'Favorite button'), type: 'hidden', path: 'business_listing_view.components.business.components.favorite.hidden' },
|
|
66
|
+
{ name: t('OFFER_BADGE', 'Offer badge'), type: 'hidden', path: 'business_listing_view.components.business.components.offer.hidden' },
|
|
67
|
+
{ name: t('OFFER_BADGE_POSITION', 'Offer badge position'), type: 'position', path: 'business_listing_view.components.business.components.offer.position' },
|
|
68
|
+
{ name: t('CATEGORIES', 'Categories'), type: 'hidden', path: 'business_listing_view.components.business.components.categories.hidden' },
|
|
69
|
+
{ name: t('FEATURED_BADGE', 'Featured badge'), type: 'hidden', path: 'business_listing_view.components.business.components.featured_badge.hidden' }
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
const businessPageList = [
|
|
73
|
+
{ name: t('DEFAULT_BACKGROUND_COLOR', 'Default Background color'), type: 'color', path: 'business_view.components.style.backgroundColor' },
|
|
74
|
+
{ name: t('PRODUCTS_FROM_PREVIOUS_ORDERS_BLOCK', 'Products from previous orders block'), type: 'hidden', path: 'business_view.components.products_ordered.hidden' },
|
|
75
|
+
{ name: t('NEAR_BUSINESS_BLOCK', 'Near business block'), type: 'hidden', path: 'business_view.components.near_business.hidden' },
|
|
76
|
+
{ name: t('ORDER_VIEW_BUTTON', 'Order view button'), type: 'hidden', path: 'business_view.components.order_view_button.hidden' }
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
const businessInfoList = [
|
|
80
|
+
{ name: t('DESCRIPTION', 'Description'), type: 'hidden', path: 'business_view.components.information.components.description.hidden' },
|
|
81
|
+
{ name: t('ABOUT', 'About'), type: 'hidden', path: 'business_view.components.information.components.about.hidden' },
|
|
82
|
+
{ name: t('VIDEOS', 'Videos'), type: 'hidden', path: 'business_view.components.information.components.videos.hidden' },
|
|
83
|
+
{ name: t('MENU_LIST_DELIVERY_TIME', 'Delivery time'), type: 'hidden', path: 'business_view.components.information.components.delivery_time.hidden' },
|
|
84
|
+
{ name: t('PICKUP_TIME', 'Pickup time'), type: 'hidden', path: 'business_view.components.information.components.pickup_time.hidden' },
|
|
85
|
+
{ name: t('IMAGES', 'Images'), type: 'hidden', path: 'business_view.components.information.components.images.hidden' },
|
|
86
|
+
{ name: t('ADDRESS', 'Address'), type: 'hidden', path: 'business_view.components.information.components.address.hidden' }
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
const productBlockList = [
|
|
90
|
+
{ name: t('DUMMY_IMAGE_WHEN_NO_IMAGE', 'Dummy image when no image'), type: 'hidden', path: 'business_view.components.products.components.product.components.dummy.hidden' },
|
|
91
|
+
{ name: t('DESCRIPTION', 'Description'), type: 'hidden', path: 'business_view.components.products.components.product.components.description.hidden' },
|
|
92
|
+
{ name: t('IMAGE', 'Image'), type: 'hidden', path: 'business_view.components.products.components.product.components.image.hidden' },
|
|
93
|
+
{ name: t('POSITION', 'Position'), type: 'position', path: 'business_view.components.products.components.product.components.image.position' }
|
|
94
|
+
]
|
|
95
|
+
|
|
96
|
+
const reviewsPopups = [
|
|
97
|
+
{ name: t('REVIEW_DATE', 'Review date'), type: 'hidden', path: 'business_view.components.reviews.components.review_date.hidden' }
|
|
98
|
+
]
|
|
99
|
+
|
|
100
|
+
const cartHeaderList = [
|
|
101
|
+
{ name: t('BUSINESS_LOGO', 'Business logo'), type: 'hidden', path: 'header.components.cart.components.business.components.logo.hidden' },
|
|
102
|
+
{ name: t('PRODUCT_IMAGE', 'Product image'), type: 'hidden', path: 'header.components.cart.components.products.components.image.hidden' },
|
|
103
|
+
{ name: t('DISCOUNT_COUPON', 'Discount coupon'), type: 'hidden', path: 'header.components.cart.components.discount_coupon.hidden' },
|
|
104
|
+
{ name: t('COMMENTS', 'Comments'), type: 'hidden', path: 'header.components.cart.components.comments.hidden' }
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
const checkoutList = [
|
|
108
|
+
{ name: t('BUSINESS_ADDRESS', 'Business address'), type: 'hidden', path: 'checkout.components.business.components.address.hidden' },
|
|
109
|
+
{ name: t('MAP', 'Map'), type: 'hidden', path: 'checkout.components.map.hidden' }
|
|
110
|
+
]
|
|
111
|
+
|
|
112
|
+
const orderBlockList = [
|
|
113
|
+
{ name: t('DATE', 'Date'), type: 'hidden', path: 'confirmation.components.order.components.date.hidden' },
|
|
114
|
+
{ name: t('PROGRESS_BAR', 'Progress bar'), type: 'hidden', path: 'confirmation.components.order.components.progress.hidden' }
|
|
115
|
+
]
|
|
116
|
+
|
|
117
|
+
const popupAddressList = [
|
|
118
|
+
{ name: t('MAP', 'Map'), type: 'hidden', path: 'address.components.map.hidden' },
|
|
119
|
+
{ name: t('INTERNAL_NUMBER', 'Internal number'), type: 'hidden', path: 'address.components.internal_number.hidden' },
|
|
120
|
+
{ name: t('ADDRESS_NOTES', 'Address notes'), type: 'hidden', path: 'address.components.address_notes.hidden' },
|
|
121
|
+
{ name: t('ICONS', 'Icons'), type: 'hidden', path: 'address.components.icons.hidden' }
|
|
122
|
+
]
|
|
123
|
+
|
|
124
|
+
const myAccountList = [
|
|
125
|
+
{ name: t('USER_IMAGE', 'User image'), type: 'hidden', path: 'profile.components.picture.hidden' },
|
|
126
|
+
{ name: t('BIRTHDAY', 'Birthday'), type: 'hidden', path: 'profile.components.birthday.hidden' },
|
|
127
|
+
{ name: t('LANGUAGES', 'Languages'), type: 'hidden', path: 'profile.components.languages.hidden' },
|
|
128
|
+
{ name: t('ADDRESS_LIST', 'Address list'), type: 'hidden', path: 'profile.components.address_list.hidden' }
|
|
129
|
+
]
|
|
130
|
+
|
|
131
|
+
const activeOrderBlockList = [
|
|
132
|
+
{ name: t('MAP', 'Map'), type: 'hidden', path: 'orders.components.map.hidden' },
|
|
133
|
+
{ name: t('BUSINESS_LOGO', 'Business logo'), type: 'hidden', path: 'orders.components.business_logo.hidden' },
|
|
134
|
+
{ name: t('BUSINESS_NAME', 'Business name'), type: 'hidden', path: 'orders.components.business_name.hidden' },
|
|
135
|
+
{ name: t('ORDER_NUMBER', 'Order number'), type: 'hidden', path: 'orders.components.order_number.hidden' },
|
|
136
|
+
{ name: t('ORDER_DATE', 'Order date'), type: 'hidden', path: 'orders.components.date.hidden' },
|
|
137
|
+
{ name: t('REVIEW_ORDER_BUTTON', 'Review order button'), type: 'hidden', path: 'orders.components.review_order_button.hidden' },
|
|
138
|
+
{ name: t('REORDER_BUTTON', 'Reorder button'), type: 'hidden', path: 'orders.components.reorder_button.hidden' },
|
|
139
|
+
{ name: t('FAVORITE_BUTTON', 'Favorite button'), type: 'hidden', path: 'orders.components.favorite.hidden' },
|
|
140
|
+
{ name: t('ORDER_STATUS', 'Order status'), type: 'hidden', path: 'orders.components.order_status.hidden' },
|
|
141
|
+
{ name: t('PREVIOUS_ORDER_BLOCK', 'Previous order block'), type: 'hidden', path: 'orders.components.past_orders.hidden' },
|
|
142
|
+
{ name: t('BUSINESS_TAB', 'Business tab'), type: 'hidden', path: 'orders.components.business_tab.hidden' },
|
|
143
|
+
{ name: t('PRODUCTS_TAB', 'Products tab'), type: 'hidden', path: 'orders.components.products_tab.hidden' }
|
|
144
|
+
]
|
|
145
|
+
|
|
146
|
+
const menuOptionList = [
|
|
147
|
+
{ name: t('BROWSE_AND_SEARCH', 'Browse and search'), type: 'hidden', path: 'bar_menu.components.browse.hidden' },
|
|
148
|
+
{ name: t('WALLET', 'Wallet'), type: 'hidden', path: 'bar_menu.components.wallet.hidden' },
|
|
149
|
+
{ name: t('PROMOTIONS', 'Promotions'), type: 'hidden', path: 'bar_menu.components.promotions.hidden' },
|
|
150
|
+
{ name: t('MESSAGES', 'Messages'), type: 'hidden', path: 'bar_menu.components.messages.hidden' },
|
|
151
|
+
{ name: t('HELP', 'Help'), type: 'hidden', path: 'bar_menu.components.help.hidden' },
|
|
152
|
+
{ name: t('SECURITY', 'Security'), type: 'hidden', path: 'bar_menu.components.sessions.hidden' },
|
|
153
|
+
{ name: t('MY_FAVORITES', 'My favorites'), type: 'hidden', path: 'bar_menu.components.favorites.hidden' }
|
|
154
|
+
]
|
|
155
|
+
|
|
156
|
+
const thirdPartyCodeList = [
|
|
157
|
+
{ name: t('HEAD', 'Head'), type: 'input', path: 'third_party_code.head' },
|
|
158
|
+
{ name: t('BODY', 'Body'), type: 'input', path: 'third_party_code.body' }
|
|
159
|
+
]
|
|
160
|
+
|
|
161
|
+
const closeAlert = () => {
|
|
162
|
+
setAlertState({
|
|
163
|
+
open: false,
|
|
164
|
+
content: []
|
|
165
|
+
})
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const updateObject = (object, newValue, path) => {
|
|
169
|
+
const stack = path.split('.')
|
|
170
|
+
while (stack.length > 1) {
|
|
171
|
+
object = object[stack.shift()]
|
|
172
|
+
}
|
|
173
|
+
object[stack.shift()] = newValue
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const handleUpdateThemeValue = (value, path) => {
|
|
177
|
+
const _advancedValues = JSON.parse(JSON.stringify(advancedValues))
|
|
178
|
+
updateObject(_advancedValues, value, path)
|
|
179
|
+
setAdvancedValues(_advancedValues)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
useEffect(() => {
|
|
183
|
+
if (!themesList?.loading && themesList?.themes?.[0]?.structure) {
|
|
184
|
+
setThemeStructure(JSON.parse(JSON.stringify(themesList?.themes?.[0]?.structure)))
|
|
185
|
+
}
|
|
186
|
+
}, [themesList])
|
|
187
|
+
|
|
188
|
+
const shadowValues = useMemo(() => {
|
|
189
|
+
const buttonShadow = advancedValues?.general?.components?.buttons?.shadow?.components
|
|
190
|
+
if (!buttonShadow?.x || !buttonShadow?.y || !buttonShadow?.blur || !buttonShadow?.spread) return ''
|
|
191
|
+
return `${buttonShadow?.x}px ${buttonShadow?.y}px ${buttonShadow?.blur}px ${buttonShadow?.spread}px ${buttonShadow?.color}`
|
|
192
|
+
}, [advancedValues?.general?.components?.buttons?.shadow?.components])
|
|
193
|
+
|
|
194
|
+
return (
|
|
195
|
+
<>
|
|
196
|
+
<Container>
|
|
197
|
+
<BoxLayout>
|
|
198
|
+
<h1>{t('WEBSITE_ADVANCED_SETTINGS', 'Website Advanced Settings')}</h1>
|
|
199
|
+
<HomePageWrapper>
|
|
200
|
+
<h2>{t('HOMEPAGE', 'Homepage')}</h2>
|
|
201
|
+
<SettingComponent
|
|
202
|
+
settingList={homepageViewList}
|
|
203
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
204
|
+
advancedValues={advancedValues}
|
|
205
|
+
/>
|
|
206
|
+
</HomePageWrapper>
|
|
207
|
+
</BoxLayout>
|
|
208
|
+
<BoxLayout>
|
|
209
|
+
<h2>{t('BUTTONS', 'Buttons')}</h2>
|
|
210
|
+
<FormControl>
|
|
211
|
+
<label>Border Radius</label>
|
|
212
|
+
<Input
|
|
213
|
+
value={advancedValues?.general?.components?.buttons?.borderRadius}
|
|
214
|
+
onChange={(e) => handleUpdateThemeValue(e.target.value, 'general.components.buttons.borderRadius')}
|
|
215
|
+
onKeyPress={(e) => {
|
|
216
|
+
if (!/^[0-9]$/.test(e.key)) {
|
|
217
|
+
e.preventDefault()
|
|
218
|
+
}
|
|
219
|
+
}}
|
|
220
|
+
/>
|
|
221
|
+
</FormControl>
|
|
222
|
+
<h3>{t('SHAPE', 'Shape')}</h3>
|
|
223
|
+
<ShadowWrapper>
|
|
224
|
+
<DropShadowWrapper>
|
|
225
|
+
<ShadowInfoWrapper>
|
|
226
|
+
<DropShadow
|
|
227
|
+
style={{
|
|
228
|
+
boxShadow: shadowValues
|
|
229
|
+
}}
|
|
230
|
+
/>
|
|
231
|
+
<span>{t('DROP_SHADOW', 'Drop shadow')}</span>
|
|
232
|
+
</ShadowInfoWrapper>
|
|
233
|
+
<ShadowInputGroup>
|
|
234
|
+
<ShadowInputControl>
|
|
235
|
+
<span>X</span>
|
|
236
|
+
<input
|
|
237
|
+
value={advancedValues?.general?.components?.buttons?.shadow?.components?.x}
|
|
238
|
+
onKeyPress={(e) => {
|
|
239
|
+
if (!/^[0-9]$/.test(e.key)) {
|
|
240
|
+
e.preventDefault()
|
|
241
|
+
}
|
|
242
|
+
}}
|
|
243
|
+
onChange={(e) => handleUpdateThemeValue(e.target.value, 'general.components.buttons.shadow.components.x')}
|
|
244
|
+
/>
|
|
245
|
+
</ShadowInputControl>
|
|
246
|
+
<ShadowInputControl>
|
|
247
|
+
<span>Y</span>
|
|
248
|
+
<input
|
|
249
|
+
value={advancedValues?.general?.components?.buttons?.shadow?.components?.y}
|
|
250
|
+
onChange={(e) => handleUpdateThemeValue(e.target.value, 'general.components.buttons.shadow.components.y')}
|
|
251
|
+
onKeyPress={(e) => {
|
|
252
|
+
if (!/^[0-9]$/.test(e.key)) {
|
|
253
|
+
e.preventDefault()
|
|
254
|
+
}
|
|
255
|
+
}}
|
|
256
|
+
/>
|
|
257
|
+
</ShadowInputControl>
|
|
258
|
+
<ShadowInputControl>
|
|
259
|
+
<span>B</span>
|
|
260
|
+
<input
|
|
261
|
+
value={advancedValues?.general?.components?.buttons?.shadow?.components?.blur}
|
|
262
|
+
onChange={(e) => handleUpdateThemeValue(e.target.value, 'general.components.buttons.shadow.components.blur')}
|
|
263
|
+
onKeyPress={(e) => {
|
|
264
|
+
if (!/^[0-9]$/.test(e.key)) {
|
|
265
|
+
e.preventDefault()
|
|
266
|
+
}
|
|
267
|
+
}}
|
|
268
|
+
/>
|
|
269
|
+
</ShadowInputControl>
|
|
270
|
+
<ShadowInputControl>
|
|
271
|
+
<span>S</span>
|
|
272
|
+
<input
|
|
273
|
+
value={advancedValues?.general?.components?.buttons?.shadow?.components?.spread}
|
|
274
|
+
onChange={(e) => handleUpdateThemeValue(e.target.value, 'general.components.buttons.shadow.components.spread')}
|
|
275
|
+
onKeyPress={(e) => {
|
|
276
|
+
if (!/^[0-9]$/.test(e.key)) {
|
|
277
|
+
e.preventDefault()
|
|
278
|
+
}
|
|
279
|
+
}}
|
|
280
|
+
/>
|
|
281
|
+
</ShadowInputControl>
|
|
282
|
+
<ShadowInputControl>
|
|
283
|
+
<span>C</span>
|
|
284
|
+
<input
|
|
285
|
+
value={advancedValues?.general?.components?.buttons?.shadow?.components?.color}
|
|
286
|
+
onChange={(e) => handleUpdateThemeValue(e.target.value, 'general.components.buttons.shadow.components.color')}
|
|
287
|
+
/>
|
|
288
|
+
</ShadowInputControl>
|
|
289
|
+
</ShadowInputGroup>
|
|
290
|
+
</DropShadowWrapper>
|
|
291
|
+
</ShadowWrapper>
|
|
292
|
+
</BoxLayout>
|
|
293
|
+
<BoxLayout>
|
|
294
|
+
<h2>{t('TIPOGRAPHY', 'Tipography')}</h2>
|
|
295
|
+
<HeadingWrapper>
|
|
296
|
+
<FontStyleGroup
|
|
297
|
+
fonts={advancedValues?.general?.components?.fonts?.primary}
|
|
298
|
+
path='general.components.fonts.primary'
|
|
299
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
300
|
+
/>
|
|
301
|
+
</HeadingWrapper>
|
|
302
|
+
</BoxLayout>
|
|
303
|
+
<BoxLayout>
|
|
304
|
+
<h2>{t('IMAGES', 'Images')}</h2>
|
|
305
|
+
<ImageBox
|
|
306
|
+
title={t('BUSINESS_LOGO_DUMMY_IMAGE', 'Business Logo dummy image')}
|
|
307
|
+
ratio='512 x 512 px'
|
|
308
|
+
photo={advancedValues?.business_view?.components?.header?.components?.logo?.dummy_image}
|
|
309
|
+
path='business_view.components.header.components.logo.dummy_image'
|
|
310
|
+
handleChangePhoto={handleUpdateThemeValue}
|
|
311
|
+
/>
|
|
312
|
+
<ImageBox
|
|
313
|
+
title={t('BUSINESS_HEADER_DUMMY_IMAGE', 'Business header dummy image')}
|
|
314
|
+
ratio='1350 x 400 px'
|
|
315
|
+
isBig
|
|
316
|
+
photo={advancedValues?.business_view?.components?.header?.components?.dummy_image}
|
|
317
|
+
path='business_view.components.header.components.dummy_image'
|
|
318
|
+
handleChangePhoto={handleUpdateThemeValue}
|
|
319
|
+
/>
|
|
320
|
+
<HomeImageFullScreenWrapper
|
|
321
|
+
onClick={() => handleUpdateThemeValue(!advancedValues?.my_products?.components?.images?.components?.homepage_image_fullscreen, 'my_products.components.images.components.homepage_image_fullscreen')}
|
|
322
|
+
>
|
|
323
|
+
{advancedValues?.my_products?.components?.images?.components?.homepage_image_fullscreen ? <CheckedIcon className='active' /> : <UnCheckedIcon />}
|
|
324
|
+
<span>{t('HOMEPAGE_IMAGE_FULLSCREEN', 'Homepage image fullscreen')}</span>
|
|
325
|
+
</HomeImageFullScreenWrapper>
|
|
326
|
+
<ImageGroup>
|
|
327
|
+
<ImageBox
|
|
328
|
+
title={t('PRODUCT_DUMMY_IMAGE', 'Product dummy image')}
|
|
329
|
+
ratio='900 x 200 px'
|
|
330
|
+
photo={advancedValues?.business_view?.components?.products?.components?.photo?.components?.dummy_image}
|
|
331
|
+
path='business_view.components.products.components.photo.components.dummy_image'
|
|
332
|
+
handleChangePhoto={handleUpdateThemeValue}
|
|
333
|
+
/>
|
|
334
|
+
</ImageGroup>
|
|
335
|
+
</BoxLayout>
|
|
336
|
+
<BoxLayout>
|
|
337
|
+
<h2>{t('FAVICON', 'Favicon')}</h2>
|
|
338
|
+
<ImageBox
|
|
339
|
+
title={t('FAVICON', 'Favicon')}
|
|
340
|
+
ratio='512 x 512 px'
|
|
341
|
+
photo={advancedValues?.general?.components?.favicon}
|
|
342
|
+
path='general.components.favicon'
|
|
343
|
+
handleChangePhoto={handleUpdateThemeValue}
|
|
344
|
+
/>
|
|
345
|
+
</BoxLayout>
|
|
346
|
+
<BoxLayout>
|
|
347
|
+
<h2>{t('HEADER', 'Header')}</h2>
|
|
348
|
+
<SettingComponent
|
|
349
|
+
settingList={headerList}
|
|
350
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
351
|
+
advancedValues={advancedValues}
|
|
352
|
+
themeStructure={themeStructure}
|
|
353
|
+
/>
|
|
354
|
+
</BoxLayout>
|
|
355
|
+
<BoxLayout>
|
|
356
|
+
<h2>{t('BUSINESS_LISTING', 'Business listing')}</h2>
|
|
357
|
+
<HideCheckWrapper isBottom onClick={() => handleUpdateThemeValue(!advancedValues?.business_listing_view?.hidden, 'business_listing_view.hidden')}>
|
|
358
|
+
{advancedValues?.business_listing_view?.hidden ? <CheckedIcon className='active' /> : <UnCheckedIcon />}
|
|
359
|
+
<span>{t('HIDDEN', 'Hidden')}</span>
|
|
360
|
+
</HideCheckWrapper>
|
|
361
|
+
<SettingComponent
|
|
362
|
+
settingList={businessListing}
|
|
363
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
364
|
+
advancedValues={advancedValues}
|
|
365
|
+
themeStructure={themeStructure}
|
|
366
|
+
/>
|
|
367
|
+
</BoxLayout>
|
|
368
|
+
<BoxLayout>
|
|
369
|
+
<h2>{t('BUSINESS_BLOCK', 'Business block')}</h2>
|
|
370
|
+
<SettingComponent
|
|
371
|
+
settingList={businessBlockList}
|
|
372
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
373
|
+
advancedValues={advancedValues}
|
|
374
|
+
themeStructure={themeStructure}
|
|
375
|
+
/>
|
|
376
|
+
</BoxLayout>
|
|
377
|
+
<BoxLayout>
|
|
378
|
+
<h2>{t('BUSINESS_PAGE', 'Business page')}</h2>
|
|
379
|
+
<SettingComponent
|
|
380
|
+
settingList={businessPageList}
|
|
381
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
382
|
+
advancedValues={advancedValues}
|
|
383
|
+
themeStructure={themeStructure}
|
|
384
|
+
/>
|
|
385
|
+
</BoxLayout>
|
|
386
|
+
<BoxLayout>
|
|
387
|
+
<h2>{t('BUSINESS_INFORMATION', 'Business Information')}</h2>
|
|
388
|
+
<SettingComponent
|
|
389
|
+
settingList={businessInfoList}
|
|
390
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
391
|
+
advancedValues={advancedValues}
|
|
392
|
+
themeStructure={themeStructure}
|
|
393
|
+
/>
|
|
394
|
+
</BoxLayout>
|
|
395
|
+
<BoxLayout>
|
|
396
|
+
<h2>{t('PRODUCTS_BLOCK', 'Products block')}</h2>
|
|
397
|
+
<SettingComponent
|
|
398
|
+
settingList={productBlockList}
|
|
399
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
400
|
+
advancedValues={advancedValues}
|
|
401
|
+
themeStructure={themeStructure}
|
|
402
|
+
/>
|
|
403
|
+
</BoxLayout>
|
|
404
|
+
<BoxLayout>
|
|
405
|
+
<h2>{t('REVIEWS_POPUPS', 'Reviews popups')}</h2>
|
|
406
|
+
<SettingComponent
|
|
407
|
+
settingList={reviewsPopups}
|
|
408
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
409
|
+
advancedValues={advancedValues}
|
|
410
|
+
themeStructure={themeStructure}
|
|
411
|
+
/>
|
|
412
|
+
</BoxLayout>
|
|
413
|
+
<BoxLayout>
|
|
414
|
+
<h2>{t('CART_HEADER', 'Cart Header')}</h2>
|
|
415
|
+
<SettingComponent
|
|
416
|
+
settingList={cartHeaderList}
|
|
417
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
418
|
+
advancedValues={advancedValues}
|
|
419
|
+
themeStructure={themeStructure}
|
|
420
|
+
/>
|
|
421
|
+
</BoxLayout>
|
|
422
|
+
<BoxLayout>
|
|
423
|
+
<h2>{t('CHECKOUT', 'Checkout')}</h2>
|
|
424
|
+
<SettingComponent
|
|
425
|
+
settingList={checkoutList}
|
|
426
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
427
|
+
advancedValues={advancedValues}
|
|
428
|
+
themeStructure={themeStructure}
|
|
429
|
+
/>
|
|
430
|
+
<h3>{t('CONFIRMATION_PAGE', 'Confirmation page')}</h3>
|
|
431
|
+
<h3>{t('ORDER_BLOCK', 'Order block')}</h3>
|
|
432
|
+
<SettingComponent
|
|
433
|
+
settingList={orderBlockList}
|
|
434
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
435
|
+
advancedValues={advancedValues}
|
|
436
|
+
themeStructure={themeStructure}
|
|
437
|
+
/>
|
|
438
|
+
<h3>{t('POPUP_ADDRESS', 'Popup: Address')}</h3>
|
|
439
|
+
<SettingComponent
|
|
440
|
+
settingList={popupAddressList}
|
|
441
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
442
|
+
advancedValues={advancedValues}
|
|
443
|
+
themeStructure={themeStructure}
|
|
444
|
+
/>
|
|
445
|
+
<h3>{t('MY_ACCOUNT_PAGE', 'My account page')}</h3>
|
|
446
|
+
<SettingComponent
|
|
447
|
+
settingList={myAccountList}
|
|
448
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
449
|
+
advancedValues={advancedValues}
|
|
450
|
+
themeStructure={themeStructure}
|
|
451
|
+
/>
|
|
452
|
+
<h3>{t('MY_ORDERS', 'My orders')}</h3>
|
|
453
|
+
<h3>{t('ACTIVE_ORDERS_BLOCK', 'Active Orders Block')}</h3>
|
|
454
|
+
<SettingComponent
|
|
455
|
+
settingList={activeOrderBlockList}
|
|
456
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
457
|
+
advancedValues={advancedValues}
|
|
458
|
+
themeStructure={themeStructure}
|
|
459
|
+
/>
|
|
460
|
+
</BoxLayout>
|
|
461
|
+
<BoxLayout>
|
|
462
|
+
<h2>{t('MENU_OPTIONS', 'Menu options')}</h2>
|
|
463
|
+
<SettingComponent
|
|
464
|
+
settingList={menuOptionList}
|
|
465
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
466
|
+
advancedValues={advancedValues}
|
|
467
|
+
themeStructure={themeStructure}
|
|
468
|
+
/>
|
|
469
|
+
</BoxLayout>
|
|
470
|
+
<BoxLayout>
|
|
471
|
+
<h2>{t('POPUP_ORDER_TYPES', 'Popup: Order types ')}</h2>
|
|
472
|
+
<FormControl>
|
|
473
|
+
<label>{t('TITLE_MENU_OPTIONS', 'Title Menu options')}</label>
|
|
474
|
+
<Input
|
|
475
|
+
placeholder={t('TITLE_MENU_OPTIONS', 'Title Menu options')}
|
|
476
|
+
defaultValue={advancedValues?.order_types?.components?.title_menu}
|
|
477
|
+
onChange={(e) => handleUpdateThemeValue(e.target.value, 'order_types.components.title_menu')}
|
|
478
|
+
/>
|
|
479
|
+
</FormControl>
|
|
480
|
+
<h3>{t('DELIVERY', 'Delivery')}</h3>
|
|
481
|
+
<OrderType
|
|
482
|
+
typeValues={advancedValues?.order_types?.components?.delivery?.components}
|
|
483
|
+
path='order_types.components.delivery.components'
|
|
484
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
485
|
+
/>
|
|
486
|
+
<h3>{t('PICKUP', 'Pickup')}</h3>
|
|
487
|
+
<OrderType
|
|
488
|
+
typeValues={advancedValues?.order_types?.components?.pickup?.components}
|
|
489
|
+
path='order_types.components.pickup.components'
|
|
490
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
491
|
+
/>
|
|
492
|
+
<h3>{t('EAT_IN', 'Eat in')}</h3>
|
|
493
|
+
<OrderType
|
|
494
|
+
typeValues={advancedValues?.order_types?.components?.eat_in?.components}
|
|
495
|
+
path='order_types.components.eat_in.components'
|
|
496
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
497
|
+
/>
|
|
498
|
+
<h3>{t('CURBSIDE', 'Curbside')}</h3>
|
|
499
|
+
<OrderType
|
|
500
|
+
typeValues={advancedValues?.order_types?.components?.curbside?.components}
|
|
501
|
+
path='order_types.components.curbside.components'
|
|
502
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
503
|
+
/>
|
|
504
|
+
<h3>{t('DRIVE_THRU', 'Drive thru')}</h3>
|
|
505
|
+
<OrderType
|
|
506
|
+
typeValues={advancedValues?.order_types?.components?.drive_thru?.components}
|
|
507
|
+
path='order_types.components.drive_thru.components'
|
|
508
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
509
|
+
/>
|
|
510
|
+
</BoxLayout>
|
|
511
|
+
<BoxLayout>
|
|
512
|
+
<h2>{t('THIRD_PARTY_CODE', 'Third-party code')}</h2>
|
|
513
|
+
<SettingComponent
|
|
514
|
+
settingList={thirdPartyCodeList}
|
|
515
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
516
|
+
advancedValues={advancedValues}
|
|
517
|
+
themeStructure={themeStructure}
|
|
518
|
+
/>
|
|
519
|
+
</BoxLayout>
|
|
520
|
+
<ButtonWrapper>
|
|
521
|
+
<Button
|
|
522
|
+
color='primary'
|
|
523
|
+
borderRadius='8px'
|
|
524
|
+
onClick={() => handleUpdateSiteTheme(true)}
|
|
525
|
+
>
|
|
526
|
+
{t('SAVE', 'Save')}
|
|
527
|
+
</Button>
|
|
528
|
+
</ButtonWrapper>
|
|
529
|
+
</Container>
|
|
530
|
+
<Alert
|
|
531
|
+
title={t('ORDERING', 'Ordering')}
|
|
532
|
+
content={alertState.content}
|
|
533
|
+
acceptText={t('ACCEPT', 'Accept')}
|
|
534
|
+
open={alertState.open}
|
|
535
|
+
onClose={() => closeAlert()}
|
|
536
|
+
onAccept={() => closeAlert()}
|
|
537
|
+
closeOnBackdrop={false}
|
|
538
|
+
/>
|
|
539
|
+
</>
|
|
540
|
+
)
|
|
541
|
+
}
|