@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,577 @@
1
+ ---
2
+ title: "pdx-material-button-toggle JSON API (Canonical)"
3
+ slug: "pdx-material-button-toggle-json-api"
4
+ doc_type: "api-reference"
5
+ component: "pdx-material-button-toggle"
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-material-button-toggle."
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/material-button-toggle/material-button-toggle.metadata.ts"
22
+ - "projects/praxis-dynamic-fields/src/lib/components/material-button-toggle/material-button-toggle.component.ts"
23
+ - "projects/praxis-dynamic-fields/src/lib/base/simple-base-select.component.ts"
24
+ - "projects/praxis-core/src/lib/models/material-field-metadata.interface.ts"
25
+ source_of_truth_last_verified: "2026-04-27"
26
+ last_updated: "2026-04-27"
27
+ toc: true
28
+ sidebar: true
29
+ tags:
30
+ - "json-api"
31
+ - "canonical-contract"
32
+ - "pdx-material-button-toggle"
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
+ - "pdx-base-select-runtime-contract"
43
+ - "pdx-base-input-runtime-contract"
44
+ - "pdx-material-radio-group"
45
+ - "pdx-material-selection-list"
46
+ ---
47
+
48
+ # pdx-material-button-toggle
49
+
50
+ Este documento e a referencia canonica da API JSON de pdx-material-button-toggle.
51
+
52
+ ## Summary
53
+
54
+ - Tipo documental: API reference canonica de contrato JSON.
55
+ - Source of truth: runtime e codigo declarados no frontmatter.
56
+ - Objetivo operacional: consulta rapida, auditavel e deterministica sob pressao.
57
+ - Resumo funcional: Contrato JSON metadata-driven com comportamento definido por runtime e schema associado.
58
+
59
+ ## Purpose and scope
60
+
61
+ - O componente consome payload JSON metadata-driven e expoe comportamento runtime configuravel por contrato.
62
+ - Esta referencia cobre contrato publico, classificacao de paths e semantica de cobertura (runtime/schema/editor).
63
+ - Fora de escopo: quickstart, tutorial narrativo e notas arquiteturais que nao alteram contrato publico.
64
+
65
+ ## Consulta rapida (obrigatorio)
66
+
67
+ | Regra/tema | Observado | Canonico desejado | Status | Evidencia |
68
+ | --- | --- | --- | --- | --- |
69
+ | Component id | `pdx-material-button-toggle` | Manter ID canonico estavel e versionado por contrato | Active | frontmatter.component |
70
+ | Primary contract source | `runtime-and-code` | Runtime, schema e docs devem permanecer rastreaveis | Partial | frontmatter.contract_source + source_of_truth |
71
+ | Runtime coverage | `true` | Comportamentos runtime criticos devem ficar explicitamente verificados | Active | `projects/praxis-dynamic-fields/src/lib/components/material-button-toggle/material-button-toggle.component.ts`, focused component specs on 2026-04-27 |
72
+ | Schema/type coverage | `true` | Tipos e schema devem refletir paths publicos do contrato | Active | source_of_truth + Detailed API reference |
73
+ | Editor/tooling coverage | `false` | Editor/tooling deve espelhar somente contrato publico suportado | Partial | `projects/praxis-core/src/lib/metadata/field-selector-control-type.constants.ts`, `projects/praxis-dynamic-fields/src/lib/services/component-registry/component-registry.service.ts` |
74
+ | Legacy paths | `true` | Segregar legado de caminhos canonicos com janela de migracao | Partial | frontmatter.legacy_paths_present |
75
+ | Known mismatches | `false` | Registrar observed vs desired de forma auditavel | Active | frontmatter.has_known_mismatches |
76
+
77
+ ## Source of truth
78
+
79
+ | Source | Kind | Notes |
80
+ | --- | --- | --- |
81
+ | projects/praxis-dynamic-fields/src/lib/components/material-button-toggle/material-button-toggle.metadata.ts | schema-metadata | Arquivo presente no repositorio e usado como evidencia de contrato. |
82
+ | projects/praxis-dynamic-fields/src/lib/components/material-button-toggle/material-button-toggle.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
83
+ | projects/praxis-dynamic-fields/src/lib/base/simple-base-select.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
84
+ | projects/praxis-core/src/lib/models/material-field-metadata.interface.ts | schema-types | Arquivo presente no repositorio e usado como evidencia de contrato. |
85
+
86
+ ## Support legend
87
+
88
+ - **Active**: suportado em runtime e liberado para uso externo.
89
+ - **Partial**: suporte parcial, com restricoes, lacunas ou validacao incompleta.
90
+ - **Declared-only**: declarado em tipos/schema sem evidencia operacional completa.
91
+ - **Schema-only**: presente em schema/tipos sem cobertura runtime confirmada.
92
+ - **Deprecated**: legado suportado por janela de migracao definida.
93
+
94
+ ## Contract status snapshot
95
+
96
+ | Item | Value | Notes |
97
+ | --- | --- | --- |
98
+ | Reference mode | `canonical` | Deve permanecer canonico |
99
+ | Contract format | `json` | Contrato metadata-driven |
100
+ | Contract source | `runtime-and-code` | Alinhar com source_of_truth |
101
+ | Runtime scope | `public` | Escopo publicado para consumidores |
102
+ | Runtime verified | `true` | Revisar sempre com evidencia de runtime |
103
+ | Schema verified | `true` | Revisar sempre com evidencia de tipos/schema |
104
+ | Editor coverage verified | `false` | Revisar sempre com evidencia de editor/tooling |
105
+ | Legacy paths present | `true` | Segregar legado de contrato canonico |
106
+ | Has known mismatches | `false` | Divergencias devem aparecer em secao dedicada |
107
+
108
+ ## Contract classification (obrigatorio)
109
+
110
+ ### Canonical paths (public contract)
111
+
112
+ | Path | Type | Required | Default | Status | Notes |
113
+ | --- | --- | --- | --- | --- | --- |
114
+ | `metadata` | object | true | n/a | Active | See Detailed API reference for runtime semantics. |
115
+ | `readonlyMode` | boolean | false | `false` | Active | Blocks interaction and exposes `aria-readonly`. |
116
+ | `disabledMode` | boolean | false | `false` | Active | Blocks interaction and exposes disabled styling/ARIA. |
117
+ | `visible` | boolean | false | `true` | Active | Hides the host and marks it `aria-hidden`. |
118
+ | `presentationMode` | boolean | false | `false` | Active | Blocks interaction as readonly presentation output. |
119
+ | `metadata.controlType` | string | false | n/a | Active | See Detailed API reference for runtime semantics. |
120
+ | `metadata.toggleOptions` | array | false | n/a | Active | Canonical inline option list. |
121
+ | `metadata.options` | array | false | n/a | Deprecated | Backward-compatible alias when `toggleOptions` is not provided. |
122
+ | `metadata.multiple` | boolean | false | `false` | Active | Enables multiple selected toggle buttons. |
123
+ | `metadata.maxSelections` | number | false | n/a | Active | Enforced when `multiple=true`. |
124
+ | `metadata.appearance` | string | false | `legacy` | Active | Material button-toggle appearance. |
125
+ | `metadata.resourcePath` | string | false | n/a | Active | Remote option loading through base select. |
126
+ | `metadata.optionSource` | object | false | n/a | Active | Canonical metadata-driven option source. |
127
+
128
+ ### Supported legacy paths
129
+
130
+ | Legacy path | Canonical replacement | Support window | Runtime behavior | Notes |
131
+ | --- | --- | --- | --- | --- |
132
+ | `metadata.options` | `metadata.toggleOptions` | beta cleanup | accepted for backward compatibility when `toggleOptions` is absent | Prefer `toggleOptions` for new payloads; no new aliases should be introduced. |
133
+
134
+ ### Internal-only paths
135
+
136
+ Nao ha paths internal-only confirmados no contrato publico desta revisao.
137
+
138
+ ### Experimental paths
139
+
140
+ Nao ha paths experimentais confirmados no contrato publico desta revisao.
141
+
142
+ ## Public contract surface (obrigatorio)
143
+
144
+ ### Top-level configuration blocks
145
+
146
+ | Block | Purpose | Required | Merge strategy | Notes |
147
+ | --- | --- | --- | --- | --- |
148
+ | `metadata` | Payload declarativo principal do componente | true | deep-merge | runtime linkage verified for core flows (component specs, 2026-04-27). |
149
+ | `readonlyMode` | Override de readonly no host/runtime | false | override | disables group interaction and exposes readonly semantics. |
150
+ | `disabledMode` | Override de disabled no host/runtime | false | override | disables group interaction and exposes disabled semantics. |
151
+ | `visible` | Override de visibilidade no host/runtime | false | override | host visibility binding remains active. |
152
+ | `presentationMode` | Renderizacao de apresentacao sem interacao | false | override | disables group interaction as readonly output. |
153
+
154
+ ### Nested configuration blocks
155
+
156
+ | Path | Type | Required | Default | Constraints | Notes |
157
+ | --- | --- | --- | --- | --- | --- |
158
+ | `metadata.controlType` | string | false | n/a | component-defined | Active; selects the button-toggle renderer. |
159
+ | `metadata.toggleOptions` | array | false | n/a | component-defined | Active; items accept `value`, `text`, `label`, and `disabled`. |
160
+ | `metadata.options` | array | false | n/a | component-defined | Deprecated alias accepted for backward compatibility. |
161
+ | `metadata.multiple` | boolean | false | `false` | component-defined | Active; controls single vs multiple selection. |
162
+ | `metadata.maxSelections` | number | false | n/a | component-defined | Active; truncates extra values on group change. |
163
+ | `metadata.appearance` | string | false | `legacy` | `legacy` or `standard` | Active; passed to Material group. |
164
+ | `metadata.resourcePath` | string | false | n/a | component-defined | Active; remote option loading through base select. |
165
+ | `metadata.optionSource` | object | false | n/a | component-defined | Active; canonical metadata-driven option source. |
166
+ | `metadata.filterCriteria` | object | false | `{}` | component-defined | Active; passed to remote option loading. |
167
+ | `metadata.optionLabelKey` | string | false | `label` | component-defined | Active; maps remote labels. |
168
+ | `metadata.optionValueKey` | string | false | `value` | component-defined | Active; maps remote values. |
169
+
170
+ ### Input bindings (inbound data)
171
+
172
+ | Binding/Path | Type | Required | Source | Runtime normalization | Notes |
173
+ | --- | --- | --- | --- | --- | --- |
174
+ | `metadata` | object | true | host-json | component-defined | Primary inbound contract payload. |
175
+ | `readonlyMode` | boolean | false | host-runtime | effective boolean | Blocks interaction and exposes readonly semantics. |
176
+ | `disabledMode` | boolean | false | host-runtime | effective boolean | Blocks interaction and exposes disabled semantics. |
177
+ | `visible` | boolean | false | host-runtime | effective boolean | Host-level visibility override. |
178
+ | `presentationMode` | boolean | false | host-runtime | effective boolean | Presentation override that blocks interaction as readonly output. |
179
+
180
+ ### Output events
181
+
182
+ | Event | Payload | Trigger | Stability | Notes |
183
+ | --- | --- | --- | --- | --- |
184
+ | `searchTermChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
185
+ | `selectionChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
186
+ | `openedChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
187
+ | `valueChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
188
+ | `focusChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
189
+ | `nativeBlur` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
190
+ | `nativeChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
191
+
192
+ ### External side channels
193
+
194
+ | Channel | Direction | Contract | Failure mode | Notes |
195
+ | --- | --- | --- | --- | --- |
196
+ | `host/services/storage` | bidirectional | component-defined | component-defined | Side channels variam por componente e host; verificar em source_of_truth. |
197
+
198
+ ### Host/runtime dependencies
199
+
200
+ | Dependency | Required | Environment | Purpose | Notes |
201
+ | --- | --- | --- | --- | --- |
202
+ | `material-button-toggle.metadata.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/material-button-toggle/material-button-toggle.metadata.ts`. |
203
+ | `material-button-toggle.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/material-button-toggle/material-button-toggle.component.ts`. |
204
+ | `simple-base-select.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/base/simple-base-select.component.ts`. |
205
+ | `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`. |
206
+
207
+ ## Coverage by surface (obrigatorio)
208
+
209
+ ### Coverage matrix (runtime, schema/type, editor/tooling)
210
+
211
+ | Surface | Verified | Coverage status | Evidence | Notes |
212
+ | --- | --- | --- | --- | --- |
213
+ | Runtime | `true` | Active | `projects/praxis-dynamic-fields/src/lib/components/material-button-toggle/material-button-toggle.component.ts`, focused component specs | Core runtime flows verified via focused component specs on 2026-04-27; editor/tooling coverage remains independent. |
214
+ | Schema/Types | `true` | Active | source_of_truth + Detailed API reference | Reconcile schema/types with canonical paths during follow-up when needed. |
215
+ | Editor/Tooling | `false` | Partial | `projects/praxis-core/src/lib/metadata/field-selector-control-type.constants.ts`, `projects/praxis-dynamic-fields/src/lib/services/component-registry/component-registry.service.ts` | Selector/control-type tooling linkage verified via default selector map and registry seeding; visual editor end-to-end coverage remains not-yet-verified. |
216
+
217
+ ### Runtime coverage boundaries
218
+
219
+ - Ambientes suportados: browser/dev/prod; SSR/hydration appears to be component-dependent unless explicitly verified.
220
+ - Pre-condicoes: payload JSON valido, bindings de host consistentes e dependencias descritas no source_of_truth.
221
+ - Fora de cobertura confirmada: caminhos internos, experimentais ou aliases nao enumerados formalmente.
222
+
223
+ ### Editor and tooling notes
224
+
225
+ - Evidencia de tooling: selector `pdx-*` mapeado em `DEFAULT_FIELD_SELECTOR_CONTROL_TYPE_MAP` e semeado no `ComponentRegistryService`; editor visual E2E permanece not-yet-verified.
226
+ - O que esta exposto no editor visual depende da cobertura real do workspace e nao deve ser inferido como suporte runtime total.
227
+ - Campos disponiveis apenas via JSON/manual devem continuar no contrato, com rotulo explicito de cobertura parcial.
228
+ - Quando houver divergencia entre editor e runtime, manter mismatch rastreavel em secao dedicada.
229
+
230
+ ## Resolution and precedence model (obrigatorio)
231
+
232
+ ### Merge order
233
+
234
+ 1. defaults do componente
235
+ 2. contrato JSON recebido
236
+ 3. overrides de host/runtime
237
+ 4. normalizacoes internas
238
+
239
+ ### Fallback order
240
+
241
+ contrato explicito -> aliases legados (quando suportados) -> defaults internos -> comportamento seguro
242
+
243
+ ### Override points
244
+
245
+ - inputs publicos do componente
246
+ - configuracao JSON de runtime
247
+ - integracoes de host (servicos/tokens/adapters)
248
+
249
+ ### Runtime normalization
250
+
251
+ Alias e defaults devem convergir para paths canonicos; onde nao houver evidencia, manter not-yet-verified de forma explicita.
252
+
253
+ ### Precedence rules
254
+
255
+ Em conflito entre alias legado e path canonico, priorizar path canonico e registrar janela de migracao do legado.
256
+
257
+ ## Validation and error semantics (obrigatorio)
258
+
259
+ ### Validation model
260
+
261
+ | Path/Rule | Validation phase | Behavior on fail | Error code / warning | Notes |
262
+ | --- | --- | --- | --- | --- |
263
+ | canonical-paths | parse/runtime | component-defined (warn/reject/default) | not-yet-standardized | Semantica detalhada preservada na referencia tecnica por componente. |
264
+
265
+ ### Invalid and unknown field handling
266
+
267
+ - Campos desconhecidos: comportamento component-defined (ignore, warn ou reject).
268
+ - Tipos invalidos: pode haver fallback, warning ou falha, conforme runtime especifico.
269
+ - Valores fora de dominio: registrar observed vs desired em Known limitations and mismatches.
270
+
271
+ ### Fail-open / fail-closed behavior
272
+
273
+ | Condition | Mode | Runtime behavior | Consumer impact |
274
+ | --- | --- | --- | --- |
275
+ | invalid-or-unknown-field | component-defined | not-yet-verified | Pode gerar warning, fallback silencioso ou rejeicao; validar por componente. |
276
+
277
+ ### Runtime warnings vs hard failures
278
+
279
+ | Condition | Severity | Observability | Consumer action |
280
+ | --- | --- | --- | --- |
281
+ | partial-or-declared-only-coverage | warning | logs/eventos do componente | Confirmar ligacao runtime antes de uso critico. |
282
+ | mismatch-confirmed | error-or-warning | componente/host observability | Planejar migracao e corrigir contrato/runtime. |
283
+
284
+ ## Detailed API reference
285
+ ### Preserved technical reference (normalized from previous revision)
286
+
287
+ ### 1. Visao Geral e Quando Usar
288
+ `pdx-material-button-toggle` usa `mat-button-toggle-group` para selecao single ou multipla via JSON.
289
+
290
+ Use quando precisar:
291
+ - opcoes curtas com alta visibilidade de estado selecionado;
292
+ - UX mais compacta que radio/checkbox;
293
+ - alternar entre single e multiple no mesmo tipo de componente.
294
+
295
+ ### 2. API do Componente (Inputs/Outputs)
296
+ | Propriedade | Tipo | Padrao | Obrigatorio | Comportamento |
297
+ | --- | --- | --- | --- | --- |
298
+ | `metadata` | `MaterialButtonToggleMetadata` | - | Sim | Contrato principal dos toggles. |
299
+ | `selectionChange` | `T \| T[]` | - | Output herdado | Mudanca da selecao atual. |
300
+ | `optionSelected` | `SelectOption` | - | Output herdado | Opcao clicada pelo usuario. |
301
+ | `optionsLoaded` | `SelectOption[]` | - | Output herdado | Carga remota de opcoes. |
302
+ | `openedChange` | `boolean` | - | Output herdado | Output herdado do base select. |
303
+
304
+ ### 3. Matriz de Cobertura JSON (Completa)
305
+ #### 3.1 Campos especificos do componente
306
+ | Caminho JSON | Tipo | Status | Comportamento em runtime |
307
+ | --- | --- | --- | --- |
308
+ | `metadata.controlType` | `'buttonToggle'` | Ativo | Define renderer de toggle buttons. |
309
+ | `metadata.toggleOptions` | `Array<{ value; text?; label?; disabled? }>` | Ativo | Fonte principal de opcoes dos toggles. |
310
+ | `metadata.options` | `Array<any>` | Deprecated | Alias legado quando `toggleOptions` nao vem. |
311
+ | `metadata.multiple` | `boolean` | Ativo | Alterna entre single e multiplo no grupo. |
312
+ | `metadata.maxSelections` | `number` | Ativo | Enforcado em `onGroupChange` quando multiplo. |
313
+ | `metadata.appearance` | `'legacy' \| 'standard'` | Ativo | Aparencia visual do `mat-button-toggle-group`. |
314
+ | `metadata.resourcePath` | `string` | Ativo | Carga remota de opcoes via base select. |
315
+ | `metadata.filterCriteria` | `Record<string, any>` | Ativo | Filtro base de backend. |
316
+ | `metadata.optionLabelKey` | `string` | Ativo | Chave de label em resposta remota. |
317
+ | `metadata.optionValueKey` | `string` | Ativo | Chave de value em resposta remota. |
318
+ | `metadata.optionSource` | `OptionSourceMetadata` | Ativo | Fonte canonica metadata-driven para opcoes derivadas. |
319
+ | `metadata.readonly` | `boolean` | Ativo | Bloqueia interacao e expoe `aria-readonly`. |
320
+ | `metadata.selectAll` | `boolean` | Declared-only | Sem UI dedicada de selecionar todos neste componente. |
321
+ | `metadata.searchable` | `boolean` | Declared-only | Sem input de busca no template. |
322
+
323
+ #### 3.2 Campos herdados compartilhados (exaustivo)
324
+ Contrato completo compartilhado para selects:
325
+ - [pdx-base-select-runtime-contract.json-api.md](projects/praxis-dynamic-fields/src/lib/base/pdx-base-select-runtime-contract.json-api.md)
326
+
327
+ Contrato compartilhado de input base:
328
+ - [pdx-base-input-runtime-contract.json-api.md](projects/praxis-dynamic-fields/src/lib/base/pdx-base-input-runtime-contract.json-api.md)
329
+
330
+ Resumo de composicao deste componente:
331
+ - `Ativo`: toggleOptions, multiple, maxSelections, appearance, estados governados, remote source e optionSource.
332
+ - `Declared-only`: selectAll/searchable sem binding visual.
333
+ - `Deprecated`: alias `options` aceito apenas para compatibilidade de payloads antigos.
334
+
335
+ ### 4. Mapeamento de Comportamento
336
+ - Selecao: valor unico ou array conforme `multiple`.
337
+ - Limite: ao exceder `maxSelections`, valores extras sao truncados.
338
+ - Eventos: `optionSelected` identifica a opcao clicada; `selectionChange` publica valor final.
339
+ - Acessibilidade: label associado por `aria-labelledby`, `aria-required`, `aria-invalid`, `aria-disabled` e `aria-readonly`.
340
+ - Estados governados: `disabledMode`, `readonlyMode`, `presentationMode` e `metadata.readonly` bloqueiam interacao do grupo.
341
+ - Renderizacao: grupo de botao toggle com erro/hint fora do grupo.
342
+
343
+ ### 5. Exemplo Minimo (JSON + Uso)
344
+ ```json
345
+ {
346
+ "componentId": "pdx-material-button-toggle",
347
+ "metadata": {
348
+ "name": "viewMode",
349
+ "label": "Modo",
350
+ "controlType": "buttonToggle",
351
+ "multiple": false,
352
+ "toggleOptions": [
353
+ { "value": "list", "text": "Lista" },
354
+ { "value": "cards", "text": "Cards" }
355
+ ]
356
+ }
357
+ }
358
+ ```
359
+ Uso: alternancia rapida de modo de visualizacao.
360
+
361
+ ### 6. Exemplo Corporativo (JSON + Uso)
362
+ ```json
363
+ {
364
+ "componentId": "pdx-material-button-toggle",
365
+ "metadata": {
366
+ "name": "exportChannels",
367
+ "label": "Canais de Exportacao",
368
+ "controlType": "buttonToggle",
369
+ "multiple": true,
370
+ "maxSelections": 2,
371
+ "appearance": "standard",
372
+ "resourcePath": "exports/channels/options",
373
+ "filterCriteria": { "tenant": "corp", "enabled": true },
374
+ "optionLabelKey": "label",
375
+ "optionValueKey": "code",
376
+ "hint": "Escolha ate 2 canais."
377
+ }
378
+ }
379
+ ```
380
+ Uso: habilita multiplos canais com limite e dados remotos.
381
+
382
+ ### 7. Troubleshooting e Armadilhas Comuns
383
+ 1. Mais de `maxSelections` continua selecionado.
384
+ Correcao: verificar se `multiple=true`; limite so e aplicado em modo multiplo.
385
+
386
+ 2. Esperar botao de limpar ou select all padrao.
387
+ Correcao: esse template nao implementa `selectAll` nem clear dedicado.
388
+
389
+ 3. Valores remotos aparecem vazios.
390
+ Correcao: revisar `optionLabelKey` e `optionValueKey`.
391
+
392
+ 4. Evento retorna valor inesperado.
393
+ Correcao: em modo multiplo, payload e array; em single, payload escalar.
394
+
395
+ 5. Aparencia nao muda.
396
+ Correcao: usar `appearance: "legacy"` ou `"standard"`.
397
+
398
+ ### 8. Cross-links
399
+ - `projects/praxis-dynamic-fields/src/lib/base/pdx-base-select-runtime-contract.json-api.md`
400
+ - `projects/praxis-dynamic-fields/src/lib/components/material-radio-group/pdx-material-radio-group.json-api.md`
401
+ - `projects/praxis-dynamic-fields/src/lib/components/material-selection-list/pdx-material-selection-list.json-api.md`
402
+
403
+ ### 9. Relatorio de Validacao Estrutural
404
+ - Visao geral: PASS
405
+ - API (inputs/outputs): PASS
406
+ - Cobertura JSON completa (especifico + herdado): PASS
407
+ - Mapeamento de comportamento: PASS
408
+ - Exemplo minimo: PASS
409
+ - Exemplo corporativo: PASS
410
+ - Troubleshooting: PASS
411
+
412
+ ## JSON path index (obrigatorio)
413
+
414
+ | Path | Type | Required | Default | Status | Notes |
415
+ | --- | --- | --- | --- | --- | --- |
416
+ | `metadata` | object | true | n/a | Active | See Detailed API reference. |
417
+ | `readonlyMode` | boolean | false | `false` | Active | See Detailed API reference. |
418
+ | `disabledMode` | boolean | false | `false` | Active | See Detailed API reference. |
419
+ | `visible` | boolean | false | `true` | Active | See Detailed API reference. |
420
+ | `presentationMode` | boolean | false | `false` | Active | See Detailed API reference. |
421
+ | `metadata.controlType` | string | false | n/a | Active | See Detailed API reference. |
422
+ | `metadata.toggleOptions` | array | false | n/a | Active | See Detailed API reference. |
423
+ | `metadata.options` | array | false | n/a | Deprecated | See Detailed API reference. |
424
+ | `metadata.multiple` | boolean | false | `false` | Active | See Detailed API reference. |
425
+ | `metadata.maxSelections` | number | false | n/a | Active | See Detailed API reference. |
426
+ | `metadata.appearance` | string | false | `legacy` | Active | See Detailed API reference. |
427
+ | `metadata.resourcePath` | string | false | n/a | Active | See Detailed API reference. |
428
+ | `metadata.optionSource` | object | false | n/a | Active | See Detailed API reference. |
429
+ | `metadata.filterCriteria` | object | false | `{}` | Active | See Detailed API reference. |
430
+ | `metadata.optionLabelKey` | string | false | `label` | Active | See Detailed API reference. |
431
+ | `metadata.optionValueKey` | string | false | `value` | Active | See Detailed API reference. |
432
+ | `metadata.selectAll` | boolean | false | n/a | Partial | See Detailed API reference. |
433
+ | `metadata.searchable` | boolean | false | n/a | Partial | See Detailed API reference. |
434
+
435
+ ## Events reference (obrigatorio)
436
+
437
+ | Event | Payload | Trigger | Stability | Notes |
438
+ | --- | --- | --- | --- | --- |
439
+ | `searchTermChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
440
+ | `selectionChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
441
+ | `openedChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
442
+ | `valueChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
443
+ | `focusChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
444
+ | `nativeBlur` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
445
+ | `nativeChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
446
+
447
+ ## Styling API (obrigatorio quando aplicavel)
448
+
449
+ | Token/Class | Scope | Purpose | Notes |
450
+ | --- | --- | --- | --- |
451
+ | `metadata.appearance` | component | Styling-related JSON path | Validate against runtime implementation. |
452
+
453
+ ## Examples (obrigatorio)
454
+
455
+ | Example | Scenario | Validates | Notes |
456
+ | --- | --- | --- | --- |
457
+ | `Minimal valid` | baseline payload | required contract blocks | Extracted from preserved technical reference when available. |
458
+ | `Common setup` | common component usage | standard runtime behavior | Validate against host integration path. |
459
+ | `Advanced setup` | richer config with overrides | precedence and normalization | Requires runtime confirmation for edge cases. |
460
+ | `Enterprise scenario` | governance/legacy/migration context | auditability and compatibility boundaries | Include tenant-specific constraints when applicable. |
461
+
462
+ ### Minimal valid
463
+
464
+ ```json
465
+ {
466
+ "componentId": "pdx-material-button-toggle",
467
+ "metadata": {
468
+ "name": "viewMode",
469
+ "label": "Modo",
470
+ "controlType": "buttonToggle",
471
+ "multiple": false,
472
+ "toggleOptions": [
473
+ {
474
+ "value": "list",
475
+ "text": "Lista"
476
+ },
477
+ {
478
+ "value": "cards",
479
+ "text": "Cards"
480
+ }
481
+ ]
482
+ }
483
+ }
484
+ ```
485
+
486
+ ### Common setup
487
+
488
+ ```json
489
+ {
490
+ "componentId": "pdx-material-button-toggle",
491
+ "metadata": {
492
+ "name": "exportChannels",
493
+ "label": "Canais de Exportacao",
494
+ "controlType": "pdx-material-button-toggle-common",
495
+ "multiple": true,
496
+ "maxSelections": 2,
497
+ "appearance": "standard",
498
+ "resourcePath": "exports/channels/options",
499
+ "filterCriteria": {
500
+ "tenant": "corp",
501
+ "enabled": true
502
+ },
503
+ "optionLabelKey": "label",
504
+ "optionValueKey": "code",
505
+ "hint": "Escolha ate 2 canais."
506
+ }
507
+ }
508
+ ```
509
+
510
+ ### Advanced setup
511
+
512
+ ```json
513
+ {
514
+ "componentId": "pdx-material-button-toggle",
515
+ "metadata": {
516
+ "name": "exportChannels",
517
+ "label": "Canais de Exportacao",
518
+ "controlType": "buttonToggle",
519
+ "multiple": true,
520
+ "maxSelections": 5,
521
+ "appearance": "standard",
522
+ "resourcePath": "exports/channels/options",
523
+ "filterCriteria": {
524
+ "tenant": "corp",
525
+ "enabled": true
526
+ },
527
+ "optionLabelKey": "label",
528
+ "optionValueKey": "code",
529
+ "hint": "Escolha ate 2 canais."
530
+ }
531
+ }
532
+ ```
533
+
534
+ ### Enterprise scenario
535
+
536
+ ```json
537
+ {
538
+ "componentId": "pdx-material-button-toggle",
539
+ "metadata": {
540
+ "name": "exportChannels",
541
+ "label": "Canais de Exportacao",
542
+ "controlType": "pdx-material-button-toggle-enterprise",
543
+ "multiple": true,
544
+ "maxSelections": 2,
545
+ "appearance": "standard",
546
+ "resourcePath": "exports/channels/options",
547
+ "filterCriteria": {
548
+ "tenant": "corp",
549
+ "enabled": true
550
+ },
551
+ "optionLabelKey": "label",
552
+ "optionValueKey": "code",
553
+ "hint": "Escolha ate 2 canais."
554
+ }
555
+ }
556
+ ```
557
+
558
+ ## Compatibility and migration notes (recomendado)
559
+
560
+ | Concern | Affected versions | Migration action | Deadline | Notes |
561
+ | --- | --- | --- | --- | --- |
562
+ | 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 |
563
+
564
+ ## Known limitations and mismatches (recomendado)
565
+
566
+ | Path/Behavior | Observed behavior (runtime) | Desired behavior | Impact | Tracking issue | Target fix |
567
+ | --- | --- | --- | --- | --- | --- |
568
+ | Canonical contract parity | No confirmed mismatch in this revision; runtime linkage verified for core flows (2026-04-27), with editor/tooling coverage pending | Keep runtime/schema/editor alignment evidence updated | Low | n/a | Monitor in periodic audit |
569
+
570
+ ## Source references (obrigatorio)
571
+
572
+ | Source type | Path/URL | Why it is source of truth | Last verified (YYYY-MM-DD) | Notes |
573
+ | --- | --- | --- | --- | --- |
574
+ | schema-metadata | projects/praxis-dynamic-fields/src/lib/components/material-button-toggle/material-button-toggle.metadata.ts | Primary source of truth for contract and behavior. | 2026-04-27 | verified-path |
575
+ | runtime-code | projects/praxis-dynamic-fields/src/lib/components/material-button-toggle/material-button-toggle.component.ts | Primary source of truth for contract and behavior. | 2026-04-27 | verified-path |
576
+ | runtime-code | projects/praxis-dynamic-fields/src/lib/base/simple-base-select.component.ts | Primary source of truth for contract and behavior. | 2026-04-27 | verified-path |
577
+ | schema-types | projects/praxis-core/src/lib/models/material-field-metadata.interface.ts | Primary source of truth for contract and behavior. | 2026-04-27 | verified-path |