UNPKG

gw3-web-guid

Version:

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.

1,342 lines (1,314 loc) 61.7 kB
import { Injectable, ɵɵdefineInjectable, Component, NgModule, EventEmitter, Input, Output, Directive, TemplateRef, ContentChild, ContentChildren } from '@angular/core'; import { CommonModule } from '@angular/common'; import { Title } from '@angular/platform-browser'; import { NavigationEnd, Router, ActivatedRoute, RouterModule } from '@angular/router'; import { filter, map, mergeMap } from 'rxjs/operators'; import { NgbActiveModal, NgbModal, NgbModalModule, NgbCollapseModule, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'; import { trigger, transition, style, animate, state } from '@angular/animations'; /** * @fileoverview added by tsickle * Generated from: lib/gw3-web-guid.service.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class Gw3WebGuidService { constructor() { } } Gw3WebGuidService.decorators = [ { type: Injectable, args: [{ providedIn: 'root' },] } ]; /** @nocollapse */ Gw3WebGuidService.ctorParameters = () => []; /** @nocollapse */ Gw3WebGuidService.ngInjectableDef = ɵɵdefineInjectable({ factory: function Gw3WebGuidService_Factory() { return new Gw3WebGuidService(); }, token: Gw3WebGuidService, providedIn: "root" }); /** * @fileoverview added by tsickle * Generated from: lib/gw3-web-guid.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class Gw3WebGuidComponent { constructor() { } /** * @return {?} */ ngOnInit() { } } Gw3WebGuidComponent.decorators = [ { type: Component, args: [{ selector: 'lib-gw3-web-guid', template: ` <p> gw3-web-guid works! </p> ` }] } ]; /** @nocollapse */ Gw3WebGuidComponent.ctorParameters = () => []; /** * @fileoverview added by tsickle * Generated from: lib/gw3-guid-test/components/tree-view/tree-view.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class TreeViewComponent { constructor() { } /** * @return {?} */ ngOnInit() { } } TreeViewComponent.decorators = [ { type: Component, args: [{ selector: 'gw1-tree-view', template: "<p>tree-view works!</p>\n", styles: [""] }] } ]; /** @nocollapse */ TreeViewComponent.ctorParameters = () => []; /** * @fileoverview added by tsickle * Generated from: lib/gw3-web-guid.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class Gw3WebGuidModule { } Gw3WebGuidModule.decorators = [ { type: NgModule, args: [{ declarations: [Gw3WebGuidComponent, TreeViewComponent], imports: [], exports: [Gw3WebGuidComponent] },] } ]; /** * @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) || ''; /** @type {?} */ const relativeUrl = link ? `../${link}` : `./${link}`; // 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: 'gw1-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: ["@charset \"UTF-8\";.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:\"\uE649\";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 }] }; if (false) { /** @type {?} */ BreadcrumbComponent.prototype.layout; /** @type {?} */ BreadcrumbComponent.prototype.breadcrumbEvent; /** @type {?} */ BreadcrumbComponent.prototype.pageInfo; /** * @type {?} * @private */ BreadcrumbComponent.prototype.router; /** * @type {?} * @private */ BreadcrumbComponent.prototype.activatedRoute; /** * @type {?} * @private */ BreadcrumbComponent.prototype.titleService; } /** * @fileoverview added by tsickle * Generated from: lib/components/breadcrumb/breadcrumb.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class Gw1BreadcrumbIconModule { } Gw1BreadcrumbIconModule.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 AppButtonIconComponent { constructor() { this.class = 'btn btn-primary'; this.icon = 'fa fa-plus-circle'; this.label = 'Nuevo'; } /** * @return {?} */ ngOnInit() { } } AppButtonIconComponent.decorators = [ { type: Component, args: [{ selector: 'gw1-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 */ AppButtonIconComponent.ctorParameters = () => []; AppButtonIconComponent.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 }] }; if (false) { /** @type {?} */ AppButtonIconComponent.prototype.class; /** @type {?} */ AppButtonIconComponent.prototype.colorClass; /** @type {?} */ AppButtonIconComponent.prototype.label; /** @type {?} */ AppButtonIconComponent.prototype.isDisabled; /** @type {?} */ AppButtonIconComponent.prototype.routerLink; /** @type {?} */ AppButtonIconComponent.prototype.onlyIcon; /** @type {?} */ AppButtonIconComponent.prototype.icon; /** @type {?} */ AppButtonIconComponent.prototype.title; } /** * @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 Gw3ButtonIconModule { } Gw3ButtonIconModule.decorators = [ { type: NgModule, args: [{ imports: [ CommonModule, RouterModule, ], exports: [ AppButtonIconComponent, ], declarations: [ AppButtonIconComponent, ], 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: 'gw1-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 }] }; if (false) { /** @type {?} */ ConfirmDialogComponent.prototype.title; /** @type {?} */ ConfirmDialogComponent.prototype.message; /** @type {?} */ ConfirmDialogComponent.prototype.btnOkText; /** @type {?} */ ConfirmDialogComponent.prototype.btnCancelText; /** * @type {?} * @private */ ConfirmDialogComponent.prototype.activeModal; } /** * @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 */ /** * @record */ function Options() { } if (false) { /** @type {?|undefined} */ Options.prototype.title; /** @type {?|undefined} */ Options.prototype.message; /** @type {?|undefined} */ Options.prototype.btnOkText; /** @type {?|undefined} */ Options.prototype.btnCancelText; /** @type {?|undefined} */ Options.prototype.dialogSize; } 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 } ]; if (false) { /** * @type {?} * @private */ ConfirmDialogService.prototype.gwModalService; } /** * @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 Gw3ConfirmDialogModule { } Gw3ConfirmDialogModule.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 } ]; if (false) { /** @type {?} */ DividerConfigService.prototype.icon; /** @type {?} */ DividerConfigService.prototype.description; /** @type {?} */ DividerConfigService.prototype.title; } /** * @fileoverview added by tsickle * Generated from: lib/components/divider/divider.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class Gw3DividerComponent { constructor() { } /** * @return {?} */ ngOnInit() { } } Gw3DividerComponent.decorators = [ { type: Component, args: [{ selector: 'gw1-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 */ Gw3DividerComponent.ctorParameters = () => []; Gw3DividerComponent.propDecorators = { icon: [{ type: Input }], title: [{ type: Input }], description: [{ type: Input }] }; if (false) { /** @type {?} */ Gw3DividerComponent.prototype.icon; /** @type {?} */ Gw3DividerComponent.prototype.title; /** @type {?} */ Gw3DividerComponent.prototype.description; } /** * @fileoverview added by tsickle * Generated from: lib/components/divider/divider.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class Gw3DividerModule { } Gw3DividerModule.decorators = [ { type: NgModule, args: [{ imports: [ CommonModule, ], exports: [ Gw3DividerComponent, ], declarations: [ Gw3DividerComponent, ], 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: 'gw1-fieldset', template: ` <fieldset class="fieldset-border"> <legend class="legend-border"> <ng-content select="gw1-fieldset-head"></ng-content> </legend> <ng-content></ng-content> <ng-content select="gw1-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: 'gw1-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: 'gw1-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: 'gw1-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: 'gw1-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 }] }; if (false) { /** @type {?} */ AppFieldsetIconComponent.prototype.icon; } /** @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 Gw3FieldsetModule { } Gw3FieldsetModule.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 LambInputIconComponent { constructor() { this.justify = 'end'; } /** * @return {?} */ ngOnInit() { } } LambInputIconComponent.decorators = [ { type: Component, args: [{ selector: 'gw1-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 */ LambInputIconComponent.ctorParameters = () => []; LambInputIconComponent.propDecorators = { justify: [{ type: Input }] }; if (false) { /** @type {?} */ LambInputIconComponent.prototype.justify; } /** * @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 gw3InputIconModule { } gw3InputIconModule.decorators = [ { type: NgModule, args: [{ imports: [], exports: [LambInputIconComponent], declarations: [LambInputIconComponent], 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; } } if (false) { /** @type {?} */ ConfigNames.prototype.buttonBack; /** @type {?} */ ConfigNames.prototype.buttonNext; /** @type {?} */ ConfigNames.prototype.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 } ]; if (false) { /** @type {?} */ AppStepConfig.prototype.justify; /** @type {?} */ AppStepConfig.prototype.orientation; /** @type {?} */ AppStepConfig.prototype.type; /** @type {?} */ AppStepConfig.prototype.configNames; } /** * @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 } ]; if (false) { /** @type {?} */ AppStepTitleDirective.prototype.templateRef; } class AppStepContentDirective { /** * @param {?} templateRef */ constructor(templateRef) { this.templateRef = templateRef; } } AppStepContentDirective.decorators = [ { type: Directive, args: [{ selector: 'ng-template[appStepContent]', },] } ]; /** @nocollapse */ AppStepContentDirective.ctorParameters = () => [ { type: TemplateRef } ]; if (false) { /** @type {?} */ AppStepContentDirective.prototype.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: 'gw1-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, { static: false },] }], contentTemplate: [{ type: ContentChild, args: [AppStepContentDirective, { static: false },] }] }; if (false) { /** @type {?} */ AppStepDirective.prototype.id; /** @type {?} */ AppStepDirective.prototype.title; /** @type {?} */ AppStepDirective.prototype.icon; /** * Guarda Cualquier dato. Creado por el Equipo Lamb. * @type {?} */ AppStepDirective.prototype.data; /** @type {?} */ AppStepDirective.prototype.disabled; /** @type {?} */ AppStepDirective.prototype.isValidStep; /** @type {?} */ AppStepDirective.prototype.titleTemplate; /** @type {?} */ AppStepDirective.prototype.contentTemplate; } /** * @record */ function AppStepChangeEvent() { } if (false) { /** * Id de la pestaña actualmente activa. * @type {?} */ AppStepChangeEvent.prototype.activeId; /** * Id de la pestaña recién seleccionada. * @type {?} */ AppStepChangeEvent.prototype.nextId; /** * data guardada en la pestaña actualmente activa. * @type {?} */ AppStepChangeEvent.prototype.activeData; /** * Función que evitará el cambio de pertaña si se llama. * @type {?} */ AppStepChangeEvent.prototype.preventDefault; } 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: 'gw1-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 }] }; if (false) { /** @type {?} */ AppStepGroupComponent.prototype.justifyClass; /** @type {?} */ AppStepGroupComponent.prototype.hideContent; /** @type {?} */ AppStepGroupComponent.prototype.steps; /** * Id del step que saldrá activado por defecto. * @type {?} */ AppStepGr