@whatmore-repo/whatmore-reactnative-sdk 1.0.10 → 1.0.12
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/commands.txt +45 -45
- package/index.js +31 -31
- package/package.json +29 -29
- package/pre-integration-steps.txt +2 -2
- package/src/api/cart-commands/CartCommands.js +26 -26
- package/src/api/navigation-commands/NavigationCommands.js +16 -16
- package/src/api/partners/PartnerUtils.js +10 -10
- package/src/api/partners/appbrew/AppbrewCommands.js +26 -26
- package/src/api/product-details-commands/ProductDetailsCommands.js +389 -389
- package/src/api/shopify-commands/ShopifyCommands.js +28 -28
- package/src/api/whatmore-backend/WhatmoreMetricCommands.js +159 -159
- package/src/components/EventClickComponent.js +30 -30
- package/src/components/EventShoppingOverlay.js +74 -74
- package/src/components/EventShoppingView.js +31 -31
- package/src/components/EventsVerticalSwipeView.js +59 -59
- package/src/components/EventsVerticalSwipeViewNoModal.js +51 -51
- package/src/components/WhatmoreRootComponent.js +88 -88
- package/src/components/commons/AppMuteUnmuteIcon.js +35 -35
- package/src/components/cta-buttons/AddToCartButton.jsx +345 -345
- package/src/components/product-tiles/ProductPriceBadge.js +51 -51
- package/src/components/product-tiles/ProductTileV1.js +204 -204
- package/src/components/product-tiles/SelectVariantComponent.js +116 -116
- package/src/components/video-player/AppVideoPlayer.js +25 -25
- package/src/constants/AppGlobalVars.js +12 -12
- package/src/globals/useAppState_APP.js +17 -17
- package/src/hooks/useAddToCartStates.js +194 -194
- package/src/icons/icon-components/CartIcon.jsx +26 -26
- package/src/icons/icon-components/LoadingIcon.jsx +17 -17
- package/src/icons/icon-components/MuteIcon.jsx +22 -22
- package/src/icons/icon-components/PlusIcon.jsx +26 -26
- package/src/icons/icon-components/UnmuteIcon.jsx +22 -22
- package/src/icons/svg-utils.txt +6 -6
- package/src/utils/ColorUtils.js +39 -39
- package/src/utils/EventSanityUtils.js +21 -21
- package/src/utils/PriceUtils.js +27 -27
- package/src/utils/ProductUtils.js +5 -5
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export async function productDetailsShopify(product){
|
|
2
|
-
const url = product.product_link + '.json';
|
|
3
|
-
const response = await fetch(url , {
|
|
4
|
-
method: 'GET',
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
if (!response.ok) {
|
|
8
|
-
throw new Error(`Error! status: ${response.status}`);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const result = await response.json();
|
|
12
|
-
|
|
13
|
-
return result;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export async function productDetailsShopifyJS(product){
|
|
17
|
-
const url = product.product_link + '.js';
|
|
18
|
-
const response = await fetch(url , {
|
|
19
|
-
method: 'GET',
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
if (!response.ok) {
|
|
23
|
-
throw new Error(`Error! status: ${response.status}`);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const result = await response.json();
|
|
27
|
-
|
|
28
|
-
return result;
|
|
1
|
+
export async function productDetailsShopify(product){
|
|
2
|
+
const url = product.product_link + '.json';
|
|
3
|
+
const response = await fetch(url , {
|
|
4
|
+
method: 'GET',
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
if (!response.ok) {
|
|
8
|
+
throw new Error(`Error! status: ${response.status}`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const result = await response.json();
|
|
12
|
+
|
|
13
|
+
return result;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export async function productDetailsShopifyJS(product){
|
|
17
|
+
const url = product.product_link + '.js';
|
|
18
|
+
const response = await fetch(url , {
|
|
19
|
+
method: 'GET',
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
if (!response.ok) {
|
|
23
|
+
throw new Error(`Error! status: ${response.status}`);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const result = await response.json();
|
|
27
|
+
|
|
28
|
+
return result;
|
|
29
29
|
}
|
|
@@ -1,159 +1,159 @@
|
|
|
1
|
-
const WHATMORE_BACKEND_BASE_URL = "https://api.whatmore.live";
|
|
2
|
-
|
|
3
|
-
export function registerUser(eventId, userName, phoneNumber) {
|
|
4
|
-
const requestBody = {
|
|
5
|
-
"event_id": eventId,
|
|
6
|
-
"customer_name": userName,
|
|
7
|
-
"customer_phone": phoneNumber
|
|
8
|
-
}
|
|
9
|
-
const response = fetch(WHATMORE_BACKEND_BASE_URL + "/notification/register", {
|
|
10
|
-
method: 'POST',
|
|
11
|
-
headers: {
|
|
12
|
-
'Accept': 'application/json',
|
|
13
|
-
'Content-Type': 'application/json'
|
|
14
|
-
},
|
|
15
|
-
body: JSON.stringify(requestBody)
|
|
16
|
-
},
|
|
17
|
-
).then(response => {
|
|
18
|
-
console.debug("user registration response : HTTP " + response.status);
|
|
19
|
-
return response.json();
|
|
20
|
-
}).then(data => {
|
|
21
|
-
console.debug("user registration response : " + JSON.stringify(data));
|
|
22
|
-
}).catch(error => {
|
|
23
|
-
console.error("error while registering user for event : ", error);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export function increaseViewCount(event) {
|
|
29
|
-
console.debug("updating user view count for event.");
|
|
30
|
-
const requestBody = {
|
|
31
|
-
"event_id": event.event_id,
|
|
32
|
-
"increase_by": 1
|
|
33
|
-
}
|
|
34
|
-
const response = fetch(WHATMORE_BACKEND_BASE_URL + "/event/metrics/views", {
|
|
35
|
-
method: 'POST',
|
|
36
|
-
headers: {
|
|
37
|
-
'Accept': 'application/json',
|
|
38
|
-
'Content-Type': 'application/json'
|
|
39
|
-
},
|
|
40
|
-
body: JSON.stringify(requestBody)
|
|
41
|
-
},
|
|
42
|
-
).then(response => {
|
|
43
|
-
console.debug("updating user view count response : HTTP " + response.status);
|
|
44
|
-
return response.json();
|
|
45
|
-
}).then(data => {
|
|
46
|
-
console.debug("updating user view count response : " + JSON.stringify(data));
|
|
47
|
-
}).catch(error => {
|
|
48
|
-
console.error("error updating user view count user for event : ", error);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
export function increaseEventProductClickCount(event, product) {
|
|
54
|
-
console.debug("updating event-product click count for event {} and product {}.", event.event_id, product.product_id);
|
|
55
|
-
const requestBody = {
|
|
56
|
-
"event_id": event.event_id,
|
|
57
|
-
"product_id": product.product_id,
|
|
58
|
-
"increase_by": 1
|
|
59
|
-
}
|
|
60
|
-
const response = fetch(WHATMORE_BACKEND_BASE_URL + "/event/metrics/clicks", {
|
|
61
|
-
method: 'POST',
|
|
62
|
-
headers: {
|
|
63
|
-
'Accept': 'application/json',
|
|
64
|
-
'Content-Type': 'application/json'
|
|
65
|
-
},
|
|
66
|
-
body: JSON.stringify(requestBody)
|
|
67
|
-
},
|
|
68
|
-
).then(response => {
|
|
69
|
-
console.debug("updating user event-product click count response : HTTP " + response.status);
|
|
70
|
-
return response.json();
|
|
71
|
-
}).then(data => {
|
|
72
|
-
console.debug("updating user event-product click count response : " + JSON.stringify(data));
|
|
73
|
-
}).catch(error => {
|
|
74
|
-
console.error("error updating user event-product click count for event {} : ", event.event_id, error);
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export function increaseEventProductAddToCartCount(event, product, quantity) {
|
|
79
|
-
console.debug("updating event-product add to cart count for event {} and product {}.", event.event_id, product.product_id);
|
|
80
|
-
const requestBody = {
|
|
81
|
-
"event_id": event.event_id,
|
|
82
|
-
"product_id": product.product_id,
|
|
83
|
-
"increase_by": quantity
|
|
84
|
-
}
|
|
85
|
-
const response = fetch(WHATMORE_BACKEND_BASE_URL + "/event/metrics/add_to_cart", {
|
|
86
|
-
method: 'POST',
|
|
87
|
-
headers: {
|
|
88
|
-
'Accept': 'application/json',
|
|
89
|
-
'Content-Type': 'application/json'
|
|
90
|
-
},
|
|
91
|
-
body: JSON.stringify(requestBody)
|
|
92
|
-
},
|
|
93
|
-
).then(response => {
|
|
94
|
-
console.debug("updating user event-product add to cart count response : HTTP " + response.status);
|
|
95
|
-
return response.json();
|
|
96
|
-
}).then(data => {
|
|
97
|
-
console.debug("updating user event-product add to cart count response : " + JSON.stringify(data));
|
|
98
|
-
}).catch(error => {
|
|
99
|
-
console.error("error updating user event-product add to cart count for event {} : ", event.event_id, error);
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export function increaseEventProductBuyNowCount(event, product) {
|
|
104
|
-
console.debug("updating event-product buy now count for event {} and product {}.", event.event_id, product.product_id);
|
|
105
|
-
const requestBody = {
|
|
106
|
-
"event_id": event.event_id,
|
|
107
|
-
"product_id": product.product_id,
|
|
108
|
-
"increase_by": 1
|
|
109
|
-
}
|
|
110
|
-
const response = fetch(WHATMORE_BACKEND_BASE_URL + "/event/metrics/buy_now", {
|
|
111
|
-
method: 'POST',
|
|
112
|
-
headers: {
|
|
113
|
-
'Accept': 'application/json',
|
|
114
|
-
'Content-Type': 'application/json'
|
|
115
|
-
},
|
|
116
|
-
body: JSON.stringify(requestBody)
|
|
117
|
-
},
|
|
118
|
-
).then(response => {
|
|
119
|
-
console.debug("updating user event-product buy now count response : HTTP " + response.status);
|
|
120
|
-
return response.json();
|
|
121
|
-
}).then(data => {
|
|
122
|
-
console.debug("updating user event-product buy now count response : " + JSON.stringify(data));
|
|
123
|
-
}).catch(error => {
|
|
124
|
-
console.error("error updating user event-product buy now count for event {} : ", event.event_id, error);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export async function orderTrackingAddToCartEvent(
|
|
129
|
-
{storeId = '', eventId = 0, productId = '', variantId = '', cartToken = '', checkoutToken = '', quantity = 0, price = '', actionType = '', trackingId = ''} = {}
|
|
130
|
-
) {
|
|
131
|
-
let data = {
|
|
132
|
-
'event_id': eventId,
|
|
133
|
-
'product_id': productId,
|
|
134
|
-
'cart_token': cartToken,
|
|
135
|
-
'checkout_token': checkoutToken,
|
|
136
|
-
'quantity': quantity,
|
|
137
|
-
'price': price,
|
|
138
|
-
'variant_id': variantId,
|
|
139
|
-
'action_type': actionType,
|
|
140
|
-
'tracking_id' : trackingId
|
|
141
|
-
};
|
|
142
|
-
console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} ", eventId, productId, variantId);
|
|
143
|
-
const res = await fetch(WHATMORE_BACKEND_BASE_URL + '/cart-metadata/' + storeId, {
|
|
144
|
-
method: 'POST',
|
|
145
|
-
headers: {
|
|
146
|
-
'Accept': 'application/json',
|
|
147
|
-
'Content-Type': 'application/json'
|
|
148
|
-
},
|
|
149
|
-
body: JSON.stringify(data)
|
|
150
|
-
}).then(response => {
|
|
151
|
-
console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} : HTTP " + response.status);
|
|
152
|
-
return response.json();
|
|
153
|
-
}).catch(error => {
|
|
154
|
-
console.error("error initiating ATC metadata event for eventId {}, productId {}, variantId {} : ", eventId, productId, variantId);
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
return res
|
|
158
|
-
}
|
|
159
|
-
|
|
1
|
+
const WHATMORE_BACKEND_BASE_URL = "https://api.whatmore.live";
|
|
2
|
+
|
|
3
|
+
export function registerUser(eventId, userName, phoneNumber) {
|
|
4
|
+
const requestBody = {
|
|
5
|
+
"event_id": eventId,
|
|
6
|
+
"customer_name": userName,
|
|
7
|
+
"customer_phone": phoneNumber
|
|
8
|
+
}
|
|
9
|
+
const response = fetch(WHATMORE_BACKEND_BASE_URL + "/notification/register", {
|
|
10
|
+
method: 'POST',
|
|
11
|
+
headers: {
|
|
12
|
+
'Accept': 'application/json',
|
|
13
|
+
'Content-Type': 'application/json'
|
|
14
|
+
},
|
|
15
|
+
body: JSON.stringify(requestBody)
|
|
16
|
+
},
|
|
17
|
+
).then(response => {
|
|
18
|
+
console.debug("user registration response : HTTP " + response.status);
|
|
19
|
+
return response.json();
|
|
20
|
+
}).then(data => {
|
|
21
|
+
console.debug("user registration response : " + JSON.stringify(data));
|
|
22
|
+
}).catch(error => {
|
|
23
|
+
console.error("error while registering user for event : ", error);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export function increaseViewCount(event) {
|
|
29
|
+
console.debug("updating user view count for event.");
|
|
30
|
+
const requestBody = {
|
|
31
|
+
"event_id": event.event_id,
|
|
32
|
+
"increase_by": 1
|
|
33
|
+
}
|
|
34
|
+
const response = fetch(WHATMORE_BACKEND_BASE_URL + "/event/metrics/views", {
|
|
35
|
+
method: 'POST',
|
|
36
|
+
headers: {
|
|
37
|
+
'Accept': 'application/json',
|
|
38
|
+
'Content-Type': 'application/json'
|
|
39
|
+
},
|
|
40
|
+
body: JSON.stringify(requestBody)
|
|
41
|
+
},
|
|
42
|
+
).then(response => {
|
|
43
|
+
console.debug("updating user view count response : HTTP " + response.status);
|
|
44
|
+
return response.json();
|
|
45
|
+
}).then(data => {
|
|
46
|
+
console.debug("updating user view count response : " + JSON.stringify(data));
|
|
47
|
+
}).catch(error => {
|
|
48
|
+
console.error("error updating user view count user for event : ", error);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
export function increaseEventProductClickCount(event, product) {
|
|
54
|
+
console.debug("updating event-product click count for event {} and product {}.", event.event_id, product.product_id);
|
|
55
|
+
const requestBody = {
|
|
56
|
+
"event_id": event.event_id,
|
|
57
|
+
"product_id": product.product_id,
|
|
58
|
+
"increase_by": 1
|
|
59
|
+
}
|
|
60
|
+
const response = fetch(WHATMORE_BACKEND_BASE_URL + "/event/metrics/clicks", {
|
|
61
|
+
method: 'POST',
|
|
62
|
+
headers: {
|
|
63
|
+
'Accept': 'application/json',
|
|
64
|
+
'Content-Type': 'application/json'
|
|
65
|
+
},
|
|
66
|
+
body: JSON.stringify(requestBody)
|
|
67
|
+
},
|
|
68
|
+
).then(response => {
|
|
69
|
+
console.debug("updating user event-product click count response : HTTP " + response.status);
|
|
70
|
+
return response.json();
|
|
71
|
+
}).then(data => {
|
|
72
|
+
console.debug("updating user event-product click count response : " + JSON.stringify(data));
|
|
73
|
+
}).catch(error => {
|
|
74
|
+
console.error("error updating user event-product click count for event {} : ", event.event_id, error);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function increaseEventProductAddToCartCount(event, product, quantity) {
|
|
79
|
+
console.debug("updating event-product add to cart count for event {} and product {}.", event.event_id, product.product_id);
|
|
80
|
+
const requestBody = {
|
|
81
|
+
"event_id": event.event_id,
|
|
82
|
+
"product_id": product.product_id,
|
|
83
|
+
"increase_by": quantity
|
|
84
|
+
}
|
|
85
|
+
const response = fetch(WHATMORE_BACKEND_BASE_URL + "/event/metrics/add_to_cart", {
|
|
86
|
+
method: 'POST',
|
|
87
|
+
headers: {
|
|
88
|
+
'Accept': 'application/json',
|
|
89
|
+
'Content-Type': 'application/json'
|
|
90
|
+
},
|
|
91
|
+
body: JSON.stringify(requestBody)
|
|
92
|
+
},
|
|
93
|
+
).then(response => {
|
|
94
|
+
console.debug("updating user event-product add to cart count response : HTTP " + response.status);
|
|
95
|
+
return response.json();
|
|
96
|
+
}).then(data => {
|
|
97
|
+
console.debug("updating user event-product add to cart count response : " + JSON.stringify(data));
|
|
98
|
+
}).catch(error => {
|
|
99
|
+
console.error("error updating user event-product add to cart count for event {} : ", event.event_id, error);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function increaseEventProductBuyNowCount(event, product) {
|
|
104
|
+
console.debug("updating event-product buy now count for event {} and product {}.", event.event_id, product.product_id);
|
|
105
|
+
const requestBody = {
|
|
106
|
+
"event_id": event.event_id,
|
|
107
|
+
"product_id": product.product_id,
|
|
108
|
+
"increase_by": 1
|
|
109
|
+
}
|
|
110
|
+
const response = fetch(WHATMORE_BACKEND_BASE_URL + "/event/metrics/buy_now", {
|
|
111
|
+
method: 'POST',
|
|
112
|
+
headers: {
|
|
113
|
+
'Accept': 'application/json',
|
|
114
|
+
'Content-Type': 'application/json'
|
|
115
|
+
},
|
|
116
|
+
body: JSON.stringify(requestBody)
|
|
117
|
+
},
|
|
118
|
+
).then(response => {
|
|
119
|
+
console.debug("updating user event-product buy now count response : HTTP " + response.status);
|
|
120
|
+
return response.json();
|
|
121
|
+
}).then(data => {
|
|
122
|
+
console.debug("updating user event-product buy now count response : " + JSON.stringify(data));
|
|
123
|
+
}).catch(error => {
|
|
124
|
+
console.error("error updating user event-product buy now count for event {} : ", event.event_id, error);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export async function orderTrackingAddToCartEvent(
|
|
129
|
+
{storeId = '', eventId = 0, productId = '', variantId = '', cartToken = '', checkoutToken = '', quantity = 0, price = '', actionType = '', trackingId = ''} = {}
|
|
130
|
+
) {
|
|
131
|
+
let data = {
|
|
132
|
+
'event_id': eventId,
|
|
133
|
+
'product_id': productId,
|
|
134
|
+
'cart_token': cartToken,
|
|
135
|
+
'checkout_token': checkoutToken,
|
|
136
|
+
'quantity': quantity,
|
|
137
|
+
'price': price,
|
|
138
|
+
'variant_id': variantId,
|
|
139
|
+
'action_type': actionType,
|
|
140
|
+
'tracking_id' : trackingId
|
|
141
|
+
};
|
|
142
|
+
console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} ", eventId, productId, variantId);
|
|
143
|
+
const res = await fetch(WHATMORE_BACKEND_BASE_URL + '/cart-metadata/' + storeId, {
|
|
144
|
+
method: 'POST',
|
|
145
|
+
headers: {
|
|
146
|
+
'Accept': 'application/json',
|
|
147
|
+
'Content-Type': 'application/json'
|
|
148
|
+
},
|
|
149
|
+
body: JSON.stringify(data)
|
|
150
|
+
}).then(response => {
|
|
151
|
+
console.debug("initiating ATC metadata event for eventId {}, productId {}, variantId {} : HTTP " + response.status);
|
|
152
|
+
return response.json();
|
|
153
|
+
}).catch(error => {
|
|
154
|
+
console.error("error initiating ATC metadata event for eventId {}, productId {}, variantId {} : ", eventId, productId, variantId);
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
return res
|
|
158
|
+
}
|
|
159
|
+
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { SafeAreaView, StatusBar, View } from "react-native";
|
|
3
|
-
import EventsVerticalSwipeView from './EventsVerticalSwipeView';
|
|
4
|
-
import { getGlobalState } from '../globals/useAppState_APP';
|
|
5
|
-
import EventsVerticalSwipeViewNoModal from './EventsVerticalSwipeViewNoModal';
|
|
6
|
-
|
|
7
|
-
export default function EventClickComponent(props) {
|
|
8
|
-
const modalUsed = getGlobalState('modalUsed');
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<SafeAreaView style={{
|
|
12
|
-
width: '100%',
|
|
13
|
-
height: '100%'
|
|
14
|
-
}}>
|
|
15
|
-
<StatusBar
|
|
16
|
-
animated={true}
|
|
17
|
-
backgroundColor='black'
|
|
18
|
-
barStyle={"default"}
|
|
19
|
-
hidden={false}
|
|
20
|
-
showHideTransition={"fade"}
|
|
21
|
-
/>
|
|
22
|
-
{
|
|
23
|
-
modalUsed
|
|
24
|
-
?
|
|
25
|
-
<EventsVerticalSwipeView events={props.events} initialEventIndex={props.initialEventIndex} />
|
|
26
|
-
:
|
|
27
|
-
<EventsVerticalSwipeViewNoModal events={props.events} initialEventIndex={props.initialEventIndex} />
|
|
28
|
-
}
|
|
29
|
-
</SafeAreaView>
|
|
30
|
-
);
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SafeAreaView, StatusBar, View } from "react-native";
|
|
3
|
+
import EventsVerticalSwipeView from './EventsVerticalSwipeView';
|
|
4
|
+
import { getGlobalState } from '../globals/useAppState_APP';
|
|
5
|
+
import EventsVerticalSwipeViewNoModal from './EventsVerticalSwipeViewNoModal';
|
|
6
|
+
|
|
7
|
+
export default function EventClickComponent(props) {
|
|
8
|
+
const modalUsed = getGlobalState('modalUsed');
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<SafeAreaView style={{
|
|
12
|
+
width: '100%',
|
|
13
|
+
height: '100%'
|
|
14
|
+
}}>
|
|
15
|
+
<StatusBar
|
|
16
|
+
animated={true}
|
|
17
|
+
backgroundColor='black'
|
|
18
|
+
barStyle={"default"}
|
|
19
|
+
hidden={false}
|
|
20
|
+
showHideTransition={"fade"}
|
|
21
|
+
/>
|
|
22
|
+
{
|
|
23
|
+
modalUsed
|
|
24
|
+
?
|
|
25
|
+
<EventsVerticalSwipeView events={props.events} initialEventIndex={props.initialEventIndex} />
|
|
26
|
+
:
|
|
27
|
+
<EventsVerticalSwipeViewNoModal events={props.events} initialEventIndex={props.initialEventIndex} />
|
|
28
|
+
}
|
|
29
|
+
</SafeAreaView>
|
|
30
|
+
);
|
|
31
31
|
}
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Text, TouchableOpacity, View } from "react-native";
|
|
3
|
-
import { getGlobalState, setGlobalState, useGlobalState } from '../globals/useAppState_APP.js';
|
|
4
|
-
import AppMuteUnmuteIcon from './commons/AppMuteUnmuteIcon.js';
|
|
5
|
-
import ProductTileV1 from './product-tiles/ProductTileV1.js';
|
|
6
|
-
|
|
7
|
-
export default function EventShoppingOverlay(props) {
|
|
8
|
-
var event = props.event;
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<View
|
|
12
|
-
style={{
|
|
13
|
-
width: '100%', height: '100%',
|
|
14
|
-
flex: 1, flexDirection: 'column',
|
|
15
|
-
justifyContent: 'flex-start', alignItems: 'center'
|
|
16
|
-
}}
|
|
17
|
-
>
|
|
18
|
-
{/* <Text style={{fontSize: 20, fontWeight: 'bold'}}> ABCD </Text> */}
|
|
19
|
-
|
|
20
|
-
<View
|
|
21
|
-
style={{
|
|
22
|
-
width: '100%',
|
|
23
|
-
height: 'auto',
|
|
24
|
-
flexDirection: 'row',
|
|
25
|
-
justifyContent: 'flex-end', alignItems: 'center', backgroundColor: 'transparent',
|
|
26
|
-
paddingLeft: 10, paddingRight: 10, paddingTop: 10, paddingBottom: 10
|
|
27
|
-
}}
|
|
28
|
-
>
|
|
29
|
-
<AppMuteUnmuteIcon />
|
|
30
|
-
</View>
|
|
31
|
-
<View
|
|
32
|
-
style={{
|
|
33
|
-
width: '100%',
|
|
34
|
-
height: 'auto',
|
|
35
|
-
flex: 1,
|
|
36
|
-
flexDirection: 'column',
|
|
37
|
-
justifyContent: 'space-between', alignItems: 'center', backgroundColor: 'transparent'
|
|
38
|
-
}}
|
|
39
|
-
>
|
|
40
|
-
<TouchableOpacity
|
|
41
|
-
style={{
|
|
42
|
-
width: '100%',
|
|
43
|
-
height: 'auto',
|
|
44
|
-
flex: 1,
|
|
45
|
-
flexDirection: 'row',
|
|
46
|
-
justifyContent: 'center', alignItems: 'center', backgroundColor: 'transparent'
|
|
47
|
-
}}
|
|
48
|
-
onPress={()=>{
|
|
49
|
-
setGlobalState("isAppMuted", getGlobalState("isAppMuted") ? false : true);
|
|
50
|
-
}}
|
|
51
|
-
>
|
|
52
|
-
</TouchableOpacity>
|
|
53
|
-
<View
|
|
54
|
-
// add style here to make it horizontally scrollable
|
|
55
|
-
style={{
|
|
56
|
-
width: '100%', height: 'auto',
|
|
57
|
-
flexDirection: 'row', justifyContent: 'space-around', alignItems: 'center',
|
|
58
|
-
paddingLeft: 10, paddingRight: 10, paddingBottom: 10
|
|
59
|
-
}}
|
|
60
|
-
>
|
|
61
|
-
{
|
|
62
|
-
event.products.map((product, index) => {
|
|
63
|
-
return (
|
|
64
|
-
<ProductTileV1 key={index} event={event} product={product} />
|
|
65
|
-
);
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
</View>
|
|
69
|
-
</View>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
</View>
|
|
73
|
-
);
|
|
74
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text, TouchableOpacity, View } from "react-native";
|
|
3
|
+
import { getGlobalState, setGlobalState, useGlobalState } from '../globals/useAppState_APP.js';
|
|
4
|
+
import AppMuteUnmuteIcon from './commons/AppMuteUnmuteIcon.js';
|
|
5
|
+
import ProductTileV1 from './product-tiles/ProductTileV1.js';
|
|
6
|
+
|
|
7
|
+
export default function EventShoppingOverlay(props) {
|
|
8
|
+
var event = props.event;
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<View
|
|
12
|
+
style={{
|
|
13
|
+
width: '100%', height: '100%',
|
|
14
|
+
flex: 1, flexDirection: 'column',
|
|
15
|
+
justifyContent: 'flex-start', alignItems: 'center'
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
{/* <Text style={{fontSize: 20, fontWeight: 'bold'}}> ABCD </Text> */}
|
|
19
|
+
|
|
20
|
+
<View
|
|
21
|
+
style={{
|
|
22
|
+
width: '100%',
|
|
23
|
+
height: 'auto',
|
|
24
|
+
flexDirection: 'row',
|
|
25
|
+
justifyContent: 'flex-end', alignItems: 'center', backgroundColor: 'transparent',
|
|
26
|
+
paddingLeft: 10, paddingRight: 10, paddingTop: 10, paddingBottom: 10
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
29
|
+
<AppMuteUnmuteIcon />
|
|
30
|
+
</View>
|
|
31
|
+
<View
|
|
32
|
+
style={{
|
|
33
|
+
width: '100%',
|
|
34
|
+
height: 'auto',
|
|
35
|
+
flex: 1,
|
|
36
|
+
flexDirection: 'column',
|
|
37
|
+
justifyContent: 'space-between', alignItems: 'center', backgroundColor: 'transparent'
|
|
38
|
+
}}
|
|
39
|
+
>
|
|
40
|
+
<TouchableOpacity
|
|
41
|
+
style={{
|
|
42
|
+
width: '100%',
|
|
43
|
+
height: 'auto',
|
|
44
|
+
flex: 1,
|
|
45
|
+
flexDirection: 'row',
|
|
46
|
+
justifyContent: 'center', alignItems: 'center', backgroundColor: 'transparent'
|
|
47
|
+
}}
|
|
48
|
+
onPress={()=>{
|
|
49
|
+
setGlobalState("isAppMuted", getGlobalState("isAppMuted") ? false : true);
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
</TouchableOpacity>
|
|
53
|
+
<View
|
|
54
|
+
// add style here to make it horizontally scrollable
|
|
55
|
+
style={{
|
|
56
|
+
width: '100%', height: 'auto',
|
|
57
|
+
flexDirection: 'row', justifyContent: 'space-around', alignItems: 'center',
|
|
58
|
+
paddingLeft: 10, paddingRight: 10, paddingBottom: 10
|
|
59
|
+
}}
|
|
60
|
+
>
|
|
61
|
+
{
|
|
62
|
+
event.products.map((product, index) => {
|
|
63
|
+
return (
|
|
64
|
+
<ProductTileV1 key={index} event={event} product={product} />
|
|
65
|
+
);
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
</View>
|
|
69
|
+
</View>
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
</View>
|
|
73
|
+
);
|
|
74
|
+
|
|
75
75
|
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { View } from "react-native";
|
|
3
|
-
import AppVideoPlayer from './video-player/AppVideoPlayer.js'
|
|
4
|
-
import { useGlobalState } from '../globals/useAppState_APP.js';
|
|
5
|
-
import EventShoppingOverlay from './EventShoppingOverlay.js';
|
|
6
|
-
|
|
7
|
-
export default function EventShoppingView(props) {
|
|
8
|
-
const [activeSwiperIndex, setActiveSwiperIndex] = useGlobalState('verticalSwiperViewActiveIndex');
|
|
9
|
-
|
|
10
|
-
var event = props.event;
|
|
11
|
-
var eventIndex = props.eventIndex;
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<View
|
|
15
|
-
style={{
|
|
16
|
-
width: '100%', height: '100%'
|
|
17
|
-
}}
|
|
18
|
-
>
|
|
19
|
-
<AppVideoPlayer videoUrl={event.event_hls_url} isMuted={activeSwiperIndex != eventIndex} />
|
|
20
|
-
<View
|
|
21
|
-
style={{
|
|
22
|
-
width: '100%', height: '100%',
|
|
23
|
-
position: 'relative', zIndex: 1,
|
|
24
|
-
backgroundColor: 'transparent',
|
|
25
|
-
}}
|
|
26
|
-
>
|
|
27
|
-
<EventShoppingOverlay event={event} />
|
|
28
|
-
</View>
|
|
29
|
-
</View>
|
|
30
|
-
);
|
|
31
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import AppVideoPlayer from './video-player/AppVideoPlayer.js'
|
|
4
|
+
import { useGlobalState } from '../globals/useAppState_APP.js';
|
|
5
|
+
import EventShoppingOverlay from './EventShoppingOverlay.js';
|
|
6
|
+
|
|
7
|
+
export default function EventShoppingView(props) {
|
|
8
|
+
const [activeSwiperIndex, setActiveSwiperIndex] = useGlobalState('verticalSwiperViewActiveIndex');
|
|
9
|
+
|
|
10
|
+
var event = props.event;
|
|
11
|
+
var eventIndex = props.eventIndex;
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<View
|
|
15
|
+
style={{
|
|
16
|
+
width: '100%', height: '100%'
|
|
17
|
+
}}
|
|
18
|
+
>
|
|
19
|
+
<AppVideoPlayer videoUrl={event.event_hls_url} isMuted={activeSwiperIndex != eventIndex} />
|
|
20
|
+
<View
|
|
21
|
+
style={{
|
|
22
|
+
width: '100%', height: '100%',
|
|
23
|
+
position: 'relative', zIndex: 1,
|
|
24
|
+
backgroundColor: 'transparent',
|
|
25
|
+
}}
|
|
26
|
+
>
|
|
27
|
+
<EventShoppingOverlay event={event} />
|
|
28
|
+
</View>
|
|
29
|
+
</View>
|
|
30
|
+
);
|
|
31
|
+
|
|
32
32
|
}
|