gatsby-core-theme 34.0.4 → 34.0.6
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 +31 -0
- package/package.json +1 -1
- package/src/components/molecules/content/content.module.scss +4 -4
- package/src/components/molecules/tnc/index.js +14 -4
- package/src/components/molecules/tnc/tnc.test.js +1 -1
- package/src/constants/pick-keys.mjs +1 -0
- package/src/constants/site-settings/navigation.js +4 -4
- package/src/helpers/processor/index.mjs +5 -3
- package/src/helpers/processor/modules.mjs +5 -4
- package/src/helpers/replaceMedia.js +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
## [34.0.6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v34.0.5...v34.0.6) (2024-07-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* make border radius for show button number two dynamic ([9f83b15](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/9f83b15e264680210d5169e5906d131c872dba10))
|
|
7
|
+
* resolve error ([cfdbc98](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/cfdbc989ec6dda72f82c2d712dd0d56e8e7ff8e8))
|
|
8
|
+
* test fix ([7c13ab7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/7c13ab798abcf67268b244efb3fa1b42d312006f))
|
|
9
|
+
* update fields of informational page type on the site settings constant ([41e7e4d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/41e7e4ddd9fe83fa45a742c67b081187d9426ad2))
|
|
10
|
+
* updated tnc ([545c175](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/545c175d97449689bc5555733a203abb4ad3977d))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Code Refactoring
|
|
14
|
+
|
|
15
|
+
* add tabindex for tables for accessibility ([c247301](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c247301cc36fa0048c327a5e5489f66575cf7c64))
|
|
16
|
+
* fix toplist ribbons ([f0c8780](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f0c8780f7a18c780be9b443f7b194c17e9455826))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
* Merge branch 'tm-4505-aria-buttons' into 'master' ([9cafbea](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/9cafbea027bfdf464347b0bfd7039a14741b46e9))
|
|
20
|
+
* Merge branch 'tm-4577-content-module' into 'master' ([733a870](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/733a8705352e9d9c066b3582c37862dbfe3a0157))
|
|
21
|
+
* Merge branch 'tm-4420-informational-page-type' into 'master' ([5a7eb0c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5a7eb0ca81411e69ad0e6f9089e0474722eefe6c))
|
|
22
|
+
* Merge branch 'tm-4453-tnc-update' into 'master' ([e1e1d43](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e1e1d43dc289280abcc23e39c121836c059ac80f))
|
|
23
|
+
* Merge branch 'master' into tm-4453-tnc-update ([5ca1fc2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5ca1fc2f3f5c2a06da2b2ab90a595c343d388c32))
|
|
24
|
+
|
|
25
|
+
## [34.0.5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v34.0.4...v34.0.5) (2024-07-11)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* operator pick keys ([e44fb17](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e44fb17ed635ff5541e3eb9e12cca1a1a92df0b4))
|
|
31
|
+
|
|
1
32
|
## [34.0.4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v34.0.3...v34.0.4) (2024-07-10)
|
|
2
33
|
|
|
3
34
|
|
package/package.json
CHANGED
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
text-align: start;
|
|
130
130
|
padding: var(--showMoreButton-padding, 1.6rem 2.4rem )!important;
|
|
131
131
|
background: var(--contentCollapsible-button-bg, #fafafa);
|
|
132
|
-
border-radius: 0.8rem;
|
|
132
|
+
border-radius: var(--showMOreTwoButtonBorderRadius, 0.8rem);
|
|
133
133
|
width: 100%;
|
|
134
134
|
font-size: var(--contentCollapsible-button-size, 1.6rem);
|
|
135
135
|
font-weight: var(--contentCollapsible-button-weight, 700);
|
|
@@ -160,8 +160,8 @@
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
.showMoreTwoButtonOpen {
|
|
163
|
-
border-radius: 8px 8px 0px 0px;
|
|
164
|
-
|
|
163
|
+
border-radius: var(--showMoreTwoButtonRadiusOpen, 8px 8px 0px 0px);
|
|
164
|
+
|
|
165
165
|
> svg {
|
|
166
166
|
transform: rotate(180deg);
|
|
167
167
|
}
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
margin: 0 auto;
|
|
172
172
|
max-width: calc(var(--max-width-content, var(--main-container-max)) - 3.2rem) !important;
|
|
173
173
|
background-color: var(--contentCollapsibleBox-bg, #fafafa);
|
|
174
|
-
border-radius: 0px 0px 8px 8px;
|
|
174
|
+
border-radius: var(--contentCollapsibleBorderRadius, 0px 0px 8px 8px);
|
|
175
175
|
width: auto !important;
|
|
176
176
|
padding-bottom: 1.6rem !important;
|
|
177
177
|
|
|
@@ -5,16 +5,26 @@ import { getOperatorTnc } from '~helpers/getters';
|
|
|
5
5
|
|
|
6
6
|
const Tnc = ({ operator, isFixed = false }) => {
|
|
7
7
|
const termsConditions = getOperatorTnc(operator);
|
|
8
|
-
|
|
9
8
|
return (
|
|
10
|
-
termsConditions &&
|
|
9
|
+
termsConditions &&
|
|
10
|
+
((!isFixed && (
|
|
11
11
|
<div
|
|
12
12
|
tabIndex={`${isFixed ? 0 : -1}`}
|
|
13
|
-
className={`${styles.container} ${styles.tnc || ''}
|
|
13
|
+
className={`${styles.container} ${styles.tnc || ''}`}
|
|
14
14
|
// eslint-disable-next-line react/no-danger
|
|
15
15
|
dangerouslySetInnerHTML={{ __html: termsConditions }}
|
|
16
16
|
/>
|
|
17
|
-
)
|
|
17
|
+
)) || (
|
|
18
|
+
<div
|
|
19
|
+
tabIndex={`${isFixed ? 0 : -1}`}
|
|
20
|
+
className={`${styles.container} ${styles.tnc || ''} ${isFixed ? styles.isFixed : ''}`}
|
|
21
|
+
>
|
|
22
|
+
<div
|
|
23
|
+
className={`${styles.innerTnc || ''}`}
|
|
24
|
+
dangerouslySetInnerHTML={{ __html: termsConditions }}
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
))
|
|
18
28
|
);
|
|
19
29
|
};
|
|
20
30
|
|
|
@@ -23,7 +23,7 @@ describe('Tnc Component', () => {
|
|
|
23
23
|
test('render tnc fixed', () => {
|
|
24
24
|
const { container } = render(<Tnc {...args} hasCollapse={false} isFixed />);
|
|
25
25
|
expect(container.querySelector('.isFixed')).toBeTruthy();
|
|
26
|
-
expect(container.querySelector('.
|
|
26
|
+
expect(container.querySelector('.innerTnc').innerHTML).toBe('test');
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
afterEach(() => {
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
export const pageTypes = {
|
|
3
3
|
informational: {
|
|
4
4
|
section: 'navigation',
|
|
5
|
-
showLogoWithLink:
|
|
6
|
-
disableSearch:
|
|
5
|
+
showLogoWithLink: true,
|
|
6
|
+
disableSearch: false,
|
|
7
7
|
customComponent: false,
|
|
8
8
|
exclusiveOperator: false,
|
|
9
|
-
navMenu: '
|
|
9
|
+
navMenu: 'main_menu',
|
|
10
10
|
showNavMenu: true,
|
|
11
11
|
},
|
|
12
12
|
responsible_gambling_guide: {
|
|
13
13
|
section: 'rg_navigation',
|
|
14
14
|
showLogoWithLink: false,
|
|
15
|
-
disableSearch:
|
|
15
|
+
disableSearch: false,
|
|
16
16
|
customComponent: false,
|
|
17
17
|
exclusiveOperator: false,
|
|
18
18
|
navMenu: 'rg_menu',
|
|
@@ -100,7 +100,7 @@ export function transform(response) {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
const savedModules = {};
|
|
103
|
-
export function processSections(sections, skipPost = false, page, translations, markets, siteName) {
|
|
103
|
+
export function processSections(sections, skipPost = false, page, translations, markets, siteName, data) {
|
|
104
104
|
// pagedId we will use it just on operator review pages
|
|
105
105
|
const pageId = page ? page.id : null;
|
|
106
106
|
const relationData = page && page.relation;
|
|
@@ -135,7 +135,8 @@ export function processSections(sections, skipPost = false, page, translations,
|
|
|
135
135
|
pageId,
|
|
136
136
|
translations,
|
|
137
137
|
{...relationData, siteName, pageTitle: page?.title},
|
|
138
|
-
markets
|
|
138
|
+
markets,
|
|
139
|
+
data,
|
|
139
140
|
);
|
|
140
141
|
|
|
141
142
|
sections[sectionKey].modules[key] = module;
|
|
@@ -528,7 +529,8 @@ export default {
|
|
|
528
529
|
page,
|
|
529
530
|
translations,
|
|
530
531
|
data.site_markets,
|
|
531
|
-
data.general.site_name
|
|
532
|
+
data.general.site_name,
|
|
533
|
+
data
|
|
532
534
|
),
|
|
533
535
|
});
|
|
534
536
|
}
|
|
@@ -240,7 +240,7 @@ export function processArchiveModule(module, pages) {
|
|
|
240
240
|
module.numOfPages = 1;
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
-
export function processTopListModule(module, relations, pages, markets) {
|
|
243
|
+
export function processTopListModule(module, relations, pages, markets, data) {
|
|
244
244
|
module.items = module.items.map((listItem) => {
|
|
245
245
|
listItem.items = listItem.items.map((item) => {
|
|
246
246
|
// Remove the ribbons if are empty, will be add ribbons from operator
|
|
@@ -251,7 +251,7 @@ export function processTopListModule(module, relations, pages, markets) {
|
|
|
251
251
|
: [];
|
|
252
252
|
|
|
253
253
|
const clone = pick(
|
|
254
|
-
sanitizeOperatorData(cloneDeep(relations.operator[item.operator_id]), operatorPage),
|
|
254
|
+
sanitizeOperatorData(cloneDeep(relations.operator[item.operator_id]), operatorPage, [], [], data),
|
|
255
255
|
topListPickKeys
|
|
256
256
|
);
|
|
257
257
|
|
|
@@ -301,7 +301,8 @@ export function processModule(
|
|
|
301
301
|
pageId,
|
|
302
302
|
translations,
|
|
303
303
|
relationData,
|
|
304
|
-
markets
|
|
304
|
+
markets,
|
|
305
|
+
data,
|
|
305
306
|
) {
|
|
306
307
|
module.module_title =
|
|
307
308
|
module.module_title &&
|
|
@@ -326,7 +327,7 @@ export function processModule(
|
|
|
326
327
|
} else if (module.name === 'archive' && previewMode) {
|
|
327
328
|
processArchiveModule(module, pages);
|
|
328
329
|
} else if (module.name === 'top_list') {
|
|
329
|
-
processTopListModule(module, relations, pages, markets);
|
|
330
|
+
processTopListModule(module, relations, pages, markets, data);
|
|
330
331
|
} else if (module.name === 'menu' && menus && menus[module.menu_id]) {
|
|
331
332
|
module = Object.assign(module, menus[module.menu_id]);
|
|
332
333
|
} else if (module.name === 'statistics_counter') {
|