---
title: "pdx-inline-relative-period JSON API (Canonical)"
slug: "pdx-inline-relative-period-json-api"
doc_type: "api-reference"
component: "pdx-inline-relative-period"
document_kind: "json-api-canonical"
reference_mode: "canonical"
contract_format: "json"
contract_source: "runtime-and-code"
description: "Referência canônica do contrato JSON do componente pdx-inline-relative-period."
category: "components"
sub_category: "dynamic-fields"
audience:
  - "frontend"
  - "architect"
  - "platform-team"
level: "advanced"
status: "active"
owner: "praxis-ui"
source_of_truth:
  - "projects/praxis-dynamic-fields/src/lib/components/inline-relative-period/inline-relative-period.component.ts"
  - "projects/praxis-dynamic-fields/src/lib/base/simple-base-select.component.ts"
  - "projects/praxis-core/src/lib/models/material-field-metadata.interface.ts"
source_of_truth_last_verified: "2026-03-16"
last_updated: "2026-03-16"
toc: true
sidebar: true
tags:
  - "json-api"
  - "canonical-contract"
  - "pdx-inline-relative-period"
api_stability: "canonical"
schema_verified: true
runtime_verified: true
editor_coverage_verified: false
runtime_scope: "public"
legacy_paths_present: false
has_known_mismatches: false
related_components:
  - "praxis-table"
  - "pdx-material-select"
  - "pdx-base-select-runtime-contract"
---

# pdx-inline-relative-period

Este documento e a referência canônica da API JSON de pdx-inline-relative-period.

## Summary

- Tipo documental: API reference canônica de contrato JSON.
- Source of truth: runtime e codigo declarados no frontmatter.
- Objetivo operacional: consulta rápida, auditável e determinística sob pressão.
- Resumo funcional: Contrato JSON metadata-driven com comportamento definido por runtime e schema associado.

## Purpose and scope

- O componente consome payload JSON metadata-driven e expõe comportamento runtime configurável por contrato.
- Esta referência cobre contrato público, classificação de paths e semântica de cobertura (runtime/schema/editor).
- Fora de escopo: quickstart, tutorial narrativo e notas arquiteturais que não alteram contrato público.

## Consulta rápida (obrigatorio)

| Regra/tema | Observado | Canonico desejado | Status | Evidencia |
| --- | --- | --- | --- | --- |
| Component id | `pdx-inline-relative-period` | Manter ID canônico estável e versionado por contrato | Active | frontmatter.component |
| Primary contract source | `runtime-and-code` | Runtime, schema e docs devem permanecer rastreáveis | Partial | frontmatter.contract_source + source_of_truth |
| Runtime coverage | `true` | Comportamentos runtime críticos devem ficar explicitamente verificados | Active | `projects/praxis-dynamic-fields/src/lib/components/inline-relative-period/inline-relative-period.component.ts`, `projects/praxis-dynamic-fields/src/lib/base/simple-base-select.component.ts` |
| Schema/type coverage | `true` | Tipos e schema devem refletir paths públicos do contrato | Active | source_of_truth + Detailed API reference |
| Editor/tooling coverage | `false` | Editor/tooling deve espelhar somente contrato público suportado | Partial | `projects/praxis-core/src/lib/utils/inline-filter-controls.util.ts`, `projects/praxis-dynamic-fields/src/lib/services/component-registry/component-registry.service.ts` |
| Path hygiene | `false` | Manter consistência entre contrato canônico e caminhos documentados | Active | frontmatter.legacy_paths_present |
| Known mismatches | `false` | Registrar observed vs desired de forma auditável | Active | frontmatter.has_known_mismatches |

## Source of truth

| Source | Kind | Notes |
| --- | --- | --- |
| projects/praxis-dynamic-fields/src/lib/components/inline-relative-period/inline-relative-period.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidência de contrato. |
| projects/praxis-dynamic-fields/src/lib/base/simple-base-select.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidência de contrato. |
| projects/praxis-core/src/lib/models/material-field-metadata.interface.ts | schema-types | Arquivo presente no repositorio e usado como evidência de contrato. |

## Support legend

- **Active**: suportado em runtime e liberado para uso externo.
- **Partial**: suporte parcial, com restricoes, lacunas ou validação incompleta.
- **Declared-only**: declarado em tipos/schema sem evidência operacional completa.
- **Schema-only**: presente em schema/tipos sem cobertura runtime confirmada.

## Contract status snapshot

| Item | Value | Notes |
| --- | --- | --- |
| Reference mode | `canonical` | Deve permanecer canônico |
| Contract format | `json` | Contrato metadata-driven |
| Contract source | `runtime-and-code` | Alinhar com source_of_truth |
| Runtime scope | `public` | Escopo publicado para consumidores |
| Runtime verified | `true` | Revisar sempre com evidência de runtime |
| Schema verified | `true` | Revisar sempre com evidência de tipos/schema |
| Editor coverage verified | `false` | Revisar sempre com evidência de editor/tooling |
| Current path hygiene | `false` | Segregar consistência do contrato canônico |
| Has known mismatches | `false` | Divergencias devem aparecer em secao dedicada |

## Contract classification (obrigatorio)

### Canonical paths (public contract)

| Path | Type | Required | Default | Status | Notes |
| --- | --- | --- | --- | --- | --- |
| `metadata` | object | true | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.relativePeriodOptions` | array | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.relativePeriodMultiple` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.relativePeriodSearchable` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.relativePeriodColumns` | array | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.relativePeriodShowProgress` | unknown | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.relativePeriodCloseOnSelect` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.relativePeriodIcon` | string | false | n/a | Partial | See Detailed API reference for runtime semantics. |

### Path audit

Nenhum desvio de caminho foi identificado nesta revisão.

### Internal-only paths

Não ha paths internal-only confirmados no contrato público desta revisão.

### Experimental paths

Não ha paths experimentais confirmados no contrato público desta revisão.

## Public contract surface (obrigatorio)

### Top-level configuration blocks

| Block | Purpose | Required | Merge strategy | Notes |
| --- | --- | --- | --- | --- |
| `metadata` | Payload declarativo principal do componente | true | deep-merge | runtime linkage verified for core flows (component specs, 2026-03-16). |
| `readonlyMode` | Override de readonly no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-16). |
| `disabledMode` | Override de disabled no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-16). |
| `visible` | Override de visibilidade no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-16). |
| `presentationMode` | Renderização de apresentação sem interação | false | override | runtime linkage verified for core flows (component specs, 2026-03-16). |

### Nested configuration blocks

| Path | Type | Required | Default | Constraints | Notes |
| --- | --- | --- | --- | --- | --- |
| `metadata.relativePeriodOptions` | array | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.relativePeriodMultiple` | boolean | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.relativePeriodSearchable` | boolean | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.relativePeriodColumns` | array | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.relativePeriodShowProgress` | unknown | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.relativePeriodCloseOnSelect` | boolean | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.relativePeriodIcon` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.relativePeriodTexts` | unknown | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.inlineAutoSize.*` | object | false | n/a | component-defined | Partial; verify per source_of_truth. |

### Input bindings (inbound data)

| Binding/Path | Type | Required | Source | Runtime normalization | Notes |
| --- | --- | --- | --- | --- | --- |
| `metadata` | object | true | host-json | component-defined | Primary inbound contract payload. |
| `readonlyMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
| `disabledMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
| `visible` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
| `presentationMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |

### Output events

| Event | Payload | Trigger | Stability | Notes |
| --- | --- | --- | --- | --- |
| `searchTermChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `selectionChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `openedChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `valueChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `focusChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `nativeBlur` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `nativeChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |

### External side channels

| Channel | Direction | Contract | Failure mode | Notes |
| --- | --- | --- | --- | --- |
| `host/services/storage` | bidirectional | component-defined | component-defined | Side channels variam por componente e host; verificar em source_of_truth. |

### Host/runtime dependencies

| Dependency | Required | Environment | Purpose | Notes |
| --- | --- | --- | --- | --- |
| `inline-relative-period.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/inline-relative-period/inline-relative-period.component.ts`. |
| `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`. |
| `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`. |

## Coverage by surface (obrigatorio)

### Coverage matrix (runtime, schema/type, editor/tooling)

| Surface | Verified | Coverage status | Evidence | Notes |
| --- | --- | --- | --- | --- |
| Runtime | `true` | Active | `projects/praxis-dynamic-fields/src/lib/components/inline-relative-period/inline-relative-period.component.ts`, `projects/praxis-dynamic-fields/src/lib/base/simple-base-select.component.ts` | Core runtime flows verified via focused component specs on 2026-03-16; editor/tooling coverage remains independent. |
| Schema/Types | `true` | Active | source_of_truth + Detailed API reference | Reconcile schema/types with canonical paths during follow-up when needed. |
| Editor/Tooling | `false` | Partial | `projects/praxis-core/src/lib/utils/inline-filter-controls.util.ts`, `projects/praxis-dynamic-fields/src/lib/services/component-registry/component-registry.service.ts` | Alias/selector tooling linkage verified for inline filters; visual editor end-to-end coverage remains not-yet-verified. |

### Runtime coverage boundaries

- Ambientes suportados: browser/dev/prod; SSR/hydration appears to be component-dependent unless explicitly verified.
- Pre-condicoes: payload JSON válido, bindings de host consistentes e dependencias descritas no source_of_truth.
- Fora de cobertura confirmada: caminhos internos, experimentais ou aliases não enumerados formalmente.

### Editor and tooling notes

- Evidencia de tooling: aliases `pdx-inline-*` resolvidos por `inline-filter-controls.util.ts` e consumidos no `ComponentRegistryService`; editor visual E2E permanece not-yet-verified.
- O que esta exposto no editor visual depende da cobertura real do workspace e não deve ser inferido como suporte runtime total.
- Campos disponíveis apenas via JSON/manual devem continuar no contrato, com rótulo explícito de cobertura parcial.
- Quando houver divergencia entre editor e runtime, manter mismatch rastreável em secao dedicada.

## Resolution and precedence model (obrigatorio)

### Merge order

1. defaults do componente
2. contrato JSON recebido
3. overrides de host/runtime
4. normalizacoes internas

### Fallback order

contrato explicito -> aliases históricos (quando suportados) -> defaults internos -> comportamento seguro

### Override points

- inputs publicos do componente
- configuração JSON de runtime
- integracoes de host (serviços/tokens/adapters)

### Runtime normalization

Alias e defaults devem convergir para paths canônicos; onde não houver evidência, manter not-yet-verified de forma explícita.

### Precedence rules

Em conflito entre caminho histórico e path canônico, priorizar path canônico e registrar janela de migração do histórico.

## Validation and error semantics (obrigatorio)

### Validation model

| Path/Rule | Validation phase | Behavior on fail | Error code / warning | Notes |
| --- | --- | --- | --- | --- |
| canonical-paths | parse/runtime | component-defined (warn/reject/default) | not-yet-standardized | Semantica detalhada preservada na referência técnica por componente. |

### Invalid and unknown field handling

- Campos desconhecidos: comportamento component-defined (ignore, warn ou reject).
- Tipos invalidos: pode haver fallback, warning ou falha, conforme runtime especifico.
- Valores fora de dominio: registrar observed vs desired em Known limitations and mismatches.

### Fail-open / fail-closed behavior

| Condition | Mode | Runtime behavior | Consumer impact |
| --- | --- | --- | --- |
| invalid-or-unknown-field | component-defined | not-yet-verified | Pode gerar warning, fallback silencioso ou rejeicao; validar por componente. |

### Runtime warnings vs hard failures

| Condition | Severity | Observability | Consumer action |
| --- | --- | --- | --- |
| partial-or-declared-only-coverage | warning | logs/eventos do componente | Confirmar ligação runtime antes de uso crítico. |
| mismatch-confirmed | error-or-warning | componente/host observability | Planejar migração e corrigir contrato/runtime. |

## Detailed API reference
### Preserved technical reference (normalized from previous revision)

### 1. Visão Geral e Quando Usar
`pdx-inline-relative-period` é o filtro inline para períodos relativos com cards, ícones e barra de progresso.

Use quando precisar:
- selecionar janelas como "Hoje", "Últimos 7 dias", "Último mês";
- operar com presets custom de período relativo;
- dar feedback visual de posição/progresso da seleção.

### 2. API do Componente (Inputs/Outputs)
| Propriedade | Tipo | Padrão | Obrigatório | Comportamento |
| --- | --- | --- | --- | --- |
| `metadata` | `MaterialSelectMetadata` | - | Sim | Contrato principal de período relativo inline. |
| `readonlyMode/disabledMode/visible/presentationMode` | `boolean` | `false/false/true/false` | Não | Estados de host do campo inline. |
| `selectionChange` | `T \| T[]` | - | Output herdado | Valor(es) selecionado(s). |
| `optionSelected` | `SelectOption` | - | Output herdado | Opção escolhida no painel. |

### 3. Matriz de Cobertura JSON (Completa)
#### 3.1 Campos específicos do componente
| Caminho JSON | Tipo | Status | Comportamento em runtime |
| --- | --- | --- | --- |
| `metadata.relativePeriodOptions` / `relativePeriodPresets` | `array \| string(JSON)` | Ativo | Fonte principal de períodos relativos. |
| `metadata.relativePeriodMultiple` / `multiple` | `boolean` | Ativo | Define single/multiple selection. |
| `metadata.relativePeriodSearchable` / `searchable` | `boolean` | Ativo | Habilita busca no painel. |
| `metadata.relativePeriodColumns` / `columns` | `number` | Ativo | Número de colunas da grade de cards. |
| `metadata.relativePeriodShowProgress` | `boolean` | Ativo | Exibe barra de progresso superior. |
| `metadata.relativePeriodProgressGradientLowColor/midColor/highColor` | `string` | Ativo | Cores do gradiente da barra de progresso relativa. |
| `metadata.relativePeriodCloseOnSelect` | `boolean` | Ativo | Fecha painel após escolha (single). |
| `metadata.relativePeriodIcon` / `prefixIcon` | `string` | Ativo | Ícone do trigger/painel. |
| `metadata.relativePeriodIconKey/optionIconKey` | `string` | Ativo | Chave do ícone por opção. |
| `metadata.relativePeriodSubtitleKey/optionSubtitleKey` | `string` | Ativo | Chave de subtítulo por opção. |
| `metadata.relativePeriodTexts` / `inlineTexts` | `object \| string(JSON)` | Ativo | Textos de labels, empty state e aria; templates canônicos devem usar `{{label}}` e `{{percent}}` quando houver interpolação, com compatibilidade legada para `{...}` em metadata. |
| `metadata.inlineOverlay.applyMode` | `"auto" \| "explicit"` | Ativo | Quando `explicit`, seleções ficam em rascunho até `Aplicar`. |
| `metadata.inlineOverlay.actions.apply.*` | `object` | Ativo | Label, aria, icon, appearance e colorRole do commit. |
| `metadata.inlineOverlay.actions.cancel.*` | `object` | Ativo | Label, aria, icon, appearance e colorRole do descarte. |
| `metadata.inlineOverlay.actions.clear.*` | `object` | Ativo | Label, aria, icon, appearance, colorRole e visibilidade da limpeza explícita. |
| `metadata.inlineAutoSize.*` | `object` | Ativo | Controle de largura da pill e painel. |

#### 3.2 Campos herdados compartilhados (exaustivo)
- `projects/praxis-dynamic-fields/src/lib/components/material-select/pdx-material-select.json-api.md`
- `projects/praxis-dynamic-fields/src/lib/base/pdx-base-select-runtime-contract.json-api.md`

Resumo de composição deste componente:
- `Ativo`: presets de período, grade com ícones e progresso visual.
- `Extensão de runtime`: namespace `relativePeriod*` para contratos de filtro temporal.

### 4. Mapeamento de Comportamento
- Opções podem vir como array ou string JSON no metadado.
- Em single mode, pode fechar automaticamente por `relativePeriodCloseOnSelect`.
- Barra de progresso calcula posição da opção selecionada no conjunto.
- Busca filtra opções por label/subtítulo antes da seleção.
- Com `inlineOverlay.applyMode: "explicit"`, clique em card altera apenas o rascunho do painel; `Aplicar` comita, enquanto `Cancelar`, `Esc`, detach ou clique externo descartam.

### 5. Exemplo Mínimo (JSON + Uso)
```json
{
  "componentId": "pdx-inline-relative-period",
  "metadata": {
    "name": "period",
    "label": "Período",
    "controlType": "select",
    "relativePeriodOptions": [
      { "value": "today", "label": "Hoje" },
      { "value": "last_7_days", "label": "Últimos 7 dias" }
    ]
  }
}
```
Uso: filtro temporal relativo em modo single.

### 6. Exemplo Corporativo (JSON + Uso)
```json
{
  "componentId": "pdx-inline-relative-period",
  "metadata": {
    "name": "analyticsWindow",
    "label": "Janela",
    "controlType": "select",
    "relativePeriodMultiple": false,
    "relativePeriodSearchable": true,
    "relativePeriodColumns": 2,
    "relativePeriodShowProgress": true,
    "relativePeriodCloseOnSelect": true,
    "relativePeriodIconKey": "icon",
    "relativePeriodSubtitleKey": "subtitle",
    "relativePeriodOptions": [
      { "value": "today", "label": "Hoje", "subtitle": "00:00 até agora", "icon": "today" },
      { "value": "last_30_days", "label": "Últimos 30 dias", "subtitle": "Janela mensal", "icon": "date_range" }
    ],
    "relativePeriodTexts": {
      "relativePeriodSubtitle": "Escolha uma janela de análise",
      "relativePeriodEmptyStateText": "Nenhum preset disponível",
      "progressAriaLabel": "{{label}} em {{percent}} por cento"
    },
    "inlineOverlay": {
      "applyMode": "explicit",
      "actions": {
        "apply": { "label": "Aplicar", "appearance": "filled", "colorRole": "primary" },
        "cancel": { "label": "Cancelar", "appearance": "text", "colorRole": "neutral" },
        "clear": { "label": "Limpar", "appearance": "outlined", "colorRole": "neutral" }
      }
    },
    "inlineAutoSize": { "minWidth": 188, "maxWidth": 360, "panelMinWidth": 320, "panelMaxWidth": 560 }
  }
}
```
Uso: filtro de analytics corporativo com semântica temporal padronizada.

### 7. Troubleshooting e Armadilhas Comuns
1. Presets não aparecem.
Correção: validar `relativePeriodOptions` (array ou JSON válido).

2. Painel não fecha após selecionar.
Correção: habilitar `relativePeriodCloseOnSelect` em modo single.

3. Progresso não muda.
Correção: verificar se existe opção selecionada e lista com mais de um item.

4. Ícone/subtítulo vazio.
Correção: ajustar `relativePeriodIconKey` e `relativePeriodSubtitleKey`.

5. Grade com quebra ruim.
Correção: calibrar `relativePeriodColumns` e `inlineAutoSize`.

### 8. Cross-links
- `projects/praxis-dynamic-fields/src/lib/components/material-select/pdx-material-select.json-api.md`
- `projects/praxis-dynamic-fields/src/lib/base/pdx-base-select-runtime-contract.json-api.md`

### 9. Relatório de Validação Estrutural
- Visão geral: PASS
- API (inputs/outputs): PASS
- Cobertura JSON completa (especifico + herdado): PASS
- Mapeamento de comportamento: PASS
- Exemplo mínimo: PASS
- Exemplo corporativo: PASS
- Troubleshooting: PASS

## JSON path index (obrigatorio)

| Path | Type | Required | Default | Status | Notes |
| --- | --- | --- | --- | --- | --- |
| `metadata` | object | true | n/a | Partial | See Detailed API reference. |
| `metadata.relativePeriodOptions` | array | false | n/a | Partial | See Detailed API reference. |
| `metadata.relativePeriodMultiple` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata.relativePeriodSearchable` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata.relativePeriodColumns` | array | false | n/a | Partial | See Detailed API reference. |
| `metadata.relativePeriodShowProgress` | unknown | false | n/a | Partial | See Detailed API reference. |
| `metadata.relativePeriodCloseOnSelect` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata.relativePeriodIcon` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.relativePeriodTexts` | unknown | false | n/a | Partial | See Detailed API reference. |
| `metadata.inlineAutoSize.*` | object | false | n/a | Partial | See Detailed API reference. |
| `readonlyMode` | boolean | false | n/a | Partial | See Detailed API reference. |
| `disabledMode` | boolean | false | n/a | Partial | See Detailed API reference. |
| `visible` | boolean | false | n/a | Partial | See Detailed API reference. |
| `presentationMode` | boolean | false | n/a | Partial | See Detailed API reference. |

## Events reference (obrigatorio)

| Event | Payload | Trigger | Stability | Notes |
| --- | --- | --- | --- | --- |
| `searchTermChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `selectionChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `openedChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `valueChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `focusChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `nativeBlur` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `nativeChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |

## Styling API (obrigatorio quando aplicavel)

| Token/Class | Scope | Purpose | Notes |
| --- | --- | --- | --- |
| `metadata.relativePeriodIcon` | component | Styling-related JSON path | Validate against runtime implementation. |

## Examples (obrigatorio)

| Example | Scenario | Validates | Notes |
| --- | --- | --- | --- |
| `Minimal valid` | baseline payload | required contract blocks | Extracted from preserved technical reference when available. |
| `Common setup` | common component usage | standard runtime behavior | Validate against host integration path. |
| `Advanced setup` | richer config with overrides | precedence and normalization | Requires runtime confirmation for edge cases. |
| `Enterprise scenario` | governance/legacy/migration context | auditability and compatibility boundaries | Include tenant-specific constraints when applicable. |

### Minimal valid

```json
{
  "componentId": "pdx-inline-relative-period",
  "metadata": {
    "name": "period",
    "label": "Período",
    "controlType": "select",
    "relativePeriodOptions": [
      {
        "value": "today",
        "label": "Hoje"
      },
      {
        "value": "last_7_days",
        "label": "Últimos 7 dias"
      }
    ],
    "relativePeriodMultiple": false
  }
}
```

### Common setup

```json
{
  "componentId": "pdx-inline-relative-period",
  "metadata": {
    "name": "analyticsWindow",
    "label": "Janela",
    "controlType": "select",
    "relativePeriodMultiple": false,
    "relativePeriodSearchable": true,
    "relativePeriodColumns": 2,
    "relativePeriodShowProgress": true,
    "relativePeriodCloseOnSelect": true,
    "relativePeriodIconKey": "icon",
    "relativePeriodSubtitleKey": "subtitle",
    "relativePeriodOptions": [
      {
        "value": "today",
        "label": "Hoje",
        "subtitle": "00:00 até agora",
        "icon": "today"
      },
      {
        "value": "last_30_days",
        "label": "Últimos 30 dias",
        "subtitle": "Janela mensal",
        "icon": "date_range"
      }
    ],
    "relativePeriodTexts": {
      "relativePeriodSubtitle": "Escolha uma janela de análise",
      "relativePeriodEmptyStateText": "Nenhum preset disponível",
      "progressAriaLabel": "{{label}} em {{percent}} por cento"
    },
    "inlineAutoSize": {
      "minWidth": 188,
      "maxWidth": 360,
      "panelMinWidth": 320,
      "panelMaxWidth": 560
    },
    "relativePeriodIcon": "pdx-inline-relative-period-common"
  }
}
```

### Advanced setup

```json
{
  "componentId": "pdx-inline-relative-period",
  "metadata": {
    "name": "analyticsWindow",
    "label": "Janela",
    "controlType": "select",
    "relativePeriodMultiple": false,
    "relativePeriodSearchable": true,
    "relativePeriodColumns": 2,
    "relativePeriodShowProgress": true,
    "relativePeriodCloseOnSelect": true,
    "relativePeriodIconKey": "icon",
    "relativePeriodSubtitleKey": "subtitle",
    "relativePeriodOptions": [
      {
        "value": "today",
        "label": "Hoje",
        "subtitle": "00:00 até agora",
        "icon": "today"
      },
      {
        "value": "last_30_days",
        "label": "Últimos 30 dias",
        "subtitle": "Janela mensal",
        "icon": "date_range"
      }
    ],
    "relativePeriodTexts": {
      "relativePeriodSubtitle": "Escolha uma janela de análise",
      "relativePeriodEmptyStateText": "Nenhum preset disponível",
      "progressAriaLabel": "{{label}} em {{percent}} por cento"
    },
    "inlineAutoSize": {
      "minWidth": 188,
      "maxWidth": 360,
      "panelMinWidth": 320,
      "panelMaxWidth": 560
    }
  },
  "readonlyMode": false,
  "disabledMode": false
}
```

### Enterprise scenario

```json
{
  "componentId": "pdx-inline-relative-period",
  "metadata": {
    "name": "analyticsWindow",
    "label": "Janela",
    "controlType": "select",
    "relativePeriodMultiple": false,
    "relativePeriodSearchable": true,
    "relativePeriodColumns": 2,
    "relativePeriodShowProgress": true,
    "relativePeriodCloseOnSelect": true,
    "relativePeriodIconKey": "icon",
    "relativePeriodSubtitleKey": "subtitle",
    "relativePeriodOptions": [
      {
        "value": "today",
        "label": "Hoje",
        "subtitle": "00:00 até agora",
        "icon": "today"
      },
      {
        "value": "last_30_days",
        "label": "Últimos 30 dias",
        "subtitle": "Janela mensal",
        "icon": "date_range"
      }
    ],
    "relativePeriodTexts": {
      "relativePeriodSubtitle": "Escolha uma janela de análise",
      "relativePeriodEmptyStateText": "Nenhum preset disponível",
      "progressAriaLabel": "{{label}} em {{percent}} por cento"
    },
    "inlineAutoSize": {
      "minWidth": 188,
      "maxWidth": 360,
      "panelMinWidth": 320,
      "panelMaxWidth": 560
    }
  },
  "presentationMode": true,
  "visible": true
}
```

## Compatibility and migration notes (recomendado)

| Concern | Affected versions | Migration action | Deadline | Notes |
| --- | --- | --- | --- | --- |
| 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 |

## Known limitations and mismatches (recomendado)

| Path/Behavior | Observed behavior (runtime) | Desired behavior | Impact | Tracking issue | Target fix |
| --- | --- | --- | --- | --- | --- |
| Canonical contract parity | Runtime e exemplos desta referência foram realinhados em 2026-03-16 para cobrir `progressAriaLabel` no contrato canônico `{{...}}`; metadata legada com `{...}` continua aceita apenas por compatibilidade | Manter exemplos e host overrides no formato canônico `{{...}}` | Low | n/a | Monitor in periodic audit |

## Source references (obrigatorio)

| Source type | Path/URL | Why it is source of truth | Last verified (YYYY-MM-DD) | Notes |
| --- | --- | --- | --- | --- |
| runtime-code | projects/praxis-dynamic-fields/src/lib/components/inline-relative-period/inline-relative-period.component.ts | Primary source of truth for contract and behavior. | 2026-03-16 | verified-path |
| runtime-code | projects/praxis-dynamic-fields/src/lib/base/simple-base-select.component.ts | Primary source of truth for contract and behavior. | 2026-03-16 | verified-path |
| schema-types | projects/praxis-core/src/lib/models/material-field-metadata.interface.ts | Primary source of truth for contract and behavior. | 2026-03-16 | verified-path |
