angular-wrapper-kendo-ui
Version:
A simple library to wrapper Telerik Kendo UI jQuery controls in Angular 6 components.
280 lines (274 loc) • 7.99 kB
JavaScript
import { Component, ViewEncapsulation, ChangeDetectionStrategy, NgZone, ElementRef, Input, ViewChild, NgModule } from '@angular/core';
import '@progress/kendo-ui';
import 'jquery';
/**
* @fileoverview added by tsickle
* Generated from: lib/tree-list.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var TreeListComponent = /** @class */ (function () {
function TreeListComponent(zone, elementRef) {
this.zone = zone;
this.elementRef = elementRef;
}
/**
* @return {?}
*/
TreeListComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () { };
/**
* @return {?}
*/
TreeListComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var treeList = kendo.jQuery(this.treelistEl.nativeElement);
this.zone.runOutsideAngular((/**
* @return {?}
*/
function () {
_this._treelist = treeList
.kendoTreeList(_this.options)
.data('kendoTreeList');
}));
};
/**
* @return {?}
*/
TreeListComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
kendo.destroy(this.elementRef.nativeElement);
};
Object.defineProperty(TreeListComponent.prototype, "dataSource", {
get: /**
* @return {?}
*/
function () {
return this._treelist && this._treelist.dataSource;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TreeListComponent.prototype, "content", {
get: /**
* @return {?}
*/
function () {
return this._treelist && this._treelist.content;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TreeListComponent.prototype, "thead", {
get: /**
* @return {?}
*/
function () {
return this._treelist && this._treelist.thead;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TreeListComponent.prototype, "tbody", {
get: /**
* @return {?}
*/
function () {
return this._treelist && this._treelist.tbody;
},
enumerable: true,
configurable: true
});
/**
* @param {?=} parentRow
* @return {?}
*/
TreeListComponent.prototype.addRow = /**
* @param {?=} parentRow
* @return {?}
*/
function (parentRow) {
if (parentRow === void 0) { parentRow = ''; }
return this._treelist && this._treelist.addRow(parentRow);
};
/**
* @param {?} row
* @return {?}
*/
TreeListComponent.prototype.editRow = /**
* @param {?} row
* @return {?}
*/
function (row) {
if (!row) {
return;
}
/** @type {?} */
var internalRow = row instanceof jQuery ? row : kendo.jQuery(row);
return this._treelist && this._treelist.editRow(internalRow);
};
/**
* @param {?} row
* @return {?}
*/
TreeListComponent.prototype.removeRow = /**
* @param {?} row
* @return {?}
*/
function (row) {
if (!row) {
return;
}
/** @type {?} */
var internalRow = row instanceof jQuery ? row : kendo.jQuery(row);
return this._treelist && this._treelist.removeRow(internalRow);
};
/**
* @param {?} row
* @return {?}
*/
TreeListComponent.prototype.expand = /**
* @param {?} row
* @return {?}
*/
function (row) {
if (!row) {
return;
}
/** @type {?} */
var internalRow = row instanceof jQuery ? row : kendo.jQuery(row);
return this._treelist && this._treelist.expand(internalRow);
};
/**
* @param {?} row
* @return {?}
*/
TreeListComponent.prototype.select = /**
* @param {?} row
* @return {?}
*/
function (row) {
if (!row) {
return;
}
/** @type {?} */
var internalRow = row instanceof jQuery ? row : kendo.jQuery(row);
return this._treelist && this._treelist.select(internalRow);
};
/**
* @param {?} model
* @return {?}
*/
TreeListComponent.prototype.itemFor = /**
* @param {?} model
* @return {?}
*/
function (model) {
if (!model) {
return;
}
return this._treelist && this._treelist.itemFor(model);
};
/**
* @param {?} row
* @return {?}
*/
TreeListComponent.prototype.dataItem = /**
* @param {?} row
* @return {?}
*/
function (row) {
if (!row) {
return;
}
/** @type {?} */
var internalRow = row instanceof jQuery ? row : kendo.jQuery(row);
return this._treelist && this._treelist.dataItem(internalRow);
};
/**
* @return {?}
*/
TreeListComponent.prototype.clearSelection = /**
* @return {?}
*/
function () {
return this._treelist && this._treelist.clearSelection();
};
TreeListComponent.decorators = [
{ type: Component, args: [{
// tslint:disable-next-line:component-selector
selector: 'ng-treelist',
template: "<div id=\"treelist\" #treelist></div>",
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
styles: [""]
}] }
];
/** @nocollapse */
TreeListComponent.ctorParameters = function () { return [
{ type: NgZone },
{ type: ElementRef }
]; };
TreeListComponent.propDecorators = {
options: [{ type: Input }],
treelistEl: [{ type: ViewChild, args: ['treelist', { static: false },] }]
};
return TreeListComponent;
}());
if (false) {
/** @type {?} */
TreeListComponent.prototype.options;
/** @type {?} */
TreeListComponent.prototype.treelistEl;
/**
* @type {?}
* @private
*/
TreeListComponent.prototype._treelist;
/**
* @type {?}
* @private
*/
TreeListComponent.prototype.zone;
/**
* @type {?}
* @private
*/
TreeListComponent.prototype.elementRef;
}
/**
* @fileoverview added by tsickle
* Generated from: lib/angular-wrapper-kendo-ui.module.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var AngularWrapperKendoUiModule = /** @class */ (function () {
function AngularWrapperKendoUiModule() {
}
AngularWrapperKendoUiModule.decorators = [
{ type: NgModule, args: [{
imports: [],
declarations: [TreeListComponent],
exports: [TreeListComponent]
},] }
];
return AngularWrapperKendoUiModule;
}());
/**
* @fileoverview added by tsickle
* Generated from: public_api.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* Generated from: angular-wrapper-kendo-ui.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
export { AngularWrapperKendoUiModule, TreeListComponent };
//# sourceMappingURL=angular-wrapper-kendo-ui.js.map