@stiunb/unb-lib-components 18.0.24 → 18.0.26
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/README.md +27 -0
- package/esm2022/lib/unb-pessoa/unb-pessoa-email-form/unb-pessoa-email-list.mjs +1 -1
- package/esm2022/lib/unb-pessoa/unb-pessoa-form/unb-pessoa-form.component.mjs +77 -40
- package/esm2022/lib/unb-pessoa/unb-pessoa-models/unb-pessoa.model.mjs +1 -1
- package/esm2022/lib/unb-pessoa/unb-pessoa-pesquisar/unb-pessoa-pesquisar.component.mjs +132 -65
- package/esm2022/lib/unb-pessoa/unb-pessoa.service.mjs +4 -4
- package/esm2022/lib/unb-pessoa/unb-tipo-pessoa.enum.mjs +7 -7
- package/fesm2022/stiunb-unb-lib-components.mjs +198 -95
- package/fesm2022/stiunb-unb-lib-components.mjs.map +1 -1
- package/lib/unb-pessoa/unb-pessoa-form/unb-pessoa-form.component.d.ts +16 -7
- package/lib/unb-pessoa/unb-pessoa-models/unb-pessoa.model.d.ts +2 -2
- package/lib/unb-pessoa/unb-pessoa-pesquisar/unb-pessoa-pesquisar.component.d.ts +29 -10
- package/lib/unb-pessoa/unb-pessoa.service.d.ts +2 -2
- package/lib/unb-pessoa/unb-tipo-pessoa.enum.d.ts +4 -4
- package/package.json +2 -3
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { NgForm } from '@angular/forms';
|
|
2
3
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
3
4
|
import { Observable } from 'rxjs';
|
|
5
|
+
import { UnbMensagemService } from '../../unb-mensagem/unb-mensagem.service';
|
|
4
6
|
import { UnbPessoaEmail } from '../unb-pessoa-models/unb-pessoa-email.model';
|
|
5
7
|
import { UnbPessoaEndereco } from '../unb-pessoa-models/unb-pessoa-endereco.model';
|
|
6
8
|
import { UnbPessoaEscolaridade } from '../unb-pessoa-models/unb-pessoa-escolaridade.model';
|
|
@@ -9,9 +11,7 @@ import { UnbPessoaPais } from '../unb-pessoa-models/unb-pessoa-pais';
|
|
|
9
11
|
import { UnbPessoaTelefone } from '../unb-pessoa-models/unb-pessoa-telefone.model';
|
|
10
12
|
import { UnbPessoaModel } from '../unb-pessoa-models/unb-pessoa.model';
|
|
11
13
|
import { UnBPessoaService, UnbPessoaErroPadrao } from '../unb-pessoa.service';
|
|
12
|
-
import {
|
|
13
|
-
import { UnbMensagemService } from '../../unb-mensagem/unb-mensagem.service';
|
|
14
|
-
import { NgForm } from '@angular/forms';
|
|
14
|
+
import { UnbTipoPessoaEnum } from '../unb-tipo-pessoa.enum';
|
|
15
15
|
import * as i0 from "@angular/core";
|
|
16
16
|
export declare class UnbPessoaFormComponent implements OnInit {
|
|
17
17
|
private service;
|
|
@@ -21,24 +21,29 @@ export declare class UnbPessoaFormComponent implements OnInit {
|
|
|
21
21
|
buscaRealizada: boolean;
|
|
22
22
|
endereco: UnbPessoaEndereco;
|
|
23
23
|
email: UnbPessoaEmail;
|
|
24
|
-
tiposPessoa: typeof
|
|
24
|
+
tiposPessoa: typeof UnbTipoPessoaEnum;
|
|
25
25
|
pessoa: UnbPessoaModel;
|
|
26
26
|
dadosSalvos: {
|
|
27
27
|
[key: string]: any;
|
|
28
28
|
};
|
|
29
29
|
isReadonlyFromSiape: boolean;
|
|
30
|
+
pessoaForm: NgForm;
|
|
30
31
|
backendURL: string;
|
|
31
|
-
defaultTipoPessoa: TipoPessoaEnum;
|
|
32
32
|
pesquisarPorCPF: boolean;
|
|
33
33
|
pesquisarPorCNPJ: boolean;
|
|
34
34
|
pesquisarPorEstrangeiro: boolean;
|
|
35
|
+
defaultTipoPessoa: UnbTipoPessoaEnum | 'FISICA' | 'JURIDICA' | 'ESTRANGEIRA';
|
|
35
36
|
campoPesquisaMaxWidth: string;
|
|
36
37
|
pessoaEmitted: EventEmitter<UnbPessoaModel>;
|
|
38
|
+
isLoadingChange: EventEmitter<boolean>;
|
|
37
39
|
constructor(service: UnBPessoaService, snackBar: MatSnackBar, alertService: UnbMensagemService);
|
|
38
40
|
escolaridade: Observable<UnbPessoaEscolaridade[]>;
|
|
39
41
|
paises: Observable<UnbPessoaPais[]>;
|
|
40
42
|
estadosCivil: Observable<UnbPessoaEstadoCivil[]>;
|
|
41
43
|
idMensagemService: string;
|
|
44
|
+
documentoPesquisado: string;
|
|
45
|
+
incluindoNovaPessoa: boolean;
|
|
46
|
+
editandoPessoa: boolean;
|
|
42
47
|
ngOnInit(): void;
|
|
43
48
|
pessoaRecebida(pessoaRecebida: UnbPessoaModel): void;
|
|
44
49
|
salvar(form: NgForm): void;
|
|
@@ -47,7 +52,7 @@ export declare class UnbPessoaFormComponent implements OnInit {
|
|
|
47
52
|
enderecosEmitted(enderecos: UnbPessoaEndereco[]): void;
|
|
48
53
|
emailsEmitted(emails: UnbPessoaEmail[]): void;
|
|
49
54
|
openSnackBar(message: string): void;
|
|
50
|
-
tipoPessoaEnum(): typeof
|
|
55
|
+
tipoPessoaEnum(): typeof UnbTipoPessoaEnum;
|
|
51
56
|
getListaEstados(): {
|
|
52
57
|
codigo: number;
|
|
53
58
|
identificador: string;
|
|
@@ -63,6 +68,10 @@ export declare class UnbPessoaFormComponent implements OnInit {
|
|
|
63
68
|
private formatarDataParaBackend;
|
|
64
69
|
handleErrorPrintConsole(erro: any): void;
|
|
65
70
|
handleError(erro: UnbPessoaErroPadrao): void;
|
|
71
|
+
getLabelDocumento(): string;
|
|
66
72
|
static ɵfac: i0.ɵɵFactoryDeclaration<UnbPessoaFormComponent, never>;
|
|
67
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UnbPessoaFormComponent, "lib-unb-pessoa-form", never, { "backendURL": { "alias": "backendURL"; "required":
|
|
73
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UnbPessoaFormComponent, "lib-unb-pessoa-form", never, { "backendURL": { "alias": "backendURL"; "required": true; }; "pesquisarPorCPF": { "alias": "pesquisarPorCPF"; "required": false; }; "pesquisarPorCNPJ": { "alias": "pesquisarPorCNPJ"; "required": false; }; "pesquisarPorEstrangeiro": { "alias": "pesquisarPorEstrangeiro"; "required": false; }; "defaultTipoPessoa": { "alias": "defaultTipoPessoa"; "required": false; }; "campoPesquisaMaxWidth": { "alias": "campoPesquisaMaxWidth"; "required": false; }; }, { "pessoaEmitted": "pessoaEmitted"; "isLoadingChange": "isLoadingChange"; }, never, never, false, never>;
|
|
74
|
+
static ngAcceptInputType_pesquisarPorCPF: unknown;
|
|
75
|
+
static ngAcceptInputType_pesquisarPorCNPJ: unknown;
|
|
76
|
+
static ngAcceptInputType_pesquisarPorEstrangeiro: unknown;
|
|
68
77
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UnbTipoPessoaEnum } from "../unb-tipo-pessoa.enum";
|
|
2
2
|
import { UnbPessoaEmail } from "./unb-pessoa-email.model";
|
|
3
3
|
import { UnbPessoaEndereco } from "./unb-pessoa-endereco.model";
|
|
4
4
|
import { UnbPessoaPais } from "./unb-pessoa-pais";
|
|
@@ -12,7 +12,7 @@ export declare class UnbPessoaModel {
|
|
|
12
12
|
enderecos: UnbPessoaEndereco[];
|
|
13
13
|
telefones: UnbPessoaTelefone[];
|
|
14
14
|
emails: UnbPessoaEmail[];
|
|
15
|
-
tipoPessoa:
|
|
15
|
+
tipoPessoa: UnbTipoPessoaEnum;
|
|
16
16
|
idServidor: number;
|
|
17
17
|
matriculaSipes: number;
|
|
18
18
|
matriculaSiape: number;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { TipoPessoaEnum } from '../unb-tipo-pessoa.enum';
|
|
3
|
+
import { UnbMensagemService } from '../../unb-mensagem/unb-mensagem.service';
|
|
4
|
+
import { UnbPessoaEmailTipo } from '../unb-pessoa-models/unb-pessoa-email.model';
|
|
6
5
|
import { UnbPessoaEnderecoTipo } from '../unb-pessoa-models/unb-pessoa-endereco.model';
|
|
7
6
|
import { UnbPessoaTelefoneTipo } from '../unb-pessoa-models/unb-pessoa-telefone.model';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { UnbPessoaModel } from '../unb-pessoa-models/unb-pessoa.model';
|
|
8
|
+
import { UnbPessoaErroPadrao, UnBPessoaService } from '../unb-pessoa.service';
|
|
9
|
+
import { UnbTipoPessoaEnum } from '../unb-tipo-pessoa.enum';
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
export declare class UnbPessoaPesquisarComponent implements OnInit {
|
|
12
12
|
private pessoaService;
|
|
@@ -17,15 +17,16 @@ export declare class UnbPessoaPesquisarComponent implements OnInit {
|
|
|
17
17
|
pesquisarPorCPF: boolean;
|
|
18
18
|
pesquisarPorCNPJ: boolean;
|
|
19
19
|
pesquisarPorEstrangeiro: boolean;
|
|
20
|
-
defaultTipoPessoa:
|
|
20
|
+
defaultTipoPessoa: UnbTipoPessoaEnum | 'FISICA' | 'JURIDICA' | 'ESTRANGEIRA';
|
|
21
21
|
campoPesquisaMaxWidth: string;
|
|
22
|
-
pessoaEmitted: EventEmitter<UnbPessoaModel>;
|
|
23
|
-
pessoa: UnbPessoaModel;
|
|
24
22
|
mostrarPesquisa: boolean;
|
|
25
23
|
limparAposPesquisa: boolean;
|
|
26
24
|
label: string;
|
|
27
25
|
placeholder: string;
|
|
28
26
|
hint: string;
|
|
27
|
+
pessoa: UnbPessoaModel;
|
|
28
|
+
pessoaEmitted: EventEmitter<UnbPessoaModel>;
|
|
29
|
+
isLoadingChange: EventEmitter<boolean>;
|
|
29
30
|
constructor(pessoaService: UnBPessoaService, snackBar: MatSnackBar, alertService: UnbMensagemService);
|
|
30
31
|
pessoaEncontrado: Boolean | null;
|
|
31
32
|
mostrarTipoPessoa: boolean;
|
|
@@ -34,6 +35,11 @@ export declare class UnbPessoaPesquisarComponent implements OnInit {
|
|
|
34
35
|
listaTipoEmail: UnbPessoaEmailTipo[];
|
|
35
36
|
idMensagemService: string;
|
|
36
37
|
ngOnInit(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Define qual tipo de pessoa estará selecionado ao carregar o componente
|
|
40
|
+
*/
|
|
41
|
+
private definirTipoPessoaInicial;
|
|
42
|
+
onTipoPessoaChange(): void;
|
|
37
43
|
pesquisar(): void;
|
|
38
44
|
validar(): boolean;
|
|
39
45
|
hadleResult(resultado: UnbPessoaModel): void;
|
|
@@ -46,7 +52,20 @@ export declare class UnbPessoaPesquisarComponent implements OnInit {
|
|
|
46
52
|
handleError(erro: UnbPessoaErroPadrao | string): void;
|
|
47
53
|
handleErrorPrintConsole(erro: any): void;
|
|
48
54
|
openSnackBar(message: string): void;
|
|
49
|
-
tipoPessoaEnum(): typeof
|
|
55
|
+
tipoPessoaEnum(): typeof UnbTipoPessoaEnum;
|
|
56
|
+
/**
|
|
57
|
+
* Formata o CPF enquanto o usuário digita
|
|
58
|
+
*/
|
|
59
|
+
formatarCpf(event: any): void;
|
|
60
|
+
/**
|
|
61
|
+
* Formata o CNPJ enquanto o usuário digita
|
|
62
|
+
*/
|
|
63
|
+
formatarCnpj(event: any): void;
|
|
50
64
|
static ɵfac: i0.ɵɵFactoryDeclaration<UnbPessoaPesquisarComponent, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UnbPessoaPesquisarComponent, "lib-unb-pessoa-pesquisar", never, { "backendURL": { "alias": "backendURL"; "required":
|
|
65
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UnbPessoaPesquisarComponent, "lib-unb-pessoa-pesquisar", never, { "backendURL": { "alias": "backendURL"; "required": true; }; "pesquisarPorCPF": { "alias": "pesquisarPorCPF"; "required": false; }; "pesquisarPorCNPJ": { "alias": "pesquisarPorCNPJ"; "required": false; }; "pesquisarPorEstrangeiro": { "alias": "pesquisarPorEstrangeiro"; "required": false; }; "defaultTipoPessoa": { "alias": "defaultTipoPessoa"; "required": false; }; "campoPesquisaMaxWidth": { "alias": "campoPesquisaMaxWidth"; "required": false; }; "mostrarPesquisa": { "alias": "mostrarPesquisa"; "required": false; }; "limparAposPesquisa": { "alias": "limparAposPesquisa"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "pessoa": { "alias": "pessoa"; "required": false; }; }, { "pessoaEmitted": "pessoaEmitted"; "isLoadingChange": "isLoadingChange"; }, never, never, false, never>;
|
|
66
|
+
static ngAcceptInputType_pesquisarPorCPF: unknown;
|
|
67
|
+
static ngAcceptInputType_pesquisarPorCNPJ: unknown;
|
|
68
|
+
static ngAcceptInputType_pesquisarPorEstrangeiro: unknown;
|
|
69
|
+
static ngAcceptInputType_mostrarPesquisa: unknown;
|
|
70
|
+
static ngAcceptInputType_limparAposPesquisa: unknown;
|
|
52
71
|
}
|
|
@@ -3,7 +3,7 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { UnbPessoaEndereco } from './unb-pessoa-models/unb-pessoa-endereco.model';
|
|
4
4
|
import { UnbPessoaEscolaridade } from './unb-pessoa-models/unb-pessoa-escolaridade.model';
|
|
5
5
|
import { UnbPessoaModel } from './unb-pessoa-models/unb-pessoa.model';
|
|
6
|
-
import {
|
|
6
|
+
import { UnbTipoPessoaEnum } from './unb-tipo-pessoa.enum';
|
|
7
7
|
import { UnbPessoaPais } from './unb-pessoa-models/unb-pessoa-pais';
|
|
8
8
|
import { UnbPessoaMunincipio } from './unb-pessoa-models/unb-pessoa-municipio';
|
|
9
9
|
import { UnbPessoaEstadoCivil } from './unb-pessoa-models/unb-pessoa-estado-civil.model';
|
|
@@ -26,7 +26,7 @@ export declare class UnBPessoaService {
|
|
|
26
26
|
findByPassaporte(passaporte: string | undefined): Observable<UnbPessoaModel>;
|
|
27
27
|
findPessoaFisicaById(id: number): Observable<UnbPessoaModel>;
|
|
28
28
|
pesquisarCep(cep: string): Observable<UnbPessoaEndereco>;
|
|
29
|
-
salvar(payload: any, tipoPessoa:
|
|
29
|
+
salvar(payload: any, tipoPessoa: UnbTipoPessoaEnum): Observable<UnbPessoaModel | null>;
|
|
30
30
|
private savePessoaFisica;
|
|
31
31
|
private savePessoaJuridica;
|
|
32
32
|
getEscolaridade(): Observable<UnbPessoaEscolaridade[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare enum
|
|
2
|
-
FISICA = "
|
|
3
|
-
JURIDICA = "
|
|
4
|
-
ESTRANGEIRA = "
|
|
1
|
+
export declare enum UnbTipoPessoaEnum {
|
|
2
|
+
FISICA = "FISICA",
|
|
3
|
+
JURIDICA = "JURIDICA",
|
|
4
|
+
ESTRANGEIRA = "ESTRANGEIRA"
|
|
5
5
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stiunb/unb-lib-components",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.26",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^18.1.2",
|
|
6
6
|
"@angular/core": "^18.1.2",
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
"angular-auth-oidc-client": "^18.0.1"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"tslib": "^2.3.0"
|
|
12
|
-
"unb-lib-components": "file:"
|
|
11
|
+
"tslib": "^2.3.0"
|
|
13
12
|
},
|
|
14
13
|
"module": "fesm2022/stiunb-unb-lib-components.mjs",
|
|
15
14
|
"typings": "index.d.ts",
|