angular-schedule
Version:
A simple and light schedule package for angular.
16 lines (14 loc) • 22.6 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("rxjs"),require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-schedule",["exports","@angular/core","rxjs","@angular/cdk/overlay","@angular/cdk/portal","rxjs/operators","@angular/common"],e):e((t=t||self)["angular-schedule"]={},t.ng.core,t.rxjs,t.ng.cdk.overlay,t.ng.cdk.portal,t.rxjs.operators,t.ng.common)}(this,(function(t,e,n,o,r,a,i){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,a=n.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}function l(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}var d=function(){function t(){}return t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}(),c=new e.InjectionToken("scheduler user options"),p=function(){function t(t,n,o,r){this.libConfig=t,this.elementRef=n,this.overlay=o,this.viewContainerRef=r,this.isSelecting=!1,this.finishedSelecting=new e.EventEmitter,this.editInfo=new e.EventEmitter,this.excludedDay=new e.EventEmitter,this.includedDay=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){t.showBy&&this.generateAllDates()},t.prototype.ngOnInit=function(){},t.prototype.ngAfterViewInit=function(){this.scrollToToday()},t.prototype.generateAllDates=function(){for(var t=(new Date).getMonth(),e=(new Date).getFullYear(),n=this.libConfig.monthsInPast||4,o=this.libConfig.monthsInFuture||12,r=t-n<0?t-n+12:t-n,a=r>=9?e-1:e,i=this.calculateToDate(e,t,o),s=[];a<=i.getFullYear();){var l=a===i.getFullYear()?i.getMonth():11;if("day"===this.showBy)for(var d=r;d<=l;d++)s.push({month:new Date(Date.UTC(a,r,1)),weekDays:this.generateDates(a,r)}),r=11===r?0:r+1;else{s.push({month:new Date(Date.UTC(a,r,1)),weekDays:this.generateMonths(a,r,l)});for(d=r;d<=l;d++)r=11===r?0:r+1}a+=1}this.days=s},t.prototype.calculateToDate=function(t,e,n){var o=e+n>12?(e+n)%12:e+n,r=e+n>12?Math.floor((e+n)/12):0;return new Date(Date.UTC(t+r,o,1))},t.prototype.generateDates=function(t,e){for(var n=new Date(Date.UTC(t,e,1)),o=[];n.getMonth()===e;)o.push(new Date(n)),n.setDate(n.getDate()+1);return o},t.prototype.excludeIncludeCheck=function(t){return!1},t.prototype.calculateFromTo=function(t,e,n){var o=new Date(t),r=new Date(e),a=new Date(n),i=this.libConfig.skipDays||[0,6];return"day"===this.showBy?a>=o&&a<=r&&!i.includes(a.getDay()):a>=o&&a<=r},t.prototype.isDayOff=function(t,e,n){var o=new Date(t),r=new Date(e),a=new Date(n),i=this.libConfig.skipDays||[0,6];return a>=o&&a<=r&&i.includes(a.getDay())&&"month"!==this.showBy},t.prototype.enter=function(t){this.isSelecting&&(t.target.classList.contains("selected")?(t.target.classList.remove("selected"),t.target.parentNode.nextSibling.lastChild.classList.contains("selected")&&t.target.parentNode.nextSibling.lastChild.classList.remove("selected")):(t.target.classList.add("selected"),t.target.parentNode.previousSibling.lastChild.classList.contains("selected")||t.target.parentNode.previousSibling.lastChild.classList.add("selected")))},t.prototype.startSelect=function(t,e,n){0===t.button&&(this.startUser=n,this.isSelecting=!0,t.target.classList.add("selected"),this.startDay=e)},t.prototype.endSelect=function(t,e,n){if(this.startUser!==n)throw"Start and end row doesn't match! You might have started selecting in one row and ended up in another one.";if(0===t.button){t.target.classList.add("selected"),this.isSelecting=!1,this.selections.forEach((function(t){return t.nativeElement.classList.remove("selected")}));var o={endDay:e.toISOString(),user:n,startDay:this.startDay.toISOString()};this.finishedSelecting.emit(o)}},t.prototype.reCalc=function(t){if(this.isSelecting){var e=this.container.nativeElement.getBoundingClientRect();t.clientX-e.left>1e3&&(this.container.nativeElement.scrollLeft+=40)}},t.prototype.scrollToToday=function(){this.elementRef.nativeElement.querySelector(".bottomData__title.today").scrollIntoView()},t.prototype.generateMonths=function(t,e,n){for(var o=e,r=[];o<=n;)r=l(r,[new Date(Date.UTC(t,o,1))]),o++;return r},t.prototype.open=function(t,e,o,i){var s=this;if("day"===this.showBy){var l=t.x,d=t.y;t.preventDefault(),this.close();var c=this.overlay.position().flexibleConnectedTo({x:l,y:d}).withPositions([{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}]);this.overlayRef=this.overlay.create({positionStrategy:c,scrollStrategy:this.overlay.scrollStrategies.close()}),this.overlayRef.attach(new r.TemplatePortal(this.userMenu,this.viewContainerRef,{$implicit:{user:e,project:o,weekday:i}})),this.sub=n.fromEvent(document,"click").pipe(a.filter((function(t){var e=t.target;return!!s.overlayRef&&!s.overlayRef.overlayElement.contains(e)})),a.take(1)).subscribe((function(){return s.close()}))}},t.prototype.close=function(){this.sub&&this.sub.unsubscribe(),this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null)},t.prototype.excludeDay=function(t){this.close(),this.excludedDay.emit(t)},t.prototype.includeDay=function(t){this.close(),this.includedDay.emit(t)},t.prototype.isToday=function(t){return new Date(t).toDateString()===(new Date).toDateString()},t.prototype.trackPersons=function(t,e){return e.id},t.prototype.trackMonths=function(t){return t},t.prototype.trackDays=function(t){return t},t.prototype.trackData=function(t,e){return e.id},t.decorators=[{type:e.Component,args:[{selector:"ngx-scheduler",template:'\n\t\t<button\n\t\t\t*ngIf="libConfig?.showToday"\n\t\t\tclass="scrollToToday"\n\t\t\t(click)="scrollToToday()"\n\t\t>\n\t\t\t{{ todayButtonLabel || \'Today\' }}\n\t\t</button>\n\t\t<div class="table">\n\t\t\t<div class="left">\n\t\t\t\t<div class="spacer"></div>\n\t\t\t\t<div\n\t\t\t\t\t*ngFor="let person of persons; trackBy: trackPersons"\n\t\t\t\t\t[ngStyle]="{\n\t\t\t\t\t\theight:\n\t\t\t\t\t\t\tperson.data.length * 30 >= 60\n\t\t\t\t\t\t\t\t? (person?.data.length + 3) * 30 + \'px\'\n\t\t\t\t\t\t\t\t: \'100px\'\n\t\t\t\t\t}"\n\t\t\t\t\tclass="who"\n\t\t\t\t>\n\t\t\t\t\t<strong>{{ person?.name }}</strong>\n\t\t\t\t\t<br />\n\t\t\t\t\t<small [innerText]="person?.departments || \'\'"></small>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div #container class="right">\n\t\t\t\t<div class="header">\n\t\t\t\t\t<div\n\t\t\t\t\t\t*ngFor="let day of days; trackBy: trackMonths"\n\t\t\t\t\t\tclass="headerData"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div class="topData">\n\t\t\t\t\t\t\t<strong\n\t\t\t\t\t\t\t\t>{{\n\t\t\t\t\t\t\t\t\tshowBy === \'day\'\n\t\t\t\t\t\t\t\t\t\t? (day.month | date: \'MMM yyyy\')\n\t\t\t\t\t\t\t\t\t\t: (day.month | date: \'yyyy\')\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="bottomData">\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass="bottomData__title"\n\t\t\t\t\t\t\t\t*ngFor="let weekday of day?.weekDays; trackBy: trackDays"\n\t\t\t\t\t\t\t\t[class.today]="isToday(weekday)"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<strong>{{\n\t\t\t\t\t\t\t\t\tshowBy === \'day\'\n\t\t\t\t\t\t\t\t\t\t? (weekday | date: \'dd EEE\')\n\t\t\t\t\t\t\t\t\t\t: (weekday | date: \'MMMM\')\n\t\t\t\t\t\t\t\t}}</strong>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass="pos-rel"\n\t\t\t\t\t\t*ngFor="let person of persons; let i = index; trackBy: trackPersons"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div *ngFor="let day of days; trackBy: trackMonths" class="body">\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass="bodyData"\n\t\t\t\t\t\t\t\t[ngStyle]="{\n\t\t\t\t\t\t\t\t\theight:\n\t\t\t\t\t\t\t\t\t\tperson?.data.length * 30 >= 60\n\t\t\t\t\t\t\t\t\t\t\t? (person?.data.length + 3) * 30 + \'px\'\n\t\t\t\t\t\t\t\t\t\t\t: \'100px\',\n\t\t\t\t\t\t\t\t\t\'background-color\': isToday(weekday)\n\t\t\t\t\t\t\t\t\t\t? \'rgba(241, 229, 188, .5)\'\n\t\t\t\t\t\t\t\t\t\t: \'#fff\'\n\t\t\t\t\t\t\t\t}"\n\t\t\t\t\t\t\t\t*ngFor="let weekday of day?.weekDays; trackBy: trackDays"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\t\tclass="projectLabel"\n\t\t\t\t\t\t\t\t\t*ngFor="let project of person?.data; trackBy: trackData"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t(contextmenu)="open($event, person.id, project, weekday)"\n\t\t\t\t\t\t\t\t\t\t[showTooltip]="libConfig?.showTooltip"\n\t\t\t\t\t\t\t\t\t\t[tooltip]="project?.description || \'\'"\n\t\t\t\t\t\t\t\t\t\t[placement]="placement"\n\t\t\t\t\t\t\t\t\t\t[delay]="delay"\n\t\t\t\t\t\t\t\t\t\t[ngStyle]="{ backgroundColor: project?.color }"\n\t\t\t\t\t\t\t\t\t\t*ngIf="\n\t\t\t\t\t\t\t\t\t\t\t(calculateFromTo(project?.from, project?.to, weekday) &&\n\t\t\t\t\t\t\t\t\t\t\t\t!project?.excludeDays.includes(weekday)) ||\n\t\t\t\t\t\t\t\t\t\t\tproject?.includeDays.includes(weekday)\n\t\t\t\t\t\t\t\t\t\t"\n\t\t\t\t\t\t\t\t\t\t(click)="\n\t\t\t\t\t\t\t\t\t\t\teditInfo.emit({ person: person?.id, project: project })\n\t\t\t\t\t\t\t\t\t\t"\n\t\t\t\t\t\t\t\t\t\t>{{ project?.name }} {{ project?.hours }}</span\n\t\t\t\t\t\t\t\t\t>\n\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t(contextmenu)="\n\t\t\t\t\t\t\t\t\t\t\topen($event, person.id, project, weekday);\n\t\t\t\t\t\t\t\t\t\t\t$event.preventDefault()\n\t\t\t\t\t\t\t\t\t\t"\n\t\t\t\t\t\t\t\t\t\t*ngIf="\n\t\t\t\t\t\t\t\t\t\t\t(isDayOff(project?.from, project?.to, weekday) &&\n\t\t\t\t\t\t\t\t\t\t\t\t!project?.includeDays.includes(weekday)) ||\n\t\t\t\t\t\t\t\t\t\t\tproject?.excludeDays.includes(weekday)\n\t\t\t\t\t\t\t\t\t\t"\n\t\t\t\t\t\t\t\t\t\tclass="dayOff"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{{ dayOffLabel || \'Day off\' }}</span\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t#selectionDiv\n\t\t\t\t\t\t\t\t\tclass="selectionDiv"\n\t\t\t\t\t\t\t\t\t(mousedown)="startSelect($event, weekday, person?.id)"\n\t\t\t\t\t\t\t\t\t(mouseenter)="enter($event)"\n\t\t\t\t\t\t\t\t\t(mousemove)="reCalc($event)"\n\t\t\t\t\t\t\t\t\t(mouseup)="endSelect($event, weekday, person?.id)"\n\t\t\t\t\t\t\t\t\t[ngStyle]="{\n\t\t\t\t\t\t\t\t\t\twidth: \'100%\',\n\t\t\t\t\t\t\t\t\t\theight:\n\t\t\t\t\t\t\t\t\t\t\tperson.data.length * 30 >= 60\n\t\t\t\t\t\t\t\t\t\t\t\t? (person?.data.length + 3) * 30 -\n\t\t\t\t\t\t\t\t\t\t\t\t person?.data.length * 30 +\n\t\t\t\t\t\t\t\t\t\t\t\t \'px\'\n\t\t\t\t\t\t\t\t\t\t\t\t: 100 - person?.data.length * 30 + \'px\'\n\t\t\t\t\t\t\t\t\t}"\n\t\t\t\t\t\t\t\t></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<ng-template #userMenu let-data>\n\t\t\t<section class="user-menu">\n\t\t\t\t<div\n\t\t\t\t\t*ngIf="\n\t\t\t\t\t\t(calculateFromTo(\n\t\t\t\t\t\t\tdata?.project?.from,\n\t\t\t\t\t\t\tdata?.project?.to,\n\t\t\t\t\t\t\tdata?.weekday\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\t\t!data?.project?.excludeDays.includes(data?.weekday)) ||\n\t\t\t\t\t\tdata?.project?.includeDays.includes(data?.weekday)\n\t\t\t\t\t"\n\t\t\t\t\t(click)="excludeDay(data)"\n\t\t\t\t>\n\t\t\t\t\tExclude day\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\t*ngIf="\n\t\t\t\t\t\t(isDayOff(data?.project?.from, data?.project?.to, data?.weekday) &&\n\t\t\t\t\t\t\t!data?.project?.includeDays.includes(data?.weekday)) ||\n\t\t\t\t\t\tdata?.project?.excludeDays.includes(data?.weekday)\n\t\t\t\t\t"\n\t\t\t\t\t(click)="includeDay(data)"\n\t\t\t\t>\n\t\t\t\t\tInclude day\n\t\t\t\t</div>\n\t\t\t</section>\n\t\t</ng-template>\n\t',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tborder-collapse: collapse;\n\t\t\t\t-webkit-user-select: none;\n\t\t\t\t-moz-user-select: none;\n\t\t\t\t-ms-user-select: none;\n\t\t\t\tuser-select: none;\n\t\t\t}\n\t\t\t.table {\n\t\t\t\tborder: 1px solid #d5d5d5;\n\t\t\t\tbackground-color: #f5f5f5;\n\t\t\t\tborder-spacing: 0;\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t\t.table .spacer {\n\t\t\t\twidth: 300px;\n\t\t\t\theight: 70px;\n\t\t\t\tborder: 1px solid #d5d5d5;\n\t\t\t}\n\t\t\t.table .who {\n\t\t\t\theight: 100px;\n\t\t\t\tpadding: 8px 16px;\n\t\t\t\tborder: 1px solid #d5d5d5;\n\t\t\t\tbackground-color: #fff;\n\t\t\t}\n\t\t\t.table .who strong {\n\t\t\t\tfont-size: 16px;\n\t\t\t\tcolor: #1a1a1a;\n\t\t\t}\n\n\t\t\t.table .right {\n\t\t\t\toverflow-x: auto;\n\t\t\t\toverflow-y: hidden;\n\t\t\t}\n\t\t\t.table .right .header {\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t\t.table .right .header .topData {\n\t\t\t\theight: 40px;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\tborder-right: 1px solid #d5d5d5;\n\t\t\t\tborder-left: 1px solid #d5d5d5;\n\t\t\t}\n\t\t\t.table .right .header .bottomData {\n\t\t\t\theight: 30px;\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t\t.table .right .header .bottomData__title {\n\t\t\t\tfont-size: 12px;\n\t\t\t\tfont-weight: 600;\n\t\t\t\tcolor: #1a1a1a;\n\t\t\t\tborder: 1px solid #d5d5d5;\n\t\t\t\twidth: 100px;\n\t\t\t\tmin-width: 100px;\n\t\t\t\tpadding: 9px;\n\t\t\t\ttext-align: left;\n\t\t\t}\n\n\t\t\t.pos-rel {\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t\t.selected {\n\t\t\t\tbackground-color: #f7f9fa;\n\t\t\t\tborder-bottom: 2px solid #dce2e6;\n\t\t\t\tborder-top: 2px solid #dce2e6;\n\t\t\t\tborder-left-color: transparent;\n\t\t\t\tborder-right-color: transparent;\n\t\t\t}\n\t\t\t.selected:first-of-type {\n\t\t\t\tborder-left-color: #dce2e6;\n\t\t\t}\n\t\t\t.body {\n\t\t\t\tdisplay: flex;\n\t\t\t\tposition: relative;\n\t\t\t}\n\t\t\t.bodyData {\n\t\t\t\tbackground-color: #fff;\n\t\t\t\tborder: 1px solid #d5d5d5;\n\t\t\t\theight: 100px;\n\t\t\t\twidth: 100px;\n\t\t\t\tmin-width: 100px;\n\t\t\t}\n\t\t\t.projectLabel {\n\t\t\t\tposition: relative;\n\t\t\t\tmargin-bottom: 5px;\n\t\t\t\tdisplay: block;\n\t\t\t\theight: 25px;\n\t\t\t\t-webkit-user-select: none;\n\t\t\t\t-moz-user-select: none;\n\t\t\t\t-ms-user-select: none;\n\t\t\t\tuser-select: none;\n\t\t\t}\n\t\t\t.projectLabel span {\n\t\t\t\tcolor: #fff;\n\t\t\t\twidth: 100%;\n\t\t\t\tdisplay: block;\n\t\t\t\tpadding: 5px;\n\t\t\t\tfont-size: 12px;\n\t\t\t\t-webkit-user-select: none;\n\t\t\t\t-moz-user-select: none;\n\t\t\t\t-ms-user-select: none;\n\t\t\t\tuser-select: none;\n\t\t\t\tposition: relative;\n\t\t\t}\n\t\t\t.dayOff {\n\t\t\t\tbackground: #f2f0eb 0% 0% no-repeat padding-box;\n\t\t\t\tcolor: #27241d !important;\n\t\t\t}\n\t\t\t.today {\n\t\t\t\tbackground-color: rgba(241, 229, 188, 0.5);\n\t\t\t}\n\t\t\t.scrollToToday {\n\t\t\t\tbackground: #f2f0eb 0% 0% no-repeat padding-box;\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tborder: 0;\n\t\t\t\theight: 36px;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\tletter-spacing: 0px;\n\t\t\t\tcolor: #27241d;\n\t\t\t\tfont-size: 14px;\n\t\t\t\tline-height: 21px;\n\t\t\t\tpadding: 0 15px;\n\t\t\t\tmargin-bottom: 10px;\n\t\t\t}\n\n\t\t\t.ng-tooltip {\n\t\t\t\tposition: absolute;\n\t\t\t\tmax-width: 150px;\n\t\t\t\tfont-size: 14px;\n\t\t\t\ttext-align: center;\n\t\t\t\tcolor: #f8f8f2;\n\t\t\t\tpadding: 3px 8px;\n\t\t\t\tbackground: #282a36;\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tz-index: 1000;\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\t.ng-tooltip:after {\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\t\t\t.ng-tooltip-top:after {\n\t\t\t\ttop: 100%;\n\t\t\t\tleft: 50%;\n\t\t\t\tmargin-left: -5px;\n\t\t\t\tborder-width: 5px;\n\t\t\t\tborder-color: black transparent transparent transparent;\n\t\t\t}\n\t\t\t.ng-tooltip-bottom:after {\n\t\t\t\tbottom: 100%;\n\t\t\t\tleft: 50%;\n\t\t\t\tmargin-left: -5px;\n\t\t\t\tborder-width: 5px;\n\t\t\t\tborder-color: transparent transparent black transparent;\n\t\t\t}\n\t\t\t.ng-tooltip-left:after {\n\t\t\t\ttop: 50%;\n\t\t\t\tleft: 100%;\n\t\t\t\tmargin-top: -5px;\n\t\t\t\tborder-width: 5px;\n\t\t\t\tborder-color: transparent transparent transparent black;\n\t\t\t}\n\t\t\t.ng-tooltip-right:after {\n\t\t\t\ttop: 50%;\n\t\t\t\tright: 100%;\n\t\t\t\tmargin-top: -5px;\n\t\t\t\tborder-width: 5px;\n\t\t\t\tborder-color: transparent black transparent transparent;\n\t\t\t}\n\t\t\t.ng-tooltip-show {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t\t.my-menu {\n\t\t\t\tbackground-color: #fff;\n\t\t\t\tborder: 1px solid rosybrown;\n\t\t\t\tpadding: 20px;\n\t\t\t}\n\n\t\t\t.user-menu {\n\t\t\t\tbackground-color: #fafafa;\n\t\t\t\tpadding: 4pt;\n\t\t\t\tfont-size: 10pt;\n\t\t\t\tz-index: 1000;\n\t\t\t\tbox-shadow: 0 0 12pt rgba(0, 0, 0, 0.25);\n\t\t\t\tborder-radius: 4pt;\n\t\t\t\tpadding: 0.5em 0 0.5em 0;\n\t\t\t\tanimation: fadeIn 0.1s ease-out;\n\t\t\t\topacity: 1;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t.user-menu hr {\n\t\t\t\tborder: none;\n\t\t\t\tborder-bottom: 1px solid #eee;\n\t\t\t}\n\n\t\t\t.user-menu div {\n\t\t\t\tcursor: pointer;\n\t\t\t\tdisplay: block;\n\t\t\t\ttext-decoration: none;\n\t\t\t\tcolor: #333;\n\t\t\t\tpadding: 0.5em 2em 0.5em 0.75em;\n\t\t\t\tmax-width: 18em;\n\t\t\t\twhite-space: nowrap;\n\t\t\t\toverflow: hidden;\n\t\t\t\ttext-overflow: ellipsis;\n\t\t\t}\n\n\t\t\t.user-menu div:hover {\n\t\t\t\tbackground-color: #333;\n\t\t\t\tcolor: #fff;\n\t\t\t}\n\n\t\t\t.user-menu div::before {\n\t\t\t\tcontent: '';\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-right: 0.75em;\n\t\t\t\twidth: 0.5em;\n\t\t\t\theight: 1em;\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\n\t\t\t/* Animatinons */\n\t\t\t@-webkit-keyframes fadeIn {\n\t\t\t\tfrom {\n\t\t\t\t\topacity: 0;\n\t\t\t\t}\n\t\t\t\tto {\n\t\t\t\t\topacity: 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@keyframes fadeIn {\n\t\t\t\tfrom {\n\t\t\t\t\topacity: 0;\n\t\t\t\t}\n\t\t\t\tto {\n\t\t\t\t\topacity: 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@-webkit-keyframes fadeOut {\n\t\t\t\tfrom {\n\t\t\t\t\topacity: 1;\n\t\t\t\t}\n\t\t\t\tto {\n\t\t\t\t\topacity: 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@keyframes fadeOut {\n\t\t\t\tfrom {\n\t\t\t\t\topacity: 1;\n\t\t\t\t}\n\t\t\t\tto {\n\t\t\t\t\topacity: 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.is-fadingIn {\n\t\t\t\t-webkit-animation: fadeIn 0.1s ease-out;\n\t\t\t\tanimation: fadeIn 0.1s ease-out;\n\t\t\t\topacity: 1;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t.is-fadingOut {\n\t\t\t\t-webkit-animation: fadeOut 0.1s ease-out;\n\t\t\t\tanimation: fadeOut 0.1s ease-out;\n\t\t\t\topacity: 0;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t"]}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[c]}]},{type:e.ElementRef},{type:o.Overlay},{type:e.ViewContainerRef}]},t.propDecorators={container:[{type:e.ViewChild,args:["container",{static:!0}]}],userMenu:[{type:e.ViewChild,args:["userMenu",{static:!0}]}],selections:[{type:e.ViewChildren,args:["selectionDiv"]}],persons:[{type:e.Input}],showBy:[{type:e.Input}],delay:[{type:e.Input}],dayOffLabel:[{type:e.Input}],todayButtonLabel:[{type:e.Input}],placement:[{type:e.Input}],finishedSelecting:[{type:e.Output}],editInfo:[{type:e.Output}],excludedDay:[{type:e.Output}],includedDay:[{type:e.Output}]},t}();var u=function(){function t(t,e){this.el=t,this.renderer=e,this.offset=10}return t.prototype.onMouseEnter=function(){!this.tooltip&&""!==this.tooltipTitle&&this.showTooltip&&this.show()},t.prototype.onMouseLeave=function(){this.tooltip&&this.hide()},t.prototype.show=function(){this.create(),this.setPosition(),this.renderer.addClass(this.tooltip,"ng-tooltip-show")},t.prototype.hide=function(){var t=this;this.renderer.removeClass(this.tooltip,"ng-tooltip-show"),window.setTimeout((function(){t.renderer.removeChild(document.body,t.tooltip),t.tooltip=null}),this.delay)},t.prototype.create=function(){this.tooltip=this.renderer.createElement("span"),this.renderer.appendChild(this.tooltip,this.renderer.createText(this.tooltipTitle)),this.renderer.appendChild(document.body,this.tooltip),this.renderer.addClass(this.tooltip,"ng-tooltip"),this.renderer.addClass(this.tooltip,"ng-tooltip-"+this.placement),this.renderer.setStyle(this.tooltip,"-webkit-transition","opacity "+this.delay+"ms"),this.renderer.setStyle(this.tooltip,"-moz-transition","opacity "+this.delay+"ms"),this.renderer.setStyle(this.tooltip,"-o-transition","opacity "+this.delay+"ms"),this.renderer.setStyle(this.tooltip,"transition","opacity "+this.delay+"ms")},t.prototype.setPosition=function(){var t,e,n=this.el.nativeElement.getBoundingClientRect(),o=this.tooltip.getBoundingClientRect(),r=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;"top"===this.placement&&(t=n.top-o.height-this.offset,e=n.left+(n.width-o.width)/2),"bottom"===this.placement&&(t=n.bottom+this.offset,e=n.left+(n.width-o.width)/2),"left"===this.placement&&(t=n.top+(n.height-o.height)/2,e=n.left-o.width-this.offset),"right"===this.placement&&(t=n.top+(n.height-o.height)/2,e=n.right+this.offset),this.renderer.setStyle(this.tooltip,"top",t+r+"px"),this.renderer.setStyle(this.tooltip,"left",e+"px")},t.decorators=[{type:e.Directive,args:[{selector:"[tooltip]"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2}]},t.propDecorators={tooltipTitle:[{type:e.Input,args:["tooltip"]}],placement:[{type:e.Input}],delay:[{type:e.Input}],showTooltip:[{type:e.Input}],onMouseEnter:[{type:e.HostListener,args:["mouseenter"]}],onMouseLeave:[{type:e.HostListener,args:["mouseleave"]}]},t}();var y=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[{provide:c,useValue:e}]}},t.decorators=[{type:e.NgModule,args:[{declarations:[p,u],imports:[i.CommonModule,o.OverlayModule],exports:[p,u]}]}],t}();t.SchedulerComponent=p,t.SchedulerModule=y,t.SchedulerService=d,t.TooltipDirective=u,t.USER_OPTIONS=c,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=angular-schedule.umd.min.js.map