ordering-ui-external 1.9.1 → 1.9.3

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 (89) hide show
  1. package/_bundles/0.ordering-ui.ea0875b41af5b7f1d809.js +1 -0
  2. package/_bundles/{1.ordering-ui.a97bdaf67c563ada4c74.js → 1.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  3. package/_bundles/{2.ordering-ui.a97bdaf67c563ada4c74.js → 2.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  4. package/_bundles/{4.ordering-ui.a97bdaf67c563ada4c74.js → 4.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  5. package/_bundles/{5.ordering-ui.a97bdaf67c563ada4c74.js → 5.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  6. package/_bundles/{6.ordering-ui.a97bdaf67c563ada4c74.js → 6.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  7. package/_bundles/{7.ordering-ui.a97bdaf67c563ada4c74.js → 7.ordering-ui.ea0875b41af5b7f1d809.js} +2 -2
  8. package/_bundles/{7.ordering-ui.a97bdaf67c563ada4c74.js.LICENSE.txt → 7.ordering-ui.ea0875b41af5b7f1d809.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.a97bdaf67c563ada4c74.js → 8.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  10. package/_bundles/{9.ordering-ui.a97bdaf67c563ada4c74.js → 9.ordering-ui.ea0875b41af5b7f1d809.js} +1 -1
  11. package/_bundles/ordering-ui.ea0875b41af5b7f1d809.js +2 -0
  12. package/_bundles/{ordering-ui.a97bdaf67c563ada4c74.js.LICENSE.txt → ordering-ui.ea0875b41af5b7f1d809.js.LICENSE.txt} +0 -0
  13. package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +9 -10
  14. package/_modules/themes/five/index.js +7 -0
  15. package/_modules/themes/five/src/components/AddressList/index.js +3 -2
  16. package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +3 -2
  17. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
  18. package/_modules/themes/five/src/components/BusinessProductsList/index.js +50 -14
  19. package/_modules/themes/five/src/components/BusinessProductsListing/index.js +9 -2
  20. package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +10 -6
  21. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +34 -129
  22. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +29 -40
  23. package/_modules/themes/five/src/components/Cart/index.js +6 -3
  24. package/_modules/themes/five/src/components/CartContent/index.js +97 -2
  25. package/_modules/themes/five/src/components/CartContent/styles.js +6 -4
  26. package/_modules/themes/five/src/components/Checkout/index.js +8 -2
  27. package/_modules/themes/five/src/components/Checkout/styles.js +10 -4
  28. package/_modules/themes/five/src/components/Header/index.js +26 -34
  29. package/_modules/themes/five/src/components/Header/styles.js +46 -35
  30. package/_modules/themes/five/src/components/HeaderOption/index.js +3 -2
  31. package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +3 -2
  32. package/_modules/themes/five/src/components/MultiCheckout/index.js +20 -10
  33. package/_modules/themes/five/src/components/MultiCheckout/styles.js +11 -8
  34. package/_modules/themes/five/src/components/MultiOrdersDetails/index.js +2 -0
  35. package/_modules/themes/five/src/components/OrderContextUI/index.js +192 -0
  36. package/_modules/themes/five/src/components/OrderContextUI/styles.js +41 -0
  37. package/_modules/themes/five/src/components/OrderDetails/index.js +5 -2
  38. package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +8 -2
  39. package/_modules/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +8 -2
  40. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +17 -8
  41. package/_modules/themes/five/src/components/ProductItemAccordion/styles.js +27 -27
  42. package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +7 -2
  43. package/_modules/themes/five/src/components/ProductOptionSubOption/styles.js +17 -14
  44. package/_modules/themes/five/src/components/SingleOrderCard/index.js +16 -16
  45. package/_modules/themes/five/src/components/SingleOrderCard/styles.js +49 -41
  46. package/package.json +2 -1
  47. package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +12 -12
  48. package/src/themes/five/index.js +2 -0
  49. package/src/themes/five/src/components/AddressList/index.js +3 -2
  50. package/src/themes/five/src/components/BusinessItemAccordion/index.js +2 -1
  51. package/src/themes/five/src/components/BusinessProductsCategories/index.js +8 -3
  52. package/src/themes/five/src/components/BusinessProductsList/index.js +54 -18
  53. package/src/themes/five/src/components/BusinessProductsListing/index.js +14 -2
  54. package/src/themes/five/src/components/BusinessProductsListing/styles.js +18 -6
  55. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +2 -85
  56. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +2 -77
  57. package/src/themes/five/src/components/Cart/index.js +6 -3
  58. package/src/themes/five/src/components/CartContent/index.js +61 -3
  59. package/src/themes/five/src/components/CartContent/styles.js +6 -0
  60. package/src/themes/five/src/components/Checkout/index.js +16 -2
  61. package/src/themes/five/src/components/Checkout/styles.js +19 -6
  62. package/src/themes/five/src/components/Header/index.js +281 -277
  63. package/src/themes/five/src/components/Header/styles.js +20 -51
  64. package/src/themes/five/src/components/HeaderOption/index.js +3 -2
  65. package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +2 -1
  66. package/src/themes/five/src/components/MultiCheckout/index.js +26 -6
  67. package/src/themes/five/src/components/MultiCheckout/styles.js +8 -13
  68. package/src/themes/five/src/components/MultiOrdersDetails/index.js +2 -0
  69. package/src/themes/five/src/components/OrderContextUI/index.js +133 -0
  70. package/src/themes/five/src/components/OrderContextUI/styles.js +86 -0
  71. package/src/themes/five/src/components/OrderDetails/index.js +6 -2
  72. package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/index.js +5 -2
  73. package/src/themes/five/src/components/OrdersOption/PreviousBusinessOrdered/styles.js +4 -0
  74. package/src/themes/five/src/components/ProductItemAccordion/index.js +58 -40
  75. package/src/themes/five/src/components/ProductItemAccordion/styles.js +4 -3
  76. package/src/themes/five/src/components/ProductOptionSubOption/index.js +8 -1
  77. package/src/themes/five/src/components/ProductOptionSubOption/styles.js +6 -0
  78. package/src/themes/five/src/components/SingleOrderCard/index.js +12 -13
  79. package/src/themes/five/src/components/SingleOrderCard/styles.js +26 -7
  80. package/template/app.js +1 -1
  81. package/template/components/ListenPageChanges/index.js +3 -2
  82. package/template/components/OrderingThemeUpdated/index.js +41 -0
  83. package/template/helmetdata.json +7 -0
  84. package/template/pages/MessagesList/index.js +2 -0
  85. package/template/pages/MultiCart/index.js +24 -0
  86. package/template/pages/MultiCheckout/index.js +86 -10
  87. package/template/pages/MultiOrdersDetails/index.js +9 -4
  88. package/_bundles/0.ordering-ui.a97bdaf67c563ada4c74.js +0 -1
  89. package/_bundles/ordering-ui.a97bdaf67c563ada4c74.js +0 -2
@@ -0,0 +1,86 @@
1
+ import styled, { css } from 'styled-components'
2
+
3
+ export const Container = styled.div`
4
+ ${({ isBusinessList }) => isBusinessList && css`
5
+ position: absolute;
6
+ top: 10%;
7
+ width: 100%;
8
+ padding: 0 15px;
9
+ box-sizing: border-box;
10
+ `}
11
+ margin-top: 10px;
12
+ `
13
+
14
+ export const AddressMenu = styled.div`
15
+ cursor: pointer;
16
+ font-size: 14px;
17
+ display: flex;
18
+ align-items: center;
19
+ background-color: ${props => props.theme.colors.backgroundPage};
20
+ font-weight: 600;
21
+ border-radius: 50px;
22
+ padding: 13px 19px;
23
+ margin-bottom: 10px;
24
+ ${({ isCheckOut }) => isCheckOut && css`
25
+ background-color: ${props => props.theme.colors.grayDividerColor};
26
+ `}
27
+
28
+ span {
29
+ width: 100%;
30
+ overflow: hidden;
31
+ text-overflow: ellipsis;
32
+ white-space: nowrap;
33
+ }
34
+ svg {
35
+ margin-right: 5px;
36
+ color: ${props => props.theme.colors.lightGray};
37
+ ${props => props.theme?.rtl && css`
38
+ margin-left: 5px;
39
+ margin-right: 0;
40
+ `}
41
+ }
42
+ `
43
+
44
+ export const FeatureItems = styled.div`
45
+ width: 100%;
46
+ display: flex;
47
+ justify-content: space-between;
48
+ `
49
+
50
+ export const ItemInline = styled.div`
51
+ > span #select-input {
52
+ background-color: ${props => props.theme.colors.grayDividerColor} !important;
53
+ border: none;
54
+ border-radius: 7.6px;
55
+ svg {
56
+ font-size: 14px;
57
+ }
58
+ #list {
59
+ background-color: ${props => props.theme.colors.backgroundPage};
60
+ border: none;
61
+ border-radius: 7.6px;
62
+
63
+ left: 0px;
64
+ right: initial;
65
+
66
+ ${props => props.theme.rtl && css`
67
+ left: initial;
68
+ right: 0px;
69
+ `}
70
+ }
71
+
72
+ > div:first-child {
73
+ font-size: 11px;
74
+ }
75
+ }
76
+
77
+ .moment-popover {
78
+ > div:first-child {
79
+ font-size: 11px;
80
+ padding: 4px 7px;
81
+ svg {
82
+ font-size: 14px;
83
+ }
84
+ }
85
+ }
86
+ `
@@ -400,8 +400,12 @@ const OrderDetailsUI = (props) => {
400
400
  businessLogoUrlValidation()
401
401
  }, [order])
402
402
 
403
- const disableLeftButton = [1, 15, 20, 21]
404
- const disableRightButton = [1, 15, 21]
403
+ useEffect(() => {
404
+ window.scrollTo(0, 0)
405
+ }, [])
406
+
407
+ const disableLeftButton = [1, 2, 5, 15, 16, 17, 20, 21]
408
+ const disableRightButton = [1, 2, 5, 15, 16, 17, 21]
405
409
 
406
410
  return (
407
411
  <Container>
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { useOrder } from 'ordering-components-external'
2
+ import { useOrder, useOrderingTheme } from 'ordering-components-external'
3
3
  import { BusinessController } from '../../BusinessController'
4
4
  import { AutoScroll } from '../../AutoScroll'
5
5
  import { BusinessList, BusinessListWrapper } from './styles'
@@ -15,14 +15,17 @@ export const PreviousBusinessOrdered = (props) => {
15
15
  } = props
16
16
 
17
17
  const [orderState] = useOrder()
18
+ const [orderingTheme] = useOrderingTheme()
18
19
  const { width } = useWindowSize()
20
+ const isChew = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
21
+
19
22
  const onBusinessClick = (business) => {
20
23
  onRedirectPage({ page: 'business', params: { store: business.slug } })
21
24
  }
22
25
 
23
26
  return (
24
27
  <BusinessListWrapper isLoading={businesses?.loading}>
25
- <BusinessList>
28
+ <BusinessList marginCard={isChew && '0 20px 0 0'}>
26
29
  <AutoScroll scrollId='searchlistorder'>
27
30
  {
28
31
  businesses?.result?.map((business, i) => (
@@ -33,6 +33,10 @@ export const BusinessList = styled.div`
33
33
  width: calc(100vw - 40px);
34
34
  min-width: calc(100vw - 40px);
35
35
 
36
+ ${({ marginCard }) => marginCard && css`
37
+ margin: ${({ marginCard }) => marginCard} !important;
38
+ `}
39
+
36
40
  @media (min-width: 681px) {
37
41
  width: calc(50vw - 40px);
38
42
  min-width: calc(50vw - 40px);
@@ -33,6 +33,7 @@ import { useTheme } from 'styled-components'
33
33
 
34
34
  export const ProductItemAccordion = (props) => {
35
35
  const {
36
+ isDisabledEdit,
36
37
  isCartPending,
37
38
  isCartProduct,
38
39
  product,
@@ -117,11 +118,10 @@ export const ProductItemAccordion = (props) => {
117
118
  <BeforeComponent key={i} {...props} />))}
118
119
  <AccordionSection isCheckout={isCheckout}>
119
120
  <Accordion
120
- isValid={product?.valid ?? true}
121
121
  className={`product accordion ${setActive}`}
122
122
  onClick={(e) => toggleAccordion(e)}
123
123
  >
124
- <ProductInfo className='info'>
124
+ <ProductInfo className='info' isValid={product?.valid ?? true}>
125
125
  {(product?.images || theme?.images?.dummies?.product) && showProductImage && (
126
126
  <WrapperProductImage>
127
127
  <ProductImage bgimage={product?.images || theme?.images?.dummies?.product} />
@@ -140,7 +140,7 @@ export const ProductItemAccordion = (props) => {
140
140
  </ScheduleInfoWrapper>
141
141
  ) : (
142
142
  <>
143
- {isCartProduct && !isCartPending && getProductMax ? (
143
+ {!isDisabledEdit && isCartProduct && !isCartPending && getProductMax ? (
144
144
  <ProductSelectWrapper>
145
145
  <IosArrowDown />
146
146
  <ProductSelect
@@ -180,7 +180,7 @@ export const ProductItemAccordion = (props) => {
180
180
  <p>{parsePrice(product.total || product.price)}</p>
181
181
  {isCartProduct && !isCartPending && (
182
182
  <div>
183
- {onEditProduct && (
183
+ {onEditProduct && !isDisabledEdit && (
184
184
  <span ref={productActionsEdit}>
185
185
  <Pencil color='#B1BCCC' onClick={() => onEditProduct(product)} />
186
186
  </span>
@@ -199,20 +199,59 @@ export const ProductItemAccordion = (props) => {
199
199
  )}
200
200
  </ProductInfo>
201
201
 
202
- {(product?.valid || !isCartProduct) && windowSize.width > 410 && (
203
- <ProductPriceSection>
204
- <ProductPrice className='prod-price'>
205
- <span>
206
- {parsePrice(product.total || product.price)}
207
- </span>
208
- {(productInfo().ingredients.length > 0 || productInfo().options.length > 0 || product.comment) && (
209
- <p>
210
- <IosArrowDown className={`${setRotate}`} />
211
- </p>
212
- )}
213
- </ProductPrice>
214
- {isCartProduct && !isCartPending && (
215
- <ProductActions>
202
+ {product.valid ? (
203
+ <>
204
+ {(product?.valid || !isCartProduct) && windowSize.width > 410 && (
205
+ <ProductPriceSection>
206
+ <ProductPrice className='prod-price'>
207
+ <span>
208
+ {parsePrice(product.total || product.price)}
209
+ </span>
210
+ {(productInfo().ingredients.length > 0 || productInfo().options.length > 0 || product.comment) && (
211
+ <p>
212
+ <IosArrowDown className={`${setRotate}`} />
213
+ </p>
214
+ )}
215
+ </ProductPrice>
216
+ {isCartProduct && !isCartPending && (
217
+ <ProductActions>
218
+ {!isDisabledEdit && (
219
+ <ProductActionsEdit
220
+ ref={productActionsEdit}
221
+ onClick={() => onEditProduct(product)}
222
+ disabled={orderState.loading}
223
+ >
224
+ <Pencil color='#B1BCCC' />
225
+ </ProductActionsEdit>
226
+ )}
227
+ <ProductActionsDelete
228
+ ref={productActionsDelete}
229
+ onClick={() => onDeleteProduct(product)}
230
+ disabled={orderState.loading}
231
+ >
232
+ <Trash color='#B1BCCC' />
233
+ </ProductActionsDelete>
234
+ </ProductActions>
235
+ )}
236
+ </ProductPriceSection>
237
+ )}
238
+ </>
239
+ ) : (
240
+ <ProductActions>
241
+ <ProductActionsDelete
242
+ ref={productActionsDelete}
243
+ onClick={() => onDeleteProduct(product)}
244
+ disabled={orderState.loading}
245
+ >
246
+ <Trash color='#B1BCCC' />
247
+ </ProductActionsDelete>
248
+ </ProductActions>
249
+ )}
250
+
251
+ {isCartProduct && !isCartPending && product?.valid_menu && !product?.valid_quantity && (
252
+ <ProductError>
253
+ <ProductActions>
254
+ {!isDisabledEdit && (
216
255
  <ProductActionsEdit
217
256
  ref={productActionsEdit}
218
257
  onClick={() => onEditProduct(product)}
@@ -220,28 +259,7 @@ export const ProductItemAccordion = (props) => {
220
259
  >
221
260
  <Pencil color='#B1BCCC' />
222
261
  </ProductActionsEdit>
223
- <ProductActionsDelete
224
- ref={productActionsDelete}
225
- onClick={() => onDeleteProduct(product)}
226
- disabled={orderState.loading}
227
- >
228
- <Trash color='#B1BCCC' />
229
- </ProductActionsDelete>
230
- </ProductActions>
231
- )}
232
- </ProductPriceSection>
233
- )}
234
-
235
- {isCartProduct && !isCartPending && product?.valid_menu && !product?.valid_quantity && (
236
- <ProductError>
237
- <ProductActions>
238
- <ProductActionsEdit
239
- ref={productActionsEdit}
240
- onClick={() => onEditProduct(product)}
241
- disabled={orderState.loading}
242
- >
243
- <Pencil color='#B1BCCC' />
244
- </ProductActionsEdit>
262
+ )}
245
263
  <ProductActionsDelete
246
264
  ref={productActionsDelete}
247
265
  onClick={() => onDeleteProduct(product)}
@@ -41,9 +41,6 @@ const AccordionStyled = styled.div`
41
41
 
42
42
  export const Accordion = (props) => {
43
43
  const style = {}
44
- if (!props.isValid) {
45
- style.opacity = '0.5'
46
- }
47
44
  return (
48
45
  <AccordionStyled
49
46
  {...props}
@@ -217,6 +214,10 @@ export const ProductInfo = styled.div`
217
214
  margin: 0px 5px;
218
215
  }
219
216
 
217
+ ${({ isValid }) => !isValid && css`
218
+ opacity: 0.5;
219
+ `}
220
+
220
221
  @media (min-width: 411px) {
221
222
  width: 80%;
222
223
  }
@@ -8,6 +8,7 @@ import BsCircleFill from '@meronex/icons/bs/BsCircleFill'
8
8
  import BsCircleHalf from '@meronex/icons/bs/BsCircleHalf'
9
9
  import BsDashCircle from '@meronex/icons/bs/BsDashCircle'
10
10
  import BsPlusCircle from '@meronex/icons/bs/BsPlusCircle'
11
+ import { useWindowSize } from '../../../../../hooks/useWindowSize'
11
12
 
12
13
  import {
13
14
  Container,
@@ -43,6 +44,7 @@ const ProductOptionSubOptionUI = (props) => {
43
44
  const price = option?.with_half_option && suboption?.half_price && state.position !== 'whole' ? suboption?.half_price : suboption?.price
44
45
  const [, t] = useLanguage()
45
46
  const [{ parsePrice }] = useUtils()
47
+ const { width } = useWindowSize()
46
48
  const [showMessage, setShowMessage] = useState(false)
47
49
  const [isDirty, setIsDirty] = useState(false)
48
50
 
@@ -112,7 +114,7 @@ const ProductOptionSubOptionUI = (props) => {
112
114
  )}
113
115
  <Text>
114
116
  <div>{suboption?.name}</div>
115
- {showMessage && <span>{`${t('OPTIONS_MAX_LIMIT', 'Maximum options to choose')}: ${option?.max}`}</span>}
117
+ {showMessage && width > 576 && <span>{`${t('OPTIONS_MAX_LIMIT', 'Maximum options to choose')}: ${option?.max}`}</span>}
116
118
  </Text>
117
119
  </LeftOptionContainer>
118
120
  <RightOptionContainer>
@@ -159,6 +161,11 @@ const ProductOptionSubOptionUI = (props) => {
159
161
  )}
160
162
  </SuboptionPrice>
161
163
  </Container>
164
+ {showMessage && width < 576 && (
165
+ <Text noMargin>
166
+ <span>{`${t('OPTIONS_MAX_LIMIT', 'Maximum options to choose')}: ${option?.max}`}</span>
167
+ </Text>
168
+ )}
162
169
  {props.afterComponents?.map((AfterComponent, i) => (
163
170
  <AfterComponent key={i} {...props} />))}
164
171
  {props.afterElements?.map((AfterElement, i) => (
@@ -59,6 +59,12 @@ export const Text = styled.div`
59
59
  margin-right: 10px;
60
60
  `}
61
61
  }
62
+
63
+ ${({ noMargin }) => noMargin && css`
64
+ span {
65
+ margin: 0;
66
+ }
67
+ `}
62
68
  `
63
69
 
64
70
  export const SubOptionThumbnail = styled.div`
@@ -142,6 +142,7 @@ const SingleOrderCardUI = (props) => {
142
142
  <BeforeComponent key={i} {...props} />))}
143
143
  <Container
144
144
  id='order-card'
145
+ w={screen.width - (screen.width < 411 ? -60 : 60)}
145
146
  isBusinessesPage={isBusinessesPage}
146
147
  isCustomerMode={isCustomerMode}
147
148
  onClick={(e) => handleClickCard(e, order)}
@@ -155,20 +156,18 @@ const SingleOrderCardUI = (props) => {
155
156
  <>
156
157
  {order?.business?.length > 1 ? (
157
158
  <MultiLogosContainer>
158
- {order?.business?.map((business, i) => (
159
- <React.Fragment key={business?.id}>
160
- {i > 1 ? (
161
- <p>
162
- + {order?.business?.length - 2}
163
- </p>
164
- ) : (
165
- <BusinessLogoWrapper
166
- bgimage={optimizeImage(business?.logo || theme.images?.dummies?.businessLogo, 'h_400,c_limit')}
167
- isMulti
168
- />
169
- )}
170
- </React.Fragment>
159
+ {order?.business?.map((business, i) => i < 2 && (
160
+ <BusinessLogoWrapper
161
+ key={business?.id}
162
+ bgimage={optimizeImage(business?.logo || theme.images?.dummies?.businessLogo, 'h_400,c_limit')}
163
+ isMulti
164
+ />
171
165
  ))}
166
+ {order?.business?.length > 1 && (order?.business?.length - 2) > 0 && (
167
+ <p>
168
+ + {order?.business?.length - 2}
169
+ </p>
170
+ )}
172
171
  </MultiLogosContainer>
173
172
  ) : (
174
173
  <BusinessLogoWrapper bgimage={optimizeImage(order?.business?.logo || theme.images?.dummies?.businessLogo, 'h_400,c_limit')} />
@@ -3,7 +3,7 @@ import React from 'react'
3
3
 
4
4
  export const Container = styled.div`
5
5
  cursor: pointer;
6
- margin: 10px;
6
+ margin: 10px 0;
7
7
  position: relative;
8
8
  background: white;
9
9
  border-radius: 16px;
@@ -20,8 +20,8 @@ export const Container = styled.div`
20
20
  width: 300px;
21
21
  display: inline-block;
22
22
  ` : css`
23
- min-width: 380px;
24
- width: 380px;
23
+ min-width: ${({ w }) => w ?? 380}px;
24
+ width: ${({ w }) => w ?? 380}px;
25
25
  height: ${({ isBusinessesPage }) => isBusinessesPage && '300px'};
26
26
  max-height: ${({ isBusinessesPage }) => isBusinessesPage ? '300px' : '220px'};
27
27
  `}
@@ -54,6 +54,10 @@ export const Container = styled.div`
54
54
  width: 430px;
55
55
  }
56
56
 
57
+ @media (min-width: 768px) {
58
+ margin: 10px;
59
+ }
60
+
57
61
  @media(min-width: 993px){
58
62
  ${({ isBusinessesPage }) => isBusinessesPage && css`
59
63
  margin: 30px 20px;
@@ -66,13 +70,17 @@ export const Content = styled.div`
66
70
  display: flex;
67
71
  position: relative;
68
72
  border-radius: 16px;
69
- padding: 10px;
73
+ padding: 0;
70
74
  ${({ isCustomerMode }) => isCustomerMode ? css`
71
75
  align-items: center;
72
76
  ` : css`
73
77
  align-items: flex-start;
74
78
  flex: 1;
75
79
  `}
80
+
81
+ @media (min-width: 768px) {
82
+ padding: 10px;
83
+ }
76
84
  `
77
85
 
78
86
  export const Price = styled.div`
@@ -135,13 +143,24 @@ const BusinessLogoWrapperStyled = styled.div`
135
143
  border-radius: 7.6px;
136
144
  box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.1);
137
145
 
138
- margin-left: 8px;
146
+ margin-right: 8px;
147
+ margin-left: 0px;
139
148
 
140
149
  ${props => props.theme.rtl && css`
141
- margin-left: 0px;
142
- margin-right: 8px;
150
+ margin-left: 8px;
151
+ margin-right: 0px;
143
152
  `}
144
153
 
154
+ @media (min-width: 768px) {
155
+ margin-right: 0px;
156
+ margin-left: 8px;
157
+
158
+ ${props => props.theme.rtl && css`
159
+ margin-left: 0px;
160
+ margin-right: 8px;
161
+ `}
162
+ }
163
+
145
164
  @media (min-width: 576px) {
146
165
  width: 86px;
147
166
  min-width: 86px;
package/template/app.js CHANGED
@@ -369,7 +369,7 @@ export const App = () => {
369
369
  loaded && (
370
370
  <ThemeProvider theme={themeUpdated}>
371
371
  <ListenPageChanges />
372
- {!(isKioskApp && isHome) && windowSize.width > 576 && (
372
+ {!(isKioskApp && isHome) && (
373
373
  <HeaderComponent
374
374
  isHome={isHome}
375
375
  location={location}
@@ -31,8 +31,9 @@ export const ListenPageChanges = ({ children }) => {
31
31
  order_detail: '/orders/:orderId',
32
32
  checkout: '/checkout/:cartUuid',
33
33
  checkout_list: '/checkout',
34
- multi_checkout: '/multi-checkout',
35
- multi_orders: '/multi-orders',
34
+ multi_checkout: '/multi-checkout/:cartUuid',
35
+ multi_orders: '/multi-orders/:orderId',
36
+ multi_cart: '/multi-cart/:cartUuid/:cartGroup',
36
37
  business: businessUrl,
37
38
  business_slug: '/:store',
38
39
  product: productUrl,
@@ -0,0 +1,41 @@
1
+ export const orderingThemeUpdated = (theme, orderingTheme) => ({
2
+ ...theme,
3
+ ...orderingTheme?.theme,
4
+ colors: {
5
+ ...theme.colors,
6
+ ...(orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_btn_color && { primary: orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_btn_color }),
7
+ ...(orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_link_color && { links: orderingTheme?.theme?.my_products?.components?.theme_settings?.components?.style?.primary_link_color })
8
+ },
9
+ images: {
10
+ ...theme.images,
11
+ general: {
12
+ ...theme.images.general,
13
+ homeHero: orderingTheme?.theme?.homepage_view?.components?.homepage_header?.components?.image || theme.images?.general?.homeHero,
14
+ businessHero: orderingTheme?.theme?.business_listing_view?.components?.business_hero?.components?.image || theme.images?.general?.businessHero,
15
+ notFound: orderingTheme?.theme?.business_listing_view?.components?.not_found_source?.components?.image || theme.images?.general?.notFound,
16
+ emptyActiveOrders: orderingTheme?.theme?.orders?.components?.active_orders?.components?.not_found_source?.components?.image || theme.images?.general?.emptyActiveOrders,
17
+ emptyPastOrders: orderingTheme?.theme?.orders?.components?.past_orders?.components?.not_found_source?.components?.image,
18
+ notNetwork: orderingTheme?.theme?.no_internet?.components?.image || theme.images?.general?.notNetwork,
19
+ businessSignUpHero: orderingTheme?.theme?.business_signup?.components?.icon?.components?.image || theme.images?.general?.businessSignUpHero,
20
+ driverSignUpHero: orderingTheme?.theme?.driver_signup?.components?.icon?.components?.image || theme.images?.general?.driverSignUpHero
21
+ },
22
+ categories: {
23
+ ...theme.images.categories,
24
+ food: orderingTheme?.theme?.business_listing_view?.components?.categories?.components?.food?.image || theme.images.categories.categoryFood,
25
+ groceries: orderingTheme?.theme?.business_listing_view?.components?.categories?.components?.groceries?.image || theme.images.categories.categoryGroceries,
26
+ alcohol: orderingTheme?.theme?.business_listing_view?.components?.categories?.components?.alcohol?.image || theme.images.categories.categoryAlcohol,
27
+ laundry: orderingTheme?.theme?.business_listing_view?.components?.categories?.components?.laundry?.image || theme.images.categories.categoryLaundry,
28
+ all: orderingTheme?.theme?.business_listing_view?.components?.categories?.components?.all?.image || theme.images.categories.categoryAll
29
+ },
30
+ dummies: {
31
+ ...theme.images.dummies,
32
+ businessHeader: orderingTheme?.theme?.business_view?.components?.header?.components?.dummy_image || theme.images.dummies.businessHeader,
33
+ businessLogo: orderingTheme?.theme?.business_view?.components?.header?.components?.logo?.dummy_image || theme.images.dummies.businessLogo,
34
+ product: orderingTheme?.theme?.business_view?.components?.products?.components?.photo?.components?.dummy_image || theme.images.dummies.product
35
+ },
36
+ logos: {
37
+ ...theme.images.logos,
38
+ logotype: orderingTheme?.theme?.header?.components?.logo?.components?.image || theme.images.logos.logotype
39
+ }
40
+ }
41
+ })
@@ -180,5 +180,12 @@
180
180
  "keywords": "test, dummy, data",
181
181
  "robots": "index, follow",
182
182
  "canonicalUrl": ""
183
+ },
184
+ "multi_cart": {
185
+ "title": "Multi Cart",
186
+ "description": "a dummy description about this page",
187
+ "keywords": "test, dummy, data",
188
+ "robots": "index, follow",
189
+ "canonicalUrl": ""
183
190
  }
184
191
  }
@@ -3,11 +3,13 @@ import { MessagesListing } from '../../../src/themes/five/src/components/Message
3
3
 
4
4
  import { HelmetTags } from '../../components/HelmetTags'
5
5
  import { useEvent } from 'ordering-components-external'
6
+ import settings from '../../config'
6
7
 
7
8
  export const MessagesList = (props) => {
8
9
  const [events] = useEvent()
9
10
  const messageprops = {
10
11
  ...props,
12
+ franchiseId: settings?.franchiseSlug,
11
13
  onRedirectPage: (data) => events.emit('go_to_page', data)
12
14
  }
13
15
  return (
@@ -0,0 +1,24 @@
1
+ import React from 'react'
2
+ import { MultiCart as MultiCartController } from '../../../src/themes/five/src/components/MultiCart'
3
+ import { HelmetTags } from '../../components/HelmetTags'
4
+ import { useEvent } from 'ordering-components-external'
5
+ import { useParams } from 'react-router-dom'
6
+
7
+ export const MultiCart = (props) => {
8
+ const [events] = useEvent()
9
+ const { cartUuid, cartGroup } = useParams()
10
+ const multiCheckoutProps = {
11
+ ...props,
12
+ onRedirectPage: (data) => events.emit('go_to_page', data),
13
+ cartUuid,
14
+ cartGroup
15
+ }
16
+ return (
17
+ <>
18
+ <HelmetTags page='multi_cart' />
19
+ <MultiCartController {...multiCheckoutProps} />
20
+ </>
21
+ )
22
+ }
23
+
24
+ export default MultiCart