bit-ng-library 19.0.10 → 19.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -26,6 +26,14 @@ To get more help on the Angular CLI use `ng help` or go check out the [Angular C
26
26
 
27
27
  ## changelog
28
28
 
29
+ ## [19.0.12] - 2025-06-17
30
+
31
+ Solución de bufixes en la versión 19.0.11 en la parte de bit-notificacion-error.
32
+
33
+ ## [19.0.11] - 2025-06-11
34
+
35
+ Se modifica la toolbar para utilizar p-splitbutton para los menús con acciones contextuales
36
+
29
37
  ## [19.0.10] - 2025-06-11
30
38
 
31
39
  Nueva versión de bit-notificacion-error funcionando con p-toast visto que prime en su versión 19 ha decidido que p-messages sirva para otra cosa.
@@ -71,7 +71,6 @@ import { ChipModule } from 'primeng/chip';
71
71
  import { ToggleButtonModule } from 'primeng/togglebutton';
72
72
  import { SplitterModule } from 'primeng/splitter';
73
73
  import { ScrollPanelModule } from 'primeng/scrollpanel';
74
- import * as i3$3 from 'primeng/tieredmenu';
75
74
  import { TieredMenuModule } from 'primeng/tieredmenu';
76
75
  import { InputMaskModule } from 'primeng/inputmask';
77
76
  import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
@@ -80,6 +79,7 @@ import * as i2$6 from 'primeng/selectbutton';
80
79
  import { SelectButtonModule } from 'primeng/selectbutton';
81
80
  import * as i4 from 'primeng/ripple';
82
81
  import { RippleModule } from 'primeng/ripple';
82
+ import * as i3$3 from 'primeng/splitbutton';
83
83
  import { SplitButtonModule } from 'primeng/splitbutton';
84
84
  import { OverlayPanelModule } from 'primeng/overlaypanel';
85
85
  import { signalStore, withState, withMethods, patchState, withComputed } from '@ngrx/signals';
@@ -477,9 +477,11 @@ class BitMessageService {
477
477
  this.observableNotificacionsErrorsSource.next(bitNotificationError);
478
478
  }
479
479
  hideNotificacionErrorPanel() {
480
+ console.log("hideNotificacionErrorPanel");
480
481
  this.observableNotificacionsErrorsSource.next(null);
481
482
  }
482
483
  hideNotificacionPanel() {
484
+ console.log("hideNotificacionPanel");
483
485
  this.observableNotificationsSource.next(null);
484
486
  }
485
487
  hideMessagePanel() {
@@ -651,7 +653,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImpor
651
653
  * @param params Hashmap de tipo nombre propiedad, valor que permitirá customizar el mensaje a traducir
652
654
  */
653
655
  function buildTranslatedMessage(code, context, params) {
654
- let translatedMessage = { code: code, context, params: params };
656
+ // la nueva versión de transloco quiere un null y no una cadena vacía
657
+ let newContext = !context ? null : context;
658
+ let translatedMessage = { code: code, context: newContext, params: params };
655
659
  return translatedMessage;
656
660
  }
657
661
  /** wrapper al servicio de traducción de textos */
@@ -3169,11 +3173,11 @@ class BitToolbarComponent extends BaseComponent {
3169
3173
  return actions;
3170
3174
  }
3171
3175
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: BitToolbarComponent, deps: [{ token: TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
3172
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.6", type: BitToolbarComponent, isStandalone: false, selector: "bit-toolbar", inputs: { toolbar: "toolbar", ayuda: "ayuda", femenino: "femenino", buttonSize: "buttonSize", otherActionsDropdown: "otherActionsDropdown" }, outputs: { onToolbarButtonPressed: "onToolbarButtonPressed" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- 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=\"contenedor-toolbar\">\n\n @if (mostrarOtherActionsEnDesplegable) {\n @if (otherActionsDropdown) {\n <p-button (click)=\"menu.toggle($event)\" [size]=\"buttonSize\"\n styleClass=\"p-button-primary\" icon=\"pi pi-caret-right\" iconPos=\"right\" label=\"{{'bitnglibrary.toolbar.other-actions' | transloco}}\"></p-button>\n <p-tieredMenu #menu [model]=\"itemsOtherActions\" [popup]=\"true\"></p-tieredMenu>\n }\n }\n\n <!-- si otherActionsDropdown viene a false o solo hay una acci\u00F3n, se muestran una tras otra en l\u00EDnea -->\n @if (!mostrarOtherActionsEnDesplegable) {\n @for (button of (toolbar | otherToolbarAction); track button) {\n @if (button.visible) {\n <p-button type=\"button\" [disabled]=\"!button.enable\" (click)=\"otherAction(button)\" [size]=\"buttonSize\">{{\"bitnglibrary.toolbar.\"+button.label | transloco}}&nbsp;&nbsp;<span [class]=\"button.estilo?button.estilo:'pi pi-angle-right'\"></span></p-button>\n }\n }\n }\n <!-- acciones estandar -->\n @if (visible('new')) {\n <p-button type=\"button\" [disabled]=\"!enable('new')\" (click)=\"newElement()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{(femenino ? \"bitnglibrary.toolbar.new-female\": \"bitnglibrary.toolbar.new\") | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('new', 'pi pi-plus')\"></span></p-button>\n }\n @if (visible('add')) {\n <p-button type=\"button\" [disabled]=\"!enable('add')\" (click)=\"add()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.add\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('add', 'pi pi-plus')\"></span></p-button>\n }\n\n @if (visible('export')) {\n <p-button type=\"button\" [disabled]=\"!enable('export')\" (click)=\"exportData()\" [size]=\"buttonSize\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.export\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('export', 'pi pi-file')\"></span></p-button>\n }\n @if (visible('save')) {\n <p-button type=\"button\" [disabled]=\"!enable('save')\" (click)=\"save()\" [size]=\"buttonSize\" styleClass=\"p-button-success\">{{\"bitnglibrary.toolbar.save\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('save', 'pi pi-save')\"></span></p-button>\n }\n @if (visible('delete')) {\n <p-button type=\"button\" [disabled]=\"!enable('delete')\" (click)=\"delete()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.delete\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('delete', 'pi pi-trash')\"></span></p-button>\n }\n @if (visible('print')) {\n <p-button type=\"button\" [disabled]=\"!enable('print')\" (click)=\"print()\" [size]=\"buttonSize\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.print\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('print', 'pi pi-print')\"></span></p-button>\n }\n @if (ayuda) {\n <bit-boton-ayuda boton=\"true\" [ayuda]=\"ayuda\" [buttonSize]=\"buttonSize\"></bit-boton-ayuda>\n }\n</div>\n", dependencies: [{ kind: "component", type: i3$2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3$3.TieredMenu, selector: "p-tieredMenu, p-tieredmenu, p-tiered-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "breakpoint", "autoZIndex", "baseZIndex", "autoDisplay", "showTransitionOptions", "hideTransitionOptions", "id", "ariaLabel", "ariaLabelledBy", "disabled", "tabindex"], outputs: ["onShow", "onHide"] }, { kind: "component", type: BitBotonAyudaComponent, selector: "bit-boton-ayuda", inputs: ["ayuda", "boton", "extraClass", "buttonSize"] }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: OtherToolbarActionPipe, name: "otherToolbarAction" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3176
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.6", type: BitToolbarComponent, isStandalone: false, selector: "bit-toolbar", inputs: { toolbar: "toolbar", ayuda: "ayuda", femenino: "femenino", buttonSize: "buttonSize", otherActionsDropdown: "otherActionsDropdown" }, outputs: { onToolbarButtonPressed: "onToolbarButtonPressed" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- 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=\"contenedor-toolbar\">\n\n @if (mostrarOtherActionsEnDesplegable) {\n @if (otherActionsDropdown) {\n <p-splitbutton label=\"{{'bitnglibrary.toolbar.other-actions' | transloco}}\" [model]=\"itemsOtherActions\" />\n }\n }\n\n <!-- si otherActionsDropdown viene a false o solo hay una acci\u00F3n, se muestran una tras otra en l\u00EDnea -->\n @if (!mostrarOtherActionsEnDesplegable) {\n @for (button of (toolbar | otherToolbarAction); track button) {\n @if (button.visible) {\n <p-button type=\"button\" [disabled]=\"!button.enable\" (click)=\"otherAction(button)\" [size]=\"buttonSize\">{{\"bitnglibrary.toolbar.\"+button.label | transloco}}&nbsp;&nbsp;<span [class]=\"button.estilo?button.estilo:'pi pi-angle-right'\"></span></p-button>\n }\n }\n }\n <!-- acciones estandar -->\n @if (visible('new')) {\n <p-button type=\"button\" [disabled]=\"!enable('new')\" (click)=\"newElement()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{(femenino ? \"bitnglibrary.toolbar.new-female\": \"bitnglibrary.toolbar.new\") | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('new', 'pi pi-plus')\"></span></p-button>\n }\n @if (visible('add')) {\n <p-button type=\"button\" [disabled]=\"!enable('add')\" (click)=\"add()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.add\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('add', 'pi pi-plus')\"></span></p-button>\n }\n\n @if (visible('export')) {\n <p-button type=\"button\" [disabled]=\"!enable('export')\" (click)=\"exportData()\" [size]=\"buttonSize\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.export\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('export', 'pi pi-file')\"></span></p-button>\n }\n @if (visible('save')) {\n <p-button type=\"button\" [disabled]=\"!enable('save')\" (click)=\"save()\" [size]=\"buttonSize\" styleClass=\"p-button-success\">{{\"bitnglibrary.toolbar.save\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('save', 'pi pi-save')\"></span></p-button>\n }\n @if (visible('delete')) {\n <p-button type=\"button\" [disabled]=\"!enable('delete')\" (click)=\"delete()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.delete\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('delete', 'pi pi-trash')\"></span></p-button>\n }\n @if (visible('print')) {\n <p-button type=\"button\" [disabled]=\"!enable('print')\" (click)=\"print()\" [size]=\"buttonSize\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.print\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('print', 'pi pi-print')\"></span></p-button>\n }\n @if (ayuda) {\n <bit-boton-ayuda boton=\"true\" [ayuda]=\"ayuda\" [buttonSize]=\"buttonSize\"></bit-boton-ayuda>\n }\n</div>\n", dependencies: [{ kind: "component", type: i3$2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3$3.SplitButton, selector: "p-splitbutton, p-splitButton, p-split-button", inputs: ["model", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "icon", "iconPos", "label", "tooltip", "tooltipOptions", "style", "styleClass", "menuStyle", "menuStyleClass", "dropdownIcon", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions", "buttonProps", "menuButtonProps", "autofocus", "disabled", "tabindex", "menuButtonDisabled", "buttonDisabled"], outputs: ["onClick", "onMenuHide", "onMenuShow", "onDropdownClick"] }, { kind: "component", type: BitBotonAyudaComponent, selector: "bit-boton-ayuda", inputs: ["ayuda", "boton", "extraClass", "buttonSize"] }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: OtherToolbarActionPipe, name: "otherToolbarAction" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3173
3177
  }
3174
3178
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: BitToolbarComponent, decorators: [{
3175
3179
  type: Component,
3176
- args: [{ selector: "bit-toolbar", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<!-- 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=\"contenedor-toolbar\">\n\n @if (mostrarOtherActionsEnDesplegable) {\n @if (otherActionsDropdown) {\n <p-button (click)=\"menu.toggle($event)\" [size]=\"buttonSize\"\n styleClass=\"p-button-primary\" icon=\"pi pi-caret-right\" iconPos=\"right\" label=\"{{'bitnglibrary.toolbar.other-actions' | transloco}}\"></p-button>\n <p-tieredMenu #menu [model]=\"itemsOtherActions\" [popup]=\"true\"></p-tieredMenu>\n }\n }\n\n <!-- si otherActionsDropdown viene a false o solo hay una acci\u00F3n, se muestran una tras otra en l\u00EDnea -->\n @if (!mostrarOtherActionsEnDesplegable) {\n @for (button of (toolbar | otherToolbarAction); track button) {\n @if (button.visible) {\n <p-button type=\"button\" [disabled]=\"!button.enable\" (click)=\"otherAction(button)\" [size]=\"buttonSize\">{{\"bitnglibrary.toolbar.\"+button.label | transloco}}&nbsp;&nbsp;<span [class]=\"button.estilo?button.estilo:'pi pi-angle-right'\"></span></p-button>\n }\n }\n }\n <!-- acciones estandar -->\n @if (visible('new')) {\n <p-button type=\"button\" [disabled]=\"!enable('new')\" (click)=\"newElement()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{(femenino ? \"bitnglibrary.toolbar.new-female\": \"bitnglibrary.toolbar.new\") | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('new', 'pi pi-plus')\"></span></p-button>\n }\n @if (visible('add')) {\n <p-button type=\"button\" [disabled]=\"!enable('add')\" (click)=\"add()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.add\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('add', 'pi pi-plus')\"></span></p-button>\n }\n\n @if (visible('export')) {\n <p-button type=\"button\" [disabled]=\"!enable('export')\" (click)=\"exportData()\" [size]=\"buttonSize\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.export\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('export', 'pi pi-file')\"></span></p-button>\n }\n @if (visible('save')) {\n <p-button type=\"button\" [disabled]=\"!enable('save')\" (click)=\"save()\" [size]=\"buttonSize\" styleClass=\"p-button-success\">{{\"bitnglibrary.toolbar.save\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('save', 'pi pi-save')\"></span></p-button>\n }\n @if (visible('delete')) {\n <p-button type=\"button\" [disabled]=\"!enable('delete')\" (click)=\"delete()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.delete\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('delete', 'pi pi-trash')\"></span></p-button>\n }\n @if (visible('print')) {\n <p-button type=\"button\" [disabled]=\"!enable('print')\" (click)=\"print()\" [size]=\"buttonSize\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.print\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('print', 'pi pi-print')\"></span></p-button>\n }\n @if (ayuda) {\n <bit-boton-ayuda boton=\"true\" [ayuda]=\"ayuda\" [buttonSize]=\"buttonSize\"></bit-boton-ayuda>\n }\n</div>\n" }]
3180
+ args: [{ selector: "bit-toolbar", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<!-- 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=\"contenedor-toolbar\">\n\n @if (mostrarOtherActionsEnDesplegable) {\n @if (otherActionsDropdown) {\n <p-splitbutton label=\"{{'bitnglibrary.toolbar.other-actions' | transloco}}\" [model]=\"itemsOtherActions\" />\n }\n }\n\n <!-- si otherActionsDropdown viene a false o solo hay una acci\u00F3n, se muestran una tras otra en l\u00EDnea -->\n @if (!mostrarOtherActionsEnDesplegable) {\n @for (button of (toolbar | otherToolbarAction); track button) {\n @if (button.visible) {\n <p-button type=\"button\" [disabled]=\"!button.enable\" (click)=\"otherAction(button)\" [size]=\"buttonSize\">{{\"bitnglibrary.toolbar.\"+button.label | transloco}}&nbsp;&nbsp;<span [class]=\"button.estilo?button.estilo:'pi pi-angle-right'\"></span></p-button>\n }\n }\n }\n <!-- acciones estandar -->\n @if (visible('new')) {\n <p-button type=\"button\" [disabled]=\"!enable('new')\" (click)=\"newElement()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{(femenino ? \"bitnglibrary.toolbar.new-female\": \"bitnglibrary.toolbar.new\") | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('new', 'pi pi-plus')\"></span></p-button>\n }\n @if (visible('add')) {\n <p-button type=\"button\" [disabled]=\"!enable('add')\" (click)=\"add()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.add\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('add', 'pi pi-plus')\"></span></p-button>\n }\n\n @if (visible('export')) {\n <p-button type=\"button\" [disabled]=\"!enable('export')\" (click)=\"exportData()\" [size]=\"buttonSize\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.export\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('export', 'pi pi-file')\"></span></p-button>\n }\n @if (visible('save')) {\n <p-button type=\"button\" [disabled]=\"!enable('save')\" (click)=\"save()\" [size]=\"buttonSize\" styleClass=\"p-button-success\">{{\"bitnglibrary.toolbar.save\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('save', 'pi pi-save')\"></span></p-button>\n }\n @if (visible('delete')) {\n <p-button type=\"button\" [disabled]=\"!enable('delete')\" (click)=\"delete()\" [size]=\"buttonSize\" styleClass=\"p-button-danger\">{{\"bitnglibrary.toolbar.delete\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('delete', 'pi pi-trash')\"></span></p-button>\n }\n @if (visible('print')) {\n <p-button type=\"button\" [disabled]=\"!enable('print')\" (click)=\"print()\" [size]=\"buttonSize\" styleClass=\"p-button-secondary\">{{\"bitnglibrary.toolbar.print\" | transloco}}&nbsp;&nbsp;<span [class]=\"estilo('print', 'pi pi-print')\"></span></p-button>\n }\n @if (ayuda) {\n <bit-boton-ayuda boton=\"true\" [ayuda]=\"ayuda\" [buttonSize]=\"buttonSize\"></bit-boton-ayuda>\n }\n</div>\n" }]
3177
3181
  }], ctorParameters: () => [{ type: TranslateService }], propDecorators: { toolbar: [{
3178
3182
  type: Input
3179
3183
  }], ayuda: [{
@@ -3383,6 +3387,7 @@ class BitNotificationErrorComponent extends BaseComponent {
3383
3387
  }
3384
3388
  console.log(`showNotificationError ${title} ${message}`);
3385
3389
  if (multipleErrors) {
3390
+ console.log("multiple errors");
3386
3391
  //Para cada error a mostrar
3387
3392
  const observables = multipleErrors.map((error) => combineLatest([
3388
3393
  this.getTranslatedPrefixes(error, context),
@@ -3390,13 +3395,14 @@ class BitNotificationErrorComponent extends BaseComponent {
3390
3395
  ]).pipe(take(1)));
3391
3396
  forkJoin(observables).subscribe((results) => {
3392
3397
  results.forEach(([prefixes, textError]) => {
3393
- this.pushError(prefixes.reduce((acc, v) => acc + " > " + v), textError);
3398
+ this.pushError(prefixes != null && prefixes.length > 0 ? prefixes.reduce((acc, v) => acc + " > " + v) : "", textError);
3394
3399
  });
3395
3400
  // Aquí sabes que han terminado todas las suscripciones
3396
3401
  this.showErrors();
3397
3402
  });
3398
3403
  }
3399
3404
  else {
3405
+ console.log("single error");
3400
3406
  if (!detail) {
3401
3407
  this.pushError(title, message);
3402
3408
  }
@@ -3433,16 +3439,21 @@ class BitNotificationErrorComponent extends BaseComponent {
3433
3439
  * con el operador combineLatest para recibir los valores traducidos en la misma secuencia que ocupan en el array
3434
3440
  */
3435
3441
  getTranslatedPrefixes(error, context) {
3436
- let prefixErrors$ = error.prefixes.map((code) => {
3437
- if (typeof code == "number") {
3438
- //para arrays
3439
- return of(code);
3440
- }
3441
- else {
3442
- return this.translateService.selectTranslate(code, undefined, context);
3443
- }
3444
- });
3445
- return combineLatest(prefixErrors$);
3442
+ if (error.prefixes.length > 0) {
3443
+ let prefixErrors$ = error.prefixes.map((code) => {
3444
+ if (typeof code == "number") {
3445
+ //para arrays
3446
+ return of(code);
3447
+ }
3448
+ else {
3449
+ return this.translateService.selectTranslate(code, undefined, context);
3450
+ }
3451
+ });
3452
+ return combineLatest(prefixErrors$);
3453
+ }
3454
+ else {
3455
+ return of([]);
3456
+ }
3446
3457
  }
3447
3458
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: BitNotificationErrorComponent, deps: [{ token: BitMessageService }, { token: i2$1.MessageService }, { token: TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
3448
3459
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.6", type: BitNotificationErrorComponent, isStandalone: false, selector: "bit-notification-error", inputs: { escape: { classPropertyName: "escape", publicName: "escape", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: ` <p-toast /> `, isInline: true, dependencies: [{ kind: "component", type: i3$4.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }] }); }