ordering-ui-external 2.4.5 → 2.5.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.
Files changed (135) hide show
  1. package/_bundles/{0.ordering-ui.83ddb51fdc85c2b920b0.js → 0.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
  2. package/_bundles/{1.ordering-ui.83ddb51fdc85c2b920b0.js → 1.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
  3. package/_bundles/{2.ordering-ui.83ddb51fdc85c2b920b0.js → 2.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
  4. package/_bundles/{4.ordering-ui.83ddb51fdc85c2b920b0.js → 4.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
  5. package/_bundles/{5.ordering-ui.83ddb51fdc85c2b920b0.js → 5.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
  6. package/_bundles/{6.ordering-ui.83ddb51fdc85c2b920b0.js → 6.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
  7. package/_bundles/{7.ordering-ui.83ddb51fdc85c2b920b0.js → 7.ordering-ui.5657c6a53b3791887fd7.js} +2 -2
  8. package/_bundles/{8.ordering-ui.83ddb51fdc85c2b920b0.js → 8.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
  9. package/_bundles/{9.ordering-ui.83ddb51fdc85c2b920b0.js → 9.ordering-ui.5657c6a53b3791887fd7.js} +1 -1
  10. package/_bundles/ordering-ui.5657c6a53b3791887fd7.js +2 -0
  11. package/_modules/components/OrdersOption/styles.js +1 -1
  12. package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +15 -8
  13. package/_modules/components/VerticalOrdersLayout/styles.js +2 -2
  14. package/_modules/contexts/ThemeContext/index.js +1 -0
  15. package/_modules/themes/five/src/components/AddressList/index.js +8 -7
  16. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +28 -22
  17. package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +22 -21
  18. package/_modules/themes/five/src/components/BusinessController/index.js +5 -3
  19. package/_modules/themes/five/src/components/BusinessInformation/index.js +16 -10
  20. package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +5 -8
  21. package/_modules/themes/five/src/components/BusinessListingSearch/index.js +93 -74
  22. package/_modules/themes/five/src/components/BusinessListingSearch/styles.js +10 -4
  23. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +7 -2
  24. package/_modules/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
  25. package/_modules/themes/five/src/components/BusinessProductsList/index.js +1 -1
  26. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +38 -13
  27. package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +20 -9
  28. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +35 -23
  29. package/_modules/themes/five/src/components/Cart/index.js +7 -3
  30. package/_modules/themes/five/src/components/Checkout/index.js +12 -11
  31. package/_modules/themes/five/src/components/Checkout/styles.js +8 -4
  32. package/_modules/themes/five/src/components/GiftCard/GiftCardUI/index.js +1 -0
  33. package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +4 -3
  34. package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +14 -8
  35. package/_modules/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +1 -1
  36. package/_modules/themes/five/src/components/Header/index.js +29 -21
  37. package/_modules/themes/five/src/components/Header/styles.js +44 -40
  38. package/_modules/themes/five/src/components/MultiCheckout/index.js +18 -16
  39. package/_modules/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +6 -4
  40. package/_modules/themes/five/src/components/MyOrders/index.js +16 -10
  41. package/_modules/themes/five/src/components/MyOrders/styles.js +15 -12
  42. package/_modules/themes/five/src/components/OrderDetails/OrderEta.js +5 -2
  43. package/_modules/themes/five/src/components/OrderDetails/OrderHistory.js +2 -2
  44. package/_modules/themes/five/src/components/OrderDetails/index.js +2 -2
  45. package/_modules/themes/five/src/components/OrderItAgain/styles.js +1 -1
  46. package/_modules/themes/five/src/components/OrderProgress/index.js +15 -4
  47. package/_modules/themes/five/src/components/OrderTypeSelectorContent/index.js +16 -4
  48. package/_modules/themes/five/src/components/PageBanner/styles.js +1 -1
  49. package/_modules/themes/five/src/components/ProductForm/index.js +27 -7
  50. package/_modules/themes/five/src/components/ProductForm/styles.js +40 -31
  51. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +6 -6
  52. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +3 -3
  53. package/_modules/themes/five/src/components/ReviewProduct/index.js +9 -4
  54. package/_modules/themes/five/src/components/ServiceForm/index.js +22 -3
  55. package/_modules/themes/five/src/components/ServiceForm/styles.js +9 -3
  56. package/_modules/themes/five/src/components/SidebarMenu/index.js +19 -10
  57. package/_modules/themes/five/src/components/SignUpForm/index.js +56 -29
  58. package/_modules/themes/five/src/components/SingleOrderCard/index.js +1 -1
  59. package/_modules/themes/five/src/components/SingleOrderCard/styles.js +26 -24
  60. package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +9 -5
  61. package/_modules/themes/five/src/components/SingleProductCard/layouts/original/styles.js +2 -2
  62. package/_modules/themes/five/src/components/UpsellingPage/index.js +2 -1
  63. package/_modules/themes/five/src/components/UserFormDetails/index.js +58 -18
  64. package/_modules/themes/five/src/components/UserFormDetails/styles.js +7 -3
  65. package/_modules/themes/five/src/components/UserPopover/index.js +41 -25
  66. package/_modules/themes/five/src/components/UserProfileForm/index.js +19 -11
  67. package/_modules/themes/five/src/styles/Buttons/index.js +68 -58
  68. package/_modules/themes/five/src/styles/Inputs/index.js +40 -16
  69. package/_modules/utils/index.js +8 -2
  70. package/index.html +1 -1
  71. package/package.json +3 -2
  72. package/src/components/OrdersOption/styles.js +1 -0
  73. package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +35 -17
  74. package/src/components/VerticalOrdersLayout/styles.js +9 -0
  75. package/src/contexts/ThemeContext/index.js +1 -0
  76. package/src/themes/five/src/components/AddressList/index.js +6 -6
  77. package/src/themes/five/src/components/BusinessBasicInformation/index.js +24 -22
  78. package/src/themes/five/src/components/BusinessBasicInformation/styles.js +24 -3
  79. package/src/themes/five/src/components/BusinessController/index.js +4 -2
  80. package/src/themes/five/src/components/BusinessInformation/index.js +24 -12
  81. package/src/themes/five/src/components/BusinessItemAccordion/index.js +5 -6
  82. package/src/themes/five/src/components/BusinessListingSearch/index.js +127 -101
  83. package/src/themes/five/src/components/BusinessListingSearch/styles.js +15 -0
  84. package/src/themes/five/src/components/BusinessProductsCategories/index.js +7 -2
  85. package/src/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
  86. package/src/themes/five/src/components/BusinessProductsList/index.js +1 -1
  87. package/src/themes/five/src/components/BusinessProductsListing/index.js +34 -9
  88. package/src/themes/five/src/components/BusinessProductsListing/styles.js +26 -0
  89. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +9 -2
  90. package/src/themes/five/src/components/Cart/index.js +3 -4
  91. package/src/themes/five/src/components/Checkout/index.js +18 -4
  92. package/src/themes/five/src/components/Checkout/styles.js +22 -0
  93. package/src/themes/five/src/components/GiftCard/GiftCardUI/index.js +1 -0
  94. package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +41 -31
  95. package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +15 -4
  96. package/src/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +2 -2
  97. package/src/themes/five/src/components/Header/index.js +17 -5
  98. package/src/themes/five/src/components/Header/styles.js +9 -6
  99. package/src/themes/five/src/components/MultiCheckout/index.js +9 -10
  100. package/src/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +8 -5
  101. package/src/themes/five/src/components/MyOrders/index.js +13 -9
  102. package/src/themes/five/src/components/MyOrders/styles.js +3 -1
  103. package/src/themes/five/src/components/OrderDetails/OrderEta.js +3 -2
  104. package/src/themes/five/src/components/OrderDetails/OrderHistory.js +8 -2
  105. package/src/themes/five/src/components/OrderDetails/index.js +2 -2
  106. package/src/themes/five/src/components/OrderItAgain/styles.js +1 -1
  107. package/src/themes/five/src/components/OrderProgress/index.js +16 -5
  108. package/src/themes/five/src/components/OrderTypeSelectorContent/index.js +7 -4
  109. package/src/themes/five/src/components/PageBanner/styles.js +1 -4
  110. package/src/themes/five/src/components/ProductForm/index.js +23 -5
  111. package/src/themes/five/src/components/ProductForm/styles.js +36 -1
  112. package/src/themes/five/src/components/ProductItemAccordion/index.js +37 -29
  113. package/src/themes/five/src/components/RenderProductsLayout/index.js +3 -3
  114. package/src/themes/five/src/components/ReviewProduct/index.js +14 -6
  115. package/src/themes/five/src/components/ServiceForm/index.js +22 -4
  116. package/src/themes/five/src/components/ServiceForm/styles.js +16 -0
  117. package/src/themes/five/src/components/SidebarMenu/index.js +162 -144
  118. package/src/themes/five/src/components/SignUpForm/index.js +4 -3
  119. package/src/themes/five/src/components/SingleOrderCard/index.js +1 -1
  120. package/src/themes/five/src/components/SingleOrderCard/styles.js +9 -1
  121. package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +13 -3
  122. package/src/themes/five/src/components/SingleProductCard/layouts/original/styles.js +2 -2
  123. package/src/themes/five/src/components/UpsellingPage/index.js +1 -1
  124. package/src/themes/five/src/components/UserFormDetails/index.js +58 -14
  125. package/src/themes/five/src/components/UserFormDetails/styles.js +16 -0
  126. package/src/themes/five/src/components/UserPopover/index.js +26 -15
  127. package/src/themes/five/src/components/UserProfileForm/index.js +18 -9
  128. package/src/themes/five/src/styles/Buttons/index.js +11 -0
  129. package/src/themes/five/src/styles/Inputs/index.js +34 -0
  130. package/src/utils/index.js +5 -0
  131. package/template/app.js +5 -3
  132. package/template/theme.json +335 -24
  133. package/_bundles/ordering-ui.83ddb51fdc85c2b920b0.js +0 -2
  134. /package/_bundles/{7.ordering-ui.83ddb51fdc85c2b920b0.js.LICENSE.txt → 7.ordering-ui.5657c6a53b3791887fd7.js.LICENSE.txt} +0 -0
  135. /package/_bundles/{ordering-ui.83ddb51fdc85c2b920b0.js.LICENSE.txt → ordering-ui.5657c6a53b3791887fd7.js.LICENSE.txt} +0 -0
@@ -53,6 +53,15 @@ export const SidebarMenu = (props) => {
53
53
 
54
54
  const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
55
55
  const isPromotionsEnabled = configs?.advanced_offers_module?.value === '1' || configs?.advanced_offers_module?.value === true
56
+ const hideBrowse = theme?.bar_menu?.components?.browse?.hidden
57
+ const hideOrders = theme?.bar_menu?.components?.orders?.hidden
58
+ const hideProfile = theme?.bar_menu?.components?.profile?.hidden
59
+ const hideWallet = theme?.bar_menu?.components?.wallet?.hidden
60
+ const hideMessages = theme?.bar_menu?.components?.messages?.hidden
61
+ const hideHelp = theme?.bar_menu?.components?.help?.hidden
62
+ const hideFavorites = theme?.bar_menu?.components?.favortes?.hidden
63
+ const hideSession = theme?.bar_menu?.components?.sessions?.hidden
64
+ const hidePromotions = theme?.bar_menu?.components?.promotions?.hidden
56
65
 
57
66
  const closeModal = () => {
58
67
  setModalIsOpen(false)
@@ -195,38 +204,39 @@ export const SidebarMenu = (props) => {
195
204
  </MenuLinkSeparator>
196
205
  </WrappContent>
197
206
  </MenuLink>
198
-
199
207
  {auth && (
200
208
  <>
201
- <MenuLink
202
- onClick={() => handleGoToPage({ page: 'business_search' })}
203
- >
204
- <WrappContent>
205
- <MenuLinkIcon
206
- active={
207
- window.location.pathname === '/business_search'
208
- }
209
- >
210
- <BsSearch />
211
- </MenuLinkIcon>
212
- <MenuLinkText>
213
- <TextInfo
209
+ {!hideBrowse && (
210
+ <MenuLink
211
+ onClick={() => handleGoToPage({ page: 'business_search' })}
212
+ >
213
+ <WrappContent>
214
+ <MenuLinkIcon
214
215
  active={
215
216
  window.location.pathname === '/business_search'
216
217
  }
217
218
  >
218
- {t('BROWSE_SEARCH', 'Browse & Search')}
219
- </TextInfo>
220
- </MenuLinkText>
221
- <MenuLinkSeparator>
222
- <div>
223
- <hr />
224
- </div>
225
- </MenuLinkSeparator>
226
- </WrappContent>
227
- </MenuLink>
219
+ <BsSearch />
220
+ </MenuLinkIcon>
221
+ <MenuLinkText>
222
+ <TextInfo
223
+ active={
224
+ window.location.pathname === '/business_search'
225
+ }
226
+ >
227
+ {t('BROWSE_SEARCH', 'Browse & Search')}
228
+ </TextInfo>
229
+ </MenuLinkText>
230
+ <MenuLinkSeparator>
231
+ <div>
232
+ <hr />
233
+ </div>
234
+ </MenuLinkSeparator>
235
+ </WrappContent>
236
+ </MenuLink>
237
+ )}
228
238
  {
229
- !isCustomerMode && (
239
+ !isCustomerMode && !hideOrders && (
230
240
  <MenuLink
231
241
  onClick={() => handleGoToPage({ page: 'orders' })}
232
242
  >
@@ -256,34 +266,36 @@ export const SidebarMenu = (props) => {
256
266
  </MenuLink>
257
267
  )
258
268
  }
259
- <MenuLink
260
- onClick={() => handleGoToPage({ page: 'profile' })}
261
- >
262
- <WrappContent>
263
- <MenuLinkIcon
264
- active={
265
- window.location.pathname === '/profile'
266
- }
267
- >
268
- <FaRegAddressCard />
269
- </MenuLinkIcon>
270
- <MenuLinkText>
271
- <TextInfo
269
+ {!hideProfile && (
270
+ <MenuLink
271
+ onClick={() => handleGoToPage({ page: 'profile' })}
272
+ >
273
+ <WrappContent>
274
+ <MenuLinkIcon
272
275
  active={
273
276
  window.location.pathname === '/profile'
274
277
  }
275
278
  >
276
- {t('VIEW_ACCOUNT', 'View account')}
277
- </TextInfo>
278
- </MenuLinkText>
279
- <MenuLinkSeparator>
280
- <div>
281
- <hr />
282
- </div>
283
- </MenuLinkSeparator>
284
- </WrappContent>
285
- </MenuLink>
286
- {isWalletEnabled && (
279
+ <FaRegAddressCard />
280
+ </MenuLinkIcon>
281
+ <MenuLinkText>
282
+ <TextInfo
283
+ active={
284
+ window.location.pathname === '/profile'
285
+ }
286
+ >
287
+ {t('VIEW_ACCOUNT', 'View account')}
288
+ </TextInfo>
289
+ </MenuLinkText>
290
+ <MenuLinkSeparator>
291
+ <div>
292
+ <hr />
293
+ </div>
294
+ </MenuLinkSeparator>
295
+ </WrappContent>
296
+ </MenuLink>
297
+ )}
298
+ {isWalletEnabled && !hideWallet && (
287
299
  <MenuLink
288
300
  onClick={() => handleGoToPage({ page: 'wallets' })}
289
301
  >
@@ -312,7 +324,7 @@ export const SidebarMenu = (props) => {
312
324
  </WrappContent>
313
325
  </MenuLink>
314
326
  )}
315
- {isPromotionsEnabled && (
327
+ {isPromotionsEnabled && !hidePromotions && (
316
328
  <MenuLink
317
329
  onClick={() => handleGoToPage({ page: 'promotions' })}
318
330
  >
@@ -341,116 +353,122 @@ export const SidebarMenu = (props) => {
341
353
  </WrappContent>
342
354
  </MenuLink>
343
355
  )}
344
-
345
- <MenuLink
346
- onClick={() => handleGoToPage({ page: 'messages' })}
347
- >
348
- <WrappContent>
349
- <MenuLinkIcon
350
- active={
351
- window.location.pathname === '/messages'
352
- }
353
- >
354
- <BiMessageDetail />
355
- </MenuLinkIcon>
356
- <MenuLinkText>
357
- <TextInfo
356
+ {!hideMessages && (
357
+ <MenuLink
358
+ onClick={() => handleGoToPage({ page: 'messages' })}
359
+ >
360
+ <WrappContent>
361
+ <MenuLinkIcon
358
362
  active={
359
363
  window.location.pathname === '/messages'
360
364
  }
361
365
  >
362
- {t('MESSAGES', 'Messages')}
363
- </TextInfo>
364
- </MenuLinkText>
365
- <MenuLinkSeparator>
366
- <div>
367
- <hr />
368
- </div>
369
- </MenuLinkSeparator>
370
- </WrappContent>
371
- </MenuLink>
372
-
373
- <MenuLink
374
- onClick={() => handleGoToPage({ page: 'help' })}
375
- >
376
- <WrappContent>
377
- <MenuLinkIcon
378
- active={
379
- window.location.pathname === '/help'
380
- }
381
- >
382
- <BiHelpCircle />
383
- </MenuLinkIcon>
384
- <MenuLinkText>
385
- <TextInfo
366
+ <BiMessageDetail />
367
+ </MenuLinkIcon>
368
+ <MenuLinkText>
369
+ <TextInfo
370
+ active={
371
+ window.location.pathname === '/messages'
372
+ }
373
+ >
374
+ {t('MESSAGES', 'Messages')}
375
+ </TextInfo>
376
+ </MenuLinkText>
377
+ <MenuLinkSeparator>
378
+ <div>
379
+ <hr />
380
+ </div>
381
+ </MenuLinkSeparator>
382
+ </WrappContent>
383
+ </MenuLink>
384
+ )}
385
+ {!hideHelp && (
386
+ <MenuLink
387
+ onClick={() => handleGoToPage({ page: 'help' })}
388
+ >
389
+ <WrappContent>
390
+ <MenuLinkIcon
386
391
  active={
387
392
  window.location.pathname === '/help'
388
393
  }
389
394
  >
390
- {t('HELP', 'help')}
391
- </TextInfo>
392
- </MenuLinkText>
393
- <MenuLinkSeparator>
394
- <div>
395
- <hr />
396
- </div>
397
- </MenuLinkSeparator>
398
- </WrappContent>
399
- </MenuLink>
400
- <MenuLink
401
- onClick={() => handleGoToPage({ page: 'sessions' })}
402
- >
403
- <WrappContent>
404
- <MenuLinkIcon
405
- active={
406
- window.location.pathname === '/sessions'
407
- }
408
- >
409
- <SiJsonwebtokens />
410
- </MenuLinkIcon>
411
- <MenuLinkText>
412
- <TextInfo
395
+ <BiHelpCircle />
396
+ </MenuLinkIcon>
397
+ <MenuLinkText>
398
+ <TextInfo
399
+ active={
400
+ window.location.pathname === '/help'
401
+ }
402
+ >
403
+ {t('HELP', 'help')}
404
+ </TextInfo>
405
+ </MenuLinkText>
406
+ <MenuLinkSeparator>
407
+ <div>
408
+ <hr />
409
+ </div>
410
+ </MenuLinkSeparator>
411
+ </WrappContent>
412
+ </MenuLink>
413
+ )}
414
+ {!hideSession && (
415
+ <MenuLink
416
+ onClick={() => handleGoToPage({ page: 'sessions' })}
417
+ >
418
+ <WrappContent>
419
+ <MenuLinkIcon
413
420
  active={
414
421
  window.location.pathname === '/sessions'
415
422
  }
416
423
  >
417
- {t('SESSIONS', 'Sessions')}
418
- </TextInfo>
419
- </MenuLinkText>
420
- <MenuLinkSeparator>
421
- <div>
422
- <hr />
423
- </div>
424
- </MenuLinkSeparator>
425
- </WrappContent>
426
- </MenuLink>
427
- <MenuLink
428
- onClick={() => handleGoToPage({ page: 'favorite' })}
429
- >
430
- <WrappContent>
431
- <MenuLinkIcon
432
- active={
433
- window.location.pathname === '/favorite'
434
- }
435
- >
436
- <Heart />
437
- </MenuLinkIcon>
438
- <MenuLinkText>
439
- <TextInfo
424
+ <SiJsonwebtokens />
425
+ </MenuLinkIcon>
426
+ <MenuLinkText>
427
+ <TextInfo
428
+ active={
429
+ window.location.pathname === '/sessions'
430
+ }
431
+ >
432
+ {t('SESSIONS', 'Sessions')}
433
+ </TextInfo>
434
+ </MenuLinkText>
435
+ <MenuLinkSeparator>
436
+ <div>
437
+ <hr />
438
+ </div>
439
+ </MenuLinkSeparator>
440
+ </WrappContent>
441
+ </MenuLink>
442
+ )}
443
+ {!hideFavorites && (
444
+ <MenuLink
445
+ onClick={() => handleGoToPage({ page: 'favorite' })}
446
+ >
447
+ <WrappContent>
448
+ <MenuLinkIcon
440
449
  active={
441
450
  window.location.pathname === '/favorite'
442
451
  }
443
452
  >
444
- {t('FAVORITES', 'Favorites')}
445
- </TextInfo>
446
- </MenuLinkText>
447
- <MenuLinkSeparator>
448
- <div>
449
- <hr />
450
- </div>
451
- </MenuLinkSeparator>
452
- </WrappContent>
453
- </MenuLink>
453
+ <Heart />
454
+ </MenuLinkIcon>
455
+ <MenuLinkText>
456
+ <TextInfo
457
+ active={
458
+ window.location.pathname === '/favorite'
459
+ }
460
+ >
461
+ {t('FAVORITES', 'Favorites')}
462
+ </TextInfo>
463
+ </MenuLinkText>
464
+ <MenuLinkSeparator>
465
+ <div>
466
+ <hr />
467
+ </div>
468
+ </MenuLinkSeparator>
469
+ </WrappContent>
470
+ </MenuLink>
471
+ )}
454
472
  <LogoutButton onCustomClick={() => actionSidebar(false)} />
455
473
  </>
456
474
  )}
@@ -96,7 +96,8 @@ const SignUpFormUI = (props) => {
96
96
  signUpTab,
97
97
  useSignUpFullDetails,
98
98
  useSignUpOtpEmail,
99
- useSignUpOtpCellphone
99
+ useSignUpOtpCellphone,
100
+ isGuest
100
101
  } = props
101
102
  const [, t] = useLanguage()
102
103
  const [, { showToast }] = useToast()
@@ -182,7 +183,7 @@ const SignUpFormUI = (props) => {
182
183
  formMethods.clearErrors()
183
184
  }
184
185
 
185
- const onSubmit = () => {
186
+ const onSubmit = async () => {
186
187
  const isPhoneNumberValid = userPhoneNumber ? isValidPhoneNumber : true
187
188
  if (!userPhoneNumber &&
188
189
  ((validationFields?.fields?.checkout?.cellphone?.enabled &&
@@ -653,7 +654,7 @@ const SignUpFormUI = (props) => {
653
654
  {elementLinkToLogin}
654
655
  </RedirectLink>
655
656
  )}
656
- {Object.keys(configs).length > 0 && (
657
+ {Object.keys(configs).length > 0 && !isGuest && (
657
658
  configs?.business_signup_allow?.value === '1' || configs?.driver_signup_allow?.value === '1'
658
659
  ) && !isCustomerMode &&
659
660
  (
@@ -266,7 +266,7 @@ const SingleOrderCardUI = (props) => {
266
266
  {t('REVIEW', 'Review')}
267
267
  </Button>
268
268
  )}
269
- {order.cart && !hideReorderButton && (
269
+ {order.cart && typeof order?.id === 'number' && !hideReorderButton && (
270
270
  <Button color='primary' className='reorder' outline onClick={() => handleClickReorder(order)}>
271
271
  {cartState?.loading ? t('LOADING', 'Loading...') : t('REORDER', 'Reorder')}
272
272
  </Button>
@@ -6,10 +6,17 @@ export const Container = styled.div`
6
6
  margin: 10px 0;
7
7
  position: relative;
8
8
  background: white;
9
- border-radius: 16px;
10
9
  display: inline-block;
11
10
  text-align: left;
12
11
  transition: all 0.3s ease;
12
+ padding: 10px;
13
+ border-radius: 8px;
14
+
15
+ ${props => props.theme.rtl ? css`
16
+ margin-left: 15px;
17
+ ` : css`
18
+ margin-right: 15px;
19
+ `}
13
20
 
14
21
  > span {
15
22
  display: flex;
@@ -56,6 +63,7 @@ export const Container = styled.div`
56
63
 
57
64
  @media (min-width: 768px) {
58
65
  margin: 10px;
66
+ border-radius: 16px;
59
67
  }
60
68
 
61
69
  @media(min-width: 993px){
@@ -43,7 +43,8 @@ const SingleProductCardUI = (props) => {
43
43
  productAddedToCartLength,
44
44
  handleFavoriteProduct,
45
45
  isFavorite,
46
- isPreviously
46
+ isPreviously,
47
+ viewString
47
48
  } = props
48
49
 
49
50
  const [, t] = useLanguage()
@@ -72,6 +73,11 @@ const SingleProductCardUI = (props) => {
72
73
  const maxCartProductConfig = (stateConfig.configs.max_product_amount ? parseInt(stateConfig.configs.max_product_amount) : 100) - totalBalance
73
74
 
74
75
  const hideAddButton = theme?.business_view?.components?.products?.components?.add_to_cart_button?.hidden ?? true
76
+ const hideProductDescription = theme?.business_view?.components?.products?.components?.product?.components?.description?.hidden
77
+ const hideProductLogo = viewString
78
+ ? theme?.[viewString]?.components?.cart?.components?.products?.image?.hidden
79
+ : theme?.business_view?.components?.products?.components?.product?.components?.image?.hidden
80
+
75
81
  // const productsRows = theme?.layouts?.business_view?.components?.products?.components?.layout?.rows
76
82
 
77
83
  let maxCartProductInventory = (product?.inventoried ? product?.quantity : undefined) - totalBalance
@@ -186,12 +192,16 @@ const SingleProductCardUI = (props) => {
186
192
  ) : (
187
193
  <Skeleton width={100} />
188
194
  )}
189
- {!isSkeleton ? (<p>{product?.description}</p>) : (<Skeleton width={100} />)}
195
+ {!hideProductDescription && (
196
+ <>
197
+ {!isSkeleton ? (<p>{product?.description}</p>) : (<Skeleton width={100} />)}
198
+ </>
199
+ )}
190
200
  {isPreviously && (!isSkeleton ? (<LastOrder>{t('LAST_ORDERED_ON', 'Last ordered on')} {parseDate(product?.last_ordered_date, { outputFormat: 'MMM DD, YYYY' })}</LastOrder>) : (<Skeleton width={80} />))}
191
201
  </CardInfo>
192
202
  {!isSkeleton ? (
193
203
  <WrapLogo
194
- isBgimage={optimizeImage(product?.images || theme?.images?.dummies?.product, 'h_86,c_limit')}
204
+ isBgimage={optimizeImage(!hideProductLogo ? product?.images || theme?.images?.dummies?.product : '', 'h_86,c_limit')}
195
205
  >
196
206
  {product?.ribbon?.enabled && (
197
207
  <RibbonBox
@@ -36,10 +36,10 @@ export const CardContainer = styled.div`
36
36
  }
37
37
  ${({ productsRows }) => productsRows ? css`
38
38
  width: ${() => productsRows === 3 ? 'calc(33% - 20px)' : 'calc(50% - 20px)'};
39
- margin: 10px;
39
+ margin: 10px 0;
40
40
  ` : css`
41
41
  width: 100%;
42
- margin: 10px;
42
+ margin: 10px 0;
43
43
  @media (min-width: 576px) {
44
44
  margin: 10px;
45
45
  width: calc(100% - 20px);
@@ -131,7 +131,7 @@ const UpsellingPageUI = (props) => {
131
131
  <HorizontalUpsellingContainer>
132
132
  {
133
133
  !upsellingProducts.loading ? (
134
- <AutoScroll scrollId='upSelling'>
134
+ <AutoScroll scrollId='upSelling' isColumnMode={upsellingProducts.products.length === 1}>
135
135
  {
136
136
  (!upsellingProducts.error && upsellingProducts.products.length > 0) ? upsellingProducts.products.map((product, i) => (
137
137
  <HorizontalItem key={product.id} name={product.name}>
@@ -4,6 +4,7 @@ import { useSession, useLanguage, useCustomer, useConfig, useOrderingTheme } fro
4
4
  import { useForm } from 'react-hook-form'
5
5
  import parsePhoneNumber from 'libphonenumber-js'
6
6
  import { useTheme } from 'styled-components'
7
+ import { SignUpForm } from '../SignUpForm'
7
8
 
8
9
  import {
9
10
  FormInput,
@@ -14,7 +15,8 @@ import {
14
15
  InputPhoneNumberWrapper,
15
16
  LanguageSelectorWrapper,
16
17
  SwitchWrapper,
17
- NotificationsGroupSwitchWrapper
18
+ NotificationsGroupSwitchWrapper,
19
+ TextLinkWrapper
18
20
  } from './styles'
19
21
 
20
22
  import { Switch } from '../../../../../styles/Switch'
@@ -26,6 +28,7 @@ import { LanguageSelector } from '../../../../../components/LanguageSelector'
26
28
  import { Alert } from '../Confirm'
27
29
  import { sortInputFields } from '../../../../../utils'
28
30
  import { Checkbox } from '../../../../../styles/Checkbox'
31
+ import Modal from '../Modal'
29
32
 
30
33
  export const UserFormDetailsUI = (props) => {
31
34
  const {
@@ -46,24 +49,26 @@ export const UserFormDetailsUI = (props) => {
46
49
  handleChangePromotions,
47
50
  isOldLayout,
48
51
  requiredFields,
49
- handleChangeNotifications
52
+ handleChangeNotifications,
53
+ handlePlaceOrderAsGuest
50
54
  } = props
51
55
 
52
56
  const formMethods = useForm()
53
57
  const [, t] = useLanguage()
54
58
  const [{ configs }] = useConfig()
55
59
  const theme = useTheme()
56
- const [{ user: userSession }] = useSession()
60
+ const [{ user: userSession }, { login }] = useSession()
57
61
  const [orderingTheme] = useOrderingTheme()
58
62
  const [isValidPhoneNumber, setIsValidPhoneNumber] = useState(null)
59
63
  const [userPhoneNumber, setUserPhoneNumber] = useState(null)
60
64
  const [alertState, setAlertState] = useState({ open: false, content: [] })
61
65
  const [, { setUserCustomer }] = useCustomer()
62
66
  const [isChanged, setIsChanged] = useState(false)
67
+ const [modalIsOpen, setModalIsOpen] = useState(false)
63
68
  const emailInput = useRef(null)
64
-
69
+
65
70
  const user = userData || userSession
66
-
71
+
67
72
  const [notificationList, setNotificationList] = useState({
68
73
  email: formState?.result?.result
69
74
  ? !!formState?.result?.result?.settings?.email?.newsletter
@@ -75,12 +80,12 @@ export const UserFormDetailsUI = (props) => {
75
80
  ? !!formState?.result?.result?.settings?.notification?.newsletter
76
81
  : !!(formState?.changes?.settings?.notification?.newsletter ?? (user && user?.settings?.notification?.newsletter))
77
82
  })
78
-
79
- const showCustomerCellphone = !orderingTheme?.theme?.profile?.components?.cellphone?.hidden
80
- const showCustomerPassword = !orderingTheme?.theme?.profile?.components?.password?.hidden
81
- const showCustomerPromotions = !orderingTheme?.theme?.profile?.components?.promotions?.hidden
82
- const showLangauges = !orderingTheme?.theme?.profile?.components?.languages?.hidden
83
- const showNotifications = !orderingTheme?.theme?.profile?.components?.notification_settings?.hidden
83
+
84
+ const showCustomerCellphone = !theme?.profile?.components?.cellphone?.hidden
85
+ const showCustomerPassword = !theme?.profile?.components?.password?.hidden
86
+ const showCustomerPromotions = !theme?.profile?.components?.promotions?.hidden
87
+ const showLangauges = !theme?.profile?.components?.languages?.hidden
88
+ const showNotifications = !theme?.profile?.components?.notification_settings?.hidden
84
89
 
85
90
  const closeAlert = () => {
86
91
  setAlertState({
@@ -90,6 +95,14 @@ export const UserFormDetailsUI = (props) => {
90
95
  cleanFormState && cleanFormState({ result: { error: false } })
91
96
  }
92
97
 
98
+ const handleSuccessSignup = (user) => {
99
+ login({
100
+ user,
101
+ token: user?.session?.access_token
102
+ })
103
+ handlePlaceOrderAsGuest && handlePlaceOrderAsGuest()
104
+ }
105
+
93
106
  const showInputPhoneNumber = validationFields?.fields?.checkout?.cellphone?.enabled ?? false
94
107
 
95
108
  const setUserCellPhone = (isEdit = false) => {
@@ -275,9 +288,9 @@ export const UserFormDetailsUI = (props) => {
275
288
  })
276
289
  }
277
290
 
278
- useEffect(()=> {
291
+ useEffect(() => {
279
292
  isEdit && handleChangeNotifications(notificationList)
280
- },[notificationList])
293
+ }, [notificationList])
281
294
 
282
295
  return (
283
296
  <>
@@ -453,7 +466,7 @@ export const UserFormDetailsUI = (props) => {
453
466
  {formState.loading ? t('UPDATING', 'Updating...') : t('UPDATE', 'Update')}
454
467
  </Button>
455
468
  )}
456
- {requiredFields && (
469
+ {requiredFields && !userSession?.guest_id && (
457
470
  <Button
458
471
  id='form-btn'
459
472
  color='primary'
@@ -464,6 +477,24 @@ export const UserFormDetailsUI = (props) => {
464
477
  </Button>
465
478
  )}
466
479
  </ActionsForm>
480
+ {requiredFields && isCheckout && userSession?.guest_id && (
481
+ <>
482
+ <Button
483
+ id='form-btn'
484
+ color='primary'
485
+ type='button'
486
+ onClick={() => setModalIsOpen(true)}
487
+ disabled={formState.loading}
488
+ >
489
+ {formState.loading ? t('UPDATING', 'Updating...') : t('SIGN_UP_AND_PLACE_ORDER', 'Sign up and place order')}
490
+ </Button>
491
+ <TextLinkWrapper>
492
+ <span onClick={() => handlePlaceOrderAsGuest()}>
493
+ {t('PLACE_ORDER_AS_GUEST', 'Place order as guest')}
494
+ </span>
495
+ </TextLinkWrapper>
496
+ </>
497
+ )}
467
498
  </>
468
499
  ) : (
469
500
  <SkeletonForm>
@@ -482,6 +513,19 @@ export const UserFormDetailsUI = (props) => {
482
513
  onAccept={() => closeAlert()}
483
514
  closeOnBackdrop={false}
484
515
  />
516
+ <Modal
517
+ open={modalIsOpen}
518
+ onClose={() => setModalIsOpen(false)}
519
+ width='760px'
520
+ >
521
+ <SignUpForm
522
+ useLoginByCellphone
523
+ useChekoutFileds
524
+ handleSuccessSignup={handleSuccessSignup}
525
+ isPopup
526
+ isGuest
527
+ />
528
+ </Modal>
485
529
  {props.afterComponents?.map((AfterComponent, i) => (
486
530
  <AfterComponent key={i} {...props} />))}
487
531
  {props.afterElements?.map((AfterElement, i) => (