apxor-rtm-ui 0.5.5 → 0.5.6
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 +145 -93
- package/dist/apxor.rtm.min.js +2 -2
- package/package.json +1 -1
package/dist/apxor.rtm.js.bak
CHANGED
|
@@ -7364,6 +7364,16 @@
|
|
|
7364
7364
|
}
|
|
7365
7365
|
return null;
|
|
7366
7366
|
};
|
|
7367
|
+
var isDescendant = function isDescendant(parent, child) {
|
|
7368
|
+
var node = child.parentNode;
|
|
7369
|
+
while (node != null) {
|
|
7370
|
+
if (node == parent) {
|
|
7371
|
+
return true;
|
|
7372
|
+
}
|
|
7373
|
+
node = node.parentNode;
|
|
7374
|
+
}
|
|
7375
|
+
return false;
|
|
7376
|
+
};
|
|
7367
7377
|
function isElementCovered(element) {
|
|
7368
7378
|
var rect = element.getBoundingClientRect();
|
|
7369
7379
|
|
|
@@ -7375,22 +7385,26 @@
|
|
|
7375
7385
|
|
|
7376
7386
|
// Check if the point is covered
|
|
7377
7387
|
var elementAtPoint = document.elementFromPoint(x, y);
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
return false;
|
|
7381
|
-
} else {
|
|
7382
|
-
var childElements = elementAtPoint.children;
|
|
7383
|
-
for (var i = 0; i < childElements.length; i++) {
|
|
7384
|
-
var child = childElements[i];
|
|
7385
|
-
if (child === element) {
|
|
7386
|
-
return false;
|
|
7387
|
-
}
|
|
7388
|
-
}
|
|
7389
|
-
}
|
|
7390
|
-
elementAtPoint = elementAtPoint.parentElement;
|
|
7388
|
+
if (elementAtPoint === element || isDescendant(elementAtPoint, element) || isDescendant(element, elementAtPoint)) {
|
|
7389
|
+
return false;
|
|
7391
7390
|
}
|
|
7391
|
+
// while (elementAtPoint) {
|
|
7392
|
+
// if (elementAtPoint === element) {
|
|
7393
|
+
// return false;
|
|
7394
|
+
// } else {
|
|
7395
|
+
// var childElements = elementAtPoint.children;
|
|
7396
|
+
// for (var i = 0; i < childElements.length; i++) {
|
|
7397
|
+
// var child = childElements[i];
|
|
7398
|
+
// if (child === element) {
|
|
7399
|
+
// return false;
|
|
7400
|
+
// }
|
|
7401
|
+
// }
|
|
7402
|
+
// }
|
|
7403
|
+
// elementAtPoint = elementAtPoint.parentElement;
|
|
7404
|
+
// }
|
|
7392
7405
|
}
|
|
7393
7406
|
}
|
|
7407
|
+
|
|
7394
7408
|
return true;
|
|
7395
7409
|
}
|
|
7396
7410
|
var generateButtons = function generateButtons() {
|
|
@@ -11542,8 +11556,8 @@
|
|
|
11542
11556
|
var _this = this,
|
|
11543
11557
|
_config$termination;
|
|
11544
11558
|
_classCallCheck(this, TemplateContent);
|
|
11545
|
-
_defineProperty(this, "
|
|
11546
|
-
var element = _this.
|
|
11559
|
+
_defineProperty(this, "mLpm", function () {
|
|
11560
|
+
var element = _this.tKzm(_this.layout);
|
|
11547
11561
|
//document.body.appendChild(element);
|
|
11548
11562
|
var styleElement = document.createElement("style");
|
|
11549
11563
|
styleElement.innerHTML = _this.styleContent;
|
|
@@ -11555,7 +11569,7 @@
|
|
|
11555
11569
|
}
|
|
11556
11570
|
return element;
|
|
11557
11571
|
});
|
|
11558
|
-
_defineProperty(this, "
|
|
11572
|
+
_defineProperty(this, "tKzm", function (config) {
|
|
11559
11573
|
var _window$Apxor;
|
|
11560
11574
|
var element;
|
|
11561
11575
|
switch (config.type) {
|
|
@@ -11663,7 +11677,7 @@
|
|
|
11663
11677
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
11664
11678
|
element.style.position = "relative";
|
|
11665
11679
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
11666
|
-
var childElement = _this.
|
|
11680
|
+
var childElement = _this.tKzm(childConfig);
|
|
11667
11681
|
childElement.style.position = "absolute";
|
|
11668
11682
|
for (var _prop3 in childConfig.offset) {
|
|
11669
11683
|
childElement.style[_prop3] = childConfig.offset[_prop3];
|
|
@@ -11681,7 +11695,7 @@
|
|
|
11681
11695
|
// }
|
|
11682
11696
|
|
|
11683
11697
|
config.children.forEach(function (childConfig) {
|
|
11684
|
-
var childElement = _this.
|
|
11698
|
+
var childElement = _this.tKzm(childConfig);
|
|
11685
11699
|
element.appendChild(childElement);
|
|
11686
11700
|
});
|
|
11687
11701
|
}
|
|
@@ -12592,7 +12606,7 @@
|
|
|
12592
12606
|
}, {
|
|
12593
12607
|
key: "_setInLineContent",
|
|
12594
12608
|
value: function _setInLineContent() {
|
|
12595
|
-
this.inLineContainer = this.templateContent.
|
|
12609
|
+
this.inLineContainer = this.templateContent.mLpm();
|
|
12596
12610
|
}
|
|
12597
12611
|
}, {
|
|
12598
12612
|
key: "_setObservors",
|
|
@@ -14130,7 +14144,9 @@
|
|
|
14130
14144
|
*/
|
|
14131
14145
|
function InLineTooltip(config, uis, walkthroughConfigs, terminationConfig, messageConfig, rtmInstance, showCallback, hideCallback, stepperCallBack) {
|
|
14132
14146
|
var _this = this,
|
|
14133
|
-
_config$set_font_to_s
|
|
14147
|
+
_config$set_font_to_s,
|
|
14148
|
+
_config$wait_scroll_i,
|
|
14149
|
+
_config$wait_scroll_i2;
|
|
14134
14150
|
var isWalkthrough = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
|
|
14135
14151
|
var index = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : 0;
|
|
14136
14152
|
_classCallCheck(this, InLineTooltip);
|
|
@@ -14140,7 +14156,7 @@
|
|
|
14140
14156
|
* @description Creates the styles for Marketing message.
|
|
14141
14157
|
* @returns {string} css styles
|
|
14142
14158
|
*/
|
|
14143
|
-
_defineProperty(this, "
|
|
14159
|
+
_defineProperty(this, "aewK", function () {
|
|
14144
14160
|
if (!_this.enable_marketing) {
|
|
14145
14161
|
return "";
|
|
14146
14162
|
}
|
|
@@ -14159,7 +14175,7 @@
|
|
|
14159
14175
|
* @private
|
|
14160
14176
|
* @description Sets the marketing content at the end of the Inline
|
|
14161
14177
|
*/
|
|
14162
|
-
_defineProperty(this, "
|
|
14178
|
+
_defineProperty(this, "ynpZ", function () {
|
|
14163
14179
|
if (_this.enable_marketing) {
|
|
14164
14180
|
var marketingContainer = document.createElement("div");
|
|
14165
14181
|
marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
|
|
@@ -14269,6 +14285,8 @@
|
|
|
14269
14285
|
this.flag = true;
|
|
14270
14286
|
this.enable_nocode_events = (config === null || config === void 0 ? void 0 : config.enable_nocode_events) || false;
|
|
14271
14287
|
this.customFontList = [];
|
|
14288
|
+
this.scrollIntervalCount = (_config$wait_scroll_i = config === null || config === void 0 ? void 0 : config.wait_scroll_interval) !== null && _config$wait_scroll_i !== void 0 ? _config$wait_scroll_i : 4;
|
|
14289
|
+
this.scrollCompletelyInViewCount = (_config$wait_scroll_i2 = config === null || config === void 0 ? void 0 : config.wait_scroll_interval) !== null && _config$wait_scroll_i2 !== void 0 ? _config$wait_scroll_i2 : 4;
|
|
14272
14290
|
}
|
|
14273
14291
|
_createClass(InLineTooltip, [{
|
|
14274
14292
|
key: "createNewTooltip",
|
|
@@ -14529,24 +14547,42 @@
|
|
|
14529
14547
|
// const initialScrollPosition =
|
|
14530
14548
|
// this.targetElement.getBoundingClientRect().top;
|
|
14531
14549
|
this.targetElement.scrollIntoView(scrollIntoViewOptions);
|
|
14532
|
-
window.setTimeout(
|
|
14533
|
-
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
|
|
14537
|
-
|
|
14538
|
-
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14543
|
-
|
|
14544
|
-
|
|
14545
|
-
|
|
14546
|
-
|
|
14547
|
-
|
|
14550
|
+
// window.setTimeout(() => {
|
|
14551
|
+
// const isTargetElementCovered = isElementCovered(this.targetElement);
|
|
14552
|
+
// if (isTargetElementCovered) {
|
|
14553
|
+
// window.setTimeout(() => {
|
|
14554
|
+
// const isTargetElementCovered = isElementCovered(
|
|
14555
|
+
// this.targetElement
|
|
14556
|
+
// );
|
|
14557
|
+
// if (isTargetElementCovered) {
|
|
14558
|
+
// console.info(
|
|
14559
|
+
// "The tooltip is not visible because another element is overlapping the target element."
|
|
14560
|
+
// );
|
|
14561
|
+
// this._resetRTMAction();
|
|
14562
|
+
// } else {
|
|
14563
|
+
// targetReachedCallback();
|
|
14564
|
+
// }
|
|
14565
|
+
// }, 1000);
|
|
14566
|
+
// // console.info(
|
|
14567
|
+
// // "The tooltip is not visible because another element is overlapping the target element."
|
|
14568
|
+
// // );
|
|
14569
|
+
// // this._resetRTMAction();
|
|
14570
|
+
// } else {
|
|
14571
|
+
// targetReachedCallback();
|
|
14572
|
+
// }
|
|
14573
|
+
// }, 1000);
|
|
14574
|
+
this.scrollIntervalId = window.setInterval(function () {
|
|
14575
|
+
if (_this5.scrollIntervalCount <= 0) {
|
|
14576
|
+
console.info("The tooltip is not visible because another element is overlapping the target element.");
|
|
14577
|
+
_this5._resetRTMAction();
|
|
14578
|
+
clearInterval(_this5.scrollIntervalId);
|
|
14548
14579
|
} else {
|
|
14549
|
-
|
|
14580
|
+
_this5.scrollIntervalCount--;
|
|
14581
|
+
var is_element_covered = isElementCovered(_this5.targetElement);
|
|
14582
|
+
if (!is_element_covered) {
|
|
14583
|
+
targetReachedCallback();
|
|
14584
|
+
clearInterval(_this5.scrollIntervalId);
|
|
14585
|
+
}
|
|
14550
14586
|
}
|
|
14551
14587
|
}, 1000);
|
|
14552
14588
|
isscrolled = true;
|
|
@@ -14557,8 +14593,24 @@
|
|
|
14557
14593
|
}
|
|
14558
14594
|
} else {
|
|
14559
14595
|
if (this.scrollToView) {
|
|
14560
|
-
isElementCompletlyInView(this.targetElement)
|
|
14561
|
-
|
|
14596
|
+
if (!isElementCompletlyInView(this.targetElement)) {
|
|
14597
|
+
this.scrollCompletelyInViewId = window.setInterval(function () {
|
|
14598
|
+
if (_this5.scrollCompletelyInViewCount <= 0) {
|
|
14599
|
+
console.info("The tooltip is not completely in viewport, hence not showing the tooltip.");
|
|
14600
|
+
_this5._resetRTMAction();
|
|
14601
|
+
clearInterval(_this5.scrollCompletelyInViewCount);
|
|
14602
|
+
} else {
|
|
14603
|
+
_this5.scrollCompletelyInViewCount--;
|
|
14604
|
+
var is_element_covered = isElementCovered(_this5.targetElement);
|
|
14605
|
+
if (isElementCompletlyInView(_this5.targetElement) && !is_element_covered) {
|
|
14606
|
+
console.log("is completely in view");
|
|
14607
|
+
targetReachedCallback();
|
|
14608
|
+
isscrolled = true;
|
|
14609
|
+
clearInterval(_this5.scrollCompletelyInViewCount);
|
|
14610
|
+
}
|
|
14611
|
+
}
|
|
14612
|
+
}, 1000);
|
|
14613
|
+
}
|
|
14562
14614
|
}
|
|
14563
14615
|
scrolled = true;
|
|
14564
14616
|
}
|
|
@@ -14725,7 +14777,7 @@
|
|
|
14725
14777
|
if (apxor_tooltip_styles) {
|
|
14726
14778
|
return;
|
|
14727
14779
|
}
|
|
14728
|
-
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.
|
|
14780
|
+
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.aewK(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
14729
14781
|
var styleNode = document.createElement("style");
|
|
14730
14782
|
styleNode.setAttribute("apx-tooltip-styles", "");
|
|
14731
14783
|
styleNode.innerHTML = styles;
|
|
@@ -15535,7 +15587,7 @@
|
|
|
15535
15587
|
this._setCloseButton();
|
|
15536
15588
|
|
|
15537
15589
|
//Set the Marketing content
|
|
15538
|
-
this.
|
|
15590
|
+
this.ynpZ();
|
|
15539
15591
|
}
|
|
15540
15592
|
|
|
15541
15593
|
/**
|
|
@@ -18380,7 +18432,7 @@
|
|
|
18380
18432
|
}, {
|
|
18381
18433
|
key: "_setInAppModalContent",
|
|
18382
18434
|
value: function _setInAppModalContent() {
|
|
18383
|
-
this.inAppContainer = this.templateContent.
|
|
18435
|
+
this.inAppContainer = this.templateContent.mLpm();
|
|
18384
18436
|
this.inAppContainer.style.zIndex = 99999;
|
|
18385
18437
|
this.overlayElement.appendChild(this.inAppContainer);
|
|
18386
18438
|
}
|
|
@@ -18528,7 +18580,7 @@
|
|
|
18528
18580
|
* @description Creates the styles for Marketing message.
|
|
18529
18581
|
* @returns {string} css styles
|
|
18530
18582
|
*/
|
|
18531
|
-
_defineProperty(this, "
|
|
18583
|
+
_defineProperty(this, "aewK", function () {
|
|
18532
18584
|
if (!_this.enable_marketing) {
|
|
18533
18585
|
return "";
|
|
18534
18586
|
}
|
|
@@ -18574,7 +18626,7 @@
|
|
|
18574
18626
|
* @private
|
|
18575
18627
|
* @description Get the response for Form content in the InApp modal.
|
|
18576
18628
|
*/
|
|
18577
|
-
_defineProperty(this, "
|
|
18629
|
+
_defineProperty(this, "cMgW", function (form_elements) {
|
|
18578
18630
|
var obj = {};
|
|
18579
18631
|
var callback = "";
|
|
18580
18632
|
form_elements.forEach(function (element) {
|
|
@@ -18614,7 +18666,7 @@
|
|
|
18614
18666
|
* @private
|
|
18615
18667
|
* @description Sets the marketing content at the end of the InApp
|
|
18616
18668
|
*/
|
|
18617
|
-
_defineProperty(this, "
|
|
18669
|
+
_defineProperty(this, "ynpZ", function () {
|
|
18618
18670
|
if (_this.enable_marketing) {
|
|
18619
18671
|
var marketingContainer = document.createElement("div");
|
|
18620
18672
|
marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
|
|
@@ -18867,7 +18919,7 @@
|
|
|
18867
18919
|
}, {
|
|
18868
18920
|
key: "_setStyles",
|
|
18869
18921
|
value: function _setStyles() {
|
|
18870
|
-
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.
|
|
18922
|
+
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.aewK(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
18871
18923
|
var styleNode = document.createElement("style");
|
|
18872
18924
|
styleNode.setAttribute("id", "apxor-style-" + this.configId);
|
|
18873
18925
|
styleNode.innerHTML = styles;
|
|
@@ -19344,7 +19396,7 @@
|
|
|
19344
19396
|
this._setCloseButton();
|
|
19345
19397
|
|
|
19346
19398
|
//Set the Marketing content
|
|
19347
|
-
this.
|
|
19399
|
+
this.ynpZ();
|
|
19348
19400
|
}
|
|
19349
19401
|
|
|
19350
19402
|
/**
|
|
@@ -19549,7 +19601,7 @@
|
|
|
19549
19601
|
var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
|
|
19550
19602
|
form.addEventListener("submit", function (e) {
|
|
19551
19603
|
e.preventDefault();
|
|
19552
|
-
var _this4$generateRespon = _this4.
|
|
19604
|
+
var _this4$generateRespon = _this4.cMgW(_this4.form.elements),
|
|
19553
19605
|
obj = _this4$generateRespon.obj,
|
|
19554
19606
|
callback = _this4$generateRespon.callback;
|
|
19555
19607
|
var evalString = "(obj)=>" + callback + "(obj)";
|
|
@@ -19862,7 +19914,7 @@
|
|
|
19862
19914
|
* @function showVideoInApp
|
|
19863
19915
|
* @description Shows the video InApp with the configured mode.
|
|
19864
19916
|
*/
|
|
19865
|
-
_defineProperty(this, "
|
|
19917
|
+
_defineProperty(this, "AFBp", function () {
|
|
19866
19918
|
_this.createPlayer();
|
|
19867
19919
|
try {
|
|
19868
19920
|
// In PIP mode, only after the video metadata is loaded, show the PIP.
|
|
@@ -19904,7 +19956,7 @@
|
|
|
19904
19956
|
};
|
|
19905
19957
|
} else {
|
|
19906
19958
|
// As the video player is hidden by default, unhide if the mode is not PIP.
|
|
19907
|
-
_this.
|
|
19959
|
+
_this.vjJh();
|
|
19908
19960
|
}
|
|
19909
19961
|
_this.showCallback();
|
|
19910
19962
|
} catch (e) {
|
|
@@ -19924,7 +19976,7 @@
|
|
|
19924
19976
|
* For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
|
|
19925
19977
|
* For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
|
|
19926
19978
|
*/
|
|
19927
|
-
_defineProperty(this, "
|
|
19979
|
+
_defineProperty(this, "ZgoO", function () {
|
|
19928
19980
|
var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
|
|
19929
19981
|
width = _getHeightWidthFromRe.width,
|
|
19930
19982
|
height = _getHeightWidthFromRe.height;
|
|
@@ -19936,7 +19988,7 @@
|
|
|
19936
19988
|
* @private
|
|
19937
19989
|
* @description Removes the video player style element.
|
|
19938
19990
|
*/
|
|
19939
|
-
_defineProperty(this, "
|
|
19991
|
+
_defineProperty(this, "hglk", function () {
|
|
19940
19992
|
var playerStyles = document.getElementById("apx-mpl-styles");
|
|
19941
19993
|
if (playerStyles) {
|
|
19942
19994
|
playerStyles.remove();
|
|
@@ -19947,7 +19999,7 @@
|
|
|
19947
19999
|
* @private
|
|
19948
20000
|
* @description Attach listeners on the video controls
|
|
19949
20001
|
*/
|
|
19950
|
-
_defineProperty(this, "
|
|
20002
|
+
_defineProperty(this, "WOFY", function () {
|
|
19951
20003
|
// Listener for the video end. Display the CTA's when the video ends.
|
|
19952
20004
|
_this.videoElement.addEventListener("ended", function () {
|
|
19953
20005
|
var ctaButtons = document.getElementById("apx-cta-btn");
|
|
@@ -20058,7 +20110,7 @@
|
|
|
20058
20110
|
* @private
|
|
20059
20111
|
* @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
20060
20112
|
*/
|
|
20061
|
-
_defineProperty(this, "
|
|
20113
|
+
_defineProperty(this, "PoLa", function () {
|
|
20062
20114
|
var _this$terminationConf;
|
|
20063
20115
|
if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
|
|
20064
20116
|
// On Exit of the PIP,
|
|
@@ -20098,7 +20150,7 @@
|
|
|
20098
20150
|
* @private Sets the custom controls on the video player.
|
|
20099
20151
|
* PIP and close are the custom controls that are created and positions on the video.
|
|
20100
20152
|
*/
|
|
20101
|
-
_defineProperty(this, "
|
|
20153
|
+
_defineProperty(this, "SpLw", function () {
|
|
20102
20154
|
_this.enable_close_button;
|
|
20103
20155
|
if (_this.enable_close_button) {
|
|
20104
20156
|
var closeButton = document.createElement("span");
|
|
@@ -20145,21 +20197,21 @@
|
|
|
20145
20197
|
* @function hideVideoPlayer
|
|
20146
20198
|
* @description Sets the visibility of the video player to hidden.
|
|
20147
20199
|
*/
|
|
20148
|
-
_defineProperty(this, "
|
|
20200
|
+
_defineProperty(this, "ZlCf", function () {
|
|
20149
20201
|
_this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
20150
20202
|
});
|
|
20151
20203
|
/**
|
|
20152
20204
|
* @function unhideVideoPlayer
|
|
20153
20205
|
* @description Unhides video player.
|
|
20154
20206
|
*/
|
|
20155
|
-
_defineProperty(this, "
|
|
20207
|
+
_defineProperty(this, "vjJh", function () {
|
|
20156
20208
|
_this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
20157
20209
|
});
|
|
20158
20210
|
/**
|
|
20159
20211
|
* @function getVideoElement
|
|
20160
20212
|
* @returns {HTMLElement} Video ekement
|
|
20161
20213
|
*/
|
|
20162
|
-
_defineProperty(this, "
|
|
20214
|
+
_defineProperty(this, "NDgK", function () {
|
|
20163
20215
|
return _this.videoElement;
|
|
20164
20216
|
});
|
|
20165
20217
|
this.videoPlayer = null;
|
|
@@ -20211,7 +20263,7 @@
|
|
|
20211
20263
|
this.videoPlayer.style.backgroundColor = this.bg_color;
|
|
20212
20264
|
|
|
20213
20265
|
// Video has a resolution, not deviating from the resolution set the height and width.
|
|
20214
|
-
this.
|
|
20266
|
+
this.ZgoO();
|
|
20215
20267
|
//Generate the styles and add them to the document head.
|
|
20216
20268
|
this._setVideoPlayerStyles();
|
|
20217
20269
|
//Set the position of the video player with in the 5 possible positions.
|
|
@@ -20219,16 +20271,16 @@
|
|
|
20219
20271
|
//Create a video element,set the source and add to the container.
|
|
20220
20272
|
this._setPlayerContent();
|
|
20221
20273
|
//Set the listeners on the video control buttons.
|
|
20222
|
-
this.
|
|
20274
|
+
this.WOFY();
|
|
20223
20275
|
//Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
20224
|
-
this.
|
|
20276
|
+
this.PoLa();
|
|
20225
20277
|
//Set the custom close and PIP controls. Not using the defaults from the html video element.
|
|
20226
20278
|
//Reason - We want to position them at the top right and left positions.
|
|
20227
|
-
this.
|
|
20279
|
+
this.SpLw();
|
|
20228
20280
|
//Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
|
|
20229
20281
|
this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
|
|
20230
20282
|
//Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
|
|
20231
|
-
this.
|
|
20283
|
+
this.ZlCf();
|
|
20232
20284
|
//If the auto dismiss is enabled, sets the timeout to call the InApp close.
|
|
20233
20285
|
this._setAutoTerminate();
|
|
20234
20286
|
document.body.appendChild(this.videoPlayer);
|
|
@@ -20342,7 +20394,7 @@
|
|
|
20342
20394
|
}
|
|
20343
20395
|
}
|
|
20344
20396
|
this.videoPlayer.remove();
|
|
20345
|
-
this.
|
|
20397
|
+
this.hglk();
|
|
20346
20398
|
if (closeButtonName !== "auto_dismiss") {
|
|
20347
20399
|
window.Apxor.logAppEvent("apx_video_inapp_close_button_clicked", JSON.stringify({
|
|
20348
20400
|
message_name: this.name,
|
|
@@ -20410,7 +20462,7 @@
|
|
|
20410
20462
|
replayCount: _this3.replayCount
|
|
20411
20463
|
}));
|
|
20412
20464
|
_this3.videoPlayer.remove();
|
|
20413
|
-
_this3.
|
|
20465
|
+
_this3.hglk();
|
|
20414
20466
|
_this3.hideCallback();
|
|
20415
20467
|
} catch (e) {
|
|
20416
20468
|
console.log("Can't close the video player\n".concat(e));
|
|
@@ -20500,31 +20552,31 @@
|
|
|
20500
20552
|
_config$termination;
|
|
20501
20553
|
_classCallCheck(this, EmbedCards);
|
|
20502
20554
|
_defineProperty(this, "showEmbedCardsv2", function () {
|
|
20503
|
-
var element = _this.
|
|
20504
|
-
_this.
|
|
20555
|
+
var element = _this.JOeg(_this.layout);
|
|
20556
|
+
_this.qzdB();
|
|
20505
20557
|
window.onresize = function () {
|
|
20506
|
-
_this.
|
|
20558
|
+
_this.SbrJ();
|
|
20507
20559
|
};
|
|
20508
20560
|
document.body.appendChild(element);
|
|
20509
20561
|
var styleElement = document.createElement("style");
|
|
20510
20562
|
styleElement.innerHTML = _this.styleContent;
|
|
20511
20563
|
document.head.appendChild(styleElement);
|
|
20512
|
-
_this.
|
|
20564
|
+
_this.tbet(_this.termination);
|
|
20513
20565
|
try {
|
|
20514
20566
|
eval(_this.script);
|
|
20515
20567
|
} catch (e) {
|
|
20516
20568
|
console.log("found error while executing script: ".concat(e));
|
|
20517
20569
|
}
|
|
20518
20570
|
_this.showCallback();
|
|
20519
|
-
_this.
|
|
20571
|
+
_this.SbrJ();
|
|
20520
20572
|
});
|
|
20521
|
-
_defineProperty(this, "
|
|
20573
|
+
_defineProperty(this, "qzdB", function () {
|
|
20522
20574
|
var EmbeddedCardsStyles = document.createElement("style");
|
|
20523
20575
|
EmbeddedCardsStyles.innerHTML = _this.initialStyles;
|
|
20524
20576
|
EmbeddedCardsStyles.setAttribute("apx-tooltip-styles", "");
|
|
20525
20577
|
document.head.appendChild(EmbeddedCardsStyles);
|
|
20526
20578
|
});
|
|
20527
|
-
_defineProperty(this, "
|
|
20579
|
+
_defineProperty(this, "JOeg", function (config) {
|
|
20528
20580
|
var _window$Apxor;
|
|
20529
20581
|
var element;
|
|
20530
20582
|
switch (config.type) {
|
|
@@ -20647,7 +20699,7 @@
|
|
|
20647
20699
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
20648
20700
|
element.style.position = "relative";
|
|
20649
20701
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
20650
|
-
var childElement = _this.
|
|
20702
|
+
var childElement = _this.tKzm(childConfig);
|
|
20651
20703
|
childElement.style.position = "absolute";
|
|
20652
20704
|
for (var _prop3 in childConfig.offset) {
|
|
20653
20705
|
childElement.style[_prop3] = childConfig.offset[_prop3];
|
|
@@ -20665,13 +20717,13 @@
|
|
|
20665
20717
|
// }
|
|
20666
20718
|
|
|
20667
20719
|
config.children.forEach(function (childConfig) {
|
|
20668
|
-
var childElement = _this.
|
|
20720
|
+
var childElement = _this.JOeg(childConfig);
|
|
20669
20721
|
element.appendChild(childElement);
|
|
20670
20722
|
});
|
|
20671
20723
|
}
|
|
20672
20724
|
return element;
|
|
20673
20725
|
});
|
|
20674
|
-
_defineProperty(this, "
|
|
20726
|
+
_defineProperty(this, "tbet", function (config) {
|
|
20675
20727
|
config.forEach(function (id) {
|
|
20676
20728
|
var element = document.getElementById(id);
|
|
20677
20729
|
if (element) {
|
|
@@ -20679,7 +20731,7 @@
|
|
|
20679
20731
|
}
|
|
20680
20732
|
});
|
|
20681
20733
|
});
|
|
20682
|
-
_defineProperty(this, "
|
|
20734
|
+
_defineProperty(this, "SbrJ", function () {
|
|
20683
20735
|
var _window;
|
|
20684
20736
|
var width = window.document.querySelector("html").offsetWidth;
|
|
20685
20737
|
var height = window.document.querySelector("html").offsetHeight;
|
|
@@ -20699,14 +20751,14 @@
|
|
|
20699
20751
|
var RTM = /*#__PURE__*/_createClass(function RTM() {
|
|
20700
20752
|
var _this = this;
|
|
20701
20753
|
_classCallCheck(this, RTM);
|
|
20702
|
-
_defineProperty(this, "
|
|
20754
|
+
_defineProperty(this, "opuR", {});
|
|
20703
20755
|
_defineProperty(this, "isShowingAction", false);
|
|
20704
20756
|
_defineProperty(this, "currentAction", null);
|
|
20705
|
-
_defineProperty(this, "
|
|
20706
|
-
_defineProperty(this, "version",
|
|
20757
|
+
_defineProperty(this, "Mdpo", null);
|
|
20758
|
+
_defineProperty(this, "version", 56);
|
|
20707
20759
|
_defineProperty(this, "isInitialised", false);
|
|
20708
20760
|
_defineProperty(this, "_eventsInDynamicText", {});
|
|
20709
|
-
_defineProperty(this, "
|
|
20761
|
+
_defineProperty(this, "IPmU", function () {
|
|
20710
20762
|
_this.isInitialised = true;
|
|
20711
20763
|
var oldPushState = history.pushState;
|
|
20712
20764
|
history.pushState = function pushState() {
|
|
@@ -20731,7 +20783,7 @@
|
|
|
20731
20783
|
});
|
|
20732
20784
|
_defineProperty(this, "show", function (uiJson, duration, uuid, name) {
|
|
20733
20785
|
if (!_this.isInitialised) {
|
|
20734
|
-
_this.
|
|
20786
|
+
_this.IPmU();
|
|
20735
20787
|
}
|
|
20736
20788
|
window.addEventListener("pagehide", function () {
|
|
20737
20789
|
var _window$Apxor, _window$Apxor$pageUnl;
|
|
@@ -20756,7 +20808,7 @@
|
|
|
20756
20808
|
} else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
|
|
20757
20809
|
_this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
|
|
20758
20810
|
} else if (ui_config.display_type === "coach_mark_v2") {
|
|
20759
|
-
_this.
|
|
20811
|
+
_this.NZQq(ui_config, duration, uuid, name);
|
|
20760
20812
|
} else {
|
|
20761
20813
|
showCoachmarkWithDelay(_this, ui_config, {
|
|
20762
20814
|
configId: uuid,
|
|
@@ -20877,7 +20929,7 @@
|
|
|
20877
20929
|
var _window14, _window14$updateFlag, _window15;
|
|
20878
20930
|
_this.isShowingAction = false;
|
|
20879
20931
|
_this.currentAction = null;
|
|
20880
|
-
_this.
|
|
20932
|
+
_this.Mdpo = null;
|
|
20881
20933
|
(_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, false);
|
|
20882
20934
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
20883
20935
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
@@ -20888,21 +20940,21 @@
|
|
|
20888
20940
|
}
|
|
20889
20941
|
};
|
|
20890
20942
|
if (action_class === "new-inline") {
|
|
20891
|
-
_this.
|
|
20943
|
+
_this.Mdpo = new InLineTooltip(ui_config, [], [], terminationConfig, {
|
|
20892
20944
|
configId: uuid,
|
|
20893
20945
|
configName: name
|
|
20894
20946
|
}, _this, onShow, onHide, function () {}, false, 0);
|
|
20895
20947
|
} else if (action_class === "tooltip_builder") {
|
|
20896
|
-
_this.
|
|
20948
|
+
_this.Mdpo = new NewInLineTooltip(ui_config, terminationConfig, {
|
|
20897
20949
|
configId: uuid,
|
|
20898
20950
|
configName: name
|
|
20899
20951
|
}, _this, onShow, onHide);
|
|
20900
20952
|
}
|
|
20901
20953
|
setTimeout(function () {
|
|
20902
|
-
_this.
|
|
20954
|
+
_this.Mdpo.createNewTooltip();
|
|
20903
20955
|
}, ui_config.delay);
|
|
20904
20956
|
});
|
|
20905
|
-
_defineProperty(this, "
|
|
20957
|
+
_defineProperty(this, "NZQq", function (ui_config, duration, uuid, name) {
|
|
20906
20958
|
var terminationConfig = {};
|
|
20907
20959
|
terminationConfig["auto_dismiss"] = duration > 0;
|
|
20908
20960
|
terminationConfig["duration"] = duration;
|
|
@@ -20926,7 +20978,7 @@
|
|
|
20926
20978
|
var _window19, _window19$updateFlag, _window20;
|
|
20927
20979
|
_this.isShowingAction = false;
|
|
20928
20980
|
_this.currentAction = null;
|
|
20929
|
-
_this.
|
|
20981
|
+
_this.Mdpo = null;
|
|
20930
20982
|
(_window19 = window) === null || _window19 === void 0 || (_window19 = _window19.Apxor) === null || _window19 === void 0 || (_window19$updateFlag = _window19.updateFlag) === null || _window19$updateFlag === void 0 || _window19$updateFlag.call(_window19, false);
|
|
20931
20983
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
20932
20984
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
@@ -20939,8 +20991,8 @@
|
|
|
20939
20991
|
_this._currentCoachmark.createNewCoachMark();
|
|
20940
20992
|
});
|
|
20941
20993
|
_defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
|
|
20942
|
-
if (_this.
|
|
20943
|
-
_this.
|
|
20994
|
+
if (_this.Mdpo) {
|
|
20995
|
+
_this.Mdpo.updateElementPositionOnScroll(top, left, height, width);
|
|
20944
20996
|
}
|
|
20945
20997
|
});
|
|
20946
20998
|
_defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
|
|
@@ -20970,7 +21022,7 @@
|
|
|
20970
21022
|
window.Apxor.logActionEvent("inapp_dismissed", configId, name);
|
|
20971
21023
|
}
|
|
20972
21024
|
});
|
|
20973
|
-
VideoInAppInstance.
|
|
21025
|
+
VideoInAppInstance.AFBp();
|
|
20974
21026
|
});
|
|
20975
21027
|
/**
|
|
20976
21028
|
* Creates a modal for the given config and displays it.
|