gatsby-matrix-theme 13.0.9 → 13.0.10

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [13.0.10](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v13.0.9...v13.0.10) (2023-02-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * operator cta ([6cb9e8b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6cb9e8bfc1c6bc5a9e8f5c07499ff5ac58d9738e))
7
+ * provide the status of operator to popup component ([374600e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/374600ef31c1e0f1f27deae842d10f13e8efd8a5))
8
+ * remove cta when not-recommended ([fdb985d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fdb985dd7defd002c50462c93fcbbaae55fe6752))
9
+ * update with latest core version ([c9a0338](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c9a0338932a211127cc9e6170cfefd5ba1061355))
10
+
11
+
12
+ * Merge branch 'tm-3319-popup-not-recommended' into 'master' ([4c0e712](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4c0e712ac928e3341fd44f29864e291a3db176e4))
13
+ * Merge branch 'tm-3297-operator-cta-matrix' into 'master' ([2120519](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/212051994dbecef701ecb03ac0195656edf283bb))
14
+
1
15
  ## [13.0.9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v13.0.8...v13.0.9) (2023-02-21)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "13.0.9",
3
+ "version": "13.0.10",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@react-icons/all-files": "^4.1.0",
27
27
  "gatsby": "^4.20.0",
28
- "gatsby-core-theme": "18.0.13",
28
+ "gatsby-core-theme": "18.0.15",
29
29
  "gatsby-plugin-sharp": "^4.10.2",
30
30
  "gatsby-plugin-sitemap": "^3.3.0",
31
31
  "gatsby-transformer-sharp": "^4.10.0",
@@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
8
8
  import { AiOutlineCheckCircle } from '@react-icons/all-files/ai/AiOutlineCheckCircle';
9
9
  import { imagePrettyUrl, translate } from 'gatsby-core-theme/src/helpers/getters';
10
10
  import LazyImg from 'gatsby-core-theme/src/hooks/lazy-image';
11
- import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta';
11
+ import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta-button';
12
12
  import StarRating from 'gatsby-core-theme/src/components/molecules/star-rating/one-star';
13
13
  import ReviewLink from 'gatsby-core-theme/src/components/atoms/review-link';
14
14
  import Link from 'gatsby-core-theme/src/hooks/link';
@@ -100,14 +100,28 @@ export default function ComparisonTable({
100
100
  )}
101
101
  <div>
102
102
  <span>{itemName}</span>
103
- <OperatorCta
104
- tracker="main"
105
- operator={item?.relation}
106
- // new key
107
- translationKey={ctaKey}
108
- gtmClass="comparison-table-gtm btn-cta"
109
- pageTemplate={tempate}
110
- />
103
+ {item?.relation?.status !== 'not_recommended' && (
104
+ <OperatorCta
105
+ tracker="main"
106
+ operator={item?.relation}
107
+ translationsObj={{
108
+ active: { translationKey: ctaKey, defaultValue: 'Visit' },
109
+ not_recommended: {
110
+ translationKey: 'not_recommended',
111
+ defaultValue: 'Not Recommended',
112
+ },
113
+ coming_soon: { translationKey: 'coming_soon', defaultValue: 'Soon Available' },
114
+ inactive: {
115
+ translationKey: 'inactive',
116
+ defaultValue: 'Not Accepting New Players',
117
+ },
118
+ blacklisted: { translationKey: 'blacklisted', defaultValue: 'Blacklisted' },
119
+ }}
120
+ // new key
121
+ gtmClass="comparison-table-gtm btn-cta"
122
+ pageTemplate={tempate}
123
+ />
124
+ )}
111
125
  </div>
112
126
  </td>
113
127
  );
@@ -3,7 +3,7 @@ import React, { useContext } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import loadable from '@loadable/component';
5
5
  import Button from 'gatsby-core-theme/src/components/atoms/button';
6
- import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta';
6
+ import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta-button';
7
7
  import GatsbyImg from 'gatsby-core-theme/src/hooks/gatsby-img';
8
8
  import Link from 'gatsby-core-theme/src/hooks/link';
9
9
  import {
@@ -41,12 +41,21 @@ const GameCard = ({
41
41
  if (affilateLink) {
42
42
  return (
43
43
  <>
44
- {item?.extra_fields?.operator ? (
44
+ {item?.extra_fields?.operator &&
45
+ item?.extra_fields?.operator?.status !== 'not_recommended' ? (
45
46
  <OperatorCta
46
47
  tracker="main"
47
48
  operator={item?.extra_fields?.operator}
48
- playText="Play for Real"
49
- translationKey="play_now_game"
49
+ translationsObj={{
50
+ active: { translationKey: 'play_now_game', defaultValue: 'Play for Real' },
51
+ not_recommended: {
52
+ translationKey: 'not_recommended',
53
+ defaultValue: 'Not Recommended',
54
+ },
55
+ coming_soon: { translationKey: 'coming_soon', defaultValue: 'Soon Available' },
56
+ inactive: { translationKey: 'inactive', defaultValue: 'Not Accepting New Players' },
57
+ blacklisted: { translationKey: 'blacklisted', defaultValue: 'Blacklisted' },
58
+ }}
50
59
  gtmClass="operator-card-gtm btn-cta"
51
60
  pageTemplate={page?.template}
52
61
  />
@@ -135,7 +144,9 @@ GameCard.propTypes = {
135
144
  path: PropTypes.string,
136
145
  banner: PropTypes.string,
137
146
  extra_fields: PropTypes.shape({
138
- operator: PropTypes.shape({}),
147
+ operator: PropTypes.shape({
148
+ status: PropTypes.string,
149
+ }),
139
150
  }),
140
151
  }).isRequired,
141
152
  page: PropTypes.shape({
@@ -1,16 +1,15 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
2
  /* eslint-disable camelcase */
3
- import React, { useContext } from 'react';
3
+ import React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import loadable from '@loadable/component';
6
- import { getAltText, imagePrettyUrl, translate } from 'gatsby-core-theme/src/helpers/getters';
6
+ import { getAltText, imagePrettyUrl } from 'gatsby-core-theme/src/helpers/getters';
7
7
  import Link from 'gatsby-core-theme/src/hooks/link';
8
8
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
9
9
  import Bonus from 'gatsby-core-theme/src/components/atoms/bonus';
10
10
  import ReviewLink from 'gatsby-core-theme/src/components/atoms/review-link';
11
11
  import Tnc from 'gatsby-core-theme/src/components/molecules/tnc';
12
- import { Context } from 'gatsby-core-theme/src/context/MainProvider';
13
- import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta';
12
+ import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta-button';
14
13
  import BaseCard from '../base-card';
15
14
  import styles from './operator-card.module.scss';
16
15
 
@@ -33,7 +32,6 @@ const OperatorCard = ({
33
32
  const isInactive = status === 'inactive';
34
33
  const backgroundImage = number === 1 ? 'default-article.webp' : null;
35
34
  const logUrlObject = relation?.logo_url_object;
36
- const { translations } = useContext(Context) || {};
37
35
  const StarRating = useOneStarRating
38
36
  ? loadable(() => import('gatsby-core-theme/src/components/molecules/star-rating/one-star'))
39
37
  : loadable(() => import('gatsby-core-theme/src/components/molecules/star-rating'));
@@ -77,13 +75,24 @@ const OperatorCard = ({
77
75
  itemName={itemName}
78
76
  reviewPath={reviewPath}
79
77
  />
80
- <OperatorCta
81
- tracker="main"
82
- operator={relation}
83
- playText={translate(translations, 'play_now', 'Play Now')}
84
- gtmClass="operator-card-gtm btn-cta"
85
- pageTemplate={page?.template}
86
- />
78
+ {relation?.status !== 'not_recommended' && (
79
+ <OperatorCta
80
+ tracker="main"
81
+ operator={relation}
82
+ translationsObj={{
83
+ active: { translationKey: 'play_now', defaultValue: 'Play Now' },
84
+ not_recommended: {
85
+ translationKey: 'not_recommended',
86
+ defaultValue: 'Not Recommended',
87
+ },
88
+ coming_soon: { translationKey: 'coming_soon', defaultValue: 'Soon Available' },
89
+ inactive: { translationKey: 'inactive', defaultValue: 'Not Accepting New Players' },
90
+ blacklisted: { translationKey: 'blacklisted', defaultValue: 'Blacklisted' },
91
+ }}
92
+ gtmClass="operator-card-gtm btn-cta"
93
+ pageTemplate={page?.template}
94
+ />
95
+ )}
87
96
  {useCoupon && item?.relation?.extra_fields?.coupon_code && (
88
97
  <Coupon
89
98
  icon
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta';
4
+ import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta-button';
5
5
  import { getAltText, imagePrettyUrl } from 'gatsby-core-theme/src/helpers/getters';
6
6
  import ReviewLink from 'gatsby-core-theme/src/components/atoms/review-link';
7
7
  import Tnc from 'gatsby-core-theme/src/components/molecules/tnc';
@@ -43,8 +43,13 @@ const PopupCard = ({
43
43
  <OperatorCta
44
44
  tracker={tracker}
45
45
  operator={item}
46
- playText="Play Now"
47
- translationKey="play_now_popup"
46
+ translationsObj={{
47
+ active: { translationKey: 'play_now_popup', defaultValue: 'Play Now' },
48
+ not_recommended: { translationKey: 'not_recommended', defaultValue: 'Not Recommended' },
49
+ coming_soon: { translationKey: 'coming_soon', defaultValue: 'Soon Available' },
50
+ inactive: { translationKey: 'inactive', defaultValue: 'Not Accepting New Players' },
51
+ blacklisted: { translationKey: 'blacklisted', defaultValue: 'Blacklisted' },
52
+ }}
48
53
  gtmClass="popup-operator-cta-gtm"
49
54
  pageTemplate={template}
50
55
  />
@@ -4,7 +4,7 @@ import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
4
4
  import { Context } from 'gatsby-core-theme/src/context/MainProvider';
5
5
  import Bonus from 'gatsby-core-theme/src/components/atoms/bonus';
6
6
  import { translate, getAltText, imagePrettyUrl } from 'gatsby-core-theme/src/helpers/getters';
7
- import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta';
7
+ import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta-button';
8
8
  import { IoMdArrowRoundForward } from '@react-icons/all-files/io/IoMdArrowRoundForward';
9
9
 
10
10
  import styles from './header-operator-bannner.module.scss';
@@ -56,7 +56,14 @@ const HeaderOperatorBaner = ({ operator, logo, template }) => {
56
56
  <div className={`${styles.bonus}`}>{main}</div>
57
57
  <OperatorCta
58
58
  page={operator}
59
- playText="Play now"
59
+ buttonSize="m"
60
+ translationsObj={{
61
+ active: { translationKey: 'play_now', defaultValue: 'Play now' },
62
+ not_recommended: { translationKey: 'not_recommended', defaultValue: 'Not Recommended' },
63
+ coming_soon: { translationKey: 'coming_soon', defaultValue: 'Soon Available' },
64
+ inactive: { translationKey: 'inactive', defaultValue: 'Not Accepting New Players' },
65
+ blacklisted: { translationKey: 'blacklisted', defaultValue: 'Blacklisted' },
66
+ }}
60
67
  operator={operator}
61
68
  gtmClass="operator-banner-operator-cta-gtm"
62
69
  pageTemplate={template}
@@ -7,7 +7,7 @@ import { FaAngleDown } from '@react-icons/all-files/fa/FaAngleDown';
7
7
  import { imagePrettyUrl } from 'gatsby-core-theme/src/helpers/getters';
8
8
  import Link from 'gatsby-core-theme/src/hooks/link';
9
9
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
10
- import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta';
10
+ import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta-button';
11
11
  import StarRating from 'gatsby-core-theme/src/components/molecules/star-rating';
12
12
  import SellingPoints from 'gatsby-core-theme/src/components/atoms/selling-points';
13
13
  import Tnc from 'gatsby-core-theme/src/components/molecules/tnc';
@@ -6,7 +6,7 @@ import React, { useContext, useEffect, useState } from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import { Context } from 'gatsby-core-theme/src/context/MainProvider';
8
8
  import Link from 'gatsby-core-theme/src/hooks/link';
9
- import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta';
9
+ import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta-button';
10
10
  import { isMobileDevice } from 'gatsby-core-theme/src/helpers/device-detect';
11
11
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
12
12
  import { imagePrettyUrl, translate, getAltText } from '~helpers/getters';
@@ -58,7 +58,16 @@ const Banner = ({ bonus, template }) => {
58
58
  <div className={styles.button}>
59
59
  <OperatorCta
60
60
  operator={bonus.value}
61
- playText="Play now"
61
+ translationsObj={{
62
+ active: { translationKey: 'play_now', defaultValue: 'Play now' },
63
+ not_recommended: {
64
+ translationKey: 'not_recommended',
65
+ defaultValue: 'Not Recommended',
66
+ },
67
+ coming_soon: { translationKey: 'coming_soon', defaultValue: 'Soon Available' },
68
+ inactive: { translationKey: 'inactive', defaultValue: 'Not Accepting New Players' },
69
+ blacklisted: { translationKey: 'blacklisted', defaultValue: 'Blacklisted' },
70
+ }}
62
71
  tracker={showTracker}
63
72
  gtmClass="banner-operator-cta-gtm"
64
73
  pageTemplate={template}
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
4
  import Bonus from 'gatsby-core-theme/src/components/atoms/bonus';
5
- import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta';
5
+ import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta-button';
6
6
  import ConditionalWrapper from 'gatsby-core-theme/src/components/atoms/conditional-wrapper';
7
7
  import {
8
8
  prettyTracker,
@@ -15,7 +15,7 @@ import Label from 'gatsby-core-theme/src/components/atoms/label';
15
15
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
16
16
  import StarRating from 'gatsby-core-theme/src/components/molecules/star-rating/one-star';
17
17
  import SellingPoints from 'gatsby-core-theme/src/components/atoms/selling-points';
18
- import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta';
18
+ import OperatorCta from 'gatsby-core-theme/src/components/atoms/operator-cta-button';
19
19
  import Tnc from 'gatsby-core-theme/src/components/molecules/tnc';
20
20
  import Bonus from 'gatsby-core-theme/src/components/atoms/bonus';
21
21
  import { Context } from 'gatsby-core-theme/src/context/MainProvider';
@@ -167,7 +167,11 @@ function Body({ pageContext, children, excludeTemplateInPopup = [], hideOperator
167
167
  hasFooterLinks={FooterNavigation !== null}
168
168
  />
169
169
  {!excludeTemplateInPopup.includes(pageContext?.page?.template) && Popup && popupData && (
170
- <Popup module={popupData} template={pageContext?.page?.template} />
170
+ <Popup
171
+ module={popupData}
172
+ template={pageContext?.page?.template}
173
+ operatorStatus={pageContext?.page?.relation?.status}
174
+ />
171
175
  )}
172
176
  {!cookieConsentAccepted && (
173
177
  <ModalProvider>