bit-ng-library 19.0.11 → 19.0.13
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 +11 -0
- package/fesm2022/bit-ng-library.mjs +81 -69
- package/fesm2022/bit-ng-library.mjs.map +1 -1
- package/lib/sharedlibrary/components/footer/bit-footer.component.d.ts.map +1 -1
- package/lib/sharedlibrary/components/footer/bit-pajigator.component.d.ts +2 -1
- package/lib/sharedlibrary/components/footer/bit-pajigator.component.d.ts.map +1 -1
- package/lib/sharedlibrary/components/notificacion/bit-notification-error.component.d.ts.map +1 -1
- package/lib/sharedlibrary/services/message.service.d.ts.map +1 -1
- package/lib/sharedlibrary/services/translate.service.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,6 +26,17 @@ 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.13] - 2025-06-25
|
|
30
|
+
|
|
31
|
+
Se resuelve un problema con el footer que no permitía tener un footer para listados con el número total de elementos recuperados pero sin paginación.
|
|
32
|
+
Ahora el atributo paginator determina si se debe pintar el paginador dentro del footer y no el footer entero.
|
|
33
|
+
Además, se añade un nuevo estilo pajigator-outer-container-single-result que deben las apps implementar para mostrar correctament el mensaje del footer
|
|
34
|
+
para el caso en el que no tenemos pagina
|
|
35
|
+
|
|
36
|
+
## [19.0.12] - 2025-06-17
|
|
37
|
+
|
|
38
|
+
Solución de bufixes en la versión 19.0.11 en la parte de bit-notificacion-error.
|
|
39
|
+
|
|
29
40
|
## [19.0.11] - 2025-06-11
|
|
30
41
|
|
|
31
42
|
Se modifica la toolbar para utilizar p-splitbutton para los menús con acciones contextuales
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Subject, BehaviorSubject, lastValueFrom, of, ReplaySubject, combineLatest, forkJoin, fromEvent, throwError } from 'rxjs';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable, inject, signal, EventEmitter, computed, Inject, DestroyRef, Directive, Component, ChangeDetectionStrategy, Input,
|
|
3
|
+
import { Injectable, inject, signal, EventEmitter, computed, Inject, DestroyRef, Directive, Component, ChangeDetectionStrategy, Input, Pipe, input, model, output, Output, HostListener, ViewChild, forwardRef, ContentChild, ElementRef, effect, NgModule } from '@angular/core';
|
|
4
4
|
import { map, mergeMap, tap, takeUntil, startWith, delay, concatMap, take, filter, switchMapTo, catchError, finalize } from 'rxjs/operators';
|
|
5
5
|
import { PrimeNG } from 'primeng/config';
|
|
6
6
|
import Aura from '@primeng/themes/aura';
|
|
@@ -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
|
-
|
|
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 */
|
|
@@ -2739,8 +2743,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImpor
|
|
|
2739
2743
|
}]
|
|
2740
2744
|
}], ctorParameters: () => [{ type: BitMessageService }, { type: TranslateService }] });
|
|
2741
2745
|
|
|
2746
|
+
const PADDING = "000000";
|
|
2747
|
+
class CantidadMonedaPipe {
|
|
2748
|
+
constructor() {
|
|
2749
|
+
this.DECIMAL_SEPARATOR = ",";
|
|
2750
|
+
this.DECIMAL_SEPARATOR_INPUT = ".";
|
|
2751
|
+
this.THOUSANDS_SEPARATOR = ".";
|
|
2752
|
+
}
|
|
2753
|
+
transform(value, fractionSize = 2) {
|
|
2754
|
+
if (value === null || value === undefined) {
|
|
2755
|
+
return "";
|
|
2756
|
+
}
|
|
2757
|
+
let svalue = String(value);
|
|
2758
|
+
const regexp = new RegExp('^[1-9]+[0-9]*([.]([0-9]+)?)?$');
|
|
2759
|
+
const test = regexp.test(svalue);
|
|
2760
|
+
if (!test) {
|
|
2761
|
+
return svalue;
|
|
2762
|
+
}
|
|
2763
|
+
let [integer, fraction = ""] = (value || "").toString().split(this.DECIMAL_SEPARATOR_INPUT);
|
|
2764
|
+
fraction = fractionSize > 0 ? this.DECIMAL_SEPARATOR + (fraction + PADDING).substring(0, fractionSize) : "";
|
|
2765
|
+
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, this.THOUSANDS_SEPARATOR);
|
|
2766
|
+
return integer + fraction;
|
|
2767
|
+
}
|
|
2768
|
+
parse(value, previous, event, fractionSize = 2) {
|
|
2769
|
+
if (value === null || value === undefined) {
|
|
2770
|
+
return "";
|
|
2771
|
+
}
|
|
2772
|
+
let svalue = String(value);
|
|
2773
|
+
const regexp = new RegExp('^[1-9]+[0-9]*([.][0-9]{3})*(,([0-9]+)?)?$');
|
|
2774
|
+
const test = regexp.test(svalue);
|
|
2775
|
+
if (!test) {
|
|
2776
|
+
return svalue;
|
|
2777
|
+
}
|
|
2778
|
+
let [integer, fraction = ""] = (value || "").split(this.DECIMAL_SEPARATOR);
|
|
2779
|
+
integer = integer.replace(/\./g, "");
|
|
2780
|
+
fraction =
|
|
2781
|
+
parseInt(fraction, 10) > 0 && fractionSize > 0
|
|
2782
|
+
? this.DECIMAL_SEPARATOR_INPUT + (fraction + PADDING).substring(0, fractionSize)
|
|
2783
|
+
: "";
|
|
2784
|
+
return integer + fraction;
|
|
2785
|
+
}
|
|
2786
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: CantidadMonedaPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2787
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.6", ngImport: i0, type: CantidadMonedaPipe, isStandalone: false, name: "cantidadMoneda" }); }
|
|
2788
|
+
}
|
|
2789
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: CantidadMonedaPipe, decorators: [{
|
|
2790
|
+
type: Pipe,
|
|
2791
|
+
args: [{
|
|
2792
|
+
name: "cantidadMoneda",
|
|
2793
|
+
standalone: false
|
|
2794
|
+
}]
|
|
2795
|
+
}], ctorParameters: () => [] });
|
|
2796
|
+
|
|
2742
2797
|
class BitPajigatorComponent {
|
|
2743
2798
|
constructor() {
|
|
2799
|
+
this.paginator = input(true);
|
|
2744
2800
|
this.page = model(0);
|
|
2745
2801
|
this.totalItems = input(0);
|
|
2746
2802
|
this.rowsPerPageOptions = input([20]);
|
|
@@ -2776,11 +2832,11 @@ class BitPajigatorComponent {
|
|
|
2776
2832
|
this.onPageChange.emit(this.page());
|
|
2777
2833
|
}
|
|
2778
2834
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: BitPajigatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2779
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.6", type: BitPajigatorComponent, isStandalone: false, selector: "bit-pajigator", inputs: { page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: true, isRequired: false, transformFunction: null }, itemsPerPage: { classPropertyName: "itemsPerPage", publicName: "itemsPerPage", isSignal: true, isRequired: false, transformFunction: null }, maxCurrentItems: { classPropertyName: "maxCurrentItems", publicName: "maxCurrentItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "pageChange", itemsPerPage: "itemsPerPageChange", onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange" }, ngImport: i0, template: "<div class=\"pajigator-outer-container\">\n <div class=\"pajigator-container\">\n <div class=\"pajigator-results-container\">\n <span class=\"pajigator-results-label\">{{\"bitnglibrary.footer.results\" | transloco}}</span>\n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems()}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n </div>\n <div class=\"pajigator-page-size\">\n <div class=\"pajigator-page-size-label\">{{ \"bitnglibrary.footer.itemsPerPage\" | transloco }}</div>\n <!-- appendTo=\"body\"--->\n <p-select \n appendTo=\"body\"\n [options]=\"rowsPerPageOptions()\"\n [ngModel]=\"itemsPerPage()\"\n (ngModelChange)=\"changeItemsPerpage($event)\"></p-select>\n </div>\n <div class=\"pajigator-range-actions\">\n @if (showPageInfo()) {\n <div class=\"pajigator-range-label\"> {{ \"bitnglibrary.footer.page\" | transloco }} {{page()}} de {{maxPages()}} </div>\n }\n <button (click)=\"changePage(-1)\" type=\"button\" [disabled]=\"!showLeftNavigationButton()\" pButton pRipple icon=\"pi pi-angle-left\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n <button (click)=\"changePage(1)\" type=\"button\" [disabled]=\"!showRightNavigationButton()\" pButton pRipple icon=\"pi pi-angle-right\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n </div>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i3$2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "directive", type: i4.Ripple, selector: "[pRipple]" }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2835
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.6", type: BitPajigatorComponent, isStandalone: false, selector: "bit-pajigator", inputs: { paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: true, isRequired: false, transformFunction: null }, itemsPerPage: { classPropertyName: "itemsPerPage", publicName: "itemsPerPage", isSignal: true, isRequired: false, transformFunction: null }, maxCurrentItems: { classPropertyName: "maxCurrentItems", publicName: "maxCurrentItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "pageChange", itemsPerPage: "itemsPerPageChange", onPageChange: "onPageChange", onPageSizeChange: "onPageSizeChange" }, ngImport: i0, template: "<div [class]=\"paginator() ? 'pajigator-outer-container' : 'pajigator-outer-container-single-result'\">\n <div class=\"pajigator-container\">\n <div class=\"pajigator-results-container\">\n <span class=\"pajigator-results-label\">{{\"bitnglibrary.footer.results\" | transloco}}</span>\n @if (paginator()) { \n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems() | cantidadMoneda:0}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n } @else {\n <span>{{totalItems() | cantidadMoneda:0}}</span>\n }\n </div>\n @if (paginator()) { \n <div class=\"pajigator-page-size\">\n <div class=\"pajigator-page-size-label\">{{ \"bitnglibrary.footer.itemsPerPage\" | transloco }}</div>\n <!-- appendTo=\"body\"--->\n <p-select \n appendTo=\"body\"\n [options]=\"rowsPerPageOptions()\"\n [ngModel]=\"itemsPerPage()\"\n (ngModelChange)=\"changeItemsPerpage($event)\"></p-select>\n </div>\n <div class=\"pajigator-range-actions\">\n @if (showPageInfo()) {\n <div class=\"pajigator-range-label\"> {{ \"bitnglibrary.footer.page\" | transloco }} {{page()}} de {{maxPages()}} </div>\n }\n <button (click)=\"changePage(-1)\" type=\"button\" [disabled]=\"!showLeftNavigationButton()\" pButton pRipple icon=\"pi pi-angle-left\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n <button (click)=\"changePage(1)\" type=\"button\" [disabled]=\"!showRightNavigationButton()\" pButton pRipple icon=\"pi pi-angle-right\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n </div>\n } \n </div>\n</div>", dependencies: [{ kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i3$2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "directive", type: i4.Ripple, selector: "[pRipple]" }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: CantidadMonedaPipe, name: "cantidadMoneda" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2780
2836
|
}
|
|
2781
2837
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: BitPajigatorComponent, decorators: [{
|
|
2782
2838
|
type: Component,
|
|
2783
|
-
args: [{ selector: 'bit-pajigator', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"pajigator-outer-container\">\n <div class=\"pajigator-container\">\n <div class=\"pajigator-results-container\">\n <span class=\"pajigator-results-label\">{{\"bitnglibrary.footer.results\" | transloco}}</span>\n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems()}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n </div>\n <div class=\"pajigator-page-size\">\n <div class=\"pajigator-page-size-label\">{{ \"bitnglibrary.footer.itemsPerPage\" | transloco }}</div>\n <!-- appendTo=\"body\"--->\n <p-select \n appendTo=\"body\"\n [options]=\"rowsPerPageOptions()\"\n [ngModel]=\"itemsPerPage()\"\n (ngModelChange)=\"changeItemsPerpage($event)\"></p-select>\n </div>\n <div class=\"pajigator-range-actions\">\n @if (showPageInfo()) {\n <div class=\"pajigator-range-label\"> {{ \"bitnglibrary.footer.page\" | transloco }} {{page()}} de {{maxPages()}} </div>\n }\n <button (click)=\"changePage(-1)\" type=\"button\" [disabled]=\"!showLeftNavigationButton()\" pButton pRipple icon=\"pi pi-angle-left\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n <button (click)=\"changePage(1)\" type=\"button\" [disabled]=\"!showRightNavigationButton()\" pButton pRipple icon=\"pi pi-angle-right\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n </div>\n </div>\n</div>" }]
|
|
2839
|
+
args: [{ selector: 'bit-pajigator', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div [class]=\"paginator() ? 'pajigator-outer-container' : 'pajigator-outer-container-single-result'\">\n <div class=\"pajigator-container\">\n <div class=\"pajigator-results-container\">\n <span class=\"pajigator-results-label\">{{\"bitnglibrary.footer.results\" | transloco}}</span>\n @if (paginator()) { \n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems() | cantidadMoneda:0}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n } @else {\n <span>{{totalItems() | cantidadMoneda:0}}</span>\n }\n </div>\n @if (paginator()) { \n <div class=\"pajigator-page-size\">\n <div class=\"pajigator-page-size-label\">{{ \"bitnglibrary.footer.itemsPerPage\" | transloco }}</div>\n <!-- appendTo=\"body\"--->\n <p-select \n appendTo=\"body\"\n [options]=\"rowsPerPageOptions()\"\n [ngModel]=\"itemsPerPage()\"\n (ngModelChange)=\"changeItemsPerpage($event)\"></p-select>\n </div>\n <div class=\"pajigator-range-actions\">\n @if (showPageInfo()) {\n <div class=\"pajigator-range-label\"> {{ \"bitnglibrary.footer.page\" | transloco }} {{page()}} de {{maxPages()}} </div>\n }\n <button (click)=\"changePage(-1)\" type=\"button\" [disabled]=\"!showLeftNavigationButton()\" pButton pRipple icon=\"pi pi-angle-left\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n <button (click)=\"changePage(1)\" type=\"button\" [disabled]=\"!showRightNavigationButton()\" pButton pRipple icon=\"pi pi-angle-right\" class=\"p-button-lg p-button-rounded p-button-text\"></button>\n </div>\n } \n </div>\n</div>" }]
|
|
2784
2840
|
}] });
|
|
2785
2841
|
|
|
2786
2842
|
class BitHelpComponent {
|
|
@@ -2967,7 +3023,7 @@ class BitFooterComponent {
|
|
|
2967
3023
|
}
|
|
2968
3024
|
return maxCurrentItems;
|
|
2969
3025
|
}); // número de elementos que mostramos en pantalla. Necesario para el modo scroll
|
|
2970
|
-
this.showPajigator = computed(() => this.typeFooter() === "list" && this.visible()
|
|
3026
|
+
this.showPajigator = computed(() => this.typeFooter() === "list" && this.visible());
|
|
2971
3027
|
this.showScroll = computed(() => this.typeFooter() === "scroll" && this.visible());
|
|
2972
3028
|
this.getStyle = computed(() => {
|
|
2973
3029
|
if ((this.fixed() && this.typeFooter() === TYPE_LIST) || this.typeFooter() === TYPE_SCROLL) {
|
|
@@ -2988,11 +3044,11 @@ class BitFooterComponent {
|
|
|
2988
3044
|
this.onNewPageSize.emit(pageSize);
|
|
2989
3045
|
}
|
|
2990
3046
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: BitFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2991
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.6", type: BitFooterComponent, isStandalone: false, selector: "bit-footer", inputs: { totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, mostrarAvisos: { classPropertyName: "mostrarAvisos", publicName: "mostrarAvisos", isSignal: true, isRequired: false, transformFunction: null }, fixed: { classPropertyName: "fixed", publicName: "fixed", isSignal: true, isRequired: false, transformFunction: null }, typeFooter: { classPropertyName: "typeFooter", publicName: "typeFooter", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onPageChange: "onPageChange", onNewPageSize: "onNewPageSize" }, ngImport: i0, template: "<footer [class]=\"getStyle()\">\n\n @if (showScroll()) {\n <div class=\"scroll-outer-container\">\n <div class=\"pajigator-container\">\n <label>{{\"bitnglibrary.footer.results\" | transloco}}</label>\n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems()}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n </div>\n </div>\n }\n\n @if (showPajigator()) {\n <bit-pajigator\n [totalItems]=\"totalItems()\"\n [page]=\"page()\"\n [itemsPerPage]=\"itemsPerPage()\"\n [rowsPerPageOptions]=\"[baseItemsPerPage,baseItemsPerPage*2,baseItemsPerPage*4,baseItemsPerPage*10,baseItemsPerPage*50]\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n (onPageChange)=\"pageChange($event)\"\n (onPageSizeChange)=\"pageSizeChange($event)\"></bit-pajigator>\n }\n\n @if (mostrarAvisos()) {\n <bit-footer-messages\n [typeFooter]=\"typeFooter()\"\n [status]=\"status()\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n [totalItems]=\"totalItems()\"></bit-footer-messages>\n }\n\n</footer>\n", dependencies: [{ kind: "component", type: BitPajigatorComponent, selector: "bit-pajigator", inputs: ["page", "totalItems", "rowsPerPageOptions", "itemsPerPage", "maxCurrentItems"], outputs: ["pageChange", "itemsPerPageChange", "onPageChange", "onPageSizeChange"] }, { kind: "component", type: BitFooterMessagesComponent, selector: "bit-footer-messages", inputs: ["status", "maxCurrentItems", "totalItems", "typeFooter"] }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3047
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.6", type: BitFooterComponent, isStandalone: false, selector: "bit-footer", inputs: { totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, mostrarAvisos: { classPropertyName: "mostrarAvisos", publicName: "mostrarAvisos", isSignal: true, isRequired: false, transformFunction: null }, fixed: { classPropertyName: "fixed", publicName: "fixed", isSignal: true, isRequired: false, transformFunction: null }, typeFooter: { classPropertyName: "typeFooter", publicName: "typeFooter", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onPageChange: "onPageChange", onNewPageSize: "onNewPageSize" }, ngImport: i0, template: "<footer [class]=\"getStyle()\">\n\n @if (showScroll()) {\n <div class=\"scroll-outer-container\">\n <div class=\"pajigator-container\">\n <label>{{\"bitnglibrary.footer.results\" | transloco}}</label>\n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems()}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n </div>\n </div>\n }\n\n @if (showPajigator()) {\n <bit-pajigator\n [paginator]=\"paginator()\"\n [totalItems]=\"totalItems()\"\n [page]=\"page()\"\n [itemsPerPage]=\"itemsPerPage()\"\n [rowsPerPageOptions]=\"[baseItemsPerPage,baseItemsPerPage*2,baseItemsPerPage*4,baseItemsPerPage*10,baseItemsPerPage*50]\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n (onPageChange)=\"pageChange($event)\"\n (onPageSizeChange)=\"pageSizeChange($event)\"></bit-pajigator>\n }\n\n @if (mostrarAvisos()) {\n <bit-footer-messages\n [typeFooter]=\"typeFooter()\"\n [status]=\"status()\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n [totalItems]=\"totalItems()\"></bit-footer-messages>\n }\n\n</footer>\n", dependencies: [{ kind: "component", type: BitPajigatorComponent, selector: "bit-pajigator", inputs: ["paginator", "page", "totalItems", "rowsPerPageOptions", "itemsPerPage", "maxCurrentItems"], outputs: ["pageChange", "itemsPerPageChange", "onPageChange", "onPageSizeChange"] }, { kind: "component", type: BitFooterMessagesComponent, selector: "bit-footer-messages", inputs: ["status", "maxCurrentItems", "totalItems", "typeFooter"] }, { kind: "pipe", type: i5.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2992
3048
|
}
|
|
2993
3049
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: BitFooterComponent, decorators: [{
|
|
2994
3050
|
type: Component,
|
|
2995
|
-
args: [{ selector: "bit-footer", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<footer [class]=\"getStyle()\">\n\n @if (showScroll()) {\n <div class=\"scroll-outer-container\">\n <div class=\"pajigator-container\">\n <label>{{\"bitnglibrary.footer.results\" | transloco}}</label>\n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems()}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n </div>\n </div>\n }\n\n @if (showPajigator()) {\n <bit-pajigator\n [totalItems]=\"totalItems()\"\n [page]=\"page()\"\n [itemsPerPage]=\"itemsPerPage()\"\n [rowsPerPageOptions]=\"[baseItemsPerPage,baseItemsPerPage*2,baseItemsPerPage*4,baseItemsPerPage*10,baseItemsPerPage*50]\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n (onPageChange)=\"pageChange($event)\"\n (onPageSizeChange)=\"pageSizeChange($event)\"></bit-pajigator>\n }\n\n @if (mostrarAvisos()) {\n <bit-footer-messages\n [typeFooter]=\"typeFooter()\"\n [status]=\"status()\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n [totalItems]=\"totalItems()\"></bit-footer-messages>\n }\n\n</footer>\n" }]
|
|
3051
|
+
args: [{ selector: "bit-footer", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<footer [class]=\"getStyle()\">\n\n @if (showScroll()) {\n <div class=\"scroll-outer-container\">\n <div class=\"pajigator-container\">\n <label>{{\"bitnglibrary.footer.results\" | transloco}}</label>\n @if (maxCurrentItems() >= totalItems()) {\n <span>{{totalItems()}}</span>\n }\n @if (maxCurrentItems() < totalItems()) {\n <span>{{maxCurrentItems()}} / {{totalItems()}}</span>\n }\n </div>\n </div>\n }\n\n @if (showPajigator()) {\n <bit-pajigator\n [paginator]=\"paginator()\"\n [totalItems]=\"totalItems()\"\n [page]=\"page()\"\n [itemsPerPage]=\"itemsPerPage()\"\n [rowsPerPageOptions]=\"[baseItemsPerPage,baseItemsPerPage*2,baseItemsPerPage*4,baseItemsPerPage*10,baseItemsPerPage*50]\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n (onPageChange)=\"pageChange($event)\"\n (onPageSizeChange)=\"pageSizeChange($event)\"></bit-pajigator>\n }\n\n @if (mostrarAvisos()) {\n <bit-footer-messages\n [typeFooter]=\"typeFooter()\"\n [status]=\"status()\"\n [maxCurrentItems]=\"maxCurrentItems()\"\n [totalItems]=\"totalItems()\"></bit-footer-messages>\n }\n\n</footer>\n" }]
|
|
2996
3052
|
}] });
|
|
2997
3053
|
|
|
2998
3054
|
class BitBotonAyudaComponent {
|
|
@@ -3383,6 +3439,7 @@ class BitNotificationErrorComponent extends BaseComponent {
|
|
|
3383
3439
|
}
|
|
3384
3440
|
console.log(`showNotificationError ${title} ${message}`);
|
|
3385
3441
|
if (multipleErrors) {
|
|
3442
|
+
console.log("multiple errors");
|
|
3386
3443
|
//Para cada error a mostrar
|
|
3387
3444
|
const observables = multipleErrors.map((error) => combineLatest([
|
|
3388
3445
|
this.getTranslatedPrefixes(error, context),
|
|
@@ -3390,13 +3447,14 @@ class BitNotificationErrorComponent extends BaseComponent {
|
|
|
3390
3447
|
]).pipe(take(1)));
|
|
3391
3448
|
forkJoin(observables).subscribe((results) => {
|
|
3392
3449
|
results.forEach(([prefixes, textError]) => {
|
|
3393
|
-
this.pushError(prefixes.reduce((acc, v) => acc + " > " + v), textError);
|
|
3450
|
+
this.pushError(prefixes != null && prefixes.length > 0 ? prefixes.reduce((acc, v) => acc + " > " + v) : "", textError);
|
|
3394
3451
|
});
|
|
3395
3452
|
// Aquí sabes que han terminado todas las suscripciones
|
|
3396
3453
|
this.showErrors();
|
|
3397
3454
|
});
|
|
3398
3455
|
}
|
|
3399
3456
|
else {
|
|
3457
|
+
console.log("single error");
|
|
3400
3458
|
if (!detail) {
|
|
3401
3459
|
this.pushError(title, message);
|
|
3402
3460
|
}
|
|
@@ -3433,16 +3491,21 @@ class BitNotificationErrorComponent extends BaseComponent {
|
|
|
3433
3491
|
* con el operador combineLatest para recibir los valores traducidos en la misma secuencia que ocupan en el array
|
|
3434
3492
|
*/
|
|
3435
3493
|
getTranslatedPrefixes(error, context) {
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3494
|
+
if (error.prefixes.length > 0) {
|
|
3495
|
+
let prefixErrors$ = error.prefixes.map((code) => {
|
|
3496
|
+
if (typeof code == "number") {
|
|
3497
|
+
//para arrays
|
|
3498
|
+
return of(code);
|
|
3499
|
+
}
|
|
3500
|
+
else {
|
|
3501
|
+
return this.translateService.selectTranslate(code, undefined, context);
|
|
3502
|
+
}
|
|
3503
|
+
});
|
|
3504
|
+
return combineLatest(prefixErrors$);
|
|
3505
|
+
}
|
|
3506
|
+
else {
|
|
3507
|
+
return of([]);
|
|
3508
|
+
}
|
|
3446
3509
|
}
|
|
3447
3510
|
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
3511
|
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"] }] }); }
|
|
@@ -5397,57 +5460,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImpor
|
|
|
5397
5460
|
}]
|
|
5398
5461
|
}] });
|
|
5399
5462
|
|
|
5400
|
-
const PADDING = "000000";
|
|
5401
|
-
class CantidadMonedaPipe {
|
|
5402
|
-
constructor() {
|
|
5403
|
-
this.DECIMAL_SEPARATOR = ",";
|
|
5404
|
-
this.DECIMAL_SEPARATOR_INPUT = ".";
|
|
5405
|
-
this.THOUSANDS_SEPARATOR = ".";
|
|
5406
|
-
}
|
|
5407
|
-
transform(value, fractionSize = 2) {
|
|
5408
|
-
if (value === null || value === undefined) {
|
|
5409
|
-
return "";
|
|
5410
|
-
}
|
|
5411
|
-
let svalue = String(value);
|
|
5412
|
-
const regexp = new RegExp('^[1-9]+[0-9]*([.]([0-9]+)?)?$');
|
|
5413
|
-
const test = regexp.test(svalue);
|
|
5414
|
-
if (!test) {
|
|
5415
|
-
return svalue;
|
|
5416
|
-
}
|
|
5417
|
-
let [integer, fraction = ""] = (value || "").toString().split(this.DECIMAL_SEPARATOR_INPUT);
|
|
5418
|
-
fraction = fractionSize > 0 ? this.DECIMAL_SEPARATOR + (fraction + PADDING).substring(0, fractionSize) : "";
|
|
5419
|
-
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, this.THOUSANDS_SEPARATOR);
|
|
5420
|
-
return integer + fraction;
|
|
5421
|
-
}
|
|
5422
|
-
parse(value, previous, event, fractionSize = 2) {
|
|
5423
|
-
if (value === null || value === undefined) {
|
|
5424
|
-
return "";
|
|
5425
|
-
}
|
|
5426
|
-
let svalue = String(value);
|
|
5427
|
-
const regexp = new RegExp('^[1-9]+[0-9]*([.][0-9]{3})*(,([0-9]+)?)?$');
|
|
5428
|
-
const test = regexp.test(svalue);
|
|
5429
|
-
if (!test) {
|
|
5430
|
-
return svalue;
|
|
5431
|
-
}
|
|
5432
|
-
let [integer, fraction = ""] = (value || "").split(this.DECIMAL_SEPARATOR);
|
|
5433
|
-
integer = integer.replace(/\./g, "");
|
|
5434
|
-
fraction =
|
|
5435
|
-
parseInt(fraction, 10) > 0 && fractionSize > 0
|
|
5436
|
-
? this.DECIMAL_SEPARATOR_INPUT + (fraction + PADDING).substring(0, fractionSize)
|
|
5437
|
-
: "";
|
|
5438
|
-
return integer + fraction;
|
|
5439
|
-
}
|
|
5440
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: CantidadMonedaPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5441
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.6", ngImport: i0, type: CantidadMonedaPipe, isStandalone: false, name: "cantidadMoneda" }); }
|
|
5442
|
-
}
|
|
5443
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: CantidadMonedaPipe, decorators: [{
|
|
5444
|
-
type: Pipe,
|
|
5445
|
-
args: [{
|
|
5446
|
-
name: "cantidadMoneda",
|
|
5447
|
-
standalone: false
|
|
5448
|
-
}]
|
|
5449
|
-
}], ctorParameters: () => [] });
|
|
5450
|
-
|
|
5451
5463
|
/**
|
|
5452
5464
|
* Acorta un texto con saltos de línea, sustituyendo los saltos por "//" y limitando la cadena final a 200 caracteres
|
|
5453
5465
|
*/
|