gatsby-core-theme 44.6.0 → 44.6.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,23 @@
1
+ ## [44.6.2](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.6.1...v44.6.2) (2025-11-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * process modules to not show IDs if empty ([e7d34f3](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/e7d34f35bf6809bcd9712aa814c07b068f4ca065))
7
+ * process modules to not show IDs if empty ([e73ce00](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/e73ce009f77a39597e30b82dfb75aa26e9a39e2b))
8
+ * sync with main ([ec89a7d](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/ec89a7d785a64d8e1abda98218584192dcaad6fa))
9
+ * sync with main ([5cf9c85](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/5cf9c850b4f1792889f799c59153b5425af228cb))
10
+
11
+
12
+ * Merge branch 'en-205-empty-modules' into 'master' ([5f397c7](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/5f397c7ff6c538082b3426a97bbcc758d9afb206))
13
+
14
+ ## [44.6.1](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.6.0...v44.6.1) (2025-11-05)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * add a helper ([39a2f0a](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/39a2f0a1fae3edb90e2765a1e993378cb7b7052b))
20
+
1
21
  # [44.6.0](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.5.4...v44.6.0) (2025-11-05)
2
22
 
3
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "44.6.0",
3
+ "version": "44.6.2",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -561,3 +561,12 @@ export function setName(string) {
561
561
  (match, p1, p2) => `${p1}${p2}/"`
562
562
  );
563
563
  };
564
+
565
+ export const removeDomain = (url) => {
566
+ try {
567
+ const domainRegex = /^https?:\/\/[^/]+/;
568
+ return url.replace(domainRegex, '');
569
+ } catch (error) {
570
+ return null; // Return null if the URL is invalid
571
+ }
572
+ }
@@ -439,8 +439,7 @@ export function processTopListModule(
439
439
 
440
440
  const reviewLink =
441
441
  process.env.DMS_REVIEW_LINKS_ENABLED === "true"
442
- ? stripDomainAndLeadingSlash(operatorRelation?.review_link) ||
443
- operatorPage[0]?.path
442
+ ? stripDomainAndLeadingSlash(operatorRelation?.review_link)
444
443
  : operatorPage[0]?.path;
445
444
 
446
445
  const authorTitle =
@@ -523,7 +522,7 @@ export function processContentModule(
523
522
  ) {
524
523
  module.value = previewPageID
525
524
  ? module.value
526
- : (content && content[module.value]) || "";
525
+ : (content ? content[module.value] : "") || "";
527
526
 
528
527
  module.value = generatePlaceholderString(
529
528
  module.value,
@@ -534,9 +533,9 @@ export function processContentModule(
534
533
  module.value = trailingSlash(module.value);
535
534
 
536
535
  if (module.show_more_enabled === "1" && module.show_more_content) {
537
- module.show_more_content =
538
- (content && content[module.show_more_content]) ||
539
- module.show_more_content;
536
+ module.show_more_content = content
537
+ ? content[module.show_more_content] || ""
538
+ : module.show_more_content;
540
539
  module.show_more_content = generatePlaceholderString(
541
540
  module.show_more_content,
542
541
  translations,
@@ -559,18 +558,10 @@ export function shouldSavePrefilled(module = {}, siteName) {
559
558
  export function processSpotlightModule(module = {}, content, previewPageID) {
560
559
  module.items.forEach((item) => {
561
560
  item.content = trailingSlash(
562
- previewPageID ? item.content : (
563
- (content &&
564
- content[item.content]
565
- )
566
- ) || ""
561
+ previewPageID ? item.content : (content && content[item.content]) || ""
567
562
  );
568
563
  item.text = trailingSlash(
569
- previewPageID ? item.text : (
570
- (content &&
571
- content[item.text]
572
- )
573
- ) || ""
564
+ previewPageID ? item.text : (content && content[item.text]) || ""
574
565
  );
575
566
  });
576
567
 
@@ -579,7 +570,7 @@ export function processSpotlightModule(module = {}, content, previewPageID) {
579
570
 
580
571
  export function processCarouselModule(module = {}, content) {
581
572
  module.items.forEach((item) => {
582
- item.content = (content && content[item.content]) || item.content;
573
+ item.content = content ? content[item.content] : item.content;
583
574
  });
584
575
  return module;
585
576
  }
@@ -590,27 +581,28 @@ export function processFaq(module = {}, content, relationData, previewPageID) {
590
581
  // eslint-disable-next-line array-callback-return
591
582
  module.items.map((item) => {
592
583
  item.question = trailingSlash(
593
- previewPageID ? generatePlaceholderString(item.question, null, relationData) : (
594
- (content &&
595
- generatePlaceholderString(
596
- content[item.question],
597
- null,
598
- relationData
599
- ))
600
- ) ||
601
- item.question
584
+ previewPageID
585
+ ? generatePlaceholderString(item.question, null, relationData)
586
+ : (content
587
+ ? generatePlaceholderString(
588
+ content[item.question],
589
+ null,
590
+ relationData
591
+ )
592
+ : "") || ""
602
593
  );
603
594
  item.answer = trailingSlash(
604
- previewPageID ? generatePlaceholderString(item.answer, null, relationData) : (
605
- (content &&
606
- generatePlaceholderString(
607
- content[item.answer],
608
- null,
609
- relationData
610
- ))
611
- ) ||
612
- item.answer
595
+ previewPageID
596
+ ? generatePlaceholderString(item.answer, null, relationData)
597
+ : (content &&
598
+ generatePlaceholderString(
599
+ content[item.answer],
600
+ null,
601
+ relationData
602
+ )) ||
603
+ ""
613
604
  );
605
+ item.answer = trailingSlash(content ? content[item.answer] : "");
614
606
  });
615
607
  }
616
608