@mjhls/mjh-framework 1.0.694-beta.3 → 1.0.695
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 +1 -1
- package/dist/cjs/AD.js +1 -1
- package/dist/cjs/AD300x250.js +3 -3
- package/dist/cjs/AD300x250x600.js +3 -3
- package/dist/cjs/AD728x90.js +4 -4
- package/dist/cjs/ADFloatingFooter.js +2 -2
- package/dist/cjs/ADGutter.js +2 -2
- package/dist/cjs/ADSkyscraper.js +2 -2
- package/dist/cjs/ADSponsoredResources.js +2 -2
- package/dist/cjs/ADWebcast.js +2 -2
- package/dist/cjs/ADWelcome.js +2 -2
- package/dist/cjs/AdSlot.js +2 -2
- package/dist/cjs/AdSlotsProvider.js +1 -1
- package/dist/cjs/ArticleCarousel.js +1 -1
- package/dist/cjs/ArticleSeriesListing.js +5 -5
- package/dist/cjs/Auth.js +301 -250
- package/dist/cjs/{BlockContent-091a991f.js → BlockContent-88f69acd.js} +1 -1
- package/dist/cjs/BrowseVideosListing.js +1 -1
- package/dist/cjs/CMEDeck.js +5 -5
- package/dist/cjs/Column3.js +4 -4
- package/dist/cjs/ConferenceArticleCard.js +2 -2
- package/dist/cjs/DeckContent.js +7 -7
- package/dist/cjs/DeckQueue.js +6 -6
- package/dist/cjs/{Dfp-f6a18ed2.js → Dfp-b2bc3b97.js} +1 -1
- package/dist/cjs/EventsDeck.js +4 -4
- package/dist/cjs/ExternalResources.js +7 -7
- package/dist/cjs/Feature.js +3 -3
- package/dist/cjs/ForbesHero.js +2 -2
- package/dist/cjs/GridContent.js +10 -10
- package/dist/cjs/GridHero.js +2 -2
- package/dist/cjs/GroupDeck.js +1 -1
- package/dist/cjs/HamMagazine.js +4 -4
- package/dist/cjs/Hero.js +1 -1
- package/dist/cjs/HorizontalHero.js +2 -2
- package/dist/cjs/IssueContentDeck.js +2 -2
- package/dist/cjs/IssueDeck.js +2 -2
- package/dist/cjs/IssueLanding.js +7 -7
- package/dist/cjs/LeftNav.js +2 -2
- package/dist/cjs/MasterDeck.js +7 -7
- package/dist/cjs/NavMagazine.js +4 -4
- package/dist/cjs/NavNative.js +3 -3
- package/dist/cjs/OncliveHero.js +2 -2
- package/dist/cjs/OncliveLargeHero.js +2 -2
- package/dist/cjs/PartnerDetailListing.js +16 -16
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +9 -9
- package/dist/cjs/RecentNews.js +2 -2
- package/dist/cjs/RelatedContent.js +2 -2
- package/dist/cjs/{SocialSearchComponent-9cd24578.js → SocialSearchComponent-6b5e5b47.js} +5 -5
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +3 -3
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/Ustream.js +2 -2
- package/dist/cjs/VerticalHero.js +2 -2
- package/dist/cjs/VideoSeriesCard.js +2 -2
- package/dist/cjs/VideoSeriesListing.js +5 -5
- package/dist/cjs/View.js +214 -175
- package/dist/cjs/YahooHero.js +2 -2
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/getRelatedArticle.js +156 -137
- package/dist/cjs/getSerializers.js +6 -6
- package/dist/cjs/{getTargeting-9af0ef69.js → getTargeting-fee8c429.js} +2 -2
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/{index-fa8ed292.js → index-2d0a4911.js} +34 -27
- package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
- package/dist/cjs/{index-be0c82be.js → index-b5eb3ff8.js} +20 -19
- package/dist/cjs/{index-a5919bab.js → index-c0bfab13.js} +512 -475
- package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
- package/dist/cjs/index.js +12 -12
- package/dist/cjs/{main-a4cb15bb.js → main-b6c96c8d.js} +67 -36
- package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/urlFor.js +1 -1
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +3 -3
- package/dist/esm/AD300x250x600.js +3 -3
- package/dist/esm/AD728x90.js +4 -4
- package/dist/esm/ADFloatingFooter.js +2 -2
- package/dist/esm/ADGutter.js +2 -2
- package/dist/esm/ADSkyscraper.js +2 -2
- package/dist/esm/ADSponsoredResources.js +2 -2
- package/dist/esm/ADWebcast.js +2 -2
- package/dist/esm/ADWelcome.js +2 -2
- package/dist/esm/AdSlot.js +2 -2
- package/dist/esm/AdSlotsProvider.js +1 -1
- package/dist/esm/ArticleCarousel.js +1 -1
- package/dist/esm/ArticleSeriesListing.js +5 -5
- package/dist/esm/Auth.js +298 -247
- package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-a614acdf.js} +1 -1
- package/dist/esm/BrowseVideosListing.js +1 -1
- package/dist/esm/CMEDeck.js +5 -5
- package/dist/esm/Column3.js +4 -4
- package/dist/esm/ConferenceArticleCard.js +2 -2
- package/dist/esm/DeckContent.js +7 -7
- package/dist/esm/DeckQueue.js +6 -6
- package/dist/esm/{Dfp-96b49def.js → Dfp-8a8fca18.js} +1 -1
- package/dist/esm/EventsDeck.js +4 -4
- package/dist/esm/ExternalResources.js +7 -7
- package/dist/esm/Feature.js +3 -3
- package/dist/esm/ForbesHero.js +2 -2
- package/dist/esm/GridContent.js +10 -10
- package/dist/esm/GridHero.js +2 -2
- package/dist/esm/GroupDeck.js +1 -1
- package/dist/esm/HamMagazine.js +4 -4
- package/dist/esm/Hero.js +1 -1
- package/dist/esm/HorizontalHero.js +2 -2
- package/dist/esm/IssueContentDeck.js +2 -2
- package/dist/esm/IssueDeck.js +2 -2
- package/dist/esm/IssueLanding.js +7 -7
- package/dist/esm/LeftNav.js +2 -2
- package/dist/esm/MasterDeck.js +7 -7
- package/dist/esm/NavMagazine.js +4 -4
- package/dist/esm/NavNative.js +3 -3
- package/dist/esm/OncliveHero.js +2 -2
- package/dist/esm/OncliveLargeHero.js +2 -2
- package/dist/esm/PartnerDetailListing.js +14 -14
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +9 -9
- package/dist/esm/RecentNews.js +2 -2
- package/dist/esm/RelatedContent.js +2 -2
- package/dist/esm/{SocialSearchComponent-93233334.js → SocialSearchComponent-7f14e0f3.js} +5 -5
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +3 -3
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/Ustream.js +2 -2
- package/dist/esm/VerticalHero.js +2 -2
- package/dist/esm/VideoSeriesCard.js +2 -2
- package/dist/esm/VideoSeriesListing.js +5 -5
- package/dist/esm/View.js +189 -150
- package/dist/esm/YahooHero.js +2 -2
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/getRelatedArticle.js +156 -137
- package/dist/esm/getSerializers.js +6 -6
- package/dist/esm/{index-73819142.js → index-51a80699.js} +20 -19
- package/dist/esm/{index-c376cd8e.js → index-754010eb.js} +512 -475
- package/dist/esm/{index-0e45a0b2.js → index-93ec3c59.js} +34 -27
- package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
- package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
- package/dist/esm/index.js +11 -11
- package/dist/esm/{main-5d1e4bd3.js → main-0465b2a0.js} +65 -34
- package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/urlFor.js +1 -1
- package/package.json +1 -1
- /package/dist/cjs/{ADInfeed-2fe7211c.js → ADInfeed-3410ab3c.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-14e17b43.js → ADlgInfeed-845aac15.js} +0 -0
- /package/dist/esm/{ADInfeed-eae71d07.js → ADInfeed-205cb7a9.js} +0 -0
- /package/dist/esm/{ADlgInfeed-c619fe64.js → ADlgInfeed-e538f17a.js} +0 -0
|
@@ -728,6 +728,8 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
728
728
|
|
|
729
729
|
return new Promise(function (resolve) {
|
|
730
730
|
_this3.getGoogletag().then(function (googletag) {
|
|
731
|
+
_this3.configureInitialOptions(googletag);
|
|
732
|
+
|
|
731
733
|
slotsToInitialize.forEach(function (currentSlotId) {
|
|
732
734
|
registeredSlots[currentSlotId].loading = false;
|
|
733
735
|
googletag.cmd.push(function () {
|
|
@@ -791,14 +793,25 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
791
793
|
});
|
|
792
794
|
});
|
|
793
795
|
},
|
|
794
|
-
|
|
796
|
+
// configure those gpt parameters that need to be set before pubsads service
|
|
797
|
+
// initialization.
|
|
798
|
+
configureInitialOptions: function configureInitialOptions(googletag) {
|
|
795
799
|
var _this4 = this;
|
|
796
800
|
|
|
801
|
+
googletag.cmd.push(function () {
|
|
802
|
+
if (_this4.disableInitialLoadIsEnabled()) {
|
|
803
|
+
googletag.pubads().disableInitialLoad();
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
},
|
|
807
|
+
configureOptions: function configureOptions(googletag) {
|
|
808
|
+
var _this5 = this;
|
|
809
|
+
|
|
797
810
|
googletag.cmd.push(function () {
|
|
798
811
|
var pubadsService = googletag.pubads();
|
|
799
|
-
pubadsService.setRequestNonPersonalizedAds(
|
|
812
|
+
pubadsService.setRequestNonPersonalizedAds(_this5.personalizedAdsEnabled() ? 0 : 1);
|
|
800
813
|
|
|
801
|
-
var targetingArguments =
|
|
814
|
+
var targetingArguments = _this5.getTargetingArguments(); // set global targetting arguments
|
|
802
815
|
|
|
803
816
|
|
|
804
817
|
Object.keys(targetingArguments).forEach(function (varName) {
|
|
@@ -807,34 +820,28 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
807
820
|
}
|
|
808
821
|
}); // set global adSense attributes
|
|
809
822
|
|
|
810
|
-
var adSenseAttributes =
|
|
823
|
+
var adSenseAttributes = _this5.getAdSenseAttributes();
|
|
811
824
|
|
|
812
825
|
Object.keys(adSenseAttributes).forEach(function (key) {
|
|
813
826
|
pubadsService.set(key, adSenseAttributes[key]);
|
|
814
827
|
});
|
|
815
828
|
|
|
816
|
-
if (
|
|
817
|
-
var
|
|
818
|
-
|
|
819
|
-
var config = _this4.getLazyLoadConfig();
|
|
829
|
+
if (_this5.lazyLoadIsEnabled()) {
|
|
830
|
+
var config = _this5.getLazyLoadConfig();
|
|
820
831
|
|
|
821
|
-
if (config
|
|
822
|
-
|
|
832
|
+
if (config) {
|
|
833
|
+
pubadsService.enableLazyLoad(config);
|
|
834
|
+
} else {
|
|
835
|
+
pubadsService.enableLazyLoad();
|
|
823
836
|
}
|
|
824
|
-
|
|
825
|
-
pubadsService.enableLazyLoad.call(args);
|
|
826
837
|
}
|
|
827
838
|
|
|
828
|
-
if (
|
|
839
|
+
if (_this5.singleRequestIsEnabled()) {
|
|
829
840
|
pubadsService.enableSingleRequest();
|
|
830
841
|
}
|
|
831
842
|
|
|
832
|
-
if (
|
|
833
|
-
pubadsService.
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
if (_this4.collapseEmptyDivs === true || _this4.collapseEmptyDivs === false) {
|
|
837
|
-
pubadsService.collapseEmptyDivs(_this4.collapseEmptyDivs);
|
|
843
|
+
if (_this5.collapseEmptyDivs === true || _this5.collapseEmptyDivs === false) {
|
|
844
|
+
pubadsService.collapseEmptyDivs(_this5.collapseEmptyDivs);
|
|
838
845
|
}
|
|
839
846
|
});
|
|
840
847
|
},
|
|
@@ -876,10 +883,10 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
876
883
|
}
|
|
877
884
|
},
|
|
878
885
|
gptRefreshAds: function gptRefreshAds(slots) {
|
|
879
|
-
var
|
|
886
|
+
var _this6 = this;
|
|
880
887
|
|
|
881
888
|
return this.getGoogletag().then(function (googletag) {
|
|
882
|
-
|
|
889
|
+
_this6.configureOptions(googletag);
|
|
883
890
|
|
|
884
891
|
googletag.cmd.push(function () {
|
|
885
892
|
var pubadsService = googletag.pubads();
|
|
@@ -890,14 +897,14 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
890
897
|
});
|
|
891
898
|
},
|
|
892
899
|
reload: function reload() {
|
|
893
|
-
var
|
|
900
|
+
var _this7 = this;
|
|
894
901
|
|
|
895
902
|
return this.destroyGPTSlots.apply(this, arguments).then(function () {
|
|
896
|
-
return
|
|
903
|
+
return _this7.load();
|
|
897
904
|
});
|
|
898
905
|
},
|
|
899
906
|
destroyGPTSlots: function destroyGPTSlots() {
|
|
900
|
-
var
|
|
907
|
+
var _this8 = this;
|
|
901
908
|
|
|
902
909
|
for (var _len4 = arguments.length, slotsToDestroy = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
903
910
|
slotsToDestroy[_key4] = arguments[_key4];
|
|
@@ -917,7 +924,7 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
917
924
|
slots.push(slot);
|
|
918
925
|
}
|
|
919
926
|
|
|
920
|
-
|
|
927
|
+
_this8.getGoogletag().then(function (googletag) {
|
|
921
928
|
googletag.cmd.push(function () {
|
|
922
929
|
if (managerAlreadyInitialized === true) {
|
|
923
930
|
if (slotsToDestroy.length > 0) {
|
|
@@ -940,7 +947,7 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
940
947
|
});
|
|
941
948
|
},
|
|
942
949
|
registerSlot: function registerSlot(_ref) {
|
|
943
|
-
var
|
|
950
|
+
var _this9 = this;
|
|
944
951
|
|
|
945
952
|
var slotId = _ref.slotId,
|
|
946
953
|
dfpNetworkId = _ref.dfpNetworkId,
|
|
@@ -979,7 +986,7 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
979
986
|
gptSlot = slot.gptSlot;
|
|
980
987
|
|
|
981
988
|
if (loading === false && !gptSlot) {
|
|
982
|
-
|
|
989
|
+
_this9.load(slotId);
|
|
983
990
|
}
|
|
984
991
|
}
|
|
985
992
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
4
|
-
var moment = require('./moment-
|
|
4
|
+
var moment = require('./moment-66a6a284.js');
|
|
5
5
|
|
|
6
6
|
var momentTimezone = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
7
7
|
//! moment-timezone.js
|
|
@@ -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,
|
|
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
|
-
//
|
|
526
|
+
// Alias for url()
|
|
526
527
|
ImageUrlBuilder.prototype.toString = function () {
|
|
527
528
|
return this.url();
|
|
528
529
|
};
|