UNPKG

jqwidgets-scripts-custom

Version:

jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.

478 lines (477 loc) 13.9 kB
import * as jqxcore from '../../jqwidgets/jqxcore'; import * as jqxbuttons from '../../jqwidgets/jqxbuttons'; import * as jqxribbon from '../../jqwidgets/jqxribbon'; import * as jqxmenu from '../../jqwidgets/jqxmenu'; import * as jqxlayout from '../../jqwidgets/jqxlayout'; /** * @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 jqxLayoutComponent = /** @class */ (function () { function jqxLayoutComponent(containerElement) { this.autoCreate = true; this.properties = ['contextMenu', 'height', 'layout', 'minGroupHeight', 'minGroupWidth', 'resizable', 'rtl', 'theme', 'width']; // jqxLayoutComponent events this.onPin = new EventEmitter(); this.onResize = new EventEmitter(); this.onUnpin = new EventEmitter(); this.elementRef = containerElement; } /** * @return {?} */ jqxLayoutComponent.prototype.ngOnInit = /** * @return {?} */ function () { if (this.autoCreate) { this.createComponent(); } }; ; /** * @param {?} changes * @return {?} */ jqxLayoutComponent.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.jqxLayout(this.properties[i])); } if (areEqual) { return false; } this.host.jqxLayout(this.properties[i], this[attrName]); continue; } if (this[attrName] !== this.host.jqxLayout(this.properties[i])) { this.host.jqxLayout(this.properties[i], this[attrName]); } } } } }; /** * @param {?} attrValue * @param {?} hostValue * @return {?} */ jqxLayoutComponent.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 {?} */ jqxLayoutComponent.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 {?} */ jqxLayoutComponent.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 {?} */ jqxLayoutComponent.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 {?} */ jqxLayoutComponent.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, 'jqxLayout', options); }; /** * @param {?=} options * @return {?} */ jqxLayoutComponent.prototype.createWidget = /** * @param {?=} options * @return {?} */ function (options) { this.createComponent(options); }; /** * @return {?} */ jqxLayoutComponent.prototype.__updateRect__ = /** * @return {?} */ function () { if (this.host) this.host.css({ width: this.attrWidth, height: this.attrHeight }); }; /** * @param {?} options * @return {?} */ jqxLayoutComponent.prototype.setOptions = /** * @param {?} options * @return {?} */ function (options) { this.host.jqxLayout('setOptions', options); }; // jqxLayoutComponent properties // jqxLayoutComponent properties /** * @param {?=} arg * @return {?} */ jqxLayoutComponent.prototype.contextMenu = // jqxLayoutComponent properties /** * @param {?=} arg * @return {?} */ function (arg) { if (arg !== undefined) { this.host.jqxLayout('contextMenu', arg); } else { return this.host.jqxLayout('contextMenu'); } }; /** * @param {?=} arg * @return {?} */ jqxLayoutComponent.prototype.height = /** * @param {?=} arg * @return {?} */ function (arg) { if (arg !== undefined) { this.host.jqxLayout('height', arg); } else { return this.host.jqxLayout('height'); } }; /** * @param {?=} arg * @return {?} */ jqxLayoutComponent.prototype.layout = /** * @param {?=} arg * @return {?} */ function (arg) { if (arg !== undefined) { this.host.jqxLayout('layout', arg); } else { return this.host.jqxLayout('layout'); } }; /** * @param {?=} arg * @return {?} */ jqxLayoutComponent.prototype.minGroupHeight = /** * @param {?=} arg * @return {?} */ function (arg) { if (arg !== undefined) { this.host.jqxLayout('minGroupHeight', arg); } else { return this.host.jqxLayout('minGroupHeight'); } }; /** * @param {?=} arg * @return {?} */ jqxLayoutComponent.prototype.minGroupWidth = /** * @param {?=} arg * @return {?} */ function (arg) { if (arg !== undefined) { this.host.jqxLayout('minGroupWidth', arg); } else { return this.host.jqxLayout('minGroupWidth'); } }; /** * @param {?=} arg * @return {?} */ jqxLayoutComponent.prototype.resizable = /** * @param {?=} arg * @return {?} */ function (arg) { if (arg !== undefined) { this.host.jqxLayout('resizable', arg); } else { return this.host.jqxLayout('resizable'); } }; /** * @param {?=} arg * @return {?} */ jqxLayoutComponent.prototype.rtl = /** * @param {?=} arg * @return {?} */ function (arg) { if (arg !== undefined) { this.host.jqxLayout('rtl', arg); } else { return this.host.jqxLayout('rtl'); } }; /** * @param {?=} arg * @return {?} */ jqxLayoutComponent.prototype.theme = /** * @param {?=} arg * @return {?} */ function (arg) { if (arg !== undefined) { this.host.jqxLayout('theme', arg); } else { return this.host.jqxLayout('theme'); } }; /** * @param {?=} arg * @return {?} */ jqxLayoutComponent.prototype.width = /** * @param {?=} arg * @return {?} */ function (arg) { if (arg !== undefined) { this.host.jqxLayout('width', arg); } else { return this.host.jqxLayout('width'); } }; // jqxLayoutComponent functions // jqxLayoutComponent functions /** * @return {?} */ jqxLayoutComponent.prototype.destroy = // jqxLayoutComponent functions /** * @return {?} */ function () { this.host.jqxLayout('destroy'); }; /** * @param {?} Layout * @return {?} */ jqxLayoutComponent.prototype.loadLayout = /** * @param {?} Layout * @return {?} */ function (Layout) { this.host.jqxLayout('loadLayout', Layout); }; /** * @return {?} */ jqxLayoutComponent.prototype.refresh = /** * @return {?} */ function () { this.host.jqxLayout('refresh'); }; /** * @return {?} */ jqxLayoutComponent.prototype.render = /** * @return {?} */ function () { this.host.jqxLayout('render'); }; /** * @return {?} */ jqxLayoutComponent.prototype.saveLayout = /** * @return {?} */ function () { return this.host.jqxLayout('saveLayout'); }; /** * @return {?} */ jqxLayoutComponent.prototype.__wireEvents__ = /** * @return {?} */ function () { var _this = this; this.host.on('pin', function (eventData) { _this.onPin.emit(eventData); }); this.host.on('resize', function (eventData) { _this.onResize.emit(eventData); }); this.host.on('unpin', function (eventData) { _this.onUnpin.emit(eventData); }); }; jqxLayoutComponent.decorators = [ { type: Component, args: [{ selector: 'jqxLayout', template: '<div><ng-content></ng-content></div>' }] } ]; /** @nocollapse */ jqxLayoutComponent.ctorParameters = function () { return [ { type: ElementRef } ]; }; jqxLayoutComponent.propDecorators = { attrContextMenu: [{ type: Input, args: ['contextMenu',] }], attrLayout: [{ type: Input, args: ['layout',] }], attrMinGroupHeight: [{ type: Input, args: ['minGroupHeight',] }], attrMinGroupWidth: [{ type: Input, args: ['minGroupWidth',] }], attrResizable: [{ type: Input, args: ['resizable',] }], attrRtl: [{ type: Input, args: ['rtl',] }], attrTheme: [{ type: Input, args: ['theme',] }], attrWidth: [{ type: Input, args: ['width',] }], attrHeight: [{ type: Input, args: ['height',] }], autoCreate: [{ type: Input, args: ['auto-create',] }], onPin: [{ type: Output }], onResize: [{ type: Output }], onUnpin: [{ type: Output }] }; return jqxLayoutComponent; }()); //jqxLayoutComponent export { jqxLayoutComponent }; if (false) { /** @type {?} */ jqxLayoutComponent.prototype.attrContextMenu; /** @type {?} */ jqxLayoutComponent.prototype.attrLayout; /** @type {?} */ jqxLayoutComponent.prototype.attrMinGroupHeight; /** @type {?} */ jqxLayoutComponent.prototype.attrMinGroupWidth; /** @type {?} */ jqxLayoutComponent.prototype.attrResizable; /** @type {?} */ jqxLayoutComponent.prototype.attrRtl; /** @type {?} */ jqxLayoutComponent.prototype.attrTheme; /** @type {?} */ jqxLayoutComponent.prototype.attrWidth; /** @type {?} */ jqxLayoutComponent.prototype.attrHeight; /** @type {?} */ jqxLayoutComponent.prototype.autoCreate; /** @type {?} */ jqxLayoutComponent.prototype.properties; /** @type {?} */ jqxLayoutComponent.prototype.host; /** @type {?} */ jqxLayoutComponent.prototype.elementRef; /** @type {?} */ jqxLayoutComponent.prototype.widgetObject; /** @type {?} */ jqxLayoutComponent.prototype.onPin; /** @type {?} */ jqxLayoutComponent.prototype.onResize; /** @type {?} */ jqxLayoutComponent.prototype.onUnpin; /* Skipping unhandled member: ;*/ }