igniteui-react-core
Version:
Ignite UI React Core.
137 lines (136 loc) • 4.12 kB
JavaScript
import { DataContext as DataContext_internal } from "./DataContext";
import { brushToString, stringToBrush } from "./componentUtil";
var IgrDataContext = /** @class */ /*@__PURE__*/ (function () {
function IgrDataContext() {
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
}
IgrDataContext.prototype.createImplementation = function () {
return new DataContext_internal();
};
Object.defineProperty(IgrDataContext.prototype, "i", {
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgrDataContext.prototype.onImplementationCreated = function () {
};
Object.defineProperty(IgrDataContext.prototype, "series", {
get: function () {
return this.i.series.externalObject;
},
set: function (v) {
if (v == null) {
this.i.series = null;
return;
}
this.i.series = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataContext.prototype, "item", {
/**
* Gets the item that is in context.
*/
get: function () {
return this.i.item;
},
set: function (v) {
this.i.item = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataContext.prototype, "actualItemBrush", {
/**
* Gets the actual resolved brush in use for the item that is in context.
*/
get: function () {
return brushToString(this.i.actualItemBrush);
},
set: function (v) {
this.i.actualItemBrush = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataContext.prototype, "outline", {
/**
* Gets the outline in use for the item in context.
*/
get: function () {
return brushToString(this.i.outline);
},
set: function (v) {
this.i.outline = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataContext.prototype, "itemLabel", {
/**
* Gets the label in use for the item in context, if available.
*/
get: function () {
return this.i.itemLabel;
},
set: function (v) {
this.i.itemLabel = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataContext.prototype, "itemBrush", {
/**
* Gets the potential brush in usage for the item in context.
*/
get: function () {
return brushToString(this.i.itemBrush);
},
set: function (v) {
this.i.itemBrush = stringToBrush(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataContext.prototype, "thickness", {
/**
* Gets the thickness of the item in context.
*/
get: function () {
return this.i.thickness;
},
set: function (v) {
this.i.thickness = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrDataContext.prototype, "legendLabel", {
/**
* Gets the legend label to use for the item in context, if available.
*/
get: function () {
return this.i.legendLabel;
},
set: function (v) {
this.i.legendLabel = v;
},
enumerable: false,
configurable: true
});
IgrDataContext.prototype.findByName = function (name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
};
return IgrDataContext;
}());
export { IgrDataContext };