gatsby-matrix-theme 3.2.22 → 3.2.26

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 (36) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/gatsby-config.js +1 -2
  3. package/jest.config.js +1 -1
  4. package/package.json +1 -1
  5. package/src/components/atoms/author-card/author-card.test.js +7 -0
  6. package/src/components/atoms/cards/comparison-table/table/index.js +17 -7
  7. package/src/components/atoms/cards/comparison-table/table/table.test.js +57 -5
  8. package/src/components/atoms/cards/game-card/index.js +11 -9
  9. package/src/components/atoms/social-icons/social-icons.test.js +8 -0
  10. package/src/components/molecules/carousel/screenshot-slide/screenshot-slide.test.js +6 -0
  11. package/src/components/molecules/faq/faq.module.scss +2 -0
  12. package/src/components/molecules/faq/index.js +8 -8
  13. package/src/components/molecules/header/header.test.js +87 -0
  14. package/src/components/molecules/header/index.js +28 -28
  15. package/src/components/molecules/operator-summary/operator-summary.test.js +24 -0
  16. package/src/components/molecules/toplist/row/variant-one.js +5 -1
  17. package/src/components/molecules/toplist/row/variant-one.test.js +16 -0
  18. package/src/components/organisms/footer-navigation/index.js +28 -3
  19. package/src/components/pages/contact-us/index.js +1 -0
  20. package/src/gatsby-core-theme/components/atoms/module-title/index.js +11 -14
  21. package/src/gatsby-core-theme/components/molecules/content/index.js +7 -7
  22. package/src/gatsby-core-theme/components/organisms/carousel/index.js +11 -20
  23. package/storybook/public/{5.7148fbb6.iframe.bundle.js → 5.f8a95893.iframe.bundle.js} +3 -3
  24. package/storybook/public/{5.7148fbb6.iframe.bundle.js.LICENSE.txt → 5.f8a95893.iframe.bundle.js.LICENSE.txt} +0 -0
  25. package/storybook/public/5.f8a95893.iframe.bundle.js.map +1 -0
  26. package/storybook/public/{7.a5b95b83.iframe.bundle.js → 7.061faab7.iframe.bundle.js} +1 -1
  27. package/storybook/public/iframe.html +1 -1
  28. package/storybook/public/main.87a6ab42.iframe.bundle.js +1 -0
  29. package/storybook/public/{runtime~main.59fc7233.iframe.bundle.js → runtime~main.3e464ba9.iframe.bundle.js} +1 -1
  30. package/storybook/public/{vendors~main.73d094d3.iframe.bundle.js → vendors~main.1f5a74cb.iframe.bundle.js} +3 -3
  31. package/storybook/public/{vendors~main.73d094d3.iframe.bundle.js.LICENSE.txt → vendors~main.1f5a74cb.iframe.bundle.js.LICENSE.txt} +0 -0
  32. package/storybook/public/vendors~main.1f5a74cb.iframe.bundle.js.map +1 -0
  33. package/tests/factories/modules/matrix/card.factory.js +310 -78
  34. package/storybook/public/5.7148fbb6.iframe.bundle.js.map +0 -1
  35. package/storybook/public/main.433816fa.iframe.bundle.js +0 -1
  36. package/storybook/public/vendors~main.73d094d3.iframe.bundle.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
4
  import LinkList from 'gatsby-core-theme/src/components/molecules/link-list';
@@ -6,8 +6,33 @@ import { getFirstModuleByName } from 'gatsby-core-theme/src/helpers/getters';
6
6
  import styles from './footer-navigation.module.scss';
7
7
 
8
8
  const FooterNavigation = ({ section, isStorybook = false }) => {
9
+ const [show, setShow] = useState(false);
9
10
  const menuArray = getFirstModuleByName(section, 'menu');
10
- return (
11
+
12
+ const handleEvent = () => {
13
+ setShow(true);
14
+ };
15
+
16
+ const showAfter = (seconds) => {
17
+ setTimeout(() => {
18
+ setShow(true);
19
+ }, seconds * 1000);
20
+ };
21
+
22
+ useEffect(() => {
23
+ window.addEventListener('scroll', handleEvent);
24
+ window.addEventListener('mousemove', handleEvent);
25
+ window.addEventListener('touchstart', handleEvent);
26
+ showAfter(3);
27
+
28
+ return () => {
29
+ window.removeEventListener('scroll', handleEvent);
30
+ window.addEventListener('mousemove', handleEvent);
31
+ window.addEventListener('touchstart', handleEvent);
32
+ };
33
+ }, []);
34
+
35
+ return show ? (
11
36
  <div className={`${styles.footerLinks} ${isStorybook && styles.storybookStyles}`}>
12
37
  <LinkList
13
38
  showListTitle={false}
@@ -19,7 +44,7 @@ const FooterNavigation = ({ section, isStorybook = false }) => {
19
44
  gtmClass="mobile-menu-gtm"
20
45
  />
21
46
  </div>
22
- );
47
+ ) : null;
23
48
  };
24
49
 
25
50
  FooterNavigation.propTypes = {
@@ -49,6 +49,7 @@ const ContactUs = ({
49
49
  )}
50
50
  </p>
51
51
  <Form
52
+ type="contact"
52
53
  hasButton
53
54
  buttonLabel="Send"
54
55
  submitUrl={submitUrl}
@@ -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}>
@@ -43,28 +43,19 @@ const Carousel = ({ module = {}, settings = {}, gtmClass = '' }) => {
43
43
  return arr;
44
44
  };
45
45
 
46
+ const renderedItems =
47
+ width < 991 && width > 0 ? renderOne(module.items) : renderTwo(module.items);
48
+
46
49
  return (
47
50
  <div className={styles.carouselContainer}>
48
- {width >= 991 && (
49
- <Slider
50
- {...settings}
51
- className={styles.screenshotCarousel}
52
- useArrows={false}
53
- gtmClass={gtmClass}
54
- >
55
- {renderTwo(module.items)}
56
- </Slider>
57
- )}
58
- {width < 991 && width > 0 && (
59
- <Slider
60
- {...settings}
61
- className={styles.screenshotCarousel}
62
- useArrows={false}
63
- gtmClass={gtmClass}
64
- >
65
- {renderOne(module.items)}
66
- </Slider>
67
- )}
51
+ <Slider
52
+ {...settings}
53
+ className={styles.screenshotCarousel}
54
+ useArrows={false}
55
+ gtmClass={gtmClass}
56
+ >
57
+ {renderedItems}
58
+ </Slider>
68
59
  </div>
69
60
  );
70
61
  };