@inappstory/react-sdk 1.7.12 → 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 +547 -42
- 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)
|
|
@@ -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;
|
|
@@ -10707,7 +10716,7 @@ class GameClientConfig {
|
|
|
10707
10716
|
value: void 0
|
|
10708
10717
|
});
|
|
10709
10718
|
const storyManagerConfig = this.storyManager.config;
|
|
10710
|
-
const sdkVersion = "1.7.
|
|
10719
|
+
const sdkVersion = "1.7.13";
|
|
10711
10720
|
const placeholders = this.storyManager.rootStore.placeholderStore.placeholders;
|
|
10712
10721
|
const session = this.storyManager.rootStore.sessionStore.session;
|
|
10713
10722
|
this.sessionId = session.id;
|
|
@@ -12176,6 +12185,9 @@ class StorySlideApiHandlers {
|
|
|
12176
12185
|
value: new NarrativeDataCache()
|
|
12177
12186
|
});
|
|
12178
12187
|
}
|
|
12188
|
+
onEvent(name, event) { }
|
|
12189
|
+
onCardLoadingStateChange(state) { }
|
|
12190
|
+
;
|
|
12179
12191
|
clearNarrativeSessionDataCache() {
|
|
12180
12192
|
this.sessionNarrativeDataCache.clear();
|
|
12181
12193
|
}
|
|
@@ -17367,7 +17379,16 @@ let IamMessageSlideViewModel = (() => {
|
|
|
17367
17379
|
const { canClickNext } = this.slideApi.slideClickHandler(event.target, direction);
|
|
17368
17380
|
this._disabledNextClick = !canClickNext;
|
|
17369
17381
|
}
|
|
17370
|
-
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
|
+
}
|
|
17371
17392
|
getNavigationDirection(event, currentTarget) {
|
|
17372
17393
|
const xPercent = this.getClickPosition(event, currentTarget);
|
|
17373
17394
|
const k = this.slideApi.layoutDirection === "ltr" ? 1 : -1;
|
|
@@ -17423,6 +17444,7 @@ let IamMessageSlideViewModel = (() => {
|
|
|
17423
17444
|
|
|
17424
17445
|
|
|
17425
17446
|
|
|
17447
|
+
|
|
17426
17448
|
;// CONCATENATED MODULE: ../core/src/readers/inAppMessaging/iamMessage/actions/openGameAction.ts
|
|
17427
17449
|
|
|
17428
17450
|
class openGameAction_OpenGameAction {
|
|
@@ -17441,13 +17463,11 @@ class openGameAction_OpenGameAction {
|
|
|
17441
17463
|
});
|
|
17442
17464
|
}
|
|
17443
17465
|
async handle(payload) {
|
|
17444
|
-
var _a;
|
|
17445
17466
|
try {
|
|
17446
17467
|
await this.storyManager.openGame(payload.gameInstanceId);
|
|
17447
|
-
|
|
17468
|
+
this.iamMessage.pauseAndLock();
|
|
17448
17469
|
this.storyManager.gameReader.once(GameReaderEvent.Close, () => {
|
|
17449
|
-
|
|
17450
|
-
(_a = this.iamMessage.activeSlide) === null || _a === void 0 ? void 0 : _a.resumeAndUnlock();
|
|
17470
|
+
this.iamMessage.resumeAndUnlock();
|
|
17451
17471
|
});
|
|
17452
17472
|
}
|
|
17453
17473
|
catch (error) {
|
|
@@ -17751,7 +17771,12 @@ let IamReaderViewModel = (() => {
|
|
|
17751
17771
|
});
|
|
17752
17772
|
}
|
|
17753
17773
|
createIamMessageViewModel(message) {
|
|
17754
|
-
|
|
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
|
+
}
|
|
17755
17780
|
}
|
|
17756
17781
|
checkMessageNotOpened() {
|
|
17757
17782
|
if (this.activeMessage)
|
|
@@ -17852,13 +17877,11 @@ class showStoryAction_ShowStoryAction {
|
|
|
17852
17877
|
});
|
|
17853
17878
|
}
|
|
17854
17879
|
async handle(payload) {
|
|
17855
|
-
var _a;
|
|
17856
17880
|
try {
|
|
17857
17881
|
await this.storyManager.showStory(payload.storyId);
|
|
17858
|
-
|
|
17882
|
+
this.message.pauseAndLock();
|
|
17859
17883
|
this.storyManager.storyReader.once(StoryReaderEvent.Close, () => {
|
|
17860
|
-
|
|
17861
|
-
(_a = this.message.activeSlide) === null || _a === void 0 ? void 0 : _a.resumeAndUnlock();
|
|
17884
|
+
this.message.resumeAndUnlock();
|
|
17862
17885
|
});
|
|
17863
17886
|
}
|
|
17864
17887
|
catch (error) {
|
|
@@ -17898,6 +17921,7 @@ class narrativeDataCache_NarrativeDataCache {
|
|
|
17898
17921
|
|
|
17899
17922
|
|
|
17900
17923
|
|
|
17924
|
+
|
|
17901
17925
|
class IamSlideApiHandlers {
|
|
17902
17926
|
constructor(storyManager, iamReader, iamMessage, iamStatisticsService) {
|
|
17903
17927
|
Object.defineProperty(this, "storyManager", {
|
|
@@ -17937,6 +17961,29 @@ class IamSlideApiHandlers {
|
|
|
17937
17961
|
value: new narrativeDataCache_NarrativeDataCache()
|
|
17938
17962
|
});
|
|
17939
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
|
+
}
|
|
17940
17987
|
clearActiveNarrativeDataCache() {
|
|
17941
17988
|
this.activeMessageNarrativeDataCache.clear();
|
|
17942
17989
|
}
|
|
@@ -18046,8 +18093,7 @@ class IamSlideApiHandlers {
|
|
|
18046
18093
|
share(id, config) { }
|
|
18047
18094
|
shareSlideScreenshot(shareId, hideElementsSelector, shareText) { }
|
|
18048
18095
|
showLayer(index) {
|
|
18049
|
-
|
|
18050
|
-
(_a = this.iamMessage.activeSlide) === null || _a === void 0 ? void 0 : _a.showLayerByIndex(index);
|
|
18096
|
+
this.iamMessage.showLayerByIndex(index);
|
|
18051
18097
|
}
|
|
18052
18098
|
showCardSlide(slideIndex) { }
|
|
18053
18099
|
cardShowNext() { }
|
|
@@ -18083,9 +18129,46 @@ class IamSlideApiHandlers {
|
|
|
18083
18129
|
this.iamMessage.hideErrorScreen();
|
|
18084
18130
|
}
|
|
18085
18131
|
showToast(text) {
|
|
18086
|
-
|
|
18087
|
-
|
|
18132
|
+
this.iamMessage.showToast({ content: text });
|
|
18133
|
+
}
|
|
18134
|
+
}
|
|
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;
|
|
18088
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() { }
|
|
18089
18172
|
}
|
|
18090
18173
|
|
|
18091
18174
|
;// CONCATENATED MODULE: ../core/src/readers/inAppMessaging/iamMessage/iamMessageViewModel.ts
|
|
@@ -18141,9 +18224,10 @@ var iamMessageViewModel_classPrivateFieldSet = (undefined && undefined.__classPr
|
|
|
18141
18224
|
|
|
18142
18225
|
|
|
18143
18226
|
|
|
18227
|
+
|
|
18144
18228
|
let IamMessageViewModel = (() => {
|
|
18145
18229
|
var _a, _IamMessageViewModel__isOnceOpened_accessor_storage, _IamMessageViewModel__$root_accessor_storage, _IamMessageViewModel__needShowErrorScreen_accessor_storage, _IamMessageViewModel__needShowLoaderScreen_accessor_storage;
|
|
18146
|
-
let _classSuper =
|
|
18230
|
+
let _classSuper = events.EventEmitter;
|
|
18147
18231
|
let _instanceExtraInitializers = [];
|
|
18148
18232
|
let __isOnceOpened_decorators;
|
|
18149
18233
|
let __isOnceOpened_initializers = [];
|
|
@@ -18246,7 +18330,8 @@ let IamMessageViewModel = (() => {
|
|
|
18246
18330
|
return 0;
|
|
18247
18331
|
}
|
|
18248
18332
|
get activeSlide() {
|
|
18249
|
-
|
|
18333
|
+
var _b;
|
|
18334
|
+
return (_b = this._slides[this.activeSlideIndex]) !== null && _b !== void 0 ? _b : new NullIamMessageSlideViewModel();
|
|
18250
18335
|
}
|
|
18251
18336
|
get slides() {
|
|
18252
18337
|
return this._slides;
|
|
@@ -18260,11 +18345,6 @@ let IamMessageViewModel = (() => {
|
|
|
18260
18345
|
get iterationId() {
|
|
18261
18346
|
return this.iamMessage.iterationId;
|
|
18262
18347
|
}
|
|
18263
|
-
/**
|
|
18264
|
-
1 - Bottom sheet
|
|
18265
|
-
2 - Modal
|
|
18266
|
-
3 - Fullscreen
|
|
18267
|
-
*/
|
|
18268
18348
|
get type() {
|
|
18269
18349
|
return this.iamMessage.type;
|
|
18270
18350
|
}
|
|
@@ -18291,17 +18371,17 @@ let IamMessageViewModel = (() => {
|
|
|
18291
18371
|
return this.storyManager.rootStore.iamStore.updateMessageUserData(this.id, data);
|
|
18292
18372
|
}
|
|
18293
18373
|
async init() {
|
|
18294
|
-
|
|
18295
|
-
await ((_b = this.activeSlide) === null || _b === void 0 ? void 0 : _b.init());
|
|
18374
|
+
await this.activeSlide.init();
|
|
18296
18375
|
}
|
|
18297
18376
|
async start() {
|
|
18298
|
-
|
|
18299
|
-
await ((_b = this.activeSlide) === null || _b === void 0 ? void 0 : _b.start());
|
|
18377
|
+
await this.activeSlide.start();
|
|
18300
18378
|
}
|
|
18301
18379
|
async stop() {
|
|
18302
|
-
var _b;
|
|
18303
18380
|
this.slideApiHandlers.clearActiveNarrativeDataCache();
|
|
18304
|
-
await
|
|
18381
|
+
await this.activeSlide.stop();
|
|
18382
|
+
}
|
|
18383
|
+
onClick(event, currentTarget) {
|
|
18384
|
+
this.activeSlide.onClick(event, currentTarget);
|
|
18305
18385
|
}
|
|
18306
18386
|
toPublicDto() {
|
|
18307
18387
|
return this.iamMessage.toPublicDto();
|
|
@@ -18318,9 +18398,25 @@ let IamMessageViewModel = (() => {
|
|
|
18318
18398
|
hideErrorScreen() {
|
|
18319
18399
|
this._needShowErrorScreen = false;
|
|
18320
18400
|
}
|
|
18321
|
-
destroy() {
|
|
18401
|
+
async destroy() {
|
|
18322
18402
|
var _b;
|
|
18323
|
-
(_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();
|
|
18324
18420
|
}
|
|
18325
18421
|
createSlidesViewModels() {
|
|
18326
18422
|
if (this._slides.length > 0)
|
|
@@ -18333,7 +18429,8 @@ let IamMessageViewModel = (() => {
|
|
|
18333
18429
|
nonce: getNonce(),
|
|
18334
18430
|
viewport: window,
|
|
18335
18431
|
userResizeHandler: undefined,
|
|
18336
|
-
VODPlayer: this.storyManager.globalProperties.$videoOnDemand
|
|
18432
|
+
VODPlayer: this.storyManager.globalProperties.$videoOnDemand,
|
|
18433
|
+
useSdkCacheForMultislideMode: false
|
|
18337
18434
|
});
|
|
18338
18435
|
this._slides = this.iamMessage.slides.map(slide => new IamMessageSlideViewModel(this, slide, slideApi));
|
|
18339
18436
|
this.slideApi = slideApi;
|
|
@@ -18374,11 +18471,420 @@ let IamMessageViewModel = (() => {
|
|
|
18374
18471
|
})();
|
|
18375
18472
|
|
|
18376
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
|
+
|
|
18377
18881
|
;// CONCATENATED MODULE: ../core/src/readers/inAppMessaging/iamMessage/index.ts
|
|
18378
18882
|
|
|
18379
18883
|
|
|
18380
18884
|
|
|
18381
18885
|
|
|
18886
|
+
|
|
18887
|
+
|
|
18382
18888
|
;// CONCATENATED MODULE: ../core/src/readers/inAppMessaging/index.ts
|
|
18383
18889
|
|
|
18384
18890
|
|
|
@@ -20980,7 +21486,7 @@ class UgcEditorStore {
|
|
|
20980
21486
|
const session = await this.storyManager.rootStore.sessionStore.open();
|
|
20981
21487
|
const ugcEditorConfigDto = await this.ugcEditorApi.fetchUgcEditorConfig();
|
|
20982
21488
|
const storyManagerConfig = this.storyManager.config;
|
|
20983
|
-
const sdkVersion = "1.7.
|
|
21489
|
+
const sdkVersion = "1.7.13";
|
|
20984
21490
|
this._config = {
|
|
20985
21491
|
sessionId: session.id,
|
|
20986
21492
|
apiKey: storyManagerConfig.apiKey,
|
|
@@ -21411,11 +21917,11 @@ class StoryManager extends TypedEventEmitter {
|
|
|
21411
21917
|
return this._userAgent;
|
|
21412
21918
|
}
|
|
21413
21919
|
get sdkVersionName() {
|
|
21414
|
-
const sdkVersionName = "1.7.
|
|
21920
|
+
const sdkVersionName = "1.7.13";
|
|
21415
21921
|
return sdkVersionName || "0.0.0";
|
|
21416
21922
|
}
|
|
21417
21923
|
get sdkVersionCode() {
|
|
21418
|
-
const sdkVersionCode =
|
|
21924
|
+
const sdkVersionCode = 10713;
|
|
21419
21925
|
return sdkVersionCode ? parseInt(sdkVersionCode) : 0;
|
|
21420
21926
|
}
|
|
21421
21927
|
get lang() {
|
|
@@ -21472,7 +21978,7 @@ class StoryManager extends TypedEventEmitter {
|
|
|
21472
21978
|
this.rootStore.storyManagerConfigStore.setConfig(configDto);
|
|
21473
21979
|
}
|
|
21474
21980
|
setUserAgent(userAgent) {
|
|
21475
|
-
const sdkVersionCode =
|
|
21981
|
+
const sdkVersionCode = 10713;
|
|
21476
21982
|
const buildVersion = sdkVersionCode ? parseInt(sdkVersionCode) : 0;
|
|
21477
21983
|
// According to RFC5987, HTTP header values can legitimately be supplied using the ISO-8859-1 encoding.
|
|
21478
21984
|
this._userAgent = `${userAgent} ${convertStrToLatin1(navigator.userAgent)}`;
|
|
@@ -27957,9 +28463,9 @@ let MessageViewFactory = (() => {
|
|
|
27957
28463
|
})();
|
|
27958
28464
|
|
|
27959
28465
|
|
|
27960
|
-
;// CONCATENATED MODULE: ./src/InAppMessaging/components/MessageSlide/
|
|
28466
|
+
;// CONCATENATED MODULE: ./src/InAppMessaging/components/MessageSlide/MessageSlide.styles.ts
|
|
27961
28467
|
|
|
27962
|
-
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}`;
|
|
27963
28469
|
|
|
27964
28470
|
;// CONCATENATED MODULE: ./src/InAppMessaging/components/MessageSlide/MessageSlide.ts
|
|
27965
28471
|
var MessageSlide_esDecorate = (undefined && undefined.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
@@ -28065,12 +28571,11 @@ let MessageSlide = (() => {
|
|
|
28065
28571
|
this.message.stop();
|
|
28066
28572
|
}
|
|
28067
28573
|
handleSlideClick(event) {
|
|
28068
|
-
var _a;
|
|
28069
28574
|
if (!event.currentTarget)
|
|
28070
28575
|
return;
|
|
28071
28576
|
event.preventDefault();
|
|
28072
28577
|
event.stopPropagation();
|
|
28073
|
-
|
|
28578
|
+
this.message.onClick(event, event.currentTarget);
|
|
28074
28579
|
}
|
|
28075
28580
|
async initAndStartSlide() {
|
|
28076
28581
|
const slidesContainer = this.slidesContainer;
|
|
@@ -28525,9 +29030,9 @@ let InAppMessagingReader = (() => {
|
|
|
28525
29030
|
});
|
|
28526
29031
|
}
|
|
28527
29032
|
async handleReloadMessage() {
|
|
28528
|
-
var _a, _b
|
|
29033
|
+
var _a, _b;
|
|
28529
29034
|
try {
|
|
28530
|
-
await ((
|
|
29035
|
+
await ((_b = (_a = this.viewModel) === null || _a === void 0 ? void 0 : _a.activeMessage) === null || _b === void 0 ? void 0 : _b.restart());
|
|
28531
29036
|
}
|
|
28532
29037
|
catch (error) {
|
|
28533
29038
|
console.error(error);
|