ngx-dsxlibrary 2.21.35 → 2.21.37
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 +133 -17
- package/fesm2022/ngx-dsxlibrary-src-lib-components.mjs.map +1 -1
- package/fesm2022/ngx-dsxlibrary.mjs +230 -30
- package/fesm2022/ngx-dsxlibrary.mjs.map +1 -1
- package/ngx-dsxlibrary-2.21.37.tgz +0 -0
- package/package.json +1 -1
- package/types/ngx-dsxlibrary-src-lib-components.d.ts +34 -2
- package/types/ngx-dsxlibrary.d.ts +39 -3
- package/ngx-dsxlibrary-2.21.35.tgz +0 -0
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import * as i1$
|
|
1
|
+
import * as i1$2 from '@angular/common';
|
|
2
2
|
import { DecimalPipe, CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Input, Component, forwardRef, viewChild,
|
|
4
|
+
import { Input, Component, input, forwardRef, viewChild, signal, EventEmitter, effect, Output, model, inject, computed } from '@angular/core';
|
|
5
5
|
import * as i1 from 'primeng/tag';
|
|
6
6
|
import { TagModule } from 'primeng/tag';
|
|
7
|
-
import
|
|
7
|
+
import * as i1$1 from '@angular/forms';
|
|
8
|
+
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
9
|
+
import * as i2 from 'primeng/togglebutton';
|
|
10
|
+
import { ToggleButtonModule } from 'primeng/togglebutton';
|
|
8
11
|
import { FileUpload } from 'primeng/fileupload';
|
|
9
|
-
import * as i2 from 'primeng/tree';
|
|
12
|
+
import * as i2$1 from 'primeng/tree';
|
|
10
13
|
import { TreeModule } from 'primeng/tree';
|
|
11
14
|
import * as i3 from 'primeng/api';
|
|
15
|
+
import * as i2$2 from 'primeng/tooltip';
|
|
16
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
12
17
|
import { CountUpDirective } from 'ngx-countup';
|
|
13
|
-
import * as i2$
|
|
18
|
+
import * as i2$3 from 'primeng/avatar';
|
|
14
19
|
import { AvatarModule } from 'primeng/avatar';
|
|
15
|
-
import * as i1$
|
|
20
|
+
import * as i1$3 from 'primeng/dialog';
|
|
16
21
|
import { DialogModule } from 'primeng/dialog';
|
|
17
|
-
import * as i1$
|
|
22
|
+
import * as i1$4 from '@angular/platform-browser';
|
|
18
23
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
19
|
-
import * as i1$
|
|
24
|
+
import * as i1$5 from 'primeng/tabs';
|
|
20
25
|
import { TabsModule } from 'primeng/tabs';
|
|
21
26
|
|
|
22
27
|
/**
|
|
@@ -111,17 +116,62 @@ class AppMessageErrorComponent {
|
|
|
111
116
|
return this.defaultFloatLabelErrorSpace;
|
|
112
117
|
}
|
|
113
118
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AppMessageErrorComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
114
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: AppMessageErrorComponent, isStandalone: true, selector: "app-message-error", inputs: { control: "control", form: "form" }, ngImport: i0, template: "<div class=\"dsx-error-slot\" [class.is-visible]=\"isControlErrorVisible()\">\r\n @if (isControlErrorVisible()) {\r\n <div class=\"dsx-error-message\">\r\n <i\r\n class=\"pi pi-exclamation-triangle dsx-error-icon\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n @if (control?.errors?.[\"required\"]) {\r\n El campo <strong>es requerido.</strong>\r\n } @else if (control?.errors?.[\"invalidNIT\"]) {\r\n <strong>{{ control?.errors?.[\"invalidNIT\"]?.message }}</strong
|
|
119
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: AppMessageErrorComponent, isStandalone: true, selector: "app-message-error", inputs: { control: "control", form: "form" }, ngImport: i0, template: "<div class=\"dsx-error-slot\" [class.is-visible]=\"isControlErrorVisible()\">\r\n @if (isControlErrorVisible()) {\r\n <div class=\"dsx-error-message\">\r\n <i\r\n class=\"pi pi-exclamation-triangle dsx-error-icon\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n @if (control?.errors?.[\"required\"]) {\r\n 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?.[\"invalidDate\"]) {\r\n <strong>{{ control?.errors?.[\"invalidDate\"]?.message }}</strong>\r\n } @else if (control?.errors?.[\"minimumAge\"]) {\r\n <strong>{{ control?.errors?.[\"minimumAge\"]?.message }}</strong>\r\n } @else if (control?.errors?.[\"minlength\"]) {\r\n Debe tener al menos\r\n <strong>{{ control?.errors?.[\"minlength\"]?.requiredLength }}</strong>\r\n caracteres.\r\n } @else if (control?.errors?.[\"maxlength\"]) {\r\n Debe tener como m\u00E1ximo\r\n <strong>{{ control?.errors?.[\"maxlength\"]?.requiredLength }}</strong>\r\n caracteres.\r\n } @else if (control?.errors?.[\"min\"]) {\r\n El valor m\u00EDnimo permitido es\r\n <strong>{{ control?.errors?.[\"min\"]?.min }}</strong>\r\n } @else if (control?.errors?.[\"max\"]) {\r\n El valor m\u00E1ximo permitido es\r\n <strong>{{ control?.errors?.[\"max\"]?.max | number: \"1.2-2\" }}</strong>\r\n } @else if (control?.errors?.[\"email\"]) {\r\n Debe ser una direcci\u00F3n de correo v\u00E1lida.\r\n } @else if (control?.errors?.[\"pattern\"]) {\r\n El campo no tiene el formato requerido.\r\n } @else if (control?.errors?.[\"alreadyValueExists\"]) {\r\n <strong>{{ control?.errors?.[\"alreadyValueExists\"]?.message }}</strong>\r\n } @else if (control?.errors?.[\"invalidTemplateVariables\"]) {\r\n <div class=\"dsx-template-error\">\r\n <strong>\r\n {{ control?.errors?.[\"invalidTemplateVariables\"]?.message }}\r\n </strong>\r\n @if (control?.errors?.[\"invalidTemplateVariables\"]?.details?.length) {\r\n <span class=\"dsx-template-error-detail\">\r\n {{ control?.errors?.[\"invalidTemplateVariables\"]?.details?.[0] }}\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n Existe un error a\u00FAn no identificado.\r\n }\r\n </div>\r\n }\r\n</div>\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: [":host{display:block}.dsx-error-slot{max-height:0;margin-top:0;overflow:hidden;opacity:0;transition:max-height .22s ease,margin-top .22s ease,opacity .18s ease}.dsx-error-slot.is-visible{max-height:4.25rem;margin-top:.3rem;opacity:1}.dsx-error-message{--dsx-error-color: #b42318;--dsx-error-bg: #fff2f0;color:var(--dsx-error-color);font-family:Roboto,Montserrat,sans-serif;font-size:clamp(.75rem,.72rem + .12vw,.8125rem);font-weight:400;line-height:1.35;letter-spacing:.01em;display:flex;align-items:center;gap:.35rem;position:relative;z-index:1;padding:.2rem .45rem;border-left:3px solid var(--dsx-error-color);border-radius:0 6px 6px 0;background:var(--dsx-error-bg);box-shadow:0 1px 2px #00000014;max-width:min(40ch,100%);white-space:normal;word-break:break-word;transform:translateY(-2px);transition:transform .2s ease}.dsx-error-message strong{font-weight:500}.dsx-error-icon{flex-shrink:0;font-size:.78rem;line-height:1;color:var(--dsx-error-color)}.dsx-error-slot.is-visible .dsx-error-message{transform:translateY(0)}@media(max-width:640px){.dsx-error-slot.is-visible{max-height:5rem}.dsx-error-message{max-width:100%}}:host-context(.p-floatlabel){position:absolute;top:100%;left:0;width:100%;z-index:3;pointer-events:none}:host-context(.p-floatlabel) .dsx-error-slot{max-height:none;margin-top:.25rem;overflow:visible;opacity:0;transform:translateY(-3px);transition:opacity .16s ease,transform .18s ease}:host-context(.p-floatlabel) .dsx-error-slot.is-visible{opacity:1;transform:translateY(0)}:host-context(.p-floatlabel) .dsx-error-message{max-width:min(40ch,calc(100% - .25rem))}\n"], dependencies: [{ kind: "ngmodule", type: TagModule }, { kind: "component", type: i1.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "pipe", type: DecimalPipe, name: "number" }] });
|
|
115
120
|
}
|
|
116
121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AppMessageErrorComponent, decorators: [{
|
|
117
122
|
type: Component,
|
|
118
|
-
args: [{ selector: 'app-message-error', imports: [TagModule, DecimalPipe], template: "<div class=\"dsx-error-slot\" [class.is-visible]=\"isControlErrorVisible()\">\r\n @if (isControlErrorVisible()) {\r\n <div class=\"dsx-error-message\">\r\n <i\r\n class=\"pi pi-exclamation-triangle dsx-error-icon\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n @if (control?.errors?.[\"required\"]) {\r\n El campo <strong>es requerido.</strong>\r\n } @else if (control?.errors?.[\"invalidNIT\"]) {\r\n <strong>{{ control?.errors?.[\"invalidNIT\"]?.message }}</strong
|
|
123
|
+
args: [{ selector: 'app-message-error', imports: [TagModule, DecimalPipe], template: "<div class=\"dsx-error-slot\" [class.is-visible]=\"isControlErrorVisible()\">\r\n @if (isControlErrorVisible()) {\r\n <div class=\"dsx-error-message\">\r\n <i\r\n class=\"pi pi-exclamation-triangle dsx-error-icon\"\r\n aria-hidden=\"true\"\r\n ></i>\r\n @if (control?.errors?.[\"required\"]) {\r\n 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?.[\"invalidDate\"]) {\r\n <strong>{{ control?.errors?.[\"invalidDate\"]?.message }}</strong>\r\n } @else if (control?.errors?.[\"minimumAge\"]) {\r\n <strong>{{ control?.errors?.[\"minimumAge\"]?.message }}</strong>\r\n } @else if (control?.errors?.[\"minlength\"]) {\r\n Debe tener al menos\r\n <strong>{{ control?.errors?.[\"minlength\"]?.requiredLength }}</strong>\r\n caracteres.\r\n } @else if (control?.errors?.[\"maxlength\"]) {\r\n Debe tener como m\u00E1ximo\r\n <strong>{{ control?.errors?.[\"maxlength\"]?.requiredLength }}</strong>\r\n caracteres.\r\n } @else if (control?.errors?.[\"min\"]) {\r\n El valor m\u00EDnimo permitido es\r\n <strong>{{ control?.errors?.[\"min\"]?.min }}</strong>\r\n } @else if (control?.errors?.[\"max\"]) {\r\n El valor m\u00E1ximo permitido es\r\n <strong>{{ control?.errors?.[\"max\"]?.max | number: \"1.2-2\" }}</strong>\r\n } @else if (control?.errors?.[\"email\"]) {\r\n Debe ser una direcci\u00F3n de correo v\u00E1lida.\r\n } @else if (control?.errors?.[\"pattern\"]) {\r\n El campo no tiene el formato requerido.\r\n } @else if (control?.errors?.[\"alreadyValueExists\"]) {\r\n <strong>{{ control?.errors?.[\"alreadyValueExists\"]?.message }}</strong>\r\n } @else if (control?.errors?.[\"invalidTemplateVariables\"]) {\r\n <div class=\"dsx-template-error\">\r\n <strong>\r\n {{ control?.errors?.[\"invalidTemplateVariables\"]?.message }}\r\n </strong>\r\n @if (control?.errors?.[\"invalidTemplateVariables\"]?.details?.length) {\r\n <span class=\"dsx-template-error-detail\">\r\n {{ control?.errors?.[\"invalidTemplateVariables\"]?.details?.[0] }}\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n Existe un error a\u00FAn no identificado.\r\n }\r\n </div>\r\n }\r\n</div>\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: [":host{display:block}.dsx-error-slot{max-height:0;margin-top:0;overflow:hidden;opacity:0;transition:max-height .22s ease,margin-top .22s ease,opacity .18s ease}.dsx-error-slot.is-visible{max-height:4.25rem;margin-top:.3rem;opacity:1}.dsx-error-message{--dsx-error-color: #b42318;--dsx-error-bg: #fff2f0;color:var(--dsx-error-color);font-family:Roboto,Montserrat,sans-serif;font-size:clamp(.75rem,.72rem + .12vw,.8125rem);font-weight:400;line-height:1.35;letter-spacing:.01em;display:flex;align-items:center;gap:.35rem;position:relative;z-index:1;padding:.2rem .45rem;border-left:3px solid var(--dsx-error-color);border-radius:0 6px 6px 0;background:var(--dsx-error-bg);box-shadow:0 1px 2px #00000014;max-width:min(40ch,100%);white-space:normal;word-break:break-word;transform:translateY(-2px);transition:transform .2s ease}.dsx-error-message strong{font-weight:500}.dsx-error-icon{flex-shrink:0;font-size:.78rem;line-height:1;color:var(--dsx-error-color)}.dsx-error-slot.is-visible .dsx-error-message{transform:translateY(0)}@media(max-width:640px){.dsx-error-slot.is-visible{max-height:5rem}.dsx-error-message{max-width:100%}}:host-context(.p-floatlabel){position:absolute;top:100%;left:0;width:100%;z-index:3;pointer-events:none}:host-context(.p-floatlabel) .dsx-error-slot{max-height:none;margin-top:.25rem;overflow:visible;opacity:0;transform:translateY(-3px);transition:opacity .16s ease,transform .18s ease}:host-context(.p-floatlabel) .dsx-error-slot.is-visible{opacity:1;transform:translateY(0)}:host-context(.p-floatlabel) .dsx-error-message{max-width:min(40ch,calc(100% - .25rem))}\n"] }]
|
|
119
124
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { control: [{
|
|
120
125
|
type: Input
|
|
121
126
|
}], form: [{
|
|
122
127
|
type: Input
|
|
123
128
|
}] } });
|
|
124
129
|
|
|
130
|
+
class DsxStatusToggle {
|
|
131
|
+
onLabel = input('Activo', ...(ngDevMode ? [{ debugName: "onLabel" }] : /* istanbul ignore next */ []));
|
|
132
|
+
offLabel = input('Inactivo', ...(ngDevMode ? [{ debugName: "offLabel" }] : /* istanbul ignore next */ []));
|
|
133
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
134
|
+
formDisabled = false;
|
|
135
|
+
value = false;
|
|
136
|
+
onChange = (_) => { };
|
|
137
|
+
onTouched = () => { };
|
|
138
|
+
writeValue(value) {
|
|
139
|
+
this.value = !!value;
|
|
140
|
+
}
|
|
141
|
+
registerOnChange(fn) {
|
|
142
|
+
this.onChange = fn;
|
|
143
|
+
}
|
|
144
|
+
registerOnTouched(fn) {
|
|
145
|
+
this.onTouched = fn;
|
|
146
|
+
}
|
|
147
|
+
setDisabledState(disabled) {
|
|
148
|
+
this.formDisabled = disabled;
|
|
149
|
+
}
|
|
150
|
+
change(value) {
|
|
151
|
+
this.value = value;
|
|
152
|
+
this.onChange(value);
|
|
153
|
+
this.onTouched();
|
|
154
|
+
}
|
|
155
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DsxStatusToggle, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
156
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: DsxStatusToggle, isStandalone: true, selector: "dsx-status-toggle", inputs: { onLabel: { classPropertyName: "onLabel", publicName: "onLabel", isSignal: true, isRequired: false, transformFunction: null }, offLabel: { classPropertyName: "offLabel", publicName: "offLabel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
157
|
+
{
|
|
158
|
+
provide: NG_VALUE_ACCESSOR,
|
|
159
|
+
useExisting: forwardRef(() => DsxStatusToggle),
|
|
160
|
+
multi: true,
|
|
161
|
+
},
|
|
162
|
+
], ngImport: i0, template: "<p-toggleButton\r\n fluid\r\n [ngModel]=\"value\"\r\n (ngModelChange)=\"change($event)\"\r\n [onLabel]=\"onLabel()\"\r\n [offLabel]=\"offLabel()\"\r\n [disabled]=\"disabled() || formDisabled\"\r\n [onIcon]=\"'pi pi-check-circle'\"\r\n [offIcon]=\"'pi pi-times-circle'\"\r\n class=\"dsx-status-toggle\"\r\n/>\r\n", styles: [":host ::ng-deep .dsx-status-toggle .p-button-label{font-weight:700!important}:host ::ng-deep .dsx-status-toggle.p-highlight,:host ::ng-deep .dsx-status-toggle.p-togglebutton-checked,:host ::ng-deep .dsx-status-toggle[aria-pressed=true],:host ::ng-deep .dsx-status-toggle.p-highlight .p-button-label,:host ::ng-deep .dsx-status-toggle.p-togglebutton-checked .p-button-label,:host ::ng-deep .dsx-status-toggle[aria-pressed=true] .p-button-label,:host ::ng-deep .dsx-status-toggle.p-highlight .p-button-icon,:host ::ng-deep .dsx-status-toggle.p-togglebutton-checked .p-button-icon,:host ::ng-deep .dsx-status-toggle[aria-pressed=true] .p-button-icon,:host ::ng-deep .dsx-status-toggle.p-highlight .p-button-icon:before,:host ::ng-deep .dsx-status-toggle.p-togglebutton-checked .p-button-icon:before,:host ::ng-deep .dsx-status-toggle[aria-pressed=true] .p-button-icon:before{color:#16a34a!important}:host ::ng-deep .dsx-status-toggle:not(.p-highlight):not(.p-togglebutton-checked),:host ::ng-deep .dsx-status-toggle[aria-pressed=false],:host ::ng-deep .dsx-status-toggle:not(.p-highlight):not(.p-togglebutton-checked) .p-button-label,:host ::ng-deep .dsx-status-toggle[aria-pressed=false] .p-button-label,:host ::ng-deep .dsx-status-toggle:not(.p-highlight):not(.p-togglebutton-checked) .p-button-icon,:host ::ng-deep .dsx-status-toggle[aria-pressed=false] .p-button-icon,:host ::ng-deep .dsx-status-toggle:not(.p-highlight):not(.p-togglebutton-checked) .p-button-icon:before,:host ::ng-deep .dsx-status-toggle[aria-pressed=false] .p-button-icon:before{color:#dc2626!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ToggleButtonModule }, { kind: "component", type: i2.ToggleButton, selector: "p-toggleButton, p-togglebutton, p-toggle-button", inputs: ["onLabel", "offLabel", "onIcon", "offIcon", "ariaLabel", "ariaLabelledBy", "styleClass", "inputId", "tabindex", "iconPos", "autofocus", "size", "allowEmpty", "fluid"], outputs: ["onChange"] }] });
|
|
163
|
+
}
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DsxStatusToggle, decorators: [{
|
|
165
|
+
type: Component,
|
|
166
|
+
args: [{ selector: 'dsx-status-toggle', imports: [FormsModule, ToggleButtonModule], providers: [
|
|
167
|
+
{
|
|
168
|
+
provide: NG_VALUE_ACCESSOR,
|
|
169
|
+
useExisting: forwardRef(() => DsxStatusToggle),
|
|
170
|
+
multi: true,
|
|
171
|
+
},
|
|
172
|
+
], template: "<p-toggleButton\r\n fluid\r\n [ngModel]=\"value\"\r\n (ngModelChange)=\"change($event)\"\r\n [onLabel]=\"onLabel()\"\r\n [offLabel]=\"offLabel()\"\r\n [disabled]=\"disabled() || formDisabled\"\r\n [onIcon]=\"'pi pi-check-circle'\"\r\n [offIcon]=\"'pi pi-times-circle'\"\r\n class=\"dsx-status-toggle\"\r\n/>\r\n", styles: [":host ::ng-deep .dsx-status-toggle .p-button-label{font-weight:700!important}:host ::ng-deep .dsx-status-toggle.p-highlight,:host ::ng-deep .dsx-status-toggle.p-togglebutton-checked,:host ::ng-deep .dsx-status-toggle[aria-pressed=true],:host ::ng-deep .dsx-status-toggle.p-highlight .p-button-label,:host ::ng-deep .dsx-status-toggle.p-togglebutton-checked .p-button-label,:host ::ng-deep .dsx-status-toggle[aria-pressed=true] .p-button-label,:host ::ng-deep .dsx-status-toggle.p-highlight .p-button-icon,:host ::ng-deep .dsx-status-toggle.p-togglebutton-checked .p-button-icon,:host ::ng-deep .dsx-status-toggle[aria-pressed=true] .p-button-icon,:host ::ng-deep .dsx-status-toggle.p-highlight .p-button-icon:before,:host ::ng-deep .dsx-status-toggle.p-togglebutton-checked .p-button-icon:before,:host ::ng-deep .dsx-status-toggle[aria-pressed=true] .p-button-icon:before{color:#16a34a!important}:host ::ng-deep .dsx-status-toggle:not(.p-highlight):not(.p-togglebutton-checked),:host ::ng-deep .dsx-status-toggle[aria-pressed=false],:host ::ng-deep .dsx-status-toggle:not(.p-highlight):not(.p-togglebutton-checked) .p-button-label,:host ::ng-deep .dsx-status-toggle[aria-pressed=false] .p-button-label,:host ::ng-deep .dsx-status-toggle:not(.p-highlight):not(.p-togglebutton-checked) .p-button-icon,:host ::ng-deep .dsx-status-toggle[aria-pressed=false] .p-button-icon,:host ::ng-deep .dsx-status-toggle:not(.p-highlight):not(.p-togglebutton-checked) .p-button-icon:before,:host ::ng-deep .dsx-status-toggle[aria-pressed=false] .p-button-icon:before{color:#dc2626!important}\n"] }]
|
|
173
|
+
}], propDecorators: { onLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "onLabel", required: false }] }], offLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "offLabel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
174
|
+
|
|
125
175
|
class DsxEnableDisable {
|
|
126
176
|
checked = false;
|
|
127
177
|
writeValue(value) {
|
|
@@ -629,7 +679,7 @@ class JsonViewerComponent {
|
|
|
629
679
|
useExisting: forwardRef(() => JsonViewerComponent),
|
|
630
680
|
multi: true,
|
|
631
681
|
},
|
|
632
|
-
], ngImport: i0, template: "<p-tree\r\n [value]=\"nodes\"\r\n class=\"json-tree w-full\"\r\n selectionMode=\"single\"\r\n [(selection)]=\"selectedNode\"\r\n [highlightOnSelect]=\"false\"\r\n (onNodeSelect)=\"onNodeSelect($event)\"\r\n>\r\n <ng-template let-node pTemplate=\"default\">\r\n <div class=\"json-node\">\r\n <ng-container *ngIf=\"getNodeMeta(node) as meta; else defaultLabel\">\r\n <ng-container [ngSwitch]=\"meta.kind\">\r\n <ng-container *ngSwitchCase=\"'compact-item'\">\r\n <span class=\"json-prefix\">{{ meta.indexLabel || \"\" }}</span>\r\n <span class=\"json-key\"> Texto: </span>\r\n <ng-container *ngIf=\"isEditMode(); else compactTextView\">\r\n <input\r\n type=\"text\"\r\n class=\"json-text-input\"\r\n [class.json-text-inactive]=\"meta.activeBoolean === false\"\r\n [value]=\"meta.text || ''\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown)=\"$event.stopPropagation()\"\r\n (input)=\"\r\n onTextEdit(\r\n $any(meta.textPath),\r\n $any($event.target).value,\r\n meta\r\n )\r\n \"\r\n (blur)=\"onTextBlur()\"\r\n />\r\n </ng-container>\r\n <ng-template #compactTextView>\r\n <span [class.json-text-inactive]=\"meta.activeBoolean === false\">{{\r\n meta.text || \"\"\r\n }}</span>\r\n </ng-template>\r\n <span class=\"json-separator\"> | </span>\r\n <span class=\"json-status\">{{ meta.activeVisual || \"\" }}</span>\r\n <input\r\n *ngIf=\"isEditMode()\"\r\n type=\"checkbox\"\r\n class=\"json-checkbox\"\r\n [checked]=\"meta.activeBoolean === true\"\r\n [disabled]=\"meta.activeBoolean === null\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"\r\n onActiveToggle(\r\n $any(meta.activePath),\r\n $any($event.target).checked,\r\n meta\r\n )\r\n \"\r\n />\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'group-active'\">\r\n <span>{{ meta.title || \"\" }}</span>\r\n <span class=\"json-separator\"> | </span>\r\n <span class=\"json-status\">{{ meta.activeVisual || \"\" }}</span>\r\n <input\r\n *ngIf=\"isEditMode() && meta.activePath\"\r\n type=\"checkbox\"\r\n class=\"json-checkbox\"\r\n [checked]=\"meta.activeBoolean === true\"\r\n [disabled]=\"meta.activeBoolean === null\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"\r\n onActiveToggle(\r\n $any(meta.activePath),\r\n $any($event.target).checked,\r\n meta\r\n )\r\n \"\r\n />\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'text-primitive'\">\r\n <span>{{ meta.key || \"\" }}:</span>\r\n <ng-container *ngIf=\"isEditMode(); else textPrimitiveView\">\r\n <input\r\n type=\"text\"\r\n class=\"json-text-input\"\r\n [value]=\"meta.value || ''\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown)=\"$event.stopPropagation()\"\r\n (input)=\"\r\n onTextEdit($any(meta.path), $any($event.target).value, meta)\r\n \"\r\n (blur)=\"onTextBlur()\"\r\n />\r\n </ng-container>\r\n <ng-template #textPrimitiveView>\r\n <span>{{ meta.value || \"\" }}</span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'active-primitive'\">\r\n <span>{{ meta.key || \"\" }}:</span>\r\n <span class=\"json-status\">{{ meta.activeVisual || \"\" }}</span>\r\n <input\r\n *ngIf=\"isEditMode()\"\r\n type=\"checkbox\"\r\n class=\"json-checkbox\"\r\n [checked]=\"meta.activeBoolean === true\"\r\n [disabled]=\"meta.activeBoolean === null\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"\r\n onActiveToggle(\r\n $any(meta.path),\r\n $any($event.target).checked,\r\n meta\r\n )\r\n \"\r\n />\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n {{ node.label }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #defaultLabel>\r\n {{ node.label }}\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n</p-tree>\r\n", styles: [":host ::ng-deep .json-tree .p-tree-node-content,:host ::ng-deep .json-tree .p-treenode-content{padding:.02rem .15rem!important;display:flex;align-items:center;width:100%;min-width:0}:host ::ng-deep .json-tree .p-tree-node-label,:host ::ng-deep .json-tree .p-tree-node-label>span{flex:1 1 0;min-width:0;display:flex}:host ::ng-deep .json-tree .json-node{display:flex;align-items:center;gap:.25rem;width:100%;min-width:0}:host ::ng-deep .json-tree .json-prefix,:host ::ng-deep .json-tree .json-key,:host ::ng-deep .json-tree .json-separator,:host ::ng-deep .json-tree .json-status{white-space:nowrap;flex-shrink:0}:host ::ng-deep .json-tree .json-text-input{flex:1 1 0;min-width:0;border:1px solid #cbd5e1;border-radius:.25rem;padding:.15rem .5rem;font-size:.875rem}:host ::ng-deep .json-tree .json-text-inactive{color:#8b5e61}:host ::ng-deep .json-tree input.json-text-input.json-text-inactive{background-color:#f9f2f2;border-color:#e5c8cb}:host ::ng-deep .json-tree .json-checkbox{width:.9rem;height:.9rem;cursor:pointer;flex-shrink:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$
|
|
682
|
+
], ngImport: i0, template: "<p-tree\r\n [value]=\"nodes\"\r\n class=\"json-tree w-full\"\r\n selectionMode=\"single\"\r\n [(selection)]=\"selectedNode\"\r\n [highlightOnSelect]=\"false\"\r\n (onNodeSelect)=\"onNodeSelect($event)\"\r\n>\r\n <ng-template let-node pTemplate=\"default\">\r\n <div class=\"json-node\">\r\n <ng-container *ngIf=\"getNodeMeta(node) as meta; else defaultLabel\">\r\n <ng-container [ngSwitch]=\"meta.kind\">\r\n <ng-container *ngSwitchCase=\"'compact-item'\">\r\n <span class=\"json-prefix\">{{ meta.indexLabel || \"\" }}</span>\r\n <span class=\"json-key\"> Texto: </span>\r\n <ng-container *ngIf=\"isEditMode(); else compactTextView\">\r\n <input\r\n type=\"text\"\r\n class=\"json-text-input\"\r\n [class.json-text-inactive]=\"meta.activeBoolean === false\"\r\n [value]=\"meta.text || ''\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown)=\"$event.stopPropagation()\"\r\n (input)=\"\r\n onTextEdit(\r\n $any(meta.textPath),\r\n $any($event.target).value,\r\n meta\r\n )\r\n \"\r\n (blur)=\"onTextBlur()\"\r\n />\r\n </ng-container>\r\n <ng-template #compactTextView>\r\n <span [class.json-text-inactive]=\"meta.activeBoolean === false\">{{\r\n meta.text || \"\"\r\n }}</span>\r\n </ng-template>\r\n <span class=\"json-separator\"> | </span>\r\n <span class=\"json-status\">{{ meta.activeVisual || \"\" }}</span>\r\n <input\r\n *ngIf=\"isEditMode()\"\r\n type=\"checkbox\"\r\n class=\"json-checkbox\"\r\n [checked]=\"meta.activeBoolean === true\"\r\n [disabled]=\"meta.activeBoolean === null\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"\r\n onActiveToggle(\r\n $any(meta.activePath),\r\n $any($event.target).checked,\r\n meta\r\n )\r\n \"\r\n />\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'group-active'\">\r\n <span>{{ meta.title || \"\" }}</span>\r\n <span class=\"json-separator\"> | </span>\r\n <span class=\"json-status\">{{ meta.activeVisual || \"\" }}</span>\r\n <input\r\n *ngIf=\"isEditMode() && meta.activePath\"\r\n type=\"checkbox\"\r\n class=\"json-checkbox\"\r\n [checked]=\"meta.activeBoolean === true\"\r\n [disabled]=\"meta.activeBoolean === null\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"\r\n onActiveToggle(\r\n $any(meta.activePath),\r\n $any($event.target).checked,\r\n meta\r\n )\r\n \"\r\n />\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'text-primitive'\">\r\n <span>{{ meta.key || \"\" }}:</span>\r\n <ng-container *ngIf=\"isEditMode(); else textPrimitiveView\">\r\n <input\r\n type=\"text\"\r\n class=\"json-text-input\"\r\n [value]=\"meta.value || ''\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown)=\"$event.stopPropagation()\"\r\n (input)=\"\r\n onTextEdit($any(meta.path), $any($event.target).value, meta)\r\n \"\r\n (blur)=\"onTextBlur()\"\r\n />\r\n </ng-container>\r\n <ng-template #textPrimitiveView>\r\n <span>{{ meta.value || \"\" }}</span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'active-primitive'\">\r\n <span>{{ meta.key || \"\" }}:</span>\r\n <span class=\"json-status\">{{ meta.activeVisual || \"\" }}</span>\r\n <input\r\n *ngIf=\"isEditMode()\"\r\n type=\"checkbox\"\r\n class=\"json-checkbox\"\r\n [checked]=\"meta.activeBoolean === true\"\r\n [disabled]=\"meta.activeBoolean === null\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"\r\n onActiveToggle(\r\n $any(meta.path),\r\n $any($event.target).checked,\r\n meta\r\n )\r\n \"\r\n />\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n {{ node.label }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #defaultLabel>\r\n {{ node.label }}\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n</p-tree>\r\n", styles: [":host ::ng-deep .json-tree .p-tree-node-content,:host ::ng-deep .json-tree .p-treenode-content{padding:.02rem .15rem!important;display:flex;align-items:center;width:100%;min-width:0}:host ::ng-deep .json-tree .p-tree-node-label,:host ::ng-deep .json-tree .p-tree-node-label>span{flex:1 1 0;min-width:0;display:flex}:host ::ng-deep .json-tree .json-node{display:flex;align-items:center;gap:.25rem;width:100%;min-width:0}:host ::ng-deep .json-tree .json-prefix,:host ::ng-deep .json-tree .json-key,:host ::ng-deep .json-tree .json-separator,:host ::ng-deep .json-tree .json-status{white-space:nowrap;flex-shrink:0}:host ::ng-deep .json-tree .json-text-input{flex:1 1 0;min-width:0;border:1px solid #cbd5e1;border-radius:.25rem;padding:.15rem .5rem;font-size:.875rem}:host ::ng-deep .json-tree .json-text-inactive{color:#8b5e61}:host ::ng-deep .json-tree input.json-text-input.json-text-inactive{background-color:#f9f2f2;border-color:#e5c8cb}:host ::ng-deep .json-tree .json-checkbox{width:.9rem;height:.9rem;cursor:pointer;flex-shrink:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: TreeModule }, { kind: "component", type: i2$1.Tree, selector: "p-tree", inputs: ["value", "selectionMode", "loadingMode", "selection", "styleClass", "contextMenu", "contextMenuSelectionMode", "contextMenuSelection", "draggableScope", "droppableScope", "draggableNodes", "droppableNodes", "metaKeySelection", "propagateSelectionUp", "propagateSelectionDown", "loading", "loadingIcon", "emptyMessage", "ariaLabel", "togglerAriaLabel", "ariaLabelledBy", "validateDrop", "filter", "filterInputAutoFocus", "filterBy", "filterMode", "filterOptions", "filterPlaceholder", "filteredNodes", "filterLocale", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "indentation", "_templateMap", "trackBy", "highlightOnSelect"], outputs: ["selectionChange", "contextMenuSelectionChange", "onNodeSelect", "onNodeUnselect", "onNodeExpand", "onNodeCollapse", "onNodeContextMenuSelect", "onNodeDoubleClick", "onNodeDrop", "onLazyLoad", "onScroll", "onScrollIndexChange", "onFilter"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }] });
|
|
633
683
|
}
|
|
634
684
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: JsonViewerComponent, decorators: [{
|
|
635
685
|
type: Component,
|
|
@@ -644,6 +694,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
644
694
|
type: Output
|
|
645
695
|
}] } });
|
|
646
696
|
|
|
697
|
+
class DateIndicator {
|
|
698
|
+
date = input('', ...(ngDevMode ? [{ debugName: "date" }] : /* istanbul ignore next */ []));
|
|
699
|
+
minDays = input(1, ...(ngDevMode ? [{ debugName: "minDays" }] : /* istanbul ignore next */ []));
|
|
700
|
+
maxDays = input(365, ...(ngDevMode ? [{ debugName: "maxDays" }] : /* istanbul ignore next */ []));
|
|
701
|
+
status = 'Correcto';
|
|
702
|
+
severity = 'success';
|
|
703
|
+
icon = 'pi pi-check-circle';
|
|
704
|
+
tooltip = '';
|
|
705
|
+
ngOnChanges() {
|
|
706
|
+
this.calculate();
|
|
707
|
+
}
|
|
708
|
+
calculate() {
|
|
709
|
+
const rawDate = this.date();
|
|
710
|
+
if (!rawDate) {
|
|
711
|
+
this.setEmptyCriticalState();
|
|
712
|
+
return;
|
|
713
|
+
}
|
|
714
|
+
const targetDate = new Date(rawDate);
|
|
715
|
+
if (Number.isNaN(targetDate.getTime())) {
|
|
716
|
+
this.setEmptyCriticalState();
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
719
|
+
const today = new Date();
|
|
720
|
+
const diffMs = today.getTime() - targetDate.getTime();
|
|
721
|
+
const days = Math.floor(diffMs / (1000 * 60 * 60 * 24));
|
|
722
|
+
const range = this.maxDays() - this.minDays();
|
|
723
|
+
const step = range / 4;
|
|
724
|
+
const level1 = this.minDays() + step;
|
|
725
|
+
const level2 = this.minDays() + step * 2;
|
|
726
|
+
const level3 = this.minDays() + step * 3;
|
|
727
|
+
if (days <= level1) {
|
|
728
|
+
this.status = 'Correcto';
|
|
729
|
+
this.severity = 'success';
|
|
730
|
+
this.icon = 'pi pi-check-circle';
|
|
731
|
+
}
|
|
732
|
+
else if (days <= level2) {
|
|
733
|
+
this.status = 'Atención';
|
|
734
|
+
this.severity = 'warn';
|
|
735
|
+
this.icon = 'pi pi-exclamation-triangle';
|
|
736
|
+
}
|
|
737
|
+
else if (days <= level3) {
|
|
738
|
+
this.status = 'Riesgo';
|
|
739
|
+
this.severity = 'info';
|
|
740
|
+
this.icon = 'pi pi-clock';
|
|
741
|
+
}
|
|
742
|
+
else {
|
|
743
|
+
this.status = 'Crítico';
|
|
744
|
+
this.severity = 'danger';
|
|
745
|
+
this.icon = 'pi pi-times-circle';
|
|
746
|
+
}
|
|
747
|
+
this.tooltip = `Última actualización: ${targetDate.toLocaleDateString()} • ${days} días`;
|
|
748
|
+
}
|
|
749
|
+
setEmptyCriticalState() {
|
|
750
|
+
this.status = 'Crítico';
|
|
751
|
+
this.severity = 'danger';
|
|
752
|
+
this.icon = 'pi pi-times-circle';
|
|
753
|
+
this.tooltip = 'Última actualización: Sin valor • 0 días';
|
|
754
|
+
}
|
|
755
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DateIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
756
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: DateIndicator, isStandalone: true, selector: "dsx-date-indicator", inputs: { date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, minDays: { classPropertyName: "minDays", publicName: "minDays", isSignal: true, isRequired: false, transformFunction: null }, maxDays: { classPropertyName: "maxDays", publicName: "maxDays", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0, template: "<p-tag\r\n [severity]=\"severity\"\r\n [icon]=\"icon\"\r\n [value]=\"status\"\r\n [pTooltip]=\"tooltip\"\r\n>\r\n</p-tag>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: TagModule }, { kind: "component", type: i1.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2$2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }] });
|
|
757
|
+
}
|
|
758
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DateIndicator, decorators: [{
|
|
759
|
+
type: Component,
|
|
760
|
+
args: [{ selector: 'dsx-date-indicator', imports: [TagModule, TooltipModule], template: "<p-tag\r\n [severity]=\"severity\"\r\n [icon]=\"icon\"\r\n [value]=\"status\"\r\n [pTooltip]=\"tooltip\"\r\n>\r\n</p-tag>\r\n" }]
|
|
761
|
+
}], propDecorators: { date: [{ type: i0.Input, args: [{ isSignal: true, alias: "date", required: false }] }], minDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDays", required: false }] }], maxDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDays", required: false }] }] } });
|
|
762
|
+
|
|
647
763
|
class KpicardComponent {
|
|
648
764
|
//type = input.required<string>();
|
|
649
765
|
option = input.required(...(ngDevMode ? [{ debugName: "option" }] : /* istanbul ignore next */ []));
|
|
@@ -780,7 +896,7 @@ class DocxPreviewComponent {
|
|
|
780
896
|
this.visibleChange.emit(false);
|
|
781
897
|
}
|
|
782
898
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DocxPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
783
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.11", type: DocxPreviewComponent, isStandalone: true, selector: "app-docx-preview", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: false, isRequired: false, transformFunction: null }, blob: { classPropertyName: "blob", publicName: "blob", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visibleChange: "visibleChange" }, viewQueries: [{ propertyName: "view", first: true, predicate: ["viewer"], descendants: true, isSignal: true }], ngImport: i0, template: "<p-dialog\r\n [visible]=\"visible\"\r\n (onHide)=\"onHide()\"\r\n [modal]=\"true\"\r\n [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\n [style]=\"{ width: '80vw' }\"\r\n [draggable]=\"false\"\r\n [resizable]=\"false\"\r\n [closable]=\"true\"\r\n [maximizable]=\"true\"\r\n>\r\n <ng-template #header>\r\n <div class=\"flex justify-content-center align-items-center gap-2 px-2\">\r\n <p-avatar image=\"icon2/word-2019.png\" />\r\n <span class=\"font-bold\">Vista preliminar del documento</span>\r\n </div>\r\n </ng-template>\r\n <div #viewer></div>\r\n</p-dialog>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "component", type: i1$
|
|
899
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.11", type: DocxPreviewComponent, isStandalone: true, selector: "app-docx-preview", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: false, isRequired: false, transformFunction: null }, blob: { classPropertyName: "blob", publicName: "blob", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visibleChange: "visibleChange" }, viewQueries: [{ propertyName: "view", first: true, predicate: ["viewer"], descendants: true, isSignal: true }], ngImport: i0, template: "<p-dialog\r\n [visible]=\"visible\"\r\n (onHide)=\"onHide()\"\r\n [modal]=\"true\"\r\n [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\n [style]=\"{ width: '80vw' }\"\r\n [draggable]=\"false\"\r\n [resizable]=\"false\"\r\n [closable]=\"true\"\r\n [maximizable]=\"true\"\r\n>\r\n <ng-template #header>\r\n <div class=\"flex justify-content-center align-items-center gap-2 px-2\">\r\n <p-avatar image=\"icon2/word-2019.png\" />\r\n <span class=\"font-bold\">Vista preliminar del documento</span>\r\n </div>\r\n </ng-template>\r\n <div #viewer></div>\r\n</p-dialog>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "component", type: i1$3.Dialog, selector: "p-dialog", inputs: ["hostName", "header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "maskMotionOptions", "motionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: AvatarModule }, { kind: "component", type: i2$3.Avatar, selector: "p-avatar", inputs: ["label", "icon", "image", "size", "shape", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }] });
|
|
784
900
|
}
|
|
785
901
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DocxPreviewComponent, decorators: [{
|
|
786
902
|
type: Component,
|
|
@@ -835,13 +951,13 @@ class PdfPreviewComponent {
|
|
|
835
951
|
ngOnDestroy() {
|
|
836
952
|
this.limpiarUrlAnterior();
|
|
837
953
|
}
|
|
838
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PdfPreviewComponent, deps: [{ token: i1$
|
|
839
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: PdfPreviewComponent, isStandalone: true, selector: "app-pdf-preview", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, blob: { classPropertyName: "blob", publicName: "blob", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange" }, ngImport: i0, template: "<p-dialog\r\n header=\"Vista previa del documento de soporte\"\r\n [(visible)]=\"visible\"\r\n [style]=\"{ width: '80vw', height: '90vh' }\"\r\n [closable]=\"true\"\r\n [maximizable]=\"true\"\r\n>\r\n @if (pdfUrl) {\r\n <iframe\r\n [src]=\"pdfUrl\"\r\n width=\"100%\"\r\n height=\"100%\"\r\n style=\"border: none\"\r\n ></iframe>\r\n }\r\n</p-dialog>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "component", type: i1$
|
|
954
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PdfPreviewComponent, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
955
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: PdfPreviewComponent, isStandalone: true, selector: "app-pdf-preview", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, blob: { classPropertyName: "blob", publicName: "blob", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange" }, ngImport: i0, template: "<p-dialog\r\n header=\"Vista previa del documento de soporte\"\r\n [(visible)]=\"visible\"\r\n [style]=\"{ width: '80vw', height: '90vh' }\"\r\n [closable]=\"true\"\r\n [maximizable]=\"true\"\r\n>\r\n @if (pdfUrl) {\r\n <iframe\r\n [src]=\"pdfUrl\"\r\n width=\"100%\"\r\n height=\"100%\"\r\n style=\"border: none\"\r\n ></iframe>\r\n }\r\n</p-dialog>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "component", type: i1$3.Dialog, selector: "p-dialog", inputs: ["hostName", "header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "maskMotionOptions", "motionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }] });
|
|
840
956
|
}
|
|
841
957
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PdfPreviewComponent, decorators: [{
|
|
842
958
|
type: Component,
|
|
843
959
|
args: [{ selector: 'app-pdf-preview', imports: [DialogModule], template: "<p-dialog\r\n header=\"Vista previa del documento de soporte\"\r\n [(visible)]=\"visible\"\r\n [style]=\"{ width: '80vw', height: '90vh' }\"\r\n [closable]=\"true\"\r\n [maximizable]=\"true\"\r\n>\r\n @if (pdfUrl) {\r\n <iframe\r\n [src]=\"pdfUrl\"\r\n width=\"100%\"\r\n height=\"100%\"\r\n style=\"border: none\"\r\n ></iframe>\r\n }\r\n</p-dialog>\r\n" }]
|
|
844
|
-
}], ctorParameters: () => [{ type: i1$
|
|
960
|
+
}], ctorParameters: () => [{ type: i1$4.DomSanitizer }], propDecorators: { visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], blob: [{ type: i0.Input, args: [{ isSignal: true, alias: "blob", required: false }] }] } });
|
|
845
961
|
|
|
846
962
|
class TemplateHighlight {
|
|
847
963
|
text = input(null, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
@@ -898,7 +1014,7 @@ class TemplateHighlight {
|
|
|
898
1014
|
return text.replace(/"/g, '"');
|
|
899
1015
|
}
|
|
900
1016
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TemplateHighlight, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
901
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: TemplateHighlight, isStandalone: true, selector: "dsx-template-highlight", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, allowedKeys: { classPropertyName: "allowedKeys", publicName: "allowedKeys", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<p-tabs value=\"0\">\r\n <p-tablist>\r\n <p-tab value=\"0\">\r\n <i class=\"pi pi-file-edit tab-icon\" aria-hidden=\"true\"></i>\r\n <span>Preliminar</span>\r\n </p-tab>\r\n <p-tab value=\"1\">\r\n <i class=\"pi pi-list tab-icon\" aria-hidden=\"true\"></i>\r\n <span>Variables</span>\r\n </p-tab>\r\n </p-tablist>\r\n <p-tabpanels>\r\n <p-tabpanel value=\"0\">\r\n <div class=\"template-highlight\" [innerHTML]=\"highlightedText()\"></div>\r\n </p-tabpanel>\r\n <p-tabpanel value=\"1\">\r\n @if (allowedKeys().length) {\r\n <ul class=\"template-vars-list\">\r\n @for (key of allowedKeys(); track key) {\r\n <li>\r\n <strong>{{ key }}</strong>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </p-tabpanel>\r\n </p-tabpanels>\r\n</p-tabs>\r\n", styles: [":host .template-highlight{white-space:pre-wrap;font-family:monospace;text-align:justify}:host .template-vars-list{margin:0 0 .65rem;padding-left:1rem}:host .template-vars-list li{margin:.15rem 0}:host .tab-icon{margin-right:.45rem}:host ::ng-deep .var-valid{color:#0a7a0a;background:#e6ffe6;border-radius:3px;padding:0 2px;font-weight:600}:host ::ng-deep .var-invalid{color:#b30000;background:#ffe6e6;border-radius:3px;padding:0 2px;font-weight:600;text-decoration:underline wavy #b30000;cursor:help}:host ::ng-deep .var-brace-error{color:#cc7a00;background:#fff2cc;border-radius:3px;padding:0 2px;font-weight:600}\n"], dependencies: [{ kind: "ngmodule", type: TabsModule }, { kind: "component", type: i1$
|
|
1017
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: TemplateHighlight, isStandalone: true, selector: "dsx-template-highlight", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, allowedKeys: { classPropertyName: "allowedKeys", publicName: "allowedKeys", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<p-tabs value=\"0\">\r\n <p-tablist>\r\n <p-tab value=\"0\">\r\n <i class=\"pi pi-file-edit tab-icon\" aria-hidden=\"true\"></i>\r\n <span>Preliminar</span>\r\n </p-tab>\r\n <p-tab value=\"1\">\r\n <i class=\"pi pi-list tab-icon\" aria-hidden=\"true\"></i>\r\n <span>Variables</span>\r\n </p-tab>\r\n </p-tablist>\r\n <p-tabpanels>\r\n <p-tabpanel value=\"0\">\r\n <div class=\"template-highlight\" [innerHTML]=\"highlightedText()\"></div>\r\n </p-tabpanel>\r\n <p-tabpanel value=\"1\">\r\n @if (allowedKeys().length) {\r\n <ul class=\"template-vars-list\">\r\n @for (key of allowedKeys(); track key) {\r\n <li>\r\n <strong>{{ key }}</strong>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n </p-tabpanel>\r\n </p-tabpanels>\r\n</p-tabs>\r\n", styles: [":host .template-highlight{white-space:pre-wrap;font-family:monospace;text-align:justify}:host .template-vars-list{margin:0 0 .65rem;padding-left:1rem}:host .template-vars-list li{margin:.15rem 0}:host .tab-icon{margin-right:.45rem}:host ::ng-deep .var-valid{color:#0a7a0a;background:#e6ffe6;border-radius:3px;padding:0 2px;font-weight:600}:host ::ng-deep .var-invalid{color:#b30000;background:#ffe6e6;border-radius:3px;padding:0 2px;font-weight:600;text-decoration:underline wavy #b30000;cursor:help}:host ::ng-deep .var-brace-error{color:#cc7a00;background:#fff2cc;border-radius:3px;padding:0 2px;font-weight:600}\n"], dependencies: [{ kind: "ngmodule", type: TabsModule }, { kind: "component", type: i1$5.Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: i1$5.TabPanels, selector: "p-tabpanels" }, { kind: "component", type: i1$5.TabPanel, selector: "p-tabpanel", inputs: ["lazy", "value"], outputs: ["valueChange"] }, { kind: "component", type: i1$5.TabList, selector: "p-tablist" }, { kind: "component", type: i1$5.Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }] });
|
|
902
1018
|
}
|
|
903
1019
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TemplateHighlight, decorators: [{
|
|
904
1020
|
type: Component,
|
|
@@ -909,5 +1025,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
909
1025
|
* Generated bundle index. Do not edit.
|
|
910
1026
|
*/
|
|
911
1027
|
|
|
912
|
-
export { AppMessageErrorComponent, DocxPreviewComponent, DsxEnableDisable, FileComponent, JsonViewerComponent, KpicardComponent, PdfPreviewComponent, TemplateHighlight };
|
|
1028
|
+
export { AppMessageErrorComponent, DateIndicator, DocxPreviewComponent, DsxEnableDisable, DsxStatusToggle, FileComponent, JsonViewerComponent, KpicardComponent, PdfPreviewComponent, TemplateHighlight };
|
|
913
1029
|
//# sourceMappingURL=ngx-dsxlibrary-src-lib-components.mjs.map
|