UNPKG

@tiposaurio/guido-lib

Version:
1,244 lines (1,217 loc) 86 kB
import { Title } from '@angular/platform-browser'; import { filter, map, mergeMap } from 'rxjs/operators'; import { trigger, style, transition, animate, state } from '@angular/animations'; import { __spread } from 'tslib'; import { NgbActiveModal, NgbModal, NgbModalModule, NgbCollapseModule, NgbPopoverModule, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap'; import { CommonModule } from '@angular/common'; import { Injectable, Component, Input, Output, EventEmitter, Directive, ContentChild, ContentChildren, TemplateRef, NgModule, defineInjectable } from '@angular/core'; import { Router, NavigationEnd, ActivatedRoute, RouterModule } from '@angular/router'; /** * @fileoverview added by tsickle * Generated from: lib/guido-lib.service.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var GuidoLibService = /** @class */ (function () { function GuidoLibService() { } GuidoLibService.decorators = [ { type: Injectable, args: [{ providedIn: 'root' },] } ]; /** @nocollapse */ GuidoLibService.ctorParameters = function () { return []; }; /** @nocollapse */ GuidoLibService.ngInjectableDef = defineInjectable({ factory: function GuidoLibService_Factory() { return new GuidoLibService(); }, token: GuidoLibService, providedIn: "root" }); return GuidoLibService; }()); /** * @fileoverview added by tsickle * Generated from: lib/guido-lib.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var GuidoLibComponent = /** @class */ (function () { function GuidoLibComponent() { } /** * @return {?} */ GuidoLibComponent.prototype.ngOnInit = /** * @return {?} */ function () { }; GuidoLibComponent.decorators = [ { type: Component, args: [{ selector: 'lib-guido-lib', template: "\n <p>\n guido-lib works!\n </p>\n " }] } ]; /** @nocollapse */ GuidoLibComponent.ctorParameters = function () { return []; }; return GuidoLibComponent; }()); /** * @fileoverview added by tsickle * Generated from: lib/guido-lib.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ // import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; var GuidoLibModule = /** @class */ (function () { function GuidoLibModule() { } GuidoLibModule.decorators = [ { type: NgModule, args: [{ declarations: [GuidoLibComponent], imports: [ // NgbModule.forRoot() ], exports: [GuidoLibComponent] },] } ]; return GuidoLibModule; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/breadcrumb/breadcrumb.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var BreadcrumbComponent = /** @class */ (function () { function BreadcrumbComponent(router, activatedRoute, titleService) { var _this = this; this.router = router; this.activatedRoute = activatedRoute; this.titleService = titleService; this.breadcrumbEvent = new EventEmitter(); this.router.events .pipe(filter((/** * @param {?} event * @return {?} */ function (event) { return event instanceof NavigationEnd; }))) .pipe(map((/** * @return {?} */ function () { return _this.activatedRoute; }))) .pipe(map((/** * @param {?} route * @return {?} */ function (route) { while (route.firstChild) { route = route.firstChild; } return route; }))) .pipe(filter((/** * @param {?} route * @return {?} */ function (route) { return route.outlet === 'primary'; }))) .pipe(mergeMap((/** * @param {?} route * @return {?} */ function (route) { return route.data; }))) .subscribe((/** * @param {?} event * @return {?} */ function (event) { _this.titleService.setTitle(event['title']); _this.pageInfo = event; })); } /** * @return {?} */ BreadcrumbComponent.prototype.ngOnInit = /** * @return {?} */ function () { }; /** * @param {?} title * @return {?} */ BreadcrumbComponent.prototype.redirectBack = /** * @param {?} title * @return {?} */ function (title) { // console.log(this.router, '..bread-ruta..', this.titleService.getTitle()); // console.log('..title..', title); /*this.router.navigate(['../'], {relativeTo: this.activatedRoute});*/ /** @type {?} */ var url = this.activatedRoute.snapshot.url; /** @type {?} */ var link = (url[0] && url[0].path) || ''; // console.log(url, '..bread-ruta..', link); // this.router.navigate([relativeUrl], { relativeTo: this.activatedRoute }); }; /** * @return {?} */ BreadcrumbComponent.prototype.eventBreadcrumb = /** * @return {?} */ function () { this.breadcrumbEvent.emit(this); }; BreadcrumbComponent.decorators = [ { type: Component, args: [{ selector: 'gui-breadcrumb', template: "<!-- ============================================================== -->\r\n<!-- Bread crumb and right sidebar toggle -->\r\n<!-- ============================================================== -->\r\n<div class=\"page-breadcrumb\">\r\n <div class=\"row\">\r\n <div class=\"col-12 align-self-center\">\r\n <h4 class=\"page-title\">{{pageInfo?.title}}</h4>\r\n <div class=\"d-flex align-items-center\">\r\n <nav aria-label=\"breadcrumb\">\r\n <ol class=\"breadcrumb\">\r\n <ng-template ngFor let-url [ngForOf]=\"pageInfo?.urls\" let-last=\"last\">\r\n <li class=\"breadcrumb-item\" *ngIf=\"!last\">\r\n <a (click)=\"eventBreadcrumb()\">{{url.title}}</a>\r\n </li>\r\n <li class=\"breadcrumb-item active\" *ngIf=\"last\">{{url.title}}</li>\r\n </ng-template>\r\n </ol>\r\n </nav>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<!-- <div class=\"page-breadcrumb\">\r\n <div class=\"row\">\r\n <div class=\"col-12 align-self-center\">\r\n <h4 class=\"page-title\">{{pageInfo?.title}}</h4>\r\n <div class=\"d-flex align-items-center\">\r\n <nav aria-label=\"breadcrumb\">\r\n <ol class=\"breadcrumb\">\r\n <ng-template ngFor let-url [ngForOf]=\"pageInfo?.urls\" let-last=\"last\">\r\n <li class=\"breadcrumb-item\" *ngIf=\"!last\">\r\n <a (click)=\"redirectBack(url.url)\">{{url.title}}</a>\r\n </li>\r\n <li class=\"breadcrumb-item active\" *ngIf=\"last\">{{url.title}}</li>\r\n </ng-template>\r\n </ol>\r\n </nav>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n<!-- ============================================================== -->\r\n<!-- End Bread crumb and right sidebar toggle -->\r\n<!-- ============================================================== -->", styles: [".page-breadcrumb{padding:10px 10px 0 15px}.page-breadcrumb .page-title{margin-bottom:0}.page-breadcrumb .breadcrumb{padding:0;margin:0;background:0 0;font-size:12px}.page-breadcrumb .breadcrumb .breadcrumb-item+.breadcrumb-item::before{content:\"\\e649\";font-family:themify;color:#ccc;font-size:11px}"] }] } ]; /** @nocollapse */ BreadcrumbComponent.ctorParameters = function () { return [ { type: Router }, { type: ActivatedRoute }, { type: Title } ]; }; BreadcrumbComponent.propDecorators = { layout: [{ type: Input }], breadcrumbEvent: [{ type: Output }] }; return BreadcrumbComponent; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/breadcrumb/breadcrumb.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var GuiBreadcrumbIconModule = /** @class */ (function () { function GuiBreadcrumbIconModule() { } GuiBreadcrumbIconModule.decorators = [ { type: NgModule, args: [{ imports: [ CommonModule, ], exports: [ BreadcrumbComponent, ], declarations: [ BreadcrumbComponent, ], providers: [], },] } ]; return GuiBreadcrumbIconModule; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/breadcrumb/index.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @fileoverview added by tsickle * Generated from: lib/components/button-icon/button-icon.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ // import { abcForms } from '../standardizer'; var GuiButtonIconComponent = /** @class */ (function () { function GuiButtonIconComponent() { this.class = 'btn btn-primary'; this.icon = 'fa fa-plus-circle'; this.label = 'Nuevo'; } /** * @return {?} */ GuiButtonIconComponent.prototype.ngOnInit = /** * @return {?} */ function () { }; GuiButtonIconComponent.decorators = [ { type: Component, args: [{ selector: 'gui-button-icon', template: "<button class=\"btn {{colorClass}} btn-sm\" [title]=\"title || ''\" [routerLink]=\"routerLink\" [disabled]=\"isDisabled\">\r\n<!-- <button class=\"btn lamb-btn-block btn-sm\" [title]=\"title || ''\" [routerLink]=\"routerLink\">\r\n <a class=\"btn lamb-btn-block btn-sm\" [title]=\"title || ''\" [routerLink]=\"routerLink\"> -->\r\n <span class=\"{{ icon }}\" [ngClass]=\"{'lamb-icon': !onlyIcon }\"></span>\r\n <span *ngIf=\"!onlyIcon\"> {{ label }}</span>\r\n <!-- </a> -->\r\n</button>", styles: [".lamb-icon{margin-right:3px}@media (max-width:550px){.lamb-btn-block{display:block;width:100%}}"] }] } ]; /** @nocollapse */ GuiButtonIconComponent.ctorParameters = function () { return []; }; GuiButtonIconComponent.propDecorators = { class: [{ type: Input }], colorClass: [{ type: Input }], label: [{ type: Input }], isDisabled: [{ type: Input }], routerLink: [{ type: Input }], onlyIcon: [{ type: Input }], icon: [{ type: Input }], title: [{ type: Input }] }; return GuiButtonIconComponent; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/button-icon/button-icon.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var GuiButtonIconModule = /** @class */ (function () { function GuiButtonIconModule() { } GuiButtonIconModule.decorators = [ { type: NgModule, args: [{ imports: [ CommonModule, RouterModule, ], exports: [ GuiButtonIconComponent, ], declarations: [ GuiButtonIconComponent, ], providers: [], },] } ]; return GuiButtonIconModule; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/button-icon/index.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @fileoverview added by tsickle * Generated from: lib/components/confirm-dialog/confirm-dialog.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var ConfirmDialogComponent = /** @class */ (function () { function ConfirmDialogComponent(activeModal) { this.activeModal = activeModal; } /** * @return {?} */ ConfirmDialogComponent.prototype.ngOnInit = /** * @return {?} */ function () { }; /** * @return {?} */ ConfirmDialogComponent.prototype.cancel = /** * @return {?} */ function () { // this.activeModal.close(false); this.activeModal.dismiss(false); }; /** * @return {?} */ ConfirmDialogComponent.prototype.ok = /** * @return {?} */ function () { this.activeModal.close({ daa: 'ola Soy guido' }); }; /** * @return {?} */ ConfirmDialogComponent.prototype.dismiss = /** * @return {?} */ function () { // this.activeModal.close(true); this.activeModal.dismiss(false); }; ConfirmDialogComponent.decorators = [ { type: Component, args: [{ selector: 'gui-confirm-dialog', template: "<div class=\"modal-header\">\r\n <h6 class=\"modal-title\">{{ title }}</h6>\r\n <button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"dismiss()\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </button>\r\n</div>\r\n<div class=\"modal-body\">\r\n {{ message }}\r\n</div>\r\n<div class=\"modal-footer\">\r\n <button type=\"submit\" class=\"btn btn-light btn-sm\" (click)=\"cancel()\" autofocus>{{ btnCancelText }}</button>\r\n <button type=\"button\" class=\"btn btn-primary btn-sm\" (click)=\"ok()\" >{{ btnOkText }}</button>\r\n</div>", styles: [""] }] } ]; /** @nocollapse */ ConfirmDialogComponent.ctorParameters = function () { return [ { type: NgbActiveModal } ]; }; ConfirmDialogComponent.propDecorators = { title: [{ type: Input }], message: [{ type: Input }], btnOkText: [{ type: Input }], btnCancelText: [{ type: Input }] }; return ConfirmDialogComponent; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/confirm-dialog/messages.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** @type {?} */ var message = { confirmDelete: '¿Estas seguro de Eliminar este registro?', confirmUpdate: '¿Estas seguro de Actualizar este registro?', confirmSave: '¿Estas seguro de Guardar?', confirmState: '¿Estas seguro de Cambiar Estado?', confirmDefault: '¿Estas seguro de realizar la Acción?', }; /** * @fileoverview added by tsickle * Generated from: lib/components/confirm-dialog/confirm-dialog.service.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var ConfirmDialogService = /** @class */ (function () { function ConfirmDialogService(gwModalService) { this.gwModalService = gwModalService; } /** * Confirm * @param options opctional JSON Obtions * @param action X = XXX; D = Delete; U = Update; S = Save */ /** * Confirm * @param {?=} options opctional JSON Obtions * @param {?=} action X = XXX; D = Delete; U = Update; S = Save * @return {?} */ ConfirmDialogService.prototype.confirm = /** * Confirm * @param {?=} options opctional JSON Obtions * @param {?=} action X = XXX; D = Delete; U = Update; S = Save * @return {?} */ function (options, action) { if (options === void 0) { options = {}; } /** @type {?} */ var modalRef = this.gwModalService.open(ConfirmDialogComponent, { centered: true }); // const modalRef = // this.lambModalService.open(ConfirmDialogComponent, // { size: (options.dialogSize ? options.dialogSize : this.config.dialogSize) }); modalRef.componentInstance.title = options.title ? options.title : this.config.title; modalRef.componentInstance.message = options.message ? options.message : this.getMessage(action); modalRef.componentInstance.btnOkText = options.btnOkText ? options.btnOkText : this.config.btnOkText; modalRef.componentInstance.btnCancelText = options.btnCancelText ? options.btnCancelText : this.config.btnCancelText; return modalRef.result; }; /** * @param {?=} options * @return {?} */ ConfirmDialogService.prototype.confirmDelete = /** * @param {?=} options * @return {?} */ function (options) { if (options === void 0) { options = {}; } return this.confirm(options, 'D'); }; /** * @param {?=} options * @return {?} */ ConfirmDialogService.prototype.confirmUpdate = /** * @param {?=} options * @return {?} */ function (options) { if (options === void 0) { options = {}; } return this.confirm(options, 'U'); }; /** * @param {?=} options * @return {?} */ ConfirmDialogService.prototype.confirmSave = /** * @param {?=} options * @return {?} */ function (options) { if (options === void 0) { options = {}; } return this.confirm(options, 'S'); }; /** * @param {?=} options * @return {?} */ ConfirmDialogService.prototype.confirmState = /** * @param {?=} options * @return {?} */ function (options) { if (options === void 0) { options = {}; } return this.confirm(options, 'E'); }; /** * @private * @param {?} action * @return {?} */ ConfirmDialogService.prototype.getMessage = /** * @private * @param {?} action * @return {?} */ function (action) { switch (action) { case 'D': { return message.confirmDelete; } case 'U': { return message.confirmUpdate; } case 'E': { return message.confirmState; } case 'S': { return message.confirmSave; } default: { return this.config.message; } } }; Object.defineProperty(ConfirmDialogService.prototype, "config", { /** * Config for default. */ get: /** * Config for default. * @return {?} */ function () { return { title: 'Confirmación', message: message.confirmDefault, btnOkText: 'OK', btnCancelText: 'CANCEL', dialogSize: 'lg', }; }, enumerable: true, configurable: true }); ConfirmDialogService.decorators = [ { type: Injectable } ]; /** @nocollapse */ ConfirmDialogService.ctorParameters = function () { return [ { type: NgbModal } ]; }; return ConfirmDialogService; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/confirm-dialog/confirm-dialog.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var GuiConfirmDialogModule = /** @class */ (function () { function GuiConfirmDialogModule() { } GuiConfirmDialogModule.decorators = [ { type: NgModule, args: [{ imports: [ NgbModalModule ], declarations: [ ConfirmDialogComponent ], providers: [ ConfirmDialogService ], entryComponents: [ ConfirmDialogComponent ], },] } ]; return GuiConfirmDialogModule; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/confirm-dialog/index.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @fileoverview added by tsickle * Generated from: lib/components/divider/divider-config.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var DividerConfigService = /** @class */ (function () { function DividerConfigService() { this.icon = ''; this.description = ''; this.title = ''; } DividerConfigService.decorators = [ { type: Injectable } ]; return DividerConfigService; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/divider/divider.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var GuiDividerComponent = /** @class */ (function () { function GuiDividerComponent() { } /** * @return {?} */ GuiDividerComponent.prototype.ngOnInit = /** * @return {?} */ function () { }; GuiDividerComponent.decorators = [ { type: Component, args: [{ selector: 'gui-divider', template: "\n <span class=\"{{ icon }}\"></span>\n <span class=\"lamb-title\">{{ title }} </span>\n <p>{{ description }}</p>\n <hr>\n ", styles: ["hr{margin-top:.3rem}span{margin-right:.5rem}p{opacity:.8;margin-bottom:0;font-style:italic}"] }] } ]; /** @nocollapse */ GuiDividerComponent.ctorParameters = function () { return []; }; GuiDividerComponent.propDecorators = { icon: [{ type: Input }], title: [{ type: Input }], description: [{ type: Input }] }; return GuiDividerComponent; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/divider/divider.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var GuiDividerModule = /** @class */ (function () { function GuiDividerModule() { } GuiDividerModule.decorators = [ { type: NgModule, args: [{ imports: [ CommonModule, ], exports: [ GuiDividerComponent, ], declarations: [ GuiDividerComponent, ], providers: [ DividerConfigService, ], },] } ]; return GuiDividerModule; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/divider/index.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @fileoverview added by tsickle * Generated from: lib/components/fieldset/fieldset.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * Reveal fieldset component. * * \@example * * * <app-fieldset> * Mi Contenido * </app-fieldset> * * * <app-fieldset> * <app-fieldset-head> * <app-fieldset-icon [icon]="fa fa-home"></app-fieldset-icon> * <app-fieldset-title>Mi título</app-fieldset-title> * </app-fieldset-head> * <app-fieldset-body> * Mi contenido * </app-fieldset-body> * </app-fieldset> * */ var AppFieldsetComponent = /** @class */ (function () { function AppFieldsetComponent() { } /** * @return {?} */ AppFieldsetComponent.prototype.ngOnInit = /** * @return {?} */ function () { }; AppFieldsetComponent.decorators = [ { type: Component, args: [{ selector: 'gui-fieldset', template: "\n <fieldset class=\"fieldset-border\">\n <legend class=\"legend-border\">\n <ng-content select=\"gui-fieldset-head\"></ng-content>\n </legend>\n <ng-content></ng-content>\n <ng-content select=\"gui-fieldset-body\"></ng-content>\n </fieldset>\n ", styles: ["fieldset.fieldset-border{border:1px groove #ddd!important;padding:0 1em 1em!important;box-shadow:0 0 0 0 #000}legend.legend-border{font-size:1em!important;font-weight:700!important;text-align:left!important;width:auto;padding:0 10px;border-bottom:none}"] }] } ]; /** @nocollapse */ AppFieldsetComponent.ctorParameters = function () { return []; }; return AppFieldsetComponent; }()); /** * Reveal fieldset head component. * * \@example * * ``` * <app-fieldset-head> * Mi título * </app-fieldset-head> * ``` * \@example * * ``` * <app-fieldset-head> * <app-fieldset-title> Mi Titulo </app-fieldset-title> * <app-fieldset-icon icon="fa fa-home"></app-fieldset-icon> * </app-fieldset-head> * ``` */ var AppFieldsetHeadComponent = /** @class */ (function () { function AppFieldsetHeadComponent() { } AppFieldsetHeadComponent.decorators = [ { type: Component, args: [{ selector: 'gui-fieldset-head', template: "\n <ng-content></ng-content>\n <ng-content caption=\"gn-fieldset-icon\" ></ng-content>\n <ng-content caption=\"gn-fieldset-title\"></ng-content>\n " }] } ]; /** @nocollapse */ AppFieldsetHeadComponent.ctorParameters = function () { return []; }; return AppFieldsetHeadComponent; }()); /** * Reveal fieldset body component. * * \@example * * ``` * <app-fieldset-body> * Mi Contenido * </app-fieldset-body> * ``` */ var AppFieldsetBodyComponent = /** @class */ (function () { function AppFieldsetBodyComponent() { } AppFieldsetBodyComponent.decorators = [ { type: Component, args: [{ selector: 'gui-fieldset-body', template: "\n <ng-content></ng-content>\n " }] } ]; /** @nocollapse */ AppFieldsetBodyComponent.ctorParameters = function () { return []; }; return AppFieldsetBodyComponent; }()); /** * Reveal fieldset title component. * * \@example * * ``` * <app-fieldset-title> * Mi Titulo * </app-fieldset-title> * ``` */ var AppFieldsetTitleComponent = /** @class */ (function () { function AppFieldsetTitleComponent() { } AppFieldsetTitleComponent.decorators = [ { type: Component, args: [{ selector: 'gui-fieldset-title', template: "\n <ng-content></ng-content>\n " }] } ]; /** @nocollapse */ AppFieldsetTitleComponent.ctorParameters = function () { return []; }; return AppFieldsetTitleComponent; }()); /** * Reveal fieldset icon component. * * \@example * * ``` * <app-fieldset-icon icon="fa fa-home"></app-fieldset-icon> * ``` */ var AppFieldsetIconComponent = /** @class */ (function () { function AppFieldsetIconComponent() { } AppFieldsetIconComponent.decorators = [ { type: Component, args: [{ selector: 'gui-fieldset-icon', template: "\n <span class=\"{{ icon }} gn-icon\" ></span>\n ", styles: [" .gn-icon {\n font-size: medium;\n margin-right: 6px;\n }\n "] }] } ]; /** @nocollapse */ AppFieldsetIconComponent.ctorParameters = function () { return []; }; AppFieldsetIconComponent.propDecorators = { icon: [{ type: Input }] }; return AppFieldsetIconComponent; }()); /** @type {?} */ var App_FIELDSET_COMPONENTS = [ AppFieldsetComponent, AppFieldsetHeadComponent, AppFieldsetTitleComponent, AppFieldsetBodyComponent, AppFieldsetIconComponent, ]; /** * @fileoverview added by tsickle * Generated from: lib/components/fieldset/fieldset.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var GuiFieldsetModule = /** @class */ (function () { function GuiFieldsetModule() { } GuiFieldsetModule.decorators = [ { type: NgModule, args: [{ imports: [], exports: __spread(App_FIELDSET_COMPONENTS), declarations: __spread(App_FIELDSET_COMPONENTS), providers: [], },] } ]; return GuiFieldsetModule; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/fieldset/index.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @fileoverview added by tsickle * Generated from: lib/components/input-icon/input-icon.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var InputIconComponent = /** @class */ (function () { function InputIconComponent() { this.justify = 'end'; } /** * @return {?} */ InputIconComponent.prototype.ngOnInit = /** * @return {?} */ function () { }; InputIconComponent.decorators = [ { type: Component, args: [{ selector: 'gui-input-icon', template: "<div class=\"inner-addon {{ justify }}-addon\">\r\n <ng-content></ng-content>\r\n</div>", styles: ["::ng-deep .inner-addon{position:relative}::ng-deep .inner-addon .fa{position:absolute;top:25%;padding-right:.5rem;padding-left:.5rem;pointer-events:none;font-size:initial}.start-addon .fa{left:0}.start-addon input{padding-left:30px}.end-addon .fa{right:0}.end-addon input{padding-right:30px}"] }] } ]; /** @nocollapse */ InputIconComponent.ctorParameters = function () { return []; }; InputIconComponent.propDecorators = { justify: [{ type: Input }] }; return InputIconComponent; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/input-icon/input-icon.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var GuiInputIconModule = /** @class */ (function () { function GuiInputIconModule() { } GuiInputIconModule.decorators = [ { type: NgModule, args: [{ imports: [], exports: [InputIconComponent], declarations: [InputIconComponent], providers: [], },] } ]; return GuiInputIconModule; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/input-icon/index.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @fileoverview added by tsickle * Generated from: lib/components/steps/animations/slide-of-right.animation.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** @type {?} */ var slideOfRight = trigger('slideOfRight', [ transition(':enter', [ style({ transform: 'translateX(100%)', opacity: 0 }), animate('.35s', style({ transform: 'translateX(0)', 'opacity': 1 })), ]), transition(':leave', [ style({ transform: 'translateX(0)', 'opacity': 1 }), animate('.35s', style({ transform: 'translateX(100%)', 'opacity': 0 })), ]), // state('next', style({ height: '0px', transform: 'scaleY(0)' /*opacity: 0*/ })), state('next', style({ height: '*', transform: 'scaleY(1)' /*opacity: 1*/ })), state('back', style({ height: '6px', transform: 'scaleY(0)' /*opacity: 1*/ })), transition('* => back', [ style({ transform: 'translateX(100%)', display: 'block' }), animate('.35s', style({ transform: 'translateX(0)', display: 'none' })), ]), transition('* => next', [ style({ transform: 'translateX(0)', display: 'none' }), animate('.35s', style({ transform: 'translateX(100%)', display: 'block' })), ]), ]); /** * @fileoverview added by tsickle * Generated from: lib/components/steps/step-config.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var ConfigNames = /** @class */ (function () { function ConfigNames(buttonBack, buttonNext, buttonFinish) { this.buttonBack = buttonBack; this.buttonNext = buttonNext; this.buttonFinish = buttonFinish; } return ConfigNames; }()); var AppStepConfig = /** @class */ (function () { function AppStepConfig() { // justify: 'start' | 'center' | 'end' | 'fill' | 'justified'; // orientation: 'horizontal' | 'vertical'; // type: 'tabss' | 'pills'; this.justify = 'center'; this.orientation = 'horizontal'; // type: 'tabss' | 'pills' = 'tabss'; this.type = 'stepss'; this.configNames = new ConfigNames('Anterior', 'Siguiente', 'Finalizar'); } AppStepConfig.decorators = [ { type: Injectable } ]; return AppStepConfig; }()); /** * @fileoverview added by tsickle * Generated from: lib/components/steps/steps.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ // import { LambStepConfig, ConfigNames } from '@lamb/steps/step-config'; // import { slideOfRight } from '@lamb/steps/animations/slide-of-right.animation'; var AppStepTitleDirective = /** @class */ (function () { function AppStepTitleDirective(templateRef) { this.templateRef = templateRef; } AppStepTitleDirective.decorators = [ { type: Directive, args: [{ selector: 'ng-template[appStepTitle]', },] } ]; /** @nocollapse */ AppStepTitleDirective.ctorParameters = function () { return [ { type: TemplateRef } ]; }; return AppStepTitleDirective; }()); var AppStepContentDirective = /** @class */ (function () { function AppStepContentDirective(templateRef) { this.templateRef = templateRef; } AppStepContentDirective.decorators = [ { type: Directive, args: [{ selector: 'ng-template[appStepContent]', },] } ]; /** @nocollapse */ AppStepContentDirective.ctorParameters = function () { return [ { type: TemplateRef } ]; }; return AppStepContentDirective; }()); /** @type {?} */ var nextId = 0; var AppStepDirective = /** @class */ (function () { function AppStepDirective() { this.id = "app-step-" + nextId++; this.disabled = false; // @Input() disabled = true; this.isValidStep = true; } Object.defineProperty(AppStepDirective.prototype, "validStep", { // public isValidStep: boolean = false; set: // public isValidStep: boolean = false; /** * @param {?} value * @return {?} */ function (value) { this.isValidStep = (value === 'true' || value === true) ? true : false; }, enumerable: true, configurable: true }); AppStepDirective.decorators = [ { type: Directive, args: [{ // tslint:disable-next-line:directive-selector selector: 'gui-step', },] } ]; AppStepDirective.propDecorators = { id: [{ type: Input }], title: [{ type: Input }], icon: [{ type: Input }], data: [{ type: Input }], disabled: [{ type: Input }], validStep: [{ type: Input }], titleTemplate: [{ type: ContentChild, args: [AppStepTitleDirective,] }], contentTemplate: [{ type: ContentChild, args: [AppStepContentDirective,] }] }; return AppStepDirective; }()); var AppStepGroupComponent = /** @class */ (function () { function AppStepGroupComponent(config) { this.config = config; this.hideContent = false; /** * Cuando cambia de step se destruira el contenido anterior o solo se oculatará? */ // @Input() destroyOnHide: boolean = true; this.destroyOnHide = false; /** * Emite cuando hay cambios de steps. */ this.stepChange = new EventEmitter(); // tslint:disable-next-line: no-output-on-prefix this.onComplete = new EventEmitter(); this.type = this.config.type; this.justify = this.config.justify; this.orientation = this.config.orientation; this.iConfigNames = this.config.configNames; } Object.defineProperty(AppStepGroupComponent.prototype, "configNames", { set: /** * @param {?} confign * @return {?} */ function (confign) { this.iConfigNames.buttonBack = confign.buttonBack || this.iConfigNames.buttonBack; this.iConfigNames.buttonNext = confign.buttonNext || this.iConfigNames.buttonNext; this.iConfigNames.buttonFinish = confign.buttonFinish || this.iConfigNames.buttonFinish; }, enumerable: true, configurable: true }); Object.defineProperty(AppStepGroupComponent.prototype, "justify", { set: /** * @param {?} className * @return {?} */ function (className) { if (className === 'fill' || className === 'justified') { this.justifyClass = "nav-" + className; } else { this.justifyClass = "justify-content-" + className; } }, enumerable: true, configurable: true }); /** * @param {?} stepId * @return {?} */ AppStepGroupComponent.prototype.onSelect = /** * @param {?} stepId * @return {?} */ function (stepId) { /** @type {?} */ var selectedStep = this.getStepById(stepId); /** @type {?} */ var selectedActive = this.getStepById(this.activeId); // console.log('selectedStep'); // console.log(selectedStep); if (selectedStep && !selectedStep.disabled && this.activeId !== selectedStep.id) { /** @type {?} */ var defaultPrevented_1 = false; this.stepChange.emit({ activeId: this.activeId, activeData: selectedActive.data || null, nextId: selectedStep.id, preventDefault: (/** * @return {?} */ function () { defaultPrevented_1 = true; }), }); if (!defaultPrevented_1) { this.activeId = selectedStep.id; } } }; /** * @return {?} */ AppStepGroupComponent.prototype.ngOnInit = /** * @return {?} */ function () { }; /** * @return {?} */ AppStepGroupComponent.prototype.ngAfterContentChecked = /** * @return {?} */ function () { /** @type {?} */ var activeStep = this.getStepById(this.activeId); this.activeId = activeStep ? activeStep.id : (this.steps.length ? this.steps.first.id : null); }; /** * @private * @param {?} id * @return {?} */ AppStepGroupComponent.prototype.getStepById = /** * @private * @param {?} id * @return {?} */ function (id) { /** @type {?} */ var stepsWithId = this.steps.filter((/** * @param {?} step * @return {?} */ function (step) { return step.id === id; })); return stepsWithId.length ? stepsWithId[0] : null; }; /** * @return {?} */ AppStepGroupComponent.prototype.back = /** * @return {?} */ function () { /** @type {?} */ var back = this.getStepIdSplice(-1); this.onSelect(back); }; /** * @return {?} */ AppStepGroupComponent.prototype.next = /** * @return {?} */ function () { /** @type {?} */ var next = this.getStepIdSplice(+1); this.onSelect(next); }; /** * @return {?} */ AppStepGroupComponent.prototype.complete = /** * @return {?} */ function () { this.onComplete.emit(); }; /** * @param {?} stepId * @return {?} */ AppStepGroupComponent.prototype.current = /** * @param {?} stepId * @return {?} */ function (stepId) { this.onSelect(stepId); }; /** * @private * @param {?} condicion * @return {?} */ AppStepGroupComponent.prototype.getStepIdSplice = /** * @private * @param {?} condicion * @return {?} */ function (condicion) { /** @type {?} */ var actual = this.activeId; /** @type {?} */ var splice = actual.slice(0, actual.length - 1); /** @type {?} */ var index = parseInt(actual.slice((actual.length - 1), actual.length), 10); /** @type {?} */ var next = "" + splice + (index + (condicion)); return next; }; Object.defineProperty(AppStepGroupComponent.prototype, "hidePrevious", { get: /** * @return {?} */ function () { return this.activeId !== 'app-step-0'; }, enumerable: true, configurable: true }); Object.defineProperty(AppStepGroupComponent.prototype, "hideNext", { get: /** * @return {?} */ function () { /** @type {?} */ var allLength = (this.steps.length - 1); return this.activeId !== 'app-step-' + allLength; }, enumerable: true, configurable: true }); /** * @param {?} stepId * @return {?} */ AppStepGroupComponent.prototype.hideLineRight = /** * @param {?} stepId * @return {?} */ function (stepId) { /** @type {?} */ var step = parseInt(stepId.slice(stepId.length - 1, stepId.length), 10); return (this.steps.length !== (step + 1)); }; /** * @return {?} */ AppStepGroupComponent.prototype.ngOnDestroy = /** * @return {?} */ function () { nextId = 0; }; AppStepGroupComponent.decorators = [ { type: Component, args: [{ selector: 'gui-step-group', template: "<!-- <ul class=\"nav justify-content-center\" id=\"myStep\" role=\"steplist\"> -->\r\n<ul [class]=\"'nav lamb-nav-tabs nav-' + type + (orientation == 'horizontal'? ' ' + justifyClass : ' flex-column' )\" id=\"myStep\"\r\n role=\"steplist\">\r\n\r\n <!-- <ng-template ngFor let-step [ngForOf]=\"steps\" *ngFor=\"let step of steps\"> -->\r\n <ng-template ngFor let-step [ngForOf]=\"steps\">\r\n <li class=\"nav-item\">\r\n <a [id]=\"step.id\" class=\"nav-link\" [class.active]=\"step.id === activeId\" [class.disabled]=\"step.disabled || !step.isValidStep\"\r\n role=\"step\" [attr.stepindex]=\"(step.disabled || !step.isValidStep ? '-1': undefined)\"\r\n [attr.aria-controls]=\"(!destroyOnHide || step.id === activeId ? step.id + '-panel': null)\" [attr.aria-expanded]=\"step.id === activeId\"\r\n [attr.aria-disabled]=\"step.disabled || !step.isValidStep\" (click)=\"current(step.id)\"><!---->\r\n <!-- (click)=\"!!onSelect(step.id)\" | Yo Guido declaro haber modificado el codigo de vitmar jhonson, pero si funciona la cosa...vamos con f\u00E9--> \r\n <!-- data-toggle=\"step\" aria-selected=\"true\" -->\r\n <ng-template [ngIf]=\"step.icon\">\r\n <span class=\"lamb-round-tabs\" [title]=\"step.title\">\r\n <i class=\"{{ step.icon }} lamb-icon\"></i>\r\n </span>\r\n </ng-template>\r\n <br>\r\n <span class=\"lamb-round-text\">\r\n {{ step.title }}\r\n </span>\r\n <ng-template [ngTemplateOutlet]=\"step.titleTemplate?.templateRef\"></ng-template>\r\n </a>\r\n </li>\r\n <li class=\"nav-line\" *ngIf=\"hideLineRight(step.id)\">\r\n <div class=\"lamb-liner\"></div>\r\n </li>\r\n </ng-template>\r\n\r\n <!-- <ng-content select=\"lamb-step-head\"></ng-content> -->\r\n</ul>\r\n<div class=\"tab-content lamb-content\" id=\"myStepContent\">\r\n <!-- <ng-content select=\"lamb-step-body\"></ng-content> -->\r\n <ng-template ngFor let-step [ngForOf]=\"steps\">\r\n <!-- class=\"step-pane fade {{ step.id === activeId ? 'active': null }}\" -->\r\n <!--\r\n <div [@slideOfRight]=\"((step.id === activeId) && (status === 'next')) ? 'next': 'back'\" class=\"tab-pane {{ step.id === activeId ? 'active': 'active' }}\"\r\n *ngIf=\"!destroyOnHide || step.id === activeId\" role=\"steppanel\" [attr.aria-labelledby]=\"step.id\" id=\"{{ step.id }}-panel\"\r\n [attr.aria-expanded]=\"step.id === activeId\"> -->\r\n\r\n <div class=\"tab-pane {{ step.id === activeId ? 'active': null }}\" *ngIf=\"!destroyOnHide || step.id === activeId\" role=\"steppanel\"\r\n [attr.aria-labelledby]=\"step.id\" id=\"{{ step.id }}-panel\" [attr.aria-expanded]=\"step.id === activeId\">\r\n <div class=\"container\">\r\n <!---<div class=\"row\">\r\n <div class=\"col-md-12\">-->\r\n <ng-template [ngTemplateOutlet]=\"step.contentTemplate?.templateRef\"></ng-template>\r\n <!--</div>\r\n </div>-->\r\n </div>\r\n <!-- <div class=\"row lamb-button-manage\">\r\n <div class=\"offset-md-4 col-md-4\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\" *ngIf=\"hidePrevious\">\r\n <div class=\"form-group text-center space-20\">\r\n <button class=\"btn btn-sm btn-block btn-outline-rounded btn-secondary\" (click)=\"back()\">\r\n <span style=\"margin-right:10px;\" class=\"fa fa-arrow-left\"></span>\r\n {{ iConfigNames.buttonBack }}\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6\" *ngIf=\"hideNext\">\r\n <div class=\"form-group text-center space-20\">\r\n <button class=\"btn btn-sm btn-block btn-outline-rounded btn-info\" [disabled]=\"!step.isValidStep\" (click)=\"next()\">\r\n {{ iConfigNames.buttonNext }}\r\n <span style=\"margin-left:10px;\" class=\"fa fa-arrow-right\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6\" *ngIf=\"hidePrevious && !hideNext\">\r\n <div cl