UNPKG

devextreme-angular

Version:

Angular UI and visualization components based on DevExtreme widgets

30 lines (28 loc) • 18.1 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/platform-browser"),require("@angular/core"),require("devextreme/viz/sparkline"),require("devextreme-angular/core"),require("devextreme-angular/ui/nested")):"function"==typeof define&&define.amd?define("devextreme-angular/ui/sparkline",["exports","@angular/platform-browser","@angular/core","devextreme/viz/sparkline","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.sparkline={}),e.ng.platformBrowser,e.ng.core,e.DxSparkline,e["devextreme-angular"].core,e["devextreme-angular"].ui.nested)}(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 s(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 s=e.length-1;s>=0;s--)(i=e[s])&&(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 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 a=function(e){function r(t,n,o,i,r,p,s,u){var a=e.call(this,t,n,o,i,s,u)||this;return a._watcherHelper=i,a._idh=r,a._createEventEmitters([{subscribe:"disposing",emit:"onDisposing"},{subscribe:"drawn",emit:"onDrawn"},{subscribe:"exported",emit:"onExported"},{subscribe:"exporting",emit:"onExporting"},{subscribe:"fileSaving",emit:"onFileSaving"},{subscribe:"incidentOccurred",emit:"onIncidentOccurred"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"tooltipHidden",emit:"onTooltipHidden"},{subscribe:"tooltipShown",emit:"onTooltipShown"},{emit:"argumentFieldChange"},{emit:"barNegativeColorChange"},{emit:"barPositiveColorChange"},{emit:"dataSourceChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"firstLastColorChange"},{emit:"ignoreEmptyPointsChange"},{emit:"lineColorChange"},{emit:"lineWidthChange"},{emit:"lossColorChange"},{emit:"marginChange"},{emit:"maxColorChange"},{emit:"maxValueChange"},{emit:"minColorChange"},{emit:"minValueChange"},{emit:"pathModifiedChange"},{emit:"pointColorChange"},{emit:"pointSizeChange"},{emit:"pointSymbolChange"},{emit:"rtlEnabledChange"},{emit:"showFirstLastChange"},{emit:"showMinMaxChange"},{emit:"sizeChange"},{emit:"themeChange"},{emit:"tooltipChange"},{emit:"typeChange"},{emit:"valueFieldChange"},{emit:"winColorChange"},{emit:"winlossThresholdChange"}]),a._idh.setHost(a),p.setHost(a),a}var a,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)}(r,e),Object.defineProperty(r.prototype,"argumentField",{get:function(){return this._getOption("argumentField")},set:function(e){this._setOption("argumentField",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"barNegativeColor",{get:function(){return this._getOption("barNegativeColor")},set:function(e){this._setOption("barNegativeColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"barPositiveColor",{get:function(){return this._getOption("barPositiveColor")},set:function(e){this._setOption("barPositiveColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"dataSource",{get:function(){return this._getOption("dataSource")},set:function(e){this._setOption("dataSource",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"disabled",{get:function(){return this._getOption("disabled")},set:function(e){this._setOption("disabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"elementAttr",{get:function(){return this._getOption("elementAttr")},set:function(e){this._setOption("elementAttr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"firstLastColor",{get:function(){return this._getOption("firstLastColor")},set:function(e){this._setOption("firstLastColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"ignoreEmptyPoints",{get:function(){return this._getOption("ignoreEmptyPoints")},set:function(e){this._setOption("ignoreEmptyPoints",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"lineColor",{get:function(){return this._getOption("lineColor")},set:function(e){this._setOption("lineColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"lineWidth",{get:function(){return this._getOption("lineWidth")},set:function(e){this._setOption("lineWidth",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"lossColor",{get:function(){return this._getOption("lossColor")},set:function(e){this._setOption("lossColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"margin",{get:function(){return this._getOption("margin")},set:function(e){this._setOption("margin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"maxColor",{get:function(){return this._getOption("maxColor")},set:function(e){this._setOption("maxColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"maxValue",{get:function(){return this._getOption("maxValue")},set:function(e){this._setOption("maxValue",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"minColor",{get:function(){return this._getOption("minColor")},set:function(e){this._setOption("minColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"minValue",{get:function(){return this._getOption("minValue")},set:function(e){this._setOption("minValue",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pathModified",{get:function(){return this._getOption("pathModified")},set:function(e){this._setOption("pathModified",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pointColor",{get:function(){return this._getOption("pointColor")},set:function(e){this._setOption("pointColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pointSize",{get:function(){return this._getOption("pointSize")},set:function(e){this._setOption("pointSize",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pointSymbol",{get:function(){return this._getOption("pointSymbol")},set:function(e){this._setOption("pointSymbol",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"rtlEnabled",{get:function(){return this._getOption("rtlEnabled")},set:function(e){this._setOption("rtlEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"showFirstLast",{get:function(){return this._getOption("showFirstLast")},set:function(e){this._setOption("showFirstLast",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"showMinMax",{get:function(){return this._getOption("showMinMax")},set:function(e){this._setOption("showMinMax",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"size",{get:function(){return this._getOption("size")},set:function(e){this._setOption("size",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"theme",{get:function(){return this._getOption("theme")},set:function(e){this._setOption("theme",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tooltip",{get:function(){return this._getOption("tooltip")},set:function(e){this._setOption("tooltip",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"type",{get:function(){return this._getOption("type")},set:function(e){this._setOption("type",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"valueField",{get:function(){return this._getOption("valueField")},set:function(e){this._setOption("valueField",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"winColor",{get:function(){return this._getOption("winColor")},set:function(e){this._setOption("winColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"winlossThreshold",{get:function(){return this._getOption("winlossThreshold")},set:function(e){this._setOption("winlossThreshold",e)},enumerable:!0,configurable:!0}),r.prototype._createInstance=function(e,t){return new o(e,t)},r.prototype.ngOnDestroy=function(){this._destroyWidget()},r.prototype.ngOnChanges=function(t){e.prototype.ngOnChanges.call(this,t),this.setupChanges("dataSource",t)},r.prototype.setupChanges=function(e,t){e in this._optionsToUpdate||this._idh.setup(e,t)},r.prototype.ngDoCheck=function(){this._idh.doCheck("dataSource"),this._watcherHelper.checkWatchers(),e.prototype.ngDoCheck.call(this),e.prototype.clearChangedOptions.call(this)},r.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)},r.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone},{type:i.DxTemplateHost},{type:i.WatcherHelper},{type:i.IterableDifferHelper},{type:i.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])],r.prototype,"argumentField",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],r.prototype,"barNegativeColor",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],r.prototype,"barPositiveColor",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],r.prototype,"dataSource",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],r.prototype,"disabled",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],r.prototype,"elementAttr",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],r.prototype,"firstLastColor",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],r.prototype,"ignoreEmptyPoints",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],r.prototype,"lineColor",null),s([n.Input(),u("design:type",Number),u("design:paramtypes",[Number])],r.prototype,"lineWidth",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],r.prototype,"lossColor",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],r.prototype,"margin",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],r.prototype,"maxColor",null),s([n.Input(),u("design:type",Number),u("design:paramtypes",[Number])],r.prototype,"maxValue",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],r.prototype,"minColor",null),s([n.Input(),u("design:type",Number),u("design:paramtypes",[Number])],r.prototype,"minValue",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],r.prototype,"pathModified",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],r.prototype,"pointColor",null),s([n.Input(),u("design:type",Number),u("design:paramtypes",[Number])],r.prototype,"pointSize",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],r.prototype,"pointSymbol",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],r.prototype,"rtlEnabled",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],r.prototype,"showFirstLast",null),s([n.Input(),u("design:type",Boolean),u("design:paramtypes",[Boolean])],r.prototype,"showMinMax",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],r.prototype,"size",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],r.prototype,"theme",null),s([n.Input(),u("design:type",Object),u("design:paramtypes",[Object])],r.prototype,"tooltip",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],r.prototype,"type",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],r.prototype,"valueField",null),s([n.Input(),u("design:type",String),u("design:paramtypes",[String])],r.prototype,"winColor",null),s([n.Input(),u("design:type",Number),u("design:paramtypes",[Number])],r.prototype,"winlossThreshold",null),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"onDisposing",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"onDrawn",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"onExported",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"onExporting",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"onFileSaving",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"onIncidentOccurred",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"onInitialized",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"onOptionChanged",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"onTooltipHidden",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"onTooltipShown",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"argumentFieldChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"barNegativeColorChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"barPositiveColorChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"dataSourceChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"disabledChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"elementAttrChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"firstLastColorChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"ignoreEmptyPointsChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"lineColorChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"lineWidthChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"lossColorChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"marginChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"maxColorChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"maxValueChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"minColorChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"minValueChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"pathModifiedChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"pointColorChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"pointSizeChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"pointSymbolChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"rtlEnabledChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"showFirstLastChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"showMinMaxChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"sizeChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"themeChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"tooltipChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"typeChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"valueFieldChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"winColorChange",void 0),s([n.Output(),u("design:type",n.EventEmitter)],r.prototype,"winlossThresholdChange",void 0),r=s([n.Component({selector:"dx-sparkline",template:"",providers:[i.DxTemplateHost,i.WatcherHelper,i.NestedOptionHost,i.IterableDifferHelper],styles:[" :host { display: block; }"]}),(a=7,l=n.Inject(n.PLATFORM_ID),function(e,t){l(e,t,a)}),u("design:paramtypes",[n.ElementRef,n.NgZone,i.DxTemplateHost,i.WatcherHelper,i.IterableDifferHelper,i.NestedOptionHost,t.TransferState,Object])],r)}(i.DxComponent),l=function(){function e(){}return e=s([n.NgModule({imports:[r.DxoMarginModule,r.DxoSizeModule,r.DxoTooltipModule,r.DxoBorderModule,r.DxoFontModule,r.DxoFormatModule,r.DxoShadowModule,i.DxIntegrationModule,i.DxTemplateModule,t.BrowserTransferStateModule],declarations:[a],exports:[a,r.DxoMarginModule,r.DxoSizeModule,r.DxoTooltipModule,r.DxoBorderModule,r.DxoFontModule,r.DxoFormatModule,r.DxoShadowModule,i.DxTemplateModule]})],e)}();e.DxSparklineComponent=a,e.DxSparklineModule=l,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=devextreme-angular-ui-sparkline.umd.min.js.map