Gathering detailed insights and metrics for directus-brazilian-standards
Gathering detailed insights and metrics for directus-brazilian-standards
Gathering detailed insights and metrics for directus-brazilian-standards
Gathering detailed insights and metrics for directus-brazilian-standards
🇧🇷 Complete Brazilian formatting extensions for Directus - Currency (BRL), Postal Codes (CEP), and Tax IDs (CPF) with interfaces and displays
npm install directus-brazilian-standards
Typescript
Module System
Min. Node Version
Node Version
NPM Version
Vue (61.53%)
TypeScript (38.47%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1 Stars
3 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Jul 06, 2025
Latest Version
1.5.0
Package Id
directus-brazilian-standards@1.5.0
Unpacked Size
54.53 kB
Size
14.87 kB
File Count
6
NPM Version
11.3.0
Node Version
24.0.1
Published on
Jun 20, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
Complete Brazilian formatting extensions for Directus - Currency (BRL), Postal Codes (CEP), and Tax IDs (CPF) with interfaces and displays.
215
→ shows R$ 2,15
21578
→ shows R$ 215,78
2156789
→ shows R$ 21.567,89
brazilian-cnpj
brazilian-cnpj
The CNPJ interface now supports automatic company data lookup using the publica.cnpj.ws API:
How it works:
Example mapping:
1{ 2 "company_name": "razao_social", 3 "trade_name": "estabelecimento.nome_fantasia", 4 "complete_address": "estabelecimento.tipo_logradouro + ' ' + estabelecimento.logradouro + ', ' + estabelecimento.numero + ' - ' + estabelecimento.complemento", 5 "city": "estabelecimento.cidade.nome", 6 "state": "estabelecimento.estado.sigla", 7 "phone": "estabelecimento.telefone1", 8 "email": "estabelecimento.email" 9}
Mapping Format:
"form_field": "api_field"
"form_field": "api_field1 + ' separator ' + api_field2"
Concatenation Examples:
1{ 2 "full_address": "estabelecimento.tipo_logradouro + ' ' + estabelecimento.logradouro + ', ' + estabelecimento.numero", 3 "contact_info": "estabelecimento.telefone1 + ' - ' + estabelecimento.email", 4 "company_info": "razao_social + ' (' + estabelecimento.nome_fantasia + ')'" 5}
Available API fields:
razao_social
- Company legal namecapital_social
- Share capitalnatureza_juridica.descricao
- Legal nature descriptionporte.descricao
- Company size descriptionestabelecimento.nome_fantasia
- Trade nameestabelecimento.email
- Email addressestabelecimento.telefone1
- Primary phoneestabelecimento.telefone2
- Secondary phoneestabelecimento.logradouro
- Street addressestabelecimento.numero
- Street numberestabelecimento.complemento
- Address complementestabelecimento.bairro
- Neighborhoodestabelecimento.cidade.nome
- City nameestabelecimento.estado.nome
- State nameestabelecimento.estado.sigla
- State abbreviationestabelecimento.cep
- ZIP codeestabelecimento.situacao_cadastral
- Registration statusestabelecimento.data_inicio_atividade
- Activity start dateestabelecimento.atividade_principal.descricao
- Main activity description1npm install directus-brazilian-standards
🐛 v1.4.1 Bug Fix: Fixed critical currency formatting issue where typing
10000
displayed asR$ 100,00
instead ofR$ 10.000,00
1. Create field → Type: Decimal → Precision: 12,2
2. Interface: Brazilian Currency (BRL)
3. Display: Brazilian Currency (BRL)
4. Configure options as needed
1. Create field → Type: String → Max Length: 8
2. Interface: Brazilian CEP
3. Display: Brazilian CEP
4. Enable validation as needed
1. Create field → Type: String → Max Length: 11
2. Interface: Brazilian CPF
3. Display: Brazilian CPF
4. Enable CPF validation as needed
Brazilian CNPJ
interface1{ 2 "price": 1299.99, // Number, perfect for calculations 3 "total": 25000.50 // No string conversion needed 4}
1{ 2 "postal_code": "77360016" // Clean numbers for integrations 3}
1{ 2 "tax_id": "01958284106" // Clean numbers for validation 3}
This package includes both interfaces (for input/editing) and displays (for read-only views).
brazilian-currency
- Currency input with live formattingbrazilian-cep
- CEP input with validationbrazilian-cpf
- CPF input with validationbrazilian-cnpj
- CNPJ input with validation and API lookupbrazilian-currency-display
- Currency display with Brazilian formattingbrazilian-cep-display
- CEP display with formattingbrazilian-cpf-display
- CPF display with formatting and privacy optionsbrazilian-cnpj-display
- CNPJ display with formatting and API lookupBrazilian users see familiar formatting they expect
Proper validation prevents invalid entries
Clean data storage, no string parsing needed
Easy to use, well-documented, TypeScript support
Thoroughly tested, used in production systems
User types: 1000
Display shows: R$ 10,00
Database stores: 10.00
User types: 77360016
Display shows: 77.360-016
Database stores: "77360016"
User types: 01958284106
Display shows: 019.582.841-06
Database stores: "01958284106"
User types: 33.000.167/0001-01
Display shows: 33.000.167/0001-01
Database stores: "33.000.167/0001-01"
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)This project is licensed under the MIT License - see the LICENSE file for details.
Bruno Ribeiro
Made with ❤️ for the Brazilian developer community 🇧🇷
No vulnerabilities found.
No security vulnerabilities found.