@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/src/utils/cssUtils.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
const getFontFormat = (format) => {
|
|
2
|
-
const formatMap = {
|
|
3
|
-
"ttf": "format(\"truetype\")",
|
|
4
|
-
"otf": "format(\"opentype\")",
|
|
5
|
-
"woff": "format(\"woff\")",
|
|
6
|
-
"woff2": "format(\"woff2\")",
|
|
7
|
-
};
|
|
8
|
-
return formatMap[format] || "";
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const getFontSrc = (fontPath) => fontPath.replace(/^\/static/, "");
|
|
12
|
-
|
|
13
|
-
const generateFontFace = (fontFamily, fontData, fontWeight) => {
|
|
14
|
-
if (!fontFamily || !fontData || !fontData.fontFile || !fontData.fontFormat) return "";
|
|
15
|
-
|
|
16
|
-
const { fontFile, fontFormat } = fontData;
|
|
17
|
-
return `@font-face {
|
|
18
|
-
font-family: "${fontFamily}";
|
|
19
|
-
src: url("${getFontSrc(fontFile)}") ${getFontFormat(fontFormat)};
|
|
20
|
-
font-weight: ${fontWeight};
|
|
21
|
-
}`;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const generateFontFile = (fontsData) => {
|
|
25
|
-
if (!fontsData || !fontsData.fontFamily || !fontsData.regularFont || !fontsData.boldFont) return null;
|
|
26
|
-
|
|
27
|
-
const { fontFamily, regularFont, boldFont } = fontsData;
|
|
28
|
-
|
|
29
|
-
if (!regularFont.fontFile || !regularFont.fontFormat) return null;
|
|
30
|
-
if (!boldFont.fontFile || !boldFont.fontFormat) return null;
|
|
31
|
-
|
|
32
|
-
const regularFontFace = generateFontFace(fontFamily, regularFont, "normal");
|
|
33
|
-
const boldFontFace = generateFontFace(fontFamily, boldFont, "bold");
|
|
34
|
-
|
|
35
|
-
return `$font-family: "${fontFamily}";
|
|
36
|
-
|
|
37
|
-
:root {
|
|
38
|
-
--font_family: "${fontFamily}" !important;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
${regularFontFace}
|
|
42
|
-
${boldFontFace}
|
|
43
|
-
|
|
44
|
-
%font-regular {
|
|
45
|
-
font-family: var(--font_family);
|
|
46
|
-
font-weight: 400;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
%font-semi {
|
|
50
|
-
font-family: var(--font_family);
|
|
51
|
-
font-weight: 600;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
%font-bold {
|
|
55
|
-
font-family: var(--font_family);
|
|
56
|
-
font-weight: 700;
|
|
57
|
-
}`;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
module.exports = {
|
|
61
|
-
generateFontFile
|
|
62
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
class CustomEventManager {
|
|
2
|
-
static dispatchEvent = (eventName, eventData, target = window) => {
|
|
3
|
-
if (typeof target !== "undefined") {
|
|
4
|
-
const event = new CustomEvent(eventName, { detail: eventData });
|
|
5
|
-
target.dispatchEvent(event);
|
|
6
|
-
}
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
static addEventListener = (eventName, callback, target = window) => {
|
|
10
|
-
if (typeof target !== "undefined") {
|
|
11
|
-
target.addEventListener(eventName, callback);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
static removeEventListener = (eventName, callback, target = window) => {
|
|
16
|
-
if (typeof target !== "undefined") {
|
|
17
|
-
target.removeEventListener(eventName, callback);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export default CustomEventManager;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import useCustomEvent from "./useCustomEvent";
|
|
2
|
-
import CustomEventManager from "./CustomEventManager";
|
|
3
|
-
|
|
4
|
-
export { useCustomEvent, CustomEventManager };
|
|
5
|
-
|
|
6
|
-
export const INIT_LOGOUT_EVENT = "site_logout";
|
|
7
|
-
export const ANALYTICS_TRACK_EVENT = "analytics_track_event";
|
|
8
|
-
|
|
9
|
-
export const triggerOnInitLogout = () => {
|
|
10
|
-
CustomEventManager.dispatchEvent(INIT_LOGOUT_EVENT);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const triggerAnalyticsTrackEvent = (eventName, eventParams) => {
|
|
14
|
-
CustomEventManager.dispatchEvent(ANALYTICS_TRACK_EVENT, { eventName, eventParams });
|
|
15
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
import CustomEventManager from "./CustomEventManager";
|
|
3
|
-
|
|
4
|
-
const useCustomEvent = (eventName, callback) => {
|
|
5
|
-
useEffect(() => {
|
|
6
|
-
CustomEventManager.addEventListener(eventName, callback);
|
|
7
|
-
return () => {
|
|
8
|
-
CustomEventManager.removeEventListener(eventName, callback);
|
|
9
|
-
};
|
|
10
|
-
}, [eventName, callback]);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default useCustomEvent;
|