gatsby-core-theme 19.0.0 → 20.0.0

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,45 @@
1
+ # [20.0.0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v19.0.1...v20.0.0) (2023-04-10)
2
+
3
+
4
+ ### Code Refactoring
5
+
6
+ * add sample feedback for testing purposes ([98b77b5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/98b77b52886a4e000e7a137024adae0006c8cf4d))
7
+ * correction to get decimal points in star rating ([aa3ce38](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/aa3ce381fd4ed9e9cf34eaa1365983d27dee7022))
8
+ * set rating for testing ([f152e4a](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f152e4acdaec81a2ac3ecaffb44a33fa7ec8c5ed))
9
+ * show/hide decimal points on ratings, pick likes/dislikes per operator ([a710c32](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a710c324d0a5263cd7e206afbdab8edccb55c7c3))
10
+ * update author box expertise icon height and width for W3 validator ([a076c1a](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a076c1a322fccdbdacdd98109f16bdf14cc6d745))
11
+ * update cta buttons inactive a to div and add default href for W3 validator ([dc1a96c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/dc1a96c9cb1926d8ae6893c6a779506917225749))
12
+ * update faq modile span to div for W3 validator ([3e45bea](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3e45bea071d7689329673b5beeec8f3759e3131e))
13
+ * update faq module div to span for W3 validator ([ee8cefe](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ee8cefe74cbebdbd34a32da6e61c81a1cc8c44d5))
14
+ * update toplist default row anchor hrefs for W3 validator ([36b2d0b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/36b2d0b54d704b7885c77e378c11f44338857c5f))
15
+
16
+
17
+ * Merge branch 'tm-3309-operator-cards' into 'master' ([65092ce](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/65092cec3d1d6bc62e6cb5253953bd2707fe448d))
18
+ * Merge branch 'master' into tm-3309-operator-cards ([1b5aafc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1b5aafcb45e3fdb2d47305b8b6eee2e50d6da077))
19
+ * Merge branch 'tm-3386-w3-validator-fixes' into 'master' ([10ebb3b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/10ebb3ba65aacd7bf22c8815d02f68dddde1ae1a))
20
+
21
+ ## [19.0.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v19.0.0...v19.0.1) (2023-04-03)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * prefilled modules bug ([abebf3e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/abebf3e1becbeef1087369f3e6341af5fdae2283))
27
+
28
+
29
+ ### Code Refactoring
30
+
31
+ * add rating text in element ([67790ef](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/67790ef8bb8ef34d12a462c7d48630984be1f058))
32
+ * correction to avoid empty div ([39f564e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/39f564ef9f4d9ee8ba4684f74a763d62f84c48c1))
33
+ * correction to bonus ([d9315e5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/d9315e5d3852979eaade04a530bb430935d5b04f))
34
+ * update settings site name for IL ([c7dbe66](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c7dbe669809dec9ebd374980dfe552a9cc624f29))
35
+ * update settings site name for IL ([7b253e9](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/7b253e9b14eac1115de0ccd1edeba751bab1f0b8))
36
+
37
+
38
+ * Merge branch 'tm-3309-operator-cards' into 'master' ([dc92bfc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/dc92bfcc4042afd560a146142bf0276adfcfa7cf))
39
+ * Merge branch 'master' into tm-3309-operator-cards ([0531f69](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/0531f69b2268853690769dc454e7c830e354af83))
40
+ * Merge branch 'tm-3310-add-slot-cards' into 'master' ([209051b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/209051b91ad808ed91161c260ab9a9693f2fbb74))
41
+ * Merge branch 'master' into 'tm-3310-add-slot-cards' ([cbe5a69](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/cbe5a696d87f67b48aa20d586f07e35158c60318))
42
+
1
43
  # [19.0.0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v18.0.28...v19.0.0) (2023-04-03)
2
44
 
3
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "19.0.0",
3
+ "version": "20.0.0",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "main": "index.js",
6
6
  "GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
@@ -147,13 +147,7 @@ export default function AuthorBox({
147
147
  {author?.expertise.map((item, index) => (
148
148
  // eslint-disable-next-line react/no-array-index-key
149
149
  <li key={index} className={styles.expertiseItem}>
150
- <img
151
- className={styles.check}
152
- src={check}
153
- alt="check"
154
- width="10px"
155
- height="8px"
156
- />
150
+ <img className={styles.check} src={check} alt="check" width={10} height={8} />
157
151
  {item}
158
152
  </li>
159
153
  ))}
@@ -27,7 +27,7 @@
27
27
  @include flex-align (center, center);
28
28
  margin-right: 0.5rem;
29
29
  }
30
- > span{
30
+ > div{
31
31
  display: block;
32
32
  margin: 0;
33
33
  margin-right: 2rem;
@@ -68,7 +68,7 @@ const Faq = ({ module, closeAll = false, openItem, closeOthers = false, icon = '
68
68
  >
69
69
  <span className={styles.icon}>
70
70
  {icon && <span className={styles.circle}>{icon} </span>}
71
- <span dangerouslySetInnerHTML={{ __html: item.question }} />
71
+ <div dangerouslySetInnerHTML={{ __html: item.question }} />
72
72
  </span>
73
73
  </button>
74
74
  <div
@@ -30,7 +30,7 @@ export default function OperatorCta({
30
30
  : translate(translations, 'closed_casino', closedCasinoText);
31
31
 
32
32
  return (
33
- <a
33
+ <div
34
34
  title={translateBtn}
35
35
  aria-label={translateBtn}
36
36
  className={`${
@@ -38,7 +38,7 @@ export default function OperatorCta({
38
38
  } ${gtmClass} operator-cta-gtm`}
39
39
  >
40
40
  {translateBtn}
41
- </a>
41
+ </div>
42
42
  );
43
43
  }
44
44
 
@@ -47,7 +47,7 @@ export default function OperatorCta({
47
47
  const translateBtn = translate(translations, translationKey, playText);
48
48
  return (
49
49
  <Button
50
- to={prettyLink}
50
+ to={prettyLink || '#'}
51
51
  btnText={translateBtn}
52
52
  isInternalLink={false}
53
53
  gtmClass={`${gtmClass} operator-cta-gtm btn-cta`}
@@ -39,18 +39,27 @@ const OperatorCtaButton = ({
39
39
  buttonSize ? styles[`${buttonSize}_size`] : ''
40
40
  } `;
41
41
 
42
- return (
42
+ return status === 'active' ? (
43
43
  <a
44
- {...(status === 'active' ? { href: prettyLink } : {})}
44
+ href={prettyLink || '#'}
45
45
  title={typeof translateBtn === 'string' ? translateBtn : ''}
46
46
  aria-label={typeof translateBtn === 'string' ? translateBtn : ''}
47
47
  className={`${classes} ${gtmClass}`}
48
- {...(status === 'active' ? { target: '_blank' } : {})}
49
- {...(status === 'active' ? { rel: 'nofollow noreferrer' } : {})}
48
+ target="_blank"
49
+ rel="nofollow noreferrer"
50
50
  >
51
51
  {translateBtn}
52
52
  {icon && icon}
53
53
  </a>
54
+ ) : (
55
+ <div
56
+ title={typeof translateBtn === 'string' ? translateBtn : ''}
57
+ aria-label={typeof translateBtn === 'string' ? translateBtn : ''}
58
+ className={`${classes} ${gtmClass}`}
59
+ >
60
+ {translateBtn}
61
+ {icon && icon}
62
+ </div>
54
63
  );
55
64
  };
56
65
 
@@ -6,14 +6,21 @@ import { translate } from '~helpers/getters';
6
6
 
7
7
  import styles from './one-star.module.scss';
8
8
 
9
- const OneStar = ({ rating, numOfStars = 5, active = true, showLabel = false, icon = false }) => {
9
+ const OneStar = ({
10
+ rating,
11
+ numOfStars = 5,
12
+ active = true,
13
+ showLabel = false,
14
+ icon = false,
15
+ showDecimal = false,
16
+ }) => {
10
17
  const { translations } = useContext(Context) || {};
11
18
 
12
19
  return (
13
20
  <div className={`${styles.starRatingContainer} ${!active && styles.inactive}`}>
14
- {showLabel && translate(translations, 'rating', 'Rating')}
21
+ {showLabel && <span>{translate(translations, 'rating', 'Rating:')}</span>}
15
22
  {!icon ? <span className={styles.fullStar} /> : icon}
16
- {getRating(rating)}
23
+ {showDecimal ? getRating(rating).toFixed(1) : getRating(rating)}
17
24
  <span>/</span>
18
25
  <span>{numOfStars}</span>
19
26
  </div>
@@ -26,6 +33,7 @@ OneStar.propTypes = {
26
33
  active: PropTypes.bool,
27
34
  showLabel: PropTypes.bool,
28
35
  icon: PropTypes.bool,
36
+ showDecimal: PropTypes.bool,
29
37
  };
30
38
 
31
39
  export default OneStar;
@@ -23,7 +23,7 @@ const Row = ({
23
23
  className,
24
24
  }) => {
25
25
  const prettyLink = prettyTracker(item, 'main', false, pageTemplate);
26
- const itemRating = item.rating;
26
+ // const itemRating = item.rating;
27
27
  const reviewPath = item.review_link ? `/${item.review_link}` : item.path || '/';
28
28
 
29
29
  const imageObject = item?.standardised_logo_url_object || item?.logo_url_object;
@@ -43,7 +43,7 @@ const Row = ({
43
43
  {item.ribbons && item.ribbons.map((ribbon) => <span>{ribbon}</span>)}
44
44
  </div>
45
45
  <a
46
- href={prettyLink}
46
+ href={prettyLink || '#'}
47
47
  title={item.name}
48
48
  className={`casinos-top-list-gtm logo-cta ${styles.logo}`}
49
49
  target="_blank"
@@ -58,7 +58,7 @@ const Row = ({
58
58
  />
59
59
  </a>
60
60
  <a
61
- href={prettyLink}
61
+ href={prettyLink || '#'}
62
62
  target="_blank"
63
63
  rel="noreferrer"
64
64
  className="toplist-variant-one-gtm bonus-cta"
@@ -10,6 +10,8 @@ export const pickPageKeys = [
10
10
  'banner',
11
11
  'sections',
12
12
  'description',
13
+ 'true_votes',
14
+ 'false_votes',
13
15
  ];
14
16
 
15
17
  export const topListPickKeys = [
@@ -21,16 +21,16 @@ export default {
21
21
  keep_page_extra_fields: {
22
22
  operator: {
23
23
  'norskespilleautomater.com': true, // needed for inoperative / placeholder fields
24
- 'Irishluck.ie': true, // needed for card background image
24
+ 'irishluck.ie': true, // needed for card background image
25
25
  'playcasino.co.za': true,
26
26
  },
27
27
  article: {
28
- 'Irishluck.ie': true, // needed for card background image
28
+ 'irishluck.ie': true, // needed for card background image
29
29
  'norskespilleautomater.com': true,
30
30
  'playcasino.co.za': true,
31
31
  },
32
32
  game: {
33
- 'Irishluck.ie': true, // needed for card background image
33
+ 'irishluck.ie': true, // needed for card background image
34
34
  'norskespilleautomater.com': true,
35
35
  'playcasino.co.za': true,
36
36
  },
@@ -81,6 +81,7 @@ export function clonePageForCards(item, style) {
81
81
  style !== 'comparison_table' &&
82
82
  style !== 'template_one' &&
83
83
  style !== 'template_two' &&
84
+ object.relation &&
84
85
  object.relation.bonus
85
86
  ) {
86
87
  delete object.relation.bonus.deposit_methods;
@@ -370,6 +370,8 @@ export default {
370
370
  processSearchData(searchData, fs);
371
371
  }
372
372
 
373
+ pagesCloned = cloneDeep(transformedPages[market]);
374
+
373
375
  // fill market sections
374
376
  if (data.market_sections[market]) {
375
377
  data.market_sections[market] = processSections(
@@ -380,8 +382,6 @@ export default {
380
382
  );
381
383
  }
382
384
 
383
- pagesCloned = cloneDeep(transformedPages[market]);
384
-
385
385
  // fill page sections
386
386
  if (transformedPages[market]) {
387
387
  Object.keys(transformedPages[market]).forEach((pageType) => {
@@ -166,6 +166,8 @@ export function getSampleOperatorCards(type) {
166
166
  {
167
167
  path: '/wildz',
168
168
  title: 'wildz',
169
+ true_votes: 134,
170
+ false_votes: 20,
169
171
  relation: {
170
172
  market: 'ie_en',
171
173
  name: 'Wildz Casino',
@@ -416,7 +418,7 @@ export function getSampleOperatorCards(type) {
416
418
  },
417
419
  ],
418
420
  },
419
- rating: '4.8',
421
+ rating: '4.4',
420
422
  rating_bonuses: '4.9',
421
423
  rating_casino: '4.8',
422
424
  rating_customer: '4.8',