sf-crud 12.0.1-beta2 → 12.0.1-beta20
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/bundles/sf-crud.umd.js +322 -65
- package/bundles/sf-crud.umd.js.map +1 -1
- package/esm2015/lib/components/control/control.component.js +76 -7
- package/esm2015/lib/components/registro/registro.component.js +108 -37
- package/esm2015/lib/components/registro-child/registro-child.component.js +112 -0
- package/esm2015/lib/components/tablero/tablero.component.js +3 -3
- package/esm2015/lib/sf-crud.module.js +28 -12
- package/esm2015/lib/shared/services/models/crud-config.model.js +1 -1
- package/esm2015/public-api.js +2 -1
- package/fesm2015/sf-crud.js +305 -51
- package/fesm2015/sf-crud.js.map +1 -1
- package/lib/components/control/control.component.d.ts +10 -1
- package/lib/components/registro/registro.component.d.ts +15 -7
- package/lib/components/registro-child/registro-child.component.d.ts +21 -0
- package/lib/components/tablero/tablero.component.d.ts +1 -1
- package/lib/sf-crud.module.d.ts +76 -73
- package/lib/shared/services/models/crud-config.model.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
package/bundles/sf-crud.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@angular/router'), require('primeng/blockui'), require('primeng/toolbar'), require('primeng/table'), require('@angular/common'), require('primeng/api'), require('primeng/button'), require('primeng/ripple'), require('primeng/inputtext'), require('primeng/tooltip'), require('jsonpath'), require('primeng/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('sf-crud', ['exports', '@angular/core', '@angular/common/http', '@angular/router', 'primeng/blockui', 'primeng/toolbar', 'primeng/table', '@angular/common', 'primeng/api', 'primeng/button', 'primeng/ripple', 'primeng/inputtext', 'primeng/tooltip', 'jsonpath', 'primeng/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["sf-crud"] = {}, global.ng.core, global.ng.common.http, global.ng.router, global.i3, global.i4, global.i5, global.ng.common, global.i3$1, global.i8, global.i9, global.i10, global.i11, global.jsonpath, global.i5$1, global.
|
|
5
|
-
})(this, (function (exports, i0, i1, i2, i3, i4, i5,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@angular/router'), require('primeng/blockui'), require('primeng/toolbar'), require('primeng/table'), require('@angular/common'), require('primeng/api'), require('primeng/button'), require('primeng/ripple'), require('primeng/inputtext'), require('primeng/tooltip'), require('primeng/dynamicdialog'), require('jsonpath'), require('primeng/inputmask'), require('primeng/dropdown'), require('primeng/autocomplete'), require('primeng/calendar'), require('primeng/inputnumber'), require('primeng/fileupload'), require('@angular/forms'), require('primeng/toast'), require('primeng/accordion'), require('primeng/avatargroup'), require('primeng/avatar'), require('primeng/badge'), require('primeng/breadcrumb'), require('primeng/card'), require('primeng/carousel'), require('primeng/cascadeselect'), require('primeng/checkbox'), require('primeng/chip'), require('primeng/chips'), require('primeng/codehighlighter'), require('primeng/colorpicker'), require('primeng/confirmdialog'), require('primeng/confirmpopup'), require('primeng/contextmenu'), require('primeng/dialog'), require('primeng/divider'), require('primeng/fieldset'), require('primeng/galleria'), require('primeng/inplace'), require('primeng/inputswitch'), require('primeng/inputtextarea'), require('primeng/knob'), require('primeng/lightbox'), require('primeng/listbox'), require('primeng/megamenu'), require('primeng/menubar'), require('primeng/menu'), require('primeng/message'), require('primeng/messages'), require('primeng/multiselect'), require('primeng/organizationchart'), require('primeng/overlaypanel'), require('primeng/panelmenu'), require('primeng/panel'), require('primeng/password'), require('primeng/progressbar'), require('primeng/radiobutton'), require('primeng/rating'), require('primeng/scrollpanel'), require('primeng/scrolltop'), require('primeng/selectbutton'), require('primeng/sidebar'), require('primeng/skeleton'), require('primeng/slidemenu'), require('primeng/slider'), require('primeng/splitter'), require('primeng/steps'), require('primeng/tabmenu'), require('primeng/tabview'), require('primeng/tag'), require('primeng/terminal'), require('primeng/tieredmenu'), require('primeng/timeline'), require('primeng/togglebutton'), require('primeng/tree')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('sf-crud', ['exports', '@angular/core', '@angular/common/http', '@angular/router', 'primeng/blockui', 'primeng/toolbar', 'primeng/table', '@angular/common', 'primeng/api', 'primeng/button', 'primeng/ripple', 'primeng/inputtext', 'primeng/tooltip', 'primeng/dynamicdialog', 'jsonpath', 'primeng/inputmask', 'primeng/dropdown', 'primeng/autocomplete', 'primeng/calendar', 'primeng/inputnumber', 'primeng/fileupload', '@angular/forms', 'primeng/toast', 'primeng/accordion', 'primeng/avatargroup', 'primeng/avatar', 'primeng/badge', 'primeng/breadcrumb', 'primeng/card', 'primeng/carousel', 'primeng/cascadeselect', 'primeng/checkbox', 'primeng/chip', 'primeng/chips', 'primeng/codehighlighter', 'primeng/colorpicker', 'primeng/confirmdialog', 'primeng/confirmpopup', 'primeng/contextmenu', 'primeng/dialog', 'primeng/divider', 'primeng/fieldset', 'primeng/galleria', 'primeng/inplace', 'primeng/inputswitch', 'primeng/inputtextarea', 'primeng/knob', 'primeng/lightbox', 'primeng/listbox', 'primeng/megamenu', 'primeng/menubar', 'primeng/menu', 'primeng/message', 'primeng/messages', 'primeng/multiselect', 'primeng/organizationchart', 'primeng/overlaypanel', 'primeng/panelmenu', 'primeng/panel', 'primeng/password', 'primeng/progressbar', 'primeng/radiobutton', 'primeng/rating', 'primeng/scrollpanel', 'primeng/scrolltop', 'primeng/selectbutton', 'primeng/sidebar', 'primeng/skeleton', 'primeng/slidemenu', 'primeng/slider', 'primeng/splitter', 'primeng/steps', 'primeng/tabmenu', 'primeng/tabview', 'primeng/tag', 'primeng/terminal', 'primeng/tieredmenu', 'primeng/timeline', 'primeng/togglebutton', 'primeng/tree'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["sf-crud"] = {}, global.ng.core, global.ng.common.http, global.ng.router, global.i3, global.i4, global.i5, global.ng.common, global.i3$1, global.i8, global.i9, global.i10, global.i11, global.i1$1, global.jsonpath, global.i2$1, global.i3$2, global.i4$1, global.i5$1, global.i6$1, global.i7, global.ng.forms, global.i6$2, global.accordion, global.avatargroup, global.avatar, global.badge, global.breadcrumb, global.card, global.carousel, global.cascadeselect, global.checkbox, global.chip, global.chips, global.codehighlighter, global.colorpicker, global.confirmdialog, global.confirmpopup, global.contextmenu, global.dialog, global.divider, global.fieldset, global.galleria, global.inplace, global.inputswitch, global.inputtextarea, global.knob, global.lightbox, global.listbox, global.megamenu, global.menubar, global.menu, global.message, global.messages, global.multiselect, global.organizationchart, global.overlaypanel, global.panelmenu, global.panel, global.password, global.progressbar, global.radiobutton, global.rating, global.scrollpanel, global.scrolltop, global.selectbutton, global.sidebar, global.skeleton, global.slidemenu, global.slider, global.splitter, global.steps, global.tabmenu, global.tabview, global.tag, global.terminal, global.tieredmenu, global.timeline, global.togglebutton, global.tree));
|
|
5
|
+
})(this, (function (exports, i0, i1, i2, i3, i4, i5, i6, i3$1, i8, i9, i10, i11, i1$1, jsonpath, i2$1, i3$2, i4$1, i5$1, i6$1, i7, i9$1, i6$2, accordion, avatargroup, avatar, badge, breadcrumb, card, carousel, cascadeselect, checkbox, chip, chips, codehighlighter, colorpicker, confirmdialog, confirmpopup, contextmenu, dialog, divider, fieldset, galleria, inplace, inputswitch, inputtextarea, knob, lightbox, listbox, megamenu, menubar, menu, message, messages, multiselect, organizationchart, overlaypanel, panelmenu, panel, password, progressbar, radiobutton, rating, scrollpanel, scrolltop, selectbutton, sidebar, skeleton, slidemenu, slider, splitter, steps, tabmenu, tabview, tag, terminal, tieredmenu, timeline, togglebutton, tree) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -28,16 +28,22 @@
|
|
|
28
28
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
29
29
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
30
30
|
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
31
|
-
var
|
|
31
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
32
32
|
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
33
33
|
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
34
34
|
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
35
35
|
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
36
36
|
var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
|
|
37
|
+
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
37
38
|
var jsonpath__namespace = /*#__PURE__*/_interopNamespace(jsonpath);
|
|
38
|
-
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
39
39
|
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
40
|
+
var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
|
|
40
41
|
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
|
|
42
|
+
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
43
|
+
var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
|
|
44
|
+
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
45
|
+
var i9__namespace$1 = /*#__PURE__*/_interopNamespace(i9$1);
|
|
46
|
+
var i6__namespace$2 = /*#__PURE__*/_interopNamespace(i6$2);
|
|
41
47
|
|
|
42
48
|
var Shema = /** @class */ (function () {
|
|
43
49
|
function Shema() {
|
|
@@ -192,7 +198,7 @@
|
|
|
192
198
|
function step(op) {
|
|
193
199
|
if (f)
|
|
194
200
|
throw new TypeError("Generator is already executing.");
|
|
195
|
-
while (_)
|
|
201
|
+
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
196
202
|
try {
|
|
197
203
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
198
204
|
return t;
|
|
@@ -520,7 +526,7 @@
|
|
|
520
526
|
this.btn.update = this.opciones.find(function (x) { return x.label == 'Editar'; });
|
|
521
527
|
this.btn.delete = this.opciones.find(function (x) { return x.label == 'Eliminar'; });
|
|
522
528
|
};
|
|
523
|
-
TableroComponent.prototype.redirect = function (
|
|
529
|
+
TableroComponent.prototype.redirect = function (accion, data) {
|
|
524
530
|
var _a, _b;
|
|
525
531
|
switch (accion) {
|
|
526
532
|
case 'create':
|
|
@@ -542,7 +548,7 @@
|
|
|
542
548
|
return TableroComponent;
|
|
543
549
|
}());
|
|
544
550
|
TableroComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TableroComponent, deps: [{ token: GeneralService }, { token: i2__namespace.Router }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
545
|
-
TableroComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TableroComponent, selector: "sf-crudtablero", inputs: { opciones: "opciones", idEntidad: "idEntidad", idKatios: "idKatios" }, ngImport: i0__namespace, template: "<p-blockUI [blocked]=\"enProceso\">\r\n <i class=\"pi pi-cog pi-spin\" style=\"font-size: 50px\"></i>\r\n</p-blockUI>\r\n\r\n<div class=\"card\" *ngIf=\"!enProceso\">\r\n <p-toolbar styleClass=\"mb-4 gap-2\">\r\n <ng-template pTemplate=\"left\">\r\n <button *ngIf=\"btn.create\" pButton pRipple [label]=\"btn.create.label\" [icon]=\"btn.create.icon\"\r\n class=\"p-button-success mr-2\" (click)=\"redirect(
|
|
551
|
+
TableroComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TableroComponent, selector: "sf-crudtablero", inputs: { opciones: "opciones", idEntidad: "idEntidad", idKatios: "idKatios" }, ngImport: i0__namespace, template: "<p-blockUI [blocked]=\"enProceso\">\r\n <i class=\"pi pi-cog pi-spin\" style=\"font-size: 50px\"></i>\r\n</p-blockUI>\r\n\r\n<div class=\"card\" *ngIf=\"!enProceso\">\r\n <p-toolbar styleClass=\"mb-4 gap-2\">\r\n <ng-template pTemplate=\"left\">\r\n <button *ngIf=\"btn.create\" pButton pRipple [label]=\"btn.create.label\" [icon]=\"btn.create.icon\"\r\n class=\"p-button-success mr-2\" (click)=\"redirect('create')\"></button>\r\n </ng-template>\r\n </p-toolbar>\r\n <p-table #dt [columns]=\"crudConfig.tablero.columns\" [value]=\"data\" [rowHover]=\"true\" [rows]=\"10\" [paginator]=\"true\"\r\n [globalFilterFields]=\"crudConfig.tablero?.filters || []\" [tableStyle]=\"{'min-width': '75rem'}\"\r\n currentPageReportTemplate=\"Registro {first} al {last} de {totalRecords} {{idEntidad}}\"\r\n [showCurrentPageReport]=\"true\">\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"flex align-items-center justify-content-between\">\r\n <h5 class=\"m-0\">{{idEntidad}}</h5>\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n <input pInputText type=\"text\" (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\r\n placeholder=\"Buscar...\" />\r\n </span>\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>Acci\u00F3n</th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\r\n <tr>\r\n <ng-container *ngFor=\"let col of columns\" [ngSwitch]=\"col.type\">\r\n <td *ngSwitchCase=\"'text'\">{{rowData[col.col]}}</td>\r\n <td *ngSwitchCase=\"'date:yyyy-mm-dd'\">{{rowData[col.col] | date: 'yyyy-MM-dd'}}</td>\r\n <td *ngSwitchCase=\"'currency:USD'\">{{rowData[col.col] | currency: 'USD'}}</td>\r\n </ng-container>\r\n <th>\r\n <button *ngIf=\"btn.read\" pButton pRipple [pTooltip]=\"btn.read.label\" [icon]=\"btn.read.icon\"\r\n class=\"p-button-rounded p-button-info mr-2\" (click)=\"redirect('read', rowData)\"></button>\r\n <button *ngIf=\"btn.update\" pButton pRipple [pTooltip]=\"btn.update.label\" [icon]=\"btn.update.icon\"\r\n class=\"p-button-rounded p-button-warning mr-2\" (click)=\"redirect('update', rowData)\"></button>\r\n <button *ngIf=\"btn.delete\" pButton pRipple [pTooltip]=\"btn.delete.label\" [icon]=\"btn.delete.icon\"\r\n class=\"p-button-rounded p-button-danger mr-2\" (click)=\"redirect('delete', rowData)\"></button>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>", components: [{ type: i3__namespace.BlockUI, selector: "p-blockUI", inputs: ["target", "autoZIndex", "baseZIndex", "styleClass", "blocked"] }, { type: i4__namespace.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { type: i5__namespace.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollDelay", "virtualRowHeight", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "stateKey", "stateStorage", "editMode", "groupRowsBy", "minBufferPx", "maxBufferPx", "responsiveLayout", "breakpoint", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection"], outputs: ["selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i8__namespace.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i9__namespace.Ripple, selector: "[pRipple]" }, { type: i10__namespace.InputText, selector: "[pInputText]" }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i11__namespace.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }], pipes: { "date": i6__namespace.DatePipe, "currency": i6__namespace.CurrencyPipe } });
|
|
546
552
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TableroComponent, decorators: [{
|
|
547
553
|
type: i0.Component,
|
|
548
554
|
args: [{
|
|
@@ -563,17 +569,47 @@
|
|
|
563
569
|
this.control = new Shema();
|
|
564
570
|
this.label = '';
|
|
565
571
|
this.setValue = new i0.EventEmitter();
|
|
572
|
+
this.sendNotification = new i0.EventEmitter();
|
|
566
573
|
this.isLoading = false;
|
|
567
574
|
this.dataFromService = [];
|
|
575
|
+
this.uploadedFiles = [];
|
|
576
|
+
this.displayAdd = false;
|
|
568
577
|
}
|
|
569
578
|
ControlComponent.prototype.ngOnInit = function () {
|
|
570
579
|
var _a;
|
|
571
|
-
if ((_a = this.control) === null || _a === void 0 ? void 0 : _a.config)
|
|
580
|
+
if (((_a = this.control) === null || _a === void 0 ? void 0 : _a.config) && this.control.subtype == 'dropdown')
|
|
572
581
|
this.loadDataFromService();
|
|
573
582
|
};
|
|
574
583
|
ControlComponent.prototype.sendValue = function () {
|
|
575
584
|
this.setValue.emit(this.value);
|
|
576
585
|
};
|
|
586
|
+
ControlComponent.prototype.sendValueFromObject = function (event) {
|
|
587
|
+
switch (typeof (this.control.config.optionValue)) {
|
|
588
|
+
case 'object':
|
|
589
|
+
this.control.config.optionValue.forEach(function (op) { return op['value'] = event[op.key]; });
|
|
590
|
+
this.setValue.emit(this.control.config.optionValue);
|
|
591
|
+
break;
|
|
592
|
+
default:
|
|
593
|
+
this.setValue.emit(event[this.control.config.optionValue]);
|
|
594
|
+
break;
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
ControlComponent.prototype.validateValue = function (type) {
|
|
598
|
+
switch (type) {
|
|
599
|
+
case 'email':
|
|
600
|
+
var regex = new RegExp(/([\w\.\-_]+)?\w+@[\w-_]+(\.\w+){1,}/igm);
|
|
601
|
+
if (regex.test(this.value))
|
|
602
|
+
this.sendValue();
|
|
603
|
+
else {
|
|
604
|
+
this.value = null;
|
|
605
|
+
this.sendValue();
|
|
606
|
+
this.sendNotification.emit({ severity: 'warn', detail: 'El correo no es válido' });
|
|
607
|
+
}
|
|
608
|
+
break;
|
|
609
|
+
default:
|
|
610
|
+
break;
|
|
611
|
+
}
|
|
612
|
+
};
|
|
577
613
|
ControlComponent.prototype.loadDataFromService = function () {
|
|
578
614
|
var _this = this;
|
|
579
615
|
this.isLoading = true;
|
|
@@ -583,10 +619,41 @@
|
|
|
583
619
|
_this.isLoading = false;
|
|
584
620
|
});
|
|
585
621
|
};
|
|
622
|
+
ControlComponent.prototype.loadDataFromControlBusquedaService = function (event) {
|
|
623
|
+
var _this = this;
|
|
624
|
+
this.isLoading = true;
|
|
625
|
+
this.generalService.genericRequest(this.control.config.method, this.control.config.server, this.control.config.endpoint.replace('@query', (event === null || event === void 0 ? void 0 : event.query) || ''))
|
|
626
|
+
.then(function (res) {
|
|
627
|
+
_this.dataFromService = res.data;
|
|
628
|
+
_this.isLoading = false;
|
|
629
|
+
});
|
|
630
|
+
};
|
|
631
|
+
ControlComponent.prototype.onUpload = function (event) {
|
|
632
|
+
var _this = this;
|
|
633
|
+
var file = event.files[0];
|
|
634
|
+
var formData = new FormData();
|
|
635
|
+
var path = 'Imagenes/CRUD/temp';
|
|
636
|
+
formData.append('uploadFile', file);
|
|
637
|
+
formData.append('Ruta', "/" + path);
|
|
638
|
+
this.isLoading = true;
|
|
639
|
+
this.generalService.genericRequest(this.control.config.method, this.control.config.server, this.control.config.endpoint, formData)
|
|
640
|
+
.then(function () {
|
|
641
|
+
_this.sendNotification.emit({ severity: 'info', detail: "Archivo cargado correctamente!" });
|
|
642
|
+
_this.uploadedFiles.push(file);
|
|
643
|
+
_this.isLoading = false;
|
|
644
|
+
_this.value = "" + _this.generalService.jsonConfig.Server + path + "/" + file.name;
|
|
645
|
+
_this.sendValue();
|
|
646
|
+
})
|
|
647
|
+
.catch(function (err) {
|
|
648
|
+
console.log(err);
|
|
649
|
+
_this.isLoading = false;
|
|
650
|
+
_this.sendNotification.emit({ severity: 'error', detail: "Error al cargar el archivo!" });
|
|
651
|
+
});
|
|
652
|
+
};
|
|
586
653
|
return ControlComponent;
|
|
587
654
|
}());
|
|
588
655
|
ControlComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ControlComponent, deps: [{ token: GeneralService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
589
|
-
ControlComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ControlComponent, selector: "sf-control", inputs: { control: "control", label: "label", value: "value" }, outputs: { setValue: "setValue" }, ngImport: i0__namespace, template: "<ng-container [ngSwitch]=\"control.type\">\r\n <ng-container *ngSwitchCase=\"'string'\">\r\n <label>{{label}}</label>\r\n <ng-container [ngSwitch]=\"control.subtype\">\r\n <ng-container *ngSwitchCase=\"'input'\">\r\n <input pInputText type=\"text\" [(ngModel)]=\"value\" (focusout)=\"sendValue()\">\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'password'\">\r\n <input pInputText type=\"password\" [(ngModel)]=\"value\" (focusout)=\"sendValue()\">\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'enum'\">\r\n <p-dropdown [options]=\"control.enum\" [(ngModel)]=\"value\" (onChange)=\"sendValue()\"\r\n placeholder=\"Seleccione una opci\u00F3n\"></p-dropdown>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <p-dropdown [lazy]=\"isLoading\" [options]=\"dataFromService\" [(ngModel)]=\"value\" (onChange)=\"sendValue()\"\r\n [optionLabel]=\"control.config.optionLabel\" [optionValue]=\"control.config.optionValue\"\r\n placeholder=\"Seleccione una opci\u00F3n\"></p-dropdown>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-container>", components: [{ type: i2__namespace$1.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "resetFilterOnHide", "dropdownIcon", "optionGroupChildren", "autoDisplayFirst", "emptyFilterMessage", "emptyMessage", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "autofocusFilter", "disabled", "options", "filterValue", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "group", "showClear", "virtualScroll", "itemSize", "ariaFilterLabel", "ariaLabelledBy", "maxlength", "tooltipStyleClass"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide"] }], directives: [{ type: i7__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i7__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10__namespace.InputText, selector: "[pInputText]" }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
656
|
+
ControlComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ControlComponent, selector: "sf-control", inputs: { control: "control", label: "label", value: "value", appendTo: "appendTo" }, outputs: { setValue: "setValue", sendNotification: "sendNotification" }, ngImport: i0__namespace, template: "<!-- <p-blockUI [blocked]=\"isLoading\" [target]=\"cc\">\r\n <i class=\"pi pi-cog pi-spin\" style=\"font-size: 50px\"></i>\r\n</p-blockUI> -->\r\n\r\n<ng-container [ngSwitch]=\"control.type\">\r\n <label>{{label}}</label>\r\n <ng-container *ngSwitchCase=\"'string'\">\r\n <ng-container [ngSwitch]=\"control.subtype\">\r\n <ng-container *ngSwitchCase=\"'input'\">\r\n <input pInputText type=\"text\" [(ngModel)]=\"value\" (focusout)=\"sendValue()\">\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'password'\">\r\n <input pInputText type=\"password\" [(ngModel)]=\"value\" (focusout)=\"sendValue()\">\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'email'\">\r\n <input pInputText type=\"text\" [(ngModel)]=\"value\" placeholder=\"email@example.com\"\r\n (focusout)=\"validateValue('email')\">\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'phone'\">\r\n <p-inputMask mask=\"(999) 999-9999\" [(ngModel)]=\"value\" placeholder=\"(999) 999-9999\"\r\n (focusout)=\"sendValue()\"></p-inputMask>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'enum'\">\r\n <p-dropdown [options]=\"control.enum\" [(ngModel)]=\"value\" (onChange)=\"sendValue()\" [appendTo]=\"appendTo\"\r\n placeholder=\"Seleccione una opci\u00F3n\"></p-dropdown>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <p-dropdown [lazy]=\"isLoading\" [options]=\"dataFromService\" [(ngModel)]=\"value\" (onChange)=\"sendValue()\"\r\n [optionLabel]=\"control.config.optionLabel\" [optionValue]=\"control.config.optionValue\"\r\n [appendTo]=\"appendTo\" placeholder=\"Seleccione una opci\u00F3n\"></p-dropdown>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'autocomplete'\">\r\n <p-autoComplete [showEmptyMessage]=\"true\" [suggestions]=\"dataFromService\" [appendTo]=\"appendTo\"\r\n (completeMethod)=\"loadDataFromControlBusquedaService($event)\" [field]=\"control.field\"\r\n [minLength]=\"1\" (onSelect)=\"sendValueFromObject($event)\"></p-autoComplete>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <ng-container [ngSwitch]=\"control.subtype\">\r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n <p-calendar [(ngModel)]=\"value\" (onSelect)=\"sendValue()\" [monthNavigator]=\"true\" [yearNavigator]=\"true\"\r\n yearRange=\"1900:2035\" [dateFormat]=\"control?.format || 'yy-mm-dd'\" [appendTo]=\"appendTo\"></p-calendar>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'numeric'\">\r\n <ng-container [ngSwitch]=\"control.subtype\">\r\n <ng-container *ngSwitchCase=\"'currency'\">\r\n <p-inputNumber [(ngModel)]=\"value\" mode=\"currency\" [minFractionDigits]=\"control?.minFractionDigits || 0\"\r\n [min]=\"control?.min || null\" [max]=\"control?.max || null\" (focusout)=\"sendValue()\"\r\n [currency]=\"control?.currency || 'USD'\"></p-inputNumber>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'decimal'\">\r\n <p-inputNumber [(ngModel)]=\"value\" mode=\"decimal\" (focusout)=\"sendValue()\" [min]=\"control?.min || null\"\r\n [max]=\"control?.max || null\" [minFractionDigits]=\"control?.minFractionDigits || 0\"></p-inputNumber>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'percentage'\">\r\n <p-inputNumber [(ngModel)]=\"value\" suffix=\" %\" (focusout)=\"sendValue()\" [min]=\"control?.min || null\"\r\n [max]=\"control?.max || null\" [minFractionDigits]=\"control?.minFractionDigits || 2\"></p-inputNumber>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'file'\">\r\n <ng-container [ngSwitch]=\"control.subtype\">\r\n <ng-container *ngSwitchCase=\"'filetmp'\">\r\n <p-fileUpload [accept]=\"control.config.accept\" [customUpload]=\"true\" (uploadHandler)=\"onUpload($event)\"\r\n [maxFileSize]=\"control.config?.maxFileSize || null\" fileLimit=\"1\">\r\n <ng-template pTemplate=\"content\">\r\n <ul *ngIf=\"uploadedFiles.length\">\r\n <li *ngFor=\"let file of uploadedFiles\">{{file.name}} - {{file.size}} bytes</li>\r\n </ul>\r\n </ng-template>\r\n </p-fileUpload>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-container>", components: [{ type: i2__namespace$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown"] }, { type: i3__namespace$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide"] }, { type: i4__namespace$1.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "virtualScroll", "itemSize", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "field", "scrollHeight", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "suggestions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide"] }, { type: i5__namespace$1.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "numberOfMonths", "view", "touchUI", "timeSeparator", "focusTrap", "firstDayOfWeek", "showTransitionOptions", "hideTransitionOptions", "tabindex", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { type: i6__namespace$1.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "step", "inputStyle", "inputStyleClass", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }, { type: i7__namespace.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler"] }], directives: [{ type: i6__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i9__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10__namespace.InputText, selector: "[pInputText]" }, { type: i9__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3__namespace$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
590
657
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ControlComponent, decorators: [{
|
|
591
658
|
type: i0.Component,
|
|
592
659
|
args: [{
|
|
@@ -599,22 +666,134 @@
|
|
|
599
666
|
type: i0.Input
|
|
600
667
|
}], value: [{
|
|
601
668
|
type: i0.Input
|
|
669
|
+
}], appendTo: [{
|
|
670
|
+
type: i0.Input
|
|
602
671
|
}], setValue: [{
|
|
603
672
|
type: i0.Output
|
|
673
|
+
}], sendNotification: [{
|
|
674
|
+
type: i0.Output
|
|
604
675
|
}] } });
|
|
605
676
|
|
|
677
|
+
var RegistroChildComponent = /** @class */ (function () {
|
|
678
|
+
function RegistroChildComponent(ref, config) {
|
|
679
|
+
this.ref = ref;
|
|
680
|
+
this.config = config;
|
|
681
|
+
this.esquema = new Shema();
|
|
682
|
+
}
|
|
683
|
+
RegistroChildComponent.prototype.ngOnInit = function () {
|
|
684
|
+
var _a;
|
|
685
|
+
this.uiEsquema = this.config.data.uiEsquema[0];
|
|
686
|
+
this.esquema = this.config.data.esquema;
|
|
687
|
+
this.data = (_a = this.config.data) === null || _a === void 0 ? void 0 : _a.data;
|
|
688
|
+
if (!this.data) {
|
|
689
|
+
this.data = this.createObject(this.esquema);
|
|
690
|
+
this.setValue(this.config.data.id, '$..id');
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
RegistroChildComponent.prototype.getControl = function (scope) {
|
|
694
|
+
return jsonpath__namespace.query(this.esquema, scope)[0];
|
|
695
|
+
};
|
|
696
|
+
RegistroChildComponent.prototype.getValue = function (scope) {
|
|
697
|
+
return jsonpath__namespace.query(this.data, scope.replace('.properties', ''))[0];
|
|
698
|
+
};
|
|
699
|
+
RegistroChildComponent.prototype.setValue = function (value, scope) {
|
|
700
|
+
var _this = this;
|
|
701
|
+
switch (typeof (value)) {
|
|
702
|
+
case 'object':
|
|
703
|
+
value.forEach(function (val) { return jsonpath__namespace.value(_this.data, val.scope.replace('.properties', ''), val.value); });
|
|
704
|
+
break;
|
|
705
|
+
default:
|
|
706
|
+
jsonpath__namespace.value(this.data, scope.replace('.properties', ''), value);
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
};
|
|
710
|
+
RegistroChildComponent.prototype.createObject = function (esquema) {
|
|
711
|
+
var object = {};
|
|
712
|
+
switch (esquema.type) {
|
|
713
|
+
case 'numeric':
|
|
714
|
+
return (esquema === null || esquema === void 0 ? void 0 : esquema.default) || 0;
|
|
715
|
+
case 'string':
|
|
716
|
+
case 'date':
|
|
717
|
+
return (esquema === null || esquema === void 0 ? void 0 : esquema.default) ? this.setDefaultValue(esquema.default) : null;
|
|
718
|
+
case 'boolean':
|
|
719
|
+
return (esquema === null || esquema === void 0 ? void 0 : esquema.default) || false;
|
|
720
|
+
case 'file':
|
|
721
|
+
return null;
|
|
722
|
+
case 'array':
|
|
723
|
+
case 'object':
|
|
724
|
+
for (var key in esquema === null || esquema === void 0 ? void 0 : esquema.properties) {
|
|
725
|
+
Object.defineProperty(object, key, { value: this.createObject(esquema === null || esquema === void 0 ? void 0 : esquema.properties[key]), writable: true, enumerable: true, configurable: true });
|
|
726
|
+
}
|
|
727
|
+
break;
|
|
728
|
+
default:
|
|
729
|
+
break;
|
|
730
|
+
}
|
|
731
|
+
return object;
|
|
732
|
+
};
|
|
733
|
+
RegistroChildComponent.prototype.setDefaultValue = function (value) {
|
|
734
|
+
var data = null;
|
|
735
|
+
var uactivo;
|
|
736
|
+
switch (value) {
|
|
737
|
+
case '@uactivo':
|
|
738
|
+
uactivo = JSON.parse(localStorage.getItem('oSessionTFM') || '{}');
|
|
739
|
+
if (!uactivo)
|
|
740
|
+
console.log('Validar configuracion de sesion');
|
|
741
|
+
else
|
|
742
|
+
data = uactivo.UsuarioSistema.TDOC + "-" + uactivo.UsuarioSistema.NDOC;
|
|
743
|
+
break;
|
|
744
|
+
case '@tdocactivo':
|
|
745
|
+
uactivo = JSON.parse(sessionStorage.getItem('usrSesion') || '{}');
|
|
746
|
+
if (!uactivo)
|
|
747
|
+
console.log('Validar configuracion de sesion');
|
|
748
|
+
else
|
|
749
|
+
data = uactivo.UsuarioSistema.TDOC;
|
|
750
|
+
break;
|
|
751
|
+
case '@ndocactivo':
|
|
752
|
+
uactivo = JSON.parse(sessionStorage.getItem('usrSesion') || '{}');
|
|
753
|
+
if (!uactivo)
|
|
754
|
+
console.log('Validar configuracion de sesion');
|
|
755
|
+
else
|
|
756
|
+
data = uactivo.UsuarioSistema.NDOC;
|
|
757
|
+
break;
|
|
758
|
+
case '@hoy':
|
|
759
|
+
data = new Date();
|
|
760
|
+
break;
|
|
761
|
+
default:
|
|
762
|
+
data = value;
|
|
763
|
+
break;
|
|
764
|
+
}
|
|
765
|
+
return data;
|
|
766
|
+
};
|
|
767
|
+
RegistroChildComponent.prototype.sendValue = function () {
|
|
768
|
+
console.log(this.data);
|
|
769
|
+
};
|
|
770
|
+
return RegistroChildComponent;
|
|
771
|
+
}());
|
|
772
|
+
RegistroChildComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RegistroChildComponent, deps: [{ token: i1__namespace$1.DynamicDialogRef }, { token: i1__namespace$1.DynamicDialogConfig }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
773
|
+
RegistroChildComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RegistroChildComponent, selector: "lib-registro-child", ngImport: i0__namespace, template: "<div *ngFor=\"let element of uiEsquema.elements\" [class]=\"element?.class\">\n <ng-container [ngSwitch]=\"element.type\">\n <div *ngSwitchCase=\"'Label'\" [style]=\"element?.style\">\n {{element?.label}}\n </div>\n <ng-container *ngSwitchCase=\"'HorizontalLayout'\">\n <div *ngFor=\"let el of element.elements\" [class]=\"el?.class\" #a>\n <ng-container [ngSwitch]=\"el.type\">\n <sf-control *ngSwitchCase=\"'Control'\" [control]=\"getControl(el.scope)\" [label]=\"el.label\"\n [value]=\"getValue(el.scope)\" (setValue)=\"setValue($event, el.scope)\" \n (sendNotification)=\"sendNotification($event)\"></sf-control>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'VerticalLayout'\">\n <div *ngFor=\"let el of element.elements\" [class]=\"el?.class\">\n <ng-container [ngSwitch]=\"el.type\" #b>\n <sf-control *ngSwitchCase=\"'Control'\" [control]=\"getControl(el.scope)\" [label]=\"el.label\"\n [value]=\"getValue(el.scope)\" (setValue)=\"setValue($event, el.scope)\" [appendTo]=\"b\"\n (sendNotification)=\"sendNotification($event)\"></sf-control>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Control'\" #c>\n <sf-control [control]=\"getControl(element.scope)\" [label]=\"element.label\" [appendTo]=\"c\"></sf-control>\n </ng-container>\n </ng-container>\n</div>\n<div class=\"card-footer mt-2\">\n <button pButton pRipple type=\"button\" label=\"Guardar\" (click)=\"sendValue()\"></button>\n</div>", components: [{ type: ControlComponent, selector: "sf-control", inputs: ["control", "label", "value", "appendTo"], outputs: ["setValue", "sendNotification"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i8__namespace.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i9__namespace.Ripple, selector: "[pRipple]" }] });
|
|
774
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RegistroChildComponent, decorators: [{
|
|
775
|
+
type: i0.Component,
|
|
776
|
+
args: [{
|
|
777
|
+
selector: 'lib-registro-child',
|
|
778
|
+
templateUrl: './registro-child.component.html'
|
|
779
|
+
}]
|
|
780
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$1.DynamicDialogRef }, { type: i1__namespace$1.DynamicDialogConfig }]; } });
|
|
781
|
+
|
|
606
782
|
var RegistroComponent = /** @class */ (function () {
|
|
607
|
-
function RegistroComponent(generalService, router, messageSerice) {
|
|
783
|
+
function RegistroComponent(generalService, router, messageSerice, dialogService) {
|
|
608
784
|
this.generalService = generalService;
|
|
609
785
|
this.router = router;
|
|
610
786
|
this.messageSerice = messageSerice;
|
|
787
|
+
this.dialogService = dialogService;
|
|
611
788
|
this.idKatios = '';
|
|
612
789
|
this.idEntidad = '';
|
|
613
790
|
this.trx = '';
|
|
614
791
|
this.id = '';
|
|
615
|
-
this.
|
|
792
|
+
this.sendData = new i0.EventEmitter();
|
|
616
793
|
this.crudConfig = new CrudConfig();
|
|
794
|
+
this.enProceso = false;
|
|
617
795
|
this.configOperation = new Operations();
|
|
796
|
+
this.isLocal = false;
|
|
618
797
|
}
|
|
619
798
|
RegistroComponent.prototype.ngOnInit = function () {
|
|
620
799
|
this.loadConfigCrud();
|
|
@@ -626,6 +805,7 @@
|
|
|
626
805
|
this.generalService.getCrudByEntidad(this.idKatios, this.idEntidad)
|
|
627
806
|
.then(function (res) {
|
|
628
807
|
_this.crudConfig = res;
|
|
808
|
+
console.log(_this.crudConfig);
|
|
629
809
|
if (_this.trx != 'c')
|
|
630
810
|
_this.getInfoRegistro(_this.crudConfig.registro);
|
|
631
811
|
else {
|
|
@@ -675,16 +855,30 @@
|
|
|
675
855
|
return jsonpath__namespace.query(this.data, scope.replace('.properties', ''))[0];
|
|
676
856
|
};
|
|
677
857
|
RegistroComponent.prototype.setValue = function (value, scope) {
|
|
678
|
-
|
|
858
|
+
var _this = this;
|
|
859
|
+
switch (typeof (value)) {
|
|
860
|
+
case 'object':
|
|
861
|
+
value.forEach(function (val) { return jsonpath__namespace.value(_this.data, val.scope.replace('.properties', ''), val.value); });
|
|
862
|
+
break;
|
|
863
|
+
default:
|
|
864
|
+
jsonpath__namespace.value(this.data, scope.replace('.properties', ''), value);
|
|
865
|
+
break;
|
|
866
|
+
}
|
|
679
867
|
};
|
|
680
868
|
RegistroComponent.prototype.createObject = function (esquema) {
|
|
681
869
|
var object = {};
|
|
682
870
|
switch (esquema.type) {
|
|
871
|
+
case 'numeric':
|
|
872
|
+
return (esquema === null || esquema === void 0 ? void 0 : esquema.default) || 0;
|
|
683
873
|
case 'string':
|
|
684
|
-
case '
|
|
685
|
-
return (esquema === null || esquema === void 0 ? void 0 : esquema.default)
|
|
874
|
+
case 'date':
|
|
875
|
+
return (esquema === null || esquema === void 0 ? void 0 : esquema.default) ? this.setDefaultValue(esquema.default) : null;
|
|
686
876
|
case 'boolean':
|
|
687
877
|
return (esquema === null || esquema === void 0 ? void 0 : esquema.default) || false;
|
|
878
|
+
case 'array':
|
|
879
|
+
return [];
|
|
880
|
+
case 'file':
|
|
881
|
+
return null;
|
|
688
882
|
case 'object':
|
|
689
883
|
for (var key in esquema === null || esquema === void 0 ? void 0 : esquema.properties) {
|
|
690
884
|
Object.defineProperty(object, key, { value: this.createObject(esquema === null || esquema === void 0 ? void 0 : esquema.properties[key]), writable: true, enumerable: true, configurable: true });
|
|
@@ -696,26 +890,24 @@
|
|
|
696
890
|
return object;
|
|
697
891
|
};
|
|
698
892
|
RegistroComponent.prototype.submit = function () {
|
|
699
|
-
|
|
700
|
-
if (!this.validateData())
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
endpoint = endpoint.replace('@
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
_this.enProceso = false;
|
|
718
|
-
});
|
|
893
|
+
console.log(this.data);
|
|
894
|
+
// if (!this.validateData()) return;
|
|
895
|
+
// this.enProceso = true;
|
|
896
|
+
// let endpoint = this.configOperation.endpoint;
|
|
897
|
+
// endpoint = endpoint.replace('@idKatios', this.idKatios)
|
|
898
|
+
// endpoint = endpoint.replace('@id', this.id)
|
|
899
|
+
// this.generalService.genericRequest(this.configOperation.method, this.configOperation.server, endpoint, this.data)
|
|
900
|
+
// .then(() => {
|
|
901
|
+
// this.messageSerice.add({ severity: 'success', detail: `Proceso exitoso!` })
|
|
902
|
+
// setTimeout(() => {
|
|
903
|
+
// this.enProceso = false;
|
|
904
|
+
// this.back()
|
|
905
|
+
// }, 2000);
|
|
906
|
+
// })
|
|
907
|
+
// .catch(err => {
|
|
908
|
+
// this.messageSerice.add({ severity: 'warn', detail: `${err?.error?.message || 'Error no controlado, por favor comunicarse con del admin.'}` })
|
|
909
|
+
// this.enProceso = false;
|
|
910
|
+
// })
|
|
719
911
|
};
|
|
720
912
|
RegistroComponent.prototype.validateData = function () {
|
|
721
913
|
if (this.configOperation.validations.type == 'local')
|
|
@@ -733,18 +925,67 @@
|
|
|
733
925
|
this.messageSerice.add({ severity: 'warn', detail: err.join('. ') });
|
|
734
926
|
return err.length == 0;
|
|
735
927
|
};
|
|
928
|
+
RegistroComponent.prototype.setDefaultValue = function (value) {
|
|
929
|
+
var data = null;
|
|
930
|
+
var uactivo;
|
|
931
|
+
switch (value) {
|
|
932
|
+
case '@uactivo':
|
|
933
|
+
uactivo = JSON.parse(localStorage.getItem('oSessionTFM') || '{}');
|
|
934
|
+
if (!uactivo)
|
|
935
|
+
console.log('Validar configuracion de sesion');
|
|
936
|
+
else
|
|
937
|
+
data = uactivo.UsuarioSistema.TDOC + "-" + uactivo.UsuarioSistema.NDOC;
|
|
938
|
+
break;
|
|
939
|
+
case '@tdocactivo':
|
|
940
|
+
uactivo = JSON.parse(sessionStorage.getItem('usrSesion') || '{}');
|
|
941
|
+
if (!uactivo)
|
|
942
|
+
console.log('Validar configuracion de sesion');
|
|
943
|
+
else
|
|
944
|
+
data = uactivo.UsuarioSistema.TDOC;
|
|
945
|
+
break;
|
|
946
|
+
case '@ndocactivo':
|
|
947
|
+
uactivo = JSON.parse(sessionStorage.getItem('usrSesion') || '{}');
|
|
948
|
+
if (!uactivo)
|
|
949
|
+
console.log('Validar configuracion de sesion');
|
|
950
|
+
else
|
|
951
|
+
data = uactivo.UsuarioSistema.NDOC;
|
|
952
|
+
break;
|
|
953
|
+
case '@hoy':
|
|
954
|
+
data = new Date();
|
|
955
|
+
break;
|
|
956
|
+
default:
|
|
957
|
+
data = value;
|
|
958
|
+
break;
|
|
959
|
+
}
|
|
960
|
+
return data;
|
|
961
|
+
};
|
|
962
|
+
RegistroComponent.prototype.sendNotification = function (message) {
|
|
963
|
+
this.messageSerice.add(message);
|
|
964
|
+
};
|
|
965
|
+
RegistroComponent.prototype.addObjectArray = function (element) {
|
|
966
|
+
this.dialogRef = this.dialogService.open(RegistroChildComponent, {
|
|
967
|
+
header: "Detalle",
|
|
968
|
+
width: '70%',
|
|
969
|
+
data: {
|
|
970
|
+
uiEsquema: Object.assign({}, element.elements),
|
|
971
|
+
esquema: this.getControl(element.scope),
|
|
972
|
+
id: this.getValue(element.scope).length + 1
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
};
|
|
736
976
|
return RegistroComponent;
|
|
737
977
|
}());
|
|
738
|
-
RegistroComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RegistroComponent, deps: [{ token: GeneralService }, { token: i2__namespace.Router }, { token: i3__namespace$1.MessageService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
739
|
-
RegistroComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RegistroComponent, selector: "sf-registro", inputs: { idKatios: "idKatios", idEntidad: "idEntidad", trx: "trx", id: "id" }, providers: [i3$1.MessageService], ngImport: i0__namespace, template: "<p-blockUI [blocked]=\"enProceso\">\r\n <i class=\"pi pi-cog pi-spin\" style=\"font-size: 50px\"></i>\r\n</p-blockUI>\r\n\r\n<p-toast></p-toast>\r\n\r\n<div class=\"card\" *ngIf=\"!enProceso\">\r\n <h5 class=\"card-header mb-2\" style=\"display: flex; justify-content: space-between;align-items: center;\">\r\n <span>{{idEntidad}} {{id != '' ? '-' + id : ''}}</span>\r\n <button pButton pRipple type=\"button\" icon=\"pi pi-arrow-left\" (click)=\"back()\"></button>\r\n </h5>\r\n <div *ngFor=\"let element of crudConfig.uiEsquema.elements\" [class]=\"element?.class\">\r\n <ng-container [ngSwitch]=\"element.type\">\r\n <div *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\" [class]=\"el?.class\">\r\n <ng-container [ngSwitch]=\"el.type\"
|
|
978
|
+
RegistroComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RegistroComponent, deps: [{ token: GeneralService }, { token: i2__namespace.Router }, { token: i3__namespace$1.MessageService }, { token: i1__namespace$1.DialogService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
979
|
+
RegistroComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RegistroComponent, selector: "sf-registro", inputs: { idKatios: "idKatios", idEntidad: "idEntidad", trx: "trx", id: "id" }, outputs: { sendData: "sendData" }, providers: [i3$1.MessageService, i1$1.DialogService, i1$1.DynamicDialogConfig, i1$1.DynamicDialogRef], ngImport: i0__namespace, template: "<p-blockUI [blocked]=\"enProceso\">\r\n <i class=\"pi pi-cog pi-spin\" style=\"font-size: 50px\"></i>\r\n</p-blockUI>\r\n\r\n<p-toast></p-toast>\r\n\r\n<div class=\"card\" *ngIf=\"!enProceso\">\r\n <h5 class=\"card-header mb-2\" style=\"display: flex; justify-content: space-between;align-items: center;\">\r\n <span>{{crudConfig.registro?.label || idEntidad}} {{id != '' ? '-' + id : ''}}</span>\r\n <button pButton pRipple type=\"button\" icon=\"pi pi-arrow-left\" (click)=\"back()\"></button>\r\n </h5>\r\n <div *ngFor=\"let element of crudConfig.uiEsquema.elements\" [class]=\"element?.class\">\r\n <ng-container [ngSwitch]=\"element.type\">\r\n <div *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\" [class]=\"el?.class\">\r\n <ng-container [ngSwitch]=\"el.type\">\r\n <sf-control *ngSwitchCase=\"'Control'\" [control]=\"getControl(el.scope)\" [label]=\"el.label\"\r\n [value]=\"getValue(el.scope)\" (setValue)=\"setValue($event, el.scope)\"\r\n (sendNotification)=\"sendNotification($event)\"></sf-control>\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\" [class]=\"el?.class\">\r\n <ng-container [ngSwitch]=\"el.type\">\r\n <sf-control *ngSwitchCase=\"'Control'\" [control]=\"getControl(el.scope)\" [label]=\"el.label\"\r\n [value]=\"getValue(el.scope)\" (setValue)=\"setValue($event, el.scope)\"\r\n (sendNotification)=\"sendNotification($event)\"></sf-control>\r\n <ng-container *ngSwitchCase=\"'Table'\">\r\n <p-table [value]=\"getValue(el.scope)\" [columns]=\"getControl(el.scope).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\"></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 </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\r\n <tr>\r\n <ng-container *ngFor=\"let col of columns\" [ngSwitch]=\"control.subtype\">\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <td>{{rowData[col.col]}}</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>\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=\"'Control'\">\r\n <sf-control [control]=\"getControl(element.scope)\" [label]=\"element.label\"></sf-control>\r\n </ng-container>\r\n </ng-container>\r\n </div>\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)=\"submit()\"></button>\r\n </div>\r\n</div>\r\n", components: [{ type: i3__namespace.BlockUI, selector: "p-blockUI", inputs: ["target", "autoZIndex", "baseZIndex", "styleClass", "blocked"] }, { type: i6__namespace$2.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { type: ControlComponent, selector: "sf-control", inputs: ["control", "label", "value", "appendTo"], outputs: ["setValue", "sendNotification"] }, { type: i5__namespace.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollDelay", "virtualRowHeight", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "stateKey", "stateStorage", "editMode", "groupRowsBy", "minBufferPx", "maxBufferPx", "responsiveLayout", "breakpoint", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection"], outputs: ["selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i9__namespace.Ripple, selector: "[pRipple]" }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], pipes: { "currency": i6__namespace.CurrencyPipe } });
|
|
740
980
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RegistroComponent, decorators: [{
|
|
741
981
|
type: i0.Component,
|
|
742
982
|
args: [{
|
|
743
983
|
selector: 'sf-registro',
|
|
744
984
|
templateUrl: './registro.component.html',
|
|
745
|
-
providers: [i3$1.MessageService]
|
|
985
|
+
providers: [i3$1.MessageService, i1$1.DialogService, i1$1.DynamicDialogConfig, i1$1.DynamicDialogRef],
|
|
986
|
+
entryComponents: [RegistroComponent]
|
|
746
987
|
}]
|
|
747
|
-
}], ctorParameters: function () { return [{ type: GeneralService }, { type: i2__namespace.Router }, { type: i3__namespace$1.MessageService }]; }, propDecorators: { idKatios: [{
|
|
988
|
+
}], ctorParameters: function () { return [{ type: GeneralService }, { type: i2__namespace.Router }, { type: i3__namespace$1.MessageService }, { type: i1__namespace$1.DialogService }]; }, propDecorators: { idKatios: [{
|
|
748
989
|
type: i0.Input
|
|
749
990
|
}], idEntidad: [{
|
|
750
991
|
type: i0.Input
|
|
@@ -752,6 +993,8 @@
|
|
|
752
993
|
type: i0.Input
|
|
753
994
|
}], id: [{
|
|
754
995
|
type: i0.Input
|
|
996
|
+
}], sendData: [{
|
|
997
|
+
type: i0.Output
|
|
755
998
|
}] } });
|
|
756
999
|
|
|
757
1000
|
var SfCrudComponent = /** @class */ (function () {
|
|
@@ -781,14 +1024,16 @@
|
|
|
781
1024
|
SfCrudModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfCrudModule, declarations: [SfCrudComponent,
|
|
782
1025
|
TableroComponent,
|
|
783
1026
|
RegistroComponent,
|
|
784
|
-
ControlComponent
|
|
1027
|
+
ControlComponent,
|
|
1028
|
+
RegistroChildComponent], imports: [accordion.AccordionModule,
|
|
1029
|
+
i4$1.AutoCompleteModule,
|
|
785
1030
|
avatargroup.AvatarGroupModule,
|
|
786
1031
|
avatar.AvatarModule,
|
|
787
1032
|
badge.BadgeModule,
|
|
788
1033
|
i3.BlockUIModule,
|
|
789
1034
|
breadcrumb.BreadcrumbModule,
|
|
790
1035
|
i8.ButtonModule,
|
|
791
|
-
|
|
1036
|
+
i5$1.CalendarModule,
|
|
792
1037
|
card.CardModule,
|
|
793
1038
|
carousel.CarouselModule,
|
|
794
1039
|
cascadeselect.CascadeSelectModule,
|
|
@@ -802,15 +1047,16 @@
|
|
|
802
1047
|
contextmenu.ContextMenuModule,
|
|
803
1048
|
dialog.DialogModule,
|
|
804
1049
|
divider.DividerModule,
|
|
805
|
-
|
|
1050
|
+
i3$2.DropdownModule,
|
|
1051
|
+
i1$1.DynamicDialogModule,
|
|
806
1052
|
fieldset.FieldsetModule,
|
|
807
|
-
|
|
808
|
-
|
|
1053
|
+
i7.FileUploadModule,
|
|
1054
|
+
i9$1.FormsModule,
|
|
809
1055
|
galleria.GalleriaModule,
|
|
810
1056
|
i1.HttpClientModule,
|
|
811
1057
|
inplace.InplaceModule,
|
|
812
|
-
|
|
813
|
-
|
|
1058
|
+
i2$1.InputMaskModule,
|
|
1059
|
+
i6$1.InputNumberModule,
|
|
814
1060
|
inputswitch.InputSwitchModule,
|
|
815
1061
|
inputtextarea.InputTextareaModule,
|
|
816
1062
|
i10.InputTextModule,
|
|
@@ -848,22 +1094,24 @@
|
|
|
848
1094
|
terminal.TerminalModule,
|
|
849
1095
|
tieredmenu.TieredMenuModule,
|
|
850
1096
|
timeline.TimelineModule,
|
|
851
|
-
|
|
1097
|
+
i6$2.ToastModule,
|
|
852
1098
|
togglebutton.ToggleButtonModule,
|
|
853
1099
|
i4.ToolbarModule,
|
|
854
1100
|
i11.TooltipModule,
|
|
855
1101
|
tree.TreeModule], exports: [SfCrudComponent,
|
|
856
1102
|
TableroComponent,
|
|
857
|
-
RegistroComponent
|
|
1103
|
+
RegistroComponent,
|
|
1104
|
+
ControlComponent] });
|
|
858
1105
|
SfCrudModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfCrudModule, imports: [[
|
|
859
1106
|
accordion.AccordionModule,
|
|
1107
|
+
i4$1.AutoCompleteModule,
|
|
860
1108
|
avatargroup.AvatarGroupModule,
|
|
861
1109
|
avatar.AvatarModule,
|
|
862
1110
|
badge.BadgeModule,
|
|
863
1111
|
i3.BlockUIModule,
|
|
864
1112
|
breadcrumb.BreadcrumbModule,
|
|
865
1113
|
i8.ButtonModule,
|
|
866
|
-
|
|
1114
|
+
i5$1.CalendarModule,
|
|
867
1115
|
card.CardModule,
|
|
868
1116
|
carousel.CarouselModule,
|
|
869
1117
|
cascadeselect.CascadeSelectModule,
|
|
@@ -877,15 +1125,16 @@
|
|
|
877
1125
|
contextmenu.ContextMenuModule,
|
|
878
1126
|
dialog.DialogModule,
|
|
879
1127
|
divider.DividerModule,
|
|
880
|
-
|
|
1128
|
+
i3$2.DropdownModule,
|
|
1129
|
+
i1$1.DynamicDialogModule,
|
|
881
1130
|
fieldset.FieldsetModule,
|
|
882
|
-
|
|
883
|
-
|
|
1131
|
+
i7.FileUploadModule,
|
|
1132
|
+
i9$1.FormsModule,
|
|
884
1133
|
galleria.GalleriaModule,
|
|
885
1134
|
i1.HttpClientModule,
|
|
886
1135
|
inplace.InplaceModule,
|
|
887
|
-
|
|
888
|
-
|
|
1136
|
+
i2$1.InputMaskModule,
|
|
1137
|
+
i6$1.InputNumberModule,
|
|
889
1138
|
inputswitch.InputSwitchModule,
|
|
890
1139
|
inputtextarea.InputTextareaModule,
|
|
891
1140
|
i10.InputTextModule,
|
|
@@ -923,7 +1172,7 @@
|
|
|
923
1172
|
terminal.TerminalModule,
|
|
924
1173
|
tieredmenu.TieredMenuModule,
|
|
925
1174
|
timeline.TimelineModule,
|
|
926
|
-
|
|
1175
|
+
i6$2.ToastModule,
|
|
927
1176
|
togglebutton.ToggleButtonModule,
|
|
928
1177
|
i4.ToolbarModule,
|
|
929
1178
|
i11.TooltipModule,
|
|
@@ -936,17 +1185,19 @@
|
|
|
936
1185
|
SfCrudComponent,
|
|
937
1186
|
TableroComponent,
|
|
938
1187
|
RegistroComponent,
|
|
939
|
-
ControlComponent
|
|
1188
|
+
ControlComponent,
|
|
1189
|
+
RegistroChildComponent
|
|
940
1190
|
],
|
|
941
1191
|
imports: [
|
|
942
1192
|
accordion.AccordionModule,
|
|
1193
|
+
i4$1.AutoCompleteModule,
|
|
943
1194
|
avatargroup.AvatarGroupModule,
|
|
944
1195
|
avatar.AvatarModule,
|
|
945
1196
|
badge.BadgeModule,
|
|
946
1197
|
i3.BlockUIModule,
|
|
947
1198
|
breadcrumb.BreadcrumbModule,
|
|
948
1199
|
i8.ButtonModule,
|
|
949
|
-
|
|
1200
|
+
i5$1.CalendarModule,
|
|
950
1201
|
card.CardModule,
|
|
951
1202
|
carousel.CarouselModule,
|
|
952
1203
|
cascadeselect.CascadeSelectModule,
|
|
@@ -960,15 +1211,16 @@
|
|
|
960
1211
|
contextmenu.ContextMenuModule,
|
|
961
1212
|
dialog.DialogModule,
|
|
962
1213
|
divider.DividerModule,
|
|
963
|
-
|
|
1214
|
+
i3$2.DropdownModule,
|
|
1215
|
+
i1$1.DynamicDialogModule,
|
|
964
1216
|
fieldset.FieldsetModule,
|
|
965
|
-
|
|
966
|
-
|
|
1217
|
+
i7.FileUploadModule,
|
|
1218
|
+
i9$1.FormsModule,
|
|
967
1219
|
galleria.GalleriaModule,
|
|
968
1220
|
i1.HttpClientModule,
|
|
969
1221
|
inplace.InplaceModule,
|
|
970
|
-
|
|
971
|
-
|
|
1222
|
+
i2$1.InputMaskModule,
|
|
1223
|
+
i6$1.InputNumberModule,
|
|
972
1224
|
inputswitch.InputSwitchModule,
|
|
973
1225
|
inputtextarea.InputTextareaModule,
|
|
974
1226
|
i10.InputTextModule,
|
|
@@ -1006,7 +1258,7 @@
|
|
|
1006
1258
|
terminal.TerminalModule,
|
|
1007
1259
|
tieredmenu.TieredMenuModule,
|
|
1008
1260
|
timeline.TimelineModule,
|
|
1009
|
-
|
|
1261
|
+
i6$2.ToastModule,
|
|
1010
1262
|
togglebutton.ToggleButtonModule,
|
|
1011
1263
|
i4.ToolbarModule,
|
|
1012
1264
|
i11.TooltipModule,
|
|
@@ -1015,7 +1267,11 @@
|
|
|
1015
1267
|
exports: [
|
|
1016
1268
|
SfCrudComponent,
|
|
1017
1269
|
TableroComponent,
|
|
1018
|
-
RegistroComponent
|
|
1270
|
+
RegistroComponent,
|
|
1271
|
+
ControlComponent
|
|
1272
|
+
],
|
|
1273
|
+
entryComponents: [
|
|
1274
|
+
RegistroChildComponent
|
|
1019
1275
|
]
|
|
1020
1276
|
}]
|
|
1021
1277
|
}] });
|
|
@@ -1042,6 +1298,7 @@
|
|
|
1042
1298
|
* Generated bundle index. Do not edit.
|
|
1043
1299
|
*/
|
|
1044
1300
|
|
|
1301
|
+
exports.ControlComponent = ControlComponent;
|
|
1045
1302
|
exports.RegistroComponent = RegistroComponent;
|
|
1046
1303
|
exports.SfCrudComponent = SfCrudComponent;
|
|
1047
1304
|
exports.SfCrudModule = SfCrudModule;
|