ordering-ui-external 10.2.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/{7.ordering-ui.8384f3801abcc340af2a.js → 7.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +1 -1
- package/_bundles/ordering-ui.d1a8d1fbf5b112d5d9a9.js +2 -0
- package/_modules/themes/five/src/components/BusinessController/index.js +3 -3
- package/_modules/themes/five/src/components/BusinessController/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +22 -3
- package/_modules/themes/five/src/components/Checkout/index.js +5 -2
- package/_modules/themes/five/src/components/OrderProgress/index.js +5 -1
- 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 +4 -4
- package/_modules/themes/five/src/components/PhoneAutocomplete/index.js +2 -1
- package/_modules/themes/five/src/components/SignUpForm/index.js +5 -5
- package/_modules/themes/five/src/components/UserDetails/index.js +1 -1
- package/_modules/themes/five/src/components/UserDetails/styles.js +1 -1
- package/package.json +2 -2
- package/src/themes/five/src/components/BusinessController/index.js +3 -3
- package/src/themes/five/src/components/BusinessController/styles.js +1 -1
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/OrdersSection/index.js +17 -0
- package/src/themes/five/src/components/Checkout/index.js +3 -2
- package/src/themes/five/src/components/OrderProgress/index.js +5 -1
- 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 +1 -1
- package/src/themes/five/src/components/PhoneAutocomplete/index.js +1 -0
- package/src/themes/five/src/components/SignUpForm/index.js +6 -6
- package/src/themes/five/src/components/UserDetails/index.js +1 -1
- package/src/themes/five/src/components/UserDetails/styles.js +3 -0
- package/_bundles/ordering-ui.8384f3801abcc340af2a.js +0 -2
- /package/_bundles/{0.ordering-ui.8384f3801abcc340af2a.js → 0.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +0 -0
- /package/_bundles/{1.ordering-ui.8384f3801abcc340af2a.js → 1.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +0 -0
- /package/_bundles/{2.ordering-ui.8384f3801abcc340af2a.js → 2.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +0 -0
- /package/_bundles/{4.ordering-ui.8384f3801abcc340af2a.js → 4.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +0 -0
- /package/_bundles/{5.ordering-ui.8384f3801abcc340af2a.js → 5.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +0 -0
- /package/_bundles/{6.ordering-ui.8384f3801abcc340af2a.js → 6.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +0 -0
- /package/_bundles/{7.ordering-ui.8384f3801abcc340af2a.js.LICENSE.txt → 7.ordering-ui.d1a8d1fbf5b112d5d9a9.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.8384f3801abcc340af2a.js → 8.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +0 -0
- /package/_bundles/{9.ordering-ui.8384f3801abcc340af2a.js → 9.ordering-ui.d1a8d1fbf5b112d5d9a9.js} +0 -0
- /package/_bundles/{ordering-ui.8384f3801abcc340af2a.js.LICENSE.txt → ordering-ui.d1a8d1fbf5b112d5d9a9.js.LICENSE.txt} +0 -0
|
@@ -109,7 +109,6 @@ const OrdersOptionUI = (props) => {
|
|
|
109
109
|
? orders && orders.length > 0 && !orders.map(order => businessesIds && businessesIds.includes(order.business_id)).every(i => !i)
|
|
110
110
|
: orders.length > 0
|
|
111
111
|
|
|
112
|
-
const [loadingOrders, setLoadingOrders] = useState(true)
|
|
113
112
|
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
114
113
|
const closeOrderModal = (e) => {
|
|
115
114
|
const outsideModal = !window.document.getElementById('app-modals') ||
|
|
@@ -142,18 +141,6 @@ const OrdersOptionUI = (props) => {
|
|
|
142
141
|
}
|
|
143
142
|
}
|
|
144
143
|
|
|
145
|
-
useEffect(() => {
|
|
146
|
-
let timeout
|
|
147
|
-
if (isCustomLayout) {
|
|
148
|
-
timeout = setTimeout(() => {
|
|
149
|
-
setLoadingOrders(false)
|
|
150
|
-
}, 2000)
|
|
151
|
-
}
|
|
152
|
-
return () => {
|
|
153
|
-
typeof timeout === 'number' && clearTimeout(timeout)
|
|
154
|
-
}
|
|
155
|
-
}, [])
|
|
156
|
-
|
|
157
144
|
useEffect(() => {
|
|
158
145
|
if (loading) return
|
|
159
146
|
|
|
@@ -203,7 +190,7 @@ const OrdersOptionUI = (props) => {
|
|
|
203
190
|
</React.Fragment>))}
|
|
204
191
|
{props.beforeComponents?.map((BeforeComponent, i) => (
|
|
205
192
|
<BeforeComponent key={i} {...props} />))}
|
|
206
|
-
{(isCustomLayout ? ((isShowTitles || !isBusinessesPage) && !
|
|
193
|
+
{(isCustomLayout ? ((isShowTitles || !isBusinessesPage) && !loading && !isBusinessesLoading) : ((isShowTitles || !isBusinessesPage) && !hideOrders)) && (
|
|
207
194
|
<>
|
|
208
195
|
{orders.length > 0 && (
|
|
209
196
|
<OptionTitle isBusinessesPage={isBusinessesPage}>
|
|
@@ -241,7 +228,7 @@ const OrdersOptionUI = (props) => {
|
|
|
241
228
|
/>
|
|
242
229
|
)}
|
|
243
230
|
|
|
244
|
-
{(isCustomLayout ? (
|
|
231
|
+
{(isCustomLayout ? (loading || businesses?.loading) : showSkeletons) && (
|
|
245
232
|
<>
|
|
246
233
|
{(businesses?.loading && isBusiness) ? (
|
|
247
234
|
<BusinessControllerSkeleton>
|
|
@@ -316,8 +303,7 @@ const OrdersOptionUI = (props) => {
|
|
|
316
303
|
)}
|
|
317
304
|
</>
|
|
318
305
|
)}
|
|
319
|
-
|
|
320
|
-
{(isCustomLayout ? !loadingOrders && !loading && !error && orders.length > 0 && !isBusinessesLoading && !hideOrders : !loading && !error && orders.length > 0 && !hideOrders) && (
|
|
306
|
+
{(isCustomLayout ? !loading && !error && orders.length > 0 && !isBusinessesLoading && !hideOrders : !loading && !error && orders.length > 0 && !hideOrders) && (
|
|
321
307
|
horizontal ? (
|
|
322
308
|
<HorizontalOrdersLayout
|
|
323
309
|
businessesIds={businessesIds}
|
|
@@ -2,9 +2,8 @@ import styled, { css } from 'styled-components'
|
|
|
2
2
|
|
|
3
3
|
export const OptionTitle = styled.div`
|
|
4
4
|
width: 100%;
|
|
5
|
-
margin: ${({ isBusinessesPage }) => isBusinessesPage ? '
|
|
6
|
-
padding: ${({ isBusinessesPage }) =>
|
|
7
|
-
|
|
5
|
+
margin: ${({ isBusinessesPage }) => isBusinessesPage ? '0' : '0 auto'};
|
|
6
|
+
padding: ${({ isBusinessesPage }) => isBusinessesPage ? '10px 20px 0' : '0 15px'};
|
|
8
7
|
h1{
|
|
9
8
|
text-transform: capitalize;
|
|
10
9
|
font-size: 18px;
|
|
@@ -12,7 +11,7 @@ export const OptionTitle = styled.div`
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
@media (min-width: 768px){
|
|
15
|
-
padding: 0;
|
|
14
|
+
padding: ${({ isBusinessesPage }) => isBusinessesPage ? '10px 20px 0' : '0'};
|
|
16
15
|
width: 100%;
|
|
17
16
|
}
|
|
18
17
|
`
|
|
@@ -132,7 +132,7 @@ const PageBannerUI = (props) => {
|
|
|
132
132
|
pageBannerState.banner?.items?.length > 0 && (
|
|
133
133
|
<BannerContainer>
|
|
134
134
|
<Swiper
|
|
135
|
-
navigation
|
|
135
|
+
navigation={pageBannerState.banner?.items?.length > 1}
|
|
136
136
|
spaceBetween={0}
|
|
137
137
|
shortSwipes={false}
|
|
138
138
|
loop={pageBannerState.banner?.items.length > 1}
|
|
@@ -420,13 +420,13 @@ const SignUpFormUI = (props) => {
|
|
|
420
420
|
placeholder={t(field.code.toUpperCase(), field.name)}
|
|
421
421
|
onChange={handleChangeInputEmail}
|
|
422
422
|
ref={formMethods.register({
|
|
423
|
-
required: isRequiredField(field.code)
|
|
423
|
+
required: !isCustomerMode && isRequiredField(field.code)
|
|
424
424
|
? t('VALIDATION_ERROR_EMAIL_REQUIRED', 'The field Email is required').replace('_attribute_', t('EMAIL', 'Email'))
|
|
425
425
|
: null,
|
|
426
426
|
pattern: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i
|
|
427
427
|
})}
|
|
428
428
|
onKeyDown={preventWhiteSpaceOnKeyDown}
|
|
429
|
-
required={!!field.required}
|
|
429
|
+
required={!!field.required && !isCustomerMode}
|
|
430
430
|
autoComplete='on'
|
|
431
431
|
isError={formMethods.errors?.email && !notValidationFields.includes(field.code)}
|
|
432
432
|
/>
|
|
@@ -551,7 +551,7 @@ const SignUpFormUI = (props) => {
|
|
|
551
551
|
)}
|
|
552
552
|
|
|
553
553
|
<CheckboxArea>
|
|
554
|
-
{(signUpTab === 'default') && (
|
|
554
|
+
{(signUpTab === 'default') && !isCustomerMode && (
|
|
555
555
|
<PromotionsWrapper>
|
|
556
556
|
<Checkbox
|
|
557
557
|
name='promotions'
|
|
@@ -566,7 +566,7 @@ const SignUpFormUI = (props) => {
|
|
|
566
566
|
</PromotionsWrapper>
|
|
567
567
|
)}
|
|
568
568
|
|
|
569
|
-
{configs?.terms_and_conditions?.value === 'true' && (
|
|
569
|
+
{configs?.terms_and_conditions?.value === 'true' && !isCustomerMode && (
|
|
570
570
|
<>
|
|
571
571
|
{formMethods.errors?.acceptTerms && (
|
|
572
572
|
<ValidationText>
|
|
@@ -672,14 +672,14 @@ const SignUpFormUI = (props) => {
|
|
|
672
672
|
)}
|
|
673
673
|
</BussinessAndDriverSignUp>
|
|
674
674
|
)}
|
|
675
|
-
{hasSocialLogin && hasSocialEnabled && (
|
|
675
|
+
{hasSocialLogin && hasSocialEnabled && !isCustomerMode && (
|
|
676
676
|
<LoginDivider>
|
|
677
677
|
<DividerLine />
|
|
678
678
|
<p>{t('OR', 'or')}</p>
|
|
679
679
|
<DividerLine />
|
|
680
680
|
</LoginDivider>
|
|
681
681
|
)}
|
|
682
|
-
{!externalPhoneNumber && (
|
|
682
|
+
{!externalPhoneNumber && !isCustomerMode && (
|
|
683
683
|
<>
|
|
684
684
|
{Object.keys(configs).length > 0 ? (
|
|
685
685
|
<SocialButtons isPopup={isPopup}>
|
|
@@ -127,7 +127,7 @@ const UserDetailsUI = (props) => {
|
|
|
127
127
|
}, [willVerifyOtpState])
|
|
128
128
|
|
|
129
129
|
useEffect(() => {
|
|
130
|
-
if (isCheckoutPlace && requiredFields?.length === 0) {
|
|
130
|
+
if (isCheckoutPlace && requiredFields?.length === 0 && !formState?.loading) {
|
|
131
131
|
setIsSuccess && setIsSuccess(true)
|
|
132
132
|
onClose && onClose()
|
|
133
133
|
}
|