@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 +17 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -526,6 +526,8 @@ type OfferModel = {
|
|
|
526
526
|
declare class WidgetProducts extends WidgetBase<WidgetProductsOptions> {
|
|
527
527
|
static DEFAULTS: WidgetProductsOptions;
|
|
528
528
|
static widgetClassName: string;
|
|
529
|
+
private themeName;
|
|
530
|
+
private baseThemeName;
|
|
529
531
|
private readonly captionView;
|
|
530
532
|
private readonly linkTarget;
|
|
531
533
|
private readonly msgNetworkError;
|
package/dist/index.d.ts
CHANGED
|
@@ -526,6 +526,8 @@ type OfferModel = {
|
|
|
526
526
|
declare class WidgetProducts extends WidgetBase<WidgetProductsOptions> {
|
|
527
527
|
static DEFAULTS: WidgetProductsOptions;
|
|
528
528
|
static widgetClassName: string;
|
|
529
|
+
private themeName;
|
|
530
|
+
private baseThemeName;
|
|
529
531
|
private readonly captionView;
|
|
530
532
|
private readonly linkTarget;
|
|
531
533
|
private readonly msgNetworkError;
|
package/dist/index.js
CHANGED
|
@@ -15975,6 +15975,8 @@ class WidgetProducts extends WidgetBase {
|
|
|
15975
15975
|
localData: {},
|
|
15976
15976
|
};
|
|
15977
15977
|
static widgetClassName = "narrative-element-products";
|
|
15978
|
+
themeName;
|
|
15979
|
+
baseThemeName;
|
|
15978
15980
|
captionView;
|
|
15979
15981
|
linkTarget = [];
|
|
15980
15982
|
msgNetworkError;
|
|
@@ -15995,6 +15997,15 @@ class WidgetProducts extends WidgetBase {
|
|
|
15995
15997
|
catch (e) {
|
|
15996
15998
|
console.error(e);
|
|
15997
15999
|
}
|
|
16000
|
+
const themeClasses = Array.from(this.element.classList).filter(item => item.startsWith("theme-") || item.startsWith("base-theme-"));
|
|
16001
|
+
themeClasses.forEach(item => {
|
|
16002
|
+
if (item.startsWith("theme-") && this.themeName == null) {
|
|
16003
|
+
this.themeName = item;
|
|
16004
|
+
}
|
|
16005
|
+
if (item.startsWith("base-theme-") && this.baseThemeName == null) {
|
|
16006
|
+
this.baseThemeName = item;
|
|
16007
|
+
}
|
|
16008
|
+
});
|
|
15998
16009
|
this.isScreenSupportsTouch = isScreenSupportsTouch(this.env);
|
|
15999
16010
|
this.msgNetworkError = getTagData(this.element, "msgNetworkError");
|
|
16000
16011
|
this.msgServiceError = getTagData(this.element, "msgServiceError");
|
|
@@ -16370,6 +16381,12 @@ class WidgetProducts extends WidgetBase {
|
|
|
16370
16381
|
createProductsView(offers, onClose) {
|
|
16371
16382
|
const containerView = document.createElement("div");
|
|
16372
16383
|
containerView.classList.add("ias-products-container-view");
|
|
16384
|
+
if (this.baseThemeName) {
|
|
16385
|
+
containerView.classList.add(this.baseThemeName);
|
|
16386
|
+
}
|
|
16387
|
+
if (this.themeName) {
|
|
16388
|
+
containerView.classList.add(this.themeName);
|
|
16389
|
+
}
|
|
16373
16390
|
containerView.dir = this.layoutDirection;
|
|
16374
16391
|
const backdropView = document.createElement("div");
|
|
16375
16392
|
backdropView.classList.add("ias-products-container-backdrop-view");
|