@salla.sa/twilight-components 2.12.72 → 2.12.73

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.
@@ -291,7 +291,15 @@ const SallaBottomAlert = class {
291
291
  index.h("div", { class: "s-bottom-alert-modal-content-footer" }, this.templateData.price && index.h("div", { class: "s-bottom-alert-modal-price-wrapper" }, index.h("div", null, this.storePrice), index.h("div", { class: "s-bottom-alert-modal-price-wrapper-amount" }, salla.money((_r = this.templateData) === null || _r === void 0 ? void 0 : _r.price))), index.h("salla-button", { color: 'primary', size: "medium", width: 'wide', href: (_s = this.templateData) === null || _s === void 0 ? void 0 : _s.link }, index.h("i", { innerHTML: shoppingBag }), this.buyTheTemplate)) : '')] : ''));
292
292
  }
293
293
  render() {
294
- return (index.h(index.Host, { class: "s-bottom-alert-wrapper" }, index.h("div", { class: "s-bottom-alert-content" }, index.h("div", { class: "s-bottom-alert-icon" }, this.icon ? index.h("i", { class: this.icon }) : index.h("i", { innerHTML: infoIcon })), index.h("div", { class: "s-bottom-alert-message" }, this.message ? (this.message) : typeof this.template == 'object' && Object.keys(this.template).length ? (index.h("span", null, this.getDefaultMessage(), " ", index.h("span", { class: "s-bottom-alert-message-highlight" }, this.template.developer && this.template.developer.name ? this.template.developer.name : this.theDeveloper), " ", index.h("span", { class: "s-bottom-alert-message-splitter" }, "|"), " ", this.storePrice, ":", " ", index.h("span", { class: "s-bottom-alert-message-highlight" }, salla.money(this.template.price)))) : (this.defaultMessage)), this.type !== 'banner' ? (index.h("div", { class: "s-bottom-alert-action" }, index.h("salla-button", { href: this.actionUrl, size: "medium", onClick: () => this.handleAction(), width: "normal" }, this.actionLabel ? this.actionLabel : this.defaultActionLabel))) : null, this.type === 'popup' ? this.popup() : null)));
294
+ const hasTemplate = this.template && typeof this.template === 'object' && Object.keys(this.template).length > 0;
295
+ const developer = hasTemplate && this.template.developer;
296
+ const hasDeveloper = developer !== undefined;
297
+ const developerName = hasDeveloper && developer.name;
298
+ const developerUrl = hasDeveloper && developer.url;
299
+ return (index.h(index.Host, { class: "s-bottom-alert-wrapper" }, index.h("div", { class: "s-bottom-alert-content" }, index.h("div", { class: "s-bottom-alert-icon" }, this.icon ? index.h("i", { class: this.icon }) : index.h("i", { innerHTML: infoIcon })), index.h("div", { class: "s-bottom-alert-message" }, this.message ? (this.message) : hasTemplate ? (index.h("span", null, this.getDefaultMessage(), " ", index.h("a", { href: developerUrl ? developerUrl : "javascript:void(0);", class: {
300
+ "s-bottom-alert-message-highlight": true,
301
+ "s-bottom-alert-message-link": developerUrl,
302
+ }, target: developerUrl ? "_blank" : "", "aria-label": "Developer" }, developerName ? developerName : this.theDeveloper), " ", index.h("span", { class: "s-bottom-alert-message-splitter" }, "|"), " ", this.storePrice, ":", " ", index.h("span", { class: "s-bottom-alert-message-highlight" }, salla.money(this.template.price)))) : (this.defaultMessage)), this.type !== 'banner' && (index.h("div", { class: "s-bottom-alert-action" }, index.h("salla-button", { href: this.actionUrl, size: "medium", onClick: () => this.handleAction(), width: "normal" }, this.actionLabel || this.defaultActionLabel))), this.type === 'popup' && this.popup())));
295
303
  }
296
304
  get host() { return index.getElement(this); }
297
305
  };