gatsby-matrix-theme 53.2.11 → 53.2.13
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 +17 -0
- package/package.json +2 -2
- package/src/components/molecules/widget/index.js +33 -8
- package/storybook/public/240.562a73b2.iframe.bundle.js +1 -0
- package/storybook/public/{717.58e36a32.iframe.bundle.js → 717.d4494333.iframe.bundle.js} +3 -3
- package/storybook/public/{717.58e36a32.iframe.bundle.js.map → 717.d4494333.iframe.bundle.js.map} +1 -1
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/project.json +1 -1
- package/storybook/public/{runtime~main.f1439b4c.iframe.bundle.js → runtime~main.c90d46ab.iframe.bundle.js} +1 -1
- package/storybook/public/240.7b2818a3.iframe.bundle.js +0 -1
- /package/storybook/public/{717.58e36a32.iframe.bundle.js.LICENSE.txt → 717.d4494333.iframe.bundle.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [53.2.13](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.2.12...v53.2.13) (2025-06-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update the version ([7ee1623](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/7ee1623547c673935058fee366f68293ec0cabb9))
|
|
7
|
+
|
|
8
|
+
## [53.2.12](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.2.11...v53.2.12) (2025-06-19)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* implemented dynamic height solution for embedded widgets ([722ebba](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/722ebba095c1ff72513971dbe0d985ea4b715bd0))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
* Merge branch 'tm-5537-implement-dynamic-height-solution' into 'master' ([34692e7](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/34692e715aa0ff7d61a55fa2fd54c3390a53deb1))
|
|
17
|
+
|
|
1
18
|
## [53.2.11](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.2.10...v53.2.11) (2025-06-18)
|
|
2
19
|
|
|
3
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "53.2.
|
|
3
|
+
"version": "53.2.13",
|
|
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": "^5.11.0",
|
|
28
|
-
"gatsby-core-theme": "44.2.
|
|
28
|
+
"gatsby-core-theme": "44.2.17",
|
|
29
29
|
"gatsby-plugin-sharp": "^5.11.0",
|
|
30
30
|
"gatsby-transformer-sharp": "^5.11.0",
|
|
31
31
|
"gatsby-plugin-sitemap": "^6.13.1",
|
|
@@ -1,11 +1,36 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
import styles from './widget.module.scss';
|
|
3
3
|
|
|
4
|
-
const index = ({ module }) =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
);
|
|
4
|
+
const index = ({ module }) => {
|
|
5
|
+
const iframeRef = useRef(null);
|
|
6
|
+
const [iframeHeight, setIframeHeight] = useState('500px');
|
|
7
|
+
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const handleMessage = (event) => {
|
|
10
|
+
if (!event.origin.includes('sportswidget.gigmedia.com')) 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
|
+
|
|
25
|
+
return (
|
|
26
|
+
<iframe
|
|
27
|
+
ref={iframeRef}
|
|
28
|
+
title="widget"
|
|
29
|
+
style={{ width: '100%', height: iframeHeight, display: 'block' }}
|
|
30
|
+
className={`${styles.iframe} ${module?.style ? styles[module.style] : ''}`}
|
|
31
|
+
src={module.url}
|
|
32
|
+
loading="lazy"
|
|
33
|
+
/>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
11
36
|
export default index;
|
|
@@ -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||{};function _slicedToArray(r,e){return function _arrayWithHoles(r){if(Array.isArray(r))return r}(r)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(r,e)||function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}(r,e)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}var index=function(_ref){var module=_ref.module,iframeRef=(0,react.useRef)(null),_useState2=_slicedToArray((0,react.useState)("500px"),2),iframeHeight=_useState2[0],setIframeHeight=_useState2[1];return(0,react.useEffect)((function(){var handleMessage=function(event){var _iframeRef$current;if(event.origin.includes("sportswidget.gigmedia.com")&&event.source===(null===(_iframeRef$current=iframeRef.current)||void 0===_iframeRef$current?void 0:_iframeRef$current.contentWindow)){var height=(event.data||{}).height;"number"==typeof height&&setIframeHeight(`${height}px`)}};return window.addEventListener("message",handleMessage),function(){return window.removeEventListener("message",handleMessage)}}),[]),react.createElement("iframe",{ref:iframeRef,title:"widget",style:{width:"100%",height:iframeHeight,display:"block"},className:`${widget_widget_module.iframe} ${null!=module&&module.style?widget_widget_module[module.style]:""}`,src:module.url,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___}}]);
|