sf-crud 13.0.1 → 13.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/sf-crud.mjs +209 -87
- package/fesm2022/sf-crud.mjs.map +1 -1
- package/lib/components/control/control.component.d.ts +8 -2
- package/lib/components/form/form.component.d.ts +5 -2
- package/lib/components/registro/registro.component.d.ts +2 -1
- package/lib/components/tablero/tablero.component.d.ts +3 -2
- package/lib/sf-crud.service.d.ts +17 -0
- package/lib/shared/models/crud-config.model.d.ts +2 -1
- package/lib/shared/models/shema.model.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnInit, EventEmitter, ChangeDetectorRef, QueryList, OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { OnInit, EventEmitter, ChangeDetectorRef, QueryList, OnChanges, SimpleChanges, OnDestroy } from '@angular/core';
|
|
2
2
|
import { GeneralService } from '../../shared/services/general.service';
|
|
3
3
|
import { Shema } from '../../shared/models/shema.model';
|
|
4
4
|
import { RequestChecking } from '../../shared/models/crud-config.model';
|
|
@@ -6,8 +6,9 @@ import { SfCrudService } from '../../sf-crud.service';
|
|
|
6
6
|
import { Tooltip } from 'primeng/tooltip';
|
|
7
7
|
import { Archivo } from '../file-upload/file-upload.component';
|
|
8
8
|
import { NotificationService } from '../../shared/services/notification.service';
|
|
9
|
+
import { Subscription } from 'rxjs';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class ControlComponent implements OnInit, OnChanges {
|
|
11
|
+
export declare class ControlComponent implements OnInit, OnChanges, OnDestroy {
|
|
11
12
|
private generalService;
|
|
12
13
|
private crudService;
|
|
13
14
|
private cdr;
|
|
@@ -29,12 +30,17 @@ export declare class ControlComponent implements OnInit, OnChanges {
|
|
|
29
30
|
tempValue: any;
|
|
30
31
|
clicked: boolean;
|
|
31
32
|
maskDate: string;
|
|
33
|
+
tempCheckVal: boolean;
|
|
32
34
|
uploadingFiles: boolean;
|
|
35
|
+
subscription: Subscription | undefined;
|
|
33
36
|
constructor(generalService: GeneralService, crudService: SfCrudService, cdr: ChangeDetectorRef, notificationService: NotificationService);
|
|
34
37
|
ngOnChanges(changes: SimpleChanges): void;
|
|
35
38
|
ngOnInit(): void;
|
|
39
|
+
ngOnDestroy(): void;
|
|
36
40
|
private getNewValue;
|
|
37
41
|
loadDefaultValues(): void;
|
|
42
|
+
setCheckboxValues(): void;
|
|
43
|
+
onCheckboxChange(): void;
|
|
38
44
|
instanceBoolField(): void;
|
|
39
45
|
onChangeSwitch(): void;
|
|
40
46
|
loadFiles(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnChanges, OnInit, QueryList, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { MessageService } from 'primeng/api';
|
|
3
3
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
4
|
import { Shema } from '../../shared/models/shema.model';
|
|
@@ -8,8 +8,9 @@ import { StepService } from '../../shared/services/step.service';
|
|
|
8
8
|
import { Simulador } from 'sf-simulador';
|
|
9
9
|
import { AdoService, JWTService, ProcesoADO } from 'sf-ado';
|
|
10
10
|
import { Tooltip } from 'primeng/tooltip';
|
|
11
|
+
import { Subscription } from 'rxjs';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
|
-
export declare class FormComponent implements OnChanges, OnInit {
|
|
13
|
+
export declare class FormComponent implements OnChanges, OnInit, OnDestroy {
|
|
13
14
|
private messageService;
|
|
14
15
|
private crudService;
|
|
15
16
|
private domSanitizer;
|
|
@@ -34,10 +35,12 @@ export declare class FormComponent implements OnChanges, OnInit {
|
|
|
34
35
|
urlADO?: string;
|
|
35
36
|
proceso: ProcesoADO | undefined;
|
|
36
37
|
private loading;
|
|
38
|
+
subscription: Subscription | undefined;
|
|
37
39
|
tooltips: QueryList<Tooltip>;
|
|
38
40
|
constructor(messageService: MessageService, crudService: SfCrudService, domSanitizer: DomSanitizer, stepService: StepService, adoService: AdoService, jwtService: JWTService);
|
|
39
41
|
ngOnChanges(changes: SimpleChanges): void;
|
|
40
42
|
ngOnInit(): void;
|
|
43
|
+
ngOnDestroy(): void;
|
|
41
44
|
emitLoadingForm($event: boolean): void;
|
|
42
45
|
buildControls(): void;
|
|
43
46
|
refreshIntegracion(idProceso: number): Promise<[void]>;
|
|
@@ -35,6 +35,7 @@ export declare class RegistroComponent implements OnChanges, OnInit, OnDestroy {
|
|
|
35
35
|
buttonsFooterTemplate: TemplateRef<any>;
|
|
36
36
|
sendData: EventEmitter<any>;
|
|
37
37
|
onSubmit: EventEmitter<any>;
|
|
38
|
+
onLoaded: EventEmitter<any>;
|
|
38
39
|
btnSubmit: any;
|
|
39
40
|
notificationSubscription: any;
|
|
40
41
|
subsToKillOnDestroy: Subscription[];
|
|
@@ -95,7 +96,7 @@ export declare class RegistroComponent implements OnChanges, OnInit, OnDestroy {
|
|
|
95
96
|
back(): void;
|
|
96
97
|
private cargarMascarasDirecciones;
|
|
97
98
|
static ɵfac: i0.ɵɵFactoryDeclaration<RegistroComponent, never>;
|
|
98
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RegistroComponent, "sf-registro", never, { "idKatios": { "alias": "idKatios"; "required": false; }; "trx": { "alias": "trx"; "required": false; }; "id": { "alias": "id"; "required": false; }; "user": { "alias": "user"; "required": false; }; "dataExt": { "alias": "dataExt"; "required": false; }; "ids": { "alias": "ids"; "required": false; }; "environment": { "alias": "environment"; "required": false; }; "buttonsFooterTemplate": { "alias": "buttonsFooterTemplate"; "required": false; }; "idEntidad": { "alias": "idEntidad"; "required": false; }; }, { "sendData": "sendData"; "onSubmit": "onSubmit"; }, never, never, false, never>;
|
|
99
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RegistroComponent, "sf-registro", never, { "idKatios": { "alias": "idKatios"; "required": false; }; "trx": { "alias": "trx"; "required": false; }; "id": { "alias": "id"; "required": false; }; "user": { "alias": "user"; "required": false; }; "dataExt": { "alias": "dataExt"; "required": false; }; "ids": { "alias": "ids"; "required": false; }; "environment": { "alias": "environment"; "required": false; }; "buttonsFooterTemplate": { "alias": "buttonsFooterTemplate"; "required": false; }; "idEntidad": { "alias": "idEntidad"; "required": false; }; }, { "sendData": "sendData"; "onSubmit": "onSubmit"; "onLoaded": "onLoaded"; }, never, never, false, never>;
|
|
99
100
|
}
|
|
100
101
|
interface DialogElement {
|
|
101
102
|
data: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { CrudConfig } from '../../shared/models/crud-config.model';
|
|
3
3
|
import { GeneralService } from '../../shared/services/general.service';
|
|
4
4
|
import { MenuItem } from 'primeng/api';
|
|
@@ -6,7 +6,7 @@ import { Router } from '@angular/router';
|
|
|
6
6
|
import { SfCrudService } from '../../sf-crud.service';
|
|
7
7
|
import { StepService } from '../../shared/services/step.service';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class TableroComponent implements OnInit {
|
|
9
|
+
export declare class TableroComponent implements OnInit, OnChanges {
|
|
10
10
|
private generalService;
|
|
11
11
|
private router;
|
|
12
12
|
private sfCrudService;
|
|
@@ -34,6 +34,7 @@ export declare class TableroComponent implements OnInit {
|
|
|
34
34
|
private loading;
|
|
35
35
|
constructor(generalService: GeneralService, router: Router, sfCrudService: SfCrudService, stepService: StepService);
|
|
36
36
|
ngOnInit(): void;
|
|
37
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
37
38
|
loadConfigCrud(): void;
|
|
38
39
|
customizeCompany(uiEsquemas: any[]): void;
|
|
39
40
|
getInfoTablero(): void;
|
package/lib/sf-crud.service.d.ts
CHANGED
|
@@ -22,6 +22,15 @@ export declare class SfCrudService {
|
|
|
22
22
|
private _tfmUser;
|
|
23
23
|
private _crudLoaded;
|
|
24
24
|
private _mascaras;
|
|
25
|
+
private _disabledFields;
|
|
26
|
+
private _operation;
|
|
27
|
+
disabledFields$: import("rxjs").Observable<{
|
|
28
|
+
fields: string[];
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
operation$: import("rxjs").Observable<any>;
|
|
32
|
+
notifyFieldsToDisable(fields: string[], disabled?: boolean): void;
|
|
33
|
+
notifyChangeOperation(object: any): void;
|
|
25
34
|
get user(): any;
|
|
26
35
|
get currentOperation(): Operation | undefined;
|
|
27
36
|
set environment(val: any);
|
|
@@ -73,6 +82,14 @@ export declare class SfCrudService {
|
|
|
73
82
|
*/
|
|
74
83
|
applyStringKeys(content: string, index?: number | undefined): string;
|
|
75
84
|
validateDataLocal(operation: Operation, data: any, conditions: Condition[]): string[];
|
|
85
|
+
/**
|
|
86
|
+
* Removes fields marked with uiOnly: true and empty/null values from the data object
|
|
87
|
+
* @param data The data object to clean
|
|
88
|
+
* @param schema The schema that describes the data structure
|
|
89
|
+
* @returns A new object without uiOnly fields and empty values
|
|
90
|
+
*/
|
|
91
|
+
removeUiOnlyFields(data: any, schema: Shema): any;
|
|
92
|
+
isValidationSuccess(validation: string, data: any): boolean;
|
|
76
93
|
set esquemas(esquemas: Shema[]);
|
|
77
94
|
get esquemas(): Shema[];
|
|
78
95
|
set ids(ids: string[]);
|
|
@@ -28,7 +28,7 @@ export declare class ConfigRegistro {
|
|
|
28
28
|
conditions?: Condition[];
|
|
29
29
|
}
|
|
30
30
|
export declare class Operation {
|
|
31
|
-
type: "update" | "create" | "read" | "ado";
|
|
31
|
+
type: "update" | "create" | "read" | "ado" | "ServerSc";
|
|
32
32
|
server?: string;
|
|
33
33
|
endpoint?: string;
|
|
34
34
|
method: string;
|
|
@@ -61,6 +61,7 @@ declare class ValidationRequired {
|
|
|
61
61
|
field: string;
|
|
62
62
|
message: string;
|
|
63
63
|
conditions?: number[];
|
|
64
|
+
validation?: string;
|
|
64
65
|
}
|
|
65
66
|
declare class ValidationEqual extends ValidationRequired {
|
|
66
67
|
value: any;
|
|
@@ -30,6 +30,12 @@ export declare class Shema {
|
|
|
30
30
|
falseValue: any;
|
|
31
31
|
allowCustomOption: boolean;
|
|
32
32
|
separador?: string;
|
|
33
|
+
labelPosition?: string;
|
|
34
|
+
reverse?: boolean;
|
|
35
|
+
scope?: string;
|
|
36
|
+
optional?: any;
|
|
37
|
+
uiOnly?: boolean;
|
|
38
|
+
defaultValue?: any;
|
|
33
39
|
}
|
|
34
40
|
declare class ShemaConfig {
|
|
35
41
|
calendar?: Calendar;
|