@mjhls/mjh-framework 1.0.560 → 1.0.562

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,5 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.560
2
+ # mjh-framework v. 1.0.562
3
3
 
4
4
  > Foundation Framework
5
5
 
@@ -20,6 +20,8 @@ var React = require('react');
20
20
  var React__default = _interopDefault(React);
21
21
  var index = require('./index-f7ee1612.js');
22
22
  require('prop-types');
23
+ require('react-bootstrap/Row');
24
+ require('react-bootstrap/Col');
23
25
  var moment = require('./moment-66a6a284.js');
24
26
  require('next/router');
25
27
  var isSymbol = require('./isSymbol-488934a7.js');
@@ -17,6 +17,8 @@ var React = require('react');
17
17
  var React__default = _interopDefault(React);
18
18
  require('./index-f7ee1612.js');
19
19
  require('prop-types');
20
+ require('react-bootstrap/Row');
21
+ require('react-bootstrap/Col');
20
22
  require('./moment-66a6a284.js');
21
23
  var Router = require('next/router');
22
24
  var Router__default = _interopDefault(Router);
@@ -18,6 +18,8 @@ var React = require('react');
18
18
  var React__default = _interopDefault(React);
19
19
  require('./index-f7ee1612.js');
20
20
  require('prop-types');
21
+ require('react-bootstrap/Row');
22
+ require('react-bootstrap/Col');
21
23
  require('react-bootstrap/Card');
22
24
  var moment = require('./moment-66a6a284.js');
23
25
  require('next/router');
@@ -59,7 +61,6 @@ var reactTwitterEmbed = require('react-twitter-embed');
59
61
 
60
62
  var ImageSlider = function ImageSlider(props) {
61
63
  var builder = index$1.imageUrlBuilder(props.client);
62
-
63
64
  function urlFor(source) {
64
65
  return builder.image(source);
65
66
  }
@@ -109,16 +110,29 @@ var ImageSlider = function ImageSlider(props) {
109
110
  { className: 'row__inner' },
110
111
  props.data.slides.map(function (img, index) {
111
112
  var thumbnail = urlFor(img.slideshowImage).width(250);
112
- return React__default.createElement(
113
- 'div',
114
- { className: 'tile' },
115
- React__default.createElement(
113
+ if (!img.slideshowImage.link) {
114
+ return React__default.createElement(
116
115
  'div',
117
- { className: 'tile__media' },
118
- React__default.createElement('img', { className: 'tile__img', src: thumbnail, alt: '' })
119
- ),
120
- React__default.createElement('div', { style: { color: variant }, className: 'tile__info' })
121
- );
116
+ { key: index, className: 'tile' },
117
+ React__default.createElement(
118
+ 'div',
119
+ { className: 'tile__media' },
120
+ React__default.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '' })
121
+ ),
122
+ React__default.createElement('div', { style: { color: variant }, className: 'tile__info' })
123
+ );
124
+ } else {
125
+ return React__default.createElement(
126
+ 'a',
127
+ { key: index, href: img.slideshowImage.link, target: img.slideshowImage.blank ? '_target' : '_self', className: 'tile' },
128
+ React__default.createElement(
129
+ 'div',
130
+ { className: 'tile__media' },
131
+ React__default.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '' })
132
+ ),
133
+ React__default.createElement('div', { style: { color: variant }, className: 'tile__info' })
134
+ );
135
+ }
122
136
  })
123
137
  )
124
138
  ),
@@ -145,6 +159,7 @@ var PartnerDetails = function PartnerDetails(_ref) {
145
159
  pageview = _ref.pageview,
146
160
  page = _ref.page;
147
161
 
162
+
148
163
  return React__default.createElement(
149
164
  React__default.Fragment,
150
165
  null,
@@ -195,7 +210,7 @@ var PartnerDetails = function PartnerDetails(_ref) {
195
210
  React__default.createElement(BlockContent.BlockContent, _extends._extends({ serializers: getSerializers(client), blocks: partnerDetails.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
196
211
  )
197
212
  ),
198
- partnerDetails.affiliates && partnerDetails.affiliates.slides && React__default.createElement(
213
+ partnerDetails.affiliates && partnerDetails.affiliates[0] && partnerDetails.affiliates[0].slides && React__default.createElement(
199
214
  'div',
200
215
  { className: 'mb-4', style: { padding: '0 15px' } },
201
216
  React__default.createElement(
@@ -203,7 +218,7 @@ var PartnerDetails = function PartnerDetails(_ref) {
203
218
  { className: 'bb-gold' },
204
219
  'Affiliates of American Oncology Network'
205
220
  ),
206
- React__default.createElement(ImageSlider, { client: client, data: partnerDetails.affiliates })
221
+ React__default.createElement(ImageSlider, { client: client, data: partnerDetails.affiliates[0] })
207
222
  ),
208
223
  features.length > 0 && React__default.createElement(
209
224
  'div',
@@ -266,15 +281,15 @@ PartnerDetails.returnGetInitialProps = function () {
266
281
  switch (_context.prev = _context.next) {
267
282
  case 0:
268
283
  today = moment.moment().utc().format();
269
- featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->url\n }';
270
- partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n description,\n name,\n identifier,\n thumbnail,\n twitter,\n "affiliates" : description[0]{slides}\n }';
284
+ featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->url\n }';
285
+ partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n description,\n name,\n identifier,\n thumbnail,\n twitter,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n }';
271
286
 
272
287
 
273
288
  if (category) {
274
289
  //if partners page has a sub category such as onclive
275
290
  //e.g. /sap-partner/[category]/[partner]
276
291
 
277
- partnerQuery = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')] [0] {\n ...,\n \'partner\': *[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\' && references(^._id)] [0] {\n name,\n identifier,\n thumbnail,\n twitter,\n description,\n "affiliates" : description[0]{slides}\n }\n }';
292
+ partnerQuery = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')] [0] {\n ...,\n \'partner\': *[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\' && references(^._id)] [0] {\n description,\n name,\n identifier,\n thumbnail,\n twitter,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n \n }\n }';
278
293
  }
279
294
 
280
295
  taxonomyQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] [0] {\n \'id\': _id,\n \'title\': name\n }';
package/dist/cjs/View.js CHANGED
@@ -20,6 +20,8 @@ var React = require('react');
20
20
  var React__default = _interopDefault(React);
21
21
  var index = require('./index-f7ee1612.js');
22
22
  require('prop-types');
23
+ require('react-bootstrap/Row');
24
+ require('react-bootstrap/Col');
23
25
  var moment = require('./moment-66a6a284.js');
24
26
  var Router = require('next/router');
25
27
  var Router__default = _interopDefault(Router);
@@ -14,7 +14,7 @@ var getQuery = function getQuery(type) {
14
14
  case 'related':
15
15
  return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && published <= now()\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[$index]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
16
16
  case 'article':
17
- return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
17
+ return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{ \n ...,\n upload_doc { \n _type,\n asset-> \n } \n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
18
18
  case 'publication':
19
19
  return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n pdf{asset->}\n } | order(year desc, month desc)\n }';
20
20
  case 'issue':
@@ -17,6 +17,8 @@ var React = require('react');
17
17
  var React__default = _interopDefault(React);
18
18
  var index = require('./index-f7ee1612.js');
19
19
  var PropTypes = _interopDefault(require('prop-types'));
20
+ var Row = _interopDefault(require('react-bootstrap/Row'));
21
+ var Col = _interopDefault(require('react-bootstrap/Col'));
20
22
  var Router = require('next/router');
21
23
  var Router__default = _interopDefault(Router);
22
24
  require('./isSymbol-488934a7.js');
@@ -7794,6 +7796,55 @@ var urlFor$2 = function urlFor(source, client) {
7794
7796
  return builder.image(source).auto('format');
7795
7797
  };
7796
7798
 
7799
+ var MultiMedia = function MultiMedia(props) {
7800
+ var medias = props.node.medias,
7801
+ client = props.client;
7802
+
7803
+
7804
+ if (medias && medias.length > 0) {
7805
+ return React__default.createElement(
7806
+ 'div',
7807
+ { className: 'multi-media-container' },
7808
+ React__default.createElement(
7809
+ Row,
7810
+ { noGutters: true },
7811
+ medias.map(function (media) {
7812
+ return React__default.createElement(
7813
+ Col,
7814
+ { xs: 12, md: 12 / medias.length, key: media._key },
7815
+ React__default.createElement(
7816
+ 'a',
7817
+ _extends._extends({}, media.upload_doc && media.upload_doc.asset && { href: media.upload_doc.asset.url, target: media.blank ? '_blank' : '_self' }, {
7818
+ style: { cursor: media.upload_doc && media.upload_doc.asset && media.upload_doc.asset.url ? 'pointer' : 'default' } }),
7819
+ React__default.createElement(
7820
+ 'div',
7821
+ { className: 'multi-media-image-container' },
7822
+ React__default.createElement('img', { 'images-count': medias.length, className: 'multi-media-image', src: urlFor$2(media.poster, client).url(), alt: media.alt }),
7823
+ media.caption && React__default.createElement(
7824
+ 'span',
7825
+ { className: 'multi-media-caption' },
7826
+ media.caption
7827
+ )
7828
+ )
7829
+ )
7830
+ );
7831
+ })
7832
+ ),
7833
+ React__default.createElement(
7834
+ 'style',
7835
+ { jsx: 'true' },
7836
+ '\n .multi-media-container {\n margin-bottom: 1rem;\n }\n .multi-media-image {\n width: 100%;\n height: auto;\n object-fit: cover;\n }\n\n /* Small devices (portrait tablets and phones, 767px and down) */\n @media (max-width: 767px) {\n .multi-media-image-container {\n margin-bottom: 1rem;\n }\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media (min-width: 768px) {\n .multi-media-image[images-count=\'4\'] {\n height: 100px;\n }\n .multi-media-image[images-count=\'3\'] {\n height: 130px;\n }\n .multi-media-image[images-count=\'2\'] {\n height: 200px;\n }\n .multi-media-container [class*=\'col-\'] + [class*=\'col-\'] {\n padding-left: 0.75rem;\n }\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media (min-width: 992px) {\n .multi-media-image[images-count=\'4\'] {\n height: 150px;\n }\n .multi-media-image[images-count=\'3\'] {\n height: 200px;\n }\n .multi-media-image[images-count=\'2\'] {\n height: 300px;\n }\n }\n\n .multi-media-caption {\n font-size: 90%;\n color: #6c757d;\n }\n '
7837
+ )
7838
+ );
7839
+ }
7840
+ return null;
7841
+ };
7842
+
7843
+ var urlFor$3 = function urlFor(source, client) {
7844
+ var builder = index$1.imageUrlBuilder(client);
7845
+ return builder.image(source).auto('format');
7846
+ };
7847
+
7797
7848
  var compareProps = function compareProps(prevProps, nextProps) {
7798
7849
  if (nextProps.node.asset && nextProps.node.asset._ref) {
7799
7850
  return prevProps.node.asset._ref === nextProps.node.asset._ref;
@@ -7888,7 +7939,7 @@ var FigureComponent = function FigureComponent(props) {
7888
7939
  link ? React__default.createElement(
7889
7940
  'a',
7890
7941
  { target: blank ? '_blank' : '_self', href: link },
7891
- React__default.createElement(reactBootstrap.Figure.Image, { style: { maxWidth: '100%' }, className: 'figure-image', src: urlFor$2(node, client).url(), alt: alt && alt }),
7942
+ React__default.createElement(reactBootstrap.Figure.Image, { style: { maxWidth: '100%' }, className: 'figure-image', src: urlFor$3(node, client).url(), alt: alt && alt }),
7892
7943
  caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
7893
7944
  ) : React__default.createElement(
7894
7945
  React__default.Fragment,
@@ -7896,10 +7947,10 @@ var FigureComponent = function FigureComponent(props) {
7896
7947
  React__default.createElement(reactBootstrap.Figure.Image, {
7897
7948
  style: { maxWidth: '100%', cursor: 'pointer', width: 'auto' },
7898
7949
  className: 'figure-image',
7899
- src: urlFor$2(node, client).url(),
7950
+ src: urlFor$3(node, client).url(),
7900
7951
  alt: alt && alt,
7901
7952
  onClick: function onClick() {
7902
- setOpenImgSrc(urlFor$2(node, client).url());
7953
+ setOpenImgSrc(urlFor$3(node, client).url());
7903
7954
  setOpenImg(true);
7904
7955
  }
7905
7956
  }),
@@ -7928,7 +7979,7 @@ var FigureComponent = function FigureComponent(props) {
7928
7979
 
7929
7980
  var Figure = React__default.memo(FigureComponent, compareProps);
7930
7981
 
7931
- var urlFor$3 = function urlFor(source, client) {
7982
+ var urlFor$4 = function urlFor(source, client) {
7932
7983
  var builder = index$1.imageUrlBuilder(client);
7933
7984
  return builder.image(source).auto('format');
7934
7985
  };
@@ -7955,7 +8006,7 @@ var MultiFigure = function MultiFigure(props) {
7955
8006
  React__default.createElement(
7956
8007
  'div',
7957
8008
  { className: 'multi-figure-image-container' },
7958
- React__default.createElement('img', { 'images-count': images.length, className: 'multi-figure-image', src: urlFor$3(image.asset, client).url(), alt: image.alt }),
8009
+ React__default.createElement('img', { 'images-count': images.length, className: 'multi-figure-image', src: urlFor$4(image.asset, client).url(), alt: image.alt }),
7959
8010
  image.caption && React__default.createElement(
7960
8011
  'span',
7961
8012
  { className: 'multi-figure-caption' },
@@ -8154,6 +8205,11 @@ var getSerializers = function getSerializers() {
8154
8205
  },
8155
8206
  brtag: function brtag() {
8156
8207
  return React__default.createElement('br', { className: 'line-break' });
8208
+ },
8209
+ multimedia: function multimedia(_ref18) {
8210
+ var node = _ref18.node;
8211
+
8212
+ return React__default.createElement(MultiMedia, { node: node, client: client });
8157
8213
  }
8158
8214
  },
8159
8215
  marks: {
@@ -8197,32 +8253,32 @@ var getSerializers = function getSerializers() {
8197
8253
  children
8198
8254
  );
8199
8255
  },
8200
- alignleft: function alignleft(_ref18) {
8201
- var children = _ref18.children;
8256
+ alignleft: function alignleft(_ref19) {
8257
+ var children = _ref19.children;
8202
8258
  return React__default.createElement(
8203
8259
  'div',
8204
8260
  { style: { textAlign: 'left' } },
8205
8261
  children
8206
8262
  );
8207
8263
  },
8208
- alignright: function alignright(_ref19) {
8209
- var children = _ref19.children;
8264
+ alignright: function alignright(_ref20) {
8265
+ var children = _ref20.children;
8210
8266
  return React__default.createElement(
8211
8267
  'div',
8212
8268
  { style: { textAlign: 'right' } },
8213
8269
  children
8214
8270
  );
8215
8271
  },
8216
- aligncenter: function aligncenter(_ref20) {
8217
- var children = _ref20.children;
8272
+ aligncenter: function aligncenter(_ref21) {
8273
+ var children = _ref21.children;
8218
8274
  return React__default.createElement(
8219
8275
  'div',
8220
8276
  { style: { textAlign: 'center' } },
8221
8277
  children
8222
8278
  );
8223
8279
  },
8224
- alignjustify: function alignjustify(_ref21) {
8225
- var children = _ref21.children;
8280
+ alignjustify: function alignjustify(_ref22) {
8281
+ var children = _ref22.children;
8226
8282
  return React__default.createElement(
8227
8283
  'div',
8228
8284
  { style: { textAlign: 'justify' } },
@@ -15,6 +15,8 @@ import './_is-array-dd5523d6.js';
15
15
  import React__default, { useState, useEffect } from 'react';
16
16
  import { l as lib_3 } from './index-93ec3c59.js';
17
17
  import 'prop-types';
18
+ import 'react-bootstrap/Row';
19
+ import 'react-bootstrap/Col';
18
20
  import { m as moment } from './moment-12415288.js';
19
21
  import 'next/router';
20
22
  import { i as isObjectLike_1, _ as _baseGetTag } from './isSymbol-b7b7434f.js';
@@ -12,6 +12,8 @@ import './_is-array-dd5523d6.js';
12
12
  import React__default, { useState, useEffect } from 'react';
13
13
  import './index-93ec3c59.js';
14
14
  import 'prop-types';
15
+ import 'react-bootstrap/Row';
16
+ import 'react-bootstrap/Col';
15
17
  import './moment-12415288.js';
16
18
  import { useRouter } from 'next/router';
17
19
  import './isSymbol-b7b7434f.js';
@@ -13,6 +13,8 @@ import './_is-array-dd5523d6.js';
13
13
  import React__default from 'react';
14
14
  import './index-93ec3c59.js';
15
15
  import 'prop-types';
16
+ import 'react-bootstrap/Row';
17
+ import 'react-bootstrap/Col';
16
18
  import 'react-bootstrap/Card';
17
19
  import { m as moment } from './moment-12415288.js';
18
20
  import 'next/router';
@@ -54,7 +56,6 @@ import { TwitterTimelineEmbed } from 'react-twitter-embed';
54
56
 
55
57
  var ImageSlider = function ImageSlider(props) {
56
58
  var builder = imageUrlBuilder(props.client);
57
-
58
59
  function urlFor(source) {
59
60
  return builder.image(source);
60
61
  }
@@ -104,16 +105,29 @@ var ImageSlider = function ImageSlider(props) {
104
105
  { className: 'row__inner' },
105
106
  props.data.slides.map(function (img, index) {
106
107
  var thumbnail = urlFor(img.slideshowImage).width(250);
107
- return React__default.createElement(
108
- 'div',
109
- { className: 'tile' },
110
- React__default.createElement(
108
+ if (!img.slideshowImage.link) {
109
+ return React__default.createElement(
111
110
  'div',
112
- { className: 'tile__media' },
113
- React__default.createElement('img', { className: 'tile__img', src: thumbnail, alt: '' })
114
- ),
115
- React__default.createElement('div', { style: { color: variant }, className: 'tile__info' })
116
- );
111
+ { key: index, className: 'tile' },
112
+ React__default.createElement(
113
+ 'div',
114
+ { className: 'tile__media' },
115
+ React__default.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '' })
116
+ ),
117
+ React__default.createElement('div', { style: { color: variant }, className: 'tile__info' })
118
+ );
119
+ } else {
120
+ return React__default.createElement(
121
+ 'a',
122
+ { key: index, href: img.slideshowImage.link, target: img.slideshowImage.blank ? '_target' : '_self', className: 'tile' },
123
+ React__default.createElement(
124
+ 'div',
125
+ { className: 'tile__media' },
126
+ React__default.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '' })
127
+ ),
128
+ React__default.createElement('div', { style: { color: variant }, className: 'tile__info' })
129
+ );
130
+ }
117
131
  })
118
132
  )
119
133
  ),
@@ -140,6 +154,7 @@ var PartnerDetails = function PartnerDetails(_ref) {
140
154
  pageview = _ref.pageview,
141
155
  page = _ref.page;
142
156
 
157
+
143
158
  return React__default.createElement(
144
159
  React__default.Fragment,
145
160
  null,
@@ -190,7 +205,7 @@ var PartnerDetails = function PartnerDetails(_ref) {
190
205
  React__default.createElement(BlockContent, _extends({ serializers: getSerializers(client), blocks: partnerDetails.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
191
206
  )
192
207
  ),
193
- partnerDetails.affiliates && partnerDetails.affiliates.slides && React__default.createElement(
208
+ partnerDetails.affiliates && partnerDetails.affiliates[0] && partnerDetails.affiliates[0].slides && React__default.createElement(
194
209
  'div',
195
210
  { className: 'mb-4', style: { padding: '0 15px' } },
196
211
  React__default.createElement(
@@ -198,7 +213,7 @@ var PartnerDetails = function PartnerDetails(_ref) {
198
213
  { className: 'bb-gold' },
199
214
  'Affiliates of American Oncology Network'
200
215
  ),
201
- React__default.createElement(ImageSlider, { client: client, data: partnerDetails.affiliates })
216
+ React__default.createElement(ImageSlider, { client: client, data: partnerDetails.affiliates[0] })
202
217
  ),
203
218
  features.length > 0 && React__default.createElement(
204
219
  'div',
@@ -261,15 +276,15 @@ PartnerDetails.returnGetInitialProps = function () {
261
276
  switch (_context.prev = _context.next) {
262
277
  case 0:
263
278
  today = moment().utc().format();
264
- featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->url\n }';
265
- partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n description,\n name,\n identifier,\n thumbnail,\n twitter,\n "affiliates" : description[0]{slides}\n }';
279
+ featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->url\n }';
280
+ partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n description,\n name,\n identifier,\n thumbnail,\n twitter,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n }';
266
281
 
267
282
 
268
283
  if (category) {
269
284
  //if partners page has a sub category such as onclive
270
285
  //e.g. /sap-partner/[category]/[partner]
271
286
 
272
- partnerQuery = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')] [0] {\n ...,\n \'partner\': *[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\' && references(^._id)] [0] {\n name,\n identifier,\n thumbnail,\n twitter,\n description,\n "affiliates" : description[0]{slides}\n }\n }';
287
+ partnerQuery = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')] [0] {\n ...,\n \'partner\': *[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\' && references(^._id)] [0] {\n description,\n name,\n identifier,\n thumbnail,\n twitter,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n \n }\n }';
273
288
  }
274
289
 
275
290
  taxonomyQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] [0] {\n \'id\': _id,\n \'title\': name\n }';
package/dist/esm/View.js CHANGED
@@ -15,6 +15,8 @@ import './_is-array-dd5523d6.js';
15
15
  import React__default, { useState, useEffect } from 'react';
16
16
  import { l as lib_3 } from './index-93ec3c59.js';
17
17
  import 'prop-types';
18
+ import 'react-bootstrap/Row';
19
+ import 'react-bootstrap/Col';
18
20
  import { m as moment } from './moment-12415288.js';
19
21
  import { useRouter } from 'next/router';
20
22
  import './isSymbol-b7b7434f.js';
@@ -12,7 +12,7 @@ var getQuery = function getQuery(type) {
12
12
  case 'related':
13
13
  return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && published <= now()\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[$index]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
14
14
  case 'article':
15
- return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
15
+ return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{ \n ...,\n upload_doc { \n _type,\n asset-> \n } \n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
16
16
  case 'publication':
17
17
  return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n pdf{asset->}\n } | order(year desc, month desc)\n }';
18
18
  case 'issue':
@@ -12,6 +12,8 @@ import './_is-array-dd5523d6.js';
12
12
  import React__default, { useState, useEffect } from 'react';
13
13
  import { l as lib_3 } from './index-93ec3c59.js';
14
14
  import PropTypes from 'prop-types';
15
+ import Row from 'react-bootstrap/Row';
16
+ import Col from 'react-bootstrap/Col';
15
17
  import Router, { useRouter } from 'next/router';
16
18
  import './isSymbol-b7b7434f.js';
17
19
  import './debounce-048d9cb6.js';
@@ -29,7 +31,7 @@ import DFPAdSlot from './AdSlot.js';
29
31
  import { B as BlockContent } from './BlockContent-a614acdf.js';
30
32
  import { g as getYoutubeId } from './smoothscroll-4b699764.js';
31
33
  import GroupDeck from './GroupDeck.js';
32
- import { Carousel, Table, Figure as Figure$1, Button, ProgressBar, Row, Col } from 'react-bootstrap';
34
+ import { Carousel, Table, Figure as Figure$1, Button, ProgressBar, Row as Row$1, Col as Col$1 } from 'react-bootstrap';
33
35
  import Button$1 from 'react-bootstrap/Button';
34
36
  import { u as util } from './util-7700fc59.js';
35
37
  import { R as ReactPlayerLoader } from './brightcove-react-player-loader.es-83f53e4e.js';
@@ -7788,6 +7790,55 @@ var urlFor$2 = function urlFor(source, client) {
7788
7790
  return builder.image(source).auto('format');
7789
7791
  };
7790
7792
 
7793
+ var MultiMedia = function MultiMedia(props) {
7794
+ var medias = props.node.medias,
7795
+ client = props.client;
7796
+
7797
+
7798
+ if (medias && medias.length > 0) {
7799
+ return React__default.createElement(
7800
+ 'div',
7801
+ { className: 'multi-media-container' },
7802
+ React__default.createElement(
7803
+ Row,
7804
+ { noGutters: true },
7805
+ medias.map(function (media) {
7806
+ return React__default.createElement(
7807
+ Col,
7808
+ { xs: 12, md: 12 / medias.length, key: media._key },
7809
+ React__default.createElement(
7810
+ 'a',
7811
+ _extends({}, media.upload_doc && media.upload_doc.asset && { href: media.upload_doc.asset.url, target: media.blank ? '_blank' : '_self' }, {
7812
+ style: { cursor: media.upload_doc && media.upload_doc.asset && media.upload_doc.asset.url ? 'pointer' : 'default' } }),
7813
+ React__default.createElement(
7814
+ 'div',
7815
+ { className: 'multi-media-image-container' },
7816
+ React__default.createElement('img', { 'images-count': medias.length, className: 'multi-media-image', src: urlFor$2(media.poster, client).url(), alt: media.alt }),
7817
+ media.caption && React__default.createElement(
7818
+ 'span',
7819
+ { className: 'multi-media-caption' },
7820
+ media.caption
7821
+ )
7822
+ )
7823
+ )
7824
+ );
7825
+ })
7826
+ ),
7827
+ React__default.createElement(
7828
+ 'style',
7829
+ { jsx: 'true' },
7830
+ '\n .multi-media-container {\n margin-bottom: 1rem;\n }\n .multi-media-image {\n width: 100%;\n height: auto;\n object-fit: cover;\n }\n\n /* Small devices (portrait tablets and phones, 767px and down) */\n @media (max-width: 767px) {\n .multi-media-image-container {\n margin-bottom: 1rem;\n }\n }\n\n /* Medium devices (landscape tablets, 768px and up) */\n @media (min-width: 768px) {\n .multi-media-image[images-count=\'4\'] {\n height: 100px;\n }\n .multi-media-image[images-count=\'3\'] {\n height: 130px;\n }\n .multi-media-image[images-count=\'2\'] {\n height: 200px;\n }\n .multi-media-container [class*=\'col-\'] + [class*=\'col-\'] {\n padding-left: 0.75rem;\n }\n }\n\n /* Large devices (laptops/desktops, 992px and up) */\n @media (min-width: 992px) {\n .multi-media-image[images-count=\'4\'] {\n height: 150px;\n }\n .multi-media-image[images-count=\'3\'] {\n height: 200px;\n }\n .multi-media-image[images-count=\'2\'] {\n height: 300px;\n }\n }\n\n .multi-media-caption {\n font-size: 90%;\n color: #6c757d;\n }\n '
7831
+ )
7832
+ );
7833
+ }
7834
+ return null;
7835
+ };
7836
+
7837
+ var urlFor$3 = function urlFor(source, client) {
7838
+ var builder = imageUrlBuilder(client);
7839
+ return builder.image(source).auto('format');
7840
+ };
7841
+
7791
7842
  var compareProps = function compareProps(prevProps, nextProps) {
7792
7843
  if (nextProps.node.asset && nextProps.node.asset._ref) {
7793
7844
  return prevProps.node.asset._ref === nextProps.node.asset._ref;
@@ -7882,7 +7933,7 @@ var FigureComponent = function FigureComponent(props) {
7882
7933
  link ? React__default.createElement(
7883
7934
  'a',
7884
7935
  { target: blank ? '_blank' : '_self', href: link },
7885
- React__default.createElement(Figure$1.Image, { style: { maxWidth: '100%' }, className: 'figure-image', src: urlFor$2(node, client).url(), alt: alt && alt }),
7936
+ React__default.createElement(Figure$1.Image, { style: { maxWidth: '100%' }, className: 'figure-image', src: urlFor$3(node, client).url(), alt: alt && alt }),
7886
7937
  caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
7887
7938
  ) : React__default.createElement(
7888
7939
  React__default.Fragment,
@@ -7890,10 +7941,10 @@ var FigureComponent = function FigureComponent(props) {
7890
7941
  React__default.createElement(Figure$1.Image, {
7891
7942
  style: { maxWidth: '100%', cursor: 'pointer', width: 'auto' },
7892
7943
  className: 'figure-image',
7893
- src: urlFor$2(node, client).url(),
7944
+ src: urlFor$3(node, client).url(),
7894
7945
  alt: alt && alt,
7895
7946
  onClick: function onClick() {
7896
- setOpenImgSrc(urlFor$2(node, client).url());
7947
+ setOpenImgSrc(urlFor$3(node, client).url());
7897
7948
  setOpenImg(true);
7898
7949
  }
7899
7950
  }),
@@ -7922,7 +7973,7 @@ var FigureComponent = function FigureComponent(props) {
7922
7973
 
7923
7974
  var Figure = React__default.memo(FigureComponent, compareProps);
7924
7975
 
7925
- var urlFor$3 = function urlFor(source, client) {
7976
+ var urlFor$4 = function urlFor(source, client) {
7926
7977
  var builder = imageUrlBuilder(client);
7927
7978
  return builder.image(source).auto('format');
7928
7979
  };
@@ -7937,11 +7988,11 @@ var MultiFigure = function MultiFigure(props) {
7937
7988
  'div',
7938
7989
  { className: 'multi-figure-container' },
7939
7990
  React__default.createElement(
7940
- Row,
7991
+ Row$1,
7941
7992
  { noGutters: true },
7942
7993
  images.map(function (image, index) {
7943
7994
  return React__default.createElement(
7944
- Col,
7995
+ Col$1,
7945
7996
  { xs: 12, md: 12 / images.length, key: index },
7946
7997
  React__default.createElement(
7947
7998
  'a',
@@ -7949,7 +8000,7 @@ var MultiFigure = function MultiFigure(props) {
7949
8000
  React__default.createElement(
7950
8001
  'div',
7951
8002
  { className: 'multi-figure-image-container' },
7952
- React__default.createElement('img', { 'images-count': images.length, className: 'multi-figure-image', src: urlFor$3(image.asset, client).url(), alt: image.alt }),
8003
+ React__default.createElement('img', { 'images-count': images.length, className: 'multi-figure-image', src: urlFor$4(image.asset, client).url(), alt: image.alt }),
7953
8004
  image.caption && React__default.createElement(
7954
8005
  'span',
7955
8006
  { className: 'multi-figure-caption' },
@@ -8148,6 +8199,11 @@ var getSerializers = function getSerializers() {
8148
8199
  },
8149
8200
  brtag: function brtag() {
8150
8201
  return React__default.createElement('br', { className: 'line-break' });
8202
+ },
8203
+ multimedia: function multimedia(_ref18) {
8204
+ var node = _ref18.node;
8205
+
8206
+ return React__default.createElement(MultiMedia, { node: node, client: client });
8151
8207
  }
8152
8208
  },
8153
8209
  marks: {
@@ -8191,32 +8247,32 @@ var getSerializers = function getSerializers() {
8191
8247
  children
8192
8248
  );
8193
8249
  },
8194
- alignleft: function alignleft(_ref18) {
8195
- var children = _ref18.children;
8250
+ alignleft: function alignleft(_ref19) {
8251
+ var children = _ref19.children;
8196
8252
  return React__default.createElement(
8197
8253
  'div',
8198
8254
  { style: { textAlign: 'left' } },
8199
8255
  children
8200
8256
  );
8201
8257
  },
8202
- alignright: function alignright(_ref19) {
8203
- var children = _ref19.children;
8258
+ alignright: function alignright(_ref20) {
8259
+ var children = _ref20.children;
8204
8260
  return React__default.createElement(
8205
8261
  'div',
8206
8262
  { style: { textAlign: 'right' } },
8207
8263
  children
8208
8264
  );
8209
8265
  },
8210
- aligncenter: function aligncenter(_ref20) {
8211
- var children = _ref20.children;
8266
+ aligncenter: function aligncenter(_ref21) {
8267
+ var children = _ref21.children;
8212
8268
  return React__default.createElement(
8213
8269
  'div',
8214
8270
  { style: { textAlign: 'center' } },
8215
8271
  children
8216
8272
  );
8217
8273
  },
8218
- alignjustify: function alignjustify(_ref21) {
8219
- var children = _ref21.children;
8274
+ alignjustify: function alignjustify(_ref22) {
8275
+ var children = _ref22.children;
8220
8276
  return React__default.createElement(
8221
8277
  'div',
8222
8278
  { style: { textAlign: 'justify' } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.560",
3
+ "version": "1.0.562",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",