@openeventkit/event-site 2.0.115 → 2.0.117
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 +28 -21
- package/gatsby-config.mjs +13 -9
- package/gatsby-node.js +25 -27
- package/package.json +6 -4
- package/plugins/gatsby-plugin-google-tagmanager/.babelrc +9 -0
- package/plugins/gatsby-plugin-google-tagmanager/CHANGELOG.md +793 -0
- package/plugins/gatsby-plugin-google-tagmanager/LICENSE +22 -0
- package/plugins/gatsby-plugin-google-tagmanager/README.md +102 -0
- package/plugins/gatsby-plugin-google-tagmanager/gatsby-browser.js +99 -0
- package/plugins/gatsby-plugin-google-tagmanager/gatsby-node.js +53 -0
- package/plugins/gatsby-plugin-google-tagmanager/gatsby-ssr.js +127 -0
- package/plugins/gatsby-plugin-google-tagmanager/index.js +1 -0
- package/plugins/gatsby-plugin-google-tagmanager/package.json +48 -0
- package/src/cms/config/collections/defaultPagesCollection/invitationsRejectPage/index.js +6 -6
- package/src/components/AttendeeToAttendeeWidgetComponent.js +7 -8
- package/src/components/Footer/template.js +3 -2
- package/src/components/FooterMarketing.js +1 -1
- package/src/components/LogoutButton.js +6 -7
- package/src/components/MarketingHero/ImagesColumn.js +2 -2
- package/src/components/MarketingHero/index.js +1 -1
- package/src/components/RegistrationLiteComponent.js +2 -4
- package/src/components/Seo.js +3 -3
- package/src/content/site-settings/index.json +50 -1
- package/src/defaults/colors.json +33 -1
- package/src/styles/colors.scss +36 -33
- package/src/styles/fonts.scss +2 -2
- package/src/templates/marketing-page-template/MainColumn.js +54 -43
- package/src/templates/marketing-page-template/index.js +14 -14
- package/src/utils/EventEmitter.js +26 -0
- package/src/utils/cookies/CookieManager.js +27 -0
- package/src/utils/cookies/CookieManagerProvider.js +15 -0
- package/src/utils/cookies/providers/KlaroProvider.js +81 -0
- package/src/utils/cookies/services.js +57 -0
- package/src/utils/envVariables.js +94 -94
- package/src/utils/eventTriggers.js +19 -0
- package/src/utils/filePath.js +2 -2
- package/src/utils/hooks/index.js +3 -1
- package/src/utils/hooks/useEventListener.js +15 -0
- package/src/utils/hooks/useResize.js +3 -8
- package/src/utils/scssUtils.js +146 -0
- package/src/utils/tag-manager/TagManager.js +41 -0
- package/src/utils/tag-manager/TagManagerProvider.js +7 -0
- package/src/utils/tag-manager/providers/GoogleTagManagerProvider.js +49 -0
- package/src/utils/useSiteSettings.js +1 -5
- package/src/utils/analytics/AnalyticsManager.js +0 -28
- package/src/utils/analytics/AnalyticsProvider.js +0 -7
- package/src/utils/analytics/events.js +0 -1
- package/src/utils/analytics/providers/GoogleTagManagerProvider.js +0 -38
- package/src/utils/cssUtils.js +0 -62
- package/src/utils/customEvents/CustomEventManager.js +0 -22
- package/src/utils/customEvents/index.js +0 -15
- package/src/utils/customEvents/useCustomEvent.js +0 -13
package/gatsby-browser.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as Sentry from "@sentry/gatsby";
|
|
2
2
|
import { RewriteFrames as RewriteFramesIntegration } from "@sentry/integrations";
|
|
3
3
|
import ReduxWrapper from "./src/state/ReduxWrapper";
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
4
|
+
import CookieManager from "./src/utils/cookies/CookieManager";
|
|
5
|
+
import KlaroProvider from "./src/utils/cookies/providers/KlaroProvider";
|
|
6
|
+
import cookieServices from "./src/utils/cookies/services";
|
|
7
|
+
import TagManager from "./src/utils/tag-manager/TagManager";
|
|
8
|
+
import GoogleTagManagerProvider from "./src/utils/tag-manager/providers/GoogleTagManagerProvider";
|
|
8
9
|
import smoothscroll from "smoothscroll-polyfill";
|
|
9
10
|
import "what-input";
|
|
10
11
|
|
|
@@ -18,29 +19,35 @@ import "./src/utils/fontAwesome";
|
|
|
18
19
|
import colors from "data/colors.json";
|
|
19
20
|
import marketingSettings from "data/marketing-settings.json";
|
|
20
21
|
|
|
21
|
-
// smooth scroll polyfill needed for Safari
|
|
22
|
-
smoothscroll.polyfill();
|
|
23
|
-
|
|
24
|
-
const googleTagManagerProvider = new GoogleTagManagerProvider();
|
|
25
|
-
const analyticsManager = new AnalyticsManager(googleTagManagerProvider);
|
|
26
|
-
|
|
27
22
|
export const wrapRootElement = ReduxWrapper;
|
|
28
23
|
|
|
29
24
|
export const onClientEntry = () => {
|
|
30
|
-
//
|
|
31
|
-
|
|
25
|
+
// smooth scroll polyfill needed for Safari
|
|
26
|
+
smoothscroll.polyfill();
|
|
27
|
+
|
|
28
|
+
// Initialize TagManager and add GoogleTagManagerProvider
|
|
29
|
+
const tagManager = new TagManager();
|
|
30
|
+
const googleTagManagerProvider = new GoogleTagManagerProvider();
|
|
31
|
+
tagManager.addProvider(googleTagManagerProvider);
|
|
32
|
+
|
|
33
|
+
// Initialize Cookie Manager with Klaro provider
|
|
34
|
+
const klaroProvider = new KlaroProvider();
|
|
35
|
+
const cookieManager = new CookieManager(klaroProvider, cookieServices);
|
|
36
|
+
cookieManager.show();
|
|
37
|
+
|
|
38
|
+
// Apply colors
|
|
32
39
|
Object.entries(colors).forEach(([key, value]) => {
|
|
33
40
|
document.documentElement.style.setProperty(`--${key}`, value);
|
|
34
41
|
document.documentElement.style.setProperty(`--${key}50`, `${value}50`);
|
|
35
42
|
});
|
|
36
43
|
// set theme
|
|
37
|
-
const themeSetting = marketingSettings.find(ms => ms.key ===
|
|
38
|
-
const theme = themeSetting?.value ||
|
|
39
|
-
document.documentElement.setAttribute(
|
|
44
|
+
const themeSetting = marketingSettings.find(ms => ms.key === "EVENT_SITE_COLOR_SCHEME");
|
|
45
|
+
const theme = themeSetting?.value || "LIGHT";
|
|
46
|
+
document.documentElement.setAttribute("data-theme", theme);
|
|
40
47
|
|
|
41
48
|
// init sentry
|
|
42
49
|
const GATSBY_SENTRY_DSN = process.env.GATSBY_SENTRY_DSN;
|
|
43
|
-
if(GATSBY_SENTRY_DSN) {
|
|
50
|
+
if (GATSBY_SENTRY_DSN) {
|
|
44
51
|
console.log("INIT SENTRY ....");
|
|
45
52
|
// sentry init
|
|
46
53
|
Sentry.init({
|
|
@@ -61,12 +68,12 @@ export const onClientEntry = () => {
|
|
|
61
68
|
return frame;
|
|
62
69
|
}
|
|
63
70
|
const isComponentFrame = /component---src-pages-(\w*)-js(-\w*).js/.test(frame.filename);
|
|
64
|
-
if(isComponentFrame){
|
|
65
|
-
frame.filename = frame.filename.replace(/(component---src-pages-(\w*)-js)(-\w*).js$/,'$1.js')
|
|
71
|
+
if (isComponentFrame) {
|
|
72
|
+
frame.filename = frame.filename.replace(/(component---src-pages-(\w*)-js)(-\w*).js$/, '$1.js');
|
|
66
73
|
}
|
|
67
74
|
const isAppFrame = /app(-\w*).js/.test(frame.filename);
|
|
68
|
-
if(isAppFrame){
|
|
69
|
-
frame.filename = frame.filename.replace(/app(-\w*).js$/,'app.js')
|
|
75
|
+
if (isAppFrame) {
|
|
76
|
+
frame.filename = frame.filename.replace(/app(-\w*).js$/, 'app.js');
|
|
70
77
|
}
|
|
71
78
|
return frame;
|
|
72
79
|
}
|
|
@@ -76,4 +83,4 @@ export const onClientEntry = () => {
|
|
|
76
83
|
});
|
|
77
84
|
window.Sentry = Sentry;
|
|
78
85
|
}
|
|
79
|
-
};
|
|
86
|
+
};
|
package/gatsby-config.mjs
CHANGED
|
@@ -26,26 +26,27 @@ const {
|
|
|
26
26
|
let siteSettings = require(`./${SITE_SETTINGS_FILE_PATH}`);
|
|
27
27
|
try {
|
|
28
28
|
siteSettings = require(path.resolve(SITE_SETTINGS_FILE_PATH));
|
|
29
|
-
}
|
|
30
|
-
catch (e) {
|
|
29
|
+
} catch (e) {
|
|
31
30
|
console.log("Falling back to default site settings.")
|
|
32
31
|
}
|
|
33
32
|
|
|
34
|
-
const
|
|
35
|
-
|
|
33
|
+
const packageJson = require(path.resolve(__dirname, "package.json"));
|
|
34
|
+
|
|
35
|
+
const title = siteSettings?.siteMetadata?.title || process.env.GATSBY_METADATA_TITLE;
|
|
36
|
+
const description = siteSettings?.siteMetadata?.description || process.env.GATSBY_METADATA_DESCRIPTION;
|
|
36
37
|
const faviconAsset = siteSettings?.favicon?.asset;
|
|
37
38
|
|
|
38
39
|
const manifestPlugin = faviconAsset ? [
|
|
39
40
|
{
|
|
40
41
|
resolve: "gatsby-plugin-manifest",
|
|
41
42
|
options: {
|
|
42
|
-
name: title,
|
|
43
|
-
short_name: title,
|
|
44
|
-
description: description,
|
|
43
|
+
name: title ?? packageJson.description,
|
|
44
|
+
short_name: title ?? packageJson.description,
|
|
45
45
|
start_url: "/",
|
|
46
46
|
display: "minimal-ui",
|
|
47
47
|
icon: path.join(SITE_SETTINGS_DIR_PATH, faviconAsset),
|
|
48
|
-
include_favicon: true
|
|
48
|
+
include_favicon: true,
|
|
49
|
+
...description && { description }
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
] : [];
|
|
@@ -55,7 +56,10 @@ const googleTagManagerPlugin = process.env.GATSBY_GOOGLE_TAGMANAGER_ID ? [
|
|
|
55
56
|
resolve: "gatsby-plugin-google-tagmanager",
|
|
56
57
|
options: {
|
|
57
58
|
id: process.env.GATSBY_GOOGLE_TAGMANAGER_ID,
|
|
58
|
-
includeInDevelopment: true
|
|
59
|
+
includeInDevelopment: true,
|
|
60
|
+
// defer script tags loading to after consent is given
|
|
61
|
+
// managed by Klaro cookie manager
|
|
62
|
+
deferLoading: true
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
65
|
] : [];
|
package/gatsby-node.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const axios = require("axios");
|
|
2
2
|
const path = require("path");
|
|
3
|
-
const fs = require("fs
|
|
3
|
+
const fs = require("fs");
|
|
4
4
|
const webpack = require("webpack");
|
|
5
5
|
const {
|
|
6
6
|
createFilePath
|
|
@@ -16,6 +16,7 @@ const {
|
|
|
16
16
|
REQUIRED_DIR_PATHS,
|
|
17
17
|
DEFAULT_COLORS_FILE_PATH,
|
|
18
18
|
COLORS_FILE_PATH,
|
|
19
|
+
COLORS_SCSS_FILE_PATH,
|
|
19
20
|
SITE_SETTINGS_FILE_PATH,
|
|
20
21
|
SUMMIT_FILE_PATH,
|
|
21
22
|
EVENTS_FILE_PATH,
|
|
@@ -29,7 +30,12 @@ const {
|
|
|
29
30
|
SPONSORS_FILE_PATH,
|
|
30
31
|
FONTS_SCSS_FILE_PATH
|
|
31
32
|
} = require("./src/utils/filePath");
|
|
32
|
-
|
|
33
|
+
|
|
34
|
+
const {
|
|
35
|
+
generateAndWriteScssFile,
|
|
36
|
+
generateFontScssFile,
|
|
37
|
+
generateColorsScssFile
|
|
38
|
+
} = require("./src/utils/scssUtils");
|
|
33
39
|
|
|
34
40
|
const fileBuildTimes = [];
|
|
35
41
|
|
|
@@ -228,8 +234,8 @@ exports.onPreBootstrap = async () => {
|
|
|
228
234
|
const summitId = process.env.GATSBY_SUMMIT_ID;
|
|
229
235
|
const summitApiBaseUrl = process.env.GATSBY_SUMMIT_API_BASE_URL;
|
|
230
236
|
let marketingSettings = await SSR_getMarketingSettings(process.env.GATSBY_MARKETING_API_BASE_URL, summitId);
|
|
231
|
-
const colorSettings = fs.existsSync(COLORS_FILE_PATH) ? JSON.parse(fs.readFileSync(COLORS_FILE_PATH)) : require(`./${DEFAULT_COLORS_FILE_PATH}`);
|
|
232
237
|
const siteSettings = fs.existsSync(SITE_SETTINGS_FILE_PATH) ? JSON.parse(fs.readFileSync(SITE_SETTINGS_FILE_PATH)) : {};
|
|
238
|
+
const colors = fs.existsSync(COLORS_FILE_PATH) ? JSON.parse(fs.readFileSync(COLORS_FILE_PATH)) : require(`./${DEFAULT_COLORS_FILE_PATH}`);
|
|
233
239
|
|
|
234
240
|
const config = {
|
|
235
241
|
client: {
|
|
@@ -247,12 +253,12 @@ exports.onPreBootstrap = async () => {
|
|
|
247
253
|
|
|
248
254
|
const accessToken = await getAccessToken(config, process.env.GATSBY_BUILD_SCOPES).then(({ token }) => token.access_token);
|
|
249
255
|
|
|
250
|
-
const FileType =
|
|
256
|
+
const FileType = "FILE";
|
|
251
257
|
// extract colors from marketing settings
|
|
252
|
-
marketingSettings = marketingSettings.map(
|
|
253
|
-
if (entry.key.startsWith("color_"))
|
|
254
|
-
if(entry.type === FileType) return {...entry, value: entry.file};
|
|
255
|
-
return {...entry};
|
|
258
|
+
marketingSettings = marketingSettings.map(entry => {
|
|
259
|
+
if (entry.key.startsWith("color_")) colors[entry.key] = entry.value;
|
|
260
|
+
if (entry.type === FileType) return { ...entry, value: entry.file };
|
|
261
|
+
return { ...entry };
|
|
256
262
|
});
|
|
257
263
|
|
|
258
264
|
// create required directories
|
|
@@ -263,7 +269,17 @@ exports.onPreBootstrap = async () => {
|
|
|
263
269
|
});
|
|
264
270
|
|
|
265
271
|
fs.writeFileSync(MARKETING_SETTINGS_FILE_PATH, JSON.stringify(marketingSettings), "utf8");
|
|
266
|
-
|
|
272
|
+
|
|
273
|
+
// write colors json used to set runtime colors in gatsby-browser
|
|
274
|
+
fs.writeFileSync(COLORS_FILE_PATH, JSON.stringify(colors), "utf8");
|
|
275
|
+
|
|
276
|
+
// generate and write colors SCSS file used by built styles
|
|
277
|
+
generateAndWriteScssFile(generateColorsScssFile, colors, COLORS_SCSS_FILE_PATH);
|
|
278
|
+
|
|
279
|
+
if (siteSettings.siteFont) {
|
|
280
|
+
// generate and write font SCSS file used by built styles
|
|
281
|
+
generateAndWriteScssFile(generateFontScssFile, siteSettings.siteFont, FONTS_SCSS_FILE_PATH);
|
|
282
|
+
}
|
|
267
283
|
|
|
268
284
|
// summit
|
|
269
285
|
const summit = await SSR_getSummit(summitApiBaseUrl, summitId);
|
|
@@ -292,7 +308,6 @@ exports.onPreBootstrap = async () => {
|
|
|
292
308
|
});
|
|
293
309
|
fs.writeFileSync(EVENTS_IDX_FILE_PATH, JSON.stringify(allEventsIDX), "utf8");
|
|
294
310
|
|
|
295
|
-
|
|
296
311
|
// Show Speakers
|
|
297
312
|
const allSpeakers = await SSR_getSpeakers(summitApiBaseUrl, summitId, accessToken);
|
|
298
313
|
console.log(`allSpeakers ${allSpeakers.length}`);
|
|
@@ -335,23 +350,6 @@ exports.onPreBootstrap = async () => {
|
|
|
335
350
|
siteSettings.lastBuild = Date.now();
|
|
336
351
|
|
|
337
352
|
fs.writeFileSync(SITE_SETTINGS_FILE_PATH, JSON.stringify(siteSettings), "utf8");
|
|
338
|
-
|
|
339
|
-
// Read fonts from site settings
|
|
340
|
-
const siteFonts = siteSettings.siteFont;
|
|
341
|
-
|
|
342
|
-
if(siteFonts && Object.keys(siteFonts).length > 0) {
|
|
343
|
-
// Generate the SCSS file
|
|
344
|
-
const scssFontsFile = generateFontFile(siteFonts);
|
|
345
|
-
if (scssFontsFile) {
|
|
346
|
-
const standalone = __dirname === path.resolve();
|
|
347
|
-
let fontFilePath = FONTS_SCSS_FILE_PATH;
|
|
348
|
-
if (!standalone) {
|
|
349
|
-
fontFilePath = `${__dirname}/${fontFilePath}`;
|
|
350
|
-
}
|
|
351
|
-
fs.writeFileSync(fontFilePath, scssFontsFile);
|
|
352
|
-
console.log(`CUSTOM FONT FILE ${fontFilePath} generated.`);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
353
|
};
|
|
356
354
|
|
|
357
355
|
exports.createSchemaCustomization = async ({ actions, reporter, getNodeAndSavePathDependency }) => {
|
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.117",
|
|
5
5
|
"author": "Tipit LLC",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
@@ -28,7 +28,8 @@
|
|
|
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.0
|
|
31
|
+
"attendee-to-attendee-widget": "3.1.0",
|
|
32
|
+
"autoprefixer": "10.4.14",
|
|
32
33
|
"awesome-bootstrap-checkbox": "^1.0.1",
|
|
33
34
|
"axios": "^0.19.2",
|
|
34
35
|
"babel-preset-gatsby": "^3.13.2",
|
|
@@ -53,7 +54,6 @@
|
|
|
53
54
|
"gatsby": "^5.13.5",
|
|
54
55
|
"gatsby-alias-imports": "^1.0.6",
|
|
55
56
|
"gatsby-plugin-decap-cms": "^4.0.4",
|
|
56
|
-
"gatsby-plugin-google-tagmanager": "^5.13.1",
|
|
57
57
|
"gatsby-plugin-image": "^3.13.1",
|
|
58
58
|
"gatsby-plugin-manifest": "^5.13.1",
|
|
59
59
|
"gatsby-plugin-mdx": "^5.12.3",
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"immutability-helper": "2.9.1",
|
|
75
75
|
"immutable": "^5.0.0-beta.5",
|
|
76
76
|
"jsdom": "^24.1.0",
|
|
77
|
+
"klaro": "^0.7.21",
|
|
77
78
|
"lite-schedule-widget": "3.0.3",
|
|
78
79
|
"live-event-widget": "4.0.2",
|
|
79
80
|
"lodash": "^4.17.19",
|
|
@@ -127,7 +128,7 @@
|
|
|
127
128
|
"stream-browserify": "^3.0.0",
|
|
128
129
|
"stream-chat": "^2.7.2",
|
|
129
130
|
"stream-chat-react": "3.1.7",
|
|
130
|
-
"summit-registration-lite": "5.0.
|
|
131
|
+
"summit-registration-lite": "5.0.36",
|
|
131
132
|
"superagent": "8.0.9",
|
|
132
133
|
"sweetalert2": "^9.17.0",
|
|
133
134
|
"upcoming-events-widget": "3.0.5",
|
|
@@ -138,6 +139,7 @@
|
|
|
138
139
|
"video.js": "^7.8.2",
|
|
139
140
|
"videojs-mux": "^3.1.0",
|
|
140
141
|
"videojs-youtube": "^2.6.1",
|
|
142
|
+
"web-vitals": "^1.1.2",
|
|
141
143
|
"what-input": "^5.2.10",
|
|
142
144
|
"xmlhttprequest": "^1.8.0",
|
|
143
145
|
"yup": "^0.32.11"
|