UNPKG

devextreme-angular

Version:

Angular UI and visualization components based on DevExtreme widgets

30 lines (28 loc) • 18.2 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/platform-browser"),require("@angular/core"),require("devextreme/ui/calendar"),require("@angular/forms"),require("devextreme-angular/core")):"function"==typeof define&&define.amd?define("devextreme-angular/ui/calendar",["exports","@angular/platform-browser","@angular/core","devextreme/ui/calendar","@angular/forms","devextreme-angular/core"],t):t(((e=e||self)["devextreme-angular"]=e["devextreme-angular"]||{},e["devextreme-angular"].ui=e["devextreme-angular"].ui||{},e["devextreme-angular"].ui.calendar={}),e.ng.platformBrowser,e.ng.core,e.DxCalendar,e.ng.forms,e["devextreme-angular"].core)}(this,(function(e,t,n,o,i,r){"use strict";o=o&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o; /*! ***************************************************************************** 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. ***************************************************************************** */ var p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function a(e,t,n,o){var i,r=arguments.length,p=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(p=(r<3?i(p):r>3?i(t,n,p):i(t,n))||p);return r>3&&p&&Object.defineProperty(t,n,p),p}function s(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)} /*! * devextreme-angular * Version: 20.2.5 * Build date: Fri Jan 15 2021 * * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file in the root of the project for details. * * https://github.com/DevExpress/devextreme-angular */ var u={provide:i.NG_VALUE_ACCESSOR,useExisting:n.forwardRef((function(){return l})),multi:!0},l=function(e){function i(t,n,o,i,r,p,a,s){var u=e.call(this,t,n,o,i,a,s)||this;return u._watcherHelper=i,u._idh=r,u.touched=function(e){},u._createEventEmitters([{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"cellTemplateChange"},{emit:"dateSerializationFormatChange"},{emit:"disabledChange"},{emit:"disabledDatesChange"},{emit:"elementAttrChange"},{emit:"firstDayOfWeekChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"isValidChange"},{emit:"maxChange"},{emit:"maxZoomLevelChange"},{emit:"minChange"},{emit:"minZoomLevelChange"},{emit:"nameChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showTodayButtonChange"},{emit:"tabIndexChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"zoomLevelChange"},{emit:"onBlur"}]),u._idh.setHost(u),p.setHost(u),u}var l,d;return function(e,t){function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(i,e),Object.defineProperty(i.prototype,"accessKey",{get:function(){return this._getOption("accessKey")},set:function(e){this._setOption("accessKey",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"activeStateEnabled",{get:function(){return this._getOption("activeStateEnabled")},set:function(e){this._setOption("activeStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cellTemplate",{get:function(){return this._getOption("cellTemplate")},set:function(e){this._setOption("cellTemplate",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dateSerializationFormat",{get:function(){return this._getOption("dateSerializationFormat")},set:function(e){this._setOption("dateSerializationFormat",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"disabled",{get:function(){return this._getOption("disabled")},set:function(e){this._setOption("disabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"disabledDates",{get:function(){return this._getOption("disabledDates")},set:function(e){this._setOption("disabledDates",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"elementAttr",{get:function(){return this._getOption("elementAttr")},set:function(e){this._setOption("elementAttr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"firstDayOfWeek",{get:function(){return this._getOption("firstDayOfWeek")},set:function(e){this._setOption("firstDayOfWeek",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"focusStateEnabled",{get:function(){return this._getOption("focusStateEnabled")},set:function(e){this._setOption("focusStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){return this._getOption("height")},set:function(e){this._setOption("height",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hint",{get:function(){return this._getOption("hint")},set:function(e){this._setOption("hint",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hoverStateEnabled",{get:function(){return this._getOption("hoverStateEnabled")},set:function(e){this._setOption("hoverStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isValid",{get:function(){return this._getOption("isValid")},set:function(e){this._setOption("isValid",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"max",{get:function(){return this._getOption("max")},set:function(e){this._setOption("max",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxZoomLevel",{get:function(){return this._getOption("maxZoomLevel")},set:function(e){this._setOption("maxZoomLevel",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"min",{get:function(){return this._getOption("min")},set:function(e){this._setOption("min",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minZoomLevel",{get:function(){return this._getOption("minZoomLevel")},set:function(e){this._setOption("minZoomLevel",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"name",{get:function(){return this._getOption("name")},set:function(e){this._setOption("name",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"readOnly",{get:function(){return this._getOption("readOnly")},set:function(e){this._setOption("readOnly",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rtlEnabled",{get:function(){return this._getOption("rtlEnabled")},set:function(e){this._setOption("rtlEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showTodayButton",{get:function(){return this._getOption("showTodayButton")},set:function(e){this._setOption("showTodayButton",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tabIndex",{get:function(){return this._getOption("tabIndex")},set:function(e){this._setOption("tabIndex",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"validationError",{get:function(){return this._getOption("validationError")},set:function(e){this._setOption("validationError",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"validationErrors",{get:function(){return this._getOption("validationErrors")},set:function(e){this._setOption("validationErrors",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"validationMessageMode",{get:function(){return this._getOption("validationMessageMode")},set:function(e){this._setOption("validationMessageMode",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"validationStatus",{get:function(){return this._getOption("validationStatus")},set:function(e){this._setOption("validationStatus",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return this._getOption("value")},set:function(e){this._setOption("value",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visible",{get:function(){return this._getOption("visible")},set:function(e){this._setOption("visible",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"width",{get:function(){return this._getOption("width")},set:function(e){this._setOption("width",e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"zoomLevel",{get:function(){return this._getOption("zoomLevel")},set:function(e){this._setOption("zoomLevel",e)},enumerable:!0,configurable:!0}),i.prototype.change=function(e){},i.prototype._createInstance=function(e,t){return new o(e,t)},i.prototype.writeValue=function(e){this.eventHelper.lockedValueChangeEvent=!0,this.value=e,this.eventHelper.lockedValueChangeEvent=!1},i.prototype.setDisabledState=function(e){this.disabled=e},i.prototype.registerOnChange=function(e){this.change=e},i.prototype.registerOnTouched=function(e){this.touched=e},i.prototype._createWidget=function(t){var n=this;e.prototype._createWidget.call(this,t),this.instance.on("focusOut",(function(e){n.eventHelper.fireNgEvent("onBlur",[e])}))},i.prototype.ngOnDestroy=function(){this._destroyWidget()},i.prototype.ngOnChanges=function(t){e.prototype.ngOnChanges.call(this,t),this.setupChanges("disabledDates",t),this.setupChanges("validationErrors",t)},i.prototype.setupChanges=function(e,t){e in this._optionsToUpdate||this._idh.setup(e,t)},i.prototype.ngDoCheck=function(){this._idh.doCheck("disabledDates"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),e.prototype.ngDoCheck.call(this),e.prototype.clearChangedOptions.call(this)},i.prototype._setOption=function(t,n){var o=this._idh.setupSingle(t,n),i=null!==this._idh.getChanges(t,n);(o||i)&&e.prototype._setOption.call(this,t,n)},i.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone},{type:r.DxTemplateHost},{type:r.WatcherHelper},{type:r.IterableDifferHelper},{type:r.NestedOptionHost},{type:t.TransferState},{type:void 0,decorators:[{type:n.Inject,args:[n.PLATFORM_ID]}]}]},a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],i.prototype,"accessKey",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],i.prototype,"activeStateEnabled",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],i.prototype,"cellTemplate",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],i.prototype,"dateSerializationFormat",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],i.prototype,"disabled",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],i.prototype,"disabledDates",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],i.prototype,"elementAttr",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],i.prototype,"firstDayOfWeek",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],i.prototype,"focusStateEnabled",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],i.prototype,"height",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],i.prototype,"hint",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],i.prototype,"hoverStateEnabled",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],i.prototype,"isValid",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],i.prototype,"max",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],i.prototype,"maxZoomLevel",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],i.prototype,"min",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],i.prototype,"minZoomLevel",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],i.prototype,"name",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],i.prototype,"readOnly",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],i.prototype,"rtlEnabled",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],i.prototype,"showTodayButton",null),a([n.Input(),s("design:type",Number),s("design:paramtypes",[Number])],i.prototype,"tabIndex",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],i.prototype,"validationError",null),a([n.Input(),s("design:type",Array),s("design:paramtypes",[Array])],i.prototype,"validationErrors",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],i.prototype,"validationMessageMode",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],i.prototype,"validationStatus",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],i.prototype,"value",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],i.prototype,"visible",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],i.prototype,"width",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],i.prototype,"zoomLevel",null),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"onDisposing",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"onInitialized",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"onOptionChanged",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"onValueChanged",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"accessKeyChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"activeStateEnabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"cellTemplateChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"dateSerializationFormatChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"disabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"disabledDatesChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"elementAttrChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"firstDayOfWeekChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"focusStateEnabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"heightChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"hintChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"hoverStateEnabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"isValidChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"maxChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"maxZoomLevelChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"minChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"minZoomLevelChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"nameChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"readOnlyChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"rtlEnabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"showTodayButtonChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"tabIndexChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"validationErrorChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"validationErrorsChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"validationMessageModeChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"validationStatusChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"valueChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"visibleChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"widthChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"zoomLevelChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],i.prototype,"onBlur",void 0),a([n.HostListener("valueChange",["$event"]),s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],i.prototype,"change",null),a([n.HostListener("onBlur",["$event"]),s("design:type",Object)],i.prototype,"touched",void 0),i=a([n.Component({selector:"dx-calendar",template:"",providers:[r.DxTemplateHost,r.WatcherHelper,u,r.NestedOptionHost,r.IterableDifferHelper]}),(l=7,d=n.Inject(n.PLATFORM_ID),function(e,t){d(e,t,l)}),s("design:paramtypes",[n.ElementRef,n.NgZone,r.DxTemplateHost,r.WatcherHelper,r.IterableDifferHelper,r.NestedOptionHost,t.TransferState,Object])],i)}(r.DxComponent),d=function(){function e(){}return e=a([n.NgModule({imports:[r.DxIntegrationModule,r.DxTemplateModule,t.BrowserTransferStateModule],declarations:[l],exports:[l,r.DxTemplateModule]})],e)}();e.DxCalendarComponent=l,e.DxCalendarModule=d,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=devextreme-angular-ui-calendar.umd.min.js.map