-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsmart.listitemsgroup.js
74 lines (74 loc) · 8.78 KB
/
smart.listitemsgroup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import * as tslib_1 from "tslib";
import { Component, Directive, AfterViewInit, ElementRef, Input, OnInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
import { BaseElement } from './smart.element';
export { Smart } from './smart.element';
var ListItemsGroupComponent = /** @class */ (function (_super) {
tslib_1.__extends(ListItemsGroupComponent, _super);
function ListItemsGroupComponent(ref) {
var _this = _super.call(this, ref) || this;
_this.eventHandlers = [];
_this.nativeElement = ref.nativeElement;
return _this;
}
/** @description Creates the component on demand.
* @param properties An optional object of properties, which will be added to the template binded ones.
*/
ListItemsGroupComponent.prototype.createComponent = function (properties) {
if (properties === void 0) { properties = {}; }
this.nativeElement = document.createElement('smart-list-items-group');
for (var propertyName in properties) {
this.nativeElement[propertyName] = properties[propertyName];
}
return this.nativeElement;
};
Object.defineProperty(ListItemsGroupComponent.prototype, "label", {
/** @description */
get: function () {
return this.nativeElement ? this.nativeElement.label : undefined;
},
set: function (value) {
this.nativeElement ? this.nativeElement.label = value : undefined;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ListItemsGroupComponent.prototype, "isRendered", {
get: function () {
return this.nativeElement ? this.nativeElement.isRendered : false;
},
enumerable: true,
configurable: true
});
ListItemsGroupComponent.prototype.ngOnInit = function () {
};
ListItemsGroupComponent.prototype.ngAfterViewInit = function () {
var that = this;
that.onCreate.emit(that.nativeElement);
this.nativeElement.classList.add('smart-angular');
this.nativeElement.whenRendered(function () { that.onReady.emit(that.nativeElement); });
};
ListItemsGroupComponent.prototype.ngOnDestroy = function () { };
ListItemsGroupComponent.prototype.ngOnChanges = function (changes) {
if (this.nativeElement && this.nativeElement.isRendered) {
for (var propName in changes) {
if (changes.hasOwnProperty(propName)) {
this.nativeElement[propName] = changes[propName].currentValue;
}
}
}
};
ListItemsGroupComponent.ctorParameters = function () { return [
{ type: ElementRef }
]; };
tslib_1.__decorate([
Input()
], ListItemsGroupComponent.prototype, "label", null);
ListItemsGroupComponent = tslib_1.__decorate([
Directive({
exportAs: 'smart-list-items-group', selector: 'smart-list-items-group, [smart-list-items-group]'
})
], ListItemsGroupComponent);
return ListItemsGroupComponent;
}(BaseElement));
export { ListItemsGroupComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnQubGlzdGl0ZW1zZ3JvdXAuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9zbWFydC13ZWJjb21wb25lbnRzLWFuZ3VsYXIvbXVsdGlsaW5ldGV4dGJveC8iLCJzb3VyY2VzIjpbInNtYXJ0Lmxpc3RpdGVtc2dyb3VwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFNBQVMsRUFBRSxhQUFhLEVBQUUsVUFBVSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsU0FBUyxFQUFFLFNBQVMsRUFBRSxhQUFhLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDcEksT0FBTyxFQUFFLFdBQVcsRUFBUyxNQUFNLGlCQUFpQixDQUFDO0FBRXJELE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQVF4QztJQUE2QyxtREFBVztJQUN2RCxpQ0FBWSxHQUErQjtRQUEzQyxZQUNDLGtCQUFNLEdBQUcsQ0FBQyxTQUVWO1FBRU8sbUJBQWEsR0FBVSxFQUFFLENBQUM7UUFIakMsS0FBSSxDQUFDLGFBQWEsR0FBRyxHQUFHLENBQUMsYUFBK0IsQ0FBQzs7SUFDMUQsQ0FBQztJQUtE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