igniteui-react-core
Version:
Ignite UI React Core.
284 lines (283 loc) • 8.83 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 { Base, typeCast, enumGetBox, fromEnum, markType } from "./type";
import { DataSeriesType_$type } from "./DataSeriesType";
import { List$1 } from "./List$1";
import { DataSeriesMemberPathHint } from "./DataSeriesMemberPathHint";
import { stringIsNullOrEmpty } from "./string";
/**
* @hidden
*/
export let DataSeries = /*@__PURE__*/ (() => {
class DataSeries extends Base {
constructor() {
super();
this.m = null;
this._name = null;
this._title = null;
this._data = null;
this._highlightedData = null;
this._priority = 0;
this._index = 0;
this._suggestedPrimaryAxis = 0;
this._suggestedSecondaryAxis = 0;
this._suggestedSeries = 0;
this._dataPath = null;
this._suggestedMarker = 0;
this.m = new List$1(DataSeriesMemberPathHint.$, 0);
this.suggestedMarker = 13;
this.index = -1;
this.priority = -1;
}
get name() {
return this._name;
}
set name(a) {
this._name = a;
}
get title() {
return this._title;
}
set title(a) {
this._title = a;
}
get data() {
return this._data;
}
set data(a) {
this._data = a;
}
get highlightedData() {
return this._highlightedData;
}
set highlightedData(a) {
this._highlightedData = a;
}
get priority() {
return this._priority;
}
set priority(a) {
this._priority = a;
}
get index() {
return this._index;
}
set index(a) {
this._index = a;
}
get suggestedPrimaryAxis() {
return this._suggestedPrimaryAxis;
}
set suggestedPrimaryAxis(a) {
this._suggestedPrimaryAxis = a;
}
get suggestedSecondaryAxis() {
return this._suggestedSecondaryAxis;
}
set suggestedSecondaryAxis(a) {
this._suggestedSecondaryAxis = a;
}
get suggestedSeries() {
return this._suggestedSeries;
}
set suggestedSeries(a) {
this._suggestedSeries = a;
}
get dataPath() {
return this._dataPath;
}
set dataPath(a) {
this._dataPath = a;
}
get suggestedMarker() {
return this._suggestedMarker;
}
set suggestedMarker(a) {
this._suggestedMarker = a;
}
addMemberPathHint(a) {
this.m.add(a);
}
addMemberPathHint1(a, b) {
let c = a.clone();
c.intent = b;
this.m.add(c);
}
addMemberPathHint2(a, b) {
let c = new DataSeriesMemberPathHint();
c.intent = b;
c.path = a;
this.m.add(c);
}
removeMemberPathHint(a) {
this.m.remove(a);
}
clearMemberPathHints() {
this.m.clear();
}
getMemberPathHintCount() {
return this.m.count;
}
getMemberPathHintAt(a) {
return this.m._inner[a];
}
findMatchingHint(a) {
for (let b = 0; b < this.m.count; b++) {
if (this.m._inner[b].intent == a) {
return this.m._inner[b];
}
}
return null;
}
getMemberPathFor(a) {
let b = this.findMatchingHint(a);
if (b == null) {
return "";
}
return b.path;
}
hasMatchingHint(a) {
let b = this.findMatchingHint(a);
if (b == null) {
return false;
}
if (stringIsNullOrEmpty(b.path)) {
return false;
}
return true;
}
f(a) {
let b = this.findMatchingHint(a);
if (b == null) {
return null;
}
if (stringIsNullOrEmpty(b.path)) {
return null;
}
return b;
}
l() {
return this.m;
}
clone() {
let a = new DataSeries();
a.data = this.data;
a.dataPath = this.dataPath;
a.name = this.name;
a.title = this.title;
a.highlightedData = this.highlightedData;
a.index = this.index;
a.suggestedMarker = this.suggestedMarker;
a.suggestedPrimaryAxis = this.suggestedPrimaryAxis;
a.suggestedSecondaryAxis = this.suggestedSecondaryAxis;
a.suggestedSeries = this.suggestedSeries;
a.priority = this.priority;
for (let b = 0; b < this.getMemberPathHintCount(); b++) {
let c = this.getMemberPathHintAt(b);
a.addMemberPathHint(c);
}
return a;
}
equals(a) {
let b = typeCast(DataSeries.$, a);
if (b == null) {
return false;
}
if (!Base.equalsStatic(this.name, b.name)) {
return false;
}
if (!Base.equalsStatic(this.title, b.title)) {
return false;
}
if (this.data != b.data) {
return false;
}
if (this.highlightedData != b.highlightedData) {
return false;
}
if (this.priority != b.priority) {
return false;
}
if (this.suggestedPrimaryAxis != b.suggestedPrimaryAxis) {
return false;
}
if (this.suggestedSecondaryAxis != b.suggestedSecondaryAxis) {
return false;
}
if (this.suggestedSeries != b.suggestedSeries) {
return false;
}
if (this.suggestedMarker != b.suggestedMarker) {
return false;
}
if (!Base.equalsStatic(this.dataPath, b.dataPath)) {
return false;
}
let c = this.l();
let d = b.l();
if (c.count != d.count) {
return false;
}
for (let e = 0; e < c.count; e++) {
if (!c.item(e).equals(d.item(e))) {
return false;
}
}
return true;
}
isMatch(a) {
let b = typeCast(DataSeries.$, a);
if (b == null) {
return false;
}
if (!Base.equalsStatic(this.name, b.name)) {
return false;
}
if (!Base.equalsStatic(this.title, b.title)) {
return false;
}
if (this.priority != b.priority) {
return false;
}
if (this.suggestedPrimaryAxis != b.suggestedPrimaryAxis) {
return false;
}
if (this.suggestedSecondaryAxis != b.suggestedSecondaryAxis) {
return false;
}
if (this.suggestedSeries != b.suggestedSeries) {
return false;
}
if (this.suggestedMarker != b.suggestedMarker) {
return false;
}
if (!Base.equalsStatic(this.dataPath, b.dataPath)) {
return false;
}
let c = this.l();
let d = b.l();
if (c.count != d.count) {
return false;
}
for (let e = 0; e < c.count; e++) {
if (!c.item(e).equals(d.item(e))) {
return false;
}
}
return true;
}
toString() {
let a = enumGetBox(DataSeriesType_$type, this.suggestedSeries) + " hints: ";
for (let b of fromEnum(this.m)) {
a += " {" + b.toString() + "}, ";
}
return a;
}
}
DataSeries.$t = /*@__PURE__*/ markType(DataSeries, 'DataSeries');
return DataSeries;
})();