apxor-rtm-ui 0.5.2 → 0.5.3

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.
@@ -7004,6 +7004,15 @@
7004
7004
  window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
7005
7005
  };
7006
7006
  break;
7007
+ case "never":
7008
+ action = function action() {
7009
+ ActionHandler.cancel(true, "cancel");
7010
+ ActionHandler._isCancelled = true;
7011
+ window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
7012
+ window.Apxor.neverShow(uuid, name, "IN_APP");
7013
+ window.Apxor.logActionEvent("never_show_clicked", uuid, name);
7014
+ };
7015
+ break;
7007
7016
  default:
7008
7017
  action = function action() {
7009
7018
  ActionHandler.cancel(false, "cancel");
@@ -13184,7 +13193,7 @@
13184
13193
  * @description Creates the styles for Marketing message.
13185
13194
  * @returns {string} css styles
13186
13195
  */
13187
- _defineProperty(this, "mhyp", function () {
13196
+ _defineProperty(this, "jwYt", function () {
13188
13197
  if (!_this.enable_marketing) {
13189
13198
  return "";
13190
13199
  }
@@ -13203,7 +13212,7 @@
13203
13212
  * @private
13204
13213
  * @description Sets the marketing content at the end of the Inline
13205
13214
  */
13206
- _defineProperty(this, "wPQd", function () {
13215
+ _defineProperty(this, "cDaP", function () {
13207
13216
  if (_this.enable_marketing) {
13208
13217
  var marketingContainer = document.createElement("div");
13209
13218
  marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
@@ -13765,7 +13774,7 @@
13765
13774
  if (apxor_tooltip_styles) {
13766
13775
  return;
13767
13776
  }
13768
- 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.mhyp(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
13777
+ 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.jwYt(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
13769
13778
  var styleNode = document.createElement("style");
13770
13779
  styleNode.setAttribute("apx-tooltip-styles", "");
13771
13780
  styleNode.innerHTML = styles;
@@ -14575,7 +14584,7 @@
14575
14584
  this._setCloseButton();
14576
14585
 
14577
14586
  //Set the Marketing content
14578
- this.wPQd();
14587
+ this.cDaP();
14579
14588
  }
14580
14589
 
14581
14590
  /**
@@ -15569,7 +15578,7 @@
15569
15578
  * @description Creates the styles for Marketing message.
15570
15579
  * @returns {string} css styles
15571
15580
  */
15572
- _defineProperty(this, "mhyp", function () {
15581
+ _defineProperty(this, "jwYt", function () {
15573
15582
  if (!_this.enable_marketing) {
15574
15583
  return "";
15575
15584
  }
@@ -15615,7 +15624,7 @@
15615
15624
  * @private
15616
15625
  * @description Get the response for Form content in the InApp modal.
15617
15626
  */
15618
- _defineProperty(this, "SdyC", function (form_elements) {
15627
+ _defineProperty(this, "ZNPW", function (form_elements) {
15619
15628
  var obj = {};
15620
15629
  var callback = "";
15621
15630
  form_elements.forEach(function (element) {
@@ -15655,7 +15664,7 @@
15655
15664
  * @private
15656
15665
  * @description Sets the marketing content at the end of the InApp
15657
15666
  */
15658
- _defineProperty(this, "wPQd", function () {
15667
+ _defineProperty(this, "cDaP", function () {
15659
15668
  if (_this.enable_marketing) {
15660
15669
  var marketingContainer = document.createElement("div");
15661
15670
  marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
@@ -15908,7 +15917,7 @@
15908
15917
  }, {
15909
15918
  key: "_setStyles",
15910
15919
  value: function _setStyles() {
15911
- 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.mhyp(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
15920
+ 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.jwYt(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
15912
15921
  var styleNode = document.createElement("style");
15913
15922
  styleNode.setAttribute("id", "apxor-style-" + this.configId);
15914
15923
  styleNode.innerHTML = styles;
@@ -16385,7 +16394,7 @@
16385
16394
  this._setCloseButton();
16386
16395
 
16387
16396
  //Set the Marketing content
16388
- this.wPQd();
16397
+ this.cDaP();
16389
16398
  }
16390
16399
 
16391
16400
  /**
@@ -16590,7 +16599,7 @@
16590
16599
  var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
16591
16600
  form.addEventListener("submit", function (e) {
16592
16601
  e.preventDefault();
16593
- var _this4$generateRespon = _this4.SdyC(_this4.form.elements),
16602
+ var _this4$generateRespon = _this4.ZNPW(_this4.form.elements),
16594
16603
  obj = _this4$generateRespon.obj,
16595
16604
  callback = _this4$generateRespon.callback;
16596
16605
  var evalString = "(obj)=>" + callback + "(obj)";
@@ -16903,7 +16912,7 @@
16903
16912
  * @function showVideoInApp
16904
16913
  * @description Shows the video InApp with the configured mode.
16905
16914
  */
16906
- _defineProperty(this, "wCQJ", function () {
16915
+ _defineProperty(this, "NtGr", function () {
16907
16916
  _this.createPlayer();
16908
16917
  try {
16909
16918
  // In PIP mode, only after the video metadata is loaded, show the PIP.
@@ -16945,7 +16954,7 @@
16945
16954
  };
16946
16955
  } else {
16947
16956
  // As the video player is hidden by default, unhide if the mode is not PIP.
16948
- _this.gcNr();
16957
+ _this.mWGc();
16949
16958
  }
16950
16959
  _this.showCallback();
16951
16960
  } catch (e) {
@@ -16965,7 +16974,7 @@
16965
16974
  * For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
16966
16975
  * For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
16967
16976
  */
16968
- _defineProperty(this, "WBdd", function () {
16977
+ _defineProperty(this, "qqGS", function () {
16969
16978
  var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
16970
16979
  width = _getHeightWidthFromRe.width,
16971
16980
  height = _getHeightWidthFromRe.height;
@@ -16977,7 +16986,7 @@
16977
16986
  * @private
16978
16987
  * @description Removes the video player style element.
16979
16988
  */
16980
- _defineProperty(this, "TdLF", function () {
16989
+ _defineProperty(this, "jQpa", function () {
16981
16990
  var playerStyles = document.getElementById("apx-mpl-styles");
16982
16991
  if (playerStyles) {
16983
16992
  playerStyles.remove();
@@ -16988,7 +16997,7 @@
16988
16997
  * @private
16989
16998
  * @description Attach listeners on the video controls
16990
16999
  */
16991
- _defineProperty(this, "PVWh", function () {
17000
+ _defineProperty(this, "qUtc", function () {
16992
17001
  // Listener for the video end. Display the CTA's when the video ends.
16993
17002
  _this.videoElement.addEventListener("ended", function () {
16994
17003
  var ctaButtons = document.getElementById("apx-cta-btn");
@@ -17099,7 +17108,7 @@
17099
17108
  * @private
17100
17109
  * @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
17101
17110
  */
17102
- _defineProperty(this, "qIst", function () {
17111
+ _defineProperty(this, "ABkZ", function () {
17103
17112
  var _this$terminationConf;
17104
17113
  if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
17105
17114
  // On Exit of the PIP,
@@ -17139,7 +17148,7 @@
17139
17148
  * @private Sets the custom controls on the video player.
17140
17149
  * PIP and close are the custom controls that are created and positions on the video.
17141
17150
  */
17142
- _defineProperty(this, "WykP", function () {
17151
+ _defineProperty(this, "jNYs", function () {
17143
17152
  _this.enable_close_button;
17144
17153
  if (_this.enable_close_button) {
17145
17154
  var closeButton = document.createElement("span");
@@ -17186,21 +17195,21 @@
17186
17195
  * @function hideVideoPlayer
17187
17196
  * @description Sets the visibility of the video player to hidden.
17188
17197
  */
17189
- _defineProperty(this, "RZjL", function () {
17198
+ _defineProperty(this, "npcC", function () {
17190
17199
  _this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
17191
17200
  });
17192
17201
  /**
17193
17202
  * @function unhideVideoPlayer
17194
17203
  * @description Unhides video player.
17195
17204
  */
17196
- _defineProperty(this, "gcNr", function () {
17205
+ _defineProperty(this, "mWGc", function () {
17197
17206
  _this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
17198
17207
  });
17199
17208
  /**
17200
17209
  * @function getVideoElement
17201
17210
  * @returns {HTMLElement} Video ekement
17202
17211
  */
17203
- _defineProperty(this, "RDBC", function () {
17212
+ _defineProperty(this, "PGzp", function () {
17204
17213
  return _this.videoElement;
17205
17214
  });
17206
17215
  this.videoPlayer = null;
@@ -17252,7 +17261,7 @@
17252
17261
  this.videoPlayer.style.backgroundColor = this.bg_color;
17253
17262
 
17254
17263
  // Video has a resolution, not deviating from the resolution set the height and width.
17255
- this.WBdd();
17264
+ this.qqGS();
17256
17265
  //Generate the styles and add them to the document head.
17257
17266
  this._setVideoPlayerStyles();
17258
17267
  //Set the position of the video player with in the 5 possible positions.
@@ -17260,16 +17269,16 @@
17260
17269
  //Create a video element,set the source and add to the container.
17261
17270
  this._setPlayerContent();
17262
17271
  //Set the listeners on the video control buttons.
17263
- this.PVWh();
17272
+ this.qUtc();
17264
17273
  //Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
17265
- this.qIst();
17274
+ this.ABkZ();
17266
17275
  //Set the custom close and PIP controls. Not using the defaults from the html video element.
17267
17276
  //Reason - We want to position them at the top right and left positions.
17268
- this.WykP();
17277
+ this.jNYs();
17269
17278
  //Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
17270
17279
  this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
17271
17280
  //Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
17272
- this.RZjL();
17281
+ this.npcC();
17273
17282
  //If the auto dismiss is enabled, sets the timeout to call the InApp close.
17274
17283
  this._setAutoTerminate();
17275
17284
  document.body.appendChild(this.videoPlayer);
@@ -17383,7 +17392,7 @@
17383
17392
  }
17384
17393
  }
17385
17394
  this.videoPlayer.remove();
17386
- this.TdLF();
17395
+ this.jQpa();
17387
17396
  if (closeButtonName !== "auto_dismiss") {
17388
17397
  window.Apxor.logAppEvent("apx_video_inapp_close_button_clicked", {
17389
17398
  message_name: this.name,
@@ -17451,7 +17460,7 @@
17451
17460
  replayCount: _this3.replayCount
17452
17461
  });
17453
17462
  _this3.videoPlayer.remove();
17454
- _this3.TdLF();
17463
+ _this3.jQpa();
17455
17464
  _this3.hideCallback();
17456
17465
  } catch (e) {
17457
17466
  console.log("Can't close the video player\n".concat(e));
@@ -17539,14 +17548,14 @@
17539
17548
  var RTM = /*#__PURE__*/_createClass(function RTM() {
17540
17549
  var _this = this;
17541
17550
  _classCallCheck(this, RTM);
17542
- _defineProperty(this, "UJGN", {});
17551
+ _defineProperty(this, "Tqou", {});
17543
17552
  _defineProperty(this, "isShowingAction", false);
17544
17553
  _defineProperty(this, "currentAction", null);
17545
- _defineProperty(this, "fZcG", null);
17546
- _defineProperty(this, "version", 52);
17554
+ _defineProperty(this, "bVwF", null);
17555
+ _defineProperty(this, "version", 53);
17547
17556
  _defineProperty(this, "isInitialised", false);
17548
17557
  _defineProperty(this, "_eventsInDynamicText", {});
17549
- _defineProperty(this, "Wyjw", function () {
17558
+ _defineProperty(this, "UDDq", function () {
17550
17559
  _this.isInitialised = true;
17551
17560
  var oldPushState = history.pushState;
17552
17561
  history.pushState = function pushState() {
@@ -17571,7 +17580,7 @@
17571
17580
  });
17572
17581
  _defineProperty(this, "show", function (uiJson, duration, uuid, name) {
17573
17582
  if (!_this.isInitialised) {
17574
- _this.Wyjw();
17583
+ _this.UDDq();
17575
17584
  }
17576
17585
  window.addEventListener("pagehide", function () {
17577
17586
  var _window$Apxor, _window$Apxor$pageUnl;
@@ -17668,7 +17677,7 @@
17668
17677
  var terminationConfig = {};
17669
17678
  terminationConfig["auto_dismiss"] = duration > 0;
17670
17679
  terminationConfig["duration"] = duration;
17671
- _this.fZcG = new InLineTooltip(ui_config, [], [], terminationConfig, {
17680
+ _this.bVwF = new InLineTooltip(ui_config, [], [], terminationConfig, {
17672
17681
  configId: uuid,
17673
17682
  configName: name
17674
17683
  }, _this, function () {
@@ -17689,14 +17698,14 @@
17689
17698
  var _window12, _window12$updateFlag;
17690
17699
  _this.isShowingAction = false;
17691
17700
  _this.currentAction = null;
17692
- _this.fZcG = null;
17701
+ _this.bVwF = null;
17693
17702
  (_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);
17694
17703
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
17695
17704
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
17696
17705
  }
17697
17706
  }, function () {}, false, 0);
17698
17707
  setTimeout(function () {
17699
- _this.fZcG.createNewTooltip();
17708
+ _this.bVwF.createNewTooltip();
17700
17709
  }, ui_config.delay);
17701
17710
  });
17702
17711
  _defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
@@ -17726,7 +17735,7 @@
17726
17735
  window.Apxor.logActionEvent("inapp_dismissed", configId, name);
17727
17736
  }
17728
17737
  });
17729
- VideoInAppInstance.wCQJ();
17738
+ VideoInAppInstance.NtGr();
17730
17739
  });
17731
17740
  /**
17732
17741
  * Creates a modal for the given config and displays it.