jqwidgets-scripts-custom
Version:
jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.
610 lines (609 loc) • 17.9 kB
JavaScript
import * as jqxcore from '../../jqwidgets/jqxcore';
import * as jqxdata from '../../jqwidgets/jqxdata';
import * as jqxtreemap from '../../jqwidgets/jqxtreemap';
import * as jqxtooltip from '../../jqwidgets/jqxtooltip';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import * as tslib_1 from "tslib";
/// <reference path="../../jqwidgets.d.ts" />
/// <reference path="../../jqwidgets.d.ts" />
import { Component, Input, Output, EventEmitter, ElementRef } from '@angular/core';
var jqxTreeMapComponent = /** @class */ (function () {
function jqxTreeMapComponent(containerElement) {
this.autoCreate = true;
this.properties = ['baseColor', 'colorRanges', 'colorRange', 'colorMode', 'displayMember', 'height', 'hoverEnabled', 'headerHeight', 'legendLabel', 'legendPosition', 'legendScaleCallback', 'renderCallbacks', 'selectionEnabled', 'showLegend', 'source', 'theme', 'valueMember', 'width'];
// jqxTreeMapComponent events
this.onBindingComplete = new EventEmitter();
this.elementRef = containerElement;
}
/**
* @return {?}
*/
jqxTreeMapComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
if (this.autoCreate) {
this.createComponent();
}
};
;
/**
* @param {?} changes
* @return {?}
*/
jqxTreeMapComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (this.host) {
for (var i = 0; i < this.properties.length; i++) {
/** @type {?} */
var attrName = 'attr' + this.properties[i].substring(0, 1).toUpperCase() + this.properties[i].substring(1);
/** @type {?} */
var areEqual = false;
if (this[attrName] !== undefined) {
if (typeof this[attrName] === 'object') {
if (this[attrName] instanceof Array) {
areEqual = this.arraysEqual(this[attrName], this.host.jqxTreeMap(this.properties[i]));
}
if (areEqual) {
return false;
}
this.host.jqxTreeMap(this.properties[i], this[attrName]);
continue;
}
if (this[attrName] !== this.host.jqxTreeMap(this.properties[i])) {
this.host.jqxTreeMap(this.properties[i], this[attrName]);
}
}
}
}
};
/**
* @param {?} attrValue
* @param {?} hostValue
* @return {?}
*/
jqxTreeMapComponent.prototype.arraysEqual = /**
* @param {?} attrValue
* @param {?} hostValue
* @return {?}
*/
function (attrValue, hostValue) {
if ((attrValue && !hostValue) || (!attrValue && hostValue)) {
return false;
}
if (attrValue.length != hostValue.length) {
return false;
}
for (var i = 0; i < attrValue.length; i++) {
if (attrValue[i] !== hostValue[i]) {
return false;
}
}
return true;
};
/**
* @return {?}
*/
jqxTreeMapComponent.prototype.manageAttributes = /**
* @return {?}
*/
function () {
/** @type {?} */
var options = {};
for (var i = 0; i < this.properties.length; i++) {
/** @type {?} */
var attrName = 'attr' + this.properties[i].substring(0, 1).toUpperCase() + this.properties[i].substring(1);
if (this[attrName] !== undefined) {
options[this.properties[i]] = this[attrName];
}
}
return options;
};
/**
* @param {?} parentEl
* @param {?} childEl
* @return {?}
*/
jqxTreeMapComponent.prototype.moveClasses = /**
* @param {?} parentEl
* @param {?} childEl
* @return {?}
*/
function (parentEl, childEl) {
var _a;
/** @type {?} */
var classes = parentEl.classList;
if (classes.length > 0) {
(_a = childEl.classList).add.apply(_a, tslib_1.__spread(classes));
}
parentEl.className = '';
};
/**
* @param {?} parentEl
* @param {?} childEl
* @return {?}
*/
jqxTreeMapComponent.prototype.moveStyles = /**
* @param {?} parentEl
* @param {?} childEl
* @return {?}
*/
function (parentEl, childEl) {
/** @type {?} */
var style = parentEl.style.cssText;
childEl.style.cssText = style;
parentEl.style.cssText = '';
};
/**
* @param {?=} options
* @return {?}
*/
jqxTreeMapComponent.prototype.createComponent = /**
* @param {?=} options
* @return {?}
*/
function (options) {
if (this.host) {
return;
}
if (options) {
JQXLite.extend(options, this.manageAttributes());
}
else {
options = this.manageAttributes();
}
this.host = JQXLite(this.elementRef.nativeElement.firstChild);
this.moveClasses(this.elementRef.nativeElement, this.host[0]);
this.moveStyles(this.elementRef.nativeElement, this.host[0]);
this.host[0].style.marginLeft = '1px';
this.__wireEvents__();
this.widgetObject = jqwidgets.createInstance(this.host, 'jqxTreeMap', options);
};
/**
* @param {?=} options
* @return {?}
*/
jqxTreeMapComponent.prototype.createWidget = /**
* @param {?=} options
* @return {?}
*/
function (options) {
this.createComponent(options);
};
/**
* @return {?}
*/
jqxTreeMapComponent.prototype.__updateRect__ = /**
* @return {?}
*/
function () {
if (this.host)
this.host.css({ width: this.attrWidth, height: this.attrHeight });
};
/**
* @param {?} options
* @return {?}
*/
jqxTreeMapComponent.prototype.setOptions = /**
* @param {?} options
* @return {?}
*/
function (options) {
this.host.jqxTreeMap('setOptions', options);
};
// jqxTreeMapComponent properties
// jqxTreeMapComponent properties
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.baseColor =
// jqxTreeMapComponent properties
/**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('baseColor', arg);
}
else {
return this.host.jqxTreeMap('baseColor');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.colorRanges = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('colorRanges', arg);
}
else {
return this.host.jqxTreeMap('colorRanges');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.colorRange = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('colorRange', arg);
}
else {
return this.host.jqxTreeMap('colorRange');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.colorMode = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('colorMode', arg);
}
else {
return this.host.jqxTreeMap('colorMode');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.displayMember = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('displayMember', arg);
}
else {
return this.host.jqxTreeMap('displayMember');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.height = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('height', arg);
}
else {
return this.host.jqxTreeMap('height');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.hoverEnabled = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('hoverEnabled', arg);
}
else {
return this.host.jqxTreeMap('hoverEnabled');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.headerHeight = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('headerHeight', arg);
}
else {
return this.host.jqxTreeMap('headerHeight');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.legendLabel = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('legendLabel', arg);
}
else {
return this.host.jqxTreeMap('legendLabel');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.legendPosition = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('legendPosition', arg);
}
else {
return this.host.jqxTreeMap('legendPosition');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.legendScaleCallback = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('legendScaleCallback', arg);
}
else {
return this.host.jqxTreeMap('legendScaleCallback');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.renderCallbacks = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('renderCallbacks', arg);
}
else {
return this.host.jqxTreeMap('renderCallbacks');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.selectionEnabled = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('selectionEnabled', arg);
}
else {
return this.host.jqxTreeMap('selectionEnabled');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.showLegend = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('showLegend', arg);
}
else {
return this.host.jqxTreeMap('showLegend');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.source = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('source', arg);
}
else {
return this.host.jqxTreeMap('source');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.theme = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('theme', arg);
}
else {
return this.host.jqxTreeMap('theme');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.valueMember = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('valueMember', arg);
}
else {
return this.host.jqxTreeMap('valueMember');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxTreeMapComponent.prototype.width = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxTreeMap('width', arg);
}
else {
return this.host.jqxTreeMap('width');
}
};
// jqxTreeMapComponent functions
// jqxTreeMapComponent functions
/**
* @return {?}
*/
jqxTreeMapComponent.prototype.destroy =
// jqxTreeMapComponent functions
/**
* @return {?}
*/
function () {
this.host.jqxTreeMap('destroy');
};
/**
* @return {?}
*/
jqxTreeMapComponent.prototype.render = /**
* @return {?}
*/
function () {
this.host.jqxTreeMap('render');
};
/**
* @return {?}
*/
jqxTreeMapComponent.prototype.__wireEvents__ = /**
* @return {?}
*/
function () {
var _this = this;
this.host.on('bindingComplete', function (eventData) { _this.onBindingComplete.emit(eventData); });
};
jqxTreeMapComponent.decorators = [
{ type: Component, args: [{
selector: 'jqxTreeMap',
template: '<div><ng-content></ng-content></div>'
}] }
];
/** @nocollapse */
jqxTreeMapComponent.ctorParameters = function () { return [
{ type: ElementRef }
]; };
jqxTreeMapComponent.propDecorators = {
attrBaseColor: [{ type: Input, args: ['baseColor',] }],
attrColorRanges: [{ type: Input, args: ['colorRanges',] }],
attrColorRange: [{ type: Input, args: ['colorRange',] }],
attrColorMode: [{ type: Input, args: ['colorMode',] }],
attrDisplayMember: [{ type: Input, args: ['displayMember',] }],
attrHoverEnabled: [{ type: Input, args: ['hoverEnabled',] }],
attrHeaderHeight: [{ type: Input, args: ['headerHeight',] }],
attrLegendLabel: [{ type: Input, args: ['legendLabel',] }],
attrLegendPosition: [{ type: Input, args: ['legendPosition',] }],
attrLegendScaleCallback: [{ type: Input, args: ['legendScaleCallback',] }],
attrRenderCallbacks: [{ type: Input, args: ['renderCallbacks',] }],
attrSelectionEnabled: [{ type: Input, args: ['selectionEnabled',] }],
attrShowLegend: [{ type: Input, args: ['showLegend',] }],
attrSource: [{ type: Input, args: ['source',] }],
attrTheme: [{ type: Input, args: ['theme',] }],
attrValueMember: [{ type: Input, args: ['valueMember',] }],
attrWidth: [{ type: Input, args: ['width',] }],
attrHeight: [{ type: Input, args: ['height',] }],
autoCreate: [{ type: Input, args: ['auto-create',] }],
onBindingComplete: [{ type: Output }]
};
return jqxTreeMapComponent;
}()); //jqxTreeMapComponent
export { jqxTreeMapComponent };
if (false) {
/** @type {?} */
jqxTreeMapComponent.prototype.attrBaseColor;
/** @type {?} */
jqxTreeMapComponent.prototype.attrColorRanges;
/** @type {?} */
jqxTreeMapComponent.prototype.attrColorRange;
/** @type {?} */
jqxTreeMapComponent.prototype.attrColorMode;
/** @type {?} */
jqxTreeMapComponent.prototype.attrDisplayMember;
/** @type {?} */
jqxTreeMapComponent.prototype.attrHoverEnabled;
/** @type {?} */
jqxTreeMapComponent.prototype.attrHeaderHeight;
/** @type {?} */
jqxTreeMapComponent.prototype.attrLegendLabel;
/** @type {?} */
jqxTreeMapComponent.prototype.attrLegendPosition;
/** @type {?} */
jqxTreeMapComponent.prototype.attrLegendScaleCallback;
/** @type {?} */
jqxTreeMapComponent.prototype.attrRenderCallbacks;
/** @type {?} */
jqxTreeMapComponent.prototype.attrSelectionEnabled;
/** @type {?} */
jqxTreeMapComponent.prototype.attrShowLegend;
/** @type {?} */
jqxTreeMapComponent.prototype.attrSource;
/** @type {?} */
jqxTreeMapComponent.prototype.attrTheme;
/** @type {?} */
jqxTreeMapComponent.prototype.attrValueMember;
/** @type {?} */
jqxTreeMapComponent.prototype.attrWidth;
/** @type {?} */
jqxTreeMapComponent.prototype.attrHeight;
/** @type {?} */
jqxTreeMapComponent.prototype.autoCreate;
/** @type {?} */
jqxTreeMapComponent.prototype.properties;
/** @type {?} */
jqxTreeMapComponent.prototype.host;
/** @type {?} */
jqxTreeMapComponent.prototype.elementRef;
/** @type {?} */
jqxTreeMapComponent.prototype.widgetObject;
/** @type {?} */
jqxTreeMapComponent.prototype.onBindingComplete;
/* Skipping unhandled member: ;*/
}