@tiposaurio/guido-lib
Version:
1,187 lines (1,156 loc) • 98.2 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/platform-browser'), require('rxjs/operators'), require('@angular/animations'), require('@ng-bootstrap/ng-bootstrap'), require('@angular/common'), require('@angular/core'), require('@angular/router')) :
typeof define === 'function' && define.amd ? define('@tiposaurio/guido-lib', ['exports', '@angular/platform-browser', 'rxjs/operators', '@angular/animations', '@ng-bootstrap/ng-bootstrap', '@angular/common', '@angular/core', '@angular/router'], factory) :
(factory((global.tiposaurio = global.tiposaurio || {}, global.tiposaurio['guido-lib'] = {}),global.ng.platformBrowser,global.rxjs.operators,global.ng.animations,global.ngBootstrap,global.ng.common,global.ng.core,global.ng.router));
}(this, (function (exports,platformBrowser,operators,animations,ngBootstrap,common,i0,router) { 'use strict';
/**
* @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: i0.Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
GuidoLibService.ctorParameters = function () { return []; };
/** @nocollapse */ GuidoLibService.ngInjectableDef = i0.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: i0.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: i0.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$$1, activatedRoute, titleService) {
var _this = this;
this.router = router$$1;
this.activatedRoute = activatedRoute;
this.titleService = titleService;
this.breadcrumbEvent = new i0.EventEmitter();
this.router.events
.pipe(operators.filter(( /**
* @param {?} event
* @return {?}
*/function (event) { return event instanceof router.NavigationEnd; })))
.pipe(operators.map(( /**
* @return {?}
*/function () { return _this.activatedRoute; })))
.pipe(operators.map(( /**
* @param {?} route
* @return {?}
*/function (route) {
while (route.firstChild) {
route = route.firstChild;
}
return route;
})))
.pipe(operators.filter(( /**
* @param {?} route
* @return {?}
*/function (route) { return route.outlet === 'primary'; })))
.pipe(operators.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: i0.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.Router },
{ type: router.ActivatedRoute },
{ type: platformBrowser.Title }
];
};
BreadcrumbComponent.propDecorators = {
layout: [{ type: i0.Input }],
breadcrumbEvent: [{ type: i0.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: i0.NgModule, args: [{
imports: [
common.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: i0.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: i0.Input }],
colorClass: [{ type: i0.Input }],
label: [{ type: i0.Input }],
isDisabled: [{ type: i0.Input }],
routerLink: [{ type: i0.Input }],
onlyIcon: [{ type: i0.Input }],
icon: [{ type: i0.Input }],
title: [{ type: i0.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: i0.NgModule, args: [{
imports: [
common.CommonModule,
router.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: i0.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\">×</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: ngBootstrap.NgbActiveModal }
];
};
ConfirmDialogComponent.propDecorators = {
title: [{ type: i0.Input }],
message: [{ type: i0.Input }],
btnOkText: [{ type: i0.Input }],
btnCancelText: [{ type: i0.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: i0.Injectable }
];
/** @nocollapse */
ConfirmDialogService.ctorParameters = function () {
return [
{ type: ngBootstrap.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: i0.NgModule, args: [{
imports: [
ngBootstrap.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: i0.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: i0.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: i0.Input }],
title: [{ type: i0.Input }],
description: [{ type: i0.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: i0.NgModule, args: [{
imports: [
common.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
*/
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m)
return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
ar.push(r.value);
}
catch (error) {
e = { error: error };
}
finally {
try {
if (r && !r.done && (m = i["return"]))
m.call(i);
}
finally {
if (e)
throw e.error;
}
}
return ar;
}
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
/**
* @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: i0.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: i0.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: i0.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: i0.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: i0.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: i0.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: i0.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: i0.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: i0.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: i0.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 = animations.trigger('slideOfRight', [
animations.transition(':enter', [
animations.style({ transform: 'translateX(100%)', opacity: 0 }),
animations.animate('.35s', animations.style({ transform: 'translateX(0)', 'opacity': 1 })),
]),
animations.transition(':leave', [
animations.style({ transform: 'translateX(0)', 'opacity': 1 }),
animations.animate('.35s', animations.style({ transform: 'translateX(100%)', 'opacity': 0 })),
]),
// state('next', style({ height: '0px', transform: 'scaleY(0)' /*opacity: 0*/ })),
animations.state('next', animations.style({ height: '*', transform: 'scaleY(1)' /*opacity: 1*/ })),
animations.state('back', animations.style({ height: '6px', transform: 'scaleY(0)' /*opacity: 1*/ })),
animations.transition('* => back', [
animations.style({ transform: 'translateX(100%)', display: 'block' }),
animations.animate('.35s', animations.style({ transform: 'translateX(0)', display: 'none' })),
]),
animations.transition('* => next', [
animations.style({ transform: 'translateX(0)', display: 'none' }),
animations.animate('.35s', animations.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: i0.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: i0.Directive, args: [{
selector: 'ng-template[appStepTitle]',
},] }
];
/** @nocollapse */
AppStepTitleDirective.ctorParameters = function () {
return [
{ type: i0.TemplateRef }
];
};
return AppStepTitleDirective;
}());
var AppStepContentDirective = /** @class */ (function () {
function AppStepContentDirective(templateRef) {
this.templateRef = templateRef;
}
AppStepContentDirective.decorators = [
{ type: i0.Directive, args: [{
selector: 'ng-template[appStepContent]',
},] }
];
/** @nocollapse */
AppStepContentDirective.ctorParameters = function () {
return [
{ type: i0.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: i0.Directive, args: [{
// tslint:disable-next-line:directive-selector
selector: 'gui-step',
},] }
];
AppStepDirective.propDecorators = {
id: [{ type: i0.Input }],
title: [{ type: i0.Input }],
icon: [{ type: i0.Input }],
data: [{ type: i0.Input }],
disabled: [{ type: i0.Input }],
validStep: [{ type: i0.Input }],
titleTemplate: [{ type: i0.ContentChild, args: [AppStepTitleDirective,] }],
contentTemplate: [{ type: i0.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 i0.EventEmitter();
// tslint:disable-next-line: no-output-on-prefix
this.onComplete = new i0.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 {?}
*/