gatsby-core-theme 44.10.1 → 44.10.12-beta.1

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.
Files changed (50) hide show
  1. package/.ci.yml +1 -0
  2. package/CHANGELOG.md +101 -0
  3. package/gatsby-browser.js +3 -145
  4. package/gatsby-config.js +3 -3
  5. package/gatsby-node.mjs +7 -1
  6. package/gatsby-ssr.js +142 -0
  7. package/package.json +2 -1
  8. package/src/components/app-ssr.js +16 -18
  9. package/src/components/atoms/admin/bar/index.js +6 -2
  10. package/src/components/atoms/admin/button/index.js +4 -3
  11. package/src/components/atoms/contact-form/index.js +2 -2
  12. package/src/components/atoms/market-dropdown/index.js +7 -9
  13. package/src/components/atoms/notifications/index.js +2 -3
  14. package/src/components/atoms/ratings/index.js +7 -6
  15. package/src/components/atoms/review-link/index.js +16 -11
  16. package/src/components/atoms/search/autocomplete/article/index.js +13 -9
  17. package/src/components/atoms/search/autocomplete/default/index.js +13 -9
  18. package/src/components/atoms/search/autocomplete/game/index.js +22 -12
  19. package/src/components/atoms/search/autocomplete/operator/index.js +26 -18
  20. package/src/components/molecules/bonus/template-one/index.js +15 -2
  21. package/src/components/molecules/bonus/template-two/index.js +7 -1
  22. package/src/components/molecules/cookie-modal/index.js +1 -1
  23. package/src/components/molecules/floating-area/index.js +6 -12
  24. package/src/components/molecules/footer/index.js +35 -27
  25. package/src/components/molecules/footer/variants/template-one/template-one.stories.js +70 -67
  26. package/src/components/molecules/footer/variants/template-one/template-one.test.js +92 -69
  27. package/src/components/molecules/footer/variants/template-three/template-three.stories.js +4 -4
  28. package/src/components/molecules/footer/variants/template-three/template-three.test.js +98 -73
  29. package/src/components/molecules/footer/variants/template-two/template-two.stories.js +3 -3
  30. package/src/components/molecules/footer/variants/template-two/template-two.test.js +96 -73
  31. package/src/components/molecules/header/variants/default/template-one/index.js +15 -13
  32. package/src/components/molecules/header/variants/default/template-one/template-one.test.js +37 -29
  33. package/src/components/molecules/header/variants/slot/template-one/templateone.test.js +32 -29
  34. package/src/components/molecules/leave-comment-form/index.js +90 -79
  35. package/src/components/molecules/main/index.js +5 -7
  36. package/src/components/molecules/menu/index.js +28 -30
  37. package/src/components/molecules/newsletter/form/index.js +2 -2
  38. package/src/components/molecules/newsletter/index.js +23 -19
  39. package/src/components/molecules/tnc/index.js +4 -2
  40. package/src/components/organisms/anchor/template-two/index.js +33 -18
  41. package/src/components/organisms/footer-navigation/index.js +10 -9
  42. package/src/components/organisms/navigation/navigationContext.js +28 -4
  43. package/src/components/organisms/search/index.js +17 -4
  44. package/src/constants/ratings-constant.js +7 -9
  45. package/src/helpers/getters.mjs +3 -3
  46. package/src/helpers/processImageNode.js +38 -30
  47. package/src/helpers/processImageNode.test.js +33 -24
  48. package/src/helpers/replaceMedia.js +2 -2
  49. package/src/resolver/games.mjs +1 -1
  50. package/src/resolver/operators.mjs +23 -13
@@ -1,9 +1,6 @@
1
1
  // eslint-disable-next-line import/no-extraneous-dependencies
2
2
  import loadash from "lodash/index.js";
3
- import {
4
- getExtraField,
5
- filterNonNullValues,
6
- } from "gatsby-core-theme/src/helpers/getters.mjs";
3
+ import { getExtraField, filterNonNullValues } from "../helpers/getters.mjs";
7
4
  import { pickRelationKeys } from "../constants/pick-keys.mjs";
8
5
  import {
9
6
  processLogo,
@@ -11,13 +8,18 @@ import {
11
8
  processCountries,
12
9
  processCurrencies,
13
10
  processProviders,
14
- processGamblingCompanies
11
+ processGamblingCompanies,
15
12
  } from "./relations.mjs";
16
13
 
17
14
  const { cloneDeep, pick } = loadash;
18
15
 
19
16
  // eslint-disable-next-line import/prefer-default-export
20
- export function sanitizeOperatorData(operator, operatorPage = [], data = [], toplistLabel = null) {
17
+ export function sanitizeOperatorData(
18
+ operator,
19
+ operatorPage = [],
20
+ data = [],
21
+ toplistLabel = null
22
+ ) {
21
23
  if (!operator) {
22
24
  return null;
23
25
  }
@@ -65,10 +67,15 @@ export function sanitizeOperatorData(operator, operatorPage = [], data = [], top
65
67
  }
66
68
 
67
69
  if (operatorPage.length >= 1) {
68
- operatorClone.review_link = operatorPage[0].path
70
+ operatorClone.review_link = operatorPage[0].path;
69
71
  }
70
72
 
71
- return pick(operatorClone, toplistLabel && toplistLabel.includes('simplified') ? pickRelationKeys.operator_simplified : pickRelationKeys.operator);
73
+ return pick(
74
+ operatorClone,
75
+ toplistLabel && toplistLabel.includes("simplified")
76
+ ? pickRelationKeys.operator_simplified
77
+ : pickRelationKeys.operator
78
+ );
72
79
  }
73
80
 
74
81
  export function transformOperators(jsonData, relationsData, pages) {
@@ -139,9 +146,12 @@ export function transformOperators(jsonData, relationsData, pages) {
139
146
  // // Best_game
140
147
  if (newOperatorData?.best_game_id) {
141
148
  const bestGameKey = Object?.keys(relationsData?.games)?.find(
142
- (key) => relationsData?.games[key]?.game_id === newOperatorData?.best_game_id
149
+ (key) =>
150
+ relationsData?.games[key]?.game_id ===
151
+ newOperatorData?.best_game_id
143
152
  );
144
- newOperatorData.best_game = relationsData?.games?.[bestGameKey] || null;
153
+ newOperatorData.best_game =
154
+ relationsData?.games?.[bestGameKey] || null;
145
155
  }
146
156
 
147
157
  // Providers
@@ -151,11 +161,11 @@ export function transformOperators(jsonData, relationsData, pages) {
151
161
  );
152
162
  const operatorPage = Object.values(pages).filter(
153
163
  (page) =>
154
- page.relation_type === "operator" && page.type === 'operator' &&
164
+ page.relation_type === "operator" &&
165
+ page.type === "operator" &&
155
166
  page.relation_id === newOperatorData.id
156
-
157
167
  );
158
-
168
+
159
169
  operators[affiliate.id] = sanitizeOperatorData(
160
170
  newOperatorData,
161
171
  operatorPage,