gatsby-matrix-theme 53.18.4 → 53.18.6

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,25 @@
1
+ ## [53.18.6](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.18.5...v53.18.6) (2026-06-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update core version ([2210cad](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/2210cad37d3315a1ea704a7bb16738d67a016823))
7
+ * update info grid test ([0eed55d](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/0eed55d3a2c0253019db56e9ad6f19ca308ef2c3))
8
+ * update theme version, remove unnecessary function ([1825f44](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/1825f443ed04ac6635217efbca21f505588d6d57))
9
+
10
+
11
+ * Merge branch 'master' of gitlab.com:g2m-gentoo/team-floyd/themes/matrix-theme ([64e3ea7](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/64e3ea74c04f4be655e8abab7582b81de8689ec0))
12
+ * Merge branch 'master' of gitlab.com:g2m-gentoo/team-floyd/themes/matrix-theme ([5e64051](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/5e64051f8d2bf09ecda2387b012d453ee3f65330))
13
+ * Merge branch 'master' of gitlab.com:g2m-gentoo/team-floyd/themes/matrix-theme ([43d050e](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/43d050e07b382ba07080becea3ec819252bf948c))
14
+
15
+ ## [53.18.5](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.18.4...v53.18.5) (2026-06-01)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * change google preferred background color ([982ad22](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/982ad2259048596cc67a6f9af72ebbef2109ca8c))
21
+ * fix style and link ([b9a9e3a](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/b9a9e3a3102992602e35949de4cc73216bcae8ee))
22
+
1
23
  ## [53.18.4](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.18.3...v53.18.4) (2026-05-29)
2
24
 
3
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "53.18.4",
3
+ "version": "53.18.6",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -26,7 +26,7 @@
26
26
  "@react-icons/all-files": "^4.1.0",
27
27
  "@gigmedia/enigma-utils": "^1.20.0",
28
28
  "gatsby": "^5.11.0",
29
- "gatsby-core-theme": "^44.25.0",
29
+ "gatsby-core-theme": "^44.25.2",
30
30
  "gatsby-plugin-sharp": "^5.11.0",
31
31
  "gatsby-plugin-sitemap": "^6.13.1",
32
32
  "gatsby-transformer-sharp": "^5.11.0",
@@ -4,6 +4,7 @@ import { getObjectValue } from 'gatsby-core-theme/src/helpers/getters';
4
4
  import keygen from 'gatsby-core-theme/src/helpers/keygen';
5
5
  import { FaStar } from '@react-icons/all-files/fa/FaStar';
6
6
  import { operatorRatings } from 'gatsby-core-theme/src/constants/ratings-constant';
7
+ import getVolatilityTranslationMeta from 'gatsby-core-theme/src/helpers/volatility';
7
8
  import useTranslate from '~hooks/useTranslate/useTranslate';
8
9
  import styles from './ratings-with-comments.module.scss';
9
10
  import LinearStarRating from '../../../gatsby-core-theme/components/molecules/star-rating/linear-rating';
@@ -29,12 +30,6 @@ const RatingsWithComments = ({
29
30
  const ratings = operatorRatings[typeCheck] || [];
30
31
  const Tag = titleTag || 'h2';
31
32
 
32
- const rangeText = {
33
- 0: useTranslate('range_low', 'Low'),
34
- 1: useTranslate('range_medium', 'Medium'),
35
- 2: useTranslate('range_high', 'High'),
36
- };
37
-
38
33
  const ratingsData = operatorRatings.ratingProperties.some((prop) => item[prop])
39
34
  ? item
40
35
  : item?.bonus || item;
@@ -64,7 +59,8 @@ const RatingsWithComments = ({
64
59
  if (component) {
65
60
  valueDisplayed = component || '-';
66
61
  } else if (fieldValue.includes('volatility')) {
67
- valueDisplayed = rangeText[getObjectValue(ratingsData, fieldValue)] || '-';
62
+ const { key, displayValue } = getVolatilityTranslationMeta(value);
63
+ valueDisplayed = key ? useTranslate(key, displayValue) : displayValue;
68
64
  } else {
69
65
  valueDisplayed = value || '-';
70
66
  }
@@ -1,4 +1,4 @@
1
- $google-preferred-source-bg: var(--google-preferred-source-bg, #fff);
1
+ $google-preferred-source-bg: var(--google-preferred-source-bg, #fafafa);
2
2
  $google-preferred-source-border-radius: var(--google-preferred-source-border-radius, 0.8rem);
3
3
  $google-preferred-source-padding: var(--google-preferred-source-padding, 1.2rem);
4
4
  $google-preferred-source-gap: var(--google-preferred-source-gap, 1.6rem);
@@ -1,27 +1,15 @@
1
- import React, { useEffect, useRef, useState } from 'react';
1
+ import React, { useRef } from 'react';
2
2
  import styles from './widget.module.scss';
3
3
 
4
4
  const index = ({ module }) => {
5
5
  const iframeRef = useRef(null);
6
- const [iframeHeight, setIframeHeight] = useState('500px');
7
-
8
- useEffect(() => {
9
- const handleMessage = (event) => {
10
- if (!event.origin.startsWith('https://sportswidget')) return;
11
-
12
- // This is needef if we have more than one widget module per page
13
- if (event.source !== iframeRef.current?.contentWindow) return;
14
-
15
- const { height } = event.data || {};
16
- if (typeof height === 'number') {
17
- setIframeHeight(`${height}px`);
18
- }
19
- };
20
-
21
- window.addEventListener('message', handleMessage);
22
- return () => window.removeEventListener('message', handleMessage);
23
- }, []);
24
-
6
+ const url =
7
+ process.env.GATSBY_ENV === 'development'
8
+ ? module.url.replace(
9
+ 'https://sportswidget.irishluck.ie',
10
+ 'https://dev.sportswidget.gigmedia.com'
11
+ )
12
+ : module.url;
25
13
  return (
26
14
  <iframe
27
15
  ref={iframeRef}
@@ -29,12 +17,11 @@ const index = ({ module }) => {
29
17
  scrolling="no"
30
18
  style={{
31
19
  width: '100%',
32
- height: iframeHeight,
33
20
  display: 'block',
34
21
  overflow: 'hidden',
35
22
  }}
36
23
  className={`${styles.iframe} ${module?.style ? styles[module.style] : ''}`}
37
- src={`${module.url}&linkFormat=${process.env.TRACKER_LINK_FORMAT_MAIN_WIDGET}`}
24
+ src={`${url}&linkFormat=${process.env.TRACKER_LINK_FORMAT_MAIN_WIDGET}`}
38
25
  loading="lazy"
39
26
  />
40
27
  );
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable array-callback-return */
2
2
  /* eslint-disable no-nested-ternary */
3
3
  import React from 'react';
4
+ import getVolatilityTranslationMeta from 'gatsby-core-theme/src/helpers/volatility';
4
5
  import PrettyLink from '~atoms/pretty-link';
5
6
  import { TrackingKeys } from '~constants/tracking-api'
6
7
  import Tooltip from '../components/atoms/tooltip';
@@ -85,12 +86,13 @@ export const formatGameDate = (value) => {
85
86
  }, '');
86
87
  };
87
88
  export const generateVolatility = (value) => {
88
- if (value === null) return useTranslate('low', 'Low');
89
- return value === 0
90
- ? useTranslate('low', 'Low')
91
- : value === 1
92
- ? useTranslate('medium', 'Medium')
93
- : useTranslate('high', 'High');
89
+ const { key, displayValue } = getVolatilityTranslationMeta(value);
90
+
91
+ if (!key) {
92
+ return displayValue;
93
+ }
94
+
95
+ return useTranslate(key, displayValue);
94
96
  };
95
97
  export const formatDate = (value) => value?.slice(0, 4);
96
98
  export const generateYesorNo = (value) =>
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable react/jsx-no-target-blank */
2
2
  import React from 'react';
3
3
  import { render, fireEvent, waitFor } from '@testing-library/react';
4
+ import getVolatilityTranslationMeta from 'gatsby-core-theme/src/helpers/volatility';
4
5
  import getOperatorData from '../../tests/factories/pages/operator.factory';
5
6
  import { defaultInfoGrid } from '../constants/info-grid';
6
7
  import {
@@ -88,7 +89,8 @@ describe('Info Grid helper component', () => {
88
89
  ).toBe('South Africa Rand');
89
90
  });
90
91
  test('Generate Volatility for grid item', () => {
91
- expect(generateVolatility(data.relation.volatility)).toBe('Medium');
92
+ const { displayValue } = getVolatilityTranslationMeta(data.relation.volatility);
93
+ expect(generateVolatility(data.relation.volatility)).toBe(displayValue);
92
94
  });
93
95
  test('format date for grid item', () => {
94
96
  expect(formatDate(data.relation.founded)).toBe('2012');
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkgatsby_matrix_theme=self.webpackChunkgatsby_matrix_theme||[]).push([[240],{"./src/components/molecules/widget/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>widget});var react=__webpack_require__("../node_modules/react/index.js"),injectStylesIntoStyleTag=__webpack_require__("../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),widget_module=__webpack_require__("../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[10].use[1]!../node_modules/sass-loader/dist/cjs.js!../node_modules/sass-resources-loader/lib/loader.js??ruleSet[1].rules[10].use[3]!./src/components/molecules/widget/widget.module.scss"),options={insert:"head",singleton:!1};injectStylesIntoStyleTag_default()(widget_module.A,options);const widget_widget_module=widget_module.A.locals||{};var process=__webpack_require__("../node_modules/process/browser.js"),index=function(_ref){var module=_ref.module,iframeRef=(0,react.useRef)(null),url="development"===process.env.GATSBY_ENV?module.url.replace("https://sportswidget.irishluck.ie","https://dev.sportswidget.gigmedia.com"):module.url;return react.createElement("iframe",{ref:iframeRef,title:"widget",scrolling:"no",style:{width:"100%",display:"block",overflow:"hidden"},className:`${widget_widget_module.iframe} ${null!=module&&module.style?widget_widget_module[module.style]:""}`,src:`${url}&linkFormat=${process.env.TRACKER_LINK_FORMAT_MAIN_WIDGET}`,loading:"lazy"})};index.displayName="index",index.__docgenInfo={description:"",methods:[],displayName:"index"};const widget=index;"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/molecules/widget/index.js"]={name:"index",docgenInfo:index.__docgenInfo,path:"src/components/molecules/widget/index.js"})},"../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[10].use[1]!../node_modules/sass-loader/dist/cjs.js!../node_modules/sass-resources-loader/lib/loader.js??ruleSet[1].rules[10].use[3]!./src/components/molecules/widget/widget.module.scss":(module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../node_modules/css-loader/dist/runtime/cssWithMappingToString.js"),_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".GXxvytSG33Ebdfm3FUw0Rg\\=\\={border:0;width:100%}.g-B728pQPtGbwMjOaANKPg\\=\\={height:600px}.IqNF\\+aeTyrdUVG1-LqIK9w\\=\\={height:1200px}.lvQL\\+b\\+9uqFt7EAjvCconQ\\=\\={height:900px}","",{version:3,sources:["webpack://./src/components/molecules/widget/widget.module.scss"],names:[],mappings:"AAcA,4BACI,QAAA,CACA,UAAA,CAGJ,4BACI,YAAA,CAGJ,6BACI,aAAA,CAGJ,8BACI,YAAA",sourcesContent:['/* stylelint-disable no-invalid-position-at-import-rule */\n@use \'sass:map\';\n\n// NOTE: General Styles\n@import "../../../../../node_modules/gatsby-core-theme/src/styles/utils/variables/stack-order";\n@import "../../../../../node_modules/gatsby-core-theme/src/styles/utils/variables/typography";\n@import "../../../../../node_modules/gatsby-core-theme/src/styles/utils/variables/layout";\n@import "../../../../../node_modules/gatsby-core-theme/src/styles/utils/media-queries";\n@import "../../../../../node_modules/gatsby-core-theme/src/styles/utils/icons";\n@import "../../../../../node_modules/gatsby-core-theme/src/styles/utils/tooltip";\n@import "../../../../../node_modules/gatsby-core-theme/src/styles/utils/loader";\n@import "../../../../../node_modules/gatsby-core-theme/src/styles/utils/mixins";\n@import "../../../../../node_modules/gatsby-core-theme/src/styles/utils/scrollbar";\n@import "../../../../../node_modules/gatsby-core-theme/src/styles/utils/animations";\n.iframe {\n border: 0;\n width: 100%;\n}\n\n.event {\n height: 600px;\n}\n\n.tournament {\n height: 1200px;\n}\n\n.goal_scorer {\n height: 900px;\n}'],sourceRoot:""}]),___CSS_LOADER_EXPORT___.locals={iframe:"GXxvytSG33Ebdfm3FUw0Rg==",event:"g-B728pQPtGbwMjOaANKPg==",tournament:"IqNF+aeTyrdUVG1-LqIK9w==",goal_scorer:"lvQL+b+9uqFt7EAjvCconQ=="};const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___}}]);