igniteui-react-grids
Version:
Ignite UI React grid components.
762 lines (761 loc) • 24.4 kB
JavaScript
/*
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 } from "tslib";
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
*/
var GridConditionalStyleProperty = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(GridConditionalStyleProperty, _super);
function GridConditionalStyleProperty() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_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;
return _this;
}
Object.defineProperty(GridConditionalStyleProperty.prototype, "aj", {
get: function () {
return this.ai;
},
set: function (a) {
var b = this.ai;
this.ai = a;
if (b != a) {
this.cj("StylingType", enumGetBox(GridConditionalStylePropertyStylingType_$type, b), enumGetBox(GridConditionalStylePropertyStylingType_$type, a));
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "ah", {
get: function () {
return this.af;
},
set: function (a) {
var b = this.af;
this.af = a;
if (b != a) {
this.cj("MinimumType", enumGetBox(GridConditionalStyleBoundType_$type, b), enumGetBox(GridConditionalStyleBoundType_$type, a));
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "ag", {
get: function () {
return this.ae;
},
set: function (a) {
var b = this.ae;
this.ae = a;
if (b != a) {
this.cj("MaximumType", enumGetBox(GridConditionalStyleBoundType_$type, b), enumGetBox(GridConditionalStyleBoundType_$type, a));
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "b9", {
get: function () {
return this.bg;
},
set: function (a) {
var b = this.bg;
this.bg = a;
if (b != a) {
this.cj("PropertyName", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "w", {
get: function () {
return this.k;
},
set: function (a) {
var b = this.k;
this.k = a;
if (b != a) {
this.cj("InputValueExpression", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "bo", {
get: function () {
return this.bd;
},
set: function (a) {
var b = this.bd;
this.bd = a;
if (b != a) {
this.cj("InputValueExpressionString", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "s", {
get: function () {
return this.g;
},
set: function (a) {
var b = this.g;
this.g = a;
if (b != a) {
this.cj("ActualInputValueExpression", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "y", {
get: function () {
return this.m;
},
set: function (a) {
var b = this.m;
this.m = a;
if (b != a) {
this.cj("MinimumInputValueExpression", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "b5", {
get: function () {
return this.bf;
},
set: function (a) {
var b = this.bf;
this.bf = a;
if (b != a) {
this.cj("MinimumInputValueExpressionString", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "u", {
get: function () {
return this.i;
},
set: function (a) {
var b = this.i;
this.i = a;
if (b != a) {
this.cj("ActualMinimumInputValueExpression", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "x", {
get: function () {
return this.l;
},
set: function (a) {
var b = this.l;
this.l = a;
if (b != a) {
this.cj("MaximumInputValueExpression", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "bz", {
get: function () {
return this.be;
},
set: function (a) {
var b = this.be;
this.be = a;
if (b != a) {
this.cj("MaximumInputValueExpressionString", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "t", {
get: function () {
return this.h;
},
set: function (a) {
var b = this.h;
this.h = a;
if (b != a) {
this.cj("ActualMaximumInputValueExpression", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "ad", {
get: function () {
return this.r;
},
set: function (a) {
var b = this.r;
this.r = a;
if (b != a) {
this.cj("SumInputValueExpression", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "ce", {
get: function () {
return this.bh;
},
set: function (a) {
var b = this.bh;
this.bh = a;
if (b != a) {
this.cj("SumInputValueExpressionString", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "v", {
get: function () {
return this.j;
},
set: function (a) {
var b = this.j;
this.j = a;
if (b != a) {
this.cj("ActualSumInputValueExpression", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "bc", {
get: function () {
return this.a7;
},
set: function (a) {
var b = this.a7;
this.a7 = a;
if (this.a7 != b) {
this.cj("Value", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "as", {
get: function () {
return this.al;
},
set: function (a) {
var b = this.al;
this.al = a;
if (this.al != b) {
this.cj("ShouldSetValue", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "a8", {
get: function () {
return this.a3;
},
set: function (a) {
var b = this.a3;
this.a3 = a;
if (this.a3 != b) {
this.cj("InternalValue", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "co", {
get: function () {
return this.cm;
},
set: function (a) {
var b = this.cm;
this.cm = a;
if (this.cm != b) {
this.cj("MinimumColor", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "cn", {
get: function () {
return this.cl;
},
set: function (a) {
var b = this.cl;
this.cl = a;
if (this.cl != b) {
this.cj("MaximumColor", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "ba", {
get: function () {
return this.a5;
},
set: function (a) {
var b = this.a5;
this.a5 = a;
if (this.a5 != b) {
this.cj("MinimumInputValue", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "a9", {
get: function () {
return this.a4;
},
set: function (a) {
var b = this.a4;
this.a4 = a;
if (this.a4 != b) {
this.cj("MaximumInputValue", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "bb", {
get: function () {
return this.a6;
},
set: function (a) {
var b = this.a6;
this.a6 = a;
if (this.a6 != b) {
this.cj("SumInputValue", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "a0", {
get: function () {
return this.ax;
},
set: function (a) {
var b = this.ax;
this.ax = a;
if (this.ax != b) {
this.cj("InternalMaximumNumericInputValue", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "a2", {
get: function () {
return this.az;
},
set: function (a) {
var b = this.az;
this.az = a;
if (this.az != b) {
this.cj("InternalSumNumericInputValue", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "a1", {
get: function () {
return this.ay;
},
set: function (a) {
var b = this.ay;
this.ay = a;
if (this.ay != b) {
this.cj("InternalMinimumNumericInputValue", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "av", {
get: function () {
return this.at;
},
set: function (a) {
var b = this.at;
this.at = a;
if (+(this.at) != +b) {
this.cj("InternalMaximumDateInputValue", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "aw", {
get: function () {
return this.au;
},
set: function (a) {
var b = this.au;
this.au = a;
if (+(this.au) != +b) {
this.cj("InternalMinimumDateInputValue", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "f", {
get: function () {
return this.e;
},
set: function (a) {
var b = this.e;
this.e = a;
if (this.e != b) {
this.cj("ColorCollection", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "d", {
get: function () {
return this.b;
},
set: function (a) {
var b = this.b;
this.b = a;
if (this.b != b) {
this.cj("ValueCollection", b, a);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "c", {
get: function () {
return this.a;
},
set: function (a) {
var b = this.a;
this.a = this.d;
if (this.a != b) {
this.cj("InternalValueCollection", b, this.d);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "ar", {
get: function () {
return this.ap || this.ao || this.aq;
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "ap", {
get: function () {
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;
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "ao", {
get: function () {
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;
},
enumerable: false,
configurable: true
});
Object.defineProperty(GridConditionalStyleProperty.prototype, "aq", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
GridConditionalStyleProperty.prototype.cj = function (a, b, c) {
this.ck(a, b, c);
if (this.propertyChanged != null) {
this.propertyChanged(this, new PropertyChangedEventArgs(a));
}
};
GridConditionalStyleProperty.prototype.ck = function (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;
}
};
GridConditionalStyleProperty.prototype.z = function () {
if (this.w != null) {
return this.w;
}
if (this.n == null && this.bo != null) {
var a_1 = FilterExpressionParsingHelper.getFilterExpression(this.bo);
if (!stringIsNullOrEmpty(a_1.errors)) {
if (this.filterStringErrorsParsing != null) {
this.filterStringErrorsParsing(this, ((function () {
var $ret = new GridConditionFilterStringErrorsParsingEventArgs();
$ret.propertyName = "InputValueExpressionString";
$ret.errors = a_1.errors;
return $ret;
})()));
}
return null;
}
else {
this.n = a_1.result;
}
}
return this.n;
};
GridConditionalStyleProperty.prototype.ab = function () {
if (this.y != null) {
return this.y;
}
if (this.p == null && this.b5 != null) {
var a_2 = FilterExpressionParsingHelper.getFilterExpression(this.b5);
if (!stringIsNullOrEmpty(a_2.errors)) {
if (this.filterStringErrorsParsing != null) {
this.filterStringErrorsParsing(this, ((function () {
var $ret = new GridConditionFilterStringErrorsParsingEventArgs();
$ret.propertyName = "MinimumInputValueExpressionString";
$ret.errors = a_2.errors;
return $ret;
})()));
}
return null;
}
else {
this.p = a_2.result;
}
}
return this.p;
};
GridConditionalStyleProperty.prototype.aa = function () {
if (this.x != null) {
return this.x;
}
if (this.o == null && this.bz != null) {
var a_3 = FilterExpressionParsingHelper.getFilterExpression(this.bz);
if (!stringIsNullOrEmpty(a_3.errors)) {
if (this.filterStringErrorsParsing != null) {
this.filterStringErrorsParsing(this, ((function () {
var $ret = new GridConditionFilterStringErrorsParsingEventArgs();
$ret.propertyName = "MaximumInputValueExpressionString";
$ret.errors = a_3.errors;
return $ret;
})()));
}
return null;
}
else {
this.o = a_3.result;
}
}
return this.o;
};
GridConditionalStyleProperty.prototype.ac = function () {
if (this.ad != null) {
return this.ad;
}
if (this.q == null && this.ce != null) {
var a_4 = FilterExpressionParsingHelper.getFilterExpression(this.ce);
if (!stringIsNullOrEmpty(a_4.errors)) {
if (this.filterStringErrorsParsing != null) {
this.filterStringErrorsParsing(this, ((function () {
var $ret = new GridConditionFilterStringErrorsParsingEventArgs();
$ret.propertyName = "SumInputValueExpressionString";
$ret.errors = a_4.errors;
return $ret;
})()));
}
return null;
}
else {
this.q = a_4.result;
}
}
return this.q;
};
GridConditionalStyleProperty.$t = markType(GridConditionalStyleProperty, 'GridConditionalStyleProperty', Base.$, [INotifyPropertyChanged_$type]);
return GridConditionalStyleProperty;
}(Base));
export { GridConditionalStyleProperty };