jqwidgets-scripts-custom
Version:
jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.
332 lines (331 loc) • 10 kB
JavaScript
import * as jqxcore from '../../jqwidgets/jqxcore';
import * as jqxdockpanel from '../../jqwidgets/jqxdockpanel';
/**
* @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 jqxDockPanelComponent = /** @class */ (function () {
function jqxDockPanelComponent(containerElement) {
this.autoCreate = true;
this.properties = ['disabled', 'height', 'lastchildfill', 'width'];
// jqxDockPanelComponent events
this.onLayout = new EventEmitter();
this.elementRef = containerElement;
}
/**
* @return {?}
*/
jqxDockPanelComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
if (this.autoCreate) {
this.createComponent();
}
};
;
/**
* @param {?} changes
* @return {?}
*/
jqxDockPanelComponent.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.jqxDockPanel(this.properties[i]));
}
if (areEqual) {
return false;
}
this.host.jqxDockPanel(this.properties[i], this[attrName]);
continue;
}
if (this[attrName] !== this.host.jqxDockPanel(this.properties[i])) {
this.host.jqxDockPanel(this.properties[i], this[attrName]);
}
}
}
}
};
/**
* @param {?} attrValue
* @param {?} hostValue
* @return {?}
*/
jqxDockPanelComponent.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 {?}
*/
jqxDockPanelComponent.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 {?}
*/
jqxDockPanelComponent.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 {?}
*/
jqxDockPanelComponent.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 {?}
*/
jqxDockPanelComponent.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.__wireEvents__();
this.widgetObject = jqwidgets.createInstance(this.host, 'jqxDockPanel', options);
};
/**
* @param {?=} options
* @return {?}
*/
jqxDockPanelComponent.prototype.createWidget = /**
* @param {?=} options
* @return {?}
*/
function (options) {
this.createComponent(options);
};
/**
* @return {?}
*/
jqxDockPanelComponent.prototype.__updateRect__ = /**
* @return {?}
*/
function () {
if (this.host)
this.host.css({ width: this.attrWidth, height: this.attrHeight });
};
/**
* @param {?} options
* @return {?}
*/
jqxDockPanelComponent.prototype.setOptions = /**
* @param {?} options
* @return {?}
*/
function (options) {
this.host.jqxDockPanel('setOptions', options);
};
// jqxDockPanelComponent properties
// jqxDockPanelComponent properties
/**
* @param {?=} arg
* @return {?}
*/
jqxDockPanelComponent.prototype.disabled =
// jqxDockPanelComponent properties
/**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxDockPanel('disabled', arg);
}
else {
return this.host.jqxDockPanel('disabled');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxDockPanelComponent.prototype.height = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxDockPanel('height', arg);
}
else {
return this.host.jqxDockPanel('height');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxDockPanelComponent.prototype.lastchildfill = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxDockPanel('lastchildfill', arg);
}
else {
return this.host.jqxDockPanel('lastchildfill');
}
};
/**
* @param {?=} arg
* @return {?}
*/
jqxDockPanelComponent.prototype.width = /**
* @param {?=} arg
* @return {?}
*/
function (arg) {
if (arg !== undefined) {
this.host.jqxDockPanel('width', arg);
}
else {
return this.host.jqxDockPanel('width');
}
};
// jqxDockPanelComponent functions
// jqxDockPanelComponent functions
/**
* @return {?}
*/
jqxDockPanelComponent.prototype.refresh =
// jqxDockPanelComponent functions
/**
* @return {?}
*/
function () {
this.host.jqxDockPanel('refresh');
};
/**
* @return {?}
*/
jqxDockPanelComponent.prototype.__wireEvents__ = /**
* @return {?}
*/
function () {
var _this = this;
this.host.on('layout', function (eventData) { _this.onLayout.emit(eventData); });
};
jqxDockPanelComponent.decorators = [
{ type: Component, args: [{
selector: 'jqxDockPanel',
template: '<div><ng-content></ng-content></div>'
}] }
];
/** @nocollapse */
jqxDockPanelComponent.ctorParameters = function () { return [
{ type: ElementRef }
]; };
jqxDockPanelComponent.propDecorators = {
attrDisabled: [{ type: Input, args: ['disabled',] }],
attrLastchildfill: [{ type: Input, args: ['lastchildfill',] }],
attrWidth: [{ type: Input, args: ['width',] }],
attrHeight: [{ type: Input, args: ['height',] }],
autoCreate: [{ type: Input, args: ['auto-create',] }],
onLayout: [{ type: Output }]
};
return jqxDockPanelComponent;
}()); //jqxDockPanelComponent
export { jqxDockPanelComponent };
if (false) {
/** @type {?} */
jqxDockPanelComponent.prototype.attrDisabled;
/** @type {?} */
jqxDockPanelComponent.prototype.attrLastchildfill;
/** @type {?} */
jqxDockPanelComponent.prototype.attrWidth;
/** @type {?} */
jqxDockPanelComponent.prototype.attrHeight;
/** @type {?} */
jqxDockPanelComponent.prototype.autoCreate;
/** @type {?} */
jqxDockPanelComponent.prototype.properties;
/** @type {?} */
jqxDockPanelComponent.prototype.host;
/** @type {?} */
jqxDockPanelComponent.prototype.elementRef;
/** @type {?} */
jqxDockPanelComponent.prototype.widgetObject;
/** @type {?} */
jqxDockPanelComponent.prototype.onLayout;
/* Skipping unhandled member: ;*/
}