@inappstory/react-sdk 1.15.3 → 1.15.5
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
CHANGED
|
@@ -7759,6 +7759,12 @@ let StorySlideViewModel = (() => {
|
|
|
7759
7759
|
paused: false
|
|
7760
7760
|
})
|
|
7761
7761
|
});
|
|
7762
|
+
Object.defineProperty(this, "_activeLayerIndex", {
|
|
7763
|
+
enumerable: true,
|
|
7764
|
+
configurable: true,
|
|
7765
|
+
writable: true,
|
|
7766
|
+
value: 0
|
|
7767
|
+
});
|
|
7762
7768
|
Object.defineProperty(this, "handleTouchEnd", {
|
|
7763
7769
|
enumerable: true,
|
|
7764
7770
|
configurable: true,
|
|
@@ -7774,6 +7780,9 @@ let StorySlideViewModel = (() => {
|
|
|
7774
7780
|
get index() {
|
|
7775
7781
|
return this._index;
|
|
7776
7782
|
}
|
|
7783
|
+
get activeLayerIndex() {
|
|
7784
|
+
return this._activeLayerIndex;
|
|
7785
|
+
}
|
|
7777
7786
|
get story() {
|
|
7778
7787
|
return this._story;
|
|
7779
7788
|
}
|
|
@@ -7868,7 +7877,8 @@ let StorySlideViewModel = (() => {
|
|
|
7868
7877
|
async restart() {
|
|
7869
7878
|
try {
|
|
7870
7879
|
this.story.hideErrorScreen();
|
|
7871
|
-
this.
|
|
7880
|
+
// this.commit({ inited: false, started: false, paused: false });
|
|
7881
|
+
//await this.init();
|
|
7872
7882
|
await this.slideApi.slideRestart({ muted: this._story.muted });
|
|
7873
7883
|
this.commit({ inited: true, started: true, paused: false });
|
|
7874
7884
|
}
|
|
@@ -7942,6 +7952,7 @@ let StorySlideViewModel = (() => {
|
|
|
7942
7952
|
}
|
|
7943
7953
|
async stopAndCleanup(params) {
|
|
7944
7954
|
try {
|
|
7955
|
+
this._activeLayerIndex = 0;
|
|
7945
7956
|
this.story.touchController.off(TouchControllerEvent.TouchEnd, this.handleTouchEnd);
|
|
7946
7957
|
await this.slideApi.slideStop(params);
|
|
7947
7958
|
}
|
|
@@ -7952,6 +7963,7 @@ let StorySlideViewModel = (() => {
|
|
|
7952
7963
|
showLayerByIndex(index) {
|
|
7953
7964
|
this.slideApi.showLayer(index);
|
|
7954
7965
|
this._cover = this.getCoverByLayer();
|
|
7966
|
+
this._activeLayerIndex = index;
|
|
7955
7967
|
}
|
|
7956
7968
|
canGoNext() {
|
|
7957
7969
|
const { canClickNext } = this.slideApi.slideClickHandler(null, "forward");
|
|
@@ -9765,10 +9777,6 @@ let StoryViewModel = (() => {
|
|
|
9765
9777
|
if (error)
|
|
9766
9778
|
this.handleStoryError(error);
|
|
9767
9779
|
}
|
|
9768
|
-
async reset() {
|
|
9769
|
-
this.textInput.close();
|
|
9770
|
-
await this.slideApiHandlers.resetStory();
|
|
9771
|
-
}
|
|
9772
9780
|
async recover() {
|
|
9773
9781
|
const storyError = Boolean(this.error);
|
|
9774
9782
|
this.hideErrorScreen();
|
|
@@ -9812,7 +9820,7 @@ let StoryViewModel = (() => {
|
|
|
9812
9820
|
this.storyReader.unmute();
|
|
9813
9821
|
this.activeSlide.unmute();
|
|
9814
9822
|
}
|
|
9815
|
-
showLayer(index) {
|
|
9823
|
+
async showLayer(index) {
|
|
9816
9824
|
var _b;
|
|
9817
9825
|
this.statisticV2Service.sendSlideLayout({
|
|
9818
9826
|
layoutIndex: index,
|
|
@@ -10356,7 +10364,7 @@ class GameClientConfig {
|
|
|
10356
10364
|
value: void 0
|
|
10357
10365
|
});
|
|
10358
10366
|
const storyManagerConfig = this.storyManager.config;
|
|
10359
|
-
const sdkVersion = "1.15.
|
|
10367
|
+
const sdkVersion = "1.15.5";
|
|
10360
10368
|
const placeholders = this.storyManager.rootStore.placeholderStore.placeholders;
|
|
10361
10369
|
const session = this.storyManager.rootStore.sessionStore.session;
|
|
10362
10370
|
this.sessionId = session.id;
|
|
@@ -11850,21 +11858,6 @@ class StorySlideApiHandlers {
|
|
|
11850
11858
|
feedSlug: (_b = this.story.feed) === null || _b === void 0 ? void 0 : _b.slug
|
|
11851
11859
|
}, forceEnableStatisticV2);
|
|
11852
11860
|
}
|
|
11853
|
-
async resetStory() {
|
|
11854
|
-
var _a;
|
|
11855
|
-
let savedData = {};
|
|
11856
|
-
let data = await this.getCardLocalData();
|
|
11857
|
-
data = Object.assign({}, (_a = this.getCardServerData()) !== null && _a !== void 0 ? _a : {}, data);
|
|
11858
|
-
for (let key in data) {
|
|
11859
|
-
if (data.hasOwnProperty(key) && /^_gm_[A-z0-9-_]+_attempts$/.test(key)) {
|
|
11860
|
-
savedData[key] = data[key];
|
|
11861
|
-
}
|
|
11862
|
-
}
|
|
11863
|
-
this.updateCardServerDataLocally(savedData);
|
|
11864
|
-
this.setCardLocalData(savedData, true);
|
|
11865
|
-
this.showCardSlide(0);
|
|
11866
|
-
this.showLayer(0);
|
|
11867
|
-
}
|
|
11868
11861
|
getCardFonts() {
|
|
11869
11862
|
var _a;
|
|
11870
11863
|
const session = this.storyManager.rootStore.sessionStore.session;
|
|
@@ -21933,7 +21926,7 @@ class UgcEditorStore {
|
|
|
21933
21926
|
const session = await this.storyManager.rootStore.sessionStore.open();
|
|
21934
21927
|
const ugcEditorConfigDto = await this.ugcEditorApi.fetchUgcEditorConfig();
|
|
21935
21928
|
const storyManagerConfig = this.storyManager.config;
|
|
21936
|
-
const sdkVersion = "1.15.
|
|
21929
|
+
const sdkVersion = "1.15.5";
|
|
21937
21930
|
this._config = {
|
|
21938
21931
|
sessionId: session.id,
|
|
21939
21932
|
apiKey: storyManagerConfig.apiKey,
|
|
@@ -22393,11 +22386,11 @@ class StoryManager extends TypedEventEmitter {
|
|
|
22393
22386
|
return deviceDescriptor.deviceId;
|
|
22394
22387
|
}
|
|
22395
22388
|
get sdkVersionName() {
|
|
22396
|
-
const sdkVersionName = "1.15.
|
|
22389
|
+
const sdkVersionName = "1.15.5";
|
|
22397
22390
|
return sdkVersionName || "0.0.0";
|
|
22398
22391
|
}
|
|
22399
22392
|
get sdkVersionCode() {
|
|
22400
|
-
const sdkVersionCode =
|
|
22393
|
+
const sdkVersionCode = 11505;
|
|
22401
22394
|
return sdkVersionCode ? parseInt(sdkVersionCode) : 0;
|
|
22402
22395
|
}
|
|
22403
22396
|
get lang() {
|
|
@@ -22461,7 +22454,7 @@ class StoryManager extends TypedEventEmitter {
|
|
|
22461
22454
|
this.rootStore.storyManagerConfigStore.setConfig(configDto);
|
|
22462
22455
|
}
|
|
22463
22456
|
setUserAgent(userAgent) {
|
|
22464
|
-
const sdkVersionCode =
|
|
22457
|
+
const sdkVersionCode = 11505;
|
|
22465
22458
|
const buildVersion = sdkVersionCode ? parseInt(sdkVersionCode) : 0;
|
|
22466
22459
|
// According to RFC5987, HTTP header values can legitimately be supplied using the ISO-8859-1 encoding.
|
|
22467
22460
|
this._userAgent = `${userAgent} ${convertStrToLatin1(navigator.userAgent)}`;
|