@senior-gestao-pessoas/payroll-core 9.5.0-f5093372-3d3f-4b82-a958-d1cdf848ce4d → 9.5.0-feature-hcmgdp-11492-21838e72

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.
Files changed (42) hide show
  1. package/bundles/senior-gestao-pessoas-payroll-core.umd.js +467 -902
  2. package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
  3. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +1 -16
  4. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js.map +1 -1
  5. package/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.d.ts +43 -10
  6. package/components/historical-pix-account/historical-pix-account.component.d.ts +10 -39
  7. package/components/historical-pix-account/historical-pix-account.service.d.ts +0 -1
  8. package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +2 -9
  9. package/components/utils/format-utils/format-utils.service.d.ts +3 -30
  10. package/esm2015/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +202 -34
  11. package/esm2015/components/historical-pix-account/historical-pix-account.component.js +29 -259
  12. package/esm2015/components/historical-pix-account/historical-pix-account.module.js +1 -5
  13. package/esm2015/components/historical-pix-account/historical-pix-account.service.js +1 -8
  14. package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +8 -41
  15. package/esm2015/components/utils/format-utils/format-utils.service.js +5 -88
  16. package/esm2015/public_api.js +1 -2
  17. package/esm2015/senior-gestao-pessoas-payroll-core.js +2 -3
  18. package/esm5/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +217 -58
  19. package/esm5/components/historical-pix-account/historical-pix-account.component.js +58 -301
  20. package/esm5/components/historical-pix-account/historical-pix-account.module.js +1 -5
  21. package/esm5/components/historical-pix-account/historical-pix-account.service.js +1 -8
  22. package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +8 -46
  23. package/esm5/components/utils/format-utils/format-utils.service.js +5 -88
  24. package/esm5/public_api.js +1 -2
  25. package/esm5/senior-gestao-pessoas-payroll-core.js +2 -3
  26. package/fesm2015/senior-gestao-pessoas-payroll-core.js +502 -897
  27. package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
  28. package/fesm5/senior-gestao-pessoas-payroll-core.js +464 -898
  29. package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
  30. package/package.json +1 -1
  31. package/public_api.d.ts +0 -1
  32. package/senior-gestao-pessoas-payroll-core.d.ts +1 -2
  33. package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
  34. package/components/historical-pix-account/historical-pix-account-base.d.ts +0 -27
  35. package/components/shared/index.d.ts +0 -1
  36. package/components/shared/shared-state.service.d.ts +0 -20
  37. package/esm2015/components/historical-pix-account/historical-pix-account-base.js +0 -173
  38. package/esm2015/components/shared/index.js +0 -2
  39. package/esm2015/components/shared/shared-state.service.js +0 -46
  40. package/esm5/components/historical-pix-account/historical-pix-account-base.js +0 -186
  41. package/esm5/components/shared/index.js +0 -2
  42. package/esm5/components/shared/shared-state.service.js +0 -47
@@ -1,33 +1,41 @@
1
- import { OnInit, EventEmitter, ChangeDetectorRef, OnDestroy, AfterViewInit } from "@angular/core";
1
+ import { OnInit, EventEmitter, ChangeDetectorRef, OnDestroy, AfterViewInit, DoCheck } from "@angular/core";
2
2
  import { FormGroup, FormBuilder } from "@angular/forms";
3
3
  import { NumberLocaleOptions, CustomFieldsComponent } from "@seniorsistemas/angular-components";
4
- import { SharedStateService } from "../../shared/shared-state.service";
5
- import { HistoricakPixAccountBase } from "../historical-pix-account-base";
6
- export declare class HistoricalPixAccountFormComponent extends HistoricakPixAccountBase implements OnInit, OnDestroy, AfterViewInit {
4
+ export declare class HistoricalPixAccountFormComponent implements OnInit, OnDestroy, AfterViewInit, DoCheck {
5
+ private formBuilder;
7
6
  private cd;
8
- private sharedStateService;
9
7
  customFields: CustomFieldsComponent;
10
8
  currency: NumberLocaleOptions;
11
9
  customEntity: string;
12
10
  customService: string;
13
11
  withSideBar: boolean;
14
12
  isEditMode: boolean;
15
- showField: boolean;
13
+ paramsForm: FormGroup;
14
+ defaultCpfNumber: string;
15
+ permitsEditBankAccountForm: boolean;
16
16
  visibleChange: EventEmitter<boolean>;
17
17
  pixAccountItemToList: EventEmitter<any>;
18
18
  private _visible;
19
19
  private ngUnsubscribe;
20
20
  private employeeId;
21
+ private pixAccountList;
22
+ private initialValidatorOfPercentage;
21
23
  labelBtnAdd: string;
24
+ pixAccountFormGroup: FormGroup;
25
+ maxValuePercentage: number;
22
26
  visibleBtnSave: boolean;
23
27
  isView: boolean;
28
+ pixKeyType: string;
24
29
  isShowPixKeyFieldValidatorMessage: boolean;
25
- hideFields: import("rxjs").Observable<boolean>;
26
- constructor(formBuilder: FormBuilder, cd: ChangeDetectorRef, sharedStateService: SharedStateService);
30
+ constructor(formBuilder: FormBuilder, cd: ChangeDetectorRef);
27
31
  ngOnInit(): void;
32
+ ngDoCheck(): void;
28
33
  ngAfterViewInit(): void;
29
34
  ngOnDestroy(): void;
30
35
  private registerSubjects;
36
+ private createFormGroup;
37
+ onChangePixKeyType(item: any): void;
38
+ onClearPixKeyType(): void;
31
39
  visible: boolean;
32
40
  isEditAndViewValue: any;
33
41
  private formatPixKeyTelephoneNumber;
@@ -39,8 +47,33 @@ export declare class HistoricalPixAccountFormComponent extends HistoricakPixAcco
39
47
  readonly percentagePlaceholder: string;
40
48
  readonly optionsPercentage: object;
41
49
  private getOptions;
50
+ /**
51
+ * O Input que recebe a lista do component pai e chama o método de validação passando a lista recebida.
52
+ * @param pixAccountList
53
+ */
42
54
  getListPixAccount: object[];
55
+ /**
56
+ * Recebe a lista de registros já inseridos na tabela adiciona em uma variável os valores que serão usados para
57
+ * a validação dos campos "percentage" e "pixAccount".
58
+ * Quando tem index significa que está em uma edição, os valores na posição do registro da edição (index) não serão adicionados
59
+ * no array de comparação dos validators.
60
+ * @param pixAccountList
61
+ * @param index
62
+ */
63
+ private setValidatorsAccordingList;
64
+ /**
65
+ * Antes de setar o validator prepara as variáveis necessária para que seja feita a validação do campo.
66
+ */
67
+ setPixKeyValidators(isEditMode: boolean): void;
68
+ /**
69
+ * Este método calcula as parcentagens que já foram inseridas, e seta a diferença para chegar em
70
+ * 100% na validação do campo "percentage" como um novo maxValue;
71
+ * @param listValue
72
+ */
73
+ private validatePercentageValid;
43
74
  isViewMode: boolean;
44
- paramsForm: FormGroup;
45
- defaultCpfNumber: string;
75
+ phoneMask(event: any): void;
76
+ setDefaultCpfPixKey(): void;
77
+ beforeSetPixKeyTypeValidator(): void;
78
+ private validateDuplicatePixKeyTypeBankAccount;
46
79
  }
@@ -2,16 +2,13 @@ import { OnInit, ChangeDetectorRef, AfterViewInit, OnDestroy, EventEmitter, OnCh
2
2
  import { FormGroup, FormBuilder } from "@angular/forms";
3
3
  import { TranslateService } from "@ngx-translate/core";
4
4
  import { CustomFieldsComponent, NumberLocaleOptions } from "@seniorsistemas/angular-components";
5
- import { SharedStateService } from "../shared/shared-state.service";
6
- import { HistoricakPixAccountBase } from "./historical-pix-account-base";
7
- import { HistoricalPixAccountService } from "./historical-pix-account.service";
8
- export declare class HistoricalPixAccountComponent extends HistoricakPixAccountBase implements OnInit, OnDestroy, AfterViewInit, OnChanges {
5
+ import { MessageService } from "primeng/api";
6
+ export declare class HistoricalPixAccountComponent implements OnInit, OnDestroy, AfterViewInit, OnChanges {
9
7
  private translateService;
10
8
  private cd;
11
- private sharedStateService;
12
- private service;
9
+ private formBuilder;
10
+ private messageService;
13
11
  customFields: CustomFieldsComponent;
14
- dataListPix: any;
15
12
  formGroup: FormGroup;
16
13
  fieldFormGroup: string;
17
14
  _dateChange: string;
@@ -25,17 +22,14 @@ export declare class HistoricalPixAccountComponent extends HistoricakPixAccountB
25
22
  customEntity: string;
26
23
  customService: string;
27
24
  withSideBar: boolean;
25
+ paramsForm: FormGroup;
26
+ defaultCpfNumber: string;
28
27
  permission: object;
29
28
  listDataReciever: any[];
30
- addExistentHistoricData: any[];
31
- getListPixAccount: object[];
32
- isEditModeForSave: boolean;
33
- showField: boolean;
29
+ showButtonEdit: boolean;
34
30
  isViewModeActive: EventEmitter<any>;
35
31
  isEditModeActive: EventEmitter<any>;
36
32
  isDeleteModeActive: EventEmitter<any>;
37
- isValidChangeForm: EventEmitter<boolean>;
38
- reloadOnlyOnEdit: EventEmitter<boolean>;
39
33
  private listFromApp;
40
34
  private visibleChange;
41
35
  private ngUnsubscribe;
@@ -50,15 +44,7 @@ export declare class HistoricalPixAccountComponent extends HistoricakPixAccountB
50
44
  msgTotalLimitByPercentage: string;
51
45
  listData: object[];
52
46
  listDataNoPage: object[];
53
- showButtonView: boolean;
54
- showEditMode: boolean;
55
- hasRecordsPix: boolean;
56
- hideFields: import("rxjs").Observable<boolean>;
57
- suggestions: any[];
58
- formGroupByRow: {
59
- [index: number]: FormGroup;
60
- };
61
- showFields: boolean;
47
+ permitsEditBankAccount: boolean;
62
48
  cols: {
63
49
  label: any;
64
50
  field: string;
@@ -68,37 +54,24 @@ export declare class HistoricalPixAccountComponent extends HistoricakPixAccountB
68
54
  label: any;
69
55
  command: () => void;
70
56
  }[];
71
- constructor(translateService: TranslateService, cd: ChangeDetectorRef, formBuilder: FormBuilder, sharedStateService: SharedStateService, service: HistoricalPixAccountService);
57
+ constructor(translateService: TranslateService, cd: ChangeDetectorRef, formBuilder: FormBuilder, messageService: MessageService);
72
58
  ngOnInit(): void;
73
59
  ngOnChanges(changes: SimpleChanges): void;
74
60
  private createFormGroup;
75
61
  ngOnDestroy(): void;
76
62
  ngAfterViewInit(): void;
77
- private emitFormValidity;
78
- filterPixKeyType(event: any): void;
79
- createPixRowFormGroup(): FormGroup;
80
- onPixKeyInput(event: any, index: number): void;
81
- onBlurPixCpfAndCnpj(index: number): void;
82
- getFormattedPixKey(type: string, value: string): string;
83
- syncPixDataToParentForm(): void;
84
- syncResetPixFormToParent(): void;
85
63
  onLazyLoad(event?: any): void;
86
64
  /**
87
65
  * Um Bug de CSS que acontece nas linhas da tabela, que resolve só atualizando qualquer parte do CSS da pagina.
88
66
  */
89
67
  private refreshCssInIE11;
90
68
  add(): void;
91
- addPix(): void;
92
- deletePix(index: number): void;
93
- private rebuildFormGroupMap;
94
- onPixKeyTypeChange(item: any, index: number): void;
95
- onPixKeyTypeClear(index: number): void;
69
+ private isNotAllowMessage;
96
70
  private deleteAnnuityItem;
97
71
  getHistoricalPixAccountList(): object[];
98
72
  addItemInList($event: any): void;
99
73
  private getNumberPageByIndex;
100
74
  private verifyTotalPercentage;
101
- onSyncValue(field: string, index: number): void;
102
75
  readonly scopedActions: any;
103
76
  readonly recordsMessage: string;
104
77
  readonly getTooltipAndDisableButtonAdd: string;
@@ -106,8 +79,6 @@ export declare class HistoricalPixAccountComponent extends HistoricakPixAccountB
106
79
  displayDateChange: string;
107
80
  addListData: object[];
108
81
  visible: boolean;
109
- paramsForm: FormGroup;
110
- defaultCpfNumber: string;
111
82
  close(): void;
112
83
  getFormattedTelephoneNumber(telephoneNumber: string): string;
113
84
  getFormattedCpf(cpf: string): string;
@@ -5,5 +5,4 @@ export declare class HistoricalPixAccountService {
5
5
  private http;
6
6
  constructor(http: HttpClientService);
7
7
  query(path: string, body: object, service?: ServiceType): Observable<any>;
8
- enumQuery(): Observable<any>;
9
8
  }
@@ -3,9 +3,7 @@ import { ActivatedRoute, Router } from "@angular/router";
3
3
  import { TranslateService } from "@ngx-translate/core";
4
4
  import { CustomFieldsComponent } from "@seniorsistemas/angular-components";
5
5
  import { ConfirmationService, MessageService } from "primeng/api";
6
- import { Subject } from "rxjs";
7
6
  import { HistoricalPixAccountListService } from "./historical-pix-account-list.service";
8
- import { SharedStateService } from "../shared/shared-state.service";
9
7
  export declare class HistoricalPixAccountListComponent implements OnInit, OnDestroy, AfterViewInit {
10
8
  private confirmationService;
11
9
  private translateService;
@@ -14,7 +12,6 @@ export declare class HistoricalPixAccountListComponent implements OnInit, OnDest
14
12
  private router;
15
13
  private messageService;
16
14
  private historicalPixAccountListService;
17
- private sharedStateService;
18
15
  customFields: CustomFieldsComponent;
19
16
  permission: object;
20
17
  employeeId: string;
@@ -23,14 +20,12 @@ export declare class HistoricalPixAccountListComponent implements OnInit, OnDest
23
20
  endPoint: string;
24
21
  keyPayload: string;
25
22
  withSidebar: boolean;
26
- hideField: boolean;
27
23
  isOnlyView: EventEmitter<any>;
28
24
  isOnlyEdit: EventEmitter<any>;
29
25
  enableView: EventEmitter<any>;
30
- isEditJudicialDependentPix: EventEmitter<any>;
26
+ enableEdit: EventEmitter<any>;
31
27
  private lastRecord;
32
28
  private ngUnsubscribe;
33
- private _subscription;
34
29
  initParameters: any;
35
30
  loading: boolean;
36
31
  parameters: any;
@@ -38,7 +33,7 @@ export declare class HistoricalPixAccountListComponent implements OnInit, OnDest
38
33
  label: any;
39
34
  field: string;
40
35
  }[];
41
- constructor(confirmationService: ConfirmationService, translateService: TranslateService, activatedRoute: ActivatedRoute, cd: ChangeDetectorRef, router: Router, messageService: MessageService, historicalPixAccountListService: HistoricalPixAccountListService, sharedStateService: SharedStateService);
36
+ constructor(confirmationService: ConfirmationService, translateService: TranslateService, activatedRoute: ActivatedRoute, cd: ChangeDetectorRef, router: Router, messageService: MessageService, historicalPixAccountListService: HistoricalPixAccountListService);
42
37
  ngOnInit(): void;
43
38
  ngOnDestroy(): void;
44
39
  ngAfterViewInit(): void;
@@ -51,8 +46,6 @@ export declare class HistoricalPixAccountListComponent implements OnInit, OnDest
51
46
  add(): void;
52
47
  private isNotAllowMessage;
53
48
  private onGridLoad;
54
- private unsubscribe;
55
- hideFieldsOnAdd$: Subject<boolean>;
56
49
  private readonly isAllowToAddHistorical;
57
50
  private readonly isAllowToDeleteHistorical;
58
51
  private readonly isAllowToViewHistorical;
@@ -4,57 +4,30 @@ export declare class FormatUtilsService {
4
4
  * @param cpf CPF
5
5
  */
6
6
  static getFormattedCpf(cpf: string): string;
7
- /**
8
- * Retorna o CPF formatado
9
- * @param cpf CPF
10
- */
11
- static getFormattedCpfEdited(cpf: string): string;
12
7
  /**
13
8
  * Retorna o CNPJ formatado
14
9
  * @param cnpj CNPJ
15
10
  */
16
11
  static getFormattedCnpj(cnpj: string): string;
17
- /**
18
- * Retorna o CNPJ formatado
19
- * @param cnpj CNPJ
20
- */
21
- static getFormattedCnpjEdited(cnpj: string): string;
22
12
  /**
23
13
  * Retorna a mascara do CPF/CNPJ
24
14
  * @param key Valores possíveis são CPF ou CNPJ
25
15
  */
26
16
  static getCpfCnpjMask(key: string): "" | "999.999.999-99" | "99.999.999/9999-99";
27
- /**
28
- * Método para formatar o número de inscrição do cliente.
29
- * @param subscriptionNumber
30
- * @param pixKeyType
31
- * @returns
32
- */
33
- static getFormattedSubscriptionNumber(subscriptionNumber: string, pixKeyType: any): string;
34
17
  /**
35
18
  * Metódo para formatar o número de telefone.
36
19
  * @param telephoneNumber String contendo o número de telefone.
37
20
  * @returns String formatada com o número de telefone.
38
21
  */
39
22
  static getFormattedTelephoneNumber(telephoneNumber: string): string;
40
- /**
41
- * Metódo para formatar a porcentagem para 2 casas decimais.
42
- * @param value Número a ser formatado.
43
- */
44
- static getFormattedPercentage(value: string): string;
45
23
  /**
46
24
  * Metódo para formatar o número de telefone de um campo Input.
47
25
  * @param event Evento do Input do campo de telefone.
48
26
  */
49
27
  static formatTelephoneInputEvent(event: any): void;
50
28
  /**
51
- * Formata o campo de input de CPF em tempo real.
52
- * @param event Evento do input
53
- */
54
- static formatCpfInputEvent(event: any): void;
55
- /**
56
- * Formata o campo de input de CNPJ em tempo real.
57
- * @param event Evento do input
29
+ * Metódo para formatar a porcentagem para 2 casas decimais.
30
+ * @param value Número a ser formatado.
58
31
  */
59
- static formatCnpjInputEvent(event: any): void;
32
+ static getFormattedPercentage(value: string): string;
60
33
  }