gatsby-matrix-theme 3.2.24 → 3.2.28

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.
Files changed (21) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/gatsby-config.js +1 -7
  3. package/package.json +2 -2
  4. package/src/components/atoms/cards/game-card/index.js +11 -9
  5. package/src/components/molecules/faq/index.js +8 -8
  6. package/src/gatsby-core-theme/components/atoms/module-title/index.js +11 -14
  7. package/src/gatsby-core-theme/components/molecules/content/index.js +7 -7
  8. package/src/gatsby-core-theme/components/pages/body/index.js +21 -1
  9. package/storybook/public/{1.ac251b98.iframe.bundle.js → 1.2a2b1ee2.iframe.bundle.js} +1 -1
  10. package/storybook/public/{5.7148fbb6.iframe.bundle.js → 5.6967d34e.iframe.bundle.js} +3 -3
  11. package/storybook/public/{5.7148fbb6.iframe.bundle.js.LICENSE.txt → 5.6967d34e.iframe.bundle.js.LICENSE.txt} +0 -0
  12. package/storybook/public/5.6967d34e.iframe.bundle.js.map +1 -0
  13. package/storybook/public/{6.ad9d9402.iframe.bundle.js → 6.892dc208.iframe.bundle.js} +1 -1
  14. package/storybook/public/iframe.html +1 -1
  15. package/storybook/public/{main.17fb3064.iframe.bundle.js → main.08905184.iframe.bundle.js} +1 -1
  16. package/storybook/public/{runtime~main.d4a6ad7e.iframe.bundle.js → runtime~main.3d3135a4.iframe.bundle.js} +1 -1
  17. package/storybook/public/{vendors~main.73d094d3.iframe.bundle.js → vendors~main.0a927976.iframe.bundle.js} +4 -4
  18. package/storybook/public/{vendors~main.73d094d3.iframe.bundle.js.LICENSE.txt → vendors~main.0a927976.iframe.bundle.js.LICENSE.txt} +0 -0
  19. package/storybook/public/vendors~main.0a927976.iframe.bundle.js.map +1 -0
  20. package/storybook/public/5.7148fbb6.iframe.bundle.js.map +0 -1
  21. package/storybook/public/vendors~main.73d094d3.iframe.bundle.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,53 @@
1
+ ## [3.2.28](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.2.27...v3.2.28) (2022-02-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fixed prelive path ([613be59](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/613be5928fa86f418bd5296f701b32ae77d54d1d))
7
+ * preconnectLinks removed ([325406c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/325406c1f772dce8a42c3be89a3c8213579957d4))
8
+
9
+
10
+ * Merge branch 'tm-2681-canary-tokens' into 'master' ([bcbf07d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bcbf07d830c41f628d180ef592ffb82a8e0f9b00))
11
+
12
+ ## [3.2.27](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.2.26...v3.2.27) (2022-02-08)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * added canary token script ([af5479f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/af5479fa3e9814baf9a06368a560754d10f0f49e))
18
+
19
+
20
+ ### Config
21
+
22
+ * updated to latest core version ([bc48d27](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bc48d277b3dba149aeeffdaff490b8715320f288))
23
+
24
+
25
+ * Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([23020a5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/23020a5036887d5570c1958820c4de74b211a938))
26
+ * Merge branch 'tm-2681-canary-tokens' into 'master' ([49fca6c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/49fca6ced00281ce2a4a17f93b927179fddbf8ff))
27
+
28
+ ## [3.2.26](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.2.25...v3.2.26) (2022-02-08)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * removing unused divs ([7f5bc6d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7f5bc6dcc182d025117e2005c3973f41973588f3))
34
+
35
+
36
+ * Merge branch 'master' of git.ilcd.rocks:team-floyd/themes/matrix-theme ([f704c0b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f704c0b58a8a8e124790281ad36637454216bdde))
37
+
38
+ ## [3.2.25](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.2.24...v3.2.25) (2022-02-07)
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * clean up gatsby config ([5c2f4df](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5c2f4df24fce6888fe8222084c7d7c5cd7b1f9e5))
44
+ * fixed conflicts ([e2b84b8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e2b84b885e229e28ca9fc71c36fc728a854d5693))
45
+ * keep open FAQ when js is blocked ([230d1db](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/230d1db97e2fd99646ee63abab10473d204d1adc))
46
+ * return 70 coverage ([b14b876](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b14b876bba8ffbfd90fa27da95b5bdb2650dde3e))
47
+
48
+
49
+ * Merge branch 'tm-2697-Faq' into 'master' ([4615d58](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4615d5853a2ef640834bbbdfc0ba019ed2987cb6))
50
+
1
51
  ## [3.2.24](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v3.2.23...v3.2.24) (2022-02-07)
2
52
 
3
53
 
package/gatsby-config.js CHANGED
@@ -16,13 +16,7 @@ module.exports = {
16
16
  resolve: `gatsby-core-theme`,
17
17
  options: {
18
18
  siteName: process.env.GATSBY_SITE_NAME,
19
- preconnectLinks: [
20
- 'https://www.google-analytics.com',
21
- 'https://www.googletagmanager.com',
22
- 'https://gm.innocraft.cloud',
23
- 'https://assets-srv.s3.eu-west-1.amazonaws.com',
24
- 'https://d3449cb8ihm3k3.cloudfront.net',
25
- ],
19
+ preconnectLinks: [process.env.IMAGE_CDN_URL],
26
20
  },
27
21
  },
28
22
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "3.2.24",
3
+ "version": "3.2.28",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -31,7 +31,7 @@
31
31
  "cross-env": "^7.0.2",
32
32
  "dotenv": "8.2.0",
33
33
  "gatsby": "^3.3.1",
34
- "gatsby-core-theme": "^2.2.6",
34
+ "gatsby-core-theme": "^3.0.0",
35
35
  "gatsby-image": "^3.3.0",
36
36
  "gatsby-plugin-image": "^1.3.1",
37
37
  "gatsby-plugin-postcss": "^4.3.0",
@@ -25,15 +25,17 @@ const GameCard = ({ item, button_text = 'play_now', width, height }) => {
25
25
  return (
26
26
  <BaseCard item={item} isLinked cardType="game">
27
27
  {!featured && (
28
- <div className={styles.cardBanner}>
29
- <Link to={path} className="game-card-gtm" aria-label={`${title} Link`}>
30
- {banner ? (
31
- <LazyImage width={width} height={height} src={imagePrettyUrl(banner)} alt={title} />
32
- ) : (
33
- <GatsbyImg filename="default-slot.jpg" alt={title} />
34
- )}
35
- </Link>
36
- </div>
28
+ <Link
29
+ to={path}
30
+ className={`game-card-gtm ${styles.cardBanner}`}
31
+ aria-label={`${title} Link`}
32
+ >
33
+ {banner ? (
34
+ <LazyImage width={width} height={height} src={imagePrettyUrl(banner)} alt={title} />
35
+ ) : (
36
+ <GatsbyImg filename="default-slot.jpg" alt={title} />
37
+ )}
38
+ </Link>
37
39
  )}
38
40
  <div className={`${styles.cardContent} ${featured && styles.featured}`}>
39
41
  <Link to={path} className="game-card-gtm">
@@ -7,15 +7,15 @@ import keygen from '~helpers/keygen';
7
7
 
8
8
  /* eslint-disable react/no-danger */
9
9
 
10
- const Faq = ({ module, openAll = true, openItem, closeOthers = false, icon = '' }) => {
10
+ const Faq = ({ module, closeAll = false, openItem, closeOthers = false, icon = '' }) => {
11
11
  const { items } = module;
12
12
  const itemRefs = useRef([]);
13
13
  const btnRefs = useRef([]);
14
14
 
15
- const openAllItems = () => {
15
+ const closeAllItems = () => {
16
16
  for (let i = 0; i < itemRefs.current.length; i += 1) {
17
- itemRefs.current[i].classList.add(styles.active);
18
- btnRefs.current[i].classList.add(styles.invertArrow);
17
+ itemRefs.current[i].classList.remove(styles.active);
18
+ btnRefs.current[i].classList.remove(styles.invertArrow);
19
19
  }
20
20
  };
21
21
 
@@ -45,8 +45,8 @@ const Faq = ({ module, openAll = true, openItem, closeOthers = false, icon = ''
45
45
  };
46
46
 
47
47
  useEffect(() => {
48
- if (openAll) {
49
- openAllItems();
48
+ if (closeAll) {
49
+ closeAllItems();
50
50
  }
51
51
  });
52
52
  useEffect(() => {
@@ -72,7 +72,7 @@ const Faq = ({ module, openAll = true, openItem, closeOthers = false, icon = ''
72
72
  </span>
73
73
  </button>
74
74
  <div
75
- className={styles.content}
75
+ className={`${styles.content} ${styles.active}`}
76
76
  ref={(el) => (itemRefs.current[index] = el)}
77
77
  dangerouslySetInnerHTML={{ __html: item.answer }}
78
78
  />
@@ -93,7 +93,7 @@ Faq.propTypes = {
93
93
  })
94
94
  ),
95
95
  }).isRequired,
96
- openAll: PropTypes.bool,
96
+ closeAll: PropTypes.bool,
97
97
  openItem: PropTypes.number,
98
98
  closeOthers: PropTypes.bool,
99
99
  styles: PropTypes.shape({}),
@@ -32,12 +32,12 @@ const ModuleTitle = ({ module, viewMoreIcon = <FaAngleRight />, pageContext = nu
32
32
  ? translate(translations, month, month)
33
33
  : false;
34
34
 
35
- const getTitle = () => {
35
+ const getTitle = (className) => {
36
36
  const moduleTitle = module?.title || module?.module_title;
37
37
 
38
38
  if (!module?.module_title_tag) {
39
39
  return (
40
- <h2 className={styles.noTag}>
40
+ <h2 className={`${styles.noTag} ${className}`}>
41
41
  {moduleTitle}
42
42
  {currentMonth ? (
43
43
  <span className={styles.toplistDate}>
@@ -51,7 +51,7 @@ const ModuleTitle = ({ module, viewMoreIcon = <FaAngleRight />, pageContext = nu
51
51
 
52
52
  if (module.module_title_tag)
53
53
  return (
54
- <CustomTag>
54
+ <CustomTag className={className}>
55
55
  {moduleTitle}
56
56
  {currentMonth ? (
57
57
  <span className={styles.toplistDate}>
@@ -62,7 +62,7 @@ const ModuleTitle = ({ module, viewMoreIcon = <FaAngleRight />, pageContext = nu
62
62
  </CustomTag>
63
63
  );
64
64
  return (
65
- <span className={styles.noTag}>
65
+ <span className={`${styles.noTag} ${className}`}>
66
66
  {moduleTitle}
67
67
  {currentMonth ? (
68
68
  <span className={styles.toplistDate}>
@@ -84,9 +84,7 @@ const ModuleTitle = ({ module, viewMoreIcon = <FaAngleRight />, pageContext = nu
84
84
  module?.style && styles[module.style]
85
85
  } ${tabsToplist ? styles.tabsToplist : null}`}
86
86
  >
87
- <div className={styles.toplistTitle}>
88
- {(module?.title || module.module_title) && getTitle(module)}
89
- </div>
87
+ {(module?.title || module.module_title) && getTitle(styles.toplistTitle)}
90
88
 
91
89
  {module.link_label && (
92
90
  <Link to={module.link_value} className={`${styles.viewMore} module-title-gtm`}>
@@ -96,13 +94,12 @@ const ModuleTitle = ({ module, viewMoreIcon = <FaAngleRight />, pageContext = nu
96
94
  )}
97
95
  </div>
98
96
  ) : (
99
- <div
100
- className={`${styles.moduleTitle} ${styles[template]} ${
101
- module?.style && styles[module.style]
102
- } ${styles.toplistTitle} ${tabsToplist ? styles.tabsToplist : null}`}
103
- >
104
- {(module?.title || module.module_title) && getTitle(module)}
105
- </div>
97
+ (module?.title || module.module_title) &&
98
+ getTitle(
99
+ `${styles.moduleTitle} ${styles[template]} ${module?.style && styles[module.style]} ${
100
+ styles.toplistTitle
101
+ } ${tabsToplist ? styles.tabsToplist : null}`
102
+ )
106
103
  ))
107
104
  );
108
105
  };
@@ -81,13 +81,13 @@ const Content = ({ module }) => {
81
81
 
82
82
  return (
83
83
  <>
84
- <div className={`${styles.content} ${showMore && styles.showMore}`}>
85
- <div className={`${switchStyle(module.style)}`}>
86
- {module.value &&
87
- parse(module.value, {
88
- replace: replaceMedia,
89
- })}
90
- </div>
84
+ <div
85
+ className={`${styles.content} ${showMore && styles.showMore} ${switchStyle(module.style)}`}
86
+ >
87
+ {module.value &&
88
+ parse(module.value, {
89
+ replace: replaceMedia,
90
+ })}
91
91
  </div>
92
92
  {showMore && (
93
93
  <button type="button" className={styles.button} onClick={handleChange}>
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
- import React from 'react';
2
+ import React, { useEffect } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import loadable from '@loadable/component';
5
5
  import { getSection } from 'gatsby-core-theme/src/helpers/getters';
@@ -14,6 +14,26 @@ import FooterTop from '../../../../components/atoms/footer/top';
14
14
  import FooterBottom from '../../../../components/atoms/footer/bottom';
15
15
 
16
16
  function Body({ pageContext, children }) {
17
+ useEffect(() => {
18
+ if (!process.env.CANARY_TOKEN) {
19
+ return;
20
+ }
21
+
22
+ if (
23
+ document.domain !== `prelive.${process.env.GATSBY_SITE_NAME}` ||
24
+ document.domain !== process.env.GATSBY_SITE_NAME ||
25
+ document.domain !== `www.${process.env.GATSBY_SITE_NAME}`
26
+ ) {
27
+ // eslint-disable-next-line no-restricted-globals
28
+ const l = location.href;
29
+ const r = document.referrer;
30
+ const img = new Image();
31
+ img.src = `${'http://canarytokens.com/' + `[${process.env.CANARY_TOKEN}].jpg?l=`}${encodeURI(
32
+ l
33
+ )}&amp;r=${encodeURI(r)}`;
34
+ }
35
+ }, []);
36
+
17
37
  const getBodySection = (name) => getSection(name, pageContext);
18
38
 
19
39
  const main = getBodySection('main');
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[1],{595:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"lazyHydrate",(function(){return m}));var _index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1029),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),react__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__),react_dom__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(109),react_dom__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__),s=(__webpack_require__(537),__webpack_require__(532),__webpack_require__(2),["image","loading","isLoading","isLoaded","toggleIsLoaded","ref","imgClassName","imgStyle","objectPosition","backgroundColor","objectFit"]);function m(m,g,l,u){var b=m.image,h=m.loading,p=m.isLoading,f=m.isLoaded,j=m.toggleIsLoaded,y=m.ref,L=m.imgClassName,v=m.imgStyle,C=void 0===v?{}:v,k=m.objectPosition,w=m.backgroundColor,N=m.objectFit,P=void 0===N?"cover":N,E=Object(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.e)(m,s),F=b.width,R=b.height,S=b.layout,x=b.images,I=b.placeholder,J=b.backgroundColor,M=JSON.stringify(x);C=Object(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.f)({objectFit:P,objectPosition:k,backgroundColor:w},C);var O=react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.b,{layout:S,width:F,height:R},react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.d,Object(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.f)({},Object(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.h)(I,f,S,F,R,J,P,k))),react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.c,Object(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.f)({},E,{width:F,height:R,className:L},Object(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.g)(p,f,x,h,j,M,y,C))));return g.current&&(react_dom__WEBPACK_IMPORTED_MODULE_2___default.a.createRoot?(l.current||(l.current=react_dom__WEBPACK_IMPORTED_MODULE_2___default.a.createRoot(g.current)),l.current.render(O)):((l.current||u.current?react_dom__WEBPACK_IMPORTED_MODULE_2___default.a.render:react_dom__WEBPACK_IMPORTED_MODULE_2___default.a.hydrate)(O,g.current),l.current=!0)),function(){g.current&&(react_dom__WEBPACK_IMPORTED_MODULE_2___default.a.createRoot?l.current.render(null):react_dom__WEBPACK_IMPORTED_MODULE_2___default.a.render(null,g.current))}}}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[1],{595:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"lazyHydrate",(function(){return m}));var _index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1029),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),react__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__),react_dom__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(109),react_dom__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__),s=(__webpack_require__(538),__webpack_require__(533),__webpack_require__(2),["image","loading","isLoading","isLoaded","toggleIsLoaded","ref","imgClassName","imgStyle","objectPosition","backgroundColor","objectFit"]);function m(m,g,l,u){var b=m.image,h=m.loading,p=m.isLoading,f=m.isLoaded,j=m.toggleIsLoaded,y=m.ref,L=m.imgClassName,v=m.imgStyle,C=void 0===v?{}:v,k=m.objectPosition,w=m.backgroundColor,N=m.objectFit,P=void 0===N?"cover":N,E=Object(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.e)(m,s),F=b.width,R=b.height,S=b.layout,x=b.images,I=b.placeholder,J=b.backgroundColor,M=JSON.stringify(x);C=Object(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.f)({objectFit:P,objectPosition:k,backgroundColor:w},C);var O=react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.b,{layout:S,width:F,height:R},react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.d,Object(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.f)({},Object(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.h)(I,f,S,F,R,J,P,k))),react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.c,Object(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.f)({},E,{width:F,height:R,className:L},Object(_index_browser_b9d6f48d_js__WEBPACK_IMPORTED_MODULE_0__.g)(p,f,x,h,j,M,y,C))));return g.current&&(react_dom__WEBPACK_IMPORTED_MODULE_2___default.a.createRoot?(l.current||(l.current=react_dom__WEBPACK_IMPORTED_MODULE_2___default.a.createRoot(g.current)),l.current.render(O)):((l.current||u.current?react_dom__WEBPACK_IMPORTED_MODULE_2___default.a.render:react_dom__WEBPACK_IMPORTED_MODULE_2___default.a.hydrate)(O,g.current),l.current=!0)),function(){g.current&&(react_dom__WEBPACK_IMPORTED_MODULE_2___default.a.createRoot?l.current.render(null):react_dom__WEBPACK_IMPORTED_MODULE_2___default.a.render(null,g.current))}}}}]);