bit-ng-library 19.0.2 → 19.0.3

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,12 @@ 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.3] - 2025-03-13
30
+
31
+ sendNotificationError permite enviar varios errores seguidos con la opción de que se vayan acumulando y mostrarlos en pantalla en el orden que se envían. La versión anterior no permitía esto, si no que al enviar el segundo error, se eliminaba el primero y no era visible. Se añade un segundo parámetro al método sendNotificationError que vale true por defecto y en el caso de que queramos acumular errores, a partir del segundo envio ponemos un false para no borrar el primero. Ejemplo:
32
+ this.bitMessageService.sendNotificationError(new BitNotificationError(this.errorFormTitle, this.errorFormMessage, ));
33
+ this.bitMessageService.sendNotificationError(new BitNotificationError(this.errorFormTitle, this.insertMessage, ),false);
34
+
29
35
  ## [19.0.2] - 2025-03-12
30
36
 
31
37
  fix fallo cuando se tienen tres formgroups anidados. Se pierde el Array de codigos y se transforma a un string
@@ -39,6 +45,15 @@ Se sustituyo p-dropdown por p-select. Prime ha eliminado el componente p-dropdow
39
45
 
40
46
  Versión alfa para Angular19
41
47
 
48
+ ## [18.1.6] - 2025-03-12
49
+
50
+ sendNotificationError permite enviar varios errores seguidos con la opción de que se vayan acumulando y mostrarlos en pantalla en el orden que se envían.
51
+ La versión anterior no permitía esto, si no que al enviar el segundo error, se eliminaba el primero y no era visible.
52
+ Se añade un segundo parámetro al método sendNotificationError que vale true por defecto y en el caso de que queramos acumular errores, a partir del segundo envio
53
+ ponemos un false para no borrar el primero. Ejemplo:
54
+ this.bitMessageService.sendNotificationError(new BitNotificationError(this.errorFormTitle, this.errorFormMessage, ""));
55
+ this.bitMessageService.sendNotificationError(new BitNotificationError(this.errorFormTitle, this.insertMessage, ""),false);
56
+
42
57
  ## [18.1.5] - 2024-12-16
43
58
 
44
59
  Se añade un servicio inyectado en Root para guardar el menú actualmente seleccionado
@@ -769,8 +769,9 @@ class BitMessageService {
769
769
  * Enviamos un error. Se mostrará como una ventana arriba a la derecha con un close para cerrarlo
770
770
  * @param bitNotificationError
771
771
  */
772
- sendNotificationError(bitNotificationError) {
773
- console.log("sendNotificationError", bitNotificationError);
772
+ sendNotificationError(bitNotificationError, clearErrors = true) {
773
+ console.log("sendNotificationError", bitNotificationError, clearErrors);
774
+ bitNotificationError.clearErrors = clearErrors;
774
775
  this.observableNotificacionsErrorsSource.next(bitNotificationError);
775
776
  }
776
777
  hideNotificacionErrorPanel() {
@@ -3237,10 +3238,11 @@ class BitNotificationErrorComponent extends BaseComponent {
3237
3238
  this.translateService.selectTranslate(notificationError.message.code, notificationError.message.params, notificationError.message.context),
3238
3239
  of(notificationError.context),
3239
3240
  of(notificationError.multipleErrors),
3240
- of(notificationError.detail)
3241
+ of(notificationError.detail),
3242
+ of(notificationError.clearErrors)
3241
3243
  ]).pipe(take(1))))
3242
- .subscribe(([title, message, context, multipleErrros, detail]) => {
3243
- this.showNotificationError(title, message, context, multipleErrros, detail);
3244
+ .subscribe(([title, message, context, multipleErrros, detail, clearErrors]) => {
3245
+ this.showNotificationError(title, message, context, multipleErrros, detail, clearErrors);
3244
3246
  });
3245
3247
  }
3246
3248
  /**
@@ -3250,8 +3252,10 @@ class BitNotificationErrorComponent extends BaseComponent {
3250
3252
  * @param context
3251
3253
  * @param multipleErrors
3252
3254
  */
3253
- showNotificationError(title, message, context, multipleErrors, detail) {
3254
- this.messages = [];
3255
+ showNotificationError(title, message, context, multipleErrors, detail, clearErrors = true) {
3256
+ console.log("clearErrors", clearErrors);
3257
+ if (clearErrors)
3258
+ this.messages = [];
3255
3259
  console.log(`showNotificationError ${title} ${message}`);
3256
3260
  if (multipleErrors) {
3257
3261
  //Para cada error a mostrar