@openeventkit/event-site 2.0.118 → 2.0.120

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.118",
4
+ "version": "2.0.120",
5
5
  "author": "Tipit LLC",
6
6
  "dependencies": {
7
7
  "@fortawesome/fontawesome-svg-core": "^6.5.2",
@@ -50,7 +50,7 @@
50
50
  "final-form": "4.20.7",
51
51
  "font-awesome": "^4.7.0",
52
52
  "formik": "^2.2.9",
53
- "full-schedule-widget": "3.0.5",
53
+ "full-schedule-widget": "3.0.9",
54
54
  "gatsby": "^5.13.5",
55
55
  "gatsby-alias-imports": "^1.0.6",
56
56
  "gatsby-plugin-decap-cms": "^4.0.4",
@@ -8,6 +8,7 @@ export const UPDATE_FILTERS = "UPDATE_FILTERS";
8
8
  export const CLEAR_FILTERS = "CLEAR_FILTERS";
9
9
  export const CHANGE_VIEW = "CHANGE_VIEW";
10
10
  export const CHANGE_TIMEZONE = "CHANGE_TIMEZONE";
11
+ export const CHANGE_TIME_FORMAT = "CHANGE_TIME_FORMAT";
11
12
 
12
13
  /**
13
14
  * This action is defined to just reinitialize the allScheduleReducer state
@@ -97,7 +98,7 @@ export const updateFiltersFromHash =
97
98
  Object.keys(filters).forEach((key) => {
98
99
  newFilters[key] = { ...filters[key] }; // copy label and rest of props
99
100
 
100
- if (key === "title") {
101
+ if (key === "title" || key === "abstract") {
101
102
  newFilters[key].values = normalizedFilters[key]
102
103
  ? decodeURIComponent(normalizedFilters[key])
103
104
  : "";
@@ -6,6 +6,7 @@ import marketingPage from "./marketingPage";
6
6
  import lobbyPage from "./lobbyPage";
7
7
  import expoHallPage from "./expoHallPage";
8
8
  import invitationsRejectPage from "./invitationsRejectPage";
9
+ import mySchedulePage from "./mySchedulePage";
9
10
 
10
11
  const defaultPagesCollection = {
11
12
  ...collectionDefaults({
@@ -16,7 +17,8 @@ const defaultPagesCollection = {
16
17
  marketingPage,
17
18
  lobbyPage,
18
19
  expoHallPage,
19
- invitationsRejectPage
20
+ invitationsRejectPage,
21
+ mySchedulePage
20
22
  ]
21
23
  };
22
24
 
@@ -0,0 +1,36 @@
1
+ import {
2
+ booleanField,
3
+ stringField
4
+ } from "../../../fields";
5
+
6
+ import {
7
+ MY_SCHEDULE_PAGE_FILE_PATH
8
+ } from "@utils/filePath";
9
+
10
+ const mySchedulePage = {
11
+ label: "My Schedule Page",
12
+ name: "my-schedule-page",
13
+ file: MY_SCHEDULE_PAGE_FILE_PATH,
14
+ fields: [
15
+ stringField({
16
+ label: "Title",
17
+ name: "title",
18
+ default: "My Schedule",
19
+ required: true
20
+ }),
21
+ stringField({
22
+ label: "Key",
23
+ name: "key",
24
+ default: "my-schedule-main",
25
+ required: true
26
+ }),
27
+ booleanField({
28
+ label: "Needs Ticket Permission?",
29
+ name: "needsTicketAuthz",
30
+ required: true,
31
+ default: false
32
+ })
33
+ ]
34
+ };
35
+
36
+ export default mySchedulePage;
@@ -0,0 +1,8 @@
1
+
2
+ module.exports = `
3
+ type mySchedulePageJson implements Node {
4
+ title: String
5
+ key: String
6
+ needsTicketAuthz: Boolean
7
+ }
8
+ `;
@@ -2,10 +2,12 @@ const marketingPageTypeDefs = require("./marketingPage/typeDefs");
2
2
  const lobbyPageTypeDefs = require("./lobbyPage/typeDefs");
3
3
  const expoHallPageTypeDefs = require("./expoHallPage/typeDefs");
4
4
  const invitationsRejectPageTypeDefs = require("./invitationsRejectPage/typeDefs");
5
+ const mySchedulePageTypeDefs = require("./mySchedulePage/typeDefs");
5
6
 
6
7
  module.exports = [
7
8
  marketingPageTypeDefs,
8
9
  lobbyPageTypeDefs,
9
10
  expoHallPageTypeDefs,
10
- invitationsRejectPageTypeDefs
11
+ invitationsRejectPageTypeDefs,
12
+ mySchedulePageTypeDefs
11
13
  ].join("");
@@ -0,0 +1,5 @@
1
+ {
2
+ "title": "My Schedule",
3
+ "key": "my-schedule-main",
4
+ "needsTicketAuthz": true
5
+ }
@@ -22,6 +22,24 @@ import Link from "../../components/Link";
22
22
  import { titleFromPathname } from "../../utils/urlFormating";
23
23
  import {graphql} from "gatsby";
24
24
 
25
+ const mySchedulePage = ({ location, summitPhase,isLoggedUser, user, allowClick, title, key }) => {
26
+ return <SchedulePage
27
+ path="/my-schedule"
28
+ location={location}
29
+ summitPhase={summitPhase}
30
+ isLoggedIn={isLoggedUser}
31
+ user={user}
32
+ scheduleProps={{
33
+ title: title,
34
+ showSync: true,
35
+ showShare: false,
36
+ subtitle: <Link to={"/a/schedule"}>Show Schedule</Link>
37
+ }}
38
+ schedKey={key}
39
+ allowClick={allowClick}
40
+ />;
41
+ }
42
+
25
43
  export const appQuery = graphql`
26
44
  query {
27
45
  invitationsRejectPageJson {
@@ -33,10 +51,19 @@ export const appQuery = graphql`
33
51
  alreadyAcceptedInvitationError
34
52
  alreadyRejectedInvitationError
35
53
  }
54
+ mySchedulePageJson {
55
+ title
56
+ key
57
+ needsTicketAuthz
58
+ }
36
59
  }
37
60
  `;
38
61
 
62
+
39
63
  const App = ({ isLoggedUser, user, summitPhase, allowClick = true, data }) => {
64
+
65
+ const { mySchedulePageJson } = data;
66
+
40
67
  return (
41
68
  <Location>
42
69
  {({ location }) => (
@@ -55,24 +82,12 @@ const App = ({ isLoggedUser, user, summitPhase, allowClick = true, data }) => {
55
82
  <MyTicketsPage path="/my-tickets" isLoggedIn={isLoggedUser} user={user} location={location} />
56
83
  <FullProfilePage path="/profile" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location} />
57
84
  <ExtraQuestionsPage path="/extra-questions" isLoggedIn={isLoggedUser} user={user} location={location} />
85
+ { !mySchedulePageJson.needsTicketAuthz && mySchedulePage({location, summitPhase,isLoggedUser, user, allowClick, title:mySchedulePageJson.title, key: mySchedulePageJson.key }) }
58
86
  <WithAuthzRoute path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
59
87
  <PostersPage path="/posters" trackGroupId={0} location={location} />
60
88
  <PostersPage path="/posters/:trackGroupId" location={location} />
61
89
  <PosterDetailPage path="/poster/:presentationId/" isLoggedIn={isLoggedUser} user={user} location={location} />
62
- <SchedulePage
63
- path="/my-schedule"
64
- location={location}
65
- summitPhase={summitPhase}
66
- isLoggedIn={isLoggedUser}
67
- user={user}
68
- scheduleProps={{
69
- title: "My Schedule",
70
- showSync: true,
71
- subtitle: <Link to={"/a/schedule"}>Show Schedule</Link>
72
- }}
73
- schedKey="my-schedule-main"
74
- allowClick={allowClick}
75
- />
90
+ { mySchedulePageJson.needsTicketAuthz && mySchedulePage({location, summitPhase,isLoggedUser, user, allowClick, title: mySchedulePageJson.title, key: mySchedulePageJson.key }) }
76
91
  <ShowOpenRoute path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
77
92
  <WithBadgeRoute path="/event/:eventId" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
78
93
  <EventPage path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location} />
@@ -1,7 +1,7 @@
1
1
  import scheduleReducer from './schedule-reducer';
2
2
  import {filterEventsByTags} from '../utils/schedule';
3
3
  import {LOGOUT_USER} from "openstack-uicore-foundation/lib/security/actions";
4
- import {CLEAR_FILTERS, UPDATE_FILTER, UPDATE_FILTERS, CHANGE_VIEW, CHANGE_TIMEZONE, RELOAD_SCHED_DATA , RELOAD_USER_PROFILE} from '../actions/schedule-actions'
4
+ import {CLEAR_FILTERS, UPDATE_FILTER, UPDATE_FILTERS, CHANGE_VIEW, CHANGE_TIMEZONE, CHANGE_TIME_FORMAT, RELOAD_SCHED_DATA , RELOAD_USER_PROFILE} from '../actions/schedule-actions'
5
5
  import {RESET_STATE, SYNC_DATA} from "../actions/base-actions-definitions";
6
6
  import {GET_EVENT_DATA} from '../actions/event-actions-definitions';
7
7
  import {ADD_TO_SCHEDULE, REMOVE_FROM_SCHEDULE, GET_USER_PROFILE} from "../actions/user-actions";
@@ -97,6 +97,7 @@ const allSchedulesReducer = (state = DEFAULT_STATE, action) => {
97
97
  }
98
98
  return {...state, allEvents: updatedEvents};
99
99
  }
100
+ case CHANGE_TIME_FORMAT:
100
101
  case CHANGE_TIMEZONE:
101
102
  case CHANGE_VIEW:
102
103
  case CLEAR_FILTERS:
@@ -15,6 +15,7 @@ const INITIAL_STATE = {
15
15
  baseFilters: [],
16
16
  view: 'calendar',
17
17
  timezone: 'show',
18
+ timeFormat: null,
18
19
  colorSource: 'track',
19
20
  is_my_schedule: false,
20
21
  only_events_with_attendee_access: false,
@@ -45,7 +46,8 @@ const scheduleReducer = (state = INITIAL_STATE, action) => {
45
46
  hide_past_events_with_show_always_on_schedule,
46
47
  is_my_schedule,
47
48
  userProfile,
48
- isLoggedUser
49
+ isLoggedUser,
50
+ time_format
49
51
  } = payload; // data from JSON
50
52
 
51
53
  const filterByAccessLevel = only_events_with_attendee_access && isLoggedUser;
@@ -63,7 +65,8 @@ const scheduleReducer = (state = INITIAL_STATE, action) => {
63
65
  events,
64
66
  is_my_schedule,
65
67
  only_events_with_attendee_access,
66
- hide_past_events_with_show_always_on_schedule
68
+ hide_past_events_with_show_always_on_schedule,
69
+ timeFormat: state.timeFormat || time_format || '12h'
67
70
  };
68
71
  }
69
72
  case `SCHED_UPDATE_FILTER`: {
@@ -109,6 +112,10 @@ const scheduleReducer = (state = INITIAL_STATE, action) => {
109
112
  const {timezone} = payload;
110
113
  return {...state, timezone}
111
114
  }
115
+ case `SCHED_CHANGE_TIME_FORMAT`: {
116
+ const {timeFormat} = payload;
117
+ return {...state, timeFormat}
118
+ }
112
119
  case `SCHED_ADD_TO_SCHEDULE`: {
113
120
  const event = payload;
114
121
  const {allEvents, filters, hide_past_events_with_show_always_on_schedule} = state;
@@ -19,7 +19,7 @@ const SchedulePage = ({ summit, scheduleState, summitPhase, isLoggedUser, locati
19
19
 
20
20
  const [showFilters, setShowfilters] = useState(false);
21
21
  const filtersWrapperRef = useRef(null);
22
- const { key, events, allEvents, filters, view, timezone, colorSource } = scheduleState || {};
22
+ const { key, events, allEvents, filters, view, timezone, timeFormat, colorSource } = scheduleState || {};
23
23
 
24
24
  useEffect(() => {
25
25
  if (scheduleState && !!events?.length) {
@@ -71,6 +71,7 @@ const SchedulePage = ({ summit, scheduleState, summitPhase, isLoggedUser, locati
71
71
  filters,
72
72
  view,
73
73
  timezone,
74
+ timeFormat,
74
75
  colorSource,
75
76
  schedKey,
76
77
  modalSyncText: `Use the link below to add your saved sessions (found in My Schedule) to your personal
@@ -44,6 +44,8 @@ const CMS_FONT_FILE_PATH = "/static/fonts/"
44
44
  const PAYMENTS_FILE_PATH = `${STATIC_CONTENT_DIR_PATH}/payments.json`;
45
45
  const APPLE_PAY_DOMAIN_FILE_PATH = `/static/.well-known/`
46
46
  const APPLE_PAY_DOMAIN_FILE_NAME = `apple-developer-merchantid-domain-association`;
47
+ const MY_SCHEDULE_PAGE_DIR_PATH = `${STATIC_CONTENT_DIR_PATH}/my-schedule-page`;
48
+ const MY_SCHEDULE_PAGE_FILE_PATH = `${MY_SCHEDULE_PAGE_DIR_PATH}/index.json`;
47
49
 
48
50
  exports.REQUIRED_DIR_PATHS = [
49
51
  DATA_DIR_PATH,
@@ -55,8 +57,10 @@ exports.REQUIRED_DIR_PATHS = [
55
57
  LOBBY_PAGE_DIR_PATH,
56
58
  INVITATIONS_REJECT_PAGE_FILE_PATH,
57
59
  NAVBAR_DIR_PATH,
58
- FOOTER_DIR_PATH
60
+ FOOTER_DIR_PATH,
61
+ MY_SCHEDULE_PAGE_FILE_PATH
59
62
  ];
63
+
60
64
  exports.STATIC_CONTENT_DIR_PATH = STATIC_CONTENT_DIR_PATH;
61
65
  exports.PAGES_DIR_PATH = PAGES_DIR_PATH;
62
66
  exports.CONTENT_PAGES_PATH_NAME = CONTENT_PAGES_PATH_NAME;
@@ -95,3 +99,4 @@ exports.CMS_FONT_FILE_PATH = CMS_FONT_FILE_PATH;
95
99
  exports.PAYMENTS_FILE_PATH = PAYMENTS_FILE_PATH;
96
100
  exports.APPLE_PAY_DOMAIN_FILE_PATH = APPLE_PAY_DOMAIN_FILE_PATH;
97
101
  exports.APPLE_PAY_DOMAIN_FILE_NAME = APPLE_PAY_DOMAIN_FILE_NAME;
102
+ exports.MY_SCHEDULE_PAGE_FILE_PATH = MY_SCHEDULE_PAGE_FILE_PATH;
@@ -1,6 +1,7 @@
1
1
  import React, {useEffect, useState} from "react";
2
2
  import { connect } from "react-redux";
3
3
  import {compose} from "redux";
4
+ import { useLocation } from '@reach/router';
4
5
  import HeroComponent from "../components/HeroComponent";
5
6
  import {clearFilters, callAction, updateFilter, updateFiltersFromHash} from "../actions/schedule-actions";
6
7
  import { reloadScheduleData } from '../actions/base-actions';
@@ -12,13 +13,14 @@ const componentWrapper = (WrappedComponent) => ({schedules, ...props}) => {
12
13
  const { updateFiltersFromHash, reloadScheduleData, schedKey, summit, staticJsonFilesBuildTime } = props;
13
14
  const scheduleState = schedules?.find( s => s.key === schedKey);
14
15
  const { key, filters, view } = scheduleState || {};
16
+ const location = useLocation();
15
17
 
16
18
  useEffect(() => {
17
19
  if (schedules.length > 0) {
18
20
  updateFiltersFromHash(schedKey, filters, view);
19
21
  setLoaded(true);
20
22
  }
21
- }, [key]);
23
+ }, [key, location.hash]);
22
24
 
23
25
  if (!loaded)
24
26
  return <HeroComponent title="Loading schedule data" />;