gatsby-matrix-theme 53.0.32-beta.1 → 53.1.1
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 +32 -4
- package/package.json +2 -2
- package/src/components/atoms/author-card/index.js +3 -2
- package/src/components/atoms/cards/article-card/variables/index.js +11 -9
- package/src/components/atoms/cards/author/template-one/index.js +3 -1
- package/src/components/atoms/cards/author/template-two/index.js +2 -1
- package/src/components/atoms/cards/game-cards/template-five/index.js +10 -10
- package/src/components/atoms/cards/game-cards/template-four/index.js +9 -9
- package/src/components/atoms/cards/game-cards/template-one/index.js +9 -9
- package/src/components/atoms/cards/game-cards/template-three/index.js +10 -10
- package/src/components/atoms/cards/game-cards/template-two/index.js +10 -10
- package/src/components/atoms/cards/operator-card/template-one/index.js +2 -1
- package/src/components/atoms/cards/payment-method/template-one/index.js +6 -5
- package/src/components/atoms/cards/payment-method/template-three/index.js +7 -6
- package/src/components/atoms/cards/popup-card/index.js +7 -6
- package/src/components/atoms/cards/software-provider-card/index.js +4 -3
- package/src/components/atoms/feedback/template-three/index.js +7 -7
- package/src/components/atoms/feedback/template-two/index.js +4 -3
- package/src/components/atoms/ratings-with-comments/index.js +133 -0
- package/src/components/atoms/ratings-with-comments/ratings-with-comments.module.scss +300 -0
- package/src/components/molecules/header/variants/author/assets/portrait/index.js +2 -1
- package/src/components/molecules/header/variants/default/template-two/index.js +5 -5
- package/src/components/molecules/header/variants/operator/template-five/index.js +7 -6
- package/src/components/molecules/header/variants/operator/template-four/index.js +7 -6
- package/src/components/molecules/header/variants/operator/template-three/index.js +6 -5
- package/src/components/molecules/header/variants/payment/template-five/index.js +6 -5
- package/src/components/molecules/header/variants/payment/template-four/index.js +5 -4
- package/src/components/molecules/header/variants/payment/template-one-three/index.js +6 -5
- package/src/components/molecules/header/variants/payment/template-two/index.js +5 -4
- package/src/components/molecules/header/variants/slot/template-one/index.js +4 -3
- package/src/components/molecules/header/variants/slot/template-two/index.js +6 -5
- package/src/components/molecules/operator-details/index.js +8 -7
- package/src/components/molecules/operator-exclusive/index.js +5 -4
- package/src/gatsby-core-theme/components/molecules/module/index.js +2 -0
- package/src/gatsby-core-theme/components/molecules/star-rating/linear-rating.js +56 -0
- package/src/gatsby-core-theme/components/molecules/star-rating/linear-rating.module.scss +43 -0
- package/src/gatsby-core-theme/helpers/server-data.js +2 -2
- package/storybook/public/{232.72a14466.iframe.bundle.js → 232.e2508c7f.iframe.bundle.js} +1 -1
- package/storybook/public/563.a3a067bc.iframe.bundle.js +1 -0
- package/storybook/public/582.f442a86e.iframe.bundle.js +1 -0
- package/storybook/public/604.f5d9235e.iframe.bundle.js +1 -0
- package/storybook/public/679.144f0a65.iframe.bundle.js +1 -0
- package/storybook/public/{912.81fecb1e.iframe.bundle.js → 717.420d37ed.iframe.bundle.js} +4 -4
- package/storybook/public/{912.81fecb1e.iframe.bundle.js.map → 717.420d37ed.iframe.bundle.js.map} +1 -1
- package/storybook/public/776.aa2fb07e.iframe.bundle.js +1 -0
- package/storybook/public/777.a62d8c28.iframe.bundle.js +1 -0
- package/storybook/public/941.a249aa66.iframe.bundle.js +1 -0
- package/storybook/public/942.7deca466.iframe.bundle.js +1 -0
- package/storybook/public/943.ea716a5f.iframe.bundle.js +1 -0
- package/storybook/public/iframe.html +1 -1
- package/storybook/public/main.83872ad4.iframe.bundle.js +1 -0
- package/storybook/public/project.json +1 -1
- package/storybook/public/runtime~main.ab877657.iframe.bundle.js +1 -0
- package/storybook/public/356.e78975c4.iframe.bundle.js +0 -1
- package/storybook/public/46.fb12cf63.iframe.bundle.js +0 -1
- package/storybook/public/563.e1e66d81.iframe.bundle.js +0 -1
- package/storybook/public/604.1ff7045f.iframe.bundle.js +0 -1
- package/storybook/public/617.e002f245.iframe.bundle.js +0 -1
- package/storybook/public/679.4fbb874f.iframe.bundle.js +0 -1
- package/storybook/public/776.71c64a44.iframe.bundle.js +0 -1
- package/storybook/public/777.426e8bf9.iframe.bundle.js +0 -1
- package/storybook/public/909.8b1b8513.iframe.bundle.js +0 -1
- package/storybook/public/942.7a3b5e99.iframe.bundle.js +0 -1
- package/storybook/public/943.3f7c32be.iframe.bundle.js +0 -1
- package/storybook/public/985.9bbba08a.iframe.bundle.js +0 -1
- package/storybook/public/main.750b44a8.iframe.bundle.js +0 -1
- package/storybook/public/runtime~main.dd228fa3.iframe.bundle.js +0 -1
- /package/storybook/public/{912.81fecb1e.iframe.bundle.js.LICENSE.txt → 717.420d37ed.iframe.bundle.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,41 @@
|
|
|
1
|
-
## [53.
|
|
1
|
+
## [53.1.1](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.1.0...v53.1.1) (2025-05-26)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
* update
|
|
7
|
-
* version for beta ([837ea75](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/837ea751bc43a0e1e46e11a1f478009304d04491))
|
|
6
|
+
* update operator card template one ([42ebf97](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/42ebf9780f494c21e208e1143369206a17949a9d))
|
|
8
7
|
|
|
9
8
|
|
|
10
|
-
* Merge branch '
|
|
9
|
+
* Merge branch 'update-operator-card-template-one' into 'master' ([da0743c](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/da0743c03579de7b61848483b65b59bc6c0f8ae9))
|
|
10
|
+
|
|
11
|
+
# [53.1.0](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.0.31...v53.1.0) (2025-05-22)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* alt function alteration ([012fc3c](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/012fc3c8f10e7a4ff2ac85a80775b89a057ad277))
|
|
17
|
+
* hide author default image ([3930e6a](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/3930e6a3c9988208d3f0f1ad3128d4927f4cd681))
|
|
18
|
+
* move linear rating to matrix ([db2e50d](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/db2e50da97c9f9e73da06fff538aabc2a58885d6))
|
|
19
|
+
* tests ([4cbdb44](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/4cbdb44a5289eee162cfd6c2257f905e2fdc2849))
|
|
20
|
+
* tests ([98d7d76](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/98d7d762cffeee17247592ccb7c06395a19391b8))
|
|
21
|
+
* tests ([500971f](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/500971f8bd1161fbb7ff616371d72a6258c3ed88))
|
|
22
|
+
* update component ([7cdf5c8](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/7cdf5c8515bf5293c7422a15f3182358721dbcc0))
|
|
23
|
+
* update components ([5241da8](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/5241da814bd85fd88e6bce38884fb4379180e218))
|
|
24
|
+
* update core version ([feacafc](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/feacafc553f7178bdc711b1f329bd44a1ed0483a))
|
|
25
|
+
* update core version ([670d2eb](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/670d2ebb8905e692ff83cdfd81af95ff23452146))
|
|
26
|
+
* update linear stars component ([0c5a485](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/0c5a48532d7678d9293a4e52d874f49a5097f296))
|
|
27
|
+
* update modules to include rating comments ([77b3c80](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/77b3c80f49f54bbf953faee0dee86072a6dd98f0))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
* Merge branch 'tm-5433-ratings-template-block' into 'master' ([e0d7a5f](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/e0d7a5f5f8f3266471a4917c5b46f6e132d62fbb))
|
|
31
|
+
* Merge branch 'tm-5470-custom-image-alt' into 'master' ([b5242f8](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/b5242f8b3f3f223b2ff711eedf0ccedeaae73a1b))
|
|
32
|
+
* Merge branch 'tm-5468-alt-text-adjustments' into 'master' ([2c89703](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/2c897030cc563909ba1c06e4594c3aa4d3baffda))
|
|
33
|
+
* Merge branch 'tm-5466-author-image' into 'master' ([74faabd](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/74faabdf7d98be70090d61d3e202e6fec1090587))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* update core theme ([d593931](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/d593931d867bde6c1a8c525868fff890a50288c7))
|
|
11
39
|
|
|
12
40
|
## [53.0.31](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.0.30...v53.0.31) (2025-05-15)
|
|
13
41
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "53.
|
|
3
|
+
"version": "53.1.1",
|
|
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.0
|
|
28
|
+
"gatsby-core-theme": "44.1.0",
|
|
29
29
|
"gatsby-plugin-sharp": "^5.11.0",
|
|
30
30
|
"gatsby-transformer-sharp": "^5.11.0",
|
|
31
31
|
"gatsby-plugin-sitemap": "^6.13.1",
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
/* eslint-disable camelcase */
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import LazyImage from '
|
|
6
|
-
import { imagePrettyUrl
|
|
5
|
+
import LazyImage from '~hooks/lazy-image';
|
|
6
|
+
import { imagePrettyUrl } from '~helpers/getters';
|
|
7
|
+
import { getAltText } from '~helpers/image';
|
|
7
8
|
import styles from './author-card.module.scss';
|
|
8
9
|
|
|
9
10
|
const AuthorCard = ({ author, width = 60, height = 60 }) => {
|
|
@@ -33,15 +33,17 @@ const VariableComponent = ({
|
|
|
33
33
|
showAuthorOnOneLine ? styles?.showAuthorOnOneLine || '' : styles?.showAuthorBlock || ''
|
|
34
34
|
} `}
|
|
35
35
|
>
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
{!!author?.image && (
|
|
37
|
+
<div className={styles.authorImages}>
|
|
38
|
+
<LazyImage
|
|
39
|
+
alt={author?.name}
|
|
40
|
+
width={imgSize}
|
|
41
|
+
height={imgSize}
|
|
42
|
+
src={imagePrettyUrl(author?.image, imgSize, imgSize)}
|
|
43
|
+
/>
|
|
44
|
+
{verifyIcon && verifyIcon}
|
|
45
|
+
</div>
|
|
46
|
+
)}
|
|
45
47
|
<div className={styles.authorContainer}>
|
|
46
48
|
{showAuthorOnOneLine && (
|
|
47
49
|
<p>
|
|
@@ -6,7 +6,9 @@ import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
|
6
6
|
import LazyImage from '~hooks/lazy-image';
|
|
7
7
|
import Socials from '../../../author/socials';
|
|
8
8
|
import styles from './template-one.module.scss';
|
|
9
|
-
import { imagePrettyUrl,
|
|
9
|
+
import { imagePrettyUrl, textWordsLimit } from '~helpers/getters';
|
|
10
|
+
import { getAltText } from '~helpers/image';
|
|
11
|
+
|
|
10
12
|
|
|
11
13
|
export default function TemplateOne({ item, width = 72, height = 72 }) {
|
|
12
14
|
const author = item.relation;
|
|
@@ -5,7 +5,8 @@ import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
|
5
5
|
import LazyImage from '~hooks/lazy-image';
|
|
6
6
|
import Socials from '../../../author/socials';
|
|
7
7
|
import styles from './template-two.module.scss';
|
|
8
|
-
import { imagePrettyUrl
|
|
8
|
+
import { imagePrettyUrl } from '~helpers/getters';
|
|
9
|
+
import { getAltText } from '~helpers/image';
|
|
9
10
|
|
|
10
11
|
export default function TemplateTwo({ item, width = 80, height = 80 }) {
|
|
11
12
|
const author = item.relation;
|
|
@@ -3,16 +3,16 @@ import React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import {
|
|
5
5
|
imagePrettyUrl,
|
|
6
|
-
getSectionExtraField
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
6
|
+
getSectionExtraField
|
|
7
|
+
} from '~helpers/getters';
|
|
8
|
+
import Button from '~atoms/button/button';
|
|
9
|
+
import OperatorCta from '~atoms/button/operator-cta';
|
|
10
|
+
import GatsbyImg from '~hooks/gatsby-img';
|
|
11
|
+
import StarRating from '~molecules/star-rating';
|
|
12
|
+
import OneStarRating from '~molecules/star-rating/one-star';
|
|
13
|
+
import Link from '~hooks/link';
|
|
14
|
+
import LazyImage from '~hooks/lazy-image';
|
|
15
|
+
import { getAltText } from '~helpers/image';
|
|
16
16
|
import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
17
17
|
import { TrackingKeys } from '~constants/tracking-api'
|
|
18
18
|
|
|
@@ -4,15 +4,15 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import {
|
|
5
5
|
imagePrettyUrl,
|
|
6
6
|
getSectionExtraField,
|
|
7
|
-
|
|
8
|
-
} from '
|
|
9
|
-
import Button from '
|
|
10
|
-
import OperatorCta from '
|
|
11
|
-
import StarRating from '
|
|
12
|
-
import OneStarRating from '
|
|
13
|
-
import GatsbyImg from '
|
|
14
|
-
import Link from '
|
|
15
|
-
import LazyImage from '
|
|
7
|
+
} from '~helpers/getters';
|
|
8
|
+
import { getAltText } from '~helpers/image';
|
|
9
|
+
import Button from '~atoms/button/button';
|
|
10
|
+
import OperatorCta from '~atoms/button/operator-cta';
|
|
11
|
+
import StarRating from '~molecules/star-rating';
|
|
12
|
+
import OneStarRating from '~molecules/star-rating/one-star';
|
|
13
|
+
import GatsbyImg from '~hooks/gatsby-img';
|
|
14
|
+
import Link from '~hooks/link';
|
|
15
|
+
import LazyImage from '~hooks/lazy-image';
|
|
16
16
|
import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
17
17
|
import { TrackingKeys } from '~constants/tracking-api'
|
|
18
18
|
import styles from './template-four.module.scss';
|
|
@@ -3,15 +3,15 @@ import React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import {
|
|
5
5
|
imagePrettyUrl,
|
|
6
|
-
getSectionExtraField
|
|
7
|
-
|
|
8
|
-
} from '
|
|
9
|
-
import Button from '
|
|
10
|
-
import StarRating from '
|
|
11
|
-
import OperatorCta from '
|
|
12
|
-
import GatsbyImg from '
|
|
13
|
-
import Link from '
|
|
14
|
-
import LazyImage from '
|
|
6
|
+
getSectionExtraField
|
|
7
|
+
} from '~helpers/getters';
|
|
8
|
+
import { getAltText } from '~helpers/image';
|
|
9
|
+
import Button from '~atoms/button/button';
|
|
10
|
+
import StarRating from '~molecules/star-rating/one-star';
|
|
11
|
+
import OperatorCta from '~atoms/button/operator-cta';
|
|
12
|
+
import GatsbyImg from '~hooks/gatsby-img';
|
|
13
|
+
import Link from '~hooks/link';
|
|
14
|
+
import LazyImage from '~hooks/lazy-image';
|
|
15
15
|
import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
16
16
|
import { TrackingKeys } from '~constants/tracking-api';
|
|
17
17
|
import styles from './template-one.module.scss';
|
|
@@ -3,16 +3,16 @@ import React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import {
|
|
5
5
|
imagePrettyUrl,
|
|
6
|
-
getSectionExtraField
|
|
7
|
-
|
|
8
|
-
} from '
|
|
9
|
-
import Button from '
|
|
10
|
-
import StarRating from '
|
|
11
|
-
import OneStarRating from '
|
|
12
|
-
import OperatorCta from '
|
|
13
|
-
import GatsbyImg from '
|
|
14
|
-
import Link from '
|
|
15
|
-
import LazyImage from '
|
|
6
|
+
getSectionExtraField
|
|
7
|
+
} from '~helpers/getters';
|
|
8
|
+
import { getAltText } from '~helpers/image';
|
|
9
|
+
import Button from '~atoms/button/button';
|
|
10
|
+
import StarRating from '~molecules/star-rating';
|
|
11
|
+
import OneStarRating from '~molecules/star-rating/one-star';
|
|
12
|
+
import OperatorCta from '~atoms/button/operator-cta';
|
|
13
|
+
import GatsbyImg from '~hooks/gatsby-img';
|
|
14
|
+
import Link from '~hooks/link';
|
|
15
|
+
import LazyImage from '~hooks/lazy-image';
|
|
16
16
|
import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
17
17
|
import { TrackingKeys } from '~constants/tracking-api'
|
|
18
18
|
import styles from './template-three.module.scss';
|
|
@@ -3,16 +3,16 @@ import React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import {
|
|
5
5
|
imagePrettyUrl,
|
|
6
|
-
getSectionExtraField
|
|
7
|
-
|
|
8
|
-
} from '
|
|
9
|
-
import Button from '
|
|
10
|
-
import OperatorCta from '
|
|
11
|
-
import StarRating from '
|
|
12
|
-
import OneStarRating from '
|
|
13
|
-
import GatsbyImg from '
|
|
14
|
-
import Link from '
|
|
15
|
-
import LazyImage from '
|
|
6
|
+
getSectionExtraField
|
|
7
|
+
} from '~helpers/getters';
|
|
8
|
+
import { getAltText } from '~helpers/image';
|
|
9
|
+
import Button from '~atoms/button/button';
|
|
10
|
+
import OperatorCta from '~atoms/button/operator-cta';
|
|
11
|
+
import StarRating from '~molecules/star-rating';
|
|
12
|
+
import OneStarRating from '~molecules/star-rating/one-star';
|
|
13
|
+
import GatsbyImg from '~hooks/gatsby-img';
|
|
14
|
+
import Link from '~hooks/link';
|
|
15
|
+
import LazyImage from '~hooks/lazy-image';
|
|
16
16
|
import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
17
17
|
import { TrackingKeys } from '~constants/tracking-api'
|
|
18
18
|
import styles from './template-two.module.scss';
|
|
@@ -47,7 +47,7 @@ const TemplateOne = ({
|
|
|
47
47
|
const { relation, path } = item;
|
|
48
48
|
const { name, status, selling_points: sellingPoints } = relation || {};
|
|
49
49
|
const paymentMethods = relation?.deposit_methods;
|
|
50
|
-
const reviewPath = path || relation.path;
|
|
50
|
+
const reviewPath = path || relation.path || item?.relation?.review_link;
|
|
51
51
|
const isInactive = status === 'inactive';
|
|
52
52
|
|
|
53
53
|
return (
|
|
@@ -195,6 +195,7 @@ TemplateOne.propTypes = {
|
|
|
195
195
|
logo: PropTypes.shape({
|
|
196
196
|
filename: PropTypes.string,
|
|
197
197
|
}),
|
|
198
|
+
review_link: PropTypes.string,
|
|
198
199
|
selling_points: PropTypes.arrayOf(PropTypes.string),
|
|
199
200
|
}),
|
|
200
201
|
path: PropTypes.string,
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import Button from 'gatsby-core-theme/src/components/atoms/button/button';
|
|
6
|
-
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
7
|
-
import StarRating from 'gatsby-core-theme/src/components/molecules/star-rating/one-star';
|
|
8
|
-
import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
9
|
-
import { getAltText, imagePrettyUrl, textWordsLimit } from 'gatsby-core-theme/src/helpers/getters';
|
|
10
5
|
import { FaArrowRight } from '@react-icons/all-files/fa/FaArrowRight';
|
|
6
|
+
import Button from '~atoms/button/button';
|
|
7
|
+
import Link from '~hooks/link';
|
|
8
|
+
import StarRating from '~molecules/star-rating/one-star';
|
|
9
|
+
import LazyImage from '~hooks/lazy-image';
|
|
10
|
+
import { imagePrettyUrl, textWordsLimit } from '~helpers/getters';
|
|
11
|
+
import { getAltText } from '~helpers/image';
|
|
11
12
|
import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
12
13
|
import SellingPoints from '../sellingPoints';
|
|
13
14
|
import styles from './template-one.module.scss';
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import Link from 'gatsby-core-theme/src/hooks/link';
|
|
6
|
-
import Button from 'gatsby-core-theme/src/components/atoms/button/button';
|
|
7
|
-
import StarRating from 'gatsby-core-theme/src/components/molecules/star-rating';
|
|
8
|
-
import OneStarRating from 'gatsby-core-theme/src/components/molecules/star-rating/one-star';
|
|
9
|
-
import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
|
|
10
|
-
import { getAltText, imagePrettyUrl } from 'gatsby-core-theme/src/helpers/getters';
|
|
11
5
|
import { FaArrowRight } from '@react-icons/all-files/fa/FaArrowRight';
|
|
6
|
+
import Link from '~hooks/link';
|
|
7
|
+
import Button from '~atoms/button/button';
|
|
8
|
+
import StarRating from '~molecules/star-rating';
|
|
9
|
+
import OneStarRating from '~molecules/star-rating/one-star';
|
|
10
|
+
import LazyImage from '~hooks/lazy-image';
|
|
11
|
+
import { imagePrettyUrl } from '~helpers/getters';
|
|
12
|
+
import { getAltText } from '~helpers/image';
|
|
12
13
|
import SellingPoints from '../sellingPoints';
|
|
13
14
|
import styles from './template-three.module.scss';
|
|
14
15
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import OperatorCta from '
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
4
|
+
import OperatorCta from '~atoms/button/operator-cta';
|
|
5
|
+
import { imagePrettyUrl } from '~helpers/getters';
|
|
6
|
+
import { getAltText } from '~helpers/image';
|
|
7
|
+
import ReviewLink from '~atoms/review-link';
|
|
8
|
+
import Tnc from '~molecules/tnc';
|
|
9
|
+
import StarRating from '~molecules/star-rating';
|
|
10
|
+
import Bonus from '~molecules/bonus-box/template-one';
|
|
10
11
|
import LazyImage from '~hooks/lazy-image';
|
|
11
12
|
import { TrackingKeys } from '~constants/tracking-api'
|
|
12
13
|
import styles from './popup-card.module.scss';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import Link from '
|
|
5
|
-
import LazyImage from '
|
|
6
|
-
import {
|
|
4
|
+
import Link from '~hooks/link';
|
|
5
|
+
import LazyImage from '~hooks/lazy-image';
|
|
6
|
+
import { imagePrettyUrl, textWordsLimit } from '~helpers/getters';
|
|
7
|
+
import { getAltText } from '~helpers/image';
|
|
7
8
|
|
|
8
9
|
import styles from './software-provider-card.module.scss';
|
|
9
10
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { Link } from 'gatsby';
|
|
5
|
-
import { imagePrettyUrl, getAltText } from 'gatsby-core-theme/src/helpers/getters.mjs';
|
|
6
|
-
import { BiLike } from '@react-icons/all-files/bi/BiLike';
|
|
7
5
|
import { BiDislike } from '@react-icons/all-files/bi/BiDislike';
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
6
|
+
import { BiLike } from '@react-icons/all-files/bi/BiLike';
|
|
7
|
+
import { imagePrettyUrl } from '~helpers/getters.mjs';
|
|
8
|
+
import { getAltText } from '~helpers/image';
|
|
9
|
+
import LazyImage from '~hooks/lazy-image';
|
|
10
|
+
import ModalProvider from '~hooks/modal/modalContext';
|
|
11
|
+
import Modal from '~hooks/modal';
|
|
12
|
+
import ModalContent from '~hooks/modal/modal-content';
|
|
13
13
|
import { addVote } from '../../../../services';
|
|
14
14
|
import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
15
15
|
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { Link } from 'gatsby';
|
|
5
|
-
import { imagePrettyUrl, getAltText } from 'gatsby-core-theme/src/helpers/getters.mjs';
|
|
6
|
-
import { BiLike } from '@react-icons/all-files/bi/BiLike';
|
|
7
5
|
import { BiDislike } from '@react-icons/all-files/bi/BiDislike';
|
|
8
|
-
import
|
|
6
|
+
import { BiLike } from '@react-icons/all-files/bi/BiLike';
|
|
7
|
+
import { imagePrettyUrl } from '~helpers/getters.mjs';
|
|
8
|
+
import { getAltText } from '~helpers/image';
|
|
9
|
+
import LazyImage from '~hooks/lazy-image';
|
|
9
10
|
import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
10
11
|
import { addVote } from '../../../../services';
|
|
11
12
|
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { getObjectValue } from 'gatsby-core-theme/src/helpers/getters';
|
|
4
|
+
import keygen from 'gatsby-core-theme/src/helpers/keygen';
|
|
5
|
+
import { FaStar } from '@react-icons/all-files/fa/FaStar';
|
|
6
|
+
import { operatorRatings } from 'gatsby-core-theme/src/constants/ratings-constant';
|
|
7
|
+
import useTranslate from '~hooks/useTranslate/useTranslate';
|
|
8
|
+
import styles from './ratings-with-comments.module.scss';
|
|
9
|
+
import LinearStarRating from '../../../gatsby-core-theme/components/molecules/star-rating/linear-rating';
|
|
10
|
+
|
|
11
|
+
const RatingsWithComments = ({
|
|
12
|
+
page,
|
|
13
|
+
numOfStars = 5,
|
|
14
|
+
templateWithBoxes = false,
|
|
15
|
+
showTitle = true,
|
|
16
|
+
currency = '€',
|
|
17
|
+
showComment = true,
|
|
18
|
+
icon = null,
|
|
19
|
+
iconColor = '#D63B54'
|
|
20
|
+
}) => {
|
|
21
|
+
const { relation: item, type } = page;
|
|
22
|
+
const typeCheck =
|
|
23
|
+
// eslint-disable-next-line no-nested-ternary
|
|
24
|
+
type === 'operator' ? (item?.type === 'casino' ? 'operator' : item?.type) : type;
|
|
25
|
+
|
|
26
|
+
const ratings = operatorRatings[typeCheck] || [];
|
|
27
|
+
|
|
28
|
+
const rangeText = {
|
|
29
|
+
0: useTranslate('range_low', 'Low'),
|
|
30
|
+
1: useTranslate('range_medium', 'Medium'),
|
|
31
|
+
2: useTranslate('range_high', 'High'),
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const ratingsData = operatorRatings.ratingProperties.some((prop) => item[prop])
|
|
35
|
+
? item
|
|
36
|
+
: item?.bonus || item;
|
|
37
|
+
|
|
38
|
+
if (!ratings.length) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const renderRatingItem = (rating) => {
|
|
43
|
+
const { fieldValue, translationKey, fieldLabel, componentToUse } = rating || {};
|
|
44
|
+
let valueDisplayed;
|
|
45
|
+
const value = getObjectValue(ratingsData, fieldValue);
|
|
46
|
+
|
|
47
|
+
// eslint-disable-next-line no-nested-ternary
|
|
48
|
+
const component = showComment ? (
|
|
49
|
+
<LinearStarRating
|
|
50
|
+
numOfStars={numOfStars}
|
|
51
|
+
rating={value}
|
|
52
|
+
icon={icon || <FaStar title="Star Icon" color={iconColor} />}
|
|
53
|
+
/>
|
|
54
|
+
) : componentToUse ? (
|
|
55
|
+
componentToUse(numOfStars, value, currency)
|
|
56
|
+
) : (
|
|
57
|
+
false
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
if (component) {
|
|
61
|
+
valueDisplayed = component || '-';
|
|
62
|
+
} else if (fieldValue.includes('volatility')) {
|
|
63
|
+
valueDisplayed = rangeText[getObjectValue(ratingsData, fieldValue)] || '-';
|
|
64
|
+
} else {
|
|
65
|
+
valueDisplayed = value || '-';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const comment = showComment
|
|
69
|
+
? ratingsData?.rating_comments?.find((entry) => entry?.rating_name === fieldValue)?.comment
|
|
70
|
+
: null;
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<li
|
|
74
|
+
key={keygen()}
|
|
75
|
+
className={`${styles?.item || ''} ${fieldLabel === 'Overall' && styles?.overall}`}
|
|
76
|
+
>
|
|
77
|
+
<p className={styles?.label || ''}>{useTranslate(translationKey, fieldLabel)}</p>
|
|
78
|
+
|
|
79
|
+
<>
|
|
80
|
+
{valueDisplayed}
|
|
81
|
+
{typeof valueDisplayed === 'number' && fieldValue === 'rtp' && '%'}
|
|
82
|
+
{comment && <span className={styles?.comment}>{comment}</span>}
|
|
83
|
+
</>
|
|
84
|
+
</li>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
return (
|
|
88
|
+
<div
|
|
89
|
+
className={`${styles.ratingsContainer} ${templateWithBoxes && styles.ratingWithBoxes} ${
|
|
90
|
+
showComment ? styles.ratingsWithComments : ''
|
|
91
|
+
}`}
|
|
92
|
+
>
|
|
93
|
+
{showTitle ? (
|
|
94
|
+
<div className={styles.withTitle || ''}>
|
|
95
|
+
<h3>{useTranslate('ratings_with_comments_title', 'Ratings')}</h3>
|
|
96
|
+
{ratings
|
|
97
|
+
?.filter((rating) => rating.fieldLabel === 'Overall')
|
|
98
|
+
.map((rating) => renderRatingItem(rating))}
|
|
99
|
+
</div>
|
|
100
|
+
) : (
|
|
101
|
+
ratings
|
|
102
|
+
?.filter((rating) => rating.fieldLabel === 'Overall')
|
|
103
|
+
.map((rating) => renderRatingItem(rating))
|
|
104
|
+
)}
|
|
105
|
+
|
|
106
|
+
{/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}
|
|
107
|
+
<ul className={`${styles?.ratingList || ''}`} tabIndex={0}>
|
|
108
|
+
{ratings
|
|
109
|
+
?.filter((rating) => rating.fieldLabel !== 'Overall')
|
|
110
|
+
.map((rating) => renderRatingItem(rating))}
|
|
111
|
+
</ul>
|
|
112
|
+
</div>
|
|
113
|
+
);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
RatingsWithComments.propTypes = {
|
|
117
|
+
page: PropTypes.shape({
|
|
118
|
+
relation: PropTypes.shape({
|
|
119
|
+
type: PropTypes.string,
|
|
120
|
+
bonus: PropTypes.shape({}),
|
|
121
|
+
}),
|
|
122
|
+
type: PropTypes.shape({}),
|
|
123
|
+
}),
|
|
124
|
+
numOfStars: PropTypes.number,
|
|
125
|
+
templateWithBoxes: PropTypes.bool,
|
|
126
|
+
showTitle: PropTypes.string,
|
|
127
|
+
currency: PropTypes.string,
|
|
128
|
+
showComment: PropTypes.bool,
|
|
129
|
+
icon: PropTypes.element,
|
|
130
|
+
iconColor: PropTypes.string,
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export default RatingsWithComments;
|