ordering-ui-react-native 0.22.45 → 0.22.47
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/MomentOption/index.tsx +10 -1
- package/themes/original/src/components/ProductForm/index.tsx +107 -102
- package/themes/original/src/components/ProductItemAccordion/index.tsx +2 -1
- package/themes/original/src/components/SingleProductCard/index.tsx +2 -1
- package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +8 -3
package/package.json
CHANGED
|
@@ -474,7 +474,16 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
474
474
|
</Container>
|
|
475
475
|
{!isCart && !cateringPreorder && (
|
|
476
476
|
<View style={{ position: 'absolute', bottom: bottom, paddingBottom: 20, paddingHorizontal: 20, backgroundColor: 'white', width: '100%' }}>
|
|
477
|
-
<OButton
|
|
477
|
+
<OButton
|
|
478
|
+
onClick={() => handleChangeMoment()}
|
|
479
|
+
bgColor={theme.colors.primary}
|
|
480
|
+
borderColor={theme.colors.primary}
|
|
481
|
+
isDisabled={!selectedTime}
|
|
482
|
+
text={t('CONTINUE', 'Continue')}
|
|
483
|
+
style={{ borderRadius: 7.6, height: 44, shadowOpacity: 0 }}
|
|
484
|
+
textStyle={{ color: 'white', fontSize: 14 }}
|
|
485
|
+
showNextIcon
|
|
486
|
+
/>
|
|
478
487
|
</View>
|
|
479
488
|
)}
|
|
480
489
|
</>
|
|
@@ -88,6 +88,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
88
88
|
const [events] = useEvent()
|
|
89
89
|
const commentRef = useRef()
|
|
90
90
|
const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
91
|
+
const hideProductDummyLogo = theme?.business_view?.components?.products?.components?.product?.components?.dummy?.hidden
|
|
91
92
|
|
|
92
93
|
const styles = StyleSheet.create({
|
|
93
94
|
mainContainer: {
|
|
@@ -487,114 +488,118 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
487
488
|
</View>
|
|
488
489
|
) : (
|
|
489
490
|
<>
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
}
|
|
507
|
-
nextButton={
|
|
508
|
-
<View style={styles.swiperButton}>
|
|
509
|
-
<IconAntDesign
|
|
510
|
-
name="caretright"
|
|
511
|
-
color={theme.colors.white}
|
|
512
|
-
size={13}
|
|
513
|
-
// style={styles.starIcon}
|
|
514
|
-
/>
|
|
515
|
-
</View>
|
|
516
|
-
}
|
|
517
|
-
>
|
|
518
|
-
{gallery && gallery?.length > 0 && gallery.map((img : any, i: number) => (
|
|
519
|
-
<View
|
|
520
|
-
style={styles.slide1}
|
|
521
|
-
key={i}
|
|
522
|
-
>
|
|
523
|
-
{(String(img).includes('http') || typeof img === 'number') ? (
|
|
524
|
-
<FastImage
|
|
525
|
-
style={{ height: '100%', opacity: isSoldOut ? 0.5 : 1, aspectRatio: 16 / 9 }}
|
|
526
|
-
source={typeof img !== 'number' ? {
|
|
527
|
-
uri: optimizeImage(img, 'h_1024,c_limit'),
|
|
528
|
-
priority: FastImage.priority.normal,
|
|
529
|
-
} : img}
|
|
530
|
-
/>
|
|
531
|
-
) : (
|
|
532
|
-
<>
|
|
533
|
-
<YoutubePlayer
|
|
534
|
-
height={'100%'}
|
|
535
|
-
width={'100%'}
|
|
536
|
-
play={playing}
|
|
537
|
-
videoId={img}
|
|
538
|
-
onChangeState={onStateChange}
|
|
491
|
+
{(product?.images || !hideProductDummyLogo) && (
|
|
492
|
+
<>
|
|
493
|
+
<Swiper
|
|
494
|
+
loop={false}
|
|
495
|
+
ref={swiperRef}
|
|
496
|
+
showsButtons={true}
|
|
497
|
+
style={styles.mainSwiper}
|
|
498
|
+
showsPagination={false}
|
|
499
|
+
onIndexChanged={(index : any) => handleChangeMainIndex(index)}
|
|
500
|
+
prevButton={
|
|
501
|
+
<View style={styles.swiperButton}>
|
|
502
|
+
<IconAntDesign
|
|
503
|
+
name="caretleft"
|
|
504
|
+
color={theme.colors.white}
|
|
505
|
+
size={13}
|
|
506
|
+
// style={styles.starIcon}
|
|
539
507
|
/>
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
paddingHorizontal: 20,
|
|
550
|
-
paddingVertical: 15
|
|
551
|
-
}}
|
|
552
|
-
>
|
|
553
|
-
{gallery?.length > 1 && gallery.map((img: any, index: number) => (
|
|
554
|
-
<TouchableOpacity
|
|
555
|
-
key={index}
|
|
556
|
-
onPress={() => handleClickThumb(index)}
|
|
557
|
-
>
|
|
558
|
-
<View
|
|
559
|
-
style={{
|
|
560
|
-
height: 56,
|
|
561
|
-
borderRadius: 8,
|
|
562
|
-
margin: 8,
|
|
563
|
-
opacity: index === thumbsSwiper ? 1 : 0.8
|
|
564
|
-
}}
|
|
565
|
-
>
|
|
566
|
-
{String(img).includes('http') ? (
|
|
567
|
-
<OIcon
|
|
568
|
-
url={img}
|
|
569
|
-
style={{
|
|
570
|
-
borderColor: theme.colors.lightGray,
|
|
571
|
-
borderRadius: 8,
|
|
572
|
-
minHeight: '100%',
|
|
573
|
-
opacity: isSoldOut ? 0.5 : 1
|
|
574
|
-
}}
|
|
575
|
-
width={56}
|
|
576
|
-
height={56}
|
|
577
|
-
cover
|
|
508
|
+
</View>
|
|
509
|
+
}
|
|
510
|
+
nextButton={
|
|
511
|
+
<View style={styles.swiperButton}>
|
|
512
|
+
<IconAntDesign
|
|
513
|
+
name="caretright"
|
|
514
|
+
color={theme.colors.white}
|
|
515
|
+
size={13}
|
|
516
|
+
// style={styles.starIcon}
|
|
578
517
|
/>
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
518
|
+
</View>
|
|
519
|
+
}
|
|
520
|
+
>
|
|
521
|
+
{gallery && gallery?.length > 0 && gallery.map((img : any, i: number) => (
|
|
522
|
+
<View
|
|
523
|
+
style={styles.slide1}
|
|
524
|
+
key={i}
|
|
525
|
+
>
|
|
526
|
+
{(String(img).includes('http') || typeof img === 'number') ? (
|
|
527
|
+
<FastImage
|
|
528
|
+
style={{ height: '100%', opacity: isSoldOut ? 0.5 : 1, aspectRatio: 16 / 9 }}
|
|
529
|
+
source={typeof img !== 'number' ? {
|
|
530
|
+
uri: optimizeImage(img, 'h_1024,c_limit'),
|
|
531
|
+
priority: FastImage.priority.normal,
|
|
532
|
+
} : img}
|
|
533
|
+
/>
|
|
534
|
+
) : (
|
|
535
|
+
<>
|
|
536
|
+
<YoutubePlayer
|
|
537
|
+
height={'100%'}
|
|
538
|
+
width={'100%'}
|
|
539
|
+
play={playing}
|
|
540
|
+
videoId={img}
|
|
541
|
+
onChangeState={onStateChange}
|
|
542
|
+
/>
|
|
543
|
+
<Button title={playing ? "pause" : "play"} onPress={togglePlaying} />
|
|
544
|
+
</>
|
|
545
|
+
)}
|
|
546
|
+
</View>
|
|
547
|
+
))}
|
|
548
|
+
</Swiper>
|
|
549
|
+
<ScrollView
|
|
550
|
+
horizontal
|
|
551
|
+
contentContainerStyle={{
|
|
552
|
+
paddingHorizontal: 20,
|
|
553
|
+
paddingVertical: 15
|
|
554
|
+
}}
|
|
555
|
+
>
|
|
556
|
+
{gallery?.length > 1 && gallery.map((img: any, index: number) => (
|
|
557
|
+
<TouchableOpacity
|
|
558
|
+
key={index}
|
|
559
|
+
onPress={() => handleClickThumb(index)}
|
|
560
|
+
>
|
|
561
|
+
<View
|
|
582
562
|
style={{
|
|
583
|
-
|
|
563
|
+
height: 56,
|
|
584
564
|
borderRadius: 8,
|
|
585
|
-
|
|
586
|
-
opacity:
|
|
565
|
+
margin: 8,
|
|
566
|
+
opacity: index === thumbsSwiper ? 1 : 0.8
|
|
587
567
|
}}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
568
|
+
>
|
|
569
|
+
{String(img).includes('http') ? (
|
|
570
|
+
<OIcon
|
|
571
|
+
url={img}
|
|
572
|
+
style={{
|
|
573
|
+
borderColor: theme.colors.lightGray,
|
|
574
|
+
borderRadius: 8,
|
|
575
|
+
minHeight: '100%',
|
|
576
|
+
opacity: isSoldOut ? 0.5 : 1
|
|
577
|
+
}}
|
|
578
|
+
width={56}
|
|
579
|
+
height={56}
|
|
580
|
+
cover
|
|
581
|
+
/>
|
|
582
|
+
) : (
|
|
583
|
+
<OIcon
|
|
584
|
+
url={'https://img.youtube.com/vi/' + img + '/0.jpg'}
|
|
585
|
+
style={{
|
|
586
|
+
borderColor: theme.colors.lightGray,
|
|
587
|
+
borderRadius: 8,
|
|
588
|
+
minHeight: '100%',
|
|
589
|
+
opacity: isSoldOut ? 0.5 : 1
|
|
590
|
+
}}
|
|
591
|
+
width={56}
|
|
592
|
+
height={56}
|
|
593
|
+
cover
|
|
594
|
+
/>
|
|
595
|
+
)}
|
|
596
|
+
</View>
|
|
597
|
+
</TouchableOpacity>
|
|
595
598
|
|
|
596
|
-
|
|
597
|
-
|
|
599
|
+
))}
|
|
600
|
+
</ScrollView>
|
|
601
|
+
</>
|
|
602
|
+
)}
|
|
598
603
|
</>
|
|
599
604
|
)}
|
|
600
605
|
</WrapHeader>
|
|
@@ -43,6 +43,7 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
43
43
|
? theme?.checkout?.components?.cart?.components?.product?.components?.image?.hidden
|
|
44
44
|
: theme?.confirmation?.components?.cart?.components?.products?.components?.photo?.hidden
|
|
45
45
|
|
|
46
|
+
const hideProductDummyLogo = theme?.business_view?.components?.products?.components?.product?.components?.dummy?.hidden
|
|
46
47
|
const hideProductCommentHide = isFromCheckout && theme?.checkout?.components?.cart?.components?.product?.components?.comments?.hidden
|
|
47
48
|
|
|
48
49
|
const pickerStyle = StyleSheet.create({
|
|
@@ -159,7 +160,7 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
159
160
|
>
|
|
160
161
|
<View style={{ flexDirection: 'row', alignItems: 'flex-start' }}>
|
|
161
162
|
<ContentInfo>
|
|
162
|
-
{(product?.images || theme?.images?.dummies?.product) && !hideProductImage && (
|
|
163
|
+
{(product?.images || (!hideProductDummyLogo && theme?.images?.dummies?.product)) && !hideProductImage && (
|
|
163
164
|
<ProductImage>
|
|
164
165
|
{isFromCheckout ? (
|
|
165
166
|
product?.images ? (
|
|
@@ -48,6 +48,7 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
48
48
|
const hideAddButton = theme?.business_view?.components?.products?.components?.add_to_cart_button?.hidden ?? true
|
|
49
49
|
const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
50
50
|
const hideProductDescription = theme?.business_view?.components?.products?.components?.product?.components?.description?.hidden
|
|
51
|
+
const hideProductDummyLogo = theme?.business_view?.components?.products?.components?.product?.components?.dummy?.hidden
|
|
51
52
|
const hideProductLogo = viewString
|
|
52
53
|
? theme?.[viewString]?.components?.cart?.components?.products?.image?.hidden
|
|
53
54
|
: theme?.business_view?.components?.products?.components?.product?.components?.image?.hidden
|
|
@@ -283,7 +284,7 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
283
284
|
</OText>
|
|
284
285
|
</RibbonBox>
|
|
285
286
|
)}
|
|
286
|
-
{!hideProductLogo && (
|
|
287
|
+
{(!hideProductLogo && (product?.images || !hideProductDummyLogo)) && (
|
|
287
288
|
<FastImage
|
|
288
289
|
style={styles.productStyle}
|
|
289
290
|
source={product?.images ? {
|
|
@@ -25,6 +25,9 @@ export const UpsellingLayout = (props : any) => {
|
|
|
25
25
|
const [{ parsePrice }] = useUtils()
|
|
26
26
|
const [, t] = useLanguage()
|
|
27
27
|
|
|
28
|
+
const hideProductDummyLogo = theme?.business_view?.components?.products?.components?.product?.components?.dummy?.hidden
|
|
29
|
+
|
|
30
|
+
|
|
28
31
|
const styles = StyleSheet.create({
|
|
29
32
|
imageStyle: {
|
|
30
33
|
width: 73,
|
|
@@ -66,9 +69,11 @@ export const UpsellingLayout = (props : any) => {
|
|
|
66
69
|
<OText size={10} color={theme.colors.primary}>{t('ADD', 'Add')}</OText>
|
|
67
70
|
</AddButton>
|
|
68
71
|
</View>
|
|
69
|
-
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
+
{(product?.images || !hideProductDummyLogo) && (
|
|
73
|
+
<View>
|
|
74
|
+
<OIcon url={product?.images || theme?.images?.dummies?.product} style={styles.imageStyle} />
|
|
75
|
+
</View>
|
|
76
|
+
)}
|
|
72
77
|
</Item>
|
|
73
78
|
)) : (
|
|
74
79
|
<OText>
|