devextreme-angular
Version:
Angular UI and visualization components based on DevExtreme widgets
30 lines (28 loc) • 19.5 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/platform-browser"),require("@angular/core"),require("devextreme/ui/text_area"),require("@angular/forms"),require("devextreme-angular/core")):"function"==typeof define&&define.amd?define("devextreme-angular/ui/text-area",["exports","@angular/platform-browser","@angular/core","devextreme/ui/text_area","@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["text-area"]={}),e.ng.platformBrowser,e.ng.core,e.DxTextArea,e.ng.forms,e["devextreme-angular"].core)}(this,(function(e,t,n,i,o,r){"use strict";i=i&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i;
/*! *****************************************************************************
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,i){var o,r=arguments.length,p=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(p=(r<3?o(p):r>3?o(t,n,p):o(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:o.NG_VALUE_ACCESSOR,useExisting:n.forwardRef((function(){return g})),multi:!0},g=function(e){function o(t,n,i,o,r,p,a,s){var u=e.call(this,t,n,i,o,a,s)||this;return u._watcherHelper=o,u._idh=r,u.touched=function(e){},u._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyPress",emit:"onKeyPress"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"autoResizeEnabledChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"isValidChange"},{emit:"maxHeightChange"},{emit:"maxLengthChange"},{emit:"minHeightChange"},{emit:"nameChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"spellcheckChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),u._idh.setHost(u),p.setHost(u),u}var g,l;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)}(o,e),Object.defineProperty(o.prototype,"accessKey",{get:function(){return this._getOption("accessKey")},set:function(e){this._setOption("accessKey",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"activeStateEnabled",{get:function(){return this._getOption("activeStateEnabled")},set:function(e){this._setOption("activeStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"autoResizeEnabled",{get:function(){return this._getOption("autoResizeEnabled")},set:function(e){this._setOption("autoResizeEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"disabled",{get:function(){return this._getOption("disabled")},set:function(e){this._setOption("disabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"elementAttr",{get:function(){return this._getOption("elementAttr")},set:function(e){this._setOption("elementAttr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"focusStateEnabled",{get:function(){return this._getOption("focusStateEnabled")},set:function(e){this._setOption("focusStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"height",{get:function(){return this._getOption("height")},set:function(e){this._setOption("height",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hint",{get:function(){return this._getOption("hint")},set:function(e){this._setOption("hint",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hoverStateEnabled",{get:function(){return this._getOption("hoverStateEnabled")},set:function(e){this._setOption("hoverStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"inputAttr",{get:function(){return this._getOption("inputAttr")},set:function(e){this._setOption("inputAttr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isValid",{get:function(){return this._getOption("isValid")},set:function(e){this._setOption("isValid",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"maxHeight",{get:function(){return this._getOption("maxHeight")},set:function(e){this._setOption("maxHeight",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"maxLength",{get:function(){return this._getOption("maxLength")},set:function(e){this._setOption("maxLength",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"minHeight",{get:function(){return this._getOption("minHeight")},set:function(e){this._setOption("minHeight",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"name",{get:function(){return this._getOption("name")},set:function(e){this._setOption("name",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"placeholder",{get:function(){return this._getOption("placeholder")},set:function(e){this._setOption("placeholder",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"readOnly",{get:function(){return this._getOption("readOnly")},set:function(e){this._setOption("readOnly",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"rtlEnabled",{get:function(){return this._getOption("rtlEnabled")},set:function(e){this._setOption("rtlEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"spellcheck",{get:function(){return this._getOption("spellcheck")},set:function(e){this._setOption("spellcheck",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"stylingMode",{get:function(){return this._getOption("stylingMode")},set:function(e){this._setOption("stylingMode",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"tabIndex",{get:function(){return this._getOption("tabIndex")},set:function(e){this._setOption("tabIndex",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"text",{get:function(){return this._getOption("text")},set:function(e){this._setOption("text",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"validationError",{get:function(){return this._getOption("validationError")},set:function(e){this._setOption("validationError",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"validationErrors",{get:function(){return this._getOption("validationErrors")},set:function(e){this._setOption("validationErrors",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"validationMessageMode",{get:function(){return this._getOption("validationMessageMode")},set:function(e){this._setOption("validationMessageMode",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"validationStatus",{get:function(){return this._getOption("validationStatus")},set:function(e){this._setOption("validationStatus",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"value",{get:function(){return this._getOption("value")},set:function(e){this._setOption("value",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"valueChangeEvent",{get:function(){return this._getOption("valueChangeEvent")},set:function(e){this._setOption("valueChangeEvent",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"visible",{get:function(){return this._getOption("visible")},set:function(e){this._setOption("visible",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"width",{get:function(){return this._getOption("width")},set:function(e){this._setOption("width",e)},enumerable:!0,configurable:!0}),o.prototype.change=function(e){},o.prototype._createInstance=function(e,t){return new i(e,t)},o.prototype.writeValue=function(e){this.eventHelper.lockedValueChangeEvent=!0,this.value=e,this.eventHelper.lockedValueChangeEvent=!1},o.prototype.setDisabledState=function(e){this.disabled=e},o.prototype.registerOnChange=function(e){this.change=e},o.prototype.registerOnTouched=function(e){this.touched=e},o.prototype._createWidget=function(t){var n=this;e.prototype._createWidget.call(this,t),this.instance.on("focusOut",(function(e){n.eventHelper.fireNgEvent("onBlur",[e])}))},o.prototype.ngOnDestroy=function(){this._destroyWidget()},o.prototype.ngOnChanges=function(t){e.prototype.ngOnChanges.call(this,t),this.setupChanges("validationErrors",t)},o.prototype.setupChanges=function(e,t){e in this._optionsToUpdate||this._idh.setup(e,t)},o.prototype.ngDoCheck=function(){this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),e.prototype.ngDoCheck.call(this),e.prototype.clearChangedOptions.call(this)},o.prototype._setOption=function(t,n){var i=this._idh.setupSingle(t,n),o=null!==this._idh.getChanges(t,n);(i||o)&&e.prototype._setOption.call(this,t,n)},o.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])],o.prototype,"accessKey",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"activeStateEnabled",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"autoResizeEnabled",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"disabled",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],o.prototype,"elementAttr",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"focusStateEnabled",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],o.prototype,"height",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"hint",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"hoverStateEnabled",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],o.prototype,"inputAttr",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"isValid",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],o.prototype,"maxHeight",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],o.prototype,"maxLength",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],o.prototype,"minHeight",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"name",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"placeholder",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"readOnly",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"rtlEnabled",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"spellcheck",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"stylingMode",null),a([n.Input(),s("design:type",Number),s("design:paramtypes",[Number])],o.prototype,"tabIndex",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"text",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],o.prototype,"validationError",null),a([n.Input(),s("design:type",Array),s("design:paramtypes",[Array])],o.prototype,"validationErrors",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"validationMessageMode",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"validationStatus",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"value",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"valueChangeEvent",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"visible",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],o.prototype,"width",null),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onContentReady",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onCopy",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onCut",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onDisposing",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onEnterKey",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onFocusIn",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onFocusOut",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onInitialized",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onInput",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onKeyDown",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onKeyPress",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onKeyUp",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onOptionChanged",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onPaste",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onValueChanged",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"accessKeyChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"activeStateEnabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"autoResizeEnabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"disabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"elementAttrChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"focusStateEnabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"heightChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"hintChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"hoverStateEnabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"inputAttrChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"isValidChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"maxHeightChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"maxLengthChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"minHeightChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"nameChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"placeholderChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"readOnlyChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"rtlEnabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"spellcheckChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"stylingModeChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"tabIndexChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"textChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"validationErrorChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"validationErrorsChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"validationMessageModeChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"validationStatusChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"valueChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"valueChangeEventChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"visibleChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"widthChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onBlur",void 0),a([n.HostListener("valueChange",["$event"]),s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],o.prototype,"change",null),a([n.HostListener("onBlur",["$event"]),s("design:type",Object)],o.prototype,"touched",void 0),o=a([n.Component({selector:"dx-text-area",template:"",providers:[r.DxTemplateHost,r.WatcherHelper,u,r.NestedOptionHost,r.IterableDifferHelper]}),(g=7,l=n.Inject(n.PLATFORM_ID),function(e,t){l(e,t,g)}),s("design:paramtypes",[n.ElementRef,n.NgZone,r.DxTemplateHost,r.WatcherHelper,r.IterableDifferHelper,r.NestedOptionHost,t.TransferState,Object])],o)}(r.DxComponent),l=function(){function e(){}return e=a([n.NgModule({imports:[r.DxIntegrationModule,r.DxTemplateModule,t.BrowserTransferStateModule],declarations:[g],exports:[g,r.DxTemplateModule]})],e)}();e.DxTextAreaComponent=g,e.DxTextAreaModule=l,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=devextreme-angular-ui-text-area.umd.min.js.map