ordering-ui-external 2.5.9 → 2.6.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 (40) hide show
  1. package/_bundles/{7.ordering-ui.c8be47315cef138f7d1e.js → 7.ordering-ui.bdbe517f1ccc205e7de9.js} +1 -1
  2. package/_bundles/ordering-ui.bdbe517f1ccc205e7de9.js +2 -0
  3. package/_modules/components/VerticalOrdersLayout/styles.js +2 -2
  4. package/_modules/themes/five/src/components/AddressForm/index.js +6 -6
  5. package/_modules/themes/five/src/components/AddressList/index.js +38 -15
  6. package/_modules/themes/five/src/components/BusinessListingSearch/styles.js +1 -1
  7. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +1 -1
  8. package/_modules/themes/five/src/components/CardForm/index.js +2 -1
  9. package/_modules/themes/five/src/components/Checkout/styles.js +1 -1
  10. package/_modules/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +28 -6
  11. package/_modules/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +7 -5
  12. package/_modules/themes/five/src/components/OrderContextUI/index.js +5 -3
  13. package/_modules/themes/five/src/components/OrderContextUI/styles.js +3 -2
  14. package/_modules/themes/five/src/components/OrderProgress/index.js +3 -1
  15. package/_modules/themes/five/src/components/SidebarMenu/index.js +4 -2
  16. package/package.json +2 -2
  17. package/src/components/VerticalOrdersLayout/styles.js +7 -3
  18. package/src/themes/five/src/components/AddressForm/index.js +12 -3
  19. package/src/themes/five/src/components/AddressList/index.js +5 -3
  20. package/src/themes/five/src/components/BusinessListingSearch/styles.js +3 -0
  21. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +1 -1
  22. package/src/themes/five/src/components/CardForm/index.js +2 -1
  23. package/src/themes/five/src/components/Checkout/styles.js +1 -1
  24. package/src/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +29 -9
  25. package/src/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +3 -1
  26. package/src/themes/five/src/components/OrderContextUI/index.js +12 -9
  27. package/src/themes/five/src/components/OrderContextUI/styles.js +1 -1
  28. package/src/themes/five/src/components/OrderProgress/index.js +1 -1
  29. package/src/themes/five/src/components/SidebarMenu/index.js +8 -2
  30. package/_bundles/ordering-ui.c8be47315cef138f7d1e.js +0 -2
  31. /package/_bundles/{0.ordering-ui.c8be47315cef138f7d1e.js → 0.ordering-ui.bdbe517f1ccc205e7de9.js} +0 -0
  32. /package/_bundles/{1.ordering-ui.c8be47315cef138f7d1e.js → 1.ordering-ui.bdbe517f1ccc205e7de9.js} +0 -0
  33. /package/_bundles/{2.ordering-ui.c8be47315cef138f7d1e.js → 2.ordering-ui.bdbe517f1ccc205e7de9.js} +0 -0
  34. /package/_bundles/{4.ordering-ui.c8be47315cef138f7d1e.js → 4.ordering-ui.bdbe517f1ccc205e7de9.js} +0 -0
  35. /package/_bundles/{5.ordering-ui.c8be47315cef138f7d1e.js → 5.ordering-ui.bdbe517f1ccc205e7de9.js} +0 -0
  36. /package/_bundles/{6.ordering-ui.c8be47315cef138f7d1e.js → 6.ordering-ui.bdbe517f1ccc205e7de9.js} +0 -0
  37. /package/_bundles/{7.ordering-ui.c8be47315cef138f7d1e.js.LICENSE.txt → 7.ordering-ui.bdbe517f1ccc205e7de9.js.LICENSE.txt} +0 -0
  38. /package/_bundles/{8.ordering-ui.c8be47315cef138f7d1e.js → 8.ordering-ui.bdbe517f1ccc205e7de9.js} +0 -0
  39. /package/_bundles/{9.ordering-ui.c8be47315cef138f7d1e.js → 9.ordering-ui.bdbe517f1ccc205e7de9.js} +0 -0
  40. /package/_bundles/{ordering-ui.c8be47315cef138f7d1e.js.LICENSE.txt → ordering-ui.bdbe517f1ccc205e7de9.js.LICENSE.txt} +0 -0
@@ -29,6 +29,7 @@ export const OrderContextUI = (props) => {
29
29
  const userCustomer = JSON.parse(window.localStorage.getItem('user-customer'))
30
30
 
31
31
  const configTypes = configState?.configs?.order_types_allowed?.value.split('|').map(value => Number(value)) || []
32
+ const isPreOrderSetting = configState?.configs?.preorder_status_enabled?.value === '1'
32
33
 
33
34
  const handleTogglePopover = (type) => {
34
35
  setOpenPopover({
@@ -67,7 +68,7 @@ export const OrderContextUI = (props) => {
67
68
 
68
69
  return (
69
70
  <>
70
- <Container isBusinessList={isBusinessList} hero={props.hideHero} >
71
+ <Container isBusinessList={isBusinessList} hero={props.hideHero} isCheckOut={isCheckOut}>
71
72
  <AddressMenu
72
73
  onClick={() => handleClickAddress()}
73
74
  isCheckOut={isCheckOut}
@@ -79,14 +80,16 @@ export const OrderContextUI = (props) => {
79
80
  <ItemInline>
80
81
  <OrderTypeSelectorHeader configTypes={configTypes} />
81
82
  </ItemInline>
82
- <ItemInline>
83
- <MomentPopover
84
- open={openPopover.moment}
85
- onClick={() => handleTogglePopover('moment')}
86
- onClose={() => handleClosePopover('moment')}
87
- isBanner
88
- />
89
- </ItemInline>
83
+ {isPreOrderSetting && (
84
+ <ItemInline>
85
+ <MomentPopover
86
+ open={openPopover.moment}
87
+ onClick={() => handleTogglePopover('moment')}
88
+ onClose={() => handleClosePopover('moment')}
89
+ isBanner
90
+ />
91
+ </ItemInline>
92
+ )}
90
93
  </FeatureItems>
91
94
  </Container>
92
95
  <Modal
@@ -6,7 +6,7 @@ export const Container = styled.div`
6
6
  padding: 0 15px;
7
7
  box-sizing: border-box;
8
8
  `}
9
- ${({ hero }) => hero && css`
9
+ ${({ hero, isCheckOut }) => !(hero || isCheckOut) && css`
10
10
  position: absolute;
11
11
  top: 10%;
12
12
  `}
@@ -47,7 +47,7 @@ const OrderProgressUI = (props) => {
47
47
 
48
48
  useEffect(() => {
49
49
  if (orderList?.orders.length > 0) {
50
- const sortedOrders = orderList.orders.sort((a, b) => a.id > b.id ? -1 : 1)
50
+ const sortedOrders = orderList.orders.filter(order => !!order?.business).sort((a, b) => a.id > b.id ? -1 : 1)
51
51
  const orderInProgress = sortedOrders.find(({ status }) => (statusToShow.includes(status)))
52
52
 
53
53
  let _lastOrder = null
@@ -475,7 +475,10 @@ export const SidebarMenu = (props) => {
475
475
  {!auth && (
476
476
  <>
477
477
  <MenuLink
478
- onClick={() => handleOpenLoginSignUp('login')}
478
+ onClick={() => {
479
+ handleOpenLoginSignUp('login')
480
+ actionSidebar(false)
481
+ }}
479
482
  >
480
483
  <WrappContent>
481
484
  <MenuLinkIcon
@@ -499,7 +502,10 @@ export const SidebarMenu = (props) => {
499
502
  </MenuLink>
500
503
  {!isHideSignup && (
501
504
  <MenuLink
502
- onClick={() => handleOpenLoginSignUp('signup')}
505
+ onClick={() => {
506
+ handleOpenLoginSignUp('signup')
507
+ actionSidebar(false)
508
+ }}
503
509
  >
504
510
  <WrappContent>
505
511
  <MenuLinkIcon