@mjhls/mjh-framework 1.0.1009 → 1.0.1010

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # mjh-framework v. 1.0.1009
1
+ # mjh-framework v. 1.0.1010
2
2
 
3
3
  [![NPM](https://img.shields.io/npm/v/mjh-framework.svg)](https://www.npmjs.com/package/mjh-framework) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
4
4
 
package/dist/cjs/View.js CHANGED
@@ -189,21 +189,30 @@ var DocumentGroup = function DocumentGroup(_ref) {
189
189
  if (mediaSeriesGroup.thumbnail) {
190
190
  thumbnailUrl = urlFor({ client: client, source: mediaSeriesGroup.thumbnail });
191
191
  }
192
-
192
+ var margin = article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText || article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? 'none' : '1rem';
193
193
  return React__default["default"].createElement(
194
- 'a',
195
- {
196
- href: url,
197
- className: 'doc-group',
198
- style: { display: 'flex', flexDirection: 'column', padding: '0 1rem', justifyContent: thumbnailUrl ? 'center' : 'flex-start', alignItems: 'center' } },
199
- thumbnailUrl && !disableThumbnail && React__default["default"].createElement('img', { style: { maxWidth: '220px', maxHeight: '100px', marginTop: '1rem' }, src: thumbnailUrl, alt: name }),
200
- (disableThumbnail || !thumbnailUrl) && React__default["default"].createElement('p', {
201
- style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main.main_43 ? 'left' : 'right', marginTop: '.25rem' },
202
- dangerouslySetInnerHTML: { __html: name } }),
203
- main.main_43 && !thumbnailUrl && React__default["default"].createElement(
204
- 'style',
205
- { jsx: 'true' },
206
- '\n a.doc-group {\n display: block !important;\n padding: 0 !important;\n }\n '
194
+ 'div',
195
+ null,
196
+ React__default["default"].createElement(
197
+ 'p',
198
+ { style: { textAlign: 'center', fontWeight: 600 } },
199
+ article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText ? article.documentGroupMapping[0].parent.parent.contextText : article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? article.documentGroup.parent.parent.contextText : null
200
+ ),
201
+ React__default["default"].createElement(
202
+ 'a',
203
+ {
204
+ href: url,
205
+ className: 'doc-group',
206
+ style: { display: 'flex', flexDirection: 'column', padding: '0 1rem', justifyContent: thumbnailUrl ? 'center' : 'flex-start', alignItems: 'center' } },
207
+ thumbnailUrl && !disableThumbnail && React__default["default"].createElement('img', { style: { maxWidth: '210px', maxHeight: '100px', marginTop: margin }, src: thumbnailUrl, alt: name }),
208
+ (disableThumbnail || !thumbnailUrl) && React__default["default"].createElement('p', {
209
+ style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main.main_43 ? 'left' : 'right', marginTop: '.25rem' },
210
+ dangerouslySetInnerHTML: { __html: name } }),
211
+ main.main_43 && !thumbnailUrl && React__default["default"].createElement(
212
+ 'style',
213
+ { jsx: 'true' },
214
+ '\n a.doc-group {\n display: block !important;\n padding: 0 !important;\n }\n '
215
+ )
207
216
  )
208
217
  );
209
218
  };
@@ -1057,7 +1066,7 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
1057
1066
  ind === 0 ? articleRecsQuery = articleRecsQuery.concat('[\'' + rec + '\', ') : ind === articleRecs.length - 1 ? articleRecsQuery = articleRecsQuery.concat('\'' + rec + '\']]') : articleRecsQuery = articleRecsQuery.concat('\'' + rec + '\', ');
1058
1067
  });
1059
1068
  }
1060
- //next video url
1069
+ // next video url
1061
1070
  if (sliderData) {
1062
1071
  var nextArticle = void 0;
1063
1072
  sliderData.forEach(function (data, index) {
@@ -1741,7 +1750,14 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
1741
1750
  ),
1742
1751
  React__default["default"].createElement(
1743
1752
  'div',
1744
- { className: 'mb-3 doc-group-container', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'flex-end' } },
1753
+ { className: 'mb-3 doc-group-container',
1754
+ style: {
1755
+ display: 'flex',
1756
+ justifyContent: 'space-between',
1757
+ alignItems: article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText || article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? 'flex-start' : 'flex-end',
1758
+ margin: '0, 0, 1rem, 0'
1759
+ // margin: article.documentGroup && article.documentGroup.thumbnail && article.documentGroup.thumbnail.caption ? '1rem 0 1rem 0' : '0 0 1rem 0'
1760
+ } },
1745
1761
  React__default["default"].createElement(
1746
1762
  'style',
1747
1763
  { jsx: 'true' },
package/dist/esm/View.js CHANGED
@@ -179,21 +179,30 @@ var DocumentGroup = function DocumentGroup(_ref) {
179
179
  if (mediaSeriesGroup.thumbnail) {
180
180
  thumbnailUrl = urlFor({ client: client, source: mediaSeriesGroup.thumbnail });
181
181
  }
182
-
182
+ var margin = article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText || article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? 'none' : '1rem';
183
183
  return React__default.createElement(
184
- 'a',
185
- {
186
- href: url,
187
- className: 'doc-group',
188
- style: { display: 'flex', flexDirection: 'column', padding: '0 1rem', justifyContent: thumbnailUrl ? 'center' : 'flex-start', alignItems: 'center' } },
189
- thumbnailUrl && !disableThumbnail && React__default.createElement('img', { style: { maxWidth: '220px', maxHeight: '100px', marginTop: '1rem' }, src: thumbnailUrl, alt: name }),
190
- (disableThumbnail || !thumbnailUrl) && React__default.createElement('p', {
191
- style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main_43 ? 'left' : 'right', marginTop: '.25rem' },
192
- dangerouslySetInnerHTML: { __html: name } }),
193
- main_43 && !thumbnailUrl && React__default.createElement(
194
- 'style',
195
- { jsx: 'true' },
196
- '\n a.doc-group {\n display: block !important;\n padding: 0 !important;\n }\n '
184
+ 'div',
185
+ null,
186
+ React__default.createElement(
187
+ 'p',
188
+ { style: { textAlign: 'center', fontWeight: 600 } },
189
+ article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText ? article.documentGroupMapping[0].parent.parent.contextText : article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? article.documentGroup.parent.parent.contextText : null
190
+ ),
191
+ React__default.createElement(
192
+ 'a',
193
+ {
194
+ href: url,
195
+ className: 'doc-group',
196
+ style: { display: 'flex', flexDirection: 'column', padding: '0 1rem', justifyContent: thumbnailUrl ? 'center' : 'flex-start', alignItems: 'center' } },
197
+ thumbnailUrl && !disableThumbnail && React__default.createElement('img', { style: { maxWidth: '210px', maxHeight: '100px', marginTop: margin }, src: thumbnailUrl, alt: name }),
198
+ (disableThumbnail || !thumbnailUrl) && React__default.createElement('p', {
199
+ style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main_43 ? 'left' : 'right', marginTop: '.25rem' },
200
+ dangerouslySetInnerHTML: { __html: name } }),
201
+ main_43 && !thumbnailUrl && React__default.createElement(
202
+ 'style',
203
+ { jsx: 'true' },
204
+ '\n a.doc-group {\n display: block !important;\n padding: 0 !important;\n }\n '
205
+ )
197
206
  )
198
207
  );
199
208
  };
@@ -1047,7 +1056,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1047
1056
  ind === 0 ? articleRecsQuery = articleRecsQuery.concat('[\'' + rec + '\', ') : ind === articleRecs.length - 1 ? articleRecsQuery = articleRecsQuery.concat('\'' + rec + '\']]') : articleRecsQuery = articleRecsQuery.concat('\'' + rec + '\', ');
1048
1057
  });
1049
1058
  }
1050
- //next video url
1059
+ // next video url
1051
1060
  if (sliderData) {
1052
1061
  var nextArticle = void 0;
1053
1062
  sliderData.forEach(function (data, index) {
@@ -1731,7 +1740,14 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
1731
1740
  ),
1732
1741
  React__default.createElement(
1733
1742
  'div',
1734
- { className: 'mb-3 doc-group-container', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'flex-end' } },
1743
+ { className: 'mb-3 doc-group-container',
1744
+ style: {
1745
+ display: 'flex',
1746
+ justifyContent: 'space-between',
1747
+ alignItems: article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText || article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? 'flex-start' : 'flex-end',
1748
+ margin: '0, 0, 1rem, 0'
1749
+ // margin: article.documentGroup && article.documentGroup.thumbnail && article.documentGroup.thumbnail.caption ? '1rem 0 1rem 0' : '0 0 1rem 0'
1750
+ } },
1735
1751
  React__default.createElement(
1736
1752
  'style',
1737
1753
  { jsx: 'true' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.1009",
3
+ "version": "1.0.1010",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",