igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
416 lines (415 loc) • 15.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 { DataAnnotationRangeLayer } from "./DataAnnotationRangeLayer";
import { DependencyProperty } from "igniteui-react-core";
import { typeCast, enumGetBox, markType, markDep } from "igniteui-react-core";
import { DataAnnotationDisplayMode_$type } from "./DataAnnotationDisplayMode";
import { List$1 } from "igniteui-react-core";
import { DataAnnotationInfo } from "./DataAnnotationInfo";
import { IFastItemsSource_$type } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { isNaN_ } from "igniteui-react-core";
/**
* @hidden
*/
var DataAnnotationStripLayer = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(DataAnnotationStripLayer, _super);
function DataAnnotationStripLayer() {
var _this = _super.call(this) || this;
_this.ahz = null;
_this.ahy = null;
_this.ahx = null;
_this.ahw = null;
_this.ahv = null;
_this.ahs = null;
_this.ahr = null;
_this.ahu = null;
_this.aht = null;
_this.ab = DataAnnotationStripLayer.$;
return _this;
}
DataAnnotationStripLayer.prototype.bk = function () {
return new DataAnnotationStripLayer();
};
DataAnnotationStripLayer.prototype.aem = function (a) {
if (isNaN_(this.aec)) {
return a.dm ? 90 : 0;
}
return this.aec;
};
DataAnnotationStripLayer.prototype.afq = function (a) {
var _this = this;
if (!this.adw(a)) {
return;
}
var b = this.ad6._inner[a];
b.c = new List$1(DataAnnotationInfo.$, 0);
b.b = new List$1(DataAnnotationInfo.$, 0);
b.centerLabelX = this.aeu(a, this.ah4);
b.centerLabelY = this.aeu(a, this.ah4);
b.startLabelX = this.aeu(a, this.ah7);
b.startLabelY = this.aeu(a, this.ah7);
b.endLabelX = this.aeu(a, this.ah5);
b.endLabelY = this.aeu(a, this.ah5);
var c = NaN;
var d = this.adv ? this.adf : this.adg;
var e = this.aeb(a, this.ah8, d);
var f = this.aeb(a, this.ah6, d);
if (isNaN_(e) && !isNaN_(f)) {
b.startLabelX = null;
b.startLabelY = null;
}
if (!isNaN_(e) && isNaN_(f)) {
b.endLabelX = null;
b.endLabelY = null;
}
if (isNaN_(e)) {
e = f;
}
if (isNaN_(f)) {
f = e;
}
if (isNaN_(c)) {
c = e + ((f - e) / 2);
}
if (this.adv) {
b.shapeStartX = e;
b.shapeStartY = Number.NEGATIVE_INFINITY;
b.shapeEndX = f;
b.shapeEndY = Number.POSITIVE_INFINITY;
b.shapeCenterX = c;
b.shapeCenterY = 0;
}
else {
b.shapeStartX = Number.NEGATIVE_INFINITY;
b.shapeStartY = e;
b.shapeEndX = Number.POSITIVE_INFINITY;
b.shapeEndY = f;
b.shapeCenterX = 0;
b.shapeCenterY = c;
}
b.c.add(((function () {
var $ret = new DataAnnotationInfo();
$ret.isStartLabel = true;
$ret.textColor = _this.ahn;
$ret.background = _this.ahl;
$ret.borderColor = _this.ahm;
$ret.q = b.ab.x;
$ret.r = b.ab.y;
$ret.dataLabelX = b.startLabelX;
$ret.dataLabelY = b.startLabelY;
$ret.dataValueX = b.ab.x;
$ret.dataValueY = b.ab.y;
$ret.a = _this.adv ? _this.ahq : 6;
$ret.b = !_this.adv ? _this.ahq : 6;
return $ret;
})()));
b.c.add(((function () {
var $ret = new DataAnnotationInfo();
$ret.q = b.ab.x;
$ret.r = b.aa.y;
return $ret;
})()));
b.c.add(((function () {
var $ret = new DataAnnotationInfo();
$ret.isEndLabel = true;
$ret.textColor = _this.ahk;
$ret.background = _this.ahi;
$ret.borderColor = _this.ahj;
$ret.q = b.aa.x;
$ret.r = b.aa.y;
$ret.dataLabelX = b.endLabelX;
$ret.dataLabelY = b.endLabelY;
$ret.dataValueX = b.aa.x;
$ret.dataValueY = b.aa.y;
$ret.a = _this.adv ? _this.ahp : 6;
$ret.b = !_this.adv ? _this.ahp : 6;
return $ret;
})()));
b.c.add(((function () {
var $ret = new DataAnnotationInfo();
$ret.q = b.aa.x;
$ret.r = b.ab.y;
return $ret;
})()));
b.b.add(((function () {
var $ret = new DataAnnotationInfo();
$ret.isCenterLabel = true;
$ret.textColor = _this.ahh;
$ret.background = _this.ahf;
$ret.borderColor = _this.ahg;
$ret.q = b.z.x;
$ret.r = b.z.y;
$ret.dataLabelX = b.centerLabelX;
$ret.dataLabelY = b.centerLabelY;
$ret.dataValueX = b.z.x;
$ret.dataValueY = b.z.y;
$ret.a = _this.adv ? _this.aho : 6;
$ret.b = !_this.adv ? _this.aho : 6;
return $ret;
})()));
};
DataAnnotationStripLayer.prototype.rr = function (a, b, c, d) {
_super.prototype.rr.call(this, a, b, c, d);
switch (b) {
case DataAnnotationStripLayer.$$p[11]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah8);
this.ah8 = this.dl(this.ai1);
}
break;
case DataAnnotationStripLayer.$$p[8]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah6);
this.ah6 = this.dl(this.aiu);
}
break;
case DataAnnotationStripLayer.$$p[10]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah7);
this.ah7 = this.dn(this.aiy);
}
break;
case DataAnnotationStripLayer.$$p[7]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah5);
this.ah5 = this.dn(this.air);
}
break;
case DataAnnotationStripLayer.$$p[5]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah4);
this.ah4 = this.dn(this.ain);
}
break;
case "StartValueColumn":
case "StartLabelColumn":
case DataAnnotationStripLayer.$$p[9]:
case "EndValueColumn":
case "EndLabelColumn":
case DataAnnotationStripLayer.$$p[6]:
case "CenterLabelColumn":
case DataAnnotationStripLayer.$$p[4]:
this.acb();
break;
case DataAnnotationStripLayer.$$p[0]:
this.afo(this.ah0);
this.ah0 = this.dn(this.aia);
break;
case DataAnnotationStripLayer.$$p[3]:
this.afo(this.ah3);
this.ah3 = this.dn(this.aij);
break;
case DataAnnotationStripLayer.$$p[1]:
this.afo(this.ah1);
this.ah1 = this.dn(this.aid);
break;
case DataAnnotationStripLayer.$$p[2]:
this.afo(this.ah2);
this.ah2 = this.dn(this.aig);
break;
case "AnnotationBadgeBackgroundColumn":
case "AnnotationBadgeOutlineColumn":
case "AnnotationBadgeEnabledColumn":
case "AnnotationBadgeImageColumn":
this.acb();
break;
}
};
DataAnnotationStripLayer.prototype.afs = function (a, b) {
_super.prototype.afs.call(this, a, b);
if (typeCast(IFastItemsSource_$type, a) != null) {
a.deregisterColumn(this.ah8);
a.deregisterColumn(this.ah7);
a.deregisterColumn(this.ah6);
a.deregisterColumn(this.ah5);
a.deregisterColumn(this.ah4);
a.deregisterColumn(this.ah0);
a.deregisterColumn(this.ah3);
a.deregisterColumn(this.ah1);
a.deregisterColumn(this.ah2);
this.ah8 = null;
this.ah7 = null;
this.ah6 = null;
this.ah5 = null;
this.ah4 = null;
this.ah0 = null;
this.ah3 = null;
this.ah1 = null;
this.ah2 = null;
}
if (typeCast(IFastItemsSource_$type, b) != null) {
this.ah8 = this.dl(this.ai1);
this.ah7 = this.dn(this.aiy);
this.ah6 = this.dl(this.aiu);
this.ah5 = this.dn(this.air);
this.ah4 = this.dn(this.ain);
this.ah0 = this.dn(this.aia);
this.ah3 = this.dn(this.aij);
this.ah1 = this.dn(this.aid);
this.ah2 = this.dn(this.aig);
}
};
DataAnnotationStripLayer.prototype.agm = function (a, b, c, d) {
if (b) {
var e = this.agn(a, this.ah3);
if (e == null) {
e = this.ago(this.ac7, d);
}
return e;
}
else {
var f = this.agn(a, this.ah0);
if (f == null) {
f = this.ago(this.ac6, d);
}
return f;
}
};
DataAnnotationStripLayer.prototype.adu = function (a, b) {
if (this.ah1 == null || this.ah1.count <= a) {
return this.aa1;
}
var c = this.ah1.item(a);
return c != null ? c : this.aa1;
};
DataAnnotationStripLayer.prototype.aet = function (a, b) {
var c = this.aeu(a, this.ah2);
return c != null ? c : this.abo;
};
Object.defineProperty(DataAnnotationStripLayer.prototype, "ah8", {
get: function () {
return this.ahz;
},
set: function (a) {
if (this.ahz != a) {
var b = this.ahz;
this.ahz = a;
this.raisePropertyChanged("StartValueColumn", b, this.ahz);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "ah7", {
get: function () {
return this.ahy;
},
set: function (a) {
if (this.ahy != a) {
var b = this.ahy;
this.ahy = a;
this.raisePropertyChanged("StartLabelColumn", b, this.ahy);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "ah6", {
get: function () {
return this.ahx;
},
set: function (a) {
if (this.ahx != a) {
var b = this.ahx;
this.ahx = a;
this.raisePropertyChanged("EndValueColumn", b, this.ahx);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "ah5", {
get: function () {
return this.ahw;
},
set: function (a) {
if (this.ahw != a) {
var b = this.ahw;
this.ahw = a;
this.raisePropertyChanged("EndLabelColumn", b, this.ahw);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "ah4", {
get: function () {
return this.ahv;
},
set: function (a) {
if (this.ahv != a) {
var b = this.ahv;
this.ahv = a;
this.raisePropertyChanged("CenterLabelColumn", b, this.ahv);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "ah1", {
get: function () {
return this.ahs;
},
set: function (a) {
if (this.ahs != a) {
var b = this.ahs;
this.ahs = a;
this.raisePropertyChanged("AnnotationBadgeEnabledColumn", b, this.ahs);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "ah0", {
get: function () {
return this.ahr;
},
set: function (a) {
if (this.ahr != a) {
var b = this.ahr;
this.ahr = a;
this.raisePropertyChanged("AnnotationBadgeBackgroundColumn", b, this.ahr);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "ah3", {
get: function () {
return this.ahu;
},
set: function (a) {
if (this.ahu != a) {
var b = this.ahu;
this.ahu = a;
this.raisePropertyChanged("AnnotationBadgeOutlineColumn", b, this.ahu);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "ah2", {
get: function () {
return this.aht;
},
set: function (a) {
if (this.aht != a) {
var b = this.aht;
this.aht = a;
this.raisePropertyChanged("AnnotationBadgeImageColumn", b, this.aht);
}
},
enumerable: false,
configurable: true
});
DataAnnotationStripLayer.$t = markType(DataAnnotationStripLayer, 'DataAnnotationStripLayer', DataAnnotationRangeLayer.$);
DataAnnotationStripLayer.$$p = markDep(DependencyProperty, PropertyMetadata, DataAnnotationStripLayer, 'raisePropertyChanged', ['AnnotationBadgeBackgroundMemberPath:aia:ai3', [2, null], 'AnnotationBadgeEnabledMemberPath:aid:ai4', [2, null], 'AnnotationBadgeImageMemberPath:aig:ai5', [2, null], 'AnnotationBadgeOutlineMemberPath:aij:ai6', [2, null], 'CenterLabelDisplayMode:aho:ai7', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 2)], 'CenterLabelMemberPath:ain:ai8', [2, null], 'EndLabelDisplayMode:ahp:ai9', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'EndLabelMemberPath:air:aja', [2, null], 'EndValueMemberPath:aiu:ajb', [2, null], 'StartLabelDisplayMode:ahq:ajc', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'StartLabelMemberPath:aiy:ajd', [2, null], 'StartValueMemberPath:ai1:aje', [2, null]]);
return DataAnnotationStripLayer;
}(DataAnnotationRangeLayer));
export { DataAnnotationStripLayer };