@salla.sa/twilight-components 1.4.2 → 1.4.3
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/cjs/salla-button_23.cjs.entry.js +5 -0
- package/dist/cjs/salla-installment.cjs.entry.js +5 -3
- package/dist/collection/components/salla-installment/salla-installment.js +5 -3
- package/dist/collection/components/salla-social-share/salla-social-share.js +5 -1
- package/dist/components/salla-installment.js +5 -3
- package/dist/components/salla-social-share.js +5 -0
- package/dist/esm/salla-button_23.entry.js +5 -0
- package/dist/esm/salla-installment.entry.js +5 -3
- package/dist/twilight-components/p-4cba804f.entry.js +4 -0
- package/dist/twilight-components/p-66b08e0a.entry.js +4 -0
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/dist/types/components/salla-social-share/salla-social-share.d.ts +1 -0
- package/package.json +1 -1
- package/dist/twilight-components/p-1708802b.entry.js +0 -4
- package/dist/twilight-components/p-97363a29.entry.js +0 -4
|
@@ -3170,6 +3170,11 @@ const SallaSocialShare = class {
|
|
|
3170
3170
|
}))));
|
|
3171
3171
|
}))));
|
|
3172
3172
|
}
|
|
3173
|
+
componentDidLoad() {
|
|
3174
|
+
var script = document.createElement('script');
|
|
3175
|
+
script.setAttribute('src', 'https://static.addtoany.com/menu/page.js');
|
|
3176
|
+
document.head.appendChild(script);
|
|
3177
|
+
}
|
|
3173
3178
|
};
|
|
3174
3179
|
SallaSocialShare.style = sallaSocialShareCss;
|
|
3175
3180
|
|
|
@@ -24,9 +24,11 @@ const SallaInstallment = class {
|
|
|
24
24
|
this.currency = salla.config.get('user.currency_code');
|
|
25
25
|
salla.onReady(() => {
|
|
26
26
|
const installment = salla.config.get('store.settings.installments');
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
if (installment) {
|
|
28
|
+
this.tamaraIsActive = installment.indexOf('tamara_installment') != -1;
|
|
29
|
+
this.tabbyIsActive = installment.indexOf('tabby_installment') != -1;
|
|
30
|
+
this.spotiiIsActive = installment.indexOf('spotii_pay') != -1;
|
|
31
|
+
}
|
|
30
32
|
});
|
|
31
33
|
}
|
|
32
34
|
render() {
|
|
@@ -16,9 +16,11 @@ export class SallaInstallment {
|
|
|
16
16
|
this.currency = salla.config.get('user.currency_code');
|
|
17
17
|
salla.onReady(() => {
|
|
18
18
|
const installment = salla.config.get('store.settings.installments');
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
if (installment) {
|
|
20
|
+
this.tamaraIsActive = installment.indexOf('tamara_installment') != -1;
|
|
21
|
+
this.tabbyIsActive = installment.indexOf('tabby_installment') != -1;
|
|
22
|
+
this.spotiiIsActive = installment.indexOf('spotii_pay') != -1;
|
|
23
|
+
}
|
|
22
24
|
});
|
|
23
25
|
}
|
|
24
26
|
render() {
|
|
@@ -8,7 +8,6 @@ import twitter from '../../assets/svg/twitter.svg';
|
|
|
8
8
|
import copy_link from '../../assets/svg/link.svg';
|
|
9
9
|
import email from '../../assets/svg/mail.svg';
|
|
10
10
|
import whatsapp from '../../assets/svg/whatsapp.svg';
|
|
11
|
-
// require("https://static.addtoany.com/menu/page.js");
|
|
12
11
|
import { Socials } from './interfaces';
|
|
13
12
|
export class SallaSocialShare {
|
|
14
13
|
constructor() {
|
|
@@ -90,6 +89,11 @@ export class SallaSocialShare {
|
|
|
90
89
|
}))));
|
|
91
90
|
}))));
|
|
92
91
|
}
|
|
92
|
+
componentDidLoad() {
|
|
93
|
+
var script = document.createElement('script');
|
|
94
|
+
script.setAttribute('src', 'https://static.addtoany.com/menu/page.js');
|
|
95
|
+
document.head.appendChild(script);
|
|
96
|
+
}
|
|
93
97
|
static get is() { return "salla-social-share"; }
|
|
94
98
|
static get originalStyleUrls() { return {
|
|
95
99
|
"$": ["salla-social-share.scss"]
|
|
@@ -21,9 +21,11 @@ const SallaInstallment$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
21
21
|
this.currency = salla.config.get('user.currency_code');
|
|
22
22
|
salla.onReady(() => {
|
|
23
23
|
const installment = salla.config.get('store.settings.installments');
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
if (installment) {
|
|
25
|
+
this.tamaraIsActive = installment.indexOf('tamara_installment') != -1;
|
|
26
|
+
this.tabbyIsActive = installment.indexOf('tabby_installment') != -1;
|
|
27
|
+
this.spotiiIsActive = installment.indexOf('spotii_pay') != -1;
|
|
28
|
+
}
|
|
27
29
|
});
|
|
28
30
|
}
|
|
29
31
|
render() {
|
|
@@ -1435,6 +1435,11 @@ const SallaSocialShare$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
1435
1435
|
}))));
|
|
1436
1436
|
}))));
|
|
1437
1437
|
}
|
|
1438
|
+
componentDidLoad() {
|
|
1439
|
+
var script = document.createElement('script');
|
|
1440
|
+
script.setAttribute('src', 'https://static.addtoany.com/menu/page.js');
|
|
1441
|
+
document.head.appendChild(script);
|
|
1442
|
+
}
|
|
1438
1443
|
static get style() { return sallaSocialShareCss; }
|
|
1439
1444
|
}, [4, "salla-social-share", {
|
|
1440
1445
|
"url": [513],
|
|
@@ -3166,6 +3166,11 @@ const SallaSocialShare = class {
|
|
|
3166
3166
|
}))));
|
|
3167
3167
|
}))));
|
|
3168
3168
|
}
|
|
3169
|
+
componentDidLoad() {
|
|
3170
|
+
var script = document.createElement('script');
|
|
3171
|
+
script.setAttribute('src', 'https://static.addtoany.com/menu/page.js');
|
|
3172
|
+
document.head.appendChild(script);
|
|
3173
|
+
}
|
|
3169
3174
|
};
|
|
3170
3175
|
SallaSocialShare.style = sallaSocialShareCss;
|
|
3171
3176
|
|
|
@@ -20,9 +20,11 @@ const SallaInstallment = class {
|
|
|
20
20
|
this.currency = salla.config.get('user.currency_code');
|
|
21
21
|
salla.onReady(() => {
|
|
22
22
|
const installment = salla.config.get('store.settings.installments');
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
if (installment) {
|
|
24
|
+
this.tamaraIsActive = installment.indexOf('tamara_installment') != -1;
|
|
25
|
+
this.tabbyIsActive = installment.indexOf('tabby_installment') != -1;
|
|
26
|
+
this.spotiiIsActive = installment.indexOf('spotii_pay') != -1;
|
|
27
|
+
}
|
|
26
28
|
});
|
|
27
29
|
}
|
|
28
30
|
render() {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import{r as t,h as o,H as r}from"./p-1503d976.js";const a=class{constructor(o){t(this,o),this.tabbyBorderRemoved=!1,this.tabbyRemoveBorderTries=0,this.language=salla.config.get("user.language_code"),this.currency=salla.config.get("user.currency_code"),salla.onReady((()=>{const t=salla.config.get("store.settings.installments");t&&(this.tamaraIsActive=-1!=t.indexOf("tamara_installment"),this.tabbyIsActive=-1!=t.indexOf("tabby_installment"),this.spotiiIsActive=-1!=t.indexOf("spotii_pay"))}))}render(){return o(r,null,this.tamaraIsActive?o("div",{class:"tamara-product-widget","data-price":this.price,"data-currency":this.currency,"data-lang":this.language,"data-payment-type":"installment"}):"",this.tabbyIsActive?o("div",{id:"tabbyPromoWrapper"},o("div",{id:"tabbyPromo"})):"",this.spotiiIsActive?o("div",{class:"spotii-wrapper"},o("div",{class:"spotii-promo"})):"")}componentDidLoad(){if(this.tamaraIsActive&&((t=document.createElement("script")).setAttribute("src","https://cdn.tamara.co/widget/product-widget.min.js"),document.head.appendChild(t),t.onload=()=>{window.TamaraProductWidget.init({lang:this.language}),setTimeout((()=>{window.TamaraProductWidget.render()}),300)}),this.tabbyIsActive&&((t=document.createElement("script")).setAttribute("src","https://checkout.tabby.ai/tabby-promo.js"),document.head.appendChild(t),t.onload=()=>{new(0,window.TabbyPromo)({selector:"#tabbyPromo",currency:this.currency,price:this.price,lang:this.language}),document.querySelectorAll(".tabby-promo-snippet__logo").forEach((function(t){t.setAttribute("aria-label","Tabby Logo")}))},this.removeTabbyBorder()),this.spotiiIsActive){let o=salla.money((Number(this.price)/4).toFixed(2)),r=salla.config.get("theme.is_rtl",!0);var t;window.spotiiConfig={targetXPath:[".spotii-wrapper"],renderToPath:[".spotii-promo"],numberOfPayment:4,currency:this.currency,templateLine:"${textOne} ${number} ${textTwo} "+o+"${logo} ${info}",textOne:r?"جزء الدفع على":"Split it into",textTwo:r?"أقساط متساوية بدون تكاليف اضافية بقيمة":"payments of",textThree:"مع",price:this.price},(t=document.createElement("script")).setAttribute("src",salla.url.cdn("js/price-widget-ar-salla.js")),document.head.appendChild(t)}}removeTabbyBorder(){this.tabbyBorderRemoved||this.tabbyRemoveBorderTries>5||(this.tabbyRemoveBorderTries++,setTimeout((()=>{let t=document.querySelector("#tabbyPromo>div>div");t=t?t.shadowRoot.querySelector('div[class^="styles__tabby-promo-snippet--"]'):null,t?(t.style="border: none; margin: 15px 0!important;",this.tabbyBorderRemoved=!0):this.removeTabbyBorder()}),500*this.tabbyRemoveBorderTries))}};a.style="#tabbyPromoWrapper{background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--color-text);font-size:var(--font-sm);line-height:1.25;padding:18px 20px 18px 100px !important;background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px;top:18px;margin:0 !important}.ltr .tamara-product-widget .tamara-logo{right:20px;left:auto}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}";export{a as salla_installment}
|