Plugin Directory

Changeset 2541923


Ignore:
Timestamp:
06/03/2021 10:24:38 AM (5 years ago)
Author:
markerio
Message:

Added utms

Location:
marker-io/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • marker-io/trunk/dist/scripts.js

    r2541882 r2541923  
    4848        Your visitors will be able to report screenshots along with technical data, automatically
    4949        creating issues in your favorite tools. Try it for free for 15 days.
    50         `),r("a",{staticClass:"underline text-blue-500",attrs:{href:"https://marker.io/wordpress-website-feedback-plugin",target:"_blank"}},[e._v(`
     50        `),r("a",{staticClass:"underline text-blue-500",attrs:{href:"https://marker.io/wordpress-website-feedback-plugin?utm_source=wordpress&utm_medium=plugin",target:"_blank"}},[e._v(`
    5151          Click here
    5252        `)]),e._v(`
    5353        to learn more about Marker.io.
    54       `)])])}];Zi._withStripped=!0;const Dt={appUrl:"https://app.marker.io",apiUrl:"https://api.marker.io"};var Zl=Re(68),hn=Re.n(Zl),Ql=Re(830),Qi=Re.n(Ql),Vl=Re(844),mn=Re.n(Vl),Vi=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"spinning-loader",class:e.loaderClass})},eu=[];Vi._withStripped=!0;var ea=Se({props:{size:{type:String,default:"small",validator:e=>{const t=["tiny","small","medium","large"].includes(e);return t||console.warn('Invalid "size" prop for spinning loader: must be one of: [tiny, small, medium, large]'),t}},color:{type:String,default:null,validator:e=>{const t=["white"].includes(e);return t||console.warn('Invalid "color" prop for spinning loader: must be one of: [null, white]'),t}}},computed:{loaderClass(){return{"-large":this.size==="large","-medium":this.size==="medium","-small":this.size==="small","-tiny":this.size==="tiny","-white":this.color==="white"}}}},Vi,eu,!1,null,null,null);if(!1)var _c;ea.options.__file="src/vue/components/SpinningLoader.vue";const ta=ea.exports;var ra=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("button",{staticClass:"px-3 py-2 text-white rounded",class:{"bg-gray-400 cursor-not-allowed":e.disabled,"bg-blue-400 hover:bg-blue-500":!e.disabled},attrs:{disabled:e.disabled}},[e._t("default")],2)},tu=[];ra._withStripped=!0;var na=Se({name:"CustomButton",props:{disabled:{type:Boolean,default:!1}}},ra,tu,!1,null,null,null);if(!1)var wc;na.options.__file="src/vue/components/CustomButton.vue";const ia=na.exports;var aa=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("a",{staticClass:"px-3 py-2 transition-colors visited:text-black rounded flex row items-center",class:e.buttonClasses,attrs:{href:e.href,disabled:e.disabled,target:"_blank"},on:{mouseenter:function(n){e.isHover=!0},mouseleave:function(n){e.isHover=!1}}},[e._t("default"),e._v(" "),r("div",{staticClass:"flex-grow"}),e._v(" "),e.isHover?r("OpenIcon",{staticClass:"ml-2"}):e._e()],2)},ru=[];aa._withStripped=!0;var oa=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}},[r("path",{attrs:{fill:"currentColor",d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}})])},nu=[];oa._withStripped=!0;var iu={},sa=Se(iu,oa,nu,!1,null,null,null);if(!1)var Sc;sa.options.__file="src/vue/components/icons/OpenIcon.vue";const au=sa.exports;var la=Se({name:"CustomLinkButton",components:{OpenIcon:au},data(){return{isHover:!1}},props:{disabled:{type:Boolean,default:!1},href:{type:String,required:!0},primary:{type:Boolean,default:!1,require:!1}},computed:{buttonClasses(){return this.primary?"text-white bg-blue-600 hover:text-white hover:bg-blue-700":"border text-gray-600 hover:text-blue-500 hover:border-blue-400"},destinationUrl(){return`${config.appUrl}/account/destinations/${this.destination.id}`},platformLogoUrl(){return`${config.appUrl}/vendor/img/logo/${this.destination.platform}-icon.svg`}}},aa,ru,!1,null,null,null);if(!1)var Ac;la.options.__file="src/vue/components/CustomLinkButton.vue";const ua=la.exports;var ca=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("button",{staticClass:"text-gray-500 hover:text-gray-600 underline",on:{click:function(n){return e.$emit("click",n)}}},[e._t("default")],2)},ou=[];ca._withStripped=!0;var su={},fa=Se(su,ca,ou,!1,null,null,null);if(!1)var Oc;fa.options.__file="src/vue/components/TextButton.vue";const lu=fa.exports;var pa=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"rounded border border-red-400 bg-red-50 p-2 my-4 border-l-4"},[r("i",{staticClass:"icons icon-attention-circled text-red-400 mr-1"}),e._v(" "),e._t("default")],2)},uu=[];pa._withStripped=!0;var cu={},da=Se(cu,pa,uu,!1,null,null,null);if(!1)var Ec;da.options.__file="src/vue/components/Error.vue";const va=da.exports;var ha=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"rounded border border-green-400 bg-green-50 p-2 my-4 border-l-4"},[r("i",{staticClass:"icons icon-ok-circled text-green-400 mr-1"}),e._v(" "),e._t("default")],2)},fu=[];ha._withStripped=!0;var pu={},ma=Se(pu,ha,fu,!1,null,null,null);if(!1)var Pc;ma.options.__file="src/vue/components/Notice.vue";const du=ma.exports;var ya=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}},[r("g",[r("path",{attrs:{fill:"currentColor",d:"M12,2C6.49,2,2,6.49,2,12s4.49,10,10,10c1.38,0,2.5-1.12,2.5-2.5c0-0.61-0.23-1.2-0.64-1.67c-0.08-0.1-0.13-0.21-0.13-0.33 c0-0.28,0.22-0.5,0.5-0.5H16c3.31,0,6-2.69,6-6C22,6.04,17.51,2,12,2z M17.5,13c-0.83,0-1.5-0.67-1.5-1.5c0-0.83,0.67-1.5,1.5-1.5 s1.5,0.67,1.5,1.5C19,12.33,18.33,13,17.5,13z M14.5,9C13.67,9,13,8.33,13,7.5C13,6.67,13.67,6,14.5,6S16,6.67,16,7.5 C16,8.33,15.33,9,14.5,9z M5,11.5C5,10.67,5.67,10,6.5,10S8,10.67,8,11.5C8,12.33,7.33,13,6.5,13S5,12.33,5,11.5z M11,7.5 C11,8.33,10.33,9,9.5,9S8,8.33,8,7.5C8,6.67,8.67,6,9.5,6S11,6.67,11,7.5z"}})])])},vu=[];ya._withStripped=!0;var hu={},_a=Se(hu,ya,vu,!1,null,null,null);if(!1)var Ic;_a.options.__file="src/vue/components/icons/PaletteIcon.vue";const mu=_a.exports;var ga=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}},[r("path",{attrs:{fill:"currentColor",d:"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"}})])},yu=[];ga._withStripped=!0;var _u={},ba=Se(_u,ga,yu,!1,null,null,null);if(!1)var kc;ba.options.__file="src/vue/components/icons/ListIcon.vue";const gu=ba.exports;var wa=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}},[r("path",{attrs:{fill:"currentColor",d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}})])},bu=[];wa._withStripped=!0;var wu={},Sa=Se(wu,wa,bu,!1,null,null,null);if(!1)var Rc;Sa.options.__file="src/vue/components/icons/FeedbackIcon.vue";const Ca=Sa.exports;var xa=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[r("path",{attrs:{fill:"currentColor",d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}})])},Su=[];xa._withStripped=!0;var Cu={},Aa=Se(Cu,xa,Su,!1,null,null,null);if(!1)var $c;Aa.options.__file="src/vue/components/icons/HomeIcon.vue";const Oa=Aa.exports;var Ea=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[r("path",{attrs:{fill:"currentColor",d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}})])},xu=[];Ea._withStripped=!0;var Au={},Pa=Se(Au,Ea,xu,!1,null,null,null);if(!1)var Dc;Pa.options.__file="src/vue/components/icons/DomainsIcon.vue";const Ou=Pa.exports;var Ia=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[r("path",{attrs:{fill:"currentColor",d:"M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z"}})])},Eu=[];Ia._withStripped=!0;var Pu={},ka=Se(Pu,Ia,Eu,!1,null,null,null);if(!1)var Tc;ka.options.__file="src/vue/components/icons/SettingsIcon.vue";const Iu=ka.exports;var Ye=(e,t,r)=>new Promise((n,i)=>{var a=l=>{try{u(r.next(l))}catch(w){i(w)}},s=l=>{try{u(r.throw(l))}catch(w){i(w)}},u=l=>l.done?n(l.value):Promise.resolve(l.value).then(a,s);u((r=r.apply(e,t)).next())}),Ra=Se({name:"DestinationSettings",components:{SpinningLoader:ta,CustomButton:ia,CustomLinkButton:ua,TextButton:lu,Error:va,PaletteIcon:mu,ListIcon:gu,FeedbackIcon:Ca,HomeIcon:Oa,DomainsIcon:Ou,SettingsIcon:Iu,Notice:du},data(){return{destinationId:"",destinationName:"",destinationDisplayName:"",destinationPlatform:"",destinationIdInputValue:"",siteUrl:"",error:null,errorMessage:"",errorLink:null,advancedMode:!1,checking:!1,saving:!1,justSaved:!1,justFailed:!1,targetWindow:null}},mounted(){return Ye(this,null,function*(){this.initOptions(),this.destinationId&&this.checkDestination()})},computed:{destinationUrl(){return`${Dt.appUrl}/account/destinations/${this.destinationId}`},platformLogoUrl(){return`${Dt.appUrl}/vendor/img/logo/${this.destinationPlatform}-icon.svg`}},methods:{initOptions(){const e=window.markerioPluginOptions,t=window.markerioSiteUrl;this.destinationId=e.destination_id,this.destinationIdInputValue=e.destination_id,this.destinationName=e.destination_name,this.destinationDisplayName=e.destination_display_name,this.destinationPlatform=e.destination_platform,this.siteUrl=t},fetchDestination(e){return Ye(this,null,function*(){return(yield hn()({url:Dt.apiUrl+"/widget/ping",method:"POST",data:{destinationId:e,userData:{}},withCredentials:!0})).data.destination})},checkDestination(){return Ye(this,null,function*(){this.clearError();try{const e=yield this.fetchDestination(this.destinationId)}catch(e){this.setError({action:"checking",err:e})}})},trySaveDestination(e){return Ye(this,arguments,function*({destinationId:t,advancedDestination:r}){this.clearError(),this.saving=!0,this.justSaved=!1;try{const n=yield this.fetchDestination(t);this.saveDestination({destination:n,advancedDestination:r})}catch(n){this.setError({action:"saving",err:n}),this.saving=!1}})},saveDestination(e){return Ye(this,arguments,function*({destination:t,advancedDestination:r=null}){const n=t.id,i=r&&r.name,a=t.reportingSettings.simple.displayName,s=t.platform,u={action:"markerio_save_destination",destinationId:n,destinationName:i,destinationDisplayName:a,destinationPlatform:s};try{yield this.adminAjax(u),this.destinationId=n,this.destinationName=i,this.destinationDisplayName=a,this.destinationPlatform=s,this.justSaved=!0}catch(l){console.error(l),this.justFailed=!0}setTimeout(this.resetSavingState,3e3),this.saving=!1})},resetSavingState(){this.justSaved=!1,this.justFailed=!1},clearDestination(){return Ye(this,null,function*(){this.clearError(),this.justSaved=!1;const e={action:"markerio_save_destination",destinationId:null,destinationName:null,destinationDisplayName:null,destinationPlatform:null};yield this.adminAjax(e),this.destinationId=null,this.destinationName="",this.destinationDisplayName="",this.destinationPlatform=null,this.destinationIdInputValue=""})},adminAjax(e){return Ye(this,null,function*(){yield hn()({url:"admin-ajax.php",method:"POST",data:Qi().stringify(e)})})},selectDestination(e){return Ye(this,null,function*(){this.targetWindow.close(),this.trySaveDestination({destinationId:e.id,advancedDestination:e})})},unlinkDestination(){this.advanced=!1,this.clearDestination()},setError({action:e,err:t}){var r,n;console.error(t),this.error=t,t.response.status===403?((n=(r=t.response.data)==null?void 0:r.metadata)==null?void 0:n.code)==="NO_ACTIVE_SUBSCRIPTION"?(this.errorMessage="Your Marker.io subscription does not seem to be active.",this.errorLink={text:"Upgrade it here",href:`${Dt.appUrl}/account/upgrade`}):e==="checking"?this.errorMessage="There seems to be an issue with the destination. You may need to authorize the URL.":this.errorMessage="Could not connect destination. You may need to authorize the URL first, or there might be another issue with the destination.":t.response.status===404?e==="checking"?this.errorMessage="Could not fetch destination. It may have been deleted.":this.errorMessage="Could not match an existing destination. The ID may be invalid.":t.message&&(this.errorMessage=t.message)},clearError(){this.error=null,this.errorMessage="",this.errorLink=null},linkDestination(){return Ye(this,null,function*(){const e={width:872,height:640,url:`${Dt.appUrl}/account/connect-destination/?source=${encodeURIComponent(this.siteUrl)}`};this.openPopupAndWait(e)})},openPopup({left:e=0,top:t=0,width:r,height:n,url:i}){return window.open(i,"_blank",`width=${r},height=${n},left=${e},top=${t}`)},openPopupAndWait({left:e=0,top:t=0,width:r,height:n,url:i}){this.targetWindow=this.openPopup({left:e,top:t,width:r,height:n,url:i});const a=mn().init({actorName:"wordpress",driver:mn().drivers.window.create({targetWindow:this.targetWindow})}),s=new(mn()).RPC({debug:!0});s.registerTarget("marker",a),s.exposeMethod("selectDestination",u=>Ye(this,null,function*(){return this.selectDestination(u),!0}))}}},Zi,Yl,!1,null,"a1203f0c",null);if(!1)var Lc;Ra.options.__file="src/vue/components/DestinationSettings.vue";const ku=Ra.exports;var $a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("h2",{staticClass:"text-lg"},[e._v("Display settings")]),e._v(" "),r("SettingSection",{attrs:{title:"Enable widget",description:"Easily hide or show the Marker.io button on this Worpress website."}},[r("div",{staticClass:"flex items-start"},[r("div",{staticClass:"flex items-center h-6"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.enableWidget,expression:"enableWidget"}],attrs:{id:"enable-widget",name:"enable-widget",type:"checkbox"},domProps:{checked:Array.isArray(e.enableWidget)?e._i(e.enableWidget,null)>-1:e.enableWidget},on:{input:function(n){return e.makeDirty()},change:function(n){var i=e.enableWidget,a=n.target,s=!!a.checked;if(Array.isArray(i)){var u=null,l=e._i(i,u);a.checked?l<0&&(e.enableWidget=i.concat([u])):l>-1&&(e.enableWidget=i.slice(0,l).concat(i.slice(l+1)))}else e.enableWidget=s}}})]),e._v(" "),r("label",{staticClass:"ml-1 font-medium text-gray-700",attrs:{for:"enable-widget"}},[e._v(`
     54      `)])])}];Zi._withStripped=!0;const Dt={appUrl:"https://app.marker.io",apiUrl:"https://api.marker.io"};var Zl=Re(68),hn=Re.n(Zl),Ql=Re(830),Qi=Re.n(Ql),Vl=Re(844),mn=Re.n(Vl),Vi=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"spinning-loader",class:e.loaderClass})},eu=[];Vi._withStripped=!0;var ea=Se({props:{size:{type:String,default:"small",validator:e=>{const t=["tiny","small","medium","large"].includes(e);return t||console.warn('Invalid "size" prop for spinning loader: must be one of: [tiny, small, medium, large]'),t}},color:{type:String,default:null,validator:e=>{const t=["white"].includes(e);return t||console.warn('Invalid "color" prop for spinning loader: must be one of: [null, white]'),t}}},computed:{loaderClass(){return{"-large":this.size==="large","-medium":this.size==="medium","-small":this.size==="small","-tiny":this.size==="tiny","-white":this.color==="white"}}}},Vi,eu,!1,null,null,null);if(!1)var _c;ea.options.__file="src/vue/components/SpinningLoader.vue";const ta=ea.exports;var ra=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("button",{staticClass:"px-3 py-2 text-white rounded",class:{"bg-gray-400 cursor-not-allowed":e.disabled,"bg-blue-400 hover:bg-blue-500":!e.disabled},attrs:{disabled:e.disabled}},[e._t("default")],2)},tu=[];ra._withStripped=!0;var na=Se({name:"CustomButton",props:{disabled:{type:Boolean,default:!1}}},ra,tu,!1,null,null,null);if(!1)var wc;na.options.__file="src/vue/components/CustomButton.vue";const ia=na.exports;var aa=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("a",{staticClass:"px-3 py-2 transition-colors visited:text-black rounded flex row items-center",class:e.buttonClasses,attrs:{href:e.href,disabled:e.disabled,target:"_blank"},on:{mouseenter:function(n){e.isHover=!0},mouseleave:function(n){e.isHover=!1}}},[e._t("default"),e._v(" "),r("div",{staticClass:"flex-grow"}),e._v(" "),e.isHover?r("OpenIcon",{staticClass:"ml-2"}):e._e()],2)},ru=[];aa._withStripped=!0;var oa=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}},[r("path",{attrs:{fill:"currentColor",d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}})])},nu=[];oa._withStripped=!0;var iu={},sa=Se(iu,oa,nu,!1,null,null,null);if(!1)var Sc;sa.options.__file="src/vue/components/icons/OpenIcon.vue";const au=sa.exports;var la=Se({name:"CustomLinkButton",components:{OpenIcon:au},data(){return{isHover:!1}},props:{disabled:{type:Boolean,default:!1},href:{type:String,required:!0},primary:{type:Boolean,default:!1,require:!1}},computed:{buttonClasses(){return this.primary?"text-white bg-blue-600 hover:text-white hover:bg-blue-700":"border text-gray-600 hover:text-blue-500 hover:border-blue-400"},destinationUrl(){return`${config.appUrl}/account/destinations/${this.destination.id}`},platformLogoUrl(){return`${config.appUrl}/vendor/img/logo/${this.destination.platform}-icon.svg`}}},aa,ru,!1,null,null,null);if(!1)var Ac;la.options.__file="src/vue/components/CustomLinkButton.vue";const ua=la.exports;var ca=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("button",{staticClass:"text-gray-500 hover:text-gray-600 underline",on:{click:function(n){return e.$emit("click",n)}}},[e._t("default")],2)},ou=[];ca._withStripped=!0;var su={},fa=Se(su,ca,ou,!1,null,null,null);if(!1)var Oc;fa.options.__file="src/vue/components/TextButton.vue";const lu=fa.exports;var pa=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"rounded border border-red-400 bg-red-50 p-2 my-4 border-l-4"},[r("i",{staticClass:"icons icon-attention-circled text-red-400 mr-1"}),e._v(" "),e._t("default")],2)},uu=[];pa._withStripped=!0;var cu={},da=Se(cu,pa,uu,!1,null,null,null);if(!1)var Ec;da.options.__file="src/vue/components/Error.vue";const va=da.exports;var ha=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"rounded border border-green-400 bg-green-50 p-2 my-4 border-l-4"},[r("i",{staticClass:"icons icon-ok-circled text-green-400 mr-1"}),e._v(" "),e._t("default")],2)},fu=[];ha._withStripped=!0;var pu={},ma=Se(pu,ha,fu,!1,null,null,null);if(!1)var Pc;ma.options.__file="src/vue/components/Notice.vue";const du=ma.exports;var ya=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}},[r("g",[r("path",{attrs:{fill:"currentColor",d:"M12,2C6.49,2,2,6.49,2,12s4.49,10,10,10c1.38,0,2.5-1.12,2.5-2.5c0-0.61-0.23-1.2-0.64-1.67c-0.08-0.1-0.13-0.21-0.13-0.33 c0-0.28,0.22-0.5,0.5-0.5H16c3.31,0,6-2.69,6-6C22,6.04,17.51,2,12,2z M17.5,13c-0.83,0-1.5-0.67-1.5-1.5c0-0.83,0.67-1.5,1.5-1.5 s1.5,0.67,1.5,1.5C19,12.33,18.33,13,17.5,13z M14.5,9C13.67,9,13,8.33,13,7.5C13,6.67,13.67,6,14.5,6S16,6.67,16,7.5 C16,8.33,15.33,9,14.5,9z M5,11.5C5,10.67,5.67,10,6.5,10S8,10.67,8,11.5C8,12.33,7.33,13,6.5,13S5,12.33,5,11.5z M11,7.5 C11,8.33,10.33,9,9.5,9S8,8.33,8,7.5C8,6.67,8.67,6,9.5,6S11,6.67,11,7.5z"}})])])},vu=[];ya._withStripped=!0;var hu={},_a=Se(hu,ya,vu,!1,null,null,null);if(!1)var Ic;_a.options.__file="src/vue/components/icons/PaletteIcon.vue";const mu=_a.exports;var ga=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}},[r("path",{attrs:{fill:"currentColor",d:"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"}})])},yu=[];ga._withStripped=!0;var _u={},ba=Se(_u,ga,yu,!1,null,null,null);if(!1)var kc;ba.options.__file="src/vue/components/icons/ListIcon.vue";const gu=ba.exports;var wa=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}},[r("path",{attrs:{fill:"currentColor",d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}})])},bu=[];wa._withStripped=!0;var wu={},Sa=Se(wu,wa,bu,!1,null,null,null);if(!1)var Rc;Sa.options.__file="src/vue/components/icons/FeedbackIcon.vue";const Ca=Sa.exports;var xa=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[r("path",{attrs:{fill:"currentColor",d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}})])},Su=[];xa._withStripped=!0;var Cu={},Aa=Se(Cu,xa,Su,!1,null,null,null);if(!1)var $c;Aa.options.__file="src/vue/components/icons/HomeIcon.vue";const Oa=Aa.exports;var Ea=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[r("path",{attrs:{fill:"currentColor",d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}})])},xu=[];Ea._withStripped=!0;var Au={},Pa=Se(Au,Ea,xu,!1,null,null,null);if(!1)var Dc;Pa.options.__file="src/vue/components/icons/DomainsIcon.vue";const Ou=Pa.exports;var Ia=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("svg",{staticClass:"svg-icon",attrs:{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[r("path",{attrs:{fill:"currentColor",d:"M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z"}})])},Eu=[];Ia._withStripped=!0;var Pu={},ka=Se(Pu,Ia,Eu,!1,null,null,null);if(!1)var Tc;ka.options.__file="src/vue/components/icons/SettingsIcon.vue";const Iu=ka.exports;var Ye=(e,t,r)=>new Promise((n,i)=>{var a=l=>{try{u(r.next(l))}catch(w){i(w)}},s=l=>{try{u(r.throw(l))}catch(w){i(w)}},u=l=>l.done?n(l.value):Promise.resolve(l.value).then(a,s);u((r=r.apply(e,t)).next())}),Ra=Se({name:"DestinationSettings",components:{SpinningLoader:ta,CustomButton:ia,CustomLinkButton:ua,TextButton:lu,Error:va,PaletteIcon:mu,ListIcon:gu,FeedbackIcon:Ca,HomeIcon:Oa,DomainsIcon:Ou,SettingsIcon:Iu,Notice:du},data(){return{destinationId:"",destinationName:"",destinationDisplayName:"",destinationPlatform:"",destinationIdInputValue:"",siteUrl:"",error:null,errorMessage:"",errorLink:null,advancedMode:!1,checking:!1,saving:!1,justSaved:!1,justFailed:!1,targetWindow:null}},mounted(){return Ye(this,null,function*(){this.initOptions(),this.destinationId&&this.checkDestination()})},computed:{destinationUrl(){return`${Dt.appUrl}/account/destinations/${this.destinationId}`},platformLogoUrl(){return`${Dt.appUrl}/vendor/img/logo/${this.destinationPlatform}-icon.svg`}},methods:{initOptions(){const e=window.markerioPluginOptions,t=window.markerioSiteUrl;this.destinationId=e.destination_id,this.destinationIdInputValue=e.destination_id,this.destinationName=e.destination_name,this.destinationDisplayName=e.destination_display_name,this.destinationPlatform=e.destination_platform,this.siteUrl=t},fetchDestination(e){return Ye(this,null,function*(){return(yield hn()({url:Dt.apiUrl+"/widget/ping",method:"POST",data:{destinationId:e,userData:{}},withCredentials:!0})).data.destination})},checkDestination(){return Ye(this,null,function*(){this.clearError();try{const e=yield this.fetchDestination(this.destinationId)}catch(e){this.setError({action:"checking",err:e})}})},trySaveDestination(e){return Ye(this,arguments,function*({destinationId:t,advancedDestination:r}){this.clearError(),this.saving=!0,this.justSaved=!1;try{const n=yield this.fetchDestination(t);this.saveDestination({destination:n,advancedDestination:r})}catch(n){this.setError({action:"saving",err:n}),this.saving=!1}})},saveDestination(e){return Ye(this,arguments,function*({destination:t,advancedDestination:r=null}){const n=t.id,i=r&&r.name,a=t.reportingSettings.simple.displayName,s=t.platform,u={action:"markerio_save_destination",destinationId:n,destinationName:i,destinationDisplayName:a,destinationPlatform:s};try{yield this.adminAjax(u),this.destinationId=n,this.destinationName=i,this.destinationDisplayName=a,this.destinationPlatform=s,this.justSaved=!0}catch(l){console.error(l),this.justFailed=!0}setTimeout(this.resetSavingState,3e3),this.saving=!1})},resetSavingState(){this.justSaved=!1,this.justFailed=!1},clearDestination(){return Ye(this,null,function*(){this.clearError(),this.justSaved=!1;const e={action:"markerio_save_destination",destinationId:null,destinationName:null,destinationDisplayName:null,destinationPlatform:null};yield this.adminAjax(e),this.destinationId=null,this.destinationName="",this.destinationDisplayName="",this.destinationPlatform=null,this.destinationIdInputValue=""})},adminAjax(e){return Ye(this,null,function*(){yield hn()({url:"admin-ajax.php",method:"POST",data:Qi().stringify(e)})})},selectDestination(e){return Ye(this,null,function*(){this.targetWindow.close(),this.trySaveDestination({destinationId:e.id,advancedDestination:e})})},unlinkDestination(){this.advanced=!1,this.clearDestination()},setError({action:e,err:t}){var r,n;console.error(t),this.error=t,t.response.status===403?((n=(r=t.response.data)==null?void 0:r.metadata)==null?void 0:n.code)==="NO_ACTIVE_SUBSCRIPTION"?(this.errorMessage="Your Marker.io subscription does not seem to be active.",this.errorLink={text:"Upgrade it here",href:`${Dt.appUrl}/account/upgrade`}):e==="checking"?this.errorMessage="There seems to be an issue with the destination. You may need to authorize the URL.":this.errorMessage="Could not connect destination. You may need to authorize the URL first, or there might be another issue with the destination.":t.response.status===404?e==="checking"?this.errorMessage="Could not fetch destination. It may have been deleted.":this.errorMessage="Could not match an existing destination. The ID may be invalid.":t.message&&(this.errorMessage=t.message)},clearError(){this.error=null,this.errorMessage="",this.errorLink=null},linkDestination(){return Ye(this,null,function*(){const e={width:872,height:640,url:`${Dt.appUrl}/account/connect-destination/?sourceUrl=${encodeURIComponent(this.siteUrl)}&utm_source=wordpress&utm_medium=wizard`};this.openPopupAndWait(e)})},openPopup({left:e=0,top:t=0,width:r,height:n,url:i}){return window.open(i,"_blank",`width=${r},height=${n},left=${e},top=${t}`)},openPopupAndWait({left:e=0,top:t=0,width:r,height:n,url:i}){this.targetWindow=this.openPopup({left:e,top:t,width:r,height:n,url:i});const a=mn().init({actorName:"wordpress",driver:mn().drivers.window.create({targetWindow:this.targetWindow})}),s=new(mn()).RPC({debug:!0});s.registerTarget("marker",a),s.exposeMethod("selectDestination",u=>Ye(this,null,function*(){return this.selectDestination(u),!0}))}}},Zi,Yl,!1,null,"a1203f0c",null);if(!1)var Lc;Ra.options.__file="src/vue/components/DestinationSettings.vue";const ku=Ra.exports;var $a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("h2",{staticClass:"text-lg"},[e._v("Display settings")]),e._v(" "),r("SettingSection",{attrs:{title:"Enable widget",description:"Easily hide or show the Marker.io button on this Worpress website."}},[r("div",{staticClass:"flex items-start"},[r("div",{staticClass:"flex items-center h-6"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.enableWidget,expression:"enableWidget"}],attrs:{id:"enable-widget",name:"enable-widget",type:"checkbox"},domProps:{checked:Array.isArray(e.enableWidget)?e._i(e.enableWidget,null)>-1:e.enableWidget},on:{input:function(n){return e.makeDirty()},change:function(n){var i=e.enableWidget,a=n.target,s=!!a.checked;if(Array.isArray(i)){var u=null,l=e._i(i,u);a.checked?l<0&&(e.enableWidget=i.concat([u])):l>-1&&(e.enableWidget=i.slice(0,l).concat(i.slice(l+1)))}else e.enableWidget=s}}})]),e._v(" "),r("label",{staticClass:"ml-1 font-medium text-gray-700",attrs:{for:"enable-widget"}},[e._v(`
    5555        Enable Marker.io
    5656      `)])])]),e._v(" "),e.enableWidget?r("SettingSection",{attrs:{title:"Users",description:"Control which users can see the feedback button on the website."}},[r("RadioSetting",{attrs:{options:e.userRoleOptions,slug:"show-to"},on:{input:function(n){return e.makeDirty()}},model:{value:e.userRoleFilter,callback:function(n){e.userRoleFilter=n},expression:"userRoleFilter"}}),e._v(" "),e.userRoleFilter==="specific"?r("div",{staticClass:"rounded border p-1 ml-7"},e._l(e.availableUserRoles,function(n,i){return r("div",{key:i},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.enabledUserRoles,expression:"enabledUserRoles"}],attrs:{id:i,type:"checkbox"},domProps:{value:i,checked:Array.isArray(e.enabledUserRoles)?e._i(e.enabledUserRoles,i)>-1:e.enabledUserRoles},on:{input:function(a){return e.makeDirty()},change:function(a){var s=e.enabledUserRoles,u=a.target,l=!!u.checked;if(Array.isArray(s)){var w=i,T=e._i(s,w);u.checked?T<0&&(e.enabledUserRoles=s.concat([w])):T>-1&&(e.enabledUserRoles=s.slice(0,T).concat(s.slice(T+1)))}else e.enabledUserRoles=l}}}),e._v(" "),r("label",{staticClass:"font-medium text-gray-700",attrs:{for:i}},[e._v(e._s(n.name))])])}),0):e._e()],1):e._e(),e._v(" "),e.enableWidget?r("SettingSection",{attrs:{title:"Post types",description:"Control where the feedback button is displayed on the website."}},[r("RadioSetting",{attrs:{options:e.postTypeOptions,slug:"location"},on:{input:function(n){return e.makeDirty()}},model:{value:e.postTypeFilter,callback:function(n){e.postTypeFilter=n},expression:"postTypeFilter"}}),e._v(" "),e.postTypeFilter==="specific"?r("div",{staticClass:"rounded border p-1 ml-7"},e._l(e.availablePostTypes,function(n){return r("div",{key:n},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.enabledPostTypes,expression:"enabledPostTypes"}],attrs:{id:n,type:"checkbox"},domProps:{value:n,checked:Array.isArray(e.enabledPostTypes)?e._i(e.enabledPostTypes,n)>-1:e.enabledPostTypes},on:{input:function(i){return e.makeDirty()},change:function(i){var a=e.enabledPostTypes,s=i.target,u=!!s.checked;if(Array.isArray(a)){var l=n,w=e._i(a,l);s.checked?w<0&&(e.enabledPostTypes=a.concat([l])):w>-1&&(e.enabledPostTypes=a.slice(0,w).concat(a.slice(w+1)))}else e.enabledPostTypes=u}}}),e._v(" "),r("label",{staticClass:"font-medium text-gray-700",attrs:{for:n}},[e._v(`
  • marker-io/trunk/marker-io.php

    r2541882 r2541923  
    44Plugin URI:  https://marker.io/wordpress-website-feedback-plugin
    55Description: Collect visual website feedback from colleagues and clients directly in your WordPress site.
    6 Version:     1.0.0
     6Version:     1.0.1
    77Author:      Marker.io
    88Author URI:  https://marker.io
  • marker-io/trunk/readme.txt

    r2541882 r2541923  
    44Requires at least: 4.7
    55Tested up to: 5.7.2
    6 Stable tag: 1.0.0
     6Stable tag: 1.0.1
    77Requires PHP: 5.6
    88License: GPLv2
     
    1313== Description ==
    1414
    15 [Marker.io](https://marker.io/wordpress-website-feedback-plugin) is the best way for agencies and product teams to collect visual and developer-friendly feedback from colleagues and clients on your WordPress site without driving developers crazy.
     15[Marker.io](https://marker.io/wordpress-website-feedback-plugin?utm_source=wordpress&utm_medium=marketplace) is the best way for agencies and product teams to collect visual and developer-friendly feedback from colleagues and clients on your WordPress site without driving developers crazy.
    1616
    1717Get feedback with screenshots & technical metadata directly into your favorite project management tool.
     
    7979= Start a free trial =
    8080
    81 Anyone can start a 15-day free trial, no credit card needed. You can [start a free trial here](https://marker.io/wordpress-website-feedback-plugin).
     81Anyone can start a 15-day free trial, no credit card needed. You can [start a free trial here](https://marker.io/wordpress-website-feedback-plugin?utm_source=wordpress&utm_medium=marketplace).
    8282
    8383== Screenshots ==
     
    131131== Changelog ==
    132132
     133= 1.0.1 =
     134* Added utms.
     135
    133136= 1.0.0 =
    134137* Initial release.
Note: See TracChangeset for help on using the changeset viewer.