apxor-rtm-ui 0.5.4 → 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 +158 -85
- 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,14 +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
|
-
}
|
|
7382
|
-
elementAtPoint = elementAtPoint.parentElement;
|
|
7388
|
+
if (elementAtPoint === element || isDescendant(elementAtPoint, element) || isDescendant(element, elementAtPoint)) {
|
|
7389
|
+
return false;
|
|
7383
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
|
+
// }
|
|
7384
7405
|
}
|
|
7385
7406
|
}
|
|
7407
|
+
|
|
7386
7408
|
return true;
|
|
7387
7409
|
}
|
|
7388
7410
|
var generateButtons = function generateButtons() {
|
|
@@ -11534,8 +11556,8 @@
|
|
|
11534
11556
|
var _this = this,
|
|
11535
11557
|
_config$termination;
|
|
11536
11558
|
_classCallCheck(this, TemplateContent);
|
|
11537
|
-
_defineProperty(this, "
|
|
11538
|
-
var element = _this.
|
|
11559
|
+
_defineProperty(this, "mLpm", function () {
|
|
11560
|
+
var element = _this.tKzm(_this.layout);
|
|
11539
11561
|
//document.body.appendChild(element);
|
|
11540
11562
|
var styleElement = document.createElement("style");
|
|
11541
11563
|
styleElement.innerHTML = _this.styleContent;
|
|
@@ -11547,7 +11569,7 @@
|
|
|
11547
11569
|
}
|
|
11548
11570
|
return element;
|
|
11549
11571
|
});
|
|
11550
|
-
_defineProperty(this, "
|
|
11572
|
+
_defineProperty(this, "tKzm", function (config) {
|
|
11551
11573
|
var _window$Apxor;
|
|
11552
11574
|
var element;
|
|
11553
11575
|
switch (config.type) {
|
|
@@ -11655,7 +11677,7 @@
|
|
|
11655
11677
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
11656
11678
|
element.style.position = "relative";
|
|
11657
11679
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
11658
|
-
var childElement = _this.
|
|
11680
|
+
var childElement = _this.tKzm(childConfig);
|
|
11659
11681
|
childElement.style.position = "absolute";
|
|
11660
11682
|
for (var _prop3 in childConfig.offset) {
|
|
11661
11683
|
childElement.style[_prop3] = childConfig.offset[_prop3];
|
|
@@ -11673,7 +11695,7 @@
|
|
|
11673
11695
|
// }
|
|
11674
11696
|
|
|
11675
11697
|
config.children.forEach(function (childConfig) {
|
|
11676
|
-
var childElement = _this.
|
|
11698
|
+
var childElement = _this.tKzm(childConfig);
|
|
11677
11699
|
element.appendChild(childElement);
|
|
11678
11700
|
});
|
|
11679
11701
|
}
|
|
@@ -12584,7 +12606,7 @@
|
|
|
12584
12606
|
}, {
|
|
12585
12607
|
key: "_setInLineContent",
|
|
12586
12608
|
value: function _setInLineContent() {
|
|
12587
|
-
this.inLineContainer = this.templateContent.
|
|
12609
|
+
this.inLineContainer = this.templateContent.mLpm();
|
|
12588
12610
|
}
|
|
12589
12611
|
}, {
|
|
12590
12612
|
key: "_setObservors",
|
|
@@ -14122,7 +14144,9 @@
|
|
|
14122
14144
|
*/
|
|
14123
14145
|
function InLineTooltip(config, uis, walkthroughConfigs, terminationConfig, messageConfig, rtmInstance, showCallback, hideCallback, stepperCallBack) {
|
|
14124
14146
|
var _this = this,
|
|
14125
|
-
_config$set_font_to_s
|
|
14147
|
+
_config$set_font_to_s,
|
|
14148
|
+
_config$wait_scroll_i,
|
|
14149
|
+
_config$wait_scroll_i2;
|
|
14126
14150
|
var isWalkthrough = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
|
|
14127
14151
|
var index = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : 0;
|
|
14128
14152
|
_classCallCheck(this, InLineTooltip);
|
|
@@ -14132,7 +14156,7 @@
|
|
|
14132
14156
|
* @description Creates the styles for Marketing message.
|
|
14133
14157
|
* @returns {string} css styles
|
|
14134
14158
|
*/
|
|
14135
|
-
_defineProperty(this, "
|
|
14159
|
+
_defineProperty(this, "aewK", function () {
|
|
14136
14160
|
if (!_this.enable_marketing) {
|
|
14137
14161
|
return "";
|
|
14138
14162
|
}
|
|
@@ -14151,7 +14175,7 @@
|
|
|
14151
14175
|
* @private
|
|
14152
14176
|
* @description Sets the marketing content at the end of the Inline
|
|
14153
14177
|
*/
|
|
14154
|
-
_defineProperty(this, "
|
|
14178
|
+
_defineProperty(this, "ynpZ", function () {
|
|
14155
14179
|
if (_this.enable_marketing) {
|
|
14156
14180
|
var marketingContainer = document.createElement("div");
|
|
14157
14181
|
marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
|
|
@@ -14261,6 +14285,8 @@
|
|
|
14261
14285
|
this.flag = true;
|
|
14262
14286
|
this.enable_nocode_events = (config === null || config === void 0 ? void 0 : config.enable_nocode_events) || false;
|
|
14263
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;
|
|
14264
14290
|
}
|
|
14265
14291
|
_createClass(InLineTooltip, [{
|
|
14266
14292
|
key: "createNewTooltip",
|
|
@@ -14521,24 +14547,42 @@
|
|
|
14521
14547
|
// const initialScrollPosition =
|
|
14522
14548
|
// this.targetElement.getBoundingClientRect().top;
|
|
14523
14549
|
this.targetElement.scrollIntoView(scrollIntoViewOptions);
|
|
14524
|
-
window.setTimeout(
|
|
14525
|
-
|
|
14526
|
-
|
|
14527
|
-
|
|
14528
|
-
|
|
14529
|
-
|
|
14530
|
-
|
|
14531
|
-
|
|
14532
|
-
|
|
14533
|
-
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
|
|
14537
|
-
|
|
14538
|
-
|
|
14539
|
-
|
|
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);
|
|
14540
14579
|
} else {
|
|
14541
|
-
|
|
14580
|
+
_this5.scrollIntervalCount--;
|
|
14581
|
+
var is_element_covered = isElementCovered(_this5.targetElement);
|
|
14582
|
+
if (!is_element_covered) {
|
|
14583
|
+
targetReachedCallback();
|
|
14584
|
+
clearInterval(_this5.scrollIntervalId);
|
|
14585
|
+
}
|
|
14542
14586
|
}
|
|
14543
14587
|
}, 1000);
|
|
14544
14588
|
isscrolled = true;
|
|
@@ -14549,8 +14593,24 @@
|
|
|
14549
14593
|
}
|
|
14550
14594
|
} else {
|
|
14551
14595
|
if (this.scrollToView) {
|
|
14552
|
-
isElementCompletlyInView(this.targetElement)
|
|
14553
|
-
|
|
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
|
+
}
|
|
14554
14614
|
}
|
|
14555
14615
|
scrolled = true;
|
|
14556
14616
|
}
|
|
@@ -14717,7 +14777,7 @@
|
|
|
14717
14777
|
if (apxor_tooltip_styles) {
|
|
14718
14778
|
return;
|
|
14719
14779
|
}
|
|
14720
|
-
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, "");
|
|
14721
14781
|
var styleNode = document.createElement("style");
|
|
14722
14782
|
styleNode.setAttribute("apx-tooltip-styles", "");
|
|
14723
14783
|
styleNode.innerHTML = styles;
|
|
@@ -15527,7 +15587,7 @@
|
|
|
15527
15587
|
this._setCloseButton();
|
|
15528
15588
|
|
|
15529
15589
|
//Set the Marketing content
|
|
15530
|
-
this.
|
|
15590
|
+
this.ynpZ();
|
|
15531
15591
|
}
|
|
15532
15592
|
|
|
15533
15593
|
/**
|
|
@@ -16158,6 +16218,19 @@
|
|
|
16158
16218
|
key: "_createTippyInstance",
|
|
16159
16219
|
value: function _createTippyInstance() {
|
|
16160
16220
|
var _this12 = this;
|
|
16221
|
+
if (this.targetElement.disabled) {
|
|
16222
|
+
// Wrap the disabled element in a span
|
|
16223
|
+
var span = document.createElement("span");
|
|
16224
|
+
|
|
16225
|
+
// Set ID for the span
|
|
16226
|
+
var spanId = "apx_tooltip_span"; // Generating a uni
|
|
16227
|
+
span.setAttribute("id", spanId);
|
|
16228
|
+
|
|
16229
|
+
// Wrap the element with the span
|
|
16230
|
+
this.targetElement.parentNode.insertBefore(span, this.targetElement);
|
|
16231
|
+
span.appendChild(this.targetElement);
|
|
16232
|
+
this.targetElement = span;
|
|
16233
|
+
}
|
|
16161
16234
|
this.tooltip = tippy$1(this.targetElement, {
|
|
16162
16235
|
allowHTML: false,
|
|
16163
16236
|
aria: {
|
|
@@ -18359,7 +18432,7 @@
|
|
|
18359
18432
|
}, {
|
|
18360
18433
|
key: "_setInAppModalContent",
|
|
18361
18434
|
value: function _setInAppModalContent() {
|
|
18362
|
-
this.inAppContainer = this.templateContent.
|
|
18435
|
+
this.inAppContainer = this.templateContent.mLpm();
|
|
18363
18436
|
this.inAppContainer.style.zIndex = 99999;
|
|
18364
18437
|
this.overlayElement.appendChild(this.inAppContainer);
|
|
18365
18438
|
}
|
|
@@ -18507,7 +18580,7 @@
|
|
|
18507
18580
|
* @description Creates the styles for Marketing message.
|
|
18508
18581
|
* @returns {string} css styles
|
|
18509
18582
|
*/
|
|
18510
|
-
_defineProperty(this, "
|
|
18583
|
+
_defineProperty(this, "aewK", function () {
|
|
18511
18584
|
if (!_this.enable_marketing) {
|
|
18512
18585
|
return "";
|
|
18513
18586
|
}
|
|
@@ -18553,7 +18626,7 @@
|
|
|
18553
18626
|
* @private
|
|
18554
18627
|
* @description Get the response for Form content in the InApp modal.
|
|
18555
18628
|
*/
|
|
18556
|
-
_defineProperty(this, "
|
|
18629
|
+
_defineProperty(this, "cMgW", function (form_elements) {
|
|
18557
18630
|
var obj = {};
|
|
18558
18631
|
var callback = "";
|
|
18559
18632
|
form_elements.forEach(function (element) {
|
|
@@ -18593,7 +18666,7 @@
|
|
|
18593
18666
|
* @private
|
|
18594
18667
|
* @description Sets the marketing content at the end of the InApp
|
|
18595
18668
|
*/
|
|
18596
|
-
_defineProperty(this, "
|
|
18669
|
+
_defineProperty(this, "ynpZ", function () {
|
|
18597
18670
|
if (_this.enable_marketing) {
|
|
18598
18671
|
var marketingContainer = document.createElement("div");
|
|
18599
18672
|
marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
|
|
@@ -18846,7 +18919,7 @@
|
|
|
18846
18919
|
}, {
|
|
18847
18920
|
key: "_setStyles",
|
|
18848
18921
|
value: function _setStyles() {
|
|
18849
|
-
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, "");
|
|
18850
18923
|
var styleNode = document.createElement("style");
|
|
18851
18924
|
styleNode.setAttribute("id", "apxor-style-" + this.configId);
|
|
18852
18925
|
styleNode.innerHTML = styles;
|
|
@@ -19323,7 +19396,7 @@
|
|
|
19323
19396
|
this._setCloseButton();
|
|
19324
19397
|
|
|
19325
19398
|
//Set the Marketing content
|
|
19326
|
-
this.
|
|
19399
|
+
this.ynpZ();
|
|
19327
19400
|
}
|
|
19328
19401
|
|
|
19329
19402
|
/**
|
|
@@ -19528,7 +19601,7 @@
|
|
|
19528
19601
|
var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
|
|
19529
19602
|
form.addEventListener("submit", function (e) {
|
|
19530
19603
|
e.preventDefault();
|
|
19531
|
-
var _this4$generateRespon = _this4.
|
|
19604
|
+
var _this4$generateRespon = _this4.cMgW(_this4.form.elements),
|
|
19532
19605
|
obj = _this4$generateRespon.obj,
|
|
19533
19606
|
callback = _this4$generateRespon.callback;
|
|
19534
19607
|
var evalString = "(obj)=>" + callback + "(obj)";
|
|
@@ -19841,7 +19914,7 @@
|
|
|
19841
19914
|
* @function showVideoInApp
|
|
19842
19915
|
* @description Shows the video InApp with the configured mode.
|
|
19843
19916
|
*/
|
|
19844
|
-
_defineProperty(this, "
|
|
19917
|
+
_defineProperty(this, "AFBp", function () {
|
|
19845
19918
|
_this.createPlayer();
|
|
19846
19919
|
try {
|
|
19847
19920
|
// In PIP mode, only after the video metadata is loaded, show the PIP.
|
|
@@ -19883,7 +19956,7 @@
|
|
|
19883
19956
|
};
|
|
19884
19957
|
} else {
|
|
19885
19958
|
// As the video player is hidden by default, unhide if the mode is not PIP.
|
|
19886
|
-
_this.
|
|
19959
|
+
_this.vjJh();
|
|
19887
19960
|
}
|
|
19888
19961
|
_this.showCallback();
|
|
19889
19962
|
} catch (e) {
|
|
@@ -19903,7 +19976,7 @@
|
|
|
19903
19976
|
* For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
|
|
19904
19977
|
* For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
|
|
19905
19978
|
*/
|
|
19906
|
-
_defineProperty(this, "
|
|
19979
|
+
_defineProperty(this, "ZgoO", function () {
|
|
19907
19980
|
var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
|
|
19908
19981
|
width = _getHeightWidthFromRe.width,
|
|
19909
19982
|
height = _getHeightWidthFromRe.height;
|
|
@@ -19915,7 +19988,7 @@
|
|
|
19915
19988
|
* @private
|
|
19916
19989
|
* @description Removes the video player style element.
|
|
19917
19990
|
*/
|
|
19918
|
-
_defineProperty(this, "
|
|
19991
|
+
_defineProperty(this, "hglk", function () {
|
|
19919
19992
|
var playerStyles = document.getElementById("apx-mpl-styles");
|
|
19920
19993
|
if (playerStyles) {
|
|
19921
19994
|
playerStyles.remove();
|
|
@@ -19926,7 +19999,7 @@
|
|
|
19926
19999
|
* @private
|
|
19927
20000
|
* @description Attach listeners on the video controls
|
|
19928
20001
|
*/
|
|
19929
|
-
_defineProperty(this, "
|
|
20002
|
+
_defineProperty(this, "WOFY", function () {
|
|
19930
20003
|
// Listener for the video end. Display the CTA's when the video ends.
|
|
19931
20004
|
_this.videoElement.addEventListener("ended", function () {
|
|
19932
20005
|
var ctaButtons = document.getElementById("apx-cta-btn");
|
|
@@ -20037,7 +20110,7 @@
|
|
|
20037
20110
|
* @private
|
|
20038
20111
|
* @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
20039
20112
|
*/
|
|
20040
|
-
_defineProperty(this, "
|
|
20113
|
+
_defineProperty(this, "PoLa", function () {
|
|
20041
20114
|
var _this$terminationConf;
|
|
20042
20115
|
if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
|
|
20043
20116
|
// On Exit of the PIP,
|
|
@@ -20077,7 +20150,7 @@
|
|
|
20077
20150
|
* @private Sets the custom controls on the video player.
|
|
20078
20151
|
* PIP and close are the custom controls that are created and positions on the video.
|
|
20079
20152
|
*/
|
|
20080
|
-
_defineProperty(this, "
|
|
20153
|
+
_defineProperty(this, "SpLw", function () {
|
|
20081
20154
|
_this.enable_close_button;
|
|
20082
20155
|
if (_this.enable_close_button) {
|
|
20083
20156
|
var closeButton = document.createElement("span");
|
|
@@ -20124,21 +20197,21 @@
|
|
|
20124
20197
|
* @function hideVideoPlayer
|
|
20125
20198
|
* @description Sets the visibility of the video player to hidden.
|
|
20126
20199
|
*/
|
|
20127
|
-
_defineProperty(this, "
|
|
20200
|
+
_defineProperty(this, "ZlCf", function () {
|
|
20128
20201
|
_this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
20129
20202
|
});
|
|
20130
20203
|
/**
|
|
20131
20204
|
* @function unhideVideoPlayer
|
|
20132
20205
|
* @description Unhides video player.
|
|
20133
20206
|
*/
|
|
20134
|
-
_defineProperty(this, "
|
|
20207
|
+
_defineProperty(this, "vjJh", function () {
|
|
20135
20208
|
_this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
20136
20209
|
});
|
|
20137
20210
|
/**
|
|
20138
20211
|
* @function getVideoElement
|
|
20139
20212
|
* @returns {HTMLElement} Video ekement
|
|
20140
20213
|
*/
|
|
20141
|
-
_defineProperty(this, "
|
|
20214
|
+
_defineProperty(this, "NDgK", function () {
|
|
20142
20215
|
return _this.videoElement;
|
|
20143
20216
|
});
|
|
20144
20217
|
this.videoPlayer = null;
|
|
@@ -20190,7 +20263,7 @@
|
|
|
20190
20263
|
this.videoPlayer.style.backgroundColor = this.bg_color;
|
|
20191
20264
|
|
|
20192
20265
|
// Video has a resolution, not deviating from the resolution set the height and width.
|
|
20193
|
-
this.
|
|
20266
|
+
this.ZgoO();
|
|
20194
20267
|
//Generate the styles and add them to the document head.
|
|
20195
20268
|
this._setVideoPlayerStyles();
|
|
20196
20269
|
//Set the position of the video player with in the 5 possible positions.
|
|
@@ -20198,16 +20271,16 @@
|
|
|
20198
20271
|
//Create a video element,set the source and add to the container.
|
|
20199
20272
|
this._setPlayerContent();
|
|
20200
20273
|
//Set the listeners on the video control buttons.
|
|
20201
|
-
this.
|
|
20274
|
+
this.WOFY();
|
|
20202
20275
|
//Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
20203
|
-
this.
|
|
20276
|
+
this.PoLa();
|
|
20204
20277
|
//Set the custom close and PIP controls. Not using the defaults from the html video element.
|
|
20205
20278
|
//Reason - We want to position them at the top right and left positions.
|
|
20206
|
-
this.
|
|
20279
|
+
this.SpLw();
|
|
20207
20280
|
//Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
|
|
20208
20281
|
this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
|
|
20209
20282
|
//Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
|
|
20210
|
-
this.
|
|
20283
|
+
this.ZlCf();
|
|
20211
20284
|
//If the auto dismiss is enabled, sets the timeout to call the InApp close.
|
|
20212
20285
|
this._setAutoTerminate();
|
|
20213
20286
|
document.body.appendChild(this.videoPlayer);
|
|
@@ -20321,7 +20394,7 @@
|
|
|
20321
20394
|
}
|
|
20322
20395
|
}
|
|
20323
20396
|
this.videoPlayer.remove();
|
|
20324
|
-
this.
|
|
20397
|
+
this.hglk();
|
|
20325
20398
|
if (closeButtonName !== "auto_dismiss") {
|
|
20326
20399
|
window.Apxor.logAppEvent("apx_video_inapp_close_button_clicked", JSON.stringify({
|
|
20327
20400
|
message_name: this.name,
|
|
@@ -20389,7 +20462,7 @@
|
|
|
20389
20462
|
replayCount: _this3.replayCount
|
|
20390
20463
|
}));
|
|
20391
20464
|
_this3.videoPlayer.remove();
|
|
20392
|
-
_this3.
|
|
20465
|
+
_this3.hglk();
|
|
20393
20466
|
_this3.hideCallback();
|
|
20394
20467
|
} catch (e) {
|
|
20395
20468
|
console.log("Can't close the video player\n".concat(e));
|
|
@@ -20479,31 +20552,31 @@
|
|
|
20479
20552
|
_config$termination;
|
|
20480
20553
|
_classCallCheck(this, EmbedCards);
|
|
20481
20554
|
_defineProperty(this, "showEmbedCardsv2", function () {
|
|
20482
|
-
var element = _this.
|
|
20483
|
-
_this.
|
|
20555
|
+
var element = _this.JOeg(_this.layout);
|
|
20556
|
+
_this.qzdB();
|
|
20484
20557
|
window.onresize = function () {
|
|
20485
|
-
_this.
|
|
20558
|
+
_this.SbrJ();
|
|
20486
20559
|
};
|
|
20487
20560
|
document.body.appendChild(element);
|
|
20488
20561
|
var styleElement = document.createElement("style");
|
|
20489
20562
|
styleElement.innerHTML = _this.styleContent;
|
|
20490
20563
|
document.head.appendChild(styleElement);
|
|
20491
|
-
_this.
|
|
20564
|
+
_this.tbet(_this.termination);
|
|
20492
20565
|
try {
|
|
20493
20566
|
eval(_this.script);
|
|
20494
20567
|
} catch (e) {
|
|
20495
20568
|
console.log("found error while executing script: ".concat(e));
|
|
20496
20569
|
}
|
|
20497
20570
|
_this.showCallback();
|
|
20498
|
-
_this.
|
|
20571
|
+
_this.SbrJ();
|
|
20499
20572
|
});
|
|
20500
|
-
_defineProperty(this, "
|
|
20573
|
+
_defineProperty(this, "qzdB", function () {
|
|
20501
20574
|
var EmbeddedCardsStyles = document.createElement("style");
|
|
20502
20575
|
EmbeddedCardsStyles.innerHTML = _this.initialStyles;
|
|
20503
20576
|
EmbeddedCardsStyles.setAttribute("apx-tooltip-styles", "");
|
|
20504
20577
|
document.head.appendChild(EmbeddedCardsStyles);
|
|
20505
20578
|
});
|
|
20506
|
-
_defineProperty(this, "
|
|
20579
|
+
_defineProperty(this, "JOeg", function (config) {
|
|
20507
20580
|
var _window$Apxor;
|
|
20508
20581
|
var element;
|
|
20509
20582
|
switch (config.type) {
|
|
@@ -20626,7 +20699,7 @@
|
|
|
20626
20699
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
20627
20700
|
element.style.position = "relative";
|
|
20628
20701
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
20629
|
-
var childElement = _this.
|
|
20702
|
+
var childElement = _this.tKzm(childConfig);
|
|
20630
20703
|
childElement.style.position = "absolute";
|
|
20631
20704
|
for (var _prop3 in childConfig.offset) {
|
|
20632
20705
|
childElement.style[_prop3] = childConfig.offset[_prop3];
|
|
@@ -20644,13 +20717,13 @@
|
|
|
20644
20717
|
// }
|
|
20645
20718
|
|
|
20646
20719
|
config.children.forEach(function (childConfig) {
|
|
20647
|
-
var childElement = _this.
|
|
20720
|
+
var childElement = _this.JOeg(childConfig);
|
|
20648
20721
|
element.appendChild(childElement);
|
|
20649
20722
|
});
|
|
20650
20723
|
}
|
|
20651
20724
|
return element;
|
|
20652
20725
|
});
|
|
20653
|
-
_defineProperty(this, "
|
|
20726
|
+
_defineProperty(this, "tbet", function (config) {
|
|
20654
20727
|
config.forEach(function (id) {
|
|
20655
20728
|
var element = document.getElementById(id);
|
|
20656
20729
|
if (element) {
|
|
@@ -20658,7 +20731,7 @@
|
|
|
20658
20731
|
}
|
|
20659
20732
|
});
|
|
20660
20733
|
});
|
|
20661
|
-
_defineProperty(this, "
|
|
20734
|
+
_defineProperty(this, "SbrJ", function () {
|
|
20662
20735
|
var _window;
|
|
20663
20736
|
var width = window.document.querySelector("html").offsetWidth;
|
|
20664
20737
|
var height = window.document.querySelector("html").offsetHeight;
|
|
@@ -20678,14 +20751,14 @@
|
|
|
20678
20751
|
var RTM = /*#__PURE__*/_createClass(function RTM() {
|
|
20679
20752
|
var _this = this;
|
|
20680
20753
|
_classCallCheck(this, RTM);
|
|
20681
|
-
_defineProperty(this, "
|
|
20754
|
+
_defineProperty(this, "opuR", {});
|
|
20682
20755
|
_defineProperty(this, "isShowingAction", false);
|
|
20683
20756
|
_defineProperty(this, "currentAction", null);
|
|
20684
|
-
_defineProperty(this, "
|
|
20685
|
-
_defineProperty(this, "version",
|
|
20757
|
+
_defineProperty(this, "Mdpo", null);
|
|
20758
|
+
_defineProperty(this, "version", 56);
|
|
20686
20759
|
_defineProperty(this, "isInitialised", false);
|
|
20687
20760
|
_defineProperty(this, "_eventsInDynamicText", {});
|
|
20688
|
-
_defineProperty(this, "
|
|
20761
|
+
_defineProperty(this, "IPmU", function () {
|
|
20689
20762
|
_this.isInitialised = true;
|
|
20690
20763
|
var oldPushState = history.pushState;
|
|
20691
20764
|
history.pushState = function pushState() {
|
|
@@ -20710,7 +20783,7 @@
|
|
|
20710
20783
|
});
|
|
20711
20784
|
_defineProperty(this, "show", function (uiJson, duration, uuid, name) {
|
|
20712
20785
|
if (!_this.isInitialised) {
|
|
20713
|
-
_this.
|
|
20786
|
+
_this.IPmU();
|
|
20714
20787
|
}
|
|
20715
20788
|
window.addEventListener("pagehide", function () {
|
|
20716
20789
|
var _window$Apxor, _window$Apxor$pageUnl;
|
|
@@ -20735,7 +20808,7 @@
|
|
|
20735
20808
|
} else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
|
|
20736
20809
|
_this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
|
|
20737
20810
|
} else if (ui_config.display_type === "coach_mark_v2") {
|
|
20738
|
-
_this.
|
|
20811
|
+
_this.NZQq(ui_config, duration, uuid, name);
|
|
20739
20812
|
} else {
|
|
20740
20813
|
showCoachmarkWithDelay(_this, ui_config, {
|
|
20741
20814
|
configId: uuid,
|
|
@@ -20856,7 +20929,7 @@
|
|
|
20856
20929
|
var _window14, _window14$updateFlag, _window15;
|
|
20857
20930
|
_this.isShowingAction = false;
|
|
20858
20931
|
_this.currentAction = null;
|
|
20859
|
-
_this.
|
|
20932
|
+
_this.Mdpo = null;
|
|
20860
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);
|
|
20861
20934
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
20862
20935
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
@@ -20867,21 +20940,21 @@
|
|
|
20867
20940
|
}
|
|
20868
20941
|
};
|
|
20869
20942
|
if (action_class === "new-inline") {
|
|
20870
|
-
_this.
|
|
20943
|
+
_this.Mdpo = new InLineTooltip(ui_config, [], [], terminationConfig, {
|
|
20871
20944
|
configId: uuid,
|
|
20872
20945
|
configName: name
|
|
20873
20946
|
}, _this, onShow, onHide, function () {}, false, 0);
|
|
20874
20947
|
} else if (action_class === "tooltip_builder") {
|
|
20875
|
-
_this.
|
|
20948
|
+
_this.Mdpo = new NewInLineTooltip(ui_config, terminationConfig, {
|
|
20876
20949
|
configId: uuid,
|
|
20877
20950
|
configName: name
|
|
20878
20951
|
}, _this, onShow, onHide);
|
|
20879
20952
|
}
|
|
20880
20953
|
setTimeout(function () {
|
|
20881
|
-
_this.
|
|
20954
|
+
_this.Mdpo.createNewTooltip();
|
|
20882
20955
|
}, ui_config.delay);
|
|
20883
20956
|
});
|
|
20884
|
-
_defineProperty(this, "
|
|
20957
|
+
_defineProperty(this, "NZQq", function (ui_config, duration, uuid, name) {
|
|
20885
20958
|
var terminationConfig = {};
|
|
20886
20959
|
terminationConfig["auto_dismiss"] = duration > 0;
|
|
20887
20960
|
terminationConfig["duration"] = duration;
|
|
@@ -20905,7 +20978,7 @@
|
|
|
20905
20978
|
var _window19, _window19$updateFlag, _window20;
|
|
20906
20979
|
_this.isShowingAction = false;
|
|
20907
20980
|
_this.currentAction = null;
|
|
20908
|
-
_this.
|
|
20981
|
+
_this.Mdpo = null;
|
|
20909
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);
|
|
20910
20983
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
20911
20984
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
@@ -20918,8 +20991,8 @@
|
|
|
20918
20991
|
_this._currentCoachmark.createNewCoachMark();
|
|
20919
20992
|
});
|
|
20920
20993
|
_defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
|
|
20921
|
-
if (_this.
|
|
20922
|
-
_this.
|
|
20994
|
+
if (_this.Mdpo) {
|
|
20995
|
+
_this.Mdpo.updateElementPositionOnScroll(top, left, height, width);
|
|
20923
20996
|
}
|
|
20924
20997
|
});
|
|
20925
20998
|
_defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
|
|
@@ -20949,7 +21022,7 @@
|
|
|
20949
21022
|
window.Apxor.logActionEvent("inapp_dismissed", configId, name);
|
|
20950
21023
|
}
|
|
20951
21024
|
});
|
|
20952
|
-
VideoInAppInstance.
|
|
21025
|
+
VideoInAppInstance.AFBp();
|
|
20953
21026
|
});
|
|
20954
21027
|
/**
|
|
20955
21028
|
* Creates a modal for the given config and displays it.
|