apxor-rtm-ui 0.4.1 → 0.5.0
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/apxor.rtm.js.bak +110 -65
- package/dist/apxor.rtm.min.js +2 -2
- package/package.json +1 -1
package/dist/apxor.rtm.js.bak
CHANGED
|
@@ -6679,7 +6679,7 @@
|
|
|
6679
6679
|
var isWalkthrough = arguments.length > 8 ? arguments[8] : undefined;
|
|
6680
6680
|
var uis = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : {};
|
|
6681
6681
|
var index = arguments.length > 10 ? arguments[10] : undefined;
|
|
6682
|
-
var fontMultiplier = arguments.length > 11 ? arguments[11] :
|
|
6682
|
+
var fontMultiplier = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : 1;
|
|
6683
6683
|
var buttons = document.createElement("div");
|
|
6684
6684
|
buttons.className = "".concat(position, "-buttons-container");
|
|
6685
6685
|
buttons.style.zIndex = 99999999;
|
|
@@ -6769,6 +6769,7 @@
|
|
|
6769
6769
|
numberedfont = (_numbered = numbered) === null || _numbered === void 0 ? void 0 : _numbered.font;
|
|
6770
6770
|
}
|
|
6771
6771
|
var justifyContent = "space-between";
|
|
6772
|
+
var fontMultiplier = buttons_css.fontMultiplier;
|
|
6772
6773
|
buttons_css.forEach(function (button_css, index) {
|
|
6773
6774
|
var _ref;
|
|
6774
6775
|
var slot = button_css.slot,
|
|
@@ -6812,8 +6813,7 @@
|
|
|
6812
6813
|
_button_css$gradient = button_css.gradient,
|
|
6813
6814
|
gradient = _button_css$gradient === void 0 ? {} : _button_css$gradient,
|
|
6814
6815
|
_button_css$custom_fo = button_css.custom_font,
|
|
6815
|
-
custom_font = _button_css$custom_fo === void 0 ? "" : _button_css$custom_fo
|
|
6816
|
-
fontMultiplier = button_css.fontMultiplier;
|
|
6816
|
+
custom_font = _button_css$custom_fo === void 0 ? "" : _button_css$custom_fo;
|
|
6817
6817
|
var gradient_direction, gradient_c1, gradient_c2;
|
|
6818
6818
|
if (enable_gradient) {
|
|
6819
6819
|
gradient_direction = gradient.direction || "to right";
|
|
@@ -6967,8 +6967,15 @@
|
|
|
6967
6967
|
break;
|
|
6968
6968
|
case "redirect":
|
|
6969
6969
|
action = function action() {
|
|
6970
|
-
|
|
6971
|
-
window.Apxor
|
|
6970
|
+
var _window$Apxor;
|
|
6971
|
+
if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
|
|
6972
|
+
window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
|
|
6973
|
+
ActionHandler.complete(false, "redirect");
|
|
6974
|
+
window.Apxor.redirectTo(JSON.stringify(action_config));
|
|
6975
|
+
} else {
|
|
6976
|
+
ActionHandler.complete(true, "redirect");
|
|
6977
|
+
window.Apxor.redirectTo("IN_APP", uuid, name, text, JSON.stringify(action_config));
|
|
6978
|
+
}
|
|
6972
6979
|
// if (redirectWithin || isExternal) {
|
|
6973
6980
|
// window.open(url, redirectWithin ? "_self" : "_blank");
|
|
6974
6981
|
// } else {
|
|
@@ -13176,7 +13183,7 @@
|
|
|
13176
13183
|
* @description Creates the styles for Marketing message.
|
|
13177
13184
|
* @returns {string} css styles
|
|
13178
13185
|
*/
|
|
13179
|
-
_defineProperty(this, "
|
|
13186
|
+
_defineProperty(this, "qPsc", function () {
|
|
13180
13187
|
if (!_this.enable_marketing) {
|
|
13181
13188
|
return "";
|
|
13182
13189
|
}
|
|
@@ -13195,7 +13202,7 @@
|
|
|
13195
13202
|
* @private
|
|
13196
13203
|
* @description Sets the marketing content at the end of the Inline
|
|
13197
13204
|
*/
|
|
13198
|
-
_defineProperty(this, "
|
|
13205
|
+
_defineProperty(this, "CjFL", function () {
|
|
13199
13206
|
if (_this.enable_marketing) {
|
|
13200
13207
|
var marketingContainer = document.createElement("div");
|
|
13201
13208
|
marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
|
|
@@ -13756,7 +13763,7 @@
|
|
|
13756
13763
|
if (apxor_tooltip_styles) {
|
|
13757
13764
|
return;
|
|
13758
13765
|
}
|
|
13759
|
-
var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInLineContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInLineMediaContainerStyles(), "\n ").concat(this._getInLineNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getInLineButtonContainerStyles(), " \n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.
|
|
13766
|
+
var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInLineContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInLineMediaContainerStyles(), "\n ").concat(this._getInLineNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getInLineButtonContainerStyles(), " \n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.qPsc(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
13760
13767
|
var styleNode = document.createElement("style");
|
|
13761
13768
|
styleNode.setAttribute("apx-tooltip-styles", "");
|
|
13762
13769
|
styleNode.innerHTML = styles;
|
|
@@ -14559,7 +14566,7 @@
|
|
|
14559
14566
|
this._setCloseButton();
|
|
14560
14567
|
|
|
14561
14568
|
//Set the Marketing content
|
|
14562
|
-
this.
|
|
14569
|
+
this.CjFL();
|
|
14563
14570
|
}
|
|
14564
14571
|
|
|
14565
14572
|
/**
|
|
@@ -14654,12 +14661,16 @@
|
|
|
14654
14661
|
videoDiv.innerHTML = "".concat(this.video.embed.html);
|
|
14655
14662
|
this.mediaContainer.appendChild(videoDiv);
|
|
14656
14663
|
} else {
|
|
14664
|
+
var _window$Apxor;
|
|
14657
14665
|
var videoElement = document.createElement("video");
|
|
14658
14666
|
videoElement.classList.add("apx-inline-video".concat(this.cssPostFix));
|
|
14659
|
-
videoElement.controlsList = "noplaybackrate nodownload";
|
|
14660
|
-
videoElement.disablePictureInPicture = true;
|
|
14667
|
+
videoElement.controlsList = "noplaybackrate nodownload nofullscreen";
|
|
14661
14668
|
videoElement.controls = true;
|
|
14669
|
+
videoElement.disablePictureInPicture = true;
|
|
14662
14670
|
videoElement.autoplay = true;
|
|
14671
|
+
if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
|
|
14672
|
+
videoElement.playsInline = true;
|
|
14673
|
+
}
|
|
14663
14674
|
videoElement.muted = !this.video.enable_audio;
|
|
14664
14675
|
var sourceElement = document.createElement("source");
|
|
14665
14676
|
//Set the video tag attributes
|
|
@@ -15522,7 +15533,7 @@
|
|
|
15522
15533
|
* @description Creates the styles for Marketing message.
|
|
15523
15534
|
* @returns {string} css styles
|
|
15524
15535
|
*/
|
|
15525
|
-
_defineProperty(this, "
|
|
15536
|
+
_defineProperty(this, "qPsc", function () {
|
|
15526
15537
|
if (!_this.enable_marketing) {
|
|
15527
15538
|
return "";
|
|
15528
15539
|
}
|
|
@@ -15568,7 +15579,7 @@
|
|
|
15568
15579
|
* @private
|
|
15569
15580
|
* @description Get the response for Form content in the InApp modal.
|
|
15570
15581
|
*/
|
|
15571
|
-
_defineProperty(this, "
|
|
15582
|
+
_defineProperty(this, "TiXf", function (form_elements) {
|
|
15572
15583
|
var obj = {};
|
|
15573
15584
|
var callback = "";
|
|
15574
15585
|
form_elements.forEach(function (element) {
|
|
@@ -15608,7 +15619,7 @@
|
|
|
15608
15619
|
* @private
|
|
15609
15620
|
* @description Sets the marketing content at the end of the InApp
|
|
15610
15621
|
*/
|
|
15611
|
-
_defineProperty(this, "
|
|
15622
|
+
_defineProperty(this, "CjFL", function () {
|
|
15612
15623
|
if (_this.enable_marketing) {
|
|
15613
15624
|
var marketingContainer = document.createElement("div");
|
|
15614
15625
|
marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
|
|
@@ -15861,7 +15872,7 @@
|
|
|
15861
15872
|
}, {
|
|
15862
15873
|
key: "_setStyles",
|
|
15863
15874
|
value: function _setStyles() {
|
|
15864
|
-
var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInAppContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInAppMediaContainerStyles(), "\n ").concat(this._getInAppNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getFormStyles(), "\n ").concat(this._getInAppButtonContainerStyles(), "\n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.
|
|
15875
|
+
var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInAppContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInAppMediaContainerStyles(), "\n ").concat(this._getInAppNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getFormStyles(), "\n ").concat(this._getInAppButtonContainerStyles(), "\n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.qPsc(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
15865
15876
|
var styleNode = document.createElement("style");
|
|
15866
15877
|
styleNode.setAttribute("id", "apxor-style-" + this.configId);
|
|
15867
15878
|
styleNode.innerHTML = styles;
|
|
@@ -16338,7 +16349,7 @@
|
|
|
16338
16349
|
this._setCloseButton();
|
|
16339
16350
|
|
|
16340
16351
|
//Set the Marketing content
|
|
16341
|
-
this.
|
|
16352
|
+
this.CjFL();
|
|
16342
16353
|
}
|
|
16343
16354
|
|
|
16344
16355
|
/**
|
|
@@ -16410,12 +16421,16 @@
|
|
|
16410
16421
|
videoDiv.innerHTML = "".concat(this.video.embed.html);
|
|
16411
16422
|
this.mediaContainer.appendChild(videoDiv);
|
|
16412
16423
|
} else {
|
|
16424
|
+
var _window$Apxor;
|
|
16413
16425
|
var videoElement = document.createElement("video");
|
|
16414
16426
|
videoElement.classList.add("apx-inapp-video".concat(this.cssPostFix));
|
|
16415
|
-
videoElement.controlsList = "noplaybackrate nodownload";
|
|
16416
|
-
videoElement.disablePictureInPicture = true;
|
|
16427
|
+
videoElement.controlsList = "noplaybackrate nodownload nofullscreen";
|
|
16417
16428
|
videoElement.controls = true;
|
|
16429
|
+
videoElement.disablePictureInPicture = true;
|
|
16418
16430
|
videoElement.autoplay = true;
|
|
16431
|
+
if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
|
|
16432
|
+
videoElement.playsInline = true;
|
|
16433
|
+
}
|
|
16419
16434
|
videoElement.muted = !this.video.enable_audio;
|
|
16420
16435
|
var sourceElement = document.createElement("source");
|
|
16421
16436
|
//Set the video tag attributes
|
|
@@ -16539,7 +16554,7 @@
|
|
|
16539
16554
|
var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
|
|
16540
16555
|
form.addEventListener("submit", function (e) {
|
|
16541
16556
|
e.preventDefault();
|
|
16542
|
-
var _this4$generateRespon = _this4.
|
|
16557
|
+
var _this4$generateRespon = _this4.TiXf(_this4.form.elements),
|
|
16543
16558
|
obj = _this4$generateRespon.obj,
|
|
16544
16559
|
callback = _this4$generateRespon.callback;
|
|
16545
16560
|
var evalString = "(obj)=>" + callback + "(obj)";
|
|
@@ -16852,7 +16867,7 @@
|
|
|
16852
16867
|
* @function showVideoInApp
|
|
16853
16868
|
* @description Shows the video InApp with the configured mode.
|
|
16854
16869
|
*/
|
|
16855
|
-
_defineProperty(this, "
|
|
16870
|
+
_defineProperty(this, "vYvZ", function () {
|
|
16856
16871
|
_this.createPlayer();
|
|
16857
16872
|
try {
|
|
16858
16873
|
// In PIP mode, only after the video metadata is loaded, show the PIP.
|
|
@@ -16894,7 +16909,7 @@
|
|
|
16894
16909
|
};
|
|
16895
16910
|
} else {
|
|
16896
16911
|
// As the video player is hidden by default, unhide if the mode is not PIP.
|
|
16897
|
-
_this.
|
|
16912
|
+
_this.BXgz();
|
|
16898
16913
|
}
|
|
16899
16914
|
_this.showCallback();
|
|
16900
16915
|
} catch (e) {
|
|
@@ -16914,7 +16929,7 @@
|
|
|
16914
16929
|
* For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
|
|
16915
16930
|
* For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
|
|
16916
16931
|
*/
|
|
16917
|
-
_defineProperty(this, "
|
|
16932
|
+
_defineProperty(this, "SxBJ", function () {
|
|
16918
16933
|
var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
|
|
16919
16934
|
width = _getHeightWidthFromRe.width,
|
|
16920
16935
|
height = _getHeightWidthFromRe.height;
|
|
@@ -16926,7 +16941,7 @@
|
|
|
16926
16941
|
* @private
|
|
16927
16942
|
* @description Removes the video player style element.
|
|
16928
16943
|
*/
|
|
16929
|
-
_defineProperty(this, "
|
|
16944
|
+
_defineProperty(this, "GTjT", function () {
|
|
16930
16945
|
var playerStyles = document.getElementById("apx-mpl-styles");
|
|
16931
16946
|
if (playerStyles) {
|
|
16932
16947
|
playerStyles.remove();
|
|
@@ -16937,7 +16952,7 @@
|
|
|
16937
16952
|
* @private
|
|
16938
16953
|
* @description Attach listeners on the video controls
|
|
16939
16954
|
*/
|
|
16940
|
-
_defineProperty(this, "
|
|
16955
|
+
_defineProperty(this, "MQMm", function () {
|
|
16941
16956
|
// Listener for the video end. Display the CTA's when the video ends.
|
|
16942
16957
|
_this.videoElement.addEventListener("ended", function () {
|
|
16943
16958
|
var ctaButtons = document.getElementById("apx-cta-btn");
|
|
@@ -17048,7 +17063,7 @@
|
|
|
17048
17063
|
* @private
|
|
17049
17064
|
* @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
17050
17065
|
*/
|
|
17051
|
-
_defineProperty(this, "
|
|
17066
|
+
_defineProperty(this, "SGcf", function () {
|
|
17052
17067
|
var _this$terminationConf;
|
|
17053
17068
|
if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
|
|
17054
17069
|
// On Exit of the PIP,
|
|
@@ -17088,7 +17103,7 @@
|
|
|
17088
17103
|
* @private Sets the custom controls on the video player.
|
|
17089
17104
|
* PIP and close are the custom controls that are created and positions on the video.
|
|
17090
17105
|
*/
|
|
17091
|
-
_defineProperty(this, "
|
|
17106
|
+
_defineProperty(this, "ASua", function () {
|
|
17092
17107
|
_this.enable_close_button;
|
|
17093
17108
|
if (_this.enable_close_button) {
|
|
17094
17109
|
var closeButton = document.createElement("span");
|
|
@@ -17135,21 +17150,21 @@
|
|
|
17135
17150
|
* @function hideVideoPlayer
|
|
17136
17151
|
* @description Sets the visibility of the video player to hidden.
|
|
17137
17152
|
*/
|
|
17138
|
-
_defineProperty(this, "
|
|
17153
|
+
_defineProperty(this, "Whkk", function () {
|
|
17139
17154
|
_this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
17140
17155
|
});
|
|
17141
17156
|
/**
|
|
17142
17157
|
* @function unhideVideoPlayer
|
|
17143
17158
|
* @description Unhides video player.
|
|
17144
17159
|
*/
|
|
17145
|
-
_defineProperty(this, "
|
|
17160
|
+
_defineProperty(this, "BXgz", function () {
|
|
17146
17161
|
_this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
17147
17162
|
});
|
|
17148
17163
|
/**
|
|
17149
17164
|
* @function getVideoElement
|
|
17150
17165
|
* @returns {HTMLElement} Video ekement
|
|
17151
17166
|
*/
|
|
17152
|
-
_defineProperty(this, "
|
|
17167
|
+
_defineProperty(this, "pdnj", function () {
|
|
17153
17168
|
return _this.videoElement;
|
|
17154
17169
|
});
|
|
17155
17170
|
this.videoPlayer = null;
|
|
@@ -17201,7 +17216,7 @@
|
|
|
17201
17216
|
this.videoPlayer.style.backgroundColor = this.bg_color;
|
|
17202
17217
|
|
|
17203
17218
|
// Video has a resolution, not deviating from the resolution set the height and width.
|
|
17204
|
-
this.
|
|
17219
|
+
this.SxBJ();
|
|
17205
17220
|
//Generate the styles and add them to the document head.
|
|
17206
17221
|
this._setVideoPlayerStyles();
|
|
17207
17222
|
//Set the position of the video player with in the 5 possible positions.
|
|
@@ -17209,16 +17224,16 @@
|
|
|
17209
17224
|
//Create a video element,set the source and add to the container.
|
|
17210
17225
|
this._setPlayerContent();
|
|
17211
17226
|
//Set the listeners on the video control buttons.
|
|
17212
|
-
this.
|
|
17227
|
+
this.MQMm();
|
|
17213
17228
|
//Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
17214
|
-
this.
|
|
17229
|
+
this.SGcf();
|
|
17215
17230
|
//Set the custom close and PIP controls. Not using the defaults from the html video element.
|
|
17216
17231
|
//Reason - We want to position them at the top right and left positions.
|
|
17217
|
-
this.
|
|
17232
|
+
this.ASua();
|
|
17218
17233
|
//Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
|
|
17219
17234
|
this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
|
|
17220
17235
|
//Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
|
|
17221
|
-
this.
|
|
17236
|
+
this.Whkk();
|
|
17222
17237
|
//If the auto dismiss is enabled, sets the timeout to call the InApp close.
|
|
17223
17238
|
this._setAutoTerminate();
|
|
17224
17239
|
document.body.appendChild(this.videoPlayer);
|
|
@@ -17284,6 +17299,7 @@
|
|
|
17284
17299
|
}, {
|
|
17285
17300
|
key: "_setPlayerContent",
|
|
17286
17301
|
value: function _setPlayerContent() {
|
|
17302
|
+
var _window$Apxor;
|
|
17287
17303
|
// Create video element
|
|
17288
17304
|
this.videoElement = document.createElement("video");
|
|
17289
17305
|
this.videoElement.width = this.width;
|
|
@@ -17291,6 +17307,9 @@
|
|
|
17291
17307
|
this.videoElement.style.objectFit = "fill";
|
|
17292
17308
|
this.videoElement.controlsList = "nodownload";
|
|
17293
17309
|
this.videoElement.controls = true;
|
|
17310
|
+
if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
|
|
17311
|
+
this.videoElement.playsInline = true;
|
|
17312
|
+
}
|
|
17294
17313
|
// By default disable the PIP. This is a hack to remove the default PIP option.
|
|
17295
17314
|
// We want to have our own PIP button. On click of that button PIP will be enabled.
|
|
17296
17315
|
this.videoElement.disablePictureInPicture = true;
|
|
@@ -17328,7 +17347,7 @@
|
|
|
17328
17347
|
}
|
|
17329
17348
|
}
|
|
17330
17349
|
this.videoPlayer.remove();
|
|
17331
|
-
this.
|
|
17350
|
+
this.GTjT();
|
|
17332
17351
|
if (closeButtonName !== "auto_dismiss") {
|
|
17333
17352
|
window.Apxor.logAppEvent("apx_video_inapp_close_button_clicked", {
|
|
17334
17353
|
message_name: this.name,
|
|
@@ -17396,7 +17415,7 @@
|
|
|
17396
17415
|
replayCount: _this3.replayCount
|
|
17397
17416
|
});
|
|
17398
17417
|
_this3.videoPlayer.remove();
|
|
17399
|
-
_this3.
|
|
17418
|
+
_this3.GTjT();
|
|
17400
17419
|
_this3.hideCallback();
|
|
17401
17420
|
} catch (e) {
|
|
17402
17421
|
console.log("Can't close the video player\n".concat(e));
|
|
@@ -17484,14 +17503,14 @@
|
|
|
17484
17503
|
var RTM = /*#__PURE__*/_createClass(function RTM() {
|
|
17485
17504
|
var _this = this;
|
|
17486
17505
|
_classCallCheck(this, RTM);
|
|
17487
|
-
_defineProperty(this, "
|
|
17506
|
+
_defineProperty(this, "tPHq", {});
|
|
17488
17507
|
_defineProperty(this, "isShowingAction", false);
|
|
17489
17508
|
_defineProperty(this, "currentAction", null);
|
|
17490
|
-
_defineProperty(this, "
|
|
17491
|
-
_defineProperty(this, "version",
|
|
17509
|
+
_defineProperty(this, "Jvri", null);
|
|
17510
|
+
_defineProperty(this, "version", 50);
|
|
17492
17511
|
_defineProperty(this, "isInitialised", false);
|
|
17493
17512
|
_defineProperty(this, "_eventsInDynamicText", {});
|
|
17494
|
-
_defineProperty(this, "
|
|
17513
|
+
_defineProperty(this, "qOSx", function () {
|
|
17495
17514
|
_this.isInitialised = true;
|
|
17496
17515
|
var oldPushState = history.pushState;
|
|
17497
17516
|
history.pushState = function pushState() {
|
|
@@ -17516,7 +17535,7 @@
|
|
|
17516
17535
|
});
|
|
17517
17536
|
_defineProperty(this, "show", function (uiJson, duration, uuid, name) {
|
|
17518
17537
|
if (!_this.isInitialised) {
|
|
17519
|
-
_this.
|
|
17538
|
+
_this.qOSx();
|
|
17520
17539
|
}
|
|
17521
17540
|
window.addEventListener("pagehide", function () {
|
|
17522
17541
|
var _window$Apxor, _window$Apxor$pageUnl;
|
|
@@ -17528,6 +17547,7 @@
|
|
|
17528
17547
|
console.error("An action already being shown");
|
|
17529
17548
|
return;
|
|
17530
17549
|
}
|
|
17550
|
+
uiJson = uiJson.split("\n").join("\\n");
|
|
17531
17551
|
var ui_config = JSON.parse(uiJson);
|
|
17532
17552
|
var terminationConfig = {};
|
|
17533
17553
|
terminationConfig["auto_dismiss"] = duration > 0;
|
|
@@ -17576,15 +17596,28 @@
|
|
|
17576
17596
|
}
|
|
17577
17597
|
});
|
|
17578
17598
|
_defineProperty(this, "showInApp", function (config, duration, configId, name) {
|
|
17579
|
-
|
|
17580
|
-
|
|
17581
|
-
|
|
17582
|
-
|
|
17599
|
+
try {
|
|
17600
|
+
config = config.split("\n").join("\\n");
|
|
17601
|
+
if (JSON.parse(config).layout_type === "videos") {
|
|
17602
|
+
_this.createInAppVideo(config, duration, configId, name);
|
|
17603
|
+
} else if (JSON.parse(config).layout_type === "modal") {
|
|
17604
|
+
_this.createInAppModal(config, duration, configId, name);
|
|
17605
|
+
}
|
|
17606
|
+
} catch (e) {
|
|
17607
|
+
var _window$Apxor2;
|
|
17608
|
+
if (((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios") {
|
|
17609
|
+
var _window5, _window5$updateFlag;
|
|
17610
|
+
(_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || (_window5$updateFlag = _window5.updateFlag) === null || _window5$updateFlag === void 0 || _window5$updateFlag.call(_window5, false, "IN_APP");
|
|
17611
|
+
} else {
|
|
17612
|
+
var _window6, _window6$updateFlag;
|
|
17613
|
+
(_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.Apxor) === null || _window6 === void 0 || (_window6$updateFlag = _window6.updateFlag) === null || _window6$updateFlag === void 0 || _window6$updateFlag.call(_window6, "IN_APP", false);
|
|
17614
|
+
}
|
|
17615
|
+
console.error(e);
|
|
17583
17616
|
}
|
|
17584
17617
|
});
|
|
17585
17618
|
_defineProperty(this, "removeAll", function () {
|
|
17586
|
-
var
|
|
17587
|
-
(
|
|
17619
|
+
var _window7, _window7$updateFlag;
|
|
17620
|
+
(_window7 = window) === null || _window7 === void 0 || (_window7 = _window7.Apxor) === null || _window7 === void 0 || (_window7$updateFlag = _window7.updateFlag) === null || _window7$updateFlag === void 0 || _window7$updateFlag.call(_window7, false);
|
|
17588
17621
|
if (_this.currentAction !== null && _this.currentAction !== undefined) {
|
|
17589
17622
|
_this.isShowingAction = false;
|
|
17590
17623
|
try {
|
|
@@ -17598,34 +17631,34 @@
|
|
|
17598
17631
|
var terminationConfig = {};
|
|
17599
17632
|
terminationConfig["auto_dismiss"] = duration > 0;
|
|
17600
17633
|
terminationConfig["duration"] = duration;
|
|
17601
|
-
_this.
|
|
17634
|
+
_this.Jvri = new InLineTooltip(ui_config, [], [], terminationConfig, {
|
|
17602
17635
|
configId: uuid,
|
|
17603
17636
|
configName: name
|
|
17604
17637
|
}, _this, function () {
|
|
17605
17638
|
_this.isShowingAction = true;
|
|
17606
17639
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
17607
|
-
var
|
|
17608
|
-
(
|
|
17640
|
+
var _window8, _window8$updateFlag;
|
|
17641
|
+
(_window8 = window) === null || _window8 === void 0 || (_window8 = _window8.Apxor) === null || _window8 === void 0 || (_window8$updateFlag = _window8.updateFlag) === null || _window8$updateFlag === void 0 || _window8$updateFlag.call(_window8, true);
|
|
17609
17642
|
window.Apxor.logActionEvent("inline_shown", uuid, name);
|
|
17610
17643
|
if (ui_config !== null && ui_config !== void 0 && ui_config.is_preview) {
|
|
17611
17644
|
setTimeout(function () {
|
|
17612
|
-
var
|
|
17613
|
-
(
|
|
17645
|
+
var _window9, _window9$logInternalE;
|
|
17646
|
+
(_window9 = window) === null || _window9 === void 0 || (_window9 = _window9.Apxor) === null || _window9 === void 0 || (_window9$logInternalE = _window9.logInternalEvent) === null || _window9$logInternalE === void 0 || _window9$logInternalE.call(_window9, "capt");
|
|
17614
17647
|
}, 500);
|
|
17615
17648
|
}
|
|
17616
17649
|
}
|
|
17617
17650
|
}, function (isCancelled) {
|
|
17618
|
-
var
|
|
17651
|
+
var _window10, _window10$updateFlag;
|
|
17619
17652
|
_this.isShowingAction = false;
|
|
17620
17653
|
_this.currentAction = null;
|
|
17621
|
-
_this.
|
|
17622
|
-
(
|
|
17654
|
+
_this.Jvri = null;
|
|
17655
|
+
(_window10 = window) === null || _window10 === void 0 || (_window10 = _window10.Apxor) === null || _window10 === void 0 || (_window10$updateFlag = _window10.updateFlag) === null || _window10$updateFlag === void 0 || _window10$updateFlag.call(_window10, false);
|
|
17623
17656
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
17624
17657
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
17625
17658
|
}
|
|
17626
17659
|
}, function () {}, false, 0);
|
|
17627
17660
|
setTimeout(function () {
|
|
17628
|
-
_this.
|
|
17661
|
+
_this.Jvri.createNewTooltip();
|
|
17629
17662
|
}, ui_config.delay);
|
|
17630
17663
|
});
|
|
17631
17664
|
_defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
|
|
@@ -17642,20 +17675,20 @@
|
|
|
17642
17675
|
var VideoInAppInstance = new VideoInApp(videoConfig, terminationConfig, configId, name, function () {
|
|
17643
17676
|
_this.isShowingAction = true;
|
|
17644
17677
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
17645
|
-
var
|
|
17646
|
-
(
|
|
17678
|
+
var _window11, _window11$updateFlag;
|
|
17679
|
+
(_window11 = window) === null || _window11 === void 0 || (_window11 = _window11.Apxor) === null || _window11 === void 0 || (_window11$updateFlag = _window11.updateFlag) === null || _window11$updateFlag === void 0 || _window11$updateFlag.call(_window11, true);
|
|
17647
17680
|
window.Apxor.logActionEvent("inapp_shown", configId, name);
|
|
17648
17681
|
}
|
|
17649
17682
|
}, function () {
|
|
17650
|
-
var
|
|
17683
|
+
var _window12, _window12$updateFlag;
|
|
17651
17684
|
_this.isShowingAction = false;
|
|
17652
17685
|
_this.currentAction = null;
|
|
17653
|
-
(
|
|
17686
|
+
(_window12 = window) === null || _window12 === void 0 || (_window12 = _window12.Apxor) === null || _window12 === void 0 || (_window12$updateFlag = _window12.updateFlag) === null || _window12$updateFlag === void 0 || _window12$updateFlag.call(_window12, false);
|
|
17654
17687
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
17655
17688
|
window.Apxor.logActionEvent("inapp_dismissed", configId, name);
|
|
17656
17689
|
}
|
|
17657
17690
|
});
|
|
17658
|
-
VideoInAppInstance.
|
|
17691
|
+
VideoInAppInstance.vYvZ();
|
|
17659
17692
|
});
|
|
17660
17693
|
/**
|
|
17661
17694
|
* Creates a modal for the given config and displays it.
|
|
@@ -17674,12 +17707,18 @@
|
|
|
17674
17707
|
var inappModal = new ModalInApp(config, terminationConfig, configId, name, function () {
|
|
17675
17708
|
_this.isShowingAction = true;
|
|
17676
17709
|
if (window.Apxor && window.Apxor.logActionEvent) {
|
|
17677
|
-
var
|
|
17678
|
-
(
|
|
17710
|
+
var _window$Apxor3;
|
|
17711
|
+
if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
|
|
17712
|
+
var _window13, _window13$updateFlag;
|
|
17713
|
+
(_window13 = window) === null || _window13 === void 0 || (_window13 = _window13.Apxor) === null || _window13 === void 0 || (_window13$updateFlag = _window13.updateFlag) === null || _window13$updateFlag === void 0 || _window13$updateFlag.call(_window13, true, "IN_APP");
|
|
17714
|
+
} else {
|
|
17715
|
+
var _window14, _window14$updateFlag;
|
|
17716
|
+
(_window14 = window) === null || _window14 === void 0 || (_window14 = _window14.Apxor) === null || _window14 === void 0 || (_window14$updateFlag = _window14.updateFlag) === null || _window14$updateFlag === void 0 || _window14$updateFlag.call(_window14, "IN_APP", true);
|
|
17717
|
+
}
|
|
17679
17718
|
window.Apxor.logActionEvent("inapp_shown", configId, name);
|
|
17680
17719
|
}
|
|
17681
17720
|
}, function (backgroundDiv, action) {
|
|
17682
|
-
var _dialogContent$classL,
|
|
17721
|
+
var _dialogContent$classL, _window$Apxor4;
|
|
17683
17722
|
var cssClass = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ".apx-dlg-c";
|
|
17684
17723
|
var closeListener = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
17685
17724
|
var redirectionListener = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
@@ -17690,7 +17729,13 @@
|
|
|
17690
17729
|
// setTimeout(() => {
|
|
17691
17730
|
backgroundDiv.remove();
|
|
17692
17731
|
_this.isShowingAction = false;
|
|
17693
|
-
(
|
|
17732
|
+
if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
|
|
17733
|
+
var _window15, _window15$updateFlag;
|
|
17734
|
+
(_window15 = window) === null || _window15 === void 0 || (_window15 = _window15.Apxor) === null || _window15 === void 0 || (_window15$updateFlag = _window15.updateFlag) === null || _window15$updateFlag === void 0 || _window15$updateFlag.call(_window15, false, "IN_APP");
|
|
17735
|
+
} else {
|
|
17736
|
+
var _window16, _window16$updateFlag;
|
|
17737
|
+
(_window16 = window) === null || _window16 === void 0 || (_window16 = _window16.Apxor) === null || _window16 === void 0 || (_window16$updateFlag = _window16.updateFlag) === null || _window16$updateFlag === void 0 || _window16$updateFlag.call(_window16, "IN_APP", false);
|
|
17738
|
+
}
|
|
17694
17739
|
_this.currentAction = null;
|
|
17695
17740
|
if (window.Apxor && window.Apxor.logActionEvent && !(action == "cancel" || action == "redirect")) {
|
|
17696
17741
|
window.Apxor.logActionEvent("inapp_dismissed", configId, name);
|