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.ahy = null;
_this.ahx = null;
_this.ahw = null;
_this.ahv = null;
_this.ahu = null;
_this.ahr = null;
_this.ahq = null;
_this.aht = null;
_this.ahs = null;
_this.ab = DataAnnotationStripLayer.$;
return _this;
}
DataAnnotationStripLayer.prototype.bk = function () {
return new DataAnnotationStripLayer();
};
DataAnnotationStripLayer.prototype.ael = function (a) {
if (isNaN_(this.aeb)) {
return a.dm ? 90 : 0;
}
return this.aeb;
};
DataAnnotationStripLayer.prototype.afp = function (a) {
var _this = this;
if (!this.adv(a)) {
return;
}
var b = this.ad5._inner[a];
b.c = new List$1(DataAnnotationInfo.$, 0);
b.b = new List$1(DataAnnotationInfo.$, 0);
b.centerLabelX = this.aet(a, this.ah3);
b.centerLabelY = this.aet(a, this.ah3);
b.startLabelX = this.aet(a, this.ah6);
b.startLabelY = this.aet(a, this.ah6);
b.endLabelX = this.aet(a, this.ah4);
b.endLabelY = this.aet(a, this.ah4);
var c = NaN;
var d = this.adu ? this.ade : this.adf;
var e = this.aea(a, this.ah7, d);
var f = this.aea(a, this.ah5, 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.adu) {
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.ahm;
$ret.background = _this.ahk;
$ret.borderColor = _this.ahl;
$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.adu ? _this.ahp : 6;
$ret.b = !_this.adu ? _this.ahp : 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.ahj;
$ret.background = _this.ahh;
$ret.borderColor = _this.ahi;
$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.adu ? _this.aho : 6;
$ret.b = !_this.adu ? _this.aho : 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.ahg;
$ret.background = _this.ahe;
$ret.borderColor = _this.ahf;
$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.adu ? _this.ahn : 6;
$ret.b = !_this.adu ? _this.ahn : 6;
return $ret;
})()));
};
DataAnnotationStripLayer.prototype.rq = function (a, b, c, d) {
_super.prototype.rq.call(this, a, b, c, d);
switch (b) {
case DataAnnotationStripLayer.$$p[11]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah7);
this.ah7 = this.dl(this.ai0);
}
break;
case DataAnnotationStripLayer.$$p[8]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah5);
this.ah5 = this.dl(this.ait);
}
break;
case DataAnnotationStripLayer.$$p[10]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah6);
this.ah6 = this.dn(this.aix);
}
break;
case DataAnnotationStripLayer.$$p[7]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah4);
this.ah4 = this.dn(this.aiq);
}
break;
case DataAnnotationStripLayer.$$p[5]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah3);
this.ah3 = this.dn(this.aim);
}
break;
case "StartValueColumn":
case "StartLabelColumn":
case DataAnnotationStripLayer.$$p[9]:
case "EndValueColumn":
case "EndLabelColumn":
case DataAnnotationStripLayer.$$p[6]:
case "CenterLabelColumn":
case DataAnnotationStripLayer.$$p[4]:
this.aca();
break;
case DataAnnotationStripLayer.$$p[0]:
this.afn(this.ahz);
this.ahz = this.dn(this.ah9);
break;
case DataAnnotationStripLayer.$$p[3]:
this.afn(this.ah2);
this.ah2 = this.dn(this.aii);
break;
case DataAnnotationStripLayer.$$p[1]:
this.afn(this.ah0);
this.ah0 = this.dn(this.aic);
break;
case DataAnnotationStripLayer.$$p[2]:
this.afn(this.ah1);
this.ah1 = this.dn(this.aif);
break;
case "AnnotationBadgeBackgroundColumn":
case "AnnotationBadgeOutlineColumn":
case "AnnotationBadgeEnabledColumn":
case "AnnotationBadgeImageColumn":
this.aca();
break;
}
};
DataAnnotationStripLayer.prototype.afr = function (a, b) {
_super.prototype.afr.call(this, a, b);
if (typeCast(IFastItemsSource_$type, a) != null) {
a.deregisterColumn(this.ah7);
a.deregisterColumn(this.ah6);
a.deregisterColumn(this.ah5);
a.deregisterColumn(this.ah4);
a.deregisterColumn(this.ah3);
a.deregisterColumn(this.ahz);
a.deregisterColumn(this.ah2);
a.deregisterColumn(this.ah0);
a.deregisterColumn(this.ah1);
this.ah7 = null;
this.ah6 = null;
this.ah5 = null;
this.ah4 = null;
this.ah3 = null;
this.ahz = null;
this.ah2 = null;
this.ah0 = null;
this.ah1 = null;
}
if (typeCast(IFastItemsSource_$type, b) != null) {
this.ah7 = this.dl(this.ai0);
this.ah6 = this.dn(this.aix);
this.ah5 = this.dl(this.ait);
this.ah4 = this.dn(this.aiq);
this.ah3 = this.dn(this.aim);
this.ahz = this.dn(this.ah9);
this.ah2 = this.dn(this.aii);
this.ah0 = this.dn(this.aic);
this.ah1 = this.dn(this.aif);
}
};
DataAnnotationStripLayer.prototype.agl = function (a, b, c, d) {
if (b) {
var e = this.agm(a, this.ah2);
if (e == null) {
e = this.agn(this.ac6, d);
}
return e;
}
else {
var f = this.agm(a, this.ahz);
if (f == null) {
f = this.agn(this.ac5, d);
}
return f;
}
};
DataAnnotationStripLayer.prototype.adt = function (a, b) {
if (this.ah0 == null || this.ah0.count <= a) {
return this.aa0;
}
var c = this.ah0.item(a);
return c != null ? c : this.aa0;
};
DataAnnotationStripLayer.prototype.aes = function (a, b) {
var c = this.aet(a, this.ah1);
return c != null ? c : this.abn;
};
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("StartValueColumn", 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("StartLabelColumn", 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("EndValueColumn", 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("EndLabelColumn", b, this.ahv);
}
},
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("CenterLabelColumn", b, this.ahu);
}
},
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("AnnotationBadgeEnabledColumn", b, this.ahr);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "ahz", {
get: function () {
return this.ahq;
},
set: function (a) {
if (this.ahq != a) {
var b = this.ahq;
this.ahq = a;
this.raisePropertyChanged("AnnotationBadgeBackgroundColumn", b, this.ahq);
}
},
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("AnnotationBadgeOutlineColumn", b, this.aht);
}
},
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("AnnotationBadgeImageColumn", b, this.ahs);
}
},
enumerable: false,
configurable: true
});
DataAnnotationStripLayer.$t = markType(DataAnnotationStripLayer, 'DataAnnotationStripLayer', DataAnnotationRangeLayer.$);
DataAnnotationStripLayer.$$p = markDep(DependencyProperty, PropertyMetadata, DataAnnotationStripLayer, 'raisePropertyChanged', ['AnnotationBadgeBackgroundMemberPath:ah9:ai2', [2, null], 'AnnotationBadgeEnabledMemberPath:aic:ai3', [2, null], 'AnnotationBadgeImageMemberPath:aif:ai4', [2, null], 'AnnotationBadgeOutlineMemberPath:aii:ai5', [2, null], 'CenterLabelDisplayMode:ahn:ai6', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 2)], 'CenterLabelMemberPath:aim:ai7', [2, null], 'EndLabelDisplayMode:aho:ai8', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'EndLabelMemberPath:aiq:ai9', [2, null], 'EndValueMemberPath:ait:aja', [2, null], 'StartLabelDisplayMode:ahp:ajb', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'StartLabelMemberPath:aix:ajc', [2, null], 'StartValueMemberPath:ai0:ajd', [2, null]]);
return DataAnnotationStripLayer;
}(DataAnnotationRangeLayer));
export { DataAnnotationStripLayer };