@praxisui/dynamic-fields 8.0.0-beta.8 → 8.0.0-beta.80

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,523 @@
1
+ ---
2
+ title: "praxis-field-shell JSON API (Canonical)"
3
+ slug: "praxis-field-shell-json-api"
4
+ doc_type: "api-reference"
5
+ component: "praxis-field-shell"
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 praxis-field-shell."
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/field-shell/field-shell.component.ts"
22
+ - "projects/praxis-dynamic-fields/src/lib/utils/field-state.util.ts"
23
+ - "projects/praxis-dynamic-fields/src/lib/utils/format-display.util.ts"
24
+ - "projects/praxis-core/src/lib/models/component-metadata.interface.ts"
25
+ source_of_truth_last_verified: "2026-05-18"
26
+ last_updated: "2026-05-18"
27
+ toc: true
28
+ sidebar: true
29
+ tags:
30
+ - "json-api"
31
+ - "canonical-contract"
32
+ - "praxis-field-shell"
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: true
39
+ has_known_mismatches: false
40
+ related_components:
41
+ - "praxis-table"
42
+ ---
43
+
44
+ # praxis-field-shell
45
+
46
+ Este documento e a referencia canonica da API JSON de praxis-field-shell.
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 | `praxis-field-shell` | 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/field-shell/field-shell.component.ts`, `projects/praxis-dynamic-fields/src/lib/utils/field-state.util.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 | Not-covered | `projects/praxis-core/src/lib/metadata/field-selector-control-type.constants.ts`, `projects/praxis-core/src/lib/utils/inline-filter-controls.util.ts` |
70
+ | Legacy paths | `true` | Segregar legado de caminhos canonicos com janela de migracao | Partial | 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/field-shell/field-shell.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
78
+ | projects/praxis-dynamic-fields/src/lib/utils/field-state.util.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
79
+ | projects/praxis-dynamic-fields/src/lib/utils/format-display.util.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
80
+ | projects/praxis-core/src/lib/models/component-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 | `true` | 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
+ | `visible` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
112
+ | `canvasMode` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
113
+ | `field` | object | false | n/a | Partial | See Detailed API reference for runtime semantics. |
114
+ | `field.hidden` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
115
+ | `field.formHidden` | unknown | false | n/a | Partial | See Detailed API reference for runtime semantics. |
116
+ | `field.readonly` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
117
+ | `field.readOnly` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
118
+
119
+ ### Supported legacy paths
120
+
121
+ | Legacy path | Canonical replacement | Support window | Runtime behavior | Notes |
122
+ | --- | --- | --- | --- | --- |
123
+ | `metadata.readOnly` | `metadata.readonly` | not-yet-defined | accepted for backward compatibility | Alias inferido da evidencia preservada; validar em runtime. |
124
+ | `metadata.formHidden` | `metadata.boolean` | not-yet-defined | accepted for backward compatibility | Alias inferido da evidencia preservada; validar em runtime. |
125
+
126
+ ### Internal-only paths
127
+
128
+ Nao ha paths internal-only confirmados no contrato publico desta revisao.
129
+
130
+ ### Experimental paths
131
+
132
+ Nao ha paths experimentais confirmados no contrato publico desta revisao.
133
+
134
+ ## Public contract surface (obrigatorio)
135
+
136
+ ### Top-level configuration blocks
137
+
138
+ | Block | Purpose | Required | Merge strategy | Notes |
139
+ | --- | --- | --- | --- | --- |
140
+ | `metadata` | Payload declarativo principal do componente | true | deep-merge | runtime linkage verified for core flows (component specs, 2026-03-06). |
141
+ | `visible` | Override de visibilidade no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
142
+ | `canvasMode` | Configuracao especifica de runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
143
+ | `field` | Configuracao especifica de runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
144
+ | `presentationMode` | Renderizacao de apresentacao sem interacao | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
145
+ | `readonlyMode` | Override de readonly no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
146
+ | `disabledMode` | Override de disabled no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
147
+
148
+ ### Nested configuration blocks
149
+
150
+ | Path | Type | Required | Default | Constraints | Notes |
151
+ | --- | --- | --- | --- | --- | --- |
152
+ | `field.hidden` | boolean | false | n/a | component-defined | Partial; verify per source_of_truth. |
153
+ | `field.formHidden` | unknown | false | n/a | component-defined | Partial; verify per source_of_truth. |
154
+ | `field.readonly` | boolean | false | n/a | component-defined | Partial; verify per source_of_truth. |
155
+ | `field.readOnly` | boolean | false | n/a | component-defined | Partial; verify per source_of_truth. |
156
+ | `field.disabled` | boolean | false | n/a | component-defined | Partial; verify per source_of_truth. |
157
+ | `field.controlType` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
158
+ | `field.controlType='avatar'` | unknown | false | n/a | component-defined | Partial; verify per source_of_truth. |
159
+ | `field.transformDisplayValue` | unknown | false | n/a | component-defined | Partial; verify per source_of_truth. |
160
+
161
+ ### Input bindings (inbound data)
162
+
163
+ | Binding/Path | Type | Required | Source | Runtime normalization | Notes |
164
+ | --- | --- | --- | --- | --- | --- |
165
+ | `metadata` | object | true | host-json | component-defined | Primary inbound contract payload. |
166
+ | `visible` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
167
+ | `presentationMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
168
+ | `readonlyMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
169
+ | `disabledMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
170
+
171
+ ### Output events
172
+
173
+ | Event | Payload | Trigger | Stability | Notes |
174
+ | --- | --- | --- | --- | --- |
175
+ | `canvasMouseEnter` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
176
+ | `canvasMouseLeave` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
177
+ | `canvasClick` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
178
+ | `canvasFocus` | unknown | focusin runtime-event | Experimental | Emitted when a projected field receives focus in canvas mode so `praxis-dynamic-form` can select the field and show the canonical canvas toolbar. |
179
+
180
+ ### External side channels
181
+
182
+ | Channel | Direction | Contract | Failure mode | Notes |
183
+ | --- | --- | --- | --- | --- |
184
+ | `host/services/storage` | bidirectional | component-defined | component-defined | Side channels variam por componente e host; verificar em source_of_truth. |
185
+
186
+ ### Host/runtime dependencies
187
+
188
+ | Dependency | Required | Environment | Purpose | Notes |
189
+ | --- | --- | --- | --- | --- |
190
+ | `field-shell.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/field-shell/field-shell.component.ts`. |
191
+ | `field-state.util.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/utils/field-state.util.ts`. |
192
+ | `format-display.util.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/utils/format-display.util.ts`. |
193
+ | `component-metadata.interface.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-core/src/lib/models/component-metadata.interface.ts`. |
194
+
195
+ ## Coverage by surface (obrigatorio)
196
+
197
+ ### Coverage matrix (runtime, schema/type, editor/tooling)
198
+
199
+ | Surface | Verified | Coverage status | Evidence | Notes |
200
+ | --- | --- | --- | --- | --- |
201
+ | Runtime | `true` | Active | `projects/praxis-dynamic-fields/src/lib/components/field-shell/field-shell.component.ts`, `projects/praxis-dynamic-fields/src/lib/utils/field-state.util.ts` | Core runtime flows verified via focused component specs on 2026-05-18, including canvas focus selection; editor/tooling coverage remains independent. |
202
+ | Schema/Types | `true` | Active | source_of_truth + Detailed API reference | Reconcile schema/types with canonical paths during follow-up when needed. |
203
+ | Editor/Tooling | `false` | Not-covered | `projects/praxis-core/src/lib/metadata/field-selector-control-type.constants.ts`, `projects/praxis-core/src/lib/utils/inline-filter-controls.util.ts` | `praxis-field-shell` nao aparece no selector map default nem no alias map inline; cobertura de editor/tooling permanece nao confirmada. |
204
+
205
+ ### Runtime coverage boundaries
206
+
207
+ - Ambientes suportados: browser/dev/prod; SSR/hydration appears to be component-dependent unless explicitly verified.
208
+ - Pre-condicoes: payload JSON valido, bindings de host consistentes e dependencias descritas no source_of_truth.
209
+ - Fora de cobertura confirmada: caminhos internos, experimentais ou aliases nao enumerados formalmente.
210
+
211
+ ### Editor and tooling notes
212
+
213
+ - Estado atual: `praxis-field-shell` nao esta mapeado no selector tooling padrao (`DEFAULT_FIELD_SELECTOR_CONTROL_TYPE_MAP`) nem no alias tooling inline; manter `Not-covered` ate existir integracao verificavel.
214
+ - O que esta exposto no editor visual depende da cobertura real do workspace e nao deve ser inferido como suporte runtime total.
215
+ - Campos disponiveis apenas via JSON/manual devem continuar no contrato, com rotulo explicito de cobertura parcial.
216
+ - Quando houver divergencia entre editor e runtime, manter mismatch rastreavel em secao dedicada.
217
+
218
+ ## Resolution and precedence model (obrigatorio)
219
+
220
+ ### Merge order
221
+
222
+ 1. defaults do componente
223
+ 2. contrato JSON recebido
224
+ 3. overrides de host/runtime
225
+ 4. normalizacoes internas
226
+
227
+ ### Fallback order
228
+
229
+ contrato explicito -> aliases legados (quando suportados) -> defaults internos -> comportamento seguro
230
+
231
+ ### Override points
232
+
233
+ - inputs publicos do componente
234
+ - configuracao JSON de runtime
235
+ - integracoes de host (servicos/tokens/adapters)
236
+
237
+ ### Runtime normalization
238
+
239
+ Alias e defaults devem convergir para paths canonicos; onde nao houver evidencia, manter not-yet-verified de forma explicita.
240
+
241
+ ### Precedence rules
242
+
243
+ Em conflito entre alias legado e path canonico, priorizar path canonico e registrar janela de migracao do legado.
244
+
245
+ ## Validation and error semantics (obrigatorio)
246
+
247
+ ### Validation model
248
+
249
+ | Path/Rule | Validation phase | Behavior on fail | Error code / warning | Notes |
250
+ | --- | --- | --- | --- | --- |
251
+ | canonical-paths | parse/runtime | component-defined (warn/reject/default) | not-yet-standardized | Semantica detalhada preservada na referencia tecnica por componente. |
252
+
253
+ ### Invalid and unknown field handling
254
+
255
+ - Campos desconhecidos: comportamento component-defined (ignore, warn ou reject).
256
+ - Tipos invalidos: pode haver fallback, warning ou falha, conforme runtime especifico.
257
+ - Valores fora de dominio: registrar observed vs desired em Known limitations and mismatches.
258
+
259
+ ### Fail-open / fail-closed behavior
260
+
261
+ | Condition | Mode | Runtime behavior | Consumer impact |
262
+ | --- | --- | --- | --- |
263
+ | invalid-or-unknown-field | component-defined | not-yet-verified | Pode gerar warning, fallback silencioso ou rejeicao; validar por componente. |
264
+
265
+ ### Runtime warnings vs hard failures
266
+
267
+ | Condition | Severity | Observability | Consumer action |
268
+ | --- | --- | --- | --- |
269
+ | partial-or-declared-only-coverage | warning | logs/eventos do componente | Confirmar ligacao runtime antes de uso critico. |
270
+ | mismatch-confirmed | error-or-warning | componente/host observability | Planejar migracao e corrigir contrato/runtime. |
271
+
272
+ ## Detailed API reference
273
+ ### Preserved technical reference (normalized from previous revision)
274
+
275
+ ### 1. Visao Geral e Quando Usar
276
+ `praxis-field-shell` e o invólucro interno usado pelo loader dinamico para montar cada campo em runtime.
277
+
278
+ Use quando precisar:
279
+ - entender como estados (`visible`, `readonly`, `disabled`, `presentation`) sao resolvidos no host;
280
+ - customizar o container por `itemTemplate` sem reimplementar o campo;
281
+ - integrar eventos de canvas (`canvasMode`) no page builder.
282
+
283
+ ### 2. API do Componente (Inputs/Outputs)
284
+ | Propriedade | Tipo | Padrao | Obrigatorio | Comportamento |
285
+ | --- | --- | --- | --- | --- |
286
+ | `field` | `FieldMetadata` | - | Sim | Metadados do campo renderizado dentro do shell. |
287
+ | `index` | `number` | - | Sim | Indice do campo na lista da diretiva. |
288
+ | `control` | `AbstractControl \| null` | `null` | Nao | Controle reativo associado ao campo. |
289
+ | `readonlyMode/disabledMode/visible/presentationMode` | `boolean` | `false/false/true/false` | Nao | Overrides de estado vindos do host/container. |
290
+ | `canvasMode` | `boolean` | `false` | Nao | Ativa eventos de interacao para canvas/editor visual. |
291
+ | `itemTemplate` | `TemplateRef` | - | Nao | Template opcional para envelopar o conteudo do campo. |
292
+ | `canvasMouseEnter` | `FieldMetadata` | - | Output | Emitido no hover quando `canvasMode=true`. |
293
+ | `canvasMouseLeave` | `void` | - | Output | Emitido no mouseleave quando `canvasMode=true`. |
294
+ | `canvasClick` | `FieldMetadata` | - | Output | Emitido no click quando `canvasMode=true`. |
295
+
296
+ ### 3. Matriz de Cobertura JSON (Completa)
297
+ #### 3.1 Campos especificos do componente
298
+ | Caminho JSON | Tipo | Status | Comportamento em runtime |
299
+ | --- | --- | --- | --- |
300
+ | `field.hidden` | `boolean` | Ativo | Quando `true`, `effectiveVisible=false` no host. |
301
+ | `field.formHidden` | `boolean` | Ativo | Alias para ocultar campo no shell. |
302
+ | `field.readonly` / `field.readOnly` | `boolean` | Ativo | Entra no calculo de `effectiveReadonlyMode`. |
303
+ | `field.disabled` | `boolean` | Ativo | Entra no calculo de `effectiveDisabledMode`. |
304
+ | `field.controlType` | `string` | Ativo | Define atributos de host e regra especial de apresentacao. |
305
+ | `field.controlType='avatar'` | `string` | Ativo | Mantem conteudo do campo visivel mesmo em presentation mode. |
306
+ | `field.transformDisplayValue` | `(value)=>any` | Parcial | Hook valido apenas quando injetado como funcao em runtime (nao serializavel em JSON puro). |
307
+ | `field.label/name` | `string` | Ativo | Base do rotulo exibido no bloco de apresentacao. |
308
+
309
+ Notas de runtime:
310
+ - `computeEffectiveState` combina metadado + overrides de input.
311
+ - Em `presentationMode`, o shell renderiza HTML formatado por `formatDisplayHtml`.
312
+
313
+ #### 3.2 Campos herdados compartilhados (exaustivo)
314
+ Contrato amplo de campos dinamicos:
315
+ - `projects/praxis-core/src/lib/models/component-metadata.interface.ts`
316
+
317
+ Resumo de composicao deste componente:
318
+ - `Ativo`: envelope visual/comportamental, calculo de estado e apresentacao.
319
+ - `Parcial`: `transformDisplayValue` exige metadado enriquecido em codigo (funcao real).
320
+
321
+ ### 4. Mapeamento de Comportamento
322
+ - Sempre cria o `insertionPoint` (`vc`) para o componente real do campo.
323
+ - Em modo apresentacao sem excecao de tipo, esconde conteudo editavel e mostra bloco textual.
324
+ - `readonlyMode` aplica overlay bloqueando interacao, mantendo controle habilitado.
325
+ - `canvasMode` injeta semantica de evento para editores visuais.
326
+
327
+ ### 5. Exemplo Minimo (JSON + Uso)
328
+ ```json
329
+ {
330
+ "field": {
331
+ "name": "status",
332
+ "label": "Status",
333
+ "controlType": "select"
334
+ },
335
+ "visible": true,
336
+ "presentationMode": false
337
+ }
338
+ ```
339
+ Uso: shell padrao para um campo dinamico simples.
340
+
341
+ ### 6. Exemplo Corporativo (JSON + Uso)
342
+ ```json
343
+ {
344
+ "field": {
345
+ "id": "f-approval-status",
346
+ "name": "approvalStatus",
347
+ "label": "Aprovacao",
348
+ "controlType": "select",
349
+ "readOnly": true
350
+ },
351
+ "readonlyMode": false,
352
+ "presentationMode": true,
353
+ "canvasMode": true
354
+ }
355
+ ```
356
+ Uso: tela corporativa em modo leitura com integracao de canvas.
357
+
358
+ Observacao:
359
+ - em pipelines 100% JSON, `transformDisplayValue` nao deve ser enviado como string de funcao; esse hook so funciona quando o host injeta funcao em runtime.
360
+
361
+ ### 7. Troubleshooting e Armadilhas Comuns
362
+ 1. Campo nao aparece.
363
+ Correcao: verificar `field.hidden/formHidden` e `visible` no host.
364
+
365
+ 2. Campo fica somente leitura sem override explicito.
366
+ Correcao: `field.readonly/readOnly` tambem ativa readonly efetivo.
367
+
368
+ 3. Em apresentacao, componente desaparece.
369
+ Correcao: comportamento esperado; excecao atual e `controlType='avatar'`.
370
+
371
+ 4. Evento de canvas nao dispara.
372
+ Correcao: garantir `canvasMode=true`.
373
+
374
+ 5. Valor mostrado em apresentacao esta incorreto.
375
+ Correcao: revisar `transformDisplayValue` e formato do valor no `control`.
376
+
377
+ ### 8. Cross-links
378
+ - `projects/praxis-dynamic-fields/src/lib/utils/field-state.util.ts`
379
+ - `projects/praxis-dynamic-fields/src/lib/utils/format-display.util.ts`
380
+
381
+ ### 9. Relatorio de Validacao Estrutural
382
+ - Visao geral: PASS
383
+ - API (inputs/outputs): PASS
384
+ - Cobertura JSON completa (especifico + herdado): PASS
385
+ - Mapeamento de comportamento: PASS
386
+ - Exemplo minimo: PASS
387
+ - Exemplo corporativo: PASS
388
+ - Troubleshooting: PASS
389
+
390
+ ## JSON path index (obrigatorio)
391
+
392
+ | Path | Type | Required | Default | Status | Notes |
393
+ | --- | --- | --- | --- | --- | --- |
394
+ | `metadata` | object | true | n/a | Partial | See Detailed API reference. |
395
+ | `visible` | boolean | false | n/a | Partial | See Detailed API reference. |
396
+ | `canvasMode` | boolean | false | n/a | Partial | See Detailed API reference. |
397
+ | `field` | object | false | n/a | Partial | See Detailed API reference. |
398
+ | `field.hidden` | boolean | false | n/a | Partial | See Detailed API reference. |
399
+ | `field.formHidden` | unknown | false | n/a | Partial | See Detailed API reference. |
400
+ | `field.readonly` | boolean | false | n/a | Partial | See Detailed API reference. |
401
+ | `field.readOnly` | boolean | false | n/a | Partial | See Detailed API reference. |
402
+ | `field.disabled` | boolean | false | n/a | Partial | See Detailed API reference. |
403
+ | `field.controlType` | string | false | n/a | Partial | See Detailed API reference. |
404
+ | `field.controlType='avatar'` | unknown | false | n/a | Partial | See Detailed API reference. |
405
+ | `field.transformDisplayValue` | unknown | false | n/a | Partial | See Detailed API reference. |
406
+ | `presentationMode` | boolean | false | n/a | Partial | See Detailed API reference. |
407
+ | `readonlyMode` | boolean | false | n/a | Partial | See Detailed API reference. |
408
+ | `disabledMode` | boolean | false | n/a | Partial | See Detailed API reference. |
409
+
410
+ ## Events reference (obrigatorio)
411
+
412
+ | Event | Payload | Trigger | Stability | Notes |
413
+ | --- | --- | --- | --- | --- |
414
+ | `canvasMouseEnter` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
415
+ | `canvasMouseLeave` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
416
+ | `canvasClick` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
417
+
418
+ ## Styling API (obrigatorio quando aplicavel)
419
+
420
+ | Token/Class | Scope | Purpose | Notes |
421
+ | --- | --- | --- | --- |
422
+ | `not-yet-verified` | component | Styling contract not yet verified | Use Detailed API reference for component-specific styling notes. |
423
+
424
+ ## Examples (obrigatorio)
425
+
426
+ | Example | Scenario | Validates | Notes |
427
+ | --- | --- | --- | --- |
428
+ | `Minimal valid` | baseline payload | required contract blocks | Extracted from preserved technical reference when available. |
429
+ | `Common setup` | common component usage | standard runtime behavior | Validate against host integration path. |
430
+ | `Advanced setup` | richer config with overrides | precedence and normalization | Requires runtime confirmation for edge cases. |
431
+ | `Enterprise scenario` | governance/legacy/migration context | auditability and compatibility boundaries | Include tenant-specific constraints when applicable. |
432
+
433
+ ### Minimal valid
434
+
435
+ ```json
436
+ {
437
+ "field": {
438
+ "name": "status",
439
+ "label": "Status",
440
+ "controlType": "select"
441
+ },
442
+ "visible": true,
443
+ "presentationMode": false,
444
+ "metadata": {}
445
+ }
446
+ ```
447
+
448
+ ### Common setup
449
+
450
+ ```json
451
+ {
452
+ "field": {
453
+ "id": "f-approval-status",
454
+ "name": "approvalStatus",
455
+ "label": "Aprovacao",
456
+ "controlType": "praxis-field-shell-common",
457
+ "readOnly": true
458
+ },
459
+ "readonlyMode": false,
460
+ "presentationMode": true,
461
+ "canvasMode": true,
462
+ "metadata": {}
463
+ }
464
+ ```
465
+
466
+ ### Advanced setup
467
+
468
+ ```json
469
+ {
470
+ "field": {
471
+ "id": "f-approval-status",
472
+ "name": "approvalStatus",
473
+ "label": "Aprovacao",
474
+ "controlType": "select",
475
+ "readOnly": true
476
+ },
477
+ "readonlyMode": false,
478
+ "presentationMode": true,
479
+ "canvasMode": true,
480
+ "metadata": {},
481
+ "disabledMode": false
482
+ }
483
+ ```
484
+
485
+ ### Enterprise scenario
486
+
487
+ ```json
488
+ {
489
+ "field": {
490
+ "id": "f-approval-status",
491
+ "name": "approvalStatus",
492
+ "label": "Aprovacao",
493
+ "controlType": "select",
494
+ "readOnly": true
495
+ },
496
+ "readonlyMode": false,
497
+ "presentationMode": true,
498
+ "canvasMode": true,
499
+ "metadata": {},
500
+ "visible": true
501
+ }
502
+ ```
503
+
504
+ ## Compatibility and migration notes (recomendado)
505
+
506
+ | Concern | Affected versions | Migration action | Deadline | Notes |
507
+ | --- | --- | --- | --- | --- |
508
+ | Legacy aliases coexist with canonical paths | Active consumers using legacy JSON keys | Keep canonical paths for new usage and map aliases in migration backlog | not-yet-defined | Track via component-level migration issue |
509
+
510
+ ## Known limitations and mismatches (recomendado)
511
+
512
+ | Path/Behavior | Observed behavior (runtime) | Desired behavior | Impact | Tracking issue | Target fix |
513
+ | --- | --- | --- | --- | --- | --- |
514
+ | 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 |
515
+
516
+ ## Source references (obrigatorio)
517
+
518
+ | Source type | Path/URL | Why it is source of truth | Last verified (YYYY-MM-DD) | Notes |
519
+ | --- | --- | --- | --- | --- |
520
+ | runtime-code | projects/praxis-dynamic-fields/src/lib/components/field-shell/field-shell.component.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
521
+ | runtime-code | projects/praxis-dynamic-fields/src/lib/utils/field-state.util.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
522
+ | runtime-code | projects/praxis-dynamic-fields/src/lib/utils/format-display.util.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
523
+ | schema-types | projects/praxis-core/src/lib/models/component-metadata.interface.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |