ordering-ui-react-native 0.15.31 → 0.15.34

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 (30) hide show
  1. package/package.json +1 -1
  2. package/themes/kiosk/src/components/Cart/index.tsx +1 -1
  3. package/themes/kiosk/src/components/CartBottomSheet/index.tsx +1 -1
  4. package/themes/kiosk/src/components/CartBottomSheet/styles.tsx +1 -1
  5. package/themes/kiosk/src/components/CartContent/index.tsx +13 -3
  6. package/themes/kiosk/src/components/CartItem/index.tsx +20 -8
  7. package/themes/kiosk/src/components/CustomerName/index.tsx +7 -2
  8. package/themes/kiosk/src/components/Intro/index.tsx +13 -13
  9. package/themes/kiosk/src/components/OrderDetails/index.tsx +2 -2
  10. package/themes/kiosk/src/components/OrderSummary/index.tsx +1 -1
  11. package/themes/kiosk/src/components/ProductForm/index.tsx +172 -123
  12. package/themes/kiosk/src/components/ProductForm/styles.tsx +1 -1
  13. package/themes/kiosk/src/components/ProductOption/index.tsx +1 -0
  14. package/themes/kiosk/src/components/ProductOption/styles.tsx +1 -0
  15. package/themes/kiosk/src/components/UpsellingProducts/index.tsx +48 -34
  16. package/themes/original/src/components/BusinessController/index.tsx +25 -17
  17. package/themes/original/src/components/BusinessProductsList/index.tsx +1 -1
  18. package/themes/original/src/components/BusinessProductsListing/index.tsx +1 -0
  19. package/themes/original/src/components/BusinessesListing/index.tsx +16 -30
  20. package/themes/original/src/components/Checkout/index.tsx +2 -2
  21. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +97 -89
  22. package/themes/original/src/components/Messages/index.tsx +28 -24
  23. package/themes/original/src/components/OrderProgress/index.tsx +1 -1
  24. package/themes/original/src/components/OrdersOption/index.tsx +2 -2
  25. package/themes/original/src/components/PreviousOrders/index.tsx +1 -1
  26. package/themes/original/src/components/ProductForm/styles.tsx +2 -1
  27. package/themes/original/src/components/ReviewOrder/index.tsx +10 -9
  28. package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
  29. package/themes/original/src/components/UserProfile/index.tsx +4 -6
  30. package/themes/original/src/types/index.tsx +9 -1
@@ -43,7 +43,7 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
43
43
  logoWrapper: {
44
44
  shadowColor: theme.colors.black,
45
45
  shadowRadius: 3,
46
- shadowOffset: {width: 1, height: 4},
46
+ shadowOffset: { width: 1, height: 4 },
47
47
  elevation: 3,
48
48
  borderRadius: 8,
49
49
  shadowOpacity: 0.1,
@@ -108,11 +108,11 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
108
108
  }
109
109
 
110
110
  const qualificationList = [
111
- { key: 1, text: t('TERRIBLE', 'Terrible'), percent: 0, parentStyle: { left: '0%' }, isInnerStyle: false, pointerColor: false },
111
+ { key: 1, text: t('TERRIBLE', 'Terrible'), percent: 0, parentStyle: { left: '0%' }, isInnerStyle: false, pointerColor: false },
112
112
  { key: 2, text: t('BAD', 'Bad'), percent: 0.25, parentStyle: { left: '25%' }, isInnerStyle: true, pointerColor: true },
113
113
  { key: 3, text: t('OKAY', 'Okay'), percent: 0.5, parentStyle: { left: '50%' }, isInnerStyle: true, pointerColor: true },
114
114
  { key: 4, text: t('GOOD', 'Good'), percent: 0.75, parentStyle: { left: '75%' }, isInnerStyle: true, pointerColor: true },
115
- { key: 5, text: t('GREAT', 'Great'), percent: 1, parentStyle: { right: '0%' }, isInnerStyle: false, pointerColor: false }
115
+ { key: 5, text: t('GREAT', 'Great'), percent: 1, parentStyle: { right: '0%' }, isInnerStyle: false, pointerColor: false }
116
116
  ]
117
117
 
118
118
  const commentsList = reviewCommentList('order')
@@ -137,7 +137,7 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
137
137
  return found
138
138
  }
139
139
 
140
- const handleContinueClick = () => {
140
+ const handleContinueClick = () => {
141
141
  if (!order?.review) {
142
142
  onSubmit()
143
143
  } else {
@@ -183,7 +183,7 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
183
183
  comments.map(comment => _comments += comment.content + '. ')
184
184
  }
185
185
  let _comment
186
- _comment = _comments + extraComment
186
+ _comment = _comments + extraComment
187
187
  setStars({ ...stars, comments: _comment })
188
188
  }, [comments, extraComment])
189
189
 
@@ -214,7 +214,7 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
214
214
  <OText color={theme.colors.primary}>{t('ORDER_REVIEWED', 'This order has been already reviewed')}</OText>
215
215
  </View>
216
216
  ) : (
217
- <View style={{flex: 1, justifyContent: 'flex-end'}}>
217
+ <View style={{ flex: 1, justifyContent: 'flex-end' }}>
218
218
  <FormReviews>
219
219
  <OText mBottom={13} color={theme.colors.textNormal}>{t('HOW_WAS_YOUR_ORDER', 'How was your order?')}</OText>
220
220
  <RatingBarContainer>
@@ -266,7 +266,7 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
266
266
  style={{ height: 35, paddingLeft: 5, paddingRight: 5, marginHorizontal: 3, marginVertical: 10 }}
267
267
  imgRightSrc={isSelectedComment(commentItem.key) ? theme.images.general.close : null}
268
268
  imgRightStyle={{ tintColor: theme.colors.white, right: 5, margin: 5 }}
269
- onClick={() => handleChangeComment(commentItem) }
269
+ onClick={() => handleChangeComment(commentItem)}
270
270
  />
271
271
  ))}
272
272
  </CommentsButtonGroup>
@@ -304,7 +304,7 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
304
304
  textStyle={{ color: theme.colors.white, paddingRight: 10 }}
305
305
  text={t('CONTINUE', 'Continue')}
306
306
  style={{ borderRadius: 8 }}
307
- imgRightSrc={theme.images.general.arrow_right}
307
+ imgRightSrc={theme.images.general.arrow_right}
308
308
  imgRightStyle={{ tintColor: theme.colors.white, right: 5, margin: 5 }}
309
309
  onClick={handleSubmit(handleContinueClick)}
310
310
  />
@@ -317,7 +317,8 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
317
317
  export const ReviewOrder = (props: ReviewOrderParams) => {
318
318
  const reviewOrderProps = {
319
319
  ...props,
320
- UIComponent: ReviewOrderUI
320
+ UIComponent: ReviewOrderUI,
321
+ defaultStar: 5
321
322
  }
322
323
  return <ReviewOrderController {...reviewOrderProps} />
323
324
  }
@@ -74,7 +74,7 @@ const ReviewProductsUI = (props: ReviewProductParams) => {
74
74
  titleWrapStyle={{ paddingHorizontal: 0 }}
75
75
  titleStyle={{ marginRight: 0, marginLeft: 0 }}
76
76
  />
77
- {order?.products.map((product: any) => (
77
+ {order?.products?.map((product: any) => (
78
78
  <SingleProductReview
79
79
  key={product.id}
80
80
  product={product}
@@ -141,8 +141,8 @@ const ProfileListUI = (props: ProfileParams) => {
141
141
  {t('PROFILE', 'Profile')}
142
142
  </OText>
143
143
  <CenterView style={styles.pagePadding}>
144
- <View style={styles.photo}>
145
- {user?.photo ? (
144
+ {user?.photo && (
145
+ <View style={styles.photo}>
146
146
  <FastImage
147
147
  style={{ height: 60, width: 60, borderRadius: 8 }}
148
148
  source={{
@@ -151,10 +151,8 @@ const ProfileListUI = (props: ProfileParams) => {
151
151
  }}
152
152
  resizeMode={FastImage.resizeMode.cover}
153
153
  />
154
- ) : (
155
- <Ionicons name='person-outline' size={50} style={{ marginRight: 10 }} />
156
- )}
157
- </View>
154
+ </View>
155
+ )}
158
156
  <View style={{ flexBasis: '70%' }}>
159
157
  <OText size={20} lineHeight={30} weight={Platform.OS === 'ios' ? '500' : 'bold'} color={theme.colors.textNormal}>{user?.name} {user?.lastname}</OText>
160
158
  <TouchableOpacity onPress={() => navigation.navigate('ProfileForm', { ...detailProps })}>
@@ -166,7 +166,15 @@ export interface BusinessControllerParams {
166
166
  businessWillCloseSoonMinutes?: number
167
167
  isBusinessClose?: number,
168
168
  navigation?: any,
169
- style?: ViewStyle
169
+ style?: ViewStyle,
170
+ businessHeader?: string,
171
+ businessFeatured?: boolean,
172
+ businessLogo?: string,
173
+ businessReviews?: any,
174
+ businessDeliveryPrice?: number,
175
+ businessDeliveryTime?: string,
176
+ businessPickupTime?: string,
177
+ businessDistance?: number
170
178
  }
171
179
  export interface BusinessProductsListingParams {
172
180
  navigation?: any;