@plusscommunities/pluss-circles-app-groups 1.2.2-beta.0

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.
Files changed (130) hide show
  1. package/dist/module/actions/ChatActions.js +81 -0
  2. package/dist/module/actions/ChatActions.js.map +1 -0
  3. package/dist/module/actions/GroupActions.js +335 -0
  4. package/dist/module/actions/GroupActions.js.map +1 -0
  5. package/dist/module/actions/index.js +41 -0
  6. package/dist/module/actions/index.js.map +1 -0
  7. package/dist/module/actions/types.js +26 -0
  8. package/dist/module/actions/types.js.map +1 -0
  9. package/dist/module/assets/fonts.js +3 -0
  10. package/dist/module/assets/fonts.js.map +1 -0
  11. package/dist/module/components/chat/Chat.js +613 -0
  12. package/dist/module/components/chat/Chat.js.map +1 -0
  13. package/dist/module/components/chat/ChatList.js +557 -0
  14. package/dist/module/components/chat/ChatList.js.map +1 -0
  15. package/dist/module/components/chat/ContactsList.js +204 -0
  16. package/dist/module/components/chat/ContactsList.js.map +1 -0
  17. package/dist/module/components/chat/KioskPeoplePage.js +345 -0
  18. package/dist/module/components/chat/KioskPeoplePage.js.map +1 -0
  19. package/dist/module/components/chat/PeopleContainer.js +24 -0
  20. package/dist/module/components/chat/PeopleContainer.js.map +1 -0
  21. package/dist/module/components/chat/PeoplePage.js +438 -0
  22. package/dist/module/components/chat/PeoplePage.js.map +1 -0
  23. package/dist/module/components/common/index.js +26 -0
  24. package/dist/module/components/common/index.js.map +1 -0
  25. package/dist/module/components/events/EventInvitePopup.js +563 -0
  26. package/dist/module/components/events/EventInvitePopup.js.map +1 -0
  27. package/dist/module/components/groups/EditGroup.js +548 -0
  28. package/dist/module/components/groups/EditGroup.js.map +1 -0
  29. package/dist/module/components/groups/GroupDetails.js +388 -0
  30. package/dist/module/components/groups/GroupDetails.js.map +1 -0
  31. package/dist/module/components/groups/GroupsList.js +111 -0
  32. package/dist/module/components/groups/GroupsList.js.map +1 -0
  33. package/dist/module/components/groups/GroupsWidget.js +150 -0
  34. package/dist/module/components/groups/GroupsWidget.js.map +1 -0
  35. package/dist/module/components/groups/NewGroup.js +703 -0
  36. package/dist/module/components/groups/NewGroup.js.map +1 -0
  37. package/dist/module/components/groups/PublicGroup.js +131 -0
  38. package/dist/module/components/groups/PublicGroup.js.map +1 -0
  39. package/dist/module/components/groups/PublicGroupAction.js +296 -0
  40. package/dist/module/components/groups/PublicGroupAction.js.map +1 -0
  41. package/dist/module/components/notifications/GroupInvite.js +166 -0
  42. package/dist/module/components/notifications/GroupInvite.js.map +1 -0
  43. package/dist/module/components/notifications/GroupInviteAction.js +338 -0
  44. package/dist/module/components/notifications/GroupInviteAction.js.map +1 -0
  45. package/dist/module/components/notifications/GroupMessage.js +131 -0
  46. package/dist/module/components/notifications/GroupMessage.js.map +1 -0
  47. package/dist/module/components/takeover/TakeoverBackground.js +27 -0
  48. package/dist/module/components/takeover/TakeoverBackground.js.map +1 -0
  49. package/dist/module/config/index.js +9 -0
  50. package/dist/module/config/index.js.map +1 -0
  51. package/dist/module/core.config.js +17 -0
  52. package/dist/module/core.config.js.map +1 -0
  53. package/dist/module/feature.config.js +266 -0
  54. package/dist/module/feature.config.js.map +1 -0
  55. package/dist/module/index.js +27 -0
  56. package/dist/module/index.js.map +1 -0
  57. package/dist/module/js/Colors.js +17 -0
  58. package/dist/module/js/Colors.js.map +1 -0
  59. package/dist/module/js/NavigationService.js +8 -0
  60. package/dist/module/js/NavigationService.js.map +1 -0
  61. package/dist/module/js/Styles.js +3 -0
  62. package/dist/module/js/Styles.js.map +1 -0
  63. package/dist/module/js/circles/MapStateToDirectMessages.js +11 -0
  64. package/dist/module/js/circles/MapStateToDirectMessages.js.map +1 -0
  65. package/dist/module/js/index.js +21 -0
  66. package/dist/module/js/index.js.map +1 -0
  67. package/dist/module/reducers/ChatsReducer.js +82 -0
  68. package/dist/module/reducers/ChatsReducer.js.map +1 -0
  69. package/dist/module/reducers/GroupsReducer.js +174 -0
  70. package/dist/module/reducers/GroupsReducer.js.map +1 -0
  71. package/dist/module/reducers/reducerKeys.js +4 -0
  72. package/dist/module/reducers/reducerKeys.js.map +1 -0
  73. package/dist/module/values.config.default.js +33 -0
  74. package/dist/module/values.config.default.js.map +1 -0
  75. package/dist/module/values.config.groups.js +33 -0
  76. package/dist/module/values.config.groups.js.map +1 -0
  77. package/dist/module/values.config.js +33 -0
  78. package/dist/module/values.config.js.map +1 -0
  79. package/dist/module/webapi/circleActions.js +127 -0
  80. package/dist/module/webapi/circleActions.js.map +1 -0
  81. package/dist/module/webapi/helper.js +4 -0
  82. package/dist/module/webapi/helper.js.map +1 -0
  83. package/dist/module/webapi/index.js +7 -0
  84. package/dist/module/webapi/index.js.map +1 -0
  85. package/dist/module/webapi/messageActions.js +45 -0
  86. package/dist/module/webapi/messageActions.js.map +1 -0
  87. package/package.json +55 -0
  88. package/src/actions/ChatActions.js +92 -0
  89. package/src/actions/GroupActions.js +368 -0
  90. package/src/actions/index.js +43 -0
  91. package/src/actions/types.js +29 -0
  92. package/src/assets/fonts.js +3 -0
  93. package/src/components/chat/Chat.js +568 -0
  94. package/src/components/chat/ChatList.js +491 -0
  95. package/src/components/chat/ContactsList.js +168 -0
  96. package/src/components/chat/KioskPeoplePage.js +317 -0
  97. package/src/components/chat/PeopleContainer.js +21 -0
  98. package/src/components/chat/PeoplePage.js +418 -0
  99. package/src/components/common/index.js +26 -0
  100. package/src/components/events/EventInvitePopup.js +508 -0
  101. package/src/components/groups/EditGroup.js +486 -0
  102. package/src/components/groups/GroupDetails.js +335 -0
  103. package/src/components/groups/GroupsList.js +93 -0
  104. package/src/components/groups/GroupsWidget.js +134 -0
  105. package/src/components/groups/NewGroup.js +650 -0
  106. package/src/components/groups/PublicGroup.js +116 -0
  107. package/src/components/groups/PublicGroupAction.js +266 -0
  108. package/src/components/notifications/GroupInvite.js +154 -0
  109. package/src/components/notifications/GroupInviteAction.js +295 -0
  110. package/src/components/notifications/GroupMessage.js +114 -0
  111. package/src/components/takeover/TakeoverBackground.js +26 -0
  112. package/src/config/index.js +9 -0
  113. package/src/core.config.js +5 -0
  114. package/src/feature.config.js +274 -0
  115. package/src/index.js +24 -0
  116. package/src/js/Colors.js +17 -0
  117. package/src/js/NavigationService.js +9 -0
  118. package/src/js/Styles.js +3 -0
  119. package/src/js/circles/MapStateToDirectMessages.js +10 -0
  120. package/src/js/index.js +24 -0
  121. package/src/reducers/ChatsReducer.js +63 -0
  122. package/src/reducers/GroupsReducer.js +142 -0
  123. package/src/reducers/reducerKeys.js +4 -0
  124. package/src/values.config.default.js +39 -0
  125. package/src/values.config.groups.js +39 -0
  126. package/src/values.config.js +39 -0
  127. package/src/webapi/circleActions.js +104 -0
  128. package/src/webapi/helper.js +4 -0
  129. package/src/webapi/index.js +8 -0
  130. package/src/webapi/messageActions.js +39 -0
@@ -0,0 +1,703 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ import React, { Component } from 'react';
4
+ import _ from 'lodash';
5
+ import { connect } from 'react-redux';
6
+ import { Dimensions, ImageBackground, Text, ScrollView, TouchableOpacity, View, KeyboardAvoidingView, Platform } from 'react-native';
7
+ import { Icon } from 'react-native-elements';
8
+ import { ProfilePic, FormCard, FormCardSection, Header, Input, Spinner, ImageUploader, InlineButton, StickyFooter, Toggle } from '../common';
9
+ import { TEXT_DARK, LINEGREY, COLOUR_TEAL, getMainBrandingColourFromState } from '../../js/Colors';
10
+ import stylez from '../../js/Styles';
11
+ import NavigationService from '../../js/NavigationService';
12
+ import { COLOUR_PURPLE, COLOUR_TANGERINE, TEXT_LIGHT, getSite, getSiteSettingFromState } from '../../js/index';
13
+ import { createGroup } from '../../actions';
14
+ import EventInvitePopup from '../events/EventInvitePopup';
15
+ import { circleActions } from '../../webapi';
16
+ import { values } from '../../values.config';
17
+ const PHOTO_WIDTH = Dimensions.get('window').width - 48;
18
+ const PHOTO_HEIGHT = Dimensions.get('window').width > 600 ? PHOTO_WIDTH * 0.6 : PHOTO_WIDTH * 0.8;
19
+
20
+ class NewGroup extends Component {
21
+ constructor(props) {
22
+ super(props);
23
+
24
+ _defineProperty(this, "onUploadStarted", () => {
25
+ this.setState({
26
+ uploadingImage: true
27
+ });
28
+ });
29
+
30
+ _defineProperty(this, "onUploadSuccess", uri => {
31
+ this.setState({
32
+ uploadingImage: false,
33
+ groupImage: uri.replace('/general/', '/general1400/')
34
+ });
35
+ });
36
+
37
+ _defineProperty(this, "onUploadFailed", () => {
38
+ this.setState({
39
+ uploadingImage: false,
40
+ groupImage: null
41
+ });
42
+ });
43
+
44
+ this.state = {
45
+ title: '',
46
+ submittingGroup: false,
47
+ groupImage: null,
48
+ selected: [],
49
+ visibility: 'private',
50
+ inviteOpen: false,
51
+ page: 2
52
+ };
53
+ this.visibilityOptions = [{
54
+ text: `Public ${values.entityName}`,
55
+ val: 'public'
56
+ }, {
57
+ text: `Private ${values.entityName}`,
58
+ val: 'private'
59
+ }];
60
+ }
61
+
62
+ onPressBack() {
63
+ NavigationService.goBack();
64
+ }
65
+
66
+ onSubmitSend() {
67
+ if (!this.props.connected) {
68
+ return;
69
+ }
70
+
71
+ if (this.state.submittingGroup) {
72
+ return;
73
+ }
74
+
75
+ this.setState({
76
+ submittingGroup: true
77
+ });
78
+ const audience = [{
79
+ userId: this.props.user.uid,
80
+ profilePic: this.props.user.profilePic,
81
+ displayName: this.props.user.displayName
82
+ }];
83
+
84
+ if (this.state.selected.length > 0) {
85
+ this.state.selected.forEach(user => {
86
+ audience.push({
87
+ userId: user.userId,
88
+ displayName: user.displayName,
89
+ profilePic: user.profilePic
90
+ });
91
+ });
92
+ }
93
+
94
+ circleActions.add(getSite(this.props.user.site), this.state.title, this.state.groupImage, audience, this.state.visibility === 'public').then(res => {
95
+ if (this.props.onSubmissionSuccess) this.props.onSubmissionSuccess(res.data);
96
+ this.props.createGroup(res.data);
97
+ NavigationService.navigate(values.screenCircleChat, {
98
+ chat: res.data,
99
+ new: true,
100
+ back: values.screenCircleChatList
101
+ });
102
+ }).catch(err => {
103
+ console.log('Circle creation error');
104
+ console.log(err);
105
+ this.setState({
106
+ submittingGroup: false
107
+ });
108
+ });
109
+ }
110
+
111
+ onPressToggle(option) {
112
+ this.setState({
113
+ visibility: option.val
114
+ });
115
+ }
116
+
117
+ onChangeTitle(value) {
118
+ this.setState({
119
+ title: value
120
+ });
121
+ }
122
+
123
+ addToAudience(user) {
124
+ const newSelected = [...this.state.selected];
125
+ newSelected.push(user);
126
+ this.setState({
127
+ selected: newSelected
128
+ });
129
+ }
130
+
131
+ removeFromAudience(user) {
132
+ let newSelected = [...this.state.selected];
133
+ newSelected = _.filter(newSelected, item => {
134
+ return item.userId !== user.userId;
135
+ });
136
+ this.setState({
137
+ selected: newSelected
138
+ });
139
+ }
140
+
141
+ closeInvitePopup() {
142
+ this.setState({
143
+ inviteOpen: false
144
+ });
145
+ }
146
+
147
+ openInvite() {
148
+ this.setState({
149
+ inviteOpen: true
150
+ });
151
+ }
152
+
153
+ nextPage() {
154
+ this.setState({
155
+ page: 2,
156
+ title: this.state.title
157
+ });
158
+ }
159
+
160
+ clickCreate() {
161
+ if (this.state.title.length < 1) {
162
+ return;
163
+ }
164
+
165
+ if (this.state.uploadingImage) {
166
+ return;
167
+ }
168
+
169
+ this.onSubmitSend();
170
+ }
171
+
172
+ showUploadMenu() {
173
+ if (this.state.uploadingImage || this.state.submittingGroup) {
174
+ return;
175
+ }
176
+
177
+ this.imageUploader.showUploadMenu();
178
+ }
179
+
180
+ renderInvitePopup() {
181
+ return /*#__PURE__*/React.createElement(EventInvitePopup, {
182
+ isNewEvent: true,
183
+ onNewEventInvite: this.addToAudience.bind(this),
184
+ onNewEventRemove: this.removeFromAudience.bind(this),
185
+ isSearchable: true,
186
+ invited: this.state.selected,
187
+ visible: this.state.inviteOpen,
188
+ onClose: this.closeInvitePopup.bind(this),
189
+ inviteText: "Add",
190
+ invitedText: "Remove"
191
+ });
192
+ }
193
+
194
+ renderUploadMenu() {
195
+ return /*#__PURE__*/React.createElement(ImageUploader, {
196
+ ref: ref => this.imageUploader = ref,
197
+ onUploadStarted: this.onUploadStarted,
198
+ onUploadSuccess: this.onUploadSuccess,
199
+ onUploadFailed: this.onUploadFailed,
200
+ onLibrarySelected: this.onUploadSuccess,
201
+ size: {
202
+ width: 700
203
+ },
204
+ quality: 0.8,
205
+ fileName: "groupImage",
206
+ popupTitle: `Add ${_.capitalize(values.entityName)} Cover Image`
207
+ });
208
+ }
209
+
210
+ renderInnerImage() {
211
+ if (!this.state.uploadingImage && this.state.groupImage === null) {
212
+ return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Icon, {
213
+ name: "camera",
214
+ type: "font-awesome",
215
+ iconStyle: {
216
+ color: TEXT_LIGHT,
217
+ fontSize: 20,
218
+ marginBottom: 13
219
+ }
220
+ }), /*#__PURE__*/React.createElement(Text, {
221
+ style: {
222
+ fontSize: 13,
223
+ fontFamily: 'sf-regular',
224
+ color: TEXT_LIGHT
225
+ }
226
+ }, "Upload ", values.entityName, " image"));
227
+ }
228
+
229
+ return this.renderImage();
230
+ }
231
+
232
+ renderImage() {
233
+ if (this.state.uploadingImage) {
234
+ return /*#__PURE__*/React.createElement(Spinner, null);
235
+ }
236
+
237
+ if (this.state.groupImage) {
238
+ return /*#__PURE__*/React.createElement(ImageBackground, {
239
+ style: {
240
+ flex: 1,
241
+ height: '100%',
242
+ width: '100%',
243
+ borderRadius: 4,
244
+ justifyContent: 'center',
245
+ alignContent: 'center'
246
+ },
247
+ imageStyle: {
248
+ borderRadius: 4
249
+ },
250
+ source: {
251
+ uri: this.state.groupImage
252
+ }
253
+ }, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Icon, {
254
+ name: "camera",
255
+ type: "font-awesome",
256
+ iconStyle: {
257
+ color: '#fff',
258
+ fontSize: 20,
259
+ marginBottom: 13
260
+ }
261
+ }), /*#__PURE__*/React.createElement(Text, {
262
+ style: {
263
+ fontSize: 13,
264
+ fontFamily: 'sf-regular',
265
+ color: '#fff',
266
+ textAlign: 'center'
267
+ }
268
+ }, "Upload ", values.entityName, " image")));
269
+ }
270
+
271
+ return null;
272
+ }
273
+
274
+ renderPage() {
275
+ return this.renderForm();
276
+ }
277
+
278
+ renderVisibilityToggle() {
279
+ if (!this.props.circleAllowPublicCircles) {
280
+ return null;
281
+ }
282
+
283
+ if (this.props.user.category === 'family') {
284
+ return null;
285
+ }
286
+
287
+ return /*#__PURE__*/React.createElement(View, {
288
+ style: styles.toggleContainer
289
+ }, /*#__PURE__*/React.createElement(Toggle, {
290
+ options: this.visibilityOptions,
291
+ onPress: this.onPressToggle.bind(this),
292
+ activeVal: this.state.visibility
293
+ }));
294
+ }
295
+
296
+ renderTitleEntry() {
297
+ return /*#__PURE__*/React.createElement(View, {
298
+ style: styles.container
299
+ }, /*#__PURE__*/React.createElement(ScrollView, {
300
+ style: styles.container,
301
+ keyboardShouldPersistTaps: "handled"
302
+ }, /*#__PURE__*/React.createElement(View, {
303
+ style: {
304
+ paddingHorizontal: 24,
305
+ paddingBottom: 10,
306
+ paddingTop: 20
307
+ }
308
+ }, /*#__PURE__*/React.createElement(Input, {
309
+ autoFocus: true,
310
+ label: this.state.title.length > 0 ? `${_.capitalize(values.entityName)} name` : ' ',
311
+ labelStyle: {
312
+ fontSize: 13,
313
+ color: '#fff'
314
+ },
315
+ placeholder: `${_.capitalize(values.entityName)} name`,
316
+ placeholderTextColor: "rgba(255,255,255,0.5)",
317
+ value: this.state.title,
318
+ onChangeText: value => {
319
+ this.onChangeTitle(value);
320
+ },
321
+ textStyle: {
322
+ marginTop: 10,
323
+ fontSize: 28,
324
+ color: '#fff',
325
+ fontFamily: 'sf-semibold'
326
+ }
327
+ }))), this.state.title.length > 0 && /*#__PURE__*/React.createElement(View, {
328
+ style: [styles.footer, {
329
+ paddingBottom: 16
330
+ }]
331
+ }, /*#__PURE__*/React.createElement(InlineButton, {
332
+ color: "#fff",
333
+ textStyle: {
334
+ color: this.props.colourBrandingMain
335
+ },
336
+ onPress: this.nextPage.bind(this),
337
+ touchableStyle: styles.footerButton,
338
+ style: {
339
+ height: 50
340
+ },
341
+ fillTouchable: true,
342
+ large: true
343
+ }, "Create ", values.entityName)));
344
+ }
345
+
346
+ renderForm() {
347
+ return /*#__PURE__*/React.createElement(ScrollView, {
348
+ style: [styles.container, styles.greyContainer],
349
+ keyboardShouldPersistTaps: "handled"
350
+ }, this.state.submittingGroup && /*#__PURE__*/React.createElement(View, {
351
+ style: {
352
+ marginTop: 16
353
+ }
354
+ }, /*#__PURE__*/React.createElement(Spinner, {
355
+ size: "small"
356
+ })), this.renderVisibilityToggle(), /*#__PURE__*/React.createElement(FormCard, {
357
+ style: {
358
+ marginTop: 16
359
+ }
360
+ }, /*#__PURE__*/React.createElement(FormCardSection, {
361
+ label: `${_.capitalize(values.entityName)} name`,
362
+ placeholder: `${_.capitalize(values.entityName)} name`,
363
+ textValue: this.state.title,
364
+ onChangeText: value => {
365
+ this.onChangeTitle(value);
366
+ },
367
+ editable: this.state.submittingGroup === false,
368
+ isValid: () => {
369
+ return this.state.title.length > 1;
370
+ },
371
+ required: true
372
+ })), /*#__PURE__*/React.createElement(View, {
373
+ style: {
374
+ padding: 24
375
+ }
376
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
377
+ activeOpacity: 0.8,
378
+ onPress: this.showUploadMenu.bind(this)
379
+ }, /*#__PURE__*/React.createElement(View, {
380
+ style: styles.imageContainer
381
+ }, this.renderInnerImage()))));
382
+ }
383
+
384
+ renderPreviewAtts() {
385
+ return /*#__PURE__*/React.createElement(View, {
386
+ style: styles.attendeePreviews
387
+ }, this.state.selected.map((user, index) => {
388
+ if (index < 3) {
389
+ return /*#__PURE__*/React.createElement(ProfilePic, {
390
+ ProfilePic: user.profilePic,
391
+ Diameter: 36,
392
+ style: [styles.profilePic, {
393
+ left: index * -20
394
+ }],
395
+ key: user.userId
396
+ });
397
+ }
398
+
399
+ return null;
400
+ }));
401
+ }
402
+
403
+ renderInviteButton() {
404
+ if (this.state.selected.length === 0) {
405
+ return /*#__PURE__*/React.createElement(InlineButton, {
406
+ color: this.props.colourBrandingMain,
407
+ onPress: this.openInvite.bind(this),
408
+ touchableStyle: styles.footerButton,
409
+ fillTouchable: true,
410
+ large: true
411
+ }, "Select members");
412
+ }
413
+
414
+ return /*#__PURE__*/React.createElement(View, {
415
+ style: {
416
+ flexDirection: 'row'
417
+ }
418
+ }, this.renderPreviewAtts(), /*#__PURE__*/React.createElement(View, {
419
+ style: styles.fill
420
+ }, /*#__PURE__*/React.createElement(InlineButton, {
421
+ onPress: this.openInvite.bind(this),
422
+ style: styles.inviteButton,
423
+ color: this.props.colourBrandingMain,
424
+ large: true
425
+ }, "Select members"), /*#__PURE__*/React.createElement(Text, {
426
+ style: styles.tix
427
+ }, /*#__PURE__*/React.createElement(Text, null, this.state.selected.length), ' selected')));
428
+ }
429
+
430
+ render() {
431
+ return /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
432
+ behavior: Platform.OS === 'ios' && 'padding',
433
+ style: styles.viewContainer
434
+ }, this.renderUploadMenu(), /*#__PURE__*/React.createElement(View, {
435
+ style: [stylez.genericPageContainer, this.state.page === 1 && {
436
+ backgroundColor: this.props.colourBrandingMain
437
+ }]
438
+ }, /*#__PURE__*/React.createElement(Header, {
439
+ leftIcon: "close",
440
+ leftIconType: "pluss",
441
+ leftText: this.state.page !== 1 && 'Cancel',
442
+ leftIconStyle: this.state.page !== 1 && {
443
+ color: this.props.colourBrandingMain
444
+ },
445
+ onPressLeft: this.onPressBack.bind(this),
446
+ rightText: this.state.page !== 1 && 'Done',
447
+ onPressRight: this.clickCreate.bind(this),
448
+ optionalRightStyle: this.state.submittingGroup && {
449
+ opacity: 0.2
450
+ },
451
+ text: this.state.page === 1 ? `Create a ${values.entityName}` : this.state.title.length > 1 ? this.state.title : ' ',
452
+ style: this.state.page === 1 && {
453
+ backgroundColor: this.props.colourBrandingMain,
454
+ ...styles.page1Header
455
+ },
456
+ textColour: this.state.page === 1 && '#fff'
457
+ }), this.renderPage(), this.state.page === 2 && /*#__PURE__*/React.createElement(StickyFooter, {
458
+ style: styles.footer
459
+ }, this.renderInviteButton())), this.renderInvitePopup());
460
+ }
461
+
462
+ }
463
+
464
+ const styles = {
465
+ footer: {
466
+ paddingHorizontal: 16,
467
+ flexDirection: 'row',
468
+ alignItems: 'center'
469
+ },
470
+ footerButton: {
471
+ flex: 1
472
+ },
473
+ inviteButton: {
474
+ height: 36,
475
+ width: 120,
476
+ justifyContent: 'center',
477
+ alignItems: 'center',
478
+ borderRadius: 5,
479
+ marginLeft: 10
480
+ },
481
+ inviteButtonText: {
482
+ color: '#fff',
483
+ fontFamily: 'sf-semibold',
484
+ fontSize: 15
485
+ },
486
+ profilePic: {
487
+ borderWidth: 1,
488
+ borderColor: '#fff'
489
+ },
490
+ fill: {
491
+ flex: 1,
492
+ flexDirection: 'row-reverse'
493
+ },
494
+ attendeePreviews: {
495
+ width: 90,
496
+ height: 36,
497
+ flexDirection: 'row'
498
+ },
499
+ viewContainer: {
500
+ flex: 1,
501
+ backgroundColor: '#fff'
502
+ },
503
+ container: {
504
+ flex: 1,
505
+ position: 'relative'
506
+ },
507
+ greyContainer: {
508
+ backgroundColor: '#f0f0f5'
509
+ },
510
+ section: {
511
+ backgroundColor: '#fff',
512
+ marginTop: 16,
513
+ paddingHorizontal: 24,
514
+ elevation: 1
515
+ },
516
+ sectionItem: {
517
+ paddingVertical: 16
518
+ },
519
+ sectionItemUnderline: {
520
+ borderBottomWidth: 1,
521
+ borderBottomColor: LINEGREY
522
+ },
523
+ errorDot: {
524
+ height: 5,
525
+ width: 5,
526
+ borderRadius: 3,
527
+ backgroundColor: COLOUR_TEAL,
528
+ alignSelf: 'center'
529
+ },
530
+ inputView: {
531
+ width: '100%',
532
+ marginBottom: 5
533
+ },
534
+ labelStyle: {
535
+ fontSize: 15,
536
+ backgroundColor: 'transparent',
537
+ fontFamily: 'sf-semibold',
538
+ color: TEXT_DARK
539
+ },
540
+ buttonText: {
541
+ textAlign: 'center',
542
+ fontFamily: 'sf-bold',
543
+ fontSize: 17,
544
+ color: 'white',
545
+ borderRadius: 5
546
+ },
547
+ uploadButton: {
548
+ width: '100%',
549
+ //height: 150,
550
+ alignContent: 'center',
551
+ position: 'absolute',
552
+ flexDirection: 'row',
553
+ justifyContent: 'center',
554
+ top: 65
555
+ },
556
+ uploadText: {
557
+ fontFamily: 'sf-regular',
558
+ fontSize: 16,
559
+ textAlign: 'center',
560
+ paddingVertical: 7,
561
+ backgroundColor: 'transparent',
562
+ paddingHorizontal: 20,
563
+ color: TEXT_DARK
564
+ },
565
+ pageErrorText: {
566
+ backgroundColor: 'transparent',
567
+ color: COLOUR_TANGERINE,
568
+ fontSize: 18,
569
+ fontFamily: 'sf-regular',
570
+ marginTop: 0,
571
+ textAlign: 'center'
572
+ },
573
+ userPopupContainer: {
574
+ flex: 1,
575
+ backgroundColor: '#fff',
576
+ ...Platform.select({
577
+ ios: {
578
+ paddingTop: 20
579
+ }
580
+ })
581
+ },
582
+ closeContainer: {
583
+ paddingRight: 20,
584
+ paddingTop: 10,
585
+ paddingLeft: 10,
586
+ paddingBottom: 10,
587
+ position: 'absolute',
588
+ right: 0,
589
+ top: 0,
590
+ borderRadius: 5,
591
+ zIndex: 2,
592
+ ...Platform.select({
593
+ ios: {
594
+ paddingTop: 30
595
+ }
596
+ })
597
+ },
598
+ close: {
599
+ textShadowColor: 'rgba(0,0,0,0.3)',
600
+ textShadowOffset: {
601
+ width: 2,
602
+ height: 1
603
+ },
604
+ textShadowRadius: 1
605
+ },
606
+ listItem: {
607
+ paddingBottom: 10,
608
+ paddingHorizontal: 0,
609
+ justifyContent: 'flex-start',
610
+ flexDirection: 'row',
611
+ position: 'relative'
612
+ },
613
+ listItemTextContainer: {
614
+ flex: 1,
615
+ flexDirection: 'column',
616
+ justifyContent: 'space-around',
617
+ paddingLeft: 10
618
+ },
619
+ searchingContactsContainer: {
620
+ flexDirection: 'row',
621
+ flexWrap: 'wrap',
622
+ alignItems: 'center',
623
+ paddingTop: 20
624
+ },
625
+ searchingContactsInnerContainer: {
626
+ borderBottomWidth: 1,
627
+ borderBottomColor: '#ccc',
628
+ flexDirection: 'row',
629
+ flexWrap: 'wrap',
630
+ alignItems: 'center',
631
+ flex: 1
632
+ },
633
+ searchingContacts: {
634
+ flex: 1,
635
+ fontSize: 16,
636
+ fontFamily: 'sf-regular',
637
+ minWidth: 100
638
+ },
639
+ emptySearchingContacts: {
640
+ opacity: 0.5
641
+ },
642
+ toText: {
643
+ fontFamily: 'sf-regular',
644
+ fontSize: 12,
645
+ color: TEXT_DARK,
646
+ opacity: 0.5,
647
+ marginRight: 10
648
+ },
649
+ selectedContact: {
650
+ paddingTop: 10,
651
+ paddingRight: 5,
652
+ fontFamily: 'sf-bold',
653
+ fontSize: 16,
654
+ color: COLOUR_PURPLE
655
+ },
656
+ page1Header: {
657
+ shadowColor: 'transparent',
658
+ shadowOffset: {
659
+ width: 0,
660
+ height: 0
661
+ },
662
+ shadowOpacity: 0,
663
+ elevation: 0
664
+ },
665
+ imageContainer: {
666
+ width: PHOTO_WIDTH,
667
+ height: PHOTO_HEIGHT,
668
+ backgroundColor: '#fff',
669
+ borderStyle: 'dashed',
670
+ justifyContent: 'center',
671
+ alignItems: 'center',
672
+ borderWidth: 1,
673
+ borderColor: LINEGREY,
674
+ borderRadius: 4
675
+ },
676
+ tix: {
677
+ fontFamily: 'sf-semibold',
678
+ color: TEXT_LIGHT,
679
+ fontSize: 14,
680
+ textAlign: 'center',
681
+ flex: 1,
682
+ alignSelf: 'center'
683
+ },
684
+ toggleContainer: {
685
+ paddingHorizontal: 16,
686
+ marginTop: 16
687
+ }
688
+ };
689
+
690
+ const mapStateToProps = state => {
691
+ return {
692
+ connected: state.connection.connected,
693
+ user: state.user,
694
+ blockedUserKeys: state[values.reducerKeyChats].blockedUsers,
695
+ colourBrandingMain: getMainBrandingColourFromState(state),
696
+ circleAllowPublicCircles: getSiteSettingFromState(state, values.allowPublicKey)
697
+ };
698
+ };
699
+
700
+ export default connect(mapStateToProps, {
701
+ createGroup
702
+ })(NewGroup);
703
+ //# sourceMappingURL=NewGroup.js.map