ordering-ui-external 14.1.8 → 14.1.10

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 (59) hide show
  1. package/_bundles/{7.ordering-ui.8668ba2c7ba56b89cbdd.js → 7.ordering-ui.8deae335e250e653c308.js} +1 -1
  2. package/_bundles/ordering-ui.8deae335e250e653c308.js +2 -0
  3. package/_modules/themes/callcenterOriginal/src/components/AddressForm/index.js +27 -10
  4. package/_modules/themes/callcenterOriginal/src/components/AddressForm/styles.js +3 -5
  5. package/_modules/themes/callcenterOriginal/src/components/AddressList/index.js +1 -4
  6. package/_modules/themes/callcenterOriginal/src/components/AddressList/styles.js +1 -1
  7. package/_modules/themes/callcenterOriginal/src/components/Header/index.js +0 -1
  8. package/_modules/themes/callcenterOriginal/src/components/Header/styles.js +4 -4
  9. package/_modules/themes/callcenterOriginal/src/components/InputPhoneNumber/styles.js +1 -1
  10. package/_modules/themes/callcenterOriginal/src/components/OrderTypeSelectorHeader/styles.js +1 -1
  11. package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +20 -18
  12. package/_modules/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +20 -18
  13. package/_modules/themes/five/src/components/BusinessPreorder/index.js +3 -1
  14. package/_modules/themes/five/src/components/BusinessPreorder/styles.js +3 -3
  15. package/_modules/themes/five/src/components/Cart/index.js +1 -1
  16. package/_modules/themes/five/src/components/Cart/styles.js +5 -2
  17. package/_modules/themes/five/src/components/Checkout/index.js +1 -1
  18. package/_modules/themes/five/src/components/Checkout/styles.js +5 -4
  19. package/_modules/themes/five/src/components/MomentControl/index.js +3 -1
  20. package/_modules/themes/five/src/components/MomentControl/styles.js +3 -3
  21. package/_modules/themes/five/src/components/OrderDetails/index.js +12 -5
  22. package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +6 -5
  23. package/_modules/themes/five/src/components/UserFormDetails/index.js +5 -5
  24. package/package.json +2 -2
  25. package/src/themes/callcenterOriginal/src/components/AddressForm/index.js +46 -17
  26. package/src/themes/callcenterOriginal/src/components/AddressForm/styles.js +5 -6
  27. package/src/themes/callcenterOriginal/src/components/AddressList/index.js +5 -4
  28. package/src/themes/callcenterOriginal/src/components/AddressList/styles.js +1 -1
  29. package/src/themes/callcenterOriginal/src/components/Header/index.js +0 -2
  30. package/src/themes/callcenterOriginal/src/components/Header/styles.js +6 -6
  31. package/src/themes/callcenterOriginal/src/components/InputPhoneNumber/styles.js +1 -1
  32. package/src/themes/callcenterOriginal/src/components/OrderTypeSelectorHeader/styles.js +0 -1
  33. package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/index.js +14 -16
  34. package/src/themes/callcenterOriginal/src/components/PhoneAutocomplete/styles.js +10 -6
  35. package/src/themes/five/src/components/BusinessPreorder/index.js +1 -1
  36. package/src/themes/five/src/components/BusinessPreorder/styles.js +9 -4
  37. package/src/themes/five/src/components/Cart/index.js +7 -1
  38. package/src/themes/five/src/components/Cart/styles.js +6 -0
  39. package/src/themes/five/src/components/Checkout/index.js +19 -19
  40. package/src/themes/five/src/components/Checkout/styles.js +8 -0
  41. package/src/themes/five/src/components/FavoriteList/index.js +9 -8
  42. package/src/themes/five/src/components/FavoriteList/styles.js +1 -0
  43. package/src/themes/five/src/components/MomentControl/index.js +1 -1
  44. package/src/themes/five/src/components/MomentControl/styles.js +9 -4
  45. package/src/themes/five/src/components/OrderDetails/index.js +38 -3
  46. package/src/themes/five/src/components/ProductOptionSubOption/index.js +2 -1
  47. package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +1 -1
  48. package/src/themes/five/src/components/UserFormDetails/index.js +2 -4
  49. package/_bundles/ordering-ui.8668ba2c7ba56b89cbdd.js +0 -2
  50. /package/_bundles/{0.ordering-ui.8668ba2c7ba56b89cbdd.js → 0.ordering-ui.8deae335e250e653c308.js} +0 -0
  51. /package/_bundles/{1.ordering-ui.8668ba2c7ba56b89cbdd.js → 1.ordering-ui.8deae335e250e653c308.js} +0 -0
  52. /package/_bundles/{2.ordering-ui.8668ba2c7ba56b89cbdd.js → 2.ordering-ui.8deae335e250e653c308.js} +0 -0
  53. /package/_bundles/{4.ordering-ui.8668ba2c7ba56b89cbdd.js → 4.ordering-ui.8deae335e250e653c308.js} +0 -0
  54. /package/_bundles/{5.ordering-ui.8668ba2c7ba56b89cbdd.js → 5.ordering-ui.8deae335e250e653c308.js} +0 -0
  55. /package/_bundles/{6.ordering-ui.8668ba2c7ba56b89cbdd.js → 6.ordering-ui.8deae335e250e653c308.js} +0 -0
  56. /package/_bundles/{7.ordering-ui.8668ba2c7ba56b89cbdd.js.LICENSE.txt → 7.ordering-ui.8deae335e250e653c308.js.LICENSE.txt} +0 -0
  57. /package/_bundles/{8.ordering-ui.8668ba2c7ba56b89cbdd.js → 8.ordering-ui.8deae335e250e653c308.js} +0 -0
  58. /package/_bundles/{9.ordering-ui.8668ba2c7ba56b89cbdd.js → 9.ordering-ui.8deae335e250e653c308.js} +0 -0
  59. /package/_bundles/{ordering-ui.8668ba2c7ba56b89cbdd.js.LICENSE.txt → ordering-ui.8deae335e250e653c308.js.LICENSE.txt} +0 -0
@@ -156,6 +156,11 @@ export const TimeItem = styled.div`
156
156
  span {
157
157
  font-size: 14px;
158
158
  white-space: nowrap;
159
+
160
+ p#time {
161
+ margin: auto;
162
+ padding: 10px;
163
+ }
159
164
  }
160
165
  ${({ active }) => active && css`
161
166
  background: #F5F9FF;
@@ -166,7 +171,7 @@ ${({ cateringPreorder }) => cateringPreorder ? css`
166
171
  width: 100%;
167
172
  min-width: 100%;
168
173
  height: 50px;
169
-
174
+
170
175
  span {
171
176
  font-size: 18px;
172
177
  display: flex;
@@ -199,17 +204,17 @@ ${({ cateringPreorder }) => cateringPreorder ? css`
199
204
  min-width: calc(50% - 24px);
200
205
  box-sizing: border-box;
201
206
  user-select: none;
202
-
207
+
203
208
  @media (min-width: 400px) {
204
209
  width: calc(33.33% - 24px);
205
210
  min-width: calc(33.33% - 24px);
206
211
  }
207
-
212
+
208
213
  @media (min-width: 576px) {
209
214
  width: calc(25% - 24px);
210
215
  min-width: calc(25% - 24px);
211
216
  }
212
-
217
+
213
218
  @media (min-width: 769px) {
214
219
  width: calc(33.33% - 24px);
215
220
  min-width: calc(33.33% - 24px);
@@ -39,7 +39,8 @@ import {
39
39
  IconContainer,
40
40
  NoValidProductMessage,
41
41
  DriverTipContainer,
42
- SpinnerCart
42
+ SpinnerCart,
43
+ WarningText
43
44
  } from './styles'
44
45
  import { getCateringValues, verifyDecimals } from '../../../../../utils'
45
46
  import BsInfoCircle from '@meronex/icons/bs/BsInfoCircle'
@@ -660,6 +661,11 @@ const CartUI = (props) => {
660
661
  />
661
662
  </div>
662
663
  )}
664
+ {!cart?.valid_address && cart?.status !== 2 && !isCheckout && (
665
+ <WarningText>
666
+ {t('INVALID_CART_ADDRESS', 'Selected address is invalid, please select a closer address.')}
667
+ </WarningText>
668
+ )}
663
669
  {(onClickCheckout || isForceOpenCart) && !isCheckout && cart?.valid && (!isMultiCheckout || isStore || !cart?.business_id) && (
664
670
  <CheckoutAction>
665
671
  <p>{cart?.total >= 1 && parsePrice(cart?.total)}</p>
@@ -244,3 +244,9 @@ export const SpinnerCart = styled.div`
244
244
  top: 0;
245
245
  `}
246
246
  `
247
+
248
+ export const WarningText = styled.p`
249
+ margin: 10px auto;
250
+ text-align: center;
251
+ color: ${props => props.theme.colors.primary};
252
+ `
@@ -136,7 +136,7 @@ const CheckoutUI = (props) => {
136
136
 
137
137
  const shouldActivateOrderDetailModal = ordering?.project?.includes('alsea')
138
138
  const cardsMethods = ['stripe', 'credomatic']
139
- const stripePaymethods = ['stripe', 'stripe_direct', 'stripe_connect', 'stripe_redirect']
139
+ const stripePaymethods = ['stripe', 'stripe_connect', 'stripe_redirect']
140
140
  const businessConfigs = businessDetails?.business?.configs ?? []
141
141
  const isTableNumberEnabled = configs?.table_numer_enabled?.value
142
142
  const isWalletCashEnabled = businessConfigs.find(config => config.key === 'wallet_cash_enabled')?.value === '1'
@@ -594,24 +594,24 @@ const CheckoutUI = (props) => {
594
594
 
595
595
  {
596
596
  !!(!isMultiDriverTips && driverTipsField) &&
597
- <>
598
- <DriverTipContainer>
599
- <h1>{t('DRIVER_TIPS', 'Driver Tips')}</h1>
600
- <p>{t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')}</p>
601
- <DriverTips
602
- businessId={cart?.business_id}
603
- driverTipsOptions={driverTipsOptions}
604
- isFixedPrice={parseInt(configs?.driver_tip_type?.value, 10) === 1}
605
- isDriverTipUseCustom={!!parseInt(configs?.driver_tip_use_custom?.value, 10)}
606
- driverTip={parseInt(configs?.driver_tip_type?.value, 10) === 1
607
- ? cart?.driver_tip
608
- : cart?.driver_tip_rate}
609
- cart={cart}
610
- useOrderContext
611
- />
612
- </DriverTipContainer>
613
- <DriverTipDivider />
614
- </>
597
+ <>
598
+ <DriverTipContainer>
599
+ <h1>{t('DRIVER_TIPS', 'Driver Tips')}</h1>
600
+ <p>{t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')}</p>
601
+ <DriverTips
602
+ businessId={cart?.business_id}
603
+ driverTipsOptions={driverTipsOptions}
604
+ isFixedPrice={parseInt(configs?.driver_tip_type?.value, 10) === 1}
605
+ isDriverTipUseCustom={!!parseInt(configs?.driver_tip_use_custom?.value, 10)}
606
+ driverTip={parseInt(configs?.driver_tip_type?.value, 10) === 1
607
+ ? cart?.driver_tip
608
+ : cart?.driver_tip_rate}
609
+ cart={cart}
610
+ useOrderContext
611
+ />
612
+ </DriverTipContainer>
613
+ <DriverTipDivider />
614
+ </>
615
615
  }
616
616
  {!cartState.loading && placeSpotsEnabled && cart?.business_id && (
617
617
  <SelectSpotContainer>
@@ -95,6 +95,7 @@ export const DriverTipContainer = styled(PaymentMethodContainer)`
95
95
 
96
96
  export const CartContainer = styled(PaymentMethodContainer)`
97
97
  margin-bottom: 20px;
98
+ position: relative;
98
99
  `
99
100
 
100
101
  export const WalletPaymentOptionContainer = styled(PaymentMethodContainer)`
@@ -378,3 +379,10 @@ export const OrderDetailContainer = styled.div`
378
379
  flex-direction: column;
379
380
  padding: 10px 30px 20px;
380
381
  `
382
+
383
+ export const SpinnerContainer = styled.div`
384
+ position: absolute;
385
+ width: 100%;
386
+ left: 0;
387
+ top: -100%;
388
+ `
@@ -363,18 +363,19 @@ const FavoriteListUI = (props) => {
363
363
  <FavPopupView>
364
364
  {(favProduct?.images) && (
365
365
  <Image>
366
- <img src={favProduct.images} alt={`product-${i}`} width='150px' height='150px' loading='lazy' />
366
+ <img src={favProduct.images} alt={`product-${i}`} width='150px' height='150px' loading='lazy' />
367
367
  </Image>
368
- )}
369
- <h2>
370
- {favProduct?.name}
371
- </h2>
372
- <h2>
373
- {favProduct?.businesses && favProduct?.businesses?.length > 1
368
+ )}
369
+ <h2>
370
+ {favProduct?.name}
371
+ </h2>
372
+ <h2>
373
+ { favProduct?.businesses && favProduct?.businesses?.length > 1
374
374
  ? t('AVAILABLE_BUSINESSES_FOR_PRODUCT', 'Available businesses for this product')
375
375
  : favProduct?.businesses && favProduct?.businesses?.length == 1
376
376
  ? t('AVAILABLE_BUSINESSE_FOR_PRODUCT', 'Available business for this product')
377
- : t('NOT_AVAILABLE_BUSINESSE', 'Business is not available for this product')}
377
+ : t('NOT_AVAILABLE_BUSINESSE', 'Business is not available for this product')
378
+ }
378
379
  </h2>
379
380
  <div>
380
381
  {favProduct?.businesses?.map(business => {
@@ -168,3 +168,4 @@ export const BusinessLogo = (props) => {
168
168
  </BusinessLogoStyled>
169
169
  )
170
170
  }
171
+
@@ -346,7 +346,7 @@ const MomentControlUI = (props) => {
346
346
  {timeSelected === time.value ? <CheckedIcon ref={scheduleItemRef} cateringPreorder={cateringPreorder} /> : <CgRadioCheck />}
347
347
  </CheckIcon>
348
348
  )}
349
- <p>
349
+ <p id='time'>
350
350
  {time.text} {cateringPreorder && `- ${time.endText}`}
351
351
  </p>
352
352
  </span>
@@ -225,6 +225,11 @@ export const TimeItem = styled.div`
225
225
  span {
226
226
  font-size: 14px;
227
227
  white-space: nowrap;
228
+
229
+ p#time {
230
+ margin: auto;
231
+ padding: 10px;
232
+ }
228
233
  }
229
234
  ${({ active }) => active && css`
230
235
  background: #F5F9FF;
@@ -235,7 +240,7 @@ ${({ cateringPreorder }) => cateringPreorder ? css`
235
240
  width: 100%;
236
241
  min-width: 100%;
237
242
  height: 50px;
238
-
243
+
239
244
  span {
240
245
  font-size: 18px;
241
246
  display: flex;
@@ -268,17 +273,17 @@ ${({ cateringPreorder }) => cateringPreorder ? css`
268
273
  min-width: calc(50% - 24px);
269
274
  box-sizing: border-box;
270
275
  user-select: none;
271
-
276
+
272
277
  @media (min-width: 400px) {
273
278
  width: calc(33.33% - 24px);
274
279
  min-width: calc(33.33% - 24px);
275
280
  }
276
-
281
+
277
282
  @media (min-width: 576px) {
278
283
  width: calc(25% - 24px);
279
284
  min-width: calc(25% - 24px);
280
285
  }
281
-
286
+
282
287
  @media (min-width: 769px) {
283
288
  width: calc(33.33% - 24px);
284
289
  min-width: calc(33.33% - 24px);
@@ -100,7 +100,8 @@ const OrderDetailsUI = (props) => {
100
100
  reorderState,
101
101
  handleReorder,
102
102
  orderTypes,
103
- handleRemoveCart
103
+ handleRemoveCart,
104
+ hideStaticMap
104
105
  } = props
105
106
  const [, t] = useLanguage()
106
107
  const [{ configs }] = useConfig()
@@ -183,8 +184,8 @@ const OrderDetailsUI = (props) => {
183
184
  }
184
185
  try {
185
186
  const image = new Image()
187
+ image.onload = resolve
186
188
  image.src = src
187
- image.complete ? resolve(true) : resolve(false)
188
189
  } catch (err) {
189
190
  resolve(false)
190
191
  }
@@ -521,7 +522,7 @@ const OrderDetailsUI = (props) => {
521
522
  </>
522
523
  )}
523
524
  </OrderInfo>
524
- {!isGiftCardOrder && (
525
+ {!isGiftCardOrder && !hideStaticMap && (
525
526
  <OrderBusiness>
526
527
  <BusinessExternalWrapper>
527
528
  <BusinessWrapper
@@ -640,6 +641,40 @@ const OrderDetailsUI = (props) => {
640
641
  }
641
642
  />
642
643
  )}
644
+ {hideStaticMap && (
645
+ <OrderCustomer>
646
+ <WrapperDriver>
647
+ {isShowBusinessLogo && order?.business?.logo && (
648
+ <PhotoBlock src={order?.business?.logo} />
649
+ )}
650
+ <div>
651
+ <p>{order?.business?.name}</p>
652
+ <ActionsSection
653
+ {...ActionsSectionProps}
654
+ actionType='business'
655
+ showPhone={!hideBusinessPhone}
656
+ showMessages={!hideBusinessMessages}
657
+ />
658
+ {!hideBusinessEmail && (
659
+ <p>{order?.business?.email}</p>
660
+ )}
661
+ {!hideBusinessPhone && (
662
+ <p>{order?.business?.cellphone}</p>
663
+ )}
664
+ {!hideBusinessAddress && (
665
+ <p>{order?.business?.address}</p>
666
+ )}
667
+ {order?.place?.name && (
668
+ <PlaceSpotSection>
669
+ <p>
670
+ {yourSpotString}: {order?.place?.name}
671
+ </p>
672
+ </PlaceSpotSection>
673
+ )}
674
+ </div>
675
+ </WrapperDriver>
676
+ </OrderCustomer>
677
+ )}
643
678
  <OrderCustomer>
644
679
  <WrapperDriver>
645
680
  {!hideCustomerPhoto && order?.customer?.photo && (
@@ -60,6 +60,7 @@ const ProductOptionSubOptionUI = React.memo((props) => {
60
60
  ? (balance === option?.max || state.quantity === suboption.max)
61
61
  : state.quantity === suboption?.max || (!state.selected && balance === option?.max)
62
62
 
63
+ const quesoYSalsa = option?.name?.toLowerCase?.() === 'queso y salsa'
63
64
  const price = option?.with_half_option && suboption?.half_price && state.position !== 'whole' ? suboption?.half_price : suboption?.price
64
65
  const [, t] = useLanguage()
65
66
  const [{ parsePrice }] = useUtils()
@@ -187,7 +188,7 @@ const ProductOptionSubOptionUI = React.memo((props) => {
187
188
  )
188
189
  }
189
190
  </PositionControl>
190
- {option?.with_half_option && state?.selected && isAlsea && (
191
+ {(option?.with_half_option || quesoYSalsa) && state?.selected && isAlsea && (
191
192
  <ExtraControl>
192
193
  {(state.quantity >= 2) ? (
193
194
  <ExtraItem
@@ -192,7 +192,7 @@ const SingleProductCardUI = React.memo((props) => {
192
192
  <WrapTags>
193
193
  {product?.tags.map((tag, i) => (
194
194
  <div key={i}>
195
- <img src={tag.image ?? ''} />
195
+ <img src={tag.image ?? ''}></img>
196
196
  </div>
197
197
  ))}
198
198
  </WrapTags>
@@ -135,15 +135,13 @@ export const UserFormDetailsUI = (props) => {
135
135
 
136
136
  const onSubmit = () => {
137
137
  const isPhoneNumberValid = userPhoneNumber && showInputPhoneNumber ? isValidPhoneNumber : true
138
- const requiredPhone = (user?.guest_id && requiredFields?.includes?.('cellphone')) || (validationFields?.fields?.checkout?.cellphone?.enabled && validationFields?.fields?.checkout?.cellphone?.required)
138
+ const requiredPhone = (user?.guest_id && requiredFields?.includes?.('cellphone')) || (validationFields?.fields?.checkout?.cellphone?.enabled && validationFields?.fields?.checkout?.cellphone?.required && !user?.guest_id)
139
139
  const content = []
140
140
  if (requiredFields?.includes?.('birthdate') && !birthdate) {
141
141
  content.push(t('VALIDATION_ERROR_BIRTHDATE_REQUIRED', 'Birthdate is required'))
142
142
  }
143
143
  if (!userPhoneNumber &&
144
- ((validationFields?.fields?.checkout?.cellphone?.enabled &&
145
- validationFields?.fields?.checkout?.cellphone?.required) ||
146
- configs?.verification_phone_required?.value === '1')
144
+ (requiredPhone || (configs?.verification_phone_required?.value === '1'))
147
145
  ) {
148
146
  content.push(t('VALIDATION_ERROR_MOBILE_PHONE_REQUIRED', 'The field Phone Number is required.'))
149
147
  setAlertState({