gatsby-matrix-theme 37.0.0 → 37.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ ## [37.0.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v37.0.1...v37.0.2) (2023-11-15)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * added prop for cookie modal ([5410c92](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5410c9222abbe1589ee116d33a1ef2b6d39d5837))
7
+
8
+ ## [37.0.1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v37.0.0...v37.0.1) (2023-11-15)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * added new toplist template ([8e8baf4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8e8baf44dc2cd0dc8c14fa87130300532d53beb1))
14
+ * buttons fixes ([31b2695](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/31b2695dd4384e6b828b43a35327e5d46d59f2d0))
15
+ * use the iframe module ([1938e14](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/1938e1408434990d20b53538ff756e96263fa0be))
16
+
17
+
18
+ * Merge branch 'tm-3818-iframe' into 'master' ([0a7e047](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0a7e047c02439c896403549a131c2a5b6b293a7d))
19
+
1
20
  # [37.0.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v36.0.4...v37.0.0) (2023-11-13)
2
21
 
3
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "37.0.0",
3
+ "version": "37.0.2",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -150,12 +150,10 @@ const NewsletterForm = ({
150
150
  }
151
151
 
152
152
  const handelSubmit = (e) => {
153
- e.preventDefault();
154
- const { elements } = e.target;
155
- if (validationForm(elements)) {
153
+ if (validationForm(form.current)) {
156
154
  handleApi
157
- ? handleApi(elements.name.value, elements.email.value, ip)
158
- : bacomApi(elements.name.value, elements.email.value);
155
+ ? handleApi(form.current.name.value, form.current.email.value, ip)
156
+ : bacomApi(form.current.name.value, form.current.email.value);
159
157
  }
160
158
  };
161
159
 
@@ -213,7 +211,7 @@ const NewsletterForm = ({
213
211
  />
214
212
  )}
215
213
  <PrivacyandSuccess
216
- onclick={() => handelSubmit()}
214
+ onSubmit={() => handelSubmit()}
217
215
  loading={setLogading || loading}
218
216
  btnText={formTextTranslated.buttonText}
219
217
  privacyText={privacyText}
@@ -9,7 +9,7 @@ const PrivacyandSuccess = ({ privacyText, btnText, onSubmit = null }) => (
9
9
  // eslint-disable-next-line react/no-danger
10
10
  <p className={styles?.privacytext || ''} dangerouslySetInnerHTML={{ __html: privacyText }} />
11
11
  ) : null}
12
- <Button btnText={btnText} buttonType="primary" onClick={() => onSubmit()} />
12
+ <Button isInternalLink={false} btnText={btnText} buttonType="primary" onClick={onSubmit} />
13
13
  </div>
14
14
  );
15
15
 
@@ -14,6 +14,8 @@ import styles from './cookie-modal.module.scss';
14
14
  const CookieModal = ({
15
15
  handleAcceptCookies,
16
16
  handleDeclineCookies,
17
+ declineButtonType = 'secondary',
18
+ buttonSize = 'm',
17
19
  closeModal,
18
20
  cookieLink = {
19
21
  title: '',
@@ -124,7 +126,7 @@ const CookieModal = ({
124
126
  btnText={translate(translations, 'cookie_accept_all_button', 'Accept All Cookies')}
125
127
  isInternalLink={false}
126
128
  buttonType="primary"
127
- buttonSize="m"
129
+ buttonSize={buttonSize}
128
130
  gtmClass="cookie-consent-gtm btn-cta"
129
131
  />
130
132
  )}
@@ -136,8 +138,8 @@ const CookieModal = ({
136
138
  'I reject Non-Necessary'
137
139
  )}
138
140
  isInternalLink={false}
139
- buttonType="secondary"
140
- buttonSize="m"
141
+ buttonType={declineButtonType}
142
+ buttonSize={buttonSize}
141
143
  gtmClass="cookie-consent-gtm btn-cta"
142
144
  />
143
145
  </div>
@@ -189,7 +191,7 @@ const CookieModal = ({
189
191
  btnText={translate(translations, 'cookie_confirm_button', 'Confirm my choices')}
190
192
  isInternalLink={false}
191
193
  buttonType="primary"
192
- buttonSize="m"
194
+ buttonSize={buttonSize}
193
195
  gtmClass="cookie-consent-gtm btn-cta"
194
196
  />
195
197
  </div>
@@ -204,6 +206,8 @@ CookieModal.propTypes = {
204
206
  handleDeclineCookies: PropTypes.func,
205
207
  closeModal: PropTypes.func,
206
208
  logo: PropTypes.string,
209
+ buttonSize: PropTypes.string,
210
+ declineButtonType: PropTypes.string,
207
211
  templateTwo: PropTypes.bool,
208
212
  cookieLink: PropTypes.shape({
209
213
  title: PropTypes.string,
@@ -25,8 +25,8 @@
25
25
  cursor: pointer;
26
26
  }
27
27
 
28
- button {
29
- align-self: end;
28
+ a {
29
+ align-self: flex-end;
30
30
  height: 4.8rem !important;
31
31
  width: 100%;
32
32
  }
@@ -79,7 +79,10 @@ const Modules = ({ module, page, pageContext, index, exclOperator }) => {
79
79
  return loadable(() => import('../../../../components/molecules/operator-summary'));
80
80
  case 'game_iframe':
81
81
  case 'iframe':
82
- return loadable(() => import('../../../../components/molecules/game-iframe'));
82
+ if (moduleItem?.value_type === 'template_block') {
83
+ return loadable(() => import('../../../../components/molecules/game-iframe'));
84
+ }
85
+ return loadable(() => import('gatsby-core-theme/src/components/atoms/iframe'));
83
86
  // Template blocks
84
87
  case 'info_grid':
85
88
  case 'information_grid':
@@ -126,18 +129,26 @@ const Modules = ({ module, page, pageContext, index, exclOperator }) => {
126
129
  ? 'archiveLabel'
127
130
  : null;
128
131
 
129
- const extraProps =
130
- module.name === 'bonus'
131
- ? {
132
+ const extraProps = () => {
133
+ switch (module.name) {
134
+ case 'bonus':
135
+ return {
132
136
  operator: module?.value,
133
137
  logo: module?.value?.logo_url,
134
138
  hasLink: true,
135
139
  prettyLink: prettyTracker(module?.value, 'main', false, page?.template),
136
140
  isStickyCta: false,
137
- }
138
- : {
141
+ };
142
+ case 'iframe':
143
+ return {
144
+ src: module?.iframe_source,
145
+ };
146
+ default:
147
+ return {
139
148
  anchorLabel,
140
149
  };
150
+ }
151
+ };
141
152
 
142
153
  const moduleClassName = `${module.name}Module`;
143
154
 
@@ -183,7 +194,7 @@ const Modules = ({ module, page, pageContext, index, exclOperator }) => {
183
194
  module={module}
184
195
  page={page}
185
196
  pageContext={pageContext}
186
- {...extraProps}
197
+ {...extraProps()}
187
198
  exclOperator={exclOperator}
188
199
  isHomepageFirstModule={homepageFirstModule}
189
200
  />
@@ -18,6 +18,7 @@ const CookieConsent = ({
18
18
  location = 'bottom',
19
19
  showOnScroll = true,
20
20
  settingsCookie,
21
+ settingsButtonType = 'secondary',
21
22
  isPageHomepage,
22
23
  type,
23
24
  cookieImage = '../../../images/cookie.png',
@@ -64,7 +65,7 @@ const CookieConsent = ({
64
65
  isInternalLink={false}
65
66
  onClick={() => setShowModal(!showModal)}
66
67
  btnText={translate(translations, 'cookie_setting_button', 'Cookie Setting')}
67
- buttonType="secondary"
68
+ buttonType={settingsButtonType}
68
69
  buttonSize="m"
69
70
  gtmClass="cookie-consent-gtm btn-cta"
70
71
  />
@@ -113,6 +114,7 @@ CookieConsent.propTypes = {
113
114
  type: PropTypes.string,
114
115
  cookieName: PropTypes.string,
115
116
  showOnScroll: PropTypes.bool,
117
+ settingsButtonType: PropTypes.string,
116
118
  isPageHomepage: PropTypes.bool,
117
119
  cookieImage: PropTypes.string,
118
120
  logo: PropTypes.string,
@@ -11,6 +11,7 @@ import Row from '../../../../../components/molecules/toplist/row/variant-one';
11
11
  import styles from './list.module.scss';
12
12
  import styleTemplateOne from './template-one.module.scss';
13
13
  import styleTemplateTwo from './template-two.module.scss';
14
+ import styleTemplateThree from './template-three.module.scss';
14
15
 
15
16
  export default function List({
16
17
  pagePath,
@@ -56,16 +57,22 @@ export default function List({
56
57
  }
57
58
  }
58
59
 
60
+ const templateStyle = () => {
61
+ switch (modulestyle) {
62
+ case 'template_two':
63
+ return styleTemplateTwo.templateTwo;
64
+ case 'template_three':
65
+ return styleTemplateThree.templateThree;
66
+ default:
67
+ return styleTemplateOne.templateOne;
68
+ }
69
+ };
70
+
71
+ const isGrid = modulestyle === 'template_two';
72
+
59
73
  return (
60
74
  <>
61
- <ul
62
- className={`${styles.list || ''} ${
63
- modulestyle === 'template_two'
64
- ? styleTemplateTwo.templateTwo || ''
65
- : styleTemplateOne.templateOne || ''
66
- } `}
67
- key={keygen()}
68
- >
75
+ <ul className={`${styles.list || ''} ${templateStyle()} `} key={keygen()}>
69
76
  {items.map((item, index) => (
70
77
  <Row
71
78
  pagePath={pagePath}
@@ -78,8 +85,9 @@ export default function List({
78
85
  key={keygen()}
79
86
  itemRefs={elRefs}
80
87
  template={template}
81
- layout={modulestyle === 'template_two' ? 'grid' : 'list'}
88
+ layout={isGrid ? 'grid' : 'list'}
82
89
  verifyIcon={verifyIcon}
90
+ showAuthor={modulestyle !== 'template_three'}
83
91
  />
84
92
  ))}
85
93
  </ul>
@@ -0,0 +1,28 @@
1
+ .templateThree {
2
+ // @include flex-direction(column);
3
+ columns: 29rem;
4
+ gap: 1rem;
5
+ counter-reset: grid;
6
+ row-gap: 2rem;
7
+
8
+ > li {
9
+ break-inside: avoid;
10
+ aspect-ratio: 4 / 3;
11
+ display: flex !important;
12
+ margin-bottom: 1rem;
13
+ margin-top: 1rem;
14
+
15
+ > div:first-child {
16
+ display: flex !important;
17
+ }
18
+
19
+ &:nth-child(3n) {
20
+ aspect-ratio: 1;
21
+ }
22
+
23
+ // &:nth-child(3n - 1) {
24
+ // aspect-ratio: 2 / 3;
25
+ // }
26
+ }
27
+ }
28
+
@@ -82,6 +82,7 @@ export default {
82
82
 
83
83
  const ToplistTemplateOne = (args) => <Toplist {...args} />;
84
84
  const ToplistTemplateTwo = (args) => <Toplist {...args} />;
85
+ const ToplistTemplateThree = (args) => <Toplist {...args} />;
85
86
 
86
87
  export const TemplateOne = ToplistTemplateOne.bind({});
87
88
  TemplateOne.args = {
@@ -92,3 +93,8 @@ export const TemplateTwo = ToplistTemplateTwo.bind({});
92
93
  TemplateTwo.args = {
93
94
  module: getSingleToplistWithTemplate('template_two'),
94
95
  };
96
+
97
+ export const TemplateThree = ToplistTemplateThree.bind({});
98
+ TemplateThree.args = {
99
+ module: getSingleToplistWithTemplate('template_three'),
100
+ };
@@ -361,4 +361,4 @@
361
361
 
362
362
 
363
363
 
364
- window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/organisms/navigation","files":"navigation.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/organisms\\/navigation\\/navigation\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/organisms/anchor","files":"anchor.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/organisms\\/anchor\\/anchor\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-one","files":"bonus.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/bonus\\/template-one\\/bonus\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-two","files":"bonus.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/bonus\\/template-two\\/bonus\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content","files":"text.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/text\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content","files":"show-more.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/show-more\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content","files":"content.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/content\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/lists","files":"lists.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/lists\\/lists\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/frame","files":"frame.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/frame\\/frame\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/table","files":"table-one.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/table\\/table-one\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/table","files":"table-two.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/table\\/table-two\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/pagination","files":"pagination.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/pagination\\/pagination\\.stories\\.js)$"}];</script><script src="runtime~main.daeb2a8f.iframe.bundle.js"></script><script src="487.2d630f0c.iframe.bundle.js"></script><script src="main.f1d5b1af.iframe.bundle.js"></script></body></html>
364
+ window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"./src","files":"**/**/**/**/**/*.stories.js","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/organisms/navigation","files":"navigation.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/organisms\\/navigation\\/navigation\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/organisms/anchor","files":"anchor.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/organisms\\/anchor\\/anchor\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-one","files":"bonus.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/bonus\\/template-one\\/bonus\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/bonus/template-two","files":"bonus.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/bonus\\/template-two\\/bonus\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content","files":"text.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/text\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content","files":"show-more.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/show-more\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content","files":"content.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/content\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/lists","files":"lists.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/lists\\/lists\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/frame","files":"frame.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/frame\\/frame\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/table","files":"table-one.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/table\\/table-one\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/table","files":"table-two.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/table\\/table-two\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/pagination","files":"pagination.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/pagination\\/pagination\\.stories\\.js)$"}];</script><script src="runtime~main.daeb2a8f.iframe.bundle.js"></script><script src="487.2d630f0c.iframe.bundle.js"></script><script src="main.670ea896.iframe.bundle.js"></script></body></html>