dialogshift-webchat-sdk 2.11.4 → 2.11.7

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.
@@ -261,8 +261,9 @@ var App = /** @class */ (function () {
261
261
  this.widgetManager.renderUnreadWidget(this.options, this.chatConfig);
262
262
  if (this.options.renderWaButton) {
263
263
  this.widgetManager.renderWhatsappButtonWidget(this.chatConfig);
264
- this.widgetManager.renderWhatsappWindowWidget(this.options);
265
264
  }
265
+ // Always render the window widget because it is possible to configure only the button in the chat window
266
+ this.widgetManager.renderWhatsappWindowWidget(this.options);
266
267
  this.widgetManager.renderIframeBox();
267
268
  this.broadcast.on('ready', function () {
268
269
  _this.ready = true;
@@ -485,6 +486,13 @@ var App = /** @class */ (function () {
485
486
  App.prototype.getConfig = function () {
486
487
  return this.chatConfig;
487
488
  };
489
+ App.prototype.getClientConfig = function () {
490
+ var _a;
491
+ return {
492
+ clientid: this.options.id,
493
+ channel: ((_a = this.options.context) === null || _a === void 0 ? void 0 : _a.channel) ? this.options.context.channel : 'pwa-embed',
494
+ };
495
+ };
488
496
  App.prototype.setInitialElement = function (initialElement) {
489
497
  var mergedInitialElement = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.mergeDeep)(this.options.initialElement, initialElement);
490
498
  this.options.initialElement = mergedInitialElement;
@@ -1249,6 +1257,9 @@ var createFacade = function (instance) {
1249
1257
  getConfig: function () {
1250
1258
  return instance.getConfig();
1251
1259
  },
1260
+ getClientConfig: function () {
1261
+ return instance.getClientConfig();
1262
+ },
1252
1263
  setUnreadCounter: function (amount) {
1253
1264
  instance.getWidgetManager().getUnreadWidget().setCounter(amount);
1254
1265
  },
@@ -1810,7 +1821,9 @@ var WidgetManager = /** @class */ (function () {
1810
1821
  type: 'before:hide',
1811
1822
  callback: function () {
1812
1823
  _this.iframeWidget.show();
1813
- _this.whatsappButtonWidget.toggle(false);
1824
+ if (_this.whatsappButtonWidget) {
1825
+ _this.whatsappButtonWidget.toggle(false);
1826
+ }
1814
1827
  },
1815
1828
  },
1816
1829
  {
@@ -2103,7 +2116,7 @@ var ApiService = /** @class */ (function () {
2103
2116
  url += "context=".concat(encodeURIComponent(JSON.stringify(options.context)));
2104
2117
  }
2105
2118
  url.indexOf('?') === -1 ? (url += '?origin=sdk') : (url += '&origin=sdk');
2106
- url += '&v=2.3.16';
2119
+ url += "&v=".concat("2.11.7");
2107
2120
  if (options.debug) {
2108
2121
  url += "&debug=".concat(options.debug);
2109
2122
  }
@@ -2896,6 +2909,7 @@ var ChatButtonWidget = /** @class */ (function (_super) {
2896
2909
  else {
2897
2910
  boxElem.style.backgroundColor = '';
2898
2911
  boxElem.style.background = "url(".concat(this.iconUrl, ")");
2912
+ boxElem.style.backgroundSize = 'contain';
2899
2913
  }
2900
2914
  this.bindEvents();
2901
2915
  _super.prototype.render.call(this);
@@ -4042,12 +4056,6 @@ var WrapperWidget = /** @class */ (function (_super) {
4042
4056
  /******/ if (cachedModule !== undefined) {
4043
4057
  /******/ return cachedModule.exports;
4044
4058
  /******/ }
4045
- /******/ // Check if module exists (development only)
4046
- /******/ if (__webpack_modules__[moduleId] === undefined) {
4047
- /******/ var e = new Error("Cannot find module '" + moduleId + "'");
4048
- /******/ e.code = 'MODULE_NOT_FOUND';
4049
- /******/ throw e;
4050
- /******/ }
4051
4059
  /******/ // Create a new module (and put it into the cache)
4052
4060
  /******/ var module = __webpack_module_cache__[moduleId] = {
4053
4061
  /******/ // no module.id needed
@@ -4056,6 +4064,12 @@ var WrapperWidget = /** @class */ (function (_super) {
4056
4064
  /******/ };
4057
4065
  /******/
4058
4066
  /******/ // Execute the module function
4067
+ /******/ if (!(moduleId in __webpack_modules__)) {
4068
+ /******/ delete __webpack_module_cache__[moduleId];
4069
+ /******/ var e = new Error("Cannot find module '" + moduleId + "'");
4070
+ /******/ e.code = 'MODULE_NOT_FOUND';
4071
+ /******/ throw e;
4072
+ /******/ }
4059
4073
  /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
4060
4074
  /******/
4061
4075
  /******/ // Return the exports of the module