gatsby-matrix-theme 24.0.0 → 25.0.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.
- package/CHANGELOG.md +25 -0
- package/package.json +2 -2
- package/src/components/molecules/wagering-calculator/index.js +19 -11
- package/src/components/molecules/wagering-calculator/wagering-calculator.module.scss +4 -0
- package/src/gatsby-core-theme/components/atoms/info-grid/index.js +4 -1
- package/src/gatsby-core-theme/components/molecules/header/index.js +2 -1
- package/src/gatsby-core-theme/components/molecules/main/index.js +34 -0
- package/src/gatsby-core-theme/components/organisms/head/index.js +3 -2
- package/storybook/public/134.19897eea.iframe.bundle.js +7 -0
- package/storybook/public/{134.f050c17b.iframe.bundle.js.map → 134.19897eea.iframe.bundle.js.map} +1 -1
- package/storybook/public/{29.81c8da24.iframe.bundle.js → 29.f2ee8037.iframe.bundle.js} +1 -1
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/{main.0c3946da.iframe.bundle.js → main.5d202e0b.iframe.bundle.js} +1 -1
- package/storybook/public/{runtime~main.23bfd16b.iframe.bundle.js → runtime~main.349b6fb9.iframe.bundle.js} +1 -1
- package/src/gatsby-core-theme/helpers/facebookPixel.js +0 -43
- package/storybook/public/134.f050c17b.iframe.bundle.js +0 -7
- /package/storybook/public/{134.f050c17b.iframe.bundle.js.LICENSE.txt → 134.19897eea.iframe.bundle.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
# [25.0.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v24.0.0...v25.0.0) (2023-05-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* facebook pixel ([c848df5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c848df59089148e7b97b1547f4bfa3701cd87a37))
|
|
7
|
+
* updated to latest core theme ([f6cbe07](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f6cbe0791ecd731fe39e4721688b1c71b0115294))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Code Refactoring
|
|
11
|
+
|
|
12
|
+
* add template ([6e96666](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6e966667d43e2227fc9b87cfa749672207f6b4f3))
|
|
13
|
+
* update wagering calculator ids for duplicates ([96da95b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/96da95b1831f0adb397b3dbbbdffe1594edc345b))
|
|
14
|
+
* update wagering calculator with validation ([f9a6e96](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f9a6e963ce96ff5242f46e0ef5de9ff71368e8c8))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
* Merge branch 'info-grid-email' into 'master' ([aa3eaf1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/aa3eaf1bd8a1840d79483a76b1185c4bb37bb32e))
|
|
18
|
+
* Merge branch 'master' into info-grid-email ([2e77c2d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2e77c2dd021b1eab9aa68e0766f4dccdb5eb8cfa))
|
|
19
|
+
* Merge branch 'tm-3094-wagering-calculator' into 'master' ([bb29679](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bb296797345978809f3abfa35ba8e6948faa1447))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Tests
|
|
23
|
+
|
|
24
|
+
* fix for test ([ce54610](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ce546102087f7d4f5f067a1abad85235d9976934))
|
|
25
|
+
|
|
1
26
|
# [24.0.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v23.0.5...v24.0.0) (2023-05-24)
|
|
2
27
|
|
|
3
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
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": "22.0.
|
|
28
|
+
"gatsby-core-theme": "22.0.6",
|
|
29
29
|
"gatsby-plugin-sharp": "^4.10.2",
|
|
30
30
|
"gatsby-plugin-sitemap": "^3.3.0",
|
|
31
31
|
"gatsby-transformer-sharp": "^4.10.0",
|
|
@@ -20,16 +20,16 @@ const WageringCalculator = ({
|
|
|
20
20
|
const InfoIcon = infoIcon || AiOutlineQuestionCircle;
|
|
21
21
|
|
|
22
22
|
const Calculate = ({ target: { elements } }) => {
|
|
23
|
+
// eslint-disable-next-line
|
|
24
|
+
!elements.wgc_contribution.value && (elements.wgc_contribution.value = 100);
|
|
23
25
|
setResult(
|
|
24
26
|
Math.round(
|
|
25
|
-
(Number(elements.
|
|
26
|
-
(elements.
|
|
27
|
-
Number(elements.
|
|
28
|
-
(100 / Number(elements.
|
|
27
|
+
(Number(elements.wgc_bonus.value) +
|
|
28
|
+
(elements.wgc_calc_select.value !== 'bonus' ? Number(elements.wgc_deposit.value) : 0)) *
|
|
29
|
+
Number(elements.wgc_wagering.value) *
|
|
30
|
+
(100 / Number(elements.wgc_contribution.value))
|
|
29
31
|
)
|
|
30
32
|
);
|
|
31
|
-
// eslint-disable-next-line
|
|
32
|
-
!elements.contribution.value && (elements.contribution.value = 100);
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
return (
|
|
@@ -47,16 +47,24 @@ const WageringCalculator = ({
|
|
|
47
47
|
<label className={styles.label} htmlFor="deposit">
|
|
48
48
|
{translate(translations, 'wagecalc_deposit_amount', 'Deposit amount')}
|
|
49
49
|
</label>
|
|
50
|
-
<input className={styles.input} id="
|
|
50
|
+
<input className={styles.input} id="wgc_deposit" type="number" min={0} />
|
|
51
51
|
<label className={styles.label} htmlFor="bonus">
|
|
52
52
|
{translate(translations, 'wagecalc_bonus_amount', 'Bonus amount')}
|
|
53
53
|
</label>
|
|
54
|
-
<input className={styles.input} id="
|
|
54
|
+
<input className={styles.input} id="wgc_bonus" type="number" min={0} required />
|
|
55
55
|
<label className={styles.label} htmlFor="wagering">
|
|
56
56
|
{translate(translations, 'wagecalc_wagering', 'Wagering')}
|
|
57
57
|
</label>
|
|
58
|
-
<input className={styles.input} id="
|
|
59
|
-
<select
|
|
58
|
+
<input className={styles.input} id="wgc_wagering" type="number" min={0} required />
|
|
59
|
+
<select
|
|
60
|
+
className={styles.select}
|
|
61
|
+
id="wgc_calc_select"
|
|
62
|
+
onChange={({ target }) => {
|
|
63
|
+
const deposit = document.getElementById('wgc_deposit');
|
|
64
|
+
deposit.required = target.value !== 'bonus';
|
|
65
|
+
deposit.checkValidity();
|
|
66
|
+
}}
|
|
67
|
+
>
|
|
60
68
|
<option value="bonus">{translate(translations, 'wagecalc_bonus', 'Bonus')}</option>
|
|
61
69
|
<option value="bonus_deposit">
|
|
62
70
|
{translate(translations, 'wagecalc_deposit_bonus', 'Deposit + Bonus')}
|
|
@@ -65,7 +73,7 @@ const WageringCalculator = ({
|
|
|
65
73
|
<label className={styles.label} htmlFor="contribution">
|
|
66
74
|
{translate(translations, 'wagecalc_contribution', 'Contribution %')}
|
|
67
75
|
</label>
|
|
68
|
-
<input className={styles.input} id="
|
|
76
|
+
<input className={styles.input} id="wgc_contribution" type="number" min={0} max={100} />
|
|
69
77
|
<Button
|
|
70
78
|
isButton
|
|
71
79
|
primaryColor
|
|
@@ -51,7 +51,10 @@ const InfoGrid = ({
|
|
|
51
51
|
<div ref={ref} className={styles.grid}>
|
|
52
52
|
{Object.keys(gridItems).map((key) => {
|
|
53
53
|
const labelTitle = translate(translations, key, gridLabels[key][1]);
|
|
54
|
-
const value = generateLabel(key, gridItems[key], gridLabels[key][2], {
|
|
54
|
+
const value = generateLabel(key, gridItems[key], gridLabels[key][2], {
|
|
55
|
+
translations,
|
|
56
|
+
template,
|
|
57
|
+
});
|
|
55
58
|
return gridItem(labelTitle, value);
|
|
56
59
|
})}
|
|
57
60
|
</div>
|
|
@@ -200,7 +200,7 @@ export default function Header({ section, numOfStarsRating = 5 }) {
|
|
|
200
200
|
}
|
|
201
201
|
${bannerIsActive && styles.bannerIsActive ? styles.bannerIsActive : ''}`}
|
|
202
202
|
>
|
|
203
|
-
{section.page.path && <Breadcrumbs page={section.page} />}
|
|
203
|
+
{section.page.path && <Breadcrumbs markets={section.allMarkets} page={section.page} />}
|
|
204
204
|
{relationContent(section, numOfStarsRating)}
|
|
205
205
|
</header>
|
|
206
206
|
);
|
|
@@ -208,6 +208,7 @@ export default function Header({ section, numOfStarsRating = 5 }) {
|
|
|
208
208
|
|
|
209
209
|
Header.propTypes = {
|
|
210
210
|
section: PropTypes.shape({
|
|
211
|
+
allMarkets: PropTypes.shape([PropTypes.shape({})]),
|
|
211
212
|
page: PropTypes.shape({
|
|
212
213
|
relation_type: PropTypes.string,
|
|
213
214
|
template: PropTypes.string,
|
|
@@ -105,6 +105,40 @@ const Main = ({ section = {}, pageContext = {}, showAuthor = true, exclOperator
|
|
|
105
105
|
)}
|
|
106
106
|
{Newsletter && <Newsletter page={page} />}
|
|
107
107
|
{NewsletterSuccess && <NewsletterSuccess />}
|
|
108
|
+
|
|
109
|
+
{process.env.ENABLE_PIXEL && (
|
|
110
|
+
<>
|
|
111
|
+
<Script strategy="idle">
|
|
112
|
+
{`
|
|
113
|
+
!function(f,b,e,v,n,t,s)
|
|
114
|
+
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
|
115
|
+
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
|
|
116
|
+
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
|
|
117
|
+
n.queue=[];t=b.createElement(e);t.async=!0;
|
|
118
|
+
t.src=v;s=b.getElementsByTagName(e)[0];
|
|
119
|
+
s.parentNode.insertBefore(t,s)}(window, document,'script',
|
|
120
|
+
'https://connect.facebook.net/en_US/fbevents.js');
|
|
121
|
+
fbq('init', ${process.env.PIXEL_ID});
|
|
122
|
+
fbq('track', 'PageView');
|
|
123
|
+
`}
|
|
124
|
+
</Script>
|
|
125
|
+
<Script strategy="idle">
|
|
126
|
+
{`
|
|
127
|
+
if (typeof window !== 'undefined') {
|
|
128
|
+
document.querySelector('noscript').innerHTML = \`
|
|
129
|
+
<img
|
|
130
|
+
height="1"
|
|
131
|
+
width="1"
|
|
132
|
+
style={{ display: 'none' }}
|
|
133
|
+
src="https://www.facebook.com/tr?id=${process.env.PIXEL_ID}&ev=PageView&noscript=1"
|
|
134
|
+
/>
|
|
135
|
+
\`;
|
|
136
|
+
}
|
|
137
|
+
`}
|
|
138
|
+
</Script>
|
|
139
|
+
</>
|
|
140
|
+
)}
|
|
141
|
+
|
|
108
142
|
{process.env.ENABLE_OPTINMONSTR === 'true' && (
|
|
109
143
|
<Script
|
|
110
144
|
id="optin-monstr"
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import parse from 'html-react-parser';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import FacebookPixel from '../../../helpers/facebookPixel';
|
|
7
6
|
import { schemaGenerator } from '~helpers/schema';
|
|
8
7
|
import { getUrl, getPageImage, imagePrettyUrl } from '~helpers/getters';
|
|
9
8
|
import keygen from '~helpers/keygen';
|
|
@@ -68,7 +67,9 @@ const HeadData = ({ page = {}, siteInfo }) => {
|
|
|
68
67
|
<title>{metaTitle}</title>
|
|
69
68
|
<html lang={getLanguage(isIL || page.language)} />
|
|
70
69
|
<meta name="description" content={parsedMetaDescr} />
|
|
71
|
-
|
|
70
|
+
{process.env.ENABLE_PIXEL && (
|
|
71
|
+
<meta name="facebook-domain-verification" content={process.env.FBVERIFACTION} />
|
|
72
|
+
)}
|
|
72
73
|
{page.meta_robots && process.env.GATSBY_ACTIVE_ENV !== 'development' && (
|
|
73
74
|
<meta name="robots" content={page.meta_robots.join()} />
|
|
74
75
|
)}
|