apxor-rtm-ui 0.1.0-qa.0 → 0.1.0-qa.1
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 +27 -27
- package/dist/apxor.rtm.min.js +1 -1
- package/package.json +1 -1
package/dist/apxor.rtm.js.bak
CHANGED
|
@@ -9504,7 +9504,7 @@
|
|
|
9504
9504
|
* @description Creates the styles for Marketing message.
|
|
9505
9505
|
* @returns {string} css styles
|
|
9506
9506
|
*/
|
|
9507
|
-
_defineProperty(this, "
|
|
9507
|
+
_defineProperty(this, "Hvlt", function () {
|
|
9508
9508
|
if (!_this.enable_marketing) {
|
|
9509
9509
|
return "";
|
|
9510
9510
|
}
|
|
@@ -9523,7 +9523,7 @@
|
|
|
9523
9523
|
* @private
|
|
9524
9524
|
* @description Get the response for Form content in the InApp modal.
|
|
9525
9525
|
*/
|
|
9526
|
-
_defineProperty(this, "
|
|
9526
|
+
_defineProperty(this, "fKwP", function (form_elements) {
|
|
9527
9527
|
var obj = {};
|
|
9528
9528
|
var callback = "";
|
|
9529
9529
|
form_elements.forEach(function (element) {
|
|
@@ -9565,7 +9565,7 @@
|
|
|
9565
9565
|
* @private
|
|
9566
9566
|
* @description Sets the marketing content at the end of the InApp
|
|
9567
9567
|
*/
|
|
9568
|
-
_defineProperty(this, "
|
|
9568
|
+
_defineProperty(this, "sYVJ", function () {
|
|
9569
9569
|
if (_this.enable_marketing) {
|
|
9570
9570
|
var marketingContainer = document.createElement("div");
|
|
9571
9571
|
marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
|
|
@@ -9783,7 +9783,7 @@
|
|
|
9783
9783
|
}, {
|
|
9784
9784
|
key: "_setStyles",
|
|
9785
9785
|
value: function _setStyles() {
|
|
9786
|
-
var styles = " \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.
|
|
9786
|
+
var styles = " \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.Hvlt(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
9787
9787
|
var styleNode = document.createElement("style");
|
|
9788
9788
|
styleNode.innerHTML = styles;
|
|
9789
9789
|
this.overlayElement.appendChild(styleNode);
|
|
@@ -10225,7 +10225,7 @@
|
|
|
10225
10225
|
this._setCloseButton();
|
|
10226
10226
|
|
|
10227
10227
|
//Set the Marketing content
|
|
10228
|
-
this.
|
|
10228
|
+
this.sYVJ();
|
|
10229
10229
|
}
|
|
10230
10230
|
|
|
10231
10231
|
/**
|
|
@@ -10418,7 +10418,7 @@
|
|
|
10418
10418
|
var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
|
|
10419
10419
|
form.addEventListener("submit", function (e) {
|
|
10420
10420
|
e.preventDefault();
|
|
10421
|
-
var _this3$generateRespon = _this3.
|
|
10421
|
+
var _this3$generateRespon = _this3.fKwP(_this3.form.elements),
|
|
10422
10422
|
obj = _this3$generateRespon.obj,
|
|
10423
10423
|
callback = _this3$generateRespon.callback;
|
|
10424
10424
|
var evalString = "(obj)=>" + callback + "(obj)";
|
|
@@ -10720,7 +10720,7 @@
|
|
|
10720
10720
|
* @function showVideoInApp
|
|
10721
10721
|
* @description Shows the video InApp with the configured mode.
|
|
10722
10722
|
*/
|
|
10723
|
-
_defineProperty(this, "
|
|
10723
|
+
_defineProperty(this, "YZTN", function () {
|
|
10724
10724
|
_this.createPlayer();
|
|
10725
10725
|
try {
|
|
10726
10726
|
// In PIP mode, only after the video metadata is loaded, show the PIP.
|
|
@@ -10736,7 +10736,7 @@
|
|
|
10736
10736
|
};
|
|
10737
10737
|
} else {
|
|
10738
10738
|
// As the video player is hidden by default, unhide if the mode is not PIP.
|
|
10739
|
-
_this.
|
|
10739
|
+
_this.subX();
|
|
10740
10740
|
}
|
|
10741
10741
|
_this.showCallback();
|
|
10742
10742
|
} catch (e) {
|
|
@@ -10751,7 +10751,7 @@
|
|
|
10751
10751
|
* For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
|
|
10752
10752
|
* For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
|
|
10753
10753
|
*/
|
|
10754
|
-
_defineProperty(this, "
|
|
10754
|
+
_defineProperty(this, "yNbM", function () {
|
|
10755
10755
|
var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video),
|
|
10756
10756
|
width = _getHeightWidthFromRe.width,
|
|
10757
10757
|
height = _getHeightWidthFromRe.height;
|
|
@@ -10763,7 +10763,7 @@
|
|
|
10763
10763
|
* @private
|
|
10764
10764
|
* @description Removes the video player style element.
|
|
10765
10765
|
*/
|
|
10766
|
-
_defineProperty(this, "
|
|
10766
|
+
_defineProperty(this, "erWH", function () {
|
|
10767
10767
|
var playerStyles = document.getElementById("apx-mpl-styles");
|
|
10768
10768
|
if (playerStyles) {
|
|
10769
10769
|
playerStyles.remove();
|
|
@@ -10774,7 +10774,7 @@
|
|
|
10774
10774
|
* @private
|
|
10775
10775
|
* @description Attach listeners on the video controls
|
|
10776
10776
|
*/
|
|
10777
|
-
_defineProperty(this, "
|
|
10777
|
+
_defineProperty(this, "Xrri", function () {
|
|
10778
10778
|
// Listener for the video end. Display the CTA's when the video ends.
|
|
10779
10779
|
_this.videoElement.addEventListener("ended", function () {
|
|
10780
10780
|
var ctaButtons = document.getElementById("apx-cta-btn");
|
|
@@ -10797,7 +10797,7 @@
|
|
|
10797
10797
|
* @private
|
|
10798
10798
|
* @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
10799
10799
|
*/
|
|
10800
|
-
_defineProperty(this, "
|
|
10800
|
+
_defineProperty(this, "ShAr", function () {
|
|
10801
10801
|
// Enable the PIP toggle listeners only if the config says so.
|
|
10802
10802
|
if (_this.enable_pip_button && _this.pip.enable_toggles) {
|
|
10803
10803
|
// On Exit of the PIP,
|
|
@@ -10827,7 +10827,7 @@
|
|
|
10827
10827
|
* @private Sets the custom controls on the video player.
|
|
10828
10828
|
* PIP and close are the custom controls that are created and positions on the video.
|
|
10829
10829
|
*/
|
|
10830
|
-
_defineProperty(this, "
|
|
10830
|
+
_defineProperty(this, "QkKD", function () {
|
|
10831
10831
|
_this.enable_close_button;
|
|
10832
10832
|
if (_this.enable_close_button) {
|
|
10833
10833
|
var closeButton = document.createElement("span");
|
|
@@ -10848,7 +10848,7 @@
|
|
|
10848
10848
|
try {
|
|
10849
10849
|
_this.videoPlayer.remove();
|
|
10850
10850
|
_this.hideCallback("cancel");
|
|
10851
|
-
_this.
|
|
10851
|
+
_this.erWH();
|
|
10852
10852
|
} catch (e) {
|
|
10853
10853
|
console.log("Error \n ".concat(e, " \n occured while closing the video"));
|
|
10854
10854
|
}
|
|
@@ -10877,21 +10877,21 @@
|
|
|
10877
10877
|
* @function hideVideoPlayer
|
|
10878
10878
|
* @description Sets the visibility of the video player to hidden.
|
|
10879
10879
|
*/
|
|
10880
|
-
_defineProperty(this, "
|
|
10880
|
+
_defineProperty(this, "vgYS", function () {
|
|
10881
10881
|
_this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
10882
10882
|
});
|
|
10883
10883
|
/**
|
|
10884
10884
|
* @function unhideVideoPlayer
|
|
10885
10885
|
* @description Unhides video player.
|
|
10886
10886
|
*/
|
|
10887
|
-
_defineProperty(this, "
|
|
10887
|
+
_defineProperty(this, "subX", function () {
|
|
10888
10888
|
_this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
10889
10889
|
});
|
|
10890
10890
|
/**
|
|
10891
10891
|
* @function getVideoElement
|
|
10892
10892
|
* @returns {HTMLElement} Video ekement
|
|
10893
10893
|
*/
|
|
10894
|
-
_defineProperty(this, "
|
|
10894
|
+
_defineProperty(this, "oPBv", function () {
|
|
10895
10895
|
return _this.videoElement;
|
|
10896
10896
|
});
|
|
10897
10897
|
this.videoPlayer = null;
|
|
@@ -10940,7 +10940,7 @@
|
|
|
10940
10940
|
this.videoPlayer.style = "background-color:".concat(this.bg_color, ";");
|
|
10941
10941
|
|
|
10942
10942
|
// Video has a resolution, not deviating from the resolution set the height and width.
|
|
10943
|
-
this.
|
|
10943
|
+
this.yNbM();
|
|
10944
10944
|
//Generate the styles and add them to the document head.
|
|
10945
10945
|
this._setVideoPlayerStyles();
|
|
10946
10946
|
//Set the position of the video player with in the 5 possible positions.
|
|
@@ -10948,16 +10948,16 @@
|
|
|
10948
10948
|
//Create a video element,set the source and add to the container.
|
|
10949
10949
|
this._setPlayerContent();
|
|
10950
10950
|
//Set the listeners on the video control buttons.
|
|
10951
|
-
this.
|
|
10951
|
+
this.Xrri();
|
|
10952
10952
|
//Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
10953
|
-
this.
|
|
10953
|
+
this.ShAr();
|
|
10954
10954
|
//Set the custom close and PIP controls. Not using the defaults from the html video element.
|
|
10955
10955
|
//Reason - We want to position them at the top right and left positions.
|
|
10956
|
-
this.
|
|
10956
|
+
this.QkKD();
|
|
10957
10957
|
//Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
|
|
10958
10958
|
this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
|
|
10959
10959
|
//Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
|
|
10960
|
-
this.
|
|
10960
|
+
this.vgYS();
|
|
10961
10961
|
document.body.appendChild(this.videoPlayer);
|
|
10962
10962
|
}
|
|
10963
10963
|
}, {
|
|
@@ -11057,7 +11057,7 @@
|
|
|
11057
11057
|
try {
|
|
11058
11058
|
_this2.videoPlayer.remove();
|
|
11059
11059
|
_this2.hideCallback();
|
|
11060
|
-
_this2.
|
|
11060
|
+
_this2.erWH();
|
|
11061
11061
|
} catch (e) {
|
|
11062
11062
|
console.log("Can't close the video player\n".concat(e));
|
|
11063
11063
|
}
|
|
@@ -11123,13 +11123,13 @@
|
|
|
11123
11123
|
var RTM = /*#__PURE__*/_createClass(function RTM() {
|
|
11124
11124
|
var _this = this;
|
|
11125
11125
|
_classCallCheck(this, RTM);
|
|
11126
|
-
_defineProperty(this, "
|
|
11126
|
+
_defineProperty(this, "ESSB", {});
|
|
11127
11127
|
_defineProperty(this, "isShowingAction", false);
|
|
11128
11128
|
_defineProperty(this, "currentAction", null);
|
|
11129
11129
|
_defineProperty(this, "version", 31);
|
|
11130
11130
|
_defineProperty(this, "isInitialised", false);
|
|
11131
11131
|
_defineProperty(this, "_eventsInDynamicText", {});
|
|
11132
|
-
_defineProperty(this, "
|
|
11132
|
+
_defineProperty(this, "crkP", function () {
|
|
11133
11133
|
_this.isInitialised = true;
|
|
11134
11134
|
var oldPushState = history.pushState;
|
|
11135
11135
|
history.pushState = function pushState() {
|
|
@@ -11154,7 +11154,7 @@
|
|
|
11154
11154
|
});
|
|
11155
11155
|
_defineProperty(this, "show", function (uiJson, duration, uuid, name) {
|
|
11156
11156
|
if (!_this.isInitialised) {
|
|
11157
|
-
_this.
|
|
11157
|
+
_this.crkP();
|
|
11158
11158
|
}
|
|
11159
11159
|
try {
|
|
11160
11160
|
// console.log("Showing action for uuid:", uuid, uiJson, this.currentAction);
|
|
@@ -11232,7 +11232,7 @@
|
|
|
11232
11232
|
_this.currentAction = null;
|
|
11233
11233
|
window.Apxor && window.Apxor.updateFlag && window.Apxor.updateFlag(false);
|
|
11234
11234
|
});
|
|
11235
|
-
VideoInAppInstance.
|
|
11235
|
+
VideoInAppInstance.YZTN();
|
|
11236
11236
|
});
|
|
11237
11237
|
/**
|
|
11238
11238
|
* Creates a modal for the given config and displays it.
|