gatsby-core-theme 8.0.6 → 8.0.9

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,47 @@
1
+ ## [8.0.9](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v8.0.8...v8.0.9) (2022-07-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * bugfix on search page dropdown ([924e930](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/924e93093f05b0f666118aead993e600016d5958))
7
+ * react-icons ([6fa92e4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6fa92e4b10650de5003da15218aa9659ab42634e))
8
+ * react-icons theme ([474b747](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/474b7471943a9e564560f1c4d971037694a8889d))
9
+
10
+
11
+ ### Code Refactoring
12
+
13
+ * add content intro class ([10eb36e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/10eb36e847576c3c4ec7c0db1984b68427a45784))
14
+ * margin for dropdown ([a4ad1a7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a4ad1a7fc32947cbccfd816c595c1b16113f151d))
15
+
16
+
17
+ * Merge branch 'tm-2963-react-icons' into 'master' ([75648e5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/75648e57e50660d84bdf7ea926060629ce9b22f9))
18
+ * Update pros-cons.stories.js ([1be02f7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1be02f7d0bfe05674c994adc6705ec8ee512568f))
19
+ * Merge branch 'tm-2986-tablist-bugfix' into 'master' ([f51224d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f51224decd5594db644717354771f5da55ed59ce))
20
+ * Merge branch 'tm-2967-bug-fixing' into 'master' ([1be5831](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1be5831839d71a5dfe1d670e117504b363703179))
21
+
22
+ ## [8.0.8](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v8.0.7...v8.0.8) (2022-07-12)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * filter out inactive/blacklisted operator fix ([0e40044](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/0e4004444f356de7a3cd58d11a429c21335835dd))
28
+ * fixes tests ([be3007e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/be3007ea3628b244287f15341b23c1031e1084c4))
29
+ * hasArchive ([3a47982](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3a479824658fe7b73eae89cdfdbb4a51f406f6e3))
30
+
31
+
32
+ * Merge branch 'tm-2939-cards-v2-filters' into 'master' ([1cbd408](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1cbd4086826ea8fcd272e82af738bfbe88e57ed6))
33
+ * Merge branch 'tm-2833-schema-bible' into 'master' ([b288f2d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b288f2dcdd7bd29bb506f581026cc45b72ebe6e6))
34
+
35
+ ## [8.0.7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v8.0.6...v8.0.7) (2022-07-08)
36
+
37
+
38
+ ### Bug Fixes
39
+
40
+ * author box new props ([19073c7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/19073c7dc36ceb3eddbf435b7f78f73c4ff7ff2a))
41
+
42
+
43
+ * Merge branch 'tm-2928-author-box-props' into 'master' ([5d00333](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5d0033339528449731be000c428006e80db8eb79))
44
+
1
45
  ## [8.0.6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v8.0.5...v8.0.6) (2022-07-06)
2
46
 
3
47
 
@@ -61,6 +61,7 @@ function createArchivePage(pageObject, marketSections, prefilledModules, createP
61
61
  if (chunked) {
62
62
  chunked.forEach((value, index) => {
63
63
  const page = cloneDeep(pageObject);
64
+ page.hasArchive = true;
64
65
  const numOfPages = chunked.length;
65
66
  const archive = cloneDeep(page.sections.main.modules[archiveModuleIndex]);
66
67
  archive.currentPage = 1 + index; // 0 skip 0
@@ -82,6 +83,7 @@ function createArchivePage(pageObject, marketSections, prefilledModules, createP
82
83
  });
83
84
  } else {
84
85
  const page = cloneDeep(pageObject);
86
+ page.hasArchive = true;
85
87
  createPage({
86
88
  path: page.path,
87
89
  component: require.resolve(appName),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "8.0.6",
3
+ "version": "8.0.9",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "main": "index.js",
6
6
  "GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
@@ -22,6 +22,7 @@
22
22
  "@loadable/server": "^5.14.2",
23
23
  "@loadable/webpack-plugin": "^5.14.2",
24
24
  "@reach/router": "^1.3.3",
25
+ "@react-icons/all-files": "^4.1.0",
25
26
  "axios": "^0.21.1",
26
27
  "chalk": "^4.1.0",
27
28
  "cross-env": "^7.0.3",
@@ -54,7 +55,6 @@
54
55
  "react-dom": "^17.0.2",
55
56
  "react-google-recaptcha": "^2.1.0",
56
57
  "react-helmet": "^6.0.0",
57
- "react-icons": "^4.3.1",
58
58
  "react-lazyload": "^3.2.0",
59
59
  "react-masonry-css": "^1.0.16",
60
60
  "sass": "^1.49.9"
@@ -6,7 +6,7 @@ import {
6
6
  PRIMARY_STORY,
7
7
  ArgsTable,
8
8
  } from '@storybook/addon-docs/blocks';
9
- import { FaTwitter } from 'react-icons/fa';
9
+ import { FaTwitter } from '@react-icons/all-files/fa/FaTwitter';
10
10
 
11
11
  import Author from '.';
12
12
 
@@ -1,6 +1,9 @@
1
1
  /* eslint-disable react/no-danger */
2
2
  import React, { useContext } from 'react';
3
- import { FaInstagram, FaFacebookSquare, FaTwitter, FaLinkedin } from 'react-icons/fa';
3
+ import { FaInstagram } from '@react-icons/all-files/fa/FaInstagram';
4
+ import { FaFacebookSquare } from '@react-icons/all-files/fa/FaFacebookSquare';
5
+ import { FaTwitter } from '@react-icons/all-files/fa/FaTwitter';
6
+ import { FaLinkedin } from '@react-icons/all-files/fa/FaLinkedin';
4
7
  import PropTypes from 'prop-types';
5
8
  import { translate, imagePrettyUrl, getAltText } from '~helpers/getters';
6
9
  import styles from './author-box.module.scss';
@@ -8,7 +11,7 @@ import LazyImage from '~hooks/lazy-image';
8
11
  import Link from '~hooks/link';
9
12
  import { Context } from '~context/TranslationsProvider';
10
13
 
11
- export default function AuthorBox({ author }) {
14
+ export default function AuthorBox({ author, preElement = null }) {
12
15
  const { translations } = useContext(Context) || {};
13
16
  const socialLinks = [
14
17
  { id: 'fb', link: author.facebook_profile, icon: <FaFacebookSquare /> },
@@ -99,6 +102,7 @@ export default function AuthorBox({ author }) {
99
102
  )}
100
103
  </div>
101
104
  </div>
105
+ {preElement}
102
106
  </div>
103
107
  );
104
108
  }
@@ -125,6 +129,7 @@ AuthorBox.propTypes = {
125
129
  biography: PropTypes.string,
126
130
  profile_page_path: PropTypes.string,
127
131
  }),
132
+ preElement: PropTypes.node,
128
133
  translations: PropTypes.shape({
129
134
  read_more: PropTypes.string,
130
135
  }),
@@ -1,8 +1,11 @@
1
1
  .customSelectContainer {
2
2
  width: 100%;
3
- max-width: 30rem;
4
3
  height: 4.8rem;
5
4
  position: relative;
5
+ @include min(tablet) {
6
+ max-width: 30rem;
7
+ margin-left: auto;
8
+ }
6
9
  .select {
7
10
  position: relative;
8
11
  display: block;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { FaAngleRight } from 'react-icons/fa';
3
+ import { FaAngleRight } from '@react-icons/all-files/fa/FaAngleRight';
4
4
 
5
5
  import Link from '~hooks/link';
6
6
  import styles from './module-title.module.scss';
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { FaFacebookF, FaTwitter } from 'react-icons/fa';
3
+ import { FaFacebookF } from '@react-icons/all-files/fa/FaFacebookF';
4
+ import { FaTwitter } from '@react-icons/all-files/fa/FaTwitter';
5
+
4
6
  import { getUrl } from '~helpers/getters';
5
7
 
6
8
  import styles from './open-graph.module.scss';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { IoMdArrowRoundForward } from 'react-icons/io';
3
+ import { IoMdArrowRoundForward } from '@react-icons/all-files/io/IoMdArrowRoundForward';
4
4
 
5
5
  import styles from './article.module.scss';
6
6
 
@@ -6,7 +6,7 @@ import {
6
6
  PRIMARY_STORY,
7
7
  ArgsTable,
8
8
  } from '@storybook/addon-docs/blocks';
9
- import { MdCheck } from 'react-icons/md';
9
+ import { MdCheck } from '@react-icons/all-files/md/MdCheck';
10
10
 
11
11
  import SellingPoints from '.';
12
12
 
@@ -2,8 +2,8 @@
2
2
  /* eslint-disable react/forbid-prop-types */
3
3
  import React, { useContext } from 'react';
4
4
  import PropTypes from 'prop-types';
5
- import { BiSitemap } from 'react-icons/bi';
6
- import { IoMdLink } from 'react-icons/io';
5
+ import { BiSitemap } from '@react-icons/all-files/bi/BiSitemap';
6
+ import { IoMdLink } from '@react-icons/all-files/io/IoMdLink';
7
7
  // eslint-disable-next-line import/no-extraneous-dependencies
8
8
  import Masonry from 'react-masonry-css';
9
9
  import { Context } from '~context/TranslationsProvider';
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable camelcase */
4
4
  import React from 'react';
5
5
  import PropTypes from 'prop-types';
6
- import { GrFormNextLink } from 'react-icons/gr';
6
+ import { GrFormNextLink } from '@react-icons/all-files/gr/GrFormNextLink';
7
7
  import Button from '~atoms/button';
8
8
  import LazyImage from '~hooks/lazy-image';
9
9
  import keygen from '~helpers/keygen';
@@ -0,0 +1,2 @@
1
+ .contentIntro {
2
+ }
@@ -5,6 +5,8 @@ import LazyImage from '~hooks/lazy-image';
5
5
  import { parseCss } from '~helpers/css-parser';
6
6
  import { parseContentImageUrl } from '~helpers/strings';
7
7
 
8
+ import styles from './content-intro.scss';
9
+
8
10
  export default function index({ content }) {
9
11
  const replaceMedia = (node) => {
10
12
  if (node.name === 'iframe') {
@@ -26,7 +28,7 @@ export default function index({ content }) {
26
28
  };
27
29
 
28
30
  return (
29
- <div>
31
+ <div className={styles.contentIntro}>
30
32
  {parse(content, {
31
33
  replace: replaceMedia,
32
34
  })}
@@ -8,7 +8,7 @@ import {
8
8
  ArgsTable,
9
9
  // eslint-disable-next-line import/no-extraneous-dependencies
10
10
  } from '@storybook/addon-docs/blocks';
11
- import { FaChevronRight } from 'react-icons/fa';
11
+ import { FaChevronRight } from '@react-icons/all-files/fa/FaChevronRight';
12
12
 
13
13
  import LinkList from '.';
14
14
  import styles from './link-list.module.scss';
@@ -1,6 +1,10 @@
1
1
  import React, { useContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { MdLastPage, MdFirstPage, MdChevronRight, MdChevronLeft } from 'react-icons/md';
3
+ import { MdLastPage } from '@react-icons/all-files/md/MdLastPage';
4
+ import { MdFirstPage } from '@react-icons/all-files/md/MdFirstPage';
5
+ import { MdChevronRight } from '@react-icons/all-files/md/MdChevronRight';
6
+ import { MdChevronLeft } from '@react-icons/all-files/md/MdChevronLeft';
7
+
4
8
  import { translate } from '~helpers/getters';
5
9
  import Link from '~hooks/link';
6
10
  import { Context } from '~context/TranslationsProvider';
@@ -6,12 +6,15 @@ import {
6
6
  PRIMARY_STORY,
7
7
  ArgsTable,
8
8
  } from '@storybook/addon-docs/blocks';
9
- import { FaRegThumbsUp, FaRegThumbsDown } from 'react-icons/fa';
10
- import { MdCheck, MdClose } from 'react-icons/md';
9
+ import { FaRegThumbsUp } from '@react-icons/all-files/fa/FaRegThumbsUp';
10
+ import { FaRegThumbsDown } from '@react-icons/all-files/fa/FaRegThumbsDown';
11
+
12
+ import { MdCheck } from '@react-icons/all-files/md/MdCheck';
13
+ import { MdClose } from '@react-icons/all-files/md/MdClose';
11
14
 
12
15
  import ProsCons from '.';
13
16
 
14
- const icons = [
17
+ const iconsSvg = [
15
18
  <FaRegThumbsUp size="50" />,
16
19
  <FaRegThumbsDown size="50" />,
17
20
  <MdCheck size="25" color="#17d670" />,
@@ -92,5 +95,5 @@ Default.args = {
92
95
  },
93
96
  pros: 'Pros',
94
97
  cons: 'Cons',
95
- icons: icons,
98
+ icons: iconsSvg,
96
99
  };
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect, useRef, useCallback, useContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { navigate } from 'gatsby';
4
- import { FaSearch } from 'react-icons/fa';
4
+ import { FaSearch } from '@react-icons/all-files/fa/FaSearch';
5
5
  import loadable from '@loadable/component';
6
6
  import LazyImage from '~hooks/lazy-image';
7
7
  import ConditionalWrapper from '~atoms/conditional-wrapper';
@@ -396,7 +396,7 @@ Search.propTypes = {
396
396
  pageSearchOptions: PropTypes.shape({
397
397
  useArchive: PropTypes.bool,
398
398
  archiveOptions: PropTypes.shape({
399
- titles: PropTypes.arrayOf(PropTypes.object),
399
+ titles: PropTypes.arrayOf(PropTypes.shape({})),
400
400
  includeOptions: PropTypes.objectOf(PropTypes.string),
401
401
  }),
402
402
  tabs: PropTypes.bool,
@@ -1,6 +1,6 @@
1
1
  import React, { useContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { MdCheck } from 'react-icons/md';
3
+ import { MdCheck } from '@react-icons/all-files/md/MdCheck';
4
4
  import Bonus from '~atoms/bonus';
5
5
  import { Context } from '~context/TranslationsProvider';
6
6
  import SellingPoints from '~atoms/selling-points';
@@ -1,7 +1,7 @@
1
1
  import React, { useContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import loadable from '@loadable/component';
4
- import { FaSearch } from 'react-icons/fa';
4
+ import { FaSearch } from '@react-icons/all-files/fa/FaSearch';
5
5
 
6
6
  import { toggleScroll } from '~helpers/scroll';
7
7
 
@@ -21,7 +21,7 @@ describe('Getters Helper', () => {
21
21
 
22
22
  test('getPageTitle()', () => {
23
23
  window.location.search = 's=hello';
24
- expect(Getters.getPageTitle({ path: 's' })).toEqual('You searched for hello - Irishluck.ie');
24
+ expect(Getters.getPageTitle({ path: 's' })).toEqual('You searched for hello - irishluck.ie');
25
25
  });
26
26
 
27
27
  test('getExtraField()', () => {
@@ -85,10 +85,19 @@ export function filterGames(pages, selectedCategories, selectedProviders) {
85
85
  return pagesFiltered;
86
86
  }
87
87
 
88
+ export function filterInactiveOperators(items) {
89
+ return items.filter(
90
+ (page) =>
91
+ !settings.filter_cards_modules[process.env.GATSBY_SITE_NAME].includes(
92
+ page.relation && page.relation.status
93
+ )
94
+ );
95
+ }
96
+
88
97
  export function filterOperators(pages, selectedProviders, selectedTypes) {
89
98
  const pagesFiltered = [];
90
99
  if (!selectedTypes && !selectedProviders) {
91
- return pages;
100
+ return filterInactiveOperators(pages);
92
101
  }
93
102
 
94
103
  pages.forEach((page) => {
@@ -104,7 +113,7 @@ export function filterOperators(pages, selectedProviders, selectedTypes) {
104
113
  });
105
114
  });
106
115
 
107
- return pagesFiltered;
116
+ return filterInactiveOperators(pagesFiltered);
108
117
  }
109
118
 
110
119
  export function processCardsV2(module, pagesCloned, pagesMappedById, pageId) {
@@ -198,16 +207,7 @@ export function processCardsV2(module, pagesCloned, pagesMappedById, pageId) {
198
207
 
199
208
  // Applying sorting
200
209
  if (sortType === 'random') {
201
- const samplePages =
202
- module.cards_page_type !== 'operator'
203
- ? uniquePages
204
- : uniquePages.filter(
205
- (page) =>
206
- !settings.filter_cards_modules[process.env.GATSBY_SITE_NAME].includes(
207
- page.relation && page.relation.status
208
- )
209
- );
210
- module.items = sampleSize(samplePages, itemLimit);
210
+ module.items = sampleSize(uniquePages, itemLimit);
211
211
  } else if (sortType === 'latest') {
212
212
  if (uniquePages.length > 0) {
213
213
  uniquePages.sort((a, b) => (a.created_at > b.created_at ? -1 : 1));
@@ -217,7 +217,7 @@ export function processCardsV2(module, pagesCloned, pagesMappedById, pageId) {
217
217
  }
218
218
  }
219
219
 
220
- if (styleName === 'comparison_table' && pageId !== null) {
220
+ if (styleName === 'comparison_table' && pageId !== null && pageType === 'operator') {
221
221
  shiftFirstOperator(pageId, module, pagesMappedById);
222
222
  }
223
223
 
@@ -9,7 +9,7 @@ import {
9
9
  ArgsTable,
10
10
  // eslint-disable-next-line import/no-extraneous-dependencies
11
11
  } from '@storybook/addon-docs/blocks';
12
- import { FaRegFrownOpen } from 'react-icons/fa';
12
+ import { FaRegFrownOpen } from '@react-icons/all-files/fa/FaRegFrownOpen';
13
13
 
14
14
  import { imagePrettyUrl } from '~helpers/getters';
15
15
  import LazyImage from '.';
@@ -6,7 +6,7 @@ import {
6
6
  PRIMARY_STORY,
7
7
  ArgsTable,
8
8
  } from '@storybook/addon-docs/blocks';
9
- import { MdClose } from 'react-icons/md';
9
+ import { MdClose } from '@react-icons/all-files/md/MdClose';
10
10
 
11
11
  import Modal from '.';
12
12
  import ModalProvider from './modalContext';
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { render, cleanup, fireEvent } from '@testing-library/react';
3
3
  import '@testing-library/jest-dom/extend-expect';
4
- import { MdClose } from 'react-icons/md';
4
+ import { MdClose } from '@react-icons/all-files/md/MdClose';
5
5
 
6
6
  import Modal from '.';
7
7
  import ModalProvider from './modalContext';
package/tests/envVars.js CHANGED
@@ -1,4 +1,4 @@
1
- process.env.GATSBY_SITE_NAME = 'Irishluck.ie';
1
+ process.env.GATSBY_SITE_NAME = 'irishluck.ie';
2
2
  process.env.GATSBY_SITE_URL = 'http://urltest.com/';
3
3
  process.env.IMAGE_CDN_URL = 'https://cdn.images.com';
4
4
  process.env.TRACKER_LINK_FORMAT_MAIN = '[no],[visit],short_name';