@salla.sa/twilight-components 2.11.25 → 2.11.27
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/camera-058ddeeb.js +13 -0
- package/dist/cjs/index-1d2b3370.js +10 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{salla-button_37.cjs.entry.js → salla-button_36.cjs.entry.js} +66 -348
- package/dist/cjs/salla-conditional-fields.cjs.entry.js +99 -0
- package/dist/cjs/salla-product-options.cjs.entry.js +257 -0
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-product-options/salla-product-options.js +11 -4
- package/dist/collection/components/salla-progress-bar/salla-progress-bar.css +34 -0
- package/dist/collection/components/salla-progress-bar/salla-progress-bar.js +196 -0
- package/dist/collection/components/salla-slider/salla-slider.js +13 -10
- package/dist/collection/global/app-dev.js +5 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/salla-product-options.js +32 -21
- package/dist/components/salla-progress-bar.d.ts +11 -0
- package/dist/components/salla-progress-bar.js +9 -0
- package/dist/components/salla-progress-bar2.js +81 -0
- package/dist/components/salla-slider2.js +11 -8
- package/dist/esm/camera-647ab50f.js +11 -0
- package/dist/esm/index-f1d446ac.js +10 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{salla-button_37.entry.js → salla-button_36.entry.js} +65 -346
- package/dist/esm/salla-conditional-fields.entry.js +95 -0
- package/dist/esm/salla-product-options.entry.js +253 -0
- package/dist/esm/twilight.js +1 -1
- package/dist/esm-es5/camera-647ab50f.js +4 -0
- package/dist/esm-es5/index-f1d446ac.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-button_36.entry.js +53 -0
- package/dist/esm-es5/salla-conditional-fields.entry.js +4 -0
- package/dist/esm-es5/salla-product-options.entry.js +4 -0
- package/dist/esm-es5/twilight.js +1 -1
- package/dist/twilight/p-1b87ab66.system.js +1 -1
- package/dist/twilight/p-485b62a3.entry.js +36 -0
- package/dist/twilight/p-56830c52.system.entry.js +4 -0
- package/dist/twilight/p-643ea74e.entry.js +4 -0
- package/dist/twilight/p-79264f27.system.entry.js +53 -0
- package/dist/twilight/p-9b7452c1.entry.js +4 -0
- package/dist/twilight/p-c328c14e.system.js +4 -0
- package/dist/twilight/p-ccd78636.js +4 -0
- package/dist/twilight/p-dbe8db94.system.entry.js +4 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-product-options/interfaces.d.ts +9 -0
- package/dist/types/components/salla-progress-bar/salla-progress-bar.d.ts +35 -0
- package/dist/types/components/salla-slider/salla-slider.d.ts +1 -1
- package/dist/types/components.d.ts +72 -2
- package/package.json +4 -4
- package/dist/esm-es5/salla-button_37.entry.js +0 -53
- package/dist/twilight/p-11da4b05.entry.js +0 -36
- package/dist/twilight/p-cd5fda9d.system.entry.js +0 -53
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import{r as t,c as e,h as i,H as o,g as s}from"./p-7dc66c07.js";import{C as a}from"./p-ccd78636.js";var n,l;!function(t){t.COLOR="color",t.DATE="date",t.DATETIME="datetime",t.DONATION="donation",t.IMAGE="image",t.MULTIPLE_OPTIONS="multiple-options",t.NUMBER="number",t.SINGLE_OPTION="single-option",t.SPLITTER="splitter",t.TEXT="text",t.TEXTAREA="textarea",t.THUMBNAIL="thumbnail",t.TIME="time",t.RADIO="radio",t.CHECKBOX="checkbox",t.MAP="map",t.FILE="file",t.COLOR_PICKER="color_picker"}(n||(n={})),function(t){t.Sar="SAR"}(l||(l={}));const r=class{constructor(i){if(t(this,i),this.colorSelected=e(this,"colorSelected",7),this.thumbnailSelected=e(this,"thumbnailSelected",7),this.singleSelectOptionSelected=e(this,"singleSelectOptionSelected",7),this.donationMoneyEntered=e(this,"donationMoneyEntered",7),this.textOptionEntered=e(this,"textOptionEntered",7),this.textareaOptionEntered=e(this,"textareaOptionEntered",7),this.numberOptionEntered=e(this,"numberOptionEntered",7),this.itemsSelected=e(this,"itemsSelected",7),this.dateTimeSelected=e(this,"dateTimeSelected",7),this.dateSelected=e(this,"dateSelected",7),this.timeSelected=e(this,"timeSelected",7),this.colorPicked=e(this,"colorPicked",7),this.locationSelected=e(this,"locationSelected",7),this.fileTypes={pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",word:"application/msword",exl:"application/vnd.ms-excel",txt:"text/plain"},this.outOfStockText=salla.lang.get("pages.products.out_of_stock"),this.donationAmount=salla.lang.get("pages.products.donation_amount"),this.productId=salla.config.get("page.id"),salla.lang.onLoaded((()=>{this.outOfStockText=salla.lang.get("pages.products.out_of_stock"),this.donationAmount=salla.lang.get("pages.products.donation_amount")})),this.options)try{return void(this.optionsData=JSON.parse(this.options))}catch(t){salla.log("Bad json passed via options prop")}Array.isArray(this.optionsData)&&(salla.log("Options is not an array[] ---\x3e ",this.optionsData),this.optionsData=[]),this.productId&&!salla.url.is_page("cart")&&salla.api.product.getDetails(this.productId,["options"]).then((t=>{this.optionsData=t.data.options}))}handleMultiSelectFieldInput(){var t=this.multipleOptionDom.querySelectorAll('input[type="checkbox"]:checked'),e=[];for(let i of t)e.push(i.value);this.itemsSelected.emit(e)}getLatLng(t,e){return t?t.split(",")["lat"==e?0:1]:""}getDisplayForType(t){return this[`${t.type}Option`]?this[`${t.type}Option`](t):t.type===n.COLOR_PICKER?this.colorPickerOption(t):t.type===n.MULTIPLE_OPTIONS?this.multipleOptions(t):t.type===n.SINGLE_OPTION?this.singleOption(t):(salla.log(`Couldn't find options type(${t.type})😢`),"")}getOptionShownWhen(t){return t.visibility_condition?{"data-show-when":`options[${t.visibility_condition.option}] ${t.visibility_condition.operator} ${t.visibility_condition.value}`}:{}}componentWillLoad(){return salla.api.cart.getCurrentCartId()}render(){var t;if(0!=(null===(t=this.optionsData)||void 0===t?void 0:t.length))return i(o,{class:"s-product-options-wrapper"},i("salla-conditional-fields",null,this.optionsData.map((t=>i("div",Object.assign({class:"s-product-options-option-container"+(t.visibility_condition?" hidden":""),"data-option-id":t.id},this.getOptionShownWhen(t)),"splitter"==t.name?this.splitterOption():i("div",{class:"s-product-options-option"},i("label",{htmlFor:"options["+t.id+"]",class:"s-product-options-option-label"},i("b",null,t.name,t.required&&i("span",null," * ")," "),i("small",null,t.placeholder)),i("div",{class:"s-product-options-option-content"},this.getDisplayForType(t))))))))}donationOption(t,e){return i("div",{class:"s-product-options-donation-wrapper"},t.donation?i("div",{class:"s-product-options-donation-progress"},i("salla-progress-bar",{donation:t.donation})):"",i("input",{type:"text",id:"donating-amount",name:"donating_amount",class:"s-form-control",value:t.value,placeholder:t.placeholder,onInput:t=>salla.helpers.inputDigitsOnly(t.target),onBlur:t=>this.donationMoneyEntered.emit(t)}),i("span",{class:"s-product-options-donation-amount-currency"},salla.config.currency(salla.config.get("user.currency_code")).symbol))}selectThumbnail(t,e){this.thumbnailSelected.emit(t)}fileUploader(t,e=null){return i("salla-file-upload",Object.assign({},e||{},{"payload-name":"file",value:t.value,"instant-upload":!0,name:`options[${t.id}]`,height:"120px",url:salla.cart.api.getUploadImageEndpoint(),"form-data":{cart_item_id:this.productId,product_id:this.productId},class:{"s-product-options-image-input":!0,required:t.required}}),i("div",{class:"s-product-options-filepond-placeholder"},i("span",{class:"s-product-options-filepond-placeholder-icon",innerHTML:e.accept&&e.accept.split(",").every((t=>t.includes("image")))?a:'\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>file-upload</title>\n<path d="M21.333 24c0.341 0 0.683-0.131 0.943-0.391 0.521-0.521 0.521-1.364 0-1.885l-5.333-5.333c-0.123-0.123-0.271-0.22-0.433-0.288-0.327-0.135-0.693-0.135-1.019 0-0.163 0.068-0.311 0.165-0.433 0.288l-5.333 5.333c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l3.057-3.057v10.115c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-10.115l3.057 3.057c0.26 0.26 0.601 0.391 0.943 0.391zM28.943 9.724l-9.333-9.333c-0.249-0.251-0.589-0.391-0.943-0.391h-12c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h4c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-4c-0.735 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.599-1.333 1.333-1.333h11.448l8.552 8.552v16.781c0 0.735-0.599 1.333-1.333 1.333h-4c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h4c2.205 0 4-1.795 4-4v-17.333c0-0.353-0.14-0.693-0.391-0.943z"></path>\n</svg>\n'}),i("p",{class:"s-product-options-filepond-placeholder-text"},salla.lang.get("common.uploader.drag_and_drop")),i("span",{class:"filepond--label-action"},salla.lang.get("common.uploader.browse"))))}imageOption(t){return this.fileUploader(t,{accept:"image/png,image/jpeg,image/jpg,image/gif"})}fileOption(t){let e=t.details.map((t=>this.fileTypes[t.name])).filter(Boolean);return(null==e?void 0:e.length)?this.fileUploader(t,{accept:e.join(",")}):"File types not selected."}numberOption(t){return i("input",{type:"text",value:t.value,class:"s-form-control",required:t.required,name:`options[${t.id}]`,placeholder:t.placeholder,onBlur:t=>this.numberOptionEntered.emit(t),onInput:t=>salla.helpers.inputDigitsOnly(t.target)})}splitterOption(){return i("div",{class:"s-product-options-splitter"})}textOption(t){return i("div",{class:"s-product-options-text"},i("input",{type:"text",value:t.value,class:"s-form-control",required:t.required,name:`options[${t.id}]`,placeholder:t.placeholder,onInput:t=>this.textOptionEntered.emit(t)}))}textareaOption(t){return i("div",{class:"s-product-options-textarea"},i("div",{class:"mt-1"},i("textarea",{rows:4,value:t.value,class:"s-form-control",required:t.required,id:`options[${t.id}]`,name:`options[${t.id}]`,placeholder:t.placeholder,onInput:t=>this.textareaOptionEntered.emit(t)})))}mapOption(t){return i("salla-map",{zoom:15,lat:this.getLatLng(t.value,"lat"),lng:this.getLatLng(t.value,"lng"),name:`options[${t.id}]`,searchable:!0,required:t.required,onSelected:t=>this.locationSelected.emit(t)})}colorPickerOption(t){return i("salla-color-picker",{onSubmitted:t=>this.colorPicked.emit(t),name:`options[${t.id}]`,required:t.required,color:t.value||"#5dd5c4"})}timeOption(t){return i("salla-datetime-picker",{noCalendar:!0,enableTime:!0,dateFormat:"h:i K",value:t.value,placeholder:t.name,required:t.required,name:`options[${t.id}]`,class:"s-product-options-time-element",onPicked:t=>this.timeSelected.emit(t)})}dateOption(t){return i("div",{class:"s-product-options-date-element"},i("salla-datetime-picker",{value:t.value,placeholder:t.name,required:t.required,name:`options[${t.id}]`,onPicked:t=>this.dateSelected.emit(t)}))}datetimeOption(t){return i("div",{class:"s-product-options-datetime-element"},i("salla-datetime-picker",{enableTime:!0,value:t.value,dateFormat:"Y-m-d G:i:K",placeholder:t.name,required:t.required,name:`options[${t.id}]`,maxDate:t.to_date_time,minDate:t.from_date_time,onPicked:t=>this.dateTimeSelected.emit(t)}))}getOptionDetailName(t,e=!0){return t.name+(e&&t.is_out?` - ${this.outOfStockText}`:"")+(t.additional_price?` (${salla.money(t.additional_price)})`:"")}singleOption(t){return i("div",null,i("select",{name:`options[${t.id}]`,required:t.required,class:"s-form-control"},i("option",{value:""},t.placeholder),null==t?void 0:t.details.map((t=>i("option",{value:t.id,disabled:t.is_out,selected:t.is_selected,onChange:t=>this.singleSelectOptionSelected.emit(t)},this.getOptionDetailName(t))))))}multipleOptions(t){return i("div",{ref:t=>this.multipleOptionDom=t,class:{"s-product-options-multiple-options-wrapper":!0,required:t.required}},null==t?void 0:t.details.map((e=>i("div",null,i("input",{type:"checkbox",value:e.id,disabled:e.is_out,checked:e.is_selected,name:`options[${t.id}][]`,id:`field-${t.id}-${e.id}`,onChange:()=>this.handleMultiSelectFieldInput(),"aria-describedby":`options[${t.id}]-description`}),i("label",{htmlFor:`field-${t.id}-${e.id}`},this.getOptionDetailName(e))))))}colorOption(t){return i("fieldset",{class:"s-product-options-colors-wrapper"},null==t?void 0:t.details.map((e=>i("div",null,i("input",{type:"radio",value:e.id,disabled:e.is_out,required:t.required,checked:e.is_selected,name:`options[${t.id}]`,id:`color-${this.productId}-${t.id}-${e.id}`,onChange:t=>this.colorSelected.emit(t)}),i("label",{htmlFor:`color-${this.productId}-${t.id}-${e.id}`},i("span",{style:{"background-color":e.color}}),i("p",null,this.getOptionDetailName(e)))))))}thumbnailOption(t){return i("div",{class:"s-product-options-thumbnails-wrapper"},t.details.map((e=>i("div",null,i("input",{type:"radio",value:e.id,"data-itemid":e.id,disabled:e.is_out,required:t.required,checked:e.is_selected,name:`options[${t.id}]`,"data-img-id":e.option_value,id:`option_${this.productId}-${t.id}_${e.id}`,onChange:t=>this.selectThumbnail(t,e.option_value)}),i("label",{htmlFor:`option_${this.productId}-${t.id}_${e.id}`,"data-img-id":e.option_value,class:"go-to-slide"},i("img",{"data-src":e.image,src:e.image,title:e.name,alt:e.name}),i("span",{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>check</title>\n<path d="M27.521 6.976c-0.569-0.472-1.407-0.393-1.879 0.171l-12.567 15.080-7.003-4.668c-0.615-0.411-1.441-0.244-1.849 0.369-0.409 0.612-0.244 1.441 0.369 1.849l8 5.333c0.227 0.149 0.484 0.223 0.739 0.223 0.384 0 0.763-0.165 1.027-0.48l13.333-16c0.471-0.565 0.393-1.407-0.171-1.877z"></path>\n</svg>\n',class:"s-product-options-thumbnails-icon"})),i("p",null,this.getOptionDetailName(e,!1)," "),e.is_out?[i("small",{class:"s-product-options-thumbnails-stock-badge"},this.outOfStockText),i("div",{class:"s-product-options-thumbnails-badge-overlay"})]:""))))}get host(){return s(this)}};r.style="";export{r as salla_product_options}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
System.register([],(function(c){"use strict";return{execute:function(){var t=c("C",'\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>camera</title>\n<path d="M16 10.667c-4.044 0-7.333 3.289-7.333 7.333s3.289 7.333 7.333 7.333 7.333-3.289 7.333-7.333-3.289-7.333-7.333-7.333zM16 22.667c-2.573 0-4.667-2.093-4.667-4.667s2.093-4.667 4.667-4.667 4.667 2.093 4.667 4.667-2.093 4.667-4.667 4.667zM28 5.333h-3.287l-2.271-3.407c-0.248-0.371-0.664-0.593-1.109-0.593h-10.667c-0.445 0-0.861 0.223-1.109 0.593l-2.271 3.407h-3.287c-2.205 0-4 1.795-4 4v17.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-17.333c0-2.205-1.795-4-4-4zM29.333 26.667c0 0.735-0.599 1.333-1.333 1.333h-24c-0.735 0-1.333-0.599-1.333-1.333v-17.333c0-0.735 0.599-1.333 1.333-1.333h4c0.445 0 0.861-0.223 1.109-0.593l2.272-3.407h9.239l2.271 3.407c0.248 0.371 0.664 0.593 1.109 0.593h4c0.735 0 1.333 0.599 1.333 1.333zM25.333 10.66c-0.736 0-1.333 0.604-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.597 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327z"></path>\n</svg>\n')}}}));
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
const c='\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>camera</title>\n<path d="M16 10.667c-4.044 0-7.333 3.289-7.333 7.333s3.289 7.333 7.333 7.333 7.333-3.289 7.333-7.333-3.289-7.333-7.333-7.333zM16 22.667c-2.573 0-4.667-2.093-4.667-4.667s2.093-4.667 4.667-4.667 4.667 2.093 4.667 4.667-2.093 4.667-4.667 4.667zM28 5.333h-3.287l-2.271-3.407c-0.248-0.371-0.664-0.593-1.109-0.593h-10.667c-0.445 0-0.861 0.223-1.109 0.593l-2.271 3.407h-3.287c-2.205 0-4 1.795-4 4v17.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-17.333c0-2.205-1.795-4-4-4zM29.333 26.667c0 0.735-0.599 1.333-1.333 1.333h-24c-0.735 0-1.333-0.599-1.333-1.333v-17.333c0-0.735 0.599-1.333 1.333-1.333h4c0.445 0 0.861-0.223 1.109-0.593l2.272-3.407h9.239l2.271 3.407c0.248 0.371 0.664 0.593 1.109 0.593h4c0.735 0 1.333 0.599 1.333 1.333zM25.333 10.66c-0.736 0-1.333 0.604-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.597 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327z"></path>\n</svg>\n';export{c as C}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
System.register(["./p-d9130020.system.js","./p-c328c14e.system.js"],(function(t){"use strict";var e,o,i,n,a,r;return{setters:[function(t){e=t.r;o=t.c;i=t.h;n=t.H;a=t.g},function(t){r=t.C}],execute:function(){var l;(function(t){t["COLOR"]="color";t["DATE"]="date";t["DATETIME"]="datetime";t["DONATION"]="donation";t["IMAGE"]="image";t["MULTIPLE_OPTIONS"]="multiple-options";t["NUMBER"]="number";t["SINGLE_OPTION"]="single-option";t["SPLITTER"]="splitter";t["TEXT"]="text";t["TEXTAREA"]="textarea";t["THUMBNAIL"]="thumbnail";t["TIME"]="time";t["RADIO"]="radio";t["CHECKBOX"]="checkbox";t["MAP"]="map";t["FILE"]="file";t["COLOR_PICKER"]="color_picker"})(l||(l={}));var c;(function(t){t["Sar"]="SAR"})(c||(c={}));var s='\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>check</title>\n<path d="M27.521 6.976c-0.569-0.472-1.407-0.393-1.879 0.171l-12.567 15.080-7.003-4.668c-0.615-0.411-1.441-0.244-1.849 0.369-0.409 0.612-0.244 1.441 0.369 1.849l8 5.333c0.227 0.149 0.484 0.223 0.739 0.223 0.384 0 0.763-0.165 1.027-0.48l13.333-16c0.471-0.565 0.393-1.407-0.171-1.877z"></path>\n</svg>\n';var p='\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>file-upload</title>\n<path d="M21.333 24c0.341 0 0.683-0.131 0.943-0.391 0.521-0.521 0.521-1.364 0-1.885l-5.333-5.333c-0.123-0.123-0.271-0.22-0.433-0.288-0.327-0.135-0.693-0.135-1.019 0-0.163 0.068-0.311 0.165-0.433 0.288l-5.333 5.333c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l3.057-3.057v10.115c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-10.115l3.057 3.057c0.26 0.26 0.601 0.391 0.943 0.391zM28.943 9.724l-9.333-9.333c-0.249-0.251-0.589-0.391-0.943-0.391h-12c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h4c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-4c-0.735 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.599-1.333 1.333-1.333h11.448l8.552 8.552v16.781c0 0.735-0.599 1.333-1.333 1.333h-4c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h4c2.205 0 4-1.795 4-4v-17.333c0-0.353-0.14-0.693-0.391-0.943z"></path>\n</svg>\n';var d="";var u=t("salla_product_options",function(){function t(t){var i=this;e(this,t);this.colorSelected=o(this,"colorSelected",7);this.thumbnailSelected=o(this,"thumbnailSelected",7);this.singleSelectOptionSelected=o(this,"singleSelectOptionSelected",7);this.donationMoneyEntered=o(this,"donationMoneyEntered",7);this.textOptionEntered=o(this,"textOptionEntered",7);this.textareaOptionEntered=o(this,"textareaOptionEntered",7);this.numberOptionEntered=o(this,"numberOptionEntered",7);this.itemsSelected=o(this,"itemsSelected",7);this.dateTimeSelected=o(this,"dateTimeSelected",7);this.dateSelected=o(this,"dateSelected",7);this.timeSelected=o(this,"timeSelected",7);this.colorPicked=o(this,"colorPicked",7);this.locationSelected=o(this,"locationSelected",7);this.fileTypes={pdf:"application/pdf",png:"image/png",jpg:"image/jpeg",word:"application/msword",exl:"application/vnd.ms-excel",txt:"text/plain"};this.outOfStockText=salla.lang.get("pages.products.out_of_stock");this.donationAmount=salla.lang.get("pages.products.donation_amount");this.productId=salla.config.get("page.id");salla.lang.onLoaded((function(){i.outOfStockText=salla.lang.get("pages.products.out_of_stock");i.donationAmount=salla.lang.get("pages.products.donation_amount")}));if(this.options){try{this.optionsData=JSON.parse(this.options);return}catch(t){salla.log("Bad json passed via options prop")}}if(Array.isArray(this.optionsData)){salla.log("Options is not an array[] ---\x3e ",this.optionsData);this.optionsData=[]}if(this.productId&&!salla.url.is_page("cart")){salla.api.product.getDetails(this.productId,["options"]).then((function(t){i.optionsData=t.data.options}))}}t.prototype.handleMultiSelectFieldInput=function(){var t=this.multipleOptionDom.querySelectorAll('input[type="checkbox"]:checked');var e=[];for(var o=0,i=t;o<i.length;o++){var n=i[o];e.push(n.value)}this.itemsSelected.emit(e)};t.prototype.getLatLng=function(t,e){return t?t.split(",")[e=="lat"?0:1]:""};t.prototype.getDisplayForType=function(t){if(this["".concat(t.type,"Option")]){return this["".concat(t.type,"Option")](t)}if(t.type===l.COLOR_PICKER){return this.colorPickerOption(t)}if(t.type===l.MULTIPLE_OPTIONS){return this.multipleOptions(t)}if(t.type===l.SINGLE_OPTION){return this.singleOption(t)}salla.log("Couldn't find options type(".concat(t.type,")😢"));return""};t.prototype.getOptionShownWhen=function(t){return t.visibility_condition?{"data-show-when":"options[".concat(t.visibility_condition.option,"] ").concat(t.visibility_condition.operator," ").concat(t.visibility_condition.value)}:{}};t.prototype.componentWillLoad=function(){return salla.api.cart.getCurrentCartId()};t.prototype.render=function(){var t=this;var e;if(((e=this.optionsData)===null||e===void 0?void 0:e.length)==0){return}return i(n,{class:"s-product-options-wrapper"},i("salla-conditional-fields",null,this.optionsData.map((function(e){return i("div",Object.assign({class:"s-product-options-option-container".concat(e.visibility_condition?" hidden":""),"data-option-id":e.id},t.getOptionShownWhen(e)),e.name=="splitter"?t.splitterOption():i("div",{class:"s-product-options-option"},i("label",{htmlFor:"options["+e.id+"]",class:"s-product-options-option-label"},i("b",null,e.name,e.required&&i("span",null," * ")," "),i("small",null,e.placeholder)),i("div",{class:"s-product-options-option-content"},t.getDisplayForType(e))))}))))};t.prototype.donationOption=function(t,e){var o=this;return i("div",{class:"s-product-options-donation-wrapper"},t.donation?i("div",{class:"s-product-options-donation-progress"},i("salla-progress-bar",{donation:t.donation})):"",i("input",{type:"text",id:"donating-amount",name:"donating_amount",class:"s-form-control",value:t.value,placeholder:t.placeholder,onInput:function(t){return salla.helpers.inputDigitsOnly(t.target)},onBlur:function(t){return o.donationMoneyEntered.emit(t)}}),i("span",{class:"s-product-options-donation-amount-currency"},salla.config.currency(salla.config.get("user.currency_code")).symbol))};t.prototype.selectThumbnail=function(t,e){this.thumbnailSelected.emit(t)};t.prototype.fileUploader=function(t,e){if(e===void 0){e=null}return i("salla-file-upload",Object.assign({},e||{},{"payload-name":"file",value:t.value,"instant-upload":true,name:"options[".concat(t.id,"]"),height:"120px",url:salla.cart.api.getUploadImageEndpoint(),"form-data":{cart_item_id:this.productId,product_id:this.productId},class:{"s-product-options-image-input":true,required:t.required}}),i("div",{class:"s-product-options-filepond-placeholder"},i("span",{class:"s-product-options-filepond-placeholder-icon",innerHTML:e.accept&&e.accept.split(",").every((function(t){return t.includes("image")}))?r:p}),i("p",{class:"s-product-options-filepond-placeholder-text"},salla.lang.get("common.uploader.drag_and_drop")),i("span",{class:"filepond--label-action"},salla.lang.get("common.uploader.browse"))))};t.prototype.imageOption=function(t){return this.fileUploader(t,{accept:"image/png,image/jpeg,image/jpg,image/gif"})};t.prototype.fileOption=function(t){var e=this;var o=t.details.map((function(t){return e.fileTypes[t.name]})).filter(Boolean);return(o===null||o===void 0?void 0:o.length)?this.fileUploader(t,{accept:o.join(",")}):"File types not selected."};t.prototype.numberOption=function(t){var e=this;return i("input",{type:"text",value:t.value,class:"s-form-control",required:t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onBlur:function(t){return e.numberOptionEntered.emit(t)},onInput:function(t){return salla.helpers.inputDigitsOnly(t.target)}})};t.prototype.splitterOption=function(){return i("div",{class:"s-product-options-splitter"})};t.prototype.textOption=function(t){var e=this;return i("div",{class:"s-product-options-text"},i("input",{type:"text",value:t.value,class:"s-form-control",required:t.required,name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInput:function(t){return e.textOptionEntered.emit(t)}}))};t.prototype.textareaOption=function(t){var e=this;return i("div",{class:"s-product-options-textarea"},i("div",{class:"mt-1"},i("textarea",{rows:4,value:t.value,class:"s-form-control",required:t.required,id:"options[".concat(t.id,"]"),name:"options[".concat(t.id,"]"),placeholder:t.placeholder,onInput:function(t){return e.textareaOptionEntered.emit(t)}})))};t.prototype.mapOption=function(t){var e=this;return i("salla-map",{zoom:15,lat:this.getLatLng(t.value,"lat"),lng:this.getLatLng(t.value,"lng"),name:"options[".concat(t.id,"]"),searchable:true,required:t.required,onSelected:function(t){return e.locationSelected.emit(t)}})};t.prototype.colorPickerOption=function(t){var e=this;return i("salla-color-picker",{onSubmitted:function(t){return e.colorPicked.emit(t)},name:"options[".concat(t.id,"]"),required:t.required,color:t.value||"#5dd5c4"})};t.prototype.timeOption=function(t){var e=this;return i("salla-datetime-picker",{noCalendar:true,enableTime:true,dateFormat:"h:i K",value:t.value,placeholder:t.name,required:t.required,name:"options[".concat(t.id,"]"),class:"s-product-options-time-element",onPicked:function(t){return e.timeSelected.emit(t)}})};t.prototype.dateOption=function(t){var e=this;return i("div",{class:"s-product-options-date-element"},i("salla-datetime-picker",{value:t.value,placeholder:t.name,required:t.required,name:"options[".concat(t.id,"]"),onPicked:function(t){return e.dateSelected.emit(t)}}))};t.prototype.datetimeOption=function(t){var e=this;return i("div",{class:"s-product-options-datetime-element"},i("salla-datetime-picker",{enableTime:true,value:t.value,dateFormat:"Y-m-d G:i:K",placeholder:t.name,required:t.required,name:"options[".concat(t.id,"]"),maxDate:t.to_date_time,minDate:t.from_date_time,onPicked:function(t){return e.dateTimeSelected.emit(t)}}))};t.prototype.getOptionDetailName=function(t,e){if(e===void 0){e=true}return t.name+(e&&t.is_out?" - ".concat(this.outOfStockText):"")+(t.additional_price?" (".concat(salla.money(t.additional_price),")"):"")};t.prototype.singleOption=function(t){var e=this;return i("div",null,i("select",{name:"options[".concat(t.id,"]"),required:t.required,class:"s-form-control"},i("option",{value:""},t.placeholder),t===null||t===void 0?void 0:t.details.map((function(t){return i("option",{value:t.id,disabled:t.is_out,selected:t.is_selected,onChange:function(t){return e.singleSelectOptionSelected.emit(t)}},e.getOptionDetailName(t))}))))};t.prototype.multipleOptions=function(t){var e=this;return i("div",{ref:function(t){return e.multipleOptionDom=t},class:{"s-product-options-multiple-options-wrapper":true,required:t.required}},t===null||t===void 0?void 0:t.details.map((function(o){return i("div",null,i("input",{type:"checkbox",value:o.id,disabled:o.is_out,checked:o.is_selected,name:"options[".concat(t.id,"][]"),id:"field-".concat(t.id,"-").concat(o.id),onChange:function(){return e.handleMultiSelectFieldInput()},"aria-describedby":"options[".concat(t.id,"]-description")}),i("label",{htmlFor:"field-".concat(t.id,"-").concat(o.id)},e.getOptionDetailName(o)))})))};t.prototype.colorOption=function(t){var e=this;return i("fieldset",{class:"s-product-options-colors-wrapper"},t===null||t===void 0?void 0:t.details.map((function(o){return i("div",null,i("input",{type:"radio",value:o.id,disabled:o.is_out,required:t.required,checked:o.is_selected,name:"options[".concat(t.id,"]"),id:"color-".concat(e.productId,"-").concat(t.id,"-").concat(o.id),onChange:function(t){return e.colorSelected.emit(t)}}),i("label",{htmlFor:"color-".concat(e.productId,"-").concat(t.id,"-").concat(o.id)},i("span",{style:{"background-color":o.color}}),i("p",null,e.getOptionDetailName(o))))})))};t.prototype.thumbnailOption=function(t){var e=this;return i("div",{class:"s-product-options-thumbnails-wrapper"},t.details.map((function(o){return i("div",null,i("input",{type:"radio",value:o.id,"data-itemid":o.id,disabled:o.is_out,required:t.required,checked:o.is_selected,name:"options[".concat(t.id,"]"),"data-img-id":o.option_value,id:"option_".concat(e.productId,"-").concat(t.id,"_").concat(o.id),onChange:function(t){return e.selectThumbnail(t,o.option_value)}}),i("label",{htmlFor:"option_".concat(e.productId,"-").concat(t.id,"_").concat(o.id),"data-img-id":o.option_value,class:"go-to-slide"},i("img",{"data-src":o.image,src:o.image,title:o.name,alt:o.name}),i("span",{innerHTML:s,class:"s-product-options-thumbnails-icon"})),i("p",null,e.getOptionDetailName(o,false)," "),o.is_out?[i("small",{class:"s-product-options-thumbnails-stock-badge"},e.outOfStockText),i("div",{class:"s-product-options-thumbnails-badge-overlay"})]:"")})))};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());u.style=d}}}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{p as e,w as a,d as t,N as l,a as o,b as i}from"./p-7dc66c07.js";import{g as r}from"./p-2c5db3b4.js";import"./p-f84bae34.js";(()=>{e.t=a.__cssshim;const i=Array.from(t.querySelectorAll("script")).find((e=>new RegExp(`/${l}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===l)),r={};return r.resourcesUrl=new URL(".",new URL(i.getAttribute("data-resources-url")||i.src,a.location.href)).href,((e,o)=>{const i=`__sc_import_${l.replace(/\s|-/g,"_")}`;try{a[i]=new Function("w",`return import(w);//${Math.random()}`)}catch(l){const r=new Map;a[i]=l=>{const s=new URL(l,e).href;let n=r.get(s);if(!n){const e=t.createElement("script");e.type="module",e.crossOrigin=o.crossOrigin,e.src=URL.createObjectURL(new Blob([`import * as m from '${s}'; window.${i}.m = m;`],{type:"application/javascript"})),n=new Promise((t=>{e.onload=()=>{t(a[i].m),e.remove()}})),r.set(s,n),t.head.appendChild(e)}return n}}})(r.resourcesUrl,i),a.customElements?o(r):__sc_import_twilight("./p-5db948f2.js").then((()=>r))})().then((e=>(r(),i(JSON.parse('[["p-11da4b05",[[4,"salla-gifting",{"productId":[2,"product-id"],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"open":[64],"close":[64],"goToStep2":[64]}],[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":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"currentTabName":[32],"regType":[32],"translationLoaded":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"dragAndDrop":[32],"browseFromFiles":[32],"customFields":[32],"uploadedImage":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64]}],[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],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-settings",{"isNotifiable":[516,"is-notifiable"],"deactivateAccount":[32],"promotionalMsgs":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32]}],[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"]]],[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64]}],[4,"salla-cart-summary",{"cartSummaryCount":[32],"cartSummaryTotal":[32],"animateToCart":[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-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchInputValue":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"open":[64]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16],"position":[1],"positionElement":[16],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4]}],[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"]]],[0,"salla-file-upload",{"value":[1537],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"setOption":[64]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"isRTL":[32],"swiperScript":[32],"displayAllTitle":[32],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[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]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[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]},[[0,"keyup","handleKeyUp"]]],[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-dbb379ce",[[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-7e9e675f",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["p-03695034",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-a7bd281c",[[0,"salla-select",{"label":[1],"items":[16],"itemText":[1,"item-text"],"itemValue":[1,"item-value"],"itemDisabled":[1,"item-disabled"],"size":[1],"value":[1032],"autofocus":[4],"clearable":[4],"clearIcon":[1,"clear-icon"],"color":[1],"flat":[4],"disabled":[4],"loading":[4],"loadingColor":[1,"loading-color"],"hint":[1],"persistHint":[4,"persist-hint"],"placeholder":[1],"multiple":[4],"autocomplete":[4],"required":[4],"chips":[4],"shape":[1],"returnObject":[4,"return-object"],"hideDetail":[4,"hide-detail"]}]]]]'),e))));
|
|
4
|
+
import{p as e,w as a,d as t,N as l,a as o,b as i}from"./p-7dc66c07.js";import{g as r}from"./p-2c5db3b4.js";import"./p-f84bae34.js";(()=>{e.t=a.__cssshim;const i=Array.from(t.querySelectorAll("script")).find((e=>new RegExp(`/${l}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===l)),r={};return r.resourcesUrl=new URL(".",new URL(i.getAttribute("data-resources-url")||i.src,a.location.href)).href,((e,o)=>{const i=`__sc_import_${l.replace(/\s|-/g,"_")}`;try{a[i]=new Function("w",`return import(w);//${Math.random()}`)}catch(l){const r=new Map;a[i]=l=>{const s=new URL(l,e).href;let n=r.get(s);if(!n){const e=t.createElement("script");e.type="module",e.crossOrigin=o.crossOrigin,e.src=URL.createObjectURL(new Blob([`import * as m from '${s}'; window.${i}.m = m;`],{type:"application/javascript"})),n=new Promise((t=>{e.onload=()=>{t(a[i].m),e.remove()}})),r.set(s,n),t.head.appendChild(e)}return n}}})(r.resourcesUrl,i),a.customElements?o(r):__sc_import_twilight("./p-5db948f2.js").then((()=>r))})().then((e=>(r(),i(JSON.parse('[["p-485b62a3",[[4,"salla-gifting",{"productId":[2,"product-id"],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"open":[64],"close":[64],"goToStep2":[64]}],[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":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"currentTabName":[32],"regType":[32],"translationLoaded":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"dragAndDrop":[32],"browseFromFiles":[32],"customFields":[32],"uploadedImage":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64]}],[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],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-settings",{"isNotifiable":[516,"is-notifiable"],"deactivateAccount":[32],"promotionalMsgs":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32]}],[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"]]],[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64]}],[4,"salla-cart-summary",{"cartSummaryCount":[32],"cartSummaryTotal":[32],"animateToCart":[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-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchInputValue":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"open":[64]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"header":[1025],"message":[1025],"unit":[1025],"color":[1025]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16],"position":[1],"positionElement":[16],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4]}],[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"]]],[0,"salla-file-upload",{"value":[1537],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"setOption":[64]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"isRTL":[32],"swiperScript":[32],"displayAllTitle":[32],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[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]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[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]},[[0,"keyup","handleKeyUp"]]],[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-9b7452c1",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32]}]]],["p-dbb379ce",[[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-7e9e675f",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["p-03695034",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-a7bd281c",[[0,"salla-select",{"label":[1],"items":[16],"itemText":[1,"item-text"],"itemValue":[1,"item-value"],"itemDisabled":[1,"item-disabled"],"size":[1],"value":[1032],"autofocus":[4],"clearable":[4],"clearIcon":[1,"clear-icon"],"color":[1],"flat":[4],"disabled":[4],"loading":[4],"loadingColor":[1,"loading-color"],"hint":[1],"persistHint":[4,"persist-hint"],"placeholder":[1],"multiple":[4],"autocomplete":[4],"required":[4],"chips":[4],"shape":[1],"returnObject":[4,"return-object"],"hideDetail":[4,"hide-detail"]}]]],["p-643ea74e",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]]]'),e))));
|
|
@@ -104,6 +104,15 @@ export interface Option {
|
|
|
104
104
|
details?: Detail[];
|
|
105
105
|
condition_attributes: string;
|
|
106
106
|
value?: any;
|
|
107
|
+
donation?: Donation;
|
|
108
|
+
}
|
|
109
|
+
export interface Donation {
|
|
110
|
+
target_message?: string;
|
|
111
|
+
target_date: string | "2023-04-18";
|
|
112
|
+
target_end_date: string | "2023-04-18";
|
|
113
|
+
target_amount: number;
|
|
114
|
+
collected_amount: number;
|
|
115
|
+
can_donate: boolean;
|
|
107
116
|
}
|
|
108
117
|
export interface Detail {
|
|
109
118
|
id: number;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Donation } from "../salla-product-options/interfaces";
|
|
2
|
+
export declare class SallaProgressBar {
|
|
3
|
+
constructor();
|
|
4
|
+
/**
|
|
5
|
+
* You can just pass the donation as json string ex: `{"target_message":null,"target_date":"2023-04-18","target_end_date":"2023-04-18","target_amount":400,"collected_amount":380,"can_donate":true}`
|
|
6
|
+
*/
|
|
7
|
+
donation: string | Donation;
|
|
8
|
+
/**
|
|
9
|
+
* The goal of the progress bar
|
|
10
|
+
*/
|
|
11
|
+
target: number;
|
|
12
|
+
/**
|
|
13
|
+
* The progress so far as of the goal.
|
|
14
|
+
*/
|
|
15
|
+
value: number;
|
|
16
|
+
/**
|
|
17
|
+
* Big Title, before the progress bar.
|
|
18
|
+
*/
|
|
19
|
+
header: string;
|
|
20
|
+
/**
|
|
21
|
+
* Subtitle under the progress bar or instead of it if the target not being set.
|
|
22
|
+
*/
|
|
23
|
+
message: string;
|
|
24
|
+
/**
|
|
25
|
+
* The unite to be added after the numbers, defaults to: `salla.config.currency().symbol`
|
|
26
|
+
*/
|
|
27
|
+
unit: string;
|
|
28
|
+
/**
|
|
29
|
+
* Progress bar color, defaults to: `salla.config.get('theme.color.primary', "#ffd5c4")`
|
|
30
|
+
*/
|
|
31
|
+
color: string;
|
|
32
|
+
private getPercentage;
|
|
33
|
+
render(): any;
|
|
34
|
+
private getProgressBar;
|
|
35
|
+
}
|
|
@@ -10,6 +10,7 @@ import { DateLimit, DateOption, LocaleKey } from "./components/salla-datetime-pi
|
|
|
10
10
|
import { FilePondFile } from "./components/salla-file-upload/interfaces";
|
|
11
11
|
import { FilePondErrorDescription } from "filepond/types/index";
|
|
12
12
|
import { Item } from "./components/salla-loyalty/loyalty-schema";
|
|
13
|
+
import { Donation } from "./components/salla-product-options/interfaces";
|
|
13
14
|
import { Phone } from "./components/salla-tel-input/interfaces";
|
|
14
15
|
export namespace Components {
|
|
15
16
|
interface SallaAddProductButton {
|
|
@@ -917,6 +918,36 @@ export namespace Components {
|
|
|
917
918
|
*/
|
|
918
919
|
"open": (product_id: number) => Promise<any>;
|
|
919
920
|
}
|
|
921
|
+
interface SallaProgressBar {
|
|
922
|
+
/**
|
|
923
|
+
* Progress bar color, defaults to: `salla.config.get('theme.color.primary', "#ffd5c4")`
|
|
924
|
+
*/
|
|
925
|
+
"color": string;
|
|
926
|
+
/**
|
|
927
|
+
* You can just pass the donation as json string ex: `{"target_message":null,"target_date":"2023-04-18","target_end_date":"2023-04-18","target_amount":400,"collected_amount":380,"can_donate":true}`
|
|
928
|
+
*/
|
|
929
|
+
"donation": string | Donation;
|
|
930
|
+
/**
|
|
931
|
+
* Big Title, before the progress bar.
|
|
932
|
+
*/
|
|
933
|
+
"header": string;
|
|
934
|
+
/**
|
|
935
|
+
* Subtitle under the progress bar or instead of it if the target not being set.
|
|
936
|
+
*/
|
|
937
|
+
"message": string;
|
|
938
|
+
/**
|
|
939
|
+
* The goal of the progress bar
|
|
940
|
+
*/
|
|
941
|
+
"target": number;
|
|
942
|
+
/**
|
|
943
|
+
* The unite to be added after the numbers, defaults to: `salla.config.currency().symbol`
|
|
944
|
+
*/
|
|
945
|
+
"unit": string;
|
|
946
|
+
/**
|
|
947
|
+
* The progress so far as of the goal.
|
|
948
|
+
*/
|
|
949
|
+
"value": number;
|
|
950
|
+
}
|
|
920
951
|
interface SallaQuantityInput {
|
|
921
952
|
/**
|
|
922
953
|
* decrease quantity by one.
|
|
@@ -1636,6 +1667,12 @@ declare global {
|
|
|
1636
1667
|
prototype: HTMLSallaProductSizeGuideElement;
|
|
1637
1668
|
new (): HTMLSallaProductSizeGuideElement;
|
|
1638
1669
|
};
|
|
1670
|
+
interface HTMLSallaProgressBarElement extends Components.SallaProgressBar, HTMLStencilElement {
|
|
1671
|
+
}
|
|
1672
|
+
var HTMLSallaProgressBarElement: {
|
|
1673
|
+
prototype: HTMLSallaProgressBarElement;
|
|
1674
|
+
new (): HTMLSallaProgressBarElement;
|
|
1675
|
+
};
|
|
1639
1676
|
interface HTMLSallaQuantityInputElement extends Components.SallaQuantityInput, HTMLStencilElement {
|
|
1640
1677
|
}
|
|
1641
1678
|
var HTMLSallaQuantityInputElement: {
|
|
@@ -1763,6 +1800,7 @@ declare global {
|
|
|
1763
1800
|
"salla-product-availability": HTMLSallaProductAvailabilityElement;
|
|
1764
1801
|
"salla-product-options": HTMLSallaProductOptionsElement;
|
|
1765
1802
|
"salla-product-size-guide": HTMLSallaProductSizeGuideElement;
|
|
1803
|
+
"salla-progress-bar": HTMLSallaProgressBarElement;
|
|
1766
1804
|
"salla-quantity-input": HTMLSallaQuantityInputElement;
|
|
1767
1805
|
"salla-quick-order": HTMLSallaQuickOrderElement;
|
|
1768
1806
|
"salla-rating-modal": HTMLSallaRatingModalElement;
|
|
@@ -2656,6 +2694,36 @@ declare namespace LocalJSX {
|
|
|
2656
2694
|
}
|
|
2657
2695
|
interface SallaProductSizeGuide {
|
|
2658
2696
|
}
|
|
2697
|
+
interface SallaProgressBar {
|
|
2698
|
+
/**
|
|
2699
|
+
* Progress bar color, defaults to: `salla.config.get('theme.color.primary', "#ffd5c4")`
|
|
2700
|
+
*/
|
|
2701
|
+
"color"?: string;
|
|
2702
|
+
/**
|
|
2703
|
+
* You can just pass the donation as json string ex: `{"target_message":null,"target_date":"2023-04-18","target_end_date":"2023-04-18","target_amount":400,"collected_amount":380,"can_donate":true}`
|
|
2704
|
+
*/
|
|
2705
|
+
"donation"?: string | Donation;
|
|
2706
|
+
/**
|
|
2707
|
+
* Big Title, before the progress bar.
|
|
2708
|
+
*/
|
|
2709
|
+
"header"?: string;
|
|
2710
|
+
/**
|
|
2711
|
+
* Subtitle under the progress bar or instead of it if the target not being set.
|
|
2712
|
+
*/
|
|
2713
|
+
"message"?: string;
|
|
2714
|
+
/**
|
|
2715
|
+
* The goal of the progress bar
|
|
2716
|
+
*/
|
|
2717
|
+
"target"?: number;
|
|
2718
|
+
/**
|
|
2719
|
+
* The unite to be added after the numbers, defaults to: `salla.config.currency().symbol`
|
|
2720
|
+
*/
|
|
2721
|
+
"unit"?: string;
|
|
2722
|
+
/**
|
|
2723
|
+
* The progress so far as of the goal.
|
|
2724
|
+
*/
|
|
2725
|
+
"value"?: number;
|
|
2726
|
+
}
|
|
2659
2727
|
interface SallaQuantityInput {
|
|
2660
2728
|
}
|
|
2661
2729
|
interface SallaQuickOrder {
|
|
@@ -2934,7 +3002,7 @@ declare namespace LocalJSX {
|
|
|
2934
3002
|
*/
|
|
2935
3003
|
"onSlidePrevTransitionStart"?: (event: SallaSliderCustomEvent<any>) => void;
|
|
2936
3004
|
/**
|
|
2937
|
-
* Event will be fired when user touch and move finger over Swiper and move it.
|
|
3005
|
+
* Event will be fired when user touch and move finger over Swiper and move it. Receives touchmove event as an arguments.
|
|
2938
3006
|
*/
|
|
2939
3007
|
"onSliderMove"?: (event: SallaSliderCustomEvent<any>) => void;
|
|
2940
3008
|
/**
|
|
@@ -2950,7 +3018,7 @@ declare namespace LocalJSX {
|
|
|
2950
3018
|
*/
|
|
2951
3019
|
"onTouchSliderEnd"?: (event: SallaSliderCustomEvent<any>) => void;
|
|
2952
3020
|
/**
|
|
2953
|
-
* Event will be fired when user touch and move finger over Swiper.
|
|
3021
|
+
* Event will be fired when user touch and move finger over Swiper. Receives touchmove event as an arguments.
|
|
2954
3022
|
*/
|
|
2955
3023
|
"onTouchSliderMove"?: (event: SallaSliderCustomEvent<any>) => void;
|
|
2956
3024
|
/**
|
|
@@ -3137,6 +3205,7 @@ declare namespace LocalJSX {
|
|
|
3137
3205
|
"salla-product-availability": SallaProductAvailability;
|
|
3138
3206
|
"salla-product-options": SallaProductOptions;
|
|
3139
3207
|
"salla-product-size-guide": SallaProductSizeGuide;
|
|
3208
|
+
"salla-progress-bar": SallaProgressBar;
|
|
3140
3209
|
"salla-quantity-input": SallaQuantityInput;
|
|
3141
3210
|
"salla-quick-order": SallaQuickOrder;
|
|
3142
3211
|
"salla-rating-modal": SallaRatingModal;
|
|
@@ -3184,6 +3253,7 @@ declare module "@stencil/core" {
|
|
|
3184
3253
|
"salla-product-availability": LocalJSX.SallaProductAvailability & JSXBase.HTMLAttributes<HTMLSallaProductAvailabilityElement>;
|
|
3185
3254
|
"salla-product-options": LocalJSX.SallaProductOptions & JSXBase.HTMLAttributes<HTMLSallaProductOptionsElement>;
|
|
3186
3255
|
"salla-product-size-guide": LocalJSX.SallaProductSizeGuide & JSXBase.HTMLAttributes<HTMLSallaProductSizeGuideElement>;
|
|
3256
|
+
"salla-progress-bar": LocalJSX.SallaProgressBar & JSXBase.HTMLAttributes<HTMLSallaProgressBarElement>;
|
|
3187
3257
|
"salla-quantity-input": LocalJSX.SallaQuantityInput & JSXBase.HTMLAttributes<HTMLSallaQuantityInputElement>;
|
|
3188
3258
|
"salla-quick-order": LocalJSX.SallaQuickOrder & JSXBase.HTMLAttributes<HTMLSallaQuickOrderElement>;
|
|
3189
3259
|
"salla-rating-modal": LocalJSX.SallaRatingModal & JSXBase.HTMLAttributes<HTMLSallaRatingModalElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salla.sa/twilight-components",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.27",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"author": "Salla Team <support@salla.dev> (https://salla.dev)",
|
|
6
6
|
"bugs": {
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"typescript": "^4.4.3"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@salla.sa/twilight": "^2.11.
|
|
80
|
-
"@salla.sa/twilight-tailwind-theme": "^2.11.
|
|
79
|
+
"@salla.sa/twilight": "^2.11.27",
|
|
80
|
+
"@salla.sa/twilight-tailwind-theme": "^2.11.27",
|
|
81
81
|
"animejs": "^3.2.1",
|
|
82
82
|
"filepond": "^4.30.4",
|
|
83
83
|
"filepond-plugin-file-poster": "^2.5.1",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"vanilla-lazyload": "^17.8.3",
|
|
94
94
|
"vanilla-picker": "^2.12.1"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "49da41386ba106f59951c8d00227fb5e6bbd6815"
|
|
97
97
|
}
|