@inappstory/slide-api 0.1.7 → 0.1.8
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.cjs +20 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -926,6 +926,8 @@ interface SDKApi {
|
|
|
926
926
|
getCardFonts(): Array<FontDTO>;
|
|
927
927
|
disableVerticalSwipeGesture(): void;
|
|
928
928
|
enableVerticalSwipeGesture(): void;
|
|
929
|
+
disableHorizontalSwipeGesture(): void;
|
|
930
|
+
enableHorizontalSwipeGesture(): void;
|
|
929
931
|
disableBackpress(): void;
|
|
930
932
|
enableBackpress(): void;
|
|
931
933
|
closeCard(reason: string): void;
|
|
@@ -1181,13 +1183,21 @@ interface SDKInterface {
|
|
|
1181
1183
|
*/
|
|
1182
1184
|
showToast(text: string): void;
|
|
1183
1185
|
/**
|
|
1184
|
-
* Stop
|
|
1186
|
+
* Stop reacting on any detected vertical swipe gesture
|
|
1185
1187
|
*/
|
|
1186
1188
|
disableVerticalSwipeGesture(): void;
|
|
1187
1189
|
/**
|
|
1188
|
-
* Continue
|
|
1190
|
+
* Continue reacting on any vertical swipe gesture
|
|
1189
1191
|
*/
|
|
1190
1192
|
enableVerticalSwipeGesture(): void;
|
|
1193
|
+
/**
|
|
1194
|
+
* Stop reacting on any detected horizontal swipe gesture
|
|
1195
|
+
*/
|
|
1196
|
+
disableHorizontalSwipeGesture(): void;
|
|
1197
|
+
/**
|
|
1198
|
+
* Stop reacting on any detected vertical swipe gesture
|
|
1199
|
+
*/
|
|
1200
|
+
enableHorizontalSwipeGesture(): void;
|
|
1191
1201
|
/**
|
|
1192
1202
|
* Intent with action - close card (story | IAM)
|
|
1193
1203
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -926,6 +926,8 @@ interface SDKApi {
|
|
|
926
926
|
getCardFonts(): Array<FontDTO>;
|
|
927
927
|
disableVerticalSwipeGesture(): void;
|
|
928
928
|
enableVerticalSwipeGesture(): void;
|
|
929
|
+
disableHorizontalSwipeGesture(): void;
|
|
930
|
+
enableHorizontalSwipeGesture(): void;
|
|
929
931
|
disableBackpress(): void;
|
|
930
932
|
enableBackpress(): void;
|
|
931
933
|
closeCard(reason: string): void;
|
|
@@ -1181,13 +1183,21 @@ interface SDKInterface {
|
|
|
1181
1183
|
*/
|
|
1182
1184
|
showToast(text: string): void;
|
|
1183
1185
|
/**
|
|
1184
|
-
* Stop
|
|
1186
|
+
* Stop reacting on any detected vertical swipe gesture
|
|
1185
1187
|
*/
|
|
1186
1188
|
disableVerticalSwipeGesture(): void;
|
|
1187
1189
|
/**
|
|
1188
|
-
* Continue
|
|
1190
|
+
* Continue reacting on any vertical swipe gesture
|
|
1189
1191
|
*/
|
|
1190
1192
|
enableVerticalSwipeGesture(): void;
|
|
1193
|
+
/**
|
|
1194
|
+
* Stop reacting on any detected horizontal swipe gesture
|
|
1195
|
+
*/
|
|
1196
|
+
disableHorizontalSwipeGesture(): void;
|
|
1197
|
+
/**
|
|
1198
|
+
* Stop reacting on any detected vertical swipe gesture
|
|
1199
|
+
*/
|
|
1200
|
+
enableHorizontalSwipeGesture(): void;
|
|
1191
1201
|
/**
|
|
1192
1202
|
* Intent with action - close card (story | IAM)
|
|
1193
1203
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1149,6 +1149,12 @@ class EsModuleSdkApi {
|
|
|
1149
1149
|
enableVerticalSwipeGesture() {
|
|
1150
1150
|
this.sdkBinding.enableVerticalSwipeGesture();
|
|
1151
1151
|
}
|
|
1152
|
+
disableHorizontalSwipeGesture() {
|
|
1153
|
+
this.sdkBinding.disableHorizontalSwipeGesture();
|
|
1154
|
+
}
|
|
1155
|
+
enableHorizontalSwipeGesture() {
|
|
1156
|
+
this.sdkBinding.enableHorizontalSwipeGesture();
|
|
1157
|
+
}
|
|
1152
1158
|
disableBackpress() { }
|
|
1153
1159
|
enableBackpress() { }
|
|
1154
1160
|
closeCard(reason) {
|
|
@@ -2239,6 +2245,15 @@ class Video {
|
|
|
2239
2245
|
this._isVOD = Boolean(this._vodData != null && this._VideoPlayer != null);
|
|
2240
2246
|
if (this._isVOD) ;
|
|
2241
2247
|
else {
|
|
2248
|
+
if (this._vodData != null && Array.isArray(this._vodData.formats)) {
|
|
2249
|
+
this._vodData.formats.forEach(format => {
|
|
2250
|
+
const videoSource = window.document.createElement("source");
|
|
2251
|
+
videoSource.type = format.mimeType;
|
|
2252
|
+
videoSource.src = format.url;
|
|
2253
|
+
videoSource.dataset.remoteSrc = format.url;
|
|
2254
|
+
this._video.appendChild(videoSource);
|
|
2255
|
+
});
|
|
2256
|
+
}
|
|
2242
2257
|
this.mediaElementsLoadingPromises.push(waitForVideoHtmlElementLoad(this._video));
|
|
2243
2258
|
}
|
|
2244
2259
|
// console.log({mediaElementsLoadingPromises: this.mediaElementsLoadingPromises})
|
|
@@ -3858,7 +3873,7 @@ let SlideApi$1 = class SlideApi {
|
|
|
3858
3873
|
async _onAllMediaLoaded(slide) {
|
|
3859
3874
|
return new Promise((resolve, reject) => {
|
|
3860
3875
|
const promises = slide.layers.flatMap(layer => layer.elements.flatMap(element => element.mediaElementsLoadingPromises));
|
|
3861
|
-
console.log({ promises });
|
|
3876
|
+
// console.log({ promises });
|
|
3862
3877
|
let checkerTimerId = undefined;
|
|
3863
3878
|
let timeOutFired = false;
|
|
3864
3879
|
if (promises.length > 0) {
|
|
@@ -17097,6 +17112,7 @@ class WidgetProducts extends WidgetBase {
|
|
|
17097
17112
|
this.isOpen = true;
|
|
17098
17113
|
// prevent next slide navigation gesture
|
|
17099
17114
|
this.isClickCapturedByWidget = true;
|
|
17115
|
+
this.sdkApi.disableHorizontalSwipeGesture();
|
|
17100
17116
|
this.sdkApi.disableVerticalSwipeGesture();
|
|
17101
17117
|
this.sdkApi.disableBackpress();
|
|
17102
17118
|
this._statEventWidgetOpen(this.currentModels);
|
|
@@ -17116,6 +17132,7 @@ class WidgetProducts extends WidgetBase {
|
|
|
17116
17132
|
this.productsView?.classList.add("ias-products-container-view--hidden");
|
|
17117
17133
|
this.element.classList.remove("hidden");
|
|
17118
17134
|
this.isClickCapturedByWidget = false;
|
|
17135
|
+
this.sdkApi.enableHorizontalSwipeGesture();
|
|
17119
17136
|
if (this.swipeGestureDetector != null) {
|
|
17120
17137
|
this.swipeGestureDetector.destroy();
|
|
17121
17138
|
this.swipeGestureDetector = null;
|
|
@@ -18575,6 +18592,7 @@ class WidgetRangeSlider extends WidgetBase {
|
|
|
18575
18592
|
}
|
|
18576
18593
|
e.preventDefault();
|
|
18577
18594
|
this.isClickCapturedBySlider = true;
|
|
18595
|
+
this.sdkApi.disableHorizontalSwipeGesture();
|
|
18578
18596
|
if (!this.maxHandlePos) {
|
|
18579
18597
|
this.update(true, false);
|
|
18580
18598
|
}
|
|
@@ -18604,6 +18622,7 @@ class WidgetRangeSlider extends WidgetBase {
|
|
|
18604
18622
|
handleEnd(e) {
|
|
18605
18623
|
this.env.requestAnimationFrame(() => {
|
|
18606
18624
|
this.isClickCapturedBySlider = false;
|
|
18625
|
+
this.sdkApi.enableHorizontalSwipeGesture();
|
|
18607
18626
|
});
|
|
18608
18627
|
// e.preventDefault();
|
|
18609
18628
|
this.env.document.removeEventListener("touchmove", this.handleMove);
|