ng-components-tsi 0.0.13 → 0.0.14
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/ng-components-tsi.mjs +212 -16
- package/fesm2022/ng-components-tsi.mjs.map +1 -1
- package/lib/directivas/inputs/caracteres-codigo.directive.d.ts +12 -0
- package/lib/directivas/inputs/decimal.directive.d.ts +1 -1
- package/lib/directivas/inputs/only-number-flex.directive.d.ts +9 -0
- package/lib/modals/general/md-generico/md-generico.component.d.ts +1 -1
- package/lib/models/input-config.d.ts +1 -0
- package/lib/ui/forms/inputs/autocomplete-cdk/autocomplete.component.d.ts +1 -1
- package/lib/ui/forms/inputs/doble-input/doble-input.component.d.ts +6 -2
- package/lib/ui/forms/inputs/input/input.component.d.ts +9 -3
- package/lib/ui/forms/inputs/multiselected/multiselected.component.d.ts +1 -1
- package/lib/ui/forms/inputs/switch-activo/switch-activo.component.d.ts +21 -0
- package/lib/ui/tables/dropdown-menu/dropdown-menu.component.d.ts +1 -1
- package/ng-components-tsi-0.0.14.tgz +0 -0
- package/package.json +3 -3
- package/public-api.d.ts +1 -0
- package/ng-components-tsi-0.0.13.tgz +0 -0
|
@@ -11,7 +11,7 @@ import { trigger, transition, style, animate, state } from '@angular/animations'
|
|
|
11
11
|
import * as i1$3 from '@angular/cdk/overlay';
|
|
12
12
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
13
13
|
import { Subject, debounceTime, distinctUntilChanged, filter, startWith, map, fromEvent, throttleTime, catchError, throwError, switchMap, of } from 'rxjs';
|
|
14
|
-
import { beep, getFirstItem, cleanNumber, obtenerTipoClases,
|
|
14
|
+
import { beep, validaArray, getFirstItem, validarVacioAndNull, cleanNumber, obtenerTipoClases, validarBoolean, formatNumber } from 'shared-tsi';
|
|
15
15
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
16
16
|
import { ActivatedRoute, Router, NavigationEnd, RouterLink, RouterOutlet, RouterLinkActive } from '@angular/router';
|
|
17
17
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
@@ -189,11 +189,11 @@ class ButtonComponent {
|
|
|
189
189
|
return this.atajo() ? `${this.texto()}: Alt + ${this.atajo()}` : "";
|
|
190
190
|
};
|
|
191
191
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
192
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: ButtonComponent, isStandalone: true, selector: "app-button", inputs: { autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, outline: { classPropertyName: "outline", publicName: "outline", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, texto: { classPropertyName: "texto", publicName: "texto", isSignal: true, isRequired: false, transformFunction: null }, isHtml: { classPropertyName: "isHtml", publicName: "isHtml", isSignal: true, isRequired: false, transformFunction: null }, closeButton: { classPropertyName: "closeButton", publicName: "closeButton", isSignal: true, isRequired: false, transformFunction: null }, sunatButton: { classPropertyName: "sunatButton", publicName: "sunatButton", isSignal: true, isRequired: false, transformFunction: null }, inputButton: { classPropertyName: "inputButton", publicName: "inputButton", isSignal: true, isRequired: false, transformFunction: null }, buttonDeshabilitado: { classPropertyName: "buttonDeshabilitado", publicName: "buttonDeshabilitado", isSignal: true, isRequired: false, transformFunction: null }, atajo: { classPropertyName: "atajo", publicName: "atajo", isSignal: true, isRequired: false, transformFunction: null }, dropdownButton: { classPropertyName: "dropdownButton", publicName: "dropdownButton", isSignal: true, isRequired: false, transformFunction: null }, extraClass: { classPropertyName: "extraClass", publicName: "extraClass", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, uploadButton: { classPropertyName: "uploadButton", publicName: "uploadButton", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, isRounded: { classPropertyName: "isRounded", publicName: "isRounded", isSignal: true, isRequired: false, transformFunction: null }, isNotStyle: { classPropertyName: "isNotStyle", publicName: "isNotStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { accion: "accion", fileSelected: "fileSelected" }, viewQueries: [{ propertyName: "buttonNormal", first: true, predicate: ["boton"], descendants: true, isSignal: true }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "@if(!closeButton() && !dropdownButton() && !uploadButton() && !sunatButton() && ! inputButton()){\r\n<button atajoTecla #boton [altKeyCombination]=\"atajo()\"\r\n (emitirAtajo)=\"disabled() ? null : ( atajo() ? ejecutarAccion() : null)\" [title]=\"construirAlt()\"\r\n class=\"{{ isNotStyle() ? 'btn btn-sm' : (isRounded() ? 'circle button-tilt-hover' : 'btn btn-rounded button-tilt-hover text-white me-1 fs-8 px-3 w-auto w-sm-100') }}\"\r\n [ngClass]=\"outline() ? getColorClassOutline() : getColorClass()\" (click)=\"ejecutarAccion()\" [disabled]=\"disabled()\">\r\n <i [ngClass]=\"getIconClass()\" class=\"button-icon-hover\"></i>\r\n <span [innerHTML]=\"isHtml() ? getSafeHtml() : texto()\"></span>\r\n</button>\r\n}\r\n@if(sunatButton()){\r\n<button atajoTecla [altKeyCombination]=\"atajo()\"\r\n (emitirAtajo)=\"disabled() ? null : ( atajo() ? ejecutarAccion() : null)\"\r\n class=\"btn btn-rounded button-tilt-hover text-white me-1 fs-8 px-3 w-auto w-sm-100\"\r\n [ngClass]=\"outline() ? getColorClassOutline() : getColorClass()\" (click)=\"ejecutarAccion()\" [disabled]=\"disabled()\">\r\n <img src=\"../../../../../assets/images/Sunat.ico\" class=\"button-icon-hover\" height=\"16px\" alt=\"Sunat\"> {{texto()
|
|
192
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: ButtonComponent, isStandalone: true, selector: "app-button", inputs: { autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, outline: { classPropertyName: "outline", publicName: "outline", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, texto: { classPropertyName: "texto", publicName: "texto", isSignal: true, isRequired: false, transformFunction: null }, isHtml: { classPropertyName: "isHtml", publicName: "isHtml", isSignal: true, isRequired: false, transformFunction: null }, closeButton: { classPropertyName: "closeButton", publicName: "closeButton", isSignal: true, isRequired: false, transformFunction: null }, sunatButton: { classPropertyName: "sunatButton", publicName: "sunatButton", isSignal: true, isRequired: false, transformFunction: null }, inputButton: { classPropertyName: "inputButton", publicName: "inputButton", isSignal: true, isRequired: false, transformFunction: null }, buttonDeshabilitado: { classPropertyName: "buttonDeshabilitado", publicName: "buttonDeshabilitado", isSignal: true, isRequired: false, transformFunction: null }, atajo: { classPropertyName: "atajo", publicName: "atajo", isSignal: true, isRequired: false, transformFunction: null }, dropdownButton: { classPropertyName: "dropdownButton", publicName: "dropdownButton", isSignal: true, isRequired: false, transformFunction: null }, extraClass: { classPropertyName: "extraClass", publicName: "extraClass", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, uploadButton: { classPropertyName: "uploadButton", publicName: "uploadButton", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, isRounded: { classPropertyName: "isRounded", publicName: "isRounded", isSignal: true, isRequired: false, transformFunction: null }, isNotStyle: { classPropertyName: "isNotStyle", publicName: "isNotStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { accion: "accion", fileSelected: "fileSelected" }, viewQueries: [{ propertyName: "buttonNormal", first: true, predicate: ["boton"], descendants: true, isSignal: true }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "@if(!closeButton() && !dropdownButton() && !uploadButton() && !sunatButton() && ! inputButton()){\r\n<button atajoTecla #boton [altKeyCombination]=\"atajo()\"\r\n (emitirAtajo)=\"disabled() ? null : ( atajo() ? ejecutarAccion() : null)\" [title]=\"construirAlt()\"\r\n class=\"{{ isNotStyle() ? 'btn btn-sm' : (isRounded() ? 'circle button-tilt-hover' : 'btn btn-rounded button-tilt-hover text-white me-1 fs-8 px-3 w-auto w-sm-100') }}\"\r\n [ngClass]=\"outline() ? getColorClassOutline() : getColorClass()\" (click)=\"ejecutarAccion()\" [disabled]=\"disabled()\">\r\n <i [ngClass]=\"getIconClass()\" class=\"button-icon-hover\"></i>\r\n <span [innerHTML]=\"isHtml() ? getSafeHtml() : texto()\"></span>\r\n</button>\r\n}\r\n@if(sunatButton()){\r\n<button atajoTecla [altKeyCombination]=\"atajo()\"\r\n (emitirAtajo)=\"disabled() ? null : ( atajo() ? ejecutarAccion() : null)\"\r\n class=\"btn btn-rounded button-tilt-hover text-white me-1 fs-8 px-3 w-auto w-sm-100\"\r\n [ngClass]=\"outline() ? getColorClassOutline() : getColorClass()\" (click)=\"ejecutarAccion()\" [disabled]=\"disabled()\">\r\n <img src=\"../../../../../assets/images/Sunat.ico\" class=\"button-icon-hover\" height=\"16px\" alt=\"Sunat\"> {{texto() ? texto() : 'Importar de SUNAT'}}\r\n</button>\r\n}\r\n\r\n@if(inputButton()){\r\n<button class=\"btn button-tilt-hover text-white me-1 fs-6 px-3 py-0 w-auto w-sm-100 radius-none padd\"\r\n [ngClass]=\"outline() ? getColorClassOutline() : getColorClass()\" (click)=\"ejecutarAccion()\" [disabled]=\"disabled()\">\r\n <i [ngClass]=\"getIconClass()\" class=\"button-icon-hover\"></i>\r\n <span>{{ texto() }}</span>\r\n</button>\r\n}\r\n\r\n@if(closeButton()){\r\n<button class=\"btn close fs-5 no-border\" (click)=\"ejecutarAccion()\" [disabled]=\"disabled()\">\r\n <i class=\"me-1 button-icon-hover text-dark fw-bold\" [ngClass]=\"getIconClass()\"></i>\r\n</button>\r\n}\r\n\r\n@if(dropdownButton()){\r\n<button class=\"dropdown-item fs-6\" (click)=\"handleClick($event)\" [disabled]=\"disabled()\" [ngClass]=\"extraClass()\"\r\n [ngbTooltip]=\"tooltip()\" [style.cursor]=\"shouldBlockClick() ? 'not-allowed' : 'pointer'\" placement=\"right\">\r\n <i class=\"me-1\" [ngClass]=\"getIconClass()\"></i>\r\n <span [innerHTML]=\"isHtml() ? getSafeHtml() : texto()\"></span>\r\n @if(uploadButton()){\r\n <input type=\"file\" #fileInput [accept]=\"accept()\" (change)=\"handleFileInput($event)\" [disabled]=\"disabled()\"\r\n class=\"d-none\">\r\n }\r\n</button>\r\n}\r\n\r\n@if(uploadButton() && !dropdownButton()){\r\n<button class=\"btn btn-rounded button-tilt-hover text-white me-1 fs-8 px-3 w-auto w-sm-100\"\r\n [ngClass]=\"outline() ? getColorClassOutline() : getColorClass()\" (click)=\"triggerFileInput()\"\r\n [disabled]=\"disabled()\" [ngbTooltip]=\"tooltip()\" type=\"button\">\r\n <i [ngClass]=\"getIconClass()\" class=\"me-1 button-icon-hover\"></i>\r\n <span [innerHTML]=\"isHtml() ? getSafeHtml() : texto()\"></span>\r\n <input type=\"file\" #fileInput [accept]=\"accept()\" (change)=\"handleFileInput($event)\" [disabled]=\"disabled()\"\r\n class=\"d-none\">\r\n</button>\r\n}", styles: [".no-border{border:none!important}.button-icon-hover{display:inline-block}.btn{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@keyframes tilt-bounce{0%,to{transform:rotate(0)}25%{transform:rotate(-.5deg)}75%{transform:rotate(.5deg)}}@keyframes icon-rotate-pop{0%{transform:rotate(0) scale(1)}25%{transform:rotate(10deg) scale(1.05)}50%{transform:rotate(-10deg) scale(1.1)}75%{transform:rotate(10deg) scale(1.05)}to{transform:rotate(0) scale(1)}}.button-tilt-hover:hover{animation:tilt-bounce .6s infinite ease-in-out}.button-tilt-hover:hover .button-icon-hover{animation:icon-rotate-pop 1s ease-in-out infinite}.dropdown-item{font-size:12px!important;padding:7px 20px;color:#757575;transition:color .3s ease-in-out}.dropdown-item:hover{background:#e8e8e8;color:#222}.tooltip-inner{white-space:nowrap;max-width:none!important}:host ::ng-deep .tooltip-inner{white-space:nowrap;max-width:none!important}.radius-none{border-radius:0}.padd{padding:3px 8px!important}.circle{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;max-width:40px!important;max-height:40px!important;border-radius:100%;color:#fff;transition:box-shadow .3s ease;display:flex!important;justify-content:center!important;align-items:center!important}.circle:hover{box-shadow:0 4px 12px #0003}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: NgbTooltipModule }, { kind: "directive", type: i1$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: AtajosDirective, selector: "[atajoTecla]", inputs: ["altKeyCombination"], outputs: ["emitirAtajo"] }] });
|
|
193
193
|
}
|
|
194
194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
195
195
|
type: Component,
|
|
196
|
-
args: [{ selector: 'app-button', imports: [CommonModule, NgbTooltipModule, AtajosDirective], template: "@if(!closeButton() && !dropdownButton() && !uploadButton() && !sunatButton() && ! inputButton()){\r\n<button atajoTecla #boton [altKeyCombination]=\"atajo()\"\r\n (emitirAtajo)=\"disabled() ? null : ( atajo() ? ejecutarAccion() : null)\" [title]=\"construirAlt()\"\r\n class=\"{{ isNotStyle() ? 'btn btn-sm' : (isRounded() ? 'circle button-tilt-hover' : 'btn btn-rounded button-tilt-hover text-white me-1 fs-8 px-3 w-auto w-sm-100') }}\"\r\n [ngClass]=\"outline() ? getColorClassOutline() : getColorClass()\" (click)=\"ejecutarAccion()\" [disabled]=\"disabled()\">\r\n <i [ngClass]=\"getIconClass()\" class=\"button-icon-hover\"></i>\r\n <span [innerHTML]=\"isHtml() ? getSafeHtml() : texto()\"></span>\r\n</button>\r\n}\r\n@if(sunatButton()){\r\n<button atajoTecla [altKeyCombination]=\"atajo()\"\r\n (emitirAtajo)=\"disabled() ? null : ( atajo() ? ejecutarAccion() : null)\"\r\n class=\"btn btn-rounded button-tilt-hover text-white me-1 fs-8 px-3 w-auto w-sm-100\"\r\n [ngClass]=\"outline() ? getColorClassOutline() : getColorClass()\" (click)=\"ejecutarAccion()\" [disabled]=\"disabled()\">\r\n <img src=\"../../../../../assets/images/Sunat.ico\" class=\"button-icon-hover\" height=\"16px\" alt=\"Sunat\"> {{texto()
|
|
196
|
+
args: [{ selector: 'app-button', imports: [CommonModule, NgbTooltipModule, AtajosDirective], template: "@if(!closeButton() && !dropdownButton() && !uploadButton() && !sunatButton() && ! inputButton()){\r\n<button atajoTecla #boton [altKeyCombination]=\"atajo()\"\r\n (emitirAtajo)=\"disabled() ? null : ( atajo() ? ejecutarAccion() : null)\" [title]=\"construirAlt()\"\r\n class=\"{{ isNotStyle() ? 'btn btn-sm' : (isRounded() ? 'circle button-tilt-hover' : 'btn btn-rounded button-tilt-hover text-white me-1 fs-8 px-3 w-auto w-sm-100') }}\"\r\n [ngClass]=\"outline() ? getColorClassOutline() : getColorClass()\" (click)=\"ejecutarAccion()\" [disabled]=\"disabled()\">\r\n <i [ngClass]=\"getIconClass()\" class=\"button-icon-hover\"></i>\r\n <span [innerHTML]=\"isHtml() ? getSafeHtml() : texto()\"></span>\r\n</button>\r\n}\r\n@if(sunatButton()){\r\n<button atajoTecla [altKeyCombination]=\"atajo()\"\r\n (emitirAtajo)=\"disabled() ? null : ( atajo() ? ejecutarAccion() : null)\"\r\n class=\"btn btn-rounded button-tilt-hover text-white me-1 fs-8 px-3 w-auto w-sm-100\"\r\n [ngClass]=\"outline() ? getColorClassOutline() : getColorClass()\" (click)=\"ejecutarAccion()\" [disabled]=\"disabled()\">\r\n <img src=\"../../../../../assets/images/Sunat.ico\" class=\"button-icon-hover\" height=\"16px\" alt=\"Sunat\"> {{texto() ? texto() : 'Importar de SUNAT'}}\r\n</button>\r\n}\r\n\r\n@if(inputButton()){\r\n<button class=\"btn button-tilt-hover text-white me-1 fs-6 px-3 py-0 w-auto w-sm-100 radius-none padd\"\r\n [ngClass]=\"outline() ? getColorClassOutline() : getColorClass()\" (click)=\"ejecutarAccion()\" [disabled]=\"disabled()\">\r\n <i [ngClass]=\"getIconClass()\" class=\"button-icon-hover\"></i>\r\n <span>{{ texto() }}</span>\r\n</button>\r\n}\r\n\r\n@if(closeButton()){\r\n<button class=\"btn close fs-5 no-border\" (click)=\"ejecutarAccion()\" [disabled]=\"disabled()\">\r\n <i class=\"me-1 button-icon-hover text-dark fw-bold\" [ngClass]=\"getIconClass()\"></i>\r\n</button>\r\n}\r\n\r\n@if(dropdownButton()){\r\n<button class=\"dropdown-item fs-6\" (click)=\"handleClick($event)\" [disabled]=\"disabled()\" [ngClass]=\"extraClass()\"\r\n [ngbTooltip]=\"tooltip()\" [style.cursor]=\"shouldBlockClick() ? 'not-allowed' : 'pointer'\" placement=\"right\">\r\n <i class=\"me-1\" [ngClass]=\"getIconClass()\"></i>\r\n <span [innerHTML]=\"isHtml() ? getSafeHtml() : texto()\"></span>\r\n @if(uploadButton()){\r\n <input type=\"file\" #fileInput [accept]=\"accept()\" (change)=\"handleFileInput($event)\" [disabled]=\"disabled()\"\r\n class=\"d-none\">\r\n }\r\n</button>\r\n}\r\n\r\n@if(uploadButton() && !dropdownButton()){\r\n<button class=\"btn btn-rounded button-tilt-hover text-white me-1 fs-8 px-3 w-auto w-sm-100\"\r\n [ngClass]=\"outline() ? getColorClassOutline() : getColorClass()\" (click)=\"triggerFileInput()\"\r\n [disabled]=\"disabled()\" [ngbTooltip]=\"tooltip()\" type=\"button\">\r\n <i [ngClass]=\"getIconClass()\" class=\"me-1 button-icon-hover\"></i>\r\n <span [innerHTML]=\"isHtml() ? getSafeHtml() : texto()\"></span>\r\n <input type=\"file\" #fileInput [accept]=\"accept()\" (change)=\"handleFileInput($event)\" [disabled]=\"disabled()\"\r\n class=\"d-none\">\r\n</button>\r\n}", styles: [".no-border{border:none!important}.button-icon-hover{display:inline-block}.btn{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@keyframes tilt-bounce{0%,to{transform:rotate(0)}25%{transform:rotate(-.5deg)}75%{transform:rotate(.5deg)}}@keyframes icon-rotate-pop{0%{transform:rotate(0) scale(1)}25%{transform:rotate(10deg) scale(1.05)}50%{transform:rotate(-10deg) scale(1.1)}75%{transform:rotate(10deg) scale(1.05)}to{transform:rotate(0) scale(1)}}.button-tilt-hover:hover{animation:tilt-bounce .6s infinite ease-in-out}.button-tilt-hover:hover .button-icon-hover{animation:icon-rotate-pop 1s ease-in-out infinite}.dropdown-item{font-size:12px!important;padding:7px 20px;color:#757575;transition:color .3s ease-in-out}.dropdown-item:hover{background:#e8e8e8;color:#222}.tooltip-inner{white-space:nowrap;max-width:none!important}:host ::ng-deep .tooltip-inner{white-space:nowrap;max-width:none!important}.radius-none{border-radius:0}.padd{padding:3px 8px!important}.circle{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;max-width:40px!important;max-height:40px!important;border-radius:100%;color:#fff;transition:box-shadow .3s ease;display:flex!important;justify-content:center!important;align-items:center!important}.circle:hover{box-shadow:0 4px 12px #0003}\n"] }]
|
|
197
197
|
}], ctorParameters: () => [], propDecorators: { fileInput: [{
|
|
198
198
|
type: ViewChild,
|
|
199
199
|
args: ['fileInput']
|
|
@@ -851,6 +851,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
851
851
|
}] } });
|
|
852
852
|
|
|
853
853
|
class DobleInputComponent {
|
|
854
|
+
toast = inject(ToastService);
|
|
854
855
|
wlabel = input(0);
|
|
855
856
|
label = input('');
|
|
856
857
|
withBuscar = input(false);
|
|
@@ -883,7 +884,8 @@ class DobleInputComponent {
|
|
|
883
884
|
blur2 = input(null);
|
|
884
885
|
enter2 = input(null);
|
|
885
886
|
typeKey = input('number');
|
|
886
|
-
|
|
887
|
+
withAdicionalInfo = input(false);
|
|
888
|
+
validaLista = input(false);
|
|
887
889
|
get joinInfoReal() {
|
|
888
890
|
const isSmallScreen = window.innerWidth < 443;
|
|
889
891
|
return isSmallScreen ? true : this.joinInfo();
|
|
@@ -893,6 +895,11 @@ class DobleInputComponent {
|
|
|
893
895
|
if (this.invalidInput())
|
|
894
896
|
beep();
|
|
895
897
|
});
|
|
898
|
+
effect(() => {
|
|
899
|
+
if (this.withAdicionalInfo() && validaArray(this.lista()) && this.value() && this.keyCodigo() && this.keyDescri()) {
|
|
900
|
+
this.buscarItem();
|
|
901
|
+
}
|
|
902
|
+
});
|
|
896
903
|
effect(() => {
|
|
897
904
|
const data = (this.lista() ?? []);
|
|
898
905
|
if (data.length > 0 && this.firstItemDefault()) {
|
|
@@ -903,13 +910,39 @@ class DobleInputComponent {
|
|
|
903
910
|
}
|
|
904
911
|
emitirChange() {
|
|
905
912
|
this.changeInput.emit();
|
|
913
|
+
if (this.withAdicionalInfo()) {
|
|
914
|
+
this.buscarItem();
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
buscarItem() {
|
|
918
|
+
const findItem = this.lista().find(item => item[this.keyCodigo()] == this.value());
|
|
919
|
+
this.value2.set(findItem ? findItem[this.keyDescri()] : null);
|
|
920
|
+
}
|
|
921
|
+
validaItem() {
|
|
922
|
+
if (!validaArray(this.lista()))
|
|
923
|
+
return;
|
|
924
|
+
if (this.typeKey() == 'number' && this.value() == -1)
|
|
925
|
+
return;
|
|
926
|
+
if (this.typeKey() != 'number' && !validarVacioAndNull(this.value())) {
|
|
927
|
+
this.value.set('');
|
|
928
|
+
return;
|
|
929
|
+
}
|
|
930
|
+
const findItem = this.lista().find(item => item[this.keyCodigo()] == this.value());
|
|
931
|
+
if (findItem)
|
|
932
|
+
return;
|
|
933
|
+
const nombre = this.listName() || this.label();
|
|
934
|
+
const isWarning = !!this.listName();
|
|
935
|
+
const mensaje = `El código ${this.value() ? this.value() : 'vacio'} no existe en la lista de "${nombre}"`;
|
|
936
|
+
isWarning ? this.toast.warning('Advertencia', mensaje) : this.toast.error('Error', mensaje);
|
|
937
|
+
const firstItem = getFirstItem(this.lista());
|
|
938
|
+
this.value.set(firstItem ? firstItem[this.keyCodigo()] : null);
|
|
906
939
|
}
|
|
907
940
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DobleInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
908
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: DobleInputComponent, isStandalone: true, selector: "app-doble-input", inputs: { wlabel: { classPropertyName: "wlabel", publicName: "wlabel", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, withBuscar: { classPropertyName: "withBuscar", publicName: "withBuscar", isSignal: true, isRequired: false, transformFunction: null }, withBuscar2: { classPropertyName: "withBuscar2", publicName: "withBuscar2", isSignal: true, isRequired: false, transformFunction: null }, isRequired: { classPropertyName: "isRequired", publicName: "isRequired", isSignal: true, isRequired: false, transformFunction: null }, tipoInput2: { classPropertyName: "tipoInput2", publicName: "tipoInput2", isSignal: true, isRequired: false, transformFunction: null }, lista: { classPropertyName: "lista", publicName: "lista", isSignal: true, isRequired: false, transformFunction: null }, keyCodigo: { classPropertyName: "keyCodigo", publicName: "keyCodigo", isSignal: true, isRequired: false, transformFunction: null }, keyDescri: { classPropertyName: "keyDescri", publicName: "keyDescri", isSignal: true, isRequired: false, transformFunction: null }, joinInfo: { classPropertyName: "joinInfo", publicName: "joinInfo", isSignal: true, isRequired: false, transformFunction: null }, isVertical: { classPropertyName: "isVertical", publicName: "isVertical", isSignal: true, isRequired: false, transformFunction: null }, withTodos: { classPropertyName: "withTodos", publicName: "withTodos", isSignal: true, isRequired: false, transformFunction: null }, firstItemDefault: { classPropertyName: "firstItemDefault", publicName: "firstItemDefault", isSignal: true, isRequired: false, transformFunction: null }, disabled1: { classPropertyName: "disabled1", publicName: "disabled1", isSignal: true, isRequired: false, transformFunction: null }, disabled2: { classPropertyName: "disabled2", publicName: "disabled2", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, value2: { classPropertyName: "value2", publicName: "value2", isSignal: true, isRequired: false, transformFunction: null }, activeFocus: { classPropertyName: "activeFocus", publicName: "activeFocus", isSignal: true, isRequired: false, transformFunction: null }, customBorderColor: { classPropertyName: "customBorderColor", publicName: "customBorderColor", isSignal: true, isRequired: false, transformFunction: null }, customBoxShadow: { classPropertyName: "customBoxShadow", publicName: "customBoxShadow", isSignal: true, isRequired: false, transformFunction: null }, customTransition: { classPropertyName: "customTransition", publicName: "customTransition", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, listName: { classPropertyName: "listName", publicName: "listName", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "invalidInput", isSignal: true, isRequired: false, transformFunction: null }, blur1: { classPropertyName: "blur1", publicName: "blur1", isSignal: true, isRequired: false, transformFunction: null }, enter1: { classPropertyName: "enter1", publicName: "enter1", isSignal: true, isRequired: false, transformFunction: null }, blur2: { classPropertyName: "blur2", publicName: "blur2", isSignal: true, isRequired: false, transformFunction: null }, enter2: { classPropertyName: "enter2", publicName: "enter2", isSignal: true, isRequired: false, transformFunction: null }, typeKey: { classPropertyName: "typeKey", publicName: "typeKey", isSignal: true, isRequired: false, transformFunction: null }, isModal: { classPropertyName: "isModal", publicName: "isModal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled1: "disabled1Change", disabled2: "disabled2Change", value: "valueChange", value2: "value2Change", changeInput: "changeInput", invalidInput: "invalidInputChange", accion1: "accion1", accion2: "accion2" }, ngImport: i0, template: "@if (isVertical()) {\r\n<label for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n}\r\n<div class=\"d-flex align-items-center\">\r\n @if (!isVertical()) {\r\n <label for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n }\r\n <div class=\"content-1 me-1\">\r\n <input type=\"text\" class=\"form-control show-input\"\r\n (blur)=\"blur1()?.()\" (keyup.enter)=\"enter1()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [disabled]=\"disabled1()\" [(ngModel)]=\"value\"\r\n id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n @if (withBuscar()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" (click)=\"accion1.emit()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n }\r\n </div>\r\n\r\n <div class=\"w-100\">\r\n <div class=\"content-2 position-relative me-2\">\r\n @if (tipoInput2() == 2) {\r\n <select class=\"form-select\" [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [(ngModel)]=\"value\" [disabled]=\"disabled2()\"\r\n id=\"{{'id_content' + label()}}\" name=\"{{'id_content' + label()}}\" (change)=\"emitirChange()\" (focus)=\"invalidInput.set(false)\">\r\n @if (withTodos()) {\r\n <option [value]=\"typeKey() == 'number' ? -1 : ''\">Todos</option>\r\n }\r\n @for (item of lista(); track $index) {\r\n <option [value]=\"item[keyCodigo()]\"> {{ joinInfoReal ? item[keyCodigo()] + ' - ' + item[keyDescri()] :\r\n item[keyDescri()]}}</option>\r\n }\r\n </select>\r\n }\r\n @if (tipoInput2() == 1) {\r\n <input type=\"text\" class=\"form-control\" (blur)=\"blur2()?.()\" (keyup.enter)=\"enter2()?.()\" [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [disabled]=\"disabled2()\" id=\"{{'id_content' + label()}}\"\r\n [(ngModel)]=\"value2\"\r\n name=\"{{'id_content' + label()}}\" [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n @if (withBuscar2()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" (click)=\"accion2.emit()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n } \r\n @if (invalidInput()) {\r\n <div class=\"infoBox\" @fadeInOut><i class=\"fas fa-exclamation-triangle fs-9 text-danger\"></i> Ocurri\u00F3 un\r\n error: El campo es obligatorio, aseg\u00FArese de ingresar datos v\u00E1lidos.</div>\r\n }\r\n\r\n </div>\r\n </div>\r\n \r\n</div>", styles: [".content-1{flex-basis:30%;display:flex;align-items:center}.content-2{flex-basis:70%;display:flex;align-items:center}@media (max-width: 442px){.d-flex{flex-direction:column!important;align-items:stretch!important}}.show-input{display:none}@media (min-width: 443px){.show-input{display:block}}.input-error{border:1px solid rgb(203,0,0);color:#cb0000!important;animation:aura-pulse 1.5s ease-out infinite;position:relative;z-index:1}.infoBox{position:absolute;width:400px;top:calc(100% + 10px);left:0;right:0;margin-top:2px;background:#be0000d5;box-shadow:0 4px 12px #0003;border-radius:6px;padding:15px 12px;font-size:14px;color:#dbdbdb;z-index:10;font-size:12px;font-weight:600}.infoBox:before{content:\"\";position:absolute;top:-10px;left:20px;border-width:0 8px 10px 8px;border-style:solid;border-color:transparent transparent rgba(190,0,0,.835) transparent;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.1))}@media (max-width: 442px){.d-flex{flex-direction:column!important;align-items:stretch!important}.infoBox{font-size:12px;padding:8px 12px;width:100%!important;max-width:100%!important}}@media (max-width: 900px){.infoBox{width:250px!important}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], animations: [fadeInOut] });
|
|
941
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: DobleInputComponent, isStandalone: true, selector: "app-doble-input", inputs: { wlabel: { classPropertyName: "wlabel", publicName: "wlabel", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, withBuscar: { classPropertyName: "withBuscar", publicName: "withBuscar", isSignal: true, isRequired: false, transformFunction: null }, withBuscar2: { classPropertyName: "withBuscar2", publicName: "withBuscar2", isSignal: true, isRequired: false, transformFunction: null }, isRequired: { classPropertyName: "isRequired", publicName: "isRequired", isSignal: true, isRequired: false, transformFunction: null }, tipoInput2: { classPropertyName: "tipoInput2", publicName: "tipoInput2", isSignal: true, isRequired: false, transformFunction: null }, lista: { classPropertyName: "lista", publicName: "lista", isSignal: true, isRequired: false, transformFunction: null }, keyCodigo: { classPropertyName: "keyCodigo", publicName: "keyCodigo", isSignal: true, isRequired: false, transformFunction: null }, keyDescri: { classPropertyName: "keyDescri", publicName: "keyDescri", isSignal: true, isRequired: false, transformFunction: null }, joinInfo: { classPropertyName: "joinInfo", publicName: "joinInfo", isSignal: true, isRequired: false, transformFunction: null }, isVertical: { classPropertyName: "isVertical", publicName: "isVertical", isSignal: true, isRequired: false, transformFunction: null }, withTodos: { classPropertyName: "withTodos", publicName: "withTodos", isSignal: true, isRequired: false, transformFunction: null }, firstItemDefault: { classPropertyName: "firstItemDefault", publicName: "firstItemDefault", isSignal: true, isRequired: false, transformFunction: null }, disabled1: { classPropertyName: "disabled1", publicName: "disabled1", isSignal: true, isRequired: false, transformFunction: null }, disabled2: { classPropertyName: "disabled2", publicName: "disabled2", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, value2: { classPropertyName: "value2", publicName: "value2", isSignal: true, isRequired: false, transformFunction: null }, activeFocus: { classPropertyName: "activeFocus", publicName: "activeFocus", isSignal: true, isRequired: false, transformFunction: null }, customBorderColor: { classPropertyName: "customBorderColor", publicName: "customBorderColor", isSignal: true, isRequired: false, transformFunction: null }, customBoxShadow: { classPropertyName: "customBoxShadow", publicName: "customBoxShadow", isSignal: true, isRequired: false, transformFunction: null }, customTransition: { classPropertyName: "customTransition", publicName: "customTransition", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, listName: { classPropertyName: "listName", publicName: "listName", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "invalidInput", isSignal: true, isRequired: false, transformFunction: null }, blur1: { classPropertyName: "blur1", publicName: "blur1", isSignal: true, isRequired: false, transformFunction: null }, enter1: { classPropertyName: "enter1", publicName: "enter1", isSignal: true, isRequired: false, transformFunction: null }, blur2: { classPropertyName: "blur2", publicName: "blur2", isSignal: true, isRequired: false, transformFunction: null }, enter2: { classPropertyName: "enter2", publicName: "enter2", isSignal: true, isRequired: false, transformFunction: null }, typeKey: { classPropertyName: "typeKey", publicName: "typeKey", isSignal: true, isRequired: false, transformFunction: null }, withAdicionalInfo: { classPropertyName: "withAdicionalInfo", publicName: "withAdicionalInfo", isSignal: true, isRequired: false, transformFunction: null }, validaLista: { classPropertyName: "validaLista", publicName: "validaLista", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled1: "disabled1Change", disabled2: "disabled2Change", value: "valueChange", value2: "value2Change", changeInput: "changeInput", invalidInput: "invalidInputChange", accion1: "accion1", accion2: "accion2" }, ngImport: i0, template: "@if (isVertical()) {\r\n<label for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n}\r\n<div class=\"d-flex align-items-center\">\r\n @if (!isVertical()) {\r\n <label for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n }\r\n <div class=\"content-1 me-1\">\r\n <input type=\"text\" class=\"form-control show-input\"\r\n (blur)=\"blur1()?.(); validaItem()\" (keyup.enter)=\"enter1()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [disabled]=\"disabled1()\" [(ngModel)]=\"value\"\r\n id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n @if (withBuscar()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" (click)=\"accion1.emit()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n }\r\n </div>\r\n\r\n <div class=\"w-100\">\r\n <div class=\"content-2 position-relative me-2\">\r\n @if (tipoInput2() == 2) {\r\n <select class=\"form-select\" [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [(ngModel)]=\"value\" [disabled]=\"disabled2()\"\r\n id=\"{{'id_content' + label()}}\" name=\"{{'id_content' + label()}}\" (change)=\"emitirChange()\" (focus)=\"invalidInput.set(false)\">\r\n @if (withTodos()) {\r\n <option [value]=\"typeKey() == 'number' ? -1 : ''\">Todos</option>\r\n }\r\n @for (item of lista(); track $index) {\r\n <option [value]=\"item[keyCodigo()]\"> {{ joinInfoReal ? item[keyCodigo()] + ' - ' + item[keyDescri()] :\r\n item[keyDescri()]}}</option>\r\n }\r\n </select>\r\n }\r\n @if (tipoInput2() == 1) {\r\n <input type=\"text\" class=\"form-control\" (blur)=\"blur2()?.()\" (keyup.enter)=\"enter2()?.()\" [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [disabled]=\"disabled2()\" id=\"{{'id_content' + label()}}\"\r\n [(ngModel)]=\"value2\"\r\n name=\"{{'id_content' + label()}}\" [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n @if (withBuscar2()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" (click)=\"accion2.emit()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n } \r\n @if (invalidInput()) {\r\n <div class=\"infoBox\" @fadeInOut><i class=\"fas fa-exclamation-triangle fs-9 text-danger\"></i> Ocurri\u00F3 un\r\n error: El campo es obligatorio, aseg\u00FArese de ingresar datos v\u00E1lidos.</div>\r\n }\r\n\r\n </div>\r\n </div>\r\n \r\n</div>", styles: [".content-1{flex-basis:30%;display:flex;align-items:center}.content-2{flex-basis:70%;display:flex;align-items:center}@media (max-width: 442px){.d-flex{flex-direction:column!important;align-items:stretch!important}}.show-input{display:none}@media (min-width: 443px){.show-input{display:block}}.input-error{border:1px solid rgb(203,0,0);color:#cb0000!important;animation:aura-pulse 1.5s ease-out infinite;position:relative;z-index:1}.infoBox{position:absolute;width:400px;top:calc(100% + 10px);left:0;right:0;margin-top:2px;background:#be0000d5;box-shadow:0 4px 12px #0003;border-radius:6px;padding:15px 12px;font-size:14px;color:#dbdbdb;z-index:10;font-size:12px;font-weight:600}.infoBox:before{content:\"\";position:absolute;top:-10px;left:20px;border-width:0 8px 10px 8px;border-style:solid;border-color:transparent transparent rgba(190,0,0,.835) transparent;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.1))}@media (max-width: 442px){.d-flex{flex-direction:column!important;align-items:stretch!important}.infoBox{font-size:12px;padding:8px 12px;width:100%!important;max-width:100%!important}}@media (max-width: 900px){.infoBox{width:250px!important}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], animations: [fadeInOut] });
|
|
909
942
|
}
|
|
910
943
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DobleInputComponent, decorators: [{
|
|
911
944
|
type: Component,
|
|
912
|
-
args: [{ selector: 'app-doble-input', imports: [FormsModule], animations: [fadeInOut], template: "@if (isVertical()) {\r\n<label for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n}\r\n<div class=\"d-flex align-items-center\">\r\n @if (!isVertical()) {\r\n <label for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n }\r\n <div class=\"content-1 me-1\">\r\n <input type=\"text\" class=\"form-control show-input\"\r\n (blur)=\"blur1()?.()\" (keyup.enter)=\"enter1()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [disabled]=\"disabled1()\" [(ngModel)]=\"value\"\r\n id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n @if (withBuscar()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" (click)=\"accion1.emit()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n }\r\n </div>\r\n\r\n <div class=\"w-100\">\r\n <div class=\"content-2 position-relative me-2\">\r\n @if (tipoInput2() == 2) {\r\n <select class=\"form-select\" [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [(ngModel)]=\"value\" [disabled]=\"disabled2()\"\r\n id=\"{{'id_content' + label()}}\" name=\"{{'id_content' + label()}}\" (change)=\"emitirChange()\" (focus)=\"invalidInput.set(false)\">\r\n @if (withTodos()) {\r\n <option [value]=\"typeKey() == 'number' ? -1 : ''\">Todos</option>\r\n }\r\n @for (item of lista(); track $index) {\r\n <option [value]=\"item[keyCodigo()]\"> {{ joinInfoReal ? item[keyCodigo()] + ' - ' + item[keyDescri()] :\r\n item[keyDescri()]}}</option>\r\n }\r\n </select>\r\n }\r\n @if (tipoInput2() == 1) {\r\n <input type=\"text\" class=\"form-control\" (blur)=\"blur2()?.()\" (keyup.enter)=\"enter2()?.()\" [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [disabled]=\"disabled2()\" id=\"{{'id_content' + label()}}\"\r\n [(ngModel)]=\"value2\"\r\n name=\"{{'id_content' + label()}}\" [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n @if (withBuscar2()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" (click)=\"accion2.emit()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n } \r\n @if (invalidInput()) {\r\n <div class=\"infoBox\" @fadeInOut><i class=\"fas fa-exclamation-triangle fs-9 text-danger\"></i> Ocurri\u00F3 un\r\n error: El campo es obligatorio, aseg\u00FArese de ingresar datos v\u00E1lidos.</div>\r\n }\r\n\r\n </div>\r\n </div>\r\n \r\n</div>", styles: [".content-1{flex-basis:30%;display:flex;align-items:center}.content-2{flex-basis:70%;display:flex;align-items:center}@media (max-width: 442px){.d-flex{flex-direction:column!important;align-items:stretch!important}}.show-input{display:none}@media (min-width: 443px){.show-input{display:block}}.input-error{border:1px solid rgb(203,0,0);color:#cb0000!important;animation:aura-pulse 1.5s ease-out infinite;position:relative;z-index:1}.infoBox{position:absolute;width:400px;top:calc(100% + 10px);left:0;right:0;margin-top:2px;background:#be0000d5;box-shadow:0 4px 12px #0003;border-radius:6px;padding:15px 12px;font-size:14px;color:#dbdbdb;z-index:10;font-size:12px;font-weight:600}.infoBox:before{content:\"\";position:absolute;top:-10px;left:20px;border-width:0 8px 10px 8px;border-style:solid;border-color:transparent transparent rgba(190,0,0,.835) transparent;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.1))}@media (max-width: 442px){.d-flex{flex-direction:column!important;align-items:stretch!important}.infoBox{font-size:12px;padding:8px 12px;width:100%!important;max-width:100%!important}}@media (max-width: 900px){.infoBox{width:250px!important}}\n"] }]
|
|
945
|
+
args: [{ selector: 'app-doble-input', imports: [FormsModule], animations: [fadeInOut], template: "@if (isVertical()) {\r\n<label for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n}\r\n<div class=\"d-flex align-items-center\">\r\n @if (!isVertical()) {\r\n <label for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n }\r\n <div class=\"content-1 me-1\">\r\n <input type=\"text\" class=\"form-control show-input\"\r\n (blur)=\"blur1()?.(); validaItem()\" (keyup.enter)=\"enter1()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [disabled]=\"disabled1()\" [(ngModel)]=\"value\"\r\n id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n @if (withBuscar()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" (click)=\"accion1.emit()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n }\r\n </div>\r\n\r\n <div class=\"w-100\">\r\n <div class=\"content-2 position-relative me-2\">\r\n @if (tipoInput2() == 2) {\r\n <select class=\"form-select\" [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [(ngModel)]=\"value\" [disabled]=\"disabled2()\"\r\n id=\"{{'id_content' + label()}}\" name=\"{{'id_content' + label()}}\" (change)=\"emitirChange()\" (focus)=\"invalidInput.set(false)\">\r\n @if (withTodos()) {\r\n <option [value]=\"typeKey() == 'number' ? -1 : ''\">Todos</option>\r\n }\r\n @for (item of lista(); track $index) {\r\n <option [value]=\"item[keyCodigo()]\"> {{ joinInfoReal ? item[keyCodigo()] + ' - ' + item[keyDescri()] :\r\n item[keyDescri()]}}</option>\r\n }\r\n </select>\r\n }\r\n @if (tipoInput2() == 1) {\r\n <input type=\"text\" class=\"form-control\" (blur)=\"blur2()?.()\" (keyup.enter)=\"enter2()?.()\" [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [disabled]=\"disabled2()\" id=\"{{'id_content' + label()}}\"\r\n [(ngModel)]=\"value2\"\r\n name=\"{{'id_content' + label()}}\" [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n @if (withBuscar2()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" (click)=\"accion2.emit()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n } \r\n @if (invalidInput()) {\r\n <div class=\"infoBox\" @fadeInOut><i class=\"fas fa-exclamation-triangle fs-9 text-danger\"></i> Ocurri\u00F3 un\r\n error: El campo es obligatorio, aseg\u00FArese de ingresar datos v\u00E1lidos.</div>\r\n }\r\n\r\n </div>\r\n </div>\r\n \r\n</div>", styles: [".content-1{flex-basis:30%;display:flex;align-items:center}.content-2{flex-basis:70%;display:flex;align-items:center}@media (max-width: 442px){.d-flex{flex-direction:column!important;align-items:stretch!important}}.show-input{display:none}@media (min-width: 443px){.show-input{display:block}}.input-error{border:1px solid rgb(203,0,0);color:#cb0000!important;animation:aura-pulse 1.5s ease-out infinite;position:relative;z-index:1}.infoBox{position:absolute;width:400px;top:calc(100% + 10px);left:0;right:0;margin-top:2px;background:#be0000d5;box-shadow:0 4px 12px #0003;border-radius:6px;padding:15px 12px;font-size:14px;color:#dbdbdb;z-index:10;font-size:12px;font-weight:600}.infoBox:before{content:\"\";position:absolute;top:-10px;left:20px;border-width:0 8px 10px 8px;border-style:solid;border-color:transparent transparent rgba(190,0,0,.835) transparent;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.1))}@media (max-width: 442px){.d-flex{flex-direction:column!important;align-items:stretch!important}.infoBox{font-size:12px;padding:8px 12px;width:100%!important;max-width:100%!important}}@media (max-width: 900px){.infoBox{width:250px!important}}\n"] }]
|
|
913
946
|
}], ctorParameters: () => [] });
|
|
914
947
|
|
|
915
948
|
class DecimalDirective {
|
|
@@ -927,7 +960,9 @@ class DecimalDirective {
|
|
|
927
960
|
this.isFocused = false;
|
|
928
961
|
this.formatValue();
|
|
929
962
|
}
|
|
930
|
-
onInput(
|
|
963
|
+
onInput(event) {
|
|
964
|
+
const input = event.target;
|
|
965
|
+
const rawValue = input.value;
|
|
931
966
|
const cleaned = rawValue.replace(/[^0-9.,-]/g, '');
|
|
932
967
|
const normalized = cleaned.replace(',', '.');
|
|
933
968
|
const parsed = parseFloat(normalized);
|
|
@@ -941,7 +976,7 @@ class DecimalDirective {
|
|
|
941
976
|
this.elementRef.nativeElement.value = formatted !== null ? formatted : this.decimalPipe.transform(0, (this.appDecimal() ?? '1.2-2'));
|
|
942
977
|
}
|
|
943
978
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DecimalDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
944
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: DecimalDirective, isStandalone: true, selector: "[appDecimal]", inputs: { appDecimal: { classPropertyName: "appDecimal", publicName: "appDecimal", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "blur": "onBlur()", "input": "onInput($event
|
|
979
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: DecimalDirective, isStandalone: true, selector: "[appDecimal]", inputs: { appDecimal: { classPropertyName: "appDecimal", publicName: "appDecimal", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "blur": "onBlur()", "input": "onInput($event)" } }, providers: [DecimalPipe], ngImport: i0 });
|
|
945
980
|
}
|
|
946
981
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DecimalDirective, decorators: [{
|
|
947
982
|
type: Directive,
|
|
@@ -954,7 +989,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
954
989
|
args: ['blur']
|
|
955
990
|
}], onInput: [{
|
|
956
991
|
type: HostListener,
|
|
957
|
-
args: ['input', ['$event
|
|
992
|
+
args: ['input', ['$event']]
|
|
958
993
|
}] } });
|
|
959
994
|
|
|
960
995
|
class OnlyNumberDirective {
|
|
@@ -1057,6 +1092,159 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
1057
1092
|
args: ['paste', ['$event']]
|
|
1058
1093
|
}] } });
|
|
1059
1094
|
|
|
1095
|
+
class SwitchActivoComponent {
|
|
1096
|
+
valueOn = input.required();
|
|
1097
|
+
valueOff = input.required();
|
|
1098
|
+
labelOn = input('Activo');
|
|
1099
|
+
labelOff = input('Inactivo');
|
|
1100
|
+
iconOn = input('fas fa-check');
|
|
1101
|
+
iconOff = input('fas fa-times');
|
|
1102
|
+
colorOn = input('bg-exito');
|
|
1103
|
+
colorOff = input('bg-error');
|
|
1104
|
+
id = input('mode');
|
|
1105
|
+
model = model();
|
|
1106
|
+
_checked = false;
|
|
1107
|
+
constructor() {
|
|
1108
|
+
effect(() => {
|
|
1109
|
+
this._checked = this.model() === this.valueOn();
|
|
1110
|
+
});
|
|
1111
|
+
}
|
|
1112
|
+
toggle(event) {
|
|
1113
|
+
const checkbox = event.target;
|
|
1114
|
+
this.model.set(checkbox.checked ? this.valueOn() : this.valueOff());
|
|
1115
|
+
}
|
|
1116
|
+
currentLabel() {
|
|
1117
|
+
return this._checked ? this.labelOn() : this.labelOff();
|
|
1118
|
+
}
|
|
1119
|
+
currentColor() {
|
|
1120
|
+
return this._checked ? this.colorOn() : this.colorOff();
|
|
1121
|
+
}
|
|
1122
|
+
currentIcon() {
|
|
1123
|
+
return this._checked ? this.iconOn() : this.iconOff();
|
|
1124
|
+
}
|
|
1125
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SwitchActivoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1126
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: SwitchActivoComponent, isStandalone: true, selector: "app-switch-activo", inputs: { valueOn: { classPropertyName: "valueOn", publicName: "valueOn", isSignal: true, isRequired: true, transformFunction: null }, valueOff: { classPropertyName: "valueOff", publicName: "valueOff", isSignal: true, isRequired: true, transformFunction: null }, labelOn: { classPropertyName: "labelOn", publicName: "labelOn", isSignal: true, isRequired: false, transformFunction: null }, labelOff: { classPropertyName: "labelOff", publicName: "labelOff", isSignal: true, isRequired: false, transformFunction: null }, iconOn: { classPropertyName: "iconOn", publicName: "iconOn", isSignal: true, isRequired: false, transformFunction: null }, iconOff: { classPropertyName: "iconOff", publicName: "iconOff", isSignal: true, isRequired: false, transformFunction: null }, colorOn: { classPropertyName: "colorOn", publicName: "colorOn", isSignal: true, isRequired: false, transformFunction: null }, colorOff: { classPropertyName: "colorOff", publicName: "colorOff", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { model: "modelChange" }, ngImport: i0, template: "<div class=\"form-check form-switch d-flex align-items-center\">\r\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" [checked]=\"_checked\" [ngClass]=\"currentColor()\"\r\n (change)=\"toggle($event)\" [id]=\"`toogle-${id()}`\" >\r\n\r\n <span class=\"switch-circle\">\r\n <i [class]=\"currentIcon()\"></i>\r\n </span>\r\n\r\n <label class=\"label-toggle\" [for]=\"`toogle-${id()}`\" >\r\n {{ currentLabel() }}\r\n </label>\r\n</div>", styles: [".form-check{display:inline-flex;align-items:center;gap:.5rem;position:relative;padding-left:0}.form-check-input{width:50px!important;height:25px!important;border-radius:1.5rem;appearance:none;outline:none;cursor:pointer;background-color:#e9ecef;border:1px solid #ffffff;transition:background-color .2s ease-in-out,border-color .2s ease-in-out;position:relative;margin:0}.switch-circle{position:absolute;top:50%;left:3px;transform:translateY(-50%);width:19px;height:19px;background-color:#fff;border-color:#000;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10px;color:#fff;transition:left .2s ease-in-out,background-color .2s ease-in-out,color .2s,border-color .2s;pointer-events:none;z-index:1}.form-check-input:checked~.switch-circle{left:28px;background-color:#fff;border-color:#000;color:#fff}.label-toggle{min-width:50px;text-align:center}.form-check-input:focus{box-shadow:none!important}.bg-error{background:#e70045}.bg-exito{background:#00e68e}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1127
|
+
}
|
|
1128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SwitchActivoComponent, decorators: [{
|
|
1129
|
+
type: Component,
|
|
1130
|
+
args: [{ selector: 'app-switch-activo', imports: [CommonModule], template: "<div class=\"form-check form-switch d-flex align-items-center\">\r\n <input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" [checked]=\"_checked\" [ngClass]=\"currentColor()\"\r\n (change)=\"toggle($event)\" [id]=\"`toogle-${id()}`\" >\r\n\r\n <span class=\"switch-circle\">\r\n <i [class]=\"currentIcon()\"></i>\r\n </span>\r\n\r\n <label class=\"label-toggle\" [for]=\"`toogle-${id()}`\" >\r\n {{ currentLabel() }}\r\n </label>\r\n</div>", styles: [".form-check{display:inline-flex;align-items:center;gap:.5rem;position:relative;padding-left:0}.form-check-input{width:50px!important;height:25px!important;border-radius:1.5rem;appearance:none;outline:none;cursor:pointer;background-color:#e9ecef;border:1px solid #ffffff;transition:background-color .2s ease-in-out,border-color .2s ease-in-out;position:relative;margin:0}.switch-circle{position:absolute;top:50%;left:3px;transform:translateY(-50%);width:19px;height:19px;background-color:#fff;border-color:#000;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10px;color:#fff;transition:left .2s ease-in-out,background-color .2s ease-in-out,color .2s,border-color .2s;pointer-events:none;z-index:1}.form-check-input:checked~.switch-circle{left:28px;background-color:#fff;border-color:#000;color:#fff}.label-toggle{min-width:50px;text-align:center}.form-check-input:focus{box-shadow:none!important}.bg-error{background:#e70045}.bg-exito{background:#00e68e}\n"] }]
|
|
1131
|
+
}], ctorParameters: () => [] });
|
|
1132
|
+
|
|
1133
|
+
class OnlyNumberFlexDirective {
|
|
1134
|
+
elementRef = inject(ElementRef);
|
|
1135
|
+
regex = /^-?[\d.,]*$/;
|
|
1136
|
+
onKeyPress(event) {
|
|
1137
|
+
const inputChar = event.key;
|
|
1138
|
+
if (event.ctrlKey || event.metaKey || inputChar.length > 1)
|
|
1139
|
+
return;
|
|
1140
|
+
const input = this.elementRef.nativeElement;
|
|
1141
|
+
const currentValue = input.value;
|
|
1142
|
+
const start = input.selectionStart ?? currentValue.length;
|
|
1143
|
+
const end = input.selectionEnd ?? currentValue.length;
|
|
1144
|
+
const proposed = currentValue.substring(0, start) +
|
|
1145
|
+
inputChar +
|
|
1146
|
+
currentValue.substring(end);
|
|
1147
|
+
if (!this.regex.test(proposed)) {
|
|
1148
|
+
event.preventDefault();
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
onPaste(event) {
|
|
1152
|
+
const pasted = event.clipboardData?.getData('text') || '';
|
|
1153
|
+
const input = this.elementRef.nativeElement;
|
|
1154
|
+
const currentValue = input.value;
|
|
1155
|
+
const start = input.selectionStart ?? currentValue.length;
|
|
1156
|
+
const end = input.selectionEnd ?? currentValue.length;
|
|
1157
|
+
const proposed = currentValue.substring(0, start) +
|
|
1158
|
+
pasted +
|
|
1159
|
+
currentValue.substring(end);
|
|
1160
|
+
if (!this.regex.test(proposed)) {
|
|
1161
|
+
event.preventDefault();
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: OnlyNumberFlexDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1165
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: OnlyNumberFlexDirective, isStandalone: true, selector: "[onlyNumberFlex]", host: { listeners: { "keypress": "onKeyPress($event)", "paste": "onPaste($event)" } }, ngImport: i0 });
|
|
1166
|
+
}
|
|
1167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: OnlyNumberFlexDirective, decorators: [{
|
|
1168
|
+
type: Directive,
|
|
1169
|
+
args: [{
|
|
1170
|
+
selector: '[onlyNumberFlex]'
|
|
1171
|
+
}]
|
|
1172
|
+
}], propDecorators: { onKeyPress: [{
|
|
1173
|
+
type: HostListener,
|
|
1174
|
+
args: ['keypress', ['$event']]
|
|
1175
|
+
}], onPaste: [{
|
|
1176
|
+
type: HostListener,
|
|
1177
|
+
args: ['paste', ['$event']]
|
|
1178
|
+
}] } });
|
|
1179
|
+
|
|
1180
|
+
class CaracteresCodigoDirective {
|
|
1181
|
+
regex = /^[a-zA-Z0-9.\-/]*$/;
|
|
1182
|
+
toast = inject(ToastService);
|
|
1183
|
+
caracteresCodigo = input(true);
|
|
1184
|
+
onKeyPress(event) {
|
|
1185
|
+
if (!this.caracteresCodigo())
|
|
1186
|
+
return;
|
|
1187
|
+
const allowedKeys = ['Delete', 'Backspace', 'Tab', 'Escape', 'Enter'];
|
|
1188
|
+
const isCtrlCombination = event.ctrlKey && ['a', 'c', 'v', 'x'].includes(event.key.toLowerCase());
|
|
1189
|
+
if (allowedKeys.includes(event.key) || isCtrlCombination) {
|
|
1190
|
+
return;
|
|
1191
|
+
}
|
|
1192
|
+
if (!/^[a-zA-Z0-9.\-/]$/.test(event.key)) {
|
|
1193
|
+
event.preventDefault();
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
onInput(event) {
|
|
1197
|
+
if (!this.caracteresCodigo())
|
|
1198
|
+
return;
|
|
1199
|
+
const input = event.target;
|
|
1200
|
+
const originalValue = input.value;
|
|
1201
|
+
const newValue = originalValue.replace(/[^a-zA-Z0-9.\-/]/g, '');
|
|
1202
|
+
if (originalValue != newValue) {
|
|
1203
|
+
input.value = newValue;
|
|
1204
|
+
this.toast.warning('Advertencia', `Solo se permiten caracteres alfanuméricos, guion (-), punto (.) y slash (/)`);
|
|
1205
|
+
input.dispatchEvent(new Event('input'));
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
onPaste(event) {
|
|
1209
|
+
if (!this.caracteresCodigo())
|
|
1210
|
+
return;
|
|
1211
|
+
const clipboardData = event.clipboardData?.getData('text/plain') || '';
|
|
1212
|
+
if (!this.regex.test(clipboardData)) {
|
|
1213
|
+
event.preventDefault();
|
|
1214
|
+
this.toast.warning('Advertencia', `Solo se permiten caracteres alfanuméricos, guion (-), punto (.) y slash (/)`);
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
onDrop(event) {
|
|
1218
|
+
if (!this.caracteresCodigo())
|
|
1219
|
+
return;
|
|
1220
|
+
const textData = event.dataTransfer?.getData('text') || '';
|
|
1221
|
+
if (!this.regex.test(textData)) {
|
|
1222
|
+
event.preventDefault();
|
|
1223
|
+
this.toast.warning('Advertencia', `Solo se permiten caracteres alfanuméricos, guion (-), punto (.) y slash (/)`);
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CaracteresCodigoDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1227
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: CaracteresCodigoDirective, isStandalone: true, selector: "[caracteresCodigo]", inputs: { caracteresCodigo: { classPropertyName: "caracteresCodigo", publicName: "caracteresCodigo", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keypress": "onKeyPress($event)", "input": "onInput($event)", "paste": "onPaste($event)", "drop": "onDrop($event)" } }, ngImport: i0 });
|
|
1228
|
+
}
|
|
1229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CaracteresCodigoDirective, decorators: [{
|
|
1230
|
+
type: Directive,
|
|
1231
|
+
args: [{
|
|
1232
|
+
selector: '[caracteresCodigo]'
|
|
1233
|
+
}]
|
|
1234
|
+
}], propDecorators: { onKeyPress: [{
|
|
1235
|
+
type: HostListener,
|
|
1236
|
+
args: ['keypress', ['$event']]
|
|
1237
|
+
}], onInput: [{
|
|
1238
|
+
type: HostListener,
|
|
1239
|
+
args: ['input', ['$event']]
|
|
1240
|
+
}], onPaste: [{
|
|
1241
|
+
type: HostListener,
|
|
1242
|
+
args: ['paste', ['$event']]
|
|
1243
|
+
}], onDrop: [{
|
|
1244
|
+
type: HostListener,
|
|
1245
|
+
args: ['drop', ['$event']]
|
|
1246
|
+
}] } });
|
|
1247
|
+
|
|
1060
1248
|
class InputComponent {
|
|
1061
1249
|
wlabel = input(0);
|
|
1062
1250
|
label = input('');
|
|
@@ -1067,6 +1255,7 @@ class InputComponent {
|
|
|
1067
1255
|
typeStandar = linkedSignal(() => this.type());
|
|
1068
1256
|
position = input('start');
|
|
1069
1257
|
value = model();
|
|
1258
|
+
value2 = model();
|
|
1070
1259
|
position_row = input('center');
|
|
1071
1260
|
withChangeInput = input(false);
|
|
1072
1261
|
disabled = model(false);
|
|
@@ -1075,13 +1264,15 @@ class InputComponent {
|
|
|
1075
1264
|
keyCodigo = input('');
|
|
1076
1265
|
keyDescri = input('');
|
|
1077
1266
|
joinInfo = input(false);
|
|
1078
|
-
distintInputs = ['text-area', 'select', 'date', 'number-format-decimal', 'number-integer', 'time', 'day'];
|
|
1267
|
+
distintInputs = ['text-area', 'select', 'date', 'number-format-decimal', 'number-integer', 'time', 'day', 'input-switch'];
|
|
1079
1268
|
withTodos = input(true);
|
|
1080
1269
|
allDisabled = model(false);
|
|
1081
1270
|
isVertical = input(false);
|
|
1082
1271
|
alto = input(72);
|
|
1083
1272
|
formatNumber = input('1.2-2');
|
|
1084
1273
|
blur = input(null);
|
|
1274
|
+
enter = input(null);
|
|
1275
|
+
keyup = input(null);
|
|
1085
1276
|
invalidInput = model(false);
|
|
1086
1277
|
accion = output();
|
|
1087
1278
|
activeFocus = input(true);
|
|
@@ -1094,8 +1285,11 @@ class InputComponent {
|
|
|
1094
1285
|
sinAyuda = input(false);
|
|
1095
1286
|
maxWidth = input();
|
|
1096
1287
|
changeInput = output();
|
|
1288
|
+
showTopLabel = input(false);
|
|
1289
|
+
topLabelText = input('');
|
|
1097
1290
|
firstItemDefault = input(false);
|
|
1098
1291
|
typeKey = input('number');
|
|
1292
|
+
validaCodigo = input(false);
|
|
1099
1293
|
constructor() {
|
|
1100
1294
|
effect(() => {
|
|
1101
1295
|
if (this.invalidInput())
|
|
@@ -1149,11 +1343,11 @@ class InputComponent {
|
|
|
1149
1343
|
this.changeInput.emit(encontrar);
|
|
1150
1344
|
}
|
|
1151
1345
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1152
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: InputComponent, isStandalone: true, selector: "app-input", inputs: { wlabel: { classPropertyName: "wlabel", publicName: "wlabel", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, withBuscar: { classPropertyName: "withBuscar", publicName: "withBuscar", isSignal: true, isRequired: false, transformFunction: null }, isRequired: { classPropertyName: "isRequired", publicName: "isRequired", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, position_row: { classPropertyName: "position_row", publicName: "position_row", isSignal: true, isRequired: false, transformFunction: null }, withChangeInput: { classPropertyName: "withChangeInput", publicName: "withChangeInput", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isImportant: { classPropertyName: "isImportant", publicName: "isImportant", isSignal: true, isRequired: false, transformFunction: null }, lista: { classPropertyName: "lista", publicName: "lista", isSignal: true, isRequired: false, transformFunction: null }, keyCodigo: { classPropertyName: "keyCodigo", publicName: "keyCodigo", isSignal: true, isRequired: false, transformFunction: null }, keyDescri: { classPropertyName: "keyDescri", publicName: "keyDescri", isSignal: true, isRequired: false, transformFunction: null }, joinInfo: { classPropertyName: "joinInfo", publicName: "joinInfo", isSignal: true, isRequired: false, transformFunction: null }, withTodos: { classPropertyName: "withTodos", publicName: "withTodos", isSignal: true, isRequired: false, transformFunction: null }, allDisabled: { classPropertyName: "allDisabled", publicName: "allDisabled", isSignal: true, isRequired: false, transformFunction: null }, isVertical: { classPropertyName: "isVertical", publicName: "isVertical", isSignal: true, isRequired: false, transformFunction: null }, alto: { classPropertyName: "alto", publicName: "alto", isSignal: true, isRequired: false, transformFunction: null }, formatNumber: { classPropertyName: "formatNumber", publicName: "formatNumber", isSignal: true, isRequired: false, transformFunction: null }, blur: { classPropertyName: "blur", publicName: "blur", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "invalidInput", isSignal: true, isRequired: false, transformFunction: null }, activeFocus: { classPropertyName: "activeFocus", publicName: "activeFocus", isSignal: true, isRequired: false, transformFunction: null }, customBorderColor: { classPropertyName: "customBorderColor", publicName: "customBorderColor", isSignal: true, isRequired: false, transformFunction: null }, customBoxShadow: { classPropertyName: "customBoxShadow", publicName: "customBoxShadow", isSignal: true, isRequired: false, transformFunction: null }, customTransition: { classPropertyName: "customTransition", publicName: "customTransition", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, textoAyuda: { classPropertyName: "textoAyuda", publicName: "textoAyuda", isSignal: true, isRequired: false, transformFunction: null }, sinAyuda: { classPropertyName: "sinAyuda", publicName: "sinAyuda", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, firstItemDefault: { classPropertyName: "firstItemDefault", publicName: "firstItemDefault", isSignal: true, isRequired: false, transformFunction: null }, typeKey: { classPropertyName: "typeKey", publicName: "typeKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", allDisabled: "allDisabledChange", invalidInput: "invalidInputChange", accion: "accion", changeInput: "changeInput" }, ngImport: i0, template: "@if (isVertical()) {\r\n<label [ngClass]=\"{'text-error': isImportant()}\" for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n}\r\n<div class=\"d-flex align-items-{{position_row()}}\">\r\n @if (!isVertical()) {\r\n <label [ngClass]=\"{'text-error': isImportant()}\" for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n }\r\n <div class=\"flex-grow-1 me-2\">\r\n <div [ngClass]=\"typeStandar() == 'date' ? 'd-block' : 'd-flex'\" class=\"position-relative\">\r\n @if (!distintInputs.includes(typeStandar())) {\r\n <input [type]=\"typeStandar()\" (blur)=\"callBlur()\" class=\"form-control text-{{position()}}\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\"\r\n (focus)=\"focusInput()\" autocomplete=\"off\" [ngClass]=\"invalidInput() ? 'input-error' : ''\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\"\r\n name=\"{{'id_' + label()}}\" [attr.maxlength]=\"maxLength()\">\r\n }\r\n\r\n @if (typeStandar() == 'number-format-decimal') {\r\n <input type=\"text\" class=\"form-control\" (blur)=\"callBlur()\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"'text-' + position()\"\r\n [style.max-width.px]=\"maxWidth()\" [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\"\r\n id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" [appDecimal]=\"formatNumber()\" onlyNumber\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"focusInput()\">\r\n }\r\n\r\n @if (typeStandar() == 'number-integer') {\r\n <input type=\"text\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\"\r\n [ngClass]=\"invalidInput() ? 'input-error' : ''\" [disabled]=\"allDisabled() ? true : disabled()\"\r\n [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" onlyNumber\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"focusInput()\">\r\n }\r\n\r\n @if (typeStandar() == 'day') {\r\n <input type=\"text\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\"\r\n [ngClass]=\"invalidInput() ? 'input-error' : ''\" [disabled]=\"allDisabled() ? true : disabled()\"\r\n [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" onlyDay\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"focusInput()\">\r\n }\r\n\r\n @if (typeStandar() == 'date') {\r\n <input type=\"date\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"invalidInput() ? 'input-error' : ''\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\"\r\n name=\"{{'id_' + label()}}\" (focus)=\"focusInput()\">\r\n }\r\n\r\n @if (typeStandar() == 'time') {\r\n <input type=\"time\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"invalidInput() ? 'input-error' : ''\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\"\r\n name=\"{{'id_' + label()}}\" (focus)=\"focusInput()\">\r\n }\r\n\r\n @if (typeStandar() == 'text-area') {\r\n <textarea class=\"{{'text-' + position()}} form-area\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" [rows]=\"alto()\"\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"focusInput()\" [placeholder]=\"placeholder()\" >\r\n\r\n </textarea>\r\n }\r\n\r\n @if (typeStandar() == 'select') {\r\n <select class=\"form-select\" [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [class.text-error]=\"isImportant()\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\" [style.min-width.px]=\"maxWidth()\" [(ngModel)]=\"value\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" id=\"{{'id_content' + label()}}\"\r\n name=\"{{'id_content' + label()}}\" (change)=\"emitirChange()\" (focus)=\"focusInput()\">\r\n @if (withTodos()) {\r\n <option [value]=\"typeKey() == 'number' ? -1 : ''\">Todos</option>\r\n }\r\n @for (item of lista(); track $index) {\r\n @if (!keyCodigo()) {\r\n <option [value]=\"item\"> {{ item }}</option>\r\n }\r\n @if (keyCodigo()) {\r\n <option [value]=\"item[keyCodigo()]\"> {{ joinInfo() ? item[keyCodigo()] + ' - ' + item[keyDescri()] :\r\n item[keyDescri()]}}</option>\r\n }\r\n\r\n }\r\n </select>\r\n }\r\n\r\n @if (withBuscar()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" [disabled]=\"allDisabled()\" (click)=\"ejecutarAccion()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n }\r\n @if (withChangeInput()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" [disabled]=\"allDisabled()\" (click)=\"changeInputAction()\">\r\n <i [ngClass]=\"typeStandar() == 'select' ? 'fas fa-times' : 'fa solid fa-pen'\"></i>\r\n </button>\r\n }\r\n @if (invalidInput()) {\r\n <div class=\"infoBox\" @fadeInOut><i class=\"fas fa-exclamation-triangle fs-9 text-danger\"></i> Ocurri\u00F3 un\r\n error: El campo es obligatorio, aseg\u00FArese de ingresar datos v\u00E1lidos.</div>\r\n }\r\n\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if (textoAyuda() && typeStandar() == 'text-area') {\r\n<div class=\"d-flex flex-wrap justify-content-between align-items-center px-2\">\r\n <span class=\"text-error fs-6\">{{textoAyuda()}}</span>\r\n <span class=\"text-dark fs-6 fw-5\">{{ valueSize() }}/{{maxLength()}} caracteres</span>\r\n</div>\r\n}\r\n\r\n@if (sinAyuda() && typeStandar() == 'text-area') {\r\n<div class=\"d-flex flex-wrap justify-content-between align-items-center px-2\">\r\n <span class=\"text-error fs-6\"></span>\r\n <span class=\"text-dark fs-6 fw-5\">{{ valueSize() }}/{{maxLength()}} caracteres</span>\r\n</div>\r\n}", styles: [".text-error{color:#d60000!important;font-weight:700!important}@media (max-width: 442px){.d-flex{flex-direction:column!important;align-items:stretch!important}.infoBox{font-size:12px;padding:8px 12px;width:100%!important;max-width:100%!important}}@media (max-width: 900px){.infoBox{width:250px!important}}.infoBox{position:absolute;width:400px;top:calc(100% + 10px);left:0;right:0;margin-top:2px;background:#be0000d5;box-shadow:0 4px 12px #0003;border-radius:6px;padding:15px 12px;font-size:14px;color:#dbdbdb;z-index:10;font-size:12px;font-weight:600}.infoBox:before{content:\"\";position:absolute;top:-10px;left:20px;border-width:0 8px 10px 8px;border-style:solid;border-color:transparent transparent rgba(190,0,0,.835) transparent;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.1))}.input-error{border:1px solid rgb(203,0,0);color:#cb0000!important;animation:aura-pulse 1.5s ease-out infinite;position:relative;z-index:1}@keyframes aura-pulse{0%{box-shadow:0 0 #cb0000b3}70%{box-shadow:0 0 0 5px #cb000000}to{box-shadow:0 0 #cb000000}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: DecimalDirective, selector: "[appDecimal]", inputs: ["appDecimal"] }, { kind: "directive", type: OnlyNumberDirective, selector: "[onlyNumber]" }, { kind: "directive", type: OnlyDayDirective, selector: "[onlyDay]" }], animations: [fadeInOut] });
|
|
1346
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: InputComponent, isStandalone: true, selector: "app-input", inputs: { wlabel: { classPropertyName: "wlabel", publicName: "wlabel", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, withBuscar: { classPropertyName: "withBuscar", publicName: "withBuscar", isSignal: true, isRequired: false, transformFunction: null }, isRequired: { classPropertyName: "isRequired", publicName: "isRequired", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, value2: { classPropertyName: "value2", publicName: "value2", isSignal: true, isRequired: false, transformFunction: null }, position_row: { classPropertyName: "position_row", publicName: "position_row", isSignal: true, isRequired: false, transformFunction: null }, withChangeInput: { classPropertyName: "withChangeInput", publicName: "withChangeInput", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isImportant: { classPropertyName: "isImportant", publicName: "isImportant", isSignal: true, isRequired: false, transformFunction: null }, lista: { classPropertyName: "lista", publicName: "lista", isSignal: true, isRequired: false, transformFunction: null }, keyCodigo: { classPropertyName: "keyCodigo", publicName: "keyCodigo", isSignal: true, isRequired: false, transformFunction: null }, keyDescri: { classPropertyName: "keyDescri", publicName: "keyDescri", isSignal: true, isRequired: false, transformFunction: null }, joinInfo: { classPropertyName: "joinInfo", publicName: "joinInfo", isSignal: true, isRequired: false, transformFunction: null }, withTodos: { classPropertyName: "withTodos", publicName: "withTodos", isSignal: true, isRequired: false, transformFunction: null }, allDisabled: { classPropertyName: "allDisabled", publicName: "allDisabled", isSignal: true, isRequired: false, transformFunction: null }, isVertical: { classPropertyName: "isVertical", publicName: "isVertical", isSignal: true, isRequired: false, transformFunction: null }, alto: { classPropertyName: "alto", publicName: "alto", isSignal: true, isRequired: false, transformFunction: null }, formatNumber: { classPropertyName: "formatNumber", publicName: "formatNumber", isSignal: true, isRequired: false, transformFunction: null }, blur: { classPropertyName: "blur", publicName: "blur", isSignal: true, isRequired: false, transformFunction: null }, enter: { classPropertyName: "enter", publicName: "enter", isSignal: true, isRequired: false, transformFunction: null }, keyup: { classPropertyName: "keyup", publicName: "keyup", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "invalidInput", isSignal: true, isRequired: false, transformFunction: null }, activeFocus: { classPropertyName: "activeFocus", publicName: "activeFocus", isSignal: true, isRequired: false, transformFunction: null }, customBorderColor: { classPropertyName: "customBorderColor", publicName: "customBorderColor", isSignal: true, isRequired: false, transformFunction: null }, customBoxShadow: { classPropertyName: "customBoxShadow", publicName: "customBoxShadow", isSignal: true, isRequired: false, transformFunction: null }, customTransition: { classPropertyName: "customTransition", publicName: "customTransition", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, textoAyuda: { classPropertyName: "textoAyuda", publicName: "textoAyuda", isSignal: true, isRequired: false, transformFunction: null }, sinAyuda: { classPropertyName: "sinAyuda", publicName: "sinAyuda", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, showTopLabel: { classPropertyName: "showTopLabel", publicName: "showTopLabel", isSignal: true, isRequired: false, transformFunction: null }, topLabelText: { classPropertyName: "topLabelText", publicName: "topLabelText", isSignal: true, isRequired: false, transformFunction: null }, firstItemDefault: { classPropertyName: "firstItemDefault", publicName: "firstItemDefault", isSignal: true, isRequired: false, transformFunction: null }, typeKey: { classPropertyName: "typeKey", publicName: "typeKey", isSignal: true, isRequired: false, transformFunction: null }, validaCodigo: { classPropertyName: "validaCodigo", publicName: "validaCodigo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", value2: "value2Change", disabled: "disabledChange", allDisabled: "allDisabledChange", invalidInput: "invalidInputChange", accion: "accion", changeInput: "changeInput" }, ngImport: i0, template: "@if (isVertical()) {\r\n<label [ngClass]=\"{'text-error': isImportant()}\" for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n}\r\n<div class=\"d-flex align-items-{{position_row()}}\">\r\n @if (!isVertical()) {\r\n <label [ngClass]=\"{'text-error': isImportant()}\" for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n }\r\n <div class=\"flex-grow-1 me-2\">\r\n <div [ngClass]=\"{'d-block': typeStandar() == 'date','d-flex': typeStandar() != 'date', 'flex-column': showTopLabel() }\"\r\n class=\"position-relative\">\r\n \r\n @if (showTopLabel() && topLabelText()) {\r\n <div class=\"input-top-label\">\r\n <label class=\"fw-bold\">{{ topLabelText() }}</label>\r\n </div>\r\n }\r\n \r\n @if (!distintInputs.includes(typeStandar())) {\r\n <input [type]=\"typeStandar()\" (blur)=\"callBlur()\" (keyup.enter)=\"ejecutarAccion()\" (input)=\"keyup()?.()\"\r\n class=\"form-control text-{{position()}}\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\"\r\n (focus)=\"invalidInput.set(false)\" autocomplete=\"off\" [ngClass]=\"invalidInput() ? 'input-error' : ''\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\" [caracteresCodigo]=\"validaCodigo()\"\r\n name=\"{{'id_' + label()}}\" [attr.maxlength]=\"maxLength()\">\r\n }\r\n\r\n @if (typeStandar() == 'input-switch') {\r\n <div class=\"d-flex w-100\">\r\n <div class=\"flex-grow-1\">\r\n <input type=\"text\" class=\"form-control\" (blur)=\"callBlur()\" (input)=\"keyup()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"'text-' + position()\"\r\n [style.max-width.px]=\"maxWidth()\" [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\"\r\n id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" [caracteresCodigo]=\"validaCodigo()\"\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n </div>\r\n <div class=\"px-2\">\r\n <app-switch-activo valueOn=\"S\" valueOff=\"N\" [id]=\"label()\" [(model)]=\"value2\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (typeStandar() == 'number-format-decimal') {\r\n <input type=\"text\" class=\"form-control\" (blur)=\"callBlur()\" (input)=\"keyup()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"'text-' + position()\"\r\n [style.max-width.px]=\"maxWidth()\" [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\"\r\n id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" [appDecimal]=\"formatNumber()\" onlyNumberFlex\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n\r\n @if (typeStandar() == 'number-integer') {\r\n <input type=\"text\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\" (input)=\"keyup()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\"\r\n [ngClass]=\"invalidInput() ? 'input-error' : ''\" [disabled]=\"allDisabled() ? true : disabled()\"\r\n [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" onlyNumber\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n\r\n @if (typeStandar() == 'day') {\r\n <input type=\"text\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\" (input)=\"keyup()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\"\r\n [ngClass]=\"invalidInput() ? 'input-error' : ''\" [disabled]=\"allDisabled() ? true : disabled()\"\r\n [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" onlyDay\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n\r\n @if (typeStandar() == 'date') {\r\n <input type=\"date\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\" (input)=\"keyup()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"invalidInput() ? 'input-error' : ''\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\"\r\n name=\"{{'id_' + label()}}\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n\r\n @if (typeStandar() == 'time') {\r\n <input type=\"time\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\" (input)=\"keyup()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"invalidInput() ? 'input-error' : ''\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\"\r\n name=\"{{'id_' + label()}}\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n\r\n @if (typeStandar() == 'text-area') {\r\n <textarea class=\"{{'text-' + position()}} form-area\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" [rows]=\"alto()\"\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n\r\n </textarea>\r\n }\r\n\r\n @if (typeStandar() == 'select') {\r\n <select class=\"form-select\" [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [class.text-error]=\"isImportant()\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\" [style.min-width.px]=\"maxWidth()\" [(ngModel)]=\"value\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" id=\"{{'id_content' + label()}}\"\r\n name=\"{{'id_content' + label()}}\" (change)=\"emitirChange()\" (focus)=\"focusInput()\">\r\n @if (withTodos()) {\r\n <option [value]=\"typeKey() == 'number' ? -1 : ''\">Todos</option>\r\n }\r\n @for (item of lista(); track $index) {\r\n @if (!keyCodigo()) {\r\n <option [value]=\"item\"> {{ item }}</option>\r\n }\r\n @if (keyCodigo()) {\r\n <option [value]=\"item[keyCodigo()]\"> {{ joinInfo() ? item[keyCodigo()] + ' - ' + item[keyDescri()] :\r\n item[keyDescri()]}}</option>\r\n }\r\n\r\n }\r\n </select>\r\n }\r\n\r\n @if (withBuscar()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" [disabled]=\"allDisabled()\" (click)=\"ejecutarAccion()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n }\r\n @if (withChangeInput()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" [disabled]=\"allDisabled()\" (click)=\"changeInputAction()\">\r\n <i [ngClass]=\"typeStandar() == 'select' ? 'fas fa-times' : 'fa solid fa-pen'\"></i>\r\n </button>\r\n }\r\n @if (invalidInput()) {\r\n <div class=\"infoBox\" @fadeInOut><i class=\"fas fa-exclamation-triangle fs-9 text-danger\"></i> Ocurri\u00F3 un\r\n error: El campo es obligatorio, aseg\u00FArese de ingresar datos v\u00E1lidos.</div>\r\n }\r\n\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if (textoAyuda() && typeStandar() == 'text-area') {\r\n<div class=\"d-flex flex-wrap justify-content-between align-items-center px-2\">\r\n <span class=\"text-error fs-6\">{{textoAyuda()}}</span>\r\n <span class=\"text-dark fs-6 fw-5\">{{ valueSize() }}/{{maxLength()}} caracteres</span>\r\n</div>\r\n}\r\n\r\n@if (sinAyuda() && typeStandar() == 'text-area') {\r\n<div class=\"d-flex flex-wrap justify-content-between align-items-center px-2\">\r\n <span class=\"text-error fs-6\"></span>\r\n <span class=\"text-dark fs-6 fw-5\">{{ valueSize() }}/{{maxLength()}} caracteres</span>\r\n</div>\r\n}", styles: [".text-error{color:#d60000!important;font-weight:700!important}@media (max-width: 442px){.d-flex{flex-direction:column!important;align-items:stretch!important}.infoBox{font-size:12px;padding:8px 12px;width:100%!important;max-width:100%!important}}@media (max-width: 900px){.infoBox{width:250px!important}}.infoBox{position:absolute;width:400px;top:calc(100% + 10px);left:0;right:0;margin-top:2px;background:#be0000d5;box-shadow:0 4px 12px #0003;border-radius:6px;padding:15px 12px;font-size:14px;color:#dbdbdb;z-index:10;font-size:12px;font-weight:600}.infoBox:before{content:\"\";position:absolute;top:-10px;left:20px;border-width:0 8px 10px 8px;border-style:solid;border-color:transparent transparent rgba(190,0,0,.835) transparent;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.1))}.input-error{border:1px solid rgb(203,0,0);color:#cb0000!important;animation:aura-pulse 1.5s ease-out infinite;position:relative;z-index:1}@keyframes aura-pulse{0%{box-shadow:0 0 #cb0000b3}70%{box-shadow:0 0 0 5px #cb000000}to{box-shadow:0 0 #cb000000}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: DecimalDirective, selector: "[appDecimal]", inputs: ["appDecimal"] }, { kind: "directive", type: OnlyNumberDirective, selector: "[onlyNumber]" }, { kind: "directive", type: OnlyDayDirective, selector: "[onlyDay]" }, { kind: "component", type: SwitchActivoComponent, selector: "app-switch-activo", inputs: ["valueOn", "valueOff", "labelOn", "labelOff", "iconOn", "iconOff", "colorOn", "colorOff", "id", "model"], outputs: ["modelChange"] }, { kind: "directive", type: OnlyNumberFlexDirective, selector: "[onlyNumberFlex]" }, { kind: "directive", type: CaracteresCodigoDirective, selector: "[caracteresCodigo]", inputs: ["caracteresCodigo"] }], animations: [fadeInOut] });
|
|
1153
1347
|
}
|
|
1154
1348
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: InputComponent, decorators: [{
|
|
1155
1349
|
type: Component,
|
|
1156
|
-
args: [{ selector: 'app-input', imports: [FormsModule, CommonModule, DecimalDirective, OnlyNumberDirective, OnlyDayDirective], animations: [fadeInOut], template: "@if (isVertical()) {\r\n<label [ngClass]=\"{'text-error': isImportant()}\" for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n}\r\n<div class=\"d-flex align-items-{{position_row()}}\">\r\n @if (!isVertical()) {\r\n <label [ngClass]=\"{'text-error': isImportant()}\" for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n }\r\n <div class=\"flex-grow-1 me-2\">\r\n <div [ngClass]=\"typeStandar() == 'date' ? 'd-block' : 'd-flex'\" class=\"position-relative\">\r\n @if (!distintInputs.includes(typeStandar())) {\r\n <input [type]=\"typeStandar()\" (blur)=\"callBlur()\" class=\"form-control text-{{position()}}\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\"\r\n (focus)=\"focusInput()\" autocomplete=\"off\" [ngClass]=\"invalidInput() ? 'input-error' : ''\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\"\r\n name=\"{{'id_' + label()}}\" [attr.maxlength]=\"maxLength()\">\r\n }\r\n\r\n @if (typeStandar() == 'number-format-decimal') {\r\n <input type=\"text\" class=\"form-control\" (blur)=\"callBlur()\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"'text-' + position()\"\r\n [style.max-width.px]=\"maxWidth()\" [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\"\r\n id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" [appDecimal]=\"formatNumber()\" onlyNumber\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"focusInput()\">\r\n }\r\n\r\n @if (typeStandar() == 'number-integer') {\r\n <input type=\"text\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\"\r\n [ngClass]=\"invalidInput() ? 'input-error' : ''\" [disabled]=\"allDisabled() ? true : disabled()\"\r\n [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" onlyNumber\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"focusInput()\">\r\n }\r\n\r\n @if (typeStandar() == 'day') {\r\n <input type=\"text\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\"\r\n [ngClass]=\"invalidInput() ? 'input-error' : ''\" [disabled]=\"allDisabled() ? true : disabled()\"\r\n [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" onlyDay\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"focusInput()\">\r\n }\r\n\r\n @if (typeStandar() == 'date') {\r\n <input type=\"date\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"invalidInput() ? 'input-error' : ''\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\"\r\n name=\"{{'id_' + label()}}\" (focus)=\"focusInput()\">\r\n }\r\n\r\n @if (typeStandar() == 'time') {\r\n <input type=\"time\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"invalidInput() ? 'input-error' : ''\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\"\r\n name=\"{{'id_' + label()}}\" (focus)=\"focusInput()\">\r\n }\r\n\r\n @if (typeStandar() == 'text-area') {\r\n <textarea class=\"{{'text-' + position()}} form-area\"\r\n [class.text-error]=\"isImportant()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" [rows]=\"alto()\"\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"focusInput()\" [placeholder]=\"placeholder()\" >\r\n\r\n </textarea>\r\n }\r\n\r\n @if (typeStandar() == 'select') {\r\n <select class=\"form-select\" [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [class.text-error]=\"isImportant()\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\" [style.min-width.px]=\"maxWidth()\" [(ngModel)]=\"value\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" id=\"{{'id_content' + label()}}\"\r\n name=\"{{'id_content' + label()}}\" (change)=\"emitirChange()\" (focus)=\"focusInput()\">\r\n @if (withTodos()) {\r\n <option [value]=\"typeKey() == 'number' ? -1 : ''\">Todos</option>\r\n }\r\n @for (item of lista(); track $index) {\r\n @if (!keyCodigo()) {\r\n <option [value]=\"item\"> {{ item }}</option>\r\n }\r\n @if (keyCodigo()) {\r\n <option [value]=\"item[keyCodigo()]\"> {{ joinInfo() ? item[keyCodigo()] + ' - ' + item[keyDescri()] :\r\n item[keyDescri()]}}</option>\r\n }\r\n\r\n }\r\n </select>\r\n }\r\n\r\n @if (withBuscar()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" [disabled]=\"allDisabled()\" (click)=\"ejecutarAccion()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n }\r\n @if (withChangeInput()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" [disabled]=\"allDisabled()\" (click)=\"changeInputAction()\">\r\n <i [ngClass]=\"typeStandar() == 'select' ? 'fas fa-times' : 'fa solid fa-pen'\"></i>\r\n </button>\r\n }\r\n @if (invalidInput()) {\r\n <div class=\"infoBox\" @fadeInOut><i class=\"fas fa-exclamation-triangle fs-9 text-danger\"></i> Ocurri\u00F3 un\r\n error: El campo es obligatorio, aseg\u00FArese de ingresar datos v\u00E1lidos.</div>\r\n }\r\n\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if (textoAyuda() && typeStandar() == 'text-area') {\r\n<div class=\"d-flex flex-wrap justify-content-between align-items-center px-2\">\r\n <span class=\"text-error fs-6\">{{textoAyuda()}}</span>\r\n <span class=\"text-dark fs-6 fw-5\">{{ valueSize() }}/{{maxLength()}} caracteres</span>\r\n</div>\r\n}\r\n\r\n@if (sinAyuda() && typeStandar() == 'text-area') {\r\n<div class=\"d-flex flex-wrap justify-content-between align-items-center px-2\">\r\n <span class=\"text-error fs-6\"></span>\r\n <span class=\"text-dark fs-6 fw-5\">{{ valueSize() }}/{{maxLength()}} caracteres</span>\r\n</div>\r\n}", styles: [".text-error{color:#d60000!important;font-weight:700!important}@media (max-width: 442px){.d-flex{flex-direction:column!important;align-items:stretch!important}.infoBox{font-size:12px;padding:8px 12px;width:100%!important;max-width:100%!important}}@media (max-width: 900px){.infoBox{width:250px!important}}.infoBox{position:absolute;width:400px;top:calc(100% + 10px);left:0;right:0;margin-top:2px;background:#be0000d5;box-shadow:0 4px 12px #0003;border-radius:6px;padding:15px 12px;font-size:14px;color:#dbdbdb;z-index:10;font-size:12px;font-weight:600}.infoBox:before{content:\"\";position:absolute;top:-10px;left:20px;border-width:0 8px 10px 8px;border-style:solid;border-color:transparent transparent rgba(190,0,0,.835) transparent;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.1))}.input-error{border:1px solid rgb(203,0,0);color:#cb0000!important;animation:aura-pulse 1.5s ease-out infinite;position:relative;z-index:1}@keyframes aura-pulse{0%{box-shadow:0 0 #cb0000b3}70%{box-shadow:0 0 0 5px #cb000000}to{box-shadow:0 0 #cb000000}}\n"] }]
|
|
1350
|
+
args: [{ selector: 'app-input', imports: [FormsModule, CommonModule, DecimalDirective, OnlyNumberDirective, OnlyDayDirective, SwitchActivoComponent, OnlyNumberFlexDirective, CaracteresCodigoDirective], animations: [fadeInOut], template: "@if (isVertical()) {\r\n<label [ngClass]=\"{'text-error': isImportant()}\" for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n}\r\n<div class=\"d-flex align-items-{{position_row()}}\">\r\n @if (!isVertical()) {\r\n <label [ngClass]=\"{'text-error': isImportant()}\" for=\"{{'id_' + label()}}\" [style.min-width]=\"wlabel() + 'px'\"> {{label()}} @if (isRequired()) {<span\r\n class=\"fw-bold text-danger\">(*)</span>}</label>\r\n }\r\n <div class=\"flex-grow-1 me-2\">\r\n <div [ngClass]=\"{'d-block': typeStandar() == 'date','d-flex': typeStandar() != 'date', 'flex-column': showTopLabel() }\"\r\n class=\"position-relative\">\r\n \r\n @if (showTopLabel() && topLabelText()) {\r\n <div class=\"input-top-label\">\r\n <label class=\"fw-bold\">{{ topLabelText() }}</label>\r\n </div>\r\n }\r\n \r\n @if (!distintInputs.includes(typeStandar())) {\r\n <input [type]=\"typeStandar()\" (blur)=\"callBlur()\" (keyup.enter)=\"ejecutarAccion()\" (input)=\"keyup()?.()\"\r\n class=\"form-control text-{{position()}}\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\"\r\n (focus)=\"invalidInput.set(false)\" autocomplete=\"off\" [ngClass]=\"invalidInput() ? 'input-error' : ''\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\" [caracteresCodigo]=\"validaCodigo()\"\r\n name=\"{{'id_' + label()}}\" [attr.maxlength]=\"maxLength()\">\r\n }\r\n\r\n @if (typeStandar() == 'input-switch') {\r\n <div class=\"d-flex w-100\">\r\n <div class=\"flex-grow-1\">\r\n <input type=\"text\" class=\"form-control\" (blur)=\"callBlur()\" (input)=\"keyup()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"'text-' + position()\"\r\n [style.max-width.px]=\"maxWidth()\" [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\"\r\n id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" [caracteresCodigo]=\"validaCodigo()\"\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n </div>\r\n <div class=\"px-2\">\r\n <app-switch-activo valueOn=\"S\" valueOff=\"N\" [id]=\"label()\" [(model)]=\"value2\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (typeStandar() == 'number-format-decimal') {\r\n <input type=\"text\" class=\"form-control\" (blur)=\"callBlur()\" (input)=\"keyup()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"'text-' + position()\"\r\n [style.max-width.px]=\"maxWidth()\" [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\"\r\n id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" [appDecimal]=\"formatNumber()\" onlyNumberFlex\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n\r\n @if (typeStandar() == 'number-integer') {\r\n <input type=\"text\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\" (input)=\"keyup()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\"\r\n [ngClass]=\"invalidInput() ? 'input-error' : ''\" [disabled]=\"allDisabled() ? true : disabled()\"\r\n [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" onlyNumber\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n\r\n @if (typeStandar() == 'day') {\r\n <input type=\"text\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\" (input)=\"keyup()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\"\r\n [ngClass]=\"invalidInput() ? 'input-error' : ''\" [disabled]=\"allDisabled() ? true : disabled()\"\r\n [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\" onlyDay\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n\r\n @if (typeStandar() == 'date') {\r\n <input type=\"date\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\" (input)=\"keyup()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"invalidInput() ? 'input-error' : ''\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\"\r\n name=\"{{'id_' + label()}}\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n\r\n @if (typeStandar() == 'time') {\r\n <input type=\"time\" class=\"form-control text-{{position()}}\" (blur)=\"callBlur()\" (input)=\"keyup()?.()\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [ngClass]=\"invalidInput() ? 'input-error' : ''\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" id=\"{{'id_' + label()}}\"\r\n name=\"{{'id_' + label()}}\" (focus)=\"invalidInput.set(false)\">\r\n }\r\n\r\n @if (typeStandar() == 'text-area') {\r\n <textarea class=\"{{'text-' + position()}} form-area\"\r\n [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" id=\"{{'id_' + label()}}\" name=\"{{'id_' + label()}}\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" [(ngModel)]=\"value\" [rows]=\"alto()\"\r\n [attr.maxlength]=\"maxLength()\" (focus)=\"invalidInput.set(false)\">\r\n\r\n </textarea>\r\n }\r\n\r\n @if (typeStandar() == 'select') {\r\n <select class=\"form-select\" [attr.data-active-focus]=\"activeFocus() == false ? 'false' : ''\"\r\n [class.text-error]=\"isImportant()\"\r\n [style.--focus-border-color]=\"customBorderColor()\" [style.--focus-box-shadow]=\"customBoxShadow()\"\r\n [style.--focus-transition]=\"customTransition()\" [style.max-width.px]=\"maxWidth()\" [style.min-width.px]=\"maxWidth()\" [(ngModel)]=\"value\"\r\n [disabled]=\"allDisabled() ? true : disabled()\" id=\"{{'id_content' + label()}}\"\r\n name=\"{{'id_content' + label()}}\" (change)=\"emitirChange()\" (focus)=\"focusInput()\">\r\n @if (withTodos()) {\r\n <option [value]=\"typeKey() == 'number' ? -1 : ''\">Todos</option>\r\n }\r\n @for (item of lista(); track $index) {\r\n @if (!keyCodigo()) {\r\n <option [value]=\"item\"> {{ item }}</option>\r\n }\r\n @if (keyCodigo()) {\r\n <option [value]=\"item[keyCodigo()]\"> {{ joinInfo() ? item[keyCodigo()] + ' - ' + item[keyDescri()] :\r\n item[keyDescri()]}}</option>\r\n }\r\n\r\n }\r\n </select>\r\n }\r\n\r\n @if (withBuscar()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" [disabled]=\"allDisabled()\" (click)=\"ejecutarAccion()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n }\r\n @if (withChangeInput()) {\r\n <button class=\"btn btn-dark boton-buscar fs-7\" [disabled]=\"allDisabled()\" (click)=\"changeInputAction()\">\r\n <i [ngClass]=\"typeStandar() == 'select' ? 'fas fa-times' : 'fa solid fa-pen'\"></i>\r\n </button>\r\n }\r\n @if (invalidInput()) {\r\n <div class=\"infoBox\" @fadeInOut><i class=\"fas fa-exclamation-triangle fs-9 text-danger\"></i> Ocurri\u00F3 un\r\n error: El campo es obligatorio, aseg\u00FArese de ingresar datos v\u00E1lidos.</div>\r\n }\r\n\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if (textoAyuda() && typeStandar() == 'text-area') {\r\n<div class=\"d-flex flex-wrap justify-content-between align-items-center px-2\">\r\n <span class=\"text-error fs-6\">{{textoAyuda()}}</span>\r\n <span class=\"text-dark fs-6 fw-5\">{{ valueSize() }}/{{maxLength()}} caracteres</span>\r\n</div>\r\n}\r\n\r\n@if (sinAyuda() && typeStandar() == 'text-area') {\r\n<div class=\"d-flex flex-wrap justify-content-between align-items-center px-2\">\r\n <span class=\"text-error fs-6\"></span>\r\n <span class=\"text-dark fs-6 fw-5\">{{ valueSize() }}/{{maxLength()}} caracteres</span>\r\n</div>\r\n}", styles: [".text-error{color:#d60000!important;font-weight:700!important}@media (max-width: 442px){.d-flex{flex-direction:column!important;align-items:stretch!important}.infoBox{font-size:12px;padding:8px 12px;width:100%!important;max-width:100%!important}}@media (max-width: 900px){.infoBox{width:250px!important}}.infoBox{position:absolute;width:400px;top:calc(100% + 10px);left:0;right:0;margin-top:2px;background:#be0000d5;box-shadow:0 4px 12px #0003;border-radius:6px;padding:15px 12px;font-size:14px;color:#dbdbdb;z-index:10;font-size:12px;font-weight:600}.infoBox:before{content:\"\";position:absolute;top:-10px;left:20px;border-width:0 8px 10px 8px;border-style:solid;border-color:transparent transparent rgba(190,0,0,.835) transparent;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.1))}.input-error{border:1px solid rgb(203,0,0);color:#cb0000!important;animation:aura-pulse 1.5s ease-out infinite;position:relative;z-index:1}@keyframes aura-pulse{0%{box-shadow:0 0 #cb0000b3}70%{box-shadow:0 0 0 5px #cb000000}to{box-shadow:0 0 #cb000000}}\n"] }]
|
|
1157
1351
|
}], ctorParameters: () => [] });
|
|
1158
1352
|
|
|
1159
1353
|
class InputClaseComponent {
|
|
@@ -1168,7 +1362,7 @@ class InputClaseComponent {
|
|
|
1168
1362
|
return obtenerTipoClases(data);
|
|
1169
1363
|
}
|
|
1170
1364
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: InputClaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1171
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: InputClaseComponent, isStandalone: true, selector: "app-input-clase", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, wlabel: { classPropertyName: "wlabel", publicName: "wlabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onBlur: "onBlur", value: "valueChange" }, ngImport: i0, template: "\r\n<div class=\"col-md-8 pt-1\">\r\n @switch (tipoInput()) {\r\n @case ('vchar') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" [maxLength]=\"1\" (onBlur)=\"onBlur.emit()\" [wlabel]=\"wlabel()\" [(value)]=\"value\" />\r\n }\r\n @case ('vstrg') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" [maxLength]=\"80\" (onBlur)=\"onBlur.emit()\" [wlabel]=\"wlabel()\" [(value)]=\"value\"/>\r\n }\r\n @case ('ventero') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" position=\"end\" type=\"number-integer\" (onBlur)=\"onBlur.emit()\" [wlabel]=\"wlabel()\" [(value)]=\"value\"/>\r\n }\r\n @case ('vreal') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" position=\"end\" type=\"number-format-decimal\" (onBlur)=\"onBlur.emit()\" [wlabel]=\"wlabel()\" [(value)]=\"value\"/>\r\n }\r\n @case ('vdate') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" (onBlur)=\"onBlur.emit()\" type=\"date\" [wlabel]=\"wlabel()\" [(value)]=\"value\"/>\r\n }\r\n @case ('vtime') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" (onBlur)=\"onBlur.emit()\" type=\"date\" [wlabel]=\"wlabel()\" [(value)]=\"value\"/>\r\n }\r\n @case ('vglosa') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" (onBlur)=\"onBlur.emit()\" type=\"text-area\" [alto]=\"5\" [maxLength]=\"500\" [wlabel]=\"wlabel()\" [(value)]=\"value\"/>\r\n }\r\n @case ('codigo') {\r\n <app-doble-input [label]=\"title()\" [isRequired]=\"required()\" [tipoInput2]=\"2\" [withTodos]=\"false\" keyCodigo=\"codigo\" keyDescri=\"descri\" [lista]=\"item().codigos\" (onBlur)=\"onBlur.emit()\" [wlabel]=\"wlabel()\" [(value)]=\"value\"></app-doble-input>\r\n }\r\n }\r\n \r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: InputComponent, selector: "app-input", inputs: ["wlabel", "label", "placeholder", "withBuscar", "isRequired", "type", "position", "value", "position_row", "withChangeInput", "disabled", "isImportant", "lista", "keyCodigo", "keyDescri", "joinInfo", "withTodos", "allDisabled", "isVertical", "alto", "formatNumber", "blur", "invalidInput", "activeFocus", "customBorderColor", "customBoxShadow", "customTransition", "maxLength", "textoAyuda", "sinAyuda", "maxWidth", "firstItemDefault", "typeKey"], outputs: ["valueChange", "disabledChange", "allDisabledChange", "invalidInputChange", "accion", "changeInput"] }, { kind: "component", type: DobleInputComponent, selector: "app-doble-input", inputs: ["wlabel", "label", "withBuscar", "withBuscar2", "isRequired", "tipoInput2", "lista", "keyCodigo", "keyDescri", "joinInfo", "isVertical", "withTodos", "firstItemDefault", "disabled1", "disabled2", "value", "value2", "activeFocus", "customBorderColor", "customBoxShadow", "customTransition", "maxLength", "listName", "invalidInput", "blur1", "enter1", "blur2", "enter2", "typeKey", "
|
|
1365
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: InputClaseComponent, isStandalone: true, selector: "app-input-clase", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, wlabel: { classPropertyName: "wlabel", publicName: "wlabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onBlur: "onBlur", value: "valueChange" }, ngImport: i0, template: "\r\n<div class=\"col-md-8 pt-1\">\r\n @switch (tipoInput()) {\r\n @case ('vchar') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" [maxLength]=\"1\" (onBlur)=\"onBlur.emit()\" [wlabel]=\"wlabel()\" [(value)]=\"value\" />\r\n }\r\n @case ('vstrg') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" [maxLength]=\"80\" (onBlur)=\"onBlur.emit()\" [wlabel]=\"wlabel()\" [(value)]=\"value\"/>\r\n }\r\n @case ('ventero') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" position=\"end\" type=\"number-integer\" (onBlur)=\"onBlur.emit()\" [wlabel]=\"wlabel()\" [(value)]=\"value\"/>\r\n }\r\n @case ('vreal') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" position=\"end\" type=\"number-format-decimal\" (onBlur)=\"onBlur.emit()\" [wlabel]=\"wlabel()\" [(value)]=\"value\"/>\r\n }\r\n @case ('vdate') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" (onBlur)=\"onBlur.emit()\" type=\"date\" [wlabel]=\"wlabel()\" [(value)]=\"value\"/>\r\n }\r\n @case ('vtime') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" (onBlur)=\"onBlur.emit()\" type=\"date\" [wlabel]=\"wlabel()\" [(value)]=\"value\"/>\r\n }\r\n @case ('vglosa') {\r\n <app-input [label]=\"title()\" [isRequired]=\"required()\" (onBlur)=\"onBlur.emit()\" type=\"text-area\" [alto]=\"5\" [maxLength]=\"500\" [wlabel]=\"wlabel()\" [(value)]=\"value\"/>\r\n }\r\n @case ('codigo') {\r\n <app-doble-input [label]=\"title()\" [isRequired]=\"required()\" [tipoInput2]=\"2\" [withTodos]=\"false\" keyCodigo=\"codigo\" keyDescri=\"descri\" [lista]=\"item().codigos\" (onBlur)=\"onBlur.emit()\" [wlabel]=\"wlabel()\" [(value)]=\"value\"></app-doble-input>\r\n }\r\n }\r\n \r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: InputComponent, selector: "app-input", inputs: ["wlabel", "label", "placeholder", "withBuscar", "isRequired", "type", "position", "value", "value2", "position_row", "withChangeInput", "disabled", "isImportant", "lista", "keyCodigo", "keyDescri", "joinInfo", "withTodos", "allDisabled", "isVertical", "alto", "formatNumber", "blur", "enter", "keyup", "invalidInput", "activeFocus", "customBorderColor", "customBoxShadow", "customTransition", "maxLength", "textoAyuda", "sinAyuda", "maxWidth", "showTopLabel", "topLabelText", "firstItemDefault", "typeKey", "validaCodigo"], outputs: ["valueChange", "value2Change", "disabledChange", "allDisabledChange", "invalidInputChange", "accion", "changeInput"] }, { kind: "component", type: DobleInputComponent, selector: "app-doble-input", inputs: ["wlabel", "label", "withBuscar", "withBuscar2", "isRequired", "tipoInput2", "lista", "keyCodigo", "keyDescri", "joinInfo", "isVertical", "withTodos", "firstItemDefault", "disabled1", "disabled2", "value", "value2", "activeFocus", "customBorderColor", "customBoxShadow", "customTransition", "maxLength", "listName", "invalidInput", "blur1", "enter1", "blur2", "enter2", "typeKey", "withAdicionalInfo", "validaLista"], outputs: ["disabled1Change", "disabled2Change", "valueChange", "value2Change", "changeInput", "invalidInputChange", "accion1", "accion2"] }] });
|
|
1172
1366
|
}
|
|
1173
1367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: InputClaseComponent, decorators: [{
|
|
1174
1368
|
type: Component,
|
|
@@ -1179,7 +1373,7 @@ class InputDinamicoComponent {
|
|
|
1179
1373
|
inputs = input([]);
|
|
1180
1374
|
sender = model();
|
|
1181
1375
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: InputDinamicoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1182
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: InputDinamicoComponent, isStandalone: true, selector: "app-input-dinamico", inputs: { inputs: { classPropertyName: "inputs", publicName: "inputs", isSignal: true, isRequired: false, transformFunction: null }, sender: { classPropertyName: "sender", publicName: "sender", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sender: "senderChange" }, ngImport: i0, template: "@for (input of inputs(); track $index) {\r\n<div class=\"{{ input.class }}\">\r\n @switch (input.modelo) { \r\n @case ('input-buscar') {\r\n <!-- <app-doble-input-buscar\r\n label=\"{{ input.label }}\"\r\n [(disabled)]=\"input.disabled\"\r\n [isRequired]=\"input.required\"\r\n [wlabel]=\"input.wlabel\"\r\n [maxLength]=\"input.maxlen\"\r\n [(valuecod)]=\"sender()[input.fieldname]\"\r\n [type]=\"input.buscar\"\r\n [oneinput]=\"true\"\r\n [withBuscar2]=\"true\"\r\n [joinInfo]=\"input.joinInfo\"\r\n [withBuscar]=\"true\"\r\n [viewInput]=\"input.viewInput\"\r\n /> -->\r\n }\r\n @default {\r\n <app-input\r\n label=\"{{ input.label }}\"\r\n [(disabled)]=\"input.disabled\"\r\n [isRequired]=\"input.required\"\r\n [wlabel]=\"input.wlabel\"\r\n [maxLength]=\"input.maxlen\"\r\n [(value)]=\"sender()[input.fieldname]\"\r\n [position]=\"input.position\"\r\n [type]=\"input.type\"\r\n [lista]=\"input.lista\"\r\n [keyCodigo]=\"input.keyCodigo\"\r\n [keyDescri]=\"input.keyDescri\"\r\n [withTodos]=\"input.withTodos\"\r\n [joinInfo]=\"input.joinInfo\"\r\n />\r\n } \r\n\r\n }\r\n \r\n</div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: InputComponent, selector: "app-input", inputs: ["wlabel", "label", "placeholder", "withBuscar", "isRequired", "type", "position", "value", "position_row", "withChangeInput", "disabled", "isImportant", "lista", "keyCodigo", "keyDescri", "joinInfo", "withTodos", "allDisabled", "isVertical", "alto", "formatNumber", "blur", "invalidInput", "activeFocus", "customBorderColor", "customBoxShadow", "customTransition", "maxLength", "textoAyuda", "sinAyuda", "maxWidth", "firstItemDefault", "typeKey"], outputs: ["valueChange", "disabledChange", "allDisabledChange", "invalidInputChange", "accion", "changeInput"] }] });
|
|
1376
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: InputDinamicoComponent, isStandalone: true, selector: "app-input-dinamico", inputs: { inputs: { classPropertyName: "inputs", publicName: "inputs", isSignal: true, isRequired: false, transformFunction: null }, sender: { classPropertyName: "sender", publicName: "sender", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sender: "senderChange" }, ngImport: i0, template: "@for (input of inputs(); track $index) {\r\n<div class=\"{{ input.class }}\">\r\n @switch (input.modelo) { \r\n @case ('input-buscar') {\r\n <!-- <app-doble-input-buscar\r\n label=\"{{ input.label }}\"\r\n [(disabled)]=\"input.disabled\"\r\n [isRequired]=\"input.required\"\r\n [wlabel]=\"input.wlabel\"\r\n [maxLength]=\"input.maxlen\"\r\n [(valuecod)]=\"sender()[input.fieldname]\"\r\n [type]=\"input.buscar\"\r\n [oneinput]=\"true\"\r\n [withBuscar2]=\"true\"\r\n [joinInfo]=\"input.joinInfo\"\r\n [withBuscar]=\"true\"\r\n [viewInput]=\"input.viewInput\"\r\n /> -->\r\n }\r\n @default {\r\n <app-input\r\n label=\"{{ input.label }}\"\r\n [(disabled)]=\"input.disabled\"\r\n [isRequired]=\"input.required\"\r\n [wlabel]=\"input.wlabel\"\r\n [maxLength]=\"input.maxlen\"\r\n [(value)]=\"sender()[input.fieldname]\"\r\n [position]=\"input.position\"\r\n [type]=\"input.type\"\r\n [lista]=\"input.lista\"\r\n [keyCodigo]=\"input.keyCodigo\"\r\n [keyDescri]=\"input.keyDescri\"\r\n [withTodos]=\"input.withTodos\"\r\n [joinInfo]=\"input.joinInfo\"\r\n />\r\n } \r\n\r\n }\r\n \r\n</div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: InputComponent, selector: "app-input", inputs: ["wlabel", "label", "placeholder", "withBuscar", "isRequired", "type", "position", "value", "value2", "position_row", "withChangeInput", "disabled", "isImportant", "lista", "keyCodigo", "keyDescri", "joinInfo", "withTodos", "allDisabled", "isVertical", "alto", "formatNumber", "blur", "enter", "keyup", "invalidInput", "activeFocus", "customBorderColor", "customBoxShadow", "customTransition", "maxLength", "textoAyuda", "sinAyuda", "maxWidth", "showTopLabel", "topLabelText", "firstItemDefault", "typeKey", "validaCodigo"], outputs: ["valueChange", "value2Change", "disabledChange", "allDisabledChange", "invalidInputChange", "accion", "changeInput"] }] });
|
|
1183
1377
|
}
|
|
1184
1378
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: InputDinamicoComponent, decorators: [{
|
|
1185
1379
|
type: Component,
|
|
@@ -3968,7 +4162,9 @@ function throwIfEmptyArray() {
|
|
|
3968
4162
|
});
|
|
3969
4163
|
}
|
|
3970
4164
|
function handleEmptyResult(data, withFiltro, toast, message = 'No se encontraron resultados') {
|
|
3971
|
-
withFiltro
|
|
4165
|
+
if (withFiltro) {
|
|
4166
|
+
withFiltro.set(true);
|
|
4167
|
+
}
|
|
3972
4168
|
data.set([]);
|
|
3973
4169
|
toast.warning('Advertencia', message);
|
|
3974
4170
|
}
|
|
@@ -4008,5 +4204,5 @@ function handleResetNoSignal(reset, page, sender) {
|
|
|
4008
4204
|
* Generated bundle index. Do not edit.
|
|
4009
4205
|
*/
|
|
4010
4206
|
|
|
4011
|
-
export { AlertConfirmationComponent, AlertConfirmationConfig, AlertConfirmationService, AlertErrorComponent, AlertErrorService, AlertService, AlertaComponent, Almacenes, AutocompleteComponent, AutocompleteV2Component, BadgeComponent, ButtonComponent, ButtonProperties, CardMobileComponent, CheckBoxComponent, Cobradores, DetalleCreditoComponent, DetalleDocumentosCab, Direcciones, DobleInputComponent, DropdownCdkComponent, DropdownComponent, DropdownMenuComponent, DropdownOption, FormateadorService, HeaderComponent, InputClaseComponent, InputComponent, InputDinamicoComponent, InputRadioComponent, ListOptionComponent, ListSituacionesComponent, MaterialesCotizacion, MdGenericoComponent, Monedas, MontosCalcularComponent, Motivos, MultiSelectDropdownComponent, MultiselectedComponent, NavTabsComponent, PaginadorComponent, RadioComponent, Recursos, Series, SidebarComponent, SpinnerComponent, SwitchComponent, TBanco, TabItemComponent, TableAdvanceComponent, TableAdvanceOptimizadaComponent, TableBusquedaComponent, TableData, TableDetalleComponent, TableSimpleComponent, TipoDocumento, ToastService, ToasterComponent, Transportista, Vendedor, getInputsObligatorios, handleEmptyResult, handleErrorsApi, handleReset, handleResetNoSignal, handleSuccessApi, handleSuccessResult, throwIfEmptyArray, validaFecha, validaLista, validaPeriodo, validaPosicion, validaTipo, validarSituacion };
|
|
4207
|
+
export { AlertConfirmationComponent, AlertConfirmationConfig, AlertConfirmationService, AlertErrorComponent, AlertErrorService, AlertService, AlertaComponent, Almacenes, AutocompleteComponent, AutocompleteV2Component, BadgeComponent, ButtonComponent, ButtonProperties, CardMobileComponent, CheckBoxComponent, Cobradores, DetalleCreditoComponent, DetalleDocumentosCab, Direcciones, DobleInputComponent, DropdownCdkComponent, DropdownComponent, DropdownMenuComponent, DropdownOption, FormateadorService, HeaderComponent, InputClaseComponent, InputComponent, InputDinamicoComponent, InputRadioComponent, ListOptionComponent, ListSituacionesComponent, MaterialesCotizacion, MdGenericoComponent, Monedas, MontosCalcularComponent, Motivos, MultiSelectDropdownComponent, MultiselectedComponent, NavTabsComponent, PaginadorComponent, RadioComponent, Recursos, Series, SidebarComponent, SpinnerComponent, SwitchActivoComponent, SwitchComponent, TBanco, TabItemComponent, TableAdvanceComponent, TableAdvanceOptimizadaComponent, TableBusquedaComponent, TableData, TableDetalleComponent, TableSimpleComponent, TipoDocumento, ToastService, ToasterComponent, Transportista, Vendedor, getInputsObligatorios, handleEmptyResult, handleErrorsApi, handleReset, handleResetNoSignal, handleSuccessApi, handleSuccessResult, throwIfEmptyArray, validaFecha, validaLista, validaPeriodo, validaPosicion, validaTipo, validarSituacion };
|
|
4012
4208
|
//# sourceMappingURL=ng-components-tsi.mjs.map
|