UNPKG

@tiposaurio/guido-lib

Version:
1,294 lines (1,262 loc) 72.8 kB
import { Title } from '@angular/platform-browser'; import { filter, map, mergeMap } from 'rxjs/operators'; import { trigger, style, transition, animate, state } from '@angular/animations'; import { NgbActiveModal, NgbModal, NgbModalModule, NgbCollapseModule, NgbPopoverModule, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap'; import { CommonModule } from '@angular/common'; import { Injectable, Component, Input, EventEmitter, Output, 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 */ class GuidoLibService { constructor() { } } GuidoLibService.decorators = [ { type: Injectable, args: [{ providedIn: 'root' },] } ]; /** @nocollapse */ GuidoLibService.ctorParameters = () => []; /** @nocollapse */ GuidoLibService.ngInjectableDef = defineInjectable({ factory: function GuidoLibService_Factory() { return new GuidoLibService(); }, token: GuidoLibService, providedIn: "root" }); /** * @fileoverview added by tsickle * Generated from: lib/guido-lib.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class GuidoLibComponent { constructor() { } /** * @return {?} */ ngOnInit() { } } GuidoLibComponent.decorators = [ { type: Component, args: [{ selector: 'lib-guido-lib', template: ` <p> guido-lib works! </p> ` }] } ]; /** @nocollapse */ GuidoLibComponent.ctorParameters = () => []; /** * @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'; class GuidoLibModule { } GuidoLibModule.decorators = [ { type: NgModule, args: [{ declarations: [GuidoLibComponent], imports: [ // NgbModule.forRoot() ], exports: [GuidoLibComponent] },] } ]; /** * @fileoverview added by tsickle * Generated from: lib/components/breadcrumb/breadcrumb.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class BreadcrumbComponent { /** * @param {?} router * @param {?} activatedRoute * @param {?} titleService */ constructor(router, activatedRoute, titleService) { this.router = router; this.activatedRoute = activatedRoute; this.titleService = titleService; this.breadcrumbEvent = new EventEmitter(); this.router.events .pipe(filter((/** * @param {?} event * @return {?} */ event => event instanceof NavigationEnd))) .pipe(map((/** * @return {?} */ () => this.activatedRoute))) .pipe(map((/** * @param {?} route * @return {?} */ route => { while (route.firstChild) { route = route.firstChild; } return route; }))) .pipe(filter((/** * @param {?} route * @return {?} */ route => route.outlet === 'primary'))) .pipe(mergeMap((/** * @param {?} route * @return {?} */ route => route.data))) .subscribe((/** * @param {?} event * @return {?} */ event => { this.titleService.setTitle(event['title']); this.pageInfo = event; })); } /** * @return {?} */ ngOnInit() { } /** * @param {?} title * @return {?} */ redirectBack(title) { // console.log(this.router, '..bread-ruta..', this.titleService.getTitle()); // console.log('..title..', title); /*this.router.navigate(['../'], {relativeTo: this.activatedRoute});*/ /** @type {?} */ const url = this.activatedRoute.snapshot.url; /** @type {?} */ const link = (url[0] && url[0].path) || ''; // console.log(url, '..bread-ruta..', link); // this.router.navigate([relativeUrl], { relativeTo: this.activatedRoute }); } /** * @return {?} */ eventBreadcrumb() { 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 = () => [ { type: Router }, { type: ActivatedRoute }, { type: Title } ]; BreadcrumbComponent.propDecorators = { layout: [{ type: Input }], breadcrumbEvent: [{ type: Output }] }; /** * @fileoverview added by tsickle * Generated from: lib/components/breadcrumb/breadcrumb.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class GuiBreadcrumbIconModule { } GuiBreadcrumbIconModule.decorators = [ { type: NgModule, args: [{ imports: [ CommonModule, ], exports: [ BreadcrumbComponent, ], declarations: [ BreadcrumbComponent, ], providers: [], },] } ]; /** * @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'; class GuiButtonIconComponent { constructor() { this.class = 'btn btn-primary'; this.icon = 'fa fa-plus-circle'; this.label = 'Nuevo'; } /** * @return {?} */ ngOnInit() { } } 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 = () => []; 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 }] }; /** * @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 */ class GuiButtonIconModule { } GuiButtonIconModule.decorators = [ { type: NgModule, args: [{ imports: [ CommonModule, RouterModule, ], exports: [ GuiButtonIconComponent, ], declarations: [ GuiButtonIconComponent, ], providers: [], },] } ]; /** * @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 */ class ConfirmDialogComponent { /** * @param {?} activeModal */ constructor(activeModal) { this.activeModal = activeModal; } /** * @return {?} */ ngOnInit() { } /** * @return {?} */ cancel() { // this.activeModal.close(false); this.activeModal.dismiss(false); } /** * @return {?} */ ok() { this.activeModal.close({ daa: 'ola Soy guido' }); } /** * @return {?} */ dismiss() { // 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 = () => [ { type: NgbActiveModal } ]; ConfirmDialogComponent.propDecorators = { title: [{ type: Input }], message: [{ type: Input }], btnOkText: [{ type: Input }], btnCancelText: [{ type: Input }] }; /** * @fileoverview added by tsickle * Generated from: lib/components/confirm-dialog/messages.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** @type {?} */ const 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 */ class ConfirmDialogService { /** * @param {?} gwModalService */ constructor(gwModalService) { this.gwModalService = gwModalService; } /** * Confirm * @param {?=} options opctional JSON Obtions * @param {?=} action X = XXX; D = Delete; U = Update; S = Save * @return {?} */ confirm(options = {}, action) { /** @type {?} */ const 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 {?} */ confirmDelete(options = {}) { return this.confirm(options, 'D'); } /** * @param {?=} options * @return {?} */ confirmUpdate(options = {}) { return this.confirm(options, 'U'); } /** * @param {?=} options * @return {?} */ confirmSave(options = {}) { return this.confirm(options, 'S'); } /** * @param {?=} options * @return {?} */ confirmState(options = {}) { return this.confirm(options, 'E'); } /** * @private * @param {?} action * @return {?} */ getMessage(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; } } } /** * Config for default. * @return {?} */ get config() { return { title: 'Confirmación', message: message.confirmDefault, btnOkText: 'OK', btnCancelText: 'CANCEL', dialogSize: 'lg', }; } } ConfirmDialogService.decorators = [ { type: Injectable } ]; /** @nocollapse */ ConfirmDialogService.ctorParameters = () => [ { type: NgbModal } ]; /** * @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 */ class GuiConfirmDialogModule { } GuiConfirmDialogModule.decorators = [ { type: NgModule, args: [{ imports: [ NgbModalModule ], declarations: [ ConfirmDialogComponent ], providers: [ ConfirmDialogService ], entryComponents: [ ConfirmDialogComponent ], },] } ]; /** * @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 */ class DividerConfigService { constructor() { this.icon = ''; this.description = ''; this.title = ''; } } DividerConfigService.decorators = [ { type: Injectable } ]; /** * @fileoverview added by tsickle * Generated from: lib/components/divider/divider.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class GuiDividerComponent { constructor() { } /** * @return {?} */ ngOnInit() { } } GuiDividerComponent.decorators = [ { type: Component, args: [{ selector: 'gui-divider', template: ` <span class="{{ icon }}"></span> <span class="lamb-title">{{ title }} </span> <p>{{ description }}</p> <hr> `, styles: ["hr{margin-top:.3rem}span{margin-right:.5rem}p{opacity:.8;margin-bottom:0;font-style:italic}"] }] } ]; /** @nocollapse */ GuiDividerComponent.ctorParameters = () => []; GuiDividerComponent.propDecorators = { icon: [{ type: Input }], title: [{ type: Input }], description: [{ type: Input }] }; /** * @fileoverview added by tsickle * Generated from: lib/components/divider/divider.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class GuiDividerModule { } GuiDividerModule.decorators = [ { type: NgModule, args: [{ imports: [ CommonModule, ], exports: [ GuiDividerComponent, ], declarations: [ GuiDividerComponent, ], providers: [ DividerConfigService, ], },] } ]; /** * @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> * */ class AppFieldsetComponent { constructor() { } /** * @return {?} */ ngOnInit() { } } AppFieldsetComponent.decorators = [ { type: Component, args: [{ selector: 'gui-fieldset', template: ` <fieldset class="fieldset-border"> <legend class="legend-border"> <ng-content select="gui-fieldset-head"></ng-content> </legend> <ng-content></ng-content> <ng-content select="gui-fieldset-body"></ng-content> </fieldset> `, 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 = () => []; /** * 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> * ``` */ class AppFieldsetHeadComponent { constructor() { } } AppFieldsetHeadComponent.decorators = [ { type: Component, args: [{ selector: 'gui-fieldset-head', template: ` <ng-content></ng-content> <ng-content caption="gn-fieldset-icon" ></ng-content> <ng-content caption="gn-fieldset-title"></ng-content> ` }] } ]; /** @nocollapse */ AppFieldsetHeadComponent.ctorParameters = () => []; /** * Reveal fieldset body component. * * \@example * * ``` * <app-fieldset-body> * Mi Contenido * </app-fieldset-body> * ``` */ class AppFieldsetBodyComponent { constructor() { } } AppFieldsetBodyComponent.decorators = [ { type: Component, args: [{ selector: 'gui-fieldset-body', template: ` <ng-content></ng-content> ` }] } ]; /** @nocollapse */ AppFieldsetBodyComponent.ctorParameters = () => []; /** * Reveal fieldset title component. * * \@example * * ``` * <app-fieldset-title> * Mi Titulo * </app-fieldset-title> * ``` */ class AppFieldsetTitleComponent { constructor() { } } AppFieldsetTitleComponent.decorators = [ { type: Component, args: [{ selector: 'gui-fieldset-title', template: ` <ng-content></ng-content> ` }] } ]; /** @nocollapse */ AppFieldsetTitleComponent.ctorParameters = () => []; /** * Reveal fieldset icon component. * * \@example * * ``` * <app-fieldset-icon icon="fa fa-home"></app-fieldset-icon> * ``` */ class AppFieldsetIconComponent { constructor() { } } AppFieldsetIconComponent.decorators = [ { type: Component, args: [{ selector: 'gui-fieldset-icon', template: ` <span class="{{ icon }} gn-icon" ></span> `, styles: [` .gn-icon { font-size: medium; margin-right: 6px; } `] }] } ]; /** @nocollapse */ AppFieldsetIconComponent.ctorParameters = () => []; AppFieldsetIconComponent.propDecorators = { icon: [{ type: Input }] }; /** @type {?} */ const 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 */ class GuiFieldsetModule { } GuiFieldsetModule.decorators = [ { type: NgModule, args: [{ imports: [], exports: [ ...App_FIELDSET_COMPONENTS, ], declarations: [ ...App_FIELDSET_COMPONENTS, ], providers: [], },] } ]; /** * @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 */ class InputIconComponent { constructor() { this.justify = 'end'; } /** * @return {?} */ ngOnInit() { } } 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 = () => []; InputIconComponent.propDecorators = { justify: [{ type: Input }] }; /** * @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 */ class GuiInputIconModule { } GuiInputIconModule.decorators = [ { type: NgModule, args: [{ imports: [], exports: [InputIconComponent], declarations: [InputIconComponent], providers: [], },] } ]; /** * @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 {?} */ const 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 */ class ConfigNames { /** * @param {?=} buttonBack * @param {?=} buttonNext * @param {?=} buttonFinish */ constructor(buttonBack, buttonNext, buttonFinish) { this.buttonBack = buttonBack; this.buttonNext = buttonNext; this.buttonFinish = buttonFinish; } } class AppStepConfig { constructor() { // 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 } ]; /** * @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'; class AppStepTitleDirective { /** * @param {?} templateRef */ constructor(templateRef) { this.templateRef = templateRef; } } AppStepTitleDirective.decorators = [ { type: Directive, args: [{ selector: 'ng-template[appStepTitle]', },] } ]; /** @nocollapse */ AppStepTitleDirective.ctorParameters = () => [ { type: TemplateRef } ]; class AppStepContentDirective { /** * @param {?} templateRef */ constructor(templateRef) { this.templateRef = templateRef; } } AppStepContentDirective.decorators = [ { type: Directive, args: [{ selector: 'ng-template[appStepContent]', },] } ]; /** @nocollapse */ AppStepContentDirective.ctorParameters = () => [ { type: TemplateRef } ]; /** @type {?} */ let nextId = 0; class AppStepDirective { constructor() { this.id = `app-step-${nextId++}`; this.disabled = false; // @Input() disabled = true; this.isValidStep = true; } // public isValidStep: boolean = false; /** * @param {?} value * @return {?} */ set validStep(value) { this.isValidStep = (value === 'true' || value === true) ? true : false; } } 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,] }] }; class AppStepGroupComponent { /** * @param {?} config */ constructor(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; } /** * @param {?} confign * @return {?} */ set configNames(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; } /** * @param {?} className * @return {?} */ set justify(className) { if (className === 'fill' || className === 'justified') { this.justifyClass = `nav-${className}`; } else { this.justifyClass = `justify-content-${className}`; } } /** * @param {?} stepId * @return {?} */ onSelect(stepId) { /** @type {?} */ const selectedStep = this.getStepById(stepId); /** @type {?} */ const selectedActive = this.getStepById(this.activeId); // console.log('selectedStep'); // console.log(selectedStep); if (selectedStep && !selectedStep.disabled && this.activeId !== selectedStep.id) { /** @type {?} */ let defaultPrevented = false; this.stepChange.emit({ activeId: this.activeId, activeData: selectedActive.data || null, nextId: selectedStep.id, preventDefault: (/** * @return {?} */ () => { defaultPrevented = true; }), }); if (!defaultPrevented) { this.activeId = selectedStep.id; } } } /** * @return {?} */ ngOnInit() { } /** * @return {?} */ ngAfterContentChecked() { /** @type {?} */ const activeStep = this.getStepById(this.activeId); this.activeId = activeStep ? activeStep.id : (this.steps.length ? this.steps.first.id : null); } /** * @private * @param {?} id * @return {?} */ getStepById(id) { /** @type {?} */ const stepsWithId = this.steps.filter((/** * @param {?} step * @return {?} */ step => step.id === id)); return stepsWithId.length ? stepsWithId[0] : null; } /** * @return {?} */ back() { /** @type {?} */ const back = this.getStepIdSplice(-1); this.onSelect(back); } /** * @return {?} */ next() { /** @type {?} */ const next = this.getStepIdSplice(+1); this.onSelect(next); } /** * @return {?} */ complete() { this.onComplete.emit(); } /** * @param {?} stepId * @return {?} */ current(stepId) { this.onSelect(stepId); } /** * @private * @param {?} condicion * @return {?} */ getStepIdSplice(condicion) { /** @type {?} */ const actual = this.activeId; /** @type {?} */ const splice = actual.slice(0, actual.length - 1); /** @type {?} */ const index = parseInt(actual.slice((actual.length - 1), actual.length), 10); /** @type {?} */ const next = `${splice}${(index + (condicion))}`; return next; } /** * @return {?} */ get hidePrevious() { return this.activeId !== 'app-step-0'; } /** * @return {?} */ get hideNext() { /** @type {?} */ const allLength = (this.steps.length - 1); return this.activeId !== 'app-step-' + allLength; } /** * @param {?} stepId * @return {?} */ hideLineRight(stepId) { /** @type {?} */ const step = parseInt(stepId.slice(stepId.length - 1, stepId.length), 10); return (this.steps.length !== (step + 1)); } /** * @return {?} */ ngOnDestroy() { 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 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)=\"complete()\">\r\n {{ iConfigNames.buttonFinish }}\r\n <span style=\"margin-left:10px;\" class=\"fa fa-check\"></span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n </div>\r\n </ng-template>\r\n</div>", // animations: [Animations.slideInOut, Animations.slideOfRight], animations: [slideOfRight], styles: [".lamb-liner{height:2px;background:#ececec;position:relative;width:5rem;margin:0 auto;right:0;top:1.8rem;z-index:1;left:.5rem;color:#333}.tab-content{padding-top:.3rem}.nav-link{padding:0 0 5px}.nav-link .lamb-round-text{color:#000;text-transform:uppercase;font-size:.7rem}@media (max-width:550px){.lamb-liner{width:1rem}.nav-link .lamb-round-text{display:none}}.nav-link.active span.lamb-round-tabs{background:#2962ff;color:#fff}.lamb-nav-tabs{border-bottom:transparent;position:relative;margin:0 auto;box-sizing:border-box;text-align:center;padding:0 1.5rem;background-color:#fff;border-radius:1px solid #ccc}.lamb-nav-tabs li.nav-line{padding-left:0;padding-right:0}.lamb-nav-tabs li a{text-decoration:none}.lamb-button-manage{margin-top:1.5rem}span.lamb-round-tabs{width:40px;height:40px;line-height:40px;display:inline-block;border-radius:100px;background:#ececec;z-index:2;left:-1;text-align:center;font-size:1.3rem;position:relative;margin-top:.6rem;margin-bottom:0;color:#333}"] }] } ]; /** @nocollapse */ AppStepGroupComponent.ctorParameters = () => [ { type: AppStepConfig } ]; AppStepGroupComponent.propDecorators = { steps: [{ type: ContentChildren, args: [AppStepDirective,] }], activeId: [{ type: Input }], configNames: [{ type: Input }], destroyOnHide: [{ type: Input }], stepChange: [{ type: Output }], onComplete: [{ type: Output }], justify: [{ type: Input }], orientation: [{ type: Input }], type: [{ type: Input }] }; /** @type {?} */ const APP_STEPS_COMPONENTS = [ AppStepGroupComponent, AppStepDirective, AppStepTitleDirective, AppStepContentDirective, ]; /** * @fileoverview added by tsickle * Generated from: lib/components/steps/steps.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class GuiStepsModule { } GuiStepsModule.decorators = [ { type: NgModule, args: [{ imports: [ CommonModule, ], exports: [ ...APP_STEPS_COMPONENTS, ], declarations: [ ...APP_STEPS_COMPONENTS, ], providers: [ AppStepConfig, ], },] } ]; /** * @fileoverview added by tsickle * Generated from: lib/components/steps/index.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @fileoverview added by tsickle * Generated from: lib/components/tree-view/tree-view.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class AppTreeViewComponent { constructor() { this.collapseAttr = 'isCollapsed'; this.eventNewChildren = new EventEmitter(); this.eventUpdate = new EventEmitter(); this.eventDelete = new EventEmitter(); } /** * @param {?} value * @return {?} */ set collapseAll(value) { this._collapseAll = value; this._recursiveEdit(this.data, value); } /** * @return {?} */ ngOnInit() { } /*addChildren(entry) { this.eventNewChildren.emit(entry); } goToUpdate(id) { this.eventUpdate.emit(id); } goToDelete(id) { this.eventDelete.emit(id); }*/ /** * @param {?} $event * @return {?} */ newChildren($event) { this.eventNewChildren.emit($event); } /** * @param {?} $event * @return {?} */ updated($event) { this.eventUpdate.emit($event); } /** * @param {?} $event * @return {?} */ deleted($event) { this.eventDelete.emit($event); } /** * @private * @param {?} list * @param {?} value * @return {?} */ _recursiveEdit(list, value) { if (Array.isArray(list)) { for (let i = 0, len = list.length; i < len; i++) { list[i].collapse = value; if (list[i].children.length) { this._recursiveEdit(list[i].children, value); } } } } } AppTreeViewComponent.decorators = [ { type: Component, args: [{ selector: 'gui-tree-view', template: ` <ul class="treeview" *ngIf="data && data.length"> <li *ngFor="let d of data"> <div class="card"> <div class="row"> <div class="col-md-12"> <div class="card-body"> <i *ngIf="d.children.length" class="fas fa-{{d.collapse ? 'minus':'plus'}}-square" (click)="d.collapse = !d.collapse"></i> <i *ngIf="!d.children.length" class="fa fa-square"></i> <strong class="title-card"> {{d.cont_asiento_nombre}} </strong> <a class="btn btn-ligth lamb-button-menu" [ngbPopover]="templateOptions" placement="bottom"> <span class="fas fa-ellipsis-v"></span> </a> <ng-template #templateOptions> <ul class="menu-options"> <li (click)="newChildren(d)"> <a> <span class="fa fa-plus"></span> Nuevo Hijo </a> </li> <li (click)="updated(d.cont_asiento_id)"> <a> <span class="fa fa-edit"></span> Actualizar </a> </li> <li (click)="deleted(d.cont_asiento_id)" *ngIf="!d.children.length"> <a> <span class="fa fa-trash"></span> Eliminar </a> </li> </ul> </ng-template> </div> </div> </div> </div> <gui-tree-view *ngIf="d.collapse && d.children.length" [data]="d.children" [ngbCollapse]="d[collapseAttr]" (eventNewChildren)="newChildren($event)" (eventUpdate)="updated($event)" (eventDelete)="deleted($event)"> </gui-tree-view> </li> </ul> `, styles: [".menu-div{font-size:.9rem;height:5.5rem}.ul-nav{padding:.2rem .6rem!important}.li-nav{list-style-type:none!important}.