gatsby-core-theme 44.18.4 → 44.19.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 +18 -0
- package/gatsby-node.mjs +1 -17
- package/package.json +1 -1
- package/src/constants/generators.mjs +1 -1
- package/src/constants/pick-keys.mjs +7 -1
- package/src/helpers/generators.mjs +6 -22
- package/src/resolver/index.mjs +7 -14
- package/src/resolver/modules.mjs +17 -34
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
# [44.19.0](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.18.4...v44.19.0) (2026-03-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* leave checker ([8f8a9f6](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/8f8a9f69df30561c89d4eab10645fc2bdceef72a))
|
|
7
|
+
* remove prop ([d2e9f5e](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/d2e9f5e9a08017947066779ae2d6c4a37f3484aa))
|
|
8
|
+
* revert logic ([997b4bc](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/997b4bc0c73ebad86f295197e466b05067a792eb))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
* Merge branch 'master' of gitlab.com:g2m-gentoo/team-floyd/themes/gatsby-themes ([1558c40](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/1558c4036db0bf8a046095291e96232f0b64f145))
|
|
12
|
+
* Merge branch 'en-221-rewert-logic' into 'master' ([64ddf44](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/64ddf4484ec095b7100633a0bf47c88d3bcca21f))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* add operator relation fields ([1a8f4b9](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/1a8f4b9735fbb420a80c182ae921467d0ca0fe1f))
|
|
18
|
+
|
|
1
19
|
## [44.18.4](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.18.3...v44.18.4) (2026-03-18)
|
|
2
20
|
|
|
3
21
|
|
package/gatsby-node.mjs
CHANGED
|
@@ -76,21 +76,6 @@ export const createPages = async (
|
|
|
76
76
|
preconnectLinks = themeOptions.preconnectLinks || [];
|
|
77
77
|
console.log(chalk.magenta("info") + chalk.whiteBright(" starting processor"));
|
|
78
78
|
|
|
79
|
-
const includeAllOperators = process.env.ENABLE_SHORT_CODES_OPERATOR;
|
|
80
|
-
const operatorsByShortName = includeAllOperators
|
|
81
|
-
? Object.values(operatorData || {}).reduce((acc, operator) => {
|
|
82
|
-
if (operator?.short_name) {
|
|
83
|
-
acc[operator.short_name.toLowerCase()] = {
|
|
84
|
-
min_deposit: operator.min_deposit,
|
|
85
|
-
max_deposit: operator.max_deposit,
|
|
86
|
-
min_withdrawal: operator.min_withdrawal,
|
|
87
|
-
max_withdrawal: operator.max_withdrawal,
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
return acc;
|
|
91
|
-
}, {})
|
|
92
|
-
: {};
|
|
93
|
-
|
|
94
79
|
// add data to modules
|
|
95
80
|
const processed = processor.run(
|
|
96
81
|
{
|
|
@@ -102,7 +87,6 @@ export const createPages = async (
|
|
|
102
87
|
toplists: toplistData,
|
|
103
88
|
content: contentData,
|
|
104
89
|
ribbons: ribbonsData,
|
|
105
|
-
...(includeAllOperators && { operators: operatorsByShortName }),
|
|
106
90
|
relations: {
|
|
107
91
|
operator: operatorData,
|
|
108
92
|
payment_method: paymentData,
|
|
@@ -118,7 +102,7 @@ export const createPages = async (
|
|
|
118
102
|
},
|
|
119
103
|
themeOptions,
|
|
120
104
|
fs,
|
|
121
|
-
translationsData
|
|
105
|
+
translationsData
|
|
122
106
|
);
|
|
123
107
|
pages = processed.pages;
|
|
124
108
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { months } from "./common.mjs";
|
|
2
2
|
|
|
3
3
|
const generatorsPlaceholderRegex =
|
|
4
|
-
/\[
|
|
4
|
+
/\[MONTH\]|\[YEAR\]|\[currentyear\]|\[sitename\]|\[currentmonth\]|\[title\]|\[currentdate\]|\[operator_name]|\[author_name]|\[link\]/gi;
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
const generatorsPlaceholderReplaceObject = (
|
|
@@ -136,7 +136,13 @@ export const pickRelationKeys = {
|
|
|
136
136
|
'best_game',
|
|
137
137
|
'rating_comments',
|
|
138
138
|
'toplist_bonus',
|
|
139
|
-
'toplist_item_tracker_name'
|
|
139
|
+
'toplist_item_tracker_name',
|
|
140
|
+
'odds_types',
|
|
141
|
+
'odds_provider',
|
|
142
|
+
'live_streaming',
|
|
143
|
+
'sport_competitions_ids',
|
|
144
|
+
'betting_types',
|
|
145
|
+
'betting_features'
|
|
140
146
|
],
|
|
141
147
|
operator_simplified: [
|
|
142
148
|
"short_name",
|
|
@@ -43,40 +43,24 @@ export function generateTrackerLink(operator, trackerType, provider = false) {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export function generatePlaceholderString(
|
|
47
|
-
string = "",
|
|
48
|
-
translations,
|
|
49
|
-
data,
|
|
50
|
-
operators,
|
|
51
|
-
) {
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
export function generatePlaceholderString(string = "", translations, data) {
|
|
54
47
|
const date = new Date();
|
|
55
48
|
const day = String(date.getDate()).padStart(2, "0");
|
|
56
49
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
57
50
|
const year = date.getFullYear();
|
|
58
51
|
const regex = generatorsConstant.generatorsPlaceholderRegex;
|
|
59
52
|
|
|
60
|
-
return string?.replace(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const [operatorKey, field] = key
|
|
64
|
-
.slice(1, -1)
|
|
65
|
-
.split(".");
|
|
66
|
-
const value = operators?.[operatorKey]?.[field];
|
|
67
|
-
return value ?? "";
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return (
|
|
53
|
+
return string?.replace(
|
|
54
|
+
regex,
|
|
55
|
+
(match) =>
|
|
71
56
|
generatorsConstant.generatorsPlaceholderReplaceObject(
|
|
72
57
|
data,
|
|
73
58
|
translations,
|
|
74
59
|
month,
|
|
75
60
|
day,
|
|
76
61
|
year,
|
|
77
|
-
)[
|
|
78
|
-
|
|
79
|
-
});
|
|
62
|
+
)[match.toLowerCase()],
|
|
63
|
+
);
|
|
80
64
|
}
|
|
81
65
|
|
|
82
66
|
export function generateArray(obj) {
|
package/src/resolver/index.mjs
CHANGED
|
@@ -150,8 +150,7 @@ export function processSections(
|
|
|
150
150
|
data,
|
|
151
151
|
toplists,
|
|
152
152
|
content,
|
|
153
|
-
previewPageID
|
|
154
|
-
operators = {}
|
|
153
|
+
previewPageID
|
|
155
154
|
) {
|
|
156
155
|
// pageId we will use it just on operator review pages
|
|
157
156
|
const pageId = page ? page.id : null;
|
|
@@ -226,8 +225,7 @@ export function processSections(
|
|
|
226
225
|
toplists,
|
|
227
226
|
content,
|
|
228
227
|
prefilledMarketModules,
|
|
229
|
-
previewPageID
|
|
230
|
-
operators
|
|
228
|
+
previewPageID
|
|
231
229
|
);
|
|
232
230
|
sections[sectionKey].modules[key] = module;
|
|
233
231
|
if (module?.filters) {
|
|
@@ -336,7 +334,7 @@ export function processExtraFields(
|
|
|
336
334
|
});
|
|
337
335
|
}
|
|
338
336
|
|
|
339
|
-
function updatePlaceholders(page, data, translationsData
|
|
337
|
+
function updatePlaceholders(page, data, translationsData) {
|
|
340
338
|
|
|
341
339
|
page.title =
|
|
342
340
|
page.title &&
|
|
@@ -344,7 +342,6 @@ function updatePlaceholders(page, data, translationsData, operators = {}) {
|
|
|
344
342
|
siteName: data.site_name,
|
|
345
343
|
pageTitle: page.title,
|
|
346
344
|
market: page.market,
|
|
347
|
-
operators
|
|
348
345
|
});
|
|
349
346
|
|
|
350
347
|
page.meta_title =
|
|
@@ -361,7 +358,6 @@ function updatePlaceholders(page, data, translationsData, operators = {}) {
|
|
|
361
358
|
siteName: data.site_name,
|
|
362
359
|
pageTitle: page.title,
|
|
363
360
|
market: page.market,
|
|
364
|
-
operators
|
|
365
361
|
});
|
|
366
362
|
}
|
|
367
363
|
|
|
@@ -430,7 +426,7 @@ export default {
|
|
|
430
426
|
relations,
|
|
431
427
|
data.content
|
|
432
428
|
);
|
|
433
|
-
updatePlaceholders(page, generalData, translations
|
|
429
|
+
updatePlaceholders(page, generalData, translations);
|
|
434
430
|
|
|
435
431
|
// Set Affiliate relations
|
|
436
432
|
processRelations(
|
|
@@ -482,8 +478,7 @@ export default {
|
|
|
482
478
|
siteName: generalData.site_name,
|
|
483
479
|
pageTitle: page.title,
|
|
484
480
|
market: page.market,
|
|
485
|
-
}
|
|
486
|
-
data.operators
|
|
481
|
+
}
|
|
487
482
|
);
|
|
488
483
|
}
|
|
489
484
|
|
|
@@ -675,8 +670,7 @@ export default {
|
|
|
675
670
|
null,
|
|
676
671
|
data.toplists,
|
|
677
672
|
data.content,
|
|
678
|
-
previewPageID
|
|
679
|
-
data.operators || {}
|
|
673
|
+
previewPageID
|
|
680
674
|
);
|
|
681
675
|
}
|
|
682
676
|
|
|
@@ -701,8 +695,7 @@ export default {
|
|
|
701
695
|
data,
|
|
702
696
|
data.toplists,
|
|
703
697
|
data.content,
|
|
704
|
-
previewPageID
|
|
705
|
-
data.operators || {}
|
|
698
|
+
previewPageID
|
|
706
699
|
),
|
|
707
700
|
});
|
|
708
701
|
}
|
package/src/resolver/modules.mjs
CHANGED
|
@@ -469,8 +469,7 @@ export function processContentModule(
|
|
|
469
469
|
translations,
|
|
470
470
|
relationData,
|
|
471
471
|
content,
|
|
472
|
-
previewPageID
|
|
473
|
-
operators,
|
|
472
|
+
previewPageID
|
|
474
473
|
) {
|
|
475
474
|
module.value = previewPageID
|
|
476
475
|
? module.value
|
|
@@ -479,8 +478,7 @@ export function processContentModule(
|
|
|
479
478
|
module.value = generatePlaceholderString(
|
|
480
479
|
module.value,
|
|
481
480
|
translations,
|
|
482
|
-
relationData
|
|
483
|
-
operators
|
|
481
|
+
relationData
|
|
484
482
|
);
|
|
485
483
|
|
|
486
484
|
module.value = trailingSlash(module.value);
|
|
@@ -492,17 +490,7 @@ export function processContentModule(
|
|
|
492
490
|
module.show_more_content = generatePlaceholderString(
|
|
493
491
|
module.show_more_content,
|
|
494
492
|
translations,
|
|
495
|
-
relationData
|
|
496
|
-
operators
|
|
497
|
-
);
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
if (module.module_introduction && Object.keys(operators).length) {
|
|
501
|
-
module.module_introduction = generatePlaceholderString(
|
|
502
|
-
module.module_introduction,
|
|
503
|
-
translations,
|
|
504
|
-
relationData,
|
|
505
|
-
operators,
|
|
493
|
+
relationData
|
|
506
494
|
);
|
|
507
495
|
}
|
|
508
496
|
}
|
|
@@ -518,14 +506,14 @@ export function shouldSavePrefilled(module = {}, siteName) {
|
|
|
518
506
|
);
|
|
519
507
|
}
|
|
520
508
|
|
|
521
|
-
export function processSpotlightModule(module = {}, content, previewPageID
|
|
509
|
+
export function processSpotlightModule(module = {}, content, previewPageID) {
|
|
522
510
|
module.items.forEach((item) => {
|
|
523
511
|
item.content = trailingSlash(
|
|
524
512
|
previewPageID ? item.content : (content && content[item.content]) || ""
|
|
525
513
|
);
|
|
526
|
-
item.text =
|
|
514
|
+
item.text = trailingSlash(
|
|
527
515
|
previewPageID ? item.text : (content && content[item.text]) || "",
|
|
528
|
-
)
|
|
516
|
+
);
|
|
529
517
|
});
|
|
530
518
|
|
|
531
519
|
return module;
|
|
@@ -538,32 +526,30 @@ export function processCarouselModule(module = {}, content) {
|
|
|
538
526
|
return module;
|
|
539
527
|
}
|
|
540
528
|
|
|
541
|
-
export function processFaq(module = {}, content, relationData, previewPageID
|
|
529
|
+
export function processFaq(module = {}, content, relationData, previewPageID) {
|
|
542
530
|
// eslint-disable-next-line no-unused-expressions
|
|
543
531
|
module.items &&
|
|
544
532
|
// eslint-disable-next-line array-callback-return
|
|
545
533
|
module.items.map((item) => {
|
|
546
534
|
item.question = trailingSlash(
|
|
547
535
|
previewPageID
|
|
548
|
-
? generatePlaceholderString(item.question, null, relationData
|
|
536
|
+
? generatePlaceholderString(item.question, null, relationData)
|
|
549
537
|
: (content
|
|
550
538
|
? generatePlaceholderString(
|
|
551
539
|
content[item.question],
|
|
552
540
|
null,
|
|
553
|
-
relationData
|
|
554
|
-
operators,
|
|
541
|
+
relationData
|
|
555
542
|
)
|
|
556
543
|
: "") || ""
|
|
557
544
|
);
|
|
558
545
|
item.answer = trailingSlash(
|
|
559
546
|
previewPageID
|
|
560
|
-
? generatePlaceholderString(item.answer, null, relationData
|
|
547
|
+
? generatePlaceholderString(item.answer, null, relationData)
|
|
561
548
|
: (content &&
|
|
562
549
|
generatePlaceholderString(
|
|
563
550
|
content[item.answer],
|
|
564
551
|
null,
|
|
565
|
-
relationData
|
|
566
|
-
operators
|
|
552
|
+
relationData
|
|
567
553
|
)) ||
|
|
568
554
|
""
|
|
569
555
|
);
|
|
@@ -604,15 +590,14 @@ export function processModule(
|
|
|
604
590
|
toplists,
|
|
605
591
|
content,
|
|
606
592
|
prefilledMarketModules,
|
|
607
|
-
previewPageID
|
|
608
|
-
operators
|
|
593
|
+
previewPageID
|
|
609
594
|
) {
|
|
610
595
|
module.module_title =
|
|
611
596
|
module.module_title &&
|
|
612
|
-
generatePlaceholderString(module.module_title, translations, relationData
|
|
597
|
+
generatePlaceholderString(module.module_title, translations, relationData);
|
|
613
598
|
module.title =
|
|
614
599
|
module.title &&
|
|
615
|
-
generatePlaceholderString(module.title, translations, relationData
|
|
600
|
+
generatePlaceholderString(module.title, translations, relationData);
|
|
616
601
|
|
|
617
602
|
module.anchor_slug =
|
|
618
603
|
module.anchor_slug &&
|
|
@@ -624,7 +609,6 @@ export function processModule(
|
|
|
624
609
|
module.module_introduction,
|
|
625
610
|
translations,
|
|
626
611
|
relationData,
|
|
627
|
-
operators,
|
|
628
612
|
);
|
|
629
613
|
|
|
630
614
|
// See more link
|
|
@@ -653,8 +637,7 @@ export function processModule(
|
|
|
653
637
|
translations,
|
|
654
638
|
relationData,
|
|
655
639
|
content,
|
|
656
|
-
previewPageID
|
|
657
|
-
operators,
|
|
640
|
+
previewPageID
|
|
658
641
|
);
|
|
659
642
|
} else if (module.name === "bonus") {
|
|
660
643
|
processBonus(module, relations, data);
|
|
@@ -669,11 +652,11 @@ export function processModule(
|
|
|
669
652
|
translations
|
|
670
653
|
);
|
|
671
654
|
} else if (module.name === "faq") {
|
|
672
|
-
processFaq(module, content, relationData, previewPageID
|
|
655
|
+
processFaq(module, content, relationData, previewPageID);
|
|
673
656
|
} else if (module.name === "anchor") {
|
|
674
657
|
processAnchor(module, relationData, translations);
|
|
675
658
|
} else if (module.name === "spotlights") {
|
|
676
|
-
processSpotlightModule(module, content, previewPageID
|
|
659
|
+
processSpotlightModule(module, content, previewPageID);
|
|
677
660
|
} else if (module.name === "menu" && menus && menus[module.menu_id]) {
|
|
678
661
|
module = Object.assign(module, menus[module.menu_id]);
|
|
679
662
|
} else if (module.name === "statistics_counter") {
|