gatsby-matrix-theme 2.1.2 → 2.2.0

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 (88) hide show
  1. package/.storybook/main.js +1 -0
  2. package/CHANGELOG.md +46 -0
  3. package/jest.config.js +1 -0
  4. package/package.json +2 -2
  5. package/src/components/atoms/cards/article-card/index.js +9 -6
  6. package/src/components/atoms/cards/author-card/index.js +6 -1
  7. package/src/components/atoms/cards/base-card/index.js +1 -1
  8. package/src/components/atoms/cards/game-card/index.js +9 -6
  9. package/src/components/atoms/cards/operator-card/index.js +14 -8
  10. package/src/components/atoms/cards/payment-method-card/index.js +11 -9
  11. package/src/components/atoms/cards/popup-card/index.js +2 -3
  12. package/src/components/atoms/cards/popup-card/popup-card.stories.js +0 -10
  13. package/src/components/atoms/cards/software-provider-card/index.js +10 -9
  14. package/src/components/atoms/link-menu/index.js +1 -1
  15. package/src/components/atoms/operator-bonuses/index.js +10 -7
  16. package/src/components/atoms/search/autocomplete/article.js +1 -1
  17. package/src/components/atoms/search/autocomplete/game.js +1 -1
  18. package/src/components/atoms/search/autocomplete/operator.js +1 -1
  19. package/src/components/atoms/search/autocomplete/payment_methods.js +1 -1
  20. package/src/components/atoms/search/autocomplete/software_provider.js +1 -1
  21. package/src/components/atoms/table/banking/index.js +24 -20
  22. package/src/components/atoms/table/column/index.js +2 -5
  23. package/src/components/atoms/table/staticColumn/index.js +28 -33
  24. package/src/components/molecules/faq/index.js +1 -1
  25. package/src/components/molecules/game-iframe/index.js +6 -1
  26. package/src/components/molecules/game-score-gauge/game-score-gauge.stories.js +7 -12
  27. package/src/components/molecules/game-score-gauge/index.js +4 -2
  28. package/src/components/molecules/info-grid/index.js +1 -0
  29. package/src/components/molecules/newsletter/index.js +1 -0
  30. package/src/components/molecules/newsletter/newsletter.stories.js +106 -112
  31. package/src/components/molecules/newsletter-optin/index.js +7 -7
  32. package/src/components/molecules/newsletter-optin/newsletter-optin.stories.js +79 -80
  33. package/src/components/molecules/operator-summary/index.js +8 -2
  34. package/src/components/molecules/small-welcome-bonus/index.js +19 -6
  35. package/src/components/molecules/small-welcome-bonus/small-welcome-bonus.stories.js +49 -53
  36. package/src/components/molecules/toplist/row/variant-one.js +26 -10
  37. package/src/components/organisms/footer-navigation/index.js +9 -1
  38. package/src/components/organisms/popup/index.js +6 -5
  39. package/src/components/organisms/popup/popup.stories.js +0 -10
  40. package/src/components/organisms/toplist/comparison-table/index.js +11 -13
  41. package/src/components/organisms/toplist/index.js +2 -4
  42. package/src/components/organisms/toplist/list/index.js +4 -5
  43. package/src/gatsby-core-theme/components/atoms/module-title/index.js +5 -8
  44. package/src/gatsby-core-theme/components/atoms/not-found/index.js +24 -0
  45. package/src/gatsby-core-theme/components/atoms/not-found/not-found.module.scss +17 -0
  46. package/src/gatsby-core-theme/components/atoms/spotlights/index.js +25 -8
  47. package/src/gatsby-core-theme/components/molecules/content/content.module.scss +73 -16
  48. package/src/gatsby-core-theme/components/molecules/content/index.js +2 -0
  49. package/src/gatsby-core-theme/components/molecules/footer/index.js +5 -1
  50. package/src/gatsby-core-theme/components/molecules/main/index.js +6 -1
  51. package/src/gatsby-core-theme/components/molecules/module/index.js +1 -3
  52. package/src/gatsby-core-theme/components/molecules/search/index.js +26 -3
  53. package/src/gatsby-core-theme/components/organisms/anchor/anchor.module.scss +5 -1
  54. package/src/gatsby-core-theme/components/organisms/anchor/index.js +11 -2
  55. package/src/gatsby-core-theme/components/organisms/carousel/index.js +17 -6
  56. package/src/gatsby-core-theme/components/organisms/navigation/index.js +2 -2
  57. package/src/gatsby-core-theme/components/organisms/search/index.js +2 -1
  58. package/src/gatsby-core-theme/components/pages/body/index.js +14 -9
  59. package/src/gatsby-core-theme/components/pages/search/index.js +79 -74
  60. package/src/hooks/tabs/index.js +6 -4
  61. package/src/hooks/tabs/tab/tab-list.js +4 -1
  62. package/src/hooks/tabs/tab/tab.js +37 -28
  63. package/storybook/public/{0.a9b647e1.iframe.bundle.js → 0.a5c4cf9f.iframe.bundle.js} +1 -1
  64. package/storybook/public/{1.94c59b7e.iframe.bundle.js → 1.b2b72c50.iframe.bundle.js} +1 -1
  65. package/storybook/public/{10.727dd594.iframe.bundle.js → 10.502b5ac2.iframe.bundle.js} +1 -1
  66. package/storybook/public/{11.2e850035.iframe.bundle.js → 11.30535586.iframe.bundle.js} +1 -1
  67. package/storybook/public/{5.fed35abd.iframe.bundle.js → 5.66b5b921.iframe.bundle.js} +3 -3
  68. package/storybook/public/{5.fed35abd.iframe.bundle.js.LICENSE.txt → 5.66b5b921.iframe.bundle.js.LICENSE.txt} +0 -0
  69. package/storybook/public/5.66b5b921.iframe.bundle.js.map +1 -0
  70. package/storybook/public/{6.a63e093c.iframe.bundle.js → 6.89431426.iframe.bundle.js} +1 -1
  71. package/storybook/public/{7.4996d626.iframe.bundle.js → 7.a53e817b.iframe.bundle.js} +1 -1
  72. package/storybook/public/8.e043e6dc.iframe.bundle.js +3 -0
  73. package/storybook/public/{8.f4491507.iframe.bundle.js.LICENSE.txt → 8.e043e6dc.iframe.bundle.js.LICENSE.txt} +0 -0
  74. package/storybook/public/8.e043e6dc.iframe.bundle.js.map +1 -0
  75. package/storybook/public/{9.3097c14c.iframe.bundle.js → 9.eba0e7c0.iframe.bundle.js} +1 -1
  76. package/storybook/public/iframe.html +1 -1
  77. package/storybook/public/main.c07025f4.iframe.bundle.js +1 -0
  78. package/storybook/public/{runtime~main.941ed6de.iframe.bundle.js → runtime~main.c4f3a4d6.iframe.bundle.js} +1 -1
  79. package/storybook/public/vendors~main.8050786b.iframe.bundle.js +7 -0
  80. package/storybook/public/{vendors~main.f3d8ec5b.iframe.bundle.js.LICENSE.txt → vendors~main.8050786b.iframe.bundle.js.LICENSE.txt} +0 -0
  81. package/storybook/public/vendors~main.8050786b.iframe.bundle.js.map +1 -0
  82. package/src/gatsby-core-theme/pages/404/index.js +0 -66
  83. package/storybook/public/5.fed35abd.iframe.bundle.js.map +0 -1
  84. package/storybook/public/8.f4491507.iframe.bundle.js +0 -3
  85. package/storybook/public/8.f4491507.iframe.bundle.js.map +0 -1
  86. package/storybook/public/main.920f3ab1.iframe.bundle.js +0 -1
  87. package/storybook/public/vendors~main.f3d8ec5b.iframe.bundle.js +0 -7
  88. package/storybook/public/vendors~main.f3d8ec5b.iframe.bundle.js.map +0 -1
@@ -68,7 +68,7 @@ const SearchForm = ({ className, searchIcon, iconWidth = 24, iconHeight = 24 })
68
68
  type="button"
69
69
  aria-label="Search"
70
70
  onClick={handleOnSearchIconClick}
71
- className={`${styles.searchButton} ${showSearch && styles.active}`}
71
+ className={`${styles.searchButton} ${showSearch && styles.active} search-gtm btn-cta`}
72
72
  >
73
73
  {searchIcon === null ? (
74
74
  <FaSearch />
@@ -92,6 +92,7 @@ const SearchForm = ({ className, searchIcon, iconWidth = 24, iconHeight = 24 })
92
92
  autoComplete: true,
93
93
  sort: true,
94
94
  limit: 3,
95
+ showViewResultsText: false,
95
96
  }}
96
97
  >
97
98
  {(item) => (
@@ -24,6 +24,8 @@ function Body({ pageContext }) {
24
24
  const footerNavigationData = pageContext?.marketSections?.footer_navigation || null;
25
25
  const isHomePage = pageContext?.page && pageContext?.page.path === '/';
26
26
  const pageType = pageContext.page.type;
27
+ const is404 = pageContext.page.path.includes('404');
28
+
27
29
  const Popup = pageContext?.marketSections?.popup
28
30
  ? loadable(() => import(`../../../../components/organisms/popup`))
29
31
  : null;
@@ -42,12 +44,13 @@ function Body({ pageContext }) {
42
44
  const status = pageContext.page.relation?.status;
43
45
 
44
46
  const hideBanner = status === 'inactive' || status === 'coming_soon';
45
- const { template, translations } = pageContext.page;
47
+ const { template } = pageContext.page;
46
48
 
47
49
  const popupData = pageContext?.marketSections?.popup?.modules?.find((m) => m.name === 'top_list');
48
- const FooterNavigation = footerNavigationData
49
- ? loadable(() => import(`../../../../components/organisms/footer-navigation`))
50
- : null;
50
+ const FooterNavigation =
51
+ footerNavigationData && pageType !== 'operator'
52
+ ? loadable(() => import(`../../../../components/organisms/footer-navigation`))
53
+ : null;
51
54
 
52
55
  return (
53
56
  <>
@@ -55,7 +58,6 @@ function Body({ pageContext }) {
55
58
  <Navigation
56
59
  template={template}
57
60
  section={navigation}
58
- translations={translations}
59
61
  searchIcon="../../../../../../images/search.svg"
60
62
  menu="main_menu"
61
63
  options={{
@@ -76,7 +78,7 @@ function Body({ pageContext }) {
76
78
  <ContactUs page={pageContext} />
77
79
  ) : (
78
80
  <>
79
- {!isSearch && <Header section={pageContext} />}
81
+ {!isSearch && !is404 && <Header section={pageContext} />}
80
82
  {main && <Main section={main} page={pageContext.page} />}
81
83
  {pageType === 'operator' && !hideBanner && (
82
84
  <OperatorBanner
@@ -114,10 +116,14 @@ function Body({ pageContext }) {
114
116
  <p>
115
117
  We use cookies in order to optimise our site and improve your experience with us. By using
116
118
  the site you consent to our
117
- <a href="/cookies"> &nbsp; Cookie Policy</a>.
119
+ <a href="/cookies" className="cookie-consent-gtm">
120
+ {' '}
121
+ &nbsp; Cookie Policy
122
+ </a>
123
+ .
118
124
  </p>
119
125
  </CookieConsent>
120
- {Popup && popupData && <Popup module={popupData} translations={translations} />}
126
+ {Popup && popupData && <Popup module={popupData} />}
121
127
  </>
122
128
  );
123
129
  }
@@ -130,7 +136,6 @@ Body.propTypes = {
130
136
  type: PropTypes.string,
131
137
  path: PropTypes.string,
132
138
  template: PropTypes.string,
133
- translations: PropTypes.shape({}),
134
139
  relation: PropTypes.shape({
135
140
  status: PropTypes.string,
136
141
  logo_url: PropTypes.string,
@@ -1,10 +1,11 @@
1
1
  /* eslint-disable react/forbid-prop-types */
2
- import React from 'react';
2
+ import React, { useContext } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import Breadcrumbs from 'gatsby-core-theme/src/components/atoms/breadcrumbs';
5
5
  import Search from 'gatsby-core-theme/src/components/molecules/search';
6
6
  import moduleStyles from 'gatsby-core-theme/src/components/molecules/module/module.module.scss';
7
7
  import { translate } from 'gatsby-core-theme/src/helpers/getters';
8
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
8
9
  import CardArticle from '../../../../components/atoms/cards/article-card';
9
10
  import CardGame from '../../../../components/atoms/cards/game-card';
10
11
  import CardOperator from '../../../../components/atoms/cards/operator-card';
@@ -12,85 +13,89 @@ import PaymentMethods from '../../../../components/atoms/cards/payment-method-ca
12
13
  import SoftwareProvider from '../../../../components/atoms/cards/software-provider-card';
13
14
  import styles from './search.module.scss';
14
15
 
15
- const SearchContent = ({ page }) => (
16
- <div className={`${styles.searchPage} ${moduleStyles.module} module`}>
17
- {page.path && <Breadcrumbs page={page} />}
18
- <Search
19
- page={page}
20
- searchIcon="../../../../../../images/search.svg"
21
- pageSearchOptions={{
22
- searchTitle: translate(page?.translations, 'search_results_for', 'Search Results for:'),
23
- useArchive: true,
24
- archiveOptions: {
25
- titles: [
26
- { type: 'operator', title: translate(page?.translations, 'casino', 'Casino') },
27
- { type: 'game', title: translate(page?.translations, 'slots', 'Slots') },
28
- { type: 'article', title: translate(page?.translations, 'news', 'News') },
16
+ const SearchContent = ({ page }) => {
17
+ const { translations } = useContext(Context) || {};
18
+
19
+ return (
20
+ <div className={`${styles.searchPage} ${moduleStyles.module} module`}>
21
+ {page.path && <Breadcrumbs page={page} />}
22
+ <Search
23
+ page={page}
24
+ searchIcon="../../../../../../images/search.svg"
25
+ pageSearchOptions={{
26
+ searchTitle: translate(translations, 'search_results_for', 'Search Results for:'),
27
+ useArchive: true,
28
+ archiveOptions: {
29
+ titles: [
30
+ { type: 'operator', title: translate(translations, 'casino', 'Casino') },
31
+ { type: 'game', title: translate(translations, 'slots', 'Slots') },
32
+ { type: 'article', title: translate(translations, 'news', 'News') },
33
+ {
34
+ type: 'payment_method',
35
+ title: translate(translations, 'payment_method', 'Payment method'),
36
+ },
37
+ {
38
+ type: 'software_provider',
39
+ title: translate(translations, 'software_provider', 'Software Provider'),
40
+ },
41
+ ],
42
+ includeOptions: {
43
+ desktop_num_of_columns: '3',
44
+ mobile_num_of_columns: '1',
45
+ tablet_num_of_columns: '3',
46
+ },
47
+ },
48
+ tabs: true,
49
+ tabsOptions: { showAll: translate(translations, 'all', 'All'), tabsAlign: 'left' },
50
+ sort: [
51
+ {
52
+ name: translate(translations, 'most_relevant', 'Most Relevant'),
53
+ field: 'id',
54
+ type: 'number',
55
+ },
29
56
  {
30
- type: 'payment_method',
31
- title: translate(page?.translations, 'payment_method', 'Payment method'),
57
+ name: translate(translations, 'latest', 'Latest'),
58
+ field: 'created_at',
59
+ type: 'date',
32
60
  },
33
61
  {
34
- type: 'software_provider',
35
- title: translate(page?.translations, 'software_provider', 'Software Provider'),
62
+ name: translate(translations, 'by_title', 'By Title'),
63
+ field: 'title',
64
+ type: 'string',
36
65
  },
37
66
  ],
38
- includeOptions: {
39
- desktop_num_of_columns: '3',
40
- mobile_num_of_columns: '1',
41
- tablet_num_of_columns: '3',
67
+ loadMore: {
68
+ label: translate(translations, 'show_more', 'Show more'),
69
+ limit: 3,
70
+ increment: 6,
71
+ usePrimaryButton: false,
72
+ useInvertColors: true,
42
73
  },
43
- },
44
- tabs: true,
45
- tabsOptions: { showAll: translate(page?.translations, 'all', 'All'), tabsAlign: 'left' },
46
- sort: [
47
- {
48
- name: translate(page?.translations, 'most_relevant', 'Most Relevant'),
49
- field: 'id',
50
- type: 'number',
51
- },
52
- {
53
- name: translate(page?.translations, 'latest', 'Latest'),
54
- field: 'created_at',
55
- type: 'date',
56
- },
57
- {
58
- name: translate(page?.translations, 'by_title', 'By Title'),
59
- field: 'title',
60
- type: 'string',
61
- },
62
- ],
63
- loadMore: {
64
- label: translate(page?.translations, 'show_more', 'Show more'),
65
- limit: 3,
66
- increment: 6,
67
- usePrimaryButton: false,
68
- useInvertColors: true,
69
- },
70
- }}
71
- >
72
- {(item) => (
73
- <>
74
- <div type="operator">
75
- <CardOperator item={item} />
76
- </div>
77
- <div type="game">
78
- <CardGame item={item} />
79
- </div>
80
- <div type="article">
81
- <CardArticle item={item} />
82
- </div>
83
- <div type="payment_method">
84
- <PaymentMethods item={item} />
85
- </div>
86
- <div type="software_provider">
87
- <SoftwareProvider item={item} />
88
- </div>
89
- </>
90
- )}
91
- </Search>
92
- </div>
93
- );
74
+ }}
75
+ >
76
+ {(item) => (
77
+ <>
78
+ <div type="operator">
79
+ <CardOperator item={item} />
80
+ </div>
81
+ <div type="game">
82
+ <CardGame item={item} />
83
+ </div>
84
+ <div type="article">
85
+ <CardArticle item={item} />
86
+ </div>
87
+ <div type="payment_method">
88
+ <PaymentMethods item={item} />
89
+ </div>
90
+ <div type="software_provider">
91
+ <SoftwareProvider item={item} />
92
+ </div>
93
+ </>
94
+ )}
95
+ </Search>
96
+ </div>
97
+ );
98
+ };
94
99
 
95
100
  SearchContent.propTypes = {
96
101
  page: PropTypes.shape({
@@ -1,6 +1,7 @@
1
- import React, { useState } from 'react';
1
+ import React, { useContext, useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { translate } from 'gatsby-core-theme/src/helpers/getters';
4
+ import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
4
5
  import TabList from './tab/tab-list';
5
6
  import styles from './tabs.module.scss';
6
7
 
@@ -14,7 +15,7 @@ const Tabs = ({
14
15
  activeTabClass = '',
15
16
  HeaderComp,
16
17
  headerClass = '',
17
- translations,
18
+ gtmClass = '',
18
19
  }) => {
19
20
  const showAllTabId = `${showAll}_0`;
20
21
  const showTabs = children.length > 1;
@@ -22,6 +23,7 @@ const Tabs = ({
22
23
  showAll ? showAllTabId : `${children[0].props.label}_0`
23
24
  );
24
25
  const CustomTag = `${module?.module_title_tag}`;
26
+ const { translations } = useContext(Context) || {};
25
27
  const monthNames = [
26
28
  'January',
27
29
  'February',
@@ -104,7 +106,7 @@ const Tabs = ({
104
106
  showAll={showAll}
105
107
  alignRight={tabsAlign === 'right'}
106
108
  module={module}
107
- translations={translations}
109
+ gtmClass={gtmClass}
108
110
  />
109
111
  )}
110
112
  {HeaderComp && <div className={styles.headerComp}>{HeaderComp}</div>}
@@ -139,7 +141,7 @@ Tabs.propTypes = {
139
141
  title: PropTypes.string,
140
142
  module: PropTypes.shape({}),
141
143
  siteName: PropTypes.string,
142
- translations: PropTypes.shape({}),
144
+ gtmClass: PropTypes.string,
143
145
  };
144
146
 
145
147
  export default Tabs;
@@ -14,6 +14,7 @@ const TabList = ({
14
14
  activeTabClass = '',
15
15
  showAll,
16
16
  alignRight = false,
17
+ gtmClass = '',
17
18
  }) => {
18
19
  const [tabItems, setTabItems] = useState(items);
19
20
 
@@ -38,7 +39,7 @@ const TabList = ({
38
39
  <div className={`${styles.tabList} ${alignRight && styles.right}`}>
39
40
  <button
40
41
  ref={filterBtn}
41
- className={styles.select}
42
+ className={`${styles.select} ${gtmClass} btn-cta`}
42
43
  type="button"
43
44
  onClick={showDropdown}
44
45
  data-id="select-button"
@@ -59,6 +60,7 @@ const TabList = ({
59
60
  label={label}
60
61
  onClick={onClick}
61
62
  toggleDropdown={showDropdown}
63
+ gtmClass={gtmClass}
62
64
  />
63
65
  );
64
66
  })}
@@ -74,6 +76,7 @@ TabList.propTypes = {
74
76
  activeTab: PropTypes.string,
75
77
  activeTabClass: PropTypes.string,
76
78
  alignRight: PropTypes.bool,
79
+ gtmClass: PropTypes.string,
77
80
  };
78
81
 
79
82
  export default TabList;
@@ -2,39 +2,48 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import styles from './tab.module.scss';
4
4
 
5
- const Tab = ({ label, onClick, activeTab, activeTabClass = '', tabId, toggleDropdown }) => {
6
- let className = '';
5
+ const Tab = ({
6
+ label,
7
+ onClick,
8
+ activeTab,
9
+ activeTabClass = '',
10
+ tabId,
11
+ toggleDropdown,
12
+ gtmClass = '',
13
+ }) => {
14
+ let className = '';
7
15
 
8
- if (activeTab === tabId) {
9
- if (activeTabClass !== '') {
10
- className = ` ${styles[activeTabClass]}`;
11
- } else {
12
- className = ` ${styles.active}`;
13
- }
16
+ if (activeTab === tabId) {
17
+ if (activeTabClass !== '') {
18
+ className = ` ${styles[activeTabClass]}`;
19
+ } else {
20
+ className = ` ${styles.active}`;
14
21
  }
22
+ }
15
23
 
16
- return (
17
- <li className={styles.tabListItem}>
18
- <button
19
- className={className}
20
- type="button"
21
- onClick={() => {
22
- onClick(tabId);
23
- toggleDropdown();
24
- }}
25
- >
26
- {label}
27
- </button>
28
- </li>
29
- );
24
+ return (
25
+ <li className={styles.tabListItem}>
26
+ <button
27
+ className={`${className} ${gtmClass} tabs-menu-gtm btn-cta`}
28
+ type="button"
29
+ onClick={() => {
30
+ onClick(tabId);
31
+ toggleDropdown();
32
+ }}
33
+ >
34
+ {label}
35
+ </button>
36
+ </li>
37
+ );
30
38
  };
31
39
  Tab.propTypes = {
32
- onClick: PropTypes.func,
33
- toggleDropdown: PropTypes.func,
34
- activeTab: PropTypes.string,
35
- activeTabClass: PropTypes.string,
36
- tabId: PropTypes.string,
37
- label: PropTypes.string,
40
+ onClick: PropTypes.func,
41
+ toggleDropdown: PropTypes.func,
42
+ activeTab: PropTypes.string,
43
+ activeTabClass: PropTypes.string,
44
+ tabId: PropTypes.string,
45
+ label: PropTypes.string,
46
+ gtmClass: PropTypes.string,
38
47
  };
39
48
 
40
49
  export default Tab;