@openeventkit/event-site 2.0.121 → 2.0.122

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@openeventkit/event-site",
3
3
  "description": "Event Site",
4
- "version": "2.0.121",
4
+ "version": "2.0.122",
5
5
  "author": "Tipit LLC",
6
6
  "dependencies": {
7
7
  "@fortawesome/fontawesome-svg-core": "^6.5.2",
@@ -21,14 +21,14 @@
21
21
  "@sentry/integrations": "^7.39.0",
22
22
  "@sentry/react": "^7.39.0",
23
23
  "@sentry/webpack-plugin": "^1.20.0",
24
- "@supabase/supabase-js": "^1.35.6",
24
+ "@supabase/supabase-js": "2.45.1",
25
25
  "@types/googlemaps": "^3.39.9",
26
26
  "@types/markerclustererplus": "^2.1.33",
27
27
  "@types/react": "^16.9.42",
28
28
  "@vimeo/player": "^2.16.3",
29
29
  "ably": "^1.2.34",
30
30
  "assert": "^2.1.0",
31
- "attendee-to-attendee-widget": "3.1.0",
31
+ "attendee-to-attendee-widget": "3.1.1-beta.29",
32
32
  "autoprefixer": "10.4.14",
33
33
  "awesome-bootstrap-checkbox": "^1.0.1",
34
34
  "axios": "^0.19.2",
@@ -59,7 +59,13 @@ const AttendeesWidgetComponent = ({ user, event, chatSettings }) => {
59
59
  linked_in_profile,
60
60
  twitter_name,
61
61
  wechat_user,
62
- public_profile_show_fullname } = idpProfile || {};
62
+ public_profile_show_fullname,
63
+ public_profile_show_email,
64
+ public_profile_allow_chat_with_me,
65
+ public_profile_show_photo,
66
+ public_profile_show_social_media_info,
67
+ public_profile_show_bio
68
+ } = idpProfile || {};
63
69
 
64
70
  useEffect(() => {
65
71
  if (!user || !userProfile || !idpProfile) return;
@@ -127,6 +133,12 @@ const AttendeesWidgetComponent = ({ user, event, chatSettings }) => {
127
133
  .flatMap((st) => st.badge.features)
128
134
  .filter((v, i, a) => a.map((item) => item.id).indexOf(v.id) === i),
129
135
  bio: bio,
136
+ showEmail: public_profile_show_email === true,
137
+ allowChatWithMe: public_profile_allow_chat_with_me === true,
138
+ showFullName: public_profile_show_fullname === true,
139
+ showProfilePic: public_profile_show_photo === true,
140
+ showSocialInfo: public_profile_show_social_media_info === true,
141
+ showBio: public_profile_show_bio === true,
130
142
  hasPermission: (permission) => {
131
143
  const isAdmin = groups &&
132
144
  groups.map((g) => g.slug).filter((g) => adminGroups.includes(g))
@@ -186,6 +198,20 @@ const mapState = ({ settingState }) => ({
186
198
  export const AttendeesWidget = connect(mapState)(AttendeesWidgetComponent);
187
199
 
188
200
  const AccessTracker = ({ user, isLoggedUser, summitPhase, chatSettings }) => {
201
+ const chatProps = {
202
+ streamApiKey: getEnvVariable(STREAM_IO_API_KEY),
203
+ apiBaseUrl: getEnvVariable(IDP_BASE_URL),
204
+ chatApiBaseUrl: getEnvVariable(CHAT_API_BASE_URL),
205
+ onAuthError: (err, res) => console.log(err),
206
+ openDir: "left",
207
+ activity: null,
208
+ getAccessToken: async () => {
209
+ const accessToken = await getAccessToken();
210
+ //console.log("AttendeesList->getAccessToken", accessToken);
211
+ return accessToken;
212
+ },
213
+ };
214
+
189
215
  const trackerRef = useRef();
190
216
 
191
217
  const handleLogout = useCallback(() => {
@@ -237,11 +263,15 @@ const AccessTracker = ({ user, isLoggedUser, summitPhase, chatSettings }) => {
237
263
  wechat_user,
238
264
  public_profile_show_fullname,
239
265
  public_profile_show_email,
240
- public_profile_allow_chat_with_me
266
+ public_profile_allow_chat_with_me,
267
+ public_profile_show_photo,
268
+ public_profile_show_social_media_info,
269
+ public_profile_show_bio
241
270
  } = user.idpProfile;
242
271
 
243
272
  const widgetProps = {
244
273
  user: {
274
+ id: sub,
245
275
  idpUserId: sub,
246
276
  fullName: public_profile_show_fullname ? `${given_name} ${family_name}` : `${given_name}`,
247
277
  email: email,
@@ -260,11 +290,17 @@ const AccessTracker = ({ user, isLoggedUser, summitPhase, chatSettings }) => {
260
290
  .flatMap((st) => st.badge.features)
261
291
  .filter((v, i, a) => a.map((item) => item.id).indexOf(v.id) === i),
262
292
  bio: bio,
263
- showEmail: public_profile_show_email,
264
- allowChatWithMe: public_profile_allow_chat_with_me ?? true
293
+ showEmail: public_profile_show_email === true,
294
+ allowChatWithMe: public_profile_allow_chat_with_me === true,
295
+ showFullName: public_profile_show_fullname === true,
296
+ showProfilePic: public_profile_show_photo === true,
297
+ showSocialInfo: public_profile_show_social_media_info === true,
298
+ showBio: public_profile_show_bio === true
265
299
  },
266
300
  summitId: parseInt(getEnvVariable(SUMMIT_ID)),
267
- ...sbAuthProps,
301
+ keepAliveEnabled: true,
302
+ ...chatProps,
303
+ ...sbAuthProps
268
304
  };
269
305
 
270
306
  if (!chatSettings.enabled) return null;
@@ -16,6 +16,7 @@ import withOrchestra from "../utils/widgetOrchestra";
16
16
  import LiteScheduleComponent from '../components/LiteScheduleComponent'
17
17
  import ProfilePopupComponent from '../components/ProfilePopupComponent'
18
18
  import ChangePasswordComponent from '../components/ChangePasswordComponent';
19
+ import AccessTracker from "../components/AttendeeToAttendeeWidgetComponent";
19
20
 
20
21
  import { updateProfilePicture, updateProfile, getIDPProfile, updatePassword } from '../actions/user-actions'
21
22
 
@@ -46,6 +47,10 @@ export const FullProfilePageTemplate = ({ user, getIDPProfile, updateProfile, up
46
47
  const [showFullName, setShowFullName] = useState(false);
47
48
  const [allowChatWithMe, setAllowChatWithMe] = useState(false)
48
49
  const [showEmail, setShowEmail] = useState(false);
50
+ const [showPicture, setShowPicture] = useState(false);
51
+ const [showBio, setShowBio] = useState(false);
52
+ const [showSocialMedia, setShowSocialMedia] = useState(false);
53
+ const [showTelephone, setShowTelephone] = useState(false);
49
54
  const [bio, setBio] = useState('');
50
55
  const [statementOfInterest, setStatementOfInterest] = useState('');
51
56
 
@@ -88,6 +93,10 @@ export const FullProfilePageTemplate = ({ user, getIDPProfile, updateProfile, up
88
93
  setShowFullName(user.idpProfile.public_profile_show_fullname);
89
94
  setAllowChatWithMe(user.idpProfile.public_profile_allow_chat_with_me);
90
95
  setShowEmail(user.idpProfile.public_profile_show_email);
96
+ setShowPicture(user.idpProfile.public_profile_show_photo);
97
+ setShowBio(user.idpProfile.public_profile_show_bio);
98
+ setShowSocialMedia(user.idpProfile.public_profile_show_social_media_info);
99
+ setShowTelephone(user.idpProfile.public_profile_show_telephone_number);
91
100
  setBio(user.idpProfile.bio || '');
92
101
  setStatementOfInterest(user.idpProfile.statement_of_interest || '');
93
102
  setAddress({
@@ -139,6 +148,10 @@ export const FullProfilePageTemplate = ({ user, getIDPProfile, updateProfile, up
139
148
  public_profile_show_fullname: showFullName,
140
149
  public_profile_allow_chat_with_me: allowChatWithMe,
141
150
  public_profile_show_email: showEmail,
151
+ public_profile_show_photo: showPicture,
152
+ public_profile_show_bio: showBio,
153
+ public_profile_show_social_media_info: showSocialMedia,
154
+ public_profile_show_telephone_number: showTelephone,
142
155
  bio: bio,
143
156
  statement_of_interest: statementOfInterest,
144
157
  address1: address.street,
@@ -204,6 +217,10 @@ export const FullProfilePageTemplate = ({ user, getIDPProfile, updateProfile, up
204
217
  setShowFullName(user.idpProfile.public_profile_show_fullname);
205
218
  setAllowChatWithMe(user.idpProfile.public_profile_allow_chat_with_me);
206
219
  setShowEmail(user.idpProfile.public_profile_show_email);
220
+ setShowPicture(user.idpProfile.public_profile_show_photo);
221
+ setShowBio(user.idpProfile.public_profile_show_bio);
222
+ setShowSocialMedia(user.idpProfile.public_profile_show_social_media_info);
223
+ setShowTelephone(user.idpProfile.public_profile_show_telephone_number);
207
224
  break;
208
225
  case 'bio':
209
226
  setBio(user.idpProfile.bio || '');
@@ -423,20 +440,45 @@ export const FullProfilePageTemplate = ({ user, getIDPProfile, updateProfile, up
423
440
  </div>
424
441
  </div>
425
442
  </div>
426
- <label className={styles.checkbox}>
427
- <input type="checkbox" checked={showFullName} onChange={e => setShowFullName(e.target.checked)} />
428
- Show full name on public profile
429
- </label>
430
- <br />
431
- <label className={styles.checkbox}>
432
- <input type="checkbox" checked={showEmail} onChange={e => setShowEmail(e.target.checked)} />
433
- Show email on public profile
434
- </label>
435
- <br />
436
- <label className={styles.checkbox}>
437
- <input type="checkbox" checked={allowChatWithMe} onChange={e => setAllowChatWithMe(e.target.checked)} />
438
- Allow people to chat with me?
439
- </label>
443
+ <div className={`columns is-mobile`}>
444
+ <div className={`column is-half`}>
445
+ <label className={styles.checkbox}>
446
+ <input type="checkbox" checked={showFullName} onChange={e => setShowFullName(e.target.checked)} />
447
+ Show full name on public profile
448
+ </label>
449
+ <br />
450
+ <label className={styles.checkbox}>
451
+ <input type="checkbox" checked={showEmail} onChange={e => setShowEmail(e.target.checked)} />
452
+ Show email on public profile
453
+ </label>
454
+ <br />
455
+ <label className={styles.checkbox}>
456
+ <input type="checkbox" checked={showTelephone} onChange={e => setShowTelephone(e.target.checked)} />
457
+ Show telephone number on public profile
458
+ </label>
459
+ <br />
460
+ <label className={styles.checkbox}>
461
+ <input type="checkbox" checked={allowChatWithMe} onChange={e => setAllowChatWithMe(e.target.checked)} />
462
+ Allow people to chat with me?
463
+ </label>
464
+ </div>
465
+ <div className={`column is-half`}>
466
+ <label className={styles.checkbox}>
467
+ <input type="checkbox" checked={showPicture} onChange={e => setShowPicture(e.target.checked)} />
468
+ Show picture on public profile
469
+ </label>
470
+ <br />
471
+ <label className={styles.checkbox}>
472
+ <input type="checkbox" checked={showBio} onChange={e => setShowBio(e.target.checked)} />
473
+ Show bio on public profile
474
+ </label>
475
+ <br />
476
+ <label className={styles.checkbox}>
477
+ <input type="checkbox" checked={showSocialMedia} onChange={e => setShowSocialMedia(e.target.checked)} />
478
+ Show social media info on public profile
479
+ </label>
480
+ </div>
481
+ </div>
440
482
  <div className={`columns is-mobile ${styles.buttons}`}>
441
483
  <div className={`column is-half`}>
442
484
  <button className={`button is-large ${styles.profileButton}`} onClick={() => discardChanges('profile')}>Discard</button>
@@ -602,6 +644,7 @@ export const FullProfilePageTemplate = ({ user, getIDPProfile, updateProfile, up
602
644
  closePopup={() => handleTogglePopup(!showProfile)}
603
645
  />
604
646
  }
647
+ <AccessTracker/>
605
648
  </React.Fragment>
606
649
  )
607
650
  };