UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

248 lines (247 loc) 13.6 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends, __values } from "tslib"; import { List$1 } from "igniteui-react-core"; import { FinancialChartIndicatorMenuItem } from "./FinancialChartIndicatorMenuItem"; import { OrderedDictionary$2 } from "./OrderedDictionary$2"; import { FinancialIndicatorType_$type } from "./FinancialIndicatorType"; import { FinancialOverlayType_$type } from "./FinancialOverlayType"; import { TrendLineType_$type } from "igniteui-react-core"; import { FinancialChartVolumeType_$type } from "./FinancialChartVolumeType"; import { Base, Type, String_$type, typeGetValue, fromEnum, markType, EnumUtil } from "igniteui-react-core"; import { Dictionary$2 } from "igniteui-react-core"; import { stringIsNullOrEmpty } from "igniteui-react-core"; /** * @hidden */ var FinancialChartIndicatorMenuItems = /** @class */ /*@__PURE__*/ (function (_super) { __extends(FinancialChartIndicatorMenuItems, _super); function FinancialChartIndicatorMenuItems(a) { var _this = _super.call(this, FinancialChartIndicatorMenuItem.$, 0) || this; _this.ak = null; _this.ac = null; _this.ad = null; _this.ae = null; _this.af = null; _this.ak = a; _this.am(FinancialOverlayType_$type, _this.al("FinancialChart_IndicatorMenu_OverlaysCategoryHeader", "Overlays")); _this.am(TrendLineType_$type, _this.al("FinancialChart_IndicatorMenu_TrendlinesCategoryHeader", "Trendlines")); _this.am(FinancialChartVolumeType_$type, _this.al("FinancialChart_IndicatorMenu_VolumeCategoryHeader", "Volume")); _this.am(FinancialIndicatorType_$type, _this.al("FinancialChart_IndicatorMenu_IndicatorsCategoryHeader", "Standalone Indicators")); return _this; } FinancialChartIndicatorMenuItems.prototype.al = function (a, b) { var c = this.ak.b1(a); return stringIsNullOrEmpty(c) ? b : c; }; FinancialChartIndicatorMenuItems.prototype.am = function ($t, a) { this.add(((function () { var $ret = new FinancialChartIndicatorMenuItem(); $ret.d = a; $ret.f = a; return $ret; })())); this.an($t); }; FinancialChartIndicatorMenuItems.prototype.an = function ($t) { var e_1, _a; var a = new List$1(Base.$, 0); var b = new Dictionary$2(Base.$, String_$type, 0); var c = new Dictionary$2(Base.$, Type.$, 0); var d = function (e) { for (var f = 0; f < e.a; f++) { var g = typeGetValue(e.b(f)); a.add1(g); var h = e.c(g); b.addItem(g, h); c.addItem(g, $t); } }; if ($t == FinancialOverlayType_$type) { d(this.ah); } else if ($t == TrendLineType_$type) { d(this.ai); } else if ($t == FinancialIndicatorType_$type) { d(this.ag); } else if ($t == FinancialChartVolumeType_$type) { d(this.aj); } else { var e = EnumUtil.getNames($t); var f = EnumUtil.getValues($t); for (var g = 0; g < f.length; g++) { var h = void 0; var i = void 0; h = f[g]; i = e[g]; i = i.charAt(0).toUpperCase() + i.substr(1); if (i == "None") { continue; } a.add1(h); b.addItem(h, i); c.addItem(h, $t); } } var _loop_1 = function (j) { this_1.add(((function () { var $ret = new FinancialChartIndicatorMenuItem(); $ret.d = j; $ret.f = b.containsKey(j) ? b.item(j) : j.toString(); $ret.c = 1; $ret.g = c.containsKey(j) ? c.item(j) : null; return $ret; })())); }; var this_1 = this; try { for (var _b = __values(fromEnum(a)), _c = _b.next(); !_c.done; _c = _b.next()) { var j = _c.value; _loop_1(j); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } }; Object.defineProperty(FinancialChartIndicatorMenuItems.prototype, "ag", { get: function () { if (this.ac == null) { this.ao(); } return this.ac; }, enumerable: false, configurable: true }); FinancialChartIndicatorMenuItems.prototype.ao = function () { var _this = this; this.ac = ((function () { var $ret = new OrderedDictionary$2(FinancialIndicatorType_$type, String_$type); $ret.addItem(0, _this.al("FinancialChart_IndicatorsMenu_Indicator_AbsoluteVolumeOscillator", "Absolute Volume Oscillator")); $ret.addItem(1, _this.al("FinancialChart_IndicatorsMenu_Indicator_AccumulationDistribution", "Accumulation Distribution")); $ret.addItem(2, _this.al("FinancialChart_IndicatorsMenu_Indicator_AverageDirectionalIndex", "Average Directional Index")); $ret.addItem(3, _this.al("FinancialChart_IndicatorsMenu_Indicator_AverageTrueRange", "Average True Range")); $ret.addItem(4, _this.al("FinancialChart_IndicatorsMenu_Indicator_BollingerBandWidth", "Bollinger Band Width")); $ret.addItem(5, _this.al("FinancialChart_IndicatorsMenu_Indicator_ChaikinOscillator", "Chaikin Oscillator")); $ret.addItem(6, _this.al("FinancialChart_IndicatorsMenu_Indicator_ChaikinVolatility", "Chaikin Volatility")); $ret.addItem(7, _this.al("FinancialChart_IndicatorsMenu_Indicator_CommodityChannelIndex", "Commodity Channel Index")); $ret.addItem(8, _this.al("FinancialChart_IndicatorsMenu_Indicator_DetrendedPriceOscillator", "Detrended Price Oscillator")); $ret.addItem(9, _this.al("FinancialChart_IndicatorsMenu_Indicator_EaseOfMovement", "Ease Of Movement")); $ret.addItem(10, _this.al("FinancialChart_IndicatorsMenu_Indicator_FastStochasticOscillator", "Fast Stochastic Oscillator")); $ret.addItem(11, _this.al("FinancialChart_IndicatorsMenu_Indicator_ForceIndex", "Force Index")); $ret.addItem(12, _this.al("FinancialChart_IndicatorsMenu_Indicator_FullStochasticOscillator", "Full Stochastic Oscillator")); $ret.addItem(13, _this.al("FinancialChart_IndicatorsMenu_Indicator_MarketFacilitationIndex", "Market Facilitation Index")); $ret.addItem(14, _this.al("FinancialChart_IndicatorsMenu_Indicator_MassIndex", "Mass Index")); $ret.addItem(15, _this.al("FinancialChart_IndicatorsMenu_Indicator_MedianPrice", "Median Price")); $ret.addItem(16, _this.al("FinancialChart_IndicatorsMenu_Indicator_MoneyFlowIndex", "Money Flow Index")); $ret.addItem(17, _this.al("FinancialChart_IndicatorsMenu_Indicator_MovingAverageConvergenceDivergence", "MACD")); $ret.addItem(18, _this.al("FinancialChart_IndicatorsMenu_Indicator_NegativeVolumeIndex", "Negative Volume Index")); $ret.addItem(19, _this.al("FinancialChart_IndicatorsMenu_Indicator_OnBalanceVolume", "On Balance Volume")); $ret.addItem(20, _this.al("FinancialChart_IndicatorsMenu_Indicator_PercentagePriceOscillator", "Percentage Price Oscillator")); $ret.addItem(21, _this.al("FinancialChart_IndicatorsMenu_Indicator_PercentageVolumeOscillator", "Percentage Volume Oscillator")); $ret.addItem(22, _this.al("FinancialChart_IndicatorsMenu_Indicator_PositiveVolumeIndex", "Positive Volume Index")); $ret.addItem(23, _this.al("FinancialChart_IndicatorsMenu_Indicator_PriceVolumeTrend", "Price Volume Trend")); $ret.addItem(24, _this.al("FinancialChart_IndicatorsMenu_Indicator_RateOfChangeAndMomentum", "ROC")); $ret.addItem(25, _this.al("FinancialChart_IndicatorsMenu_Indicator_RelativeStrengthIndex", "RSI")); $ret.addItem(26, _this.al("FinancialChart_IndicatorsMenu_Indicator_SlowStochasticOscillator", "Slow Stochastic Oscillator")); $ret.addItem(27, _this.al("FinancialChart_IndicatorsMenu_Indicator_StandardDeviation", "Standard Deviation")); $ret.addItem(28, _this.al("FinancialChart_IndicatorsMenu_Indicator_StochRSI", "Stoch RSI")); $ret.addItem(29, _this.al("FinancialChart_IndicatorsMenu_Indicator_TRIX", "TRIX")); $ret.addItem(30, _this.al("FinancialChart_IndicatorsMenu_Indicator_TypicalPrice", "Typical Price")); $ret.addItem(31, _this.al("FinancialChart_IndicatorsMenu_Indicator_UltimateOscillator", "Ultimate Oscillator")); $ret.addItem(32, _this.al("FinancialChart_IndicatorsMenu_Indicator_WeightedClose", "Weighted Close")); $ret.addItem(33, _this.al("FinancialChart_IndicatorsMenu_Indicator_WilliamsPercentR", "Williams %R")); return $ret; })()); }; Object.defineProperty(FinancialChartIndicatorMenuItems.prototype, "ah", { get: function () { if (this.ad == null) { this.ap(); } return this.ad; }, enumerable: false, configurable: true }); FinancialChartIndicatorMenuItems.prototype.ap = function () { var _this = this; this.ad = ((function () { var $ret = new OrderedDictionary$2(FinancialOverlayType_$type, String_$type); $ret.addItem(0, _this.al("FinancialChart_IndicatorsMenu_Overlay_BollingerBands", "Bollinger Bands")); $ret.addItem(1, _this.al("FinancialChart_IndicatorsMenu_Overlay_PriceChannel", "Price Channel")); return $ret; })()); }; Object.defineProperty(FinancialChartIndicatorMenuItems.prototype, "ai", { get: function () { if (this.ae == null) { this.aq(); } return this.ae; }, enumerable: false, configurable: true }); FinancialChartIndicatorMenuItems.prototype.aq = function () { var _this = this; this.ae = ((function () { var $ret = new OrderedDictionary$2(TrendLineType_$type, String_$type); $ret.addItem(1, _this.al("FinancialChart_IndicatorsMenu_TrendLine_LinearFit", "Linear Fit")); $ret.addItem(2, _this.al("FinancialChart_IndicatorsMenu_TrendLine_QuadraticFit", "Quadratic Fit")); $ret.addItem(3, _this.al("FinancialChart_IndicatorsMenu_TrendLine_CubicFit", "Cubic Fit")); $ret.addItem(4, _this.al("FinancialChart_IndicatorsMenu_TrendLine_QuarticFit", "Quartic Fit")); $ret.addItem(5, _this.al("FinancialChart_IndicatorsMenu_TrendLine_QuinticFit", "Quintic Fit")); $ret.addItem(6, _this.al("FinancialChart_IndicatorsMenu_TrendLine_LogarithmicFit", "Logarithmic Fit")); $ret.addItem(7, _this.al("FinancialChart_IndicatorsMenu_TrendLine_ExponentialFit", "Exponential Fit")); $ret.addItem(8, _this.al("FinancialChart_IndicatorsMenu_TrendLine_PowerLawFit", "Power LawFit")); $ret.addItem(9, _this.al("FinancialChart_IndicatorsMenu_TrendLine_SimpleAverage", "Simple Average")); $ret.addItem(10, _this.al("FinancialChart_IndicatorsMenu_TrendLine_ExponentialAverage", "Exponential Average")); $ret.addItem(11, _this.al("FinancialChart_IndicatorsMenu_TrendLine_ModifiedAverage", "Modified Average")); $ret.addItem(12, _this.al("FinancialChart_IndicatorsMenu_TrendLine_CumulativeAverage", "Cumulative Average")); $ret.addItem(13, _this.al("FinancialChart_IndicatorsMenu_TrendLine_WeightedAverage", "Weighted Average")); return $ret; })()); }; Object.defineProperty(FinancialChartIndicatorMenuItems.prototype, "aj", { get: function () { if (this.af == null) { this.ar(); } return this.af; }, enumerable: false, configurable: true }); FinancialChartIndicatorMenuItems.prototype.ar = function () { var _this = this; this.af = ((function () { var $ret = new OrderedDictionary$2(FinancialChartVolumeType_$type, String_$type); $ret.addItem(3, _this.al("FinancialChart_IndicatorsMenu_Volume_Area", "Area")); $ret.addItem(1, _this.al("FinancialChart_IndicatorsMenu_Volume_Column", "Column")); $ret.addItem(2, _this.al("FinancialChart_IndicatorsMenu_Volume_Line", "Line")); return $ret; })()); }; FinancialChartIndicatorMenuItems.$t = markType(FinancialChartIndicatorMenuItems, 'FinancialChartIndicatorMenuItems', List$1.$.specialize(FinancialChartIndicatorMenuItem.$)); return FinancialChartIndicatorMenuItems; }(List$1)); export { FinancialChartIndicatorMenuItems };