ngx-dsxlibrary 1.0.49 → 1.0.51
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 +134 -94
- 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 +89 -15
- package/ngx-dsxlibrary-1.0.51.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,
|
|
@@ -255,46 +259,77 @@ class AlertaService {
|
|
|
255
259
|
});
|
|
256
260
|
}
|
|
257
261
|
/**
|
|
258
|
-
* Muestra una alerta visual personalizada
|
|
262
|
+
* Muestra una alerta visual personalizada usando SweetAlert2 con múltiples opciones de configuración
|
|
259
263
|
*
|
|
260
|
-
* @param titleAlert
|
|
261
|
-
* @param messageHtml
|
|
262
|
-
* @param
|
|
263
|
-
*
|
|
264
|
-
* @
|
|
265
|
-
*
|
|
266
|
-
* @param timer - Tiempo en ms para auto-cierre (default 2000). Se ignora si showConfirmButton es true
|
|
267
|
-
* @returns Promise<void> que se resuelve cuando la alerta se muestra
|
|
264
|
+
* @param titleAlert Título principal de la alerta (requerido)
|
|
265
|
+
* @param messageHtml Mensaje en formato HTML (requerido)
|
|
266
|
+
* @param options Opciones configurables de la alerta (opcional)
|
|
267
|
+
*
|
|
268
|
+
* @returns Promise<SweetAlertResult> que se resuelve cuando el usuario interactúa con la alerta
|
|
269
|
+
* o cuando se cierra automáticamente. Puedes usar .then() para manejar la respuesta.
|
|
268
270
|
*
|
|
269
271
|
* @example
|
|
270
|
-
* // Alerta con
|
|
271
|
-
* alertaHtmlSuccess('
|
|
272
|
+
* // Alerta básica con icono de éxito y cierre automático
|
|
273
|
+
* alertaHtmlSuccess('Operación exitosa', 'Los datos se guardaron correctamente');
|
|
272
274
|
*
|
|
273
275
|
* @example
|
|
274
|
-
* // Alerta
|
|
275
|
-
* alertaHtmlSuccess('
|
|
276
|
+
* // Alerta de error con imagen personalizada
|
|
277
|
+
* alertaHtmlSuccess('Error crítico', 'No se pudo conectar al servidor', {
|
|
278
|
+
* icono: 'error-icon.png',
|
|
279
|
+
* icon: 'error',
|
|
280
|
+
* timer: 5000
|
|
281
|
+
* });
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* // Alerta de confirmación con botón
|
|
285
|
+
* alertaHtmlSuccess('Confirmar acción', '¿Está seguro de eliminar este registro?', {
|
|
286
|
+
* showConfirmButton: true,
|
|
287
|
+
* confirmButtonText: 'Sí, eliminar',
|
|
288
|
+
* icon: 'warning',
|
|
289
|
+
* showImage: false
|
|
290
|
+
* }).then((result) => {
|
|
291
|
+
* if (result.isConfirmed) {
|
|
292
|
+
* // Lógica cuando el usuario confirma
|
|
293
|
+
* }
|
|
294
|
+
* });
|
|
276
295
|
*/
|
|
277
|
-
alertaHtmlSuccess(titleAlert, messageHtml,
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
296
|
+
alertaHtmlSuccess(titleAlert, messageHtml, options = {}) {
|
|
297
|
+
// Valores por defecto (se pueden sobrescribir mediante options)
|
|
298
|
+
const { icono = 'icon/check02.png', // Ruta relativa de la imagen en assets/dsxResource/
|
|
299
|
+
icon = 'success', // Tipo de icono SweetAlert2
|
|
300
|
+
showConfirmButton = false, // Mostrar botón de confirmación
|
|
301
|
+
confirmButtonText = 'Ok', // Texto del botón de confirmación
|
|
302
|
+
timer = 2000, // Tiempo de auto-cierre en ms (0 = desactivado)
|
|
303
|
+
imageWidth = 125, // Ancho de la imagen en px
|
|
304
|
+
imageHeight = 125, // Alto de la imagen en px
|
|
305
|
+
showImage = true, // Mostrar imagen personalizada
|
|
306
|
+
} = options;
|
|
307
|
+
// Configuración base de SweetAlert
|
|
308
|
+
const alertConfig = {
|
|
309
|
+
title: titleAlert,
|
|
310
|
+
icon,
|
|
311
|
+
html: messageHtml,
|
|
312
|
+
draggable: true,
|
|
313
|
+
showConfirmButton,
|
|
314
|
+
confirmButtonText,
|
|
315
|
+
timer: showConfirmButton ? undefined : timer, // Timer solo si no hay botón
|
|
316
|
+
timerProgressBar: !showConfirmButton && timer > 0,
|
|
317
|
+
imageUrl: showImage && icono ? `assets/dsxResource/${icono}` : undefined,
|
|
318
|
+
imageWidth: showImage ? imageWidth : undefined,
|
|
319
|
+
imageHeight: showImage ? imageHeight : undefined,
|
|
320
|
+
imageAlt: showImage ? 'image alert' : undefined,
|
|
321
|
+
};
|
|
322
|
+
// Precargar imagen solo si es necesario
|
|
323
|
+
if (showImage && icono) {
|
|
324
|
+
return this.preloadImage(icono).then(() => Swal.fire(alertConfig));
|
|
325
|
+
}
|
|
326
|
+
return Swal.fire(alertConfig);
|
|
327
|
+
}
|
|
328
|
+
configureTimer(config, showConfirmButton, timer) {
|
|
329
|
+
if (!showConfirmButton && timer > 0) {
|
|
330
|
+
config.timer = timer;
|
|
331
|
+
config.timerProgressBar = true;
|
|
332
|
+
}
|
|
298
333
|
}
|
|
299
334
|
//notifyAlertSuccess(message: string) {
|
|
300
335
|
// this._notyf.success({
|
|
@@ -328,10 +363,10 @@ class AlertaService {
|
|
|
328
363
|
});
|
|
329
364
|
}
|
|
330
365
|
}
|
|
331
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
332
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
366
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AlertaService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
367
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AlertaService, providedIn: 'root' });
|
|
333
368
|
}
|
|
334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AlertaService, decorators: [{
|
|
335
370
|
type: Injectable,
|
|
336
371
|
args: [{
|
|
337
372
|
providedIn: 'root',
|
|
@@ -389,10 +424,10 @@ class ParameterValuesService {
|
|
|
389
424
|
: [],
|
|
390
425
|
}));
|
|
391
426
|
}
|
|
392
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
393
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
427
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ParameterValuesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
428
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ParameterValuesService, providedIn: 'root' });
|
|
394
429
|
}
|
|
395
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ParameterValuesService, decorators: [{
|
|
396
431
|
type: Injectable,
|
|
397
432
|
args: [{
|
|
398
433
|
providedIn: 'root',
|
|
@@ -433,10 +468,10 @@ class SecurityService {
|
|
|
433
468
|
// Realiza una solicitud GET al endpoint de parámetros de seguridad
|
|
434
469
|
return this.http.get(`${this.urlApi}/securityParameter/`, { params });
|
|
435
470
|
}
|
|
436
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
437
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
471
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SecurityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
472
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SecurityService, providedIn: 'root' });
|
|
438
473
|
}
|
|
439
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SecurityService, decorators: [{
|
|
440
475
|
type: Injectable,
|
|
441
476
|
args: [{
|
|
442
477
|
providedIn: 'root',
|
|
@@ -490,10 +525,10 @@ class NavbarDsxComponent {
|
|
|
490
525
|
complete: () => '',
|
|
491
526
|
});
|
|
492
527
|
}
|
|
493
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
494
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.
|
|
528
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NavbarDsxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
529
|
+
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
530
|
}
|
|
496
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NavbarDsxComponent, decorators: [{
|
|
497
532
|
type: Component,
|
|
498
533
|
args: [{ selector: 'app-navbar-dsx', imports: [
|
|
499
534
|
MenubarModule,
|
|
@@ -511,10 +546,10 @@ class SelectAllOnFocusDirective {
|
|
|
511
546
|
htmlInput.select();
|
|
512
547
|
}
|
|
513
548
|
}
|
|
514
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
515
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
549
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SelectAllOnFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
550
|
+
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
551
|
}
|
|
517
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SelectAllOnFocusDirective, decorators: [{
|
|
518
553
|
type: Directive,
|
|
519
554
|
args: [{
|
|
520
555
|
selector: '[appSelectAllOnFocus]',
|
|
@@ -603,10 +638,10 @@ class AuthorizeService {
|
|
|
603
638
|
// Devuelve true si el token NO ha expirado
|
|
604
639
|
return !this.helperJwt.isTokenExpired(token);
|
|
605
640
|
}
|
|
606
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
607
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
641
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthorizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
642
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthorizeService, providedIn: 'root' });
|
|
608
643
|
}
|
|
609
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
644
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthorizeService, decorators: [{
|
|
610
645
|
type: Injectable,
|
|
611
646
|
args: [{
|
|
612
647
|
providedIn: 'root',
|
|
@@ -658,10 +693,10 @@ class ErrorHandlerService {
|
|
|
658
693
|
// Retornar el error para continuar con el flujo de manejo de errores
|
|
659
694
|
return throwError(() => new Error(technicalMessage));
|
|
660
695
|
}
|
|
661
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
662
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
696
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
697
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ErrorHandlerService, providedIn: 'root' });
|
|
663
698
|
}
|
|
664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ErrorHandlerService, decorators: [{
|
|
665
700
|
type: Injectable,
|
|
666
701
|
args: [{
|
|
667
702
|
providedIn: 'root',
|
|
@@ -691,12 +726,17 @@ const httpAuthorizeInterceptor = (req, next) => {
|
|
|
691
726
|
_spinnerService.show();
|
|
692
727
|
}
|
|
693
728
|
_activeRequest++;
|
|
729
|
+
// Función para controlar el spinner.hide()
|
|
730
|
+
const hideSpinner = () => {
|
|
731
|
+
// Solo oculta si NO está en modo depuración
|
|
732
|
+
_spinnerService.hide();
|
|
733
|
+
};
|
|
694
734
|
return next(authReq).pipe(catchError((error) => {
|
|
695
735
|
// Si el error es 401
|
|
696
736
|
if (error.status === HttpStatusCode.Unauthorized) {
|
|
697
737
|
// Si no hay refreshToken, finalizar la sesión
|
|
698
738
|
if (!_tokenRefresh) {
|
|
699
|
-
|
|
739
|
+
hideSpinner();
|
|
700
740
|
return _handleErrorService.handleErrorResponse(new HttpErrorResponse({
|
|
701
741
|
status: 401,
|
|
702
742
|
statusText: 'No autorizado. El token de refresco no está disponible.',
|
|
@@ -709,7 +749,7 @@ const httpAuthorizeInterceptor = (req, next) => {
|
|
|
709
749
|
// Intentar refrescar el token
|
|
710
750
|
return _securityService.tokenRefresh(_tokenRefresh).pipe(switchMap((response) => {
|
|
711
751
|
if (!response.token || !response.tokenRefresh) {
|
|
712
|
-
|
|
752
|
+
hideSpinner();
|
|
713
753
|
return _handleErrorService.handleErrorResponse(new HttpErrorResponse({
|
|
714
754
|
status: 401,
|
|
715
755
|
statusText: 'No autorizado. El token de refresco ha expirado.',
|
|
@@ -743,7 +783,7 @@ const httpAuthorizeInterceptor = (req, next) => {
|
|
|
743
783
|
}), catchError((refreshError) => {
|
|
744
784
|
// Finalizamos el refresco si hay error
|
|
745
785
|
_authorizeService.isRefreshing = false;
|
|
746
|
-
|
|
786
|
+
hideSpinner();
|
|
747
787
|
return _handleErrorService.handleErrorResponse(new HttpErrorResponse({
|
|
748
788
|
status: 401,
|
|
749
789
|
statusText: 'Error al refrescar el token. Redirigiendo al login.',
|
|
@@ -769,7 +809,7 @@ const httpAuthorizeInterceptor = (req, next) => {
|
|
|
769
809
|
}), finalize(() => {
|
|
770
810
|
_activeRequest--;
|
|
771
811
|
if (_activeRequest === 0) {
|
|
772
|
-
|
|
812
|
+
hideSpinner();
|
|
773
813
|
}
|
|
774
814
|
}));
|
|
775
815
|
};
|
|
@@ -805,10 +845,10 @@ class TruncatePipe {
|
|
|
805
845
|
// Trunca el texto y añade el ellipsis si la longitud del texto supera el límite.
|
|
806
846
|
return value.length > limit ? value.slice(0, limit) + ellipsis : value;
|
|
807
847
|
}
|
|
808
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
809
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
848
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
849
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: TruncatePipe, isStandalone: true, name: "truncate" });
|
|
810
850
|
}
|
|
811
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
851
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TruncatePipe, decorators: [{
|
|
812
852
|
type: Pipe,
|
|
813
853
|
args: [{
|
|
814
854
|
name: 'truncate',
|
|
@@ -857,7 +897,7 @@ class CacheService {
|
|
|
857
897
|
*
|
|
858
898
|
* Este estado es tipado automáticamente en función de los valores de `T`.
|
|
859
899
|
*/
|
|
860
|
-
_options = signal(
|
|
900
|
+
_options = signal(Object.fromEntries(Object.values(this.keys).map((k) => [k, false])));
|
|
861
901
|
/**
|
|
862
902
|
* Obtiene el estado actual del caché.
|
|
863
903
|
* Cada propiedad representa una clave real de caché con su valor booleano.
|
|
@@ -887,10 +927,10 @@ class CacheService {
|
|
|
887
927
|
this._options.set(current);
|
|
888
928
|
this.alert.toastrAlerts(2, 'Estado', 'Datos actualizados (cache).', 2, 1000);
|
|
889
929
|
}
|
|
890
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
891
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
930
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
931
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CacheService, providedIn: 'root' });
|
|
892
932
|
}
|
|
893
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CacheService, decorators: [{
|
|
894
934
|
type: Injectable,
|
|
895
935
|
args: [{
|
|
896
936
|
providedIn: 'root',
|
|
@@ -915,10 +955,10 @@ class EndpointService {
|
|
|
915
955
|
delete(endpoint, values, softDelete = true) {
|
|
916
956
|
return this.http.put(`${this.getUrl(endpoint)}/PutDelete/${softDelete}`, values);
|
|
917
957
|
}
|
|
918
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
919
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
958
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EndpointService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
959
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EndpointService, providedIn: 'root' });
|
|
920
960
|
}
|
|
921
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
961
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EndpointService, decorators: [{
|
|
922
962
|
type: Injectable,
|
|
923
963
|
args: [{
|
|
924
964
|
providedIn: 'root',
|
|
@@ -1168,10 +1208,10 @@ class UtilityAddService {
|
|
|
1168
1208
|
}, []);
|
|
1169
1209
|
return uniqueValues.sort((a, b) => a.value.localeCompare(b.value));
|
|
1170
1210
|
}
|
|
1171
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1172
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
1211
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UtilityAddService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1212
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UtilityAddService, providedIn: 'root' });
|
|
1173
1213
|
}
|
|
1174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UtilityAddService, decorators: [{
|
|
1175
1215
|
type: Injectable,
|
|
1176
1216
|
args: [{
|
|
1177
1217
|
providedIn: 'root',
|