gatsby-matrix-theme 53.1.0 → 53.1.2

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 CHANGED
@@ -1,3 +1,27 @@
1
+ ## [53.1.2](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.1.1...v53.1.2) (2025-05-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * align head function from core ([066b8ef](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/066b8efddaea3890374ffbde73cb1392d7e43f87))
7
+ * remove the tests for function that moved in core ([8ca5946](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/8ca59462ccf14feea5ab065efe9c52249e3bd076))
8
+ * update core theme ([5804388](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/5804388a8b3c24d5e0482d0d6bf688da7145cdc0))
9
+ * update linear rating ([746437e](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/746437e4d20b42699f2cca1ecd23cdc271a21306))
10
+
11
+
12
+ * Merge branch 'tm-5212-head' into 'master' ([f50dc85](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/f50dc8502dc51ff9bd7c9052f5d939850cf11ce2))
13
+ * Merge branch 'tm-5433-ratings-template-block' into 'master' ([bf479bf](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/bf479bf208164c92e6050586d26d5202ad8c78a9))
14
+
15
+ ## [53.1.1](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.1.0...v53.1.1) (2025-05-26)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * update operator card template one ([42ebf97](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/42ebf9780f494c21e208e1143369206a17949a9d))
21
+
22
+
23
+ * Merge branch 'update-operator-card-template-one' into 'master' ([da0743c](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/da0743c03579de7b61848483b65b59bc6c0f8ae9))
24
+
1
25
  # [53.1.0](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.0.31...v53.1.0) (2025-05-22)
2
26
 
3
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "53.1.0",
3
+ "version": "53.1.2",
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.1.0",
28
+ "gatsby-core-theme": "44.1.1",
29
29
  "gatsby-plugin-sharp": "^5.11.0",
30
30
  "gatsby-transformer-sharp": "^5.11.0",
31
31
  "gatsby-plugin-sitemap": "^6.13.1",
@@ -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,
@@ -51,7 +51,6 @@
51
51
 
52
52
  .ratingList {
53
53
  display: grid;
54
- grid-template-rows: repeat(3, 1fr);
55
54
  width: 100%;
56
55
  gap: 1.6rem 2.2rem;
57
56
  background: #f1f5f9;
@@ -14,11 +14,12 @@ const LinearStarRating = ({
14
14
  showRatingText = true,
15
15
  showDecimal = false,
16
16
  showRoundedRating = false,
17
+ showTotal=false
17
18
  }) => {
18
19
  // Calculate the percentage for the bar fill based on the rating and numOfStars
19
20
  const calculatedRating = getRating(rating, showRoundedRating);
20
21
  const percentage = calculatedRating ? ((calculatedRating / numOfStars) * 100) : 0;
21
-
22
+
22
23
  return (
23
24
  <div className={`${styles.starRatingContainer || ''} ${!active && (styles.inactive || '')}`}>
24
25
  {showLabel && <span>{useTranslate('rating', 'Rating:')}</span>}
@@ -28,14 +29,18 @@ const LinearStarRating = ({
28
29
  style={{
29
30
  width: `${percentage}%`,
30
31
  }}
31
- />
32
+ />
32
33
  </div>
33
34
  {showRatingText && (
34
35
  <div className={styles.ratingText}>
35
36
  {icon && icon}
36
37
  {showDecimal ? calculatedRating.toFixed(1) : calculatedRating}
37
- <span>/</span>
38
- <span>{numOfStars}</span>
38
+ {showTotal && (
39
+ <>
40
+ <span>/</span>
41
+ <span>{numOfStars}</span>
42
+ </>
43
+ )}
39
44
  </div>
40
45
  )}
41
46
  </div>
@@ -51,6 +56,7 @@ LinearStarRating.propTypes = {
51
56
  showDecimal: PropTypes.bool,
52
57
  showRoundedRating: PropTypes.bool,
53
58
  showRatingText: PropTypes.bool,
59
+ showTotal: PropTypes.bool,
54
60
  };
55
61
 
56
62
  export default LinearStarRating;
@@ -1,6 +1,3 @@
1
- import { generatePlaceholderString } from 'gatsby-core-theme/src/helpers/generators';
2
- import { getBonus } from '~helpers/getters';
3
-
4
1
  export function capitalize(string) {
5
2
  return string.replace(/^\w/, (c) => c.toUpperCase());
6
3
  }
@@ -35,17 +32,7 @@ export function truncateString(str, num, dots = '...') {
35
32
  return `${trimmedString}${dots}`;
36
33
  }
37
34
 
38
- export function getTwitterUsername(url) {
39
- // eslint-disable-next-line no-useless-escape
40
- const regex = /https?:\/\/(www\.)?twitter\.com\/(#!\/)?@?([^\/]*)/;
41
- const m = regex.exec(url);
42
-
43
- if (m !== null && m.length >= 3) {
44
- return m[3];
45
- }
46
35
 
47
- return null;
48
- }
49
36
 
50
37
  export const getLaunchDate = (foundedDate) => {
51
38
  if (foundedDate) {
@@ -60,19 +47,6 @@ export const getLaunchDate = (foundedDate) => {
60
47
 
61
48
  export const removeSymbols = (string) => string.replace(/[!?@£#$%^&*():;"'|/.,~`]/g, '');
62
49
 
63
- export function transformMetaTitle(relation, metaTitle, type) {
64
- if (type !== 'operator') return metaTitle;
65
-
66
- switch (metaTitle) {
67
- case '[OPERATOR_REVIEW_META_TITLE]':
68
- return `${relation.name} ${generatePlaceholderString('[YEAR]')} ${
69
- getBonus('main', relation).one_liner
70
- }`;
71
- default:
72
- return metaTitle;
73
- }
74
- }
75
-
76
50
  const monthNames = [
77
51
  'January',
78
52
  'February',
@@ -1,12 +1,10 @@
1
- import { singleToplistData } from 'gatsby-core-theme/tests/factories/modules/toplist.factory';
1
+ /* eslint-disable no-restricted-syntax */
2
2
  import {
3
3
  capitalize,
4
4
  anchorLink,
5
5
  leftTrim,
6
6
  truncateString,
7
- getTwitterUsername,
8
7
  getLaunchDate,
9
- transformMetaTitle,
10
8
  getDate,
11
9
  } from './strings';
12
10
 
@@ -31,31 +29,9 @@ describe('String helper component', () => {
31
29
  test('If the string is smaller than the number just return the string', () => {
32
30
  expect(truncateString('cut', 6)).toBe('cut');
33
31
  });
34
- test('Twitter helper', () => {
35
- expect(getTwitterUsername('https://twitter.com/LebronJames')).toBe('LebronJames');
36
- });
37
32
  test('Launch Date', () => {
38
33
  expect(getLaunchDate('2022-03-05')).toBe('2022');
39
34
  });
40
- test('Meta title data automatic', () => {
41
- const today = new Date();
42
-
43
- expect(
44
- transformMetaTitle(
45
- singleToplistData.items[0].items[0],
46
- '[OPERATOR_REVIEW_META_TITLE]',
47
- 'operator'
48
- )
49
- ).toBe(`Slotum ${today.getFullYear()} 90% Bonus + 50 free spins`);
50
- });
51
- test('Meta title operator', () => {
52
- expect(transformMetaTitle(singleToplistData.items[0].items[0], 'Casino', 'operator')).toBe(
53
- 'Casino'
54
- );
55
- });
56
- test('Meta title other types', () => {
57
- expect(transformMetaTitle(singleToplistData.items[0].items[0], 'Page', 'page')).toBe('Page');
58
- });
59
35
 
60
36
  test('Get date', () => {
61
37
  expect(getDate()).toBeTruthy();