UNPKG

ngx-schema-forms

Version:

New features: - Ajv schema validator. - Angular forms compatible: Property tree is created using FormGroup, FormArray and FormControl classes. - Array now properly loads initial data from model. - WidgetTyep: WidgetRegistry now supports WidgetType, now wo

54 lines (53 loc) 3.28 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ import * as tslib_1 from "tslib"; import { Component, ElementRef, Input } from '@angular/core'; import { TemplateSchemaElement } from '../../template-schema-element'; var ItemComponent = /** @class */ (function (_super) { tslib_1.__extends(ItemComponent, _super); function ItemComponent(elementRef) { var _this = _super.call(this) || this; _this.elementRef = elementRef; return _this; } /** * @return {?} */ ItemComponent.prototype.ngOnInit = /** * @return {?} */ function () { // TODO use title instead //this.description = this.getTextContent(this.elementRef); this.description = this.label; }; ItemComponent.decorators = [ { type: Component, args: [{ selector: 'sf-item', template: "<ng-content></ng-content>\n" }] } ]; /** @nocollapse */ ItemComponent.ctorParameters = function () { return [ { type: ElementRef } ]; }; ItemComponent.propDecorators = { value: [{ type: Input }], label: [{ type: Input }] }; return ItemComponent; }(TemplateSchemaElement)); export { ItemComponent }; if (false) { /** @type {?} */ ItemComponent.prototype.value; /** @type {?} */ ItemComponent.prototype.label; /** @type {?} */ ItemComponent.prototype.description; /** @type {?} */ ItemComponent.prototype.elementRef; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXRlbS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtc2NoZW1hLWZvcm1zLyIsInNvdXJjZXMiOlsibGliL3RlbXBsYXRlLXNjaGVtYS9maWVsZC9pdGVtL2l0ZW0uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUNOLFNBQVMsRUFDVCxVQUFVLEVBQ1YsS0FBSyxFQUdMLE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSxxQkFBcUI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