gatsby-matrix-theme 35.0.1 → 35.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,14 @@
1
+ ## [35.0.2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v35.0.1...v35.0.2) (2023-11-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * coupon ([073b9f9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/073b9f9f768db42f139320cc8256a30731166e93))
7
+ * remove events ([aa076aa](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/aa076aa80608e382d4fad6cf2248495826200fe3))
8
+
9
+
10
+ * Merge branch 'tm-3743-coupon' into 'master' ([115f7d5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/115f7d5b648cfe41f7497a56e50ddeb8c22b3263))
11
+
1
12
  ## [35.0.1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v35.0.0...v35.0.1) (2023-11-01)
2
13
 
3
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "35.0.1",
3
+ "version": "35.0.2",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -8,9 +8,10 @@ import styles from './coupon.module.scss';
8
8
  const Coupon = ({
9
9
  code = '',
10
10
  status = 'active',
11
+ translationKey = 'code',
12
+ defaultTranslation = 'Code:',
11
13
  templateOne = true,
12
14
  showprefix = false,
13
- translationKey = 'code',
14
15
  icon = '../../../images/copyIcon.svg',
15
16
  checkIcon = '../../../images/check-circle.svg',
16
17
  showIcon = true,
@@ -30,10 +31,12 @@ const Coupon = ({
30
31
  return (
31
32
  <div className={`${styles?.couponContainer || ''} ${!templateOne ? styles.templateTwo : ''}`}>
32
33
  {!templateOne && showprefix && (
33
- <span className={styles.prefix}> {translate(translations, translationKey, 'Code:')}</span>
34
+ <span className={styles.prefix}>
35
+ {translate(translations, translationKey, defaultTranslation)}
36
+ </span>
34
37
  )}
35
38
  <button
36
- onClick={() => copyToClipBoard(code)}
39
+ onClick={() => (code !== null || status !== 'inactive' ? copyToClipBoard(code) : '')}
37
40
  type="button"
38
41
  className={`${styles.coupon} ${copySuccess ? styles.copied : ''} ${
39
42
  status === 'inactive' ? styles.disabled : ''
@@ -44,7 +47,7 @@ const Coupon = ({
44
47
  <>
45
48
  {templateOne && showprefix && (
46
49
  <span className={styles.prefix}>
47
- {translate(translations, translationKey, 'Code:')}
50
+ {translate(translations, translationKey, defaultTranslation)}
48
51
  </span>
49
52
  )}
50
53
  {code || translate(translations, 'no_coupon_available', 'Not Needed')}
@@ -70,6 +73,7 @@ Coupon.propTypes = {
70
73
  checkIcon: PropTypes.string,
71
74
  showIcon: PropTypes.bool,
72
75
  translationKey: PropTypes.string,
76
+ defaultTranslation: PropTypes.string,
73
77
  };
74
78
 
75
79
  export default Coupon;
@@ -23,13 +23,9 @@ const FooterNavigation = ({ section, isStorybook = false }) => {
23
23
  };
24
24
  useEffect(() => {
25
25
  window.addEventListener('scroll', handleEvent);
26
- window.addEventListener('mousemove', handleEvent);
27
- window.addEventListener('touchstart', handleEvent);
28
26
 
29
27
  return () => {
30
28
  window.removeEventListener('scroll', handleEvent);
31
- window.removeEventListener('mousemove', handleEvent);
32
- window.removeEventListener('touchstart', handleEvent);
33
29
  };
34
30
  }, []);
35
31
 
@@ -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":"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/table","files":"table.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/table\\/table\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/text/Images","files":"text.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/text\\/Images\\/text\\.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/pagination","files":"pagination.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/pagination\\/pagination\\.stories\\.js)$"}];</script><script src="runtime~main.445065e1.iframe.bundle.js"></script><script src="970.45afd955.iframe.bundle.js"></script><script src="main.4b4c5c60.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":"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/table","files":"table.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/table\\/table\\.stories\\.js)$"},{"titlePrefix":"","directory":"../node_modules/gatsby-core-theme/src/components/molecules/content/text/Images","files":"text.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/content\\/text\\/Images\\/text\\.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/pagination","files":"pagination.stories.js","importPathMatcher":"^(?:\\.\\.\\/node_modules\\/gatsby-core-theme\\/src\\/components\\/molecules\\/pagination\\/pagination\\.stories\\.js)$"}];</script><script src="runtime~main.445065e1.iframe.bundle.js"></script><script src="970.45afd955.iframe.bundle.js"></script><script src="main.5f8bd0f3.iframe.bundle.js"></script></body></html>