ordering-ui-react-native 0.15.73-release → 0.15.74-release

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.15.73-release",
3
+ "version": "0.15.74-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -136,7 +136,7 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
136
136
  <SingleProductCard
137
137
  key={'prod_' + product.id + `_${i}`}
138
138
  isSoldOut={product.inventoried && !product.quantity}
139
- enableIntersection
139
+ enableIntersection={!isFiltMode}
140
140
  product={product}
141
141
  businessId={businessId}
142
142
  categoryState={categoryState}
@@ -164,7 +164,7 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
164
164
  key={'feat_' + product.id + `_${i}`}
165
165
  isSoldOut={product.inventoried && !product.quantity}
166
166
  product={product}
167
- enableIntersection
167
+ enableIntersection={!isFiltMode}
168
168
  businessId={businessId}
169
169
  categoryState={categoryState}
170
170
  onProductClick={onProductClick}
@@ -257,7 +257,7 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
257
257
  {products.sort((a: any, b: any) => a.rank - b.rank).map((product: any, i: any) => (
258
258
  <SingleProductCard
259
259
  key={`${product?.id}_${i}`}
260
- enableIntersection
260
+ enableIntersection={!isFiltMode}
261
261
  isSoldOut={product.inventoried && !product.quantity}
262
262
  businessId={businessId}
263
263
  product={product}
@@ -127,7 +127,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
127
127
  const isCheckoutMultiBusinessEnabled: Boolean = configs?.checkout_multi_business_enabled?.value === '1'
128
128
  const currentCart: any = Object.values(orderState.carts).find((cart: any) => cart?.business?.slug === business?.slug) ?? {}
129
129
  const isOpenFiltProducts = isOpenSearchBar && !!searchValue
130
- const filtProductsHeight = Platform.OS === 'ios' ? 0 : 35
130
+ const filtProductsHeight = Platform.OS === 'ios' ? 0 : 100
131
131
  const onRedirect = (route: string, params?: any) => {
132
132
  navigation.navigate(route, params)
133
133
  }
@@ -246,7 +246,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
246
246
  <TopHeader isIos={Platform.OS === 'ios'}>
247
247
  {!isOpenSearchBar && (
248
248
  <>
249
- <View style={{ ...styles.headerItem, flex: 1 }}>
249
+ <View style={{ ...styles.headerItem, width: 175 }}>
250
250
  <OButton
251
251
  imgLeftSrc={theme.images.general.arrow_left}
252
252
  imgRightSrc={null}
@@ -353,7 +353,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
353
353
  <BackgroundGray />
354
354
  )}
355
355
  <IOScrollView
356
- stickyHeaderIndices={[2]}
356
+ stickyHeaderIndices={[business?.professionals?.length > 0 ? 3 : 2]}
357
357
  style={{
358
358
  ...styles.mainContainer,
359
359
  marginBottom: currentCart?.products?.length > 0 && categoryState.products.length !== 0 ?
@@ -395,26 +395,21 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
395
395
  marginTop: isChewLayout && showLogo ? 10 : 0
396
396
  }}
397
397
  />
398
- {!loading && business?.id && (
399
- <>
400
- {!(business?.categories?.length === 0) && (
401
- <BusinessProductsCategories
402
- categories={[{ id: null, name: t('ALL', 'All') }, { id: 'featured', name: t('FEATURED', 'Featured') }, ...business?.categories.sort((a: any, b: any) => a.rank - b.rank)]}
403
- categorySelected={categorySelected}
404
- onClickCategory={handleChangeCategory}
405
- featured={featuredProducts}
406
- openBusinessInformation={openBusinessInformation}
407
- scrollViewRef={scrollViewRef}
408
- productListLayout={productListLayout}
409
- categoriesLayout={categoriesLayout}
410
- selectedCategoryId={selectedCategoryId}
411
- lazyLoadProductsRecommended={business?.lazy_load_products_recommended}
412
- setSelectedCategoryId={setSelectedCategoryId}
413
- setCategoryClicked={setCategoryClicked}
414
-
415
- />
416
- )}
417
- </>
398
+ {!loading && business?.id && !(business?.categories?.length === 0) && (
399
+ <BusinessProductsCategories
400
+ categories={[{ id: null, name: t('ALL', 'All') }, { id: 'featured', name: t('FEATURED', 'Featured') }, ...business?.categories.sort((a: any, b: any) => a.rank - b.rank)]}
401
+ categorySelected={categorySelected}
402
+ onClickCategory={handleChangeCategory}
403
+ featured={featuredProducts}
404
+ openBusinessInformation={openBusinessInformation}
405
+ scrollViewRef={scrollViewRef}
406
+ productListLayout={productListLayout}
407
+ categoriesLayout={categoriesLayout}
408
+ selectedCategoryId={selectedCategoryId}
409
+ lazyLoadProductsRecommended={business?.lazy_load_products_recommended}
410
+ setSelectedCategoryId={setSelectedCategoryId}
411
+ setCategoryClicked={setCategoryClicked}
412
+ />
418
413
  )}
419
414
  {!loading && business?.id && (
420
415
  <>
@@ -445,9 +445,9 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
445
445
  </View>
446
446
  {!isChewLayout ? (
447
447
  <HeaderWrapper
448
- source={theme.images.general.homeHero}
448
+ source={theme.images.backgrounds.business_list_header}
449
449
  style={{ paddingTop: top + 20 }}
450
- resizeMode='stretch'
450
+ resizeMode='cover'
451
451
  >
452
452
  {!auth && (
453
453
  <TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
@@ -76,8 +76,8 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
76
76
  },
77
77
  quantityContainer: {
78
78
  position: 'absolute',
79
- left: '100%',
80
- bottom: '100%',
79
+ right: 0,
80
+ top: 0,
81
81
  width: 25,
82
82
  height: 25,
83
83
  textAlign: 'center',
@@ -125,12 +125,12 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
125
125
  );
126
126
 
127
127
  const fadeIn = () => {
128
- Animated.timing(fadeAnim, {
129
- toValue: 1,
130
- duration: 500,
128
+ Animated.timing(fadeAnim, {
129
+ toValue: 1,
130
+ duration: 500,
131
131
  useNativeDriver: true
132
- }).start();
133
- };
132
+ }).start();
133
+ };
134
134
 
135
135
  const handleChangeFavorite = () => {
136
136
  if (auth) {
@@ -164,7 +164,7 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
164
164
  <View style={{ flexDirection: 'row' }}>
165
165
  {productAddedToCartLength > 0 && (
166
166
  <QuantityContainer style={[styles.quantityContainer, {
167
- transform: [{ translateX: 10 }, { translateY: -10 }],
167
+ transform: [{ translateX: 25 }, { translateY: -55 }],
168
168
  }]}>
169
169
  <OText size={12} color={theme.colors.white}>{productAddedToCartLength.toString()}</OText>
170
170
  </QuantityContainer>