@inappstory/slide-api 0.0.26 → 0.0.27

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/index.cjs CHANGED
@@ -15977,6 +15977,8 @@ class WidgetProducts extends WidgetBase {
15977
15977
  localData: {},
15978
15978
  };
15979
15979
  static widgetClassName = "narrative-element-products";
15980
+ themeName;
15981
+ baseThemeName;
15980
15982
  captionView;
15981
15983
  linkTarget = [];
15982
15984
  msgNetworkError;
@@ -15997,6 +15999,15 @@ class WidgetProducts extends WidgetBase {
15997
15999
  catch (e) {
15998
16000
  console.error(e);
15999
16001
  }
16002
+ const themeClasses = Array.from(this.element.classList).filter(item => item.startsWith("theme-") || item.startsWith("base-theme-"));
16003
+ themeClasses.forEach(item => {
16004
+ if (item.startsWith("theme-") && this.themeName == null) {
16005
+ this.themeName = item;
16006
+ }
16007
+ if (item.startsWith("base-theme-") && this.baseThemeName == null) {
16008
+ this.baseThemeName = item;
16009
+ }
16010
+ });
16000
16011
  this.isScreenSupportsTouch = isScreenSupportsTouch(this.env);
16001
16012
  this.msgNetworkError = getTagData(this.element, "msgNetworkError");
16002
16013
  this.msgServiceError = getTagData(this.element, "msgServiceError");
@@ -16372,6 +16383,12 @@ class WidgetProducts extends WidgetBase {
16372
16383
  createProductsView(offers, onClose) {
16373
16384
  const containerView = document.createElement("div");
16374
16385
  containerView.classList.add("ias-products-container-view");
16386
+ if (this.baseThemeName) {
16387
+ containerView.classList.add(this.baseThemeName);
16388
+ }
16389
+ if (this.themeName) {
16390
+ containerView.classList.add(this.themeName);
16391
+ }
16375
16392
  containerView.dir = this.layoutDirection;
16376
16393
  const backdropView = document.createElement("div");
16377
16394
  backdropView.classList.add("ias-products-container-backdrop-view");