@seniorsistemas/components-ai 0.0.0-master-d4a804fe
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/CHANGELOG.md +101 -0
- package/CONTRIBUTING.md +317 -0
- package/README.md +161 -0
- package/docs/API.md +486 -0
- package/docs/COMPONENTS.md +272 -0
- package/docs/EXAMPLES.md +559 -0
- package/docs/MIGRATION.md +367 -0
- package/esm2022/lib/angular-components.module.mjs +25 -0
- package/esm2022/lib/components/breadcrumb/breadcrumb.component.mjs +121 -0
- package/esm2022/lib/components/bulk-delete-dialog/bulk-delete-dialog.component.mjs +176 -0
- package/esm2022/lib/components/dynamic-form/dynamic-form.component.mjs +625 -0
- package/esm2022/lib/components/dynamic-form/fields/dynamic-field-date.component.mjs +86 -0
- package/esm2022/lib/components/dynamic-form/fields/dynamic-field-dropdown.component.mjs +103 -0
- package/esm2022/lib/components/dynamic-form/fields/dynamic-field-lookup.component.mjs +599 -0
- package/esm2022/lib/components/dynamic-form/fields/dynamic-field-number.component.mjs +92 -0
- package/esm2022/lib/components/dynamic-form/fields/dynamic-field-text.component.mjs +163 -0
- package/esm2022/lib/components/dynamic-form/fields/dynamic-field-textarea.component.mjs +81 -0
- package/esm2022/lib/components/dynamic-form/fields/dynamic-field-wrapper.component.mjs +93 -0
- package/esm2022/lib/components/dynamic-form/fields/index.mjs +8 -0
- package/esm2022/lib/components/dynamic-form/models/dynamic-form.models.mjs +2 -0
- package/esm2022/lib/components/export-dialog/export-dialog.component.mjs +219 -0
- package/esm2022/lib/config/translation.config.mjs +70 -0
- package/esm2022/lib/directives/cep-mask.directive.mjs +79 -0
- package/esm2022/lib/directives/document-mask.directive.mjs +62 -0
- package/esm2022/lib/directives/phone-mask.directive.mjs +59 -0
- package/esm2022/lib/interceptors/api.interceptor.mjs +55 -0
- package/esm2022/lib/models/base-entity.interface.mjs +2 -0
- package/esm2022/lib/models/entity-list.config.mjs +2 -0
- package/esm2022/lib/pipes/translate.pipe.mjs +74 -0
- package/esm2022/lib/services/auth.service.mjs +169 -0
- package/esm2022/lib/services/cookie.service.mjs +90 -0
- package/esm2022/lib/services/entity.service.mjs +208 -0
- package/esm2022/lib/services/mask.service.mjs +121 -0
- package/esm2022/lib/services/permission.service.mjs +180 -0
- package/esm2022/lib/services/senior-token.service.mjs +209 -0
- package/esm2022/lib/services/theme.service.mjs +85 -0
- package/esm2022/lib/services/translation.service.mjs +232 -0
- package/esm2022/public-api.mjs +90 -0
- package/esm2022/seniorsistemas-components-ai.mjs +5 -0
- package/fesm2022/seniorsistemas-components-ai.mjs +4006 -0
- package/fesm2022/seniorsistemas-components-ai.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/angular-components.module.d.ts +13 -0
- package/lib/components/breadcrumb/breadcrumb.component.d.ts +23 -0
- package/lib/components/bulk-delete-dialog/bulk-delete-dialog.component.d.ts +46 -0
- package/lib/components/dynamic-form/dynamic-form.component.d.ts +97 -0
- package/lib/components/dynamic-form/fields/dynamic-field-date.component.d.ts +16 -0
- package/lib/components/dynamic-form/fields/dynamic-field-dropdown.component.d.ts +17 -0
- package/lib/components/dynamic-form/fields/dynamic-field-lookup.component.d.ts +52 -0
- package/lib/components/dynamic-form/fields/dynamic-field-number.component.d.ts +16 -0
- package/lib/components/dynamic-form/fields/dynamic-field-text.component.d.ts +17 -0
- package/lib/components/dynamic-form/fields/dynamic-field-textarea.component.d.ts +16 -0
- package/lib/components/dynamic-form/fields/dynamic-field-wrapper.component.d.ts +20 -0
- package/lib/components/dynamic-form/fields/index.d.ts +7 -0
- package/lib/components/dynamic-form/models/dynamic-form.models.d.ts +178 -0
- package/lib/components/export-dialog/export-dialog.component.d.ts +56 -0
- package/lib/config/translation.config.d.ts +24 -0
- package/lib/directives/cep-mask.directive.d.ts +13 -0
- package/lib/directives/document-mask.directive.d.ts +19 -0
- package/lib/directives/phone-mask.directive.d.ts +11 -0
- package/lib/interceptors/api.interceptor.d.ts +2 -0
- package/lib/models/base-entity.interface.d.ts +7 -0
- package/lib/models/entity-list.config.d.ts +161 -0
- package/lib/pipes/translate.pipe.d.ts +21 -0
- package/lib/services/auth.service.d.ts +82 -0
- package/lib/services/cookie.service.d.ts +31 -0
- package/lib/services/entity.service.d.ts +99 -0
- package/lib/services/mask.service.d.ts +36 -0
- package/lib/services/permission.service.d.ts +91 -0
- package/lib/services/senior-token.service.d.ts +70 -0
- package/lib/services/theme.service.d.ts +16 -0
- package/lib/services/translation.service.d.ts +54 -0
- package/package.json +53 -0
- package/public-api.d.ts +17 -0
- package/src/lib/styles/entity-list.shared.scss +383 -0
- package/src/lib/styles/index.scss +10 -0
package/docs/API.md
ADDED
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
# Referência da API
|
|
2
|
+
|
|
3
|
+
## 📚 @seniorsistemas/components-ia
|
|
4
|
+
|
|
5
|
+
Documentação completa da API da biblioteca.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🎨 Componentes
|
|
10
|
+
|
|
11
|
+
### DynamicFormComponent
|
|
12
|
+
|
|
13
|
+
Componente de formulário dinâmico.
|
|
14
|
+
|
|
15
|
+
#### Seletor
|
|
16
|
+
```typescript
|
|
17
|
+
sia-dynamic-form
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
#### Propriedades
|
|
21
|
+
|
|
22
|
+
| Propriedade | Tipo | Padrão | Descrição |
|
|
23
|
+
|------------|------|--------|-----------|
|
|
24
|
+
| `formFields` | `DynamicFormFieldConfig[]` | `[]` | Configuração dos campos (modo direto) |
|
|
25
|
+
| `formSections` | `DynamicFormSection[]` | `[]` | Configuração com seções |
|
|
26
|
+
| `entity` | `any` | `null` | Entidade para edição |
|
|
27
|
+
| `mode` | `'create' \| 'edit' \| 'filter' \| 'inline-edit'` | `'create'` | Modo do formulário |
|
|
28
|
+
| `displayMode` | `'inline' \| 'dialog' \| 'drawer'` | `'inline'` | Modo de exibição |
|
|
29
|
+
| `visible` | `boolean` | `false` | Visibilidade (dialog/drawer) |
|
|
30
|
+
| `dialogHeader` | `string` | `''` | Título do dialog/drawer |
|
|
31
|
+
| `submitButtonLabel` | `string` | `'Salvar'` | Label do botão submit |
|
|
32
|
+
| `cancelButtonLabel` | `string` | `'Cancelar'` | Label do botão cancelar |
|
|
33
|
+
|
|
34
|
+
#### Eventos
|
|
35
|
+
|
|
36
|
+
| Evento | Tipo | Descrição |
|
|
37
|
+
|--------|------|-----------|
|
|
38
|
+
| `onSubmit` | `EventEmitter<any>` | Emitido ao submeter o formulário |
|
|
39
|
+
| `onCancel` | `EventEmitter<void>` | Emitido ao cancelar |
|
|
40
|
+
| `visibleChange` | `EventEmitter<boolean>` | Two-way binding de visibilidade |
|
|
41
|
+
|
|
42
|
+
#### Métodos Públicos
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
getForm(): FormGroup
|
|
46
|
+
```
|
|
47
|
+
Retorna o FormGroup do formulário.
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
resetForm(): void
|
|
51
|
+
```
|
|
52
|
+
Reseta o formulário para o estado inicial.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
### ExportDialogComponent
|
|
57
|
+
|
|
58
|
+
Dialog para exportação de dados.
|
|
59
|
+
|
|
60
|
+
#### Seletor
|
|
61
|
+
```typescript
|
|
62
|
+
sia-export-dialog
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
#### Propriedades
|
|
66
|
+
|
|
67
|
+
| Propriedade | Tipo | Padrão | Descrição |
|
|
68
|
+
|------------|------|--------|-----------|
|
|
69
|
+
| `visible` | `boolean` | `false` | Visibilidade do dialog |
|
|
70
|
+
| `data` | `any[]` | `[]` | Dados para exportação |
|
|
71
|
+
| `columns` | `ColumnOption[]` | `[]` | Configuração das colunas |
|
|
72
|
+
| `fileName` | `string` | `'export'` | Nome do arquivo |
|
|
73
|
+
|
|
74
|
+
#### Eventos
|
|
75
|
+
|
|
76
|
+
| Evento | Tipo | Descrição |
|
|
77
|
+
|--------|------|-----------|
|
|
78
|
+
| `visibleChange` | `EventEmitter<boolean>` | Two-way binding de visibilidade |
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### BulkDeleteDialogComponent
|
|
83
|
+
|
|
84
|
+
Dialog para exclusão em massa.
|
|
85
|
+
|
|
86
|
+
#### Seletor
|
|
87
|
+
```typescript
|
|
88
|
+
sia-bulk-delete-dialog
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
#### Propriedades
|
|
92
|
+
|
|
93
|
+
| Propriedade | Tipo | Padrão | Descrição |
|
|
94
|
+
|------------|------|--------|-----------|
|
|
95
|
+
| `visible` | `boolean` | `false` | Visibilidade do dialog |
|
|
96
|
+
| `selectedItems` | `any[]` | `[]` | Itens selecionados |
|
|
97
|
+
| `entityName` | `string` | `''` | Nome da entidade (singular) |
|
|
98
|
+
| `entityPluralName` | `string` | `''` | Nome da entidade (plural) |
|
|
99
|
+
|
|
100
|
+
#### Eventos
|
|
101
|
+
|
|
102
|
+
| Evento | Tipo | Descrição |
|
|
103
|
+
|--------|------|-----------|
|
|
104
|
+
| `visibleChange` | `EventEmitter<boolean>` | Two-way binding de visibilidade |
|
|
105
|
+
| `onConfirm` | `EventEmitter<void>` | Emitido ao confirmar exclusão |
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
### BreadcrumbComponent
|
|
110
|
+
|
|
111
|
+
Componente de navegação breadcrumb.
|
|
112
|
+
|
|
113
|
+
#### Seletor
|
|
114
|
+
```typescript
|
|
115
|
+
sia-breadcrumb
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### Propriedades
|
|
119
|
+
|
|
120
|
+
| Propriedade | Tipo | Padrão | Descrição |
|
|
121
|
+
|------------|------|--------|-----------|
|
|
122
|
+
| `items` | `MenuItem[]` | `[]` | Itens do breadcrumb |
|
|
123
|
+
| `home` | `MenuItem` | `null` | Item home |
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 🔧 Serviços
|
|
128
|
+
|
|
129
|
+
### EntityService<T>
|
|
130
|
+
|
|
131
|
+
Serviço base genérico para operações CRUD.
|
|
132
|
+
|
|
133
|
+
#### Métodos
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
list(params?: ListParams): Observable<EntityListResponse<T>>
|
|
137
|
+
```
|
|
138
|
+
Lista entidades com paginação e filtros.
|
|
139
|
+
|
|
140
|
+
**Parâmetros:**
|
|
141
|
+
- `params.page`: Número da página (padrão: 0)
|
|
142
|
+
- `params.size`: Tamanho da página (padrão: 10)
|
|
143
|
+
- `params.sort`: Ordenação (ex: 'name,asc')
|
|
144
|
+
- `params.filter`: Filtros (objeto chave-valor)
|
|
145
|
+
|
|
146
|
+
**Retorno:**
|
|
147
|
+
```typescript
|
|
148
|
+
{
|
|
149
|
+
content: T[],
|
|
150
|
+
totalElements: number,
|
|
151
|
+
totalPages: number,
|
|
152
|
+
size: number,
|
|
153
|
+
number: number
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
```typescript
|
|
158
|
+
getById(id: number | string): Observable<T>
|
|
159
|
+
```
|
|
160
|
+
Busca entidade por ID.
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
insert(entity: Partial<T>): Observable<T>
|
|
164
|
+
```
|
|
165
|
+
Cria nova entidade.
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
update(id: number | string, entity: Partial<T>): Observable<T>
|
|
169
|
+
```
|
|
170
|
+
Atualiza entidade existente.
|
|
171
|
+
|
|
172
|
+
```typescript
|
|
173
|
+
delete(id: number | string): Observable<void>
|
|
174
|
+
```
|
|
175
|
+
Exclui entidade.
|
|
176
|
+
|
|
177
|
+
```typescript
|
|
178
|
+
bulkDelete(ids: (number | string)[]): Observable<void>
|
|
179
|
+
```
|
|
180
|
+
Exclui múltiplas entidades.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
### TranslationService
|
|
185
|
+
|
|
186
|
+
Serviço de internacionalização.
|
|
187
|
+
|
|
188
|
+
#### Métodos
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
translate(key: string, params?: any): string
|
|
192
|
+
```
|
|
193
|
+
Traduz uma chave.
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
setLanguage(language: SupportedLanguage): void
|
|
197
|
+
```
|
|
198
|
+
Define o idioma atual.
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
getCurrentLanguage(): SupportedLanguage
|
|
202
|
+
```
|
|
203
|
+
Retorna o idioma atual.
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
onLanguageChange(): Observable<SupportedLanguage>
|
|
207
|
+
```
|
|
208
|
+
Observable de mudanças de idioma.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
### ThemeService
|
|
213
|
+
|
|
214
|
+
Serviço de gerenciamento de temas.
|
|
215
|
+
|
|
216
|
+
#### Métodos
|
|
217
|
+
|
|
218
|
+
```typescript
|
|
219
|
+
setTheme(theme: 'light' | 'dark'): void
|
|
220
|
+
```
|
|
221
|
+
Define o tema.
|
|
222
|
+
|
|
223
|
+
```typescript
|
|
224
|
+
getCurrentTheme(): 'light' | 'dark'
|
|
225
|
+
```
|
|
226
|
+
Retorna o tema atual.
|
|
227
|
+
|
|
228
|
+
```typescript
|
|
229
|
+
toggleTheme(): void
|
|
230
|
+
```
|
|
231
|
+
Alterna entre light e dark.
|
|
232
|
+
|
|
233
|
+
```typescript
|
|
234
|
+
onThemeChange(): Observable<'light' | 'dark'>
|
|
235
|
+
```
|
|
236
|
+
Observable de mudanças de tema.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
### AuthService
|
|
241
|
+
|
|
242
|
+
Serviço de autenticação.
|
|
243
|
+
|
|
244
|
+
#### Métodos
|
|
245
|
+
|
|
246
|
+
```typescript
|
|
247
|
+
login(credentials: { username: string; password: string }): Observable<UserToken>
|
|
248
|
+
```
|
|
249
|
+
Realiza login.
|
|
250
|
+
|
|
251
|
+
```typescript
|
|
252
|
+
logout(): void
|
|
253
|
+
```
|
|
254
|
+
Realiza logout.
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
getToken(): string | null
|
|
258
|
+
```
|
|
259
|
+
Retorna o token atual.
|
|
260
|
+
|
|
261
|
+
```typescript
|
|
262
|
+
isAuthenticated(): boolean
|
|
263
|
+
```
|
|
264
|
+
Verifica se está autenticado.
|
|
265
|
+
|
|
266
|
+
```typescript
|
|
267
|
+
getCurrentUser(): UserToken | null
|
|
268
|
+
```
|
|
269
|
+
Retorna o usuário atual.
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
### PermissionService
|
|
274
|
+
|
|
275
|
+
Serviço de controle de permissões.
|
|
276
|
+
|
|
277
|
+
#### Métodos
|
|
278
|
+
|
|
279
|
+
```typescript
|
|
280
|
+
hasPermission(permission: string): Observable<boolean>
|
|
281
|
+
```
|
|
282
|
+
Verifica se tem permissão.
|
|
283
|
+
|
|
284
|
+
```typescript
|
|
285
|
+
checkAccess(resource: string, action: string): Observable<boolean>
|
|
286
|
+
```
|
|
287
|
+
Verifica acesso a recurso.
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## 📦 Interfaces e Types
|
|
292
|
+
|
|
293
|
+
### DynamicFormFieldConfig
|
|
294
|
+
|
|
295
|
+
```typescript
|
|
296
|
+
interface DynamicFormFieldConfig {
|
|
297
|
+
name: string;
|
|
298
|
+
label: string;
|
|
299
|
+
type: FieldType;
|
|
300
|
+
value?: any;
|
|
301
|
+
required?: boolean;
|
|
302
|
+
disabled?: boolean;
|
|
303
|
+
placeholder?: string;
|
|
304
|
+
options?: SelectOption[];
|
|
305
|
+
rows?: number;
|
|
306
|
+
mask?: string;
|
|
307
|
+
validators?: ValidatorFn[];
|
|
308
|
+
lookupConfig?: LookupConfig;
|
|
309
|
+
dateFormat?: string;
|
|
310
|
+
showTime?: boolean;
|
|
311
|
+
minDate?: Date;
|
|
312
|
+
maxDate?: Date;
|
|
313
|
+
accept?: string;
|
|
314
|
+
multiple?: boolean;
|
|
315
|
+
min?: number;
|
|
316
|
+
max?: number;
|
|
317
|
+
step?: number;
|
|
318
|
+
cols?: number;
|
|
319
|
+
}
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### DynamicFormSection
|
|
323
|
+
|
|
324
|
+
```typescript
|
|
325
|
+
interface DynamicFormSection {
|
|
326
|
+
title: string;
|
|
327
|
+
fields: DynamicFormFieldConfig[];
|
|
328
|
+
collapsible?: boolean;
|
|
329
|
+
collapsed?: boolean;
|
|
330
|
+
}
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### FieldType
|
|
334
|
+
|
|
335
|
+
```typescript
|
|
336
|
+
enum FieldType {
|
|
337
|
+
TEXT = 'text',
|
|
338
|
+
TEXTAREA = 'textarea',
|
|
339
|
+
NUMBER = 'number',
|
|
340
|
+
EMAIL = 'email',
|
|
341
|
+
PASSWORD = 'password',
|
|
342
|
+
DATE = 'date',
|
|
343
|
+
DATETIME = 'datetime',
|
|
344
|
+
SELECT = 'select',
|
|
345
|
+
MULTISELECT = 'multiselect',
|
|
346
|
+
CHECKBOX = 'checkbox',
|
|
347
|
+
RADIO = 'radio',
|
|
348
|
+
SWITCH = 'switch',
|
|
349
|
+
LOOKUP = 'lookup',
|
|
350
|
+
FILE = 'file',
|
|
351
|
+
HIDDEN = 'hidden'
|
|
352
|
+
}
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### SelectOption
|
|
356
|
+
|
|
357
|
+
```typescript
|
|
358
|
+
interface SelectOption {
|
|
359
|
+
label: string;
|
|
360
|
+
value: any;
|
|
361
|
+
disabled?: boolean;
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### LookupConfig
|
|
366
|
+
|
|
367
|
+
```typescript
|
|
368
|
+
interface LookupConfig {
|
|
369
|
+
service: EntityService<any>;
|
|
370
|
+
displayField: string;
|
|
371
|
+
valueField: string;
|
|
372
|
+
searchFields: string[];
|
|
373
|
+
columns: ColumnOption[];
|
|
374
|
+
pageSize?: number;
|
|
375
|
+
}
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### ColumnOption
|
|
379
|
+
|
|
380
|
+
```typescript
|
|
381
|
+
interface ColumnOption {
|
|
382
|
+
field: string;
|
|
383
|
+
header: string;
|
|
384
|
+
selected?: boolean;
|
|
385
|
+
}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### EntityListResponse<T>
|
|
389
|
+
|
|
390
|
+
```typescript
|
|
391
|
+
interface EntityListResponse<T> {
|
|
392
|
+
content: T[];
|
|
393
|
+
totalElements: number;
|
|
394
|
+
totalPages: number;
|
|
395
|
+
size: number;
|
|
396
|
+
number: number;
|
|
397
|
+
}
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### ListParams
|
|
401
|
+
|
|
402
|
+
```typescript
|
|
403
|
+
interface ListParams {
|
|
404
|
+
page?: number;
|
|
405
|
+
size?: number;
|
|
406
|
+
sort?: string;
|
|
407
|
+
filter?: Record<string, any>;
|
|
408
|
+
}
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### UserToken
|
|
412
|
+
|
|
413
|
+
```typescript
|
|
414
|
+
interface UserToken {
|
|
415
|
+
access_token: string;
|
|
416
|
+
token_type: string;
|
|
417
|
+
expires_in: number;
|
|
418
|
+
refresh_token?: string;
|
|
419
|
+
user?: {
|
|
420
|
+
id: number;
|
|
421
|
+
username: string;
|
|
422
|
+
email: string;
|
|
423
|
+
name: string;
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### BaseEntity
|
|
429
|
+
|
|
430
|
+
```typescript
|
|
431
|
+
interface BaseEntity {
|
|
432
|
+
id?: number;
|
|
433
|
+
createdAt?: Date;
|
|
434
|
+
updatedAt?: Date;
|
|
435
|
+
active?: boolean;
|
|
436
|
+
}
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## 🎨 Diretivas
|
|
442
|
+
|
|
443
|
+
### CepMaskDirective
|
|
444
|
+
|
|
445
|
+
Aplica máscara de CEP (00000-000).
|
|
446
|
+
|
|
447
|
+
```typescript
|
|
448
|
+
<input type="text" pInputText cepMask />
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### DocumentMaskDirective
|
|
452
|
+
|
|
453
|
+
Aplica máscara de CPF/CNPJ automaticamente.
|
|
454
|
+
|
|
455
|
+
```typescript
|
|
456
|
+
<input type="text" pInputText documentMask />
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### PhoneMaskDirective
|
|
460
|
+
|
|
461
|
+
Aplica máscara de telefone (00) 00000-0000.
|
|
462
|
+
|
|
463
|
+
```typescript
|
|
464
|
+
<input type="text" pInputText phoneMask />
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
---
|
|
468
|
+
|
|
469
|
+
## 🔄 Pipes
|
|
470
|
+
|
|
471
|
+
### TranslatePipe
|
|
472
|
+
|
|
473
|
+
Pipe de tradução.
|
|
474
|
+
|
|
475
|
+
```typescript
|
|
476
|
+
{{ 'key.translation' | translate }}
|
|
477
|
+
{{ 'key.with.params' | translate:{ name: 'João' } }}
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
---
|
|
481
|
+
|
|
482
|
+
## 🔗 Veja Também
|
|
483
|
+
|
|
484
|
+
- [Documentação de Componentes](./COMPONENTS.md)
|
|
485
|
+
- [Exemplos Práticos](./EXAMPLES.md)
|
|
486
|
+
- [Guia de Migração](./MIGRATION.md)
|