gatsby-matrix-theme 45.0.3 → 45.0.5
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 +16 -0
- package/package.json +2 -2
- package/src/gatsby-core-theme/components/molecules/main/index.js +1 -1
- package/src/gatsby-core-theme/components/molecules/search/search.module.scss +18 -32
- package/src/gatsby-core-theme/components/pages/search/index.js +5 -1
- package/src/gatsby-core-theme/components/pages/search/search.module.scss +2 -41
- package/src/gatsby-core-theme/helpers/server-data.js +30 -5
- package/src/gatsby-core-theme/hooks/tabs/tabs.module.scss +1 -1
- package/storybook/public/{251.a80bcc38.iframe.bundle.js → 251.6ec2cf61.iframe.bundle.js} +4 -4
- package/storybook/public/{251.a80bcc38.iframe.bundle.js.map → 251.6ec2cf61.iframe.bundle.js.map} +1 -1
- package/storybook/public/{778.594a3c7f.iframe.bundle.js → 778.de88d4c5.iframe.bundle.js} +1 -1
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/project.json +2 -1
- package/storybook/public/{runtime~main.f90c8371.iframe.bundle.js → runtime~main.910996cd.iframe.bundle.js} +1 -1
- package/src/gatsby-core-theme/components/molecules/search/index.js +0 -503
- /package/storybook/public/{251.a80bcc38.iframe.bundle.js.LICENSE.txt → 251.6ec2cf61.iframe.bundle.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [45.0.5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v45.0.4...v45.0.5) (2024-06-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* changes site for testing ([32e1a6e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/32e1a6e754edffbadc917b28c6605ec4ec34b747))
|
|
7
|
+
* update core version and .env ([af948ef](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/af948efd85662243c3eac47169b1ef8735677810))
|
|
8
|
+
|
|
9
|
+
## [45.0.4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v45.0.3...v45.0.4) (2024-06-25)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* search refactoring ([909d273](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/909d273084b4e1f185dd6bb4dab3087127060139))
|
|
15
|
+
* updated with latest version ([4ab185c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4ab185c55aa17bf563d4f50d91260e0467639b25))
|
|
16
|
+
|
|
1
17
|
## [45.0.3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v45.0.2...v45.0.3) (2024-06-25)
|
|
2
18
|
|
|
3
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "45.0.
|
|
3
|
+
"version": "45.0.5",
|
|
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": "33.1.
|
|
28
|
+
"gatsby-core-theme": "33.1.4",
|
|
29
29
|
"gatsby-plugin-sharp": "^5.11.0",
|
|
30
30
|
"gatsby-transformer-sharp": "^5.11.0",
|
|
31
31
|
"prop-types": "15.7.2",
|
|
@@ -1,39 +1,25 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
position: absolute;
|
|
6
|
-
top: 10%;
|
|
7
|
-
left: 50%;
|
|
8
|
-
transform: translateX(-50%);
|
|
1
|
+
.container {
|
|
2
|
+
form {
|
|
3
|
+
position: relative;
|
|
4
|
+
margin-bottom: 2.4rem;
|
|
9
5
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
input {
|
|
7
|
+
width: 100%;
|
|
8
|
+
background-color: #ececec;
|
|
9
|
+
border-radius: .8rem;
|
|
10
|
+
padding: 2.4rem;
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
right: 0;
|
|
18
|
-
top: 0.6rem;
|
|
19
|
-
padding: 2rem;
|
|
12
|
+
|
|
13
|
+
}
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
button {
|
|
16
|
+
position: absolute;
|
|
17
|
+
right: 3rem;
|
|
18
|
+
top: calc(50% - .8rem);
|
|
23
19
|
}
|
|
24
20
|
}
|
|
25
21
|
}
|
|
26
22
|
|
|
27
|
-
.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.loading {
|
|
33
|
-
width: 150px;
|
|
34
|
-
height: 20px;
|
|
35
|
-
display: block;
|
|
36
|
-
}
|
|
37
|
-
.selectwrapper {
|
|
38
|
-
position: relative;
|
|
39
|
-
}
|
|
23
|
+
.results {
|
|
24
|
+
|
|
25
|
+
}
|
|
@@ -9,13 +9,15 @@ import { Context } from 'gatsby-core-theme/src/context/MainProvider';
|
|
|
9
9
|
import Search from 'gatsby-core-theme/src/components/molecules/search';
|
|
10
10
|
import styles from './search.module.scss';
|
|
11
11
|
|
|
12
|
-
const SearchContent = ({ page }) => {
|
|
12
|
+
const SearchContent = ({ page, serverData, allMarkets }) => {
|
|
13
13
|
const { translations } = useContext(Context) || {};
|
|
14
14
|
const searchURLPageName = page.path;
|
|
15
15
|
return (
|
|
16
16
|
<div className={`${styles.searchPage} ${moduleStyles.module} module`}>
|
|
17
17
|
{page.path && <Breadcrumbs page={page} />}
|
|
18
18
|
<Search
|
|
19
|
+
serverData={serverData}
|
|
20
|
+
allMarkets={allMarkets}
|
|
19
21
|
searchURLPageName={searchURLPageName}
|
|
20
22
|
page={page}
|
|
21
23
|
searchIcon="../../../../../../images/search.svg"
|
|
@@ -87,6 +89,8 @@ const SearchContent = ({ page }) => {
|
|
|
87
89
|
};
|
|
88
90
|
|
|
89
91
|
SearchContent.propTypes = {
|
|
92
|
+
serverData: PropTypes.shape({}),
|
|
93
|
+
allMarkets: PropTypes.shape({}),
|
|
90
94
|
page: PropTypes.shape({
|
|
91
95
|
template: PropTypes.string,
|
|
92
96
|
path: PropTypes.string,
|
|
@@ -1,44 +1,5 @@
|
|
|
1
1
|
.searchPage {
|
|
2
|
-
margin-top:
|
|
3
|
-
|
|
4
|
-
div {
|
|
5
|
-
div{
|
|
6
|
-
div{
|
|
7
|
-
button{
|
|
8
|
-
margin-top: 2rem;
|
|
9
|
-
}
|
|
10
|
-
ol{
|
|
11
|
-
button{
|
|
12
|
-
margin-top: 0rem;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
2
|
+
margin-top: var(--nav-height);
|
|
3
|
+
|
|
17
4
|
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
@include min(laptop){
|
|
21
|
-
div{
|
|
22
|
-
button{
|
|
23
|
-
margin-top: 2rem;
|
|
24
|
-
}
|
|
25
|
-
ol{
|
|
26
|
-
display: block !important;
|
|
27
|
-
li{
|
|
28
|
-
margin-bottom: 1rem;
|
|
29
|
-
display: inline-block;
|
|
30
|
-
button{
|
|
31
|
-
margin: 0;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
div:nth-child(2){
|
|
37
|
-
ol{
|
|
38
|
-
li{
|
|
39
|
-
margin-bottom: 0rem;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
5
|
}
|
|
@@ -1,17 +1,42 @@
|
|
|
1
|
+
/* eslint-disable no-prototype-builtins */
|
|
2
|
+
/* eslint-disable no-nested-ternary */
|
|
1
3
|
/* eslint-disable import/prefer-default-export */
|
|
2
4
|
import { getApiQueryParams } from './sportstake';
|
|
3
5
|
import { getApiBasedNames } from './lotto';
|
|
4
6
|
import { getFixtures, getLatestResults, getAvailableDrawDays } from './services';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import loadSource from '~helpers/search-source';
|
|
8
|
+
import { deparam } from '~helpers/strings';
|
|
9
|
+
|
|
10
|
+
export async function getAPIData(page, url) {
|
|
11
|
+
if (page.path.endsWith('/s') || page.path === 's') {
|
|
12
|
+
const results = await loadSource(page.market);
|
|
13
|
+
let urlParams = null;
|
|
14
|
+
if (url && url.split('?').length === 2) {
|
|
15
|
+
urlParams = deparam(`${url.split('?')[1]}`);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const searchData = urlParams
|
|
19
|
+
? urlParams.hasOwnProperty('s')
|
|
20
|
+
? results.filter((item) => item.title.toLowerCase().includes(urlParams.s.toLowerCase()))
|
|
21
|
+
: null
|
|
22
|
+
: null;
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
props: {
|
|
26
|
+
data: searchData,
|
|
27
|
+
searchParam: urlParams ? urlParams.s : null,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
10
31
|
|
|
11
32
|
const containsFixtures = page.categories.filter((category) => category.short_name === 'fixtures');
|
|
12
33
|
const containsResults = page.categories.filter((category) => category.short_name === 'results');
|
|
13
34
|
const containsLotto = page.categories.filter((category) => category.short_name === 'lotto');
|
|
14
35
|
|
|
36
|
+
let responseFixtures = {};
|
|
37
|
+
let responseResults = {};
|
|
38
|
+
let responseLotto = {};
|
|
39
|
+
|
|
15
40
|
if (containsFixtures.length >= 1) {
|
|
16
41
|
const filteredArray = page?.sections?.main?.modules.filter(
|
|
17
42
|
(x) => x.value_type === 'template_block'
|