sf-crud 13.2.61 → 13.2.63
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/sf-crud.mjs
CHANGED
|
@@ -441,7 +441,17 @@ class SfCrudService {
|
|
|
441
441
|
* @param conditions
|
|
442
442
|
* @param index
|
|
443
443
|
*/
|
|
444
|
-
isConditionsCompleted(iConditions, conditions, data) {
|
|
444
|
+
isConditionsCompleted(iConditions, conditions, data, evaluator = 'AND') {
|
|
445
|
+
if (evaluator === 'OR') {
|
|
446
|
+
let cumple = false;
|
|
447
|
+
iConditions.forEach(iCond => {
|
|
448
|
+
const c = Condition.instanceContidion(iCond, conditions);
|
|
449
|
+
let dataToEvaluate = c.indexData !== undefined ? this._dataSet[c.indexData] : data;
|
|
450
|
+
if (c.isValid(dataToEvaluate))
|
|
451
|
+
cumple = true;
|
|
452
|
+
});
|
|
453
|
+
return cumple;
|
|
454
|
+
}
|
|
445
455
|
let cumple = true;
|
|
446
456
|
iConditions.forEach(iCond => {
|
|
447
457
|
const c = Condition.instanceContidion(iCond, conditions);
|
|
@@ -2877,9 +2887,9 @@ class FormComponent {
|
|
|
2877
2887
|
isAddressDialog = false;
|
|
2878
2888
|
separador;
|
|
2879
2889
|
showCss = true;
|
|
2890
|
+
registro;
|
|
2880
2891
|
newAddress;
|
|
2881
2892
|
currentAddress;
|
|
2882
|
-
registro;
|
|
2883
2893
|
values;
|
|
2884
2894
|
controls;
|
|
2885
2895
|
controlsLoaded = false;
|
|
@@ -2948,7 +2958,7 @@ class FormComponent {
|
|
|
2948
2958
|
if (this.isAddressDialog)
|
|
2949
2959
|
this.newAddress = this.crudService.armarNuevaDireccion("string", this.data, this.crudService.getValue("$..separador", this.data));
|
|
2950
2960
|
this.uiEsquema.elements.forEach((layout, i) => {
|
|
2951
|
-
let isVisible = layout.conditions ? this.crudService.isConditionsCompleted(layout.conditions, this.registro.conditions || [], this.data) : true;
|
|
2961
|
+
let isVisible = layout.conditions ? this.crudService.isConditionsCompleted(layout.conditions, this.registro.conditions || [], this.data, layout.conditionsEvaluator ?? 'AND') : true;
|
|
2952
2962
|
this.visible.push(layout.elements ? layout.elements.map(() => isVisible) : [isVisible]);
|
|
2953
2963
|
this.controls.push([]);
|
|
2954
2964
|
this.values.push([]);
|
|
@@ -3277,7 +3287,7 @@ class FormComponent {
|
|
|
3277
3287
|
this.setValue(value.data, value.scope, i, j, k);
|
|
3278
3288
|
}
|
|
3279
3289
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormComponent, deps: [{ token: SfCrudService }, { token: i2$1.DomSanitizer }, { token: StepService }, { token: i4$1.AdoService }, { token: i4$1.JWTService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3280
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FormComponent, isStandalone: true, selector: "app-form", inputs: { uiEsquema: "uiEsquema", esquema: "esquema", data: "data", isDialog: "isDialog", isAddressDialog: "isAddressDialog", separador: "separador", showCss: "showCss" }, host: { properties: { "style.--primary-color": "this.color", "style.--secondary-color": "this.color2", "style.--button-color": "this.colorButton" } }, viewQueries: [{ propertyName: "tooltips", predicate: Tooltip, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"controlsLoaded\" class=\"frm-container\">\r\n <ng-container *ngIf=\"isAddressDialog && currentAddress\">\r\n Direcci\u00F3n actual: {{currentAddress | formatAddress: separador}}\r\n <br>\r\n </ng-container>\r\n <br>\r\n <ng-container *ngIf=\"isAddressDialog\">\r\n Direcci\u00F3n nueva: {{newAddress | formatAddress: separador}}\r\n </ng-container>\r\n <p-fluid>\r\n <div *ngFor=\"let element of uiEsquema.elements; let i = index\" [class]=\"element?.class\" #a>\r\n <ng-container [ngSwitch]=\"element.type\" *ngIf=\"visible[i][0]\">\r\n <div class=\"label\" *ngSwitchCase=\"'Label'\" [style]=\"element?.style\">\r\n {{element?.label}}\r\n </div>\r\n <ng-container *ngSwitchCase=\"'HorizontalLayout'\">\r\n <div *ngFor=\"let el of element.elements; let j =index\" [class]=\"el?.class\"\r\n [class.hidden]=\"el.hidden || false\" [style.display]=\"el.hide ? 'none' : null\">\r\n <ng-container [ngSwitch]=\"el.type\" *ngIf=\"visible[i][j]\">\r\n <sf-control *ngSwitchCase=\"'Control'\" [control]=\"controls[i][j]\" [label]=\"el.label\"\r\n [value]=\"values[i][j]\" (setValue)=\"setValue($event, el.scope, i, j)\"\r\n (sendNotification)=\"sendNotification($event)\"\r\n (sendObject)=\"applyValuesFromObject($event)\"\r\n (addressClicked)=\"openPopUpDireccion(el.scope)\" [showCssClass]=\"showCss\"\r\n (setDependencyValue)=\"setDependencyValue($event, i, j, 0)\"></sf-control>\r\n <div *ngSwitchCase=\"'Texto'\" [ngStyle]=\"{'height': '100%', 'margin-block': 'auto'}\">\r\n <p>{{el.label}}</p>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'VerticalLayout'\">\r\n <div *ngFor=\"let el of element.elements; let j =index\" [class]=\"el?.class\"\r\n [class.hidden]=\"el.hidden || false\" [style.display]=\"el.hide ? 'none' : null\">\r\n <ng-container [ngSwitch]=\"el.type\" *ngIf=\"visible[i][j]\">\r\n <sf-control *ngSwitchCase=\"'Control'\" [control]=\"controls[i][j]\" [label]=\"el.label\"\r\n [value]=\"values[i][j]\" (setValue)=\"setValue($event, el.scope, i, j)\"\r\n (sendNotification)=\"sendNotification($event)\"\r\n (sendObject)=\"applyValuesFromObject($event)\"\r\n (addressClicked)=\"openPopUpDireccion(el.scope)\" [showCssClass]=\"showCss\"></sf-control>\r\n <div *ngSwitchCase=\"'PDF'\" class=\"pdf\">\r\n <iframe [src]=\"values[i][j]\" frameborder=\"0\" allow=\"geolocation *; camera *;\"></iframe>\r\n </div>\r\n <div *ngSwitchCase=\"'PDF-SIGN'\">\r\n <sf-sign *ngIf=\"data?.pdf?.id\" [allowDownload]=\"true\" [idkatios]=\"idKatios\" [tdoc]=\"data.pdf.tdoc\" [ndoc]=\"data.pdf.ndoc\"\r\n [idDocument]=\"data.pdf.id\" [typeDocument]=\"data.pdf.idDoc\"\r\n (stateDocument)=\"onStateDocument($event)\"></sf-sign>\r\n </div>\r\n <ng-container *ngSwitchCase=\"'SIMULADOR'\">\r\n <sf-simulador [simulador]=\"data\" [otherToolTips]=\"data.otherTooltips\"\r\n (simuladorChange)=\"onSimuladorChange($event)\" (enProceso)=\"emitLoadingForm($event)\"></sf-simulador>\r\n </ng-container>\r\n <div *ngSwitchCase=\"'ADO'\" class=\"buttons\">\r\n <p-button *ngIf=\"!data?.ADO?.dataProceso?.idProceso\" [ngStyle]=\"el?.ngStyle\" (click)=\"goToADO()\" label=\"Validar identidad\"></p-button>\r\n </div>\r\n <div *ngSwitchCase=\"'ADO'\">\r\n <div *ngIf=\"data?.ADO?.dataProceso?.idProceso\">\r\n <div class=\"data-ado-container\">\r\n <ng-container *ngIf=\"proceso\">\r\n <i *ngIf=\"proceso?.respuestaProceso?.EsExitoso === true\" pTooltip=\"Validado\" tooltipPosition=\"top\" id=\"Validado\" class=\"pi pi-user\" style=\"color: green\"\r\n (touchstart)=\"onTouchDescription('Validado', false)\" (touchend)=\"onUnTouchDescription('Validado')\"></i>\r\n <i *ngIf=\"proceso?.respuestaProceso?.EsExitoso === false\" pTooltip=\"No validado\" tooltipPosition=\"top\" id=\"No-Validado\" class=\"pi pi-user\" style=\"color: red\"\r\n (touchstart)=\"onTouchDescription('No-Validado', false)\" (touchend)=\"onUnTouchDescription('No-Validado')\"></i>\r\n <i *ngIf=\"!proceso?.respuestaProceso\" pTooltip=\"Sin validar\" tooltipPosition=\"top\" class=\"pi pi-user\" id=\"Sin-Validar\" style=\"color: gray\"\r\n (touchstart)=\"onTouchDescription('Sin-Validar', false)\" (touchend)=\"onUnTouchDescription('Sin-Validar')\"></i>\r\n </ng-container>\r\n <div class=\"buttons\">\r\n <button pButton icon=\"pi pi-external-link\" (click)=\"goToADO()\" pTooltip=\"Abrir\" [disabled]=\"!proceso\"></button>\r\n <button pButton icon=\"pi pi-copy\" (click)=\"copyToClipboard(proceso.id)\" pTooltip=\"Copiar\" [disabled]=\"!proceso\"></button>\r\n <button pButton icon=\"pi pi-refresh\" (click)=\"refreshIntegracion(proceso.id)\" pTooltip=\"Refrescar\" [disabled]=\"!proceso\"></button>\r\n </div>\r\n </div>\r\n <p class=\"result-ado\" *ngIf=\"proceso && !proceso.respuestaProceso && proceso.estado == 'PROCESANDO'\">Procesando</p>\r\n <p class=\"result-ado\" *ngIf=\"proceso && proceso.respuestaProceso && proceso.estado == 'TERMINADO'\">{{proceso.respuestaProceso.Detalle ?? proceso.respuestaProceso.Mensaje}}</p>\r\n </div>\r\n </div>\r\n <ng-container *ngSwitchCase=\"'Table'\">\r\n <p-table [value]=\"values[i][j]\" [columns]=\"controls[i][j].config.columns\">\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"flex align-items-center justify-content-between\">\r\n <button pButton pRipple icon=\"pi pi-plus\" (click)=\"addObjectArray(el)\"\r\n class=\"p-button-success\" [disabled]=\"controls[i][j].disabled === true\"></button>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th *ngFor=\"let col of columns\">\r\n {{col.label}}\r\n </th>\r\n <th *ngIf=\"el.signAction\">{{el.signAction.label || 'Firma'}}</th>\r\n <ng-container>\r\n <th></th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowIndex=\"rowIndex\">\r\n <tr>\r\n <ng-container *ngFor=\"let col of columns\" [ngSwitch]=\"col.type\">\r\n <ng-container *ngSwitchCase=\"'control'\">\r\n <sf-control [control]=\"extracControlFromTableElements(i, j, col)\" [label]=\"\"\r\n [value]=\"extracValueFromTableElements(i, j, rowIndex, col)\"\r\n (sendNotification)=\"sendNotification($event)\"\r\n (sendObject)=\"applyValuesFromObject($event, rowIndex)\"\r\n (setValue)=\"setValue($event, extracValueFromTableElements(i, j, rowIndex, col).scope, i, j)\"\r\n [showTempValue]=\"true\" [showCssClass]=\"showCss\"\r\n >\r\n </sf-control>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <td>{{rowData[col.col]}}</td>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'address'\">\r\n <td>{{rowData[col.col] | formatAddress: extracControlFromTableElements(i, j, col).separador }}</td>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'currency:USD'\">\r\n <td>{{rowData[col.col] | currency: 'USD'}}</td>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date:yyyy-mm-dd'\">\r\n <td>{{rowData[col.col] | date: 'yyyy-mm-dd'}}</td>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date:dd/mm/yyyy'\">\r\n <td>{{rowData[col.col] | date: 'dd/MM/yyyy'}}</td>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <td>\r\n <i *ngIf=\"rowData[col.col]\" class=\"pi pi-check\"></i>\r\n <i *ngIf=\"!rowData[col.col]\" class=\"pi pi-times\"></i>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"el.signAction\">\r\n <td class=\"sign-action-cell\">\r\n <ng-container *ngIf=\"!rowData[el.signAction.signedField || 'signed']; else signedButton\">\r\n <a [href]=\"rowData[el.signAction.urlField || 'signUrl'] || '#'\" target=\"_blank\">\r\n <button pButton pRipple type=\"button\"\r\n class=\"p-button-rounded p-button-danger\"\r\n icon=\"pi pi-file-edit\"\r\n pTooltip=\"Firmar documento\"\r\n tooltipPosition=\"top\"></button>\r\n </a>\r\n </ng-container>\r\n <ng-template #signedButton>\r\n <button pButton pRipple type=\"button\"\r\n class=\"p-button-rounded p-button-success\"\r\n icon=\"pi pi-file-edit\"\r\n pTooltip=\"Documento firmado\"\r\n tooltipPosition=\"top\"\r\n disabled></button>\r\n </ng-template>\r\n <button pButton pRipple type=\"button\"\r\n class=\"p-button-rounded p-button-secondary ml-1\"\r\n icon=\"pi pi-refresh\"\r\n pTooltip=\"Verificar estado\"\r\n tooltipPosition=\"top\"\r\n (click)=\"onRowSignRefresh(el, rowData, rowIndex)\"></button>\r\n </td>\r\n </ng-container>\r\n <ng-container>\r\n <td>\r\n <button pButton pRipple type=\"button\"\r\n (click)=\"editRow(el, rowData, rowIndex)\" icon=\"pi pi-pencil\"\r\n class=\"p-button-rounded p-button-info mr-1\"></button>\r\n <button pButton pRipple type=\"button\" (click)=\"deleteRow(el, rowIndex)\" [disabled]=\"controls[i][j].disabled === true\"\r\n icon=\"pi pi-trash\" class=\"p-button-rounded p-button-danger\"></button>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'ArrayLayout'\">\r\n <div *ngFor=\"let arrayItem of getArrayItems(element.scope); let arrayIndex = index\" [ngClass]=\"element.classElements || 'flex align-items-center w-full'\">\r\n <div *ngFor=\"let el of element.elements; let j =index\" [class]=\"el?.class\"\r\n [class.hidden]=\"el.hidden || false\" [style.display]=\"el.hide ? 'none' : null\">\r\n <ng-container [ngSwitch]=\"el.type\">\r\n <sf-control *ngSwitchCase=\"'Control'\" [control]=\"getControl(el,arrayIndex)\" [label]=\"el.label\"\r\n [value]=\"values[i][j] || getValueFromData(element,el,arrayIndex)\" (setValue)=\"setValue($event, el.scope, i, j,arrayIndex)\"\r\n (sendNotification)=\"sendNotification($event)\"\r\n (sendObject)=\"applyValuesFromObject($event, arrayIndex)\"\r\n (addressClicked)=\"openPopUpDireccion(el.scope)\"\r\n (setDependencyValue)=\"setDependencyValue($event, i, j, arrayIndex)\" [showCssClass]=\"showCss\"></sf-control>\r\n </ng-container>\r\n </div>\r\n <p-button *ngIf=\"element.deleteButton && !(element.deleteButton.hide?.index === arrayIndex)\" [icon]=\"element.deleteButton.icon\" [rounded]=\"element.deleteButton.rounded || false\" [text]=\"element.deleteButton.text || true\" [severity]=\"element.deleteButton.severity || 'danger'\" (click)=\"removeArrayItem(element, i, arrayIndex)\" \r\n [label]=\"element.deleteButton.label\" />\r\n </div>\r\n <div class=\"col-12\">\r\n <div *ngIf=\"element.addButton\" class=\"flex items-center justify-content-between mb-2\">\r\n <p-button [icon]=\"element.addButton.icon\" [label]=\"element.addButton.label\" (click)=\"addArrayItem(element, i)\" [severity]=\"element.addButton.severity || 'primary'\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </p-fluid>\r\n</div>\r\n\r\n<!-- <p-toast *ngIf=\"isDialog\"></p-toast> -->\r\n", styles: [".disabled-link{pointer-events:none;cursor:default}:not(.col-12) .label{display:flex;justify-content:center;align-items:center;padding-inline:.5rem;margin-bottom:15px;margin-top:20px;border-radius:13px;font-size:18px;font-size:inherit;background-color:var(--primary-color);text-align:center;color:var(--normal-text-color)}.pdf{display:flex;width:100%;height:80vh;& iframe{width:80%;margin-inline:10%}}.data-ado-container{display:flex;margin-inline:auto;align-items:center;width:fit-content;>*{margin-inline:4px}>div{display:flex;align-items:center;>*{margin-inline:4px}}}i.pi-user{font-size:2rem}.result-ado{min-height:1rem;text-align:center}sf-simulador{display:flow-root;width:80%;margin-inline:auto;margin-bottom:35px}sf-sign{display:block;margin-inline:auto;width:80%;& pdf-viewer{min-height:130vh!important;max-height:130vh!important}}.buttons{display:flex;justify-content:space-evenly}::ng-deep *{box-shadow:none}.frm-container ::ng-deep .p-inputtext:focus,.frm-container ::ng-deep .p-inputtext:active,.frm-container ::ng-deep .p-inputwrapper:focus,.frm-container ::ng-deep .p-inputwrapper:active{border-color:var(--button-color)}.frm-container ::ng-deep :not(:disabled):active,.frm-container ::ng-deep :not(.p-disabled) .p-inputtext:hover,.frm-container ::ng-deep :not(.p-disabled) .p-inputwrapper:hover,.frm-container ::ng-deep :not(.p-disabled) .p-inputwrapper-focus,.frm-container ::ng-deep .p-radiobutton-box .p-highlight,.frm-container ::ng-deep .p-radiobutton .p-radiobutton-box:not(.p-disabled):hover{border-color:var(--button-color)}.frm-container ::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{background:var(--button-color);border-color:var(--button-color)!important}@media screen and (max-width:765px){:not(.col-12) .label{height:fit-content}.field{margin-bottom:.5rem}.pdf>iframe{width:100%;margin-inline:0}sf-sign{width:100%;& pdf-viewer{min-height:60vh!important;max-height:120vh!important}}sf-simulador{display:block;width:100%;margin-inline:auto}.data-ado-container{text-align:center;.buttons{max-width:80vw;flex-direction:row}}.buttons{flex-direction:column;align-items:center}}.frm-container ::ng-deep .p-radiobutton .p-radiobutton-box:not(.p-disabled):not(.p-highlight):hover{border-color:var(--secondary-color)!important}.frm-container ::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight:not(.p-disabled):hover{color:var(--secondary-color)!important}.frm-container ::ng-deep .p-radiobutton .p-radiobutton-box:not(.p-disabled).p-focus{box-shadow:inset 0 0 0 1px var(--secondary-color)!important}.frm-container ::ng-deep .p-radiobutton .p-radiobutton-box .p-radiobutton-icon{background-color:#fff}.frm-container ::ng-deep .p-slider:not(.p-disabled):hover{background-color:#e5e7eb}.frm-container ::ng-deep .p-slider{background-color:#e5e7eb}.frm-container ::ng-deep .p-slider:not(.p-disabled):hover .p-slider-range{background-color:var(--primary-color)!important}.frm-container ::ng-deep .p-slider:not(.p-disabled):hover .p-slider-handle{border-color:var(--primary-color)!important}\n"], dependencies: [{ kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "pipe", type: i5.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i5.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: FluidModule }, { kind: "component", type: i6$1.Fluid, selector: "p-fluid" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "component", type: i7.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i5$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "component", type: ControlComponent, selector: "sf-control", inputs: ["showTempValue", "control", "label", "value", "appendTo", "showCssClass", "environment", "context", "disabled"], outputs: ["setValue", "sendObject", "addressClicked", "setDependencyValue"] }, { kind: "ngmodule", type: SfPdfsignModule }, { kind: "component", type: i10$1.SignComponent, selector: "sf-sign", inputs: ["idkatios", "tdoc", "ndoc", "idDocument", "typeDocument", "allowDownload"], outputs: ["stateDocument", "loading"] }, { kind: "ngmodule", type: SfSimuladorModule }, { kind: "component", type: i6$2.SfSimuladorComponent, selector: "sf-simulador", inputs: ["simulador", "otherToolTips", "labels"], outputs: ["simuladorChange", "enProceso"] }] });
|
|
3290
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FormComponent, isStandalone: true, selector: "app-form", inputs: { uiEsquema: "uiEsquema", esquema: "esquema", data: "data", isDialog: "isDialog", isAddressDialog: "isAddressDialog", separador: "separador", showCss: "showCss", registro: "registro" }, host: { properties: { "style.--primary-color": "this.color", "style.--secondary-color": "this.color2", "style.--button-color": "this.colorButton" } }, viewQueries: [{ propertyName: "tooltips", predicate: Tooltip, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"controlsLoaded\" class=\"frm-container\">\r\n <ng-container *ngIf=\"isAddressDialog && currentAddress\">\r\n Direcci\u00F3n actual: {{currentAddress | formatAddress: separador}}\r\n <br>\r\n </ng-container>\r\n <br>\r\n <ng-container *ngIf=\"isAddressDialog\">\r\n Direcci\u00F3n nueva: {{newAddress | formatAddress: separador}}\r\n </ng-container>\r\n <p-fluid>\r\n <div *ngFor=\"let element of uiEsquema.elements; let i = index\" [class]=\"element?.class\" #a>\r\n <ng-container [ngSwitch]=\"element.type\" *ngIf=\"visible[i][0]\">\r\n <div class=\"label\" *ngSwitchCase=\"'Label'\" [style]=\"element?.style\">\r\n {{element?.label}}\r\n </div>\r\n <ng-container *ngSwitchCase=\"'HorizontalLayout'\">\r\n <div *ngFor=\"let el of element.elements; let j =index\" [class]=\"el?.class\"\r\n [class.hidden]=\"el.hidden || false\" [style.display]=\"el.hide ? 'none' : null\">\r\n <ng-container [ngSwitch]=\"el.type\" *ngIf=\"visible[i][j]\">\r\n <sf-control *ngSwitchCase=\"'Control'\" [control]=\"controls[i][j]\" [label]=\"el.label\"\r\n [value]=\"values[i][j]\" (setValue)=\"setValue($event, el.scope, i, j)\"\r\n (sendNotification)=\"sendNotification($event)\"\r\n (sendObject)=\"applyValuesFromObject($event)\"\r\n (addressClicked)=\"openPopUpDireccion(el.scope)\" [showCssClass]=\"showCss\"\r\n (setDependencyValue)=\"setDependencyValue($event, i, j, 0)\"></sf-control>\r\n <div *ngSwitchCase=\"'Texto'\" [ngStyle]=\"{'height': '100%', 'margin-block': 'auto'}\">\r\n <p>{{el.label}}</p>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'VerticalLayout'\">\r\n <div *ngFor=\"let el of element.elements; let j =index\" [class]=\"el?.class\"\r\n [class.hidden]=\"el.hidden || false\" [style.display]=\"el.hide ? 'none' : null\">\r\n <ng-container [ngSwitch]=\"el.type\" *ngIf=\"visible[i][j]\">\r\n <sf-control *ngSwitchCase=\"'Control'\" [control]=\"controls[i][j]\" [label]=\"el.label\"\r\n [value]=\"values[i][j]\" (setValue)=\"setValue($event, el.scope, i, j)\"\r\n (sendNotification)=\"sendNotification($event)\"\r\n (sendObject)=\"applyValuesFromObject($event)\"\r\n (addressClicked)=\"openPopUpDireccion(el.scope)\" [showCssClass]=\"showCss\"></sf-control>\r\n <div *ngSwitchCase=\"'PDF'\" class=\"pdf\">\r\n <iframe [src]=\"values[i][j]\" frameborder=\"0\" allow=\"geolocation *; camera *;\"></iframe>\r\n </div>\r\n <div *ngSwitchCase=\"'PDF-SIGN'\">\r\n <sf-sign *ngIf=\"data?.pdf?.id\" [allowDownload]=\"true\" [idkatios]=\"idKatios\" [tdoc]=\"data.pdf.tdoc\" [ndoc]=\"data.pdf.ndoc\"\r\n [idDocument]=\"data.pdf.id\" [typeDocument]=\"data.pdf.idDoc\"\r\n (stateDocument)=\"onStateDocument($event)\"></sf-sign>\r\n </div>\r\n <ng-container *ngSwitchCase=\"'SIMULADOR'\">\r\n <sf-simulador [simulador]=\"data\" [otherToolTips]=\"data.otherTooltips\"\r\n (simuladorChange)=\"onSimuladorChange($event)\" (enProceso)=\"emitLoadingForm($event)\"></sf-simulador>\r\n </ng-container>\r\n <div *ngSwitchCase=\"'ADO'\" class=\"buttons\">\r\n <p-button *ngIf=\"!data?.ADO?.dataProceso?.idProceso\" [ngStyle]=\"el?.ngStyle\" (click)=\"goToADO()\" label=\"Validar identidad\"></p-button>\r\n </div>\r\n <div *ngSwitchCase=\"'ADO'\">\r\n <div *ngIf=\"data?.ADO?.dataProceso?.idProceso\">\r\n <div class=\"data-ado-container\">\r\n <ng-container *ngIf=\"proceso\">\r\n <i *ngIf=\"proceso?.respuestaProceso?.EsExitoso === true\" pTooltip=\"Validado\" tooltipPosition=\"top\" id=\"Validado\" class=\"pi pi-user\" style=\"color: green\"\r\n (touchstart)=\"onTouchDescription('Validado', false)\" (touchend)=\"onUnTouchDescription('Validado')\"></i>\r\n <i *ngIf=\"proceso?.respuestaProceso?.EsExitoso === false\" pTooltip=\"No validado\" tooltipPosition=\"top\" id=\"No-Validado\" class=\"pi pi-user\" style=\"color: red\"\r\n (touchstart)=\"onTouchDescription('No-Validado', false)\" (touchend)=\"onUnTouchDescription('No-Validado')\"></i>\r\n <i *ngIf=\"!proceso?.respuestaProceso\" pTooltip=\"Sin validar\" tooltipPosition=\"top\" class=\"pi pi-user\" id=\"Sin-Validar\" style=\"color: gray\"\r\n (touchstart)=\"onTouchDescription('Sin-Validar', false)\" (touchend)=\"onUnTouchDescription('Sin-Validar')\"></i>\r\n </ng-container>\r\n <div class=\"buttons\">\r\n <button pButton icon=\"pi pi-external-link\" (click)=\"goToADO()\" pTooltip=\"Abrir\" [disabled]=\"!proceso\"></button>\r\n <button pButton icon=\"pi pi-copy\" (click)=\"copyToClipboard(proceso.id)\" pTooltip=\"Copiar\" [disabled]=\"!proceso\"></button>\r\n <button pButton icon=\"pi pi-refresh\" (click)=\"refreshIntegracion(proceso.id)\" pTooltip=\"Refrescar\" [disabled]=\"!proceso\"></button>\r\n </div>\r\n </div>\r\n <p class=\"result-ado\" *ngIf=\"proceso && !proceso.respuestaProceso && proceso.estado == 'PROCESANDO'\">Procesando</p>\r\n <p class=\"result-ado\" *ngIf=\"proceso && proceso.respuestaProceso && proceso.estado == 'TERMINADO'\">{{proceso.respuestaProceso.Detalle ?? proceso.respuestaProceso.Mensaje}}</p>\r\n </div>\r\n </div>\r\n <ng-container *ngSwitchCase=\"'Table'\">\r\n <p-table [value]=\"values[i][j]\" [columns]=\"controls[i][j].config.columns\">\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"flex align-items-center justify-content-between\">\r\n <button pButton pRipple icon=\"pi pi-plus\" (click)=\"addObjectArray(el)\"\r\n class=\"p-button-success\" [disabled]=\"controls[i][j].disabled === true\"></button>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th *ngFor=\"let col of columns\">\r\n {{col.label}}\r\n </th>\r\n <th *ngIf=\"el.signAction\">{{el.signAction.label || 'Firma'}}</th>\r\n <ng-container>\r\n <th></th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowIndex=\"rowIndex\">\r\n <tr>\r\n <ng-container *ngFor=\"let col of columns\" [ngSwitch]=\"col.type\">\r\n <ng-container *ngSwitchCase=\"'control'\">\r\n <sf-control [control]=\"extracControlFromTableElements(i, j, col)\" [label]=\"\"\r\n [value]=\"extracValueFromTableElements(i, j, rowIndex, col)\"\r\n (sendNotification)=\"sendNotification($event)\"\r\n (sendObject)=\"applyValuesFromObject($event, rowIndex)\"\r\n (setValue)=\"setValue($event, extracValueFromTableElements(i, j, rowIndex, col).scope, i, j)\"\r\n [showTempValue]=\"true\" [showCssClass]=\"showCss\"\r\n >\r\n </sf-control>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <td>{{rowData[col.col]}}</td>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'address'\">\r\n <td>{{rowData[col.col] | formatAddress: extracControlFromTableElements(i, j, col).separador }}</td>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'currency:USD'\">\r\n <td>{{rowData[col.col] | currency: 'USD'}}</td>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date:yyyy-mm-dd'\">\r\n <td>{{rowData[col.col] | date: 'yyyy-mm-dd'}}</td>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date:dd/mm/yyyy'\">\r\n <td>{{rowData[col.col] | date: 'dd/MM/yyyy'}}</td>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <td>\r\n <i *ngIf=\"rowData[col.col]\" class=\"pi pi-check\"></i>\r\n <i *ngIf=\"!rowData[col.col]\" class=\"pi pi-times\"></i>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"el.signAction\">\r\n <td class=\"sign-action-cell\">\r\n <ng-container *ngIf=\"!rowData[el.signAction.signedField || 'signed']; else signedButton\">\r\n <a [href]=\"rowData[el.signAction.urlField || 'signUrl'] || '#'\" target=\"_blank\">\r\n <button pButton pRipple type=\"button\"\r\n class=\"p-button-rounded p-button-danger\"\r\n icon=\"pi pi-file-edit\"\r\n pTooltip=\"Firmar documento\"\r\n tooltipPosition=\"top\"></button>\r\n </a>\r\n </ng-container>\r\n <ng-template #signedButton>\r\n <button pButton pRipple type=\"button\"\r\n class=\"p-button-rounded p-button-success\"\r\n icon=\"pi pi-file-edit\"\r\n pTooltip=\"Documento firmado\"\r\n tooltipPosition=\"top\"\r\n disabled></button>\r\n </ng-template>\r\n <button pButton pRipple type=\"button\"\r\n class=\"p-button-rounded p-button-secondary ml-1\"\r\n icon=\"pi pi-refresh\"\r\n pTooltip=\"Verificar estado\"\r\n tooltipPosition=\"top\"\r\n (click)=\"onRowSignRefresh(el, rowData, rowIndex)\"></button>\r\n </td>\r\n </ng-container>\r\n <ng-container>\r\n <td>\r\n <button pButton pRipple type=\"button\"\r\n (click)=\"editRow(el, rowData, rowIndex)\" icon=\"pi pi-pencil\"\r\n class=\"p-button-rounded p-button-info mr-1\"></button>\r\n <button pButton pRipple type=\"button\" (click)=\"deleteRow(el, rowIndex)\" [disabled]=\"controls[i][j].disabled === true\"\r\n icon=\"pi pi-trash\" class=\"p-button-rounded p-button-danger\"></button>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'ArrayLayout'\">\r\n <div *ngFor=\"let arrayItem of getArrayItems(element.scope); let arrayIndex = index\" [ngClass]=\"element.classElements || 'flex align-items-center w-full'\">\r\n <div *ngFor=\"let el of element.elements; let j =index\" [class]=\"el?.class\"\r\n [class.hidden]=\"el.hidden || false\" [style.display]=\"el.hide ? 'none' : null\">\r\n <ng-container [ngSwitch]=\"el.type\">\r\n <sf-control *ngSwitchCase=\"'Control'\" [control]=\"getControl(el,arrayIndex)\" [label]=\"el.label\"\r\n [value]=\"values[i][j] || getValueFromData(element,el,arrayIndex)\" (setValue)=\"setValue($event, el.scope, i, j,arrayIndex)\"\r\n (sendNotification)=\"sendNotification($event)\"\r\n (sendObject)=\"applyValuesFromObject($event, arrayIndex)\"\r\n (addressClicked)=\"openPopUpDireccion(el.scope)\"\r\n (setDependencyValue)=\"setDependencyValue($event, i, j, arrayIndex)\" [showCssClass]=\"showCss\"></sf-control>\r\n </ng-container>\r\n </div>\r\n <p-button *ngIf=\"element.deleteButton && !(element.deleteButton.hide?.index === arrayIndex)\" [icon]=\"element.deleteButton.icon\" [rounded]=\"element.deleteButton.rounded || false\" [text]=\"element.deleteButton.text || true\" [severity]=\"element.deleteButton.severity || 'danger'\" (click)=\"removeArrayItem(element, i, arrayIndex)\" \r\n [label]=\"element.deleteButton.label\" />\r\n </div>\r\n <div class=\"col-12\">\r\n <div *ngIf=\"element.addButton\" class=\"flex items-center justify-content-between mb-2\">\r\n <p-button [icon]=\"element.addButton.icon\" [label]=\"element.addButton.label\" (click)=\"addArrayItem(element, i)\" [severity]=\"element.addButton.severity || 'primary'\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </p-fluid>\r\n</div>\r\n\r\n<!-- <p-toast *ngIf=\"isDialog\"></p-toast> -->\r\n", styles: [".disabled-link{pointer-events:none;cursor:default}:not(.col-12) .label{display:flex;justify-content:center;align-items:center;padding-inline:.5rem;margin-bottom:15px;margin-top:20px;border-radius:13px;font-size:18px;font-size:inherit;background-color:var(--primary-color);text-align:center;color:var(--normal-text-color)}.pdf{display:flex;width:100%;height:80vh;& iframe{width:80%;margin-inline:10%}}.data-ado-container{display:flex;margin-inline:auto;align-items:center;width:fit-content;>*{margin-inline:4px}>div{display:flex;align-items:center;>*{margin-inline:4px}}}i.pi-user{font-size:2rem}.result-ado{min-height:1rem;text-align:center}sf-simulador{display:flow-root;width:80%;margin-inline:auto;margin-bottom:35px}sf-sign{display:block;margin-inline:auto;width:80%;& pdf-viewer{min-height:130vh!important;max-height:130vh!important}}.buttons{display:flex;justify-content:space-evenly}::ng-deep *{box-shadow:none}.frm-container ::ng-deep .p-inputtext:focus,.frm-container ::ng-deep .p-inputtext:active,.frm-container ::ng-deep .p-inputwrapper:focus,.frm-container ::ng-deep .p-inputwrapper:active{border-color:var(--button-color)}.frm-container ::ng-deep :not(:disabled):active,.frm-container ::ng-deep :not(.p-disabled) .p-inputtext:hover,.frm-container ::ng-deep :not(.p-disabled) .p-inputwrapper:hover,.frm-container ::ng-deep :not(.p-disabled) .p-inputwrapper-focus,.frm-container ::ng-deep .p-radiobutton-box .p-highlight,.frm-container ::ng-deep .p-radiobutton .p-radiobutton-box:not(.p-disabled):hover{border-color:var(--button-color)}.frm-container ::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{background:var(--button-color);border-color:var(--button-color)!important}@media screen and (max-width:765px){:not(.col-12) .label{height:fit-content}.field{margin-bottom:.5rem}.pdf>iframe{width:100%;margin-inline:0}sf-sign{width:100%;& pdf-viewer{min-height:60vh!important;max-height:120vh!important}}sf-simulador{display:block;width:100%;margin-inline:auto}.data-ado-container{text-align:center;.buttons{max-width:80vw;flex-direction:row}}.buttons{flex-direction:column;align-items:center}}.frm-container ::ng-deep .p-radiobutton .p-radiobutton-box:not(.p-disabled):not(.p-highlight):hover{border-color:var(--secondary-color)!important}.frm-container ::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight:not(.p-disabled):hover{color:var(--secondary-color)!important}.frm-container ::ng-deep .p-radiobutton .p-radiobutton-box:not(.p-disabled).p-focus{box-shadow:inset 0 0 0 1px var(--secondary-color)!important}.frm-container ::ng-deep .p-radiobutton .p-radiobutton-box .p-radiobutton-icon{background-color:#fff}.frm-container ::ng-deep .p-slider:not(.p-disabled):hover{background-color:#e5e7eb}.frm-container ::ng-deep .p-slider{background-color:#e5e7eb}.frm-container ::ng-deep .p-slider:not(.p-disabled):hover .p-slider-range{background-color:var(--primary-color)!important}.frm-container ::ng-deep .p-slider:not(.p-disabled):hover .p-slider-handle{border-color:var(--primary-color)!important}\n"], dependencies: [{ kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "pipe", type: i5.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i5.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: FluidModule }, { kind: "component", type: i6$1.Fluid, selector: "p-fluid" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "component", type: i7.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i5$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "component", type: ControlComponent, selector: "sf-control", inputs: ["showTempValue", "control", "label", "value", "appendTo", "showCssClass", "environment", "context", "disabled"], outputs: ["setValue", "sendObject", "addressClicked", "setDependencyValue"] }, { kind: "ngmodule", type: SfPdfsignModule }, { kind: "component", type: i10$1.SignComponent, selector: "sf-sign", inputs: ["idkatios", "tdoc", "ndoc", "idDocument", "typeDocument", "allowDownload"], outputs: ["stateDocument", "loading"] }, { kind: "ngmodule", type: SfSimuladorModule }, { kind: "component", type: i6$2.SfSimuladorComponent, selector: "sf-simulador", inputs: ["simulador", "otherToolTips", "labels"], outputs: ["simuladorChange", "enProceso"] }] });
|
|
3281
3291
|
}
|
|
3282
3292
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormComponent, decorators: [{
|
|
3283
3293
|
type: Component,
|
|
@@ -3305,6 +3315,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
3305
3315
|
type: Input
|
|
3306
3316
|
}], showCss: [{
|
|
3307
3317
|
type: Input
|
|
3318
|
+
}], registro: [{
|
|
3319
|
+
type: Input
|
|
3308
3320
|
}], tooltips: [{
|
|
3309
3321
|
type: ViewChildren,
|
|
3310
3322
|
args: [Tooltip]
|
|
@@ -4040,11 +4052,11 @@ class RegistroComponent {
|
|
|
4040
4052
|
return Promise.resolve(this.sfCrudService.mascaras);
|
|
4041
4053
|
}
|
|
4042
4054
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: RegistroComponent, deps: [{ token: GeneralService }, { token: i2.ActivatedRoute }, { token: i3$1.MessageService }, { token: SfCrudService }, { token: StepService }, { token: i6$2.SfSimuladorService }, { token: NotificationService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
4043
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: RegistroComponent, isStandalone: true, selector: "sf-registro", inputs: { idKatios: "idKatios", trx: "trx", id: "id", user: "user", dataExt: "dataExt", ids: "ids", environment: "environment", buttonsFooterTemplate: "buttonsFooterTemplate", back_route: "back_route", showLoadingConfig: "showLoadingConfig", loadingTemplate: "loadingTemplate", showHeader: "showHeader", showCssClass: "showCssClass", beforeRedirect: "beforeRedirect", idEntidad: "idEntidad" }, outputs: { sendData: "sendData", onSubmit: "onSubmit", onLoaded: "onLoaded" }, host: { properties: { "style.--primary-color": "this.color", "style.--secondary-color": "this.color2", "style.--button-color": "this.colorButton" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"showLoadingConfig && loadingTemplate && !sfCrudService.crudLoaded; else content\">\r\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<ng-template #content>\r\n <div class=\"card\">\r\n <!--TODO convertir en template y editarla en -->\r\n <h5 *ngIf=\"sfCrudService.registros.length >= 1 && showHeader\" class=\"card-header mb-2\"\r\n style=\"display: flex; justify-content: space-between;align-items: center;\">\r\n <span>{{sfCrudService.registros[0]?.label || idForm.replaceAll('_', ' ')}} {{ids.length > 0 ? '-' + ids[0] :\r\n ''}}</span>\r\n <button *ngIf=\"sfCrudService.registros[0]?.canBack\" pButton pRipple type=\"button\" icon=\"pi pi-arrow-left\"\r\n (click)=\"back()\"></button>\r\n </h5>\r\n <div *ngIf=\"items.length > 1\">\r\n <app-step [items]=\"items\"></app-step>\r\n </div>\r\n <div *ngIf=\"items.length == 1\">\r\n <app-form [data]=\"sfCrudService.dataset[0]\" [esquema]=\"sfCrudService.esquemas[0]\"\r\n [uiEsquema]=\"sfCrudService.uiEsquemas[0]\" [isDialog]=\"false\" [showCss]=\"showCssClass\"></app-form>\r\n\r\n <!--renderizar un codigo personalizado desde el componente padre o renderizar el que se tiene por defecto-->\r\n <ng-container *ngTemplateOutlet=\"buttonsFooterTemplate || defaultButtonsFooterTemplate\"></ng-container>\r\n <ng-template #defaultButtonsFooterTemplate>\r\n <div class=\"card-footer mt-2\" *ngIf=\"btnSubmit\">\r\n <button pButton pRipple type=\"button\" [icon]=\"btnSubmit.icon\" [label]=\"btnSubmit.label\"\r\n (click)=\"onClickBtnSubmit()\"></button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <span *ngFor=\"let item of dialogElements; let $index=index\">\r\n <p-dialog [(visible)]=\"displays[$index]\" [modal]=\"true\" [header]=\"'Detalle'\" [closable]=\"false\">\r\n <!-- TODO header = currentElement.element.label ? currentElement.element.label: -->\r\n <app-form [data]=\"item.data\" [esquema]=\"item.esquema\" [uiEsquema]=\"item.uiEsquema\" [isDialog]=\"true\"\r\n
|
|
4055
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: RegistroComponent, isStandalone: true, selector: "sf-registro", inputs: { idKatios: "idKatios", trx: "trx", id: "id", user: "user", dataExt: "dataExt", ids: "ids", environment: "environment", buttonsFooterTemplate: "buttonsFooterTemplate", back_route: "back_route", showLoadingConfig: "showLoadingConfig", loadingTemplate: "loadingTemplate", showHeader: "showHeader", showCssClass: "showCssClass", beforeRedirect: "beforeRedirect", idEntidad: "idEntidad" }, outputs: { sendData: "sendData", onSubmit: "onSubmit", onLoaded: "onLoaded" }, host: { properties: { "style.--primary-color": "this.color", "style.--secondary-color": "this.color2", "style.--button-color": "this.colorButton" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"showLoadingConfig && loadingTemplate && !sfCrudService.crudLoaded; else content\">\r\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<ng-template #content>\r\n <div class=\"card\">\r\n <!--TODO convertir en template y editarla en -->\r\n <h5 *ngIf=\"sfCrudService.registros.length >= 1 && showHeader\" class=\"card-header mb-2\"\r\n style=\"display: flex; justify-content: space-between;align-items: center;\">\r\n <span>{{sfCrudService.registros[0]?.label || idForm.replaceAll('_', ' ')}} {{ids.length > 0 ? '-' + ids[0] :\r\n ''}}</span>\r\n <button *ngIf=\"sfCrudService.registros[0]?.canBack\" pButton pRipple type=\"button\" icon=\"pi pi-arrow-left\"\r\n (click)=\"back()\"></button>\r\n </h5>\r\n <div *ngIf=\"items.length > 1\">\r\n <app-step [items]=\"items\"></app-step>\r\n </div>\r\n <div *ngIf=\"items.length == 1\">\r\n <app-form [data]=\"sfCrudService.dataset[0]\" [esquema]=\"sfCrudService.esquemas[0]\"\r\n [uiEsquema]=\"sfCrudService.uiEsquemas[0]\" [isDialog]=\"false\" [showCss]=\"showCssClass\"></app-form>\r\n\r\n <!--renderizar un codigo personalizado desde el componente padre o renderizar el que se tiene por defecto-->\r\n <ng-container *ngTemplateOutlet=\"buttonsFooterTemplate || defaultButtonsFooterTemplate\"></ng-container>\r\n <ng-template #defaultButtonsFooterTemplate>\r\n <div class=\"card-footer mt-2\" *ngIf=\"btnSubmit\">\r\n <button pButton pRipple type=\"button\" [icon]=\"btnSubmit.icon\" [label]=\"btnSubmit.label\"\r\n (click)=\"onClickBtnSubmit()\"></button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <span *ngFor=\"let item of dialogElements; let $index=index\">\r\n <p-dialog [(visible)]=\"displays[$index]\" [modal]=\"true\" [header]=\"'Detalle'\" [closable]=\"false\">\r\n <!-- TODO header = currentElement.element.label ? currentElement.element.label: -->\r\n <app-form [data]=\"item.data\" [esquema]=\"item.esquema\" [uiEsquema]=\"item.uiEsquema\" [isDialog]=\"true\"\r\n [registro]=\"sfCrudService.getRegistro(indexCrud)\"\r\n [id]=\"ids[indexCrud]\" [isAddressDialog]=\"item.isAddressDialog === true\"\r\n [separador]=\"item.separador\"></app-form>\r\n <ng-template pTemplate=\"footer\">\r\n <p-button icon=\"pi pi-times\" (onClick)=\"removeDialogItem()\" label=\"Cancelar\"></p-button>\r\n <p-button icon=\"pi pi-check\" [disabled]=\"item.esquema.disabled === true\"\r\n (onClick)=\"onCloseDialog($index)\" label=\"Ok\" pAutoFocus [autofocus]=\"true\"></p-button>\r\n </ng-template>\r\n </p-dialog>\r\n </span>\r\n</ng-template>", styles: ["@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: CardModule }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "component", type: i7.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: StepComponent, selector: "app-step", inputs: ["items"] }, { kind: "component", type: FormComponent, selector: "app-form", inputs: ["uiEsquema", "esquema", "data", "isDialog", "isAddressDialog", "separador", "showCss", "registro"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i10$2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: FormsModule }] });
|
|
4044
4056
|
}
|
|
4045
4057
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: RegistroComponent, decorators: [{
|
|
4046
4058
|
type: Component,
|
|
4047
|
-
args: [{ selector: 'sf-registro', imports: [CommonModule, CardModule, ButtonModule, StepComponent, FormComponent, DialogModule, FormsModule], standalone: true, template: "<ng-container *ngIf=\"showLoadingConfig && loadingTemplate && !sfCrudService.crudLoaded; else content\">\r\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<ng-template #content>\r\n <div class=\"card\">\r\n <!--TODO convertir en template y editarla en -->\r\n <h5 *ngIf=\"sfCrudService.registros.length >= 1 && showHeader\" class=\"card-header mb-2\"\r\n style=\"display: flex; justify-content: space-between;align-items: center;\">\r\n <span>{{sfCrudService.registros[0]?.label || idForm.replaceAll('_', ' ')}} {{ids.length > 0 ? '-' + ids[0] :\r\n ''}}</span>\r\n <button *ngIf=\"sfCrudService.registros[0]?.canBack\" pButton pRipple type=\"button\" icon=\"pi pi-arrow-left\"\r\n (click)=\"back()\"></button>\r\n </h5>\r\n <div *ngIf=\"items.length > 1\">\r\n <app-step [items]=\"items\"></app-step>\r\n </div>\r\n <div *ngIf=\"items.length == 1\">\r\n <app-form [data]=\"sfCrudService.dataset[0]\" [esquema]=\"sfCrudService.esquemas[0]\"\r\n [uiEsquema]=\"sfCrudService.uiEsquemas[0]\" [isDialog]=\"false\" [showCss]=\"showCssClass\"></app-form>\r\n\r\n <!--renderizar un codigo personalizado desde el componente padre o renderizar el que se tiene por defecto-->\r\n <ng-container *ngTemplateOutlet=\"buttonsFooterTemplate || defaultButtonsFooterTemplate\"></ng-container>\r\n <ng-template #defaultButtonsFooterTemplate>\r\n <div class=\"card-footer mt-2\" *ngIf=\"btnSubmit\">\r\n <button pButton pRipple type=\"button\" [icon]=\"btnSubmit.icon\" [label]=\"btnSubmit.label\"\r\n (click)=\"onClickBtnSubmit()\"></button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <span *ngFor=\"let item of dialogElements; let $index=index\">\r\n <p-dialog [(visible)]=\"displays[$index]\" [modal]=\"true\" [header]=\"'Detalle'\" [closable]=\"false\">\r\n <!-- TODO header = currentElement.element.label ? currentElement.element.label: -->\r\n <app-form [data]=\"item.data\" [esquema]=\"item.esquema\" [uiEsquema]=\"item.uiEsquema\" [isDialog]=\"true\"\r\n
|
|
4059
|
+
args: [{ selector: 'sf-registro', imports: [CommonModule, CardModule, ButtonModule, StepComponent, FormComponent, DialogModule, FormsModule], standalone: true, template: "<ng-container *ngIf=\"showLoadingConfig && loadingTemplate && !sfCrudService.crudLoaded; else content\">\r\n <ng-container *ngTemplateOutlet=\"loadingTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<ng-template #content>\r\n <div class=\"card\">\r\n <!--TODO convertir en template y editarla en -->\r\n <h5 *ngIf=\"sfCrudService.registros.length >= 1 && showHeader\" class=\"card-header mb-2\"\r\n style=\"display: flex; justify-content: space-between;align-items: center;\">\r\n <span>{{sfCrudService.registros[0]?.label || idForm.replaceAll('_', ' ')}} {{ids.length > 0 ? '-' + ids[0] :\r\n ''}}</span>\r\n <button *ngIf=\"sfCrudService.registros[0]?.canBack\" pButton pRipple type=\"button\" icon=\"pi pi-arrow-left\"\r\n (click)=\"back()\"></button>\r\n </h5>\r\n <div *ngIf=\"items.length > 1\">\r\n <app-step [items]=\"items\"></app-step>\r\n </div>\r\n <div *ngIf=\"items.length == 1\">\r\n <app-form [data]=\"sfCrudService.dataset[0]\" [esquema]=\"sfCrudService.esquemas[0]\"\r\n [uiEsquema]=\"sfCrudService.uiEsquemas[0]\" [isDialog]=\"false\" [showCss]=\"showCssClass\"></app-form>\r\n\r\n <!--renderizar un codigo personalizado desde el componente padre o renderizar el que se tiene por defecto-->\r\n <ng-container *ngTemplateOutlet=\"buttonsFooterTemplate || defaultButtonsFooterTemplate\"></ng-container>\r\n <ng-template #defaultButtonsFooterTemplate>\r\n <div class=\"card-footer mt-2\" *ngIf=\"btnSubmit\">\r\n <button pButton pRipple type=\"button\" [icon]=\"btnSubmit.icon\" [label]=\"btnSubmit.label\"\r\n (click)=\"onClickBtnSubmit()\"></button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <span *ngFor=\"let item of dialogElements; let $index=index\">\r\n <p-dialog [(visible)]=\"displays[$index]\" [modal]=\"true\" [header]=\"'Detalle'\" [closable]=\"false\">\r\n <!-- TODO header = currentElement.element.label ? currentElement.element.label: -->\r\n <app-form [data]=\"item.data\" [esquema]=\"item.esquema\" [uiEsquema]=\"item.uiEsquema\" [isDialog]=\"true\"\r\n [registro]=\"sfCrudService.getRegistro(indexCrud)\"\r\n [id]=\"ids[indexCrud]\" [isAddressDialog]=\"item.isAddressDialog === true\"\r\n [separador]=\"item.separador\"></app-form>\r\n <ng-template pTemplate=\"footer\">\r\n <p-button icon=\"pi pi-times\" (onClick)=\"removeDialogItem()\" label=\"Cancelar\"></p-button>\r\n <p-button icon=\"pi pi-check\" [disabled]=\"item.esquema.disabled === true\"\r\n (onClick)=\"onCloseDialog($index)\" label=\"Ok\" pAutoFocus [autofocus]=\"true\"></p-button>\r\n </ng-template>\r\n </p-dialog>\r\n </span>\r\n</ng-template>", styles: ["@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
|
4048
4060
|
}], ctorParameters: () => [{ type: GeneralService }, { type: i2.ActivatedRoute }, { type: i3$1.MessageService }, { type: SfCrudService }, { type: StepService }, { type: i6$2.SfSimuladorService }, { type: NotificationService }, { type: i2.Router }], propDecorators: { color: [{
|
|
4049
4061
|
type: HostBinding,
|
|
4050
4062
|
args: ["style.--primary-color"]
|