олом
This commit is contained in:
1 parent
4199453753
commit
48a190d33e
73 files changed
+39
-196
No files matched your search
+6
@@ -0,0 +1,6 @@
|
||||
import{p as nn,a0 as Nl,a6 as bt,a9 as Hn,a7 as Hl,r as O,w as at,o as et,ac as sn,F as b,Z as F,ar as Pl,H as ue,P as Vl,b as Bl,aF as Ll,aq as Wt,_ as ke,aG as rt,C as w,D as j,E as _,Y as A,$ as Z,aH as ft,R as ee,I as Dt,K as ie,L as X,G,ad as I,J as Ge,ah as Wl,a1 as jl,aI as Fl,ai as Ul,aJ as zl,aK as $l,aj as Yl,a4 as Gl,a5 as ql,a8 as Ql,ak as Zl,al as Xl,am as Jl,aL as Kl,an as ea,aM as ta,aN as na,ao as ia,X as te,aO as Ls,aP as Ht,aQ as sa,a as ra,af as ce,A as Ws,aR as la,aS as aa,aT as oa,S as P,V as ge,aE as K,aU as ca,aV as da,c as Pn,U as js,W as Fs,M as ua,aW as ha,h as fa,aX as ga,aY as pa,aZ as ma,N as va,O as ya,a_ as Ue,ae as k,a$ as H,b0 as ae,Q as Si,b1 as ba,az as jt,b2 as Vn,b3 as Da,b4 as Ci,b5 as R,B as _a,aB as wa}from"./index-10fb4e71.js";import{m as Ea,a as Ti,b as Aa,c as Ri,d as Sa,e as Ca,C as Us,V as Bn}from"./VTooltip-b27dec95.js";import{V as _t,a as Ta,b as Ra}from"./VBtn-762ed872.js";import{V as zs}from"./VContainer-03dc2efe.js";import{d as ka,b as Ma,c as Kn,V as xa,e as Ia,g as Oa,a as $s}from"./VTextarea-17b335b5.js";import{m as Na,u as Ha}from"./group-a84ca0f2.js";import{f as Pa,m as Va,V as ki}from"./VSelectionControl-7c25bcae.js";import{V as Ba,L as La}from"./load-round-2a561306.js";import{m as Wa,u as ja,V as Mi}from"./VInput-c4768b22.js";import"./VChip-5e885fd9.js";const Fa=nn({color:String,cycle:Boolean,delimiterIcon:{type:Nl,default:"$delimiter"},height:{type:[Number,String],default:500},hideDelimiters:Boolean,hideDelimiterBackground:Boolean,interval:{type:[Number,String],default:6e3,validator:t=>Number(t)>0},progress:[Boolean,String],verticalDelimiters:[Boolean,String],...Ea({continuous:!0,mandatory:"force",showArrows:!0})},"VCarousel"),Ua=bt()({name:"VCarousel",props:Fa(),emits:{"update:modelValue":t=>!0},setup(t,e){let{slots:n}=e;const i=Hn(t,"modelValue"),{t:r}=Hl(),s=O();let l=-1;at(i,o),at(()=>t.interval,o),at(()=>t.cycle,c=>{c?o():window.clearTimeout(l)}),et(a);function a(){!t.cycle||!s.value||(l=window.setTimeout(s.value.group.next,+t.interval>0?+t.interval:6e3))}function o(){window.clearTimeout(l),window.requestAnimationFrame(a)}return sn(()=>{const[c]=Ti.filterProps(t);return b(Ti,ue({ref:s},c,{modelValue:i.value,"onUpdate:modelValue":d=>i.value=d,class:["v-carousel",{"v-carousel--hide-delimiter-background":t.hideDelimiterBackground,"v-carousel--vertical-delimiters":t.verticalDelimiters},t.class],style:[{height:Bl(t.height)},t.style]}),{default:n.default,additional:d=>{let{group:u}=d;return b(F,null,[!t.hideDelimiters&&b("div",{class:"v-carousel__controls",style:{left:t.verticalDelimiters==="left"&&t.verticalDelimiters?0:"auto",right:t.verticalDelimiters==="right"?0:"auto"}},[u.items.value.length>0&&b(Pl,{defaults:{VBtn:{color:t.color,icon:t.delimiterIcon,size:"x-small",variant:"text"}},scoped:!0},{default:()=>[u.items.value.map((h,f)=>{const p={id:`carousel-item-${h.id}`,"aria-label":r("$vuetify.carousel.ariaLabel.delimiter",f+1,u.items.value.length),class:[u.isSelected(h.id)&&"v-btn--active"],onClick:()=>u.select(h.id,!0)};return n.item?n.item({props:p,item:h}):b(_t,ue(h,p),null)})]})]),t.progress&&b(Vl,{class:"v-carousel__progress",color:typeof t.progress=="string"?t.progress:void 0,modelValue:(u.getItemIndex(i.value)+1)/u.items.value.length*100},null)])},prev:n.prev,next:n.next})}),{}}}),za=nn({...Ll(),...Aa()},"VCarouselItem"),$a=bt()({name:"VCarouselItem",inheritAttrs:!1,props:za(),setup(t,e){let{slots:n,attrs:i}=e;sn(()=>{const[r]=Wt.filterProps(t),[s]=Ri.filterProps(t);return b(Ri,ue({class:"v-carousel-item"},s),{default:()=>[b(Wt,ue(i,r),n)]})})}}),Ya={setup(){const t=ft.slice(0,-1),e=O([{link:""}]);return rt("api/navigation/carousels/",e),{burl:t,carous:e}}};function Ga(t,e,n,i,r,s){return w(),j(Ua,{interval:"10000",cover:"",height:"450","hide-delimiters":"","hide-delimiter-background":"","show-arrows":"hover",color:"white",cycle:""},{default:_(()=>[(w(!0),A(F,null,Z(i.carous,(l,a)=>(w(),j($a,{key:a,src:`${i.burl}${l.link}`,cover:"",eager:""},{default:_(()=>[b(zs,{"fill-height":"",fluid:"","pa-0":"","ma-0":"","pb-3":"",class:"flex-column h-100 d-flex"},{default:_(()=>[b(ee,{class:"bgCard h-100 d-flex flex-column"},{default:_(()=>[b(Dt,{class:"ma-2 text-h3 text-uppercase titles text-text_carous py-5 flex-column"},{default:_(()=>[b(ie,null,{default:_(()=>[b(X,{class:"pa-0 pl-1 align-self-center"},{default:_(()=>[G(I(l.title),1)]),_:2},1024),b(X,{class:"flex-grow-0 pa-0 pr-1"},{default:_(()=>[b(Wt,{width:"50","aspect-ratio":1,src:`${i.burl}${l.sender}`,cover:""},null,8,["src"])]),_:2},1024)]),_:2},1024)]),_:2},1024),b(Ge,{class:"ml-2 mb-0 mb-2 w-50 flex-grow-0 pb-3 text-h6 bgText overflow-auto"},{default:_(()=>[b(ka,{class:"text-text_carous mt-n3 text-black textareas pt-2 font-weight-medium","model-value":l.text,variant:"plain",readonly:"","auto-grow":"",rows:"1","hide-details":""},null,8,["model-value"])]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1032,["src"]))),128))]),_:1})}const qa=ke(Ya,[["render",Ga]]);const Qa=nn({color:String,...Wl(Line truncated
|
||||
* vue-cal v4.8.1
|
||||
* (c) 2022 Antoni Andre <antoniandre.web@gmail.com>
|
||||
* @license MIT
|
||||
*/let it,Hs,Ps,le,st={},ze={};class sp{constructor(e){ye(this,"_vuecal",null),ye(this,"selectCell",(n=!1,i,r)=>{this._vuecal.$emit("cell-click",r?{date:i,split:r}:i),this._vuecal.clickToNavigate||n?this._vuecal.switchToNarrowerView():this._vuecal.dblclickToNavigate&&"ontouchstart"in window&&(this._vuecal.domEvents.dblTapACell.taps++,setTimeout(()=>this._vuecal.domEvents.dblTapACell.taps=0,this._vuecal.domEvents.dblTapACell.timeout),this._vuecal.domEvents.dblTapACell.taps>=2&&(this._vuecal.domEvents.dblTapACell.taps=0,this._vuecal.switchToNarrowerView(),this._vuecal.$emit("cell-dblclick",r?{date:i,split:r}:i)))}),ye(this,"keyPressEnterCell",(n,i)=>{this._vuecal.$emit("cell-keypress-enter",i?{date:n,split:i}:n),this._vuecal.switchToNarrowerView()}),ye(this,"getPosition",n=>{const{left:i,top:r}=this._vuecal.cellsEl.getBoundingClientRect(),{clientX:s,clientY:l}="ontouchstart"in window&&n.touches?n.touches[0]:n;return{x:s-i,y:l-r}}),ye(this,"minutesAtCursor",n=>{let i=0,r={x:0,y:0};const{timeStep:s,timeCellHeight:l,timeFrom:a}=this._vuecal.$props;return typeof n=="number"?i=n:typeof n=="object"&&(r=this.getPosition(n),i=Math.round(r.y*s/parseInt(l)+a)),{minutes:Math.max(Math.min(i,1440),0),cursorCoords:r}}),this._vuecal=e}}let $,Y,Nn;class rp{constructor(e,n){ye(this,"_vuecal",null),ye(this,"eventDefaults",{_eid:null,start:"",startTimeMinutes:0,end:"",endTimeMinutes:0,title:"",content:"",background:!1,allDay:!1,segments:null,repeat:null,daysCount:1,deletable:!0,deleting:!1,titleEditable:!0,resizable:!0,resizing:!1,draggable:!0,dragging:!1,draggingStatic:!1,focused:!1,class:""}),this._vuecal=e,$=n}createAnEvent(e,n,i){if(typeof e=="string"&&(e=$.stringToDate(e)),!(e instanceof Date))return!1;const r=$.dateToMinutes(e),s=r+(n=1*n||120),l=$.addMinutes(new Date(e),n);i.end&&(typeof i.end=="string"&&(i.end=$.stringToDate(i.end)),i.endTimeMinutes=$.dateToMinutes(i.end));const a={...this.eventDefaults,_eid:`${this._vuecal._.uid}_${this._vuecal.eventIdIncrement++}`,start:e,startTimeMinutes:r,end:l,endTimeMinutes:s,segments:null,...i};return typeof this._vuecal.onEventCreate!="function"||this._vuecal.onEventCreate(a,()=>this.deleteAnEvent(a))?(a.startDateF!==a.endDateF&&(a.daysCount=$.countDays(a.start,a.end)),this._vuecal.mutableEvents.push(a),this._vuecal.addEventsToView([a]),this._vuecal.emitWithEvent("event-create",a),this._vuecal.$emit("event-change",{event:this._vuecal.cleanupEvent(a),originalEvent:null}),a):void 0}addEventSegment(e){e.segments||(e.segments={},e.segments[$.formatDateLite(e.start)]={start:e.start,startTimeMinutes:e.startTimeMinutes,endTimeMinutes:1440,isFirstDay:!0,isLastDay:!1});const n=e.segments[$.formatDateLite(e.end)];n&&(n.isLastDay=!1,n.endTimeMinutes=1440);const i=$.addDays(e.end,1),r=$.formatDateLite(i);return i.setHours(0,0,0,0),e.segments[r]={start:i,startTimeMinutes:0,endTimeMinutes:e.endTimeMinutes,isFirstDay:!1,isLastDay:!0},e.end=$.addMinutes(i,e.endTimeMinutes),e.daysCount=Object.keys(e.segments).length,r}removeEventSegment(e){let n=Object.keys(e.segments).length;if(n<=1)return $.formatDateLite(e.end);delete e.segments[$.formatDateLite(e.end)],n--;const i=$.subtractDays(e.end,1),r=$.formatDateLite(i),s=e.segments[r];return n?s&&(s.isLastDay=!0,s.endTimeMinutes=e.endTimeMinutes):e.segments=null,e.daysCount=n||1,e.end=i,r}createEventSegments(e,n,i){const r=n.getTime(),s=i.getTime();let l,a,o,c=e.start.getTime(),d=e.end.getTime(),u=!1;for(e.end.getHours()||e.end.getMinutes()||(d-=1e3),e.segments={},e.repeat?(l=r,a=Math.min(s,e.repeat.until?$.stringToDate(e.repeat.until).getTime():s)):(l=Math.max(r,c),a=Math.min(s,d));l<=a;){let h=!1;const f=$.addDays(new Date(l),1).setHours(0,0,0,0);let p,y,v,D;if(e.repeat){const E=new Date(l),S=$.formatDateLite(E);(u||e.occurrences&&e.occurrences[S])&&(u||(c=e.occurrences[S].start,o=new Date(c).setHours(0,0,0,0),d=e.occurrences[S].end),u=!0,h=!0),p=l===o,y=S===$.formatDateLite(new Date(d)),v=new Date(p?c:l),D=$.formatDateLite(v),y&&(u=!1)}else h=!0,p=l===c,y=a===d&&f>a,v=p?e.start:new Date(l),D=$.formatDateLite(p?e.start:v);h&&(e.segments[D]={start:v,startTimeMinutes:p?e.startTimeMinutes:0,endTimeMinutes:y?e.endTimeMinutes:1440,isFirstDay:p,isLastDay:y}),l=f}return e}deleteAnEvent(e){this._vuecal.emitWithEvent("event-delete",e),this._vuecal.mutableEvents=this._vuecal.mutableEvents.filter(n=>n._eid!==e._eid),this._vuecal.view.events=this._vuecal.view.events.filter(n=>n._eid!==e._eid)}checkCellOverlappingEvents(e,n){Nn=e.slice(0),Y={},e.forEach(r=>{Nn.shift(),Y[r._eid]||(Y[r._eid]={overlaps:[],start:r.start,position:0}),Y[r._eid].position=0,Nn.forEach(s=>{Y[s._eid]||(Y[s._eid]={overlaps:[],start:s.start,position:0});const l=this.eventInRange(s,r.start,r.end),a=n.overlapsPerTimeStep?$.datesInSameTimeStep(r.start,s.start,n.timeStep):1;if(r.background||r.allDay||s.background||s.allDay||!l||!a){let o,c;(o=(Y[r._eid]||{overlaps:[]}).overlaps.indexOf(s._eid))>-1&&Y[r._eid].overlaps.splice(o,1),(c=(Y[s._eid]||{overlaps:[]}).overlaps.indexOf(r._eid))>-1&&Y[s.Line truncated
|
||||
A valid view must be one of: ${Vs.join(", ")}.`),t="week"),this.enabledViews.includes(t)||(console.warn(`Vue Cal: the provided active-view "${t}" is disabled. Using the "${this.enabledViews[0]}" view instead.`),t=this.enabledViews[0]),t},switchToNarrowerView(t=null){this.transitionDirection="right";const e=this.enabledViews[this.enabledViews.indexOf(this.view.id)+1];e&&this.switchView(e,t)},switchView(t,e=null,n=!1){t=this.validateView(t);const i=this.utils.date,r=this.view.startDate&&this.view.startDate.getTime();if(this.transitions&&n){if(this.view.id===t)return;const a=this.enabledViews;this.transitionDirection=a.indexOf(this.view.id)>a.indexOf(t)?"left":"right"}const s=this.view.id;switch(this.view.events=[],this.view.id=t,this.view.firstCellDate=null,this.view.lastCellDate=null,e||(e=this.view.selectedDate||this.view.startDate),t){case"years":this.view.startDate=new Date(25*Math.floor(e.getFullYear()/25)||2e3,0,1),this.view.endDate=new Date(this.view.startDate.getFullYear()+25,0,1),this.view.endDate.setSeconds(-1);break;case"year":this.view.startDate=new Date(e.getFullYear(),0,1),this.view.endDate=new Date(e.getFullYear()+1,0,1),this.view.endDate.setSeconds(-1);break;case"month":{this.view.startDate=new Date(e.getFullYear(),e.getMonth(),1),this.view.endDate=new Date(e.getFullYear(),e.getMonth()+1,1),this.view.endDate.setSeconds(-1);let a=new Date(this.view.startDate);if(a.getDay()!==(this.startWeekOnSunday?0:1)&&(a=i.getPreviousFirstDayOfWeek(a,this.startWeekOnSunday)),this.view.firstCellDate=a,this.view.lastCellDate=i.addDays(a,41),this.view.lastCellDate.setHours(23,59,59,0),this.hideWeekends){if([0,6].includes(this.view.firstCellDate.getDay())){const o=this.view.firstCellDate.getDay()!==6||this.startWeekOnSunday?1:2;this.view.firstCellDate=i.addDays(this.view.firstCellDate,o)}if([0,6].includes(this.view.startDate.getDay())){const o=this.view.startDate.getDay()===6?2:1;this.view.startDate=i.addDays(this.view.startDate,o)}if([0,6].includes(this.view.lastCellDate.getDay())){const o=this.view.lastCellDate.getDay()!==0||this.startWeekOnSunday?1:2;this.view.lastCellDate=i.subtractDays(this.view.lastCellDate,o)}if([0,6].includes(this.view.endDate.getDay())){const o=this.view.endDate.getDay()===0?2:1;this.view.endDate=i.subtractDays(this.view.endDate,o)}}break}case"week":{e=i.getPreviousFirstDayOfWeek(e,this.startWeekOnSunday);const a=this.hideWeekends?5:7;this.view.startDate=this.hideWeekends&&this.startWeekOnSunday?i.addDays(e,1):e,this.view.startDate.setHours(0,0,0,0),this.view.endDate=i.addDays(e,a),this.view.endDate.setSeconds(-1);break}case"day":this.view.startDate=e,this.view.startDate.setHours(0,0,0,0),this.view.endDate=new Date(e),this.view.endDate.setHours(23,59,59,0)}this.addEventsToView();const l=this.view.startDate&&this.view.startDate.getTime();if((s!==t||l!==r)&&(this.$emit("update:activeView",t),this.ready)){const a=this.view.startDate,o={view:t,startDate:a,endDate:this.view.endDate,...this.isMonthView?{firstCellDate:this.view.firstCellDate,lastCellDate:this.view.lastCellDate,outOfScopeEvents:this.view.outOfScopeEvents.map(this.cleanupEvent)}:{},events:this.view.events.map(this.cleanupEvent),...this.isWeekView?{week:i.getWeek(this.startWeekOnSunday?i.addDays(a,1):a)}:{}};this.$emit("view-change",o)}},previous(){this.previousNext(!1)},next(){this.previousNext()},previousNext(t=!0){const e=this.utils.date;this.transitionDirection=t?"right":"left";const n=t?1:-1;let i=null;const{startDate:r,id:s}=this.view;switch(s){case"years":i=new Date(r.getFullYear()+25*n,0,1);break;case"year":i=new Date(r.getFullYear()+1*n,1,1);break;case"month":i=new Date(r.getFullYear(),r.getMonth()+1*n,1);break;case"week":i=e[t?"addDays":"subtractDays"](e.getPreviousFirstDayOfWeek(r,this.startWeekOnSunday),7);break;case"day":i=e[t?"addDays":"subtractDays"](r,1);const l=i.getDay(),a=this.startWeekOnSunday?l:(l||7)-1;if(this.weekDays[a].hide){const o=this.weekDays.map((d,u)=>({...d,i:u}));let c=0;t?([...o.slice(a),...o].find(d=>(c++,!d.hide)).i,c--):[...o,...o.slice(0,a)].reverse().find(d=>(c++,!d.hide)).i,i=e[t?"addDays":"subtractDays"](i,c)}}i&&this.switchView(s,i)},addEventsToView(t=[]){const e=this.utils.event,{startDate:n,endDate:i,firstCellDate:r,lastCellDate:s}=this.view;if(t.length||(this.view.events=[]),!(t=t.length?t:[...this.mutableEvents])||this.isYearsOrYearView&&!this.eventsCountOnYearView)return;let l=t.filter(a=>e.eventInRange(a,n,i));this.isYearsOrYearView||this.isMonthView&&!this.eventsOnMonthView||(l=l.map(a=>a.daysCount>1?e.createEventSegments(a,r||n,s||i):a)),this.view.events.push(...l),this.isMonthView&&(this.view.outOfScopeEvents=[],t.forEach(a=>{(e.eventInRange(a,r,n)||e.eventInRange(a,i,s))&&(this.view.events.some(o=>o._eid===a._eid)||this.view.outOfScopeEvents.push(a))}))},findAncestor(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t},isDOMElementAnEvent(t){return t.classList.contains("vuecal__event")||this.findAncestor(t,"vuecal__event")},onMouseMove(t){const{resizeAnEvent:e,dr
Line truncated
|
||||
Reference in new issue
Block a user