@openeventkit/event-site 2.0.74 → 2.0.75

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.74",
4
+ "version": "2.0.75",
5
5
  "author": "Tipit LLC",
6
6
  "dependencies": {
7
7
  "@mui/base": "^5.0.0-alpha.114",
@@ -43,7 +43,7 @@
43
43
  "font-awesome": "^4.7.0",
44
44
  "formik": "^2.2.9",
45
45
  "fs-extra": "^9.0.1",
46
- "full-schedule-widget": "3.0.2",
46
+ "full-schedule-widget": "3.0.3",
47
47
  "gatsby": "^5.8.1",
48
48
  "gatsby-alias-imports": "^1.0.6",
49
49
  "gatsby-plugin-image": "^3.8.0",
@@ -67,8 +67,8 @@
67
67
  "immutability-helper": "2.9.1",
68
68
  "immutable": "^3.7.6",
69
69
  "jsdom": "^16.2.2",
70
- "lite-schedule-widget": "3.0.2",
71
- "live-event-widget": "4.0.1",
70
+ "lite-schedule-widget": "3.0.3",
71
+ "live-event-widget": "4.0.2",
72
72
  "lodash": "^4.17.19",
73
73
  "lz-string": "^1.4.4",
74
74
  "markdown-it": "^12.0.0",
@@ -116,14 +116,14 @@
116
116
  "slick-carousel": "^1.8.1",
117
117
  "smoothscroll-polyfill": "^0.4.4",
118
118
  "socket.io-client": "^4.5.2",
119
- "speakers-widget": "4.0.0",
119
+ "speakers-widget": "4.0.1",
120
120
  "stream-browserify": "^3.0.0",
121
121
  "stream-chat": "^2.7.2",
122
122
  "stream-chat-react": "3.1.7",
123
123
  "summit-registration-lite": "5.0.13",
124
124
  "superagent": "8.0.9",
125
125
  "sweetalert2": "^9.17.0",
126
- "upcoming-events-widget": "3.0.4",
126
+ "upcoming-events-widget": "3.0.5",
127
127
  "urijs": "^1.19.2",
128
128
  "use-fit-text": "^2.4.0",
129
129
  "uuid": "^7.0.0",
@@ -15,7 +15,7 @@ export const fetchEventById = async (summitId, eventId, accessToken = null) => {
15
15
  }
16
16
 
17
17
  apiUrl.addQuery('expand', 'slides, links, videos, media_uploads, type, track, track.allowed_access_levels, location, location.venue, location.floor, speakers, moderator, sponsors, current_attendance, groups, rsvp_template, tags');
18
-
18
+ apiUrl.addQuery('evict_cache', 1);
19
19
  return fetch(apiUrl.toString(), {
20
20
  method: 'GET'
21
21
  }).then(async (response) => {
@@ -45,6 +45,8 @@ export const fetchLocationById = async(summitId, locationId, expand, accessToken
45
45
  if(expand)
46
46
  apiUrl.addQuery('expand', expand);
47
47
 
48
+ apiUrl.addQuery('evict_cache', 1);
49
+
48
50
  return fetch(apiUrl.toString(), {
49
51
  method: 'GET'
50
52
  }).then(async (response) => {
@@ -67,10 +69,12 @@ export const fetchSpeakerById = async(summitId, speakerId, accessToken = null) =
67
69
  let apiUrl = URI(`${process.env.GATSBY_SUMMIT_API_BASE_URL}/api/public/v1/summits/${summitId}/speakers/${speakerId}`);
68
70
 
69
71
  if(accessToken){
70
- apiUrl = URI(`${process.env.GATSBY_SUMMIT_API_BASE_URL}/api/v1/summits/${summitId}/speaker/${speakerId}`);
72
+ apiUrl = URI(`${process.env.GATSBY_SUMMIT_API_BASE_URL}/api/v1/summits/${summitId}/speakers/${speakerId}`);
71
73
  apiUrl.addQuery('access_token', accessToken);
72
74
  }
73
75
 
76
+ apiUrl.addQuery('evict_cache', 1);
77
+
74
78
  return fetch(apiUrl.toString(), {
75
79
  method: 'GET'
76
80
  }).then(async (response) => {
@@ -92,6 +96,7 @@ export const fetchSummitById = async(summitId, accessToken = null) => {
92
96
 
93
97
  apiUrl.addQuery('expand', 'event_types,tracks,track_groups,presentation_levels,locations.rooms,locations.floors,order_extra_questions.values,schedule_settings,schedule_settings.filters,schedule_settings.pre_filters');
94
98
  apiUrl.addQuery('t', Date.now());
99
+ apiUrl.addQuery('evict_cache', 1);
95
100
 
96
101
  return fetch(apiUrl.toString(), {
97
102
  method: 'GET'
@@ -101,4 +106,4 @@ export const fetchSummitById = async(summitId, accessToken = null) => {
101
106
  }
102
107
  return null;
103
108
  });
104
- }
109
+ }
@@ -35,14 +35,19 @@ const siteSettings = {
35
35
  name: "siteMetadata",
36
36
  fields: [
37
37
  stringField({
38
- label: "title",
38
+ label: "Title",
39
39
  name: "title",
40
40
  required: false
41
41
  }),
42
42
  textField({
43
- label: "description",
43
+ label: "Description",
44
44
  name: "description",
45
45
  required: false
46
+ }),
47
+ imageField({
48
+ label: "Image",
49
+ name: "image",
50
+ required: false
46
51
  })
47
52
  ]
48
53
  }),
@@ -3,6 +3,7 @@ module.exports = `
3
3
  type SiteMetadata {
4
4
  title: String
5
5
  description: String
6
+ image: File @fileByRelativePath
6
7
  }
7
8
  type Favicon {
8
9
  asset: File @fileByRelativePath
@@ -1,40 +1,54 @@
1
1
  import * as React from "react";
2
- import useSiteMetadata from "@utils/useSiteMetadata";
3
- import { withPrefix } from "gatsby";
2
+ import PropTypes from "prop-types";
3
+ import useSiteSettings from "@utils/useSiteSettings";
4
+ import { Helmet } from "react-helmet";
4
5
  import { getSrc } from "gatsby-plugin-image";
6
+ import { getUrl } from "@utils/urlFormating";
5
7
 
6
- const Seo = ({
7
- title,
8
- description,
9
- pathname,
10
- children
11
- }) => {
8
+ const Seo = ({ title, description, location, children }) => {
12
9
  const {
13
- title: defaultTitle,
14
- description: defaultDescription,
15
- } = useSiteMetadata();
10
+ siteMetadata: {
11
+ title: siteTitle,
12
+ description: defaultDescription,
13
+ image
14
+ }
15
+ } = useSiteSettings();
16
+ const host = typeof window !== "undefined" ? window.location.host : null;
17
+ const scheme = typeof window !== "undefined" ? window.location.protocol.replace(":", "") : "https";
18
+ const { pathname } = location;
16
19
  const seo = {
17
- title: title ? `${defaultTitle} - ${title}` : defaultTitle,
20
+ title: title ? `${siteTitle} - ${title}` : siteTitle,
18
21
  description: description || defaultDescription,
19
- url: `${withPrefix(pathname || "/")}`
20
- }
22
+ url: getUrl(scheme, host, pathname),
23
+ image: host && image ? getUrl(scheme, host, getSrc(image)) : null,
24
+ };
21
25
  return (
22
- <>
23
- <title>{seo.title}</title>
24
- <meta name="description" content={seo.description} />
25
- <meta name="twitter:card" content="summary" />
26
- <meta name="twitter:title" content={seo.title} />
27
- <meta name="twitter:url" content={seo.url} />
28
- <meta name="twitter:description" content={seo.description} />
29
- <meta name="description" content={seo.description} />
30
- <meta name="theme-color" content="#fff" />
31
- <meta property="og:type" content="business.business" />
32
- <meta property="og:title" content={seo.title} />
33
- <meta property="og:url" content={seo.url} />
34
- }
26
+ <Helmet>
27
+ {seo.title && <title>{seo.title}</title>}
28
+ {seo.description && <meta name="description" content={seo.description} />}
29
+ {seo.url && <meta property="og:url" content={seo.url} />}
30
+ <meta property="og:type" content="website" />
31
+ {seo.title && <meta property="og:title" content={seo.title} />}
32
+ {seo.description && <meta property="og:description" content={seo.description} />}
33
+ {seo.image && <meta property="og:image" content={seo.image} />}
34
+ {seo.image && <meta name="twitter:card" content="summary_large_image" />}
35
+ {host && <meta property="twitter:domain" content={host} />}
36
+ {seo.url && <meta property="twitter:url" content={seo.url} />}
37
+ {seo.title && <meta name="twitter:title" content={seo.title} />}
38
+ {seo.description && <meta name="twitter:description" content={seo.description} />}
39
+ {seo.image && <meta name="twitter:image" content={seo.image} />}
35
40
  {children}
36
- </>
37
- )
41
+ </Helmet>
42
+ );
43
+ };
44
+
45
+ Seo.propTypes = {
46
+ title: PropTypes.string,
47
+ description: PropTypes.string,
48
+ location: PropTypes.shape({
49
+ pathname: PropTypes.string.isRequired
50
+ }).isRequired,
51
+ children: PropTypes.node
38
52
  };
39
53
 
40
54
  export default Seo;
@@ -91,6 +91,6 @@ export const Head = ({
91
91
  }) => (
92
92
  <Seo
93
93
  title={titleFromPathname(location.pathname)}
94
- pathname={location.pathname}
94
+ location={location}
95
95
  />
96
96
  );
@@ -74,6 +74,6 @@ export const Head = ({
74
74
  }) => (
75
75
  <Seo
76
76
  title={"Lobby"}
77
- pathname={location.pathname}
77
+ location={location}
78
78
  />
79
79
  );
@@ -71,6 +71,6 @@ export const Head = ({
71
71
  }) => (
72
72
  <Seo
73
73
  title={"Expo Hall"}
74
- pathname={location.pathname}
74
+ location={location}
75
75
  />
76
76
  );
@@ -139,4 +139,7 @@ const mapStateToProps = ({
139
139
  export default connect(mapStateToProps, {
140
140
  })(withFeedsWorker(withRealTimeUpdates(MarketingPage)));
141
141
 
142
- export const Head = () => <Seo />;
142
+ export const Head = ({
143
+ location
144
+ }) => <Seo location={location} />;
145
+
@@ -87,6 +87,6 @@ export const Head = ({
87
87
  }) => (
88
88
  <Seo
89
89
  title={titleFromPathname(location.pathname)}
90
- pathname={location.pathname}
90
+ location={location}
91
91
  />
92
92
  );
@@ -191,8 +191,8 @@ export const EventPageTemplate = class extends React.Component {
191
191
  </div>
192
192
  )}
193
193
  <UpcomingEventsComponent
194
- key={`event_page_upcomming_event_${lastDataSync}`}
195
194
  id={`event_page_upcomming_event_${lastDataSync}`}
195
+ lastDataSync={lastDataSync}
196
196
  trackId={event.track ? event.track.id : null}
197
197
  eventCount={3}
198
198
  title={
@@ -76,7 +76,7 @@ export const LobbyPageTemplate = class extends React.Component {
76
76
  <h2><b>Today</b></h2>
77
77
  <LiveEventWidgetComponent
78
78
  id={`lobby_page_live_event_${lastDataSync}`}
79
- key={`lobby_page_live_event_${lastDataSync}`}
79
+ lastDataSync={lastDataSync}
80
80
  onlyPresentations={true}
81
81
  featuredEventId={liveNowFeaturedEventId}
82
82
  onEventClick={(ev) => this.onEventChange(ev)}
@@ -91,7 +91,7 @@ export const LobbyPageTemplate = class extends React.Component {
91
91
  />
92
92
  <UpcomingEventsComponent
93
93
  id={`lobby_page_upcomming_events_${lastDataSync}`}
94
- key={`lobby_page_upcomming_events_${lastDataSync}`}
94
+ lastDataSync={lastDataSync}
95
95
  title="Up Next"
96
96
  eventCount={4}
97
97
  renderEventLink={(event) => <Link to={`/a/event/${event.id}`}>{event.title}</Link>}
@@ -102,7 +102,7 @@ export const LobbyPageTemplate = class extends React.Component {
102
102
  <SpeakersWidgetComponent
103
103
  title="Today's Speakers"
104
104
  id={`home_page_today_speakers_${lastDataSync}`}
105
- key={`home_page_today_speakers_${lastDataSync}`}
105
+ lastDataSync={lastDataSync}
106
106
  bigPics={true}
107
107
  />
108
108
  }
@@ -110,7 +110,7 @@ export const LobbyPageTemplate = class extends React.Component {
110
110
  <SpeakersWidgetComponent
111
111
  title="Featured Speakers"
112
112
  id={`lobby_page_featured_speakers_${lastDataSync}`}
113
- key={`lobby_page_featured_speakers_${lastDataSync}`}
113
+ lastDataSync={lastDataSync}
114
114
  bigPics={false}
115
115
  featured={true}
116
116
  date={null}
@@ -124,7 +124,7 @@ export const LobbyPageTemplate = class extends React.Component {
124
124
  <AttendeesWidget user={user}/>
125
125
  <LiteScheduleComponent
126
126
  id={`lobby_page_lite_schedule_${lastDataSync}`}
127
- key={`lobby_page_lite_schedule_${lastDataSync}`}
127
+ lastDataSync={lastDataSync}
128
128
  onEventClick={(ev) => this.onEventChange(ev)}
129
129
  onViewAllEventsClick={() => this.onViewAllMyEventsClick()}
130
130
  title="My Schedule"
@@ -70,7 +70,7 @@ const MarketingPageTemplate = ({
70
70
  <h2><b>{marketingPageJson.leftColumn.schedule.title}</b></h2>
71
71
  <LiteScheduleComponent
72
72
  {...scheduleProps}
73
- key={`marketing_lite_schedule_${lastDataSync}`}
73
+ lastDataSync={lastDataSync}
74
74
  id={`marketing_lite_schedule_${lastDataSync}`}
75
75
  page="marketing-site"
76
76
  showAllEvents={true}
@@ -91,9 +91,7 @@ const SchedulePage = ({ summit, scheduleState, summitPhase, isLoggedUser, locati
91
91
  <div className={`container ${styles.container}`}>
92
92
  <div className={`${styles.wrapper} ${showFilters ? styles.showFilters : ""}`}>
93
93
  <div className={styles.scheduleWrapper}>
94
- <FullSchedule {...schedProps}
95
- key={`fullschedule_${lastDataSync}`}
96
- />
94
+ <FullSchedule {...schedProps} lastDataSync={lastDataSync} />
97
95
  </div>
98
96
  <div ref={filtersWrapperRef} className={styles.filterWrapper}>
99
97
  <ScheduleFilters {...filterProps} />
@@ -21,7 +21,7 @@ import { getEnvVariable, LIVE_EVENT_THUMBNAIL_GIF_CAPTURE_STARTS } from "../util
21
21
  import styles from '../styles/sponsor-page.module.scss'
22
22
  import SponsorNavigation from '../components/SponsorNavigation'
23
23
 
24
- const SponsorPageTemplate = ({ sponsorId, sponsors, scanBadge, eventId }) => {
24
+ const SponsorPageTemplate = ({ sponsorId, sponsors, scanBadge, eventId, lastDataSync }) => {
25
25
 
26
26
  const [sponsorLoading, setSponsorLoading] = useState(true);
27
27
  const [sponsor, setSponsor] = useState(null)
@@ -104,6 +104,7 @@ const SponsorPageTemplate = ({ sponsorId, sponsors, scanBadge, eventId }) => {
104
104
  }
105
105
  {liveEventWidget &&
106
106
  <LiveEventWidgetComponent
107
+ lastDataSync={lastDataSync}
107
108
  onEventClick={(ev) => onEventChange(ev)}
108
109
  onlyPresentations={true}
109
110
  sponsorId={sponsor?.company.id}
@@ -115,6 +116,7 @@ const SponsorPageTemplate = ({ sponsorId, sponsors, scanBadge, eventId }) => {
115
116
  {scheduleWidget &&
116
117
  <UpcomingEventsComponent
117
118
  eventCount={3}
119
+ lastDataSync={lastDataSync}
118
120
  sponsorId={sponsor?.company.id}
119
121
  renderEventLink={(event) => <Link to={`/a/event/${event.id}`}>{event.title}</Link>}
120
122
  allEventsLink={<Link to={`/a/schedule#company=${encodeURIComponent(sponsor?.name)}`}>View all <span className="sr-only">events</span></Link>}
@@ -184,10 +186,11 @@ SponsorPageTemplate.propTypes = {
184
186
  sponsorId: PropTypes.string,
185
187
  };
186
188
 
187
- const mapStateToProps = ({ userState, sponsorState, summitState }) => ({
189
+ const mapStateToProps = ({ userState, sponsorState, summitState, settingState }) => ({
188
190
  user: userState,
189
191
  sponsors: sponsorState.sponsors,
190
- summit: summitState.summit
192
+ summit: summitState.summit,
193
+ lastDataSync: settingState.lastDataSync
191
194
  });
192
195
 
193
196
  export default connect(mapStateToProps, { scanBadge })(SponsorPage);
@@ -1,3 +1,10 @@
1
+
2
+ export const getUrl = (scheme, host, pathname) => {
3
+ if (!host) return null;
4
+ const domain = `${scheme}://${host}`;
5
+ return `${domain}${pathname ?? "/"}`;
6
+ };
7
+
1
8
  export const getSponsorURL = (id, name) => {
2
9
  let formattedName = name.toLowerCase().replace(/\s/g, '-');
3
10
  return `${id}-${formattedName}`;
@@ -6,6 +6,17 @@ import {
6
6
  const siteSettingsQuery = graphql`
7
7
  query {
8
8
  siteSettingsJson {
9
+ siteMetadata {
10
+ title,
11
+ description,
12
+ image {
13
+ childImageSharp {
14
+ gatsbyImageData (
15
+ quality: 100
16
+ )
17
+ }
18
+ }
19
+ }
9
20
  widgets {
10
21
  chat {
11
22
  enabled