naveenkunchala-test-package
Version:
This is Naveen Test Library
151 lines (141 loc) • 9.25 kB
JavaScript
import * as i0 from '@angular/core';
import { Injectable, Component, EventEmitter, Input, Output, NgModule } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i2 from '@angular/forms';
import { FormsModule } from '@angular/forms';
class UiComponentsService {
constructor() { }
}
UiComponentsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UiComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
UiComponentsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UiComponentsService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UiComponentsService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: function () { return []; } });
class UiComponentsComponent {
constructor() { }
ngOnInit() {
}
}
UiComponentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UiComponentsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
UiComponentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: UiComponentsComponent, selector: "lib-ui-components", ngImport: i0, template: `
<p>
ui-components works!
</p>
`, isInline: true });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UiComponentsComponent, decorators: [{
type: Component,
args: [{
selector: 'lib-ui-components',
template: `
<p>
ui-components works!
</p>
`,
styles: []
}]
}], ctorParameters: function () { return []; } });
class LoaderComponent {
constructor() { }
ngOnInit() {
}
}
LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
LoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: LoaderComponent, selector: "lib-loader", ngImport: i0, template: "<div class=\"load\">\n <div class=\"loader\">Loading...</div>\n</div>", styles: [".load{background:rgba(0,0,0,.7);position:fixed;inset:0;display:flex;z-index:1001}.loader{margin:auto;font-size:.3rem;width:.5rem;height:.5rem;border-radius:50%;position:relative;text-indent:-9999em;animation:load5 1.1s infinite ease;transform:translateZ(0)}\n"] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: LoaderComponent, decorators: [{
type: Component,
args: [{ selector: 'lib-loader', template: "<div class=\"load\">\n <div class=\"loader\">Loading...</div>\n</div>", styles: [".load{background:rgba(0,0,0,.7);position:fixed;inset:0;display:flex;z-index:1001}.loader{margin:auto;font-size:.3rem;width:.5rem;height:.5rem;border-radius:50%;position:relative;text-indent:-9999em;animation:load5 1.1s infinite ease;transform:translateZ(0)}\n"] }]
}], ctorParameters: function () { return []; } });
class TextFieldModel {
constructor(textFieldHeaderName, textFieldTag = 0, is_mandatory = false) {
this.textFieldTag = 0;
this.isMandatory = false;
this.textFiledDisabled = false;
this.textFieldHeaderName = textFieldHeaderName;
this.textFieldTag = textFieldTag;
this.isMandatory = is_mandatory;
}
setTextFieldHeaderName(header_name) {
this.textFieldHeaderName = header_name;
}
setTextFieldSelectedVal(val) {
this.textFieldSelectedVal = val;
}
setTextFieldFormPostKey(is_form_post_key) {
this.textFieldFormPostKey = is_form_post_key;
}
setIsMandatory(is_mandatory) {
this.isMandatory = is_mandatory;
}
setTextFiledDisable(flag) {
this.textFiledDisabled = flag;
}
setPattern(pattern, minl, maxl) {
this.minLength = minl;
this.maxLength = maxl;
this.pattern = pattern;
}
}
class TextfieldComponent {
constructor() {
this.text_field_model = TextFieldModel;
this.eventHandlerEmitter = new EventEmitter();
}
ngOnInit() {
}
onChangeEvent(e) {
this.eventHandlerEmitter.emit(this.text_field_model);
}
checkTextFieldObj() {
var txtObj = this.text_field_model || {};
if (Object.keys(txtObj).length > 0) {
return true;
}
return false;
}
}
TextfieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TextfieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
TextfieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: TextfieldComponent, selector: "lib-textfield", inputs: { text_field_model: "text_field_model" }, outputs: { eventHandlerEmitter: "eventHandlerEmitter" }, ngImport: i0, template: "<div class=\"form-group text-left\" *ngIf=\"checkTextFieldObj()\">\n <label for=\"{{text_field_model.textFieldHeaderName}}\" [class.mb-2]=\"text_field_model.textFieldHeaderName.length > 0\">\n <span *ngIf=\"text_field_model.isMandatory\" class=\"mandatory\">*</span>\n {{text_field_model.textFieldHeaderName}}\n </label>\n <input [disabled]=\"text_field_model.textFiledDisabled\" type=\"text\" name=\"tf_{{text_field_model.textFieldTag}}\" (change)=\"onChangeEvent($event)\" [(ngModel)]=\"text_field_model.textFieldSelectedVal\" class=\"form-control\"/>\n</div>", styles: [""], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TextfieldComponent, decorators: [{
type: Component,
args: [{ selector: 'lib-textfield', template: "<div class=\"form-group text-left\" *ngIf=\"checkTextFieldObj()\">\n <label for=\"{{text_field_model.textFieldHeaderName}}\" [class.mb-2]=\"text_field_model.textFieldHeaderName.length > 0\">\n <span *ngIf=\"text_field_model.isMandatory\" class=\"mandatory\">*</span>\n {{text_field_model.textFieldHeaderName}}\n </label>\n <input [disabled]=\"text_field_model.textFiledDisabled\" type=\"text\" name=\"tf_{{text_field_model.textFieldTag}}\" (change)=\"onChangeEvent($event)\" [(ngModel)]=\"text_field_model.textFieldSelectedVal\" class=\"form-control\"/>\n</div>", styles: [""] }]
}], ctorParameters: function () { return []; }, propDecorators: { text_field_model: [{
type: Input,
args: ['text_field_model']
}], eventHandlerEmitter: [{
type: Output
}] } });
class UiComponentsModule {
}
UiComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UiComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
UiComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UiComponentsModule, declarations: [UiComponentsComponent,
LoaderComponent,
TextfieldComponent], imports: [CommonModule, FormsModule], exports: [UiComponentsComponent, LoaderComponent, TextfieldComponent] });
UiComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UiComponentsModule, imports: [[CommonModule, FormsModule,
]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: UiComponentsModule, decorators: [{
type: NgModule,
args: [{
declarations: [
UiComponentsComponent,
LoaderComponent,
TextfieldComponent
],
imports: [CommonModule, FormsModule,
],
exports: [
UiComponentsComponent, LoaderComponent, TextfieldComponent,
]
}]
}] });
/*
* Public API Surface of ui-components
*/
/**
* Generated bundle index. Do not edit.
*/
export { LoaderComponent, TextfieldComponent, UiComponentsComponent, UiComponentsModule, UiComponentsService };
//# sourceMappingURL=ui-components.mjs.map