ordering-ui-external 1.7.1 → 1.8.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 (174) hide show
  1. package/_bundles/0.ordering-ui.a7de4e953ec3c5879d9b.js +1 -0
  2. package/_bundles/{1.ordering-ui.8b7044a2b34939a44465.js → 1.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
  3. package/_bundles/2.ordering-ui.a7de4e953ec3c5879d9b.js +1 -0
  4. package/_bundles/{4.ordering-ui.8b7044a2b34939a44465.js → 4.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
  5. package/_bundles/{5.ordering-ui.8b7044a2b34939a44465.js → 5.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
  6. package/_bundles/{6.ordering-ui.8b7044a2b34939a44465.js → 6.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
  7. package/_bundles/{7.ordering-ui.8b7044a2b34939a44465.js → 7.ordering-ui.a7de4e953ec3c5879d9b.js} +2 -2
  8. package/_bundles/{7.ordering-ui.8b7044a2b34939a44465.js.LICENSE.txt → 7.ordering-ui.a7de4e953ec3c5879d9b.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.8b7044a2b34939a44465.js → 8.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
  10. package/_bundles/{9.ordering-ui.8b7044a2b34939a44465.js → 9.ordering-ui.a7de4e953ec3c5879d9b.js} +1 -1
  11. package/_bundles/ordering-ui.a7de4e953ec3c5879d9b.js +2 -0
  12. package/_bundles/{ordering-ui.8b7044a2b34939a44465.js.LICENSE.txt → ordering-ui.a7de4e953ec3c5879d9b.js.LICENSE.txt} +0 -0
  13. package/_modules/components/BusinessInformation/index.js +4 -8
  14. package/_modules/components/OrdersOption/styles.js +4 -2
  15. package/_modules/components/Pagination/index.js +100 -0
  16. package/_modules/components/Pagination/styles.js +56 -0
  17. package/_modules/components/SmartAppBanner/index.js +2 -1
  18. package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +92 -0
  19. package/_modules/components/VerticalOrdersLayout/index.js +115 -41
  20. package/_modules/components/VerticalOrdersLayout/styles.js +25 -11
  21. package/_modules/index.js +7 -0
  22. package/_modules/themes/five/src/components/AccordionDropdown/index.js +15 -4
  23. package/_modules/themes/five/src/components/AccordionDropdown/styles.js +14 -4
  24. package/_modules/themes/five/src/components/AddressList/styles.js +2 -2
  25. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +17 -10
  26. package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +48 -42
  27. package/_modules/themes/five/src/components/BusinessListingSearch/index.js +5 -1
  28. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +0 -3
  29. package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +22 -13
  30. package/_modules/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +15 -7
  31. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +3 -0
  32. package/_modules/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
  33. package/_modules/themes/five/src/components/BusinessesListing/index.js +6 -13
  34. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +66 -40
  35. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +13 -7
  36. package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +16 -7
  37. package/_modules/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +21 -15
  38. package/_modules/themes/five/src/components/CardForm/index.js +17 -3
  39. package/_modules/themes/five/src/components/CardForm/styles.js +14 -6
  40. package/_modules/themes/five/src/components/CartPopover/index.js +6 -4
  41. package/_modules/themes/five/src/components/CartPopover/styles.js +4 -2
  42. package/_modules/themes/five/src/components/Footer/index.js +16 -6
  43. package/_modules/themes/five/src/components/Footer/styles.js +11 -9
  44. package/_modules/themes/five/src/components/Header/index.js +14 -9
  45. package/_modules/themes/five/src/components/Header/styles.js +64 -44
  46. package/_modules/themes/five/src/components/HeaderOption/index.js +9 -2
  47. package/_modules/themes/five/src/components/HeaderOption/styles.js +8 -2
  48. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +9 -3
  49. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +5 -3
  50. package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +9 -19
  51. package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +23 -19
  52. package/_modules/themes/five/src/components/InputPhoneNumber/index.js +1 -0
  53. package/_modules/themes/five/src/components/LoginForm/index.js +3 -2
  54. package/_modules/themes/five/src/components/MomentControl/index.js +4 -2
  55. package/_modules/themes/five/src/components/MyOrders/index.js +24 -56
  56. package/_modules/themes/five/src/components/MyOrders/styles.js +1 -1
  57. package/_modules/themes/five/src/components/OrderDetails/index.js +5 -2
  58. package/_modules/themes/five/src/components/OrderDetails/styles.js +24 -24
  59. package/_modules/themes/five/src/components/OrderItAgain/styles.js +6 -2
  60. package/_modules/themes/five/src/components/OrdersOption/index.js +18 -18
  61. package/_modules/themes/five/src/components/OrdersOption/styles.js +2 -2
  62. package/_modules/themes/five/src/components/PageBanner/index.js +50 -0
  63. package/_modules/themes/five/src/components/PageBanner/styles.js +18 -0
  64. package/_modules/themes/five/src/components/Pagination/index.js +99 -0
  65. package/_modules/themes/five/src/components/Pagination/styles.js +56 -0
  66. package/_modules/themes/five/src/components/ProductForm/index.js +39 -23
  67. package/_modules/themes/five/src/components/ProductForm/styles.js +74 -38
  68. package/_modules/themes/five/src/components/Promotions/index.js +7 -2
  69. package/_modules/themes/five/src/components/Promotions/styles.js +16 -14
  70. package/_modules/themes/five/src/components/RenderProductsLayout/index.js +31 -10
  71. package/_modules/themes/five/src/components/RenderProductsLayout/styles.js +19 -11
  72. package/_modules/themes/five/src/components/SidebarMenu/styles.js +1 -1
  73. package/_modules/themes/five/src/components/SignUpForm/index.js +3 -2
  74. package/_modules/themes/five/src/components/SingleOrderCard/index.js +7 -17
  75. package/_modules/themes/five/src/components/SingleProductCard/index.js +7 -298
  76. package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +310 -0
  77. package/_modules/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +36 -32
  78. package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +305 -0
  79. package/_modules/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +143 -0
  80. package/_modules/themes/five/src/components/StripeElementsForm/index.js +1 -0
  81. package/_modules/themes/five/src/components/UserPopover/index.js +3 -1
  82. package/_modules/themes/five/src/components/UserPopover/styles.js +4 -3
  83. package/_modules/themes/five/src/components/UserProfileForm/styles.js +5 -8
  84. package/_modules/themes/six/src/components/BusinessController/index.js +81 -15
  85. package/_modules/themes/six/src/components/BusinessController/styles.js +58 -30
  86. package/_modules/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +5 -3
  87. package/_modules/themes/six/src/components/BusinessesMap/styles.js +1 -1
  88. package/_modules/themes/six/src/components/SearchBar/index.js +19 -10
  89. package/_modules/themes/six/src/components/SearchBar/styles.js +44 -16
  90. package/index-template.js +3 -1
  91. package/package.json +2 -2
  92. package/src/components/BusinessInformation/index.js +3 -8
  93. package/src/components/OrdersOption/styles.js +5 -5
  94. package/src/components/Pagination/index.js +107 -0
  95. package/src/components/Pagination/styles.js +106 -0
  96. package/src/components/SmartAppBanner/index.js +1 -0
  97. package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +89 -0
  98. package/src/components/VerticalOrdersLayout/index.js +86 -48
  99. package/src/components/VerticalOrdersLayout/styles.js +66 -22
  100. package/src/index.js +2 -0
  101. package/src/themes/five/src/components/AccordionDropdown/index.js +19 -6
  102. package/src/themes/five/src/components/AccordionDropdown/styles.js +25 -1
  103. package/src/themes/five/src/components/AddressList/styles.js +2 -0
  104. package/src/themes/five/src/components/BusinessBasicInformation/index.js +21 -11
  105. package/src/themes/five/src/components/BusinessBasicInformation/styles.js +9 -3
  106. package/src/themes/five/src/components/BusinessListingSearch/index.js +1 -0
  107. package/src/themes/five/src/components/BusinessProductsCategories/index.js +0 -2
  108. package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/index.js +23 -12
  109. package/src/themes/five/src/components/BusinessProductsCategories/layouts/groceries/styles.js +12 -4
  110. package/src/themes/five/src/components/BusinessProductsListing/index.js +3 -0
  111. package/src/themes/five/src/components/BusinessTypeFilter/index.js +15 -5
  112. package/src/themes/five/src/components/BusinessesListing/index.js +5 -5
  113. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +54 -25
  114. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +40 -26
  115. package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/index.js +19 -6
  116. package/src/themes/five/src/components/BusinessesListing/layouts/StarbucksBusinessesListing/styles.js +38 -3
  117. package/src/themes/five/src/components/CardForm/index.js +49 -8
  118. package/src/themes/five/src/components/CardForm/styles.js +20 -2
  119. package/src/themes/five/src/components/CartPopover/index.js +2 -1
  120. package/src/themes/five/src/components/CartPopover/styles.js +3 -3
  121. package/src/themes/five/src/components/Footer/index.js +15 -6
  122. package/src/themes/five/src/components/Footer/styles.js +15 -14
  123. package/src/themes/five/src/components/Header/index.js +6 -4
  124. package/src/themes/five/src/components/Header/styles.js +14 -11
  125. package/src/themes/five/src/components/HeaderOption/index.js +13 -10
  126. package/src/themes/five/src/components/HeaderOption/styles.js +2 -2
  127. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +22 -10
  128. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/styles.js +8 -0
  129. package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +24 -36
  130. package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +12 -1
  131. package/src/themes/five/src/components/InputPhoneNumber/index.js +1 -0
  132. package/src/themes/five/src/components/LoginForm/index.js +2 -1
  133. package/src/themes/five/src/components/MomentControl/index.js +3 -2
  134. package/src/themes/five/src/components/MyOrders/index.js +20 -62
  135. package/src/themes/five/src/components/MyOrders/styles.js +1 -2
  136. package/src/themes/five/src/components/OrderDetails/index.js +9 -0
  137. package/src/themes/five/src/components/OrderDetails/styles.js +0 -55
  138. package/src/themes/five/src/components/OrderItAgain/styles.js +18 -0
  139. package/src/themes/five/src/components/OrdersOption/index.js +10 -16
  140. package/src/themes/five/src/components/OrdersOption/styles.js +1 -3
  141. package/src/themes/five/src/components/PageBanner/index.js +58 -0
  142. package/src/themes/five/src/components/PageBanner/styles.js +58 -0
  143. package/src/themes/five/src/components/Pagination/index.js +106 -0
  144. package/src/themes/five/src/components/Pagination/styles.js +106 -0
  145. package/src/themes/five/src/components/ProductForm/index.js +108 -84
  146. package/src/themes/five/src/components/ProductForm/styles.js +94 -12
  147. package/src/themes/five/src/components/Promotions/index.js +22 -16
  148. package/src/themes/five/src/components/Promotions/styles.js +10 -4
  149. package/src/themes/five/src/components/RenderProductsLayout/index.js +94 -66
  150. package/src/themes/five/src/components/RenderProductsLayout/styles.js +23 -22
  151. package/src/themes/five/src/components/SidebarMenu/styles.js +1 -1
  152. package/src/themes/five/src/components/SignUpForm/index.js +2 -1
  153. package/src/themes/five/src/components/SingleOrderCard/index.js +0 -21
  154. package/src/themes/five/src/components/SingleProductCard/index.js +7 -300
  155. package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +312 -0
  156. package/src/themes/five/src/components/SingleProductCard/{styles.js → layouts/original/styles.js} +9 -5
  157. package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/index.js +313 -0
  158. package/src/themes/five/src/components/SingleProductCard/layouts/starbucks/styles.js +353 -0
  159. package/src/themes/five/src/components/StripeElementsForm/index.js +1 -0
  160. package/src/themes/five/src/components/UserPopover/index.js +2 -0
  161. package/src/themes/five/src/components/UserPopover/styles.js +2 -2
  162. package/src/themes/five/src/components/UserProfileForm/styles.js +3 -11
  163. package/src/themes/six/src/components/BusinessController/index.js +163 -62
  164. package/src/themes/six/src/components/BusinessController/styles.js +53 -14
  165. package/src/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +3 -1
  166. package/src/themes/six/src/components/BusinessesMap/styles.js +1 -1
  167. package/src/themes/six/src/components/SearchBar/index.js +27 -8
  168. package/src/themes/six/src/components/SearchBar/styles.js +33 -2
  169. package/template/app.js +364 -364
  170. package/template/assets/images/chew_logo.png +0 -0
  171. package/template/components/HelmetTags/index.js +5 -4
  172. package/_bundles/0.ordering-ui.8b7044a2b34939a44465.js +0 -1
  173. package/_bundles/2.ordering-ui.8b7044a2b34939a44465.js +0 -1
  174. package/_bundles/ordering-ui.8b7044a2b34939a44465.js +0 -2
@@ -6,26 +6,23 @@ export const SingleCard = styled.div`
6
6
  display: flex;
7
7
  max-height: 100px;
8
8
  height: auto;
9
- border: none;
9
+ border-bottom: 1px solid #F5F6F6;
10
10
 
11
11
  ${props => (
12
12
  props.theme.colors.backgroundPage === '#FFF' ||
13
13
  props.theme.colors.backgroundPage === '#FFFFFF'
14
14
  ) && css`
15
- box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 24px;
16
- border-radius: 16px;
17
15
  margin-bottom: 15px;
18
16
  `}
19
17
 
20
18
  @media(min-width: 480px){
21
19
  height: 140px;
22
20
  ${props => (
23
- props.theme.colors.backgroundPage === '#FFF' ||
24
- props.theme.colors.backgroundPage === '#FFFFFF'
25
- ) && css`
21
+ props.theme.colors.backgroundPage === '#FFF' ||
22
+ props.theme.colors.backgroundPage === '#FFFFFF'
23
+ ) && css`
26
24
  border-top: none !important;
27
25
  `}
28
- border-top: 1px solid #ccc;
29
26
  }
30
27
  `
31
28
 
@@ -43,33 +40,61 @@ export const OrderPastContent = styled.div`
43
40
  `}
44
41
  `
45
42
 
43
+ export const FavoriteWrapper = styled.div`
44
+ cursor: pointer;
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+ svg {
49
+ color: ${props => props.theme.colors.danger500};
50
+ font-size: 16px;
51
+ }
52
+ `
53
+
46
54
  export const PastLogo = styled.div`
47
- width: 55px;
48
- height: 80%;
55
+ width: 75px;
56
+ height: 100%;
49
57
  img {
50
58
  width: 100%;
51
59
  height: 100%;
52
60
  border-radius: 17px;
53
61
  object-fit: contain;
54
62
  }
55
- @media (min-width: 480px){
56
- width: 75px;
57
- }
63
+ box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 10px;
58
64
  `
59
65
 
60
66
  export const WrapperBusinessTitle = styled.div`
61
- width: 95%
67
+ width: 95%;
68
+ display: flex;
69
+ gap: 10px;
62
70
  `
63
71
 
64
72
  export const Reorder = styled.div`
65
73
  display: flex;
66
74
  flex-direction: column;
67
- width: 25%;
75
+ width: 20%;
68
76
  text-align: center;
69
77
  align-items: center;
70
78
  justify-content: center;
71
79
  font-size: 0.8em;
72
- margin-right: 25px;
80
+
81
+ button {
82
+ border-radius: 8px;
83
+ font-size: 10px;
84
+ line-height: 15px;
85
+ padding: 10px;
86
+ overflow: inherit;
87
+ text-overflow: inherit;
88
+ border: 1px solid ${props => props.theme.colors.primaryContrast};
89
+ margin: 5px 0;
90
+
91
+ &.reorder {
92
+ background: ${props => props.theme.colors.primaryContrast};
93
+ &:hover {
94
+ background: ${props => props.theme.colors.primary};
95
+ }
96
+ }
97
+ }
73
98
 
74
99
  ${props => props.theme?.rtl && css`
75
100
  margin-left: 25px;
@@ -85,19 +110,15 @@ export const Reorder = styled.div`
85
110
  -webkit-line-clamp: 2; /* number of lines to show */
86
111
  -webkit-box-orient: vertical;
87
112
  }
88
- button {
89
- margin: 5px 0;
90
- width: 100%;
91
- font-size: 0.9em;
92
- white-space: nowrap;
93
- }
94
-
95
113
  @media (min-width: 480px){
96
114
  font-size: 1em;
97
115
  button{
98
116
  width: 90%;
99
117
  font-size: 0.9em;
100
118
  }
119
+ flex-direction: row;
120
+ gap: 10px;
121
+ margin-right: 25px;
101
122
  }
102
123
 
103
124
  @media (min-width: 768px){
@@ -118,6 +139,24 @@ export const Reorder = styled.div`
118
139
  }
119
140
  `
120
141
 
142
+ export const OrderInfo = styled.div`
143
+ display: flex;
144
+ flex-direction: column;
145
+ align-items: flex-start;
146
+
147
+ .dot {
148
+ display: none;
149
+ }
150
+
151
+ @media (min-width: 480px){
152
+ flex-direction: row;
153
+ align-items: center;
154
+ .dot {
155
+ display: block;
156
+ }
157
+ }
158
+ `
159
+
121
160
  export const WrappButton = styled.div`
122
161
  width: 80%;
123
162
  display: flex;
@@ -139,3 +178,8 @@ export const WrappButton = styled.div`
139
178
  }
140
179
  }
141
180
  `
181
+ export const ReviewWrapper = styled.div`
182
+ .review-sent {
183
+ border-radius: 7.6px;
184
+ }
185
+ `
package/src/index.js CHANGED
@@ -58,6 +58,7 @@ import { OrderSuccessModal } from './components/OrderSuccessModal'
58
58
  import { OrderTypeSelectorHeader } from './components/OrderTypeSelectorHeader'
59
59
  import { PageNotFound } from './components/PageNotFound'
60
60
  import { PagesList } from './components/PagesList'
61
+ import { Pagination } from './themes/five/src/components/Pagination'
61
62
  import { PaymentOptionCash } from './components/PaymentOptionCash'
62
63
  import { PaymentOptionPaypal } from './components/PaymentOptionPaypal'
63
64
  import { PaymentOptions } from './components/PaymentOptions'
@@ -197,6 +198,7 @@ export {
197
198
  OrderTypeSelectorHeader,
198
199
  PageNotFound,
199
200
  PagesList,
201
+ Pagination,
200
202
  PaymentOptionCash,
201
203
  PaymentOptions,
202
204
  PaymentOptionStripe,
@@ -1,7 +1,8 @@
1
1
  import React from 'react'
2
2
  import BiCaretUp from '@meronex/icons/bi/BiCaretUp'
3
-
4
- import { CategoryTab } from './styles'
3
+ import AiOutlineCheck from '@meronex/icons/ai/AiOutlineCheck'
4
+ import { CategoryTab, SelectCategory } from './styles'
5
+ import { useWindowSize } from '../../../../../hooks/useWindowSize'
5
6
 
6
7
  export const AccordionDropdown = (props) => {
7
8
  const {
@@ -13,21 +14,33 @@ export const AccordionDropdown = (props) => {
13
14
  IterateCategories
14
15
  } = props
15
16
 
17
+ const handleClick = (e, isSelectCategory) => {
18
+ e.stopPropagation()
19
+ handleClickItem(isSelectCategory)
20
+ }
21
+ const windowSize = useWindowSize()
16
22
  return (
17
23
  <div className='accordion-item'>
18
24
  <CategoryTab
19
25
  active={isSelected}
20
26
  className='accordion-title'
21
27
  categorySpace={spaceTab}
22
- onClick={() => handleClickItem()}
28
+ onClick={(e) => handleClick(e, false)}
23
29
  isOpen={isOpen}
24
30
  >
25
- <BiCaretUp
26
- className={`accordion__icon ${isOpen ? 'rotate' : ''}`}
27
- />
28
31
  <span>
29
32
  {item.name}
30
33
  </span>
34
+ <div>
35
+ {windowSize.width < 993 && (
36
+ <SelectCategory onClick={(e) => handleClick(e, true)}>
37
+ <AiOutlineCheck />
38
+ </SelectCategory>
39
+ )}
40
+ <BiCaretUp
41
+ className={`accordion__icon ${isOpen ? 'rotate' : ''}`}
42
+ />
43
+ </div>
31
44
  </CategoryTab>
32
45
  {isOpen && (
33
46
  <div className='accordion-content'>
@@ -19,10 +19,34 @@ export const CategoryTab = styled.div`
19
19
  }
20
20
 
21
21
  span {
22
- width: 90%;
22
+ width: 9
23
+ 0%;
24
+ }
25
+
26
+ > div {
27
+ display: flex;
28
+ align-items: center;
23
29
  }
24
30
 
25
31
  ${({ active }) => active && css`
26
32
  background-color: ${props => props.theme.colors.primaryContrast};
27
33
  `}
34
+
35
+ `
36
+
37
+ export const SelectCategory = styled.div`
38
+ width: 40px;
39
+ display: flex;
40
+ justify-content: center;
41
+ align-items: center;
42
+ border-radius: 30px;
43
+ border: 1px solid ${({ theme }) => theme?.colors?.primary};
44
+ margin-right: 10px;
45
+ height: 20px;
46
+ svg {
47
+ color: ${({ theme }) => theme?.colors?.primary}
48
+ }
49
+ &:hover{
50
+ opacity: 0.8;
51
+ }
28
52
  `
@@ -4,6 +4,7 @@ import { darken } from 'polished'
4
4
  export const AddressListContainer = styled.div`
5
5
  display: flex;
6
6
  flex-direction: column;
7
+ gap: 20px;
7
8
  padding: 0;
8
9
  @media (min-width: 768px) {
9
10
  padding: 0px 10px;
@@ -20,6 +21,7 @@ export const AddressListContainer = styled.div`
20
21
  height: 50px;
21
22
  ${({ isProfile }) => !isProfile && css`
22
23
  min-width: 100px;
24
+ padding: 7px 70px;
23
25
  `}
24
26
  }
25
27
  `
@@ -42,6 +42,7 @@ import { BusinessPreorder } from '../BusinessPreorder'
42
42
  import dayjs from 'dayjs'
43
43
  import timezone from 'dayjs/plugin/timezone'
44
44
  import isBetween from 'dayjs/plugin/isBetween'
45
+ import { useWindowSize } from '../../../../../hooks/useWindowSize'
45
46
 
46
47
  dayjs.extend(timezone)
47
48
  dayjs.extend(isBetween)
@@ -61,7 +62,8 @@ export const BusinessBasicInformation = (props) => {
61
62
  handleChangeSortBy,
62
63
  categoryState,
63
64
  errorQuantityProducts,
64
- isCustomerMode
65
+ isCustomerMode,
66
+ categoryClicked
65
67
  } = props
66
68
  const { business, loading } = businessState
67
69
 
@@ -69,6 +71,7 @@ export const BusinessBasicInformation = (props) => {
69
71
  const [orderState] = useOrder()
70
72
  const [, t] = useLanguage()
71
73
  const [{ parsePrice, parseDistance, optimizeImage }] = useUtils()
74
+ const windowSize = useWindowSize()
72
75
  const [orderingTheme] = useOrderingTheme()
73
76
  const [isBusinessReviews, setIsBusinessReviews] = useState(false)
74
77
  const [isPreOrder, setIsPreOrder] = useState(false)
@@ -86,8 +89,9 @@ export const BusinessBasicInformation = (props) => {
86
89
  const isInfoShrunken = orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.layout?.position === 'shrunken'
87
90
  const searchLayout = theme?.business_view?.components?.product_search?.components?.layout?.type
88
91
  const hideCity = orderingTheme?.theme?.business_view?.components?.header?.components?.business?.components?.city?.hidden
89
- const layoutsWithOldSearch = ['starbucks', 'old']
90
- const hideSearch = layoutsWithOldSearch.includes(orderingTheme?.theme?.business_view?.components?.product_search?.components?.layout?.type)
92
+ const isChew = orderingTheme?.theme?.header?.components?.layout?.type === 'Chew'
93
+ const layoutsWithOldSearch = ['starbucks', 'old', 'floating']
94
+ const hideSearch = layoutsWithOldSearch.includes(theme?.business_view?.components?.product_search?.components?.layout?.type)
91
95
  const getBusinessType = () => {
92
96
  if (Object.keys(business).length <= 0) return t('GENERAL', 'General')
93
97
  const _types = []
@@ -180,7 +184,7 @@ export const BusinessBasicInformation = (props) => {
180
184
 
181
185
  const BusinessInfoComponent = () => {
182
186
  return (
183
- <BusinessInfoContainer>
187
+ <BusinessInfoContainer isChew={isChew}>
184
188
  <BusinessInfoContent>
185
189
  <BusinessInfo className='info'>
186
190
  <BusinessInfoItem isInfoShrunken={isInfoShrunken}>
@@ -354,9 +358,15 @@ export const BusinessBasicInformation = (props) => {
354
358
  </BusinessInfoItem>
355
359
  </BusinessInfo>
356
360
  </BusinessInfoContent>
357
- {!hideSearch && (categoryState?.products?.length !== 0 || searchValue) && !errorQuantityProducts && !isInfoShrunken && !business?.professionals?.length && (
358
- <SearchComponent />
359
- )}
361
+ {!hideSearch &&
362
+ (categoryState?.products?.length !== 0 || searchValue) &&
363
+ !errorQuantityProducts &&
364
+ !isInfoShrunken &&
365
+ !business?.professionals?.length &&
366
+ (categoryClicked || windowSize.width >= 993) &&
367
+ (
368
+ <SearchComponent />
369
+ )}
360
370
  </BusinessInfoContainer>
361
371
  )
362
372
  }
@@ -384,13 +394,13 @@ export const BusinessBasicInformation = (props) => {
384
394
  />
385
395
  )}
386
396
  <BusinessInfoWrapper>
387
- {!isInfoShrunken && (
397
+ {(!isInfoShrunken && !isChew) && (
388
398
  <BusinessInfoComponent />
389
399
  )}
390
400
  {(business?.header || business?.logo || loading || isInfoShrunken) && (
391
- <BusinessContainer bgimage={business?.header} isSkeleton={isSkeleton} id='container' isClosed={!business?.open}>
401
+ <BusinessContainer bgimage={business?.header} isSkeleton={isSkeleton} id='container' isClosed={!business?.open} isChew={isChew}>
392
402
  {(!loading && !business?.open) && <h1>{t('CLOSED', 'Closed')}</h1>}
393
- {showLogo && business?.logo && (
403
+ {(showLogo && business?.logo && !isChew) && (
394
404
  <BusinessContent>
395
405
  <WrapperBusinessLogo>
396
406
  {!loading && (
@@ -399,7 +409,7 @@ export const BusinessBasicInformation = (props) => {
399
409
  </WrapperBusinessLogo>
400
410
  </BusinessContent>
401
411
  )}
402
- {isInfoShrunken && (
412
+ {(isInfoShrunken || isChew) && (
403
413
  <BusinessInfoComponent />
404
414
  )}
405
415
  {!loading && (
@@ -21,14 +21,18 @@ export const BusinessContainer = styled.div`
21
21
  background-color: #cccccc;
22
22
  `}
23
23
 
24
- ${props => props.bgimage && !props.isClosed && css`
24
+ ${props => props.bgimage && (!props.isClosed && !props.isChew) && css`
25
25
  background-image: url(${props.bgimage});
26
26
  `}
27
27
 
28
- ${props => props.bgimage && props.isClosed && css`
28
+ ${props => props.bgimage && (props.isClosed && !props.isChew) && css`
29
29
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(${props.bgimage});
30
30
  `}
31
31
 
32
+ ${props => props.bgimage && props.isChew && css`
33
+ background-image: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)), url(${props.bgimage});
34
+ `}
35
+
32
36
  h1 {
33
37
  color: #FFF;
34
38
  opacity: 0.5;
@@ -71,7 +75,7 @@ export const WrapperBusinessLogo = styled.div`
71
75
  max-height: 80px;
72
76
  width: 80px;
73
77
  height: 80px;
74
-
78
+
75
79
  @media (min-width: 576px) {
76
80
  max-width: 124px;
77
81
  max-height: 124px;
@@ -161,6 +165,7 @@ export const BusinessInfoItem = styled.div`
161
165
  `
162
166
 
163
167
  export const BusinessInfoContainer = styled.div`
168
+ width: ${props => props.isChew && '100%'};
164
169
  padding-top: 40px;
165
170
  padding-left: 5px;
166
171
  padding-right: 5px;
@@ -180,6 +185,7 @@ export const BusinessInfoContainer = styled.div`
180
185
  @media (min-width: 768px) {
181
186
  flex-direction: row;
182
187
  margin-bottom: 25px;
188
+ margin-left: ${props => props.isChew && '25px'};
183
189
  }
184
190
  `
185
191
 
@@ -424,6 +424,7 @@ export const BusinessListingSearchUI = (props) => {
424
424
  categoryId={curProduct?.product?.category_id}
425
425
  productId={curProduct?.product?.id}
426
426
  onSave={handleRedirectToCart}
427
+ handleUpdateProducts={(productId, changes) => handleUpdateProducts(productId, curProduct?.product?.category_id, curProduct?.business?.id, changes)}
427
428
  />
428
429
  )}
429
430
  </Modal>
@@ -3,7 +3,6 @@ import Skeleton from 'react-loading-skeleton'
3
3
  import { BusinessProductsCategories as ProductsCategories } from 'ordering-components-external'
4
4
  import { AutoScroll } from '../../../../../components/AutoScroll'
5
5
  import { useTheme } from 'styled-components'
6
- import { useWindowSize } from '../../../../../hooks/useWindowSize'
7
6
 
8
7
  import { CategoriesContainer } from './styles'
9
8
  import { Tabs, Tab } from '../../styles/Tabs'
@@ -23,7 +22,6 @@ const BusinessProductsCategoriesUI = (props) => {
23
22
 
24
23
  const theme = useTheme()
25
24
  const [selectedCategory, setSelectedCateogry] = useState({ id: null })
26
- const { width } = useWindowSize()
27
25
  const scrollTopSpan = 60
28
26
 
29
27
  const handleChangeCategory = (category) => {
@@ -6,13 +6,14 @@ import { AccordionDropdown } from '../../../AccordionDropdown'
6
6
  import {
7
7
  CategoriesContainer,
8
8
  CategoriesWrap,
9
- CategoryTab
9
+ CategoryTab,
10
+ IterateCategoriesContainer
10
11
  } from './styles'
11
12
 
12
- const SPACE_CONTANT = 25
13
+ const SPACE_CONTANT = 5
13
14
 
14
15
  const categorySpace = {
15
- 1: 1,
16
+ 1: 0,
16
17
  2: 2 * SPACE_CONTANT,
17
18
  3: 3 * SPACE_CONTANT,
18
19
  4: 4 * SPACE_CONTANT,
@@ -26,25 +27,33 @@ const BusinessProductsCategoriesUI = (props) => {
26
27
  handlerClickCategory,
27
28
  categorySelected,
28
29
  featured,
29
- openCategories
30
+ openCategories,
31
+ setCategoryClicked
30
32
  } = props
31
33
 
34
+ const handleClickItem = (category, isSelectCategory) => {
35
+ handlerClickCategory(category)
36
+ if (isSelectCategory) {
37
+ setCategoryClicked(true)
38
+ }
39
+ }
40
+
32
41
  const IterateCategories = ({ list, isSub, currentCat }) => {
33
42
  return (
34
43
  <>
35
- {list?.length && list?.map(category => (
36
- <div key={category?.id ?? category?.name}>
44
+ {list?.length && list?.map((category, i) => (
45
+ <IterateCategoriesContainer key={category?.id ?? category?.name}>
37
46
  {(category?.subcategories?.length > 0 || isSub) ? (
38
47
  <>
39
48
  {category?.subcategories?.length > 0 && (
40
49
  <>
41
- <div className='accordion'>
50
+ <div className={`accordion ${category?.level === 1 ? 'level-1' : ''}`}>
42
51
  <AccordionDropdown
43
52
  item={category}
44
53
  isSelected={categorySelected?.id === category.id}
45
54
  isOpen={openCategories?.includes(category.id)}
46
55
  spaceTab={categorySpace[category?.level ?? 1]}
47
- handleClickItem={() => handlerClickCategory(category)}
56
+ handleClickItem={(isSelectCategory) => handleClickItem(category, isSelectCategory)}
48
57
  IterateCategories={IterateCategories}
49
58
  />
50
59
  </div>
@@ -55,7 +64,8 @@ const BusinessProductsCategoriesUI = (props) => {
55
64
  active={categorySelected?.id === category.id}
56
65
  className={`${category.id === 'featured' ? 'special' : ''}`}
57
66
  categorySpace={categorySpace[category?.level ?? 1]}
58
- onClick={() => handlerClickCategory(category)}
67
+ onClick={() => handleClickItem(category, true)}
68
+ isSub={isSub || i + 1 === list?.length}
59
69
  >
60
70
  <span>
61
71
  {category.name}
@@ -68,14 +78,15 @@ const BusinessProductsCategoriesUI = (props) => {
68
78
  active={categorySelected?.id === category.id}
69
79
  className={`${category.id === 'featured' ? 'special' : ''}`}
70
80
  categorySpace={categorySpace[category?.level ?? 1]}
71
- onClick={() => handlerClickCategory(category)}
81
+ onClick={() => handleClickItem(category, true)}
82
+ isSub={isSub || i + 1 === list?.length}
72
83
  >
73
84
  <span>
74
85
  {category.name}
75
86
  </span>
76
87
  </CategoryTab>
77
88
  )}
78
- </div>
89
+ </IterateCategoriesContainer>
79
90
  ))}
80
91
 
81
92
  {list && list?.length === 0 && isSub && (
@@ -83,7 +94,7 @@ const BusinessProductsCategoriesUI = (props) => {
83
94
  active={categorySelected?.id === category.id}
84
95
  className={`${category.id === 'featured' ? 'special' : ''}`}
85
96
  categorySpace={categorySpace[category?.level ?? 1]}
86
- onClick={() => handlerClickCategory(category)}
97
+ onClick={() => handleClickItem(category, true)}
87
98
  >
88
99
  <span>
89
100
  {currentCat.name}
@@ -4,8 +4,12 @@ export const CategoriesWrap = styled.div`
4
4
  display: flex;
5
5
  flex-direction: column;
6
6
  width: 100%;
7
- @media (min-width: 933px){
7
+ border: 1px solid #ccc;
8
+ border-radius: 7.6px;
9
+ @media (min-width: 993){
8
10
  width: calc(100% - 40px);
11
+ border: 0;
12
+ padding: 0;
9
13
  }
10
14
  `
11
15
 
@@ -20,7 +24,6 @@ export const CategoriesContainer = styled.div`
20
24
  width: 100%;
21
25
  top: 45px;
22
26
  position: sticky;
23
-
24
27
  div.category {
25
28
  text-overflow: ellipsis;
26
29
  white-space: nowrap;
@@ -45,9 +48,8 @@ export const CategoryTab = styled.div`
45
48
  justify-content: space-between;
46
49
  align-items: center;
47
50
  margin-left: ${props => props.categorySpace ?? 0}px;
48
- border-radius: 8px;
49
51
  text-align: left;
50
-
52
+ border-bottom: ${({ isSub }) => !isSub ? '1px solid #ccc' : ''};
51
53
  span {
52
54
  width: 90%;
53
55
  text-overflow: ellipsis;
@@ -59,3 +61,9 @@ export const CategoryTab = styled.div`
59
61
  background-color: ${props => props.theme.colors.primaryContrast};
60
62
  `}
61
63
  `
64
+
65
+ export const IterateCategoriesContainer = styled.div`
66
+ div.level-1 {
67
+ border-bottom: ${({ isSub }) => !isSub ? '1px solid #ccc' : ''} !important;
68
+ }
69
+ `
@@ -438,6 +438,9 @@ const BusinessProductsListingUI = (props) => {
438
438
  useKioskApp={props.useKioskApp}
439
439
  product={productModal.product || curProduct}
440
440
  businessId={business?.id}
441
+ categoryId={curProduct?.category_id}
442
+ productId={curProduct?.id}
443
+ handleUpdateProducts={handleUpdateProducts}
441
444
  onSave={handlerProductAction}
442
445
  productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === (productModal.product || curProduct)?.id ? Cproduct?.quantity : 0) }, 0) || 0}
443
446
  />
@@ -1,7 +1,8 @@
1
- import React, { useState } from 'react'
1
+ import React, { useEffect, useState } from 'react'
2
2
  import Skeleton from 'react-loading-skeleton'
3
3
  import { XLg as Close } from 'react-bootstrap-icons'
4
4
  import { BusinessTypeFilter as BusinessTypeFilterController, useLanguage } from 'ordering-components-external'
5
+ import { useTheme } from 'styled-components'
5
6
 
6
7
  import { Tabs, Tab } from '../../styles/Tabs'
7
8
 
@@ -22,9 +23,11 @@ const BusinessTypeFilterUI = (props) => {
22
23
  const { loading, error, types } = typesState
23
24
  const [, t] = useLanguage()
24
25
  const [load, setLoad] = useState(false)
26
+ const theme = useTheme()
27
+ const isCategoriesHidden = theme?.business_listing_view?.components?.categories?.components?.all?.hidden
25
28
 
26
29
  const handleChangeCategory = (category) => {
27
- if (isAppoint && category === currentTypeSelected) {
30
+ if (isAppoint && category === currentTypeSelected && !isCategoriesHidden) {
28
31
  handleChangeBusinessType(null)
29
32
  return
30
33
  }
@@ -46,6 +49,14 @@ const BusinessTypeFilterUI = (props) => {
46
49
  }
47
50
  }
48
51
 
52
+ useEffect(() => {
53
+ if (isCategoriesHidden && currentTypeSelected === null) {
54
+ if (types && types?.length > 0) {
55
+ (!isSearchMode && !isAppoint) && handleChangeCategory(types[1]?.id)
56
+ }
57
+ }
58
+ }, [types, currentTypeSelected])
59
+
49
60
  return (
50
61
  <>
51
62
  {props.beforeElements?.map((BeforeElement, i) => (
@@ -102,11 +113,10 @@ const BusinessTypeFilterUI = (props) => {
102
113
  {!loading && !error && types && types.length > 0 && (
103
114
  <Tabs variant='primary'>
104
115
  <AutoScroll>
105
- {types.map((type, i) => type.enabled && (
116
+ {types.map((type, i) => (isCategoriesHidden ? type.enabled && type.name !== 'All' : type.enabled) && (
106
117
  <Tab
107
118
  key={type.id}
108
- active={type.id === currentTypeSelected}
109
- className='category'
119
+ active={type.id === currentTypeSelected || i === 0}
110
120
  >
111
121
  <BusinessCategoryTitle
112
122
  active={type.id === currentTypeSelected}
@@ -3,17 +3,17 @@ import { OriginalBusinessesListing } from './layouts/OriginalBusinessesListing'
3
3
  import { RedBusinessesListing } from './layouts/RedBusinessesListing'
4
4
  import { StarbucksBusinessesListing } from './layouts/StarbucksBusinessesListing'
5
5
  import { BusinessListing as AppointmentsBusinessListing } from './layouts/AppointmentsBusinessListing'
6
- import { useOrderingTheme } from 'ordering-components-external'
6
+ import { useTheme } from 'styled-components'
7
7
 
8
8
  export const BusinessesListing = (props) => {
9
9
  const { logosLayout } = props
10
- const [orderingTheme] = useOrderingTheme()
11
- const layout = orderingTheme?.theme?.business_listing_view?.components?.layout?.type || 'original'
12
-
10
+ const theme = useTheme()
11
+ const layout = theme?.business_listing_view?.components?.layout?.type || 'original'
12
+ const isStarbucksLayout = ['starbucks', 'mapview'].includes(layout)
13
13
  return (
14
14
  <>
15
15
  {(layout === 'original' || logosLayout) && <OriginalBusinessesListing {...props} />}
16
- {(layout === 'starbucks') && !logosLayout && <StarbucksBusinessesListing {...props} />}
16
+ {(isStarbucksLayout) && !logosLayout && <StarbucksBusinessesListing {...props} />}
17
17
  {(layout === 'red') && !logosLayout && <RedBusinessesListing {...props} />}
18
18
  {(layout === 'appointments') && !logosLayout && <AppointmentsBusinessListing {...props} />}
19
19
  </>