@inappstory/react-sdk 1.7.11 → 1.7.13
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/dist/index.esm.mjs +551 -48
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/package.json +2 -2
package/dist/index.esm.mjs
CHANGED
|
@@ -3607,13 +3607,21 @@ let IamApi = (() => {
|
|
|
3607
3607
|
;// CONCATENATED MODULE: ../core/src/domain/inAppMessaging/models/appearanceOptions/iamCommonAppearanceOptions.ts
|
|
3608
3608
|
class IamAppearanceCommonOptions {
|
|
3609
3609
|
constructor(optionsDto) {
|
|
3610
|
+
var _a;
|
|
3610
3611
|
Object.defineProperty(this, "background", {
|
|
3611
3612
|
enumerable: true,
|
|
3612
3613
|
configurable: true,
|
|
3613
3614
|
writable: true,
|
|
3614
3615
|
value: void 0
|
|
3615
3616
|
});
|
|
3617
|
+
Object.defineProperty(this, "cardAppearance", {
|
|
3618
|
+
enumerable: true,
|
|
3619
|
+
configurable: true,
|
|
3620
|
+
writable: true,
|
|
3621
|
+
value: {}
|
|
3622
|
+
});
|
|
3616
3623
|
this.background = this.mapBackgroundDtoToModel(optionsDto.background);
|
|
3624
|
+
this.cardAppearance = (_a = optionsDto.card_appearance) !== null && _a !== void 0 ? _a : {};
|
|
3617
3625
|
}
|
|
3618
3626
|
mapBackgroundDtoToModel(backgroundDto) {
|
|
3619
3627
|
if (!backgroundDto || backgroundDto.alpha === 0)
|
|
@@ -7974,9 +7982,6 @@ let StorySlideViewModel = (() => {
|
|
|
7974
7982
|
}
|
|
7975
7983
|
});
|
|
7976
7984
|
}
|
|
7977
|
-
get state() {
|
|
7978
|
-
return this.slideApi.state;
|
|
7979
|
-
}
|
|
7980
7985
|
get index() {
|
|
7981
7986
|
return this._index;
|
|
7982
7987
|
}
|
|
@@ -8206,17 +8211,20 @@ let StorySlideViewModel = (() => {
|
|
|
8206
8211
|
}
|
|
8207
8212
|
}
|
|
8208
8213
|
async destroy() {
|
|
8214
|
+
const release = await this.mutex.acquire();
|
|
8209
8215
|
try {
|
|
8210
8216
|
this.isStarted = false;
|
|
8211
8217
|
this.isInited = false;
|
|
8212
8218
|
this.story.touchController.off(TouchControllerEvent.TouchEnd, this.handleTouchEnd);
|
|
8213
8219
|
if (this.cacheManager)
|
|
8214
8220
|
this.slide.restoreOriginalResourceUrls();
|
|
8215
|
-
await this.slideApi.destroy();
|
|
8216
8221
|
}
|
|
8217
8222
|
catch (error) {
|
|
8218
8223
|
console.error(error);
|
|
8219
8224
|
}
|
|
8225
|
+
finally {
|
|
8226
|
+
release();
|
|
8227
|
+
}
|
|
8220
8228
|
}
|
|
8221
8229
|
getNavigationDirection(event, currentTarget) {
|
|
8222
8230
|
const xPercent = this.getClickPosition(event, currentTarget);
|
|
@@ -10145,7 +10153,8 @@ let StoryViewModel = (() => {
|
|
|
10145
10153
|
viewport: window,
|
|
10146
10154
|
userResizeHandler: undefined,
|
|
10147
10155
|
VODPlayer: this.storyManager.globalProperties.$videoOnDemand,
|
|
10148
|
-
overlappingActionBarHeight: this.actionPanel.height
|
|
10156
|
+
overlappingActionBarHeight: this.actionPanel.height,
|
|
10157
|
+
useSdkCacheForMultislideMode: false
|
|
10149
10158
|
});
|
|
10150
10159
|
slideApi.setSdkClientVariables(this.storyManager.config.options);
|
|
10151
10160
|
return slideApi;
|
|
@@ -10172,8 +10181,6 @@ let StoryViewModel = (() => {
|
|
|
10172
10181
|
async onSlideChange(index) {
|
|
10173
10182
|
var _b;
|
|
10174
10183
|
try {
|
|
10175
|
-
if (!this.isInited || !this.isStarted)
|
|
10176
|
-
return;
|
|
10177
10184
|
const lastSlide = this.getSlideByIndex(this._activeSlideIndex);
|
|
10178
10185
|
const activeSlide = this.getSlideByIndex(index);
|
|
10179
10186
|
this._activeSlideIndex = index;
|
|
@@ -10709,7 +10716,7 @@ class GameClientConfig {
|
|
|
10709
10716
|
value: void 0
|
|
10710
10717
|
});
|
|
10711
10718
|
const storyManagerConfig = this.storyManager.config;
|
|
10712
|
-
const sdkVersion = "1.7.
|
|
10719
|
+
const sdkVersion = "1.7.13";
|
|
10713
10720
|
const placeholders = this.storyManager.rootStore.placeholderStore.placeholders;
|
|
10714
10721
|
const session = this.storyManager.rootStore.sessionStore.session;
|
|
10715
10722
|
this.sessionId = session.id;
|
|
@@ -12178,6 +12185,9 @@ class StorySlideApiHandlers {
|
|
|
12178
12185
|
value: new NarrativeDataCache()
|
|
12179
12186
|
});
|
|
12180
12187
|
}
|
|
12188
|
+
onEvent(name, event) { }
|
|
12189
|
+
onCardLoadingStateChange(state) { }
|
|
12190
|
+
;
|
|
12181
12191
|
clearNarrativeSessionDataCache() {
|
|
12182
12192
|
this.sessionNarrativeDataCache.clear();
|
|
12183
12193
|
}
|
|
@@ -17369,7 +17379,16 @@ let IamMessageSlideViewModel = (() => {
|
|
|
17369
17379
|
const { canClickNext } = this.slideApi.slideClickHandler(event.target, direction);
|
|
17370
17380
|
this._disabledNextClick = !canClickNext;
|
|
17371
17381
|
}
|
|
17372
|
-
destroy() {
|
|
17382
|
+
async destroy() {
|
|
17383
|
+
try {
|
|
17384
|
+
this.message.touchController.off(TouchControllerEvent.TouchEnd, this.handleTouchEnd);
|
|
17385
|
+
document.removeEventListener("visibilitychange", this.handleDocumentVisibilityChange);
|
|
17386
|
+
await this.slideApi.destroy();
|
|
17387
|
+
}
|
|
17388
|
+
catch (error) {
|
|
17389
|
+
console.error(error);
|
|
17390
|
+
}
|
|
17391
|
+
}
|
|
17373
17392
|
getNavigationDirection(event, currentTarget) {
|
|
17374
17393
|
const xPercent = this.getClickPosition(event, currentTarget);
|
|
17375
17394
|
const k = this.slideApi.layoutDirection === "ltr" ? 1 : -1;
|
|
@@ -17425,6 +17444,7 @@ let IamMessageSlideViewModel = (() => {
|
|
|
17425
17444
|
|
|
17426
17445
|
|
|
17427
17446
|
|
|
17447
|
+
|
|
17428
17448
|
;// CONCATENATED MODULE: ../core/src/readers/inAppMessaging/iamMessage/actions/openGameAction.ts
|
|
17429
17449
|
|
|
17430
17450
|
class openGameAction_OpenGameAction {
|
|
@@ -17443,13 +17463,11 @@ class openGameAction_OpenGameAction {
|
|
|
17443
17463
|
});
|
|
17444
17464
|
}
|
|
17445
17465
|
async handle(payload) {
|
|
17446
|
-
var _a;
|
|
17447
17466
|
try {
|
|
17448
17467
|
await this.storyManager.openGame(payload.gameInstanceId);
|
|
17449
|
-
|
|
17468
|
+
this.iamMessage.pauseAndLock();
|
|
17450
17469
|
this.storyManager.gameReader.once(GameReaderEvent.Close, () => {
|
|
17451
|
-
|
|
17452
|
-
(_a = this.iamMessage.activeSlide) === null || _a === void 0 ? void 0 : _a.resumeAndUnlock();
|
|
17470
|
+
this.iamMessage.resumeAndUnlock();
|
|
17453
17471
|
});
|
|
17454
17472
|
}
|
|
17455
17473
|
catch (error) {
|
|
@@ -17753,7 +17771,12 @@ let IamReaderViewModel = (() => {
|
|
|
17753
17771
|
});
|
|
17754
17772
|
}
|
|
17755
17773
|
createIamMessageViewModel(message) {
|
|
17756
|
-
|
|
17774
|
+
if (message.slides.length > 1) {
|
|
17775
|
+
return new IamMultiSlideMessageViewModel(this, this.storyManager, message, this.iamStatisticsService);
|
|
17776
|
+
}
|
|
17777
|
+
else {
|
|
17778
|
+
return new IamMessageViewModel(this, this.storyManager, message, this.iamStatisticsService);
|
|
17779
|
+
}
|
|
17757
17780
|
}
|
|
17758
17781
|
checkMessageNotOpened() {
|
|
17759
17782
|
if (this.activeMessage)
|
|
@@ -17854,13 +17877,11 @@ class showStoryAction_ShowStoryAction {
|
|
|
17854
17877
|
});
|
|
17855
17878
|
}
|
|
17856
17879
|
async handle(payload) {
|
|
17857
|
-
var _a;
|
|
17858
17880
|
try {
|
|
17859
17881
|
await this.storyManager.showStory(payload.storyId);
|
|
17860
|
-
|
|
17882
|
+
this.message.pauseAndLock();
|
|
17861
17883
|
this.storyManager.storyReader.once(StoryReaderEvent.Close, () => {
|
|
17862
|
-
|
|
17863
|
-
(_a = this.message.activeSlide) === null || _a === void 0 ? void 0 : _a.resumeAndUnlock();
|
|
17884
|
+
this.message.resumeAndUnlock();
|
|
17864
17885
|
});
|
|
17865
17886
|
}
|
|
17866
17887
|
catch (error) {
|
|
@@ -17900,6 +17921,7 @@ class narrativeDataCache_NarrativeDataCache {
|
|
|
17900
17921
|
|
|
17901
17922
|
|
|
17902
17923
|
|
|
17924
|
+
|
|
17903
17925
|
class IamSlideApiHandlers {
|
|
17904
17926
|
constructor(storyManager, iamReader, iamMessage, iamStatisticsService) {
|
|
17905
17927
|
Object.defineProperty(this, "storyManager", {
|
|
@@ -17939,6 +17961,29 @@ class IamSlideApiHandlers {
|
|
|
17939
17961
|
value: new narrativeDataCache_NarrativeDataCache()
|
|
17940
17962
|
});
|
|
17941
17963
|
}
|
|
17964
|
+
onEvent(name, event) {
|
|
17965
|
+
switch (name) {
|
|
17966
|
+
case "showSlide":
|
|
17967
|
+
if (this.iamMessage instanceof IamMultiSlideMessageViewModel) {
|
|
17968
|
+
this.iamMessage.onShowSlide(event.index);
|
|
17969
|
+
}
|
|
17970
|
+
break;
|
|
17971
|
+
}
|
|
17972
|
+
}
|
|
17973
|
+
onCardLoadingStateChange(state) {
|
|
17974
|
+
switch (state) {
|
|
17975
|
+
case 0 /* CARD_LOADING_STATE.LOADING */:
|
|
17976
|
+
this.iamMessage.showLoaderScreen();
|
|
17977
|
+
break;
|
|
17978
|
+
case 1 /* CARD_LOADING_STATE.LOADED */:
|
|
17979
|
+
this.iamMessage.hideErrorScreen();
|
|
17980
|
+
this.iamMessage.hideLoaderScreen();
|
|
17981
|
+
break;
|
|
17982
|
+
case 2 /* CARD_LOADING_STATE.LOADING_ERROR */:
|
|
17983
|
+
this.iamMessage.showErrorScreen();
|
|
17984
|
+
break;
|
|
17985
|
+
}
|
|
17986
|
+
}
|
|
17942
17987
|
clearActiveNarrativeDataCache() {
|
|
17943
17988
|
this.activeMessageNarrativeDataCache.clear();
|
|
17944
17989
|
}
|
|
@@ -18048,8 +18093,7 @@ class IamSlideApiHandlers {
|
|
|
18048
18093
|
share(id, config) { }
|
|
18049
18094
|
shareSlideScreenshot(shareId, hideElementsSelector, shareText) { }
|
|
18050
18095
|
showLayer(index) {
|
|
18051
|
-
|
|
18052
|
-
(_a = this.iamMessage.activeSlide) === null || _a === void 0 ? void 0 : _a.showLayerByIndex(index);
|
|
18096
|
+
this.iamMessage.showLayerByIndex(index);
|
|
18053
18097
|
}
|
|
18054
18098
|
showCardSlide(slideIndex) { }
|
|
18055
18099
|
cardShowNext() { }
|
|
@@ -18085,11 +18129,48 @@ class IamSlideApiHandlers {
|
|
|
18085
18129
|
this.iamMessage.hideErrorScreen();
|
|
18086
18130
|
}
|
|
18087
18131
|
showToast(text) {
|
|
18088
|
-
|
|
18089
|
-
(_a = this.iamMessage.activeSlide) === null || _a === void 0 ? void 0 : _a.showToast({ content: text });
|
|
18132
|
+
this.iamMessage.showToast({ content: text });
|
|
18090
18133
|
}
|
|
18091
18134
|
}
|
|
18092
18135
|
|
|
18136
|
+
;// CONCATENATED MODULE: ../core/src/readers/inAppMessaging/iamMessageSlide/nullIamMessageSlideViewModel.ts
|
|
18137
|
+
class NullIamMessageSlideViewModel {
|
|
18138
|
+
get isLoading() {
|
|
18139
|
+
return true;
|
|
18140
|
+
}
|
|
18141
|
+
get html() {
|
|
18142
|
+
return "";
|
|
18143
|
+
}
|
|
18144
|
+
get navigationDisabled() {
|
|
18145
|
+
return false;
|
|
18146
|
+
}
|
|
18147
|
+
async reload() {
|
|
18148
|
+
return {
|
|
18149
|
+
currentTime: Date.now()
|
|
18150
|
+
};
|
|
18151
|
+
}
|
|
18152
|
+
mute() { }
|
|
18153
|
+
unmute() { }
|
|
18154
|
+
notifyTimerEnd() { }
|
|
18155
|
+
pauseAndLock() { }
|
|
18156
|
+
resumeAndUnlock() { }
|
|
18157
|
+
async showLayerByIndex(index) { }
|
|
18158
|
+
setUserData(id, text) { }
|
|
18159
|
+
setShareComplete(id, isSuccess) { }
|
|
18160
|
+
notifySwipeUp(target) { }
|
|
18161
|
+
showToast(options) { }
|
|
18162
|
+
async init() { }
|
|
18163
|
+
async start() { }
|
|
18164
|
+
async restart() { }
|
|
18165
|
+
async resumeByApp() { }
|
|
18166
|
+
async pauseByApp() { }
|
|
18167
|
+
async resumeByUser() { }
|
|
18168
|
+
async pauseByUser() { }
|
|
18169
|
+
async stop() { }
|
|
18170
|
+
onClick(event, currentTarget) { }
|
|
18171
|
+
async destroy() { }
|
|
18172
|
+
}
|
|
18173
|
+
|
|
18093
18174
|
;// CONCATENATED MODULE: ../core/src/readers/inAppMessaging/iamMessage/iamMessageViewModel.ts
|
|
18094
18175
|
var iamMessageViewModel_runInitializers = (undefined && undefined.__runInitializers) || function (thisArg, initializers, value) {
|
|
18095
18176
|
var useValue = arguments.length > 2;
|
|
@@ -18143,9 +18224,10 @@ var iamMessageViewModel_classPrivateFieldSet = (undefined && undefined.__classPr
|
|
|
18143
18224
|
|
|
18144
18225
|
|
|
18145
18226
|
|
|
18227
|
+
|
|
18146
18228
|
let IamMessageViewModel = (() => {
|
|
18147
18229
|
var _a, _IamMessageViewModel__isOnceOpened_accessor_storage, _IamMessageViewModel__$root_accessor_storage, _IamMessageViewModel__needShowErrorScreen_accessor_storage, _IamMessageViewModel__needShowLoaderScreen_accessor_storage;
|
|
18148
|
-
let _classSuper =
|
|
18230
|
+
let _classSuper = events.EventEmitter;
|
|
18149
18231
|
let _instanceExtraInitializers = [];
|
|
18150
18232
|
let __isOnceOpened_decorators;
|
|
18151
18233
|
let __isOnceOpened_initializers = [];
|
|
@@ -18248,7 +18330,8 @@ let IamMessageViewModel = (() => {
|
|
|
18248
18330
|
return 0;
|
|
18249
18331
|
}
|
|
18250
18332
|
get activeSlide() {
|
|
18251
|
-
|
|
18333
|
+
var _b;
|
|
18334
|
+
return (_b = this._slides[this.activeSlideIndex]) !== null && _b !== void 0 ? _b : new NullIamMessageSlideViewModel();
|
|
18252
18335
|
}
|
|
18253
18336
|
get slides() {
|
|
18254
18337
|
return this._slides;
|
|
@@ -18262,11 +18345,6 @@ let IamMessageViewModel = (() => {
|
|
|
18262
18345
|
get iterationId() {
|
|
18263
18346
|
return this.iamMessage.iterationId;
|
|
18264
18347
|
}
|
|
18265
|
-
/**
|
|
18266
|
-
1 - Bottom sheet
|
|
18267
|
-
2 - Modal
|
|
18268
|
-
3 - Fullscreen
|
|
18269
|
-
*/
|
|
18270
18348
|
get type() {
|
|
18271
18349
|
return this.iamMessage.type;
|
|
18272
18350
|
}
|
|
@@ -18293,17 +18371,17 @@ let IamMessageViewModel = (() => {
|
|
|
18293
18371
|
return this.storyManager.rootStore.iamStore.updateMessageUserData(this.id, data);
|
|
18294
18372
|
}
|
|
18295
18373
|
async init() {
|
|
18296
|
-
|
|
18297
|
-
await ((_b = this.activeSlide) === null || _b === void 0 ? void 0 : _b.init());
|
|
18374
|
+
await this.activeSlide.init();
|
|
18298
18375
|
}
|
|
18299
18376
|
async start() {
|
|
18300
|
-
|
|
18301
|
-
await ((_b = this.activeSlide) === null || _b === void 0 ? void 0 : _b.start());
|
|
18377
|
+
await this.activeSlide.start();
|
|
18302
18378
|
}
|
|
18303
18379
|
async stop() {
|
|
18304
|
-
var _b;
|
|
18305
18380
|
this.slideApiHandlers.clearActiveNarrativeDataCache();
|
|
18306
|
-
await
|
|
18381
|
+
await this.activeSlide.stop();
|
|
18382
|
+
}
|
|
18383
|
+
onClick(event, currentTarget) {
|
|
18384
|
+
this.activeSlide.onClick(event, currentTarget);
|
|
18307
18385
|
}
|
|
18308
18386
|
toPublicDto() {
|
|
18309
18387
|
return this.iamMessage.toPublicDto();
|
|
@@ -18320,9 +18398,25 @@ let IamMessageViewModel = (() => {
|
|
|
18320
18398
|
hideErrorScreen() {
|
|
18321
18399
|
this._needShowErrorScreen = false;
|
|
18322
18400
|
}
|
|
18323
|
-
destroy() {
|
|
18401
|
+
async destroy() {
|
|
18324
18402
|
var _b;
|
|
18325
|
-
(_b = this.slideApi) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
18403
|
+
return (_b = this.slideApi) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
18404
|
+
}
|
|
18405
|
+
resumeAndUnlock() {
|
|
18406
|
+
this.activeSlide.resumeAndUnlock();
|
|
18407
|
+
}
|
|
18408
|
+
pauseAndLock() {
|
|
18409
|
+
this.activeSlide.resumeAndUnlock();
|
|
18410
|
+
}
|
|
18411
|
+
showLayerByIndex(index) {
|
|
18412
|
+
this.activeSlide.showLayerByIndex(index);
|
|
18413
|
+
}
|
|
18414
|
+
showToast(options) {
|
|
18415
|
+
this.activeSlide.showToast(options);
|
|
18416
|
+
}
|
|
18417
|
+
restart() {
|
|
18418
|
+
var _b;
|
|
18419
|
+
return (_b = this.activeSlide) === null || _b === void 0 ? void 0 : _b.restart();
|
|
18326
18420
|
}
|
|
18327
18421
|
createSlidesViewModels() {
|
|
18328
18422
|
if (this._slides.length > 0)
|
|
@@ -18335,7 +18429,8 @@ let IamMessageViewModel = (() => {
|
|
|
18335
18429
|
nonce: getNonce(),
|
|
18336
18430
|
viewport: window,
|
|
18337
18431
|
userResizeHandler: undefined,
|
|
18338
|
-
VODPlayer: this.storyManager.globalProperties.$videoOnDemand
|
|
18432
|
+
VODPlayer: this.storyManager.globalProperties.$videoOnDemand,
|
|
18433
|
+
useSdkCacheForMultislideMode: false
|
|
18339
18434
|
});
|
|
18340
18435
|
this._slides = this.iamMessage.slides.map(slide => new IamMessageSlideViewModel(this, slide, slideApi));
|
|
18341
18436
|
this.slideApi = slideApi;
|
|
@@ -18376,11 +18471,420 @@ let IamMessageViewModel = (() => {
|
|
|
18376
18471
|
})();
|
|
18377
18472
|
|
|
18378
18473
|
|
|
18474
|
+
;// CONCATENATED MODULE: ../core/src/readers/inAppMessaging/iamMessage/iamMultiSlideMessageViewModel.ts
|
|
18475
|
+
var iamMultiSlideMessageViewModel_runInitializers = (undefined && undefined.__runInitializers) || function (thisArg, initializers, value) {
|
|
18476
|
+
var useValue = arguments.length > 2;
|
|
18477
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
18478
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
18479
|
+
}
|
|
18480
|
+
return useValue ? value : void 0;
|
|
18481
|
+
};
|
|
18482
|
+
var iamMultiSlideMessageViewModel_esDecorate = (undefined && undefined.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
18483
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
18484
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
18485
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
18486
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
18487
|
+
var _, done = false;
|
|
18488
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
18489
|
+
var context = {};
|
|
18490
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
18491
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
18492
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
18493
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
18494
|
+
if (kind === "accessor") {
|
|
18495
|
+
if (result === void 0) continue;
|
|
18496
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
18497
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
18498
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18499
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
18500
|
+
}
|
|
18501
|
+
else if (_ = accept(result)) {
|
|
18502
|
+
if (kind === "field") initializers.unshift(_);
|
|
18503
|
+
else descriptor[key] = _;
|
|
18504
|
+
}
|
|
18505
|
+
}
|
|
18506
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
18507
|
+
done = true;
|
|
18508
|
+
};
|
|
18509
|
+
var iamMultiSlideMessageViewModel_classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
18510
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
18511
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
18512
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
18513
|
+
};
|
|
18514
|
+
var iamMultiSlideMessageViewModel_classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
18515
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
18516
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
18517
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
18518
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
18519
|
+
};
|
|
18520
|
+
|
|
18521
|
+
|
|
18522
|
+
|
|
18523
|
+
|
|
18524
|
+
|
|
18525
|
+
|
|
18526
|
+
|
|
18527
|
+
const iamMultiSlideMessageViewModel_SWIPE_UP_THRESHOLD = 10;
|
|
18528
|
+
const iamMultiSlideMessageViewModel_SLIDE_CLICK_THRESHOLD = 0.3;
|
|
18529
|
+
let IamMultiSlideMessageViewModel = (() => {
|
|
18530
|
+
var _a, _IamMultiSlideMessageViewModel__isOnceOpened_accessor_storage, _IamMultiSlideMessageViewModel__$root_accessor_storage, _IamMultiSlideMessageViewModel__needShowErrorScreen_accessor_storage, _IamMultiSlideMessageViewModel__needShowLoaderScreen_accessor_storage, _IamMultiSlideMessageViewModel__disabledNextClick_accessor_storage;
|
|
18531
|
+
let _classSuper = events.EventEmitter;
|
|
18532
|
+
let _instanceExtraInitializers = [];
|
|
18533
|
+
let __isOnceOpened_decorators;
|
|
18534
|
+
let __isOnceOpened_initializers = [];
|
|
18535
|
+
let __isOnceOpened_extraInitializers = [];
|
|
18536
|
+
let __$root_decorators;
|
|
18537
|
+
let __$root_initializers = [];
|
|
18538
|
+
let __$root_extraInitializers = [];
|
|
18539
|
+
let __needShowErrorScreen_decorators;
|
|
18540
|
+
let __needShowErrorScreen_initializers = [];
|
|
18541
|
+
let __needShowErrorScreen_extraInitializers = [];
|
|
18542
|
+
let __needShowLoaderScreen_decorators;
|
|
18543
|
+
let __needShowLoaderScreen_initializers = [];
|
|
18544
|
+
let __needShowLoaderScreen_extraInitializers = [];
|
|
18545
|
+
let __disabledNextClick_decorators;
|
|
18546
|
+
let __disabledNextClick_initializers = [];
|
|
18547
|
+
let __disabledNextClick_extraInitializers = [];
|
|
18548
|
+
let _showErrorScreen_decorators;
|
|
18549
|
+
let _showLoaderScreen_decorators;
|
|
18550
|
+
let _hideLoaderScreen_decorators;
|
|
18551
|
+
let _hideErrorScreen_decorators;
|
|
18552
|
+
return _a = class IamMultiSlideMessageViewModel extends _classSuper {
|
|
18553
|
+
get _isOnceOpened() { return iamMultiSlideMessageViewModel_classPrivateFieldGet(this, _IamMultiSlideMessageViewModel__isOnceOpened_accessor_storage, "f"); }
|
|
18554
|
+
set _isOnceOpened(value) { iamMultiSlideMessageViewModel_classPrivateFieldSet(this, _IamMultiSlideMessageViewModel__isOnceOpened_accessor_storage, value, "f"); }
|
|
18555
|
+
get _$root() { return iamMultiSlideMessageViewModel_classPrivateFieldGet(this, _IamMultiSlideMessageViewModel__$root_accessor_storage, "f"); }
|
|
18556
|
+
set _$root(value) { iamMultiSlideMessageViewModel_classPrivateFieldSet(this, _IamMultiSlideMessageViewModel__$root_accessor_storage, value, "f"); }
|
|
18557
|
+
get _needShowErrorScreen() { return iamMultiSlideMessageViewModel_classPrivateFieldGet(this, _IamMultiSlideMessageViewModel__needShowErrorScreen_accessor_storage, "f"); }
|
|
18558
|
+
set _needShowErrorScreen(value) { iamMultiSlideMessageViewModel_classPrivateFieldSet(this, _IamMultiSlideMessageViewModel__needShowErrorScreen_accessor_storage, value, "f"); }
|
|
18559
|
+
get _needShowLoaderScreen() { return iamMultiSlideMessageViewModel_classPrivateFieldGet(this, _IamMultiSlideMessageViewModel__needShowLoaderScreen_accessor_storage, "f"); }
|
|
18560
|
+
set _needShowLoaderScreen(value) { iamMultiSlideMessageViewModel_classPrivateFieldSet(this, _IamMultiSlideMessageViewModel__needShowLoaderScreen_accessor_storage, value, "f"); }
|
|
18561
|
+
get _disabledNextClick() { return iamMultiSlideMessageViewModel_classPrivateFieldGet(this, _IamMultiSlideMessageViewModel__disabledNextClick_accessor_storage, "f"); }
|
|
18562
|
+
set _disabledNextClick(value) { iamMultiSlideMessageViewModel_classPrivateFieldSet(this, _IamMultiSlideMessageViewModel__disabledNextClick_accessor_storage, value, "f"); }
|
|
18563
|
+
constructor(iamReader, storyManager, iamMessage, iamStatisticsService) {
|
|
18564
|
+
super();
|
|
18565
|
+
Object.defineProperty(this, "iamReader", {
|
|
18566
|
+
enumerable: true,
|
|
18567
|
+
configurable: true,
|
|
18568
|
+
writable: true,
|
|
18569
|
+
value: (iamMultiSlideMessageViewModel_runInitializers(this, _instanceExtraInitializers), iamReader)
|
|
18570
|
+
});
|
|
18571
|
+
Object.defineProperty(this, "storyManager", {
|
|
18572
|
+
enumerable: true,
|
|
18573
|
+
configurable: true,
|
|
18574
|
+
writable: true,
|
|
18575
|
+
value: storyManager
|
|
18576
|
+
});
|
|
18577
|
+
Object.defineProperty(this, "iamMessage", {
|
|
18578
|
+
enumerable: true,
|
|
18579
|
+
configurable: true,
|
|
18580
|
+
writable: true,
|
|
18581
|
+
value: iamMessage
|
|
18582
|
+
});
|
|
18583
|
+
Object.defineProperty(this, "iamStatisticsService", {
|
|
18584
|
+
enumerable: true,
|
|
18585
|
+
configurable: true,
|
|
18586
|
+
writable: true,
|
|
18587
|
+
value: iamStatisticsService
|
|
18588
|
+
});
|
|
18589
|
+
Object.defineProperty(this, "toast", {
|
|
18590
|
+
enumerable: true,
|
|
18591
|
+
configurable: true,
|
|
18592
|
+
writable: true,
|
|
18593
|
+
value: null
|
|
18594
|
+
});
|
|
18595
|
+
Object.defineProperty(this, "slideApiHandlers", {
|
|
18596
|
+
enumerable: true,
|
|
18597
|
+
configurable: true,
|
|
18598
|
+
writable: true,
|
|
18599
|
+
value: void 0
|
|
18600
|
+
});
|
|
18601
|
+
_IamMultiSlideMessageViewModel__isOnceOpened_accessor_storage.set(this, iamMultiSlideMessageViewModel_runInitializers(this, __isOnceOpened_initializers, false));
|
|
18602
|
+
_IamMultiSlideMessageViewModel__$root_accessor_storage.set(this, (iamMultiSlideMessageViewModel_runInitializers(this, __isOnceOpened_extraInitializers), iamMultiSlideMessageViewModel_runInitializers(this, __$root_initializers, null)));
|
|
18603
|
+
_IamMultiSlideMessageViewModel__needShowErrorScreen_accessor_storage.set(this, (iamMultiSlideMessageViewModel_runInitializers(this, __$root_extraInitializers), iamMultiSlideMessageViewModel_runInitializers(this, __needShowErrorScreen_initializers, false)));
|
|
18604
|
+
_IamMultiSlideMessageViewModel__needShowLoaderScreen_accessor_storage.set(this, (iamMultiSlideMessageViewModel_runInitializers(this, __needShowErrorScreen_extraInitializers), iamMultiSlideMessageViewModel_runInitializers(this, __needShowLoaderScreen_initializers, false)));
|
|
18605
|
+
_IamMultiSlideMessageViewModel__disabledNextClick_accessor_storage.set(this, (iamMultiSlideMessageViewModel_runInitializers(this, __needShowLoaderScreen_extraInitializers), iamMultiSlideMessageViewModel_runInitializers(this, __disabledNextClick_initializers, false)));
|
|
18606
|
+
Object.defineProperty(this, "_activeSlideIndex", {
|
|
18607
|
+
enumerable: true,
|
|
18608
|
+
configurable: true,
|
|
18609
|
+
writable: true,
|
|
18610
|
+
value: (iamMultiSlideMessageViewModel_runInitializers(this, __disabledNextClick_extraInitializers), 0)
|
|
18611
|
+
});
|
|
18612
|
+
Object.defineProperty(this, "locked", {
|
|
18613
|
+
enumerable: true,
|
|
18614
|
+
configurable: true,
|
|
18615
|
+
writable: true,
|
|
18616
|
+
value: false
|
|
18617
|
+
});
|
|
18618
|
+
Object.defineProperty(this, "touchController", {
|
|
18619
|
+
enumerable: true,
|
|
18620
|
+
configurable: true,
|
|
18621
|
+
writable: true,
|
|
18622
|
+
value: void 0
|
|
18623
|
+
});
|
|
18624
|
+
Object.defineProperty(this, "slideApi", {
|
|
18625
|
+
enumerable: true,
|
|
18626
|
+
configurable: true,
|
|
18627
|
+
writable: true,
|
|
18628
|
+
value: void 0
|
|
18629
|
+
});
|
|
18630
|
+
Object.defineProperty(this, "attachRoot", {
|
|
18631
|
+
enumerable: true,
|
|
18632
|
+
configurable: true,
|
|
18633
|
+
writable: true,
|
|
18634
|
+
value: (el) => {
|
|
18635
|
+
this._$root = el;
|
|
18636
|
+
this.slideApi = this.createSlideApi();
|
|
18637
|
+
}
|
|
18638
|
+
});
|
|
18639
|
+
Object.defineProperty(this, "handleTouchEnd", {
|
|
18640
|
+
enumerable: true,
|
|
18641
|
+
configurable: true,
|
|
18642
|
+
writable: true,
|
|
18643
|
+
value: ({ dy }) => {
|
|
18644
|
+
if (!this.touchController)
|
|
18645
|
+
return;
|
|
18646
|
+
if (dy < iamMultiSlideMessageViewModel_SWIPE_UP_THRESHOLD && this.touchController.verticalSwipeGesture)
|
|
18647
|
+
this.slideApi.slideSwipeUpHandler();
|
|
18648
|
+
}
|
|
18649
|
+
});
|
|
18650
|
+
this.touchController = iamReader.touchController;
|
|
18651
|
+
this.slideApiHandlers = new IamSlideApiHandlers(this.storyManager, this.iamReader, this, this.iamStatisticsService);
|
|
18652
|
+
this.handleDocumentVisibilityChange = this.handleDocumentVisibilityChange.bind(this);
|
|
18653
|
+
}
|
|
18654
|
+
get id() {
|
|
18655
|
+
return this.iamMessage.id;
|
|
18656
|
+
}
|
|
18657
|
+
get $root() {
|
|
18658
|
+
return this._$root;
|
|
18659
|
+
}
|
|
18660
|
+
get activeSlideIndex() {
|
|
18661
|
+
return this._activeSlideIndex;
|
|
18662
|
+
}
|
|
18663
|
+
get slides() {
|
|
18664
|
+
return [];
|
|
18665
|
+
}
|
|
18666
|
+
get context() {
|
|
18667
|
+
return this.iamMessage.context;
|
|
18668
|
+
}
|
|
18669
|
+
get appearanceOptions() {
|
|
18670
|
+
return this.iamMessage.appearanceOptions;
|
|
18671
|
+
}
|
|
18672
|
+
get iterationId() {
|
|
18673
|
+
return this.iamMessage.iterationId;
|
|
18674
|
+
}
|
|
18675
|
+
get type() {
|
|
18676
|
+
return this.iamMessage.type;
|
|
18677
|
+
}
|
|
18678
|
+
get needShowErrorScreen() {
|
|
18679
|
+
return this._needShowErrorScreen;
|
|
18680
|
+
}
|
|
18681
|
+
get needShowLoaderScreen() {
|
|
18682
|
+
return this._needShowLoaderScreen;
|
|
18683
|
+
}
|
|
18684
|
+
get timeSinceLastShow() {
|
|
18685
|
+
return this.iamMessage.timeSinceLastShow;
|
|
18686
|
+
}
|
|
18687
|
+
get disableClose() {
|
|
18688
|
+
return this.iamMessage.disableClose;
|
|
18689
|
+
}
|
|
18690
|
+
open() {
|
|
18691
|
+
this._isOnceOpened = true;
|
|
18692
|
+
const iterationId = this.iamMessage.trackOpen();
|
|
18693
|
+
return {
|
|
18694
|
+
iterationId
|
|
18695
|
+
};
|
|
18696
|
+
}
|
|
18697
|
+
async updateUserData(data) {
|
|
18698
|
+
return this.storyManager.rootStore.iamStore.updateMessageUserData(this.id, data);
|
|
18699
|
+
}
|
|
18700
|
+
async init() {
|
|
18701
|
+
await this.slideApi.showSlides(this.iamMessage.slides.map(slide => slide.html), this.appearanceOptions.cardAppearance);
|
|
18702
|
+
}
|
|
18703
|
+
async start() {
|
|
18704
|
+
document.addEventListener("visibilitychange", this.handleDocumentVisibilityChange);
|
|
18705
|
+
this.touchController.on(TouchControllerEvent.TouchEnd, this.handleTouchEnd);
|
|
18706
|
+
}
|
|
18707
|
+
async stop() {
|
|
18708
|
+
document.removeEventListener("visibilitychange", this.handleDocumentVisibilityChange);
|
|
18709
|
+
this.touchController.off(TouchControllerEvent.TouchEnd, this.handleTouchEnd);
|
|
18710
|
+
}
|
|
18711
|
+
onClick(event, currentTarget) {
|
|
18712
|
+
if (!event.target || !this.slideApi)
|
|
18713
|
+
return;
|
|
18714
|
+
event.preventDefault();
|
|
18715
|
+
event.stopPropagation();
|
|
18716
|
+
const direction = this.getNavigationDirection(event, currentTarget);
|
|
18717
|
+
const { canClickNext } = this.slideApi.slideClickHandler(event.target, direction);
|
|
18718
|
+
this._disabledNextClick = !canClickNext;
|
|
18719
|
+
}
|
|
18720
|
+
toPublicDto() {
|
|
18721
|
+
return this.iamMessage.toPublicDto();
|
|
18722
|
+
}
|
|
18723
|
+
showErrorScreen() {
|
|
18724
|
+
this._needShowErrorScreen = true;
|
|
18725
|
+
}
|
|
18726
|
+
showLoaderScreen() {
|
|
18727
|
+
this._needShowLoaderScreen = true;
|
|
18728
|
+
}
|
|
18729
|
+
hideLoaderScreen() {
|
|
18730
|
+
this._needShowLoaderScreen = false;
|
|
18731
|
+
}
|
|
18732
|
+
hideErrorScreen() {
|
|
18733
|
+
this._needShowErrorScreen = false;
|
|
18734
|
+
}
|
|
18735
|
+
async destroy() {
|
|
18736
|
+
var _b;
|
|
18737
|
+
document.removeEventListener("visibilitychange", this.handleDocumentVisibilityChange);
|
|
18738
|
+
this.touchController.off(TouchControllerEvent.TouchEnd, this.handleTouchEnd);
|
|
18739
|
+
return (_b = this.slideApi) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
18740
|
+
}
|
|
18741
|
+
async resumeAndUnlock() {
|
|
18742
|
+
var _b;
|
|
18743
|
+
try {
|
|
18744
|
+
this.locked = false;
|
|
18745
|
+
await ((_b = this.slideApi) === null || _b === void 0 ? void 0 : _b.slideAppResume());
|
|
18746
|
+
}
|
|
18747
|
+
catch (error) {
|
|
18748
|
+
this.handleSlideError(error);
|
|
18749
|
+
}
|
|
18750
|
+
}
|
|
18751
|
+
async pauseAndLock() {
|
|
18752
|
+
var _b;
|
|
18753
|
+
try {
|
|
18754
|
+
this.locked = true;
|
|
18755
|
+
await ((_b = this.slideApi) === null || _b === void 0 ? void 0 : _b.slideAppPause());
|
|
18756
|
+
}
|
|
18757
|
+
catch (error) {
|
|
18758
|
+
this.handleSlideError(error);
|
|
18759
|
+
}
|
|
18760
|
+
}
|
|
18761
|
+
showLayerByIndex(index) {
|
|
18762
|
+
var _b;
|
|
18763
|
+
(_b = this.slideApi) === null || _b === void 0 ? void 0 : _b.showLayer(index);
|
|
18764
|
+
}
|
|
18765
|
+
showToast(options) {
|
|
18766
|
+
this.toast = new Toast(Object.assign(Object.assign({}, options), { mountPoint: this.$root }));
|
|
18767
|
+
this.toast.show(options.content);
|
|
18768
|
+
}
|
|
18769
|
+
onShowSlide(index) {
|
|
18770
|
+
this._activeSlideIndex = index;
|
|
18771
|
+
}
|
|
18772
|
+
async restart() {
|
|
18773
|
+
await this.init();
|
|
18774
|
+
}
|
|
18775
|
+
createSlideApi() {
|
|
18776
|
+
const isFullscreen = this.type === IamMessageType.Fullscreen;
|
|
18777
|
+
return new slide_api_namespaceObject.SlideApi(this.slideApiHandlers, {
|
|
18778
|
+
root: this._$root,
|
|
18779
|
+
slideRatio: this.getContentRatio(),
|
|
18780
|
+
isFullscreen,
|
|
18781
|
+
nonce: getNonce(),
|
|
18782
|
+
viewport: window,
|
|
18783
|
+
userResizeHandler: undefined,
|
|
18784
|
+
VODPlayer: this.storyManager.globalProperties.$videoOnDemand,
|
|
18785
|
+
useSdkCacheForMultislideMode: false
|
|
18786
|
+
});
|
|
18787
|
+
}
|
|
18788
|
+
getContentRatio() {
|
|
18789
|
+
if (this.appearanceOptions instanceof IamBottomSheetAppearanceOptions ||
|
|
18790
|
+
this.appearanceOptions instanceof IamModalAppearanceOptions)
|
|
18791
|
+
return this.appearanceOptions.contentRatio;
|
|
18792
|
+
return 9 / 16;
|
|
18793
|
+
}
|
|
18794
|
+
handleSlideError(error) {
|
|
18795
|
+
console.error(error);
|
|
18796
|
+
this.showErrorScreen();
|
|
18797
|
+
this.touchController.off(TouchControllerEvent.TouchEnd, this.handleTouchEnd);
|
|
18798
|
+
}
|
|
18799
|
+
getNavigationDirection(event, currentTarget) {
|
|
18800
|
+
const xPercent = this.getClickPosition(event, currentTarget);
|
|
18801
|
+
const k = this.slideApi.layoutDirection === "ltr" ? 1 : -1;
|
|
18802
|
+
const direction = xPercent >= iamMultiSlideMessageViewModel_SLIDE_CLICK_THRESHOLD ? k : -k;
|
|
18803
|
+
return direction > 0 ? "forward" : "backward";
|
|
18804
|
+
}
|
|
18805
|
+
getClickPosition(event, currentTarget) {
|
|
18806
|
+
const rect = currentTarget.getBoundingClientRect();
|
|
18807
|
+
const width = rect.width;
|
|
18808
|
+
if (width <= 0)
|
|
18809
|
+
return 0;
|
|
18810
|
+
let x;
|
|
18811
|
+
if (event instanceof MouseEvent) {
|
|
18812
|
+
x = event.pageX - rect.left;
|
|
18813
|
+
}
|
|
18814
|
+
else if (event.touches && event.touches.length > 0) {
|
|
18815
|
+
x = event.touches[0].pageX - rect.left;
|
|
18816
|
+
}
|
|
18817
|
+
else {
|
|
18818
|
+
return 0;
|
|
18819
|
+
}
|
|
18820
|
+
return Math.max(0, Math.min(1, x / width));
|
|
18821
|
+
}
|
|
18822
|
+
handleDocumentVisibilityChange() {
|
|
18823
|
+
if (this.locked)
|
|
18824
|
+
return;
|
|
18825
|
+
if (document.visibilityState === "hidden")
|
|
18826
|
+
this.pauseByApp();
|
|
18827
|
+
if (document.visibilityState === "visible")
|
|
18828
|
+
this.resumeByApp();
|
|
18829
|
+
}
|
|
18830
|
+
async resumeByApp() {
|
|
18831
|
+
var _b;
|
|
18832
|
+
try {
|
|
18833
|
+
await ((_b = this.slideApi) === null || _b === void 0 ? void 0 : _b.slideAppResume());
|
|
18834
|
+
}
|
|
18835
|
+
catch (error) {
|
|
18836
|
+
this.handleSlideError(error);
|
|
18837
|
+
}
|
|
18838
|
+
}
|
|
18839
|
+
async pauseByApp() {
|
|
18840
|
+
var _b;
|
|
18841
|
+
try {
|
|
18842
|
+
await ((_b = this.slideApi) === null || _b === void 0 ? void 0 : _b.slideAppPause());
|
|
18843
|
+
}
|
|
18844
|
+
catch (error) {
|
|
18845
|
+
this.handleSlideError(error);
|
|
18846
|
+
}
|
|
18847
|
+
}
|
|
18848
|
+
},
|
|
18849
|
+
_IamMultiSlideMessageViewModel__isOnceOpened_accessor_storage = new WeakMap(),
|
|
18850
|
+
_IamMultiSlideMessageViewModel__$root_accessor_storage = new WeakMap(),
|
|
18851
|
+
_IamMultiSlideMessageViewModel__needShowErrorScreen_accessor_storage = new WeakMap(),
|
|
18852
|
+
_IamMultiSlideMessageViewModel__needShowLoaderScreen_accessor_storage = new WeakMap(),
|
|
18853
|
+
_IamMultiSlideMessageViewModel__disabledNextClick_accessor_storage = new WeakMap(),
|
|
18854
|
+
(() => {
|
|
18855
|
+
var _b;
|
|
18856
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_b = _classSuper[Symbol.metadata]) !== null && _b !== void 0 ? _b : null) : void 0;
|
|
18857
|
+
__isOnceOpened_decorators = [external_mobx_namespaceObject.observable];
|
|
18858
|
+
__$root_decorators = [external_mobx_namespaceObject.observable];
|
|
18859
|
+
__needShowErrorScreen_decorators = [external_mobx_namespaceObject.observable];
|
|
18860
|
+
__needShowLoaderScreen_decorators = [external_mobx_namespaceObject.observable];
|
|
18861
|
+
__disabledNextClick_decorators = [external_mobx_namespaceObject.observable];
|
|
18862
|
+
_showErrorScreen_decorators = [external_mobx_namespaceObject.action];
|
|
18863
|
+
_showLoaderScreen_decorators = [external_mobx_namespaceObject.action];
|
|
18864
|
+
_hideLoaderScreen_decorators = [external_mobx_namespaceObject.action];
|
|
18865
|
+
_hideErrorScreen_decorators = [external_mobx_namespaceObject.action];
|
|
18866
|
+
iamMultiSlideMessageViewModel_esDecorate(_a, null, __isOnceOpened_decorators, { kind: "accessor", name: "_isOnceOpened", static: false, private: false, access: { has: obj => "_isOnceOpened" in obj, get: obj => obj._isOnceOpened, set: (obj, value) => { obj._isOnceOpened = value; } }, metadata: _metadata }, __isOnceOpened_initializers, __isOnceOpened_extraInitializers);
|
|
18867
|
+
iamMultiSlideMessageViewModel_esDecorate(_a, null, __$root_decorators, { kind: "accessor", name: "_$root", static: false, private: false, access: { has: obj => "_$root" in obj, get: obj => obj._$root, set: (obj, value) => { obj._$root = value; } }, metadata: _metadata }, __$root_initializers, __$root_extraInitializers);
|
|
18868
|
+
iamMultiSlideMessageViewModel_esDecorate(_a, null, __needShowErrorScreen_decorators, { kind: "accessor", name: "_needShowErrorScreen", static: false, private: false, access: { has: obj => "_needShowErrorScreen" in obj, get: obj => obj._needShowErrorScreen, set: (obj, value) => { obj._needShowErrorScreen = value; } }, metadata: _metadata }, __needShowErrorScreen_initializers, __needShowErrorScreen_extraInitializers);
|
|
18869
|
+
iamMultiSlideMessageViewModel_esDecorate(_a, null, __needShowLoaderScreen_decorators, { kind: "accessor", name: "_needShowLoaderScreen", static: false, private: false, access: { has: obj => "_needShowLoaderScreen" in obj, get: obj => obj._needShowLoaderScreen, set: (obj, value) => { obj._needShowLoaderScreen = value; } }, metadata: _metadata }, __needShowLoaderScreen_initializers, __needShowLoaderScreen_extraInitializers);
|
|
18870
|
+
iamMultiSlideMessageViewModel_esDecorate(_a, null, __disabledNextClick_decorators, { kind: "accessor", name: "_disabledNextClick", static: false, private: false, access: { has: obj => "_disabledNextClick" in obj, get: obj => obj._disabledNextClick, set: (obj, value) => { obj._disabledNextClick = value; } }, metadata: _metadata }, __disabledNextClick_initializers, __disabledNextClick_extraInitializers);
|
|
18871
|
+
iamMultiSlideMessageViewModel_esDecorate(_a, null, _showErrorScreen_decorators, { kind: "method", name: "showErrorScreen", static: false, private: false, access: { has: obj => "showErrorScreen" in obj, get: obj => obj.showErrorScreen }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
18872
|
+
iamMultiSlideMessageViewModel_esDecorate(_a, null, _showLoaderScreen_decorators, { kind: "method", name: "showLoaderScreen", static: false, private: false, access: { has: obj => "showLoaderScreen" in obj, get: obj => obj.showLoaderScreen }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
18873
|
+
iamMultiSlideMessageViewModel_esDecorate(_a, null, _hideLoaderScreen_decorators, { kind: "method", name: "hideLoaderScreen", static: false, private: false, access: { has: obj => "hideLoaderScreen" in obj, get: obj => obj.hideLoaderScreen }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
18874
|
+
iamMultiSlideMessageViewModel_esDecorate(_a, null, _hideErrorScreen_decorators, { kind: "method", name: "hideErrorScreen", static: false, private: false, access: { has: obj => "hideErrorScreen" in obj, get: obj => obj.hideErrorScreen }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
18875
|
+
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
18876
|
+
})(),
|
|
18877
|
+
_a;
|
|
18878
|
+
})();
|
|
18879
|
+
|
|
18880
|
+
|
|
18379
18881
|
;// CONCATENATED MODULE: ../core/src/readers/inAppMessaging/iamMessage/index.ts
|
|
18380
18882
|
|
|
18381
18883
|
|
|
18382
18884
|
|
|
18383
18885
|
|
|
18886
|
+
|
|
18887
|
+
|
|
18384
18888
|
;// CONCATENATED MODULE: ../core/src/readers/inAppMessaging/index.ts
|
|
18385
18889
|
|
|
18386
18890
|
|
|
@@ -20982,7 +21486,7 @@ class UgcEditorStore {
|
|
|
20982
21486
|
const session = await this.storyManager.rootStore.sessionStore.open();
|
|
20983
21487
|
const ugcEditorConfigDto = await this.ugcEditorApi.fetchUgcEditorConfig();
|
|
20984
21488
|
const storyManagerConfig = this.storyManager.config;
|
|
20985
|
-
const sdkVersion = "1.7.
|
|
21489
|
+
const sdkVersion = "1.7.13";
|
|
20986
21490
|
this._config = {
|
|
20987
21491
|
sessionId: session.id,
|
|
20988
21492
|
apiKey: storyManagerConfig.apiKey,
|
|
@@ -21413,11 +21917,11 @@ class StoryManager extends TypedEventEmitter {
|
|
|
21413
21917
|
return this._userAgent;
|
|
21414
21918
|
}
|
|
21415
21919
|
get sdkVersionName() {
|
|
21416
|
-
const sdkVersionName = "1.7.
|
|
21920
|
+
const sdkVersionName = "1.7.13";
|
|
21417
21921
|
return sdkVersionName || "0.0.0";
|
|
21418
21922
|
}
|
|
21419
21923
|
get sdkVersionCode() {
|
|
21420
|
-
const sdkVersionCode =
|
|
21924
|
+
const sdkVersionCode = 10713;
|
|
21421
21925
|
return sdkVersionCode ? parseInt(sdkVersionCode) : 0;
|
|
21422
21926
|
}
|
|
21423
21927
|
get lang() {
|
|
@@ -21474,7 +21978,7 @@ class StoryManager extends TypedEventEmitter {
|
|
|
21474
21978
|
this.rootStore.storyManagerConfigStore.setConfig(configDto);
|
|
21475
21979
|
}
|
|
21476
21980
|
setUserAgent(userAgent) {
|
|
21477
|
-
const sdkVersionCode =
|
|
21981
|
+
const sdkVersionCode = 10713;
|
|
21478
21982
|
const buildVersion = sdkVersionCode ? parseInt(sdkVersionCode) : 0;
|
|
21479
21983
|
// According to RFC5987, HTTP header values can legitimately be supplied using the ISO-8859-1 encoding.
|
|
21480
21984
|
this._userAgent = `${userAgent} ${convertStrToLatin1(navigator.userAgent)}`;
|
|
@@ -27959,9 +28463,9 @@ let MessageViewFactory = (() => {
|
|
|
27959
28463
|
})();
|
|
27960
28464
|
|
|
27961
28465
|
|
|
27962
|
-
;// CONCATENATED MODULE: ./src/InAppMessaging/components/MessageSlide/
|
|
28466
|
+
;// CONCATENATED MODULE: ./src/InAppMessaging/components/MessageSlide/MessageSlide.styles.ts
|
|
27963
28467
|
|
|
27964
|
-
const messageSlideStyles = (0,external_lit_namespaceObject.css) `.slides-container{height:100%;width:100%;position:absolute;top:0;left:0;bottom:0;right:0}`;
|
|
28468
|
+
const messageSlideStyles = (0,external_lit_namespaceObject.css) `.slides-container{height:100%;width:100%;position:absolute;top:0;left:0;bottom:0;right:0}.slides-container .cards-slider{overflow:hidden}`;
|
|
27965
28469
|
|
|
27966
28470
|
;// CONCATENATED MODULE: ./src/InAppMessaging/components/MessageSlide/MessageSlide.ts
|
|
27967
28471
|
var MessageSlide_esDecorate = (undefined && undefined.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
@@ -28067,12 +28571,11 @@ let MessageSlide = (() => {
|
|
|
28067
28571
|
this.message.stop();
|
|
28068
28572
|
}
|
|
28069
28573
|
handleSlideClick(event) {
|
|
28070
|
-
var _a;
|
|
28071
28574
|
if (!event.currentTarget)
|
|
28072
28575
|
return;
|
|
28073
28576
|
event.preventDefault();
|
|
28074
28577
|
event.stopPropagation();
|
|
28075
|
-
|
|
28578
|
+
this.message.onClick(event, event.currentTarget);
|
|
28076
28579
|
}
|
|
28077
28580
|
async initAndStartSlide() {
|
|
28078
28581
|
const slidesContainer = this.slidesContainer;
|
|
@@ -28527,9 +29030,9 @@ let InAppMessagingReader = (() => {
|
|
|
28527
29030
|
});
|
|
28528
29031
|
}
|
|
28529
29032
|
async handleReloadMessage() {
|
|
28530
|
-
var _a, _b
|
|
29033
|
+
var _a, _b;
|
|
28531
29034
|
try {
|
|
28532
|
-
await ((
|
|
29035
|
+
await ((_b = (_a = this.viewModel) === null || _a === void 0 ? void 0 : _a.activeMessage) === null || _b === void 0 ? void 0 : _b.restart());
|
|
28533
29036
|
}
|
|
28534
29037
|
catch (error) {
|
|
28535
29038
|
console.error(error);
|