@praxisui/dynamic-fields 8.0.0-beta.7 → 8.0.0-beta.71
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 +19 -0
- package/docs/dynamic-fields-field-catalog.md +217 -0
- package/docs/dynamic-fields-field-selection-guide.md +204 -0
- package/docs/dynamic-fields-host-custom-field-guide.md +252 -0
- package/docs/dynamic-fields-host-custom-field-troubleshooting.md +160 -0
- package/docs/dynamic-fields-inline-components-guide.md +582 -0
- package/docs/dynamic-fields-inline-filter-catalog.md +502 -0
- package/docs/dynamic-fields-inline-filter-custom-component-guide.md +241 -0
- package/docs/dynamic-fields-inline-filter-inventory.md +247 -0
- package/docs/dynamic-fields-inline-filter-runtime-contract.md +391 -0
- package/docs/dynamic-fields-inline-filter-selection-guide.md +419 -0
- package/docs/dynamic-fields-inline-filter-troubleshooting.md +201 -0
- package/docs/dynamic-fields-inventory.md +206 -0
- package/docs/dynamic-fields-playground-catalog-plan.md +243 -0
- package/docs/generic-crud-service.md +152 -0
- package/fesm2022/praxisui-dynamic-fields-index-CBogy3si.mjs +1 -0
- package/fesm2022/praxisui-dynamic-fields-index-CWPZdn1Y.mjs +6 -0
- package/fesm2022/praxisui-dynamic-fields-index-CrHhyUMO.mjs +1 -0
- package/fesm2022/praxisui-dynamic-fields-index-DhGo5In4.mjs +6 -0
- package/fesm2022/praxisui-dynamic-fields.mjs +19551 -10669
- package/package.json +14 -13
- package/src/lib/base/pdx-base-input-runtime-contract.json-api.md +526 -0
- package/src/lib/base/pdx-base-select-runtime-contract.json-api.md +474 -0
- package/src/lib/components/color-input/pdx-color-input.json-api.md +573 -0
- package/src/lib/components/color-picker/pdx-color-picker.json-api.md +686 -0
- package/src/lib/components/date-input/pdx-date-input.json-api.md +581 -0
- package/src/lib/components/datetime-local-input/pdx-datetime-local-input.json-api.md +560 -0
- package/src/lib/components/email-input/pdx-email-input.json-api.md +546 -0
- package/src/lib/components/field-shell/praxis-field-shell.json-api.md +523 -0
- package/src/lib/components/inline-async-select/pdx-inline-async-select.json-api.md +566 -0
- package/src/lib/components/inline-autocomplete/pdx-inline-autocomplete.json-api.md +554 -0
- package/src/lib/components/inline-color-label/pdx-inline-color-label.json-api.md +615 -0
- package/src/lib/components/inline-currency/pdx-inline-currency.json-api.md +542 -0
- package/src/lib/components/inline-currency-range/pdx-inline-currency-range.json-api.md +630 -0
- package/src/lib/components/inline-date/pdx-inline-date.json-api.md +529 -0
- package/src/lib/components/inline-date-range/pdx-inline-date-range.json-api.md +592 -0
- package/src/lib/components/inline-distance-radius/pdx-inline-distance-radius.json-api.md +649 -0
- package/src/lib/components/inline-entity-lookup/pdx-inline-entity-lookup.json-api.md +656 -0
- package/src/lib/components/inline-input/pdx-inline-input.json-api.md +538 -0
- package/src/lib/components/inline-multi-select/pdx-inline-multi-select.json-api.md +566 -0
- package/src/lib/components/inline-number/pdx-inline-number.json-api.md +533 -0
- package/src/lib/components/inline-pipeline-status/pdx-inline-pipeline-status.json-api.md +619 -0
- package/src/lib/components/inline-range-slider/pdx-inline-range-slider.json-api.md +605 -0
- package/src/lib/components/inline-rating/pdx-inline-rating.json-api.md +594 -0
- package/src/lib/components/inline-relative-period/pdx-inline-relative-period.json-api.md +623 -0
- package/src/lib/components/inline-score-priority/pdx-inline-score-priority.json-api.md +632 -0
- package/src/lib/components/inline-searchable-select/pdx-inline-searchable-select.json-api.md +564 -0
- package/src/lib/components/inline-select/pdx-inline-select.json-api.md +571 -0
- package/src/lib/components/inline-sentiment/pdx-inline-sentiment.json-api.md +661 -0
- package/src/lib/components/inline-time/pdx-inline-time.json-api.md +573 -0
- package/src/lib/components/inline-time-range/pdx-inline-time-range.json-api.md +635 -0
- package/src/lib/components/inline-toggle/pdx-inline-toggle.json-api.md +516 -0
- package/src/lib/components/inline-tree-select/pdx-inline-tree-select.json-api.md +637 -0
- package/src/lib/components/material-async-select/pdx-material-async-select.json-api.md +566 -0
- package/src/lib/components/material-autocomplete/pdx-material-autocomplete.json-api.md +561 -0
- package/src/lib/components/material-avatar/pdx-material-avatar.json-api.md +670 -0
- package/src/lib/components/material-button/pdx-material-button.json-api.md +572 -0
- package/src/lib/components/material-button-toggle/pdx-material-button-toggle.json-api.md +577 -0
- package/src/lib/components/material-checkbox-group/pdx-material-checkbox-group.json-api.md +611 -0
- package/src/lib/components/material-chips/pdx-material-chips.json-api.md +601 -0
- package/src/lib/components/material-colorpicker/pdx-material-colorpicker.json-api.md +545 -0
- package/src/lib/components/material-cpf-cnpj-input/pdx-material-cpf-cnpj-input.json-api.md +531 -0
- package/src/lib/components/material-currency/pdx-material-currency.json-api.md +569 -0
- package/src/lib/components/material-date-range/pdx-material-date-range.json-api.md +636 -0
- package/src/lib/components/material-datepicker/pdx-material-datepicker.json-api.md +551 -0
- package/src/lib/components/material-file-upload/pdx-material-file-upload.json-api.md +511 -0
- package/src/lib/components/material-multi-select/pdx-material-multi-select.json-api.md +596 -0
- package/src/lib/components/material-multi-select-tree/pdx-material-multi-select-tree.json-api.md +623 -0
- package/src/lib/components/material-price-range/pdx-material-price-range.json-api.md +619 -0
- package/src/lib/components/material-radio-group/pdx-material-radio-group.json-api.md +585 -0
- package/src/lib/components/material-range-slider/pdx-material-range-slider.json-api.md +664 -0
- package/src/lib/components/material-rating/pdx-material-rating.json-api.md +551 -0
- package/src/lib/components/material-searchable-select/pdx-material-searchable-select.json-api.md +602 -0
- package/src/lib/components/material-select/pdx-material-select.json-api.md +601 -0
- package/src/lib/components/material-selection-list/pdx-material-selection-list.json-api.md +607 -0
- package/src/lib/components/material-slide-toggle/pdx-material-slide-toggle.json-api.md +522 -0
- package/src/lib/components/material-slider/pdx-material-slider.json-api.md +602 -0
- package/src/lib/components/material-textarea/pdx-material-textarea.json-api.md +598 -0
- package/src/lib/components/material-timepicker/pdx-material-timepicker.json-api.md +554 -0
- package/src/lib/components/material-transfer-list/pdx-material-transfer-list.json-api.md +614 -0
- package/src/lib/components/material-tree-select/pdx-material-tree-select.json-api.md +649 -0
- package/src/lib/components/month-input/pdx-month-input.json-api.md +527 -0
- package/src/lib/components/number-input/pdx-number-input.json-api.md +594 -0
- package/src/lib/components/password-input/pdx-password-input.json-api.md +574 -0
- package/src/lib/components/pdx-material-time-range/pdx-material-time-range.json-api.md +592 -0
- package/src/lib/components/pdx-year-input/pdx-year-input.json-api.md +543 -0
- package/src/lib/components/phone-input/pdx-phone-input.json-api.md +583 -0
- package/src/lib/components/preload-status/pdx-preload-status.json-api.md +455 -0
- package/src/lib/components/search-input/pdx-search-input.json-api.md +536 -0
- package/src/lib/components/text-input/pdx-text-input.json-api.md +600 -0
- package/src/lib/components/time-input/pdx-time-input.json-api.md +546 -0
- package/src/lib/components/url-input/pdx-url-input.json-api.md +542 -0
- package/src/lib/components/week-input/pdx-week-input.json-api.md +533 -0
- package/{index.d.ts → types/praxisui-dynamic-fields.d.ts} +874 -440
- package/fesm2022/praxisui-dynamic-fields-index-C9IUU4lo.mjs +0 -1
- package/fesm2022/praxisui-dynamic-fields-index-GJtthzkD.mjs +0 -1
- package/fesm2022/praxisui-dynamic-fields-index-XvVS6lAQ.mjs +0 -1
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "pdx-base-select-runtime-contract JSON API (Canonical)"
|
|
3
|
+
slug: "pdx-base-select-runtime-contract-json-api"
|
|
4
|
+
doc_type: "api-reference"
|
|
5
|
+
component: "pdx-base-select-runtime-contract"
|
|
6
|
+
document_kind: "json-api-canonical"
|
|
7
|
+
reference_mode: "canonical"
|
|
8
|
+
contract_format: "json"
|
|
9
|
+
contract_source: "runtime-and-code"
|
|
10
|
+
description: "Referencia canonica do contrato JSON do componente pdx-base-select-runtime-contract."
|
|
11
|
+
category: "components"
|
|
12
|
+
sub_category: "runtime-contract"
|
|
13
|
+
audience:
|
|
14
|
+
- "frontend"
|
|
15
|
+
- "architect"
|
|
16
|
+
- "platform-team"
|
|
17
|
+
level: "advanced"
|
|
18
|
+
status: "active"
|
|
19
|
+
owner: "praxis-ui"
|
|
20
|
+
source_of_truth:
|
|
21
|
+
- "projects/praxis-dynamic-fields/src/lib/base/simple-base-select.component.ts"
|
|
22
|
+
- "projects/praxis-core/src/lib/models/component-metadata.interface.ts"
|
|
23
|
+
source_of_truth_last_verified: "2026-03-05"
|
|
24
|
+
last_updated: "2026-03-05"
|
|
25
|
+
toc: true
|
|
26
|
+
sidebar: true
|
|
27
|
+
tags:
|
|
28
|
+
- "json-api"
|
|
29
|
+
- "canonical-contract"
|
|
30
|
+
- "pdx-base-select-runtime-contract"
|
|
31
|
+
api_stability: "canonical"
|
|
32
|
+
schema_verified: true
|
|
33
|
+
runtime_verified: false
|
|
34
|
+
editor_coverage_verified: false
|
|
35
|
+
runtime_scope: "public"
|
|
36
|
+
legacy_paths_present: false
|
|
37
|
+
has_known_mismatches: true
|
|
38
|
+
related_components:
|
|
39
|
+
- "praxis-table"
|
|
40
|
+
- "pdx-material-select"
|
|
41
|
+
- "pdx-material-autocomplete"
|
|
42
|
+
- "pdx-material-async-select"
|
|
43
|
+
- "pdx-material-searchable-select"
|
|
44
|
+
- "pdx-material-multi-select"
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
# pdx-base-select-runtime-contract
|
|
48
|
+
|
|
49
|
+
Este documento e a referencia canonica da API JSON de pdx-base-select-runtime-contract.
|
|
50
|
+
|
|
51
|
+
## Summary
|
|
52
|
+
|
|
53
|
+
- Tipo documental: API reference canonica de contrato JSON.
|
|
54
|
+
- Source of truth: runtime e codigo declarados no frontmatter.
|
|
55
|
+
- Objetivo operacional: consulta rapida, auditavel e deterministica sob pressao.
|
|
56
|
+
- Resumo funcional herdado: `SimpleBaseSelectComponent` e o contrato runtime compartilhado dos selects da plataforma. Ele padroniza selecao local/remota, cascata de dependencia e comportamento de busca por JSON metadata-driven. Nao e apenas um helper de UI; e a base de compatibilidade dos componentes `pdx-material-*select*`.
|
|
57
|
+
|
|
58
|
+
## Scope and positioning
|
|
59
|
+
|
|
60
|
+
- Escopo: contrato JSON publico e limites de comportamento observavel.
|
|
61
|
+
- Fora de escopo: tutorial de adocao e walkthrough operacional detalhado.
|
|
62
|
+
- Posicionamento: referencia canonicamente governada para consumidores, arquitetos e mantenedores.
|
|
63
|
+
|
|
64
|
+
## Source of truth
|
|
65
|
+
|
|
66
|
+
| Source | Kind | Notes |
|
|
67
|
+
| --- | --- | --- |
|
|
68
|
+
| projects/praxis-dynamic-fields/src/lib/base/simple-base-select.component.ts | runtime-code | Source de implementacao declarado no repositorio. |
|
|
69
|
+
| projects/praxis-core/src/lib/models/component-metadata.interface.ts | runtime-code | Source de implementacao declarado no repositorio. |
|
|
70
|
+
|
|
71
|
+
## Support legend
|
|
72
|
+
|
|
73
|
+
- Active: suportado e observado no runtime atual.
|
|
74
|
+
- Partial: suporte parcial, com restricoes conhecidas.
|
|
75
|
+
- Declared-only: declarado em tipos/schema sem ligacao runtime confirmada.
|
|
76
|
+
- Schema-only: presente em schema/modelo sem confirmacao de execucao.
|
|
77
|
+
- Deprecated: mantido por compatibilidade legada com migracao prevista.
|
|
78
|
+
|
|
79
|
+
## Contract classification
|
|
80
|
+
|
|
81
|
+
### Canonical paths (public contract)
|
|
82
|
+
|
|
83
|
+
| Path | Type | Required | Default | Status | Notes |
|
|
84
|
+
| --- | --- | --- | --- | --- | --- |
|
|
85
|
+
| `metadata` | `ComponentMetadata` | not-specified | n/a | Active | Payload principal do componente. |
|
|
86
|
+
| `metadata.options` | `SelectOption[]` | not-specified | n/a | Active | Fonte base de opcoes para selects locais. |
|
|
87
|
+
| `metadata.multiple` | `boolean` | not-specified | n/a | Active | Ativa modo multipla selecao no runtime base. |
|
|
88
|
+
| `metadata.searchable` | `boolean` | not-specified | n/a | Active | Habilita estado de busca (componente filho decide UI). |
|
|
89
|
+
| `metadata.selectAll` | `boolean` | not-specified | n/a | Active | Ativa utilitario de selecionar todos em multi-select. |
|
|
90
|
+
| `metadata.maxSelections` | `number` | not-specified | n/a | Active | Limite maximo de selecoes no modo multiplo. |
|
|
91
|
+
| `metadata.resourcePath` | `string` | not-specified | n/a | Active | Habilita carregamento remoto via `GenericCrudService`. |
|
|
92
|
+
| `metadata.filterCriteria` | `Record<string, any>` | not-specified | n/a | Active | Filtros base para consultas remotas. |
|
|
93
|
+
| `metadata.optionLabelKey` | `string` | not-specified | n/a | Active | Chave usada para extrair label de itens remotos. |
|
|
94
|
+
| `metadata.optionValueKey` | `string` | not-specified | n/a | Active | Chave usada para extrair value de itens remotos. |
|
|
95
|
+
| `metadata.emptyOptionText` | `string` | not-specified | n/a | Active | Texto para opcao nula em selects simples. |
|
|
96
|
+
| `metadata.displayWith` | `function` | not-specified | n/a | Active | Funcao de exibicao de valor selecionado (quando suportado pelo filho). |
|
|
97
|
+
| `metadata.compareWith` | `function` | not-specified | n/a | Active | Comparacao customizada para igualdade de opcoes. |
|
|
98
|
+
| `metadata.loadOn` | `'open' \| 'init' \| 'none'` | not-specified | n/a | Partial | Campo do contrato de select; efetivo em componentes filhos que implementam estrategia lazy. |
|
|
99
|
+
|
|
100
|
+
### Supported legacy paths
|
|
101
|
+
|
|
102
|
+
Nenhum path legado suportado foi identificado nesta revisão baseada em evidência textual preservada.
|
|
103
|
+
|
|
104
|
+
### Internal-only paths
|
|
105
|
+
|
|
106
|
+
| Path | Internal consumer | Runtime presence | Public support | Notes |
|
|
107
|
+
| --- | --- | --- | --- | --- |
|
|
108
|
+
| not-yet-mapped | not-yet-verified | not-yet-verified | No | Caminhos internos nao mapeados explicitamente nesta revisao automatizada. |
|
|
109
|
+
|
|
110
|
+
### Experimental paths
|
|
111
|
+
|
|
112
|
+
| Path | Enablement (flag/guard) | Stability | Rollout notes | Notes |
|
|
113
|
+
| --- | --- | --- | --- | --- |
|
|
114
|
+
| not-yet-mapped | not-yet-verified | Experimental | not-yet-verified | Registrar somente quando houver evidencia em runtime/codigo. |
|
|
115
|
+
|
|
116
|
+
## Overview
|
|
117
|
+
|
|
118
|
+
Este arquivo foi adaptado para o padrao canonico atual sem remover conteudo tecnico existente. O conteudo detalhado anterior foi preservado para manter rastreabilidade historica e reduzir perda de contexto.
|
|
119
|
+
|
|
120
|
+
## Public contract surface
|
|
121
|
+
|
|
122
|
+
### Top-level configuration blocks
|
|
123
|
+
|
|
124
|
+
| Block | Purpose | Required | Merge strategy | Notes |
|
|
125
|
+
| --- | --- | --- | --- | --- |
|
|
126
|
+
| metadata | Configuração top-level identificada na referência preservada. | not-yet-verified | component-defined | 14 path(s) mapeado(s), status predominante Active. |
|
|
127
|
+
|
|
128
|
+
### Nested configuration blocks
|
|
129
|
+
|
|
130
|
+
| Path | Type | Required | Default | Constraints | Notes |
|
|
131
|
+
| --- | --- | --- | --- | --- | --- |
|
|
132
|
+
| `metadata` | `ComponentMetadata` | not-specified | n/a | component-defined | Payload principal do componente. |
|
|
133
|
+
| `metadata.options` | `SelectOption[]` | not-specified | n/a | component-defined | Fonte base de opcoes para selects locais. |
|
|
134
|
+
| `metadata.multiple` | `boolean` | not-specified | n/a | component-defined | Ativa modo multipla selecao no runtime base. |
|
|
135
|
+
| `metadata.searchable` | `boolean` | not-specified | n/a | component-defined | Habilita estado de busca (componente filho decide UI). |
|
|
136
|
+
| `metadata.selectAll` | `boolean` | not-specified | n/a | component-defined | Ativa utilitario de selecionar todos em multi-select. |
|
|
137
|
+
| `metadata.maxSelections` | `number` | not-specified | n/a | component-defined | Limite maximo de selecoes no modo multiplo. |
|
|
138
|
+
| `metadata.resourcePath` | `string` | not-specified | n/a | component-defined | Habilita carregamento remoto via `GenericCrudService`. |
|
|
139
|
+
| `metadata.filterCriteria` | `Record<string, any>` | not-specified | n/a | component-defined | Filtros base para consultas remotas. |
|
|
140
|
+
| `metadata.optionLabelKey` | `string` | not-specified | n/a | component-defined | Chave usada para extrair label de itens remotos. |
|
|
141
|
+
| `metadata.optionValueKey` | `string` | not-specified | n/a | component-defined | Chave usada para extrair value de itens remotos. |
|
|
142
|
+
|
|
143
|
+
### Input bindings
|
|
144
|
+
|
|
145
|
+
| Binding/Path | Type | Required | Source | Runtime normalization | Notes |
|
|
146
|
+
| --- | --- | --- | --- | --- | --- |
|
|
147
|
+
| component-inputs | see-detailed-api | not-yet-verified | runtime-and-code | not-yet-verified | Inputs preservados na referência detalhada. |
|
|
148
|
+
|
|
149
|
+
### Output events
|
|
150
|
+
|
|
151
|
+
| Event | Payload | Trigger | Stability | Notes |
|
|
152
|
+
| --- | --- | --- | --- | --- |
|
|
153
|
+
| `selectionChange` | `T \| T[]` | Mudanca do valor selecionado. | Partial | Preservado da documentação anterior. |
|
|
154
|
+
| `optionSelected` | `SelectOption` | Selecao individual de opcao. | Partial | Preservado da documentação anterior. |
|
|
155
|
+
| `optionsLoaded` | `SelectOption[]` | Conclusao de carga remota de opcoes. | Partial | Preservado da documentação anterior. |
|
|
156
|
+
| `openedChange` | `boolean` | Abre/fecha do `MatSelect`. | Partial | Preservado da documentação anterior. |
|
|
157
|
+
| `searchTermChange` | `string` | Mudanca no termo de busca. | Partial | Preservado da documentação anterior. |
|
|
158
|
+
|
|
159
|
+
### External side channels
|
|
160
|
+
|
|
161
|
+
| Channel | Direction | Contract | Failure mode | Notes |
|
|
162
|
+
| --- | --- | --- | --- | --- |
|
|
163
|
+
| host/services/storage | bidirectional | see-detailed-api | not-yet-verified | Side channels dependem do componente e do host consumidor. |
|
|
164
|
+
|
|
165
|
+
### Host/runtime dependencies
|
|
166
|
+
|
|
167
|
+
| Dependency | Required | Environment | Purpose | Notes |
|
|
168
|
+
| --- | --- | --- | --- | --- |
|
|
169
|
+
| see-source-of-truth | true | browser/dev/prod/ssr | runtime linkage | Confirmar por componente quando necessario. |
|
|
170
|
+
|
|
171
|
+
## Coverage matrix
|
|
172
|
+
|
|
173
|
+
| Surface | Verified | Coverage status | Evidence | Notes |
|
|
174
|
+
| --- | --- | --- | --- | --- |
|
|
175
|
+
| Runtime | false | Partial | source_of_truth + conteudo preservado | Revisao estrutural concluida; validacao comportamental fina pode exigir follow-up. |
|
|
176
|
+
| Schema/Types | true | Partial | interfaces/modelos citados | Mapeamento formal de todos os campos ainda pode requerer refinamento. |
|
|
177
|
+
| Editor/Tooling | false | Partial | secoes de editor quando presentes | Cobertura de editor/tooling nem sempre confirmada por evidencia direta. |
|
|
178
|
+
|
|
179
|
+
## Runtime coverage boundaries
|
|
180
|
+
|
|
181
|
+
- Cobertura consolidada com base em documentacao existente e source of truth declarado.
|
|
182
|
+
- Comportamentos fora de evidencia direta foram marcados como not-yet-verified ou Partial.
|
|
183
|
+
- Compatibilidade legada, quando detectada, foi separada em classificacao explicita.
|
|
184
|
+
|
|
185
|
+
## Resolution model
|
|
186
|
+
|
|
187
|
+
### Merge order
|
|
188
|
+
|
|
189
|
+
1. defaults do componente
|
|
190
|
+
2. contrato JSON recebido
|
|
191
|
+
3. overrides de host/runtime
|
|
192
|
+
4. normalizacoes internas
|
|
193
|
+
|
|
194
|
+
### Fallback order
|
|
195
|
+
|
|
196
|
+
contrato explicito -> aliases legados (quando suportados) -> defaults internos -> comportamento seguro
|
|
197
|
+
|
|
198
|
+
### Override points
|
|
199
|
+
|
|
200
|
+
- inputs publicos do componente
|
|
201
|
+
- configuracao JSON de runtime
|
|
202
|
+
- integracoes de host (servicos/tokens/adapters)
|
|
203
|
+
|
|
204
|
+
### Runtime normalization
|
|
205
|
+
|
|
206
|
+
Campos e aliases preservados do documento anterior devem convergir progressivamente para paths canonicos declarados.
|
|
207
|
+
|
|
208
|
+
### Precedence rules
|
|
209
|
+
|
|
210
|
+
Quando houver conflito entre alias e path canonico, priorizar path canonico e manter alias apenas para backward compatibility.
|
|
211
|
+
|
|
212
|
+
## Validation and error semantics
|
|
213
|
+
|
|
214
|
+
### Validation model
|
|
215
|
+
|
|
216
|
+
| Path/Rule | Validation phase | Behavior on fail | Error code / warning | Notes |
|
|
217
|
+
| --- | --- | --- | --- | --- |
|
|
218
|
+
| see-detailed-api | runtime | warn-or-reject | not-yet-standardized | Semantica de validacao preservada do documento anterior. |
|
|
219
|
+
|
|
220
|
+
### Error semantics
|
|
221
|
+
|
|
222
|
+
Erros devem ser classificados em warnings recuperaveis versus falhas bloqueantes. Quando a evidencia nao estiver explicita, tratar como not yet verified.
|
|
223
|
+
|
|
224
|
+
### Fail-open / fail-closed behavior
|
|
225
|
+
|
|
226
|
+
| Condition | Mode | Runtime behavior | Consumer impact |
|
|
227
|
+
| --- | --- | --- | --- |
|
|
228
|
+
| invalid-or-unknown-field | component-defined | not-yet-verified | Variavel por componente; requer verificacao em runtime. |
|
|
229
|
+
|
|
230
|
+
### Invalid or unknown field handling
|
|
231
|
+
|
|
232
|
+
- Campos desconhecidos: comportamento depende da estrategia do componente (ignore, warn ou reject).
|
|
233
|
+
- Campos invalidos: podem gerar fallback, warning ou falha conforme implementacao.
|
|
234
|
+
- Registrar divergencias observadas em Known limitations and mismatches.
|
|
235
|
+
|
|
236
|
+
### Runtime warnings vs hard failures
|
|
237
|
+
|
|
238
|
+
| Condition | Severity | Observability | Consumer action |
|
|
239
|
+
| --- | --- | --- | --- |
|
|
240
|
+
| partial-or-declared-only-coverage | warning | logs/eventos do componente | confirmar ligacao runtime antes de uso critico |
|
|
241
|
+
|
|
242
|
+
## Detailed API
|
|
243
|
+
|
|
244
|
+
### Preserved technical reference (normalized from previous revision)
|
|
245
|
+
|
|
246
|
+
`SimpleBaseSelectComponent` e o contrato runtime compartilhado dos selects da plataforma. Ele padroniza selecao local/remota, cascata de dependencia e comportamento de busca por JSON metadata-driven. Nao e apenas um helper de UI; e a base de compatibilidade dos componentes `pdx-material-*select*`.
|
|
247
|
+
|
|
248
|
+
### Prova em 20 segundos
|
|
249
|
+
|
|
250
|
+
```json
|
|
251
|
+
{
|
|
252
|
+
"metadata": {
|
|
253
|
+
"resourcePath": "customers",
|
|
254
|
+
"optionLabelKey": "name",
|
|
255
|
+
"optionValueKey": "id",
|
|
256
|
+
"multiple": true,
|
|
257
|
+
"maxSelections": 3
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
- O runtime interpreta fonte remota e extracao de label/value por contrato.
|
|
263
|
+
- O mesmo bloco funciona em multiplos componentes filhos de select.
|
|
264
|
+
- As regras de cascata e carga permanecem versionaveis por metadata.
|
|
265
|
+
|
|
266
|
+
### Table of contents
|
|
267
|
+
|
|
268
|
+
- [Start here](#start-here)
|
|
269
|
+
- [Promessa e limites](#promessa-e-limites)
|
|
270
|
+
- [Status model](#status-model)
|
|
271
|
+
- [Checklist corporativo](#checklist-corporativo)
|
|
272
|
+
- [Contrato tecnico completo](#contrato-tecnico-completo)
|
|
273
|
+
- [Matriz completa de cobertura (herdada)](#matriz-completa-de-cobertura-herdada)
|
|
274
|
+
- [Saidas runtime compartilhadas](#saidas-runtime-compartilhadas)
|
|
275
|
+
- [Regras corporativas recomendadas](#regras-corporativas-recomendadas)
|
|
276
|
+
- [Cross-links](#cross-links)
|
|
277
|
+
- [Referencias oficiais Angular](#referencias-oficiais-angular)
|
|
278
|
+
|
|
279
|
+
### Start here
|
|
280
|
+
|
|
281
|
+
#### Promessa e limites
|
|
282
|
+
|
|
283
|
+
**O que isso habilita:** contrato unico para selects locais/remotos com suporte a cascata entre campos e multi-selecao.
|
|
284
|
+
|
|
285
|
+
**Quando usar:** sempre que um componente extender `SimpleBaseSelectComponent`.
|
|
286
|
+
|
|
287
|
+
**Exemplo minimo:** `metadata.options` (local) ou `metadata.resourcePath` (remoto).
|
|
288
|
+
|
|
289
|
+
Garantias:
|
|
290
|
+
|
|
291
|
+
- campos `metadata.*` ativos sao consumidos no runtime base.
|
|
292
|
+
- estrategia de dependencia/cascata e aplicada de forma uniforme.
|
|
293
|
+
- eventos de selecao/carga sao emitidos por interface comum.
|
|
294
|
+
|
|
295
|
+
Limites:
|
|
296
|
+
|
|
297
|
+
- parte do contrato depende do componente filho (`Status: Partial`).
|
|
298
|
+
- campos `Declared-only` permanecem para compatibilidade sem efeito direto no base.
|
|
299
|
+
- validacao de regra de negocio continua externa ao componente.
|
|
300
|
+
|
|
301
|
+
#### Status model
|
|
302
|
+
|
|
303
|
+
- `Status: Active` - consumido diretamente no runtime base.
|
|
304
|
+
- `Status: Partial` - suporte condicional/dependente de componente filho.
|
|
305
|
+
- `Status: Declared-only` - declarado no contrato, sem efeito direto no runtime base.
|
|
306
|
+
- `Status: Runtime-extension` - chave adicional consumida por componentes filhos.
|
|
307
|
+
|
|
308
|
+
#### Checklist corporativo
|
|
309
|
+
|
|
310
|
+
- padronizar `optionLabelKey`/`optionValueKey` por dominio.
|
|
311
|
+
- mapear cascata com `dependencyFilterMap` explicito.
|
|
312
|
+
- definir `loadOn` conforme custo do endpoint.
|
|
313
|
+
- alinhar `maxSelections` com regra funcional e mensagens de validacao.
|
|
314
|
+
|
|
315
|
+
### Contrato tecnico completo
|
|
316
|
+
|
|
317
|
+
#### Matriz completa de cobertura (herdada)
|
|
318
|
+
|
|
319
|
+
| Caminho JSON | Tipo | Status | Comportamento em runtime |
|
|
320
|
+
| --- | --- | --- | --- |
|
|
321
|
+
| `metadata` | `ComponentMetadata` | Active | Payload principal do componente. |
|
|
322
|
+
| `metadata.options` | `SelectOption[]` | Active | Fonte base de opcoes para selects locais. |
|
|
323
|
+
| `metadata.multiple` | `boolean` | Active | Ativa modo multipla selecao no runtime base. |
|
|
324
|
+
| `metadata.searchable` | `boolean` | Active | Habilita estado de busca (componente filho decide UI). |
|
|
325
|
+
| `metadata.selectAll` | `boolean` | Active | Ativa utilitario de selecionar todos em multi-select. |
|
|
326
|
+
| `metadata.maxSelections` | `number` | Active | Limite maximo de selecoes no modo multiplo. |
|
|
327
|
+
| `metadata.resourcePath` | `string` | Active | Habilita carregamento remoto via `GenericCrudService`. |
|
|
328
|
+
| `metadata.filterCriteria` | `Record<string, any>` | Active | Filtros base para consultas remotas. |
|
|
329
|
+
| `metadata.optionLabelKey` | `string` | Active | Chave usada para extrair label de itens remotos. |
|
|
330
|
+
| `metadata.optionValueKey` | `string` | Active | Chave usada para extrair value de itens remotos. |
|
|
331
|
+
| `metadata.emptyOptionText` | `string` | Active | Texto para opcao nula em selects simples. |
|
|
332
|
+
| `metadata.displayWith` | `function` | Active | Funcao de exibicao de valor selecionado (quando suportado pelo filho). |
|
|
333
|
+
| `metadata.compareWith` | `function` | Active | Comparacao customizada para igualdade de opcoes. |
|
|
334
|
+
| `metadata.loadOn` | `'open' \| 'init' \| 'none'` | Partial | Campo do contrato de select; efetivo em componentes filhos que implementam estrategia lazy. |
|
|
335
|
+
| `metadata.clearButton` | `boolean \| object` | Active | Regras de exibicao/icone/tooltip/aria do clear. |
|
|
336
|
+
| `metadata.panelClass` | `string \| string[]` | Active | Classe aplicada ao painel do `MatSelect`. |
|
|
337
|
+
| `metadata.disableRipple` | `boolean` | Active | Desativa ripple no `MatSelect` quando suportado. |
|
|
338
|
+
| `metadata.disableOptionCentering` | `boolean` | Active | Ajusta centralizacao de opcao no `MatSelect`. |
|
|
339
|
+
| `metadata.tabIndex` | `number` | Active | Tab order do `MatSelect`. |
|
|
340
|
+
| `metadata.required` | `boolean` | Active | Estado de obrigatoriedade do controle. |
|
|
341
|
+
| `metadata.ariaLabel` | `string` | Active | ARIA label do `MatSelect`. |
|
|
342
|
+
| `metadata.ariaLabelledby` | `string` | Active | ARIA labelledby do `MatSelect`. |
|
|
343
|
+
| `metadata.dependencyFields` | `string[]` | Active | Liga cascata de filtros por dependencia em mesmo form. |
|
|
344
|
+
| `metadata.enableDependencyCascade` | `boolean` | Active | Ativa/desativa cascata de dependencia. |
|
|
345
|
+
| `metadata.resetOnDependentChange` | `boolean` | Active | Limpa valor quando dependencia muda. |
|
|
346
|
+
| `metadata.dependencyFilterMap` | `Record<string, string \| { key; valuePath? }>` | Active | Mapeia dependencia para chave de filtro backend. |
|
|
347
|
+
| `metadata.dependencyValuePath` | `string \| Record<string, string>` | Active | Caminho para extrair valor da dependencia. |
|
|
348
|
+
| `metadata.dependencyDebounceMs` | `number` | Active | Debounce da cascata entre dependencias. |
|
|
349
|
+
| `metadata.dependencyMergeStrategy` | `'replace' \| 'merge'` | Active | Estrategia de merge de fragmentos no filtro. |
|
|
350
|
+
| `metadata.dependencyLoadOnChange` | `'respectLoadOn' \| 'immediate' \| 'manual'` | Active | Estrategia de recarga quando dependencia muda. |
|
|
351
|
+
| `metadata.suppressInlineErrorsOnCascade` | `boolean` | Declared-only | Declarado no contrato geral; sem efeito direto no runtime base de select. |
|
|
352
|
+
|
|
353
|
+
#### Saidas runtime compartilhadas
|
|
354
|
+
|
|
355
|
+
| Output | Tipo | Quando ocorre |
|
|
356
|
+
| --- | --- | --- |
|
|
357
|
+
| `selectionChange` | `T \| T[]` | Mudanca do valor selecionado. |
|
|
358
|
+
| `optionSelected` | `SelectOption` | Selecao individual de opcao. |
|
|
359
|
+
| `optionsLoaded` | `SelectOption[]` | Conclusao de carga remota de opcoes. |
|
|
360
|
+
| `openedChange` | `boolean` | Abre/fecha do `MatSelect`. |
|
|
361
|
+
| `searchTermChange` | `string` | Mudanca no termo de busca. |
|
|
362
|
+
|
|
363
|
+
#### Regras corporativas recomendadas
|
|
364
|
+
|
|
365
|
+
1. Padronizar `optionLabelKey`/`optionValueKey` por dominio para reduzir acoplamento entre squads.
|
|
366
|
+
2. Em cascata, usar `dependencyFilterMap` explicito para evitar filtros ambiguos no backend.
|
|
367
|
+
3. Definir `loadOn` conforme custo de endpoint (`open` para endpoints pesados; `init` para UX critica).
|
|
368
|
+
4. Em multi-select, alinhar `maxSelections` com regra de negocio e mensagens de validacao de formulario.
|
|
369
|
+
|
|
370
|
+
#### Cross-links
|
|
371
|
+
|
|
372
|
+
- `projects/praxis-dynamic-fields/src/lib/components/material-select/pdx-material-select.json-api.md`
|
|
373
|
+
- `projects/praxis-dynamic-fields/src/lib/components/material-autocomplete/pdx-material-autocomplete.json-api.md`
|
|
374
|
+
- `projects/praxis-dynamic-fields/src/lib/components/material-async-select/pdx-material-async-select.json-api.md`
|
|
375
|
+
- `projects/praxis-dynamic-fields/src/lib/components/material-searchable-select/pdx-material-searchable-select.json-api.md`
|
|
376
|
+
- `projects/praxis-dynamic-fields/src/lib/components/material-multi-select/pdx-material-multi-select.json-api.md`
|
|
377
|
+
|
|
378
|
+
### Referencias oficiais Angular
|
|
379
|
+
|
|
380
|
+
- Acessibilidade em Angular: https://angular.dev/best-practices/a11y
|
|
381
|
+
- Criacao e manutencao de libraries: https://angular.dev/tools/libraries/creating-libraries
|
|
382
|
+
|
|
383
|
+
## JSON path index
|
|
384
|
+
|
|
385
|
+
| Path | Type | Required | Default | Status | Notes |
|
|
386
|
+
| --- | --- | --- | --- | --- | --- |
|
|
387
|
+
| `metadata` | `ComponentMetadata` | not-specified | n/a | Active | Payload principal do componente. |
|
|
388
|
+
| `metadata.options` | `SelectOption[]` | not-specified | n/a | Active | Fonte base de opcoes para selects locais. |
|
|
389
|
+
| `metadata.multiple` | `boolean` | not-specified | n/a | Active | Ativa modo multipla selecao no runtime base. |
|
|
390
|
+
| `metadata.searchable` | `boolean` | not-specified | n/a | Active | Habilita estado de busca (componente filho decide UI). |
|
|
391
|
+
| `metadata.selectAll` | `boolean` | not-specified | n/a | Active | Ativa utilitario de selecionar todos em multi-select. |
|
|
392
|
+
| `metadata.maxSelections` | `number` | not-specified | n/a | Active | Limite maximo de selecoes no modo multiplo. |
|
|
393
|
+
| `metadata.resourcePath` | `string` | not-specified | n/a | Active | Habilita carregamento remoto via `GenericCrudService`. |
|
|
394
|
+
| `metadata.filterCriteria` | `Record<string, any>` | not-specified | n/a | Active | Filtros base para consultas remotas. |
|
|
395
|
+
| `metadata.optionLabelKey` | `string` | not-specified | n/a | Active | Chave usada para extrair label de itens remotos. |
|
|
396
|
+
| `metadata.optionValueKey` | `string` | not-specified | n/a | Active | Chave usada para extrair value de itens remotos. |
|
|
397
|
+
| `metadata.emptyOptionText` | `string` | not-specified | n/a | Active | Texto para opcao nula em selects simples. |
|
|
398
|
+
| `metadata.displayWith` | `function` | not-specified | n/a | Active | Funcao de exibicao de valor selecionado (quando suportado pelo filho). |
|
|
399
|
+
| `metadata.compareWith` | `function` | not-specified | n/a | Active | Comparacao customizada para igualdade de opcoes. |
|
|
400
|
+
| `metadata.loadOn` | `'open' \| 'init' \| 'none'` | not-specified | n/a | Partial | Campo do contrato de select; efetivo em componentes filhos que implementam estrategia lazy. |
|
|
401
|
+
|
|
402
|
+
## Events
|
|
403
|
+
|
|
404
|
+
| Event | Payload | Trigger | Stability | Notes |
|
|
405
|
+
| --- | --- | --- | --- | --- |
|
|
406
|
+
| `selectionChange` | `T \| T[]` | Mudanca do valor selecionado. | Partial | Preservado da documentação anterior. |
|
|
407
|
+
| `optionSelected` | `SelectOption` | Selecao individual de opcao. | Partial | Preservado da documentação anterior. |
|
|
408
|
+
| `optionsLoaded` | `SelectOption[]` | Conclusao de carga remota de opcoes. | Partial | Preservado da documentação anterior. |
|
|
409
|
+
| `openedChange` | `boolean` | Abre/fecha do `MatSelect`. | Partial | Preservado da documentação anterior. |
|
|
410
|
+
| `searchTermChange` | `string` | Mudanca no termo de busca. | Partial | Preservado da documentação anterior. |
|
|
411
|
+
|
|
412
|
+
## Styling API
|
|
413
|
+
|
|
414
|
+
| Token/Class | Scope | Purpose | Notes |
|
|
415
|
+
| --- | --- | --- | --- |
|
|
416
|
+
| see-detailed-api | component | styling/runtime | Consolidar naming canonico quando aplicavel. |
|
|
417
|
+
|
|
418
|
+
## Editor and tooling notes
|
|
419
|
+
|
|
420
|
+
- Cobertura de editor/tooling foi separada da cobertura de runtime para evitar confusao de suporte.
|
|
421
|
+
- Quando nao houver evidencia direta no codigo, o status deve permanecer not yet verified.
|
|
422
|
+
|
|
423
|
+
## Examples
|
|
424
|
+
|
|
425
|
+
### Minimal valid
|
|
426
|
+
|
|
427
|
+
```json
|
|
428
|
+
{
|
|
429
|
+
"metadata": {
|
|
430
|
+
"resourcePath": "customers",
|
|
431
|
+
"optionLabelKey": "name",
|
|
432
|
+
"optionValueKey": "id",
|
|
433
|
+
"multiple": true,
|
|
434
|
+
"maxSelections": 3
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### Typical/common
|
|
440
|
+
|
|
441
|
+
```json
|
|
442
|
+
{}
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
### Advanced
|
|
446
|
+
|
|
447
|
+
```json
|
|
448
|
+
{}
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### Enterprise scenario
|
|
452
|
+
|
|
453
|
+
```json
|
|
454
|
+
{}
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
## Known limitations and mismatches
|
|
458
|
+
|
|
459
|
+
| Path/Behavior | Observed behavior (runtime) | Desired behavior | Impact | Tracking issue | Target fix |
|
|
460
|
+
| --- | --- | --- | --- | --- | --- |
|
|
461
|
+
| coverage/mapping | Evidência textual preservada indica itens Partial/Declared-only. | Cobertura confirmada por evidência runtime + schema + editor. | Pode gerar uso de paths não totalmente ligados. | to-be-linked | next-doc-cycle |
|
|
462
|
+
|
|
463
|
+
## Compatibility and migration notes
|
|
464
|
+
|
|
465
|
+
| Concern | Affected versions | Migration action | Deadline | Notes |
|
|
466
|
+
| --- | --- | --- | --- | --- |
|
|
467
|
+
| legacy aliases and mixed status vocabulary | pre-canonical docs | unificar para taxonomia canonica (Active/Partial/Declared-only/...) | next-doc-cycle | manter backward compatibility documentada |
|
|
468
|
+
|
|
469
|
+
## Source references
|
|
470
|
+
|
|
471
|
+
| Source type | Path/URL | Why it is source of truth | Last verified (YYYY-MM-DD) | Notes |
|
|
472
|
+
| --- | --- | --- | --- | --- |
|
|
473
|
+
| local-file | projects/praxis-dynamic-fields/src/lib/base/simple-base-select.component.ts | Evidencia de implementacao e contrato. | 2026-03-05 | referencia preservada da versao anterior |
|
|
474
|
+
| local-file | projects/praxis-core/src/lib/models/component-metadata.interface.ts | Evidencia de implementacao e contrato. | 2026-03-05 | referencia preservada da versao anterior |
|