@whatmore-repo/whatmore-reactnative-sdk 1.0.13 → 1.0.15
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": "@whatmore-repo/whatmore-reactnative-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "index.js",
|
|
@@ -12,9 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"currency-symbol-map": "^5.1.0",
|
|
15
|
-
"react": "18.2.0",
|
|
16
15
|
"react-hooks-global-state": "^2.1.0",
|
|
17
|
-
"react-native": "^0.71.13",
|
|
18
16
|
"react-native-animatable": "^1.3.3",
|
|
19
17
|
"react-native-intersection-observer": "^0.0.9",
|
|
20
18
|
"react-native-svg": "^13.10.0",
|
|
@@ -24,6 +22,10 @@
|
|
|
24
22
|
"devDependencies": {
|
|
25
23
|
"@babel/core": "^7.20.0"
|
|
26
24
|
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react": "^18.2.0",
|
|
27
|
+
"react-native": "^0.72.1"
|
|
28
|
+
},
|
|
27
29
|
"author": "Shyam",
|
|
28
30
|
"license": "ISC"
|
|
29
31
|
}
|
|
@@ -6,7 +6,6 @@ import ProductTileV1 from './product-tiles/ProductTileV1.js';
|
|
|
6
6
|
|
|
7
7
|
export default function EventShoppingOverlay(props) {
|
|
8
8
|
var event = props.event;
|
|
9
|
-
|
|
10
9
|
return (
|
|
11
10
|
<View
|
|
12
11
|
style={{
|
|
@@ -61,8 +60,7 @@ export default function EventShoppingOverlay(props) {
|
|
|
61
60
|
{
|
|
62
61
|
event.products.map((product, index) => {
|
|
63
62
|
return (
|
|
64
|
-
index == 0 &&
|
|
65
|
-
<ProductTileV1 key={index} event={event} product={product} />
|
|
63
|
+
index == 0 && <ProductTileV1 key={index} event={event} product={product} />
|
|
66
64
|
);
|
|
67
65
|
})
|
|
68
66
|
}
|
|
@@ -5,11 +5,16 @@ import Swiper from 'react-native-swiper'
|
|
|
5
5
|
import { InView } from 'react-native-intersection-observer'
|
|
6
6
|
import EventShoppingView from './EventShoppingView.js';
|
|
7
7
|
import { setGlobalState } from '../globals/useAppState_APP.js';
|
|
8
|
+
import {handleAction} from '@appmaker-xyz/react-native';
|
|
8
9
|
|
|
9
10
|
export default function EventsVerticalSwipeView(props) {
|
|
10
11
|
const [modalVisible, setModalVisible] = React.useState(true);
|
|
11
12
|
var events = props.events;
|
|
12
|
-
|
|
13
|
+
function customAction(){
|
|
14
|
+
handleAction({
|
|
15
|
+
action: "OPEN_WHATMORE_SHOPPABLE"
|
|
16
|
+
})
|
|
17
|
+
}
|
|
13
18
|
return (
|
|
14
19
|
<Modal
|
|
15
20
|
style={{
|
|
@@ -33,6 +38,7 @@ export default function EventsVerticalSwipeView(props) {
|
|
|
33
38
|
loadMinimalSize={1}
|
|
34
39
|
index={props.initialEventIndex}
|
|
35
40
|
onIndexChanged={(index) => {
|
|
41
|
+
customAction()
|
|
36
42
|
setGlobalState('verticalSwiperViewActiveIndex', index);
|
|
37
43
|
}}
|
|
38
44
|
|
|
@@ -9,6 +9,7 @@ import useAddToCartStates from '../../hooks/useAddToCartStates.js';
|
|
|
9
9
|
import AddToCartButton from '../cta-buttons/AddToCartButton.jsx';
|
|
10
10
|
import * as Animatable from 'react-native-animatable';
|
|
11
11
|
import { navigateToProductPage } from '../../api/navigation-commands/NavigationCommands.js';
|
|
12
|
+
import {handleAction} from '@appmaker-xyz/react-native';
|
|
12
13
|
|
|
13
14
|
export default function ProductTileV1(props) {
|
|
14
15
|
const event = props.event;
|
|
@@ -50,13 +51,20 @@ export default function ProductTileV1(props) {
|
|
|
50
51
|
setProductVariantComparePrice(optionPriceDetails['compare_price']);
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
function handleClick(){
|
|
55
|
+
handleAction({
|
|
56
|
+
action: "OPEN_PRODUCT",
|
|
57
|
+
params:{
|
|
58
|
+
productId: 'gid://shopify/Product/' + product.client_product_id
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
}
|
|
55
62
|
return (
|
|
56
63
|
<TouchableWithoutFeedback
|
|
57
64
|
onPress={() => {
|
|
58
65
|
setTileTapAnimate(true);
|
|
59
66
|
navigateToProductPage(product, brandDomainContext, whatmoreShopId);
|
|
67
|
+
handleClick();
|
|
60
68
|
}}
|
|
61
69
|
>
|
|
62
70
|
<Animatable.View
|
|
@@ -82,7 +90,6 @@ export default function ProductTileV1(props) {
|
|
|
82
90
|
style={{
|
|
83
91
|
width: '100%', height: 'auto',
|
|
84
92
|
flexDirection: 'column', justifyContent: 'flex-start', alignItems: 'center',
|
|
85
|
-
overflow: 'hidden',
|
|
86
93
|
borderRadius: 5, overflow: 'hidden',
|
|
87
94
|
shadowColor: 'black', shadowOpacity: 1, shadowOffset: {width: 0, height: 0},
|
|
88
95
|
shadowRadius: 20, elevation: 10
|
|
@@ -106,20 +113,25 @@ export default function ProductTileV1(props) {
|
|
|
106
113
|
|
|
107
114
|
</Image>
|
|
108
115
|
<View
|
|
116
|
+
|
|
109
117
|
style={{
|
|
110
|
-
width: '
|
|
118
|
+
width: '100%', height: 'auto',
|
|
119
|
+
maxWidth: '100%',
|
|
111
120
|
flexDirection: 'column', justifyContent: 'space-between', alignItems: 'flex-start',
|
|
112
|
-
paddingLeft: 10, paddingRight: 10
|
|
121
|
+
paddingLeft: 10, paddingRight: 10, overflow: 'hidden',flex: 1, flexWrap: 'wrap'
|
|
113
122
|
}}
|
|
114
123
|
>
|
|
115
124
|
<Text
|
|
116
125
|
numberOfLines={2}
|
|
117
126
|
ellipsizeMode='tail'
|
|
118
127
|
style={{
|
|
128
|
+
|
|
119
129
|
fontWeight: 'normal',
|
|
120
130
|
fontFamily: whatmorePrimaryFont,
|
|
121
131
|
fontSize: BASE_FONT_SIZE * 1,
|
|
122
|
-
color: 'black'
|
|
132
|
+
color: 'black',
|
|
133
|
+
overflow: 'hidden',
|
|
134
|
+
|
|
123
135
|
}}
|
|
124
136
|
>
|
|
125
137
|
{product.title.toString()}
|