0.0.130 • Published 3 years ago

palin-core-lib v0.0.130

Weekly downloads
60
License
GPL-3.0-or-later
Repository
-
Last release
3 years ago

PalinCore

Biblioteca de código compartilhado entre os módulos do sistema da Palin & Martins desenvolvido em Angular.

Instalação

Para instalar a biblioteca execute o commando: npm install palin-core-lib

Conteúdo da Biblioteca

Components

  • AppNaoAutorizado
  • AppNoDataToDisplayComponent
    • Inputs:
      • message: string
      • buttonText: string
      • buttonIcon: string
      • buttonColor: string
    • Outputs:
      • addNew()
  • AppShowInfoComponent (app-show-info)
    • Inputs:
      • bgClass: string('primary')
      • messages: string[]
      • maxHeight: number(-1)
      • progressType: string 'progress|spinner' ('progress')
      • progressMode: string 'determinate|indeterminate|buffer|query' ('indeterminate')
      • positionX: string 'left|right|center' ('center')
      • positionY: string 'top|center|bottom' ('bottom')
  • ConfirmModalComponent (confirm-modal)
    • Inputs (options): title text class type icon showCloseButton retorno okButton cancelButton
  • DialogPadraoComponent (pl-dialog)
    • Inputs:
      • dialogClasses: string
      • icon: string
      • iconClass: string
      • headerBgClass: string('bg-primary')
      • headerTextClass: string('text-white')
      • showCloseButton: boolean(true)
      • bodyClasses: string
    • Content:
      • headerText: Conteúdo que será exibido no Cabeçalho
      • dialogBody: Conteúdo que será exibido no Dialog
    • Outputs:
      • close(): Ação que será executada ao clicar no botão fechar
      • iconClick(): Ação que será executada ao clicar no botão do Header
  • MatInputFileComponent (mat-input-file)
    • Inputs:
      • accept: string
      • multiple: boolean
      • disabled: boolean
    • Outputs:
      • onFileSelect(File[])
    • Métodos:
      • resetFiles()
      • onNativeInputFileSelect($event: any)
      • selectFile()
  • ProgressStatus (progress-status)
    • Inputs:
      • importStatus: IImportStatus
      • showSpinner: boolean
    • Métodos:
      • setImportStatus(data: IImportStatus)
      • setField(field: string, value: any)
      • setMessage(message: string)
      • updatePerc()
      • resetStatus()
  • SearchInputComponent (search-input)
    • Inputs:
      • placeHolder: string
      • value: string
      • field: string
      • controlType: string
      • class: string
      • mask: any
    • Outputs:
      • valueChanged({field: string, value: string})
    • Propriedades Públicas:
      • frmFiltro: FormGroup
  • SpinnerComponent (pl-spinner)
    • Inputs:
      • containerClass: string[]
      • color: string(#000)
      • size: number(15)

Pipes

  • CepPipe (cep)
  • CfopPipe (cfop)
  • CodSituacaoPipe (codSit)
  • CstPipe (cst)
  • EnqLegalPipe (enqLegal)
  • MaskPipe (mask)
  • NcmPipe (ncm)
  • OrderByPipe (orderBy)
  • ProdCodDescPipe (prodCodDesc)
  • TextFilterShowPipe (textFilterShow)
  • TipoDocumentoPipe (tipo-documento)
  • TitleCasePipe (titleCase)

Directives

Classes

  • CfopsCollection:
    • Constants: CFOPS_DEVOL_3A CFOPS_DEVOL_3B
    • Métodos Estáticos:
      • CfopsSaidaValContabilA(): string[]
      • CfopsSaidaValContabilB(): string[]
      • CfopsSaida(): string[]
      • CfopsEntradaValContabilA(): string[]
      • CfopsEntradaBCA(): string[]
      • CfopsEntradaValContabilB(): string[]
      • CfopsEntradaBCB(): string[]
      • CfopsPmcA(): string[]
      • CfopsPmcB(): string[]
      • CfopsEntrada(): string[]
      • CfopsEntradaRevenda(): string[]
      • Cfops(): string[]
      • cfopsDatabase(): {cfop: string, descricao: string, descricaoParaBusca: string}[]
  • Utils:

    • Métodos Estáticos:
    • toggleInputs(form: FormGroup, disable: boolean, condition?: (value: string, index: number, array: string[]) => boolean)
    • convertToFloat(value: string): number
    • prepareDataToSave(data: any, obsToRemove: string[]): any
    • formControlHasError(form: FormGroup, control: string): boolean
    • formControlErrors(form: FormGroup, control: string, description: string, minlength?: string, maxlength?: string): string
    • converter(convUnidade: IEmpresaConvUnidade, valor: number): number
    • dateToString(val: string | Date, fullYear: boolean = false): string
    • doChunk(list: Array, size: number): string
    • doChunkType(list: Array, size: number): T
    • gotoRoute(route: string, router: Router)
    • strZero(value: any, totalLength: number, back?: boolean): string
    • getUfs(): { uf: string, descricao: string, codigo: string }[]
    • getUfCidades(uf: string): { uf: string, descricao: string, cidades: string[] }
    • listaPaises(): IPaises[]
    • removerExtendidos(data: string, maxCode: number, replaceWith: string): string
    • removerAcentos(s: string, removerEspacos: boolean): string
    • getCodigoIbgeCidade(uf: string, cidadeOuCodigo: string | number): string
    • getGeneros(): { codigo: string, descricao: string }[]
    • getCst(): { codigo: string, descricao: string }[]
    • getCsosn(): { codigo: string, descricao: string }[]
    • getOrigem(): { codigo: string, descricao: string }[]
    • getCfopRetIcms(): { codigo: string }[]
    • getTipoItem(): { codigo: string, descricao: string }[]
    • getTiposDocumentos(): { codigoChave: string, codigo: string, descricao: string, modelo: string }[]
    • isNumber(value: any): boolean
    • setControlFocus(controlName: string, timeOut: number = 1000): void
    • updateLoadingIds(loadingIds: string[], loadingInfo: {id: string, loading: boolean} ): void
  • Validadores: cnpjInvalido cpfInvalido

  • CustomPaginatorIntl: Customização do paginador do Angular Material

Constants

  • app-config: APP_CONFIG API_URL: carregada de localStorage devApiUrl
  • cod-modelo: COD_MODELOS
  • cod-situacao: COD_SITUACAO
  • csts: CSTS
  • enq-legal: ENQ_LEGAIS
  • external-tokens: EXTERNAL_TOKENS, PRATICKO_TOKENS
  • sefaz: SEFAZC100_FIELDS SEFAZC113_FIELDS SEFAZC140_FIELDS SEFAZC141_FIELDS SEFAZC170_FIELDS SEFAZC190_FIELDS

Extensions

  • Array: remove
  • Number: toFixedVirgula toFixedNumber
  • Object: equals same clone
  • String: replaceAll

Functions

  • date-extensions: parseDateTime
  • permissoes: getPermissao getModuloPermissao

Interfaces

  • cat83.interface: ICat83 IApur0150 IApur0200 IApur0205 IApur0300 IApur0400 IApur5010 IApur5015 IApur5150 IApur5155 IApur5160 IApur5310 IApur5315 IApur5320 IApur5325 IApur5330 IApur5335 IApur5350 IApur5360 IApur5365 IApur5370 IApur5375 IApur5380 IApur5385 IApur5390 IApur5395 IApur5400 IApur5550 IApur5555 IApur5590 IApur5595 IApur9990 IApurMovItens IProd1000 IProd1010 IEnqLegalCat83 TipoInsumoAcabado ICredChartOrigin ICat83Info IMovDevolucao3A IMovDevolucao3B IApurCredReincorp IApurDadosExportacao IApurTransfProduto IRegQuebraLancComplementar3A IRegQuebraLancComplementar3B ICodLancamentoFichaHipotesesCfops IAutoPerdasGanhos EMPTY_APUR5365 EMPTY_APUR5315 PARTICIPANTE_INTERNO FICHAS_CODIGOS_3A FICHAS_CODIGOS_3B
  • cat207.interface: ICat207R0000 ICat207R0150 ICat207R0300 ICat207R5315 ICat207R5320 ICat207R5325 ICat207R5330 ICat207R5335 ICat207R5340 ICat207R5350 ICat207IvaMediana ICat207R5315CredOutorgado ICat207R5315Movimento IMovCfop IMovCfopNcm ICat207DevolInfo
  • cep.interface: ICepConsulta
  • cidade.interface: ICidade ICepCidade
  • competencia.interface: ICompetencia
  • empresa.interface: IEmpresa IEmpresaCredAcumOpcoes IEmpresaUsuario IEmpresaCfopNcmCred IEmpresaNcmsCredOutorgado IEmpresaCfopsDevol IEmpresaRelatInt IEmpresaConvUnidade IEmpresaCat83Opcoes ICat207CredOutorgado IEmpresaRelatorioImportacao IRelatorioImportacao
  • empresa-participante.interface: IEmpresaParticipante EMPTY_EMPRESAPARTICIPANTE
  • empresa-reg-esp.interface: IEmpresaRegEsp
  • enq-legal.interface: IEnqLegal IEmpresaCat207CfopEnqLegal
  • external-token.interface: IExternalToken
  • global.interfaces: ESortOrder (enum) ISortOptions IPageOptions IPaises
  • http-response.interface: IHttpResponse
  • import-status.interface: IImportStatus
  • items-page-result.interface: IItemsPageResult<T>
  • ncm.interface: INcm INcmCfop EMPTY_NCMCFOP INcmGerador INcmGeradorPropriedade
  • permissoes.interfaces: IPermissao IModuloPermissao
  • produtos.interface: IEmpresaProdServ IEmpresaProdServCat83Opcoes IEmpresaProdServConv0200ViewModel EMPTY_EMPRESAPRODUTO EMPTY_EMPRESAPRODSERVCAT83OPCOES
  • propriedade.interface: IPropriedade EMPTY_PROPRIEDADE IPropriedadeUsuario EMPTY_PROPRIEDADEUSUARIO IAspNetUser
  • sefaz.interface: ISefazC100 ISefazC113 ISefazC140 ISefazC141 ISefazC170 ISefazC190
  • sistema.interface: ISistema
  • sistema-user.interface: ISistemaUser ISistemaModuloPermissao ISistemaModulo
  • sped.interface: ISpedEfd ISpedEfd0005 ISpedEfd0015 ISpedEfd0100 ISpedEfd0150 ISpedEfd0175 ISpedEfd0190 ISpedEfd0200 ISpedEfd0205 ISpedEfd0206 ISpedEfd0220 ISpedEfd0300 ISpedEfd0305 ISpedEfd0400 ISpedEfd0450 ISpedEfd0460 ISpedEfd0500 ISpedEfd0600 ISpedEfdC100 ISpedEfdC101 ISpedEfdC105 ISpedEfdC110 ISpedEfdC111 ISpedEfdC112 ISpedEfdC113 ISpedEfdC114 ISpedEfdC115 ISpedEfdC116 ISpedEfdC120 ISpedEfdC130 ISpedEfdC140 ISpedEfdC141 ISpedEfdC160 ISpedEfdC165 ISpedEfdC170 ISpedEfdC171 ISpedEfdC172 ISpedEfdC173 ISpedEfdC174 ISpedEfdC175 ISpedEfdC176 ISpedEfdC177 ISpedEfdC178 ISpedEfdC179 ISpedEfdC190 ISpedEfdC195 ISpedEfdC197 ISpedEfdC100ExpInd ISpedEfdC500 ISpedEfdC510 ISpedEfdC590 ISpedEfdC600 ISpedEfdC601 ISpedEfdC610 ISpedEfdC690 ISpedEfdD100 ISpedEfdD101 ISpedEfdD110 ISpedEfdD120 ISpedEfdD130 ISpedEfdD140 ISpedEfdD150 ISpedEfdD160 ISpedEfdD161 ISpedEfdD170 ISpedEfdD180 ISpedEfdD190 ISpedEfdD195 ISpedEfdD197 ISpedEfdD500 ISpedEfdD510 ISpedEfdD530 ISpedEfdD590 ISpedEfdE100 ISpedEfdE110 ISpedEfdE111 ISpedEfdE112 ISpedEfdE113 ISpedEfdE115 ISpedEfdE116 ISpedEfdE200 ISpedEfdE210 ISpedEfdE220 ISpedEfdE230 ISpedEfdE240 ISpedEfdE250 ISpedEfdE500 ISpedEfdE510 IspedEfdE520 ISpedEfdE530 ISpedEfdG110 ISpedEfdG125 ISpedEfdG126 ISpedEfdG130 ISpedEfdG140 ISpedEfdH005 ISpedEfdH010 ICfopCruzamento IEmpresaProdServInventario IProdServInventarioConf IProdServConferencia IDiffImport IAveVivaInfo
  • user.interfaces: IUser IOldUser IUsuario

Services

  • CidadesService
    • ProvideIn: root
    • Provide: CIDADES_TOKEN: _IExternalToken_ CIDADES_URL: _string_
    • Métodos:
      • getCidade(cidadeId: string): Observable
      • getPorUf(uf: string): Observable<ICidade[]>
      • getPorCodigoIbge(codigoIbge: number): Observable
      • getCep(cep: string, useHttps: boolean): Observable
  • IoService
    • ProvideIn: root
    • Provide: APIURL: _string
    • Getters:
      • loading$: Observable
    • Métodos:
      • get(url: string, urlParams?: any, successStatus?: number[], params?: {name: string, value: any}, useApiUrl: boolean true, showErrorMessage: boolean true): Observable
      • postType(url: string, data: any, successStatus?: number[], useApiUrl: boolean true, showErrorMessage: boolean true): Observable
      • post(url: string, data: any, successStatus?: number[], useApiUrl: boolean true, showErrorMessage: boolean true): Observable
      • putType(url: string, registroId: string, data: T, successStatus?: number[], useApiUrl: boolean true, showErrorMessage: boolean true): Observable
      • put(url: string, registroId: string, data: T, successStatus?: number[], useApiUrl: boolean [true, showErrorMessage: boolean true]): Observable
      • deleteType(url: string, registroId: string, successStatus?: [number[]], useApiUrl: boolean true, showErrorMessage: boolean true): Observable
      • delete(url: string, registroId: string, successStatus?: number[], useApiUrl: boolean true, showErrorMessage: boolean true): Observable
      • checkItemValidation(url: string, field: string, valor: string, isNew: boolean, valorOriginal?: string): Observable<{ asyncInvalid: boolean }>
  • LocalStorageService
    • ProvideIn: root
    • Getters:
      • shouldReloadEmpresaCompetencia? Observable
      • shouldReloadPermisssions$: Observable
      • user$: Observable
      • userPermissoes: IModuloPermissao[]
    • Métodos:
      • setItem(name: string, value: any)
      • getItem(name: string): any
      • getItemType<T>(name: string): T
      • getUser(): IUser
      • deleteItem(name: string)
      • setUser(user: IUser)
      • setReloadPermissions(reload: boolean)
      • comparePermissoes(permissoesA: IModuloPermissao[], permissoesB: IModuloPermissao[]): boolean
  • NcmsService
    • ProvideIn: root
    • Provide: NCMS_TOKEN: _IExternalToken_ NCMS_URL: _string_
    • Getters:
      • getNcmsLocalJson$: Observable<INcmLocal[]>
      • loading$: Observable<loading: boolean, message: string>
      • ncms$: Observable<INcm[]>
    • Métodos:
      • addUpdateNcm(ncm: INcm)
      • getncmsPorCodigo(codigo: string): Observable<INcm[]>
      • getNcmPorCodigoLocal(codigo: string): INcmLocal
      • getNcmsPorCodigoLocal(codigo: string): INcmLocal[]
      • updateNcmDescricao(codigo: string, descricao: string): Observable<{ codigo: string, result: boolean }>
  • PermissoesService
    • ProvideIn: root
    • Constructor: (ioService: IoService, systemId: string, permissoesUrl: string)
    • Getters:
      • loading$: Observable<{loading: boolean, users: boolean}>
    • Métodos:
      • getPermissoes(): Observable<IModuloPermissao[]>
      • getUsers(): Observable<{ id: string, name: string }[]>
      • getUserPermissoes(userName: string, sistemaId?: string): Observable<IModuloPermissao[]>
      • savePermissao(item: IModuloPermissao): Observable
      • getSistemas(): Observable<ISistema[]>
      • setAllowDenyPermissoes(sistemaId: string, userId: string, allow: boolean): Observable
      • setUserPermissoes(sistemaId: string, userId: string, permissoes: IModuloPermissao[]): Observable

Interceptors

  • AuthGuard (CanActivate)
    • constructor: ( router: Router, localStorageService: LocalStorageService, permissoesService: PermissoesService, systemId: string, urlsPermitidas: string[], verificarItemInfo: { item: string, items: string, url: string })
    • Métodos:
      • canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): void
      • applyToken(currentUser: { user: IUser, token: string }): Observable
      • logout(): void
  • AuthInterceptor
    • constructor: (router: Router, localStorageService: LocalStorageService, snackBar: MatSnackBar, systemId: string, pathAuthExceptions: _string[] )
    • Métodos:
      • intercept(req: HttpRequest, next: HttpHandler): Observable<HttpEvent>
      • applyToken(url: string)
      • applyHeaders(url: string:, externalTokens: _IExternalToken[], currentUser: {user: IUser, token: string}): HttpHeaders
  • TrafficInterceptor
    • Observables:
      • progress$: Observable
      • indeterminate$: Observable
      • show$: Observable
    • Métodos:
      • intercept(req: HttpRequest, next: HttpHandler): Observable<HttpEvent>

Json Data

  • Ncms (assets/ncms.json)

(c) 2018 - Palin & Martins Consultores Associados

0.0.126

3 years ago

0.0.125

3 years ago

0.0.129

3 years ago

0.0.130

3 years ago

0.0.123

4 years ago

0.0.122

4 years ago

0.0.121

4 years ago

0.0.120

4 years ago

0.0.119

4 years ago

0.0.118

4 years ago

0.0.117

4 years ago

0.0.116

4 years ago

0.0.115

4 years ago

0.0.114

4 years ago

0.0.113

4 years ago

0.0.112

5 years ago

0.0.111

5 years ago

0.0.110

5 years ago

0.0.109

5 years ago

0.0.108

5 years ago

0.0.106

5 years ago

0.0.107

5 years ago

0.0.105

5 years ago

0.0.104

5 years ago

0.0.103

5 years ago

0.0.102

5 years ago

0.0.101

5 years ago

0.0.100

5 years ago

0.0.99

5 years ago

0.0.98

5 years ago

0.0.97

5 years ago

0.0.96

5 years ago

0.0.95

5 years ago

0.0.94

5 years ago

0.0.93

5 years ago

0.0.92

5 years ago

0.0.91

5 years ago

0.0.90

5 years ago

0.0.89

5 years ago

0.0.88

5 years ago

0.0.87

5 years ago

0.0.86

5 years ago

0.0.85

5 years ago

0.0.84

5 years ago

0.0.83

5 years ago

0.0.82

5 years ago

0.0.81

5 years ago

0.0.80

5 years ago

0.0.79

6 years ago

0.0.78

6 years ago

0.0.77

6 years ago

0.0.76

6 years ago

0.0.75

6 years ago

0.0.74

6 years ago

0.0.73

6 years ago

0.0.72

6 years ago

0.0.71

6 years ago

0.0.70

6 years ago

0.0.69

6 years ago

0.0.68

6 years ago

0.0.67

6 years ago

0.0.66

6 years ago

0.0.65

6 years ago

0.0.64

6 years ago

0.0.63

6 years ago

0.0.62

6 years ago

0.0.61

6 years ago

0.0.60

6 years ago

0.0.58

6 years ago

0.0.57

6 years ago

0.0.56

6 years ago

0.0.55

6 years ago

0.0.54

6 years ago

0.0.53

6 years ago

0.0.52

6 years ago

0.0.51

6 years ago

0.0.50

6 years ago

0.0.49

6 years ago

0.0.48

6 years ago

0.0.47

6 years ago

0.0.45

6 years ago

0.0.44

6 years ago

0.0.42

6 years ago

0.0.41

6 years ago

0.0.40

6 years ago

0.0.39

6 years ago

0.0.38

6 years ago

0.0.37

6 years ago

0.0.36

6 years ago

0.0.35

6 years ago

0.0.34

6 years ago

0.0.33

6 years ago

0.0.32

6 years ago

0.0.31

6 years ago

0.0.30

6 years ago

0.0.29

6 years ago

0.0.28

6 years ago

0.0.27

6 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago