gatsby-matrix-theme 34.0.18 → 34.0.20

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
+ ## [34.0.20](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v34.0.19...v34.0.20) (2023-10-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * expert review ([66d68eb](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/66d68eb90c9af31a26c9eabf3b12abd52e19f5d2))
7
+
8
+ ## [34.0.19](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v34.0.18...v34.0.19) (2023-10-20)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * expert summary ([d238c4d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d238c4d6f003f94a46e24bc2c4a8e3c67c1ef85d))
14
+ * make a small fix ([f2538d0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f2538d0974c262885c794f82849f5fee663bbbb2))
15
+ * make style ([5dc1b52](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5dc1b52860df11dff679777fe0969ce31c27ab05))
16
+
17
+
18
+ * Merge branch 'tm-3707-expert-review-summary' into 'master' ([5944b11](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5944b119ced13c0548164dc9b601447681a17e23))
19
+
1
20
  ## [34.0.18](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v34.0.17...v34.0.18) (2023-10-19)
2
21
 
3
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "34.0.18",
3
+ "version": "34.0.20",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import TemplateTwo from './template-two';
4
4
  import TemplateOne from './template-one';
5
5
 
6
- export default function FeedBack({ templateName = 'template_two', ...rest }) {
6
+ export default function FeedBack({ templateName = 'template_one', ...rest }) {
7
7
  switch (templateName) {
8
8
  case 'template_two':
9
9
  return <TemplateTwo {...rest} />;
@@ -8,7 +8,7 @@
8
8
  display: grid;
9
9
  grid-template-columns: 1fr auto;
10
10
  grid-template-rows: auto;
11
- max-width:calc(var(--main-container-max) - 2.4rem);
11
+ max-width:calc(var(--main-container-max) - 4.8rem) !important;
12
12
 
13
13
  @include min(tablet) {
14
14
  display: grid;
@@ -48,7 +48,9 @@ const TemplateOne = ({
48
48
  <p>
49
49
  {translate(translations, 'updated_on', 'Updated on')} {formatDate(page.updated_at)}
50
50
  </p>
51
- {showExperience && <div className={styles.experience}>{author?.experience}</div>}
51
+ {showExperience && author?.experience && (
52
+ <div className={styles.experience}>{author?.experience}</div>
53
+ )}
52
54
  </div>
53
55
  {operatorSummary && (
54
56
  <div
@@ -6,16 +6,18 @@ import { generatePlaceholderString } from 'gatsby-core-theme/src/helpers/generat
6
6
  import { Context } from 'gatsby-core-theme/src/context/MainProvider';
7
7
  import Bonus from 'gatsby-core-theme/src/components/molecules/bonus/template-one';
8
8
  import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
9
+ import Tnc from 'gatsby-core-theme/src/components/molecules/tnc';
9
10
  import AuthorName from '../../../atoms/author/template-one';
10
11
  import styles from './template-three.module.scss';
11
12
 
12
- const TemplateTwo = ({
13
+ const TemplateThree = ({
13
14
  page,
14
15
  tnc = false,
15
16
  tncFixed = false,
16
17
  imgWidth = 128,
17
18
  imgHeight = 146,
18
19
  verify = '../../../../images/verifiedAuthor.svg',
20
+ tncContainer = false,
19
21
  }) => {
20
22
  const { translations } = useContext(Context) || {};
21
23
  const operatorData = page?.relation;
@@ -27,8 +29,11 @@ const TemplateTwo = ({
27
29
  operatorData
28
30
  );
29
31
 
32
+ const showTnc =
33
+ tncContainer && operatorData?.extra_fields?.terms_and_conditions_text_enabled === '1';
34
+
30
35
  return (
31
- <div className={styles?.summaryLayout || ''}>
36
+ <div className={`${styles?.summaryLayout || ''} ${showTnc ? styles.tncContainer : ''}`}>
32
37
  <div className={styles.details}>
33
38
  <h2>{title}</h2>
34
39
 
@@ -57,16 +62,27 @@ const TemplateTwo = ({
57
62
  operator={operatorData}
58
63
  template={page?.template}
59
64
  />
65
+
66
+ {showTnc && (
67
+ <span className={styles?.tnc || ''}>
68
+ <Tnc
69
+ operator={operatorData}
70
+ hasCollapse={false}
71
+ contentText={operatorData?.extra_fields?.terms_and_conditions}
72
+ />
73
+ </span>
74
+ )}
60
75
  </div>
61
76
  );
62
77
  };
63
78
 
64
- TemplateTwo.propTypes = {
79
+ TemplateThree.propTypes = {
65
80
  imgWidth: PropTypes.string,
66
81
  imgHeight: PropTypes.string,
67
82
  tnc: PropTypes.bool,
68
83
  tncFixed: PropTypes.bool,
69
84
  verify: PropTypes.string,
85
+ tncContainer: PropTypes.bool,
70
86
  page: PropTypes.shape({
71
87
  reviewer: PropTypes.shape({}),
72
88
  relation_type: PropTypes.string,
@@ -80,4 +96,4 @@ TemplateTwo.propTypes = {
80
96
  }),
81
97
  };
82
98
 
83
- export default TemplateTwo;
99
+ export default TemplateThree;
@@ -3,11 +3,11 @@
3
3
  background: var(--operator-summery-backgorund, #fff);
4
4
  box-shadow: 0px 4px 6px -2px rgba(27, 27, 28, 0.02), 0px 12px 16px -4px rgba(27, 27, 28, 0.05);
5
5
  width: calc(100% - 32px);
6
- padding:0 1.6rem;
7
- max-width: calc(var(--main-container-max) - 4.8rem) !important;
6
+ padding: 0 1.6rem;
7
+ max-width: calc(var(--main-container-max) - 4.8rem) !important;
8
8
  margin: 0 auto;
9
9
  // Bonus module
10
- > div:last-of-type {
10
+ > div:last-of-type:not(.tnc) {
11
11
  padding-bottom: 2.4rem;
12
12
  > div {
13
13
  @include min(tablet) {
@@ -81,6 +81,7 @@
81
81
  }
82
82
  }
83
83
  }
84
+
84
85
  .details {
85
86
  box-sizing: border-box;
86
87
  h2 {
@@ -92,13 +93,19 @@
92
93
  font-weight: 700;
93
94
  line-height: 3.2rem;
94
95
  text-transform: capitalize;
95
- @include min(tablet){
96
+ @include min(tablet) {
96
97
  font-size: 3.2rem;
97
98
  line-height: 4rem;
98
99
  }
99
100
  }
100
101
  }
101
102
 
103
+ .tncContainer {
104
+ > div:last-of-type:not(.tnc) {
105
+ padding-bottom: 0rem;
106
+ }
107
+ }
108
+
102
109
  .description {
103
110
  color: #515156;
104
111
  text-align: justify;
@@ -138,3 +145,9 @@
138
145
  }
139
146
  }
140
147
  }
148
+
149
+ .tnc {
150
+ display: block;
151
+ padding-top: 0.8rem;
152
+ padding-bottom: 2.4rem;
153
+ }
@@ -14,6 +14,12 @@ import TemplateThree from '.';
14
14
 
15
15
  const pageData = getOperatorData();
16
16
 
17
+ pageData.relation.extra_fields = {
18
+ terms_and_conditions:
19
+ '18+ – Lorem ipsum dolor sit amet, consectetur adipiscing elit. Tellus proin nunc, nunc est nec mattis augue gravida volutpat.',
20
+ terms_and_conditions_text_enabled: '1',
21
+ };
22
+
17
23
  export default {
18
24
  title: 'Theme/Modules/Template Blocks/Operator review page/Review Summary/Template Three',
19
25
  component: TemplateThree,
@@ -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.ee7dae1a.iframe.bundle.js"></script><script src="970.c147cf4f.iframe.bundle.js"></script><script src="main.736baf23.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.ee7dae1a.iframe.bundle.js"></script><script src="970.c147cf4f.iframe.bundle.js"></script><script src="main.cfd59b4d.iframe.bundle.js"></script></body></html>