UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

616 lines (615 loc) 19.2 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 { Base, INotifyPropertyChanged_$type, PropertyChangedEventArgs, enumGetBox, typeGetValue, typeCast, Date_$type, markType } from "igniteui-react-core"; import { GridConditionalStylePropertyStylingType_$type } from "./GridConditionalStylePropertyStylingType"; import { GridConditionalStyleBoundType_$type } from "./GridConditionalStyleBoundType"; import { GridConditionFilterStringErrorsParsingEventArgs } from "./GridConditionFilterStringErrorsParsingEventArgs"; import { FilterExpressionParsingHelper } from "igniteui-react-core"; import { dateMinValue } from "igniteui-react-core"; import { isNaN_ } from "igniteui-react-core"; import { stringIsNullOrEmpty } from "igniteui-react-core"; /** * @hidden */ export let GridConditionalStyleProperty = /*@__PURE__*/ (() => { class GridConditionalStyleProperty extends Base { constructor() { super(...arguments); this.ai = 0; this.af = 0; this.ae = 0; this.bg = null; this.k = null; this.bd = null; this.g = null; this.m = null; this.bf = null; this.i = null; this.l = null; this.be = null; this.h = null; this.r = null; this.bh = null; this.j = null; this.a7 = null; this.al = true; this.a3 = null; this.cm = null; this.cl = null; this.a5 = null; this.a4 = null; this.a6 = null; this.ax = NaN; this.az = NaN; this.ay = NaN; this.at = dateMinValue(); this.au = dateMinValue(); this.e = null; this.b = null; this.a = null; this.an = false; this.am = false; this.filterStringErrorsParsing = null; this.n = null; this.p = null; this.o = null; this.q = null; this.propertyChanged = null; } get aj() { return this.ai; } set aj(a) { let b = this.ai; this.ai = a; if (b != a) { this.cj("StylingType", enumGetBox(GridConditionalStylePropertyStylingType_$type, b), enumGetBox(GridConditionalStylePropertyStylingType_$type, a)); } } get ah() { return this.af; } set ah(a) { let b = this.af; this.af = a; if (b != a) { this.cj("MinimumType", enumGetBox(GridConditionalStyleBoundType_$type, b), enumGetBox(GridConditionalStyleBoundType_$type, a)); } } get ag() { return this.ae; } set ag(a) { let b = this.ae; this.ae = a; if (b != a) { this.cj("MaximumType", enumGetBox(GridConditionalStyleBoundType_$type, b), enumGetBox(GridConditionalStyleBoundType_$type, a)); } } get b9() { return this.bg; } set b9(a) { let b = this.bg; this.bg = a; if (b != a) { this.cj("PropertyName", b, a); } } get w() { return this.k; } set w(a) { let b = this.k; this.k = a; if (b != a) { this.cj("InputValueExpression", b, a); } } get bo() { return this.bd; } set bo(a) { let b = this.bd; this.bd = a; if (b != a) { this.cj("InputValueExpressionString", b, a); } } get s() { return this.g; } set s(a) { let b = this.g; this.g = a; if (b != a) { this.cj("ActualInputValueExpression", b, a); } } get y() { return this.m; } set y(a) { let b = this.m; this.m = a; if (b != a) { this.cj("MinimumInputValueExpression", b, a); } } get b5() { return this.bf; } set b5(a) { let b = this.bf; this.bf = a; if (b != a) { this.cj("MinimumInputValueExpressionString", b, a); } } get u() { return this.i; } set u(a) { let b = this.i; this.i = a; if (b != a) { this.cj("ActualMinimumInputValueExpression", b, a); } } get x() { return this.l; } set x(a) { let b = this.l; this.l = a; if (b != a) { this.cj("MaximumInputValueExpression", b, a); } } get bz() { return this.be; } set bz(a) { let b = this.be; this.be = a; if (b != a) { this.cj("MaximumInputValueExpressionString", b, a); } } get t() { return this.h; } set t(a) { let b = this.h; this.h = a; if (b != a) { this.cj("ActualMaximumInputValueExpression", b, a); } } get ad() { return this.r; } set ad(a) { let b = this.r; this.r = a; if (b != a) { this.cj("SumInputValueExpression", b, a); } } get ce() { return this.bh; } set ce(a) { let b = this.bh; this.bh = a; if (b != a) { this.cj("SumInputValueExpressionString", b, a); } } get v() { return this.j; } set v(a) { let b = this.j; this.j = a; if (b != a) { this.cj("ActualSumInputValueExpression", b, a); } } get bc() { return this.a7; } set bc(a) { let b = this.a7; this.a7 = a; if (this.a7 != b) { this.cj("Value", b, a); } } get as() { return this.al; } set as(a) { let b = this.al; this.al = a; if (this.al != b) { this.cj("ShouldSetValue", b, a); } } get a8() { return this.a3; } set a8(a) { let b = this.a3; this.a3 = a; if (this.a3 != b) { this.cj("InternalValue", b, a); } } get co() { return this.cm; } set co(a) { let b = this.cm; this.cm = a; if (this.cm != b) { this.cj("MinimumColor", b, a); } } get cn() { return this.cl; } set cn(a) { let b = this.cl; this.cl = a; if (this.cl != b) { this.cj("MaximumColor", b, a); } } get ba() { return this.a5; } set ba(a) { let b = this.a5; this.a5 = a; if (this.a5 != b) { this.cj("MinimumInputValue", b, a); } } get a9() { return this.a4; } set a9(a) { let b = this.a4; this.a4 = a; if (this.a4 != b) { this.cj("MaximumInputValue", b, a); } } get bb() { return this.a6; } set bb(a) { let b = this.a6; this.a6 = a; if (this.a6 != b) { this.cj("SumInputValue", b, a); } } get a0() { return this.ax; } set a0(a) { let b = this.ax; this.ax = a; if (this.ax != b) { this.cj("InternalMaximumNumericInputValue", b, a); } } get a2() { return this.az; } set a2(a) { let b = this.az; this.az = a; if (this.az != b) { this.cj("InternalSumNumericInputValue", b, a); } } get a1() { return this.ay; } set a1(a) { let b = this.ay; this.ay = a; if (this.ay != b) { this.cj("InternalMinimumNumericInputValue", b, a); } } get av() { return this.at; } set av(a) { let b = this.at; this.at = a; if (+(this.at) != +b) { this.cj("InternalMaximumDateInputValue", b, a); } } get aw() { return this.au; } set aw(a) { let b = this.au; this.au = a; if (+(this.au) != +b) { this.cj("InternalMinimumDateInputValue", b, a); } } get f() { return this.e; } set f(a) { let b = this.e; this.e = a; if (this.e != b) { this.cj("ColorCollection", b, a); } } get d() { return this.b; } set d(a) { let b = this.b; this.b = a; if (this.b != b) { this.cj("ValueCollection", b, a); } } get c() { return this.a; } set c(a) { let b = this.a; this.a = this.d; if (this.a != b) { this.cj("InternalValueCollection", b, this.d); } } get ar() { return this.ap || this.ao || this.aq; } get ap() { if (this.aj == 0) { return false; } if (!isNaN_(this.a1) && this.ah != 1) { return false; } if (+(this.aw) != +(dateMinValue())) { return false; } if (this.u != null && (this.ah != 1 || (!isNaN_(this.a0) && !isNaN_(this.a1)))) { return false; } return true; } get ao() { if (this.aj == 0) { return false; } if (!isNaN_(this.a0) && this.ah != 1) { return false; } if (+(this.av) != +(dateMinValue())) { return false; } if (this.t != null && (this.ah != 1 || (!isNaN_(this.a0) && !isNaN_(this.a1)))) { return false; } return true; } get aq() { return false; } cj(a, b, c) { this.ck(a, b, c); if (this.propertyChanged != null) { this.propertyChanged(this, new PropertyChangedEventArgs(a)); } } ck(a, b, c) { switch (a) { case "Value": this.an = true; break; case "ValueCollection": this.am = true; break; case "MinimumInputValue": if (typeof c === 'number') { this.a1 = c; } if (typeof c === 'number') { this.a1 = typeGetValue(c); } if (typeof c === 'number') { this.a1 = c; } if (typeof c === 'number') { this.a1 = typeGetValue(c); } if (typeof c === 'number') { this.a1 = typeGetValue(c); } if (typeCast(Date_$type, c) !== null) { this.aw = c; } break; case "MaximumInputValue": if (typeof c === 'number') { this.a0 = c; } if (typeof c === 'number') { this.a0 = typeGetValue(c); } if (typeof c === 'number') { this.a0 = c; } if (typeof c === 'number') { this.a0 = typeGetValue(c); } if (typeof c === 'number') { this.a0 = typeGetValue(c); } if (typeCast(Date_$type, c) !== null) { this.av = c; } break; case "SumInputValue": if (typeof c === 'number') { this.a2 = c; } if (typeof c === 'number') { this.a2 = typeGetValue(c); } if (typeof c === 'number') { this.a2 = c; } if (typeof c === 'number') { this.a2 = typeGetValue(c); } if (typeof c === 'number') { this.a2 = typeGetValue(c); } break; case "InputValueExpression": this.s = this.z(); break; case "InputValueExpressionString": this.n = null; this.s = this.z(); break; case "MinimumInputValueExpression": this.u = this.ab(); break; case "MinimumInputValueExpressionString": this.p = null; this.u = this.ab(); break; case "MaximumInputValueExpression": this.t = this.aa(); break; case "MaximumInputValueExpressionString": this.o = null; this.t = this.aa(); break; case "SumInputValueExpression": this.v = this.ac(); break; case "SumInputValueExpressionString": this.q = null; this.v = this.ac(); break; } } z() { if (this.w != null) { return this.w; } if (this.n == null && this.bo != null) { let a = FilterExpressionParsingHelper.getFilterExpression(this.bo); if (!stringIsNullOrEmpty(a.errors)) { if (this.filterStringErrorsParsing != null) { this.filterStringErrorsParsing(this, ((() => { let $ret = new GridConditionFilterStringErrorsParsingEventArgs(); $ret.propertyName = "InputValueExpressionString"; $ret.errors = a.errors; return $ret; })())); } return null; } else { this.n = a.result; } } return this.n; } ab() { if (this.y != null) { return this.y; } if (this.p == null && this.b5 != null) { let a = FilterExpressionParsingHelper.getFilterExpression(this.b5); if (!stringIsNullOrEmpty(a.errors)) { if (this.filterStringErrorsParsing != null) { this.filterStringErrorsParsing(this, ((() => { let $ret = new GridConditionFilterStringErrorsParsingEventArgs(); $ret.propertyName = "MinimumInputValueExpressionString"; $ret.errors = a.errors; return $ret; })())); } return null; } else { this.p = a.result; } } return this.p; } aa() { if (this.x != null) { return this.x; } if (this.o == null && this.bz != null) { let a = FilterExpressionParsingHelper.getFilterExpression(this.bz); if (!stringIsNullOrEmpty(a.errors)) { if (this.filterStringErrorsParsing != null) { this.filterStringErrorsParsing(this, ((() => { let $ret = new GridConditionFilterStringErrorsParsingEventArgs(); $ret.propertyName = "MaximumInputValueExpressionString"; $ret.errors = a.errors; return $ret; })())); } return null; } else { this.o = a.result; } } return this.o; } ac() { if (this.ad != null) { return this.ad; } if (this.q == null && this.ce != null) { let a = FilterExpressionParsingHelper.getFilterExpression(this.ce); if (!stringIsNullOrEmpty(a.errors)) { if (this.filterStringErrorsParsing != null) { this.filterStringErrorsParsing(this, ((() => { let $ret = new GridConditionFilterStringErrorsParsingEventArgs(); $ret.propertyName = "SumInputValueExpressionString"; $ret.errors = a.errors; return $ret; })())); } return null; } else { this.q = a.result; } } return this.q; } } GridConditionalStyleProperty.$t = /*@__PURE__*/ markType(GridConditionalStyleProperty, 'GridConditionalStyleProperty', Base.$, [INotifyPropertyChanged_$type]); return GridConditionalStyleProperty; })();