diff --git a/dist/js/tool.js b/dist/js/tool.js index a2bb800..8566558 100644 --- a/dist/js/tool.js +++ b/dist/js/tool.js @@ -1 +1 @@ -(()=>{"use strict";var e,t={18:(e,t,n)=>{const r=Vue;var o={id:"nc-control"},l={class:"left-items"},a=[(0,r.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[(0,r.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 19l-7-7 7-7m8 14l-7-7 7-7"})],-1)],i=[(0,r.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[(0,r.createElementVNode)("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor"})],-1)],c=[(0,r.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[(0,r.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 5l7 7-7 7M5 5l7 7-7 7"})],-1)],s={ref:"theForm",class:"divide-y divide-gray-200 dark:divide-gray-800 divide-solid"},d={class:"p-3 text-center"},u=["value"],m=["value"],v=["value"],h={class:"text-90 font-normal text-xl md:text-2xl noselect"},f=(0,r.createElementVNode)("div",{class:"center-items"},null,-1),g={class:"right-items"},p=["innerHTML"],y={ref:"theForm",class:"divide-y divide-gray-200 dark:divide-gray-800 divide-solid"},k={key:0,class:"bg-gray-100"},b=["innerHTML"],w=["innerHTML","onClick"],E={style:{width:"100%",overflow:"scroll"}},N={key:0,class:"nova-calendar noselect"},B={class:"nc-header"},C={class:"border-gray-200 dark:border-gray-900 dark:text-gray-300"},V={class:"nc-content"},F={class:"week"},x={class:"dayheader text-gray-400 noselect"},L={class:"daylabel"},M={class:"badges"},S={class:"badge-bg text-gray-200"},T=["innerHTML"],K=["innerHTML"],D={class:"week-events"},H=["onClick"],O={class:"name noscrollbar"},_={class:"badges noscrollbar"},j={class:"badge-bg text-gray-200"},A=["innerHTML"],z={class:"content noscrollbar"},R={key:0,class:"time"},I=["innerHTML"],U=["onClick"],$={class:"name noscrollbar"},W={key:0,class:"badges"},Z={class:"badge-bg text-gray-200"},q=["innerHTML"],J={class:"content noscrollbar"},P={key:0,class:"time"},G={key:1,class:"time"},Q=["innerHTML"];const X={mounted:function(){var e=this;this.init(),Nova.addShortcut("alt+right",(function(t){e.nextMonth()})),Nova.addShortcut("alt+left",(function(t){e.prevMonth()})),Nova.addShortcut("alt+h",(function(t){e.reset()}))},methods:{reset:function(){this.month=null,this.year=null,this.reload()},init:function(){this.hasStoredSettings()?(this.restoreSettings(),this.reload(!1)):this.reload(!0)},prevMonth:function(){this.month-=1,this.reload()},nextMonth:function(){this.month+=1,this.reload()},reload:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];console.log("reloading");var n=this;n.loading=!0;var r="/nova-vendor/wdelfuego/nova-calendar"+this.calendarUrl()+"/month?y="+n.year+"&m="+n.month;n.activeFilterKey?r+="&filter="+n.activeFilterKey:t&&(r+="&isInitRequest=1"),Nova.request().get(r).then((function(t){n.styles=t.data.styles,n.year=t.data.year,n.month=t.data.month,n.monthLabels=t.data.monthLabels,n.windowTitle=t.data.windowTitle,n.resetFiltersLabel=t.data.resetFiltersLabel,n.availableFilters=t.data.filters,n.activeFilterKey=t.data.activeFilterKey,n.title=t.data.title,n.columns=t.data.columns,n.weeks=t.data.weeks,e.setFilter(n.activeFilterKey),n.loading=!1,e.storeSettings()}))},open:function(e,t){e.metaKey||e.ctrlKey?window.open(Nova.url(t)):Nova.visit(t)},stylesForEvent:function(e){var t=this;if(e.options.styles){var n=[this.styles.default];return e.options.styles.forEach((function(e){void 0===t.styles[e]?console.log("[nova-calendar] Unknown custom style name '"+e+"'; does the eventStyles method of your CalendarDataProvider define it properly?"):n.push(t.styles[e])})),n}return this.styles.default},chooseFilter:function(e){this.setFilter(e),this.reload()},setFilter:function(e){for(var e in this.activeFilterKey=e,this.availableFilters)this.activeFilterKey==e&&(this.activeFilterLabel=this.availableFilters[e])},calendarUrl:function(){var e=window.location.pathname.substring(Nova.url("").length);return e.startsWith("/")?e:"/"+e},storageKey:function(){return"wdelfuego-nova-calendar-"+this.calendarUrl()},hasStoredSettings:function(){return null!==localStorage.getItem(this.storageKey())},storeSettings:function(){localStorage.setItem(this.storageKey(),JSON.stringify({year:this.year,month:this.month,activeFilterKey:this.activeFilterKey}))},restoreSettings:function(){var e=JSON.parse(localStorage.getItem(this.storageKey()));e&&(this.year=e.year,this.month=e.month,this.activeFilterKey=e.activeFilterKey)}},props:{},data:function(){return{loading:!0,resetFiltersLabel:"All events",availableFilters:{},activeFilterKey:null,activeFilterLabel:null,year:null,month:null,monthLabels:Array(12).fill(""),windowTitle:"",title:"",columns:Array(7).fill("-"),weeks:Array(6).fill(Array(7).fill({})),styles:{default:{color:"#fff","background-color":"rgba(var(--colors-primary-500), 0.9)"}}}}};var Y=n(379),ee=n.n(Y),te=n(148),ne={insert:"head",singleton:!1};ee()(te.Z,ne);te.Z.locals;const re=(0,n(744).Z)(X,[["render",function(e,t,n,X,Y,ee){var te=this,ne=(0,r.resolveComponent)("Head"),re=(0,r.resolveComponent)("DropdownTrigger"),oe=(0,r.resolveComponent)("ScrollWrap"),le=(0,r.resolveComponent)("DropdownMenu"),ae=(0,r.resolveComponent)("Dropdown"),ie=(0,r.resolveComponent)("Icon"),ce=(0,r.resolveComponent)("Tooltip"),se=(0,r.resolveComponent)("Card");return(0,r.openBlock)(),(0,r.createElementBlock)("div",null,[(0,r.createVNode)(ne,{title:e.$data.windowTitle||e.$data.title},null,8,["title"]),(0,r.createElementVNode)("div",o,[(0,r.createElementVNode)("div",l,[(0,r.createElementVNode)("a",{onClick:t[0]||(t[0]=function(){return ee.prevMonth&&ee.prevMonth.apply(ee,arguments)}),href:"#",class:"button hover:bg-gray-100 dark:hover:bg-gray-700",title:"Alt + ←"},a),(0,r.createElementVNode)("a",{onClick:t[1]||(t[1]=function(){return ee.reset&&ee.reset.apply(ee,arguments)}),href:"#",class:"button hover:bg-gray-100 dark:hover:bg-gray-700",title:"Alt + H"},i),(0,r.createElementVNode)("a",{onClick:t[2]||(t[2]=function(){return ee.nextMonth&&ee.nextMonth.apply(ee,arguments)}),href:"#",class:"button hover:bg-gray-100 dark:hover:bg-gray-700",title:"Alt + →"},c),(0,r.createVNode)(ae,{"handle-internal-clicks":!0,class:"flex h-9 hover:bg-gray-100 dark:hover:bg-gray-700 rounded",dusk:"month-picker"},{menu:(0,r.withCtx)((function(){return[(0,r.createVNode)(le,{width:"220"},{default:(0,r.withCtx)((function(){return[(0,r.createVNode)(oe,{height:350,class:"bg-white dark:bg-gray-900"},{default:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("div",s,[(0,r.createElementVNode)("div",d,[(0,r.withDirectives)((0,r.createElementVNode)("select",{name:"month",class:"mr-3 dark:bg-gray-900","onUpdate:modelValue":t[3]||(t[3]=function(e){return Y.month=e}),onChange:t[4]||(t[4]=function(e){return ee.reload()}),onClick:t[5]||(t[5]=(0,r.withModifiers)((function(){}),["stop"]))},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.$data.monthLabels,(function(e,t){return(0,r.openBlock)(),(0,r.createElementBlock)("option",{value:t},(0,r.toDisplayString)(e),9,u)})),256))],544),[[r.vModelSelect,Y.month]]),(0,r.withDirectives)((0,r.createElementVNode)("select",{name:"year",class:"dark:bg-gray-900","onUpdate:modelValue":t[6]||(t[6]=function(e){return Y.year=e}),onChange:t[7]||(t[7]=function(e){return ee.reload()}),onClick:t[8]||(t[8]=(0,r.withModifiers)((function(){}),["stop"]))},[((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(25,(function(e){return(0,r.createElementVNode)("option",{value:Y.year+(25-e)},(0,r.toDisplayString)(Y.year+(25-e)),9,m)})),64)),((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(100,(function(e){return(0,r.createElementVNode)("option",{value:Y.year-e},(0,r.toDisplayString)(Y.year-e),9,v)})),64))],544),[[r.vModelSelect,Y.year]])])],512)]})),_:1})]})),_:1})]})),default:(0,r.withCtx)((function(){return[(0,r.createVNode)(re,{class:"toolbar-button px-2",style:{"padding-left":"0"}})]})),_:1}),(0,r.createElementVNode)("h1",h,[(0,r.createElementVNode)("span",null,(0,r.toDisplayString)(e.$data.title),1)])]),f,(0,r.createElementVNode)("div",g,[Object.keys(Y.availableFilters).length?((0,r.openBlock)(),(0,r.createBlock)(ae,{key:0,"handle-internal-clicks":!0,class:(0,r.normalizeClass)([{"bg-primary-500 hover:bg-primary-600 border-primary-500":null!=Y.activeFilterKey,"dark:bg-primary-500 dark:hover:bg-primary-600 dark:border-primary-500":null!=Y.activeFilterKey},"flex h-9 hover:bg-gray-100 dark:hover:bg-gray-700 rounded"]),dusk:"filter-selector"},{menu:(0,r.withCtx)((function(){return[(0,r.createVNode)(le,{width:"260"},{default:(0,r.withCtx)((function(){return[(0,r.createVNode)(oe,{height:350,class:"bg-white dark:bg-gray-900"},{default:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("div",y,[null!=Y.activeFilterKey?((0,r.openBlock)(),(0,r.createElementBlock)("div",k,[(0,r.createElementVNode)("button",{class:"py-2 w-full block tracking-wide text-center text-gray-500 dark:bg-gray-800 dark:hover:bg-gray-700 focus:outline-none",onClick:t[9]||(t[9]=function(e){return ee.chooseFilter(null)}),innerHTML:e.$data.resetFiltersLabel},null,8,b)])):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",null,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.$data.availableFilters,(function(e,t){return(0,r.openBlock)(),(0,r.createElementBlock)("button",{class:(0,r.normalizeClass)(["py-2 w-full block dark:bg-gray-800 dark:hover:bg-gray-700 hover:bg-gray-200",{"font-bold":Y.activeFilterKey==t}]),innerHTML:e,onClick:function(e){return ee.chooseFilter(t)}},null,10,w)})),256))])],512)]})),_:1})]})),_:1})]})),default:(0,r.withCtx)((function(){return[(0,r.createVNode)(re,{class:(0,r.normalizeClass)([{"text-white hover:text-white dark:text-gray-800 dark:hover:text-gray-800":null!=Y.activeFilterKey},"toolbar-button px-2"])},{default:(0,r.withCtx)((function(){return[(0,r.createVNode)(ie,{type:"filter"}),null!=Y.activeFilterKey?((0,r.openBlock)(),(0,r.createElementBlock)("span",{key:0,class:(0,r.normalizeClass)([{"text-white dark:text-gray-800":null!=Y.activeFilterKey},"ml-2 font-bold"]),innerHTML:Y.activeFilterLabel},null,10,p)):(0,r.createCommentVNode)("",!0)]})),_:1},8,["class"])]})),_:1},8,["class"])):(0,r.createCommentVNode)("",!0)])]),(0,r.createElementVNode)("div",E,[(0,r.createVNode)(se,{class:"flex flex-col items-center justify-center dark:bg-gray-800",style:{"min-height":"300px","min-width":"800px","background-color":"var(--bg-gray-800)"}},{default:(0,r.withCtx)((function(){return[Y.title.length?((0,r.openBlock)(),(0,r.createElementBlock)("div",N,[(0,r.createElementVNode)("div",B,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.$data.columns,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("div",C,[(0,r.createElementVNode)("span",null,(0,r.toDisplayString)(e),1)])})),256))]),(0,r.createElementVNode)("div",V,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.$data.weeks,(function(e,t){return(0,r.openBlock)(),(0,r.createElementBlock)("div",F,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["day dark:bg-gray-900 dark:border-gray-800",["nc-col-"+e.weekdayColumn],{withinRange:e.isWithinRange,today:e.isToday}])},[(0,r.createElementVNode)("div",x,[(0,r.createElementVNode)("span",L,(0,r.toDisplayString)(e.label),1),(0,r.createElementVNode)("div",M,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.badges,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("span",S,[(0,r.createVNode)(ce,null,{content:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("span",{innerHTML:e.tooltip},null,8,T)]})),default:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("span",{class:"badge",innerHTML:e.badge},null,8,K)]})),_:2},1024)])})),256))])])],2)})),256)),(0,r.createElementVNode)("div",D,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.eventsMultiDay,(function(t){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)([["nc-event","multi","nc-col-"+e.weekdayColumn,"span-"+t.spansDaysN],{clickable:t.url,starts:t.startsEvent,ends:t.endsEvent,withinRange:t.isWithinRange}]),onClick:function(e){return ee.open(e,t.url)},style:(0,r.normalizeStyle)(te.stylesForEvent(t))},[(0,r.createElementVNode)("div",O,(0,r.toDisplayString)(t.name),1),(0,r.createElementVNode)("div",_,[t.startsEvent?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:0},(0,r.renderList)(t.badges,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("span",j,[(0,r.createElementVNode)("span",{class:"badge",innerHTML:e},null,8,A)])})),256)):(0,r.createCommentVNode)("",!0)]),(0,r.createElementVNode)("div",z,[t.startsEvent&&t.options.displayTime?((0,r.openBlock)(),(0,r.createElementBlock)("span",R,(0,r.toDisplayString)(t.startTime),1)):(0,r.createCommentVNode)("",!0),t.startsEvent?((0,r.openBlock)(),(0,r.createElementBlock)("span",{key:1,class:"notes",innerHTML:t.notes},null,8,I)):(0,r.createCommentVNode)("",!0)])],14,H)})),256))],64)})),256)),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["single-day-events","nc-col-"+e.weekdayColumn])},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.eventsSingleDay,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)([["nc-event"],{clickable:e.url,starts:e.startsEvent,ends:e.endsEvent,withinRange:e.isWithinRange}]),onClick:function(t){return ee.open(t,e.url)},style:(0,r.normalizeStyle)(te.stylesForEvent(e))},[(0,r.createElementVNode)("div",$,(0,r.toDisplayString)(e.name),1),e.badges.length>0?((0,r.openBlock)(),(0,r.createElementBlock)("div",W,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.badges,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("span",Z,[(0,r.createElementVNode)("span",{class:"badge",innerHTML:e},null,8,q)])})),256))])):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",J,[e.options.displayTime?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[e.endTime?((0,r.openBlock)(),(0,r.createElementBlock)("span",P,(0,r.toDisplayString)(e.startTime)+" - "+(0,r.toDisplayString)(e.endTime),1)):((0,r.openBlock)(),(0,r.createElementBlock)("span",G,(0,r.toDisplayString)(e.startTime),1))],64)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("span",{class:"notes",innerHTML:e.notes},null,8,Q)])],14,U)})),256))],2)})),256))])])})),256))])])):(0,r.createCommentVNode)("",!0)]})),_:1})])])}]]);Nova.booting((function(e,t){Nova.inertia("NovaCalendar",re)}))},148:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(645),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,"",""]);const l=o},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var l=0;l{},379:(e,t,n)=>{var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},l=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function i(e){for(var t=-1,n=0;n{t.Z=(e,t)=>{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n}}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var l=n[e]={id:e,exports:{}};return t[e](l,l.exports,r),l.exports}r.m=t,e=[],r.O=(t,n,o,l)=>{if(!n){var a=1/0;for(d=0;d=l)&&Object.keys(r.O).every((e=>r.O[e](n[c])))?n.splice(c--,1):(i=!1,l0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[n,o,l]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={103:0,990:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,l,[a,i,c]=n,s=0;if(a.some((t=>0!==e[t]))){for(o in i)r.o(i,o)&&(r.m[o]=i[o]);if(c)var d=c(r)}for(t&&t(n);sr(18)));var o=r.O(void 0,[990],(()=>r(762)));o=r.O(o)})(); \ No newline at end of file +(()=>{"use strict";var e,t={30:(e,t,n)=>{const r=Vue;var o={id:"nc-control"},l={class:"left-items"},a=[(0,r.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[(0,r.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 19l-7-7 7-7m8 14l-7-7 7-7"})],-1)],i=[(0,r.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[(0,r.createElementVNode)("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor"})],-1)],c=[(0,r.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[(0,r.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 5l7 7-7 7M5 5l7 7-7 7"})],-1)],s={ref:"theForm",class:"divide-y divide-gray-200 dark:divide-gray-800 divide-solid"},d={class:"p-3 text-center"},u=["value"],m=["value"],v=["value"],h={class:"text-90 font-normal text-xl md:text-2xl noselect"},f=(0,r.createElementVNode)("div",{class:"center-items"},null,-1),g={class:"right-items"},p=["innerHTML"],y={ref:"theForm",class:"divide-y divide-gray-200 dark:divide-gray-800 divide-solid"},k={key:0,class:"bg-gray-100"},b=["innerHTML"],w=["innerHTML","onClick"],E={style:{width:"100%",overflow:"scroll"}},N={key:0,class:"nova-calendar noselect"},B={class:"nc-header"},C={class:"border-gray-200 dark:border-gray-900 dark:text-gray-300"},V={class:"nc-content"},F={class:"week"},x={class:"dayheader text-gray-400 noselect"},L={class:"daylabel"},M={class:"badges"},S={class:"badge-bg text-gray-200"},T=["innerHTML"],K=["innerHTML"],D={class:"week-events"},H=["onClick"],O={class:"name noscrollbar"},_={class:"badges noscrollbar"},j={class:"badge-bg text-gray-200"},A=["innerHTML"],z={class:"content noscrollbar"},R={key:0,class:"time"},I=["innerHTML"],U=["onClick"],$={class:"name noscrollbar"},W={key:0,class:"badges"},Z={class:"badge-bg text-gray-200"},q=["innerHTML"],J={class:"content noscrollbar"},P={key:0,class:"time"},G={key:1,class:"time"},Q=["innerHTML"];const X={mounted:function(){var e=this;this.init(),Nova.addShortcut("alt+right",(function(t){e.nextMonth()})),Nova.addShortcut("alt+left",(function(t){e.prevMonth()})),Nova.addShortcut("alt+h",(function(t){e.reset()}))},methods:{reset:function(){this.month=null,this.year=null,this.reload()},init:function(){this.hasStoredSettings()?(this.restoreSettings(),this.reload(!1)):this.reload(!0)},prevMonth:function(){this.month-=1,this.reload()},nextMonth:function(){this.month+=1,this.reload()},reload:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this;n.loading=!0;var r="/nova-vendor/wdelfuego/nova-calendar"+this.calendarUrl()+"/month?y="+n.year+"&m="+n.month;n.activeFilterKey?r+="&filter="+n.activeFilterKey:t&&(r+="&isInitRequest=1"),Nova.request().get(r).then((function(t){n.styles=t.data.styles,n.year=t.data.year,n.month=t.data.month,n.monthLabels=t.data.monthLabels,n.windowTitle=t.data.windowTitle,n.resetFiltersLabel=t.data.resetFiltersLabel,n.availableFilters=t.data.filters,n.activeFilterKey=t.data.activeFilterKey,n.title=t.data.title,n.columns=t.data.columns,n.weeks=t.data.weeks,e.setFilter(n.activeFilterKey),n.loading=!1,e.storeSettings()}))},open:function(e,t){e.metaKey||e.ctrlKey?window.open(Nova.url(t)):Nova.visit(t)},stylesForEvent:function(e){var t=this;if(e.options.styles){var n=[this.styles.default];return e.options.styles.forEach((function(e){void 0===t.styles[e]?console.log("[nova-calendar] Unknown custom style name '"+e+"'; does the eventStyles method of your CalendarDataProvider define it properly?"):n.push(t.styles[e])})),n}return this.styles.default},chooseFilter:function(e){this.setFilter(e),this.reload()},setFilter:function(e){for(var e in this.activeFilterKey=e,this.availableFilters)this.activeFilterKey==e&&(this.activeFilterLabel=this.availableFilters[e])},calendarUrl:function(){var e=window.location.pathname.substring(Nova.url("").length);return e.startsWith("/")?e:"/"+e},storageKey:function(){return"wdelfuego-nova-calendar-"+this.calendarUrl()},hasStoredSettings:function(){return null!==localStorage.getItem(this.storageKey())},storeSettings:function(){localStorage.setItem(this.storageKey(),JSON.stringify({year:this.year,month:this.month,activeFilterKey:this.activeFilterKey}))},restoreSettings:function(){var e=JSON.parse(localStorage.getItem(this.storageKey()));e&&(this.year=e.year,this.month=e.month,this.activeFilterKey=e.activeFilterKey)}},props:{},data:function(){return{loading:!0,resetFiltersLabel:"All events",availableFilters:{},activeFilterKey:null,activeFilterLabel:null,year:null,month:null,monthLabels:Array(12).fill(""),windowTitle:"",title:"",columns:Array(7).fill("-"),weeks:Array(6).fill(Array(7).fill({})),styles:{default:{color:"#fff","background-color":"rgba(var(--colors-primary-500), 0.9)"}}}}};var Y=n(379),ee=n.n(Y),te=n(932),ne={insert:"head",singleton:!1};ee()(te.Z,ne);te.Z.locals;const re=(0,n(744).Z)(X,[["render",function(e,t,n,X,Y,ee){var te=this,ne=(0,r.resolveComponent)("Head"),re=(0,r.resolveComponent)("DropdownTrigger"),oe=(0,r.resolveComponent)("ScrollWrap"),le=(0,r.resolveComponent)("DropdownMenu"),ae=(0,r.resolveComponent)("Dropdown"),ie=(0,r.resolveComponent)("Icon"),ce=(0,r.resolveComponent)("Tooltip"),se=(0,r.resolveComponent)("Card");return(0,r.openBlock)(),(0,r.createElementBlock)("div",null,[(0,r.createVNode)(ne,{title:e.$data.windowTitle||e.$data.title},null,8,["title"]),(0,r.createElementVNode)("div",o,[(0,r.createElementVNode)("div",l,[(0,r.createElementVNode)("a",{onClick:t[0]||(t[0]=function(){return ee.prevMonth&&ee.prevMonth.apply(ee,arguments)}),href:"#",class:"button hover:bg-gray-100 dark:hover:bg-gray-700",title:"Alt + ←"},a),(0,r.createElementVNode)("a",{onClick:t[1]||(t[1]=function(){return ee.reset&&ee.reset.apply(ee,arguments)}),href:"#",class:"button hover:bg-gray-100 dark:hover:bg-gray-700",title:"Alt + H"},i),(0,r.createElementVNode)("a",{onClick:t[2]||(t[2]=function(){return ee.nextMonth&&ee.nextMonth.apply(ee,arguments)}),href:"#",class:"button hover:bg-gray-100 dark:hover:bg-gray-700",title:"Alt + →"},c),(0,r.createVNode)(ae,{"handle-internal-clicks":!0,class:"flex h-9 hover:bg-gray-100 dark:hover:bg-gray-700 rounded",dusk:"month-picker"},{menu:(0,r.withCtx)((function(){return[(0,r.createVNode)(le,{width:"220"},{default:(0,r.withCtx)((function(){return[(0,r.createVNode)(oe,{height:350,class:"bg-white dark:bg-gray-900"},{default:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("div",s,[(0,r.createElementVNode)("div",d,[(0,r.withDirectives)((0,r.createElementVNode)("select",{name:"month",class:"mr-3 dark:bg-gray-900","onUpdate:modelValue":t[3]||(t[3]=function(e){return Y.month=e}),onChange:t[4]||(t[4]=function(e){return ee.reload()}),onClick:t[5]||(t[5]=(0,r.withModifiers)((function(){}),["stop"]))},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.$data.monthLabels,(function(e,t){return(0,r.openBlock)(),(0,r.createElementBlock)("option",{value:t},(0,r.toDisplayString)(e),9,u)})),256))],544),[[r.vModelSelect,Y.month]]),(0,r.withDirectives)((0,r.createElementVNode)("select",{name:"year",class:"dark:bg-gray-900","onUpdate:modelValue":t[6]||(t[6]=function(e){return Y.year=e}),onChange:t[7]||(t[7]=function(e){return ee.reload()}),onClick:t[8]||(t[8]=(0,r.withModifiers)((function(){}),["stop"]))},[((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(25,(function(e){return(0,r.createElementVNode)("option",{value:Y.year+(25-e)},(0,r.toDisplayString)(Y.year+(25-e)),9,m)})),64)),((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(100,(function(e){return(0,r.createElementVNode)("option",{value:Y.year-e},(0,r.toDisplayString)(Y.year-e),9,v)})),64))],544),[[r.vModelSelect,Y.year]])])],512)]})),_:1})]})),_:1})]})),default:(0,r.withCtx)((function(){return[(0,r.createVNode)(re,{class:"toolbar-button px-2",style:{"padding-left":"0"}})]})),_:1}),(0,r.createElementVNode)("h1",h,[(0,r.createElementVNode)("span",null,(0,r.toDisplayString)(e.$data.title),1)])]),f,(0,r.createElementVNode)("div",g,[Object.keys(Y.availableFilters).length?((0,r.openBlock)(),(0,r.createBlock)(ae,{key:0,"handle-internal-clicks":!0,class:(0,r.normalizeClass)([{"bg-primary-500 hover:bg-primary-600 border-primary-500":null!=Y.activeFilterKey,"dark:bg-primary-500 dark:hover:bg-primary-600 dark:border-primary-500":null!=Y.activeFilterKey},"flex h-9 hover:bg-gray-100 dark:hover:bg-gray-700 rounded"]),dusk:"filter-selector"},{menu:(0,r.withCtx)((function(){return[(0,r.createVNode)(le,{width:"260"},{default:(0,r.withCtx)((function(){return[(0,r.createVNode)(oe,{height:350,class:"bg-white dark:bg-gray-900"},{default:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("div",y,[null!=Y.activeFilterKey?((0,r.openBlock)(),(0,r.createElementBlock)("div",k,[(0,r.createElementVNode)("button",{class:"py-2 w-full block tracking-wide text-center text-gray-500 dark:bg-gray-800 dark:hover:bg-gray-700 focus:outline-none",onClick:t[9]||(t[9]=function(e){return ee.chooseFilter(null)}),innerHTML:e.$data.resetFiltersLabel},null,8,b)])):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",null,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.$data.availableFilters,(function(e,t){return(0,r.openBlock)(),(0,r.createElementBlock)("button",{class:(0,r.normalizeClass)(["py-2 w-full block dark:bg-gray-800 dark:hover:bg-gray-700 hover:bg-gray-200",{"font-bold":Y.activeFilterKey==t}]),innerHTML:e,onClick:function(e){return ee.chooseFilter(t)}},null,10,w)})),256))])],512)]})),_:1})]})),_:1})]})),default:(0,r.withCtx)((function(){return[(0,r.createVNode)(re,{class:(0,r.normalizeClass)([{"text-white hover:text-white dark:text-gray-800 dark:hover:text-gray-800":null!=Y.activeFilterKey},"toolbar-button px-2"])},{default:(0,r.withCtx)((function(){return[(0,r.createVNode)(ie,{type:"filter"}),null!=Y.activeFilterKey?((0,r.openBlock)(),(0,r.createElementBlock)("span",{key:0,class:(0,r.normalizeClass)([{"text-white dark:text-gray-800":null!=Y.activeFilterKey},"ml-2 font-bold"]),innerHTML:Y.activeFilterLabel},null,10,p)):(0,r.createCommentVNode)("",!0)]})),_:1},8,["class"])]})),_:1},8,["class"])):(0,r.createCommentVNode)("",!0)])]),(0,r.createElementVNode)("div",E,[(0,r.createVNode)(se,{class:"flex flex-col items-center justify-center dark:bg-gray-800",style:{"min-height":"300px","min-width":"800px","background-color":"var(--bg-gray-800)"}},{default:(0,r.withCtx)((function(){return[Y.title.length?((0,r.openBlock)(),(0,r.createElementBlock)("div",N,[(0,r.createElementVNode)("div",B,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.$data.columns,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("div",C,[(0,r.createElementVNode)("span",null,(0,r.toDisplayString)(e),1)])})),256))]),(0,r.createElementVNode)("div",V,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.$data.weeks,(function(e,t){return(0,r.openBlock)(),(0,r.createElementBlock)("div",F,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["day dark:bg-gray-900 dark:border-gray-800",["nc-col-"+e.weekdayColumn],{withinRange:e.isWithinRange,today:e.isToday}])},[(0,r.createElementVNode)("div",x,[(0,r.createElementVNode)("span",L,(0,r.toDisplayString)(e.label),1),(0,r.createElementVNode)("div",M,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.badges,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("span",S,[(0,r.createVNode)(ce,null,{content:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("span",{innerHTML:e.tooltip},null,8,T)]})),default:(0,r.withCtx)((function(){return[(0,r.createElementVNode)("span",{class:"badge",innerHTML:e.badge},null,8,K)]})),_:2},1024)])})),256))])])],2)})),256)),(0,r.createElementVNode)("div",D,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.eventsMultiDay,(function(t){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)([["nc-event","multi","nc-col-"+e.weekdayColumn,"span-"+t.spansDaysN],{clickable:t.url,starts:t.startsEvent,ends:t.endsEvent,withinRange:t.isWithinRange}]),onClick:function(e){return ee.open(e,t.url)},style:(0,r.normalizeStyle)(te.stylesForEvent(t))},[(0,r.createElementVNode)("div",O,(0,r.toDisplayString)(t.name),1),(0,r.createElementVNode)("div",_,[t.startsEvent?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:0},(0,r.renderList)(t.badges,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("span",j,[(0,r.createElementVNode)("span",{class:"badge",innerHTML:e},null,8,A)])})),256)):(0,r.createCommentVNode)("",!0)]),(0,r.createElementVNode)("div",z,[t.startsEvent&&t.options.displayTime?((0,r.openBlock)(),(0,r.createElementBlock)("span",R,(0,r.toDisplayString)(t.startTime),1)):(0,r.createCommentVNode)("",!0),t.startsEvent?((0,r.openBlock)(),(0,r.createElementBlock)("span",{key:1,class:"notes",innerHTML:t.notes},null,8,I)):(0,r.createCommentVNode)("",!0)])],14,H)})),256))],64)})),256)),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["single-day-events","nc-col-"+e.weekdayColumn])},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.eventsSingleDay,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)([["nc-event"],{clickable:e.url,starts:e.startsEvent,ends:e.endsEvent,withinRange:e.isWithinRange}]),onClick:function(t){return ee.open(t,e.url)},style:(0,r.normalizeStyle)(te.stylesForEvent(e))},[(0,r.createElementVNode)("div",$,(0,r.toDisplayString)(e.name),1),e.badges.length>0?((0,r.openBlock)(),(0,r.createElementBlock)("div",W,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.badges,(function(e){return(0,r.openBlock)(),(0,r.createElementBlock)("span",Z,[(0,r.createElementVNode)("span",{class:"badge",innerHTML:e},null,8,q)])})),256))])):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",J,[e.options.displayTime?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[e.endTime?((0,r.openBlock)(),(0,r.createElementBlock)("span",P,(0,r.toDisplayString)(e.startTime)+" - "+(0,r.toDisplayString)(e.endTime),1)):((0,r.openBlock)(),(0,r.createElementBlock)("span",G,(0,r.toDisplayString)(e.startTime),1))],64)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("span",{class:"notes",innerHTML:e.notes},null,8,Q)])],14,U)})),256))],2)})),256))])])})),256))])])):(0,r.createCommentVNode)("",!0)]})),_:1})])])}]]);Nova.booting((function(e,t){Nova.inertia("NovaCalendar",re)}))},932:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(645),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,"",""]);const l=o},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var l=0;l{},379:(e,t,n)=>{var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},l=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function i(e){for(var t=-1,n=0;n{t.Z=(e,t)=>{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n}}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var l=n[e]={id:e,exports:{}};return t[e](l,l.exports,r),l.exports}r.m=t,e=[],r.O=(t,n,o,l)=>{if(!n){var a=1/0;for(d=0;d=l)&&Object.keys(r.O).every((e=>r.O[e](n[c])))?n.splice(c--,1):(i=!1,l0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[n,o,l]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={103:0,990:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,l,[a,i,c]=n,s=0;if(a.some((t=>0!==e[t]))){for(o in i)r.o(i,o)&&(r.m[o]=i[o]);if(c)var d=c(r)}for(t&&t(n);sr(30)));var o=r.O(void 0,[990],(()=>r(762)));o=r.O(o)})(); \ No newline at end of file diff --git a/resources/js/pages/Tool.vue b/resources/js/pages/Tool.vue index 130e6dd..db35993 100644 --- a/resources/js/pages/Tool.vue +++ b/resources/js/pages/Tool.vue @@ -288,7 +288,6 @@ export default { }, reload(isInitRequest = false) { - console.log('reloading'); let vue = this; vue.loading = true;