From b05a25e6aa25951cbf9b5af2c839c9a717665e7c Mon Sep 17 00:00:00 2001
From: Anuj Subedi
{{
__(
- "Loving addonify wishlist? Help us make a better software",
+ "Do you have a problem? Help is only a mouse click away!",
"addonify-wishlist"
)
}}
@@ -17,10 +17,10 @@ const { __ } = wp.i18n;
diff --git a/admin/app/src/views/Setting.vue b/admin/app/src/views/Setting.vue
index c4cc0c1..a38cb61 100644
--- a/admin/app/src/views/Setting.vue
+++ b/admin/app/src/views/Setting.vue
@@ -5,7 +5,7 @@ import JumboBoxContainer from "@layouts/JumboBoxContainer.vue";
import Sidebar from "@layouts/Sidebar.vue";
import RouteLinks from "@layouts/RouteLinks.vue";
import Loading from "@components/core/Loading.vue";
-//import Hero from "@components/partials/Hero.vue";
+import Hero from "@components/partials/Hero.vue";
import { useSettingsStore } from "@stores/settings";
import { advertiseUpsell } from "@helpers/global";
@@ -27,7 +27,7 @@ onMounted(() => {
});
-
+
lr(c,i))?o.push(i):n.push(i));const a=e.matched[l];a&&(t.matched.find(c=>lr(c,a))||r.push(a))}return[n,o,r]}function V$(){return Re($l)}function N$(){return Re(Va)}const F$={__name:"Index",setup(e){return()=>{}}},H$=["id"],y0={__name:"Form",props:{id:{type:String,required:!1},class:{type:String,required:!1}},setup(e){const t=e;return(n,o)=>(y(),O("form",{id:u(t).id,class:x(["adfy-form",u(t).class]),onSubmit:o[0]||(o[0]=Qe(()=>{},["prevent"]))},[$e(n.$slots,"default")],42,H$))}},z$=w("span",{class:"icon"},[w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:"14px",height:"14px"},[w("path",{d:"M24,12A12,12,0,1,1,12,0,12.013,12.013,0,0,1,24,12ZM14,12a2,2,0,0,0-2-2H10v2h2v7h2ZM12,5a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,12,5Z"})])],-1),j$={__name:"HelpTip",props:{content:{type:String,required:!0}},setup(e){const t=e,{__:n}=wp.i18n,o=n("No content","addonify-wishlist");return(r,s)=>{const l=cs;return y(),j(l,{class:"box-item","popper-class":"tooltip",effect:"dark",placement:"top",content:t.content?t.content:u(o)},{default:Q(()=>[z$]),_:1},8,["content"])}}},D$={__name:"Switch",props:{modelValue:{type:[Boolean,Number],required:!0}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e;let o=S({get(){return n.modelValue},set(r){t("update:modelValue",r)}});return(r,s)=>{const l=wC;return y(),j(l,{modelValue:u(o),"onUpdate:modelValue":s[0]||(s[0]=i=>je(o)?o.value=i:o=i),size:"large","inline-prompt":"","active-icon":u(da),"inactive-icon":u(Mo)},null,8,["modelValue","active-icon","inactive-icon"])}}},K$=["innerHTML"],U$={__name:"Radio",props:{modelValue:{type:String,required:!0},choices:{type:[Array,Object],required:!0},design:{type:String,default:"default",required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e;let o=S({get(){return n.modelValue},set(r){t("update:modelValue",r)}});return(r,s)=>{const l=rw,i=sw;return y(),O(ke,null,[n.design==="default"?(y(!0),O(ke,{key:0},gt(n.choices,(a,c)=>(y(),j(i,{modelValue:u(o),"onUpdate:modelValue":s[0]||(s[0]=d=>je(o)?o.value=d:o=d)},{default:Q(()=>[Z(l,{label:c},{default:Q(()=>[Je(pe(a),1)]),_:2},1032,["label"])]),_:2},1032,["modelValue"]))),256)):z("",!0),n.design==="radioIcons"?(y(),j(i,{key:1,modelValue:u(o),"onUpdate:modelValue":s[1]||(s[1]=a=>je(o)?o.value=a:o=a)},{default:Q(()=>[(y(!0),O(ke,null,gt(n.choices,(a,c)=>(y(),j(l,{label:c,size:"large",border:""},{default:Q(()=>[w("span",{innerHTML:a},null,8,K$)]),_:2},1032,["label"]))),256))]),_:1},8,["modelValue"])):z("",!0)],64)}}},q$={__name:"Select",props:{modelValue:{type:[Array,String,Number,Object],required:!0},choices:{type:[Array,Object],required:!1},placeholder:{type:String,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e;let o=S({get(){return n.modelValue.toString()},set(l){t("update:modelValue",l)}});const{__:r}=wp.i18n,s=r("Select","addonify-wishlist");return(l,i)=>{const a=d9,c=c9;return y(),j(c,{modelValue:u(o),"onUpdate:modelValue":i[0]||(i[0]=d=>je(o)?o.value=d:o=d),size:"large",filterable:"",clearable:"",placeholder:n.placeholder?n.placeholder:u(s)},{default:Q(()=>[(y(!0),O(ke,null,gt(n.choices,(d,f)=>(y(),j(a,{label:d,value:f},null,8,["label","value"]))),256))]),_:1},8,["modelValue","placeholder"])}}},W$={__name:"Text",props:{modelValue:{type:String,required:!0},placeholder:{type:String,required:!1},className:{type:String,required:!1},type:{type:String,default:"text",required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e;let o=S({get(){return n.modelValue},set(l){t("update:modelValue",l)}});const{__:r}=wp.i18n,s=r("Enter text...","addonify-wishlist");return(l,i)=>{const a=_l;return y(),O(ke,null,[u(n).type==="text"?(y(),j(a,{key:0,modelValue:u(o),"onUpdate:modelValue":i[0]||(i[0]=c=>je(o)?o.value=c:o=c),placeholder:u(n).placeholder?u(n).placeholder:u(s),size:"large"},null,8,["modelValue","placeholder"])):z("",!0),u(n).type==="textarea"?(y(),j(a,{key:1,modelValue:u(o),"onUpdate:modelValue":i[1]||(i[1]=c=>je(o)?o.value=c:o=c),class:x(e.className),type:"textarea",rows:"10",placeholder:u(n).placeholder?u(n).placeholder:u(s),resize:"vertical"},null,8,["modelValue","class","placeholder"])):z("",!0)],64)}}},Z$={__name:"Number",props:{modelValue:{type:[Number,String],required:!0},design:{type:String,default:"arrow",required:!1},min:{type:[String,Number],required:!1},max:{type:[String,Number],required:!1},step:{type:[String,Number],required:!1},precision:{type:[String,Number],required:!1},sliderTipText:{type:String,required:!1},sliderInput:{type:Boolean,default:!0,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e;let o=S({get(){return parseInt(n.modelValue)},set(s){t("update:modelValue",s)}});const r=s=>s+" "+n.sliderTipText;return(s,l)=>{const i=Xp,a=cC;return n.design==="plus-minus"?(y(),j(i,{key:0,size:"large",modelValue:u(o),"onUpdate:modelValue":l[0]||(l[0]=c=>je(o)?o.value=c:o=c),min:n.min,max:n.max,step:n.steps,precision:n.precision},null,8,["modelValue","min","max","step","precision"])):n.design==="slider"?(y(),j(a,{key:1,modelValue:u(o),"onUpdate:modelValue":l[1]||(l[1]=c=>je(o)?o.value=c:o=c),min:n.min?n.min:0,max:n.max?n.max:1e3,step:n.step?n.step:1,"show-input":!!n.sliderInput,"format-tooltip":n.sliderTipText?r:null,size:"large"},null,8,["modelValue","min","max","step","show-input","format-tooltip"])):(y(),j(i,{key:2,size:"large","controls-position":"right",modelValue:u(o),"onUpdate:modelValue":l[2]||(l[2]=c=>je(o)?o.value=c:o=c),min:n.min,max:n.max,step:n.steps,precision:n.precision},null,8,["modelValue","min","max","step","precision"]))}}},G$=e=>{if(typeof e===null||typeof e=="object"||e.substring(0,1)!=="#"&&e.substring(0,4)!=="rgba")return"NaN";if(e.substring(0,1)==="#")return e;let t=e.substring(e.indexOf("(")+1,e.lastIndexOf(")")).split(","),n=parseInt(t[0],10),o=parseInt(t[1],10),r=parseInt(t[2],10),s=parseFloat(t[3])||1,l=((1<<24)+(n<<16)+(o<<8)+r).toString(16).slice(1);if(s===1)return"#"+l;{let i=Math.round(s*255).toString(16);return i.length===1&&(i="0"+i),"#"+l+i}},Y$={key:0,class:"adfy-control",data_type:"color-picker",data_size:"minimal"},X$={class:"input adfy-flex"},Q$={key:1,class:"adfy-control",data_type:"color-picker",data_size:"default"},J$={key:0,class:"control-title"},eE={class:"input adfy-flex"},tE={class:"color-code"},nE=le({__name:"ColorControl",props:{modelValue:{type:String,required:!1},size:{type:String,default:"normal",required:!1},title:{type:String,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e;let o=S({get(){return n.modelValue},set(s){t("update:modelValue",s)}});const r=s=>{t("update:modelValue",s)};return(s,l)=>{const i=Fw;return n.size==="minimal"?(y(),O("div",Y$,[w("div",X$,[Z(i,{modelValue:u(o),"onUpdate:modelValue":l[0]||(l[0]=a=>je(o)?o.value=a:o=a),"show-alpha":"",onActiveChange:r},null,8,["modelValue"])])])):(y(),O("div",Q$,[n.title?(y(),O("span",J$,pe(n.title),1)):z("",!0),w("div",eE,[Z(i,{modelValue:u(o),"onUpdate:modelValue":l[1]||(l[1]=a=>je(o)?o.value=a:o=a),"show-alpha":"",onActiveChange:r},null,8,["modelValue"]),w("span",tE,pe(u(G$)(u(o)).toUpperCase()),1)])]))}}}),oE=["data_loading","disabled"],rE={key:0,class:"icon"},sE=["data_loading","disabled"],lE={key:0,class:"icon"},iE={__name:"ActionButton",props:{task:{type:Object,required:!0}},setup(e){const t=e,{__:n}=wp.i18n,o=uo(),r=n("Processing...","addonify-wishlist"),s=()=>{t.task.type==="POST"?o.dispatchEmptyPostRequest(t.task.endpoint):console.warn("Invalid task type. Only POST is supported.")},{confirm:l,buttonLabel:i,buttonIcon:a,buttonClass:c}=t.task;return(d,f)=>{const p=g9;return u(l).required?(y(),j(p,{key:0,width:u(l).size===""?"250px":u(l).size,"confirm-button-text":u(l).confirmBtnLabel,"cancel-button-text":u(l).cancelBtnLabel,icon:u(pa),"icon-color":"#626AEF",title:u(l).content,onConfirm:f[0]||(f[0]=m=>s())},{reference:Q(()=>[w("button",{type:"submit",class:x(["adfy-button",u(c)]),data_loading:u(o).actionEvent.isProcessing,disabled:u(o).actionEvent.isProcessing},[Je(pe(u(o).actionEvent.isProcessing?u(r):u(i))+" ",1),u(a)!==""?(y(),O("span",rE,pe(u(a)),1)):z("",!0),u(o).actionEvent.isProcessing?(y(),j(it,{key:1,name:"loading",size:"18px"})):z("",!0)],10,oE)]),_:1},8,["width","confirm-button-text","cancel-button-text","icon","title"])):(y(),O("button",{key:1,type:"submit",class:x(["adfy-button",u(c)]),data_loading:u(o).actionEvent.isProcessing,disabled:u(o).actionEvent.isProcessing,onClick:f[1]||(f[1]=m=>s())},[Je(pe(u(o).actionEvent.isProcessing?u(r):u(i))+" ",1),u(a)!==""?(y(),O("span",lE,pe(u(a)),1)):z("",!0),u(o).actionEvent.isProcessing?(y(),j(it,{key:1,name:"loading",size:"18px"})):z("",!0)],10,sE))}}},aE={id:"loading-skelaton"},uE={id:"input-type-upload"},cE={class:"el-upload__text"},dE={class:"el-upload__tip"},fE={__name:"ImportOptions",props:{caption:{type:String,required:!1},note:{type:String,required:!1}},setup(e){const t=e,{__:n}=wp.i18n,o=uo();let r=D();const s=i=>{let a=n("Only JSON file is permitted.","addonify-wishlist");i.type=="application/json"?(l(i),r.value=[]):ot.error({message:a,offset:50,duration:1e4}),r.value=[]},l=i=>{let a=new Blob([i],{type:"application/json"}),c=new FormData;c.append(ci+"_import_file",a,ci+"_import_file.json"),o.importSettings(c),r.value=[]};return(i,a)=>{const c=Ra,d=Ye,f=JC;return y(),O(ke,null,[dt(w("div",aE,[Z(c,{rows:3,animated:""})],512),[[nn,u(o).status.isImporting===!0]]),dt(w("div",uE,[Z(f,{"file-list":u(r),"onUpdate:fileList":a[0]||(a[0]=p=>je(r)?r.value=p:r=p),drag:"",method:"post",accept:".json","auto-upload":!0,multiple:!1,"before-upload":s},{tip:Q(()=>[w("div",dE,pe(t.note),1)]),default:Q(()=>[Z(d,{class:"el-icon--upload"},{default:Q(()=>[Z(u(R8))]),_:1}),w("div",cE,pe(t.caption),1)]),_:1},8,["file-list"])],512),[[nn,u(o).status.isImporting!==!0]])],64)}}},pE=["data_loading","disabled"],hE={__name:"ExportOptions",props:{label:{type:String,required:!0},buttonLabel:{type:String,required:!0}},setup(e){const t=e,{__:n}=wp.i18n,o=uo(),r=n("Processing...","addonify-wishlist");return(s,l)=>(y(),O("button",{type:"submit",class:"adfy-button",data_loading:u(o).status.isExporting,disabled:u(o).status.isExporting,onClick:l[0]||(l[0]=(...i)=>u(o).exportSettings&&u(o).exportSettings(...i))},[Je(pe(u(o).status.isExporting?u(r):t.buttonLabel)+" ",1),u(o).status.isExporting?(y(),j(it,{key:0,name:"loading",size:"18px"})):z("",!0)],8,pE))}},vE={class:"unsupported-control-text"},mE={__name:"InvalidControl",setup(e){const{__:t}=wp.i18n;return(n,o)=>(y(),O("span",vE," ❌ "+pe(u(t)("Input control is not supported.","addonify-wishlist")),1))}},gE={__name:"ControlMaster",props:{reactiveState:{type:Object,required:!0},field:{type:[Object,String],required:!0},fieldKey:{type:String,required:!0},label:{type:String,required:!1}},setup(e){const t=e;return(n,o)=>t.field.type==="switch"?(y(),j(D$,{key:0,modelValue:t.reactiveState[t.fieldKey],"onUpdate:modelValue":o[0]||(o[0]=r=>t.reactiveState[t.fieldKey]=r)},null,8,["modelValue"])):t.field.type==="radio"?(y(),j(U$,{key:1,modelValue:t.reactiveState[t.fieldKey],"onUpdate:modelValue":o[1]||(o[1]=r=>t.reactiveState[t.fieldKey]=r),design:t.field.design,choices:t.field.choices},null,8,["modelValue","design","choices"])):t.field.type==="text"||t.field.type==="textarea"?(y(),j(W$,{key:2,modelValue:t.reactiveState[t.fieldKey],"onUpdate:modelValue":o[2]||(o[2]=r=>t.reactiveState[t.fieldKey]=r),type:t.field.type,placeholder:t.field.placeholder},null,8,["modelValue","type","placeholder"])):t.field.type==="number"?(y(),j(Z$,{key:3,modelValue:t.reactiveState[t.fieldKey],"onUpdate:modelValue":o[3]||(o[3]=r=>t.reactiveState[t.fieldKey]=r),design:t.field.design,min:t.field.min,max:t.field.max,step:t.field.step,precision:t.field.precision,placeholder:t.field.placeholder,sliderTipText:t.field.sliderTipText,sliderInput:t.field.sliderInput},null,8,["modelValue","design","min","max","step","precision","placeholder","sliderTipText","sliderInput"])):t.field.type==="select"?(y(),j(q$,{key:4,modelValue:t.reactiveState[t.fieldKey],"onUpdate:modelValue":o[4]||(o[4]=r=>t.reactiveState[t.fieldKey]=r),choices:t.field.choices,placeholder:t.field.placeholder},null,8,["modelValue","choices","placeholder"])):t.field.type==="color"?(y(),j(nE,{key:5,modelValue:t.reactiveState[t.fieldKey],"onUpdate:modelValue":o[5]||(o[5]=r=>t.reactiveState[t.fieldKey]=r),size:t.field.size,title:t.field.title},null,8,["modelValue","size","title"])):t.field.type==="action-button"?(y(),j(iE,{key:6,task:t.field.task},null,8,["task"])):t.field.type==="export-option"?(y(),j(hE,{key:7,label:t.field.label,buttonLabel:t.field.buttonLabel},null,8,["label","buttonLabel"])):t.field.type==="import-option"?(y(),j(fE,{key:8,caption:t.field.caption,note:t.field.note},null,8,["caption","note"])):(y(),j(mE,{key:9}))}},yE={class:"adfy-option-boxes"},bE=["data_width"],_E={class:"column column-left"},wE={class:"option-label"},CE={class:"column column-right"},SE={class:"adfy-option"},$E={__name:"OptionBox",props:{optionBox:{type:Object,required:!1},reactiveState:{type:Object,required:!0}},setup(e){const t=e;return(n,o)=>(y(),O("div",yE,[(y(!0),O(ke,null,gt(t.optionBox.sub_sections,(r,s)=>(y(),O("div",{class:x(["adfy-option-box",r.className?r.className:""]),data_width:r.width?r.width:"default"},[w("div",_E,[w("p",wE,[Je(pe(r.label?r.label:"?????")+" ",1),Object.hasOwn(r,"description")?(y(),j(j$,{key:0,content:r.description},null,8,["content"])):z("",!0)])]),w("div",CE,[w("div",SE,[Z(gE,{field:r,fieldKey:s,reactiveState:t.reactiveState},null,8,["field","fieldKey","reactiveState"])])])],10,bE))),256))]))}},EE={class:"box-title"},TE={class:"column title"},kE={class:"x-heading"},OE={class:"column action"},AE=["href"],b0={__name:"JumboBoxTitle",props:{title:{type:String,default:"....",required:!0},disableDocs:{type:Boolean,default:!1,required:!1},docLabel:{type:String,required:!1},docLink:{type:String,default:"https://docs.addonify.com/",required:!1}},setup(e){const t=e,{__:n}=wp.i18n;return(o,r)=>(y(),O("div",EE,[w("div",TE,[w("h3",kE,pe(t.title),1)]),w("div",OE,[t.disableDoc!==!0?(y(),O("a",{key:0,href:t.docLink,target:"_blank",rel:"noopener noreferrer",class:"adfy-button fake-button link-external"},[Je(pe(t.docLabel?t.docLabel:u(n)("Check docs","addonify-wishlist"))+" ",1),Z(it,{name:"arrow-right",size:"16px"})],8,AE)):z("",!0)])]))}},xE={class:"adfy-jumbo-boxes"},PE={class:"adfy-jumbo-box"},ME={__name:"JumboBox",props:{section:{type:Object,required:!1},reactiveState:{type:Object,required:!0}},setup(e){const t=e;return(n,o)=>(y(),O("div",xE,[(y(!0),O(ke,null,gt(t.section.sections,r=>(y(),O("div",PE,[Z(b0,{title:r.title,"doc-link":r.docs_link?r.docs_link:u(mS)},null,8,["title","doc-link"]),Z($E,{optionBox:r,reactiveState:t.reactiveState},null,8,["optionBox","reactiveState"])]))),256))]))}},IE={id:"app-main app-primary",class:"app-primary"},LE={__name:"JumboBoxContainer",props:{section:{type:Object,required:!1},reactiveState:{type:Object,required:!0}},setup(e){const t=e,n=N$(),o=V$(),r=S(()=>"adfy-form-"+n.params.slug),s=S(()=>{let l=!1;return t.section&&Object.keys(t.section).forEach(i=>{i===n.params.slug&&(l=t.section[i])}),l||o.push("/404"),l});return(l,i)=>(y(),O("main",IE,[Z(y0,{id:u(r)},{default:Q(()=>[Z(ME,{section:u(s),route:u(n).params.slug,reactiveState:t.reactiveState},null,8,["section","route","reactiveState"])]),_:1},8,["id"])]))}},RE={},BE={id:"upsell-arrow"},VE=w("svg",{width:"133",height:"186",viewBox:"0 0 133 186",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M48.3994 179.968C47.8013 179.395 47.7811 178.446 48.3543 177.847C50.9165 175.174 53.5031 172.569 56.0675 169.987C68.974 156.992 81.3199 144.56 87.1837 126.716C91.8604 112.485 92.5876 93.8542 83.4955 81.5595C78.5959 85.5653 72.5286 87.697 65.5106 88.1973C62.1964 88.4335 57.688 88.4563 53.5656 87.4361C49.4576 86.4195 45.4348 84.2837 43.6299 79.9735C42.072 76.2532 44.2266 73.0701 46.6837 70.9866C49.184 68.8664 52.5062 67.3875 54.7474 66.8438C65.2064 64.3065 76.741 69.5445 83.7878 77.2121C85.4738 75.4584 86.9694 73.403 88.268 71.0297C94.0752 60.4164 95.2508 48.8775 94.197 37.1277C93.1872 25.8695 90.1447 14.5315 87.2426 3.71667C87.1089 3.21852 86.9755 2.72147 86.8427 2.2256C86.6283 1.42539 87.1031 0.602892 87.9033 0.388479C88.7035 0.174066 89.526 0.648937 89.7404 1.44914C89.8799 1.96941 90.02 2.49172 90.1608 3.01597C93.0466 13.7677 96.1513 25.3347 97.185 36.8597C98.2715 48.9737 97.0853 61.1651 90.8997 72.4697C89.41 75.1925 87.6782 77.5384 85.7219 79.5273C85.7832 79.6084 85.844 79.6897 85.9043 79.7712C95.8481 93.2129 94.8381 113.033 90.0338 127.653C83.9284 146.232 70.9911 159.243 58.0686 172.238C55.5347 174.786 53.0014 177.334 50.5203 179.923C49.9471 180.521 48.9975 180.541 48.3994 179.968ZM81.5848 79.2457C75.1036 72.1771 64.5923 67.5425 55.4547 69.7592C53.6185 70.2046 50.731 71.4879 48.624 73.2747C46.4737 75.0981 45.6232 76.9667 46.3971 78.8148C47.6727 81.8609 50.5944 83.6103 54.2863 84.5239C57.9635 85.434 62.1102 85.4321 65.2973 85.2049C71.7341 84.7461 77.1925 82.8329 81.5848 79.2457Z",fill:"black"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M48.3813 181.37C48.7463 181.233 49.1039 181.098 49.2906 181.044C50.8558 180.595 52.4399 180.177 54.0053 179.764C54.6576 179.592 55.3067 179.421 55.9498 179.248C56.75 179.034 57.5725 179.509 57.7869 180.309C58.0014 181.109 57.5265 181.932 56.7263 182.146C56.059 182.325 55.3961 182.5 54.7365 182.674C53.1849 183.083 51.6509 183.488 50.1182 183.928C50.1192 183.928 50.119 183.928 50.1174 183.928C50.1117 183.93 50.0887 183.937 50.0407 183.954C49.9848 183.974 49.9133 184 49.8245 184.033C49.724 184.07 49.616 184.111 49.495 184.156C49.3936 184.194 49.2831 184.236 49.1604 184.282C48.6434 184.475 47.9892 184.714 47.3391 184.922C46.7091 185.122 45.9992 185.32 45.3934 185.397C45.1061 185.433 44.709 185.461 44.3137 185.375C43.9151 185.289 43.1508 184.983 42.9112 184.089C42.6272 183.029 42.6761 181.971 42.8186 181.042C42.942 180.238 43.1525 179.44 43.3289 178.771C43.354 178.676 43.3784 178.583 43.4017 178.494C43.6205 177.655 43.7436 176.804 43.8497 175.889C43.877 175.653 43.9036 175.409 43.9307 175.16C44.0058 174.47 44.0858 173.734 44.2 173.01C44.3291 172.192 45.097 171.633 45.9154 171.762C46.7337 171.891 47.2924 172.659 47.1634 173.478C47.0613 174.125 46.9931 174.752 46.9207 175.417C46.8919 175.682 46.8624 175.953 46.8298 176.234C46.719 177.19 46.577 178.207 46.3046 179.251C46.2787 179.35 46.253 179.448 46.2275 179.545C46.048 180.228 45.8815 180.861 45.7839 181.497C45.7415 181.773 45.7155 182.032 45.7073 182.275C45.9235 182.218 46.1657 182.147 46.4281 182.063C47.0055 181.879 47.6034 181.661 48.1109 181.471C48.1998 181.438 48.2908 181.404 48.3813 181.37Z",fill:"black"})],-1),NE=[VE];function FE(e,t){return y(),O("div",BE,NE)}const HE=i0(RE,[["render",FE]]),zE=Qi({id:"upsell",state:()=>({data:{},status:{isChecking:!0}}),getters:{hasSale:e=>Object.keys(e.data).length!==0?e.data.addonify.live===!0:!1,hasCaption:e=>Object.keys(e.data).length!==0?e.data.addonify.caption!=="":!1},actions:{async checkSale(){try{const e=await fetch(hS,{method:"GET"}),t=await e.json();e.status===200&&(this.data=t.data)}catch{}}}}),jE={id:"upsell-banner"},DE={class:"sale-title"},KE={key:0,class:"sale-caption"},UE={class:"inner"},qE={class:"block-title"},WE={class:"upsell-heading"},ZE={class:"features"},GE={class:"list"},YE={class:"text"},XE={class:"text"},QE={class:"text"},JE={class:"text"},eT={class:"text"},tT={class:"text"},nT={class:"text"},oT={class:"text"},rT={class:"action"},sT=["href"],lT={__name:"UpsellBanner",setup(e){const{__:t}=wp.i18n,n=zE();return We(()=>{setTimeout(()=>{typeof n.data=="object"&&Object.keys(n.data).length===0&&n.checkSale()},1e4)}),ll(()=>{clearTimeout()}),(o,r)=>(y(),O("div",jE,[u(n).hasSale?(y(),O("div",{key:0,id:"sale-badge",class:x(u(n).hasCaption?"has-caption":"")},[w("span",DE,pe(u(n).data.addonify.title),1),u(n).hasCaption?(y(),O("span",KE,pe(u(n).data.addonify.caption),1)):z("",!0)],2)):z("",!0),w("div",UE,[w("div",qE,[w("h3",WE,pe(u(t)("Get Addonify Wishlist premium version.","addonify-wishlist")),1)]),w("div",ZE,[w("ul",GE,[w("li",null,[Z(it,{name:"check",size:"14px"}),w("span",YE,pe(u(t)("Unlock multi wishlist","addonify-wishlist")),1)]),w("li",null,[Z(it,{name:"check",size:"14px"}),w("span",XE,pe(u(t)("Back in stock email","addonify-wishlist")),1)]),w("li",null,[Z(it,{name:"check",size:"14px"}),w("span",QE,pe(u(t)("Low in stock email","addonify-wishlist")),1)]),w("li",null,[Z(it,{name:"check",size:"14px"}),w("span",JE,pe(u(t)("Enable cost estimation","addonify-wishlist")),1)]),w("li",null,[Z(it,{name:"check",size:"14px"}),w("span",eT,pe(u(t)("Allow sharing wishlists in social media","addonify-wishlist")),1)]),w("li",null,[Z(it,{name:"check",size:"14px"}),w("span",tT,pe(u(t)("Additional color options","addonify-wishlist")),1)]),w("li",null,[Z(it,{name:"check",size:"14px"}),w("span",nT,pe(u(t)("Additional typography options","addonify-wishlist")),1)]),w("li",null,[Z(it,{name:"check",size:"14px"}),w("span",oT,pe(u(t)("...& many more.","addonify-wishlist")),1)])])]),w("div",rT,[w("a",{href:u(vS),class:"adfy-button"},[Z(it,{name:"diamond",size:"18px"}),Je(" "+pe(u(t)("Upgrade to pro","addonify-wishlist")),1)],8,sT)])])]))}},iT={id:"quick-links"},aT={class:"title-holder"},uT={class:"box-title"},cT={class:"list-holder"},dT={class:"lists"},fT={class:"review"},pT=al('',1),hT={href:"https://wordpress.org/support/plugin/addonify-wishlist/reviews/#new-post",target:"_blank",rel:"noopener noreferrer",class:"elink"},vT={class:"support"},mT=w("span",{class:"icon-holder"},[w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[w("path",{d:"M21,12.424V11A9,9,0,0,0,3,11v1.424A5,5,0,0,0,5,22a2,2,0,0,0,2-2V14a2,2,0,0,0-2-2V11a7,7,0,0,1,14,0v1a2,2,0,0,0-2,2v6a2,2,0,0,0,2,2,5,5,0,0,0,2-9.576ZM5,20H5a3,3,0,0,1,0-6Zm14,0V14a3,3,0,0,1,0,6Z"})])],-1),gT={href:"https://wordpress.org/support/plugin/addonify-wishlist/",target:"_blank",rel:"noopener noreferrer",class:"elink"},yT={class:"report-issue"},bT=w("span",{class:"icon-holder"},[w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[w("path",{d:"M22,7a2,2,0,0,0,2-2V1a1,1,0,0,0-2,0V5H18c-.018,0-.032.009-.05.01a6.411,6.411,0,0,0-11.89,0C6.039,5.011,6.021,5,6,5H2V1A1,1,0,0,0,0,1V5A2,2,0,0,0,2,7H5.485L4.472,11H1a1,1,0,0,0,0,2H3.965l-.145.573L3.8,13.7a8.37,8.37,0,0,0-.07,1.032A8.2,8.2,0,0,0,4.053,17H2a2,2,0,0,0-2,2v4a1,1,0,0,0,2,0V19H4.93a8.248,8.248,0,0,0,14.14,0H22v4a1,1,0,0,0,2,0V19a2,2,0,0,0-2-2H19.947a8.2,8.2,0,0,0,.325-2.273A8.37,8.37,0,0,0,20.2,13.7l-.175-.7H23a1,1,0,0,0,0-2H19.522L18.513,7ZM12,21a6.279,6.279,0,0,1-6.272-6.273A6.188,6.188,0,0,1,5.775,14L7.805,5.97a4.448,4.448,0,0,1,8.376-.041L18.225,14a6.188,6.188,0,0,1,.047.725A6.279,6.279,0,0,1,12,21Z"})])],-1),_T={href:"https://github.com/addonify/addonify-wishlist/issues/",target:"_blank",rel:"noopener noreferrer",class:"elink"},wT={class:"docs"},CT=w("span",{class:"icon-holder"},[w("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[w("path",{d:"m17 14a1 1 0 0 1 -1 1h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 1 1zm-4 3h-5a1 1 0 0 0 0 2h5a1 1 0 0 0 0-2zm9-6.515v8.515a5.006 5.006 0 0 1 -5 5h-10a5.006 5.006 0 0 1 -5-5v-14a5.006 5.006 0 0 1 5-5h4.515a6.958 6.958 0 0 1 4.95 2.05l3.484 3.486a6.951 6.951 0 0 1 2.051 4.949zm-6.949-7.021a5.01 5.01 0 0 0 -1.051-.78v4.316a1 1 0 0 0 1 1h4.316a4.983 4.983 0 0 0 -.781-1.05zm4.949 7.021c0-.165-.032-.323-.047-.485h-4.953a3 3 0 0 1 -3-3v-4.953c-.162-.015-.321-.047-.485-.047h-4.515a3 3 0 0 0 -3 3v14a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3z"})])],-1),ST={href:"https://docs.addonify.com/kb/woocommerce-wishlist/",target:"_blank",rel:"noopener noreferrer",class:"elink"},$T={class:"translate"},ET=al('',1),TT={href:"https://translate.wordpress.org/projects/wp-plugins/addonify-wishlist/",target:"_blank",rel:"noopener noreferrer",class:"elink"},kT={__name:"QuickLinks",setup(e){const{__:t}=wp.i18n;return(n,o)=>(y(),O("div",iT,[w("div",aT,[w("h3",uT,pe(u(t)("Quick links","addonify-wishlist")),1)]),w("div",cT,[w("ul",dT,[w("li",fT,[pT,w("a",hT,[Je(pe(u(t)("Drop a feedback","addonify-wishlist"))+" ",1),Z(it,{name:"arrow-up-right"})])]),w("li",vT,[mT,w("a",gT,[Je(pe(u(t)("Support","addonify-wishlist"))+" ",1),Z(it,{name:"arrow-up-right"})])]),w("li",yT,[bT,w("a",_T,[Je(pe(u(t)("Report an issue","addonify-wishlist"))+" ",1),Z(it,{name:"arrow-up-right"})])]),w("li",wT,[CT,w("a",ST,[Je(pe(u(t)("Documentation","addonify-wishlist"))+" ",1),Z(it,{name:"arrow-up-right"})])]),w("li",$T,[ET,w("a",TT,[Je(pe(u(t)("Translate","addonify-wishlist"))+" ",1),Z(it,{name:"arrow-up-right"})])])])])]))}},OT={id:"app-sidebar"},_0={__name:"Sidebar",setup(e){return(t,n)=>(y(),O("aside",OT,[u(Tf)?(y(),O(ke,{key:0},[Z(HE),Z(lT)],64)):(y(),j(kT,{key:1}))]))}},AT={id:"app-routes"},xT={id:"adfy-navigation"},PT={class:"route-lists"},MT={class:"list"},IT=["innerHTML"],LT={key:1,class:"icon"},RT=w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"},[w("path",{d:"M1,4.75H3.736a3.728,3.728,0,0,0,7.195,0H23a1,1,0,0,0,0-2H10.931a3.728,3.728,0,0,0-7.195,0H1a1,1,0,0,0,0,2ZM7.333,2a1.75,1.75,0,1,1-1.75,1.75A1.752,1.752,0,0,1,7.333,2Z"}),w("path",{d:"M23,11H20.264a3.727,3.727,0,0,0-7.194,0H1a1,1,0,0,0,0,2H13.07a3.727,3.727,0,0,0,7.194,0H23a1,1,0,0,0,0-2Zm-6.333,2.75A1.75,1.75,0,1,1,18.417,12,1.752,1.752,0,0,1,16.667,13.75Z"}),w("path",{d:"M23,19.25H10.931a3.728,3.728,0,0,0-7.195,0H1a1,1,0,0,0,0,2H3.736a3.728,3.728,0,0,0,7.195,0H23a1,1,0,0,0,0-2ZM7.333,22a1.75,1.75,0,1,1,1.75-1.75A1.753,1.753,0,0,1,7.333,22Z"})],-1),BT=[RT],VT={class:"label"},NT={key:0,class:"list"},FT=w("span",{class:"icon"},[w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"},[w("path",{d:"M23.147,9.471,22.36,8.4A5.885,5.885,0,0,0,17.632,6H6.383A5.892,5.892,0,0,0,1.721,8.309L.9,9.383a4.418,4.418,0,0,0,.548,5.937l7.99,7.707a3.82,3.82,0,0,0,2.55.969,3.9,3.9,0,0,0,2.6-1l7.936-7.633A4.39,4.39,0,0,0,23.147,9.471Zm-2.4.107.787,1.074a2.388,2.388,0,0,1,.208.348H16.951a6.616,6.616,0,0,0-.372-1.4L15.939,8h1.693A3.878,3.878,0,0,1,20.747,9.578ZM11.99,20.088l-2.769-6.27A4.642,4.642,0,0,1,8.995,13h5.952a4.354,4.354,0,0,1-.176.647ZM9.1,11a4.652,4.652,0,0,1,.157-.529L10.241,8h3.544l.937,2.343a4.8,4.8,0,0,1,.2.657ZM3.311,9.521A3.884,3.884,0,0,1,6.383,8h1.7L7.4,9.729A6.57,6.57,0,0,0,7.033,11H2.245a2.322,2.322,0,0,1,.247-.4Zm-.5,4.333a2.374,2.374,0,0,1-.6-.854H6.983a6.874,6.874,0,0,0,.387,1.576l2.827,6.4Zm10.96,7.16L16.625,14.4a6.573,6.573,0,0,0,.344-1.4H21.8a2.5,2.5,0,0,1-.633.9Z"}),w("path",{d:"M12,4a1,1,0,0,0,1-1V1a1,1,0,0,0-2,0V3A1,1,0,0,0,12,4Z"}),w("path",{d:"M16.553,3.9A1,1,0,0,0,17.9,3.447l1-2a1,1,0,1,0-1.79-.894l-1,2A1,1,0,0,0,16.553,3.9Z"}),w("path",{d:"M6.105,3.447A1,1,0,0,0,7.9,2.553l-1-2a1,1,0,1,0-1.79.894Z"})])],-1),HT=w("span",{class:"label"},"Premium",-1),zT={class:"list"},jT=w("span",{class:"icon"},[w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"},[w("path",{d:"M19.5,10H19V9a3,3,0,0,0-3-3H4A3,3,0,0,0,1,9V19a5.006,5.006,0,0,0,5,5h8a5.009,5.009,0,0,0,4.9-4A3.6,3.6,0,0,0,23,16.5v-3A3.5,3.5,0,0,0,19.5,10ZM14,22H6a3,3,0,0,1-3-3V9A1,1,0,0,1,4,8H16a1,1,0,0,1,1,1V19A3,3,0,0,1,14,22Zm7-5.5A1.621,1.621,0,0,1,19,18V12a1.621,1.621,0,0,1,2,1.5ZM9,3V1a1,1,0,0,1,2,0V3A1,1,0,0,1,9,3Zm4,0V1a1,1,0,0,1,2,0V3A1,1,0,0,1,13,3ZM5,3V1A1,1,0,0,1,7,1V3A1,1,0,0,1,5,3Z"})])],-1),DT=w("span",{class:"label"},"Products",-1),w0={__name:"RouteLinks",setup(e){const t=uo(),n=o=>"/s/"+o;return(o,r)=>{const s=Kt("router-link");return y(),O("aside",AT,[w("nav",xT,[w("ul",PT,[(y(!0),O(ke,null,gt(u(t).data,(l,i)=>(y(),O("li",MT,[Z(s,{to:n(i)},{default:Q(()=>[l.icon!==""?(y(),O("span",{key:0,class:"icon",innerHTML:l.icon},null,8,IT)):(y(),O("span",LT,BT)),w("span",VT,pe(l.title?l.title:"No title ???"),1)]),_:2},1032,["to"])]))),256)),u(Tf)?(y(),O("li",NT,[Z(s,{to:"/upsell",class:"upsell-link"},{default:Q(()=>[FT,HT]),_:1})])):z("",!0),w("li",zT,[Z(s,{to:"/products"},{default:Q(()=>[jT,DT]),_:1})])])])])}}},KT={id:"adfy-hero"},UT={class:"content"},qT={class:"hero-title"},WT={class:"action"},ZT={class:"adfy-button review-link",href:"https://wordpress.org/support/plugin/addonify-wishlist/",target:"_blank"},GT={__name:"Hero",setup(e){const{__:t}=wp.i18n;return(n,o)=>(y(),O("section",KT,[w("div",UT,[w("h3",qT,pe(u(t)("Do you have a problem? Help is only a mouse click away!","addonify-wishlist")),1)]),w("div",WT,[w("a",ZT,[Je(pe(u(t)("Get Help","addonify-wishlist"))+" ",1),Z(it,{name:"question",size:"20px"})])])]))}},YT=["data_loading"],XT={__name:"Setting",setup(e){const t=uo();return We(()=>{t.haveSettingsStateInMemory||t.fetchSettings()}),(n,o)=>{const r=Ra;return y(),O(ke,null,[Z(GT),w("section",{id:"app-divider",class:"app-divider",data_loading:u(t).status.isLoading},[u(t).status.isLoading?(y(),j(r,{key:0,rows:30,animated:""})):(y(),O(ke,{key:1},[Z(w0),Z(LE,{section:u(t).data,reactiveState:u(t).settings},null,8,["section","reactiveState"])],64)),Z(_0)],8,YT)],64)}}},{apiFetch:Zl}=wp,{__:yo}=wp.i18n,C0=Qi({id:"Product",state:()=>({allAddons:{},allProductSlugStatus:{},hotAddons:{},generalAddons:{},installedAddons:{},status:{isFetching:!0,isFetchingAllInstalledAddons:!0,isSettingAddonStatus:!0}}),getters:{isLoading:e=>uo().status.isLoading||e.status.isFetching||e.status.isFetchingAllInstalledAddons||e.status.isSettingAddonStatus},actions:{async fetchProductList(){let e=yo("Error: couldn't fetch recommended plugins list.","addonify-wishlist");try{const t=await fetch(gS,{method:"GET"}),n=await t.json();t.status==200?(console.log("💥 Github repo fetched successfully."),this.processRecommendedPluginsList(n),this.status.isFetching=!1):(console.log("Couldn't fetch Github repo "+t),ot.error({message:e,offset:50,duration:1e4}))}catch(t){console.log(t),ot.error({message:e,offset:50,duration:1e4}),this.status.isFetching=!1}},processRecommendedPluginsList(e){console.log("=> Processing the list that was retrived....");let t=yo("Error: couldn't process the recommended plugins list.","addonify-wishlist");this.hotAddons=e.data.hot,this.generalAddons=e.data.general,this.allAddons={...this.hotAddons,...this.generalAddons},typeof this.allAddons=="object"?Object.keys(this.allAddons).forEach(n=>{this.allProductSlugStatus[n]="null"}):(console.log("💥 Couldn't process the list plugins list."),ot.error({message:t,offset:50,duration:1e4}))},async fetchInstalledAddons(){let e=yo("Error: couldn't fetch installed plugins list.","addonify-wishlist");console.log("=> Getting the list of all plugins installed on the site....");try{const t=await Zl({method:"GET",path:"/wp/v2/plugins",headers:Wn});console.log("=> Received the list of all installed plugins...."),this.installedAddons=t,this.setAddonStatusFlag(Object.keys(this.allProductSlugStatus)),this.status.isFetchingAllInstalledAddons=!1}catch(t){console.log(t),this.status.isFetchingAllInstalledAddons=!1,ot.error({message:e,offset:50,duration:1e4})}},setAddonStatusFlag(e){typeof this.installedAddons=="object"&&this.installedAddons.length>0?(console.log("=> Setting the status of the addon."),e.forEach(t=>{let n=this.installedAddons.find(o=>o.textdomain==t);n?this.allProductSlugStatus[t]=n.status:this.allProductSlugStatus[t]="not-installed"})):console.log("=> Bailing!!! The installed addons list is empty."),console.log("💥 Done setting the status of the addon."),this.status.isSettingAddonStatus=!1},async handleAddonInstallation(e){let t=yo("Plugin installed successfully.","addonify-wishlist"),n=yo("Error: couldn't install the plugin.","addonify-wishlist");try{console.log(`=> Trying to install plugin ${e}...`);const o=await Zl({method:"POST",path:"/wp/v2/plugins",headers:Wn,data:{slug:e,status:"active"}});if(o.status==="active")return console.log(`=> Plugin ${e} installed successfully.`),this.allProductSlugStatus[e]="active",ot.success({message:t,offset:50,duration:3e3}),await o}catch(o){return console.log(o),this.status.isWaitingForInstallation=!1,ot.error({message:n,offset:50,duration:1e4}),await o}},async updateAddonStatus(e){let t=yo("Plugin activated successfully.","addonify-wishlist"),n=yo("Error: couldn't activate the plugin.","addonify-wishlist");try{console.log(`=> Trying to set the status of plugin ${e}...`);const o=await Zl({method:"POST",path:`/wp/v2/plugins/${e}`,headers:Wn,data:{status:"active",plugin:`${e}/${e}`}});if(o.status=="active")return console.log(`=> Plugin ${e} activated successfully.`),this.allProductSlugStatus[e]="active",ot.success({message:t,offset:50,duration:3e3}),await o}catch(o){return console.log(o),ot.error({message:n,offset:50,duration:1e4}),await o}}}}),pd=(e,t=30)=>e.length>t?e=e.substring(0,t)+"...":e,QT={class:"adfy-product-card"},JT={class:"adfy-category"},ek={class:"adfy-product-box"},tk={class:"adfy-product-thumb"},nk=["src","alt"],ok={class:"content"},rk=["innerHTML"],sk=["innerHTML"],lk={class:"adfy-product-actions"},ik={__name:"Recommended",props:{slug:{type:String,required:!0},name:{type:String,required:!1},description:{type:String,required:!1},category:{type:String,required:!1},thumb:{type:String,required:!1},status:{type:String,required:!1}},setup(e){const t=e,{__:n}=wp.i18n,o=C0(),{slug:r,name:s,thumb:l,description:i,category:a}=t,c=D(!1),d=D(!1),f=D(!1),p=D(!1),m=n("Activate now","addonify-wishlist"),v=n("Activating...","addonify-wishlist"),h=n("Install now","addonify-wishlist"),b=n("Installing...","addonify-wishlist"),g=n("Already installed","addonify-wishlist"),$=P=>{c.value=!0,f.value=!0;try{o.updateAddonStatus(P).status=="active"&&(c.value=!1,f.value=!1,d.value=!0)}catch{c.value=!1,f.value=!1,d.value=!1}},C=async P=>{c.value=!0,p.value=!0;try{(await o.handleAddonInstallation(P)).status=="active"&&(c.value=!1,p.value=!1,d.value=!0)}catch{c.value=!1,p.value=!1,d.value=!1}};return(P,T)=>{const A=ns;return y(),O("div",QT,[w("span",JT,pe(u(a)),1),w("div",ek,[w("figure",tk,[w("img",{src:u(l),alt:u(r)},null,8,nk)]),w("div",ok,[w("h3",{class:"adfy-product-title",innerHTML:u(pd)(u(s),65)},null,8,rk),w("p",{class:"adfy-product-description",innerHTML:u(pd)(u(i),100)},null,8,sk),w("div",lk,[t.status=="active"||t.status=="network-active"?(y(),j(A,{key:0,size:"large",id:u(r),plain:"",disabled:""},{default:Q(()=>[Je(pe(u(g)),1)]),_:1},8,["id"])):t.status=="inactive"?(y(),j(A,{key:1,type:"success",size:"large",id:u(r),plain:"",loading:c.value,disabled:d.value,onClick:T[0]||(T[0]=k=>$(u(r)))},{default:Q(()=>[Je(pe(f.value?u(v):u(m)),1)]),_:1},8,["id","loading","disabled"])):(y(),j(A,{key:2,type:"primary",size:"large",id:u(r),plain:"",loading:c.value,disabled:d.value,onClick:T[1]||(T[1]=k=>C(u(r)))},{default:Q(()=>[Je(pe(p.value?u(b):u(h)),1)]),_:1},8,["id","loading","disabled"]))])])])])}}},ak=["data_loading"],uk={id:"app-main app-primary",class:"app-primary"},ck={class:"adfy-jumbo-boxes"},dk={class:"adfy-jumbo-box"},fk={id:"recommended-product-list"},pk={__name:"Products",setup(e){const{__:t}=wp.i18n,n=uo(),o=C0(),r=!0,s=t("Recommended products","addonify-wishlist"),l=()=>{window.scrollTo({top:0,behavior:"smooth"})};return Ki(()=>{typeof o.installedAddons=="object"?Object.keys(o.installedAddons).length===0&&o.fetchInstalledAddons():console.log("Bailing. Couldn't identify the type of installedAddons.")}),We(()=>{l(),n.haveSettingsStateInMemory||n.fetchSettings(),typeof o.allAddons=="object"?Object.keys(o.allAddons).length===0&&o.fetchProductList():console.log("Bailing. Couldn't identify the type of allAddons.")}),(i,a)=>{const c=Ra;return y(),O("section",{id:"app-divider",class:"app-divider",data_loading:u(o).isLoading},[u(o).isLoading?(y(),j(c,{key:0,rows:30,animated:""})):(y(),O(ke,{key:1},[Z(w0),w("main",uk,[Z(y0,{id:"recommended-products"},{default:Q(()=>[w("div",ck,[w("div",dk,[Z(b0,{title:u(s),disableDocs:r},null,8,["title"]),w("div",fk,[(y(!0),O(ke,null,gt(u(o).hotAddons,(d,f)=>(y(),j(ik,{slug:f,name:d.name,description:d.description,thumb:d.thumbnail,category:d.category,status:u(o).allProductSlugStatus[f]},null,8,["slug","name","description","thumb","category","status"]))),256))])])])]),_:1})])],64)),Z(_0)],8,ak)}}},hk={id:"dead-end"},vk={class:"adfy-heading"},mk={class:"adfy-description"},gk=w("span",{class:"icon"},[w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18"},[w("path",{d:"M23.707,22.293L3.482,2.068c.165-.044,.339-.068,.518-.068H13c.552,0,1-.448,1-1s-.448-1-1-1H4C1.794,0,0,1.794,0,4V13c0,.552,.448,1,1,1s1-.448,1-1V4c0-.179,.024-.352,.068-.518L22.293,23.707c.195,.195,.451,.293,.707,.293s.512-.098,.707-.293c.391-.391,.391-1.023,0-1.414Z"})])],-1),yk={__name:"404",setup(e){let{__:t}=wp.i18n;const n=()=>{window.scrollTo({top:0,behavior:"smooth"})};return We(()=>{n()}),(o,r)=>{const s=Kt("router-link");return y(),O("section",hk,[w("h3",vk,pe(u(t)("404","addonify-wishlist")),1),w("p",mk,pe(u(t)("Oops, something seems broken. We can't find the page you're looking for.","addonify-wishlist")),1),Z(s,{to:"/",class:"adfy-button"},{default:Q(()=>[gk,Je(" "+pe(u(t)("Go to home","addonify-wishlist")),1)]),_:1})])}}},bk=[{path:"/",name:"Index",component:F$,redirect:"/s/general"},{path:"/s/:slug",name:"Setting",component:XT}],_k=[{path:"/products",name:"Products",component:pk}],wk=[{path:"/:catchAll(.*)*",name:"404",component:yk}],Ck=[...bk,..._k,...wk],Sk=R$({history:XS(),routes:Ck}),$k=sv(),Na=nv(MS);Na.use($k);Na.use(Sk);Na.mount("#addonify-wishlist-app")});export default Ek();
+//# sourceMappingURL=main-1abcc74a.js.map
diff --git a/admin/app/dist/assets/main-1abcc74a.js.map b/admin/app/dist/assets/main-1abcc74a.js.map
new file mode 100644
index 0000000..b16eee3
--- /dev/null
+++ b/admin/app/dist/assets/main-1abcc74a.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"main-1abcc74a.js","sources":["../../../../node_modules/@vue/shared/dist/shared.esm-bundler.js","../../../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","../../../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js","../../../../node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js","../../../../node_modules/pinia/node_modules/vue-demi/lib/index.mjs","../../../../node_modules/pinia/dist/pinia.mjs","../../src/helpers/global.ts","../../../../node_modules/element-plus/es/utils/dom/event.mjs","../../../../node_modules/@vueuse/shared/index.mjs","../../../../node_modules/@vueuse/core/index.mjs","../../../../node_modules/element-plus/es/utils/browser.mjs","../../../../node_modules/element-plus/es/utils/dom/position.mjs","../../../../node_modules/lodash-es/_freeGlobal.js","../../../../node_modules/lodash-es/_root.js","../../../../node_modules/lodash-es/_Symbol.js","../../../../node_modules/lodash-es/_getRawTag.js","../../../../node_modules/lodash-es/_objectToString.js","../../../../node_modules/lodash-es/_baseGetTag.js","../../../../node_modules/lodash-es/isObjectLike.js","../../../../node_modules/lodash-es/isSymbol.js","../../../../node_modules/lodash-es/_arrayMap.js","../../../../node_modules/lodash-es/isArray.js","../../../../node_modules/lodash-es/_baseToString.js","../../../../node_modules/lodash-es/_trimmedEndIndex.js","../../../../node_modules/lodash-es/_baseTrim.js","../../../../node_modules/lodash-es/isObject.js","../../../../node_modules/lodash-es/toNumber.js","../../../../node_modules/lodash-es/isFunction.js","../../../../node_modules/lodash-es/_coreJsData.js","../../../../node_modules/lodash-es/_isMasked.js","../../../../node_modules/lodash-es/_toSource.js","../../../../node_modules/lodash-es/_baseIsNative.js","../../../../node_modules/lodash-es/_getValue.js","../../../../node_modules/lodash-es/_getNative.js","../../../../node_modules/lodash-es/_WeakMap.js","../../../../node_modules/lodash-es/_baseCreate.js","../../../../node_modules/lodash-es/_copyArray.js","../../../../node_modules/lodash-es/_defineProperty.js","../../../../node_modules/lodash-es/_arrayEach.js","../../../../node_modules/lodash-es/_isIndex.js","../../../../node_modules/lodash-es/_baseAssignValue.js","../../../../node_modules/lodash-es/eq.js","../../../../node_modules/lodash-es/_assignValue.js","../../../../node_modules/lodash-es/_copyObject.js","../../../../node_modules/lodash-es/isLength.js","../../../../node_modules/lodash-es/isArrayLike.js","../../../../node_modules/lodash-es/_isPrototype.js","../../../../node_modules/lodash-es/_baseTimes.js","../../../../node_modules/lodash-es/_baseIsArguments.js","../../../../node_modules/lodash-es/isArguments.js","../../../../node_modules/lodash-es/stubFalse.js","../../../../node_modules/lodash-es/isBuffer.js","../../../../node_modules/lodash-es/_baseIsTypedArray.js","../../../../node_modules/lodash-es/_baseUnary.js","../../../../node_modules/lodash-es/_nodeUtil.js","../../../../node_modules/lodash-es/isTypedArray.js","../../../../node_modules/lodash-es/_arrayLikeKeys.js","../../../../node_modules/lodash-es/_overArg.js","../../../../node_modules/lodash-es/_nativeKeys.js","../../../../node_modules/lodash-es/_baseKeys.js","../../../../node_modules/lodash-es/keys.js","../../../../node_modules/lodash-es/_nativeKeysIn.js","../../../../node_modules/lodash-es/_baseKeysIn.js","../../../../node_modules/lodash-es/keysIn.js","../../../../node_modules/lodash-es/_isKey.js","../../../../node_modules/lodash-es/_nativeCreate.js","../../../../node_modules/lodash-es/_hashClear.js","../../../../node_modules/lodash-es/_hashDelete.js","../../../../node_modules/lodash-es/_hashGet.js","../../../../node_modules/lodash-es/_hashHas.js","../../../../node_modules/lodash-es/_hashSet.js","../../../../node_modules/lodash-es/_Hash.js","../../../../node_modules/lodash-es/_listCacheClear.js","../../../../node_modules/lodash-es/_assocIndexOf.js","../../../../node_modules/lodash-es/_listCacheDelete.js","../../../../node_modules/lodash-es/_listCacheGet.js","../../../../node_modules/lodash-es/_listCacheHas.js","../../../../node_modules/lodash-es/_listCacheSet.js","../../../../node_modules/lodash-es/_ListCache.js","../../../../node_modules/lodash-es/_Map.js","../../../../node_modules/lodash-es/_mapCacheClear.js","../../../../node_modules/lodash-es/_isKeyable.js","../../../../node_modules/lodash-es/_getMapData.js","../../../../node_modules/lodash-es/_mapCacheDelete.js","../../../../node_modules/lodash-es/_mapCacheGet.js","../../../../node_modules/lodash-es/_mapCacheHas.js","../../../../node_modules/lodash-es/_mapCacheSet.js","../../../../node_modules/lodash-es/_MapCache.js","../../../../node_modules/lodash-es/memoize.js","../../../../node_modules/lodash-es/_memoizeCapped.js","../../../../node_modules/lodash-es/_stringToPath.js","../../../../node_modules/lodash-es/toString.js","../../../../node_modules/lodash-es/_castPath.js","../../../../node_modules/lodash-es/_toKey.js","../../../../node_modules/lodash-es/_baseGet.js","../../../../node_modules/lodash-es/get.js","../../../../node_modules/lodash-es/_arrayPush.js","../../../../node_modules/lodash-es/_getPrototype.js","../../../../node_modules/lodash-es/_stackClear.js","../../../../node_modules/lodash-es/_stackDelete.js","../../../../node_modules/lodash-es/_stackGet.js","../../../../node_modules/lodash-es/_stackHas.js","../../../../node_modules/lodash-es/_stackSet.js","../../../../node_modules/lodash-es/_Stack.js","../../../../node_modules/lodash-es/_baseAssign.js","../../../../node_modules/lodash-es/_baseAssignIn.js","../../../../node_modules/lodash-es/_cloneBuffer.js","../../../../node_modules/lodash-es/_arrayFilter.js","../../../../node_modules/lodash-es/stubArray.js","../../../../node_modules/lodash-es/_getSymbols.js","../../../../node_modules/lodash-es/_copySymbols.js","../../../../node_modules/lodash-es/_getSymbolsIn.js","../../../../node_modules/lodash-es/_copySymbolsIn.js","../../../../node_modules/lodash-es/_baseGetAllKeys.js","../../../../node_modules/lodash-es/_getAllKeys.js","../../../../node_modules/lodash-es/_getAllKeysIn.js","../../../../node_modules/lodash-es/_DataView.js","../../../../node_modules/lodash-es/_Promise.js","../../../../node_modules/lodash-es/_Set.js","../../../../node_modules/lodash-es/_getTag.js","../../../../node_modules/lodash-es/_initCloneArray.js","../../../../node_modules/lodash-es/_Uint8Array.js","../../../../node_modules/lodash-es/_cloneArrayBuffer.js","../../../../node_modules/lodash-es/_cloneDataView.js","../../../../node_modules/lodash-es/_cloneRegExp.js","../../../../node_modules/lodash-es/_cloneSymbol.js","../../../../node_modules/lodash-es/_cloneTypedArray.js","../../../../node_modules/lodash-es/_initCloneByTag.js","../../../../node_modules/lodash-es/_initCloneObject.js","../../../../node_modules/lodash-es/_baseIsMap.js","../../../../node_modules/lodash-es/isMap.js","../../../../node_modules/lodash-es/_baseIsSet.js","../../../../node_modules/lodash-es/isSet.js","../../../../node_modules/lodash-es/_baseClone.js","../../../../node_modules/lodash-es/cloneDeep.js","../../../../node_modules/lodash-es/_setCacheAdd.js","../../../../node_modules/lodash-es/_setCacheHas.js","../../../../node_modules/lodash-es/_SetCache.js","../../../../node_modules/lodash-es/_arraySome.js","../../../../node_modules/lodash-es/_cacheHas.js","../../../../node_modules/lodash-es/_equalArrays.js","../../../../node_modules/lodash-es/_mapToArray.js","../../../../node_modules/lodash-es/_setToArray.js","../../../../node_modules/lodash-es/_equalByTag.js","../../../../node_modules/lodash-es/_equalObjects.js","../../../../node_modules/lodash-es/_baseIsEqualDeep.js","../../../../node_modules/lodash-es/_baseIsEqual.js","../../../../node_modules/lodash-es/now.js","../../../../node_modules/lodash-es/debounce.js","../../../../node_modules/lodash-es/fromPairs.js","../../../../node_modules/lodash-es/isEqual.js","../../../../node_modules/lodash-es/isNil.js","../../../../node_modules/lodash-es/isUndefined.js","../../../../node_modules/element-plus/es/utils/types.mjs","../../../../node_modules/element-plus/es/utils/strings.mjs","../../../../node_modules/element-plus/es/utils/objects.mjs","../../../../node_modules/element-plus/es/utils/error.mjs","../../../../node_modules/element-plus/es/utils/dom/style.mjs","../../../../node_modules/element-plus/es/utils/dom/scroll.mjs","../../../../node_modules/@element-plus/icons-vue/dist/index.js","../../../../node_modules/element-plus/es/utils/vue/props/runtime.mjs","../../../../node_modules/element-plus/es/utils/vue/icon.mjs","../../../../node_modules/element-plus/es/utils/vue/install.mjs","../../../../node_modules/element-plus/es/constants/aria.mjs","../../../../node_modules/element-plus/es/constants/event.mjs","../../../../node_modules/element-plus/es/constants/size.mjs","../../../../node_modules/element-plus/es/utils/vue/size.mjs","../../../../node_modules/element-plus/es/utils/vue/validator.mjs","../../../../node_modules/element-plus/es/utils/i18n.mjs","../../../../node_modules/element-plus/es/utils/typescript.mjs","../../../../node_modules/element-plus/es/hooks/use-attrs/index.mjs","../../../../node_modules/element-plus/es/hooks/use-deprecated/index.mjs","../../../../node_modules/element-plus/es/hooks/use-focus/index.mjs","../../../../node_modules/element-plus/es/locale/lang/en.mjs","../../../../node_modules/element-plus/es/hooks/use-locale/index.mjs","../../../../node_modules/element-plus/es/hooks/use-namespace/index.mjs","../../../../node_modules/element-plus/es/hooks/use-model-toggle/index.mjs","../../../../node_modules/element-plus/es/hooks/use-prop/index.mjs","../../../../node_modules/element-plus/node_modules/@popperjs/core/dist/index.mjs","../../../../node_modules/element-plus/es/hooks/use-popper/index.mjs","../../../../node_modules/element-plus/es/hooks/use-throttle-render/index.mjs","../../../../node_modules/element-plus/es/hooks/use-timeout/index.mjs","../../../../node_modules/element-plus/es/hooks/use-id/index.mjs","../../../../node_modules/element-plus/es/hooks/use-escape-keydown/index.mjs","../../../../node_modules/element-plus/es/hooks/use-popper-container/index.mjs","../../../../node_modules/element-plus/es/hooks/use-delayed-toggle/index.mjs","../../../../node_modules/element-plus/es/hooks/use-forward-ref/index.mjs","../../../../node_modules/element-plus/es/hooks/use-z-index/index.mjs","../../../../node_modules/element-plus/es/hooks/use-cursor/index.mjs","../../../../node_modules/element-plus/es/hooks/use-size/index.mjs","../../../../node_modules/element-plus/es/components/config-provider/src/constants.mjs","../../../../node_modules/element-plus/es/components/config-provider/src/hooks/use-global-config.mjs","../../../../node_modules/element-plus/es/components/config-provider/src/config-provider-props.mjs","../../../../node_modules/element-plus/es/components/config-provider/src/config-provider.mjs","../../../../node_modules/element-plus/es/_virtual/plugin-vue_export-helper.mjs","../../../../node_modules/element-plus/es/components/icon/src/icon.mjs","../../../../node_modules/element-plus/es/components/icon/src/icon2.mjs","../../../../node_modules/element-plus/es/components/icon/index.mjs","../../../../node_modules/element-plus/es/components/form/src/constants.mjs","../../../../node_modules/element-plus/es/components/form/src/hooks/use-form-common-props.mjs","../../../../node_modules/element-plus/es/components/form/src/hooks/use-form-item.mjs","../../../../node_modules/element-plus/es/components/input/src/utils.mjs","../../../../node_modules/element-plus/es/components/input/src/input.mjs","../../../../node_modules/element-plus/es/components/input/src/input2.mjs","../../../../node_modules/element-plus/es/components/input/index.mjs","../../../../node_modules/element-plus/es/components/scrollbar/src/util.mjs","../../../../node_modules/element-plus/es/components/scrollbar/src/constants.mjs","../../../../node_modules/element-plus/es/components/scrollbar/src/thumb.mjs","../../../../node_modules/element-plus/es/components/scrollbar/src/thumb2.mjs","../../../../node_modules/element-plus/es/components/scrollbar/src/bar.mjs","../../../../node_modules/element-plus/es/components/scrollbar/src/bar2.mjs","../../../../node_modules/element-plus/es/components/scrollbar/src/scrollbar.mjs","../../../../node_modules/element-plus/es/components/scrollbar/src/scrollbar2.mjs","../../../../node_modules/element-plus/es/components/scrollbar/index.mjs","../../../../node_modules/element-plus/es/components/popper/src/constants.mjs","../../../../node_modules/element-plus/es/components/popper/src/popper.mjs","../../../../node_modules/element-plus/es/components/popper/src/popper2.mjs","../../../../node_modules/element-plus/es/components/popper/src/arrow.mjs","../../../../node_modules/element-plus/es/components/popper/src/arrow2.mjs","../../../../node_modules/element-plus/es/components/slot/src/only-child.mjs","../../../../node_modules/element-plus/es/components/popper/src/trigger.mjs","../../../../node_modules/element-plus/es/components/popper/src/trigger2.mjs","../../../../node_modules/element-plus/es/components/focus-trap/src/tokens.mjs","../../../../node_modules/element-plus/es/components/focus-trap/src/utils.mjs","../../../../node_modules/element-plus/es/components/focus-trap/src/focus-trap.mjs","../../../../node_modules/element-plus/es/components/popper/src/content.mjs","../../../../node_modules/element-plus/es/components/popper/src/utils.mjs","../../../../node_modules/element-plus/es/components/popper/src/composables/use-content.mjs","../../../../node_modules/element-plus/es/components/popper/src/composables/use-content-dom.mjs","../../../../node_modules/element-plus/es/components/popper/src/composables/use-focus-trap.mjs","../../../../node_modules/element-plus/es/components/popper/src/content2.mjs","../../../../node_modules/element-plus/es/components/popper/index.mjs","../../../../node_modules/element-plus/es/components/tooltip/src/constants.mjs","../../../../node_modules/element-plus/es/components/tooltip/src/content.mjs","../../../../node_modules/element-plus/es/components/tooltip/src/trigger.mjs","../../../../node_modules/element-plus/es/components/tooltip/src/tooltip.mjs","../../../../node_modules/element-plus/es/components/tooltip/src/utils.mjs","../../../../node_modules/element-plus/es/components/tooltip/src/trigger2.mjs","../../../../node_modules/element-plus/es/components/tooltip/src/content2.mjs","../../../../node_modules/element-plus/es/components/tooltip/src/tooltip2.mjs","../../../../node_modules/element-plus/es/components/tooltip/index.mjs","../../../../node_modules/element-plus/es/components/badge/src/badge.mjs","../../../../node_modules/element-plus/es/components/badge/src/badge2.mjs","../../../../node_modules/element-plus/es/components/badge/index.mjs","../../../../node_modules/element-plus/es/components/button/src/constants.mjs","../../../../node_modules/element-plus/es/components/button/src/use-button.mjs","../../../../node_modules/element-plus/es/components/button/src/button.mjs","../../../../node_modules/@ctrl/tinycolor/dist/module/util.js","../../../../node_modules/@ctrl/tinycolor/dist/module/conversion.js","../../../../node_modules/@ctrl/tinycolor/dist/module/css-color-names.js","../../../../node_modules/@ctrl/tinycolor/dist/module/format-input.js","../../../../node_modules/@ctrl/tinycolor/dist/module/index.js","../../../../node_modules/element-plus/es/components/button/src/button-custom.mjs","../../../../node_modules/element-plus/es/components/button/src/button2.mjs","../../../../node_modules/element-plus/es/components/button/src/button-group.mjs","../../../../node_modules/element-plus/es/components/button/src/button-group2.mjs","../../../../node_modules/element-plus/es/components/button/index.mjs","../../../../node_modules/element-plus/es/directives/click-outside/index.mjs","../../../../node_modules/element-plus/es/directives/repeat-click/index.mjs","../../../../node_modules/element-plus/es/components/radio/src/radio.mjs","../../../../node_modules/element-plus/es/components/radio/src/constants.mjs","../../../../node_modules/element-plus/es/components/radio/src/use-radio.mjs","../../../../node_modules/element-plus/es/components/radio/src/radio2.mjs","../../../../node_modules/element-plus/es/components/radio/src/radio-button.mjs","../../../../node_modules/element-plus/es/components/radio/src/radio-button2.mjs","../../../../node_modules/element-plus/es/components/radio/src/radio-group.mjs","../../../../node_modules/element-plus/es/components/radio/src/radio-group2.mjs","../../../../node_modules/element-plus/es/components/radio/index.mjs","../../../../node_modules/element-plus/es/components/tag/src/tag.mjs","../../../../node_modules/element-plus/es/components/tag/src/tag2.mjs","../../../../node_modules/element-plus/es/components/tag/index.mjs","../../../../node_modules/element-plus/es/components/color-picker/src/props/alpha-slider.mjs","../../../../node_modules/element-plus/es/components/color-picker/src/utils/draggable.mjs","../../../../node_modules/element-plus/es/components/color-picker/src/composables/use-alpha-slider.mjs","../../../../node_modules/element-plus/es/components/color-picker/src/components/alpha-slider.mjs","../../../../node_modules/element-plus/es/components/color-picker/src/components/hue-slider.mjs","../../../../node_modules/element-plus/es/components/color-picker/src/color-picker.mjs","../../../../node_modules/element-plus/es/components/color-picker/src/utils/color.mjs","../../../../node_modules/element-plus/es/components/color-picker/src/components/predefine.mjs","../../../../node_modules/element-plus/es/components/color-picker/src/components/sv-panel.mjs","../../../../node_modules/element-plus/es/components/color-picker/src/color-picker2.mjs","../../../../node_modules/element-plus/es/components/color-picker/index.mjs","../../../../node_modules/element-plus/es/components/input-number/src/input-number.mjs","../../../../node_modules/element-plus/es/components/input-number/src/input-number2.mjs","../../../../node_modules/element-plus/es/components/input-number/index.mjs","../../../../node_modules/element-plus/es/components/select/src/token.mjs","../../../../node_modules/element-plus/es/components/select/src/useOption.mjs","../../../../node_modules/element-plus/es/components/select/src/option.mjs","../../../../node_modules/element-plus/es/components/select/src/select-dropdown.mjs","../../../../node_modules/element-plus/es/components/select/src/useSelect.mjs","../../../../node_modules/element-plus/es/components/select/src/options.mjs","../../../../node_modules/element-plus/es/components/select/src/select.mjs","../../../../node_modules/element-plus/es/components/select/src/option-group.mjs","../../../../node_modules/element-plus/es/components/select/index.mjs","../../../../node_modules/element-plus/es/components/popconfirm/src/popconfirm.mjs","../../../../node_modules/element-plus/es/components/popconfirm/src/popconfirm2.mjs","../../../../node_modules/element-plus/es/components/popconfirm/index.mjs","../../../../node_modules/element-plus/es/components/progress/src/progress.mjs","../../../../node_modules/element-plus/es/components/progress/src/progress2.mjs","../../../../node_modules/element-plus/es/components/progress/index.mjs","../../../../node_modules/element-plus/es/components/skeleton/src/skeleton.mjs","../../../../node_modules/element-plus/es/components/skeleton/src/skeleton-item.mjs","../../../../node_modules/element-plus/es/components/skeleton/src/skeleton-item2.mjs","../../../../node_modules/element-plus/es/components/skeleton/src/skeleton2.mjs","../../../../node_modules/element-plus/es/components/skeleton/index.mjs","../../../../node_modules/element-plus/es/components/slider/src/constants.mjs","../../../../node_modules/element-plus/es/components/slider/src/slider.mjs","../../../../node_modules/element-plus/es/components/slider/src/composables/use-lifecycle.mjs","../../../../node_modules/element-plus/es/components/slider/src/composables/use-marks.mjs","../../../../node_modules/element-plus/es/components/slider/src/composables/use-slide.mjs","../../../../node_modules/element-plus/es/components/slider/src/composables/use-slider-button.mjs","../../../../node_modules/element-plus/es/components/slider/src/composables/use-stops.mjs","../../../../node_modules/element-plus/es/components/slider/src/composables/use-watch.mjs","../../../../node_modules/element-plus/es/components/slider/src/button.mjs","../../../../node_modules/element-plus/es/components/slider/src/button2.mjs","../../../../node_modules/element-plus/es/components/slider/src/marker.mjs","../../../../node_modules/element-plus/es/components/slider/src/slider2.mjs","../../../../node_modules/element-plus/es/components/slider/index.mjs","../../../../node_modules/element-plus/es/components/switch/src/switch.mjs","../../../../node_modules/element-plus/es/components/switch/src/switch2.mjs","../../../../node_modules/element-plus/es/components/switch/index.mjs","../../../../node_modules/element-plus/es/components/upload/src/constants.mjs","../../../../node_modules/element-plus/es/components/upload/src/ajax.mjs","../../../../node_modules/element-plus/es/components/upload/src/upload.mjs","../../../../node_modules/element-plus/es/components/upload/src/upload-list.mjs","../../../../node_modules/element-plus/es/components/upload/src/upload-list2.mjs","../../../../node_modules/element-plus/es/components/upload/src/upload-dragger.mjs","../../../../node_modules/element-plus/es/components/upload/src/upload-dragger2.mjs","../../../../node_modules/element-plus/es/components/upload/src/upload-content.mjs","../../../../node_modules/element-plus/es/components/upload/src/upload-content2.mjs","../../../../node_modules/element-plus/es/components/upload/src/use-handlers.mjs","../../../../node_modules/element-plus/es/components/upload/src/upload2.mjs","../../../../node_modules/element-plus/es/components/upload/index.mjs","../../../../node_modules/element-plus/es/components/message/src/message.mjs","../../../../node_modules/element-plus/es/components/message/src/instance.mjs","../../../../node_modules/element-plus/es/components/message/src/message2.mjs","../../../../node_modules/element-plus/es/components/message/src/method.mjs","../../../../node_modules/element-plus/es/components/message/index.mjs","../../src/helpers/endpoint.ts","../../src/helpers/api.ts","../../src/helpers/functions.ts","../../src/stores/settings.ts","../../src/layouts/Header.vue","../../src/layouts/Footer.vue","../../../../node_modules/vue-router/dist/vue-router.mjs","../../src/components/core/HelpTip.vue","../../src/components/controls/Switch.vue","../../src/components/controls/Radio.vue","../../src/components/controls/Select.vue","../../src/components/controls/Text.vue","../../src/components/controls/Number.vue","../../src/helpers/color.ts","../../src/components/controls/ColorControl.vue","../../src/components/controls/ActionButton.vue","../../src/components/controls/ImportOptions.vue","../../src/components/controls/ExportOptions.vue","../../src/components/controls/InvalidControl.vue","../../src/layouts/JumboBoxTitle.vue","../../src/layouts/JumboBoxContainer.vue","../../src/components/core/UpsellArrow.vue","../../src/stores/upsell.ts","../../src/components/partials/UpsellBanner.vue","../../src/components/partials/QuickLinks.vue","../../src/layouts/RouteLinks.vue","../../src/components/partials/Hero.vue","../../src/views/Setting.vue","../../src/stores/products.js","../../src/helpers/text.ts","../../src/layouts/Recommended.vue","../../src/views/Products.vue","../../src/views/404.vue","../../src/router/index.ts","../../src/main.js"],"sourcesContent":["/**\n * Make a map and return a function for checking if a key\n * is in that map.\n * IMPORTANT: all calls of this function must be prefixed with\n * \\/\\*#\\_\\_PURE\\_\\_\\*\\/\n * So that rollup can tree-shake them if necessary.\n */\nfunction makeMap(str, expectsLowerCase) {\n const map = Object.create(null);\n const list = str.split(',');\n for (let i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val];\n}\n\n/**\n * dev only flag -> name mapping\n */\nconst PatchFlagNames = {\n [1 /* PatchFlags.TEXT */]: `TEXT`,\n [2 /* PatchFlags.CLASS */]: `CLASS`,\n [4 /* PatchFlags.STYLE */]: `STYLE`,\n [8 /* PatchFlags.PROPS */]: `PROPS`,\n [16 /* PatchFlags.FULL_PROPS */]: `FULL_PROPS`,\n [32 /* PatchFlags.HYDRATE_EVENTS */]: `HYDRATE_EVENTS`,\n [64 /* PatchFlags.STABLE_FRAGMENT */]: `STABLE_FRAGMENT`,\n [128 /* PatchFlags.KEYED_FRAGMENT */]: `KEYED_FRAGMENT`,\n [256 /* PatchFlags.UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`,\n [512 /* PatchFlags.NEED_PATCH */]: `NEED_PATCH`,\n [1024 /* PatchFlags.DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`,\n [2048 /* PatchFlags.DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`,\n [-1 /* PatchFlags.HOISTED */]: `HOISTED`,\n [-2 /* PatchFlags.BAIL */]: `BAIL`\n};\n\n/**\n * Dev only\n */\nconst slotFlagsText = {\n [1 /* SlotFlags.STABLE */]: 'STABLE',\n [2 /* SlotFlags.DYNAMIC */]: 'DYNAMIC',\n [3 /* SlotFlags.FORWARDED */]: 'FORWARDED'\n};\n\nconst GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' +\n 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' +\n 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt';\nconst isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED);\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n // Split the content into individual lines but capture the newline sequence\n // that separated each line. This is important because the actual sequence is\n // needed to properly take into account the full line length for offset\n // comparison\n let lines = source.split(/(\\r?\\n)/);\n // Separate the lines and newline sequences into separate arrays for easier referencing\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count +=\n lines[i].length +\n ((newlineSequences[i] && newlineSequences[i].length) || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length)\n continue;\n const line = j + 1;\n res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`);\n const lineLength = lines[j].length;\n const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0;\n if (j === i) {\n // push underline\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(1, end > count ? lineLength - pad : end - start);\n res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));\n }\n else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + '^'.repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join('\\n');\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item)\n ? parseStringStyle(item)\n : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n }\n else if (isString(value)) {\n return value;\n }\n else if (isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*.*?\\*\\//gs;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText\n .replace(styleCommentRE, '')\n .split(listDelimiterRE)\n .forEach(item => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n let ret = '';\n if (!styles || isString(styles)) {\n return ret;\n }\n for (const key in styles) {\n const value = styles[key];\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n if (isString(value) || typeof value === 'number') {\n // only render valid values\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = '';\n if (isString(value)) {\n res = value;\n }\n else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + ' ';\n }\n }\n }\n else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + ' ';\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props)\n return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\n// These tag configs are shared between compiler-dom and runtime-dom, so they\n// https://developer.mozilla.org/en-US/docs/Web/HTML/Element\nconst HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +\n 'header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +\n 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +\n 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +\n 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +\n 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' +\n 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' +\n 'option,output,progress,select,textarea,details,dialog,menu,' +\n 'summary,template,blockquote,iframe,tfoot';\n// https://developer.mozilla.org/en-US/docs/Web/SVG/Element\nconst SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +\n 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +\n 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +\n 'feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +\n 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +\n 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +\n 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +\n 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' +\n 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +\n 'text,textPath,title,tspan,unknown,use,view';\nconst VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';\n/**\n * Compiler only.\n * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.\n */\nconst isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);\n/**\n * Compiler only.\n * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.\n */\nconst isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);\n/**\n * Compiler only.\n * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.\n */\nconst isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);\n\n/**\n * On the client we only need to offer special cases for boolean attributes that\n * have different names from their corresponding dom properties:\n * - itemscope -> N/A\n * - allowfullscreen -> allowFullscreen\n * - formnovalidate -> formNoValidate\n * - ismap -> isMap\n * - nomodule -> noModule\n * - novalidate -> noValidate\n * - readonly -> readOnly\n */\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs);\n/**\n * The full list is needed during SSR to produce the correct initial markup.\n */\nconst isBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs +\n `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,` +\n `loop,open,required,reversed,scoped,seamless,` +\n `checked,muted,multiple,selected`);\n/**\n * Boolean attributes should be included if the value is truthy or ''.\n * e.g. `
`+B+i+`
+ `)}}function O(i,t,d=""){clearTimeout(o);let s=addonifyWishlistJSObject.undoActionPrelabelText;s=s.replace("{product_name}",i);i=addonifyWishlistJSObject.undoActionLabel,t=` +`+s+` '+i+` -
`;R("#addonify-wishlist-undo-deleted-product").html(t),0`+M+i+`
- `)}}function D(d=!1){d=d||l;let s=[],e=B(L(z("product_ids")));return e&&e.forEach(function(i,t){return"object"!=typeof i?(s=e,!1):i.name===d?(s=e[t].product_ids,!1):void 0}),s}function O(d,s=!1){s=s||l;let e=B(L(z("product_ids")));var i,t;e?(e.forEach(function(i,t){return"object"!=typeof i?(e=d,!1):i.name===s?(e[t].product_ids=d,!1):void 0}),j("product_ids",e)):(e=[],t=S(),i=(new Date).getTime(),t={id:t,name:s,visibility:"private",created_at:i,product_ids:d},e.push(t),j("product_ids",e),j("wishlist_id",S()+1))}function S(){var i=z("wishlist_id");return i?parseInt(i):0}function j(i,t){"object"==typeof t&&(t=JSON.stringify(t));var d=k;localStorage.setItem(s+"_"+d+"_"+i,t)}function L(i){let t;try{t=JSON.parse(i)}catch(i){return!1}return t}function z(i){var t=k;return localStorage.getItem(s+"_"+t+"_"+i)}function B(d){if(null===d||"object"!=typeof d)return!1;{let t=new Array;var i=Object.keys(d);return 0`+addonifyWishlistJSObject.emptyWishlistText+i+`
- `)}}function y(i){i=w('[data-product_id="'+i+'"].addonify-add-to-wishlist-btn');let t=addonifyWishlistJSObject.initialAddToWishlistButtonLabel;i.each(function(i,s){w(s).attr("data-wishlist_label")&&(t=w(s).attr("data-wishlist_label")),w(s)&&!w(s).hasClass("addonify-custom-wishlist-btn")&&(w(s).removeClass("added-to-wishlist"),w(s).find("span.addonify-wishlist-btn-label").text(t),w(s).find("i.icon.adfy-wishlist-icon").removeClass("heart-style-one").addClass("heart-o-style-one"))}),w(".woocommerce-notices-wrapper")&&w(".woocommerce-notices-wrapper").remove()}w(".addonify-add-to-wishlist-btn button.added-to-wishlist").attr("disabled",!0),a.on("click",".addonify-wishlist-login-popup-enabled",function(i){i.preventDefault(),r(addonifyWishlistJSObject.loginMessage,"","error")}),addonifyWishlistJSObject.proExists||a.on("click",".addonify-wishlist-ajax-add-to-wishlist",function(i){i.preventDefault();var t,i=w(this);i.hasClass("added-to-wishlist")?addonifyWishlistJSObject.removeAlreadyAddedProductFromWishlist?s(i):r(addonifyWishlistJSObject.popupAlreadyInWishlistText,i.data("product_name"),"success"):(t=i,i={action:addonifyWishlistJSObject.addToWishlistAction,id:t.data("product_id"),wishlist_id:t.data("wishlist_id"),nonce:addonifyWishlistJSObject.nonce},t.addClass("loading"),w.post(addonifyWishlistJSObject.ajax_url,i,function(i){var s;1==i.success?(w(document).trigger("addonify_added_to_wishlist",[{productID:t.data("product_id"),wishlistCount:i.wishlist_count,sidebarData:i.sidebar_data}]),f(i.wishlist_count),t.addClass("added-to-wishlist"),"none"!==addonifyWishlistJSObject.afterAddToWishlistAction&&r(i.message,t.data("product_name"),"success"),(s=w("#addonify-wishlist-undo-deleted-product-link"))&&s.parent("#addonify-wishlist-undo-deleted-product-text").remove(),0- ` + product_removed_text + ` - ` + undo_text + ` -
`; - $('#addonify-wishlist-undo-deleted-product').html(undo_div); - if ( parseInt(undoNoticeTimeout) > 0 ) { - undoTimeout = setTimeout( - function() { - $('#addonify-wishlist-undo-deleted-product').html(''); - }, - parseInt(undoNoticeTimeout) * 1000 - ) - } - } - // Display intial state wishlist button label and icon. function addonifyInitialWishlistButton(product_id) { + let productBtns = $('[data-product_id="' + product_id + '"].addonify-add-to-wishlist-btn') let label = initialAddToWishlistButtonLabel productBtns.each(function(_, val) { @@ -571,6 +581,61 @@ } } + /** + * Display product added to cart notice. + * + * @param {string} product_name Name of the product. + */ + function adfyWishlistAddedtoCartNotice(productName) { + + if (addonifyWishlistJSObject.removeProductAfterAddedtoCart !== '1') { + return; + } + + clearTimeout(undoTimeout); + + let addedtoCartNoticeText = addonifyWishlistJSObject.addedtoCartNoticeText; + addedtoCartNoticeText = addedtoCartNoticeText.replace('{product_name}', productName); + $('#addonify-wishlist-notice').html('' + addedtoCartNoticeText + '
'); + if (parseInt(addonifyWishlistJSObject.undoNoticeTimeout) > 0) { + undoTimeout = setTimeout( + function () { + $('#addonify-wishlist-notice').html(''); + }, + parseInt(addonifyWishlistJSObject.undoNoticeTimeout) * 1000 + ) + } + } + + /** + * Display product removal and undo action notice. + * + * @param {string} product_name Name of the product. + * @param {int} product_id Product ID. + * @param {int} wishlist_id Wishlist ID. + */ + function addonifyUndoRemoveFromWishlist(product_name, product_id, wishlist_id = '') { + clearTimeout(undoTimeout); + let product_removed_text = addonifyWishlistJSObject.undoActionPrelabelText; + product_removed_text = product_removed_text.replace('{product_name}', product_name); + let undo_text = addonifyWishlistJSObject.undoActionLabel; + let undo_div = ` ++ ` + product_removed_text + ` + ` + undo_text + ` +
`; + + $('#addonify-wishlist-notice').html(undo_div); + if (parseInt(addonifyWishlistJSObject.undoNoticeTimeout) > 0) { + undoTimeout = setTimeout( + function () { + $('#addonify-wishlist-notice').html(''); + }, + parseInt(addonifyWishlistJSObject.undoNoticeTimeout) * 1000 + ) + } + } + /** * Return product ids stored in localstorage. diff --git a/public/assets/src/js/conditional/addonify-wishlist-public.js b/public/assets/src/js/conditional/addonify-wishlist-public.js index 8ba8ef0..f38dd09 100644 --- a/public/assets/src/js/conditional/addonify-wishlist-public.js +++ b/public/assets/src/js/conditional/addonify-wishlist-public.js @@ -25,9 +25,9 @@ */ $body.on('click', '.addonify-wishlist-ajax-add-to-wishlist', function (e) { e.preventDefault(); - let addToWishlistButton = $(this); - if (addToWishlistButton.hasClass('added-to-wishlist')) { - if (addonifyWishlistJSObject.removeAlreadyAddedProductFromWishlist) { + let addToWishlistButton = jQuery(this); + if (addToWishlistButton.hasClass("added-to-wishlist")) { + if (addonifyWishlistJSObject.removeAlreadyAddedProductFromWishlist === '1') { addonifyRemoveFromWishlist(addToWishlistButton) } else { addonifyShowPopupModal( @@ -89,6 +89,8 @@ } ]); + $('#addonify-wishlist-notice').html(''); + addonifyEmptyWishlistText(response.wishlist_count); if (addToWishlistButton.length > 0) { @@ -142,7 +144,9 @@ }); $(document).on('added_to_cart', function (event, fragments, cart_hash, addToCartButton) { - let product_id = (addToCartButton.data('product_id')); + + let product_id = addToCartButton.data('product_id'); + let product_name = addToCartButton.data('product_name'); let parentProductRow = ''; let parentProductSiblings = 0; @@ -160,17 +164,23 @@ } addonifyInitialWishlistButton(product_id); - addonifyEmptyWishlistText(parentProductSiblings); + // Triggering custom event when product is added to wishlist. // 'addonify_removed_from_wishlist' custom event can be used to perform desired actions. - $(document).trigger('addonify_removed_from_wishlist', [{ productID: product_id, wishlist_count: fragments.addonify_wishlist_count }]); + $(document).trigger('addonify_removed_from_wishlist', [ + { + productID: product_id, + productName: product_name, + wishlistCount: fragments.addonify_wishlist_count, + action: 'added-to-cart' + } + ]); } if ( fragments.addonify_wishlist_count <= 0 ) { $('#addonify-wishlist-show-sidebar-btn').addClass('hidden'); $('#addonify-wishlist__clear-all').hide(); } - $('#addonify-wishlist-undo-deleted-product').html(''); }) $(document).on('click', '#addonify-wishlist__clear-all', function () { @@ -199,7 +209,45 @@ ).always(function () { $('#addonify-wishlist-table #addonify-wishlist_spinner').remove(); }) - }) + }); + + $(document).on('addonify_removed_from_wishlist', function(event, data) { + + let parentProductRow = ''; + + if ($('#addonify-wishlist-sticky-sidebar-container').length > 0) { + parentProductRow = $('#addonify-wishlist-sticky-sidebar-container').find('li[data-product_row="addonify-wishlist-sidebar-product-row-' + data.productID + '"]'); + parentProductRow.addClass('loading'); + } + + if ($('#addonify-wishlist-table').length > 0) { + parentProductRow = $('#addonify-wishlist-table').find('tr[data-product_row="addonify-wishlist-table-product-row-' + data.productID + '"]'); + parentProductRow.append(loader); + } + + if (parentProductRow) { + parentProductRow.remove(); + } + + if (data.wishlistCount <= 0) { + $('#addonify-wishlist-show-sidebar-btn').addClass('hidden'); + $('#addonify-wishlist__clear-all').hide(); + } + + addonifyInitialWishlistButton(data.productID); + + addonifyEmptyWishlistText(data.wishlistCount); + + // addonifyWishlistDisplayNotice(); + + if (data.action === 'added-to-cart') { + adfyWishlistAddedtoCartNotice(data.productName); + } + + if (data.action === 'removed-from-wishlist') { + addonifyUndoRemoveFromWishlist(data.productName, data.productID, data.wishlistID); + } + }); // Ajax call to add product into the wishlist. function addonifyAddToWishlist(addToWishlistButton) { @@ -318,27 +366,26 @@ addonifyWishlistJSObject.ajax_url, ajaxData, function (response) { - + // console.log(response); if (response.success) { + $('button[data-product_id="' + product_id + '"]').removeClass('added-to-wishlist'); + // Triggering custom event when product is added to wishlist. // 'addonify_removed_from_wishlist' custom event can be used to perform desired actions. - $(document).trigger('addonify_removed_from_wishlist', [{ productID: product_id, wishlistCount: response.wishlist_count }]); - - if (response.wishlist_count <= 0) { - $('#addonify-wishlist-show-sidebar-btn').addClass('hidden'); - $('#addonify-wishlist__clear-all').hide(); - } - - addonifyInitialWishlistButton(product_id); - - addonifyEmptyWishlistText(response.wishlist_count); - - addonifyUndoRemoveFromWishlist(thisButton.data('product_name'), product_id, wishlist_id); + $(document).trigger('addonify_removed_from_wishlist', [ + { + productID: product_id, + productName: thisButton.data('product_name'), + wishlistID: wishlist_id, + wishlistCount: response.wishlist_count, + action: 'removed-from-wishlist' + } + ]); } else { addonifyShowPopupModal( response.message, - addToWishlistButton.data('product_name'), + thisButton.data('product_name'), 'error' ); } @@ -346,9 +393,6 @@ "json" ).always(function () { thisButton.removeClass('loading'); - if (parentProductRow) { - parentProductRow.remove(); - } }); } @@ -370,6 +414,7 @@ // Display empty wishlist text. function addonifyEmptyWishlistText(wishlistCount) { + let addonifyWishlistStickySidebarEle = $("#addonify-wishlist-sticky-sidebar-container"); let addonifyWishListEmptyTextEle = $("#addonify-wishlist-sticky-sidebar-container #addonify-empty-wishlist-para"); let table = $('#addonify-wishlist-table') @@ -400,6 +445,32 @@ } } + /** + * Display product added to cart notice. + * + * @param {string} product_name Name of the product. + */ + function adfyWishlistAddedtoCartNotice(productName) { + + if (addonifyWishlistJSObject.removeProductAfterAddedtoCart !== '1') { + return; + } + + clearTimeout(undoTimeout); + + let addedtoCartNoticeText = addonifyWishlistJSObject.addedtoCartNoticeText; + addedtoCartNoticeText = addedtoCartNoticeText.replace('{product_name}', productName); + $('#addonify-wishlist-notice').html('' + addedtoCartNoticeText + '
'); + if (parseInt(addonifyWishlistJSObject.undoNoticeTimeout) > 0) { + undoTimeout = setTimeout( + function () { + $('#addonify-wishlist-notice').html(''); + }, + parseInt(addonifyWishlistJSObject.undoNoticeTimeout) * 1000 + ) + } + } + /** * Display undo remove from wishlist message. * @@ -407,20 +478,21 @@ * @param {int} product_id Product ID. */ function addonifyUndoRemoveFromWishlist(product_name, product_id, wishlist_id = '') { - clearTimeout(undoTimeout) + clearTimeout(undoTimeout); let product_removed_text = addonifyWishlistJSObject.undoActionPrelabelText; product_removed_text = product_removed_text.replace('{product_name}', product_name); let undo_text = addonifyWishlistJSObject.undoActionLabel; let undo_div = ` -+
` + product_removed_text + ` ` + undo_text + `
`; - $('#addonify-wishlist-undo-deleted-product').html(undo_div); + + $('#addonify-wishlist-notice').html(undo_div); if ( parseInt(addonifyWishlistJSObject.undoNoticeTimeout) > 0 ) { undoTimeout = setTimeout( function () { - $('#addonify-wishlist-undo-deleted-product').html(''); + $('#addonify-wishlist-notice').html(''); }, parseInt(addonifyWishlistJSObject.undoNoticeTimeout) * 1000 ) diff --git a/public/class-addonify-wishlist-public.php b/public/class-addonify-wishlist-public.php index cdda511..6970bab 100644 --- a/public/class-addonify-wishlist-public.php +++ b/public/class-addonify-wishlist-public.php @@ -162,6 +162,13 @@ function ( $arr ) { return $arr; } ); + + add_filter( + 'woocommerce_loop_add_to_cart_args', + array( $this, 'add_to_cart_args' ), + 15, + 2 + ); } /** @@ -367,6 +374,7 @@ function parseJson(json_str) { 'undoActionPrelabelText' => addonify_wishlist_get_option( 'undo_action_prelabel_text' ), 'undoActionLabel' => addonify_wishlist_get_option( 'undo_action_label' ), 'undoNoticeTimeout' => addonify_wishlist_get_option( 'undo_notice_timeout' ), + 'addedtoCartNoticeText' => addonify_wishlist_get_option( 'product_added_to_cart_notice_text' ), 'isLoggedIn' => is_user_logged_in(), 'addedToWishlistButtonLabel' => addonify_wishlist_get_option( 'btn_label_if_added_to_wishlist' ), 'addonify_get_wishlist_table' => 'addonify_get_wishlist_table', @@ -384,6 +392,7 @@ function parseJson(json_str) { 'pageLinkLabel' => addonify_wishlist_get_option( 'empty_wishlist_navigation_link_label' ), 'showPageLinkLabel' => (bool) addonify_wishlist_get_option( 'show_empty_wishlist_navigation_link' ), 'proExists' => class_exists( 'Addonify_Wishlist_Pro' ), + 'removeProductAfterAddedtoCart' => addonify_wishlist_get_option( 'remove_from_wishlist_if_added_to_cart' ), ) ); } @@ -537,6 +546,21 @@ public function init_actions() { } } + /** + * Functions to add product name data attribute in add to cart button. + * + * @since 2.0.3 + * + * @param array $args Arguments. + * @param array $product Product object. + */ + public function add_to_cart_args( $args, $product ) { + + $args['attributes']['data-product_name'] = $product->get_title(); + + return $args; + } + /** * Render add to wishlist button in products loop. * @@ -1426,6 +1450,10 @@ public function dynamic_css() { '--adfy_wishlist_sidebar_modal_notification_bg_color' => addonify_wishlist_get_option( 'sidebar_modal_notification_bg_color' ), '--adfy_wishlist_sidebar_modal_in_stock_text_color' => addonify_wishlist_get_option( 'sidebar_modal_in_stock_text_color' ), '--adfy_wishlist_sidebar_modal_out_of_stock_text_color' => addonify_wishlist_get_option( 'sidebar_modal_out_of_stock_text_color' ), + '--adfy_wishlist_notice_background_color' => addonify_wishlist_get_option( 'notice_background_color' ), + '--adfy_wishlist_notice_text_color' => addonify_wishlist_get_option( 'notice_text_color' ), + '--adfy_wishlist_notice_link_color' => addonify_wishlist_get_option( 'notice_link_color' ), + '--adfy_wishlist_notice_link_color_hover' => addonify_wishlist_get_option( 'notice_link_color_hover' ), ); $css = ':root {'; diff --git a/public/templates/addonify-wishlist-shortcode-contents.php b/public/templates/addonify-wishlist-shortcode-contents.php index b3d5f17..5a1ece2 100644 --- a/public/templates/addonify-wishlist-shortcode-contents.php +++ b/public/templates/addonify-wishlist-shortcode-contents.php @@ -19,8 +19,8 @@`+addonifyWishlistJSObject.emptyWishlistText+i+`
- `)}}function h(i){i=f('[data-product_id="'+i+'"].addonify-add-to-wishlist-btn');let s=addonifyWishlistJSObject.initialAddToWishlistButtonLabel;i.each(function(i,t){f(t).attr("data-wishlist_label")&&(s=f(t).attr("data-wishlist_label")),f(t)&&!f(t).hasClass("addonify-custom-wishlist-btn")&&(f(t).removeClass("added-to-wishlist"),f(t).find("span.addonify-wishlist-btn-label").text(s),f(t).find("i.icon.adfy-wishlist-icon").removeClass("heart-style-one").addClass("heart-o-style-one"))}),f(".woocommerce-notices-wrapper")&&f(".woocommerce-notices-wrapper").remove()}f(".addonify-add-to-wishlist-btn button.added-to-wishlist").attr("disabled",!0),a.on("click",".addonify-wishlist-login-popup-enabled",function(i){i.preventDefault(),r(addonifyWishlistJSObject.loginMessage,"","error")}),addonifyWishlistJSObject.proExists||a.on("click",".addonify-wishlist-ajax-add-to-wishlist",function(i){i.preventDefault();var s,i=jQuery(this);i.hasClass("added-to-wishlist")?"1"===addonifyWishlistJSObject.removeAlreadyAddedProductFromWishlist?t(i):r(addonifyWishlistJSObject.popupAlreadyInWishlistText,i.data("product_name"),"success"):(s=i,i={action:addonifyWishlistJSObject.addToWishlistAction,id:s.data("product_id"),wishlist_id:s.data("wishlist_id"),nonce:addonifyWishlistJSObject.nonce},s.addClass("loading"),f.post(addonifyWishlistJSObject.ajax_url,i,function(i){var t;1==i.success?(f(document).trigger("addonify_added_to_wishlist",[{productID:s.data("product_id"),wishlistCount:i.wishlist_count,sidebarData:i.sidebar_data}]),c(i.wishlist_count),s.addClass("added-to-wishlist"),"none"!==addonifyWishlistJSObject.afterAddToWishlistAction&&r(i.message,s.data("product_name"),"success"),(t=f("#addonify-wishlist-undo-deleted-product-link"))&&t.parent("#addonify-wishlist-undo-deleted-product-text").remove(),0