be-components 6.7.0 → 6.7.1
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/lib/commonjs/Group/api/index.js +75 -0
- package/lib/commonjs/Group/api/index.js.map +1 -1
- package/lib/commonjs/Group/components/CreateGroupWizard.js +605 -0
- package/lib/commonjs/Group/components/CreateGroupWizard.js.map +1 -0
- package/lib/commonjs/Group/components/GroupPlayerActionForm.js +17 -4
- package/lib/commonjs/Group/components/GroupPlayerActionForm.js.map +1 -1
- package/lib/commonjs/Group/index.js +2 -0
- package/lib/commonjs/Group/index.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.d.js.map +1 -1
- package/lib/module/Group/api/index.js +75 -0
- package/lib/module/Group/api/index.js.map +1 -1
- package/lib/module/Group/components/CreateGroupWizard.js +597 -0
- package/lib/module/Group/components/CreateGroupWizard.js.map +1 -0
- package/lib/module/Group/components/GroupPlayerActionForm.js +17 -4
- package/lib/module/Group/components/GroupPlayerActionForm.js.map +1 -1
- package/lib/module/Group/index.js +2 -0
- package/lib/module/Group/index.js.map +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.d.js.map +1 -1
- package/lib/typescript/lib/commonjs/Group/api/index.d.ts +21 -0
- package/lib/typescript/lib/commonjs/Group/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Group/components/CreateGroupWizard.d.ts +13 -0
- package/lib/typescript/lib/commonjs/Group/components/CreateGroupWizard.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Group/components/GroupPlayerActionForm.d.ts +3 -1
- package/lib/typescript/lib/commonjs/Group/components/GroupPlayerActionForm.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Group/index.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Group/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/index.d.ts +1 -0
- package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Group/api/index.d.ts +21 -0
- package/lib/typescript/lib/module/Group/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Group/components/CreateGroupWizard.d.ts +13 -0
- package/lib/typescript/lib/module/Group/components/CreateGroupWizard.d.ts.map +1 -0
- package/lib/typescript/lib/module/Group/components/GroupPlayerActionForm.d.ts +3 -1
- package/lib/typescript/lib/module/Group/components/GroupPlayerActionForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/Group/index.d.ts +2 -1
- package/lib/typescript/lib/module/Group/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/index.d.ts +2 -1
- package/lib/typescript/lib/module/index.d.ts.map +1 -1
- package/lib/typescript/src/Group/api/index.d.ts +6 -1
- package/lib/typescript/src/Group/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Group/components/CreateGroupWizard.d.ts +16 -0
- package/lib/typescript/src/Group/components/CreateGroupWizard.d.ts.map +1 -0
- package/lib/typescript/src/Group/components/GroupPlayerActionForm.d.ts +3 -2
- package/lib/typescript/src/Group/components/GroupPlayerActionForm.d.ts.map +1 -1
- package/lib/typescript/src/Group/index.d.ts +2 -1
- package/lib/typescript/src/Group/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Group/api/index.ts +62 -2
- package/src/Group/components/CreateGroupWizard.tsx +380 -0
- package/src/Group/components/GroupPlayerActionForm.tsx +16 -6
- package/src/Group/index.tsx +3 -1
- package/src/index.tsx +2 -1
- package/src/types.d.ts +7 -0
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { Button, Text, TextInput, View } from "../../Components/Themed";
|
|
3
|
+
import { FlatList, Image } from 'react-native';
|
|
4
|
+
import { Icons } from '../../Components';
|
|
5
|
+
import { useColors } from '../../constants/useColors';
|
|
6
|
+
import { GroupApi, GroupHelpers } from '../api';
|
|
7
|
+
import ImageUploader from '../../Components/ImageUploader';
|
|
8
|
+
import { showConfirmAlert } from '../../Components/ConfirmAlert';
|
|
9
|
+
const wizard_steps = [{
|
|
10
|
+
num: 1,
|
|
11
|
+
step_key: 'intro',
|
|
12
|
+
title: 'BettorEdge Groups',
|
|
13
|
+
description: 'Groups bring your group chat, discord server, family banter to real life! Track your friends stats, compete against each other and have fun!'
|
|
14
|
+
}, {
|
|
15
|
+
num: 2,
|
|
16
|
+
step_key: 'info',
|
|
17
|
+
title: 'Describe Your Group',
|
|
18
|
+
description: 'Give this group a name and a description that is unique and will entice players and friends to join!'
|
|
19
|
+
}, {
|
|
20
|
+
num: 3,
|
|
21
|
+
step_key: 'image',
|
|
22
|
+
title: 'Add a fun photo',
|
|
23
|
+
description: 'Add an image so its easy to recognize your group!'
|
|
24
|
+
}, {
|
|
25
|
+
num: 4,
|
|
26
|
+
step_key: 'invite',
|
|
27
|
+
title: 'Invite Friends!',
|
|
28
|
+
description: 'Groups are of no use without friends to join! Have a group text, slack, discord? Add them to start competing and smack talking!'
|
|
29
|
+
}, {
|
|
30
|
+
num: 5,
|
|
31
|
+
step_key: 'success',
|
|
32
|
+
title: 'Group Successfully Created!',
|
|
33
|
+
description: 'Your group has been created successfully! Activate it now and start playing with friends.'
|
|
34
|
+
}];
|
|
35
|
+
const sections = ['header', 'intro', 'info', 'input'];
|
|
36
|
+
const CreateGroupWizard = ({
|
|
37
|
+
player,
|
|
38
|
+
refresh_key,
|
|
39
|
+
header_style,
|
|
40
|
+
footer_style,
|
|
41
|
+
onRequestAuthenticate,
|
|
42
|
+
onClose,
|
|
43
|
+
onInvitePlayers,
|
|
44
|
+
onFinish
|
|
45
|
+
}) => {
|
|
46
|
+
const Colors = useColors();
|
|
47
|
+
const [wiz_size, setSize] = useState({
|
|
48
|
+
height: 0,
|
|
49
|
+
width: 0
|
|
50
|
+
});
|
|
51
|
+
const [wiz_state, setState] = useState({
|
|
52
|
+
loading: false,
|
|
53
|
+
draft_group: GroupHelpers.generateGroup(),
|
|
54
|
+
group_players: [],
|
|
55
|
+
players: [],
|
|
56
|
+
active_step: wizard_steps[0]
|
|
57
|
+
});
|
|
58
|
+
const {
|
|
59
|
+
active_step,
|
|
60
|
+
loading,
|
|
61
|
+
draft_group,
|
|
62
|
+
group_players,
|
|
63
|
+
players
|
|
64
|
+
} = wiz_state;
|
|
65
|
+
const errors = GroupHelpers.isStepValid(active_step, draft_group);
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
GroupApi.setEnvironment();
|
|
68
|
+
refreshData();
|
|
69
|
+
}, [refresh_key]);
|
|
70
|
+
const refreshData = async () => {
|
|
71
|
+
if (!draft_group.group_id) {
|
|
72
|
+
return;
|
|
73
|
+
} //Group hasnt been created yet!
|
|
74
|
+
setState({
|
|
75
|
+
...wiz_state,
|
|
76
|
+
loading: true
|
|
77
|
+
});
|
|
78
|
+
const resp = await GroupApi.getGroupById(draft_group.group_id);
|
|
79
|
+
if (!resp) {
|
|
80
|
+
return setState({
|
|
81
|
+
...wiz_state,
|
|
82
|
+
loading: false
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
//Lets grab the players!
|
|
86
|
+
let player_ids = resp.group_players.map(p => p.player_id);
|
|
87
|
+
let plyers = await GroupApi.getPlayersByIds(player_ids);
|
|
88
|
+
setState({
|
|
89
|
+
...wiz_state,
|
|
90
|
+
draft_group: resp.group,
|
|
91
|
+
players: plyers,
|
|
92
|
+
group_players: resp.group_players,
|
|
93
|
+
loading: false
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
const handleDeleteAndClose = async () => {
|
|
97
|
+
setState({
|
|
98
|
+
...wiz_state,
|
|
99
|
+
loading: true
|
|
100
|
+
});
|
|
101
|
+
//If we created a group but are closing it - we need to delete the group
|
|
102
|
+
let deleted_group = await GroupApi.deleteGroup(draft_group.group_id);
|
|
103
|
+
if (!deleted_group) {
|
|
104
|
+
alert('Group was created. You can manage this group from your social tab');
|
|
105
|
+
}
|
|
106
|
+
//Reset state on close!
|
|
107
|
+
setState({
|
|
108
|
+
...wiz_state,
|
|
109
|
+
loading: false,
|
|
110
|
+
draft_group: GroupHelpers.generateGroup(),
|
|
111
|
+
group_players: [],
|
|
112
|
+
players: []
|
|
113
|
+
});
|
|
114
|
+
return onClose();
|
|
115
|
+
};
|
|
116
|
+
const handleClose = async () => {
|
|
117
|
+
if (!draft_group.group_id) {
|
|
118
|
+
return onClose();
|
|
119
|
+
}
|
|
120
|
+
showConfirmAlert('Are you sure?', 'Exiting now will delete the group in progress', async () => await handleDeleteAndClose(), () => console.log(''));
|
|
121
|
+
};
|
|
122
|
+
const handleFinishStep = async step => {
|
|
123
|
+
if (errors.length > 0) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
switch (step.step_key) {
|
|
127
|
+
case 'intro':
|
|
128
|
+
if (!player) {
|
|
129
|
+
return onRequestAuthenticate();
|
|
130
|
+
}
|
|
131
|
+
let first_step = wizard_steps.find(s => s.num == step.num + 1);
|
|
132
|
+
if (!first_step) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
setState({
|
|
136
|
+
...wiz_state,
|
|
137
|
+
loading: false,
|
|
138
|
+
active_step: first_step
|
|
139
|
+
});
|
|
140
|
+
return;
|
|
141
|
+
case 'info':
|
|
142
|
+
setState({
|
|
143
|
+
...wiz_state,
|
|
144
|
+
loading: true
|
|
145
|
+
});
|
|
146
|
+
let new_group = undefined;
|
|
147
|
+
if (draft_group.group_id) {
|
|
148
|
+
new_group = await GroupApi.updateGroup(draft_group);
|
|
149
|
+
} else {
|
|
150
|
+
new_group = await GroupApi.createGroup(draft_group.name, draft_group.description, draft_group.invite_code);
|
|
151
|
+
}
|
|
152
|
+
if (!new_group) {
|
|
153
|
+
alert('Unable to create group. Please try again later.');
|
|
154
|
+
return setState({
|
|
155
|
+
...wiz_state,
|
|
156
|
+
loading: false
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
let next_step = wizard_steps.find(s => s.num == step.num + 1);
|
|
160
|
+
if (!next_step) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
setState({
|
|
164
|
+
...wiz_state,
|
|
165
|
+
loading: false,
|
|
166
|
+
active_step: next_step,
|
|
167
|
+
draft_group: new_group
|
|
168
|
+
});
|
|
169
|
+
return;
|
|
170
|
+
case 'image':
|
|
171
|
+
if (!draft_group.group_id) {
|
|
172
|
+
return alert('Unable to process');
|
|
173
|
+
}
|
|
174
|
+
setState({
|
|
175
|
+
...wiz_state,
|
|
176
|
+
loading: true
|
|
177
|
+
});
|
|
178
|
+
let image_group = await GroupApi.updateGroup(draft_group);
|
|
179
|
+
if (!image_group) {
|
|
180
|
+
alert('Unable to create group. Please try again later.');
|
|
181
|
+
return setState({
|
|
182
|
+
...wiz_state,
|
|
183
|
+
loading: false
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
let next_image_step = wizard_steps.find(s => s.num == step.num + 1);
|
|
187
|
+
if (!next_image_step) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
setState({
|
|
191
|
+
...wiz_state,
|
|
192
|
+
loading: false,
|
|
193
|
+
active_step: next_image_step,
|
|
194
|
+
draft_group: image_group
|
|
195
|
+
});
|
|
196
|
+
return;
|
|
197
|
+
case 'invite':
|
|
198
|
+
let success_step = wizard_steps.find(s => s.num == step.num + 1);
|
|
199
|
+
if (!success_step) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
setState({
|
|
203
|
+
...wiz_state,
|
|
204
|
+
loading: false,
|
|
205
|
+
active_step: success_step
|
|
206
|
+
});
|
|
207
|
+
return;
|
|
208
|
+
case 'success':
|
|
209
|
+
if (!draft_group.group_id) {
|
|
210
|
+
return alert('Unable to activate group. Please try again');
|
|
211
|
+
}
|
|
212
|
+
setState({
|
|
213
|
+
...wiz_state,
|
|
214
|
+
loading: true
|
|
215
|
+
});
|
|
216
|
+
let activated_group = await GroupApi.activateGroup(draft_group.group_id);
|
|
217
|
+
if (!activated_group) {
|
|
218
|
+
alert('Unable to activate group. Please try again later.');
|
|
219
|
+
return setState({
|
|
220
|
+
...wiz_state,
|
|
221
|
+
loading: false
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
setState({
|
|
225
|
+
...wiz_state,
|
|
226
|
+
loading: false,
|
|
227
|
+
draft_group: activated_group
|
|
228
|
+
});
|
|
229
|
+
onFinish(activated_group, group_players);
|
|
230
|
+
return;
|
|
231
|
+
default:
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
const renderPlayers = data => {
|
|
236
|
+
const pl = players.find(p => p.player_id == data.item.player_id);
|
|
237
|
+
if (!pl) {
|
|
238
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
239
|
+
}
|
|
240
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
241
|
+
key: data.item.group_player_id.toString(),
|
|
242
|
+
float: true,
|
|
243
|
+
style: {
|
|
244
|
+
width: 100,
|
|
245
|
+
margin: 5
|
|
246
|
+
}
|
|
247
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
248
|
+
source: {
|
|
249
|
+
uri: pl.profile_pic
|
|
250
|
+
},
|
|
251
|
+
style: {
|
|
252
|
+
height: 50,
|
|
253
|
+
width: 100,
|
|
254
|
+
borderTopLeftRadius: 8,
|
|
255
|
+
borderTopRightRadius: 8
|
|
256
|
+
},
|
|
257
|
+
resizeMode: "cover"
|
|
258
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
259
|
+
transparent: true,
|
|
260
|
+
style: {
|
|
261
|
+
padding: 10
|
|
262
|
+
}
|
|
263
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
264
|
+
theme: "h1",
|
|
265
|
+
textAlign: "center"
|
|
266
|
+
}, "@", pl.username)));
|
|
267
|
+
};
|
|
268
|
+
const renderSections = data => {
|
|
269
|
+
switch (data.item) {
|
|
270
|
+
case 'header':
|
|
271
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
272
|
+
type: "header",
|
|
273
|
+
style: {
|
|
274
|
+
flexDirection: 'row',
|
|
275
|
+
alignItems: 'center',
|
|
276
|
+
padding: 10,
|
|
277
|
+
...header_style
|
|
278
|
+
}
|
|
279
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
280
|
+
transparent: true,
|
|
281
|
+
style: {
|
|
282
|
+
flex: 1
|
|
283
|
+
}
|
|
284
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
285
|
+
theme: "h1"
|
|
286
|
+
}, "Create Group Wizard"), /*#__PURE__*/React.createElement(Text, {
|
|
287
|
+
theme: "description",
|
|
288
|
+
style: {
|
|
289
|
+
marginTop: 3
|
|
290
|
+
}
|
|
291
|
+
}, "Complete the steps to create your group!")), /*#__PURE__*/React.createElement(Button, {
|
|
292
|
+
title: "X",
|
|
293
|
+
float: true,
|
|
294
|
+
title_color: Colors.text.error,
|
|
295
|
+
style: {
|
|
296
|
+
padding: 10
|
|
297
|
+
},
|
|
298
|
+
onPress: () => handleClose()
|
|
299
|
+
}));
|
|
300
|
+
case 'intro':
|
|
301
|
+
if (active_step?.step_key != 'intro') {
|
|
302
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
303
|
+
}
|
|
304
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Image, {
|
|
305
|
+
source: {
|
|
306
|
+
uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/w_1000,ar_16:9,c_fill,g_auto,e_sharpen/v1756998145/ChatGPT_Image_Sep_4_2025_10_00_58_AM_xemjix.png'
|
|
307
|
+
},
|
|
308
|
+
style: {
|
|
309
|
+
alignSelf: 'center',
|
|
310
|
+
width: wiz_size.width > 600 ? 600 : wiz_size.width,
|
|
311
|
+
height: wiz_size.width > 600 ? 300 : wiz_size.width * 0.5
|
|
312
|
+
},
|
|
313
|
+
resizeMode: "cover"
|
|
314
|
+
}));
|
|
315
|
+
case 'info':
|
|
316
|
+
if (!active_step) {
|
|
317
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
318
|
+
}
|
|
319
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
320
|
+
style: {
|
|
321
|
+
padding: 20
|
|
322
|
+
}
|
|
323
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
324
|
+
theme: "h1",
|
|
325
|
+
size: 40
|
|
326
|
+
}, active_step.title), /*#__PURE__*/React.createElement(Text, {
|
|
327
|
+
theme: "description",
|
|
328
|
+
size: 18,
|
|
329
|
+
color: errors.length > 0 ? Colors.text.warning : Colors.text.success,
|
|
330
|
+
style: {
|
|
331
|
+
marginTop: 10
|
|
332
|
+
}
|
|
333
|
+
}, active_step.description));
|
|
334
|
+
case 'input':
|
|
335
|
+
if (!active_step) {
|
|
336
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
337
|
+
}
|
|
338
|
+
switch (active_step.step_key) {
|
|
339
|
+
case 'info':
|
|
340
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
341
|
+
style: {
|
|
342
|
+
padding: 10
|
|
343
|
+
}
|
|
344
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
345
|
+
theme: "h1",
|
|
346
|
+
style: {
|
|
347
|
+
marginLeft: 10
|
|
348
|
+
}
|
|
349
|
+
}, "Group Name"), /*#__PURE__*/React.createElement(TextInput, {
|
|
350
|
+
value: draft_group.name,
|
|
351
|
+
style: {
|
|
352
|
+
margin: 10,
|
|
353
|
+
borderColor: draft_group.name ? Colors.text.success : Colors.text.warning
|
|
354
|
+
},
|
|
355
|
+
placeholder: "Give your group a name ...",
|
|
356
|
+
onChangeText: text => setState({
|
|
357
|
+
...wiz_state,
|
|
358
|
+
draft_group: {
|
|
359
|
+
...draft_group,
|
|
360
|
+
name: text
|
|
361
|
+
}
|
|
362
|
+
})
|
|
363
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
364
|
+
theme: "h1",
|
|
365
|
+
style: {
|
|
366
|
+
marginLeft: 10
|
|
367
|
+
}
|
|
368
|
+
}, "Group Description"), /*#__PURE__*/React.createElement(TextInput, {
|
|
369
|
+
value: draft_group.description,
|
|
370
|
+
style: {
|
|
371
|
+
margin: 10,
|
|
372
|
+
borderColor: draft_group.description ? Colors.text.success : Colors.text.warning
|
|
373
|
+
},
|
|
374
|
+
placeholder: "Add a short description ...",
|
|
375
|
+
onChangeText: text => setState({
|
|
376
|
+
...wiz_state,
|
|
377
|
+
draft_group: {
|
|
378
|
+
...draft_group,
|
|
379
|
+
description: text
|
|
380
|
+
}
|
|
381
|
+
})
|
|
382
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
383
|
+
theme: "h1",
|
|
384
|
+
style: {
|
|
385
|
+
marginLeft: 10
|
|
386
|
+
}
|
|
387
|
+
}, "Invite Code"), /*#__PURE__*/React.createElement(TextInput, {
|
|
388
|
+
value: draft_group.invite_code,
|
|
389
|
+
style: {
|
|
390
|
+
margin: 10,
|
|
391
|
+
borderColor: draft_group.invite_code ? Colors.text.success : Colors.text.warning
|
|
392
|
+
},
|
|
393
|
+
placeholder: "Add a unique code to find your group",
|
|
394
|
+
onChangeText: text => setState({
|
|
395
|
+
...wiz_state,
|
|
396
|
+
draft_group: {
|
|
397
|
+
...draft_group,
|
|
398
|
+
invite_code: text
|
|
399
|
+
}
|
|
400
|
+
})
|
|
401
|
+
}));
|
|
402
|
+
case 'image':
|
|
403
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
404
|
+
style: {
|
|
405
|
+
padding: 10,
|
|
406
|
+
justifyContent: 'center',
|
|
407
|
+
alignItems: 'center'
|
|
408
|
+
}
|
|
409
|
+
}, /*#__PURE__*/React.createElement(ImageUploader, {
|
|
410
|
+
public_id: `${draft_group.group_id}_${Math.random()}`,
|
|
411
|
+
onFinishUpload: obj => setState({
|
|
412
|
+
...wiz_state,
|
|
413
|
+
draft_group: {
|
|
414
|
+
...draft_group,
|
|
415
|
+
group_image: {
|
|
416
|
+
...obj,
|
|
417
|
+
url: obj.secure_url
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
})
|
|
421
|
+
}, draft_group.group_image?.url ? /*#__PURE__*/React.createElement(Image, {
|
|
422
|
+
source: {
|
|
423
|
+
uri: draft_group.group_image.url
|
|
424
|
+
},
|
|
425
|
+
style: {
|
|
426
|
+
height: wiz_size.width > 600 ? 600 : wiz_size.width,
|
|
427
|
+
width: wiz_size.width > 600 ? 600 : wiz_size.width
|
|
428
|
+
},
|
|
429
|
+
resizeMode: "contain"
|
|
430
|
+
}) : /*#__PURE__*/React.createElement(Icons.ImageIcon, {
|
|
431
|
+
size: 150,
|
|
432
|
+
color: Colors.text.h1
|
|
433
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
434
|
+
style: {
|
|
435
|
+
marginTop: 10
|
|
436
|
+
},
|
|
437
|
+
theme: "action",
|
|
438
|
+
textAlign: "center",
|
|
439
|
+
size: 18
|
|
440
|
+
}, draft_group.group_image?.url ? 'CHANGE' : 'ADD', " PHOTO")));
|
|
441
|
+
case 'invite':
|
|
442
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
443
|
+
style: {
|
|
444
|
+
padding: 10
|
|
445
|
+
}
|
|
446
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
447
|
+
title: group_players.length == 0 ? 'INVITE FRIENDS' : 'INVITE MORE',
|
|
448
|
+
type: "success",
|
|
449
|
+
onPress: () => onInvitePlayers()
|
|
450
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
451
|
+
style: {
|
|
452
|
+
margin: 10,
|
|
453
|
+
marginTop: 40
|
|
454
|
+
}
|
|
455
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
456
|
+
style: {
|
|
457
|
+
flexDirection: 'row',
|
|
458
|
+
flexWrap: 'wrap',
|
|
459
|
+
justifyContent: 'center'
|
|
460
|
+
}
|
|
461
|
+
}, group_players.filter(gp => gp.status != 'inactive').map((item, index) => {
|
|
462
|
+
return renderPlayers({
|
|
463
|
+
item,
|
|
464
|
+
index
|
|
465
|
+
});
|
|
466
|
+
}))));
|
|
467
|
+
case 'success':
|
|
468
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Image, {
|
|
469
|
+
source: {
|
|
470
|
+
uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1714410165/Welcome_banner_bqu6cc.webp'
|
|
471
|
+
},
|
|
472
|
+
style: {
|
|
473
|
+
alignSelf: 'center',
|
|
474
|
+
width: wiz_size.width > 500 ? 500 : wiz_size.width,
|
|
475
|
+
height: wiz_size.width > 500 ? 500 : wiz_size.width,
|
|
476
|
+
borderRadius: 4
|
|
477
|
+
},
|
|
478
|
+
resizeMode: "cover"
|
|
479
|
+
}));
|
|
480
|
+
default:
|
|
481
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
482
|
+
}
|
|
483
|
+
default:
|
|
484
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
488
|
+
style: {
|
|
489
|
+
flex: 1
|
|
490
|
+
}
|
|
491
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
492
|
+
style: {
|
|
493
|
+
flex: 1
|
|
494
|
+
},
|
|
495
|
+
onLayout: ev => {
|
|
496
|
+
const {
|
|
497
|
+
height,
|
|
498
|
+
width
|
|
499
|
+
} = ev.nativeEvent.layout;
|
|
500
|
+
setSize({
|
|
501
|
+
height,
|
|
502
|
+
width
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
}, /*#__PURE__*/React.createElement(FlatList, {
|
|
506
|
+
data: sections,
|
|
507
|
+
key: 'create_group_steps',
|
|
508
|
+
keyExtractor: item => item,
|
|
509
|
+
renderItem: renderSections
|
|
510
|
+
})), active_step.step_key == 'intro' ? /*#__PURE__*/React.createElement(View, {
|
|
511
|
+
type: "footer",
|
|
512
|
+
style: {
|
|
513
|
+
flexDirection: 'row',
|
|
514
|
+
alignItems: 'center',
|
|
515
|
+
padding: 10,
|
|
516
|
+
...footer_style
|
|
517
|
+
}
|
|
518
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
519
|
+
style: {
|
|
520
|
+
flex: 1
|
|
521
|
+
},
|
|
522
|
+
title: "GET STARTED!",
|
|
523
|
+
type: "success",
|
|
524
|
+
onPress: () => handleFinishStep(active_step)
|
|
525
|
+
})) : /*#__PURE__*/React.createElement(View, {
|
|
526
|
+
type: "footer",
|
|
527
|
+
style: {
|
|
528
|
+
flexDirection: 'row',
|
|
529
|
+
alignItems: 'center',
|
|
530
|
+
padding: 10,
|
|
531
|
+
...footer_style
|
|
532
|
+
}
|
|
533
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
534
|
+
disabled: loading || active_step?.num == 1 ? true : false,
|
|
535
|
+
float: true,
|
|
536
|
+
onPress: () => {
|
|
537
|
+
let prev_step = wizard_steps.find(s => s.num == active_step?.num - 1);
|
|
538
|
+
if (!prev_step) {
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
setState({
|
|
542
|
+
...wiz_state,
|
|
543
|
+
active_step: prev_step
|
|
544
|
+
});
|
|
545
|
+
},
|
|
546
|
+
style: {
|
|
547
|
+
borderRadius: 100,
|
|
548
|
+
padding: 0,
|
|
549
|
+
height: 50,
|
|
550
|
+
width: 50,
|
|
551
|
+
justifyContent: 'center',
|
|
552
|
+
alignItems: 'center',
|
|
553
|
+
opacity: active_step?.num == 1 ? 0.5 : 1
|
|
554
|
+
}
|
|
555
|
+
}, /*#__PURE__*/React.createElement(Icons.ChevronIcon, {
|
|
556
|
+
direction: "left",
|
|
557
|
+
size: 14,
|
|
558
|
+
color: Colors.text.h1
|
|
559
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
560
|
+
transparent: true,
|
|
561
|
+
style: {
|
|
562
|
+
flex: 1
|
|
563
|
+
}
|
|
564
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
565
|
+
theme: "h1",
|
|
566
|
+
textAlign: "center"
|
|
567
|
+
}, "Step ", active_step.num, " of ", wizard_steps.length)), active_step?.step_key == 'success' ? /*#__PURE__*/React.createElement(Button, {
|
|
568
|
+
type: "success",
|
|
569
|
+
title: "ACTIVATE",
|
|
570
|
+
onPress: () => handleFinishStep(active_step)
|
|
571
|
+
}) : /*#__PURE__*/React.createElement(Button, {
|
|
572
|
+
float: true,
|
|
573
|
+
disabled: loading ? true : false,
|
|
574
|
+
loading: loading,
|
|
575
|
+
style: {
|
|
576
|
+
borderRadius: 100,
|
|
577
|
+
padding: 0,
|
|
578
|
+
height: 50,
|
|
579
|
+
width: 50,
|
|
580
|
+
justifyContent: 'center',
|
|
581
|
+
alignItems: 'center',
|
|
582
|
+
opacity: errors.length > 0 || loading ? 0.5 : 1
|
|
583
|
+
},
|
|
584
|
+
onPress: () => {
|
|
585
|
+
if (errors.length > 0) {
|
|
586
|
+
return alert(errors.map(e => e));
|
|
587
|
+
}
|
|
588
|
+
handleFinishStep(active_step);
|
|
589
|
+
}
|
|
590
|
+
}, /*#__PURE__*/React.createElement(Icons.ChevronIcon, {
|
|
591
|
+
direction: "right",
|
|
592
|
+
size: 14,
|
|
593
|
+
color: errors.length > 0 ? Colors.text.h1 : Colors.text.success
|
|
594
|
+
}))));
|
|
595
|
+
};
|
|
596
|
+
export default CreateGroupWizard;
|
|
597
|
+
//# sourceMappingURL=CreateGroupWizard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","Button","Text","TextInput","View","FlatList","Image","Icons","useColors","GroupApi","GroupHelpers","ImageUploader","showConfirmAlert","wizard_steps","num","step_key","title","description","sections","CreateGroupWizard","player","refresh_key","header_style","footer_style","onRequestAuthenticate","onClose","onInvitePlayers","onFinish","Colors","wiz_size","setSize","height","width","wiz_state","setState","loading","draft_group","generateGroup","group_players","players","active_step","errors","isStepValid","setEnvironment","refreshData","group_id","resp","getGroupById","player_ids","map","p","player_id","plyers","getPlayersByIds","group","handleDeleteAndClose","deleted_group","deleteGroup","alert","handleClose","console","log","handleFinishStep","step","length","first_step","find","s","new_group","undefined","updateGroup","createGroup","name","invite_code","next_step","image_group","next_image_step","success_step","activated_group","activateGroup","renderPlayers","data","pl","item","createElement","Fragment","key","group_player_id","toString","float","style","margin","source","uri","profile_pic","borderTopLeftRadius","borderTopRightRadius","resizeMode","transparent","padding","theme","textAlign","username","renderSections","type","flexDirection","alignItems","flex","marginTop","title_color","text","error","onPress","alignSelf","size","color","warning","success","marginLeft","value","borderColor","placeholder","onChangeText","justifyContent","public_id","Math","random","onFinishUpload","obj","group_image","url","secure_url","ImageIcon","h1","flexWrap","filter","gp","status","index","borderRadius","onLayout","ev","nativeEvent","layout","keyExtractor","renderItem","disabled","prev_step","opacity","ChevronIcon","direction","e"],"sourceRoot":"../../../../src","sources":["Group/components/CreateGroupWizard.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,MAAM,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,yBAAyB;AACvE,SAASC,QAAQ,EAAEC,KAAK,QAAwB,cAAc;AAE9D,SAASC,KAAK,QAAQ,kBAAkB;AACxC,SAASC,SAAS,QAAQ,2BAA2B;AACrD,SAASC,QAAQ,EAAEC,YAAY,QAAQ,QAAQ;AAC/C,OAAOC,aAAa,MAAM,gCAAgC;AAC1D,SAASC,gBAAgB,QAAQ,+BAA+B;AAehE,MAAMC,YAAmC,GAAG,CACxC;EAAEC,GAAG,EAAE,CAAC;EAAEC,QAAQ,EAAC,OAAO;EAAEC,KAAK,EAAE,mBAAmB;EAAEC,WAAW,EAAE;AAAgJ,CAAC,EACtN;EAAEH,GAAG,EAAE,CAAC;EAAEC,QAAQ,EAAC,MAAM;EAAEC,KAAK,EAAE,qBAAqB;EAAEC,WAAW,EAAE;AAAuG,CAAC,EAC9K;EAAEH,GAAG,EAAE,CAAC;EAAEC,QAA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,CAACtB,WAAW,CAAC;IACjC;EAAE,gBAEF1C,KAAA,CAAAsF,aAAA,CAAC7E,KAAK,CAAC8I,WAAW;IAACC,SAAS,EAAC,OAAO;IAACpC,IAAI,EAAE,EAAG;IAACC,KAAK,EAAE1E,MAAM,CAACuB,MAAM,GAAG,CAAC,GAAGpC,MAAM,CAACkF,IAAI,CAACuB,EAAE,GAAEzG,MAAM,CAACkF,IAAI,CAACO;EAAQ,CAAE,CAC5G,CAEN,CAEJ,CAAC;AAEf,CAAC;AAED,eAAelG,iBAAiB","ignoreList":[]}
|
|
@@ -2,9 +2,11 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import { Button, Text, View } from "../../Components/Themed";
|
|
3
3
|
import { GroupApi } from '../api';
|
|
4
4
|
const GroupPlayerActionForm = ({
|
|
5
|
+
me,
|
|
5
6
|
group,
|
|
6
7
|
group_player,
|
|
7
8
|
onResponse,
|
|
9
|
+
onRequestAuthenticate,
|
|
8
10
|
onClose
|
|
9
11
|
}) => {
|
|
10
12
|
const [action_loading, setActionLoading] = useState(false);
|
|
@@ -109,7 +111,7 @@ const GroupPlayerActionForm = ({
|
|
|
109
111
|
borderBottomRightRadius: 8,
|
|
110
112
|
borderBottomLeftRadius: 8
|
|
111
113
|
}
|
|
112
|
-
}, group_player?.status == 'invited' ? /*#__PURE__*/React.createElement(Button, {
|
|
114
|
+
}, me && group_player?.status == 'invited' ? /*#__PURE__*/React.createElement(Button, {
|
|
113
115
|
title: "DECLINE",
|
|
114
116
|
type: "error",
|
|
115
117
|
loading: action_loading,
|
|
@@ -120,7 +122,7 @@ const GroupPlayerActionForm = ({
|
|
|
120
122
|
},
|
|
121
123
|
disabled: action_loading,
|
|
122
124
|
onPress: () => handleDecline()
|
|
123
|
-
}) : /*#__PURE__*/React.createElement(React.Fragment, null), group_player?.status == 'invited' ? /*#__PURE__*/React.createElement(Button, {
|
|
125
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null), me && group_player?.status == 'invited' ? /*#__PURE__*/React.createElement(Button, {
|
|
124
126
|
title: "ACCEPT",
|
|
125
127
|
type: "success",
|
|
126
128
|
loading: action_loading,
|
|
@@ -131,7 +133,7 @@ const GroupPlayerActionForm = ({
|
|
|
131
133
|
},
|
|
132
134
|
disabled: action_loading,
|
|
133
135
|
onPress: () => handleAccept()
|
|
134
|
-
}) : /*#__PURE__*/React.createElement(React.Fragment, null), group_player?.status == 'active' ? /*#__PURE__*/React.createElement(Button, {
|
|
136
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null), me && group_player?.status == 'active' ? /*#__PURE__*/React.createElement(Button, {
|
|
135
137
|
title: "LEAVE GROUP",
|
|
136
138
|
type: "error",
|
|
137
139
|
loading: action_loading,
|
|
@@ -142,7 +144,18 @@ const GroupPlayerActionForm = ({
|
|
|
142
144
|
},
|
|
143
145
|
disabled: action_loading,
|
|
144
146
|
onPress: () => handleLeave()
|
|
145
|
-
}) : /*#__PURE__*/React.createElement(React.Fragment, null), !
|
|
147
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null), !me ? /*#__PURE__*/React.createElement(Button, {
|
|
148
|
+
title: "SIGN IN / UP",
|
|
149
|
+
type: "success",
|
|
150
|
+
loading: action_loading,
|
|
151
|
+
style: {
|
|
152
|
+
flex: 1,
|
|
153
|
+
opacity: action_loading ? 0.5 : 1,
|
|
154
|
+
margin: 5
|
|
155
|
+
},
|
|
156
|
+
disabled: action_loading,
|
|
157
|
+
onPress: () => onRequestAuthenticate()
|
|
158
|
+
}) : !group_player || group_player.status == 'inactive' ? /*#__PURE__*/React.createElement(Button, {
|
|
146
159
|
title: "JOIN GROUP",
|
|
147
160
|
type: "success",
|
|
148
161
|
loading: action_loading,
|