UNPKG

devextreme-angular

Version:

Angular UI and visualization components based on DevExtreme widgets

30 lines (28 loc) • 17.2 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/platform-browser"),require("@angular/core"),require("devextreme/ui/radio_group"),require("@angular/forms"),require("devextreme-angular/core"),require("devextreme-angular/ui/nested")):"function"==typeof define&&define.amd?define("devextreme-angular/ui/radio-group",["exports","@angular/platform-browser","@angular/core","devextreme/ui/radio_group","@angular/forms","devextreme-angular/core","devextreme-angular/ui/nested"],t):t(((e=e||self)["devextreme-angular"]=e["devextreme-angular"]||{},e["devextreme-angular"].ui=e["devextreme-angular"].ui||{},e["devextreme-angular"].ui["radio-group"]={}),e.ng.platformBrowser,e.ng.core,e.DxRadioGroup,e.ng.forms,e["devextreme-angular"].core,e["devextreme-angular"].ui.nested)}(this,(function(e,t,n,i,o,r,p){"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 a=function(e,t){return(a=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 s(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 u(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 d={provide:o.NG_VALUE_ACCESSOR,useExisting:n.forwardRef((function(){return l})),multi:!0},l=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:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"dataSourceChange"},{emit:"disabledChange"},{emit:"displayExprChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"isValidChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"layoutChange"},{emit:"nameChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"tabIndexChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueExprChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),u._idh.setHost(u),p.setHost(u),u}var l,g;return function(e,t){function n(){this.constructor=e}a(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,"dataSource",{get:function(){return this._getOption("dataSource")},set:function(e){this._setOption("dataSource",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,"displayExpr",{get:function(){return this._getOption("displayExpr")},set:function(e){this._setOption("displayExpr",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,"isValid",{get:function(){return this._getOption("isValid")},set:function(e){this._setOption("isValid",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"items",{get:function(){return this._getOption("items")},set:function(e){this._setOption("items",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"itemTemplate",{get:function(){return this._getOption("itemTemplate")},set:function(e){this._setOption("itemTemplate",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"layout",{get:function(){return this._getOption("layout")},set:function(e){this._setOption("layout",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,"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,"tabIndex",{get:function(){return this._getOption("tabIndex")},set:function(e){this._setOption("tabIndex",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,"valueExpr",{get:function(){return this._getOption("valueExpr")},set:function(e){this._setOption("valueExpr",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){},Object.defineProperty(o.prototype,"itemsChildren",{get:function(){return this._getOption("items")},set:function(e){this.setChildren("items",e)},enumerable:!0,configurable:!0}),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("dataSource",t),this.setupChanges("items",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("dataSource"),this._idh.doCheck("items"),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]}]}]},s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],o.prototype,"accessKey",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],o.prototype,"activeStateEnabled",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],o.prototype,"dataSource",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],o.prototype,"disabled",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],o.prototype,"displayExpr",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],o.prototype,"elementAttr",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],o.prototype,"focusStateEnabled",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],o.prototype,"height",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],o.prototype,"hint",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],o.prototype,"hoverStateEnabled",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],o.prototype,"isValid",null),s([n.Input(),u("design:type",Array),u("design:paramtypes",[Array])],o.prototype,"items",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],o.prototype,"itemTemplate",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],o.prototype,"layout",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],o.prototype,"name",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],o.prototype,"readOnly",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],o.prototype,"rtlEnabled",null),s([n.Input(),u("design:type",Number),u("design:paramtypes",[Number])],o.prototype,"tabIndex",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],o.prototype,"validationError",null),s([n.Input(),u("design:type",Array),u("design:paramtypes",[Array])],o.prototype,"validationErrors",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],o.prototype,"validationMessageMode",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],o.prototype,"validationStatus",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],o.prototype,"value",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],o.prototype,"valueExpr",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],o.prototype,"visible",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],o.prototype,"width",null),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"onContentReady",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"onDisposing",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"onInitialized",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"onOptionChanged",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"onValueChanged",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"accessKeyChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"activeStateEnabledChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"dataSourceChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"disabledChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"displayExprChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"elementAttrChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"focusStateEnabledChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"heightChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"hintChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"hoverStateEnabledChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"isValidChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"itemsChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"itemTemplateChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"layoutChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"nameChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"readOnlyChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"rtlEnabledChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"tabIndexChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"validationErrorChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"validationErrorsChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"validationMessageModeChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"validationStatusChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"valueChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"valueExprChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"visibleChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"widthChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],o.prototype,"onBlur",void 0),s([n.HostListener("valueChange",["$event"]),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",void 0)],o.prototype,"change",null),s([n.HostListener("onBlur",["$event"]),u("design:type",Object)],o.prototype,"touched",void 0),s([n.ContentChildren(p.DxiItemComponent),u("design:type",n.QueryList),u("design:paramtypes",[Object])],o.prototype,"itemsChildren",null),o=s([n.Component({selector:"dx-radio-group",template:"",providers:[r.DxTemplateHost,r.WatcherHelper,d,r.NestedOptionHost,r.IterableDifferHelper]}),(l=7,g=n.Inject(n.PLATFORM_ID),function(e,t){g(e,t,l)}),u("design:paramtypes",[n.ElementRef,n.NgZone,r.DxTemplateHost,r.WatcherHelper,r.IterableDifferHelper,r.NestedOptionHost,t.TransferState,Object])],o)}(r.DxComponent),g=function(){function e(){}return e=s([n.NgModule({imports:[p.DxiItemModule,r.DxIntegrationModule,r.DxTemplateModule,t.BrowserTransferStateModule],declarations:[l],exports:[l,p.DxiItemModule,r.DxTemplateModule]})],e)}();e.DxRadioGroupComponent=l,e.DxRadioGroupModule=g,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=devextreme-angular-ui-radio-group.umd.min.js.map