@mjhls/mjh-framework 1.0.671-beta.0 → 1.0.672

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 (148) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +3 -3
  4. package/dist/cjs/AD300x250x600.js +3 -3
  5. package/dist/cjs/AD728x90.js +4 -4
  6. package/dist/cjs/ADFloatingFooter.js +2 -2
  7. package/dist/cjs/ADGutter.js +2 -2
  8. package/dist/cjs/ADSkyscraper.js +2 -2
  9. package/dist/cjs/ADSponsoredResources.js +2 -2
  10. package/dist/cjs/ADWebcast.js +2 -2
  11. package/dist/cjs/ADWelcome.js +2 -2
  12. package/dist/cjs/AdSlot.js +2 -2
  13. package/dist/cjs/AdSlotsProvider.js +1 -1
  14. package/dist/cjs/ArticleCarousel.js +3 -3
  15. package/dist/cjs/ArticleSeriesListing.js +4 -4
  16. package/dist/cjs/Auth.js +507 -256
  17. package/dist/cjs/{BlockContent-091a991f.js → BlockContent-88f69acd.js} +1 -1
  18. package/dist/cjs/CMEDeck.js +5 -5
  19. package/dist/cjs/Column3.js +4 -4
  20. package/dist/cjs/ConferenceArticleCard.js +2 -2
  21. package/dist/cjs/DeckContent.js +7 -7
  22. package/dist/cjs/DeckQueue.js +6 -6
  23. package/dist/cjs/{Dfp-f6a18ed2.js → Dfp-b2bc3b97.js} +1 -1
  24. package/dist/cjs/EventsDeck.js +5 -5
  25. package/dist/cjs/ExternalResources.js +7 -7
  26. package/dist/cjs/Feature.js +3 -3
  27. package/dist/cjs/ForbesHero.js +2 -2
  28. package/dist/cjs/GridContent.js +10 -10
  29. package/dist/cjs/GridHero.js +2 -2
  30. package/dist/cjs/GroupDeck.js +1 -1
  31. package/dist/cjs/HamMagazine.js +4 -4
  32. package/dist/cjs/Hero.js +1 -1
  33. package/dist/cjs/HorizontalHero.js +2 -2
  34. package/dist/cjs/IssueContentDeck.js +2 -2
  35. package/dist/cjs/IssueDeck.js +2 -2
  36. package/dist/cjs/IssueLanding.js +7 -7
  37. package/dist/cjs/LeftNav.js +2 -2
  38. package/dist/cjs/MasterDeck.js +8 -8
  39. package/dist/cjs/NavMagazine.js +4 -4
  40. package/dist/cjs/NavNative.js +3 -3
  41. package/dist/cjs/OncliveHero.js +2 -2
  42. package/dist/cjs/OncliveLargeHero.js +2 -2
  43. package/dist/cjs/PartnerDetailListing.js +15 -1212
  44. package/dist/cjs/PublicationDeck.js +1 -1
  45. package/dist/cjs/QueueDeckExpanded.js +9 -9
  46. package/dist/cjs/RecentNews.js +2 -2
  47. package/dist/cjs/RelatedContent.js +2 -2
  48. package/dist/cjs/{SocialSearchComponent-81a50f81.js → SocialSearchComponent-962b1344.js} +5 -5
  49. package/dist/cjs/TaxonomyCard.js +2 -2
  50. package/dist/cjs/TemplateNormal.js +3 -3
  51. package/dist/cjs/ThumbnailCard.js +1 -1
  52. package/dist/cjs/Ustream.js +2 -2
  53. package/dist/cjs/VerticalHero.js +2 -2
  54. package/dist/cjs/VideoSeriesCard.js +2 -2
  55. package/dist/cjs/VideoSeriesListing.js +3 -3
  56. package/dist/cjs/View.js +111 -269
  57. package/dist/cjs/YahooHero.js +2 -2
  58. package/dist/cjs/YoutubeGroup.js +1 -1
  59. package/dist/cjs/getQuery.js +2 -2
  60. package/dist/cjs/getRelatedArticle.js +5 -354
  61. package/dist/cjs/getSerializers.js +6 -6
  62. package/dist/cjs/{getTargeting-9af0ef69.js → getTargeting-fee8c429.js} +2 -2
  63. package/dist/cjs/getTargeting.js +1 -1
  64. package/dist/cjs/{index-fa8ed292.js → index-2d0a4911.js} +34 -27
  65. package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
  66. package/dist/cjs/{index-be0c82be.js → index-b5eb3ff8.js} +20 -19
  67. package/dist/cjs/{index-2dddb8be.js → index-c190d704.js} +508 -455
  68. package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
  69. package/dist/cjs/index.js +16 -15
  70. package/dist/cjs/{main-a4cb15bb.js → main-b6c96c8d.js} +67 -36
  71. package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
  72. package/dist/cjs/urlFor.js +1 -1
  73. package/dist/esm/AD.js +1 -1
  74. package/dist/esm/AD300x250.js +3 -3
  75. package/dist/esm/AD300x250x600.js +3 -3
  76. package/dist/esm/AD728x90.js +4 -4
  77. package/dist/esm/ADFloatingFooter.js +2 -2
  78. package/dist/esm/ADGutter.js +2 -2
  79. package/dist/esm/ADSkyscraper.js +2 -2
  80. package/dist/esm/ADSponsoredResources.js +2 -2
  81. package/dist/esm/ADWebcast.js +2 -2
  82. package/dist/esm/ADWelcome.js +2 -2
  83. package/dist/esm/AdSlot.js +2 -2
  84. package/dist/esm/AdSlotsProvider.js +1 -1
  85. package/dist/esm/ArticleCarousel.js +1 -1
  86. package/dist/esm/ArticleSeriesListing.js +4 -4
  87. package/dist/esm/Auth.js +499 -248
  88. package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-a614acdf.js} +1 -1
  89. package/dist/esm/CMEDeck.js +5 -5
  90. package/dist/esm/Column3.js +4 -4
  91. package/dist/esm/ConferenceArticleCard.js +2 -2
  92. package/dist/esm/DeckContent.js +7 -7
  93. package/dist/esm/DeckQueue.js +6 -6
  94. package/dist/esm/{Dfp-96b49def.js → Dfp-8a8fca18.js} +1 -1
  95. package/dist/esm/EventsDeck.js +5 -5
  96. package/dist/esm/ExternalResources.js +7 -7
  97. package/dist/esm/Feature.js +3 -3
  98. package/dist/esm/ForbesHero.js +2 -2
  99. package/dist/esm/GridContent.js +10 -10
  100. package/dist/esm/GridHero.js +2 -2
  101. package/dist/esm/GroupDeck.js +1 -1
  102. package/dist/esm/HamMagazine.js +4 -4
  103. package/dist/esm/Hero.js +1 -1
  104. package/dist/esm/HorizontalHero.js +2 -2
  105. package/dist/esm/IssueContentDeck.js +2 -2
  106. package/dist/esm/IssueDeck.js +2 -2
  107. package/dist/esm/IssueLanding.js +7 -7
  108. package/dist/esm/LeftNav.js +2 -2
  109. package/dist/esm/MasterDeck.js +8 -8
  110. package/dist/esm/NavMagazine.js +4 -4
  111. package/dist/esm/NavNative.js +3 -3
  112. package/dist/esm/OncliveHero.js +2 -2
  113. package/dist/esm/OncliveLargeHero.js +2 -2
  114. package/dist/esm/PartnerDetailListing.js +13 -1209
  115. package/dist/esm/PublicationDeck.js +1 -1
  116. package/dist/esm/QueueDeckExpanded.js +9 -9
  117. package/dist/esm/RecentNews.js +2 -2
  118. package/dist/esm/RelatedContent.js +2 -2
  119. package/dist/esm/{SocialSearchComponent-55960ec4.js → SocialSearchComponent-75527dfe.js} +5 -5
  120. package/dist/esm/TaxonomyCard.js +2 -2
  121. package/dist/esm/TemplateNormal.js +3 -3
  122. package/dist/esm/ThumbnailCard.js +1 -1
  123. package/dist/esm/Ustream.js +2 -2
  124. package/dist/esm/VerticalHero.js +2 -2
  125. package/dist/esm/VideoSeriesCard.js +2 -2
  126. package/dist/esm/VideoSeriesListing.js +3 -3
  127. package/dist/esm/View.js +84 -242
  128. package/dist/esm/YahooHero.js +2 -2
  129. package/dist/esm/YoutubeGroup.js +1 -1
  130. package/dist/esm/getQuery.js +2 -2
  131. package/dist/esm/getRelatedArticle.js +5 -354
  132. package/dist/esm/getSerializers.js +6 -6
  133. package/dist/esm/{index-73819142.js → index-51a80699.js} +20 -19
  134. package/dist/esm/{index-0e45a0b2.js → index-93ec3c59.js} +34 -27
  135. package/dist/esm/{index-2141b8ab.js → index-983cedab.js} +508 -455
  136. package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
  137. package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
  138. package/dist/esm/index.js +14 -13
  139. package/dist/esm/{main-5d1e4bd3.js → main-0465b2a0.js} +65 -34
  140. package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
  141. package/dist/esm/urlFor.js +1 -1
  142. package/package.json +1 -1
  143. package/dist/cjs/index-bd6c9f56.js +0 -211
  144. package/dist/esm/index-db3bb315.js +0 -207
  145. /package/dist/cjs/{ADInfeed-388ec28a.js → ADInfeed-9735aff2.js} +0 -0
  146. /package/dist/cjs/{ADlgInfeed-5548ff47.js → ADlgInfeed-6bd11848.js} +0 -0
  147. /package/dist/esm/{ADInfeed-eae0af19.js → ADInfeed-9140aa7d.js} +0 -0
  148. /package/dist/esm/{ADlgInfeed-2f4c7a7c.js → ADlgInfeed-7656ecd1.js} +0 -0
@@ -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
 
@@ -377,11 +377,12 @@ function urlBuilder(options) {
377
377
  var client = options;
378
378
  if (isSanityClient(client)) {
379
379
  // Inherit config from client
380
- var _a = client.clientConfig, apiHost = _a.apiHost, projectId = _a.projectId, dataset = _a.dataset;
380
+ var _a = client.clientConfig, apiUrl = _a.apiHost, projectId = _a.projectId, dataset = _a.dataset;
381
+ var apiHost = apiUrl || 'https://api.sanity.io';
381
382
  return new ImageUrlBuilder(null, {
382
383
  baseUrl: apiHost.replace(/^https:\/\/api\./, 'https://cdn.'),
383
384
  projectId: projectId,
384
- dataset: dataset
385
+ dataset: dataset,
385
386
  });
386
387
  }
387
388
  // Or just accept the options as given
@@ -394,7 +395,7 @@ var ImageUrlBuilder = /** @class */ (function () {
394
395
  ? __assign(__assign({}, (parent.options || {})), (options || {})) : __assign({}, (options || {})); // Copy options
395
396
  }
396
397
  ImageUrlBuilder.prototype.withOptions = function (options) {
397
- var baseUrl = options.baseUrl || '';
398
+ var baseUrl = options.baseUrl || this.options.baseUrl;
398
399
  var newOptions = { baseUrl: baseUrl };
399
400
  for (var key in options) {
400
401
  if (options.hasOwnProperty(key)) {
@@ -522,7 +523,7 @@ var ImageUrlBuilder = /** @class */ (function () {
522
523
  ImageUrlBuilder.prototype.url = function () {
523
524
  return urlForImage_1$1.default(this.options);
524
525
  };
525
- // Synonym for url()
526
+ // Alias for url()
526
527
  ImageUrlBuilder.prototype.toString = function () {
527
528
  return this.url();
528
529
  };