ordering-ui-react-native 0.21.49-test → 0.21.49-test-v2

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 (112) hide show
  1. package/package.json +2 -3
  2. package/themes/business/index.tsx +0 -5
  3. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +9 -2
  4. package/themes/business/src/components/FloatingButton/index.tsx +34 -31
  5. package/themes/business/src/components/MapView/index.tsx +6 -2
  6. package/themes/business/src/components/MessagesOption/index.tsx +2 -1
  7. package/themes/business/src/components/OrderDetails/Delivery.tsx +11 -6
  8. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +12 -0
  9. package/themes/business/src/components/OrderDetailsLogistic/index.tsx +6 -1
  10. package/themes/business/src/components/OrderSummary/index.tsx +3 -10
  11. package/themes/business/src/components/OrdersListManager/index.tsx +7 -2
  12. package/themes/business/src/components/OrdersOption/index.tsx +4 -0
  13. package/themes/business/src/components/PreviousOrders/OrderList.tsx +17 -12
  14. package/themes/business/src/components/PreviousOrders/index.tsx +77 -65
  15. package/themes/business/src/components/WebsocketStatus/index.tsx +171 -0
  16. package/themes/business/src/components/WebsocketStatus/styles.tsx +28 -0
  17. package/themes/kiosk/src/components/LoginForm/index.tsx +7 -4
  18. package/themes/original/index.tsx +6 -2
  19. package/themes/original/src/components/AddressForm/index.tsx +2 -2
  20. package/themes/original/src/components/AddressForm/styles.tsx +1 -1
  21. package/themes/original/src/components/AddressList/styles.tsx +4 -4
  22. package/themes/original/src/components/BusinessBasicInformation/index.tsx +2 -2
  23. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
  24. package/themes/original/src/components/BusinessInformation/index.tsx +0 -1
  25. package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
  26. package/themes/original/src/components/BusinessItemAccordion/index.tsx +11 -7
  27. package/themes/original/src/components/BusinessListingSearch/index.tsx +2 -3
  28. package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
  29. package/themes/original/src/components/BusinessPreorder/index.tsx +2 -2
  30. package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -1
  31. package/themes/original/src/components/BusinessProductsList/index.tsx +2 -2
  32. package/themes/original/src/components/BusinessProductsListing/index.tsx +12 -8
  33. package/themes/original/src/components/BusinessProductsListing/styles.tsx +2 -2
  34. package/themes/original/src/components/BusinessReviews/index.tsx +1 -1
  35. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
  36. package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -5
  37. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListFooter.tsx +69 -0
  38. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +406 -0
  39. package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListing.tsx +76 -0
  40. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +23 -403
  41. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
  42. package/themes/original/src/components/Cart/index.tsx +15 -4
  43. package/themes/original/src/components/CartContent/index.tsx +59 -38
  44. package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
  45. package/themes/original/src/components/Checkout/index.tsx +47 -9
  46. package/themes/original/src/components/Checkout/styles.tsx +17 -0
  47. package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
  48. package/themes/original/src/components/DatePicker/index.tsx +17 -0
  49. package/themes/original/src/components/DatePicker/styles.tsx +20 -0
  50. package/themes/original/src/components/Favorite/index.tsx +1 -3
  51. package/themes/original/src/components/Favorite/styles.tsx +0 -2
  52. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  53. package/themes/original/src/components/GPSButton/index.tsx +1 -1
  54. package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +8 -3
  55. package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +36 -3
  56. package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +1 -1
  57. package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +67 -4
  58. package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
  59. package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
  60. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +1 -1
  61. package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
  62. package/themes/original/src/components/Home/index.tsx +1 -1
  63. package/themes/original/src/components/LastOrder/index.tsx +2 -1
  64. package/themes/original/src/components/LastOrders/index.tsx +2 -1
  65. package/themes/original/src/components/Messages/styles.tsx +1 -1
  66. package/themes/original/src/components/MomentOption/index.tsx +3 -3
  67. package/themes/original/src/components/MultiCart/index.tsx +1 -1
  68. package/themes/original/src/components/MultiCheckout/index.tsx +140 -18
  69. package/themes/original/src/components/MultiOrdersDetails/index.tsx +1 -1
  70. package/themes/original/src/components/MyOrders/index.tsx +5 -5
  71. package/themes/original/src/components/NavBar/index.tsx +0 -1
  72. package/themes/original/src/components/NetworkError/styles.tsx +2 -2
  73. package/themes/original/src/components/Notifications/index.tsx +2 -4
  74. package/themes/original/src/components/Notifications/styles.tsx +0 -1
  75. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +1 -1
  76. package/themes/original/src/components/OrderDetails/index.tsx +709 -664
  77. package/themes/original/src/components/OrderDetails/styles.tsx +24 -7
  78. package/themes/original/src/components/OrderProgress/index.tsx +2 -1
  79. package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
  80. package/themes/original/src/components/OrderSummary/index.tsx +3 -1
  81. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +1 -1
  82. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +1 -1
  83. package/themes/original/src/components/OrdersOption/index.tsx +1 -1
  84. package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
  85. package/themes/original/src/components/PaymentOptions/index.tsx +3 -1
  86. package/themes/original/src/components/ProductForm/ActionButton.tsx +117 -0
  87. package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
  88. package/themes/original/src/components/ProductForm/index.tsx +52 -146
  89. package/themes/original/src/components/ProductItemAccordion/index.tsx +5 -0
  90. package/themes/original/src/components/ProductOptionSubOption/index.tsx +1 -1
  91. package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
  92. package/themes/original/src/components/Promotions/index.tsx +2 -3
  93. package/themes/original/src/components/Promotions/styles.tsx +0 -2
  94. package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
  95. package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
  96. package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
  97. package/themes/original/src/components/ServiceForm/index.tsx +1 -1
  98. package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
  99. package/themes/original/src/components/StripeElementsForm/index.tsx +1 -1
  100. package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
  101. package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +86 -0
  102. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -199
  103. package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
  104. package/themes/original/src/components/UserFormDetails/index.tsx +51 -4
  105. package/themes/original/src/components/UserProfile/index.tsx +1 -1
  106. package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
  107. package/themes/original/src/components/Wallets/index.tsx +1 -0
  108. package/themes/original/src/components/Wallets/styles.tsx +0 -1
  109. package/themes/original/src/components/shared/OModal.tsx +12 -14
  110. package/themes/original/src/layouts/Container.tsx +1 -1
  111. package/themes/business/src/components/StarPrinter/SearchPrinter.tsx +0 -106
  112. package/themes/business/src/components/StarPrinter/index.tsx +0 -235
@@ -92,7 +92,7 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
92
92
  },
93
93
  filterContainer: {
94
94
  maxHeight: screenHeight - 150,
95
- paddingHorizontal: 40,
95
+ paddingHorizontal: 20,
96
96
  width: '100%'
97
97
  },
98
98
  searchInput: {
@@ -259,7 +259,6 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
259
259
  display: 'flex',
260
260
  flexDirection: 'row',
261
261
  alignItems: 'center',
262
- paddingHorizontal: hideBrowse && !isChewLayout ? 40 : 20,
263
262
  }}>
264
263
  {hideBrowse && !isChewLayout && (
265
264
  <OButton
@@ -288,7 +287,7 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
288
287
  <AntDesignIcon name='filter' size={18} style={{ marginLeft: 'auto', marginTop: 55, paddingHorizontal: 20 }} onPress={() => handleOpenfilters()} />
289
288
  </View>
290
289
  <BContainer
291
- style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}
290
+ style={{ paddingHorizontal: 20 }}
292
291
  >
293
292
  <SearchWrapper>
294
293
  <SearchBar
@@ -1,7 +1,7 @@
1
1
  import styled, { css } from 'styled-components/native'
2
2
 
3
3
  export const BContainer = styled.View`
4
- padding: 20px 40px;
4
+ padding: 20px;
5
5
  `
6
6
 
7
7
  export const SearchWrapper = styled.View`
@@ -64,7 +64,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
64
64
  container: {
65
65
  height: windowHeight,
66
66
  paddingVertical: 30,
67
- paddingHorizontal: 40
67
+ paddingHorizontal: 20
68
68
  },
69
69
  businessLogo: {
70
70
  backgroundColor: 'white',
@@ -319,7 +319,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
319
319
 
320
320
  return (
321
321
  <>
322
- <PreOrderContainer contentContainerStyle={{ paddingVertical: 32, paddingHorizontal: 40 }}>
322
+ <PreOrderContainer contentContainerStyle={{ paddingVertical: 32, paddingHorizontal: 20 }}>
323
323
  <TouchableOpacity onPress={() => goToBack && goToBack()} style={{ marginBottom: 12 }}>
324
324
  <IconAntDesign
325
325
  name='close'
@@ -92,7 +92,7 @@ const BusinessProductsCategoriesUI = (props: any) => {
92
92
  ref={tabsRef}
93
93
  horizontal
94
94
  style={{ ...styles.container, borderBottomWidth: loading ? 0 : 1 }}
95
- contentContainerStyle={{ paddingHorizontal: 40 }}
95
+ contentContainerStyle={{ paddingHorizontal: 20 }}
96
96
  showsHorizontalScrollIndicator={false}
97
97
  onScroll={(e: any) => setScrollOffsetX(e.nativeEvent.contentOffset.x)}
98
98
  scrollEventThrottle={16}
@@ -106,7 +106,7 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
106
106
  <SingleProductCard
107
107
  key={'prod_' + product.id + `_${i}`}
108
108
  isSoldOut={product.inventoried && !product.quantity}
109
- enableIntersection={!isFiltMode}
109
+ // enableIntersection={!isFiltMode}
110
110
  product={product}
111
111
  businessId={businessId}
112
112
  categoryState={categoryState}
@@ -135,7 +135,7 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
135
135
  key={'feat_' + product.id + `_${i}`}
136
136
  isSoldOut={product.inventoried && !product.quantity}
137
137
  product={product}
138
- enableIntersection={!isFiltMode}
138
+ // enableIntersection={!isFiltMode}
139
139
  businessId={businessId}
140
140
  categoryState={categoryState}
141
141
  onProductClick={onProductClick}
@@ -114,7 +114,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
114
114
  },
115
115
  searchIcon: {
116
116
  borderWidth: 0,
117
- padding: 15,
117
+ padding: 10,
118
118
  justifyContent: 'center',
119
119
  shadowColor: theme.colors.clear,
120
120
  },
@@ -194,7 +194,8 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
194
194
  product: product,
195
195
  businessSlug: business.slug,
196
196
  businessId: business.id || product?.category?.business_id,
197
- productAddedToCartLength
197
+ productAddedToCartLength,
198
+ isRedirect: false
198
199
  })
199
200
  }
200
201
  events.emit('product_clicked', product)
@@ -529,9 +530,6 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
529
530
  </View>
530
531
  </FiltProductsContainer>
531
532
  )}
532
- {isOpenFiltProducts && (
533
- <BackgroundGray isIos={Platform.OS === 'ios'} />
534
- )}
535
533
  <IOScrollView
536
534
  stickyHeaderIndices={[business?.professionals?.length > 0 ? 4 : 3]}
537
535
  style={{
@@ -570,7 +568,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
570
568
  />
571
569
  </ProfessionalFilterWrapper>
572
570
  )}
573
- <PageBanner position='app_business_page' navigation={navigation} />
571
+ {businessState?.business?.id && (
572
+ <PageBanner position='app_business_page' businessId={businessState?.business?.id} navigation={navigation} />
573
+ )}
574
574
  <View
575
575
  style={{
576
576
  height: 8,
@@ -598,7 +598,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
598
598
  <>
599
599
  <WrapContent
600
600
  onLayout={(event: any) => setProductListLayout(event.nativeEvent.layout)}
601
- style={{ paddingHorizontal: isChewLayout ? 20 : 40 }}
601
+ style={{ paddingHorizontal: 20 }}
602
602
  >
603
603
  <BusinessProductsList
604
604
  categories={[
@@ -655,6 +655,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
655
655
  </WrapContent>
656
656
  </>
657
657
  )}
658
+ {isOpenFiltProducts && (
659
+ <BackgroundGray isIos={Platform.OS === 'ios'} />
660
+ )}
658
661
  </IOScrollView>
659
662
  {viewOrderButtonVisible && (
660
663
  <View style={{ marginBottom: 0 }}>
@@ -712,7 +715,6 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
712
715
  professionalList={business?.professionals}
713
716
  professionalSelected={professionalSelected}
714
717
  handleChangeProfessional={handleChangeProfessionalSelected}
715
- handleChangeProfessional={handleChangeProfessionalSelected}
716
718
  handleUpdateProfessionals={handleUpdateProfessionals}
717
719
  onSave={() => setOpenService(false)}
718
720
  onClose={() => setOpenService(false)}
@@ -726,6 +728,8 @@ export const BusinessProductsListing = (props: BusinessProductsListingParams) =>
726
728
  const businessProductslistingProps = {
727
729
  ...props,
728
730
  isForceSearch: Platform.OS === 'ios',
731
+ isApp: true,
732
+ isFetchAllProducts: true,
729
733
  UIComponent: BusinessProductsListingUI
730
734
  }
731
735
  return (
@@ -50,7 +50,7 @@ export const BackgroundGray = styled.View`
50
50
  `
51
51
 
52
52
  export const ProfessionalFilterWrapper = styled.View`
53
- padding-left: 40px;
53
+ padding-left: 20px;
54
54
  margin-bottom: 35px;
55
55
  `
56
56
 
@@ -63,6 +63,6 @@ export const NearBusiness = styled.View`
63
63
  export const TopActions = styled.TouchableOpacity`
64
64
  height: 60px;
65
65
  justify-content: center;
66
- padding-horizontal: 30px;
66
+ padding-horizontal: 20px;
67
67
  width: 100px;
68
68
  `;
@@ -109,7 +109,7 @@ const BusinessReviewsUI = (props: BusinessReviewsParams) => {
109
109
  return (
110
110
  <BusinessReviewsContainer>
111
111
  <BusinessReviewContent
112
- contentContainerStyle={{ paddingHorizontal: 40, paddingVertical: 27 }}>
112
+ contentContainerStyle={{ paddingHorizontal: 20, paddingVertical: 27 }}>
113
113
  {reviewsList.error ? (
114
114
  <OText size={16}>{t('ERROR_UNKNOWN', 'An error has ocurred')}</OText>
115
115
  ) : (
@@ -415,7 +415,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
415
415
  <ScrollView
416
416
  showsHorizontalScrollIndicator={false}
417
417
  nestedScrollEnabled
418
- horizontal contentContainerStyle={{ paddingHorizontal: 40 }}>
418
+ horizontal contentContainerStyle={{ paddingHorizontal: 20 }}>
419
419
  {featuredBusiness.map((bAry: any, idx) => (
420
420
  <View key={'f-listing_' + idx}>
421
421
  <BusinessFeaturedController
@@ -54,13 +54,13 @@ export const WrapMomentOption = styled.TouchableOpacity`
54
54
  export const HeaderWrapper = styled.ImageBackground`
55
55
  width: 100%;
56
56
  height: 370px;
57
- padding: 20px 40px;
57
+ padding: 20px;
58
58
  background-color: transparent;
59
59
  `;
60
60
 
61
61
  export const ListWrapper = styled.View`
62
62
  background-color: ${(props: any) => props.theme.colors.backgroundLight};
63
- padding-horizontal: 40px;
63
+ padding-horizontal: 20px;
64
64
  `;
65
65
 
66
66
  export const FeaturedWrapper = styled.View`
@@ -72,7 +72,7 @@ export const FeaturedWrapper = styled.View`
72
72
  export const OrderProgressWrapper = styled.View`
73
73
  margin-top: 37px;
74
74
  margin-bottom: 20px;
75
- padding-horizontal: 40px;
75
+ padding-horizontal: 20px;
76
76
  `
77
77
 
78
78
  export const FarAwayMessage = styled.View`
@@ -98,10 +98,10 @@ export const FilterWrapper = styled.View`
98
98
  `
99
99
 
100
100
  export const ServiceWrapper = styled.View`
101
- padding-horizontal: 40px;
101
+ padding-horizontal: 20px;
102
102
  `
103
103
 
104
104
  export const PriceWrapper = styled.View`
105
- padding-horizontal: 40px;
105
+ padding-horizontal: 20px;
106
106
  margin-top: 30px;
107
107
  `
@@ -0,0 +1,69 @@
1
+ import React from 'react'
2
+ import { ListWrapper } from './styles'
3
+ import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder'
4
+ import { View } from 'react-native'
5
+
6
+ export const FlatListBusinessListFooter = (props : any) => {
7
+ const {
8
+ businessesList,
9
+ paginationProps,
10
+ isChewLayout
11
+ } = props
12
+ return (
13
+ <>
14
+ <ListWrapper style={{ paddingHorizontal: 20 }}>
15
+ {(businessesList.loading || !businessesList?.fetched) && (
16
+ <>
17
+ {[
18
+ ...Array(
19
+ paginationProps.nextPageItems
20
+ ? paginationProps.nextPageItems
21
+ : 8,
22
+ ).keys(),
23
+ ].map((item, i) => (
24
+ <Placeholder
25
+ Animation={Fade}
26
+ key={i}
27
+ style={{ marginBottom: 20 }}>
28
+ <View style={{ width: '100%' }}>
29
+ <PlaceholderLine
30
+ height={200}
31
+ style={{ marginBottom: 20, borderRadius: 25 }}
32
+ />
33
+ <View style={{ paddingHorizontal: 10 }}>
34
+ <View
35
+ style={{
36
+ flexDirection: 'row',
37
+ justifyContent: 'space-between',
38
+ }}>
39
+ <PlaceholderLine
40
+ height={25}
41
+ width={40}
42
+ style={{ marginBottom: 10 }}
43
+ />
44
+ <PlaceholderLine
45
+ height={25}
46
+ width={20}
47
+ style={{ marginBottom: 10 }}
48
+ />
49
+ </View>
50
+ <PlaceholderLine
51
+ height={20}
52
+ width={30}
53
+ style={{ marginBottom: 10 }}
54
+ />
55
+ <PlaceholderLine
56
+ height={20}
57
+ width={80}
58
+ style={{ marginBottom: 10 }}
59
+ />
60
+ </View>
61
+ </View>
62
+ </Placeholder>
63
+ ))}
64
+ </>
65
+ )}
66
+ </ListWrapper>
67
+ </>
68
+ )
69
+ }