@openeventkit/event-site 2.0.119 → 2.0.121
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/gatsby-browser.js +12 -9
- package/package.json +3 -3
- package/src/actions/schedule-actions.js +2 -1
- package/src/pages/a/[...].js +2 -1
- package/src/reducers/all-schedules-reducer.js +2 -1
- package/src/reducers/schedule-reducer.js +9 -2
- package/src/templates/schedule-page.js +2 -1
- package/src/utils/cookies/providers/KlaroProvider.js +4 -1
- package/src/utils/withScheduleData.js +3 -1
package/gatsby-browser.js
CHANGED
|
@@ -6,6 +6,7 @@ import KlaroProvider from "./src/utils/cookies/providers/KlaroProvider";
|
|
|
6
6
|
import cookieServices from "./src/utils/cookies/services";
|
|
7
7
|
import TagManager from "./src/utils/tag-manager/TagManager";
|
|
8
8
|
import GoogleTagManagerProvider from "./src/utils/tag-manager/providers/GoogleTagManagerProvider";
|
|
9
|
+
import { getEnvVariable, GOOGLE_TAGMANAGER_ID } from "@utils/envVariables";
|
|
9
10
|
import smoothscroll from "smoothscroll-polyfill";
|
|
10
11
|
import "what-input";
|
|
11
12
|
|
|
@@ -25,17 +26,19 @@ export const onClientEntry = () => {
|
|
|
25
26
|
// smooth scroll polyfill needed for Safari
|
|
26
27
|
smoothscroll.polyfill();
|
|
27
28
|
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
// show cookie consent only if google tag manager was deferred loaded
|
|
30
|
+
// see gatsby-google-tag-manager-plugin in gatsby-config
|
|
31
|
+
if (getEnvVariable(GOOGLE_TAGMANAGER_ID)) {
|
|
32
|
+
const tagManager = new TagManager();
|
|
33
|
+
const googleTagManagerProvider = new GoogleTagManagerProvider();
|
|
34
|
+
tagManager.addProvider(googleTagManagerProvider);
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
const klaroProvider = new KlaroProvider();
|
|
37
|
+
const cookieManager = new CookieManager(klaroProvider, cookieServices);
|
|
38
|
+
cookieManager.show();
|
|
39
|
+
}
|
|
37
40
|
|
|
38
|
-
//
|
|
41
|
+
// apply colors
|
|
39
42
|
Object.entries(colors).forEach(([key, value]) => {
|
|
40
43
|
document.documentElement.style.setProperty(`--${key}`, value);
|
|
41
44
|
document.documentElement.style.setProperty(`--${key}50`, `${value}50`);
|
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.
|
|
4
|
+
"version": "2.0.121",
|
|
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.
|
|
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",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"stream-browserify": "^3.0.0",
|
|
129
129
|
"stream-chat": "^2.7.2",
|
|
130
130
|
"stream-chat-react": "3.1.7",
|
|
131
|
-
"summit-registration-lite": "5.0.
|
|
131
|
+
"summit-registration-lite": "5.0.37",
|
|
132
132
|
"superagent": "8.0.9",
|
|
133
133
|
"sweetalert2": "^9.17.0",
|
|
134
134
|
"upcoming-events-widget": "3.0.5",
|
|
@@ -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
|
: "";
|
package/src/pages/a/[...].js
CHANGED
|
@@ -32,6 +32,7 @@ const mySchedulePage = ({ location, summitPhase,isLoggedUser, user, allowClick,
|
|
|
32
32
|
scheduleProps={{
|
|
33
33
|
title: title,
|
|
34
34
|
showSync: true,
|
|
35
|
+
showShare: false,
|
|
35
36
|
subtitle: <Link to={"/a/schedule"}>Show Schedule</Link>
|
|
36
37
|
}}
|
|
37
38
|
schedKey={key}
|
|
@@ -86,7 +87,7 @@ const App = ({ isLoggedUser, user, summitPhase, allowClick = true, data }) => {
|
|
|
86
87
|
<PostersPage path="/posters" trackGroupId={0} location={location} />
|
|
87
88
|
<PostersPage path="/posters/:trackGroupId" location={location} />
|
|
88
89
|
<PosterDetailPage path="/poster/:presentationId/" isLoggedIn={isLoggedUser} user={user} location={location} />
|
|
89
|
-
|
|
90
|
+
{ mySchedulePageJson.needsTicketAuthz && mySchedulePage({location, summitPhase,isLoggedUser, user, allowClick, title: mySchedulePageJson.title, key: mySchedulePageJson.key }) }
|
|
90
91
|
<ShowOpenRoute path="/" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
|
|
91
92
|
<WithBadgeRoute path="/event/:eventId" summitPhase={summitPhase} isLoggedIn={isLoggedUser} user={user} location={location}>
|
|
92
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
|
|
@@ -32,8 +32,11 @@ class KlaroProvider extends CookieManagerProvider {
|
|
|
32
32
|
},
|
|
33
33
|
consentNotice: {
|
|
34
34
|
description:
|
|
35
|
-
"Hi!
|
|
35
|
+
"Hi! We use cookies to give you the best online experience and analyze our website's performance by collecting anonymous user data, but only if you accept.",
|
|
36
|
+
learnMore: "Customize"
|
|
36
37
|
},
|
|
38
|
+
decline: "No thanks",
|
|
39
|
+
ok: "Sure"
|
|
37
40
|
}
|
|
38
41
|
},
|
|
39
42
|
services: services.map(service => ({
|
|
@@ -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" />;
|