@salla.sa/twilight-components 2.13.49 → 2.13.50

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.
Files changed (26) hide show
  1. package/dist/cjs/app-globals-0efa4587.js.map +1 -1
  2. package/dist/cjs/salla-add-product-button_47.cjs.entry.js +1 -1
  3. package/dist/cjs/salla-add-product-button_47.cjs.entry.js.map +1 -1
  4. package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +1 -1
  5. package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js.map +1 -1
  6. package/dist/components/index.js.map +1 -1
  7. package/dist/components/salla-bottom-alert.js +1 -1
  8. package/dist/components/salla-bottom-alert.js.map +1 -1
  9. package/dist/components/salla-quick-buy2.js.map +1 -1
  10. package/dist/esm/app-globals-32c0b133.js.map +1 -1
  11. package/dist/esm/salla-add-product-button_47.entry.js +1 -1
  12. package/dist/esm/salla-add-product-button_47.entry.js.map +1 -1
  13. package/dist/esm-es5/app-globals-32c0b133.js.map +1 -1
  14. package/dist/esm-es5/salla-add-product-button_47.entry.js +1 -1
  15. package/dist/esm-es5/salla-add-product-button_47.entry.js.map +1 -1
  16. package/dist/twilight/{p-8b339f33.entry.js → p-429870cc.entry.js} +2 -2
  17. package/dist/twilight/p-429870cc.entry.js.map +1 -0
  18. package/dist/twilight/p-44a3fce3.system.js.map +1 -1
  19. package/dist/twilight/p-93a162ca.js.map +1 -1
  20. package/dist/twilight/{p-1abe5188.system.entry.js → p-b0585915.system.entry.js} +2 -2
  21. package/dist/twilight/p-b0585915.system.entry.js.map +1 -0
  22. package/dist/twilight/p-b9c7fc02.system.js +1 -1
  23. package/dist/twilight/twilight.esm.js +1 -1
  24. package/package.json +5 -5
  25. package/dist/twilight/p-1abe5188.system.entry.js.map +0 -1
  26. package/dist/twilight/p-8b339f33.entry.js.map +0 -1
@@ -90,7 +90,7 @@ export class SallaBottomAlert {
90
90
  const hasTemplate = this.template && typeof this.template === 'object' && Object.keys(this.template).length > 0;
91
91
  const developer = hasTemplate && this.template.developer;
92
92
  const hasDeveloper = developer !== undefined;
93
- const developerName = hasDeveloper && developer.name;
93
+ const developerName = hasDeveloper && (developer === null || developer === void 0 ? void 0 : developer.name);
94
94
  const developerUrl = null; //hasDeveloper && developer.url;
95
95
  return (h(Host, { class: "s-bottom-alert-wrapper" }, h("div", { class: "s-bottom-alert-content" }, h("div", { class: "s-bottom-alert-icon" }, this.icon ? h("i", { class: this.icon }) : h("i", { innerHTML: infoIcon })), h("div", { class: "s-bottom-alert-message" }, this.message ? (this.message) : hasTemplate ? (h("span", null, this.getDefaultMessage(), " ", h("a", { href: developerUrl ? developerUrl : "#", class: {
96
96
  "s-bottom-alert-message-highlight": true,
@@ -1 +1 @@
1
- {"version":3,"file":"salla-bottom-alert.js","sourceRoot":"","sources":["../../../src/components/salla-bottom-alert/salla-bottom-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AACjD,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAK7D,MAAM,OAAO,gBAAgB;EAC3B;mBAsB2B,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC;oBAC9B,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC;mBAC/B,KAAK;wBACJ,EAAE;0BACG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,kDAAkD,CAAC;8BAC9D,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,2BAA2B,CAAC;yBAChD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gCAAgC,CAAC;wBACjD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,+BAA+B,CAAC;sBACjD,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,6BAA6B,EAAE,YAAY,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import { Component, Host, h, Element, Prop, State } from '@stencil/core';\nimport infoIcon from '../../assets/svg/info.svg';\nimport shoppingBag from '../../assets/svg/shopping-bag2.svg';\n@Component({\n tag: 'salla-bottom-alert',\n styleUrl: 'salla-bottom-alert.scss',\n})\nexport class SallaBottomAlert {\n constructor() {\n salla.lang.onLoaded(() => {\n this.defaultMessage = salla.lang.get('common.elements.experimental_and_available_store');\n this.defaultActionLabel = salla.lang.get('common.elements.know_more');\n this.storeFeatures = salla.lang.get('common.elements.store_features');\n this.storeDetails = salla.lang.get('common.elements.store_details');\n this.templateInformation = salla.lang.get('common.elements.template_information');\n this.buyTheTemplate = salla.lang.get('common.elements.buy_the_template');\n salla.helpers.setNested(salla.lang.messages['ar.trans'], 'common.elements.store_price', 'سعر المتجر');\n salla.helpers.setNested(salla.lang.messages['en.trans'], 'common.elements.store_price', 'Store Price');\n salla.helpers.setNested(salla.lang.messages['ar.trans'], 'common.elements.the_developer', 'المطور');\n salla.helpers.setNested(salla.lang.messages['en.trans'], 'common.elements.the_developer', 'the developer');\n setTimeout(() => {\n this.storePrice = salla.lang.get('common.elements.store_price');\n this.theDeveloper = salla.lang.get('common.elements.the_developer');\n }, 100);\n });\n }\n\n private modal: HTMLSallaModalElement;\n @Element() host: HTMLElement;\n\n @State() storeId: string = salla.config.get('store.id')\n @State() template: any = salla.config.get('store.template')\n @State() loading: boolean = false\n @State() templateData: any = {}\n @State() defaultMessage: string = salla.lang.get('common.elements.experimental_and_available_store');\n @State() defaultActionLabel: string = salla.lang.get('common.elements.know_more');\n @State() storeFeatures: string = salla.lang.get('common.elements.store_features');\n @State() storeDetails: string = salla.lang.get('common.elements.store_details');\n @State() storePrice: string = salla.lang.getWithDefault('common.elements.store_price', 'سعر المتجر');\n @State() theDeveloper: string = salla.lang.get('common.elements.the_developer');\n @State() templateInformation: string = salla.lang.get('common.elements.template_information');\n @State() buyTheTemplate: string = salla.lang.get('common.elements.buy_the_template');\n @State() isRtl: boolean = salla.config.get('theme.is_rtl', true);\n /**\n * Alert Type\n * */\n @Prop({ reflect: true }) type: 'link' | 'popup' | 'banner' = 'popup';\n\n /**\n * Alert Icon class from salla icons library - ex: sicon-user\n * */\n @Prop({ reflect: true }) icon: string;\n\n /**\n * Alert Message\n * */\n @Prop({ reflect: true }) message: string;\n\n /**\n * Button url - used when type is link\n * */\n @Prop({ reflect: true }) actionUrl: string;\n\n /**\n * Button label - used when type is link and popup\n * */\n @Prop({ reflect: true }) actionLabel: string;\n\n private open() {\n return this.modal.open()\n .then(() => this.handleTemplateRequest())\n }\n private getDefaultMessage(){\n return this.isRtl ? this.defaultMessage.substring(0, this.defaultMessage.lastIndexOf(\" \")) : this.defaultMessage.split(\" \").slice(0, -2).join(\" \");\n }\n private handleTemplateRequest() {\n if (Object.keys(this.templateData).length) {\n return;\n }\n this.modal.loading()\n return salla.api.request(`/store/template`, {}, 'get', { 'Store-Identifier': this.storeId })\n .then((res) => {\n this.modal.setTitle(this.templateInformation)\n this.templateData = res.data\n this.modal.stopLoading()\n })\n .catch(() => {\n this.modal.close()\n })\n }\n\n private handleAction() {\n if (this.type === 'link') {\n window.location.href = this.actionUrl;\n }\n\n if (this.type === 'popup') {\n this.open()\n }\n }\n\n popup() {\n return (\n <salla-modal class=\"s-bottom-alert-modal\" ref={modal => this.modal = modal} no-padding>\n {Object.keys(this.templateData).length ?\n [<div class=\"s-bottom-alert-modal-inner s-scrollbar\">\n {Array.isArray(this.templateData?.screenshots) && this.templateData?.screenshots?.length ? <div class=\"s-bottom-alert-modal-cover\">\n <img src={this.templateData?.screenshots[0]} alt=\"\" />\n </div> : ''}\n <div class={{\"s-bottom-alert-modal-content\": true, \"s-bottom-alert-modal-content-extra-padding\":this.templateData.price}} >\n {this.templateData?.description ?\n [<div class=\"s-bottom-alert-modal-content-title\">\n {this.storeDetails}\n </div>,\n <div class=\"s-bottom-alert-modal-content-description\" innerHTML={this.templateData?.description}></div>,\n <hr />\n ] : ''}\n {this.templateData?.features ? [<div class=\"s-bottom-alert-modal-content-title\">\n {this.storeFeatures}\n </div>,\n <div class=\"s-bottom-alert-modal-content-features\" innerHTML={this.templateData?.features}></div>\n ] : ''}\n {Array.isArray(this.templateData?.screenshots) && this.templateData?.screenshots?.length > 1 ?\n <salla-slider id='template-screenshots' type='carousel' class=\"s-bottom-alert-modal-content-screenshots\">\n <div slot='items'>\n {this.templateData?.screenshots.map((screenshot) => {\n return <div class=\"s-bottom-alert-modal-content-screenshot\">\n <img src={screenshot} alt=\"\" />\n </div>\n })}\n </div>\n </salla-slider>\n : ''}\n\n {this.templateData?.extra_info ?\n <div class=\"s-bottom-alert-modal-content-description\" innerHTML={this.templateData?.description}></div>\n : ''}\n </div>\n {this.templateData?.link ?\n <div class=\"s-bottom-alert-modal-content-footer\">\n {this.templateData.price && <div class=\"s-bottom-alert-modal-price-wrapper\">\n <div>\n {this.storePrice}\n </div>\n <div class=\"s-bottom-alert-modal-price-wrapper-amount\">\n {salla.money(this.templateData?.price)}\n </div>\n </div>}\n <salla-button\n color='primary'\n size=\"medium\"\n width='wide'\n href={this.templateData?.link}\n >\n <i innerHTML={shoppingBag}></i>\n {this.buyTheTemplate}\n </salla-button>\n </div> : ''\n }\n </div>] : ''\n }\n\n </salla-modal>\n )\n }\n render() {\n const hasTemplate = this.template && typeof this.template === 'object' && Object.keys(this.template).length > 0;\n const developer = hasTemplate && this.template.developer;\n const hasDeveloper = developer !== undefined;\n const developerName = hasDeveloper && developer.name;\n const developerUrl = null;//hasDeveloper && developer.url;\n \n return (\n <Host class=\"s-bottom-alert-wrapper\">\n <div class=\"s-bottom-alert-content\">\n <div class=\"s-bottom-alert-icon\">\n {this.icon ? <i class={this.icon}></i> : <i innerHTML={infoIcon}></i>}\n </div>\n <div class=\"s-bottom-alert-message\">\n {this.message ? (\n this.message\n ) : hasTemplate ? (\n <span>\n {this.getDefaultMessage()}{\" \"}\n <a\n href={developerUrl ? developerUrl : \"#\"}\n class={{\n \"s-bottom-alert-message-highlight\": true,\n \"s-bottom-alert-message-link\": developerUrl,\n }}\n target={developerUrl ? \"_blank\" : \"\"}\n aria-label=\"Developer\"\n >\n {developerName ? developerName : this.theDeveloper}\n </a>{\" \"}\n <span class=\"s-bottom-alert-message-splitter\">|</span> {this.storePrice}:{\" \"}\n <span class=\"s-bottom-alert-message-highlight\">\n {salla.money(this.template.price)}\n </span>\n </span>\n ) : (\n this.defaultMessage\n )}\n </div>\n {this.type !== 'banner' && (\n <div class=\"s-bottom-alert-action\">\n <salla-button\n href={this.actionUrl}\n size=\"medium\"\n onClick={() => this.handleAction()}\n width=\"normal\"\n >\n {this.actionLabel || this.defaultActionLabel}\n </salla-button>\n </div>\n )}\n {this.type === 'popup' && this.popup()}\n </div>\n </Host>\n );\n }\n \n\n}\n"]}
1
+ {"version":3,"file":"salla-bottom-alert.js","sourceRoot":"","sources":["../../../src/components/salla-bottom-alert/salla-bottom-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AACjD,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAK7D,MAAM,OAAO,gBAAgB;EAC3B;mBAsB2B,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC;oBAC9B,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC;mBAC/B,KAAK;wBACJ,EAAE;0BACG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,kDAAkD,CAAC;8BAC9D,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,2BAA2B,CAAC;yBAChD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gCAAgC,CAAC;wBACjD,KAAK,CAAC,IA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A,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,KAAK,EAAE,CAClC,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import { Component, Host, h, Element, Prop, State } from '@stencil/core';\nimport infoIcon from '../../assets/svg/info.svg';\nimport shoppingBag from '../../assets/svg/shopping-bag2.svg';\n@Component({\n tag: 'salla-bottom-alert',\n styleUrl: 'salla-bottom-alert.scss',\n})\nexport class SallaBottomAlert {\n constructor() {\n salla.lang.onLoaded(() => {\n this.defaultMessage = salla.lang.get('common.elements.experimental_and_available_store');\n this.defaultActionLabel = salla.lang.get('common.elements.know_more');\n this.storeFeatures = salla.lang.get('common.elements.store_features');\n this.storeDetails = salla.lang.get('common.elements.store_details');\n this.templateInformation = salla.lang.get('common.elements.template_information');\n this.buyTheTemplate = salla.lang.get('common.elements.buy_the_template');\n salla.helpers.setNested(salla.lang.messages['ar.trans'], 'common.elements.store_price', 'سعر المتجر');\n salla.helpers.setNested(salla.lang.messages['en.trans'], 'common.elements.store_price', 'Store Price');\n salla.helpers.setNested(salla.lang.messages['ar.trans'], 'common.elements.the_developer', 'المطور');\n salla.helpers.setNested(salla.lang.messages['en.trans'], 'common.elements.the_developer', 'the developer');\n setTimeout(() => {\n this.storePrice = salla.lang.get('common.elements.store_price');\n this.theDeveloper = salla.lang.get('common.elements.the_developer');\n }, 100);\n });\n }\n\n private modal: HTMLSallaModalElement;\n @Element() host: HTMLElement;\n\n @State() storeId: string = salla.config.get('store.id')\n @State() template: any = salla.config.get('store.template')\n @State() loading: boolean = false\n @State() templateData: any = {}\n @State() defaultMessage: string = salla.lang.get('common.elements.experimental_and_available_store');\n @State() defaultActionLabel: string = salla.lang.get('common.elements.know_more');\n @State() storeFeatures: string = salla.lang.get('common.elements.store_features');\n @State() storeDetails: string = salla.lang.get('common.elements.store_details');\n @State() storePrice: string = salla.lang.getWithDefault('common.elements.store_price', 'سعر المتجر');\n @State() theDeveloper: string = salla.lang.get('common.elements.the_developer');\n @State() templateInformation: string = salla.lang.get('common.elements.template_information');\n @State() buyTheTemplate: string = salla.lang.get('common.elements.buy_the_template');\n @State() isRtl: boolean = salla.config.get('theme.is_rtl', true);\n /**\n * Alert Type\n * */\n @Prop({ reflect: true }) type: 'link' | 'popup' | 'banner' = 'popup';\n\n /**\n * Alert Icon class from salla icons library - ex: sicon-user\n * */\n @Prop({ reflect: true }) icon: string;\n\n /**\n * Alert Message\n * */\n @Prop({ reflect: true }) message: string;\n\n /**\n * Button url - used when type is link\n * */\n @Prop({ reflect: true }) actionUrl: string;\n\n /**\n * Button label - used when type is link and popup\n * */\n @Prop({ reflect: true }) actionLabel: string;\n\n private open() {\n return this.modal.open()\n .then(() => this.handleTemplateRequest())\n }\n private getDefaultMessage(){\n return this.isRtl ? this.defaultMessage.substring(0, this.defaultMessage.lastIndexOf(\" \")) : this.defaultMessage.split(\" \").slice(0, -2).join(\" \");\n }\n private handleTemplateRequest() {\n if (Object.keys(this.templateData).length) {\n return;\n }\n this.modal.loading()\n return salla.api.request(`/store/template`, {}, 'get', { 'Store-Identifier': this.storeId })\n .then((res) => {\n this.modal.setTitle(this.templateInformation)\n this.templateData = res.data\n this.modal.stopLoading()\n })\n .catch(() => {\n this.modal.close()\n })\n }\n\n private handleAction() {\n if (this.type === 'link') {\n window.location.href = this.actionUrl;\n }\n\n if (this.type === 'popup') {\n this.open()\n }\n }\n\n popup() {\n return (\n <salla-modal class=\"s-bottom-alert-modal\" ref={modal => this.modal = modal} no-padding>\n {Object.keys(this.templateData).length ?\n [<div class=\"s-bottom-alert-modal-inner s-scrollbar\">\n {Array.isArray(this.templateData?.screenshots) && this.templateData?.screenshots?.length ? <div class=\"s-bottom-alert-modal-cover\">\n <img src={this.templateData?.screenshots[0]} alt=\"\" />\n </div> : ''}\n <div class={{\"s-bottom-alert-modal-content\": true, \"s-bottom-alert-modal-content-extra-padding\":this.templateData.price}} >\n {this.templateData?.description ?\n [<div class=\"s-bottom-alert-modal-content-title\">\n {this.storeDetails}\n </div>,\n <div class=\"s-bottom-alert-modal-content-description\" innerHTML={this.templateData?.description}></div>,\n <hr />\n ] : ''}\n {this.templateData?.features ? [<div class=\"s-bottom-alert-modal-content-title\">\n {this.storeFeatures}\n </div>,\n <div class=\"s-bottom-alert-modal-content-features\" innerHTML={this.templateData?.features}></div>\n ] : ''}\n {Array.isArray(this.templateData?.screenshots) && this.templateData?.screenshots?.length > 1 ?\n <salla-slider id='template-screenshots' type='carousel' class=\"s-bottom-alert-modal-content-screenshots\">\n <div slot='items'>\n {this.templateData?.screenshots.map((screenshot) => {\n return <div class=\"s-bottom-alert-modal-content-screenshot\">\n <img src={screenshot} alt=\"\" />\n </div>\n })}\n </div>\n </salla-slider>\n : ''}\n\n {this.templateData?.extra_info ?\n <div class=\"s-bottom-alert-modal-content-description\" innerHTML={this.templateData?.description}></div>\n : ''}\n </div>\n {this.templateData?.link ?\n <div class=\"s-bottom-alert-modal-content-footer\">\n {this.templateData.price && <div class=\"s-bottom-alert-modal-price-wrapper\">\n <div>\n {this.storePrice}\n </div>\n <div class=\"s-bottom-alert-modal-price-wrapper-amount\">\n {salla.money(this.templateData?.price)}\n </div>\n </div>}\n <salla-button\n color='primary'\n size=\"medium\"\n width='wide'\n href={this.templateData?.link}\n >\n <i innerHTML={shoppingBag}></i>\n {this.buyTheTemplate}\n </salla-button>\n </div> : ''\n }\n </div>] : ''\n }\n\n </salla-modal>\n )\n }\n render() {\n const hasTemplate = this.template && typeof this.template === 'object' && Object.keys(this.template).length > 0;\n const developer = hasTemplate && this.template.developer;\n const hasDeveloper = developer !== undefined;\n const developerName = hasDeveloper && developer?.name;\n const developerUrl = null;//hasDeveloper && developer.url;\n \n return (\n <Host class=\"s-bottom-alert-wrapper\">\n <div class=\"s-bottom-alert-content\">\n <div class=\"s-bottom-alert-icon\">\n {this.icon ? <i class={this.icon}></i> : <i innerHTML={infoIcon}></i>}\n </div>\n <div class=\"s-bottom-alert-message\">\n {this.message ? (\n this.message\n ) : hasTemplate ? (\n <span>\n {this.getDefaultMessage()}{\" \"}\n <a\n href={developerUrl ? developerUrl : \"#\"}\n class={{\n \"s-bottom-alert-message-highlight\": true,\n \"s-bottom-alert-message-link\": developerUrl,\n }}\n target={developerUrl ? \"_blank\" : \"\"}\n aria-label=\"Developer\"\n >\n {developerName ? developerName : this.theDeveloper}\n </a>{\" \"}\n <span class=\"s-bottom-alert-message-splitter\">|</span> {this.storePrice}:{\" \"}\n <span class=\"s-bottom-alert-message-highlight\">\n {salla.money(this.template.price)}\n </span>\n </span>\n ) : (\n this.defaultMessage\n )}\n </div>\n {this.type !== 'banner' && (\n <div class=\"s-bottom-alert-action\">\n <salla-button\n href={this.actionUrl}\n size=\"medium\"\n onClick={() => this.handleAction()}\n width=\"normal\"\n >\n {this.actionLabel || this.defaultActionLabel}\n </salla-button>\n </div>\n )}\n {this.type === 'popup' && this.popup()}\n </div>\n </Host>\n );\n }\n \n\n}\n"]}