gatsby-matrix-theme 2.3.6 → 2.3.7
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 +13 -0
- package/package.json +2 -2
- package/src/components/atoms/search/autocomplete/article.js +9 -2
- package/src/components/atoms/search/autocomplete/game.js +9 -2
- package/src/components/atoms/search/autocomplete/operator.js +9 -2
- package/src/components/atoms/search/autocomplete/payment_methods.js +9 -2
- package/src/components/atoms/search/autocomplete/software_provider.js +9 -2
- package/src/gatsby-core-theme/components/molecules/search/index.js +1 -1
- package/src/gatsby-core-theme/components/organisms/cards/index.js +7 -1
- package/src/gatsby-core-theme/components/organisms/navigation/index.js +6 -2
- package/src/gatsby-core-theme/components/organisms/search/index.js +6 -6
- package/src/helpers/splitSearchQuery.js +3 -0
- package/src/hooks/tabs/index.js +3 -0
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.b9b80be9.iframe.bundle.js +1 -0
- package/storybook/public/{vendors~main.c0720eee.iframe.bundle.js → vendors~main.364411ac.iframe.bundle.js} +3 -3
- package/storybook/public/{vendors~main.c0720eee.iframe.bundle.js.LICENSE.txt → vendors~main.364411ac.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook/public/vendors~main.364411ac.iframe.bundle.js.map +1 -0
- package/storybook/public/main.927cac84.iframe.bundle.js +0 -1
- package/storybook/public/vendors~main.c0720eee.iframe.bundle.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [2.3.7](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v2.3.6...v2.3.7) (2021-11-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* correction to typo ([b50be3c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b50be3c5e42f2560f5850f6b9b8e624d56790fe0))
|
|
7
|
+
* force load lazy images on tab change ([fa06336](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fa06336730891bed815cbf1867d4ca870d257fbb))
|
|
8
|
+
* general fixes ([5aef217](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5aef217afd001c09c8baa51ce75dc087a28f8294))
|
|
9
|
+
* highlight search query on auto complete ([2aee5da](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2aee5da1c4e5b4d790ee1a1c5a687f5f790d244b))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* Merge branch 'tm-2478-search' into 'master' ([a86ac37](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a86ac379825d5599b066d9f13b081c8ff7b8f4b2))
|
|
13
|
+
|
|
1
14
|
## [2.3.6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v2.3.5...v2.3.6) (2021-11-18)
|
|
2
15
|
|
|
3
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.7",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"cross-env": "^7.0.2",
|
|
32
32
|
"dotenv": "8.2.0",
|
|
33
33
|
"gatsby": "^3.3.1",
|
|
34
|
-
"gatsby-core-theme": "^1.6.
|
|
34
|
+
"gatsby-core-theme": "^1.6.5",
|
|
35
35
|
"gatsby-image": "^3.3.0",
|
|
36
36
|
"gatsby-plugin-image": "^1.3.1",
|
|
37
37
|
"gatsby-plugin-postcss": "^4.3.0",
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
/* eslint-disable react/no-danger */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { GrFormNext } from 'react-icons/gr';
|
|
4
5
|
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
6
|
+
import { splitSearchQuery } from '../../../../helpers/splitSearchQuery';
|
|
5
7
|
|
|
6
|
-
const Article = ({ item = {}, Button = <GrFormNext
|
|
8
|
+
const Article = ({ item = {}, Button = <GrFormNext />, searchQuery }) => (
|
|
7
9
|
<Link to={item.path} className="article-gtm">
|
|
8
|
-
<h1
|
|
10
|
+
<h1
|
|
11
|
+
dangerouslySetInnerHTML={{
|
|
12
|
+
__html: splitSearchQuery(item.title, searchQuery),
|
|
13
|
+
}}
|
|
14
|
+
/>
|
|
9
15
|
{Button}
|
|
10
16
|
</Link>
|
|
11
17
|
);
|
|
@@ -15,6 +21,7 @@ Article.propTypes = {
|
|
|
15
21
|
title: PropTypes.string,
|
|
16
22
|
}).isRequired,
|
|
17
23
|
Button: PropTypes.func,
|
|
24
|
+
searchQuery: PropTypes.string,
|
|
18
25
|
};
|
|
19
26
|
|
|
20
27
|
export default Article;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
/* eslint-disable react/no-danger */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { GrFormNext } from 'react-icons/gr';
|
|
4
5
|
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
6
|
+
import { splitSearchQuery } from '../../../../helpers/splitSearchQuery';
|
|
5
7
|
|
|
6
|
-
const Game = ({ item = {}, Button = <GrFormNext
|
|
8
|
+
const Game = ({ item = {}, Button = <GrFormNext />, searchQuery }) => (
|
|
7
9
|
<Link to={item.path} className="game-gtm">
|
|
8
|
-
<h1
|
|
10
|
+
<h1
|
|
11
|
+
dangerouslySetInnerHTML={{
|
|
12
|
+
__html: splitSearchQuery(item.title, searchQuery),
|
|
13
|
+
}}
|
|
14
|
+
/>
|
|
9
15
|
{Button}
|
|
10
16
|
</Link>
|
|
11
17
|
);
|
|
@@ -15,6 +21,7 @@ Game.propTypes = {
|
|
|
15
21
|
title: PropTypes.string,
|
|
16
22
|
}).isRequired,
|
|
17
23
|
Button: PropTypes.func,
|
|
24
|
+
searchQuery: PropTypes.string,
|
|
18
25
|
};
|
|
19
26
|
|
|
20
27
|
export default Game;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
/* eslint-disable react/no-danger */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { GrFormNext } from 'react-icons/gr';
|
|
4
5
|
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
6
|
+
import { splitSearchQuery } from '../../../../helpers/splitSearchQuery';
|
|
5
7
|
|
|
6
|
-
const Operator = ({ item = {}, Button = <GrFormNext
|
|
8
|
+
const Operator = ({ item = {}, Button = <GrFormNext />, searchQuery }) => (
|
|
7
9
|
<Link to={`/${item.path}`} className="operator-gtm">
|
|
8
|
-
<h1
|
|
10
|
+
<h1
|
|
11
|
+
dangerouslySetInnerHTML={{
|
|
12
|
+
__html: splitSearchQuery(item.title, searchQuery),
|
|
13
|
+
}}
|
|
14
|
+
/>
|
|
9
15
|
{Button}
|
|
10
16
|
</Link>
|
|
11
17
|
);
|
|
@@ -16,6 +22,7 @@ Operator.propTypes = {
|
|
|
16
22
|
path: PropTypes.string,
|
|
17
23
|
}).isRequired,
|
|
18
24
|
Button: PropTypes.func,
|
|
25
|
+
searchQuery: PropTypes.string,
|
|
19
26
|
};
|
|
20
27
|
|
|
21
28
|
export default Operator;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
/* eslint-disable react/no-danger */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { GrFormNext } from 'react-icons/gr';
|
|
4
5
|
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
6
|
+
import { splitSearchQuery } from '../../../../helpers/splitSearchQuery';
|
|
5
7
|
|
|
6
|
-
const PaymentMethods = ({ item = {}, Button = <GrFormNext
|
|
8
|
+
const PaymentMethods = ({ item = {}, Button = <GrFormNext />, searchQuery }) => (
|
|
7
9
|
<Link to={item.path} className="payment-method-gtm">
|
|
8
|
-
<h1
|
|
10
|
+
<h1
|
|
11
|
+
dangerouslySetInnerHTML={{
|
|
12
|
+
__html: splitSearchQuery(item.title, searchQuery),
|
|
13
|
+
}}
|
|
14
|
+
/>
|
|
9
15
|
{Button}
|
|
10
16
|
</Link>
|
|
11
17
|
);
|
|
@@ -15,6 +21,7 @@ PaymentMethods.propTypes = {
|
|
|
15
21
|
title: PropTypes.string,
|
|
16
22
|
}).isRequired,
|
|
17
23
|
Button: PropTypes.func,
|
|
24
|
+
searchQuery: PropTypes.string,
|
|
18
25
|
};
|
|
19
26
|
|
|
20
27
|
export default PaymentMethods;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
/* eslint-disable react/no-danger */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { GrFormNext } from 'react-icons/gr';
|
|
4
5
|
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
6
|
+
import { splitSearchQuery } from '../../../../helpers/splitSearchQuery';
|
|
5
7
|
|
|
6
|
-
const SoftwareProvider = ({ item = {}, Button = <GrFormNext
|
|
8
|
+
const SoftwareProvider = ({ item = {}, Button = <GrFormNext />, searchQuery }) => (
|
|
7
9
|
<Link to={item.path} className="software-provider-gtm">
|
|
8
|
-
<h1
|
|
10
|
+
<h1
|
|
11
|
+
dangerouslySetInnerHTML={{
|
|
12
|
+
__html: splitSearchQuery(item.title, searchQuery),
|
|
13
|
+
}}
|
|
14
|
+
/>
|
|
9
15
|
{Button}
|
|
10
16
|
</Link>
|
|
11
17
|
);
|
|
@@ -15,6 +21,7 @@ SoftwareProvider.propTypes = {
|
|
|
15
21
|
title: PropTypes.string,
|
|
16
22
|
}).isRequired,
|
|
17
23
|
Button: PropTypes.func,
|
|
24
|
+
searchQuery: PropTypes.string,
|
|
18
25
|
};
|
|
19
26
|
|
|
20
27
|
export default SoftwareProvider;
|
|
@@ -75,7 +75,7 @@ const Search = ({
|
|
|
75
75
|
|
|
76
76
|
// Get the child by the given type - a data object is required
|
|
77
77
|
const getChildType = (item, type) =>
|
|
78
|
-
children(item).props.children.find((child) => child.props.type === type);
|
|
78
|
+
children(item, searchQuery).props.children.find((child) => child.props.type === type);
|
|
79
79
|
|
|
80
80
|
// Prepare search result for auto complete
|
|
81
81
|
const loadAutoComplete = useCallback(() => {
|
|
@@ -16,7 +16,13 @@ export default (props) => {
|
|
|
16
16
|
import(`../../../../components/molecules/toplist/row/variant-one`)
|
|
17
17
|
);
|
|
18
18
|
customCardComponent = (prop) => (
|
|
19
|
-
<ToplistRow
|
|
19
|
+
<ToplistRow
|
|
20
|
+
page={prop.item}
|
|
21
|
+
item={prop.item.relation}
|
|
22
|
+
layout="grid"
|
|
23
|
+
tracker="main"
|
|
24
|
+
number={prop.number}
|
|
25
|
+
/>
|
|
20
26
|
);
|
|
21
27
|
} else {
|
|
22
28
|
customCardComponent = loadable(() =>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import NavigationProvider from 'gatsby-core-theme/src/components/organisms/navigation/navigationContext.js';
|
|
4
|
-
import { getSiteName } from 'gatsby-core-theme/src/helpers/getters';
|
|
5
4
|
import styles from 'gatsby-core-theme/src/components/organisms/navigation/navigation.module.scss';
|
|
6
5
|
import Link from '~hooks/link';
|
|
7
6
|
import Menu from '~molecules/menu';
|
|
@@ -61,7 +60,12 @@ const Navigation = ({
|
|
|
61
60
|
<nav className={styles.nav} style={{ justifyContent: logoPosition }} ref={navRef}>
|
|
62
61
|
<NavigationProvider>
|
|
63
62
|
<Link className={`${styles.logo} main-menu-gtm logo-cta`} to="/" onClick={onClickHandler}>
|
|
64
|
-
<img
|
|
63
|
+
<img
|
|
64
|
+
alt={process.env.GATSBY_SITE_NAME}
|
|
65
|
+
src={logo}
|
|
66
|
+
width={logoWidth}
|
|
67
|
+
height={logoHeight}
|
|
68
|
+
/>
|
|
65
69
|
</Link>
|
|
66
70
|
{showMenu && (
|
|
67
71
|
<>
|
|
@@ -95,22 +95,22 @@ const SearchForm = ({ className, searchIcon, iconWidth = 24, iconHeight = 24 })
|
|
|
95
95
|
showViewResultsText: false,
|
|
96
96
|
}}
|
|
97
97
|
>
|
|
98
|
-
{(item) => (
|
|
98
|
+
{(item, searchQuery) => (
|
|
99
99
|
<>
|
|
100
100
|
<div type="operator">
|
|
101
|
-
<Operator item={item} />
|
|
101
|
+
<Operator item={item} searchQuery={searchQuery} />
|
|
102
102
|
</div>
|
|
103
103
|
<div type="game">
|
|
104
|
-
<Game item={item} />
|
|
104
|
+
<Game item={item} searchQuery={searchQuery} />
|
|
105
105
|
</div>
|
|
106
106
|
<div type="article">
|
|
107
|
-
<Article item={item} />
|
|
107
|
+
<Article item={item} searchQuery={searchQuery} />
|
|
108
108
|
</div>
|
|
109
109
|
<div type="payment_method">
|
|
110
|
-
<PaymentMethods item={item} />
|
|
110
|
+
<PaymentMethods item={item} searchQuery={searchQuery} />
|
|
111
111
|
</div>
|
|
112
112
|
<div type="software_provider">
|
|
113
|
-
<SoftwareProvider item={item} />
|
|
113
|
+
<SoftwareProvider item={item} searchQuery={searchQuery} />
|
|
114
114
|
</div>
|
|
115
115
|
</>
|
|
116
116
|
)}
|
package/src/hooks/tabs/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
2
|
import React, { useContext, useState } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
4
|
+
import { forceCheck } from 'react-lazyload';
|
|
3
5
|
import { translate } from 'gatsby-core-theme/src/helpers/getters';
|
|
4
6
|
import { Context } from 'gatsby-core-theme/src/context/TranslationsProvider';
|
|
5
7
|
import TabList from './tab/tab-list';
|
|
@@ -89,6 +91,7 @@ const Tabs = ({
|
|
|
89
91
|
};
|
|
90
92
|
|
|
91
93
|
function onClickTabItem(tabId) {
|
|
94
|
+
forceCheck();
|
|
92
95
|
setActiveTab(tabId);
|
|
93
96
|
}
|
|
94
97
|
return (
|
|
@@ -135,4 +135,4 @@
|
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
|
|
138
|
-
window['FEATURES'] = {"postcss":true};</script><script src="runtime~main.76a8717d.iframe.bundle.js"></script><script src="vendors~main.
|
|
138
|
+
window['FEATURES'] = {"postcss":true};</script><script src="runtime~main.76a8717d.iframe.bundle.js"></script><script src="vendors~main.364411ac.iframe.bundle.js"></script><script src="main.b9b80be9.iframe.bundle.js"></script></body></html>
|