(e)
| 173 | `)+` |
| 174 | END:VCALENDAR`}},timeline:function(e){he("Timeline",e.assert)},tooltip:function(e){e.config.tooltip_timeout=30,e.config.tooltip_offset_y=20,e.config.tooltip_offset_x=10,e.config.tooltip_hide_timeout=30;const i=new Va(e);e.ext.tooltips=i,e.attachEvent("onSchedulerReady",function(){i.tooltipFor({selector:"["+e.config.event_attribute+"]",html:t=>{if(e._mobile&&!e.config.touch_tooltip)return;const n=e._locate_event(t.target);if(e.getEvent(n)){const s=e.getEvent(n);return e.templates.tooltip_text(s.start_date,s.end_date,s)}return null},global:!1})}),e.attachEvent("onDestroy",function(){i.destructor()}),e.attachEvent("onLightbox",function(){i.hideTooltip()}),e.attachEvent("onBeforeDrag",function(){return e._mobile&&e.config.touch_tooltip||i.hideTooltip(),!0}),e.attachEvent("onEventDeleted",function(){return i.hideTooltip(),!0})},treetimeline:function(e){he("Tree Timeline",e.assert)},units:function(e){he("Units",e.assert)},url:function(e){e._get_url_nav=function(){return function(){const a=Object.create(null),o=(document.location.hash||"").replace("#","");if(!o)return a;const _=o.split(","),r=["__proto__","constructor","prototype"];for(let d=0;d<_.length;d++){const l=_[d].split("=");l.length!==2||r.includes(l[0])||(a[l[0]]=l[1])}return a}()};const i=e.date.date_to_str("%Y-%m-%d"),t=e._getInitialState;function n(a){const o=e._date||e.getState().date,_=e.getState().mode,r=["date="+i(o),"mode="+_];a&&r.push("event="+a),document.location.hash="#"+r.join(",")}e._getInitialState=function(a){const o=t.call(this,a),_=e._get_url_nav?e._get_url_nav():null;if(!_)return o;const r={date:o.date,mode:o.mode};if(_.date){const d=e.date.str_to_date("%Y-%m-%d");try{const l=d(_.date);isNaN(+l)||(r.date=l)}catch{}}if(_.mode)try{this.isViewExists(_.mode)&&(r.mode=_.mode)}catch{}return r};let s=null;e.attachEvent("onSchedulerReady",function(){const a=e._get_url_nav();return a.event&&(s=a.event,function(o){if(!o)return;const _=function(){if(!e.$destroyed)return!!e.getEvent(o)&&(e.showEvent(o),!0)};if(_())return;const r=e.attachEvent("onParse",function(){return _(),e.detachEvent(r),!0})}(a.event)),n(s),!0}),e.attachEvent("onAfterEventDisplay",function(){return s=null,n(null),!0}),e.attachEvent("onViewChange",function(){return n(s),!0})},week_agenda:function(e){he("Week Agenda",e.assert)},wp:function(e){e.attachEvent("onLightBox",function(){if(this._cover)try{this._cover.style.height=this.expanded?"100%":(document.body.parentNode||document.body).scrollHeight+"px"}catch{}}),e.form_blocks.select.set_value=function(i,t,n){t!==void 0&&t!==""||(t=(i.firstChild.options[0]||{}).value),i.firstChild.value=t||""}},year_view:function(e){e.templates.year_date=function(_){return e.date.date_to_str(e.locale.labels.year_tab+" %Y")(_)},e.templates.year_month=e.date.date_to_str("%F"),e.templates.year_scale_date=e.date.date_to_str("%D"),e.templates.year_tooltip=function(_,r,d){return d.text};const i=function(){return e._mode=="year"},t=function(_){var r=e.$domHelpers.closest(_,"[data-cell-date]");return r&&r.hasAttribute("data-cell-date")?e.templates.parse_date(r.getAttribute("data-cell-date")):null};e.dblclick_dhx_year_grid=function(_){if(i()){const r=_.target;if(e.$domHelpers.closest(r,".dhx_before")||e.$domHelpers.closest(r,".dhx_after"))return!1;const d=t(r);if(d){const l=d,h=this.date.add(l,1,"day");!this.config.readonly&&this.config.dblclick_create&&this.addEventNow(l.valueOf(),h.valueOf(),_)}}},e.attachEvent("onEventIdChange",function(){i()&&this.year_view(!0)});var n=e.render_data;e.render_data=function(_){if(!i())return n.apply(this,arguments);for(var r=0;r<_.length;r++)this._year_render_event(_[r])};var s=e.clear_view;e.clear_view=function(){if(!i())return s.apply(this,arguments);var _=e._year_marked_cells;for(var r in _)_.hasOwnProperty(r)&&_[r].classList.remove("dhx_year_event","dhx_cal_datepicker_event");e._year_marked_cells={}},e._hideToolTip=function(){this._tooltip&&(this._tooltip.style.display="none",this._tooltip.date=new Date(9999,1,1))},e._showToolTip=function(_,r,d,l){if(this._tooltip){if(this._tooltip.date.valueOf()==_.valueOf())return;this._tooltip.innerHTML=""}else{var h=this._tooltip=document.createElement("div");h.className="dhx_year_tooltip",this.config.rtl&&(h.className+=" dhx_tooltip_rtl"),document.body.appendChild(h),h.addEventListener("click",e._click.dhx_cal_data),h.addEventListener("click",function(y){if(y.target.closest(`[${e.config.event_attribute}]`)){const w=y.target.closest(`[${e.config.event_attribute}]`).getAttribute(e.config.event_attribute);e.showLightbox(w)}})}for(var p=this.getEvents(_,this.date.add(_,1,"day")),v="",g=0;g<p.length;g++){var c=p[g];if(this.filter_event(c.id,c)){var u=c.color?"--dhx-scheduler-event-background:"+c.color+";":"",f=c.textColor?"--dhx-scheduler-event-color:"+c.textColor+";":"";v+="<div class='dhx_tooltip_line' style='"+u+f+"' event_id='"+p[g].id+"' "+this.config.event_attribute+"='"+p[g].id+"'>",v+="<div class='dhx_tooltip_date' style='"+u+f+"'>"+(p[g]._timed?this.templates.event_date(p[g].start_date):"")+"</div>",v+="<div class='dhx_event_icon icon_details'> </div>",v+=this.templates.year_tooltip(p[g].start_date,p[g].end_date,p[g])+"</div>"}}this._tooltip.style.display="",this._tooltip.style.top="0px",document.body.offsetWidth-r.left-this._tooltip.offsetWidth<0?this._tooltip.style.left=r.left-this._tooltip.offsetWidth+"px":this._tooltip.style.left=r.left+l.offsetWidth+"px",this._tooltip.date=_,this._tooltip.innerHTML=v,document.body.offsetHeight-r.top-this._tooltip.offsetHeight<0?this._tooltip.style.top=r.top-this._tooltip.offsetHeight+l.offsetHeight+"px":this._tooltip.style.top=r.top+"px"},e._year_view_tooltip_handler=function(_){if(i()){var r=_.target||_.srcElement;r.tagName.toLowerCase()=="a"&&(r=r.parentNode),e._getClassName(r).indexOf("dhx_year_event")!=-1?e._showToolTip(e.templates.parse_date(r.getAttribute("data-year-date")),e.$domHelpers.getOffset(r),_,r):e._hideToolTip()}},e._init_year_tooltip=function(){e._detachDomEvent(e._els.dhx_cal_data[0],"mouseover",e._year_view_tooltip_handler),e.event(e._els.dhx_cal_data[0],"mouseover",e._year_view_tooltip_handler)},e._get_year_cell=function(_){for(var r=e.templates.format_date(_),d=this.$root.querySelectorAll(`.dhx_cal_data .dhx_cal_datepicker_date[data-cell-date="${r}"]`),l=0;l<d.length;l++)if(!e.$domHelpers.closest(d[l],".dhx_after, .dhx_before"))return d[l];return null},e._year_marked_cells={},e._mark_year_date=function(_,r){var d=e.templates.format_date(_),l=this._get_year_cell(_);if(l){var h=this.templates.event_class(r.start_date,r.end_date,r);e._year_marked_cells[d]||(l.classList.add("dhx_year_event","dhx_cal_datepicker_event"),l.setAttribute("data-year-date",d),l.setAttribute("date",d),e._year_marked_cells[d]=l),h&&l.classList.add(h)}},e._unmark_year_date=function(_){var r=this._get_year_cell(_);r&&r.classList.remove("dhx_year_event","dhx_cal_datepicker_event")},e._year_render_event=function(_){var r=_.start_date;for(r=r.valueOf()<this._min_date.valueOf()?this._min_date:this.date.date_part(new Date(r));r<_.end_date;)if(this._mark_year_date(r,_),(r=this.date.add(r,1,"day")).valueOf()>=this._max_date.valueOf())return},e.year_view=function(_){if(e.set_sizes(),e._table_view=_,!this._load_mode||!this._load())if(_){if(e._init_year_tooltip(),e._reset_year_scale(),e._load_mode&&e._load())return void(e._render_wait=!0);e.render_view_data()}else e._hideToolTip()},e._reset_year_scale=function(){var _=this._els.dhx_cal_data[0];_.scrollTop=0,_.innerHTML="";let r=this.date.year_start(new Date(this._date));this._min_date=this.date.week_start(new Date(r));const d=document.createElement("div");d.classList.add("dhx_year_wrapper");let l=r;for(let v=0;v<12;v++){let g=document.createElement("div");g.className="dhx_year_box",g.setAttribute("date",this._helpers.formatDate(l)),g.setAttribute("data-month-date",this._helpers.formatDate(l)),g.innerHTML=`<div class='dhx_year_month'>${this.templates.year_month(l)}</div> |
| 175 | <div class='dhx_year_grid'></div>`;const c=g.querySelector(".dhx_year_grid"),u=e._createDatePicker(null,{date:l,filterDays:e.ignore_year,minWeeks:6});u._renderDayGrid(c),u.destructor(),d.appendChild(g),l=this.date.add(l,1,"month")}_.appendChild(d);let h=this.date.add(r,1,"year");h.valueOf()!=this.date.week_start(new Date(h)).valueOf()&&(h=this.date.week_start(new Date(h)),h=this.date.add(h,1,"week")),this._max_date=h;var p=this._getNavDateElement();p&&(p.innerHTML=this.templates[this._mode+"_date"](r,h,this._mode))};var a=e.getActionData;e.getActionData=function(_){return i()?{date:t(_.target),section:null}:a.apply(e,arguments)};var o=e._locate_event;e._locate_event=function(_){var r=o.apply(e,arguments);if(!i())return r;if(!r){var d=t(_);if(!d)return null;var l=e.getEvents(d,e.date.add(d,1,"day"));if(!l.length)return null;r=l[0].id}return r},e.attachEvent("onDestroy",function(){e._hideToolTip()})}},We=new class{constructor(e){this._seed=0,this._schedulerPlugins=[],this._bundledExtensions=e,this._extensionsManager=new ta(e)}plugin(e){this._schedulerPlugins.push(e),Q.scheduler&&e(Q.scheduler)}getSchedulerInstance(e){for(var i=ea(this._extensionsManager),t=0;t<this._schedulerPlugins.length;t++)this._schedulerPlugins[t](i);return i._internal_id=this._seed++,this.$syncFactory&&this.$syncFactory(i),e&&this._initFromConfig(i,e),i}_initFromConfig(e,i){if(i.plugins&&e.plugins(i.plugins),i.config&&e.mixin(e.config,i.config,!0),i.templates&&e.attachEvent("onTemplatesReady",function(){e.mixin(e.templates,i.templates,!0)},{once:!0}),i.events)for(const t in i.events)e.attachEvent(t,i.events[t]);i.locale&&e.i18n.setLocale(i.locale),Array.isArray(i.calendars)&&i.calendars.forEach(function(t){e.addCalendar(t)}),i.container?e.init(i.container):e.init(),i.data&&(typeof i.data=="string"?e.load(i.data):e.parse(i.data))}}(Fa),Se=We.getSchedulerInstance(),Ke={plugin:Se.bind(We.plugin,We)};window.scheduler=Se,window.Scheduler=Ke,window.$dhx||(window.$dhx={}),window.$dhx.scheduler=Se,window.$dhx.Scheduler=Ke,pe.Scheduler=Ke,pe.default=Se,pe.scheduler=Se,Object.defineProperties(pe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); |
| 176 | //# sourceMappingURL=dhtmlxscheduler.js.map |
nothing calls this directly
no test coverage detected