@mjhls/mjh-framework 1.0.223 → 1.0.225

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.
Files changed (46) hide show
  1. package/README.md +174 -174
  2. package/dist/cjs/DeckContent.js +11 -11
  3. package/dist/cjs/DeckQueue.js +3 -3
  4. package/dist/cjs/{Dfp-8b6f25fe.js → Dfp-c4f1f12a.js} +1 -1
  5. package/dist/cjs/{GridContent-8b0ebfec.js → GridContent-1575c8db.js} +4 -4
  6. package/dist/cjs/GridContent.js +4 -4
  7. package/dist/cjs/IssueContentDeck.js +1 -1
  8. package/dist/cjs/IssueDeck.js +1 -1
  9. package/dist/cjs/MasterDeck.js +11 -11
  10. package/dist/cjs/{Normal-78631b6e.js → Normal-11ae4373.js} +32 -31
  11. package/dist/cjs/PublicationDeck.js +1 -1
  12. package/dist/cjs/QueueDeckExpanded.js +3 -3
  13. package/dist/cjs/{TaxonomyCard-f24d8ec9.js → TaxonomyCard-d97685e2.js} +1 -1
  14. package/dist/cjs/TaxonomyCard.js +2 -2
  15. package/dist/cjs/TemplateNormal.js +2 -2
  16. package/dist/cjs/ThumbnailCard.js +1 -1
  17. package/dist/cjs/VideoSeriesListing.js +2 -2
  18. package/dist/cjs/{YoutubeGroup-d2d9e57c.js → YoutubeGroup-ad994d02.js} +4 -4
  19. package/dist/cjs/YoutubeGroup.js +1 -1
  20. package/dist/cjs/{index-eb596973.js → index-a4c53ff4.js} +18 -18
  21. package/dist/cjs/index.js +77 -75
  22. package/dist/cjs/{main-c1bd47fe.js → main-58839f4e.js} +6 -6
  23. package/dist/cjs/{visibility-sensor-59b2685c.js → visibility-sensor-bea3105d.js} +1447 -2511
  24. package/dist/esm/DeckContent.js +11 -11
  25. package/dist/esm/DeckQueue.js +3 -3
  26. package/dist/esm/{Dfp-6c8d69e6.js → Dfp-6731ac01.js} +1 -1
  27. package/dist/esm/{GridContent-0777cc42.js → GridContent-e5cdc9da.js} +4 -4
  28. package/dist/esm/GridContent.js +4 -4
  29. package/dist/esm/IssueContentDeck.js +1 -1
  30. package/dist/esm/IssueDeck.js +1 -1
  31. package/dist/esm/MasterDeck.js +11 -11
  32. package/dist/esm/{Normal-7d33c7bf.js → Normal-8e0aa5e8.js} +32 -31
  33. package/dist/esm/PublicationDeck.js +1 -1
  34. package/dist/esm/QueueDeckExpanded.js +3 -3
  35. package/dist/esm/{TaxonomyCard-ca8c7c8a.js → TaxonomyCard-f9c93953.js} +1 -1
  36. package/dist/esm/TaxonomyCard.js +2 -2
  37. package/dist/esm/TemplateNormal.js +2 -2
  38. package/dist/esm/ThumbnailCard.js +1 -1
  39. package/dist/esm/VideoSeriesListing.js +2 -2
  40. package/dist/esm/{YoutubeGroup-d3b92eb5.js → YoutubeGroup-1368335c.js} +4 -4
  41. package/dist/esm/YoutubeGroup.js +1 -1
  42. package/dist/esm/{index-b7bbf1d4.js → index-ca4ff5cb.js} +18 -18
  43. package/dist/esm/index.js +80 -78
  44. package/dist/esm/{main-2504c03f.js → main-dea495b7.js} +6 -6
  45. package/dist/esm/{visibility-sensor-61158020.js → visibility-sensor-675d3fa1.js} +1447 -2511
  46. package/package.json +93 -93
@@ -8,10 +8,10 @@ require('react-bootstrap/Row');
8
8
  require('react-bootstrap/Col');
9
9
  require('react-bootstrap/Card');
10
10
  require('react-dom');
11
- require('./index-eb596973.js');
11
+ require('./index-a4c53ff4.js');
12
12
  require('./index-0d0efcfa.js');
13
13
  require('./_babelHelpers-f321c258.js');
14
- var TaxonomyCard = require('./TaxonomyCard-f24d8ec9.js');
14
+ var TaxonomyCard = require('./TaxonomyCard-d97685e2.js');
15
15
 
16
16
 
17
17
 
@@ -9,14 +9,14 @@ require('react-bootstrap/Row');
9
9
  require('react-bootstrap/Col');
10
10
  require('next/link');
11
11
  require('./debounce-a963b136.js');
12
- require('./main-c1bd47fe.js');
12
+ require('./main-58839f4e.js');
13
13
  require('./_babelHelpers-f321c258.js');
14
14
  require('./AdSlot-d87cef08.js');
15
15
  require('./get-126b1712.js');
16
16
  require('react-bootstrap');
17
17
  require('./index.esm-340d3792.js');
18
18
  require('react-bootstrap/Button');
19
- var TemplateNormal = require('./Normal-78631b6e.js');
19
+ var TemplateNormal = require('./Normal-11ae4373.js');
20
20
  require('react-bootstrap/ListGroup');
21
21
  require('next/head');
22
22
  require('react-bootstrap/Nav');
@@ -7,7 +7,7 @@ var React__default = _interopDefault(React);
7
7
  require('./_commonjsHelpers-3fc1f64e.js');
8
8
  require('prop-types');
9
9
  require('react-dom');
10
- var index$1 = require('./index-eb596973.js');
10
+ var index$1 = require('./index-a4c53ff4.js');
11
11
  var index$2 = require('./index-0d0efcfa.js');
12
12
  var entities = require('./entities-3e0b4a16.js');
13
13
  var Media$1 = _interopDefault(require('react-bootstrap/Media'));
@@ -8,7 +8,7 @@ require('./_commonjsHelpers-3fc1f64e.js');
8
8
  var index = require('./index-0322e486.js');
9
9
  require('prop-types');
10
10
  var Container = _interopDefault(require('react-bootstrap/Container'));
11
- var visibilitySensor = require('./visibility-sensor-59b2685c.js');
11
+ var visibilitySensor = require('./visibility-sensor-bea3105d.js');
12
12
  require('next/link');
13
13
  var Router = require('next/router');
14
14
  var Router__default = _interopDefault(Router);
@@ -16,7 +16,7 @@ var debounce = require('./debounce-a963b136.js');
16
16
  require('react-dom');
17
17
  require('./index-0d0efcfa.js');
18
18
  var _babelHelpers = require('./_babelHelpers-f321c258.js');
19
- var YoutubeGroup = require('./YoutubeGroup-d2d9e57c.js');
19
+ var YoutubeGroup = require('./YoutubeGroup-ad994d02.js');
20
20
  var index_esm = require('./index.esm-340d3792.js');
21
21
 
22
22
  var VideoSeriesListing = function (_React$Component) {
@@ -57,10 +57,10 @@ var getYoutubeId = _commonjsHelpers.createCommonjsModule(function (module, expor
57
57
  }));
58
58
  });
59
59
 
60
- /*
61
- GROQ query -
62
- accepts an array of title, URL
63
- `https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
60
+ /*
61
+ GROQ query -
62
+ accepts an array of title, URL
63
+ `https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
64
64
  */
65
65
  var YoutubeGroup = function YoutubeGroup(props) {
66
66
  // Props should be an array of objects containing Thumbnail, title, and URL
@@ -6,7 +6,7 @@ require('prop-types');
6
6
  require('next/link');
7
7
  require('react-dom');
8
8
  require('./index-0d0efcfa.js');
9
- var YoutubeGroup = require('./YoutubeGroup-d2d9e57c.js');
9
+ var YoutubeGroup = require('./YoutubeGroup-ad994d02.js');
10
10
 
11
11
 
12
12
 
@@ -60,35 +60,35 @@ function parseSource(source) {
60
60
  if (typeof source === 'string' && isUrl(source)) {
61
61
  // Someone passed an existing image url?
62
62
  image = {
63
- asset: { _ref: urlToId(source) },
63
+ asset: { _ref: urlToId(source) }
64
64
  };
65
65
  }
66
66
  else if (typeof source === 'string') {
67
67
  // Just an asset id
68
68
  image = {
69
- asset: { _ref: source },
69
+ asset: { _ref: source }
70
70
  };
71
71
  }
72
72
  else if (isRef(source)) {
73
73
  // We just got passed an asset directly
74
74
  image = {
75
- asset: source,
75
+ asset: source
76
76
  };
77
77
  }
78
78
  else if (isAsset(source)) {
79
79
  // If we were passed an image asset document
80
80
  image = {
81
81
  asset: {
82
- _ref: source._id || '',
83
- },
82
+ _ref: source._id || ''
83
+ }
84
84
  };
85
85
  }
86
86
  else if (isAssetStub(source)) {
87
87
  // If we were passed a partial asset (`url`, but no `_id`)
88
88
  image = {
89
89
  asset: {
90
- _ref: urlToId(source.asset.url),
91
- },
90
+ _ref: urlToId(source.asset.url)
91
+ }
92
92
  };
93
93
  }
94
94
  else if (typeof source.asset === 'object') {
@@ -129,7 +129,7 @@ function applyDefaults(image) {
129
129
  left: 0,
130
130
  top: 0,
131
131
  bottom: 0,
132
- right: 0,
132
+ right: 0
133
133
  };
134
134
  }
135
135
  if (!result.hotspot) {
@@ -137,7 +137,7 @@ function applyDefaults(image) {
137
137
  x: 0.5,
138
138
  y: 0.5,
139
139
  height: 1.0,
140
- width: 1.0,
140
+ width: 1.0
141
141
  };
142
142
  }
143
143
  return result;
@@ -184,7 +184,7 @@ exports.SPEC_NAME_TO_URL_NAME_MAPPINGS = [
184
184
  ['crop', 'crop'],
185
185
  ['saturation', 'sat'],
186
186
  ['auto', 'auto'],
187
- ['dpr', 'dpr'],
187
+ ['dpr', 'dpr']
188
188
  ];
189
189
  function urlForImage(options) {
190
190
  var spec = __assign({}, (options || {}));
@@ -203,7 +203,7 @@ function urlForImage(options) {
203
203
  left: cropLeft,
204
204
  top: cropTop,
205
205
  width: Math.round(asset.width - image.crop.right * asset.width - cropLeft),
206
- height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop),
206
+ height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop)
207
207
  };
208
208
  // Compute hot spot rect in terms of pixel coordinates
209
209
  var hotSpotVerticalRadius = (image.hotspot.height * asset.height) / 2;
@@ -214,7 +214,7 @@ function urlForImage(options) {
214
214
  left: hotSpotCenterX - hotSpotHorizontalRadius,
215
215
  top: hotSpotCenterY - hotSpotVerticalRadius,
216
216
  right: hotSpotCenterX + hotSpotHorizontalRadius,
217
- bottom: hotSpotCenterY + hotSpotVerticalRadius,
217
+ bottom: hotSpotCenterY + hotSpotVerticalRadius
218
218
  };
219
219
  // If irrelevant, or if we are requested to: don't perform crop/fit based on
220
220
  // the crop/hotspot.
@@ -296,7 +296,7 @@ function fit(source, spec) {
296
296
  left: Math.round(left),
297
297
  top: Math.round(top_2),
298
298
  width: Math.round(width),
299
- height: Math.round(height),
299
+ height: Math.round(height)
300
300
  };
301
301
  }
302
302
  else {
@@ -318,13 +318,13 @@ function fit(source, spec) {
318
318
  left: Math.max(0, Math.floor(left)),
319
319
  top: Math.max(0, Math.floor(top_3)),
320
320
  width: Math.round(width),
321
- height: Math.round(height),
321
+ height: Math.round(height)
322
322
  };
323
323
  }
324
324
  return {
325
325
  width: imgWidth,
326
326
  height: imgHeight,
327
- rect: cropRect,
327
+ rect: cropRect
328
328
  };
329
329
  }
330
330
 
@@ -382,7 +382,7 @@ function urlBuilder(options) {
382
382
  return new ImageUrlBuilder(null, {
383
383
  baseUrl: apiHost.replace(/^https:\/\/api\./, 'https://cdn.'),
384
384
  projectId: projectId,
385
- dataset: dataset,
385
+ dataset: dataset
386
386
  });
387
387
  }
388
388
  // Or just accept the options as given
@@ -395,7 +395,7 @@ var ImageUrlBuilder = /** @class */ (function () {
395
395
  ? __assign(__assign({}, (parent.options || {})), (options || {})) : __assign({}, (options || {})); // Copy options
396
396
  }
397
397
  ImageUrlBuilder.prototype.withOptions = function (options) {
398
- var baseUrl = options.baseUrl || this.options.baseUrl;
398
+ var baseUrl = options.baseUrl || '';
399
399
  var newOptions = { baseUrl: baseUrl };
400
400
  for (var key in options) {
401
401
  if (options.hasOwnProperty(key)) {
@@ -523,7 +523,7 @@ var ImageUrlBuilder = /** @class */ (function () {
523
523
  ImageUrlBuilder.prototype.url = function () {
524
524
  return urlForImage_1$1.default(this.options);
525
525
  };
526
- // Alias for url()
526
+ // Synonym for url()
527
527
  ImageUrlBuilder.prototype.toString = function () {
528
528
  return this.url();
529
529
  };
package/dist/cjs/index.js CHANGED
@@ -13,27 +13,27 @@ require('react-bootstrap/Container');
13
13
  require('react-bootstrap/Row');
14
14
  require('react-bootstrap/Col');
15
15
  require('react-bootstrap/Card');
16
- var visibilitySensor = require('./visibility-sensor-59b2685c.js');
16
+ var visibilitySensor = require('./visibility-sensor-bea3105d.js');
17
17
  var Link = _interopDefault(require('next/link'));
18
18
  var Router = require('next/router');
19
19
  var Router__default = _interopDefault(Router);
20
20
  require('./debounce-a963b136.js');
21
21
  require('react-dom');
22
- var index$1 = require('./index-eb596973.js');
22
+ var index$1 = require('./index-a4c53ff4.js');
23
23
  require('./index-0d0efcfa.js');
24
- var main = require('./main-c1bd47fe.js');
24
+ var main = require('./main-58839f4e.js');
25
25
  var entities = require('./entities-3e0b4a16.js');
26
26
  var _babelHelpers = require('./_babelHelpers-f321c258.js');
27
27
  var AdSlot = require('./AdSlot-d87cef08.js');
28
28
  var DeckContent = require('./DeckContent.js');
29
29
  require('./get-126b1712.js');
30
- var GridContent = require('./GridContent-8b0ebfec.js');
30
+ var GridContent = require('./GridContent-1575c8db.js');
31
31
  var DeckQueue = require('./DeckQueue.js');
32
32
  require('react-bootstrap/Media');
33
33
  var ThumbnailCard = require('./ThumbnailCard.js');
34
- var TaxonomyCard = require('./TaxonomyCard-f24d8ec9.js');
34
+ var TaxonomyCard = require('./TaxonomyCard-d97685e2.js');
35
35
  var GroupDeck = require('./GroupDeck.js');
36
- var YoutubeGroup = require('./YoutubeGroup-d2d9e57c.js');
36
+ var YoutubeGroup = require('./YoutubeGroup-ad994d02.js');
37
37
  var reactBootstrap = require('react-bootstrap');
38
38
  var QueueDeckExpanded = require('./QueueDeckExpanded.js');
39
39
  var index_esm = require('./index.esm-340d3792.js');
@@ -44,7 +44,7 @@ var PublicationDeck = require('./PublicationDeck.js');
44
44
  var IssueDeck = require('./IssueDeck.js');
45
45
  require('react-bootstrap/Badge');
46
46
  var IssueContentDeck = require('./IssueContentDeck.js');
47
- var TemplateNormal = require('./Normal-78631b6e.js');
47
+ var TemplateNormal = require('./Normal-11ae4373.js');
48
48
  require('react-bootstrap/ListGroup');
49
49
  var Head = _interopDefault(require('next/head'));
50
50
  var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
@@ -10440,7 +10440,7 @@ var Slideshow$1 = function Slideshow(_ref) {
10440
10440
 
10441
10441
  var onChangeSlide = function onChangeSlide(selectedIndex) {
10442
10442
  var pageNumber = selectedIndex + 1;
10443
- var href = '/view/' + router.query.url + '/?page=' + pageNumber;
10443
+ var href = '/view/' + router.query.url + '?page=' + pageNumber;
10444
10444
  router.push(router.pathname, pageNumber > 1 ? href : '/view/' + router.query.url, { shallow: true });
10445
10445
  };
10446
10446
 
@@ -11203,16 +11203,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
11203
11203
  _ref$className = _ref.className,
11204
11204
  className = _ref$className === undefined ? '' : _ref$className;
11205
11205
 
11206
- /*
11207
- Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
11208
- example:
11209
- <RelatedTopicDropdown
11210
- page='/clinical'
11211
- exclude="clinical"
11212
- className='mb-3'
11213
- parentTaxonomy={props.parentTaxonomy}
11214
- subTaxonomies={props.subTaxonomies}
11215
- />
11206
+ /*
11207
+ Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
11208
+ example:
11209
+ <RelatedTopicDropdown
11210
+ page='/clinical'
11211
+ exclude="clinical"
11212
+ className='mb-3'
11213
+ parentTaxonomy={props.parentTaxonomy}
11214
+ subTaxonomies={props.subTaxonomies}
11215
+ />
11216
11216
  */
11217
11217
  if (subTaxonomies.length === 0 && parentTaxonomy) {
11218
11218
  if (parentTaxonomy.identifier == exclude) {
@@ -11250,19 +11250,19 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
11250
11250
  }
11251
11251
  };
11252
11252
 
11253
- /*
11254
- This dropdown is used inside Article body to display related content placement pages
11255
- sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
11256
-
11257
- in article query, need to add '...' to content_placement to retreive additional info needed
11258
-
11259
- 'content_placement': taxonomyMapping[]-> {
11260
- ...,
11261
- 'ancestor': parent->parent->identifier,
11262
- 'parent': parent->identifier,
11263
- 'path': identifier
11264
- }
11265
-
11253
+ /*
11254
+ This dropdown is used inside Article body to display related content placement pages
11255
+ sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
11256
+
11257
+ in article query, need to add '...' to content_placement to retreive additional info needed
11258
+
11259
+ 'content_placement': taxonomyMapping[]-> {
11260
+ ...,
11261
+ 'ancestor': parent->parent->identifier,
11262
+ 'parent': parent->identifier,
11263
+ 'path': identifier
11264
+ }
11265
+
11266
11266
  */
11267
11267
 
11268
11268
  var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
@@ -11933,34 +11933,34 @@ var YahooHero = function YahooHero(props) {
11933
11933
  );
11934
11934
  };
11935
11935
 
11936
- /*
11937
- Sample query
11938
- let references = ''
11939
- if(article.taxonomyMapping.length > 0){
11940
- article.taxonomyMapping.forEach((ref, index) => {
11941
- references = references + `references('${ref._ref}') `
11942
- if(index+1 !== article.taxonomyMapping.length){
11943
- references = references + ` && `
11944
- }
11945
- })
11946
- }
11947
-
11948
- const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
11949
- ...,
11950
- title,
11951
- summary,
11952
- thumbnail,
11953
- url,
11954
- published,
11955
- authorMapping[]->,
11956
- contentCategory->
11957
- }`
11958
- const relatedArticles = await client.fetch(relatedArticlesQuery)
11959
-
11960
- Sample usage
11961
- <RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
11962
-
11963
-
11936
+ /*
11937
+ Sample query
11938
+ let references = ''
11939
+ if(article.taxonomyMapping.length > 0){
11940
+ article.taxonomyMapping.forEach((ref, index) => {
11941
+ references = references + `references('${ref._ref}') `
11942
+ if(index+1 !== article.taxonomyMapping.length){
11943
+ references = references + ` && `
11944
+ }
11945
+ })
11946
+ }
11947
+
11948
+ const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
11949
+ ...,
11950
+ title,
11951
+ summary,
11952
+ thumbnail,
11953
+ url,
11954
+ published,
11955
+ authorMapping[]->,
11956
+ contentCategory->
11957
+ }`
11958
+ const relatedArticles = await client.fetch(relatedArticlesQuery)
11959
+
11960
+ Sample usage
11961
+ <RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
11962
+
11963
+
11964
11964
  */
11965
11965
  var RelatedContent = function RelatedContent(props) {
11966
11966
  var client = props.client,
@@ -12027,21 +12027,21 @@ var RelatedContent = function RelatedContent(props) {
12027
12027
  );
12028
12028
  };
12029
12029
 
12030
- /*
12031
- Example usage - targetedonc.com/latest-conference
12032
- 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] {
12033
- ...,
12034
- title,
12035
- summary,
12036
- thumbnail,
12037
- url,
12038
- published,
12039
- documentGroup->,
12040
- contentCategory->,
12041
- 'pageNumber': ${currentPage}
12042
- }`
12043
-
12044
- const posts = await client.fetch(query, params)
12030
+ /*
12031
+ Example usage - targetedonc.com/latest-conference
12032
+ 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] {
12033
+ ...,
12034
+ title,
12035
+ summary,
12036
+ thumbnail,
12037
+ url,
12038
+ published,
12039
+ documentGroup->,
12040
+ contentCategory->,
12041
+ 'pageNumber': ${currentPage}
12042
+ }`
12043
+
12044
+ const posts = await client.fetch(query, params)
12045
12045
  */
12046
12046
 
12047
12047
  var ConferenceArticleCard = function ConferenceArticleCard(props) {
@@ -12630,7 +12630,9 @@ var _initialiseProps = function _initialiseProps() {
12630
12630
  config.horizontalAD = horizontalAD;
12631
12631
  var metaDescription = description ? description : summary ? summary : _this4.getFirstLine(article);
12632
12632
  _this4.setState({ config: config, title: title, summary: metaDescription }, function () {
12633
- index.lib_3.refresh();
12633
+ if (!main.main_36) {
12634
+ index.lib_3.refresh();
12635
+ }
12634
12636
  });
12635
12637
  };
12636
12638
 
@@ -53,7 +53,7 @@ var getNavigatorInstance = function getNavigatorInstance() {
53
53
  };
54
54
  var isIOS13Check = function isIOS13Check(type) {
55
55
  var nav = getNavigatorInstance();
56
- return nav && (nav.platform.indexOf(type) !== -1 || nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream);
56
+ return nav && (nav.platform.includes(type) || nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream);
57
57
  };
58
58
 
59
59
  function _typeof(obj) {
@@ -449,7 +449,7 @@ var isIEType = function isIEType() {
449
449
  var isElectronType = function isElectronType() {
450
450
  var nav = getNavigatorInstance();
451
451
  var ua = nav && nav.userAgent.toLowerCase();
452
- return typeof ua === 'string' ? /electron/.test(ua) : false;
452
+ return typeof ua === 'string' ? ua.includes('electron') : false;
453
453
  };
454
454
 
455
455
  var getIOS13 = function getIOS13() {
@@ -516,15 +516,15 @@ var getDeviceType = function getDeviceType() {
516
516
  var isSmartTV = isSmartTVType();
517
517
  var isConsole = isConsoleType();
518
518
  var isWearable = isWearableType();
519
- var isMobileSafari = isMobileSafariType() || getIPad13();
519
+ var isMobileSafari = isMobileSafariType();
520
520
  var isChromium = isChromiumType();
521
- var isMobile = isMobileAndTabletType() || getIPad13();
521
+ var isMobile = isMobileAndTabletType();
522
522
  var isMobileOnly = isMobileType();
523
- var isTablet = isTabletType() || getIPad13();
523
+ var isTablet = isTabletType();
524
524
  var isBrowser = isBrowserType();
525
525
  var isAndroid = isAndroidType();
526
526
  var isWinPhone = isWinPhoneType();
527
- var isIOS = isIOSType() || getIPad13();
527
+ var isIOS = isIOSType();
528
528
  var isChrome = isChromeType();
529
529
  var isFirefox = isFirefoxType();
530
530
  var isSafari = isSafariType();