ordering-ui-external 1.9.2 → 1.9.4

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 (97) hide show
  1. package/_bundles/0.ordering-ui.9ce64e14904d222c0020.js +1 -0
  2. package/_bundles/{1.ordering-ui.8e20ae6af39ad738a29e.js → 1.ordering-ui.9ce64e14904d222c0020.js} +1 -1
  3. package/_bundles/{2.ordering-ui.8e20ae6af39ad738a29e.js → 2.ordering-ui.9ce64e14904d222c0020.js} +1 -1
  4. package/_bundles/{4.ordering-ui.8e20ae6af39ad738a29e.js → 4.ordering-ui.9ce64e14904d222c0020.js} +1 -1
  5. package/_bundles/{5.ordering-ui.8e20ae6af39ad738a29e.js → 5.ordering-ui.9ce64e14904d222c0020.js} +1 -1
  6. package/_bundles/{6.ordering-ui.8e20ae6af39ad738a29e.js → 6.ordering-ui.9ce64e14904d222c0020.js} +1 -1
  7. package/_bundles/{7.ordering-ui.8e20ae6af39ad738a29e.js → 7.ordering-ui.9ce64e14904d222c0020.js} +2 -2
  8. package/_bundles/{7.ordering-ui.8e20ae6af39ad738a29e.js.LICENSE.txt → 7.ordering-ui.9ce64e14904d222c0020.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.8e20ae6af39ad738a29e.js → 8.ordering-ui.9ce64e14904d222c0020.js} +1 -1
  10. package/_bundles/{9.ordering-ui.8e20ae6af39ad738a29e.js → 9.ordering-ui.9ce64e14904d222c0020.js} +1 -1
  11. package/_bundles/ordering-ui.9ce64e14904d222c0020.js +2 -0
  12. package/_bundles/{ordering-ui.8e20ae6af39ad738a29e.js.LICENSE.txt → ordering-ui.9ce64e14904d222c0020.js.LICENSE.txt} +0 -0
  13. package/_modules/components/BusinessesListing/index.js +1 -3
  14. package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +26 -12
  15. package/_modules/components/VerticalOrdersLayout/styles.js +1 -1
  16. package/_modules/themes/five/index.js +7 -0
  17. package/_modules/themes/five/src/components/AddressList/index.js +3 -2
  18. package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +3 -2
  19. package/_modules/themes/five/src/components/BusinessListingSearch/index.js +14 -6
  20. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
  21. package/_modules/themes/five/src/components/BusinessProductsList/index.js +50 -14
  22. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +9 -2
  23. package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +10 -6
  24. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +55 -186
  25. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +29 -40
  26. package/_modules/themes/five/src/components/Cart/index.js +56 -97
  27. package/_modules/themes/five/src/components/CartContent/index.js +50 -2
  28. package/_modules/themes/five/src/components/CartContent/styles.js +6 -4
  29. package/_modules/themes/five/src/components/Checkout/index.js +8 -2
  30. package/_modules/themes/five/src/components/Checkout/styles.js +10 -4
  31. package/_modules/themes/five/src/components/Header/index.js +26 -34
  32. package/_modules/themes/five/src/components/Header/styles.js +46 -35
  33. package/_modules/themes/five/src/components/HeaderOption/index.js +3 -2
  34. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +3 -2
  35. package/_modules/themes/five/src/components/MultiCheckout/index.js +22 -13
  36. package/_modules/themes/five/src/components/MultiCheckout/styles.js +11 -8
  37. package/_modules/themes/five/src/components/MultiOrdersDetails/index.js +9 -1
  38. package/_modules/themes/five/src/components/OrderContextUI/index.js +192 -0
  39. package/_modules/themes/five/src/components/OrderContextUI/styles.js +41 -0
  40. package/_modules/themes/five/src/components/OrderDetails/index.js +3 -0
  41. package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +8 -2
  42. package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +8 -2
  43. package/_modules/themes/five/src/components/OrdersOption/index.js +2 -1
  44. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +17 -8
  45. package/_modules/themes/five/src/components/ProductItemAccordion/styles.js +27 -27
  46. package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +7 -2
  47. package/_modules/themes/five/src/components/ProductOptionSubOption/styles.js +17 -14
  48. package/_modules/themes/five/src/components/SingleOrderCard/index.js +16 -16
  49. package/_modules/themes/five/src/components/SingleOrderCard/styles.js +49 -41
  50. package/package.json +3 -2
  51. package/src/components/BusinessesListing/index.js +1 -3
  52. package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +25 -14
  53. package/src/components/VerticalOrdersLayout/styles.js +8 -0
  54. package/src/themes/five/index.js +2 -0
  55. package/src/themes/five/src/components/AddressList/index.js +3 -2
  56. package/src/themes/five/src/components/BusinessItemAccordion/index.js +2 -1
  57. package/src/themes/five/src/components/BusinessListingSearch/index.js +4 -0
  58. package/src/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
  59. package/src/themes/five/src/components/BusinessProductsList/index.js +54 -18
  60. package/src/themes/five/src/components/BusinessProductsListing/index.js +14 -2
  61. package/src/themes/five/src/components/BusinessProductsListing/styles.js +18 -6
  62. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +219 -345
  63. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +2 -77
  64. package/src/themes/five/src/components/Cart/index.js +50 -57
  65. package/src/themes/five/src/components/CartContent/index.js +43 -3
  66. package/src/themes/five/src/components/CartContent/styles.js +6 -0
  67. package/src/themes/five/src/components/Checkout/index.js +16 -2
  68. package/src/themes/five/src/components/Checkout/styles.js +19 -6
  69. package/src/themes/five/src/components/Header/index.js +281 -277
  70. package/src/themes/five/src/components/Header/styles.js +20 -51
  71. package/src/themes/five/src/components/HeaderOption/index.js +3 -2
  72. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +2 -1
  73. package/src/themes/five/src/components/MultiCheckout/index.js +27 -13
  74. package/src/themes/five/src/components/MultiCheckout/styles.js +8 -13
  75. package/src/themes/five/src/components/MultiOrdersDetails/index.js +21 -13
  76. package/src/themes/five/src/components/OrderContextUI/index.js +133 -0
  77. package/src/themes/five/src/components/OrderContextUI/styles.js +86 -0
  78. package/src/themes/five/src/components/OrderDetails/index.js +4 -0
  79. package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +5 -2
  80. package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +4 -0
  81. package/src/themes/five/src/components/OrdersOption/index.js +2 -1
  82. package/src/themes/five/src/components/ProductItemAccordion/index.js +58 -40
  83. package/src/themes/five/src/components/ProductItemAccordion/styles.js +4 -3
  84. package/src/themes/five/src/components/ProductOptionSubOption/index.js +8 -1
  85. package/src/themes/five/src/components/ProductOptionSubOption/styles.js +6 -0
  86. package/src/themes/five/src/components/SingleOrderCard/index.js +12 -13
  87. package/src/themes/five/src/components/SingleOrderCard/styles.js +26 -7
  88. package/template/app.js +179 -66
  89. package/template/components/ListenPageChanges/index.js +3 -2
  90. package/template/components/OrderingThemeUpdated/index.js +41 -0
  91. package/template/helmetdata.json +7 -0
  92. package/template/pages/MessagesList/index.js +2 -0
  93. package/template/pages/MultiCart/index.js +30 -0
  94. package/template/pages/MultiCheckout/index.js +86 -10
  95. package/template/pages/MultiOrdersDetails/index.js +9 -4
  96. package/_bundles/0.ordering-ui.8e20ae6af39ad738a29e.js +0 -1
  97. package/_bundles/ordering-ui.8e20ae6af39ad738a29e.js +0 -2
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState } from 'react'
2
2
  import Skeleton from 'react-loading-skeleton'
3
- import { BusinessProductsCategories as ProductsCategories } from 'ordering-components-external'
3
+ import { BusinessProductsCategories as ProductsCategories, useOrderingTheme } from 'ordering-components-external'
4
4
  import { AutoScroll } from '../../../../../components/AutoScroll'
5
5
  import { useTheme } from 'styled-components'
6
6
 
@@ -21,9 +21,12 @@ const BusinessProductsCategoriesUI = (props) => {
21
21
  } = props
22
22
 
23
23
  const theme = useTheme()
24
+ const [orderingTheme] = useOrderingTheme()
24
25
  const [selectedCategory, setSelectedCateogry] = useState({ id: null })
25
26
  const scrollTopSpan = 60
26
27
 
28
+ const isChew = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
29
+
27
30
  const handleChangeCategory = (category) => {
28
31
  const isBlockScroll = window.location.search.includes('category') &&
29
32
  window.location.search.includes('product')
@@ -118,12 +121,14 @@ const BusinessProductsCategoriesUI = (props) => {
118
121
  if (typeof useKioskApp === 'undefined') return
119
122
  const styleSheet = document.getElementById('styles').sheet
120
123
 
124
+ const disabledCustomWidth = isChew
125
+
121
126
  let style0 = '.sticky-prod-cat {'
122
127
  style0 += 'position: fixed !important;'
123
128
  style0 += 'top: 0px !important;'
124
129
  style0 += 'left: 0px !important;'
125
130
  style0 += 'padding: 5px 5px 0px 5px !important;'
126
- style0 += `width: calc(100% - ${useKioskApp ? '50px' : '155px'}) !important;`
131
+ !disabledCustomWidth && (style0 += `width: calc(100% - ${useKioskApp ? '50px' : '155px'}) !important;`)
127
132
  style0 += '}'
128
133
 
129
134
  let style1 = '.sticky-search {'
@@ -140,7 +145,7 @@ const BusinessProductsCategoriesUI = (props) => {
140
145
 
141
146
  window.addEventListener('scroll', handleScroll)
142
147
  return () => window.removeEventListener('scroll', handleScroll)
143
- }, [useKioskApp])
148
+ }, [useKioskApp, isChew])
144
149
 
145
150
  useEffect(() => {
146
151
  if (business?.professionals?.length > 0 && !useKioskApp) {
@@ -134,22 +134,19 @@ const BusinessProductsListUI = (props) => {
134
134
  )}
135
135
  </HeaderWrapper>
136
136
  <ProductsListing>
137
- {
138
- productsCategorySelected
139
- ?.filter(product => product?.category_id === category?.id)
140
- ?.map((product, i) => (
141
- <SingleProductCard
142
- key={i}
143
- isSoldOut={(product.inventoried && !product.quantity)}
144
- product={product}
145
- useKioskApp={useKioskApp}
146
- businessId={businessId}
147
- onProductClick={onProductClick}
148
- isCartOnProductsList={isCartOnProductsList}
149
- handleUpdateProducts={handleUpdateProducts}
150
- productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
151
- />
152
- ))
137
+ {productsCategorySelected.map((product, i) => (
138
+ <SingleProductCard
139
+ key={i}
140
+ isSoldOut={(product.inventoried && !product.quantity)}
141
+ product={product}
142
+ useKioskApp={useKioskApp}
143
+ businessId={businessId}
144
+ onProductClick={onProductClick}
145
+ isCartOnProductsList={isCartOnProductsList}
146
+ handleUpdateProducts={handleUpdateProducts}
147
+ productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
148
+ />
149
+ ))
153
150
  }
154
151
  </ProductsListing>
155
152
  {isSearchMode && category?.subcategories?.length > 0 && category?.subcategories?.filter(subcategory => productsCategorySelected?.some(product => product?.category_id === subcategory?.id))?.map(subcategory => (
@@ -196,6 +193,19 @@ const BusinessProductsListUI = (props) => {
196
193
  productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
197
194
  />
198
195
  ))}
196
+ {!categoryState?.loading && categoryState?.products?.length > 9 && (
197
+ <SingleProductCard
198
+ useCustomFunctionality
199
+ onCustomClick={() => onClickCategory(category)}
200
+ isCartOnProductsList={isCartOnProductsList}
201
+ handleUpdateProducts={handleUpdateProducts}
202
+ customText={t('MORE', 'More')}
203
+ customStyle={{
204
+ display: 'flex',
205
+ justifyContent: 'center'
206
+ }}
207
+ />
208
+ )}
199
209
  </ProductsListing>
200
210
  </WrapAllCategories>
201
211
  )
@@ -256,7 +266,7 @@ const BusinessProductsListUI = (props) => {
256
266
  <ProductsListing isSubcategorySearch={isSubcategorySearch}>
257
267
  {isSearchMode && category?.subcategories?.length > 0 ? (
258
268
  <>
259
- {products?.filter(product => product?.category_id === category?.id)?.map((product, i) => (
269
+ {products?.filter((product, i) => i < 9 && product?.category_id === category?.id)?.map((product, i) => (
260
270
  <SingleProductCard
261
271
  key={i}
262
272
  isSoldOut={product.inventoried && !product.quantity}
@@ -269,11 +279,24 @@ const BusinessProductsListUI = (props) => {
269
279
  productAddedToCartLength={currentCart?.products?.reduce((productsLength, Cproduct) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
270
280
  />
271
281
  ))}
282
+ {!categoryState?.loading && products?.length > 9 && (
283
+ <SingleProductCard
284
+ useCustomFunctionality
285
+ onCustomClick={() => onClickCategory(category)}
286
+ isCartOnProductsList={isCartOnProductsList}
287
+ handleUpdateProducts={handleUpdateProducts}
288
+ customText={t('MORE', 'More')}
289
+ customStyle={{
290
+ display: 'flex',
291
+ justifyContent: 'center'
292
+ }}
293
+ />
294
+ )}
272
295
  </>
273
296
  ) : (
274
297
  <>
275
298
  {
276
- products.map((product, i) => (
299
+ products.filter((_, i) => i < 9).map((product, i) => (
277
300
  <SingleProductCard
278
301
  key={i}
279
302
  isSoldOut={product.inventoried && !product.quantity}
@@ -287,6 +310,19 @@ const BusinessProductsListUI = (props) => {
287
310
  />
288
311
  ))
289
312
  }
313
+ {!categoryState?.loading && products?.length > 9 && (
314
+ <SingleProductCard
315
+ useCustomFunctionality
316
+ onCustomClick={() => onClickCategory(category)}
317
+ isCartOnProductsList={isCartOnProductsList}
318
+ handleUpdateProducts={handleUpdateProducts}
319
+ customText={t('MORE', 'More')}
320
+ customStyle={{
321
+ display: 'flex',
322
+ justifyContent: 'center'
323
+ }}
324
+ />
325
+ )}
290
326
  </>
291
327
  )}
292
328
  {
@@ -26,7 +26,9 @@ import {
26
26
  BusinessCartContent,
27
27
  EmptyCart,
28
28
  EmptyBtnWrapper,
29
- Title
29
+ Title,
30
+ HeaderContent,
31
+ OrderContextUIWrapper
30
32
  } from './styles'
31
33
 
32
34
  import { NotFoundSource } from '../NotFoundSource'
@@ -42,6 +44,8 @@ import { Alert } from '../../../../../components/Confirm'
42
44
  import { FloatingButton } from '../../../../../components/FloatingButton'
43
45
  import { UpsellingPage } from '../../../../../components/UpsellingPage'
44
46
  import { ServiceForm } from '../ServiceForm'
47
+ import { OrderContextUI } from '../OrderContextUI'
48
+
45
49
  const PIXELS_TO_SCROLL = 300
46
50
 
47
51
  const BusinessProductsListingUI = (props) => {
@@ -284,7 +288,15 @@ const BusinessProductsListingUI = (props) => {
284
288
  <>
285
289
  <ProductsContainer>
286
290
  {!props.useKioskApp && (
287
- <ArrowLeft onClick={() => handleGoToBusinessList()} />
291
+ // <ArrowLeft onClick={() => handleGoToBusinessList()} />
292
+ <HeaderContent>
293
+ <ArrowLeft className='back-arrow' onClick={() => handleGoToBusinessList()} />
294
+ {windowSize?.width < 576 && (
295
+ <OrderContextUIWrapper>
296
+ <OrderContextUI isCheckOut />
297
+ </OrderContextUIWrapper>
298
+ )}
299
+ </HeaderContent>
288
300
  )}
289
301
  <RenderProductsLayout
290
302
  errors={errors}
@@ -3,12 +3,6 @@ import styled, { css } from 'styled-components'
3
3
  export const ProductsContainer = styled.div`
4
4
  width: 95%;
5
5
  margin: 20px auto 0px;
6
- > svg {
7
- color: ${props => props.theme.colors.headingColor};
8
- font-size: 24px;
9
- cursor: pointer;
10
- margin-bottom: 5px;
11
- }
12
6
  `
13
7
 
14
8
  export const ProductLoading = styled.div`
@@ -135,3 +129,21 @@ export const EmptyBtnWrapper = styled.div`
135
129
  padding-right: 25px;
136
130
  }
137
131
  `
132
+
133
+ export const HeaderContent = styled.div`
134
+ display: flex;
135
+ align-items: center;
136
+ margin-bottom: 10px;
137
+ .back-arrow {
138
+ font-size: 24px;
139
+ cursor: pointer;
140
+ }
141
+ `
142
+ export const OrderContextUIWrapper = styled.div`
143
+ flex: 1;
144
+ width: 100%;
145
+ ${props => props.theme.rtl && css`
146
+ margin-left: 0px;
147
+ margin-right: 15px;
148
+ `}
149
+ `