@salla.sa/twilight-components 1.5.12 → 1.5.14

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 (64) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/salla-add-product-button.cjs.entry.js +7 -1
  3. package/dist/cjs/salla-button_24.cjs.entry.js +86 -134
  4. package/dist/cjs/salla-scopes.cjs.entry.js +12 -17
  5. package/dist/cjs/twilight-components.cjs.js +1 -1
  6. package/dist/collection/assets/svg/star3.svg +1 -1
  7. package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +7 -1
  8. package/dist/collection/components/salla-localization-modal/salla-localization-modal.css +4 -0
  9. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +5 -8
  10. package/dist/collection/components/salla-login-modal/salla-login-modal.js +25 -41
  11. package/dist/collection/components/salla-loyalty/salla-loyalty.js +12 -31
  12. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +6 -15
  13. package/dist/collection/components/salla-placeholder/salla-placeholder.js +5 -6
  14. package/dist/collection/components/salla-product-availability/salla-product-availability.js +12 -26
  15. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +13 -28
  16. package/dist/collection/components/salla-scopes/salla-scopes.js +14 -25
  17. package/dist/collection/components/salla-search/salla-search.js +18 -7
  18. package/dist/collection/components/salla-social-share/salla-social-share.js +12 -14
  19. package/dist/collection/components/salla-tabs/salla-tab-content.js +4 -4
  20. package/dist/collection/components/salla-tabs/salla-tab-header.js +3 -3
  21. package/dist/collection/components/salla-tabs/salla-tabs.js +3 -3
  22. package/dist/collection/components/salla-verify/salla-verify.js +4 -3
  23. package/dist/collection/global/app.js +2 -2
  24. package/dist/components/salla-add-product-button.js +7 -1
  25. package/dist/components/salla-localization-modal.js +6 -9
  26. package/dist/components/salla-login-modal.js +20 -36
  27. package/dist/components/salla-loyalty.js +9 -28
  28. package/dist/components/salla-offer-modal.js +6 -15
  29. package/dist/components/salla-placeholder2.js +4 -5
  30. package/dist/components/salla-product-availability2.js +12 -26
  31. package/dist/components/salla-rating-modal.js +7 -22
  32. package/dist/components/salla-scopes.js +13 -24
  33. package/dist/components/salla-search.js +11 -7
  34. package/dist/components/salla-social-share.js +12 -14
  35. package/dist/components/salla-tab-content2.js +2 -2
  36. package/dist/components/salla-tab-header2.js +1 -1
  37. package/dist/components/salla-tabs2.js +3 -3
  38. package/dist/components/salla-verify2.js +4 -3
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/salla-add-product-button.entry.js +7 -1
  41. package/dist/esm/salla-button_24.entry.js +86 -134
  42. package/dist/esm/salla-scopes.entry.js +12 -17
  43. package/dist/esm/twilight-components.js +1 -1
  44. package/dist/twilight-components/p-30b2c5b0.entry.js +4 -0
  45. package/dist/twilight-components/p-5fb32395.entry.js +4 -0
  46. package/dist/twilight-components/{p-b9fe5498.entry.js → p-76cb2574.entry.js} +1 -1
  47. package/dist/twilight-components/twilight-components.esm.js +1 -1
  48. package/dist/types/components/salla-localization-modal/salla-localization-modal.d.ts +1 -2
  49. package/dist/types/components/salla-login-modal/salla-login-modal.d.ts +2 -10
  50. package/dist/types/components/salla-loyalty/salla-loyalty.d.ts +1 -9
  51. package/dist/types/components/salla-offer-modal/salla-offer-modal.d.ts +1 -4
  52. package/dist/types/components/salla-placeholder/salla-placeholder.d.ts +1 -2
  53. package/dist/types/components/salla-product-availability/salla-product-availability.d.ts +1 -8
  54. package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +1 -9
  55. package/dist/types/components/salla-scopes/salla-scopes.d.ts +1 -7
  56. package/dist/types/components/salla-search/salla-search.d.ts +2 -2
  57. package/dist/types/components/salla-tabs/interfaces.d.ts +1 -1
  58. package/dist/types/components/salla-tabs/salla-tab-content.d.ts +2 -2
  59. package/dist/types/components/salla-tabs/salla-tab-header.d.ts +1 -1
  60. package/dist/types/components/salla-verify/salla-verify.d.ts +1 -0
  61. package/dist/types/components.d.ts +2 -2
  62. package/package.json +6 -6
  63. package/dist/twilight-components/p-88f8666d.entry.js +0 -4
  64. package/dist/twilight-components/p-952f6c78.entry.js +0 -4
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import{r as s,h as e,H as l}from"./p-1503d976.js";import{S as t}from"./p-475ef754.js";var i;!function(s){s.DEFAULT="default",s.AVAILABILITY="availability"}(i||(i={}));const a=class{constructor(e){s(this,e),this.translationLoaded=!1,this.mode=i.DEFAULT,this.scopes=[],this.originalScopesList=[],this.isOpenedBefore=salla.storage.get("branch-choosed-before"),this.selection="optional",this.searchDisplayLimit=6,this.getFormTitle=()=>{var s;return(null===(s=this.originalScopesList)||void 0===s?void 0:s.length)<2?"":this.mode===i.DEFAULT?salla.lang.get("blocks.scope.shopping_from_another_branch"):salla.lang.get("blocks.scope.search_for_availability_in_other_branches")},salla.event.on("scopes::open",(({mode:s=null,product_id:e=null})=>{this.open(s,e)})),salla.lang.onLoaded((()=>{this.translationLoaded=!0}))}async close(){var s;return await(null===(s=this.modal)||void 0===s?void 0:s.close())}async open(s=i.DEFAULT,e=null){return this.setScopeValues([]),this.mode=void 0!==s&&[i.AVAILABILITY,i.DEFAULT].includes(s)?s:i.DEFAULT,this.modal.loading(),this.modal.open(),await(s==i.AVAILABILITY?salla.scope.getProductAvailability(e):salla.scope.get()).then((e=>{this.setScopeValues(s==i.AVAILABILITY?e.data:e.data.scopes)})).catch((s=>console.log(s))).finally((()=>{this.modal.stopLoading()}))}async handleSubmit(){let s={id:this.current_scope.id};return this.changeBtn.load(),await salla.scope.change(s).then((()=>{salla.storage.set("branch-choosed-before",!0),salla.storage.set("scope",{type:this.current_scope.type,id:this.current_scope.id});var s=new URL(window.location.href);s.searchParams.set("scope",this.current_scope.id),window.location.href=s.toString(),window.location.replace(s.toString())})).catch((s=>console.log(s))).finally((()=>{this.changeBtn.stop()}))}setScopeValues(s){this.scopes=s,this.originalScopesList=s,1==s.length?(this.current_scope=s[0],this.selected_scope=s[0]):(this.current_scope=s.find((s=>s.selected)),this.selected_scope=s.find((s=>s.selected)))}handleSearchFieldTyping(s){let e=s.target.value.toLocaleLowerCase();this.scopes=e?this.originalScopesList.filter((s=>s.name.toLowerCase().includes(e))):this.originalScopesList}handleScopeSelection(s){this.current_scope=this.scopes.find((e=>e.id==s.target.value))}placeholderContent(){return e("salla-placeholder",{alignment:"center",class:"s-scopes-placeholder"},e("span",{slot:"title"},salla.lang.get("blocks.scope.branch_looking_for_not_found")),e("span",{slot:"description"},salla.lang.get("blocks.scope.our_services_not_available_in_this_branch")))}defaultContent(){return[e("div",{class:"s-scopes-container s-scrollbar"},this.scopes.map((s=>e("div",{class:"s-scopes-input-wrap","data-selection":this.selection},e("input",{id:`${this.selection} + '_scope_' + ${s.id}`,name:"lang",type:"radio",value:s.id,onChange:s=>this.handleScopeSelection(s),class:"s-scopes-input",checked:!!this.current_scope&&this.current_scope.id==s.id}),e("label",{htmlFor:`${this.selection} + '_scope_' + ${s.id}`,class:"s-scopes-label s-scopes-clickable"},e("span",null,s.name)))))),this.footerContent()]}availabilityContent(){return e("div",{class:"s-scopes-container"},this.scopes.map((s=>{var l,t,a,o,h,c;return e("div",{class:"s-scopes-input-wrap","data-selection":this.selection},e("h2",{class:{"s-scopes-label":!0,"s-scopes-clickable":this.mode===i.DEFAULT}},e("span",null,s.name)),e("h2",{style:{color:null===(t=null===(l=s)||void 0===l?void 0:l.availability)||void 0===t?void 0:t.color},class:`s-scopes-${null===(o=null===(a=s)||void 0===a?void 0:a.availability)||void 0===o?void 0:o.key}`},null===(c=null===(h=s)||void 0===h?void 0:h.availability)||void 0===c?void 0:c.label))})))}footerContent(){return e("div",{class:"s-scopes-footer"},e("slot",{name:"footer"},e("salla-button",{ref:s=>this.changeBtn=s,disabled:!this.current_scope,onClick:()=>this.handleSubmit(),class:"s-scopes-submit","loader-position":"center",width:"wide"},salla.lang.get("common.elements.confirm"))))}render(){return e(l,null,e("salla-modal",{ref:s=>this.modal=s,isClosable:!(!this.isOpenedBefore&&"optional"!=this.selection),class:"s-scopes-modal",isLoading:!0,"has-skeleton":!0},e("div",{slot:"loading"},e("div",{class:"s-scopes-skeleton"},e("salla-list-tile",{class:"s-scopes-header"},e("div",{slot:"icon",class:"s-scopes-header-icon"},e("salla-skeleton",{type:"circle"})),e("div",{slot:"title",class:"s-scopes-header-title mb-5"},e("salla-skeleton",{height:"15px",width:"50%"})),e("div",{slot:"subtitle",class:"s-scopes-header-subtitle"},e("salla-skeleton",{height:"10px"}),e("salla-skeleton",{height:"10px",width:"75%"}))),e("div",{class:"s-scopes-skeleton-search"},e("salla-skeleton",{height:"10px",width:"50%"}),e("salla-skeleton",{height:"30px",width:"100%"})),e("div",{class:"s-scopes-skeleton-scopes"},e("salla-skeleton",{height:"10px",width:"30%"}),e("salla-skeleton",{height:"10px",width:"25%"}),e("salla-skeleton",{height:"10px",width:"30%"}),e("salla-skeleton",{height:"10px",width:"25%"}),e("salla-skeleton",{height:"10px",width:"30%"}),e("salla-skeleton",{height:"10px",width:"25%"}),e("salla-skeleton",{height:"10px",width:"30%"}),e("salla-skeleton",{height:"10px",width:"25%"})),e("div",{class:"s-scopes-skeleton-btn"},e("salla-skeleton",{height:"40px",width:"100%"})))),e("salla-list-tile",{class:this.originalScopesList.length?"s-scopes-header block":"s-hidden"},e("div",{slot:"icon",class:"s-scopes-header-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>store-alt</title>\n<path d="M6.667 24h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333zM31.86 10.071l-4-8c-0.227-0.452-0.688-0.737-1.193-0.737h-21.333c-0.505 0-0.967 0.285-1.193 0.737l-4 8c-0.092 0.184-0.14 0.389-0.14 0.596v18.667c0 0.737 0.597 1.333 1.333 1.333h29.333c0.736 0 1.333-0.596 1.333-1.333v-18.667c0-0.207-0.048-0.412-0.14-0.596zM6.157 4h19.685l3.333 6.667h-26.352zM24 28h-5.333v-9.333h5.333zM29.333 28h-2.667v-10.667c0-0.737-0.597-1.333-1.333-1.333h-8c-0.736 0-1.333 0.596-1.333 1.333v10.667h-13.333v-14.667h26.667zM6.667 18.667h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n'}),e("div",{slot:"title",class:"s-scopes-header-title"},salla.lang.get("blocks.scope.you_are_browse_store_from")),e("div",{slot:"subtitle",class:"s-scopes-header-subtitle"},this.selected_scope?this.selected_scope.name:"")),e("div",{class:"s-scopes-wrap"},!!this.originalScopesList.length&&e("h4",{class:"s-scopes-title"},this.getFormTitle()),this.originalScopesList.length>this.searchDisplayLimit?e("div",{class:"s-scopes-search-wrapper"},e("div",{class:"s-scopes-search-icon",innerHTML:t}),e("input",{type:"text",class:"s-scopes-search-input",onInput:s=>this.handleSearchFieldTyping(s),placeholder:salla.lang.get("blocks.scope.searching_for_a_branch")})):"",this.scopes.length<2?this.placeholderContent():this.mode===i.DEFAULT?this.defaultContent():this.availabilityContent())))}componentDidLoad(){this.isOpenedBefore||"mandatory"!=this.selection||this.open()}};a.style=".s-scopes-availability-content{display:flex;justify-content:center;align-items:center}.s-scopes-placeholder{flex:0 0 85%}";export{a as salla_scopes}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,c as s,h as i,H as a,g as l}from"./p-1503d976.js";const o=class{constructor(i){t(this,i),this.success=s(this,"success",7),this.failed=s(this,"failed",7),this.hostAttributes={},this.hasLabel=!1,this.channels=null,this.quantity=0,this.donatingAmount=0,this.productStatus="sale",this.productType="product"}getLabel(){return"sale"===this.productStatus?salla.lang.get("pages.cart.add_to_cart"):"donating"!==this.productType?salla.lang.get("pages.products.out_of_stock"):salla.lang.get("pages.products.donation_exceed")}addProductToCart(t){if("submit"===this.hostAttributes.type)return!1;t.preventDefault();const s=Object.entries({id:this.productId,donating_amount:this.donatingAmount,quantity:this.quantity}).reduce(((t,[s,i])=>i?(t[s]=i,t):t),{});return salla.cart.quickAdd(s).then((t=>this.success.emit(t))).catch((t=>this.failed.emit(t)))}getBtnAttributes(){for(let t=0;t<this.host.attributes.length;t++)["id","class"].includes(this.host.attributes[t].name)||(this.hostAttributes[this.host.attributes[t].name]=this.host.attributes[t].value);return this.hostAttributes}componentWillLoad(){this.hasLabel=!!this.host.innerHTML.replace("\x3c!----\x3e","").trim()}render(){return i(a,null,"out-and-notify"===this.productStatus&&this.channels?i("salla-product-availability",Object.assign({},this.getBtnAttributes()),i("slot",null)):i("salla-button",Object.assign({ref:t=>this.btn=t,onClick:t=>this.addProductToCart(t),type:"button",fill:"sale"===this.productStatus?"solid":"outline",color:"sale"===this.productStatus?"primary":"light","loader-position":"center"},this.getBtnAttributes(),{disabled:"sale"!==this.productStatus}),i("slot",null)))}componentDidRender(){this.hasLabel||salla.event.on("languages::translations.loaded",(()=>this.btn.setText(this.getLabel()||"اضافة للسلة")))}get host(){return l(this)}};o.style=":host{display:block}salla-add-product-button[width=wide]{width:100%}";export{o as salla_add_product_button}
4
+ import{r as t,c as s,h as i,H as a,g as l}from"./p-1503d976.js";const o=class{constructor(i){t(this,i),this.success=s(this,"success",7),this.failed=s(this,"failed",7),this.hostAttributes={},this.hasLabel=!1,this.channels=null,this.quantity=0,this.donatingAmount=0,this.productStatus="sale",this.productType="product"}getLabel(){return"sale"===this.productStatus?salla.lang.get("pages.cart.add_to_cart"):"donating"!==this.productType?salla.lang.get("pages.products.out_of_stock"):salla.lang.get("pages.products.donation_exceed")}addProductToCart(t){if("submit"===this.hostAttributes.type)return!1;t.preventDefault();const s=Object.entries({id:this.productId,donating_amount:this.donatingAmount,quantity:this.quantity}).reduce(((t,[s,i])=>i?(t[s]=i,t):t),{});return salla.cart.quickAdd(s).then((t=>this.success.emit(t))).catch((t=>this.failed.emit(t)))}getBtnAttributes(){for(let t=0;t<this.host.attributes.length;t++)["id","class"].includes(this.host.attributes[t].name)||(this.hostAttributes[this.host.attributes[t].name]=this.host.attributes[t].value);return this.hostAttributes}componentWillLoad(){this.hasLabel=!!this.host.innerHTML.replace("\x3c!----\x3e","").trim()}render(){return i(a,null,"out-and-notify"===this.productStatus&&this.channels?i("salla-product-availability",Object.assign({},this.getBtnAttributes()),i("slot",null)):i("salla-button",Object.assign({ref:t=>this.btn=t,onClick:t=>this.addProductToCart(t),type:"button",fill:"sale"===this.productStatus?"solid":"outline",color:"sale"===this.productStatus?"primary":"light","loader-position":"center"},this.getBtnAttributes(),{disabled:"sale"!==this.productStatus}),i("slot",null)))}componentDidRender(){this.hasLabel||(this.btn.setText(this.getLabel()||"اضافة للسلة"),salla.lang.onLoaded((()=>{this.btn.setText(this.getLabel()||"اضافة للسلة")})))}get host(){return l(this)}};o.style=":host{display:block}salla-add-product-button[width=wide]{width:100%}";export{o as salla_add_product_button}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{p as e,b as a}from"./p-1503d976.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-88f8666d",[[4,"salla-loyalty",{prizePoints:[8,"prize-points"],customerPoints:[2,"customer-points"],prizeTitle:[1,"prize-title"],allowEmail:[4,"allow-email"],allowMobile:[4,"allow-mobile"],requireEmail:[4,"require-email"],guestMessage:[1,"guest-message"],loyaltyProgram:[32],buttonLoading:[32],selectedItem:[32],askConfirmation:[32],is_loggedin:[32],points:[32],exchange_points:[32],are_you_sure_to_exchange:[32],for:[32],cancel:[32],confirm:[32],cart_total_point_summary:[32],cart_point_exchange_now:[32],login_button:[32],open:[64],close:[64],resetExchange:[64],exchangeLoyaltyPoint:[64]}],[4,"salla-product-size-guide",{guides:[32],productId:[32],open:[64],close:[64]}],[4,"salla-login-modal",{isEmailAllowed:[1028,"is-email-allowed"],isMobileAllowed:[1028,"is-mobile-allowed"],isEmailRequired:[1028,"is-email-required"],title:[32],loginTypeTitle:[32],loginText:[32],smsLabel:[32],mobileLabel:[32],emailLabel:[32],enterText:[32],bySMSText:[32],byEmailText:[32],emailErrorMsg:[32],firstNameLabel:[32],lastNameLabel:[32],firstNameErrorMsg:[32],lastNameErrorMsg:[32],open:[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{language:[1537],currency:[1537],languages:[32],currencies:[32],languagesTitle:[32],currenciesTitle:[32],isLoading:[32],open:[64],close:[64],submit:[64]}],[0,"salla-rating-modal",{orderId:[2,"order-id"],order:[32],open:[64],close:[64]}],[0,"salla-offer-modal",{offer:[32],offer_name:[32],offer_message:[32],offer_expires_in:[32],remember_my_choice:[32],add_to_cart:[32],out_of_stock:[32],open:[64],showOffer:[64]}],[0,"salla-search",{inline:[4],oval:[4],height:[2],results:[32],placeholder:[32],noResultsText:[32],loading:[32],typing:[32],debounce:[32],search_term:[32]}],[4,"salla-social-share",{url:[513],urlName:[513,"url-name"],platforms:[16],opened:[32],allPlatforms:[32],platformIcons:[32],open:[64]}],[4,"salla-infinite-scroll",{nextPage:[1,"next-page"],autoload:[1028],container:[1],item:[1],loadMore:[32],noMore:[32],failedToLoad:[32]}],[4,"salla-quantity-input",{quantity:[32],decrease:[64],increase:[64],setValue:[64]}],[0,"salla-product-availability",{channels:[1],productId:[2,"product-id"],isSubscribed:[1028,"is-subscribed"],subTitle:[32],mobileLabel:[32],emailLabel:[32],emailPlaceholder:[32],subscribedMessage:[32],title_:[32],emailErrorMsg:[32],isVisitorSubscribed:[32]}],[4,"salla-verify",{display:[1],type:[1025],autoReload:[4,"auto-reload"],title:[32],resendAfter:[32],isProfileVerify:[32],getCode:[64],open:[64]}],[4,"salla-swiper",{loop:[4],speed:[2],itemPerView:[8,"item-per-view"],spaceBetweenItems:[2,"space-between-items"],currentIndex:[32],isLastSlideItem:[32],isFirstSlideItem:[32]}],[0,"salla-rating-stars",{name:[1],size:[1],value:[2]}],[4,"salla-list-tile",{href:[1],target:[1]}],[4,"salla-tab-content",{name:[1],isSelected:[32],getChild:[64]}],[4,"salla-tab-header",{name:[1],activeClass:[1,"active-class"],height:[8],centered:[4],isSelected:[32],getChild:[64]}],[4,"salla-tabs",{backgroundColor:[1,"background-color"],vertical:[4]},[[0,"onTabSelected","onSelectedTab"]]],[4,"salla-placeholder",{icon:[1],alignment:[1],iconSize:[1,"icon-size"],default_title:[32],default_description:[32]}],[0,"salla-tel-input",{phone:[1025],name:[1],countryCode:[1025,"country-code"],mobileRequired:[32],countryCodeLabel:[32],mobileLabel:[32],tooShort:[32],tooLong:[32],invalidCountryCode:[32],invalidNumber:[32],errorMap:[32],getValues:[64],isValid:[64]}],[0,"salla-skeleton",{type:[1],width:[1],height:[1]}],[4,"salla-modal",{isClosable:[1028,"is-closable"],width:[513],position:[513],visible:[516],hasSkeleton:[516,"has-skeleton"],isLoading:[1540,"is-loading"],subTitleFirst:[4,"sub-title-first"],noPadding:[4,"no-padding"],subTitle:[1,"sub-title"],centered:[4],iconStyle:[1,"icon-style"],modalTitle:[32],open:[64],close:[64],setTitle:[64],loading:[64],stopLoading:[64]}],[4,"salla-button",{shape:[513],color:[513],fill:[513],size:[513],width:[513],loading:[516],disabled:[516],loaderPosition:[1,"loader-position"],href:[1],load:[64],stop:[64],setText:[64],disable:[64],enable:[64]}],[0,"salla-loading",{size:[8],width:[8],color:[1],bgColor:[1,"bg-color"]}]]],["p-952f6c78",[[4,"salla-scopes",{selection:[1],searchDisplayLimit:[2,"search-display-limit"],mode:[32],current_scope:[32],scopes:[32],originalScopesList:[32],branchNotFound:[32],ourServiceIsNotFound:[32],searchForAvailabilityInOtherBranch:[32],shoppingFromAnotherBranch:[32],nowBrowsingFrom:[32],confirmButton:[32],scopeSearchPlaceholder:[32],selected_scope:[32],isOpenedBefore:[32],close:[64],open:[64],handleSubmit:[64]}]]],["p-b9fe5498",[[4,"salla-add-product-button",{channels:[513],quantity:[514],donatingAmount:[514,"donating-amount"],productId:[520,"product-id"],productStatus:[513,"product-status"],productType:[513,"product-type"]}]]],["p-019bb315",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-639d5426",[[0,"salla-installment",{price:[1],language:[1],currency:[1],tamaraIsActive:[32],tabbyIsActive:[32],spotiiIsActive:[32]}]]]],e)));
4
+ import{p as e,b as a}from"./p-1503d976.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-30b2c5b0",[[4,"salla-loyalty",{prizePoints:[8,"prize-points"],customerPoints:[2,"customer-points"],prizeTitle:[1,"prize-title"],allowEmail:[4,"allow-email"],allowMobile:[4,"allow-mobile"],requireEmail:[4,"require-email"],guestMessage:[1,"guest-message"],loyaltyProgram:[32],buttonLoading:[32],selectedItem:[32],askConfirmation:[32],is_loggedin:[32],translationLoaded:[32],open:[64],close:[64],resetExchange:[64],exchangeLoyaltyPoint:[64]}],[4,"salla-product-size-guide",{guides:[32],productId:[32],open:[64],close:[64]}],[4,"salla-login-modal",{isEmailAllowed:[1028,"is-email-allowed"],isMobileAllowed:[1028,"is-mobile-allowed"],isEmailRequired:[1028,"is-email-required"],translationLoaded:[32],title:[32],emailErrorMsg:[32],firstNameErrorMsg:[32],lastNameErrorMsg:[32],open:[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{language:[1537],currency:[1537],translationLoaded:[32],languages:[32],currencies:[32],isLoading:[32],open:[64],close:[64],submit:[64]}],[0,"salla-rating-modal",{orderId:[2,"order-id"],order:[32],translationLoaded:[32],open:[64],close:[64]}],[0,"salla-offer-modal",{offer:[32],offer_name:[32],offer_message:[32],translationLoaded:[32],open:[64],showOffer:[64]}],[0,"salla-search",{inline:[4],oval:[4],height:[2],translationLoaded:[32],results:[32],loading:[32],typing:[32],debounce:[32],search_term:[32]},[[0,"keydown","handleKeyDown"]]],[4,"salla-social-share",{url:[513],urlName:[513,"url-name"],platforms:[16],opened:[32],allPlatforms:[32],platformIcons:[32],open:[64]}],[4,"salla-infinite-scroll",{nextPage:[1,"next-page"],autoload:[1028],container:[1],item:[1],loadMore:[32],noMore:[32],failedToLoad:[32]}],[4,"salla-quantity-input",{quantity:[32],decrease:[64],increase:[64],setValue:[64]}],[0,"salla-product-availability",{channels:[1],productId:[2,"product-id"],isSubscribed:[1028,"is-subscribed"],translationLoaded:[32],title_:[32],isVisitorSubscribed:[32]}],[4,"salla-verify",{display:[1],type:[1025],autoReload:[4,"auto-reload"],translationLoaded:[32],title:[32],resendAfter:[32],isProfileVerify:[32],getCode:[64],open:[64]}],[4,"salla-swiper",{loop:[4],speed:[2],itemPerView:[8,"item-per-view"],spaceBetweenItems:[2,"space-between-items"],currentIndex:[32],isLastSlideItem:[32],isFirstSlideItem:[32]}],[0,"salla-rating-stars",{name:[1],size:[1],value:[2]}],[4,"salla-list-tile",{href:[1],target:[1]}],[4,"salla-tab-content",{name:[1],isSelected:[32],getChild:[64]}],[4,"salla-tab-header",{name:[1],activeClass:[1,"active-class"],height:[8],centered:[4],isSelected:[32],getChild:[64]}],[4,"salla-tabs",{backgroundColor:[1,"background-color"],vertical:[4]},[[0,"tabSelected","onSelectedTab"]]],[4,"salla-placeholder",{icon:[1],alignment:[1],iconSize:[1,"icon-size"],translationLoaded:[32]}],[0,"salla-tel-input",{phone:[1025],name:[1],countryCode:[1025,"country-code"],mobileRequired:[32],countryCodeLabel:[32],mobileLabel:[32],tooShort:[32],tooLong:[32],invalidCountryCode:[32],invalidNumber:[32],errorMap:[32],getValues:[64],isValid:[64]}],[0,"salla-skeleton",{type:[1],width:[1],height:[1]}],[4,"salla-modal",{isClosable:[1028,"is-closable"],width:[513],position:[513],visible:[516],hasSkeleton:[516,"has-skeleton"],isLoading:[1540,"is-loading"],subTitleFirst:[4,"sub-title-first"],noPadding:[4,"no-padding"],subTitle:[1,"sub-title"],centered:[4],iconStyle:[1,"icon-style"],modalTitle:[32],open:[64],close:[64],setTitle:[64],loading:[64],stopLoading:[64]}],[4,"salla-button",{shape:[513],color:[513],fill:[513],size:[513],width:[513],loading:[516],disabled:[516],loaderPosition:[1,"loader-position"],href:[1],load:[64],stop:[64],setText:[64],disable:[64],enable:[64]}],[0,"salla-loading",{size:[8],width:[8],color:[1],bgColor:[1,"bg-color"]}]]],["p-5fb32395",[[4,"salla-scopes",{selection:[1],searchDisplayLimit:[2,"search-display-limit"],translationLoaded:[32],mode:[32],current_scope:[32],scopes:[32],originalScopesList:[32],selected_scope:[32],isOpenedBefore:[32],close:[64],open:[64],handleSubmit:[64]}]]],["p-76cb2574",[[4,"salla-add-product-button",{channels:[513],quantity:[514],donatingAmount:[514,"donating-amount"],productId:[520,"product-id"],productStatus:[513,"product-status"],productType:[513,"product-type"]}]]],["p-019bb315",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-639d5426",[[0,"salla-installment",{price:[1],language:[1],currency:[1],tamaraIsActive:[32],tabbyIsActive:[32],spotiiIsActive:[32]}]]]],e)));
@@ -10,10 +10,9 @@ export declare class SallaLocalizationModal {
10
10
  private btn;
11
11
  private readonly languageSlot;
12
12
  private readonly currencySlot;
13
+ translationLoaded: boolean;
13
14
  languages: Array<any>;
14
15
  currencies: Array<any>;
15
- languagesTitle: string;
16
- currenciesTitle: string;
17
16
  isLoading: boolean;
18
17
  /**
19
18
  * Current language (existing or newly selected)
@@ -42,24 +42,16 @@ export declare class SallaLoginModal {
42
42
  private smsBtn;
43
43
  private emailBtn;
44
44
  private regBtn;
45
+ translationLoaded: boolean;
45
46
  title: string;
46
- loginTypeTitle: string;
47
- loginText: string;
48
- smsLabel: string;
49
- mobileLabel: string;
50
- emailLabel: string;
51
- enterText: string;
52
- bySMSText: string;
53
- byEmailText: string;
54
47
  emailErrorMsg: string;
55
- firstNameLabel: string;
56
- lastNameLabel: string;
57
48
  firstNameErrorMsg: string;
58
49
  lastNameErrorMsg: string;
59
50
  /**
60
51
  * @param {CustomEvent|{details:{case:'new_customer'|'authenticated', redirect_url:string|null}}} event
61
52
  */
62
53
  onVerified(event: any): any;
54
+ updateTranslations(): void;
63
55
  /**
64
56
  * Open login component
65
57
  */
@@ -8,15 +8,7 @@ export declare class SallaLoyalty {
8
8
  selectedItem: Item | undefined;
9
9
  askConfirmation: boolean;
10
10
  is_loggedin: boolean;
11
- points: string;
12
- exchange_points: string;
13
- are_you_sure_to_exchange: string;
14
- for: string;
15
- cancel: string;
16
- confirm: string;
17
- cart_total_point_summary: string;
18
- cart_point_exchange_now: string;
19
- login_button: string;
11
+ translationLoaded: boolean;
20
12
  /**
21
13
  * The exchanged prize point
22
14
  */
@@ -13,10 +13,7 @@ export declare class SallaOfferModal {
13
13
  offer_name: string;
14
14
  offer_message: string;
15
15
  constructor();
16
- offer_expires_in: string;
17
- remember_my_choice: string;
18
- add_to_cart: string;
19
- out_of_stock: string;
16
+ translationLoaded: boolean;
20
17
  /**
21
18
  * Show the available offers for the product
22
19
  * @param product_id
@@ -1,7 +1,6 @@
1
1
  export declare class SallaPlaceholder {
2
2
  constructor();
3
- default_title: string;
4
- default_description: string;
3
+ translationLoaded: boolean;
5
4
  /**
6
5
  * Custom icon to display, defaults to [`sicon-inbox`]
7
6
  */
@@ -5,17 +5,10 @@ export declare class SallaProductAvailability {
5
5
  private channels_;
6
6
  private email;
7
7
  private btn;
8
- private cancelBtn;
9
- private inlineBtn;
10
8
  private mobileInput;
11
9
  host: HTMLElement;
12
- subTitle: string;
13
- mobileLabel: string;
14
- emailLabel: string;
15
- emailPlaceholder: string;
16
- subscribedMessage: string;
10
+ translationLoaded: boolean;
17
11
  title_: string;
18
- emailErrorMsg: string;
19
12
  isVisitorSubscribed: string;
20
13
  /**
21
14
  * Notification channels
@@ -19,15 +19,7 @@ export declare class SallaRatingModal {
19
19
  * The order id, to rate on its products & shipping
20
20
  */
21
21
  orderId: number;
22
- private rate_the_store;
23
- private write_store_rate;
24
- private rate_product_stars;
25
- private write_product_rate;
26
- private rate_shipping;
27
- private write_shipping_rate;
28
- private thanks;
29
- private back;
30
- private next;
22
+ translationLoaded: boolean;
31
23
  host: HTMLElement;
32
24
  /**
33
25
  * Show the rating modal
@@ -3,17 +3,11 @@ export declare class SallaScopees {
3
3
  constructor();
4
4
  private changeBtn;
5
5
  private modal;
6
+ translationLoaded: boolean;
6
7
  mode: ModeType.AVAILABILITY | ModeType.DEFAULT;
7
8
  current_scope: any;
8
9
  scopes: Scope[] | ProductAvailability[];
9
10
  originalScopesList: Scope[] | ProductAvailability[];
10
- branchNotFound: string;
11
- ourServiceIsNotFound: string;
12
- searchForAvailabilityInOtherBranch: string;
13
- shoppingFromAnotherBranch: string;
14
- nowBrowsingFrom: string;
15
- confirmButton: string;
16
- scopeSearchPlaceholder: string;
17
11
  selected_scope: any;
18
12
  isOpenedBefore: string;
19
13
  /**
@@ -12,9 +12,8 @@ export declare class SallaSearch {
12
12
  private noResults;
13
13
  private inputValue;
14
14
  host: HTMLStencilElement;
15
+ translationLoaded: boolean;
15
16
  results: SearchProductsResponse | undefined;
16
- placeholder: string;
17
- noResultsText: string;
18
17
  loading: boolean;
19
18
  typing: boolean;
20
19
  debounce: ReturnType<typeof setTimeout>;
@@ -33,6 +32,7 @@ export declare class SallaSearch {
33
32
  height: number;
34
33
  open(): Promise<void>;
35
34
  onModalClose(): void;
35
+ handleKeyDown(ev: KeyboardEvent): void;
36
36
  private getDefaultProductSlot;
37
37
  private debounceSearch;
38
38
  handelSearch(val: string): void;
@@ -1,5 +1,5 @@
1
1
  export interface ISallaTabData {
2
- select: () => void;
2
+ selected: () => void;
3
3
  unselect: () => void;
4
4
  name: string;
5
5
  }
@@ -9,11 +9,11 @@ export declare class SallaTabContent {
9
9
  * Expose self for the parent.
10
10
  */
11
11
  getChild(): Promise<{
12
- select: any;
12
+ selected: any;
13
13
  unselect: any;
14
14
  name: string;
15
15
  }>;
16
16
  unselect(): void;
17
- select(): void;
17
+ selected(): void;
18
18
  render(): any;
19
19
  }
@@ -26,7 +26,7 @@ export declare class SallaTabHeader {
26
26
  * Expose self for the parent.
27
27
  */
28
28
  getChild(): Promise<{
29
- select: any;
29
+ selected: any;
30
30
  unselect: any;
31
31
  name: string;
32
32
  id: string;
@@ -15,6 +15,7 @@ export declare class SallaVerify {
15
15
  private otpInputs;
16
16
  private data;
17
17
  private initiated;
18
+ translationLoaded: boolean;
18
19
  host: HTMLElement;
19
20
  /**
20
21
  * Should render component without modal
@@ -492,7 +492,7 @@ export namespace Components {
492
492
  /**
493
493
  * Expose self for the parent.
494
494
  */
495
- "getChild": () => Promise<{ select: any; unselect: any; name: string; }>;
495
+ "getChild": () => Promise<{ selected: any; unselect: any; name: string; }>;
496
496
  /**
497
497
  * Set name of the tab content. Mainly used as a key to s ynchronize the content with it's respective header.
498
498
  */
@@ -510,7 +510,7 @@ export namespace Components {
510
510
  /**
511
511
  * Expose self for the parent.
512
512
  */
513
- "getChild": () => Promise<{ select: any; unselect: any; name: string; id: string; }>;
513
+ "getChild": () => Promise<{ selected: any; unselect: any; name: string; id: string; }>;
514
514
  /**
515
515
  * Set the height of the tab bar
516
516
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-components",
3
- "version": "1.5.12",
3
+ "version": "1.5.14",
4
4
  "license": "MIT",
5
5
  "author": "Salla Team <support@salla.dev> (https://salla.dev)",
6
6
  "bugs": {
@@ -48,7 +48,7 @@
48
48
  "ci:build": "stencil build --ci",
49
49
  "ci:test": "stencil test --spec",
50
50
  "prerender": "stencil build --prerender",
51
- "tailwind": "tailwindcss -i ./src/global/app.scss -o ./example/assets/tailwind.css"
51
+ "tailwind": "tailwindcss -i ./src/global/app.scss -o ./assets/tailwind.css"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@compodoc/compodoc": "^1.1.14",
@@ -68,15 +68,15 @@
68
68
  "puppeteer": "^17.1.1",
69
69
  "rollup-plugin-node-polyfills": "^0.2.1",
70
70
  "stencil-inline-svg": "^1.1.0",
71
- "tailwindcss": "^3.0.0",
71
+ "tailwindcss": "^3.1.8",
72
72
  "typescript": "^4.4.3"
73
73
  },
74
74
  "dependencies": {
75
- "@salla.sa/twilight": "^2.6.8",
76
- "@salla.sa/twilight-tailwind-theme": "^1.5.11",
75
+ "@salla.sa/twilight": "^2.7.10",
76
+ "@salla.sa/twilight-tailwind-theme": "^1.5.14",
77
77
  "animejs": "^3.2.1",
78
78
  "intl-tel-input": "^17.0.13",
79
79
  "swiper": "^8.3.1"
80
80
  },
81
- "gitHead": "b508f0ccddd5a22b532cf9d9bb09de133bacd4eb"
81
+ "gitHead": "3d4e89e560f303d9bb3e6808c0b9a82de24b4edf"
82
82
  }