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 +1 -1
- package/themes/original/src/components/BusinessProductsList/index.tsx +3 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +18 -23
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +2 -2
- package/themes/original/src/components/SingleProductCard/index.tsx +8 -8
package/package.json
CHANGED
|
@@ -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 :
|
|
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,
|
|
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
|
-
{
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
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.
|
|
448
|
+
source={theme.images.backgrounds.business_list_header}
|
|
449
449
|
style={{ paddingTop: top + 20 }}
|
|
450
|
-
resizeMode='
|
|
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
|
-
|
|
80
|
-
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
Animated.timing(fadeAnim, {
|
|
129
|
+
toValue: 1,
|
|
130
|
+
duration: 500,
|
|
131
131
|
useNativeDriver: true
|
|
132
|
-
|
|
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:
|
|
167
|
+
transform: [{ translateX: 25 }, { translateY: -55 }],
|
|
168
168
|
}]}>
|
|
169
169
|
<OText size={12} color={theme.colors.white}>{productAddedToCartLength.toString()}</OText>
|
|
170
170
|
</QuantityContainer>
|