bitfront-library
Version:
Angular CLI project with components and classes used by other Angular projects of the BIT foundation.
362 lines • 23.6 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BitToolbarComponent = void 0;
var core_1 = require("@angular/core");
var toolbar_service_1 = require("../service/toolbar.service");
var i0 = require("@angular/core");
var i1 = require("../service/toolbar.service");
var i2 = require("@angular/common");
var i3 = require("./bit-boton-ayuda.component");
var i4 = require("../pipe/other-actions.pipe");
function BitToolbarComponent_div_0_button_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "button", 7);
i0.ɵɵtext(1, " Accions\u00A0\u00A0");
i0.ɵɵelement(2, "span", 8);
i0.ɵɵelementEnd();
} }
function BitToolbarComponent_div_0_ng_container_3_button_1_Template(rf, ctx) { if (rf & 1) {
var _r15 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "button", 10);
i0.ɵɵlistener("click", function BitToolbarComponent_div_0_ng_container_3_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r15); var button_r11 = i0.ɵɵnextContext().$implicit; var ctx_r13 = i0.ɵɵnextContext(2); return ctx_r13.otherAction(button_r11); });
i0.ɵɵelement(1, "span");
i0.ɵɵtext(2);
i0.ɵɵelementEnd();
} if (rf & 2) {
var button_r11 = i0.ɵɵnextContext().$implicit;
i0.ɵɵproperty("disabled", !button_r11.enable);
i0.ɵɵadvance(1);
i0.ɵɵclassMap(button_r11.estilo ? button_r11.estilo : "fa fa-caret-right");
i0.ɵɵadvance(1);
i0.ɵɵtextInterpolate1("\u00A0\u00A0", button_r11.label, " ");
} }
function BitToolbarComponent_div_0_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, BitToolbarComponent_div_0_ng_container_3_button_1_Template, 3, 4, "button", 9);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
var button_r11 = ctx.$implicit;
i0.ɵɵadvance(1);
i0.ɵɵproperty("ngIf", button_r11.visible);
} }
function BitToolbarComponent_div_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "div", 3);
i0.ɵɵtemplate(1, BitToolbarComponent_div_0_button_1_Template, 3, 0, "button", 4);
i0.ɵɵelementStart(2, "div", 5);
i0.ɵɵtemplate(3, BitToolbarComponent_div_0_ng_container_3_Template, 2, 1, "ng-container", 6);
i0.ɵɵpipe(4, "otherToolbarAction");
i0.ɵɵelementEnd();
i0.ɵɵelementEnd();
} if (rf & 2) {
var ctx_r0 = i0.ɵɵnextContext();
i0.ɵɵadvance(1);
i0.ɵɵproperty("ngIf", ctx_r0.otherActionsDropdown);
i0.ɵɵadvance(2);
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(4, 2, ctx_r0.toolbar));
} }
function BitToolbarComponent_div_1_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
var _r22 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "div", 12);
i0.ɵɵelementStart(1, "button", 13);
i0.ɵɵlistener("click", function BitToolbarComponent_div_1_ng_container_1_div_1_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r22); var button_r18 = i0.ɵɵnextContext().$implicit; var ctx_r20 = i0.ɵɵnextContext(2); return ctx_r20.otherAction(button_r18); });
i0.ɵɵtext(2);
i0.ɵɵelement(3, "span");
i0.ɵɵelementEnd();
i0.ɵɵelementEnd();
} if (rf & 2) {
var button_r18 = i0.ɵɵnextContext().$implicit;
i0.ɵɵadvance(1);
i0.ɵɵproperty("disabled", !button_r18.enable);
i0.ɵɵadvance(1);
i0.ɵɵtextInterpolate1(" ", button_r18.label, "\u00A0\u00A0");
i0.ɵɵadvance(1);
i0.ɵɵclassMap(button_r18.estilo ? button_r18.estilo : "fa fa-caret-right");
} }
function BitToolbarComponent_div_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, BitToolbarComponent_div_1_ng_container_1_div_1_Template, 4, 4, "div", 2);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
var button_r18 = ctx.$implicit;
i0.ɵɵadvance(1);
i0.ɵɵproperty("ngIf", button_r18.visible);
} }
function BitToolbarComponent_div_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "div", 11);
i0.ɵɵtemplate(1, BitToolbarComponent_div_1_ng_container_1_Template, 2, 1, "ng-container", 6);
i0.ɵɵpipe(2, "otherToolbarAction");
i0.ɵɵelementEnd();
} if (rf & 2) {
var ctx_r1 = i0.ɵɵnextContext();
i0.ɵɵadvance(1);
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(2, 1, ctx_r1.toolbar));
} }
function BitToolbarComponent_div_2_Template(rf, ctx) { if (rf & 1) {
var _r25 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "div", 12);
i0.ɵɵelementStart(1, "button", 14);
i0.ɵɵlistener("click", function BitToolbarComponent_div_2_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r25); var ctx_r24 = i0.ɵɵnextContext(); return ctx_r24.newElement(); });
i0.ɵɵtext(2);
i0.ɵɵelement(3, "span");
i0.ɵɵelementEnd();
i0.ɵɵelementEnd();
} if (rf & 2) {
var ctx_r2 = i0.ɵɵnextContext();
i0.ɵɵadvance(1);
i0.ɵɵproperty("disabled", !ctx_r2.enable("new"));
i0.ɵɵadvance(1);
i0.ɵɵtextInterpolate1(" ", ctx_r2.label("new", ctx_r2.femenino ? "Nova" : "Nou"), "\u00A0\u00A0");
i0.ɵɵadvance(1);
i0.ɵɵclassMap(ctx_r2.estilo("new", "fa fa-plus"));
} }
function BitToolbarComponent_div_3_Template(rf, ctx) { if (rf & 1) {
var _r27 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "div", 12);
i0.ɵɵelementStart(1, "button", 14);
i0.ɵɵlistener("click", function BitToolbarComponent_div_3_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r27); var ctx_r26 = i0.ɵɵnextContext(); return ctx_r26.add(); });
i0.ɵɵtext(2);
i0.ɵɵelement(3, "span");
i0.ɵɵelementEnd();
i0.ɵɵelementEnd();
} if (rf & 2) {
var ctx_r3 = i0.ɵɵnextContext();
i0.ɵɵadvance(1);
i0.ɵɵproperty("disabled", !ctx_r3.enable("add"));
i0.ɵɵadvance(1);
i0.ɵɵtextInterpolate1(" ", ctx_r3.label("nova", "Afegeix"), "\u00A0\u00A0");
i0.ɵɵadvance(1);
i0.ɵɵclassMap(ctx_r3.estilo("add", "fa fa-plus"));
} }
function BitToolbarComponent_div_4_Template(rf, ctx) { if (rf & 1) {
var _r29 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "div", 12);
i0.ɵɵelementStart(1, "button", 15);
i0.ɵɵlistener("click", function BitToolbarComponent_div_4_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r29); var ctx_r28 = i0.ɵɵnextContext(); return ctx_r28.exportData(); });
i0.ɵɵtext(2);
i0.ɵɵelement(3, "span");
i0.ɵɵelementEnd();
i0.ɵɵelementEnd();
} if (rf & 2) {
var ctx_r4 = i0.ɵɵnextContext();
i0.ɵɵadvance(1);
i0.ɵɵproperty("disabled", !ctx_r4.enable("export"));
i0.ɵɵadvance(1);
i0.ɵɵtextInterpolate1(" ", ctx_r4.label("export", "Exporta"), "\u00A0\u00A0");
i0.ɵɵadvance(1);
i0.ɵɵclassMap(ctx_r4.estilo("export", "glyphicon glyphicon-file"));
} }
function BitToolbarComponent_div_5_Template(rf, ctx) { if (rf & 1) {
var _r31 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "div", 12);
i0.ɵɵelementStart(1, "button", 16);
i0.ɵɵlistener("click", function BitToolbarComponent_div_5_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r31); var ctx_r30 = i0.ɵɵnextContext(); return ctx_r30.save(); });
i0.ɵɵtext(2);
i0.ɵɵelement(3, "span");
i0.ɵɵelementEnd();
i0.ɵɵelementEnd();
} if (rf & 2) {
var ctx_r5 = i0.ɵɵnextContext();
i0.ɵɵadvance(1);
i0.ɵɵproperty("disabled", !ctx_r5.enable("save"));
i0.ɵɵadvance(1);
i0.ɵɵtextInterpolate1(" ", ctx_r5.label("save", "Desa"), "\u00A0\u00A0");
i0.ɵɵadvance(1);
i0.ɵɵclassMap(ctx_r5.estilo("save", "glyphicon glyphicon-floppy-disk"));
} }
function BitToolbarComponent_div_6_Template(rf, ctx) { if (rf & 1) {
var _r33 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "div", 12);
i0.ɵɵelementStart(1, "button", 17);
i0.ɵɵlistener("click", function BitToolbarComponent_div_6_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r33); var ctx_r32 = i0.ɵɵnextContext(); return ctx_r32.delete(); });
i0.ɵɵtext(2);
i0.ɵɵelement(3, "span");
i0.ɵɵelementEnd();
i0.ɵɵelementEnd();
} if (rf & 2) {
var ctx_r6 = i0.ɵɵnextContext();
i0.ɵɵadvance(1);
i0.ɵɵproperty("disabled", !ctx_r6.enable("delete"));
i0.ɵɵadvance(1);
i0.ɵɵtextInterpolate1(" ", ctx_r6.label("delete", "Elimina"), "\u00A0\u00A0");
i0.ɵɵadvance(1);
i0.ɵɵclassMap(ctx_r6.estilo("delete", "glyphicon glyphicon-remove"));
} }
function BitToolbarComponent_div_7_Template(rf, ctx) { if (rf & 1) {
var _r35 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "div", 12);
i0.ɵɵelementStart(1, "button", 15);
i0.ɵɵlistener("click", function BitToolbarComponent_div_7_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r35); var ctx_r34 = i0.ɵɵnextContext(); return ctx_r34.print(); });
i0.ɵɵtext(2);
i0.ɵɵelement(3, "span");
i0.ɵɵelementEnd();
i0.ɵɵelementEnd();
} if (rf & 2) {
var ctx_r7 = i0.ɵɵnextContext();
i0.ɵɵadvance(1);
i0.ɵɵproperty("disabled", !ctx_r7.enable("print"));
i0.ɵɵadvance(1);
i0.ɵɵtextInterpolate1(" ", ctx_r7.label("print", "Imprimeix"), "\u00A0\u00A0");
i0.ɵɵadvance(1);
i0.ɵɵclassMap(ctx_r7.estilo("print", "glyphicon glyphicon-print"));
} }
function BitToolbarComponent_div_8_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "div", 12);
i0.ɵɵelement(1, "bit-boton-ayuda", 18);
i0.ɵɵelementEnd();
} if (rf & 2) {
var ctx_r8 = i0.ɵɵnextContext();
i0.ɵɵadvance(1);
i0.ɵɵproperty("ayuda", ctx_r8.ayuda);
} }
/**
* Componenente que muestra una barra de botones.
* @Input() componentId contiene el identificador del componente que contiene este toolbar. Es opcional en cuyo caso el valor será "BASE"
* @Output() onToolbarButtonPressed. El componente captura la pulsación de estos botones y envia un evento onToolbarButtonPressed con el nombre del
* botón pulsado.
**/
var BitToolbarComponent = /** @class */ (function () {
function BitToolbarComponent(toolbarService) {
this.toolbarOld = {}; // ya no se usa
this.femenino = false; // género femenino (para los nombres de botones) o no
this.componentId = "BASE"; // id del componente donde está asociado el toolbar por defecto BASE
this.otherActionsDropdown = false; // determina si las "other actions" deben mostrarse en línea o como un desplegable
this.onToolbarButtonPressed = new core_1.EventEmitter();
this.toolbar = {};
this.toolbarService = toolbarService;
}
BitToolbarComponent.prototype.ngAfterContentInit = function () {
console.log("soy el ToolbarComponent " + this.componentId);
this.registerObservable();
};
BitToolbarComponent.prototype.registerObservable = function () {
var _this = this;
this.toolbarSubscription = this.toolbarService.observableToolbar.subscribe(function (newToolbar) {
if (!newToolbar) {
return; // un evento sin toolbar, no hay nada que hacer
}
if (!_this.componentId) {
// si no tenemos componentId somos el único toolbar en pantalla, lo aceptamos sí o sí
_this.setToolbar(newToolbar);
}
else {
// tenemos componentId, por lo que probablemente hay varios toolbar simultáneos en pantalla
// comprobamos si el evento indica que ha cambiado el que nos interesa y, en caso contrario, lo ignoramos
if (_this.componentId === newToolbar.componentId) {
_this.setToolbar(newToolbar);
}
}
});
};
BitToolbarComponent.prototype.enable = function (button) {
return this.toolbar[button] && this.toolbar[button].enable;
};
BitToolbarComponent.prototype.visible = function (button) {
return this.toolbar[button] && this.toolbar[button].visible;
};
BitToolbarComponent.prototype.label = function (button, defaultLabel) {
return (this.toolbar[button] && this.toolbar[button].label) || defaultLabel;
};
BitToolbarComponent.prototype.estilo = function (button, defaultValue) {
return (this.toolbar[button] && this.toolbar[button].estilo) || defaultValue || "fa fa-balance-spinner";
};
BitToolbarComponent.prototype.showFilter = function () {
this.onToolbarButtonPressed.emit(BitToolbarComponent.FILTER_BUTTON);
};
BitToolbarComponent.prototype.print = function () {
this.onToolbarButtonPressed.emit(BitToolbarComponent.PRINT_BUTTON);
};
BitToolbarComponent.prototype.exportData = function () {
this.onToolbarButtonPressed.emit(BitToolbarComponent.EXPORT_BUTTON);
};
BitToolbarComponent.prototype.newElement = function () {
this.onToolbarButtonPressed.emit(BitToolbarComponent.NEW_BUTTON);
};
BitToolbarComponent.prototype.add = function () {
this.onToolbarButtonPressed.emit(BitToolbarComponent.ADD_BUTTON);
};
BitToolbarComponent.prototype.save = function () {
this.onToolbarButtonPressed.emit(BitToolbarComponent.SAVE_BUTTON);
};
BitToolbarComponent.prototype.delete = function () {
this.onToolbarButtonPressed.emit(BitToolbarComponent.DELETE_BUTTON);
};
BitToolbarComponent.prototype.otherAction = function (button) {
this.onToolbarButtonPressed.emit(button.action);
};
BitToolbarComponent.prototype.ngOnDestroy = function () {
this.toolbarSubscription.unsubscribe();
};
BitToolbarComponent.prototype.setToolbar = function (newToolbar) {
this.toolbar = newToolbar;
// calcular si las other actions deben mostrarse en desplegable
// (se ha pedido asi y hay más de una)
var otherActionsVisibles = 0;
for (var key in this.toolbar) {
if (this.toolbar[key].otherAction && this.toolbar[key].visible) {
otherActionsVisibles++;
}
}
this.mostrarOtherActionsEnDesplegable = this.otherActionsDropdown && otherActionsVisibles > 1;
};
BitToolbarComponent.FILTER_BUTTON = "filter";
BitToolbarComponent.PRINT_BUTTON = "print";
BitToolbarComponent.EXPORT_BUTTON = "export";
BitToolbarComponent.NEW_BUTTON = "new";
BitToolbarComponent.SAVE_BUTTON = "save";
BitToolbarComponent.DELETE_BUTTON = "delete";
BitToolbarComponent.ADD_BUTTON = "add";
BitToolbarComponent.HELP_BUTTON = "help";
BitToolbarComponent.ɵfac = function BitToolbarComponent_Factory(t) { return new (t || BitToolbarComponent)(i0.ɵɵdirectiveInject(i1.ToolbarService)); };
BitToolbarComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BitToolbarComponent, selectors: [["bit-toolbar"]], inputs: { toolbarOld: ["toolbar", "toolbarOld"], ayuda: "ayuda", femenino: "femenino", componentId: "componentId", otherActionsDropdown: "otherActionsDropdown" }, outputs: { onToolbarButtonPressed: "onToolbarButtonPressed" }, decls: 9, vars: 9, consts: [["class", "btn-group dropdown", "role", "group", 4, "ngIf"], ["class", "btn-inline", 4, "ngIf"], ["class", "btn-group", "role", "group", 4, "ngIf"], ["role", "group", 1, "btn-group", "dropdown"], ["type", "button", "class", "btn btn-dinamico btn-accion dropdown-toggle", "data-toggle", "dropdown", "aria-haspopup", "true", "aria-expanded", "false", 4, "ngIf"], [1, "dropdown-menu", "desplegable-accion"], [4, "ngFor", "ngForOf"], ["type", "button", "data-toggle", "dropdown", "aria-haspopup", "true", "aria-expanded", "false", 1, "btn", "btn-dinamico", "btn-accion", "dropdown-toggle"], [1, "fa", "fa-caret-right"], ["type", "button", "class", "btn btn-dinamico btn-accion dropdown-item", 3, "disabled", "click", 4, "ngIf"], ["type", "button", 1, "btn", "btn-dinamico", "btn-accion", "dropdown-item", 3, "disabled", "click"], [1, "btn-inline"], ["role", "group", 1, "btn-group"], ["type", "button", 1, "btn", "btn-dinamico", "btn-accion", 3, "disabled", "click"], ["type", "button", 1, "btn", "btn-danger", 3, "disabled", "click"], ["type", "button", 1, "btn", "btn-transparent", 3, "disabled", "click"], ["type", "button", 1, "btn", "btn-success", 3, "disabled", "click"], ["type", "button", 1, "btn", "btn-transparent", "btn-transparent-danger", 3, "disabled", "click"], ["boton", "true", 3, "ayuda"]], template: function BitToolbarComponent_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, BitToolbarComponent_div_0_Template, 5, 4, "div", 0);
i0.ɵɵtemplate(1, BitToolbarComponent_div_1_Template, 3, 3, "div", 1);
i0.ɵɵtemplate(2, BitToolbarComponent_div_2_Template, 4, 4, "div", 2);
i0.ɵɵtemplate(3, BitToolbarComponent_div_3_Template, 4, 4, "div", 2);
i0.ɵɵtemplate(4, BitToolbarComponent_div_4_Template, 4, 4, "div", 2);
i0.ɵɵtemplate(5, BitToolbarComponent_div_5_Template, 4, 4, "div", 2);
i0.ɵɵtemplate(6, BitToolbarComponent_div_6_Template, 4, 4, "div", 2);
i0.ɵɵtemplate(7, BitToolbarComponent_div_7_Template, 4, 4, "div", 2);
i0.ɵɵtemplate(8, BitToolbarComponent_div_8_Template, 2, 1, "div", 2);
} if (rf & 2) {
i0.ɵɵproperty("ngIf", ctx.mostrarOtherActionsEnDesplegable);
i0.ɵɵadvance(1);
i0.ɵɵproperty("ngIf", !ctx.mostrarOtherActionsEnDesplegable);
i0.ɵɵadvance(1);
i0.ɵɵproperty("ngIf", ctx.visible("new"));
i0.ɵɵadvance(1);
i0.ɵɵproperty("ngIf", ctx.visible("add"));
i0.ɵɵadvance(1);
i0.ɵɵproperty("ngIf", ctx.visible("export"));
i0.ɵɵadvance(1);
i0.ɵɵproperty("ngIf", ctx.visible("save"));
i0.ɵɵadvance(1);
i0.ɵɵproperty("ngIf", ctx.visible("delete"));
i0.ɵɵadvance(1);
i0.ɵɵproperty("ngIf", ctx.visible("print"));
i0.ɵɵadvance(1);
i0.ɵɵproperty("ngIf", ctx.ayuda);
} }, directives: [i2.NgIf, i2.NgForOf, i3.BitBotonAyudaComponent], pipes: [i4.OtherToolbarActionPipe], encapsulation: 2 });
return BitToolbarComponent;
}());
exports.BitToolbarComponent = BitToolbarComponent;
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BitToolbarComponent, [{
type: core_1.Component,
args: [{
selector: "bit-toolbar",
template: "\n <!-- acciones no estandar definidas din\u00E1micamente o muy particulares-->\n <!-- si otherActionsDropdown viene a true y hay m\u00E1s de una acci\u00F3n, se muestran como un desplegable, si no, todas las acciones en l\u00EDnea -->\n <div class=\"btn-group dropdown\" role=\"group\" *ngIf=\"mostrarOtherActionsEnDesplegable\">\n <button\n type=\"button\"\n *ngIf=\"otherActionsDropdown\"\n class=\"btn btn-dinamico btn-accion dropdown-toggle\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n >\n Accions <span class=\"fa fa-caret-right\"></span>\n </button>\n <div class=\"dropdown-menu desplegable-accion\">\n <ng-container *ngFor=\"let button of toolbar | otherToolbarAction\">\n <button\n type=\"button\"\n *ngIf=\"button.visible\"\n [disabled]=\"!button.enable\"\n (click)=\"otherAction(button)\"\n class=\"btn btn-dinamico btn-accion dropdown-item\"\n >\n <span [class]=\"button.estilo ? button.estilo : 'fa fa-caret-right'\"></span> {{ button.label }}\n </button>\n </ng-container>\n </div>\n </div>\n\n <!-- si otherActionsDropdown viene a false o solo hay una acci\u00F3n, se muestran una tras otra en l\u00EDnea -->\n <div class=\"btn-inline\" *ngIf=\"!mostrarOtherActionsEnDesplegable\">\n <ng-container *ngFor=\"let button of toolbar | otherToolbarAction\">\n <div *ngIf=\"button.visible\" class=\"btn-group\" role=\"group\">\n <button\n type=\"button\"\n [disabled]=\"!button.enable\"\n (click)=\"otherAction(button)\"\n class=\"btn btn-dinamico btn-accion\"\n >\n {{ button.label }} <span [class]=\"button.estilo ? button.estilo : 'fa fa-caret-right'\"></span>\n </button>\n </div>\n </ng-container>\n </div>\n\n <!-- acciones estandar -->\n <div class=\"btn-group\" role=\"group\" *ngIf=\"visible('new')\">\n <button type=\"button\" [disabled]=\"!enable('new')\" (click)=\"newElement()\" class=\"btn btn-danger\">\n {{ label(\"new\", femenino ? \"Nova\" : \"Nou\") }} <span [class]=\"estilo('new', 'fa fa-plus')\"></span>\n </button>\n </div>\n <div class=\"btn-group\" role=\"group\" *ngIf=\"visible('add')\">\n <button type=\"button\" [disabled]=\"!enable('add')\" (click)=\"add()\" class=\"btn btn-danger\">\n {{ label(\"nova\", \"Afegeix\") }} <span [class]=\"estilo('add', 'fa fa-plus')\"></span>\n </button>\n </div>\n <!--div class=\"btn-group\" role=\"group\" *ngIf=\"visible('filter')\">\n <button type=\"button\" [disabled]=\"!enable('filter')\" (click)=\"showFilter()\" class=\"btn btn-transparent\">{{label('filter', 'Mostra filtre')}} <span [class]=\"estilo('filter', 'glyphicon glyphicon-search')\"></span></button>\n</div-->\n <div class=\"btn-group\" role=\"group\" *ngIf=\"visible('export')\">\n <button type=\"button\" [disabled]=\"!enable('export')\" (click)=\"exportData()\" class=\"btn btn-transparent\">\n {{ label(\"export\", \"Exporta\") }} <span [class]=\"estilo('export', 'glyphicon glyphicon-file')\"></span>\n </button>\n </div>\n <div class=\"btn-group\" role=\"group\" *ngIf=\"visible('save')\">\n <button type=\"button\" [disabled]=\"!enable('save')\" (click)=\"save()\" class=\"btn btn-success\">\n {{ label(\"save\", \"Desa\") }} <span [class]=\"estilo('save', 'glyphicon glyphicon-floppy-disk')\"></span>\n </button>\n </div>\n <div class=\"btn-group\" role=\"group\" *ngIf=\"visible('delete')\">\n <button\n type=\"button\"\n [disabled]=\"!enable('delete')\"\n (click)=\"delete()\"\n class=\"btn btn-transparent btn-transparent-danger\"\n >\n {{ label(\"delete\", \"Elimina\") }} <span\n [class]=\"estilo('delete', 'glyphicon glyphicon-remove')\"\n ></span>\n </button>\n </div>\n <div class=\"btn-group\" role=\"group\" *ngIf=\"visible('print')\">\n <button type=\"button\" [disabled]=\"!enable('print')\" (click)=\"print()\" class=\"btn btn-transparent\">\n {{ label(\"print\", \"Imprimeix\") }} <span\n [class]=\"estilo('print', 'glyphicon glyphicon-print')\"\n ></span>\n </button>\n </div>\n <div class=\"btn-group\" role=\"group\" *ngIf=\"ayuda\">\n <bit-boton-ayuda boton=\"true\" [ayuda]=\"ayuda\"></bit-boton-ayuda>\n </div>\n "
}]
}], function () { return [{ type: i1.ToolbarService }]; }, { toolbarOld: [{
type: core_1.Input,
args: ["toolbar"]
}], ayuda: [{
type: core_1.Input,
args: ["ayuda"]
}], femenino: [{
type: core_1.Input
}], componentId: [{
type: core_1.Input
}], otherActionsDropdown: [{
type: core_1.Input
}], onToolbarButtonPressed: [{
type: core_1.Output
}] }); })();
//# sourceMappingURL=bit-toolbar.component.js.map