gatsby-matrix-theme 7.1.49 → 7.1.50
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 +22 -0
- package/package.json +2 -2
- package/src/components/atoms/author-card/index.js +1 -1
- package/src/components/atoms/cards/game-card/index.js +1 -1
- package/src/components/organisms/popup/index.js +17 -2
- package/src/components/organisms/popup/popup.test.js +4 -3
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.7870d118.iframe.bundle.js +1 -0
- package/storybook/public/main.6b05dbf1.iframe.bundle.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## [7.1.50](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.49...v7.1.50) (2022-08-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add the link conditionally ([9c1ce71](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/9c1ce715f60f9cfa503bc14639698fb4fb150dec))
|
|
7
|
+
* external links authors matrix ([86885ca](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/86885ca1fdb0d2414e51384d36eed58536501000))
|
|
8
|
+
* update popup test ([62f152b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/62f152bc7dc040cb817ce2b7549ebc34ff9982f2))
|
|
9
|
+
* update the link ([ecd8c13](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ecd8c13b09732354a6a04d6b042b231390beef6c))
|
|
10
|
+
* update the popup logic ([2dd3a21](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2dd3a2130ac15bbb14255185b2df21b32ec92e0e))
|
|
11
|
+
* update translation on game-card ([89f8b3c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/89f8b3c02cf6fb87e8a4525903802e81bc0fc606))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Config
|
|
15
|
+
|
|
16
|
+
* update core version ([5a77b48](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5a77b4858e9fd5497d0a4f555e2ff81d0e3ed695))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
* Merge branch 'tm-2990-changing-cta-button-for-slots' into 'master' ([e81758e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e81758e92136ff5a87fd3bfbe92d58fdcaa2f0ad))
|
|
20
|
+
* Merge branch 'tm-2995-adding-a-link-on-popup-button' into 'master' ([117dbd8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/117dbd85d9ff2484d2c2db2e6a3d61b92cd0278c))
|
|
21
|
+
* Merge branch 'tm-2996-external-links-author' into 'master' ([41521b0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/41521b0987bddc8d99be62fd1dcb84d5e47f9035))
|
|
22
|
+
|
|
1
23
|
## [7.1.49](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.48...v7.1.49) (2022-08-09)
|
|
2
24
|
|
|
3
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.50",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"gatsby": "^4.15.0",
|
|
27
|
-
"gatsby-core-theme": "^10.0.
|
|
27
|
+
"gatsby-core-theme": "^10.0.1",
|
|
28
28
|
"gatsby-plugin-sharp": "^4.10.2",
|
|
29
29
|
"gatsby-plugin-sitemap": "^3.3.0",
|
|
30
30
|
"gatsby-transformer-sharp": "^4.10.0",
|
|
@@ -11,6 +11,7 @@ import PropTypes from 'prop-types';
|
|
|
11
11
|
import { MdClose } from '@react-icons/all-files/md/MdClose';
|
|
12
12
|
import { translate } from 'gatsby-core-theme/src/helpers/getters';
|
|
13
13
|
import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
14
|
+
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
14
15
|
import PopupCard from '../../atoms/cards/popup-card';
|
|
15
16
|
import { setIdleTimeout } from '../../../helpers/popup';
|
|
16
17
|
import { isMobileDevice } from '../../../helpers/mobile-detect';
|
|
@@ -18,7 +19,14 @@ import months from '../../../constants/months';
|
|
|
18
19
|
|
|
19
20
|
import styles from './popup.module.scss';
|
|
20
21
|
|
|
21
|
-
const Popup = ({
|
|
22
|
+
const Popup = ({
|
|
23
|
+
module,
|
|
24
|
+
isStorybook = false,
|
|
25
|
+
toggle = false,
|
|
26
|
+
icon = null,
|
|
27
|
+
numberOfItems = 4,
|
|
28
|
+
link = false,
|
|
29
|
+
}) => {
|
|
22
30
|
const modal = useRef(null);
|
|
23
31
|
const [showModal, setShowModal] = useState(false);
|
|
24
32
|
const [isIdle, setIsIdle] = useState(false);
|
|
@@ -129,7 +137,7 @@ const Popup = ({ module, isStorybook = false, toggle = false, icon = null, numbe
|
|
|
129
137
|
<PopupCard key={index} item={item} tracker={tracker} />
|
|
130
138
|
))}
|
|
131
139
|
</div>
|
|
132
|
-
{toggle && (
|
|
140
|
+
{toggle && !link && (
|
|
133
141
|
<div
|
|
134
142
|
className={styles.toggleButtonPopup}
|
|
135
143
|
onClick={() => {
|
|
@@ -140,6 +148,12 @@ const Popup = ({ module, isStorybook = false, toggle = false, icon = null, numbe
|
|
|
140
148
|
<p>{toggleTitle}</p>
|
|
141
149
|
</div>
|
|
142
150
|
)}
|
|
151
|
+
{toggle && link && (
|
|
152
|
+
<Link className={styles.toggleButtonPopup} to={link}>
|
|
153
|
+
{icon}
|
|
154
|
+
<p>{toggleTitle}</p>
|
|
155
|
+
</Link>
|
|
156
|
+
)}
|
|
143
157
|
</div>
|
|
144
158
|
</div>
|
|
145
159
|
</div>
|
|
@@ -156,6 +170,7 @@ Popup.propTypes = {
|
|
|
156
170
|
toggle: PropTypes.bool,
|
|
157
171
|
icon: PropTypes.elementType,
|
|
158
172
|
numberOfItems: PropTypes.number,
|
|
173
|
+
link: PropTypes.bool || PropTypes.string,
|
|
159
174
|
};
|
|
160
175
|
|
|
161
176
|
export default Popup;
|
|
@@ -9,13 +9,14 @@ const module = singleToplistData;
|
|
|
9
9
|
|
|
10
10
|
describe('Popup test component', () => {
|
|
11
11
|
test('render', () => {
|
|
12
|
-
const { container
|
|
12
|
+
const { container } = render(<Popup module={module} />);
|
|
13
13
|
expect(container).toBeTruthy();
|
|
14
|
-
|
|
14
|
+
const paragraph = container.querySelector('p');
|
|
15
|
+
expect(paragraph).toHaveTextContent('Claim These Exclusive Bonuses');
|
|
15
16
|
});
|
|
16
17
|
|
|
17
18
|
test('Popup Rows and click close button', () => {
|
|
18
|
-
const { container } = render(<Popup module={module} isStorybook />);
|
|
19
|
+
const { container } = render(<Popup module={module} toggle isStorybook />);
|
|
19
20
|
const rows = container.querySelectorAll('.popupCard');
|
|
20
21
|
expect(rows).toHaveLength(4);
|
|
21
22
|
|
|
@@ -345,4 +345,4 @@
|
|
|
345
345
|
|
|
346
346
|
|
|
347
347
|
|
|
348
|
-
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"}];</script><script src="runtime~main.fb7e09d5.iframe.bundle.js"></script><script src="139.24421e72.iframe.bundle.js"></script><script src="main.
|
|
348
|
+
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"}];</script><script src="runtime~main.fb7e09d5.iframe.bundle.js"></script><script src="139.24421e72.iframe.bundle.js"></script><script src="main.7870d118.iframe.bundle.js"></script></body></html>
|