@praxisui/dynamic-fields 8.0.0-beta.6 → 8.0.0-beta.61

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.
Files changed (97) hide show
  1. package/README.md +19 -0
  2. package/docs/dynamic-fields-field-catalog.md +217 -0
  3. package/docs/dynamic-fields-field-selection-guide.md +204 -0
  4. package/docs/dynamic-fields-host-custom-field-guide.md +252 -0
  5. package/docs/dynamic-fields-host-custom-field-troubleshooting.md +160 -0
  6. package/docs/dynamic-fields-inline-components-guide.md +582 -0
  7. package/docs/dynamic-fields-inline-filter-catalog.md +502 -0
  8. package/docs/dynamic-fields-inline-filter-custom-component-guide.md +241 -0
  9. package/docs/dynamic-fields-inline-filter-inventory.md +247 -0
  10. package/docs/dynamic-fields-inline-filter-runtime-contract.md +391 -0
  11. package/docs/dynamic-fields-inline-filter-selection-guide.md +419 -0
  12. package/docs/dynamic-fields-inline-filter-troubleshooting.md +201 -0
  13. package/docs/dynamic-fields-inventory.md +206 -0
  14. package/docs/dynamic-fields-playground-catalog-plan.md +243 -0
  15. package/docs/generic-crud-service.md +152 -0
  16. package/fesm2022/praxisui-dynamic-fields-index-CBogy3si.mjs +1 -0
  17. package/fesm2022/praxisui-dynamic-fields-index-CWPZdn1Y.mjs +6 -0
  18. package/fesm2022/praxisui-dynamic-fields-index-CrHhyUMO.mjs +1 -0
  19. package/fesm2022/praxisui-dynamic-fields-index-DhGo5In4.mjs +6 -0
  20. package/fesm2022/praxisui-dynamic-fields.mjs +19551 -10669
  21. package/package.json +14 -13
  22. package/src/lib/base/pdx-base-input-runtime-contract.json-api.md +526 -0
  23. package/src/lib/base/pdx-base-select-runtime-contract.json-api.md +474 -0
  24. package/src/lib/components/color-input/pdx-color-input.json-api.md +573 -0
  25. package/src/lib/components/color-picker/pdx-color-picker.json-api.md +686 -0
  26. package/src/lib/components/date-input/pdx-date-input.json-api.md +581 -0
  27. package/src/lib/components/datetime-local-input/pdx-datetime-local-input.json-api.md +560 -0
  28. package/src/lib/components/email-input/pdx-email-input.json-api.md +546 -0
  29. package/src/lib/components/field-shell/praxis-field-shell.json-api.md +523 -0
  30. package/src/lib/components/inline-async-select/pdx-inline-async-select.json-api.md +566 -0
  31. package/src/lib/components/inline-autocomplete/pdx-inline-autocomplete.json-api.md +554 -0
  32. package/src/lib/components/inline-color-label/pdx-inline-color-label.json-api.md +615 -0
  33. package/src/lib/components/inline-currency/pdx-inline-currency.json-api.md +542 -0
  34. package/src/lib/components/inline-currency-range/pdx-inline-currency-range.json-api.md +630 -0
  35. package/src/lib/components/inline-date/pdx-inline-date.json-api.md +529 -0
  36. package/src/lib/components/inline-date-range/pdx-inline-date-range.json-api.md +592 -0
  37. package/src/lib/components/inline-distance-radius/pdx-inline-distance-radius.json-api.md +649 -0
  38. package/src/lib/components/inline-entity-lookup/pdx-inline-entity-lookup.json-api.md +656 -0
  39. package/src/lib/components/inline-input/pdx-inline-input.json-api.md +538 -0
  40. package/src/lib/components/inline-multi-select/pdx-inline-multi-select.json-api.md +566 -0
  41. package/src/lib/components/inline-number/pdx-inline-number.json-api.md +533 -0
  42. package/src/lib/components/inline-pipeline-status/pdx-inline-pipeline-status.json-api.md +619 -0
  43. package/src/lib/components/inline-range-slider/pdx-inline-range-slider.json-api.md +605 -0
  44. package/src/lib/components/inline-rating/pdx-inline-rating.json-api.md +594 -0
  45. package/src/lib/components/inline-relative-period/pdx-inline-relative-period.json-api.md +623 -0
  46. package/src/lib/components/inline-score-priority/pdx-inline-score-priority.json-api.md +632 -0
  47. package/src/lib/components/inline-searchable-select/pdx-inline-searchable-select.json-api.md +564 -0
  48. package/src/lib/components/inline-select/pdx-inline-select.json-api.md +571 -0
  49. package/src/lib/components/inline-sentiment/pdx-inline-sentiment.json-api.md +661 -0
  50. package/src/lib/components/inline-time/pdx-inline-time.json-api.md +573 -0
  51. package/src/lib/components/inline-time-range/pdx-inline-time-range.json-api.md +635 -0
  52. package/src/lib/components/inline-toggle/pdx-inline-toggle.json-api.md +516 -0
  53. package/src/lib/components/inline-tree-select/pdx-inline-tree-select.json-api.md +637 -0
  54. package/src/lib/components/material-async-select/pdx-material-async-select.json-api.md +566 -0
  55. package/src/lib/components/material-autocomplete/pdx-material-autocomplete.json-api.md +561 -0
  56. package/src/lib/components/material-avatar/pdx-material-avatar.json-api.md +670 -0
  57. package/src/lib/components/material-button/pdx-material-button.json-api.md +572 -0
  58. package/src/lib/components/material-button-toggle/pdx-material-button-toggle.json-api.md +577 -0
  59. package/src/lib/components/material-checkbox-group/pdx-material-checkbox-group.json-api.md +611 -0
  60. package/src/lib/components/material-chips/pdx-material-chips.json-api.md +601 -0
  61. package/src/lib/components/material-colorpicker/pdx-material-colorpicker.json-api.md +545 -0
  62. package/src/lib/components/material-cpf-cnpj-input/pdx-material-cpf-cnpj-input.json-api.md +531 -0
  63. package/src/lib/components/material-currency/pdx-material-currency.json-api.md +569 -0
  64. package/src/lib/components/material-date-range/pdx-material-date-range.json-api.md +636 -0
  65. package/src/lib/components/material-datepicker/pdx-material-datepicker.json-api.md +551 -0
  66. package/src/lib/components/material-file-upload/pdx-material-file-upload.json-api.md +511 -0
  67. package/src/lib/components/material-multi-select/pdx-material-multi-select.json-api.md +596 -0
  68. package/src/lib/components/material-multi-select-tree/pdx-material-multi-select-tree.json-api.md +623 -0
  69. package/src/lib/components/material-price-range/pdx-material-price-range.json-api.md +619 -0
  70. package/src/lib/components/material-radio-group/pdx-material-radio-group.json-api.md +585 -0
  71. package/src/lib/components/material-range-slider/pdx-material-range-slider.json-api.md +664 -0
  72. package/src/lib/components/material-rating/pdx-material-rating.json-api.md +551 -0
  73. package/src/lib/components/material-searchable-select/pdx-material-searchable-select.json-api.md +602 -0
  74. package/src/lib/components/material-select/pdx-material-select.json-api.md +601 -0
  75. package/src/lib/components/material-selection-list/pdx-material-selection-list.json-api.md +607 -0
  76. package/src/lib/components/material-slide-toggle/pdx-material-slide-toggle.json-api.md +522 -0
  77. package/src/lib/components/material-slider/pdx-material-slider.json-api.md +602 -0
  78. package/src/lib/components/material-textarea/pdx-material-textarea.json-api.md +598 -0
  79. package/src/lib/components/material-timepicker/pdx-material-timepicker.json-api.md +554 -0
  80. package/src/lib/components/material-transfer-list/pdx-material-transfer-list.json-api.md +614 -0
  81. package/src/lib/components/material-tree-select/pdx-material-tree-select.json-api.md +649 -0
  82. package/src/lib/components/month-input/pdx-month-input.json-api.md +527 -0
  83. package/src/lib/components/number-input/pdx-number-input.json-api.md +594 -0
  84. package/src/lib/components/password-input/pdx-password-input.json-api.md +574 -0
  85. package/src/lib/components/pdx-material-time-range/pdx-material-time-range.json-api.md +592 -0
  86. package/src/lib/components/pdx-year-input/pdx-year-input.json-api.md +543 -0
  87. package/src/lib/components/phone-input/pdx-phone-input.json-api.md +583 -0
  88. package/src/lib/components/preload-status/pdx-preload-status.json-api.md +455 -0
  89. package/src/lib/components/search-input/pdx-search-input.json-api.md +536 -0
  90. package/src/lib/components/text-input/pdx-text-input.json-api.md +600 -0
  91. package/src/lib/components/time-input/pdx-time-input.json-api.md +546 -0
  92. package/src/lib/components/url-input/pdx-url-input.json-api.md +542 -0
  93. package/src/lib/components/week-input/pdx-week-input.json-api.md +533 -0
  94. package/{index.d.ts → types/praxisui-dynamic-fields.d.ts} +874 -440
  95. package/fesm2022/praxisui-dynamic-fields-index-C9IUU4lo.mjs +0 -1
  96. package/fesm2022/praxisui-dynamic-fields-index-GJtthzkD.mjs +0 -1
  97. package/fesm2022/praxisui-dynamic-fields-index-XvVS6lAQ.mjs +0 -1
@@ -0,0 +1,600 @@
1
+ ---
2
+ title: "pdx-text-input JSON API (Canonical)"
3
+ slug: "pdx-text-input-json-api"
4
+ doc_type: "api-reference"
5
+ component: "pdx-text-input"
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-text-input."
11
+ category: "components"
12
+ sub_category: "dynamic-fields"
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/components/text-input/text-input.metadata.ts"
22
+ - "projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts"
23
+ - "projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts"
24
+ - "projects/praxis-core/src/lib/models/material-field-metadata.interface.ts"
25
+ source_of_truth_last_verified: "2026-03-06"
26
+ last_updated: "2026-03-06"
27
+ toc: true
28
+ sidebar: true
29
+ tags:
30
+ - "json-api"
31
+ - "canonical-contract"
32
+ - "pdx-text-input"
33
+ api_stability: "canonical"
34
+ schema_verified: true
35
+ runtime_verified: true
36
+ editor_coverage_verified: false
37
+ runtime_scope: "public"
38
+ legacy_paths_present: false
39
+ has_known_mismatches: false
40
+ related_components:
41
+ - "praxis-table"
42
+ ---
43
+
44
+ # pdx-text-input
45
+
46
+ Este documento e a referencia canonica da API JSON de pdx-text-input.
47
+
48
+ ## Summary
49
+
50
+ - Tipo documental: API reference canonica de contrato JSON.
51
+ - Source of truth: runtime e codigo declarados no frontmatter.
52
+ - Objetivo operacional: consulta rapida, auditavel e deterministica sob pressao.
53
+ - Resumo funcional: Contrato JSON metadata-driven com comportamento definido por runtime e schema associado.
54
+
55
+ ## Purpose and scope
56
+
57
+ - O componente consome payload JSON metadata-driven e expoe comportamento runtime configuravel por contrato.
58
+ - Esta referencia cobre contrato publico, classificacao de paths e semantica de cobertura (runtime/schema/editor).
59
+ - Fora de escopo: quickstart, tutorial narrativo e notas arquiteturais que nao alteram contrato publico.
60
+
61
+ ## Consulta rapida (obrigatorio)
62
+
63
+ | Regra/tema | Observado | Canonico desejado | Status | Evidencia |
64
+ | --- | --- | --- | --- | --- |
65
+ | Component id | `pdx-text-input` | Manter ID canonico estavel e versionado por contrato | Active | frontmatter.component |
66
+ | Primary contract source | `runtime-and-code` | Runtime, schema e docs devem permanecer rastreaveis | Partial | frontmatter.contract_source + source_of_truth |
67
+ | Runtime coverage | `true` | Comportamentos runtime criticos devem ficar explicitamente verificados | Active | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts`, `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |
68
+ | Schema/type coverage | `true` | Tipos e schema devem refletir paths publicos do contrato | Active | source_of_truth + Detailed API reference |
69
+ | Editor/tooling coverage | `false` | Editor/tooling deve espelhar somente contrato publico suportado | Partial | `projects/praxis-dynamic-fields/src/lib/editorial/metadata-contract.spec.ts`, `projects/praxis-dynamic-fields/src/lib/editorial/metadata-i18n-contract.spec.ts` |
70
+ | Legacy paths | `false` | Segregar legado de caminhos canonicos com janela de migracao | Active | frontmatter.legacy_paths_present |
71
+ | Known mismatches | `false` | Registrar observed vs desired de forma auditavel | Active | frontmatter.has_known_mismatches |
72
+
73
+ ## Source of truth
74
+
75
+ | Source | Kind | Notes |
76
+ | --- | --- | --- |
77
+ | projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts | schema-metadata | Arquivo presente no repositorio e usado como evidencia de contrato. |
78
+ | projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
79
+ | projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
80
+ | projects/praxis-core/src/lib/models/material-field-metadata.interface.ts | schema-types | Arquivo presente no repositorio e usado como evidencia de contrato. |
81
+
82
+ ## Support legend
83
+
84
+ - **Active**: suportado em runtime e liberado para uso externo.
85
+ - **Partial**: suporte parcial, com restricoes, lacunas ou validacao incompleta.
86
+ - **Declared-only**: declarado em tipos/schema sem evidencia operacional completa.
87
+ - **Schema-only**: presente em schema/tipos sem cobertura runtime confirmada.
88
+ - **Deprecated**: legado suportado por janela de migracao definida.
89
+
90
+ ## Contract status snapshot
91
+
92
+ | Item | Value | Notes |
93
+ | --- | --- | --- |
94
+ | Reference mode | `canonical` | Deve permanecer canonico |
95
+ | Contract format | `json` | Contrato metadata-driven |
96
+ | Contract source | `runtime-and-code` | Alinhar com source_of_truth |
97
+ | Runtime scope | `public` | Escopo publicado para consumidores |
98
+ | Runtime verified | `true` | Revisar sempre com evidencia de runtime |
99
+ | Schema verified | `true` | Revisar sempre com evidencia de tipos/schema |
100
+ | Editor coverage verified | `false` | Revisar sempre com evidencia de editor/tooling |
101
+ | Legacy paths present | `false` | Segregar legado de contrato canonico |
102
+ | Has known mismatches | `false` | Divergencias devem aparecer em secao dedicada |
103
+
104
+ ## Contract classification (obrigatorio)
105
+
106
+ ### Canonical paths (public contract)
107
+
108
+ | Path | Type | Required | Default | Status | Notes |
109
+ | --- | --- | --- | --- | --- | --- |
110
+ | `metadata` | object | true | n/a | Partial | See Detailed API reference for runtime semantics. |
111
+ | `readonlyMode` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
112
+ | `disabledMode` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
113
+ | `visible` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
114
+ | `presentationMode` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
115
+ | `metadata.name` | string | false | n/a | Partial | See Detailed API reference for runtime semantics. |
116
+ | `metadata.label` | string | false | n/a | Partial | See Detailed API reference for runtime semantics. |
117
+ | `metadata.controlType` | string | false | n/a | Partial | See Detailed API reference for runtime semantics. |
118
+
119
+ ### Supported legacy paths
120
+
121
+ Nenhum path legado suportado foi identificado nesta revisao.
122
+
123
+ ### Internal-only paths
124
+
125
+ Nao ha paths internal-only confirmados no contrato publico desta revisao.
126
+
127
+ ### Experimental paths
128
+
129
+ Nao ha paths experimentais confirmados no contrato publico desta revisao.
130
+
131
+ ## Public contract surface (obrigatorio)
132
+
133
+ ### Top-level configuration blocks
134
+
135
+ | Block | Purpose | Required | Merge strategy | Notes |
136
+ | --- | --- | --- | --- | --- |
137
+ | `metadata` | Payload declarativo principal do componente | true | deep-merge | runtime linkage verified for core flows (component specs, 2026-03-06). |
138
+ | `readonlyMode` | Override de readonly no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
139
+ | `disabledMode` | Override de disabled no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
140
+ | `visible` | Override de visibilidade no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
141
+ | `presentationMode` | Renderizacao de apresentacao sem interacao | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
142
+
143
+ ### Nested configuration blocks
144
+
145
+ | Path | Type | Required | Default | Constraints | Notes |
146
+ | --- | --- | --- | --- | --- | --- |
147
+ | `metadata.name` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
148
+ | `metadata.label` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
149
+ | `metadata.controlType` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
150
+ | `metadata.inputType` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
151
+ | `metadata.id` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
152
+ | `metadata.placeholder` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
153
+ | `metadata.autocomplete` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
154
+ | `metadata.spellcheck` | boolean | false | n/a | component-defined | Partial; verify per source_of_truth. |
155
+ | `metadata.minLength` | number | false | n/a | component-defined | Partial; verify per source_of_truth. |
156
+ | `metadata.maxLength` | number | false | n/a | component-defined | Partial; verify per source_of_truth. |
157
+
158
+ ### Input bindings (inbound data)
159
+
160
+ | Binding/Path | Type | Required | Source | Runtime normalization | Notes |
161
+ | --- | --- | --- | --- | --- | --- |
162
+ | `metadata` | object | true | host-json | component-defined | Primary inbound contract payload. |
163
+ | `readonlyMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
164
+ | `disabledMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
165
+ | `visible` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
166
+ | `presentationMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
167
+
168
+ ### Output events
169
+
170
+ | Event | Payload | Trigger | Stability | Notes |
171
+ | --- | --- | --- | --- | --- |
172
+ | `validationChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
173
+ | `valueChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
174
+ | `focusChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
175
+ | `nativeBlur` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
176
+ | `nativeChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
177
+
178
+ ### External side channels
179
+
180
+ | Channel | Direction | Contract | Failure mode | Notes |
181
+ | --- | --- | --- | --- | --- |
182
+ | `host/services/storage` | bidirectional | component-defined | component-defined | Side channels variam por componente e host; verificar em source_of_truth. |
183
+
184
+ ### Host/runtime dependencies
185
+
186
+ | Dependency | Required | Environment | Purpose | Notes |
187
+ | --- | --- | --- | --- | --- |
188
+ | `text-input.metadata.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts`. |
189
+ | `text-input.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`. |
190
+ | `simple-base-input.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts`. |
191
+ | `material-field-metadata.interface.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts`. |
192
+
193
+ ## Coverage by surface (obrigatorio)
194
+
195
+ ### Coverage matrix (runtime, schema/type, editor/tooling)
196
+
197
+ | Surface | Verified | Coverage status | Evidence | Notes |
198
+ | --- | --- | --- | --- | --- |
199
+ | Runtime | `true` | Active | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts`, `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` | Core runtime flows verified via focused component specs on 2026-03-06; editor/tooling coverage remains independent. |
200
+ | Schema/Types | `true` | Active | source_of_truth + Detailed API reference | Reconcile schema/types with canonical paths during follow-up when needed. |
201
+ | Editor/Tooling | `false` | Partial | `projects/praxis-dynamic-fields/src/lib/editorial/metadata-contract.spec.ts`, `projects/praxis-dynamic-fields/src/lib/editorial/metadata-i18n-contract.spec.ts` | Wave 1 registry, derived metadata exports and localized editorial resolution are guarded by aggregate editorial specs; end-to-end editor integration not yet verified. |
202
+
203
+ ### Runtime coverage boundaries
204
+
205
+ - Ambientes suportados: browser/dev/prod; SSR/hydration appears to be component-dependent unless explicitly verified.
206
+ - Pre-condicoes: payload JSON valido, bindings de host consistentes e dependencias descritas no source_of_truth.
207
+ - Fora de cobertura confirmada: caminhos internos, experimentais ou aliases nao enumerados formalmente.
208
+
209
+ ### Editor and tooling notes
210
+
211
+ - Evidencia parcial: `metadata-contract.spec.ts` e `metadata-i18n-contract.spec.ts` validam a trilha agregada de descriptor editorial, metadata derivado e resolucao localizada no registry.
212
+ - O que esta exposto no editor visual depende da cobertura real do workspace e nao deve ser inferido como suporte runtime total.
213
+ - Campos disponiveis apenas via JSON/manual devem continuar no contrato, com rotulo explicito de cobertura parcial.
214
+ - Quando houver divergencia entre editor e runtime, manter mismatch rastreavel em secao dedicada.
215
+
216
+ ## Resolution and precedence model (obrigatorio)
217
+
218
+ ### Merge order
219
+
220
+ 1. defaults do componente
221
+ 2. contrato JSON recebido
222
+ 3. overrides de host/runtime
223
+ 4. normalizacoes internas
224
+
225
+ ### Fallback order
226
+
227
+ contrato explicito -> aliases legados (quando suportados) -> defaults internos -> comportamento seguro
228
+
229
+ ### Override points
230
+
231
+ - inputs publicos do componente
232
+ - configuracao JSON de runtime
233
+ - integracoes de host (servicos/tokens/adapters)
234
+
235
+ ### Runtime normalization
236
+
237
+ Alias e defaults devem convergir para paths canonicos; onde nao houver evidencia, manter not-yet-verified de forma explicita.
238
+
239
+ ### Precedence rules
240
+
241
+ Em conflito entre alias legado e path canonico, priorizar path canonico e registrar janela de migracao do legado.
242
+
243
+ ## Validation and error semantics (obrigatorio)
244
+
245
+ ### Validation model
246
+
247
+ | Path/Rule | Validation phase | Behavior on fail | Error code / warning | Notes |
248
+ | --- | --- | --- | --- | --- |
249
+ | canonical-paths | parse/runtime | component-defined (warn/reject/default) | not-yet-standardized | Semantica detalhada preservada na referencia tecnica por componente. |
250
+
251
+ ### Invalid and unknown field handling
252
+
253
+ - Campos desconhecidos: comportamento component-defined (ignore, warn ou reject).
254
+ - Tipos invalidos: pode haver fallback, warning ou falha, conforme runtime especifico.
255
+ - Valores fora de dominio: registrar observed vs desired em Known limitations and mismatches.
256
+
257
+ ### Fail-open / fail-closed behavior
258
+
259
+ | Condition | Mode | Runtime behavior | Consumer impact |
260
+ | --- | --- | --- | --- |
261
+ | invalid-or-unknown-field | component-defined | not-yet-verified | Pode gerar warning, fallback silencioso ou rejeicao; validar por componente. |
262
+
263
+ ### Runtime warnings vs hard failures
264
+
265
+ | Condition | Severity | Observability | Consumer action |
266
+ | --- | --- | --- | --- |
267
+ | partial-or-declared-only-coverage | warning | logs/eventos do componente | Confirmar ligacao runtime antes de uso critico. |
268
+ | mismatch-confirmed | error-or-warning | componente/host observability | Planejar migracao e corrigir contrato/runtime. |
269
+
270
+ ## Detailed API reference
271
+ ### Preserved technical reference (normalized from previous revision)
272
+
273
+ <!--
274
+ component: pdx-text-input
275
+ document: json-api
276
+ source-of-truth:
277
+ - projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts
278
+ - projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts
279
+ - projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts
280
+ - projects/praxis-core/src/lib/models/material-field-metadata.interface.ts
281
+ - projects/praxis-core/src/lib/models/component-metadata.interface.ts
282
+ quality-reference: projects/praxis-table/src/lib/praxis-table.json-api.md
283
+ updated_at: 2026-02-26
284
+ -->
285
+
286
+
287
+ ### 1. Visao Geral e Quando Usar
288
+ `pdx-text-input` e o campo de texto simples orientado a JSON de `@praxisui/dynamic-fields`.
289
+ Ele renderiza `<input matInput>` com comportamento de validacao da base (`SimpleBaseInputComponent`) e estado corporativo de host (`readonlyMode`, `disabledMode`, `visible`, `presentationMode`).
290
+
291
+ Use quando o formulario e dirigido por metadados e voce precisa de:
292
+ - captura textual (ou tipos HTML compativeis, como `email`, `url`, `search`, `password`, `number`, `date` etc.);
293
+ - validacoes declarativas (`required`, `minLength`, `maxLength`, `pattern`, validators custom);
294
+ - UX padronizada com `mat-form-field` (hint, erro, prefix/suffix icon, clear button);
295
+ - emissao de validacao por `validationChange`.
296
+
297
+ Fontes: `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`, `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts`, `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts`.
298
+
299
+ ### 2. Referencia do Contrato JSON
300
+ | Propriedade | Tipo | Padrao | Obrigatorio | Comportamento | Fonte |
301
+ | --- | --- | --- | --- | --- | --- |
302
+ | `metadata` | `MaterialInputMetadata` | - | Sim | Payload principal de configuracao do campo. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts` |
303
+ | `metadata.name` | `string` | - | Sim | Chave do campo no modelo/formulario. | `projects/praxis-core/src/lib/models/component-metadata.interface.ts` |
304
+ | `metadata.label` | `string` | - | Sim | Rotulo exibido no `mat-label`. | `projects/praxis-core/src/lib/models/component-metadata.interface.ts` |
305
+ | `metadata.controlType` | `"input"` | - | Sim | Tipo canonico para resolver este componente. | `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts`, `projects/praxis-core/src/lib/metadata/field-control-type.constants.ts` |
306
+ | `metadata.inputType` | `"text" \| "email" \| ...` | `"text"` | Nao | Tipo HTML do input (via `inputType()`). | `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts` |
307
+ | `metadata.id` | `string` | vazio | Nao | Define `id` do elemento nativo quando informado. | `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts` |
308
+ | `metadata.placeholder` | `string` | vazio | Nao | Placeholder exibido quando diferente do label. | `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts` |
309
+ | `metadata.autocomplete` | `string` | `"off"` | Nao | Configura autocomplete do input. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |
310
+ | `metadata.spellcheck` | `boolean` | `true` | Nao | Liga/desliga spellcheck nativo. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |
311
+ | `metadata.minLength` | `number` | none | Nao | Vincula atributo nativo e validacao da base. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`, `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts` |
312
+ | `metadata.maxLength` | `number` | none | Nao | Vincula atributo nativo e suporta contador quando `showCharacterCount=true`. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`, `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts` |
313
+ | `metadata.showCharacterCount` | `boolean` | `false` | Nao | Exibe contador no `mat-hint` de fim. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`, `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts` |
314
+ | `metadata.clearButton` | `object` | none | Nao | Exibe botao de limpar seguindo regras (`enabled`, `showOnlyWhenFilled`). | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`, `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts` |
315
+ | `readonlyMode` | `boolean` | `false` | Nao | Override de somente leitura combinado por `computeEffectiveState`. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`, `projects/praxis-dynamic-fields/src/lib/utils/field-state.util.ts` |
316
+ | `disabledMode` | `boolean` | `false` | Nao | Override de desabilitado no host e botao clear. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |
317
+ | `visible` | `boolean` | `true` | Nao | Controla `display` no host. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |
318
+ | `presentationMode` | `boolean` | `false` | Nao | Modo apresentacao que bloqueia edicao e clear. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |
319
+ | `validationChange` | `ValidationErrors \| null` | - | Output | Emite resultado de validacao quando `validateField()` executa. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |
320
+
321
+ ### 3. Mapeamento de Comportamento
322
+ - Paginacao: nao se aplica.
323
+ - Ordenacao: nao se aplica.
324
+ - Selecao: valor unico textual via `FormControl`/CVA.
325
+ - Eventos: `validationChange` e especifico do componente; mudanca de valor segue fluxo de `ControlValueAccessor` e `valueChange` herdado da base.
326
+ - Renderizacao: `mat-form-field` + `matInput`, com `hint`, `mat-error`, icones prefix/suffix, tooltip de erro e clear button opcional.
327
+
328
+ Resumo de cobertura (lente corporativa):
329
+ - `Ativo`: `metadata.name`, `metadata.label`, `metadata.controlType`, `metadata.inputType`, `placeholder`, `autocomplete`, `spellcheck`, `minLength`, `maxLength`, `clearButton`, estados de host e `validationChange`.
330
+ - `Parcial`: `metadata.textTransform` depende de combinacao entre transformacao CSS e fluxo funcional da base; requer testes quando usar mascaras visuais mais complexas.
331
+ - `Fora de contrato ativo`: comportamento de mascara textual dedicada (`mask`) nao e implementado neste componente.
332
+
333
+ ### 4. Exemplo Minimo (JSON + Uso)
334
+ ```json
335
+ {
336
+ "componentId": "pdx-text-input",
337
+ "metadata": {
338
+ "name": "fullName",
339
+ "label": "Nome completo",
340
+ "controlType": "input",
341
+ "inputType": "text"
342
+ }
343
+ }
344
+ ```
345
+ Uso: o host resolve `componentId`, injeta `metadata` e o componente renderiza input textual simples integrado ao formulario reativo.
346
+
347
+ ### 5. Exemplo Corporativo (JSON + Uso)
348
+ ```json
349
+ {
350
+ "componentId": "pdx-text-input",
351
+ "metadata": {
352
+ "id": "employee-code",
353
+ "name": "employeeCode",
354
+ "label": "Codigo do colaborador",
355
+ "controlType": "input",
356
+ "inputType": "text",
357
+ "placeholder": "AB-12345",
358
+ "required": true,
359
+ "minLength": 8,
360
+ "maxLength": 8,
361
+ "pattern": "^[A-Z]{2}-\\d{5}$",
362
+ "autocomplete": "off",
363
+ "spellcheck": false,
364
+ "showCharacterCount": true,
365
+ "clearButton": {
366
+ "enabled": true,
367
+ "showOnlyWhenFilled": true,
368
+ "ariaLabel": "Limpar codigo"
369
+ },
370
+ "hint": "Formato: duas letras, hifen e cinco digitos"
371
+ },
372
+ "readonlyMode": false,
373
+ "disabledMode": false,
374
+ "visible": true,
375
+ "presentationMode": false
376
+ }
377
+ ```
378
+ Uso: em formulario corporativo, aplica validacao de formato, contador de caracteres e clear button contextual.
379
+
380
+ ### 6. Problemas Comuns e Armadilhas
381
+ 1. Usar `metadata.id` como se fosse a chave principal de binding.
382
+ Correcao: a chave de negocio/formulario e `metadata.name`; `id` e apenas identificador do elemento.
383
+
384
+ 2. Enviar `controlType` diferente de `input`.
385
+ Correcao: para `pdx-text-input`, use `controlType: "input"`.
386
+
387
+ 3. Esperar suporte nativo de mascara (`mask`) neste componente.
388
+ Correcao: use pattern/validators ou componente especifico para mascaramento quando necessario.
389
+
390
+ 4. Campo invisivel (`visible=false`) continuar bloqueando submit por `required`.
391
+ Correcao: alinhe regra de visibilidade com regra de obrigatoriedade no schema.
392
+
393
+ 5. Confundir `readonlyMode` com `disabledMode`.
394
+ Correcao: `readonlyMode` preserva leitura/foco; `disabledMode` bloqueia interacao.
395
+
396
+ 6. Configurar clear button sem `enabled=true`.
397
+ Correcao: defina `clearButton.enabled=true` e, se necessario, `showOnlyWhenFilled=true`.
398
+
399
+ ### 7. Referencias Cruzadas
400
+ - `pdx-number-input`: `projects/praxis-dynamic-fields/src/lib/components/number-input/number-input.metadata.ts`
401
+ - `pdx-email-input`: `projects/praxis-dynamic-fields/src/lib/components/email-input/email-input.metadata.ts`
402
+ - `pdx-password-input`: `projects/praxis-dynamic-fields/src/lib/components/password-input/password-input.metadata.ts`
403
+ - Base comum: `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts`
404
+
405
+ ### 8. Premissas
406
+ - O envelope JSON usa convencao de host com `componentId` + `metadata`.
407
+ - O host executa fluxo padrao de validacao para acionar `validationChange` de forma consistente.
408
+
409
+ ### 9. Relatorio de Validacao Estrutural
410
+ - Visao geral: PASS
411
+ - Referencia do contrato JSON (com fontes): PASS
412
+ - Mapeamento de comportamento: PASS
413
+ - Exemplo minimo: PASS
414
+ - Exemplo corporativo: PASS
415
+ - Problemas comuns (>=5 itens): PASS
416
+ - Referencias cruzadas: PASS
417
+ - Premissas explicitas: PASS
418
+
419
+ ## JSON path index (obrigatorio)
420
+
421
+ | Path | Type | Required | Default | Status | Notes |
422
+ | --- | --- | --- | --- | --- | --- |
423
+ | `readonlyMode` | boolean | false | n/a | Partial | See Detailed API reference. |
424
+ | `disabledMode` | boolean | false | n/a | Partial | See Detailed API reference. |
425
+ | `visible` | boolean | false | n/a | Partial | See Detailed API reference. |
426
+ | `presentationMode` | boolean | false | n/a | Partial | See Detailed API reference. |
427
+ | `metadata` | object | false | n/a | Partial | See Detailed API reference. |
428
+ | `metadata.name` | string | false | n/a | Partial | See Detailed API reference. |
429
+ | `metadata.label` | string | false | n/a | Partial | See Detailed API reference. |
430
+ | `metadata.controlType` | string | false | n/a | Partial | See Detailed API reference. |
431
+ | `metadata.inputType` | string | false | n/a | Partial | See Detailed API reference. |
432
+ | `metadata.id` | string | false | n/a | Partial | See Detailed API reference. |
433
+ | `metadata.placeholder` | string | false | n/a | Partial | See Detailed API reference. |
434
+ | `metadata.autocomplete` | string | false | n/a | Partial | See Detailed API reference. |
435
+ | `metadata.spellcheck` | boolean | false | n/a | Partial | See Detailed API reference. |
436
+ | `metadata.minLength` | number | false | n/a | Partial | See Detailed API reference. |
437
+ | `metadata.maxLength` | number | false | n/a | Partial | See Detailed API reference. |
438
+ | `metadata.showCharacterCount` | boolean | false | n/a | Partial | See Detailed API reference. |
439
+ | `metadata.clearButton` | object | false | n/a | Partial | See Detailed API reference. |
440
+ | `metadata.textTransform` | unknown | false | n/a | Partial | See Detailed API reference. |
441
+
442
+ ## Events reference (obrigatorio)
443
+
444
+ | Event | Payload | Trigger | Stability | Notes |
445
+ | --- | --- | --- | --- | --- |
446
+ | `validationChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
447
+ | `valueChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
448
+ | `focusChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
449
+ | `nativeBlur` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
450
+ | `nativeChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
451
+
452
+ ## Styling API (obrigatorio quando aplicavel)
453
+
454
+ | Token/Class | Scope | Purpose | Notes |
455
+ | --- | --- | --- | --- |
456
+ | `not-yet-verified` | component | Styling contract not yet verified | Use Detailed API reference for component-specific styling notes. |
457
+
458
+ ## Examples (obrigatorio)
459
+
460
+ | Example | Scenario | Validates | Notes |
461
+ | --- | --- | --- | --- |
462
+ | `Minimal valid` | baseline payload | required contract blocks | Extracted from preserved technical reference when available. |
463
+ | `Common setup` | common component usage | standard runtime behavior | Validate against host integration path. |
464
+ | `Advanced setup` | richer config with overrides | precedence and normalization | Requires runtime confirmation for edge cases. |
465
+ | `Enterprise scenario` | governance/legacy/migration context | auditability and compatibility boundaries | Include tenant-specific constraints when applicable. |
466
+
467
+ ### Minimal valid
468
+
469
+ ```json
470
+ {
471
+ "componentId": "pdx-text-input",
472
+ "metadata": {
473
+ "name": "fullName",
474
+ "label": "Nome completo",
475
+ "controlType": "input",
476
+ "inputType": "text"
477
+ },
478
+ "readonlyMode": false
479
+ }
480
+ ```
481
+
482
+ ### Common setup
483
+
484
+ ```json
485
+ {
486
+ "componentId": "pdx-text-input",
487
+ "metadata": {
488
+ "id": "employee-code",
489
+ "name": "employeeCode",
490
+ "label": "pdx-text-input-common",
491
+ "controlType": "input",
492
+ "inputType": "text",
493
+ "placeholder": "AB-12345",
494
+ "required": true,
495
+ "minLength": 8,
496
+ "maxLength": 8,
497
+ "pattern": "^[A-Z]{2}-\\d{5}$",
498
+ "autocomplete": "off",
499
+ "spellcheck": false,
500
+ "showCharacterCount": true,
501
+ "clearButton": {
502
+ "enabled": true,
503
+ "showOnlyWhenFilled": true,
504
+ "ariaLabel": "Limpar codigo"
505
+ },
506
+ "hint": "Formato: duas letras, hifen e cinco digitos"
507
+ },
508
+ "readonlyMode": false,
509
+ "disabledMode": false,
510
+ "visible": true,
511
+ "presentationMode": false
512
+ }
513
+ ```
514
+
515
+ ### Advanced setup
516
+
517
+ ```json
518
+ {
519
+ "componentId": "pdx-text-input",
520
+ "metadata": {
521
+ "id": "employee-code",
522
+ "name": "employeeCode",
523
+ "label": "Codigo do colaborador",
524
+ "controlType": "input",
525
+ "inputType": "text",
526
+ "placeholder": "AB-12345",
527
+ "required": true,
528
+ "minLength": 5,
529
+ "maxLength": 8,
530
+ "pattern": "^[A-Z]{2}-\\d{5}$",
531
+ "autocomplete": "off",
532
+ "spellcheck": false,
533
+ "showCharacterCount": true,
534
+ "clearButton": {
535
+ "enabled": true,
536
+ "showOnlyWhenFilled": true,
537
+ "ariaLabel": "Limpar codigo"
538
+ },
539
+ "hint": "Formato: duas letras, hifen e cinco digitos"
540
+ },
541
+ "readonlyMode": false,
542
+ "disabledMode": false,
543
+ "visible": true,
544
+ "presentationMode": false
545
+ }
546
+ ```
547
+
548
+ ### Enterprise scenario
549
+
550
+ ```json
551
+ {
552
+ "componentId": "pdx-text-input",
553
+ "metadata": {
554
+ "id": "employee-code",
555
+ "name": "employeeCode",
556
+ "label": "Codigo do colaborador",
557
+ "controlType": "input",
558
+ "inputType": "text",
559
+ "placeholder": "AB-12345",
560
+ "required": true,
561
+ "minLength": 8,
562
+ "maxLength": 8,
563
+ "pattern": "^[A-Z]{2}-\\d{5}$",
564
+ "autocomplete": "off",
565
+ "spellcheck": false,
566
+ "showCharacterCount": true,
567
+ "clearButton": {
568
+ "enabled": true,
569
+ "showOnlyWhenFilled": true,
570
+ "ariaLabel": "Limpar codigo"
571
+ },
572
+ "hint": "Formato: duas letras, hifen e cinco digitos"
573
+ },
574
+ "readonlyMode": false,
575
+ "disabledMode": false,
576
+ "visible": true,
577
+ "presentationMode": true
578
+ }
579
+ ```
580
+
581
+ ## Compatibility and migration notes (recomendado)
582
+
583
+ | Concern | Affected versions | Migration action | Deadline | Notes |
584
+ | --- | --- | --- | --- | --- |
585
+ | No legacy path detected in current revision | n/a | No migration action required for canonical paths | n/a | Re-evaluate if backward-compat aliases are introduced |
586
+
587
+ ## Known limitations and mismatches (recomendado)
588
+
589
+ | Path/Behavior | Observed behavior (runtime) | Desired behavior | Impact | Tracking issue | Target fix |
590
+ | --- | --- | --- | --- | --- | --- |
591
+ | Canonical contract parity | No confirmed mismatch in this revision; runtime linkage verified for core flows (2026-03-06), with editor/tooling coverage pending | Keep runtime/schema/editor alignment evidence updated | Low | n/a | Monitor in periodic audit |
592
+
593
+ ## Source references (obrigatorio)
594
+
595
+ | Source type | Path/URL | Why it is source of truth | Last verified (YYYY-MM-DD) | Notes |
596
+ | --- | --- | --- | --- | --- |
597
+ | schema-metadata | projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
598
+ | runtime-code | projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
599
+ | runtime-code | projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
600
+ | schema-types | projects/praxis-core/src/lib/models/material-field-metadata.interface.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |