gatsby-core-theme 44.22.1 → 44.22.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,13 @@
1
+ ## [44.22.2](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.22.1...v44.22.2) (2026-04-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * mapped spotlight mode sports_odds ([e8d5757](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/e8d575769e213645f7b0096589b7297c93f63d24))
7
+
8
+
9
+ * Merge branch 'EN-497-Enable-new-spotlight-mode' into 'master' ([0e1f54d](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/0e1f54d2b36cf678fbbad1199c041d7996624d73))
10
+
1
11
  ## [44.22.1](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.22.0...v44.22.1) (2026-04-21)
2
12
 
3
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "44.22.1",
3
+ "version": "44.22.2",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -387,7 +387,7 @@ export function processTopListModule(
387
387
  const itemsCount = +listItem.num_items_initial_load;
388
388
  const toplistItem = toplists && listItem.id
389
389
  ? toplists[listItem.id.toString()] ||
390
- toplists[`g_${listItem.id.toString()}`]
390
+ toplists[`g_${listItem.id.toString()}`]
391
391
  : undefined;
392
392
  if (toplistItem) {
393
393
  listItem.market = toplistItem.market?.short_code;
@@ -413,24 +413,24 @@ export function processTopListModule(
413
413
  // build top list
414
414
  listItem.items = listItem.items
415
415
  ? listItem.items
416
- .filter(
417
- (item) =>
418
- Object.values(relations.operator).find(
419
- (operator) =>
420
- operator.operator_id === item.operator_id &&
421
- operator.market === listItem.market &&
422
- type === operator.type
423
- ) ||
424
- Object.values(relations.game).find(
425
- (game) => game.game_id === item.game_id
426
- )
427
- )
428
- .map((item) => {
429
- if (item.operator_id) return processOperatorToplist(item, ctx);
430
- if (item.game_id) return processGameToplist(item, ctx);
431
- return null;
432
- })
433
- .filter(Boolean)
416
+ .filter(
417
+ (item) =>
418
+ Object.values(relations.operator).find(
419
+ (operator) =>
420
+ operator.operator_id === item.operator_id &&
421
+ operator.market === listItem.market &&
422
+ type === operator.type
423
+ ) ||
424
+ Object.values(relations.game).find(
425
+ (game) => game.game_id === item.game_id
426
+ )
427
+ )
428
+ .map((item) => {
429
+ if (item.operator_id) return processOperatorToplist(item, ctx);
430
+ if (item.game_id) return processGameToplist(item, ctx);
431
+ return null;
432
+ })
433
+ .filter(Boolean)
434
434
  : [];
435
435
  const latestItems = listItem.items
436
436
  .map((toplist) => ({
@@ -456,10 +456,10 @@ export function processTopListModule(
456
456
  // eslint-disable-next-line no-restricted-globals
457
457
  latestUpdatedDate instanceof Date && !isNaN(latestUpdatedDate)
458
458
  ? new Intl.DateTimeFormat("en-US", {
459
- year: "numeric",
460
- month: "long",
461
- day: "numeric",
462
- }).format(latestUpdatedDate)
459
+ year: "numeric",
460
+ month: "long",
461
+ day: "numeric",
462
+ }).format(latestUpdatedDate)
463
463
  : null;
464
464
 
465
465
  listItem.latest_items = formattedLatestItems;
@@ -513,15 +513,22 @@ export function shouldSavePrefilled(module = {}, siteName) {
513
513
  );
514
514
  }
515
515
 
516
- export function processSpotlightModule(module = {}, content, previewPageID) {
517
- module.items.forEach((item) => {
518
- item.content = trailingSlash(
519
- previewPageID ? item.content : (content && content[item.content]) || ""
520
- );
521
- item.text = trailingSlash(
522
- previewPageID ? item.text : (content && content[item.text]) || "",
523
- );
524
- });
516
+ export function processSpotlightModule(module = {}, content, relations, ribbons, previewPageID) {
517
+ if (module.mode === "sport_odds") {
518
+ module.items.forEach((item) => {
519
+ item.relation = relations?.[item.page.relation_id];
520
+ item.page.ribbons = item.page.ribbon_ids.map((id) => ribbons?.[id]);
521
+ });
522
+ } else {
523
+ module.items.forEach((item) => {
524
+ item.content = trailingSlash(
525
+ previewPageID ? item.content : (content && content[item.content]) || ""
526
+ );
527
+ item.text = trailingSlash(
528
+ previewPageID ? item.text : (content && content[item.text]) || "",
529
+ );
530
+ });
531
+ }
525
532
 
526
533
  return module;
527
534
  }
@@ -542,23 +549,23 @@ export function processFaq(module = {}, content, relationData, previewPageID) {
542
549
  previewPageID
543
550
  ? generatePlaceholderString(item.question, null, relationData)
544
551
  : (content
545
- ? generatePlaceholderString(
546
- content[item.question],
547
- null,
548
- relationData
549
- )
550
- : "") || ""
552
+ ? generatePlaceholderString(
553
+ content[item.question],
554
+ null,
555
+ relationData
556
+ )
557
+ : "") || ""
551
558
  );
552
559
  item.answer = trailingSlash(
553
560
  previewPageID
554
561
  ? generatePlaceholderString(item.answer, null, relationData)
555
562
  : (content &&
556
- generatePlaceholderString(
557
- content[item.answer],
558
- null,
559
- relationData
560
- )) ||
561
- ""
563
+ generatePlaceholderString(
564
+ content[item.answer],
565
+ null,
566
+ relationData
567
+ )) ||
568
+ ""
562
569
  );
563
570
  });
564
571
  }
@@ -599,13 +606,14 @@ export function processModule(
599
606
  prefilledMarketModules,
600
607
  previewPageID
601
608
  ) {
609
+
602
610
  module.module_title =
603
611
  module.module_title &&
604
612
  generatePlaceholderString(module.module_title, translations, relationData);
605
613
  module.title =
606
614
  module.title &&
607
615
  generatePlaceholderString(module.title, translations, relationData);
608
-
616
+
609
617
  module.anchor_slug =
610
618
  module.anchor_slug &&
611
619
  generatePlaceholderString(module.anchor_slug, translations, relationData);
@@ -616,7 +624,7 @@ export function processModule(
616
624
  module.module_introduction,
617
625
  translations,
618
626
  relationData,
619
- );
627
+ );
620
628
 
621
629
  // See more link
622
630
  if (
@@ -663,7 +671,7 @@ export function processModule(
663
671
  } else if (module.name === "anchor") {
664
672
  processAnchor(module, relationData, translations);
665
673
  } else if (module.name === "spotlights") {
666
- processSpotlightModule(module, content, previewPageID);
674
+ processSpotlightModule(module, content, relations?.operator, data?.ribbons, previewPageID);
667
675
  } else if (module.name === "menu" && menus && menus[module.menu_id]) {
668
676
  module = Object.assign(module, menus[module.menu_id]);
669
677
  } else if (module.name === "statistics_counter") {