@mjhls/mjh-framework 1.0.188 → 1.0.190

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.188
2
+ # mjh-framework v. 1.0.190
3
3
 
4
4
 
5
5
 
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import React__default, { Component, useState, useEffect, useRef, createContext, createElement } from 'react';
1
+ import React__default, { Component, useState, useEffect, useRef, createElement, createContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import reactDom from 'react-dom';
4
4
  import Container from 'react-bootstrap/Container';
@@ -10222,6 +10222,10 @@ var html_map = {
10222
10222
  };
10223
10223
 
10224
10224
  var html_decode = function html_decode(string) {
10225
+ if (!string) {
10226
+ return string;
10227
+ }
10228
+
10225
10229
  var entityMap = html_map;
10226
10230
  for (var key in entityMap) {
10227
10231
  var entity = entityMap[key];
@@ -14193,20 +14197,6 @@ var MasterDeck = function (_React$Component) {
14193
14197
  };
14194
14198
  }
14195
14199
  });
14196
- }, _this.urlFor = function (source) {
14197
- var client = _this.props.client;
14198
-
14199
- var builder = imageUrlBuilder(client);
14200
- return builder.image(source).auto('format');
14201
- }, _this.renderCardImage = function (row, page) {
14202
- if (row.thumbnail && row.thumbnail.asset) {
14203
- var url = _this.urlFor(row.thumbnail);
14204
- if (_this.props.imageHeight) url = url.height(_this.props.imageHeight);
14205
- if (_this.props.imageWidth) url = url.width(_this.props.imageWidth);
14206
- return url.url();
14207
- } else {
14208
- return _this.defaultImage;
14209
- }
14210
14200
  }, _this.changePageNumber = function (pageNumber) {
14211
14201
  var _this$props2 = _this.props,
14212
14202
  seoPaginate = _this$props2.seoPaginate,
@@ -14277,50 +14267,6 @@ var MasterDeck = function (_React$Component) {
14277
14267
  });
14278
14268
  }
14279
14269
  }
14280
- }, _this.renderAuthor = function (authorDetail, index$$1, length) {
14281
- if (authorDetail) {
14282
- var _id = authorDetail._id,
14283
- displayName = authorDetail.displayName,
14284
- url = authorDetail.url;
14285
-
14286
- if (displayName && url && url.current) {
14287
- return React__default.createElement(
14288
- 'div',
14289
- { key: _id },
14290
- index$$1 === 0 && React__default.createElement(
14291
- 'span',
14292
- { className: 'pr-1' },
14293
- 'By'
14294
- ),
14295
- React__default.createElement(
14296
- Link,
14297
- { href: '/authors/[url]', as: '/authors/' + url.current },
14298
- React__default.createElement(
14299
- 'a',
14300
- { className: 'text-muted' },
14301
- displayName,
14302
- length !== index$$1 + 1 && React__default.createElement('br', null)
14303
- )
14304
- )
14305
- );
14306
- } else if (displayName) {
14307
- return React__default.createElement(
14308
- 'div',
14309
- { key: _id },
14310
- index$$1 === 0 && React__default.createElement(
14311
- 'span',
14312
- { className: 'pr-1' },
14313
- 'By'
14314
- ),
14315
- React__default.createElement(
14316
- 'span',
14317
- { className: 'text-muted' },
14318
- displayName,
14319
- length !== index$$1 + 1 && React__default.createElement('br', null)
14320
- )
14321
- );
14322
- }
14323
- } else return null;
14324
14270
  }, _this.cardLoader = function (page, columns, variant) {
14325
14271
  var numberOfItemsBeforeAd = 6;
14326
14272
  return React__default.createElement(
@@ -14328,7 +14274,6 @@ var MasterDeck = function (_React$Component) {
14328
14274
  null,
14329
14275
  _this.state.data && _this.state.data.map(function (row, index$$1) {
14330
14276
  var pageNumber = row.pageNumber || _this.state.page;
14331
- var contentCategoryName = row.contentCategory && row.contentCategory.name && _this.mapping[row.contentCategory.name] ? row.contentCategory.name : 'Articles';
14332
14277
 
14333
14278
  return React__default.createElement(
14334
14279
  React__default.Fragment,
@@ -14339,7 +14284,7 @@ var MasterDeck = function (_React$Component) {
14339
14284
  onChange: function onChange(isVisible) {
14340
14285
  isVisible && _this.changePageNumber(pageNumber);
14341
14286
  } },
14342
- React__default.createElement(_this2.Deck, { data: row, variant: variant, index: index$$1 })
14287
+ React__default.createElement(_this2.Deck, { data: row, variant: variant, index: index$$1, client: _this.props.client })
14343
14288
  ),
14344
14289
  main_36 && _this.rightItems && (index$$1 + 1) % numberOfItemsBeforeAd === 0 && React__default.createElement(
14345
14290
  'div',
@@ -15628,7 +15573,7 @@ var Column3 = function Column3(props) {
15628
15573
  Col,
15629
15574
  { md: true, className: 'leftCol', style: { width: '200px' } },
15630
15575
  React__default.createElement(LeftNav, { leftItems: leftItems }),
15631
- website && website.sideFooterContent && website.sideFooterContent.length && website.showFooterOnLeftSide && React__default.createElement(SideFooter, { website: website, logo: logo })
15576
+ website && website.sideFooterContent && website.sideFooterContent.length && website.showFooterOnLeftSide && React__default.createElement(SideFooter, { website: website, cache: website.cache, logo: logo })
15632
15577
  ),
15633
15578
  React__default.createElement(
15634
15579
  Col,
@@ -15672,7 +15617,7 @@ var Column3 = function Column3(props) {
15672
15617
  row.component
15673
15618
  );
15674
15619
  }),
15675
- website && website.sideFooterContent && website.sideFooterContent.length && !website.showFooterOnLeftSide && React__default.createElement(SideFooter, { website: website, logo: logo })
15620
+ website && website.sideFooterContent && website.sideFooterContent.length && !website.showFooterOnLeftSide && React__default.createElement(SideFooter, { website: website, cache: website.cache, logo: logo })
15676
15621
  )
15677
15622
  )
15678
15623
  )
@@ -17010,7 +16955,7 @@ var HamMagazine = function HamMagazine(props) {
17010
16955
  ),
17011
16956
  React__default.createElement(
17012
16957
  Navbar,
17013
- { variant: 'dark', expand: 'lg', bg: 'primary', ref: navRef, style: { width: '100%' } },
16958
+ { variant: 'dark', expand: 'xl', bg: 'primary', ref: navRef, style: { width: '100%' } },
17014
16959
  React__default.createElement(
17015
16960
  Container,
17016
16961
  { className: 'mobile-nav' },
@@ -17137,7 +17082,7 @@ var HamMagazine = function HamMagazine(props) {
17137
17082
  React__default.createElement(
17138
17083
  'style',
17139
17084
  { jsx: 'true' },
17140
- '\n .sticky-home {\n position: relative;\n top: -3px;\n left: -6px;\n cursor: pointer;\n }\n .nav-item svg {\n margin-bottom: 2px;\n }\n #nav-login,\n #nav-logout,\n #nav-register {\n padding: 0.5rem;\n cursor: pointer;\n }\n #nav-mobile-login,\n #nav-mobile-logout,\n #nav-mobile-register {\n display: none;\n }\n #nav-mobile-logout,\n #nav-mobile-login {\n position: absolute;\n right: 1rem;\n }\n #nav-mobile-register {\n position: absolute;\n left: 1rem;\n }\n @media screen and (max-width: 376px) {\n .mobile-nav .nav-toggle .form-inline .mobile-search {\n width: 60%;\n }\n .mobile-nav .nav-toggle .form-inline {\n width: 70%;\n }\n }\n @media screen and (max-width: 328px) {\n .mobile-nav .nav-toggle .form-inline .mobile-search {\n margin-right: 5px;\n }\n }\n @media screen and (max-width: 767px) {\n .logo {\n width: 100%;\n padding-left: 10px;\n padding-right: 10px;\n }\n }\n @media screen and (max-width: 991px) {\n .nav-close {\n position: sticky;\n top: -70px;\n }\n .nav-open {\n position: relative;\n }\n\n .mobile-nav .nav-toggle {\n width: 100%;\n }\n\n .android-nav {\n max-height: 80vh;\n }\n\n .ios-nav {\n max-height: none;\n }\n\n .navbar.bg-primary {\n overflow: auto;\n }\n\n .mobile-nav .nav-toggle .navbar-toggler {\n float: left;\n height: 45px;\n }\n .mobile-nav .nav-toggle .form-inline {\n float: right;\n margin: 4px 0px 0px 0px;\n }\n .mobile-nav .form-inline .mobile-search {\n width: auto;\n }\n .sticky-home {\n display: none;\n }\n .dropdown-menu {\n max-height: 315px;\n overflow: auto;\n }\n ::-webkit-scrollbar {\n width: 10px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(214, 214, 214, 0.8);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n .navbar-expand-lg .show#basic-navbar-sub {\n display: block;\n }\n .navbar .mobile-nav .navbar-collapse.show {\n padding-bottom: 10px;\n border-bottom: 0.5px solid white;\n }\n .navbar .mobile-nav .navbar-collapse .form-inline {\n display: none;\n }\n .navbar .mobile-nav .navbar-collapse {\n margin-top: 15px;\n }\n .navbar .mobile-nav .navbar-collapse:last-child {\n border-bottom: none;\n margin-bottom: 0px;\n padding-bottom: 0px;\n margin-top: 0px;\n padding-top: 10px;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer ul {\n list-style-type: none;\n padding: inherit;\n margin-bottom: 0rem;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer .nav-link {\n text-transform: capitalize !important;\n font-weight: 300;\n }\n .navbar .mobile-nav .dropdown-item:focus {\n background-color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: white;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: inherit;\n border: none;\n }\n .navbar .mobile-nav .dropdown-menu.show {\n max-height: 100px;\n }\n }\n @media screen and (min-width: 992px) {\n .nav-close {\n position: sticky;\n top: -70px;\n }\n #basic-navbar-sub {\n display: none !important;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: white;\n border: 1 px solid #708090;\n }\n .mobile-nav .nav-toggle .form-inline {\n display: none;\n }\n }\n @media screen and (max-width: 1199px) {\n #nav-mobile-login,\n #nav-mobile-logout,\n #nav-mobile-register {\n display: block;\n }\n .navbar-top {\n flex-direction: row;\n justify-content: space-around !important;\n align-items: center;\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n width: 100%;\n }\n }\n '
17085
+ '\n .sticky-home {\n position: relative;\n top: -3px;\n left: -6px;\n cursor: pointer;\n }\n .nav-item svg {\n margin-bottom: 2px;\n }\n #nav-login,\n #nav-logout,\n #nav-register {\n padding: 0.5rem;\n cursor: pointer;\n }\n #nav-mobile-login,\n #nav-mobile-logout,\n #nav-mobile-register {\n display: none;\n }\n #nav-mobile-logout,\n #nav-mobile-login {\n position: absolute;\n right: 1rem;\n }\n #nav-mobile-register {\n position: absolute;\n left: 1rem;\n }\n @media screen and (max-width: 376px) {\n .mobile-nav .nav-toggle .form-inline .mobile-search {\n width: 60%;\n }\n .mobile-nav .nav-toggle .form-inline {\n width: 70%;\n }\n }\n @media screen and (max-width: 328px) {\n .mobile-nav .nav-toggle .form-inline .mobile-search {\n margin-right: 5px;\n }\n }\n @media screen and (max-width: 767px) {\n .logo {\n width: 100%;\n padding-left: 10px;\n padding-right: 10px;\n }\n }\n @media screen and (max-width: 1199px) {\n .nav-close {\n position: sticky;\n top: -70px;\n }\n .nav-open {\n position: relative;\n }\n\n .mobile-nav .nav-toggle {\n width: 100%;\n }\n\n .android-nav {\n max-height: 80vh;\n }\n\n .ios-nav {\n max-height: none;\n }\n\n .navbar.bg-primary {\n overflow: auto;\n }\n\n .mobile-nav .nav-toggle .navbar-toggler {\n float: left;\n height: 45px;\n }\n .mobile-nav .nav-toggle .form-inline {\n float: right;\n margin: 4px 0px 0px 0px;\n }\n .mobile-nav .form-inline .mobile-search {\n width: auto;\n }\n .sticky-home {\n display: none;\n }\n .dropdown-menu {\n max-height: 315px;\n overflow: auto;\n }\n ::-webkit-scrollbar {\n width: 10px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(214, 214, 214, 0.8);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n .navbar-expand-xl .show#basic-navbar-sub {\n display: block;\n }\n .navbar .mobile-nav .navbar-collapse.show {\n padding-bottom: 10px;\n border-bottom: 0.5px solid white;\n }\n .navbar .mobile-nav .navbar-collapse .form-inline {\n display: none;\n }\n .navbar .mobile-nav .navbar-collapse {\n margin-top: 15px;\n }\n .navbar .mobile-nav .navbar-collapse:last-child {\n border-bottom: none;\n margin-bottom: 0px;\n padding-bottom: 0px;\n margin-top: 0px;\n padding-top: 10px;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer ul {\n list-style-type: none;\n padding: inherit;\n margin-bottom: 0rem;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer .nav-link {\n text-transform: capitalize !important;\n font-weight: 300;\n }\n .navbar .mobile-nav .dropdown-item:focus {\n background-color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: white;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: inherit;\n border: none;\n }\n .navbar .mobile-nav .dropdown-menu.show {\n max-height: 100px;\n }\n }\n @media screen and (min-width: 1200px) {\n .nav-close {\n position: sticky;\n top: -70px;\n }\n #basic-navbar-sub {\n display: none !important;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: white;\n border: 1 px solid #708090;\n }\n .mobile-nav .nav-toggle .form-inline {\n display: none;\n }\n }\n @media screen and (max-width: 1199px) {\n #nav-mobile-login,\n #nav-mobile-logout,\n #nav-mobile-register {\n display: block;\n }\n .navbar-top {\n flex-direction: row;\n justify-content: space-around !important;\n align-items: center;\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n width: 100%;\n }\n }\n '
17141
17086
  )
17142
17087
  );
17143
17088
  };
@@ -17550,7 +17495,7 @@ var urlFor$2 = function urlFor(source, builder) {
17550
17495
 
17551
17496
  var onChangeSlide = function onChangeSlide(selectedIndex, router) {
17552
17497
  var pageNumber = selectedIndex + 1;
17553
- var href = '/view/' + router.query.url + '/?page=' + pageNumber;
17498
+ var href = '/view/' + router.query.url + '?page=' + pageNumber;
17554
17499
  Router.push(router.pathname, pageNumber > 1 ? href : '/view/' + router.query.url, { shallow: true });
17555
17500
  };
17556
17501
 
@@ -30251,5 +30196,88 @@ var RelatedContent = function RelatedContent(props) {
30251
30196
  );
30252
30197
  };
30253
30198
 
30254
- export { ContentCard as DeckContent, GridContent$1 as GridContent, Queue as DeckQueue, ThumbnailCard, TaxonomyCard, GroupDeck, YoutubeGroup, QueueDeckExpanded, VideoSeriesListing$1 as VideoSeriesListing, MasterDeck$1 as MasterDeck, PublicationDeck, IssueDeck, IssueContentDeck, Column1, Column2, Column3, Header, LeftNav, AccordionPanel, SocialShare, PageFilter, NavMagazine, NavNative, NavNormal, NavDvm, HamMagazine, TemplateNormal, AD, AD300x250, AD300x250x600, AD728x90, ADFooter, getSerializers$1 as getSerializers, Search, Feature, Breadcrumbs, SetCookie, Hero, AlphabeticList, PdfDownload, RelatedTopicsDropdown, Ustream, SideFooter, fbsHero as ForbesHero, HorizontalHero, OncliveHero, OncliveLargeHero, VerticalHero, YahooHero, RelatedContent };
30199
+ /*
30200
+ Example usage - targetedonc.com/latest-conference
30201
+ const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
30202
+ ...,
30203
+ title,
30204
+ summary,
30205
+ thumbnail,
30206
+ url,
30207
+ published,
30208
+ documentGroup->,
30209
+ contentCategory->,
30210
+ 'pageNumber': ${currentPage}
30211
+ }`
30212
+
30213
+ const posts = await client.fetch(query, params)
30214
+ */
30215
+
30216
+ var ConferenceArticleCard = function ConferenceArticleCard(props) {
30217
+ var data = props.data,
30218
+ variant = props.variant,
30219
+ index = props.index,
30220
+ client = props.client;
30221
+
30222
+
30223
+ var builder = imageUrlBuilder(client);
30224
+
30225
+ function urlFor(source) {
30226
+ return builder.image(source);
30227
+ }
30228
+
30229
+ //title, thumbnail, summary, published, documentGroup.identifier.current, documentGroup.identifier.name
30230
+ return React__default.createElement(
30231
+ 'div',
30232
+ { className: 'conference-media' },
30233
+ React__default.createElement(
30234
+ 'a',
30235
+ { className: 'img-wrapper', href: '/view/study-depicts-complexity-of-met-exon-14-mutation-testing' },
30236
+ React__default.createElement('img', {
30237
+ className: 'mr-3 img-fluid',
30238
+ src: data.thumbnail && urlFor(data.thumbnail.asset).width(350).url(),
30239
+ alt: data.title
30240
+ })
30241
+ ),
30242
+ React__default.createElement(
30243
+ 'div',
30244
+ { className: 'media-body' },
30245
+ React__default.createElement(
30246
+ 'a',
30247
+ { href: '/view/study-depicts-complexity-of-met-exon-14-mutation-testing' },
30248
+ React__default.createElement(
30249
+ 'h4',
30250
+ { className: 'conf-media__card-title' },
30251
+ data.title
30252
+ )
30253
+ ),
30254
+ React__default.createElement(
30255
+ 'p',
30256
+ { className: 'conf-media__card-text' },
30257
+ moment(data.published).format('MMMM Do YYYY, h:mma')
30258
+ ),
30259
+ React__default.createElement(
30260
+ 'p',
30261
+ { className: 'mb-1 conference-group' },
30262
+ React__default.createElement(
30263
+ Link,
30264
+ { href: '/conference/[url]', as: '/conference/' + data.documentGroup.identifier.current },
30265
+ React__default.createElement(
30266
+ 'a',
30267
+ { alt: data.thumbnail.alt || data.title },
30268
+ data.documentGroup.name
30269
+ )
30270
+ )
30271
+ ),
30272
+ React__default.createElement('p', { className: 'pt-2 card-text', dangerouslySetInnerHTML: { __html: data.summary } })
30273
+ ),
30274
+ React__default.createElement(
30275
+ 'style',
30276
+ { jsx: 'true' },
30277
+ '\n .conference-media {\n display: flex;\n flex-direction: row;\n margin-bottom: 1.25rem;\n padding-bottom: 1.25rem;\n border-bottom: 1px solid #ddd;\n }\n .conf-media__card-title {\n font-weight: bold;\n color: #252525;\n margin-bottom: 0.5rem;\n font-size: 1.5rem;\n }\n .conf-media__card-text {\n color: var(--dark);\n margin-bottom: 0.25rem;\n }\n .conference-media a img {\n width: 175px;\n min-width: 175px;\n height: auto;\n object-fit: contain;\n }\n .conference-media .conference-group {\n background: #003767;\n color: white;\n border-radius: 5px;\n display: inline-block;\n padding: 0 0.25rem;\n }\n .conference-media .conference-group a {\n color: white;\n font-size: 0.8rem;\n }\n @media screen and (max-width: 1064px) {\n .conf-media__card-title {\n font-size: 1.1rem;\n }\n }\n @media screen and (max-width: 768px) {\n .conference-media {\n flex-direction: column;\n }\n .conference-media a img {\n width: 100%;\n height: auto;\n max-height: 175px;\n object-fit: contain;\n margin-bottom: 1rem;\n }\n }\n '
30278
+ )
30279
+ );
30280
+ };
30281
+
30282
+ export { ContentCard as DeckContent, GridContent$1 as GridContent, Queue as DeckQueue, ThumbnailCard, TaxonomyCard, GroupDeck, YoutubeGroup, QueueDeckExpanded, VideoSeriesListing$1 as VideoSeriesListing, MasterDeck$1 as MasterDeck, PublicationDeck, IssueDeck, IssueContentDeck, Column1, Column2, Column3, Header, LeftNav, AccordionPanel, SocialShare, PageFilter, NavMagazine, NavNative, NavNormal, NavDvm, HamMagazine, TemplateNormal, AD, AD300x250, AD300x250x600, AD728x90, ADFooter, getSerializers$1 as getSerializers, Search, Feature, Breadcrumbs, SetCookie, Hero, AlphabeticList, PdfDownload, RelatedTopicsDropdown, Ustream, SideFooter, fbsHero as ForbesHero, HorizontalHero, OncliveHero, OncliveLargeHero, VerticalHero, YahooHero, RelatedContent, ConferenceArticleCard };
30255
30283
  //# sourceMappingURL=index.es.js.map