@salla.sa/twilight-components 1.0.19 → 1.0.21
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/{esm → twilight-components}/Helper-d07ebbc7.js +0 -0
- package/dist/twilight-components/app-globals-0f993ce5.js +3 -0
- package/dist/twilight-components/css-shim-a64b8820.js +4 -0
- package/dist/twilight-components/dom-d08ba8aa.js +73 -0
- package/dist/twilight-components/index-9c087700.js +3010 -0
- package/dist/twilight-components/index.esm.js +4 -1
- package/dist/{esm → twilight-components}/salla-branches.entry.js +1 -1
- package/dist/twilight-components/salla-button.entry.js +75 -0
- package/dist/{esm → twilight-components}/salla-localization.entry.js +1 -1
- package/dist/{esm/salla-login-38586400.js → twilight-components/salla-login-57b18c2c.js} +1 -1
- package/dist/twilight-components/salla-login.entry.js +3 -0
- package/dist/twilight-components/salla-modal.entry.js +113 -0
- package/dist/twilight-components/salla-offer.entry.js +75 -0
- package/dist/{esm → twilight-components}/salla-product-availability.entry.js +1 -1
- package/dist/twilight-components/salla-rating.entry.js +228 -0
- package/dist/{esm/salla-search-ca856aab.js → twilight-components/salla-search-30fec1e8.js} +1 -1
- package/dist/twilight-components/salla-search.entry.js +3 -0
- package/dist/{esm/salla-button_5.entry.js → twilight-components/salla-tel-input.entry.js} +33 -294
- package/dist/twilight-components/salla-verify.entry.js +114 -0
- package/dist/twilight-components/shadow-css-bc14d9fd.js +389 -0
- package/dist/twilight-components/twilight-components.css +3 -1
- package/dist/twilight-components/twilight-components.esm.js +125 -1
- package/dist/types/components/salla-offer/offer-schema.d.ts +47 -0
- package/dist/types/components/salla-offer/salla-offer.d.ts +13 -48
- package/dist/types/components/salla-rating/order-feedback-response.d.ts +62 -0
- package/dist/types/components/salla-rating/salla-rating.d.ts +25 -23
- package/dist/types/components.d.ts +2 -10
- package/package.json +1 -1
- package/dist/cjs/Helper-fcea994c.js +0 -23
- package/dist/cjs/index-4b8b3ffe.js +0 -1696
- package/dist/cjs/index.cjs.js +0 -13
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/salla-branches.cjs.entry.js +0 -92
- package/dist/cjs/salla-button_5.cjs.entry.js +0 -1686
- package/dist/cjs/salla-localization.cjs.entry.js +0 -82
- package/dist/cjs/salla-login-008cc893.js +0 -125
- package/dist/cjs/salla-offer.cjs.entry.js +0 -50
- package/dist/cjs/salla-product-availability.cjs.entry.js +0 -75
- package/dist/cjs/salla-rating.cjs.entry.js +0 -300
- package/dist/cjs/salla-search-c7aad59a.js +0 -81
- package/dist/cjs/salla-search.cjs.entry.js +0 -11
- package/dist/cjs/twilight-components.cjs.js +0 -19
- package/dist/collection/Helpers/Helper.js +0 -19
- package/dist/collection/collection-manifest.json +0 -22
- package/dist/collection/components/generate-summary.js +0 -35
- package/dist/collection/components/salla-branches/salla-branches.css +0 -12
- package/dist/collection/components/salla-branches/salla-branches.js +0 -233
- package/dist/collection/components/salla-button/salla-button.css +0 -3
- package/dist/collection/components/salla-button/salla-button.js +0 -246
- package/dist/collection/components/salla-localization/salla-localization.js +0 -208
- package/dist/collection/components/salla-login/salla-login.css +0 -3
- package/dist/collection/components/salla-login/salla-login.js +0 -378
- package/dist/collection/components/salla-modal/salla-modal.js +0 -459
- package/dist/collection/components/salla-offer/salla-offer.js +0 -81
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +0 -331
- package/dist/collection/components/salla-rating/salla-rating.css +0 -7
- package/dist/collection/components/salla-rating/salla-rating.js +0 -483
- package/dist/collection/components/salla-search/salla-search.js +0 -132
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +0 -14
- package/dist/collection/components/salla-verify/salla-verify.js +0 -273
- package/dist/collection/index.js +0 -2
- package/dist/collection/interfaces/colors.js +0 -1
- package/dist/collection/interfaces/index.js +0 -2
- package/dist/collection/interfaces/ratio.js +0 -1
- package/dist/collection/plugins/tailwind-theme/generator.js +0 -62
- package/dist/collection/plugins/tailwind-theme/index.js +0 -26
- package/dist/esm/index-092659c7.js +0 -1668
- package/dist/esm/index.js +0 -4
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/salla-offer.entry.js +0 -46
- package/dist/esm/salla-rating.entry.js +0 -296
- package/dist/esm/salla-search.entry.js +0 -3
- package/dist/esm/twilight-components.js +0 -17
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/twilight-components/p-03d0ec44.entry.js +0 -1
- package/dist/twilight-components/p-13a55257.entry.js +0 -1
- package/dist/twilight-components/p-160062c6.js +0 -1
- package/dist/twilight-components/p-47f17d3b.js +0 -1
- package/dist/twilight-components/p-5307c7b5.entry.js +0 -1
- package/dist/twilight-components/p-6a1f43c6.entry.js +0 -1
- package/dist/twilight-components/p-7088e517.entry.js +0 -1
- package/dist/twilight-components/p-924e3c88.js +0 -1
- package/dist/twilight-components/p-e8965b01.js +0 -1
- package/dist/twilight-components/p-ecb1b6cc.entry.js +0 -1
- package/dist/twilight-components/p-f11b401a.entry.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,h as a,g as l}from"./p-e8965b01.js";import{H as i}from"./p-47f17d3b.js";const t=class{constructor(a){var l,t;s(this,a),this.language=salla.config.get("language",{}),this.currency=salla.config.get("currency",{}),this.languagesTitle=salla.lang.get("common.titles.language"),this.currenciesTitle=salla.lang.get("common.titles.currency"),this.ok=salla.lang.get("common.elements.ok"),i.setHost(this.host),salla.event.on("localization::show",(()=>this.show())),this.languageSlot=(null===(l=i.getElement('[slot="language"]'))||void 0===l?void 0:l.innerHTML)||'<label class="s-localization-label" for="lang-{code}"><span>{name}</span><div class="s-localization-flag flag iti__flag iti__{country_code}"></div></label>',this.currencySlot=(null===(t=i.getElement('[slot="currency"]'))||void 0===t?void 0:t.innerHTML)||'<label class="s-localization-label" for="currency-{code}"><span>{name}</span><small class="s-localization-currency">{code}</small></label>',this.languages=Object.values(salla.config.get("languages",{})),this.currencies=Object.values(salla.config.get("currencies",{}))}async show(){return this.modal.show()}async hide(){return this.modal.hide()}onChangeCurrency(s){this.currency=salla.config.get("currencies."+s.target.value)}onChangeLanguage(s){this.language=salla.config.get("languages."+s.target.value)}async submit(){let s;console.log("this.currency.code::::",this.currency,this.currency.code),this.btn.load().then((()=>this.currency.code===salla.config.get("user.currency")||(s=window.location.href)&&salla.currency.api.change(this.currency.code))).then((()=>this.language.code===salla.config.get("user.language")||(s=this.language.url))).then((()=>this.btn.stop())).then((()=>this.hide())).then((()=>s&&(window.location.href=s)))}render(){return a("salla-modal",{id:"salla-localization",class:"hidden",ref:s=>this.modal=s,"modal-width":"xs"},a("div",{slot:"header"},a("slot",{name:"header"})),a("div",{class:"s-localization-inner"},this.languages.length>1?a("div",{class:"s-localization-section"},a("label",{class:"s-localization-title"},this.languagesTitle),a("div",{class:"s-localization-section-inner"},this.languages.length<6?this.languages.map((s=>a("div",{class:"s-localization-item"},a("input",{class:"s-localization-input",type:"radio",checked:this.language.code==s.code,onChange:()=>this.language=s,name:"language",id:"lang-"+s.code.toLowerCase(),value:s.code}),a("div",{id:"language-slot",innerHTML:this.languageSlot.replace(/\{name\}/g,s.name).replace(/\{code\}/g,s.code).replace(/\{country_code\}/g,s.country_code)})))):a("select",{class:"s-branches-select",name:"currency",onChange:s=>this.onChangeLanguage(s)},this.languages.map((s=>a("option",{value:s.code,selected:this.language.code==s.code},s.name)))))):"",this.currencies.length>1?a("div",{class:"s-localization-section"},a("label",{class:"s-localization-title"},this.currenciesTitle),a("div",{class:"s-localization-section-inner"},this.currencies.length<6?this.currencies.map((s=>a("div",{class:"s-localization-item"},a("input",{class:"s-localization-input",type:"radio",name:"currency",checked:this.currency.code==s.code,onChange:()=>this.currency=s,id:"currency-"+s.code,value:s.code}),a("div",{id:"currency-slot",innerHTML:this.currencySlot.replace(/\{name\}/g,s.name).replace(/\{code\}/g,s.code).replace(/\{country_code\}/g,s.country_code)})))):a("select",{class:"s-branches-select",name:"currency",onChange:s=>this.onChangeCurrency(s)},this.currencies.map((s=>a("option",{value:s.code,selected:this.currency.code==s.code},s.name)))))):""),a("slot",{name:"footer"},a("salla-button",{wide:!0,ref:s=>this.btn=s,onClick:()=>this.submit()},this.ok)))}componentDidRender(){this.host.querySelectorAll("#currency-slot").forEach((s=>s.replaceWith(s.firstChild))),this.host.querySelectorAll("#language-slot").forEach((s=>s.replaceWith(s.firstChild)))}get host(){return l(this)}};export{t as salla_localization}
|