gatsby-matrix-theme 51.0.0 → 51.0.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/package.json +2 -2
  3. package/src/components/atoms/cards/article-card/variables/index.js +1 -10
  4. package/src/components/atoms/feedback/template-three/index.js +1 -0
  5. package/src/components/atoms/feedback/template-three/template-three.module.scss +22 -13
  6. package/src/components/molecules/header/variants/payment/template-five/template-five.module.test.js +17 -17
  7. package/src/components/molecules/header/variants/payment/template-four/template-four.test.js +7 -7
  8. package/src/components/molecules/header/variants/payment/template-one-three/template-one-three.test.js +14 -14
  9. package/src/components/molecules/header/variants/payment/template-two/template-two.test.js +7 -7
  10. package/src/gatsby-core-theme/components/organisms/head/index.js +0 -2
  11. package/src/gatsby-core-theme/helpers/server-data.js +22 -3
  12. package/storybook/public/{168.18223611.iframe.bundle.js → 168.6cf2012c.iframe.bundle.js} +4 -4
  13. package/storybook/public/{168.18223611.iframe.bundle.js.map → 168.6cf2012c.iframe.bundle.js.map} +1 -1
  14. package/storybook/public/{177.c4642f3d.iframe.bundle.js → 177.674ec62b.iframe.bundle.js} +1 -1
  15. package/storybook/public/{240.57146d20.iframe.bundle.js → 240.7b2818a3.iframe.bundle.js} +1 -1
  16. package/storybook/public/{441.d471f0cc.iframe.bundle.js → 441.fff08338.iframe.bundle.js} +1 -1
  17. package/storybook/public/{563.0e224712.iframe.bundle.js → 563.67e47c37.iframe.bundle.js} +1 -1
  18. package/storybook/public/604.f5d9235e.iframe.bundle.js +1 -0
  19. package/storybook/public/631.8ec62fbf.iframe.bundle.js +1 -0
  20. package/storybook/public/{638.c7990ff8.iframe.bundle.js → 638.a76d3144.iframe.bundle.js} +1 -1
  21. package/storybook/public/{650.aa9074ef.iframe.bundle.js → 650.f196865c.iframe.bundle.js} +1 -1
  22. package/storybook/public/{679.35431cf4.iframe.bundle.js → 679.5e5539be.iframe.bundle.js} +1 -1
  23. package/storybook/public/776.e03f32a9.iframe.bundle.js +1 -0
  24. package/storybook/public/{777.e334d92f.iframe.bundle.js → 777.7506b7af.iframe.bundle.js} +1 -1
  25. package/storybook/public/794.7bc8e2ea.iframe.bundle.js +1 -0
  26. package/storybook/public/909.2e436f6a.iframe.bundle.js +1 -0
  27. package/storybook/public/942.7deca466.iframe.bundle.js +1 -0
  28. package/storybook/public/943.8e80557c.iframe.bundle.js +1 -0
  29. package/storybook/public/{964.3f7d79bb.iframe.bundle.js → 964.718a6c8c.iframe.bundle.js} +1 -1
  30. package/storybook/public/iframe.html +1 -1
  31. package/storybook/public/main.6c68b0dc.iframe.bundle.js +1 -0
  32. package/storybook/public/project.json +1 -1
  33. package/storybook/public/{runtime~main.6a78b9b3.iframe.bundle.js → runtime~main.1d0178c1.iframe.bundle.js} +1 -1
  34. package/storybook/public/604.fc744779.iframe.bundle.js +0 -1
  35. package/storybook/public/631.44ae5572.iframe.bundle.js +0 -1
  36. package/storybook/public/776.57194430.iframe.bundle.js +0 -1
  37. package/storybook/public/794.1f457e4b.iframe.bundle.js +0 -1
  38. package/storybook/public/909.8f000947.iframe.bundle.js +0 -1
  39. package/storybook/public/942.10274037.iframe.bundle.js +0 -1
  40. package/storybook/public/943.4fae38de.iframe.bundle.js +0 -1
  41. package/storybook/public/main.3596bc59.iframe.bundle.js +0 -1
  42. /package/storybook/public/{168.18223611.iframe.bundle.js.LICENSE.txt → 168.6cf2012c.iframe.bundle.js.LICENSE.txt} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ ## [51.0.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v51.0.1...v51.0.2) (2024-09-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * removed reading time meta fields + fixed sportstake only prevMonth case ([94337be](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/94337be5453059ed48e21c2804795b732e592ab6))
7
+ * updated tests with new PrettyLink implementation ([75f37db](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/75f37dbcebc8bee77800ddfad776f864b3e29b69))
8
+
9
+
10
+ ### Code Refactoring
11
+
12
+ * add user count on desktop ([3834947](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3834947c7932cf51b0e22807bb77029ea8eb4a76))
13
+
14
+
15
+ ### Config
16
+
17
+ * update theme ([a4c7a35](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a4c7a3534e7bc22da7b358d2510a271c3b975535))
18
+
19
+
20
+ * Merge branch 'tm-4567-feedback-modal' into 'master' ([6375a84](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6375a849de8497acf2e00c49f08fb70a3768c4ac))
21
+ * Merge branch 'tm-4696-reading-time' into 'master' ([c6701e8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c6701e8dc55c9acf32e17297d81a0f4fbcb8f6af))
22
+
23
+ ## [51.0.1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v51.0.0...v51.0.1) (2024-09-04)
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * fix verifyicon ([a4e5521](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a4e55219daf5aa89cec3eca3f49f6e77ace73987))
29
+
1
30
  # [51.0.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v50.0.7...v51.0.0) (2024-09-04)
2
31
 
3
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "51.0.0",
3
+ "version": "51.0.2",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@react-icons/all-files": "^4.1.0",
27
27
  "gatsby": "^5.11.0",
28
- "gatsby-core-theme": "39.0.0",
28
+ "gatsby-core-theme": "39.0.3",
29
29
  "gatsby-plugin-sharp": "^5.11.0",
30
30
  "gatsby-transformer-sharp": "^5.11.0",
31
31
  "prop-types": "15.7.2",
@@ -40,16 +40,7 @@ const VariableComponent = ({
40
40
  height={imgSize}
41
41
  src={imagePrettyUrl(author?.image, imgSize, imgSize)}
42
42
  />
43
- {verifyIcon && (
44
- <span className={styles.verifyIcon}>
45
- <LazyImage
46
- src={verifyIcon}
47
- alt={useTranslate('verified', 'Verified')}
48
- width={10}
49
- height={10}
50
- />
51
- </span>
52
- )}
43
+ {verifyIcon && verifyIcon}
53
44
  </div>
54
45
  <div className={styles.authorContainer}>
55
46
  {showAuthorOnOneLine && (
@@ -136,6 +136,7 @@ const FeedBack = ({
136
136
  casinoTitle
137
137
  )}
138
138
  </span>
139
+ {userCount()}
139
140
  <ModalProvider>
140
141
  {voted === null ? (
141
142
  <Modal customCss={styles.modalChildren || ''}>
@@ -174,33 +174,38 @@
174
174
  font-style: normal;
175
175
  font-weight: 600;
176
176
  line-height: 2.8rem;
177
+ display: none;
177
178
 
178
179
  @include min(tablet) {
179
180
  grid-column: 2;
180
181
  grid-row: 1 / span 2;
181
182
  height: 100%;
182
- margin-left: 4.8rem;
183
- margin-right: 2.4rem;
183
+ min-width: 15.6rem;
184
+ align-self: flex-end;
184
185
 
185
186
  @include flex-align(center, flex-start);
186
187
  }
188
+ }
187
189
 
188
- .recommentText {
189
- color: #515156;
190
- font-size: 1.6rem;
191
- font-style: normal;
192
- font-weight: 400;
193
- line-height: 2.6rem;
194
- flex-basis: 100%;
190
+ .recommentText {
191
+ color: #515156;
192
+ font-size: 1.6rem;
193
+ font-style: normal;
194
+ font-weight: 400;
195
+ line-height: 2.6rem;
196
+ flex-basis: 100%;
195
197
 
196
- @include min(tablet){
197
- font-size: 1.4rem;
198
- }
198
+ @include min(tablet) {
199
+ font-size: 1.4rem;
199
200
  }
200
201
  }
201
202
 
202
203
  .showCounter {
203
- display: flex;
204
+ display: none;
205
+
206
+ @include min(tablet) {
207
+ display: flex;
208
+ }
204
209
  }
205
210
 
206
211
  .feedbackModalContainer {
@@ -267,6 +272,10 @@
267
272
  }
268
273
  }
269
274
 
275
+ .showCounter {
276
+ display: flex;
277
+ }
278
+
270
279
  .formBox {
271
280
  @include min(tablet) {
272
281
  grid-column: 4;
@@ -10,37 +10,37 @@ describe('Payment template one three component', () => {
10
10
  const data = getPaymentData();
11
11
 
12
12
  test('Template One Status Active', () => {
13
- const { container, getByText } = render(<TemplateOneThree {...data} />);
14
- expect(getByText('Next')).toBeTruthy();
13
+ const { container, queryByText } = render(<TemplateOneThree {...data} />);
14
+ expect(queryByText('Next')).toBeInTheDocument();
15
15
  expect(container.querySelectorAll('h1')).toHaveLength(1);
16
- expect(getByText('20 Free Spins No Deposit Bonus')).toBeTruthy();
17
- expect(getByText('+ 300% & 555 Spins Welcome Bonus')).toBeTruthy();
18
- expect(getByText('Visit')).toBeTruthy();
19
- expect(container.querySelectorAll('a')).toHaveLength(2);
20
- expect(container.getElementsByClassName('desc')).toBeTruthy();
16
+ expect(queryByText('20 Free Spins No Deposit Bonus')).toBeInTheDocument();
17
+ expect(queryByText('+ 300% & 555 Spins Welcome Bonus')).toBeInTheDocument();
18
+ expect(queryByText('Visit')).toBeInTheDocument();
19
+ expect(container.querySelectorAll('a')).toHaveLength(1);
20
+ expect(container.getElementsByClassName('desc')).toHaveLength(1);
21
21
  expect(container.querySelectorAll('li')).toHaveLength(4);
22
22
  });
23
23
 
24
24
  test('Template Three Status Active', () => {
25
- const { container, getByText } = render(
25
+ const { container, queryByText } = render(
26
26
  <TemplateOneThree {...data} template="template_three" />
27
27
  );
28
- expect(getByText('Next')).toBeTruthy();
28
+ expect(queryByText('Next')).toBeInTheDocument();
29
29
  expect(container.querySelectorAll('h1')).toHaveLength(1);
30
- expect(getByText('20 Free Spins No Deposit Bonus')).toBeTruthy();
31
- expect(getByText('+ 300% & 555 Spins Welcome Bonus')).toBeTruthy();
32
- expect(getByText('Visit')).toBeTruthy();
33
- expect(container.querySelectorAll('a')).toHaveLength(2);
34
- expect(container.getElementsByClassName('desc')).toBeTruthy();
30
+ expect(queryByText('20 Free Spins No Deposit Bonus')).toBeInTheDocument();
31
+ expect(queryByText('+ 300% & 555 Spins Welcome Bonus')).toBeInTheDocument();
32
+ expect(queryByText('Visit')).toBeInTheDocument();
33
+ expect(container.querySelectorAll('a')).toHaveLength(1);
34
+ expect(container.getElementsByClassName('desc')).toHaveLength(1);
35
35
  expect(container.querySelectorAll('li')).toHaveLength(4);
36
36
  });
37
37
  test('Template five toggle read more button', async () => {
38
38
  const { container } = render(<TemplateOneThree {...data} />);
39
39
 
40
40
  await waitFor(() => {
41
- expect(container.querySelector('.desc')).toBeTruthy();
42
- expect(container.querySelector('.showReadMore')).toBeTruthy();
43
- expect(container.querySelector('.showReadMore span')).toBeTruthy();
41
+ expect(container.querySelector('.desc')).toBeInTheDocument();
42
+ expect(container.querySelector('.showReadMore')).toBeInTheDocument();
43
+ expect(container.querySelector('.showReadMore span')).toBeInTheDocument();
44
44
  expect(container.querySelector('.desc')).toHaveTextContent(
45
45
  `${textWordsLimit(data.description, 60)} Continue reading`
46
46
  );
@@ -9,14 +9,14 @@ describe('Payment template four component', () => {
9
9
  const data = getPaymentData();
10
10
 
11
11
  test('Template Four Active', () => {
12
- const { container, getByText } = render(<TemplateFour {...data} />);
13
- expect(getByText('Next')).toBeTruthy();
12
+ const { container, queryByText } = render(<TemplateFour {...data} />);
13
+ expect(queryByText('Next')).toBeInTheDocument();
14
14
  expect(container.querySelectorAll('h1')).toHaveLength(1);
15
- expect(getByText('20 Free Spins No Deposit Bonus')).toBeTruthy();
16
- expect(getByText('+ 300% & 555 Spins Welcome Bonus')).toBeTruthy();
17
- expect(getByText('Visit')).toBeTruthy();
18
- expect(container.querySelectorAll('a')).toHaveLength(2);
19
- expect(container.getElementsByClassName('desc')).toBeTruthy();
15
+ expect(queryByText('20 Free Spins No Deposit Bonus')).toBeInTheDocument();
16
+ expect(queryByText('+ 300% & 555 Spins Welcome Bonus')).toBeInTheDocument();
17
+ expect(queryByText('Visit')).toBeInTheDocument();
18
+ expect(container.querySelectorAll('a')).toHaveLength(1);
19
+ expect(container.getElementsByClassName('desc')).toHaveLength(0);
20
20
  expect(container.querySelectorAll('li')).toHaveLength(4);
21
21
  });
22
22
  });
@@ -9,28 +9,28 @@ describe('Payment template one three component', () => {
9
9
  const data = getPaymentData();
10
10
 
11
11
  test('Template One Status Active', () => {
12
- const { container, getByText } = render(<TemplateOneThree {...data} />);
13
- expect(getByText('Next')).toBeTruthy();
12
+ const { container, queryByText } = render(<TemplateOneThree {...data} />);
13
+ expect(queryByText('Next')).toBeInTheDocument();
14
14
  expect(container.querySelectorAll('h1')).toHaveLength(1);
15
- expect(getByText('20 Free Spins No Deposit Bonus')).toBeTruthy();
16
- expect(getByText('+ 300% & 555 Spins Welcome Bonus')).toBeTruthy();
17
- expect(getByText('Visit')).toBeTruthy();
18
- expect(container.querySelectorAll('a')).toHaveLength(2);
19
- expect(container.getElementsByClassName('desc')).toBeTruthy();
15
+ expect(queryByText('20 Free Spins No Deposit Bonus')).toBeInTheDocument();
16
+ expect(queryByText('+ 300% & 555 Spins Welcome Bonus')).toBeInTheDocument();
17
+ expect(queryByText('Visit')).toBeInTheDocument();
18
+ expect(container.querySelectorAll('a')).toHaveLength(1);
19
+ expect(container.getElementsByClassName('desc')).toHaveLength(1);
20
20
  expect(container.querySelectorAll('li')).toHaveLength(4);
21
21
  });
22
22
 
23
23
  test('Template Three Status Active', () => {
24
- const { container, getByText } = render(
24
+ const { container, queryByText } = render(
25
25
  <TemplateOneThree {...data} template="template_three" />
26
26
  );
27
- expect(getByText('Next')).toBeTruthy();
27
+ expect(queryByText('Next')).toBeInTheDocument();
28
28
  expect(container.querySelectorAll('h1')).toHaveLength(1);
29
- expect(getByText('20 Free Spins No Deposit Bonus')).toBeTruthy();
30
- expect(getByText('+ 300% & 555 Spins Welcome Bonus')).toBeTruthy();
31
- expect(getByText('Visit')).toBeTruthy();
32
- expect(container.querySelectorAll('a')).toHaveLength(2);
33
- expect(container.getElementsByClassName('desc')).toBeTruthy();
29
+ expect(queryByText('20 Free Spins No Deposit Bonus')).toBeInTheDocument();
30
+ expect(queryByText('+ 300% & 555 Spins Welcome Bonus')).toBeInTheDocument();
31
+ expect(queryByText('Visit')).toBeInTheDocument();
32
+ expect(container.querySelectorAll('a')).toHaveLength(1);
33
+ expect(container.getElementsByClassName('desc')).toHaveLength(0);
34
34
  expect(container.querySelectorAll('li')).toHaveLength(4);
35
35
  });
36
36
  });
@@ -9,14 +9,14 @@ describe('Payment Header template two component', () => {
9
9
  const data = getPaymentData();
10
10
 
11
11
  test('Payment Template two Active', () => {
12
- const { container, getByText } = render(<TemplateTwo {...data} />);
13
- expect(getByText('Next')).toBeTruthy();
12
+ const { container, queryByText } = render(<TemplateTwo {...data} />);
13
+ expect(queryByText('Next')).toBeInTheDocument();
14
14
  expect(container.querySelectorAll('h1')).toHaveLength(1);
15
- expect(getByText('20 Free Spins No Deposit Bonus')).toBeTruthy();
16
- expect(getByText('+ 300% & 555 Spins Welcome Bonus')).toBeTruthy();
17
- expect(getByText('Visit')).toBeTruthy();
18
- expect(container.querySelectorAll('a')).toHaveLength(2);
19
- expect(container.getElementsByClassName('desc')).toBeTruthy();
15
+ expect(queryByText('20 Free Spins No Deposit Bonus')).toBeInTheDocument();
16
+ expect(queryByText('+ 300% & 555 Spins Welcome Bonus')).toBeInTheDocument();
17
+ expect(queryByText('Visit')).toBeInTheDocument();
18
+ expect(container.querySelectorAll('a')).toHaveLength(1);
19
+ expect(container.getElementsByClassName('desc')).toHaveLength(1);
20
20
  });
21
21
  });
22
22
 
@@ -110,8 +110,6 @@ const HeadData = ({ page = {}, siteInfo }) => {
110
110
  <meta name="twitter:creator" content={`@${twitterUsername}`} />
111
111
  <meta name="twitter:card" content="summary" />
112
112
  <meta name="twitter:image" content={pageImage.replace('/filters:format(webp)', '')} />
113
- <meta property="twitter:label1" content="Reading time" />
114
- <meta property="twitter:data1" content={`${page.reading_time}`} />
115
113
  </>
116
114
  )}
117
115
  </>
@@ -65,10 +65,16 @@ export async function getAPIData(page, url) {
65
65
  const calendarData = await getCalendarData(query.lotteryName, date.getMonth() + 1, date.getFullYear());
66
66
  const prevMonth = (calendarData.length <= 2) ? await getCalendarData(query.lotteryName, date.getMonth(), date.getFullYear()) : [];
67
67
 
68
+ const orderedPrevMonth = calendarData.length === 0 ?
69
+ [
70
+ prevMonth[prevMonth.length - 1],
71
+ ...prevMonth.slice(0, prevMonth.length - 1),
72
+ ] : prevMonth;
73
+
68
74
  const reorderedResultData = [
69
75
  calendarData[calendarData.length - 1],
70
76
  ...calendarData.slice(0, calendarData.length - 1),
71
- ...prevMonth
77
+ ...orderedPrevMonth
72
78
  ].filter(item => item && !Array.isArray(item));
73
79
 
74
80
  // eslint-disable-next-line no-underscore-dangle
@@ -100,10 +106,16 @@ export async function getAPIData(page, url) {
100
106
  const calendarData = await getCalendarData(query.lotteryName, date.getMonth() + 1, date.getFullYear());
101
107
  const prevMonth = (calendarData.length <= 2) ? await getCalendarData(query.lotteryName, date.getMonth(), date.getFullYear()) : [];
102
108
 
109
+ const orderedPrevMonth = calendarData.length === 0 ?
110
+ [
111
+ prevMonth[prevMonth.length - 1],
112
+ ...prevMonth.slice(0, prevMonth.length - 1),
113
+ ] : prevMonth;
114
+
103
115
  const reorderedResultData = [
104
116
  calendarData[calendarData.length - 1],
105
117
  ...calendarData.slice(0, calendarData.length - 1),
106
- ...prevMonth
118
+ ...orderedPrevMonth
107
119
  ].filter(item => item && !Array.isArray(item));
108
120
 
109
121
  // eslint-disable-next-line no-underscore-dangle
@@ -143,10 +155,17 @@ export async function getAPIData(page, url) {
143
155
  new Date().getFullYear()
144
156
  ) : [];
145
157
 
158
+ const orderedPrevMonth = availableDates.length === 0 ?
159
+ [
160
+ prevMonth[prevMonth.length - 1],
161
+ ...prevMonth.slice(0, prevMonth.length - 1),
162
+ ] : prevMonth;
163
+
164
+
146
165
  const reorderedDates = [
147
166
  availableDates[availableDates.length - 1],
148
167
  ...availableDates.slice(0, availableDates.length - 1),
149
- ...prevMonth
168
+ ...orderedPrevMonth
150
169
  ].filter(item => item && !Array.isArray(item));
151
170
 
152
171
  const latestDrawResults = await Promise.all(