sf-crud 13.0.1 → 13.0.2

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.
@@ -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]>;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sf-crud",
3
- "version": "13.0.1",
3
+ "version": "13.0.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.0",
6
6
  "@angular/core": "^19.2.0",