sf-crud 12.0.1-beta27 → 12.0.1-beta28
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 +88 -64
- package/bundles/sf-crud.umd.js.map +1 -1
- package/esm2015/lib/components/control/control.component.js +15 -13
- package/esm2015/lib/components/registro/registro.component.js +43 -33
- package/esm2015/lib/components/registro-child/registro-child.component.js +2 -2
- package/esm2015/lib/components/tablero/tablero.component.js +2 -2
- package/esm2015/lib/sf-crud.service.js +16 -2
- package/esm2015/lib/shared/models/crud-config.model.js +43 -0
- package/esm2015/lib/shared/models/data-temp-crud.model.js +6 -0
- package/esm2015/lib/shared/models/shema.model.js +7 -0
- package/esm2015/lib/shared/services/general.service.js +1 -1
- package/fesm2015/sf-crud.js +68 -44
- package/fesm2015/sf-crud.js.map +1 -1
- package/lib/components/control/control.component.d.ts +1 -1
- package/lib/components/registro/registro.component.d.ts +8 -5
- package/lib/components/registro-child/registro-child.component.d.ts +1 -1
- package/lib/components/tablero/tablero.component.d.ts +1 -1
- package/lib/sf-crud.service.d.ts +4 -0
- package/lib/shared/models/data-temp-crud.model.d.ts +4 -0
- package/lib/shared/services/general.service.d.ts +1 -1
- package/package.json +1 -1
- package/esm2015/lib/shared/services/models/crud-config.model.js +0 -43
- package/esm2015/lib/shared/services/models/shema.model.js +0 -7
- /package/lib/shared/{services/models → models}/crud-config.model.d.ts +0 -0
- /package/lib/shared/{services/models → models}/shema.model.d.ts +0 -0
package/bundles/sf-crud.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('jsonpath'), 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('primeng/toast'), require('primeng/inputmask'), require('primeng/dropdown'), require('primeng/autocomplete'), require('primeng/calendar'), require('primeng/inputnumber'), require('primeng/fileupload'), require('@angular/forms'), 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
3
|
typeof define === 'function' && define.amd ? define('sf-crud', ['exports', '@angular/core', 'jsonpath', '@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', 'primeng/toast', 'primeng/inputmask', 'primeng/dropdown', 'primeng/autocomplete', 'primeng/calendar', 'primeng/inputnumber', 'primeng/fileupload', '@angular/forms', '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.jsonpath, 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.i3$3, global.
|
|
5
|
-
})(this, (function (exports, i0, jsonpath, i1, i2, i3, i4, i5, i6, i3$1, i8, i9, i10, i11, i1$1, i3$3,
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["sf-crud"] = {}, global.ng.core, global.jsonpath, 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.i3$3, global.i3$2, global.i4$1, global.i5$1, global.i6$1, global.i7, global.i8$1, global.ng.forms, 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, jsonpath, i1, i2, i3, i4, i5, i6, i3$1, i8, i9, i10, i11, i1$1, i3$3, i3$2, i4$1, i5$1, i6$1, i7, i8$1, i10$1, 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;
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
|
|
38
38
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
39
39
|
var i3__namespace$3 = /*#__PURE__*/_interopNamespace(i3$3);
|
|
40
|
-
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
41
40
|
var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
|
|
42
41
|
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
|
|
43
42
|
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
44
43
|
var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
|
|
45
44
|
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
46
|
-
var
|
|
45
|
+
var i8__namespace$1 = /*#__PURE__*/_interopNamespace(i8$1);
|
|
46
|
+
var i10__namespace$1 = /*#__PURE__*/_interopNamespace(i10$1);
|
|
47
47
|
|
|
48
48
|
var Shema = /** @class */ (function () {
|
|
49
49
|
function Shema() {
|
|
@@ -696,6 +696,7 @@
|
|
|
696
696
|
ControlComponent.prototype.loadDataFromService = function () {
|
|
697
697
|
var _this = this;
|
|
698
698
|
this.isLoading = true;
|
|
699
|
+
this.dataFromService = [];
|
|
699
700
|
this.generalService.genericRequest(this.control.config.method, this.control.config.server, this.control.config.endpoint)
|
|
700
701
|
.then(function (res) {
|
|
701
702
|
_this.dataFromService = res.data;
|
|
@@ -741,7 +742,7 @@
|
|
|
741
742
|
return ControlComponent;
|
|
742
743
|
}());
|
|
743
744
|
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 });
|
|
744
|
-
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 [disabled]=\"control?.disabled || false\">\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'password'\">\r\n <input pInputText type=\"password\" [(ngModel)]=\"value\" (focusout)=\"sendValue()\"\r\n [disabled]=\"control?.disabled || false\">\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')\" [disabled]=\"control?.disabled || false\">\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()\" [disabled]=\"control?.disabled || false\"></p-inputMask>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'enum'\">\r\n <p-dropdown [options]=\"control.enum\" [(ngModel)]=\"value\" (onChange)=\"sendValue()\" appendTo=\"body\"\r\n placeholder=\"Seleccione una opci\u00F3n\" [disabled]=\"control?.disabled || false\"></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\" (onClick)=\"refresData()\"\r\n appendTo=\"body\" placeholder=\"Seleccione una opci\u00F3n\"\r\n [disabled]=\"control?.disabled || false\"></p-dropdown>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'autocomplete'\">\r\n <p-autoComplete [showEmptyMessage]=\"true\" [suggestions]=\"dataFromService\" appendTo=\"body\"\r\n (completeMethod)=\"loadDataFromControlBusquedaService($event)\" [field]=\"control.field\"\r\n [minLength]=\"1\" (onSelect)=\"sendValueFromObject($event)\"\r\n [disabled]=\"control?.disabled || false\"></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=\"body\"\r\n [disabled]=\"control?.disabled || false\"></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'\" [disabled]=\"control?.disabled || false\"></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\"\r\n [disabled]=\"control?.disabled || false\"></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\"\r\n [disabled]=\"control?.disabled || false\"></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"] }] });
|
|
745
|
+
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\" #cc>\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 [disabled]=\"control?.disabled || false\">\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'password'\">\r\n <input pInputText type=\"password\" [(ngModel)]=\"value\" (focusout)=\"sendValue()\"\r\n [disabled]=\"control?.disabled || false\">\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')\" [disabled]=\"control?.disabled || false\">\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()\" [disabled]=\"control?.disabled || false\"></p-inputMask>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'enum'\">\r\n <p-dropdown [options]=\"control.enum\" [(ngModel)]=\"value\" (onChange)=\"sendValue()\" appendTo=\"body\"\r\n placeholder=\"Seleccione una opci\u00F3n\" [disabled]=\"control?.disabled || false\"></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?.field || control.config.optionValue\" (onClick)=\"refresData()\"\r\n appendTo=\"body\" placeholder=\"Seleccione una opci\u00F3n\"\r\n [disabled]=\"control?.disabled || false\"></p-dropdown>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown:replace'\">\r\n <p-dropdown [lazy]=\"isLoading\" [options]=\"dataFromService\" (onChange)=\"sendValueFromObject($event.value)\"\r\n [optionLabel]=\"control.config.optionLabel\" (onClick)=\"refresData()\"\r\n appendTo=\"body\" placeholder=\"Seleccione una opci\u00F3n\"\r\n [disabled]=\"control?.disabled || false\"></p-dropdown>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'autocomplete'\">\r\n <p-autoComplete [showEmptyMessage]=\"true\" [suggestions]=\"dataFromService\" appendTo=\"body\"\r\n (completeMethod)=\"loadDataFromControlBusquedaService($event)\" [field]=\"control.field\"\r\n [minLength]=\"1\" (onSelect)=\"sendValueFromObject($event)\"\r\n [disabled]=\"control?.disabled || false\"></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=\"body\"\r\n [disabled]=\"control?.disabled || false\"></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'\" [disabled]=\"control?.disabled || false\"></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\"\r\n [disabled]=\"control?.disabled || false\"></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\"\r\n [disabled]=\"control?.disabled || false\"></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: i3__namespace.BlockUI, selector: "p-blockUI", inputs: ["target", "autoZIndex", "baseZIndex", "styleClass", "blocked"] }, { type: i3__namespace$2.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: i4__namespace$1.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: i5__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: i6__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: i7__namespace.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: i8__namespace$1.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: i10__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: i10__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i10__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"] }] });
|
|
745
746
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ControlComponent, decorators: [{
|
|
746
747
|
type: i0.Component,
|
|
747
748
|
args: [{
|
|
@@ -950,21 +951,51 @@
|
|
|
950
951
|
}]
|
|
951
952
|
}], ctorParameters: function () { return [{ type: i1__namespace$1.DynamicDialogRef }, { type: i1__namespace$1.DynamicDialogConfig }, { type: i3__namespace$1.MessageService }]; } });
|
|
952
953
|
|
|
954
|
+
var SfCrudService = /** @class */ (function () {
|
|
955
|
+
function SfCrudService() {
|
|
956
|
+
this._dataTemp = [];
|
|
957
|
+
}
|
|
958
|
+
SfCrudService.prototype.saveDataTemp = function (scope, value) {
|
|
959
|
+
this._dataTemp.push({ scope: scope, value: value });
|
|
960
|
+
sessionStorage.setItem('dataTemp', JSON.stringify(this._dataTemp));
|
|
961
|
+
};
|
|
962
|
+
SfCrudService.prototype.getDataTemp = function () {
|
|
963
|
+
var dataTemp = sessionStorage.getItem('dataTemp');
|
|
964
|
+
sessionStorage.removeItem('dataTemp');
|
|
965
|
+
return dataTemp ? JSON.parse(dataTemp) : [];
|
|
966
|
+
};
|
|
967
|
+
SfCrudService.prototype.cleanDataTemp = function () {
|
|
968
|
+
sessionStorage.removeItem('dataTemp');
|
|
969
|
+
};
|
|
970
|
+
return SfCrudService;
|
|
971
|
+
}());
|
|
972
|
+
SfCrudService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfCrudService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
973
|
+
SfCrudService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfCrudService, providedIn: 'root' });
|
|
974
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfCrudService, decorators: [{
|
|
975
|
+
type: i0.Injectable,
|
|
976
|
+
args: [{
|
|
977
|
+
providedIn: 'root'
|
|
978
|
+
}]
|
|
979
|
+
}], ctorParameters: function () { return []; } });
|
|
980
|
+
|
|
953
981
|
var RegistroComponent = /** @class */ (function () {
|
|
954
|
-
function RegistroComponent(generalService, router, messageSerice, dialogService) {
|
|
982
|
+
function RegistroComponent(generalService, router, messageSerice, dialogService, sfCrudService) {
|
|
955
983
|
this.generalService = generalService;
|
|
956
984
|
this.router = router;
|
|
957
985
|
this.messageSerice = messageSerice;
|
|
958
986
|
this.dialogService = dialogService;
|
|
987
|
+
this.sfCrudService = sfCrudService;
|
|
959
988
|
this.idKatios = '';
|
|
960
989
|
this.idEntidad = '';
|
|
961
990
|
this.trx = '';
|
|
962
991
|
this.id = '';
|
|
963
992
|
this.sendData = new i0.EventEmitter();
|
|
993
|
+
this.dataTemp = [];
|
|
964
994
|
this.crudConfig = new CrudConfig();
|
|
965
995
|
this.enProceso = false;
|
|
966
996
|
this.configOperation = new Operations();
|
|
967
997
|
this.isLocal = false;
|
|
998
|
+
this.dataTemp = this.sfCrudService.getDataTemp();
|
|
968
999
|
}
|
|
969
1000
|
RegistroComponent.prototype.ngOnInit = function () {
|
|
970
1001
|
this.loadConfigCrud();
|
|
@@ -975,6 +1006,7 @@
|
|
|
975
1006
|
this.enProceso = true;
|
|
976
1007
|
this.generalService.getCrudByEntidad(this.idKatios, this.idEntidad)
|
|
977
1008
|
.then(function (res) {
|
|
1009
|
+
_this.setDataTemp(res.esquema, _this.dataTemp);
|
|
978
1010
|
_this.crudConfig = res;
|
|
979
1011
|
console.log(_this.crudConfig);
|
|
980
1012
|
if (_this.trx != 'c')
|
|
@@ -1065,25 +1097,28 @@
|
|
|
1065
1097
|
return object;
|
|
1066
1098
|
};
|
|
1067
1099
|
RegistroComponent.prototype.submit = function () {
|
|
1100
|
+
var _this = this;
|
|
1068
1101
|
console.log(this.data);
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1102
|
+
if (!this.validateData())
|
|
1103
|
+
return;
|
|
1104
|
+
this.applyValuesOnEvent('onSubmit', this.crudConfig.esquema);
|
|
1105
|
+
this.enProceso = true;
|
|
1106
|
+
var endpoint = this.configOperation.endpoint;
|
|
1107
|
+
endpoint = endpoint.replace('@idKatios', this.idKatios);
|
|
1108
|
+
endpoint = endpoint.replace('@id', this.id);
|
|
1109
|
+
this.generalService.genericRequest(this.configOperation.method, this.configOperation.server, endpoint, this.data)
|
|
1110
|
+
.then(function () {
|
|
1111
|
+
_this.messageSerice.add({ severity: 'success', detail: "Proceso exitoso!" });
|
|
1112
|
+
setTimeout(function () {
|
|
1113
|
+
_this.enProceso = false;
|
|
1114
|
+
_this.back();
|
|
1115
|
+
}, 2000);
|
|
1116
|
+
})
|
|
1117
|
+
.catch(function (err) {
|
|
1118
|
+
var _a;
|
|
1119
|
+
_this.messageSerice.add({ severity: 'warn', detail: "" + (((_a = err === null || err === void 0 ? void 0 : err.error) === null || _a === void 0 ? void 0 : _a.message) || 'Error no controlado, por favor comunicarse con del admin.') });
|
|
1120
|
+
_this.enProceso = false;
|
|
1121
|
+
});
|
|
1087
1122
|
};
|
|
1088
1123
|
RegistroComponent.prototype.validateData = function () {
|
|
1089
1124
|
if (this.configOperation.validations.type == 'local')
|
|
@@ -1234,10 +1269,15 @@
|
|
|
1234
1269
|
break;
|
|
1235
1270
|
}
|
|
1236
1271
|
};
|
|
1272
|
+
RegistroComponent.prototype.setDataTemp = function (esquema, dataTemp) {
|
|
1273
|
+
dataTemp.forEach(function (data) {
|
|
1274
|
+
jsonpath__namespace.value(esquema, data.scope, data.value);
|
|
1275
|
+
});
|
|
1276
|
+
};
|
|
1237
1277
|
return RegistroComponent;
|
|
1238
1278
|
}());
|
|
1239
|
-
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 });
|
|
1240
|
-
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",
|
|
1279
|
+
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 }, { token: SfCrudService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1280
|
+
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", user: "user" }, 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 <ng-container *ngIf=\"trx == 'c' || trx == 'u'\">\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=\"'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 <ng-container *ngIf=\"trx == 'c' || trx == 'u'\">\r\n <td>\r\n <!-- <button pButton pRipple type=\"button\" (click)=\"editRow(el, rowData)\" icon=\"pi pi-pencil\" class=\"p-button-rounded p-button-info mr-1\"></button> -->\r\n <button pButton pRipple type=\"button\" (click)=\"deleteRow(el, rowIndex)\" 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=\"'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: i3__namespace$3.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 } });
|
|
1241
1281
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RegistroComponent, decorators: [{
|
|
1242
1282
|
type: i0.Component,
|
|
1243
1283
|
args: [{
|
|
@@ -1246,7 +1286,7 @@
|
|
|
1246
1286
|
providers: [i3$1.MessageService, i1$1.DialogService, i1$1.DynamicDialogConfig, i1$1.DynamicDialogRef],
|
|
1247
1287
|
entryComponents: [RegistroComponent]
|
|
1248
1288
|
}]
|
|
1249
|
-
}], ctorParameters: function () { return [{ type: GeneralService }, { type: i2__namespace.Router }, { type: i3__namespace$1.MessageService }, { type: i1__namespace$1.DialogService }]; }, propDecorators: { idKatios: [{
|
|
1289
|
+
}], ctorParameters: function () { return [{ type: GeneralService }, { type: i2__namespace.Router }, { type: i3__namespace$1.MessageService }, { type: i1__namespace$1.DialogService }, { type: SfCrudService }]; }, propDecorators: { idKatios: [{
|
|
1250
1290
|
type: i0.Input
|
|
1251
1291
|
}], idEntidad: [{
|
|
1252
1292
|
type: i0.Input
|
|
@@ -1254,8 +1294,6 @@
|
|
|
1254
1294
|
type: i0.Input
|
|
1255
1295
|
}], id: [{
|
|
1256
1296
|
type: i0.Input
|
|
1257
|
-
}], dataTemp: [{
|
|
1258
|
-
type: i0.Input
|
|
1259
1297
|
}], user: [{
|
|
1260
1298
|
type: i0.Input
|
|
1261
1299
|
}], sendData: [{
|
|
@@ -1291,14 +1329,14 @@
|
|
|
1291
1329
|
RegistroComponent,
|
|
1292
1330
|
ControlComponent,
|
|
1293
1331
|
RegistroChildComponent], imports: [accordion.AccordionModule,
|
|
1294
|
-
|
|
1332
|
+
i5$1.AutoCompleteModule,
|
|
1295
1333
|
avatargroup.AvatarGroupModule,
|
|
1296
1334
|
avatar.AvatarModule,
|
|
1297
1335
|
badge.BadgeModule,
|
|
1298
1336
|
i3.BlockUIModule,
|
|
1299
1337
|
breadcrumb.BreadcrumbModule,
|
|
1300
1338
|
i8.ButtonModule,
|
|
1301
|
-
|
|
1339
|
+
i6$1.CalendarModule,
|
|
1302
1340
|
card.CardModule,
|
|
1303
1341
|
carousel.CarouselModule,
|
|
1304
1342
|
cascadeselect.CascadeSelectModule,
|
|
@@ -1312,16 +1350,16 @@
|
|
|
1312
1350
|
contextmenu.ContextMenuModule,
|
|
1313
1351
|
dialog.DialogModule,
|
|
1314
1352
|
divider.DividerModule,
|
|
1315
|
-
|
|
1353
|
+
i4$1.DropdownModule,
|
|
1316
1354
|
i1$1.DynamicDialogModule,
|
|
1317
1355
|
fieldset.FieldsetModule,
|
|
1318
|
-
|
|
1319
|
-
|
|
1356
|
+
i8$1.FileUploadModule,
|
|
1357
|
+
i10$1.FormsModule,
|
|
1320
1358
|
galleria.GalleriaModule,
|
|
1321
1359
|
i1.HttpClientModule,
|
|
1322
1360
|
inplace.InplaceModule,
|
|
1323
|
-
|
|
1324
|
-
|
|
1361
|
+
i3$2.InputMaskModule,
|
|
1362
|
+
i7.InputNumberModule,
|
|
1325
1363
|
inputswitch.InputSwitchModule,
|
|
1326
1364
|
inputtextarea.InputTextareaModule,
|
|
1327
1365
|
i10.InputTextModule,
|
|
@@ -1369,14 +1407,14 @@
|
|
|
1369
1407
|
ControlComponent] });
|
|
1370
1408
|
SfCrudModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfCrudModule, imports: [[
|
|
1371
1409
|
accordion.AccordionModule,
|
|
1372
|
-
|
|
1410
|
+
i5$1.AutoCompleteModule,
|
|
1373
1411
|
avatargroup.AvatarGroupModule,
|
|
1374
1412
|
avatar.AvatarModule,
|
|
1375
1413
|
badge.BadgeModule,
|
|
1376
1414
|
i3.BlockUIModule,
|
|
1377
1415
|
breadcrumb.BreadcrumbModule,
|
|
1378
1416
|
i8.ButtonModule,
|
|
1379
|
-
|
|
1417
|
+
i6$1.CalendarModule,
|
|
1380
1418
|
card.CardModule,
|
|
1381
1419
|
carousel.CarouselModule,
|
|
1382
1420
|
cascadeselect.CascadeSelectModule,
|
|
@@ -1390,16 +1428,16 @@
|
|
|
1390
1428
|
contextmenu.ContextMenuModule,
|
|
1391
1429
|
dialog.DialogModule,
|
|
1392
1430
|
divider.DividerModule,
|
|
1393
|
-
|
|
1431
|
+
i4$1.DropdownModule,
|
|
1394
1432
|
i1$1.DynamicDialogModule,
|
|
1395
1433
|
fieldset.FieldsetModule,
|
|
1396
|
-
|
|
1397
|
-
|
|
1434
|
+
i8$1.FileUploadModule,
|
|
1435
|
+
i10$1.FormsModule,
|
|
1398
1436
|
galleria.GalleriaModule,
|
|
1399
1437
|
i1.HttpClientModule,
|
|
1400
1438
|
inplace.InplaceModule,
|
|
1401
|
-
|
|
1402
|
-
|
|
1439
|
+
i3$2.InputMaskModule,
|
|
1440
|
+
i7.InputNumberModule,
|
|
1403
1441
|
inputswitch.InputSwitchModule,
|
|
1404
1442
|
inputtextarea.InputTextareaModule,
|
|
1405
1443
|
i10.InputTextModule,
|
|
@@ -1455,14 +1493,14 @@
|
|
|
1455
1493
|
],
|
|
1456
1494
|
imports: [
|
|
1457
1495
|
accordion.AccordionModule,
|
|
1458
|
-
|
|
1496
|
+
i5$1.AutoCompleteModule,
|
|
1459
1497
|
avatargroup.AvatarGroupModule,
|
|
1460
1498
|
avatar.AvatarModule,
|
|
1461
1499
|
badge.BadgeModule,
|
|
1462
1500
|
i3.BlockUIModule,
|
|
1463
1501
|
breadcrumb.BreadcrumbModule,
|
|
1464
1502
|
i8.ButtonModule,
|
|
1465
|
-
|
|
1503
|
+
i6$1.CalendarModule,
|
|
1466
1504
|
card.CardModule,
|
|
1467
1505
|
carousel.CarouselModule,
|
|
1468
1506
|
cascadeselect.CascadeSelectModule,
|
|
@@ -1476,16 +1514,16 @@
|
|
|
1476
1514
|
contextmenu.ContextMenuModule,
|
|
1477
1515
|
dialog.DialogModule,
|
|
1478
1516
|
divider.DividerModule,
|
|
1479
|
-
|
|
1517
|
+
i4$1.DropdownModule,
|
|
1480
1518
|
i1$1.DynamicDialogModule,
|
|
1481
1519
|
fieldset.FieldsetModule,
|
|
1482
|
-
|
|
1483
|
-
|
|
1520
|
+
i8$1.FileUploadModule,
|
|
1521
|
+
i10$1.FormsModule,
|
|
1484
1522
|
galleria.GalleriaModule,
|
|
1485
1523
|
i1.HttpClientModule,
|
|
1486
1524
|
inplace.InplaceModule,
|
|
1487
|
-
|
|
1488
|
-
|
|
1525
|
+
i3$2.InputMaskModule,
|
|
1526
|
+
i7.InputNumberModule,
|
|
1489
1527
|
inputswitch.InputSwitchModule,
|
|
1490
1528
|
inputtextarea.InputTextareaModule,
|
|
1491
1529
|
i10.InputTextModule,
|
|
@@ -1541,20 +1579,6 @@
|
|
|
1541
1579
|
}]
|
|
1542
1580
|
}] });
|
|
1543
1581
|
|
|
1544
|
-
var SfCrudService = /** @class */ (function () {
|
|
1545
|
-
function SfCrudService() {
|
|
1546
|
-
}
|
|
1547
|
-
return SfCrudService;
|
|
1548
|
-
}());
|
|
1549
|
-
SfCrudService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfCrudService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1550
|
-
SfCrudService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfCrudService, providedIn: 'root' });
|
|
1551
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfCrudService, decorators: [{
|
|
1552
|
-
type: i0.Injectable,
|
|
1553
|
-
args: [{
|
|
1554
|
-
providedIn: 'root'
|
|
1555
|
-
}]
|
|
1556
|
-
}], ctorParameters: function () { return []; } });
|
|
1557
|
-
|
|
1558
1582
|
/*
|
|
1559
1583
|
* Public API Surface of sf-crud
|
|
1560
1584
|
*/
|