ngx-dsxlibrary 1.0.49 → 1.0.50
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/fesm2022/ngx-dsxlibrary-src-lib-components.mjs +7 -7
- package/fesm2022/ngx-dsxlibrary-src-lib-components.mjs.map +1 -1
- package/fesm2022/ngx-dsxlibrary-src-lib-pipe.mjs +6 -6
- package/fesm2022/ngx-dsxlibrary-src-lib-pipe.mjs.map +1 -1
- package/fesm2022/ngx-dsxlibrary.mjs +104 -81
- package/fesm2022/ngx-dsxlibrary.mjs.map +1 -1
- package/lib/components/loading/loading.component.d.ts +2 -0
- package/lib/services/alerta.service.d.ts +14 -2
- package/ngx-dsxlibrary-1.0.50.tgz +0 -0
- package/package.json +7 -7
- package/ngx-dsxlibrary-1.0.49.tgz +0 -0
|
@@ -25,10 +25,10 @@ class AppMessageErrorComponent {
|
|
|
25
25
|
// Control de formulario que se pasa como input
|
|
26
26
|
control;
|
|
27
27
|
form = null;
|
|
28
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
29
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppMessageErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: AppMessageErrorComponent, isStandalone: true, selector: "app-message-error", inputs: { control: "control", form: "form" }, ngImport: i0, template: "@if(control?.touched && control?.invalid){\r\n<div class=\"absolute dsx-error-message\">\r\n @if(control?.errors?.['required']){ El campo <strong>es requerido.</strong>\r\n } @else if(control?.errors?.['invalidNIT']){\r\n <strong>{{ control?.errors?.['invalidNIT']?.message }}</strong\r\n >. }@else if(control?.errors?.['invalidCUI']){\r\n <strong>{{ control?.errors?.['invalidCUI']?.message }}</strong\r\n >. } @else if(control?.errors?.['invalidDateRange']){\r\n <strong>{{ control?.errors?.['invalidDateRange']?.message }}</strong\r\n >. } @else if(control?.errors?.['dateNotRange']){\r\n <strong>{{ control?.errors?.['dateNotRange']?.message }}</strong\r\n >. } @else if(control?.errors?.['minlength']){ Debe tener al menos\r\n <strong>{{ control?.errors?.['minlength']?.requiredLength }}</strong>\r\n caracteres. } @else if(control?.errors?.['maxlength']){ Debe tener como m\u00E1ximo\r\n <strong>{{ control?.errors?.['maxlength']?.requiredLength }}</strong>\r\n caracteres. } @else if(control?.errors?.['min']){ El valor m\u00EDnimo permitido es\r\n <strong>{{ control?.errors?.['min']?.min }}</strong\r\n >. } @else if(control?.errors?.['max']){ El valor m\u00E1ximo permitido es\r\n <strong>{{ control?.errors?.['max']?.max }}</strong\r\n >. } @else if(control?.errors?.['email']){ Debe ser una direcci\u00F3n de correo\r\n v\u00E1lida. } @else if(control?.errors?.['pattern']){ El campo no tiene el formato\r\n requerido. } @else{ Existe un error a\u00FAn no identificado. }\r\n</div>\r\n}\r\n<!-- mensaje para formulario en general -->\r\n@if(form?.invalid && form?.touched){\r\n<div class=\"mt-2 mb-2\">\r\n @if(this.form?.errors?.['atLeastOneRequired']){\r\n <p-tag severity=\"danger\" [rounded]=\"true\">\r\n {{ form?.getError(\"atLeastOneRequired\")?.message }}</p-tag\r\n >\r\n }\r\n</div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: TagModule }, { kind: "component", type: i1.Tag, selector: "p-tag", inputs: ["style", "styleClass", "severity", "value", "icon", "rounded"] }] });
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppMessageErrorComponent, decorators: [{
|
|
32
32
|
type: Component,
|
|
33
33
|
args: [{ selector: 'app-message-error', imports: [TagModule], template: "@if(control?.touched && control?.invalid){\r\n<div class=\"absolute dsx-error-message\">\r\n @if(control?.errors?.['required']){ El campo <strong>es requerido.</strong>\r\n } @else if(control?.errors?.['invalidNIT']){\r\n <strong>{{ control?.errors?.['invalidNIT']?.message }}</strong\r\n >. }@else if(control?.errors?.['invalidCUI']){\r\n <strong>{{ control?.errors?.['invalidCUI']?.message }}</strong\r\n >. } @else if(control?.errors?.['invalidDateRange']){\r\n <strong>{{ control?.errors?.['invalidDateRange']?.message }}</strong\r\n >. } @else if(control?.errors?.['dateNotRange']){\r\n <strong>{{ control?.errors?.['dateNotRange']?.message }}</strong\r\n >. } @else if(control?.errors?.['minlength']){ Debe tener al menos\r\n <strong>{{ control?.errors?.['minlength']?.requiredLength }}</strong>\r\n caracteres. } @else if(control?.errors?.['maxlength']){ Debe tener como m\u00E1ximo\r\n <strong>{{ control?.errors?.['maxlength']?.requiredLength }}</strong>\r\n caracteres. } @else if(control?.errors?.['min']){ El valor m\u00EDnimo permitido es\r\n <strong>{{ control?.errors?.['min']?.min }}</strong\r\n >. } @else if(control?.errors?.['max']){ El valor m\u00E1ximo permitido es\r\n <strong>{{ control?.errors?.['max']?.max }}</strong\r\n >. } @else if(control?.errors?.['email']){ Debe ser una direcci\u00F3n de correo\r\n v\u00E1lida. } @else if(control?.errors?.['pattern']){ El campo no tiene el formato\r\n requerido. } @else{ Existe un error a\u00FAn no identificado. }\r\n</div>\r\n}\r\n<!-- mensaje para formulario en general -->\r\n@if(form?.invalid && form?.touched){\r\n<div class=\"mt-2 mb-2\">\r\n @if(this.form?.errors?.['atLeastOneRequired']){\r\n <p-tag severity=\"danger\" [rounded]=\"true\">\r\n {{ form?.getError(\"atLeastOneRequired\")?.message }}</p-tag\r\n >\r\n }\r\n</div>\r\n}\r\n" }]
|
|
34
34
|
}], propDecorators: { control: [{
|
|
@@ -76,12 +76,12 @@ class KpicardComponent {
|
|
|
76
76
|
getSelectedOption() {
|
|
77
77
|
return this.options[this.option()] ?? this.options.currency; // Si no existe, usa `currency`
|
|
78
78
|
}
|
|
79
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
80
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.
|
|
79
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: KpicardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
80
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.14", type: KpicardComponent, isStandalone: true, selector: "app-kpicard", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, iconType: { classPropertyName: "iconType", publicName: "iconType", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, valor: { classPropertyName: "valor", publicName: "valor", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\r\n class=\"kpi-card {{ color() }} {{\r\n theme() === 'light' ? 'light-theme' : 'dark-theme'\r\n }}\"\r\n>\r\n <div class=\"kpi-container\">\r\n <span\r\n [countUp]=\"valor()\"\r\n [options]=\"getSelectedOption()\"\r\n [class]=\"theme() === 'light' ? 'card-value-light' : 'card-value-dark'\"\r\n >0</span\r\n >\r\n <span\r\n [class]=\"theme() === 'light' ? 'card-text-light' : 'card-text-dark'\"\r\n >{{ label() }}</span\r\n >\r\n </div>\r\n <i\r\n [class]=\"\r\n theme() === 'light'\r\n ? iconType() + ' icon icon-light'\r\n : iconType() + ' icon icon-dark'\r\n \"\r\n ></i>\r\n</div>\r\n", styles: [".icon{float:right;font-size:500%;position:absolute;top:0rem;right:-.3rem;opacity:.2}.icon-light{color:#000}.icon-dark{color:#fff}#container{width:1200px;display:flex}.kpi-card{--gradient-light: linear-gradient(to bottom, #00fffc, #008cff);--gradient-dark: linear-gradient(to bottom, #ff00ff, #ff0066);--text-color-light: #495057;--text-color-dark: #d5d7d8;--card-value-gradient-light: linear-gradient( 45deg, #00fffc, #a200ff, #0094ff );--card-value-gradient-dark: linear-gradient(45deg, #ff7e5f, #feb47b, #ff6a00);overflow:hidden;position:relative;box-shadow:1.5px 1.5px 10px #000000bf;display:inline-block;padding:1em;border-radius:.8em;font-family:Roboto;font-size:.9rem;width:240px;min-width:180px;margin-left:.5em;margin-top:.5em}.kpi-card:after{position:absolute;content:\"\";width:.25rem;inset:.65rem auto .65rem .5rem;border-radius:.125rem;background:var(--gradient);transition:transform .3s ease;z-index:4}.kpi-card.light-theme:after{background:var(--gradient-light)}.kpi-card.dark-theme:after{background:var(--gradient-dark)}.kpi-container{margin-left:.5em}.card-value-light{display:block;font-size:200%;font-weight:bolder;background:linear-gradient(45deg,#00fffc,#a200ff,#0094ff);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:0 0 5px rgba(0,255,252,.3),0 0 10px rgba(162,0,255,.2),0 0 15px rgba(0,148,255,.1)}.card-value-dark{display:block;font-size:200%;font-weight:bolder;background:linear-gradient(45deg,#ff7e5f,#feb47b,#ff6a00);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:0 0 5px rgba(255,126,95,.5),0 0 10px rgba(254,180,123,.4),0 0 15px rgba(255,106,0,.3)}.card-text{display:block;font-family:Roboto,sans-serif;padding-left:.2em}.card-text-light{color:var(--text-color-light)}.card-text-dark{color:var(--text-color-dark)}\n"], dependencies: [{ kind: "ngmodule", type: CountUpModule }, { kind: "directive", type: i1$1.CountUpDirective, selector: "[countUp]", inputs: ["countUp", "options", "reanimateOnClick"], outputs: ["complete"] }] });
|
|
81
81
|
}
|
|
82
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: KpicardComponent, decorators: [{
|
|
83
83
|
type: Component,
|
|
84
|
-
args: [{ selector: 'app-kpicard', imports: [CountUpModule], template: "<div
|
|
84
|
+
args: [{ selector: 'app-kpicard', imports: [CountUpModule], template: "<div\r\n class=\"kpi-card {{ color() }} {{\r\n theme() === 'light' ? 'light-theme' : 'dark-theme'\r\n }}\"\r\n>\r\n <div class=\"kpi-container\">\r\n <span\r\n [countUp]=\"valor()\"\r\n [options]=\"getSelectedOption()\"\r\n [class]=\"theme() === 'light' ? 'card-value-light' : 'card-value-dark'\"\r\n >0</span\r\n >\r\n <span\r\n [class]=\"theme() === 'light' ? 'card-text-light' : 'card-text-dark'\"\r\n >{{ label() }}</span\r\n >\r\n </div>\r\n <i\r\n [class]=\"\r\n theme() === 'light'\r\n ? iconType() + ' icon icon-light'\r\n : iconType() + ' icon icon-dark'\r\n \"\r\n ></i>\r\n</div>\r\n", styles: [".icon{float:right;font-size:500%;position:absolute;top:0rem;right:-.3rem;opacity:.2}.icon-light{color:#000}.icon-dark{color:#fff}#container{width:1200px;display:flex}.kpi-card{--gradient-light: linear-gradient(to bottom, #00fffc, #008cff);--gradient-dark: linear-gradient(to bottom, #ff00ff, #ff0066);--text-color-light: #495057;--text-color-dark: #d5d7d8;--card-value-gradient-light: linear-gradient( 45deg, #00fffc, #a200ff, #0094ff );--card-value-gradient-dark: linear-gradient(45deg, #ff7e5f, #feb47b, #ff6a00);overflow:hidden;position:relative;box-shadow:1.5px 1.5px 10px #000000bf;display:inline-block;padding:1em;border-radius:.8em;font-family:Roboto;font-size:.9rem;width:240px;min-width:180px;margin-left:.5em;margin-top:.5em}.kpi-card:after{position:absolute;content:\"\";width:.25rem;inset:.65rem auto .65rem .5rem;border-radius:.125rem;background:var(--gradient);transition:transform .3s ease;z-index:4}.kpi-card.light-theme:after{background:var(--gradient-light)}.kpi-card.dark-theme:after{background:var(--gradient-dark)}.kpi-container{margin-left:.5em}.card-value-light{display:block;font-size:200%;font-weight:bolder;background:linear-gradient(45deg,#00fffc,#a200ff,#0094ff);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:0 0 5px rgba(0,255,252,.3),0 0 10px rgba(162,0,255,.2),0 0 15px rgba(0,148,255,.1)}.card-value-dark{display:block;font-size:200%;font-weight:bolder;background:linear-gradient(45deg,#ff7e5f,#feb47b,#ff6a00);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:0 0 5px rgba(255,126,95,.5),0 0 10px rgba(254,180,123,.4),0 0 15px rgba(255,106,0,.3)}.card-text{display:block;font-family:Roboto,sans-serif;padding-left:.2em}.card-text-light{color:var(--text-color-light)}.card-text-dark{color:var(--text-color-dark)}\n"] }]
|
|
85
85
|
}] });
|
|
86
86
|
|
|
87
87
|
class JsonHighlightPipe {
|
|
@@ -109,10 +109,10 @@ class JsonHighlightPipe {
|
|
|
109
109
|
.replace(/,/g, '<span class="json-comma">$&</span>')
|
|
110
110
|
.replace(/:/g, '<span class="json-colon">$&</span>');
|
|
111
111
|
}
|
|
112
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
113
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: JsonHighlightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
113
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: JsonHighlightPipe, isStandalone: true, name: "jsonHighlight" });
|
|
114
114
|
}
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: JsonHighlightPipe, decorators: [{
|
|
116
116
|
type: Pipe,
|
|
117
117
|
args: [{
|
|
118
118
|
name: 'jsonHighlight',
|
|
@@ -131,10 +131,10 @@ class JsonValuesDebujComponent {
|
|
|
131
131
|
isDev() {
|
|
132
132
|
return this.isDevSignal();
|
|
133
133
|
}
|
|
134
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
135
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
134
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: JsonValuesDebujComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
135
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: JsonValuesDebujComponent, isStandalone: true, selector: "app-json-values-debuj", inputs: { form: "form" }, ngImport: i0, template: "@if(isDev()){\r\n<div class=\"custom-container\">\r\n <pre\r\n class=\"custom-pre\"\r\n [innerHTML]=\"form.getRawValue() | jsonHighlight\"\r\n ></pre>\r\n</div>\r\n}\r\n", styles: [".custom-container{width:100%;overflow:auto;background-color:#f3f4f6;padding:.5rem;border-radius:.5rem;margin-bottom:.75rem}.custom-pre{white-space:pre-wrap;word-break:break-word;font-size:.875rem}\n"], dependencies: [{ kind: "pipe", type: JsonHighlightPipe, name: "jsonHighlight" }] });
|
|
136
136
|
}
|
|
137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: JsonValuesDebujComponent, decorators: [{
|
|
138
138
|
type: Component,
|
|
139
139
|
args: [{ selector: 'app-json-values-debuj', imports: [JsonHighlightPipe], template: "@if(isDev()){\r\n<div class=\"custom-container\">\r\n <pre\r\n class=\"custom-pre\"\r\n [innerHTML]=\"form.getRawValue() | jsonHighlight\"\r\n ></pre>\r\n</div>\r\n}\r\n", styles: [".custom-container{width:100%;overflow:auto;background-color:#f3f4f6;padding:.5rem;border-radius:.5rem;margin-bottom:.75rem}.custom-pre{white-space:pre-wrap;word-break:break-word;font-size:.875rem}\n"] }]
|
|
140
140
|
}], propDecorators: { form: [{
|
|
@@ -153,10 +153,10 @@ class SpinnerLoadingService {
|
|
|
153
153
|
hide() {
|
|
154
154
|
this.spinnerVisible.set(false);
|
|
155
155
|
}
|
|
156
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
157
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
156
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SpinnerLoadingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
157
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SpinnerLoadingService, providedIn: 'root' });
|
|
158
158
|
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SpinnerLoadingService, decorators: [{
|
|
160
160
|
type: Injectable,
|
|
161
161
|
args: [{
|
|
162
162
|
providedIn: 'root',
|
|
@@ -164,15 +164,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
|
|
|
164
164
|
}], ctorParameters: () => [] });
|
|
165
165
|
|
|
166
166
|
class LoadingComponent {
|
|
167
|
+
currentYear;
|
|
168
|
+
constructor() {
|
|
169
|
+
this.currentYear = new Date().getFullYear(); // Asigna el año actual
|
|
170
|
+
}
|
|
167
171
|
// Accedemos directamente a la señal del servicio
|
|
168
172
|
_spinnerService = inject(SpinnerLoadingService);
|
|
169
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
170
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
173
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
174
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: LoadingComponent, isStandalone: true, selector: "app-loading", ngImport: i0, template: "<!-- Actualizaci\u00F3n 2025-31-01 12:00 -->\r\n@if(_spinnerService.spinnerVisible()){\r\n<div class=\"spinner-overlay\">\r\n <div class=\"loader\">\r\n <div class=\"external-shadow\">\r\n <div class=\"central\"></div>\r\n </div>\r\n <img src=\"assets/dsxResource/icon/secure.png\" class=\"spinner-image\" />\r\n </div>\r\n <p class=\"loading-text\">©DevsoftXela {{ currentYear }}</p>\r\n</div>\r\n}\r\n", styles: [".spinner-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#000c;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:9999}.loader{display:flex;justify-content:center;align-items:center;position:relative;cursor:not-allowed;scale:.7}.central{display:flex;justify-content:center;align-items:center;position:relative;width:10em;height:10em;border-radius:50%;box-shadow:.5em 1em 1em #8a2be2,-.5em .5em 1em #00f,.5em -.5em 1em purple,-.5em -.5em 1em #0ff;background-color:#0000004d}.external-shadow{width:10em;height:10em;border-radius:50%;display:flex;justify-content:center;align-items:center;position:relative;box-shadow:.5em .5em 3em #8a2be2,-.5em .5em 3em #00f,.5em -.5em 3em purple,-.5em -.5em 3em #0ff;z-index:999;animation:rotate 3s linear infinite;background-color:#21212180}@keyframes rotate{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.spinner-image{width:70%;height:70%;border-radius:50%;object-fit:cover;position:absolute;z-index:1000}.loading-text{font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:3px;background:linear-gradient(45deg,#0ff,#f0f);-webkit-background-clip:text;background-clip:text;color:transparent}@keyframes pulse{0%,to{opacity:.7}50%{opacity:1}}\n"] });
|
|
171
175
|
}
|
|
172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LoadingComponent, decorators: [{
|
|
173
177
|
type: Component,
|
|
174
|
-
args: [{ selector: 'app-loading', imports: [], template: "<!-- Actualizaci\u00F3n 2025-31-01 12:00 -->\r\n@if(_spinnerService.spinnerVisible()){\r\n<div class=\"spinner-overlay\">\r\n <div class=\"loader\">\r\n <div class=\"external-shadow\">\r\n <div class=\"central\"></div>\r\n </div>\r\n <img src=\"assets/dsxResource/icon/secure.png\" class=\"spinner-image\" />\r\n </div>\r\n <p class=\"loading-text\"
|
|
175
|
-
}] });
|
|
178
|
+
args: [{ selector: 'app-loading', imports: [], template: "<!-- Actualizaci\u00F3n 2025-31-01 12:00 -->\r\n@if(_spinnerService.spinnerVisible()){\r\n<div class=\"spinner-overlay\">\r\n <div class=\"loader\">\r\n <div class=\"external-shadow\">\r\n <div class=\"central\"></div>\r\n </div>\r\n <img src=\"assets/dsxResource/icon/secure.png\" class=\"spinner-image\" />\r\n </div>\r\n <p class=\"loading-text\">©DevsoftXela {{ currentYear }}</p>\r\n</div>\r\n}\r\n", styles: [".spinner-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#000c;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:9999}.loader{display:flex;justify-content:center;align-items:center;position:relative;cursor:not-allowed;scale:.7}.central{display:flex;justify-content:center;align-items:center;position:relative;width:10em;height:10em;border-radius:50%;box-shadow:.5em 1em 1em #8a2be2,-.5em .5em 1em #00f,.5em -.5em 1em purple,-.5em -.5em 1em #0ff;background-color:#0000004d}.external-shadow{width:10em;height:10em;border-radius:50%;display:flex;justify-content:center;align-items:center;position:relative;box-shadow:.5em .5em 3em #8a2be2,-.5em .5em 3em #00f,.5em -.5em 3em purple,-.5em -.5em 3em #0ff;z-index:999;animation:rotate 3s linear infinite;background-color:#21212180}@keyframes rotate{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.spinner-image{width:70%;height:70%;border-radius:50%;object-fit:cover;position:absolute;z-index:1000}.loading-text{font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:3px;background:linear-gradient(45deg,#0ff,#f0f);-webkit-background-clip:text;background-clip:text;color:transparent}@keyframes pulse{0%,to{opacity:.7}50%{opacity:1}}\n"] }]
|
|
179
|
+
}], ctorParameters: () => [] });
|
|
176
180
|
|
|
177
181
|
class AlertaService {
|
|
178
182
|
toastrService = inject(ToastrService);
|
|
@@ -236,7 +240,7 @@ class AlertaService {
|
|
|
236
240
|
cancelButtonText: `<i class="fa fa-thumbs-down"></i> Cancelar`,
|
|
237
241
|
}).then((result) => result.isConfirmed));
|
|
238
242
|
}
|
|
239
|
-
alertaHtml(titleAlert, message, icono = 'icon/notFound01.png', timer =
|
|
243
|
+
alertaHtml(titleAlert, message, icono = 'icon/notFound01.png', timer = 3500) {
|
|
240
244
|
return this.preloadImage(icono).then(() => {
|
|
241
245
|
Swal.fire({
|
|
242
246
|
title: titleAlert,
|
|
@@ -274,27 +278,41 @@ class AlertaService {
|
|
|
274
278
|
* // Alerta con botón de confirmación (persistente)
|
|
275
279
|
* alertaHtmlSuccess('Confirmación', '¿Desea continuar?', 'question.png', 'question', 0, true, 'Continuar');
|
|
276
280
|
*/
|
|
277
|
-
alertaHtmlSuccess(titleAlert, messageHtml,
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
281
|
+
alertaHtmlSuccess(titleAlert, messageHtml, options = {}) {
|
|
282
|
+
// Valores por defecto
|
|
283
|
+
const { icono = 'icon/check02.png', icon = 'success', showConfirmButton = false, confirmButtonText = 'Ok', timer = 2000, imageWidth = 125, imageHeight = 125, showImage = true, } = options;
|
|
284
|
+
// Preparar la configuración base
|
|
285
|
+
const alertConfig = {
|
|
286
|
+
title: titleAlert,
|
|
287
|
+
icon,
|
|
288
|
+
draggable: true,
|
|
289
|
+
html: messageHtml,
|
|
290
|
+
showConfirmButton,
|
|
291
|
+
confirmButtonText,
|
|
292
|
+
};
|
|
293
|
+
// Agregar configuración de imagen solo si es necesario
|
|
294
|
+
if (showImage && icono) {
|
|
295
|
+
alertConfig.imageUrl = `assets/dsxResource/${icono}`;
|
|
296
|
+
alertConfig.imageWidth = imageWidth;
|
|
297
|
+
alertConfig.imageHeight = imageHeight;
|
|
298
|
+
alertConfig.imageAlt = 'image alert';
|
|
299
|
+
// Precargar imagen solo si se usará
|
|
300
|
+
return this.preloadImage(icono).then(() => {
|
|
301
|
+
this.configureTimer(alertConfig, showConfirmButton, timer);
|
|
302
|
+
return Swal.fire(alertConfig);
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
// No necesita precargar imagen
|
|
307
|
+
this.configureTimer(alertConfig, showConfirmButton, timer);
|
|
308
|
+
return Swal.fire(alertConfig);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
configureTimer(config, showConfirmButton, timer) {
|
|
312
|
+
if (!showConfirmButton && timer > 0) {
|
|
313
|
+
config.timer = timer;
|
|
314
|
+
config.timerProgressBar = true;
|
|
315
|
+
}
|
|
298
316
|
}
|
|
299
317
|
//notifyAlertSuccess(message: string) {
|
|
300
318
|
// this._notyf.success({
|
|
@@ -328,10 +346,10 @@ class AlertaService {
|
|
|
328
346
|
});
|
|
329
347
|
}
|
|
330
348
|
}
|
|
331
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
332
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
349
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AlertaService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
350
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AlertaService, providedIn: 'root' });
|
|
333
351
|
}
|
|
334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AlertaService, decorators: [{
|
|
335
353
|
type: Injectable,
|
|
336
354
|
args: [{
|
|
337
355
|
providedIn: 'root',
|
|
@@ -389,10 +407,10 @@ class ParameterValuesService {
|
|
|
389
407
|
: [],
|
|
390
408
|
}));
|
|
391
409
|
}
|
|
392
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
393
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
410
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ParameterValuesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
411
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ParameterValuesService, providedIn: 'root' });
|
|
394
412
|
}
|
|
395
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ParameterValuesService, decorators: [{
|
|
396
414
|
type: Injectable,
|
|
397
415
|
args: [{
|
|
398
416
|
providedIn: 'root',
|
|
@@ -433,10 +451,10 @@ class SecurityService {
|
|
|
433
451
|
// Realiza una solicitud GET al endpoint de parámetros de seguridad
|
|
434
452
|
return this.http.get(`${this.urlApi}/securityParameter/`, { params });
|
|
435
453
|
}
|
|
436
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
437
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
454
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SecurityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
455
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SecurityService, providedIn: 'root' });
|
|
438
456
|
}
|
|
439
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SecurityService, decorators: [{
|
|
440
458
|
type: Injectable,
|
|
441
459
|
args: [{
|
|
442
460
|
providedIn: 'root',
|
|
@@ -490,10 +508,10 @@ class NavbarDsxComponent {
|
|
|
490
508
|
complete: () => '',
|
|
491
509
|
});
|
|
492
510
|
}
|
|
493
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
494
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.
|
|
511
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NavbarDsxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
512
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.14", type: NavbarDsxComponent, isStandalone: true, selector: "app-navbar-dsx", inputs: { logoWidth: { classPropertyName: "logoWidth", publicName: "logoWidth", isSignal: true, isRequired: false, transformFunction: null }, appVersion: { classPropertyName: "appVersion", publicName: "appVersion", isSignal: true, isRequired: false, transformFunction: null }, urlLogo: { classPropertyName: "urlLogo", publicName: "urlLogo", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<p-menubar>\r\n <ng-template #start>\r\n <p-image\r\n class=\"ms-15\"\r\n [src]=\"urlLogo()\"\r\n alt=\"Image\"\r\n [width]=\"logoWidth()\"\r\n />\r\n <span class=\"version-text\">{{ appVersion() }}</span>\r\n </ng-template>\r\n <ng-template #end>\r\n <div class=\"flex items-center me-5\">\r\n <p-button\r\n class=\"mr-2\"\r\n label=\"Permisos\"\r\n variant=\"text\"\r\n severity=\"info\"\r\n (click)=\"actualizarSeguridadIT()\"\r\n >\r\n <span class=\"material-symbols-outlined mr-1\">local_police</span>\r\n </p-button>\r\n <label class=\"ui-switch\">\r\n <input\r\n type=\"checkbox\"\r\n [(ngModel)]=\"checked\"\r\n (click)=\"onThemeChange(!checked ? true : false)\"\r\n />\r\n <div class=\"slider\">\r\n <div class=\"circle\"></div>\r\n </div>\r\n </label>\r\n <!-- <p-inputSwitch\r\n [(ngModel)]=\"checked\"\r\n (onChange)=\"onThemeChange($event.checked)\"\r\n ></p-inputSwitch> -->\r\n </div>\r\n </ng-template>\r\n</p-menubar>\r\n", styles: [".ui-switch{--switch-bg: rgb(135, 150, 165);--switch-width: 48px;--switch-height: 20px;--circle-diameter: 32px;--circle-bg: rgb(232, 89, 15);--circle-inset: calc((var(--circle-diameter) - var(--switch-height)) / 2)}.ui-switch input{display:none}.slider{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:var(--switch-width);height:var(--switch-height);background:var(--switch-bg);border-radius:999px;position:relative;cursor:pointer}.slider .circle{top:calc(var(--circle-inset) * -1);left:0;width:var(--circle-diameter);height:var(--circle-diameter);position:absolute;background:var(--circle-bg);border-radius:inherit;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHdpZHRoPSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIj4KICAgIDxwYXRoIGZpbGw9IiNmZmYiCiAgICAgICAgZD0iTTkuMzA1IDEuNjY3VjMuNzVoMS4zODlWMS42NjdoLTEuMzl6bS00LjcwNyAxLjk1bC0uOTgyLjk4Mkw1LjA5IDYuMDcybC45ODItLjk4Mi0xLjQ3My0xLjQ3M3ptMTAuODAyIDBMMTMuOTI3IDUuMDlsLjk4Mi45ODIgMS40NzMtMS40NzMtLjk4Mi0uOTgyek0xMCA1LjEzOWE0Ljg3MiA0Ljg3MiAwIDAwLTQuODYyIDQuODZBNC44NzIgNC44NzIgMCAwMDEwIDE0Ljg2MiA0Ljg3MiA0Ljg3MiAwIDAwMTQuODYgMTAgNC44NzIgNC44NzIgMCAwMDEwIDUuMTM5em0wIDEuMzg5QTMuNDYyIDMuNDYyIDAgMDExMy40NzEgMTBhMy40NjIgMy40NjIgMCAwMS0zLjQ3MyAzLjQ3MkEzLjQ2MiAzLjQ2MiAwIDAxNi41MjcgMTAgMy40NjIgMy40NjIgMCAwMTEwIDYuNTI4ek0xLjY2NSA5LjMwNXYxLjM5aDIuMDgzdi0xLjM5SDEuNjY2em0xNC41ODMgMHYxLjM5aDIuMDg0di0xLjM5aC0yLjA4NHpNNS4wOSAxMy45MjhMMy42MTYgMTUuNGwuOTgyLjk4MiAxLjQ3My0xLjQ3My0uOTgyLS45ODJ6bTkuODIgMGwtLjk4Mi45ODIgMS40NzMgMS40NzMuOTgyLS45ODItMS40NzMtMS40NzN6TTkuMzA1IDE2LjI1djIuMDgzaDEuMzg5VjE2LjI1aC0xLjM5eiIgLz4KPC9zdmc+);background-repeat:no-repeat;background-position:center center;-webkit-transition:left .15s cubic-bezier(.4,0,.2,1) 0ms,-webkit-transform .15s cubic-bezier(.4,0,.2,1) 0ms;-o-transition:left .15s cubic-bezier(.4,0,.2,1) 0ms,transform .15s cubic-bezier(.4,0,.2,1) 0ms;transition:left .15s cubic-bezier(.4,0,.2,1) 0ms,transform .15s cubic-bezier(.4,0,.2,1) 0ms,-webkit-transform .15s cubic-bezier(.4,0,.2,1) 0ms;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}.slider .circle:before{content:\"\";position:absolute;width:100%;height:100%;background:#ffffffbf;border-radius:inherit;-webkit-transition:all .5s;-o-transition:all .5s;transition:all .5s;opacity:0}.ui-switch input:checked+.slider .circle{left:calc(100% - var(--circle-diameter));background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHdpZHRoPSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIj4KICAgIDxwYXRoIGZpbGw9IiNmZmYiCiAgICAgICAgZD0iTTQuMiAyLjVsLS43IDEuOC0xLjguNyAxLjguNy43IDEuOC42LTEuOEw2LjcgNWwtMS45LS43LS42LTEuOHptMTUgOC4zYTYuNyA2LjcgMCAxMS02LjYtNi42IDUuOCA1LjggMCAwMDYuNiA2LjZ6IiAvPgo8L3N2Zz4=);background-color:#003892}.ui-switch input:active+.slider .circle:before{-webkit-transition:0s;-o-transition:0s;transition:0s;opacity:1;width:0;height:0}\n"], dependencies: [{ kind: "ngmodule", type: MenubarModule }, { kind: "component", type: i1$2.Menubar, selector: "p-menubar", inputs: ["model", "style", "styleClass", "autoZIndex", "baseZIndex", "autoDisplay", "autoHide", "breakpoint", "autoHideDelay", "id", "ariaLabel", "ariaLabelledBy"], outputs: ["onFocus", "onBlur"] }, { kind: "ngmodule", type: ImageModule }, { kind: "component", type: i2.Image, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "style", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "appendTo", "preview", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i3.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: "ngmodule", type: InputSwitchModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
495
513
|
}
|
|
496
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
514
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NavbarDsxComponent, decorators: [{
|
|
497
515
|
type: Component,
|
|
498
516
|
args: [{ selector: 'app-navbar-dsx', imports: [
|
|
499
517
|
MenubarModule,
|
|
@@ -511,10 +529,10 @@ class SelectAllOnFocusDirective {
|
|
|
511
529
|
htmlInput.select();
|
|
512
530
|
}
|
|
513
531
|
}
|
|
514
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
515
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
532
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SelectAllOnFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
533
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: SelectAllOnFocusDirective, isStandalone: true, selector: "[appSelectAllOnFocus]", host: { listeners: { "onFocus": "selectAll($event)", "focus": "selectAll($event)" } }, ngImport: i0 });
|
|
516
534
|
}
|
|
517
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SelectAllOnFocusDirective, decorators: [{
|
|
518
536
|
type: Directive,
|
|
519
537
|
args: [{
|
|
520
538
|
selector: '[appSelectAllOnFocus]',
|
|
@@ -603,10 +621,10 @@ class AuthorizeService {
|
|
|
603
621
|
// Devuelve true si el token NO ha expirado
|
|
604
622
|
return !this.helperJwt.isTokenExpired(token);
|
|
605
623
|
}
|
|
606
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
607
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
624
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthorizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
625
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthorizeService, providedIn: 'root' });
|
|
608
626
|
}
|
|
609
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
627
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthorizeService, decorators: [{
|
|
610
628
|
type: Injectable,
|
|
611
629
|
args: [{
|
|
612
630
|
providedIn: 'root',
|
|
@@ -658,10 +676,10 @@ class ErrorHandlerService {
|
|
|
658
676
|
// Retornar el error para continuar con el flujo de manejo de errores
|
|
659
677
|
return throwError(() => new Error(technicalMessage));
|
|
660
678
|
}
|
|
661
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
662
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
679
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
680
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ErrorHandlerService, providedIn: 'root' });
|
|
663
681
|
}
|
|
664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
682
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ErrorHandlerService, decorators: [{
|
|
665
683
|
type: Injectable,
|
|
666
684
|
args: [{
|
|
667
685
|
providedIn: 'root',
|
|
@@ -691,12 +709,17 @@ const httpAuthorizeInterceptor = (req, next) => {
|
|
|
691
709
|
_spinnerService.show();
|
|
692
710
|
}
|
|
693
711
|
_activeRequest++;
|
|
712
|
+
// Función para controlar el spinner.hide()
|
|
713
|
+
const hideSpinner = () => {
|
|
714
|
+
// Solo oculta si NO está en modo depuración
|
|
715
|
+
_spinnerService.hide();
|
|
716
|
+
};
|
|
694
717
|
return next(authReq).pipe(catchError((error) => {
|
|
695
718
|
// Si el error es 401
|
|
696
719
|
if (error.status === HttpStatusCode.Unauthorized) {
|
|
697
720
|
// Si no hay refreshToken, finalizar la sesión
|
|
698
721
|
if (!_tokenRefresh) {
|
|
699
|
-
|
|
722
|
+
hideSpinner();
|
|
700
723
|
return _handleErrorService.handleErrorResponse(new HttpErrorResponse({
|
|
701
724
|
status: 401,
|
|
702
725
|
statusText: 'No autorizado. El token de refresco no está disponible.',
|
|
@@ -709,7 +732,7 @@ const httpAuthorizeInterceptor = (req, next) => {
|
|
|
709
732
|
// Intentar refrescar el token
|
|
710
733
|
return _securityService.tokenRefresh(_tokenRefresh).pipe(switchMap((response) => {
|
|
711
734
|
if (!response.token || !response.tokenRefresh) {
|
|
712
|
-
|
|
735
|
+
hideSpinner();
|
|
713
736
|
return _handleErrorService.handleErrorResponse(new HttpErrorResponse({
|
|
714
737
|
status: 401,
|
|
715
738
|
statusText: 'No autorizado. El token de refresco ha expirado.',
|
|
@@ -743,7 +766,7 @@ const httpAuthorizeInterceptor = (req, next) => {
|
|
|
743
766
|
}), catchError((refreshError) => {
|
|
744
767
|
// Finalizamos el refresco si hay error
|
|
745
768
|
_authorizeService.isRefreshing = false;
|
|
746
|
-
|
|
769
|
+
hideSpinner();
|
|
747
770
|
return _handleErrorService.handleErrorResponse(new HttpErrorResponse({
|
|
748
771
|
status: 401,
|
|
749
772
|
statusText: 'Error al refrescar el token. Redirigiendo al login.',
|
|
@@ -769,7 +792,7 @@ const httpAuthorizeInterceptor = (req, next) => {
|
|
|
769
792
|
}), finalize(() => {
|
|
770
793
|
_activeRequest--;
|
|
771
794
|
if (_activeRequest === 0) {
|
|
772
|
-
|
|
795
|
+
hideSpinner();
|
|
773
796
|
}
|
|
774
797
|
}));
|
|
775
798
|
};
|
|
@@ -805,10 +828,10 @@ class TruncatePipe {
|
|
|
805
828
|
// Trunca el texto y añade el ellipsis si la longitud del texto supera el límite.
|
|
806
829
|
return value.length > limit ? value.slice(0, limit) + ellipsis : value;
|
|
807
830
|
}
|
|
808
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
809
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
831
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
832
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: TruncatePipe, isStandalone: true, name: "truncate" });
|
|
810
833
|
}
|
|
811
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
834
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TruncatePipe, decorators: [{
|
|
812
835
|
type: Pipe,
|
|
813
836
|
args: [{
|
|
814
837
|
name: 'truncate',
|
|
@@ -857,7 +880,7 @@ class CacheService {
|
|
|
857
880
|
*
|
|
858
881
|
* Este estado es tipado automáticamente en función de los valores de `T`.
|
|
859
882
|
*/
|
|
860
|
-
_options = signal(
|
|
883
|
+
_options = signal(Object.fromEntries(Object.values(this.keys).map((k) => [k, false])));
|
|
861
884
|
/**
|
|
862
885
|
* Obtiene el estado actual del caché.
|
|
863
886
|
* Cada propiedad representa una clave real de caché con su valor booleano.
|
|
@@ -887,10 +910,10 @@ class CacheService {
|
|
|
887
910
|
this._options.set(current);
|
|
888
911
|
this.alert.toastrAlerts(2, 'Estado', 'Datos actualizados (cache).', 2, 1000);
|
|
889
912
|
}
|
|
890
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
891
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
913
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
914
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CacheService, providedIn: 'root' });
|
|
892
915
|
}
|
|
893
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
916
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CacheService, decorators: [{
|
|
894
917
|
type: Injectable,
|
|
895
918
|
args: [{
|
|
896
919
|
providedIn: 'root',
|
|
@@ -915,10 +938,10 @@ class EndpointService {
|
|
|
915
938
|
delete(endpoint, values, softDelete = true) {
|
|
916
939
|
return this.http.put(`${this.getUrl(endpoint)}/PutDelete/${softDelete}`, values);
|
|
917
940
|
}
|
|
918
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
919
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
941
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EndpointService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
942
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EndpointService, providedIn: 'root' });
|
|
920
943
|
}
|
|
921
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
944
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EndpointService, decorators: [{
|
|
922
945
|
type: Injectable,
|
|
923
946
|
args: [{
|
|
924
947
|
providedIn: 'root',
|
|
@@ -1168,10 +1191,10 @@ class UtilityAddService {
|
|
|
1168
1191
|
}, []);
|
|
1169
1192
|
return uniqueValues.sort((a, b) => a.value.localeCompare(b.value));
|
|
1170
1193
|
}
|
|
1171
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1172
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
1194
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UtilityAddService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1195
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UtilityAddService, providedIn: 'root' });
|
|
1173
1196
|
}
|
|
1174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UtilityAddService, decorators: [{
|
|
1175
1198
|
type: Injectable,
|
|
1176
1199
|
args: [{
|
|
1177
1200
|
providedIn: 'root',
|